- Upvotes Received
- 2
- Posts with Upvotes
- 2
- Upvoting Members
- 2
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
Failure at life
69 Posted Topics
Re: I [I]agree[/I] with Masijade, learning to code them by hand first is the best. I did. Then I spent a year doing other things than gui's, and didn't remember anything when I came back. Netbeans was an enormous help. | |
Re: Im too stupid to reply to that :-/ so I'll reply to the previous post: Mind games are on like Donkey Kong? Wait, did that make sense? | |
Hey guys, not sure what thread to put this in, please direct me to the correct one if this one isn't it. I'm struggling with a sub report in iReports. I have a report that selects from a MSSQL database, and uses a sub report to do a select from … | |
Re: ^ Wants to see me naked < Has seen me naked v Wants to see me naked | |
g'mornin peeps. I'm going for an interview tomorrow at a company that uses the ZEND framework. As such, I have been reading up on it, as well as MVC among other things. The question I'm asking is about the ZEND controller action. Could someone please point me to an example … | |
Re: [QUOTE=pentagenius;47131]Thanks all! I have found and fixed the problem. Regards.[/QUOTE] Could you please explain what the problem was? I'm having trouble with the exact same problem. | |
Hi all, I'm not sure if this is the right place to post this, please let me know if I should put it somewhere else. From my program, I call the following command: [CODE]cmd.exe /C "C:\jboss\server\default\deploy\xPression.ear\BatchRunner.bat" -j "FC" -q "C:\MultiThreader\override\FC Investment.XML.xml"[/CODE] However, I get the following error: [CODE]The filename, directory … | |
Hi Daniweb. I've been working on a project for quite a while, and posted many problems that I encountered on Daniweb. Thank you to all the users who helped me. Every single one of those problems where solved in less than 24 hours after posting on here. My project mostly … | |
Hi Daniweb. I just read the other threads on regex and couldn't find the help I am looking for. The problem is simple. I have a bunch of settings in a .xml file which I read into my program. One of the settings is '*.txt', which is used for regex … | |
Hi Daniweb. I'm using a file mask (eg '*.txt') to filter filenames in a program that I'm writing. It gets the file mask from an .xml settings file. Currently the mask is '*.xml', and the code I'm using to filter this is like this: [CODE]Pattern.matches(fileMask, fileName);[/CODE] The exception that is … | |
Okay, this puzzle the hell out of me. I've got 2 different sets of code, one which works, one which doesn't. They are both very similar, and I can't see what is causing the problem. Code that works: [CODE] public static void main(String[] args) { PropertyConfigurator.configure("log4j.properties"); new Settings().globalSettings(args[0]); logger.info("Read settings … | |
I need to use log4j and I have already imported the .jar, and added the necessary code to my project. I get the following warnings when trying to run my program: log4j:WARN No appenders could be found for logger (multithreadsprocessor20.MultiThreader). log4j:WARN Please initialize the log4j system properly. log4j:WARN See [url]http://logging.apache.org/log4j/1.2/faq.html#noconfig[/url] … | |
[CODE]try { File realFile = new File(file); boolean rename = realFile.renameTo(new File("C:\\Dummy Files 2\\" + file)); if (rename) { System.out.println(file + " was moved succesfully"); boolean delete = realFile.delete(); if (delete) { System.out.println(realFile.getAbsolutePath() + " was deleted"); } else { System.out.println(realFile.getAbsolutePath() + " could not be deleted"); } } else … | |
I'm trying to move a file to a different directory using .renameTo() This isn't working, as the file is still in the original dir after the code has completed, and there is a copy of the file in the target directory. I tried deleting the original file, which doesn't work. … | |
Would Java be able to .rename() a file while it is still being written, or will it detect that the file is in use? Also, is it possible to open a file for exclusive access in Java, and will this fail if the file is still being written? Thanks. | |
I have a GUI with a table on it with only 1 column(more will be added later). The Gui gets an arraylist that has to be iterated through and then each value has to be inserted into the table. Whatever I try, I can't get the GUI to set the … | |
I'm making some sort of mistake in the following code: [CODE]use xPress_CR select * from (SELECT * FROM dbo.T_JOBS WHERE ENDDATEANDTIME = null UNION SELECT * FROM dbo.T_JOBS WHERE STATUS = 'Failed')[/CODE] Any idea what I'm doing wrong? | |
I'd like to improve my Java knowledge. The job I'm in right now isn't really teaching me anything new. What would be the best way for me to become a better programmer? | |
I have a client and a server - the client sends the server a message, and depending on what message is sent, the server will perform an action and then reply to the client. Most of the actions that I have implemented are working. I need help with one of … | |
Is it possible to have a client/server service that doesn't use sockets? | |
Okay, so I'm having problems with my code. I've browsed Daniweb and couldn't find any solutions on here that work. I'm extracting 2 sets of texts from a .xml file. The first part is a directory name(eg. "C:\work\") and the second part is the name of a file in that … | |
I wrote a program that has to process any files that are put in a specified folder. I would like to keep track of those threads, though, preferably via some sort of process id or something. is there any way that I can get a list of the threads that … | |
Re: piano foil pain [B]renaissance[/B] | |
I've written the code already, and it compiles, but gets the following runtime exception: [COLOR="Red"]java.lang.IllegalThreadStateException at java.lang.Thread.start(Thread.java:595) at threads.ThreadStarter.run(ThreadStarter.java:52) at java.lang.Thread.run(Thread.java:619)[/COLOR] I've higlighted the line that throws the exception. I have no idea what's wrong, my knowledge in threads is sadly lacking. If anyone could help me out it would … | |
Ok, so I wrote a very simple programme, just to practice multithreading. I know it can be coded better, but I'm still learning about this, so please be lenient. This is my code so far: [CODE]package threads; // Create a thread import java.io.File; class threads implements Runnable { // This … | |
Re: Ever wonder why people play these games, even though they have important work to do , and are only here to get/give advice?! | |
Re: Who can say "Don't like it" to slide? Like it! Jiu Jitsu | |
Re: Another possbiel way is to use an [i]arrylist[/i]. This is an array who's size does not have to be declared when it is created. You should have 2 int vars: one that stores the smallest int, the other that stores the position of that int in the arraylist. Every time … | |
I want to remove the JOB node with JOBNAME "One" from the following file: <SETTINGS> <SYSTEM> <VERSION>3.1<VERSION> </SYSTEM> <JOB> <JOBNAME>One</JOBNAME> </JOB> <JOB> <JOBNAME>Two</JOBNAME> </JOB> </SETTING> The code that is supposed to remove it looks like this: [CODE]try { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder docBuilder = factory.newDocumentBuilder(); Document doc = docBuilder.parse(new … | |
I need help with jFilechooser. I've already made the jFilechooser. The problem is that I want to change the text of the "save" butten to "Ok", as I need it to perform a save function, as well as a read function, on different occasions. Changing the code where the jFilechooser … | |
I'm reading a whole xml file in as a string. Some of the Node values are directories, e.g. "C:\" When I print out the string, to make sure that the file has been read in correctly, I see that it has completely ignored the Nodes that have directories in them. … | |
I made a program that edits the contents of a XML file. It works fine, but when there are newline characters between the nodes, the program doesn't handle them correctly. It looks like it's handling the newline as if it's a node as well. The problem is that put all … | |
The code I'm using to change XML content isn't working... Does anyone have any idea what I'm doig wrong: [CODE]package domtest; /* public class Main { public static void main(String args[]) throws Exception { DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); DOMBuilder domBuilder = new DOMBuilder(); Document jdomDoc = domBuilder.build(builder.parse(new File("src/home/projects/misc/Test.xml"))); Iterator iter … | |
I had a couple of posts on getting this thing to work. I finally got a small test program working, but now this, the actuall program, doesn't. I don't understand the error either(Will include it at the end of this post). Here is my code, with the line throwing an … | |
Ok, so I have this XML file that I'm reading: [CODE]<?xml version="1.0"?> <APOLLERSETTINGS> <SYSTEM> <VERSION>3.1</VERSION> <SMTPSRV>blue</SMTPSRV> <SMTPPORT>29</SMTPPORT> <SMTPUSR>Me</SMTPUSR> <SMTPPSW>Password</SMTPPSW> <EMAILFROM>lodewyk.duminy@gmail.com</EMAILFROM> <EMAILTO>lodewyk.duminy@gmail.com</EMAILTO> <ALTEMAILTO>lodewyk.duminy@gmail.com</ALTEMAILTO> </SYSTEM> <JOB> <JOBNAME>The Name</JOBNAME> <INPUTFOLDER>C:\</INPUTFOLDER> <FILEMASK>*.txt</FILEMASK> <PROCESSORDER></PROCESSORDER> <RETAINFOLDER>C:\</RETAINFOLDER> <OVERRIDEFOLDER>C:\</OVERRIDEFOLDER> <ERRORFOLDER>C:\</ERRORFOLDER> <POLLINTERVAL>6000</POLLINTERVAL> <JOBBATCHFILEPATH>C:\</JOBBATCHFILEPATH> <JOBBATCHPARAMS>three</JOBBATCHPARAMS> <JOBLOGPATH>C:\</JOBLOGPATH> <JOBEMAILTO>lodewyk.duminy@gmail.com</JOBEMAILTO> <JOBALTEMAILTO>lodewyk.duminy@gmail.com</JOBALTEMAILTO> </JOB> </APOLLERSETTINGS> [/CODE] This is the code that is reading the file: … | |
Hi everyone. I need help. I'm supposed to have my program edit an XML field. The user has the option to change the values in certain nodes. After the node values have been filled in, and a certain button has been clicked, the program should write the changes to the … | |
I've made a gui that has a couple of panes on a frame. Initially only one frame is visible, but as you fill in options and press buttons, the others become visible. The problem I have is that the first pane should be in the top left corner when the … | |
I made a filechooser that enables the user to save a file. I used netbean's gui maker for it. I literally have just one thing stopping me from finishing my task: The save button does not actually do anything. You can click on it, but nothing happens. How do I … | |
I am using the netbeans gui builder. I dragged a filechooser onto my frame, and it does almost everything I want it to do. How do I remove the buttons? I dont need them - the user just has to select a file, or type in a file name, the … | |
I've found this online(Can't remember where) and I thought it might be usefull to other people as well:[CODE]package org.kodejava.example.text; import java.util.List; import java.util.ArrayList; import java.util.Locale; import java.util.Collections; import java.text.Collator; public class StringShortWithCollator { public static void main(String[] args) { List<String> fruits = new ArrayList<String>(); fruits.add("Guava"); fruits.add("Banana"); fruits.add("Orange"); fruits.add("Mango"); fruits.add("Apple"); // … | |
I need to write a combination of String and Images to a file. The catch is that I have to write some String, then the Image, then more String again. Does anyone have any ideas how to do this? Should I use BufferedImage? | |
Hi, In my program, a text file is read in, and certain parts of it are written to a XML file. There are special characters(e.g. &) that need to be escaped, so I need to escape all of them. How can I manage to do this? | |
I get a ArrayIndexOutOfBoundsException. The cause is this snippet: [CODE]public static void main(String[] args) { //command line param try { [B]if (args[0] != null) {[/B] if (args[0].equals("printer")) { printToFile = false; } } } catch (Exception oob) { oob.printStackTrace(); }[/CODE] I don't give the program any parameters when I start … | |
Hi all, I've been google'ing my backside off in search of a good example/tutorial for java gui's. Could anyone supply me with a link to a website that could supply a tutorial and/or some examples? Would be great, thanks. P.S. I use Eclipse, with no GUI editors, so I need … | |
Re: I don't think just giving you the code would help you much, but try google'ing java's "reverse" function. It should give you everything you need, and help you rewrite the code you have in much less lines as well. Enjoy! [URL="http://www.java-examples.com/java-string-reverse-example"]String reversing[/URL] [URL="http://www.roseindia.net/java/beginners/reverse-alphabetical.shtml"]More reversing[/URL] | |
I have to read through a text file and replace all occurences of [CODE]%%CNT1%%[/CODE] with the value of a counter. The part of my code that does the actuall replacements looks like this: [CODE]for i in range(1, (count1 + 1)): out.writelines(re.sub("%%CNT1%%", str(i), text))[/CODE] This works fine. Now what I need … | |
Re: Also, there are many sites that have tutorials on how to make an interface(I'm assuming you mean a GUI?) Start by looking at those sites, and just make the GUI. After that, read up on how to make those buttons you put on the GUI work. I had the same … |
The End.