Posts

bash - Quickly detect added/removed files inside git repository -

let's have git repository .gitignore. i want 'snapshot' repository @ point in time, , save sort of digest in location outside of repository (i mustn't change repository). then, want able detect if there files added or removed (but don't care changes) inside git repository aren't in .gitignore since last snapshot. want check fast (it's editor plugin - response time crucial). if cared committed files solution trivial: store head commit hash in snapshot, , compare commits. do care uncommitted , untracked files - files not care ones in .gitignore . basically want store output of git ls-files -c -o --exclude-standard point in time, , see if changed @ later point, without processing entire output. i prefer pure git solutions, otherwise i'd cross-platform bash/batch solution.

ruby on rails - How to run method with Delayed Job? -

i tried run methods delayed_job keep getting error job failed load: allocator undefined method... delayed_job stores task in table can't run it. mailer working fine delayed_job. tried method_name.delay , handle_asynchronously :method_name getting same error.

Wildcard in powershell string for call operator -

in powershell script need call funcion this $specruncall = "./packages/specrun.runner.1.2.0/tools/specrun.exe" $mstestarguments = @('run', 'default.srprofile', "/basefolder:.\testresults", '/log:specrun.log') if($tag) { $mstestarguments += '/filter:@' + $tag } & $specruncall $mstestarguments but have put there version of specrun runner, thinking of putting wildcard , find whichever version have (provided have 1 there) i'm struggling find working solution it. thanks, assuming version exists, resolve-path ...specrun.runner.*... should work: $specruncall = resolve-path ./packages/specrun.runner.*/tools/specrun.exe

scala - Akka Future Respose to a Sender -

i came across following sip: http://docs.scala-lang.org/sips/pending/spores.html as reading through, came across example: def receive = { case request(data) => future { val result = transform(data) sender ! response(result) } } there description below in article: > capturing sender in above example problematic, since not return stable value. possible future’s body > executed @ time when actor has started processing next > request message originating different actor. > result, response message of future might sent > wrong receiver. i not understand line "capturing sender in above example problematic...." isn't case in each request actor (request(data)) create future block? the creating of future block synchronous mean sender reference known @ time. execution of future block somehow scheduled happen @ later point in time. is understanding correct? def receive = { case request(data) => future {...

c# - Register External Login Web API -

i don't understand why isn't clear tutorial or guideline on this, hope question can answered here. so, trying register users facebook or google, via web api. the problem is, @ registerexternal method, on line: var info = await authentication.getexternallogininfoasync(); it returns null, , returning badrequest() what got far: in startup.auth.cs i've hadded id's , secrets, note have tried using microsoft.owin.security.facebook var facebookoptions = new microsoft.owin.security.facebook.facebookauthenticationoptions { appid = "103596246642104", appsecret = "1c9c8f696e47bbc661702821c5a8ae75", provider = new facebookauthenticationprovider() { onauthenticated = (context) => { context.identity.addclaim(new system.security.claims.claim("urn:facebook:access_token", context.accesstoken, clai...

Storage capacity of in-memory database? -

is storage capacity of in-memory database limited size of ram? if yes, there ways increase capacity except increasing ram size. if no, please give explanations. as mentioned, in-memory storage capacity limited addressable memory , not amount of physical memory in system. simon correct os swap memory page file, really want avoid that. in context of dbms, os worse job of if used persistent database large of cache have physical memory support. iow, dbms manage cache more intelligently os manage paged memory containing in-memory database content.

javascript - How to do Natural sorting in angularJs? -

i have object below: scope.obj=[{option :"option 1" },{option :"option 2" },{option :"option 3" },{option :"option k" }] and html <a ng-repeat="item in obj | orderby :'option':false">{{item.option}}</a> and expecting display object list in ascending order below: option k option 1 option 2 option 3 but getting output option 1 option 2 option 3 option k i have tried many solution given in stackoverflow , other sites nothing working. pls me solve issue my expectation if character after "option" string (like option k,option l etc) there should come first in ascending order number should come(option k,option l,option 1,option 2,etc) the angular documentation says sorts numbers (using natural order) or strings (alphabetically, numbers smaller letters), think should sort array before ng-repeat: myarray.sort(function mycustomsortfunction(a,b) {...})