Daily Archives

Articles indexed Tuesday May 11 2010

Page 32/123 | < Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >

  • Problem in using j2me polish with netbeans

    - by learn
    I have downloaded and installed the j2me polish successfully and i have tried to create the project but there is a reference problem showing that the specified folder does not contain the java platform but it is successfully working with normal project instead of polish which LWUIT to use?

    Read the article

  • How can I sync three classes?

    - by TheMachineCharmer
    class Foo { Bar b; List<Foo> Neighbours; } class Bar { Spam s; List<Bar> Neighbours; } class Spam { List<string> Neighbours; } Each of these classes have AddNeighbour,RemoveNeighbour methods. User can add/remove Neighbours from any of the class at random. I want these three objects to be in sync. How can I do this?

    Read the article

  • Does a transaction stop all race condition problems in MySQL?

    - by nickf
    Consider this situation: Begin transaction Insert 20 records into a table with an auto_increment key Get the first insert id (let's say it's 153) Update all records in that table where id >= 153 Commit Is step 4 safe? That is, if another request comes in almost precisely at the same time, and inserts another 20 records after step 2 above, but before step 4, will there be a race condition?

    Read the article

  • How to read XML parent node tag value

    - by kaibuki
    HI Guys, I have a java code to read XML nodes, I want to add in the addition and want to read the parent node value also. my XML file sample is below: <breakfast_menu><food id=1><name> Belgian Waffles </name><price> $5.95 </price><description> two of our famous Belgian Waffles with plenty of real maple syrup </description><calories> 650 </calories></food><food id=2><name>Strawberry Belgian waffles</name><price>$7.95</price><description>light Belgian waffles covered with strawberries and whipped cream</description><calories>900</calories></food></breakfast_menu> and my code for parsing xml is : public static String getProductItem(String pid, String item) { try { url = new URL(""); urlConnection = url.openConnection(); } catch (MalformedURLException e) { e.printStackTrace(); } catch (IOException e) { } try { dBuilder = dbFactory.newDocumentBuilder(); } catch (ParserConfigurationException e) { } try { doc = dBuilder.parse(urlConnection.getInputStream()); } catch (SAXException e) { } catch (IOException e) { } doc.getDocumentElement().normalize(); NodeList nList = doc.getElementsByTagName("food"); for (int temp = 0; temp < nList.getLength(); temp++) { Node nNode = nList.item(temp); if (nNode.getNodeType() == Node.ELEMENT_NODE) { Element eElement = (Element) nNode; data = getTagValue(item, eElement); } } doc = null; dBuilder = null; return data; } private static String getTagValue(String sTag, Element eElement) { NodeList nlList = eElement.getElementsByTagName(sTag).item(0) .getChildNodes(); Node nValue = (Node) nlList.item(0); return nValue.getNodeValue(); } What I want to do is to read the "id" value of food, so if if I am searching for a food, it only checks those food nodes, whose id matched the food node id. thanks in advance. cheers.. kai

    Read the article

  • Reconstructing simple 3d enviroment(room) from photo

    - by Riz
    I have photo of a room with three walls and floor/ceiling or both. I am trying to reconstruct this room in 3d asking user for minimal input. Right now I use 8 points defined by user, angles of left and right wall(they can be quite different from 90) and one size "InLeftBottom-InRightBottom"(I need to have real size of this room for later use). I have no info about user's camera(I can read EXIF to get FOV and use constant height but this can be only used as additional info). Is this possible to ask user for less info? Maybe it's possible to get wall angles without user interaction? Or maybe I am completly wrong and should use different approach?

    Read the article

  • Folder Redirection - Explorer requires manual refresh

    - by Pete
    Hello, I am having an issue where - when a users my documents folder is redirected to a DFS share, windows explorer requires a manual refresh after creating a new folder, file, etc. (Interestingly, not when making a new briefcase) I have tried a number of MS knowledge base articles, a hot-fix and a registry change, all with no success. (( http:// support.microsoft.com/?kbid=823291 ; http:// support.microsoft.com/kb/873392 )) The problem only occurs when going through the my documents icon. If I map a home drive for the user to the exact same location (IE - H:\DFS\user\documents) , open that drive and make new folders, then there is no problem. Mapping my documents to H:\ also resolves the issue, however, as we need folder sync and people logging on off site with cached profiles this is not a workable solution (as H: will not map and there will be no access to their docs.) Has anyone managed to figure a fix for this? Thanks, Pete.

    Read the article

  • Build UITextview with Line

    - by milanjansari
    Hello everybody, Does anyone idea about how can create UItextivew like same as below so user can easily write text in proper format. please check this link https://devforums.apple.com/message/217857#217857 is this possible, i have no idea about this. please anyone have idea above of the issue. Thanks you,

    Read the article

  • How to draw NSString vertically on iPhone?

    - by Horace Ho
    Chinese characters can be view horizontally and vertically. I want to let users have both options. How can this be done in an iPhone views? e.g. +-------------------------+ +-------------------------+ | Hello, I am a newbie. | | b a H | | | | i m e | | | | e l | | | ---> | . a l | | | | o | | | | n , | | | | e | | | | w I | +-------------------------+ +-------------------------+

    Read the article

  • T-SQL: if exists always return true ?

    - by msfanboy
    Hello, What do you think , does the Stored Procedure always return 1 ? I am concerned about the if exists(..) BEGIN DECLARE @IsUserExisting bit SET NOCOUNT ON IF Exists ( Select null FROM G_User WHERE SamAccountName = @SamAccountName AND NetBIOSDomainName = @NetBIOSDomainName ) BEGIN SET @IsUserExisting = 1 END ELSE BEGIN SET @IsUserExisting = 0 END Select @IsUserExisting END

    Read the article

  • Can this sql query be simplified?

    - by Bas
    I have the following tables: Person, {"Id", "Name", "LastName"} Sports, {"Id" "Name", "Type"} SportsPerPerson, {"Id", "PersonId", "SportsId"} For my query I want to get all the Persons that excersise a specific Sport whereas I only have the Sports "Name" attribute at my disposal. To retrieve the correct rows I've figured out the following queries: SELECT * FROM Person WHERE Person.Id in ( SELECT SportsPerPerson.PersonId FROM SportsPerPerson INNER JOIN Sports on SportsPerPerson.SportsId = Sports.Id WHERE Sports.Name = 'Tennis' ) AND Person.Id in ( SELECT SportsPerPerson.PersonId FROM SportsPerPerson INNER JOIN Sports on SportsPerPerson.SportsId = Sports.Id WHERE Sports.Name = 'Soccer' ) OR SELECT * FROM Person WHERE Id IN (SELECT PersonId FROM SportsPerPerson WHERE SportsId IN (SELECT Id FROM Sports WHERE Name = 'Tennis')) AND Id IN (SELECT PersonId FROM SportsPerPerson WHERE SportsId IN (SELECT Id FROM Sports WHERE Name = 'Soccer')) Now my question is, isn't there an easier way to write this query? Using just OR won't work because I need the person who play 'Tennis' AND 'Soccer'. But using AND also doesn't work because the values aren't on the same row.

    Read the article

  • ff extension: how to read a cookie name and value on the current page

    - by encryptor
    My extension works on a application, which requires user login. Once the user has logged in, I need to read the cookies and use them in my xmlhttprequests. So initially i need to check if the cookie is set, if not, I direct the user to the login page. Once logged in, I need to read the cookies and send it as part of mt further requests. Can someone plese help me on how to read cookies from a xmlhttprequest or otherwise (if we dont even know the name of the cookie) there is to function as getRequestHeader.. but what i need is something like that

    Read the article

  • Problems with sys.stdout.write() with time.sleep() in a function

    - by philipjkim
    What I wanted is printing out 5 dots that a dot printed per a second using time.sleep(), but the result was 5 dots were printed at once after 5 seconds delay. Tried both print and sys.stdout.write, same result. Thanks for any advices. import time import sys def wait_for(n): """Wait for {n} seconds. {n} should be an integer greater than 0.""" if not isinstance(n, int): print 'n in wait_for(n) should be an integer.' return elif n < 1: print 'n in wait_for(n) should be greater than 0.' return for i in range(0, n): sys.stdout.write('.') time.sleep(1) sys.stdout.write('\n') def main(): wait_for(5) # FIXME: doesn't work as expected if __name__ == '__main__': try: main() except KeyboardInterrupt: print '\nAborted.'

    Read the article

  • How to define enum in as3?

    - by Nava Carmon
    Is there a way to define an enum in AS3 in a way we do it in other languages? I can define constants with defined values like that: private const CONST_1:int = 0; private const CONST_2:int = 1; private const CONST_3:int = 2; and so on. If I want to insert some other constant between 3 these I need to move all values like that: private const CONST_1:int = 0; private const CONST_2:int = 1; private const CONST_2A:int = 2; private const CONST_3:int = 3; while in other language I would end up with only adding a new member to enum closure like that: enum { CONST_1 = 0, CONST_2, CONST_2A, CONST_3 } MyConstEnum; Does AS3 has something similar? Thanks

    Read the article

  • sifr3 text doesn't load on first try?

    - by metal-gear-solid
    sifr3 text doesn't load many time first time on FF 3.5? I haven't checked on other browser. If i reload page again then it loads properly. this is my code sIFR.replace(futura, { selector: '#Homepage h1', ratios: [6, 1.24, 9, 1.13, 10, 1.15, 16, 1.09, 21, 1.06, 22, 1.07, 25, 1.04, 26, 1.06, 29, 1.03, 30, 1.05, 31, 1.03, 32, 1.05, 41, 1.04, 58, 1.03, 97, 1.02, 1.01], wmode: 'transparent', css: '.sIFR-root { background-color: none; color: #ffffff; }' });

    Read the article

  • Cocoa Bindings and Application Preferences - Crash

    - by iaefai
    Using the document provided by Apple to create an application preferences window that doesn't require any extra code, I seem to have triggered a crash that cannot be traced by me. While the stuff from Apple is older, I believe I have the settings pretty much the same as shown here: When I run my application (Hcode) and go to the preferences menu item, it brings up the proper window with the defaults I specified in the bindings with the exception of the Spaces per tab is blank (no idea how to fix this). When the window is closed, the application crashes with a backtrace similar to this: (gdb) bt #0 0x00007fff800cb1d4 in objc_msgSend_vtable5 () #1 0x00007fff80447cf3 in -[NSMenu _enableItem:] () #2 0x00007fff80447ad8 in -[NSCarbonMenuImpl _carbonUpdateStatusEvent:handlerCallRef:] () #3 0x00007fff8042b3b0 in NSSLMMenuEventHandler () #4 0x00007fff80e06b57 in DispatchEventToHandlers () #5 0x00007fff80e060a6 in SendEventToEventTargetInternal () #6 0x00007fff80e23d85 in SendEventToEventTarget () #7 0x00007fff80e52e61 in SendHICommandEvent () #8 0x00007fff80e66357 in UpdateHICommandStatusWithCachedEvent () #9 0x00007fff80e02a6d in HIApplication::EventHandler () #10 0x00007fff80e06b57 in DispatchEventToHandlers () #11 0x00007fff80e060a6 in SendEventToEventTargetInternal () #12 0x00007fff80e23d85 in SendEventToEventTarget () #13 0x00007fff80e6599b in SendMenuOpening () #14 0x00007fff80e65388 in DrawTheMenu () #15 0x00007fff80e65149 in MenuChanged () #16 0x00007fff80e643d4 in TrackMenuCommon () #17 0x00007fff80e60dbe in MenuSelectCore () #18 0x00007fff80e60596 in _HandleMenuSelection2 () #19 0x00007fff802fc3b9 in _NSHandleCarbonMenuEvent () #20 0x00007fff802cfeda in _DPSNextEvent () #21 0x00007fff802cf379 in -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] () #22 0x00007fff8029505b in -[NSApplication run] () #23 0x00007fff8028dd7c in NSApplicationMain () #24 0x0000000100001cac in main (argc=1, argv=0x7fff5fbff5e0) at /Users/iaefai/Projects/Hcode/Source/main.m:13 I am at a complete loss as to what the problem is. Is there potentially a better way of doing this?

    Read the article

  • Java method get the inheriting type

    - by DrDro
    I have several classes that extend C and I would need a method that accepts any argument of type C. But in this method I would like to know if I'm dealing with A or B. * public A extends C public B extends C public void goForIt(C c)() If I cast how can I retrieve the type in a clean way (I just read using getClass or instanceof is often not the best way). PS: Fell free to edit an explicit title. *Sorry but I can't type closing braces

    Read the article

< Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >