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
from pyftpdlib.authorizers import DummyAuthorizer | |
from pyftpdlib.handlers import FTPHandler | |
from pyftpdlib.servers import FTPServer | |
authorizer = DummyAuthorizer() | |
authorizer.add_user("byvoid", "pass", "/home/byvoid/ftp", perm="elradfmw") | |
handler = FTPHandler | |
handler.authorizer = authorizer |
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
fs = require("fs"); | |
path = require("path"); | |
var files = fs.readdirSync("."); | |
for (var i = 0; i < files.length; i++) { | |
var file = files[i]; | |
var ext = path.extname(file); | |
if (ext != '.ogg') { | |
continue; | |
} |
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
package main | |
import ( | |
"bufio" | |
"errors" | |
"fmt" | |
"io" | |
"math" | |
"os" | |
"strings" |
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 <iostream> | |
#include <functional> | |
using namespace std; | |
function<void()> closure() { | |
int a = 0; | |
auto func = [a]() mutable { | |
a += 1; | |
cout << a << endl; | |
}; |
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> | |
int buf = 0; | |
void func(); | |
int main() { | |
buf = 1; | |
func(); | |
printf("%d\n", buf); | |
return 0; |
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
int buf = 0; | |
void func() { | |
buf = 2; | |
/* Do something else */ | |
} |
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 "mandelbrot.h" | |
GtkLabel ** axis_imag_lables, ** axis_real_lables; | |
int numXLabels, numYLabels; | |
gboolean redrawed; | |
gboolean expose(GtkDrawingArea *drawing_area, GdkEventExpose *event, gpointer data) | |
{ | |
GtkWidget *widget = GTK_WIDGET(drawing_area); | |
GdkGC *gc = widget->style->fg_gc[GTK_WIDGET_STATE(widget)]; |
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
/* | |
* Problem: 线性规划与网络流24题 #6 最长递增子序列问题 | |
* Author: Guo Jiabao | |
* Time: 2009.7.3 13:52 | |
* State: Solved | |
* Memo: 网络最大流 动态规划 | |
*/ | |
#include <iostream> | |
#include <cstdio> | |
#include <cstdlib> |
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
/* | |
* Problem: 线性规划与网络流24题 #5 圆桌问题 | |
* Author: Guo Jiabao | |
* Time: 2009.6.27 12:59 | |
* State: Solved | |
* Memo: 网络最大流 二分图多重匹配 | |
*/ | |
#include <iostream> | |
#include <cstdio> | |
#include <cstdlib> |
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
/* | |
* Problem: 线性规划与网络流24题 #4 魔术球问题 | |
* Author: Guo Jiabao | |
* Time: 2009.6.27 12:06 | |
* State: Solved | |
* Memo: 网络最大流 最小路径覆盖 枚举答案 | |
*/ | |
#include <iostream> | |
#include <cstdio> | |
#include <cstdlib> |
NewerOlder