码迷,mamicode.com
首页 >  
搜索关键字:valueerror substring    ( 4073个结果
[Python]网络爬虫(三):异常的处理和HTTP状态码的分类(转)
先来说一说HTTP的异常处理问题。当urlopen不能够处理一个response时,产生urlError。不过通常的Python APIs异常如ValueError,TypeError等也会同时产生。HTTPError是urlError的子类,通常在特定HTTP URLs中产生。1.URLError...
分类:编程语言   时间:2014-05-26 23:17:09    阅读次数:341
leetcode:Longest Palindromic Substring
Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longes...
分类:其他好文   时间:2014-05-24 04:45:39    阅读次数:245
LeetCode:Longest Substring Without Repeating Characters(最长不重复子串)
题目链接Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letter...
分类:其他好文   时间:2014-05-24 02:15:57    阅读次数:291
JavaScript 获取小数任一小数点后的位数的小数
用Javascript取float型小数点后两位,例22.127456取成22.13,如何做? 1.这种方法最不推荐: function get(){ var s = 22.127456 + ""; var str = s.substring(0,s.indexOf(".") + 3); alert(str); } 2. 使用正则表达式获取: function g...
分类:编程语言   时间:2014-05-23 08:06:59    阅读次数:249
【转】C#中如何实现左截取和右截取字符串
使用C#语法编写程序时,我们需要截取一个字符串左边或右边的若干个字符,该如何操作呢?在VB中可以使用left或right函数实现,C#中没有提供这样的函数呢?答案是没有。但是,C#中提供Substring方法可以实现相关功能。首先我们回顾一下Substring方法。用法一: String.Subst...
分类:其他好文   时间:2014-05-22 04:57:09    阅读次数:238
在js中substring和substr区别
substring 方法用于提取字符串中介于两个指定下标之间的字符substring(start,end)开始和结束的位置,从零开始的索引参数 描述start 必需。一个非负的整数,规定要提取的子串的第一个字符在 stringObject 中的位置。stop 可选。一个非负的整数,比要提取的子...
分类:Web程序   时间:2014-05-22 04:55:54    阅读次数:264
winform学习日志(三十)----------从字符串总分离文件路径、命名、扩展名,Substring(),LastIndexOf()的使用;替换某一类字符串,Replace()的用法
一:从字符串总分离文件路径、命名、扩展名,上图二:代码using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using Syst...
分类:Windows程序   时间:2014-05-22 04:47:24    阅读次数:382
Bash String Manipulation Examples – Length, Substring, Find and Replace--reference
In bash shell, when you use a dollar sign followed by a variable name, shell expands the variable with its value. This feature of shell is called para...
分类:其他好文   时间:2014-05-21 18:32:32    阅读次数:332
LeetCode: Longest Valid Parentheses [031]
【题目】 Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring. For "(()", the longest valid parentheses substring is "()", which has length = 2. Another example is ")()())", whe...
分类:其他好文   时间:2014-05-20 16:39:07    阅读次数:280
crm2011 使用SOAP 查询单个记录 Retrieve
function getServiceUrl() { var serverUrl = Xrm.Page.context.getServerUrl(); if (serverUrl.match(/\/$/)) { serverUrl = serverUrl.substring(0, server...
分类:其他好文   时间:2014-05-20 07:40:00    阅读次数:250
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!