错误信息:UnicodeEncodeError: 'latin-1' codec can't encode character '\u5c0f' in position 31: Body ('小') is not valid Latin-1. Use body.encode('utf-8') if ...
分类:
Web程序 时间:
2019-06-23 12:48:59
阅读次数:
105
// Directions // Write a function that returns the number of vowels // used in a string. Vowels are the characters 'a', 'e' // 'i', 'o', and 'u'. // E ...
分类:
其他好文 时间:
2019-06-21 23:54:49
阅读次数:
255
1 组织架构的修改 实现思路: 1、请求:前台通过修改按钮,请求修改页面,同时传递修改数据的id到后台,后台通过reques.GET方法获取id,返回数据,并将数据渲染到修改页面 2、执行:前台修改完数据后,提交保存,后台通过ID获取数据实例,通过form.is_valid()成功验证数据想信息后, ...
分类:
其他好文 时间:
2019-06-18 10:32:32
阅读次数:
101
难度: 中等 题目 Given a string, find the length of the longest substring without repeating characters. 给定一个字符串,请你找出其中不含有重复字符的?最长子串?的长度。 示例?1: 输入: "abcabcbb" ...
分类:
其他好文 时间:
2019-06-16 21:49:27
阅读次数:
99
题目如下: Return the lexicographically smallest subsequence of text that contains all the distinct characters of text exactly once. Example 1: Example 2: ...
分类:
其他好文 时间:
2019-06-15 10:09:22
阅读次数:
108
lc125 Valid Palindrome 法一: 双指针 首尾指针向中间收缩,比较两者指向元素是否相同 不相同就返回false 若遇到非数字非字母的字符,跳过,这里可以手写if判断,也可以用Character内置函数Character.isLetterOrDigit() 还有一点需要注意,同一个 ...
分类:
其他好文 时间:
2019-06-14 14:31:14
阅读次数:
85
Character类是一个包装类。 char这种数据类型是基于原始的Unicode编码的,储存一个char用16个bit,因此定义characters也是16位定长的实体集合。Unicode编码标准发生了变化,数量级从\uFFFF到了\u10FFFF 对Unicode标准中的所有字符,16位已经是不 ...
分类:
其他好文 时间:
2019-06-12 18:16:12
阅读次数:
88
线上报警 5xx 错误,查看日志发现报这个错, TypeError: The view function did not return a valid response. The function either returned None or ended without a return stat ...
分类:
其他好文 时间:
2019-06-12 17:58:34
阅读次数:
689
报错如下: 300 [main] DEBUG org.apache.hadoop.util.Shell - Failed to detect a valid hadoop home directory java.io.IOException: HADOOP_HOME or hadoop.home.d ...
分类:
编程语言 时间:
2019-06-11 19:02:03
阅读次数:
234
Algorithms: https://leetcode-cn.com/problems/longest-substring-without-repeating-characters/ 采用了map的存储,然后移动窗口方式解决此问题,当然看到有个动态规划,一直很难理解。 Review: https: ...
分类:
其他好文 时间:
2019-06-10 00:11:08
阅读次数:
84