달력

5

« 2024/5 »

  • 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

1. 설정


cmd.exe 관리자 권한으로 실행


bcdedit -set loadoptions DISABLE_INTEGRITY_CHECKS

bcdedit -set TESTSIGNING ON


리부팅


2. 설정 해제


cmd.exe 관리자 권한으로 실행


bcdedit -set loadoptions DISABLE_INTEGRITY_CHECKS

bcdedit -set TESTSIGNING OFF


리부팅



:
Posted by 해타리
2017. 10. 31. 15:44

드라이버 패키지 수동 제거법 작업2017. 10. 31. 15:44

pnputil.exe 이용


드라이버 목록 보기 

pnputil /enum-drivers 또는 pnputil -e


드라이버 삭제

pnputil /delete-driver oem#.inf 

pnputil /delete-driver oem#.inf  /force  (사용중이어도 삭제)

:
Posted by 해타리
2017. 8. 16. 14:33

문자 판단 함수 작업2017. 8. 16. 14:33

아래 함수를 사용하기 위해서는 ctype.h Header File이 선언되어야 합니다.

 함수 사용 설명
 isalnum() isalnum(c) 전달되온 c가 영문자/숫자가 아니면 0을 반환합니다.
 isalpha() isalpha(c) 전달되온 c가 영문자가 아니면 0을 반환합니다.
 isascii() isascii(c) 전달되온 c가 ascii문자가 아니면 0을 반환합니다.
 iscntrl() iscntrl(c) 전달되온 c가 제어문자가 이니면 0을 반환합니다.
 iscsym() iscsym(c) 전달되온 c가 _, 영문자, 숫자가 아니면 0을 반환합니다.
 iscsymf() iscsymf(c) 전달되온 c가 _, 영문자가 아니면 0을 반환합니다.
 isdigit() isdigit(c) 전달되온 c가 숫자가 아니면 0을 반환합니다.
 isgraph() isgraph(c) 전달되온 c가 출력가능한 문자가 아니면 0을 반환합니다.(공백이 없어야 합니다.)
 islower() islower(c) 전달되온 c가 소문자가 아니면 0을 반환합니다.
 isprint() isprint(c) 전달되온 c가 출력가능한 문자가 아니면 0을 반환합니다.(공백을 포함합니다.)
 ispunct() ispunct(c) 전달되온 c가 출력가능한 문자가 아니면 0을 반환합니다.(숫자, 문자, 공백이 아닌것만 해당합니다.)
 isspace() isspace(c) 전달되온 c가 공백, feed(\f), tab(\t, \v), 넘김(\r)이 아니면 0을 반환합니다.
 isupper() isuppper(c) 전달되온 c가 대문자가 아니면 0을 반환합니다.
 isxdigit() isxdigit(c) 전달되온 c가 16진수가 아니면 0을 반환합니다.


각 함수의 c는 문자형인수를 의미합니다. 다음 표는 각 함수의 반환값에 대한 설명입니다.

 함수 설명
 isalnum() 영문대문자 : 1, 영문소문자 : 2, 숫자 : 4
 isalpha() 대문자 : 1, 소문자 : 2
 isascii() ascii문자 : 1
 iscntrl() 0x00~0x1F/0x7F : 32
 iscsym() true로 판단되는 문자 : 1
 iscsymf() true로 판단되는 문자 : 1
 isdigit() 숫자 : 4
 isgraph() 영문대문자 : 1, 영문소문자 : 2, 숫자 : 4, 그외 : 16
 islower() 영문소문자 : 2
 isprint() 영문대문자 : 1, 영문소문자 : 2, 숫자 : 4, 공백 : 64, 그외 : 16
 ispunct() true로 판단되는 문자 : 16
 isspace() true로 판단되는 문자 : 16
 isupper() 영문대문자 : 1
 isxdigit() 16진수 : 128


#include <stdio.h>
#include <ctype.h>

