This file contains 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 <stdint.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <errno.h> | |
#include <fcntl.h> | |
#define STRIPESIZE (64 * 1024) | |
#define BUFSIZE (2 * STRIPESIZE) | |
#define MIB16 (16 * 1024 * 1024) |
This file contains 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
<?php | |
header('Content-type: text/plain; charset=utf-8'); | |
$sql = <<<SQL | |
DROP TABLE IF EXISTS `xkcd`; | |
CREATE TABLE `xkcd` ( | |
`id` int(11) NOT NULL DEFAULT '0', | |
`date` date DEFAULT NULL, | |
`image` text CHARACTER SET utf8, | |
`title` text CHARACTER SET utf8, |
This file contains 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 <string.h> | |
#include <errno.h> | |
typedef struct stack | |
{ | |
int data; | |
struct stack *next; | |
} stack; |
This file contains 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
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
namespace Sorting | |
{ | |
/// <summary> | |
/// A stable, adaptive, iterative mergesort that requires far fewer than | |
/// n lg(n) comparisons when running on partially sorted arrays, while |
This file contains 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
#!/bin/sh | |
echo "Space free" | |
df -h | head -n 2 | |
echo "Removing foreign man pages" | |
find /usr/share/man -type d -not -name man* | |
echo "Removing gtk docs" | |
rm -rf /usr/share/gtk-doc |
This file contains 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> | |
int main(int argc, char** argv) { | |
int i, sum = 0; | |
for(i = 0; i < 1000; i++) | |
if(i%3 == 0 || i%5 == 0) | |
sum += i; | |
printf("%d\n", sum); | |
} |
This file contains 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
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Drawing; | |
using System.Drawing.Imaging; | |
using System.IO; | |
using System.Runtime.InteropServices; | |
namespace Jpeg | |
{ |
This file contains 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
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Linq; | |
public class PermuteEnumerator<T> | |
: IEnumerator<IEnumerable<T>> | |
where T : IComparable | |
{ |
This file contains 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 <emmintrin.h> | |
typedef unsigned char uint8; | |
typedef unsigned int uint32; | |
typedef unsigned long long uint64; | |
typedef struct MD5Data | |
{ | |
__m128i h0, h1, h2, h3; | |
} MD5Data; |
This file contains 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
static class LinearRegression | |
{ | |
double[] independent; | |
double[] independentDiff; | |
double independentDiffSquaredSum; | |
double independentMean; | |
double[] calculate(double[] values) | |
{ | |
if (values.length != independent.length) |
OlderNewer