03 2021 档案

es起步_两个简单的操作
摘要:GET operation_middle_ground_cold_truck_cargo_index/_search { "query": { "match": { "creatorName": "马宪" } }, "_source": ["creatorName","cargoName","car 阅读全文

posted @ 2021-03-30 17:04 MaXianZhe 阅读(42) 评论(0) 推荐(0) 编辑

记录下在新公司跑一个应用的经历
摘要:记录几个之前没见过的点 1 com.ymm.trade.TradeBootStrap 是pom文件中的parent里的类,本身不在工程里 2 注意 shorten command line 和后面的选项。百度下说是指定依赖的lib库从哪里获取,这么写读取运行jar包中的manifest.mf文件中的 阅读全文

posted @ 2021-03-17 09:15 MaXianZhe 阅读(59) 评论(0) 推荐(0) 编辑

Leet_Code_75_SortColor
摘要:public void sortColors(int[] nums) { int left = 0; int right = nums.length-1; for (int i=0;i<=right;i++) { if (nums[i] == 0) { swap(i,left,nums); left 阅读全文

posted @ 2021-03-17 07:55 MaXianZhe 阅读(36) 评论(0) 推荐(0) 编辑

Leet_Code_215_找第k大的数
摘要:public int findKthLargest(int[] nums, int k) { PriorityQueue<Integer> queue = new PriorityQueue<>(); for (int num : nums) { if (queue.size() < k) { qu 阅读全文

posted @ 2021-03-17 07:38 MaXianZhe 阅读(45) 评论(0) 推荐(0) 编辑

Leet_Code_42_接雨水
摘要:public int trap(int[] height) { int result = 0; int maxValue = -1; int maxAdder = 0; //取数组最大的下标和它的值 for (int i=0;i<height.length;i++) { if (height[i] 阅读全文

posted @ 2021-03-16 22:24 MaXianZhe 阅读(46) 评论(0) 推荐(0) 编辑

Leet_Code_137_唯一的数字
摘要:public int singleNumber(int[] nums) { int ans = 0; for (int i=0;i<32;i++) { int count = 0; for (int num : nums) { if (((num >>> i) &1) == 1) { count++ 阅读全文

posted @ 2021-03-16 22:20 MaXianZhe 阅读(54) 评论(0) 推荐(0) 编辑

Leet_Code_567_字符串排列
摘要:public static boolean checkInclusion(String s1, String s2) { int[] charArray1 = new int[26]; int[] charArray2 = new int[26]; for (char c : s1.toCharAr 阅读全文

posted @ 2021-03-16 19:09 MaXianZhe 阅读(40) 评论(0) 推荐(0) 编辑

LeetCode_424_替换后的最长字符串
摘要:class Solution { public int characterReplacement(String s, int k) { int left =0,right=0; int maxLength = -1; int result = 0; char[] charNums = new cha 阅读全文

posted @ 2021-03-16 18:39 MaXianZhe 阅读(32) 评论(0) 推荐(0) 编辑

LeetCode_139_单词拆分
摘要:class Solution { public boolean wordBreak(String s, List<String> wordDict) { return isContain(s, wordDict); } Map<String,Boolean> map = new HashMap<>( 阅读全文

posted @ 2021-03-16 18:38 MaXianZhe 阅读(38) 评论(0) 推荐(0) 编辑

Nginx的upstream
摘要:upstream zhang21(名称){ server 192.168.1.11:8888; server 192.168.1.22:8888; server 192.168.1.33:8888; } upstream表示一个集群 阅读全文

posted @ 2021-03-11 19:15 MaXianZhe 阅读(134) 评论(0) 推荐(0) 编辑

Pigeon源码跟踪之客户端获取服务
摘要:在具体调用ServiceFactory.getService时,实际会调用serviceProxy.getProxy(invokerConfig),进一步调用AbstractServiceProxy#getProxy方法,这个方法的实现逻辑大致如下: 1 检查interface,url,protoc 阅读全文

posted @ 2021-03-09 15:55 MaXianZhe 阅读(99) 评论(0) 推荐(0) 编辑

创建线程安全的set的方法
摘要:Set addresses = Collections.newSetFromMap(new ConcurrentHashMap());完全是jdk提供的方法 阅读全文

posted @ 2021-03-09 14:45 MaXianZhe 阅读(233) 评论(0) 推荐(0) 编辑

Pigeon源码分析(一)-- 服务注册
摘要:跟代码过程中发现的问题记录下 ServiceFactory是一切的基础,它是通过静态代码块初始化的 static { try { ProviderBootStrap.init(); String appname = ConfigManagerLoader.getConfigManager().get 阅读全文

posted @ 2021-03-08 17:49 MaXianZhe 阅读(126) 评论(0) 推荐(0) 编辑

使用postman配置header的惨痛经历
摘要:记下来以备不时之需 当在页面抓取http报文的时候,请求头往往是带了引号的,比如这样的 { "Host": [ "dev.ymm56.com" ], "X-Real-IP": [ "192.168.33.24" ], "X-Forwarded-For": [ "192.168.33.24" ], " 阅读全文

posted @ 2021-03-05 17:15 MaXianZhe 阅读(2140) 评论(0) 推荐(0) 编辑

Redis字典知识点总结
摘要:Redis使用C语言编写,C语言中不像JAVA有hashmap结构,所以Redis自己实现了字典结构 一 哈希表 其中dictEntry结构是这样的 一个dictHt初始大小是4,used字段表示当前有几个元素,所以上面的used是2. 二 字典结构 dictType是一个结构体,里面包含着多种函数 阅读全文

posted @ 2021-03-01 11:05 MaXianZhe 阅读(49) 评论(0) 推荐(0) 编辑

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示