35,619 Topics
![]() | |
this is java webservices code and please convert to C# webservices code, just change for me , i think you understand my probelm, and please do for me here is a code below , <div>import java.io.FileOutputStream; import java.io.PrintWriter; import java.net.HttpURLConnection; import java.util.Enumeration; import java.util.Properties; import java.util.Vector;</div> <div>import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; … | |
Hey guys! So I'm trying to create a method that takes in a list of integers into an array and prints the elements inside the array line by line. How do I print the the elements? Here's what I have so far: public class Main { /** * @param args … | |
Hello Im trying to do some basic FTP work. What I am trying to do is: 1: Search for a folder named "hi" in "C:". If hi exists, enter it. If it doesnt, create it THEN enter it. 2: Inside hi, count FILES and see if there is greater or … | |
hello i' trying to take out data from start time and end time from my database record..any idea how to solve it for example: 2012-09-08 12:09:33 roadA 2012-09-08 10:49:09 roadA 2012-09-08 10:39:27 roadC 2012-09-08 09:09:33 roadA if i select 10:39:27 to 12:09:33, then only 3 data will be display... | |
hi, i am buliding a website as my mini project. problem: when i submit registration form, if the username or email or even both already exist, I have writen the code to check if either of them exist in the database.. and that is working great.. and if the user … | |
Hi all, A problem asks me to create a point class,line class composing two points, a triangle class composing three lines.Also a right angle triangle and an equilateral triangle class both inherit triangle class.I did this. public class Point{ private int x; private int y; public Point(int x,int y){ //error … | |
Hi all, I know that Vector is synchronized, when I run the following program public class ClassA extends Thread{ static Vector<Integer > v=new Vector<Integer>(); public void run() { callMethod(); } public void callMethod() { System.out.println(v.size()); v.add(0); System.out.println(v.size()); v.remove(0); } public static void main(String[] args) { for(int i=0;i<1000;i++) { ClassA a=new … | |
Here is my code.... It is supposed to go throught this maze and can move where there are "." and blocked by "#". I keep getting an out of bounds error. Can anyone help me? import java.io.*; public class ProgramMAZE { public static char maze[][]= {{'#', '#', '#', '#', '#', … | |
Mirroring is done by copying. Suppose a Picture has H rows of Pixels and W columns of Pixels and W is an even number, like W is 2N. Here N is a the whole number that is exactly 1/2 of W. How many Pixels are copied when the Picture is … | |
Hi All, For homework I had to write a "guessing game" program, which I decided to take to another level and add on the option to add names and keep a score, etc. The problem is however, That my program will not display the text "*Player* Has Won! Congratulations!". Here … | |
Ok guys i have a few questions about implementing a gneric hash table using linear probing. Ok first, i need to make an entry class Entry<K,V> then An Entry <K,V> table array but since its gneric must initiatied elsewhere my question is how does the class entry work , from … | |
I would like thoughts/advice on the project I am working on. I am trying to build a program that simulates the score of a baseball game given individual player statistics. As of right now, the program only has one team batting for nine innings. I am a computer science student … | |
Is there any easy IDE that lets you build a easy GUI with Java? I wish you could comply native Java using VS! :P | |
I have created an awesome text-based battle game, and i want others to see it. Is there a way to put this game online, without others stealing the code, but they can play it? | |
Hi all, can someone help me find what's going wrong in my code? When the program runs and it goes to get the user input, the program does not respond with any feedback, ie I type find Susan, and it does not tell me if Susan is in my txt … | |
In this example, what's the difference between creating a class variable from the "class Employee" & creating an object from the class GenQueue ?! What's the difference in uses and implementation? import java.util.LinkedList; class GenQueue { private LinkedList list = new LinkedList(); public void enqueue(E item) { list.addLast(item); } public … | |
Hi, I am looking for a java code which will provide the automatic login with out loading the login page also.After login automatically, i want to go to next page automatically. Can anyone help please.. | |
So I am trying to make a code that will read a file that contains an unknown number of students and an unknown amount of scores for each student. Then output each students average score. I have tried several different combinations of loops and each times some problem comes up. … | |
Hi, I've used keylisteners multiple times, but I am having trouble with this situation. I want the keylistener to recognize a series of characters. For example, if 'e' is typed, I want the program to listen for 'l', then 'e', etc. (spelling "elephant", if you wanted to know). It recognizes … | |
lets say i am print a image on screen. with (x1,y1,x2,y2,sx1,xy1,sx2,sy2) g.drawImage(player_image, x, y, x+width, y+height 0, 0, 30, 20 ,Sprite_Sheet.m1); so how would i flipthis image vertically. | |
I'm taking a beginning java class and I'm trying to create a helper method to get a input from a user and combine all four methods into a package I can use in my programs after. I keep running into trouble with the last method, getMenuStringFromUser, the error it gives … | |
Hey, been awhile. I'm working on a portal for distributors, some type of JIT (just in time) implementation. Now i've been reading alot on DB so i can implement the right database and the right data structure. Now i see, i can do alot more then i'm use to do. … | |
write a program to perform polynomial operations like addition, subtraction, multiplication and evaluation of polynomial using ADT in java | |
Hello: I have the following div popup window: <div id='PopUp' style='display: none; position: absolute; height: auto; left: 13px; top: 10px; border: solid black 1px; padding: 10px; background-color: rgb(255,255,225); opacity:.95; text-align: justify; font-size: 12px; width: 70%; z-index:1200;'> <iframe id=\"mate\" frameborder=0 scrolling=yes width=100% src='client_edit/edit_client_data.php?customerid=$customerid' height=\"790\" align=\"left\"></iframe><br /> <div valign=\"top\" style='text-align: right; display: … | |
Hi all, Im having trouble with a program wheree a person starts in the middle of a 7 foot bridge. Heres the description: Someone is standing at the center of a bridge that is 7 ft bridge long. Their stride is exactly one foot. They can’t control the direction they … | |
This is my Java code at the moment (using netbeans IDE), I have tried to set th value of cell 4,4 to A in the following code, `outputCadence.getModel().setValueAt(items.A[5], 4, 4);` , however this does absolutely nothing, I'm a bit of a noob so I'm not sure if I'm missing something … | |
i am working on making a scientific calculator in netbeans using wing components and i used combo box for conversion purpose but the handler code i wrote isnt working for all conversion, it only works for the 1st item. and please help me with "action" and "item" on the right … | |
hi all, i am new to java programing... i have used jDateChooser and i want to extract just month i.e. int value of selected month or date i.e. int value of selected date from jDateChooser......? Eg. if choose date as 2012/11/07 I want all in separate like Year = 2012 … | |
<project basedir="/home/ubuntu/apache-jmeter-2.7"> <property environment="env"/> <property name="jmeter-home" location="/home/ubuntu/apache-jmeter-2.7"/> <path id="ant.jmeter.classpath"> <pathelement location="${jmeter-home}/lib/ant-jmeter-1.8.4.jar" /> </path> <taskdef name="jmeter" classname="org.programmerplanet.ant.taskdefs.jmeter.JMeterTask" classpathref="ant.jmeter.classpath" /> <target name="clean"> <delete dir="results"/> <delete file="jmeter.log"/> <mkdir dir="results/jtl"/> <mkdir dir="results/html"/> </target> <target name="test1" depends="clean" > <jmeter jmeterhome="/home/ubuntu/apache-jmeter-2.7" resultlogdir="results/jtl" testplan="/home/ubuntu/pt/********.jmx" /> <xslt in="${basedir}/results/jtl/********.jtl" out="${basedir}/results/html/*********.xml" style="${jmeter-home}/extras/jmeter-results-report_21.xsl"/> </target> </project> when i build this file its … | |
i am having a problem getting my js file to work with my html file here is my jsfile function calculateTotal () { var hours = document.getElementByName("hours")[0].value; alert(please enter a number) var payrate = document.getElementByName("payrate")[0].value; alert(please enter a number) var pay = document.getElementByName("pay")[0].value; if (hours <= 40){ pay = (hours … | |
Hi, Thanks to all in advance. I am a newbie java learner. I have to create a project on java for my final term exam. But I cant find the topic of the project. Please suggest me some good but unique project topic. note: I would not like to create … | |
I'm trying to develop a packet sniffer using java and I've been using the JpCap library to capture the packets. I've run into a problem where Jpcap is capturing the packets from the NIC on my desktop, but I need to capture the packets from the gateway (MikroTik RouterBOARD) and … | |
I've been studying C++ for two years, then started Java two months ago. My performance in C++ wasn't good at all although I study hard. I thought that the problem is in not understanding the language concepts but when I started a new language with the intention of building up … | |
the applet compiles fine(no errors) but while running when i press the accountButton(only button in the applet) i get errors, what is wrong with my applet ? thanks in advance Exception in thread "AWT-EventQueue-1" java.lang.NullPointerException at AppletMetodos.actionPerformed(AppletMetodos.java:96) at java.awt.Button.processActionEvent(Unknown Source) at java.awt.Button.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at … | |
public class hello_world { public void sample(){ System.out.println("Hello World"); } }; /*Now I can access this method using an Instance of it in my Main Class or by inheriting it.* Public Class main{ public static void main(String args[]){ hello_world sam = new hello_world(); sam.sample(); }; } /*Class using inheritance Public … | |
Hey Guys, This is my first program where I have used JLabel and JText. Im trying to create a program that will solve a simple quadratic equation. I have the program to the point where it will solve the equation, I just cant get it to display in the window. … | |
I am trying to store a file into an ArrayList and then have user input from console search for an element in the Arraylist and return found or not. It keeps giving me -1. public class arrayl { public static void main(String args[] ) throws FileNotFoundException { System.out.println("Please enter title … | |
hello i have some problem in showing button, when data exist and data not exist. i want the button show if data exist also data not exist. my current problem right now the button only show when data exist but the button automatically hide when data not exist. here what … | |
hi... When trying to start up tomcat service in xampp 1.7.7 or earlier, it may not be able to startup properly. Following are the message I noticed when trying to execute it: i am getting an error [XAMPP]: Searching JDK HOME with reg query … Error: The system was unable … | |
Create a full fledged JSP page to get the Users List from Servlet and display in to the user without using Scriptlets. Make use of EL and JSTL. | |
I'm trying to write a coding that will be able to determine if a number keyed-in is a Prime Number or not. Here's what I did: public class PrimeNumber { public static void main(String args[]) { int n; Scanner Prime = new Scanner(System.in); System.out.println(" Please enter a number: "); n … | |
I have stuck with one problem. I have created my own program that will work. In program there are two for loop. Now my problem is for(int i=0;i<q;i++) { for(int r=0;r<q;r++) { /*perform some kind of operations returns one integer value.*/ /*here q=4 so first time r loop execute 4 … | |
Is it possible to make some privileged instructions (eg sti, cli) available via some Java's API? (That is, to build a Java's library that would provide sti() and cli() as static methods) (Suppose this library is buit for a specific machine, not meant to be portable or anything) I've heard … | |
Hi! Which way is the more effective? Is there any difference? If I give value to a variable in the class public class A{ int a = 3; } or if I give value to a variable in the constructor of the class public class A{ int a; public A(){a=3;} … | |
Hi, I need help creating or manipulationg my current regex that will grab two numbers from a line, while excluding a specific number. Here is an example of what the line will look like: "In our tests, downloads on port 6881 achieved up to 12059 Kbps while downloads on port … | |
Hi guys, i am writing a GUI program that will take a tutor minutes and earings and create an average earnings. My problem is instead of it using what we type in the fields E.g 200 mins and 50 dollars earnt and displaying the average. It shows the default fields. … | |
I'm trying to do a quickSort with a Doubly LinkedList. I can partition the original list into a lower and upper sublist, but have been unsuccessful going any further. Below is the code for the class DoublyLinkedList. The methods that perform the quick sort are at the bottom (partition, recQuickSort, … | |
I have a textfield, and that only accept integer numbers. If user input charter type value it shows JOptionpane Error Message and when user click on the ok button in optionpane message the textfield clear itself public void nosgetit(DocumentEvent documentEvent){ DocumentEvent.EventType type = documentEvent.getType(); if(type.equals(DocumentEvent.EventType.CHANGE)){ } if(type.equals(DocumentEvent.EventType.INSERT)){ String ns=nos_txt.getText(); char … | |
int [10] array_int=new int [10]; array_int[0]=0; array_int[1]=1; array_int[2]=2; array_int[3]=3; array_int[4]=4; array_int[5]=5; question is: how to print in circular manner starting from the middle(index is 2) that is output : 2 3 4 5 0 1 . | |
Hi, I am just trying to do some program on arithmetic expression parsing. So i want to store my operator precedence table in the program somehow. I could use a multidimensional array, but that would be inefficient i guess. Another idea i have is to use a HashTable, where the … |
The End.