Posts

Showing posts from May, 2012

oracle - Deploy the same version file in BPEL SOA -

oracle - Deploy the same version file in BPEL SOA - we have implemented bpel solution in project, using human workflow managing task. facing lot of changes in project creating new version of sar file. every alter when created new version(version count maintain increasing) and if deploy same version 1 time again existing task state, so can not query task in human work flow api. the problem increasing version while restarting server. taking much time load versions. have nearby 20 process , taking 20 minutes load process after starting server. is there way can deploy same version 1 time again , again. thanks, abhishek i assume , it's oracle , if here can do. when deploy through jdeveloper, have alternative "override" existing version. enabling can override same version without need deploy new version everytime. oracle soa bpel

Where are all my files on eclipse? They were on the left side of the page? -

Where are all my files on eclipse? They were on the left side of the page? - on eclipse ide had file scheme on left. not there. how dont want folders want files in folder (the whole eclipse directory set-up) much! if perspective set correctly (i.e. java perspective can set on top right) , still not showing default view, go window ---> reset perspective. or, can utilize key combo alt+shift+q,p or window ---> show view ---> bundle explorer. both these show bundle explorer. eclipse file ide

eclipse - more than 1 main() methods in a software. Is this due to Maven plug-in? -

eclipse - more than 1 main() methods in a software. Is this due to Maven plug-in? - i in company , hv seen source code of 1 of software. found more 25 occurrences of main() method in that. analysed features of myeclipse , found 1 solution due maven installed in eclipse, allows u prepare more 1 build files software. i want know, analysis true? thanks in advance... no, analysis not true. class may have main method. add together method class, , it'll there. fact maven, eclipse, or myeclipse used irrelevant. developers have chosen add together main method in thoses classes, that's all. there pretty reasons have several main classes in jar. example, if jar contains collection of utilities. eclipse java-ee maven methods main

jQuery UI: - Switch Class but add a hover effect? -

