Jason Fox

Ranch Hand
+ Follow
since Jan 22, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Jason Fox

Using a CommConnection, you can specify the baudrate in the connection string:


Wether or not the device you're working with will respect the baudrate, parity, etc., I do not know. I can tell you that most of the phones I've worked with (mostly IDEN) usually respect the baudrate, but completely ignore any parity specs).
19 years ago
If the device you're targeting is MIDP 2.0, you can use an HttpsConnection exactly like an HttpConnection. If not, you might want to look at bouncycastle.org , and I found a link for implementing ssl in an embedded environment, which may or may not be useful: http://www.embedded.com/showArticle.jhtml?articleID=45400043
[ February 27, 2005: Message edited by: Jason Fox ]
19 years ago
They are "stored" in two separate classes. The relationship between the two clases is defined by B subclassing A, which allows B to access any protected methods or variables (there is a bit more to this point, actually, but I won't go into it unless asked) contained in A. Bottomline, A's i and B's i are two completely different variables. The distinction between b.i and super.i is implied, each refers to a different int. super.i is really just shorthand for 'an instance of my immediate superclass'.i. In this case, an object of class A. Also, in class B you could use this.i as shorthand for 'instance of this (class B) class'.i.

Hope this helps
[ January 28, 2005: Message edited by: Jason Fox ]
19 years ago
Have you tried:

?

And, if that doesn't work:

[ January 27, 2005: Message edited by: Jason Fox ]
19 years ago
I recommend replacing the deprecated getAJob() method with the new and improved methods from the Client class, including getReferral() and workFromHome(). Though I personally tend to see the C and Perl implementations of that class more than the Java.

Though, in hindsight, many of the methods from the Client class do throw the dreaded exceptions from the gov.irs.payusnow package. And since getInsurance and get401K() are both abstract, you'll need to implement those yourself.
[ January 27, 2005: Message edited by: Jason Fox ]
19 years ago
Looking at the Java 1.4 API, the only difference seems to be that (without using the set methods to redirect either) out prints to stdout (standard out) and err prints to stderr (standard error). On most systems, this will be the same thing most of the time. On my Linux box, I have tty10 setup to print out all stderr messages, and some logging applications may use stderr. One use I think is that you can redirect stderr to an error log, and then anytime the developer used System.err.print(ln) to indicate an error, it will show up in the logfile. Could somebody point me to where I can find information on wether out or err is flushed and when?
19 years ago
Well, here's my $.02.

Object Oriented can mean many things, chiefly one of two:
1. The style supports Objects in some sense
2. The style uses/supports object-oriented ideas (encapsulation, inheritance, etc., etc.)

A procedural style to me means simply a more simple top-down sort of affair. Notice, I said style, not language. Although some languages (Java comes to mind) support an OO approach, its up to the programmer to use or ignore as much or as little as you'd like. I have seen procedural-style java and OO-style c. I have even heard rumors of object-oriented Assembler, though I have never done it nor seen it.
Why not start your own timer, and then wait for something back from the server? If you still have nothing when your timer is done, close the connection, sort of your own homemade timeout.
20 years ago
That brings up a question. Does the java compiler use pointer arithmetic behind the scenes, for things like walking through arrays?
20 years ago
Couldn't you just write an implementing class, and then point your methods there via a simple object? Something like:

So that A can extend what it wants, and you can reuse the same implementation code over and over again? Just curious.
20 years ago


The Reference to Graphics (g) in paint() is currently scoped only to that method. Outside of paint(), the other methods have no idea what g refers to. Two quick ways to fix this would be to either create a global variable that holds a reference to g:


Or, change vertical and horizontal to accept an additional argument of 'Graphics', and then use that reference in each of the methods. Hope this helps.
20 years ago
One solution I've used is to add a way for your midlet suite to read out the contents of the RMS to a listening connection. I used a CommConnection to write the data to a device listening on the serial port, but using an HttpConnection to record the data on a server would work just as well. Unfortanately, this will only back up the indiviual midlet suite's RMS records. I hope this helps.
20 years ago
Real quick, the String[] args part of main means to pass in an 'array of strings'. See About's Java Array Tutorial for a better explanation of arrays than I could give. Read the tutorial (it is vital to understand arrays in Java), then come back to this post.

By allowing an array of strings to be passed from the commandline, Java allows for 'arguments' to be passed. For example:
java MyArgumentExample jason fox

passes the Strings "jason" and "fox" to my java program, to do with as I please. Quick example in action:


If run with the command ' java Example word' will print 'word', or whatever else you pass as an argument.
[ September 28, 2004: Message edited by: Jason Fox ]
20 years ago
You can execute any script files on a server simply by making an HttpConnection to them, provided the files (php or otherwise) have the correct permissions (usually something like -rx-rx-rx), are in the correct place (usually a cgi-bin) and are written to respond to a connection. If you could post more details, I can be more specific.
[ September 28, 2004: Message edited by: Jason Fox ]
20 years ago
What are you using floats for? In almost all cases, there are ways around it. Perhaps if you could post some code/ more details, I could be of assistance.
20 years ago