不想做菜鸟的小螃蟹

菜鸟成长记录,欢迎批评指正

【微信小程序】wx.request出现undefined

偶现,天啦噜,一直困惑了很久的bug终于找到原因了。示例代码如下wx.request({ sucess:function(res){ if(res.statusCode==200 && res.data.status==200...

2018-03-30 21:26:10

阅读数:610

评论数:0

【Leetcode】645. Set Mismatch(Easy)

1.题目The set S originally contains numbers from 1 to n. But unfortunately, due to the data error, one of the numbers in the set got duplicated to anot...

2018-03-29 11:02:49

阅读数:10

评论数:0

【Leetcode】643. Maximum Average Subarray I(Easy)

1.题目Given an array consisting of n integers, find the contiguous subarray of given length k that has the maximum average value. And you need to outpu...

2018-03-29 10:44:45

阅读数:8

评论数:0

【Leetcode】637. Average of Levels in Binary Tree(Easy)

1.题目Given a non-empty binary tree, return the average value of the nodes on each level in the form of an array.Example 1:Input: 3 / \ 9 20 ...

2018-03-29 10:36:09

阅读数:6

评论数:0

【Android】fragment切换的demo

1.文件准备:①MainActivity.java activity_layout.xml;②3-4个Fragmentxx.java   fragmentxx.xml;③一个颜色资源文件,用于按钮切换的展示。④style文件,同一管理按钮的样式。2.MainActivitypublic class...

2018-03-28 11:43:41

阅读数:16

评论数:0

【Leetcode】633. Sum of Square Numbers(Easy)

1.题目Given a non-negative integer c, your task is to decide whether there're two integers a and b such that a2 + b2 = c.翻译:给定一个非负整数 c ,你的任务是判断是否有两个整数 ...

2018-03-28 10:59:22

阅读数:8

评论数:0

【Leetcode】628. Maximum Product of Three Numbers(Easy)

1.题目Given an integer array, find three numbers whose product is maximum and output the maximum product.翻译:给定一个整数序列,找到三个数使得它们的乘积最大,并且输出最大的乘积。Example 1...

2018-03-28 10:50:52

阅读数:7

评论数:0

【Leetcode】627. Swap Salary(Easy)

1.题目Given a table salary, such as the one below, that has m=male and f=female values. Swap all f and m values (i.e., change all f values to m and vic...

2018-03-28 10:44:36

阅读数:26

评论数:0

【Leetcode】620. Not Boring Movies(Easy)

1.题目X city opened a new cinema, many people would like to go to this cinema. The cinema also gives out a poster indicating the movies’ ratings and de...

2018-03-28 10:38:17

阅读数:21

评论数:0

【Leetcode】617. Merge Two Binary Trees(Easy)

1.题目Given two binary trees and imagine that when you put one of them to cover the other, some nodes of the two trees are overlapped while the others ...

2018-03-28 10:31:48

阅读数:7

评论数:0

【Leetcode】606. Construct String from Binary Tree(Easy)

1.题目You need to construct a string consists of parenthesis and integers from a binary tree with the preorder traversing way.The null node needs to be...

2018-03-27 10:17:45

阅读数:5

评论数:0

【Leetcode】605. Can Place Flowers(Easy)

1.题目Suppose you have a long flowerbed in which some of the plots are planted and some are not. However, flowers cannot be planted in adjacent plots -...

2018-03-27 10:10:16

阅读数:12

评论数:0

【Leetcode】596. Classes More Than 5 Students(Easy)

1.题目There is a table courses with columns: student and classPlease list out all classes which have more than or equal to 5 students.For example, the ...

2018-03-23 15:55:52

阅读数:16

评论数:0

【Leetcode】599. Minimum Index Sum of Two Lists(Easy)

1.题目Suppose Andy and Doris want to choose a restaurant for dinner, and they both have a list of favorite restaurants represented by strings.You need ...

2018-03-23 15:50:20

阅读数:7

评论数:0

【微信小程序】设置合法域名

1.微信小程序开发的时候遇到的问题。xxx.xxx不在以下request合法域名列表中2.两种解决方案,在开发阶段我们可以在 小程序开发环境 右上角,点击“详情”,勾选“不校验安全域名。。。”3.要审核时等,进入微信公众平台(https://mp.weixin.qq.com),用小程序账号密码邮箱...

2018-03-23 10:22:02

阅读数:213

评论数:0

【Leetcode】595. Big Countries(Easy)

1.题目There is a table World+-----------------+------------+------------+--------------+---------------+ | name | continent | area | ...

2018-03-22 11:20:40

阅读数:9

评论数:0

【Leetcode】598. Range Addition II(Easy)

1.题目Given an m * n matrix M initialized with all 0's and several update operations.Operations are represented by a 2D array, and each operation is re...

2018-03-22 11:03:41

阅读数:6

评论数:0

【微信小程序】TextArea的坑

今天遇到一个textArea的坑,先上个图。1.点击“选择内容反馈”,弹出action-sheet时,有时点击第一个条目“讲太快”,textArea会把焦点劫走。2.解决方法,当actionsheet显示时,设置textarea的disabled属性为true. 即将textarea的disabl...

2018-03-21 12:30:32

阅读数:630

评论数:0

【Leetcode】594. Longest Harmonious Subsequence (Easy)

1.题目We define a harmonious array is an array where the difference between its maximum value and its minimum value is exactly 1.Now, given an integer ...

2018-03-21 12:25:19

阅读数:6

评论数:0

【Leetcode】581. Shortest Unsorted Continuous Subarray(Easy)

1.题目Given an integer array, you need to find one continuous subarray that if you only sort this subarray in ascending order, then the whole array wil...

2018-03-20 10:25:56

阅读数:8

评论数:0

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