使用cookie cookie的使用 1. 设置cookie 格式:名字=值 不会覆盖 过期时间:expires=时间 日期对象的使用 封装函数 2.读取cookie 字符串分割 3.删除cookie 已经过期:设置cookie过期,即是删除cookie cookie的domain和path 1.p ...
分类:
其他好文 时间:
2016-10-29 18:49:55
阅读次数:
210
笔者是在安装python 3.5 后,启动时提示该文件丢失的问题的,如下所示。 很反感的是试了很多的方法都不行,而且本文给出的方法尝试了一遍不行,第二遍才成功。感觉很郁闷 解决方案如下: (1)安装 vc2015_redist.x86/x64, 下载地址 ,vc2015_redist.rar 注意, ...
Two elements of a binary search tree (BST) are swapped by mistake. Recover the tree without changing its structure. (Hard) Note:A solution using O(n) ...
分类:
其他好文 时间:
2016-10-28 23:21:49
阅读次数:
205
Given an array where elements are sorted in ascending order, convert it to a height balanced BST. 给一个排好序的数组,然后求搜索二叉树 其实就是二分法,不难。 ...
分类:
编程语言 时间:
2016-10-28 22:37:43
阅读次数:
150
一、视图 1、什么是视图? 视图是一个虚拟表(非真实存在),其本质是:根据SQL语句获取动态的数据集,并为其命名,用户使用时,只需使用名称即可获取结果集,并可以将其当作表来使用(其实 说的简单点,就是一个临时表,放到了内存中) 2、视图的创建 格式:create view 视图名称 as SQL语句 ...
分类:
数据库 时间:
2016-10-27 19:31:41
阅读次数:
240
检查一个字符串(str)是否以指定的字符串(target)结尾。 如果是,返回true;如果不是,返回false。 方法一: 方法二: 方法三: 三种方法都是截取字符串指定字段,其中slice()和substring()接收的是起始位置和结束位置(不包括结束位置),而substr接收的则是起始位置和 ...
分类:
其他好文 时间:
2016-10-27 12:24:19
阅读次数:
164
Given a binary tree, determine if it is a valid binary search tree (BST). (Medium) Assume a BST is defined as follows: The left subtree of a node cont ...
分类:
其他好文 时间:
2016-10-27 00:47:44
阅读次数:
145
题目 A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties: The left subtree of a node contains only nod ...
分类:
编程语言 时间:
2016-10-26 22:07:00
阅读次数:
288
今天简单看了一下php,服务器,浏览器如何设定编码 1.php 在php配置文件php.ini中,可以设置字符编码 在PHP 5.6及其之后,"UTF-8"是缺省值(5.6之前是空值),对于以下函数:htmlentities(), html_entity_decode() and htmlspeci ...
分类:
Web程序 时间:
2016-10-26 16:40:22
阅读次数:
243