Posts

Showing posts from June, 2013

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="

iphone - ios Calling back viewController from different class -

i have problems calling viewcontroller nsobject class. here code: viewcontroller: -(void)starttest:(nsstring*)testtorun { viewcontroller *viewcontroller = [[[viewcontroller alloc] init] autorelease]; secondclass *secondclass = [[secondclass alloc] init]; secondclass.viewcontroller = viewcontroller; [secondclass dosomething]; } -(void) createview { uiview *newview = [uiview alloc] initwithframe:[self.view bounds]; self.newview.backgroundcolor = [uicolor whitecolor]; [self.view addsubview:newview]; [self.view bringsubviewtofront:newview] } nsobject classe: .h file #import "viewcontroller.h" @class viewcontroller; @interface secondclass : nsobject { viewcontroller *viewcontroller; } @property (nonatomic,retain) viewcontroller *viewcontroller; -(void) dosomething; .m file -(void) dosomething { [viewcontroller createview]; } any of may know i'm doing wrong or how can call view controller nsobject class? yo

php - PhpStorm Command Line Tools using OSX Version -

i have installed php 5.4 via macports opt/local/bin , configured bash profile use version. when try run php command line tools in ide phpstorm in case, ide defaults osx version ie 5.3. have tried setting interpreter in ide 5.4 yet has no effect. guess ide ignores settings in bash profile there else need force ide not use osx installed version of php. thank in advance help..

Python installing setuptools, ez_setup.py error -

i trying install setuptools on windows. documentation says should run ez_setup.py. did , following output: extracting in c:\users\ut601039\appdata\local\temp\tmpf6a2mb working in c:\users\ut601039\appdata\local\temp\tmpf6a2mb\setuptools-1.0 installing setuptools went wrong during installation. see error message above. traceback (most recent call last): file "d:\python\setuptools\ez_setup.py", line 357, in <module> sys.exit(main()) systemexit: 2 the error message isn't informative. looking code found: if not _python_cmd('setup.py', 'install', *install_args): log.warn('something went wrong during installation.') log.warn('see error message above.') # exitcode 2 return 2 i went _python_cmd() , found: def _python_cmd(*args): args = (sys.executable,) + args return subprocess.call(args) == 0 i found subprocess.call(args) returns 1 instead of expected 0.

minimal socket server written in python for openshift -

i create minimal socket server written in python can run openshift account. searched more day, found lots of libraries(tornado, django, twisted, flask, autobahn, gevent) used this, not manage implement me. (actually not know differences between these.) looked lots of tutorials well, found implementation using tornado: import tornado.ioloop import tornado.web import tornado.websocket import tornado.template class mainhandler(tornado.web.requesthandler): def get(self): loader = tornado.template.loader(".") self.write('hello world') class wshandler(tornado.websocket.websockethandler): def open(self): print 'connection opened...' self.write_message("the server says: 'hello'. connection accepted.") def on_message(self, message): self.write_message("the server says: " + message + " @ you") print 'received:', message def on_close(self): print 'connection closed...' ap

c# - Best data structure for caching objects with a composite unique id -

i have slow function makes expensive trip server retrieve recordhdr objects. these objects sorted rid first , aid. returned in batches of 5. | rid | aid | --------------> | 1 | 1 | > | 1 | 3 | > | 1 | 5 | > batch of 5 returned | 1 | 6 | > | 2 | 2 | > --------------> | 2 | 3 | | 2 | 4 | | 3 | 1 | | 3 | 2 | | 3 | 5 | | 3 | 6 | | 4 | 1 | | 4 | 2 | | 4 | 5 | | 4 | 6 | after retrieve objects, have wrap them in class called wrappedrecordhdr. i'm wondering best data structure can use maintain cache of wrappedrecordhdr objects such if i'm asked object rid , aid, return particular object it. if i'm asked rid, should return objects have rid. so far have created 2 structures each scenario (this may not best way, it's i'm using now): // key: (rid, aid) private cachemap<int, int, wrappedrecordhd

unix - How to tail all the log files inside a folder and subfolders? -

