<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet type="application/rss+xml" title="XSL Formatting" href="/hpx.xsl" media="all"?><rss version="2.0">	<channel>		<title><![CDATA[日本語検索エンジン]]></title>		<image>			<title><![CDATA[日本語検索エンジン]]></title>			<link>http://mim1314.com</link>			<url>http://mim1314.com/pic/250-250.JPG</url>		</image>		<description><![CDATA[日本語検索エンジン]]></description>		<link>http://mim1314.com</link>		<language>ja</language>		<generator>Mim1314.com</generator>		<copyright>FREE</copyright>		<item>			<title><![CDATA[ 	         java使用代理访问]]></title>			<link>http://mim1314.com/somewordsdetail/504</link>			<author>hi@mim1314.com (Mim1314.com)</author>			<guid>http://mim1314.com/somewordsdetail/504</guid>			<description><![CDATA[有些时候我们的网络不能直接连接到外网, 需要使用http或是https或是socket代理来连接到外网, 这里是java使用代理连接到外网的一些方法.

   方法一使用系统属性来完成代理设置, 这种方法比较简单, 但是不能对单独的连接来设置代理:   
public static void main(String[] args) {        
   Properties prop = System.getProperties();        
   // 设置http访问要使用的代理服务器的地址        
   prop.setProperty(\"http.proxyHost\", \"192.168.0.254\");        
   // 设置http访问要使用的代理服务器的端口        
   prop.setProperty(\"http.proxyPort\", \"8080\");        
   // 设置不需要通过代理服务器访问的主机，可以使用*通配符，多个地址用|分隔        
   prop.setProperty(\"http.nonProxyHosts\", \"localhost|192.168.0.*\");        
   // 设置安全访问使用的代理服务器地址与端口        
   // 它没有https.nonProxyHosts属性，它按照http.nonProxyHosts 中设置的规则访问        
   prop.setProperty(\"https.proxyHost\", \"192.168.0.254\");        
   prop.setProperty(\"https.proxyPort\", \"443\");        
   // 使用ftp代理服务器的主机、端口以及不需要使用ftp代理服务器的主机        
   prop.setProperty(\"ftp.proxyHost\", \"192.168.0.254\");        
   prop.setProperty(\"ftp.proxyPort\", \"2121\");        
   prop.setProperty(\"ftp.nonProxyHosts\", \"localhost|192.168.0.*\");        
   // socks代理服务器的地址与端口        
   prop.setProperty(\"socksProxyHost\", \"192.168.0.254\");        
   prop.setProperty(\"socksProxyPort\", \"8000\");        
   // 设置登陆到代理服务器的用户名和密码        
   Authenticator.setDefault(new MyAuthenticator(\"userName\", \"Password\"));
}    
static class MyAuthenticator extends Authenticator {        
   private String user = \"\";        
   private String password = \"\";        
   public MyAuthenticator(String user, String password) {            
      this.user = user;            
      this.password = password;        
   }        
   protected PasswordAuthentication getPasswordAuthentication() {            
      returnnew PasswordAuthentication(user, password.toCharArray());        
   }    
}
方法二使用Proxy来对每个连接实现代理, 这种方法只能在jdk 1.5以上的版本使用(包含jdk1.5), 优点是可以单独的设置每个连接的代理, 缺点是设置比较麻烦:
public static void main(String[] args) {        
  try {            
   URL url = new URL(\"http://www.baidu.com\");            
   // 创建代理服务器            
   InetSocketAddress addr = new InetSocketAddress(\"192.168.0.254\",8080);            
   Proxy proxy = new Proxy(Proxy.Type.HTTP, addr); // http 代理            
   // 如果我们知道代理server的名字, 可以直接使用          
   URLConnection conn = url.openConnection(proxy);            
   InputStream in = conn.getInputStream();  
   String s = IOUtils.toString(in);            
   System.out.println(s);        
} catch (Exception e) {            
   e.printStackTrace();        
}    
}...]]></description>		</item>		<item>			<title><![CDATA[软件后面缀个RC是什么意]]></title>			<link>http://mim1314.com/somewordsdetail/503</link>			<author>hi@mim1314.com (Mim1314.com)</author>			<guid>http://mim1314.com/somewordsdetail/503</guid>			<description><![CDATA[RC就是Release Candidate（候选版本）的简称。从微软的惯例来看推出RC版操作系统就代表正式版的操作系统已经离我们不远了，因为微软操作系统的开发步骤是这样的：内部测试->alpha公测->beta公测->RC版->正式版上市；通常微软的RC版本筛选会经历2-3个过程，也就是说微软会推出RC1、RC2或者RC3的操作系统，而随后就是正式版操作系统上市了，因此通常来看RC1版操作系统已经同最终零售版操作系统相差无几了。 ...]]></description>		</item>		<item>			<title><![CDATA[Adobe ActionScript 3.0 * 处理]]></title>			<link>http://mim1314.com/somewordsdetail/502</link>			<author>hi@mim1314.com (Mim1314.com)</author>			<guid>http://mim1314.com/somewordsdetail/502</guid>			<description><![CDATA[打开或关闭全屏模式时，可以使用 Stage 类的 fullScreen 事件来进行检测和响应。例如，进入或退出全屏模式时，您可能需要重新定位、添加或删除屏幕中的项目，如本例中所示：

import flash.events.FullScreenEvent; 
 
function fullScreenRedraw(event:FullScreenEvent):void 
{ 
    if (event.fullScreen) 
    { 
        // Remove input text fields. 
        // Add a button that closes full-screen mode. 
    } 
    else 
    { 
        // Re-add input text fields. 
        // Remove the button that closes full-screen mode. 
    } 
} 
 
mySprite.stage.addEventListener(FullScreenEvent.FULL_SCREEN, fullScreenRedraw);...]]></description>		</item>		<item>			<title><![CDATA[ipa文件的安装方法|iPhone ]]></title>			<link>http://mim1314.com/somewordsdetail/501</link>			<author>hi@mim1314.com (Mim1314.com)</author>			<guid>http://mim1314.com/somewordsdetail/501</guid>			<description><![CDATA[ipa文件的安装方法
本人小白，看到有所谓的ipa文件不知道怎么弄，于是乎找了好久终于找到个教程，特此与大家分享 　
1.下载本文最后的链接中提供的文件，解压后会得到一个名为MobileInstallation且没有任何后缀的文件，将此文件上传至iPhone的/System/Library/PrivateFrameworks/MobileInstallation.framework/文件夹中替换原文件（注意备份！），之后赋予此文件777限。

　　2.我们还需要在将/private/var/mobile/中的Applications文件夹设置为777限，并在/private/var/mobile/Applications/文件夹中新建一个名为Documents的文件夹（注意大小写），同样也设置为777限，之后必须重启iPhone完成安装。

　　3.如何使用.ipa破解文件：将下载到的.ipa破解文件放进我的文档->我的音乐->iTunes->Mobile Applications文件夹中，双击.ipa文件将其导入iTunes，然后打开iTunes将此破解文件同步进iPhone即可完成安装。

　　4.个别玩家可能会在同步中出现不能行的问题，解决方法如下：

　　删除文件夹/private/var/mobile/Application/并重启iPhone，之后在AppStore中下载任意一个免费软件，同步后行此软件一次（切记以后不要删除此软件，否则会造成同步进iPhone的破解软件不能行），之后再次同步你的破解软件就可以了，如果中途报错可再次同步。...]]></description>		</item>		<item>			<title><![CDATA[iText Tutorials - iText Table, Ja]]></title>			<link>http://mim1314.com/somewordsdetail/500</link>			<author>hi@mim1314.com (Mim1314.com)</author>			<guid>http://mim1314.com/somewordsdetail/500</guid>			<description><![CDATA[package com.geek.tutorial.itext.table;

import java.io.FileOutputStream;

import com.lowagie.text.pdf.PdfPTable;
import com.lowagie.text.pdf.PdfPCell;
import com.lowagie.text.pdf.PdfWriter;
import com.lowagie.text.Document;
import com.lowagie.text.Paragraph;
import com.lowagie.text.Element; // import Element class

public class SimplePDFTableAlignAndWidth {

	public SimplePDFTableAlignAndWidth() throws Exception{
		
		Document document = new Document();
		PdfWriter.getInstance(document, 
		new FileOutputStream(\"SimplePDFTableAlignAndWidth.pdf\"));
		document.open();
		
		float[] colsWidth = {1f, 2f}; // Code 1
		PdfPTable table = new PdfPTable(colsWidth);
		
		table.setWidthPercentage(90); // Code 2
		table.setHorizontalAlignment(Element.ALIGN_LEFT);//Code 3
		
		table.addCell(\"1\");
		table.addCell(\"2\");
		table.addCell(\"3\");
		table.addCell(\"4\");
		table.addCell(\"5\");
		table.addCell(\"6\");		
		
		document.add(table);		
		document.close();
	}

	public static void main(String[] args) {	
		try{
			SimplePDFTableAlignAndWidth pdfTable 
				= new SimplePDFTableAlignAndWidth();
		}catch(Exception e){
			System.out.println(e);
		}
	}
}
		
		
Code 1. An array with 2 float values was used to defined a table with 2 columns. The floats in the array define internal table relative widths
Code 2. Set the table width in width percentage of page.
Code 3. Set the horizontal alignment of table. Make sure you import com.lowagie.text.Element class....]]></description>		</item>		<item>			<title><![CDATA[iText Tutorials - iText Table, Ja]]></title>			<link>http://mim1314.com/somewordsdetail/499</link>			<author>hi@mim1314.com (Mim1314.com)</author>			<guid>http://mim1314.com/somewordsdetail/499</guid>			<description><![CDATA[ackage com.geek.tutorial.itext.table;

import java.io.FileOutputStream;

import com.lowagie.text.pdf.PdfPTable;
import com.lowagie.text.pdf.PdfPCell;
import com.lowagie.text.pdf.PdfWriter;
import com.lowagie.text.Document;
import com.lowagie.text.Paragraph;

public class SimplePDFTableColspan {

	public SimplePDFTableColspan() throws Exception{
		
		Document document = new Document();
		PdfWriter.getInstance(document, 
		   new FileOutputStream(\"SimplePDFTableColspan.pdf\"));
		document.open();
		
		PdfPTable table = new PdfPTable(2);
		
		
		PdfPCell cell = 
			new PdfPCell(new Paragraph(\"column span 2\"));
		cell.setColspan(2);
		table.addCell(cell);
		
		table.addCell(\"1\");
		table.addCell(\"2\");

		table.addCell(\"3\");
		table.addCell(\"4\");

		table.addCell(\"5\");
		table.addCell(\"6\");		
		
		document.add(table);		
		document.close();
	}

	public static void main(String[] args) {	
		try{
			SimplePDFTableColspan pdfTable 
				= new SimplePDFTableColspan();
		}catch(Exception e){
			System.out.println(e);
		}
	}
}...]]></description>		</item>		<item>			<title><![CDATA[DOS命令下打开一个文件夹]]></title>			<link>http://mim1314.com/somewordsdetail/498</link>			<author>hi@mim1314.com (Mim1314.com)</author>			<guid>http://mim1314.com/somewordsdetail/498</guid>			<description><![CDATA[DOS命令下打开一个文件夹
[ 标签：dos 命令,命令,文件夹 ]
如何运用DOS命令打开一个文件夹，使该文件夹以Windows窗口打开？
【九神封印】回答:2人气:2解决时间:2009-11-07 22:54
满意答案
在命令提示符窗口中输入
start 完整路径
如：start c:\\windows
start c:\\\"Program Files\" (路径中有窗口的 需要加\"\" ， 但要注意的是 一次命令只允许加一次\"\")...]]></description>		</item>		<item>			<title><![CDATA[2.1、2.2 用91安装APP、IPA简]]></title>			<link>http://mim1314.com/somewordsdetail/497</link>			<author>hi@mim1314.com (Mim1314.com)</author>			<guid>http://mim1314.com/somewordsdetail/497</guid>			<description><![CDATA[2.1、2.2 用91安装APP、IPA简单方法『申精』
看过论坛上很多关于APP和IPA的方法
那小弟也提供一个用91安装的方法～～～～
真的非常的简单...

废话少说～～

开始
1.首先把下载好的IPA文件，把扩展名改为：rar
然后再解压文件，解压后一直点击会发现有 Payload 文件夹。可以看到 app 文件夹。
好！第一步完成了
注： app 软件可省略以上步骤，直接往下看


2.打开手机助手软件( iPhone PC Suite )，点击“文件管理”，定位到
　　“ /private/var/stash/Applications ”文件夹　。　
注：视版本不同“ Applications ”文件夹的名称也不同，有的版本是“ Applications.xxxxxx ”文件夹，( xxxxxx 为随机生成的字母
点击左上角“上传图标”—“上传目录”，上传刚才改好的APP文件。
这里很重要，把“权限”改为“ 755 ”，勾选“将更改应用于该文件夹、子文件夹和文件”，点确定。


3.双击打开上传的APP文件夹，看到其中有一个“ Info.plist ”文件，双击打开它，出现文件编辑器对话框
拉动滚动条到下面，看到两行文字
　　SignerIdentity
　　Apple iPhone OS Application Signing
选中后，按键盘上的“ Delete ”键删除，点击右下角“关闭”，出现“提示”对话框，点“是”。


4.最后一步就是重启手机，然后注销点击“注销并修复图标”

完成！！！！！...]]></description>		</item>		<item>			<title><![CDATA[1T3XT: Product]]></title>			<link>http://mim1314.com/somewordsdetail/496</link>			<author>hi@mim1314.com (Mim1314.com)</author>			<guid>http://mim1314.com/somewordsdetail/496</guid>			<description><![CDATA[iText PDF
AGPL Java-PDF library
iText is a library that allows you to generate PDF files on the fly.
The most recent version is iText 5.0.0.
You can DOWNLOAD IT HERE.

Project description
iText is a library that allows you to generate PDF files on the fly.

iText is an ideal library for developers looking to enhance web- and other applications with dynamic PDF document generation and/or manipulation. iText is not an end-user tool. Typically you won\'t use it on your Desktop as you would use Acrobat or any other PDF application. Rather, you\'ll build iText into your own applications so that you can automate the PDF creation and manipulation process. For instance in one or more of the following situations:...]]></description>		</item>		<item>			<title><![CDATA[２．７．１．２．Linuxの]]></title>			<link>http://mim1314.com/somewordsdetail/495</link>			<author>hi@mim1314.com (Mim1314.com)</author>			<guid>http://mim1314.com/somewordsdetail/495</guid>			<description><![CDATA[Linuxの基本コマンドについて解説します。
Linuxの基本コマンドは、殆どがUNIXのコマンドと同等です。既にご存知の方は、この節は読み飛ばしてかまいません。「２．７．１．３．viエディタ」に進んでください。

何らかの理由により実行中のコマンドを途中で終了したい場合は、「Ctrlキーを押しながらCキーを押す」(今後このようにCtrlキーを押しながら何かのキーを押す動作は、Ctrl+Cのように表記します)ことにより終了できます。但しコマンドによってはCtrl+Cでは終了できないものもあります。このような場合には、後述するkillコマンドで終了してください。

下記の基本コマンドを解説します。全部を読むのは大変ですので、必要な時にコマンドリファレンスとして利用する程度でもいいかもしれません。

kon, man, mkdir, cd, rmdir, pwd, ls, cp, rm, mv, cat, tail, less, chmod, chown, chgrp, find, su, exit, mke2fs, mount, umount, rpm, df, du, ps, kill, tar, turboservice, turbonetcfg, ping, ifconfig, uname...]]></description>		</item>		<item>			<title><![CDATA[Flashビデオのライブ配信]]></title>			<link>http://mim1314.com/somewordsdetail/494</link>			<author>hi@mim1314.com (Mim1314.com)</author>			<guid>http://mim1314.com/somewordsdetail/494</guid>			<description><![CDATA[1.PCとカメラを接続する
PCとカメラをUSBやi.Link等で接続します。カメラをPC接続モードに設定します。
PCがカメラを認識している事を確認してください。
PCとカメラの詳しい接続方法は、カメラ付属のマニュアルをご参照ください。
2.Flash Media Live Encoderの起動
Windowsの[スタート]→[すべてのプログラム]→[Adobe]→[Flash Media Live Encoder 3]で起動できます。
お使いの環境でプログラム起動方法が異なる場合があります。
正しくPCとカメラが接続されていれば、左側にカメラからの入力映像が、右側にエンコード後にFMSに出力する映像が表示されます。

3.エンコード設定を行う
画面左下の「Encoding Options」タブを選択すると、エンコード設定が行えます。
「Preset」のリストから、既存の設定を呼び出す事ができます。
また、「Size」「fps」「Bit rate」等の任意指定も可能です。

4.FMSの接続先を入力し、接続テストを行う
画面右下の「Planel Options」リストから、「Output」を選択すると、FMSの接続先の設定が行えます。
「FMS URL」欄にFMSのアドレスを入力します。
「Stream」欄にストリーム名を入力します。
[Connect]ボタンをクリックすると、FMSへ接続します。 接続に成功すると[Connect]ボタンがの表示が[Disconnect]へと変化します。[Disconnect]ボタンをクリックすると、FMSへの接続を切ります。
カメラからの入力映像をエンコードしFLVファイルをして保存したい場合は、「Save to File」にチェックを入れ、保存ファイル名を入力します。保存場所は[Browse]ボタンをクリックし指定できます。

接続ができない場合「Problem with Primary Server」のメッセージを表示します。入力した「FMS URL」が正しいか、FMSがオンライン状態か確認してください。
5.メタデータの入力を行う
画面右下の「Planel Options」リストから、「Metadata」を選択すると、メタデータの情報入力が行えます。
「author」「copyright」「description」「keywords」「rating」「title」各欄を任意で入力します。

6.エンコードを開始する
画面下の[Start]ボタンをクリックしエンコードを開始します。

7.エンコード中
エンコードを開始すると、画面左下の「Encoding Log」タブが選択され、 エンコードログが表示されます。
画面右下には「Status」が表示されます。

PCでライブ配信を確認する

FMSにライブ配信を視聴するには、ActionScriptでプログラムされたFlashのSWFファイルが必要です。
FMSにライブ配信確認用のサンプルFlashがありますので、それを使った確認方法を記載します。...]]></description>		</item>		<item>			<title><![CDATA[33333333333333]]></title>			<link>http://mim1314.com/somewordsdetail/492</link>			<author>hi@mim1314.com (Mim1314.com)</author>			<guid>http://mim1314.com/somewordsdetail/492</guid>			<description><![CDATA[333333333333333333333...]]></description>		</item>		<item>			<title><![CDATA[111111111111111]]></title>			<link>http://mim1314.com/somewordsdetail/491</link>			<author>hi@mim1314.com (Mim1314.com)</author>			<guid>http://mim1314.com/somewordsdetail/491</guid>			<description><![CDATA[1111111111111111111111...]]></description>		</item>		<item>			<title><![CDATA[test]]></title>			<link>http://mim1314.com/somewordsdetail/490</link>			<author>hi@mim1314.com (Mim1314.com)</author>			<guid>http://mim1314.com/somewordsdetail/490</guid>			<description><![CDATA[testeststwetsset...]]></description>		</item>		<item>			<title><![CDATA[MINIXソースの旅]]></title>			<link>http://mim1314.com/somewordsdetail/485</link>			<author>hi@mim1314.com (Mim1314.com)</author>			<guid>http://mim1314.com/somewordsdetail/485</guid>			<description><![CDATA[一、defineの使い方

　関数
#define _PROTOTYPE(function, params)    function params

_PROTOTYPE( void _exit, (int _status));


　Value
#define _PC_CHOWN_RESTRICTED    9       /* chown restricted or not */

　IF/ELSE
#ifdef _SYSTEM
#   define _SIGN         -
#   define OK            0
#else
#   define _SIGN         
#endif

/* Minimum sizes required by the POSIX P1003.1 standard (Table 2-3). */
#ifdef _POSIX_SOURCE            /* these are only visible for POSIX */
#define _POSIX_ARG_MAX    4096  /* exec() may have 4K worth of args */
.....

#if _EM_WSIZE > 2
#define ARG_MAX        16384    /* # bytes of args + environ for exec() */
#else
#define ARG_MAX         4096    /* args + environ on small machines */
#endif

.....
#define SSIZE_MAX      32767    /* max defined byte count for read() */
#endif /* _POSIX_SOURCE */




...]]></description>		</item>		<item>			<title><![CDATA[WindowsでMYSQLのレプリケーション【replication】を作る]]></title>			<link>http://mim1314.com/somewordsdetail/484</link>			<author>hi@mim1314.com (Mim1314.com)</author>			<guid>http://mim1314.com/somewordsdetail/484</guid>			<description><![CDATA[レプリケーション【replication】簡単に挑戦


[コンフィグファイル]

マスター my.ini
port=3306
datadir=\"D:/MySQL Server 5.0/Data/\"

server-id=1
log-bin=mysql-bin.log


スレーブ my2.ini
port=3307
datadir=\"D:/MySQL Server 5.0/Data2/\"

server-id=2

[MYSQL起動]
mysqld-nt --defaults-file=my.ini
mysqld-nt --defaults-file=my2.ini

[設定]
マスター
mysql -uroot -ppassword -P3306
>grant replication slave on *.* to \'rep\'@\'localhost\' identified by \'rep\';
>flush tables with read lock;
>show master status;
+------------------+----------+--------------+------------------+
| File             | Position | Binlog_Do_DB | Binlog_Ignore_DB |
+------------------+----------+--------------+------------------+
| mysql-bin.000002 |      228 |              |                  |
+------------------+----------+--------------+------------------+
1 row in set (0.00 sec)

スレーブ
mysql -uroot -ppassword -P3307
>CHANGE MASTER TO MASTER_HOST=\'localhost\',MASTER_USER=\'rep\',MASTER_PASSWORD=\'rep\',MASTER_LOG_FILE=\'mysql-bin.000002\',MASTER_LOG_POS=0;
>start slave;

マスター
>unlock tables;

[テスト]
マスター
>create database aa;
>use aa:
>create table test(i int);
>insert into test values(1);

スレーブ
>use aa:
>select * from test;
もし
+------+
| i    |
+------+
|    1 |
+------+
1 row in set (0.00 sec)

と表示されたら、成功しました。...]]></description>		</item>		<item>			<title><![CDATA[P2P技術]]></title>			<link>http://mim1314.com/somewordsdetail/481</link>			<author>hi@mim1314.com (Mim1314.com)</author>			<guid>http://mim1314.com/somewordsdetail/481</guid>			<description><![CDATA[P2P技術存在する意味

今まで、IPの数は限っています。
そして、普通の場合、ユーザはグローバルIPもっていません。

でもSKYPEなどのソフトサーバと通信の場合、どうやって、Local Networkのユーザと外部のサーバーのConnectionを立ちますか？

このはNAT又はNAPT登場

NATはLocal Networkのユーザと外部のサーバーのConnectionを中継することが出来ます。

ユーザー <==> NAT <==> 外部のサーバ


...]]></description>		</item>		<item>			<title><![CDATA[フランス語Tips]]></title>			<link>http://mim1314.com/somewordsdetail/479</link>			<author>hi@mim1314.com (Mim1314.com)</author>			<guid>http://mim1314.com/somewordsdetail/479</guid>			<description><![CDATA[ 動詞は「aller」「行く」
活用形は

* je vais
* tu vas
* il va
* elle va
* nous allons
* vous allez
* ils vont
* elles vont...]]></description>		</item>		<item>			<title><![CDATA[今日からEmacs 挑戦]]></title>			<link>http://mim1314.com/somewordsdetail/477</link>			<author>hi@mim1314.com (Mim1314.com)</author>			<guid>http://mim1314.com/somewordsdetail/477</guid>			<description><![CDATA[ダウンロード
ここ
http://ftp.gnu.org/gnu/emacs/...]]></description>		</item>		<item>			<title><![CDATA[大きいなファイルを小さくにする]]></title>			<link>http://mim1314.com/somewordsdetail/474</link>			<author>hi@mim1314.com (Mim1314.com)</author>			<guid>http://mim1314.com/somewordsdetail/474</guid>			<description><![CDATA[splitというコマンドを使うと、便利です。
例：
split -l 100 big.txt small.

ファイルbig.txtを100行つづ分ける。
分割したファイルを
small.をprefixして、保存される
例：
small.aa
small.ab
small.ac
......
...]]></description>		</item>		<item>			<title><![CDATA[Smartyを使ってみよう]]></title>			<link>http://mim1314.com/somewordsdetail/471</link>			<author>hi@mim1314.com (Mim1314.com)</author>			<guid>http://mim1314.com/somewordsdetail/471</guid>			<description><![CDATA[プログラムとTemplateファイルを分割するために
いろいろな方法があります。

Zendも出来ますが、PHP5しか動かなくて、
Smartyは軽くし、使いやすい

ダウンロードはこち
http://www.smarty.net/do_download.php?download_file=Smarty-2.6.18.tar.gz

使う方法

http://www.smarty.net/quick_start.php...]]></description>		</item>		<item>			<title><![CDATA[PHPセキュリティ防御]]></title>			<link>http://mim1314.com/somewordsdetail/466</link>			<author>hi@mim1314.com (Mim1314.com)</author>			<guid>http://mim1314.com/somewordsdetail/466</guid>			<description><![CDATA[PHPで作ったサイトは攻撃される可能性が別の言語より少ないではないと思います。

あなたのサイトは安全でしょうか？

まずいかの物チェックしましょう。

１．エラーレポート
全部のエラーやウオーニングレポート必要
  ini_set(\'error_reporting\', E_ALL | E_STRICT);
エラーやウオーニング表示させない
  ini_set(\'display_errors\', \'Off\');
ログファイルにエラー残す
  ini_set(\'log_errors\', \'On\');
ログファイルを指定する
  ini_set(\'error_log\', \'/usr/local/apache/logs/error_log\');
...]]></description>		</item>		<item>			<title><![CDATA[Cビット演算趣味ある方ヘ]]></title>			<link>http://mim1314.com/somewordsdetail/465</link>			<author>hi@mim1314.com (Mim1314.com)</author>			<guid>http://mim1314.com/somewordsdetail/465</guid>			<description><![CDATA[http://mim1314.com/learning.php#p2

基本から、学ぶ！

深くまで、勉強！...]]></description>		</item>		<item>			<title><![CDATA[Linux Tips]]></title>			<link>http://mim1314.com/somewordsdetail/464</link>			<author>hi@mim1314.com (Mim1314.com)</author>			<guid>http://mim1314.com/somewordsdetail/464</guid>			<description><![CDATA[1.ディレクトリの大きさを調査
du -sh ディレクトリ名
ファイル多い場合は遅いかも知れません...]]></description>		</item>		<item>			<title><![CDATA[LINUX簡単なデータバックアップ方法]]></title>			<link>http://mim1314.com/somewordsdetail/463</link>			<author>hi@mim1314.com (Mim1314.com)</author>			<guid>http://mim1314.com/somewordsdetail/463</guid>			<description><![CDATA[手順
１.フォルダーを圧縮する
tar cvfz backup.tar.gz / --xclude=/test

２．ファイルを添付してメール送信
echo \"backup\" | mutt -s `date \'+backup%Y-%m-%d\'` -a backup.tar.gz あなたのメールアドレス...]]></description>		</item>		<item>			<title><![CDATA[LINUX簡単なファイルを見つける方法]]></title>			<link>http://mim1314.com/somewordsdetail/462</link>			<author>hi@mim1314.com (Mim1314.com)</author>			<guid>http://mim1314.com/somewordsdetail/462</guid>			<description><![CDATA[LINUX簡単なファイルを見つける方法
-find/ -size+10000000c  
 ディレクトリ中に大きさが10000000超えたファイル
-find / -amin -10 
 ディレクトリ中に最後10分以内アクセスされたファイル 
-find / -amin +10 
 ディレクトリ中に最後10分以内アクセスされなかったファイル 
-find / -atime -2 
 ディレクトリ中に最後48時間間以内アクセスされたファイル 
-find / -atime +2 
 ディレクトリ中に最後48時間間以内アクセスされなかったファイル 
-find / -empty 
 ディレクトリ中に空白のファイルとフォルダー
-find / -group cat 
 ディレクトリ中のgroup catのファイル 
-find / -mmin -5 
 ディレクトリ中に最後5分以内変更されたファイル 
-find / -mmin +5 
 ディレクトリ中に最後5分以内変更されなかったファイル 
-find / -mtime -1 
 ディレクトリ中に最後24時間以内変更されたファイル 
-find / -mtime +1 
 ディレクトリ中に最後24時間以内変更されなかったファイル 
-find / -nouser 
 ディレクトリ中誰でも属しないファイル
-find / -user fred 
 ディレクトリ中のユーザFREDのファイル 


...]]></description>		</item>		<item>			<title><![CDATA[Linuxサーバー間のファイルコピー]]></title>			<link>http://mim1314.com/somewordsdetail/461</link>			<author>hi@mim1314.com (Mim1314.com)</author>			<guid>http://mim1314.com/somewordsdetail/461</guid>			<description><![CDATA[Linuxサーバー間のファイルコピー

(1)rsync 
Aサーバ(略称A)               Bサーバ(略称B)

説明:
A>　Aサーバで作業
B>　Bサーバで作業


準備
A>whereis keychain
見つけない場合
A>wget http://mirror.caoslinux.org/cAos-1/creation/keychain-2.0.3-1/RPMS/noarch/keychain-2.0.3-1.noarch.rpm
A>rpm -i keychain-2.0.3-1.noarch.rpm


手順：
1.
A>ssh-keygen -t dsa
A>id_dsa.pub中の公開鍵内容をコピー
B>ユーザCしたの.sshしたのauthorized_keysに先作った鍵を貼り付け
A>ssh ユーザC@B  #問題なければ、Bサーバに入ります
A>su - [Aサーバのrsync実行出来るユーザ] -c \"rsync --verbose --progress --stats --delete --recursive --times --perms --rsh=/usr/bin/ssh --links --exclude \"除きたいファイル\" [ソースディレクトリ]/* ユーザC@B:[目標ディレクトリ] >[AサーバのLOGディレクトリ]/rsync_`date \'+%y%m%d\'`.log 2>&1\"

scp
AからBまでファイル/tmp/a.txtをコピー

A>usr/bin/scp ユーザC@B:/tmp/a.txt /tmp/a.txt

BからAまでファイル/tmp/a.txtをコピー
    
A>/usr/bin/scp /tmp/a.txt ユーザC@B:/tmp/a.txt



...]]></description>		</item>		<item>			<title><![CDATA[JAVA　EXEファイル作る手順]]></title>			<link>http://mim1314.com/somewordsdetail/458</link>			<author>hi@mim1314.com (Mim1314.com)</author>			<guid>http://mim1314.com/somewordsdetail/458</guid>			<description><![CDATA[準備
１　eclipse
２　exewrap
ダウンロードはこちら
http://www.ne.jp/asahi/web/ryo/exewrap/

手順
１eclipseでjarファイル取得
プロジェクト右クリック->Export->JAVA・JARファイル->NEXT...

２．exewrapの解凍したフォルダーに行って、
exewrap.exe -j -g jarファイル　
実行して、EXEファイルを入手。 
...]]></description>		</item>		<item>			<title><![CDATA[CSS謎？]]></title>			<link>http://mim1314.com/somewordsdetail/26</link>			<author>hi@mim1314.com (Mim1314.com)</author>			<guid>http://mim1314.com/somewordsdetail/26</guid>			<description><![CDATA[

