Posts

AbotX : How do you create a parallel crawler that stays on and can be added to at run time from new requests -

i have parallelcrawlerengine setup singleton , have alwaysonsitetocrawlprovider set singleton , passed parallelcrawlerengine. i can instantiate , leave nothing ok. can add site , crawl ok. if add site not crawl second site. i have looked @ example on site doesn't appear show how work , have new items added after initial execution. using .addsitestocrawl() adds them list seems stay in purgatory state of not being read. looking through logs 'site completed' message though site has not been recrawled [2016-07-11 11:17:18,361] [20 ] [info ] - crawl domain [http://www.existingsite.com/] completed in [0.0001118] seconds, crawled [361] pages and error if add new site [2016-07-11 11:17:33,365] [23 ] [error] - crawl domain [http://www.newsite.com/] failed after [0.0066498] seconds, crawled [361] pages [2016-07-11 11:17:33,365] [23 ] [error] - system.invalidoperationexception: cannot call dowork() after abortall() or dispose() have been called. @ abot.util.thre...

caffe - libcaffe error in cpp eclipse -

i want use cpp read leveldb features extracted caffe. use following code in eclipse: // copyright 2014 bvlc , contributors. #include <glog/logging.h> #include <stdio.h> // snprintf #include <google/protobuf/text_format.h> #include <leveldb/db.h> #include <leveldb/write_batch.h> #include <string> #include <vector> #include <cassert> #include <iostream> #include <map> //#include "cpp/sample.pb.h" #include "caffe/proto/caffe.pb.h" // for: datum using namespace caffe; #define number_features_per_image 16 using namespace std; int main(int argc, char** argv) { //google::initgooglelogging(argv[0]); if (argc < 2) { printf("error! not enough arguments!\nusage: %s <feature_folder>", argv[0]); exit(1); } log(info) << "creating leveldb object\n"; leveldb::db* db; leveldb::options options; options.create_if_missing = true; leveldb::status status ...

android - Create single AAR file from multiple modules using Gradle -

like many others, trying generate single aar file multi-modules android project. according this post , not supported android team because of various limitations (res & dependencies management, manifest merging, ...). i trying come own solution fits needs. know don't have duplicated resources , external dependencies (like support libraries) provided people using lib. my structure similar this: /root |- lib1 |- lib2 |- lib3 in order achieve goal, created 1 more library module, named distribute , include others modules. can share generated distribute.aar file. /root |- lib1 |- lib2 |- lib3 |- distribute this build.gradle file of distribute module: apply from: '../common.gradle' // configure properties shared accross modules apply plugin: 'com.android.library' def allmodules = rootproject.allprojects.collect { it.name } - [rootproject.name, name] def whitelabeldependencies = [ whitelabel1: allmodules - ['lib2'], whitel...

Android: SharingActionView on swipe from bottom -

Image
i share data other apps, don't want standard popup appears bottom tool bar; want kind of view: i followed official document: https://developer.android.com/training/sharing/shareaction.html so there native component in android sdk? or there library that? thank guys! you can : first create menu item : <menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" tools:context="com.example.rashish.myapplication.mainactivity"> <item android:id="@+id/action_share" android:orderincategory="100" android:title="@string/action_settings" android:icon="@android:drawable/ic_menu_share" app:showasaction="always" /> </menu> then create method show intent chooser dialog, : private void share() { string te...

mysql - CrudRepository: findAll() stucks in infinite loop -

