Posts

Showing posts from April, 2013

asp.net mvc - T4MVC hidden model classes from view dialog -

Image
i've noticed when adding views controller methods, dialog doesn't list of model classes. can still generate views , specify model used no longer available in dialogue options.(currently got v2.10.0) cheers tim asp.net mvc - t4mvc hidden model classes view dialog - stack overflow stack overflow questions developer jobs documentation beta tags users current community help chat stack overflow meta stack overflow communities sign up or log in customize list. more stack exchange communities company blog tour start here quick overview of site center detailed answers questions might have meta discuss workings , policies of site learn more stack overflow company business learn more hiring developers or posting ads log in sign up learn, share, build each month, on 50 million developers come stack overflow learn, share knowledge, , build careers. join wor...

WPF How to call rendertransform or trigger a trigger -

in button's control template have ispressed trigger moves button down , right. works great when button clicked. related other question: wpf button ispressed , accelerator key trigger when user presses key, want have button affected same rendertransform. can either trigger trigger or somehow apply new or existing transform button? <trigger property="button.ispressed" value="true"> <setter targetname="buttonborder" property="rendertransform" > <setter.value> <translatetransform y="1.0" x="1.0" /> </setter.value> </setter> </trigger> when user presses key, want have button affected move translation operation storyboard can executed key press well. change trigger call storyboard instead. <trigger property="button.ispressed" value="true"> <beginstoryboard storyboard="{staticresource buttonborderchange}"/> </trigger>

Adding duplicate array rows in Php -

i create function in php adds rows of array shared column value. so input. $test = array( array("c", 5, 6), array("c", 2, 3), array("test", 5, 6) ); and output. $testduplicatefree = array( array("c", 7, 9), array("test", 5, 6) ) ); i'm thinking function combine_duplicates($array,$col){ ... ... return $duplicatefreearray; } where $col duplicate free array. so, in case, combine_duplicates($test,0); would me desired output. this. <?php function combine_duplicates($array,$col) { $index = array(); foreach ($array $row) { $key = $row[$col]; if (!isset($index[$key])) { $index[$key] = $row; } else { ($i = 0; $i < count($row); ++$i) { if ($i != $col) { $index[$key][$i] += $row[$i]; } } } } return array_values($index); } $array = array( array("c", 5, 6), array("c", 2, 3), array("test", 5, 6) ); print_r(combine_duplicates($array, 0)); try here: http://codepad.org/mdhesqhi

compilation - Compiling C code on a Mac os x lion -

i beginner, trying code c on mac. using learn c hard way zed when tried running c code on mac not run. have installed xcode mac appstore when try run code using command "make" or "gcc" terminal responds command not found. doing wrong? i have tried searching solution of ones have found install xcode , not give further instructions. i hoping find out how test/run code. in advance! install command line tools via xcode. go preferences , downloads. xcode 4.3 command line tools if still have troubles after updating xcode or installing command line tools try install after: https://github.com/kennethreitz/osx-gcc-installer good luck!

gcc/g++/ld caching? -

i'm developing program generates parts of c/c++ libraries. e.g. creates directories - lib1, lib2, .. , libn. each library generates c/c++ code + makefile, uses gcc/g++ + ld , calls code libraries. problem if lib1 has function fun , libn well, when calling fun libn, lib1 used. i've tried different versions of gcc/g++ v4.7. now problem if lib1 has function fun , libn well, when calling fun libn, lib1 used. presumably talking shared libraries, , not archive libraries (where you'd multiply-defined symbol error). yes, how supposed work, , has always worked on unix. caching has nothing it. if on elf platform, might able make work more windows-like using -wl,-bsymbolic , you'll fighting default system behavior, , should expect rough ride, , lots of unexpected gotcha's. if fun doesn't need exposed libx , hidden symbol visibility friend. since generating code lib1 , ... libn , might easier avoid name collision using e.g. libx_fun instead of fun . more ...

mysql - Error during mysqld service installation on windows -

i start mysqld windows console following command: "c:\program files\mysql\mysql server 5.5\bin\mysqld" --install mysql --defaults-file=c:\program files\mysql\mysql server 5.5\my.ini the service aborts. log file display: [error] c:\program files\mysql\mysql server 5.5\bin\mysqld: unknown option '--install' what error ? [edit] syntax is: "c:\program files\mysql\mysql server 5.5\bin\mysqld" --install mysql --defaults-file="c:\program files\mysql\mysql server 5.5\my.ini" the official documentation wrong ... try specifying option as: --install=mysql

c# - Chronic inappropriate System.OutOfMemoryException occurrences -

here's problem should continuously-running, unattended console app: i'm seeing too-frequent app exits system.outofmemoryexception being thrown wide variety of methods deep in call stack -- system.string.tochararray() , or system.string.ctorchararraystartlength() , or system.xml.xmltextreaderimpl.inittextreaderinput() , down in system.string.concat() call in mongocollection.save() call's stack, , other unlikely places. for it's worth, we're using parallel tasks, app running on server, , app's total thread count never gets on 60. in of these cases know of reason other exception thrown, outofmemoryexception makes no sense in these contexts, , creates problems: according taskmanager , perfmon logs, system has had minimum of 65% out of 8gb free memory when has happened, and while exception handlers fire & log exception, not prevent app crash, and there's no continuing exception without user interaction (unless suppress windows error reporting, isn...

xcode4.3 - XCode customization -

Image
where can find documentation of xcode's 4.3 configuration/customization features , functions? e.g., where/how install templates, editor color scheme, library files etc. though looking these specific answers, rather prefer book/site reference. browsing apple's developer site , built-in quite far enlightening surprise... xcode4.3 - xcode customization - stack overflow stack overflow questions developer jobs documentation beta tags users current community help chat stack overflow meta stack overflow communities sign up or log in customize list. more stack exchange communities company blog tour start here quick overview of site center detailed answers questions might have meta discuss workings , policies of site learn more stack overflow company business learn more hiring developers or posting ads log in sign up learn, share, build each month, on 50 m...