Skip to content

Instantly share code, notes, and snippets.

#include <windows.h>
#include <tchar.h>
#include <stdio.h>
#include <stdlib.h>
#include <process.h>
///////////////////////////1//1///111111/!
// crt_ begthrdex. cpp
// compile with: /MT
@pk13610
pk13610 / ceate_files.cpp
Last active January 10, 2022 09:59
create files on windows
#define _CRT_SECURE_NO_WARNINGS
#include <chrono>
#include <string>
#include <string.h>
#include <iostream>
#include <fstream>
#include <sys/stat.h> // stat
#include <errno.h> // errno, ENOENT, EEXIST
#include <set>
#include <iostream>
struct MyStruct
{
int kk;
bool operator<(const MyStruct & right) const
{
return kk > right.kk;
@pk13610
pk13610 / timeout.py
Last active August 29, 2015 14:22 — forked from baojie/timeout.py
from functools import wraps
import errno
import os
import signal
import time
# timeout any function in given seconds
# solution from http://stackoverflow.com/questions/2281850/timeout-function-if-it-takes-too-long-to-finish
class TimeoutError(Exception):
@pk13610
pk13610 / pipe how to.md
Last active August 29, 2015 14:06
pipe 操作注意事项

Git常用备忘.md

引自:http://blogread.cn/it/article/6282?f=sa

配置

git config --global user.name "robbin"  
git config --global user.email "fankai@gmail.com"
git config --global color.ui true
@pk13610
pk13610 / firewall.sh
Created December 10, 2013 06:39 — forked from x1a0/firewall.sh
#! /bin/bash
# Set the default policies to allow everything while we set up new rules.
# Prevents cutting yourself off when running from remote SSH.
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
# Flush any existing rules, leaving just the defaults
iptables -F

java hash map源码分析之 v put(k,v)

通过put方法了解hashmap的结构

###1. hashmap的主要成员变量table

transient Entry<K,V>[] table = (Entry<K,V>[]) EMPTY_TABLE;

简单的说:table是Entry链表的数组。如图: hashmap.table

gist test hello wode