首页 \ 问答 \ nivo滑块,是一种总是显示下一个和prev箭头的方法吗?(nivo slider, is a way to always show the next and prev arrows?)

nivo滑块,是一种总是显示下一个和prev箭头的方法吗?(nivo slider, is a way to always show the next and prev arrows?)

我使用的是nivo滑块(默认主题),我在图像旁边放置了prev和next箭头(不在图像顶部),我想知道是否有办法始终显示下一个和prev箭头(现在是箭头只显示当你悬停在图像上)。 似乎应该有办法编辑代码来做到这一点,但我似乎无法弄清楚在哪里。 谢谢!


I am using nivo slider( default theme) and I positioned the prev and next arrows next to the image(not on top of the image) and I was wondering if there is a way to always show the next and prev arrows(right now the arrows only show when you hover over the image). Seems there should be a way to edit the code to do this but I can't seem to figure out where. Thanks!


原文:https://stackoverflow.com/questions/6958409
更新时间:2023-08-12 06:08

最满意答案

您的示例可以在字符串之后匹配空格:

grep -E '\.pdf ' input.txt

你所说的“字符串”与grep调用的“字”类似。 一个字是一个字母数字字符的运行。 单词的好处在于,您可以将单词末尾与特殊的\>匹配,该单词末尾匹配零个字符长度的行进。 这也匹配在行末。 但是字符不能改变,也不能包含标点符号,所以我们不能使用它。

如果您还需要在行尾进行匹配,在单词后面没有空格的情况下,请使用:

grep -E '\.pdf |\.pdf$' input.txt

要包括文件名后面的字符不是空格字符' ',但是其他空格,比如制表符\t ,或者名称后面紧跟着一个以#开头的注释,请使用:

grep -E '\.pdf[[:space:]#]|\.pdf$' input.txt

我将说明单词边界的匹配,因为那将是一个完美的解决方案,除了我们不能在这里使用它,因为我们不能改变被看作单词的一部分的字符集。

输入包含foo作为单独的单词,并且作为更长的单词的一部分, foo不在单词的末尾,因此不在单词边界处:

$ printf 'foo bar\nfoo.bar\nfoobar\nfoo_bar\nfoo\n'
foo bar
foo.bar
foobar
foo_bar
foo

现在,要匹配单词的边界,我们可以使用\<开头, \>匹配结尾:

$ printf 'foo bar\nfoo.bar\nfoobar\nfoo_bar\nfoo\n' | grep 'foo\>'
foo bar
foo.bar
foo

请注意_如何匹配char字样 - 但除此之外,字符串只是字母数字[a-zA-Z0-9]
还要注意foo行尾是如何匹配的 - 在只包含foo的行中。 行结束时我们不需要特殊情况。


Your example works with matching the space after the string also:

grep -E '\.pdf ' input.txt

What you call "string" is similar to what grep calls "word". A Word is a run of alphanumeric characters. The nice thing with words is that you can match a word end with the special \>, which matches a word end with a march of zero characters length. That also matches at the end of line. But the word characters can not be changed, and do not contain punctuation, so we can not use it.

If you need to match at the end of line too, where there is no space after the word, use:

grep -E '\.pdf |\.pdf$' input.txt

To include cases where the character after the file name is not a space character '', but other whitespace, like a tab, \t, or the name is directly followed by a comment, starting with #, use:

grep -E '\.pdf[[:space:]#]|\.pdf$' input.txt

I will illustrate the matching of word boundarys too, because that would be the perfect solution, except that we can not use it here because we can not change the set of characters that are seen as parts of a word.

The input contains foo as separate word, and as part of longer words, where the foo is not at the end of the word, and therefore not at a word boundary:

$ printf 'foo bar\nfoo.bar\nfoobar\nfoo_bar\nfoo\n'
foo bar
foo.bar
foobar
foo_bar
foo

Now, to match the boundaries of words, we can use \< for the beginning, and \> to match the end:

$ printf 'foo bar\nfoo.bar\nfoobar\nfoo_bar\nfoo\n' | grep 'foo\>'
foo bar
foo.bar
foo

Note how _ is matched as a word char - but otherwise, wordchars are only the alphanumerics, [a-zA-Z0-9].
Also note how foo an the end of line is matched - in the line containing only foo. We do not need a special case for the end of line.

相关问答

更多

相关文章

更多

最新问答

更多
  • 获取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的基本操作命令。。。