最近在弄一个东西,基本的功能已经弄好了,现在想再扩展一起其他功能,但这样势必会改动原有代码,我又不想破坏原有的代码逻辑,方便以后查看。记得Git有个分支工作流可以很好的满足我的需求(๑•̀ㅂ•́)و✧。emmm,很久没发文了,record一下吧。(ノへ ̄、) 使用到的命令 $ git branch # 显示所有本地分支 $ git branch <new branch> # 创建新分支 $ git checkout <branch> # 切换到指定分支 $ git branch -d <branch>
I was working on the page reconstruction recently, and here is how I divide a page into widgets and how do they interacts in this new attempt.
I learned DFS last month,I almost forgot how to use it,so that I can’t solve a problem in a practice
title: "practice"output: html_documentdate: "2024-01-28"R MarkdownThis is an R Markdown document.
Kotlin 练习参考https://www.kotlincn.net/docs/reference/
NHibernate Contrib Best Practice 介绍 NHibernate Contrib(Burrow)是一个轻量级的开发中间件,底层使用Nhibernate 2.0GA(Nhibernate
PAT (Basic Level) Practice 题号前带x的为部分测试点超时。
这是我的自己写的第一个KNN比较简单的练习案例,有关于KNN的介绍请参考我的上篇博文
title: "20231114_Note_Practice"output: html_documentdate: "2023-11-13"R Markdownhead(iris)## Sepal.Length
https://fangpenlin.com/posts/2012/08/26/good-logging-practice-in-python/ In reality, logging is important Of course you can print messages to stderr, but still, it is not a good practice to use print for logging Capture exceptions and record them with traceback It is always a good practice to record when something With good logging practice, you can find issues in your system easier.
01背包,涉及贪心,先买最贵的菜,然后就转化为容量为m-5,物品数量n-1的,进行01背包;
原理: 从数组中取出一个值(通常取中间的那个),小于该基准值的放在左侧,大于该基准值放右侧,循环往复。
Now, your task is relaxing yourself and making the last practice.
原理: 从数组中取出一个值(通常取中间的那个),小于该基准值的放在左侧,大于该基准值放右侧,循环往复。
定义一个学生类,有下面的属性 姓名 年龄 成绩(语文,数学,英语)每课成绩类型为整数 类方法 获取学生的姓名:get_name() 返回类型:str 获取学生的年纪:get_age() 返回类型:int 返回3门科目中最高的分数,get_course() 返回类型:int class Student(object): def __init__(self, name, age, scores): self.name = name self.age = age
定义一个门票系统 门票的原价是100元 当周末的时候门票涨价20% 小孩子半票 计算2个成人和1个小孩的平日票价 class Ticket(): def __init__(self, weekend = False, child = False): self.exp = 100 if weekend: self.inc = 1.2 else: self.inc = 1
创建北京和成都两个校区 创建Linux/Python两个课程 创建北京校区的Python 3期课程和成都校区的Linux 1期课程 管理员创建了北京校区的学员小张,并将其分配在了Python 3期 管理员创建了讲师小周,并将其分配给了Python 3期 讲师小周创建了一条 Python 3期的上课记录 Day02 讲师小周为Day02 这节课所有的学院批改了作业,小张得到了A,小王得到了B 学员小张查看了自己所报的课程 学员小张在查看了自己在Python 3的成绩列表然后退出了 学员小张给了讲师小周好评 C
append()和extend()和insert() a = [1,2,3,4,5] a.append([6,7,8]) print(a) b = [1,2,3,4,5] b.extend([6,7,8]) print(b) c = [1,2,3,4,5] c.insert(3,10) print(c) [1, 2, 3, 4, 5, [6, 7, 8]] [1, 2, 3, 4, 5, 6, 7, 8] [1, 2, 3, 10, 4, 5] 假定给出一个列表 member = "图灵", "的",
击球训练中, 你击中一个球的概率为p,连续击中k1个球, 或者连续击空k2个球, 则训练结束。