-----------------------------------
1.リンクの四つスタイル
a:link、a:visited、a:hover、a : active
例：

a:link{font-weight : bold ;text-decoration : none ;color : #c00 ;}
a:visited {font-weight : bold ;text-decoration : none ;color : #c30 ;}
a:hover {font-weight : bold ;text-decoration : underline ;color : #f60 ;}
a:active {font-weight : bold ;text-decoration : none ;color : #90 ;} 

通常の属性
clear:both;
width:545px;
float:left;
margin-right:10px;
margin-top:10px;
margin:10px 0px;
margin-bottom:10px;
overflow:hidden;
background-color:#8d8d8d;
padding:8px;
color:#ffffff;
border:0px;
font-size:12px;
font-weight:normal;
font-style:normal;
font-family:\"\", sans-serif;
line-height:normal;
text-decoration:none;


使用方法
その１
#footer_links {
	text-align:center;
	margin:10px 0px 5px 0px;
}
<p id=></p>

その２
aaaaa{
	background-color:#111111;
	padding:6px;
	text-align:left;
	color:#ffffff;
}
<aaaaa></aaaaa>
その３
.bbbbb {
	text-align:center;
	margin:10px 0px;
}

<p calss=bbbbb></p>



Example:
<html>
<head>
<style type=\"text/css\">
h1 {color: #00ff00}
h2 {color: #dda0dd}
p {color: rgb(0,0,255)}
</style>
</head>

<body>
<h1>This is header 1</h1>
<h2>This is header 2</h2>
<p>This is a paragraph</p>
</body>
</html>...]]></description>		</item>		<item>			<title><![CDATA[Eclipse]]></title>			<link>http://mim1314.com/somewordsdetail/22</link>			<author>hi@mim1314.com (Mim1314.com)</author>			<guid>http://mim1314.com/somewordsdetail/22</guid>			<description><![CDATA[最近Eclipseを使っています。

さまざまなプラグインはとても便利です。


1.　EPIC
http://e-p-i-c.sf.net/updates

プラグインインストル方法
Eclipse開く->Help->Software　Updates->Find　Install->Search for New future to intall->New remote site->NEXT thing ...


コードフォーマットホットキー　CTRL+SHIFT+F...]]></description>		</item>		<item>			<title><![CDATA[MXとA記録]]></title>			<link>http://mim1314.com/somewordsdetail/18</link>			<author>hi@mim1314.com (Mim1314.com)</author>			<guid>http://mim1314.com/somewordsdetail/18</guid>			<description><![CDATA[MXとA記録をチェック
MX
# host -t mx domain.com 
domain.com. mail is handled by 10 mail.domain.com. 

A
# host -t a mail.domain.com 
mail.domain.com. has address xxx.xxx.xxx.xxx 

...]]></description>		</item>		<item>			<title><![CDATA[PERL　MAIL::sendmail]]></title>			<link>http://mim1314.com/somewordsdetail/17</link>			<author>hi@mim1314.com (Mim1314.com)</author>			<guid>http://mim1314.com/somewordsdetail/17</guid>			<description><![CDATA[普通のメール
use Mail::Sendmail;
my $rh_mail;
$rh_mail->{Sender} = \'\';
$rh_mail->{From} = \'\';
$rh_mail->{To} = \'\';
$rh_mail->{Content-Type} = \'text/plain\';
$rh_mail->{Subject} = \'\';
$rh_mail->{Message} = \'\';
sendmail(%$rh_mail);
 
