「Swift」配列の要素を逆順にするサンプル
1.string型配列
var strArr = strArr.sort { $0 < $1 }print(strArr)//配列を逆順strArr.reverse()print(strArr)2.int型配列
CoffeeScript 1.8のダウンロード
ダウンロード:
提供元サイトからダウンロード
更新内容:
The --join option of the CLI is now deprecated.Source maps now use .js. ...
Android Studio 0.8.8 のダウンロード
ダウンロード:
提供元サイトからダウンロード
更新内容:
Fixes to the font rendering in the translation editor introduced in 0.8.7 w ...JGroups 3.5.0.Final のダウンロード
ダウンロード:
提供元サイトからダウンロード
Maven:
<dependency> <groupId>org.jgroups</groupId> <ar ...Eclipse android SDK更新遅い問題の解決
解決対策:
1.hostsファイルを変更
windows:C:\WINDOWS\system32\drivers\etc\hosts
linux:/etc/hosts
次の内容を追記
203 ...
「”can’t initialize iptables table `nat’: Table does not exist」の対策
1.OpenVZ vzctl 4.7をインストールする時、下記のメッセージが表示される
エラーメッセージ:
iptables v1.4.7: can’t initialize iptables table ...
HTTPサービス(apache/nginx)を監視するshellスクリプト
1.コード下記
#!/bin/bash
#restartメソッド
restart() {
#Nginxが再起動
service nginx restart
#Apacheが再起動 ...
LinuxでHostNameとDNSDomainを操作する
1.RHEL OS
vim/etc/sysconfig/network
HOSTNAME=server.domain.com
/etc/hosts
IP server.domain.com serv ...
pythonでsqlites3を利用する
pythonコード:
import sqlite3
mysqldb=sqlite3.connect(r”C:\Users\Administrator\Desktop\startnews24_sqlite.d ...
nginxのセキュリティ設定内容のまとめ
1.特定ディレクトリのアクセスを禁止
location ^~/var/www/html/sta {
deny all;
}
2.phpファイルのアクセスおよび実行を禁止
2.1 単独ディレク ...
「shell入門」MySQLデータベースのバックアップ設定スクリプト
shellコード下記:
# more mysqlfull_startnews24.sh
#!/bin/sh
# Name:mysqlFullBackup.sh
# PS:MySQL DataBase ...
WordPress用のRewrite Ruleをnginxに設定する方法
nginx.confの内容下記:
server {
listen 80;
server_name www.arkgame.com arkgame.com;
access_log/data/logs/ng ...
LNMP(Linux、nginx、MySQL、PHP)P環境で404エラーページを設定する方法
システム構成:
LNMP環境(Linux+Nginx+MySQL+PHP)
1.サイトのルートディレクトリに404.htmlを作成
コード下記:
<html>
<body& ...
Linux サーバー管理の注意事項まとめ
1.システム再起動
shutdown -h now NG
reboot OK
2. rm -rf を出来る限りに使わない
3.iptablesを有効
/sbin/iptables -A ...
CentOS 6でOracle 11gをインストール、設定
1.VNC Serverをインストール
# yum install tigervnc-server
# yum groupinstall “General Purpose Desktop” ...
「シェル学習」Zabbixでgeramanのモニタリングを設定するshellプログラム
shellコード下記:
#!/bin/sh
zabbix_server=xxx.xxx.xxx.xxx
my_zabbix_hostname=${Host名_Registered_In_Zabbix} ...
「shell学習」md5sumチェックサムを計算するshellプログラム
shellコード下記:
#!/bin/sh
if || ;
then
md5text=`md5sum $1`
for item in $md5text;
do
break ...
javaでシンプルなスレッドプールを実装する方法
javaコード:
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
public cla ...