Currently browsing category

C

GLUT-Tutorial

How to detect a Mouse Click and Mouse Motion

  Detecting Mouse Click GLUT provides a function glutMouseFunc which is responsible for detecting mouse click generated by a program. Its syntax is void glutMouseFunc(void (*func)(int button, int state, int x, int y)); Where, func –> Function that handles the mouse event i.e. when mouse click is detected, func is …

BFSGraph

Breadth First Search in C++

Breadth First Search in C++ – Algorithm and Source Code Basic Theory Breadth – first searches are performed by exploring all nodes at a given depth before proceeding to the next level. This means that all immediate children of nodes are explored before any of the children’s children are considered. …

UCsim

uCsim the 8051 simulator for SDCC

uCsim: the 8051 simulator for SDCC uCsim is a microcontroller simulator for SDCC. It is free and opensource under GNU GPL. Currently it supports MCS51 family. AVR core, Z80, HC08 and XA are supported by UNIX version only. For the 8051, the recognized types are: 51, 8051, 8751, C51, 80C51, …

assert

assert()

void assert (int expression); Evaluate assertion If the argument expression of this macro with functional form compares equal to zero (i.e., the expression is false), a message is written to the standard error device and abort is called, terminating the program execution. The specifics of the message shown depend on the specific implementation in …

arm_logo

Why am I getting a FLEXlm -15 license error, even though my license server is running?

Answer If you get the following error message on your client when you try to use a licensed feature, even though your license server has definitely been started, then the communication between the server and client has probably been blocked. “<command line>”: Error: A1439E: Cannot obtain license for “<featurename>” with license …

Depth First Search in C++ – Algorithm and Source Code

Basic Theory Depth – first searches are performed by diving downward into a tree as quickly as possible. It does this by always generating a child node from the most recently expanded node, then generating that child’s children, and so on until a goal is found or some cutoff depth …

Solution of eight queens problem in Prolog

Solution of eight queens problem in Prolog Eight queens problem is a constraint satisfaction problem. The task is to place eight queens in the 64 available squares in such a way that no queen attacks each other. So the problem can be formulated with variables x1,x2,x3,x4,x5,x6,x7,x8 and y1,y2,y3,y4,y5,y6, y7,y8; the …

Visual Prolog Program to append two list

Visual Prolog Program to append two list. Here the two list are taken by the predicate “append” and returns the appended list. To append two list a list is broken continuously until the last empty list is encountered and finally the other list is appended or joined at the end …