Posts

Showing posts from September, 2014

java - UnsatisfiedLinkError Libgdx Desktop -

i running issues libgdx on desktop. keep getting following error when trying launch application: exception in thread "main" java.lang.unsatisfiedlinkerror: com.badlogic.gdx.utils.bufferutils.newdisposablebytebuffer(i)ljava/nio/bytebuffer; @ com.badlogic.gdx.utils.bufferutils.newdisposablebytebuffer(native method) @ com.badlogic.gdx.utils.bufferutils.newunsafebytebuffer(bufferutils.java:288) @ com.badlogic.gdx.graphics.glutils.vertexarray.<init>(vertexarray.java:62) @ com.badlogic.gdx.graphics.glutils.vertexarray.<init>(vertexarray.java:53) @ com.badlogic.gdx.graphics.mesh.<init>(mesh.java:148) @ com.badlogic.gdx.graphics.g2d.spritebatch.<init>(spritebatch.java:173) @ com.badlogic.gdx.graphics.g2d.spritebatch.<init>(spritebatch.java:142) @ com.badlogic.gdx.graphics.g2d.spritebatch.<init>(spritebatch.java:121) @ com.badlogic.gdx.graphics.g2d.spritebatch.<init>(spritebatch.java:115) i have following libraries added project: gd...

web services - Create web site using Objective-c -

today when reading article appcode ide had written support css, javascript & html . after surfed few website found info cappuccino xocde ide. how far objective-c supports in creating web site application, objective-c ends ios & osx frameworks used in creating ui web site . xcode ide supports development on c, c++, objective-c, objective-c++, java, applescript, python , ruby mainly. although can write html files not best choice ide web development. there plenty many outside textmate , coda , or 2 mentioned appcode , cappuccino. objective-c , programming language, purpose develop software ios , osx, there frameworks lets use web development gnustepweb or fronthkit . hasn't been updated since 2010, because of more mature frameworks django , rails .

css - My website flashes white between page loads and is doing poorly in search engines -

i don't know if css code in bad shape, if i've done wrong, or if i've not done should doing. website flashes white when navigating between pages. additionally, it's doing poorly search engines despite every effort have ranked higher. i'm new hope can me in simple terms. you can't fix white flash, that's page loading, if have decent browser it'll cache background , it'll flash less have chache turned off on browser why notice much, change background white, it's not annoying advice. can how ever load new content , replace on same page jquery ajax , won't have , page loads , flash. , page rank takes years earn.

go - Golang new template not working -

when run: t, _ := template.parsefiles("index.html") t.execute(w, nil) the page loads fine. when try , run t := template.new("first") t, _ = t.parsefiles("index.html") t.execute(w, nil) the thing loads blank page. trying change delimiter values in golang html template , make template, change delimiter values, parse file. does else have problem? the first version works expect because package-level parsefiles function return new template has name , content of first parsed file. in second case, though, you're creating template named "first" , parsing 1 name "index.html" . when call t.execute on "first" , it's still empty. you can fix problem either: using template.new("index.html") , file name matches template name parse next; providing template name want execute explicitly t.executetemplate(w, "index.html", nil)

javax.ejb.NoSuchEJBException: Could not find stateful bean: 3j011-udy7sm-hkt798pd-1-hkt7bobh-9 -

many times whenever try access pages or click buttons "could not find stateful bean: 3j011-udy7sm-hkt798pd-1-hkt7bobh-9"error hits on screen jsf project.do know cause errpr possibly ran timeout, , stateful session been has been removed container. you can use @statefultimeout (ejb 3.1) set value. quote javadoc : specifies amount of time stateful session bean can idle (not receive client invocations) before eligible removal container. to verify if case, add method @predestroy , can see if sfsb has been removed. example: @stateful(name = "xxx") @statefultimeout(value = 15, unit = timeunit.seconds) public class sfsb { @predestroy public void predestroy() { system.out.println("info: " + "@predestroy"); } }

php ImageMagick gif resize keep animation -

