Technology

Writing a *NIX Shell in C

The shell will take in a maximum line length of 512 characters. Additionally it will support batch execution of commands specified in an input file. To call the shell in batch execution mode execute as: ./shell <input file> The shell will fork and execute each process as a child process so that in the event of an infinite loop the terminal can still respond to the SIGTERM command. Output...

read more

Creating a Register File using Behavioral Verilog

Behavioral Verilog is the most abstract style of Verilog code. The code looks very similar to C, but one has to remember that in hardware operations occur in parallel, and everything is running at once. This sample register file will be a 16 entries by 8-bits per entry. It will have 2 synchronous write ports, and an asynchronous read port as well as an active low asynchronous reset. ...

read more

Mean Median and Mode in C++

Yesterday I had to complete a programming exercise as part of a research internship I will be starting Nov. 2nd. I had to create a simple C++ program which would take the mean, median, and mode of a set of numbers of unknown length. I was free to implement it any which way, with the exception of using arithmetic libraries to do my mean, median, and mode computations. ...

read more

Verilog SyntaxHighlighter Brush

I was trying to add some sample Verilog code on my website, but the code syntax highlighter I use did not have a brush. I made my own Verilog brush for Alex Gorbatchev’s SyntaxHighlighter. Feel free to modify and improve the code. The only thing that I ask is that you share the modifications. ...

read more

Using a SQLite Database in Android

Using a SQLite Database in Android

This tutorial will demonstrate how to use the database adapter created in “Creating a SQLite Database in Android” to add and get data to and from the database to populate a ListView. ...

read more

Quick and easy Android HTTP POST of JSON string

There are several ways to send data across the internet to a server on the Android. I was recently working on a project and needed to send a JSON string to the server to add data to a database. Additionally in certain cases I wanted to receive data back from the server. The fastest and easiest way to do this was to use HTTP POST android library and capture the response from the server using a...

read more