自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 安卓E/CursorWindow: Failed to read row 0, column 0 from a CursorWindow which has 0 rows, 5 columns解决方案

使用SQLite数据库,建表插入数据后,使用Cursor读取时,发生以上错误,可见rows = 2,说明已经成功插入数据了,读的时候却说只有0 rows后来发现自己的问题是表中数据类型和插入的数据不完全吻合的问题我的表中有一个存放图片的BLOB类型,其实就是byte[],但是我将传的图片Bitmap 转byte[]指定了PNG压缩,但选择图片不小心选了JPG的,从而出现了以上报错,选了PN

2017-11-25 12:48:37 3396

原创 gzip过滤器源码分析

找gzip这个包就找了好久,最后在ubuntu下的 /home/usr/lib/go-1.6/src/compress/gzip 目录下找到的,源码:// Copyright 2010 The Go Authors. All rights reserved.// Use of this source code is governed by a BSD-style// license tha

2017-11-23 19:31:01 686

原创 LeetCode 199. Binary Tree Right Side View

题目链接199. Binary Tree Right Side ViewGiven a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom.For exam

2017-11-21 20:08:38 122

原创 LeetCode 42. Trapping Rain Water

题目链接42. Trapping Rain WaterGiven n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining. For exampl

2017-11-20 21:01:13 104

原创 LeetCode 131. Palindrome Partitioning--回溯法

题目链接131. Palindrome PartitioningGiven a string s, partition s such that every substring of the partition is a palindrome.Return all possible palindrome partitioning of s.For example, given

2017-11-08 13:29:55 284

原创 LeetCode 37. Sudoku Solver--回溯法

题目链接37. Sudoku SolverWrite a program to solve a Sudoku puzzle by filling the empty cells.Empty cells are indicated by the character '.'.You may assume that there will be only one uni

2017-11-07 19:10:35 297

原创 回溯法解决八皇后问题

八皇后是一个古老而著名的问题,是回溯算法的典型案例。该问题是国际西洋棋棋手马克斯·贝瑟尔于1848年提出:在8×8格的国际象棋上摆放八个皇后,使其不能互相攻击,即任意两个皇后都不能处于同一行、同一列或同一斜线上,问有多少种摆法。 高斯认为有76种方案。1854年在柏林的象棋杂志上不同的作者发表了40种不同的解,后来有人用图论的方法解出92种结果。计算机发明后,有多种计算机语言可以解决此问题。

2017-11-07 15:05:25 250

原创 LeetCode 85. Maximal Rectangle&221. Maximal Square--动态规划

题目链接221. Maximal SquareGiven a 2D binary matrix filled with 0's and 1's, find the largest square containing only 1's and return its area.For example, given the following matrix:1 0 1 0

2017-11-06 15:37:50 352

原创 LeetCode 279. Perfect Squares--动态规划

279. Perfect SquaresGiven a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, ...) which sum to n.For example, given n = 12, return 3 because 1

2017-11-05 16:43:36 274

原创 LeetCode 95. Unique Binary Search Trees II&96. Unique Binary Search Trees--动态规划,二叉树

题目链接96. Unique Binary Search TreesGiven n, how many structurally unique BST's (binary search trees) that store values 1...n?For example,Given n = 3, there are a total of 5 unique BST's

2017-11-04 19:28:59 239

空空如也

空空如也

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

TA关注的人

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