Posts

Showing posts from June, 2012

git - How can I make the SSH client not ask for a passphrase when it is not required -

git - How can I make the SSH client not ask for a passphrase when it is not required - i'm trying set cc.net build private git repo. i have created key pair, private key has no passphrase, , uploaded public key server. able git clone git@myserver:myrepo when running command prompt. the problem when seek clone repo, have specify passphrase, though there none. means have press enter, , causes automated clone hang forever (since there noone this). how prepare problem? the problem in .ssh/config file, had specified putty my_id.ppk key file instead of openssh file. specifying openssh file instead made work. git ssh cruisecontrol.net

xml - Where is .xsd located for http://www.w3.org/2007/app? -

xml - Where is .xsd located for http://www.w3.org/2007/app? - if i'm defining schema (using visual studio 2010's xml editor) business object, how can import external namespaces? i'm extending schema google commerce search, how define namespace-prefixed elements? e.g. when querying of product data, 1 element , edited , belonging app namespace looks like: <app:edited>2012-01-17t17:22:05.182z</app:edited> visual studio suggests might need import .xsd file http://www.w3.org/2007/app namespace. need find other .xsd files rest of namespaces included in google product feeds? e.g. xmlns:sc , xmlns:scp find these? or going wrong? <?xml version="1.0" encoding="utf-8"?> <xs:schema id="entry" xmlns:xs="http://www.w3.org/2001/xmlschema" targetnamespace="http://www.w3.org/2005/atom" elementformdefault="qualified" xmlns="http://www.w3.org/2005/atom" xmlns:app=...

java - Best way to interact with application logs output from log4j (while also are being updated by application) -

java - Best way to interact with application logs output from log4j (while also are being updated by application) - may simpler think confused on following: i want able nowadays user (in graphical interface) logs produced log4j. i read files , nowadays it, wondering if there standard way updates happen @ same time other parts of application log concurrently. the log4j files multiple i.e. rolling appender also presentation while there no logging happening. i.e. view of logs date update: constraint java 6 you can utilize java 7's nio2 libraries notified when 1 of multiple files get's modified in directory, , reread & display it: http://blogs.oracle.com/thejavatutorials/entry/watching_a_directory_for_changes java multithreading file file-io log4j

what books or java tutorials for developing enterprise application on Java EE? -

what books or java tutorials for developing enterprise application on Java EE? - are there diy-enterprise-application book or tutorial out there takes building entire enterprise application? is wrong the java ee 6 tutorial? as far building application scratch, o'reilly's java ee books tried that. main problem java ee apps can built lot of different ways, it's not easy nowadays "one example" develop unless concerned developing 1 type of java ee architecture. java enterprise

matlab - How to find an accuracy of a classifier -

matlab - How to find an accuracy of a classifier - i using knn classifier , found knnclassify classification me in matlab. code: class = knnclassify(testvec,trainvec, trainlabel); the problem face now, knnclassify classifies points , gives them value find accuracy of classification. i tried this: class = knnclassify(testvec,trainvec, trainlabel); cp = classperf(testlabel,class); cp.correctrate it giving me error: ??? error using ==> classperf @ 149 when class labels of cp object numeric, output of classifier must non-negative integers or nan's. error in ==> knn @ 3 cp = classperf(testlabel,class); is there improve method find accuracy of classifier or corrections should improve code above? the values of labels should 0 or 1. the code type : cp = classperf(trainlabel); class = knnclassify(testvec,trainvec, trainlabel); cp = classperf(testlabel,class); cp.correctrate matlab knn

sync mysql to mssql using php -

sync mysql to mssql using php - gotta little task do.... got 1 server mssql & mysql dbs (say mssql-a , mysql-a) n clients mysql , php (say mysql-b, mysql-c, ...) all databases has same structure. need write php script transfer info mssql-a mysql-a (i.e., transfer between 2 db software mysql & mssql on same server). then mysql-a mysql-b (transfer between server mysql client mysql), mysql-a mysql-c, mysql-a mysql-d , on. clients in different geographical locations. net used transfer. can 1 help me in doing this? there aspects come under consideration, consistency around systems, info loss, etc. please suggest something... thanks in advance.. php mysql sql-server sync

iphone - Distorting part of a UIView -

iphone - Distorting part of a UIView - i have interesting problem. there's interesting solution :) i have uiscrollview view takes width of ipad screen. content of scrollview is, obviously, wider. now, i'd apply transformation visible part (that is, screen area) of scroll view gently curve 2 ends. thus, there 2 issues: 1) such transformation possible @ all? want shift left , right side little , have top , bottom edges of view curved required such middle points don't move. 2) don't wish apply contents of scroll view since effect lost when scrolled out of view. instead wish apply result parent container. work? here's graphic: tim just wild guess, how using ordinary image on top of scroll view? image show "distortion" effect while underlaying view left untouched. iphone ios ipad graphics transform

java - ICS Keyboard Source Code -

java - ICS Keyboard Source Code - im trying build somthing on mature keyboard tried sample softkeyboard not satisfying. know can find icescream sandwich keyboard source? or mature keyboard suggestions? you can download android ics source code from: http://source.android.com/source/downloading.html from there should able grep through , find source code keyboard. java android

python - how to control version of data object (instance) in sqlalchemy? -

python - how to control version of data object (instance) in sqlalchemy? - how 1 set model in sqlalchemy have versioncontrol in instance(column_version)? unique pk on table. unique version on pk. archive-flag (latest version not archived). e.g. init= object: -------------- *version;update;user;id;archive;rest* 1;2012-01-01;usera; uniquekey;no;data=green on_update= object -------------- *version;update;user;id;archive;rest* 1;2012-01-01;usera; uniquekey;**yes**;data=green **2**;2012-01-05;userb; uniquekey;no;data=red has thought on how accomplish that? or experience? i thinking 2 db's right (archive, active) archive holds "old"versions (pk = uniquekey+ version) while active (pk = uniquekey). (for inquire why should so? im thinking difference between consistence &coherence mapping--> 1 either map specific version object1 version7 or actual version object1). python sqlalchemy version

