$ sudo npm install -g hexo-cli
$ hexo -v
hexo-cli: 0.1.9
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
import re | |
pattern = r''' | |
^ | |
(?!1582-10-(0[5-9]|1[0-4])$) | |
(?: | |
# 匹配31天的月份 | |
(?: | |
(?!1582-10) | |
(?:[0-2]\d{3})-(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01]) |
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
class Solution { | |
// 头插法 | |
public ListNode reverseList(ListNode head) { | |
ListNode dummy = new ListNode(-1); | |
dummy.next = head; | |
ListNode pre = dummy; | |
ListNode cur = head; | |
while (cur!=null && cur.next!=null) { |
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
// Leetcode 92 反转链表II | |
class Solution { | |
public ListNode reverseBetween(ListNode head, int left, int right) { | |
ListNode dummy = new ListNode(-1); | |
dummy.next = head; | |
ListNode pre = dummy; | |
ListNode cur = dummy.next; | |
for (int i = 0; i < left-1; i++) { | |
pre = pre.next; |
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
" VIM Configuration File | |
" Description: Optimized for C/C++ development, but useful also for other things. | |
" Author: Gerhard Gappmeier | |
" | |
" set UTF-8 encoding | |
set enc=utf-8 | |
set fenc=utf-8 | |
set termencoding=utf-8 | |
" disable vi compatibility (emulation of old bugs) |
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> | |
#include <stdlib.h> | |
#include <sys/stat.h> | |
#include <string.h> | |
#include <errno.h> | |
int main(int argc, char *argv[]) | |
{ | |
char *name = "Ch"; | |
int num; |
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
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
# Path to your oh-my-zsh installation. | |
export ZSH="/Users/xuzheng/.oh-my-zsh" | |
# Set name of the theme to load --- if set to "random", it will | |
# load a random theme each time oh-my-zsh is loaded, in which case, | |
# to know which specific one was loaded, run: echo $RANDOM_THEME | |
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes |
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
import requests | |
from bs4 import BeautifulSoup | |
from pathlib import Path | |
url = "https://cs186berkeley.net/" | |
folder = Path("/Users/xuzheng/Desktop/self/cs186-database/test/") | |
pdfs = [] | |
r = requests.get(url) | |
html = r.text | |
bs = BeautifulSoup(html, 'html.parser') |