Posts

dart - How to read file from an imported library -

i have 2 packages: webserver , utils provides assets webserver. the webserver needs access static files inside utils. have setup: utils/ lib/ static.html how can access static.html file in 1 of dart scripts in webserver ? edit : tried far, use mirrors path of library, , read there. problem approach is, if utils included package: , url returned currentmirrorsystem().findlibrary(#utils).uri package uri, can't transformed actual file entity. use resource class, new class in dart sdk 1.12. usage example: var resource = new resource('package:myapp/myfile.txt'); var contents = await resource.loadasstring(); print(contents); this works on vm, of 1.12. however, doesn't directly address need actual file entity, package: uri. given resource class today, you'd have route bytes loadasstring() http server's response object.

linq - How return multi table(of T) by vb.net function -

i use linq model sql database, , need make function insert data every table. dim mydata object = myarray (1) dim indx integer=1 call insertdata (indx) ... sub insertdata (indx integer) myfunction(indx) '_context.table1s .insertonsubmit(myarray(indx)) end _context.submitchanges() end sub function myfunction(i integer) select case case 1 :return _context.table1s case 2:return _context.table2s case 3: return _context.table3s ... end select end function function myarray (i integer) select case case 1 : dim y table (of table1) ' ... y set return y case 2 dim y2 table (of table2) .... return y2 ... end select end function how can this?

inline - Reg:chrome extensions-calling chrome.webstore.install in javascript dragend function -

chrome.webstore.install working onclick function add app chrome extensions,but when tried other events throwing exception uncaught chrome web store installations can initated user gesture.please confirm , update asap work onclick.if work other events please update because need in dragend function add app chrome extensions.when gone through search in many places used in onclick function. yes, works onclick. dragend not considered user gesture.

c - Dereferencing iterators performance -

i have 3 functions come down code below, runs 800x800 times: each while loop below runs 800 times before iter1 == lim , duration measured ran 800x800x800 (512 millions) times. iter1 , iter2 , lim double pointers. point large enough vector of double 's. sum double local variable. s1 , s2 local unsigned int 's, both equal 800. first runs in 2.257 seconds: while ( iter1 < lim ) { sum += *iter1 * *iter2; ++iter1; iter2 += s2; } second runs in 7.364 seconds: while ( iter1 < lim ) { sum += *iter1 * *iter2; iter1 += s1; iter2 += s2; } third runs in 1.355 seconds: while ( iter1 < lim ) { sum += *iter1 * *iter2; ++iter1; ++iter2; } if remove sum += *iter1 * *iter2; instruction each of them, run in around 1.07 seconds. if remove second multiplication , change instruction sum += *iter1; , first , third run in 1.33 seconds, while second runs in 1.46 seconds. if remove other iterator, this: sum += *iter2; , ...

web services - Get calendar appointment from EWS exchange with jquery only -

i want calendar appointment ews exchange jquery, think should use soap envelope in ajax jquery request. tried lot of syntax , nothing works because can't find correct xml request. tried soap ui, soap ui doesn't accept kind of web service https://office.company.com/ews/exchange.asmx or https://office.company.com/ews/service.wsdl the soap request format shown here: https://msdn.microsoft.com/en-us/library/office/dn495614(v=exchg.150).aspx

Initializing an array within a c++ constructor -

this question has answer here: how can use member initialization list initialize array? 2 answers i want have array class member, way know how initialize array in constructor adding each element individually (array[x] = char) class myclass { public: myclass(); ~myclass(); void printletters(); // prints each character in array private: int alpha[3]; // allocate memory array }; myclass::myclass() { // initialize array alpha[0] = 1; alpha[1] = 2; alpha[2] = 3; printletters(); } myclass::~myclass() { } void myclass::printletters() { (int x = 0; x < 3; x += 1) { cout << alpha[x] << endl; } } int main() { myclass abc; return 0; } is there way it? if try this: myclass::myclass() { // initialize array alpha[3] = {1, 2, 3}; printletters(); } i following error: expr...

javascript - Flexslider infinite loop and create("clones") > 1 -

here example of infinite loop flexslider: http://jsfiddle.net/u2ysh/161/ problem clones first image @ end. if click through slides you'll have reach end before show starts beginning. is there solution fire image clones couple of slides before avoid ugly white gap? or else achieve this? thx alot. $('.flexslider.banners').flexslider({ animation: "slide", animationloop: true, controlnav: false, slideshow: false, smoothheight: true, variableimagewidth: true,