Daniel Simpson

Ranch Hand
+ Follow
since Sep 02, 2004
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Daniel Simpson

Not all users have browsers that support AJAX. Is it better to leave those users out, stick with non-ajax, or somehow give them the option? Also, doesn't ajax introduce a lot of overhead processing that may slow down a server?
I am brand new to JMF, and I was able to successfully write a simple application that played an MP3 on my computer. I want to write a very basic applet to put on my website that plays an MP3 from a folder on my server. Here is the error I get in the console when I try to view the applet:



My html page:



For the JMF MP3 Plugin, Sun says this:


For the plugin to work within a JMF application, you need to :
- ensure that jmf.jar is also in the /lib/ext directory
- run the following command:
java com.sun.media.codec.audio.mp3.JavaDecoder



I did that and opened the applet up in IE 6 and it worked! I did it in Mozilla and it didn't work. However, I tried it on a different computer using IE 6 and it didn't work. Does this mean that in order for every user to listen to it, they have to have that plugin installed and run that command? Is there anyway to avoid having them have to install the plugin? Thanks!

-Daniel
[ March 31, 2005: Message edited by: Daniel Simpson ]
16 years ago
Hey guys, I am in serious need of help. I am writing an application for a company and I want to make sure this is possible. On the server side, there is an applet that requires a login, not a problem. It then launches an applet window. What I need to do is this: have the applet window be the socket server on my website, and from a computer, write a simple application that runs via the main method, connects to the socket connection applet on the web and then sends information to the server. Is it possible to make a socket connection between an applet hosted on my website and an application running on my computer? I'm on a deadline, and any help is greatly appreciated. Thanks!
[ March 01, 2005: Message edited by: Daniel Simpson ]
16 years ago
I used a cache for my data as well, and it really helped me out in the process of reading and writing. Another advantage to caching is that it prevents corrupting the data file if the file pointer is changed when it shouldn't be by different threads. Also, keep in mind that you should always update the data file first before updating the cache. Just think if thousands of clients had changed data kept in the cache but it wasn't written to the file yet. If the program crashed and the physical file wasn't updated, you probably would be in hiding from then on.

Originally posted by Frank Verbruggen:
When name/location pair is already known in the database,
of when all fields (except the "booked" field) match the input.

This is very unclear to me since NOTHING in the DB file specifies name/location as the key for a record !


Frank, there has been much discussion on this topic, and some have felt that there needs to be some sort of unique key field in order to throw it. I actually took the opposite approach and a DuplicateKeyException was thrown if all the record's values (except customer id, don't check that one) were identical to the newly created record after trimming the record values. If so, then a DKE is thrown. I documented my decision and didn't get anything taken off because of it. It's really up to you.

Originally posted by Paula Decker:
Hi Daniel,

Congratulations! I was sure that you passed. Thanks for your helpful posts while working toward the SCJD.

I submitted mine a week ago and took the test the next day. I hope to be hearing something (hopefully positive) soon.

I noticed you said you don't have any interest in working on the SCJA until they update it. Why is that?

-Paula


Paula! Good luck with your submission! I'm sure you'll pass! Which test did you have? B&S? URLybird? SCEA costs $500 plus for the three exams and currently it is only for version 1.3. There have been rumors about it getting updated in the near future, so it would be a bummer to learn all the skills needed such as EJB and JSP and take all of it, and then have the tests upgraded. So I'll wait then.
16 years ago

Originally posted by Jared Chapman:
Good job Daniel! So what's next?


I have no interest in the SCEA until they update it. I'm just doing some freelance work for right now. Maybe I'll get into some EJB or something.
16 years ago
Oh and for those who are wondering about the choices.txt question. My choices.txt was 7 pages long and I explained in detailed my significant choices. Also, it looks like the assessor liked my GUI layout! I was nervous they might not like it.
16 years ago

Originally posted by dennis du:
What the matter about your locking?


