- 博客(23)
- 收藏
- 关注
原创 使用Flask-SQLAIchemy建表
初始化和配置Flask-SQLAlchemy是一个Flask扩展,能够支持多种数据库后台,我们可以不需要关心SQL的处理细节,操作数据库,一个基本关系对应一个类,而一个实体对应类的实例对象,通过调用方法操作数据库。Flask-SQLAlchemy有很完善的文档。 连接mysql方法:from flask_sqlalchemy import SQLAlchemyfrom flask im...
2018-06-27 17:40:15 393
原创 系统分析与设计HW6
使用 UML State Model建模对象: 参考 Asg_RH 文档, 对 Reservation/Order 对象建模。建模要求: 参考练习不能提供足够信息帮助你对订单对象建模,请参考现在 定旅馆 的旅游网站,尽可能分析围绕订单发生的各种情况,直到订单通过销售事件(柜台销售)结束订单。研究淘宝退货流程活动图,对退货业务对象状态建模...
2018-05-06 23:08:37 183
原创 系统分析与设计HW5
1.领域建模a.阅读 Asg_RH 文档,按用例构建领域模型。b. 数据库建模(E-R 模型)1.使用MySQLWorkBench建模: 2.导出数据库脚本: – MySQL Script generated by MySQL Workbench – Sun Apr 29 22:47:44 2018 – Model: New Model Version: ...
2018-04-29 23:01:20 172
原创 系统分析与设计HW4
1.用例建模a.阅读 Asg_RH 文档,绘制用例图。按 Task1 要求,请使用工具 UMLet,截图格式务必是 png 并控制尺寸b.选择你熟悉的定旅馆在线服务系统(或移动 APP),如绘制用例图。并满足以下要求:对比 Asg_RH 用例图,请用色彩标注出创新用例或子用例 尽可能识别外部系统,并用色彩标注新的外部系统和服务 例如去哪网: c.对比两个时...
2018-04-22 23:22:08 205
原创 MYSQL常用指令
一、连接MySQL 格式: mysql -h主机地址 -u用户名 -p用户密码 1、例1:连接到本机上的MYSQL。 首先在打开DOS窗口,然后进入目录 mysqlbin,再键入命令mysql -u root -p,回车后提示你输密码,如果刚安装好MYSQL,超级用户root是没有密码的,故直接回车即可进入到MYSQL中了,MYSQL的提示符是: mysql>。 2、例2:连接到远程...
2018-04-12 20:36:48 274
原创 系统分析与设计HW2
1.简答题a.简述瀑布模型、增量模型、螺旋模型(含原型方法)的优缺点。瀑布模型: 优点:定义了软件开发基本流程与活动。 缺点:依赖问题,前面需求模糊,后面工作很难进行。容错问题,在后期发现需求问题,工作量难接受。资源调配问题,知识技能需求不同,人员数量要求不同。增量模型: 优点:需求明确。 缺点:项目控制和团队组织都比较困难。螺旋模型: 优点:需求随用户评估进化新问题。 缺点:迭代次数较
2018-03-22 20:41:52 154
原创 系统分析与设计HW1
1.简单题1.软件工程的定义:软件工程是一门研究用工程化方法构建和维护有效的、实用的和高质量的软件的学科。它涉及程序设计语言、数据库、软件开发工具、系统平台、标准、设计模式等方面。2.software crisis:指在软件开发及维护的过程中所遇到的一系列严重问题,这些问题皆可能导致软件产品的寿命缩短、甚至夭折。软件开发是一项高难度、高风险的活动,由于它的高失败率,故有所谓“软件危机”之说。软件危机
2018-03-15 18:45:32 173
原创 Unique Paths
问题描述 A robot is located at the top-left corner of a m x n grid (marked ‘Start’ in the diagram below). The robot can only move either down or right at any point in time. The robot is trying to re
2018-01-13 23:40:12 143
原创 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. D
2018-01-13 23:25:45 138
原创 Counting Bits
问题描述 Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1’s in their binary representation and return them as an array. Example: For n
2018-01-09 23:37:49 164
原创 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 ho
2018-01-09 22:56:22 141
原创 Word Break
问题描述 Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, determine if s can be segmented into a space-separated sequence of one or more dictionary words. You ma
2018-01-09 22:45:59 152
原创 Unique Binary Search Trees
问题描述 Given n, how many structurally unique BST’s (binary search trees) that store values 1…n? For example, Given n = 3, there are a total of 5 unique BST’s. 1 3 3 2 1
2018-01-09 21:38:38 156
原创 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.
2018-01-09 21:20:08 145
原创 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].分析先使用sort函数对vector里的区间按照头从小到大排序,然后在判断其尾部大
2018-01-09 20:55:29 149
原创 Search for a Range
问题描述 Given an array of integers sorted in ascending order, find the starting and >ending position of a given target value. Your algorithm’s runtime complexity must be in the order of O(log n).
2018-01-09 20:13:53 133
原创 Longest Substring Without Repeating Characters
问题描述 Given a string, find the length of the longest substring without repeating characters. Examples: Given “abcabcbb”, the answer is “abc”, which the length is 3. Given “bbbbb”, the ans
2018-01-09 20:06:24 145
原创 Reverse string
问题描述 Write a function that takes a string as input and returns the string reversed.
2017-12-05 17:00:09 197
原创 Remove Duplicates from Sorted Array
问题描述 Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.
2017-10-18 10:17:16 140
原创 Add two numbers
问题描述 You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit.
2017-10-10 23:46:47 220
原创 二叉树的合并与逆转
Given two binary trees and imagine that when you put one of them to cover the other, some nodes of the two trees are overlapped while the others are not.
2017-09-10 13:58:55 680
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人