32,199 Topics
| |
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) || … | |
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 … | |
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 … | |
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 … | |
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. … | |
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 … | |
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, … | |
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 … | |
How to create radio button using JavaScript | |
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 … | |
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 … | |
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 … | |
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 … | |
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?? | |
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 … | |
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 … | |
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 … | |
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 = … | |
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 … | |
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) … | |
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[] … | |
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. … | |
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 ..... | |
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 … | |
Hi guys, so I'm starting with JavaFX using eclipse. I had a look at a few tutorials and the syntax seems quite different from other java projects I've done. Specifically, I'm a bit confused when it comes to add my code to the Eclipse project. I've just started very soft, … | |
The code below works ok and displays result (mDisplayNominalEff) to screen but I want to round the result to 3 places. I assume that I need to parse string to double. Any ideas on how to do this? String mDisplayNominalEff = ("" + (myDiameter - (myPitch * 0.649519))); TextView displayNominalEff … | |
I have 4 textviews which take their values from dropdown list (spinner) selected at previous screen. There can be either 2 or 4 numbers/letters as result of this selection. The first position will always be a number and the second position will always be a letter. The third position can … | |
can anyone suggest how to convert python code to java. Following is the python implementation """ K-prototypes clustering """ # Author: 'Nico de Vos' <njdevos@gmail.com> # License: MIT from collections import defaultdict import numpy as np from scipy import sparse from sklearn.utils.validation import check_array from . import kmodes def euclidean_dissim(a, … | |
Hi , this algorithm diffecult to implement and work ,how can i write code for this because ,i write code for it but isnt work completely to find CBO i.e Eff.size. Input: Any class file Output: Total coupling in the class file /*Eff is set for efferent coupling(set is java … |
The End.