32,204 Topics
| |
I have two panels. One with the price (OHLC) and a moving average, and one with the volume. I want to create a middle panel with to oscillators that oscillate around zero. Each oscillator is the difference of two moving averages of the chart above it. Is it possible? Thank … | |
I want to consume a WCF service with DataContracts from my Android app, and I'm using Eclipse as my IDE. In .NET when I add a service reference I automatically get metadata and automatically-generated code for calling that service. Is there a way to do so in Java/Android/Eclipse? I wouldn't … | |
hi guys i need to develop an application and to do so i need to import in my project some web references.Does anybody has any idea how i can do that in eclipe(juno version) | |
Here when I execute the program, the output I'm getting on all the tries is 342 (naturally first 34 prints together then 2 seconds later 2 prints). My doubts is that is the order of start() [x.start() followed by y.start()] important in order of execution? Shouldn't the output be 234? … | |
hello everyone ,i am new to daniweb club i am so much happy to meet you here i am an MCA fresher i have confusion to get train in software technologies so please help and advise which technology presently in market .i am planing for datawarehousing please give your openions … | |
Hai Friends, How to access multiple result sets in java? iam using getMoreResults, but iam able to access only half of data from second table... is there any way to access. please help me for this problem | |
I've a bill which looks like ![untitled31](/attachments/large/2/untitled31.JPG "untitled31") this is the paper which i use in printer and i want to print the appropriate value in the correct position of that paper. As in the place of date i want to print date and in the place of Rate, Amount … | |
Two doubts: 1. Placing run() inside main() generates "illegal start of expression error"? So why can't run() be placed inside main()? 2.With the above code I am getting the output as A C D B. Why B comes last is because of join(). But what I'm unable to understand is … | |
Hi, Here I face one problem in java application. I am working on one project, developed in java 1.4 & 1.5 swing, jboss, applet on netbeans 3.6. But I got an error when I try to debuge or execute in netbeans "IO EXCEPTION WHILE READING: Localhost". Project is successfully build. … | |
I have a question in SCJP text book by Kathy Sierra and Bert Bates in Development chapter. Q. Given the default classpath: /foo And the directory structure: foo | test | xcom |--A.class |--B.java And these two files as mentioned in the code snippet section. Amongst the choice, 1. javac … | |
General rules is that: 1) A private method cannot be overridden. 2) Subclass method should be a lower access modifier than a overridden superclass method. But the output of the program is "I am Son". Why? Is it because of the rule 2 the output comes? If that's the case … | |
Hey guys, I'm a starter so I had a doubt related to placement of a static variable. On line 5, for "static int d=5" compiler issues "illegal start of expression". But when I place it outside main() as Instance variable it works and prints "Hello 5". Why this thing? public … | |
Hi again. I am trying to make code that set all black pixels to white. But my code does nothing. Why is that? package net.viped; import java.awt.image.BufferedImage; public class ImageManipulation { public ImageManipulation() { } public BufferedImage setTransparent(BufferedImage image) { for (int x = 0; x < image.getWidth(); x++) { … | |
import java.util.Scanner; public class waterbill8 { public static void main(String[] args) { Scanner reader = new Scanner(System.in); double value1 = 5.00; double value2 = 0.82; double value3 = 0.65; double value4 = 0.42; double value5 = 15.00; double value6 = 1.47; String read1 = null; char I, R; int num1, … | |
Hi, for a school project (exam actually), we've written a ternary trie for text-completion. We fill it with about 400.000 lines of text (13 MB in total, as UTF-8). Now, java represents characters in UTF-16 i believe. So thats 26 MB, + another 26 for saving the complete strings in … | |
So I wrote this code for generating a maze, when I run it i get ArratOutOfBoundException. sometimes it gives me the error after generating the maze once but sometimes I generate couple time then it crashes. I feel like my error is in the while loop but can't find it. … | |
I am trying to overlay a moving average over a OHLC chart but I get no results. Any ideas on what am I doing wrong ? private static OHLCDataset createPriceDataset(String filename) { //the following data is taken from http://finance.yahoo.com/ //for demo purposes... OHLCSeries s1 = new OHLCSeries(filename); try { BufferedReader … | |
Following are the server-client programs,,,, in this client can send files and server have to save it,,,,,i want to add progressbar.....plz help me out!!! client:- import java.net.*; import java.io.*; import java.awt.*; import java.awt.event.*; import javax.swing.*; class ftpclient extends JFrame implements ActionListener { JButton b1,b2; JTextField t1; ftpclient() { b1 =new … | |
| |
i have created a chat program and i want to add smiley to it......i know how to add smiley in a program,but my logic works for single smiley in a message.......want logic for multiple smiley in prgm,,,, int zi=msg.indexOf(':'); if(zi!=-1) { try{ st1=msg.substring(msg.indexOf(':'),msg.indexOf(':')+2); String msg_start=msg.substring(1,msg.indexOf(':')); int msg_end_index=msg.indexOf(':')+3; if(msg_end_index>msg.length()) msg_end=""; else … | |
Hi Everyone, Starting to write **3D images** using** JOGL **and I can't seem to find any **recent information** and help about **JOGL** and creation. I noticed that most of the terms have changed and it doesn't work. Any **recommendations** on what I could read to help update me and keep … | |
Hello, Iv been trying to work through some issues on binary output recently. But im having problems understanding the conversion process in java when using two's complement. I dont understand why System.out.println(Integer.toBinaryString(-11700)); Prints out 11111111111111111101001001001100. Shoudlnt -11700 only be 15 bits long? When i calculate it by hand and invert … | |
I'm trying to print the necessary values in the predefined document for an example, in a Bill name in the left side and date on top right. I already had that documents with empty name and dates . how can i print the name and date to corresponding location in … | |
Hello guys, I'm trying to make a list of students grade using array. My question is, how am I going to do this? **OUTPUT:** Lea 94 Morgan 85 Jenny 92 Harold 75 I've tried a bit to program, please do check my code. public class StudentScoreArray { public static void … | |
Hi, could some one look over my code I by myself dont get where the flaw is. It should paint 1 cube at a time but now it runs all the code through and paints all at once. package net.viped; import java.awt.Color; import java.awt.Graphics; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; import javax.swing.JFrame; … | |
I think the following code should print 26 but it's printing 62 instead. public class gjh { public static void main(String[] args) { int x = 2; x += ++x * ++x * ++x; System.out.println(x); } } So how is this possible? | |
All, I'm very new to java having done most of my scripting in Javascript and a little bit in other types of programs. I'm basically trying to obtain a script variable and compare it against a condition and return some println messages. Here is my code: String agentType[] = request.getParameterValues("Agent … | |
As the title said, how to send text messages from a java program? | |
In my applcation I have a JText field for entering a phone number. Is it possible to make it only accept numerical characters? Or should i wite a method to alert the user if they enter any other characters into it? Thanks | |
Bold Text Here ** java.io.ByteArrayOutputStream fos = new java.io.ByteArrayOutputStream (); java.io.ObjectOutputStream oos = new java.io.ObjectOutputStream(fos); oos.writeObject(chmObjSessionKeyValue); //ConcurrentHashMap oos.flush(); oos.close(); byte buff[]=fos.toByteArray(); ps.setString(2,strSessionId); ps.setBytes(1,buff); ps.execute(); //Read object java.io.InputStream in=null; while(rs.next()) { in=rs.getBinaryStream(2); } java.io.ObjectInputStream oos = new java.io.ObjectInputStream(in); java.util.concurrent.ConcurrentHashMap chmObjectSessionInfo=(java.util.concurrent.ConcurrentHashMap)oos.readObject(); CoreLogger.log("Concurrent hashmap object::"+chmObjectSessionInfo); oos.close(); > `Inline Code Example Here`** *Bold Text … |
The End.