목록Development Language (157)
SPRING :: NOTE
서식은 %다음에 알파벳 문자 하나로 표기하며 다음과 같은 종류가 있다. 서식의미설명%d 또는 %iDecimal, Integer10진 정수로 출력한다.%oOctal8진 정수로 출력한다.%x 또는 %XheXadecimal16진 정수로 출력한다.대문자 X를 쓰면 A~F까지 숫자도 대문자 출력%uUnsigned부호없는 10진 정수로 출력한다.%cCharacter1개의 문자를 출력한다.%sString문자열을 출력한다.%fFloat고정 소수점 형식의 실수로 출력한다.%e 또는 %E 부동 소수점 형식의 실수로 출력한다.%g 또는 %G %e, %f중 더 짧은 형식으로 출력한다.%pPointer포인터의 번지값을 출력한다.%n 출력된 문자 개수를 포인터 변수에 대입한다.%% %문자 자체를 출력한다. 예제1. #includ..
/* Description : The following class converts XML data into JSON format Author: Dnyanesh Pawar, Copyright: Dnyanesh Pawar (http://www.techrecite.com) Link: http://www.techrecite.com See the GNU General Public License for more details: http://www.creativecommons.org/ */ class XmlToJsonConverter { public function ParseXML ($url) { $fileContents= file_get_contents($url); // Remove tabs, newline, wh..
체크박스의 이미지 변경 ( selector 이용) xml 파일을 새로 만들어준다. ( 본 포스팅에서는 checkbox.xml로 xml파일을 만들어줌 ) 생성해준 xml파일은 drawable 폴더에다 해주었다. 그리고 체크박스를 사용할 xml / layout에 CheckBox 생성 이부분이 중요하다. 만들어준 셀렉터 파일명을 적어준다. android:drawableLeft="@drawable/checkbox"
리스트뷰의 더보기 기능 구현입니다. 추가적으로 커스텀으로 만들었습니다. 소스를 어디서 훔쳐온건지는...기억이 안나... 링크를 못달아둡니다.ㅠ 혹시라도 자료에 문제가 있거나, 삭제를 요청 혹은 출처를 아시는 분은 댓글을 달아주시기 바랍니다. 커스텀 리스트뷰 + footer를 이용한 더보기 구현 (샘플소스 다운로드 및 스크린샷은 소스 하단부에 있습니다.) MainActivity.java package com.example.morelistview; import java.util.ArrayList; import android.app.Activity; import android.app.AlertDialog; import android.content.Context; import android.content.Dia..
#define _CRT_SECURE_NO_DEPRECATE #include "stdio.h" #include "windows.h" #include "stdafx.h" typedef struct SumInfo { int a, b, s; }SUMINFO, *PSUMINFO; void Sum(void* p); void main() { char temp[1024]; printf("sum\n"); DWORD dwThreadld; SUMINFO si = { 1, 100, 0 }; HANDLE h = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)Sum, &si, NULL, &dwThreadld); CloseHandle(h); scanf_s(temp); } void Sum(void..
#define _CRT_SECURE_NO_DEPRECATE #include "windows.h" typedef struct SumInfo { int a, b, s; }SUMINFO, *PSUMINFO; DWORD WINAPI Sum(void* p); HANDLE g_hConsoleOut; void writeString(LPCTSTR lpszFormat, ...) { char str[1024] = { 0 }; va_list argList; DWORD dwNumberOfBytesWritten; va_start(argList, lpszFormat); wvsprintf(str, lpszFormat, argList); va_end(argList); WriteFile(g_hConsoleOut, str, lstrle..
#include #include #include #include typedef struct SumInfo { int a, b, s; }SUMINFO, *PSUMINFO; unsigned _stdcall Sum(void* p); void WriteString(const char* lpszFormat, ...) { char str[1024] = { 0 }; va_list argList; va_start(argList, lpszFormat); vprintf(lpszFormat, argList); // 런타임 함수 va_end(argList); } void main() { char temp[1024]; unsigned dwThreadId; printf("*** 예제 C Runtime Library를 이용한 스레..
16진수 값을 받아와 8bit 2진수로 변환해서 바이너리 파일로 저장해주는 프로그램 /* Libraries */ #include #include #include #pragma warning(disable : 4996) #define _CRT_SECURE_NO_DEPRECATE void main() { int j; char binaryNum[10], *pointer; char hexNum[10]; FILE *f; while (true) { gets(hexNum); /* From Hex convert to decimal */ j = strtol(hexNum, &pointer, 16); /* From Decimal convert to Binary */ itoa(j, binaryNum, 2); printf("H..