Posts

Showing posts from July, 2012

textwatcher - number doesn't show in editText field when entered (Android 2.2) -

textwatcher - number doesn't show in editText field when entered (Android 2.2) - i have 2 edittext fields, next textwatchers in own addtextchangedlisteners. input read , handled correctly number come in not shown on display in sec field (edittext2) (even though wait (sleep() in aftertextchanged()) while before proceeding setting values of both fields null end setting focus first field. what happens on entering number in first field: number diplayed in field , focus moved sec field. happens on entering number in sec field: cursor (blinking vertical line) frozen, no number shown, after 2 seconds: cursor moved first field , both fields empty. of meant happen except number entered in sec field should show , scheme should frozen showing number while before setting null , moving on first field. what wrong , how solve? public class spel extends fragmentactivity { @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); se...

jquery - Dynamically generated Javascript returned via AJAX in JSON format will not execute when appended -

jquery - Dynamically generated Javascript returned via AJAX in JSON format will not execute when appended - i have webpage makes ajax request php script. php script responds valid json object, , sets content-type header application/json . the json format follows (as reported console.log(json.stringify(data)) data json response): { "content": "<script type=\"text/javascript\">console.log(\"test\");</script>" } i create div class of "content" (remember data ajax responsetext json object): var content = document.createelement("div"); content.setattribute("class", "content"); content.innerhtml = data.content; finally, append content div existing div on site. existingdiv.appendchild(content); i examine source in elements tab of google chrome's developer tools because job of showing actual dom node, , text. script block shows dom node. unfortunately, script not ...

EXCEL; changing cells after another cell is updated on protected worksheet -

EXCEL; changing cells after another cell is updated on protected worksheet - edit: works if utilize activesheet.unprotect instead ok if worksheet unprotected, next works fine! private sub worksheet_change(byval target range) on error goto reset_enableevents application.enableevents = false if not intersect(target, range("d6:g6")) nil 'do next if d6 updated range("d7").interior.colorindex = 15 if range("d6") = "no" range("d7").interior.colorindex = 38 end if end if if not intersect(target, range("d7:g7")) nil 'do next if d6 updated if range("d7") <> "" range("d7").interior.colorindex = 15 end if end if if not intersect(target, range("e12:f12")) nil 'do next if e12:f12 updated range("d28").value = range("e12").value 'set d28 date entered in e12 range("c23").interior.colorinde...

coffeescript how to set binding" to a child class in a callback function defined in parent class -

coffeescript how to set binding" to a child class in a callback function defined in parent class - i'd changing binding of callback function in kid class next code indicates 20, rather 10: class @in = 10 @b: => alert(@in) class b extends @in = 20 @w: -> window.settimeout(@b,500) b.w() if 'thin-arrow' definition of a.b, binding timeout calling function @in undefined. when fat-arrow it, binds parent class a. bind kid class b, without redefining method in kid class. thanks i think best can forcefulness appropriate binding manually when set settimeout call. drop => when defining @b in a : class #... @b: -> alert(@in) and set binding in b when phone call settimeout : class b extends #... @w: -> f = => @b() window.settimeout(f, 500) i think that's close can using coffeescript's pseudo-class-methods. demo: http://jsfiddle.net/ambiguous/y6s8d/ coffeescript

c# - Which TinyMCE should i download from NuGet? -

c# - Which TinyMCE should i download from NuGet? - i looking integrate wysiwyg editor mvc application. considering tinymce there many packages on nuget, confused bundle right me. does have suggestions? i found post explained need , more. if else needs help on how integrate mvc tinymce read tugberk's blogpost c# jquery asp.net-mvc-4 tinymce

c# - LINQ saying invalid arguments for insertonsubmit -

