Printing Words

Problem Given an input text file as in the example below I 1:1 Work 1:2 At 1:3 NetApp 1:4, 2:1 Is 2:2 Good 2:3, 3:1 To 3:2 See 3:3 You 3:4 Write a script that prints the output below I …

Read more »

Longest Common Sub Path

Problem Given an input text file with format as in the following example: /foo/bar/x/1/2 /foo/bar/x/3 /foo/bar/x/4/5/6 print the number of sub directory levels that are common to all paths in the file. In this case it is /foo/bar/x so the …

Read more »

Matlab Simple mex Example

Matlab mex functions can be used to extend Matlab functionality or to improve performance by using compiled code as opposed to interpreted matlab syntax. Using mex functions is explained in many places on the web however the following is a …

Read more »

Execute Windows command from Linux

Winexe can be used to invoke remote Windows commands from Unix based system like Linuxs. Follow the steps below to build and install Winexe… installation Steps Download winexe from sourceforge Copy source code to the linux machine for example: scp …

Read more »

Python Image Character Generator

I wanted to generate character images with certain size, font and color. I ended up writing the code below. I thought of sharing the code as it might be useful for some people. Here is the code # -*- coding: …

Read more »

Monitor Application on Windows

Problem I have an application on Windows running as a daemon. I want this app to keep running all the time. If the application is closed by mistake or crashes for some reason then I need a way to automatically …

Read more »

Page 1 of 2912345...1020...Last »