Tutorials

How to Write an HTML5 App?

A tutorial about writing HTML5 Apps, using HTML, JavaScript and CSS.

3D graphics in R (updated)

I demonstrate how to create interactive 3D surface plots in R using the rgl library, with example code showing how to customize colors and control window positioning. The resulting plots can be rotated and scaled using your mouse for exploration.

time zone aware timestamps in JavaScript and Python

I show you how to compute timezone-aware Unix timestamps in JavaScript and Python that work reliably across different timezones and daylight saving time changes by using UTC-based calculations.

using R to generate publication-quality figures

I share practical techniques for generating publication-quality figures in R that can be seamlessly integrated into LaTeX documents, covering PDF output optimization and reproducible scripting workflows.

Calculating the Square Root of a Matrix

How to use LAPACK in a C program to calculate the square root of a positive definite matrix.

Creating a Poster with TeX

How to create a conference poster using LaTeX and dvips.

Date and Time Representation in Python

understanding the different ways to represent date and time in Python

Numerical Linear Algebra Packages on Linux

Various linear algebra libraries are available for use in C programs on Linux. This page given an overview.

Setting up VServers on Debian

How to set up VServer guests on a Debian host?

Controlling the Geometry of an HTML Element

How to get/set the geometry of an HTML element?

watching DVDs on an Apple iPad

I provide a step-by-step guide to convert your personal DVDs into iPad-compatible MP4 files using open-source Linux tools like MPlayer and MEncoder. This recipe walks you through identifying the correct DVD track, detecting crop settings, and encoding the video with the proper codec and audio settings for optimal iPad playback.

LaTeX: calling a macro for every line of input

Learn how to execute a macro repeatedly for every line of text in a LaTeX environment using the obeylines macro and conditional logic to process input line by line.

using DSSP in the "bio3d" R package

I explain how to install and use the DSSP program through the bio3d R package to determine protein secondary structure from atomic coordinates. This guide covers the essential setup steps and provides a working example for analyzing protein structure data.

figures with matplotlib

I share how to configure matplotlib to create publication-ready figures for scientific papers, including font settings, figure dimensions, and margin adjustments optimized for journal layouts.

Parsing Apache Log Files with Python

I show you how to parse Apache web server log files in Python using regular expressions and convert the extracted fields into appropriate data types, including handling datetime values with timezone information.