会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
爱白菜的小昆虫
博客园
首页
新随笔
联系
管理
订阅
[置顶]
自己制作的学习笔记视屏,还有记录的代码。
摘要: https://member.bilibili.com/ 发布视频 爱白菜的小昆虫 https://github.com/smallinsect/ 发布代码
阅读全文
posted @ 2019-11-17 02:40 爱白菜的小昆虫
阅读(233)
评论(0)
推荐(0)
[置顶]
函数的指针(一)写一个能对任意数组排序的冒泡排序
摘要: MyFunc.cpp文件内容 MyFunc.h文件内容 Main.cpp文件内容 运行效果:
阅读全文
posted @ 2016-06-01 20:14 爱白菜的小昆虫
阅读(1215)
评论(0)
推荐(0)
[置顶]
自己写一个swap函数交换任意两个相同类型元素的值 对空指针的使用 字节大小的判断(二)了解原理
摘要: 验证的代码: 运行结果: 1、通过运行结果,我通过位运算<<将字符'Z' 'z' 'A' 'a'的顺序拼接到整数变量num中,从打印的sizeof(num)=4个字节,sizeof(char)=1个字节,表示一个整形变量可以拼接4个字符。 2、为了能让char*指针能访问int变量的地址,我们先用v
阅读全文
posted @ 2016-06-01 19:28 爱白菜的小昆虫
阅读(692)
评论(0)
推荐(0)
[置顶]
自己写一个swap函数交换任意两个相同类型元素的值 对空指针的使用 字节大小的判断(一)
摘要: 程序运行结果
阅读全文
posted @ 2016-06-01 18:31 爱白菜的小昆虫
阅读(579)
评论(0)
推荐(0)
[置顶]
JAVA-JNI java程序调用c/c++程序
摘要: 目的:写c/c++函数,让java调用 java代码 1.创建HelloJNI.java文件->编写代码如下->cmd中javac HelloJNI.java获取HelloJNI.class文件 2.在cmd中 javah HelloJNI 获取HelloJNI.h文件 下面是c/c++程序 1.创
阅读全文
posted @ 2016-05-26 04:41 爱白菜的小昆虫
阅读(1777)
评论(0)
推荐(0)
[置顶]
ACM-ICPC LA 4329 Ping pong(树状数组)
摘要: https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2330参考资料:《算法入门经典训练指南》刘汝佳 P197这本书上面写的题目大意、解题思路都写...
阅读全文
posted @ 2014-11-02 03:12 爱白菜的小昆虫
阅读(325)
评论(0)
推荐(0)
[置顶]
HDU 4509 湫湫系列故事——减肥记II(线段树-区间覆盖 或者 暴力技巧)
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=4509题目大意: 中文意义,应该能懂。解题思路: 因为题目给的时间是一天24小时,而且还有分钟。为了解题方便,我们将小时换成分钟,那么一天24小时,总共有1440分钟。顾我就可以把一天里的任意HH:MM时间换成...
阅读全文
posted @ 2014-10-20 21:50 爱白菜的小昆虫
阅读(372)
评论(0)
推荐(0)
[置顶]
HDU 4504 威威猫系列故事——篮球梦(dp)
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=4504题目大意: 中文都看得懂。不过我是看hint才正确理解什么意思的。开始的时候理解错了。解题思路: 给定时间最多是600,最多进攻次数600/15=40次,我方进攻次数40/2=20次。如果深度搜索多少种情...
阅读全文
posted @ 2014-10-20 09:13 爱白菜的小昆虫
阅读(295)
评论(0)
推荐(0)
[置顶]
LA 3942 - Remember the Word (字典树 + dp)
摘要: https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1943题目大意: 给定一个字符串和给定一个单词集合。问从给定单词集合中选取单词,有多少种选...
阅读全文
posted @ 2014-10-19 01:13 爱白菜的小昆虫
阅读(836)
评论(0)
推荐(0)
[置顶]
HDU 5063 Operation the Sequence(仔细审题)
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=5063题目大意: 题目意思还是比较简单。所以就不多少了。注意这句话,对解题有帮助。 Type4: Q i query current value of a[i], this operator will have...
阅读全文
posted @ 2014-10-12 01:26 爱白菜的小昆虫
阅读(206)
评论(0)
推荐(0)
[置顶]
HDU 5055 Bob and math problem(简单贪心)
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=5055题目大意: 给你N位数,每位数是0~9之间。你把这N位数构成一个整数。要求: 1、必须是奇数 2、整数的前面没有0 3、找到一个最大的整数如果满足1、2、3条件,就输出这个数,不满足就输出-1.给个例...
阅读全文
posted @ 2014-09-29 14:54 爱白菜的小昆虫
阅读(326)
评论(0)
推荐(0)
[置顶]
HDU 5053 the Sum of Cube(简单数论)
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=5053题目大意: 求出A^3+(A+1)^3+(A+2)^3+...+B^3和是多少解题思路: 设f(n)=1~n的立方和,则A^3+(A+1)^3+(A+2)^3+...+B^3=f(B) - f(A - 1...
阅读全文
posted @ 2014-09-29 14:22 爱白菜的小昆虫
阅读(301)
评论(0)
推荐(0)
2021年4月21日
TypeScript 没有对结构体的属性初始化或者没有给对象属性初始化 未初始化的字段都是undefined
摘要: https://gitee.com/smallinsect/MyJS/blob/master/TypeScript/%E5%AF%B9%E8%B1%A1%E5%B1%9E%E6%80%A7%E6%9C%AA%E5%88%9D%E5%A7%8B%E5%8C%96.ts interface Animal
阅读全文
posted @ 2021-04-21 20:28 爱白菜的小昆虫
阅读(846)
评论(0)
推荐(0)
2021年4月18日
VSCode配置Go环境安装依赖github代码失败
摘要: https://gitee.com/smallinsect/MyVSCode 查看Go的GOPATH路径 命令 go env 上面链接里面有个src.rar文件,将里面的文件解压到%GOPATH%src路径下,我设置的GOPATH是d:\Go\gopath 然后在这个文件路径打开终端,执行如下命令
阅读全文
posted @ 2021-04-18 20:14 爱白菜的小昆虫
阅读(616)
评论(0)
推荐(0)
2021年4月14日
typescript 函数返回多个值 接受函数返回的多个值
摘要: function func1(): {data: number, err: string, msg: string} { return { data: 1, err: "小昆虫", msg: "爱白菜" }; } console.log(func1()); { let obj = func1();
阅读全文
posted @ 2021-04-14 09:16 爱白菜的小昆虫
阅读(5122)
评论(0)
推荐(0)
2021年3月31日
nodeJS TypeScript undefined null 变量旁边问号?
摘要: https://github.com/smallinsect/MyJS/blob/main/TypeScript/define.ts 1 // a是undefined表示变量未定义,理解为变量不存在。 2 // a=null表示变量值为空值,理解为变量存在但没有值。 3 4 // 变量a旁边的问号?
阅读全文
posted @ 2021-03-31 12:13 爱白菜的小昆虫
阅读(327)
评论(0)
推荐(0)
TypeScript for循环 in和of
摘要: let arr: string[] = ["小昆虫1", "小昆虫2", "小昆虫3"]; // 遍历数组值 console.log("遍历数组值 "); for (let item of arr) { console.log(item); } // 遍历数组索引 console.log("遍历数组
阅读全文
posted @ 2021-03-31 11:18 爱白菜的小昆虫
阅读(1416)
评论(0)
推荐(0)
2020年7月15日
Golang 读取json文件,并解析结构体
摘要: 代码 https://github.com/smallinsect/MyGo/tree/master/myjson MyUsers.json文件内容 { "name": "小昆虫", "age": 2233, "account_id": "2222222aaaaa", "password": "**
阅读全文
posted @ 2020-07-15 16:58 爱白菜的小昆虫
阅读(5357)
评论(0)
推荐(0)
2020年7月8日
Golang 时间转换
摘要: 完整代码 https://github.com/smallinsect/MyGo/tree/master/mytimer //时间转换的模板,golang里面只能是 "2006-01-02 15:04:05" (go的诞生时间) var TIME_LAYOUT string = "2006-01-0
阅读全文
posted @ 2020-07-08 16:08 爱白菜的小昆虫
阅读(393)
评论(0)
推荐(0)
2020年2月23日
Go 序列化简单操作
摘要: // SerializeFunc ... 序列化 func SerializeFunc() { monster := Monster{ Name: "小昆虫", Age: 10000, Birthday: "0000-00-00", Sal: 22.33, Skill: "飞沙走石", } //将m
阅读全文
posted @ 2020-02-23 22:25 爱白菜的小昆虫
阅读(347)
评论(0)
推荐(0)
Go map的range遍历
摘要: // MapFunc03 ... map的range遍历 func MapFunc03() { m := make(map[string]string) m["11111"] = "小昆虫" m["22222"] = "小白菜" m["33333"] = "小东风" m["44444"] = "小青
阅读全文
posted @ 2020-02-23 00:38 爱白菜的小昆虫
阅读(1262)
评论(0)
推荐(0)
Go map增删改查
摘要: // MapFunc02 ... map的增删改查 func MapFunc02() { m := make(map[string]string) m["11111"] = "小昆虫" m["22222"] = "小白菜" m["33333"] = "小东风" fmt.Println("m=", m
阅读全文
posted @ 2020-02-23 00:18 爱白菜的小昆虫
阅读(244)
评论(0)
推荐(0)
下一页