Skip to content

Instantly share code, notes, and snippets.

View cnjimbo's full-sized avatar
💭
I may be slow to respond.

Jimbo Tang cnjimbo

💭
I may be slow to respond.
View GitHub Profile
@cnjimbo
cnjimbo / SimpleLogger.cs
Last active March 21, 2017 09:15
Simple File Logger Not Simple Function,Entirely Independent. This is an open source from Microsoft patterns & practices Enterprise Library Logging Application Block //We have done lots of enhancement
//===============================================================================
#region Using
// Simple File Logger Not Simple Function,Entirely Independent
//===============================================================================
//This is an open source from Microsoft patterns & practices Enterprise Library Logging Application Block
//We have done lots of enhancement,
//===============================================================================
@cnjimbo
cnjimbo / PasswordUtility.cs
Last active March 21, 2017 09:16 — forked from tiesont/PasswordUtility.cs
This is the Crypto class from System.Web, modified to remove globalization support (which is the only dependency Crypto has on System.Web). It also adds an optional parameter to the hash and verify methods to allow callers to increase the hash iteration count. Everything else is unchanged.
using System;
using System.Runtime.CompilerServices;
using System.Security.Cryptography;
public class PasswordUtility
{
// Original Version Copyright:
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
// Original License: http://www.apache.org/licenses/LICENSE-2.0
@cnjimbo
cnjimbo / LinearRegression.js
Created April 13, 2017 07:29 — forked from jonahwilliams/LinearRegression.js
Under-fitting versus Over-fitting
function LinearRegression(data){
var X = [],
y = [];
for (var i = 0; i < data.length; i ++){
var tempX = [];
for(var j = 0; j < data[0]['x'].length; j++){
tempX.push(data[i]['x'][j]);
}
X.push(tempX);
y.push([data[i].y]);

自七月一日起,很多 VPN的App停止了服务,一大批依靠这类App提供的免费服务偶尔上facebook、twitter、youtube的兄弟姐妹们开始在朋友圈吐槽。

![](data:image/*;base64,iVBORw0KGgoAAAANSUhEUgAAAfQAAAN5CAMAAADJuTmXAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAMAUExURf////39/U5OTk9PT01NTf7//nq6euDj5ExMTIiIiFFRUVBQUFJSUvv8++Li4tPT0+jq6/f39/b29+vt7fz9/KampvytUOjo6Pr6+6/Vr7Kzs5LHkufn5/X19dvb3Pr6+tjY2Z6enuPj4/Pz8/n5+QAAAL0WK9/g4L6+vtXV1bS1taysrKCgoLGxsfb29sHBwc3Nzbm5ufLy8re3t/j4+JucnNTU1PT09Lq6utDQ0Kenp4mJienp6e/v762trZjlrO3t7cTExPDw8HR1dOzs7JKSkuXl5dfX19zc3MrKyt7e3tra2mtra1NTU3Z2dqOjo0tLS//+/vHx8erq6jMzM+vr63p6euDg4MDAwNLS0pWVle7u7t/i48PDw42NjT4+Pqqqqs7Pzy0tLaioqLu7u8bKymZmZpGRkcXFxZiYmFpaWpqamsjIyCgoKFVVVczMzHt7e5eXl25ubq+vr/28cFxcXEdHR3h4eIODg3y7fHFxcY+Pj46Ojr29vf/9/mBgYJaWljc3N2NjY4uLi1dXVzs7O4CAgH19fV5eXsbGxqWlpaSkpIG9gQkJCYaGhh0dHQICAv/6/BgYGCMjIxISEvP58+fz5//o8Nve33x8fEJCQre5u5SUlP+Aq/9flv9nm4rCirLXsmbBetjq2P/O353Mnf+Xu/3+/s/T1Y7eov+pxsvky/r8+qzUrP/2+anQqV6rcrrbuv+fwO327d7u3v9Vj8TgxP+Jsf/w9f/i7H+Rjv/F2Y7Ejvb79uPx42mOeFqBbJXhqP/b59LV1qPPo5fJl/+yzP+O

Keybase proof

I hereby claim:

  • I am 68681395 on github.
  • I am jimbotang (https://keybase.io/jimbotang) on keybase.
  • I have a public key ASC1MeFizYfjM4s4V3XUDjvykYPjewWPYstwKr6-pV2m4Qo

To claim this, I am signing this object:

a cord of bird,
一群傻鸟,
printf("一个傻鸟"),
System.Console.WriteLine("stupid bird");
system.out.println("做培训的不是好程序员");
process.stdout.write("程序员不是好老师")
这里有英语语言,汉语语言,c编程语言,c#编程语言,java编程语言,nodejs编程语言,但是没有英语编程语言,没有英语编程语言。
他们都是传递讯息的符号系统,
@cnjimbo
cnjimbo / URLSearchParams
Created December 23, 2019 08:29
A javascript lib to structure url's seach params object
let PropertiesCaseInsensitive = {
has: function has(target, prop) {
if(typeof prop === 'symbol') {
return prop in target; // pass through; or 'return;' if you want to block pass through
}
prop = prop.toLowerCase();
if(prop in target) return true;
var keys = Object.keys(target);
var i = keys.length;
while(i--) {
@cnjimbo
cnjimbo / PropertiesCaseinsensitive.user.es6
Created December 24, 2019 02:14
Case insensitive object is used to for search params of url;A javascript lib to structure url's seach params object
// ==UserScript==
// @name jsProxyTestPropertiesCaseinsensitive
// @version 2019.12.20
// @namespace https://github.com/niubilityfrontend
// @description
// @author jimbo
// @license OSL-3.0
// @supportURL https://github.com/niubilityfrontend/
// @match *:*/*
// @match *127.0.0.1*:*/*
@cnjimbo
cnjimbo / hunttingteacher.user.es6
Created December 24, 2019 02:19
Javascript: overload clean empty item of Array
//删除数组中的空元素
$.extend(Array.prototype, {
clean: function(deleteValue = "") {
for(var i = 0; i < this.length; i++) {
if(this[i] == deleteValue) {
this.splice(i, 1);
i--;
}
}
return this;
@cnjimbo
cnjimbo / hunttingteacher.user.es6
Created December 24, 2019 02:20
Javascript: overload method format of Date
let getPaddedComp = comp => parseInt(comp) < 10 ? '0' + comp : comp,
o = {
"[y|Y]{4}": date => date.getFullYear(), // year
"[y|Y]{2}": date => date.getFullYear().toString().slice(2), // year
"MM": date => getPaddedComp(date.getMonth() + 1), //month
"M": date => date.getMonth() + 1, //month
"[d|D]{2}": date => getPaddedComp(date.getDate()), //day
"[d|D]{1}": date => date.getDate(), //day
"h{2}": date => getPaddedComp(
(date.getHours() > 12) ? date.getHours() % 12 : date.getHours()), //hour