DataBase

方法1
>use admin;
switched to db admin
>db.shutdownServer();
Tue Nov 18 11:03:24.164 DBClientCurs ...

Linux

1.MongoDBレポジトリ追加
#vi/etc/yum.repos.d/mongodb.repo
name=MongoDB Repository
baseurl=
gpgcheck=0

PHP

phpコード:
$fh = fopen($path, “r+”);
if( flock($fh, lock_ex) ){
$cont_old=json_decode(fread($fh, ...

PHP

サンプルコード:
set_time_limit(1000);
function dirchk_iswriteableFunc($dir_path){
$dir_path=str_replace(‘\ ...

PHP

phpコード:
function html2text($str){
$str = preg_replace(“/<style .*?<\/style>/is”, “ ...

PHP

サンプルコード:
function encodeChk($file) {
$list = array(‘Shift_JIS’, ‘UTF-8’, ‘UTF-1 ...

Linux

# uname -a
Linux ik1-xxx-xxx.vs.sakura.ne.jp 2.6.32-642.11.1.el6.x86_64 #1 SMP Fri Nov 18 19:25:05 UTC 2016 x86_6 ...

Linux

基本コマンド
F  プロセスの状態
USER  ユーザID
PID  プロセスID
%CPU CPU使用率
%MEM 実メモリ使用量
VSZ   仮想メモリの使用サイズ(キロバイト表示) ...

DataBase

サンプルコード:
var h1 = 8, h2=16;
var ctm = “(function() {\n”
+” var hh = this.createdAt.getH ...

DataBase

1.UNION
2つtable以上のSELECT結果をまとめる
SELECT * FROM UNION SELECT * FROM ;

2.INTERSECT
2つtable以上のSELECT結果 ...

DataBase

サンプルコード

CREATE FUNCTION FUNCTION_DEAL(refcursor) RETURNS refcursor AS $$
declare r record;
ref refcurso ...

Linux

1.ファイアウォールを停止
#systemctl stop firewalld.service
#systemctl disable firewalld.service

2. iptables-servic ...

JavaScript

サンプルコード
<script type=”text/javascript”>
var obj = ‘{“students”:}’; ...

JavaScript

1.javascriptオブジェクトをjsonへ変換
var data = new Object();
var json_data = JSON.stringify(data);
2.jsonをjavascri ...

JavaScript

json形式文字列
var str = ‘{ “city”: “tokyo”,”company”: “abc” }&# ...

Linux

ダウンロード
# wget

依存パッケージのインストール
# yum install libpcap-devel ncurses-devel

##build iftop##
# tar ...

Linux

$ sudo apt-get install nethogs

sudo nethogs
q で終了、m で表示の変更(現在のbps/総送受信量MB,KB,B)ができる。

引数下記

-V バー ...

Python

方法1
>>> import uuid
>>> node = uuid.getnode()
>>> mac = uuid.UUID(int=node) ...