码迷,mamicode.com
首页 >  
搜索关键字:int string    ( 220671个结果
leetcode-227-基本计算器||
public int calculate(String s) { int len = s.length(); Stack<Integer> s1 = new Stack<>(); // 操作数栈 int num = 0; char preSign = '+'; // 为了方便计算,1+1+1 > + ...
分类:其他好文   时间:2021-07-07 17:55:15    阅读次数:0
MyBatis温故而知新-底层运行原理
准备工作 public class MainClass { public static void main(String[] args) throws Exception { String resources = "mybatis-config.xml"; InputStream inputStre ...
分类:其他好文   时间:2021-07-07 17:50:47    阅读次数:0
二维数组的遍历使用foreach
二维数组的遍历使用foreach public int numWays(int n, int[][] relation, int k) { ways = 0; this.n = n; this.k = k; edges = new ArrayList<>(); //把关系处理成list,类似于图的每 ...
分类:编程语言   时间:2021-07-07 17:49:25    阅读次数:0
文件上传
@PostMapping("uploads") public String posts(@RequestParam("file") List<MultipartFile> files){//参数file以list数组接收 if (files.isEmpty()) { return "上传失败,请选择 ...
分类:Web程序   时间:2021-07-06 16:22:43    阅读次数:0
go语言defer
defer是延迟执行。如果存在多个defer,运行顺序是先进后出,属于堆栈结构 f, err := os.Create(fileName) if err != nil { fmt.Println("Create file failed:", err) return nil, err } defer ...
分类:编程语言   时间:2021-07-05 19:08:05    阅读次数:0
opencv形态学操作
morphologyEx void Demo_1(int, void*) { cvtColor(img1, img_gray1, COLOR_BGR2GRAY); //二值化 threshold(img_gray1, img2, 0, 255, THRESH_BINARY | THRESH_OTSU ...
分类:其他好文   时间:2021-07-05 18:58:25    阅读次数:0
排序比较器的方法
使用lambda表达式 Collections.sort(List, (a,b) -> x1 - x2); 自定义Comparator方法 Collections.sort(List, new Comparator<E>(){ public int compare(int a, int b){ re ...
分类:编程语言   时间:2021-07-05 18:56:31    阅读次数:0
php 接口实例
接口定义 interface 关键字定义的类就叫接口 接口实例 <?php //接口定义 interface Human{ //跑步 public function run(); //跳远 public function jump(); } //接口实现 class Person implement ...
分类:Web程序   时间:2021-07-05 18:53:37    阅读次数:0
获取类路径下文件的绝对路径
获取类路径下文件的绝对路径 在IDEA软件中,src是类的根路径。 package com.happy.reflection; public class AboutPath { public static void main(String[] args) { String path = Thread ...
分类:其他好文   时间:2021-07-05 18:39:57    阅读次数:0
Synchronized和Lock
模拟多个线程同时买票 package com.JUC; //基本买票 /* 线程就是一个单独的资源类,没有任何附属操作 * */ public class SynchronizedDemo1 { public static void main(String[] args) { Ticket tick ...
分类:其他好文   时间:2021-07-05 18:23:51    阅读次数:0
220671条   上一页 1 ... 4 5 6 7 8 ... 22068 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!