Skip to content

Instantly share code, notes, and snippets.

View nahakyuu's full-sized avatar

nahakyuu nahakyuu

View GitHub Profile
@nahakyuu
nahakyuu / index.ts
Created September 8, 2016 09:53
数据格式转换
interface Room {
name: string;
floor: string;
unit: string;
buildId: string;
}
interface Build {
buildId: string;
unit: Array<Unit>;
}
@nahakyuu
nahakyuu / demo.html
Created June 27, 2016 09:44
显示全部
<!DOCTYPE html>
<html lang="zh-hans">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
#main {
border: 1px solid #000;
width: 200px;
@nahakyuu
nahakyuu / user.ts
Created January 18, 2016 08:32
Typescript mongoose
import * as mongoose from 'mongoose';
import Schema = mongoose.Schema;
import Document = mongoose.Document;
var UserSchema = new Schema({
name: String,
password: String,
email: String,
head: String
@nahakyuu
nahakyuu / decode.js
Last active December 23, 2015 08:09
虾米下载链接提取
module.exports = function (str ,num) {
var line = Math.floor(str.length / num);
var begin = 0;
var end = line;
var temp = [];
//切割str
for (var i = line * num - str.length; i; i++) {
temp.push(str.slice(begin, ++end));
begin = end;end += line;
}
@nahakyuu
nahakyuu / 1201.cpp
Created December 8, 2014 09:40
codevs
/*
作者:youye
题目:p1201 最小数和最大数
*/
#include <iostream>
#include <algorithm>
#include <cstdio>
using namespace std;
/*
hdu-1087
Super Jumping! Jumping! Jumping!
http://acm.hdu.edu.cn/showproblem.php?pid=1087
*/
#include <iostream>
#include <cstdio>
using namespace std;
#include <iostream>
#include <cstdio>
using namespace std;
int main(){
#ifndef ONLINE_JUDGE
freopen("in", "r", stdin);
//freopen("out", "w", stdout);
#endif