변수도 데이터 타입이 있고, 상수도 데이터 타입이 있다. 여러분이 어떤 실수를 쓰려고 하면, 기본적으로 double을 쓰고, 만약 float를 쓰고 싶다면 F를 붙여주면 된다. (주의!, 아래 예제들은 좌항과 우항의 데이터 타입이 일치하기 때문에 명시적 형변환도 묵시적 형변환도 아니다. F라는 문자를 붙여주어서, 2.2F가 float 타입이라고 명시해주어서 데이터 타입을 서로 맞춰주었다. 🔍 F를 붙인 이유는? 이유: 2.2가 사실은 정확히 2.2가 아니고, 이진법으로 변환했을때 무한소수로 끝없이 이어지는데, 그 무한소수가 float 유효범위안에 들어오지 않기 때문에, 원래 상수 2.2의 데이터 타입은 double이다. 하지만 의도적으로 float 데이터 타입을 상수 2.2에 쓰고 싶어서 F를 붙여서 좌..
https://colorhunt.co/ Color Palettes for Designers and Artists - Color Hunt Discover the newest hand-picked color palettes of Color Hunt. Get color inspiration for your design and art projects. colorhunt.co https://fonts.google.com/specimen/Permanent+Marker Permanent Marker - Google Fonts Permanent Marker represents the look and feel of a favorite writing instrument. fonts.google.com https://dri..
변수란? RAM에 데이터를 저장하기 위해 할당받은 메모리 공간 우리는 이 데이터 타입을 명시하면서, 컴퓨터에게 어떻게 데이터를 저장하고 처리할 지 암시해준다 이 데이터 타입은 크게 기본형과 참조형으로 나뉜다. (1) 기본형(primitive type) : 실제값을 저장한다. 모든 값 타입은 스택(stack)에 저장된다 비객체 타입이므로 null 값을 가질 수 없다 (기본값이 정해져 있음) 기본형 타입 정수형 byte short int long 실수형 float double 논리형 boolean 문자형 char 메모리의 크기 8bit(비트) 1byte 1024byte 1kilobyte 1024kilobyte 1megabyte 1024megabyte 1gigabyte 1024 gigabyte 1terabyt..
package chap_04; public class _08_NestedLoop { public static void main(String[] args) { //이중 반복문 // 별 (*) 사각형 만들기 /* ***** ***** ***** ***** ***** */ for (int i = 0; i < 5; i++) { //0~4회까지 for (int j = 0; j
거의 한달동안의 메인프로젝트가 끝이났다. 프리플젝과 다르게 분야선택, 기획, 개발까지 모두 우리 손으로 해야했기때문에 시간이 많이 걸렸지만 그만큼 값진 시간이었다. 다음은 우리 '제 10금융' 팀의 '머니메이드'라는 서비스이다. 머니메이드는 사용자가 편리하게 자산을 조회하고, 소비를 관리할 수 있는 금융 서비스입니다. 어려운 금융 관리를 레몬에이드 같이 시원하게 해결해주고자 서비스 이름을 ‘머니메이드'로 지었다 ㅋㅋ 깃 허브 https://github.com/codestates-seb/seb44_main_010 GitHub - codestates-seb/seb44_main_010 Contribute to codestates-seb/seb44_main_010 development by creating an..
console.log(combinedData); 찍으니 이제 date별로 data가 나오게 되었다. 하지만 각자 속성이 다른 계좌 데이터와 현금 데이터... 리턴문으로 렌더링할때 조금 신경을 써줘야 했다 export default function MonthConsumptionDetail({ combinedData, }: { combinedData: CombinedData[]; }) { const detailBoxRef = useRef(null); useEffect(() => { if (detailBoxRef.current) { const itemCount = combinedData?.reduce( (height, group) => height + group.data.length, 0 ) || 0; con..
export default function MonthConsumptionContainer({ years, month, setYears, setMonth, monthSumData, groupedData, cashGroupedData, }: { years: number; month: number; setYears: Dispatch; setMonth: Dispatch; monthSumData: MonthSumData | Record; groupedData: GroupedData[]; cashGroupedData: CashGroupedData[]; }) { //6월 데이터와 7월 데이터를 나눠서, 6월 박스의 높이만 커지게 하지 않게 합니다 const monthData = groupedData.filter( (..
기존 useEffect(() => { const setBoxHeight = () => { if (detailBoxRef.current) { const itemHeight = 4.5; const itemCount = groupedData.reduce((count, group) => count + group.data.length, 0); const calculatedHeight = itemHeight * itemCount + 3 * itemCount; detailBoxRef.current.style.height = `${calculatedHeight}vh`; } }; setBoxHeight(); }, [groupedData, detailBoxRef]); 수정후 useEffect(() => { if (deta..