.NET using System; using System.Web.Script.Serialization; namespace JsonDeserializationExample { class Program { static void Main(string[] args) { decimal volumeWidth; string volumeInfo = "{\"width\": 10, \"length\": 10, \"height\": 10}"; System.Web.Script.Serialization.JavaScriptSerializer serializer = new System.Web.Script.Serialization.JavaScriptSerializer(); var volumeJson = serializer.Deser..
Promise는 자바스크립트에서 비동기 작업을 처리하기 위한 객체입니다. 비동기 작업은 결과가 언제 도착할지 확신할 수 없는 작업을 의미하며, 예를 들어 서버에서 데이터를 가져오거나 파일을 읽는 작업 등이 해당됩니다. Promise는 이런 비동기 작업을 더 효율적으로 처리하고 결과를 다루기 위한 패턴을 제공합니다. // Promise를 사용하여 비동기적으로 숫자를 제곱하는 함수 function squareNumberAsync(number) { return new Promise((resolve, reject) => { if (typeof number !== 'number') { reject('Input is not a number'); // 오류 처리 } else { setTimeout(() => { co..
JSON은 "JavaScript Object Notation"의 약자로, 데이터 교환을 위해 사용되는 경량의 데이터 형식입니다. JSON.stringify(value[, replacer[, space]]) const person = { name: "John", age: 30, city: "New York" }; const jsonString = JSON.stringify(person); console.log(jsonString); {"name":"John","age":30,"city":"New York"} // replacer 옵션과 space 옵션 사용 예제 const person = { name: "John", age: 30, city: "New York", sensitiveInfo: "This sh..
콜백 함수(call back func) // 매개 변수가 있는 사용자 정의 콜백 함수 예제 // 숫자 배열을 입력으로 받아 각 요소를 변환하는 함수 function transformArray(arr, callback) { const transformedArray = arr.map(callback); return transformedArray; } // 사용자 정의 콜백 함수 function squareNumber(num) { return num * num; } function addOne(num) { return num + 1; } // 숫자 배열 const numbers = [1, 2, 3, 4, 5]; // squareNumber 함수를 사용하여 숫자 배열의 각 요소 제곱 const squaredNu..
// 빈 객체 배열 생성 const peopleArray = []; // 객체 추가 peopleArray.push({ name: 'Alice', age: 30, occupation: 'Engineer' }); peopleArray.push({ name: 'Bob', age: 25, occupation: 'Designer' }); peopleArray.push({ name: 'Charlie', age: 40, occupation: 'Manager' }); console.log(peopleArray);
DECLARE @param1 INT, @param2 VARCHAR(50); -- 저장 프로시저에 전달할 매개변수 선언 DECLARE myCursor CURSOR FOR SELECT column1, column2, ... FROM your_table WHERE your_condition; OPEN myCursor; FETCH NEXT FROM myCursor INTO @param1, @param2; WHILE @@FETCH_STATUS = 0 BEGIN -- 저장 프로시저 호출 EXEC YourStoredProcedure @param1, @param2; FETCH NEXT FROM myCursor INTO @param1, @param2; END CLOSE myCursor; DEALLOCATE myCursor;
숫자 배열 정렬 예시: let arr = [3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5]; arr.sort((a, b) => a - b); // 오름차순 정렬 console.log(arr); arr.sort((a, b) => b - a); // 내림차순 정렬 console.log(arr); 문자열 배열 정렬 예시: let arr = ["banana", "apple", "orange", "grape"]; arr.sort(); // 알파벳 순서로 정렬 (기본적으로 오름차순) console.log(arr); arr.sort((a, b) => b.localeCompare(a)); // 알파벳 역순으로 정렬 (내림차순) console.log(arr); 사용자 정의 객체 배열 정렬 예시: (숫자) //..
- Total
- Today
- Yesterday
- system.io
- 공백제거
- mssql
- 진수 변환
- 특정 문자를 기준으로 자르기
- App Store
- hyper-v
- 앱 스토어
- async
- System.Diagnostics
- .submit()
- In App Purchase
- await
- nl2br
- 명령어
- html tag
- 문자 자르기
- Task
- 상품 등록
- trim
- 제품 등록
- MainActor
- 아이폰
- FileUpload
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 |