自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(45)
  • 收藏
  • 关注

原创 系统分析与设计lesson16

使用 ECB 实现 make reservation 用例的详细设计(包含用例简介,顺序图,类图)用例简介:用户首先开始搜索酒店,然后根据搜索方式开始按照酒店名称搜索酒店,搜索完成之后得到搜索表单。根据搜索表单,用户选择满意的酒店,选择酒店完成后,用户再选择房间类型,并最后验证预订就完成了整个过程。顺序图: UML类图: 2.将逻辑设计类图映射到实际项目框架的包图。用树形结...

2018-06-30 18:42:57 179

原创 系统分析与设计lesson13

描述软件架构与框架之间的区别与联系 软件架构是一个系统的草图。软件架构描述的对象是直接构成系统的抽象组件。各个组件之间的连接则明确和相对细致地描述组件之间的通讯。软件框架是指在一定的设计原则基础上,从不同角度对组成系统的各部分进行搭配和安排,形成系统的多个结构而组成架构,它包括该系统的各个组件,组件的外部可见属性及组件之间的相互关系。组件的外部可见属性是指其他组件对该组件所做的假设。绘制三层...

2018-06-30 18:17:28 221

原创 系统分析与设计5

1)使用 UML State Model建模对象: 参考 Asg_RH 文档, 对 Reservation/Order 对象建模。 建模要求: 参考练习不能提供足够信息帮助你对订单对象建模,请参考现在 定旅馆 的旅游网站,尽可能分析围绕订单发生的各种情况,直到订单通过销售事件(柜台销售)结束订单。 2)研究淘宝退货流程活动图,对退货业务对象状态建模 ...

2018-05-06 22:07:04 187

原创 系统分析与设计4

