Posts

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.

Using EPPlus without excel installed -

i using epplus excel report generation automation using visual studio.i faced issue that, difficult used excel range row , column count. when tried worksheet.dimension.end.row , worksheet.dimension.end.column showing around million rows , 16k columns. is there other way find out used range using epplus openxml? there package supports excel report generation?

Python / Pandas - Merge columns with the same index in a single cell -

i have dataframe: dude group_id 820125 armando 820125 luis oswaldo 64907 bernardo 64907 sandro 64907 veronica i want this: dudes group_id 820125 armando | luis oswaldo 64907 bernardo | sandro | veronica already tried variations of merge, join , concat wasn't successful. idea? you can group index , join column: df.groupby(level=0).agg(' | '.join) # dude #group_id #64907 bernardo | sandro | veronica #820125 armando | luis oswaldo to join specific column only, use dictionary in agg function: df.groupby(level=0).agg({"dude": ' | '.join}) sam...

javascript - HighChart Line Graph not Showing -

Image
i using data csv file generate line graph using highchart. here code: /* define initial , basic options */ var options = { chart: { type: 'line', renderto: 'graph_container' }, title: { text: 'fanniemaeacquisition cash flow' }, yaxis: { title: { text: 'amount($)' } }, series: [] }; /* parse csv file */ $.get('{% static "data/fanniemaeacquisitions.csv" %}', function(csv) { var lines = csv.split('\n'); var series = { name: '', data: [] }; $.each(lines, function (lineno, line) { var items = line.split(...

javascript - Replicate keyboard event with html button -

i have tried few ways make happen. have javascript pinball game uses keyboard keys controls. converting application touch screen display. workaround, hoping overlay buttons when clicked simulate keyboard strokes. have done research , sounds should work. using jquery v3.2.1 here things have tried far... html element: <input type="button" class="coil"></input> $('.coil').trigger({type: 'keydown', which: 40, keycode: 40}); with this, not errors, nothing happens. var coilkey = $('body').keydown(function(e) { switch (e.keycode) { case 40: break;} }) $('.coil').click(coilkey); this 1 returns error in console... ((jquery.event.special[handleobj.origtype] || (intermediate value)).handle || handleobj.handler).apply not function below javascript game engine handles key listeners... addkeylistener: function (keyandlistener) { this.keylisteners.push(keyandlistener); }, // gi...

python - SciKit-Learn: Grid Search CV Recording Times? -

i'm doing basic machine learning , want grid search xgboost (to find best hyperparameters). here's i'm doing: from sklearn.metrics import classification_report sklearn.pipeline import pipeline sklearn.grid_search import gridsearchcv import xgboost xgb pipeline = pipeline([('clf', xgb.xgbregressor(silent=false))]) parameters = { 'clf__n_estimators': (500, 1000), 'clf__learning_rate': (0.01, 0.05, 0.1), 'clf__max_depth': (10, 20, 30) } grid_search = gridsearchcv(pipeline, parameters, n_jobs=-1,verbose=2, scoring='neg_mean_absolute_error') grid_search.fit(x, y) so start getting output in jupyter notebook follows: fitting 3 folds each of 18 candidates, totalling 54 fits [cv] clf__max_depth=10, clf__learning_rate=0.01, clf__n_estimators=500 all seems goes through of combinations , doesn't terminate. instead, starts printing following: [cv] clf__max_depth=10, clf__learning_rate=0.01, clf__n_estimators=500 -1...

vba - Apply (complex, preset) filter of one excel sheet to another -

i have question : i need filter excel sheet based on (preset) filter excel sheet. e.g. thought, might possible read out shown line numbers or data names in column a. , take these results make other sheet filter same rows. background : i need work on "public" excel sheet, several people use different tasks. the sheet contains >8000 rows of data of need edit hundred. we made copy of sheet , applied several complex sets of filters on different columns (to different sets of data concerning us). don't want put these different filters new time. therefore added column in copy sheet, contains numbers each set of data (e.g. rows of filter-set 1 contain "1" in column, etc.). easy access our data. however, need work in public sheet, here can't add column our filters (for different reasons). therefore question above: can filter excel table based on (preset) filter excel table. what tried : search internet --> no hits special case search ...

java - RPC CertIOException "malformed data: sequence wrong size for a certificate" -

i’m trying use rpc connect m12 cordaapp , call nodeidentity() method, i'm getting org.bouncycastle.cert.certioexception . think java client code works, can see rpc connection , when try call getprotocolversion() instead see correct protocol version. here stack trace when calling nodeidentity() : 10:50:25.848 [thread-0 (activemq-client-global-threads-1076641925)] error org.apache.activemq.artemis.core.client - amq214000: failed call onmessage org.bouncycastle.cert.certioexception: malformed data: sequence wrong size certificate @ org.bouncycastle.cert.x509certificateholder.parsebytes(unknown source) ~[bcpkix-jdk15on-1.56.jar:1.56.0.0] @ org.bouncycastle.cert.x509certificateholder.(unknown source) ~[bcpkix-jdk15on-1.56.jar:1.56.0.0] @ net.corda.core.serialization.x509certificateserializer.read(kryo.kt:641) ~[core-0.12.1.jar:?] @ net.corda.core.serialization.x509certificateserializer.read(kryo.kt:639) ~[core-0.12.1.jar:?] @ com.esotericsoftware.kryo.kry...

jquery - How to load json array -

im trying load person data api : www.swapi.co . dont know how can load movies titles instead of api adress. $(function(){ var list = $('.list'); var submit = $('.submit-people'); var people = '1'; submit.on('click',function(){ people++; list.empty(); $.ajax({ type: 'get', url: 'https://swapi.co/api/people/' + people + '/', success: function(data) { list.append('<li>name:' + data.name + '</li>'); list.append('<li>height:' + data.height + '</li>'); list.append('<li>mass:' + data.mass + '</li>'); list.append('<li>gender:' + data.gender + '</li>'); list.append('<li>movies:' + data.films + '</li>'); } }) }) my current code here : https://jsfiddle.net/wtpy71d7/2/ really or ...

rust - Borrow checker issue in `zip`-like function with a callback -

i'm trying implement function steps though 2 iterators @ same time, calling function each pair. callback can control of iterators advanced in each step returning (bool, bool) tuple. since iterators take reference buffer in use case, can't implement iterator trait stdlib, instead used though next_ref function, identical iterator::next , takes additional lifetime parameter. // iterator-like type, returns references // in next_ref struct refiter { value: u64 } impl refiter { fn next_ref<'a>(&'a mut self) -> option<&'a u64> { self.value += 1; some(&self.value) } } // iterate on 2 refiter simultaneously , call callback // each pair. callback returns tuple of bools // indicate iterators should advanced. fn each_zipped<f>(mut iter1: refiter, mut iter2: refiter, callback: f) f: fn(&option<&u64>, &option<&u64>) -> (bool, bool) { let mut current1 = iter1.next_ref(); ...

sql - File "oracle-xe-11.2.0-1.0.x86_64.rpm" not found -

i installing oracle 11g xe on ubuntu 16.04, trying convert red-hat ( rpm ) package ubuntu-package : using link http://sysadminnotebook.blogspot.de/2012/10/installing-oracle-11g-r2-express.html #sudo alien --scripts -d oracle-xe-11.2.0-1.0.x86_64.rpm am getting err below file "oracle-xe-11.2.0-1.0.x86_64.rpm" not found. how overcome ?? in advance

entity framework - There is already an openEntityframework DataReader associated with this Connection which must be closed first -

i got error @ nummedidas = nummedidas + anal.medidas.count(); , cannot figure out how solve it: innerexception: {"there open datareader associated connection must closed first."} source: entityframework this code: pitelodatacontext contexto = new pitelodatacontext(); var resultados = analisis in contexto.analises select analisis; if (hospitales != null) { list<string> listahospitales = new list<string>(); listahospitales = hospitales.tostring().split(';').tolist(); resultados = resultados.where(b => listahospitales.contains(b.incidente.hospital.denominacion)); } numanalisisaspxlabel.text = resultados.count().tostring(); foreach (pitelo.entityclasses.analisis anal in resultados ) { **nummedidas = nummedidas + anal.medidas.count();** if ((anal.fechahora != null) && (anal.incidente.fec...

html - How to custom Bootstrap grid height? -

why bootstrap grid has height 591.067 ? did height came ? .main-post { padding: 20px; background-color: #fff; border: 1px solid #d8d8d8; margin-bottom: 100px; } .main-post .post-categories { margin-bottom: 10px } .main-post h3 { margin: 0 0 10px; color: #777; letter-spacing: -1px; font-weight: bold } .main-post .post-author, .main-post .post-date, .main-post .post-comments { font-size: 12px } .main-post img { display: block; margin: 10px 0; } .main-post .post-summary { line-height: 1.7; color: #888 } .main-post { color: #999 } <div class="col-sm-6"> <div class="main-post"> <h3 class="post-title"> <a href="#"> post title </a> </...

Angular (4.x): Cannot use same name attribute for radio buttons -

i'm trying make radio buttons work, angular complains "name" attribute. <form> <div> <h3>select building</h3> <h4>building search</h4> <label for="criteria">search criteria:</label> <input class="radio-input" type="radio" name="building-search-criteria" [(ngmodel)]="build_search_criteria" [value]="id" id="id"> <label class="radio-label" for="id">id</label> <input class="radio-input" type="radio" name="building-search-criteria" [(ngmodel)]="build_search_criteria" [value]="name" id="name"> <label class="radio-label" for="nombre">name</label> </div> </form> in order make radio buttons work, have share same name attribute, seemingly angular doesn't th...