32,204 Topics

Member Avatar for
Member Avatar for Linda_6

Hello everyobody, I'm trying to do a presentation of MD5 algorithm in my class. I would like to give an example of md5 hash in every programming language. I found a useful website like http://md5-sha.com/ a with examples in all other languages, but i still want to present Java too …

Member Avatar for Linda_6
0
104
Member Avatar for Ong_1

package admin.entity; import java.util.Random; public final class PasswordGenerator { // DATAS // characters with which the password will be composed private static final int charactersSize = 100; private static char [] characters = new char [charactersSize]; // keep the counts of used characters private static int charactersCount = 0; // …

Member Avatar for stultuske
0
219
Member Avatar for Zac_3

I got the program to run, but the output is not the way it should be and I don't know where I went wrong. The output is supposed to look like this: Sample Input 6 8 7 3 8 3 8 Sample Output - - - - - - - …

Member Avatar for JamesCherrill
0
216
Member Avatar for Belfina

Hello there! I've got the following assignment: Write a method in Java called FirstDNAMatch(shortDNA, longDNA) that receives 2 strings with the letters that have to do with the four main nucleobases found in the nucleic acids DNA (A for Adenosine, G for Guanine, C for Cytosine and T for Thymine). …

Member Avatar for Belfina
0
900
Member Avatar for Mar. Na.

Hi,i want to use this ClassParser to parse another file(class) in another package , in my code i used ClassParser to parse only existing file (class) in existing package ,,,how can i use it to parse any file and from any package ,if i can't use it ,is there any …

0
278
Member Avatar for Centorpe

Why can't I use || or && with double as in sample below? if (((mDiameter = 1 || mDiameter = 1.2) && mPitch = 0.25) || (mDiameter = 1.6 && mPitch = 0.35) || (mDiameter = 2 && mPitch = 0.4) || (mDiameter = 2.5 && mPitch = 0.45) || …

Member Avatar for Centorpe
0
218
Member Avatar for C Newbie

Hi all, I'm currently developing an Android application with Android Studio that allows visitors to enter information such as their name, company and reason for visiting our work premises and have this information stored in a SQL database. The app would have to allow for the printing of this information …

Member Avatar for rproffitt
0
556
Member Avatar for Jamie_10

Design a java program that generates 100 random numbers, and keeps a count of how many of those random numbers are even and how many are odd. This is what I have and it is not suppose to be an array just simple coding with a boolean. import java.util.Random; public …

Member Avatar for Sean Francis
0
302
Member Avatar for JamesCherrill

I'm looking for an algorithm, pseudocode or any langauge, to generate random numbers with the following characteristics: integer values in the range 0-n lower values much more likely to happen than higher values, eg prob of 0 is n/(n(n-1)), prob of n is 1/(n(n-1)) - linear relationship between value and …

Member Avatar for invisal
1
664
Member Avatar for jjones0150

I keep getting this error: " Exception in thread "main" java.lang.ClassCastException: java.util.Collections$EmptySet cannot be cast to java.util.List at JayJuan.InventoryManager.getProductList(InventoryManager.java:15) at JayJuan.InventoryManager.addProduct(InventoryManager.java:48) at JayJuan.InventoryApp.main(InventoryApp.java:35) C:\Users\JonesJ58\AppData\Local\NetBeans\Cache\8.1\executor-snippets\run.xml:53: Java returned: 1 " Based off this error and the code I provided please help me figure out how to get this program to run correctly. …

Member Avatar for JamesCherrill
0
496
Member Avatar for jjones0150

I have the code for my InventoryManager class, my Product class, and my InventoryApp class . Based off this code, I need someone help me correctly call the methods I already have in place. There is a section where the method is supposed to be called and I have made …

Member Avatar for jjones0150
0
251
Member Avatar for strRusty_gal

Hi all, Thanks for viewing this thread. I would like to do a remote debugging of WAR file that contain one Java servlet. Anyone tried that before? I tried to use cmd with the following command: java -Xdebug -Xrunjdwp:transport=dt_socket,address=8001,server=y,suspend=y -classpath "TestingServlet.war" MyServletName Not sure if the command above is correct, …

0
141
Member Avatar for eny321

I am trying to write an elevator test program in java. It is suppose to execute the following steps using the methods in the class: 1: Starting from the first-floor. 2: Go to 2nd (update bool GoingUp) 3: Go to 3rd 4: Back to second floor This is what I …

Member Avatar for stultuske
0
4K
Member Avatar for Zack_4
Member Avatar for dyingatmidnight

I'm really having a hard time understanding this stuff and all the examples I find online just aren't starting from a place that makes sense to me. I missed my lab last week and the prof suggested those of us who missed it should go through the lab anyway because …

0
154
Member Avatar for Mar. Na.

Hi, how can I get inherited classes in java api , after parsing class .. For example: Public class h extends C ..... and C extends B and B extends A.....andso on... How can I get these inheritance classes (A, B, C), I parsing class h using api parser: JavaClass …

0
104
Member Avatar for newprogrammer14

First let me confess that I'm a beginner with little knowledge of Java. I'm facing a problem with XML to JSON conversion. The XML that I need to covert is complex with elements that will repeat throughout the document. And the order in which the elements appear need to be …

Member Avatar for milil
0
2K
Member Avatar for OsaMasw

Hello guys am totally new to java development but I red some tutorial on web on how to create different application on Android Studio. I've created simple webview application with navigation drawer and everything work perfect, when I tried to add Parse.com SDK to use notification service my program crashes …

Member Avatar for OsaMasw
0
639
Member Avatar for Kakumani

HI EVERYONE!!In applets how to take coordinates as input given by user.Also we dont know number of coordinates user enters .In simple,how to take several points as input and present them on a graph as output??

Member Avatar for rproffitt
0
133
Member Avatar for altjen

hi, I am having a problem with adding button on jTable for each data I get from the database. here is what I get from database in SQLite try{ String sql = "select ClassName as 'Class Name', NumberOfStudents as 'Number of Students' from ClassRooms"; pst=conn.prepareStatement(sql); rs=pst.executeQuery(); Data_Table1.setModel(DbUtils.resultSetToTableModel(rs)); if(rs.next){ //code to …

Member Avatar for mKorbel
0
8K
Member Avatar for can-mohan

Hi, Guys i just wanted to know whether set store elements in specific order or it contains unordered elements only. As per c++ specification http://www.cplusplus.com/reference/set/set/?kw=set Sets are containers that store unique elements following a specific order. As per my knowledge they are not ordered in the sense that you can't …

Member Avatar for JamesCherrill
0
301
Member Avatar for divinity02

hi everyone i havent been here in a long while since i have been here anyway, i am doing a program(practicing) but i dont or cant say if it is my calculation is off everything is working properly except for the the income tax part. it is outputting zero. tell …

Member Avatar for divinity02
0
254
Member Avatar for princessxeira
Member Avatar for NONONO123

I'm currently working on an android app to fetch data from the server. But when i run it, i get a NullPointerException. Can anyone help me with that? Here is my code: public class MainActivity extends AppCompatActivity { ListView lvPost; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); lvPost = …

Member Avatar for NONONO123
0
3K
Member Avatar for vilastadoori

Dear Listers, I have create a project in java using netbeans. Have designed the user interface where I have a jtable and a button. When i created the interface it automatically populated the code and I have done nothing When i click the button it shoiuld call the class to …

Member Avatar for vilastadoori
0
1K
Member Avatar for prashant_savadi

Hi all, In my Java program I am launching batch script(.bat file). I am facing following error: FATAL: command execution failed java.io.IOException: Cannot run program "cmd" (in directory "C:\..\Project_Name"): CreateProcess error=87, The parameter is incorrect at java.lang.ProcessBuilder.start(Unknown Source) at hudson.Proc$LocalProc.<init>(Proc.java:244) at hudson.Proc$LocalProc.<init>(Proc.java:216) at hudson.Launcher$LocalLauncher.launch(Launcher.java:815) at hudson.Launcher$ProcStarter.start(Launcher.java:381) at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1148) at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1113) …

Member Avatar for JamesCherrill
0
1K
Member Avatar for JaJavaBuddy

Hi, I need to complete this assignment. Everything seems to work except I need to output "T" and "H" along the dashed lines (respectively) everytime either the Tortoise or the Hare moves. Here is my code, thank you in advance. import javax.swing.JOptionPane; public class Tort { public static void main(String[] …

Member Avatar for raeee
0
2K
Member Avatar for amit_33

Hi guys OK i have been working on a map soultion in android. I use google places. I have the correct APi key. The place api works well and its good. When i send th coordinates to the map they show on the map but the map only shows grids. …

Member Avatar for peter_budo
0
135
Member Avatar for Mar. Na.

Hi, in this code how can I calculate coupling between objects CBO in java after parsing java file using registerCoupling method and retrieve any coupling between classes through argument, class name,type and so on .....

Member Avatar for rproffitt
0
2K
Member Avatar for Thea1950

Hi all, Can someone please define what a build and release engineer is in a brief summary. I've googled this but still have no idea what the person in this industry would do. **A**: What is a build and release engineer. **B**: What is a build and release engineer expected …

Member Avatar for rubberman
0
96

The End.