<input type="number" pattern="number" onkeyup="value=value.replace(/[^\d\.]/g,'')" class="weui-input" id="odd_numbers" aria-describedby="inputGroupSuc ...
分类:
其他好文 时间:
2020-05-26 12:37:10
阅读次数:
68
第17条:在参数上面迭代是,要多加小心 def read_visits(data_path): with open(data_path) as f: for line in f: yield int(line) visits = read_visits("./my_numbers.txt") pri ...
分类:
编程语言 时间:
2020-05-25 19:29:24
阅读次数:
89
链接:https://leetcode-cn.com/problems/add-two-numbers/ 代码: /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * L ...
分类:
其他好文 时间:
2020-05-25 00:15:00
阅读次数:
65
一、熟悉对应的系统调用 本人学号尾号86,对应的系统调用号是link,在./arch/x86/entry/syscall_64.tbl得到如下信息: # # 64-bit system call numbers and entry vectors # # The format is: # <numb ...
分类:
其他好文 时间:
2020-05-24 00:17:18
阅读次数:
56
A message containing letters from A-Z is being encoded to numbers using the following mapping: 'A' -> 1 'B' -> 2 ... 'Z' -> 26 Given a non-empty strin ...
分类:
其他好文 时间:
2020-05-23 09:55:43
阅读次数:
57
链接:https://leetcode-cn.com/problems/longest-consecutive-sequence/ 代码: class Solution { public: int longestConsecutive(vector<int>& nums) { int n = num ...
分类:
其他好文 时间:
2020-05-23 00:10:02
阅读次数:
46
题目: 思路: 关于旋转数组有各种变种问题:是否有重复元素、寻找最大值最小值、寻找旋转点下标(旋转点的值等于最小值)、查找给定元素。本题就是对有重复元素的旋转数组,寻找其最小值。 首先想到二分查找没问题,关键在于怎么通过判断middle元素的相对大小去逐渐缩小搜索区间。如下图所示(无重复元素) 循环 ...
分类:
编程语言 时间:
2020-05-22 14:22:49
阅读次数:
45
A sequence of number is called arithmetic if it consists of at least three elements and if the difference between any two consecutive elements is the ...
分类:
其他好文 时间:
2020-05-21 10:33:22
阅读次数:
54
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solu ...
分类:
其他好文 时间:
2020-05-20 12:40:43
阅读次数:
58
1.启动go module set GO111MODULE=on GO111MODULE=off 禁用模块支持,编译时会从GOPATH和vendor文件夹中查找包 GO111MODULE=on启用模块支持,编译时会忽略GOPATH和vendor文件夹,只根据 go.mod下载依赖 GO111MODU ...
分类:
其他好文 时间:
2020-05-19 14:38:46
阅读次数:
60