c# - LINQ saying invalid arguments for insertonsubmit - i seem running issue inserting info table in sql server 08r2 using linq in c#. no matter i've tried maintain getting error insertonsubmit() . here code... private void testupdateunitbc() { using (unitdatacontext unit = new unitdatacontext()) { unitnotest unitbc = new unitnotest(); unit.fbarco = "1234"; unit.funitno = "1234"; unit.fjobno = "i9999-0000"; unit.fboxno = "999"; unit.fopno = "999"; unit.unitbcs.insertonsubmit(unitbc); <--this error }; the error reads void table.insertonsubmit(unitbc entity) adds entity in pending insert state system.data.linq.table. error: best overloaded method match 'system.data.linq.table.insertonsubmit(as5553.unitbc)' has invalid arguments the container used hold variables ma...

java - Trigger VideoView onCompletion event on error -

java - Trigger VideoView onCompletion event on error - i'm creating list of videos played within videoview . i want grab "sorry, video can't played" error , move on next video. video-switching handled within oncompletionlistener . i got code onerrorlistener here can't find how trigger "video complete" event. any ideas? you can same in onerrorlistener in oncompletionlistener in oncompletion set video next 1 (somehow, dont konw implementation) in on error utilize same code (refactored function likely). eg: onerror(....) if(error = watever error need) functionnextvideo() note above pseudo code. but other oncompletionlistener not triggered unless video completes supposed to. java android listener android-mediaplayer android-video-player

php - Facebook publish_stream code ends up in a loop -

php - Facebook publish_stream code ends up in a loop - i have next code works fine long in previous part of application, user accepts applications request publish_stream . # facebook library require_once("/var/www/facebook-php-sdk-master/src/facebook.php"); # create facebook object $config = array(); $config['appid'] = 'appid_here'; $config['secret'] = 'secret_here'; $config['fileupload'] = false; // optional $facebook = new facebook($config); $user_id = $facebook->getuser(); if ($user_id) { seek { $user_profile = $facebook->api('/me','get'); #check permissions $api_call = array( 'method' => 'users.hasapppermission', 'uid' => $user_id, 'ext_perm' => 'publish_stream' ); #set true if true... $can_offline = $facebook -> api( $api_call ); #is...

sitecore6 - Schema for the XML in a Sitecore package -

sitecore6 - Schema for the <project> XML in a Sitecore package - does have schema relates xml document appears in installer folder of sitecore bundle file? especially interested in format of project/sources/xitems/entries/x-item element. that xml file seems representation of sitecore.install.packageproject class, tried generate xsd code using serialization on class. however, if utilize decompile take @ how bundle building , installation works, you'll find out sitecore has written own serializer this. wasn't able generate right xsd .net serializer. with decompiler (i utilize dotpeek, freeware) can track downwards lot of info xml file , how it's beingness used sitecore, don´t see (realistic) way extract schema this. if you're going it, within sitecore.kernel.dll , sitecore.install namespace. have tried asking sitecore support? if has schema, it's them. sitecore sitecore6

arguments - Specifying custom type for an attribute of a UML class -

