Posts

Showing posts from June, 2011

.net - Microsoft Code Guidelines in PDF -

where can find microsoft recommended code guidelines .net in "document" format (like .pdf or .doc ) ? is there peculiarities vb.net language? you might want @ this: so:where can find microsoft .net framework development guide? another link more vb.net specific program structure , code conventions

sql - Doing UPSERT when row is referenced by a FK -

let's have table of items, , each item, there can additional information stored it, goes second table. additional information referenced fk in first table, can null (if item doesn't have additional info). table item ( ... item_addtl_info_id integer ) constraint fk_item_addtl_info foreign key (item_addtl_info) references addtl_info (addtl_info_id) table addtl_info ( addtl_info_id integer not null generated default identity ( increment 1 no cache ), addtl_info_text varchar(100) ... constraint pk_addtl_info primary key (addtl_info_id) ) what "best practice" update item's additional info (in ibm db2 sql, preferably)? it should upsert operation, meaning if additional info not yet exist new record created in second table, if does, updated, , fk in first table not change. so imperatively, logic: upsert(item, item_info): case when item.item_addtl_info_id null insert addtl_info (item_info) ...

Right click in Firefox selects/highlights html elements...why? -

i have built custom context menu have found annoyingly when right click on site in firefox text , images seem randomly selected. the link below basic html dump of page having issues. can see when right click in firefox, elements highlighted. annoying! must purely html markup problem in firefox there absolutely no css or js on page. example here: http://pastehtml.com/view/1e16jup.html love hear thoughts/suggestions... there lot of errors in page have @ validator result here. maybe gives firefox lot of problem rendering page properly. close <meta> , <img> tags, <script> must have proper type attributes, tags <h1> shouldn't placed inside of <a> , <p> neither.

javascript - Raphael JS, Path animation problem -

Image
i have path: var original_param = 'm '+p1.x+' '+p1.y+'l '+p2.x+' '+p2.y; var path = paper.path(original_param); i have defined path attribute animation: var animation_param={m: p11.x+' '+p11.y, l: p22.x+' '+p22.y} where p1 , p2 points, not put definitions here, since return proper values correctly here. then animate path parameters by: path.animate(animation_param, 1000); but got error message what reason of error? did try use animation_param string except object? think should work.

file upload - How do I get php code coverage to run over phpt test cases? -

i have test environment runs component tests product. found tough test , mock php's is_uploaded_file() , move_uploaded_file() after lot of searching , research came upon phpt. helped me lot testing methods , expectations file uploading. not question file uploading how integrate phpt testcases basic phpunit testcases code coverage run methods being tested well. here follows code extracts: files.php class prfiles { // instance methods here not needed purpose of question // ...... public function transfer(array $files, $target_directory, $new_filename, $old_filename = '') { if ( (isset($files['file']['tmp_name']) === true) && (is_uploaded_file($files['file']['tmp_name']) === true) ) { // check if old filename exists if ( (file_exists($target_directory . '/' . $old_filename) === true) && (empty($old_filename) === false) )...

visual studio 2010 - How to bundle SQL Server Database with my VS2010 solution -

