Skip to content

Instantly share code, notes, and snippets.

View bg1bgst333's full-sized avatar
😐

B.G bg1bgst333

😐
View GitHub Profile
@bg1bgst333
bg1bgst333 / checkbox.cgi
Created March 10, 2025 06:03
CGI::checkbox(-checked)
#!/usr/bin/perl
use strict; # 厳密な文法チェック.
use CGI; # CGI
# CGIオブジェクトの作成.
my $q = CGI->new; # CGI::newでCGIオブジェクトを生成し, $qに格納.
# HTTPヘッダの出力.
print $q->header;
@bg1bgst333
bg1bgst333 / checkbox.cgi
Created March 10, 2025 03:41
CGI::checkbox
#!/usr/bin/perl
use strict; # 厳密な文法チェック.
use CGI; # CGI
# CGIオブジェクトの作成.
my $q = CGI->new; # CGI::newでCGIオブジェクトを生成し, $qに格納.
# HTTPヘッダの出力.
print $q->header;
@bg1bgst333
bg1bgst333 / br.cgi
Created March 9, 2025 08:17
CGI::br
#!/usr/bin/perl
use strict; # 厳密な文法チェック.
use CGI; # CGI
# CGIオブジェクトの作成.
my $q = CGI->new; # CGI::newでCGIオブジェクトを生成し, $qに格納.
# HTTPヘッダの出力.
print $q->header;
#!/usr/bin/perl
# RC4を使う.
use Crypt::RC4;
# キーとデータ.
$key = "secretkey";
$data = "ABCDEFGHIJ";
# 暗号化
#!/usr/bin/perl
use strict; # 厳密な文法チェック.
use CGI; # CGI
use CGI::Carp; # CGI::Carp
# CGIオブジェクトの作成.
my $q = CGI->new; # CGI::newでCGIオブジェクトを生成し, $qに格納.
# HTTPヘッダの出力.
@bg1bgst333
bg1bgst333 / First#Index.aspx
Created March 4, 2025 06:39
FormExtensions.BeginForm_htmlHelper_actionName_controllerName
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Index</title>
</head>
<body>
<div>
@bg1bgst333
bg1bgst333 / Index.aspx.cs
Created March 4, 2025 01:27
XmlSiteMapProvider
using System;
public partial class Page1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
smd.SiteMapProvider = "TestProvider";
}
public void button1_Click(object sender, EventArgs e)
{
@bg1bgst333
bg1bgst333 / Window1.xaml
Created March 2, 2025 16:03
ScrollViewer
<Window x:Class="ScrollViewer_.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Height="300" Width="300">
<ScrollViewer>
<StackPanel>
<TextBlock Text="Item1" Height="50" HorizontalAlignment="Center" />
<TextBlock Text="Item2" Height="50" HorizontalAlignment="Center" />
<TextBlock Text="Item3" Height="50" HorizontalAlignment="Center" />
<TextBlock Text="Item4" Height="50" HorizontalAlignment="Center" />
@bg1bgst333
bg1bgst333 / Form1.cs
Created March 2, 2025 12:08
TextBox.Multiline
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace TextBox_
{
@bg1bgst333
bg1bgst333 / IMultiLanguage2.cpp
Created March 2, 2025 07:28
IMultiLanguage2::DetectInputCodepage
// ヘッダファイルのインクルード
#include <windows.h> // 標準WindowsAPI
#include <tchar.h> // TCHAR対応
#include <stdio.h> // C標準入出力
#include <mlang.h> // 多言語
// _tmain関数の定義
int _tmain(int argc, TCHAR *argv[]){ // main関数のTCHAR版.
// 変数の宣言と初期化.