自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

这儿有个bug

Welcome to my blog

  • 博客(36)
  • 收藏
  • 关注

原创 docker 基础命令

docker 基础命令一、镜像搜索镜像: docker search 镜像名可以对结果进行过滤:是否官方镜像:docker search --filter “is-official=true" 镜像名最少 STARS 数:docker search --filter stars=3 镜像名下载镜像:docker pull 镜像名查看已下载镜像:docker...

2019-09-16 10:25:55 170

原创 学习如何写一个操作系统(一) - hello world

学习如何写一个操作系统(一) - hello world0.前言​ 最近跟着《30 天自制操作系统》学习写操作系统。在这里记录一下,如有错误,欢迎指正。​ 别拦我,今天这个坑,我是挖定了。1.准备工作需要了解的一些知识计算机是如何启动的关于主引导记录的内存地址0x7C00感谢以上两篇博客作者的讲解。工具 Sublime Text Virtu...

2018-02-14 14:51:24 647

原创 用 Java 实现一个简单的多线程 web 服务器

用 Java 实现一个简单的多线程 web 服务器1. 整体思路主线程 建立一个ServerSocket调用ServerSocket的accept方法。该方法一直阻塞,等待连接。如果连接建立,就会返回一个Socket对象。生成一个子线程处理Socket。执行步骤2。子线程 从Socket获得输入流,读入请求报文,找出请求资源的路径。从Socket获得输出流,响应请求的资源(资源存在)

2017-11-22 20:49:21 4020

原创 C语言文件操作

C语言文件操作一、文件的打开与关闭使用 fopen 打开文件FILE *file;file = fopen("文件名","文件使用方式");文件的打开方式 文件使用方式 解释 r 只读。若文件不存在返回空指针 w 只写。若文件存在,则删除其内容,否则创建一个新文件 a 追加。若文件不存在,则创建一个新文件 r+ 读写。指定的文件必须已存在,否则返回NULL

2017-09-09 00:34:10 5105 3

原创 操作系统实验之UNIX混合索引方式模拟(外存的增量式索引组织方式)

操作系统实验之UNIX混合索引方式模拟(外存的增量式索引组织方式)目前常用的外存组织方式有:连续组织方式链式组织方式 隐式链接显式链接索引组织方式 单级索引组织方式多级索引组织方式增量式索引组织方式混合索引组织方式即增量式索引组织方式混合索引方式的索引结点中设有 13 个地址项 直接地址:前 10 个地址项用来存放直接地址一次间接地址:第 11 个地址项来提供一次间接地址多

2017-06-12 21:59:44 12985

原创 Java 通过 JDBC 连接 MySQL 数据库的简单示例

Java 通过 JDBC 连接 MySQl数据库的简单示例JDBC 的下载与配置JDBC 下载下载 JDBCJDBC 配置将下载的驱动包解压,得到 mysql-connector-java-5.1.42-bin.jar(版本号可能不同)。然后将 mysql-connector-java-5.1.42-bin.jar 添加到 classpath 环境变量中。我把 mysql-connector-j

2017-06-09 15:20:58 813

原创 操作系统实验之磁盘调度算法模拟(最短寻道时间优先SSTF 和 扫描算法SCAN)

操作系统实验之磁盘调度算法模拟(最短寻道时间优先SSTF 和 扫描算法SCAN)最短寻道时间优先SSTF 要求每次访问的磁道与当前磁头所在的磁道距离最近、也就是每次访问距离磁头最近的磁道扫描算法SCAN 由里向外地访问,直到再无更外的磁道需要访问时,才将磁臂转向为自外向里移动磁盘调度算法 详细介绍模拟代码:#include<stdio.h>#include<algorithm>#

2017-06-05 15:47:57 13066 4

原创 操作系统实验之最近最久未使用算法(LRU)模拟

操作系统实验之最近最少使用算法(LRU)模拟LRU在前面几条指令中使用频繁的页面很可能在后面的几条指令中频繁使用。反过来说,已经很久没有使用的页面很可能在未来较长的一段时间内不会被用到。这个,就是著名的局部性原理——比内存速度还要快的cache,也是基于同样的原理运行的。因此,我们只需要在每次调换时,找到最近最久使用的那个页面调出内存。这就是LRU算法的全部内容。 LRU详细介绍模拟实现维护一个

