- 作
@voluntas
- バージョン
1.0.1
- URL
2015 年 1 月 12 日に行われた 「テレビ連動サーバー」勉強会 向けの発表資料です。
String.prototype.before = function(word, include){ | |
var idx = this.indexOf(word) | |
var l = include ? word.length : 0 | |
return idx >= 0 ? | |
this.substr(0, idx + l) : | |
"" | |
} | |
String.prototype.after = function(word, include){ | |
var idx = this.indexOf(word) | |
var l = include ? 0 : word.length |
@voluntas
1.0.1
2015 年 1 月 12 日に行われた 「テレビ連動サーバー」勉強会 向けの発表資料です。
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
/** | |
* KAI eCRM | |
* | |
* 画像操作クラス | |
* | |
* @package application | |
* @author an | |
* @version 1.0α | |
* @filesource |
test2(); | |
/** | |
* 方法测试 | |
*/ | |
function test2() { | |
echo IntToCn(333030); // 三十三万三千零三十 | |
echo IntToCn(1111); // 一千一百一十一 | |
echo IntToCn(101010101); // 一亿一百零一万零一百零一 | |
} |
1 什么是会话控制 | |
出现原因:http是无状态协议的,每次都是不同的服务器请求,无法维护两个请求事务之间的关系. | |
会话控制:能够在网站中跟踪一个变量,通过对变量的跟踪,就可以使多个请求事物之间建立联系,根据授权和用户身份显示不同的内容,不同页面 | |
cookie:是服务器设置在客户端的文本文件,保存客户端得个人信息. | |
2 会话跟踪技术 | |
1 隐藏表单域 | |
2 url重写 | |
3 cookie技术 | |
4 session技术 | |
ProxyRequests Off | |
ProxyPreserveHost On | |
<Proxy *> | |
Order deny,allow | |
Allow from all | |
</Proxy> | |
ProxyPass /EMBackend http://localhost:8080/backend/mvc | |
ProxyPassReverse /EMBackend http://localhost:8080/backend/mvc |
Lsyncdが利用している inotifyが監視できるファイル数には上限があります。 | |
この上限を超えると、Lsyncdは動作を停止 or 起動してくれません。 | |
起動しようとすると、こんなエラーが発生します。(しました) | |
lsyncd: Error, Terminating since out of inotify watches.#012Consider increasing /proc/sys/fs/inotify/max_user_watches | |
ちなみに、上限値は以下で確認できます。 |
さて前回jQueryをダウンロードしましたが、今回は実際にjQueryを使う際に必要になる基本セレクタについてを勉強します。 | |
まずセレクタとは何なのかを簡単に説明します。 | |
下記のようなHTMLがあったとします。 | |
<html> | |
<head> | |
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"> | |
<title>jQueryを使ってみよう。(基本編 セレクタ1)</title> | |
<script type="text/javascript" src="../jquery-1.2.6.min.js"></script> |
$(".sparkline.pie_week").sparkline([1, 1, 2], { | |
type: 'pie', | |
width: '400', | |
height: '400', | |
enableTagOptions: true, | |
tooltipFormat: '<span style="color: {{color}}">●</span> {{offset:names}} ({{percent.1}}%)', | |
tooltipValueLookups: { | |
names: { | |
0: 'one', | |
1: 'two', |
■mod_sslインストール[root@centos ~]# yum -y install mod_ssl ← mod_sslインストール | |
■WebサーバーSSL設定(1)サーバー用秘密鍵・証明書作成[root@centos ~]# cd /etc/pki/tls/certs/ ← ディレクトリ移動 | |
[root@centos certs]# sed -i 's/365/3650/g' Makefile ← サーバー用証明書有効期限を1年から10年に変更 | |
[root@centos certs]# make server.crt ← サーバー用秘密鍵・証明書作成 | |
umask 77 ; \ | |
/usr/bin/openssl genrsa -des3 1024 > server.key | |
Generating RSA private key, 1024 bit long modulus |