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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<title> jquery pager demo</title> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script> | |
<script type="text/javascript" src="https://raw.github.com/yoker/jquery-pager-plugins/master/jquery.pager.min.js"></script> | |
<script type="text/javascript"> | |
<!-- | |
function go(p){ | |
$("#info").html("<h1>this is "+ p + " page.</h1>"); |
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
namespace Utils | |
{ | |
/* | |
Bitmap bitmap = Utils.Html2Image.GenerateImage("<h1>标题一</h1><h2>标题二</h2><font color=\"red\">红色普通</font><br /><img src=\"https://www.google.com/images/srpr/logo4w.png\" />", 440); | |
//MemoryStream ms = new MemoryStream(); | |
//bitmap.Save(ms, System.Drawing.Imaging.ImageFormat.Png);//JPG、GIF、PNG等均可 | |
bitmap.Save(Server.MapPath("img.png"), System.Drawing.Imaging.ImageFormat.Png); | |
*/ | |
using System; | |
using System.Drawing; |
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
namespace Utils | |
{ | |
/* | |
Dictionary<string, string> texts = new Dictionary<string, string>(); | |
texts.Add("source", "app key"); | |
texts.Add("status", "post weibo test " + DateTime.Now.ToString()); | |
texts.Add("visible", "2"); | |
Dictionary<string, string> files = new Dictionary<string, string>(); | |
files.Add("G:\\Desktop\\wiki_logo.png", "image/png"); |
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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
dbstr = lambda x : x < 10 and '0' + str(x) or str(x) | |
ai = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2] | |
wi = ["1", "0", "X", "9", "8", "7", "6", "5", "4", "3", "2"] | |
cardid = "522636%(y)s%(m)s%(d)s8735" | |
for y in range(1970, 2000): | |
for m in range(1, 13): | |
for d in range(1, 31): |
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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
import socket,urllib,time,urllib2 | |
import re,StringIO,gzip | |
def gethtml(pageurl, data=None): | |
theheaders = { | |
'User-agent' : 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko)', | |
'Accept-Encoding' : 'gzip, deflate', |
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
#!/usr/bin/env python | |
#coding=utf-8 | |
import time,re,os,sys | |
def module_path(): | |
""" This will get us the program's directory, | |
even if we are frozen using py2exe""" | |
if hasattr(sys, "frozen"): |
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
package com.gkeeps.tools; | |
import java.io.BufferedReader; | |
import java.io.FileInputStream; | |
import java.io.InputStream; | |
import java.io.InputStreamReader; | |
import java.nio.charset.Charset; | |
import java.security.interfaces.RSAPrivateCrtKey; | |
import java.security.interfaces.RSAPrivateKey; | |
import java.security.interfaces.RSAPublicKey; |
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
jQuery.extend({ | |
stringify : function stringify(obj) { | |
if ("JSON" in window) { | |
return JSON.stringify(obj); | |
} | |
var t = typeof (obj); | |
if (t != "object" || obj === null) { | |
// simple data type | |
if (t == "string") obj = '"' + obj.replace(/"/g,'\\\"') + '"'; |
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
package com.gkeeps.tools; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.FileNotFoundException; | |
import java.io.IOException; | |
import java.nio.charset.Charset; | |
import java.security.MessageDigest; | |
import java.security.NoSuchAlgorithmException; |
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
@echo off | |
Title PC Wifi Helper. | |
:start | |
echo Please choose method to Dial: | |
echo 1. Create WiFi hosted | |
echo 2. Start Wifi hosted | |
echo 3. Stop Wifi hosted | |
echo x. Exit | |
choice /c 123x /n /m Select: /t 10 /d x |
OlderNewer