Posts

Showing posts from March, 2012

excel - Data Validation to Update Cell on another Sheet -

i working on roster contains multiple areas of information. there "data" sheet contains of related information , couple sheets parse out info resides on "data" sheet. what trying force data validation dropdown located on 1 of input sheets update cell on "data" sheet when selected. keeps causing excel hang current code. the data validation easy 1-6 if helps. private sub worksheet_change(byval target range) if selection.count = 1 if not intersect(target, range("e6")) nothing dim currentmbr integer currentmbr = sheets("roster").range("b4").value 'b4 contains row number on data sheet selected member sheets("data").range("e" & currentmbr).value = target.value sheets("roster").range("e6").value = "=data!e" & currentmbr end if end if end sub once data sheet updated, want original cell return being reference info on data.

groovy - MissingMethodException on LinkedHashMap and Map argument types -

i running following groovy script. facing following exception: error while submitting event: groovy.lang.missingmethodexception: no signature of method: static com.wipro.core.common.basespec.auditrequest() applicable argument types: (java.lang.string, java.lang.string, java.lang.string, java.util.linkedhashmap) values: [35796698, http://localhost:8090/core-admin/http://curacao1-core-re-md1/ , ...] possible solutions: auditrequest(java.lang.long, java.lang.string, java.lang.string, java.util.map) i have referred previous posts on missing method in groovy , did check on typos or spelling mistakes in code (found none). highly appreciated. private string dosyncevent(def ctx) { def result = "" def commid = getstringcommid(sql) def xmltext = replacexmltag(ctx.message, 'commid', commid) def endpointurl = config["core.rest.url"] endpointurl = endpointurl + ctx.serviceurl def id = syncrequestcount.getandincrement() sendfor...

java - Android Google maps adding multiple markers, cannot bind onInfoWindowClick method -

i trying add multiple markers android application. works perfectly. thing getting stuck @ fact cannot bind multiple "oninfowindowclick" on multiple markers. for instance, if have like: (int = 0; < randomlist; i++) { markeroptions marker = new markeroptions().position(latlng).title(mainactivity.list.get(i).amessage); // adding marker googlemap.addmarker(marker); googlemap.setoninfowindowclicklistener(new googlemap.oninfowindowclicklistener() { @override public void oninfowindowclick(marker marker) { // onclick } }); } this result in infowindowclick works, each marker, same data inside "// onclick", because last marker getting set event. what procedure attach event multiple ma...

php - Class 'Users' not found when running artisan migration -

i trying run project$ php artisan migrate:refresh but error [symfony\component\debug\exception\fatalerrorexception] class 'users' not found why need users class? have app/user.php : <?php namespace app; use illuminate\auth\authenticatable; use illuminate\database\eloquent\model; use illuminate\auth\passwords\canresetpassword; use illuminate\contracts\auth\authenticatable authenticatablecontract; use illuminate\contracts\auth\canresetpassword canresetpasswordcontract; class user extends model implements authenticatablecontract, canresetpasswordcontract { [...] and migration, database/migration/2015_05_27_143124_create_users_table : <?php use illuminate\database\schema\blueprint; use illuminate\database\migrations\migration; class createuserstable extends migration { /** * run migrations. * * @return void */ public function up() { schema::create('users', function(blueprint $table) { ...

Generating a vector of symbolic variables in Matlab -

i want generate symbolic vector p , each element symbolic variable: p = [p1; p2; ...; pn]; i don't want type syms p1 p2 ... because have ~100 such variables. there way generate them automatically? yup. use sym so: p = sym('p', [100 1]); this syntax create vector of symbolic variables p first character followed integer. wish create 100 of them, , give symbolic vector p1 p100 , or many want. change 100 whatever number want. this p looks like: >> p p = p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 p16 p17 p18 p19 p20 p21 p22 p23 p24 p25 p26 p27 p28 p29 p30 p31 p32 p33 p34 p35 p36 p37 p38 p39 p40 p41 p42 p43 p44 p45 p46 p47 p48 p49 p50 p51 p52 p53 p54 p55 p56 p57 p58 p59 p60 p61 p62 p63 p64 p65 p66 p67 p68 p69 p70 p71 p72 p73 p74 p75 p76 p77 p78 p79 p80 p81 p82 ...

php - Set cookies to redirect to the same clicked url next time -

i have following code index.php: if(isset($_get['lang'])) $translate = new translator($_get['lang']); else $translate = new translator('en'); when user make request index.php?lang=ru i want server remember request next time , redirect him index.php index.php?lang=ru <?php /* * first lang url , set cookie */ if (isset ( $_get ['lang'] )) { $lang = $_get ['lang']; setcookie ( 'lang', "$lang", time () + 3600 ); } /* * second if lang not set in url read cookie */ else if (isset ( $_cookie ['lang'] )) { header ( "location:redirect.php?lang=" . $_cookie ['lang'] ); } /* * if cookie or url not set take default lang value 'en' */ else { $lang = 'en'; header ( "location:redirect.php?lang=" . $lang ); } ?>

github - Git merge changes between upstream brnches -

i bit unsure how can make changes upstream branch. had local copy of branch a , had commits , pushed origin (my fork). want update branch a on original, , later merge changes branch a branch b on upstream. fyi, have changes on upstream branch a . want write new changes on top of branch b on upstream. your question not entirely clear me going assume things. assume want merge commits branch a of local repo branch b of upstream repo. assume fork , upstream repos reside on github (because tagged github). there many ways this, depending on whether have write access on upstream repo. recommended methods merging on shared repo 2nd , 3rd ones (using pull request workflow) if have write access upstream repo in local repo, set upstream repo 1 of remote repo, if haven't (you can name whatever want, people name upstream ). command is git remote add upstream <url/path of upstream repo> fetch branch b upstream executing (both, in sequence) git fetch up...

objective c - Performance of measuring text width in AppKit -

is there way in appkit measure width of large number of nsstring objects(say million) fast? have tried 3 different ways this: [nsstring sizewithattributes:] [nsattributedstring size] nslayoutmanager (get text width instead of height) here performance metrics count\mechanism sizewithattributes nsattributedstring nslayoutmanager 1000 0.057 0.031 0.007 10000 0.329 0.325 0.064 100000 3.06 3.14 0.689 1000000 29.5 31.3 7.06 nslayoutmanager way go, problem being high memory footprint (more 1gb according profiler) because of creation of heavyweight nstextstorage objects. high creation time . of time taken during creation of above strings, dealbreaker in itself.(subsequently measuring nstextstorage objects have glyphs created , laid out takes 0.0002 seconds). ...

Spring batch generating reports -

i generate summary report @ end of batch execution. for ex: have itemprocessor receives accountid. for every accountid: marketplaceid's every marketplaceid: call real time availability at end of batch execution need provide nice summary in file shows, number of accounts processed number of marketplaceids each accoutid number of marketplaceids failed real time availability time took processing 1 accountid question where persist intermediate results ie. different count on each iteration how counts next step summary file writer would great if provide directions. thanks. write tasklet prepare nice summery , put tasklet last step in job <step id="summeryfile" > <tasklet ref="summaryfilepreparationtasklet"/> </step> and bean configuration is <bean id="summaryfilepreparationtasklet" class="com.baji.batch.summarypreparationfile"> and class file is ...

github - Connection error with cocoapods. Proxy CONNECT aborted -

i have problem instalation cococapods. have done following steps in terminal: ~sudo gem update --system ~sudo gem install cocoapods and after ~pod setup i have error message macbook-pro-aleksandr:~ aleksandrkarpov$ pod setup setting cocoapods master repo [!] /usr/bin/git clone https://github.com/cocoapods/specs.git master --depth=1 cloning 'master'... fatal: unable access 'https://github.com/cocoapods/specs.git/': proxy connect aborted i worked before cocoapods , ok. in case don't know do. can me, please? i found solution here . i wrote in terminal: git config --global http.proxy git config --global --unset http.proxy and resolved problem.

java - Spring Batch with two different datasource issue -

i have simple spring batch application that's pulling records database , printing rows screen. simple poc application. the application works fine spring boot 1.2.1.release when updated 1.2.3.release error message "no qualifying bean of type [javax.sql.datasource] defined" i'm not sure if spring boot issue or spring batch issue. is there way define datasource explicitly spring batch repository? full stack trace. org.springframework.beans.factory.beancreationexception: error creating bean name 'org.springframework.batch.core.configuration.annotation.simplebatchconfiguration': injection of autowired dependencies failed; nested exception org.springframework.beans.factory.beancreationexception: not autowire field: private java.util.collection org.springframework.batch.core.configuration.annotation.abstractbatchconfiguration.datasources; nested exception org.springframework.beans.factory.beancreationexception: error creating bean name 'datasource...

javascript - How to change top-level package dependencies in MeteorJS? -

i'm revisiting "discover meteor" , ran error when installing iron-router package. running on meteorjs v1.1.0.2. here's command line: $mrt add iron-router this caused kinds of debugger errors, thought related dependency crash. however, $mrt remove iron-router leaves dependency reference somewhere. hence, server crashes. anybody know can find proper location editing out offending dependency? that should be: meteor add iron:router as removing old packages, can edit .meteor/packages file directly , remove don't want. if want go how project @ start (in other words, make after first ran meteor create command) leave these packages: meteor-platform autopublish insecure

c - Pass char* to method expecting unsigned char* -

i working on embedded device has sdk. has method like: messagebox(u8*, u8*); // u8 typedefed unsigned char when checked but have seen in examples calling code like: messagebox("hi","hello"); passing char pointer without cast. can well defined? asking because ran tool on code, , complaining above mismatch: messagebox("status", "error calculating \rhash"); diy.c 89 error 64: type mismatch (arg. no. 1) (ptrs signed/unsigned) diy.c 89 error 64: type mismatch (arg. no. 2) (ptrs signed/unsigned) different opinions on answer , confuses me more. sum up, using api way described above, problem? crash program? and nice hear correct way pass string sdk methods expecting unsigned char* without causing constraint violation? it constraint violation, technically not defined, in practice, not problem. yet should cast these arguments silence these warnings. alternative littering code ugly casts define inline function: static...

Adding mongoDB document-array-element using Python Eve -

background: (using eve , mongo) i'm working in python using eve rest provider library connecting , mongodb expose number of rest endpoints database. i've had luck using eve far, i've run problem might bit beyond eve can natively. my problem mongodb document format has field (called "slots"), value list/array of dictionaries/embedded-documents. so mongodb document structure is: { blah1: data1, blah2: data2, ... slots: [ {thing1:data1, thing2:data2}, {thingx:datax, thingy:datay} ] } i need add new records (i.e. add pre-populated dictionaries) 'slots' list. if imagine doing insert directly via pymongo like: mongo.connection = mongoclient() mongo.db = mongo.connection['mydb'] mongo.coll = mongo.db['mycollection'] ... mongo.coll.update({'_id' : document_id}, {'$push': { "slot" : {"thing1":"data1","thingx":"datax...

c++ - Valgrind detect this as Possible Memory Leak -

below extract of code, in getting possible memory loss in valgrind report. 681 int pbsc::pbscappmain( int argc, char **argv ) 682 { 683 char pbscpath[255]; 684 std::string configdir = "/../config/"; 685 std::string pbscbinpath = getcwd(pbscpath,255); 686 std::string pbscconfigpath = pbscbinpath + configdir; 687 688 689 690 std::string localconfigfile = pbsc::getfilenamefromdir(pbscconfigpath, pbsc_local_config_file); 691 if(false == localconfigfile.empty()) 692 { 693 std::string localconfigfilewithpath = pbscconfigpath + localconfigfile; 694 readlocalconfiguration(localconfigfilewithpath); 695 } 696 697 std::string loggerconfigfile = pbsc::getfilenamefromdir(pbscconfigpath, pbsc_logger_config_file); 698 if(false == loggerconfigfile.empty()) 699 { 700 std::string loggerconfigfilewithpath = pbscconfigpath + loggerconfigfile; 701 log4cxx::propertyconfigurator::configureandwatch(loggerconfigfilewith...

file - How to read line in C -

i want reach line in file(*.txt) my file includes 3 type. firstly number of lines-1, secondly word , number, thirdly query in last line. for example; 5 dog 3 school 2 apple 2 car 1 cat 4 spoon food heart game stone pen file *fp; char arr[10][5]; char times[10]; int numberoflines; char querytemp[1000]; fp = fopen("deneme.txt","r"); fscanf(fp,"%d",&numberoflines); for(int i=0;i<10;i++) { fscanf(fp,"%s %d",arr[i],times[i]); } fscanf(fp,"%s",querysubmissionstemp); where wrong? how can that? you inputting numberoflines , inputting 10 lines regardless of entry. fscanf(fp,"%d",&numberoflines); for(int i=0;i<numberoflines;i++) also, don't see declaration querysubmissionstemp . fscanf(fp,"%s",querytemp); incorporating bluepixy's comment: char arr[10][5]; char[5] small. need include space \0 null terminator @ end of string. char times[10]; shoud...

javascript - Angular updating $scope variable after ajax is not reflecting in UI -

i cannot seem figure out issue here. on ajax success response set value in current controller not reflecting in ui. general answer have found run angular ajax functions and/or apply $apply or $digest $scope. none of these working. please note in code {{ , }} angular tags replaces <% , %> i'm using blade tempting engine , these tags conflict. the idea set processing boolean in controller. set true before ajax , false after. problem value not returned false state. running $apply or $digest method both return error: [$rootscope:inprog] . after ajax run console.log($scope.processing); console.log(this.processing); console.log($scope); returning undefind undefind , returns $scope object. within $scope object outputted in console value of processing should (false). however not reflected in ui still true. clicking toggle button sets processing value false , ui updated. i'm super confused problem is... html <div class="panel panel-default" ng-c...

Regex (gskinner) to extract words from a sentence -

i have string, hello~tim~call-me-when-you-are-back-at~+339280908998 there multiple fields in existing message. greeting=hello , name=tim , message=call-me-when-you-are-back-at , phone=+339280908998 . i.e, first word before occurrence of ~ greeting , , between first , second occurrence of ~ name , between third , fourth occurrence of ~ message , last word after final occurrence of ~ phone. how extract these words. thanks in advance. yeah, can done, based on string in comment. the regular expression need is: ^([^~]*?)~([^~]*?)~([^~]*?)~(.*?)$ here's link example: https://regex101.com/r/bw2cp7/2

webkit - Can ease-in and ease-out have different speeds for the css transition timing function? -

i'm trying have 1 element exit , 1 come in slow, want first element come in fast , second 1 exit fast too. possible? here's tried. deck.js slide set. .slide.long.in { -webkit-transition: -webkit-transform 5000ms ease-in; transition: transform 5000ms ease-in; transition: transform 500ms ease-out; } .slide.long.out { -webkit-transition: -webkit-transform 5000ms ease-out; transition: transform 500ms ease-in; transition: transform 5000ms ease-out; } deck.js has javascript functions change class on section if previous, current, or next. using imgonzalves hint, added following classes , seems work. > .slide.long.in.deck-current { -webkit-transition: -webkit-transform 5000ms ease-in; transition: transform 2500ms ease-in; } > .slide.long.in.deck-next { -webkit-transition: -webkit-transform 500ms ease-out; transition: transform 500ms ease-out; } > .slide.long.in.deck-previous { -webkit-transition: -webkit-transform 500ms...

dust.js - Dust JS Templating visualization and generation -

i know tools support dustjs templating following. wyswyg visualisation. there tool using can preview html template while edit in dustjs template file. automatic creation of templates wireframes. there tool create .dust files .html. is dust integrated cms tool? handlebar in adobe experience manager. if know of tools dust js please let me know. using sublime / atom/ eclipse ides. to preview dust file automatically change it, you'll first want set automatic dust compilation. can using built-in dustc tool, or via grunt plugin grunt-dustjs . if you're using dustc , you'd this: dustc --output=lib/compiled.js --watch templates/**/*.dust now, time .dust file inside templates directory changes, templates recompiled , placed lib/compiled.js . can load file on page , render dust how do. then can use browsersync reload app in different browsers wysiwyg preview, or wire using grunt task grunt-contrib-watch . any html file valid dust file. .dust file ex...

python - Real time DataFrame plot -

i have pandas dataframe updated in while loop , plot in real time, unfortunately did not how that. samplae code might be: import numpy np matplotlib import pyplot plt matplotlib import animation import time tm datetime import datetime, date, time import pandas pd columns = ["a1", "a2", "a3", "a4","a5", "b1", "b2", "b3", "b4", "b5", "prex"] df = pd.dataframe() """plt.ion()""" plt.figure() while not true: = datetime.now() adata = 5 * np.random.randn(1,10) + 25. prex = 1e-10* np.random.randn(1,1) + 1e-10 outcomes = np.append(adata, prex) ind = [now] idf = pd.dataframe(np.array([outcomes]), index = ind, columns = columns) df = df.append(idf) ax = df.plot(secondary_y=['prex']) plt.show() time.sleep(0.5) but if uncomment """plt.ion()""" many different windows open. o...

random - Lua function selector -

i have 3 functions. when user presses 'e' key want select 1 of functions (at random), feel has math.random can't figure out. you don't use math.random select function; use pick random number, can use index function need table (as 1 example): local list = { function() print(1) end, function() print(2) end, function() print(3) end } math.randomseed(os.time()) -- don't forget seed or same sequence = 1, 10 list[math.random(#list)]() end

caching - How to refresh image.src dataurl, prevent cache? -

i have following code loads image choose files. loads , draws canvas, if make change the image file via image editor, , reload it- doesn't refresh , show changes(it uses cached version).. how can refresh?? var reader = new filereader(); reader.onload = function(event){ img[num] = new image(); img[num].onload = function () { //handle image stuff } img[num].src = event.target.result; } reader.readasdataurl(e.target.files[0]); sorry, issue input file change event. since filename wasn't different, wasn't calling change event if add line clear value, works. $( "#imagereplacer" ).on("change", function( event ){ replaceimage(event); $(this).val(''); }).hide();

php - Redirect loop in Codeigniter with single redirect from base controller -

i have base controller: class tcms_controller extends ci_controller{ public function __construct(){ parent::__construct(); if( ! $this->session->userdata('logged_in')){ redirect('admin/authenticate/login'); } //loop settings in "globals" table foreach($this->settings_model->get_global_settings() $result){ $this->global_data[$result->key] = $result->value; } } } so there have basic redirect: redirect('admin/authenticate/login'); if user not logged in. also have settings remove index.php urls: .htaccess: options +followsymlinks options -indexes directoryindex index.php rewriteengine on rewritecond $1 !^(index\.php|resources|images|css|js|robots\.txt|favicon\.ico) rewritecond %{request_filename} !-f rewritecond ${request_filename} !-d rewriterule ^(.*)$ index.php?/$1 [l] and next config settings: $config['base_url'] = 'ht...

function - C++ returns objects by value -

the topic pretty in title of question. saw in meyrses book "effective c++": the fact c++ returns objects value what mean , how c++ standard supports message? instanance, have this: int foo() { int = 1; return a; } that's pretty clear, phrase mean returns copy of value stored in local variable. consider this: int& foo() { int = 1; return a; } a compiler should warn returning reference local variable. how "returning value fact" apply example? meyers correct in main, though have take wording pinch of salt when dealing references. @ level of abstraction, here you're passing reference "by value". but he's trying that, beyond that, c++ passes value default, , contrasts languages such java in objects chucked around reference semantics instead. in fact, 1 could argue passage doesn't apply code @ all, because reference not "object".

branching and merging - Splitting out multiple intermediate changes in Mercurial -

Image
we have unfortunate situation new feature branch made second, unrelated feature branch had been put on hold rather default. there's multiple changesets within both feature branches , while changed files unrelated several high level project files have edits on both branches. default has had several updates , merges during time too. thankfully intermediate feature hasn't been updated concurrently new feature. i've looked various commands , options available , lost how best fix situation. tree looks like: default -- various edits , merges -- tip \ \-- named branch 1 (15 changes) -- named branch 2 (30 edits) i want point default has changes named branch 2 none named branch 1. want branch has changes named branch 1 available when return feature. i suspect there's no nice easy way this, , there's going messy parts in history, @ loss @ how start going task. hg graft can cherry-pick changesets 1 branch another. update destination branch, graft re...

java - Cannot find symbol class newLatLng -

i following tutorial on writing apps google maps android api v2. encountered problem when tried following: cameraupdate update = new cameraupdatefactory.newlatlng(location_home); produces error: cannot find symbol class newlatlng. when type in cameraupdatefactory. ide suggests "newlatlng" cannot resolve it. added compile 'com.google.android.gms:play-services:7.3.0' gradle. no rebuilding, cleaning, invalidating caches work. ideas on how make work? thanx. actually cameraupdate update = cameraupdatefactory.newlatlng(location_home); no need use new operator since using factory.

javascript - I want to change text background color while selecting text that should also run in safari browser -

i want change text background color while selecting text should run in safari browser.... code should coded javascript , html. have code of that? yeah have code not javascript . sorry - equally result yielded css (cascading style sheet) . we make use of pseudo class called " selection ". code goes : ::selection { color: red; background: yellow; } for more information : visit site this css3 pseudo class , work in browsers supporting css3 , not supported in ie < 9 great way highlight selected text. in supported browsers.

javascript - Trouble With Selection Object in Firefox and IE -

Image
i've got javascript messes selections. full code complicated stuff i'd rather not go right now, i've got smaller test case don't understand here. if load page should see text , 2 buttons. double click on "some" select it, , click "select". "some" gets span around , becomes gray. then double click "some" again , hit "unselect". span goes away, , looking @ page content looks it's how started. double click "some" 1 last time, hit "select" , nothing gets selected. this last step failing because start , end of selection reported being in different nodes on page, though sure looks same node, , reported being @ position 0 of both nodes. don't understand why it's behaving differently @ step 1, because looks me step 2 made page before step 1. after things weirder. there's similar, not quite same weird behavior in ie9. in chrome it's fine. anyone know what's going o...

c# - Picasa ClientLogin deprecation issues -

i have been using picasa client login couple of years without issue. use store photos users upload not want request user authentication storing photos in our own account. developed in .net. up until today has worked , can’t work out (and beginning wander whether possible) how fix issue. previous code: picasaservice service = new picasaservice("my app"); service.setusercredentials("myemail@gmail.com", "password"); uri posturi = new uri(picasaquery.createpicasauri("default", albumid)); string scontenttype = "image/jpeg"; picasaentry entry = (picasaentry)service.insert(posturi, filestream, scontenttype, sfilename); filestream.close(); spicasaurl = entry.media.content.url.tostring(); new code using auth2 (that doesn’t work!) - have gone onto developer console , set client id. using p12 key in application generated there access code. uri posturi = new uri(picasaquery.createpicasauri("default", albumid)); con...

rewriting equation for optimization to matrix equation -

Image
i need minimize equation in attached picture. given function p=f(q). p integers ranging 1 254, while q set of 254 real numbers. f monotonic function maps member set q set p. n number of pixels in image, while a, b , c refer 3 different images. need find inverse of f, or 244 real numbers in q (since f function integers) in q[i] = f_inverse(p[i]) (assume p arranged 1 254 in order). my approach write p nx3 array, nth row contains 3 elements pa(n),pa(n), pb(n). array can constructed 3 images each contain n pixels. have following code: def g(q,p): n = p.shape[0] value = 0 in range(n): value = value + (q[p[i,0]+q[p[i,1]-q[p[i,2]])**2 return value guess = np.arange(0,256)/255.0 q = spo.minimize(g,guess,args=p) and try minimize function g try vector q. however, says 'operands not broadcast shapes (1,254) (87500,3)'. these shapes of q (the unknown solved) , p (87500 number of pixs) respectively. why that? besides, if works, seems slow method tryi...

mysql - Insert a value into SQL local database and print the tables data using Javascript -

i have form uses html , javascript submit data table of sql database. want submit typed user local sqlite database inside device. using phonegap can use html, javascript ans css. have data inserted value called submval . want insert value table called test , has 2 fields [id int not null -name varchar ]. use code: var db = window.opendatabase("database", "1.0", "cordova test", 20000); db.transaction(populatedb, errorcb, successcb); function submitbutton() { /* code inserted data */ var submval = submitteddata; if (confirm('are sure want save ' + submval + ' database?')) { function populatedb(tx) { tx.executesql('insert test (id, name) values (1, submval)'); } alert("succesfully inserted"); } else { alert("cancelled"); } } so have 3 questions: 1. how submval second field of table? pretty sure...

java - passing asynctask objects to other activity -

i want list displayed in new activity, when click button results in same page, how results passed new activity? button: mylist.setonclicklistener(new view.onclicklistener() { @override public void onclick(view v) { new asynctask().execute(""); } }); onpostexecute: protected void onpostexecute(boolean result) { super.onpostexecute(result); //arrays.sort(avstand); intent intent = new intent(); minvalue = getminvalue(avstand); if(result== false){ toast.maketext(getapplicationcontext(), "unable fetch data server", toast.length_long).show(); } else { adapter adapter = new adapter(getapplicationcontext(),r.layout.rad, myliste); list.setadapter(adapter); } }

iOS project fails to compile under xcodebuild for deployment target 7.0, but is fine for 6.0. Compiles for both under Xcode -

i have ios project has ios 6.0 deployment target. builds fine both under xcode , xcodebuilder (necessary ci). client wants project available users have ios7+ installed. no problem, i'll increase deployment target number right? wrong! under xcode project continues compile fine. under xcodebuild however, project fails compile lots of errors this: undefined symbols architecture armv7: "std::string::_rep::_s_empty_rep_storage", referenced from: in drmnativeinterface it's using adobe primetime , drmnativeinterface part of that. to isolate problem i've created brand new, single-screen project , performed following changes: added drmnativeinterface framework , 2 apple-supplied dependencies required project build in xcode, mediaplayer , avfoundation "link binary libraries" . primetime documentation lists other dependencies makes no difference if add - these 2 needed successful build under xcode. replaced valid archs "a...

java - Freetts javax.speech.EngineException -

i using converting text speech send sip application. keep getting error javax.speech.engineexception: javax.speech.central: no class found com.sun.speech.freetts.jsapi.freettsenginecentral @ javax.speech.central.registerenginecentral(central.java:706) @ text2speech.texttospeech.initenglish(texttospeech.java:49) @ gov.nist.jrtp.test.send_recv.jrtptest.encodertp(jrtptest.java:192) @ gov.nist.jrtp.test.send_recv.jrtptest.<init>(jrtptest.java:93) @ org.universaal.samples.sip.exporter.sipexpimpl.<init>(sipexpimpl.java:81) @ org.universaal.samples.sip.exporter.activator.start(activator.java:20) @ org.apache.felix.framework.util.secureaction.startactivator(secureaction.java:633) @ org.apache.felix.framework.felix.activatebundle(felix.java:1817) @ org.apache.felix.framework.felix.startbundle(felix.java:1734) @ org.apache.felix.framework.felix.setactivestartlevel(felix.java:1143) @ org.apache.felix.framework.startlevelimpl.run(startl...

javascript - React Native: Chain Async Calls. e.g to AsyncStorage? -

i'm trying chain several calls asyncstorage.getitem() cannot seem calls trigger in correct order. seem manage drop out of loop last item completed before earlier items. appears react uses different syntax promises how jquery work. in example trying chain calls vars v1, v2, v3. v3 triggers refresh of ui vars v1 , v2 required. code 2 chained vars follows: asyncstorage.getitem("v1") .then( (value) => { if (value !== null){ varcollection.v1 =value } } ) .then( () => { asyncstorage.getitem("v3") .then((value) => { if (value !== null){ varcollection.v3 = value; }else{ varcollection.v3 = "default value"; } }) .done() }) .done(); this appears work may luck causing work when add link chain, things go wrong. asyncstorage.getitem("v1") .then( (value) => { if (value !== null){ varcollection.v1 =value ...

curl - PHP preg_match not showing results -

i trying scrape page shipping cost standard delivery only. not showing results. have tried different techniques delimiting special characters. perhaps there better approach single out standard cost price. suggestions helpful.thanks! <?php $curl = curl_init(); $url = 'http://www.amazon.com/gp/aag/details?ie=utf8&asin=b009s7l8a2&isamazonfulfilled=&iscba=&marketplaceid=atvpdkikx0der&orderid=&seller=a1n0i0rbocg9tk&sshmpath=shipping-rates#/aag_shipping'; curl_setopt($curl, curlopt_url, $url); curl_setopt($curl, curlopt_useragent, "mozilla/5.0 (windows; u; windows nt 5.1; rv:1.7.3) gecko/20041001 firefox/0.10.1" ); curl_setopt($curl, curlopt_returntransfer, 1); $resp = curl_exec($curl); //echo $resp; function amazon_scrape($html) { preg_match( '/<td class="tiny" nowrap="nowrap" width="20%"><strong> standard <\/strong> <\/td><td class="tiny" align=...