Javaでファイルのプロパティを操作する
Javaコード:
public class FileIoTest {
public static void main(String[] args) throws IOException {
Path p ...
Javaでファイル/ディレクトリを削除するプログラム
javaコード:
try {
Files.delete(path);
} catch (NoSuchFileException x) {
System.err.format(“%s: no ...
java NIO2(file io)のサンプルクラス
1.Pathオブジェクトを作成
Path p1 = Paths.get(“/tmp/foo”);
Path p2 = Paths.get(filename);
Path p3 = Pat ...
nginxログ(access_log、log_format、open_log_file_cache、log_not_found、log_subrequest)設定方法
1.access_log
説明:
access_log path ]];
access_log path format gzip ;
access_log syslog:server=address ...
shellでHDD使用率の20%以上のデバイスと具体的な使用方法
shellコード:
#!/bin/bash
df | sed 1d >/tmp/startnews24_hddres.txt
#df | grep -v “Use” >/ ...
shellで1~100までの偶数データの合計する
shellコード下記:
#!/bin/bash
# description: the sum even of 1 to 100
#sum変数を定義
declare -i sum=0
le ...
nginxでホワイストIPリストアドレス制限を設定する
設定内容:
http {
geo $whiteiplist {
default 1;
127.0.0.1 0;
10.0.0.0/8 0;
XXX.XXX.242.0/24 0; ...
nginxとrobots.txtを使って検索クローラーからのアクセスを制限する方法
1.設定内容:
http {
map $http_user_agent $agent {
default “”;
~curl $http_user_agent;
~*ap ...
「nginx学習」nginxフォワードプロキシを設定する
フォワードプロキシ(Forward Proxy)内容下記:
server {
listen 8090;
location/{
resolver XXX.XXX.XXX.XXX XXX.XXX.XXX ...
「nginx入門」nginxでバージョン情報を非表示にする方法
設定手順:
1.# vim nginx.conf
http{…}に「server_tokens off; 」を追加
例
http {
……
sendfile on; ...
「Vue.js」v-on:click.onceで1度だけ実行されるクリックイベントサンプル
環境
Windows10 home 64bit
Vue.js 3.0.0
Google Chrome 98.0.4758.102
書式
<button id=”btnReg ...
Database .NET 12.7.5347のダウンロード
ダウンロード:
提供元サイトからダウンロード
softpediaサイトからダウンロード
majorgeeksサイトからダウンロード
Database .NET is an innovative, p ...
「Ruby」putsとpメソッドで配列の要素を取得する
使用例
#!/usr/bin/ruby# -*- coding: UTF-8 -*-users = puts usersp usersemps = puts empsp emps実行結果
>ruby test ...
UnityPDF 1.0.5.0 のダウンロード
ダウンロード:
提供元サイトからダウンロード
softpediaサイトからダウンロード
majorgeeksサイトからダウンロード
更新内容:
複数のPDFファイルをマージしたり、一つのPD ...
Drupal – Nginx rewriteルールを設定する
コード下記:
server {
…
location/{
# This is cool because no php is touched for static content
tr ...
「Java」下限付け境界ワイルドカードsuperのサンプル
書式
クラス名<? super Integer>変数名
使用例
package com.arkgame.demo;//ジェネリック型クラスの定義class Cft<T> { priva ...「Oracle」betweenで条件を指定する方法
1.betweenで条件を指定
使用例
2.not betweenで条件指定
Chromium 39.0.2143のダウンロード
ダウンロード:
提供元サイトからダウンロード
softpediaサイトからダウンロード
majorgeeksサイトからダウンロード
概要:
Chromium(クロミウム)はオープンソース ...