Jay Orsaw

Ranch Hand
+ Follow
since Jun 14, 2011
Jay likes ...
Android Netbeans IDE Java
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
65
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Jay Orsaw

Piet Souris wrote:Just reading this topic, and I was wondering: have you by any chance VB6 around (or maybe even VB4.5)? Or do you know someone who does?
Then it would be a very easy job to read those files in uing VB and write them out as text (using the PRINT# statements).
You would need to know what's in those files, but if I understand correctly that's not the problem.

Greetz,
Piet



Okay so, I am getting a BINARY file from someone using VB6, and creating an Java application that reads it.

It is possible to create a file with text, and a non-binary file, but then peopel can read it, as a business application I don't want this, thus the binary format.

The issue comes into play when we run into FLOATS/SINGLEs and DOUBLES.

I read somewhere that the IEEE standard for VB6 and Java are different(then I found that to be false at some point so not too sure) it's just the binary values are different, so we need a converter.
9 years ago
I just want to say you're a lifesaver, thanks a ton for this!

I wanted to know, what if we do run into a Byte issue?

From what I saw doing my own conversion the real issue was Floats and Doubles.

Is there any documentation you read up on to do this, or you just know a lot about binary, I'm interested to know more about it all, though if I looked into it, it might not be that difficult!
9 years ago

Bear Bibeault wrote:Those are still desktop apps. Sure, they are client-server in that they connect to a remote database. But they are still traditional fat-client apps rather than web-based thin-client SAAS web applications which, these days, most people will think of when you say "client".

My point is to be more precise when you use the word "client".

But if your point is just that JavaFX is taking over from Swing for the limited areas in which Swing is used, I have no insight into that area.



So you're saying the only "Server side" technology is EE, and that everything else, FX/SE is "Desktop?" What is the difference you are trying to make in FX cannot be SaaS? IF it can use web services I thoguht that is what is needed, and the rest of the code goes ont he client.


Are you saying that when doing a SaaS you ONLY use EE and server side technologies, and create some sort of small client side with SE or what? Does GUI work go on a server? Im confused I guess....?
10 years ago

Bear Bibeault wrote:From Mark Reinhold’s Blog

I applaud this move. No one benefits from taking the cake out of the oven before it's done baking.



When the blogs came out about this people showed heavy concern about losing Lambda(including myself), or them trying to take bits and pieces out. Extending it is all we can do, and enjoy the beta builds while we wait .

I rather have a stable JDK and JRE than to have it thrown out faster just to make some people happy.....
10 years ago

Bear Bibeault wrote:

Jay Orsaw wrote:Well I also want to add in what about FX? That seems to be where the Java world is headed, at least the Client side.


I'm sure you meant to say "Desktop". JavaFX will not be making inroads on the web as a client-side technology.



There have been examples of FX used with EE

http://www.oracle.com/technetwork/java/javafx/samples/index.html

http://docs.oracle.com/javafx/2/overview/jfxpub-overview.htm

Sales Dashboard (DataApp)
DataApp is a client-server application for a fictional global automobile company called Henley Car Sales. Automobile sales are simulated on an EJB server using JavaDB, and the data is available via Derby and a RESTful web service. The client demonstrates a variety of data presentations by using a mix of FXML and JavaFX.

I thought originally that JavaFX was "Desktop" only also, until I found this example. I couldn't get it to run due to some weird Database line read issue that others also had. I'm not sure if this is now due to FX's integration, or if this was something new, but I believe I have seen another FX client-server app as well.


I'm not that familiar with the client-server side of Java yet, so if you have other Information I would like to know, because I am looking to design a Client-Server app with FX, and I don't see why it would be an issue, unless there are huge limitations.
10 years ago
Just wanted to throw a heads up is all.... since this is the "what's new in Java 8" section.

Netbeans has it's own DB section which is what I personally have used.
10 years ago
Well I also want to add in what about FX? That seems to be where the Java world is headed, at least the Client side. Swing is dead, and FX not only takes over the GUI portion, but it also has a lot of other nice features bundled into it. I personally transferred to FX not too long ago and found it to be very excellent, and a much better alternative.


As for Lambda or any other new addition I don't see the big deal. You can call a language whatever you want, or think that a language is known for whatever reasons, but a new addition saying it's a new lang well, maybe, if you want to think that way. Java is still Java. There isn't anything different, just newer tools to get things done.

I'm really looking forward to 8, but maybe that's just me .
10 years ago
https://blogs.oracle.com/Lance/entry/removal_of_the_jdbc_odbc


The article states

I would recommend that you use a JDBC driver provided by the vendor of your database or a commercial JDBC Driver instead of the JDBC-ODBC Bridge.



http://dev.mysql.com/downloads/connector/j/5.0.html I'll have to see if these Drivers work with 8.


Does anyone have any extra input?
10 years ago

Pat Farrell wrote:

Jay Orsaw wrote:I had a computer science professor say that the entire architecture of computers could change at any time



While it is true that the probability that we will switch from a Von Neumann architecture to something else is non-zero, its also very small. Perhaps vanishingly small.

While folks toss around the term "architecture" of computers loosely, such as claiming that an ARM chip is a different architecture than an Intel X86, they still have a lot in common. The last attempt at a different architecture was Intel's VLIW machines, which failed to deliver the promised performance, and failed in the market.

If there is a wide acceptance of functional programming languages or object-oriented DBMS packages, then we could see a significant switch. But lately, all we have done is crank up the clock and add more CPU units. A 64 processor chip running Von Neumann architecture is still Von Neumann.



Yup I agree, and unless something huge happens that is going to break the market with such an amazing advancement, I don't think we have to worry either. Especially since you would most likely have to port so much code on it(Granted the JVM should be okay) but other languages that run native and such will have to be rewritten for that, and I think it will be a big mess.

Bear Bibeault wrote:

Jay Orsaw wrote:And how many people still code C that's 40 years old? :P.


Many, many, many, many, many, many developers.

Ever hear of embedded systems? What do you think is running in your residential gateway? Your TiVo?

Even though Java was invented with embedded systems in mind, C still rules that roost.



Yes, exactly, that was my point. Saying that in 40 years Java, or an advancement of Java wont be around isn't "impossible." C is around, and will continue to be around for a long, long time.

Now that things are more "standard" we will see languages tend to last longer, or be able to work with one another.

Visual Basic is still #7 on TIOBE's list even though a lot of people don't code in it anymore, there are tons and tons of VB applications still used.

C and Java fight for the 1-2 spots and I think it's amazing how C can last so long, and will continue to last.

C might even make it past 100 years, wouldn't tha tbe crazy? :P
10 years ago
I wouldn't say it's "not Java" but it's that Java has advanced beyond SE, and EE. With FX now being a part of the JDK 8 we now get the new advanced GUI and powerful engine to do things for us.


As someone who has switched from Swing to FX and have been working on the Beta builds(currently build 84) the new tools, and goodies are AWESOME. Lambda is SUCH a useful feature. With the addtion of 3D, better sensor support, and overall improvements FX and JDK8 is going to be a great addition to our toolkit.

Add that to the announcement of FX and Java on Mobile devices and we have an entire new set of goodies to work with, and an entire new platform to take over! 2013-2014 is going to be a big push for us.


Winston Gutkowski wrote:

Martin Vajsar wrote:How would the compiler know that the code being compiled was or wasn't modified after the introduction of Java++?


Not sure, but I can't imagine that a "Day 0" date would be too difficult to implement and then check against file mod timestamps; or indeed, introduce a new annotation ("@Java++' ?) for new source - although that would go against Bear's idea of obliging people to use the new syntax. Dunno...maybe a combination of the two...



