A simple pi program

This is pi.c, a simple program for calculating the digits of pi using Machin’s formula. The program supposes use of Linux/gcc on an i386 machine. It uses gcc’s ‘long long’ datatype (integers of 64 bits). Compile with cc -o pi -O2 pi.c The default precision of the calculation is 10,000 digits. Change this by means […]

Read More Author Posted in

New multilingual UTF-8 input methods for Linux

1. UTF-8 + Japanese in Mozilla The uim system (‘Universal Input Method’) can be used as your Japanese conversion interface program. It is an alternative to im-ja (and the now-obsolete kinput2).  anthy can be used as the conversion engine (replacing canna, skk, etc.). With the uim/anthy combination you can get Japanese input in GTK2 programs, […]

Read More Author Posted in

PlayFair

A fairly fast Playfair program which I made will solve Stage 6 of the Singh Cipher Challenge in about 2 seconds on an 800 MHz PC (times ranging from 0.9 seconds to 3 seconds). Download source code (with an ms-dos executable) here. This program works with the method of Simulated Annealing. It cannot guarantee a […]

Read More Author Posted in

JWS’s Puzzle and Cipher Programs

This is the pentomino puzzle. It is often sold as a plastic puzzle. The 12 pieces are all the possible forms that can be made out of five squares (hence the name ‘pentomino’, by analogy from ‘domino’ which is a shape made of two squares). The object of the puzzle is to fit all the […]

Read More Author Posted in

Multiple audio streams in Debian

In modern (June 2007) Debian Sid, multiple simultaneous audio streams are supported ‘out of the box’ using the ‘dmix plugin’, whatever that is. You do not have to configure it. The only problem is, it does not work with mplayer audio streams. I found the solution through the Alsa Wiki. To get sound in mplayer […]

Read More Author Posted in

Stopping leakage from the LAN

Or, how to avoid unwanted DNS lookups I have a local network at home with two Linux machines and one Windows (Win95) box. One of the Linux boxes is the gateway to the Internet, with masquerading / firewall / mail server / http junk filtering functions. The gateway (mizar) is an old Pentium which I […]

Read More Author Posted in

A wiki on a home gateway

A wiki is (a part of) a website that people can write to, as well as read. It is a fun way to exchange information with family, friends, and colleagues. And yes, with the rest of the world too. This means there is a certain risk that evildoers will deface your wiki, but in practice […]

Read More Author Posted in

Multilingual text on Linux

1. Unicode Traditionally, for storing texts in various languages, special encoding methods are used, for instance Latin-1 (1 byte per character) for West-European languages with accented letters, KOI-8 for Russian, or EUC-JP (2 bytes per character) for Japanese. Only very limited ‘mixing’ of languages (using them together in the same document) is possible in these […]

Read More Author Posted in

Calculating impact forces, or the theory of bouncing bodies

MATHML This page contains some formulas in MATHML coding. In fact this is my first attempt at MATHML. MATHML is too elaborate to write by hand. So the actual formulas are generated from a kind of ‘shorthand’ code (in the source code of this page) by means of a piece of Javascript called ASCIIMathML.js. You […]

Read More Author Posted in

Configuring xterm for UTF-8

The goal is to make the xterm command produce a UTF-8-capable xterm by default, using the efont fonts (with very extensive UTF-8 support, including East Asian characters). Control-RightMouseclick will produce the VT Fonts menu which lets you choose various non-default font sizes. Let’s also make a white background with black text (by default, in Debian, […]

Read More Author Posted in
Simplue WordPress theme, Copyright © 2013 DicasLivres.org Simplue WordPress theme is licensed under the GPL.