1.设计html编码如下: 1 <!DOCTYPE html> 2 3 <html xmlns="http://www.w3.org/1999/xhtml"> 4 <head runat="server"> 5 <meta http-equiv="Content-Type" content="tex ...
分类:
Web程序 时间:
2020-07-10 11:21:58
阅读次数:
275
Find all possible combinations of k numbers that add up to a number n, given that only numbers from 1 to 9 can be used and each combination should be ...
分类:
其他好文 时间:
2020-07-10 09:59:09
阅读次数:
61
Given a positive integer a, find the smallest positive integer b whose multiplication of each digit equals to a. If there is no answer or the answer i ...
分类:
其他好文 时间:
2020-07-10 09:57:57
阅读次数:
79
Laravel Redis分布式锁的使用 创建锁 use Illuminate\Support\Facades\Cache; $lock = Cache::lock('foo', 10); if ($lock->get()) { // 处理业务逻辑 sleep(3); $lock->release( ...
分类:
其他好文 时间:
2020-07-09 22:22:13
阅读次数:
117
Description Given an array of integers A, find the number of triples of indices (i, j, k) such that: 0 <= i < A.length 0 <= j < A.length 0 <= k < A.le ...
分类:
其他好文 时间:
2020-07-09 19:24:31
阅读次数:
58
功能描述: 查找:查找指定字符串是否存在 替换:在指定的位置替换字符串 函数原型: int find(const string& str,int pos = 0) const; //查找str第一次出现位置,从pos开始查找 int find(const char* s,int pos = 0) c ...
分类:
其他好文 时间:
2020-07-09 12:28:37
阅读次数:
72
一、类及对象 1. 类的组成成分 属性(成员变量,Field) 方法(成员方法,函数,Method) 2. 属性 成员变量 vs 局部变量 相同点: 遵循变量声明的格式: 数据类型 变量名 = 初始化值 都有作用域 不同点: 声明的位置的不同 :成员变量:声明在类里,方法外, 局部变量:声明在方法内 ...
分类:
编程语言 时间:
2020-07-08 22:58:36
阅读次数:
57
from functools import reduce import re def remove_addsub(exp): s=re.findall("[+-]?\d+(?:\.\d+)?",exp) return reduce(lambda a,b:float(a)+float(b),s) s= ...
分类:
其他好文 时间:
2020-07-08 22:51:48
阅读次数:
68
laravel 关联模型 多态关系 一对一(多态) note 1个关联上从属于多个模型,如:博客post和用户user共享1个关联图片image。 1篇博客拥有1张主图 1个用户拥有1个头像 graph LR image(图片) image --> |imageable_id=post.id<br> ...
分类:
其他好文 时间:
2020-07-08 19:57:33
阅读次数:
52
1.Cannot find module 'swiper' 我也就试了下github上的demo啊,哪错了?? 好的,再去下载swiper,轮播图能显示了 让我们再来试试下面的小点点 不管是 pagination: { el: '.swiper-pagination' } 还是 pagination ...
分类:
其他好文 时间:
2020-07-08 19:31:13
阅读次数:
118