기본 콘텐츠로 건너뛰기

node install and use node ver manager in window 10

 if you want to install n under windows 32bit, it returns errors. so the common option is installing nvm. setp1. install node visit  https://nodejs.org/en download node step 2. install nvm https://github.com/coreybutler/nvm-windows/releases/download/1.1.11/nvm-setup.exe step 3. install node version nvm list nvm install 14.15.0 nvm use 14.15.0

spring rest api input validator

 spring api  https://spring.io/guides/tutorials/rest/ https://www.baeldung.com/spring-boot-bean-validation Test Code @Test public void whenPostRequestToUsersAndValidUser_thenCorrectResponse () throws Exception { MediaType textPlainUtf8 = new MediaType (MediaType.TEXT_PLAIN, Charset.forName( "UTF-8" )); String user = "{\"name\": \"bob\", \"email\" : \"bob@domain.com\"}" ; mockMvc.perform(MockMvcRequestBuilders.post( "/users" ) .content(user) .contentType(MediaType.APPLICATION_JSON_UTF8)) .andExpect(MockMvcResultMatchers.status().isOk()) .andExpect(MockMvcResultMatchers.content() .contentType(textPlainUtf8)); } @Test public void whenPostRequestToUsersAndInValidUser_thenCorrectResponse () throws Exception { String user = "{\"name\": \"\", \"email\" : \"bob@domain.com\"}" ; mockMvc.perform(MockMvcReq...

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