기본 콘텐츠로 건너뛰기

split file and insert a text at the beginning of a file

 I have a text file. the first line constans of the titles. and i have an one large file which has over 70,000 lines. and some of the line, has a test cases. to test programs in a big file, it took over 10minutes. $cat file.csv "title"||"title2"||"title3" "data"||"data2"||"data3" ...... $wc -l file.csv  77488 file.csv #split it by lines $split -l 10,000 file.csv myfile $ls myfile* myfileaa myfileab myfileac myfilead myfileae myfileaf myfileag myfileah $cat myfileaa > myfile_01 $head -1 myfileaa | cat - myfileab > myfile_02 $head -1 myfileaa | cat - myfileac > myfile_03 $head -1 myfileaa | cat - myfilead > myfile_04 $head -1 myfileaa | cat - myfileae > myfile_05 $head -1 myfileaa | cat - myfileaf > myfile_06 $head -1 myfileaa | cat - myfileag > myfile_07

원리금 균등 상환 공식

function halbu_same($src,$rate,$period) {         //인풋부분 : src(원금), rate(이율-소수점단위), period(기간-개월수)         $s_rate = 1 + ( $rate / 12 );//원금증가율         $o_money = $src * ( 1 - $s_rate) / ( 1 - pow($s_rate,$period));//초회원금         $r_money = $src * $rate / 12;//초회이자         return ceil($o_money + $r_money);//월상환금액(원리금균등분할상환)         //소수점 자리 처리 => ceil(올림), round(반올림), floor(절사) 캐피탈사마다 다름 }  // 예제 : 500만원을 7.5%의 이율로 24개월 대출 받았을 때 월상환금액 구하기 $money = halbu_same( 5000000, 0.075, 24 ); print $money; //224,998원

3gb minning

비트코인 골드 -- 마이너 다운로드 :  https://www.bminercontent.com/releases/bminer-v6.0.0-d111154-amd64.zip -- vcruntime140.dll 다운로드  https://www.microsoft.com/en-us/download/details.aspx?id=52685 -- 실행배치 : bminer.exe -uri stratum:// 계정 . 워커 @ asia.equihash-hub.miningpoolhub.com:20595    -nofee pause

Gson iterate jsonobject

https://stackoverflow.com/questions/31094305/java-gson-getting-the-list-of-all-keys-under-a-jsonobject As of Gson 2.8.1 you can use  keySet() : String json = "{\"key1\":\"val\", \"key2\":\"val\"}" ; JsonParser parser = new JsonParser (); JsonObject jsonObject = parser . parse ( json ). getAsJsonObject (); Set < String > keys = jsonObject . keySet (); Since Java 8 you can use Streams as better looking alternative: String str = "{\"key1\":\"val1\", \"key2\":\"val2\"}" ; JsonParser parser = new JsonParser (); JsonObject jObj = ( JsonObject ) parser . parse ( str ); List < String > keys = jObj . entrySet () . stream () . map ( i -> i . getKey ()) . collect ( Collectors . toCollection ( ArrayList :: new )); keys . forEach ( System . out :: println ); You can use JsonParser to convert your Json into an intermedi...

파이썬을 이용한 크롤링 한경 구축 python easy_install pip Selenium

참고 : https://beomi.github.io/2017/02/27/HowToMakeWebCrawler-With-Selenium/ 파이썬에 대한 기초 지식이 있는 분은 위 링크로 가능 하지만 , 생초짜인 나를 위해 하나씩 작성 함 1.윈도우 파이썬 설치 환경 : 윈도우 10 https://www.python.org/downloads/ 에서 최신 버전을 다운 받자. 2017-12-05 일 현재 최신 버전은 3.6.3 이다. 바로 다운 받는 주소는 https://www.python.org/ftp/python/3.6.3/python-3.6.3.exe 이다. all user 와 add to path 체크 해주자. 2. easy_install 설치 https://bootstrap.pypa.io/ez_setup.py 다운로드 윈도우키+R cmd 입력 도스창열고 python ez_setup.py 입력 에러가 난다 . 구글링 키워드 : python ez_setup.py ssl error 3번째 글 Python Error When Installing ez_setup.py "could not create SSL/TLS ... 거의 정확 할 듯해 답변에 보니 --insecure 옵션 붙이라는군 다시 cmd 창에 python ez_setup.py --insecure 실행 훔 또 에러. error: [WinError 5] 액세스가 거부되었습니다: 'C:\\ProgramData\\Anaconda3\\Scripts\\easy_install-script.py' 다운로드까지는 잘 되고, 엑세스 거부라니 ... ㅠㅠ . 다시 구글링 키워드 : error: [WinError 5] 액세스가 거부되었습니다: 'C:\\ProgramData\\Anaconda3\\Scripts\\easy_install...