data.json { "name": "java", "url": "http://www.baidu.com", "page": 1, "isNonProfit": true, "address": { "street": "凯宾路", "city": "上海", "country": "中国" ...
分类:
移动开发 时间:
2020-12-15 12:22:45
阅读次数:
4
使进程执行某一程序。成功无返回值,失败返回 -1 int execlp(const char *file, const char *arg, ...); 借助 PATH 环境变量找寻待执行程序 参1: 程序名 参2: argv0 参3: argv1 ...: argvN 哨兵:NULL int ex ...
分类:
其他好文 时间:
2020-12-15 12:22:16
阅读次数:
3
npm i wangeditor --save 页面单独引入 import E from "wangeditor"; <div id="div1"></div> data(){ return{ editor:null, } } mounted() { const editor = new E('#d ...
分类:
其他好文 时间:
2020-12-15 12:13:24
阅读次数:
3
1 class Solution { 2 public String longestPalindrome(String s) { 3 if(s.equals("")) return ""; 4 String origin = s; 5 String reverse = new StringBuffe ...
分类:
其他好文 时间:
2020-12-14 13:43:53
阅读次数:
4
private void backtrack("原始参数") { //终止条件(递归必须要有终止条件) if ("终止条件") { //一些逻辑操作(可有可无,视情况而定) return; } for (int i = "for循环开始的参数"; i < "for循环结束的参数"; i++) { / ...
分类:
其他好文 时间:
2020-12-14 13:36:01
阅读次数:
3
先放一段冒泡排序的代码 public class Test { public void bubbleSort(int[] a){ if (a.length<=1){return;} for (int i = 0; i < a.length; i++) { boolean flag = false; ...
分类:
编程语言 时间:
2020-12-14 13:21:56
阅读次数:
4
下面这个工具包下的函数 package utils import ( "crypto/md5" "encoding/hex" ) //md5加密 func Md5(src string) string { m := md5.New() m.Write([]byte(src)) res := hex. ...
分类:
其他好文 时间:
2020-12-14 13:19:12
阅读次数:
3
第一步,可以贪心的发现,在子树中,如果有多个儿子,那么先走深的儿子,因为最后要跳到上面父亲去,因此最后所在的地方约浅越好 但是对于根来说,如果他有多个子树,那么先走浅的好,因为我最后一步不需要跳到别的子树,只需要跳回根就行,如果先走最深的子树,那么要跳到别的子树,就不是最优的 因为他最深 #incl ...
分类:
其他好文 时间:
2020-12-14 13:17:16
阅读次数:
3
class pattern: x=0 y=0 def __init__(self,x,y): self.x=x self.y=y def dis(a,b): return ((a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y))**0.5 eps=0.00001 maxn= ...
分类:
编程语言 时间:
2020-12-14 12:59:58
阅读次数:
4
记录 ###I 通过:1, 错误:206(递归返回条件和边界条件), 1.两数之和-简单 class Solution: def twoSum(self, nums: List[int], target: int) -> List[int]: lookup = {} for i in range(l ...
分类:
其他好文 时间:
2020-12-14 12:59:21
阅读次数:
3