'Developer Gom'에 해당되는 글 18건
- 2015.11.28 Cities : Skylines Localization Tool
- 2015.03.04 SQLite column type의 System.Data.DbType
- 2013.02.13 Logparser로 로그인 실패 IP와 횟수 가져오는 쿼리
- 2012.12.21 태극기를 그려주는 오토캐드 ARX 프로그램 (32비트용)
- 2012.01.25 x64 Windows 에서 MDB 사용 중 발생했던 문제...
- 2011.08.08 [MFC] 하드 디스크 일련번호(Serial) 얻기
- 2011.08.08 MS Access Database 에서 Inner Join 예제
- 2011.07.18 C# 파일경로 정보 얻기
- 2011.07.12 C++ SSL 암호화 코드
- 2011.06.24 DataRow 의 rowID에 접근하는 방법
Author : sunny00123
Original Source : https://github.com/sunny00123/CitiesSkylinesLocalizationTool/tree/master/citiesskylines_en/citiesskylines
Original Release : http://steamcommunity.com/workshop/discussions/-1/613958868356242516/?appid=255710#p1
I have updated the translation tool because .po import doesn't work for me.
If this will be a problem to copyrights or other else, please leave a comment in this post.
'Developer Gom > ETC' 카테고리의 다른 글
Logparser로 로그인 실패 IP와 횟수 가져오는 쿼리 (0) | 2013.02.13 |
---|---|
Access Token Privileges (0) | 2010.09.10 |
NSIS 폰트 등록 스크립트 (0) | 2010.08.31 |
SQLite DB에다가 Adapter를 사용하여 DataTable을 Update 하려고 하니 DbType과 일치하는 실제 DB의 column type이 명확하지 않아 찾아보았더니 관련내용이 정리된 문서가 있어 공유합니다.
Since the SQLite engine is inherently typeless and ADO.NET is much more strongly typed, the ADO.NET wrapper must make certain decisions about the columns returned in any given SQL query. One of the deciding factors is the underlying datatype declared in the CREATE TABLE statement.
The following lists the datatypes and mappings the SQLite ADO.NET wrapper understands. If there is anything missing, wrong, or needs adding, please let me know:
COUNTER | DbType.Int64 |
AUTOINCREMENT | DbType.Int64 |
IDENTITY | DbType.Int64 |
LONG | DbType.Int64 |
TINYINT | DbType.Byte |
INTEGER | DbType.Int64 |
INT | DbType.Int32 |
VARCHAR | DbType.String |
NVARCHAR | DbType.String |
CHAR | DbType.String |
TEXT | DbType.String |
DOUBLE | DbType.Double |
FLOAT | DbType.Double |
REAL | DbType.Single |
BIT | DbType.Boolean |
YESNO | DbType.Boolean |
LOGICAL | DbType.Boolean |
BOOL | DbType.Boolean |
NUMERIC | DbType.Decimal |
DECIMAL | DbType.Decimal |
MONEY | DbType.Decimal |
CURRENCY | DbType.Decimal |
TIME | DbType.DateTime |
DATE | DbType.DateTime |
TIMESTAMP | DbType.DateTime |
DATETIME | DbType.DateTime |
BLOB | DbType.Binary |
BINARY | DbType.Binary |
VARBINARY | DbType.Binary |
IMAGE | DbType.Binary |
GENERAL | DbType.Binary |
OLEOBJECT | DbType.Binary |
GUID | DbType.Guid |
UNIQUEIDENTIFIER | DbType.Guid |
MEMO | DbType.String |
NOTE | DbType.String |
LONGTEXT | DbType.String |
LONGCHAR | DbType.String |
SMALLINT | DbType.Int16 |
BIGINT | DbType.Int64 |
DateTime's are stored in one of two formats. The default datetime format is ISO8601, and you specify the format in the connection string like Finisar does. The varying ISO8601 strings that this class uses to convert are:
"yyyy-MM-dd HH:mm:ss"
The other format is Ticks. In the SQLiteConnection class in the helpfile is a description of all the connectionstring options.
,
"yyyyMMddHHmmss",
"yyyyMMddTHHmmssfffffff",
"yyyy-MM-dd",
"yy-MM-dd",
"yyyyMMdd",
"HH:mm:ss",
"THHmmss"
출처 : http://www.blogbus.com/hyangl-logs/2219450.html
'Developer Gom > C#' 카테고리의 다른 글
x64 Windows 에서 MDB 사용 중 발생했던 문제... (0) | 2012.01.25 |
---|---|
C# 파일경로 정보 얻기 (0) | 2011.07.18 |
DataRow 의 rowID에 접근하는 방법 (0) | 2011.06.24 |
C# 기상 정보 프로그램 (0) | 2011.06.14 |
프로그래밍으로 직접 DataRowState 변경하는 방법 (0) | 2011.05.24 |
Logparser는 로그 기록으로 부터 원하는 데이터를 집계 해보고 싶을 때 사용하는 툴입니다.
여기서는 로그인 실패 로그로 부터 IP와 실패한 횟수 정보를 집계해 보겠습니다.
Logparser 다운로드 링크
http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=24659
Logparser가 설치된 경로에서 다음 쿼리를 쳐보시면 Logparser 폴더에 IPDeny란 파일이 생성되는데 에디터로 열어보시면 됩니다.
이 명령은 5회이상 로그인을 실패한 IP를 모두 가져오는 쿼리입니다. 출처 링크로 가보시면 조금 더 자세한 내용을 알아보실 수 있습니다.
logparser.exe -i:EVT -o:NAT -rtp:-1 "SELECT extract_token(strings,19,'|') AS IP, count(ip) into IPDeny from security where EventID=4625 Group By ip having count(ip) > 5 order by count(ip) desc
출처 : http://cybershin.tistory.com/309
'Developer Gom > ETC' 카테고리의 다른 글
Cities : Skylines Localization Tool (0) | 2015.11.28 |
---|---|
Access Token Privileges (0) | 2010.09.10 |
NSIS 폰트 등록 스크립트 (0) | 2010.08.31 |
학교나 학원 등에서 캐드를 배우다 보면 종종 태극기를 그려오라는 숙제를 낼 때가 있습니다.
뭐, 그리는게 어렵진 않지만 처음 캐드를 다뤄보는 입장에선 귀찮기만 하지요.
그래서 그런 분들을 위해 꼼수(?) 프로그램을 만들었습니다.
캐드 쓰시는 분들은 대부분 다 아시겠지만 APPLOAD 명령어로 링크된 ARX 프로그램을
로드하신 뒤에 DFL 명령어를 치시고 뜨는 팝업창에서 확인만 눌러주면 됩니다.
단, LT버전은 ARX를 로드 할 수 없으니 사용하실 수 없고요,
오토캐드 2010, 2011, 2012 버전만 지원합니다.
'Developer Gom > C,C++ (API/MFC/STL)' 카테고리의 다른 글
[MFC] 하드 디스크 일련번호(Serial) 얻기 (0) | 2011.08.08 |
---|---|
MS Access Database 에서 Inner Join 예제 (0) | 2011.08.08 |
C++ SSL 암호화 코드 (0) | 2011.07.12 |
STL Vector 다차원 배열과 같은 처리 (0) | 2011.03.05 |
일주일 내내 이 버그를 해결하기 위해 지지고 볶아봤지만 도무지 원인을 알 수가 없었다. 게다가 잘 되는 곳은 잘 되고 안 되는 곳은 안되는 형태였는데 딱히 시스템을 특정할 수 없어 엄청나게 고생했다.
결국 2주가 다 되어서야 간신히 원인을 찾게 되었는데 폼에서 MDB를 사용하는데 연결 시에 OLE DB Services 를 명시적으로 All Services(-1)로 주면 되는 것이었다. 명시하지 않으면 특정 x64 윈도우즈 시스템에서 뻗어버릴 수가 있다.
우리는 MS OFFICE가 원인일 것으로 보고 있다. 실제로 OFFICE 2010이 깔린 머신에서는 문제가 재현되지 않았기 때문이다. 물론, OFFICE 2007이 깔린 곳도 서비스팩과 핫픽스를 전부 받은 곳은 문제가 없는 것으로 보인다.
수정된 연결 문자열 예제 )
String.Format("Provider={0};Data Source={1};Jet OLEDB:Database Password={2};
OLE DB Services =-1;",MdbProvider, MdbPath, MdbPassword));
'Developer Gom > C#' 카테고리의 다른 글
SQLite column type의 System.Data.DbType (0) | 2015.03.04 |
---|---|
C# 파일경로 정보 얻기 (0) | 2011.07.18 |
DataRow 의 rowID에 접근하는 방법 (0) | 2011.06.24 |
C# 기상 정보 프로그램 (0) | 2011.06.14 |
프로그래밍으로 직접 DataRowState 변경하는 방법 (0) | 2011.05.24 |
DWORD SerialNum;
'Developer Gom > C,C++ (API/MFC/STL)' 카테고리의 다른 글
태극기를 그려주는 오토캐드 ARX 프로그램 (32비트용) (0) | 2012.12.21 |
---|---|
MS Access Database 에서 Inner Join 예제 (0) | 2011.08.08 |
C++ SSL 암호화 코드 (0) | 2011.07.12 |
STL Vector 다차원 배열과 같은 처리 (0) | 2011.03.05 |
쿼리식의 연산자가... 어쩌구 저쩌구 하면서 에러를
뱉어대는데 정신차리게 해주려면,
Select *
위에처럼 괄호로 묶어주면 되고 만약 Join 이 더 발생하면 그때마다 괄호로 묶어주어야 됩니다.
하여튼 MDB 완전 메롱입니다. -_-
'Developer Gom > C,C++ (API/MFC/STL)' 카테고리의 다른 글
태극기를 그려주는 오토캐드 ARX 프로그램 (32비트용) (0) | 2012.12.21 |
---|---|
[MFC] 하드 디스크 일련번호(Serial) 얻기 (0) | 2011.08.08 |
C++ SSL 암호화 코드 (0) | 2011.07.12 |
STL Vector 다차원 배열과 같은 처리 (0) | 2011.03.05 |
Path example
You will often need to extract parts of filename paths in your programs. The .NEW framework team at Microsoft has thought of this problem already and the Path class is ideal for our use. You can access it by adding "using System.IO;" at the top of your class. First here we see a short console program that shows four Path methods.
Program that uses Path methods [C#] using System; using System.IO; class Program { static void Main() { string path = "C:\\stagelist.txt"; string extension = Path.GetExtension(path); string filename = Path.GetFileName(path); string filenameNoExtension = Path.GetFileNameWithoutExtension(path); string root = Path.GetPathRoot(path); Console.WriteLine("{0}\n{1}\n{2}\n{3}", extension, filename, filenameNoExtension, root); } } Output .txt stagelist.txt stagelist C:\
출처 : http://www.dotnetperls.com/path
'Developer Gom > C#' 카테고리의 다른 글
SQLite column type의 System.Data.DbType (0) | 2015.03.04 |
---|---|
x64 Windows 에서 MDB 사용 중 발생했던 문제... (0) | 2012.01.25 |
DataRow 의 rowID에 접근하는 방법 (0) | 2011.06.24 |
C# 기상 정보 프로그램 (0) | 2011.06.14 |
프로그래밍으로 직접 DataRowState 변경하는 방법 (0) | 2011.05.24 |
# include <openssl/err.h>
# include <openssl/ssl.h>
/* AES Encrypt Process */
int encrypt_block(unsigned char* cipherText, unsigned char* plainText, unsigned int plainTextLen, unsigned char* key)
{
EVP_CIPHER_CTX *ctx = (EVP_CIPHER_CTX*)malloc(sizeof(EVP_CIPHER_CTX));
int addLen = 0, orgLen = 0;
unsigned long err = 0;
ERR_load_crypto_strings();
EVP_CIPHER_CTX_init(ctx);
if(EVP_EncryptInit(ctx, EVP_aes_128_cbc(), key, NULL) != 1) {
err = ERR_get_error();
printf("ERR : EVP_Encrypt() - %s\n", ERR_error_string(err, NULL));
return -1;
}
if(EVP_EncryptUpdate(ctx, cipherText, &orgLen, plainText, plainTextLen) != 1) {
err = ERR_get_error();
printf("ERR : EVP_EncryptUpdate() - %s\n", ERR_error_string(err, NULL));
return -1;
}
if (EVP_EncryptFinal(ctx, cipherText + orgLen, &addLen) != 1) {
err = ERR_get_error();
printf("ERR: EVP_EncryptFinal() - %s\n", ERR_error_string (err, NULL));
return -1;
}
EVP_CIPHER_CTX_cleanup(ctx);
ERR_free_strings();
return addLen + orgLen;
}
/* AES Decrypt Process */
int decrypt_block(unsigned char* plainText, unsigned char* cipherText, unsigned int cipherTextLen, unsigned char* key)
{
EVP_CIPHER_CTX *ctx = (EVP_CIPHER_CTX*)malloc(sizeof(EVP_CIPHER_CTX));
unsigned long err = 0;
int toLen = 0;
int outLen = 0;
ERR_load_crypto_strings();
EVP_CIPHER_CTX_init(ctx);
if (EVP_DecryptInit(ctx, EVP_aes_128_cbc(), key, NULL) != 1) {
err = ERR_get_error();
printf("ERR: EVP_DecryptInit() - %s\n", ERR_error_string (err, NULL));
return -1;
}
if (EVP_DecryptUpdate(ctx, plainText, &toLen, cipherText, cipherTextLen) != 1) {
err = ERR_get_error();
printf("ERR: EVP_DecryptUpdate() - %s\n", ERR_error_string (err, NULL));
return -1;
}
if (EVP_DecryptFinal(ctx, &plainText[cipherTextLen], &outLen) != 1) {
err = ERR_get_error();
printf("ERR: EVP_DecryptFinal() - %s\n", ERR_error_string (err, NULL));
return -1;
}
EVP_CIPHER_CTX_cleanup(ctx);
ERR_free_strings();
return toLen + outLen;
}
OpenSSL 라이브러리를 이용한 암호화 예제코드입니다.
공식 홈페이지에서 배포한게 아니라 어느분이 Windows 에서 오류없이 돌아가게끔 수정해놓은건데
정리가 잘되어 있어서 사용하기가 편리합니다.
사용시,
ssleay32.lib, libeay32.lib
이 라이브러리를 포함해주셔야 됩니다.
'Developer Gom > C,C++ (API/MFC/STL)' 카테고리의 다른 글
태극기를 그려주는 오토캐드 ARX 프로그램 (32비트용) (0) | 2012.12.21 |
---|---|
[MFC] 하드 디스크 일련번호(Serial) 얻기 (0) | 2011.08.08 |
MS Access Database 에서 Inner Join 예제 (0) | 2011.08.08 |
STL Vector 다차원 배열과 같은 처리 (0) | 2011.03.05 |
foreach(DataRow dataRow in foundRows)
{
int rowID = (int)fieldInfo.GetValue(dataRow);
this.dataGrid2.Select(rowID-1);
여기서 사용하는 Reflection 에는 유용한 기능들이 많으니 한번쯤 msdn을 둘러보시는 것도 좋을 것 같습니다.
출처 : http://social.msdn.microsoft.com/Forums/en-US/winformsdatacontrols/thread/71ed2a79-5115-45f9-9ba4-fee80cfe9908/
'Developer Gom > C#' 카테고리의 다른 글
x64 Windows 에서 MDB 사용 중 발생했던 문제... (0) | 2012.01.25 |
---|---|
C# 파일경로 정보 얻기 (0) | 2011.07.18 |
C# 기상 정보 프로그램 (0) | 2011.06.14 |
프로그래밍으로 직접 DataRowState 변경하는 방법 (0) | 2011.05.24 |
C# 이 행은 이미 다른 테이블에 속해 있습니다 (This row already belongs to another table) 해결법 (1) | 2011.04.28 |