自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(401)
  • 收藏
  • 关注

原创 下载测试视频

测试视频下载

2022-07-05 17:00:51 2427 1

原创 正则表达式 (?:pattern)(?=pattern)

(?:pattern)(?=pattern)、(?=pattern)、(?!pattern)、(?<=pattern)和(?<!pattern)(?:pattern)pattern:表示表达式# 1. (?:pattern)"""()表示捕获分组,()会把每个分组里的匹配的值保存起来,从左向右,以分组的左括号为标志,第一个出现的分组的组号为1,第二个为2,以此类推(?:)表示非捕获分组,和捕获分组唯一的区别在于,非捕获分组匹配的值不会保存起来[\u4e00-\u9f..

2022-05-16 17:16:37 1781

原创 IDEA在debug环境下,端口被占用

Unable to open debugger port (127.0.0.1:51015): java.net.BindException "Address already in use: NET_Bind"1、查看debug的端口号2、cmd打开命令行①查看占用端口进程的端口netstat -ano|findstr "59480"②查看该端口进程tasklist |findstr "2936"③杀死进程taskkill -pid 2936 -f3、重.

2021-10-29 16:27:38 1453

原创 Android开发:操作UI线程4种方法

我们经常会在后台线程中去做一些耗时的操作,比如去网络取数据。但是当数据取回来,需要显示到页面上的时候,会遇到一些小麻烦,因为我们都知道,android的UI页面是不允许在其他线程直接操作的。下面总结4中方法用来在线程中操作UI界面。模拟耗时操作private void connectNet() throws InterruptedException { Thread.sleep(2000);}方法一:Handler子线程中通过Handler的sendMessage(msg

2021-04-09 16:49:55 2843

原创 记录一次socket编程:socket的close方法

/** * Closes this socket. * <p> * Any thread currently blocked in an I/O operation upon this socket * will throw a {@link SocketException}. * <p> * Once a socket has been closed, it is not available for further ne.

2021-03-16 14:06:02 965

原创 记录一次socket编程:String的trim函数

trim函数功能是去除首位的空格,但是需要注意的是,如果单单自身使用了trim函数,并没有赋值给实例,则,该自身没有去除空格。例:

2021-03-15 22:37:56 109

原创 Mysql:Sql的执行顺序

sql执行顺序from join on where group by(开始使用select中的别名,后面的语句中都可以使用) avg,sum.... having select distinct order by limit

2021-03-08 22:17:16 74

原创 记录一次Socket编程:OutputStream的flush方法

先上源码: /** * Flushes this output stream and forces any buffered output bytes * to be written out. The general contract of <code>flush</code> is * that calling it is an indication that, if any bytes previously * written hav

2021-03-04 15:51:33 1640 1

原创 记录一次Socket的异常:InputStream.read()阻塞问题

起先是在Socket编程时,服务端取得客户端发送的数据,但是在InputStream.read()的时候,一直停在那,然后取了解了read方法才知道阻塞问题代码示例://端口数据取得byte[] b = new byte[1024];in.read(b);//阻塞地方String contents = new String(b).trim();//trim去除多余空格,否则,读进来的是byte[1024]个占位字节Logger.getLogger(Constant.TASK).info(

2021-03-03 13:53:54 5497 2

原创 记录一次Socket异常:java.net.SocketException: Connection reset

先贴异常信息java.net.SocketException: Connection reset at java.net.SocketInputStream.read(SocketInputStream.java:210) at java.net.SocketInputStream.read(SocketInputStream.java:141) at java.net.SocketInputStream.read(SocketInputStream.java:127) at cn.com.f

2021-03-01 17:17:49 3763 3

原创 Android开发:Android Studio中gradle的代理问题

项目启动报错:If you are behind an HTTP proxy, please configure the proxy settings either in IDE or Gradle.原因:gradle的代理没有配置,或没有加载到,代理配置文件找不到解决:1.Android Studio配置查看gradle配置,是去哪里加载代理配置文件setting的Gradle user home,我的为:C:\Users\user\.gradle,若配置了gradle的环境参数,则

2021-02-22 16:53:05 2223 1

原创 数据结构:二分查找算法

int binarySearch(int[] nums, int target) { int left = 0; int right = nums.length - 1; // 注意 while(left <= right) { // 注意 int mid = (right + left) / 2; if(nums[mid] == target) return mid; else if (nums[.

2020-12-15 09:40:47 128

原创 Mysql:mysql函数GROUP_CONCAT()

mysql 中 GROUP_CONCAT()函数,主要用来处理一对多的查询结果,通常会结合GROUP BY一起使用。例如:SELECT s.stu_id AS studentId, s.stu_name AS studentName, GROUP_CONCAT(CAST(c.course_id AS CHAR) ORDER BY c.course_id SEPARATOR '/') AS courseId, GROUP_CONC

2020-12-11 09:19:13 100

原创 数据结构:平衡二叉树概念、旋转

平衡二叉树​  平衡二叉搜索树,又被称为AVL树,且具有以下性质:它是一棵空树或它的左右两个子树的高度差的绝对值不超过1,并且左右两个子树都是一棵平衡二叉树。—-来自百度百科​  由于普通的二叉查找树会容易失去”平衡“,极端情况下,二叉查找树会退化成线性的链表,导致插入和查找的复杂度下降到 O(n) ,所以,这也是平衡二叉树设计的初衷。那么平衡二叉树如何保持”平衡“呢?根据定义,有两个重点,一是左右两子树的高度差的绝对值不能超过1,二是左右两子树也是一颗平衡二叉树。  如下图所示,左图是一棵平.

2020-12-02 12:44:48 593 2

原创 数据结构:表达式之中缀转后缀

中缀表达式是最常用的算术表达式,运算符在运算数中间,运算需要考虑运算符优先级.后缀表达式是计算机容易运算的表达式,运算符在运算数后面,从左到右进行运算,无需考虑优先级,运算呈线性结构.先举个简单的转换例子2+9/3-5 (前缀)-> 2 9 3 / + 5 - (后缀)先进行乘除再进行加减运算规律,运算数位置不变,改变的是运算符位置可以推栈实现,用堆栈储存等待中的运算符.将当前运算符与最后一个等待的运算符比较.具体转换方式:1.从左到右进行遍历2.运算数,直接输出.3.左括号,直接压

2020-12-02 09:39:45 555

原创 Mysql:Mysql数据库系统表之详细了解INNODB_TRX、INNODB_LOCKs、INNODB_LOCK_waits、PROCESSLIST表

# 当前运行的所有事务SELECT * FROM information_schema.INNODB_TRX;# 当前出现的锁SELECT * FROM information_schema.INNODB_LOCKs; # 锁等待的对应关系SELECT * FROM information_schema.INNODB_LOCK_waits;# PROCESSLIST表记录了每个MySql线程的用户,地址以及操作的db等其他信息。①SELECT * FROM infor

2020-11-25 15:49:51 6066 2

原创 Mysql:kill命令之mysql杀死指定的进程(批操作)

SELECT CONCAT('KILL ',id,';') FROM information_schema.processlist WHERE db='op_system_gyj';

2020-11-24 10:03:35 577

原创 Java开发:(执行系统(例cmd)命令)Runtime.getRuntime().exec()参数解释

在日常的java编程开发中,难免遇到要在程序中使用系统的操作命令,如windows下的cmd,或linux的命令,接下来介绍以下Runtime.getRuntime().exec()函数所执行的系统命令。/*** exec(),有三个参数,分别为* command: 系统命令,如cd、ls、cat等等* envp:一个string[],每一个参数代表环境变量,若当前继承了进程的系统环境变量,则为null* path:当前进程的工作目录(特别重要,比如在执行jar包时,就应该在jar包下的当前目

2020-11-23 10:34:45 3980

原创 Mysql: SQL JOIN 子句详解

SQL JOIN 子句用于把来自两个或多个表的行结合起来,基于这些表之间的共同字段。最常见的 JOIN 类型:SQL INNER JOIN(简单的 JOIN)、SQL LEFT JOIN、SQL RIGHT JOIN、SQL FULL JOIN,其中前一种是内连接,后三种是外链接。假设我们有两张表,Table A是左边的表,Table B是右边的表。id name 1 Google 2 淘宝 3 微博 4 Facebook id addr.

2020-10-21 17:14:47 340

原创 JS:js中的复制对象值问题——Object.assign()

在复制对象的值的时候,往往不能直接“=”,这样会造成引用赋值,应该利用一些函数进行对象的复制值。如下:$scope.updateDeliveryOrder = function(wayPointsOrder) { var tempDeListInfo = Object.assign({}, $scope.deListInfo); var index = 1 ; for( var i = 0; i < wayPointsOrder.length; i

2020-06-28 09:43:07 649

转载 JS:js 数组赋值问题 :值传递还是引用?

转载于知乎var a = [1,2,3];var b = a;a = [4,5,6];alert(b); //[1,2,3]面试时被问到这样一个问题,竟然从来没试过... 当时直接的理解,数组是引用类型,应该是传递的是引用,so b也是[4,5,6],于是错了。js数组传递是跟基本类型一样创建副本吗?我又做了如下测试:var a = [1,2,3];var b = a;a.pop();alert(b); //[1,2]这样好像又是引用传递了? 晕了答案:..

2020-06-28 09:38:16 1196

原创 Java开发:什么是序列化?

1系列化(Serialize)是干什么的? 这是IO存储中的一个概念。计算机中所有的内容都是0或者1的数字。这些数字按顺序排列,便可以表示计算机中的万事万物,当然Java的对象也不例外。在内存中,无论如何表示,对我们的操作都没有影响,所以我们不必关心。但是,当我们需要把对象存储到硬盘、数据库或其它相关介质时,我们就需要考虑这个表示格式或者转化方法。Java的对象要如何转化为这0、1的序列呢?就是靠序列化,使用java.io.ObjectOutputStream类即可完成复杂的转化工作,但...

2020-06-03 16:08:08 255

原创 JS:javaweb——a标签实现跳转并打开新窗口

利用window.open()<a href="articleView?id=${article.id}" onclick="window.open(this.href);return false">${article.title}</a>

2020-05-16 22:10:17 1325

原创 JS:a标签传值到js,并动态响应

1.<a></a>标签 如何传参到函数<a href="javascript:void(0);" id="del" onclick=deleteRoles("${role.id}")>删除角色</a>2.js代码/*删除角色提示信息---------------------*/ function deleteRoles(id) {//单删 //判断 if (confirm("确定删除?")){//confirm:点

2020-05-15 23:53:06 1516

原创 1063 Set Similarity

1063Set Similarity(25分)Given two sets of integers, the similarity of the sets is defined to beN​c​​/N​t​​×100%, whereN​c​​is the number of distinct common numbers shared by the two sets, andN...

2019-05-06 18:24:58 202

原创 1062 Talent and Virtue

1062Talent and Virtue(25分)About 900 years ago, a Chinese philosopher Sima Guang wrote a history book in which he talked about people's talent and virtue. According to his theory, a man being outs...

2019-04-30 13:39:22 252

原创 1061 Dating

1061Dating(20分)Sherlock Holmes received a note with some strange strings:Let's date! 3485djDkxh4hhGE 2984akDfkkkkggEdsb s&hgsfdk d&Hyscvnm. It took him only a minute to figure out that t...

2019-04-30 12:32:43 178

原创 1060 Are They Equal

If a machine can save only 3 significant digits, the float numbers 12300 and 12358.9 are considered equal since they are both saved as0.123×10​5​​with simple chopping. Now given the number of signif...

2019-04-30 10:18:42 133

原创 1059 Prime Factors

1059Prime Factors(25分)Given any positive integerN, you are supposed to find all of its prime factors, and write them in the formatN=p​1​​​k​1​​​​×p​2​​​k​2​​​​×⋯×p​m​​​k​m​​​​.Input Specifi...

2019-04-14 12:49:23 202

原创 1058 A+B in Hogwarts

1058A+B in Hogwarts(20分)If you are a fan of Harry Potter, you would know the world of magic has its own currency system -- as Hagrid explained it to Harry, "Seventeen silver Sickles to a Galleon ...

2019-04-14 12:20:44 136

转载 树状数组(单点+区间的所有操作)

转载:https://blog.csdn.net/I_believe_CWJ/article/details/80374326更简洁方便的数据结构--树状数组(基于线段树的实现)1.单点更新+区间求和(基本线段树,简单,自行了解)2.区间更新+单点求值(基于单点更新+区间求和)例:HDU 1556-Color the ball操作1:修改某段区间[l, r]的...

2019-04-14 12:07:10 749

原创 1057 Stack

1057Stack(30分)Stack is one of the most fundamental data structures, which is based on the principle of Last In First Out (LIFO). The basic operations include Push (inserting an element onto the t...

2019-04-12 20:16:35 215

转载 分块算法

转载:https://blog.csdn.net/a_forever_dream/article/details/80054800首先,它会将一个序列分成√n 块,除了最后一块,其他每一块都严格的只有 √n 个元素,然后用一个belong数组记录每一个元素属于哪一块,再用l[i],r[i]记录每一块的左边界和右边界,然后就是......好像没了额......没错,就是这么简单,接下来...

2019-04-12 20:15:19 420

原创 1056 Mice and Rice

1056 Mice and Rice (25 分)Mice and Rice is the name of a programming contest in which each programmer must write a piece of code to control the movements of a mouse in a given map. The goal of each m...

2019-04-11 23:07:59 98

原创 1055 The World's Richest

1055The World's Richest(25分)Forbes magazine publishes every year its list of billionaires based on the annual ranking of the world's wealthiest people. Now you are supposed to simulate this job, ...

2019-04-10 11:03:45 175

原创 1054 The Dominant Color

1054The Dominant Color(20分)Behind the scenes in the computer's memory, color is always talked about as a series of 24 bits of information for each pixel. In an image, the color with the largest p...

2019-04-10 09:04:50 107

原创 1053 Path of Equal Weight

1053Path of Equal Weight(30分)Given a non-empty tree with rootR, and with weightW​i​​assigned to each tree nodeT​i​​. Theweight of a path fromRtoLis defined to be the sum of the weights o...

2019-04-09 15:20:58 102

原创 1052 Linked List Sorting

1052Linked List Sorting(25分)A linked list consists of a series of structures, which are not necessarily adjacent in memory. We assume that each structure contains an integerkeyand aNextpointe...

2019-04-09 09:25:16 83

原创 1051 Pop Sequence

1051Pop Sequence(25分)Given a stack which can keepMnumbers at most. PushNnumbers in the order of 1, 2, 3, ...,Nand pop randomly. You are supposed to tell if a given sequence of numbers is a ...

2019-04-08 21:00:05 113

原创 1050 String Subtraction

1050String Subtraction(20分)Given two stringsS​1​​andS​2​​,S=S​1​​−S​2​​is defined to be the remaining string after taking all the characters inS​2​​fromS​1​​. Your task is simply to calcu...

2019-04-08 20:22:50 132

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除