Posts

android - Using part of map inside application -

is possible save part of google map , add application , display it? beacuse need limited area , dont want use internet connection in application. or maybe there possibility restrict area in online map? if want save map once loaded , use map in application have save map in device sd card , display ever want. below code save screen shot/image of google map - public void savemaptosdcard() { snapshotreadycallback callback = new snapshotreadycallback() { bitmap bitmap; @override public void onsnapshotready(bitmap snapshot) { bitmap = snapshot; try { fileoutputstream out = new fileoutputstream(filepath+filename); bitmap.compress(bitmap.compressformat.png, 100, out); } catch (exception e) { e.printstacktrace(); } } }; mymap.snapshot(callback); } and call , later when want display map image sdcard , display it. hope...

javascript - run simple html or js file in node -

i've created node folder , install node server working fine want add simple html file or js file , run it, simplest way ? thanks! either nodemon through npm, , in terminal run nodemon [your file here] or can use node [your file here] . nodemon nice because restart server when change files within it.

vb.net - How to create a multilingual project -

Image
i'm new vb.net , i'm trying simple multilingual project. so far i've created 2 resource files: en-us.resx pt-pt.resx in both of them have same id's , diferent values (strings only) (these strings used across multiple forms) when change laguage do: thread.currentthread.currentculture = new cultureinfo("en-us") or thread.currentthread.currentculture = new cultureinfo("pt-pt") based on language want see. but dont know how access resource files properly, doing: dim assembly system.reflection.assembly assembly = me.gettype.assembly dim resourcemanager new system.resources.resourcemanager("my.resources", assembly) msgbox(resourcemanager.getstring("test")) gives me exception system.resources.missingmanifestresourceexception' occurred in mscorlib.dll what missing? edit after first sugestion: this example requires text-based resource files listed in following table. each has single stri...

android - How to make SharedPreferences read/write work on non-UI thread? -

sharedpreferences read , write operations default working on ui thread. how make run in other threads avoid blocking main thread? sharedpreferenced related context. can reference through context. you can pass context parameter class. example in constructor. in activity do: myclass myclass = new myclass(this);

Confused about linking an interactive element Javascript/HTML -

i've been working on website coursework, i've gotten bit stuck. i'm trying hyperlink images i've put inside of carousel (although done weirdly, i'm told). code below. javascript : function changeimageloop(button_id) { var image = document.getelementbyid('banner' + n); if (button_id = "right") { n += 1; } else { n -= 1; } if (n > maxn) { n = 1 } if (n < 1) { n = 3 } image.src = "fancy dress banner " + n + ".png"; image.id = "banner" + n; } and html : <div class="content"> <div class="imageslide"> <a href="costumes.html"> <img id="banner1" src="fancy dress banner 1.png" alt="musical fancy dress"> </a> </div> <div class="imageleft"> ...

how to remove comments in xml without removing its text in xslt -

input file <a> <b> <!--<docinfo:topiccodes><docinfo:topiccode>#pa#hkcrp#</docinfo:topiccode> <docinfo:topiccode>#pa#hkcrpm#</docinfo:topiccode><docinfo:topiccode>#pa#hkdis#</docinfo:topiccode><docinfo:topiccode>#pa#hkdism#</docinfo:topiccode><docinfo:topiccode>#pa#code#</docinfo:topiccode></docinfo:topiccodes>--> </b> </a> output expexted <a> <b> <docinfo:topiccodes><docinfo:topiccode>#pa#hkcrp#</docinfo:topiccode> <docinfo:topiccode>#pa#hkcrpm#</docinfo:topiccode><docinfo:topiccode>#pa#hkdis#</docinfo:topiccode><docinfo:topiccode>#pa#hkdism#</docinfo:topiccode><docinfo:topiccode>#pa#code#</docinfo:topiccode></docinfo:topiccodes> </b> </a> xslt written <xsl:template match="comment()"> <xsl:value-of select="."/> </xsl:template> ...

javascript - jQuery autocomplete not firing for one of three on a page -

i have 3 autocomplete textboxes on page , cannot figure out why 1 of them not source data, function never fired other 2 are. here js: $("#txtuserid").autocomplete({ delay: 0, minlength: 0, autofocus: true, source: function (request, response) { $.ajax({ type: 'get', data: { 'data': request.term }, datatype: 'json', url: '@url.action("getallusers")', success: function (data) { response($.map(data, function (obj) { return { value: obj.value, label: obj.text } })); } }); }, select: function (event, ui) { neworold = "old"; $.ajax({ type: 'get', d...