google 安全查询设置
chrome浏览器中 search选项
增加
设置为默认
那么地址栏中默认会使用安全搜索。
另外 http://www.williamlong.info/archives/2186.html 也可以
Continue reading google 安全查询设置
chrome浏览器中 search选项
增加
设置为默认
那么地址栏中默认会使用安全搜索。
另外 http://www.williamlong.info/archives/2186.html 也可以
Continue reading google 安全查询设置
see this link
https://illuminatikarate.com/blog/finding-the-carrier-of-a-cell-phone-number-in-php/
but it seems that the CloudVox have been shutdown.
I have not found a good solution yet, just get some free web page like:
http://www.phonevalidator.com/results.aspx?p=7776665555
or
http://www.whitepages.com/phone/1-777-666-5555
we can hack it.
Continue reading how to get a incomming call’s carrier info
the following link explian how trapcall.com work.
And
I have had a investigation with the trapcall, I found it have some limitation to numbers, as I have test two number with me, all is said not supported. I think it maybe have coopration with the carrier.
As I think it need redirect the incomming call to the toll-free number and get its callerid, so if without a mobile app, it need the user to setup the redirect by themself, if with a mobile app, the redirect filter can be done by the mobile app.
Continue reading how trapcall work
有些东西试验了一下,虽不成体系,但是放在博客上还是方便查找,所以芝麻一堆枣一堆的放上来了。
facebook api虽据称”荣获”最差api之列,但是我使用一下似乎还可以。
主要是graphic api和fql
文档:
http://developers.facebook.com/docs/reference/apis/
好用的api浏览器工具:
http://developers.facebook.com/tools/explorer
fql查询某个文档(post,link,图片…)的评论:
SELECT text FROM comment WHERE object_id in ( SELECT id FROM object_url WHERE url = 'http://www.facebook.com/photo.php?fbid=505965652779699&set=a.456536471055951.101000.190638967645704&type=1' )
上面的链接是随便选的,勿要深究,因为必须是个公开的链接,如果是不公开的链接,那么会返回空数据,你不知道到底是没有评论还是未公开的原因。
Continue reading facebook api笔记
这天发现原来用的左右键互换被删了,翻了半天代码找到了这个左右键互换的dephi工程,这里就传上来,免得时代久远又搞忘了。代码在此,也就放心不会有毒了,确实不放心可再编译一次,非常小。
程序:
http://kazge.com/wp-content/uploads/2013/02/MouseSwap.exe
源码Dephi工程:
http://kazge.com/wp-content/uploads/2013/02/mouseswap.zip
Continue reading windows下左右键互换程序 Dephi源码
第一种情况:子类没有定义构造函数时,默认继承。
第二种情况:子类定义了构造函数,则不会被继承。
对于4.x,如果父类恰好定义了子类的同名函数,则会被当做子类的构造函数:
Continue reading php 面向对象相关 大家都熟悉同源法则http://www.w3.org/Security/wiki/Same_Origin_Policy 现在w3c又出了跨源共享机制http://www.w3.org/TR/cors/#cors-api-specification-security 我有点迷糊的就是,同源法则就是出于安全的考虑禁止对其它源的访问,但是它仍然不能保证跨站脚本的攻击。同源法则也导致正常的跨域请求实现很麻烦,然而这个跨域同源机制的控制却又是在其它源服务器上(通过发Access-Control-Allow-Origin 头),而不是本源服务器或代码。 我就很纠结这个,照我想,安全控制应该是本源的事,是否可访问其它源应有本源来控制,如果这样的话,本源正常的跨源访问就很方便了。而实际上为什么要其它源来控制是否可访问呢,这对于跨站脚本倒是个好事,它肯定乐意跨源来执行它的脚本了。 我自己的理解是,从字面上看共享这个词就是控制资源是否可以共享,这个机制是控制本站资源是否允许被其它站点访问。 这个解释我自己都说不过去啊,公开的站点哪需要这个多余的机制来控制呢,而对于正常的跨域请求,这个机制还是不方便呢。 搞不清白! 参见: http://blog.csdn.net/net_lover/article/details/5172509 Continue reading 跨源共享(CORS)的一点疑惑 其实照着http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html 就差不多了,中文翻译参见 http://www.cnblogs.com/cathsfz/archive/2012/06/19/2553431.html 参见: http://www.ibm.com/developerworks/cn/web/1103_chenyan_restapi/index.html http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html http://publish.luisrei.com/articles/rest.html Continue reading REST 设计之返回码 对于php的Exception,可以通过getTraceAsString获得错误栈。 而对于error则应该如下: 参见: http://jarofgreen.co.uk/2011/02/more-php-error-handling-tips/ Continue reading php 打印error trace 这次使用Smarty出现了错误,E_WARNING 级别 filemtime() 之前用得好好的,这次的例外是自己处理了php错误,而且原则是连Notice都不能有。 查一下资料发现需要调用Smarty::muteExpectedErrors() http://www.smarty.net/docs/en/api.mute.expected.errors.tpl 这只在对错误处理比较严格的情况下才会出现。 Continue reading Smarty 警告报错问题 跨源共享(CORS)的一点疑惑
REST 设计之返回码
php 打印error trace
function x()
$x = debug_backtrace();
//remove stack of this function
array_shift($x);
$i = 0;
$xstr = '';
foreach ($trace as $x) {
//TODO need check exists args
$args = $x['args'];
if (!$args) {
$argstr = '';
} else {
$argstr = '';
$first = true;
foreach ($args as $arg) {
if (!$first) {
$argstr .= ',';
}
$first = false;
if (is_object($arg)) {
$argstr .= 'Object[' . get_class($arg) . ']';
}
elseif (is_array($arg)) {
$argstr .= 'Array';
} else {
$argstr .= $arg;
}
}
}
$xstr .= "[#$i] {$x['file']}({$x['line']}) {$x['function']} ($argstr)" . PHP_EOL;
$i++;
}
return $xstr;
}
Smarty 警告报错问题