main()
{
  char s[7];
  int i;
 
  printf("문자열 입력하세요 : "); scanf("%s", &s);
 
  for(i = 0; i <= 6; i++){
    if (isdigit(s[i]) != 0){
      printf("입력하신 내용에 숫자가 있습니다.\n");
     
      return;
    }
  }
 
  printf("모두 문자 입니다.\n");
}


입력된 내용이 문자인지 숫자인지를 판별하는 Program



출처: http://lab.cliel.com/entry/C-C-표준-Library-함수-문자-판단-함수 [CLIEL LAB]

:
Posted by 해타리
2015. 11. 11. 12:18

TRichEdit 특정 위치 의 배경색 Get / Set 작업2015. 11. 11. 12:18

void TmainForm::SetBackColor(int SelStart, int SelLength, TColor color) 

    //BackColor 설정 
    Richedit::CHARFORMAT2 cf; 

    RichEdit1->SelStart = SelStart; 
    RichEdit1->SelLength = SelLength; 

    RichEdit1->Lines->BeginUpdate(); 
    memset(&cf,0,sizeof(Richedit::CHARFORMAT2)); 
    cf.cbSize=sizeof(Richedit::CHARFORMAT2); 

    cf.dwMask = CFM_BACKCOLOR; 
    cf.crBackColor = color; 

    SendMessage(RichEdit1->Handle,EM_SETCHARFORMAT,SCF_SELECTION,(LPARAM)&cf); 

    RichEdit1->Lines->EndUpdate(); 


TColor TmainForm::GetBackColor(int SelStart, int SelLength) 

    Richedit::CHARFORMAT2 cf; 

    RichEdit1->SelStart = SelStart; 
    RichEdit1->SelLength = SelLength; 
    
    memset(&cf,0,sizeof(Richedit::CHARFORMAT2)); 
    cf.cbSize=sizeof(Richedit::CHARFORMAT2); 
    cf.dwMask = CFM_BACKCOLOR; 
    SendMessage(RichEdit1->Handle,EM_GETCHARFORMAT,SCF_SELECTION,(LPARAM)&cf); 
    return cf.crBackColor; 
}


:
Posted by 해타리
2009. 11. 16. 00:38

[Delphi] How to Convert RGB Color to HSB (HSV) Color 작업2009. 11. 16. 00:38

출처 : 초모룽마... | 초모룽마 http://blog.naver.com/chomorungma/70003686178

The HSV (Hue, Saturation, Value) model, also called HSB (Hue, Saturation, Brightness), defines a color space commonly used in graphics applications. Hue value ranges from 0 to 360, Saturation and Brightness values range from 0 to 100%. The RGB (Red, Green, Blue) is also used, primarily in web design. When written, RGB values are commonly specified using three integers between 0 and 255, each representing red, green, and blue intensities. Here's a function to convert a RGB color to a HSV color.

uses Math;
type TRGBColor = record Red, Green, Blue : Byte; end;

THSBColor = record Hue, Saturnation, Brightness : Double;
end;

function RGBToHSB(rgb : TRGBColor) : THSBColor;
var minRGB, maxRGB, delta : Double; h , s , b : Double ;
begin
H := 0.0 ;
minRGB := Min(Min(rgb.Red, rgb.Green), rgb.Blue) ;
maxRGB := Max(Max(rgb.Red, rgb.Green), rgb.Blue) ;
delta := ( maxRGB - minRGB ) ;

b := maxRGB ;

if (maxRGB <> 0.0) then
s := 255.0 * Delta / maxRGB
else s := 0.0;

if (s <> 0.0) then
begin
if rgb.Red = maxRGB then
h := (rgb.Green - rgb.Blue) / Delta
else if rgb.Green = minRGB then
h := 2.0 + (rgb.Blue - rgb.Red) / Delta
else if rgb.Blue = maxRGB then
h := 4.0 + (rgb.Red - rgb.Green) / Delta
end
else h := -1.0; h := h * 60 ;

if h < 0.0 then h := h + 360.0;

with result do
begin
Hue := h; Saturnation := s * 100 / 255;
Brightness := b * 100 / 255;
end;
end;
:
Posted by 해타리