[LeetCode]Student Attendance Record II

题目描述:

LeetCode 552. Student Attendance Record II

Given a positive integer n, return the number of all possible attendance records with length n, which will be regarded as rewardable. The answer may be very large, return it after mod 10 ...

继续阅读

[LeetCode]Split Assembled Strings

题目描述:

LeetCode 555. Split Assembled Strings

Given a list of strings, you could assemble these strings together into a loop. Among all the possible loops, you need to find the lexicographically biggest string after cutting and making one breakpoint of ...

继续阅读

[LeetCode]Student Attendance Record I

题目描述:

LeetCode 551. Student Attendance Record I

You are given a string representing an attendance record for a student. The record only contains the following three characters:

  1. 'A' : Absent.
  2. 'L' : Late.
  3. 'P' : Present.

A student could be rewarded if his ...

继续阅读

Windows virtualenv 安装 psycopg2

访问 http://www.stickpeople.com/projects/python/win-psycopg/ 

根据Python版本和处理器版本下载相应的psycopg2安装文件到本地。

下载完毕后不要双击执行,假设安装文件放在 C:\ ,virtualenv目录为 C:\virtualenv,执行如下命令:

C:\> C:\virtualenv\Scripts\activate.bat 
(virtualenv) C:\> easy_install psycopg2-2.6.2.win32-py2.7-pg9.5.3-release.exe

年度归档