#### 1012. Complement of Base 10 Integer

Suppose the given number is N, the result is R, it's easy to notice that N + R + 1 = 2^x, and x is unknown, but it's quite easy to calculate. for x from 0 to 31, the first x which makes 2^x -1 >= N is the target. but N = 0 is an exception, just take

#### web自动化之iframe操作

from selenium import webdriver from selenium.webdriver.support.wait import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by import By import time driver = webdriver.Chrome() dri

#### sqlserver删除所有表

1 --/第1步**********删除所有表的外键约束*************************/ 2 3 DECLARE c1 cursor for 4 select 'alter table ['+ object_name(parent_obj) + '] drop constraint ['+name+']; ' 5 from sysobjects 6 where xtype = 'F' 7 open c1 8 declare @c1 varch

#### 圆周率计算和进度条

1.大家都知道有些时候我们玩游戏或者打开一些内存比较大的电脑会出现卡顿的情况，此时就需要我们下载进度条来减缓卡顿时间了 接下来就展示下实现这个指令的代码吧 import time scale=10 print("......执行开始......") for i in range(scale+1); a,b='**'*i,'..'*(scale-i) c=(i/scale)*100 print("%{:^3.0f} [{}->{}]".format(c,a,b)) time sleep(0,1)

#### 1013. Pairs of Songs With Total Durations Divisible by 60

time >=1 and <= 500, so sum >= 2 and sum <= 1000 there are 16 numbers in this interval divisible by 60 from 60 to 960, so the problem becomes find the number of pairs with sum of 60...960 class Solution { public int numPairsDivisibleBy60

#### Arithmetic Slices II - Subsequence LT446

446. Arithmetic Slices II - Subsequence Hard A sequence of numbers is called arithmetic if it consists of at least three elements and if the difference between any two consecutive elements is the same. For example, these are arithmetic sequences: 1,

#### wen自动化之浏览器的窗口切换

from selenium import webdriver from selenium.webdriver.support.wait import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by import By import time driver = webdriver.Chrome() drive

#### 1014. Capacity To Ship Packages Within D Days

class Solution { public int shipWithinDays(int[] weights, int D) { int left = 1, right = 50000; int N = weights.length; for (int i = 0; i < N; ++i) { left = Math.max(left, weights[i]); right += wei

#### web自动化之Select标签操作

from selenium import webdriver from selenium.webdriver.support.wait import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import Selec

#### 可以快速二次开发的免费小程序商城源码*

CRMEB小程序商城源码V2.5.35正式发布 分销+拼团+砍价+秒杀 开源无加密源码 打通版开源地址：https://gitee.com/ZhongBangKeJi/CRMEB [b]小程序开源地址：https://gitee.com/ZhongBangKeJi/CRMEB_WeChatMiniProgram 演示后台：http://demo25.crmeb.net 账号：demo 密码：crmeb.com QQ群: 116279623 官方论坛：http://bbs.crmeb.net

#### pyv8的使用基本方法

import PyV8 ctxt = PyV8.JSContext() ctxt.enter() func = ctxt.eval(""" (function(){ function hello(){ return "Hello world."; } return hello(); }) """) print func() 则在python环境中打印出js执行的结果：Hello world. 这里面关于