This past week I started working on the index for my book on Scala and functional programming. In retrospect I wish I had written the book using LaTeX (or some other technology) rather than Markdown; I would have started this process long ago.
This is the Index entry for recursion in the third edition of Programming in Scala. :)
This is an excerpt from the Scala Cookbook (partially modified for the internet). This is Recipe 12.20, “An index of methods available to run external system commands.”
The following tables list the methods of the scala.sys.process package that you can use when running external (system) commands.
Methods to execute external commands
Table 12-1 lists the methods that you can use to execute system commands.
Table 12-1. Methods to execute system commands
For a long time I couldn't remember how to show the indexes for a database table with MySQL, but I think it's finally sunk in. Just use the MySQL
SHOW INDEX command, like this:
show index from node;
That example can be read as, "Show the indexes from the database table named
node". It assumes that you have already selected a database table, so really, a full sequence of commands to show a MySQL database table index looks like this:
Perl substring FAQ: Can you demonstrate some Perl substring examples?
As a language, Perl is very good at text processing, including dealing with strings and substrings. In this article we'll take a look at some Perl substring manipulations we can perform.
For the purposes of our Perl substring tutorial, let's assume that we have a string defined like this:
MySQL FAQ: How do I create a MySQL database table index?
Here's an example of how to create an index on a MySQL database table. In this particular example my table uses the MySQL InnoDB database engine, but that doesn't matter too much -- it just happens to be a MySQL database engine that supports foreign key relationships.
To get started, here's the SQL definition of a MySQL table I've named
A quiet little Memorial Day Sunday so far. Had a fun problem with Postgres yesterday. Here's a little ditty on what to do when you get the nasty "duplicate key" error message, and you know it's wrong.
I had an interesting circumstance happen with Postgres (PostgreSQL) and I want to remember how I fixed the problem.
Somehow I had four entries in a database table, but the key for that table thought that there were only two entries. I don't yet know how this happened, but at the time I didn't care, I just needed to get past the problem. The details of the problem, and the fix, follow.
In my case the table name was
carrier, and this table and the key were created like this: