ex) int -> string 형변환
string s = "test";
1) Convert.ToString(s.Length);
2) s.Length.ToString();
ex) string -> int 형변환
int i = 7;
convert.ToInt32(i);
[출처] C# 형변환 : int를 string으로, string을 int로|작성자 메모리얼
'STUDY' 카테고리의 다른 글
C# 형변환 : int를 string으로, string을 int로 (0) | 2014.01.25 |
---|---|
파이썬 코드 조각모음 (0) | 2013.12.07 |
[PHP] Json encode/decode (0) | 2013.08.19 |
sublime TEXT2 - sftp 설정 (0) | 2013.08.13 |
Upload File To Server - Android Example (0) | 2013.08.10 |
[Android] 안드로이드 개발 환경 구축 (1) | 2013.08.05 |
list.append(x)
Add an item to the end of the list; equivalent to a[len(a):] = [x].
list.extend(L)
Extend the list by appending all the items in the given list; equivalent to a[len(a):] = L.
list.insert(i, x)
Insert an item at a given position. The first argument is the index of the element before which to insert, so a.insert(0, x) inserts at the front of the list, and a.insert(len(a), x) is equivalent to a.append(x).
list.remove(x)
Remove the first item from the list whose value is x. It is an error if there is no such item.
list.pop([i])
Remove the item at the given position in the list, and return it. If no index is specified, a.pop() removes and returns the last item in the list. (The square brackets around the i in the method signature denote that the parameter is optional, not that you should type square brackets at that position. You will see this notation frequently in the Python Library Reference.)
list.index(x)
Return the index in the list of the first item whose value is x. It is an error if there is no such item.
list.count(x)
Return the number of times x appears in the list.
list.sort()
Sort the items of the list, in place.
list.reverse()
Reverse the elements of the list, in place.
>>> a = [66.25, 333, 333, 1, 1234.5]
>>> print a.count(333), a.count(66.25), a.count('x')
2 1 0
>>> a.insert(2, -1)
>>> a.append(333)
>>> a
[66.25, 333, -1, 333, 1, 1234.5, 333]
>>> a.index(333)
1
>>> a.remove(333)
>>> a
[66.25, -1, 333, 1, 1234.5, 333]
>>> a.reverse()
>>> a
[333, 1234.5, 1, 333, -1, 66.25]
>>> a.sort()
>>> a
[-1, 1, 66.25, 333, 333, 1234.5]
'STUDY > Python' 카테고리의 다른 글
[python] List method (0) | 2014.01.12 |
---|---|
[Python] 자신의 아이피 찾는 방법 (0) | 2014.01.05 |
[Python] 파일로 작성한 프로그램 안의 한글(주석)이 오류를 일으키는 경우 (0) | 2014.01.05 |
find /path -name "*.php" | xargs grep pattern
예를 들면 아래와 같이 하면 된다.
$ find ./ -name "*.php" | xargs grep "lang->cmd_modify = '수정'"
./common/lang/ko.lang.php: $lang->cmd_modify = '수정';
$ find ./ -name "*.php" | xargs grep "수정"
./common/lang/ko.lang.php: $lang->cmd_modify = '수정';
ko.lang.php 파일에 "수정"이라는 단어가 포함 되어 있다.
[출처] 리눅스 find 명령어로 파일 내용 검색 하기|작성자 지구촌아이
'STUDY > Linux' 카테고리의 다른 글
커널 소스 트리 (0) | 2014.03.27 |
---|---|
커널 소스 분석에 도움을 주는 도구들 (0) | 2014.03.27 |
리눅스 find 명령어로 파일 내용 검색 하기 (0) | 2014.01.12 |
[Linux] 실행파일 백그라운드로 실행하기. (0) | 2013.12.20 |
Centos splint 설치 (0) | 2013.06.06 |
rdesktop 명령어 [윈도우 사용하기] (0) | 2013.05.19 |