This week's book giveaway is in the iOS forum.
We're giving away four copies of Classic Computer Science Problems in Swift and have David Kopec on-line!
See this thread for details.
Win a copy of Classic Computer Science Problems in Swift this week in the iOS forum!

Lewin Chan

Ranch Hand
+ Follow
since Oct 10, 2001
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 Lewin Chan

rajeshkannan sella wrote:

This code makes message body html formatted as per API reference



I would try following the example from http://commons.apache.org/email/apidocs/org/apache/commons/mail/HtmlEmail.html; which constructs an actual HTML message, tags and all before submitting to HtmlEmail.

It seems somewhat optimistic to assume to assume that HtmlEmail can actually mark up what you have submitted as HTML (sure it might be add a couple of tags around of your text; but I would be pretty surprised if there was a full on text parser in it that understood when to make <a> tags and the like).

Try downloading the source to commons email and look at the source to HtmlEmail.

L
8 years ago
The advice to "get the disk but don't upgrade just yet" is a good one.

As the TCP stack has been pretty much re-written, if you have an "irregular" application that uses the network, it could hang the computer (not quite a BSOD, but may as well be seeing as we had to hard reset the machines.

Trillian (as of Nov) was causing this behaviour. It might not have been trillian, but the problems went away after we removed it.

This wasn't a beta or RC build version of Vista.

Your mileage will obviously vary depending on what applications you use.
11 years ago
Well, on Linux that depends on which MTA you have installed. There are quite a few choices I think, sendmail/postfix etc etc. Commonly sendmail is installed for the local user to run from the commandline. Here's an example of using that...

(
echo "To: Me <me@me.com>"
echo "From: You <you@you.com>"
echo "Subject: Here's the file I really wanted to send you"
echo
cat the_file_you_wanted_to_send
)> /usr/lib/sendmail -t

So basically here, you are using cat to print the file you wanted to send to the screen, this is redirected to the sendmail program

The -t option on sendmail is to "read message for recipients" so it parses the To/From/ lines for that info. You don't have to use it in that fashion of course, you can specify all those things on the commandline.
11 years ago
There is an NNTP Client API distributed as part of commons-net from apache (http://jakarta.apache.org/commons/)
11 years ago
Well, if it's a requirement to javadoc all "each element of the public interface of each class", then you should do it .

Regardless, it might be useful anyway to state what the defaults are if the noparam constructor is called. After all, not everyone will have access to the source when they come to use your API.

Well, it really depends on what you're doing. I assume that WinXP is your main machine, in which case I would probably split it 60/20 in favour of XP.

For the 20Gb you leave for Linux I would advocate at least 4 partitions.

/boot - 100 to 150Mb
/tmp - anything from 500Mb - 1Gb
swap - Some, probably 512Mb or similar will do.
/ - The rest of the space.

I always have a /tmp partition, as I have had bad experiences of badly behaved apps filling up /tmp and as a consequence of not having a separate partition, filling up the entire disk...

You probably don't need a separate /home partition, unless of course you are often reinstalling the OS and don't want to nuke your own files

Whatever you do, it will still quite flexible afterwards. You can also add a new disk, create a partition, and mount it as /var if the existing /var is running out of space.
11 years ago
CentOS have a 4.4 live CD I believe now, so you can try it out like the others

I use CentOS for my home server, runs fine on a standard P4 1.8Ghz, 1Gb RAM - This does much the same thing as yours does. Obviously it's RedHat in structure, if you're familiar with RH7/8/9 you'll be fine. It doesn't suffer from the relentless upgrade cycle of Fedora. Runs perfectly well on a few DL380's (DualP3) I have in my hosting centre too.

I thought Ubuntu sucked for java development. This is, no doubt, just a personal issue, I never spent that much time looking at it, but when apt-get remove lib-gcj/gcc-java wants to remove the entire desktop environment, I think that's a bad thing, and I'm not going to jump through additional hoops trying to get things setup *just so* I can do run javac and ant. There was a forum posting I looked at to fix that problem, I looked at it, and decided I couldn't be bothered, and thus ended my quick dip in the Ubuntu pool.
11 years ago
In a hosted environment yes there are costs to using java. By hosted, I mean where you aren't in full control of the machine, so you can do your own tuning. Here's just a couple of examples.

  • Obviously the hoster will want a single servlet container to handle many apps as there will be a cpu issue with each new JVM that you start
  • A badly written java webapp is much more likely to bring down the servlet container, than a similarly badly written php app (lets say).


  • [ October 07, 2006: Message edited by: Lewin Chan ]
    11 years ago
    Have you tried using telnet to that server port 25, that would be the quickest way.



    Now, there's clearly a firewall or something blocking you in the way, but the question is, is it on the server where your WAR is (e.g if that server is a Linux box, then it could be running iptables and blocking all outbound on port 25, or there's a hardware firewall connected to the network where the server sits blocking port 25.
    Neither question can be answered by any of us, unfortunately. You'll have to deal with the admin of your server.
    11 years ago
    Fixed pagefile size might be an option. (i.e. force the pagefile size to be in the range 2Gb to 2Gb rather than letting Windows manage it for you).

    ControlPanel->System->Advanced->PerforamceSettings (VirtualMemomry)

    Is the build pure java (i.e. no JNI builds going on, or usage of windows dlls). If that's the case then you could try closing the command prompt immediately after success.

    There are a few programs that can force the reclamation of memory from windows, whether they'll actually help you in this instance I don't know. You could try www.outertech.com and their cacheman product (not cachemanXP) which can do this.
    [ October 03, 2006: Message edited by: Lewin Chan ]
    11 years ago
    Well, simply put Unix has 3 access privileges, Owner, Group, Other. You can apply various rights for these 3 types using the chmod and chown command. You can find documentation on that on the web, perhaps the ubuntu website would be a good place to start (or you could try man chmod from a terminal window.

    The easiest way to see this is to open a terminal window and do ls -l in a directory with files in.



    Basically the rights you see are the 1st column, the first char indicates any special bits the file has (in this case "fred" is a directory)
    then it's 3 characters indicating the privileges from each access class "Read", "Write", "eXecute". For the sake of simplicity, the execute flag simply indicates if the file can be run as a program or not (this isn't strictly true, that will become apparent once you start reading documentation).

    The 3rd and 4th column are the owner's id and the group id respectively (in this case lchan / users).

    Taking the above listing as an example :-
    "lchan" can read/modify and execute the various tomcat-xxx scripts.
    users who are members of the group "users" may read and execute the tomcat-xxx scripts.
    other users do not have any access to these files at all.

    Now, that doesn't answer your question. What type of access to you want to control. Access to the machine?, access to various files on the machine?
    [ October 03, 2006: Message edited by: Lewin Chan ]
    11 years ago
    Are you sure you want to be generating a certificate signing request?

    From the steps you've listed, you're trying to import a certificate signing request (which is not a certificate) into your keystore.

    I would modify your steps to do either 1 of the following thigns.

    a) Don't do a -certreq, do a -export instead, and then -import
    b) still do a -certreq, but get your certificate signed by verisign and import that instead.

    Why don't you try http://portecle.sourceforge.net which puts a nice little gui wrapper around things for you

    L
    11 years ago
    It isn't free, but you could try lunarpages who have JSP hosting via resin.

    From what I've heard about it though, some people don't get very good uptime from it.
    11 years ago
    It's not that java is more scalable, it's not that .net is nicer to use or whater. It's all about deployment choice.

    If the black-shirted team in charge of the network do't want to manage Microsoft Servers, then you can't use .NET. If they're happy running Windows 2003 whatever, then you can.

    You on the other hand, if you write your J2EE APP properly, you can deploy it to any J2EE container running on any platform.

    Then, there's the issue of reliability and uptime. All my Unix-style servers have uptimes measured in the 100's of days. Think of what happens every patch tuesday on Windows.

    An apocryphal story (who knows if it's true, it probably is) follows. Let's say you're a world renowned paid-for-by-taxpayers news agency, with lots of staff in the field at any given time, running laptops submitting their news stories. The absolutely last thing you want to do, is for when these guys in the field connect back to the domain to submit their (UNSAVED of course) story is to download a couple of so-called-critical patches and automatically reboot their laptops. (Whether or not this is the fault of the Group Policy is moot, just imagine the utter chaos that ensued)
    11 years ago
    You know, I hate to rain on anyone's parade when writing shell scripts, but this exactly the kind of thing that ANT is designed for.

    For instance, you could use something like.

    11 years ago