Posts

Showing posts from May, 2010

What does iOS storyboard capability attribute under dependencies tag means -

in storyboard having following xml attribute <dependencies> // more code here <capability name="unknown constraint types" mintoolsversion="5.1"/> </dependencies> 1.) capability means? 2.) affect if remove capability? 3.) there documentation/guide can learn possible attributes , what/when using?

extends ___ = ___ syntax in typescript -

i saw syntax here export interface actionreducer<t, v extends action = action> { (state: t | undefined, action: v): t; } i confused syntax <t,v extends action = action> i not find documentation syntax in typescript . can point me there . looks new syntax build not able recognize , gives me error : node_modules/@ngrx/store/src/models.d.ts:6:52: ',' expected. generic parameter defaults checked versions 1 , figured out added in version 2.3 specifies default type of v . v can either class extends action or if not mentioned of type action. doc

Number in java how it work without a subclass? -

i want know why result of code: number x = 3; system.out.println(x.intvalue()); system.out.println(x.doublevalue()); generates 3 3.0 as number abstract class in java. so when need use - use it's subclasses integer, double ...etc. want know how part of code works: number x = 3; auto boxing. so when number x = 3; that gets compiled number x = new integer(3); number in java how work without subclass? that wrong assumption. number class have subclasses. if @ definition of integer class. look @ definition of integer class public final class integer extends number it sublcass of number gets compiled fine.

sql - Excel Pivot: pivot two columns in table without summarizing values -

Image
i'm using query in excel following table: select "work_center"."eqno", "ud_data"."ud_cols_id", "work_center"."cuser1", "work_center"."cuser2", "work_center"."cuser3", "work_center"."cuser4", "work_center"."cuser5", "work_center"."nuser1", "work_center"."nuser2", "work_center"."nuser3", "work_center"."nuser4", "work_center"."nuser5", "ud_data"."cuser" "iqms"."ud_data" "ud_data" full outer join "iqms"."work_center" "work_center" on "ud_data"."parent_id"="work_center"."id" "work_center"."mfg_type"='injection' , "ud_data"."ud_cols_id" not null order "work_center

reactjs - React TransitionGroup not unmounting children on state change -

i'm building sidebar component react transition group. relevant code goes follows: function firstchild(props) { const childrenarray = react.children.toarray(props.children); return childrenarray[0] || null; } class sidebar extends component { componentwillenter(cb) { console.log('entering'); cb() } componentwillleave(cb) { console.log('leaving'); cb() } render() { // return sidebar jsx } } class nav extends component { ... togglesidebar() { const newstate = !this.state.show; this.setstate({ show: newstate }) } render() { return ( <transitiongroup component={firstchild}> { (this.state.show == true) ? <sidebar /> : null } </transitiongroup> ) } } the problem when try toggle sidebar, none of lifecycle hooks being triggered. on first click, sidebar added dom , componentdidmount called not componentwillenter. when click again hide it, state.show gets set correctly false s

css - How to make different bevelled image blocks as links? -

i'm solving problem responsive image map , don't know solution best. i have desktop version and mobile version whole image , text block background must link page. images , texts editing users don't think skew best solution. thanks idea. using images responsive design kind of weird, think easiest way using imagemap else can imagine transparent divs placed on image, or if whole image link, juste put in 'a' tag, if want mobile , desktop version link 2 different pages, unse php $_server or javascript get, example, url or width of screen depending on way change design

Raspberry Pi stopwatch on power on -

i'm trying figure out how build raspberry pie start stopwatch power turned on, stop when turned off , keep counting when turning on again. any ideas? :) the final product stopwatch count 24 hours, 150 hours, 300 hours , 600 hours , show different warning each goal. warnings can reset individually. it's engine need different service checks depending on how long has been running. kindly, rasmus

node.js - Expressjs - AJAX not recognized by req.xhr -

