这个呢,是我在写一个爬虫时遇到的问题,关于问题的描述是这样的,我有一个字符串,想得到其中的一段,即截取其中的一部分所用,方法如下: 使用substring(start,stop)方法,在W3中对于这个函数的解释链接:https://www.w3school.com.cn/js/jsref_subst ...
分类:
其他好文 时间:
2020-01-18 16:26:48
阅读次数:
71
Given a string, find the length of the longest substring without repeating characters. Example 1: Input: "abcabcbb" Output: 3 Explanation: The answer ...
分类:
其他好文 时间:
2020-01-17 15:08:09
阅读次数:
93
SerialPort sp1 = new SerialPort(); getBloodPressur(); public void getBloodPressur() { try { string[] str = SerialPort.GetPortNames(); if (str == null) ...
分类:
其他好文 时间:
2020-01-17 13:42:36
阅读次数:
105
private void btnSave_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(txt_FilePath.Text) || txt_FilePath.Text.Trim().Substring(txt_FilePat ...
分类:
其他好文 时间:
2020-01-17 11:51:00
阅读次数:
64
截取字符串,在java语言中的用法 1、 public String substring(int beginIndex) 返回一个新字符串,它是此字符串的一个子字符串。该子字符串始于指定索引处的字符,一直到此字符串末尾。 参数:beginIndex - 开始处的索引(包括), 返回:指定的子字符串, ...
分类:
其他好文 时间:
2020-01-16 00:40:59
阅读次数:
124
来源 https://leetcode cn.com/problems/longest substring without repeating characters/ 题目描述 给定一个字符串,请你找出其中不含有重复字符的?最长子串?的长度。 示例?1: 输入: "abcabcbb" 输出: 3 解 ...
分类:
编程语言 时间:
2020-01-15 19:47:02
阅读次数:
82
最长的回文子串。题意是给一个字符串,请输出其中最长的回文子串。例子 Example 1: Input: "babad" Output: "bab" Note: "aba" is also a valid answer. Example 2: Input: "cbbd" Output: "bb" 这个 ...
分类:
其他好文 时间:
2020-01-15 09:23:40
阅读次数:
66
在执行python脚本时,正常运行的时候,也可能发生错误,返回的错误类型就是报错信息,我们可以针对其返回的错误类型执行相应的语句,错误类型有很多,如:ValueError、TypeError、NameError、ZeroDivisionError.....1、try/except来个简单的语法,如下:whileTrue:try:x=int(input(‘请输入一个数字:‘))breakexcept
分类:
编程语言 时间:
2020-01-14 19:02:51
阅读次数:
91
说明 适用场景:应用系统根据角色实现菜单权限管控 技术点:mysql.help_topic;substring_index() ? 表结构 user 用户表 role 角色表 menu菜单表 SQL实现 SELECT u.u_name, r.r_name, m.m_title FROM user u ...
分类:
数据库 时间:
2020-01-14 12:49:27
阅读次数:
569
最长无重复字符的子串。 题意是给一个input字符串,请输出其最长的,没有重复字符的substring。这是two pointer/sliding window的基础题。例子 Example 1: Input: "abcabcbb" Output: 3 Explanation: The answer ...
分类:
其他好文 时间:
2020-01-14 09:18:01
阅读次数:
72