프로그램 다운로드 주소 : 요기..

 

 

이미지호스팅 소개

 

  1. 월 5,000 원 무제한 트래픽&용량

  2. 한번 업로드 100MB 가능

  3. 플래시 파일 지원

 

 

 

1. 이미지 업로드 방법

  이미지 파일을 올리시려면 [파일->이미지]  업로드를 클릭하시면 됩니다.

 

 

  그렇게 하게 되면 아래와 같은 대화 상자가 뜨게 됩니다. 이 대화상자에서 자신이 원하는 이미지를 클릭한 후 열기를 누르면 이미지가 업로드 됩니다. 지원되는 확장파일은 BMP를 제외한 그림파일과 swf 플래시 파일입니다. 한번 업로드 할 수 있는 용량은 100 메가 정도 이고, 용량에 상관 없이 무제한 업로드가 가능합니다.

 

  성공적으로 이미지가 추가가 되면 왼쪽의 트리에 현재 업로드 된 이미지 파일이 나오게 되며, 이것을 메인 화면에 드래그 드롭을 하면 해당 이미지의 내용을 볼 수 있습니다.

 

2. 이미지 주소 알아내기

오픈 마켓에 이미지를 올리기 위해서는 서버에 올라간 이미지의 주소를 알아야 됩니다. 이것은 이미지를 클릭하고 속성에 들어가시면 해당 이미지의 주소를 확인 할 수 있으며,

 

 

주소를 가지고 오픈 마켓에 이미지를 올리시면 됩니다.

 

MFC 클래스간의 통신

Window based/MFC | 2009/10/21 18:41 | Noonipoony

 

           

 

C++ CLI 에서 스레드 생성방법

Window based/C# | 2009/10/14 22:58 | Noonipoony

 

           

 

Threading::ThreadStart^ ts = gcnew Threading::ThreadStart(this,
   &MyClass::TheThreadFunc);

Threading::Thread^ t = gcnew Threading::Thread(ts);
t->Start();

C# 스레드 풀링 사용법

Window based/C# | 2009/10/14 15:16 | Noonipoony

 

           

 

C# 스레드 풀링 사용법

 

참고 원문 : http://www.switchonthecode.com/tutorials/csharp-tutorial-using-the-threadpool

 

들어가기 앞서

  오 번역이 있으면 댓글을 남겨주시기 바라고, 본문의 저자중 자지부리한 내용을 뺏습니다.

 

 

◎ 그럼 스레드 풀이란?? 무얼까?

 

  스레드풀이란 수영장의 풀(pool) 처럼 스레드들을 모아놓은 장소를 말합니다. 예를 들면 어떤 하나의 작업을 스레드풀에게 "야! 거기 아무나 이 일을 해줘!" 한다면, 스레드풀은 자신이 가지고 있는 스레드들을 검색하여서 현재 사용되지 않는 스레드를 깨운후에 스레드에게 새로들어온 일을 할당 할 것입니다. 이것이 스레드풀의 이론입니다. 물론 스레드 풀에 관련된 내용을 본인이 직접 구현해도 상관 없습니다. 하지만 이렇게 한다면 손가락 발가락을 동원해서 해당 스레드가 얼마나 할당되었고, 또 깨어있는 스레드가 무엇인지를 본인이 갯수를 새고 구현해야 겠지요. 이미 구현되어 있는 것이 있다면 그것을 사용하는게 인지상정~ 다행히 닷넷에서는 이를 위한 몇몇의 클래스를 지원합니다.

 

  아래의 5개의 스레드를 스레드풀에 생성해 놓고 이 작업이 끝나기를 기다린 후에  print 문으로 콘솔창에 출력하는 내용입니다.

 

 

using System;
using System.Threading;

namespace ThreadPoolTest
{
  class Program
  {
    private const int NumThreads = 5;

    private static int[] inputArray;
    private static double[] resultArray;
    private static ManualResetEvent[] resetEvents;

    private static void Main(string[] args)
    {
      inputArray = new int[NumThreads];
      resultArray = new double[NumThreads];
      resetEvents = new ManualResetEvent[NumThreads];

      Random rand = new Random();
      for (int s = 0; s < NumThreads; s++)
      {
        inputArray[s] = rand.Next(1,5000000);
        resetEvents[s] = new ManualResetEvent(false);
        ThreadPool.QueueUserWorkItem(new WaitCallback(DoWork), (object)s);
      }

      Console.WriteLine("Waiting...");

      WaitHandle.WaitAll(resetEvents);

      Console.WriteLine("And the answers are: ");
      for (int i = 0; i < NumThreads; i++)
        Console.WriteLine(inputArray[i] + " -> " + resultArray[i]);
    }

    private static void DoWork(object o)
    {
      int index = (int)o;

      for (int i = 1; i < inputArray[index]; i++)
        resultArray[index] += 1.0 / (i * (i + 1));

      resetEvents[index].Set();
    }
  }
}
 
