自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(24)
  • 问答 (1)
  • 收藏
  • 关注

原创 时间到数据库自动更新状态

在MySQL中实现根据时间字段自动更改状态字段首先定义update_conference_status过程,判断系统时间与start_time和end_time的关系,根据这两个字段调整status字段的状态。DELIMITER |DROP PROCEDURE IF EXISTS update_conference_status |CREATE PROCEDURE upda...

2018-08-14 10:50:29 8837

原创 804. Unique Morse Code Words

问题International Morse Code defines a standard encoding where each letter is mapped to a series of dots and dashes, as follows: "a"maps to ".-", "b" maps to "-...", "c" maps to "-.-.", and so on.

2018-08-03 15:23:56 166

原创 18. 4Sum

问题Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum of target.Note: The solution...

2018-04-10 09:36:07 271

原创 17. Letter Combinations of a Phone Number

问题Given a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the telephone buttons) is given below.Input:Digit ...

2018-04-10 09:35:54 201

原创 16. 3Sum Closest

问题Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input would have exa...

2018-04-10 09:35:23 146

原创 15. 3Sum

问题Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.Note: The solution set must not contain...

2018-04-10 09:34:46 217

原创 14. Longest Common Prefix

问题Write a function to find the longest common prefix string amongst an array of strings.分析:最长前缀Pythonclass Solution: def longestCommonPrefix(self, strs): """ :type st...

2018-04-10 09:34:00 143

原创 11. Container With Most Water

问题Given n non-negative integers a1, a2, …, an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find tw...

2018-04-10 09:33:35 119

原创 7. Reverse Integer

问题Given a 32-bit signed integer, reverse digits of an integer.Example 1:Input: 123Output: 321Example 2:Input: -123Output: -321Example 3:Input: 120Output: 21Note: Assume w...

2018-04-10 09:32:32 137

原创 4. Median of Two Sorted Arrays

问题There are two sorted arrays nums1 and nums2 of size m and n respectively.Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).Example 1:nums1 = ...

2018-04-10 09:28:39 131

原创 3. 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 answer is "b", ...

2018-04-10 09:24:52 230

原创 2. Add Two Numbers

2. Add Two Numbers

2018-04-04 17:12:35 219

原创 1.Two Sum

Two Sum

2018-04-04 17:11:49 147

原创 django 数据库迁移(migrate)应该知道的一些事

命令首先数据库迁移的两大命令: python manage.py makemigrations & python manage.py migrate 前者是将model层转为迁移文件migration,后者将新版本的迁移文件执行,更新数据库。 这两中命令调用默认为全局,即对所有最新更改的model或迁移文件进行操作。如果想对部分app进行操作,就要在其后追加app name:$ python

2017-04-08 20:07:43 40612 1

原创 elasticsearch内存管理

今天elasticsearch突然崩掉了,捉急,看看log是这样的:$ cat elasticsearch-5.2/logs/zhujian_club.log[2017-04-05T13:23:43,919][INFO ][o.e.n.Node ] [] initializing ...[2017-04-05T13:23:44,337][INFO ][o.e.e.No

2017-04-05 15:46:49 6070

原创 Elasticsearch 2.3.4 + Elasticsearch-jdbc 2.3.4.1 + analysis-ik 1.9.4搭建后端中文分词搜索引擎

Elasticsearch 2.3.4 + Elasticsearch-jdbc 2.3.4.1 + analysis-ik 1.9.4搭建后端中文分词搜索引擎

2017-03-30 16:16:53 3722 4

转载 利 and、or 条件短路

利用 and、or 条件短路,写得更简洁些。

2016-11-02 18:37:30 965

原创 在Mac(Unix)下Python交互式Tab键补全实现

在Mac下Python交互式Tab键补全实现

2016-10-28 17:11:34 1638

原创 Ubuntu下使用ssh连接远程服务器

Ubuntu下使用ssh连接远程服务

2016-10-18 08:42:27 878

原创 在virtualenv虚拟环境下使用pip

在virtualenv虚拟环境下使用pip今天在virtualenv环境下使用pip安装django的时候出现pip权限不够的问题,[PS:又是权限的问题] 经过一番折腾,将正确姿势写一下。

2016-10-04 17:15:09 6915

原创 使用unittest扩展功能测试

以TDD模式开发一款软件,它的核心是以测试驱动开发,即先有测试再去开发。编写新的功能测试时,可以先写注释,勾勒出用户故事的重点(需求的实例过程)。这样写出的测试可读性强。以后将以一个待办事务清单的web应用为例,进行TDD敏捷开发。

2016-09-22 10:03:31 801

原创 django_模板

基础{{ person_name }} 变量{% if ordered_warranty %} 模板标签(template tag) : 仅通知模板系统完成某些工作的标签。比如if标签for标签{{ship_date|date:”F j, Y” }} filter过滤器将变量ship_date传递给date过滤器,同时指定参数”F j,Y”。date过滤器根据参数进行格式输出。 过滤器是用管

2016-05-03 17:46:32 255

原创 django_url视图

对django的url配置及视图的使用

2016-05-03 17:46:01 266

原创 Git for PyCharm

Git for PyCharmUsing PyCharm’s Git integration locally:http://confluence.jetbrains.com/display/PYH/Using+PyCharm%27s+Git+integration+locally创建git集project创建gitAlt+`显示VCS命令(或者选择VCS->VCS Operations Popup

2016-05-03 17:43:34 533

空空如也

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

TA关注的人

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