This blog is rated  R⃣ , viewer discretion is advised

Python良民证算法rev 2

以前发过一个良民证算法

现在发现了一个碉堡的新办法:

get_id = lambda s: s + '1X864209753'[int(s, 13) % 11]

来自newsmth的python版:

发信人: Andor (珍惜), 信区: Python
标  题: Re: Python的良民证算法,有 …

Posted

archive

CBSi's bitch

统计了一下属于CBS Interactive旗下的网站

bnet.com.cn           BNET 商业英才网
cnetnews.com.cn       CNET 科技资讯网
cheshi.com            网上车市
ea3w.com              万维家电网
fengniao.com          蜂鸟网 …

Posted

archive

一些感受

最近一些项目感受:

关于主管:

  1. 拿个解决方案来寻找问题。Finding a nail with a hammer?
  2. 没有客观可度量指标来盲目“优化”。

盲目造成的附加 …

Posted

archive

为神马android NFC不能模拟RFID Tag

今天研究了一下这个玩意。先说结论:

  1. Android手机的NFC芯片本质只是一个tag reader/writer,要把自身模拟成tag,需要在驱动里把自己改造成可以控制的Secure Element
  2. Galaxy Nexus的2.3 ROM可以用com …

Posted

archive

on github wiki

对github wiki的一些感受

  • wiki和source code是分开的repo。其实像google code那样内嵌的多好。

  • 由于分开的repo导致git submodule操作起来不方便。

  • markdown语法太弱。不支持anchor

  • wiki无法自动生成段落交互导航,长一点的文档就不适合了。

  • wiki pages显示不支持用户格式,比如txt之类的。

恩。总之没有完美的东西。但 …

Posted

archive

POTUS竞选者的捐款贡献来源top 5

Barack Obama

University of California $491,868
Microsoft Corp $443,748
Google Inc $357,382
DLA Piper $331,715
Harvard University $317,516

Mitt Romney
Goldman Sachs $676,080
JPMorgan Chase & Co $520,299
Morgan Stanley $513,647
Bank of America $510,728
Credit Suisse Group $427,560

Ron Paul …

Posted

archive

斐波那契数列求和

今天学习到了一个碉堡的斐波那契求和函数:

1
 2
  3
   5
    8
    13
     21
      34
       55
        89...
1235955...

1/89 == 0.011235955056179775

母函数 这种技巧都忘记好久啦。。

还有类 …

Posted

archive

[2012] Chrome v22 direct offline standalone installer download

For example, I want to download version 22.0.1229.2

Old URL, no longer works
http://dl.google.com/chrome/install/1229.2/chrome_installer.exe

New URL:
http://cache.pack.google.com/edgedl/chrome/win/22.0.1229.2_chrome_installer.exe

Fuck Google's bootstrappers downloader which is slow like shit …

Posted

archive

尼玛的portable

这货是弱智发明出来报复社会的么?

带安装器还叫个锤子便携啊?尼玛。

Posted

archive

关闭163/126的“订阅邮件”

关于email,我最早是263用户,然后sina,sina太渣了,就逃到yahoo,msn,最后定居在126,因为当时网易的CDN还是很快的。

用了这么多年,发现很多邮件找不到了,结果是 …

Posted

archive

Google造句API

http://translate.google.com/translate_a/ex?sl=zh-CN&tl=en&q=%E5%9B%A7

还是很好玩。

Posted

archive

刘翔

什么是奥运精神?奥运精神不是金牌精神,而是把来自各地的人联系团结在一起的精神。

左边是来自Great Britain的Andrew Turner,右边是来自Joma …

Posted

archive

inventions

最近看imgur有了shuffle模式,发现了这个喜闻乐见的东西。

Posted

archive

对blog的感触

看到这个帖子,觉得有些感触的。

的确,我不是那么疯狂的blog了。以前无聊的时候,一天能spam 4-5篇blog。现在个把月能撸出几篇就不错了 …

Posted

archive

好想弄一台3D打印机啊!

太爽了啊有木有!

关于3D打印机的一些简介

