<?xml version="1.0" encoding="UTF-8" ?><rdf:RDF 
  xmlns="http://purl.org/rss/1.0/"
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:atom="http://www.w3.org/2005/Atom"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xml:lang="ja">
  <channel rdf:about="http://w.atwiki.jp/310ke/">
    <title>310ke @ ウィキ</title>
    <link>http://w.atwiki.jp/310ke/</link>
    <atom:link href="https://w.atwiki.jp/310ke/rss10.xml" rel="self" type="application/rss+xml" />
    <atom:link rel="hub" href="https://pubsubhubbub.appspot.com" />
    <description>310ke @ ウィキ</description>

    <dc:language>ja</dc:language>
    <dc:date>2010-04-20T01:19:44+09:00</dc:date>
    <utime>1271693984</utime>

    <items>
      <rdf:Seq>
                <rdf:li rdf:resource="https://w.atwiki.jp/310ke/pages/27.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/310ke/pages/26.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/310ke/pages/25.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/310ke/pages/24.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/310ke/pages/23.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/310ke/pages/22.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/310ke/pages/21.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/310ke/pages/20.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/310ke/pages/19.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/310ke/pages/17.html" />
              </rdf:Seq>
    </items>
	
		
    
  </channel>
    <item rdf:about="https://w.atwiki.jp/310ke/pages/27.html">
    <title>ファイル操作</title>
    <link>https://w.atwiki.jp/310ke/pages/27.html</link>
    <description>
      ***ディレクトリのファイル一覧を取得
 Dim fso, dir, file
 Set fso = CreateObject(&quot;Scripting.FileSystemObject&quot;)
 Set dir = fso.getFolder(&quot;.&quot;)
 For Each file In dir.Files
     WScript.Echo file.Name
 Next

***ファイルを読み込む
 Dim fso, reader
 Set fso = CreateObject(&quot;Scripting.FileSystemObject&quot;)
 Set reader = fso.OpenTextFile(&quot;test.vbs&quot;, 1, False)
 Do Until reader.AtEndOfStream
     WScript.Echo reader.ReadLine
 Loop
 reader.Close()

***ファイルを書き込む
 Dim fso, writer, i
 Set fso = CreateObject(&quot;Scripting.FileSystemObject&quot;)
 Set writer = fso.OpenTextFile(&quot;write.txt&quot;, 2, True)
 For i = 1 To 10
     writer.WriteLine i
 Next
 writer.Close()    </description>
    <dc:date>2010-04-20T01:19:44+09:00</dc:date>
    <utime>1271693984</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/310ke/pages/26.html">
    <title>正規表現</title>
    <link>https://w.atwiki.jp/310ke/pages/26.html</link>
    <description>
      **正規表現
***正規表現を使ってパターンに一致するか調べる
 Dim re
 Set re = New RegExp
 re.Pattern = &quot;^A.*$&quot;
 If re.Test(&quot;ABC&quot;) Then
     WScript.Echo &quot;matched&quot;
 End If

***大文字小文字を区別
 re.IgnoreCase = True

***文字列全体を検索対象にする場合
 re.Global = True

***正規表現を使って一致する文字列を取得する
 Dim re, matches
 Set re = New RegExp
 re.Pattern = &quot;^A.*$&quot;
 Set matches = re.Execute(&quot;ABC&quot;)
 If matches.Count &gt; 0 Then
     WScript.Echo matches(0)
 End If

***正規表現を使ってキャプチャした文字列を取得する
 Dim re, matches
 Set re = New RegExp
 re.Pattern = &quot;^([A-F]+)_([A-F]+).+&quot;
 Set matches = re.Execute(&quot;ABC_DEF_GHI&quot;)
 If matches.Count &gt; 0 Then
     WScript.Echo matches.Item(0).SubMatches.Item(0)
     WScript.Echo matches.Item(0).SubMatches.Item(1)
 End If

***正規表現を使って文字列を置換する
 Dim re, matches
 Set re = New RegExp
 re.Pattern = &quot;^ABC_&quot;
 WScript.Echo re.Replace(&quot;ABC_DEF_GHI&quot;, &quot;XXX_&quot;)

