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 <list> | |
#include <cassert> | |
#include <iostream> | |
/* use int (>= 0) to indicate vertex */ | |
struct Edge; |
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
#!/usr/bin/env python3 | |
import sys | |
from skyfield.api import load, utc | |
from datetime import datetime | |
TS_ZERO = datetime(1970, 1, 1) | |
NAMES = ['朔', '上弦', '望', '下弦'] |
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
# -------------------------------------------------------------------------------------- | |
# This is an old design. | |
# The new design is available at https://github.com/910JQK/linuxbar/blob/master/models.py | |
# -------------------------------------------------------------------------------------- | |
config | |
name varchar(64) primary | |
value varchar(255) | |
user | |
id int(8) primary auto_increment | |
mail varchar(64) unique |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script type="text/javascript" src="ruler.js"></script> | |
<script type="text/javascript"> | |
window.addEventListener('load', function(){ | |
var ctx = canvas.getContext('2d'); | |
draw_button.addEventListener('click', function(){ | |
ctx.clearRect(0, 0, 1000, 100); | |
draw(Number(max.value), Number(zoom.value), ctx); |
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 <string> | |
using std::string; | |
char data[58][58][2]; | |
void init(){ | |
data['0']['0'][0] = '0'; | |
data['0']['0'][1] = '0'; | |
data['0']['1'][0] = '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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Projection</title> | |
<script type="text/javascript"> | |
const SVG_NS = "http://www.w3.org/2000/svg"; | |
const POINT_FILTER = /\(([+-]?\d+), ?([+-]?\d+), ?([+-]?\d+)\)/; | |
const k = Math.sqrt(2)/4; | |
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 "qsort.hpp" | |
using std::cin; | |
using std::cout; | |
const int maxn = 100; | |
struct Vector { |
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> | |
using std::cin; | |
using std::cout; | |
class Matrix22 { | |
public: | |
int data[2][2]; | |
Matrix22(int a11, int a12, int a21, int a22); | |
Matrix22(const Matrix22 &matrix); |
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> | |
typedef unsigned int uint; | |
using std::cin; | |
using std::cout; | |
uint power(uint a, uint n){ | |
if(a == 1) | |
return 1; | |
if(a != 0 && n == 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>SVG Clock</title> | |
<script type="text/javascript"> | |
/* ------------------------ */ | |
/* SVG Pointer Clock by JQK */ | |
/* ------------------------ */ | |
const Hours = ['子','丑','寅','卯','辰','巳','午','未','申','酉','戌','亥']; |