Welcome To Snipplr


Everyone's Recent C Snippets Tagged c



« Prev 1 Next »
These are the basic commands to use Mutex Threads in C
0 844 posted 7 years ago by msicode
Código final de la asignatura Microprocesadores y Microcontroladores de Tecnun - Universidad de Navarra (España). Curso 2013-2014. 3º Ingeniería en Sistemas de Telecomunicación.
0 1011 posted 9 years ago by eiger_824
0 938 posted 11 years ago by mlecho
This piece of code will read a hex argument such as: ff or ab from your command line and stores it as a integer
0 2073 posted 12 years ago by vdevos
Two versions of binary search -- one recursive, one iterative -- for an array of strings. Both assume that your array index fits within an integer.
0 764 posted 12 years ago by rtperson
0 680 posted 12 years ago by FArcellier
0 686 posted 12 years ago by the_coder
The General Hash Functions Library has the following mix of additive and rotative general purpose string hashing algorithms. * RS Hash Function A simple hash function from Robert Sedgwicks Algorithms in C book. I've added some simple optimization...
0 1477 posted 12 years ago by davince
Check that a given integer consists only of elements of a given set. It does a linear search through the set, so the assumption is that the set to search is relatively small. If you're chewing through a particularly large set of digits, you may want...
0 709 posted 12 years ago by rtperson
A implementation for itoa with c. itoa is function that convert a integer to a string.
0 882 posted 12 years ago by vikiyou
0 482 posted 13 years ago by oznek
0 575 posted 13 years ago by khajavi
i want to use it later
0 454 posted 13 years ago by iLLUMIN
Example code to exercise a Crystalfontz 533 display from a 8051 using Keil C51.
0 754 posted 14 years ago by jimfred
From Keil C51 examples, TEST.C: ISD51 Demo for TI MSC 1210. Polled (non-interrupt) mode. Work-around for dropped-characters related to stop-bit problem: Clear SCON1.5 (or SM2_1).
0 711 posted 14 years ago by jimfred
This program show two columns of temperature. In left - t of celsius, in right - t. of fahr.
0 517 posted 14 years ago by iLLUMIN
The original string (str) will be changed after calling this function, so if you need it make a copy of it.
0 747 posted 14 years ago by Menda
0 668 posted 14 years ago by tandouri
CGI
0 522 posted 14 years ago by renatoelias
<pre> To compile $ gcc -lXtst -lX11 Util_KeyPressSimulator.c To create shared library $ gcc -lXtst -lX11 -c Util_KeyPressSimulator.c -o Util_KeyPressSimulator.o $ gcc -lXtst -lX11 -shared -o Util_KeyPressSimulator.so Util_KeyPressSimulator.o...
0 723 posted 14 years ago by wearetherock
Compile, put exe in cgi-bin folder, and post form data to it.
0 572 posted 14 years ago by Zufolek
0 425 posted 14 years ago by edgsv
/** * @brief 给定n个整数,求一个最小的数,使得它们除以这个数的余数不重复 * @author soulmachine * @param[in] numbers 整数数组 * @param[in] count 整数个数 * @param[in] max_norm 模的最大值 * @return...
0 852 posted 14 years ago by soulmachine
Sometimes I want a complete path to a file in the current working directory to make error messages clearer. The URL has alternate approaches.
0 694 posted 15 years ago by jimfred
This uses the concatenation operator "##" to insert a comment "//"
0 2311 posted 15 years ago by jimfred
Código en C con Ensamblador para GCC
0 579 posted 15 years ago by bedomax
This routine can be used to copy the byte values of a float or double. The "isBigEndian" variable needs to be determined (most PCs are little-endian, whereas most embedded microprocessors are big-endian). Instead of using unsigned chars, it can be us...
0 656 posted 15 years ago by pckujawa
0 720 posted 15 years ago by tkf
« Prev 1 Next »