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
xv6 的代码不会有问题... 虽然我没有完全照抄... 不知道是漏了哪里...
一直停在这一句死循环...没法回去.
Next at t=1276429467
(0) [0x00001ffe4008] 001b:00000000c0000008 (unk. ctxt): jmp .-2 (0xc0000008) ; ebfe
IDT:
IDT[0x80]=32-Bit Trap Gate target=0x0008:0x00100290, DPL=3
GDT:
Global Descriptor Table (base=0x000000000011a020, limit=2047):
#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;
#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++];
@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"
@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 / 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

silk-jekyll-theme

A simple and beautiful jekyll theme.

screenshot

依赖:

  • ruby-jekyll
  • ruby-rdiscount
  • a javascript runtime (such as nodejs)
{
"a": 1,
"b": "22222" /* d fddf */
}
(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
@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