我有一个巨大的字符串(内容页面),我想获取子字符串实例的所有索引。
示例:你好吗?你在哪里?
我如何获得上面句子中所有你的索引。
请帮忙。
从批处理文件执行时,下面的代码块没有运行.它只是挂起(没有任何反应).它坐在那里几个小时.我无法跟踪问题是什么或如何调试它.请帮忙.
declare
v_personrefid varchar2(50);
v_hiredt date;
v_loaddt date;
v_personid number;
v1_personrefid varchar2(50);
v_seq number :=0;
cursor get_row is
select distinct personrefid from ARCHIVE_PERSON;
cursor get_row1 is
select
personrefid,
hiredt,
loaddt,
personid
from
ARCHIVE_PERSON
where
personrefid = v_personrefid
order by hiredt, loaddt;
begin
v_seq:=0;
open Get_row;
loop
fetch get_row into v_personrefid ;
exit when get_row%notfound;
begin
open get_row1;
loop
fetch get_row1 into v1_personrefid, v_hiredt, v_loaddt, v_personid;
exit when get_row1%NOTFOUND;
v_seq:= v_seq+1;
update ARCHIVE_PERSON
set version = v_seq
where
personrefid = v1_personrefid …Run Code Online (Sandbox Code Playgroud) 我的表有 5 列。我想要
UPDATE Column5='TEACHER' IF Column2='Y'
AND
UPDATE Column5='STUDENT' IF Column3='Y'
Run Code Online (Sandbox Code Playgroud)
我可以在一个语句中做到这一点吗?
我正在尝试从 html 表中提取 URL。URL 位于 td 单元格内的锚标记内。html 看起来像:
<table width="100%" border="0" cellspacing="0" cellpadding="0" name="TabName" id="Tab" class="common-table">
<tr>
<td>Acme Company</a><br/><span class="f-10">07-11-2016</span></td>
<td><span>Vendor</span><br>
<td><a href="http://URL" title="Report Details">Details</a></td>
</tr>
</table>
Run Code Online (Sandbox Code Playgroud)
这是我编写的 Python 代码:
from bs4 import BeautifulSoup
import requests
import re
r = requests.get('http://SourceURL')
soup = BeautifulSoup(r.content,"html.parser")
# Find table
table = soup.find("table",{"class": "common-table"})
# Find all tr rows
tr = table.find_all("tr")
for each_tr in tr:
td = each_tr.find_all('td')
# In each tr rown find each td cell
for each_td in td:
print(each_td.text) …Run Code Online (Sandbox Code Playgroud) 在下面找到我提交的表单和操作页面._POST数组为空.不确定如何.请帮忙.
<form method="post" action="track-them.php">
<input type="text" width="255" id="txt" />
<textarea id="ta" type="text" cols="25" rows="4"></textarea>
<input type="submit" id="check-button" value="Ok" />
</form>
Run Code Online (Sandbox Code Playgroud)
<?php
include_once('../simple_html_dom.php');
print_r($_POST);
?>
Run Code Online (Sandbox Code Playgroud)
两个字段txt和ta都有值,但我点击提交时看到的输出是:
数组()
SELECT * FROM TABLE1
WHERE WEEKENDDT = (SELECT MAX(ENDDTE)FROM TABLE2)
Run Code Online (Sandbox Code Playgroud)
由于某种原因,此选择不返回数据.两个表都有特定日期的数据:MAX(ENDDTE)有02-MAY-12的数据,WEEKENDDT也有数据02-MAY-12.