首页 \ 问答 \ 事件驱动模型与反应堆模式有什么区别?(What is the difference between event driven model and reactor pattern? [closed])

事件驱动模型与反应堆模式有什么区别?(What is the difference between event driven model and reactor pattern? [closed])

从维基百科反应堆图案文章:

反应堆设计模式是用于处理由一个或多个输入同时发送到服务处理程序的服务请求的事件处理模式。

它列举了几个例子,例如nodejstwistedeventmachine

但是我上面了解的是受欢迎的事件驱动框架,那么它们也是一个反应堆模式框架?

如何区分这两个? 或者他们是一样的?


From the wikipedia Reactor Pattern article:

The reactor design pattern is an event handling pattern for handling service requests delivered concurrently to a service handler by one or more inputs.

It named a few examples, e.g. nodejs, twisted, eventmachine

But what I understand that above is popular event driven framework, so make them also a reactor pattern framework?

How to differentiate between these two? Or they are the same?


原文:https://stackoverflow.com/questions/9138294
更新时间:2023-09-28 13:09

最满意答案

不,ack 1.x不会让你排除一个文件。 在ack 2.0中 ,你可以。 ack 2.0 目前是其第一个alpha 现在是目前推荐的ack版本。

就您的具体情况而言,您使用的是什么版本的ack? ack 1.96应该忽略基于扩展的最小化的JavaScript。 如果扩展检查不起作用,那么您可能会自己破解,因为它是一个单一的Perl程序。 你可以攻击is_searchable函数。

在ack 2.0中,我们正在忽略任何一行,比如说500个字符,因为它显然不是源代码。

您可能还想加入我们的ack用户邮件列表。 我们很响亮。


No, ack 1.x will not let you exclude a single file. In ack 2.0, you can. ack 2.0 was currently in its first alpha is now the current recommended version of ack.

As far as your specific case of the minified Javascript file, what version of ack are you using? ack 1.96 should ignore minified JavaScript based on extension. If the extension check doesn't work, you could probably hack ack itself, since it's a single Perl program. You can hack the is_searchable function.

In ack 2.0, we're looking at ignoring any line over, say, 500 characters because it's clearly not source code.

You may also want to join us on the ack-users mailing list. We're pretty responsive.

相关问答

更多
  • 不,ack 1.x不会让你排除一个文件。 在ack 2.0中 ,你可以。 ack 2.0 目前是其第一个alpha 现在是目前推荐的ack版本。 就您的具体情况而言,您使用的是什么版本的ack? ack 1.96应该忽略基于扩展的最小化的JavaScript。 如果扩展检查不起作用,那么您可能会自己破解,因为它是一个单一的Perl程序。 你可以攻击is_searchable函数。 在ack 2.0中,我们正在忽略任何一行,比如说500个字符,因为它显然不是源代码。 您可能还想加入我们的ack用户邮件列表。 ...
  • ack是特殊的,因为它没有要忽略的文件类型的黑名单,而是要搜索的文件类型的白名单。 从手册页引用: 没有文件选择, ack-grep只搜索它识别的类型的文件。 如果您有一个名为foo.wango的文件,并且ack-grep不知道什么是.wango文件, ack-grep将不会搜索它。 (请注意,由于命名冲突,我使用的是Ubuntu的二进制名称为ack-grep ) ack --help-types将显示您的ack安装支持的类型列表。 ack is peculiar in that it doesn't ha ...
  • 这是不受支持的,我很害怕。 看到 --ignore-dir不支持绝对路径名·问题#291·petdance / ack2 我来到这篇文章的类似的东西,发现上面的问题...... :-( This isn't supported, I'm affraid. See --ignore-dir doesn't support absolute pathnames · Issue #291 · petdance/ack2 I came to this post for something similar and f ...
  • 很少需要eval 。 ack () { if (( $# > 2 )); then ack-grep -iC "$@" else ack-grep -iC "$1" ${2:+-G "$2"} fi } 更新:这是您的第一个解决方案的确切版本,没有eval 。 ack() { case $# in 1) ack-grep -iC "$1";; 2) ack-grep -iC "$1" -G "$2";; *) ac ...
  • 如果我选择在所有文件中操作而不管其类型,使用-a开关(我的版本与您的相同),它对我有用: ack -a imbue * It works for me if I select to operate in all files regardless of its type, using -a switch (my version is same that yours): ack -a imbue *
  • 如果错误是ack-grep: Command not found那么它看起来像vim意味着它说:它找不到ack-grep命令。 所以这看起来似乎不是插件的问题,而是(shell)环境中的问题。 我认为你的下一步是从shell(vim之外)运行which ack-grep ,并确保你确实有一个可执行的ack-grep ,并且在$PATH以便vim能够找到它。 (我想你可能已经检查了所有这些,但是你的问题没有明确说明你有问题;所以如果你检查了它,我认为如果你更新了问题以表明你有问题,这将会有所帮助。) If t ...
  • 从1.96开始,Ack将忽略min.js文件。 似乎这包括在拉取请求142中 。 至于CSS似乎不会发生在1.x. 如果您在219上安装自己的分叉,可能会有拉动请求。 Ack will ignore min.js files as of 1.96. Seems this was included within a pull request 142. As for CSS seems that wont happen in 1.x. There is though a pull request if you ...
  • 我想你想要这个: awk '/=/{thing2=$0} /item3/{print thing2;print $0,"\n"}' YourFile 所以,每当你看到一个= ,你都记得这条线是thing2 。 当你看到item3时,你会看到你看到的最后一个thing2和当前行。 示例输出 my_list = [ 'item3', my_other_list = [ 'item3', I think you want this: awk '/=/{thing2=$0} /item3/ ...
  • 我目前的解决方案是使用别名来限制我的智能选项用于我的交互式输入(而不是其他人的脚本)。 这是我的bash_aliases中与grep相关的代码段: SMART_GREP_OPTIONS= # Ensure colors are supported. if [ -x /usr/bin/dircolors ]; then SMART_GREP_OPTIONS=' --color=auto' fi # Make grep more like ack. # Ignore binary files. ...
  • 您可以将ack-grep的-a (搜索所有内容)与-G (仅搜索与给定正则表达式匹配的文件)组合在一起。 就像是: ack-grep -a -G '^[^.]+$' what-to-search-for 应该做的伎俩。 在ack2下,您必须定义自定义类型: ack-grep --WANTED --type-set WANTED:match:^[^.]+$ what-to-search-for 适合我。 You can combine ack-grep's -a (search everything) w ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。