会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
W-forever
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
8
下一页
2021年6月23日
665.非递减数列
摘要: 665.非递减数列 思路问题:这道题主要要考虑到出现比前面小的两种情况,对这两种情况进行修改,要注意不可以影响到其他书数大小的变化,还有要注意i为1的情况 class Solution(object): def checkPossibility(self, nums): """ :type nums
阅读全文
posted @ 2021-06-23 11:35 W-forever
阅读(36)
评论(0)
推荐(0)
2021年5月29日
pandas
摘要: 1. xlrd + xlwt 1.1 xlrd import xlrd xlsx = slrd.open_workbook("文件路径") table = xlsx.sheet_by_index(0)//使用索引打开,第0个表 #table = xlsx.sheet_by_name("表名")//根
阅读全文
posted @ 2021-05-29 09:30 W-forever
阅读(127)
评论(0)
推荐(0)
2021年5月22日
08.继承
摘要: 1 单例设计模式 1.1 饿汉单例设计模式 单例设计模式:保证一个类中至少有一个对象 模式:模式就是解决一类问题的固定步骤 软件行业的23种设计模式:  单例设计模式  模板设计模式  装饰者设计模式  观察者设计模式  工厂设计模式 单例设计模式的步骤:  1.私有化构造函数  2.
阅读全文
posted @ 2021-05-22 19:32 W-forever
阅读(69)
评论(0)
推荐(0)
2021年5月20日
13.sprintf and sscanf
摘要: sprinf #include<stdio.h> int main() { int a = 10; char ch = 'd'; char ch1[100] = "hello"; printf("a = %d ch = %c ch1 = %s\n", a, ch, ch1); char ch2[10
阅读全文
posted @ 2021-05-20 14:12 W-forever
阅读(55)
评论(0)
推荐(0)
12.字符串相关函数
摘要: 字符串的拷贝 #include<stdio.h> #include<string.h> int main() { char src[100] = "hello mike"; char dst[100]; //把src字符数组的内容拷贝给dst所代表的数组 strcpy(dst, src); //拷贝
阅读全文
posted @ 2021-05-20 14:07 W-forever
阅读(55)
评论(0)
推荐(0)
2021年5月19日
11.strlen
摘要: #include<stdio.h> #include<string.h> #include<graphics.h> int main() { char buf[] = "hello"; int len = strlen(buf); printf("%d", len); printf("%d", si
阅读全文
posted @ 2021-05-19 20:16 W-forever
阅读(54)
评论(0)
推荐(0)
10.字符串的输出
摘要: #include<stdio.h> int main() { char buf[20] = "hello"; puts(buf);//把buf内容输出到屏幕,自动在屏幕上家换行,是在屏幕上加,字符串本身没有变化 printf("%s", buf);//没有加换行符 char ch[20] = "he
阅读全文
posted @ 2021-05-19 20:14 W-forever
阅读(142)
评论(0)
推荐(0)
09.gets()和fgets()
摘要: #include<stdio.h> int main() { char ch[30]; scanf("%s", ch); printf("%s", ch);//scanf默认通过空格分割,所有如果输入的内容含有空格,只会输入第一个空格前面的内容 char ch1[20]; gets_s(ch1);/
阅读全文
posted @ 2021-05-19 16:45 W-forever
阅读(62)
评论(0)
推荐(0)
08.随机数的产生
摘要: #include<stdio.h> #include<stdlib.h> #include<time.h> int main() { //先设置种子,种子设置一次即可 //如果srand()参数一样,随机数就一样 //time(null)获取系统的当前时间,由于时间会变,种子也会改变 srand((
阅读全文
posted @ 2021-05-19 16:44 W-forever
阅读(56)
评论(0)
推荐(0)
07.字符数组和字符串
摘要: #include<stdio.h> int main() { char a[10]; //字符串一定是字符数组,字符数组不一定是字符串 //如果字符数组以'\0'('\0'等价于数字0)结尾,那么这个字符数组就是字符串 char b[] = { 'a', 'b', 'c' };//字符数组 prin
阅读全文
posted @ 2021-05-19 16:42 W-forever
阅读(93)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
下一页
公告