This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Visual Studio 2019からMySQLに接続するプログラムを作成する前の準備事項 | |
ファイルメニューから プロジェクト > NuGet パッケージの管理(N)... を選択 | |
参照タブを選択し「mysql」で検索して表示される「MySql.Data」をインストールする | |
*/ | |
using System; | |
// MySQLを使うため |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<meta name="robots" content="INDEX,FOLLOW"> | |
<meta name="description" content="HTML5に準じた基本的な3分割サイトです。ヘッダ部分、コンテンツ部分、フッタ部分に分けてあります。レスポンシブにも対応しています。ご自由にコピーして使ってください。"> | |
<link rel="stylesheet" href="style.css"> | |
<title>3分割レイアウト</title> | |
<link rel="apple-touch-icon" href="img/icon.png" > <!--ホームアイコンの設定--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width,user-scalable=no"> | |
<link rel="stylesheet" href="style.css"> | |
<script src="main.js" type="text/javascript"></script> | |
<title>Terminal</title> | |
<!-- | |
ver 0.9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
import qrcode, os # ライブラリ読み込み | |
file_name = "qr_code.png" #保存するQRコードのファイル名 | |
print("QRコードに変換したい文字列を入力してください: ", end="") | |
qr_string = input() # キーボードから変換したい文字列を入力させる | |
img = qrcode.make(qr_string) # QRコード画像データ生成 | |
img.save(file_name) # 画像ファイルとして保存 | |
current_dir = os.getcwd() # 現在のディレクトリ位置を取得 | |
print("「{0}\\{1}」にQRコード画像を保存しました".format(current_dir, file_name)) # 終了メッセージ出力 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace リスト内の検索を使ったデータ更新 | |
{ | |
class Program | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEngine.UI; // Sliderを扱うために必要 | |
public class HPbar : MonoBehaviour { | |
private const int maxHp = 100; // 敵キャラのHP最大値を100とする | |
private int currentHp; // 現在のHP | |
public Slider slider; // シーンに配置したSlider格納用 | |
// Use this for initialization | |
void Start () { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<link rel="apple-touch-icon" href="icon.png" > <!--ホームアイコンの設定--> | |
<link rel="SHORTCUT ICON" href="icon.ico"> <!-- PC用ホームアイコンの設定 --> | |
<meta name="robots" content="INDEX,FOLLOW"> | |
<meta name="description" content="宮沢賢治の『銀河鉄道の夜』(青空文庫版)です。前回閉じたところから再開するようにスクロール位置をローカルストレージに保存しています。"> | |
<link rel="stylesheet" href="style.css"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
''' | |
beautifulsoup4:特定のクラス内のあるクラスを取り出す | |
''' | |
from bs4 import BeautifulSoup | |
# HTMLデータを取得する | |
html = """ | |
<ol> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
''' | |
beautifulsoup4の動作テスト | |
''' | |
from bs4 import BeautifulSoup | |
# HTMLデータを取得する | |
html = """ | |
<ol> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
kaprekar.c: C言語で4桁のカプレカ数を再現してみる | |
【処理の流れ】 | |
1.乱数で適当な4つ数値を生成 | |
2.生成した4つの数値から最大値と最小値を求める | |
3.最大値-最小値を求める | |
4.3で求めた数値を使って再度最大値と最小値を求める | |
5.3と4を 「6174」が2回連続して再現されるまで繰り返す |