Author Archives: phoxis

About phoxis

Computer Science Graduate Student

Add vertical scrollbar in wordpress.com sourcecode blocks

Sometimes I post sourcecode accompanying my posts which are long and makes the length of the post unnecessarily long. The wordpress.com sourcecode shortcode has an option collapse which you can make “true” to collapse the sourcecode box when the page … Continue reading

Posted in GNU+Linux+FOSS, Tutorials | Tagged , , | Leave a comment

Implement queue using stack

The puzzle is to implement basic queue operations with using only basic stack operations. That is, a stack object is given, we need construct a wrapper for the queue functions, insert, remove, which will only use the stack object as … Continue reading

Posted in Coding Discussions, Computer Science | Tagged , , | 4 Comments

Get list of installed packages and their details in R

When we need packages in R we install them. May be some time you wanted to have a look what packages were installed in your system and also what there version numbers are. Although rarely you would like to do … Continue reading

Posted in GNU+Linux+FOSS, Tutorials | Tagged , , | Leave a comment

Plot histogram in terminal

We had assignments to print “*”s in different formation in undergraduate class, which I never liked as they were pointless. Now I got a somewhat justifiable application, plot histogram in terminal. In the last post Generating random numbers from Normal … Continue reading

Posted in Coding Discussions, Computer Science | Tagged , , , , | 1 Comment

Generating random numbers from Normal distribution in C

I needed to write a random number generator in C which will generate random numbers from Normal Distribution (Gaussian Distribution). Without this component I couldn’t proceed to finish writing a C code for Heuristic Kalman Algorithm by Lyonnet and Toscano … Continue reading

Posted in Coding Discussions, Computer Science | Tagged , , , , | 1 Comment

C LANGUAGE UERS! Y U NO SEE STANDARDS!

I had to make this. There are people who give a damn to the standards and follow the stone age Turbo C 3.1 compiler, run programs compiled by it. In the cases for compiler dependent and undefined behaviours, they try … Continue reading

Posted in C Language, Computer Science, Humor | Tagged , , | Leave a comment

C Q&A #5: A question about assignment operation and evaluation

Here is another C code snippet question. Consider the following piece of code, and spot if there is a problem in it or not.

Posted in C Language, Computer Science | Tagged , , , | Leave a comment

Save work environment in Octave

You won’t like to loose the variables and the command history generated after hours or days of work in octave. It is a good idea to save the environment in intervals to create backup points in addition to save from … Continue reading

Posted in Tutorials | Tagged , , , | Leave a comment

phoxis.org 2012 in review

Here goes some stats of this blog for this year from wordpress.com. Not bad, but not satisfactory, the end year posting frequency was terrible. The WordPress.com stats helper monkeys prepared a 2012 annual report for this blog. Here’s an excerpt: … Continue reading

Posted in Writings | Tagged | 2 Comments

Dynamically allocating 2d array with adjacent rows in memory

In a previous post “Allocating multidimentional array at runtime in C” I have explained a technique to allocate multidimensional arrays on runtime. While playing around with OpenMPI, I came to know that while sending/receiving a buffer, it requires the elements … Continue reading

Posted in C Language, Coding Discussions, Computer Science | Tagged , , , | 2 Comments