我想选择表中具有类名TCP_RowOdd或TCP_RowEven的所有行.目前我这样做
oddRows = driver.find_elements_by_class_name("TCP_RowOdd")
evenRows = driver.find_elements_by_class_name("TCP_RowEven")
是否有一个OR子句可以在这里用于在单个查询中执行它.
我正在尝试使用 ScheduledExecutorService 每 15 分钟调用一次可运行任务。这些任务应该在以下时间每小时运行一次:2nd Minute 10th Second 17th Minute 10th Second 32nd Minute 10th Second 47th Minute 10th Second。
我使用 Calendar 实例计算第一次执行任务的初始延迟,然后使用带有 scheduleAtFixedRate() 的延迟每 15 分钟执行一次任务。这在前几天工作正常,但几天后我可以观察到任务执行中的一些时间偏移。例如,原本应该在 12:02:10 开始的任务在 12:03:45 被调用。我哪里出错了?
public static void main(String[] args) {
final ScheduledExecutorService scheduler = Executors
.newScheduledThreadPool(15);
Date aDate = new Date();
Calendar cal = Calendar.getInstance();
cal.setTime(aDate);
int currentHour = cal.get(Calendar.HOUR_OF_DAY);
int currentMins = cal.get(Calendar.MINUTE);
int currentSecs = cal.get(Calendar.SECOND);
int unitInSecs;
int delayFor15MinTasksInSecs;
unitInSecs = currentMins * 60 + currentSecs;
delayFor15MinTasksInSecs = unitInSecs < …Run Code Online (Sandbox Code Playgroud)