Skip to content

Instantly share code, notes, and snippets.

@wildskyf
wildskyf / BridgeHands.cpp
Last active October 30, 2015 09:04
UVa 555
#include <stdio.h>
#include <algorithm>
#include <vector>
struct Card
{
operator int() const
{
switch(num)
{
@wildskyf
wildskyf / D_FF.vhdl
Last active November 26, 2015 16:12
VLSI HW2
library IEEE;
use IEEE.STD_LOGIC_1164.all;
entity D_FF is
port(
D: in Bit;
clk: in std_logic;
Q: out Bit
);
end D_FF;
@wildskyf
wildskyf / str_tmp.cpp
Last active December 4, 2015 08:47
This is tmp code
void String::swap(String & rhs)
{
char * tmp_str = str_;
int tmp_size = size_,
tmp_cap = capacity_ ;
str_ = rhs.str_;
size_ = rhs.size_;
capacity_ = rhs.capacity_;
var isEmptyObj = (obj) => !Object.keys(obj).length;
" # Autocommands
"
autocmd LocationChange disp\.cc/ -js modes.set(modes.PASS_THROUGH)
autocmd LocationChange (mail|www)\.google\.com/(calendar|mail|reader)/ -js modes.set(modes.PASS_THROUGH)
autocmd LocationChange docs\.google\.com/(document|present|spreadsheet) -js modes.set(modes.PASS_THROUGH)
"autocmd LocationChange mail\.yahoo\.com/ -js modes.set(modes.PASS_THROUGH)
"autocmd LocationChange github\.com/ -js modes.set(modes.PASS_THROUGH)
"autocmd LocationChange bitbucket\.org/ -js modes.set(modes.PASS_THROUGH)
autocmd LocationChange quip\.com/ -js modes.set(modes.PASS_THROUGH)
# Press up-arrow for previous matching command
"\e[A":history-search-backward
# Press down-arrow for next matching command
"\e[B":history-search-forward
# mappings for Ctrl-left-arrow and Ctrl-right-arrow for word moving
"\e[1;5C": forward-word
"\e[1;5D": backward-word
"\e[5C": forward-word
"\e[5D": backward-word