Skip to content

Instantly share code, notes, and snippets.

View JaymzZh's full-sized avatar
🎯
Focusing

Jaymz JaymzZh

🎯
Focusing
View GitHub Profile
@JaymzZh
JaymzZh / TextFileEncodingDetector.cs
Created July 4, 2016 03:13 — forked from TaoK/TextFileEncodingDetector.cs
Simple class to automatically detect text file encoding, with English-biased "best guess" heuristic based on byte patterns in the absence of BOM.
using System;
using System.Text;
using System.Text.RegularExpressions;
using System.IO;
namespace KlerksSoft
{
public static class TextFileEncodingDetector
{
/*
#!/bin/sh
### BEGIN INIT INFO
# Provides: <SERVICE_NAME>
# Required-Start: $local_fs $network $named $time $syslog
# Required-Stop: $local_fs $network $named $time $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: Script to run asp.net 5 application in background
### END INIT INFO
@JaymzZh
JaymzZh / README.md
Created January 19, 2016 00:56 — forked from mariotaku/README.md
删除当前屏幕所有微博

删除所有微博

在Chrome Dev Tools中粘贴代码到Console,就可以删除当前屏幕所有微博。经过测试一万条微博大约需要10小时的半人工操作。

每批删除大概一分钟,最多50条。

如果遇到微博的Rate limit(提示操作过快),稍等三五分钟再试即可。

@JaymzZh
JaymzZh / README-zh-cn.md
Last active January 5, 2016 01:49 — forked from zenorocha/README.md
A template for Github READMEs (Markdown) + Sublime Snippet

项目名称

TODO:来点项目描述

安装

TODO:说说项目要怎么安装

使用

@JaymzZh
JaymzZh / gist:003fcc07137dd1829294
Created November 24, 2015 03:18 — forked from philc/gist:e849b48e6c5f32592d62
A script to copy Chrome's search engine settings into Vimium's settings format
#!/bin/sh
# This script lists user defined search engines in Chromium.
# It replaces {inputEncoding}, which appears in some search engine definitions, with
# UTF-8, {google:baseURL} with the Google URL, and omits other such tokens.
# Location of Chromium's 'Web Data' SQLite3 file
CHROMIUM_WEB_DATA="$HOME/.config/chromium/Default/Web Data"
# Location to create temporary copy of 'Web Data', since the database is locked while

What is Python? State some programming language features of Python.

Python is a modern powerful interpreted language with objects, modules, threads, exceptions, and automatic memory managements. Python was introduced to the world in the year 1991 by Guido van Rossum Salient features of Python are

  • Simple & Easy: Python is simple language & easy to learn.
  • Free/open source: it means everybody can use python without purchasing license.
  • High level language: when coding in Python one need not worry about low-level details.
  • Portable: Python codes are Machine & platform independent.
  • Extensible: Python program supports usage of C/ C++ codes.
$.fn.toJSO = function () {
var obj = {},
$kids = $(this).children('[name]');
if (!$kids.length) {
return $(this).val();
}
$kids.each(function () {
var $el = $(this),
name = $el.attr('name');
if ($el.siblings("[name=" + name + "]").length) {