jQuery UI: - Switch Class but add a hover effect? - i have next jquery code add together class "p" tags within "li" when hover on them... how can create more interesting adding transition effect rather straight switch? code: $(document).ready(function() { $('li').hover(function() { $('p', this).toggleclass('hovered'); }); }); check animate function, can animate transition between 2 classes. edit: sorry, wrong method. you're looking switchclass method. here's demo of switchclass. it's useful if have 2 classes, , want switch 1 other. if want add/remove single class, see wouter j's answer. update: seems you'll need 2 classes work. note switchclass requires jquery ui work. here's example: html: <li> <p class="regular">test</p> </li> css: p.regular { color:red } p.hovered { color:blue } javascript: $(document).ready(function() ...

Valid Distribution profiles vanish from the Xcode Organizer? -

Valid Distribution profiles vanish from the Xcode Organizer? - since 2 weeks ago, every time manually add together distribution profiles (ad-hoc or appstore profiles) xcode, vanish organizer in matter of minutes, or when press refresh button (the 1 next "automatic device provisioning" in organizer). how solve problem? (note i've tried start fresh without success: cleaning keychain access, revoking certificates, deleting profiles, , step step since beginning) if you're not logged in "team agent" in xcode, might explain reason why distribution provisioning profiles disappearing. which version of xcode using? xcode distribution code-signing provisioning xcode4.2

flex - Scroll when tabbing through Itemrenderers -

flex - Scroll when tabbing through Itemrenderers - to allow tab through itemrenderers in spark set hasfocusablechildren="true". when tab row/tile not visible, doesn't automatically scroll list. what's easiest way of making happen? http://help.adobe.com/en_us/flashplatform/reference/actionscript/3/spark/components/list.html#ensureindexisvisible%28%29 my guess utilize method, utilize selection alter or other events on list determine when phone call method depending on ui expectations. flex itemrenderer flex-spark

textbox - Javascript in a text box -

textbox - Javascript in a text box - i trying figure out how generate javascript set javascript text box users can re-create it, similiar how modernizr lets configure library downwards loaded http://www.modernizr.com/download/#-iepp-cssclasses-load. created javascript string, when set text box formats in way not want %26%2360script%20src%3d%22http%3a// <textarea id="code"> function renderad(size){ var sizes= size.split("x"); var code = $("#code"); var adcode = escape('&#60script src="{{ sitelocation }}/js/"&#61&#60/script&#61&#60script&#60(function(){var settings = {"size":"'+ size +'};setup(settings);})();&#60/script&#61') code.val(adcode); } anyone have experience this? thanks, cg this works me: var path = "/path/to"; $('#code').val("<script src=\"http://someurl.com"+path+"\"...

Extracting date strings from the JavaScript Date object without timezones being applied -

Extracting date strings from the JavaScript Date object without timezones being applied - i want straight conversion of date string , cannot results expect. expect below code produce date equal date portion of original string, seems apply time during instance creation. var usagetime = new date('2012-01-19t22:59:50-0800'); console.log(usagetime); // fri, 20 jan 2012 06:59:50 gmt dayofusage = usagetime.getfullyear()+'-'+(usagetime.getmonth()+1)+'-'+usagetime.getdate(); console.log(dayofusage); // 2012-1-20 i expect date of 2012-1-19. right way solve this? you should utilize getutc*() functions ( getutcdate() , getutchours() , on) times no timezone offset. javascript date

java - JAXB marshalling many objects to one file -

java - JAXB marshalling many objects to one file - i want marshal many objects single xml file. going well, except marshaller insists on adding <?xml version="1.0" ?> before each object. what's preferred way marshal many objects same file? if nil else, what's best way rid of these extraneous xml declarations? my current code: jaxbcontext jc = jaxbcontext.newinstance(relevantclasses); marshaller m = jc.createmarshaller(); xmloutputfactory xof = xmloutputfactory.newfactory(); xmlstreamwriter xsw = xof.createxmlstreamwriter(channels.newoutputstream(filewritechannel), "utf-8"); xsw.writestartdocument("utf-8", "1"); m.marshal(object1, xsw); m.marshal(object2, xsw); xsw.close(); this works great, , <object1> , <object2> info expect... has additional <?xml version="1.0" ?> before each object. an xml document has 1 root element, marshalling several objects single file won't ...

asp.net - After setting up BasePage.vb and creating a session, I have a strange query string in my URL -

asp.net - After setting up BasePage.vb and creating a session, I have a strange query string in my URL - i guided nuux kind plenty help me through intricate process of localizing website, , giving client alternative manually select own language clicking flag , lasts entire time/session they're on website. website visual studio 2010 / vb / net 4.0. in doing so, created class, basepage.vb. of pages set inherit: basepage in code behind. here's line of involvement basepage.vb: 'retrieve civilization info session dim culture__1 string = convert.tostring(session([global].session_key_culture)) everything functions great, , nuux perfect help. have 1 remaining issue. when go homepage (or page), there's unusual query string in there. think it's line in basepage.vb, more on page's code behind, because happens if open browser, bypass homepage going straight mydomain/about.aspx. instance, go page , shows up: mydomain.com/...

android - How to retreive DATETIME format from Sqlite database -

android - How to retreive DATETIME format from Sqlite database - i have stored date (java.util.date object) in datetime field of sqlite table. now, how retrieve date of same format java.util.date. want compare time difference (in milliseconds) between current date , store date. any help highly appreciated. retrieve cursor.getstring() , pass value simpledateformat create date object. there no straight method getting date object. android sqlite java.util.date

delphi - TeeChart TLineSeries - Is it possible to draw multiple lines per series? -

delphi - TeeChart TLineSeries - Is it possible to draw multiple lines per series? - is possible draw multiple lines single tlineseries using teechart? specify field in dataset series should grouping by, drawing 1 line per group. or not possible , series should added chart each group/line should displayed? you accomplish setting xvalues.order lonone , adding null point each time want start new line. however, speed drawing , point handling tfastlineseries uses same color (seriescolor) points. if want utilize diferent colors individual points should utilize tlineseries instead. uses series; procedure tform1.formcreate(sender: tobject); var i, j: integer; begin chart1.view3d:=false; chart1.legend.visible:=false; chart1.addseries(tfastlineseries) tfastlineseries begin xvalues.order:=lonone; treatnulls:=tndontpaint; i:=0 4 begin if i>0 addnullxy(0,0); //start new line addxy(0,random*1000); j:=1 24 addxy(j, chart1[0]....

model view controller - Difference between Membership Provider in ASP.NET Webforms and MVC 3 -

model view controller - Difference between Membership Provider in ASP.NET Webforms and MVC 3 - is there difference in working between membership provider of webforms , membership provider of mvc 3? no. the membership provider part of system.web.security namespace webforms system.web.ui namespace mvc system.web.mvc namespace therefore, there no dependencies. in other words, you'll making same membership calls same membership objects in mvc application in webforms application. asp.net-mvc-3 model-view-controller asp.net-membership webforms membership-provider

php - Facebook Chat Api authentication complete, how make chat window? -

php - Facebook Chat Api authentication complete, how make chat window? - i want integrate facebook chat in website. that's why implement php code in document, after response this, test platform connect xmpp access_token: xxxxxxxxxx...xxx server: chat.facebook.com uid: xxxxx app id: xxxxx [info] opening connection... connnection open authentication finish done actually think after executing code, chat box in page, above message displayed. create live facebook chat in website ? php facebook chat facebook-chat

file io - Program/Script for automatically annotating Java classes -

file io - Program/Script for automatically annotating Java classes - i have on one thousand pojos, properties of which, need annotate per custom xml parsing annotations library made. since number of pojos large, , jaxb annotated, need automation of 2 3 tasks : removal of "all" existing annotations re-annotating pojos 1 the rules simple (1) - delete line starts "@" (2) complex , want start detecting "public class xyz" in java class, , annotating @beanname(beanname="xyz") after this, action item (3), need observe datatype of variable in pojo, annotate : @classmember(datatype = datatype.integer, membername = "tripid") public int tripid; @classmember(datatype = datatype.complex, membername = "stop") public stop stop; i think sed script may help too, prefer java, "guess" , may need utilize reflection next steps. thanks ! edit : understand above cases simple , can achieved using rege...

c# - Replace method doesn't replace dashes to empty string -

c# - Replace method doesn't replace dashes to empty string - i'm trying hash file using sha1. result looks this: b7-db-b9-93-e7-2f-6f-eb-6d-cd-cc-a8-de-d2-f1-01-6e-8a-53-bc how replace dashes empty string or remove them? the code trying replace dashes, seems don't alter , dashes still in place. using (hashalgorithm hashsha1 = new sha1managed()) using (stream file = new filestream(ofdbrowse.filename, filemode.open, fileaccess.read)) { byte[] hash = hashsha1.computehash(file); txtsha1.text = bitconverter.tostring(hash).replace("-", ""); } the code you've give definitely removes dashes. short finish programme demonstrate that: using system; using system.io; using system.security.cryptography; class test { static void main(string[] args) { using (hashalgorithm hashsha1 = new sha1managed()) { // actual info doesn't matter using (stream info = new memorystream()) ...

MFC dialog close issues -

MFC dialog close issues - good day! have mfc dialog progress. dialog automatically closes after reaching 100% using postmessagew(wm_close). problem is, when, during progress, i'm moving dialog on screen, dialog not closing , wm_close message ignored. suggestions? thanks. for modal dialog shouldn't need utilize wm_close message. normally you'd utilize ok or cancel button events close it, phone call enddialog method functional code or homecoming when processing finish (assuming process run dialog initialised). can set homecoming value @ same time e.g. enddialog(2); . either way dialog close 1 time th current message handler returns, there delay, in closure shouldn't much. mfc modal-dialog

Linq returning multiple values in a group by, need only last modified -

Linq returning multiple values in a group by, need only last modified - i have next linq, want lastly product modified in day, illustration @ begginning of day have 2000 products ( cajasdia ), @ noon have 500 products ( cajasdia ), linq giving me total list of modifications of products in day, want lastly record of modified product (only 500) this involves 3 tables, producto (products), productosubregion , subregion , there lot of products containing in part , part contains lot of products. this relation between tables: producto 1..* productosubregion *..1 subregion list<productoagr> _productos = (from p in db.productosubregion.include("producto") orderby p.fecha descending p.subregion.idsubregion.equals( (from c in db.cliente bring together v in db.vendedor on c.idvendedor equals v.idvendedor c.idcliente.equals(_idcliente) select c.vendedor.subregion.idsubregion...

objective c - How to group set of controllers in xcode -

objective c - How to group set of controllers in xcode - i new iphone developer experiences in web development , , seek build tabs in controller , in html utilize div grouping set of controllers can hide or display through javascript , how can accomplish same thing in xcode ( interface builder ) ? i think should utilize tabbar controller. seek implement code this: mytabbarcontroller = [[uitabbarcontroller alloc] init]; newsfeedcontroller *newsfeedcontroller = [[newsfeedcontroller alloc] initwithfacebook:facebook]; uinavigationcontroller *navigationcontrollerhome = [[uinavigationcontroller alloc] initwithrootviewcontroller:newsfeedcontroller]; [newsfeedcontroller release]; aboutcontroller *aboutcontroller = [[aboutcontroller alloc] init]; uinavigationcontroller *navigationcontrollerabout = [[uinavigationcontroller alloc] initwithrootviewcontroller:aboutcontroller]; [aboutcontroller release]; mytabbarcontroller.viewcontrollers = [nsarray arraywithobje...

wcf - visual studio restarted when rebuild -

wcf - visual studio restarted when rebuild - my project silverlight.i utilize wcf service in web project, in web.config, set service : <service name="khorasanmis.web.webservices.common.messageduplex" behaviorconfiguration="khorasanmis.orderservicebehavior" > <!-- service endpoints --> <endpoint address="" binding="pollingduplexhttpbinding" bindingconfiguration="multiplemessagesperpollpollingduplexhttpbinding" contract="khorasanmis.web.webservices.common.iduplexservice"> </endpoint> <endpoint address="mex" binding="mexhttpbinding" contract="imetadataexchange"/> </service> when comment code silverlight project build successful when code not comment visual studio restarted during run or rebuild w...

java - How to retrieve data from json array and display in textview? -

java - How to retrieve data from json array and display in textview? - i've been using coding illustration link: http://fahmirahman.wordpress.com/2011/04/21/connection-between-php-server-and-android-client-using-http-and-json/ code shown below: public class nutrient extends listactivity { @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.main); string result = null; inputstream = null; stringbuilder sb=null; string result=null; textview fdi = (textview)findviewbyid(r.id.textview1); textview fdn = (textview)findviewbyid(r.id.textview2); //http post try{ httpclient httpclient = new defaulthttpclient(); httppost httppost = new httppost("http://127.0.0.1/food.php"); httppost.setentity(new urlencodedformentity(namevaluepairs)); httpresponse response =...

eclipse plugin - i have created the wizard, i want it to position always at the center, can any one help me? -

eclipse plugin - i have created the wizard, i want it to position always at the center, can any one help me? - private point getfirstmonitorsize() { // here point org.eclipse.swt.graphics.point display display = display.getdefault(); if (display != null) { monitor[] monitors = display.getmonitors(); if (monitors.length == 1) { rectangle clientarea = monitors[0].getclientarea(); homecoming new point(clientarea.width/2, clientarea.height/2); } } homecoming null; } i found out positioning don't know how utilize in wizard dialog? you can position wizard dialog calling wizarddialog.getshell().setlocation(..) . eclipse-plugin jface

ios - How to log a bit mask -

ios - How to log a bit mask - i calling [[uiapplication sharedapplication] enabledremotenotifications] returns bitmask. how nslog bitmask understand how bitmask composed , notifications on/off? you need print binary value 1 or 0 each bit. here question answers how log binary value: nsinteger binary (string) value in 8bit format ios cocoa-touch cocoa

c# - How to warn if a property is accessed without being initialized, by adding an attribute? -

c# - How to warn if a property is accessed without being initialized, by adding an attribute? - i'd technique automatically replace next code: [warnifgetbutuninitialized] public int myproperty {get; set; } with this: /// <summary> /// property warns if value fetched before has been instantiated. /// </summary> private bool backingfieldispopulated = false; private int backingfield; public int myproperty { { if (backingfieldispopulated == false) { console.writeline("error: cannot fetch property before has been initialized properly.\n"); homecoming 0; } homecoming backingfield; } set { backingfield = value; backingfieldispopulated = true; } } i'd prefer solution works @ compile time, reflection slow. i aware aspect oriented programming (aop) (e.g. postsharp , ccisharp) i'd interested if there other method accomplish this. update ...

F# LINQ type class fit in one -

F# LINQ type class fit in one - i learning linq f# 3.0. want know how convert old class utilize new linq features in f# 3.0 example, have created simple info table in sql server 2008 r2, database name mydatabase. -- create table1 table. create table [dbo].[table1] ( [id] int not null, [testdata1] int not null, [testdata2] float (53) not null, [name] ntext not null, primary key clustered ([id] asc) ); utilize mydatabase insert table1 (id, testdata1, testdata2, name) values(1, 10, 5.5, 'testing1'); insert table1 (id, testdata1, testdata2, name) values(2, 20, -1.2, 'testing2'); for f# 2.0, can create little class retrieve info table1 , homecoming main program. #light module mydata open scheme open system.collections.generic open system.data open system.data.sqlclient type getdata(tablename: string) = class allow sqlconn = "server=(local); integrated security=true; database=mydatabase...

java - messages.properties taken from db -

java - messages.properties taken from db - possible duplicate: design question regarding java ee entity multiple language support i'm working on i18n of jsf application. need standard jsf messages located in messages.properties taken database. there simple way it? thanks. i think found answer: public class dbmessagesbundle extends resourcebundle { @override protected string handlegetobject(string key){ ... } @override public enumeration<string> getkeys() { ... } } and in facesconfig.xml <application> ... <message-bundle>mypackage.dbmessagesbundle</message-bundle> </application> thank help. java spring jsf internationalization

jquery - ajaxSubmit success callback not fire in IE6 -

jquery - ajaxSubmit success callback not fire in IE6 - i used next code submit form in jsp,it can fire in chrome ,but in ie open new window homecoming result,success callback not fire $("#imgform").ajaxsubmit({ url : '/uc/ws/0.1/user/image/preview', datatype : 'text/plain', type : 'post', success : function(responsetext, statustext, xhr, $form) { var message = eval("(" + responsetext + ")"); if (message['success']) { showpreview(); } else { isallowpic = false;// showerrordialog('alert', '只支持最大为2m的gif、jpg、png文件', false); } }, error : function(xhr) { if(xhr.responsetext){ var message = eval("(" + xhr.responsetext + ")"); if (message['success']) { showpreview(); } else { isallowpic = false;// ...

onclick - Android - delayed clicks in ListView -

onclick - Android - delayed clicks in ListView - i have next construction in app: fragmentactivity viewpager holding multiple fragments managed fragmentstatepageradapter using compativility pack android 2.1 each fragment contains listview . each element in listview has linearlayout 2 textviews , button . linearlayout , button have onclicklisteners (separate). clicking on linearlayout starts activity . noticed clicks behavior inconsistent: action executed delayed , it's ignored no matter how many times tap. gets weirder because can tap , action executed when start scrolling list. tried various combinations of setfocusable(false) , setselectable(true) seems not create difference. ideas? i'll happy provide more details. i ran same problem, in case solution not maintain references views, caused problems listview's view caching. after implementing getview() method utilize of converview, unusual behaviour lost / unexpected click calls gone. ...

android - Which mobile framework to use? -

android - Which mobile framework to use? - i newbie developing web-apps on android devices. came across of number of mobile development frameworks(sencha, titanium, jquery mobile, etc) on net , kind of confused on 1 should used. can please guide me on this? it depends if want browser based web app or mobile app. have used jquery mobile mobile web sites lot. lot of people utilize jquery mobile in conjunction phonegap (http://phonegap.com/) produce mobile apps. so if want mobile web page @ using jquery mobile or sencha touch. if want total blown app without writing objective c or java frameworks titanium , phonegap allow javascript , html. these frameworks expose os functionality through higher level javascript apis , can write code in html , js. both sencha , jquery mobile work phonegap. i'd recommend deciding on if want native app or mobile web site , various frameworks there , seek few out see meet needs. android jquery-mobile titanium extjs

php - How to get one column of mysql_query results into an array? -

php - How to get one column of mysql_query results into an array? - i'm selecting single column mysql table mysql_query() . there function getting results array, or have iterate through results mysql_fetch_array() ? you have iterate. if moved 21st century, , used mysqli, there's mysqli_fetch_all() function.... , you'd able utilize prepared statements php mysql

jquery - Horizontal Scrolling with Mousewheel -

jquery - Horizontal Scrolling with Mousewheel - i'm using chris coyier's method of encapsulating table cells around divs via js accomplish horizontal scrolling http://css-tricks.com/how-to-create-a-horizontally-scrolling-site/ . however, scroll had either have mouse horizontal scrolling or hold shift while scrolling. so, used hscroll.js plugin http://paulicio.us/items/view/24/horizontal-page-scrolling-using-javascript lets scroll page laterally via mousewheel. but there considerable lag/choppiness when tested in firefox , opera(works fine in chrome , safari). think brandon aaron's mousewheel.js http://brandonaaron.net/code/mousewheel/docs viable solution don't know how implement plugin i'm illiterate when comes js. jsfiddle: http://jsfiddle.net/694tk/3/ update: tinyscroll plugin seems work fine except doesn't have easing, solution that?: http://jsfiddle.net/694tk/6/ yet update: http://jsbin.com/uwehot/ mary lou's circular content carousel*(h...

c# - Rx join over keys and not durations -

c# - Rx join over keys and not durations - just looking rx bring together extension method. cant quite figure out how utilize create key bring together (using relational domain instead of time domain)? var right = observable.range(4, 20); var left = observable.range(0, 30).where(n => n%2 == 0); var e = n1 in right bring together n2 in left on ? equals ? select new {n1, n2}; e.subscribe(j => console.writeline(" n1: {0}, n2: {1}", j.n1, j.n2)); desired output: n1: 4, n2: 4 n2: 6, n2: 6 n3: 8, n2: 8 ... not sure if bring together can used way...? edit this works right way (concurrency, performance)? var e = n1 in right n2 in left n1 == n2 select new { n1, n2 }; it of import maintain in mind observables collections on time - or way of putting series of events. enumerables can thought of collections @ moment in time. it makes sense bring together on enumerables - of values available moment in ...

ruby on rails - Access control and security: Should I have 1 massive ARTICLES table? -

ruby on rails - Access control and security: Should I have 1 massive ARTICLES table? - if making scheme users can write articles cannot seen nor accessed other users, have single articles table permissions controls? i not sure having single table content in security. yet, don't think want create new table containing articles each user. is there improve way model this? i don't believe appropriate create database responsible sort of authorization check. "users" database should aware of applications allowed access it. business rules governing authenticating users , determining users authorized access belong within application(s). instead existing authorization tools managing access models. example: https://github.com/ryanb/cancan ruby-on-rails security database-design

c# - How can I eliminate the "jitter" from my "estimated time remaining" (and ETA) calculation? -

c# - How can I eliminate the "jitter" from my "estimated time remaining" (and ETA) calculation? - i have application that, while performing background task, shows progress bar "estimated time remaining" calculation (eg "5 seconds remaining") , "estimated time of completion" (eg "complete @ 12:59:59"), or phone call it, eta. the algorithm calculating eta takes "rolling average" of progress on time: 1. each progress event gets added queue current time. 2. after duration (eg. 10s), items removed queue. 3. eta extrapolated first , lastly items in queue. source code available if care: etacalculator.cs however, there's jitter problem. each progress event added calculation, eta updated slightly. let's eta changes 0.1s . little jitter causes eta "flutter". example, instead of seeing smooth progression 5s, 4s, 3s, etc..., see 5-5-5-4-5-4-5-4-5-4-4-4. i thinking of reducing updates 1-per-se...

asp.net mvc - Why is Hardcoding URL strings into an MVC app is a bad idea? (Or is it?) -

asp.net mvc - Why is Hardcoding URL strings into an MVC app is a bad idea? (Or is it?) - in comment on question, phil mentions hardcoding url strings mvc app bad idea. helpers there reason is so? if so, why? url generation result of route configuration in application's global.asax. when utilize helpers actionlink, inspect route configuration , generate routes accordingly. if alter route configuration later, or install application virtual directory, urls generated helpers in whole application changed dynamically, don't have inspect , alter every hardcoded url string hand, , application less break. if want markup anchors, can utilize urlhelper.action method. internally of helpers depend on url generation, utilize method. <a href="@url.action("logon", "account")">logon<a> asp.net-mvc model-view-controller

optimization - What advantage is gained by placing a literal value on the LHS of a boolean expression? -

optimization - What advantage is gained by placing a literal value on the LHS of a boolean expression? - i've noticed subtle trend among developers consistently place literal value of boolean equality look on left hand side of expression. example: //style #1, style in question if (null == object.value || 0 == object.value) dosomething(); //style #2, way i've written if (object.value == null || object.value == 0) dosomething(); is there measurable advantage gained writing boolean expressions #1? can't see why evaluate faster @ runtime, wonder if perhaps compilers can optimize #1 more readily #2? if so, please explain compilers , why. i've considered matter of personal taste (perhaps there readability argument made), i've seen plenty code written #1 wonder if there more i'm aware of. some developers follow , advocate (1) if accidentally mis-type comparing ( == ) assignment ( = ), compiler issue error during compilation. in (2) same mis-ty...

firefox - how to use multiple mozilla browser versions in windows 7 -

firefox - how to use multiple mozilla browser versions in windows 7 - present in current machine using mozilla firefox 9 have little task check on firefox 7. body help how check multiple versions @ time illustration ie tester if 1 give reference related requirement. much utilize total me. do mean: multifirefox firefox testing browser

Is there a Hotmail/LIVE equivalent of Google Email Settings API? -

Is there a Hotmail/LIVE equivalent of Google Email Settings API? - using google's mail service have programmatic access sorts of settings via api. http://code.google.com/intl/en/googleapps/domain/email_settings/developers_guide_protocol.html i can't find similar hotmail / live email - custom live domains doesn't seem give me of this. is not available @ or beingness dumb? it turns out there no api provided yet. how ms expect people utilize custom domains without beyond comprehension, i'm sure know they're doing. api live hotmail

suffix tree implementation in python -

suffix tree implementation in python - just wondering if aware of c based extension in python can help me build suffix trees/arrays in linear time ? you can checkout next implementations. http://www.daimi.au.dk/~mailund/suffix_tree.html https://hkn.eecs.berkeley.edu/~dyoo/python/suffix_trees/ https://github.com/kvh/python-suffix-tree a guy improved (first one) , set here. http://researchonsearch.blogspot.com/2010/05/suffix-tree-implementation-with-unicode.html all c implementations. python suffix-tree

how to disable navigation keys in android programmatically -

how to disable navigation keys in android programmatically - how disable menu, home, , search key programmatically in android, including vibrate when keys pressed. you can't disable home button. button you'll need override onbackpressed() , , menu button shouldn't unless assign action. if mean disable these system-wide, i'm afraid glad can't that. android

performance - How can I use Jquery efficiently? and can I mix libraries/plugins in the same web page? -

performance - How can I use Jquery efficiently? and can I mix libraries/plugins in the same web page? - there lot of jquery plugins , libraries. , want utilize more 1 in same web page. what best approach utilize them without effecting speed , performance of website? is best stick 1 library or can mix more 1 library , more 1 plugin? should gather them in 1 jquery file? or maintain them separated? how can know using much jquery? when become much? is there tool can measure how efficient or fast is? for example, want add, image slideshow, tabs, horizontal slider, color , position animation... how can take each 1 of these? lot of amazing stuff out there! is best stick 1 library or can mix more 1 library , more 1 plugin? it fine mix more 1 library and/or plugin. libraries compliment each other such jquery , underscore. seek not utilize jquery , dojo , mootools together. beingness said, work company teams build different components different frameworks (j...

android - How can I check if a ContentResolver is busy -

android - How can I check if a ContentResolver is busy - i have button , when user clicks button, should update status of info specified id public void updatebyclick(int id) { mycursor.movetoposition(id); if (mycursor.getshort(mycursor.getcolumnindex(mytable.status)) == 0) { contentvalues cv = new contentvalues(); cv.put(mytable.status, true); getcontext().getcontentresolver().update(mytable.content_uri, cv, mytable._id + "= ?", new string[] {string.valueof(id + 1)}); } } the problem is, if user clicks button fast (so there lot of updatebyclick events) update operation calls many times (update isnt happened yet, status still == 0) how can check if contentresolver (or else) busy (currently updating) can prevent multiple update calls i solve timestamps. every time update method called create timestamp system.currenttimemillis() , check difference lastly saved timestamp. if doesn't reach thresho...

ios - UIInterface orientation issues -

ios - UIInterface orientation issues - i create project supported interface orientation landscape only. in ib alter orientation view on landscape , alter size w: 480 h:320. in method -scrollviewdidscroll width of view (self.view.frame.size.width) , value 320 in ib set in 480. anybody know it? thanks! changing orientation in ib doesn't create difference view 1 time it's loaded - it's convenience when laying out controls. the view's actual width depend on orientation of device @ runtime, assuming you've allowed rotate. when view loaded nib resized fit screen automatically, if phone in portrait mode when load it, width 320. make sure you've set willrotatetointerfaceorientation: method correctly in view controller. if that's right , it's displaying in landscape, thing seek utilize self.view.bounds.size.width property instead, inner size (bounds) not same outer size (frame) if view has been rotated. ios uiinterfaceorie...

Why is it not possible to create abstract classes in objective-c -

Why is it not possible to create abstract classes in objective-c - because not really* possible create abstract classes in objective-c wondering if tell me why creators of objective-c didn't add together feature language. *of course of study there few workarounds create -kind of- abstract classes thats not mean. if mean why can't declare class abstract rather implement abstract class, suppose it's because doesn't interact objective-c's extremely dynamic, types-optional, smalltalky message-passing style (smalltalk doesn't have built-in back upwards declaring them either). example: you might not know class you're sending alloc or init to, pretty weak guarantee subclasses might still need pass alloc , init class hierarchy, we'd need allow that, making weaker guarantee categories modify classes @ runtime, making abstract contract weaker still in end, you'd wind keyword did same thing implement abstract classes (i.e. maybe ov...

shopping cart - e-commerce + realcommerce with the same stock -

shopping cart - e-commerce + realcommerce with the same stock - i'm searching scheme can provide e-commerce , programme deal real customers. the 2 applications different need update stock straight if purchased online or offline. i searched prestashop cannot create real transactions application. it sounds looking point of sale software utilize e-commerce software. aspdotnetstorefront favorite e-commerce platform , there add-ons available allow work quickbooks point of sale - other point of sale products. in addition, have phone order entry feature administrative users logged on web store allows admins place orders customers used place orders offline customers or customers helping on phone. e-commerce shopping-cart prestashop

c# - Storing and retrieving images from Database -

c# - Storing and retrieving images from Database - i created asp.net/c# application upload image mysql database. process executes without error whatever image upload getting output of 100x100 white image. procedure followed is. 1) created database field picture , type binary(255) . 2) uploaded image cmd.parameters.add("@picture", odbctype.binary, 255).value = fileupload1.filebytes; 3) doing above new record beingness inserted , value of below kind generated. 89504e470d0a1a0a0000000d49484452000002600000010008020000009b155d400000100049444154789cd4dc05745b57a2377a15c26088d99651b2248b999959b2c0966cc9cccccc8e1ddb01439899d3a4499a869999e33037d0340d34d4b4d5dbaee7e6f6b5337367eefad67bf3adf55f676dd98e221f6b9ddffeef738e20db5cbf826c77fd3638d8eafa6587ebd79daedfc0f6afd9eefae5ab372fd6bf7db9e5e7b7075dae4daf5e1c76b98ebb5cfb7ef935a5b31b028b32ea53f6ec3a77efe60fb919156e34222b297ee3aedd2e97ebe6dd870b96acd8b0efc0891bb76ae7ce8ba9a8dc70f1f2c917afaeb95ce75c1f276cd988b0180329c4c4aaf2d2 /...

Extract report from multiple queries with Toad from Oracle -

Extract report from multiple queries with Toad from Oracle - is possible extract excel multiple dataset populated multiple queries? need report. currently launch every query , extract resultset in separate excel. yes. if utilize "excel instance" export option, toad checks see if instance of excel open. if so, writes new sheet in instance. if you've selected "start @ active cell" option, starts @ active cell rather new sheet. oracle toad

cocoa touch - iOS - wait_fences MFMessageComposeViewController -

cocoa touch - iOS - wait_fences MFMessageComposeViewController - i'm trying show mfmessagecomposeviewcontroller view doing: mfmessagecomposeviewcontroller *mfmessagecomposevc = [[mfmessagecomposeviewcontroller alloc] init]; if([mfmessagecomposeviewcontroller cansendtext]) { mfmessagecomposevc.body = @"test."; mfmessagecomposevc.recipients = [nsarray arraywithobjects:@"123456", @"34567", nil]; mfmessagecomposevc.messagecomposedelegate = self; [self presentmodalviewcontroller:mfmessagecomposevc animated:yes]; } when check log output see warning message: wait_fences: failed receive reply: 10004003 what reason of behaviour , warning message mean? if you're still dealing problem (or if others nail later): wait_fences typically means manipulating ui off-screen (or during competing animation) - perchance either within mfmailcomposeviewer , or more behind it. (there ton of other wa...

jquery - How to hide the Div at the Click of the Button in MVC -

jquery - How to hide the Div at the Click of the Button in MVC - my application in mvc3.i want particular div in view hide @ click of button. below code tried. $(document).ready(function () { $("#btncompare").click(function () { if(mycondition) { for(myloop) { } } } }); my code not working.as want div hide after click called. please suggest $(document).ready(function () { $("#btncompare").click(function () { $(".yourdiv").hide("slow"); if(mycondition) { for(myloop) { } } }); }); yourdiv class of div want hide.if there no id in div tag assign class this <div class="yourdiv"></div> jquery

asp.net mvc - ASPNET authenticate fail with IIS -

asp.net mvc - ASPNET authenticate fail with IIS - i have develop mvc web application utilize asp.net authenticate implement login form problem cannot deploy server. in first utilize aspnetdb.mdf file store in appdata forlder after alter store aspnetdb database in sqlserver , update connectionstring new database in development environment both of them work when deploy iis, cannot login, show me next error : "failed generate user instance of sql server due failure in retrieving user's local application info path. please create sure user has local user profile on computer. connection closed." here connection string: <connectionstrings> <add name="applicationservices" connectionstring="data source=.\phdatabase; initial catalog=aspnetdb;user id=sa;password=****" /> </connectionstrings> i seek google lot until now, there no result please help me solve problem regard try replacing machine name instead of ...

eclipse - Phonegap Android app - not reading cookie on WIFI? -

eclipse - Phonegap Android app - not reading cookie on WIFI? - i have built android html5 app using phonegap uses iframe process payments via scheme on partner companies server. the scheme drops cookie inbox code on phone means 1 time user has register 1 time - scheme uses cookie save them re-registering - worked fine until time launch , work on wifi , not on 3g!? this has worked - doesn't create logical sense me! wondered whether due permission alter in manifest file? (which below) does have ideas @ all? <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.phonegap.chillimusicapp" android:versioncode="1" android:versionname="1.0" > <supports-screens android:largescreens="true" android:normalscreens="true" android:smallscreens="true" an...

How to retrieve the data from XML into CSS -

How to retrieve the data from XML into CSS - i have requirement have place path of image in xml file , should retrieve css file. alter image without touching code.is possible? if yes this? we wish easy. :) to read xml file need scripting language such php from php or other scripting language need show result in html page. and utilize css if needed, format html page design end user see it xml

Display Wordpress widget on post page within certain category -

Display Wordpress widget on post page within certain category - i'm trying utilize widget logic (wordpress plugin) display widget when viewing post posted category. i've used: is_category('category_name') to display on categories archive, when viewing individual post, no longer displayed. is there wordpress status tag want? an easy solution create special "sidebar" http://codex.wordpress.org/function_reference/dynamic_sidebar , wrap in is_category(). edit: haven't used widget logic looking @ examples should work (is_single() && in_category('baked-goods')) || is_category( 'baked-goods' ) wordpress widget category conditional-statements

iphone - UIPickerView - Selection on Tap -

iphone - UIPickerView - Selection on Tap - i showing uipickerview , in set 1 entry selected or highlighted.now when user want have highlighted entry has scroll , select entry. instead possible tap on highlighted entry for illustration have options below in uipikcerview ================ - land promoters ( default highlighted ) builders brokers so when, showing picker, when jus tapping on "land promoters", want called function //=========================================================================== - (void)pickerview:(uipickerview *)pickerview didselectrow:(nsinteger)row incomponent:(nsinteger)component //=========================================================================== the best way not utilize didselectrow callback. instead set done button, , on click of button take selectedrowincomponent of picker view , hide picker view. can utilize selectedrowincomponent selected row , utilize fetch name/etc info array. iphone...

data structures - C++ Boggle Solver: Finding Prefixes in a Set -

data structures - C++ Boggle Solver: Finding Prefixes in a Set - this homework assignment, don't want exact code, appreciate ideas can help point me in right direction. the assignment write boggle solving program. i've got recursive part downwards feel, need insight on how compare current sequence of characters dictionary. i'm required store dictionary in either set or sorted list. i've been trying way implement using set. in order create programme run faster , not follow dead end paths, need check , see if current sequence of characters exists prefix in set (dictionary). i've found set.find() operation returns true if string exact match. in lab requirements, professor mentioned that: "if dictionary stored in set, many info construction libraries provide way find string in set closest 1 searching for. such operation used find word given prefix." i've been searching today professor describing. i've found lot of info on tries, s...

c# - Get N tweets from list in twitter using linq2twitter -

c# - Get N tweets from list in twitter using linq2twitter - i'm doing tweets list in twitter: twitterctx = new twittercontext(); var tweets = tweet in twitterctx.list tweet.type == listtype.statuses && tweet.ownerscreenname == osn && tweet.slug == listname && tweet.count == 100 select tweet.statuses; homecoming tweets.singleordefault().where(x => x.createdat > datetime.now.adddays(-numofdays)).groupby(p => p.user.name).select(g => g.first()); i'm getting latest tweet user in list using lastly bit: .groupby(p => p.user.name).select(g => g.first()); how can latest 5 tweets them? i haven't used twitter api, obvious first thought alter to: .groupby(p => p.user.name).select(g => g.take(5)); then you'd tweets like: foreach (var grouping in query) { console.writeline("tweets {0}", group.key); foreach (var tweet in group...

import - (Python) Use a library locally instead of installing it -

import - (Python) Use a library locally instead of installing it - script: i've written script in python sends tweets twitter uses 1 library called: tweepy after installing library works, great. problem: host script on server not have privileges install anything great if can include locally folder i've got in. of right now, need include @ top of file is: import tweepy the tweepy folder (does have __init__.py file believe important. question: how can utilize library without installing it? want replace: import tweepy import local_folder/tweepy/* this might python mutual sense, i'm stuck! there few possibilities: if know how install python modules, default distutils setup includes per-user installation option. run python setup.py install --user instead of python setup.py install . easiest, since not necessitate add-on of source code. you run script directory of tweepy current working directory. you add together environment variable n...

.net - How do I convert a color value created by the Win32 API Function "ChooseColor " into a css compatible rgb hex value -

.net - How do I convert a color value created by the Win32 API Function "ChooseColor " into a css compatible rgb hex value - i have value created win32 api function choosecolor , want convert rgb hex tripplet. how do this. number returned choosecolor? as you're doing in .net, can utilize colorref value , convert .net colour using: color colour = colortranslator.fromwin32(mycolorref); if want html hex triplet string: string htmlcolour = colortranslator.tohtml(colour); .net winapi colors

.net - linq make call from each iternation -

.net - linq make call from each iternation - i have folloiwng linq query var results = mainlist.select(item => new { spresult: sp_getsys(item.psid, item.nominprsn), psid: item.psid, nominprsn: item.nominprsn }); mainlist has 2 rows. 1 psid , other nominprsn each iteration, need phone call stored procedure called sp_getsys. result of spresult list 8 rows. need 2nd row , farther more field called psdate. how can modify spresult: sp_getsys(item.psid, item.nominprsn) above this? i think job, seems may improve thought break out foreach loop gain clarity. var results = item in mainlist select new { spresult = sp_getsys(item.psid, item.nominprsn).skip(1).firstordefault().psdate, psid = item.psid, ...

Emacs VHDL jump to error -

Emacs VHDL jump to error - i cannot create emacs jump next-error, previous-error, first-error in vhdl-mode. i using fsf emacs 23.3.1 recent vhdl-mode 3.33.28 under ubuntu. can compile modelsim , compiler error list: -- loading bundle standard -- ... -- compiling entity foo ** error: path/foo.vhd(22): (vcom-1136) unknown identifier "std_olgic". i tried adapt error regexp (in compiler-setup) simplest one: \*\* error: \([a-za-z\/_.]*\)(\([0-9]*\)).* when utilize way can see parses errors correctly: sed "s/\*\* error: \([a-za-z\/_.]*\)(\([0-9]*\)).*/\1 \2/" ... path/foo.vhd 22 i changed "file subexp index" , "line subexp index" respectively 1 , 2 still cannot jump around errors. the next config resolves bug me '(vhdl-compile-use-local-error-regexp t) (add-to-list 'compilation-error-regexp-alist '("** error: \\(.+\\)(\\([0-9]*\\)):" 1 2)) emacs vhdl

c# - Get a window text by handle -

c# - Get a window text by handle - i utilize ui spy , spy++ view windows text of windows, none offers result. people said, windows built , executed components, embedded within components. except 2 tools view window handles, text, introduce me other tools or ways window text or handle without using hooks ? edit: utilize spy object retrieve windows objects info , search ancestors till can meet right object tool particular windows watching incapable job because reports wrong parents positions in ancestor hierarchy, seek out maas , ui-automation without luck, give thanks you help. edit3: don't windows'ideas of internal designs (i mean they-designers- know how untie knots) usually accessibility apis used, ones used text-to-speech screen readers blind users. in question mentioned maas, did mean msaa (microsoft active accessibility)? if not, that's i'd next. c# windows winapi hook spy++

VSTO - Activate "Track Changes" in an excel workbook with c# -

VSTO - Activate "Track Changes" in an excel workbook with c# - in excel 2007 have button "track changes" in "review" ribbon. how can perform action through c#? the next line of code should excel.application.activeworkbook.highlightchangesonscreen = true; make sure document has been saved. c# excel vsto review track

jquery - How to get input value on button click? -

jquery - How to get input value on button click? - here form code: <form accept-charset="utf-8" id="form_id" action="/" method="post"> <input type="text" value="" placeholder="email" name="fields_email" class="email_field"> <input type="submit" value="subscribe" name="subscribe" class="subscribe_btn"> </form> js file : $('.subscribe_btn').click(function(e){ e.preventdefault(); console.log( $("#form_id .email_field").val() ); }); how live input value? on click i'm getting old value not live.... thank you, dmitry works me: $('.subscribe_btn').click(function(e) { e.preventdefault(); alert($("#form_id .email_field").val()); }); http://jsfiddle.net/rhqc7/ i changed console alert() , tested in both ff9.0.1, ie8, chrome 16.0.x jquery

jsf 2 - preRenderView and ajax -

jsf 2 - preRenderView and ajax - i have prerenderview attached component a. there component b has ajax. ajax render hidden component has text fields in it. problem ajax not rendering inputtext field <h:form....> <ui:composition...> <f:event type="prerenderview" listener="#{bean.action}"> ........... <ui:composition/> <ui:composition...> <h:selectoneradio....> <f:ajax render="inputtextid"../> <h:selectoneradio/> <ui:fragment rendered="#{condition}"> <h:inputtext id="inputtextid" ...../> <ui:fragment/> <ui:composition/> <h:form/> the re-rendering takes place @ client side help of javascript after receiving ajax response. requires generated html output of to-be-updated component already in client side. in case, it's never there in generated html output. need swap rendered , id attributes. <h:selectoneradio ...> <f:ajax rende...

java - Constant error in Hibernate Template update hql -

java - Constant error in Hibernate Template update hql - my client class uses updatecustomer method in customerservice class: client updatedcustomer = new customer("2314dd0", "pojo world", "offers pojo service."); customerservice.updatecustomer(updatedcustomer); i've tried sorts of things work around "updateorsave", different arguments update, , on. problem encountering according stack trace (hibernateoptimisticlockingfailureexception) , (org.hibernate.stalestateexception). allow me explain first: other info accesses (i.e. save, delete, , query) work well. suspicious client domain class, customer.hbm.xml i've set up. so, client service class: public void updatecustomer(customer updatedcustomer) { this.dao.update(updatedcustomer); } customer service dao: public void update(customer customertoupdate) { template.update("customer", customertoupdate); } domain.customer class: public ...

iphone - Memory management : release viewcontroller object after adding to NSMutableArray -

iphone - Memory management : release viewcontroller object after adding to NSMutableArray - i have memory leak below code. if utilize [sub release]; after adding sub nsmutablearray(subviewcontroller), analyzer says "inconrrect decrement of reference count of object not owned @ point caller", when remove [sub release] says "potential leak of object allocated on xx line" for (int i=0; i<[self.data count]; i++) { subcategoryviewcontroller *sub =[[subcategoryviewcontroller alloc] initwithserviceurl:urlstring andheadervalue: ((pmcategory *)[self.data objectatindex:i]).categoryname]; [[appdelegate sharedappdelegate].viewcontroller.subviewcontrollers addobject:sub]; [sub release]; } alson if utilize autorelease warning becomes "object sent -autorelease many times" subcategoryviewcontroller *sub =[[[subcategoryviewcontroller alloc] initwithserviceurl:urlstring andheadervalue: ((pmcateg...

HTML5 hide code like Flash -

HTML5 hide code like Flash - i wondering, if have proprietary flash code (e.g: cool animation client side stuff, example), , rewrite using html5, possible hide code? or @ to the lowest degree create harder see (unlike right click, view source, can re-create paste code). e.g: see or maybe reuse flash, u have reverse engineer it. no there no way this. reverse engineering science swf files trivial programs swf-decompiler , trillix, doesn't matter much. main point don't set of import in client side code wouldn't want compromised. sent server client processing on client side can intercepted proxy running on said client , de-compiled/disassembled. other user here stated can utilize .htaccess restrict access server side scripts (ones executed on server) cannot "hide" going executed on client machine. possibly best attempts i've seen @ doing done google flash maps api give swc in sdk utilize has interfaces implementation fetched @ run-time in...

javascript - facebook log-in API calls timing -

javascript - facebook log-in API calls timing - couldn't find similar plenty question i'll ask. i'm trying utilize facebook log-in on page. i did according the developer's guides. however, i'm not sure when can start calling fb.api calls. when user authenticated? how can know when operation done? <script> window.fbasyncinit = function () { fb.init({ appid: 'someid', // app id channelurl: '//www.domain.com/channel.html', // channel file status: true, // check login status cookie: true, // enable cookies allow server access session xfbml: true // parse xfbml }); }; // load sdk asynchronously (function (d) { var js, id = 'facebook-jssdk'; if (d.getelementbyid(id)) { return; } js = d.createelement('script'); js.id = id; js.async = true; js.src = "//connect.facebook.net/en_us/all.js"; ...

c# - simulating connection flakiness on windows phone 7 simulator for testing -

c# - simulating connection flakiness on windows phone 7 simulator for testing - i developing application windows phone 7. testing application on simulator. want simulator should have connection flakiness have on wp7 device.how can accomplish please help. windows phone 8.0 sdk supports network simulation. can simulte 2g/3g/wifi , no network. c# .net windows-phone-7 testing simulator

iphone - Sort Core Data alphabetically with special characters -

iphone - Sort Core Data alphabetically with special characters - i have entity in core info containing lot names. of names has special characters in them, i.e Åfjord. names starting letter Å, needs @ bottom of tableview, because it's lastly letter in norwegian alphabet. -(nsarray *)getfetchedobjects:(nsmanagedobjectcontext *)context entityname:(nsstring *)entityname sortkey:(nsstring *)key{ nserror *error = nil; nsfetchrequest *fetchrequest = [[nsfetchrequest alloc]init]; nsentitydescription *entity = [nsentitydescription entityforname:entityname inmanagedobjectcontext:context]; [fetchrequest setentity:entity]; if (key != nil) { nssortdescriptor *sortdescriptor = [[nssortdescriptor alloc]initwithkey:key ascending:yes]; nsarray *sortdescs = [[nsarray alloc]initwithobjects:sortdescriptor, nil]; [fetchrequest setsortdescriptors:sortdescs]; } homecoming [context executefetchrequest:fetchrequest error:&error]; } and phone call method so: places = [...

Expose javascript variable in jQuery plugin while maintaining chainability? -

Expose javascript variable in jQuery plugin while maintaining chainability? - the problem plugin need expose var chart , maintain chainability. how can accomplish this? first plugin wrote , don't know if chainability of import preserve. thanks. html piece <div id="chart1" class="chart"></div> <div id="chart2" class="chart"></div> plugin invocation $("div").chart(); plugin definition (function($) { $.fn.chart = function(options) { homecoming this.each() // maintain chainability { // stuff, ajax phone call , then... var chart = new highcharts(options); // expose each chart variable each container (<div>) } }; })(jquery); edit: added clarification chart variable. first, should read plugins/authoring if havent already. there ideas in there. second, can seek this: $.fn.chart = function(options) { ...

php - How many Dependency Injection Containers should I create? -

php - How many Dependency Injection Containers should I create? - i have sorts of different models , many of them have @ to the lowest degree 1 dependency (usually db adapter). getting thought of dic or ioc, , i'm trying wrap head around needed - examples typically show simple creation of single object container. if have many user models, many blog models, , sorts of others, how manage this? mutual have 1 big container, many different smaller ones, or single mill per model? or thinking incorrectly? note: asked below, model, believe mean "domain model". more specific - classes help me manage info specific website/application, users, blogs, etc. one container application sufficient. there concept called composition root describes how utilize di container properly. business model classes users, blogs etc. not pulled container. provide designated factories in turn can injected classes need create model objects. php dependency-injection ioc-co...

asp.net mvc 3 - How Poco Use in MVC3 with example? -

asp.net mvc 3 - How Poco Use in MVC3 with example? - i new poco , mvc stufffs. reading articals poco on google, not having exact thought may lack of knowledge or not proper examples got. can 1 please explain me how utilize "poco" stuffs in mvc project. it great if vidoe link poco learn the poco term used able tell if object has side effects , term used or/m layers. an object poco have no dependencies orm layer or else. if serialize , deserialize still same. non-pocos can used able add together back upwards lazy loading or able track entity. normal approach object either inherited regular class (a proxy) or has features start. asp.net-mvc-3 entity-framework poco

iphone - Direct Interaction with Voice Over? -

iphone - Direct Interaction with Voice Over? - my app content single tap 3 types : 1 fingertap, 2 fingerstap , 3 fingerstap , swipe gestures. but when voice on turn-on cannot observe tap correctly. i have tried if (uiaccessibilityisvoiceoverrunning()) { uiview *interactionview = [[uiview alloc]init]; [self.view addsubview:interactionview]; [self.view bringsubviewtofront:interactionview]; [interactionview setaccessibilitytraits:uiaccessibilitytraitallowsdirectinteraction]; } but doesn't work tap to able process taps ( touchesbegan:withevent: etc.) voiceover turned on, need set 2 variables of uiview: view.accessibilitytraits = uiaccessibilitytraitallowsdirectinteraction; view.isaccessibilityelement = yes; you didn't set latter. however, please maintain in mind doing disables default gestures made on view. if don't want , need basic gestures instead of total command on touches, seek adding gesture recognizer ( addgesturerecognizer:...

Silverlight data binding breaks when there is no debugger attached -

Silverlight data binding breaks when there is no debugger attached - ok, bit of unusual 1 - , it's simple i'm pretty new silverlight! i have object next property:- private int targetid = null_target_value; [display(name="target", order=1)] [required] public int targetid { { homecoming targetid; } set { if (this.targetid != value) { this.validateproperty("targetid", value); this.targetid = value; this.raisepropertychanged("targetid"); } } } this object created using dataform toolkit. utilize autogeneratingfield event alter item combo box drop downwards code below: if (e.propertyname == "targetid") { combobox target = new combobox() { displaymemberpath = "title", selectedvaluepath = "itemid" }; target.ite...