Posts

php - SoapClient: Add NS to XML node -

i have complicated xml need send on soapclient. i trying "correct" way sending array of params request. here example of current array: $params = array("testrequest" => array("nodeone" => "value1", "nodetwo" => "value2")); it makes xml this: <testrequest> <nodeone>value1</nodeone> <nodetwo>value2</nodetwo> </testrequest> however, need add ns "testrequest" part. needs this: <ord:testrequest> <nodeone>value1</nodeone> <nodetwo>value2</nodetwo> </ord:testrequest> i have pulled hair out trying think of, searched google , stack no avail. , yes, have tried in array typing, "ord:testrequest". if soapclient guru in php , help, forever thankful. okay, after headache... easiest way accomplish not way prefer. i ended manually writing xml so: $xml = '<ord:testrequest> <nodeone...

android - Make a view next to another and at the middle of its height -

i'm trying make activity numberpicker , textview , want textview next numberpicker , @ middle of numberpicker height (the tv going "choose number:") thing i've tried didn't worked. (i tried put 1 in different linearlayout , 2 linearlayouts in relativelayout , messed prefences , still didn't work) here tried: <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingbottom="@dimen/activity_vertical_margin" android:paddingleft="@dimen/activity_horizontal_margin" android:paddingright="@dimen/activity_horizontal_margin" android:paddingtop="@dimen/activity_vertical_margin" tools:context=".mainactivity" > <textview android:id="@+id/textview1" android...

c# - Will included references somehow can change how the compiled program works? -

i wonder because when i, example install-package microsoft.aspnet.webapi.helppages install pages + 6 dependencies razor etc.. when try uninstall it uninstall package , none of dependencies. now know bit on ocd side, it's , wonder if keep referenced in project somehow worsen/make slower application? i'm using empty webapi example here. the references loaded when needed (there dll's), make slower application use it, if none used, none loaded.

javascript - Batch requests in Node.js -

my program communicating web service accepts ~10 requests per second. time time, program sends 100+ concurrent requests web service, causing program crash. how limit concurrent requests in node.js 5 per second? im using request library. // if event , sender if(data.sender[0].events && data.sender[0].events.length > 0) { // find events for(var = 0; < data.sender[0].events.length; i++) { // if type "added" if(data.sender[0].events[i].type == "added") { switch (data.sender[0].events[i].link.rel) { case "contact" : batch("added", data.sender[0].events[i].link.href); //_initcontacts(data.sender[0].events[i].link.href); break; } // if type "updated" } else if(data.sender[0].events[i].type == "updated") { ...

jquery - Get CSS property value of an element on a page from a URL of the same origin -

i background color of element resides @ external page, in same domain. have working solution first approach, there must better way , hope might point me in right direction. my approach i decided first load external page iframe: var $page = $('<iframe/>').attr('src', 'http://mydomain.com/page'); then append iframe current page: $('#iframe-placeholder').append($page); and access css property: $('iframe').load(function(){ var backgroundcolor = $(this).contents().find('#my-element').css('backgroundcolor'); }); downsides of approach it's slow it's asynchronous it doesn't works. returns transparent . question is there way css property of external page? need call synchronous , loading whole page iframe (if that's solution) overkill. any suggestions appreciated... have tried loading page contents asynchronously , working there? var backgroundcolor; $.ajax({ type: ...

match - R matching more than 2 conditions and return the response value -

hi have 2 data set first 1 set of index: ind1<-rep(c("e","w"), times=20) ind2<-sample(100:150, 40) y<-c(1:40) index<-data.frame(cbind(ind1, ind2, y)) the second data set 1 needs indexed. x1<-sample(c("e","w","n"), 40, replace=true) x2<-sample(100:150, 40) x3<-rep(0, times=40) data<-data.frame(cbind(x1,x2,x3)) i indicate in x3 x1 , x2 in data matched ind1 , ind2 in index respectively , return corresponding y . index1<-split(index, index$ind1) data1<-split(data, data$x1) data1$e$x3<-match(data1$e$x2, index1$e$ind2) data1$w$x3<-match(data1$w$x2, index1$w$ind2) it kinda matched way wanted did not return y correctly. part did wrong? thanks. also, there faster/smarter way of doing it? because might have more conditions match with. tried if else statement didn't work. merge(data, index, by.x=c("ind1", "ind2"), by.y=c("x1", "x2"), ...

jquery - add attribute to a <th> without id or class -

i want add attribute table header without id or class. has field. code here not work. appreciate help $(th[field = "item_group_id"]).attr('hidden', 'true'); or there other way can this? heres table <table id="dg" title="jaiko pogi " class="easyui-datagrid" style="width:980px;height:370px;" url="show_biochem.php" toolbar="#toolbar" pagination="true" rownumbers="false" fitcolumns="true" singleselect="true" height="auto";> <thead> <tr> <th field="item_group_id" width="8">id</th> </tr> </thead> </table> solved it. read documentation , turns out there function this. anyway help $('#dg').datagrid('hidecolumn','item_group_id'); your selector incorrect. should string: $('th[field="...