background preloader

Programming

Facebook Twitter

Web

Learn You a Haskell for Great Good! - Chapters. Changing commit message of a revision in Mercurial. About 2-3 months back I started using Mercurial for version control.

Changing commit message of a revision in Mercurial

If you have not heard of Mercurial before, this post will not be of any interest to you. Just know that Mercurial is great and I strongly recommend it if in your work you feel the need to keep different versions of a file at different points of time, and the way you do this is by saving the file under different names. See here for more information on Mercurial. For the rest, read below. As I started with Mercurial, from the very beginning I had a feeling that one day I would make a mistake in recording the message that accompanies a commit. Install histedit. In the first column of this file, replace the word pick with the word edit in the row corresponding to the changeset whose commit message you want to edit.

Hg Init: a Mercurial tutorial by Joel Spolsky. Go for Java programmers. This text is intended to help Java programmers come up to speed quickly with Go.

Go for Java programmers

It starts with an example highlighting features easily recognized by all Java programmers, then gives a fairly detailed description of Go’s building blocks, and ends with an example illustrating constructs that have no immediate counterpart in Java. Hello stack (example) To whet your appetite, we start with a small but complete and idiomatic example corresponding to this Stack.java program. Comments that appear directly before top-level declarations are documentation comments. They are written in plain text. And here is a Hello world program demonstrating how to use the collection.Stack abstract data type. The test package collection_test resides in the same directory as the collection package. Conceptual differences Go does not have classes with constructors. Syntax Declarations The declaration syntax is reversed compared to Java. Var ( n int x float64 ) func f(i, j, k int, s, t string) var v9 = *v2. Clockwise/Spiral Rule. [This was posted to comp.lang.c by its author, David Anderson, on 1994-05-06.]

Clockwise/Spiral Rule

There is a technique known as the ``Clockwise/Spiral Rule'' which enables any C programmer to parse in their head any C declaration! There are three simple steps to follow: Starting with the unknown element, move in a spiral/clockwise direction; when ecountering the following elements replace them with the corresponding english statements: [X] or [] => Array X size of... or Array undefined size of... (type1, type2) => function passing type1 and type2 returning... * => pointer(s) to... Keep doing this in a spiral/clockwise direction until all tokens have been covered.

Example #1: Simple declaration +-------+ | +-+ | | ^ | | char *str[10]; ^ ^ | | | +---+ | +-----------+ Question we ask ourselves: What is str? ``str is an... We move in a spiral clockwise direction starting with `str' and the first character we see is a `[' so, that means we have an array, so... Eclipse - The Eclipse Foundation open source community website.

Python

Java. Android.