Daily Archives

Articles indexed Saturday May 8 2010

Page 14/78 | < Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >

  • prototype findElements querySelectorAll error

    - by JD
    i'm call the "down" function but am getting an invalid argument using 1.6.1_rc2 here's the html snippet: <TR id=000000214A class="activeRow searchResultsDisplayOver" conceptID="0000001KIU"> <TD> <DIV class=gridRowWrapper> <SPAN class=SynDesc>Asymmetric breasts</SPAN> <DIV class=buttonWrapper> <SPAN class=btnAddFav title="Add to Favorites">&nbsp;</SPAN> </DIV> </DIV> </TD> </TR> here's the code: var description = row.down('span.SynDesc').innerHTML; row is a dom reference to the element. prototype is appending a # then the id of the element: findElements: function(root) { root = root || document; var e = this.expression, results; switch (this.mode) { case 'selectorsAPI': if (root !== document) { var oldId = root.id, id = $(root).identify(); id = id.replace(/[\.:]/g, "\\$0"); e = "#" + id + " " + e; } results = $A(root.querySelectorAll(e)).map(Element.extend); <-- e = "#000000214A span.SynDesc" root.id = oldId; return results; case 'xpath': return document._getElementsByXPath(this.xpath, root); default: return this.matcher(root); } i get an "invalid argument" error? if i put a breakpoint before the offending line and change e to be equal to "span.SynDesc" it works fine. help. :)

    Read the article

  • XUL - Access to image information

    - by Murali
    Hello All, I trying to figure out how to write a Firefox extension that would give image information when i right-click on the image. Basically, I want image path when user right-clicks on the image. Any help would be greatly appreciated. Thanks.

    Read the article

  • Free API for Friends Invite from Gmail,Yahoo,AOL,Hotmail PHP Ajax

    - by Gobi
    Hi, i need any opensource api for implementing address book import for friends invite from Gmail,yahoo,hotmail,aol etc ... its may be ajax or php or javascript . openinvite.com is there but i cant download it for loacl testing since it asking valid website domain . conatact grabber is also but got some problem in using it finally i got a class for google contacts import its jus workin smart simple jus providing USERNAME and PASS. like this im expecting for others. im working this in Drupal.

    Read the article

  • do I need to close an audio Clip?

    - by Michael
    have an application that processes real-time data and is supposed to beep when a certain event occurs. The triggering event can occur multiple times per second, and if the beep is already playing when another event triggers the code is just supposed to ignore it (as opposed to interrupting the current beep and starting a new one). Here is the basic code: Clip clickClip public void prepareProcess() { super.prepareProcess(); clickClip = null; try { clipFile = new File("C:/WINDOWS/Media/CHIMES.wav"); ais = AudioSystem.getAudioInputStream(clipFile); clickClip = AudioSystem.getClip(); clickClip.open(ais); fileIsLoaded = true; } catch (Exception ex) { clickClip = null; fileIsLoaded = false; } } public void playSound() { if (fileIsLoaded) { if ((clickClip==null) || (!clickClip.isRunning())) { try { clickClip.setFramePosition(0); clickClip.start(); } catch (Exception ex) { System.out.println("Cannot play click noise"); ex.printStackTrace(); } } } The prepareProcess method gets run once in the beginning, and the playSound method is called every time a triggering event occurs. My question is: do I need to close the clickClip object? I know I could add an actionListener to monitor for a Stop event, but since the event occurs so frequently I'm worried the extra processing is going to slow down the real-time data collection. The code seems to run fine, but my worry is memory leaks. The code above is based on an example I found while searching the net, but the example used an actionListener to close the Clip specifically "to eliminate memory leaks that would occur when the stop method wasn't implemented". My program is intended to run for hours so any memory leaks I have will cause problems. I'll be honest: I have no idea how to verify whether or not I've got a problem. I'm using Netbeans, and running the memory profiler just gave me a huge list of things that I don't know how to read. This is supposed to be the simple part of the program, and I'm spending hours on it. Any help would be greatly appreciated! Michael

    Read the article

  • SQL Server 2008 R2: StreamInsight changes at RTM: Count Windows

    - by Greg Low
    Another interesting change in the RTM version of StreamInsight is the addition of a new window type. Count Windows aren't time based but are based on counting a number of events. The window type provided in this release is called CountByStartTimeWindow. Based on that name, you'd have to presume we might get other types of count windows in the future. This new window type takes two parameters. The first is the number of events. The second is an output policy, similar to the policies now required for...(read more)

    Read the article

  • Java: ListA.addAll(ListB) fires NullPointerException?

    - by HH
    The err part is Capitalized in the code, it also comes in foreaching. Because of the abstract list, it cannot be initialized, declaration is in a static field. The lists have the same type. import java.util.*; public class Test { public static final List<String> highPrio = Arrays.asList("*","/"); public static List<String> ops; public static void main(String[] args) { //ERROR HERE, why do it throw nullPointer? ops.addAll(highPrio); for(String s : ops) { System.out.println(s); } } }

    Read the article

  • Coding an application so that it runs properly on windows 7...?

    - by rajivpradeep
    I have a flash drive which has an application whose code is written VC++ 2008 , the application works fine in xp , but the problem arises when i plug in the drive to a windows 7 machine , it doesn't run properly. is there any way that i can make it compatible to windows by writing a code. i dont want to set the compatibility tab in windows 7 to run the program.. i want to code it in the program , more like a patch.

    Read the article

  • visual assist inserts extra spaces?

    - by Kugel
    I'm using Visual Assist X trial on VS2010 Pro. When I do extract method or modify method signature refactorings it gives me this: void Solver::Work( Stack &s, Board &b ) However I would really appreciate if it gave me this: void Solver::Work(Stack &s, Board &b) No extra spaces. Is there a way to set this?

    Read the article

  • Android back button does not restart activity?

    - by Chris
    My app intiates an activity. On the click of a button, the app opens up the browser with a webpage. When I hit the back button, it comes back to my initial activity screen, but does not resume or restart the activity. When I put all the layout code and activity code in onResume instead of onCreate, the activity gets restarted. My question is whether this is the right way to go about it? Can I use onResume to draw my layout and initiate the activity, or is this poor design? When the browser fires up, does the initial activity forget its layout? Please let me know what you suggest. Thanks Chris

    Read the article

  • JPanel not listening to key event when there is a child component with JButton on it

    - by Yifu
    I'm working on a map editor for my college project. And I had a problem that the map panel is not listening key event while it should. This happens when I add a ToolBarPane (which extends JPanel) with JComponent such as JButton, JComboBox that implements ActionListener on it AND the map panel (which extends the JPanel) together on to the Frame (I used BorderLayout). I have System.out.println statement to test if the key press is received, and it's not printing, if I remove the ToolBar, the key listener works again, so is the mouseListenner is disabled just like the keyListener, which means I can't handle press events etc, but the mouseListener works fine and I can still handle mouse move event. Here is a screen shot how it works without the ToolBarPane http://img684.imageshack.us/img684/3232/sampleku.png note that you can use the mouse to put images on the map, you can also select images using the mouse just like a laser tool, and by pressing number key you can switch between different images, this works fine until I add the ToolBarPane which shows like this: img291.imageshack.us/img291/8020/failve.png (please add http before that, i can only post one hyperlink) (I can't post images here cuz im a new user) With the ToolBarPane on I was no longer able to handle the key event. I guess it might by that the focus as been transfered to that panel somehow, but not sure at all. Does and body know this and can help me out? Thanks very much

    Read the article

  • How can i solve "Captcha required" error in Google Apps API Ver 2 for .NET ?

    - by Preeti
    Hi, I am migrating Contacts to Google Apps. But after migrating around 300 contacts I am getting "Captcha Required" Exception at line : Uri feedUri = new Uri(ContactsQuery.CreateContactsUri(UserName)); ContactEntry createdEntry = (ContactEntry)service.Insert(feedUri, ContactEntry[0]); I am using Ver2 of Google API. How can i solve this issue ? Note : I am not using web application. Thanx

    Read the article

  • Can I db.put models without db.getting them first?

    - by Liron
    I tried to do something like ss = Screenshot(key=db.Key.from_path('myapp_screenshot', 123), name='flowers') db.put([ss, ...]) It seems to work on my dev_appserver, but on live I get this traceback: 05-07 09:50PM 19.964 File "/base/data/home/apps/quixeydev3/12.341796548761906563/common/appenginepatch/appenginepatcher/patch.py", line 600, in put E 05-07 09:50PM 19.964 result = old_db_put(models, *args, **kwargs) E 05-07 09:50PM 19.964 File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/db/init.py", line 1278, in put E 05-07 09:50PM 19.964 keys = datastore.Put(entities, rpc=rpc) E 05-07 09:50PM 19.964 File "/base/python_runtime/python_lib/versions/1/google/appengine/api/datastore.py", line 284, in Put E 05-07 09:50PM 19.965 raise _ToDatastoreError(err) E 05-07 09:50PM 19.965 InternalError: the new entity or index you tried to insert already exists I happen to know just the ID of an existing Screenshot entity I want to update; that's why I was manually constructing its key. Am I doing it wrong?

    Read the article

  • Laptop authentication/logon via accelometer tilt, flip, and twist

    - by wonsungi
    Looking for another application/technology: A number of years ago, I read about a novel way to authenticate and log on to a laptop. The user simply had to hold the laptop in the air and execute a simple series of tilts and flips to the laptop. By logging accelerometer data, this creates a unique signature for the user. Even if an attacker watched and repeated the exact same motions, the attacker could not replicate the user's movements closely enough. I am looking for information about this technology again, but I can't find anything. It may have been an actual feature on a laptop, or it may have just been a research project. I think I read about it in a magazine like Wired. Does anyone have more information about authentication via unique accelerometer signatures? Here are the closest articles I have been able to find: Knock-based commands for your Linux laptop Shake Well Before Use: Authentication Based on Accelerometer Data[PDF] Inferring Identity using Accelerometers in Television Remote Controls User Evaluation of Lightweight User Authentication with a Single Tri-Axis Accelerometer Identifying Users of Portable Devices from Gait Pattern with Accelerometers[PDF] 3D Signature Biometrics Using Curvature Moments[PDF] MoViSign: A novel authentication mechanism using mobile virtual signatures

    Read the article

  • Unable to bind with any property of UserControl

    - by Agha Khan
    I looked your answer where I was also using this.DataContext=this. I am unable to convince myself why I have to remove it? But I did In my UserControl control I have 6 int properties (RedCount, GreenCount …) I am using .NET 3.5 and basically I wanted to use StringFormat with Binding. In my xaml file I have 6 Labels with I would like to bind, and I did what exactly you told in last reply. For some strange reasons it didn’t work. I don't know why it does not work. I placed break point in converter where I never hit it. This imples Binding failed.

    Read the article

< Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >