发表了博客
2011/07/01 13:31

[iPhone] 去除nsstring中的空格

去除 username中的空格,table newline,nextline 代码如下:(三行代码) NSCharacterSet *whitespace = [NSCharacterSet whitespaceAndNewlineCharacterSet]; NSString * username = [mUsernameField stringValue]; username = [username stringByTrimmingCharactersInSet:whitespace]; 注释: stringByTrimmingCharactersInSet: Returns a new string made by removing from both ends of the receiver characters contained...

0
2
发表了博客
2019/03/17 15:40

Oracle udev 绑定磁盘(转)

scsi_id命令发出一个SCSI INQUIRY指令给设备,访问vital product data (VPD)页0x83的数据,那里包含设备的WWID和其他的信息,或者页0x80的数据,那里包含单元序列号(unit serial number)。 scsi_id命令的执行结果(一长串字符)是设备的WWID,当前映射到/dev/sdc(/sys/block/sdc)。每一条到设备的路径和设备上的每一个分区的WWID都是相同的。设备的WWID不会改变,即使将其他的设备添加到系统或者从系统中删除。但是,映射到...

0
0
2015/08/04 15:47

Java代码检查工具Checkstyle常见输出结果

1.Type is missing a javadoc commentClass 缺少类型说明 2.“{” should be on the previous line “{” 应该位于前一行 3.Methods is missing a javadoc comment 方法前面缺少javadoc注释 4.Expected @throws tag for “Exception” 在注释中希望有@throws 的说明 5.“.” Is preceeded with whitespace “.” 前面不能有空格 6.“.” Is followed by whitespace“.” 后面不能有空格 7.“=” is not preceeded with ...

0
0
发表于开发技能专区
2015/03/09 14:20

Apache Nutch源码工程在Linux和Windows平台换行符差异问题处理

最近在提交发布个人开源项目:[https://github.com/xautlx/nutch-ajax][1] (基于Apache Nutch 2.3和Htmlunit, Selenium WebDriver等组件扩展,实现对于AJAX加载类型页面的完整页面内容抓取,以及特定数据项的解析和索引)时遇到一个问题: 开源项目提交时为了便于跟踪变更记录,首先GIT初始化提交了从Apache下载获取的Apache Nutch 2.3源码,然后在此基础上添加扩展插件代码准备提交时在资源库同步视图显示所有代码都需要更新,...

0
0
发表于开发技能专区
2021/01/03 14:37

LeetCode - Medium - 8. String to Integer

## Topic - Math - String ## Description [https://leetcode.com/problems/string-to-integer-atoi/](https://leetcode.com/problems/string-to-integer-atoi/) Implement atoi which converts a string to an integer. The function first discards as many whitespace characters as necessary until the first non-whitespace character is found. Then, starting from this character takes an optional initial plus or m...

0
0
发表了博客
2018/03/02 14:29

[LeetCode] 8. String to Integer (atoi) 字符串转为整数

Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible input cases. Notes: It is intended for this problem to be specified vaguely (ie, no given input specs). You are responsible to gather all the input requirements up front. Update (2015-02-10): The signature of...

0
0
发表了博客
2017/11/07 21:47

leetcode -- String to Integer (atoi)

[String to Integer (atoi)](https://leetcode.com/problems/string-to-integer-atoi/description/) ## Description Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible input cases. Notes: It is intended for this problem to be specified vaguely (ie, no given input spe...

0
0
发表了博客
2015/06/24 00:03

leetcode 8 String to Integer (atoi)

String to Integer (atoi)Total Accepted:52232 Total Submissions:401038 My Submissions Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible input cases. Notes: It is intended for this problem to be specified vaguely (ie, no given input specs). You are responsible...

0
0
发表了博客
2013/03/19 16:16

Perl Tip

perl one line iconv perl -mEncode -npe 'Encode::from_to($_, "utf-8", "gbk")' perl -mEncode -npe '$_=Encode::encode("gbk", Encode::decode("utf-8", $_))' ------------------------------------------------------------------------------ use Encode; $_="abc你好wert"; $a=decode('cp936',$_); ($x)=($a=~m/(\p{Han}+)/); print encode('cp936',$x),"\n"; 匹配所有非汉字:\P{Han} 匹配所有汉字: \p{Han} The Perl...

0
0
发表了博客
2014/01/10 12:05

Eclipse插件checkstyle安装使用

方法一: 1.Eclipse中,选择Help->Software Updates->Find and Install 2.选择 Search for new features to install 选择Next 3.选择 New Remote Site 4.输入更新地址 http://eclipse-cs.sourceforge.net/update 5. 安装后重启即可 方法二: 1.下载eclipse插件 http://sourceforge.net/projects/eclipse-cs/ 下载后,把里面的两个文件夹plugins和 features下面的文件分别拷贝到eclipse目录下面对应的plugins和features目录 2.如...

0
1
发表了博客
2015/04/03 14:40

【Leetcode】String to Integer (atoi) Python

Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible input cases. Notes: It is intended for this problem to be specified vaguely (ie, no given input specs). You are responsible to gather all the input requirements up front. Requirements for atoi: The function f...

0
0
发表了博客
2018/07/19 16:19

Oracle SQL Loader

1 C:/Documents and Settings/WWJD>sqlldr 2 SQL*Loader: Release 10.2.0.1.0 - Production on 星期四 7月 2 18:54:06 2010 3 Copyright (c) 1982, 2005, Oracle. All rights reserved. 4 用法: SQLLDR keyword=value [,keyword=value,...] 5 有效的关键字: 6 userid -- ORACLE 用户名/口令 7 control -- 控制文件名 8 log -- 日志文件名 9 ...

0
0
2014/05/21 22:44

在RHEL6上用UDEV配置ASM

在RHEL6.上用UDEV配置ASM,参考了这篇文章 How to use udev for Oracle ASM in Oracle Linux 6 不同的操作系统或者同一个操作系统的不同版本,scsi_id的用法不一样。我这里的环境主要是RHEL6.0 步骤如下: 1. 编辑/etc/scsi_id.config文件,如果该文件不存在,则创建该文件,添加如下行: [root@rac1 ~]# vi /etc/scsi_id.config options=–whitelisted –replace-whitespace 2. 获取需要绑定为ASM Disk的磁盘uuid,比如我们要使...

0
0
发表于软件架构专区
2019/06/02 18:01

TSLint 规则总结

1. [**no-var-keyword**](https://palantir.github.io/tslint/rules/no-var-keyword/) 规定`var`的使用。规定不能使用`var`,只能使用`let`或者`const`。 ``` "no-var-keyword": true ``` 2. [**class-name**](https://palantir.github.io/tslint/rules/class-name/) 规定类和借口命名格式。当`true`,规定**类**和**接口**要以大驼峰格式命名。 ``` "class-name": true ``` 3. [**comment-format**](https://palantir.github.i...

0
1
没有更多内容
加载失败,请刷新页面
点击加载更多
加载中
下一页