JavaScript

1.test()
var str = “1a1b1c”;
var reg = new RegExp(“1.”, “”);
alert(re ...

Java

Javaコード
HttpSession session = request.getSession();
session.setAttribute(“demo_startnews24”, R ...

Java

Javaコード
public class Demo {

public static void main(String[] args) {
String text = “”; ...

Linux

1.エラー現象
$ sudo su
password for mastodon:
mastodon is not in the sudoers file. This incident will be repor ...

PHP

方法1–Smarty
<?php
require(“smarty/Smarty.class.php”);
$t = new Smarty;
$t->ass ...

MySQL

方法1
SELECT *
FROM changfatbl AS r1 JOIN
(SELECT ROUND(RAND() *
(SELECT MAX(id)
FROM changfatbl)) ...

PHP

PHPコード:
function globalClearFunc($global_array, $arg, $specialchars = true, $default = null) {
if(key_exists( ...

PHP

方法1
header(‘Cache-control: private, must-revalidate’);

方法2
session_cache_limiter(‘pri ...

PHP

PHPコード:
require __DIR__ . ‘./PHPExcel/IOFactory.php’;
$PHPReader = new \PHPExcel_Reader_Excel2007 ...

JavaScript

サンプルコード
<script type=”text/javascript” src=”demo.js?version=20170422″></script&g ...

Java

Javaコード:
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;

publ ...

Java

Javaコード:
Product srcProduct = new Product();
srcProduct.setName(“iphone 7”);
Product destProd ...

Linux

操作手順
#rpm -ivh mpfr-2.4.1-6.el6.x86_64.rpm
#rpm -ivh ppl-0.10.2-11.el6.x86_64.rpm
#rpm -ivh cpp-4.4.7-4.e ...

Java

Javaコード:
public static String escape(String target) {
if (target == null) {
return “”;
} ...

Java

Javaコード
public String toStrFunc() {
String sptr = System.getProperty(“line.separator”);
Strin ...

Java

Javaコード
private String sampleFunc(String strCsv){
String strCft = null;
if(strCsv.length() < 2)
st ...

Java

Javaコード:
public interface HandlerAdapter {
public boolean supports(Object handler);
public void handle(Ob ...

Java

サンプルコード
<mvc:resources mapping=”/css/**” location=”/WEB-INF/resources/css/”/>
& ...