The Simple Counter Implementation in PHP

Posted on Posted in code, implementation, php

The following is a simple counter implementation that is based on PHP, if you have a small site of low traffic, or you just want to have a very simple counter implemented in your page, and that does not need to be highly accurate. It works by reading the value from the counter text file […]

The Geo Contextual Widget of Amazon Associates

Posted on Posted in amazon, php

The Amazon Associates allow you to place a contextual widget that shows best products to your visitors. Amazon uses big data and some undisclosed intelligent algorithms to determine which products are most likely to appeal to your visitors, which is similar to the adsense contextual ads units. However, since the visitors are from different locations […]

The RDTSC Performance Timer written in C++

Posted on Posted in c / c++, code, code library, coding exercise, performance comparison

The RDTSC is the IA-32/IA-64 (or x86/x64) instruction that loads the current value of the processors’ time stamp into EDX:EAX registers. RDTSC is short for “Read Time-Stamp Counter”. It returns the number of clock cycles since last reset. The modern complier Visual Studio has implemented the compiler intrinsic so you don’t have to manually insert […]

The Simple Mortgage Calculator Implemented in C/C++, Javascript and MySQL

Posted on Posted in c / c++, javascript, mysql, tools / utilities

Although there are many available mortgage calculators out there, the principle of a simple mortgage calculator is really simple, which is based on the following math formula. where, the c is the monthly repayment, r is the monthly interests (which is the one-twelveth of the yearly interests). P is the total money borrowed. N is […]

How to Draw a Heart using CSS3?

Posted on Posted in CSS, tricks

We have seen many drawing of hearts using math equations [here] and [here], the following demonstrates how to draw (or make) a heart using the pure CSS3 techniques. First, you need to define a container, e.g. using the div and assign it with the heart class/style name. 1 <div class=’heart’></div> Now, let’s make it a […]