본문 바로가기

Code/Study

(7)
[AutoHotkey] SetTimer & PostMessage "메모장 정보" 창이 뜰 때 마다 "확인" 버튼을 자동으로 클릭해주는 예제 #Persistent BM_CLICK := 245 SetTitleMatchMode, Regex OnExit, ExitSub SetTimer, MyLabel, 1000 return MyLabel: PostMessage, BM_CLICK , 0, 0, Button1, 메모장 정보 return ExitSub: SetTimer, MyLabel, Off ExitApp ; The only way for an OnExit script to terminate itself is to use ExitApp in the OnExit subroutine. #Persistent WM_CLOSE := 0x10 WM_COMMAND := 0x111 BM_CL..
[PerlNET] Regex (Perl C# Mix) Regex.pmpackage MixPerl::Regex;use strict;use namespace "System";use PerlNET qw(AUTOCALL); #Constructor=for interface [interface: pure] static Regex();=cut #Methods=for interface static string Replace(str SourceString, str FindPattern, str ReplacePattern); static string Replaceg(str SourceString, str FindPattern, str ReplacePattern); static string Replacegi(str SourceString, str FindPattern, str..
[Perl] Cocoa (pl pm sample) Cocoa.plpackage MixPerl::Cocoa; =for interface [interface: pure] public static Cocoa Cocoa(); public static string Drink();=cut require Cocoa; Cocoa.pmpackage Cocoa;use strict; sub new { my $class = shift; my $self = bless {}, $class; return $self;} sub Drink { my $line = "Drink Cocoa"; return $line;} 1; testCocoa.pl#!/usr/bin/perl -wuse strict; push (@INC, 'pwd');use Cocoa; my $cup = new Cocoa;..
[PerlNET] CIty (Mix Perl & C#) Program.cs using System; using MixPerl; namespace CityClient { class Program { static void Main(string[] args) { City myCity1 = new City("SmallVille", 4); City myCity2 = new City("Crowdedburg", 40); myCity1.PrintCityInfo(true); myCity2.Population = 500000; myCity2.PrintCityInfo(false); } } } City.pm package MixPerl::City; use strict; use namespace "System"; use PerlNET qw(AUTOCALL ); #Consturct..
[Perl] BeeConverter (Convert HTML Entity to Unicode Character) use warnings; print "+----------------------+\r\n"; print "| BeeConverter 1.0.0.3 |\r\n"; print "| by Wing4Bee |\r\n"; print "| http://wing4bee.com |\r\n"; print "+----------------------+\r\n"; my ($source, $result) = @ARGV; open(FILE_GET, ":utf8", $result); my %c2dHash = ( quot => 34, amp => 38, apos => 39, lt => 60, gt => 62, nbsp => 160, iexcl => 161, cent => 162, pound => 163, curren => 164,..
[C/C++ vs C#] static (1) function 내부에서 static variable 선언 가능 #include void main() { static int i = 0; // valid } method 내부에서 static variable 선언 불가능 static field 선언 가능 using System; namespace Sample { class Program { static void Main(string[] args) { static int i = 0; // compile time error } private static int number = 0; // valid } }
[C/C++ vs C#] sizeof sizeof(variable) 가능 #include using namespace std; void main() { int i = 0; cout