Posts

c - Backtrace for GNU make -

is there way gnu make print "backtrace" of targets led command being executed when fails? regularly deal heavily obfuscated makefiles while resolving portability issues building software on new system, , seems should extremely simple thing make aid in debugging, can't find way request it. i'd see like: gcc: error: ... make[2]: error: gcc ... make[2]: error building target bar make[2]: error building dependency bar target foo make[1]: error: make -c subdir make[1]: error building target subdir make[1]: error building dependency subdir target ... showing entire dependency path how failed command ended getting executed. is there way this? make -p , make -d provide interesting information, not precisely asking for. see make's man page .

objective c - force UIScrollView to update -

i'm stuck problem have serie of pages of characterview class going straight uiscrollview. loading part performance intensive, because of reason tried manage aid of threading scenario. intention load requested page (es. 5th page out of 10) , starting load pages of uiscrollview there , showing on screen, recurring somehow , load +1 / -1 (respectively 6 , 4) , show'em on screen , in second recursion load +2 / -2 ( 7th , 3rd ) , show'em on screen , on.. this code: -(void)loadpagesdrillingfrompage:(nsinteger) page { self.viewcontrollers = [[[nsmutablearray alloc] init] autorelease]; (unsigned = 0; < [pageids count]; i++) { [self.viewcontrollers addobject:[nsnull null]]; } pagecontrol.numberofpages = [pageids count]; didpreparepagescontainer = yes; if (kpreloadallpages && !threadisloadingpages) { threadisloadingpages = yes; nsnumber *startingpage = [nsnumber numberwithint:page]; nsmutablearray *preloa...

CUDA shared memory -

i need know cuda shared memory. let's assign 50 blocks 10 threads per block in g80 card. each sm processor of g80 can handle 8 blocks simultaneously. assume that, after doing calculations, shared memory occupied. what values in shared memory when next 8 new blocks arrive? previous values reside there? or previous values copied global memory , shared memory refreshed next 8 blocks? it states type qualifiers: variables in registers thread, stays in kernel variables in global memory thread, stays in kernel __device__ __shared__ type variable in shared memory block, stays in kernel __device__ type variable in global memory grid, stays until application exits __device__ __constant__ type variable grid, stays until application exits thus reference, answer question memory should refreshed next 8 blocks if reside in shared memory of device.

Unit Testing in XCode: Test rig '[...]/usr/bin/otest' exited abnormally with code 134 -