***正規表現を使って文字列を置換する（後方参照）
 Dim re, matches
 Set re = New RegExp
 re.Pattern = &quot;^([A-Z]{2})(.*)&quot;
 WScript.Echo re.Replace(&quot;ABCDE&quot;, &quot;XX$2&quot;)    </description>
    <dc:date>2010-04-20T01:14:55+09:00</dc:date>
    <utime>1271693695</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/310ke/pages/25.html">
    <title>SQL*PlusでのCSV出力方法</title>
    <link>https://w.atwiki.jp/310ke/pages/25.html</link>
    <description>
      **SQL*PlusでテーブルデータをCSV出力する方法
 set linesize 1000
 set pagesize 0
 set trimspool on
 set colsep &#039;,&#039;
 set feedback off
 spool 出力.txt
 select * from emp;
 spool off
 exit

&amp;bold(){解説}
set linesize 1000 ： 出力ファイル1行の長さ。
set pagesize 0 ： ページの行数。0にすると見出しの出力もされない。
set trimspool on ： スプール出力の最後の出力にスペースを表示させない。
set colsep &#039;,&#039; ： 区切り文字をカンマ区切り。
set feedback off ： 最後の出力に「〜行が選択されました。」を表示させない。
spool 出力.txt ： 結果出力のファイル名を指定。
select * from emp; ： ココが実行SQL。
spool off ： ファイル出力を終了。
exit ： SQL*PLUSを終了。    </description>
    <dc:date>2010-04-18T02:10:47+09:00</dc:date>
    <utime>1271524247</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/310ke/pages/24.html">
    <title>SQLの構文チェック方法</title>
    <link>https://w.atwiki.jp/310ke/pages/24.html</link>
    <description>
      ***動的SQLをチェックする場合
