32,199 Topics
| |
hi...... i am working on network Monitoring project.[I] am facing lot of problems in 1)getting the api's (functions) for particular feature.. where can i get those api's for my project.... 2)I am trying SNMP api to work on the project which is in package src,com,sun,jmx,snmp but when i try to … | |
Hey lads. Doing a while loop question but am having a little difficulty with this question. I thought i knew enough to get questions like this correct but unfortunately not experienced enough. The following code is attempting to get sum of values in array that are less than 10. When … | |
Im writing the demo for my class to demonstrate each method. The class takes a number and assigns it to a month, or is supposed to. I have it working to say month 1 is January, month 2 is February and so on. I want to user to enter a … | |
Hi, Im currently in a situation to get all the application name that is currently running in windows but i can get only the processes that is currently running using the following code Process p = Runtime.getRuntime().exec("tasklist.exe /v "); Can anyone help me out in getting the application name... Thanks … | |
Hi, My requirement is to covert the .DOC file to .PDF with the [B]proper formating [/B] using java or in Web Dynpro Java. I have already tried to POI to reading the doc and iTEXT for converting to PDF but the problem is this scenario doesnot maintain any formating :(, … | |
hi, i have some problem with my project, can u help me??? I google but no solution found...:( I used hibernate, strust 2 and spring to manage transaction. I want to try catch username in New.java, username is a PK, this pape throw can throw excetption error but the server … | |
Hi My program is trying to load properties but it is saying it can not read a line of it. Does anyone have an idea why not? [code] dbProperties.load(dbPropInputStreasm); [/code] but error [code] Exception in thread "main" java.lang.NullPointerException at java.util.Properties$LineReader.readLine(Properties.java:418) at java.util.Properties.load0(Properties.java:337) at java.util.Properties.load(Properties.java:325) error here -------> at model.dao.DerbyDAO.loadDBProperties(DerbyDAO.java:160) at … | |
import java.awt.*; import java.awt.event.*; import java.text.*; import javax.swing.*; import javax.swing.border.*; import java.util.Arrays; import java.io.*; public class BankAccount extends JFrame { // Make these variables publicly available String file = ("THUS.txt"); public static String acctNumber ; public static String custid , acctDateOpened; public static double balance ; private static final String … | |
[CODE] String test = "for (int i = 55; i < 60; i++)"; String line = ""; String replace = " Tester." + "n" + Tester.counter + ";"; Pattern p = Pattern.compile(reg); Matcher m = p.matcher(test); if (m.find()) { String s = "public static double n" + counter + " … | |
ok, so i have this [B]so far [/B] [CODE] String p = "(http|ftp|https):" + // sees if the proto is any of these " (\\:[\\w^\\:]+:)? " + // gets the sub-proto " \\/\\/" + // the two forward slashes "([\\w*.]+)" + // gets the subdomain(s), domain and tld "[\\:\\w*^"; [/CODE] … | |
Hi experts, I have done a very simple snake game but there are some error.. I would like to make it continue with 3 lifes before game over but I fail. Did any1 can help?? Here is the code: import java.awt.*; import java.awt.event.*; import java.applet.*; import javax.swing.*; import javax.swing.JOptionPane; import … | |
I am working on this programming probability assignment for class and I am having trouble figuring out how to work this problem below. 1.) Design and write a computer-based simulation to find an empirical probability for landing on GO TO JAIL/Boardwalk. | |
Hi guys, I'm trying to count the comparisons in the mergesort algorithm so that I can compare it to other sorting algorithms. I've managed to get a count to work for insertsort but mergesort is being a complete pain! It's probably a very simple problem but I've experimented around with … | |
Hi guys, I'm trying to count and time the comparisons in the mergesort algorithm so that I can compare it to other sorting algorithms. I've managed to get a count and stopwatch function to work for insertsort but mergesort is being a complete pain! It's probably a very simple problem … | |
Here is an example of the return statement in question: [CODE]public boolean either24(int[] nums) { boolean n1 = false; boolean n2 = false; for (int i=0;i<nums.length-1;i++) if (nums[i]==2 && nums[i+1]==2) n1 = true; else if (nums[i]==4 && nums[i+1]==4) n2 = true; return !n1 && n2 || n1 && !n2; //<----what … | |
The board game scrabble works by assigning points to wooden tiles arranged in cells on a board. It's described here:[url]http://en.wikipedia.org/wiki/Scrabble[/url]. We'll simplify this considerably, and consider the following question. We begin with the letter-scoring scheme from Scrabble: a = 1, b = 3, c = 3, d = 2, ..., … | |
Hi, I am trying to do an assignment about buying zoo tickets but I am becoming stuck on the last hurdle when trying to get the accumulate number. [CODE]import java.util.Scanner; public class ZooTaking { public static void main(String[] args) { // Create a Scanner Scanner input = new Scanner(System.in); // … | |
I have a difficult time with getting the programs started. I read the book but I am not getting anywhere. There just is not enough examples to help me. The book we are using for CSC 135 is called Java Software Solutions by Lewis & Loftus. We are starting on … | |
Is it a good programming practice to pass List as a parameter in a Constructor? Just learning.... Thank you .. | |
Hi everyone, I've written a small program to convert combinations of English characters into their corresponding Chinese and Japanese equivalents, and it's working on my computer at home, so so far so good. However, I'd also like it to work on computers which don't have Chinese or Japanese fonts installed, … | |
Code to Execute an SQL Script in JDBC. The SQL Script should have comments starting with - or -- only on new lines and each command should end with a ; . Reading a sql file and putting all of it in a string variable and feeding to the execute … | |
I've not programmed extensively, and I've got to create a program that's beyond my knowledge. I'm trying to create a program that will help me measure the amount of memory a certain IP routing algorithm will use to store address prefixes. The program must convert each dotted decimal address to … | |
just wondering if anyone could explain this... [code] if(loginF.equals("root") && passwordF.equals("root"))[COLOR="Red"]; [/COLOR] ---> if this semicolon is here, my program works.. but i can't have an else statement if i take out this semicolon, the code within the if statement don't execute.. but i can then have an else statement … | |
I am tring to draw a house & street & garden but i stop....? could plz someone help me and complete my job this is my code import java.awt.*; import javax.swing.*; public class Zzzzzzzzzzzzzz extends JApplet { public void paint(Graphics a) { house(a); door(a); roof(a); rode(a); } void house(Graphics b){ … | |
Hi all, I am a beginner in java.I have written a code to design a layout of a traffic signal.The lights are working fine.The problem i am facing is to randomly generate cars from all directions and to stop them at the junction.I am not understanding how to use repaint.Here … | |
Hi everyone, I have a single string - let's call it string A. I have an ArrayList of objects. Each object contains three strings. I want to iterate through the ArrayList of objects and check if any of the strings contained within the objects are the same as string A. … | |
hi i use log4j for logging i want the file that logs append to it , in every day be separated .for example my logs for today input in 2010-04-20.log and tomorrow in 2010-04-21.log file!! or any way that i can understand that this log file related today and that … | |
how can one determine whether a given string can be expressed as a concatenation of palindromes of even length. | |
I Have this problem and honestly have no idea where or how to start this, can anyone give me an idea or help? [QUOTE]Write a JavaScript program to calculate the statistics of words in a web page. When running the program in a web page, the script should output all … | |
So I have my documentbuilder and I'm doing this the DOM way. I've managed to get to the point where I have saved the tag I want into a nodelist NodeList list = doc.getElementsByTagName("myTag"); the xml looks like this <myTag id="1"/> but now I want to grab the id number … |
The End.