Posts

Showing posts from January, 2011

stable marriage - My method isn't putting names into my array and removing them properly -

stable marriage - My method isn't putting names into my array and removing them properly - i've been working on "stable marriage problem" class i'm in , cannot implement gale-shapely algorithm correctly. out set when prompted: for (int q = 0; q < nummen; q++ ) system.out.println(couples[q].tostring()); is "brian patricia george nancy john susan robert nancy stephen joyce" on different lines. how ever proper combination "brian patricia george joyce john susan robert nancy stephen anne. issue won't remove "nancy" george's pair. background men[][] matrix of men's preferences in format men[i][0] name of each man 0 < < 4 , men[i][k] k preferences in positions 1 < k < 5. same thing women matrix. couples[] array of object "couple" , array holds each matched pair of man , woman. here's place problem is: public static void solvemenmarriages() { int i, k; string m, w, fiance; = 0

CSS background image wont stay put -

CSS background image wont stay put - my problem this: using 3 background images web page, 2 of them able position correctly using 'background-position' property 3rd image (lady.png) not remain want on page when browser window stretched wider. appears beingness positioned relative the border of browser. have tried utilize 'background-attachment:fixed' maintain photo in 1 place not working. what want main top , bottom graphics aligned 'top center' , image of woman 200px left , 300px downwards top. have tried 'background-position: 200px 300px' still moves frame. assistance appreciated. here code of page: http://dev.salonbuilder.com/website/150099/services.asp <td width="100%" style="background-image:url(<%=imagepath%>lady.png),url(<%=imagepath%>new-bg-top.jpg),url(<%=imagepath%>new-bg-line.jpg);background-repeat:no-repeat,no-repeat,repeat-y;background-position:80px 150px, top center,top center; backgrou

ruby - Faster cycle detection in a Directed Acyclic Graph? -

ruby - Faster cycle detection in a Directed Acyclic Graph? - i have programme in ruby 1.9.3 constructs rubytree. info best described beingness directed acyclic graph (dag); please note not polytree. well, @ to the lowest degree info should dag, despite users' best efforts foil programme bad data. i build dag dynamically parsing xml document. xml document not explicitly specify tree structure, provide cross-references of integer ids found links between elements in document. i need ensure rubytree not contain cycles. source info may (erroneously) have cycle, , if does, programme needs aware of it, rather entering infinite loop or crashing. accomplish currently, mixed in ruby standard library's tsort module rubytree's tree::treenode class. uses tarjan's algorithm perform topological sort on graph each time node added. during topological sort, if cycle detected, exception raised -- want. for example: module tree class treenode include tsort

Is it possible for Gradle projects in Eclipse/STS to resolve dependencies to other Gradle projects in the same workspace? -

Is it possible for Gradle projects in Eclipse/STS to resolve dependencies to other Gradle projects in the same workspace? - a gradle project in workspace (call downstream) needs depend on gradle project (call upstream). outside of eclipse, of course of study upstream need build , install ed before downstream (so gradle can resolve it). in eclipse, since both projects in workspace together, i'd have gradle in workspace first , create dependency between projects, not repo. m2e (maven integration eclipse) (the alternative called resolve dependencies workspace). gradle eclipse plugin has alternative called remap jars maven projects seems pom-driven m2e projects, not other gradle projects. is there way gradle resolve dependencies local workspace (when they're present) instead of repo? it turns out is outstanding feature request gradle ide. has been delivered 3.6.3 release of gradle ide. you do have enable it, though: the feature has enabled in gradle prefe

ios - Asset catalogues and multiple targets -

ios - Asset catalogues and multiple targets - before start , move towards utilize of asset catalogues (which seems alternative in xcode 6, apart manually manipulating info.plist) inquire if there way have different asset catalogues different build targets. i have multiple targets different apps using same code base. far had different folders each target icons etc. , included ones wanted. how do asset catalogues, or best way deal situation in xcode 6? you can have several "icon app" in same xcassets file (right-click + new app icon). can select "icon app" want utilize each of target. ios iphone xcode xcode6 asset-catalog

How to use a shortcut to read in the price amount without the dollar sign in C? -

