Eclipse 환경설정 한글사용하기http://deviantcj.tistory.com/501 페이지 참고 C 개발환경 구축을 위한 eclipse 환경설정 sudo apt-get install eclipse eclipse-cdt glib 사용하기pkg-config plugin 설치 http://marketplace.eclipse.org/content/pkg-config-support-eclipse-cdt help > install new software... > work with : http://petrituononen.com/pkg-config-support-for-eclipse-cdt/updatepkg-config 설치 후 eclipse 재시작 > Project 생성 > Project 우클릭 > Properties > C/C.. 더보기 10. Unit Test import unittest 클래스 생성 시 unittest.TestCase 상속받아 클래스 정의 #-*- coding:ms949 -*-import unittest class MyMath: @staticmethod def mySum(n): nSum = 0 for n in range(1,n+1): nSum += n return nSum @staticmethod def hap(a,b): return a+b class MyMathUnitTest(unittest.TestCase): def setUp(self): #unit test 시작 시 호출됨 print("start unit Test") def tearDown(self): #unit test 종료 시 호출됨 print("end unit Test") def t.. 더보기 09. 문자열 Strng 관련 함수 #-*- coding:ms949 -*-s = 'i like Programming'print(s.upper()) #대문자로print(s.lower()) #소문자로print(s.capitalize()) #첫글자만 대문자print(s.swapcase()) #대소문자변경print(s.title()) #단어의 첫글자만 대문자로print(s.center(40)) #길이 40에서 가운데 정렬하여 반환print(s.isdigit()) #숫자인가print(s.isalpha()) #문자인가print(s.isalnum()) #숫자+문자인가 s1 = 'i like Programming like python'print(s1.count('like')) #like 가 나온 횟수: 2 / 못찾는 경우 -1 리턴.. 더보기 이전 1 ··· 4 5 6 7 8 9 10 ··· 13 다음