This file contains 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
@app.route('/', methods=['GET', 'POST']) | |
def demo(): | |
conn=pymssql.connect(host='blablabla\SQLEXPRESS',user='blabla',password='123',database='x',charset='utf8') | |
cur=conn.cursor() | |
sqlquery=u"SELECT TOP 1000 [ID],[姓名],[内容] FROM demo_db" | |
sqlquery=sqlquery.encode("utf8") | |
cur.execute(sqlquery) | |
row=cur.fetchone() | |
cts = [dict(name=row[1],ct=row[2]) for row in cur.fetchall()] | |
for i in cts: |
This file contains 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
# coding: utf-8 | |
from flask import request, g | |
from functools import wraps | |
from flask import abort, session, redirect, url_for, flash | |
from .models import Topic, Attachment | |
from . import roles | |
def require_visitor(func): | |
"""仅允许非登陆用户访问,如signin页面""" |
This file contains 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
define([ "when/parallel", "jquery" ], function (parallel, $) { | |
var tasks = [ "url1", "url2", "url3" ].map(function (url) { | |
return function () { | |
return $.get(url); | |
}; | |
}); | |
parallel(tasks) | |
.then(function (results) { |
This file contains 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 main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"net/http" | |
"net/url" | |
"os" | |
"regexp" | |
"strings" |
This file contains 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 requests | |
import re | |
import time | |
import datetime | |
import sys | |
import json | |
reload(sys) |
This file contains 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
# coding:utf-8 | |
import re | |
import requests | |
session = requests.Session() | |
# 领取 X 铜币 | |
# 每日登录奖励已领取 |
This file contains 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 main | |
import ( | |
"database/sql" | |
"encoding/json" | |
"fmt" | |
"net/http" | |
"strings" | |
"github.com/go-ini/ini" |
This file contains 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
#伪平铺特性 | |
# | |
# q w e LeftTop Max RightTop | |
# super + shift +: a s d ===> Left Center Right | |
# z x c LeftBottom unMax RightBottom | |
# | |
super + shift + {q,w,e,a,s,d,z,x,c} | |
sh -c "~/.config/sxhkd/window.sh {LT,M,RT,L,C,R,LB,U,RB}" |
This file contains 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 main | |
import ( | |
"Goose/conf" | |
"Goose/router" | |
"bytes" | |
"database/sql" | |
"fmt" | |
"html/template" | |
"io/ioutil" |
This file contains 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
import re | |
import json | |
from mitmproxy import ctx | |
from urllib.parse import quote | |
import string | |
import requests | |
def response(flow): | |
path = flow.request.path | |
if path == '/question/bat/findQuiz': |
OlderNewer