This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <math.h> | |
#include <stdlib.h> | |
#include <inttypes.h> | |
struct Rational { | |
ssize_t numerator; | |
size_t denominator; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <math.h> | |
void gaussian(size_t const n, double A[n][n], double v[const restrict]) { | |
for( size_t k = 0; k < n-1; k++ ) { | |
/// Partial pivot | |
double cur_max = fabs(A[k][k]); | |
size_t m = k; | |
for( size_t i = k+1; i < n; i++ ) { | |
double const potential_max = fabs(A[i][k]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
/// a*b = min(a,b) | |
int min(int const a, int const b) { | |
return a < b? a : b; | |
} | |
void print_and(size_t const n, int const set[const static n]) { | |
for( size_t a=0; a < n; a++ ) { | |
for( size_t b=0; b < n; b++ ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func epsilon() float64 { | |
eps := 1.0 | |
for eps+1 > 1 { | |
eps /= 2 | |
} | |
eps *= 2 | |
return eps | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <ctype.h> | |
#include <stdlib.h> | |
#include <inttypes.h> | |
#include <stdbool.h> | |
#include <string.h> | |
#include <stdarg.h> | |
#define FOR(counter, limit) for( size_t counter = 0; counter < (limit); counter++ ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdbool.h> | |
#include <time.h> | |
struct Node { | |
struct Node *prev, *next; | |
int data; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <inttypes.h> | |
#include <time.h> | |
#include <stdbool.h> | |
#include <stdlib.h> | |
enum CardSuit { | |
SUIT_HEART, | |
SUIT_DIAMOND, | |
SUIT_SPADE, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# derivative estimator. | |
cont = True | |
while cont: | |
xs, ys = [], [] | |
while True: | |
a = input('enter X: ') | |
if len(a) < 1: | |
break | |
xs.append(float(a)) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stock void RunScript(const char[] sCode, any ...) { | |
/** | |
* Run a VScript (Credit to Timocop) | |
* | |
* @param sCode Magic | |
* @return void | |
*/ | |
static int iScriptLogic = INVALID_ENT_REFERENCE; | |
if( iScriptLogic==INVALID_ENT_REFERENCE || !IsValidEntity(iScriptLogic) ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Fdr.h>//was Fdr.h | |
Fdr fdr; //I am defining fdr as type Fdr. | |
#include <Wire.h> | |
/************************************** | |
Modems | |
*************************************** | |
The near modem is the one in the payload. The far modem is who we are talking with via satellite. | |
*************************************** |
NewerOlder