Posts

Showing posts from May, 2012

grep a specific strings in a Perl array -

how grep multiple sets of 5 characters in order in array in perl program? @arr2 = grep(/[bcrz]+/, @arr1); @arr1 can contain crzbbztccbbrz fjdlsfjslfjs crzbbzccbbrz only lines last should taken if want lines contain 5 chars , none others, regex like: /^[brczw]+$/ looks strings containing 1 or more of 5-character set, containing no other characters. might more efficient @carol's solution using grep(). uses regex determine if string has of unwanted characters, , rejects line.

angularjs - How to force angular temporarily unwatch variable? -

i have articles json. when event happens, need make multiple slicing of it. every single slice force update html, undesired me. angular stop watching variable, "fancy" changes, , tell angular start watching articles json again. possible? here fiddle: http://jsfiddle.net/2qr4s/3/ i have found such method, unbinds watch forever , not find how rebind again: var myevent = $scope.$on('someevents', handlesomeevent); myevent() ; // unbinds event

How do I process one src file multiple ways using gulp? -

i want use 1 source file generate multiple destination files different characteristics. here's watered down version of want do: gulp.task('build', function() { var src = gulp.src('myfile.txt') (var = 0; < 10; i++) { src .pipe(someplugin(i)) .pipe(rename('myfile-' + + '.txt')) .dest('./build') } }); presumably, "someplugin" change file contents based on index passed it, code above generate 10 files, each different content. this doesn't work, , didn't expect to, there way achieve this? i ended creating function builds tasks me. here's example: function taskbuilder(i) { return function() { gulp.src('*.mustache') .pipe(someplugin(i)) .pipe(rename('myfile-' + + '.txt')) .dest('./build'); }; } var tasks, task, i; (i = 0; < 10; i++) { taskname = 'tasks-' + i; gulp.task(taskname, taskbuilder(i)); tasks...

svn - Vim -- paste content of command line process referencing filename of current buffer into new buffer -

i'm trying create mapping can svn compare-with-base few keystrokes i know how each step manually.... :new open new buffer. :read !svn cat <filename> read base version of file new buffer. :diffthis on new buffer , previous buffer diff files. i'd love map series of events mapping -scb , not sure how grab filename (like :e %<cr> ) , place read command. i'm not sure how can efficiently grab output of read command , put in new buffer if i'm using % . as noted in comments, particular question has been asked , answered on superuser: https://superuser.com/questions/370125/getting-output-from-command-in-a-vim-buffer for sake of general vim education, read on. there @ least 3 ways access current file name. on command line, :e! % will reload current file, although simpler use :e! . more useful example, using filename modifiers, edit foo.h if editing foo.c : :sp %:r.h the second way use @% register, string variable name of cu...

javascript - ngModel don't upate deep level -

when have ngmodel more 1 level , modify value programmatically in scope, value not updated in ui. if put $watch on same property, works. how can fix ngmodel html: <form ng-controller="testcontroller"> <input type="text" ng-model="coco.c.c.c"> <input type="test" ng-model="super.s.s.s"> <input type="test" ng-model="super2"> </form> js: var app = angular.module('app', []); app.controller('testcontroller', function ($scope) { $scope.super = { s: { s: { } } }; $scope.coco = { c: { c: { } } }; $scope.$watch('coco.c.c.c', function (value) { $scope.super = +value * 2; console.log(value); }); $scope.$watch('super.s.s.s', function (value) { $scope.super2 = +value * 2; }); }); app.controller('testcon...

jaxb - jaxb2-maven-plugin generate only a select few classes -

i have xsd file contains many many types, of not need. however, not have ability trim down need. being said, there way tell jaxb2-maven-plugin generate specific set of types or classes (a whitelist if will), it's not auto generating 1000+ classes? thanks in advance!

Access value in PHP array with unknown dimensions -

consider multidimensional array following structure: [a] => array ( [b] => array ( [c] => array ( [value] => 0 [other_value] => 1 ) ) ) i want access $array[a][b][c][value] , value @ $array[a][b][c][d][value] . i'm not entirely how describe i'm trying do. think alternative explanation be: want access each element in $array[a][b][c] able access each element in $array[a][b][c][d] , etc., using foreach , unknown number of nested arrays. array_walk_recursive() come in handy here. array_walk_recursive($array, function($val, $key) { if ($key == "value") { // } });

android - java.lang.NullPointerException SharedPreferences getSharedPreferences -

so having weird problem, solvable else me ;-) anyway, having many activities , on every activity have problem resume properly, every activity one. whenever start 1 activity, or put 1 activity sleep , return it, works fine. when put sleep hit home button , launch bunch of different apps , try return again getting java.lang.nullpointerexception @ getsharedpreferences. how can happen? sharedpreferences deleted? here getpreferences method error happens: private static sharedpreferences getpreferences() { context applicationcontext = app.getcontextofapplication(); return applicationcontext.getsharedpreferences(prefs_user, context.mode_private); } here logcat: 05-16 20:37:36.461: e/androidruntime(13767): fatal exception: main 05-16 20:37:36.461: e/androidruntime(13767): process: com.test, pid: 13767 05-16 20:37:36.461: e/androidruntime(13767): java.lang.runtimeexception: unable start activity componentinfo{com.test/com.test.messageactivity}: java.lang.nullpointerexcep...

machine learning - Arff to SVM Light -

i have created weka arff, i'd convert svmlight format. can load arff in mlcomp . how go converting arff? easiest upload data http://mldata.org . alternatively use tool behind conversion can at https://github.com/open-machine-learning/mldata-utils with can convert arff svm light , between various other formats.

Google scripting GAS linking connecting different worksheets and not have to click allow access for connecting spreadsheets -

i have 1 spreadsheet in shared folder in google drive. spreadsheet function collector of other spreadsheets representing employees report manager. in manager sheet have script puts id's of spreadsheets in child folder in 1 excel sheet. use indirect importrange on sheet information laid out in table format can pivot table in manager file. my issue number of spreadsheets in child folder range 15 70 spreadsheets , plan roll out structure other managers. don't want manually connect each spreadsheet allow access on mouse click. ideally during script creates template document employee, permissions set release within our domain. have went file --> share , set access allow domain email addresses , can edit. ideally hide sheet having mouse through connect. edit how release permissions automatically when connecting 2 spreadsheets? in 1 cell there reference values in different spreadsheet. if create 2 spreadsheets , attempt have 1 cell reference other spreadsheet little red b...

swing - Java Wait for Border adjustment to be made in Grid Layout -

hello have tile (jlabel) on grid layout panel call tile.setborder(borderfactory.createemptyborder()); update border of tile call lengthy method, image updated after lengthy method done. want border adjustment done , image updated on screen before calling method, how do this? try swingutilities.invokelater() make sure edt initialized properly. please have @ below post know more this. why use swingutilities.invokelater in main method? swingutilities.invokelater sample code: swingutilities.invokelater(new runnable() { @override public void run() { // gui related code fall here tile.setborder(borderfactory.createemptyborder()); // not add lengthy method call here } }); for more info read comments below.

caching - A method to Extract Output of Oracle Coherence Cache (CohQl) into a flat file -

do have way extract output of query flat file, while working cohql, know have way rdbms databases. in mysql select ... ... ... outfile 'file.csv' fields terminated ',' i want flat file, delimiter not preference, if solutuion delimiter, , good. i'm not aware of built-in capability that.

database - Java URL doesn't seem to connect, but no exception thrown -

i have code needs form connection server, , once connection formed server interprets string sent , updates names in database. i.e. send " http://app.sitename.tv/api/add/aname " , adds "aname" database, or send " http://app.sitename.tv/api/remove/aname " , removes name. when type these links browser , run it works fine. program, though, doesn't throw exceptions not update database. i'm not sure go here. i've tried turning off firewall makes no difference. if ((boolean) value) { system.out.println("setvalue"); try { string bvurl = "http://app.sitename.tv/api/add/" + data.name.get(row); url myurl = new url(bvurl); urlconnection myurlconnection = myurl.openconnection(); myurlconnection.connect(); system.out.println(bvurl); } catch (malformedurlexception e) { system.err.println("malformedurlexception: " + e); } catch (ioexcepti...

php - Displaying avatar image in img src Wordpress -

i want display logged in user avatar in img src="" . worked in wordpress , used code display no results. <img src="<?php global $userdata; get_currentuserinfo(); echo get_avatar( $userdata->id, 46 ); ?>" per documentation, in combination get_avatar method (46 size): http://codex.wordpress.org/function_reference/get_currentuserinfo the function assigns value $current_user, not $userdata. here updated code <?php global $current_user; get_currentuserinfo(); echo get_avatar( $current_user->id, 46 ); ?> but i'd add can skip using method get_current_user_id: http://codex.wordpress.org/function_reference/get_current_user_id <?php echo get_avatar( get_current_user_id(), 46 ); ?>

vb.net - Loop not looping and 2nd If not Iffing -

here's code module module1 sub main() dim yob integer system.console.writeline("if kind input year of birth tell how old are") loops: try yob = int32.parse(console.readline()) catch ex systemexception console.writeline("that not number, try again.") goto loops end try until yob > 0 , yob < datetime.today.year loop if yob < 0 or yob > datetime.today.year console.writeline("you entered number either 0 or date in future.") console.writeline("you can't born in future. c'mon son") console.writeline("try again") end if dim age = datetime.today.year - yob console.writeline("you " & age & " years old") if age > 100 console.writeline("you born on 100 years ago , little known time since there no facebook, twitter or instagram people log every") console.wr...

Android updateAppWidget doesn't update -

i got serious issue on android application : calling appwidgetmanager appwidgetmanager = appwidgetmanager.getinstance(context); appwidgetmanager.updateappwidget(appwidgetid, getwidgetview(context, appwidgetid)); in public void onreceive(context context, intent intent) method has no result @ all. remoteviews produced looks valid (programatically speaking) widget not updated (it keeps old values). i've found similar questions, nobody has answer it: https://stackoverflow.com/questions/18534990/updateappwidget-does-not-update-on-sony-xperia appwidget not reliably update upon call updateappwidget() the solution posted @manitoba not working, here working code put inside onupdate : remoteviews views = new remoteviews(context.getpackagename(), r.layout.widget); // stuff appwidgetmanager.updateappwidget(new componentname(context, customwidgetprovider.class), views); hope :)

sql server - MS SQL having clause issue -

i have 2 columns item | category apple fruit orange fruit potatoes vegetables required output: fruit i trying name of highest category in terms of quantity fruit. wrote mysql query works on mysql. same query throws error on ms sql server. hint appreciated. select cat (select count(category) total,category cat test group category) s1 group s1.total,s1.cat having max(s1.total) i empty result when run this. similar query created runs fine on mysql: select s2.cats (select s1.cat cats, max(s1.counts) countings (select count(category) counts, category cat test group category) s1) s2 error message is: msg 4145, level 15, state 1, line 1 expression of non-boolean type specified in context condition expected, near ')'. i want avoid using top something this? pretty ugly avoids top. also, return items have max count, not arbitrary one. assuming table [food] column category: select category food group category having count(*) = (select m...

Deprecated Java JList feature -

as retirement project learn , use java worked way through deitel book bought in 2005. working on cypher-breaking program thought up. have not yet progressed using tool such eclipse. java compiler warns "java uses or overrides deprecated api" , "java uses unscheduled or unsafe operations" concerning use of jlist. << private jlist foundjlist; >> , << foundjlist = new jlist(); >> the program executes ok through initial loading of data jlist simple array << foundjlist.setlistdata( sortedletter ); >> program throws error later in program on identical << foundjlist.setlistdata( sortedletter ); >> statement after have changed values in supporting array 'sortedletter" . <<< correction may 18 2014 >>>> had misunderstood purpose of setlistdata feature, assuming loaded jlist array instead of real purpose of binding array jlist. deleted instruction containing second setlistdat...

c# - Replace casting with better pattern -

i'm working on simple client-server solution client can send different types of commands server , specific results. commands can have different properties. i'd have architecture specific command handler chosen based on type of command handles. created basic infrastructure follows: public interface icommand { } public class commanda: icommand { public string customproperty { get; set; } } public class commandb: icommand { } each command has own commandhandler responsible handling command , returning result. inherit commandhandlerbaseclass: public interface icommandhandler { bool canhandle(icommand command); ireply handle(icommand command); } public abstract class commandhandlerbase<tcommand> : icommandhandler tcommand : class, icommand { public bool canhandle(icommand command) { return command tcommand; } public ireply handle(icommand command) { return handle(command tcommand); } public abstract ire...

Can't get Geocoder working in Google Map API -

i have google map 2 info boxes. info boxes working geocoder button doesn't reason. i can info boxes working on page , can geocoder working on page, can't them both working on same page. what want able type in address , place pin , zoom location (like on below link googles example). the geocoding code google: https://developers.google.com/maps/documentation/javascript/examples/geocoding-simple the infobox.js from: https://google-maps-utility-library-v3.googlecode.com/svn/tags/infobox/1.1.9/src/infobox.js here what's in head: <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=api_removed&sensor=false"> </script> <script type="text/javascript" src="infobox.js"></script> <script type="text/javascript"> var geocoder; var map; function initialize() { geocoder = new google.maps.geocoder(); var secheltloc = new google.maps.latlng(-27.532861,134.693340), ...

php - Unable to move file from temp using move_uploaded_file() -

i tryin upload , store file (pdfs) in directory i using move_uploaded_file such: move_uploaded_file($_files["userdata"]["tmp_name"], "uploads/data/" . $_files["userdata"]["name"]); the script runs when check directory via ftp nothing there. permissions directory , parent directories 777 . i using enctype="multipart/form-data" in html form. would know doing wrong? var_dump($_files); gives: array(2) { ["userdata"]=> array(5) { ["name"]=> string(22) "myfile.pdf" ["type"]=> string(15) "application/pdf" ["tmp_name"]=> string(14) "/tmp/phpiujvu7" ["error"]=> int(0) ["size"]=> int(1398957) } ["userdata2"]=> array(5) { ["name"]=> string(0) "" ["type"]=> string(0) "" ["tmp_name"]=> string(0) "" ["error"]=> ...

python - Merge columns of numbers of different lengths from separate text files into a single csv file -

hi new python programming , cannot seem overcome issue. i have directory 100 subfolders single text file in each (with no file extension) named same. each file contains single column of numbers of different lengths. i want merge numbers of each file single csv file numbers each file in separate columns. so should end matrix of 100 columns of differing lengths of numbers each column corresponds single file. example of files: file1 1 15 23 22 10 file 2 3 55 22 i have script: # import modules import glob import csv import sys import itertools inf = glob.glob("*/*-ambig") f in inf: open(f) fin: open(sys.argv[1], 'w') fout: writer = csv.writer(fout, delimiter=',', quotechar='', quoting=csv.quote_none) headers = ('coverage', ) writer.writerow(headers) line in fin: columns = line.split("\n") # split each column on new line ...

installation - failed install of ghost.py python module in windows with ipython -

i need getting ghost.py recognised ipython notebook run c/python27/scripts i installed pyqt4 via binary chris gohlke isn't being recognised ipython installation under windows. i downloaded zip github extracted folder inside c/python27/scripts directory , installed via command prompt python install setup.py but when import ghost , try , use ipython not recognised. update: pyqt4 not being recognised though it's installed under c/python27/lib/site-pacakges, , path in variable name

SPARQL results in WPF (binding DataGrid) -

Image
i use dotnetrdf , display results query in wpf. function in viewmodel. have datatable use next in view. //results sparqlresultset results; datatable table; //define remote endpoint //use dbpedia sparql endpoint default graph set dbpedia sparqlremoteendpoint endpoint = new sparqlremoteendpoint(new uri("http://dbpedia.org/sparql"), "http://dbpedia.org"); //make select query against endpoint results = endpoint.querywithresultset("prefix dbo: <http://dbpedia.org/ontology/> prefix : <http://dbpedia.org/resource/> select ?film ?producername { ?film dbo:director :andrzej_wajda . ?film dbo:producer ?producername . }"); foreach (sparqlresult result in results) { console.writeline(result.tostring()); } table = new datatable(); datarow row; switch (results.resultstype) { case sparqlresultstype.varia...

Unable to install android application in my mobile -

i android application developer. few days ago, added repositories eclipse juno creating android app development environment inside eclipse. during first app being build , deployed android environment, got problem .apk file when exported android phone, app name changed alokappnull alokapp(name given me app) , app didn't install. suggest proper solution. my guess have delete older app , try installing new app again. 2 app have different signatures if changed debug release version.

sublimetext - Sublime Text: Change highlight background -

Image
i change color on found instances (when use find) of word have been found. noticed highlightbackground key changes first instance. there way change highlight color of found instances? the following examples neon color scheme (full disclosure - i'm designer): so i'm searching though package control.sublime-settings file trying find of packages html (case-insensitive) in name. open find dialog ( ctrl f on windows/linux, ⌘ f on os x) , type html search box, after unchecking regex, case-sensitive, , whole-word options. following appears: the yellow background behind first found item on line 22 themed using findhighlight setting, while blue font (foreground) themed using findhighlightforeground . can hit f3 (win/lin, ⌘ g on os x) scroll through each match. however, want multi-selection can change them @ once. hit find ( alt enter , ⌥ enter on os x) , window looks so: this same coloring used when manually select text. bright blue background themed u...

jquery - Incrementally load a webpage -

is possible use ajax , jquery incrementally load webpage using asp.net. i have webpage, runs 30 queries; each against different databases (my organisation has 30 databases). unfortunately each query takes 7 seconds run (on average). have spent time optimizing queries (they took average of 30 seconds run each). i webpage to: run query 1 , display output (grid view), run query 2 , display output (grid wiew) of query 1 , two, run query 3 , display output of query one,two , 3 etc. thought using response.flush (see question: response.write , asp.net controls ), guffa says not possible when using web controls. how can incrementally load webpage using ajax, jquery etc? yes possible. queries have executed serially? if not, can run queries in parallel. every ajax call has option of calling function after successful completion. when each ajax call completes, specify return data formatting , presentation code function subsequent ajax call @ bottom of code. the following c...

javascript - How can I re-enable a JQuery script after a failed validation in a primefaces page? -

ok here's deal... have primefaces page, , i'm modifying style-class of components using jquery script. problem that, after failed validation of fields, script stops modifying style-class style fails components. i'm trying refresh page using update="@form" on submit button, won't work validation ajax level. refreshing page manually works not desirable, , won't keep nor error messages neither field values validated without errors. i can guess script doing it's working on dom-elements changed or replaced ajax-call. example: $(document).ready(function() { $('input').on('change', function() { $(this).add('class', 'changed'); }); }); this script registers event on input-fields it's finding after dom ready. if ajax-call adds new input field or rerenders 1 of input-elements don't have automatically registered events on them. you need register events after ajax-call again via e.g. on...

android - Sqlite database size compare with local db size -

i have got sdcard database file , app sqlite database how compare size? when run code below, crashing.. private contextwrapper context; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.main); file extstore = environment.getexternalstoragedirectory(); file myfile = new file(extstore.getabsolutepath() + externalpath + filename); file f = context.getdatabasepath(db_path); long dbsize = f.length(); if (dbsize <= myfile.length()) { //code here } else { } appreciate help… 05-18 02:33:05.410: e/androidruntime(1085): fatal exception: main 05-18 02:33:05.410: e/androidruntime(1085): process: in.wptrafficanalyzer.searchdialogdemo, pid: 1085 05-18 02:33:05.410: e/androidruntime(1085): java.lang.runtimeexception: unable start activity componentinfo{in.wptrafficanalyzer.searchdialogdemo/in.wptrafficanalyzer.searchdialogdemo.lit...

tampermonkey - running JQuery through Chrome console: different result -

i newbie in jquery, on random website, tried change color of label using following jquery selector through chrome console $('label[for^=url]').css('color', 'blue' ); the result always [] i installed tampermonkey, , used same selector above on same page, , surprisingly works fine, script uses // @run-at document-end so both times jquery selector used after page has loaded why it not work through console , works through tampermonkey/greasemonkey $('label[for^=url]').css('color', '#0000ff' ); use color-code instead of color name

css - webkit-overflow-scrolling: touch Unknown property name -

i encounter problem when trying create popover (using bootstrap modal) overflow-y:scroll website targeting mobile devices . problem when try scroll element inside popover, the background scrolled . i notice css not recognize property, in message: -webkit-overflow-scrolling: touch (unknown property name.) does know cause of this? , there possible fix or work-around?

database - Commit data in sqlite3 python -

hi have silly question, want sure. have created database based on sqlite3. trigger commit() after 1000k operations not have disk i/o. when seek data on database, select query search in database file or check uncommited data ? thanks. transactions allow isolation , atomicty regarding other users of database. changes make visible in own connection immediately.

objective c - Fetch data from web service in ios -

i developing ios app should pull data web service. have developed basic structure , layout , implemented show static content. but when try load data api use sbjson lib, gives lot of errors dose not support automatic reference counting (arc) forced xcode5. i found solution disabling arc in whole project, again there lot of errors did not have ant data release mechanism free memory space. so now, question is lib can used automatic reference counting or use method use sbjson lib not mess whole project. i quiet new ios development , don't know available options. have googled issue lot nothing worked in case. also read inbuilt json lib can b used development (introduced ios5 , think!). how use , different/ better other 3rd party lib available. technology ios : 7 or later xcodeversion : 5.1.1 application : universal any suggestion great help. in advance!

large files - Parsing urls containing specific filetypes in a mediawiki dump -

i've large .xml file (about 500mb) dump of site based on mediawiki. my goal find url links, contain image filename extensions. group links second level domain , export result containing links in above order. example: there're many links beginning domain.com/ .png, host.com/ .png , image.com/*.png. grouping them in separate files divided specific second level domain it's links - that's final result. so want parse links in wikitext. writing mediawiki parser pain, should use existing parser. the easiest way (easiest not easy) import dump mediawiki install , rebuild tables id needed, export externallinks table.

php - Getting data from a server with BasicValuePairName? -

i'm using jsonparser class create json sended server, need use receive information now, don't know how it, i'm noob, sorry. create json next part of code, , following class. // building parameters params = new arraylist<namevaluepair>(); params.add(new basicnamevaluepair("userid", thought.getuser())); params.add(new basicnamevaluepair("timestamp", "" + thought.gettimestamp())); params.add(new basicnamevaluepair("message", thought.getmessage())); params.add(new basicnamevaluepair("address", thought.getaddress())); params.add(new basicnamevaluepair("latitude", "" + thought.getlatitude())); params.add(new basicnamevaluepair("longitude", "" + thought.getlongitude())); // getting json object // note create product url accepts post method jsonparser jsonparser ...

asp.net mvc 4 - how can I make my own custum registration, login form? -

i beginner mvc. have started new mvc4 project using internet application template using visual studio 2012. started modifying deafult template make registration, login, form , connected database table have created in sql serever express 2012 using entity framework , changing connect string. connected database , atomatically add table available defuault in database. [dbo].[system_users] [dbo].[userprofile] [dbo].[webpages_membership] [dbo].[webpages_oauthmembership] [dbo].[webpages_roles] [dbo].[webpages_usersinroles] when checked putting data in registor form not save on registration database table. how solve problem? in right way start working on internet application template , modifying it?

Eclipse plugin templates don't work after export -

i have made template plugin adds new plugin project templates eclipse. in workspace seems work fine, when export bundle export folder, or update site, templates don't work correctly. have seen both icons can add extensions, files in templates_xxx directory don't seem processed, thought might build.properties problem, when included them (and verified these bundled in jars) behaviour seems same. has had similar experiences, , solved it? thanks ok, i've found out wrong. during development 'imported packages' list of manifest.mf had become cluttered. result, impossible bundle start in target, above behaviour result. lessons learned: always unused dependencies' (dependency analysis in depndencies tab of manifest editor) , remove them the problem show icons added extensions not displayed in production environment

Currying in scala -

w.r.t currying in scala, partly understood below sample code. def product1(f:int => int )(a:int, b:int):int = { println() if(a > b ) 1 else f(a) * product1(f)(a+1, b) } product(x => x * x) (3, 4) out of it., bit confused with product1(f) in product1(f)(a+1, b) just need explanation, goes on here.... :( , how pronounce verbally while explaining... thanks in advance.. product1 has 2 parameter lists. product1(f) application of f function of kind int => int . if call product1(f) so: product1(f) without second parameter list, you'd so-called partially-applied function, i.e. function doesn't have of parameters bound (you'd still need provide a , b )

Excel VBA click a cell in a table controlled by javascript -

i trying create web query excel ran bit of snag. figured out how log web page , click link go right portalid. having trouble getting specific reports. to specific reports, need click link in table appears use javascript. html table below. there 10 cells in table keep code light included first 2 cells. can see, each cell has own unique id can filter correct cell element vba. cannot seem figure out how click cell. <table submenu='1' border='0' cellpadding='6' cellspacing='0' id='ctl02n4c73594f1bf740b982340da2a792ff62_mainm' class="ctl02n4c73594f1bf740b982340da2a792ff62island" style=' background:#141311; border-width:0px; width:100%; cursor:default;' onselectstart="javascript:igmenu_selectstart();" onmouseover="javascript:igmenu_mouseover(this, event);" onmouseout="javascript:igmenu_mouseout(this, event);" onmousedown="javascript:igmenu_mousedown(this, event);"...

ios - OCUnit is deprecated. Error After upgraded Xcode to 5.1 -

Image
i have updated xcode 4.6 5.1 , ios 7.0 to7.1.1now project displaying warning alert view ”ocunit deprecated project “project name” uses ocunit unit testing, deprecated. choose “convert xctest” update project use xctest unit testing.” does affect app when submitting app store? how remove warning (or) how update application use xctest unit testing. no, not affect app store submission. xctest not supported far know if app still runs on older versions of ios. you need switch "at point", because xcode 6, might released beta in next few weeks, not support ocunit. may not able run unit tests @ unless upgrade. but until then, there no pressing need upgrade. when you're ready it, commit changes git/etc can roll if goes wrong, click "convert xctest" button. should work... if doesn't, post here specific problem. as general rule, not rush adopt new features in xcode. there tend bugs , apple abandons new technology year after adopting it. xctest ...

Getting long and lat returns a nullpointexception in android map v2 -

i tried following tutorial google here . believe followed every instruction written still nullpointexception when try long , lat coordinates. it works fine if press target icon in map redirects me current location. when try programmatically, returns nullpointexception. tried looking in stackoverflow similar situations mine far none of them works. if can provide me sample working source file or code can test myself appreciated. below source code in case missed something. in advance. manifest file <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="sample.map.activity" android:versioncode="1" android:versionname="1.0" > <supports-screens android:largescreens="true" android:normalscreens="true" android:smallscreens="false" android:xlargescreens="true" ...

Saving Data from Laravel Form in Bootstrap Modal -

Image
i have bootstrap modal dialog use laravel form register user. here's code: <div id="addpenggunamodal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="modallabel" aria-hidden="true"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h3 id="modallabel">tambah pengguna baru</h3> </div> <div class="modal-body"> {{ form::open(array('url'=>'users/addpengguna','class'=>'form-horizontal', 'method'=> 'post')) }} <ul> @foreach($errors->all() $error) <li>{{ $error }}</li> @endforeach </ul> <div class="control-group"> <label for="firstname" class="con...

submit - Making Comments a mandatory field during gerrit verification -

i need make comments mandatory field in gerrit while entering review scores. can please me on this. there option available in gui or possible on gerrit command line? thanks, you may take @ pre-commit hook: http://book.git-scm.com/5_git_hooks.html

objective c - Accessing the Arcgis secured url using authentication ios -

here trying access secured url using http authentication. still data coming null. code: { nsurl *url = [nsurl urlwithstring:@"http://mysecuredurl.com"]; nsstring *username =@"abc@v.com"; nsstring *password =@"12345"; nserror *myerror = nil; nsmutablestring *loginstring = (nsmutablestring*)[@"" stringbyappendingformat:@"%@:%@", username, password]; nslog(@"loginstring=%@",loginstring); nsstring *authheader = [@"basic " stringbyappendingformat:@"%@", loginstring]; nslog(@"auth header =%@",authheader); nsmutableurlrequest *request = [nsmutableurlrequest requestwithurl: url cachepolicy: nsurlrequestreloadignoringcachedata timeoutinterval: 3]; nslog(@"request %@",request); [request addvalue:authheader forhttpheaderfield:@"authorizatio...

Qt 5.2 or 5.3RC android app development and Google maps usage -

i'm using qt quick (qml) android (and ios) app development , got stuck google maps embeding. believe easiest , reasonable way use webview component. working fine on windows when coming android situation seems bit confusing. understand it's not possible use webview in android application @ moment due fact webkit / webkit widgets not supported in android. can see plan start supporting webengine module should trick. question be, there way embed google maps on android app @ @ moment or i'm in dead end? another wild idea if qt jni calls can maybe me out here? or anyother ways achive similar result? thanks! ِyou can use qdesktopservices open google map url : qstring link = "http://maps.google.com/maps?&daddr="+location; qdesktopservices::openurl(link); or use qt android extras module launch google map intent : string uri = "http://maps.google.com/maps?&daddr="+location; intent intent = new intent(intent.action_view, uri.parse(...

linux - Run wget command via ssh remotely but connection timeout -

i've been struggling 2 days already. i have 2 linux machines , b , trying run following command remotely (as done on b locally): sshpass -p 'somepassword' ssh username@machineb "wget http://someurl.com/somefile.zip " somefile.zip should downloaded , kept on b connection timeout. running command directy on macnine b works fine. presume there issues ssh. this script needed teamcity continous integration. p.s. sshpass utility run command via ssh without user interaction specifying password. what issue , how fix it? thank you. update: proxy settings should specified in ~/.bashrc file non-interactive sessions. reason proxy setting in /etc/profile works interactive sessions. i've not tried sshpass, guess connection timeout connecting b, not b making http request. suggest using ssh keys instead, i'm pretty sure work you. to setup ssh keys, run command on a: ssh-keygen -t rsa -b 4096 -f ~/.ssh/id_rsa -n '' the above creat...