Home FDM 3d printers are much more affordable than the professional grade ones that can easily reach over $20,000. The quality isn't -as- good as the professional grade ones, but it's getting there.
They typically use two …

Posted

archive

pantent systems

hetman wrote:

The idea of the patent system in itself is actually quite elegant. Government grants a temporary monopoly in exchange for the public disclosure of an invention. Everyone wins! The person issued the patent can more easily profit from their invention because they can work in the open. Society …

Posted

archive

听说贴出这段文字FBI就会来查封帖子

The Gentleperson's Guide To Forum Spies

http://cryptome.org/2012/07/gent-forum-spies.htm

spies cointelpro disinformation

This recently leaked document describes modern COINTELPRO techniques for manipulating Internet forums. Observant readers may have noticed these techniques being used in familiar online forums. Part of modern media literacy includes understanding these techniques …

Posted

archive

DIY OAuth 2 library:从97KB到22行Python

最近的项目需要用代码去读取一些Google Spreadsheet的数据,看了下Google官方的Spreadsheet API,读取数据这些好说,就是xml格式我比较讨厌。于是想用alt=json这个json输出API,试用发现,对于ClientLogin(浏 …

Posted

archive

[zz]最直白的解释Higgs Boson希格斯子

科学家很难向英国政府解释清楚希格斯场,所以在1993年,英国科学部长威廉•瓦多格列佛(William Waldegrave)向科学家发起了挑战,让他们用 …

Posted

archive

replay attack on Apple IAP receipt

in this senario

Before client sends verify receipt to developer server, the receipt data can be recorded and replayed to developer server,

  1. suppose the receipt data is <receipt-something>, it's verified, and buy transaction has finished.

  2. add a space to receipt data <receipt-something><space>

  3. submit to developer server again

  4. developer server …

Posted

archive

如何让python强制认为2+2==5

让你丫的2+2不等于5!!!!

import sys
import ctypes
pyint_p = ctypes.POINTER(ctypes.c_byte*sys.getsizeof(5))
five = ctypes.cast(id(5), pyint_p)
print(2 + 2 == 5) # False
five.contents[five.contents[:].index(5)] = 4
print(2 + 2 == 5) # True (must be sufficiently large values of 2 there...)

via …

Posted

archive

[视频]成都panda taxi恶搞英皇室

youtube看这里:

youku看这里:

其实这个片子是一群留学生拍的,不是成都zf拍的。

Published on Jun 5, 2012 by Moore Mandy
We are group of Chinese students study media in the UK,we love pandas and our hometown,so we made this …

Posted

archive

360buy满意度评价自动填充脚本

['radio_option6393', 'radio_option6398', 'radio_option6403', 'radio_option6408', 'radio_option6413', 'radio_option6418', 'radio_option6423', 'radio_option6428', 'radio_option6433'].map(function(s){document.getElementById(s).checked='checked'});document.getElementById('radioq10').textContent='ok';form1.submit()

因为鼠标点击那个页面太蛋痛了。

评价大于100元的订单可以获得2个积分,蚊子肉也是肉,所 …

Posted

archive

AMOLED技术外泄。。

新闻在这里

LG和三星AMOLED核心技术外泄 或流入中国和台湾

韩国三星和LG下一代显示器面板“AM-OLED”和“WHITE-OLED”的核心技术被曝遭外泄。资料或流向中国大陆和台湾地区等韩国 …

Posted

archive

为什么现在的变压器很小[zz]

发信人: hcl (盐酸), 信区: DigiHome
标 题: 问一下现在小家电的变压器都是什么原理?
发信站: 水木社区 (Thu Jun 28 02:26:13 2012), 站内

我记得十几 …

Posted

archive

SQL纹身的女孩

SELECT DISTINCT v.fname, v.lname, i.year, i.location, i.report_file
FROM   Incident AS i
       LEFT JOIN V(ictim?)...  -- presumably v.incident_id = i.id
       LEFT JOIN Keyword AS k ON k.incident_id = i.id
WHERE  i.year BETWEEN 1947 AND 1966
AND    i.type = 'HOMICIDE'
AND    v.sex = 'F' …

Posted

archive