after upload, gif resized animation lost. doing wrong? try { $animation = new imagick($this->image_filename); foreach ($animation $frame) { $frame->thumbnailimage($width, $height); $frame->setimagepage($width, $height, 0, 0); } $animation->writeimages($this->image_filename, true); echo "<img src='".$this->image_filename."' />"; $this->image = imagecreatefromgif($this->image_filename); } catch(exception $e){ echo $e->getmessage(); } no exception caught. array ( [versionnumber] => 1608 [versionstring] => imagemagick 6.4.8 2011-03-20 q16 openmp http://www.imagemagick.org ) try this: http://www.php.net/manual/en/imagick.coalesceimages.php first comment seems u need. , u should never mix gd2 library ("imagecreatefromgif") , imagick.

jquery - Capturing counter value in Javascript closure -

this question has answer here: javascript closure inside loops – simple practical example 31 answers the following code creates 10 elements under <body id="container" /> . when click on element, see alert value 10 . how can each alert show index of each element? for (var = 0; < 10; ++i) { var id = "#element_" + i; $("#container").append('<p id="element_' + + '">foo</p>'); $(id).click(function (e) { alert(i); }); } need create private closure for (var = 0; < 10; ++i) { (function(idx){ var id = "#element_" + idx; $("#container").append('<p id="element_' + idx + '">foo</p>'); $(id).click(function (e) { alert(idx); }); })(i) } demo: plunker

Why symbolic variable usage takes time in matlab? How to remove it? -

i have following code. syms x y; % line 1 %solve them parabola equation = [ x^2 x y 1 ;x0^2 x0 y0 1; x1^2 x1 y1 1; x2^2 x2 y2 1]; %line 2 s = solve(det(a),y); %line 3 (x1,y1), (x2,y2), (x3,y3) integer coordinates. the line 2 takes 0.48 seconds 73 calls , line 3 takes 1.5 seconds 73 calls. in line 2 defining matrix. why time in line 1? also suggestions on decreasing time? thanks

android - App crashes due to leaked window -

my app working fine of sudden crashes , error getting me more crazy. working both on server , on local files. crashes whenver try read file server. my logcat follows: error/windowmanager(10324): activity idtech.esdn.map has leaked window com.android.internal.policy.impl.phonewindow$decorview@41838b78 added here android.view.windowleaked: activity idtech.esdn.map has leaked window com.android.internal.policy.impl.phonewindow$decorview@41838b78 added here @ android.view.viewrootimpl.<init>(viewrootimpl.java:380) @ android.view.windowmanagerimpl.addview(windowmanagerimpl.java:292) @ android.view.windowmanagerimpl.addview(windowmanagerimpl.java:224) @ android.view.windowmanagerimpl$compatmodewrapper.addview(windowmanagerimpl.java:149) @ android.view.window$localwindowmanager.addview(window.java:547) @ android.app.dialog.show(dialog.java:277) @ idtech.esdn.map$loadfile.onpreexecute(map.java:64) @ android.o...

c++ - Unresolved external symbol error occurring only in 64-bit mode and not in 32-bit build -

Image
i have vc++ code (built using vs2008), makes use of static libraries (*.lib files linked statically during compile time). for ease of understanding let's refer exe code "aaa.exe" & refer lib files "a.lib", b.lib etc... both aaa.exe code , static libraries code built using vs2008. i see "aaa.exe" working fine in 32-bit version , showing below linker errors when aaa.exe built in 64-bit mode. i have of course rebuilt static libraries in 64-bit mode , provided lib path in aaa.exe :: "project configuration properties corresponding aaa.exe -> linker -> general/input". this linker error bothering me form long time. appreciated. logger.lib(loggerr.obj) : error lnk2001: unresolved external symbol "__declspec(dllimport) public: __thiscall cwttlogger::cwttlogger(void)" (__imp_??0cwttlogger@@qae@xz) 1>logger.lib(logger.obj) : error lnk2001: unresolved external symbol "__declspec(dllimport) public: virtual...

android - null pointer exception - image capture -

i'm beginner. didn't know messed up. appreciated. 2nd activity has button intent open 3rd activity. 3rd activity should start open camera function , wait image captured before being displayed. 3rd activity failed started. here code. java code(2nd activity). public class cameraview extends activity { public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_camera_view); // show button in action bar. } public void onclickcam(view view) { intent intent = new intent(this, resultactivity.class); startactivity(intent); } @override public boolean onoptionsitemselected(menuitem item) { switch (item.getitemid()) { case android.r.id.home: // id represents home or button. in case of // activity, button shown. use navutils allow users // navigate 1 level in application structure. // more details, see navigation pattern on android design: // ...

javascript - Binding a constructor -

suppose have javascript class: function generalclass(a, b, c) { ... } it constructed this: var g = new generalclass(a, b, c); and want create specificclass, same generalclass, bound values, a=1 , c=3. i want construct class this: var s = new specificclass(b); in other languages, there several ways this: i can make specificclass inherit generalclass, , have constructor of specificclass call of generalclass assignment want. i can add generalclass field inside specificclass, , delegate method calls it. but looking shorter , more elegant way in javascript - way enable me create many different specificclass's on fly. you can make specific function creates generalclass bound parameters. function generalclass(a, b, c) { ... } function specific(b) { var = 1, c = 3; return new generalclass(a, b, c); } var s = specific(2);

sql - Count distinct same names -

i have table have on 100k information. id firstname 1 bob 2 bob 3 tom 4 john 5 john 6 john .. .... want procedure count how names same, example must : firstname count bob 2 tom 1 john 3 please me write it it's basic sql example, group column + aggregating results select firstname, count(*) table1 group firstname

Need to know Joomla Session timer data type -

Image
i have been looking under database of joomla. there found under gu94g_session table, time column having value 1377499731. mean. how can decode time. appreciate help. the time column contains unix timestamp @ time of records creation. in joomla! 2.5+ , 3.x+ time column of #__session set value returned php's time() i.e. current unix timestamp. when sessions stored in database, /libraries/joomla/sessions/storage/database.php file creates record using sql query: $query = $db->getquery(true) ->update($db->quotename('#__session')) ->set($db->quotename('data') . ' = ' . $db->quote($data)) ->set($db->quotename('time') . ' = ' . $db->quote((int) time())) ->where($db->quotename('session_id') . ' = ' . $db->quote($id)); the time set line: ->set($db->quotename('time') . ' = ' . $db->quote((int) t...

.net - Finding all nodes without any text node -

with xpath (.net), i'm trying select nodes don't contain text node. given document: <root> <node1> <node1a>node 1a</node1a> </node1> <node2>node 2</node2> <node3> <node3a>node 3a</node3a> <node3b></node3b> </node3> <node4></node4> <node5> <node5a></node5a> </node5> </root> i'm tyring nodes: <node3b></node3b> <node4></node4> <node5> <node5a></node5a> </node5> note overlapping subtrees merged, node5a should not returned separately. i expect pull trick, reason (which obvious when points out) doesn't: //*[count(//text()) = 0] note: i'm using xpath tester try things out. assuming result example want (which not totally in accordance statement in title) suggestions above //*[count(.//text()) = 0] or preferred way //*[not(.//text())] do...

c# - COM RCW reference count in an AppDomain -

i have outlook addin i'm loading separate appdomains into. i'm passing outlook (com rcw) objects these appdomains. basics of work fine, reference counts seem come unstuck when fetch object reference within appdomain. for straight-forward example, i've got button on mail.compose ribbon, click handler. code executing within primary outlook add-in appdomain. var execasm = system.reflection.assembly.getexecutingassembly(); var loaduri = new uri(execasm.codebase); string loaddir = system.io.path.getdirectoryname(loaduri.localpath); // create app-domain appdomainsetup appsetup = new appdomainsetup(); appsetup.applicationbase = loaddir; system.security.permissionset permset = new system.security.permissionset( system.security.permissions.permissionstate.unrestricted); var mydomain = appdomain.createdomain("mydomain", null, appsetup, permset, null); // instance app-domain dynamic addinpoint = mydomain.createinstanceandunwrap( assemblyname: "class...

Solr Jetty crashes without reason -

every , solr instance crashing. runs in jetty container , logs show valid request before crashes. i use solr php , filegetcontents() retrieve data index. hitted installation ( ~ 10 req/s ) solr should able cope thought. any ideas? xms setting: 512 mb xmx setting: 1024 mb i cannot find single crash entry in logs / dumps. or missing log file? (i checked jetty log file)

nosql - Lazy query response after Indexing views - CouchDB on Android Device -

i using couchdb in android application. my app syncs data online server. problem facing couchdb views when call view takes lot of time return resulted documents(even when includedocs(false) ). should cache view first time retrieval fast other times in future. if run view on server side data cached automatically calling views android device causes delay in response. in case when data synced on android device, these views should fetch data localhost rather online - retrieval should fast localhost not. might indices of localhost(android device) couchdb not indexed why everytime call view returns result after lot of delay. idea how resolve issue. :: i using ektorp api couchdb. i'm afraid misusing views. these not adhoc queries build during program runtime build sql query. rather try thinking them database indexes, part of schema. design document(s) should updated when release new version of application in live environment. try organize schema thinking ways n...

fluid layout - % values in css makes image disappear -

i'm having issues scaling elements responsiveness. if using px values, scaling correct , behaves want to. since want mobile css compatible many devices possible, prefer using % values. problem switch px values % values, images/content either disappear or scale small proportions , change x & y position well. is there known issue cause browsers struggle % values? i've looked around couldn't find describes issue. example of issue: with px values (working correctly): jsfiddle demo .header{ width: 30%; margin: auto; position: relative; } .logo{ background-color: #ff0000; width: 100px; height: 100px; display: inline-block; margin: auto; } % values (image disappears): jsfiddle demo .header{ width: 30%; margin: auto; position: relative; } .logo{ background-color: #ff0000; width: 100%; height: 100%; display: inline-block; margin: auto; } the behaviour absolutely correct. when use % mean...

Java AES encryption/decryption always return the same content -

i wrote little test case aes encryption , decryption. plan read text file, encrypt key , decrypt again. problem is, text same, wrong password not result in unreadable text. where problem in code or did make fundamental mistake ? main.java import javax.crypto.spec.secretkeyspec; public class main { public static void main(string[] args) throws exception { new main(); } public main() throws exception { reader reader = new reader(); string text = reader.readfile("/home/benjamin/test.txt"); system.out.println("original text before encryption: " + text); // user verschlüsselt und speichert ab crypto crypto = new crypto(); secretkeyspec secretkey = crypto.generatesecretkey("123456aa"); byte[] encryptedtext = crypto.encrypt(text, secretkey); // user b lädt datei und kennt das passwort crypto crypto2 = new crypto(); secretkeyspec secretkey2 = crypto2.g...

c# - How can I trigger dropdown while viewing asp.net page -

there 2 dropdown in asp.net page. when select first 1 (city), second 1 (district) triggered. i have save button page. when click save button, write selectedvalues of dropdowns in database. , when open page again, assign values dropdown's selected values. the first 1 ok when assign dropdown.selectedvalue = "5" second 1 not triggered. how can trigger it? thanx. i have done same thing. suppose have drop down ddlcountry , ddlcity. need load cities selected country. protected void page_load(object sender, eventargs e) { if(!ispostback) { loadcountriesindropdown(ddlcountry); ddlcountry.selectedvalue = "5" //for eg: loadcitiesbycountryselected(ddlcity, ddlcountry.selectedvalue); // selected country value set here 5 ddlcountry_selectedindexchanged(null, null); } } protected void ddlcountry_selectedindexchanged(object sender, eventargs e) { if(ddlcountry.selecteditem.text == "select") { ...

css3 - CSS transition does not work on top property in FF -

i have following html: <ul> <li> <a href="#"> <h2>title</h2> </a> </li> <li> <a href="#"> <h2>title</h2> </a> </li> <li> <a href="#"> <h2>title</h2> </a> </li> </ul> css ul { list-style: none; text-align: center; } ul li { position: relative; float: right; margin-right: 20px; width: 30%; } ul li { transition: 0.3s; } ul li:hover { top: -10px; } ul li> a{ color: red; } the question transition not work moz, works on webkit. how implement in cross browser way? demo browsers don't apply transition on property if initial value not specified in element. hence, adding top: 0px ul li solve issue. ul { list-style: none; text-align: center; } ul li { pos...

php - Cakephp link alert -

i have following link delete function in cake: <?php echo $this->form->postlink(__(''), array('action' => 'delete', $website['website']['website_id']), array('class' => 'icon-trash '), null, __('are sure want delete # %s?', $website['website']['website_id'])); ?> now can see there should message saying: are sure want delete? but when click link nothing happens (exepect field being deleted ofcourse :p ) so how can make link display confirmation box? this work <?php echo $this->form->postlink(__('delete'), array( 'action' => 'delete', $website['website']['website_id']), array( 'class' => 'icon-trash' ), __('are sure want delete # %s?', $website['website']['website_id'])); ?>

Concatenate column values as single value SQL Server 2005 -

i have table column: |-------------| | columnname | |-------------| | value 1 | | value 2 | | value 3 | | value 4 | | value 5 | |-------------| i declare variable, declare @columnnamelist varchar(max) and should find below value in variable 'value one,value two,value three,value four,value five' can me out in doing this? thanks in advance. select @columnnamelist = stuff ( select ',' + columnname tablename order columnname xml path('root') ), 1, 1, ''

sql - MySQL MAX from SUM -

this freaking me out! got following data: +----+-----+-------+------------+ | id | reg | value | date | +----+-----+-------+------------+ | 1 | 1a | 100 | 2009-01-01 | | 1 | 1a | 100 | 2009-02-01 | | 1 | 1a | 100 | 2009-03-01 | | 2 | 1b | 100 | 2009-01-01 | | 2 | 1b | 100 | 2009-02-01 | | 2 | 1b | 100 | 2009-03-01 | | 2 | 1c | 100 | 2009-01-01 | | 2 | 1c | 100 | 2009-02-01 | | 2 | 1c | 200 | 2009-03-01 | +----+-----+-------+------------+ ps {edit 0001} :: there's field, must used filter data, call {type}, 'single' or 'multiple' value. i want max between sum(of each different {reg}) every {id}. obviously, simple representation, table got 64985928 registers , {date} filtering data. that be, 1st step sum each {reg}: +----+------+ | id | sum | +----+------+ | 1 | 300 | | 2 | 300 | | 2 | 400 | +----+------+ that's: select sum(value) table (date between '2009-01-01' , '2009-03-01...

grails - Highlighting certains words in Eclipse -

i writing spock tests in groovy / grails in eclipse. these use key words such setup: the: , when: . i'd able add syntax highlighting these words. possible? thanks. please try spock eclipse plugin: http://marketplace.eclipse.org/content/spock-plugin#.uht-2lw26kq think require.

android - TypedArray - how to retrieve textStyle from xml (getInteger fails) -

textstyle integer value, following should work, shouldn't it? private static final int[] attrs = new int[] { android.r.attr.textsize, android.r.attr.textcolor, android.r.attr.textstyle }; typedarray = context.obtainstyledattributes(attrs, attrs); tabtextsize = a.getdimensionpixelsize(0, tabtextsize); tabtextcolor = a.getcolor(1, tabtextcolor); tabtypefacestyle = a.getinteger(2, tabtypefacestyle); a.recycle(); actually, tabtypefacestyle has default value... my layout looks following: <com.astuetz.viewpager.extensions.pagerslidingtabstrip android:id="@+id/indicator" android:layout_width="fill_parent" android:layout_height="wrap_content" android:textcolor="@color/white" android:textsize="14sp" android:textstyle="normal" app:dividercolor="@color/white" app:dividerpadding="2dp" app:dividerpaddingbottom="8dp" app:indicatorcolor=...

javafx 2 - Set BorderPane components size -

Image
i want set size of center, top, left, right , bottom components of borderpane. so far found this: borderpane() mainpane = new borderpane(); mainpane.getbottom().prefwidth(sizex); for example how can size of left side of borderpane , set size? the "left" of borderpane whatever set , it's size whatever set to. example: borderpane mainpane = new borderpane(); stackpane left = new stackpane(); left.setprefwidth(100); mainpane.setleft(left);

perl - WWW:Facebook:Api Auth Token -

-----------------------------here received 32 length key auth_token error during rest auth.getsession call: params = api_key:-------------- auth_token:------------------------------- call_id:------------.-----[like decimal values format:json method:facebook.auth.getsession v:1.0 response = {"error_code":100,"error_msg":"invalid parameter","request_args":[ {"key":"api_key","value":"---------------"}, {"key":"auth_token","value":"----------------------"}, {"key":"call_id","value":"-------------------"}, {"key":"format","value":"json"}, {"key":"method","value":"facebook.auth.getsession"}, {"key":"v",...

c# - Confidence rules between applications -

i have 2 different applications on asp.net mvc running on same server. both apps works against same database, shows different data users (they used different users). the fact there methods on model of firstly created app i'd use on second one, , don't wanna duplicate model logic behind methods. so i'm using server call 1 app another, call executes controller calls target method , returns response. it works fine, don't have controller open user calling it. it's not particulary critical information seems me serious security problem. so i've been studying different options. i can let particular controller open knowing it's out there. bad. i can, somewhat, prompt users login when method called. petition transparent user i'd maintain way. i can elaborate token-dance between both applications similar authentication through oauth protocol ensure app1 accepts login on app2 , executes without direct login, seems lot of work should quite light i...

html5 - input type date not supported in some android devices in phonegap application -

in phonegap application have use html5 * date * type input . not show me date picker in of android devices. i have use : <input type="date" id="bdate"> there other alternative can support in android device? thanks in advance. hi datepicker not works on of androids check this . if need date picker please use http://mobipick.sustainablepace.net/demo.html

android - why javascript in webview does not work? -

page loaded javascript not work! protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_poll); device.webviewshowpoll = (webview) findviewbyid(r.id.webviewshowpoll); device.webviewshowpoll.getsettings().setjavascriptenabled(true); //device.webviewshowpoll.getsettings().setpluginsenabled(true); device.webviewshowpoll.getsettings().setjavascriptenabled(true); device.webviewshowpoll.getsettings().setpluginstate(pluginstate.on); device.webviewshowpoll.getsettings().setjavascriptcanopenwindowsautomatically(true); device.webviewshowpoll.getsettings().setallowfileaccess(true); device.webviewshowpoll.addjavascriptinterface(appconnector, "appconnectr"); try { device.webviewshowpoll.loaddatawithbaseurl("file:///android_asset/", ...

osx - Stored Endpoint IP Address after Network Configure Changes in RMI -

i've got rmi server running on mac. once changed server ip , restart application , clients, clients keep connect old ip address right bind , lookup address. have no idea went wrong because program working on linux server different port. what remote object clients got proxy[minervainterface,remoteobjectinvocationhandler[unicastref [liveref: [endpoint:[192.168.0.104:51815](remote),objid:[40d99efb:140ba232cec:-7fff, 6333954213550330995]]]]] which 192.168.0.104 old ip , should 10.0.1.104 i've check host file , code, there no 192.168.0.* please help, thank you. update i have confirmed server registry problem. have restarted server. did't remember else did registry. there way set manually? update i rune code on server inetaddress.getlocalhost().gethostaddress() , returned 192.168.0.104 , can explain address came from. there no such address on server now solved i found java use hostname lookup localhost address, hostname not localhost , have not been upd...

Error in joomla and wamp after formated pc -

i tried search, couldn't find anything. here problem, i've formated pc, reinstalled wamp , want put site work on localhost i'm having error database communication. i don't know if i'm forgetting (clearly i'm forgetting something), uploaded database joomla using before formated pc , copy files on www folder in wamp. what hell i'm doing wrong? need reinstall joomla? i pretty sure you're previous wamp server running php 5.3 , you're running php 5.4 in you're php.ini file, change following line: error_reporting = e_all to this: error_reporting = e_all & ~e_notice & ~e_strict this won't display error, will log them

javascript - Synching check change event for two TreePanel in EXTJS 4.1 -

Image
i have 2 extjs treepanel. 1 tree loaded (call fltree) , second 1 partially loaded (call pl tree). when user clicks on node in loaded tree & node present in partially loaded tree, want fire checkchange event node in partially loaded tree. is possible? yes, ext.tree.panel has itemclick event fired when item clicked (you need add in controller or in treepanel's listeners property. attributes are: somefunctionname: function(treeview, record, item, index, e, eopts) { ... } record variable can data needed first tree's selected node. to find other treepanel can use up() , down() methods on treeview: var parentcontainer = treeview.up('container_xtype[someproperty1=somevalue1]'); you can walk in component hierarchy (get parent container contains both treepanels). var pltree = parentcontainer.down('treepanel[someproperty2=somevalue2]'); if 2 treepanel doesn't have common parent, can use var pltree = ext.componentquery.query('t...

javascript - Using dijit.form.DateTextBox Not able to retain proper Time value -

i using dijit.form.datetextbox update date field. <form:input id="date_id" name="date_field" path="createdate" dojotype="dijit.form.datetextbox" disabled="false" constraints="{datepattern:'dd/mm/yyyy hh:mm:ss.ss'}" invalidmessage="invalid" promptmessage="invalid" lang="en-us" required="true"/> now, suppose if 'createdate' value '05/01/2012 21:10:17.287' , displaying '05/01/2012 12:00:00.00' in date text box. due which, while editing field, i'm not able keep was. is there anyway can retain time part '21:10:17.287' . kindly suggest. (this solution work above dojo 1.6 versions ) the default datetextbox overrides old value when setting new one. means time context lost while setting value. i...

iphone - Display an App correctly on 3.5" and 4" screen -

i finished develop app. trying make nice in both iphone 4 , 5. i trying height of scren following method doesn't work. idea? cgrect screenbound = [[uiscreen mainscreen] bounds]; cgsize screensize = screenbound.size; if (screensize.height == 1136) { nslog(@"iphone 5"); }else if(screensize.height == 960){ nslog(@"iphone 4 retina"); }else{ nslog(@"iphone 4 non retina"); } this complete viewwillappear method: -(void)viewwillappear:(bool)animated { [[uidevice currentdevice] endgeneratingdeviceorientationnotifications]; cgrect screenbound = [[uiscreen mainscreen] bounds]; cgsize screensize = screenbound.size; nslog(@"%@",nsstringfromcgsize(screensize)); if (screensize.height == 568.0f) { nslog(@"iphone 5"); }else if(screensize.height == 480.0f){ nslog(@"iphone 4 retina"); }else{ nslog(@"iphone 4 non retina"); } [firststepsbutton.titlelabel sethidden:yes]; [workingbutton...

excel - Copy 2 cells and paste do a different sheet once combobox has changed -

i have workbook user can add information i.e username , password. sheet2 data store. use column's a, b , c. i have combobox on userform. raw source combobox column a. when user selects 1 of options combobox want copy values column b & c , paste values worksheet. have far: activesheet.range("$a$1:$f$3").autofilter field:=1, criteria1:=combobox1.value range("b2:c2").select selection.copy sheets("displaypage").select range("a1").select activesheet.paste sheets("database").select activesheet.range("$a$1:$f$3").autofilter field:=1 range("a2").select but when run autofilter method of range class failed has got other ideas? assuming combobox populated rowsource property, give try: private sub combobox1_change() dim cbo combobox dim wsdest worksheet dim rngdata range set cbo = me.combobox1 set wsdest = sheets("displaypage") set rngdata = range(cbo.rowsource...

ipad - download .ashx file from server programmatically ios -

i trying download .ashx file server ipad application. - (void)viewdidload { [super viewdidload]; // additional setup after loading view, typically nib. nsstring *file = [nsstring stringwithformat:@"http://url/script.ashx"]; nsurl *fileurl = [nsurl urlwithstring:file]; nsurlrequest *req = [nsurlrequest requestwithurl:fileurl]; nsurlconnection *conn = [nsurlconnection connectionwithrequest:req delegate:self]; } - (void)connection:(nsurlconnection *)connection didreceiveresponse:(nsurlresponse *)response { [self.filedata setlength:0]; // self.totalfilesize = [nsnumber numberwithlonglong:[response expectedcontentlength]]; } - (void)connection:(nsurlconnection *)connection didreceivedata:(nsdata *)data { [self.filedata appenddata:data]; } - (void)connectiondidfinishloading:(nsurlconnection *)connection { nsarray *dirarray = nssearchpathfordirectoriesindomains(nsdocumentdirectory, nsuserdomainmask, yes); nslog(@"%@", [dirarray ob...

ios - Cropping UIImagePickerControllerOriginalImage using UIImagePickerControllerCropRect returns incorrect image -

Image
i trying edit captured image , save gallery. have made uiimagepickercontroller *picker=[[uiimagepickercontroller alloc] init]; picker.allowseditting=yes; i want save image in editable square portion , save gallery. know can make use of [info objectforkey:@"uiimagepickercontrollereditedimage"] save editted image. returns me image of dimension 320x320(ipad mini) , image of poor quality. planned crop original image [info objectforkey:@"uiimagepickercontrolleroriginalimage"] using following code: cgrect rect = [[info objectforkey:@"uiimagepickercontrollercroprect"]cgrectvalue]; uiimage *originalimage=[info objectforkey:@"uiimagepickercontrolleroriginalimage"]; cgimageref imageref = cgimagecreatewithimageinrect([originalimage cgimage], rect); uiimage *result = [uiimage imagewithcgimage:imageref scale:originalimage.scale orientation:originalimage.imageorientation]; cgimag...

java - Serialize a whole collection to XML -

i have following list javafx: observablelist<expense> data = fxcollections.observablearraylist(); does know, how can transfer whole collection xml? if this, deserializing should easy. i tried xstream , jaxb. looked @ multiple tutorials, didn't come result. it's possible serialize expense objects on own, not whole list (without using for-loop). do have idea?

http - Angularjs on click refresh view to get latest json data -

i using angularjs , need refresh view not whole page. how can using angularjs. i have used $http service data json file , that's why need update cache latest values json. $http.get('json/dashboard-home.json').success(function(data) { $scope.campaigns = data; }); currently if changed value in json file it's not reflecting on page when refresh page. every time need clear cache view latest value. you can disable cache of $http prevent behavior. $http({ // ... cache: false, // ... });

save image in android -

this code saving images in sd card if , if not exist. don't know how read it. can me please. this download file method: public static string downloadfile(string neturl, string name ) { try { //need uses permission write_external_storage bytearraybuffer baf = null; long starttime = 0; //get directory (a file object) sd card file savepath=new file(environment.getexternalstoragedirectory().getpath()+"/postimages/"); string ext="jpg"; url url = new url(neturl); //create specific file image storage: file file = new file(savepath, name + "." + ext); boolean success = true; if (!savepath.exists()) { success = savepath.mkdir(); } if (success) { if(file.createnewfile()) ...

javascript - fullcalendar eventsources no longer display events? -

just updated fullcalendar 1.6.3 , jquery 1.10.2 calendar no longer shows events "eventsources". cant find in documentation states needs changed. isolate problem have created small test example i'm sure no 3rd party plugin og css or responsible. <html> <head> <script type="text/javascript" src="js/jquery-1.10.2.min.js"></script> <script type="text/javascript" src="js/fullcalendar.min.js"></script> <link rel="stylesheet" type="text/css" href="css/fullcalendar.css" /> <script type="text/javascript"> $(document).ready(function() { $('#kalender').fullcalendar( { eventsources: ['testfeed.php'] //testfeed.php returns exactly: [{title: 'test1', start: '2013-08-15'},{title: 'test2', start: '2013-08-16'}] ...

r - Creating bootstrap samples and storing sampled data in different names -

when create bootstrap samples data frame datta using following codes boot1a <- replicate(3, do.call("rbind", lapply(sample(unique(datta$pid),2000,replace=true), function(x) datta[datta$pid==x,])), simplify=false) boot1b <- data.frame(boot1a) # data frame list sample1 <- boot1b[order(boot1b$pid),] # sorting based on pid , storing variables in bootstrap sample sample1 have names ending .1, .2, .3, ... . ( pid person id, takes similar values different observations of same person). instance, above code variable xy in datta have names xy , xy.1 , , xy.2 associated first, second , third bootstrap samples. rather prefer have different bootstrap samples named differently variable names in each remaining same in original data frame. in above case, have bootstrap samples stored in 3 different data frames, say, boot1, boot2, boot3 , variable names in each data frame same in original data frame. began doing manually 1 replication @ time, gonna take lot of time cre...

python - How to disable a pep8 error in a specific file? -

i tried with #:pep8 -e223 or # pep8: disable=e223 i thought second work doesn't seems work. do have idea how can handle ? as far know, can't. can disable errors or warnings user wide, or per project. see the documentation . instead, can use # noqa comment @ end of line, skip particular line (see patch 136 ). of course, skip pep8 errors. the main author argues against source file noise , suggested # pep8 comments don't included. note there nopep8 , equivalent. noqa (which stands no quality assurance added in version 1.4.1 support people running pyflakes next pep8 .

actionscript 3 - Compiling with unused and unavailable classes (like StageText on web) -

i have common codebase using export mobile (ios+android) desktop (osx+windows) , web (swf) 99% of code compatible everywhere, , works however, there couple instances (like stagetext), won't work. in cases, want use different class (like textfield or tlftextfield). logically, fine... won't compile i have like- var mystagetext:stagetext; var myregulartext:textfield; if(isair) { mystagetext = new stagetext(); } else { myregulartext = new textfield(); } how can let compile everywhere, without turning off error checking? ah okay, realized can using wildcard object definitions , setting class name... like: var textinput:*; var customclass:class; if(isair) { customclass = getdefinitionbyname("flash.text.stagetext") class; textinput = new customclass(); textinput.stage = stage; } else { textinput = new textfield(); addchild(textinput }

javascript - PHP: How to hide my application folders in .htaccess -

Image
how hide application folders , contents third party viewers in .htaccess file ? try using this, guess work. redirectmatch 403 ^.*/sub-folder-name/* this stop direct access of sub-folders , files recursively.

.net - How to make a readonly C# List by non declaring its set attribute -

i have list<string> mylist in class want readonly class users. list<strign> mylist {get;} private void setlistvalue() { mylist = new list<string>(); mylist.add("ss"); } like thought set mylist value inside class in private members , make readonly class users. realised declaring way i'm unable set value. try: public list<string> mylist {get; private set;} this let set inside class, not outside. note not stop external clients updating list, reference it.

php - Resizing image using Imagine bundle blurs Image -

i have following code: $imagine = new \imagine\gd\imagine(); $image = $imagine->open($src); $image_size = $image->getsize(); $image_height = $image_size->getheight(); $image_width = $image_size->getwidth(); $ratio = 1; $resized_image = $image; $ratio = $image_width / $desired_width; $this->resizedheight = $image_height / $ratio; $this->resizedwidth = $image_width / $ratio; // thumbnaildir doesn t exist if(!is_dir(dirname($des))) mkdir(dirname($des), 0777, true); $resized_image = $image->resize(new box($this->resizedwidth, $this->resizedheight)); $options = array( 'resolution-units' => imageinterface::resolution_pixelsperinch, 'resolution-x' => 500, 'resolution-y' => 500, 'flatten' => false ); $resized_image-...

javascript - How affect marketing Channel Rule. processing for the link below? -

i noticed /jpmfdocs linking convention passing campaign code value sprop 7, not of campaign evars (v0, v8, etc). how affect marketing channel rule processing link below? https://www.jpmorganfunds.com/cm/satellite?pagename=jpmfcommon/utilities/jpmfgetdocument&filename=bro-mi-qp.pdf kindly reply me asap. thanks in advance! jay marketing channels customizable, going depend on marketing channel processing rules. within adobe analytics, go star menu | admin tools | report suites select report suite, go edit settings | marketing channels | processing rules the variables specified in section determine marketing channel each hit assigned to. if you're using prop7 specify campaign code values, marketing channels aren't affected in way. if use s.campaign, evar8, or other variables you've set identify campaigns, chances you're not collecting marketing channel data correctly.

Returning string from BlackBerry java application -

i developing blackberry webworks application , need scan qr-code. scanning qr-code call blackberry java application. i want return string(decoded data encrypted in scanned qr-code) blackberry java application calling application(blackberry webworks application). how can that? can 'blackberry.invoke.javaarguments();' api in scenario? you might consider using community build extension written scan qr codes ( https://github.com/blackberry/webworks-community-apis/tree/master/smartphone/barcode )

c# - ActiveRecord / NHibernate: Update error on Query -

i have search feature on website fails. build in c# / asp.net / webforms , uses activerecord. basically seams when many records returned view in database en update error. string query = "s"; order[] orders = new order[] { order.asc("lastname") }; list<icriterion> crit = new list<icriterion>(); crit.add(expression.sql(string.format("lastname" '%{0}%' or firstname '%{0}%'", query))); var rv = activerecordbase.findall(typeof(vmyview), orders, crit.toarray()) the above part of code failes on findall command, when using 's' query search (where many results). using 'x' query works charm. the error is: view or function 'vallowedvessels' not updatable because modification affects multiple base tables. description: unhandled exception occurred during execution of current web request. please review stack trace more information error , originated in code. exception details: system.data.sqlclien...