32,204 Topics
| |
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 … | |
<select id="keyEquipmentShiftAutomatedModelData" parameterType="java.util.Map" resultType="java.util.Map"> SELECT ID, SUM(VALUE1 + VALUE2) Total FROM tableName GROUP BY ID </select> Returns below result in sql ID, Total 1 (null) But when returned in Map result in myBatis returns {ID=1} where as Total is missing. How to get the column with null into the result … | |
Hi, I need a simple code to find CBO coupling between classes ,by using bcel API.this code isnt work and i dont no how calculate cbo by using parser and (methods,classname and how pass it to program; in my code i calculate simple cyclomatic complexity but now,i need to find … | |
Hi there, I am trying to get a data from a database using a query and populate it into a list view. Instead of getting a string value, I am getting "[Ljava.lang.Object;@64bba873". I have tried to cast it, but it did not work query1 = em.createQuery("Select e.name, y.surname from REQUEST … | |
function EnableDisableTextBox(chkPassport) { var txtPassportNumber = document.getElementById("txtPassportNumber"); txtPassportNumber.disabled = chkPassport.checked ? false : true; if (!txtPassportNumber.disabled) { txtPassportNumber.focus(); } } <html> <body> <label for="chkPassport"> <input type="checkbox" id="chkPassport" onclick="EnableDisableTextBox(this)" /> Tab? </label>Tab Quantity: <input type="text" id="txtPassportNumber" disabled="disabled" /> <br> <script type="text/javascript"></script> <label for="shoes"> <input type="checkbox" id="shoes" onclick="EnableDisableTextBox(this)" /> Shoes? Shoes Quantity: … | |
hey,i jave this code. how to check the textbox (mname) to accept only letters? <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <link rel="stylesheet" type="text/css" href="mystyle.css" /> <!--- call my style --> <head> <title>Home page - MidermFaill2015 - Andreas Petrou</title> <!--- title of page --> <!--Andreas Petrou 8600--> </head> … | |
Hi, before posting this thread I tried to find solution inside daniweb but was not successful. I found one but it was so specific for one's own homework problem. I always get lost when I do recursion. I read books but most of them start with Fibonacci or Hannoi problem … | |
I am trying read UTF-16 encoded file in JDK 7, can anyone help me out. I can able to read in Python by: fread = open(r'sample.dat', 'rb').read() mytext = fread.decode('utf-16') print mytext I tried so many ways in java 7 but not succeeded. Thanks in advance. | |
hi everyone I just want to say merry christmas to each and everyone here. it has been a while, yes ah kno but anyway have been doing this programming school assignment game for over two months iam having real difficulties getting it to work the way it is supposed to … | |
I have a jsp page in which I add users and display users from the database . so there are two servlets for this functions, how do I invoke both this sevlets(controller) at the same time ? | |
hi everyone I have a question: how do you divide in java. by it being that the first number must be divisible by the second number. | |
hi everyone i am trying to do some subtraction in a java program . the rules stated that generated numbers from 1 to 9 and the first number must be greater than the second number. I try using the largest and smallest codes but the result i get is that … | |
Hi, is any of you guys aware of any online java project I could join in and help? The thing is, even if I still have a very long way to go before I can code pretty decently, I'm a bit tired of learning with exercises, and I thought perhaps … | |
How to replace a string with table using java? I tried a lot , but i didnt find anything , can anybody help me..? Thanks in advance | |
Hi! I'm sitting with a gui bug that I have been stuck with for a while. When a "view" is changed from one "view" to another, the new "view" doesn't get painted properly. The previous view is visibile randomly in the background. I can't reproduce this in the dev environment … | |
how can calculate complixty for this code package ca.pfv.spmf.algorithms.frequentpatterns.fpgrowth_with_strings; /* This file is copyright (c) 2008-2013 Philippe Fournier-Viger * * This file is part of the SPMF DATA MINING SOFTWARE * (http://www.philippe-fournier-viger.com/spmf). * * SPMF is free software: you can redistribute it and/or modify it under the * terms of … | |
Hi guys, Today I had a look at files and therefore I’d like to create a GUI application that allows me to type a sentence or a word and store it to a text file. The reason for this is that, when I come across an interesting word or sentence … | |
Hi, I have a scenario where I have 2 labels that need to be configured. The names of the labels are 'Out Data' and 'In Data'. I only have one field in the database called 'Data'. Whether it is 'Out' or 'In' is decided at the runtime by the value … | |
I have a standard java web application package under public_html. My java source code is under WEB-INF/classes/. My jsp files are under public_html and public_html/version/v1. Now all of my jsp file under public_html is running fine, however, the jsp files under public_html/version/v1 do not work with following error: *HTTP Status … | |
Hello guys. I have a school assignment and Im having a trouble doing it. I will ask for help. I have a class Product and I need to make 2 subclasses Chocolate and Whine. Each product has a name, barcode, price and tax. Each product has a method for calculating … | |
I basically am working on a final project for JAVA and I cant figure out how to move the strings into the paint class. Here are my 2 codes. import java.util.Scanner; public class FinalProjectQuestions { public static void main(String []args) { Scanner in = new Scanner(System.in); System.out.println("We will design the … | |
I need to make a class that records some information for a book. I need to make 2 constractors, the 1st one receives 6 "elements" and 2nd one only the first 5, as you can see in the code below. I also need to make a simple main program to … | |
I want to add data entered from Java GUI into mysql database and inside actionlestener I am using the following code: String s1; JTextField enterdata = new JTextField(10); s1=enterdata.getText(); PreparedStatement ps = con.prepareStatement("INSERT INTO d (name) VALUES (?)"); ps.setString(1, s1); ps.executeUpdate(); 'name' is the column in database; i am having … | |
If I wrote a program which would `Console.WriteLine()` a base64 code, like an easter egg ("a hidden secret" in gaming jargon) or something, for example string EasterEgg = "dGhlYmlnc2VjcmV0"; Console.WriteLine(b64d(EasterEgg)); And I would let a good obfuscator run through it. Now I know that crackers with enough time and knowledge … | |
Hi I have a method that accepts a List<String> param as a parameter. I'm writing a JUnit test which needs to be able to accept the parameters as a String and then it needs converted to a List<String> The JUnit code is: public void testMethodName(String params, String expectedResult){ final String … | |
hi, i am trying to use parseByte function on hex string it show exception number out of Range.NotNumberFormat exception thrown out. pls tell me why it is. my expression is like this byte b=Byte.parseByte("ac",16); it shows above error pls help me.pls explain in simple language. |
The End.