Image
i have onetomany data model 2 entities. 1 machine contains many characteristics. problem: when try complete data of data base program stucks in infinite loop. see json result - data repeated time... [{"name":"neue machine","description":"description der neuen machine","characteristics":[{"name":null,"description":"character2","type":0,"value":0,"machine":{"name":"neue machine","description":"description der neuen machine","characteristics":[{"name":null,"description":"character2","type":0,"value":0,"machine":{"name":"neue machine","description":"description der neuen machine","characteristics":[{"name":null,"description":"character2","type":0,"value":0,"mac...

How to start daemon on android by adb -

can me please, head swollen... i trying run daemon on android emu/device command: adb -s <device_name> shell su -c /dir/daemon <port_number> but nothink happens, , no errors! if do: adb -s <device> shell and form shell cmdline: su -c /dir/daemon <port_number> than work fine. try use shell-script , run: adb -s <device_name> shell sh su -c /dir/script.sh <port_number> and try generate script qt code port number , use: adb -s <device_name> shell sh su -c /dir/script.sh but not helped... problem if enter adb shell previous run daemon - work. problem on different device/emu/iso_image different command format not work. example: adb -s <device_name> shell su -c /dir/daemon <port_number> // work @ emu, not @ iso and vice: adb -s <device_name> shell su -c "/dir/daemon <port_number>" // work @ iso etc. everybody can answer what's matter? sorry english adb shell su -c ...

javascript - Form validation angular -

i have couple of fields in form & want enable submit button if of them filled, how can this? if put required both or of them won't work want. <input type="text" name="phone"> <span ng-show="form.addcontactform.phone.$touched && form.addcontactform.phone.$error.required">phone number or email required</span> <input type="text" name="email"> <span ng-show="form.addcontactform.email.$touched && form.addcontactform.email.$error.required">phone number or email required</span> <button type="submit" ng-disabled="form.addcontactform.$invalid || form.addcontactform.$submitted">submit</button> if phone or email entered other message should hide you add conditions in <input type="text" name="phone" ng-model="ctrl.phone"> <span ng-show="(form.addcontactform.phone.$touched || form.addcon...

python - What should be correct url-encoding of login data? -

i trying login interviewbit , download login protected page using cookies. my code : urllib.request import build_opener, httpcookieprocessor urllib.parse import urlencode http.cookiejar import cookiejar class interviewbit: def __init__(self): self.interviewbit_login_url = "https://www.interviewbit.com/users/sign_in/" self.opener = none def login(self, username, password): cj = cookiejar() self.opener = build_opener(httpcookieprocessor(cj)) login_data = urlencode({'user_email': username, 'user_password': password, 'user_remember_me': '1'}) # problem in line binary_data = login_data.encode('utf-8') self.opener.open(self.interviewbit_login_url, binary_data) print("login successful") def download(self, cat): url = "https://www.interviewbit.com/search/?q%5...

R : confusion regarding LHS and RHS of assignment and order of operation -

i having fundamental confusion r. have snippet of r code. > m <- 1:10 > m [1] 1 2 3 4 5 6 7 8 9 10 > dim(m) <- c(2,5) > m [,1] [,2] [,3] [,4] [,5] [1,] 1 3 5 7 9 [2,] 2 4 6 8 10 now c/python programmer , line dim(m) <- c(2,5) incredibly confusing me. realize changed vector matrix, looking @ not understand logic/order of operation. <- assignment operator in r. me, logically order of operation : assign (2,5) output of dim(m). since output of dim(m) isn't assigned variable, output lost. could explain how should read line dim(m) <- c(2,5) ? order of operation? seems order of operation using <- changes depending on lhs and rhs of equation. these special functions called replacement functions. quote hadley's advanced-r book: replacement functions act modify arguments in place, , have special name xxx<-. typically have 2 arguments (x , value), although can have more, , must...

ruby on rails - Errno::EACCES: Permission denied @ dir_s_mkdir - /uploads while unzipping -

i unzipping file uploaded using carrierwave , running code on localhost using console. file there in uploads folder , need unzip reading contents. zip::file.open(rails.root.to_s + "/public" + self.submission.file_path.to_s) { |zip_file| puts zip_file.inspect zip_file.each { |file| file_path = file.join("solution", file.name) fileutils.mkdir_p(file.dirname(rails.root + "/public" + self.submission.file_path.to_s)) zip_file.extract(file, file_path) unless file.exist?(file_path) } } and giving me error errno::eacces: permission denied @ dir_s_mkdir - /uploads /users/linux/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/fileutils.rb:252:in `mkdir' /users/linux/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/fileutils.rb:252:in `fu_mkdir' /users/linux/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/fileutils.rb:226:in `block (2 levels) in mkdir_p' /users/linux/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/fileutils.rb:224:in `reverse_each' ...

html - Bootstrap modal backdrop remains after closing modal -

i'm following w3school tutorial http://www.w3schools.com/bootstrap/bootstrap_modal.asp add modal in html page. there no problem in displaying modal. when close modal, screen greyed out , inaccessible few seconds. after that, screen responsive again. , happens first time when page launched. i have tried following: <button type="button" class="btn btn-default" data-dismiss="modal" data-backdrop="false">close</button> but not remove grey out. have no idea how fixed it. please me! in advance! edited: section can clicked: <a data-toggle="modal" data-target="#tt-modal"> <div id="tt"> <div class="desc_hidden"> <div class="title"> product name </div> <div class="subtitle"> description </div> <div class="view">view project</div> </div> ...

java - Element not exists, takes alot of time to Execute next line of code -

i'm ravi , working automation engineer using selenium, have found 1 problem selenium, if element not exists in html page or dom take lot of time find element more 5 min after 5 mins executes next line of code want if element not exists in page go next line of code takes more time.in cases element exists in page did if element exist come code otherwise go else code have lot of cases these takes lot of take execute complete code, i tried possible ways list , try , catch unable reduce time,can please give solution in selenium. please give solution above problem. thanks, ravikiran. when create driver define implicit wait webdriver driver = new chromedriver(); driver.manage().timeouts().implicitlywait(5, timeunit.seconds); this try locate elements 5 seconds, can change whatever suits you.

Nativescript Font Awesome in FormattedSring Button -

i want show font-awesome icons in nativescript application not showing everywhere. <scrollview row="0" orientation="vertical" ios.pagingenabled="true"> <stacklayout #container verticalalignment="center"> <image src="res://logo_icon_white" stretch="none" horizontalalignment="center"></image> <label [text]="'welcome' | translate" class="welcome-text" horizontalalignment="center"></label> <label text="&#xf230; " class="font-awesome" horizontalalignment="center"></label> <--- works! <button [text]="'login_with_paswword' | translate" (tap)="tapped()"></button> <button> <formattedstring> <span text="&#xf230; " class="font-awesome"></span...

asp.net mvc 5 - FusionCharts - Adding images to a scatter chart(XML,C# MVC) -

i new fusioncharts , struggling able add images fusionchart. please forgive me, dont know how supposed ask question, if there data want me add help, please let me know. i have working plotting x , y points , setting anchorsides , anchorradius, want replace these image , have no idea how to. here portion using foreach populate x , y axis : strxml += "<dataset drawline= '0' seriesname= 'peak' color= '#ff0000' anchorsides= '3' anchorradius= '5' anchorbgcolor= '#ff0000' anchorbordercolor= '#ff0000'>"; foreach (var cat in calclist) { if (cat.ispeak) { strxml += "<set y='" + cat.elevation + "' x='" + cat.accumulated_length + "'/>"; } } strxml += "</dataset>"; ive gone onto fusionchart site , see : <annotations width="500" height="300...

codeigniter - where is module directory in laravel -

in codeigniter framework there module directory : application\models but directory in laravel 5 framework ? it doesn't have one. people put models in app folder itself, i.e. app\user . if don't that, make folder called models , put them there.

office365 - Onedrive Rest API error: 400 Bad Request when getting children -

api: https://appstaging-my.sharepoint.com/_api/v2.0/drive/root/children error: 400 bad request response header: + headers {transfer-encoding: chunked x-sharepointhealthscore: 0 x-sp-serverstate: readonly=0 odata-version: 4.0 spclientservicerequestduration: 139 sprequestguid: a4ba8e9d-205d-3000-b030-6297e392605f request-id: a4ba8e9d-205d-3000-b030-6297e392605f strict-transport-security: max-age=31536000 x-frame-options: sameorigin microsoftsharepointteamservices: 16.0.0.5423 x-content-type-options: nosniff x-ms-invokeapp: 1; requirereadonly cache-control: max-age=0, private date: mon, 11 jul 2016 10:25:23 gmt p3p: cp="all ind dsp cor adm cono cur cuso ivao ivdo psa psd tai telo our samo cnt com int nav onl phy pre pur uni" server: microsoft-iis/8.5 x-aspnet-version: 4.0.30319 x-powered-by: asp.net } system.net.http.headers.httpresponseheaders request header: + headers {auth...

c# - Passing exception in masstransit request-response model -

i have ui client communicate server application via masstransit on rabbitmq. so, want catch exceptions of userexception type on client , show it's content user, works fine problem each message client server, produce exception on server, moves error queue. im logic not system error, it's user warning, not more. how avoid moving such messages error queue? you can consume faults via fault<> . looks part works you. what want replacement moveexceptiontotransportfilter filter out messages getting tossed in error queue.

wsdl - How to Configure WCF for CRM 2016 IFD -

i have crm instance has been updated crm 2011 crm 2016 ifd. have old .net 3.5 website working fine crm 2011 using wsdl added service reference. changes required website pass in credentials, ifd (adfs 3.0). changes have been made. since ifd, need change wcf bindings point use https , ws-trust. when walk through sdk examples, says should able point wsdl, generate wcf config. config empty. have been able 2011 crm instance ifd (adfs 2.0). so how configure wcf abcs? crm 2016 no longer allow this? have potential adfs configuration issue (it requiring users enter user name , password when hitting crm locally, when on authenticated domain machines, entirely possible.). therefore looking change code work ifd in crm 2016. the topic of authentication covered here: https://msdn.microsoft.com/en-us/library/gg334502.aspx you want @ oauth well. https://msdn.microsoft.com/en-us/library/dn531010.aspx

Inno Setup Batch compile more than one installer in parallel -

Image
i have 13 .iss scripts inno setup , want compile them in parallel. @ moment i'm using .bat file non-parallel compiling. takes on 2 hours, want parallel this. it's not working start iscc ... can me? there's no reason, why should not work start . work. maybe use wrong syntax. the correct syntax is: start "compiling setup 1" "c:\program files (x86)\inno setup 5\iscc.exe" c:\setup1\example.iss start "compiling setup 2" "c:\program files (x86)\inno setup 5\iscc.exe" c:\setup2\example.iss note first argument start window title.

Using newline in Cordova iOS App -

i have app built cordova , @ point display string newline escape character ( \n ) somewhere in string. if build app , test on both android , ios device, line break shows on android device not on ios device. is there encoding issue i'm missing or something? the string: 'some text: \n www.somesite.com'