Posts

Showing posts from March, 2012

actionscript 3 - as3 php data checking not working in .as file -

please me, can't check php data in .as class here as3 code if(event.target.data.msg=="all_good"){//here problem ,i can't understand maybe //that's why i'm using package?? lbl.text = "all good"; // or } php code: <?php print "msg=all_good"; ?> update : varloader.addeventlistener(event.complete, completehandler); function completehandler(event:event):void { if (event.target.data.msg== "no_good"){ staticalvars.errmsg.text = "you entered invalid password!"; } else if (event.target.data.msg == "all_good") { staticalvars.errmsg.text = "you entered correct password!"; } } hi gyus here whole code. main problem getting php data correctly, see in flash code, can't use data it package { import flash.display.sprite; import flash.events.* import flash.net.*; import fl.controls.label; public class test extends sprite{ public function test() {senddata...

How to delete all the lines in one go in emacs? -

i want delete lines below particular line of emacs ? there any shortcut key can delete lines below particular line? c-u 9999999 c-k should trick. if not @ beginning of first line want kill, use c-a c-u 9999999 c-k . (the 9999999 can number larger number of lines want kill.) an alternative using c-u 999999 hold down control key , hold down 9 , get, in effect: c-9 c-9 c-9 c-9 c-9 c-9 c-9 c-k .

cocoa touch - Does UIManagedDocument handle conflcts -

does uimanageddocument handle row level conflcts me or need handle those, , answer handle row level conflicts. maybe misunderstood him not seeing this. so going ask few key questions in hopes of getting clarification here, again uimanageddocument if have table author having first , last name fields happens if: a) have row author: 'jon do' - has sync'd 2 devices. edit first name on 1 device 'jon' 'john' , edit last name on other device 'do' 'doe'. how icloud , uimanageddocument handle this? sort of notification need respond in order handle conflict? tried following code never notificiation: [[nsnotificationcenter defaultcenter] addobserver:self selector:@selector(_ondocumentstatechangednotification:) name:uidocumentstatechangednotification object:self.openeddoc]; b) if add different author 2 devices there 2 rows merged uimanageddocument handle me or need myself? if need myself need do? tried signing nspersistentstoredidimportubiqui...

Air iOS app iPhone5 dimensions letterbox -

i have app designed , built iphone4 same app works on iphone5 top/bottom letterbox effect. headers , footers of app black (very dark blue actually) empty letterbox space white wondering if there way make top/bottom black not noticeable? i don't feel modifying app layout suit dimensions of iphone5 if there way make them black. thanks you set stage (background) color stage.color, see if solves problem.

html - How to select all empty p tag using jQuery? -

how can select empty tag using jquery. i want select <p></p> <p style="display: block"></p> <p> </p> <p> </p> <p>&nbsp;</p> and not <p>0</p> <p>test</p> try var t = $('p').filter(function(){ return $.trim($(this).text()).length == 0 }); demo: fiddle

php - Stop CodeIgniter from incorrectly decoding URL-encoded content -

