Search Results

Search found 3286 results on 132 pages for 'piece'.

Page 37/132 | < Previous Page | 33 34 35 36 37 38 39 40 41 42 43 44  | Next Page >

  • java classcast exception

    - by shil
    hi i have problems in converting an XML document type into a Document object.. this is the piece of code line 1 : Document doc=null; line 2 : doc = (Document) parser.parse(sourceFile); for this line 2 it throws java classcast exception.. without the typecast it shows error as "Type mismatch: cannot convert from org.w3c.dom.Document to javax.swing.text.Document" how do i now typecast properly? any suggestions??

    Read the article

  • Cross site scripting help?

    - by shane87
    I have a piece of javascript executing on a jetty server which is sending a XMLHTTPRequest to a scoket on another server(wamp server). The request gets sent to the socket, however the XHR response seems to be getting blocked. My only thoughts on this is it may be an issue with XSS(cross site scripting). Is there a way in which i could enable cross site scripting for this particular request or is there something else i should be doing? Any help would be greatly appreciated!

    Read the article

  • Detecting all memory changes in C

    - by jetru
    Is there a way I can find out all changes to memory by a particular piece of code( a function or a line of code ) without knowing in advance where I expect the changes(I want to watch the whole program memory space)? watch in gdb requires me to know what I expect is changing...

    Read the article

  • How do you remove functionality from a program in ruby?

    - by Andrew Grimm
    You have some code you want to remove associated with an obsolete piece of functionality from a ruby project. How do ensure that you get rid of all of the code? Some guidelines that usually help in refactoring ruby apply, but there are added challenges because having code that isn't being called by anything won't break any unit tests.

    Read the article

  • Python: Split, strip, and join in one line

    - by PandemoniumSyndicate
    I'm curious if their is some python magic I may not know to accomplish a bit of frivolity given the line: csvData.append(','.join([line.split(":").strip() for x in L])) I'm attempting to split a line on :, trim whitespace around it, and join on , problem is, since the array is returned from line.split(":"), the for x in L #<== L doesn't exist! causes issues since I have no name for the array returned by line.split(":") So I'm curious if there is a sexy piece of syntax I could use to accomplish this in one shot? Cheers!

    Read the article

  • Can we use Facelets in JSF1.1_02?

    - by ramkarthik12
    Can we use Facelets in JSF1.1_02?If we can please send me some piece of code relating to that?Can anyone tell me which version of tomcat will support Sun RI1.1_02?I have a restriction of jsf1.1 in my project so if anyone know the thing related to this please share with me!!!!

    Read the article

  • Correct use of boost lambda

    - by Niels P.
    Consider the following piece of C++0x code: a_signal.connect([](int i) { if(boost::any_cast<std::string>(_buffer[i]) == "foo") { base_class<>* an_object = new derived_class(); an_object->a_method(_buffer[i]); }}); How would it correctly look in Boost Lambda (since this C++0x feature can't be used yet)?

    Read the article

  • Generating thumbnails using jquery or javascript

    - by Hulk
    All, Can any 1 of you show a small piece of code for generating a thumbnail of any website using javascript or jquery, I had posted earlier but couldnt find any right match for my requirements. <div id="generate_thumbnail" onclick ="generate();"> //Show thumbnail within this div </div> <Script> function generate() { // generate small thumbnail }

    Read the article

  • mysql syntax error for timestamp

    - by eyecreate
    I have this piece of SQL that is being fed to Mysql. CREATE TABLE pn_history( member INT, action INT, with INT, timestamp DATETIME, details VARCHAR(256) ) But is comes back as an error about the syntax. #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'with INT, timestamp DATETIME, details VARCHAR(256) )' at line 4 Why is this failing?

    Read the article

  • How to create a level with curved lines with cocos2d + Box2d on the iphone?

    - by Steven
    I'd like to create a game that has levels such as this: http://img169.imageshack.us/img169/7294/picdq.png The Player moves "flies" through the level and mustn't collide with the walls. How can I create such levels? I found that piece of software: http://www.sapusmedia.com/levelsvg/ It's not that cheap, so I wonder whether there is another way to create such a level as shown in the picture above...?

    Read the article

  • how to print the linenumber of incorrectwords located in a txt file ?

    - by jad
    i have this piece of code which only prints the line number of the incorrect words. i want it to print the linenumbers of the incorrect words from the txt file. Am i able to modify this code to do that? # text1 is my incorrect words # words is my text file where my incorrect word are in from collections import defaultdict d = defaultdict(list) for lineno, word in enumerate(text1): d[word].append(lineno) print(d)

    Read the article

  • Is web-browser to Excel interprocess communication possible

    - by Abiel
    Is is possible to write a browser plugin (one that requires the user to install something is OK) that would allow interprocess communication between the browser and a running instance of Excel (on Windows)? For example, suppose I want the user to be able to click something within their browser, and then have a piece of text drop into the selected cell in Excel as a result. This is certainly possible to do with a regular desktop application and Excel, but I'm not sure if it is possible with a browser, for security reasons.

    Read the article

  • Webcam capture with c# and convert to avi

    - by Spidfire
    Im trying to make a program that captures a video from the webcam and sound from the microphone but im getting stuck at the part where ive try to make a movie out of still images ive heard you need to use directshow but it doesnt jet work for me Does someone know a good piece of example code that captures video and sound and can encode it to a file (divx or something like that) ? or some suggestions where to look so i can build it myself (if a other programming language is better for this im happy to know it early. )

    Read the article

  • Database structure for versioning and multiple languages

    - by phobia
    How can I solve the issue of content existing in multiple versions and multiple languages? My current structure: Each content can only have one active version in each language, and that's how I'm curious on how to best solve. Right now I have a column of the contentversions table, which means for each change of active version I have to run a update and set active=false on all version and then a update to set active=true for the piece of content in question.

    Read the article

  • change a frame's attribute by pressing a button

    - by asavu
    Hi. Suppose we have a JFrame named frame1 with a String attribute named credentials set inittially to null. I have a jButton named button1 attached to the frame and I want to change the frame1 String credentials attribute by pressing button1. I need some piece of advice regarding the ActionListener code especially. Could you guys pls help me? Thank you.

    Read the article

  • debuging native code (C++) using gdb on android with Eclipse. Is it possible?

    - by noisy
    Hi, I have some piece of code which uses JNI. I can debug code wrote in Java directly in Eclipse (using ADT). I even have a script, which help me debug native code with gdb. However this is not very comfortable way for doing this. Is it possible to configure Eclipse to use gdb (I guess gdbserver) for debbuging android native applications? Do you know where I could find any description of this?

    Read the article

  • Where is the action listener registered?

    - by Summer_More_More_Tea
    Hi there: I come across this problem when referring a piece of javascript code: <a href="javascript:void(0);"><!-- other html elements --></a> It want to register a mouse click event listener on this anchor, but I cannot find which function is registered. What's more, what does the code href="javascript:void(0);" mean? Thanks in advance!

    Read the article

  • Maven - Eclipse does not see dependencies

    - by Matt
    I have a project in eclipse, that is unable to see maven dependencies. What is odd is when I build from the command line the build completes fine. They are both pointed at the same repository. I would think that it is something with maven or project configuration but I have been through every piece with no success. I would appreciate any help on this one. ps using m2eclipse

    Read the article

  • Library to parse C/C++ source code

    - by John
    Which library should I use to parse C/C++ source code file? I need to parse source file, calculate how much useful strings inside, how much 'for' blocks, 'if' blocks, how much comments inside. I also may need to insert a comment or small piece of code after each 'for' block. Is there any libraries? May be any library included in Microsoft Visual Studio?

    Read the article

< Previous Page | 33 34 35 36 37 38 39 40 41 42 43 44  | Next Page >