Skip to content

Instantly share code, notes, and snippets.

View SilverRainZ's full-sized avatar
😘
Falling in love

Shengyu Zhang SilverRainZ

😘
Falling in love
View GitHub Profile
data Matrix = Matrix {getMartix :: [[Int]]}
transpose (Matrix ([]:_)) = Matrix []
transpose (Matrix xs) = Matrix $ map head xs : getMartix (transpose $ Matrix $ map tail xs)
@SilverRainZ
SilverRainZ / .ycm_extra_conf.py
Last active December 6, 2016 08:35
Srain’s YCM configure
# This file is NOT licensed under the GPLv3, which is the license for the rest
# of YouCompleteMe.
#
# Here's the license text for this file:
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
# binary, for any purpose, commercial or non-commercial, and by any
(define (make-queue)
(cons '() '()))
(define (enqueue! queue obj)
(let ((lobj (cons obj '())))
(if (null? (car queue))
(begin
(set-car! queue lobj)
(set-cdr! queue lobj))
(begin
{
"a": 1,
"b": "22222" /* d fddf */
}

silk-jekyll-theme

A simple and beautiful jekyll theme.

screenshot

依赖:

  • ruby-jekyll
  • ruby-rdiscount
  • a javascript runtime (such as nodejs)
@SilverRainZ
SilverRainZ / a.md
Last active November 11, 2015 07:28
P y t h o n
0 1 2 3 4 5
-6 -5 -4 -3 -2 -1
First Header Second Header
Content Cell Content Cell
@SilverRainZ
SilverRainZ / create_tables.sql
Created November 2, 2015 14:03
create_tables.sql
/* MySQL compatiable */
drop table prereq;
drop table time_slot;
drop table advisor;
drop table takes;
drop table student;
drop table teaches;
drop table section;
drop table instructor;
drop table course;
@SilverRainZ
SilverRainZ / pnmixer-zh_CN.po
Last active October 22, 2015 13:16
pnmixer-zh_CN.po
# Simplified Chinese translation for pnmixer.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the pnmixer package.
# Yuexuan Gu <[email protected]>, 2015.
#
msgid ""
msgstr ""
"Project-Id-Version: pnmixer master\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-10-22 18:51+0800\n"
#include <stdio.h>
#define N 10005
int count = 0;
void Merge(int S[],int T[],int x,int m, int y)
{
int i,j,k;
for (i = x,j = m + 1,k = x;i <= m && j <= y; k++)
{
if (S[i] > S[j]) {T[k] = S[j++];count += m - i + 1;}
else T[k] = S[i++];
#include <unistd.h>
#include <stdio.h>
int main(int argc, char *argv[]){
char *cmd[] = {"/bin/ls", "/home" "\0"};
char *env[] = {"HOME=/home/la", "LOGNAME=home", "\0"};
execve("/bin/ls", cmd, env);
int ret = execve("/bin/ls", cmd, env);
return 0;