自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(26)
  • 资源 (1)
  • 收藏
  • 关注

原创 请你吃烧烤

python类的基础使用,封装class Potato(object): def __init__(self): self.status = '生的' self.totaltime = 0 self.name_list = [] def cook(self, time): self.totaltime += time if self.totaltime < 3: self.sta

2021-05-23 19:16:13 184 1

原创 python学生管理系统(学校里交作业的那种简单的)

无话可说,水博客stu_list = []def show_menu(): print('1.添加学生') print('2.删除学生') print('3.修改学生信息') print('4.查询单个学生信息') print('5.查询所有学生信息') print('6.退出系统')def insert_student(): name = input('请输入学生姓名:') for stu in stu_list:

2021-05-20 11:50:26 636

原创 javascript web编程案例干货

1.定时器<style> span { width: 50px; height: 50px; background-color: black; color: seashell; border: 10px solid #eee; } </style><body> <span class='hour

2021-05-01 18:55:26 224

原创 JavaScript web编程

js动态添加表格<style> table { width: 500px; margin: 100px auto; border-collapse: collapse; text-align: center; } td, th { border: 1px solid #333;

2021-04-21 03:56:36 246

原创 JavaScript web编程

1.创建节点<body> <ul> <li>123</li> </ul> <script> //创建节点元素 var li = document.createElement('li'); //增添节点元素node.appendChild(child) node父级 child子集 var ul = document.querySel

2021-04-19 20:29:16 118

原创 JavaScript web编程

百度换肤<style> * { margin: 0; padding: 0; } list { list-style: none; } body { background: url(picture/1.jpg) no-repeat center top; }

2021-04-18 22:34:56 366 3

原创 css实现动态熊熊奔跑

代码如下 <style> div { position: absolute; width: 200px; height: 100px; background: url(picture/bear.png) no-repeat; /* 多个动画用,分隔 */ animation: bear .4s steps(8) infinite.

2021-04-02 19:32:30 450 2

原创 动画里的打字机模式小技巧

直接上代码这个程序贼有趣像打字机把一个字一个字打出来不通过js也能完成动态效果,这也是css的好处哈 <style> @keyframes w { 0% { width: 0; } 100% { width: 900px; } } div {

2021-04-02 00:26:26 259 1

原创 css中的动画效果

在前端中,随着语言的发展,css变得越来越强大,可以实现许多动态动画效果!下面是动画效果的基本格式<style> @keyframes move { 0% { transform: translate(0, 0); } 100% { transform: translate(1000px, 0); } }

2021-04-01 17:46:00 380

原创 Vector模拟随机散步

程序模拟醉鬼走路问题了解随机数(rand,srand)了解time函数(time())#include <iostream>#include <cstdlib> // rand(), srand() prototypes#include <ctime> // time() prototype#include "vect.h"int main(){ using namespace std; using VECTOR::Vect

2021-03-29 19:30:09 120

原创 重载,一个矢量类

Vector#include <iostream>#include <cmath>namespace VECTOR{ class Vector { public: enum Mode { RECT, POL }; // RECT for rectangular, POL for Polar modes private: double x; // horizontal value

2021-03-29 19:08:58 149

原创 简单的递归

简单的递归void recurs(argumentlist){ statements1 if (test) recurs(arguments) statements2}递归简单来说便是函数调用自身函数。#include <iostream>void countdown(int n);int main(){ countdown(4); // call the recursive function

2021-03-29 17:37:49 183

原创 友元

学习C++中,我们使用类,我们发现C++控制对类对象私有部分的访问,通常公有部分提供唯一的访问途径,这给C++带来了限制,友元能够帮我们很好的解决这个问题。解决这种问题的方式:1.严格按照A=B*2.75形式来写2.使用非成员函数(友元)Time operator*(double m, const Time & t);这种函数却无法访问私有部分,我们在类声明中加上friend,从而形成友元。friend Time operator*(double m, const Time &am

2021-03-25 14:55:17 272

原创 运算符重载的限制

**运算符重载比较实用,但是也存在许多的限制**c++代码其他重载运算符的运用Time operator+(const Time& t) const;Time operator-(const Time& t) const;Time operator*(double n) const;#include <iostream>using namespace std;class Time{private: int hours; int minu

2021-03-23 19:12:59 118

原创 运算符的重载

c++内类的运用1.计算时间#include <iostream>using namespace std;class Time{private: int hours; int minutes;public: Time(); Time(int h, int m = 0); void AddMin(int m); void AddHr(int h); void Reset(int h = 0, int m = 0); Ti

2021-03-23 00:23:30 93

原创 数据结构和算法

算法和数据结构著名计算机科学家N.Wirth教授提出一个公式:算法+数据结构=程序算法有五个重要特性1.有穷性2.确定性3.可行性4.输入5.输出要得到一个高效的算法,在设计算法时,就要对算法的执行时间有一个客观的分析。一般的,把算法中包含的简单操作的次数的多少称为算法的时间复杂度,它是一个算法运行的相对量度。int sum(int a[], int n){ int s = 0, i; for (i = 0;i < n;i++) s += a[i]; return s

2021-03-21 21:01:39 84

原创 类中的知识点

1.this 指针在简单的程序中,类成员函数通常涉及一个对象,但是复杂时有可能涉及两个对象,这种情况就要用到指针。多说无益,look!const Stock1& topval(const Stock& s)const;const Stock& Stock::topval(const Stock& s)const{ if (s.total_val > total_val) return s; else return *this;}total_v

2021-03-21 15:21:21 284

原创 引用,指针,值传递

1.引用的好处#include<iostream>using namespace std;void swapr( int a, int b);void swapp(int &a, int &b);void swapv( int* a, int* b);int main(){ int wallet1 = 100, wallet2 = 50; cout << "wallet1=" << wallet1; cout << "wal

2021-03-20 15:43:15 143 1

原创 算法day2

三色旗说明:三色旗的问题最早由E.W.Dijkstra所提出,他所使用的用语为Dutch Nation Flag(Dijkstra为荷兰人),而大多数的作者则使用Three-Color Flag来称之。假设有一条绳子,上面有红,白,蓝三种颜色的旗子,起初绳子上的旗子颜色并没有顺序,您希望将之分类,并排列为蓝,白,红的顺序,要如何移动次数才会最少,注意您只能在绳子上进行这份动作,而且一次只能调换两个色旗子。解法:在一条绳子上移动,在程式中也就意味着只能使用一个阵列,而不能使用其他的阵列来作辅助,问题

2021-03-15 23:00:36 95

原创 两个常用算法day1

1.递归,经典汉诺塔问题、河内之塔(Towers of Hanoi)是法国人M.Claus(Lucas)于1883年从泰国带至法国的,河内之塔为越战时北越的首都,即现在的胡志明市;1883年法国数学家Edouar Lucas曾提及这个故事,据说创世纪时Benares有一座波罗教塔,是由三支钻石棒所支撑,开始时神在第一根棒上放置64个由上至下依由小到大排列的金盘(Disc),并命令僧侣将所有的金盘从第一根石棒移至第三根石棒,且搬运过程中遵守大盘子在小盘子之下的原则,若每日仅搬一个盘子,则当盘子全数搬运完毕之

2021-03-14 23:57:38 90

原创 指针

指针指针和地址容易弄混,特别是在数组中,c++中有许多的差别,先来看一串代码!// addpntrs.cpp -- pointer addition#include <iostream>int main(){ using namespace std; double wages[3] = {10000.0, 20000.0, 30000.0}; short stacks[3] = {3, 2, 1};// Here are two ways to get th

2021-03-12 20:46:02 136 2

原创 指针与自由存储空间

long * fellow; // create a pointer-to-long*fellow = 223323; // place a value in never-never land使用new来分配内存!在大型项目中有巨大作用,减少内存!int * pn = new int;typeName * pointer_name = new typeName;看一串代码:// use_new.cpp -- using the new operator#include <io

2021-03-11 20:56:50 91

原创 cin的部分应用

No.1 cin.getline()// instr2.cpp -- reading more than one word with getline#include <iostream>int main(){ using namespace std; const int ArSize = 20; char name[ArSize]; char dessert[ArSize]; cout << "Enter your name:\n";

2021-03-10 12:30:51 143 1

原创 2d转换缩放与旋转

## 本章将介绍简单的2d缩放的实现,并且举几个简单的应用案例。No.1缩放属性直接上代码<body> <div class="m"> </div><body>* { margin: 0; padding: 0;}.m { height: 500px; width: 500px; margin: 100px auto; background-color: pink;}.

2021-03-10 02:20:40 260 1

原创 网页中移动盒子的情况整理

NO.1 通过定位来解决**话不多说上代码1.body样式<body> <div class="p"> <div class="c"></div> </div></body>2.style样式.p { position: relative; height: 500px; width: 800px; background-color: purple; m

2021-03-08 19:27:18 412

原创 网页前端

关于html CSS中的一个小细节在网页中我们经常会看到这样一种样式很是新奇。以淘宝网为例:这里原先盒子(div)边框是无色,鼠标在上面滑动一下下就变成橙色,这是一种很好看的网页布局,对于很多人来说这种样式我们很容易想到用伪类来做:hover 的确大家的思路很正确,本来我以为非常简单,但是在上手制作的时候发现一些小bug,与大家分享一下。这是我原先的代码 <style> li { list-style: none; }

2021-03-02 21:15:01 142

shoping.zip

pink老师教的那个,博主敲了好长时间,图片啥的都在里面,分类明确,如果还有啥差的,私信我,最近都在线

2021-05-01

空空如也

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

TA关注的人

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