35,618 Topics

Member Avatar for
Member Avatar for admiralchip

Hello, I'm using the rotate-layout library by rongi (https://github.com/rongi/rotate-layout) to achieve a horizontal list view by implementing the suggestion given by Kc Ochibili as an answer to this question: http://stackoverflow.com/questions/3240331/horizontal-listview-in-android. I'm getting the following errors when I try to use the library: "error: Error parsing XML: unbound prefix" and "Attribute …

Member Avatar for Raul Perez
0
455
Member Avatar for hsaraiya

I am trying to Draw a graph which can read data values from Text files. In which i want to consider 1st column as X-axis and 2nd as Y-axis.

Member Avatar for JamesCherrill
0
2K
Member Avatar for overwraith

I am trying to build a program for transferring files to an arduino project with an attached sd card. I have some code, it does some interesting stuff, but it's not quite what I want it to do. What I need it to do is to be able to transfer …

Member Avatar for rproffitt
0
825
Member Avatar for Doogledude123

Flickering occurs when Active Rendering with JPanel, not sure why as I've done this before (couldn't find source code of that project however). Relevant Code: Graphics g = projectDCWindow.getWindowGraphics(); // Gets the Graphics Object from a JFrame g.setColor(Color.BLACK); g.fillRect(0, 0, (int) ProjectDCInfo.getDefaultWindowSize().getWidth(), (int) ProjectDCInfo.getDefaultWindowSize().getHeight()); // Clears the screen projectDCGSM.get().render(g); // …

Member Avatar for Doogledude123
0
2K
Member Avatar for abhijitmuthe
Member Avatar for rproffitt
0
59
Member Avatar for Steven_10

Hello I am trying to take a multi-deminsional array[ ] [ ] (2D (if you will)) and set a varriable through a classes public setter. //some of the fields private int request_id; private String time_stamp; private int session_id; private int client_intf; private int server_intf; // many more... // Some Getters …

Member Avatar for Steven_10
0
186
Member Avatar for Sasi_2
Member Avatar for Mar. Na.

Hi,all I need a java parser for parsing any java file in any package,not only existing file ...Can i do this ? how?

Member Avatar for JamesCherrill
0
675
Member Avatar for PratikSagar
Member Avatar for Yash969680

write a program that displays the following information, each on a separate line: * your name * your address, with city, state and ZIP * your telephone number your college major Although these items should be displayed on separate output lines, use only a single **println** statement in your program.

Member Avatar for Reverend Jim
0
482
Member Avatar for joshSCH

When I try to execute my jar file through the command prompt by typing: java -jar myJar.jar It returns an error message saying that it can not access the jar file. Why is this? myJar.jar is the exact name of my jar file.

Member Avatar for stultuske
0
36K
Member Avatar for PratikSagar

can anyone help me that how I can read numbers from images through java program..

Member Avatar for JamesCherrill
0
325
Member Avatar for Gl753

Hi, I'm currently working on a GUI programme that caluculates the amount of days in a month through user input. However I've become stuck where the programme crashes upon entering the month number. I believe that I may have incorrectly chosen my instance variables but I am unsure of which …

Member Avatar for stultuske
0
341
Member Avatar for chrisschristou

hello i just get started with java so i have a question where the difference from c/c++ and the famous lovely java begin, the function or better method, so in c/c++ we can make a function prototype on top the main and then define it later like this int myfunctionprototype(int …

Member Avatar for JamesCherrill
0
1K
Member Avatar for Narmada_1

Hi I want to change my carrier from Php to Java. I have 2 years of experience in php web development like wordpress, joomla tools. There after I changed company there on my company request, I learnt java on my own by seeing tutorials. They assigned me spring project I …

Member Avatar for Narmada_1
0
237
Member Avatar for Ravi_23

package com.mkyong.util; import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.util.ArrayList; import java.util.Collections; import java.util.List; public class ReadFromCVS { ArrayList<datas> dataList = new ArrayList<datas>(); public static void main(String[] args) { ReadFromCVS obj = new ReadFromCVS(); obj.run(); obj.printDataList(obj.dataList); } public void run() { String csvFile = "C:\\Users\\User\\Downloads\\SalesData.csv"; BufferedReader br = …

Member Avatar for JamesCherrill
0
231
Member Avatar for claptus

Let assume that ‘k’ is an integer that indicate and reveals exactly the length of subset that sum to 0. Thus length of subset to pick is determined by ‘k’. If I would like to pick only ‘k’ distinct set of integers from any given set of integers in polynomial …

Member Avatar for Reverend Jim
0
300
Member Avatar for Sandeep_16

Consider a single producer and 10 consumers as threads. The consumers has to subscribe (Ad themselves) to the producer in-order to get any messages that produces sends. The expected functionality is that, the producer should add a message to a data structure/collection (you choose of your choice) every 2 minutes …

Member Avatar for JamesCherrill
0
237
Member Avatar for Steven_10

package com.company; /** * Log Nazi -- Created by Steven Richardson on 2/2/2016. */ import javax.swing.*; import java.io.*; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; import java.util.List; import java.util.Scanner; /** * Created by Steven on 1/29/2016. */ public class LogReader { // declare variables static String theFile; static int rows = …

Member Avatar for Steven_10
0
979
Member Avatar for jjones0150

I'm trying to figure out why my removeProduct method won't actually remove the product from the list please give me some feedback. InventoryApp.java class package JayJuan; import java.util.Scanner; import java.math.BigDecimal; import java.util.Scanner; /* Main class used to add a product, remove a product, update a product, or view the product …

0
262
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
105
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
221
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
218
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
904
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
561
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
304
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
667
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
502

The End.