2017-05-29 00:04:32 2973

原创 操作系统实验之银行家算法模拟

银行家算法模拟银行家算法中遇到的数据结构 可利用资源向量 Available Available[i] 表示第 i 种资源可利用的数目最大需求矩阵 Max Max[i][j] 表示第 i 个进程最多需要的第 j 类资源的数目分配矩阵 Allocation Allocation[i][j] 表示第 i 个进程已经占有的第 j 类资源的数目需求矩阵 Need Need[i][

2017-05-28 23:33:26 2646

原创 拓扑排序

拓扑排序–java 实现定义 在图论中,由一个有向无环图的顶点组成的序列,当且仅当满足下列条件时,称为该图的一个拓扑排序(英语:Topological sorting)。 每个顶点出现且只出现一次;若A在序列中排在B的前面,则在图中不存在从B到A的路径。也可以定义为:拓扑排序是对有向无环图的顶点的一种排序,它使得如果存在一条从顶点A到顶点B的路径,那么在排序中B出现在A的后面。方法一给定一

2016-12-31 00:00:02 521

原创 数据结构--java实现二叉树的先序、中序、后序、层次遍历及根据先序中序建立二叉树

数据结构--java实现二叉树的先序、中序、后序、层次遍历及根据先序中序建立二叉树1.二叉树节点的定义public class BiTreeNode { public Object data; public BiTreeNode leftchild,rightchild; //空节点构造 public BiTreeNode(){ this(null); } //构造左右子节

2016-10-23 16:00:05 2596 1

原创 hud 1007 Quoit Design(分治求最小点对)

hud 1007 Quoit Design(分治求最小点对)Problem DescriptionHave you ever played quoit in a playground? Quoit is a game in which flat rings are pitched at some toys, with all the toys encircled awarded

2016-10-14 20:42:45 293

原创 数据结构 -- 链栈java实现

数据结构--链栈  java 实现1.链栈,top指向栈顶元素。顺序栈,和 IStack 接口在这点击打开链接//节点的定义 class Node{ public Object data; public Node next; //无参构造方法 public Node(){ this(null,null);

2016-09-28 15:15:03 502 1

原创 数据结构--顺序栈java实现

1.顺序栈的简单实现,java(1)接口public interface IStack { public void clear(); //清空栈 public boolean isEmpty(); //栈的判空 public Object peek(); //查询栈顶元素 public int length(); //栈的

2016-09-28 14:07:07 840

原创 单链表基本操作java实现

单链表基本操作 - java实现1.单链表学习了好久,今天终于有时间写一下了,带头结点的单链表上的基本操作,Java实现。(1) 先来个接口public interface IList { public void clear(); //清空链表 public boolean isEmpty(); //链表判空 public int length(); //链表的长度 p

2016-09-26 20:04:42 1301 1

原创 数据结构-绪论作业

数据结构-绪论作业1、从一组N个数中确定其中的第k个最大者的问题称为选择问题(selection problem),请编写一个程序解决选择问题。要求使用泛型。思考好久不知道泛型该用到哪里,于是。。。/* * 绪论作业 * 1、从一组N个数中确定其中的第k个最大者的问题称为选择问题(selection problem),请编写一个程序解决选择问题。要求使用泛型。 */

2016-09-08 11:42:27 571

原创 Codeforces 659C Tanya and Toys

Codeforces 659C Tanya and Toystime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputIn Berland recently a new col

2016-09-04 20:01:23 265

原创 codeforces 501B Misha and Changing Handles

codeforces 501B - Misha and Changing Handlestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputMisha hacked th

2016-07-28 18:37:58 403

原创 codeforces 495B - Modular Equations

codeforces 495B - Modular Equationstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputLast week, Hamed learned

2016-07-26 14:41:49 355

原创 codeforces - 495A Digital Counter

codeforces - 495A   Digital Countertime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputMalek lives in an apartm

2016-07-26 14:30:47 499

原创 java 集合中自定义对象的几种排序方法

java 集合中自定义对象的几种排序方法1. 通过实现Comparable接口,来对集合中的自定义对象排序代码:import java.util.*;//student类,并实现Comparable接口class Student implements Comparable<Student>{ //姓名,成绩,年龄三个变量 private String name; priva

2016-07-14 00:28:41 12530 2

原创 Codeforces Round #354 (Div. 2) C Vasya and String

Codeforces Round #354 (Div. 2) C Vasya and Stringtime limit per test1 secondmemory limit per test256 megabytesHigh school student Vasya got a string of le

2016-06-12 22:30:28 343

原创 Codeforces 354 B Pyramid of Glasses (dp)

Pyramid of Glassestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputMary has just graduated from one well-known U

2016-06-07 23:37:19 294

原创 CodeForces 362B Petya and Staircases

CodeForces 362B Petya and Staircases time limit per test  1 secondmemory limit per test  256 megabytesLittle boy Petya loves stairs very much. But he is bored from simple

2016-06-01 22:48:31 382

原创 CodeForces362A Two Semiknights Meet(dfs)

CodeForces362A Two Semiknights MeetTime Limit:1000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u DescriptionA boy Petya loves chess very much. He even came up with a chess piece of his

2016-06-01 21:30:00 283

原创 CodeForces 595B Pasha and Phone

CodeForces 595B Pasha and PhoneTime Limit:1000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u DescriptionPasha has recently bought a new phone jPager and started adding his friends’ pho

2016-06-01 10:31:12 362

原创 HDU5706 GirlCat(简单dfs)

HDU5706 GirlCat (简单dfs)Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Problem DescriptionAs a cute girl, Kotori likes playing “Hide and Seek” with cats p

2016-05-29 23:13:41 581

原创 2016"百度之星" - 初赛(Astar Round2B)1003 瞬间移动(HDU5698)(逆元+快速幂)

2016”百度之星” - 初赛(Astar Round2B)1003 瞬间移动(HDU5698)(逆元+快速幂)Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Problem Description有一个无限大的矩形,初始时你在左上角(即第一行第一列),每次你都可以选择一个右下

2016-05-28 22:47:24 662

原创 CodeForces 672B Different is Good

CodeForces 672B Different is Goodtime limit per test:2 seconds memory limit per test:256 megabytes input:standard input output:standard outputA wise man told Kerem “Different is good” once, so Kerem

2016-05-27 14:53:27 386

原创 CodeForces 614B Gena's Code

CodeForces 614B Gena’s CodeTime Limit:500MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u DescriptionIt’s the year 4527 and the tanks game that we all know and love still exists

2016-05-27 14:42:17 576

原创 CodeForces 614C Peter and Snow Blower

CodeForces 614C  Peter and Snow Blowertime limit per test:2 secondsmemory limit per test:256 megabytesinput:standard inputoutput:standard outputPeter got a new snow blower

2016-05-25 23:36:48 585

原创 山东省第一届ACM程序设计大赛 Balloons (简单dfs)

BalloonsTime Limit: 1000MS Memory Limit: 65536KB 64bit IO Format: %lld & %llu SubmitStatusDescriptionBoth Saya and Kudo like balloons. One day, they heard that in the central park, there wi

2016-05-21 21:39:35 376

原创 hdu 1312 Red and Black(dfs)

hdu 1312 Red and Black(dfs)

2016-05-20 20:47:47 375

原创 2016百度之星资格赛 Problem B

2016百度之星资格赛 Problem B题目: Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Problem Description度熊面前有一个全是由1构成的字符串,被称为全1序列。你可以合并任意相邻的两个1,从而形成一个新的序列。对于给定的一个全1序列,请计算根据以上方法

2016-05-15 17:49:25 338

原创 hdu 1212 Big Number(大数取余)

Big Number(大数取余)Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 6998 Accepted Submission(s): 4819Problem Description As we know, Big Number

2016-05-10 23:30:17 385

原创 zoj 3785 What day is that day?

**zoj 3785 What day is that day?**What day is that day?Time Limit: 2 Seconds Memory Limit: 65536 KBIt’s Saturday today, what day is it after 11+22+33+...+NN 1^1 + 2^2 + 3^3 + ... + N^N days?Input

2016-05-07 22:22:19 344

空空如也

空空如也

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

TA关注的人

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