by default, codeigniter blocks %27 (') appearing in urls. have commented out entire $config['permitted_uri_chars'] directive result. however, when parsing part of url method argument contains %27, or other url encoded portion, codeigniter converts plain ?, before can run rawurledcode() on it. how can stop doing this? we're using ci v1.7.x. here simple code show it: in "program" controller: function test($parameter) { echo $parameter; } then load http://example.com/program/test/o%27clock , , get: o?clock i expected o'clock or @ least o%27clock rawurldecode() o'clock . update: unfortunately, wrong. not being caused codeigniter. rather, presences of suhosin doing substitution. the problem wasn't codeigniter. suhosin.

iphone - Following Ray Wenderlich's In App Purchase Tutorial, how do i implement logic to check if a product was purchased -

his tutorial introduction in app purchases http://www.raywenderlich.com/21081/introduction-to-in-app-purchases-in-ios-6-tutorial how can check if purchased? want check if-statement. so, when "this" bought, , on. can't figure out write if-statement life of me. can please answer question explicitly? have seen posted in few different places none of answers straightforward enough complete novice myself comprehend. found exact same question here answer made no sense me check product user bought on in-app purchase specifically, code part "the resources zip tutorial contain images of the comics, if you’re inclined can wrap showing comic in new view controller when purchased row tapped! if want this, can check if productidentifier in purchasedproducts array of inapprageiaphelper before allowing user access content." i have working perfect tutorial, dont know how use it. i have main menu view controller has 3 buttons. want disable 2 of buttons default, if...

mapreduce - Hadoop - get results from output files after reduce? -

given job map , reduce phases, can see output folder contains files named "part-r-00000". if need post-process these files on application level, need iterate on files in output folder in natural naming order (part-r-00000, part-r-00001,part-r-00002 ...) in order job results? or can use hadoop helper file reader, allow me "iterator" , handle file switching me (when file part-r-00000 read, continue file part-r-00001)? in mapreduce specify output folder, thing contain part-r files (which output of reduce task) , _success file (which empty). think if want postprocessing need set output dir of job1 input dir job 2. now there might requirements postprocessor can addressed, example important process output files in order? or if want process files locally depends on outputformat of mapreduce job, tell how part-r files structured. can simple use standard i/o guess.

c# - Why is Keyboard.FocusedElement null when focus is inside WindowsFormsHost? It breaks WPF command routing -

i have custom routeduicommand mycommand gets executed via icommand.execute . top window has binding handle it: <window.commandbindings> <commandbinding command="local:mainwindow.mycommand" canexecute="canexecutecommmand" executed="commandexecuted"/> </window.commandbindings> this handler command. have windowsformshost winforms' textbox control inside (for demo purpose). when focus inside textbox , mycommand doesn't reach top window. when focus inside wpf's native textbox , command handler gets invoked expected. i've figured out this happening because keyboard.focusedelement null when focus inside windowsformshost . why null in case, wpf bug or design feature? missing something? i believe command should reaching top window, regardless of focus is (when it's handler in visual tree , focusmanager.isfocusscope set correctly). have related question that . the project sources available here . ...

python 2.7 - sleekxmpp : ejabbered : not able to connect to sever -

i installed ejabbered , sleekxmpp. trying run sample program mentioned http://sleekxmpp.com/#here-s-your-first-sleekxmpp-bot . using ejabbered admin created sample user. web admin->virtual hosts->selected test@test.com->users->added new user name password so modified code is: if __name__ == '__main__': # ideally use optparse or argparse jid, # password, , log level. logging.basicconfig(level=logging.debug, format='%(levelname)-8s %(message)s') xmpp = echobot('test_user@test.com', 'password') xmpp.connect() xmpp.process(block=true) output: debug loaded plugin: rfc 6120: stream feature: starttls debug loaded plugin: rfc 6120: stream feature: resource binding debug loaded plugin: rfc 3920: stream feature: start session debug loaded plugin: rfc 6121: stream feature: roster versioning debug loaded plugin: rfc 6121: stream feature: subscription pre-approval debug loa...

android - How can we know that the user clicked the save button in calendar to create an event or the cancel button? -

intent intent = new intent(intent.action_insert) .setdata(events.content_uri) .putextra(calendarcontract.extra_event_begin_time, begintime.gettimeinmillis()) .putextra(calendarcontract.extra_event_end_time, endtime.gettimeinmillis()) .putextra(events.title, title) .putextra(events.description,desc ) .putextra(events.event_location, loc) .putextra(events.availability, events.availability_busy); i used code adding event.i don't want use insertion using contentvalues because not give user chance select calendar.so how can know user has pressed save or cancel button?plzzzzzz help startactivityforresult(intent,result_canceled); as per suggestions used start calendar activity , below onactivityresult callback. @override public void onactivityresult(int req,int res,intent intent){ if(result_o...

php - Where to call the function ..? -

i new plugin development/editing wordpress. using famous plugin called polylang multilingual support. , using plugin called clean , simple contact form creating ajax based contact form. now, looking documentation polylang have found following function: register string allows plugins add own strings in “strings translation” panel. function must called on admin side (the functions.php file ok themes). usage: pll_register_string($name, $string, $multiline); as says, function must called on admin side. unable figure out means ... i intend add few custom strings strings translation tab. calling function functions.php in theme worked didn't translate strings plugin. plugin doesn't yet support japanese having take path. can tell me supposed call function. tried call in class.view.php , file name: clean-and-simple-contact-form-by-meg-nicholas.php but, both ended giving fatal error saying function undefined. what's exact meaning of "the function must called...

Jenkins: mark node as offline gets 403 Forbidden -

maybe it's dumb way so, i'm trying figure out best one. using jenkinsapi python, i'm running job on specific node using job.invoke("jobtoken",false,false,3,5,{"node": node_name}). the job trying mark node temporary offline. job runs specified in build -> execute shell -> command in job configuration screen. using wget "http://jenkins/computer/${node}/toggleoffline?offlinemessage=taken_down" i 403 forbidden error on console output. using curl "http://jenkins/computer/${node}/toggleoffline?offlinemessage=taken_down" i html response saying "authentication required". (on console output well). question how mark node offline, within job. thanks. i think have add username , password curl -x post "http://jenkins/computer/${node}/toggleoffline?offlinemessage=taken_down" --user username:password i saw at: how can jenkins user authentication details "passed" script u...

winapi - OpenGL how to determine the latest version to code with -

folowing this link in directx can add lines: #include <d3d11.h> #include <d3dx11.h> #include <d3dx10.h> #pragma comment (lib, "d3d11.lib") #pragma comment (lib, "d3dx11.lib") #pragma comment (lib, "d3dx10.lib") ... to specify 'up date' dx version want code in. how can achieved in opengl can sure using latest gl libraries while coding. should #define or gl functions use in code determine version of opengl? is there method in c++ or other software can tell version of opengl .exe program using? that's not how opengl works; opengl not statically link (or rather, that's not all have do). have (generally speaking) dynamically load opengl functions work with . typically done employing opengl loading library of kind, reducing #including header , calling function during initialization (after creating opengl context). the "version" of opengl use depends on version supported implementation , functio...

How to use a Rails engine in a rails engine -

we creating rails 4 engine pull out common functionality between our rails apps. 1 thing bit confused if engine has engine? say, if wanted put activeadmin in it? have create separate namespace admin? also, migrations activeadmin (and devise)? should put in our engine or best practice "before using engine, make sure have devise/active admin installed"? you should put engine dependencies (understand migrations, gems, lib, assets, ...) in ... well, engine of course. you can have devise mounted engine in engine. may require special configuration though.

css as assets font embedding won't work on firefox -

i building website serve assets (image, css, javascript) subdomain inside same server, works fine except firefox doesn't seem render fonts embedding my css (on assets.mydomain.dev) @font-face { font-family: 'fontawesome'; src: url('http://assets.mydomain.dev/fonts/awesome/fontawesome-webfont.eot?v=3.1.0'); src: url('http://assets.mydomain.dev/fonts/awesome/fontawesome-webfont.eot?#iefix&v=3.1.0') format('embedded-opentype'), url('http://assets.mydomain.dev/fonts/awesome/fontawesome-webfont.woff?v=3.1.0') format('woff'), url('http://assets.mydomain.dev/fonts/awesome/fontawesome-webfont.ttf?v=3.1.0') format('truetype'), url('http://assets.mydomain.dev/fonts/awesome/fontawesome-webfont.svg#fontawesomeregular?v=3.1.0') format('svg'); font-weight: normal; font-style: normal; } htaccess (on assets.mydomain.dev) addtype application/vnd.ms-fontobject .eot ...

wicket , build on every time RepeatingView is called -

i have copied fromwicket site listeditor component support adding item in run time: public abstract class listeditor<t> extends repeatingview implements iformmodelupdatelistener { list<t> items; public listeditor(string id, imodel<list<t>> model) { super(id, model); setoutputmarkupid(true); } protected abstract void onpopulateitem(listitem<t> item); public void additem(t value) { items.add(value); listitem<t> item = new listitem<t>(newchildid(), items.size() - 1); add(item); onpopulateitem(item); } @override protected void onbeforerender() { if (!hasbeenrendered()) { list<t> modelobject = getmodelobject(); if (modelobject != null) { items = new arraylist<t>(modelobject); (int = 0; < items.size(); i++) { listitem<t> li = new listitem<t>(newchildid(), i); add(li); onpopulateitem(li); ...

Websocket server on cloud to store data -

firstly let me tell novice cloud computing . my objective read sensor data continuously device , store in cloud servers , retrieve data website real time. as per research found out can done using mbed boards ethernet. i read data sensors , pass websocket server continuously in json format , there using java script display data on website. issue here don't know how store data on cloud. should websocket server on cloud , how server able store data. plz help. or there other way achieve this?? sorry if question doesn't make sense. thanks. if want run websocket applications through cloud , there plenty of ways. not sure expecting or not have used jelastic same , worked quite , easy. try once implement application on jelastic . following link http://blog.jelastic.com/2013/07/10/websockets-tutorial-tomee/ might you.

load and run another .py file in wxpython GUI -

have written script gui using wx python. need load python file , run option of providing inputs(values) variables of python file using gui. , display python file results. able load file need run.... here code gooeypi application. gui front-end pyinstaller. runs pyinstaller.py code flags , sends output textctrl widget. uses wx.yield avoid locking interface, although moving code own thread option. class gooeypi(wx.frame): def __init__(self, *args, **kwargs): super(gooeypi, self).__init__(*args, **kwargs) ... # results go in here. read style people can't write in it. self.txtresults = wx.textctrl(self.panel, size=(420,200), style=wx.te_multiline|wx.te_readonly) def onsubmit(self, e): ... # getflags returns ['python.exe', 'pyinstaller.py' '--someflag' '--someotherflag'] flags = util.getflags(self.fbb.getvalue()) logging.deb...

c - Change priority on Mutexes -

i'm new rtos programming , i'm having problems priority when using mutexes. i have following priorities established. #define t_hi_priority 10 #define t_me_priority 50 and want code run task "tmeprioritytask" highest priority , "thiprioritytask" medium priority. "tloprioritytask" commented and, therefore, should not run now. #include <stdio.h> #include "main.h" #include "vxworks.h" #include "semlib.h" #include "tasklib.h" sem_id semmutex; // named semaphore object char alphabet[27]; // memory resource have exclusive access void thiprioritytask (void) { int i; // enter critical region - other tasks wanting access alphabet[] should // wait available semaphore semtake (semmutex, wait_forever); // write alphabet global array (i= 0; < 26; i++) alphabet[i] = 'a' + i; alphabet[i] = '\0'; printf("high priority.\n-counting alphab...

html5 - How to use bootstrap to hide one of div when zoom browser windows size smaller -

i use bootstrap design web ui , , have requirement below: i define below div structure div ids : part1 , part2 <div class="container"> <div class="panel panel-default"> <div class="panel-body"> <div id="part1" class="col-md-6"> <div> xxxx </div> </div> <div id="part2" class="col-md-6"> <div> yyy </div> </div> </div> </div> </div> now want hide part1 automatically when shrink browser window size or phone browser , how can achieve effect ? btw: try add css "collapse" part1 , hide directly browser larger . this working code, have tested.. <div class="r...

php - Redirect to Index Page if the Submitted Form Has no Username or Password -

what wrong in code? if(isset($_request["ok"])) { $id= mysql_real_escape_string($_request["usr"]); $pwd=mysql_real_escape_string($_request["pass"]); $row=mysql_query("select * tbl_login usr_id='$id' , password='$pwd'"); $data=mysql_fetch_array($row); if($pwd==$data["password"]) { $usr=mysql_query("select * tbl_usr u_id='".$data['u_id']."'"); $nm=mysql_fetch_array($usr); $_session["usr"]=$nm["u_fname"]; $_session["id"]=$nm["u_id"]; header("location:index.php"); } else { $msg="email or password not valid"; } } and html code <form method="post" enctype="multipart/form-data" > email-id<input type="text" name="usr" /> <br/> password<input type="password" name="pass...

dependencies - sencha touch build issue -

i using command "sencha app build testing" deploy testing package. i getting following errors during creating testing build: [wrn] c1000: yui compressor warning (trailing comma not legal in ecma-262 object initializer => },) -- c:\localdevelopment\apps\pressflow\ne w\pulse\app\app\view\ddeditor.js:2663 [inf] processing class inheritance graph [inf] processing instantiation refereces classes , aliases [wrn] c1000: yui compressor warning (trailing comma not legal in ecma-262 object initializer => },) -- c:\localdevelopment\apps\pressflow\ne w\pulse\app\app\view\ddeditor.js:2663 [inf] processing source dependencies [err] circular requires reference : ...\touch\src\abstractcomponent.js ...\touch\src\evented.js -> ...\touch\src\core\src\util\taskman ager.js -> ...\touch\src\util\taskrunner.js -> ...\touch\src\util\format.js -> ...\touch\src\core\src\util\taskman ager.js [err] [err] ...

android - how can I split an arraylist to multiple strings? -

i have split arraylist in multiple strings in app should display in order.. arraylist<string> contactlist = new arraylist<string>(); contactlist.add("prasad"); contactlist.add("prasad"); contactlist.add("prasad"); contactlist.add("prasad"); string[] contact = new string[contactlist.size()]; contact = contactlist.toarray(contact); stringbuffer sb = new stringbuffer(""); (string s : contactlist) { sb.append(s+","); } stringtosend = sb.tostring(); log.d("stringtosend ", stringtosend); new upload().execute(); /* * string[] rstring = stringtosend.split("-"); * * (string s : rstring) { system.out.println("names : " + * s); } */ ...

python - Django admin display specific model in form -

i'm creating project make collective translations, got original text, images. basic idea split text chunks, chunks different types: text , images (images can uploaded, alt , description edited...) there proof-of-concept class source(models.model): title = models.charfield(max_length=255, unique=true) class sourcechunk(models.model): source = models.foreignkey(source) class sourcetextchunk(models.model): chunk = models.foreignkey(sourcechunk) text = models.textfield() class sourceimagechunk(models.model): chunk = models.foreignkey(sourcechunk) image = models.filefield() alt = models.textfield() title = models.textfield() transcription = models.textfield() class sourceadmin(admin.modeladmin): pass and want create form, using sourceadmin (in admin page), displayed way: ... other fields ... text form text form text form text form image form text form text form text form

How to store an arraylist in an android database and retrieve it whenever I need to -

this method through store words in arraylist , write them database. public void loadwords(context context) { assetmanager = context.getassets(); wordlist = new arraylist<string>(); try { inputstream inputstream = am.open("english-words-lowercase.txt"); inputstreamreader inputstreamreader = new inputstreamreader( inputstream); bufferedreader bufferedreader = new bufferedreader( inputstreamreader); word = bufferedreader.readline(); while(word!=null){ wordlist.add(word); word = bufferedreader.readline(); } } catch (ioexception e) { e.printstacktrace(); } } so have arraylist words use. how can store database can read whenever want? , using validate words users input, best way store words or should use hashmap or other storing techniques? thank you! array list can have duplicates .. try store in set. , store in databse....

shell - Bash Script for listing subdirectories and files in textfile -

i need script writes directory , subdirectory in text-file. for example script lies in /mainfolder , in folder 4 other folders. each contains several files. now script write path of each file in textfile. subfolder1/file1.dat subfolder1/file2.dat subfolder2/file1.dat subfolder3/file1.dat subfolder4/file1.dat subfolder4/file2.dat important there no slash in front of listing. use find command: find mainfolder > outputfile and if want files listed, do find mainfolder -type f > outputfile you can strip leading ./ if search current directory, %p format option: find . -type f -printf '%p\n' > outputfile

oracle - Complex SQL query (suggestions needed) -

could throw me ideas how resolve following issue: i have pictures, videos , tags in database. tags can associated pictures , videos. have query database tag ids , count modified before 7 days or earlier , sort them count of associations have picture , video assets. so idea @ end can output tags associated pictures or videos during last 7 days. wrote down db structure fields have video id picture id picture_attrmapping cs_ownerid (id of picture) cs_attrid ( store id of tag attribute (picture_tag or video_tag)) assetvalue ( store id of associated tag) video_attrmapping cs_ownerid (id of video) cs_attrid ( store id of tag attribute (picture_tag or video_tag)) assetvalue ( store id of associated tag) tag id updatedate attributes (picture_tag attribute id stored here) id name so can see tags, videos, picture , attributes stored in separate tables. can tell tag referenced video or picture (in other words, video/picture has ...

symfony - Query builder and entity inheritance -

i have entities: abstract class abstractentity { private $somefield; } /** * ... * @orm\entity(repositoryclass="concreteentityrepository") */ class concreteentity extends abstractentity { private $otherfield; } class concreteentityrepository extends entityrepository { public function getsomething() { $qb = $this->getentitymanager()->createquerybuilder() ->select('t') ->from('mybundle:concreteentity', 't'); $result = $query->getresult(); } } result correct count of fields values of parent class null. how can correctly fields? and when try use: ->select('t.somefield') // error ->select('t.otherfield') // my guess can't use private properties in abstract class. try using protected ones. the documentation same: http://docs.doctrine-project.org/en/latest/reference/inheritance-mapping.html .

php - how to get javascript code as a responce and set in div from ajax page? -

i want facebook comments box, getting ajax page in response. when data coming ajax, alerting it. showing in alert box, when trying set in div, it's not setting properly. here piece of code in want set in div ajax page. <div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getelementsbytagname(s)[0]; if (d.getelementbyid(id)) return; js = d.createelement(s); js.id = id; js.src = "//connect.facebook.net/en_us/all.js#xfbml=1"; fjs.parentnode.insertbefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script> <div class="fb-comments" data-href="https://www.facebook.com/video/embed?video_id=23423424242" data-width="470"></div> why not setting in div? assign ajax response div this $('#your_div').html(response);

ios - Not able to add appdelegate in object /// cocos 2d uikit integration -

Image
i create new cocos 2d project. want integrate ui kit in it. have followed ray wendelich tutorial , on how integrate uikit , cocs 2d. i have completed tutorial when create own project. not able add appdelegate class of object in identity inspector. as can see in image, there no option appdelegate (in drop down list) object, in raywenderlinch tutorial shown. use appcontroller instead of appdelegate . tutorial referring old cocos2d version. in cocos2d 2.0 onwards used appcontroller in place of appdelegate. again don't know why cocos2d team doing kind of simple naming changes !!!

PHP - compare two diffrent type variable bug or issue -

there 2 different type of variables. while comparing both variable using == operator returns weired output. bug or other issue? surprised. here code, $a=1000; $b='1000square'; if($a==$b){ echo "a equal b"; }else{ echo "a not equal b"; } it outputs : equal b. expected : not equal b. can explain? thanks!!! there difference between == , === in php. see documentation: http://dk1.php.net/manual/en/language.operators.comparison.php what happens in statement $a==$b php needs decide how compare $a , $b . since @ least 1 operand ( $a ) number, php uses numerical comparison instead of string comparison. therefore $b converted number. in php, string '1000square' converted number 1000. why code shows $a==$b true. however, $a===$b false, since === compares type well. might operator looking for.

asp.net - Is there point in using Sessions in this particular case? -

the client opens website through non-web app , gives id , unique security code through query strings. url looks smth this: .../default.aspx?ui=21&sc=b2r#67!kl for different clients, website has different content. users not more 10 (considering 1 client 1 company has many employees(users) , users of 1 company security code same). 10 users same company have different ids ( ui ) same security code ( sc ) , on different companies. so there point in using sessions or sufficient use query string values distinguishing users? why/why not? suggestion of other, better way of implementation welcome. i agree having url hold information userid's , security code not idea. maybe make 'landing page' still pass in information in query string, on page set 2 session variables 1 userid , other security code. redirect default page without query strings. anytime need check variables can through session, , without having querystring showing. thought.

get size of file before download from amazon s3 in android app -

Image
i have developed app in have asynctask downloads file amazon s3 server. related files quite large sized, need show progress bar when download happens , spiral progress bar doesn't here when keeps rotating , irritates user. need use horizontal style progress bar need know size of file downloaded. know of way know file size before downloading amazon s3. this downloading code have used.. @override protected void doinbackground(void... params) { transfermanager manager = new transfermanager(access); file file = new file(environment.getexternalstoragedirectory()+"/downloads", downfile); filedownloaded = "/downloads/"+ downfile; file.setwritable(true); download down = manager.download("files", filetodown, file ); try { down.waitforcompletion(); } catch (exception e) { e.printstacktrace(); } return null; } 'downfile' file location sa...

osgi - How to specify system package exports in pax exam -

pax exam used test apache cxf distributed osgi. updated apache felix 4.2.1. in newer version of felix problems packages exported cxf spec bundles , system bundle. no idea why did not occur older felix 3.x. for distribution control in felix config ( see config template use ) there use "org.osgi.framework.system.packages" property define system package exports. how can same using pax exam. know how using karaf exam can not used want explicitly test against pure felix. i tested coreoptions.systempackage allows add exports not redefine them. pax exam 3 option[] conf = options( systemproperty("org.osgi.framework.startlevel.beginning").value("4"), systempackages( "com.ibm.uvm.tools", "com.sun.jdmk.comm", "sun.misc", "javax.jmdns", "javax.microedition.io", "javax.servlet.http", "javax.persistence", ...

android - ActivityManager No longer want my app -

i'm developping android application need run on android device 12 hours in row. device nothing except using app, in foreground. after variable delay app got killed os message: i/activitymanager( 360): no longer want com.my.app (pid 1234): empty 10292s i/qtaguid ( 360): failed write_ctrl(s 0 10066) res=-1 errno=1 w/networkmanagementsockettagger( 360): setkernelcountset(10066, 0) failed errno -1 i/windowstate( 360): win death: window{415f9718 u0 surfaceview} i/windowstate( 360): win death: window{415b8f08 u0 com.my.app/com.my.app.mainactivity} w/windowmanager( 360): force-removing child win window{415cc938 u0 surfaceview} container window{415b8f08 u0 com.my.app/com.my.app.mainactivity} my app displaying local html file videoview , use service keep real time connection server. think related service couldn't find clue that. there way stack of going on kind of errors ? edit: i tried run app without service , problem still happen not related service. edit 2: he...

sql server - how to know status of currently running jobs -

i need know if given job running on ms sql 2008 server. not invoke same job again may lead concurrency issues. it looks can use msdb.dbo.sysjobactivity , checking record non-null start_execution_date , null stop_execution_date, meaning job started, has not yet completed. this give running jobs: select sj.name , sja.* msdb.dbo.sysjobactivity sja inner join msdb.dbo.sysjobs sj on sja.job_id = sj.job_id sja.start_execution_date not null , sja.stop_execution_date null

javascript - Populating js array in blade template -

i'm trying build javascript array of data use in flot result of php db query. when i'm outputting numbers ($lic->users) it's fine, whenever try output string blank page in browser. i've tried: {{ $lic->companyname }} "<?php echo $lic->companyname; ?>" {{{ $lic->companyname }}} '"'+ <?php echo $lic->companyname; ?> +'"' but when hard-code (to say, 'companyname'), builds bar graph (& displays page) fine. var data = [ @foreach($licdata $lic) { 'label': "{{ $lic->companyname }}", 'data': [ ["{{ $lic->companyname }}", {{ $lic->users }}], ["{{ $lic->companyname }}", {{ $lic->emps }}] ] }, @endforeach ]; i think must quoting/escaping string in js, can't work out what, know correct syntax is? it fault, used: "<?php echo $lic->co...

apache - creating custom php error log file -

is there multiple error logs within apache? meaning there php log, apache log etc? through research i've seen error log paths extend document root file type of file or through many folder such /var/tmp/my-errors.log what difference between these error logs? what var , tmp mean? , created user or inside apache? is file file type of file unserviceable apache? server creates error log php within document root file type of file , standard thing? i want create error log file how create 1 , put make unreadable, unserviceable user? do create in document root file extension of .log , or outside document root there in fact unserviceable apache? i log file within document root, , unserviceable apache, do creating file file type of file , if how do this? what difference between these error logs? apache has access.log storing information files have been requested , generall error.log storing (or most) errors occurred during fullfilling requests. you can...

Join Postgresql Tables with naming convention -

say have many postgresql tables same columns , sort of naming convention. tablename_descriptor: tablename_anotherdescriptor: tablename_descriptor3: id value id value id value 1 val1 1 val4 1 val7 2 val2 2 val5 2 val8 3 val3 3 val6 3 val9 is there way join tables name begins "tablename"? giving result tablename: id value 1 val1 2 val2 3 val3 4 val4 5 val5 6 val6 7 val7 8 val8 9 val9 here dynamic sql, results of can execute various tables union all 'd together. select string_agg('select row_number() on () rn,value ' || tablename,' union ') pg_catalog.pg_tables schemaname = 'public' , tablename ~* e'tablename\\_descriptor'...

javascript - JQuery and Dynamic Table rows -

i trying build of shopping cart jquery , having heck of time figuring out how go making work. i have place buy ad spaces on website. there table 5 columns(zip code column(input), service column(select box), ad size(select box), ad price(input readonly), , options column adding or removing rows. had working correctly until wanted add option large or small ads , charge different price according ad size. <table style='width: 100%;' id='adstable'> <tr class='addedrow'> <td>zip</td> <td>service</td> <td>ad size</td> <td>price</td> <td>options</td> </tr> <tr> <td><input type='text' maxlength='5' class='zip' /></td> <td> <select name='servicetype' ...

c# - Does string.IsNullOrEmpty have performance issues? -

is there difference between 2 ways of checking string? if(!string.isnullorempty(mystring)) { //do } and if(mystring != null && mystring != "") { //do } so far though no, saying so. , he's saying second 1 better first 1 requires method call. i'm little confused. like every 1 else answered, assumed there no performance difference, ran benchmark sure. results not expected... here's code benchmark: using system; using system.diagnostics; static class program { static void main() { int count = 1; // first run jit warm-up isnullorempty(null, count); testequalsempty(null, count); testlengthzero(null, count); count = 1000000000; console.writeline("case 1: s == \"test\""); runtests("test", count); console.writeline("case 2: s == null"); runtests(null, count); console.writeline("case 3: s ==...

blackberry - Encoding issue while writing data to OutputStream -

i working on balckberry mobile application. data , post server application on java.io.outputstream using javax.microedition.io.connection object. although setting "content-type" property connection still cannot correct encoded string on server side please note that: server works fine utf-8 encoded string have verified using poster xml correctly encoded on client side before written outputstream can see in debug mode anyone can find glitch below code. // client side code // xml string xml , correctly encoded, can see arabic or chinese character in debug mode byte[] requestbyte = xml.getbytes(); // compress request bytes array // initialize connection // set connection properties con.setrequestmethod(httpconnection.post); con.setrequestproperty("user-agent", "profile/midp-2.0 configuration/cldc-1.0"); con.setrequestproperty(...

android - dialog buttons with count-down for default button -

Image
how can make dialog user, not general dialog, there button\buttons 1 of them default answer, , button on time count-down. for example: dialog: "hi may you..............?" (yes/no) the no accepted automatically after number of seconds. this 1 more example : like this: this might perfect answer, think work , can customize code needed. create layout has dailog custom view, name (my_dialog_layout.xml): <?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <textview android:id="@+id/my_dialog_layout_message_text_view" android:layout_width="fill_parent" android:layout_height="wrap_content" android:textappearance="?andro...