위 코드는 세개의 배열이 있습니다. inputArray 의 작업 내용의 입력 값이고, resultArray는 결과를 저장하는 배열이고, 그리고 resetEvents ManualResetEvents 라는 것의 배열입니다. 아마 처음 두개의 배열은 다 아시리라 생각하고, 여기에서 ManualResetEvent 무엇인가 하는 의문이 드신 분도 계실 것입니다. 이것은 하나의 오브젝트로써 하나의 스레드의 신호를 다른 스레다가 어떤 일이 발생될때 신호를 주게 할 수 있습니다. 이 코드에서는 이 이벤트를 메인함수에 사용되었고, 모든 스레드의 작업이 끝날때 까지 기다리는 역활을 합니다.

 이렇게 처음에 배열들을 초기화 한 후에 다음에는 for 루프를 돌게 됩니다. 루프안에서는 ThreadPool.QueueUserWorkItem 를 이용하여 큐에 작업들을 넣고 있습니다. 처음에는 랜덤값을 배열변수에 넣은 다음에 (랜덤값을 이용해 스레드에 복잡한 연산을 주려는 거겠죠?) 그런다음에 ManualResetEvent 이벤트 클래스를 생성하여 false 값을 기본값으로 줍니다. 이는 향후 작업의 완료 여부를 알기 위해서니 당연히 처음에는 false 값을 주는 거죠. 그런 다음 최종적으로 스레드 풀에 ThreadPool.QueueUserWorkItem를 호출하여 작업을 넣고 있습니다.

◎ 위 소스 컴파일 후 결과

 

 

쉽죠잉? 단, 여러분이 명심하고 있어야 할 몇가지 사항들이 있습니다. 프로세스당 스레드 풀의 기본 크기는 25 입니다. 즉 25개의 스레드가 있다는 것입니다. 이 값은 여러분들이 변경 할 수 있지만, 시스템의 자원이 무하지 않다는 것을 아셔야 합니다. 만약 스레드풀의 모든 스레드가 현재 작동되고 있는 상태에서 새로은 작업이 들어오게 된다면 그 작업은 wait 상태로 큐에 쌓이게 되고, 먼저 들어온 작업에 끝나게 될때까지 기다리게 됩니다.

 

 

           

 

참고하세요. ^^

우선 VA X는 Armadillo라는 라이센스를 사용한다고 합니다.
그래서..레지스트에서 Armadillo의 라이센스 정보를 지우고, 환경변수 %TEMP%에 정의된 폴더속에 있는 어떤 임시 파일도 지우고.. 레지스트에 가짜 COM정보도 지우면.. trial기간이 초기화되서 한달간 사용할수 있습니다. 한달후에도 다시 같은 과정을 해줘야죠.
그럼 이제 자세하게 설명드리겠습니다..

HKLM -> HKEY_LOCAL_MACHINE
HKCU -> HKEY_CURRENT_USER
HKCR -> HKEY_CLASSES_ROOT

1. 시작버튼->실행을 누른후.. explorer %TEMP% 라고 입력해서
   환경변수 TEMP에 등록된 임시 폴더를 알아냅니다.
   그리고 그 폴더의 모든파일을 지웁니다.
   (임시 폴더에 생성된 라이센스에 관련된 어떤 파일 하나를 지우기 위해서입니다..)

2. 레지스트 편집기를 실행하시고 편집메뉴->찾기->찾을대상에 "값"을 선택하고 "nLxxQ"로 검색합니다.(""는 제외합니다.)
   검색해서 나온 CLSID를 서브키까지 모두 지웁니다.
   저는 HKCR\CLSID\{5373DE59-FD7C-AA67-4D4B-7DDACF915A49}에 있더군요.
   (CLSID번호는 컴퓨터마다 모두 다를겁니다. VA X의 새버전을 깔면 또 바뀔지도 모르겠네요,,)

3. 레지스트 편집기를 실행하시고.. HKLM\Software\Licenses를 찾아서 서브키까지 모두 지웁니다.

4. 혹시 모르니 재부팅 하시면 기한연장 끝입니다. (재부팅 안해도 될거 같습니다만..)

저는 아래 원문의 방법대로 순서대로 다 했습니다만.. 그렇게까지 복잡하게까지 할필요는 없는것 같습니다. 위에 말한것처럼만 해도 될것 같더군요. 물론 확인을 못해봐서 확신은 못합니다.
한달후에 또 등록하라는 창이 뜨면 위와 같은 과정을 반복해 주시면 될겁니다.
앞으로 자주 업데이트 되는 VA X의 어떤 버전에도 적용됩니다. 토마토라는 회사가 Armadillo를 사용안하기 전까지는요.


======================= 원문 ==================================
VA X trial period can be reset in three fairly easy steps:

