Posts

ghci - Compiling Haskell code in Cygwin, and some other bugs in Haskell Platform on Windows -

ghci - Compiling Haskell code in Cygwin, and some other bugs in Haskell Platform on Windows - i trying compile simple hello world programme in haskell, haskell platform 2011.2.0.1. if load code in winghci, , utilize gui compile, .exe created. can run .exe cygwin. but if seek compile code in cygwin (using ghc --make ), linker fails. again, if compile windows cmd prompt, compile+linker works fine. are there other environment variables need import cygwin, create compile+linker work in it? have set next dirs in cygwin path: 2011.2.0.1/lib/extralibs/bin , 2011.2.0.1/bin (these 2 valid haskell related entries see in windows environment variables). i noticed couple of invalid items in windows environment variables (this looks bug in haskell installation): (system var) c/programfiles/haskell/bin - dir not exist because have installed haskell in d disk. (user var) userxxx/applicationdata/cabal/bin - dir not exist. i tried file bug study in haskellplatform, dont have p...

model view controller - Is this MVC in javascript? -

model view controller - Is this MVC in javascript? - despite have been using mvc in php many times, found out quite different in javascript. i'm reading mvc in javascript on web, many of them have different implementation. came simple mvc, think not correct. acceptable or wrong? var appview = view.extend({ init: function() { // hear model changes this.listen("counterchanged", $.proxy( this.updatecounter, )); // assign click event; phone call controller method this.container.find("#increase").click( this.callback( this.controller, "increase" )); this.container.find("#decrease").click( this.callback( this.controller, "decrease" )); }, updatecounter: function( evtdata ) { this.container.find("#counter").html( evtdata.newvalue ); } }); var appcontroller = controller.extend({ increase: function() { this.model.update("c...

php function returns false -

php function returns false - the next php function returns n-th weekday of month, e.g. 3rd quarta-feira in jan 2012 in form 18-1-2012: <?php function giventhday($month, $year, $no, $day) { $counter = 0; for($i=1;$i<=31;$i++) { //schleife für 31 tage if(!checkdate($month, $i, $year)) { //wenn datum nicht existiert (bspw. 30. februar) zu nächstem schleifendurchlauf springen continue; } else { if(date('l', strtotime($i.'-'.$month.'-'.$year))==$day) { //wenn generiertes datum gleicher wochentag wie gesuchter tag $day $counter++; //dann $counter um eins erhöhen if($counter==$no) { //falls $counter==$no, falls bspw. dritter ($no==$counter==3) mittwoch gefunden, datum zurückgeben homecoming $i.'-'.$month.'-'.$year; } } } } homecoming false; //existiert nicht, bspw. fünfter ...

streaming - Ruby TweetStream Locations Feature not working -

streaming - Ruby TweetStream Locations Feature not working - i'm accessing ruby tweetstream fine in regards "filter" method; however, whenever seek limit of streaming content bounding box (which know works), ignores code or doesn't run @ all. here's of code: tweetstream.configure |config| config.username = 'username' config.password = 'password' config.auth_method = :basic end tweetstream::client.new.filter({:locations => '-80.29,32.57,-79.56,33.09', :track => ["bob loblaw"]}) |tweet| p tweet.inspect end i've tried "locations" method: tweetstream::client.new.filter({:track => ["bob loblaw"]}).locations('-80.29,32.57,-79.56,33.09') |tweet| p tweet.inspect end i've tried locations(['-80.29,32.57,-79.56,33.09']) , locations(['-80.29,32.57','-79.56,33.09']). anybody got ideas? tweetstream::client.new.locations(-80.29,32....

JavaScript Anonymous Method -

JavaScript Anonymous Method - hi building little simple js framework university. having issues doing jquery. currently can phone call methods $.method() struggling on how $().method() have looked @ source , can't seem work out how achieved it. every time seek adapt mine theirs not work. so best way accomplish this. function $() { homecoming object.create(proto); } $.method = function method() { ... }; proto.method = function method() { ... }; $.method(); $().method(); so have function properties methods , function returns object has methods. also pro tip, $ poor variable name, utilize more meaningful. javascript

jprofiler - How to stop "Thread History" (in "Thread Views") after JVM exits? -

jprofiler - How to stop "Thread History" (in "Thread Views") after JVM exits? - the thread history in thread views continues running, if jvm exits , kept live jprofiler (using keep vm alive). behaviour see lot of useful info time when jvm running , growing amount of useless info after (all threads waiting, in case). i tried using trigger jvm exit stop recording action, not stop thread history. the trigger works, verified using print message action. thanks jprofiler has maintain track of threads, thread history has no recording options. if growing time line in keep-alive state bothering you, recommend save snapshot. in snapshot, static. jprofiler

api - Can Magento pull in USPS "Paid Online" rates rather than "Post Office" rates? -

api - Can Magento pull in USPS "Paid Online" rates rather than "Post Office" rates? - we have usps rates displaying correctly in magento 1.5. however, have noticed rates appearing "paid @ post office" rates, opposed "paid online" rates. it nice know if there way alter magento pulls in "paid online" rates cheaper customer. the module needs adjusted passes online instead of in tag. api magento usps