E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
Substring
Java和js中小数和百分数的互相转换
一、百分数转小数Java中:privatefloatchangePercentToPoint(Stringpercent){returnnewFloat(percent.
substring
(0,percent.indexOf
请叫我林小李
·
2020-09-13 08:00
java-web
超出的字符长度截取显示省略号(...) 按字节长度计算
functionsubstrByLen(str,leng){if(len(str)>leng){vari=leng;while(len(str)>leng){i--;str=str.
substring
(
kongjiea
·
2020-09-13 08:56
javascript
常用js函数
如何用JavaScript 使小数点后面不足4位数补0
=-1){a=a.
substring
(0,b);}}else{//如果没有小数点if(b==-1){a=a+“.”;for(i=1;i<=num;i++){a=a+“0”;}}else{/
wx_963907964
·
2020-09-13 07:47
javascript
leetcode647. 回文子串
[j]是否是回文子串*考虑单字符和双字符的特殊情况*状态转移方程:dp[i][j]=dp[i+1][j-1]&&str[i]==str[j]*/classSolution{publicintcount
Substring
s
wl1929
·
2020-09-13 07:09
leetcode
R语言
substring
() 函数 :提取字符串的一部分
substring
()函数的基本语法是:
substring
(x,first,last)以下是所使用的参数的说明:x-是字符向量输入。first-是第一个字符要被提取的位置。
铃儿响叮当^
·
2020-09-13 06:20
HDU 1403 Longest Common Substrung [后缀数组] [LCP] [LCS]
LongestCommon
Substring
TimeLimit:4000MSMemoryLimit:32768KB64bitIOFormat:%I64d&%I64uDescriptionGiventwostrings
JacquesdeH
·
2020-09-13 05:37
后缀数组
字符串处理
LCP
LCS
字符串长度截取换行/n
汉字2个字节,字母数字一个字节//////字符串///截取长度///publicstaticstring
Substring
forlength(stringstr,intn){stringtemp=string.Empty
ACE1303231
·
2020-09-13 04:44
JAVA-字符串按指定长度换行
1publicStringgetStringByEnter(intlength,Stringstring)throwsException2{3for(inti=1;ilength)6{7returnstring.
substring
weixin_30340617
·
2020-09-13 04:04
R语言字符串或变量拆分
>substr("abcdef",2,4)#从字符串“abcdef”中提取出第2到4个位置上的字符[1]"bcd">
substring
("abcdef",1:6,1:6)#从字符串“abcdef”中提取出第
丙吉
·
2020-09-13 04:16
R软件学习
将字符串中指定位置进行反转
可以将字符串分成三部分,0到x,x到y,y到str.length()处,再用
subString
()进行截取反转部分,用StringBuffer中的reverse方法进行反转,再转成String,再用Concat
weixin_44074950
·
2020-09-13 03:24
字符串
动态添加表格并打印
window.document.body.innerHTML;sprnstr="";eprnstr="";prnhtml=bdhtml.substr(bdhtml.indexOf(sprnstr)+17);prnhtml=prnhtml.
substring
qq_42312459
·
2020-09-13 02:04
如何使用java判断图片base64流字节大小
这里只提供代码参考/***通过图片base64流判断图片等于多少字节*image图片流*/publicstaticIntegerimageSize(Stringimage){Stringstr=image.
substring
Twinkle_康康
·
2020-09-13 02:48
【后台】java常用工具类
javaScript 比较日期大小的函数(转)
functioncompareDate(DateOne,DateTwo){varOneMonth=DateOne.
substring
(5,DateOne.lastIndexOf("-"));varOneDay
lvxuehu
·
2020-09-13 02:01
javaScript
常用处理函数
//截取字符串(包含中文处理)str要截取的字符串len截取长度hasfix是否加...后缀function
subString
(str,len,hasfix){varnewLength=0;varnewStr
landywa
·
2020-09-13 01:47
Javascript
function
null
将String类型转换成int类型
;getS=s_.
substring
(0,location);}
如梦心语
·
2020-09-13 01:54
java
el-tree实现懒加载,并查询显示当前节点及所有子节点
html代码:10">{{data.label.
substring
(0,9)}}...{{data.label}}{{data.count?
依赖_赖
·
2020-09-13 00:09
vue
javascript
vue.js
一个比较日期大小的javascript函数
{varOneMonth=DateOne.
substring
(5,DateOne.lastIndexOf("-"));varOneDay=DateOne.
substring
(DateOne.length
johngong
·
2020-09-13 00:39
Ajax
&
Javascript
Longest
Substring
Without Repeating Characters 最长无重复字符的子串
这道求最长无重复子串的题和之前那道IsomorphicStrings很类似,属于LeetCode的早期经典题目,博主认为是可以跟TwoSum媲美的一道题。给了我们一个字符串,让我们求最长的无重复字符的子串,注意这里是子串,不是子序列,所以必须是连续的。我们先不考虑代码怎么实现,如果给一个例子中的例子"abcabcbb",让你手动找无重复字符的子串,该怎么找。博主会一个字符一个字符的遍历,比如a,b
狗辣子
·
2020-09-13 00:01
LeetCode
Algorithm
java算法----求最长子串
;/***求一个字符串中不重复字符的最长子串,如字符串"abcdefghiud",最长的不重复的子串为"abcdefghiu"*@authoryangjianzhou**/publicclassMax
Substring
yjz764297625
·
2020-09-13 00:44
java
最长无重复子串(滑动窗口的使用)
题目链接:https://leetcode-cn.com/problems/longest-
substring
-without-repeating-characters/小白的第一感觉肯定是暴力法,可是会导致时间超限
weixin_43981978
·
2020-09-12 23:40
字符串
LeetCode题库解答与分析——#3.无重复字符的最长子串Longest
Substring
WithoutRepeatingCharacters
#3无重复字符的最长子串Longest
Substring
WithoutRepeatingCharacters给定一个字符串,找出不含有重复字符的最长子串的长度。
CptSwift
·
2020-09-12 23:18
LeetCode
java 获取文件后缀名(文件类型)
31Author:Marydon//获取文件名的后缀名(文件类型)StringoldFileName="UploadExcelController.java";StringfileType=oldFileName.
substring
weixin_34126557
·
2020-09-12 23:34
java获取文件后缀名
方法1://使用lastIndexOf()结合
subString
()获取后缀名publicStringlastName(Filefile){if(file==null)returnnull;Stringfilename
ununie
·
2020-09-12 23:13
java
前端ajax同时传图片(兼图片展示)与文本信息的方法
第一段的代码是点击上传图片的函数,可以验证图片信息和展示上传的图片,是在网上找的两端代码拼接的,改改就能用了.functionPreviewImage(imgFile){varfilextension=imgFile.value.
substring
梦幻般的菜鸟
·
2020-09-12 23:41
ajax实现图片上传
}//图片预览functionpreviewImg(imgFile){console.log(imgFile);//这里打印出是整个input标签varextension=imgFile.value.
substring
夜雨寄北-
·
2020-09-12 23:45
快速生成10位时间戳,不喜勿喷,有更好更快的方法,欢迎指教!
LongnewTime=System.currentTimeMillis();Stringtime=newTime.toString().
substring
(0,10);
糖糖侄女
·
2020-09-12 23:10
时间戳
MultipartFile转换成File
iterator.next().toString());//获取文件名StringfileName=file.getOriginalFilename();//获取文件后缀Stringprefix=fileName.
substring
qq_25340713
·
2020-09-12 22:36
leetcode每日一题-无重复的最长子串(双指针)
官方题解代码classSolution{public:intlengthOfLongest
Substring
(strings){intN=s.length();unordered_setocc;intrk
ChasingTheFreeWind
·
2020-09-12 22:23
leetcode
每日一题
滑动窗口处理字符串
问题描述:Givenastring,findthelengthofthelongest
substring
withoutrepeatingcharacters.Examples:Given"abcabcbb
鹰立如睡
·
2020-09-12 22:18
算法and数据结构
3. 无重复字符的最长子串 (滑动窗口思想)
classSolution:deflengthOfLongest
Substring
(self,s):
litchi666
·
2020-09-12 22:09
LeetCode
LeetCode刷题Medium篇寻找字符串中最长的不重复子串(滑动窗口解法)
题目Givenastring,findthelengthofthelongest
substring
withoutrepeatingcharacters.Example1:Input:"abcabcbb"Output
hanruikai
·
2020-09-12 22:19
面试题
java常见知识
java 获取文件扩展名
;if(i>-1&&i
substring(0,i);//--文件名extention=fileName.su
yixiaotian1988
·
2020-09-12 21:33
文件处理
双指针--无重复最长子串
传送门:无重复最长子串题面分析AC代码classSolution{public:intlengthOfLongest
Substring
(strings){unordered_maphash;intres
weixin_43509985
·
2020-09-12 21:20
【20190320】【每天一道算法题】无重复字符的最长子串(双指针)
解释及代码:/*滑窗的方式*/#include#include#includeintlengthOfLongest
Substring
(char*s);voidmai
Satisfying
·
2020-09-12 21:43
每天一道算法题
(LeetCode 3&11&15&18&76)滑动窗口(双指针)
题目描述:classSolution:deflengthOfLongest
Substring
(self,s:str)->int:ifnots:return0left=0lookup=set()max_len
Gavin_ggl
·
2020-09-12 21:43
LeetCode
java字符判断并用 * 替换文字
if(nickName.matches("[0-9]+")){//判断是否为数字StringnickNames=nickName.replaceFirst(nickName.
substring
(3),"
偉Z
·
2020-09-12 21:42
无重复字符的最长子串(滑动窗口+双指针)
classSolution{public://滑动窗口法+双指针intlengthOfLongest
Substring
(strings){if(s.size()==0)return0;intleft=0
ShenHang_
·
2020-09-12 21:35
日期格式不足10补0
publicstaticStringfillDateWillZero(StringdateStr){intstart=dateStr.indexOf("-");intend=dateStr.lastIndexOf("-");Stringmonth=dateStr.
substring
礞石
·
2020-09-12 21:04
实用代码
longest-valid-parentheses
Givenastringcontainingjustthecharacters’(‘and’)’,findthelengthofthelongestvalid(well-formed)parentheses
substring
.For
想吃锅包肉哇
·
2020-09-12 20:06
Leetcode
location.href当前页面传参例子
);2.获取参数方法//获取上一页面传递的参数(location.href)functionrequest(paras){varurl=location.href;varparaString=url.
substring
淘淘2019
·
2020-09-12 20:31
jquery
LeetCode 之 Longest Valid Parentheses(栈)
Givenastringcontainingjustthecharacters'('and')',findthelengthofthelongestvalid(well-formed)parentheses
substring
.For
稚枭天卓
·
2020-09-12 20:36
MyLeetCode_Go
CodeForces - 558E.A Simple Task字符串区间排序(计数排序+26棵线段树的维护)
524288kBThistaskisverysimple.GivenastringSoflengthnandqquerieseachqueryisontheformatijkwhichmeanssortthe
substring
consistin
lonely_wind_
·
2020-09-12 20:43
#
线段树&树状数组
字符串的处理
线段树
计数排序
我的139道MySQL题
括号里面的人的信息查询员工表中年龄字段为(或者不为)null的员工信息查询员工工资从高到低(倒序)排序显示:正序、倒序字符串长度:length拼接字符串:concat小写转大写:upper大写转小写:lower截位:
substring
12
qq_40640737
·
2020-09-12 20:39
编程学习笔记
mysql
从服务器下载文件学习笔记
StringfilePath=fileUrl;try{FileInputStreamfis=newFileInputStream(fileUrl);//取绝对路径的最后"/"之后的strfileName=fileUrl.
substring
echoZip
·
2020-09-12 20:22
数据集文件上传支持下载
Longest Valid Parentheses(动态规划)
Givenastringcontainingjustthecharacters‘(’and‘)’,findthelengthofthelongestvalid(well-formed)parentheses
substring
.Example1
Vilinzz
·
2020-09-12 20:11
c++
算法
算法
反射 调用 抛出 argument type mismatch错误 的怪异事情
java.lang.IllegalArgumentException:argumenttypemismatch错误,出错代码如下:sName=fields2[i].getName();Methodm=ci.getDeclaredMethod("set"+sName.
substring
nishijia
·
2020-09-12 19:33
JAVA
LeetCode 647 : Palindromic
Substring
s(java)
原题Givenastring,yourtaskistocounthowmanypalindromic
substring
sinthisstring.The
substring
swithdifferentstartindexesorendindexesarecountedasdifferent
substring
seventheyconsistofsamecharacters.Example1
marlonlyh
·
2020-09-12 19:53
leetcode
java
LeetCode --- 32. Longest Valid Parentheses
LongestValidParenthesesGivenastringcontainingjustthecharacters'('and')',findthelengthofthelongestvalid(well-formed)parentheses
substring
.For
makuiyu
·
2020-09-12 19:21
LeetCode
C++
LeetCode 32. Longest Valid Parentheses(最长有效括号,C++)
Givenastringcontainingjustthecharacters‘(’and‘)’,findthelengthofthelongestvalid(well-formed)parentheses
substring
.Example1
重学CS
·
2020-09-12 19:21
Leetcode
bootstrap table 修改或删除时停留在当前页:refresh
myTabli.active");//获取激活的参数vardatePeriod=$("#myTabli.active").index();vartab_id=active.find("a").attr("href").
substring
Lune2018
·
2020-09-12 18:43
前端
上一页
56
57
58
59
60
61
62
63
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他