arguments - Specifying custom type for an attribute of a UML class - i have class attribute called interval , give attribute minimum , maximum value bound interval, how can represent this? possible? create value type - classifier «data type» stereotype - compound type, utilize type of attribute. for example, says classa has public attribute called interval of type interval, , interval value type has public min , max attributes of type double: +----------------+ +-----------------------+ | «data type» | | classa | | interval | +-----------------------+ +----------------+ | + interval : interval | | + min : double | +-----------------------+ | + max : double | +----------------+ as interval value type, identity not important, held value in classa , implemented struct (if target language supports values , structs; can't have value type in jav...

wpf - How manage columns visibility in DataGrid placed in popup part of combobox -

wpf - How manage columns visibility in DataGrid placed in popup part of combobox - i have radio button , combo box on wpf page. combobox customized version of normal combobox can show multiple columns in dropdown. want display or hide column depending upon ischecked state of radio button. i'm trying utilize datatrigger avoid code behind. <radiobutton content="show id column" x:name="chkscrollcustomernumber" ischecked="true" > <m:multicolumncombobox x:name="cbocustomer" issynchronizedwithcurrentitem="true" itemssource="{binding allcustomers}" selectedvaluepath="customerid" displaymemberpath="customerid" selectedvalue="{binding salesorder.customerid}"> <datagridtextcolumn x:name="colid" binding="{binding customerid, mode=default}" /> <datagridtextcolumn binding="{binding customername, mode=default}" /> ...

Browser Plugin Testing With Selenium -

Browser Plugin Testing With Selenium - i writing webapp has browser plugin component both firefox , chrome. current testing scheme uses series of selenium tests created through selenium ide. is possible have selenium install, activate, , delete browser plugins firefox , chrome (possibly other browsers well)? i think biggest concern installing/enabling browser plugin requires browser restart, , i'm not sure if through selenium off. the acquisition of plugin handled visiting internal site-link php-script detects browser. the reply yes, selenium 2 supports (remote) installation of browser extensions. the chrome , firefox webdriver back upwards installation of extensions, remotely. here's sample code chrome , firefox: chrome class="lang-java prettyprint-override"> file file = new file("extension.crx"); // zip files accepted chromeoptions options = new chromeoptions(); options.addextensions(file); // alternative 1: locally. web...

c# - FTP over SSL issue -

c# - FTP over SSL issue - i'm having issue uploading file ftp site on ssl specific directory. i'm using system.net.ftpwebrequest class purpose. upload going through fine. file dropped home directory. thought might doing wrong? appreciate help. public bool uploadfile(string srcfilepath, string destfilepath = null) { if (string.isnullorwhitespace(srcfilepath)) throw new argumentnullexception("source filepath."); if (string.isnullorwhitespace(destfilepath)) destfilepath = path.getfilename(srcfilepath); uri serveruri = geturi(destfilepath); //// serveruri should start ftp:// scheme. if (serveruri.scheme != uri.urischemeftp) homecoming false; // object used communicate server. ftpwebrequest request = createftprequest(serveruri, webrequestmethods.ftp.uploadfile); // read file byte array streamreader sourcestream = new streamreader(srcfilepath)...

Hadoop: Format aborted in /mnt/hdfs/1/namenode -

Hadoop: Format aborted in /mnt/hdfs/1/namenode - i've created few ebs filesystems on ec2 utilize hadoop. i've set jave_home in hadoop environment. when go format first volume aborts next message [root@hadoop-node01 conf]# sudo -u hdfs hadoop namenode -format 13/02/06 15:33:22 info namenode.namenode: startup_msg: /************************************************************ startup_msg: starting namenode startup_msg: host = hadoop-node01.mydomain.com/10.xx.xx.201 startup_msg: args = [-format] startup_msg: version = 0.20.2-cdh3u5 startup_msg: build = file:///data/1/tmp/topdir/build/hadoop-0.20.2-cdh3u5 -r 30233064aaf5f2492bc687d61d72956876102109; compiled 'root' on fri oct 5 18:45:46 pdt 2012 ************************************************************/ re-format filesystem in /mnt/hdfs/1/namenode ? (y or n) y format aborted in /mnt/hdfs/1/namenode 13/02/06 15:33:27 info namenode.namenode: shutdown_msg: /************************************************...

sql server 2008 - Need Single Row Result using openrowset -

sql server 2008 - Need Single Row Result using openrowset - i have xml having images tag , within there 12 url tag. i have write query fetch result xml. hotel.xml file : <images> <url></url> <url></url> <url></url> <url></url> <url></url> <url></url> <url></url> <url></url> <url></url> <url></url> <url></url> <url></url> </images> here code : create table #workingtable ( info xml ) insert #workingtable select * openrowset(bulk 'd:\hotels.xml', single_blob) info declare @xml xml , @hdoc int select @xml = info #workingtable exec sp_xml_preparedocument @hdoc output, @xml declare @tmp varchar(max) set @tmp = '' select pref.value('(hotel_ref/text())[1]','varchar(400)')as hotel_ref, sref.value('(text())[1]', ...

explorer - Change IE homepage - overwrite group policy script -

explorer - Change IE homepage - overwrite group policy script - i'm in @ workplace cant alter grouping policy settings. i want pc run script every time boots up, overwriting ie homepage set our grouping policy. directed companys' homepage takes long load, plus not useful me. reg add together "hkcu\software\microsoft\internet explorer\main" /v "start page" /d "http://www.google.com.au" /f this needs run @ every boot gp overwrite registry key. best way implement each time pc boots? if there alternative script/command, i'll utilize that. cheers group explorer policy

java - Creating database in seperate activity/class is giving errors -

java - Creating database in seperate activity/class is giving errors - please have @ next code form.java form.java main activity, means java file first page. lot of code related creating "list" , menu removed. bundle com.example.esoftcallmanager; import android.os.bundle; import android.app.activity; import android.app.alertdialog; import android.app.alertdialog.builder; import android.content.context; import android.content.dialoginterface; import android.view.layoutinflater; import android.view.menu; import android.view.view; import android.view.viewgroup; import android.widget.adapterview; import android.widget.adapterview.onitemclicklistener; import android.widget.arrayadapter; import android.widget.imageview; import android.widget.listview; import android.widget.textview; public class form extends activity { @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layo...

python - Retrieve all molecules from smiles file -

python - Retrieve all molecules from smiles file - i working on .smiles files. file construction of .smiles file : http://en.wikipedia.org/wiki/chemical_file_format#smiles i want atoms smiles file. means if there single 'c' atom means there 4 'h' atoms connected them. i found while searching there modules in python can parse smiles format not give supported hydrogen atoms. (for illustration : give 'c' , not other 4 'h' atoms connected 'c' atom) how can find atoms including connected 'h' atoms using python. illustration of smiles file needs converted in atoms including connected 'h' atoms: [h]oc([h])([h])[c@@]1([h])c([h])=c([h])[c@@]([h])(n2c([h])nc3c(nc(nc23)n([h])[h])n([h])c2([h])c([h])([h])c2([h])[h])c1([h])[h] thank in advance. see open babel. useful links on open babel site "guides" capabilities using python open babel other tools, includes tool (obprop) see also, this blog (by ...

ios - Using associative references in categories -

ios - Using associative references in categories - although using associative references seems used method false category variables, can't help thinking of hack. i'm wrong. question. so, know apple uses categories many of framework classes, , did way before 3.1 (when associative references added). makes me wonder, doing in different way? associative references used way recommended apple? (any docs sustaining this?) design point of view, adding storage category avoid? associated objects not hack, provided standard functions in "modern" runtime. you right, associated objects not implemented before "modern" runtime, apple had no utilize them. if wished add together variables class, done combination of explicit setter/getter/internal ivar (you'll notice old cocoa classes nssplitview) in main class (because why need utilize associated objects if owned framework?) apple's utilize of categories old way of grouping similar functions toge...

increment of ytics in gnuplot -

increment of ytics in gnuplot - i plotted graph , i'd show ytics function of x. example: plot x^2 , i'd show ytics 0,1,4,9... . there way automatically or have set manually every tic in y-axis? tried set function when defining ytics gnuplot doesn't take it. help you can utilize for loop. of course, here need know x-range in advance: f(x)=x**2 set ytics ( sprintf('%f',f(-10)) f(-10) ) set [i=-9:10] ytics add together ( sprintf('%f',f(i)) f(i) ) plot f(x) gnuplot

asp.net - HTML file maker demo givers error -

asp.net - HTML file maker demo givers error - here code works body can guide me how improve code create improve html file used in cms application please create folder named "images" working generated html file stored @ project folder <%@ page language="c#" autoeventwireup="true" codebehind="htmlmaker.aspx.cs" inherits="html5demo.htmlmaker" validaterequest="false" %> <!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <div> <asp:scriptmanager id="scriptmanager1" runat="server"> </asp:scriptmanager> ...

c# - Grouping and Sum DataTable Rows without Linq -

c# - Grouping and Sum DataTable Rows without Linq - i have datatable this name cost product1 10 product1 12 product2 3 product2 5 product2 7 product3 22 i grouping same named products , sum prices ---> name cost product1 10 product1 12 22 product2 3 product2 5 product2 7 15 product3 22 22 i should't create linq. how can distinguish different value of names , sum them in table. you dictionary key name of product, , value sum of same product prices. var allproducts = context.products.where(.....what products want take db).tolist(); dictionary<string, int32> dictionary = new dictionary<string, int32>(); foreach(var product in allproducts) { int32 value = 0; if(!dictionary.trygetvalue(product.name, out value)) { dictionary.add(product.name, product....

c - First-chance exception: KernelBase.dll -

c - First-chance exception: KernelBase.dll - i'm trying build , run piece of programme vs2012 pro. #include "stdafx.h" int _tmain(int argc, _tchar* argv[]) { startupinfo si; process_information pi; //allocate memory zeromemory(&si, sizeof(si)); si.cb = sizeof(si); zeromemory(&pi, sizeof(pi)); //create kid process if (!createprocess(null, //use command line l"mspaint.exe", //command line null, //don't inherit process handle null, //don't inherit thread handle false, //disable handle inheritance 0, //no creation flags null, //use parent's environment block null, //use parent's existing directory &si, &pi)) { fprintf(stderr, "create process failed"); homecoming -1; } waitforsingleobject(pi.hprocess, infinite)...

php - XMPP and Strophe -

php - XMPP and Strophe - i want connect xmmp via strophe , have configured anything i utilize wamp on scheme run localhost php i have enabled script syntax in openfire admin i have configured apache httpd.conf to # xmpp proxy rule proxyrequests off proxypass /xmpp-httpbind http://127.0.0.1:7070/http-bind/ proxypassreverse /xmpp-httpbind http://127.0.0.1:7070/http-bind also utilize basic javascript file conect server , code goes here var bosh_service = '/xmpp-httpbind' var connection = null; function log(msg) { $('#log').append('<div></div>').append(document.createtextnode(msg)); } function rawinput(data) { log('recv: ' + data); } function rawoutput(data) { log('sent: ' + data); } function onconnect(status) { if (status == strophe.status.connecting) { log('strophe connecting.'); } else if (status == strophe.status.connfail) { log('strophe failed connect.'); $(...

c# - Upper-Bound/Lower-Bound Inferences and fixing -

c# - Upper-Bound/Lower-Bound Inferences and fixing - in c# 4.0 spec 7.5.2.9: a lower-bound inference type u type v made follows: if v 1 of unfixed xi, u added set of lower bounds xi. [...] i've gone on section many times. lacking section reference, definition reads circular reference. so, expect find grammer production or section reference nearby clarify..which not. section ties in fixing suffers similar definition issues. what upper-bound inference vs lower-bound inference ? i'll seek best describe more clearly. worst case, describe differently. the upper/lower inference 1 part of phased approach type inference regard type arguments used particular generic method call. obviously, upper/lower inference won't applied if in first phase if argument (e) explicitly typed. e.g.: given public static t choose<t>(t first, t second) { homecoming (rand.next(2) == 0)? first: second; } i can invoke choose explicit ty...

listview selected item color changed when come back from other activity in android -

listview selected item color changed when come back from other activity in android - how listview selected item color remain changed when come other activity in android? please give me proper solution. here, attached adapter class public class selectedadapter extends arrayadapter { // used maintain selected position in listview private int selectedpos = -1; // init value not-selected private int selitem; public selectedadapter(context context, int textviewresourceid, list objects) { super(context, textviewresourceid, objects); } public void setselectedposition(int pos){ selectedpos = pos; // inform view of alter notifydatasetchanged(); } public int getselectedposition(){ homecoming selectedpos; } @override public view getview(int position, view convertview, viewgroup parent) { view v = convertview; // infl...

javascript - Facebook send message to multiple users -

javascript - Facebook send message to multiple users - i want send message multiple users. don't know did wrong. but can run javascript test console. this code: <html> <body > <div id="fb-root"></div> <script src="http://connect.facebook.net/en_us/all.js"></script> <script> window.fbasyncinit = function() { fb.init({ appid : 'my app id', status : true, // check login status upon init? cookie : true, // set sessions cookies allow server access session? xfbml : true, // parse xfbml tags on page? oauth: true // enable oauth 2.0 }); }; (function(d, debug){ var js, id = 'facebook-jssdk', ref = d.getelementsbytagname('script')[0]; if (d.getelementbyid(id)) {return;} js = d.createelement('script...

database partitioning - On MySQL 5.1, how can I query a specific partition? -

database partitioning - On MySQL 5.1, how can I query a specific partition? - i need run query on partitioned table, , i'd result partition, so: partition result count ----------- ---------- ------ p1 apples 2 p1 oranges 3 p2 apples 10 p2 oranges 15 from official mysql docs online, if had 5.6 or later, we'd able utilize partition clause specify info from, we're stuck @ 5.1.63. there easy way this, regardless of partitioning scheme of table? i don't believe can in mysql 5.1. you can work around though - whatever partition definition can add together same status count. for illustration if range partition on id column , p1 id < 10000, p2 id < 20000 then select result, partition, count(id) ( select result, id, case when id < 10000 p1 when id < 20000 p2 ..... end partition table ) s1 grouping partition, result ...

java - Configure Jedis timeout -

java - Configure Jedis timeout - i'm having problems completing .hgetall, here's i've tried: jedis jedis = new jedis(redis_master_node); jedis.connect(); jedis.configset("timeout", "30"); map<string, string> alreadystored = jedis.hgetall(redistargethash); and here's get: exception in thread "main" redis.clients.jedis.exceptions.jedisconnectionexception: java.net.sockettimeoutexception: read timed out @ redis.clients.jedis.protocol.process(protocol.java:79) @ redis.clients.jedis.protocol.read(protocol.java:131) @ redis.clients.jedis.connection.getbinarymultibulkreply(connection.java:199) @ redis.clients.jedis.jedis.hgetall(jedis.java:851) ok, jedis jedis = new jedis(redis_master_node, 6379, 1800); did it. if want set jedis connection timeout, should using special constructor made that: public jedis(final string host, final int port, final int timeout) what doing s...

mysql strored function - in varchar and return varchar - Error : 1172 -

mysql strored function - in varchar and return varchar - Error : 1172 - hi not figure out went wrong stored function. select batch bach test mfg_code = 'bc-7a1-5' grouping batch; when run script above , able number of rows expected. however not able similar script below:- delimiter $$ drop function if exists `testdata1970_05`.`listbatch` $$ create function `listbatch`(mfgnum varchar(24)) returns varchar(10) begin declare bach varchar(10); select batch bach test mfg_code = mfgnum grouping batch; homecoming bach; end $$ delimiter ; and returns error "error 1172 (42000): result consisted of more 1 row" , here query below select listbatch("bc-7a1-5"); please advise. clement your error message telling more 1 row beingness returned query, , resultset cannot stored in simple variable, variable defined can hold 1 value! mysql

r - How to plot grid plots on a same page? -

r - How to plot grid plots on a same page? - i using bundle ( treemap ) uses grid bundle produce treemap. however, plot several of these treemaps together, add together different color schemes these plots. tmplot function uses grid.newpage function, clears graphics window. have not found way save grid.newpage objects can ggplot2 objects. there way plot several grid.newpage objects same window? ## illustration library(treemap) # load gross national income info data(gni2010) size <- aggregate(gni ~ continent, gni2010, sum) size <- size[with(size, order(gni, decreasing = t)),] cont <- size$continent widths <- c(sum(size[c(1,3,5),]$gni), sum(size$gni) - sum(size[c(1,3,5),]$gni)) heights <- c(sum(size[c(1,2),]$gni), sum(size[c(3,4),]$gni), sum(size[c(5,6),]$gni)) palettes <- c("greens", "blues", "reds", "oranges", "purples", "greys") <- 1 # replaced loop x <- subset(gni2010, conti...

ios - UIScrollView: Pickup Scroll Mid-Swipe -

ios - UIScrollView: Pickup Scroll Mid-Swipe - i'm attempting add together scrollview view , have scroll initiated hits finger downwards on screen. of clicking button makes scrollview appear on top of it... means click, have lift finger, place downwards begin scrolling. is there anyway have scrollview start scrolling though touch downwards has occurred? or pass touch saved button scrollview appears drag? or perchance false start of touch altogether 1 time scrollview starts? ios uiscrollview touchesbegan

vb.net - Datagridview filtering blank -

vb.net - Datagridview filtering blank - i don't know if there's wrong code, every time come in value text box datagridview doesn't filter, meaning goes blank if didn't find anything. can help me right code when insert text textbox, datagridview filters instance lets come in letter "m" textbox, the dgv display's words start m heres code if textbox1.textlength > 0 frmreportmenu.projectbindingsource.filter = string.format_ ("[register number] '&" & textbox1.text) & "&'" else frmreportmenu.projectbindingsource.filter = string.empty end if i cannot find filter data i think wildcard character wrong. seek using * instead of & frmreportmenu.projectbindingsource.filter = string.format_ ("[register number] '*" & textbox1.text & "*'") vb.net forms events gridview

How to cross-compile thrift for ARM -

How to cross-compile thrift for ARM - i tried command configure thrift, ./configure cxx=arm-linux-gnueabi-g++ cc=arm-linux-gnueabi-gcc --prefix=/arms/thrift --host=arm-linux-gnueabi --with-cpp --with-boost=/path-to-boost-for-arm and met next error msg checking boostlib >= 1.40.0... yes checking libevent >= 1.0... configure: error: in `/arms/thrift-0.9.0': configure: error: cannot run test programme while cross compiling is there solution? you error because dependency it's trying find missing. first cross compile dependency it's searching for. ./configure --help here find how include dependencies. --with-(dependency)=path-to-compiled-bin arm thrift cross-compiling

How to read such input in Java? -

How to read such input in Java? - i have input: an b c a1 a2 a3 ... for example: 4 3 2 2 1 2 1 (i have here 'a' numbers, = 4) 5 6 3 3 9 5 7 3 (i have here 'a' numbers, = 5) 0 0 0 i want stop reading input when or b or c equal 0. tried this: import java.io.bufferedreader; import java.io.ioexception; import java.io.inputstreamreader; import java.util.linkedlist; /* * alter template, take tools | templates * , open template in editor. */ public class test { public static void main(string[] args) throws ioexception { inputstreamreader converter = new inputstreamreader(system.in); bufferedreader in = new bufferedreader(converter); string line = ""; int = -1, b = -1, c = -1; linkedlist<integer> list = new linkedlist<>(); while (a != 0 && b != 0 && c != 0) { line = in.readline(); string tmp[] = line.split(" "); ...

Switching background images with javascript forces absolute path -

Switching background images with javascript forces absolute path - i have div begins follows: <div id="info_picture" style="background-image: url('assets/img/channels/banners/3')"></div> the reason there's no file extension image can uploaded user, , don't want store extension in database (or forcefulness them utilize 1 image format). have line of javascript changes background image: info_picture.style.backgroundimage = "url('assets/img/channels/banners/"+channel+"')"; however, on inspecting element, background image style appears absolute path, rather relative path specified in script. that's problem, because without extension, causes transferred application/octet-stream. chrome chucks warning, , image doesn't display. how can forcefulness load relative path instead of absolute path? my gut says it's not javascript problem or browser issue. the problem may in actual fil...

vba - Visio Dock Stencil Window on Right -

vba - Visio Dock Stencil Window on Right - i'm trying programmatically dock stencil window on right side of screen. know can set windowstate property of window viswsdockedright if have stencils docked on right, stencil i'm trying dock gets own sub window, rather appearing on stack of other stencils. while need do, it's not quite there. much improve if there way add together window already-docked windows. i have bank of docked stencils on left side of screen , on right. can utilize documents.openex open stencil docked, can't specify dock use. how opening stencil? if open this, should dock in stack of open stencils: documents.openex "stencil.vss", visopendocked vba visio

debugging - Parser missing last word - Java -

debugging - Parser missing last word - Java - this custom built parser, because dislike way default java.util.scanner works. my problem when create parser using new parser("parsed phrase here") or function reloadbuffer("parsed phrase here") misses lastly word of input. tried create code readable could, it's still pretty dense, sorry that. oh, , if ever gets fixed, sense free utilize it. import java.util.*; public class parser { public static char letters[] = new char[]{'q','w','e','r','t','y','u','i','o','p','a','s','d','f','g','h','j','k','l','z','x','c','v','b','n','m','q','w','e','r','t','y','u','i','o','p','a','s','d','f',...

python - Jquery cross domain ajax request always error -

python - Jquery cross domain ajax request always error - i trying create simple jquery mobile application. set follows: jquery client running on localhost:9090/myapp. my server running on localhost:9010/paperboy since on windows, on server side using simple server creating using "bottle" python micro framework. the server returns json on request, can see in chrome or firefox. i have validated response , valid json. the problem facing is, want client read json server response. since crossdomain issue, not able so. here ajax code client: $.ajax({ url: "http://localhost:9010/paperboy/toi", type:"get", data:$(this), datatype:"jsonp", //jsonp:"callback", no back upwards on server success:function(result){ console.log("ajax result: " + result); }, error:function(e){ console.log("error :" + e); } }); an...

python - Why does my pywinauto code continuously give an error at the while statement -

python - Why does my pywinauto code continuously give an error at the while statement - i've tried different if statement in 2nd while statement no avail, maintain getting error, , don't know why. here code below, along traceback error. help in advance! import os import time pywinauto import application sendkeys import sendkeys start = time.clock() while true: # open update tool app=application.application() app.start_(r"c:\program files\... \file.exe") dlg=app.update time.sleep(2) #delete lastly octet of ip address app.dlg.edit0.setedittext('') time.sleep(2) #type sim's lastly octet of ip address app.dlg.edit0.typekeys('76') time.sleep(2) #click connect button app.dlg.button4.click() time.sleep(2) #click resources management tab app.dlg.clickinput(button='left',coords=(263,50),double=false,wheel_dist=0) time.sleep(4) #select version combobox ap...

java - how to insert unique values in database -

java - how to insert unique values in database - i using next method insert name in database public void insertcontact(string name) { contentvalues newcontact = new contentvalues(); newcontact.put("name", name); open(); // open database database.insert("contacts", null, newcontact); close(); // close database } // end method insertcontact can made kind of check stop info duplication. mean if name exist in info base of operations should not insert new one. the easiest way add together rule in database on table unique values on column. if seek add together duplicate value exception thrown. see illustration set unique rule: http://www.w3schools.com/sql/sql_unique.asp java android sql

MonoTouch Binding Project Native linking failed. MT5202 -

MonoTouch Binding Project Native linking failed. MT5202 - i have next error build output when using library have linked through monotouch linking project. undefined symbols architecture armv7: the header file follows (left out eums space) #import <foundation/foundation.h> #import <audiotoolbox/audiotoolbox.h> #import <audiounit/audiounit.h> #import <externalaccessory/externalaccessory.h> @interface mtscra : nsobject <nsstreamdelegate> { @private nsstring *cardiin; nsstring *carddata; nsstring *cardlast4; nsstring *cardname; nsstring *cardexpdate; nsstring *cardservicecode; nsstring *cardstatus; nsstring *responsedata; nsstring *maskedtracks; nsstring *stdtrack1; nsstring *stdtrack2; nsstring *stdtrack3; nsstring *encryptedtrack1; nsstring *encryptedtrack2; nsstring *encryptedtrack3; nsstring *encryptionstatus; nsstring *maskedtrack1; nsstring *maskedtrack2; nsstrin...