A very simple implementation, expressed in C. Implements a simple circular buffer in C as a FIFO queue. Note that this allows queues of any size. #ifndef CIRCULARBUFFER_H_ #define CIRCULARBUFFER_H_ typedef struct { int * data; int * first; int * next; int max; } cbuffer_t; cbuffer_t * cBufferInit(int max); int cBufferPush(cbuffer_t *c, int data); int cBufferPop(cbuffer_t *c, int *data); #endif /*...
C# Universal Applications – Local Settings
At the point when pondering your universal applications information, one angle to consider is data lifetime. All in all, with regards to the lifetime of information, you have two alternatives: local data, which exists as long as the app that created it remains installed, and roaming data. Use settings to store application state and client inclinations. The Universal Windows Platform (UWP) gives...
Pentapod Robot first steps using IK, Gait and Blending IK
Here it is… the first steps of our pentapod. Even if the algorithm produces precise results, the servo angle do require some offsets to work smoothly … and of course better servo motors (not these cheap and unbalanced). The motion system is using a GAIT sequencer to produce the motion frames and the IK algorithm translates them into actual servo angles. Moreover a blending algorithm...
Windows 10 Hamburger menu for Universal Apps
Hamburger menu/button is a simple navigation design which we can see in most modern app platforms. In most of the default Windows 10 apps Microsoft has used this navigation pattern and also recommends it to the developers. I have found a lot of information about building such a feature in an app. Getting Started with the SplitView Control in Universal Apps Implementing an Awesome...
Obfuscation techniques for Malwares
An obfuscation technique (also called Polymorphism) is a way of constructing a malware that make it more difficult to detect. If a malware is hard to detect, it is likely to spread more widely. The following are commonly used obfuscation techniques: Self-Encryption and Self-Decryption. Some viruses can encrypt and decrypt their virus code bodies, concealing them from direct...
Markdown Typography – Windows GUI Editor
Markdown, originally written as a Perl script by John Gruber and Aaron Swartz in 2004, has caught fire and the technology has exploded into many different forms of “text to HTML” markup engines. The original Markdown code has largely been unchanged through the years, while alternative versions have come to build on it. Since the creators of Markdown don’t want anybody using the “Markdown” name...
WordPress plugin to disable the WP Admin Bar (hidewpbar)
Working on a membership site, we have to create multiple level of users. Usually we do not want the users to have access to the WP-Admin panel because it is not customized for their experience. Rather we have put everything necessary (such as edit profile page), user dashboard etc, on the front-end. For that reason we have to disable the WP Admin Bar for all except the administrators ( hidewpbar...
Linux Makefile for applications and shared libraries
Makefiles are a simple way to organize code compilation. Make is a Unix tool to simplify building program executables from many modules. make reads in rules (specified as a list of target entries) from a user created Makefile. make will only re-build things that need to be re-built (object or executables that depend on files that have been modified since the last time the objects or executables...
Sensory system in autonomous robots
A tele-supervised autonomous robot needs to have accurate information on its position, orientation, and velocity and the location of nearby obstacles (sensory system). The robot needs multiple sensors to gather all the information required and a computer to read the sensor data and make decisions based on it. Information on the robot’s environment can be acquired using laser distance sensors...
Inverse Kinematics Algorithm for Pentapod (five-legged) robot
Inverse kinematics is a much more challenging problem than forward kinematics. It is the procedure when we have a desired end effector position but need to know the joint angles required to achieve it. The solution of the inverse kinematics is computationally expensive, and usually, it takes long time for the real time control of manipulators. Singularities and nonlinearities that make the...