自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 解决peewee连接mysql数据库中文编码问题

问题描述在用peewee连接mysql数据库的过程中,向数据表中插入中文,中文变成问号分析及解决问题首先检查是否为peewee的问题连接数据库的方式database = peewee.MySQLDatabase(database='test', host='127.0.0.1', port=3306, user='root', password=''")在连接数据库过程中没有指定编码格式,修改为database = peewee.MySQLDatabase(database='test

2020-06-18 17:11:31 616

原创 LeetCode#33 Search in Rotated Sorted Array

题目Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.(i.e., [0,1,2,4,5,6,7] might become [4,5,6,7,0,1,2]).You are given a target value to search. If found...

2020-03-02 21:16:24 164

原创 LeetCode#402 Remove K Digits

题目Given a non-negative integer num represented as a string, remove k digits from the number so that the new number is the smallest possible.Note:The length of num is less than 10002 and will be ≥ k...

2020-02-09 00:03:26 140

原创 LeetCode#99 Recover Binary Search Tree

题目Two elements of a binary search tree (BST) are swapped by mistake.Recover the tree without changing its structure.Follow up:A solution using O(n) space is pretty straight forward.Could you de...

2020-02-08 23:55:41 186

原创 2019年中山大学数据科学与计算机学院研究生统考机试

2019年中山大学数据科学与计算机学院研究生统考复试机试本人参加了2019年中山大学数据科学与计算机学院研究生考试,现已上岸,写下这篇博客大致回忆复试机考题目,希望能对以后的同学有所帮助。机试共十道题。1. 继承一共有3个类,animal, cat, dog,cat和dog继承animal,在创建实例对象时使用d = new dog()或 c = new cat(),要求完成相关函数定义,...

2019-06-01 17:19:08 6489 14

原创 初探Vue生命周期

首先上一个vue官方文档上演示vue生命周期的图片 在整个生命周期中,vue有多个钩子函数,不同钩子函数在vue生命周期的不同时刻执行,下面列出钩子函数: * beforeCreate * created * beforeMount * mounted * beforeUpdate * updated * beforeDestroy * destroyed ...

2018-07-03 21:01:17 247

原创 axios 的简单使用

简介axios 是一个基于 promise 的 HTTP 库,可以用在浏览器和 node.js 中安装使用 npm 安装 axios: $ npm install axios执行GET请求// 示例axios.get('/login/dish') .then(function (response) { console.log(response); })...

2018-06-30 21:04:24 281

原创 系统分析与设计-FinalReport

PSP 2.1 统计表个人分支的 GIT 统计报告dashboard 客户点餐端 厨师端 自认为最得意/或有价值/或有苦劳的工作清单,含简短说明(一句话)从头学 Vue 并和其他两位同学合作完成前端开发个人的技术类、项目管理类博客清单(只需要名称与 url )【API B...

2018-06-30 20:55:14 396

原创 系统分析与设计-homework9(lesson16)

使用 ECB 实现 make reservation 用例的详细设计(包含用例简介,顺序图,类图)用例简介 用户登录网站用户根据位置及时间查询酒店用户提交订单用户支付订单顺序图 类图 将逻辑设计类图映射到实际项目框架的包图。用树形结构表述实现的包和类包图 树形结构 ...

2018-06-30 11:00:22 479

原创 系统分析与设计-homework8(lesson13)

描述软件架构与框架之间的区别与联系 软件架构是把系统分解为一些部件,描述这些部件的职责及它们之间的协作行为 框架是特定语言和技术的架构应用解决方案,包含了各种业务场景的具体解决方案 架构是语言无关的 框架是具体语言和技术相关的,是一种或多种架构的组合的实现以你的项目为案例绘制三层架构模型图,细致到分区 结合你程序的结构,从程序员角度说明三层架构给开发者带来的便利 (1) 每个...

2018-06-03 13:49:55 295

原创 系统分析与设计-homework7(lesson9)

期中测试练习文档编写 选择一个你喜欢的 移动App 或 其中某业务 参考 Asg_RH 文档格式 编写软件描述 文档要包含一个业务的完整过程 建模要求包括(用例图、XX业务或用例的活动图、XX领域模型、XX对象的状态图、XX场景的系统顺序图与操作协议)题目题目地址答案用例图 订票活动图 领域模型 订票对象的状态模型 订票支付的系统顺序图 ...

2018-05-14 00:15:40 242

原创 系统分析与设计-homework6(lesson8)

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

2018-05-06 01:18:53 221

原创 系统分析与设计-homework5(lesson7)

1、 领域建模a. 阅读 Asg_RH 文档,按用例构建领域模型。 按 Task2 要求,请使用工具 UMLet,截图格式务必是 png 并控制尺寸说明:请不要受 PCMEF 层次结构影响。你需要识别实体(E)和 中介实体(M,也称状态实体) 在单页面应用(如 vue)中,E 一般与数据库构建有关, M 一般与 store 模式 有关在 java web 应用中,E 一般与数据库构建有关,

2018-04-29 12:43:19 216

原创 系统分析与设计-homework4(lesson6)

1.用例建模a.阅读 Asg_RH 文档,绘制用例图。 按 Task1 要求,请使用工具 UMLet,截图格式务必是 png 并控制尺寸b.选择你熟悉的定旅馆在线服务系统(或移动 APP),如绘制用例图。并满足以下要求:对比 Asg_RH 用例图,请用色彩标注出创新用例或子用例尽可能识别外部系统,并用色彩标注新的外部系统和服务 c.对比两个时代、不同地区产品的用例图,总结在项目早期,发现创新的思

2018-04-22 21:27:56 249

原创 系统分析与设计-homework3(lesson5)

API Blueprint笔记Blueprint 是什么Blueprint是一种用来编写API文档的标记语言,语法与markdown相似,apiaryio提供实时预览功能,使web api的书写更加便捷规范,与其他一些工具配合,可以直接生成mock data数据,只要和后端开发人员约定好接口及数据结构,前端在开发的时候就可以使用mock data数据进行测试,使得前后端开发能够同时进行。Bluepr

2018-04-14 16:47:37 208

原创 系统分析与设计-homework2

1. 简答题简述瀑布模型、增量模型、螺旋模型(含原型方法)的优缺点 瀑布模型: 优点:有利于大型软件开发过程中的组织管理,提高大型软件项目开发的质量和效率。缺点:开发过程一般不能逆转,实际的项目开发很难严格按该模型进行。增量模型: 优点:人员分配灵活,不用投入大量人力资源。缺点:可能遇到不能集成的风险,软件必须具备开放式的体系结构。螺旋模型: 优点:设计上的灵活性,可以在项目的各个

2018-03-20 17:45:37 219

原创 系统分析与设计-homework1

1. 简单题软件工程的定义软件工程是 (1)将系统化的、规范的、可度量的方法应用于软件的开发、运行和维护,即将工程化方法应用于软件; (2)在(1)中所述方法的研究阅读经典名著“人月神话”等资料,解释 software crisis、COCOMO 模型。软件危机是指在软件开发及维护的过程中所遇到的一系列严重问题,这些问题皆可能导致软件产品的寿命缩短、甚至夭折。COCOMO模型,即结构性成本

2018-03-12 22:43:16 551

原创 LeetCode#743 Network Delay Time(week19)

week19题目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 tak

2018-01-13 19:07:12 254

原创 LeetCode#698 Partition to K Equal Sum Subsets(week19)

week19题目Given an array of integers nums and a positive integer k, find whether it’s possible to divide this array into k non-empty subsets whose sums are all equal. Note:1 <= k <= len(nums) <= 16.

2018-01-13 14:49:51 196

原创 LeetCode#689 Maximum Sum of 3 Non-Overlapping Subarrays(week18)

week18题目In a given array nums of positive integers, find three non-overlapping subarrays with maximum sum.Each subarray will be of size k, and we want to maximize the sum of all 3*k entries.

2018-01-07 23:50:08 420

原创 Exercises 8.16 (week17)

week17题目We are feeling experimental and want to create a new dish. There are various ingredients we can choose from and we’d like to use as many of them as possible, but some ingredients don’t go well

2018-01-02 15:04:46 228

原创 LeetCode#740 Delete and Earn (week16)

week16题目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

2017-12-23 00:50:52 202

原创 LeetCode#746 Min Cost Climbing Stairs (week16)

week16题目On a staircase, the i-th step has some non-negative cost cost[i] assigned (0 indexed).Once you pay the cost, you can either climb one or two steps. You need to find minimum cost to reach the to

2017-12-22 21:28:08 351

原创 LeetCode#445 Add Two Numbers II (week15)

week15题目You are given two non-empty linked lists representing two non-negative integers. The most significant digit comes first and each of their nodes contain a single digit. Add the two numbers and r

2017-12-17 01:07:53 146

原创 LeetCode#515 Find Largest Value in Each Tree Row (week15)

week15题目You need to find the largest value in each row of a binary tree. 原题地址:https://leetcode.com/problems/find-largest-value-in-each-tree-row/description/解析题目要求给定一棵二叉树,找出每一层的最大的节点的值。 大致思路是先对树进行一次

2017-12-11 20:32:05 153

原创 LeetCode#494 Target Sum (week14)

week14题目You are given a list of non-negative integers, a1, a2, …, an, and a target, S. Now you have 2 symbols + and -. For each integer, you should choose one from + and - as its new symbol.Find out ho

2017-12-07 11:13:39 120

原创 LeetCode#554 Brick Wall (week14)

week14题目There is a brick wall in front of you. The wall is rectangular and has several rows of bricks. The bricks have the same height but different width. You want to draw a vertical line from the top

2017-12-06 21:06:04 199

原创 LeetCode#648 Replace Words (week14)

week14题目In English, we have a concept called root, which can be followed by some other words to form another longer word - let’s call this word successor. For example, the root an, followed by other, w

2017-12-06 11:54:01 157

原创 LeetCode#671 Second Minimum Node In a Binary Tree (week13)

week13题目Given a non-empty special binary tree consisting of nodes with the non-negative value, where each node in this tree has exactly two or zero sub-node. If the node has two sub-nodes, then this no

2017-12-05 00:37:17 203

原创 Sicily 拓扑排序

题目在图论中,拓扑序(Topological Sorting)是一个有向无环图(DAG, Directed Acyclic Graph)的所有顶点的线性序列. 且该序列必须满足下面两个条件:每个顶点出现且只出现一次.若存在一条从顶点 A 到顶点 B 的路径,那么在序列中顶点 A 出现在顶点 B 的前面.对于一个含有n个节点的有向无环图(节点编号0到n-1),输出它的一个拓扑序.图的节点数和边数

2017-11-23 00:56:31 362

原创 LeetCode#654 Maximum Binary Tree (week12)

week12题目Given an integer array with no duplicates. A maximum tree building on this array is defined as follow:The root is the maximum number in the array. The left subtree is the maximum tree construc

2017-11-22 19:58:22 163

原创 LeetCode#238 Product of Array Except Self (week11)

week11题目Given an array of n integers where n > 1, nums, return an array output such that output[i] is equal to the product of all the elements of nums except nums[i].Solve it without division and in O(

2017-11-18 18:44:10 153

原创 LeetCode#712 Minimum ASCII Delete Sum for Two Strings (week10)

week10题目Given two strings s1, s2, find the lowest ASCII sum of deleted characters to make two strings equal.Example 1: Input: s1 = “sea”, s2 = “eat” Output: 231 Explanation: Deleting “s” from “sea”

2017-11-10 18:59:28 124

原创 LeetCode#718 Maximum Length of Repeated Subarray (week9)

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

2017-10-31 18:19:16 338

原创 LeetCode#264 Ugly Number II (week8)

week8题目Write a program to find the n-th ugly number.Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For example, 1, 2, 3, 4, 5, 6, 8, 9, 10, 12 is the sequence of the first

2017-10-28 01:56:05 122

原创 LeetCode#263 Ugly Number (week8)

week8题目Write a program to check whether a given number is an ugly number.Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For example, 6, 8 are ugly while 14 is not ugly sinc

2017-10-27 23:43:17 148

原创 LeetCode#230 Kth Smallest Element in a BST (week7)

week7题目Given a binary search tree, write a function kthSmallest to find the kth smallest element in it.Note: You may assume k is always valid, 1 ≤ k ≤ BST’s total elements.Follow up: What if the BST

2017-10-21 10:48:38 191

原创 LeetCode#228 Summary Ranges (week7)

week7题目Given a sorted integer array without duplicates, return the summary of its ranges.Example 1: Input: [0,1,2,4,5,7] Output: [“0->2”,”4->5”,”7”] Example 2: Input: [0,2,3,4,6,8,9] Output: [“0”,

2017-10-20 17:40:57 154

原创 LeetCode#46 Permutations (week6)

week6题目Given a collection of distinct numbers, return all possible permutations.For example, [1,2,3] have the following permutations: [  [1,2,3],  [1,3,2],  [2,1,3],  [2,3,1],  [3,1,2]

2017-10-15 00:52:39 210

原创 LeetCode#242 Valid Anagram (week5)

week5题目Given two strings s and t, write a function to determine if t is an anagram of s.For example, s = “anagram”, t = “nagaram”, return true. s = “rat”, t = “car”, return false.Note: You may assum

2017-10-07 21:31:56 187

空空如也

空空如也

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

TA关注的人

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