Skip to content

Instantly share code, notes, and snippets.

View hellojinjie's full-sized avatar
🏠
Working from home

hellojinjie hellojinjie

🏠
Working from home
View GitHub Profile
@hellojinjie
hellojinjie / 五种不同的 URL 参数解析方法的性能比较.md
Last active November 22, 2022 04:02
五种不同的 URL 参数解析方法的性能比较

五种不同的 URL 参数解析方法的性能比较

因为在我们的项目中需要解析日志中的 URL 的参数,所以我对比了一下五种不同 的 URL 参数解析方法的性能。

##URL 参数解析方法:

  1. httpclient org.apache.http.client.utils.URLEncodedUtils

#!/usr/bin/env python3
import requests
from bs4 import BeautifulSoup
import sqlite3
from pathvalidate import sanitize_filepath, sanitize_filename
import os
def start():
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;
@hellojinjie
hellojinjie / UrlParse.java
Last active August 21, 2019 06:33
五种不同的 URL 参数解析方法的性能比较
package conger;
import java.lang.reflect.Method;
import java.net.URL;
import java.net.URLDecoder;
import java.nio.charset.Charset;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.regex.Matcher;
@hellojinjie
hellojinjie / NaN.java
Last active June 25, 2018 16:22
Java 中判断 Double 是不是 NaN
// 哼,这是个坑,我会跟你说嘛。。。
Double num = Double.NaN
// :(
if (num == Double.NaN) {
System.out.println(num);
}
// :)
title description date categories slug
QQ协议分析
QQ协议分析
2014-04-16
protocol
qq-protocol

一. 文字聊天协议族(TCPF, Text Chatting Protocol Family)

<repositories>
<repository>
<id>lib</id>
<releases>
<enabled>true</enabled>
<checksumPolicy>ignore</checksumPolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
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;
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";
@hellojinjie
hellojinjie / node-gyp.cmd
Created December 25, 2017 12:10
Install tools and configuration manually: Visual C++ Build Environment: Option 1: Install Visual C++ Build Tools using the Default Install option. Option 2: Install Visual Studio 2015 (or modify an existing installation) and select Common Tools for Visual C++ during setup. This also works with the free Community and Express for Desktop editions.…
npm config set msvs_version 2015