open

How to load (open and read) an XML file in Scala

Scala FAQ: How do I load an XML file in Scala? (How do I open and read an XML file in Scala?)

I demonstrated this in my earlier Scala XML - Searching XMLNS namespaces, XPath tutorial, but you can load an XML file in Scala like this:

Scala - How to open and read files in Scala

Scala file FAQ: How do I open and read files in Scala?

When you're writing Scala scripts, you often want to read text files. Fortunately it's pretty easy to open and read from a file in Scala. You can just use an approach like this:

How to associate filename extensions with your Mac Java application

A little disappointed that I couldn't find some content on my own website, this article is essentially just a pointer to another article, so ...

Vim insert commands

Vim FAQ: What is the Vim insert command?

Short answer: Type the letter 'i' while in Vim command mode. You'll then be able to type text into your document, right where the cursor is currently positioned.

Vim insert commands

Longer answer: There are several other variations of the Vim insert command you can use:

Java file open, read, and write utilities

Java file utilities FAQ: Do you have any Java file utilities you can share?

As I was working on another Java/Swing application this weekend, I ran across my "Java file utilities" class, and I thought I'd share that class here today. It's nothing too major, but it does include Java methods that let you open, read, write, and copy files using Java.

Java "file open" and "file read" methods (examples)

Java file reading FAQ: Can you share some off-the-shelf Java methods I can use to open and read files in Java?

Sure. Taken directly from my Java file utilities article (Java file utilities to open, read, write, and copy files), here is the source code for two Java methods that let you read a text file.

A 'Perl read file into array' example

Perl read file FAQ: How can I read a file into an array in Perl (Or, Can you share a Perl read file into array example?)

One of the really cool things about Perl is that it's super-easy to read a file into a Perl array. This is really handy any time you need to read a file for any reason.

A Perl read file into array example

If you want to read a file into a Perl array, you actually only need one line of code, like this:

Perl file exists test - How to test if a file exists

Perl file exists FAQ: How can I perform a test to see if a file exists with Perl?

You can test to see if a file exists with the Perl "-e" file operator.

A Perl file exists example

Here's a short Perl "file exists" test/example:

Java URL and URLConnection example - how to read content from a URL

Question: Using Java, how can I open a URL from my program, and then read the content of that URL?

Java HttpURLConnection (how to open and read a url with Java)

On this blog I've shown a variety of ways using Java to open a URL connection, and then read data from that connection (including my "How to open and read from a URL with the Java URL and URLConnection classes" tutorial). In this example I'll show how to open a URL using the Java HttpURLConnection class.

Syndicate content