Posts

debian - How can I use the kernel function in my C code? -

first, want apologize english, it's not mother language best. i'm new developer in debian, before cross-plateform code. since cross-plateform isn't in constraint anymore, want close possible kernel. for example, want use aes crypt file. aes exist in kernel , prefer use aes kernel rather aes (i trust more kernel source code). there way use kernel function in user space ? more precisely, exist method, or documentation ? if want have doc of c function, "man function". there equivalent kernel ? i hope doesn't make mistake question. thank reading, stack overflow me dozen , dozen time in past, thank you. edit : sorry, edit post , hope it's better time. is there way use kernel function in user space? no, kernel function cannot called directly user space. you can write kernel module, calls desired function responce request user space.

Ruby on rails tutorial chapter 10...account activation not matching route -

trying go through ruby on rails tutorial on chapter 10. have pretty decent understanding of routing far. here issue: account activations send token email performs hash on , tries verify (after link clicked). have route set /account_activations/:id/edit and url sending: account_activations/$2a$10$gtxhcostrwnvmdmwawljk.wm1xgnicwxupkymin5orqvwrib%2ftnxy/edit?email=me%40gmail.com i have verified hash correct in several different testing scenarios. tells me cannot find route it. quoting closest thing (in terms of priority) as: edit_account_activation_path /account_activations/:id/edit(.:format) account_activations#edit the path in routes.rb looks like: resources :account_activations, only: [:edit] looks me should match though :id should act wildcard string. if needs more info let me know. understand why isn't working. thanks.

iOS : How to make a CGRect as visible rect for UIView? -

i drawing line graph in uiview width of 1200pixels. can visible 320pixels. how can make rectangle starting x=880 , width = 320 visible?. you can draw graph @ 880px using following way. step 1 : take uiscrollview width = 1200 . step 2 : add uiview in uiscrollview having x position = 880 , width = 320; now can draw graph on uiview . received output same want. hope you.

How to use serilog with latest asp.net 5? -

if have both "microsoft.framework.logging.console": "1.0.0-*, and "serilog.framework.logging": "1.0.0-*" in project.json , i'm getting following conflict: the type iloggerfactory exists in both microsoft.framework.logging.abstractions , microsoft.framework.logging.interfaces the type ilogger exists in both microsoft.framework.logging.abstractions , microsoft.framework.logging.interfaces looks have mixed old , new packages in project.json. take @ announcement , can see in aspnet 1.0.0-beta5 packages renamed. so,for example, microsoft.framework.logging.console depends on old microsoft.framework.logging.interfaces , serilog.framework.logging depends on new microsoft.framework.logging.abstractions, @ project.lock.json dependency details. try update packages beta6 version in project.json, not forget dnvm upgrade dnx. hope ) thanks

angularjs - How to test promise in jasmine & karma -

i have test case follow: it("should have valid structure", function(done){ var data; module(app_module_name); inject(function(_metaservice_){ metaservice = _metaservice_; }); metaservice.fetchentitymeta('person').then(function(data){ expect(data.status).tobe( true ); done(); }); }); but getting following error: error: timeout of 2000ms exceeded. ensure done() callback being called in test. i have increased jasmine.default_timeout_interval not use. following code work. settimeout(function(){ expect(true).tobe(true); done(); }, 5000); so, understanding having problem promise. question how can check data returned promise. you not calling done() callback anywhere in test. change last statement to metaservice.fetchentitymeta('person').then(function(data) { expect(data.status).tobe(true); done(); }); another option is metaservice.fetchen...

asp.net - How to disable query execution plan caching per query in Entity Framework? -

is there chance disable query execution plan caching using entity framework? i know in objectquery disable per query: https://msdn.microsoft.com/pl-pl/library/system.data.objects.objectquery.enableplancaching(v=vs.110).aspx ) don't see such option in dbquery. i know there interceptors in ef 6 , attach option (recompile) can't find solution how attach 1 exact query not every query in context.

java - Sobel operator doesn't work with rectangle images -

Image
i try implement sobel operator in java result mix of pixels. int i, j; fileinputstream infile = new fileinputstream(args[0]); bufferedimage inimg = imageio.read(infile); int width = inimg.getwidth(); int height = inimg.getheight(); int[] output = new int[width * height]; int[] pixels = inimg.getraster().getpixels(0, 0, width, height, (int[])null); double gx; double gy; double g; for(i = 0 ; < width ; i++ ) { for(j = 0 ; j < height ; j++ ) { if (i==0 || i==width-1 || j==0 || j==height-1) g = 0; else{ gx = pixels[(i+1)*height + j-1] + 2*pixels[(i+1)*height +j] + pixels[(i+1)*height +j+1] - pixels[(i-1)*height +j-1] - 2*pixels[(i-1)*height+j] - pixels[(i-1)*height+j+1]; gy = pixels[(i-1)*height+j+1] + 2*pixels[i*height +j+1] + pixels[(i+1)*height+j+1] - pixels[(i-1)*height+j-1] - 2*pixels[i*hei...