How to use a shortcut to read in the price amount without the dollar sign in C? - this question similar question asked before why not getting right char values scanf(c linux vi) when scanning file? . i learned answers question can utilize scanf scanf(" %c") skip on blank spaces , white lines when reading in character. there shortcut can work money too? user types $4.22 standard in. there scanf lets skip on special characters , interpret money amount float? or have scanf character first , scanf float money amount? if know there $, can include in format, scanf("$%d.%d", &dollars, &cents). seek it! $ cat scan.c #include <stdio.h> int main() { int dollars, cents; scanf("$%d.%d", &dollars, &cents); printf("that's %d dollars , %d cents.\n", dollars, cents); homecoming 0; } $ create scan cc scan.c -o scan $ ./scan $4.22 that's 4 dollars , 22 cents. $ c

internet explorer - Is the command line used when opening a file from the browser? -

internet explorer - Is the command line used when opening a file from the browser? - when utilize net explorer (or other browser) , seek download file, can little menu asks if "open or save" file. if click "open," command line run , there way me see or capture command line prompt in vb6 application? for example, net explorer asks me if want open or save .abc file. click open. want myproject1.exe (written in vb6) read command line used open .abc file. (assuming file association exists between myproject1.exe , .abc extensions) is possible? you can read in command line arguments via command() function try next test project: '1 project with: ' 0 forms ' 1 module ' startup object in project properties should set sub main alternative explicit public sub main() dim intarg integer dim strcmd string dim strarg() string dim strshow string 'read command line strcmd = command if len(strcmd) > 0 'split c

C# XNA: Custom drawing class isn't printing text though it has the location right -

C# XNA: Custom drawing class isn't printing text though it has the location right - so i'm trying draw text c# , xna. i've got spritefont loaded in fine, no bugs in code , no compile-time warnings or errors. no errors thrown during execution. when draw text main game class, works fine. however, i've got separate class i'm trying draw from. i've created instance of it, called constructor , draw() function of it, yet still doesn't work. here's main game class (the relevant bits anyway): protected override void draw(gametime gametime) { graphicsdevice.clear(color.turquoise); if (!startscreen.hasrun) { // works fine spritebatch.begin(); spritebatch.drawstring(spaceage, "score 0", new vector2(50, 50), color.black); spritebatch.end(); // fails draw startscreen.draw(spritebatch); } else { } base.d

How to provide links for users to put more information in HTML5 forms -

How to provide links for users to put more information in HTML5 forms - i trying build online application form in html5 , 1 of sections qualifications of candidates. there no way, of course, of knowing how many listed have layout 1 , add together more link below can add together more qualifications if applicable. i not sure how accomplish and, also, how info posted server-side scripting post-processing of form (i.e. if textbox name university uni_attended , info in $_post['uni_attended'] , adds sec university how access it)? regards, george html5 forms

java - Counting Vowels, Repetition method -

