Posts

VB Window Services batch not executing -

i executing batch file using vb run method connect ftp. when executing vb code in debugging mode batch file executing without issue , ftp successful. but, after building exe file , tried run thorough windows service batch file not executing. command = chr(34) & "ftpconnection.bat" & chr(34) & " " & moreportfile a.run command, 0, true

angularjs - Using bower_components with Grunt -

Image
i created simple data listing app using angular js. used bower , grunt. grunt serve project specific port. have error.. when i'm serve project grunt, bower_components not working. mean jquery , angular parts 404. here attach link project. get project here - https://github.com/chanakade/demoapp first clone it, "npm install" , "bower install". please tell me how make them work. 404 errors http://localhost:1701/bower_components/jquery/dist/jquery.js 404 you're specifying ./src root of server in gruntfile. unfortunately, bower installs it's dependencies folder above it, in root of project. html has couple of script tags ../bower_components/[path files] , not work. you need try install bower dependencies in src folder. add .bowerrc file in root of project following content: { "directory" : "src/bower_components" } then reinstall bower dependencies doing: $ bower install check if folder bower_components h...

c++ - QT : Passing QString to QThread -

i want pass qstring thread.using this answer, here code: in mainwindow.cpp : mmthread = new mythread; mmthread->start(); connect(this,signal(sendtothread(qstring)),mmthread,slot(getfrom_main(qstring)),qt::queuedconnection); emit sendtothread(mystr); in mainwindow.h : signals: void sendtothread(qstring); in mythread.cpp : void mythread::getfrom_main(qstring str) { //something } in mythread.h : public slots: void getfrom_main(qstring); but seems getfrom_main not called @ all. mistake? edit: i have 3 similar threads this: in mythread.cpp : mythread :: mythread() { movetothread(this); } void mythread::run(){ //something1 } void mythread::getfrom_main(qstring comm) { comment = comm; emit message(comment); } in mythread.h : class mythread : public qthread { q_object public: explicit mythread(); void run(); signals: void message (qstring); private: qstring comment; public slo...

php - Catch exception from guzzle -

i'm using laravel , have setup abstract class method response various apis i'm calling. if api url unreachable throws exception. know i'm missing something. great me. $offers = []; try { $appurl = parse_url($this->apiurl); // call api using guzzle $client = new client('' . $appurl['scheme'] . '://' . $appurl['host'] . '' . $appurl['path']); if ($appurl['scheme'] == 'https') //if https disable ssl certificate $client->setdefaultoption('verify', false); $request = $client->get('?' . $appurl['query']); $response = $request->send(); if ($response->getstatuscode() == 200) { $offers = json_decode($response->getbody(), true); } } catch (clienterrorresponseexception $e) { log::info("client error :" . $e->getresponse()->getbody(true)); } catch (servererrorresponseexception ...

amazon s3 - How to generate a unique (random) output path in Pig? -

is possible generate unique output folder (s3 bucket), maybe contacting random number of sort? this workaround case, concatenate current timestamp: %declare cts `date +"%s"` store data '/path/$cts' using pigstorage(); im not familiar s3, above example show idea of concatenating random string unique path.

Custom (multi-column) <div> in AsciiDoctor? -

i'd layout (and maybe print) asciidoctor document, cheatsheet tables. what best way multi-column html output , multi-column pdf printing? i've found that #col {-moz-column-count: 2;-webkit-column-count: 2;column-count: 2;} can used in html <div> , far modified html manually. (i'm guessing bit do, since i'm not web-developer.) is there way include style , div in asciidoctor source file? what best way multi-column pdf?

javascript - can't load an array to ngTable -

Image
i tried write small , simple ngtable demo, got problem: when try put array ngtable, browser shows head line of table, not data. result in screenshot: all code in plunker here "data": var books = [ { "name": "html start give up", "price": 2, "comment": "an awesome book pillow", "available": true }, { "name": "angularjs start give up", "price": 2, "comment": "too hard pillow", "available": false }]; and here way created ngtable vm.booktable = createtable(books); var initpagesize = number(localstorage.getitem('page_size') || 20); vm.pagesize = initpagesize; vm.pagesizes = [10,20,30,50,100]; function createtable(data){ var initparams = { sorting: {name: "asc"}, count: vm.pagesize }; var initsettings = { ...