自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 数据结构09图

第七章 图 Graph7.1 图的定义和术语顶点 VertexV 是顶点的有穷非空集合,顶点数 |V| = nVR 两个顶点之间关系的集合,边数 |VR| = e有向图 Digraph<v, w> Arcv Tail / Inital nodew Head / Terminal node无向图 Undigraph<v, w> 必有 &lt...

2020-03-13 11:49:31 217

原创 QT Linux打包发布

Linux:1、用Release编译;2、把可执行文件(如paike)放入新建目录中;3、当前目录下编写脚本copyDependency.sh,把动态链接库导入当前目录;#!/bin/shexe="paike" #发布的程序名称destination="/home/jinzhao/paike" #exe所在的目录,结构为 /home/jinzhao/paike/pai...

2019-04-25 17:13:37 268

原创 密码中不能包含全角字符的正则表达式

String regex = "^((?![^\\x00-\\xff]).)*$";String str = "aA";System.out.println(str.matches(regex));

2017-06-12 15:49:40 3847

原创 Java密码加密

String password = "...";RandomNumberGenerator randomNumberGenerator = new SecureRandomNumberGenerator();String salt = randomNumberGenerator.nextBytes().toHex();String newPassword = new SimpleHash("

2017-05-18 16:28:15 837

转载 为什么要在密码里加点“盐”

盐(Salt)在密码学中,是指通过在密码任意固定位置插入特定的字符串,让散列后的结果和使用原始密码的散列结果不相符,这种过程称之为“加盐”。以上这句话是维基百科上对于 Salt 的定义,但是仅凭这句话还是很难理解什么叫 Salt,以及它究竟起到什么作用。第一代密码早期的软件系统或者互联网应用,数据库中设计用户表的时候,大致是这样的结构:mysql> desc User;+

2017-05-18 16:09:03 453

转载 02 CSS

使用 table 进行布局存在缺陷,而一般的布局都会采用 DIV+CSS 来进行布局。Div 它是一个html 标签,一个块级元素(单独显示一行)。它单独使用没有任何意义,必须结合 CSS 来使用。它主要用于页面的布局。 Span 它是一个 html 标签,一个内联元素(显示一行)。它单独使用没有任何意义,必须结合 CSS 来使用。它主要用于对括起来的内容进行样式的修饰。CSS

2017-05-07 18:42:44 222

转载 01 HTML

1.什么是HTML?(Hyper Text Markup Language:超文本标记语言)        超文本:功能比普通文本更加强大        标记语言:使用一组标签对内容进行描述的一门语言(它不是编程语言)2.语法和规范?        HTML文件都是以.html或者.htm结尾的,建议使用.html结尾。HTML文件分为头部分()和体部分()HTML标签

2017-05-07 17:02:33 236

转载 Lecture 21 Parallel Algorithms II

2017-04-23 22:19:32 326

转载 Lecture 20 Parallel Algorithms I

2017-04-23 22:06:45 257

转载 Lecture 19 Shortest Paths III

2017-04-22 07:43:00 181

转载 Lecture 18 Shortest Paths II

2017-04-21 22:52:46 216

转载 06 MapReduce工作机制

MapReduce作业的执行流程错误处理机制作业调度机制Shuffle和排序任务执行

2017-04-18 09:42:05 282

转载 TF02 入门

计算模型——图数据模型——张量运行模型——会话TensorFlow计算模型——计算图计算图是TF中最基本的一个概念,TF中的所有计算都会被转化为计算图上的结点。TF是一个通过计算图的形式来表述计算的编程系统。TF中的每一个计算都是计算图上的一个节点,节点之间的边描述了计算之间的依赖关系。TensorBoard是TensorFlow的可视化工具。Tenso

2017-04-17 17:49:36 1434

转载 TF01 简介

总览如何从实体中提取特征,对于很多传统机器学习算法的性能有巨大影响。一旦解决了数据表达和特征提取,很多人工智能任务也就解决了90%。对许多机器学习算法来说,特征提取不是一件简单的事情。深度学习解决的核心问题之一就是自动的将简单的特征组合成更加复杂的特征,并使用这些组合特征解决问题。传统算法:输入--人工特征提取--权重学习--预测深度学习:输入--基础特征提取--多

2017-04-16 20:07:57 562

转载 Lecture 17 Shortest Paths I

2017-04-13 10:56:50 498

转载 Lecture 16 Minimum Spanning Trees

2017-04-13 10:47:53 318

转载 Lecture 15 Dynamic Programming

2017-04-13 10:04:33 556

转载 Lecture 14 Competive Analysis

2017-04-13 09:51:09 293

原创 Lecture 13 Amortized Analysis

2017-04-13 09:31:22 231

转载 Lecture 12 Skip Lists [Pugh 1989]

---simple efficient dynamic randomized search structure---others: Treap[1993]  RB-Trees  B-Trees---O(logn) in expectation with high probability.Starting form scratch:(sorted) linked list

2017-04-06 17:24:27 250

转载 Lecture 11 Augmenting Data Structures

Take the basic data structure and add new operations on it.Dynamic order statistics:OS-Select(i)--returns ith smallest item in dynamic set.OS-Rank(x)--returns rank of x in sorted order.I

2017-04-06 11:09:29 598

转载 Lecture 10 Balanced Search Trees

Search tree data structure maintaining dynamic set of n elements using tree of height O(logn).Examples:    >AVL trees    >2-3 trees    >2-3-4 trees    >B-trees    >Red-black trees    >Sk

2017-04-06 09:15:30 412

转载 Lecture 9 Random built Binary Search Trees BSTs

Random built Binary Search Trees  BSTs   E[hight] near 3lognQuick Sort?Relation to Quick Sort:BST sort & Quick sort make same comparisons but in a different order

2017-04-05 23:00:22 300

转载 Lecture 8 Hashing II

Weakness of hashing:For any choice of hash function, exists bad set of keys that all hash to same slot.Idea:Choose hash function at random, independently from keys. Universal hashing:Define:...

2017-04-05 20:06:14 262

转载 Lecture 7 Hashing Table I

Hash|---Hash function:  Division, Multiplication|---Collision:  Chaining, Open addressing(Linear,Double hasing)  Symbol-table problem:Table S holding n recordspointer --&gt; key|satelite...

2017-04-05 18:55:08 576

转载 Lecture 6 Order Statistics

Given n elements in array, find kth smallest element (element of rank k)Worst-case linear time order statistics --by Blum, Floyd, Pratt, Rivest, Tarjan--idea:

2017-04-05 15:17:09 660

转载 Lecture 5 Sorting Algorithm

How fast can we sort? Depends on the computational model of what you can do with the elements.Comparison sorting model:Only use comparisons to determine the relative order of element

2017-04-02 09:35:56 286

转载 Lecture 4 Quick Sort and Randomized Quick Sort

Quick Sort--Divide and Conquer--Sorts “in place”--Very practical with tuningDivide and Conquer:1.Divide: Partition array into 2 sub-arrays around pivot x such that elements in lower sub-

2017-04-01 23:50:01 248

转载 Lecture 3 Divide and Conquer

1.Divide the problem(instance) into one or more sub-problem;2.Conquer each sub-problem recursively;3.Combine solutions.

2017-04-01 23:44:03 322

转载 Lecture 2 Asymptotic Notation

2017-04-01 23:25:40 1339

转载 Lecture 1 Analysis of Algorithms

Analysis of AlgorithmsThe theoretical study of computer programperformance and resource usage.Performance: timeResource: communication, RAM memory or disk memory and so on. What's more

2017-04-01 23:19:51 392

原创 09 类的继承

继承一个类class Person(object): def __init__(self, name, gender): self.name = name self.gender = genderclass Student(Person): def __init__(self, name, gender, score):...

2017-04-01 20:51:10 190

原创 08 面向对象编程

1 介绍面向对象编程是一种程序设计范式把程序看做不同对象的相互调用,对现实世界建立对象模型。面向对象编程的基本思想:类和实例:类用于定义抽象类型实例根据类的定义被创建出来2 定义类并创建实例类通过class关键字定义,类名以大写字母开头,紧接着是(object),表示该类是从哪个类继承下来的。class Person(object): pa...

2017-04-01 18:23:02 177

原创 07 模块

模块和包的概念等同于java中的Package模块名=文件名(无后缀)在文件系統中,包就是文件夾,模块就是xxx.py文件每层包下面都有__init__.py文件导入模块>>> import math>>> math.pow(2, 0.5)>>> math.pi精确导入函数、变量>...

2017-04-01 17:15:16 184

原创 06 函数式編程

1 函数式编程简介函数:function函数式:functional 一种编程范式特点:把计算视为函数而非指令纯函数式编程:不需要变量,没有副作用,测试简单支持高阶函数,代码简洁Python支持的函数式編程:不是纯函数式編程:允许有变量支持高阶函数:函数也可以作为变量传入支持闭包:有了闭包就能返回函数有限度的支持匿名函数变量可以指向...

2017-04-01 16:40:05 200

原创 05 切片、迭代、列表生成

切片>>> L = ['Adam', 'Lisa', 'Bart', 'Paul']>>> L[0:3] #取前3个元素>>> L[:3]>>> L[1:3]>>> L[:]>>> L[::2] #第三个参数表示每2个元素取一个元素,也就是隔一个取一个['...

2017-04-01 13:36:19 159

转载 04 函數

內置函數Python內置了很多有用的函數,可以直接調用。要調用一個函數,需要知道函數的名稱和參數。可以直接從Python的官方網站查看文檔:http://docs.python.org/2/library>>> abs(-20)>>> help(abs)>>> cmp(x, y)  #xy,1>>> int('123')>>> int(12.34)>

2017-04-01 11:43:18 135

原创 03 控制語句

if语句if age >= 18 print 'your age is', ageelse print 'teenager'Python代码的缩进规则:具有相同缩进的代码被视为代码块。if age >= 18 print 'adult'elif age >= 6 print 'teenager'elif age...

2017-04-01 11:06:34 191

原创 02 List、Tuple、Dict、Set

List线性表创建List:>>> classmates = ['Michael', 'Bob', 'Tracy']>>> L = ['Michael', 100, True] #可以在list中包含各种类型的数据>>> empty_list = [] #空List按索引访问List:>>...

2017-04-01 11:06:06 144

原创 01 Python变量和数据类型

Python变量和数据类型1 数据类型计算机,顾名思义就是可以做数学计算的机器,因此,计算机程序理所当然也可以处理各种数值。但是,计算机能处理的远不止数值,还可以处理文本、图形、音频、视频、网页等各种各样的数据,不同的数据需要定义不同的数据类型。在Python中,能够直接处理的数据类型有一下几种:(1)整数 十六进制用0x前綴0-9,a-f表示,如0xff00(2)浮点...

2017-03-31 23:29:26 249

空空如也

空空如也

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

TA关注的人

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