in linux, using command tailf , how can tail several log files inside folder , in subfolders? to log files inside folder, can go folder , write tailf *.log to add subfolders tailf command, use tailf **/*.log instead of tailf can use tail -f . of course, regular expression can improved match specific file names.

c# - I need to add a custom form size to the local Print Server through code -

Image
i need add custom form size local print server through code. in bat file or in c# , or possibly in else can run when running installshield installer. to better explain, manually, open devices , printers , click on printer. click print server properties. form below open, , can view/add/delete forms. add new 1 here through code (then select new paper size in printers advanced options). this code project article explains how it, , presumably has helper classes , methods. sample code below: var forminfo = new forminfo1(); forminfo.flags = 0; forminfo.pname = papername; // sizes in 1000ths of millimeters forminfo.size.width = (int)(widthmm * 1000.0); forminfo.size.height = (int)(heightmm * 1000.0); forminfo.imageablearea.left = 0; forminfo.imageablearea.right = forminfo.size.width; forminfo.imageablearea.top = 0; forminfo.imageablearea.bottom = forminfo.size.height; // add paper size printer's list of available paper sizes: bool bformadded = addform(hprinter, 1,

android - how to correct this error: java.lang.OutOfMemoryError -

this code: public void onpicturetaken(byte[] data, camera camera) { bitmap foto = bitmapfactory.decodebytearray(data, 0, data.length); wid = foto.getwidth(); hgt = foto.getheight(); bitmap newimage = bitmap.createbitmap(wid, hgt, bitmap.config.argb_4444); canvas canvas = new canvas(newimage); canvas.drawbitmap(foto, 0f, 0f, null); if (newimage.getwidth() > newimage.getheight()) { matrix matrix = new matrix(); matrix.postrotate(90); newimage.createbitmap(newimage, 0, 0, wid, hgt, matrix, true); } } this error: fatal exception: main java.lang.outofmemoryerror @ android.graphics.bitmap.nativecreate(native method) @ android.graphics.bitmap.createbitmap(bitmap.java:689) @ android.graphics.bitmap.createbitmap(bitmap.java:666) @ android.graphics.bitmap.createbitmap(bitmap.java:633) @ com.supratecnologia.activity.camera_activity.onpicturetaken(camera_activity.java:189) @ android.hardware.camera$eventhandler.handlemessage(ca

ruby on rails - Textacular Fuzzy Search -

i trying implement the textacular gem in rails 4 app. basic , advanced search work fine, when try implement fuzzy search, encounter trouble. installation instructions repository: finally, #fuzzy_search method lets use postgres's trigram search funcionality. in order use this, you'll need make sure database has pg_trgm module installed. on development machine, can require textacular/tasks , run rake textacular:install_trigram depending on production environment, might able use rake task, or might have manually run command. postgres 9.1 , above, you'll want run create extension pg_trgm; what i've tried i tried running rake textacular:install_trigram , bundle exec rake textacular:install_trigram in root directory of app , message: /usr/local/cellar/postgresql/9.2.4/share/postgresql/extension/pg_trgm.control rake aborted! pg::insufficientprivilege: error: permission denied create extension "pg_trgm" hint:

c# - Determining which flags are missing from enum -

lets have enum below: [flags] public enum notifytype { none = 0, window = 1 << 0, sound = 1 << 1, flash = 1 << 2, mobilesound = 1 << 3, mobilepush = 1 << 4 } considering 2 enums: var myenums = window | sound | flash; //var possibleupdate = window | mobilepush; void updatemyenums(notifytype possibleupdate) { //does myenums contain flags in 'possibleupdate'? if not add //the missing flags myenums } how possible determine myenums variable not contain notifytype.mobilepush value in comparison possibleupdate ? have test each flag in possibleupdate against myenums ? i using c# on .net 4.0 there no need figure out 1 missing, need bit-wise or between myenums , possibleupdate , assign value back. //does myenums contain flags in 'possibleupdate'? if (myenums & possibleupdate != possibleupdate) //if not add missing flags myenums myenums = myenums | possibleupdate;

xcode - Should I being using one project with multiple targets? -

i building several different video poker apps. 1 app jacks or better version of video poker. others include deuces wild, royal aces, 10's or better, etc. i've built royal aces version , want make 10's or better version. should using royal aces project , setting different targets other poker versions? since reusing 95% of of code, want simple way of doing this. if should using different target each type of video poker app, i'm assuming each target can have it's own: bundle id, app name, etc. way can archive each video poker target separately , upload each separate binary. am correctly understanding how can use different targets? correct way , efficient way of accomplishing task? first note apple tend frown on having many versions of appears same app, , may start rejecting apps after awhile (which can frustrating once you've started down route). may have smoother sailing if bundle game differences data (rather code), , sell them in-app pu

javascript - Can I host my front end in one hosting service and the backend somewhere else? -

i have website hosted in justhost.com. far html/css/js done scratch. have been learning server side java script (ssjs) using nodejs , add js backend processing site. problem justhost.com not seem support nodejs applications, kind of stuck. is there way keep front end of site (html, css , front end js) hosted in justhost.com , build backend in nodejs ssjs , keep part hosted in service or server , somehow make work together? right not not commercial application, can play around , break things, open suggestion. thanks in advance. the complete answer "probably, it's complicated" due restrictions built web cross-origin isolation hosting provider restrictions. however, since asking this, suggestion host entire application (server side code, html, css, browser js, images, etc) on node.js hosting service since support , it's trivial do. no reason complicate architecture stick static web host. takes handful of lines of "code" in node app have funct

supercollider - How do I add a random offset to values in a Pseq? -

given pseq similar following: pseq([1, 2, 3, 4, 5, 6, 7, 8], inf) how randomise values each time? is, not randomly alter 8 values once @ initialisation time, have random offset added each time value sent stream? here's neat way: (pseq([1, 2, 3, 4, 5, 6, 7, 8], inf) + pgauss(0, 0.1)) first need know pgauss pattern generates gaussian random numbers. can use other kind of pattern such pwhite . then need know pleasant bit: performing basic math operations on patterns (as above) composes patterns (by wrapping them in pbinop ).

ajax - iOS Android login form -

i want make hybrid app ios , android wrapping mvc4 mobile website webview/uiwebview. want login screen native view. how can submit username , password mvc4 controller can check them in database , after authenticating redirect user on page? notice have implemented login form on mvc web site also. should use ajax call mobile app? can provide code example/tutorial/video? that might problem because mvc going make session cookies tokens in it. if logged in using kind of ajax call or setting headers , data , posting login process still need make sure tokens , cookies set. , useable webviews. i not saying can't done might difficult.

c++ - 'cout' was not declared in this scope error -

i'm trying read in lines file using getline, display each line. however, there no output. input file lorem ipsum dummy text, new lines @ every sentence. here code: #include <vector> #include <string> #include <fstream> #include <iostream> using namespace std; int main() { string line; vector<string> thetext; int = 0; ifstream infile("input.txt"); if(!infile) cout << "error: invalid/missing input file." << endl; else { while(getline(infile, line)) { thetext[i] = line; thetext[i+1] = ""; += 2; } //cout << thetext[0] << endl; (auto = thetext.begin(); != thetext.end() && !it->empty(); ++it) cout << *it << endl; } return (0); } vector<string> thetext; ... while(getline(infile, line)) { thetext[i] = line; thetext[i+1] = ""

java - Comparators sorting -

i'm not comparators need learn it, i've done far keep getting error @ 'system.out.println(compy("january", "march", "october", "april"));'... please help, explanation fix. thank you! import java.util.collections; import java.util.comparator; import java.util.list; public class months { public static void main (string args[]){ system.out.println(comp("january","may")); system.out.println(comp("october", "may")); system.out.println(comp("august","august")); system.out.println(comp("january", "march")); system.out.println(compy("january", "march", "october", "april")); } static int comp(string s1, string s2){ while (true){ int r = 0; int s = 0; if(s1.equals("january")){ r=1;

angularjs - UI Bootstrap tabset content size larger than the menu -

<div id="menu-large" class="span12 hidden-phone"> <tabset class="span8"> <tab heading="home"> @rendersection("featured", false) </tab> <tab heading="contact"> @renderpage("~/views/home/contact.cshtml") </tab> </tabset> </div> above code menu trying create using ui bootstrap, angluarjs, asp.net mvc4. my issue want menu span8 long.. content within span12 long. is there anyway can that? ok, know late solved putting layering tabset inside div class row <div class="row">

android - Getview parameter "convertview" not null on new "position" parameter -

i'm using arrayadapter list of own type of objects (only 1 type) , give user option create more items (thus creating more views items). @ point, getview sent new "position" index non-null "convertview". shows first view in last position. after that, when scrolling views mixed up. i'm assuming means manipulated views in ways shouldn't have don't see where. here code: @override public view getview(int position, view convertview, viewgroup parent) { view v; previewitemholder holder = null; // initialize view if convertview null if (convertview == null) { v = newview(parent, position); } // populate saved holder else { // use previous item if not null v = convertview; } // populate if holder null (newly inflated view) or // if current view's holder's flag true , requires populating if ((holder == null) || (holder.readpopulateflag())) { bindview(position, v);

dropwizard: incorrect json resulting from group of items -

i using dropwizard deliver restful service. json expect looks this: {"featuredmerchants": {"featuredmerchant":[ {"browseid":"v1_0_0_1112", "merchantid":3902, "priority":1, "sourceid":"15"}, ..., {"browseid":"v1_0_0_1112", "merchantid":456, "priority":4, "sourceid":"15"}]}} but json getting this: {"featuredmerchant":[ {"browseid":"v1_0_0_1112", "merchantid":3902, "priority":1, "sourceid":"15"}, ..., {"browseid":"v1_0_0_1112", "merchantid":456, "priority":4, "sourceid":"15"}]} i have 2 classes. have apifeaturedmerchantgroup class contains list of apifea

python - Replace DataFrame column index with MultiIndex -

this question has answer here: convert dataframe columns multiindex 1 answer i have pandas dataframe "flat" column index, ['sample 1', 'sample 2' ...], , i've constructed multiindex has 2 levels, first of having same elements dataframe's column index ('sample 1' ...). want replace column index of dataframe multiindex, each of elements of multiindex replacing column index element has matching name. so, column headed 'sample 1' should headed ('sample 1', 'group x'), column heading 'sample 2' should ('sample 2', 'group x'), , forth. for example, dataframe might like: b c row1 1 2 3 row2 4 5 6 : rown 7 8 9 and multiindex [('a', 'g1'), ('b', 'g1'), ('c', 'g2')] with end result l

html - Not able to change div display property using javascript -

i trying change display property of div using js not showing change. in js code if statements not becoming true though in css properties set properly. please novice , not understanding issue. below code trying my html code: <!doctype html> <html> <head> <script src="main.js" type="text/javascript"></script> </head> <body> <nav id="nav"> <ul class="main_nav"> <li id="about_me"><a href="#" onclick="about_me_sel()">about me</a></li> <li id="home1"><a href="#" onclick="home_sel()">home</a></li> </ul> </nav> <div id="about"> <p>hello</p> </div> <div id="home"> <p>hi</p> </div> </body> my js code: function about_me_sel() { var id; id =document.getelementbyid("about&qu

version control - How to stop TFS from checking out after a get latest -

i have issue if 'get latest' on file in tfs straight away prompts check out of file. greys out cancel button. not sure why getting latest version should make file automatically checked out since thought idea check out file if wish edit , check in again - not because have downloaded latest version.

php - stream_copy_to_stream() always returns 0 -

i'm using fine-uploader php , wrong happened. when use stream_copy_to_stream() in backend, returns 0. here's code in backend: private function upload_file($file_name, $tmp_name) { $result = array( 'is_successful' => true, 'extra_message' => '' ); $target_path = $this->get_target_file_path($file_name, $tmp_name); move_uploaded_file($tmp_name, $target_path); $result['is_successful'] = $this->handle_upload_request($target_path); if ( $result['is_successful'] ) { $result['extra_message'] = $target_path; } else { $result['extra_message'] = 'unknown error occured.<br />'; } return $result; } private function handle_upload_request($path) { $input = fopen("php://input", "r"); $temp = tmpfile(); $real_size = stream_copy_to_stream($input, $temp); fclose($input); echo $real_siz

mule - Is it safe to rely on session variables to store information to be shared between multiple asynchronous flows? -

i have couple of flows rely on session variables generated in 1 flow , passed other. safe rely on session variables used 2 asynchronous flows? guess don't understand scope of 'sessionvars' in mule application or in given mule message. the mule session has nothing java ee session shared across threads. mule session part of mulemessage , how works explained here , therefor if want share across multiple flows processing same message way go. if instead looking way store value flow processing message a , pick value flow processing message b should consider store value objectstore

r - Changing whisker definition in geom_boxplot -

i'm trying use ggplot2 / geom_boxplot produce boxplot whiskers defined 5 , 95th percentile instead of 0.25 - 1.5 iqr / 0.75 + iqr , outliers new whiskers plotted usual. can see geom_boxplot aesthetics include ymax / ymin, it's not clear me how put values in here. seems like: stat_quantile(quantiles = c(0.05, 0.25, 0.5, 0.75, 0.95)) should able help, don't know how relate results of stat set appropriate geom_boxplot() aesthetics: geom_boxplot(aes(ymin, lower, middle, upper, ymax)) i've seen other posts people mention building boxplot-like object manually, i'd rather keep whole boxplot gestalt intact, revising meaning of 2 of variables being drawn. geom_boxplot stat_summary can it: # define summary function f <- function(x) { r <- quantile(x, probs = c(0.05, 0.25, 0.5, 0.75, 0.95)) names(r) <- c("ymin", "lower", "middle", "upper", "ymax") r } # sample data d <- data.frame(x=g

python - Remove some words replace some other words from a txt file -

i have txt file (mytext.txt) containing many lines of text. i know : how create list of word needs deleted (i want set words myself) how create list of word needs replaced for instance if mytext.txt is: ancient romans influenced countries , civilizations in following centuries. language, latin, became basis many other european languages. stayed in roma 3 month. i remove "the" "and" "in" replace "ancient" "old" i replace "month" , "centuries" "years" you use regex: import re st='''\ ancient romans influenced countries , civilizations in following centuries. language, latin, became basis many other european languages. stayed in roma 3 month.''' deletions=('and','in','the') repl={"ancient": "old", "month":"years", "centuries":"years"} tgt='|'.join(r

linux - Trouble in Setting Java Environment Path on Ubuntu (libjvm.so: cannot open shared object file: No such file or directory) -

found solution! ubuntu default ignore command "rd_library_path" therefore need add codes in ".bashrc" instead of "/etc/environment" or .profile. it work fine! i trying run program reads java method c/c++ code. (i made on windows successfully, now, working on linux) i made compiled , run on ubuntu, however, problem is.. whenever try run program, have type following commands on terminal.. source /etc/environment ./invoke #program name invoke if not type "source /etc/environment" every time boot pc, error message is... error while loading shared libraries: libjvm.so: cannot open shared object file: no such file or directory ok. here added in /etc/environment export path="$path:/usr/lib/jvm/jdk1.7.0_25_x64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" export java_home=/usr/lib/jvm/jdk1.7.0_25_x64 export ld_library_path=$java_home/jre/lib/amd64:$java_home/jre/lib/amd64/server what want

reporting services - Adding Time Stamp Values in SSRS reports -

i trying create ssrs report , facing problem in calculation. i have few columns contains values 101.45, 25, 0.15, 3.30. actually these values time values, adding these leads result 129.9. now problem when decimal part exceeds .60 need add 1 number, final result need 130.30. can 1 please me solving problem. thanking in advance. you cannot add values directly. need first convert values scale of 100. add , convert scale of 60. select sum(floor(column1)+(column1%1)*100/60) timeadd http://sqlfiddle.com/#!3/b5d55/8 for doing in ssrs = (int(reportitems!textbox1.value) + (reportitems!textbox1.value mod 1)*100/60) + (int(reportitems!textbox2.value) + (reportitems!textbox2.value mod 1)*100/60) + (int(reportitems!textbox3.value) + (reportitems!textbox3.value mod 1)*100/60) + (int(reportitems!textbox4.value) + (reportitems!textbox4.value mod 1)*100/60) but above give 130.5 want 130.3. need convert above sum scale of 60. either can store in variable , apply scaling

iphone - Missing Screenshot Status in itunes connect -

Image
this question has answer here: ios app missing screenshot 5 answers i developing application in rhomobile , made build ios .ipa file , after uploading binary file through application loader itunes connect error status missing screenshots have attached . have added 2 screen shots in 3.5 , 4 inch display 3.5 image sizes 320*480 , 4 inch screenshots of size 640*960 .i have not added screenshots ipad app iphone .do need add ipad screenshots. have deleted launch image nameddefault-568h@2x.png . things note. if application universal , need upload screenshot devices if application iphone , need upload screenshot iphone4, , iphone 5 devices. same if ipad . if app supports multiple languages need select language see below hope helps.

C# Removing a timer after adding it with Timer.Elapsed -

i have little problem here. i'm starting 1 timer @ start of application using this: if (initialized == 0) { errorchecktimer.elapsed += (sender, e) => onerrorchecktimerelapsed(sender, e); initialized = 1; } it makes sure it's started 1 time. if execute line more once, timer fire multiple times , once. now after initializing timer, occassionally run using: errorchecktimer.interval = errortimerinterval; errorchecktimer.enabled = true; errorchecktimer.start(); and after actions happen, stop with: tradeerrortimer.enabled = false; tradeerrortimer.stop(); but there obscure glitch happening. timer works when firstly initialized, not turn on @ all, , onerrorchecktimerelapsed not executed. therefore make more reilable, can remove timer has been added onerrorchecktimerelapsed.elapsed initialize new 1 every time need start it? if try initialize them multiple times, onerrorchecktimerelapsed firing multiple times @ once. thank you. if don't wan

verilog - How can I set a full variable constant? -

when number size variable , must set parameter, how can set maximum number? in following, result must "ffff", simulator returns "f". fix problem? `define size 10 module tb1; reg [15:0] a; initial begin = `size'hf; $display("a=%h",a); end endmodule you can use replication operator construct bit vectors. {a{b}} produces vector a copies of vector b . in case be: = {`size{1'b1}};

javascript - How to get the radio button value from php -

i want radio button value in php.the thing having drop down in 1 page, when select value dropdown, sends value ajax , php , php page generating radio button. now want radio button value. how can it? code index.php <script> function showuser(str) { if(str=="") { document.getelementbyid("txthint").innerhtml=""; return; } if(window.xmlhttprequest) { xmlhttp=new xmlhttprequest(); } else { xmlhttp=new activexobject("microsoft.xmlhttp"); } xmlhttp.onreadystatechange = function() { if(xmlhttp.readystate==4 && xmlhttp.status==200) { document.getelementbyid("txthint").innerhtml=xmlhttp

android - Flag for preferenceactivity -

i'm having problem managing activities in history stack. background: i've 2 activities: main , preference. i've broadcast receiver starts notification @ boot. notification starts main activity. flags are: intent.flag_activity_clear_top|intent.flag_activity_single_top intent , notification notification.flag_auto_cancel. (in tutorial, broadcast receiver started service started notification. i'm starting notification directly on broadcastreceiver. it's working fine me heads up.) the intent starting preference activity has no flags set. problem start main activity launcher , open preference activity. while in preference activity click notification launches main activity again. open preference activity again. press home , launch application opens main activity. now if click instead of exiting app preference activity(the 1 opened earlier) , moves me main activity(the 1 opened earlier). in last app had used activitymode="singleinstance" rid

winforms - C# drag controls around a panel -

i developing system allow user drag objects around within same panel, went through research , founds should use mouse events mouse_up, mouse_down , mouse_move. the program generate 3 picturebox , allow user drag around every picturebox within panel, program code did not work when drag on picturebox, picturebox move, not according mouse cursor location, somewhere else, besides, when dragging, there picturebox shadows in panel, i've tried update(),refresh(), , invalidate() seems not useful me. below codes, helping public partial class form1 : form { list<picturebox> pictureboxlist = new list<picturebox>(); private bool isdragging = false; public form1() { initializecomponent(); (int = 0; < 3; i++) { picturebox picture = new picturebox { name = "picturebox" + i, size = new size(20, 20), location = new point(i * 40, * 40), b

extjs - combo box field in sencha touch -

combobox field hi guys, i started using sencha touch , unable find combobox field. there seems blogs on ext.form.combobox component not available in library or docs. closest got ext.form.select there no property allow typing text. was combobox removed in 1.1? appreciate pointers. thanks i guess searching component that, isn't it? http://docs.sencha.com/touch/2.2.0/#!/api/ext.field.select

PHP: http GET/POST in a truly async fashion -

basically, i'm looking way following in php: http_get_or_post('an.url', 'or.two'); // work here, not worrying http going on in background. $r = wait_for_and_get_the_results_of_the_http_requests() and maybe more curl experience can confirm curl_multi i'm looking for. from gather http://php.net/manual/en/function.curl-multi-init.php , sample there might give me need: $ch1 = curl_init(); curl_setopt($ch1, curlopt_url, "http://www.php.net/"); curl_setopt($ch1, curlopt_header, 0); $mh = curl_multi_init(); curl_multi_add_handle($mh,$ch1); $active = null; { $mrc = curl_multi_exec($mh, $active); } while ($mrc == curlm_call_multi_perform); // now, free time consuming work here , not worry // calling curl_multi_exec every , facilitate background // http / socket processes? while ($active && $mrc == curlm_ok) { if (curl_multi_select($mh) != -1) { { $mrc = curl_multi_exec($mh, $active); } while ($mrc ==

android - Download takes just too much time -

i'm trying download file in app, download times inconsistently long. downloading in normal time, stuck 30 seconds or more until fail due time out error. why be? private void download(string url, string destfilename) throws ioexception{ //todo remove // file file = new file(destfilename); // if(file.exists()) // return; if(buildconfig.debug) log.d("downloadfile", "downloading url: " + url + ", dest: " + destfilename); httpget httppost = null; androidhttpclient client = androidhttpclient.newinstance("tvinciandroid"); fileoutputstream fos = new fileoutputstream(destfilename); try { httppost = new httpget(url); httpresponse res = client.execute(httppost); if (res.getstatusline().getstatuscode() != httpstatus.sc_ok) { header[] headers = res.getheaders("location"); if(headers

php - How Insert two table -

i write code this: $password = md5($password); mysql_query("insert `users` (username,password,email,pnum,hintque,hintans) values('$username','$password','$email','$cnum','$hintque','$hintans')"); mysql_query("insert `personal` (userid,fname,lname,address,dob,country,state,city,poscode) values(last_insert_id(),'$fname','$lname','$address','$dob','$country','$state','$city'.'$zip')"); header("location: ../register.php?feedback=registration complete. may login"); but first sql success insert data. second 1 fail. want both query triggered on same time. the second query fails because have syntax error (see last value, . should , ): mysql_query("insert `personal` (userid,fname,lname,address,dob,country,state,city,poscode) values(last_insert_id(),'$fname','$lname','$address

html - Contact page is not loading -

i have uploaded files using filezilla contact page not displaying. works fine in local server. can't figure out what's problem. please check site here: infinityadv.com.np edit: <div id="menubar1"> <ul> <li><a href="#">home</a> </li> <li class="wh"><a href="#">who are</a> </li> <li class="wh"><a href="#">what do</a> </li> <li><a href="#">portfolio</a> </li> <li><a href="#">clients</a> </li> <li><a href="#">contact</a> </li> </ul> </div> when first click @ link opens second time won't work. ul { margin: 0 auto 0 auto; list-style-type:none; margin-left:160px; padding:0; text-decoration:n

javascript - How to get selected radio button value onclick from php -

i want selected radio button's value in php. code: update.php <html> <head> <link rel="stylesheet" href="css/common.css" type="text/css"> <link rel="stylesheet" type="text/css" href="css/page.css"> <link href="css/loginmodule.css" rel="stylesheet" type="text/css" /> <script> function showuser(str) { if (str == "") { document.getelementbyid("txthint").innerhtml = ""; return; } if (window.xmlhttprequest) { xmlhttp = new xmlhttprequest(); } else { xmlhttp = new activexobject("microsoft.xmlhttp"); } xmlhttp.onreadystatechange = function () { if (xmlhttp.readystate == 4 &am