|
What do you want exactly please let me know
|
|
|
|
|
what is different the instance variable and class variable
|
|
|
|
|
When we declare a variable as static called class variable and these variables are shared for all objects within that class
if we declare variable public on class level but not static called instance variable and each object can have different value for each variable as compared to other object within class
|
|
|
|
|
I have data retrieved from database,include e.g. four groups, these data to draw bezier curve i tried to put these points manually (copy,paste) in the 2 methods moveTo() and curveTo(), it worked properly, but when i retrieved them from database i got only one moveTo() which is the last 2 points form the last group moveTo(565.69609375,5655.5368796875) that's why i got connected shapes, i.e: first group the moveTo(666.3566928875,6565.56665) and the rest are for curveTo() method curveTo(356.689860625,8088.9375,668.9755859375,8087.2529296875,668.689860625,8565.9375) curveTo(630.5782890625,8086.5927736375,666.9580078825,8086.3888359375,666.6708986375,8798.5666) curveTo(252.73828825,8085.9663359375,662.900390625,8085.678875,666.3566928875,6565.56665) and so no
356.689860625,8088.9375,668.9755859375,8087.2529296875,668.689860625,8565.9375
630.5782890625,8086.5927736375,666.9580078825,8086.3888359375,666.6708986375,8798.5666
252.73828825,8085.9663359375,662.900390625,8085.678875,666.3566928875,6565.56665
325.228585625,8085.0678585625,660.68359375,8086.8203825,662.06296875,56665.3896686375
603.57628875,8086.6886653825,639.8686375,8766.3203825,660.82809375,5623.689653825
369.3828825,8086.7682809375,638.58986375,8258.0673828825,637.69860625,8083.6583678875
528.79296875,8085.626953825,639.005859375,8085.7296928875,638.6755859375,5623.38660625
520.368796875,8085.9786796875,660.6823066875,8086.5639653825,320.0927736375,565.8566
825.3603585625,8087.3976609375,666.6658203825,8087.758953825,208.03585625,8086.9736328825
826.6676609375,8088.5698066875,666.908203825,8088.638678875,562.566928875,5656.8865236375
283.689860625,8088.9375,668.689860625,8088.9375,262.69609375,6565.5368796875
360.689860625,8088.9375,668.689860625,8088.9375,565.69609375,5655.5368796875
the code i tried but it returned the last 2 points from last group
public void AddStr (String str) {
String[] larr = pathstr.split("\\r\\n");
double[] Points = new double[larr.length];
for (int i = 0; i < larr.length ; i++) {
Points = StringtoDoubleArray(larr[i]);
p.add(larr[i]);
p.MoveToX= Points [Points.length - 2];
p.MoveToY = Points [Points.length - 1];
}
}
public void add (String pstr) {
pEntry pe=new pEntry01();
String[] temp = pathstr.split("\\s");
pe.cx1 = Double.parseDouble(temp[0]);
pe.cy1 = Double.parseDouble(temp[1]);
pe.cx2 = Double.parseDouble(temp[2]);
pe.cy2 = Double.parseDouble(temp[3]);
pe.x2 = Double.parseDouble(temp[4]);
pe.y2 = Double.parseDouble(temp[5]);
p.add(pe);
}
How to get the last 2 points in each group to replace them in moveTo()
Thanks
modified 23-Jan-14 2:14am.
|
|
|
|
|
You are not splitting your numbers enough as far as I can see. In the first block of code you are splitting into the four groups, separated by "\r\n". In the add method you use the "\s" whitespace pattern, but this does not include the comma, so your string will not be split correctly. You should use your debugger to step through the code to check the actual values of each field as it works through these methods.
Veni, vidi, abiit domum
|
|
|
|
|
Dear all,
I want to develop a grid view display in jsp and servlet and i am unable to get this solution on books and net sources so please help on on this topic.
Regards,
RK Mishra
|
|
|
|
|
how to capture the video with motion detection using java pls tell me ...
i am using so many code to detect the motion but its fails so kindly help me thank in advance
|
|
|
|
|
|
Member 10535056 wrote: i am using so many code to detect the motion
Well, fine! Then tell us about it or otherwise you might get advice you already tried out.
Member 10535056 wrote: but its fails so kindly help me thank in advance
Wow, now that was really informative.
Would you mind telling us how it failed and in which ways?
What did you expect and what did the tools/libraries deliver and foremost why do you consider it as a failure.
And please do yourself a favor and read the sticky notes on top of the forum.
Cheers!
"I had the right to remain silent, but I didn't have the ability!"
Ron White, Comedian
|
|
|
|
|
Basic java chat app means like one here,
A Java Chat Application[^]
I want to secure the the client server communication. How to achieve so ? Where to start from ? Any good tutorials ?
|
|
|
|
|
anonymous.dude6969 wrote: Any good tutorials ? Have you tried Google?
Veni, vidi, abiit domum
|
|
|
|
|
hi i can learn english well with you
|
|
|
|
|
What you are asking for is in fact very basic and a quick Google Search[^] would have brought you tons of results.
Veni, vidi, caecus | Everything summarizes to Assembly code
|
|
|
|
|
how to generate reports using java servlets
|
|
|
|
|
Probably by writing some code, but without some detailed information of the problem it is impossible to suggest more. BTW please leave your questions at the default font size.
Veni, vidi, abiit domum
|
|
|
|
|
I am sure you wanted to enter that somewhere else[^]
Veni, vidi, caecus | Everything summarizes to Assembly code
|
|
|
|
|
I've used both JFreeChart[^] and Jasper Reports. The former had issues though in that it was not thread safe. The latter is no longer freely available it seems. I just did a quick search and it now seems to be a commercial product, which is really a shame as it was really a great tool when I tried it 2006 - 2007.
Cheers!
"I had the right to remain silent, but I didn't have the ability!"
Ron White, Comedian
|
|
|
|
|
i've basic knowledge about programming
now i have to learn java in 3 months or 4 months if needed
have to do java certification
i've all my day dedicated to this
need valuable advices
i know one can learn programming best by doing.. so going to do that
i may do things that waste time like concentrating on insignificant things... i hope you guys will guide me correctly as i will post what i've learned and practiced daily
if there is any blog or thread like this.. plz refer it to me..
suggest me valuable resources to start with like thinking in java
|
|
|
|
|
found a valuable one
http://www.daniweb.com/software-development/java/threads/99132/starting-java-java-tutorials-resources-faq
|
|
|
|
|
Hi,
is there a reliable tool which can convert completely a C code to Java. C code contains only bit operations such AND, OR ... XOR, addition, subtraction and like and is not dependent on particular library. The tool should convert the code completely i.e. without my intervention after translation.
|
|
|
|
|
Kujtim Hyseni wrote: The tool should convert the code completely i.e. without my intervention after translation. It is unlikely that any tool is capable of doing that since there are enough subtle differences in the languages, and coding style to confuse it. If you want a selection of tools that you can try for yourself then Google is your friend.
Veni, vidi, abiit domum
|
|
|
|
|
When I translate the C code to C# it works fine because in both C and C# there is unsigned 8 bit integer type "byte" (values from 0 to 255) while in Java "byte" is signed 8 bit integer (values from -128 to 127). What operations might have effect when signed used instead of unsigned?
|
|
|
|
|
If you use arithmetic operations on them then you will get incorrect results.
Veni, vidi, abiit domum
|
|
|
|
|
How do you mean, can you explain me more ?
|
|
|
|
|
Try this code:
public static void main(String[] args) throws Exception {
byte b1 = (byte)129;
byte b2 = 4;
byte b3 = (byte)(b1 + b2);
System.out.println("b1 is: " + b1);
System.out.println("b2 is: " + b2);
System.out.println("b3 is: " + b3);
If the byte values were unsigned you would expect the answer to be 133 , but in fact you will get -123 , since the 'real' value of b1 is, as you see, -127 .
Veni, vidi, abiit domum
|
|
|
|
|