1、 领域建模a. 阅读 Asg_RH 文档,按用例构建领域模型。领域模型:b. 数据库建模(E-R 模型)(1)系统的 E-R 模型(数据逻辑模型): (2)导出 Mysql 物理数据库的脚本:/*==============================================================*//* DBMS name: ...

2018-05-06 22:03:26 206

原创 系统分析与设计作业3

1、 用例建模a. 阅读 Asg_RH 文档,绘制用例图。 按 Task1 要求,请使用工具 UMLet,截图格式务必是 png 并控制尺寸 Task 1 Develop a detailed use case model for “Reserve Hotel”. The model should take a user’s (rather than system’s) perspec...

2018-04-15 23:11:47 303

原创 系统分析与设计作业2

1.简答题简述瀑布模型、增量模型、螺旋模型(含原型方法)的优缺点。 瀑布模型的优点: 1、让开发人员采用规范的方法; 2、严格规定了每个阶段必须提交的文档; 3、要求每个阶段交出的所有产品都必须经过质量保证小组的仔细验证。 瀑布模型的缺点: 1、在软件开发初期,指明用户全部需求是困难的; 2、需求确定后,经过一段时间才得到软件最初版本; 3、完全依赖规格说明,导致不能...

2018-03-19 23:16:16 323

原创 leetcode练习 Clone Graph

Clone an undirected graph. Each node in the graph contains a label and a list of its neighbors. 题目说用一种方法表示图,属于题目自己的方便,跟代码没啥关系,就不放了,反正就是个克隆图。这次继续熟悉unordered_map 对应关系就是原图对应克隆图,代码如下:/** * Definiti...

2018-03-19 22:26:33 123

原创 系统分析与设计作业1

1、简单题软件工程的定义: 软件工程一直以来都缺乏一个统一的定义,很多学者、组织机构都分别给出了自己认可的定义:BarryBoehm:运用现代科学技术知识来设计并构造计算机程序及为开发、运行和维护这些程序所必需的相关文件资料。IEEE:在软件工程术语汇编中的定义:软件工程是:1.将系统化的、严格约束的、可量化的方法应用于软件的开发、运行和维护,即将工程化应用于软件;2.在1中所述方法...

2018-03-14 22:55:59 258

原创 leetcode练习 House Robber

You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is that adjacent house

2018-01-26 16:50:33 176

原创 关于一个NP完全问题的证明

这里给出的例子是教材《算法概论》P267的8.14。题目: Prove that the following problem is NP-complete: given an undirected graph G = (V, E) and an integer k, return a clique of size k as well as an independent set of size k

2018-01-20 12:04:44 439

原创 leetcode练习 Jump Game

Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximum jump length at that position.Determine if yo

2018-01-10 15:45:13 118

原创 leetcode练习 Maximum Length of Repeated Subarray

Given two integer arrays A and B, return the maximum length of an subarray that appears in both arrays.Example:Input:A: [1,2,3,2,1]B: [3,2,1,4,7]Output: 3Explanation: The repeated subarray wi

2018-01-09 21:04:28 157

原创 leetcode练习 Delete and Earn

Given an array nums of integers, you can perform operations on the array.In each operation, you pick any nums[i] and delete it to earn nums[i] points. After, you must delete every element equal to n

2018-01-07 22:02:13 315

原创 leetcode练习 Min Cost Climbing Stairs

再次进入动态规划的学习,先选了一道easy的题目,果然一次过。。。class Solution {public: int minCostClimbingStairs(vectorint>& cost) { vectorint> step; step.resize(cost.size()); for (int i = 0; i < cos

2018-01-05 21:48:57 188

原创 关于《算法概论》中,使用dfs对图进行标记的操作的实践

其实本身是在做leetcode 685. Redundant Connection II 题目说一定以根节点开头,但实际好像并非如此…感觉被坑了。 原先的思路是利用书中所说的dfs,选好根节点,进行pre和post标记,根据每个节点的标记判断前向边,横跨边,回边。 不过测试会出现第一个边是需要删除的边的情况。。。就权当对bfs的边判断的练手了class Solution {pu

2018-01-05 20:42:00 403

转载 欢迎使用CSDN-markdown编辑器(版本更新?。。。)

欢迎使用Markdown编辑器写博客本Markdown编辑器使用StackEdit修改而来,用它写博客,将会带来全新的体验哦:Markdown和扩展Markdown简洁的语法代码块高亮图片链接和图片上传LaTex数学公式UML序列图和流程图离线写博客导入导出Markdown文件丰富的快捷键快捷键加粗 Ctrl + B 斜体 Ctrl + I

2018-01-05 20:11:46 199

原创 leetcode练习 Reconstruct Itinerary

Given a list of airline tickets represented by pairs of departure and arrival airports [from, to], reconstruct the itinerary in order. All of the tickets belong to a man who departs from JFK. Thus, the

2018-01-03 21:53:27 226

原创 leetcode练习 Evaluate Division

Equations are given in the format A / B = k, where A and B are variables represented as strings, and k is a real number (floating point number). Given some queries, return the answers. If the answer do

2018-01-02 22:57:10 144

原创 leetcode练习 Network Delay Time

There are N network nodes, labelled 1 to N.Given times, a list of travel times as directed edges times[i] = (u, v, w), where u is the source node, v is the target node, and w is the time it takes for a

2018-01-01 20:53:49 208

转载 Erron错误对照表

} return 0; } 错误对照表: errno0 : Successerrno1 : Operation not permittederrno2 : No such file or directoryerrno3 : No such processerrno4 : Interrupted system callerrno5 : Inp

2017-12-17 13:41:56 3878

原创 leetcode练习 714. Best Time to Buy and Sell Stock with Transaction Fee

动态规划感觉很重要,很锻炼思维。Your are given an array of integers prices, for which the i-th element is the price of a given stock on day i; and a non-negative integer fee representing a transaction fee.You may comp

2017-11-20 02:08:35 298

原创 leetcode练习 Redundant Connection

这次是检查冗余的,题目主要练习无向图中是否有环的判断。 题目如下: In this problem, a tree is an undirected graph that is connected and has no cycles.The given input is a graph that started as a tree with N nodes (with distinct valu

2017-11-13 01:26:37 219

原创 leetcode练习 Course Schedule II

之前做了Course Schedule,也是拓扑排序。 (其实做这个是水了一期 直接上题目 There are a total of n courses you have to take, labeled from 0 to n - 1.Some courses may have prerequisites, for example to take course 0 you have to f

2017-11-06 01:56:24 145

原创 leetcode练习 Task Scheduler

Given a char array representing tasks CPU need to do. It contains capital letters A to Z where different letters represent different tasks.Tasks could be done without original order. Each task could be

2017-10-30 02:54:04 256

原创 leetcode练习 Course Schedul

最近一直是图论的学习,还是找一个图论的题目 There are a total of n courses you have to take, labeled from 0 to n - 1.Some courses may have prerequisites, for example to take course 0 you have to first take course 1, which

2017-10-23 01:31:13 250

原创 leetcode练习 Add Two Numbers

感觉很久没有接触链表,又打算在处理图的时候使用邻接表 稍微做一道小题目熟悉一下 很简单,权当练手,重点是后面图的相关问题class Solution { public: ListNode *addTwoNumbers(ListNode *l1, ListNode *l2) { if (l1 == NULL) return l2; if (l2

2017-10-16 03:04:22 156

翻译 leetcode练习 Kth Smallest Element in a Sorted Matrix

依旧对第k大的数耿耿于怀Given a n x n matrix where each of the rows and columns are sorted in ascending order, find the kth smallest element in the matrix.Note that it is the kth smallest element in the sorted ord

2017-10-09 01:48:28 183

原创 DES密码的思想

web安全学了些密码系统,还讲了具体算法,emmm感觉还是比较感兴趣 目前主要讲了DES密码,貌似是一个不是特别优秀但是比较大众化的密码系统。 也是记录在这里,给以后的自己当个备忘录。 目前只写了伪代码,打算有空的时候真正实现一下。不过感觉很少有有空的时间呢hhhhh(其实是想把有空的时间留给算法)算法原理概述– 设信息空间由 {0, 1} 组成的字符串构成,明文信息和经过DES 加密的密文

2017-10-08 22:40:37 849

原创 初识数字图像处理(一)

最先学习的是使用直方图均衡和直方图匹配算法处理图像直方图均衡算法输入一个灰度图像,直方图均衡算法就是寻找一个灰度值的变换函数。这个变换函数能让输入的灰度图像的直方图变得更加均衡,也就是对比度更大,图像质量更好。直方图又是什么呢,灰度直方图的横坐标是灰度值,纵坐标是该灰度级出现的概率。也就是一个pdf直方图均衡的算法中,利用同一小块灰度变化的过程中,像素个数相等的特性,列出公式∫DB+ΔDBDBHB(

2017-10-08 15:34:25 331

原创 leetcode练习 Kth Largest Element in an Array

分治稍微讲了讲简单的第k大的数 就简单的在leetcode上面练练手 题目: Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element.For example, Give

2017-09-20 00:26:59 226

原创 关于对多项式的两种表示法的初步理解

上一节算法的核心是讲快速傅立叶变换。 基础当然是傅立叶变换。 但是我啥都不记得了。 emmm 老师姑且把傅立叶变换的原理讲了讲。 最基础也是最重要的便是对多项式两种表示法的理解。我自己对这部分内容有一个初步的理解,在这里做个记录,以备以后更正或者参考。首先一个正常的多项式 y = a0 + a1x1x^1 + a0x2x^2 + … + anxnx^n该表示法是使用系数a0, a1…,

2017-09-19 01:20:20 6734 1

原创 偶然遇到的概率统计

在做计网作业,有道题描述了一个时间A发生120次,成功率为10%,成功次数至少21次的题,促使我对这部分内容进行复习。首先是我想得起来的概念: 二项分布,n很大,p很小时可以近似为泊松分布。 …然后泊松分布是啥东西就完全忘了,在此复习一下。泊松分布式子:和为1用泰勒展开式E(x) = V(x) = 入证明:和二项分布的关系: Proposition: Suppose that in the

2017-09-19 00:57:19 658

原创 leetcode改进 Reverse Pairs

昨天轻易使用sort处理感到不妥,今天仔细思考了一下,想到一种改进方案。 首先分析sort为何不好 sort应当是O(nlogn)O(nlogn)的复杂度,但是那个函数里原本是O(n)的复杂度,所以sort使得算法更加复杂,不妥,对此,我选择直接多使用一次O(n)的循环对两边进行排序,也就是说相当于额外写一遍归并排序,代码如下:class Solution {public: void

2017-09-12 21:03:45 324

原创 leetcode练习 Reverse Pairs

几次练手之后,决定进军hard难度 最近的课程主要讲的是分治,就选择了相关的题目。Given an array nums, we call (i, j) an important reverse pair if i < j and nums[i] > 2*nums[j].You need to return the number of important reverse pairs in the

2017-09-12 00:01:25 227

原创 leetcode学习 Merge Intervals

又是一道中等题目,本来想随便做做,结果遇到了一些小问题,写下来引以为戒。题目: Given a collection of intervals, merge all overlapping intervals.For example, Given [1,3],[2,6],[8,10],[15,18], return [1,6],[8,10],[15,18].是个比较简单的题目根据题目要求,只需

2017-09-10 16:51:08 251

原创 leetcode练习 Beautiful Arrangement

第一节课没讲什么内容,主要就是斐波那契数列,因此想找一个递归相关的题目,但是递归内容的几道题全部都要氪金… 就找了个回溯的题目。。小试牛刀,选了中等难度的Beautiful Arrangement。题目: Suppose you have N integers from 1 to N. We define a beautiful arrangement as an array that is c

2017-09-08 01:33:47 266

原创 leetcode试手 Reverse Integer

选了门算法分析与设计,老师推荐了leetcode网站作为编程的练习。第一次接触这个网站,感觉有点意思,再加上许久不打类似的题目有点生疏,选了个easy的题目试了试手,还是能找到自己的不足之处。Reverse Integer 一个很easy的题目,但是我用的方法好像非常的复杂…… 首先写了个int转string的函数void int2string(const int& num, string &s

2017-09-07 14:06:44 152

原创 python学习笔记 (string)

关于python的字符串Slice with [ start : end : step ] You can extract a substring (a part of a string) from a string by using a slice. You define a slice by using square brackets, a start offset, an end offse

2017-08-17 15:54:03 316

原创 Unity3D(六)背包系统

我这次只实现了一个相当简单的背包系统。就是点击装备栏,装备栏上的贴图会跟着鼠标走,如果有贴图的鼠标点击背包栏,贴图就会粘到背包里。就是一个简单的背包装备。实现过程也不是很复杂,代码不是很多,主要是布置场景。(而且拖入背包上的时候图片无法显示…至今不知道为何代码如下: equip.csusing UnityEngine;using System.Collections;using UnityEn

2017-05-09 17:05:00 687

原创 Unity3D(五)粒子系统

粒子系统算是最近作业中相对比较简单的 目的是实现这个效果:http://i-remember.fr/en 老师提供了可供参考的博客,我参考的是这一篇: http://blog.csdn.net/gunnerczh/article/details/51291348实现效果如下: 代码如下:HaloParticle.cs(方便粒子属性的处理)using System.Collections;u

2017-05-09 16:57:32 353

空空如也

空空如也

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

TA关注的人

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