36,051 Topics

Member Avatar for
Member Avatar for prashant_savadi

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.

Member Avatar for prashant_savadi
0
272
Member Avatar for divinity02

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 …

Member Avatar for stultuske
0
253
Member Avatar for Maybelline

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 ?

0
134
Member Avatar for divinity02

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.

Member Avatar for divinity02
0
236
Member Avatar for divinity02

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 …

Member Avatar for divinity02
0
319
Member Avatar for Violet_82

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 …

Member Avatar for ~s.o.s~
0
238
Member Avatar for priya143

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

Member Avatar for JamesCherrill
0
77
Member Avatar for SasseMan

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 …

Member Avatar for Ali_55
0
1K
Member Avatar for Fatma_3

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 …

Member Avatar for stultuske
-2
279
Member Avatar for Violet_82

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 …

Member Avatar for Violet_82
0
712
Member Avatar for AntonyRayan

Hi, I need your help for forgot password decryption. When a user registers , his password will be encrypted using md5(); and When he sign in, I will encrypt his password using MD5() and I will compare it with value already stored in to table, My problem is, If he …

Member Avatar for diafol
0
256
Member Avatar for newcoder310

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 …

Member Avatar for newcoder310
0
183
Member Avatar for mydreamgirl

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 …

Member Avatar for esprittn
0
300
Member Avatar for John_97

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 …

Member Avatar for JamesCherrill
0
211
Member Avatar for AgentOxegen

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 …

Member Avatar for JamesCherrill
0
250
Member Avatar for Belfina

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 …

Member Avatar for Belfina
0
274
Member Avatar for miraasir

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 …

Member Avatar for JamesCherrill
0
353
Member Avatar for Aeonix

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 …

Member Avatar for Aeonix
0
450
Member Avatar for coder91

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 …

Member Avatar for coder91
0
330
Member Avatar for sheelap

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.

Member Avatar for JamesCherrill
0
192
Member Avatar for zelrick

Hello DaniWeb Community, I have a question about changing the symbol of my tracker. I am using google.maps.SymbolPath.CIRCLE Can I change this to a image of mine? jpeg / png file If yes, How I can do it? Thank you and God Bless -Tap

Member Avatar for JamesCherrill
0
575
Member Avatar for coder91

