Mar 11

C++ Object File, Symbol Table and Name Mangling

Test_case3

In my previous post I looked at how a C++ compiler and linker act on source codes. This post I want to take one small step further and look in to an C++ object file. An object file in C++ is generated by the compiler. As was mentioned in the previous post, an object file …

Continue reading »

Mar 04

C++: Compilers and Linkers Job on Functions and Function Templates.

It’s important to know the role of the compiler and the linker. This helps not only in understanding errors but also in implementing many programming strategies. Unfortunately the roles of compilers and linkers are not uniform across compiler vendors but they are close. Here we will look at what a compiler and a linker do in …

Continue reading »

Dec 14

JAXB: An alternative serialization for Java

Java Architecture for XML Binding (JAXB) is method to convert your class objects in to XML files. I came across this concept while looking for a way to share the architecture of exchanges and queues in an AMQP system. Although Java object serialization would’ve worked I wanted a much more ‘standard’ way to share this …

Continue reading »

Oct 02

Theory behind Doppler frequency shift

Doppler

Doppler frequency shift plays a major part in wireless communications, radar and many other systems. Sometimes Doppler shift is useful, like in radar detection systems, but sometimes it’s harmful, like in mobile wireless communications systems. Calculating the Doppler shift is very trivial. , where v is the relative speed between transmitter and receiver, and the …

Continue reading »

Sep 17

Introduction to Virtual functions, Virtual Tables and Virtual Pointers in C++

VirtualFunctions3-3

If coming from Java to C++, it could be slightly confusing how function inheritance works in C++. C++ uses the notion of “virtual” functions. In C++, unless a function is declared as virtual, polymorphism will not work. Lets see how this works with a simple Base class and a Derived class. #include <iostream> #include <string> …

Continue reading »

Apr 24

Arduino with 20×4 Liquid Crystal

20x4 VFD

It seems that Arduino’s LiquidCrystal library isn’t playing that nice with 4 row displays. I was having trouble getting a 20×4 VFD to work with an Arduino on a parallel connection. It would properly display the first line, but then second line starts from the 3rd row of the display. So it goes, row 1, …

Continue reading »

Sep 25

Android Activity lifecycle demo code – with Intents and multiple Activity switching

Lifecycle3

It can be a little confusing to understand where Android Activities are started and which methods are invoked and what happens when Intents are sent and returned, restarted, etc. So in this code I overrode all the Activity lifecycle methods and put a Toast so I can see which methods are invoked at what time. …

Continue reading »

Sep 23

Android Activity Life Cycle Demo

I’m just starting with Android, and if you are a beginner like me, you probably want to understand two of main concepts of Android: Activities and Intents. You probably start off with a “Hello, World.”, so in Android that is an Activity. Anything you can see on the screen is handled by an Activity. And …

Continue reading »

Mar 06

Ubuntu Lucid Lynx (10.04) Alpha2 on MacBook Pro.

IMG_0232

For some reason I prefer Ubuntu on my iMac 27″ compared to my normal desktop. It just looks good in it. The installation is straight forward. Lucid is still alpha but it feels solid (only one more month to go anyway) and it looks good. The purple theme is gorgeous. I first installed 9.10 and …

Continue reading »

Mar 10

RANDPERM: Randomly choosing a subset of values in Matlab

This is an important functionality I use in my simulations but when I want it I always have to search for it because I forget the Matlab function name. There are lots of loopy ways using random numbers to get this done, but there is an in-built Matlab function you can use: randperm(n). I often …

Continue reading »

Older posts «