Posts

.net - Can't negotiate Signalr when using only webapi -

i followed following video on getting signal , webapi running together: video however, i'm unable working on solution. have empty api project has references many other projects have api controllers defined functionality. in 1 of other projects, wanted add signalr hub communicate client. so, added signalr through nuget. right off bat began getting owin error added following app settings <add key="owin:automaticappstartup" value="false" /> i've added hubcontext controller in question so: private readonly lazy<ihubcontext> _hub = new lazy<ihubcontext>( () => globalhost.connectionmanager.gethubcontext<taskhub>()); /// <summary> /// gets hub. /// </summary> protected ihubcontext hub { { return _hub.value; } } then in 1 of api calls, added following code send message client: hub.clients.all.taskloaded(); when started work on client, connection fail each time. after investigation learned .../s...

OSX crash log: How can I find what line in my app caused this crash? -

someone else got error, how find out source of crash? not sure file libdyld.dylib nor sure how understand exception type , code. os version: mac os x 10.9.5 (13f1077) crashed thread: 0 dispatch queue: com.apple.main-thread exception type: exc_bad_instruction (sigill) exception codes: 0x0000000000000001, 0x0000000000000000 thread 0 crashed:: dispatch queue: com.apple.main-thread 0 com.themolehill.tickmac 0x000000010bf9bb6b 0x10bf98000 + 15211 1 com.themolehill.tickmac 0x000000010bf996b6 0x10bf98000 + 5814 2 com.apple.appkit 0x00007fff87d77718 -[nsviewcontroller view] + 41 3 com.apple.appkit 0x00007fff87f2b4c2 -[nspopover showrelativetorect:ofview:preferrededge:] + 172 4 com.themolehill.tickmac 0x000000010bfa8371 0x10bf98000 + 66417 5 com.themolehill.tickmac 0x000000010bfabb55 0x10bf98000 + 80725 6 com.apple.appkit 0x00007fff87e8ba58 -[nswindow sendevent:] + 11296 7 com.apple.a...

android - Some layouts expanding slower than others when using LayoutTransition.CHANGING -

i have 19 horizontal linearlayouts arranged vertically within linearlayout. empty , onclick show text. animating layouts with parentone.getlayouttransition().enabletransitiontype(layouttransition.changing); for reason first 7 layouts seem opening onclick little slower 8th. split second have asked others @ when open make sure i'm not crazy. post entire file huge , on maximum allowable text on this. here meat , potatoes. so, why layouts opening slower others? numbers 8-19 open instantly onclick , 1-7 have small delay noticeable. java on create @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); getsupportactionbar().hide(); setcontentview(r.layout.tacticalfieldcarestudy); linearlayout parentone = (linearlayout) findviewbyid(r.id.tfclayoutone); linearlayout parenttwo = (linearlayout) findviewbyid(r.id.tfclayouttwo); linearlayout parenttwobullets = (linearlayout)findviewbyid(r.id.tfclayouttwobullets...

xaml - stackpanel Horizontal wrap text WP 8.1 -

Image
code: <code> <stackpanel orientation="horizontal"> <textblock text="key1:" fontsize="20" foreground="#73000000" textwrapping="wrap"/> <grid><textblock text="small value1" fontsize="20" textwrapping="wrap" /> </grid> </stackpanel> <stackpanel orientation="horizontal"> <textblock text="key2:" fontsize="20" foreground="#73000000" textwrapping="wrap"/> <grid> <textblock text="long long long long long longlonglong long long longvalue2" fontsize="20" textwrapping="wrap" /> </grid> </stackpanel> </code> image screen shot: i need make transfer of v...

python - Django Form context data lost on validation fail -

my form (code below) loads , saves fine. however, if there validation error in form , reloaded, context['uploaded_files'] assign in get_context_data method empty. why , how can once again pass context['uploaded_files'] when form reloaded on validation fail? class businesseditview(updateview): template_name = 'directory/business_edit.html' model = appuser form_class = businesseditform def get_context_data(self, **kwargs): context = super(businesseditview, self).get_context_data(**kwargs) user_object = context['appuser'] files = [user_object.logo] context['uploaded_files'] = files return context def get_object(self, queryset=none): return self.request.user def post(self, request, *args, **kwargs): form = businesseditform(request.post, instance=self.request.user) if form.is_valid(): form.save(commit=false) return httpresponsere...

ruby on rails - factory_girl: has many through association -

i have rich many many relationship between projects , users. project model has: has_many :project_members, dependent: :destroy, foreign_key: 'gallery_id' has_many :members, through: :project_members, class_name: 'user', foreign_key: 'member_id' user model: has_many :project_members, dependent: :destroy, foreign_key: 'member_id' has_many :member_projects, through: :project_members, source: :member_project and project_member model: belongs_to :member_project, foreign_key: 'gallery_id', class_name: 'project' belongs_to :member, foreign_key: 'member_id', class_name: 'user' i wrote project factory as: factorygirl.define factory :project_member association :project association :user role 'owner' end end however gives me: > undefined method `project=' #<projectmember:0x00000006f66048> i...

c++ - kill subprocess if proc -

i'm using c++11 , linux. attempting start multiple ssh commands using fork() , popen() , monitor when ssh command stops running. when kill ssh command on other computer, doesn't appear kill fork() child process started it. child process continues run until exit program. need kill child process once ssh command called popen() quits running? there better use popen() call ssh command? you need call wait or waitpid in order o/s remove child process. completed child process has not had status retrieved parent wait becomes "zombie" process. if you're not interested in child process status want have them cleaned up, can install signal handler sigchld , fire whenever 1 of child processes finishes, , call wait within handler "reap" child.