Posts

Featured post

visual studio - Clear VS 2017 cache -

i'm using system.runtime.caching.memorycache in application. i'm trying delete cache because i'm making unit test data come cache @ 8:54am, , it's not refreshing. so, i've tried delete visual studio's appdata folder without success. i've downloaded tool clear mef component cache, without success. i've tried run test through visual studio 15, it's same cache. anyone can me on how delete cache ? thanks ! just call memorycache.remove before unit test

javascript - pass values from mssql to views in node -

being new node js , javascript . have been trying find solution problem . this app.js file var express=require ('express'); var bodyparser = require('body-parser'); var path = require ('path'); var sql = require('mssql'); var app = express(); const config = { user: 'sa', password: 'password', server: 'localhost\\sqlexpress', // can use 'localhost\\instance' connect named instance database: 'pcgdb', options: { encrypt: false // use if you're on windows azure } }; const request = new sql.request() //view engine app.set('view engine', 'ejs'); app.set('views', path.join(__dirname, 'views')) app.use(bodyparser.json()); app.use(bodyparser.urlencoded({extended: false})); app.get('/',function(req,res){ res.render('index') }); app.get('/new_project', function(req, res) { function(data,err){ ...

javascript - Understanding ExtJS Framework Syntax -

i have been given project uses sencha's extjs framework, no handover or documentation. trying come grips hoping people can pls assist me following syntax possibly point me specific site might explain code newcomer framework. i have been going through code , unsure doing, i.e.: if(val==1) { ext.getcmp('status').settext('awaiting approv'); } switch(flag) { case 1: if(val==0) { ext.getcmp('complex_first').el.replacecls('x-form-complex', 'x-form-simplex'); } else { ext.getcmp('complex_first').el.replacecls('x-form-simplex', 'x-form-complex'); } break; case 2: if(val==0) { ext.getcmp('complex_second').el.replacecls('x-form-complex', 'x-form-simplex'); } else { ext.getcmp('complex_second').el.replacecls('x-fo...

tsql - sp_execute_external_script @language = N'R' -

how can - create 2 input data set referenced in @script example exec sp_execute_external_script @language = n'r' , @script = n' outputdataset <- inputdataset' , @input_data_1 = n'' , @input_data_2 = n'' -- line. , @input_data_1_name = n'inputdataset' , @output_data_1_name = n'outputdataset' result sets ((plot nvarchar(max))); you have use @params if want more 1 input/output. assign data parameter of exact same name right after it. exec sp_execute_external_script @language = n'r' , @script = n' notusedagain <- seconddataset; outputdataset <- inputdataset ' , @input_data_1 = n'' , @params = n'@seconddataset int' , @seconddataset = 1 result sets ((plot nvarchar(max)));

python - Access specific element of array from list django -

i have queryset in view.py: somevalue = list(a.objects.filter(x=x_number, timestamp__gte=a_time, timestamp__lte=b_time) \ .order_by('timestamp').values_list('timestamp', 'some_index').annotate( some1=dosomething('some_index'), some2=dosomething('some_index_2'), combined_some=(f('some1') + f('some2')) )) so somevalue looks this: somevalue = [(datetime.datetime(2017, 7, 20, 23, 53, 51, tzinfo=<utc>), 2l, 10.1, 2.4, 12.5), (datetime.datetime(2017, 7, 20, 23, 54, 51, tzinfo=<utc>), 8l, 5.5, 6.4, 11.9), (datetime.datetime(2017, 7, 20, 23, 55, 51, tzinfo=<utc>), 4l, 7.2, 2.0, 9.2),...] my goal access somevalue , combined_some this: combined_some = [(datetime.datetime(2017, 7, 20, 23, 53, 51, tzinfo=<utc>), 12.5), (datetime.datetime(2017, 7, 20, 23, 54, 51, tzinfo=<utc>), 11.9), (datetime.datetime(2017, 7, 20, 23, 55, 51, tzinfo=<utc...

image - python get coordinates (pixels) of corresponding points from clicks -

this question has answer here: store mouse click event coordinates matplotlib 2 answers detecting mouse event in image matplotlib 2 answers determine button clicked subplot in matplotlib 2 answers i have 2 images want following using python 3.6 1- plot both images side side 2- click on 1 image , output corresponding pixel coordinates 3- click on second image , corresponding pixel coordinates note: question different because has work on 2 images finding axis click event happening. i think best way have function identifies axis clicking on , gets clicked coordinates. couldn't find of resources 2 images, found on 1 image.

asynchronous - force exit of an ocaml async program -

i'd implement following behavior: let x = try do_some_computation () | some_error -> exit_my_program () in ... of course, raise exception such as: let exit_my_program () = failwith "...." but, i'd like: let exit_my_program () = print.printf "some error message\n"; exit 1 the issue i'm having exit 1 has type 'a deferred.t , it's not going typecheck. i'm wondering if there's exit function type 'a use in context, or maybe more generally, function force deferred. the function pervasives.exit of type int -> 'a . don't know async, don't know if it's plan use function. it's easy believe might not such plan if want things wind down carefully.