java - How to include arguments in a where-clause in Android SQLite? -

java - How to include arguments in a where-clause in Android SQLite? - i have table t1, has float column representing julianday. want delete entries julianday older n-day. tried: db.delete(t1, col_julianday + " <= julianday('now', '- ? days')", new string[] { integer.tostring(days) }); but got error android: android.database.sqlite.sqliteexception: bind or column index out of range i think because '?' mark quoted in where-clause. rather resorting raw sql, suggest trying utilize concatenation operators in clause. db.delete(t1, col_julianday + " <= julianday('now', '- ' || ? || ' days')", new string[] { integer.tostring(days) }); java android sqlite3

jquery - check box checked when click in associated label -

jquery - check box checked when click in associated label - i have checkbox , description of checkbox in label .i want check checkbox when label clicked. markup: <input id="checkbox1" type="checkbox" /></div> <label id="lblassociatewithcheckbox" title="check"></label> in jquery try: $(document).ready(function() { checkcheckbox($('lblassociatewithcheckbox'), $('checkbox1')); function checkcheckbox(lblid, chkid) { $('#' + lblid).live("click", function() { homecoming $('#' + checkbox1).attr('checked', 'checked'); }); } }); but not work.i got error in firebug . uncaught exception: syntax error, unrecognized expression: #[object object] what error ? if not proper way suggest alternative way.thanks. update: saw comment under pavan's reply wa...

c# - Garbled subject line in Lotus Notes -

c# - Garbled subject line in Lotus Notes - my c# app sends e-mail messages user. 1 of users in state of japan , uses lotus notes (v8.5.1). reports e-mail subject line contains garbled text. when send same message own e-mail client (outlook express) subject line renders fine. gmail renders text correctly. does have thought how tackle problem? below follows finish e-mail message: x-asg-debug-id: 1328001534-0391c50bb713ff80001-npaiwi received: server46.mailservera.nl (server46.mailservera.nl [93.94.226.162]) barracuda.klm.nl esmtp id jsyj8wpen4gedrln <pdamster@klm.nl>; tue, 31 jan 2012 10:18:54 +0100 (cet) x-barracuda-envelope-from: klmsemin@server46.mailservera.nl x-asg-whitelist: sender x-barracuda-apparent-source-ip: 93.94.226.162 received: server46.mailservera.nl (localhost [127.0.0.1]) server46.mailservera.nl (8.14.3/8.14.3/debian-9.4) esmtp id q0v9irpk014369 (version=tlsv1/sslv3 cipher=dhe-rsa-aes256-sha bits=256 verify=not) <pdamster@klm.nl>; tu...

android - Issue with custom SimpleCursorAdapter -

android - Issue with custom SimpleCursorAdapter - i'm trying fill grid view using info db cursor using custom simplecursoradapter. cursor has info (i checked), nil shown in gridview, , getview() method not called. anybody can help? why getview() not called? thanks activity dbadapter = new dbadapter(this); dbadapter.open(); cursor c; c = dbadapter.fetchpclist(); startmanagingcursor(c); string[] = new string[] {}; int[] = new int[] {}; gridview gridview = (gridview) findviewbyid(r.id.gridview); gridview.setadapter(new pciconadapter(this, r.layout.pc_icon, c, from, to)); c.close(); dbadapter.close(); adapter public class pciconadapter extends simplecursoradapter { private final context mcontext; private final int mlayout; private final cursor mcursor; private final int mpcidindex; private final int mclassnameindex; private final layoutinflater mlayoutinflater; private final class viewholder { public textview pc...

Find document in Sharepoint -

Find document in Sharepoint - looking way find document registered in sharepoint. can find document in documet library or list next code. spsite ospsite = new spsite(_serverurl); spweb ospweb = ospsite.openweb(); splist osplist; splistitemcollection osplistitemcollection; osplist = ospweb.lists["listname"]; splistitem listitem = null; listitem = osplist.getitembyuniqueid(new guid(spguid)); but need iterate trough list if dont know in list document registered or there more efficient way. if uniqueid info have have create spsitedataquery retrieve url of document: spweb web = // ... spsitedataquery q = new spsitedataquery(); q.query = string.format( "<where><eq><fieldref name='uniqueid' /><value type='lookup'>{0}</value></eq></where>", spguid); q.lists = "<lists basetype="1" />"; // restrict document libraries q.rowlimi...

ios - UIViewAnimation does not work in Objective-C -