I'm not 100% sure, but I believe I heard something about new annotations over at the FX Oracle Forum... I forgot what exactly I was reading on there, but if I find it again I will let you know. I know it had to do with someone asking about using $(something) like in Javascript, and I believe a user posted some link about that, though I'm not too sure it has to do with annotations....

If anyone has any idea, let me know.

EDIT: I did find this http://jdk8.java.net/type-annotations/


Pat Farrell wrote:

Bill Clar wrote: Fortunately, this means we'll all have jobs for the next 20-40 years.


Yuck. Who in the world would want a job doing maintenance on 40 year old code written in a dead language? How many young programmers are dying to get jobs doing maintenance on 40+ year old COBOL systems?

If a language doesn't evolve, while the legacy installed base doesn't go away, it is never picked for new work. I've been a professional developer for 40 years, and I've been paid to write in about 30 languages. Any programmer who is smart enough to earn a salary is smart enough to pick up a new language.



And how many people still code C that's 40 years old? :P.

New Languages come out all the time, some stick around for a little bit, some for a long time, and some don't make it at all. Languages will constantly evolve. C has C, C++, C#, and Obj-C if you want to count them that way. Java started out with SE(not too sure about EE) and is evolving itself as well as adding in things like JavaFX, and other opensource projects. The beauty of Java is that you create the language yourself(Extensions). We can continue to ever evolve our language, as long as the JVM can continue to improve as well.


