<< February, 2006 >>
SMTWTFS
1234
567891011
12131415161718
19202122232425
262728
Related Links
Search Blog

Categories
Archives
Photo Albums
RSS

Powered by
BlogCFM v1.1

25 February 2006

No Translator For You!

I purchased a USB 2.0 All In One card reader the other day to read memory sticks, SD cards, etc.  It was cheap, and when I went to install, I found the following "documentation" to be very amusing.

IMPORTANT NOTICE

1. This is a equipment to read and write memory stick. Owned it, you could stock the data with CF ? MD ? XD ? SM ? MMC ? SD ? MS. What's more, you could input to your computer the photo which was taken by digital camera.

2. Under DOS, the item would not be used. But under DOS of Windows, it's OK.

Frequently Ask Questions

Q1 ? From the computer, I could know the file is completely copied. When I plug it out, and change to other computer, nothing could be shown there? What's the problem?

A1 ? 1. Different memory stick has different data rate. If you pulled the memory card at once, maybe the data hasn't be copied completely. So, the files would be missed. So, the correct way is: After finished reading and writing, please kindly see the led in the card reader. If it stops flashing, it's ok.

           2. Under Windows 2000/XP, please adopt the safe exit program after pulled the card out.

Q2 ? My computer could not recognize Card Reader. What should I do?

A2 ? 1. Firstly, please kindly check if the card reader could be compatible with your operation system.

          2. Please go to ‘Universal Serial Bus Controllers' and see if the USB port is enabled to run. If not, please enable the USB port in BIOS, according to the manual for Motherboard.

Q3 ? After took photos by digital camera, I pulled out the CF card of out it. It's a pity that the card reader could either read or write, but asked me to format. What's the problem?

A3 ? 1. It's because the card reader is not compatible with the form the camera created. Under this situation, please don't format. You could transfer the photo to computer via the software the camera attached.

          2. When the files are transferred to the computer, please kindly format the cards in the card reader, and choose the form as ‘ FAT' or ‘FAT 16' . So, the card would gain best compatibility.

Q4 ? If we could connect the computer with several card Readers?

A4 ? Yes. But maybe there would be some problem if the drivers would not be compatible.

Q5 ? When I pulled the card reader out, the icon hadn't disappeared. What's the problem?

A5 ? Please try to click Toolbars\ View\ Refresh.

Q6 ? My operation system is Windows 2000. When using Card Reader, why is there only show a removable disk?

A6 ? It's just because you haven't installed the driver. Please pull the card reader out, and install the driver.

Q7 ? Could I insert several memory carders, and transfer data among them?

A7 ? Yes. But the transferring rate was not so quick.

Q8 ? Could we pull the card reader out when the computer is storing data?

A8 ? When the computer is storing data, please kindly wait for a moment. It's ok to pull the card reader out when the Led stopped flashing.

Q9 ? I need to insert several memory cards in my card reader. If the CF card is under reading and writing, could I pull the SD card out? Any problem?

A9 ? If your SD Card is not under reading and writing at the same time, it's no problem to pull it out as it hasn't any influence in the CF card.

Q10 ? The card reader is installed properly. Why it could be used for copying files?

A10 ? 1.  If the card is damaged, the card reader could not copy the files from it. What's more, the incorrect notes would appear in the desktop.

             2. Please check if Memory Stick or Secure Digital Card is been shifted to security.

Posted by rickroot at 8:41 AM | Link | 2 comments
19 February 2006

Incoming Mail is 90 percent spam!

Anatomy of a Mail Server

So, I run my own mail server, hosting mail for a variety of domains for myself, my friends, and some customers.
 
I was looking at the log files the other day and here's what I found:
 
In the last 7-8 days, my server accepted connections approximately 41,000 times. Each is an instance of someone trying to send mail to one or more addresses on my server.
 
I use something called RBL lists to block connections from known spammers. These RBL lists helped me immediately rejected 32,000 of those incoming connections.
 
I also use something called CHKUSER that checks to see if the recipient is valid before accepting the message. Approximately 3,000 of these incoming connections were messages for invalid users. For example, nearly 800 of them were mail for ric@arborsites.com, an email address I haven't used in 5-6 years.
 
Next, I use something called simscan, which looks at the content of each message and tries to determine if it is spam. Although I set the threshhold fairly high, about 1000 of the messages were rejected because they were either spam or contained a virus. And only 76 of them were viruses.
That means, of the 41,000 incoming connections, 36,000 were outright rejected because they were probably spam.
 
Of course, spam still gets through. I use Mozilla Thunderbird as my email client, and it tags a fair amount of incoming mail as spam too using Bayesian filtering. I train it to know what spam is and what's not, and it's pretty good about separating the spam from the non-spam.
 
Bottom line, maybe 10% of the email coming into my server is legitimate email.
 
That just sucks.
Posted by rickroot at 1:04 PM | Link | 2 comments
16 February 2006

Compiling Custom Event Gateways For Dummies

First off, let me say that I am not a java programmer.  I've done a lot of java integration in coldfusion, but that has little to do with actual java programming.

