Posts

Showing posts from August, 2010

Fish shell automatic directory specific functions -

is possible have fish automatically load additional configurations based on directory in? possible example, doesn't work. navigate project folder: cd ~/my_proj there file in folder called .fish.config contains special fish function accessible (since in my_proj ). is there built-in mechanism in fish allows loading fish config file when navigating directory (similar above)? take @ --on-variable flag function statement. can define function runs whenever pwd changes: function react_to_pwd --on-variable pwd echo reacting pwd changing $pwd end

c# - Update query updates all records except the name -

i stuck issue updating. when open windows form developed in c# using sql, update updates fields not name. tell me did wrong? here code public void cc() { cbbname.items.clear(); sqlcommand cmd = new sqlcommand(); cmd.commandtype = commandtype.text; cmd.commandtext = "select * bkhurdata"; db.exenonquery(cmd); datatable dt = new datatable(); sqldataadapter da = new sqldataadapter(cmd); da.fill(dt); foreach (datarow dr in dt.rows) { cbbname.items.add(dr["name"].tostring()); } } private void bkhurupdate_click(object sender, eventargs e) { sqlcommand cmd = new sqlcommand(); cmd.commandtype = commandtype.text; cmd.commandtext = "update bkhurdata set name='" + tbbpname.text + "',details='" + tbbpdetails.text + "',price='" + tbbpprice.text + "',size='" + t

java - Remove direct access to "/" on spring boot -

i have spring boot application have 2 endpoints defined. @requestmapping(value = "/getallfeatures", method = requestmethod.get) @cacheable("features") public responseentity<?> getallfeatures() { ... } @requestmapping(name = "/getfeaturestatus", method = requestmethod.get) @cacheable("features") public responseentity<?> getfeaturestatus(@requestparam(value = "groupname", required = false) string groupname, @requestparam(value = "featurename", required = false) string featurename) { ... } and have defined context server.context-path=/abc how problem when call on /abc/ application gives me valid response. have never mapped "/" in rest controller. ideas on how block requests "/". application doesn't require kind of spring security. it should @requestmapping(path= "/getfeaturestatus"....) instea

F# Immutability, pure function and side effect -

i'm new f# , i'm coding little challenges learn nitty-gritty details language. think have problem because of immutability. scenario: have read height lines in console, each line contains 1 integer. integer represent size of mountain. after reading input need write line number of highest mountains. if index given highest mountain size set 0 else loose. repeat scenario until mountains have size set zero. here code wrote: open system type mountain = {id:int; height:int} let readlineint() = int(console.in.readline()) let readmountaindata id = {id = id; height = readlineint()} let readallmountainsdata = [ in 0 .. 7 yield readmountaindata ] let rec mainloop () = let mountains = readallmountainsdata let highestmountain = mountains |> list.maxby (fun x -> x.height) printfn "%i" highestmountain.id mainloop() mainloop() this code going infinite loop, believe it's because let readlineint() = int(console.in.readline()) is immut

networking - Scheduling task on remote computer via command line -

i want make sure i'm doing right thing. i want run script distributes software silently, system account, maximum rights. callfile.bat contains full command install software package server path, ex.: \\server2\script_to_install_software.cmd here have, make sense or missing something? 1-create task: schtasks /create /s computername /tn "testtask" /tr "\\server1\c$\temp\callfile.bat" /sc once /sd 2030/01/01 /st 01:00 /ru system /rl highest 2-run it: schtasks /run /s computername /tn "testtask" 3-after runs successfully, delete it: schtasks /delete /s computername /tn "testtask" /f as thank time!

reporting services - SSRS expression getting an error because it's expecting a ')' -

i have opened in notepad ++, , don't see missing paranthesis. can see @ glance placed paranthesis make script run correctly when preview ssrs report? =iif((instr(fields!grp_name.value,"socs") > 0 or instr(fields!grp_name.value, "toc") > 0 , (iif(dateadd("yyyy",3,fields!cp_prd_end_dt.value) < fields!cp_prd_end_dt.value , "*see co" iif(fields!sample_month.value>0 ,"yes" iif(fields!cp_prd_begin_dt.value < globals!executiontime ,"no","future"))) try this: =iif((instr(fields!grp_name.value,"socs") > 0 or instr(fields!grp_name.value, "toc") > 0) , (iif(dateadd("yyyy",3,fields!cp_prd_end_dt.value) < fields!cp_prd_end_dt.value , "*see co" iif(fields!sample_month.value>0 ,"yes" iif(fields!cp_prd_begin_dt.value < globals!executiontime ,"no","future")))) i think mis

