Posts

Showing posts from September, 2015

ios - Assigning a value out of array of arrays, using section in Xcode -

this code: let servicebonnen = [[1,2,3],[4,5,6],[7,8,9]] //not real data func tableview(tableview: uitableview, cellforrowatindexpath indexpath: nsindexpath) -> uitableviewcell { let cell = tableview.dequeuereusablecellwithidentifier("namecell", forindexpath: indexpath) cell.textlabel!.text = servicebonnen[section][indexpath.row] return cell } but gives me error @ "section" point in line of code: cell.textlabel!.text = servicebonnen[section][indexpath.row] does know why won't compile, , proper solution? you need use section indexpath : indexpath.section your line should this: cell.textlabel!.text = servicebonnen[indexpath.section][indexpath.row]

xamarin.ios - Xamarin(PCL) - Signal R - System.InvalidOperationExceptionConnection started reconnecting before invocation result was received -

i getting system.invalidoperationexceptionconnection started reconnecting before invocation result received exception signal r chat, using signal r client in pcl of xamarin project here chat service class- public class chatservice : ichatservice { private ihubproxy _hubproxy; private hubconnection _hubconnection; private readonly imobileserviceclient _mobileclient; private readonly iinsightsservice _insightsservice; private readonly ichatmessagerepository _chatrepository; public chatservice(imobileserviceclient mobileclient, iinsightsservice insightsservice, ichatmessagerepository chatrepository) { _insightsservice = insightsservice; _mobileclient = mobileclient; _chatrepository = chatrepository; } public event eventhandler<chatmessage> messagereceived; public async task connect(bool dismisscurrentconnection = false) { try { if (!crossconnectivity.current.isconnected)

r - XTS-File doesnt work for quantstrat -

i have created xts file out of csv file looks this: open high low close volume adjusted 2016-01-04 14:30:36 "4896,3818" "4896,4272" "4895,2363" "4895,8789" " 0" "0" 2016-01-04 14:31:56 "4892,3579" "4894,0259" "4891,752" "4894,0259" " 0" "0" 2016-01-04 14:32:57 "4894,1753" "4899,2466" "4894,1753" "4898,8589" " 0" "0" 2016-01-04 14:33:59 "4899,2227" "4899,2227" "4894,8281" "4896,5469" " 0" "0" 2016-01-04 14:34:59 "4896,2915" "4896,418" "4892,3838" "4893,4326" " 0" "0" 2016-01-04 14:35:59 "4893,1196" "4896,3301" "4893,1196" "4895,434

javascript - How equal two objects and return this value to ng-show -

i have 2 objects (dates) {{vm.currentdate|date:'mediumdate'}} , {{vm.anotherdate|date:'mediumdate'}} how equal (if same) , value operation sent directive in button <button type="submit" ng-show="value_from_operation"></button> you check if equal this: +currentdate === +anotherdate

javascript - Website analyzer -

i'm having problem, page search products, has getting worse last time. wants display me products can delivered country - still want see of them. have check domins product manually (.com .ca .co.uk etc etc). want build small tool me. i have tried php way: $html=file_get_contents('https://www.ebay.com/sch/i.html?_ipg=200&_from=r40&_sacat=0&_nkw=book&_sop=10'); $dom = new domdocument(); @$dom->loadhtml(mb_convert_encoding($html,"utf8",mb_detect_encoding($html))); $x = new domxpath($dom); foreach($x->query("//li") $node){ $ignore=0; $itemid= $node->getattribute("listingid"); if($itemid >0){ //if (in_array($itemid,$itemsindb)){ echo "itemid=".$itemid."//////text: "; echo $node->nodevalue; echo "<br>"; } but problem is, nodevalue seems missing html tags, since ouput looks this: itemid=322582462268//////text: new listing wind in willows, grahame arthur ra

vba - Invoicing in Word document -

i'm trying write vba script multiply figures exist in table in ms word. so far i've managed below value of b appears £11,000 in document , when message out returns 0. i'd value of b 11000 can multiply, ideas or written code great. private sub calculate_click() dim t1 table dim double dim m, b currency ' first table set t1 = activedocument.tables(1) = val(t1.cell(5, 3).range.text) = a/100 b = val(t1.cell(7, 4).range.text) 'b = ccur(t1.cell(7, 4).range.text) **i tried didn't work msgbox b m = * b t1.cell(5, 4).range.text = format(m, "currency") end sub your code perfect - until tried put icing on cake. :-) dim double, b double because don't want multiply apples oranges. m = * b gives correct result, converted currency divides 100. perhaps done in line, t1.cell(5, 4).range.text = format(m, "currency") . don't know. suggest declare m double , format result forma

mesos - configure: error: cannot find libz -

building mesos 1.3.0 sources on linux-mint release 18.2 following message: configure: error: cannot find libz when try search packages starts libz* many packages names starting libz. 1 right package should install it? try installing zlib1g-dev . it's listed in the documentation linux mint 18.2 based on ubuntu 16.04. so, should follow instructions ubuntu 16.04. # update packages. $ sudo apt-get update # install few utility tools. $ sudo apt-get install -y tar wget git # install latest openjdk. $ sudo apt-get install -y openjdk-8-jdk # install autotools (only necessary if building git repository). $ sudo apt-get install -y autoconf libtool # install other mesos dependencies. $ sudo apt-get -y install build-essential python-dev python-six python-virtualenv libcurl4-nss-dev libsasl2-dev libsasl2-modules maven libapr1-dev libsvn-dev zlib1g-dev

c++ - Undefined reference with a correctly linked library -

i'm having weird problem mbedtls security library. i've downloaded newest version of ( link download .tar.gz ) on ubuntu machine, compiled , copied header files /usr/include , shared library files /usr/lib . when i'm compiling c++ program calls function mbedtls_cipher_cmac_starts mbedtls/cmac.h, undefined reference error security.cpp:599: undefined reference 'mbedtls_cipher_cmac_starts' . however, have included , linked libraries correctly (at least think so, not ordering problem, right?). problem seems in mbedtls library itself, when nm -d libmbedcrypto.so , can't find needed function. checked libmbedtls.so no luck there. 0000000000020206 t mbedtls_cipher_auth_decrypt 0000000000020128 t mbedtls_cipher_auth_encrypt 000000000001ff17 t mbedtls_cipher_check_tag 0000000000020022 t mbedtls_cipher_crypt 0000000000264960 d mbedtls_cipher_definitions 000000000001fb49 t mbedtls_cipher_finish although seems in library makefile when compiling library. also, wei

java - Why it is showing "String literal is not properly closed by a double-quote"? -

the line @ message.setcontent() trying put html code string argument showing error "string literal not closed double-quote". please me find out why showing that. try { // create default mimemessage object. mimemessage message = new mimemessage(mailsession); mimebodypart htmlpart = new mimebodypart(); %> <% message.setfrom(new internetaddress(from)); message.addrecipient(message.recipienttype.to, new internetaddress(to)); message.setsubject("thank using our service"); message.setcontent("<table><tr><td>full name</td><td><%= name %></td></tr><tr><td>address</td><td><%= addr %></td></tr><tr><td>age</td><td><%= age %></td></tr><tr><td>qualification</td><td><%= qual %></td></tr><tr><td>

How to install Android SDK only? -

Image
i have been installing android sdk in last couple of years without android studio, need same on new pc , there's no more .exe file zip file makes things complicated. before able access sdk manager after installing exe file, how can install zip file? as written in documentation. "if not need android studio, can download basic android command line tools below. you can use included sdkmanager download other sdk packages ." when download , extract zip file, inside bin folder find sdkmanager run download different versions of sdk , other tools.

xml parsing - Not able to parse XML in C# with default namespace -

i not able parse xml document default namespace. if remove namespace xmlns="http://java.sun.com/xml/ns/j2ee xml file, able values in nodelist. don't want use linq. xml: <?xml version="1.0" encoding="utf-8"?> <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4"> <display-name>test - tomcat webapp</display-name> </web-app> c# code: string strfileusers = @"e:\\dot_net\\xml_parser\\demo\\web_org.xml"; xmldocument docusers = new xmldocument(); try { docusers.load(strfileusers); } catch (exception) { messagebox.show("cannot open file "); return; } try { xmlnodelist nodelist = docusers.selectnodes("//display-name"); console.writeline(nodelist

Python reload, and IPython autoreload as well, is not working -

i using python + ipython data science. made folder contains modules wrote, organised in packages, like python_workfolder | |---a | |---__init__.py | |---a1.py | |---a2.py | |---b | |---__init__.py | |---b1.py | |---b2.py | |---c | |---__init__.py | |---c1.py | |---c2.py | | |---script1.py |---script2.py at beginning of each session ask ipython autoreload modules: %load_ext autoreload %autoreload 2 now... let's a1.py contains class, a1 , want call 1 of scripts. in __init__.p of package a import module import a1 then in script import class need from a.a1 import a1 if there error in class a1 , modify it, there no way have python reload without restarting kernel. i tried del a1 , del sys.modules['a1'] , del sys.modules['a'] . each time uses old version of class until don't restart kernel... can give me suggestions? this funny. seems problem not due ipython pyzo (the ide i'm using). added testclass a1: class te

rdl - Change sorting in report services -

Image
i have report populated stored procedure. want change sorted column other 1 sorted in stored procedure. dont want change stored procedure. clicked on "tablix properties" -> "sorting" , added column want sort grid by. didn't worked. suggestions? check row group sorting property see if there sorting field or expression. in case exists, overrides sorting of tablix property. to check row group property, right click row group , menu choose row group --> group properties. group properties windows, choose sorting option

c# - Failing validation of Anti Forgery Token in Asp.net webform application -

i working on asp.net webforms application. trying implement anti forgery token functionality in application. i have test case application called script in different file (csrf issue) using xhr. solution have implemented works until change value of viewstate in script. following whole scenario. look @ "\r\n" blah blah blah... ; in below script. external script (csrf attack script): var xhr = new xmlhttprequest(); xhr.open("post", "myappdomain", true); xhr.setrequestheader("accept", "text\/html,application\/xhtml+xml,application\/xml;q=0.9,*\/*;q=0.8"); xhr.setrequestheader("accept-language", "en-us,en;q=0.5"); xhr.setrequestheader("content-type", "multipart\/form-data; boundary=---------------------------12421522427704"); xhr.withcredentials = true; var body = "-----------------------------12421522427704\r\n" + "content-disposition: f

java - What does a "Cannot find symbol" compilation error mean? -

please explain following "cannot find symbol" error: what error mean? what things can cause error? how programmer go fixing error? this question designed comprehensive question "cannot find symbol" compilation errors in java. 1. "cannot find symbol" error mean? firstly, compilation error 1 . means either there problem in java source code, or there problem in way compiling it. your java source code consists of following things: keywords: true , false , class , while , , on. literals: 42 , 'x' , "hi mum!" . operators , other non-alphanumeric tokens: + , = , { , , on. identifiers: reader , i , tostring , processequibalancedelephants , , on. comments , whitespace. a "cannot find symbol" error identifiers. when code compiled, compiler needs work out each , every identifier in code means. a "cannot find symbol" error means compiler cannot this. code appears referring compiler does

swift - Which one is best in "self.view.window?.addSubview()" or "UIApplication.shared.keyWindow?.addSubview()" in iOS -

i need display loaderview in top of viewcontroller let loaderview: uiview() self.view.window?.addsubview(loaderview) other type: let loaderview: uiview() uiapplication.shared.keywindow?.addsubview(loaderview) both line working fine, code best adding subview... in advance.... well if adding view (not loader view) in view controller on appdelegate window it's better go with uiapplication.shared.keywindow?.addsubview(loaderview) otherwise self.view.window?.addsubview(loaderview) is fine.

laravel - Polymorphic nested eager loading with constraints -

i have classes: students-----{id,profile_id,year} profiles-----{id} subjects-----{id}-is learnable groupssbj-----{id}-is learnable learnables----{profile_id,learnable_id,learnable_type,year} groupssbj_subject--{subject_id,groupsbj_id} i want load student id 5, , it's profile, , learnables of profile learnables.year=student.year go lazy loading $student = student::find(5); $student->load(['profile.subjects'=>function($query) use($student){ $query->wherepivot('year','=',$student->year); }],['profile.groupssbj'=>function($query) use($student){ $query->wherepivot('year','=',$student->year); }],'profile.groupssbj.subjects'); if call $student.profile.subjects subjects constrains, groups $student.profile.groupssbj not constrained, , if separate in 2 loads $student = student::find(5); $stude

angular - Ionic2: Send Submit form data to service -

i using ionic2, want send data form web service using post request, every time print form data found empty , service send me not received data. html code: <div class="login-box"> <form #registerform="ngform"> <ion-row> <ion-col id="imagecontainer"> <button (click)="upload()" ion-button>take pic & upload </button> </ion-col> </ion-row> <ion-row> <ion-col> <ion-list inset> <ion-item> <ion-label floating>{{ 'username' | translate }}</ion-label> <ion-input type="text" name="username" #username required></ion-input> </ion-item> <ion-item> <ion-label floating>{{ 'mobilen

Python Kivy: How to add multiple widgets in a loop -

i relativly new python , totaly new kivy strugling solve simple task. need main screen 2 buttons: button1 , button2. when press button, second screen should appear showing again number of buttons. numbers of buttons on second screen dynamic can assume simplicity know it. python code: from kivy.app import app kivy.uix.boxlayout import boxlayout buttons = {} buttons['button 1'] = ('a button 1', 'a button 2') buttons['button 2'] = ('b button 1', 'b button 2', 'b button 3') class selectbutton(boxlayout): def show_buttons(self, button): self.clear_widgets() # guess need #here question comes: how add button widgets buttons[button]? #shall in loop in python code or in .kv file? #for item in buttons[button]: # print (item) class testapp(app): pass if __name__ == '__main__': testapp().run() .kv file: selectbutton: <selectbutton>: orientation: "

How to append array element with increasing the array count with key in PHP? -

i've array $a $a[1] = "a"; $a[2] = "b"; $a[3] = "c"; $a[4] = "d"; let's say, "x" new value want append middle position in array , want add 2nd array position $a[2] want increase count keys of array become like: $a[1] = "a"; $a[2] = "x"; $a[3] = "b"; $a[4] = "c"; $a[5] = "d"; in case, want implement within loop checking conditions if, tried slice , splice both not working do below:- <?php $a = array( 1=>'a', 2=>'b', 3=>'c', 4=>'d' ); $b = array( 'x' ); array_splice( $a, 1, 0, $b ); $a = array_combine(range(1, count($a)), array_values($a)); print_r($a); output:- https://eval.in/837366

python - why multiprocessing function Process doesn't work -

i want use module multiprocessing execute 2 functions @ same time doesn't work. code in these 2 functions depends on library of these 2 instruments, there has no matter multiprocessing import multiprocessing mp def mesure_rfb(): libc.startmeas() time.sleep(0.5) while libc.measuring() == -1: time.sleep(1) def mesure_nrt(): global ave,rev,chrono my_nrt.zeroing() my_nrt.setimeout(100000) tstart = time.time() b=2 ave,rev,chrono = my_nrt.measurement(times=b) a=time.time()-tstart print('measurement cost: ' , a,' s') print('a measurement costs: ' , a/b,' s') if __name__ == '__main__': rfb = mp.process(name='rfb measuring', target=mesure_rfb) nrt = mp.process(name='nrt measuring', target=mesure_nrt) rfb.start() nrt.start() rfb.join() nrt.join() as run part of programme, executes function mesure_nrt. quite new python. appreciated.

Angular 4 execute function from another component -

i'm build webapp using angular4 , i'm trying create button call functions on other components. i reading other similar questions here, have scenario components child or sibling components declaration on html, e.g.: <parent-component> <child-component></child-component> <sibling-component></sibling-component> </parent-component> however, i'm working on different scenario, because components invoked via routing , can't make work. basically have header on page controls execute functions, these functions need trigger/change data on other components loaded via routing. for example, have routing /store show list of stores, have drawer on page want show when user clicks on button on header , problem, because can't propagate event headercomponent storecomponent . these files: header.component.ts @component({ selector: 'header', templateurl: ` <section class="container"&g

arrays - Simple JavaScript Split Function -

i'm questioning why got following output code: 'willie'.split(/[i-l]{1}/); // [ 'w', '', '', '', 'e' ] i expecting ['w', 'e'] . i'm not sure why it's inserting holes in array. you splitting on single letter, each illi considered separator, , string splits follows: w l l e # w "" "" "" e # if there's no content between separators, empty string in place # or csv string w,,,,e split on comma ? try using greedy quantifier + match pattern long can, illi considered 1 separator: console.log('willie'.split(/[i-l]+/));

tcl - terminal text not displayed in tcltk window real time -

i comfortable tcl newbie tk. want display texts on window , after several search found here example seem me. issue display not put in real time when program end. here main lines of program. main_program.tcl #!/bin/sh # -*- tcl -*- # next line executed /bin/sh, not tcl \ exec /usr/local/cellar/tcl-tk/bin/tclsh "$0" "$@" set debug 1 source ./gui_mgt.tcl source ./utils.tcl {set 0} {$i<500} {incr i} { after 10 debug_puts $i } utils.tcl proc debug_puts {message} { if {$::debug} { writetolog $message } } gui_mgt.tcl package require tk grid [text .log -state disabled -width 80 -height 24 -wrap none] proc writetolog {msg} { set numlines [lindex [split [.log index "end - 1 line"] "."] 0] .log configure -state normal if {$numlines==24} {.log delete 1.0 2.0} if {[.log index "end-1c"]!="1.0"} {.log insert end "\n"} .log insert end "$msg" .log configure -state d

Android - Insert contact - response -

can somehow receive response when insert vcard phone? this i've done. intent intent = new intent(intent.action_view); intent.setflags(intent.flag_activity_new_task); intent.setdataandtype(uri.fromfile(file), "text/x-vcard"); startactivityforresult(intent, contact_request); unfortunately, returns result_canceled .

3d - OpenGL depth sorting fails on single mesh, when rendering to framebuffer instead of screen -

Image
as simple demonstration of problem, trying render large simple mesh texture used later, strangely enough, further-away-from-the-camera parts of mesh displayed in front of closer-to-the-camera parts, when viewed specific angle. despite undeniable fact beyond doubt use depth testing: glenable(gl_depth_test); gldepthfunc(gl_less); as example, trying render subdivided grid (on xz plane) centered on origin, smooth "hill" in middle of grid. when rendered screen no errors occur , mesh looks (rendered using orthographic projection, , greyscale color representing depth, no error furthermore occur if mesh viewed side): rendering screen of course done making sure framebuffer set 0 ( glbindframebuffer(gl_framebuffer, 0); ), need render scene framebuffer not screen, in order use render texture. have set framebuffer, , output texture, , redering scene framebuffer (with absolutely nothing changed, except framebuffer , viewport size, set match output texture). purpose of demo

sonar runner - SonarQube Web Api Changes from 6.0 to 6.4 -

i using " http://sonarserver:9000/api/resources?metrics=ncloc,bugs,vulnerabilities " details of projects sonar 6.0. after upgrading 6.4 url not work , not able find alternative under web_api changes page. please let me know if knows alternative this. error: {"errors":[{"msg":"unknown url : /api/resources"}]} per webapi documentation (embedded in own sonarqube server, linked @ footer): api/resources/index deprecated since 5.4 (i.e. super long time ago). the documentation provides guidance: if need 1 component measures: api/measures/component that measures need given project. can use other apis list of projects (e.g. api/components/search ). see web api docs full listing of possibilities.

packages - Python subpackage in arbitrary folder. How to write the __init__.py? -

if have hierarchy a |- __init__.py |-b |- __init__.py |- funcitons.py (which contains def my_function(): pass) and have package a installed, can following from a.b import functions functions.my_function() or from a.b.functions import my_function my_function() how accomplish same result if b encapsulated in several subfolders (which not packages)? as suggested antti haapala, in python 2 __path__ for. following a/__init__.py did job. import os __path__.append( os.path.join(os.path.dirname(__file__), 'res/path')) see what __path__ useful for?

ajax - use foreach loop in json format in codeigniter -

i want loop table in json, my return value is array( [0]array( [m_id]=>2 [event_id]=>37 [activity_id]=>20 ) [1]array( [m_id]=>20 [event_id]=>3 [activity_id]=>2 ) ) my script is function get_out_mail(user_name){ var datastring = 'user_name=' + user_name; alert(datastring); var = false; $.ajax({ type: "post", async: false, url: "<?php echo site_url(); ?>admin/get_out_mails", data: datastring, cache: false, success: function (result) { alert(result); var result = $.parsejson(result); console.log(result.from); $('#mytab

javascript - What is the correct fetch body in React with FileReader -

i have react app gets data upload. want send data (mostly csv's) row row api. problem cannot correct value. const uploadlocalfile = (file) => (dispatch) => { const reader = new filereader() reader.onload = evt => { fetch("some/api/here", { credentials: "same-origin", method: "post", body: //file, evt.target.result ?? <--- }) } reader.readastext(file) alert("done.") } file whole file, evt.target.result not allowed in react? evt.currenttarget forbidden fetch? what mean "not allowed in react"? passing function handler file input should work: handleselectfile = (event) => { const file = event.currenttarget.files[0] const reader = new filereader() reader.onload = (event) => { const content = event.target.result // whatever want do `content` } reader.readastext(file) }

javascript - How to pass array in XHR.get request of Luci openwrt? -

i trying send array javascript xhr.get request in luci openwrt . var myarray[] has contents . example : `myarray[] = {"1","2","3"}` i need pass array xhr.get requests arguments . how can pass array ? this sample code : xhr.get('<%=request_uri%>', {status: 2,value: myarray}, function(x, info) { if (!info) { location.href=location.href; } else { console.log("success"); } } ); and in lua code receiving form data : if luci.http.formvalue("status") == "2" local detailvalue[] = luci.http.formvalue("value") local filecontent = { content = "sample1", find = "sample2" } luci.http.prepare_content("application/json") luci.http.write_json(filecontent) return end but getting errors. correct way send array via xhr.get ? suggestions ?

android - Always position "GOT IT" button of MaterialShowcaseView on the bottom left corner of the screen -

Image
i'm using following library: https://github.com/deano2390/materialshowcaseview i've been trying find way (for 2 days straight!) position "got it" button on bottom left corner of screen. how achieve , effectively? i accept working answer. can see, have history of accepting answers. with osama's answer, error: com.example.me.myapplication e/androidruntime: fatal exception: main process: com.example.me.myapplication, pid: 4445 java.lang.illegalstateexception: cannot start animator on detached view! @ android.view.rendernode.addanimator(rendernode.java:812) @ android.view.rendernodeanimator.settarget(rendernodeanimator.java:300) @ android.view.rendernodeanimator.settarget(rendernodeanimator.java:282) @ android.animation.revealanimator.<init>(revealanimator.java:37) @ android.view.viewanimationutils.createcircularreveal(viewanimationutils.java:55) @ uk.co.deanwild.materialshowcaseview.circularre

sql - Counting the number of returning item for a timeframe -

context: for every item returned, need know how many time "this" item return in different timeframe: 30,60,90,120,180,365 days. an item unique based on serial ( itm_item_serial ). sample data: complete sample creation script, , expected result here *. create table itemreturn ( [itm_id] int, [itm_item_serial] int, [itm_cdate] datetime ); insert itemreturn ([itm_id], [itm_item_serial], [itm_cdate]) values (1, 1, '2016-10-02 02:00:00'), (2, 1, '2016-09-03 02:00:00'), (3, 1, '2016-11-03 01:00:00') ; expected result: itm_item_serial = 1 itm_id 30d 60d 90d 120d 180d 365d 1 0 0 0 0 0 0 2 1 0 0 0 0 0 3 1 1 0 0 0 0 0 or null if there no return in time frame. how work: itm_item_serial = 1 [itm_id] [itm_item_serial] [itm_cdate] 1, 1, '2016-10-02

Adding child/parent links to a flat XML file in XSLT -

i have flat xml document. nodes contain information indicating if parent or child node , in sequential order child nodes follow parent nodes. need xslt file convert input xml xml file child nodes have link parent nodes. input xml file: <items> <item type="a"> <value id="11111" relation="parent"></value> </item> <item type="b"> <value id="22222" relation="child"></value> </item> <item type="b"> <value id="33333" relation="child"></value> </item> <item type="a"> <value id="44444" relation="parent"></value> </item> <item type="b"> <value id="55555" relation="child"></value> </item> <item type="a"> <v

json - How to Save multiple messages in Azure Function JavaScript? -

i have created 1 azure function in azure app triggered iot hub, , saves received messages in sql database. not able handle when receives multiple messages. function bellow. module.exports = function (context, iothubmessage) { (var = 0; < iothubmessage.length; i++) { var iotmsgobj = iothubmessage[i]; context.log('message : ' + json.stringify(iotmsgobj)); context.bindings.parasession = json.stringify(iotmsgobj); //to save data in sql database context.done(); // save first message } // context.done(); // save last message }; when iothubmessage hub has multiple json objects, save ether first or last message iothubmessage store in database table. please advice doing wrong? i haven't tried sql binding, returning array works other types (e.g. queue): module.exports = function (context, iothubmessage) { context.bindings.parasession = []; (var = 0; < iothubmessage.length; i++) { var iotmsgobj = iothubmessage[

actions on google - gactions not working - "caller does not have permission" -

i trying create duplicate app on 2 of email accounts. on 1 of them, app can updated using 'gactions update', however, on other returns following error: error: couldn't fetch versions error: caller not have permission i looked @ documentation 'gactions', however, nothing found seems indicate works 1 google account. imperative app work other account. there way give other account permission can update action? gactions creates "creds.data" file credentials of account when gactions used first time. can use 1 account @ time. alternatively, can clone app code , install gactions in each of these own credentials.

android - Alarm Manager background services not working properly -

i working on project , making reminder app. made yesterday, problem facing. if destroy app, notification doesn't come anymore. if minimize app, works correctly. if set alarm 4-5 hours longer current time, not works/not shows notification this main activity public class setquiz extends appcompatactivity implements datepickerdialog.ondatesetlistener, timepickerdialog.ontimesetlistener{ toolbar toolbar; edittext title, details; button save, time; textview s_date, s_time; quizdatabasehelper mydb; string q_title, q_details, h, m, y, mo, d; int year, month, day, hour, minute; int yearfinal, monthfinal, dayfinal, hourfinal, minutefinal; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_set_quiz); mydb = new quizdatabasehelper(this); title = (edittext) findviewbyid(r.id.quiz_title); details = (edittext) findviewbyid(r.id.quiz_details); save = (button) findviewbyid(r

visual studio - Clear VS 2017 cache -

i'm using system.runtime.caching.memorycache in application. i'm trying delete cache because i'm making unit test data come cache @ 8:54am, , it's not refreshing. so, i've tried delete visual studio's appdata folder without success. i've downloaded tool clear mef component cache, without success. i've tried run test through visual studio 15, it's same cache. anyone can me on how delete cache ? thanks ! just call memorycache.remove before unit test

javascript - pass values from mssql to views in node -

being new node js , javascript . have been trying find solution problem . this app.js file var express=require ('express'); var bodyparser = require('body-parser'); var path = require ('path'); var sql = require('mssql'); var app = express(); const config = { user: 'sa', password: 'password', server: 'localhost\\sqlexpress', // can use 'localhost\\instance' connect named instance database: 'pcgdb', options: { encrypt: false // use if you're on windows azure } }; const request = new sql.request() //view engine app.set('view engine', 'ejs'); app.set('views', path.join(__dirname, 'views')) app.use(bodyparser.json()); app.use(bodyparser.urlencoded({extended: false})); app.get('/',function(req,res){ res.render('index') }); app.get('/new_project', function(req, res) { function(data,err){

javascript - Understanding ExtJS Framework Syntax -

i have been given project uses sencha's extjs framework, no handover or documentation. trying come grips hoping people can pls assist me following syntax possibly point me specific site might explain code newcomer framework. i have been going through code , unsure doing, i.e.: if(val==1) { ext.getcmp('status').settext('awaiting approv'); } switch(flag) { case 1: if(val==0) { ext.getcmp('complex_first').el.replacecls('x-form-complex', 'x-form-simplex'); } else { ext.getcmp('complex_first').el.replacecls('x-form-simplex', 'x-form-complex'); } break; case 2: if(val==0) { ext.getcmp('complex_second').el.replacecls('x-form-complex', 'x-form-simplex'); } else { ext.getcmp('complex_second').el.replacecls('x-fo

tsql - sp_execute_external_script @language = N'R' -

how can - create 2 input data set referenced in @script example exec sp_execute_external_script @language = n'r' , @script = n' outputdataset <- inputdataset' , @input_data_1 = n'' , @input_data_2 = n'' -- line. , @input_data_1_name = n'inputdataset' , @output_data_1_name = n'outputdataset' result sets ((plot nvarchar(max))); you have use @params if want more 1 input/output. assign data parameter of exact same name right after it. exec sp_execute_external_script @language = n'r' , @script = n' notusedagain <- seconddataset; outputdataset <- inputdataset ' , @input_data_1 = n'' , @params = n'@seconddataset int' , @seconddataset = 1 result sets ((plot nvarchar(max)));