小知识备忘

MYSQL:

GRANT ALL PRIVILEGES ON bbs.* TO test@localhost IDENTIFIED BY 'test';

set global wait_timeout=100;

show variables like 'max_allowed_packet';

 

python IDE:

PyScripter
PyCharm
Eclipse pydev
PythonWin
IDLE

 

Java通信框架:

comet     mina     netty

 

nginx rewrite:

if ($host = "tsw202.com"){rewrite ^/(.*)$ http://www.tsw202.com/$1 permanent;}
if ($host = "tsw202.cn"){rewrite ^/(.*)$ http://www.tsw202.com/$1 permanent;}
if ( $host ~* "^(.*)\.tsw202\.cn$") { 
set $domain $1;
rewrite ^/(.*) http://$domain.tsw202.com/$1 break; 
}

 

破解小知识:

破解VC的用 IDA OllyDbg SoftSnoop Api Monitor
破解C#的用.net reflector
破解Delphi的用Dede IDA OllyDbg
破解VB的用vb_decompiler vb_injector OllyDbg

 

经纬度记录筛选:

$lat=20;
$lon=20;//执行查询,算出该用户与所有其他用户的距离,取出最近的10个
$sql='select * from users_location order by ACOS(SIN(('.$lat.' * 3.1415) / 180 ) *SIN((latitude * 3.1415) / 180 ) COS(('.$lat.' * 3.1415) / 180 ) * COS((latitude * 3.1415) / 180 ) *COS(('.$lon.' * 3.1415) / 180 - (longitude * 3.1415) / 180 ) ) * 6380 asc limit 10';

 

iframe父/子页面:

iframe中子页面给父页面的Div赋值
parent.window.document.getElementByIdx_x('id').innerHTML='';
调用父页面的方法
window.parent.window.methodName();
刷新父页面
window.parent.location.reload();
--------------------------------------------------------------
父页面调用iframe内的JS的方法,无须给iframe加id,只需用Jq选中iframe就行了
$("#id").find("iframe")[0].contentWindow.func()

 

PHP写utf8 BOM头:

fwrite($fp,"\xEF\xBB\xBF"); 
fwrite($f, pack("CCC", 0xef,0xbb,0xbf));

 

posted on   咚..咚  阅读(151)  评论(0编辑  收藏  举报

编辑推荐:
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· .NET10 - 预览版1新功能体验(一)
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

导航

统计

点击右上角即可分享
微信分享提示