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 110 posted 3 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 150 posted 6 years ago by eiger_824
0 135 posted 7 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 254 posted 8 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 114 posted 8 years ago by rtperson
0 108 posted 8 years ago by FArcellier
0 91 posted 9 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 262 posted 9 years ago by davince
0 116 posted 9 years ago by adino
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 78 posted 9 years ago by rtperson
A implementation for itoa with c. itoa is function that convert a integer to a string.
0 116 posted 9 years ago by vikiyou
0 51 posted 9 years ago by oznek
0 68 posted 9 years ago by khajavi
i want to use it later
0 47 posted 10 years ago by iLLUMIN
Example code to exercise a Crystalfontz 533 display from a 8051 using Keil C51.
0 92 posted 10 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 85 posted 10 years ago by jimfred
This program show two columns of temperature. In left - t of celsius, in right - t. of fahr.
0 55 posted 10 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 123 posted 10 years ago by Menda
0 69 posted 10 years ago by tandouri
CGI
0 72 posted 10 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 75 posted 10 years ago by wearetherock
Compile, put exe in cgi-bin folder, and post form data to it.
0 78 posted 10 years ago by Zufolek
0 45 posted 11 years ago by edgsv
/** * @brief 给定n个整数,求一个最小的数,使得它们除以这个数的余数不重复 * @author soulmachine * @param[in] numbers 整数数组 * @param[in] count 整数个数 * @param[in] max_norm 模的最大值 * @return...
0 94 posted 11 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 79 posted 11 years ago by jimfred
This uses the concatenation operator "##" to insert a comment "//"
0 175 posted 11 years ago by jimfred
Código en C con Ensamblador para GCC
0 89 posted 11 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 64 posted 11 years ago by pckujawa
0 121 posted 11 years ago by tkf
« Prev 1 Next »