I recently had a need for a very simple event gateway - one that would basically make a CFC method call every XX seconds.  Kind of like a scheduled task, except scheduled tasks unnecessarily tax the web server and run no more often than once every minute.

There were many "GOTCHYAS" along the way in this experience and I want to share some of them.  If you, like me, are not a real java programmer, you may find some of these tips useful.

I chose to start with the DirectoryWatcher gateway - an actual working gateway that read a config file where things occurred on an interval.  In the section where it read the properties file, I removed all the properities I didn't want, leaving only two... "interval" and "callFunction" (which was originally named "changeFunction"). Then I removed all the unnecessary code that involved checking for the existence of directories and getting directory listings and such.  Then I tried to compile:

Problem #1 - no java compiler

Coldfusion includes the Java Runtime Environment (JRE), but not the SDK, which is what you need to compile things.  The solution here was simple - download the JDK from http://java.sun.com.  Make sure you get the same JDK version that coldfusion is running - in my case, 1.4.2 (technically, 1.4.2_05_b04, but Sun only made 1.4.2_10 available, the latest release, and that seemed to work).

So I got it installed and tried to compile.  And I got 24 errors.  I didn't even realize there were that many lines in the code!  Most of them said "Can't resolve symbol" or "Unable to resolve symbol" or something.  I did a little googling and found out that I needed a class path.

Problem #2 - defining your class path

Well, the java compiler is kinda stupid, and doesn't know where all the tools on your system are located, so you have to tell it by setting a classpath environment variable, or putting the classpath into the command line.  To figure out what jar files had to be included, I looked at $CFHOME/gateway/src/build.xml and saw 4 jars that had to be included, so I set my path like this:

PLATFORM NOTE:  I'm using Linux, and my shell is bash.  I'm not here to tell you how to set environment variables in UNIX shells or windows.  If you need help properly setting environment variables, you might find this classpath tutorial helpful.

export CFHOME="/opt/coldfusionmx7"
export CLASSPATH=".:/root/j2sdk/lib/tools.jar:$CFHOME/lib/cfusion.jar:$CFHOME/lib/log4j.jar:$CFHOME/runtime/lib/jrun.jar:$CFHOME/gateway/lib/examples.jar"


A couple important things to note:

  • each entry in the classpath is separated by a colon, and there should be no colon at the beginning or the end of the classpath
  • the first entry should always be a period, telling java and the java compiler to always look in the current directory.
  • The classpath must always include the tools.jar file, or pretty much nothing will work!  I forgot this part initially and it took me a bit to figure it out.

Okay, so my classpath is now set and I tried again.

Problem #3 - weird bug involving abstracting and overriding the accept() method

The DirectoryWatcher gateway example is extends the EmptyGateway class - but it also implements the FilenameFilter class.   Since i'm not doing any work with filtering filenames, I had to remove the "implements FilenameFilter" from the public class declaration in the source file.

After doing this, I compiled successfully.  Yay!  The documentation says to put it into a jar file and then place it in the gateway lib directory.

jar -cf SimpleGateway.jar SimpleGateway.class


Worked fine and I moved it to the appropriate lib folder, and restarted Coldfusion.  Consult the CF documentation for the appropriate folder, it's different if you're using CF standalone or j2ee.

So I then logged into the CF Administrator to add the Gateway Type.

Problem #4 - full java class?  What the heck does that mean?

I had no idea what to put here.  The documentation didn't help either, so I looked at the DirectoryWatcher class in the CF Admin, and it said the class was "examples.watcher.DirectoryWatcherGateway".  I looked at the source code for that class, and saw "package examples.watcher" and figured that this must be where it came from.  So I changed it from "examples.watcher" to "package com.opensourcecf.gateways", then moved my files around a bit, so that my source code path was $CFHOME/gateway/src/com/opensourcecf/gateways/SimpleGateway.java

I then recompiled without error again, copied it to the gateway lib folder, and restarted coldfusion again.

I was able to successfully add the Gateway Type using the full java class "com.opensourcecf.gateways.SimpleGateway"

What fun!

I'll be releasing my SimpleGateway class as open source, as people might find it useful, and when I do (maybe tomorrow), I'll blog about it at www.opensourcecf.com and I'll post a direct link to the blog entry here.

Posted by rickroot at 8:19 PM | Link | 8 comments
10 February 2006

Memo from HR: New "TRY SAYING" Phrases

Avoiding the use of profanities in the work place

It has been brought to management's attention that some individuals throughout the company have been using foul language during the normal conversation with their co-workers. Due to complaints received from some employees who may be easily offended, this type of language will no longer be tolerated. We do however realize the critical importance of beingable to accurately express your feelings when communicating with co-workers.

