Snap! Websites Journal

The CSS Preprocessor adds the capability to write complex expressions and functions to use in your CSS files.

One of the functions you can use is a system function named if. It is used to select one of two expressions as shown here:

if($color = white, 33px, 145px)

This says if $color represents the color white, then use 33px, otherwise use 145px.

This works great in all cases where the true and false expressions are both calculable. If one of the expressions is to generate an error, then the if() function cannot be used. In this case, you want to use the ?: operator instead.

In the ...

The first version of csspp which with 100% coverage tests is now out. The .tar.gz is not yet available because still has a few problems... but you can grab the source from the GIT repository.

The library (and thus command line tool) include support for a very large number of internal functions, variables, user defined functions (without support for the @return yet), nested rules, nested attributes, C/C++ like expressions, arrays, maps, color operations, etc.

The expression support the following types:

  • Integer (numbers without a period)
  • Decimal number
  • ...

I looked around for a while and completely missed the fact that SASS actually offers an extension to compile CSS files from a C++ library. That being said, it was not really clear whether the feat still requires the Ruby scripting language running in the background. If so, I think that my solution: CSS Preprocessor, is going to be a lot faster and possibly easier to maintain long term.

Yes. The CSS Preprocessor project reads .scss files (i.e. files mostly compatible with SASS) and compiles them in CSS 3 that your browser can handle. Not only that, it will minify those files as much as ...

I just published libtld version 1.4.22 to include many new gTLDs and also mark a few as deprecated or correct some that were considered private and not defined by a country (or vice versa.)

This includes many of the INA accepted TLDs such as .site and .love.

It also includes many new TLDs that are in a language other than English (or at least using Latin letters.) Japan actually got 47 new domain names in Japanese. Several Arab countries and Pakistan got such domains too.

There are also many new brand extensions.

What would be required now is a better set of categories, and actually, a ...

Today, I again ran in a QASSERT(). The problem with an assert is that the software stops and voilà. Yes. The assert has a message telling me what happened (why it is asserting) and the location of the assert.

So I know it was a QList problem because of an out of range index. Good.

Only, to fix said problem, you need the location of the caller. Knowing that an assert was generated in qlist.h is hardly helpful.

Of course, most of you will say: just run your software in your debugger, then it will break when the assert happens. True, unless the assert happens in a child process you ...

Today I started work to switch from using log4cplus with files directly to using the loggingserver. Not only that, it is using the newest version (on the edge!) which is 1.2.0-rc3. Up to here, no major problem.

However, the newer version forces you to use a version of the log4cplus library which is multi-threaded. This causes a major problem because the server makes use of fork() to create child processes each time a connection is made. There are several reason to do so, but there are a couple that I think are certainly the most important ones:

  1. Having a child allocating resources can ...

The controlled_vars library allows you to define variables that you never initialize. This is very practical if you have a large number of variables or a large number of objects of a class.

The idea is pretty simple and once you remove the debug, the variable becomes 1 to 1 equivalent to a char, unsigned char, signed char, short, unsigned short, int, unsigned, long, unsigned long, etc. In other words, it goes really fast.

However, in debug mode, the class adds a bool to know whether the variable was initialized or not. If not yet initialized, you cannot read the value or you get an ...


In order to run tests against what looks like a real cluster of Cassandra nodes, one wants to create multiple nodes and run them in parallel and run their software against that cluster.

So, I decided to create two racks on two separate computers. Each computer runs 3 VMs each run one instance of Cassandra. The VMs are installed with the most basic Ubuntu server (i.e. do not add anything when offered to install LAMP and other systems), Java, and Cassandra.


Local Network

It is possible to setup a VM to make use of the local network (LAN). VirtualBox will ...


The following are instructions to get Cassandra installed on your servers.

You may also want to install Cassandra directly from a file distributed from the Cassandra website (if you want to work with a version on the edge.) In that case, the Java installation instructions still apply to you, however, the Cassandra installation then falls in your lap...

Table of Contents


Cassandra uses Java so you want to install Java first. In order to get the latest version of Java directly from Oracle, you want to install the PPA update source as follow:

sudo vim ...

Just made a new addition to the project: snapwatchdog.

This is a daemon running in the background used to gather statistics about each server running in a Snap! cluster.

The statistics are saved in an XML file1 and already include the following information:

  • CPU usage
    • Average load for 1, 5, and 15 minutes
    • Total usage in User, System, Idle modes
    • Total count of Page Cached and Swap Cache
    • Time when the system was last rebooted
    • Total number of ...
  • 1. Ready to be processed by an XSLT stylesheet to present the results to the end user.
Syndicate content

Snap! Websites
An Open Source CMS System in C++

Contact Us Directly