自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(30)
  • 收藏
  • 关注

原创 python中利用js操作video标签

自动化时,遇到操作视频的时候有时比较让人头疼,定位时会发现只有一个。本人学习后发现有两个问题暂没解决,知道的小伙伴可留言告知。可执行全屏,但我试了没有反应,本人谷歌浏览器)刷剧时,苦于页面设置进度最快也就三倍速,此时。的相关属性和方法就可实现,我们继续往下看。来取消静音状态后再去设置音量大小。是表示解除静音,此时视频会暂停。判断当前视频是播放还是暂停状态(设置清晰度,通过设置播放源来设置。若当前视频是静音状态,此时设置。属性来实现的,因此需要先知道。设置视频播放音量大小(是没有效果的,因为执行。

2023-08-30 12:01:04 1072

原创 c++ primer第五版6.27 6.28 6.29

#include<iostream>#include<string>using namespace std;int add(initializer_list<int> ls){ int result{0}; for (auto beg = begin(ls); beg != end(ls); beg++) { result += *beg; } return result;}void errmsg(i

2020-09-23 22:51:21 242

原创 4.21 4.22

4.21#include <iostream>#include <string>#include <cctype>#include <vector>using namespace std;int main(){ vector<int> ivec = { 1,2,3,4,5,6,7,8,9 }; for (auto iter = ivec.begin(); iter != ivec.end(); ++iter) { *it

2020-08-19 11:13:41 105

原创 3.35-3.36

3.35#include <iostream>#include <string>#include <cctype>#include <vector>using namespace std;int main(){ int arr[] = { 1,2,3,4,5,6,7,8,9 }; auto beg = begin(arr), en = end(arr); /*for (auto &c : arr) { c = 0; }*/

2020-08-09 09:54:59 110

原创 3.23-3.24

3.23#include <iostream>#include <vector>using namespace std;int main(){ vector<int> ivec{ 1,2,3,4,5,6,7,8,9,10 }; for (vector<int>::iterator it = ivec.begin(); it != ivec.end(); ++it) { *it = *it * 2; cout << *it

2020-08-09 09:27:47 111

原创 3.20

#include <iostream>#include <string>#include <cctype>#include <vector>using namespace std;int main(){ int i; vector<int> ivec; while (cin >> i) { ivec.push_back(i); } for (vector<int>::size_type is =

2020-08-08 01:21:01 68

原创 3.19

1:vector<int> ivec(10,42);vector<int> ivec{42,42,42,42,42,42,42,42,42,42}; vector<int> ivec={42,42,42,42,42,42,42,42,42,42};

2020-08-08 00:52:45 91

原创 3.18

不合法;可以改为:vector<int> ivec;ivec.push_back(42);

2020-08-08 00:47:37 75

原创 3.17

一种方法:范围for语句:#include <iostream>#include <string>#include <cctype>#include <vector>using namespace std;int main(){ string word; vector<string> text; while (cin >> word) { text.push_back(word); } for (auto

2020-08-08 00:44:38 73

原创 3.5

把多个字符连接成字符串#include <iostream>#include <string>using namespace std;int main(){ string word,str; while (cin >> word) { str += word; } cout << str << endl; return 0;}用空格把输入个多个字符串分隔开来```cpp #include &lt

2020-08-05 17:07:04 68

原创 3.4

读取两个字符串并输出较大的字符串#include <iostream>#include <string>using namespace std;int main(){ string s1,s2; cout << "Please enter two words!\n"; while (cin >> s1 >> s2) { if (s1 == s2) cout <<"相等 "<< s1 <&l

2020-08-05 16:54:57 76

原创 3.3

对于输入运算符(cin)会自动忽略字符前的空白字符,读入字符后再遇到空白字符停止对于getline函数则会直接读取到换行符就停止,(就算第一个读到换行符也会停止)

2020-08-05 16:41:00 63

原创 3.2

一次读入一行,然后输出#include <iostream>#include <string>using namespace std;int main(){ string s; while (getline(cin,s)) cout << s << endl; return 0;}一次读入一个词,然后输出#include <iostream>#include <string>using name

2020-08-05 16:37:10 72

原创 C++ 左自增(自减)和右自增(自减)的区别

#include <iostream>using namespace std;double power(double a, int b){ double result=1; while (b--) result *= a; return result;}int main(){ cout<<power(3, 2);}``````cpp...

2020-04-17 15:08:19 617

原创 把任意进制(10进制内)转化为10进制

#include<iostream>using namespace std;int weishu(int n){ int count = 1; while (n /= 10) count++; return count;}double power(double a, int b){ double val = 1; while (b) { val *= ...

2020-04-17 14:47:05 912

原创 10.1 c++primer 第四版 习题10.1

#include <iostream>#include <vector>#include <utility>#include<string>using namespace std;void show(vector<pair<string, int> > &vec ){ vector<p...

2020-04-09 14:56:07 115

原创 9.38 C++primer 第四版 习题9.38

#include <iostream>#include <string>using namespace std;int main(){ string str = "ab2c3d7R4E6"; string numbers { "1234567890" }; string letter{ "abcdefghijklmnopqrstuvwxyz ABCDEFG...

2020-04-08 22:13:07 267

原创 习题 9.35 c++ Primer 第四版 习题 9.35

c++primer 第四版 习题9.35使用迭代器寻找和删除string对象中所有的大写字母先出贴出配套习题解答上的答案;我在vs2019上编译不过去了int main(){ string str= "This Is A Example!"; for (string::iterator iter = str.begin(); iter != str.end(); ++iter) ...

2020-04-07 23:36:14 130

原创 c++primer 习题9.20 第四版

第一种思路:两个容器的元素分别比较#include <iostream> //习题9.20#include<vector>#include<list>using namespace std;int main(){ vector<int>ivec; cout << "Enter some numbers ...

2020-04-06 17:38:55 153

原创 C++primer 第四版 习题9.18

C++primer 第四版 习题9.18编写程序将int型的lis容器的所有元素复制到两个deque的容器中。list容器的元素如果为偶数,则复制到一个deque容器中;如果为奇数,则复制到另一个deque容器中。#include <iostream>#include<vector>#include<list>#include<deque&g...

2020-04-06 16:02:16 158

原创 6.16 c++primer第四版 习题练习6-16

#include <iostream>#include <vector>using namespace std;int main(){ int Min_size = 0; int val1 = 0,val2=0; vector<int> vi1, vi2; cout << "Enter numbers for the first ...

2020-03-31 00:16:34 157

原创 6.12 c++primer第四版 习题练习,以及引起的思考

习题6.12 编写一个小程序,从标准输入读入一系列string对象,寻找连续重复出现 的单词,程序应该找出满足以下条件的单词的输入位置: 该单词的后面紧跟着再次出现自己本身。跟踪重复次数最多的单词以及重复次数。输出冲覅次数的最大值, 若没有单词重复则输出说明信息。例如输入的是: how,now now now brown cow cow...

2020-03-30 16:30:47 194

原创 C++实现找100(任意)以内的质数--非常好的算法

很惊叹!#include<iostream>#include<bitset>#include<cmath>using namespace std;int main(){ const int Max_number =10000 ; const int Test_number = static_cast<int>(sqrt...

2020-03-29 01:13:43 3786

原创 4.30--c++primer第四版习题

#define _CRT_SECURE_NO_WARNINGS//c++primer 4.30#include#include#include using namespace std;int main(){const char str1[] = "Li Lei and Han Meimei ";const char str2[] = “are friends.”;size_t ...

2020-03-28 17:50:00 135

原创 4.28--c++primer第四版练习习题

原书中答案代码有误,运行结果不正确;经过分析原来 书中代码中for循环里:int *tp = p;for(vector<int>::iterator iter = ivec.begin(); iter !=ivec.end() ;++iter ,++tp) *tp = *iter;这段代码里新建指针tp,问题出在下面的for循环,最后tp已经来到指针(数组)最后一...

2020-03-28 15:14:24 142

原创 4.18--c++primer 第四版 练习

//编写程序 使用指针把一个int型数组的所有元素设置为0#include<iostream>using std::begin;using std::end;using std::cout;using std::endl;int main(){ const int arr_size = 5; int arr[arr_size] = {1,2,3.4,5};...

2020-03-27 23:25:12 81

原创 4.14--c++primer第四版 练习

//编写代码修改指针的值 ;然后再编写代码修改指针所指对象的值#include<iostream>using std::cout;using std::endl;int main(){ int v1 = 100,v2=200; //声明两个个整形变量 int* p1 = &v1; //声明指向整型的指针 p int* p2 = &v2; co...

2020-03-27 22:12:33 85

原创 4.9--c++primer第四版

//编写一个程序定义一个有10个int型元素的数组,并以其数组中的位置作为各元素的初值#includeint main(){const int Arr_size = 10;int arr[Arr_size];for (size_t i = 0; i != Arr_size; ++i)arr[i] = i+1;return 0;}...

2020-03-27 16:15:59 154

原创 4.8--c++primer 第四版

#include<iostream>#include<vector>using std::vector;using std::cout;using std::cin;using std::endl;//编写程序判断两个数组是否相等,然后把这段代码改用 vector实现 int main(){ vector<int> ivec1, ivec2;...

2020-03-27 16:04:36 151

原创 C++primer 第四版 习题4.8的有关问题

刚刚开始学习C++,做到习题4.8的时候测试不过,参考代码如下:#include<iostream>#include<vector>using std::vector;using std::cout;using std::cin;using std::endl;//编写程序判断两个数组是否相等,然后把这段代码改用 vector实现 int main()...

2020-03-27 15:54:47 159

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除