arrays - Dynamically instantiating classes using the Decorator pattern in PHP -

typically, when working decorator pattern, instantiate classes directly , 1 within other: abstract class handler { public function __construct(handler $handler = null) { $this->handler = $handler; } abstract public function handle(); } class firsthandler extends handler { public function handle() { // calls next guy in chain. obviously, isn't doing anything, it's example sake. $this->handler->handle(); } } // ... , on secondhandler, thirdhandler, fourthhandler $chain = new firsthandler( new secondhandler( new thirdhandler( new fourthhandler() ) ) ); $chain->handle(); however, possibility of chain growing say, perhaps, 20 handlers, can see code begin indent far , makes difficult read, if different handlers in chain don't have names simple "firsthandler", "secondhandler", overall, doesn't good. i wondering if there way dynamically instanti

Swift 3/iOS UIView not updating after retrieving remote JSON data -

i have uitableview list of users. when tap on row, uid of user passed uiviewcontroller detail view. urlrequest made retrieve json data of user (username, avatar, etc). however, detail view inconsistently updates information. it'll show users' name, avatar, etc other times it'll show nothing or it'll show username or show avatar, etc. in fetchuser() method, have print("username: \(self.user.username)") shows correct data being retrieved 100% of time won't display 100% of time in view. any appreciated. thanks! class profileviewcontroller: uiviewcontroller { @iboutlet weak var avatarimageview: uiimageview! @iboutlet weak var usernamelabel: uilabel! @iboutlet weak var networthlabel: uilabel! var user: user! var uid: int? override func viewwillappear(_ animated: bool) { super.viewwillappear(animated) } override func viewdidload() { super.viewdidload() // additional setup after loadin

jestjs - Typescript `declare global` preventing Jest test suites from running -

my app using react, redux, , jest has typescript file code in it: declare global { interface window { eventsource: any;} class eventsource { errorers: any; onerror: any; onmessage: () => void; addeventlistener(event: string, cb: () => void): void; constructor(name: string); } } i'm using jest test framework run tests on other areas in app use es6 javascript , work fine. unfortunately, there 2 test suites prevented running because of because of following error , it: /users/blyncsy/documents/blyncsyu/client/app/bundles/analytic/data-hub.ts:3 declare global { ^^^^^^ syntaxerror: unexpected identifier @ transformandbuildscript (node_modules/jest-runtime/build/transform.js:321:12) @ object.<anonymous> (app/bundles/pulse/actions/odanalyzeractions.js:2:16) @ object.<anonymous> (app/bundles/pulse/containers/od-analyzer/odlinerenderer.js:6:26) other pieces of same typescript file screw test runner if 1 listed above c

javascript - Js drag&drop image/video upload with preview -

my goal have drag , drop upload box videos , images, populate file in exact shape , size of box. you can see snippet here: http://jsfiddle.net/elcf6/4/ can't figure out, how add same functionality video upload same box. appreciate help. here's snippet: var imageloader = document.getelementbyid('filephoto'); imageloader.addeventlistener('change', handleimage, false); function handleimage(e) { var reader = new filereader(); reader.onload = function (event) { $('.uploader img').attr('src',event.target.result); } reader.readasdataurl(e.target.files[0]); } .uploader {position:relative; overflow:hidden; width:300px; height:350px; background:#f3f3f3; border:2px dashed #e8e8e8;} #filephoto{ position:absolute; width:300px; height:400px; top:-50px; left:0; z-index:2; opacity:0; cursor:pointer; } .uploader img{ position:absolute; width:

log4j2 - Lo4j config - Log to different files based on type of mesasge prefix -

hello using log4j2 logging , little confused how can log message different file based on message prefix. for example, messages logged in single logs folder. set of messages this: 'com.project.latency: projectname=[moopointproject].......' some of other log messages of format: 'com.project.latency: projectname=[dataplaneproject].......' i want log messages contain moopointproject in specific file , 1 containing dataplaneproject in separate log file. is there specific way can other changing logging level itself? set several appenders 1 each project name. example: <rollingfile name="rollingfile" filename="logs/moopointproject.log" filepattern="logs/app-%d{mm-dd-yyyy}.log.gz"> <regexfilter regex=".*moopointproject.*" onmatch="accept" onmismatch="deny"/> <patternlayout> <pattern>%d %p %c{1.} [%t] %m%n</pattern> </patternlayout> <

functional programming - What are some intuitions that support calling the Maybe constructor in Haskell "Just"? -

the intuition of optional type maybe int either there no int (thus, there's nothing there) or there some int; there there. it makes sense me call type constructor "negative" case nothing , since means -- there's no int there. why use word just in case emphasis on actually being there ? to me, word "just" carries connotation thing it's describing less alternative; opposite of being there; example, a: doing tonight? b: no; i'm just gonna stay in , watch tv. a: did investigate creepy ghost sounds around house? b: yeah, turns out just owl. clearly i'm lacking whatever intuition naming choice based on. it? because me, word just means opposite of how it's used in maybe type.

android - Scichart can't remove annotation -

when im trying remove annotation, i’m receiving error: java.lang.nullpointerexception: attempt invoke interface method ‘void com.scichart.charting.visuals.annotations.iannotationplacementstrategy.drawadorner(android.graphics.canvas)’ on null object reference @ com.scichart.charting.visuals.annotations.annotationbase.ondrawadorner(sourcefile:889) @ com.scichart.charting.visuals.annotations.adornerlayer.ondraw(sourcefile:144) @ android.view.view.draw(view.java:17071) @ android.view.view.updatedisplaylistifdirty(view.java:16053) i’ve tried many ways, like: updatesuspender.using(pricechart, new runnable() { @override public void run() { pricechart.getannotations().clear(); } }); and updatesuspender.using(pricechart, new runnable() { @override public void run() { pricechart.getannotations().remove(myannotation); } }); but can't remove it. that's weird. there's scichart android tutorial on annota

xcode - C++ function with pointer argument -

i writing c++ program outputs data file, generates python script , calls pyplot make plotting. however, when pass arguments in terms of pointers, can compiled properly, cannot run. returns error. when use xcode debug mode , execute step step, gives correct result chance not always. returns error. i doubt might caused memory allocation problem, cannot identify problem. my codes following: 1) main #include <iostream> #include <stdlib.h> #include <cmath> #include "pycplot.h" using namespace std; double pi = 3.1415926; int main(int argc, const char * argv[]) { int nline = 100; double * np_list = new double(nline); double * pack_fraction_np = new double (nline); (int i=0; i<nline; i++){ np_list[i] = double(i)/double(nline)*2*pi; pack_fraction_np[i] = cos(np_list[i]); } pycplot_data_fout("randompacking", nline, np_list, pack_fraction_np); pycplot_pythonscript("randompacking&

angularjs - Submenu in submenu using ui-router -

hello i'm trying submenu in submenu using ui-route. im trying in angular v1. ->folders ---->jobs ------->coder ------->chef folder it's menu, jobs it's sub menu , coder , chef it's options inside of submenu of coder here code $stateprovider .state('folders', { url: '/app/folders', template : '', abstract: true, controller: "foldersctrl", title: 'folders', sidebarmeta: { icon: 'ion-grid', order: 1, }, }).state('jobs', { url: '/jobs', abstract: true, title: 'jobs', }) .state('jobs.coder', { parent: 'jobs', url: '/coder', title: 'coder', sidebarmeta: { order: 0, }, }).state('jobs.chef', { parent: 'chef', url: '/jobs', title: 'chef', sidebarmeta: { order: 0, }, }); } but code show me this ->folders --->jobs --->coder --->chef any idea or sugesti

javascript - getting highcharts point id based on data from json -

i'm using highcharts renders barchart data provided json, works fine. i'm trying is, each bar displayed on chart, clicking on must navigate page , data displayed on navigated page should based on id of clicked bar on barchart. not sure how go doing have far. var values: array<any> = []; var labels: array<any> = []; var ids: array<any> = []; this.service.getdata(url).subscribe( data => { this.results = data; this.results.map(function(result){ values.push(result.percentage); labels.push(result.displayname); ids.push(result.id); }) this.chart = { title: { text: '', style: { display: 'none' } }, credits: { enabled: false }, chart: { type: 'bar',

html - Header or Legend? -

i working on admins panel website. pages have header , form below it. a page looks this: <div class="page some-page"> <form> <fieldset> ... </fieldset> </form> </div> i need add header pages , wonder if put <legend> - or <h1> so each page header can (using legend): <div class="page some-page"> <form> <fieldset> <legend>page's header</legend> ... </fieldset> </form> </div> or (using h1) <div class="page some-page"> <h1>page's header</h1> <form> <fieldset> ... </fieldset> </form> </div> or maybe more complicated nested header > h1: <div class="page some-page"> <header> <h1>page's header</h1> </head

pip - List required packages by introspection in Python -

how can list requires packages introspection running python or ipython instance? i start development loaded conda environment has full anaconda distribution , whole lo more installed. when wish share code able spit out requirements.txt pip or environment.yml conda consisting of packages currrently loaded in interpreter. how can this? you use python builtin package modulefinder test script modules. like: from modulefinder import modulefinder finder = modulefinder() finder.run_script('bacon.py') print('loaded modules:') name, mod in finder.modules.items(): print('%s: ' % name, end='') print(','.join(list(mod.globalnames.keys())[:3])) print('-'*50) print('modules not imported:') print('\n'.join(finder.badmodules.keys()))

javascript - angular binding string into separate lines into html -

i have angular controller text file such in jsn topics: 'ab, bc, cd' is being read td field . however, long string, trying cut string , print each word own separate line. tried creating function cut string , replace "," carriage return, still prints single line. tried inserting \n or directly within string not work either. <td style=" background-color: green">{{data.topics}}</td> the data work data cannot post gist of idea. cell 'ab' 'bc' 'cd' as opposed entire string on 1 single line of cell in table. as long topic property, why not do. class somecomponent implements oninit{ topics: array<string>; constructor(service: myservice) {} ngoninit() { //not sure how getting data this.service.getdata().subscribe(data => { this.topics = data.topics.split(','); }); } } topics should array. can ng-repeat. <td style="backgr

Is it possible to compile a c/c++ mixed source code? -

we have c project, , want combine c++ project c project, , compile them 1 binary, possible? something like cproject/src/ cproject/src/a.h cproject/src/a.c cproject/src/b.h cproject/src/b.c cproject/src/main.c add cppproject cproject/cppproject/src/c.h cproject/cppproject/src/c.cpp cproject/cppproject/src/m.h cproject/cppproject/src/m.cpp maybe compile cpp shard library , link it? yes can. have project in c , in c++. way resolve (" shard library , link it?") thing. as other people noted can: 1) mix c , c++ (using extern "c" ) 2) make project subproject (in xcode mac standard practice add project existing project 3) sure there 1 main() 4) you want external lib, no need mix them, exposing methods, managing includes andlinkage options , passing parameters can bit complex if not experienced. libs , dll different normal "main()" program.

How do I load a gradle java project into Intellij with bad gradle code -

when try open new java project intellij there problems running gradle build , project won't load. doesn't create .idea folder. this means can't edit in ide fix errors. is there way load intellij , have ignore gradle stuff? intellij idea 2016.2.5 build #ic-162.2228.15, built on october 14, 2016 jre: 1.8.0_102-b14 amd64 jvm: java hotspot(tm) 64-bit server vm oracle corporation go project, delete .ipr , .iml , .iws files , .idea dir. in intellij file > new > project existing sources... select create project existing sources , not import. next, next, next then going unlinked gradle project? - decline. fix stuff , run in terminal alt+f12 if it's fine can link project intellij. also check build, execution, deployment in intellij settings

java - Printing from Arrays -

i having trouble printing references in string method. used array story 1 of constructors' parameters. in order me use tostring have include variables including reference includes parameters constructor. author au10 = new author("dan gheesling", 29); mydate my10 = new mydate(2011); books[9] = new book(au10, "big brother - survival guide", my10, 32.99); (book book : books) { system.out.println(book); system.out.println(); } public book(author author, string title, mydate publishing, double price) { this.author = author; this.title = title; this.publishing = publishing; } @override public string tostring() { return author.class.togenericstring() + "\n" + "title: " + this.title + "\n" + "publication date: " + this.publishing + "\n" + "price: " + this.price; }

html - Determine If Loaded From Iframe Server Side No Client -

is there way server side determine if page being loaded within iframe, our stand alone page? there head or tells it's within iframe without client telling you. not really. if page being loaded in iframe, url of parent frame in referer header (unless referrer policies prevent being sent). however, same thing happen if page being loaded result of user clicking link on source page -- there's no way tell 2 apart server side.

vb.net - How to find and replace text in the Visio file by .Net programming -

Image
i need create lot of flowchart use templates below. each flowchart changes "table_name" label. finally, each flowchart exported image(.png) private sub createflowchartvisio(byval templatefilename string, byval saveas object) dim vapp visio.application dim vdoc visio.document vapp = new visio.application() vdoc = vapp.documents.openex(templatefilename, 4) ''///code replace table_name likes below code''// vdoc.content.find.execute(findtext:="*table_name*", replacewith:=screentitle & " master", replace:=word.wdreplace.wdreplaceall) each p visio.page in vdoc.pages dim n string = saveas p.export(n) next vdoc.close() end sub i tried use replace function in word application vdoc.content.find.execute(findtext:="*table_name*", replacewith:=screentitle & " master", replace:=word.wdreplace.wdreplaceall) but isn't working. i tried use

wordpress - Woocommerce programmatic add to order with product add-on -

i'm using woocommerce product add-ons. i'm generating order programmatically, need include add-on data part of line item. how can done? my basic order setup so: $orderdata = array( 'status' => 'on-tab', 'customer_id' => 999, 'customer_note' => '', 'created_via' => 'api' ); $order = wc_create_order($orderdata); foreach ($lineitems $lineitem) { //need add-on data in here somehow $order->add_product(wc_get_product(999), 1); } when use add_product, item_id in return. see code https://docs.woocommerce.com/wc-apidocs/source-class-wc_abstract_order.html#838-889 this item_id can use item using get_item function. refer https://docs.woocommerce.com/wc-apidocs/source-class-wc_abstract_order.html#760-769 than after getting item can add item meta using add_meta_data function. refer code https://docs.woocommerce.com/wc-apidocs/source-cla

javascript - jquery is not functional? -

this question has answer here: javascript function binding (this keyword) lost after assignment 5 answers firefox (v52.0), jquery this works: // example 1 $('html').find('body') this works: // example 2 var h h=$('html') h.find('body') this doesn't work: // example 3 var f f=$('html').find f('body') i error: permission denied access property "ownerdocument" why? but works: // example 4 var a = x => $('html').find(x) a('body') example 3 doesn't work because find called on global context when assign f . if use call , pass in valid jquery object context, code works. try var f = $('html').find; console.log(f.call($('html'), 'body').length) <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.

php - How to loop DOM elements and store as an array? -

i'm getting data via scrapping. data source table , need data every (tr). the table has 3 (td) is: title date link here code use: $data = array(); $counter = 1; $index = 0; foreach($html->find('#middle table tr td') $source){ $dont_include = array( '<td>contain text dont wnat include in here</td>' ); if (!in_array($source->outertext, $dont_include)) { // if contain link link // source data link // <td><a href="">xx</a></td> if(strstr($source->innertext, 'http://')){ $a = new simplexmlelement($source->innertext); $the_link = (string) $a['href'][0]; $data[$index] = array('link' => $the_link);; }else{ if ($counter==2) { $data[$index] = array('title' => $source->innertext); }else{ $data[$inde

java - /proc consuming space on hard disk gradually -

Image
ec2 instance running centos 7.0 hard disk space consumed slowly, flushed after reboot. content : base os, cloudwatch agent, codedeploy agent, nginx, anti virus macfee, java application (log file under control). screen shot 1 before reboo t : disk space utilized 75% as per screenshot finding top 10 space consuming files , /proc on top. screen shot 2 after reboot : disk space utilized 9% used files flushed, not able identify if issue caused application or other components. procfs virtual filesystem, it's technically impossible take disk space. can read more here . you can confirm running df -ah .

aggregation framework - MongoDB - Query - Top Document per Group -

this question has answer here: mongodb : aggregation framework : last dated document per grouping id 3 answers i have following sql (mysql) query, , convert mongodb. getting top 1 document in every group: select a.* ads inner join (select id ads userid = 1 group ad_code having max(ad_timestamp)) b on b.id = a.id from have read far there several ways aggregate data in mongodb (more info @ mongodb aggregation comparison: group(), $group , mapreduce ): group (does not work on sharded collections) mapreduce $group i trying solve mongodb aggregation framework. far have this: db.ads.aggregate([ { $match: { userid: objectid("5976e215769d8a4a4d75c514") } }, { $group: { _id: "$ad_code", latesttimestamp: { $max: "$ad_timestamp" }, }

How to create a epoch timestamp in milliseconds each day using python -

Image
i trying create small epoch function end giving me resulting time stamp of following format : 1501149934.372957 i trying follows : def create_slack_timestamp(): start_time = '4:00' end_time = '5:00' date=datetime.datetime.now().strftime("%y%m%d") create_epoch = date + start_time i intersted in generating epoch time @ 4:00pm , 5:00pm . how can achieve ?

RTC OSLC query to filter only tasks from workitem -

how filter workitems tasks in oslc api, i've tried following queries none of them working https://rtcserver/ccm/oslc/contexts/somekey/workitems.json?oslc_cm.query=dcterms:type=task https://rtcserver/ccm/oslc/contexts/somekey/workitems.json?oslc_cm.query=dc:type=task https://rtcserver/ccm/oslc/contexts/somekey/workitems.json?oslc_cm.query=type=task

jsp - how to show the selected item in java server pages -

i have code showing selected item, it's not work <select class="form-control" name="grade"> <option value="x" <%if(rs.getstring("grade")!=null){out.println('selected')}%>>x</option> <option value="xi" <%if(rs.getstring("grade")!=null){out.println('selected')}%>>xi</option> <option value="xii" <%if(rs.getstring("grade")!=null){out.println('selected')}%>>xii</option> </select> <img src="https://i.stack.imgur.com/orbzi.png"/> try changing to: <option value="x" <%if(rs.getstring("grade")!=null){%>"selected"<%}%>>x</option> <option value="xi" <%if(rs.getstring("grade")!=null){%>"selected&q

java - How to implement a generic recursive interface? -

another case of java generics confusion... i defining hierarchy of interfaces must include method return list of interface type. standard use case recursive generic pattern (or whatever name is): interface superinter<t extends superinter<t>> { list<t> geteffects(); } now when extends interface: interface subinter extends superinter<subinter> {} i can implement sub-interface , have correct method implement: class subimpl implements subinter { @override public list<subinter> geteffects() { return null; } } and other interface uses generic type have implementing class contain method returns list of interface. however, can't implement super interface type correctly: class superimpl implements superinter<superinter> { @override public list<superinter> geteffects() { return null; } } besides raw types warning, get: bound mismatch: type superinter not valid substitute bounded

python - How to use nlargest on multilevel pivot_table in pandas? -

i'm summing values in pivot table using pandas. dfr = pd.dataframe({'a': [1,1,1,1,2,2,2,2], 'b': [1,2,2,3,1,2,2,2], 'c': [1,1,1,2,1,1,2,2], 'val':[1,1,1,1,1,1,1,1]}) dfr = dfr.pivot_table(values='val', index=['a', 'b', 'c'], aggfunc=np.sum) dfr output: a b c |val ------------|--- 1 1 1 |1 2 1 |2 3 2 |1 2 1 1 |1 2 1 |1 2 |2 the way need output show largest in each group a, this: a b c |val ------------|--- 1 2 1 |2 2 2 2 |2 i've googled bit around , tried using nlargest() in different ways without being able produce result want. got ideas? i think need groupby + nlargest level a : dfr = dfr.pivot_table(values='val', index=['a', 'b', 'c'], aggfunc=np.sum) dfr = dfr.groupby(level='a')['val'].nlargest(1).reset

Difference between ps command output for commands with and without Square Brackets -

ps command shows processes inside ["process name"] , of them without square brackets. tried search man pages , not contain regarding output format. an example output shown below: root 2522 0.0 0.0 0 0 ? s< 10:39 0:00 [device_reset_wq] root 2544 0.0 0.0 0 0 ? s< 10:39 0:00 [kvm-irqfd-clean] root 2746 0.0 0.0 26276 2400 ? ss 10:39 0:00 /usr/sbin/sshd root 2759 0.0 0.0 4272 2212 ? sls 10:39 0:00 /usr/sbin/watchdog kindly check bold italics ones , explain difference.

android - After call jobFinished(mParams, false) why the job is still pending? -

after call jobfinished(mparams, false) can see job still pending because when getpendingjob after can still see job. when job finished schedule new job, can't because getpendingjob job still running , if jobscheduler.schedule it's stop job running (don't know if it's matter) note : main problem cancelling job running have event onstopjob(jobparameters params) called. , problematic this code of jobfinished implemented in android if it's can understand public final void jobfinished(jobparameters params, boolean needsreschedule) { ensurehandler(); message m = message.obtain(mhandler, msg_job_finished, params); m.arg2 = needsreschedule ? 1 : 0; m.sendtotarget(); } so of course it's seam jobfinished send message processed in looper (in next loop), before go out of current loop jobfinished not processed :( how can in such way ?

listbox - cannot convert from 'string[]' to 'System.Windows.Forms.ListViewItem.ListViewSubItem -

welcome have problem.i need listbox. problem is: cannot convert ' string[] ' ' system.windows.forms.listviewitem.listviewsubitem ' my code this: string[] itemss = regex.split(textbox1.text, "\r\n") ; // string[] arrteammembers = new string[] { tb.text }; // listviewitem<string> newlist = new listviewitem<string>(); listviewitem newlist = new listviewitem("1"); newlist.subitems.add(itemss); newlist.subitems.add("3"); newlist.subitems.add("4"); newlist.subitems.add("5"); newlist.subitems.add("6"); listcontacts.items.add(newlist);

ios - NSManagedContext returning old data instead new -

in app, have used double model of nsmanagedcontext. have 1 child managedobjectcontext nsmainqueueconcurrencytype , parent writermanagedobjectcontext nsprivatequeueconcurrencytype saves data persistentstorecoordinator . able save data in database while retrieving getting old values instead new. below code save context parent context , persistentstorecoordinator . [managedobjectcontext performblock:^{ //push parent //nslog(@"pushing parent context (writer context)"); nserror * error; if([managedobjectcontext haschanges] && ![managedobjectcontext save:&error]){ nslog(@"main save error: %@", [error localizeddescription]); } //nslog(@"pushing persistentstore"); [self.writermanagedobjectcontext performblock:^{ //push parent nserror * error; if([self.writermanagedobjectcontext haschanges] &

spring - java.lang.AbstractMethodError: oracle.jdbc.driver.T4CConnection.isValid(I)Z -

when upgraded tomcat 7 8.5 , jdk 7 8, getting below errors while starting tomcat. spring version: 4.1.8.release i changed below pom entries too, nothing seems working. please have , let me know need resolve issue. <dependency> <groupid>com.oracle</groupid> <artifactid>ojdbc6</artifactid> <version>11.2.0.3</version> <scope>compile</scope> </dependency> to <dependency> <groupid>com.oracle</groupid> <artifactid>ojdbc7</artifactid> <version>12.1.0.1</version> <scope>compile</scope> </dependency> and <dependency> <groupid>org.apache.tomcat</groupid> <artifactid>tomcat-dbcp</artifactid> <version>7.0.47</version> </dependency> to <dependency> <groupid>org.apache.tomcat<

point cloud library - Can we simulate a calibrated camera on PCL visualizer? -

i have calibrated stereo camera. have camera intrinsic matrix left camera. have built absolute 3d model of scanned region able load mesh file. i have recorded video of stereo camera's left camera scanned region. know position , orientation of stereo camera @ every point during scanning process. recreated motion of stereo camera using pcl. if position , orientation of stereo camera in real world matches of camera of pcl visualizer, left cam's photo , pcl rendered view match? i tried doing looks perspective projection done in pcl visualizer different of camera. if so, there way change projection algorithm used in pcl visualizer can match rendered view match camera's image?

amazon web services - Is it secure to store on client's device AWS Temporary Credentials (STS)? -

Image
i wanted ask if secure store aws temporary credentials ( access key id , secret access key , session token ) on mobile device calls api? many sources describes necessary part of authorization process. according mentioned below aws resources images: i'm speaking of credentials can obtained assumerolewithwebidentity or getcredentialsforidentity . isn't more secure use jwt tokents instead prevent hacking credentials , obtain access secured them resources? the credentials sts no different (at high level) jwt tokens. both temporary, , if 'hacker' obtain either type of credential, result same. key benefit of using temporary credentials in general if/when compromised, valid short amount of time (usually hour). storing temporary credentials on device separate topic, jwt tokens not different sts session credentials. i don't have links, i'm sure there public discussions , docs on storing session credentials in apps on devices.

sql server - vba error - SQL left join issue -

i trying solve issue , sql , vba, thought post here. error shows left join issue, not sure if false flag. strsql = "select userid userid,appointmentdate, isnull ([1],0) as'other',isnull ([2],0) 'medicare'" & _ "from (select invoices.userid, appointmentdate," & _ "[total] , payercode, users.locationid" & _ "from appointments " & _ "left join invoices on recordid = appointmentid inner join users on appointments.userid = users.userid" & _ "where appointmentdate between '2017-01-22' , '2017-01-22' " & _ "and invoices.internalid >0 " & _ "and appointments.recordstatus in (1,3,4) " & _ "and not appointments.internalid = 0 " & _ "and not consultationtime = 0 " & _ "and arrivaltime >0 " & _ "and appointmentid not '' " & _ ") sourcetable " & _ "pivot " &a

OAuth Error General Code 4 Swift - AppAuth for iOS -

im trying implement appauth in ios. basic implementation has been done. seems working fine. im not recieving token expected. im getting error error domain=org.openid.appauth.general code=-4 let authorizationendpoint : nsurl = nsurl(string: "https://accounts.google.com/o/oauth2/v2/auth")! let tokenendpoint : nsurl = nsurl(string: "https://www.googleapis.com/oauth2/v4/token")! let configuration = oidserviceconfiguration(authorizationendpoint: authorizationendpoint url, tokenendpoint: tokenendpoint url) let request = oidauthorizationrequest.init(configuration: configuration, clientid: "<mytoken>", scopes: [oidscopeopenid], redirecturl: url(string: "http://127.0.0.1:9004")!, responsetype: oidresponsetypecode, additionalparameters: nil) let appdelegate = uiapplication.shared.delegate as! appdelegate // appdelegate.currentauthorizationflow appdelegate.currentauthorizationflow = oidauthstate.authstate(by

php - How to get the value of session -

how value home.php , deliver 1home.php using session. want 1home.php value of home.php every change value of it. session_start(); <form method="post" action="1home.php"> <label id="checkind"> <h3>day</h3> <input id="chid" name="chid" type="number" min="<?php echo $_session["day_today"]; ?>" max="<?php echo $_session["day_count"]; ?>" required /> </label> </form> session_start(); <form method="post" action="2home.php" onsubmit="return validate()"> <label id="checkind"> <h3>day</h3> <input id="chid" name="chid" type="text" value = " <?php echo $chid; ?>" readonly /> </label> in first page have value

botframework - Which HTTP status codes do we get when our request to Bot Framework REST API has been timed out? -

we developing bot system using bot framework rest api , have 2 questions request timeouts of apis. which http status codes when our request bot framework rest api has been timed out? i referred http status codes on page. couldn't find answer. https://docs.microsoft.com/en-us/bot-framework/rest-api/bot-framework-rest-connector-api-reference after how long time our requests bot framework rest apis timed out? (e.g. 60s) thank cooperation!

excel - When writing string to a cell, VBA inserts extra single quotation marks -

i trying write formula using vba: activecell.value = "=f(r[-1]c[0],sheet1!" & columnletter & & ")" where columnletter variable letter macro computes earlier, , f function, , number. the problem when run this, cell given instead: (if columnletter = f, = 16): =f(r[-1]c[0],sheet1!'f16') but want: =f(r[-1]c[0],sheet1!f16) why vba or excel putting single quotation marks around f16? not insert these quotation marks if not include r[-1][0] argument in formula, need include this. help appreciated! its combination of r1c1 , a1 addressing. need pick 1 method , use both parts. note if type =f(r[-1]c[0],sheet1!f16) cell error same reason. you need use r1c1 style first address, (assuming because don't want absolute address) can use .offset instead activecell.value = "=f(" & replace(activecell.offset(-1, 0).address, "$", "") _ & ",sheet1!" & columnletter & &am

Linux environment variable not recognized by qmake in QtCreator -

i'm facing problem project need retrieve environment variable link external libraries, works correctly on windows. in linux looks qmake (run qtcreator) isn't able "decode" environment variable i've set in .bashrc, declared this export projectsdir=/home/il_mix/projects/ to better define problem, i've made veeery minimalistic .pro file, contains this message($$(projectsdir)) if run qmake terminal command /opt/qt/5.9.1/gcc_64/bin/qmake test.pro i correct output project message: /home/il_mix/projects/ when open .pro qtcreator, empty project message instead. from qtcreator options see 1 , kit has "qmake location" set /opt/qt/5.9.1/gcc_64/bin/qmake , same i've used terminal. i've noticed on projects settings, under build/run environment, 1 can see available variables. "projectsdir" not listed in available environment (build, system). on windows environment variable instead listed, , recognized qmake. is there ot

javascript - Google maps add multiple markers and info windows for each one? -

i have code this: function algolia_search(position) { clearoverlays(); var application_id = 'psh...vakl'; var search_only_api_key = '2eb...efa8'; var index_name = 'entities'; var params = { hitsperpage: 150 }; // client + helper initialization var algolia = algoliasearch(application_id, search_only_api_key); var algoliahelper = algoliasearchhelper(algolia, index_name, params); // map initialization algoliahelper.on('result', function(content) { renderhits(content); var i; // add markers map (i = 0; < content.hits.length; ++i) { var hit = content.hits[i]; var infowindow = new google.maps.infowindow({     content: hit.name     }); var marker = new google.maps.marker({ position: {lat: hit._geoloc.lat, lng: hit._geoloc.lng}, map: map, label: hit.name, animation: google.maps.animation.drop, index: });     marker.addlistener('click', function() {     infowindow.open(map, marker);