DBMS_SQL をファンクション化してチェック
 declare
 cid integer;
 begin
 cid := DBMS_SQL.OPEN_CURSOR;
 DBMS_SQL.PARSE(cid, &#039;select * from emmmp&#039;, dbms_sql.v7);
 DBMS_SQL.CLOSE_CURSOR(cid);
 dbms_output.put_line (&#039;end&#039;);
 exception
 when OTHERS then
 dbms_output.put_line (&#039;** エラー **&#039;);
 end;

***更新SQLをチェックする場合
トランザクションを読み込み専用にして行う
 set transaction read only;
 トランザクションが設定されました。
 
 update emmmp set empno=1;
 *
 ORA-00942: 表またはビューが存在しません。
 
 update emp set empno=1;
 *
 ORA-01456: READ ONLYトランザクションでは挿入/削除/更新ができません。    </description>
    <dc:date>2010-04-18T01:08:53+09:00</dc:date>
    <utime>1271520533</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/310ke/pages/23.html">
    <title>vb用tagファイル作成方法2</title>
    <link>https://w.atwiki.jp/310ke/pages/23.html</link>
    <description>
      -rubyでvb用のtagsファイルを作成する方法

 #!/usr/local/bin/ruby
 tags = []
 ARGF.each_line do |line|
   ARGF.skip if /tags/i =~ ARGF.filename
   if /(Sub|Function|Const)\s+([^\s]+)\s*(\(|=)/ =~ line
     tags.push &quot;#{$2}\t#{ARGF.filename}\t/^#{line.chomp}$/;\&quot;\tf&quot;
   end
 end
 puts tags.sort
----    </description>
    <dc:date>2010-04-08T00:04:50+09:00</dc:date>
    <utime>1270652690</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/310ke/pages/22.html">
    <title>tagsファイルのフォーマット</title>
    <link>https://w.atwiki.jp/310ke/pages/22.html</link>
    <description>
      -tagsファイルのフォーマット

{タグ名}\t{ファイル名}\t{行番号};&quot;\tp
※最後の文字は他に c n など（意味はわからない）

例：
Culture	Properties\Resources.Designer.cs	59;&quot;	p    </description>
    <dc:date>2010-04-07T23:42:01+09:00</dc:date>
    <utime>1270651321</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/310ke/pages/21.html">
    <title>ctags vb用tagファイル作成方法1</title>
    <link>https://w.atwiki.jp/310ke/pages/21.html</link>
    <description>
      -ctagsでvb用のtagsファイルを作成する方法

ctags -f xxx.tags --excmd=number -R --languages=Basic --langmap=Basic:.frm.bas.cls --Basic-types=-l -L srcList.txt
----    </description>
    <dc:date>2010-04-07T23:54:39+09:00</dc:date>
    <utime>1270652079</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/310ke/pages/20.html">
    <title>トップページ</title>
    <link>https://w.atwiki.jp/310ke/pages/20.html</link>
    <description>
      トップページです。

-[[メニュー]]    </description>
    <dc:date>2010-04-07T23:02:26+09:00</dc:date>
    <utime>1270648946</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/310ke/pages/19.html">
    <title>パッケージ、トリガーのソース取得方法</title>
    <link>https://w.atwiki.jp/310ke/pages/19.html</link>
    <description>
      よくある以下の方法では全てを取得することはできない。
----
  SELECT
    table_name,
    status,
    owner,
    trigger_body
  FROM
    user_triggers
  WHERE
     trigger_name = &#039;確認したいトリガ名&#039;;
----

すべてのソースを取得する場合は以下の方法。
----
  SELECT
    *
  FROM
    user_source
  WHERE
    name = &#039;確認したいトリガ名&#039;
  ORDER BY
    name, line;
----    </description>
    <dc:date>2010-04-06T00:46:17+09:00</dc:date>
    <utime>1270482377</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/310ke/pages/17.html">
    <title>正規表現のパターン</title>
    <link>https://w.atwiki.jp/310ke/pages/17.html</link>
    <description>
      *・正規表現の種類
|記号  	|意味|
|. 	|改行文字以外の任意の1文字|
|* 	|直前の1文字の0回以上の繰り返しに一致。直前の文字は[[正規表現]]でも構わない|
|^ 	|行の先頭|
|$ 	|行の末尾|
|[ ] 	|かっこ内の任意の1文字に一致。ハイフン（-）で範囲指定もできる|
|[^ ] 	|かっこ内の任意の1文字に不一致。ハイフン（-）で範囲指定もできる|
|\+ 	|直前の文字の1個以上の繰り返しに一致|
|\? 	|直前の文字の0または1文字に一致|
|\{n\} 	|直前の文字のn個の繰り返しに一致|
|\{n,\} 	|直前の文字のn個以上の繰り返しに一致|
|\{,m\} 	|直前の文字のm個以下の繰り返しに一致|
|\{n,m\} 	|直前の文字のn個以上，m個以下の繰り返しに一致|
|pattern1｜pattern2 	|pattern1またはpattern2のいずれかに一致|
|\(pattern\) 	|patternをグループ化する。マッチした内容は参照できる|
|\ 	|正規表現に使われる記号を普通の文字として扱う|

「2003/10/08」のような日付けで始まる行を検索
 |^[0-9]\{4\}/[0-9]\{2\}/[0-9]\{2\}|

*・色々なパターン
|記号  	|意味|
|Hogege 	|Hogegeに一致|
|[0-9] 	|1文字の数字に一致|
|[a-z] 	|1文字の小文字アルファベットに一致|
|[A-Z] 	|1文字の大文字アルファベットに一致|
|[0-9a-zA-Z] 	|1文字の数字またはアルファベットに一致|
|[0-9]\{4\}/[0-9]\{1,2\}/[0-9]\{1,2\} 	|yyyy/mm/ddに一致（mmとddは1文字でもよい）。ただし，sedの置換などでは/記号を\/とエスケープする必要がある|
|^pattern$ 	|文字列patternだけを含む行|
|[Gg]rep 	|Grepまたはgrep に一致|
|^[^0-9] 	|行頭が数字でないもの|
|^.\{10\}$ 	|10文字の行|
|test｜TEST 	|testまたはTEST|
|Woo* 	|Woo,Wooo....に一    </description>
    <dc:date>2010-04-04T00:38:10+09:00</dc:date>
    <utime>1270309090</utime>
  </item>
  </rdf:RDF>