i have action within application user triggers delete ajax call delete account , redirected homepage message. action occurs expected, message not appear. can't use flash messages because destroying session on deletion, decided use if(req.xhr) , pass object view render if true , view if false . however, doesn't appear route recognizing x-requested-with:xmlhttprequest delete , delivering else statement. can point me why might be? here route: siteroutes.get('/', function(req, res) { if(req.xhr) { console.log("ajax request") res.render('pages/site/index.hbs',{ successmessage: "account deleted." }); } else { console.log("regular request") //being triggered res.render('pages/site/index.hbs'); } }); here ajax: $.ajax({ method: 'delete', url: '/app/settings/account/delete', data: { successmessage: "account delete

c# - Deserialize a dynamic property in an ASP.net web-api -

i have element class contains an options property, option class can in turn change properties example have these 2 element1 = { "id": "1", "options": { "printable": "true", "stackoverflow": "great" } } element2 = { "id": "2", "options": { "question": "awsome", "propertydiferent": "empty" } } on web api have method this: public object post ([frombody] element element) { savetomongo (element); } the element class: public class element { public dynamic options {get; set; } public string id {get; set; } } when pick element mongo have no problems. when send using post method of api web, not deserialize itself, in expando object since mongo. how similar behavior @ both ends? edit: tried change options dynamic newtonsoft jobject, didn't work. options saved, gener

javascript - Uncaught ReferenceError: Redux is not defined or Uncaught ReferenceError: createStore is not defined -

i try import redux library pages this: import redux 'redux'; and 2 types of errors in chrome console: uncaught referenceerror: redux not defined or uncaught referenceerror: createstore not defined what issue? you should use instead: import { createstore } 'redux'; then going refer createstore , not use redux variable. accourding misterious reasons redux developers not named global var after name of library.

handlebars.js - How to use handlebars with nodemailer to send email? -

i using nodemailer send emails using following nodemailer-express-handlebars plugin. used blog post reference the code compiling welcome template not using layout my code below: var nodemailer = require('nodemailer'); var mg = require('nodemailer-mailgun-transport'); var hbs = require('nodemailer-express-handlebars'); var config = {auth: {api_key: "key-xxx",domain: "mydomain.com}} var nodemailertransport = nodemailer.createtransport(mg(config)); var options = { viewengine: { extname: '.handlebars', layoutsdir: 'views/email/', defaultlayout : 'layout', }, viewpath: 'views/email/' } nodemailertransport.use('compile', hbs(options)); nodemailertransport.sendmail({ from: 'from@mydomain.com', to: 'to@gmail.com', subject: 'welcome xxx', template: 'welcome' }, function (err, results) { if

java - getWebServiceTemplate with HttpComponentsMessageSender not maintaining connections -

i have been searching 2 days answer problem cannot find it. i have client consuming soap service. use springs getwebservicetemplate().marshalsendandreceive(request, new securityheader(..)) i need able send 100 requests/sec , given service replies @ 460ms on average figured should create threadpool 50 threads make concurrent requests. furthermore, setting client @bean public httpcomponentsmessagesender messagesender() { final poolinghttpclientconnectionmanager connmanager = new poolinghttpclientconnectionmanager(); connmanager.setmaxtotal(100); connmanager.setdefaultmaxperroute(55); final requestconfig reqconf = requestconfig.custom() .setconnectionrequesttimeout(5000) .setconnecttimeout(5000) .setsockettimeout(5000) .build(); final closeablehttpclient httpclient = httpclients.custom().setconnectionmanager(connmanager) .setdefaultrequestconfig(reqconf) .addinterceptorfirst(new httpcom

Angular 2 reset form to initial data without having to set each formcontrol individually -

i have formgroup open in edit mode , initialize proper data. save initial data in editform. after doing changes want reset changes initial values, like: this.formgroup.reset(this.stafftoedit); but put blank in every field. workaround found this.formgroup.reset({field1 : this.editform.field1}); ... the thing need more generic resets fields initial value without having go through each formcontrol. is possible do? what keep reference of initial values , use patchvalue() call markaspristine() set form values were, , marking entire form pristine. const initialformvalues { firstname: 'joe', surname: 'doe' }; ... reset() { this.formgroup.patchvalue(initialformvalues); this.formgroup.markaspristine(); } or i'm guessing in case: reset() { this.formgroup.patchvalue(this.editform.value); this.formgroup.markaspristine(); }

Objective C and Swift in same Project - -[__NSCFNumber length]: unrecognized selector sent to instance -

i new in swift, have appdelegate file in objective-c , current controller in swift. issue have property in appdelegate user_id contain login user id , token property auth_token. @property (nonatomic, strong) nsstring * user_id; @property (nonatomic, strong) nsstring * auth_token; i want these values on swift controller. have instance of current appdelegate like: let app_delegate_swift = uiapplication.shared.delegate as! appdelegate and when print these value on swift controller like: print("authtoken - \(app_delegate_swift.auth_token!)") print("user id - \(app_delegate_swift.user_id!)") i able value of auth_token, in case of user_id, gives me error like: terminating app due uncaught exception 'nsinvalidargumentexception', reason: '-[__nscfnumber length]: unrecognized selector sent instance 0xb000000000036783' error indicates using nsstring method on nsnumber. please, check if data strings.

cocoa - OSX : Prevent NSWindow from interacting parentwindow -

in app, launching nswindowcontroller using showwindow method, main windowcontroller . so there base windowcontroller1 on button click opening windowcontroller2 using showwindow method. now wants prevent user-interaction windowcontroller1 until windowcontroller2 open , wants keep on focus windowcontroller2 until user close clicking "close" icon? i have search few things on stackoverflow , google did not found helpful thing idea on this? thanks

c# - Exception in dialog causes MSTest to crash -

i'm researching behaviour in our application , made test consistently makes test engine crash. simplified test code this: [testmethod, timeout(2000)] public void showdialogshouldcleanupafterexception() { var topwindow = new window(); topwindow.loaded += (sender, args) => { var childwindow = new window(); childwindow.loaded += (o, eventargs) => { throw new exception("childwindowexception"); }; childwindow.showdialog(); topwindow.close(); }; topwindow.showdialog(); } everytime run code dialog pops telling me vstest.executionengine.exe has stopped working. why happening , can make sure test keeps running when happens? edit similar behaviour occurs in wpf sample application: public partial class mainwindow : window { public mainwindow() { initializecomponent(); loaded += mainwindow_loaded; } private void mainwindow_loaded(object sender, rout

php - How to run captcha on local xampp server in zf2 -

i'm trying run project, in zf2, image captcha not working. ­­­­­­­­­­­­­­­­­­­­­­­­­ you have check loaded php modules. if zf2 uses gd or imagemagic generate images have enable them in php configuration file. on windows: extension=php_gd2.dll php -m |find "gd"

php - How to add multiple images into custom post in wordpress for portfolio detail page -

i want display multiple images portfolio detail page created using custom post type how please me. you need use advanced custom fields plugin. use repeater field image , select custom post type need show repeater field. then use get_post_meta() images.

javascript - Transforming date which is in seconds to a 'day month year' date -

i have code works transform date in seconds day month year date. here is: var database = firebase.database(); database.ref(`trips/${userid}/trips/${tripid}/begindate`).once('value').then(photossnap => { var tripbegindateseconds = photossnap.val(); var tripbegindatefull = new date(0); // 0 there key, sets date epoch tripbegindatefull.setutcseconds(tripbegindateseconds); var tripbeginmonth = tripbegindatefull.getutcmonth() + 1; //months 1-12 var tripbeginday = tripbegindatefull.getutcdate(); var tripbeginyear = tripbegindatefull.getutcfullyear(); tripbegindate = tripbeginday + "/" + tripbeginmonth + "/" + tripbeginyear; $('#tripbegindate').html(tripbegindate); }); i trying implement angularjs code. retrieving data firebase database, , displaying them angularjs. here js code retrieve data: var app = angular.module('test', []); app.controller('mainctrl', function($scope) { var

vba - how to export csv file without #null in excel -

i need syntax in spss or excel how export data without #null value please struggle this..please let me know +918883238782 whatsapp i typically save csv , in excel save .xlsx. missing values then, noted, allocated space accept representing sysmis values as far know, starting spss 20, ibm decided #null! is excel output of empty cells of numeric variables. you'll need clean manually in excel (via replace - ctrl-h ), or write excel macro speed up; alternatively, use older version of spss, although don't think commercially available anymore; or export csv , import csv excel.

uitableview - UINavigationItem prompt leaves a space on top of tableHeaderView -

Image
by tapping button of uitableviewcontroller cancels uinavigationitem prompt inside it's viewwilldisappear(:_) leaves space on top of landing uitableviewcontroller contains tableheaderview on top shown in image description. any idea eliminate space headful.

haskell - Inconsistency between minimumBy and maximumBy -

when data.list.minimumby comes across list elements equal, chooses 1 came first, maximumby chooses last one: > import data.list > import data.ord > minimumby (const (const eq)) "hello world!" 'h' > maximumby (const (const eq)) "hello world!" '!' is design or coincidence? there reasoning behind behavior? note taking advantage of such assumption can make code more succinct - i.e minimumon length texts instead of using explicit tie-breaker such map snd (minimumon (\(p, t) -> (length t, p)) (zip [0..] texts)) in haskell report there comment min , max: -- note (min x y, max x y) = (x,y) or (y,x) max x y | x <= y = y | otherwise = x min x y | x <= y = x | otherwise = y minimumby , maximumby using these or @ least trying stay consistent them. i guess reason might use min , max to, say, write sort involved comparing , swapping pairs (as in op

java - Cant get the Id from listview right -

so have android app has listview populated sqlite database, im trying id of item when button click outputting 2 numbers not one. instead of answer being 5 5,1 heres method: public void onclick(view view) { toast.maketext(view.getcontext(),"id of item: "+ myadapter.choreslist.get(postion),toast.length_short).show(); //choreapp.dbmanager.deleteoneitem(i); } }); get id model class below code; call getid() method model class; public void onclick(view view) { toast.maketext(view.getcontext(),"id of item: "+ myadapter.choreslist.get(postion).getid(),toast.length_short).show(); //choreapp.dbmanager.deleteoneitem(i); } });

mysql - Different result from Golang db.query and actually running on DB -

Image
i have mysql db on run query gets top row each group (according grouping criterion): select ranked.id, ranked.os, ranked.version, ranked.timestamp, agent_metadata.* (select *, @os_rank := if(@current_os = os, @os_rank + 1, 1) os_rank, @current_os := os default_version order os desc, timestamp desc ) ranked inner join agent_metadata on ranked.os = agent_metadata.os , ranked.version = agent_metadata.version os_rank = 1; when run query on db (using datagrip) expected result. however, when run same query go code using db.query , instead of getting 2 rows, 5 rows. i have logic builds query before running print log: // ... build query query := qb.string() logger.debugf("executing: %s", query) if rows, err := repository.connection.query(query); err != nil { return defaults, errors.wrap(err, "get default versions") } else { defer rows.close() rows.next() { result := defaultversionextended{} err := rows.scan(

javascript - Bootstrap Model is closed everytime after click on the cancel icon in AngularJS? -

i have remove product list. product removed after click on cancel icon, model closes. using angularjs. /** * @summary: removeselectedproductfromalbum function, remove productkey album * @param: event, index, productobject * @return: na * @description: */ $scope.albumkey = []; $scope.albumobject = []; $scope.setalbumobject = []; $scope.removeselectedproductfromalbum = function(event, index, productobject) { //get album object scope $scope.setalbumobject = $scope.setalbumobject; //process remove productkeyid in album. var productkeyid = productobject.keyid; if(productkeyid != undefined) { if($scope.productskeyidlist != undefined && $scope.productskeyidlist != null) { var index = $scope.productskeyidlist.indexof(productkeyid); $scope.productskeyidlist.splice(index, 1); updatedproductkeyarray = $scope.productskeyidlist; //calli

c++ - istream_iterator behaviour on 0x9-0xD -

i have written small test file make question clear : #include <iostream> #include <iterator> #include <algorithm> #include <cstdio> #include <sstream> void printchar(const char c) { std::string s(&c); std::istringstream iss(s); std::ostringstream oss; std::copy(std::istream_iterator<char>(iss), std::istream_iterator<char>(), // reads till end std::ostream_iterator<char>(oss)); std::string output = oss.str(); printf("%#x - %#x\n", c, output.c_str()[0]); } int main (const int argc, const char** argv) { (char = 0; < 0x20; ++i) { printchar(i); } return 0; } now, expected output going 0 - 0 0x1 - 0x1 0x2 - 0x2 ... 0x1e - 0x1e 0x1f - 0x1f however, following output 0x9-0xd : 0x8 - 0x8 0x9 - 0x7f 0xa - 0x7f 0xb - 0x7f 0xc - 0x7f 0xd - 0x7f 0xe - 0xe can explain why result ?

c# - Url action null object asp.net mvc -

i need create global url , send email. create global url url.action url.action return me null. , don't know why. knows? have method: public string sendrecoverymessage(users usermodel) { messagemodel message = new messagemodel(); string resetlink = "<a href='" + url.action("setnewpassword", "home", new { timelink = usermodel.timelink }, "http") + "'>Ссылка для восстановления пароля</a>"; message.emailto = usermodel.email; message.emailfrom = "narkom@info.by"; message.title = "Восстановление пароля"; message.message = resetlink; string responsetostring = sendmessage(message); try { rootobject r = jsonconvert.deserializeobject<rootobject>(responsetostring); return r.msg + "Для продолжения изменения пароля пройдите по ссылке указаной в пись

json - Use response from one $http in another $http in Angularjs -

first of want use $http in order receive data (e.g. students), want make $http call e.g. studentdetails. after want append part of studentdetails students json. need response first call in order create url second call. problem cannot access response of first http call inside another. know how can done? var getstudents = function(){ var deferred = $q.defer(); $http.get("https://some_url") .success(function(response){ deferred.resolve(response); }).error(function(errmsg){ deferred.reject(errmsg); }); return deferred.promise; } var appendstudentdetails = function(){ getstudents().then(function(response){ var studentswithdetails = response; for(var i=0; i<studentswithdetails.length; i++){ $http.get("some_url/"+studentwithdetails[i].user.details+"/") .success(function(res){ //here want append details, //received second http call, each student //of

window - angular, I want to make my own grid system (table) -

i want make own grid system (table), <vb-grid [griddata]="foods" [fieldsdata]="fields" [titledata] = "titles" tableheight="200"> </vb-grid> here [griddata ] object data of table, [fielddata] array of fields name, [titledata] array of , , know want pass data in fields, this,, <kendo-grid [data]="griddata" [height]="410"> <kendo-grid-column field="productid" title="id" width="40"></kendo-grid-column> </kendo-grid>

Azure table storage names - invalid charaters -

i have following table names in azure table storage. table names generated automatically in application , created using table.createifnotexists(tablename). work , don't. when dig error extended error information tells me resource name contains invalid characters - @ loss work out invalid in failing names - can spot this? 8836461cc98249bea59dc5f6790d40edstk365developmentusers – specified resource name contains invalid characters 8836461cc98249bea59dc5f6790d40edstk365developmenttasks – specified resource name contains invalid characters af0589646af645b98f749d92a5b2ee25stk365developmentusers – works table names cannot start number. first example, starting 8 , isn't valid. table names limited 63 characters. haven't shown how you're generating names, limitation you're running into. full rule details here .

c# - TempData value implicitly cast from List<string> to string[] after RedirectToAction() -

i using tempdata allow error message displayed after redirect. compatibility, using list<string> add messages list of errors in notificationhelper class: if (tempdata["errornotification"] == null) { tempdata["errornotification"] = new list<string> { message }; } else { var data = (list<string>) tempdata["errornotification"]; data.add(message); tempdata["errornotification"] = data; } inside controller, fill tempdata error message , before return redirecttoaction() call, tempdata contains dictionary record list<string> (to exact: system.collections.generic.list`1[system.string] ) value right after call, inside terms() function, value becomes array ( system.string[] ). [httpget] public iactionresult terms() { return view(); } [httpget] public iactionresult index() { notificationhelper.adderrornotification("error!", tempdata); return redirecttoaction("terms&

html - Add a class to a group of elements in Pandoc markdown? -

i use pandoc create content website. for example, have following content on page: # me text. ## hobbies ### hiking text hiking. ### dancing text dancing. ### other text other. ## why love pandoc more text. pandoc parses me , outputs nice html. but want post-process html further, example want hobbies part become accordion. for i'd in own container, e.g. <div class="accordion"> . possible somehow? update by attaching class specific heading, can achieve close need: ## hobbies {.accordion} ... now can target using css (code not tested): h2.accordion ~ *:not(h1, h2) { color: red; } this assumes next heading on same (or higher) level belongs carousel. this can of help. don't know though whether fits requirements, it's start. sure, markdown supports raw html , e.g.: # me text. ## hobbies <div class="hobbies"> ### hiking text hiking. ### dancing </div>

vba - Every time a cell's value changes, copy and paste range to next open column on sheet2 -

Image
i have tried variety of functions try , work bit complicated skill level vba, appreciated. i have workbook 2 worksheets, 1st having large range of data , formulas , 2nd containing 2 empty tables populated specific date sheet1. sheet1 has column of dates range("dk7:dk39") range 5/1/1986 5/1/2018. time first date changed in column ("dk7"), of other dates in following years auto-update same day in given year. these changes, 2 separate columns repopulated new data determined based on date-specific data. i have code cycles target/first date cell ("dk7") through dates need data for: dim date = dateserial(1986, 5, 1) dateserial(1986, 8, 28) range("dk7").value = next i need add code while dates being cycled through , thus, creating new data needs recorded, ranges ("ds7:ds38") & ("dt7:dt38") copied , pasted next open column in 2 respective ranges on sheet2 formatted years 1986-2017 y-axis column , 5/1 through 8/28 x-

python - how to find if edit box got the focus -

i need verify focus moves edit box after typing "enter" in other edit box. i'am using pywinauto library. tried using 'has_keyboard_focus()' returns 'false' no matter focus is. o = dlg.child_window(title="uut1", auto_id="gbuut", control_type="group"). \ child_window(title="serial # 2 :", control_type="edit").has_keyboard_focus() print(o)

wordpress - Bootstrap Post Carousel blocking other PHP in page-template -

i have created post carousel within wordpress page-template, other php (such advanced custom fields content , such) blocked. wp_debug shows no errors , can't find error within code. below code have used create carousel recent posts custom post type: when entirely remove slider php below work/load, can't seem find mistake in code. <div class="carousel-inner" role="listbox"> <?php $i = 2; global $post; $args = array( 'numberposts' => -1, 'post_type' => 'work', 'orderby' => 'date', 'order' => 'asc', ); $myposts = get_posts($args); if($myposts): $chunks = array_chunk($myposts, $i); $html = ""; foreach($chunks $chunk) { ($chunk === reset($chunks)) ? $active = "active" : $active = ""; $h

-Xmx2048m is ignored by eclipse.ini -

my eclipse based product eclipse.ini has below entry accommodate 2gb of heap memory : -startup plugins/org.eclipse.equinox.launcher_1.3.201.v20161025-1711.jar -application xx.yy.zz.mm.application.application -showsplash splash.bmp --launcher.appendvmargs -vmargs -dosgi.requiredjavaversion=1.8 -xms512m -xmx2048m when launched exe not working ini entry xmx being ignored. workaround : using batch file below entry: java -dosgi.requiredjavaversion=1.8 -xms256m -xmx2048m -xss4m -jar plugins/org.eclipse.equinox.launcher_1.3.201.v20161025-1711.jar -application xx.yy.zz.mm.application.application -showsplash splash.bmp which working fine solution looks ugly users has launch application not exe batch file. info helpful. using windows7 + 64bit jre + eclipse neon strange part while xmx agrument working fine batch file why not working .exe+ini! don't know if can debug launcher or why ini file ignoring 2048m memory. the ini file fragile, sensitive whitespace , silently i

excel - Looped call on rows in VBA -

i'm trying run call on top row, delete row , move cells below , run on new top row again. repeat excercise till there no more rows left. , yes know slow way of doing it, call takes 10 secs each row, it's nice way of keeping track of progression (i.e how many rows left). this i've got far, not understanding request delete range a2:c2 , move cells below if there value in range a3. any appreciated! sub loop_through_rows() dim rngquantitycells range set rngquantitycells = range("a2", range("a2").end(xldown)) = 1 rngquantitycells call runsplit if range("a3").value > 0 range("a2:c2”).delete shift:=xlup end if next end sub try this: sub loop_through_rows() dim rngquantitycells range set rngquantitycells = range("a2", range("a2").end(xldown)) = 1 rngquantitycells call runsplit if range("a3").value > 0 range("a2:c2").delete shift:=xlup end if next end sub

react native - Calling redux actions without bindActionCreator -

i want store gps position of user in redux-store. coords use this: navigator.geolocation.watchposition( (data) => { // }, null, { timeout: 60000, distancefilter: 10 }); i have reducer position: import createreducer '../lib/createreducer' import * types '../actions/types' export const position = createreducer({}, { [types.set_position](state, action) { return { latitude: action.latitude, longitude: action.longitude };; } }) and action: import * types './types' export function watchposition() { return (dispatch, getstate) => { ??? } } export function setposition({ latitude, longitude }) { console.log('ja'); return { type: types.set_position, latitude, longitude } } i want init watchposition in home-screen. don't bind actions there (no connect() ). how call action , init reducer when new position available? you czn import store object in commponent o

php - SoapServer behind Symfony 3 controller not calling wrapped method -

overview i'm trying put soap server inside symfony controller described here: http://symfony.com/doc/current/controller/soap_web_service.html . i'm using php2wsdl generate wsdl (after having failed create valid 1 hand!). have service class bunch of methods exposed via soap. , symfony controller shovel post data soapserver instance , barf out yukky xml response client. but i'm pretty sure soapserver not calling methods on service class. can see soapserver::getfunctions php2wsdl @soap annotated methods have been registered soapserver instance, nothing methods supposed seems happening; no logging, not throw new \exception('@#!?!'); on first line. the actual symptom have that, after soapclient tries __soapcall method (in other application), expects have received soapheader s (which method might setting; don't know) response headers empty. code commented lines things i've been using try , debug. symfony controller class defaultcontrol

r - Update Shiny graph when new Data is received -

my shiny app uploaded on shinyapp.io server. have python script receive data serial port , written inside csv file inside pc. uploading whole csv file on shiny app , generates graph. since passage of time data getting bigger therefore take large amount of time upload , generate graph , when ever close tab of browser , open link again shiny app again ask upload file. unable retain previous state. therefore have following question regarding shiny app : is possible restore previous state in shiny app after close , open instance again? if possible can create new csv file in desktop every time after instance being opened. need send message messaging client running in pc. does shinyapp , r support messaging client, example mqtt or socket.io? currently have upload file, possible there should static path, don't have browser file using file browser , have click update button , update new file? at extreme possible shiny app retain previous state , there should counter send

jquery - Android keyboard appearing and dissapering -

i'm developing e-shop using magento , there small bug in search box on android devices. when user clicks on search box, keyboard appears , disappears after 1 second. page uses jquery "capture" id of search box portion of code follows: $('#search').keyup(function () { #code )}; i've tried various saw online didn't work. suggestions though lead fact keyboard looses focus. appreciated. it's becouse input lose focus. can try force on input field in jquery $("#search").focus()

java - How to set value in text view from other Android app -

i need set value in app instaled in devise other app or service or broadcast is homework... example first app package com.example.example1 second app package com.example.example2 my textview id in first app r.id.textview in activity of application want should make textview this: textview = (textview) findviewbyid(r.id.textview); then after in same application call: textview.settext("text want"); if that's not you're looking please expand more on want do.

amazon web services - AWS S3 Bucket Policy not working when manually testing Lambda Function -

i have aws lambda function accesses s3 resource it’s url (i.e https://s3-eu-west-1.amazonaws.com/bucketname/key ). i have added bucket policy on s3 bucket allows lambda function access s3 bucket (via lambda functions iam role). bucket policy looks follows: 
 { "version": "2012-10-17", "id": "access control s3 bucket", "statement": [ { "sid": "allow , list requests iam role", "effect": "allow", "principal": { "aws": "arn:aws:iam::123412341234:role/role-name“ }, "action": [ "s3:get*", "s3:list*" ], "resource": [ "arn:aws:s3:::bucket-name”, "arn:aws:s3:::bucket-name/*" ] } ] } this works fine when lambda fun

sql - Get a value based on another column's value -

it's pretty basic sql statement imagine, can't life of me figure out how do. so have table have 3 columns : amount of car sold (aocs), day of week (dotw), previous day of week (pdotw). i'd have amount of car sold previous day in fourth column. example, let's have sold 4 cars on monday, 5 cars on tuesday, 3 cars on wednesday. on tuesday line, i'd have '4' written, amount of cars sold on monday. i'm not sure if make sense, let me know. thank help! you have join table on itself select a.dotw, a.aocs, a.pdotw, b.aocs my_table left join my_table b on a.pdotw=b.dotw

csv - Powershell Error -

i getting below error when run powershell code. cannot figure out @ all. not sure if has name of file location or not. import-csv : cannot bind parameter 'delimiter'. cannot convert value "csv" type "system.char". error: "string must 1 character long." @ line:4 char:60 + ... grouplist = import-csv c:\users\eh3599\desktop\powershell csv test\te ... + ~~~ + categoryinfo : invalidargument: (:) [import-csv], parameterbindingexception + fullyqualifiederrorid : cannotconvertargumentnomessage,microsoft.powershell.commands.importcsvcommand script source: set-executionpolicy unrestricted import-module activedirectory $grouplist = import-csv c:\users\eh3599\desktop\powershell csv test\test2-testoutput1.csv -header groupname,domain | select groupname,domain $table = @() $record = @{} foreach ($group in $grouplist) { if ($group.domain -eq "a") {$domainpath

PHP 7: Query output to Text File Questions (FIeld Headers and Skipping a Comma after last column) -

i've new php , trying re-create code had in language. current version of php i'm working 7.17. right now, i'm trying re-create simple function of opening mysql query comma deliminated text file there no comma after last column (just line break). i'm trying figure out 2 things right finish piece of code. how insert query column headers @ top of data output (right data output, not column headers). at line "fwrite($output, $value.',');", i'm trying figure out how not add comma after last field (how skip adding comma after last column of data). php: if (isset($_post['download'])) { header('content-type: text/plain'); header('content-disposition: attachment;filename=cars.txt'); header('cache-control: no-cache, no-store, must-revalidate'); header('pragma: no-cache'); header('expires: 0'); $output = fopen('php://output', 'w'); while ($row = get

Cassandra Spark Dataframe, CSV : "query in the SELECT clause of the INSERT INTO/OVERWRITE statement generates the same number of columns as its schema -

i have csv file around 100 cols. wanted put in table 101 cols (it 102 cols) the problem is have following message: org.apache.spark.sql.cassandra.cassandrasourcerelation requires query in select clause of insert into/overwrite statement generates same number of columns schema. how can overcome problem? here code: df = sqlcontext.read() .format("csv") .option("delimiter", ";") .option("header", "true") .load("file:///" + namefile); and then: df.repartition(8).select("col1","col2",..."col100").write().mode(savemode.append).saveastable("mytable");

swift3 - Disable Text Editor Menu UITextField (Swift 3.0/Xcode 8) -

Image
i'd disable popup menu 4 of uitextfields i'm not sure how. every time click "speak" function [not pictured] or bold/italicize/underline button app crashes. i've seen solutions in previous versions of swift/xcode, haven't seen 1 swift 3 or xcode 8. in advance!

javascript - Ajax Request not submit PHP executed form -

i have following code below needs submitted using ajax request. form <form action="genformexec.php" id="genform" method="post" enctype="multipart/form-data"> <label class="type" for="ccode">*your confirmation code series of numbers sent mail after payment verification</label> <input class="half" type="text" name="ccode" id="ccode" placeholder="confirmation code"> <input class="half" type="email" name="uemail" id="uemail" placeholder="email address"> <input class="half" type="text" name="fname" id="fname" placeholder="first name"> <input class="half" type="text" name="lname" id="lname" placeholder="last name"> <input class="full" type=&