CSSで:link、:visited、:hover、:active の記述方法と順序
記述順序
a:link{
color:#333 ;
text-decoration:none ; }
a:visited {
color:#333 ;
text-decoration ...
Windows CEで絶対パスを使う方法
参考コード:
private void btnctm_Click(object sender, EventArgs e)
{
string path = “Program Files//Chec ...
PowerShellでローカルアカウントを追加するスクリプト
参考コード:
$nt=”WinNT://localhost”
$user=$nt.create(“user”,”startnews24_user” ...
正規表現入門–IPアドレス、日時、年月日のチェック方法
①IPアドレス
^{1,3}\.{1,3}\.{1,3}\.{1,3}$
②日時HH:MM:SS
(|2)\:\:
③年月日YYYY/MM/DD
^{4}/(((0|(10|12 ...
asp.netでサーバー(クライアント)のIPアドレスを取得する方法
1.サーバのIPアドレスを取得
using System.Net;
string strIpinfo,strMacinfo;
System.Net.IPAddress.ToString();
str ...
C#でローカルのIPアドレスを取得する方法
参考コード:
using System.Net;
using System.Net.Sockets;
string name = Dns.GetHostName();
var ipAddress= Dn ...
C#でforeachを使って2次元配列の要素を遍歴する
参考コード
using System;
public class foreachdemo{
public static void Main() {
int sum = 0;
int nums = ...
「node.js」axiosのパラメータ指定方法(Get、post)を利用するサンプル
①axiosの導入
npm
npm install axios
bower
bower install axios
②GET方法
axios.get(‘/user?I ...
CSSでtextarea inputの枠線を消す方法
1.textareaの枠線を消す
style=’overflow:auto; background-attachment:fixed;background-repeat:no-repeat;border-style ...
CSSにliタグで点を非表示にする三つ方法
方法1
<ul>
<li style=”list-style-type:none;”>facebook</li>
<li style=̶ ...
「PowerShell入門」@で配列の連続数値の要素を取得するサンプル
構文
@(開始値..終了値)
使用例
「JavaScript」charAtで文字列から文字を取得
構文
変数名 = 文字列.charAt(数値);
文字列のうち、引数の位置にある文字を返します。
使用例
「Python」Djangoのテンプレートでキーを取得する
サンプルコード
{% for item in d.items %}
key = {{ item.0 }}
value = {{ item.1 }}
{% endfor %}
「Java」putAll()メソッドでマップ(map)をコピーする方法
構文
マップB.putAll(マップA)
説明
void putAll(Map<? extends K,? extends V> m)
指定されたマップのすべてのマッピングをこのマップにコピ ...
正規表現で半角、全角スペースを利用するサンプル
1.半角スペース
「 +」
2.全角スペース
「 +」
3.半角、全角スペースのいずれか
( | )+
4.空白の1文字以上
\s+
5.空白以外の1文字 ...
axios のインターセプタを利用するサンプル
1.http requestインターセプタ
//requestインターセプタを追加
axios.interceptors.request.use(function (config) {
return confi ...
「Windows11」ユーザーアカウントのパスワードの長さを変更する
環境
Windows11 64bit
操作方法
1.タスクバーの「スタート」を右クリックし「ファイル名を指定して実行」をクリックします。
2.「ファイル名を指定して実行」画面が表示されます。 ...
「Redis」Discardの使い方
redis 127.0.0.1:6379> MULTI
OK
redis 127.0.0.1:6379> PING
QUEUED
redis 127.0.0.1:6379> S ...