i working on sample website proof of concept , planning provide entire vs2010 (asp.net , c#) solution company. use sql server , need provide database (tables(including records) , stored procedures). easiest way ensure can bundle database along vs2010 solution? please provide steps if possible. at company, take same approach you're taking, , scripts hand deployment. however, because have large legacy database, , incremental updates system has online. if you're starting new website scratch, might database projects inside of visual studio. has functionality unit testing database built in might beneficial. http://www.visualstudiotutor.com/2010/08/manage-database-projects-with-visual-studio-2010/

Choosing a jQuery datagrid plugin? -

i trying add dynamic datagrid in web application , since using jquery eager use plugins available. not aware of of them , require documentation because new this, , difficult me start without documentation. the documentation , site should this? you should here: https://stackoverflow.com/questions/159025/jquery-grid-recommendations update the link above takes question closed , deleted. here original suggestions on voted answer: gijgo grid: http://gijgo.com/grid/ jquery grid: http://www.trirand.com/blog/ ingrid: http://reconstrukt.com/ingrid/ slickgrid http://github.com/mleibman/slickgrid datatables http://www.datatables.net/ shieldui grid http://demos.shieldui.com/web/grid-general/basic-usage

iphone - Add an animated top bar to UIWebView -

i have uiwebview controller loads web page , add kind of bar @ top of page refresh , close buttons. bar should hide when page loaded , should show again if user taps top part of page. does know how approach it? there simple way that? update: think wasn't clear enough question, here clarifications: 1. applications standard application 1 of flows opens uiwebview loads web page 2. i'm looking bar slide down on top of web page (loaded in uiwebview) , should user overcome scenario web page not loaded reason 3. bar should hold (just close uiwebview) , refresh (reload uiwebview) operations. hope helped. thanks, shimix i'm working on right , far, here's i've come with. of may obvious, important: your address bar should left navigationitem . the search bar rign navigationitem . you should animate cancel button in/out when beginning/ending editing in url box. safari mobile uses prompt property of navigationbar display webpa...

pyqt4 - painting outside the paintEvent - disadvantages? -

pyqt code: correct conclude below code painting outside paintevent? adding graphics object scene same painting ? class derivedgraphicsview(qgraphicsview): """graphicsview""" def __init__(self, parent, name=none): qgraphicsview.__init__(self, parent) def update(self): scene = qgraphicsscene(self.parent) scene.setscenerect(0, 0, scenewidth, sceneheight) # eg: simple drawing line = qgraphicslineitem() scene.additem(line) line.setpen(pen) line.setline(x1,y1,x2,y2) scene.update() #set view's scene self.setscene(scene) def paintevent(self,event): ## logic : reason override paintevent .... newevent = qpaintevent(e.region().boundingrect()) qgraphicsview.paintevent(self,newevent) qt documention mentions should not paint outside paintevent. can please explain drawbacks of above implementation ?

dev c++ - Setting up allegro -

can tell me how set allegro devc++? here's detailed guide: http://wiki.allegro.cc/index.php?title=dev-c%2b%2b it applies allegro 5.0.* well.

sql - Query issue using Access 2007 -

my query looks : select parent2.subid parent2id, parent2.sub parent2desc, key.subid id, parent1.subid parentid, parent1.sub parentdesc, key.sub key (table1 key left join table1 parent1 on key.parent_id=parent1.subid) left join table1 parent2 on parent1.parent_id=parent2.subid query_table this query when run on db without into query_table works fine, want create table dynamically , perform operations. in above query following error: "syntax error (missing operator) in query expression 'parent1.parent_id=parent2.subid query_tabl'" any idea why? the into clause comes between select list , from clause. i.e. select .... query_table ...

Prevent Silverlight datagrid selectionchanged from killing button click? -

i have datagrid in silverlight has template column in containing button. looks in xaml - <sdk:datagrid itemssource="{binding items}" selecteditem="{binding selected, mode=twoway}"> <sdk:datagrid.columns> <sdk:datagridtemplatecolumn> <sdk:datagridtemplatecolumn.celltemplate> <datatemplate> <button horizontalalignment="right" click="btn_click"> <stackpanel orientation="horizontal"> <image source="/image.png"/> </stackpanel> </button> </datatemplate> </sdk:datagridtemplatecolumn.celltemplate> </sdk:datagridtemplatecolumn> <!-- ten other columns -...

iphone - Camera overlay view mathematics with Lattitude and Longitude -

Image
i have been working on augmented reality application displays predefined map-points on camera overlayview nicely generated frame windows per map-points includes details map-point, image, , miles away current location. have done , application looks better not able achieve arranging view-points such creates 3d effect attached images. these images of acrossair ar ( http://www.acrossair.com/acrossair_app_augmented_reality_browser_for_iphone_3gs.htm ) application. if these images, feel available(predefined) map-points displayed on giant view , can smoothly move points , down finger touch. i have 2 questions. if can me in way appreciated. have researched enough gave , stuck in application. q1: have done every time iphone heading changes, calculate , display visible points happens when move iphone can feel points added , couple of points removed doesn't happen in acrossair application. want create view acrossair in given pictures user doesn't feel addition/removal of points ...

c# - How to BLOCK specific column in the GridView -

i have gridview , when user clicks on update want block couple of columns user cannot edit columns. how should this? thanks! set readonly property value of columns true .

C++ Boolean Variables Changing -

i have c++ class; class follows: first, header: class pagetableentry { public: pagetableentry(bool modified = true); virtual ~pagetableentry(); bool modified(); void setmodified(bool modified); private: pagetableentry(pagetableentry &existing); pagetableentry &operator=(pagetableentry &rhs); bool _modified; }; and .cpp file #include "pagetableentry.h" pagetableentry::pagetableentry(bool modified) { _modified = modified; } pagetableentry::~pagetableentry() {} bool pagetableentry::modified() { return _modified; } void pagetableentry::setmodified(bool modified) { _modified = modified; } i set breakpoint on 3 lines in .cpp file involving _modified can see being set/changed/read. sequence goes follows: breakpoint in constructor triggered. _modified variable confirmed set true breakpoint in accessor triggered. _modified variable false! this occurs every instance of pagetableentry. class not changing var...

flex - dpHibernate: serializerFactory not initialized by Spring -> NullPointerException on service access -

i trying dphibernate 2.0 rc6 running on apache tomcat 7.0.12 blazeds 4.0.0.14931, spring 3.0.5 , spring-blazeds-integration 1.5.0.m2 with following configuration server starts fine, want access service or rdsdispatchservlet via flashbuilder4 dcd getting nullpointerexception. seems serializerfactory not correctly injected dphibernate hibernateutil. did miss in configuration in remoting-config.xml? web.xml <?xml version="1.0" encoding="utf-8"?> <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemalocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5"> <display-name>server</display-name> <description>server side based on blazeds, spring , hibernate</des...

vb.net - Unit Test ASP.net Page_Load -

how can create unit test the page_load function in asp.net? i using build in visual studio unit test frame work. want create unit test check elements of web page , values. i know selenium , abilities in unit testing. this web page test webpagecontrol.ascx.vb: public class webpagecontrol protected sub page_load(byval sender object, byval e system.eventargs) handles me.load textbox.visible = false end sub end class this unit test webpagecontroltest.vb: public class webpagecontroltest public sub pageloadtest() dim target webpagecontrol_accessor = new webpagecontrol_accessor() assert.isfalse(target.textbox.visible) end sub end class after still error test method rechargetest.webpagecontroltest.pageloadtest threw exception: system.nullreferenceexception: object reference not set instance of object. you're not going able new page outside of asp.net runtime. you may want google around mvp (model-view-p...

iphone - Multiple Users in the Keychain -

so got iphone app use keychain , store password. keychainitemwrapper *kc = [[keychainitemwrapper alloc] initwithidentifier:@"password"]; [kc setobject:@"my_password" forkey:(id)ksecattraccessgroup]; [kc release]; this saves password correctly. tried pass string (username) instead of (id)ksecattraccessgroup relate password specific username, crashes. question: how can relate stored password username, because app allows multipple user login. i know it's not answer quesiton. use sfhfkeychainutils ( github ). it's wrapper , allows looking for. store password associated username. here's code how did sfhfkeychainutils. nsstring *username = @"username"; nsstring *password = @"password"; [sfhfkeychainutils storeusername:username andpassword:password forservicename:@"your app" updateexisting:yes error:null]; or pass pointer nserror object if want error information. ;-) hope answer you... sandro meier ...

c++ - Digraph arc list implementation -

i'm trying implement graph arc list, , while implementation works efficiency horrible, missed that's making slow ? time measured average of looking arcs from/to each node. struct arc { int start; int end; arc(int start,int end) : start(start), end(end) { } }; typedef vector<arc> arclist; class alistgraph { public: alistgraph(imatrix* in); //fills data incidence matrix bool ise(int va,int vb); //checks if arc exists a->b int countedges(); //counts arcs int countnext(int v); //counts outgoing arcs v int countprev(int v); //counts arcs incoming v private: arclist l; int vcount; }; //cut out constructor clarity int alistgraph::countedges() { return l.size(); } int alistgraph::countnext(int v) { int result=0; for(arclist::iterator =l.begin();it!=l.end();it++) { if(it->end==v)result++; } return result; } int alistgraph::countprev(int v) { int result=0; for(arcl...

serialization - XStream canConvert issue for paramterised generics -

i have requirement have write custom xstream mapconverter converts specific type of map. give example, want custom converter work map(string, date) maps. need achieve overriding canconvert method. of now, canconvert method have written : @override public boolean canconvert(class clazz) { return (!clazz.equals(object.class) && map.class.isassignablefrom(clazz)); } but work type of maps. since "java.lang.class" not expose method gives information type of parameters, generic collections, unable achieve desired result in canconvert method. one workaround think of creating dummy wrapper class around map(string, date) , using implement canconvert method. suggest better way of tackling issue in canconvert method ? you can't generics here since they're not present @ runtime. try grabbing first key , entry value , checking types. wouldn't work empty map, if map empty don't need convert anyways. map<string, date> m = new h...

c# - Cross-Threading issue with listView -

ok before post duplicate let me inform have looked @ other post , im still lost use delegates or background worker etc... how make thread safe want delete files on own thread. here code working with. private void button1_click(object sender, eventargs e) { cleanfiles.runworkerasync(); } private void cleanfiles_dowork(object sender, doworkeventargs e) { if (listview1.checkeditems.count != 0) { // if so, loop through checked files , delete. (int x = 0; x <= listview1.checkeditems.count - 1; x++) { string tempdirectory = path.gettemppath(); foreach (listviewitem item in listview1.checkeditems) { string filename = item.text; string filepath = path.combine(tempdirectory, filename); try { file.delete(filepath); } catch (exception) { //ignore files being in us...

How to launch jython console from maven -

this looks like: http://d.hatena.ne.jp/yoshiori/20081125/1227615261 (in japanese, should apparent commands , output) unfortunately, when try steps, seems plugin no longer exists @ location. googling elsewhere failed. in short, i'd launch jython shell of pom file dependencies available on jython class path (hope got terminology right). have project rather complex , changing set of dependencies defined in maven. if can launch jython same pom file, can experiment , script of classes. other suggestions loading maven dependencies jython shell? have @ maven-jython-compile-plugin . plugin allows deploy standalone project includes jython libraries. there demo project shows how use plugin. specifically, @ abstractinitjython , initjython in code repository on how launch python/jython console. have libraries of project, pom dependencies , python libraries requested. the sourceforge umbrella project http://mavenjython.sourceforge.net/

c++ - How to launch a QProcess with root rights? -

i need launch gphoto2 qt program. this: qstring gphotoprogram = "/usr/bin/gphoto2"; qstringlist gphotoarguments; gphotoarguments << "--capture-image"; qprocess *gphotoprocess = new qprocess(this); gphotoprocess->start(gphotoprogram, gphotoarguments); but never enters running state way, gphoto2 needs admin rights launched on command line. how can start qprocess proper rights make gphoto2 working? edit: precise prefer user not have enter password, means gksudo, kdesudo or other graphical solution not valid option me. i recommend finding way allow gphoto2 run logged in user's permissions. perhaps this article has helpful info.

javascript - How to make sure all elements contain a specific class in jQuery? -

i need check make sure elements children of parent container have specific class. can tell me how in jquery? if paragraph tags of div tag have class "correct" -> yep, of them have class otherwise, not paragragh tags in div tag have class -> noope, not have required class if mean direct children, then: if ($('div').children('p').length === $('div').children('p.correct').length) { // yes } else { // no } to include descendant <p> tags in reckoning, use ".find()" instead of ".children()". edit — it'd keen have plugin stuff this: $.fn.all = function(pred) { var rv = true; this.each(function(element) { if (!pred(element)) return (rv = false); }); return rv; }; then write: if ($('div p').all(function(p) { return p.hasclass('correct'); })) { // yes } a similar ".any()" function useful too.

json - jQuery how to generate code inside code? -

my question might bit confusing, here do. have script: <script> ...some script here... var audioplaylist = new playlist("2", [ { name:"lismore", mp3:"http://example.com/song.mp3" }, { name:"the separation", mp3:"http://example.com/song1.mp3" } ]) </script> what generate script dynamically using $.get.json var audioplaylist = new playlist("2", [ $.getjson('http://www.example.com/users', function(data) { $.each(data, function(i,item) { document.write(name: ''item.fname'',) document.write(mp3: "http://example.com/"''+item.song_id+''".mp3") }): }); ]) inside <script> is possible? i've tried script , fails. it possible generate code dynamically that, there no reason that. just use map method convert array of data ajax call form need playlist object: $.getjson('htt...

java - yet another "Cannot reduce the visibility of the inherited method from" -

today hackintosh after long absence. hack os 10.5.6, java 1.6, eclipse 3.5, using android sdk 1.6, , scenario below spits nasty error. ? public class derived extends abstract<some params> { @override protected void handlesuccess(void v) { // post processing before sending off log.i(tag, "derived.handlesuccess"); } } public abstract class abstract<some params> extends asynctask<some params> { protected abstract void handlesuccess(result result); } thanks

asp.net mvc 3 - .NET MVC 3 OutputCache Html.Action() -

i using outputcache(duration = 60) on action , default thought child actions rendered @html.action("actionname", "controllername") not cached unless annotated outputcache? worked mvc 2 not seem working mvc 3. if has changed, how set portion of page not cache? thanks i'm not sure, looks similar, perhaps help: outputcache , renderaction cache whole page

php - removing avoiding duplicates from resultset -

i have query: $relevantwords = {"one" , "two" , "three" } ; foreach ($relevantwords $word) { $query .= "select * delhi_items heading '%$word%' , id!={$entry_row['id']} , visible=1 union " ; } $query = implode( " " , explode(" " , $query , -3) ) ; $query .= " order time_stamp desc limit 0, 20 " ; $result_set = mysql_query($query, $connection); this causes several duplicates in resultset. there way detect , remove these duplicates resultset ? know should try avoid duplicates in first place, unable figure out. also tried distinct keyword, didn't work (because loop, same entry fetched again , again). laslty kind of amateur please tell me if doing fundamentally uncool such long sql query in loop. thanks i try have 1 select , no union , distinct . faster query: $relevantwords = {"one...

vb.net - VB Recursive Lambda Sub does not compile -

i've created following recursive lambda expression not compile, giving error type of 'openglobal' cannot inferred expression containing 'openglobal'. dim openglobal = sub(catalog string, name string) if _globalcomponents.item(catalog, name) nothing dim g new globalcomponent g.open(catalog, name) _globalcomponents.add(g) each gcp globalcomponentpart in g.parts openglobal(gcp.catalog, gcp.globalcomponentname) next end if end sub is i'm trying possible? the problem type inference. can't figure out type openglobal variable because depends on itself. if set explicit type, might okay: dim openglobal action(of string, string) = '... this simple...

java - http posting and preserving session on android -

i working on application needs able post https , keep track of session created authenticating https server. there in java , android handles better using http methods offered java? httpsurlconnection. thanks! this depends on mean "better". httpurlconnection works many cases if not enough, may http core apache. understand http core can work on android.

c# - XML Parsing with LINQ with deep nested loops -

i having problems getting coveredpersons , coveredperson tag values. <header> <model_name>sample model name</model_name> </header> <data> <contractnumber>0-99-54321</contractnumber> <initialeffectivedate>11/04/2011</initialeffectivedate> <contractenddate></contractenddate> <renewaldate>11/04/2021</renewaldate> <nextcontractbirthdate>11/04/2011</nextcontractbirthdate> <smokerclassification>non smoker</smokerclassification> <billingfrequency>annually</billingfrequency> <premiumwithtax>270.23</premiumwithtax> <annualpolicyfee>100.00</annualpolicyfee> <payerrelationtosubscriber></payerrelationtosubscriber> <payerasperson> <firstname>steve</firstname> <middlename1></middlename1> <lastname>jordan</lastname> <seco...

php - Curl: POSTs converting to GETs -

i designing simple twitter login script curl , when try execute it, login form sent when sending post. due header of user's homepage displayed in browser. any input appreciated. <?php function tw_connect($user, $pwd) { $agent = "mozilla/5.0 (windows; u; windows nt 5.2; en-us; rv:1.9.2.16) gecko/20110319 firefox/3.6.16"; $ch = curl_init('http://www.twitter.com'); curl_setopt($ch, curlopt_followlocation, true); curl_setopt($ch, curlopt_returntransfer, true); $c = curl_exec($ch); curl_close($ch); preg_match_all('#authenticity_token" type="hidden" value="(.*)"#u', $c, $g); $g = $g[1][0]; $post = 'authenticity_token=' . trim($g[1]) . '&authenticity_token=' . trim($g[1]) . '&return_to_ssl=false&redirect_after_login=&session' . urlencode("[username_or_email]") . '=' . $user . '&' . urlencode("session[password]") . '=' . $pwd . ...

html - Next image without refreshing the whole page (on click) -

hi trying "on click" go next image (i'll post code easyer understand trying do) <form id="selector"> <select onchange="initchapselector();"></select> <select onchange="initpageselector();"></select> <select onchange="initdisplay();"></select> </select> </form> <a href="#" onclick="movetonextpage(); return false;"><img id="display" src="js/vkmanga/spinner.gif"></a> but way know href="#" refreshes whole page there other ways can make work? am new html/php please forgive me if above code wrong thanks also working in forum template if means anything uhm, href="#" should not refresh whole page. sure there aren't errors in movetonextpage()? try javascript:void(0) in href="...": should absolutely nothing.

iphone: deployment target -

Image
how possible? configured iphone app this: i pushed app store , apple says: you have indicated binary requires ios 4.3 or later. apps require ios 4.3 or later not available verizon iphone users. do have change base sdk target iphone 3.0 platform??? how can this? thx! answer: if leave default 3.0 value ios deployment target not shown/set means latest ios selected? xcode4 bug beleave. in xcode 4 easy fix. click on project go summary tab , should see deployment target drop down select target. shortcut build setting. i add hope have tested application on previous versions of ios before deploying app. application have weak references api , new api calls compile fine, crash when run on older devices if not use proper runtime checks. edit image did not show when answered question. double check inside build settings deployment target same debug, release , distribution

ruby on rails - Is there a way to automatically create a plural route for index and singular for everything else? -

when dealing collection resource, use plural index (ie. list) page (viewing many objects ), , singular other pages (create/update/delete 1 object ). in order so, seem have create routes so: map.objects 'objects.:format', :controller => :object, :action => :index, :conditions => { :method => :get } map.resources :object, :controller => :object, :except => :index this creates routes so: objects /objects(.:format) {:action=>"index", :controller=>"object"} object_index post /object(.:format) {:action=>"create", :controller=>"object"} new_object /object/new(.:format) {:action=>"new", :controller=>"object"} edit_object /object/:id/edit(.:format) {:action=>"edit", :controller=>"object"} object /object/:id(.:format) {:action=>"show", :controller=>"object"} ...

Android Library Project -

how can use android library project, , overwrite classes in "final project". in other words, want reference library project, , @ same time, change of code.. probably not quite android library projects achieve using interface , class inheritance features of java language itself. library project seem deal merging/overriding resources parent in child , letting use 1 codebase varying app package names. given updated comment using library projects have 1 edition of app uses admob , 1 doesnt, i've revised answer... assuming dont mind packaging admob library (~138kb) in full/paid edition, simplest thing extend applcation class , therein declare enum , static method decide whether admob ads should shown. public class application extends android.app.application { public enum editiontype { lite, full}; public static int getadvisibilityforedition(context ctx) { if (editiontype.valueof(ctx.getstring(r.string.edition)) == editiontype...

asp.net - respone.Write(string) - also copies the wesite after th string -

xml string response.write(xml); response.contenttype = "text/xml"; response.addheader("content-disposition", "attachment; filename=databasexml.xml"); problem: after writing content of xml string, writes webpage too. why? missing response.end @ end?

How to send the data to one page to other page using asp.net mvc -

i have 2 pages 2 grids, in first page have 10 editable rows. , have 1 next button. i need these 10 rows edited values next page store edited values other variable id's in next page. best way use type of situations thanks have editable rows inside of <form> in first view // beginform render <form> around rowmodel html using (html.beginform('posttome', 'mycontroller')) { foreach (rowmodel row in model) { // html render out row } } then send each row instance of view model type properties match data each row public class rowmodel { // properties here } finally post collection of types controller action. e.g. public class mycontroller : controller { [httppost] public actionresult posttome(ilist<rowmodel> rows) { // rows } }

google app engine - How do I bring DRY (don't repeat yourself) in GWT with Java on Appengine? -

frameworks such django satisfy dry principle(don't repeat yourself) python. how can bring dry principle in gwt java on google appengine? i don't think frameworks themselves. provides tools , mechanism it. what mean is, code gwt stuff until see code duplications, seek out specific tools reduce redundency. don't wait "dry (on/off)" checkbox

tortoisesvn - SVN - make old revision the trunk -

i have updated previous revision , want make revision new trunk. no branches or tags - want replace trunk old revision. how best achieved svn merge head revision want revert to. read this or else @ of many repeats of faq in "related" list right -->

iphone - Best starting point for an app where tableview/navigation controller is just one part -

i've put app uses table view , navigation controller display list of documents (html docs) , clicking on document title open detail view , display contents. works treat part of bigger app have menu of 1 of options. i've done lot of digging around still unsure on best approach take building overall app. lot of advice seems to use navigation based application template , push out menu view , hide navigation bar recommended way go? i've read apple docs , modal view controllers sounds , option unsure how slot in existing rootviewcontroller etc? really appreciate taking time me on right track cheers kieron using navigation controller common way of structuring this. , note, nav bar can hidden on view controllers. be careful presenting view controllers modally -- apple's advice in hig use modals when focusing user's attention on piece of information or crucial task -- don't use them willy-nilly.

c# - Hidden field not updated in updatepanel after putting listview into insert mode -

i'm having problem hidden field value set in code-behind not propagate client. basic layout follows: <asp:updatepanel ..... <contenttemplate .... <input id="myhiddenfield" type="hidden" value="" runat="server" .... <asp:listview id="mylistview" ..... i have button on click event, in there set hidden field value. if don't put listview insert mode, value propagated client; however, if put listview insert mode, nothing. i'm rebinding datasource on listview. void mybutton_click(object sender, eventargs e) { myhiddenfield.value = "testing"; mylist.insertitemposition = insertitemposition.firstitem; mylist.datasource = // datasource mylist.databind(); } side note: i'm rebinding listview data bound delegate can called , can stuff in there. instead of <input id="myhiddenfield" type="hidden" value="" runat="server" use ...

How to get a consistent .Count / .Length property for C# generic collections? -

list<t> has .count property, t<> arrays .length instead. presume because arrays fixed-length whereas others aren't, difference in syntax can still frustrating. if refactor array list, therefore gives "does not contain definition .length" errors, , seems waste of time having change when .count , .length same. is there way deal ? possible extend list<t> add .length property that's alias .count instance, , vice-versa generic array ? , bad idea reason ? you can use count method provided linq. this optimised use count property provided icollection<t> interface possible (or non-generic icollection interface in .net 4). arrays, list<t> etc optimised. var yourlist = new list<string> { "the", "quick", "brown", "fox" }; int count1 = yourlist.count(); // uses icollection<t>.count property var yourarray = new[] { 1, 2, 4, 8, 16, 32, 64, 128 }; int count2 = youra...

recursion - Using xcopy to copy multiple files/directories, some of which have spaces -

i'm trying use xcopy copy on several files , directories onto external hard drive. following command works fine... xcopy d:\location\folder /e ... except it's not copying on files/directories withing d:/location/folder have spaces. understand dos requires file names spaces need enclosed in quotes, do if i'm trying huge recursive copy there may several files or folders spaces in name? use quotes: xcopy "d:\location\folder" /e

dynamic - Can I modify this script to work with multiple DIV tags? -

here current code: var text = ['foo', 'bar', 'baz']; = 0, $div = $('#mydiv'); setinterval(function () { $div.fadeout(function () { $div.text(text[i++ % text.length]).fadein(); }); }, 1000); can show me how make work multiple div tags on same page? right works one. erik it's not entirely clear you're trying do, maybe like: //get div elements given classname divs = document.getelementsbyclassname("mydivclassname"); //for each div, apply update on timer setinterval(function () { (var index = 0; index < divs.length; index++) { var div = divs[index]; div.fadeout(function () { div.text(text[i % text.length]).fadein(); }); } i++; }, 1000);

xamarin.ios - MonoTouch - .NET 4.0 on an iPhone -

we've upgraded monotouch 4.0 , new monodevelop. in order .net 4.0 , need enable setting, or monotouch automatically compile against newest mono ? everything has been working perfectly, itunes has accepted our apps , without issue. we've released 70 apps made monotouch , have thousands of users. monotouch 4 requires have installed mono shared runtime 2.10.1 in order install it. once have installed mono runtime, monodevelop , of course ios 4.3 sdk can install monotouch 4, once installed able net 4 love creating new iphone solution :) (yes dont have modify settings) hope helps alex

javascript - SilverStripe CMS Unity3D Web Player Embedding Issue -

i trying add unity3d (www.unity3d.com) web player site silverstripe cms version 2.4.5. seems happen ss dynamically removing code contains web player. leaves closing div tag. it simple simple static page embed web player. need following code , works perfectly. html: <script type="text/javascript" src="http://webplayer.unity3d.com/download_webplayer-3.x/3.0/uo/unityobject.js"></script> <script type="text/javascript"> <!-- //gets unityplayer div , replaces content embed tag web player made unity (it works outside of ss.) function getunity() { if (typeof unityobject != "undefined") { return unityobject.getobjectbyid("unityplayer"); } return null; } //sets parameters of web player if (typeof unityobject != "undefined") { unityobject.embedunity("unityplayer", "mazepuzzle.unity3d", 720, 450); } --> </script> ...

How to design using patterns -

i college student , i'm learning software patterns (specifically ones mentioned in gof book). have never been @ software design, i'm learning how each pattern works , solves different problems produce more flexible software. have question has been bugging me. what's best way @ problem (a piece of software needs written) , determine how organize , apply patterns? had group java project went sour because our design wasn't flexible. had great deal of trouble trying break down problem manageable pieces sort out. know can write code, don't know how organize it. the patterns have gone through composite, builder, adapter, proxy, observer, state, strategy, template method, , iterator. have mentioned, know supposed solve, feel trying force patterns place. or links pages appreciated. thank all! you mention issues basic application problem solving. need work on first before getting heavy patterns. patterns not way learn design - can add complexity , obscure...

C# IAsyncResult WaitAll -

in of implementations of waitall have seen following code iasyncresult result1 = method.begininvoke(10, mycallback, null) iasyncresult result2 = method.begininvoke(20, mycallback, null) waithandle[] waithandles = new waithandle[] { result1.asyncwaithandle, result2.asyncwaithandle}; waithandle.waitall(waithandles) does seem right ? chances before waithandles array created 1 of calls complete ? regards, dhananjay makes sense me. // begin invoking first , second method, , give them callback iasyncresult result1 = method.begininvoke(10, mycallback, null) iasyncresult result2 = method.begininvoke(20, mycallback, null) // time past point of invokation, mycallback called. // wait handles of async results, regardless of whether have finished or not waithandle[] waithandles = new waithandle[] { result1.asyncwaithandle, result2.asyncwaithandle}; // make sure wait until methods have finished. // have finished immediately, , mycallback have been called, // never past line un...

delphi - How to modify the focus-box color in TVirtualStringTree? -

Image
i need modify focus-box's border color of tvirtualstringtree, pic: you can't control color of dotted focus rectangle. that's determined automatically inverting color of whatever it's drawn on. os provides — , tree control uses — an api that . (you edit source code , replace calls drawfocusrect own function, if want.) if you're talking color of whole node, first check make sure touseblendedselection paint option set way want it. defaults off, since makes selection rectangle cool when dragging box around items, might have turned on without realizing ordinary selected nodes, too. if that's not it, adjust 1 of values in tree control's colors property, either focusedselectioncolor or unfocusedselectioncolor . please don't make such change lightly; user has chosen selection color through os options, shouldn't change it. if do use different color, make sure text still readable against whatever new color select.