Hi just wanting to see how you can iterate over a hashmaps entry set checking both the key and values, if either matches the string passed it will return the other (if it matches the key it will return the value, if it matches the value it will return the …

Member Avatar for JamesCherrill
0
134
Member Avatar for rpv_sen
Member Avatar for JamesCherrill
0
250
Member Avatar for mohan@nano

Hi All I have some doubts while coding in java for the xml reading below is my xml format : <?xml version="1.0" encoding="UTF-8"?> -<ab_rsp status="ok"> -<itm title="United States" guid="04570A9A-6066-11E2-BB55-FF519035903F" type="country"> -<itm title="Arizona" guid="A83274AC-901A-11DF-A622-0C319DFF4B22" type="authority"> -<itm title="Academic Standards" guid="9935C580-C0DA-11DA-80AA-DCC515614119" type="document"> -<itm title="Technology" guid="E3E0AD06-FC32-11D9-8407-9AE6FB2C8371" type="subject"> <meta name="year">2000</meta> -<itm title="Readiness (Kindergarten)" guid="001DCFCC-2A74-11D8-A1A9-EB97E8AED672" type="grade"> …

Member Avatar for JamesCherrill
0
192
Member Avatar for coder91

Hi, I wrote a method that accepted a parameter and used a hashmap to return the value for that key. However I have been asked to change the way it is written so that code isn't duplicated. The hashmap used has key value pairs such as 'X', 'Y' in one …

Member Avatar for JamesCherrill
0
325
Member Avatar for Saboor880

Hello! There is another problem which I am facing in JDBC, is Insert statement. I am giving code of my program and explaining my problem . I am using ms access and netbeans 8.1 package database2; import java.sql.*; public class Database2 { public static void main(String[] args) { try { …

Member Avatar for JamesCherrill
0
262
Member Avatar for geysa

Warning: mysqli_query() expects parameter 2 to be string, object given in E:\xampp\htdocs\cadastro\cadastrar.php on line 46 Alguem pode me ajudar? <!DOCTYPE html> <html> <head> <meta charset="UTF-8" /> <title>Cadastrar</title> </head> <body> <?php include "config.php"; $nome = isset( $_POST['nome'] ) ? $_POST['nome'] : 'valor_padrao'; $sobrenome = isset( $_POST['sobrenome'] ) ? $_POST['sobrenome'] : 'valor_padrao'; …

Member Avatar for stultuske
0
377
Member Avatar for noobjavacoder

Binary search tree not working, when it should. Any idea what am i doing wrong. any help would be much appreciated. this is the error: Exception in thread "main" java.lang.Error: Unresolved compilation problems: The method iprint(Node1) in the type BST is not applicable for the arguments () The method preprint(Node1) …

Member Avatar for Oxiegen
0
422
Member Avatar for AbiSharma
Member Avatar for Farhan_8

Hi, i am working on a database application in java and converting it from console to GUI, to do so i am using ucanacces driver and connecting it to my access database and creating queries using sql(NOT ALLOWED TO USE ANY OTHER METHOD) and want to perform the basic database …

Member Avatar for rproffitt
0
346
Member Avatar for sireiz

I am trying to iterate through a string and save the characters in a character array. It iterates perfectly and prints the characters but when I try to save the characters in the Array or in a List, it gives me NullPointerException. Can anyone point out the mistake I am …

Member Avatar for JamesCherrill
0
214
Member Avatar for Ayoub_1

so i am working on this table that have buttons combobox and checkbox... i did all of that and i am left whit one this i button that can add a icon in IMAGE column in the same row her is my main private JTable tb; private String[] comboData = …

Member Avatar for JamesCherrill
0
306
Member Avatar for mikey3891

ok guys.... i have a multiple choice scenario to deal with.... my problem is in the division....both my random numbers have been declared as integers.. this caused the problem of the answer being truncated and only the whole number portion being displayed... i tried to cast one as a double …

Member Avatar for mikey3891
0
260
Member Avatar for Misar

hello guys, i'm a noob in programming and i just want to understand this two question below: //does anyone know how is the question end, i head it in exam and i didnt know what to do with it: boolean b =false; int i=90; //also i head this question was …

Member Avatar for rubberman
0
162
Member Avatar for ravi raghav

i am trying to calculate the minimum difference between the sum of elements of two splits formed from a list. this is how the function should work. the function has to take a list of possitive integers(duplicates are possible) and split it into two sub lists. now it has to …

Member Avatar for JamesCherrill
0
216
Member Avatar for Saboor880

Hello to all! I am doing practice for JDBC and using netbeans 8.1. I created a table in mc access and wrote a program. But the problem is that when i pass column index then my program runs successfully. But I pass column name as in my table in mc …

Member Avatar for stultuske
0
245
Member Avatar for laguardian

Hello guys! I'm currently working on a matching app. In the app, the user can select what mode of difficulty they want(easy, medium, hard and suvival) as well as select one of the sets of images for the GridView(nba logos or world flags). My problem is that when the user …

Member Avatar for stultuske
0
337
Member Avatar for Saboor880

Hello guys! I am using netbeans8.1 and apache Tomcat8.0.27.0 I am making a simple web application for practice. I have made two html pages "index.html" and "welcome.html". On page index.html I am taking two parameters from user 'name' and 'sirName'. If user enters Saboor and Siddique in 'name' and 'sirName' …

Member Avatar for peter_budo
0
183
Member Avatar for ThisIsMeOrIsIt

public class MazeArray { public static void main(String[] args) throws FileNotFoundException{ File inputFile = new File("maze1.txt"); Scanner sc = new Scanner(inputFile); int maze[][] = null; maze = createMaze(sc, maze); mazePathFinder(sc, maze); printMaze(maze); } public static int[][] createMaze(Scanner sc, int[][] maze){ int arrayRowSize = sc.nextInt(); int arrayColumnSize = sc.nextInt(); maze = …

Member Avatar for stultuske
1
322
Member Avatar for kayleigh0411

I am trying to make a calculator, but I can not seem to figure out how to get the = operation to work. Everything else seems to be working fine, but I am just really struggling with the =. Any guidance in the right direction would be super helpful! import …

Member Avatar for JamesCherrill
0
1K
Member Avatar for queenofdrama365

JAVA How to read in strings from a file convert to byte code (unicode) and save in array for hashing? how to use hashing (using list of strings) to find longest chain? (from text file dont print the output in a file just dislplay.)

Member Avatar for JamesCherrill
-1
181
Member Avatar for trishtren

Hello, Iv been working on a project for a while now in java and i read somewhere that the GCJ can compile java classes into native binaries, after a quick google search it was revealed that this was true. However after reading a number of posts across the web and …

Member Avatar for jwenting
0
225
Member Avatar for queenofdrama365

list of 28,500 words (read in from text file), one word per line Do not actually store the words in the hash tables; rather use integer arrays initialized to all zeros. If a word hashes to position i, simply increment the value in position i. In running your trials, use …

Member Avatar for JamesCherrill
0
212
Member Avatar for Farhan_8

Is there any easy way to create constructors from private variables from public class Vehicle { public String VehicleNo;// AQP 4300 public String Model; //Toyota Vitz public String ChassisNo;// AE-09-8E-104N public String EngineNo;// AE-0097-EW3 public String DateReg;// 24/04/2006 public String Mileage;// 80,345 } TO THIS PARAMETERIZED CONSTRUCTOR public class Vehicle …

Member Avatar for JamesCherrill
0
209
Member Avatar for Farhan_8

> Hi, i am working on a personal project in which i am creating a ms access database and then connecting it using java to a GUI via UCanaccess .But the problem is how to identify the OOP concepts which should be implemented in my program i need atleaset aggregation,association,inheritance …

Member Avatar for JamesCherrill
0
84
Member Avatar for catby

Hi, I was wondering if someone could help me please.... I am new to java and have been struggling with this for about 2 weeks now!! At the moment I am just trying to get the program to print out a 5x5 matrix with the alphabet in it, using a …

Member Avatar for catby
0
887
Member Avatar for Farhan_8

Hi, I have been assigned Blood Bank Management System as java oop project.So i was wondering i someone can give me a headstart on which classes and methods to implement first so i can modify them applying all the oop concepts first.This is what i have worked on so far. …

Member Avatar for JamesCherrill
0
310
Member Avatar for coder91

Hi I recently started a new job and i've just been giving my first proper coding task. It is to write a method that will take a value and convert it to something else. eg. If the method receives Payment it will return 'P'. I'm just looking for the best …

Member Avatar for JamesCherrill
0
222
Member Avatar for ahmed alnaseri

Hi guys, I am trying to add a new component to my window by clicking on a clickable jLabel. Better said, with mousevent. Unfortunately, it does not work, at least for what i tried with. Can you help me here? My code: package test_1; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Cursor; …

Member Avatar for JamesCherrill
0
214
Member Avatar for noobjavacoder

I have written a program in java using selection, bubble and merge sort and I have to print just the time it took to run the sort which works just fine, but how do I sort a sorted list? I want to see how much faster is it to sort …

Member Avatar for JamesCherrill
0
249

The End.