- 博客(4)
- 资源 (2)
- 收藏
- 关注
原创 python变量作用域的一点思考
我们知道,python从某种程度上是支持函数式编程的,函数可以作为参数传递,也可以作为返回值返回,并且可以定义局部函数。 但是初学者面对这种函数式特性带来的变量作用域问题可能会有一点不适, 举个例子 def test(): x=2 def inner(): t = x + 1 x = t return t return inner 之后可以执行两句
2017-10-22 22:28:38 194
原创 picasso源码简单解析
只分析最常用的使用方式Picasso.with(MainActivity.this).load(uri).into(img); 这里只分析该语句涉及的部分,至于图形变换等其他操作不分析。 public static Picasso with(Context context) { if (singleton == null) { synchronized (Picasso.cl
2017-10-22 00:05:54 170
原创 leetcode 329. Longest Increasing Path in a Matrix
Given an integer matrix, find the length of the longest increasing path. From each cell, you can either move to four directions: left, right, up or down. You may NOT move diagonally or move outside
2017-10-20 21:23:01 133
原创 leetcode 85. Maximal Rectangle
Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area. class Solution { public: int largestRectangleArea(vectorint>& heights) {
2017-10-20 21:16:32 131
android开发艺术探索超清版
2017-09-29
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人