java - Counting Vowels, Repetition method - public static void main(string args[]) { scanner sc = new scanner(system.in); int countvowel=0; int countvowela=0; int countvowele=0; int countvoweli=0; int countvowelo=0; int countvowelu=0; char ch; string str; system.out.println("please come in string : "); str = sc.nextline(); for(int = 0; i<=str.length(); ++) { ch = str.charat(i); if(ch == 'a' || ch =='a') { countvowela++; countvowel++; } if(ch == 'e' || ch =='e') { countvowele++; countvowel++; } if(ch == 'i' || ch =='i') { countvoweli++; countvowel++; } if(ch == 'o&

3d - Fast method to rasterize triangle in python -

3d - Fast method to rasterize triangle in python - in python want rasterize 2d triangle 3d triangle fast possible , clip pixels out of z bounds. can convert 3d coordinates 2d, can't seem rasterizing working. i'm using set pixel method takes (x,y,colour) , (0,0) @ top left. thanks help. triangle code used. def triangle(self,v = vec2(0,0),v1 = vec2(0,0),v2 = vec2(0,0), colour = 0xffffff): sort = sortvecbyy(v,v1,v2) = sort[0] b = sort[1] c = sort[2] if b.y == c.y: self.flatbottomtri(a,b,c,colour) elif a.y == b.y: self.flattoptri(a,b,c,colour) else: d = vec2(int(a.x + (float((b.y-a.y)/(c.y-a.y))) * (c.x - a.x)),b.y) self.flatbottomtri(a,b,d,colour) self.flattoptri(b,d,c,colour) def flatbottomtri(self,v1,v2,v3,colour): r1 = (v2.y - v1.y) s1 = 0 if r1 != 0.0: s1 = (v2.x - v1.x) / r1 r2 = (v3.y - v1.y) s2 = 0 if r2 != 0.0: s2 = (v3.x - v1.x) / (v3.y - v1.y) x1 =

xml - Congressional Bills into R data table -

xml - Congressional Bills into R data table - i've read many articles, stackoverflow, examples on how extract info xml files info table in r. have been unsuccessful in attempts, perhaps it's because of xml files? im posting illustration xml file, if give on , point me in direction these files have table, helpful. ' <bill session="113" type="s" number="12" updated="2014-09-20t07:17:52-04:00"> <state datetime="2013-02-26">referred</state> <status> <introduced datetime="2013-02-26"/> </status> <introduced datetime="2013-02-26"/> <titles> <title type="short" as="introduced">naval vessel transfer deed of 2013</title> <title type="official" as="introduced">a bill provide transfer of naval vessels foreign recipients.</title> </titles> <sponsor id=&

javascript - angularjs, Scope not updating across functions - with ngTouch -

javascript - angularjs, Scope not updating across functions - with ngTouch - i have controller such: $scope.myvar = 0; $scope.back = function () { $scope.myvar--; }; $scope.next = function () { $scope.myvar++; }; if next() (with ngclick) called 3 times, get: //1 //2 //3 but if back() (with ngswipeleft) called returns //-1 when i'm expecting //2 what missing here? update: including ngtouch details - seems problem.. ngtouch included. when watch myvar value - exists twice - 1 ngswipeleft call, , 1 ngclick call your snippet looks fine me. need provide more code, error might somewhere else. @ code below. <!doctype html> <html ng-app="myapp"> <head> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.12/angular.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.2.20/angular-touch.min.js"></script> &

Java socket timing out: Broken pipe -

Java socket timing out: Broken pipe - i'm writing simple server in java, , i'm able retrieve incoming info client on server side, not on client side due 2000ms timeout. know why times out? this server's code: private static void listen() throws ioexception { while(true) { socket clientsocket = serversocket.accept(); stringbuilder bufferedstringinput = new stringbuilder(); charbuffer cbuf = charbuffer.allocate(4096); seek { inputstream = clientsocket.getinputstream(); bufferedreader br = new bufferedreader(new inputstreamreader(is, "utf8")); int nocharsleft = 0; while ((nocharsleft = br.read(cbuf)) != -1) { char[] arr = new char[nocharsleft]; cbuf.rewind(); cbuf.get(arr); bufferedstringinput.append(arr); cbuf.clear(); } system.out.println(bufferedstringin

css - How to disable responsive layout in Bootstrap 3 on small devices -

css - How to disable responsive layout in Bootstrap 3 on small devices - is possible disable responsive layout in bootstrap 3 on little devices? for illustration on devices smaller 1000px display horizontal scroll , stop resizing elements. css twitter-bootstrap layout twitter

xslt - Remove duplicate subcategory block items from xml -

xslt - Remove duplicate subcategory block items from xml - <category link-id="681" link-handle="package-products" value="package products"> <entry id="1077" images="1" products="1" brands="1"> <sub-category> <item handle="pens">pens</item> <item handle="refills-pens">refills : pens</item> </sub-category> </entry> <entry id="1075" images="1" products="1" brands="1"> <sub-category> <item handle="pencil">pencil</item> <item handle="refills-pencil">refills : pencil</item> </sub-category> </entry> <entry id="1073" images="1" products="1" brands="1

oauth - OAuth2 returning JWT in place of access_token -

oauth - OAuth2 returning JWT in place of access_token - i in process of building oauth2 provider using bshaffer php library here. i've found ietf draft specifications outline implementations phone call out usage of json web tokens authorization grant , client authentication. the implementation interests me returning jwt in place of regular access token, seen here. in case of dead link, access token response pasted below. { "access_token":"eyj0exaioijkv1qilcjhbgcioijsuzi1nij9.eyjpzci6ijyzmjiwnzg0yzuzoda3zjvmztc2yjg4zjzknjdlmmexztixodlhzteilcjjbgllbnrfawqioijuzxn0iensawvudcbjrcisinvzzxjfawqiom51bgwsimv4cglyzxmiojezodawndq1ndisinrva2vux3r5cguioijizwfyzxiilcjzy29wzsi6bnvsbh0.pcc4k8q_etpu-j4ygfeubudeymjhtpzfkvq__sxpe78esi7xtniqootgfwa62y4sj5npta8xpudglh8fueh_apzx4wgcire1p4nt4apqcotbgcucnxwjmp8znk9f76id2wxthambmpsttekuyyuyqkccdxlicsbvvclzugkz6-g", "client_id":"client_id", "user_id":null, "expires"

javascript - Using AJAX to send and receive info from a server -

javascript - Using AJAX to send and receive info from a server - i'm working on page supposed interact server via ajax, experience ajax extremely limited. here's how page supposed work. when button clicked, if "test" radio button clicked, display pop saying input valid. when button clicked, if "live" radio button clicked, programme supposed send request server using url "http://cs.sfasu.edu/rball/351/exam2.php" contents of input box beingness value "name" parameter. page send json object need parse regular variable. i'll leave rest of json stuff lone since that's not asked. so far have design of page done, said don't know i'm doing ajax stuff. have code written it, not sure it's right. here code: <html> <head> <title>anner, taylor</title> <style type = "text/css"> canvas { border: 2px solid black; }

petrel - Writing to a seismic cube in ocean using using 3D array -

petrel - Writing to a seismic cube in ocean using using 3D array - i read samples seismic cube using int numi = inputscube.numsamplesijk.i; int numj = inputscube.numsamplesijk.j; int numk = inputscube.numsamplesijk.k; double[, ,] inputseismiccubedata = new double[numi, numj, numk]; (int = 0; < numi; i++) { (int j = 0; j < numj; j++) { itrace trace = inputscube.gettrace(i, j); (int k = 0; k < numk; k++) { inputseismiccubedata[i, j, k] = trace[k]; } } } after applying algorithms generated output seismic info 3d array of same size inputseismiccubedata and worte info cube as using (itransaction trans1 = datamanager.newtransaction()) { seismiccollection sc

Elm signals and type annotation -

Elm signals and type annotation - from elm newbie long-time haskeller, quick query. the aim: there map towns on @ designated positions on it, , want check if user click close town, , identify town. so, collect signal usual: clickpositionssignal = sampleon mouse.clicks mouse.position that gives me tuple, want turn int (denoting number of nearest town). towns designated positions : [position] type position = {number : int, x : int, y : int} the function is: whichtown : (int,int) -> int whichtown (x,y) = allow pz = map (\p -> getdistance p.x p.y x y) positions |> head in pz.number now, need apply function clickpositionssignal. looking around various examples, modified code to.... whichlocationsignal : signal int whichlocationsignal = allow wbl (x,y) = whichtown(x,y) in wbl <~ clickpositionssignal .... , works. number of nearest town. but hopelessly cumbersome , duplicative. question why can

eclipse - How to fix these errors in latest build of Android SDK -

eclipse - How to fix these errors in latest build of Android SDK - hi i'm pretty new android programming. have downloaded android eclipse bundle , extracted folder , updated sdk. later have created new 'hellodroid' programme getting these error when project created. could 1 please help me prepare these error , explain why these errors occurring. note: have installed back upwards upto v.19 starting froyo set compatible values for: minsdkversion / targetsdkversion in androidmanifest.xml android > project build target in project properties android back upwards libraries after rebuild project. android eclipse

graphics - JavaFX TreeView: setGraphic() for different levels of treeItem -

graphics - JavaFX TreeView: setGraphic() for different levels of treeItem - i'm creating treeview should have different graphics different levels of treestructure. 3-level structure, root hidden. the graphic expandable nodes: http://i.imgur.com/wv00cei.png the graphic leaf nodes: just label in hbox. this have tried far, nullpointerexception saying gettreeview null: customtreecellfactory public final class customtreecellfactory extends treecell<string>{ private textfield textfield; private hbox hbox; public customtreecellfactory(){ super(); if (gettreeview()==null){ system.out.println("her er problem"); } if (gettreeview().gettreeitemlevel(gettreeitem())==1){ seek { hbox = (hbox) fxmlloader.load(getclass().getresource("/views/trecell.fxml")); } grab (ioexception e) { system.out.println("this didn't work"); e.printstacktrace(); } } e

HttpClient DELETE with object -

HttpClient DELETE with object - i making solution against rest-interface using c# - httpclient , newtonsoft.json. one of methods requires delete url , json-object. i not able alter rest-service, has solved in own code. what missing delete-alternative myclient.postasjsonasync(url,json-object) i aware, seems possible using solved using httpwebrequest, rather go on using httpclient. so have clue how solve this? simply utilize httpclient.deleteasync(url) , , why not set target of delete url, /api/products/id instead of passing json object. dotnet-httpclient

javascript - How shuffle a file (which contains an array) before using it? -

javascript - How shuffle a file (which contains an array) before using it? - i using std mp3 player in webpage. javascript function includes next line: <param name="flashvars" value="playlist=http://..../mp3_playlist.txt" /> the file contains array of mp3 file names (separated new lines). i want shuffle playlist changes each time it's visited. so added shuffle function: var plist = new array(); $.get('http://..../mp3_playlist.txt', function(data){ plist = data.split(/\r\n|\r|\n/); plist = shuffle(plist); }); what syntax should utilize insert array ref function instead of file name? help. javascript arrays

html - How do I set Highslide expander size? -

html - How do I set Highslide expander size? - i'm trying set in-page highslide gallery on site. however, i'm experiencing problems setting size of epxander. the page gallery http://civicsector.org.ua/multimeda/foto/208-akcya-geroyi-nezalezhnost.html (wait moment until page loads completely) i want big image (the expander) no more than, say, 300x200 px. however, right 960x720. the annoying thing can't find place in code 960x720 size set. i'm trying set 300x200 size in code, reason not work: $gallery = " hs.align = 'auto'; hs.transitions = ['expand', 'crossfade']; //hs.width = 200; //hs.zindexcounter = 1; // add together slideshow providing controlbar , thumbstrip hs.addslideshow({ //slideshowgroup: 'group1', interval: 5000, repeat: true, usecontrols: true, //relativeto: 'viewport', overlayoptions: { position: 'bottom center', offsety: 50, offsetx: -5

linux - How checkpatch.pl work and what exactly we can get by running it on a patch? -

linux - How checkpatch.pl work and what exactly we can get by running it on a patch? - i new linux , git . want know checkpatch.pl script does. know there source code available on net it's perl script , didn't know perl . so, can here explain me here ? it tool check coding style match linux coding style or not. can utilize -help see options can use. after check file, tool prints result compile result. result show line has coding style errors , warnings, , reminds how modify code. , can modify script tool match own coding style. linux git

css - neat grid truncated left and right -

css - neat grid truncated left and right - i'm using neat 1.7 having problem aligning grid columns neat grid (grid gets truncated left , right) when using background image page @include background-image(url("../img/background.jpg")); found solution.... problem next 2 line of code, best not utilize in top div tags... utilize in lower div tags .grid_head . grid_content , grid_footer font-size: 13px; line-height: 157% **_grid-settings.scss** // alter grid settings $column: 90px; $gutter: 30px; $grid-columns: 12; $max-width: em(1088); // define breakpoints $tablet: new-breakpoint(max-width 768px 8); $mobile: new-breakpoint(max-width 480px 4); // _struct.scss file .grid_back { @include background-image(url("../img/background.jpg")); color: #adadad; letter-spacing: 0px; min-width: 1020px; font-family: "lucida sans unicode", "lucida grande", sans-serif; font-size: 13px; // remove this...

internet explorer 8 - Merging media queries, using SASS and Breakpoint (Respond-To) -

internet explorer 8 - Merging media queries, using SASS and Breakpoint (Respond-To) - using sass , respond-to (breakpoint) produces .css file multiple media queries, not merged. not big deal, in ie8, using css3-mediaqueries.js, cause ie8 crash. css3-mediaqueries.js add together style tag every mediaqueries, , ie8 can't 32... how can merge media queries automatically? thanks generally, multiple media queries not big deal gzip beingness used compress css when passed server client. to enable media queries back upwards in ie7 , 8, i've been succesfully using respond.js. see little guide how combine respond.js selectivizr: http://stackoverflow.com/a/16732064/901944 internet-explorer-8 sass media-queries

android - Getting Header information with RXJava and Retrofit -

android - Getting Header information with RXJava and Retrofit - i'm trying convert app uses retrofit, utilize rx java. in order handle pagination, traditionally grabbing nextpage url response headers. @override public void success(assignment assignment, response response) { response.getheaders(); // stuff header info } however, since switching rx java, i'm not sure how response info retrofit call. @get("/{item_id}/users") observable<list<objects>> getobjects(@path("object_id") long object_id); @get("/{next}") observable<list<objects>> getnextpageobjects(@path("next") string nexturl); is there way have retrofit calls homecoming header info along typed objects? you can utilize observable<response> as homecoming type response details @get("/{item_id}/users") observable<response> getobjects(@path("object_id") long object_

unity3d - Unity - Failed to compile resources with the following parameters: -

unity3d - Unity - Failed to compile resources with the following parameters: - i'm working on adding google play game services unity project. started getting these errors recently, not sure if because of game services, or updated machine. the next in console output: failed compile resources next parameters: -bootclasspath "/users/alex/development/adt-bundle-mac-x86_64-20131030/sdk/platforms/android-21/android.jar" -d "/users/alex/documents/development/unity/maze/maze/temp/stagingarea/bin/classes" -source 1.6 -target 1.6 -encoding utf-8 "com/facebook/android/r.java" "com/google/android/gms/r.java" "com/google/example/games/basegameutils/r.java" "com/google/example/games/mainlibproj/r.java" "com/mildspring/maze/r.java" warning: java/lang/object.class(java/lang:object.class): major version 51 newer 50, highest major version supported compiler. recommended compiler upgraded. 1 warnin

multithreading - java socket takes too much cpu% and virtual memory -

multithreading - java socket takes too much cpu% and virtual memory - i have developed java socket, takes many cpu , virtual memory usages. can tell me problem in code? private void listen() { seek { serversocket = new serversocket(port); system.out.println("server socket listening on port: " + port); system.out.println("waiting connections..."); while(true) { // take connection socket socket = serversocket.accept(); socket.setsotimeout(30000); system.out.println("got connection"); // start processing connection thread connectionmanager = new thread(new elevator(socket, socket.getinputstream()));//new thread(new connectionmanager(socket, odometer)); connectionmanager.start(); } } grab (ioexception exc) { system.out.println(listener.class.getname() + ": " + exc.getmessage()); } } in lift c

objective c - how to perform navigation[segue] from midle of the flow + ios application -

objective c - how to perform navigation[segue] from midle of the flow + ios application - im working on navigation based application. have used story board design interfaces. , utilize login functionality too. in app delegate class im checking weather user has loged in , according login state im loading either home page or login page. my problem , when open view controller , other functions not working. such , have button in home page force view. when app launch home, button not working.[does not force desired view ]. tried programmatically did not worked well. so here how story board looks like here app delegate code open app according login status nsuserdefaults* userinfo = [nsuserdefaults standarduserdefaults]; nsstring* client =[userinfo stringforkey:@"username"]; if((customer!=nil)){ //redirect diferent pages // detailpageclass *detailpage = [[detailpageclass alloc] initwithnibname:@"detailpageclass" bundle:nil]; uistoryboard *ma

facebook - How to get text from gmail and paste that text in another tab using selenium web driver -

facebook - How to get text from gmail and paste that text in another tab using selenium web driver - i have 1 test case like,when forget password in application facebook or myat&t site,i have click forget password link , come in email , click submit.after temporary password send email.my task that,to temporary password , switch old tab , paste text in temporary password text box. is there solution this,please help me solve this. thanks in advance, santhosh i'll never way want do. meaning, launching gmail , copying password browser. consumes more time , i'm not testing gmail. there 2 possible solutions can think of. in regression environment, set password generated constant value if possible. , utilize same in test. in approach not testing "email send" mechanism of app, if not intent of test utilize approach. simple one. use email client library, available in languages (eg: http://stackoverflow.com/a/8293945/1520443). utilize assess passwo

c# - Set DataContext in XAML Rather Than in Code Behind -

c# - Set DataContext in XAML Rather Than in Code Behind - i've read in other posts in place of specifying datacontext in code behind can specified in xaml. i have observablecollection declared , populated in constructor of main class set datacontext: using system; using system.windows; using system.collections.objectmodel; namespace itemscontroldemo { public partial class mainwindow : window { public observablecollection<person> personlist { get; set; } public mainwindow() { initializecomponent(); personlist = new observablecollection<person>(); personlist.add(new person(16, "abraham", "lincoln")); personlist.add(new person(32, "franklin", "roosevelt")); personlist.add(new person(35, "john", "kennedy")); personlist.add(new person(2, "john", "adams")); personlist.a

javascript - Cordova 3.6.3 File plugin - get local video file on android -

javascript - Cordova 3.6.3 File plugin - get local video file on android - what i'd is get uri of video file on device via cordovas javascript api set uri value of html5 video tag's src attribute. the sec part shouldn’t problem. concerning first task, there lot of structured tutorials raymond camden's demonstrating how local files through javascript in cordova environment. however, newest version of cordova, not work. the video file the video located either in assets/www/videos/testvid.webm or res/raw/testvid.webm in built apk file. both variations did not work. the javascript mypath = cordova.file.applicationdirectory; // -> file:///android_asset/ //mypath += "www/videos/testvid.webm"; respectively mypath = cordova.file.applicationstoragedirectory; // -> file:///data/data/com.example.mypackage/ //mypath += "raw/testvid.webm"; then: window.resolvelocalfilesystemurl(mypath, gotfile, fail); function gotfile(entry){