...]]></description>		</item>		<item>			<title><![CDATA[WINDOWSシャットダウン]]></title>			<link>http://mim1314.com/somewordsdetail/12</link>			<author>hi@mim1314.com (Mim1314.com)</author>			<guid>http://mim1314.com/somewordsdetail/12</guid>			<description><![CDATA[シャットダウンNOW
tsshutdn /now 


何秒以後シャットダウン
tsshutdn 秒数　...]]></description>		</item>		<item>			<title><![CDATA[WINDOWSファイル合併]]></title>			<link>http://mim1314.com/somewordsdetail/11</link>			<author>hi@mim1314.com (Mim1314.com)</author>			<guid>http://mim1314.com/somewordsdetail/11</guid>			<description><![CDATA[copy ファイル１　ファイル２ test.txt

ファイル１をファイル２を合併して、text.txtになる...]]></description>		</item>		<item>			<title><![CDATA[PHPとPERL]]></title>			<link>http://mim1314.com/somewordsdetail/10</link>			<author>hi@mim1314.com (Mim1314.com)</author>			<guid>http://mim1314.com/somewordsdetail/10</guid>			<description><![CDATA[-- Perl arrays --	-- Php arrays --
@a = ();	$a = array();
@a = ( \'xx\', 11, 33.5, );	$a = array( \'xx\', 11, 33.5, );
@a = 12..33;	$a = range(12,33);
$a[2] = \'something\';	$a[2] = \'something\';
$len = scalar(@a);	$len = count($a);
# or	
$len = @a;	
@a3 = (\'xx\', @a1, @a2);	$a3 = array_merge(\'xx\', $a1, $a2);
($x, $y) = @a;	list($x, $y) = $a;
$a[@a] = \'new\'; # push	$a[] = \'new\'; # push
push	array_push
pop	array_pop
shift	array_shift
unshift	array_unshift
splice	array_splice
foreach $i (@a) { .. }	foreach ($a as $i) { .. }
-- Perl hashes --	-- Php hashes --
%h = ();	$h = array();
%h = ( \'x\' => \'y\',	$h = array( \'x\' => \'y\',
\'z\' => \'w\',	\'z\' => \'w\',
);	);
$h{\'x\'} = 7;	$h[\'x\'] = 7;
while (($key,$value) = each(%h)	foreach ($h as $key => $value)
{ .. }	{ .. }
$a = keys(%h);	$a = array_keys($h);
$b = values(%h);	$b = array_values($h);
delete $h{\'x\'};	unset( $h[\'x\'] );
-- Perl data structures --	-- Php data structures --
%h = (\'a\'=>13, \'b\'=>25);	$h = array(\'a\'=>13, \'b\'=>25);
@x = (\'hi\', \'there\', \'all\',);	$x = array(\'hi\', \'there\', \'all\',);
@mix = ( \\%h, \\@x,	$mix = array($h, $x,
[33..39],	range(33,39),
{ x=>15, yy=>23, },	array(\'x\'=>15, \'yy\'=>23),
);	);
$mix[0]->{\'b\'} # == 25	$mix[0][\'b\'] # == 25
$mix[0]{\'b\'} # == 25	
$mix[2]->[2] # == 35	$mix[2][2] # == 35
$mix[2][2] # == 35	
-- Perl array split/join --	-- Php array split/join --
@a = split( \',\', $s );	$a = preg_split( \'/,/\', $s,
	-1, PREG_SPLIT_NO_EMPTY );
@a = split( \'\\s+\', $s );	$a = preg_split( \'/\\s+/\', $s,
	-1, PREG_SPLIT_NO_EMPTY );
$s = join( \",\", @a );	$s = join( \",\", $a );
-- Perl case conversion --	-- Php case conversion --
$s = lc($s);	$s = strtolower($s);
$s = uc($s);	$s = strtoupper($s);
$s =~ tr/a-z/A-Z/;	
-- Perl string comparisons --	-- Php string comparisons --
$s1 eq $s2	strcmp($s1,$s2) == 0
	# or
	$s1 === $s2
$s1 lt $s2	strcmp($s1,$s2) < 0
-- Perl functions --	-- Php functions --
sub foo {	function foo() {
my @args = @_;	$args = func_get_args();
}	}
sub foo {	function foo() {
$x = 5;	global $x;
}	$x = 5;
	}
	function foo2($x, $y) {
	}
foo2( \\@a, \\%h );	foo2( $a, $h );
-- Perl string matching operations --	-- Php string matching operations --
$s =~ m/(\\w+)/;	preg_match( \"\"/(\\w+)/\"\", $s, $match );
$substr = $1;	$substr = $match[1];
@all = ($s =~ m/(\\w+)/g);	preg_match_all( \"\"/(\\w+)/\"\", $s, $match );
	$all = $match[0];
$s =~ s/\\s+/X/;	$s = preg_replace( \"\"/\\s+/\"\", \'X\', $s, 1 );
$s =~ s/\\s+/X/g;	$s = preg_replace( \"\"/\\s+/\"\", \'X\', $s );
$s =~ s/^\\s+竖线\\s+$//g;	$s = trim($s);
-- Perl basename/dirname --	-- Php basename/dirname --
use File::Basename;	
$b = basename($path);	$b = basename($path);
$d = dirname($path);	$d = dirname($path);
-- Perl environment variables --	-- Php environment variables --
%ENV	$_SERVER
$ENV{REQUEST_METHOD}	$_SERVER[REQUEST_METHOD]
$ARGV[$i]	$argv[$i+1]
$0	$argv[0] # Php/CGI only
-- Perl POST/GET parameters --	-- Php POST/GET parameters --
#form/hyperlink parameters:	#form/hyperlink parameters:
# s : single-valued	# s : single-valued
# m : multi-valued	# m[] : multi-valued
	# (such as multi-selections
use CGI (:standard);	# and checkbox groups)
	$PARAM
	= array_merge($_GET, $_POST);
$s = param(\'s\');	$s = $PARAM[\'s\']; # a scalar
@m = param(\'m\');	$m = $PARAM[\'m\']; # an array
@param_names = param();	$param_names = array_keys($PARAM);
$num_params = param();	$num_params = count($PARAM);
-- Perl HTML elements --	-- Php HTML elements --
use CGI (:standard);	# The Perl/CGI functions have the
	# additional property of \"\"stability\"\"
	# when used in reentrant forms.
	# The values of the HTML elements are
	# set according to the incoming
	# parameter values for those elements.
	# The versions below are not stable.
$ref = \"\"x.cgi\"\";	$ref = \"\"x.php\"\";
a({href=>$ref}, \"\"yy\"\")	<a href=\"\"<--php echo $ref-->\"\">yy</a>
textfield({name=>\"\"yy\"\", size=>5})	<input type=text name=yy size=5>
password({name=>\"\"yy\"\", size=>5})	<input type=password name=yy size=5>
textarea({name=>\"\"yy\"\",	<textarea name=yy cols=5 rows=2>
cols=>5, rows=>2})	</textarea>
submit({value=>\"\"yy\"\"})	<input type=\"\"submit\"\" value=yy>
button( {name=>\"\"xx\"\",	<input type=\"\"button\"\"
value=>\"\"yy\"\",	name=\"\"xx\"\" value=\"\"yy\"\"
onclick=>\"\"submit()\"\",	onclick=\"\"submit()\"\">
}	
)	
%labels = (0=>\'a\',1=>\'q\',2=>\'x\');	<select name=\"\"xx\"\" size=\"\"4\"\">
popup_menu( { name=>\"\"xx\"\",	<--php
values=>[0..2],	$labels = array(0=>\'a\',1=>\'q\',2=>\'x\');
labels=>\\%labels,	foreach (range(0,2) as $_)
size=>4,	echo \"\"<option value=\'$_\'>\"\",
}	$labels[$_];
)	-->
	</select>
@a = (\'xx\',\'yy\',\'zz\');	$a = array(\'xx\',\'yy\',\'zz\');
radio_group( { name=>\'nn\',	foreach ($a as $_)
values=> \\@a,	echo \"\"<input type=radio
default=>\'_\',	name=nn value=\'$_\'>$_<br>\"\";
linebreak=>1,	
}	
)	
%labels = (\'xx\'=>\'L1\',\'yy\'=>\'L2\');	$labels = array(\'xx\'=>\'L1\',\'yy\'=>\'L2\');
@a = keys( %labels );	foreach (array_keys($labels) as $_)
checkbox_group( { name=>\'nn\',	echo \"\"<input type=checkbox
values=> \\@a,	name=nn value=\'$_\'>\"\",
labels=> \\%labels,	$labels[$_];
}	
)	
table(	<table>
Tr(	<tr>
[	<td>a</td><td>b</td>
td([\'a\',\'b\']),	</tr>
td([\'x\',\'y\']),	<tr>
]	<td>x</td><td>y</td>
)	</tr>
)	</table>
-- Perl URL encode --	-- Php URL encode --
use URI::Escape;	
uri_escape($val)	urlencode($val)
uri_unescape($val)	urldecode($val)
-- Perl MySQL database access --	-- Php MySQL database access --
use DBI;	
$dbh = DBI->connect(	$dbh = mysql_connect(
\'DBI:mysql:test:localhost\',	\'localhost\', $usr, $pwd
$usr,$pwd	);
);	mysql_query(\'USE test\')
$dbh->do( $sql_op )	mysql_query( $sql_op );
$query = $dbh->prepare( $sql_op );	$results = mysql_query( $sql_op );
$query->execute();	
while(	while($record =
@record = $query->fetchrow() )	mysql_fetch_row($results))
{ .. }	{ .. }
$dbh->quote($val)	\"\'\"\" . addslashes($val) . \"\"\'\"\"...]]></description>		</item>		<item>			<title><![CDATA[Apache達人]]></title>			<link>http://mim1314.com/somewordsdetail/9</link>			<author>hi@mim1314.com (Mim1314.com)</author>			<guid>http://mim1314.com/somewordsdetail/9</guid>			<description><![CDATA[mod perl 設置†

<Directory \"/cgi-bin\">
    setHandler perl-script
    PerlHandler Apache::Registry
    Options ExecCGI
    allow from all
    PerlSendHeader On

    DirectoryIndex index.cgi
    Order allow,deny
    Allow from all
</Directory>

↑
mod rewrite 試す†

RewriteEngine On
RewriteRule /cgi-bin/(.+)＄  http://www.google.com/＄1  [L]

↑
apacheにcモジュールを入れる †

apxs -c -o mod_hello_world.so mod_hello_world.c

cp -f mod_hello_world.so  libexec/mod_hello_world.so

bin/apachectl stop
bin/apachectl start

PS1:
格式化插入字符串
sql = ap_psprintf( r->pool, \"insert into table values(NULL,\'%s\',NULL,\'%d\')\", a,b);
插入操作
mysql_query(&mysql,sql)

PS2：
mod_hello_world.c

#include \"httpd.h\"
#include \"http_config.h\"
#include \"http_protocol.h\"
#include \"http_core.h\"
#include \"ap_config.h\"
#include <mysql/mysql.h>

static int hello_world( request_rec *r  {
        MYSQL mysql;
        MYSQL_RES *res;
        MYSQL_ROW row;

        unsigned int num_fields;
        unsigned int i;
        char *query=\"SELECT * FROM test\";



        r->content_type = \"text/plain\";
        ap_send_http_header( r ;
        char * time = ap_get_time();
        char * args = r->args;
        ap_rprintf( r, \"%s%s%s\", \"hello world\\n\",time,args ;


/*Initializing MySQL connection*/
if(mysql_init(&mysql)==NULL) {
        ap_rprintf( r, \"%s\", \"Failed to initate MySQL connection\";
return 1;
}

/*Connecting to MySQL server*/
if (!mysql_real_connect(&mysql,\"ip\",\"user\",\"pass\",NULL,0,NULL,0)) {
ap_rprintf( r, \"%s\", mysql_error(&mysql));
return 1;
}

/*Selecting database*/
if(mysql_select_db(&mysql,\"ok\"!=0){
ap_rprintf( r, \"%s\", mysql_error(&mysql));
return 1;
}

/*Performing SQL query*/
if(mysql_query(&mysql,query)) {
ap_rprintf( r, \"%s\", mysql_error(&mysql));
return 1;
}
res = mysql_store_result(&mysql);

ap_rprintf( r, \"\\n\";

if (res) {
num_fields = mysql_num_fields(res);
while ((row = mysql_fetch_row(res)))
{
        for(i = 0; i < num_fields; i++) {
                ap_rprintf( r, \"%s\\t\", row[i] ?row[i]:\"NULL\";
        }
        ap_rprintf( r, \"\\n\";
}
mysql_free_result(res);
}else {
ap_rprintf( r, \"fail\";
}

if(mysql_query(&mysql,\"insert into test values(66,66)\") {
ap_rprintf( r, \"%s\", mysql_error(&mysql));
return 1;
}

mysql_close(&mysql);



        return OK;
};

static handler_rec hello_world_handlers[] =
{
        {\"hello_world\", hello_world},
        {NULL}
};

module MODULE_VAR_EXPORT mod_hello_world =
{
        STANDARD_MODULE_STUFF,
        NULL,                             /* module initializer                           */
        NULL,                             /* create per-dir     config structures */
        NULL,                             /* merge  per-dir     config structures */
        NULL,                             /* create per-server config structures */
        NULL,                             /* merge  per-server config structures */
        NULL,                             /* table of config file commands         */
        hello_world_handlers,      /* [#8] MIME-typed-dispatched handlers */
        NULL,                             /* [#1] URI to filename translation   */
        NULL,                             /* [#4] validate user id from request  */
        NULL,                             /* [#5] check if the user is ok _here_ */
        NULL,                             /* [#3] check access by host address   */
        NULL,                             /* [#6] determine MIME type                   */
        NULL,                             /* [#7] pre-run fixups                                 */
        NULL,             /* [#9] log a transaction                       */
        NULL,                             /* [#2] header parser                           */
        NULL,                             /* child_init                                           */
        NULL,                             /* child_exit                                           */
        NULL                              /* [#0] post read-request                       */
};...]]></description>		</item>		<item>			<title><![CDATA[LINUXバージョン見る方法]]></title>			<link>http://mim1314.com/somewordsdetail/8</link>			<author>hi@mim1314.com (Mim1314.com)</author>			<guid>http://mim1314.com/somewordsdetail/8</guid>			<description><![CDATA[1)uname -a
2)cat /proc/version
3)cat /etc/issue...]]></description>		</item>		<item>			<title><![CDATA[LINUXシャットダウン]]></title>			<link>http://mim1314.com/somewordsdetail/7</link>			<author>hi@mim1314.com (Mim1314.com)</author>			<guid>http://mim1314.com/somewordsdetail/7</guid>			<description><![CDATA[
shutdown はシステムの電源停止やリブートの準備をする。いつ停止するかを、時刻または現在からの待ち時間で指定できる。すべてのユーザーに、シャットダウンの警告メッセージが送られる。コマンドラインでメッセージが指定されなかった場合には、 shutdown は送信するメッセージを尋ねてくる。ただし -q オプションをセットした場合には尋ねない。

halt は shutdown -h -q now と同じ。

fasthalt は shutdown -h -q -f now と同じ。

reboot は shutdown -r -q now と同じ。

fastboot は shutdown -r -q -f now と同じ。

何も指定されなかった場合、デフォルトの待ち時間は 2 分になる。...]]></description>		</item>		<item>			<title><![CDATA[ベシック認証つける方法]]></title>			<link>http://mim1314.com/somewordsdetail/5</link>			<author>hi@mim1314.com (Mim1314.com)</author>			<guid>http://mim1314.com/somewordsdetail/5</guid>			<description><![CDATA[ベシック認証掛けたいディレクトリに.htaccess
ファイル置く
内容はした参照
cat .htaccess
AuthType Basic
AuthName \"ID..............\"
AuthUserFile [pass file]
require valid-user admin

コマンドライン打つ
htpasswd -c [pass file] admin
パスワードを設定する...]]></description>		</item>		<item>			<title><![CDATA[BASHプロ]]></title>			<link>http://mim1314.com/somewordsdetail/3</link>			<author>hi@mim1314.com (Mim1314.com)</author>			<guid>http://mim1314.com/somewordsdetail/3</guid>			<description><![CDATA[**bashコマンドランイ変数取得
 while getopts \":a:b:cd:\" opt; do
      case $opt in
          a|b)
              echo \"-$opt $OPTARG\"
              ;;
          c|d)
              echo \"-$opt $OPTARG\"
              ;;
          :)
              echo \"-$OPTARG requires an argument\"
              ;;
          ?)
              echo \"-$OPTARG not supported\"
              ;;
      esac
  done

  shift $((OPTIND - 1))
  echo \"other parameters: $@\"

**bash自作関数
 RTN=\".result.data\"
 function add {
 local res
 let \"res = $1 + $2\"
 #res=`expr $1 + $2`
 echo $res > $RTN
 }
 
 function sub {
 local res
 let \"res = $1 - $2\"
 #res=`expr $1 - $2`
 echo $res > $RTN
 }
 
 function mul {
 local res
 let \"res = $1 * $2\"
 #res=`expr $1 - $2`
 echo $res > $RTN
 }
 
 function div {
 local res
 let \"res = $1 / $2\"
 #res=`expr $1 / $2`
 echo $res > $RTN
 }
 
 function add_from_to {
 local counter=$1
 local sum=0
 while [ $counter -le $2 ]; do
 let sum=sum+counter
 let counter=counter+1
 done
 echo $sum > $RTN
 }
 
 function sub_string {
 local string=$1
 local pos=$2
 local len=$3
 if [ \"x$len\" = \"x\" ] ; then
 echo ${string:$pos} > $RTN
 else
 echo ${string:$pos:$len} > $RTN
 fi
 }
 
 function replace_string {
 local string=$1
 local before=$2
 local after=$3
 local global=$4
 if [ \"x$global\" = \"x\" ] ; then
 echo ${string/$before/$after} > $RTN
 else
 echo ${string//$before/$after} > $RTN
 fi
 }
 
 function print {
 until [ -z \"$1\" ]
 do
 echo -n \"$1\"
 echo -n \" \"
 shift
 done
 echo \"\"
 }
 
 function join {
 local joiner=$1
 shift
 `rm -f $RTN`;
 until [ -z \"$1\" ]
 do
 echo -n \"$1\" >> $RTN
 shift
 if [ -z \"$1\" ] ; then
 :
 else
 echo -n \"$joiner\" >> $RTN
 fi
 done
 }
 
 function save_to_file {
 local file_name=$1
 shift
 join \" \" $@
 cat $RTN > $file_name
 }
 
 function retrive_from_file {
 local file_name=$1
 local rec=`cat $file_name`
 for i in $rec; do
 echo item : $i
 done
 }
 
 function select_menu {
 local menu=$1
 local opt
 select opt in $menu; do
 for i in $menu; do
 if [ \"$opt\" = \"$i\" ]; then
 echo $opt > $RTN
 return 0
 else
 :
 fi
 done
 print please select one operation
 done
 }
 
 function input {
 local num
 local value
 `rm -f $RTN`
 num=$1
 if [ \"x$num\" = \"x\" ] ;then
 let \"num = 1\"
 else
 :
 fi
 while [ $num -gt 0 ] ;do
 read value
 echo $value >> $RTN
 let \"num = $num - 1\"
 done
 }
 
 function input_password {
 stty_orig=`stty -g`
 stty -echo
 read secret
 stty $stty_orig
 echo $secret > $RTN
 
 }
 
 function print_color {
 local text=$1
 local fg=$2
 local bg=$3
 
 #change to right form
 case \"$fg\" in
 red) fg=\"31m\" ;;
 green) fg=\"32m\" ;;
 yellow) fg=\"33m\" ;;
 blue) fg=\"34m\" ;;
 white) fg=\"37m\" ;;
 black) fg=\"30m\" ;;
 *) fg=\"37m\" ;;
 esac
 
 case \"$bg\" in
 red) bg=\"41m\" ;;
 green) bg=\"42m\" ;;
 yellow) bg=\"43m\" ;;
 blue) bg=\"44m\" ;;
 white) bg=\"47m\" ;;
 black) bg=\"40m\" ;;
 *) bg=\"40m\" ;;
 esac
 
 echo -en \"\\033[$fg\\033[$bg$text\\033[0m\"
 }
 
 function print_array {
 print_color \"======================================\" yellow
 echo
 print_color \"|\" yellow
 print_color \"Dump Of Array \" white
 print_color \"(\" yellow
 print_color ${#array[@]} white
 print_color \")\" yellow
 echo
 print_color \"++++++++++++++++++++++++++++++++++++++\" yellow
 echo
 for (( i = 0 ; i < ${#array[@]} ; i++ ))
 do
 print_color \"|\" yellow
 print_color \"Element \" green
 print_color $i yellow
 print_color \": \" green
 print_color ${array[$i]} red
 echo
 done
 print_color \"--------------------------------------\" yellow
 echo
 }
 
 function push_array {
 array=(\"${array[@]}\" $1)
 echo $1 > $RTN
 }
 
 function pop_array {
 local array_len=${#array[@]}
 if [ $array_len -le 0 ] ;then
 echo > $RTN
 return
 fi
 echo ${array[$(($array_len-1))]} > $RTN
 array=(${array[@]:0:$(($array_len-1))})
 }
 
 function shift_array {
 echo ${array[0]} > $RTN
 array=(${array[@]:1})
 }
 
 function unshift_array {
 array=($1 \"${array[@]}\")
 echo $1 > $RTN
 }
 
 function del_array {
 local i
 for (( i = 0 ; i < ${#array[@]} ; i++ ))
 do
 if [ \"$1\" = \"${array[$i]}\" ] ;then
 break
 fi
 done
 #not exist
 if [ $i -ge ${#array[@]} ] ;then
 return
 fi
 #at first
 if [ $i -eq 0 ] ;then
 shift_array
 return
 fi
 #at last
 if [ $(($i + 1)) -eq ${#array[@]} ] ;then
 pop_array
 return
 fi
 #at middle
 echo ${array[$i]} > $RTN
 array=(${array[@]:0:$i} ${array[@]:$(($i + 1))})
 }
 
 function del_array_index {
 local i=$1
 #not exist
 if [ $i -ge ${#array[@]} ] ;then
 return
 fi
 #at first
 if [ $i -eq 0 ] ;then
 shift_array
 return
 fi
 #at last
 if [ $(($i + 1)) -eq ${#array[@]} ] ;then
 pop_array
 return
 fi
 #at middle
 echo ${array[$i]} > $RTN
 array=(${array[@]:0:$i} ${array[@]:$(($i + 1))})
 }
 
 function exist_array {
 for (( i = 0 ; i < ${#array[@]} ; i++ ))
 do
 if [ \"$1\" = \"${array[$i]}\" ] ;then
 echo 1 > $RTN
 return 1
 fi
 done
 echo 0 > $RTN
 return 0
 }
 
 function print_rtn {
 local rtn=`cat $RTN`
 echo $rtn
 }
 
 function load_array_from_file {
 array=( `cat $1 | tr \'\\n\' \' \'` )
 }
 
 function sum {
 local sum=0
 local param_len=$#
 for (( i = 0 ; i < $param_len ; i++ ))
 do
 sum=`expr $sum + $1`
 shift
 done
 echo $sum > $RTN
 return $sum
 }
...]]></description>		</item>		<item>			<title><![CDATA[apache+mysql+php4+perl+ssl インストール完璧]]></title>			<link>http://mim1314.com/somewordsdetail/2</link>			<author>hi@mim1314.com (Mim1314.com)</author>			<guid>http://mim1314.com/somewordsdetail/2</guid>			<description><![CDATA[**apache+mysql+php4+perl+ssl インストール

 
 # extract package 
 tar zxvf apache_1.3.20.tar.gz 
 tar zxvf mysql-3.23.38.tar.gz 
 tar zxvf php-4.0.5.tar.gz 
 tar zxvf mod_perl-1.25.tar.gz 
 tar zxvf mm-1.1.3.tar.gz 
 tar zxvf openssl-0.9.6a.tar.gz 
 tar zxvf mod_ssl-2.8.4-1.3.20.tar.gz 
 
 # install mysql 
 cd mysql-3.23.38 
 ./configure --prefix=/usr/local/mysql --with-charset=gb2312 
 make 
 make install 
 scripts/mysql_install_db 
 cd .. 
 
 # install php 
 cd apache_1.3.20 
 ./configure --prefix=/usr/local/apache 
 cd .. 
 cd php-4.0.5 
 ./configure --with-apache=../apache_1.3.20 \\ 
 --with-mysql=/usr/local/mysql \\ 
 --enable-track-vars 
 make 
 make install 
 cp php.ini-dist /usr/local/lib/php.ini 
 cd .. 
 
 # install openssl 
 cd openssl-0.9.6a 
 ./config -fPIC 
 make 
 cd .. 
 
 # install MM 
 cd mm-1.1.3 
 ./configure --disable-shared 
 make 
 cd .. 
 
 # install mod_ssl 
 cd mod_ssl-2.8.4-1.3.20 
 ./configure --with-apache=../apache_1.3.20 \\ 
 --with-ssl=../openssl-0.9.6a \\ 
 --with-mm=../mm-1.1.3 
 cd .. 
 
 # install mod_perl 
 cd mod_perl-1.25 
 perl Makefile.PL \\ 
 APACHE_SRC=../apache_1.3.20/src \\ 
 DO_HTTPD=1 \\ 
 USE_APACI=1 \\ 
 PREP_HTTPD=1 \\ 
 EVERYTHING=1 
 make 
 make install 
 cd .. 
 
 # install apache 
 cd apache_1.3.20 
 ./configure --prefix=/usr/local/apache \\ 
 --enable-module=ssl \\ 
 --activate-module=src/modules/php4/libphp4.a \\ 
 --activate-module=src/modules/perl/libperl.a 
 make 
 make certificate 
 make install 
 cd .. 

**apache php ssl modperl
 
 cd apache_1.3.33/
 ./configure --prefix=/usr/local/apache/
 cd ..
 
 cd  mod_perl-1.28/
 perl Makefile.PL APACHE_SRC=../apache_1.3.33/src DO_HTTPD=1 USE_APACI=1 EVERYTHING=1
 make && make test && make install
 cd ..
 
 cd php-5.0.5/
 ./configure --with-apache=../apache_1.3.33/ --with-mysql --disable-debug --enable-track-vars
 make
 make install
 cd ..
 
 cd openssl-0.9.8/
 ./config -fPIC
 make
 make install
 cd ..
 
 cd mm-1.4.0/
 ./configure --disable-shared
 make
 make install
 cd ..
 
 cd mod_ssl-2.8.24-1.3.33/
 ./configure --with-apache=../apache_1.3.33/ --with-ssl=../openssl-0.9.8/ --with-mm=../mm-1.4.0/
 make
 make install
 cd ..
 
 cd apache_1.3.33/
 ./configure --prefix=/usr/local/apache/ --enable-module=so --enable-module=ssl --enable-module=rewrite --enable-module=proxy --enable-suexec --suexec-uidmin=2000 --suexec-gidmin=500 --activate-module=src/modules/php5/libphp5.a --activate-module=src/modules/perl/libperl.a
 make
 make certificate
 make install...]]></description>		</item>		<item>			<title><![CDATA[catalyst勉強始まった]]></title>			<link>http://mim1314.com/somewordsdetail/1</link>			<author>hi@mim1314.com (Mim1314.com)</author>			<guid>http://mim1314.com/somewordsdetail/1</guid>			<description><![CDATA[Template使う方法
use Template;
my $tt = Template->new;


my $vars = {name => \'xiaosheng\'};


#方法1
my $template_str = \'hi, my name is [% name %]\';

$tt->process(\\$template_str, $vars) || die $tt->error(), \"\\n\";
#方法2
my $template_file = \'a.tt\';  #a.tt内容は\'hi, my name is [% name %]\'
$tt->process($template_file , $vars) || die $tt->error(), \"\\n\";

#方法3
my $template_str = \'hi, my name is [% name %]\';
my $output;$tt->process(\\$template_str, $vars, \\$output) || die $tt->error(), \"\\n\";


 ...]]></description>		</item>	</channel></rss>