Posts

Java vs. PHP Speed Comparison -

which language faster web, java or php? it difficult 1 answer in theory java should faster: it's precompiled, trivial algorithim run faster in java php , there has been vast amount of work done optimise java improving code, standard libraries, jit compilers, etc. php loaded , interpreted every time if you're not using zend optimiser, objects intialised on every execution, trivial string varaible complex object many methods support. the problem in practice php sites seem run faster using fewer resources. i think because php developers take more straightforward approach design , don't lost trying implement exotic design patterns , implementing endless pointless abstractions.

grails - How do I increase the number of default rows per page? -

grails scaffolding defaults 10 rows per page. increase number without generating views , changing 10 in every file. change default? you have install scaffold templates with: grails install-templates now, edit in src/templates/scaffolding controller.groovy , increase value params.max want

Hibernate: Why does a change of bag lead to strange ADDs and DELETEs in the database? -

i have n:m-association between 2 classes user , role, implemented bag lazy="extra". association stored an association table sind user can have many roles , role can associated many users. now when add new role user, hibernate emmits sql code first removes entries in th eassociation table adds them again plus new association. i'd know why happens , how can rid of behavior. ralf i've found solution myself: hibernate bags first delete alle entreis , rebuild new state. if use set, association maintained. see hibernate manual, improving performance

c++ - Visual Studio Warning C4996 -

i'm getting following warning warning c4996: 'std::_uninitialized_copy0': function call parameters may unsafe - call relies on caller check passed values correct. disable warning, use -d_scl_secure_no_warnings. see documentation on how use visual c++ 'checked iterators' c:\program files\microsoft visual studio 10.0\vc\include\memory 348 i can't seem find information combat warning. looking @ output seems warning has boost.signals2 , auto_buffer. is safe ignore or can remove somehow? first, quite fond of compiler warnings. invoke gcc -wall -wextra. however, msvc warning c4996 fires on valid code. changes proposed in warning text compromise code portability, while never substantially improve code quality. regularly suppress warning in msvc projects (project properties->c++->advanced->disable specific warnings). check this , that discussions.

How do I use a start commit hook in TortoiseSVN to setup a custom log entry? -

i'd automate tortoisesvn part of commit process. i'd dynamically create log entry commit dialog. i know can launch commit dialog either commandline or right clicking on folder , selecting svncommit. i'd use start commit hook setup log entry. thought worked passing entry file name in messagefile variable when add hook script cannot see variable (hook launched after right clicking , choosing svncommit). when try using commandline use /logmsgfile parameter seems have no effect. i'm using tortoisesvn 1.5.3. looks own misunderstanding of the api caused problem. solution: 1) i've added start commit hook script tortoisesvn using hooks gui in settings area of right click menu. 2) script receive 3 pieces of information: path messagefile cwd details see: manual these passed command line arguements script - reason had thought set temporary environmental variables. my script opens file specified second arguement , adds in custom text. ...

static typing - Do you know of any examples of elegant solutions in dynamically typed languages? -

imagine 2 languages (apart type information) have same syntax, 1 statically typed while other 1 uses dynamic typing . then, every program written in statically typed language, 1 can derive equivalent dynamically typed program removing type information. not neccessarily possible other way around, class of dynamically typed programs strictly larger class of statically typed programs. let's call dynamically typed programs, there no mapping of variables types making them statically typed " real dynamically typed programs". as both language families definitly turing-complete, can sure every such real dynamically typed program there exists statically typed program doing same thing, read "experienced programmers able write elegant code in dynamically typed languages". ask myself: there examples of real dynamically typed programs, equivalent statically typed programm more complex / less "elegant" (whatever may mean)? do know of such exampl...

vb.net - Clean up Designer.vb file in Visual Studio 2008 -

i noticed designer.vb file of 1 of forms has a lot of controls aren't used or visible on form. copying controls other forms. there way clean designer.vb file , rid of unused controls? **update: windows form project. the real solution see copy controls new form selecting them in designer. way not created controls should not follow next form.