shellscript

コード下記
echo -e “PID\t\tMem\t\tProc_Name”
for pid in `ls -l/proc | grep ^d | awk ‘{ print $NF ...

Nginx

1.サーバ環境
マスター(master)サーバ:192.168.5.87 inotify
スレーブ(slave)サーバ:192.168.6.88 rsync

2.slaveサーバにrsyncをインストール ...

Nginx

1.インストール
# wget
# unzip master.zip
# ./configure –add-module=./3thparty/ngx_http_consistent_hash-ma ...

Java

サンプルコード
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.channels.Pipe;

publ ...

Linux

1.libpcapとlibcap-develのインストール
# yum install -y libcap libcap-devel
# yum list|grep libpcap
libpcap.x86_64 ...

IOS

参考コード:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unis ...

IOS

1.絵文字をサポートするかどうかを判断
– (BOOL)supportEmoji
{
BOOL hasEmoji = NO;
#define kPreferencesPlistPath @& ...

IOS

サンプルコード
infoView= initWithFrame:CGRectMake(25, 110,210, 270)];
infoView.backgroundColor=;
infoView.alpha= ...

IOS

サンプルコード
if () {
NSLog(@”2つのファイルの差分がございません。”);
}

IOS

サンプルコード:
– (void)textFieldDidBeginEditing:(UITextField *)textField{
NSArray *ws = windows];
for(UI ...

IOS

1.Push通知
UILocalNotification *notification = init] autorelease];
NSDate *pushDate = ; if (notification != ni ...

IOS

サンプルコード
NSFileManager *defaultManager;
defaultManager = ;

IOS

サンプルコード:
NSString *path = pathForResource:@”filename_startnews24″ ofType:@”plist”];

Nginx

方法1
http{
limit_zone one $binary_remote_addr 10m;
limit_conn one 5;
# limit_req_zone $binary_remote_a ...

Linux

1.インストール
# wget
# tar zxvf mod-cband-0.9.7.5.tgz
# cd mod-cband-0.9.7.5
# ./configure –with-apx ...

PHP

PHPコード下記:
if (@get_magic_quotes_gpc ()) {
$_GET = sec ( $_GET );
$_POST = sec ( $_POST );
$_COOKIE = ...

PHP

PHPコード:
function hex2rgb($hexColor){
$color=str_replace(‘#’,”,$hexColor);
if (strlen($c ...

PHP

方法1
function get_real_ipstartnews24(){
$ip=false;
if(!empty($_SERVER)){
$ip=$_SERVER;
}
if(!e ...