Therefore, a list of 18 New and Innovative "TRY SAYING" phrases has been provided so that proper exchange of ideas and information can continue in an effective manner.

  1. TRY SAYING: I think you could use more training.
    INSTEAD OF: You don't know what the f___ you're doing.
  2. TRY SAYING: She's an aggressive go-getter.
    INSTEAD OF: She's a ball-busting b__ch.
  3. TRY SAYING: Perhaps I can work late.
    INSTEAD OF: And when the f___ do you expect me to do this?
  4. TRY SAYING: I'm certain that isn't feasible.
    INSTEAD OF: No f______ way.
  5. TRY SAYING: Really?
    INSTEAD OF: You've got to be sh__ing me!
  6. TRY SAYING: Perhaps you should check with...
    INSTEAD OF: Tell someone who gives a sh__.
  7. TRY SAYING: I wasn't involved in the project.
    INSTEAD OF: It's not my f______ problem.
  8. TRY SAYING: That's interesting.
    INSTEAD OF: What the f___?
  9. TRY SAYING: I'm not sure this can be implemented.
    INSTEAD OF: This sh__ won't work.
  10. TRY SAYING: I'll try to schedule that.
    INSTEAD OF: Why the f____ didn't you tell me sooner?
  11. TRY SAYING: He's not familiar with the issues.
    INSTEAD OF: He's got his head up his a__.
  12. TRY SAYING: Excuse me, sir?
    INSTEAD OF: Eat sh__ and die.
  13. TRY SAYING: So you weren't happy with it?
    INSTEAD OF: Kiss my a__.
  14. TRY SAYING: I'm a bit overloaded at the moment.
    INSTEAD OF: F___ it, I'm on salary.
  15. TRY SAYING: I don't think you understand.
    INSTEAD OF: Shove it up your a__.
  16. TRY SAYING: I love a challenge.
    INSTEAD OF: This job sucks.
  17. TRY SAYING: You want me to take care of that?
    INSTEAD OF: Who the h___ died and made you boss?
  18. TRY SAYING: He's somewhat insensitive.
    INSTEAD OF: He's a pr_ck.
Thank You, Human Resources
Posted by rickroot at 7:44 AM | Link | 1 comment
08 February 2006

George Bush is a Saint

President George W. Bush was scheduled to visit the Methodist Church outside of Washington as part of his campaign.

Bush's campaign manager made a visit to the Bishop, and said to him "We've been getting a lot of bad publicity among Methodists because of Bush's position on stem cell research and the like. We'd gladly make a contribution to the church of $100,000 if during your sermon you'd say the President is a saint."

The Bishop thinks it over for a few moments and finally says, "The Church is in desperate need of funds and I will agree to do it."

Bush pompously shows up looking especially smug and as the sermon progresses the Bishop begins his homily: "George Bush is a petty, self-absorbed hypocrite and a nitwit. He is a liar, a cheat, and a low-intelligence weasel. He steals elections. He politicizes science.

He has lied about his military record and had the gall to put himself in a jet plane landing on a carrier posing before a banner stating 'Mission Accomplished.'

He invaded a country for oil and money, and is using it to lie to the American people. He continues to blur the line between church and state. Cronyism and corruption is rampant in his administration. He is the worst example of a Methodist I've ever personally known "

"But compared to Dick Cheney and the rest of his cabinet, George Bush is a saint."

Posted by rickroot at 5:14 AM | Link | 5 comments
07 February 2006

Some German Chick Is Trying To Hot Chat Me

first let me say that I don't speak german, and I don't do hot chats.

The other day I accepted an ICQ message from someone who does not speak english.  I used babelfish (an online translator) to do some translations and had a minimal conversation with her but the communication was poor and I said goodbye.

She messaged me again today, and I thought I'd share the translation of our chat transcript with you.

(13:40:04) 229907403: hi ric ich bins jill
(13:40:26) Rick Root ICQ: hi
(13:40:59) 229907403: wie alt biste noch mal
(13:41:14) 229907403: über 20 ne
(13:44:16) Rick Root ICQ: Ich bin traurig, aber ich verstehe nicht.
(13:44:54) 229907403: wwwwwwwwwaaaaaaaaaaaaaaaaaaasssssssssssssssssssssss ich auch nich
(13:45:48) Rick Root ICQ: What is nich?
(13:46:36) Rick Root ICQ: "which I also don't"?
(13:46:50) 229907403: egal ich verstehe nichts
(13:47:43) Rick Root ICQ: Where are you from?
(13:48:00) 229907403: deutschland
(13:48:06) 229907403: und du
(13:48:25) Rick Root ICQ: North Carolina, in the United States
(13:50:14) 229907403: und warum schreibst du dann auf deutsch
(13:51:15) Rick Root ICQ: Weil Sie Deutsches sprechen. Ich benutze einen Übersetzer.
(13:51:25) Rick Root ICQ:
http://babelfish.altavista.com
(13:52:02) Rick Root ICQ: Aber einige der Wörter, die Sie verwenden, übersetzen nicht gut.
(13:53:11) 229907403: verarsch mich nich
(13:56:27) Rick Root ICQ: Ah, you must be a dirty girl.

You see, that last line translates to "ass me nich" ... I don't know what "nich" means but after doing a google search for "Verarsch mich" it seems that all of the sites with that phrase are porn sites.

Learn something new every day.

Posted by rickroot at 11:05 AM | Link | 18 comments