i have got problem when unit testing class. when running test, compiles without errors crashes (it not fail in sense of assertion not being met), displaying following error message: /developer/tools/runplatformunittests.include:451:0 test rig '/developer/platforms /iphonesimulator.platform/developer/sdks/iphonesimulator4.2.sdk/developer/usr/bin/otest' exited abnormally code 134 (it may have crashed). here's code: the class' interface: @interface abstractactionmodel : nsobject { nsstring* mname; actiontype mtype; // enum float mduration; float mrepeatcount; float mdelay; nsarray* mtriggerareas; } the implementation: - (void) dealloc { [mtriggerareas release]; [super dealloc]; } - (id) initwithconfigdata: (nsdictionary*) theconfigdata { nsassert(nil != theconfigdata, @"theconfigdata cannot nil"); self = [super init]; if (self) { self.name = [theconfigdata objectforkey:action_name]; self.type = ...

shell - SWeave with non-R code chunks? -

i use sweave produce latex documents chunks produced dynamically executing r code. works - possible have code chunks executed in different ways, e.g. executing code in shell, or running perl, , on? helpful able mix things up, things run shell commands fetch data, run perl commands pre-process it, , run r commands analyze it. of course use r chunks , use system() poor-man's substitute, doesn't make pleasant reading in document. it's not directly related sweave, org-babel , part of emacs org-mode , allows mix code chunks of different languages in 1 file, pass data 1 chunk another, execute them, , generate latex or html export output. you can find more informations org-mode here : http://www.orgmode.org/ and see how org-babel works : http://orgmode.org/worg/org-contrib/babel/

python - How to publish (in a server) a pydev app using eclipse? -

i'm new eclipse , in field of web applications. used eclipse wrote django application works inside development server integrated in django. now, using eclipse, want export app work apache2 server. i've installed server , configured inside eclipse (defining server runtime environments preferences , creating server). now, steps have follow export , make app work in server? you using django development server (the manage.py runsrever ) eclipse. eclipse or other ide has little deployment of web application. django documentation explains how deploy application on appache , wsgi quite well. basically need reproduce eclipse configuration in wsgi script. wsgi script python script runned apache mod_wsgi module. here example of wsgi script: import os project_dir = os.path.dirname(__file__) # provided python-paths (places python modules) # in eclipse configuration. you'll need add path's wsgi # script too. os.path.append(project_dir) os.path.append(project...

.net 4.0 - How to flush out suspended WCF workflows from the instancestore? -

we have identified need flush out several different workflows have been suspended/persisted long time (i.e. hung instances). our test environment can flushed clean before acceptance tests re-run. the dirty solution use sql script remove records instancestable , other related tables in database. what's proper solution? these wcf workflows. test rig running xp. using appfabric can use ui, or asume powershell commands, delete individual instanced. development , test purposes recreate database running sqlworkflowinstancestoreschema.sql script again.

Can an applescript "tell" call execute without visibly launching the application? -

i have mail rule set launch following applescript: using terms application "mail" on perform mail action messages themessages rule therule tell application "mail" -- stuff, including... checkaddressbook(thename, theaddress) end tell end perform mail action messages end using terms on checkaddressbook(thename, theaddress) tell application "address book" -- stuff end tell end checkaddressbook whenever mail rule executes, launches address book. not activated, shows on desktop. question is, can tell blocks instructed launch application silently, , quit when complete? applescript can't control application without running. that's way works. there other methods might use access address book database without launching application, if you're using applescript data address book database application has launch. recommendation add quit command suggested fábio.

jQuery clickable div with working mailto link inside -

i have div want clickable need mailto link inside div still work too. when hover on mailto link mailto appears @ bottom of browser clicking activates link attached div. anyway around this? thanks. <div class="directory_search_results"> <img src="images/no_photo.png" /> <ul class="staff_details"> <li class="search_results_name"><a href="http://www.netflix.com">micheal staff</a></li> <li class="search_results_location">university of illinois</li> <li class="search_results_email"><a href="mailto:test@test.org">test@test.com</a></li> <li class="search_results_phone">(407) 555-1212</li> <li class="search_results_office">(407) 555-1212</li> </ul></div> and jquery $(document).ready(function(){ $(".directory_search_results").click(function(){ ...

java - Why is having an abstract subclass of concrete class bad design? -

after java abstract abstract subclass of object. need force subclass implement methods, may have pretty defined hierarchy concrete classes. for example: have functioning hierarchy vehicle<--- car and want add electriccar hierarchy. vehicle<--car<--electriccar. i want different types of electric cars implement behaviors getbatterylife or something- why bad idea make electriccar abstract ? there's nothing wrong in making abstract. if business requires make abstract, it's fine. said, lots of classes in java lib abstract , still extending object.

ruby - Rails link_to with acts_as_taggable_on_steroids -

i using acts_as_taggable_on steroids , having problem piece of code generates link tag: <%= link_to tag, tag_path(:id => tag.name) %> when access url: http://localhost:3000/tags/rails i error: no action responded rails. actions: show however, url works: http://localhost:3000/tags/show/rails i have defined show action in tags_controller.rb class tagscontroller < applicationcontroller def show @stories = story.find_tagged_with(params[:id]) end end i have following routes generated rake:routes : tags /tags(.:format) {:controller=>"tags", :action=>"index"} post /tags(.:format) {:controller=>"tags", :action=>"create"} new_tag /tags/new(.:format) {:controller=>"tags", :action=>"new"} edit_tag /tags/:id/edit(.:format) {:c...

what is this error in android? -

what error ?? 02-17 22:00:54.199: error/androidruntime(338): fatal exception: main 02-17 22:00:54.199: error/androidruntime(338): java.lang.runtimeexception: failure delivering result resultinfo{who=null, request=1, result=-1, data=null} activity {com.dattsmoon.andfbchat/com.dattsmoon.andfbchat.andfbchat}: java.lang.illegalthreadstateexception: thread started. 02-17 22:00:54.199: error/androidruntime(338): @ android.app.activitythread.deliverresults(activitythread.java:2496) 02-17 22:00:54.199: error/androidruntime(338): @ android.app.activitythread.handlesendresult(activitythread.java:2538) 02-17 22:00:54.199: error/androidruntime(338): @ android.app.activitythread.access$2000(activitythread.java:117) 02-17 22:00:54.199: error/androidruntime(338): @ android.app.activitythread$h.handlemessage(activitythread.java:958) 02-17 22:00:54.199: error/androidruntime(338): @ android.os.handler.dispatchmessage(handler.java:99) 02-17 22:00:54.199: error/androidruntime(338...

F# match question -

this have far: type u = {str : string} //some type has property str (for simplicity, one) type du= | of u | b of u // discriminated union carries u then, somewhere have sequence of du doing distinctby , property distinct str. best come this: seq.distinctby (fun d -> match d (a u|b u) -> u.str) the code works, don't having match on , b of discriminated union , replace match something. question is, what? :) edit: in case, , b of discriminated union carry same type u them, 1 solution rid of du , add it's string form type u , simplify whole mess, keep way because going matches , such on , b... how doing match 1 time property of du? type u = {str : string} type du = | of u | b of u member this.u = match (a u | b u) -> u [a {str="hello"}; b {str="world"}; {str="world"}] |> seq.distinctby (fun x -> x.u.str) //val : seq<du> = seq [a {str = "hello";}; b {str = ...

Using json.net from string to datatable in C# -

hopefully can me example, because i'm new in json: webservice receive json string. understand created datatable. how manage in c# deserialize dataset? maybe has me. { "datatojohnson": { "0": { "maat_id": "1", "maat": "11" }, "1": { "maat_id": "2", "maat": "11+" }, "2": { "maat_id": "3", "maat": "12+" }, "3": { "maat_id": "4", "maat": "12/13" } } } thanks! raymond you define model represent json data: public class data { public int maat_id { get; set; } public string maat { get; set; } } public class mymodel { public dictionary<int, data> datatojohnson { get; set; } } and use json.net deserialize string model var json = @"{ ""datato...

multithreading - How to improve Java performace using static variables and threads? -

for sake of not going deep software supposed let me give example of trying solve, make short , sweet. lets have base class called x , implementation of class, call y. class y, naturally, extends base class x. lets have 20 objects instantiating class y via separate thread each object , every instantiation big file loaded memory. of these objects, perhaps, might need use different files make simple, lets need access same file. is there way define object(variable) points these files statically in base class that, though implementation class loaded 20 times via 20 different threads, can share same static object, file needs loaded 1 time??? thanks in advance... if know file ahead of time, open , load file in static initializer block, , store contents in static data member. content accessible instances of class, regardless of thread accessing instance objects. // in base class protected static final string filecontents; static { filecontents = readstufffromfile(); }...

text - Does Flash CS5 automatically embed font characters? -

does flash cs5 automatically embed font characters? use dynamic text flasheff dont change. the best answer embed chars individually needed, if flash doing embedding on own. once char gets embedded not rise file size if embed again.

Registering jquery radio button click event doesn't work -

i trying set hidden form field value of selected radio button. have following code: $(function () { // set hidden form field selected timeslot $('input[name=["timeslot"]').live("click", (function () { var valu = $(this).val(); alert(valu); $("#selectedslot").val(valu); })); }); all radio buttons have name "timeslot", , run function whenever 1 clicked. however, alert box shows blank when click 1 of radio buttons. update: oops! didn't see double square brackets. fixed it: $('input[name="timeslot"]').live("click", (function () { var valu = $(this).val(); alert(valu); $("#selectedslot").val(valu); })); and still having same problem. in fact, alert box not come more reason. update 2: actually, in real code have other events registered in initiation block besides 1 -- i...

CSS styles to superimpose Previous and Next buttons on top of photo -

i looked similar questions, didn't find any. maybe didn't type right words. i need place 2 transparent buttons on top of photo in photo gallery. on left middle there <- , on right middle there -> image buttons. these buttons gallery navigation buttons. anyone has tips or code snippet share? i have .net 4.0 app , using jquery. thanks put links , image inside div element position: relative; . give links position: absolute; , adjust position accordingly top , left , right , or bottom properties.

ios - Multiple UIViewControllers simultaneously -

i have uitableview in navigation controller occupying entire screen. have smaller custom uiview needs slide bottom, squeezing table view 100 pixels. custom view needs static, not moving while user navigates tableview. ive been told not have 2 uiviewcontrollers (vc) managing views on same screen. currently, appdelegate adds subview window vc, loads tableview , custom view [self addsubview:tablviewcontroller.view]; [self addsubview:customviewcontroller.view]; how should implemented? the way structure follows: have uiviewcontroller subclass view takes entire screen. have 2 subviews. first subview: view of uinavigationcontroller contains table view controller. second subview: custom uiview. have uinavigationcontroller's frame set entire bounds of main view controller's view , custom view's frame below visible area of screen. when need slide view, use uiview animation animate changing frame of uinavigationcontroller's view decreasing height , change...

cocoa touch - How do you force audio to come out of the iPhone speaker when a headset is attached? -

i'm trying add loudspeaker feature 1 of iphone apps. created recording functionality, when play recorded audio plays phone headset. what need recorded file played on loudspeaker, if there headset attached. how reroute audio this? you need override default audio properties using audiosessionsetproperty . @ force audio go speaker (note happen if headphones plugged in). osstatus err = 0; uint32 audiorouteoverride = kaudiosessionoverrideaudioroute_speaker; err = audiosessionsetproperty(kaudiosessionproperty_overrideaudioroute,sizeof(audiorouteoverride),&audiorouteoverride); to detect headphones, try (this literally copy/paste code off of post, caveat emptor, works me): /** * tells if headset plugged in */ - (bool) headsetispluggedin { bool returnval = no; uint32 routesize = sizeof(cfstringref); cfstringref route = null; osstatus error = audiosessiongetproperty(kaudiosessionproperty_audioroute, &routesize, &route); if (!error && (...