<?xml version="1.0" encoding="UTF-8" ?>
<feed xml:lang="ja" xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:thr="http://purl.org/syndication/thread/1.0">
  <title type="text">技術覚書</title>
  <subtitle type="html">技術の覚書</subtitle>
  <link rel="self" type="application/atom+xml" href="https://noteofit.blog.shinobi.jp/atom"/>
  <link rel="alternate" type="text/html" href="https://noteofit.blog.shinobi.jp/"/>
  <updated>2007-04-28T23:48:15+09:00</updated>
  <author><name>ECR33 Type-M</name></author>
  <generator uri="//www.ninja.co.jp/blog/" version="0.9">忍者ブログ</generator>
  <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" />
  <entry>
    <id>noteofit.blog.shinobi.jp://entry/55</id>
    <link rel="alternate" type="text/html" href="https://noteofit.blog.shinobi.jp/android/gpu%E3%83%AC%E3%83%B3%E3%83%80%E3%83%AA%E3%83%B3%E3%82%B0" />
    <published>2012-04-21T07:00:31+09:00</published> 
    <updated>2012-04-21T07:00:31+09:00</updated> 
    <category term="Android" label="Android" />
    <title>GPUレンダリング</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![CDATA[バージョン4.0から、GPUレンダリングによる描画がデフォルトとなっている。<br/><br />
そのため、コンパイル時にmanifest.xmlへ明示的に指定しなければ<br/><br />
端末側のGPUレンダリングON/OFFにかかわらずONとなってしまう。]]> 
    </content>
    <author>
            <name>ECR33 Type-M</name>
        </author>
  </entry>
  <entry>
    <id>noteofit.blog.shinobi.jp://entry/54</id>
    <link rel="alternate" type="text/html" href="https://noteofit.blog.shinobi.jp/oracle/pl-sql" />
    <published>2011-02-02T06:07:39+09:00</published> 
    <updated>2011-02-02T06:07:39+09:00</updated> 
    <category term="Oracle" label="Oracle" />
    <title>PL/SQL</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![CDATA[<p>PL/SQLの書き方</p>
<p>create or replace procedure XXX<br />
is<br />
&nbsp;&nbsp;&nbsp; -- プロシージャ内で参照できる変数を定義</p>
<p>begin</p>
<p>-- 内部プロシージャ<br />
procedure yyy<br />
is<br />
&nbsp;&nbsp;&nbsp; -- 内部プロシージャの変数を定義<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; -- カラムの型を定義<br />
&nbsp;&nbsp;&nbsp; aaa TBL_AAA.BBB%type;<br />
&nbsp;&nbsp;&nbsp; -- テーブルの行を定義<br />
&nbsp;&nbsp;&nbsp; bbb TBL_AAA%rowtpye;</p>
<p>&nbsp;&nbsp;&nbsp; -- カーソル定義<br />
&nbsp;&nbsp;&nbsp; cursor ccc(p_param) iS<br />
&nbsp;&nbsp;&nbsp; select * from TBL_AAA where x = p_param;<br />
begin<br />
&nbsp;&nbsp;&nbsp; -- 処理を記述</p>
<p>&nbsp;&nbsp;&nbsp; -- 変数に格納している行をそのままinsert・updateできる<br />
&nbsp;&nbsp;&nbsp; insert into TBL_AAA values bbb;<br />
&nbsp;&nbsp;&nbsp; update TBL_AAA set bbb where x = x;</p>
<p>&nbsp;&nbsp;&nbsp; -- 暗黙カーソルオープン<br />
&nbsp;&nbsp;&nbsp; for ccc_rec in ccc(1) loop<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- ループ<br />
&nbsp;&nbsp;&nbsp; end loop;<br />
exception<br />
&nbsp;&nbsp;&nbsp; when no_data_found then<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- 例外処理を記述<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- 例外をスロー<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; raise zzz;<br />
&nbsp;&nbsp;&nbsp; when others then<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- その他例外を記述<br />
end;<br />
end yyy;</p>
<p>end XXX;</p>]]> 
    </content>
    <author>
            <name>ECR33 Type-M</name>
        </author>
  </entry>
  <entry>
    <id>noteofit.blog.shinobi.jp://entry/53</id>
    <link rel="alternate" type="text/html" href="https://noteofit.blog.shinobi.jp/oracle/%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%82%AA%E3%83%BC%E3%83%97%E3%83%B3" />
    <published>2011-02-02T05:49:16+09:00</published> 
    <updated>2011-02-02T05:49:16+09:00</updated> 
    <category term="Oracle" label="Oracle" />
    <title>ファイルオープン</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![CDATA[ファイルオープンに使用するUTL_FILE.FOPENは読み込みバイト長(第4引数)を指定しないとデフォルトで1023バイトとなってしまう。]]> 
    </content>
    <author>
            <name>ECR33 Type-M</name>
        </author>
  </entry>
  <entry>
    <id>noteofit.blog.shinobi.jp://entry/52</id>
    <link rel="alternate" type="text/html" href="https://noteofit.blog.shinobi.jp/oracle/%E5%80%A4%E6%AF%94%E8%BC%83" />
    <published>2011-02-02T05:44:47+09:00</published> 
    <updated>2011-02-02T05:44:47+09:00</updated> 
    <category term="Oracle" label="Oracle" />
    <title>値比較</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![CDATA[wehre句の値比較について<br />
<br />
A = B<br />
Aがchar型でBへ数値型を設定した場合<br />
暗黙的にAにTO_NUMBERが適用される(TO_NUMBER(A))。<br />
<br />
Aに格納されるデータがすべて数値型のデータであれば問題なく抽出できるが、数値以外のデータが格納されているとエラーが発生してしまう。<br />
<br />
このような場合は、CASTを行う。<br />
A = CAST(B AS CHAR(X))]]> 
    </content>
    <author>
            <name>ECR33 Type-M</name>
        </author>
  </entry>
  <entry>
    <id>noteofit.blog.shinobi.jp://entry/51</id>
    <link rel="alternate" type="text/html" href="https://noteofit.blog.shinobi.jp/oracle/in%20any" />
    <published>2008-04-22T11:23:36+09:00</published> 
    <updated>2008-04-22T11:23:36+09:00</updated> 
    <category term="Oracle" label="Oracle" />
    <title>In Any</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![CDATA[動的SQLでIn Anyに1000件を超えるデータが指定されるとエラーとなる。<br />
<br />
回避するには、1000件で分割するかORにする。<br />
ただし、どちらの場合もSQLサイズの問題が出てくる。<br />
9iまでは64Kのようだが、10gでは200kまでは確認できた。]]> 
    </content>
    <author>
            <name>ECR33 Type-M</name>
        </author>
  </entry>
  <entry>
    <id>noteofit.blog.shinobi.jp://entry/50</id>
    <link rel="alternate" type="text/html" href="https://noteofit.blog.shinobi.jp/php/oracle%E3%81%AEnvarchar2%E3%81%AB%E3%81%A4%E3%81%84%E3%81%A6" />
    <published>2008-04-03T15:16:58+09:00</published> 
    <updated>2008-04-03T15:16:58+09:00</updated> 
    <category term="PHP" label="PHP" />
    <title>ORACLEのNVARCHAR2について</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![CDATA[PHPからORACLEのNVARCHAR2のカラムに対し、データを取得すると正しく取得できない場合がある。<br />
原因は、PHP(oci)がORACLEのNVARCHAR2のカラムサイズを取得するのにORACLEのカラム情報より取得した器をそのまま使用してしまい桁あふれしてしまっているためだ。<br />
NVARCHAR2(200)でUTF-16の場合、ORACLEより返されるバイト長は200×2=400となる。<br />
一方クライアント側はUTF-8で取得した場合、200×3(文字により4もある)=600～800となる。<br />
200バイト以上の文字がオーバーしてしまうため、PHPはエラー？とみなし空を返してしまうようだ。<br />
一方、NVARCHAR2(200)でUTF-8の場合、返されるバイト長は600となり正常に取得できる。<br />
ただし、UTF-8では文字により(第3,4水準の一部の文字)4バイトとなってしまうため、これでも駄目な場合がある。<br />
本当に正しく取得するようにする場合は、実際の文字数×２カラムサイズとして設定するのが無難である。<br />
<br />
上記問題はPHP4～PHP5.0.5まで確認できる。<br />
最新のPHP5.2.5では確認できなかった。]]> 
    </content>
    <author>
            <name>ECR33 Type-M</name>
        </author>
  </entry>
  <entry>
    <id>noteofit.blog.shinobi.jp://entry/49</id>
    <link rel="alternate" type="text/html" href="https://noteofit.blog.shinobi.jp/oracle/%E6%A8%A9%E9%99%90" />
    <published>2008-03-28T17:26:23+09:00</published> 
    <updated>2008-03-28T17:26:23+09:00</updated> 
    <category term="Oracle" label="Oracle" />
    <title>権限</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![CDATA[テーブルにアクセスする権限がなくても、そのテーブルをアクセスするプロシージャやファンクションを作成しそれに対してExecute権限を付与すればテーブルにアクセスできる。<br />
<br />
要はプロシージャやファンクションの実行権限が優先される。]]> 
    </content>
    <author>
            <name>ECR33 Type-M</name>
        </author>
  </entry>
  <entry>
    <id>noteofit.blog.shinobi.jp://entry/48</id>
    <link rel="alternate" type="text/html" href="https://noteofit.blog.shinobi.jp/oracle/dual" />
    <published>2008-03-28T17:19:04+09:00</published> 
    <updated>2008-03-28T17:19:04+09:00</updated> 
    <category term="Oracle" label="Oracle" />
    <title>DUAL</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![CDATA[DUALテーブルはSYSが所有し、全てのユーザーにSELECTできる権限が付与されている。]]> 
    </content>
    <author>
            <name>ECR33 Type-M</name>
        </author>
  </entry>
  <entry>
    <id>noteofit.blog.shinobi.jp://entry/47</id>
    <link rel="alternate" type="text/html" href="https://noteofit.blog.shinobi.jp/php/%E5%80%A4%E3%81%AE%E6%AF%94%E8%BC%83%E3%81%AB%E3%81%A4%E3%81%84%E3%81%A6" />
    <published>2008-01-28T11:02:53+09:00</published> 
    <updated>2008-01-28T11:02:53+09:00</updated> 
    <category term="PHP" label="PHP" />
    <title>値の比較について</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![CDATA[A == ''<br />
<br />
Aが文字列の場合：空、NULLはtrue<br />
('0'はtrueとならない)<br />
Aが数値の場合：0はture<br />
<br />
となるため注意が必要<br />
]]> 
    </content>
    <author>
            <name>ECR33 Type-M</name>
        </author>
  </entry>
  <entry>
    <id>noteofit.blog.shinobi.jp://entry/46</id>
    <link rel="alternate" type="text/html" href="https://noteofit.blog.shinobi.jp/web/apache%20ssl%E5%8C%96" />
    <published>2007-11-14T16:11:43+09:00</published> 
    <updated>2007-11-14T16:11:43+09:00</updated> 
    <category term="Web" label="Web" />
    <title>Apache SSL化</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![CDATA[http://www.rinzo2.jp/~rinzo/apache_ssl/apache_and_ssl_00.htm]]> 
    </content>
    <author>
            <name>ECR33 Type-M</name>
        </author>
  </entry>
</feed>