Posts

Showing posts from May, 2013

java - Is it safe to keep a reference to a thread in a singleton? -

let me give scenario. say first activity loads up, creates thread, run indefinitely in background. now, if move activity, assume thread created in main activity continue run. so, main question - in order manage background thread other activities, safe store reference thread in singleton object? yes , no. theoretically, have no problem, must not allow references escape. problems can arise keeping reference in singleton object private, must not pass reference else or allow access else, or can lose control. secondly, thread created activity must not allow access member variables or allow references them escape. a book on area "java concurrency in practice" brian goetz

wpf - SurfaceCheckBox default template -

can please extract default template of surfacecheckbox me? have tried using blend 2 failed miserably. extracted template has unresolved targetname references. i trying change template check mark top aligned. centered vertically default , there doesn't seem direct way change it. [edit] have tried blend 3 bit better still missing "glow" target , many references it. renders template unusable unless "glow" references removed. if working template no glow. from blend 4. working time, apperently had add reference microsoft.surface.presentation.generic.dll , add xmlns:microsoft_surface_presentation_generic="clr-namespace:microsoft.surface.presentation.generic;assembly=microsoft.surface.presentation.generic" before glow part when editing style. <!-- simplebuttonfocusvisual used show keyboard focus around simplebutton control --> <style x:key="surfacebuttonfocusvisual"> <setter property="control.template

How can I combine multiple refactored Select expressions in Linq (to EF or SQL)? -

say have view model: public class serieslinkviewmodel { public static expression<func<series, serieslinkviewmodel>> fromseries = s => new serieslinkviewmodel { name = s.name, slug = s.slug, }; public string name { get; set; } public string slug { get; set; } } i stuck projection function in there convenience, can like: var links = dc.series.select(serieslinkviewmodel.fromseries); awesome. do if wanted add query? wanted pull description column table. normally, select new { } , put description in there, can't quite because can put 1 projection function in `.select() . i hoping this: q = s in dc.series select new { series = serieslinkviewmodel.fromseries.compile()(s), description = s.description }; but exception: system.invalidcastexception: unable cast object of type 'system.linq.expressions.fieldexpression' type 'system.linq.expression

Java iText Geospatial PDF exporter -

i'm planning use java itext library generate geospatial pdf (http://en.wikipedia.org/wiki/geospatial_pdf). there basic support in itext, have not found high level api. people trying directly use adobe format extensions. http://www.mail-archive.com/itext-questions@lists.sourceforge.net/msg40443.html do know easier solution? thanks in advance, regards, until itext adds high-level api calls it, option dive low level objects (pdfobject's subclasses) copy of pdf specification handy, turned relevant section... err... must in 1 of addendums... ah! here is. , under "part 1:..."->interactive features...->8.8 measurement properties->8.8.1 geospatial features. i wish luck.

How to get title of preferencescreen in android -

i trying gate title of preferencesreen in program ..anybody tell me how can title? code of preference xml here. want title "show list" in program. <?xml version="1.0" encoding="utf-8"?> <preferencescreen xmlns:android="http://schemas.android.com/apk/res/android"> <preferencecategory android:title="settings"> <preferencescreen android:title="show list" android:key ="show_list" android.id="@+id/preference_screen"> <intent android:action="android.intent.action.view" android:targetpackage="com.picknext" android:targetclass="com.picknext.pickname" /> </preferencescreen> <listpreference android:title="remove after pick" android:key="selection_of_y_n_name_pick" android:entries="@array/selection_of_y_n_namepick" andro

c# - Mono.Cecil TypeReference to Type? -

