PHP

1.round()
echo round(3.4);//3
echo round(3.5);//4
echo round(3.6);//4
echo round(3.6, 0);//4
echo ...

PHP

PHPコード:
$rand = mt_rand(0,1);
if( $rand==0 )
{
$array = array(36,35,16,29,30);
}
elseif( $ran ...

PHP

phpコード
<?php
//USER AGENTを取得
$agent = strtolower($_SERVER);
//データを分析
$is_pc = (strpos($agent, ...

PHP

phpコード:
<?php function devicetype_get(){
$agent = strtolower($_SERVER);
$type = ‘other’; ...

Software

C#コード
using System;namespace ArrayApplication{
class InfoArray
{
static void Main(string n = new int; ...

C++

C#コード
using System;namespace ArrayApplication{
class MyArray
{
static void Main(string n = new int; ...

PHP

PHPコード
<?php
header(‘HTTP/1.1 200 OK’);
header(‘HTTP/1.1 404 Not Found’);

shellscript

shellコード:
#!/bin/bash
#useradd andpassword
echo “please input username:”
read name
ec ...

shellscript

shellコード:
#!/bin/bash
FILE=’20161204cft.csv’
MYSQL=’/usr/local/mysql/bin/mysql’ ...

shellscript

方法1
numbers=(122 134 132 154 160 189)

while true
do
index=$(($RANDOM % ${#numbers}))
echo numbe ...

Linux

1.エラー情報
# rpm -ivh MarkLogic-RHEL6-8.0-6.x86_64.rpm
error: Failed dependencies:
libc.so.6(GLIBC_2.11) is ...

Linux

1.memcachedのインストール
# wget
# wget
# tar zxf libevent-2.0.10-stable.tar.gz
# cd libevent-2.0.10-stable ...

shellscript

参考コード:
#!/bin/bash

HOSTNAME=”XXX.XXX.XXX.157″
PORT=”3306″
USERNAME=”r ...

Java

Javaコード
package com.startnews24.itdemo;
class Sample {
String name;
int a;

void m() {
Syste ...

Java

Javaコード:
public class CFTInterceptor extends AnnotationValidationInterceptor {

@Override
public String ...

PHP

サンプル1
<?php
$filename = “/var/www/st24.txt”;
$ctlp = fopen($filename, “r”); ...

PHP

PHPコード:
function getPostDataInfo(array $_data = array(),$n = ”){
$postData = empty($_data) ? I(‘p ...

PHP

PHPコード
function getHeadersInfo($url,$data=FALSE){
$_headers = get_headers($url,1);
if( !$data ){
retu ...