Linux

#vi/opt/free.sh

#!/bin/bash
sync
free -m |grep -i mem |awk ‘{if($4 < 400){ printf(“3R ...

PHP

1.mt_rand()
<?php
$tmp=array();
while(count($tmp)<5){
$tmp[]=mt_rand(1,20);
$tmp=array_uniq ...

jQuery

①JSPコード
<input id=”reg_checkbox” type=”checkbox” >登録する
②jQueryコード
$(‘ ...

IOS

$sudo chmod +x/usr/local/tomcat/bin/*.sh
$vi/usr/local/bin/tomcat
#!/bin/bash
case $1 in
start)
s ...

Mac OS X

1.mavenのダウンロード

2.解凍
/usr/local/etc/maven-3.3.9

3.bash_profileの修正
$ vi ~/.bash_profile
ex

Nginx

#vim etc/init.d/php-fpm

#!/bin/bash
#
# Startup script for the PHP-FPM server.
#
# chkconfig: 3 ...

Nginx

サンプルコード

#!/bin/bash
#
# Startup script for Nginx – this script starts and stops the nginx daemon ...

PHP

1.libmemcachedのダウンロード
ダウンロード:
$wget -c
$tar -zxvf libmemcached-1.0.16.tar.gz
$cd libmemcached-1.0.16 ...

Java

Javaコード
public static String Escape2MetaStr(String str) {
String cftResult = “”;
cftResult = ...

PHP

phpコード
public function utf8_unicode($str) {
$unicode = array();
$values = array();
$lookingFor = 1; ...

PHP

phpコード
function phpescapeFunc($str){
preg_match_all(“/.|+/”,$str,$newstr);
$ar = $newstr;

PHP

phpコード

fileDownloadFunc($_GET );

function fileDownloadFunc($file)
{
$file = “.//images// ...

PHP

1.cookieの設定方法1
setcookie(“user_id”,$user_info,86500);
setcookie(“username”,$user_info ...

Java

//keySet()  
Set<String> set = map.keySet();
for (String s:set) {
System.out.println(s+”,R ...

JavaScript

JSコード
var url=location.search;
var cft;
var Request = new Object();
if(url.indexOf(“?”)!= ...

JavaScript

サンプルコード
Array.prototype.remove = function(b) {
var a = this.indexOf(b);
if (a >= 0) {
this.splice( ...

Java

環境
Eclipse 4.14.0
JavaSE 11

構文
1.public static final double MIN_VALUE
double型の正の最小非ゼロ値2-1074を保持 ...

Nginx

1.ファイル.htaccessの作成
# nginx rewrite rule
rewrite ^(.*?)/article/.*?-(d+)-(d+).html$  $1/display.html?id=$2& ...