114
votes
9answers
4k views

Seeking clarification on apparent contradictions regarding weakly typed languages

I think I understand strong typing, but every time I look for examples for what is weak typing I end up finding examples of programming languages that simply coerce/convert types automatically. For ...
52
votes
10answers
30k views

How can I download all emails with attachments from Gmail?

How do I connect to Gmail and determine which messages have attachments? I then want to download each attachment, printing out the Subject: and From: for each message as I process it.
58
votes
9answers
5k views

How to reliably guess the encoding between MacRoman, CP1252, Latin1, UTF-8, and ASCII

At work it seems like no week ever passes without some encoding-related conniption, calamity, or catastrophe. The problem usually derives from programmers who think they can reliably process a “text” ...
4
votes
4answers
12k views

How should I call a Perl Script in Java?

I read Runtime.getRuntime().exec("perl script.pl") is an option, but is this the best way to do it? I'll need an answer from that script, so I'll have to read the script's return in some cases, ...
41
votes
35answers
14k views

Why learn Perl, Python, Ruby if the company is using C++, C# or Java as the application language?

I wonder why would a C++, C#, Java developer want to learn a dynamic language? Assuming the company won't switch its main development language from C++/C#/Java to a dynamic one what use is there for ...
10
votes
8answers
16k views

How can I call Perl from Java?

I have a Perl module that I would like to use from Java. Is there a way to call this code using either ActiveState Perl on Windows or the generic Perl that comes with Linux? I have found references to ...
6
votes
7answers
2k views

Include Perl in Java

Is there any way to execute perl code without having to use Runtime.getRuntime.exec("..."); (parse in java app)?
8
votes
2answers
1k views

Tool to convert regex between different language syntaxes?

Is there a tool to convert a regex from one popular language's syntax to another? For example a Python-style regex to a Java-style regex?. Or at least, has someone put together a set of rules to do ...
7
votes
6answers
2k views

What's a good library to manipulate Apache2 config files?

I'd like to create a script to manipulate Apache2 configuration directly, reading and writing its properties (like adding a new VirtualHost, changing settings of one that already exists). Are there ...
5
votes
3answers
5k views

How can I set the file-read buffer size in Perl to optimize it for large files?

I understand that both Java and Perl try quite hard to find a one-size-fits all default buffer size when reading in files, but I find their choices to be increasingly antiquated, and am having a ...
11
votes
2answers
3k views

Why do regular expressions in Java and Perl act differently?

My understanding is that Java's implementation of regular expressions is based on Perl's. However, in the following example, if I execute the same regex with the same string, Java and Perl return ...
4
votes
6answers
3k views

What's the best way to determine the total number of words of a file in Java?

What is the best way to find the total number of words in a text file in Java? I'm thinking Perl is the best on finding things such as this. If this is true then calling a Perl function from within ...
10
votes
0answers
10k views

JSON GUI creator/editor [duplicate]

Possible Duplicate: GUI-based or Web-based JSON editor that works like property explorer I'm using text files in JSON format as input to my java/perl programs. I would like to allow novice ...
6
votes
6answers
564 views

String manipulation vs Regexps

We are often told that Regexps are slow and should be avoided whenever possible. However, taking into account the overhead of doing some string manipulation oneself (not talking about algorithm ...
5
votes
8answers
3k views

Java equivalent of Perl's hash

I'm been using a lot Perl hashes due to super flexibility and convenient. for instance, in Perl I can do the following: $hash{AREA_CODE}->{PHONE}->{STREET_ADDR} I wondering how can I ...

1 2 3
15 30 50 per page