- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在 android 中的 Matcher 和 Pattern 方面遇到了一些奇怪的问题。它总是跳过第一场比赛,我不明白为什么。我是正则表达式的新手,该表达式在我在网上找到的测试人员上完美运行,但在我的测试应用程序中却不起作用我正在搜索的字符串“
<table id="intrebari" width="100%" cellpadding="3" cellspacing="3" border="0"><tbody><tr><td class="enunt" colspan="2"> <b>1)</b> What vessels do COLREG rules 1983 apply to?<br><div class="spacer10"></div></td></tr><tr class="optiune"><td class="buton"><input type="radio" name="buton1" id="buton11" value="0" wtx-context="0D1B1B61-E77D-43B5-AAF3-AF95F5E019C3"></td><td class="varianta" id="varianta11">To all vessels navigating in international waters<div class="spacer"></div></td></tr><tr class="optiune"><td class="buton"><input type="radio" name="buton1" id="buton12" value="0" wtx-context="86B330AE-257A-4847-9E5E-518B28A291FD"></td><td class="varianta" id="varianta12">To all vessels navigating in roadsteads, straits and open seas<div class="spacer"></div></td></tr><tr class="optiune"><td class="buton"><input type="radio" name="buton1" id="buton13" value="1" wtx-context="1C34F272-C776-401E-A367-0460D976CE21"></td><td class="varianta" id="varianta13">To all vessels upon the high seas and in all waters connected therewith<div class="spacer"></div></td></tr><tr><td colspan="2" align="right"><input type="button" name="btn_1" class="arial_14" value="Arată răspunsul corect" onclick="verifica_intrebare(1)" wtx-context="B3A7B4BB-7D2A-4474-8C9C-1B3558BB87BC"></td></tr><tr><td colspan="2" align="right"><div class="spacer20"></div></td></tr><tr><td class="enunt" colspan="2"> <b>2)</b> What does the word 'vessel' mean, according to the COLREG rules?<br><div class="spacer10"></div></td></tr><tr class="optiune"><td class="buton"><input type="radio" name="buton2" id="buton21" value="0" wtx-context="76CB3796-696B-42EC-8172-5EB15FA6CEBC"></td><td class="varianta" id="varianta21">Any watercraft capable of floating on water without propelling machinery<div class="spacer"></div></td></tr><tr class="optiune"><td class="buton"><input type="radio" name="buton2" id="buton22" value="1" wtx-context="C4726D1A-2B6E-4263-BDB6-BC8747728E9E"></td><td class="varianta" id="varianta22">Any watercraft including non-displacement craft and seaplanes used or capable of being used as a means of transportation on water<div class="spacer"></div></td></tr><tr class="optiune"><td class="buton"><input type="radio" name="buton2" id="buton23" value="0" wtx-context="6F4568C8-31C7-41FF-8588-E52926FD0575"></td><td class="varianta" id="varianta23">Any floating object fitted with propelling machinery<div class="spacer"></div></td></tr><tr><td colspan="2" align="right"><input type="button" name="btn_2" class="arial_14" value="Arată răspunsul corect" onclick="verifica_intrebare(2)" wtx-context="296F3D73-3F11-431E-9CB8-B4EF5D3BC026"></td></tr><tr><td colspan="2" align="right"><div class="spacer20"></div></td></tr><tr><td class="enunt" colspan="2"> <b>3)</b> What does the word 'seaplane' mean?<br><div class="spacer10"></div></td></tr><tr class="optiune"><td class="buton"><input type="radio" name="buton3" id="buton31" value="0" wtx-context="962489E9-00B1-444D-811D-3A1524C9493E"></td><td class="varianta" id="varianta31">Any aircraft designed to carry out hydrotechnical and/or hydrometeorological work<div class="spacer"></div></td></tr><tr class="optiune"><td class="buton"><input type="radio" name="buton3" id="buton32" value="1" wtx-context="0B944352-F24B-42DD-8EF7-1709F0B77FD9"></td><td class="varianta" id="varianta32">Any aircraft designed to manoeuvre on the water<div class="spacer"></div></td></tr><tr class="optiune"><td class="buton"><input type="radio" name="buton3" id="buton33" value="0" wtx-context="0ACDE372-5574-497F-8807-7B8ABB7D4E36"></td><td class="varianta" id="varianta33">Any aircraft being on the water for various reasons<div class="spacer"></div></td></tr><tr><td colspan="2" align="right"><input type="button" name="btn_3" class="arial_14" value="Arată răspunsul corect" onclick="verifica_intrebare(3)" wtx-context="851C779C-D7A6-485D-85FB-19B46EE84D06"></td></tr><tr><td colspan="2" align="right"><div class="spacer20"></div></td></tr><tr><td class="enunt" colspan="2"> <b>4)</b> What vessel may be considered as 'vessel restricted in her ability to manoeuvre'?<br><div class="spacer10"></div></td></tr><tr class="optiune"><td class="buton"><input type="radio" name="buton4" id="buton41" value="1" wtx-context="756EE05D-A1B0-42B2-BEC1-12C594D35011"></td><td class="varianta" id="varianta41">A vessel engaged in replenishment or transferring persons, provisions or carge while underway<div class="spacer"></div></td></tr><tr class="optiune"><td class="buton"><input type="radio" name="buton4" id="buton42" value="0" wtx-context="9C3426AB-1ED9-4BCD-AFAD-00905720345E"></td><td class="varianta" id="varianta42">A vessel lying to, on stormy weather<div class="spacer"></div></td></tr><tr class="optiune"><td class="buton"><input type="radio" name="buton4" id="buton43" value="0" wtx-context="F5B11A33-D1AF-4048-867A-B04B800ABE0A"></td><td class="varianta" id="varianta43">A vessel with damages to the steering gear<div class="spacer"></div></td></tr><tr><td colspan="2" align="right"><input type="button" name="btn_4" class="arial_14" value="Arată răspunsul corect" onclick="verifica_intrebare(4)" wtx-context="6BF5E721-62E5-4F67-8F0E-3029696AA119"></td></tr><tr><td colspan="2" align="right"><div class="spacer20"></div></td></tr><tr><td class="enunt" colspan="2"> <b>5)</b> What vessel may be considered as 'vessel restricted in her ability to manoeuvre'?<br><div class="spacer10"></div></td></tr><tr class="optiune"><td class="buton"><input type="radio" name="buton5" id="buton51" value="0" wtx-context="3A9A1A12-5B6E-461A-821C-E375C029C714"></td><td class="varianta" id="varianta51">A vessel engaged in towing, having the towing line less than 50 M in lenght<div class="spacer"></div></td></tr><tr class="optiune"><td class="buton"><input type="radio" name="buton5" id="buton52" value="0" wtx-context="6FC9ABC3-F895-4EB4-97B7-11ED933BF294"></td><td class="varianta" id="varianta52">A pushing tug boat, underway, at night<div class="spacer"></div></td></tr><tr class="optiune"><td class="buton"><input type="radio" name="buton5" id="buton53" value="1" wtx-context="D7B41021-E95A-46CF-ACC6-A7083A68DD6B"></td><td class="varianta" id="varianta53">A vessel engaged in towing operation such as severely restricts the towing vessel and her tow in their ability to deviate from their course<div class="spacer"></div></td></tr><tr><td colspan="2" align="right"><input type="button" name="btn_5" class="arial_14" value="Arată răspunsul corect" onclick="verifica_intrebare(5)" wtx-context="72409550-315F-4592-96D3-BB1B56713D0E"></td></tr><tr><td colspan="2" align="right"><div class="spacer20"></div></td></tr><tr><td class="enunt" colspan="2"> <b>6)</b> To what vessel is the term 'vessel restricted in her ability to manoeuvre' limited to?<br><div class="spacer10"></div></td></tr><tr class="optiune"><td class="buton"><input type="radio" name="buton6" id="buton61" value="1" wtx-context="62B8D1C2-100E-4DA1-8378-0557ED497019"></td><td class="varianta" id="varianta61">The term 'vessel restricted in her ability to manoeuvre' will not be limited to the vessels quoted in the rules<div class="spacer"></div></td></tr><tr class="optiune"><td class="buton"><input type="radio" name="buton6" id="buton62" value="0" wtx-context="56215EDA-A587-4D72-AFC0-283891A199B3"></td><td class="varianta" id="varianta62">It is limited to te vessels quoted in the rules<div class="spacer"></div></td></tr><tr class="optiune"><td class="buton"><input type="radio" name="buton6" id="buton63" value="0" wtx-context="48407ACA-D9F2-4EBC-9692-C70A989D8720"></td><td class="varianta" id="varianta63">It is limited to the damaged vessels which are unable to keep out of the way of another vessel<div class="spacer"></div></td></tr><tr><td colspan="2" align="right"><input type="button" name="btn_6" class="arial_14" value="Arată răspunsul corect" onclick="verifica_intrebare(6)" wtx-context="BC016A79-F89D-419A-BADD-6969B3C2F5CF"></td></tr><tr><td colspan="2" align="right"><div class="spacer20"></div></td></tr><tr><td class="enunt" colspan="2"> <b>7)</b> What does the term 'vessel constrained by her draught' mean?<br><div class="spacer10"></div></td></tr><tr class="optiune"><td class="buton"><input type="radio" name="buton7" id="buton71" value="0" wtx-context="E53F24D0-BBC5-476B-8A36-E071B71884E7"></td><td class="varianta" id="varianta71">A vessel which because of her draught and the existance of navigation obstructions in unable to deviate from her course<div class="spacer"></div></td></tr><tr class="optiune"><td class="buton"><input type="radio" name="buton7" id="buton72" value="0" wtx-context="8450FFB0-30A0-496F-80F7-B5E4713B38DB"></td><td class="varianta" id="varianta72">A deep draught vesselbeing towed<div class="spacer"></div></td></tr><tr class="optiune"><td class="buton"><input type="radio" name="buton7" id="buton73" value="1" wtx-context="AFEE346D-169A-4F94-AAEE-075C449BB563"></td><td class="varianta" id="varianta73">A power-driven vessel which because of her draght in relation to the avilable depth of water is severely restricted in her ability to deviate from her course<div class="spacer"></div></td></tr><tr><td colspan="2" align="right"><input type="button" name="btn_7" class="arial_14" value="Arată răspunsul corect" onclick="verifica_intrebare(7)" wtx-context="C2C41294-4428-4742-9455-C0A299458567"></td></tr><tr><td colspan="2" align="right"><div class="spacer20"></div></td></tr><tr><td class="enunt" colspan="2"> <b>8)</b> What does the term 'restricted visibility' mean?<br><div class="spacer10"></div></td></tr><tr class="optiune"><td class="buton"><input type="radio" name="buton8" id="buton81" value="0" wtx-context="EBBB433B-5780-4CB5-A4CD-74B78BE11224"></td><td class="varianta" id="varianta81">Any condition in which visibility is reduced under 1,5 m<div class="spacer"></div></td></tr><tr class="optiune"><td class="buton"><input type="radio" name="buton8" id="buton82" value="0" wtx-context="50A1F568-764A-4853-8E3E-A891FDBE82F8"></td><td class="varianta" id="varianta82">The condition in which the visibility is restricted by fog, rain or snow<div class="spacer"></div></td></tr><tr class="optiune"><td class="buton"><input type="radio" name="buton8" id="buton83" value="1" wtx-context="CAA16AFC-2750-44A8-8BB2-C74F26AAD16D"></td><td class="varianta" id="varianta83">Any condition in which visibility is restricted by fog, mist, falling snow, heavy rainstorms, sandstorms or any other similar causes<div class="spacer"></div></td></tr><tr><td colspan="2" align="right"><input type="button" name="btn_8" class="arial_14" value="Arată răspunsul corect" onclick="verifica_intrebare(8)" wtx-context="2F77F897-5786-4DBF-8D8C-964A70BE9D45"></td></tr><tr><td colspan="2" align="right"><div class="spacer20"></div></td></tr><tr><td class="enunt" colspan="2"> <b>9)</b> Which are the factors taken into accouunt in determinating the 'safe speed'?<br><div class="spacer10"></div></td></tr><tr class="optiune"><td class="buton"><input type="radio" name="buton9" id="buton91" value="0" wtx-context="56875C11-611B-476F-8463-798655CEEC14"></td><td class="varianta" id="varianta91">The vessel's length, nautical qualities of the vessel, the engine's power and the visibility<div class="spacer"></div></td></tr><tr class="optiune"><td class="buton"><input type="radio" name="buton9" id="buton92" value="0" wtx-context="CE824CA1-4F09-42D0-8EC3-E2EDC522BE8C"></td><td class="varianta" id="varianta92">The crew's training, the navigation conditions and visibility<div class="spacer"></div></td></tr><tr class="optiune"><td class="buton"><input type="radio" name="buton9" id="buton93" value="1" wtx-context="10E6E71B-5036-4F60-87E1-F8D9EAC486E8"></td><td class="varianta" id="varianta93">The visibility, the traffic density, the manoeuvrability of the vessel at night, the presence of background light, the state of wind and sea, the vessel's draught<div class="spacer"></div></td></tr><tr><td colspan="2" align="right"><input type="button" name="btn_9" class="arial_14" value="Arată răspunsul corect" onclick="verifica_intrebare(9)" wtx-context="6C99FB2D-A229-4761-8D9C-93A56BB96761"></td></tr><tr><td colspan="2" align="right"><div class="spacer20"></div></td></tr><tr><td class="enunt" colspan="2"> <b>10)</b> How shall an action to avoid collision be taken?<br><div class="spacer10"></div></td></tr><tr class="optiune"><td class="buton"><input type="radio" name="buton10" id="buton101" value="0" wtx-context="8D2299B0-89DC-4EF2-B664-4A9BBE64037F"></td><td class="varianta" id="varianta101">In ample time, with a succession of small alterations of course in order not to deviate from the vessel's course<div class="spacer"></div></td></tr><tr class="optiune"><td class="buton"><input type="radio" name="buton10" id="buton102" value="1" wtx-context="9B6407DA-2F87-49D0-8713-D970CB948445"></td><td class="varianta" id="varianta102">Positively, in ample time and with due regard to the observance of good seamanship<div class="spacer"></div></td></tr><tr class="optiune"><td class="buton"><input type="radio" name="buton10" id="buton103" value="0" wtx-context="6C12441D-FD8A-46AD-8B06-95246BBC65EC"></td><td class="varianta" id="varianta103">Positively, with speed alterations to avoid risk of collision<div class="spacer"></div></td></tr><tr><td colspan="2" align="right"><input type="button" name="btn_10" class="arial_14" value="Arată răspunsul corect" onclick="verifica_intrebare(10)" wtx-context="D178B111-6CA1-49C5-9A5D-8DC1CBAEBE47"></td></tr><tr><td colspan="2" align="right"><div class="spacer20"></div></td></tr></tbody></table>
Pattern patternQ = Pattern.compile("<tr><td class=(.+?)</tr>");
Matcher matcherQ = patternQ.matcher(tabel);
boolean matchFound = matcherQ.find();
while (matcherQ.find()) {
System.out.print("Start index: " + matcherQ.start());
System.out.print(" End index: " + matcherQ.end());
System.out.println(" Found: " + matcherQ.group());
textView.append(matcherQ.group());
}
这是我缺少的东西吗?
最佳答案
它跳过第一个匹配的原因是每次调用 matcherQ.find() 都算作一次匹配,因此下一次调用将始终查找下一个匹配。
请注意,在第 4 行的 while 循环之前。您已经在第 3 行调用了 matcherQ.find() 来检查是否找到匹配项。
删除以下行,因为您在此代码 fragment 中没有使用它。
boolean matchFound = matcherQ.find();
关于java - Matcher 会跳过第一场比赛吗?或者我做错了什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57132918/
尝试使用集成到 QTCreator 的表单编辑器,但即使我将插件放入 QtCreator.app/Contents/MacOS/designer 也不会显示。不过,相同的 dylib 文件确实适用于独
在此代码示例中。 “this.method2();”之后会读到什么?在返回returnedValue之前会跳转到method2()吗? public int method1(int returnedV
我的项目有通过gradle配置的依赖项。我想添加以下依赖项: compile group: 'org.restlet.jse', name: 'org.restlet.ext.apispark', v
我将把我们基于 Windows 的客户管理软件移植到基于 Web 的软件。我发现 polymer 可能是一种选择。 但是,对于我们的使用,我们找不到 polymer 组件具有表格 View 、下拉菜单
我的项目文件夹 Project 中有一个文件夹,比如 ED 文件夹,当我在 Eclipse 中指定在哪里查找我写入的文件时 File file = new File("ED/text.txt"); e
这是奇怪的事情,这个有效: $('#box').css({"backgroundPosition": "0px 250px"}); 但这不起作用,它只是不改变位置: $('#box').animate
这个问题在这里已经有了答案: Why does OR 0 round numbers in Javascript? (3 个答案) 关闭 5 年前。 Mozilla JavaScript Guide
这个问题在这里已经有了答案: Is the function strcmpi in the C standard libary of ISO? (3 个答案) 关闭 8 年前。 我有一个问题,为什么
我目前使用的是共享主机方案,我不确定它使用的是哪个版本的 MySQL,但它似乎不支持 DATETIMEOFFSET 类型。 是否存在支持 DATETIMEOFFSET 的 MySQL 版本?或者有计划
研究 Seam 3,我发现 Seam Solder 允许将 @Named 注释应用于包 - 在这种情况下,该包中的所有 bean 都将自动命名,就好像它们符合条件一样@Named 他们自己。我没有看到
我知道 .append 偶尔会增加数组的容量并形成数组的新副本,但 .removeLast 会逆转这种情况并减少容量通过复制到一个新的更小的数组来改变数组? 最佳答案 否(或者至少如果是,则它是一个错
很难说出这里要问什么。这个问题模棱两可、含糊不清、不完整、过于宽泛或夸夸其谈,无法以目前的形式得到合理的回答。如需帮助澄清此问题以便重新打开,visit the help center . 关闭 1
noexcept 函数说明符是否旨在 boost 性能,因为生成的对象中可能没有记录异常的代码,因此应尽可能将其添加到函数声明和定义中?我首先想到了可调用对象的包装器,其中 noexcept 可能会产
我正在使用 Angularjs 1.3.7,刚刚发现 Promise.all 在成功响应后不会更新 angularjs View ,而 $q.all 会。由于 Promises 包含在 native
我最近发现了这段JavaScript代码: Math.random() * 0x1000000 10.12345 10.12345 >> 0 10 > 10.12345 >>> 0 10 我使用
我正在编写一个玩具(物理)矢量库,并且遇到了 GHC 坚持认为函数应该具有 Integer 的问题。是他们的类型。我希望向量乘以向量以及标量(仅使用 * ),虽然这可以通过仅使用 Vector 来实现
PHP 的 mail() 函数发送邮件正常,但 Swiftmailer 的 Swift_MailTransport 不起作用! 这有效: mail('user@example.com', 'test
我尝试通过 php 脚本转储我的数据,但没有命令行。所以我用 this script 创建了我的 .sql 文件然后我尝试使用我的脚本: $link = mysql_connect($host, $u
使用 python 2.6.4 中的 sqlite3 标准库,以下查询在 sqlite3 命令行上运行良好: select segmentid, node_t, start, number,title
我最近发现了这段JavaScript代码: Math.random() * 0x1000000 10.12345 10.12345 >> 0 10 > 10.12345 >>> 0 10 我使用
我是一名优秀的程序员,十分优秀!