32,199 Topics

Member Avatar for
Member Avatar for dhanh90

I have this code: [CODE]/* package lab; public class Main { public static void main(String[] args) { int t=0; int h=0; int w=0; String Name="http://hcmiu.edu.vn/mail/cuem"; char[] ch=new char[Name.length()]; for(int i=0;i<Name.length();i++){ ch[i]=Name.charAt(i); for(int j=0;j<Name.length();j++){ if((ch[j]=='/')&&(ch[j+1]=='/')&&(Character.isLetter(ch[j+2]))){ t=j+2; System.out.println(t); h=Name.indexOf('/', j+3); } } } System.out.println(Name.subSequence(t, h)); } } [/CODE] This code run correctly.But …

Member Avatar for dhanh90
0
163
Member Avatar for gibson.nathan

this is my first program using more than one method. while i like it because of its modularity and cleanness, i despise it for its multiple new problems it introduces into my world where i was just getting the hang of the old style. i am supposed to be doing …

Member Avatar for ieshoes
0
189
Member Avatar for GooeyG

[B]Here is the problem:[/B]There are (at least) two ways in which you can make a 12 hour clock. One possibility is to just store hour values from 1 to 12. On the other hand, you can just leave the clock to work internally as a 24 hour clock, but change …

Member Avatar for darkagn
0
468
Member Avatar for intet

the final test given to me by our professor is that display a JTable with 5 names in it no nid to input

Member Avatar for darkagn
0
35
Member Avatar for jen140

Hello all. I have a small problem, i need to recieve a 8 digit number for example: 12345678 87654321 and so on. After i need to devide the value and use the int as a array, something like int i=123; System.out.println(i[1]); It should return 2 (therocially), but obviously the doesnt …

Member Avatar for jen140
0
402
Member Avatar for Alex_is

write a program which asks the user how many days they will be working. then using your program calculate and print the amount of money they will earn if paid £1 for day 1, £3 for day 2, £9 for day 3 etc.....i have coded the inputing of name and …

Member Avatar for BestJewSinceJC
0
89
Member Avatar for senthil12345

[code] import com.sun.crypto.provider.RSACipher; import java.util.Random; public class RandomRange { static int START = 1; static int END; static Random random = new Random(); private static void showRandomInteger(int aStart, int aEnd, Random aRandom){ if ( aStart > aEnd ) { throw new IllegalArgumentException("Start cannot exceed End."); } //get the range, casting …

Member Avatar for BestJewSinceJC
0
127
Member Avatar for kekkaishi

Hi, ive been trying to assign a value to a variable from within the ActionPerformed method, but the value seems to be lost as soon as ActionPerformed method ends. here's the code [CODE] public class Log{ private JTextField user = new JTextField(10); private JPasswordField pass = new JPasswordField(10); private int …

Member Avatar for kekkaishi
0
1K
Member Avatar for GooeyG

[B]Here is the problem[/B]:Change the clock from a 24 hour clock to a 12 hour clock. Be careful: this is not as easy as it might at first seem. In a 12 hour clock the hours after midnight and after noon are not shown as 00:30, but as 12:30. Thus …

0
63
Member Avatar for eggmatters

Hello all, I am writing a java application where I have a Jtable with checkboxes next to the data. If the user checks a box, I want to store a specific value from the data table. I can do this inelegantly by setting setCellSelectionEnabled(true) and adding the following to the …

Member Avatar for eggmatters
0
139
Member Avatar for llemes4011

Hello. I'm trying to write a program that registers Mouse Clicks that occur on the System, not just in a JFrame. Does java6's desktop integration allow this sort of thing? or would I have to use JNI to listen for Mouse clicks and Key Pressed?

0
68
Member Avatar for ahmed_2003

The code will be able to detect the face from webcame then determine weather it's in any situation relay under sad,happy ,...etc then play music file according to the situation.[code]Hello every body,I'm doing Project on Face detection situation,weather if it indicate happy ,sad....etc situation.So the problem is there is many …

Member Avatar for BestJewSinceJC
-3
66
Member Avatar for trojanGirl

hi all, i am in an urgent requirement of getting the WAN ip of the visitors of my website through java. using getRemoteHost() gives me the lan ip. please respond

0
61
Member Avatar for ki72

if and if-else statement: you will have to write a program that reads a 4-digit positive integer from the user and prints out the following information on the screen: 1. Whether the positive integer is an odd or even number 2. (display) The odd digits of the integer 3. (display) …

Member Avatar for freesoft_2000
0
98
Member Avatar for ITleb

Hi, I have to develop a software and it should run on windows, mac and linux, so i was thinking of developing it in java using netbeans :-/ I have windows OS, would the jar file generated in windows run properly on mac and linux? and is there any specific …

Member Avatar for BestJewSinceJC
0
228
Member Avatar for whoadiz

Hey there everyone, first post here so please excuse any mistakes :) Ok so I have this assignment here: Suppose the weekly hours for all employees are stored in a two dimensional array. Each row records an employee's seven-day works hours with seven columns. For example, the following array stores …

Member Avatar for BestJewSinceJC
0
257
Member Avatar for habibur

Hi all, I have a C program namely NetLibExample.c.I have compiled it to get a NetLibexample executable in RHEL5. It is successfully running from the terminal itself by the syntax: ./NetLibExample I have written a shell script to call the same.The shell script is test.sh **test.sh** cd /working/AVClient mkdir habib_test …

Member Avatar for freesoft_2000
0
263
Member Avatar for Xessa

I want to write this. [b]Last[/b] night i dreamt of [b]San Pedro[/b]. How can I write this with 1 PdfPCell

Member Avatar for quuba
0
107
Member Avatar for sbmahire

hi friend i wish to store mp3 files in postgresql database i want to store this for my project i am using java as front end and mp3 files as backend

Member Avatar for quuba
0
31
Member Avatar for akshaymirji

I have used org.apache.commons.httpclient.HttpClient for the first one and org.apache.http.impl.client.DefaultHttpClient for the second. for both codes i'm getting response codes 200 ok. it is happening even when i remove username n pwd fields. So i'm not logging in...[code]1) HttpClient client = new HttpClient(); GetMethod get = new GetMethod("https://control.akamai.com"); System.out.println(client.executeMethod(get)); System.out.println("now …

-2
65
Member Avatar for shashikant.v

hi. i want to call a new frame on clicking on treeview . pls help. thanks

Member Avatar for quuba
0
63
Member Avatar for The Photographe

I am having some problems with (a)coloring my stick figer(b)to stabelise the line on which the stick fig is supposed to be running across the Applet on. Can some one please advise me on how to achive this? Thanking you in advance. [CODE] //Walking //Written By: //Written on: import java.applet.*; …

0
74
Member Avatar for Xessa

Hello I have a csv file and i want to read data from it and pass the data to the database. Now. I have values that are seperated with semicolons. The file is like this. customerID;name;surname;phoneNumber 1;Gokhan;Terzioglu;333444333 2;Melih;Terzioglu;555444333 There are 100.000 columns like this. How can I read the data …

Member Avatar for parry_kulk
0
105
Member Avatar for santhanalakshmi

Hi, This is my perl program.......... [CODE]#!c:/perl/bin/perl use CGI qw(:all); $pfaccode=param('faccode'); $pprogramme=param('programme'); $pdeptcode=param('deptcode'); $pbrancode=param('brancode'); $psemester=param('semester'); $pkook = cookie(-name=>'logtime'); print "Content-type: text/html\n\n"; print "<body bgcolor=\"#ffcccc\">"; use DBI; my $dbh = DBI->connect("DBI:ODBC:wwwdsn","webid","dibew") or die "Cant connect: $DBI::errstr\n"; my $sth = $dbh->prepare("select kid from facltmst where faccode = ?") or die "Can not …

0
69
Member Avatar for gauravagg2

HI Friends i am preparing for scjp 6 and i have started studying kathy sierra plz tell me that what more should i study and how should i study to crack scjp 6 plz reply with ur suggestion and experience...

Member Avatar for peter_budo
0
162
Member Avatar for dhanh90

why the do-while couldnt return the main body when i did once.when I input n<2 and press enter, it stops and turns to error. i dont know why?could i any one told me why and how to change it and is there another code to do this loop( instead do-while).thanks …

Member Avatar for javaAddict
0
171
Member Avatar for xonxon

[code] import java.util.*; public class course { static Scanner sc=new Scanner(System.in); public static void main(String[]args) { String name,students,addStudent; int numberOfStudents; String courseName,getName,getStudents; int getnumberOfStudents; Course course1=new Course("C++"); Course course2=new Course("Java"); course1.addStudent("Peter"); course1.addStudent("Brian"); course1.addStudent("Anne"); course2.addStudent("Peter"); course1.addStudent("Steve"); System.out.println("Num of student in course1:"+course1.getnumberOfStudents()); String[]students=course1.getStudents(); for (int i = 0; i < course1.getNumberOfStudents(); i++) …

Member Avatar for xonxon
0
110
Member Avatar for iamwa

HI ! GUYS WILL YOU PLEASE HELP ME IN SOLVIG A SIMPLE QUESTION RELATING TO JAVA RMI MY QUESTION IS HOW TO START RMI REGISTRY PROGRAMATICALY with out TYPING IN CMD(command prompt ) start rmiregistry ?

Member Avatar for kekkaishi
0
44
Member Avatar for El Duderino

i dont know where to put my getValidString validation when i ask the user if he wants to judge another public class JudgingApp { public static void main(String args[]) { Scanner sc= new Scanner(System.in); DecimalFormat df = new DecimalFormat("0.##");//format decimals to 2 decimal places //These variables hold the max and …

Member Avatar for kekkaishi
0
160
Member Avatar for jammercb

When the program calls the getValidString it won't display "Judge Another? (y/n)" It seems like everything should work I just can't figure it out //see if the user would like to continue choice = getValidString(sc,"Judge Another? (y/n): ", "y" , "n" ); private static String getValidString(Scanner sc, String prompt, String …

Member Avatar for El Duderino
0
126

The End.