赞
踩
alfred 谷歌搜索代码
Everyone is agog about Google searching code.
每个人都对Google搜索代码感到不快。
I find the language detection stuff to be really interesting. Are they using heuristics or just the file extension to figure out what language the code is? Probably extensions, but it'd be clever if they also used code keywords to guess.
我发现语言检测的东西真的很有趣。 他们是使用启发式方法还是仅使用文件扩展名来确定代码是什么语言? 可能是扩展名,但是如果他们也使用代码关键字进行猜测,那将是明智的选择。
One point that I think should be addressed by a future version is tuning of relevance data. If you search for DasBlog (not a really valid code search), you'll find folks that reference DasBlog libraries, and source inside ZIP files, but not the ACTUAL source at the ACTUAL location. It'd be nice to see them understand where the authoritative source of source is.
我认为将来的版本应该解决的一点是调整相关性数据。 如果您搜索DasBlog (不是真正有效的代码搜索),则会发现引用DasBlog库的人员,并且在ZIP文件中提供源代码,而在ACTUAL位置找不到ACTUAL源。 很高兴看到他们了解权威来源在哪里。
A few advanced tricks are:
一些高级技巧是:
lang:^(c|c#|c\+\+)$
lang:^(c | c#| c \ + \ +)$
-license:gpl
-许可证:gpl
You can also include Google Code Search on your own side as a GDATA (~GoogleRSS) feed. However, you can't restrict code searches by site using site: which is a bummer and limits its usefulness. I'd like to be able to have folks search for source on my blog.
您也可以自己将Google代码搜索作为GDATA(〜GoogleRSS)供稿添加。 但是,您不能使用site:限制按站点进行的代码搜索,这实在令人讨厌,并限制了其用途。 我希望能够让人们在我的博客上搜索来源。
Be sure to read their Google Code Search FAQ if you want to block them (robots.txt) from crawling your code.
如果您要阻止他们(robots.txt)抓取您的代码,请务必阅读其Google代码搜索常见问题解答。
翻译自: https://www.hanselman.com/blog/google-code-search-now-you-can-search-the-bathroom-wall-of-code
alfred 谷歌搜索代码
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。