1. Delete Armadillo licences registry entry
2. Delete VA's fake temporary file in system %TEMP% folder
3. Delete VA's fake COM component entry in the registry

> Step 1

VA uses Armadillo protection. This step is as simple as it
gets: use regedit and delete Armadillo licenses key HKLM\Software\Licenses
and all its subkeys.

> Step 2

In order to find out which temp file is actually VA's file, delete all files from
system %TEMP% folder.
Launch VSNET 2003 and wait until it's loaded or until VA trial dialog pops up.
Go to system %TEMP% folder; there should be just one .tmp file created by
VA/Armadillo. Write down its name for the next trial period reset and delete it.
Exit VA and VSNET 2003.

> Step 3

You'll need Regmon (www.sysinternals.com).
Launch Regmon and specify that you wish to monitor only VSNET 2003 process (devenv.exe).
Launch VSNET 2003 and watch Regmon logging registry access.
When VSNET is loaded (or when VA trial dialog pops up), stop Regmon's registry
capture.
Exit VA/VSNET 2003 before proceeding.
In the Regmon's list search for the very first occurence of the
text ""HKCU\Software\Whole Tomato". You'll see something like

    devenv.exe:3196 OpenKey HKCU\Software\Whole Tomato SUCCESS Key: 0xE1844558

From that line manually scroll down searching for the very first line where the key
HKCU\CLSID\{<some guid>} or key HKCR\CLSID\{<some guid>} is accessed. This line will probably
be a several hundred lines away from the line where you started searching, and it will
look be something like this:

    devenv.exe:3196 OpenKey HKCU\CLSID\{BC29421E-12B6-4630-A281-E18D215BC63E} 

In order to verify that it is indeed the guid that belongs to VA protection scheme, launch
regedit and go to that key. If that key has a value with the strange name such
as "nLxxQ", it's the one you are looking for. Don't let the meaningful name of the component
confuse you; it is a part of the protection.

Delete the guid key and all its subkeys. Congratulations, you have just reset VA trial period.

> Notes

To reset trial period next time it's enough do go directly to the keys mentioned above
and to delete them. Don't forget to delete .tmp file too.

Note, however, that the guid is different for each machine and it might (and will) change
from one VA version to another. The same goes for temporary file, even though currently
it has the same name on all machines. Don't count on that.

The above procedure will work with future VA versions, as long as they don't change
their protection scheme.

[overl0ader]

VA X trial period can be reset in three fairly easy steps:

1. Delete Armadillo licences registry entry
2. Delete VA's fake temporary file in system %TEMP% folder
3. Delete VA's fake COM component entry in the registry

> Step 1

VA uses Armadillo protection. This step is as simple as it
gets: use regedit and delete Armadillo licenses key HKLM\Software\Licenses
and all its subkeys.
 
> Step 2

In order to find out which temp file is actually VA's file, delete all files from
system %TEMP% folder.
Launch VSNET 2003 and wait until it's loaded or until VA trial dialog pops up.
Go to system %TEMP% folder; there should be just one .tmp file created by
VA/Armadillo. Write down its name for the next trial period reset and delete it.
Exit VA and VSNET 2003.
 
> Step 3

You'll need Regmon (www.sysinternals.com).
Launch Regmon and specify that you wish to monitor only VSNET 2003 process (devenv.exe).
Launch VSNET 2003 and watch Regmon logging registry access.
When VSNET is loaded (or when VA trial dialog pops up), stop Regmon's registry
capture.
Exit VA/VSNET 2003 before proceeding.
In the Regmon's list search for the very first occurence of the
text ""HKCU\Software\Whole Tomato". You'll see something like

    devenv.exe:3196 OpenKey HKCU\Software\Whole Tomato SUCCESS Key: 0xE1844558

From that line manually scroll down searching for the very first line where the key
HKCU\CLSID\{<some guid>} or key HKCR\CLSID\{<some guid>} is accessed. This line will probably
be a several hundred lines away from the line where you started searching, and it will
look be something like this:
 
    devenv.exe:3196 OpenKey HKCU\CLSID\{BC29421E-12B6-4630-A281-E18D215BC63E} 

In order to verify that it is indeed the guid that belongs to VA protection scheme, launch
regedit and go to that key. If that key has a value with the strange name such
as "nLxxQ", it's the one you are looking for. Don't let the meaningful name of the component
confuse you; it is a part of the protection.
 
Delete the guid key and all its subkeys. Congratulations, you have just reset VA trial period.

> Notes

To reset trial period next time it's enough do go directly to the keys mentioned above
and to delete them. Don't forget to delete .tmp file too.

Note, however, that the guid is different for each machine and it might (and will) change
from one VA version to another. The same goes for temporary file, even though currently
it has the same name on all machines. Don't count on that.

The above procedure will work with future VA versions, as long as they don't change
their protection scheme.

[overl0ader]


이전 1 2 3 4 5 6 7 ... 33 다음