当前位置:   article > 正文

alfred 谷歌搜索代码_Google代码搜索-现在您可以搜索“浴室代码墙”

alfred 设置谷歌搜索的语句
alfred 谷歌搜索代码

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:

一些高级技巧是:

  • Restrict search to "C"-based languages

    将搜索限制为基于“ C”的语言
    • lang:^(c|c#|c\+\+)$

      lang:^(c | c#| c \ + \ +)$

  • Avoid GPLed code

    避免使用GPL代码
    • -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 谷歌搜索代码

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/在线问答5/article/detail/974750
推荐阅读
相关标签
  

闽ICP备14008679号