Posts

Showing posts from September, 2015

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'

c# - Powershell Azure CmdletInvocationException -

i have problem using powershell azure. have small c# console application running powershell azure commands. this code: public class powershellservice : idisposable { private powershell _shellinstance; private psdatacollection<psobject> _outputcollection; private runspace rs; public event eventhandler<dataeventargs> data; public event eventhandler<errorrecordeventargs> error; public powershellservice() { initializeshellinstance(); } private void initializeshellinstance() { initialsessionstate iss = initialsessionstate.createdefault(); string[] modules = new string[] { "full path azure.psd1", "full path azurerm.psd1" }; iss.importpsmodule(modules); _shellinstance = powershell.create(); string initializationscript = "set-executionpolicy -scope process -executionpolicy remotesigned"; _shellinstance.addscript(initializationscript); ...

java - Stop conversion decimal to ascii -

i trying send int arduino android via bluetooth if send lets 56, receive 8 in android side...is there anyway can receive 56 , preferably in string form including characters arduino code : int level = 56; serial.write(level); android code : public void run() { byte[] buffer = new byte[128]; int bytes; while (true) { try { bytes = connectedinputstream.read(buffer); string strreceived = new string(buffer, 0,bytes); final string msgreceived =/* string.valueof(bytes) + " bytes received: " + */strreceived; runonuithread(new runnable(){ @override public void run() { textstatus.settext(msgreceived); value = msgreceived ; }}); value defined static string class variable you're converting bytes string , ...

android - captured image quality is low in gridview -

i creating android app in user can click images shown in grid view once image captured part works fine quality of image low , if take image high resolution camera shows width , height of image 160 , 200 px respectively. know there way capture image in original size compress image in whatsapp. since newbie android don't know have do. public class camact extends activity implements onclicklistener { button capturebtn = null; final int camera_capture = 1; private uri picuri; private dateformat dateformat = new simpledateformat("yyyy-mm-dd hh:mm:ss"); private gridview grid; private list<string> listofimagespath; public static final string gridviewdemo_imagepath = environment.getexternalstoragedirectory().getabsolutepath() + "/gridviewdemo/"; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.camlayout); capturebtn = (button)findviewbyid(r.id.capture_btn1); captur...

swift - How to make a table view that has a header which returns when you scroll up? -

Image
i have rather complex view controller. has segmented control switches between 3 child uitableviews. i'd mimic behavior of url bar in safari app, when scroll up, header disappears offscreen, when scroll down, reappears without having scroll way top of table. i'm not sure proper term behavior is. how behavior accomplished?

Can we call one scenario inside another scenario in cucumber? -

i started working behavior driven tool cucumber. fun tool use. while working on problem. came across of time, not reusing code. that's why want call scenario scenario. have searched found nothing helpful. can ? another same question posted here on github this may you're looking for: https://github.com/cucumber/cucumber/wiki/calling-steps-from-step-definitions so there couple of things can do. if have step want reuse following: given /^i log in (.*)$/ |name| # ... end you can call within step so: given /^(.*) logged in$/ |name| step "i log in #{name}" end you can following within step definition: steps %q{ given log in #{name} }

forms - Paypal payment page suddenly changed -

i sell web site using buy buttons , ipn. i have noticed drop in sales lately, decided investigate. notice when buyer clicks buy button see different payment form - seems have changed recently. the old form had login paypal prominent "pay credit card or debit card" link. new form not have link - instead seems push paypal login took me while work out how pay credit or debit card. in end clicked grey "check out guest" button @ bottom of page , not prominent. the old form looks http://tinypic.com/view.php?pic=2r43ms2&s=8#.v4ojskkw6jf , new form looks http://tinypic.com/view.php?pic=149rpcn&s=8#.v4ojpkkw6je the old form better - has full details of purchased item in left column, , more obvious pay credit card link. i convinced change has adversely affected sales. didn't change settings have no idea why has happened. can please tell me how can re-instate old form works me - maybe change of settings, or parameter passed in buy button post ? ...

c# - How can I use a WHERE clause in GridView control? -

i want create clause can values database gridview particular id have stored in viewstate on page load. clause marked in stars in code <asp:gridview id="gvview" runat="server" autogeneratecolumns="false" datakeynames="id" datasourceid="sqldatasource" allowpaging="true" pagesize="50" width="100%" emptydatatext="--- no records yet. ---" pagerstyle-horizontalalign="center" pagersettings-pagebuttoncount="5" emptydatarowstyle-forecolor="#888581" emptydatarowstyle-font-size="14px" emptydatarowstyle-height="30px" emptydatarowstyle-font-italic="true" alternatingrowstyle-backcolor="#e2e2e2" pagerstyle-cssclass="pager"> <columns> <asp:templatefield headertext="select"> ...

html - how to use the get() function in the $http service -

i learning $http service not clear on regarding get(). below code doesn't execute demo2.htm. please check , advise made mistake. var app = angular.module('myapp', []); app.controller('urlctrl', function($scope, $http) { $http.get('demo2.htm').then(function(response) { $scope.mywelcome = response.data; }); }); it seems $http service not you're looking if you're trying access resource same location html/js files. 1 of following should better suit situation: nginclude ngbindtemplate ngroute

javascript - Detect point of screen size changes -

i want detect point when screen width changes below 1120, , fire piece of code, when screen size passes point. not want run code when there change from, example, 1000 999. 1121 1120. to ensure code doesn't run every time browser resized, when changes above or below 1200px resolution, can use boolean(true/false) flag run code when value needs change, in case under1200 variable. no libraries required if you're using code. var under1200=false; if(window.innerwidth<1200){ under1200=true; } window.onresize = function(event) { if(under1200 == false && window.innerwidth<=1200){ console.log("size under 1200"); under1200=true; //your code less 1200px here } if(under1200 == true && window.innerwidth>1200){ console.log("size on 1200"); under1200=false; //your code +1200px here } }

multithreading - IProgressMonitor example needed for uncertain long process database transaction -

Image
i new rcp , building 1 product have "import" feature imports approx 50000 data excel. want show progress in progress bar. have tried many examples couldn't extract required code may don't know how write proper way. please provide me example few steps can understand flow. if steps write iprogressmonitor , database connectivity code import data excel , insert database. i need more stuff calling each method string should changed different strings have mentioned in image. doing user can aware happening behind scene. below sample code have tried new progressmonitordialog(shell).run(true, true, new irunnablewithprogress() { @override public void run(iprogressmonitor monitor) throws invocationtargetexception, interruptedexception { try { monitor.begintask("importing data...", iprogressmonitor.unknown); if (monitor.iscanceled()) return; ...

iphone - Braintree Cancel button handling -

just use sandbox mode , press on pay button after entering details. once payment started processing, press cancel button immediately. call cancel method calling dismissviewcontroller @ same time after dismissing payment view payment succeed delegate called. , have nothing there check whether fail or success or else. have tried take class reference , set nil in cancel delegate. me if faced same.

http - can I get the POST data from environment variables in python? -

i trying understand http queries , succesfully getting data requests through environment variables first looking through keys of environment vars , accessing 'query_string' actual data. like this: #!/usr/bin/python3 import sys import cgi import os inputvars = cgi.fieldstorage() f = open('test','w') f.write(str(os.environ['query_string])+"\n") f.close() is there way post data (the equivalent of 'query_string' post - say) or not accessible because post data send in own package? keys of environment variables did not give me hint far. the possible duplicate link solved it, syntonym pointed out in comments , user schien explains in 1 of answers linked question: the raw http post data (the stuff after query) can read through stdin. sys.stdin.read() method can used. my code works looking this: #!/usr/bin/python3 import sys import os f = open('test','w') f.write(str(sys.stdin.read())) f.close()

php - Yii2 accessControl force redirect to lgoin whitout behaviors -

i've created small module week ago, need work module when open module link have got redirect login page, module no have behaviors defined, if don't mistake let full access @ user, test i've set on main module controller behavior public function behaviors(){ return [ 'access' => [ 'class' => accesscontrol::classname(), 'rules' => [ [ 'actions' => ['*'], 'allow' => true, ] ] ] ]; } but application redirect me login page. how can allow access users? thanks if don't need access control, should remove behavior. or use : public function behaviors(){ return [ 'access' => [ 'class' => accesscontrol::classname(), 'rules' => [ [ 'allow' => true, ...

wso2 - WSO2esb-4.8.1 issue with GUI for viewing Logs -

we using wso2esb-4.8.1. we want use wso2 gui view tenant specific log. getting following message when navigate monitor--> application logs. the log must configured use org.wso2.carbon.logging.core.util.memoryappender view entries on admin console i found in log4j.properties, following used log4j.appender.carbon_memory=org.wso2.carbon.logging.appender.carbonmemoryappender i changed log4j.appender.carbon_memory=org.wso2.carbon.logging.core.util.memoryappender the issue remains though. by default, when install wso2 4.8.1, esb, installs logging management 4.2.1 this, logs visible in gui. works expected. later, if install other feature , includes higher version of logging management (eg:- in our case, installed data services 3.1.1 includes logging management feature 4.2.2), gui stops working. all did unchecking logging feature in data services 3.1.1 when installing data services. way, logging feature did not upgraded, rest of data services did. ...

javascript - Angular JS 1.5 - I want to communicate between angular js components -

i trying expose deletephoto , editphoto methods of businessphotos components verticalgrid component. how not accessible. any appreciated, thanks photo.js angular.module('business') .component('businessphotos', { templateurl: 'business/photos.html', controller: [ function() { var $ctrl = this; $ctrl.editphoto = function(photo) { // code }; $ctrl.deletephoto = function(id) { // code }; }] }); photo.html <vertical-grid ng-if="$ctrl.business.provider_photos" cells="$ctrl.business.provider_photos" delete-photo="$ctrl.deletephoto(id)" edit-photo="$ctrl.editphoto(photo)"></vertical-grid> vertical-grid.js angular.module('dashboard') .component('verticalgrid', { bindings: { cells: '<', deletephoto: '&', editphoto: '&' }, templateurl: 'utils/vertical...

ms access - Have autonumbered column restart value from 1 after primary key value changes? -

i have 2 tables, call them po , po_li. there column in po called po# primary key, , in 1 many relationship po# column in po_li (the 1 being in po). in po_li, other columns line#, description , lineamount. how can reset number 1 every new po #? can done while still using autonumber? can done in ms-access gui or vba code required? you cannot manually edit autonumber field or change starting value. best bet maybe use vba max line number , increment it, , if you're using new po start @ 1. put vba in afterupdate event of po field. you this: dim db database dim rec recordset dim rec2 recordset dim myval integer set db = currentdb set rec = db.openrecordset("select linenum mytable po = '" & me.txtpo & "' group po") 'if there no records returned, start @ 1. otherwise, increment. if rec.eof = true myval = 1 else set rec = db.openrecordset("select max(linenum) mytable po = '" & me.txtpo & "'...

php iconv problems with carriage return -

i've got following code should escape german special chars. problem when makes carriage return in input field, code breaks , no text submitted. <b>nachricht:</b> ' . iconv('utf-8', 'windows-1252',$_post["sonstiges"]).'<br><br><br> how can solve problem? thanks

c# - Why can I apply a null-conditional operator to a hardcoded string? -

i have bool variable this: bool mybool = true; if write if (mybool == null) following warning: the result of expression 'false' since value of type 'bool' never equal 'null' of type 'bool?'. that's clear me because doesn't make sense check whether non-nullable variable null. visual studio notices , marks warning. now have string , nullable default, know. why can apply null-conditional operator hardcoded string without visual studio noticing it? i'm thinking of this: "this string"?.anystringmethod(); shouldn't visual studio notice string isn't null @ all? visual studio must go off type operator working with. when create bool , there no way ever null type, until change type bool? . however, hard coded string, though has text within quotes, there's no guarantee stay there. "variable" gets created (even plain string) still of type string , able have null assigned , not cha...

How to format spaces in IDEA JSON formatting for empty objects and arrays -

Image
i have large json file lot of empty objects , arrays, when format file in intellij idea adds automatically spaces empty objects , arrays. so, was: { "someobject": {}, "somearray": [] } became: { "someobject": { }, "somearray": [ ] } and other lines this. since our team uses different editors/formatters file, can't commit such changes, because "formatting war" other people on same project, use other editors json. in idea settings->editor->code style->json found these settings: but looks nothing "empty object/array spaces". so, question is: is possible change default empty object/array formatting in json intellij idea? may can patch formatter plugin or install other 1 json? as per comment above, settings fine , can confirm on local 14.1.7 installation work expected. but looks nothing "empty object/array spaces" the settings showing, editor -> code style -...

ios - UICollectionView is not reloading data properly -

i'm using uicollectionview display data received remote server , i'm making 2 reloaddata calls in short time, first 1 show spinner (which uiactivityindicatorview in uicollectionviewcell ) , second 1 after data retrieved server. store models based on collection view cells created in self.models nsarray , in cellforitematindexpath dequeue cells based on model. issue when call reloaddata after request completed (the second time) collection view seems still in process of creating cells first reloaddata call , shows first 2 cells , big blank space in place rest of cells should appear. i wrote logs insights of what's happening , current workflow is: i'm populating self.models model spinner cell , call reloaddata on uicollectionview. numberofitemsinsection called, returning [self.models count] . returned value 2, fine (one cell acts header + second cell 1 uiactivityindicator inside). i'm making request server, response , populate self.models new model...

javascript - TreeView in Html / Angular -

i trying create similar tree view in html , using angular. current issue normal select statement go 1 layer deep on parent-child relations cannot select optgroups or rename them. example of code this: id | parentid | name 1 | null | building building 2 | 1 | room 1 room 1 3 | 1 | room 2 closet 1 4 | 2 | closet 1 room 2 5 | null | building b building b with example, able select of values on right consumer , return corresponding id related selection. edit: further explain question, guess looking treeview inside of combobox shown in this image used in table. the table structure using fill combobox similar demo shown above, list of locations details of id, optional parentid, , name. any suggestions on how create fantastic. thank you! can elaborate question here? code can share guide? think may able help, have build hierarchy tree similar ask...

c++ - Unsure about structures that use pointers and inheritance -

hi guys still pretty new coding give me grace, have error has structure sing contains object calling records. not sure if should make object pointer because when program compile has runtime error. error getting undefined reference 'records::records()' 1d returned 1 exit status the runtime error when use pointer records in employee structure happens first reference it. since don't have commenting in program here explanation. clock in/clock out program. date class self explanatory. shift class implements , holds when employee clocks in , out. records class holds week work of shift objects , used write info spread sheet. also said pretty new coding if have tips structure of program, or of sort love hear them. main.cpp * #include <iostream> #include <cstdlib> #include <windows.h> #include <conio.h> #include <stdio.h> #include <limits> #include <fstream> #include <ctime> using namespace std; #include ...