That being said Java C, and any other language around now might be completely useless in the future. I had a computer science professor say that the entire architecture of computers could change at any time, though that would completely mess up a lot of things most likely, so I doubt people will "deviate from the norm "
10 years ago

Pat Farrell wrote:

Jay Orsaw wrote:I also tried just doing Calender rightNow = Calender.getInstance(); inside the look, that would keep creating new instances right?


Yes, it creates a new Calendar instance, but that is a cheap constructor. Calendar's data structure is not much more than a Date, its the member functions that are less insane than Date's.



Yeah, everytime I was looking at "Date" it said "depreciated to Calender" so i worked with that :p.
11 years ago

Pat Farrell wrote:I see this as having a philosophical loop. How do you update the time every second, when you don't know what a second is? If you could set an interrupt every second, seems to me that you are already done.


And, of course, you are NOT suposed to to update the Calender.getInstance(), instead you should get a new instance every second.




I also made a cross post here

https://forums.oracle.com/forums/thread.jspa?threadID=2516151&tstart=0


I passed out before I could say it, but yeah I tried rightNow.add(Calender.SECOND,1); and if put inside the loop crashes, if outside will add a second and that's all... rightNow.set(Calender.SECOND,10); also works, but only outside the loop.

At first I thought the Instance wasn't working correctly, but it seems it's my Scheduled loop.

I also tried just doing Calender rightNow = Calender.getInstance(); inside the look, that would keep creating new instances right?

It seems that anything having to do with "rightNow" in the loop crashes it. I'm not too sure why.

EDIT: So it seems that I needed to run it on the FXThread.... but isn't doing



updating the instance, or is this creating a new one each time?


Also is it weird that the first time I ran it, the 1st "second" marker was the same as the 2nd "second" marker, "i.e., 5:33:03 happened twice" then it went to :04,05, etc... The second time I ran it, it was fine... Thoughts?
11 years ago
Okay, so I tried using the ScheduledThreadPoolExecutor, and it worked great! The only issue is that I'm having trouble updating the calender.

NOTE: Lambda expressions are used as "->" so runnable and run have been removed. I am also using JavaFX



Basically if I run it normally it will just return the instance at that one second, and wont update with rightNow.getTime() and will just pop out the same time constantly.

If I try to set inside the setFixedRate it wont run the scheduler, and if I click the button after I've seen it update the instance a few times, it will then stop right away.

Why exactly is my ScheduledThreadPoolExecutor breaking when I'm getting my instance? Is there another way I should go about this maybe?
11 years ago

Jeff Verdegan wrote:You could use a java.util.Timer and java.util.TimerTask to update the time once per second.



Just found my way to the Timer class, a min ago :p. Thanks a lot Jeff, I will check it out!


EDIT: Ooooo Interestingly enough I found this tidbit of info inside the "Timer" class


Java 5.0 introduced the java.util.concurrent package and one of the concurrency utilities therein is the ScheduledThreadPoolExecutor which is a thread pool for repeatedly executing tasks at a given rate or delay. It is effectively a more versatile replacement for the Timer/TimerTask combination, as it allows multiple service threads, accepts various time units, and doesn't require subclassing TimerTask (just implement Runnable). Configuring ScheduledThreadPoolExecutor with one thread makes it equivalent to Timer.



It seems like it's "main" purpose is to be able to unload "multiple" things at a certain interval, at once, but still says that it's a better replacement than the Timer/TimerTak combo? Thoughts on this?
11 years ago
Hello all!

I've been looking for a way to auto-update the time. I was thinking of maybe just comparing the current time to the original time and just keep updating every second, but I'm not sure if that's the best way to approach this....

Also, since I'm using JavaFX, I was thinking of maybe using the "Animation class" but not too sure if that's needed either....

Any help or insight to figuring this out is much appreciated...

Thanks!

~JO
11 years ago