Posts

java - Using UncaughtExceptionHandler in Struts Application -

i have web application based on struts 2 mvc. had configure proper logging in application did , working fine. what want is, need runtime exceptions , error due system failure (such lost database connection, third party service down etc etc), logged in application log file. i read thread.uncaughtexceptionhandler , gone through this answer still unable start requirement. can suggest me how initiate this? classes make? configure? etc etc. tell, there no multithreading involved in application. thank you! below log4j.properties log4j.appender.file=org.apache.log4j.rollingfileappender log4j.appender.file.file=${catalina.home}/logs/backlogapp.log log4j.appender.file.maxfilesize=1000kb log4j.appender.file.maxbackupindex=1 log4j.appender.file.layout=org.apache.log4j.patternlayout log4j.appender.file.layout.conversionpattern=%d{yyyy-mm-dd hh:mm:ss} %-4p %m%n log4j.appender.datepattern='.'yyyy-mm-dd # root logger option log4j.rootlogger=warn, file log4j.logger.com.nagar...

android - Coludn't get the data to server when i turned off the GPS once. It's not sending even after GPS turned on -

i need create application track location using background , , send data server. program send data when reboot device because have launch service on boot complete( android.intent.action.boot_completed). i don't data server when turned off , turned on gps. when reboot device it's working.it should send data server mobile data if gps turned off. can 1 me please? whenever turned off , turned on should work without reboot device. how can i? gpstracker.java public class gpstracker extends service { private static final string tag = "boomboomtestgps"; private locationmanager mlocationmanager = null; private static final int location_interval = 1000 * 60 * 10; private static final float location_distance = 10f; private class locationlistener implements android.location.locationlistener{ location mlastlocation; public locationlistener(string provider) { log.e(tag, "locationlistener " + provider); mlastlocation = new location...

ios - Table view, manual and settings in one screen: Best practice? -

i writing text editing app. target ios 6 , 7, , use storyboards , autolayout. i thought layout welcome screen work well: <files in table view> <instructions user> <settings> the settings view pretty complex, , benefit having own view controller. instructions view static, , has no logic. i can think of 3 ways organize this: create table 3 sections, 1st section list of files, , 2nd , 3rd section big, custom cells with. wrap 3 views in scrollview wrap instructions , settings in scrollview i prefer first solution, seems the, natural way user navigate, haven't seen examples of adding viewcontroller cell tableview anywhere, , haven't been able google me any. prototype cells not seem right way go settings view/controller either. best practice, suggestions, input? apple recommends 1 view controller per "screen," rules out option 1. wouldn't want start attempt embed viewcontroller in table cell , smells wrong in case. yo...

file io - Changing the BytesAvailableFcnCount during reading from a serial port in MATLAB -

i trying build serial port device in matlab . have 2 devices 'com1' , 'com2'. 'com1' asynchrounously writes data serial port 'com2'. have alternative names 'com1' , 'com2', follows: global serialcom serialcom=serial('com1'); %serial communication portal com 1 global testdummy testdummy=serial('com2'); %serial communication portal com 2 the number of bytes in input buffer of testdummy triggers testdummyfunction 2, , specified using testdummy.bytesavailablefcncount field (below). testdummy.bytesavailablefcnmode = 'byte'; testdummy.bytesavailablefcncount = 2; testdummy.bytesavailablefcn = @testdummycomfunction; i have function "testdummyfunction" on testdummy side triggered using bytesavailable callback property in matlab.the structure of function follows: function testdummyfunction(testdummy,bytesavailable) % testdummyfunction(testdummy,...bytesavailable) % inputs: % testdummy:refers seria...

java - Upgrade from Netbeans 7.2.1 to Netbeans 7.3.1 classpath error -

i upgraded netbeans 7.2.1 netbeans 7.3.1. have existing gwt project using jdk 7 ee. upon setting netbeans 7.3.1 point glassfish 4 , redeploying new server, see warning in output window of netbeans: warning: [options] bootstrap class path not set in conjunction -source 1.6 what warning , should concerned? i went gwt project properties , found drop-down pointing jdk 6. changed jdk 7 , warning went away.

winapi - How to get the size in pixels of the Resize Corners of a Window -

Image
is there way (api) of getting size (vertical , horizontal) in pixels of resize corners? i referring area @ each of corners of window can resize window in both directions (left-to-right , top-to-bottom) @ same time using mouse. know there mouse cursor when hover on corners of window , mouse cursor diagonal resizing cursor. thank you edit: example: hover mouse on right edge of sizable window. start in middle (vertically) of window , move mouse along edge until horizontal sizing cursor changes diagonal sizing cursor. how determine asking os how far position when cursor changes, top of window. i suggest use size of scrollbars. call getsystemmetrics sm_cyhscroll , sm_cxvscroll. may sm_cysizeframe , sm_cxsizeframe sizes can combined. but think better value use height of status bar. microsoft windows seems use fixed value can seen on screenshot.

c# - Problems after moving my project from Azure sdk 1.8.0.0 to 2.0.0.0 -

i moving project azure sdk 1.8.0.0 2.0.0.0 it works fine in development environment when going deploy on azure portal gives me error. shown below an unhandled exception occurred. type: system.io.filenotfoundexception process id: 3620 process name: waiishost thread id: 5 appdomain unhandled exception role frontend_in_0 exception: not load file or assembly 'microsoft.windowsazure.serviceruntime, version=1.8.0.0, culture=neutral, publickeytoken=31bf3856ad364e35' or 1 of dependencies. system cannot find file specified. @ diagconfig.config.getroleinstancediagmonitor() @ frontend.webrole.onstart() @ microsoft.windowsazure.serviceruntime.roleenvironment.initializeroleinternal(roletype roletypeenum) @ microsoft.windowsazure.serviceruntime.implementation.loader.roleruntimebridge.<initializerole>b__0() @ system.threading.executioncontext.runtrycode(object userdata) @ system.runtime.compilerservices.runtimehelpers.executecodewithguaranteedcleanup(trycode c...