I think it may have been that I forgot to synchronize my create method in my DataManager class. I may not have provided a good enough solution for multi-threading in RMI. I realized my mistake after submitting. My worker threads do all the searching and booking, and a new thread is spawned for every action of book or search, so it would be impossible to ever tell if a client is trying to lock a record it has already locked or if they are trying to lock a record while holding a lock. That mistake is probably what cost me. But besides that, I am very pleased with my high scores in the other categories.
16 years ago
I received my score today after waiting 10 days!!

This report shows the total 1.4 SCJD points that could have been awarded in each section, and the actual number of points you were awarded. This is provided to give you per-section feedback on your strengths. The maximum possible score is 400; the minimum to pass is 320.
General Considerations (maximum = 100): 97
Documentation (maximum = 70): 69
O-O Design (maximum = 30): 27
GUI (maximum = 40): 40
Locking (maximum = 80): 44
Data store (maximum = 40): 40
Network server (maximum = 40): 40



I want to thank Dies, Andrew M., and the rest of you who provided input! This just made my day!
16 years ago
I dynamically populated JComboBoxes for searching but I feel you guys may be trying to work past the scope of this assignment. For this assignment, the only thing being updated is the customer id field, nothing else. So there is no need to refresh the JComboBoxes after every call to update. Plus think how much overhead that would cause if you did that for every call to update (even when clients aren't changing the contractors name and location in update). My solution was to load them dynamically once at runtime and then I documented my reason why.
I know this question is merely due to a lack of patience on my part, but for some of the more recent who passed, how long did it take between the time submitting the essay and application and receiving your score online? I know Sun says 4-6 weeks, but please will someone tell me that that is wrong and it's so much shorter! Thanks!

Originally posted by Anirudha Jadhav:
hi
thanks for your reply,
I would like to know how do make the statement work with out the String concatenation operator.
thanking you...



Here's the thing, at the end, your setting the text, so no matter what, it's going to be a textual representation. You could do something like this.

Integer i = new Integer(int);
t3.setText(i.toString());

Originally posted by Mark Spritzler:
I have always recommended Apress' "Wireless Java: Developing with J2ME" by Jonathan Knudsen.

And I am not being biased because my quote and name now appear on the cover. I gave it a great review because I was programming in J2ME two days into reading the book.

Mark


I was going to get that book, but I will wait until April for edition 3 instead.
16 years ago
This might just be the most craziest code segment I have ever seen, but for reading's sake, let's add brackets to see what's happening:




Okay, now let's systematically go through this. First the for loop. 0 % any value will always be 0. So for the first iteration, when i = 0, it would be a new Object(), when i = 1, 1 % 2 = 1. So that is false, setting the reference of obj[1] = to obj[0]. The last iteration is i = 2. 2 % 2 == 0, which results in a new Object(); Okay, so we have:

1) obj[0] is a new Object, not null
2) obj[1] holds the same reference to obj[0], so that's not null either
3) obj[2] is a new Object, not null.

Now for the if statements.
1) obj[0] and obj[1] hold the same reference, that part is true. LOOK CLOSELY at the next part. You are setting obj[1]'s reference EQUAL to obj[2]. Remember, obj[2] is not null, this results in printing out "1".
2) Remember from the last if statement, obj[1] was set = to obj[2], that part is true. The next portion, obj[2] is set = to obj[0], and obj[0] isn't null, so that prints out "2".
3) obj[1] does not hold the same reference to obj[0], then you set obj[0] = to obj[1] and obj[1] does not equal null.
4)obj[0] and obj[2] hold the same reference and set it to itself so that is true resulting in printing "4".
Lastly--- obj[0] and obj[1] do not hold the same reference now, so that is false. obj[1] and obj[2] do not hold the same reference now, so that is false. obj[0] and obj[2] do hold the same reference now, so that is true.

Hope that helps! Hope that isn't too confusing!