is there anyways go typereference in mono.cecil type? in terms of "what's in box" can have other way round, using moduledefinition.import api. to go typereference system.type need manually using reflection , assemblyqualifiedname . aware cecil uses il conventions escape nested classes etc, need apply manual correction. if want resolve non-generic, non-nested types should fine though. to go typereference typedefition (if that's meant) need to typereference.resolve(); requested code sample: typereference tr = ... type.gettype(tr.fullname + ", " + tr.module.assembly.fullname); // in assemnblies loaded current appdomain , fire appdomain.resolve event if no type found the conventions used in reflection explained here , cecils conventions consult cecil source code.

php - Zend_Soap_Client error calling ASP.net web service: '...not set to an instance of an object' -

i'm trying use zend_soap_client communicate asp.net web service. here's client call: $client = new zend_soap_client(null, array( 'location' => 'http://example.com/service.asmx', 'uri' => 'http://example.com/' )); $user = new userdetail(); $result = $client->userdetails($user); however gives me error: system.nullreferenceexception: object reference not set instance of object. @ service.userdetails(userdetail userdetail) some googling revealed quite common problem. common solution seemed to pass parameters array, tried: $result = $client->userdetails(array('userdetail' => $user)); but gave same error. tried passing params stdclass object, nesting array in 'params' key, , few other things error same. i have asp code web service itself, relevant method is: public result userdetails(userdetail userdetail) { [some stuff] hashtable ht = new hashtable(); ht = userdetail.generat

android widget - Get Path form camera intent ACTION_IMAGE_CAPTURE -

hi using camera intent following... intent cameraintent = new intent(mediastore.action_image_capture); cameraintent.putextra(mediastore.extra_output, (new file(environment.getexternalstoragedirectory(),string.valueof(system.currenttimemillis()) + ".jpg"))); startactivityforresult(cameraintent, 0); now don't know how image path clicked camera in onactivityresult() method please if 1 know me... my solution: @override protected void onactivityresult(int requestcode, int resultcode, intent data) { super.onactivityresult(requestcode, resultcode, data); if (resultcode == result_canceled) { toast toast = toast.maketext(this,"camera cancelled", 10000); toast.show(); return; } if ((requestcode == customerrequestactivity.take_image) && (resultcode == result_ok)) { // mode = mode_viewer; string[] projection = { mediastore.images.media.data }; cursor cursor = managedquery(mc

web services - iPhone framework for presenting lists and details about sales items -

instead of starting scratch, wondering if there ready made iphone functionality presenting store's item lists (small picture , main info) , detail pages (all images , full info). all data stored in online database , setting web services or communication not problem, iphone development experience limited. do know of of nature might utilize? sounds perfect opportunity develop web application iphone. can't remember name of book off top of head, know it's offered o'reilly. other upside have app that's accessible other devices also. here's book, includes hooks interface natively iphone.

Perl or Java Sentiment Analysis -

i wondering if knew of perl modules and/or java classes sentiment analysis. have read lingpipe, program need used commercial use open-source better. looked gate, documentation on sentiment analysis sparse @ best. have @ rate_sentiment in webservice::googlehack module @ cpan . there's more information project @ sourceforge .

html - Fixed Table Cell Width -

a lot of people still use tables layout controls, data etc. - 1 example of popular jqgrid. however, there magic happening cant seem fathom (its tables crying out loud, how magic there possibly be?) how possible set table's column width , have obeyed jqgrid does!? if try replicate this, if set every <td style='width: 20px'> , content of 1 of cells greater 20px, cell expands! any ideas or insights? you try using <col> tag manage table styling rows need set table-layout:fixed style on <table> or tables css class , set overflow style cells https://developer.mozilla.org/en-us/docs/web/html/element/col <table class="fixed"> <col width="20px" /> <col width="30px" /> <col width="40px" /> <tr> <td>text</td> <td>text</td> <td>text</td> </tr> </table> and css table.fixed { table-

iphone - adding multiple lines of text to detailTextLabel without making a custom cell -

is possible add multiple lines of text detailtextlabel without making custom cell in application? if can show me proper way implement this? the line of code cell.detailtextlabel.numberoflines = x; set number of lines cell display (x being number of lines need display). set 0 if want remove maximum limit , display many lines needed.

C++: Write to an existing file? -

this question has answer here: how append text text file in c++? 3 answers in c++, need write existing file , keep previous content there. this have done: std::ofstream logging; logging.open(filename); logging << "hello\n"; logging.close(); but previous text overwritten (gone). did wrong? thanks in advance. logging.open(filename, std::ios_base::app);

php - Geocode on form submit -

i've searched through number of support forums , still can't find answer i'm looking for. essentially, have user registration form on website. when user clicks "submit" saves data in mysql database , redirects them page. simple enough. but want have page has map marker each registered users' approximate location (city, state, country). this isn't hard if users required input own lattitude , longitude. has information readily available??? when user clicks "submit" 3 input fields combined 1 variable ($address). how can geocode variable ($address), , have output 2 other variables ($lat , $lng)??? looking before mysql_connect, way have ready insert mysql database table. $first_name=$_post['first_name']; $last_name=$_post['last_name']; $status=$_post['status']; $service=$_post['service']; $rank=$_post['rank']; $specialty=$_post['specialty']; $address=$_post['city'] . ',&#

ado.net - Row-Level Update Lock using System.Transactions -

i have mssql procedure following code in it: select id, role, jurisdictiontype, jurisdictionkey dbo.securityassignment with(updlock, rowlock) id = @useridentity i'm trying move same behavior component uses oledb connections, commands, , transactions achieve same result. (it's security component uses securityassignment table shown above. want work whether table in mssql, oracle, or db2) given above sql, if run test using following code thread backgroundthread = new thread( delegate() { using (var transactionscope = new trasnsactionscope()) { subject.getassignmentshavinguser(useridentity); thread.sleep(5000); backgroundwork(); transactionscope.complete(); } }); backgroundthread.start(); thread.sleep(3000); var foregroundresults = subject.getassignmentshavinguser(useridentity); where subject.getassignmentshavinguser runs sql above , returns collection of results , backgroundwork a

jQuery Resizable: doubling the resize width -

synopsis: if center resizable element , expand left/right, has illusion expanding half of mouse movement. reason: this happens because object centered. question: how increase rate object being resized compared mouse movement? centered elements, i'd object expand twice size of mouse distance. given centered div, best think of set width in callback. $('#divid').resizable({ handles : 'e,w' , resize : function (event,ui){ ui.position.left = ui.originalposition.left; ui.size.width = ( ui.size.width - ui.originalsize.width )*2 + ui.originalsize.width; } }); the above calculates difference between final , original width , multiplies two, adds original width. i'm not sure best way this. i, one, don't s

google maps - javascript problem -

i have problem google maps v3 code part of example google. want add listener each marker, set marker array. not working :( can me? function initialize() { if (gbrowseriscompatible()) { var map = new gmap2(document.getelementbyid("map_canvas")); map.setcenter(new glatlng(37.4419, -122.1419), 13); // add 10 markers map @ random locations var bounds = map.getbounds(); var southwest = bounds.getsouthwest(); var northeast = bounds.getnortheast(); var lngspan = northeast.lng() - southwest.lng(); var latspan = northeast.lat() - southwest.lat(); var marker = new array(10); (var = 0; < 10; i++) { var latlng = new glatlng(southwest.lat() + latspan * math.random(), southwest.lng() + lngspan * math.random()); marker[i] = new gmarker(latlng,{ draggable: true }); gevent.addlistener(marker[i] , "dragstart", function() { map.closeinfowindow(); }); gevent

actionscript 3 - Input Textfield date mask -

i need restrict users input dates custom format. want have example in jquery: http://www.youtube.com/watch?v=bmatigkykl8&feature=player_embedded how can archieved in as3? you'll have catch keypressed event on textfield. check if key pressed ok @ specified position, if yes, nothing, if not, cancel event (event.cancel = true). alternatively (for more features, these auto added slashes) can cancel event, , use textfield's selection string , checking make new version of textfield's text.

python - Admin search not working for my fields - Django -

i have model encrypted field. so fields encrypted , decrypted enter , leave database. the problem: within admin panel ?q='item' not seem find rows ?field_name='item' find them all!! any ideas? :) if understand question correctly have encrypt search term fit entries in database. fail standard admin functionality, since fields specified search fields handled in same fashion. have create own changelist class , override get_query_set method, can handle field in special way!

wpf - Prism and Click Once -

i interested in how others have done prism , click once. specifically, if have module/dll used in several applications, how handle deployment of update module/dll? have open each application , hit publish? also, sometimes, prism app not have references dll's uses. import them via modulecatalog file. because project not see dlls references not put them in deploy them. how tell click once deploy random dlls? to address above issue tried adding dlls using reference shell project. when build not copy of them output directory because cannot see them being directly used. happens when module used via ieventaggregator. (of course) means when publish dlls missing. so, able use click once prism? or limited? there better way? any advice appreciated. this document seems have answers of questions posed (specifically dynamic libraries). http://msdn.microsoft.com/en-us/library/gg405497%28pandp.40%29.aspx later note: tried steps in walk through , not work. (j

xml - C# HttpWebRequest shows 404, but site is reachable in browser -

i trying download xml file website c#, 404 on urls. wired because still work in browser. other urls still work without problem. httpwebrequest request = (httpwebrequest) webrequest.create(url); request.method = "get"; request.timeout = 3000; request.useragent = "test client"; httpwebresponse response = null; try { response = (httpwebresponse) request.getresponse(); } catch (webexception e) { response = (httpwebresponse)e.response; } console.writeline("- "+response.statuscode); xmltextreader reader = xmltextreader(response.getresponsestream()); this url 1 of said problem urls: http://numerique.bibliotheque.toulouse.fr/cgi-bin/oaiserver?verb=listmetadataformats solved....forgot trim url ;) i can speculate host site might not useragent , returning 404

php - CakePHP 1.3 HABTM model Pagination -

hey guys, have been having issue sine using habtm relationship in models instead of using join in paginate variable in controller, data comes out fine cant set limit of projects 20. i selecting projects db depeneding on features. i havea feature called urgent. im on urgent listing page. this should fetch projects marked urgent, , fine brings results instead of limit of 20 set in paginate function or if try in models. heres pagien array code $paginate = array( 'project' => array( 'limit' => 20,//works fine when paginating projects ), 'feature' => array( 'limit' => 1, //did set 20 when looking thought going limit of feature table 1 anyway, notl imit projects //also tried below 'project' => array( 'limit' => 20,//no luck ), ), ); i use paginate in controller $this->paginate('feature', array(..conditions..)); //this brings projects marked urgent

sql server - sql 2005 - nvarchar(max) - Cannot create a row of size 8064 which is greater than the allowable maximum of 8060 -

i'm getting error when alter table alter column nvarchar(4000) nvarchar(max): cannot create row of size 8064 greater allowable maximum of 8060 i've looked through similar questions , still can't explain why doesn't work converting nvarchar(4000) nvarchar(max) cannot create row of size 8064 greater allowable row size of 8060 i've tried replacing alter statement add column , update: before: alter table mytable alter column mycolumn nvarchar(max) after: exec sp_rename 'dbo.mytable.mycolumn', 'mycolumn_old', 'column' go alter table mytable add mycolumn nvarchar(max) go update mytable set mycolumn = mycolumn_old but still same error. how can update column , what's happening here? it's addition of new column requires 4 bytes. it's nvarchar(max) , bulk of data stored outside row, still needs 4 bytes declare presence. you @ largest rows: select top 10 * mytable order len(mycolumn_old) desc and se

.net - C# using statement at the top of the code page -

almost c-sharp files have using statements @ top of page i.e. using system; using system.io; //code.... what using statements mean @ top of page? why syntax different other using statement declarations. i.e. using (resourcetype resource = expression) statement those using directives . tell compiler namespaces in find classes use in code. they different (and different) using statement defines scope disposable objects.

php - open source audio converter to mp3 -

i'm looking open source audio conversion library can convert audio files of various types mp3. server i'm working standard lamp php. aware of solution? lame can you. might recommend ffmpeg . there php extension ffmpeg , i've found easiest execute directly, isps won't install you. of course, isn't issue own servers.

linux - Bash script to detect when my USB is plugged in and to then sync it with a Directory -

is there bash script and/or daemon can write detect specific usb drive , sync drive directory? for future reference, here's how run bash script upon detection of usb drive. connect device , run lsusb retrieve device's info. should see similar this: $ lsusb bus 002 device 039: id 0bc2:2100 seagate rss llc in case, vendor id of device 0bc2 , product id 2100. now can create udev rule using text editor of choice. $sudo vi /etc/udev/rules.d/85-my_usb_device_rule.rules and add this: action=="add", subsystem=="usb", sysfs{idvendor}=="0bc2", sysfs{idproduct}=="2100", run+="/home/myhome/my_script" /home/myhome/my_script path script whatever want. to make sure detection script execute right away, run command reload udev rules: $sudo udevadm control --reload-rules this tested on fedora 14.

Proper storage of "enumeration" models in Rails -

apologies if question little imprecise, i'll describe problem below. i'm setting models in rails project, , 1 thing i've noticed i'm running more few times dealing attributes meet following criteria: they can set 1 of small, predefined set of values those values need have both name , identifier (whether numeric id, code, whatever) the values ever change result of deal of code change. for example, 1 of models should have status field can set 1 of: defining, executed, or completed. need show specific words within interface, don't want store strings in db in case need change them in future (or internationalize, or whatever.) the obvious option define models each of these models, seems present deal of overhead in maintaining models, ensuring write migrations between environments, etc. each 1 of these, seems lot of overhead. the other option store integer, , whip "enumeration" type class stores translation of values - work fine, i'm conce

load and display PNG image (Not base64) requiring basic authentication in JavaScript -

i'm stuck on this. need retrieve picture e.g. http://ip:port/icon_contact.png using javascript server requiring basic authentication. server can't give base64. don't worry x-domain restriction. in advance, louenas if i'm reading question correctly — no means certain — want retrieve binary data of image file providing basic authentication information directly (not via user). you should able xmlhttprequest object (you can supply auth information in open call), read binary data response i'm sure you'll have stray brand-new and/or implementation-specific stuff. here links msdn , mdc , , (fairly new) w3c docs. microsoft's xmlhttprequest has responsebody , mozilla's (firefox's) has mozresponsearraybuffer , , believe w3c docs discuss binary data here . to display image having loaded via above, transform binary data data url (more correctly "data uri", no 1 says that) string , assign result img tag's src . you'd ha

c++ - Why is explicitly returning 0 from main() considered good practice? -

possible duplicate: return statement vs exit() in main() i've read first chapter of accelerated c++ (seems awesome book), , @ end author says however, explicitly including return main practice.` why considered practice? in c99, omitted return 0 , using exit() signal abnormal program termination, , never missed explicit return. in c99 , in c++ if execution of program reaches closing brace of main() function implicit return 0; executed. wasn't case in c90 - reaching end of main() without explicit return result in indeterminate value being returned (strictly speaking, behavior undefined). i can guess authors of "accelerated c++" feel explicit return practice because makes intent explicit. other reason can think of makes code compatible c90, find difficult believe that hold weight reason.

php - jquery skip a block -

i have jquery game can view here link text the game starts entering number in text field. click play button. after clicking play button set of square appear each rotating random numbers, click on square has number build score, miss 3 times , done. i added game site, can view here link text the problem i'm having site members keep cursor on 1 box , wait number appear in 1 box. ruins game. there way make can't click on same box more once in row. they'll have go click box before can come one. here's complete script var hitcount = 0, misscount = 0; function isnumeric(n) { return !isnan(n); } $("#getit").click(function() { var hitcount = 0, misscount = 0; $('#hitcount').text(0); $('#misscount').text(0); $('#message').hide(100); var li = [], intervals = 0, n = parseint($('#mynumber').val()); var intervalid = -1; if (isnumeric(n)) { intervalid = setinterval(function() { li[intervals++ % li

c++ - Templated class specialization where template argument is a template -

i wondering if similar possible. basically, have templated class takes objects of templated classes. specialize (or member function)for specific templated class, 'generic' form of class. template<typename t, typename s> class somerandomclass { //put here }; template<typename t> class mytemplateclass { void dosomething(t & t) { //...something } }; template<> void mytemplateclass< somerandomclass<???> >::dosomething(somerandomclass<???> & t) { //something specialized happens here } replacing question marks appropriate types (double, etc) works, remain generic. don't know put there, types wouldn't have been defined. i've looked around, , learned template template parameters, , tried various combinations no avail. help! it's possible specialize class this template <> template <typename t,typename s> class mytemplateclass <somerandomclass<t,s> > { v

Access WPF Treeview selected index through a TreeViewItem object -

i have treeview checkboxes each item using datatemplate. <treeview itemssource="{binding}"> <datatemplate datatype="{x:type local:matchdataleaf}"> <grid margin="3"> <grid.columndefinitions> <columndefinition width="240"/> <columndefinition width="100"/> <columndefinition width="150"/> <columndefinition width="*"/> <columndefinition width="60"/> </grid.columndefinitions> <stackpanel grid.column="0" orientation="horizontal"> <checkbox x:name="selectcheckbtn" grid.column="0" ischecked="true" click="select_click" tag="{binding}" commandparameter="{binding relativesource={relativesource mode=findancestor, ancestortype={x:type treeviewitem}}}&qu

html - Converting to tableless table -

tableless not understand , wondering how code below in table, turn tableless http://adresende.com.br/help/layout.html who can me, i'll grateful the key here use correct markup job. site have looks it's displaying list of things on top, navigation, we'll using lists here: <div id="topbar"> <ul id="leftnav"> <li>início</li> <li>estabelecimentos</li> <li>consumidores</li> <li>blogs</li> <li>o que é</li> <li>contato</li> <li>sugire</li> </ul> <ul id="rightnav"> <li>olá, sejam bem vindo!</li> <li>crie seu perfil</li> <li>entrar</li> <li><img alt="brazil!" src="http://adresende.com.br/help/br.png" /></li> </ul> </div> we first create la

objective c - NSEvent or NSNotification when window becomes active -

in mac os x, there method override runs every time window gains focus? yes. nswindowdidbecomekeynotification , nswindowdidbecomemainnotification , depending on intent.

blackberry - how can i remove stored image along with app while removing from simulator -

i getting image , information web server. the image stored in path file:///store/home/user/ , information stored in hash table. whenever delete app, information regarding app , image should deleted. how can this? see solution question: how delete application data on install , reinstall

php - Custom MVC, how to implement a render function for the controller so the View can access variables set by the Controller -

i'm adding new features existing code base. anyway, current feature i'm doing should in mvc in opinion. existing code base isn't mvc feature i'm implementing, want mvc. , don't want roll existing mvc existing codes. so, problem is... don't know implement render function controller class. usually, in mvc have controller stuff, set variable using render function, , view can magically access given variable set controller. i have no idea how other global, feel wrong, keep on telling myself there has better way. edit: it's global isn't it? >_> how other frameworks it? here's silly example: controller: class usercontroller extend basecontroller { public function actionindex() { $user = new user; // create instance user model $user->getlistofuser(); $this->render('listofuser', 'model'=>$model); } } view: <?php //i can use $listofuser now... //some loop echo $listofuser[$i]; ?> thank in advan

Getting java.rmi.RemoteException: EJB Exception Eventhough classpath, XMLs, Beans are correctly defined and deployed -

i having bad time debugging problem. migrating codes java 1.4 jdk 6 , weblogic 8.1.5 weblogic 10.3. have converted deployment descriptors of ejbs using ddconverver utility of weblogic. beans consists of stateless session , entity beans (2.1). application made of jsp front-end , ejbs middle ware. while logging calling 1 session bean internally called entity beans , loads same. getting following exception when session bean calls entity bean. session call successful, issue entity call session bean. i using development environment this. jsps stored @ c:\misasiaappln10.3_dev\misasia\autodeploy\misasia ejbs deployed @ c:\misasiaappln10.3_dev\misasia\servers\adminserver\upload exception details: java.rmi.remoteexception: ejb exception: ; nested exception is: java.lang.noclassdeffounderror: com/misasia/admin/setupmaster/setupmasterhome @ weblogic.rmi.internal.serverrequest.sendreceive(serverrequest.java:205) @ weblogic.rmi.internal.basicremoteref.invoke(basic

android - selector with 9 patch -

i'm try create selector checkbox , replace android:button selector. in selector had 2 9patch image , reason not work good. 9patch images ok. selector code: <selector android:constantsize="false" xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_checked="false" android:drawable="@drawable/bopen" /> <item android:state_checked="true" android:drawable="@drawable/bclose" /> <item android:drawable="@drawable/bclose" /> </selector> what can ? second line missing selector state hence might see problem selector, right?

c# - Duplicate keys in Dictionary<string,EventHandler> -

i have public static readonly dictionary<string, eventhandler> cachehandlers = new dictionary<string, eventhandler>(); and have duplicate keys in dictionary: debugger screenshot: http://i.stack.imgur.com/tuxi7.png how happen? is bug in .net framework or artifact of concurent usage? msdn states dictionarys might not thread safe. if concurrently reading dictionary, might safe long lock dictionary when add new key/value pairs.

iphone - CCMenu doesnt work in iPad -

i'm creating universal application , ccmenu appears fine on both iphone, iphone 4 , ipad. buttons nothing when touched on ipad. i have no specific ipad code other modifying contentscaling property ipad uses same images iphone 4. means same images work on iphone 4 not on ipad. i using cocos2d 0.99.rc0 , ios 4.1 sdk. don't know start troubleshooting this. the oddity noticed ipad seems draw menu scene once, redraws reason, moving 1 pixel or something. menu class simple , has no "refreshing" code or supposed move. doesnt happen on either low or high res iphones. here code, sloppy yet simple. mainmenu.m: ccmenuitemimage * playitem = [self makemenubuttonwithsprite:@"play.png" withselector:@selector(play:)]; ccmenuitemimage * resumeitem = [self makemenubuttonwithsprite:@"resume.png" withselector:@selector(resume:)]; ccmenuitemimage * optionsitem = [self makemenubuttonwithsprite:@"options.png" withselector:@selector(

java - Deploy Applet with JNLP -

i'm trying deploy applet new java jnlp specifications, receive following error java plugin console: badfieldexception[ il campo <jnlp><applet-desc>width presenta un valore non valido: 0,0] this html code: <script> var attributes = { id:'signingapplet', code:'it.insielmercato.web.signing.signingapplet' ,width:0, height:0 } ; var parameters = {jnlp_href: 'signing-applet.jnlp'} ; deployjava.runapplet(attributes, parameters, '1.6'); function setclipboardtext(text){ signingapplet.setclipboardcontent(text); } </script> this jnlp code: <?xml version="1.0" encoding="utf-8"?> <jnlp spec="1.5+" codebase="" href=""> <information> <title>signingapplet</title> <vendor>insielmercato s.p.a.</vendor> </information> <resources> <!-- application res

wcf - Binding information field when adding a new net.pipe binding -

what's use of binding information field when adding new net.pipe binding in iis? i've been told enter * in it, want know it's used for. apparently field can used enter domain name, example if enter: mysubdomain.mydomain.com then can place in address of endpoint in client config: net.pipe://mysubdomain.mydomain.com/myservice.svc

javascript - ie7 and ie6 don't appear to style class names within google maps api v3 -

ie6 , ie7 arent picking class styling map overlays (google.maps.overlayview). has else had issue , worked out? eg have overlay like: <div class="cp-map-pin cp-map-pintboth" style="position: absolute; left: 326px; top: 241px;"> <div class="cp-map-pin-inner"> <div class="cp-map-pin-contents">2</div> </div> </div> and ie6 , ie7 arent styling .cp-map-pin i solved issue! , make note else looking this: i using following ie6/7 don't recognise class divinner.setattribute('class', 'classname'); i had change to divinner.classname = 'classname'; and works fine

internationalization - PHP: does gettext require LC_MESSAGES dirs? -

to translate php app use compiled in gettext module. here directory tree of translations made according docs: locale/ cs_cz/ lc_messages/ messages.po messages.mo de_de/ lc_messages/ messages.po messages.mo fr_fr/ lc_messages/ messages.po messages.mo question : possible rid of lc_messages catalog? php able find translations if use structure? locale/ cs_cz/ messages.po messages.mo de_de/ messages.po messages.mo fr_fr/ messages.po messages.mo my php switches translations: <?php setlocale(lc_all, 'fr_fr.utf-8'); bindtextdomain("messages", "locale"); bind_textdomain_codeset("messages", 'utf-8'); textdomain("messages"); ?> thank in advance. the feasible workaround creating symlink lc_messages -> . in each language subdirectory. (but complicates php application installation. ftp seldomly can c

javascript - How to make an INPUT TYPE="IMAGE" not submit on Enter in WebKit? -

in c#/asp.net application, have form renders following (plus lot more, matters): <form method="post" action=""> <input type="image" name="ctl15" src="cancel.gif" style="border-width:0px;" /> <!-- server side, above input system.web.ui.webcontrols.imagebutton. --> ...more fluff... <input type="submit" name="button1" value="proceed" id="button1" class="button" style="width:59px;" /> </form> this form works fine in internet explorer , firefox, fails in webkit-based browsers (safari , chrome). problem when user presses enter when in input field, rather using mouse click on submit button, image input activated (which in case corresponds cancel event, opposite of "proceed" action natural given ui in question). what want to, on enter keypress, activate <input type="submit"> button instead of <inpu

jquery - What is wrong with this javascript -

argh! what's wrong this?? $(document).ready(function() { var monkeytrouble = $('#monkeytrouble').attr('rel'); if (monkeytrouble = "banana") { alert("oooh oooh ahh ahhh"); } }); think looking this... if (monkeytrouble == "banana") { hope helps!

html - How to implement a table structure using CSS -

<table> <tr> <td></td> <td></td> </tr> </table> how replicate kind of structure using <div> or <span> 'ed css depends on you're trying replicate. with simple example you've given, it's not easy tell you're trying achieve, if you're tring put 2 blocks side side (ie columns in page layout), need create couple of <div> elements , style them using css appear next each other. depending on want, there number of ways stylesheets. one option set them both float:left; . use width:... set how wide want them in pixels or percent. if float complex (and quite big jump in concept table-based layout), may want consider using display:inline-block; instead. allow <div> s positioned next each other, gives more control on how position themselves. finally, if contents of <table> table of data, don't afraid of keeping in table - <table> tag , friends s