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
/* | |
* @author: dazzyd | |
* @email: dazzyd2#gmail.com | |
* @license: BSD license | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
void printCode( char c ) | |
{ |
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> | |
#define MAXLEN 100000 | |
#define NUMLEN 64 | |
int compare(void const *a, void const *b) { | |
return ( *(int*)a -*(int*)b ); | |
} |
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
#!/usr/bin/python | |
import http.server | |
import html | |
import io | |
import os | |
import socketserver | |
import sys | |
import urllib.parse |
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 <stdbool.h> | |
#define MAXINST 65536 // max instructions | |
#define AXISLEN 0x1FFFF | |
bool axis[AXISLEN]; // 2 * 0x10000 - 1 | |
void actU(int left, int right) { | |
// S ← S ∪ T |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<filters> | |
<!-- Railgun --> | |
<item enabled="true">t=(.+)\1{5,}</item> | |
<item enabled="true">t=[^\n\r]{65,}</item> | |
<item enabled="true">t=[,.?!、,?!]{4,}</item> | |
<item enabled="true">t=^[0-9.:/\- 年月日]+$</item> | |
<item enabled="true">t=^\d+\/\d+</item> | |
<item enabled="true">t=^\d+00</item> | |
<item enabled="true">t=^[第前][0-9一二两三四五六七八九十百千]+</item> |
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
// ==UserScript== | |
// @name 修改 Bangumi 绿标 | |
// @description 修改当日放送为绿标、去除默认绿标 | |
// @namespace http://dazzyd.org/ | |
// @version 0.2 | |
// @include http://bangumi.tv/ | |
// @include http://bgm.tv/ | |
// @include http://chii.in/ | |
// @run-at document-end | |
// ==/UserScript== |
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
% deadbeef | |
starting deadbeef 0.5.6 | |
server_start | |
loading plugins from /home/ks/.local/lib/deadbeef | |
loading plugins from /usr/lib/deadbeef | |
plug_load_all: scandir found 163 files | |
loading plugin /usr/lib/deadbeef/aac.so | |
loading plugin /usr/lib/deadbeef/adplug.so | |
loading plugin /usr/lib/deadbeef/alac.so | |
loading plugin /usr/lib/deadbeef/alsa.so |
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 <stdlib.h> | |
#include <stdio.h> | |
struct IntArray { | |
int *array; | |
int length; | |
}; | |
void IntArray_init(struct IntArray *a, const int max_length) { | |
a->array = malloc(max_length * sizeof(int)); |
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> | |
static const int B = 10; // Bag volume | |
static const int N = 5; // Item number | |
static const int A[] = {1, 2, 3, 4, 5}; // Item weight | |
static const int C[] = {3, 3, 3, 3, 3}; // Item value | |
static void knapsack_r(int *m, int *x) { | |
// Use variable from global. |
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> | |
#define ML 1024 | |
typedef struct node { | |
int n; // current edge (has put into) | |
int w; // current weight. | |
int flag[ML]; // whether V[i] is used. | |
struct node *next; |
OlderNewer