自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

渣渣

一个IT愤青的自我告白

  • 博客(13)
  • 资源 (1)
  • 收藏
  • 关注

原创 LeetCode Find All Duplicates in Array and Find Disappeared Numbers in Array

lz这里把leetcode中相同类型的两题放在一起来研究。首先是leetcode find all duplicates in array,题目如下: Given an array of integers, 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once. Fin

2017-09-19 22:08:22 282

转载 Django忘记管理员账号和密码的解决办法

看着Django的教程学习搭建网站,结果忘记第一次创建的账号和密码了。结果搭建成功以后,一直无法登陆到管理页面,进行不下去了。 如图所示: 在网上找了很多的方法都不行,最后使用新建一个superuser的方法搞定,但是以前设置的那个账号好像还是不行。 解决方法的步骤: 1.新建一个用户名,使用如下命令: python manage.py createsuperuser

2017-09-14 22:30:48 1615

转载 django.core.exceptions.ImproperlyConfigured: Requested setting DEFAULT_INDEX_TABLESPACE的解决办法

在python的开发中,遇到了这个错误:  django.core.exceptions.ImproperlyConfigured: Requested setting DEFAULT_INDEX_TABLESPACE, but settings are not configured. You must either define the environment variable DJANGO_

2017-09-14 22:29:18 539

原创 Django-1.11.5和mysql来连接并创建数据库和表

lz的运行环境是Mac+python -2.7.6+django-1.11.5+mysql-5.17.8。那么首先需要安装mysql-python-1.2.3.tar,这个包是用来连接mysql和python之间的工具,有了它,就可以实现python和mysql之间互联互通,实现对接。整个过程如下: 一、安装mysql-python-1.2.3.tar 首先是下载,然后通过tar -zxvf 

2017-09-13 22:07:10 1375

原创 LeetCode Task Scheduler

Given a char array representing tasks CPU need to do. It contains capital letters A to Z where different letters represent different tasks.Tasks could be done without original order. Each task could b

2017-09-12 16:53:54 336

原创 LeetCode Teemo Attacking

In LOL world, there is a hero called Teemo and his attacking can make his enemy Ashe be in poisoned condition. Now, given the Teemo's attacking ascending time series towards Ashe and the poisoning tim

2017-09-10 23:43:16 209

原创 python Django web初学安装

笔者开始学习python的课程,首先想通过python web的一个框架django来完成一个实践。 一、首先是django的安装,首先我的环境是mac系统,那么已经自带有python 2.7版本的python,因此不需要安装,mac下默认的python安装在/Library/Python目录下。然后我从django官网下载了支持python 2.x版本的1.11.5版本的django,也是目前

2017-09-10 12:05:27 504

原创 LeetCode Non-decreasing Array

Given an array with n integers, your task is to check if it could become non-decreasing by modifying at most 1 element. We define an array is non-decreasing if array[i]  holds for every i (1

2017-09-07 21:54:01 416

原创 乐观锁和悲观锁在zookeeper中的应用

一、概念介绍 1、悲观锁,又称为悲观并发控制(Pessimistic Concurrency Control,PCC),是数据库中一种非常典型且非常严格的并发控制策略。悲观锁具有强烈的独占和排他特性,能够有效地避免不同事务对同一数据并发更新而造成的数据一致性问题。悲观锁的实现原理中,如果一个事务(假定事务A)正在对数据进行处理,那么在整个处理过程中,都会将数据处于锁定状态,在这期间,其他事务将无

2017-09-05 17:29:25 3452

原创 LeetCode Third Maximum Number

Given a non-empty array of integers, return the third maximum number in this array. If it does not exist, return the maximum number. The time complexity must be in O(n). Example 1: Input: [3, 2,

2017-09-04 20:57:19 213

原创 LeetCode Maximum Binary Tree

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 constructed f

2017-09-04 09:57:17 1372

原创 LeetCode Subtree of Another Tree

Given two non-empty binary trees s and t, check whether tree t has exactly the same structure and node values with a subtree of s. A subtree of s is a tree consists of a node in s and all of this no

2017-09-03 14:04:56 200

原创 LeetCode Maximum Width of Binary Tree

Given a binary tree, write a function to get the maximum width of the given tree. The width of a tree is the maximum width among all levels. The binary tree has the same structure as a full binary tre

2017-09-02 21:25:19 875

开发Struts应用的步骤及中文乱码处理.doc

这个是一个关于Struts1.x的中文乱码的处理文档,可以帮助我们有效地处理中文乱码问题。

2015-07-04

空空如也

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

TA关注的人

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