title | description | date | categories | slug | |
---|---|---|---|---|---|
QQ协议分析 |
QQ协议分析 |
2014-04-16 |
|
qq-protocol |
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 python3 | |
import requests | |
from bs4 import BeautifulSoup | |
import sqlite3 | |
from pathvalidate import sanitize_filepath, sanitize_filename | |
import os | |
def start(): |
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.example.five_chess; | |
import android.content.Context; | |
import android.content.DialogInterface; | |
import android.graphics.Color; | |
import android.os.Bundle; | |
import android.util.DisplayMetrics; | |
import android.util.Log; | |
import android.view.View; | |
import android.widget.Button; |
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
<repositories> | |
<repository> | |
<id>lib</id> | |
<releases> | |
<enabled>true</enabled> | |
<checksumPolicy>ignore</checksumPolicy> | |
</releases> | |
<snapshots> | |
<enabled>false</enabled> | |
</snapshots> |
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
select *,from_unixtime(dateline) from ims_checkin_payment where status = 1 and tid like '20180227%' order by dateline desc; | |
select *,from_unixtime(dateline) from ims_checkin_payment where status = 1 and tid like '20180228%' order by dateline desc; | |
create table ims_checkin_payment_20180228 as select * from ims_checkin_payment; | |
insert into ims_checkin_payment (uid, rid, uniacid, tid, amount,dateline, status,weixin_order_id,merchant_order_id) | |
select uid, rid, uniacid, tid, amount,'1519783300', status,weixin_order_id,merchant_order_id | |
from ims_checkin_payment where status = 1 and tid like '20180227%'; | |
select *,from_unixtime(dateline) from ims_checkin_payment where status = 1 and tid like '20180227%' and dateline='1519783300' or status = 1 and tid like '20180228%' order by dateline desc; |
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
var connectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=d:\\ExcelWorkBook.xls;Extended Properties=Excel 8.0"; | |
using (var excelConnection = new OleDbConnection(connectionString)) | |
{ | |
// The excel file does not need to exist, opening the connection will create the | |
// excel file for you | |
excelConnection.Open(); | |
// data is an object so it works with DBNull.Value | |
object propertyOneValue = "cool!"; | |
object propertyTwoValue = "testing"; |
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
npm config set msvs_version 2015 |
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
$.fn.smartFloat = function() { | |
var position = function(element) { | |
var top = element.position().top, pos = element.css("position"); | |
$(window).scroll(function() { | |
var scrolls = $(this).scrollTop(); | |
if (scrolls > top) { | |
if (window.XMLHttpRequest) { | |
element.css({ | |
position: "fixed", | |
top: 0 |
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
_.templateSettings = { | |
interpolate : /\{\{(.+?)\}\}/g, // print value: {{ value_name }} | |
evaluate : /\{%([\s\S]+?)%\}/g, // excute code: {% code_to_execute %} | |
escape : /\{%-([\s\S]+?)%\}/g // excape HTML: {%- <script> %} prints <script> | |
}; |
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
public class Utils | |
{ | |
public static object DataTableToObject(DataTable dataTable) | |
{ | |
var list = new List<object>(); | |
foreach (DataRow row in dataTable.Rows) | |
{ | |
var pairList = new List<KeyValuePair<string, object>>(); | |
foreach (DataColumn column in dataTable.Columns) | |
{ |
NewerOlder