You can pass to the Python interpreter a one-liner, such as this one:
python -c 'print "hello"'
You can even do fancy things like this:
python -c "import os; print os.listdir('.')"
But it seems you cannot do loops within the line:
python -c "import os; for i in…
This is just neat. Wikipedia has a category of algorithms on strings. It seems fairly complete as well. Clearly, there are smart people out there who care.
Wikipedia impresses me more and more every day.
Expert Opinion and Ernie’s 3D pancake talk about the fact that Computer Science, as a field, might be doomed because no discipline at a large scale requires computer science, certainly not programming as we teach it.
I’d like to draw a comparison with Physics. Physics didn’t become…
Through Cafe con Leche and other sources including W3C mailing lists, we learned that the W3C XQuery and XSL working groups have published a bunch of new recommendations regarding XQuery 1.0, XSLT 2, and XPath 2.
XSLT 2.0 is interesting because all those who had to use XSLT 1.0 for real work needed…
One of the great thing about the Firefox browser are extensions.
Here are my favorite extensions so far:
SpellBound: adds spell checking to web forms. Hard to install, very easy to use.- UserAgentSwitcher: when you want to pass Firefox as another browser. Not a great implementation since you…
I wonder what my American readers think of this Times Argus article:
It is not a question of “if,” but rather “when,” the middle class will be priced out of access to higher education. The trends are clear: current costs are staggering, causing families and students to take on debt that…
Ok, the real reason behind this post is so I can easily find the link on how to change the “From” address in Gmail. The other reason of this post is to observe that Gmail is translated in about 50 languages, but they cheat. If you switch to French, you no longer can switch your “From”…
Is Computer Science a science? My mind is set on this debate and I’m not interested in debating it.
Most of my papers have an experimental section, but does it follow I do science? Actually, I spend a lot of time crafting my experiments so it is an integral part of my research. However, most of…
Will is reporting on the upcoming death of print media: the current year seems to be a bad year for the printed media. The problem, of course, is that there are many good journalists who earn their salary by writting articles for newspapers. I think they are safe since I still enjoy very much…
Slashdot points out this CNN article where we learn that the Massachusetts Institute of Technology fired an associate professor for falsifying research data. The fellow is named Luk Van Parijs and a quick search on Google doesn’t bring up his home page and even archive.org has no trace of the…
A fact that we teach in our OLAP class is that you can’t take the average of averages and hope it will match the average. This is a common enough mistake for people working with databases and doing number crunching. It is only true if all of the averages are computed over sets having the same…
I’ve installed Boriel’s Capcha! Plugin in my copy of wordpress. “Captcha” is the acronym for completely automated public Turing test to tell computers and humans apart (see wikipedia entry). It worked well so far, but I had two issues during the installation:
The “TMP Folder” where…