ios - UIViewAnimation does not work in Objective-C - i seek go first view , animate it. animation not work. code shown below: - (ibaction)geribtnclick:(id)sender { [uiview beginanimations:@"flipping view" context:nil]; [uiview setanimationduration:1]; [uiview setanimationtransition:uiviewanimationtransitionflipfromleft forview:self.view cache:yes]; [self.view removefromsuperview]; //ikinci view kaldır. [uiview commitanimations]; } please advise on wrong , how can resolved. the way manage button uinavigationcontroller . should calling [navcontroller popviewcontrolleranimated:yes] . create segue you're looking for. otherwise you're going have create entire transition, just remove view. creating own transitions not beginner subject; want utilize uinavigationcontroller . objective-c ios xcode uiviewanimation

javascript - How can I add go to the next slide in impress.js -

javascript - How can I add go to the next slide in impress.js - impress.js new web presentation written using javascript. want create custom events go next page. example, might create "next" , "previous" button. the entire impress.js file function, calling selectprev(); within function go next page. however, i'm not javascript, don't know how phone call selectprev(); outside function. the file can found here: https://github.com/bartaz/impress.js/blob/master/js/impress.js by looks of it, whole file within closure, , selectnext local closure. additionally, used indirectly in key listener, getting there impractical. thus, without modifying source, not see easy way @ selectprev/selectnext . here message commit 6 hours ago: impressive refactoring of slide selection - getting closer api it seems developer planning add together proper api soon. if wait little, there should standard, sanctioned , (hopefully) documented way interact im...

Make vertical jquery slide down menu stay open -

Make vertical jquery slide down menu stay open - a noob question. reply simple, somehow, cannot figure out, , need move on in project. i have vertical nav menu, , have slide downwards on hover. menu remain open, 1 time has slid down. have tried deleting lastly row of code, doe not pretty. i have tried implement stu nicholls method , did not work. effect have. my html menu : <nav id="verticalmenu"> <ul> <li><a class="slide" href="#">kalendarium</a> <ul class="down"> <li><a href="#">konzerte</a></li> <li><a href="#">seminare</a></li> <li><a href="#">vortraege</a></li> </ul> </li> <li><a href="#">projekte</a> </ul> and jquery it: <script type="text/javascript"> (function($){ //cac...

importing excel data with Python -

importing excel data with Python - i'm trying create feature class xy table using excel info .xls i found out makexyeventlayer_management seems doesn't apply .xls. have alter ~100 files csv, or knows trick? cheers xlrd should work you. python excel xls

How to turn off JasperReports generated image file names for HTML reports? -

How to turn off JasperReports generated image file names for HTML reports? - i have jasper study gets sent out @ scheduled time via quartz. after jasperreports generates markup shove email goes out customer. there several sub-reports within main study footer images @ bottom of main report. images src values point generated image file name (the one's jasper makes, ie: blah/img_0_0_13). setup web server hold report's generated html files, can accessed anywhere, ie: http://example.com/jasperreport/images/thisreallysucks/samplereport.html_files/img_0_0_13 so question how turn off crazy file name generation , utilize simple ie: http://example.com/jasperreport/images/thisdoesntsuckasbad/samplereport.html_file/example_logo.gif i setting jrhtmlexporterparameter.images_uri point web server images. another big problem if of sub-reports missing due lack of data, generated files images change. have 4 sub-reports... "lazy loaded images not given name, because s...

iphone - CFString objects being declared by [NSBundle mainBundle] -

iphone - CFString objects being declared by [NSBundle mainBundle] - i working on performance improvement of ios cocos2d game. checking memory allocations of app help of instruments tool when noticed 1 thing. there many cfstring objects beingness declared , held [nsbundle mainbundle] call. says, category: cfstring (immutable) responsible caller: [nsbundle mainbundle] there many places in code wrote next lines [[nsbundle mainbundle] pathforresource:@"resource-name" oftype:@"png" isdirectory:imagedirectory]; is cfstring problem because of above code because giving hard coded string in pathforresource method? or can reason of issue? can please help? cfstring allocations taking 2mb of code worried it. best regards these cfstring's due having big number of resources in application bundle. in testing found 1 cfstring allocated each file @ root of bundle. presumably kind of caching of path names. i working on app 1,000's of resources i...

jquery - Current class is removed on page refresh -

jquery - Current class is removed on page refresh - i trying create user interface, when refresh page, it's removing class current navigation link. i next tutorial http://www.ssdtutorials.com/tutorials/series/list-grid-view-jquery-cookies.html below code: $(function() { var cc = $.cookie('list_grid'); if (cc == 'g') { $('#products').addclass('grid'); } else { $('#products').removeclass('grid'); } }); $(document).ready(function() { $('#grid').click(function() { $(".current").removeclass("current"); $(this).addclass("current"); $('#products').fadeout(500, function() { $(this).addclass('grid').fadein(500); $.cookie('list_grid', 'g'); }); homecoming false; }); $('#list').click(function() { $(".current").removeclass(...

How to clear cookies of applications running in iPhone and Android? -

How to clear cookies of applications running in iPhone and Android? - is there way clear cookies of given application in iphone , android. know can done code, need know if can done phone itself? in android clicking on "clear data" button in settings > applications > manage applications > applicaitonname log me out of application. delete cookies? most importantly, how done in iphone? http://sqastuff.blogspot.com there isn't way on iphone far know because each app can save it's cookies in different way, also, you're limited in way can interact other iphone app, if apps saved cookies same way you'd still out of luck. android iphone cookies

SVN not working properly -

SVN not working properly - i having problem updating web root changes.... in local working copy, file commited revision 261. adam$ svn info page_user.class.php .... lastly changed rev: 261 on web root, uses working re-create of same svn: # svn update page_user.class.php @ revision 262. # svn info page_user.class.php ... revision: 262 lastly changed author: adam lastly changed rev: 32 as can see lastly changed rev should 261, it's not happening, , it's not giving out error. are using same branch/trunk ? have tried update root of working re-create , not single file? svn st -u print out ? svn

ios - UIActivityIndicatorView won't show in UIWebView -

ios - UIActivityIndicatorView won't show in UIWebView - i have uiwebview show activity indicator in while page loading. have added uiwebviewdelegate , added indicator in .xib file still doesnt show. -(void) webviewdidstartload:(uiwebview *)webview { [webview addsubview:loadingview]; [webview bringsubviewtofront:loadingview]; [loadingview startanimating]; } -(void) webviewdidfinishload:(uiwebview *)webview { [loadingview stopanimating]; } can help me? thanks. make sure iboutlet loadingview connected view object in interface builder. ios webview loading uiactivityindicatorview

ios - Why is XCode 4 compiling ~ 3000 XIBs when I only have ~ 200? -

ios - Why is XCode 4 compiling ~ 3000 XIBs when I only have ~ 200? - i working on app has 12 localizations of 16 xibs. xcode 4, after clean , rebuild, says compiling 2704 xibs! the build log shows xcode compiling same xib many times each localization. anyone know why be? note works fine in app -- doesn't seem have effect you'd imagine. it's wasting time! :-) status: log: project navigator excerpt: yeah, have encountered xcode issue too. don't know how stop xcode adding xib files multiple times, there workaround shorten project build time: should go current target's build phases tab , remove duplicated xibs in copy bundle resources stage, leaving re-create each one. to create reply more clear: inside copy bundle resources list should leave one item each individual xib file, in spite of number of languages have. similar to: ios xcode xcode4 localization xib

web services - How can I create a webservice syncronized with Android SQLite in a mobile client app? -

web services - How can I create a webservice syncronized with Android SQLite in a mobile client app? - i must create webservice work android apps , sqlite database contained in it, the webservice should upgrade info received sqlite db in application , supports multiaccounts (login username , password). i have not much experience webservices, there's tutorial argument or open source application webservice , android client can utilize illustration larn in way can operate??? i ready reward can help me. i understand webservice 1 starts synchronization, problem how know if phone ready or not. so, should utilize force notifications (c2dm). notifications arrive phone mobile when avaiable trhough google servers. user recive notification, can inquire him update. here have more info c2dm: link here hope helps little. android web-services sqlite

Multi-layered Hash in Java -

Multi-layered Hash in Java - in perl if want have multi-layered hash, write: $hash_ref->{'key1'}->{'key2'}='value'; where 'key1' might person's name, 'key2' might "savings account" (vs. "checking account") , 'value' might amount of money in account. is there equivalent in java, i.e. access values via hash references? what's syntax this? examples or other resource references appreciated. thanks! you can have map<map<..>> , you'll able phone call map.get("key1").get("key2") but note java statically-typed, object-oriented language. you'd improve creat classes: person , savingsaccount , , person has field private savingsaccount savingsacount . you'll able compile-time safe: map.get("john").getsavingsaccount() java hash reference multi-level multi-layer

opengl es - Android. AndEngine. Image artifacts where transparency is used -

opengl es - Android. AndEngine. Image artifacts where transparency is used - i using andengine (2d opengl-based engine). when utilize textures transparency (png images) have image artifacts on borders on image. need help fixing this. have attached 2 images. on first have text displayed using font. on sec can see rounded corner on corner of texture can see artifact well. please note occurs on real device. on emulator ok. device samsung i5700 galaxy spica running android 2.1 big community wiki of andengine artifacts sprite artifacts bilinear filtering interpolates colour of nearest 4 pixels, makes texture nice while scaled/rotated, or shifted non-integer values, has difficulties. black or dark line artifact the texture atlas background perchance black, , border pixels of texregion mixed background. utilize custom transparent texture atlas, or utilize modified textureatlas builder fills transparency (todo find forum link described) sprite border has unwanted alp...

CSS auto horizontal margin with a bottom margin -

CSS auto horizontal margin with a bottom margin - i have div margin: 0 auto; , part works great. want give div bottom margin of 80px. i've tried margin: 0 auto 80px; , work fine in webkit browsers, not in ff. know how accomplish browsers? what said (0 auto 80px) should work, regardless of browser unless old. i've done many times myself without error. think else going on here, know sounds silly maybe other selector you're not aware of? happens lot more 1 guess. css margin

jquery - Reload page out of iframe -

jquery - Reload page out of iframe - i'm using fancybox , zend. hope next clear. on www.example.com/template/edit/id/3 have jquery ui tabs. reachable straight via anchors. e.g. www.example.com/template/edit/id/3#tabs-2 on #tabs-2 have elements, doesn't matter exactly. can create or edit them. elements got own controller, editing them phone call /elements/edit/id/44. currently, i'm doing in layer fancybox. i'm using iframe functionality of fancybox that. so, if on /template/edit , click on edit button of element, layer opens includes iframe loads /elements/edit. so, if alter element , click on save, want layer automatically close , reload. fancybox provides alternative specify should when gets closed. @ moment got that: 'onclosed' : function() {window.location.reload();} this reloads top window , not iframe. also, there's possibility close fancybox via js. i'm doing setting view variable triggers this, e.g: <?php ...

python - Biopython error - The system cannot find the file specified -

python - Biopython error - The system cannot find the file specified - i have encountered error not able resolve. i trying perform easiest set of commands perform tblastn algorithm, looking sequence (sequence specified "pytanie.fasta" file) in database (also specified file -> cucumber.fasta). result saved in "wynik.txt" file. the code looks following: from bio.blast. applications import ncbitblastncommandline database = r"\biopython\cucumber.fasta" qr = r"\biopython\pytanie.fasta" output = r"\biopython\wynik.txt" e = raw_input("enter e-value: ") tblastn_cline = ncbitblastncommandline(cmd='blastn', db=database, query=qr, out=output, evalue=e, outfmt=7) print tblastn_cline stdout, stderr = tblastn_cline() and error get: file "c:\users\ibm_admin\desktop\python\workspace\biopython\blast.py", line 20, in <module> stdout, stderr = tblastn_cline() file "c:\python27\lib\site-package...

Enforcing a min length in Django password -

Enforcing a min length in Django password - i using django.contrib.auth.views.password_password_reset_confirm alter user's password. how urls look: from django.contrib.auth import views auth_views url(r'^password/reset/confirm/(?p<uidb36>[0-9a-za-z]+)-(?p<token>.+)/$', redirect_if_loggedin(auth_views.password_reset_confirm), name='auth_password_reset_confirm'), currently, doing straight django trunk - # django.contrib.auth.views def clean_new_password2(self): password1 = self.cleaned_data.get('new_password1') password2 = self.cleaned_data.get('new_password2') if password1 , password2: if len(password1) < 8: raise forms.validationerror(_("password must @ to the lowest degree 8 chars.")) if password1 != password2: raise forms.validationerror(_("the 2 password fields didn't match.")) homecoming password2 surely there must improv...

Is there way to check the type of a preprocessor symbol value in C/C++ -

Is there way to check the type of a preprocessor symbol value in C/C++ - parts of code depend on value of preprocessor symbol: int a() { #if sdk_version >= 3 homecoming 1; #else homecoming 2; #endif } the comparing depends of value of sdk_version. expected integer or compares integer, in case, 3. if sdk_version cannot compared integer, there compile error. is there way abort compilation if sdk_version not of expected type? example: #if type(sdk_version) != int # not compile, know #error "sdk_version must integer." #endif use template generate such error: template<typename t> struct macro_error; template<> struct macro_error<int> {}; template<typename t> void check(t) { macro_error<t> sdk_version_must_be_int; } int ignored = (check(sdk_version), 0); this code generate compilation error, having next string in it, if sdk_version not int: sdk_version_must_be_int see these demo: http://id...

html - JCarousel not rendering in Internet Explorer 8 -

html - JCarousel not rendering in Internet Explorer 8 - got big problem jcarousel in net explorer 8. it works in other browsers i've tested on. i'm hesitant set link site god nailed here trying hits - i'll describe problem. in ie images loading 1 underneath other rather in css box. anyone had problem , know how solve it? it has doctype. in ie , ff page loads in quirks mode. open ff, tools , page info, shows details. missing dtd in doctype. html css internet-explorer-8 jcarousel

Python nested loop -

Python nested loop - hello new python , have question best/pythonic way nested loops. i want go set each directory in array nested array of file contained in directory. i have been looking @ pythons arrays, dicts, sets , tupples , not sure of best way this [ note want 1 level not recursively through directories ] currently have function adds files of sub-directories array, need homecoming parent folder too. thanks in advance def getffdirs(): filedirs = [] path = os.curdir d in os.listdir(path): if os.path.isdir(d): print("entering " + d) curpath = os.path.join(path, d) f in os.listdir(curpath): if os.path.isfile(f): print("file " + f) filedirs.append(f) homecoming filedirs i'd utilize dictionary purpose, keys directories , values lists of files: def getffdirs(): dirs = {} path = os...

variables - Deleting key/value pairs from perl result in Global symbol requires explicit package name error -

variables - Deleting key/value pairs from perl result in Global symbol requires explicit package name error - i trying delete key/value pairs hash, global symbol requires explicit bundle name exception , don't know how debug this. read on solutions, none of them seem work. hash declared in fashion: my $hash = foo(); then go through hash using line of code: while (my ($key, $value) = each %$hash) and in block select values don't want , store keys these values in array declared (before loop of course): my @keysarray = (); i access array retrieve keys using code can delete them hash: for $key (@keysarray){ delete $hash{$key};# line of code causing problem } the lastly line wrote 1 causing global symbol "%hash" requires explicit bundle name exception. any fixes or doing wrong here. p.s. changed variable names , removed other internal code, format same. help please! thanks. delete $hash{$key} deletes entry %hash . there no ...

java - Android application: how to use the camera and grab the image bytes? -

java - Android application: how to use the camera and grab the image bytes? - i'm trying create little app android takes image using device's photographic camera , put's png frame on top of it. way final saved image have beach on top of it, or hats, or anything. have sample programs behavior? have @ sdk documentation on using image capture intent here. i start image capture intent this: intent intent = new intent(mediastore.action_image_capture); startactivityforresult(intent, capture_image_activity_request_code); capture_image_activity_request_code private fellow member in activity: private static final int capture_image_activity_request_code = 100; then byte array photographic camera using next onactivityresult handler: @override public void onactivityresult(int requestcode, int resultcode, intent data) { if (requestcode == capture_image_activity_request_code) { if (resultcode == activity.result_ok) { bit...

android - double save image when i take a picture -

android - double save image when i take a picture - my device samsung s first image saved in sdcard/dcim sec image saved in sdcard/mydirectory why??? and should do? dont want first image here code intent intent = new intent(mediastore.action_image_capture); intent.putextra(mediastore.extra_output, uri.fromfile(gettempfile())); startactivityforresult(intent,take_photo_code); .. private file gettempfile(){ file root = new file(environment.getexternalstoragedirectory(),"universalmemo/"+"data/"+"memo/"+"picturememo"); if(!root.exists()){ root.mkdirs(); } file file = new file(root,getdatetime()); homecoming file; } .. protected void onactivityresult(int requestcode, int resultcode, intent data) { intent intent2 = new intent(); if(requestcode == take_photo_code && resultcode == result_ok){ intent2.putextra("filename", datetime); setresult(result_ok,int...

php - File permission with upload class of CodeIgniter -

php - File permission with upload class of CodeIgniter - hi need set permission 777 uploaded files dont find docs uploaded files in codeigniter... possible set permission 777 upload class of codeigniter ?? $group_id = $this->input->post('group_id', true); // unlink('static/images/uploads/44'); // rmdir('static/images/uploads/45'); $dir = is_dir('../www/static/images/uploads/'.$group_id); if($dir){ $config['upload_path'] = '../www/static/images/uploads/'.$group_id; echo "test"; } else{ mkdir('../www/static/images/uploads/'.$group_id, 0777); $config['upload_path'] = '../www/static/images/uploads/'.$group_id; } $config['allowed_types'] = 'docx|pdf|doc|gif|jpg|png|tiff'; $config['max_size'] = '10000000'; $config['max_width'] = '999999'; $config['max_...

shell - Explain how many processes created? -

shell - Explain how many processes created? - could reply how many processes created in each case commands below dont understand : the next 3 commands have same effect: rm $(find . -type f -name '*.o') find . -type f -name '*.o' | xargs rm find . -type f -name '*.o' -exec rm {} \; exactly 2 processes - 1 rm , other find . 3 or more processes. 1 find , xargs , , 1 or more rm . xargs read standard input, , if reads more lines can passed parameters programme (there maximum value named arg_max ). many processes, 1 find , 1 each file ending in .o rm . in opinion, alternative 2 best, because handles maximum parameter limit correctly , doesn't spawn many processes. however, prefer utilize (with gnu find , xargs): find . -type f -name '*.o' -print0 | xargs -0 rm this terminates each filename \0 instead of newline, since filenames in unix can legally contain newlines. handles spaces in filenames (much more common) correct...

Java ME and Device Manager system.properties -

Java ME and Device Manager system.properties - i utilize win7 , there problem java me sdk 3.0 device manager. when run programme on netbeans ide 7.0.1, error detected.(failed connect device 0! reason: emulator 0 terminated while waiting register!) i searched problem , found something.(javamesdk_installdir>\toolkit-lib\modules\bootstrap\conf\system.properties) need alter settings can't do. when save settings, problem programme occured. "please check whether if file opened in program". closed ide , device manager. programme relate problem? check site customize j2me emulator java-me

php - Session issue with codeigniter -

php - Session issue with codeigniter - i getting php session error on live developed using codeigniter 2.0 a php error encountered severity: warning message: session_start() [function.session-start]: open(/var/lib/php/session/sess_vqp5n2k3f45mjqbh4sudkfesa6, o_rdwr) failed: permission denied (13) filename: libraries/phpsession.php line number: 8 not getting is. check permissions on /var/lib/php/session (which appears current session path). specifically, owner , group. needs accessible web server. see this post, showing similar issue result of switching web servers without changing ownership. php mysql codeigniter

data duplication in sqlite with android app -

data duplication in sqlite with android app - i getting info user in sqlite database. when insert same record in database added again. how can stop duplication of record in sqlite. developing in android. using mobile number primary key. still add together record in database. please suggest me appropriate solutions. in advanced. be aware of limitations of replace or insert or replace these overwrite custom info app user has added these rows in database - not advanced upsert in other sql databases. as mentioned in previous post need identify primary key , utilize info either update old info or remove old row before inserting fresh one. if not possible delete my_table or drop my_table before running insertions there no duplicates. (for improve or worse) create sure info missing new imports not left lying around in app. android sqlite sqlite3

mysql query - select bottom n records -

mysql query - select bottom n records - i have field id records: 1 2 3 . . 9 10 is there mysql query syntax select bottom 5 * table order id desc ? 8 7 6 5 4 thanks! please seek running next query. select column_name table_name order id desc limit 5; mysql

c# - Still unable to transfer large amounts of data via WCF - what else is wrong? -

c# - Still unable to transfer large amounts of data via WCF - what else is wrong? - i have issue i'm trying transfer big number of objects wcf service. have limit transfer of objects 100, otherwise there's kind of communications error. i tried recommendations in solution, found here, maybe i'm missing something, still getting error. here bottom part of wcf service's web.config: <system.web> <httpruntime maxrequestlength="102400" /> <compilation debug="true" targetframework="4.0" /> </system.web> <system.servicemodel> <bindings> <wshttpbinding> <binding name="mywshttpbinding" /> </wshttpbinding> <nettcpbinding> <binding name="mynettcpbinding" closetimeout="00:01:00" opentimeout="00:01:00" receivetimeout="00:10:00" ...

ruby on rails - Session Timeout Message in RoR using Devise -

ruby on rails - Session Timeout Message in RoR using Devise - i have application secured devise , session timeout of 30 minutes. devise working normal navigation, if user clicks on link when timed out redirected login screen message saying "your session expired, please sign in 1 time again continue.", excellent. however have ajax in lot of places. if session times out , user ajax operation want same behavior above rather silently failing 401 error in background. so far have jquery code on each page grab 401s , reload: $(document).ajaxerror(function(e, error) { switch(error.status) { case 401: { // unauthorised (possible timeout) location.reload(); break; } it works enough, there annoying issue: because ajax request hits devise first, when application reloads page directed login page, don't see timeout message, see unauthenticated "you need sign in or sign before continuing." message. is there way ensure on sec ...

c# - how to get selected item in CheckBoxList in Asp.net -

c# - how to get selected item in CheckBoxList in Asp.net - i have checkboxlist in page.is there way selected item values using linq? what best way selected item values in checkboxlist? you go taking items of checkbox list , converting them listitems , collection fetch selected, this: var selecteditems = yourcheckboxlist.items.cast<listitem>().where(x => x.selected); c# asp.net linq

c# - How to render .msg file content in ASPX page? -

c# - How to render .msg file content in ASPX page? - i have e-mails store in sql server database , render within asp.net web application. .msg files stored in blob field , and link download file user's scheme given. however, want render content of message straight without giving user options download it. messages in html format embedded images. suggestions welcome. you need parse mime. can find classes on next page: http://www.codeproject.com/kb/ip/receivingmail.aspx you can load mail service body mailitem: pop3lib.mailitem m = new pop3lib.mailitem("mail body here"); pop3lib.mailitem m = new pop3lib.mailitem(system.io.file.readalltext("c:\\mymail.msg")); response.write(m.gettext()); c# asp.net

javascript - Why does the "g" modifier give different results when test() is called twice? -

javascript - Why does the "g" modifier give different results when test() is called twice? - given code: var reg = /a/g; console.log(reg.test("a")); console.log(reg.test("a")); i result: true false i have no thought how happen. have tested in both node.js (v8) , firefox browser. to workaround problem, can remove g flag or reset lastindex in var reg = /a/g; console.log(reg.test("a")); reg.lastindex = 0; console.log(reg.test("a")); the problem arises because test based around exec looks more matches after first if passed same string , g flag present. 15.10.6.3 regexp.prototype.test(string) # Ⓣ Ⓡ the next steps taken: let match result of evaluating regexp.prototype.exec (15.10.6.2) algorithm upon regexp object using string argument. if match not null , homecoming true ; else homecoming false . the key part of exec step 6 of 15.10.6.2: 6. allow global result of call...

css - HTML — Two Tables Horizontally Side by Side -

css - HTML — Two Tables Horizontally Side by Side - it's me again. i'm trying tables next each other horizontally, got. i'm not sure why code not indented??... <tr> <th> <span onclick="togglediv('favdata', 'favdataimg')" style="cursor: hand;">favorites <img name="favdataimg" src="../images/minus.gif" /></span> </th> </tr> <tr> <td style="width: 300px; text-align: left; padding-right: 30px;"> <div id="favdata" style="display: block;"> <fieldset style="width: 240px;"> <legend>favorites</legend> <table border="0" align="left"> <input type="radio" name="publicradio" value="public" >public: </input> <select name="publicdropdown"> <option value="public dropdown" selected="selected...

cordova - Android phone rotation issues in phoneGap native app -

cordova - Android phone rotation issues in phoneGap native app - i'm quite new in java android development. have issue app. i build android app phonegap opensource , jquery mobile framework. that's looking working. but issue is.... when i'm trying rotate phone after running app, unexpectedly app closing. it's not phone it's happening on every android phone. i want remove screen rotation on app. hope understand help me please.... i had same issue - crash on rotate. dont think had androidmanifest.xml copied right tutorial. didnt add together android:configchanges="orientation|keyboardhidden" to 1st activity. see after , before: after (working): <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" > <activity android:name=".app" android:label="@string/app_name" android:configchanges="orientation|keyboard...

javascript - Node.js: How would you recreate the 'setTimeout' function without it blocking the event loop? -

javascript - Node.js: How would you recreate the 'setTimeout' function without it blocking the event loop? - i've done lot of searching seek , find out how create non-blocking code in node.js. unfortunately, every illustration i've found grounded function that, in end, has built in callback. wanted create own function callback, reason blocks event loop. didn't block event loop: function foo(response){ settimeout(function(){ response.writehead(200, {"content-type": "text/plain"}); response.write("bar"); response.end(); }, 7000); } but did : function foo(response){ function wait(callback, delay){ var starttime = new date().gettime(); while (new date().gettime() < starttime + delay); callback(); } wait(function(){ response.writehead(200, {"content-type": "text/plain"}); response.write("bar"); resp...

javascript - Stop eclipse from inserting tabs instead of spaces on blocks of code -

javascript - Stop eclipse from inserting tabs instead of spaces on blocks of code - i utilize eclipse javascript plugin, have text editor settings "insert spaces tabs" works fine until select block of code , tab or shift tab it, run jslint , aargghh! "mixed spaces , tabs." there missing , possible? i not sure set editor property "insert spaces tabs". set tab policy need go window > preferences > javascript > code style > formatter , create new profile, edit , set tab policy "spaces only". when using tab key spaces inserted. javascript eclipse eclipse-plugin jslint

mysql - Copy values from one column to another in the same table -

mysql - Copy values from one column to another in the same table - how can create re-create values 1 column another? have: database name: list number | test 123456 | somedata 123486 | somedata1 232344 | 34 i want have: database name: list number | test 123456 | 123456 123486 | 123486 232344 | 232344 what mysql query should have? update `table` set test=number mysql database

xml - XSL How do I create Dynamic Table Row -

xml - XSL How do I create Dynamic Table Row - my xml looks this <catalog> <cd> <title>empire burlesque</title> <artist>bob dylan</artist> <country>usa</country> <company>columbia</company> <price>10.90</price> <year>1985</year> </cd> <cd> <title>hide heart</title> <artist>bonnie tyler</artist> <country>uk</country> <company>cbs records</company> <price>9.90</price> <year>1988</year> </cd> </catalog> what want accomplish html table number of rows dynamic, example: table should this: table header <tr> <td>title</td> <td>empire burlesque</td> </tr> <tr> <td>artist</td> <td>bob dylan</td> </tr> <tr> <td>country</td> <td>usa</td> </tr> goes on nodes available cd. all w...

extjs - creating a tab panel in extjs4 with different stores that loads only upon the particular tab is selected -

extjs - creating a tab panel in extjs4 with different stores that loads only upon the particular tab is selected - i'm using extjs4 , i'm trying create tab panel, each tab has different grid loads info store. (each grid different store) load particular store when user clicks on respective tab. don't see how can grab user click on panel. how can that? i had similar performance loading issue , failed solve deferredrender . have add together event activate tab want load when tab activated : { title: 'tab2', bodypadding: 10, html : 'a simple tab', listeners: { 'activate' : function(){ store2.load(); }, } } worked fine me if it's temporary solution. extjs 4.1 should improve loading/rendering performances. we'll see. extjs4 extjs

How to make XCode recognize a custom file extension as Objective-C for syntax highlighting? -

How to make XCode recognize a custom file extension as Objective-C for syntax highlighting? - i'd xcode 4 recognize custom file extension (e.g. *.lx) objective-c syntax highlighting , indentation purposes. how tool automatically this? xcode determines how represent file in user interface based on file's uniform type identifier. far know it's not possible add together additional file extension tags existing uti, can declare new uti conforms type want map to. scheme associate specified file extension(s) new uti , through conformance xcode , every other uti-aware application recognize files source code of mapped type. you may want give thought declare new uti. example, if files of type beingness created tool bundle tool appropriate location. in absence of improve alternative can create stub application bundle , declare new uti there: create new cocoa application project in xcode. in project settings, select application target, info tab. create new exported...

OOP Visibility, in general and specifically in PHP -

OOP Visibility, in general and specifically in PHP - this general oop question, i'm using php, if exists in general, i'd know, give me warning if know it's missing or warped in php. is possible class instantiates object of class (which not extending) set visibility of instantiated object's properties? example: class widget { public $property1; public $property2; public $property3; } class clockmaker { public function getwidget() { $this -> widget = new widget(); $this -> widget -> property1 = "special stuff"; } } $my_clock = new clockmaker(); $my_clock -> getwidget(); $my_clock -> widget -> property2 = "my tweak"; // totally fine , expected... $my_clock -> widget -> property1 = "my stuff"; // should throw error... as far understand, if set property1 protected, clockmaker won't able set value. if stands right now, $my_clock can have it's way widget object. ...

How to increment number on click by using javascript / jquery? -

How to increment number on click by using javascript / jquery? - i have 5 links gets created in loop ($.each): $.each(data, function(index, element) { name = element.name; id = element.id; $('<a href="#" id="'+id+'" onclick="submitnotification('+id+');">'+name+'</a>') }); in case create 5 links: <a href="#" id="1" >name1</a> <a href="#" id="2" >name2</a> <a href="#" id="3" >name3</a> <a href="#" id="4" >name4</a> <a href="#" id="5" >name5</a> and function submitnotification(cdata){ alert('you selected '+cdata->name+' on '+place+'place'); $.ajax({ type: 'post', url: 'http://www.example.com/test.php', data: cdata, datatype:'json', success: function (d...

javascript - Jquery - Accessing nested child elements -

javascript - Jquery - Accessing nested child elements - assume have next html - <div id="parentdiv"> <div id="subdiv1"></div> <div id="subdiv2"> <input id="input"> </div> </div> to access input element using jquery, $("#input"). i'm trying access it, assuming know id of top level div. currently have $($($("#parentdiv").children()[1]).children()[0]) which seem work. there cleaner way of writing this, or way doing ok? you perform .find() implicitly or explicitly: $('#parentdiv input'); // implicitly $('#parentdiv').find('input'); // explicitly reference: .find() javascript jquery

Nginx-gridfs compiling #error must have a 64bit int type in Mac -

Nginx-gridfs compiling #error must have a 64bit int type in Mac - running 10.7.2 follow guide configure append cflags=-wno-error bypass error, got stuck at in file included /usr/local/src/nginx-gridfs/mongo-c-driver/src/bson.h:24, /usr/local/src/nginx-gridfs/mongo-c-driver/src/mongo.h:24, /usr/local/src/nginx-gridfs/ngx_http_gridfs_module.c:43: /usr/local/src/nginx-gridfs/mongo-c-driver/src/platform.h:50:2: error: #error must have 64bit int type make[1]: *** [objs/addon/nginx-gridfs/ngx_http_gridfs_module.o] error 1 make: *** [build] error 2 any idea? i have had same problem when compiling windows. need ensure have typedef int64_t , uint64_t. in order address needed ensure mongo_use__int64 defined. for mac have unistd.h available - ensure define mongo_have_unistd nginx gridfs

PHP + Javascript parent function not getting called -

PHP + Javascript parent function not getting called - alright i've been trying find reply hours couldn't resolve myself. i'm trying phone call javascript parent function php function, however, not getting called. when using onclick method onclick='parent.dosomething(); seems work fine if seek phone call function echo'ing out, fail reason. echo "<script>parent.reloadprofmessages();</script>"; //this not getting called here's php function: function checkactivity($username) { //these queries beingness executed (irrelevant) $querystats = "select users.fullname, activity.id, activity.sender, activity.receiver, activity.type, activity.dateposted, activity.seen, activity.related activity, users activity.receiver = '$username' && activity.seen = '0' order id desc limit 1"; $resultstats = mysql_query($querystats); $num_stats = mysql_num_rows($resultstats); $rowactivity = mysq...

socket.io - XHR polling vs flashsocket and websocket -

socket.io - XHR polling vs flashsocket and websocket - i utilize node.js , socket.io. have problem connection speed socket.io. in net explorer , opera have problem connection speed. - when utilize flashsocket or websocket. when utilize mode of transport-polling xhr connection fast - in browsers (ie, ff, chrome, opera). what difference between mode of transport - xhr-polling , flash / websocket? best mode of transportation? how optimize connection speed socket.io? thanks advice! i'd surprised if general speed of connection on time different between web browsers, reason you'll see delay in initial connection in net explorer , in opera native websocket back upwards not available it's been disabled default. so, if take flashsocket additional flash object (swf file) need downloaded before connection established. websockets beingness introduced in ie10 , in opera available, disabled default. what difference between mode of transport - xhr-polling ,...

php - Reaching 100% Code Coverage with PHPUnit -

php - Reaching 100% Code Coverage with PHPUnit - i've been in process of creating test suite project, , while realize getting 100% coverage isn't the metric 1 should strive to, there unusual bit in code coverage study clarification. see screenshot: because lastly line of method beingness tested return , final line (which closing bracket) shows never beingness executed, , consequence whole method flagged not executed in overview. (either that, or i'm not reading study correctly.) the finish method: static public function &getdomain($domain = null) { $domain = $domain ?: self::domain(); if (! array_key_exists($domain, self::$domains)) { self::$domains[$domain] = new config(); } homecoming self::$domains[$domain]; } is there reason this, or glitch? (yes, read through how 100% code coverage phpunit, different case although similar.) edit: trudging on through report, noticed same true switch statement elsewhere in c...

IIS 7.5 site using impersonation does not have permissions to access Sharepoint web services -

IIS 7.5 site using impersonation does not have permissions to access Sharepoint web services - edit updated new information i've been trying configure asp.net site utilize windows authentication impersonation, , utilize phone call sharepoint 2010 web services. i've enabled impersonation , windows authentication on site, , given in "classic" .net 4.0 app pool identity. display user logged in. when site run server, works fine - user impersonated correctly. tried several user accounts (but local admins...). can upload file sharepoint records "created by" "modified by" site user (and not app pool identity). situation want. when run client machine, fails. page loaded, seems fail when tries access sharepoint lists service 401 unauthorised. farther inquiries have shown me next info sharepoint weblogs when calling list.asmx service: 2012-01-12 22:42:52 10.197.104.208 post /iain/cesa/_vti_bin/lists.asmx - 80 - 10.143.16.141 mozilla...