Posts

Featured post

c# - Where does the .ToList() go in LINQ query result -

when getting data populate data grid, have pulled data, made list , mapped model, this: public list<person> getpeople() { var data = _db.person.tolist(); list<person> people = new list<person>(); foreach (var item in data) { person person = new person() { personid = item.personid, firstname = item.firstname, lastname = item.lastname }; people.add(person); } return people; } this works fine, in interest of writing less code discovered .select method , (what think is) anonymous type. have: public list<person> getpeople() { return _db.person.select(d => new person { personid = item.personid, firstname = item.firstname, lastname = item.lastname }).tolist(); } though not easy read, works fine too. there preference either way?

java - Google Cloud SQL with SSL from Compute Engine and/or External Network -

i'm trying connect google cloud sql (mysql) instance using ssl. i've enabled 2 ip addresses , user remote access permissions ip addresses. have generated certificate files google's developer console. client-key.pem client-cert.pem server-ca.pem using command each of 2 enabled ip addresses make connection. mysql --ssl-ca=server-ca.pem --ssl-cert=client-cert.pem --ssl-key=client-key.pem --host=xxx.xxx.xxx.xxx --user=username --password since mysql client works know firewall settings, users, certs, etc. set correctly. now i'd make similar connection java within executable jar file. following steps outlined here: http://dev.mysql.com/doc/connector-j/en/connector-j-reference-using-ssl.html step 1: keytool -import -alias mysqlservercacert -file cacert.pem -keystore truststore note: substitute server-ca.pem cacert.pem used in instructions step 2: openssl x509 -outform der -in client-cert.pem -out client.cert step 3: keytool -import -file client.cert -ke

Listeners to visualise results of load test in JMeter -

i want run load test in non-gui mode , save results in .csv file. (i have not modified .properties files, standard information saved) i plan load file , visualise results jmeter’s listeners. which listeners suited purpose? should avoid @ cost, might cause me misinterpret information? (e.g. in view results tree response data empty have - - not saved this. however, there has in fact been response. if saw listener might think there hasn’t been one. since want avoid this, listeners have gain information needed .csv file.) i’d know both jmeter listeners plugins. if running test in non-ui mode ideally should disable listeners in script. use '-l' option store test results .jtl extension. can later open jtl file jmeter. aggregate report or summary report should summarize test results , response time , throughput. if want plot graphs see trends on test duration can use http://jmeter-plugins.org/#/ standard , lib set. i suggest following listeners: response

hadoop - lotus notes DB's to HDFS - any tips or tricks? -

i investigating options migrate multiple lotus notes databases somehow hdfs... options see @ point are: write notes jobs dump text, put text in hdfs, maybe apply notes extracted metadata , apply hive/hbase. i think notes has odbc driver (for windows only?)... i'm pretty sure have caveats. don't think gets nested attachments documents instance, , documents don't write. love efficiencies of maybe being able sqoop in... although lose things. some commercial options don't have experience with... does have experience moving many large lotus notes db's hdfs? tips or tricks?

android - CollapsingToolbarLayout: position the ExpandedText programmatically -

i using new android support design view collapsingtoolbarlayout. have need position expandedtitle programmatically. actually way set position expandedtitle in .xml file (example here: https://goo.gl/l5h5fc ) there no public api set text position programmatically , fields private . do know if it's possible without reflection or 'hacky' tricks? i have solved problem exposing properties via reflection ( https://gist.github.com/fpezzato/8e7d45112883dbbc5ffb ), works don't use trick in production code. @google: please no more private or final stuff! :)

javascript - Trigger the setinterval after post data is received -

i've got jquery $post() bring data when page loads. i've got setinterval() load other data when page loads. $.post('my.php', { send:"123" }, function(resp){ //trigger setinterval }); how trigger setinterval after data being received? var wait = setinterval(function() { //do }, 1000); function myintervalfunction() { // something, interval function } // start general interval working process setinterval(myintervalfunction, 1000); $.post('my.php', { send:"123" }, function(resp){ // trigger myintervalfunction once // after ajax call finished myintervalfunction(); } );

apple push notifications - Confusion about IOS certificates, APNS mainly -

i'm developing hybrid app using cordova, , i'm getting confused certificates issue (total newbie apple here). now, think manage creating .p12 file , build apps. don't understand how add apns certificate send/receive push notifications. have merge files in order have 1 .cer file includes production certificate , apns certificate? or how go? there protocol such popular build? i'll appreciate clear out confusion, i'm using windows i'm doing through openssl. help!