Posts

android - Delphi XE5 TLocationServices on Samsung Galaxy 2 not using GPS -

i have simple app should return current gps location, code below, based on tutorial provided embarcadero. when executed, gps icon of samsung not display , location returned 100m off true location. i've experimented various valued 'accuracy' , tried setting 'accuracy' both before , after setting object active - no change in behaviour. other apps i've obtained, including 'maps' comes galaxy, show gps icon when in use , return correct positioning. with gps icon not display, i'm assuming app not using gps - how instruct so? (fine location permissioned) procedure theaderfooterform.formcreate(sender: tobject); begin locationsensor1.active := true; locationsensor1.optimize := true; locationsensor1.accuracy := 100000; locationsensor1.distance := 0; end; procedure theaderfooterform.locationsensor1locationchanged(sender: tobject; const oldlocation, newlocation: tlocationcoord2d); var urlstring: string; urlloadfile: tstr...

javascript - Html5 video trigger "ended" event when no internet connection -

i using tag on android webview. code: <div class="video-wrapper"> <video id="video" class="video-full-screen" preload="none" webkit-playsinline poster={poster url here}> <source id="mp4" src="{video source here}" type="video/mp4"> <p>your user agent not support html5 video element.</p> </video> </div> i register following video events: var video = $('video'); video.bind("canplay", function(){ console.log("canplay"); }); video.bind("playing", function(){ console.log("playing"); }); video.bind("waiting", function(){ console.log("waiting"); }); video.bind("ended", function(){ console.log("ended"); }); video.bind("canplay", function(){ console.log("canplay"); }); when disconnect internet before pressing video's...

java - android beanutil.copyproperties not working in dalvik -

i´ve been trying add apache bean utils android project in order use beanutil.copyproperties . adding through gradle easy , project compile straight forward. i´ve realised once make call beanutils.copyproperties in runtime, seems dalvik not have same java.beans jdk crash immediately. are there way solve these issues java.bean classes? there alternatives beanutils.copyproperties ? thanks

configure seam 2.2 entitymanager to work on websphere 7 -

i create jboss seam 2.2 application using seam-gen tool (ear file) application works fine on jboss 4.3, i managed run application on websphere 7 after modifying jars per documents available on seam reference docs, the problem: tried many ways configure persistence connect database, didn't work. correct way have application connect db (oracle) created working data-srouce inside websphere 7 i'm not sure correct configuration inside (components.xml) , (persistence.xml) thanks in advance 1- persistence.xml <?xml version="1.0" encoding="utf-8"?> <!-- persistence deployment descriptor prod profile --> <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0"> ...

javascript - Getting specific content from page to be inserted to bootstrap 3 modal via ajax -

i trying pull specific content page bootstrap 3 modal via ajax can pull in whole page. here jquery code: function winemap() { var wh = $(window).height(); var hh = $('#masthead').height(); $('.wine-menu #mainstage').css({ height: wh-hh-80 }); $('#wine-map').vectormap({ map: 'world_en', backgroundcolor: '#000', color: '#ffffff', hoveropacity: 0.7, selectedcolor: '#666666', enablezoom: true, scalecolors: ['#ffffff', '#eeeeee'], normalizefunction: 'polynomial', onregionclick: function(element, code, region){ if (code == 'us') { var url = 'http://cb.dannycheeseman.me/wine-menu/'+code; } $('#themodal').modal({ show : true, remote: url }); } }); } $(document).ready(functio...

javascript - How to include socket.io script in my HTML page? -

i trying use socket.io @ node.js having trouble setting up. i installed socket.io node module node by: npm install socket.io my node working , getting message info - socket.io started @ node start. socket @ node listens same port http server on node. problem setting client system. all tutorials have referred on internet work under assumption client file , node file (i.e. html file , node.js file) in same directory , include socket.io script in html by: <script src="/socket.io/socket.io.js"></script> but system setting have separate directories node , client namely nodejs , web (i using nginx websocket). socket.io node module inside node_modules directory under nodejs directory. how include socket.io script in client html? should copy socket.io node module files in web folder well?

spring - joining two tables with non-Primary key attributes using hibernate annotations -

i have table attributes a1(pk), a2, a3 i have table b attributes b1(pk), b2 , b3 now, need join table , b on basis of a3 = b3. can tell me how in hibernate annotations using join. problem how specify column of table mapped on column of table b in mapping file both column not primary keys. like this: b { @manytoone @joincolumn(name = "b3", referencedcolumnname = "a3") privte a; } you have specify in relationship columns joined. for vise versa: a { @onetomany @joincolumn(name = "a3", referencedcolumnname = "b3") privte list<b> blist; }