<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Branberyheag Lab &#187; Tips</title>
	<atom:link href="http://lab.branberyheag.com/tag/tips/feed" rel="self" type="application/rss+xml" />
	<link>http://lab.branberyheag.com</link>
	<description>ActionScript3.0やJavascriptを使っていろんなものを作ってみます。</description>
	<lastBuildDate>Fri, 23 Jul 2010 10:00:23 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4705</generator>
	<atom:link rel='hub' href='http://lab.branberyheag.com/?pushpress=hub'/>
		<item>
		<title>Javascriptのパフォーマンスをあげるポイント</title>
		<link>http://lab.branberyheag.com/2010/06/17/javascript-2.html</link>
		<comments>http://lab.branberyheag.com/2010/06/17/javascript-2.html#comments</comments>
		<pubDate>Thu, 17 Jun 2010 11:53:01 +0000</pubDate>
		<dc:creator>isao</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://lab.branberyheag.com/?p=787</guid>
		<description><![CDATA[30 best practices to boost your web application  performance &#8211; Web User Interface Architect
JavaScriptコー [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.webuiarchitect.com/30-best-practices-to-boost-your-web-applicati" target="_blank">30 best practices to boost your web application  performance &#8211; Web User Interface Architect</a></p>
<p>JavaScriptコーディング等を 書く上でのパフォーマンス確認事項３０。<br />
自分へのインプット＆メモがてらにちょっとまとめてみます。</p>
<p>JavaScript</p>
<ul>
<li>DOMの操作は可能な限りやめる</li>
<li>eval, new Function() は遅いので可能な限り使わない</li>
<li>withステートメントを使わない（使った事ないですが）</li>
<li><strong>for-in 文ではなく for 文を使う。</strong></li>
<li><strong>ループの中で try-catch ではなく、try-catchの中にループを置く</strong></li>
<li>グローバル変数をなるべく使わない</li>
<li><strong>aaa+=&#8217;AAA&#8217;;aaa+=&#8217;BBB&#8217;; の方が aaa=&#8217;AAA&#8217;+'BBB&#8217;;より速い</strong></li>
<li>複数の文字列連結には、Array で文字列を定義しておいてjoinを使うとよいらしい</li>
<li><strong>Math.min(val1, val2) のような関数を使わずに、val1 &lt; val2 ? val1 :  val2; のように三項演算を使うとよい<br />
また、 array.push(&#8216;new&#8217;); は array[array.length] =  &#8216;new&#8217;; より遅い</strong></li>
<li><strong>setTimeout(&#8220;kansu()&#8221;, 1000) は　setTimeout(kansu, 1000)  より遅い</strong></li>
<li>for(var i=0; i &lt; someArray.length; i++) {&#8230;} はfor (var i=0,  loopLen=someArray.length; i&lt;loopLen; i++) {&#8230;} より遅い</li>
<li><strong>jQuery(&#8220;ul &gt; li&#8221;) のように使う。 jQuery(&#8220;ul li&#8221;) は広義すぎる</strong></li>
<li><strong>jQueryの element.css({display:none}); の方が element.hide()  より速い</strong></li>
<li>DOM操作が終わったらリファレンスの変数を解放する</li>
<li><strong><span style="color: #ff0000;">Ajax の GET は POST より速く動作する</span></strong></li>
<li>アニメーションの過度な利用は控える</li>
<li>JSフレームワークの利用を制限する</li>
</ul>
<p>サーバサイド</p>
<ul>
<li>静的なコンテンツはHTTPヘッダでキャッシュさせよう（サーバサイドスクリプトの話）</li>
<li>CSS, JS ファイルはgzipしよう。ただし、（CPU使用率とのバランスは重要です）</li>
<li>JavaScript は　minify して転送量を下げる</li>
</ul>
<p>CSS、HTML</p>
<ul>
<li>CSSは@import より&lt;link&gt; を使う</li>
<li>CSSスプライトを使う</li>
<li>CSSを最初におこう</li>
<li>HTMLでのDOMの構造をシンプルにコーディングしよう</li>
<li>background-repeatは避けるno-repeatにする</li>
<li>テーブルを使わない。使う場合は table-layout:fixed で効率的なレンダリングが行われる</li>
</ul>
<p>知っていることもおおかったかもしれませんが、しらないこともありました。<br />
勿論実際に検証してみるこ とも必要だと思いますが、参考までに。<strong>関連した記事</strong>
<ul class="similar-posts">
<li><a href="http://lab.branberyheag.com/2009/08/04/as3_turn_up.html" rel="bookmark" title="2009年8月4日">Actionscript3のパフォーマンスについて</a></li>
<li><a href="http://lab.branberyheag.com/2009/08/20/as3_font_1.html" rel="bookmark" title="2009年8月20日">flashDevelopにおけるフォント埋め込みにハマった</a></li>
<li><a href="http://lab.branberyheag.com/2009/09/08/filefilter.html" rel="bookmark" title="2009年9月8日">FileFilter(ファイル選択ダイアログ)でハマった</a></li>
<li><a href="http://lab.branberyheag.com/2009/11/12/ie6.html" rel="bookmark" title="2009年11月12日">IE6でpngを対応させる（ filter:progid:DXImageTransform.Microsoft.AlphaImageLoader）</a></li>
<li><a href="http://lab.branberyheag.com/2010/06/07/css_sprites_overflow.html" rel="bookmark" title="2010年6月7日">背景画像を使用しないCSSスプライト</a></li>
</ul>
<p><!-- Similar Posts took 4.184 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://lab.branberyheag.com/2010/06/17/javascript-2.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>背景画像を使用しないCSSスプライト</title>
		<link>http://lab.branberyheag.com/2010/06/07/css_sprites_overflow.html</link>
		<comments>http://lab.branberyheag.com/2010/06/07/css_sprites_overflow.html#comments</comments>
		<pubDate>Mon, 07 Jun 2010 11:09:40 +0000</pubDate>
		<dc:creator>isao</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://lab.branberyheag.com/?p=775</guid>
		<description><![CDATA[これ、使えそうなので、メモ。
元ネタは、こちら
CSS Sprites w/out Using Background Images
背景画像を使わずにimg要素で呼び出した画像をCSSスプライトとして呼び出すテクニック。 [...]]]></description>
			<content:encoded><![CDATA[<p>これ、使えそうなので、メモ。</p>
<p>元ネタは、こちら<br />
<a href="http://www.sohtanaka.com/web-design/css-sprites-wout-background-images/">CSS Sprites w/out Using Background Images</a></p>
<p>背景画像を使わずにimg要素で呼び出した画像をCSSスプライトとして呼び出すテクニック。</p>
<pre class="brush: xml;">

&lt;div&gt;
&lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;rokkan.gif&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;
&lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;designcubicle.gif&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;
</pre>
<p>使用されている画像は、カーソルを合わせなかった時、合わせた時の画像を一枚にしている状態。</p>
<p><a href="http://stblog.tanaka.netdna-cdn.com/wp-content/uploads/designcubicle.gif" rel="shadowbox[post-775];player=img;"><img class="alignnone" src="http://stblog.tanaka.netdna-cdn.com/wp-content/uploads/designcubicle.gif" alt="" width="204" height="364" /></a></p>
<p>背景画像を位置変更ではなくoverflow:hidden;にしている。<br />
コントロールは、margin-topで制御している。</p>
<pre class="brush: css;">

.affiliates a {
width: 204px; height:182px;
overflow: hidden;
float: left;
}
.affiliates img {
border: none;
}
.affiliates a:hover img {
margin-top: -182px;
}
</pre>
<p>このテクニックを使う条件として、正確な画像の縦、横のサイズが分かることが必要で、hoverには、margin-topを使っている。</p>
<p>この記事でCSS3のtransitionを使ってアニメーション効果を出すテクニックも記載されている。</p>
<pre class="brush: css;">

.affiliates a {
width: 204px; height:182px;
overflow: hidden;
float: left;
}
.affiliates img {
border: none;
margin: 0;
-webkit-transition: all 0.2s ease-in-out;
-moz-transition: all 0.2s ease-in-out;
-o-transition: all 0.2s ease-in-out;
}
.affiliates a:hover img {
margin-top: -182px;
}
</pre>
<p>どこかで使えそうなテクニックだよね。。。<strong>関連した記事</strong>
<ul class="similar-posts">
<li><a href="http://lab.branberyheag.com/2009/11/12/javascript_tips.html" rel="bookmark" title="2009年11月12日">「JavaScriptを高速化する6つのテクニック」という記事を読んだ</a></li>
<li><a href="http://lab.branberyheag.com/2009/11/12/ie6.html" rel="bookmark" title="2009年11月12日">IE6でpngを対応させる（ filter:progid:DXImageTransform.Microsoft.AlphaImageLoader）</a></li>
<li><a href="http://lab.branberyheag.com/2009/09/07/flex_design-skin.html" rel="bookmark" title="2009年9月7日">Flexのビジュアルデザインをskinで変更する</a></li>
<li><a href="http://lab.branberyheag.com/2009/08/20/as3_font_1.html" rel="bookmark" title="2009年8月20日">flashDevelopにおけるフォント埋め込みにハマった</a></li>
<li><a href="http://lab.branberyheag.com/2010/06/07/featured-image.html" rel="bookmark" title="2010年6月7日">WordPress3.0機能メモ　 featured image アイキャッチ画像</a></li>
</ul>
<p><!-- Similar Posts took 3.460 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://lab.branberyheag.com/2010/06/07/css_sprites_overflow.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress3.0機能メモ　 featured image アイキャッチ画像</title>
		<link>http://lab.branberyheag.com/2010/06/07/featured-image.html</link>
		<comments>http://lab.branberyheag.com/2010/06/07/featured-image.html#comments</comments>
		<pubDate>Sun, 06 Jun 2010 15:34:10 +0000</pubDate>
		<dc:creator>isao</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://lab.branberyheag.com/?p=767</guid>
		<description><![CDATA[WordPress2.9でもあった機能らしいけど、名称がアイキャッチ機能変わったようだ。
これは、サムネイルを簡単に表示させることのできる機能だ。トップページなどでサムネイルが必要な時に表示させることができる。
テンプレ [...]]]></description>
			<content:encoded><![CDATA[<p>WordPress2.9でもあった機能らしいけど、名称がアイキャッチ機能変わったようだ。</p>
<p>これは、サムネイルを簡単に表示させることのできる機能だ。トップページなどでサムネイルが必要な時に表示させることができる。</p>
<p>テンプレートタグで特定の場所にサムネイルを簡単に出力させることができるので、便利だと思う。<span id="more-767"></span></p>
<p>テンプレートにタグを入れないと動かないみたいなので、以下のようなタグを入れる。</p>
<pre class="brush: php;">

&lt;code&gt;the_post_thumbnail();&lt;/code&gt;

&lt;code&gt;</pre>
<p>テンプレートのfunctions.phpにも以下のコードを入れる。</p>
<pre class="brush: php;">

&lt;code&gt;add_theme_support( 'post-thumbnails' );&lt;/code&gt;

[php]

画像のサイズをコントロールする場合は、同じくfunctions.phpに追加する。
引数は、画像サイズ指定（縦、横）と最後の引数では指定のサイズに切り取るかリサイズするかの選択である。

[php]

&lt;code&gt;set_post_thumbnail_size( 100, 50, true/false  );&lt;/code&gt;
</pre>
<p>詳細は、<a href="http://wpdocs.sourceforge.jp/%E3%83%86%E3%83%B3%E3%83%97%E3%83%AC%E3%83%BC%E3%83%88%E3%82%BF%E3%82%B0/the_post_thumbnail">テンプレートタグ/the post thumbnail</a>を参照のこと。<strong>関連した記事</strong>
<ul class="similar-posts">
<li><a href="http://lab.branberyheag.com/2009/12/29/wordpress%e3%81%a7%e3%83%9a%e3%83%bc%e3%82%b8%e3%83%86%e3%83%b3%e3%83%97%e3%83%ac%e3%83%bc%e3%83%88%e3%82%92%e9%81%b8%e6%8a%9e%e3%81%a7%e3%81%8d%e3%82%8b%e3%82%88%e3%81%86%e3%81%ab%e3%81%99%e3%82%8b.html" rel="bookmark" title="2009年12月29日">wordpressでページテンプレートを選択できるようにするには・・・</a></li>
<li><a href="http://lab.branberyheag.com/2010/05/13/about_html5.html" rel="bookmark" title="2010年5月13日">HTML5についていろいろと調べてみた</a></li>
<li><a href="http://lab.branberyheag.com/2009/11/12/ie6.html" rel="bookmark" title="2009年11月12日">IE6でpngを対応させる（ filter:progid:DXImageTransform.Microsoft.AlphaImageLoader）</a></li>
<li><a href="http://lab.branberyheag.com/2010/06/17/javascript-2.html" rel="bookmark" title="2010年6月17日">Javascriptのパフォーマンスをあげるポイント</a></li>
<li><a href="http://lab.branberyheag.com/2010/06/07/css_sprites_overflow.html" rel="bookmark" title="2010年6月7日">背景画像を使用しないCSSスプライト</a></li>
</ul>
<p><!-- Similar Posts took 3.703 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://lab.branberyheag.com/2010/06/07/featured-image.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>HTML5についていろいろと調べてみた</title>
		<link>http://lab.branberyheag.com/2010/05/13/about_html5.html</link>
		<comments>http://lab.branberyheag.com/2010/05/13/about_html5.html#comments</comments>
		<pubDate>Wed, 12 May 2010 15:23:31 +0000</pubDate>
		<dc:creator>isao</dc:creator>
				<category><![CDATA[html5]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://lab.branberyheag.com/?p=707</guid>
		<description><![CDATA[なんか作ろうと思ってて、丁度いいのでHTML5を使ってみようと思った。
今までなんも調べていなかったので、いろんなサイトを見ながら作ってみようと思った。
そんな中で役に立ったTipsや資料をあげてみようと思った。
まず、 [...]]]></description>
			<content:encoded><![CDATA[<p>なんか作ろうと思ってて、丁度いいのでHTML5を使ってみようと思った。<br />
今までなんも調べていなかったので、いろんなサイトを見ながら作ってみようと思った。</p>
<p>そんな中で役に立ったTipsや資料をあげてみようと思った。</p>
<p>まず、InternetExpplorer6,7でどうやって対応すれば良いのか調べた。<br />
どうやら、新しいタグに対してスタイリングができないので、<span id="more-707"></span>JavascriptでHTML5で新しく用意された要素をHTML上に置かないとその要素にスタイルを指定ものに対して、適用されないようだ。</p>
<pre class="brush: xml;">

&lt;!--[if lte IE 8]&gt;

&lt;script type=&quot;text/javascript&quot;&gt;
document.createElement( 'header' );
document.createElement( 'section' );
document.createElement( 'nav' );
document.createElement( 'aside' );
document.createElement( 'footer' );
document.createElement( 'article' );
document.createElement( 'time' );
&lt;/script&gt;
&lt;![endif]--&gt;
</pre>
<p>Firefox2では、HTML5のタグに対してスタイルが適用されないようだ。</p>
<p>html5.jpによると、本来は・・・</p>
<pre class="brush: xml;">

&lt;body&gt;

&lt;header&gt;&lt;h1&gt;Title&lt;/h1&gt;&lt;/header&gt;

&lt;article&gt;&lt;p&gt;...&lt;/p&gt;&lt;/article&gt;

&lt;/body&gt;

&lt;code&gt;</pre>
<p>となるが、Firefox2では</p>
<pre class="brush: xml;">

&lt;body&gt;
&lt;header&gt;&lt;/header&gt;
&lt;h1&gt;Title&lt;/h1&gt;
&lt;article&gt;&lt;/article&gt;
&lt;p&gt;...&lt;/p&gt;&lt;code&gt;
&lt;/body&gt;&lt;/code&gt;
</pre>
<p>というふうにレンダリングされる。<br />
この回避方法あるようだ。</p>
<p>有効なのは .htaccess を使ってGekko XHTMLとして読み込ませる方法良いみたい。HTMLファイルに</p>
<pre class="brush: xml;">

&lt;code&gt;&lt;html lang=&quot;en&quot; xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;&lt;/code&gt;
</pre>
<p>xmlnsを入れる。</p>
<p>あとは、htaccessを用意する。</p>
<pre class="brush: php;">
&lt;pre&gt;&lt;code&gt;RewriteCond %{REQUEST_URI} \.html$
RewriteCond %{HTTP_USER_AGENT} rv:1\.(([1-8]|9pre|9a|9b[0-4])\.[0-9.]+).*Gecko
RewriteRule .* - [T=application/xhtml+xml]
</pre>
<p>これで、スタイルが適用されるようだ。<br />
一番気になったIE6でもなんとか適用するみたいなので、気兼ねなくマークアップができる。<br />
あとは、API関係とCSS3のブラウザ依存をどうするかを考えないとね。</p>
<p>次はCSS3について調べてみようと思う。</p>
<p>参考サイト<br />
html5.jp<br />
<a href="http://www.html5.jp/html5doctor/how-to-get-html5-working-in-ie-and-firefox-2.html">HTML5 を IE や Firefox 2 でも使えるようにする方法</a><strong>関連した記事</strong>
<ul class="similar-posts">
<li><a href="http://lab.branberyheag.com/2010/06/07/featured-image.html" rel="bookmark" title="2010年6月7日">WordPress3.0機能メモ　 featured image アイキャッチ画像</a></li>
<li><a href="http://lab.branberyheag.com/2009/11/12/ie6.html" rel="bookmark" title="2009年11月12日">IE6でpngを対応させる（ filter:progid:DXImageTransform.Microsoft.AlphaImageLoader）</a></li>
<li><a href="http://lab.branberyheag.com/2010/04/21/twitter%e3%81%ae%e3%81%a4%e3%81%b6%e3%82%84%e3%81%8d%e3%81%a8%e3%81%84%e3%81%a3%e3%81%97%e3%82%87%e3%81%ab%e4%bd%8d%e7%bd%ae%e6%83%85%e5%a0%b1%e3%82%92%e9%80%81%e4%bf%a1%e3%81%ab%e3%81%a4%e3%81%84.html" rel="bookmark" title="2010年4月21日">twitterのつぶやきといっしょに位置情報を送信について</a></li>
<li><a href="http://lab.branberyheag.com/2009/09/08/filefilter.html" rel="bookmark" title="2009年9月8日">FileFilter(ファイル選択ダイアログ)でハマった</a></li>
<li><a href="http://lab.branberyheag.com/2009/08/20/as3_font_1.html" rel="bookmark" title="2009年8月20日">flashDevelopにおけるフォント埋め込みにハマった</a></li>
</ul>
<p><!-- Similar Posts took 3.586 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://lab.branberyheag.com/2010/05/13/about_html5.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>twitterのつぶやきといっしょに位置情報を送信について</title>
		<link>http://lab.branberyheag.com/2010/04/21/twitter%e3%81%ae%e3%81%a4%e3%81%b6%e3%82%84%e3%81%8d%e3%81%a8%e3%81%84%e3%81%a3%e3%81%97%e3%82%87%e3%81%ab%e4%bd%8d%e7%bd%ae%e6%83%85%e5%a0%b1%e3%82%92%e9%80%81%e4%bf%a1%e3%81%ab%e3%81%a4%e3%81%84.html</link>
		<comments>http://lab.branberyheag.com/2010/04/21/twitter%e3%81%ae%e3%81%a4%e3%81%b6%e3%82%84%e3%81%8d%e3%81%a8%e3%81%84%e3%81%a3%e3%81%97%e3%82%87%e3%81%ab%e4%bd%8d%e7%bd%ae%e6%83%85%e5%a0%b1%e3%82%92%e9%80%81%e4%bf%a1%e3%81%ab%e3%81%a4%e3%81%84.html#comments</comments>
		<pubDate>Tue, 20 Apr 2010 16:21:38 +0000</pubDate>
		<dc:creator>isao</dc:creator>
				<category><![CDATA[未分類]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[twitter API]]></category>

		<guid isPermaLink="false">http://lab.branberyheag.com/?p=670</guid>
		<description><![CDATA[twitterでの位置情報をどうやって送信するのか分からなかった。
設定を変えてみたりしたけど、何も変わらなかった。どうしてだろうと思っていろいろと調べてみたところ専用クライアントソフトだと位置情報と一緒に送信できるそう [...]]]></description>
			<content:encoded><![CDATA[<p>twitterでの位置情報をどうやって送信するのか分からなかった。</p>
<p>設定を変えてみたりしたけど、何も変わらなかった。どうしてだろうと思っていろいろと調べてみたところ専用クライアントソフトだと位置情報と一緒に送信できるそうだ。</p>
<p>ちなみに、モバツィは、位置情報の取得ができない。さて、どうしたものかと思って調べてみるとはてなココは、位置情報を送信できるようだ。ツィッタークライアントソフトを作ろうかと思ったけど、そこに時間をかけるよりももっと別のところに時間をかけようと思って止めた。</p>
<p>twitter APIのリファレンスにもあまり詳しくは載っていないようだ。大事なことだから、載せてほしいよね。。。<strong>関連した記事</strong>
<ul class="similar-posts">
<li><a href="http://lab.branberyheag.com/2009/08/25/twitter-api_1.html" rel="bookmark" title="2009年8月25日">twitter APIの仕様書</a></li>
<li><a href="http://lab.branberyheag.com/2009/08/27/twitter_ant.html" rel="bookmark" title="2009年8月27日">twitter APIを使ったFlashコンテンツ（twitter ant）</a></li>
<li><a href="http://lab.branberyheag.com/2010/03/05/twitter%e3%83%8f%e3%83%83%e3%82%b7%e3%83%a5%e3%82%bf%e3%82%b0%e3%81%ae%e7%99%bb%e9%8c%b2%e3%82%84%e3%82%8a%e6%96%b9.html" rel="bookmark" title="2010年3月5日">twitterハッシュタグの登録</a></li>
<li><a href="http://lab.branberyheag.com/2010/02/08/gears-geolocation-api%e3%81%ab%e3%82%88%e3%82%8b%e4%bd%8d%e7%bd%ae%e6%83%85%e5%a0%b1%e5%8f%96%e5%be%97%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6.html" rel="bookmark" title="2010年2月8日">Gears Geolocation APIによる位置情報取得について</a></li>
<li><a href="http://lab.branberyheag.com/2009/09/08/filefilter.html" rel="bookmark" title="2009年9月8日">FileFilter(ファイル選択ダイアログ)でハマった</a></li>
</ul>
<p><!-- Similar Posts took 3.296 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://lab.branberyheag.com/2010/04/21/twitter%e3%81%ae%e3%81%a4%e3%81%b6%e3%82%84%e3%81%8d%e3%81%a8%e3%81%84%e3%81%a3%e3%81%97%e3%82%87%e3%81%ab%e4%bd%8d%e7%bd%ae%e6%83%85%e5%a0%b1%e3%82%92%e9%80%81%e4%bf%a1%e3%81%ab%e3%81%a4%e3%81%84.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>simple XMLで名前空間を取得する方法</title>
		<link>http://lab.branberyheag.com/2010/04/21/simplexml.html</link>
		<comments>http://lab.branberyheag.com/2010/04/21/simplexml.html#comments</comments>
		<pubDate>Tue, 20 Apr 2010 16:15:37 +0000</pubDate>
		<dc:creator>isao</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://lab.branberyheag.com/?p=668</guid>
		<description><![CDATA[PHPでXMLパースを使っている時にsimple XMLで文字列やデータを取得していると名前空間のタグ取得できなかった。
調べてみると・・・
属性を取得する場合は・・・


$feed-&#62;entry-&#62;tit [...]]]></description>
			<content:encoded><![CDATA[<p>PHPでXMLパースを使っている時にsimple XMLで文字列やデータを取得していると名前空間のタグ取得できなかった。</p>
<p>調べてみると・・・</p>
<p>属性を取得する場合は・・・</p>
<pre class="brush: php;">

$feed-&gt;entry-&gt;title-&gt;attributes()-&gt;type;
//type属性を取得
//&lt;title  type=&quot;text&quot;&gt;【自民党ネットCM】ラーメン篇&lt;/title&gt;
</pre>
<p>名前空間の場合・・・</p>
<pre class="brush: php;">

$feed-&gt;entry-&gt;children('yt',true)-&gt;recorded;
//名前空間のある要素を取得
//&lt;yt:recorded&gt;2009-08-21&lt;/yt:recorded&gt;
</pre>
<p>何気に困ったので、メモ。<strong>関連した記事</strong>
<ul class="similar-posts">
<li><a href="http://lab.branberyheag.com/2009/07/30/crossdomain.html" rel="bookmark" title="2009年7月30日">[AS3.0][JS]クロスドメインに対応する</a></li>
<li><a href="http://lab.branberyheag.com/2010/05/13/about_html5.html" rel="bookmark" title="2010年5月13日">HTML5についていろいろと調べてみた</a></li>
<li><a href="http://lab.branberyheag.com/2010/01/06/%e8%a6%aa%e3%82%a6%e3%82%a3%e3%83%b3%e3%83%89%e3%82%a6%e3%81%8b%e3%82%89%e5%ad%90%e3%82%a6%e3%82%a3%e3%83%b3%e3%83%89%e3%82%a6%e3%81%b8%e3%81%ae%e3%83%87%e3%83%bc%e3%82%bf%e5%8f%97%e3%81%91%e6%b8%a1.html" rel="bookmark" title="2010年1月6日">親ウィンドウから子ウィンドウへのデータ受け渡し方</a></li>
<li><a href="http://lab.branberyheag.com/2009/08/20/as3_font_1.html" rel="bookmark" title="2009年8月20日">flashDevelopにおけるフォント埋め込みにハマった</a></li>
<li><a href="http://lab.branberyheag.com/2009/08/07/as3_textfield-tips1.html" rel="bookmark" title="2009年8月7日">AS3 TextFieldでの折り返し</a></li>
</ul>
<p><!-- Similar Posts took 3.155 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://lab.branberyheag.com/2010/04/21/simplexml.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>親ウィンドウから子ウィンドウへのデータ受け渡し方</title>
		<link>http://lab.branberyheag.com/2010/01/06/%e8%a6%aa%e3%82%a6%e3%82%a3%e3%83%b3%e3%83%89%e3%82%a6%e3%81%8b%e3%82%89%e5%ad%90%e3%82%a6%e3%82%a3%e3%83%b3%e3%83%89%e3%82%a6%e3%81%b8%e3%81%ae%e3%83%87%e3%83%bc%e3%82%bf%e5%8f%97%e3%81%91%e6%b8%a1.html</link>
		<comments>http://lab.branberyheag.com/2010/01/06/%e8%a6%aa%e3%82%a6%e3%82%a3%e3%83%b3%e3%83%89%e3%82%a6%e3%81%8b%e3%82%89%e5%ad%90%e3%82%a6%e3%82%a3%e3%83%b3%e3%83%89%e3%82%a6%e3%81%b8%e3%81%ae%e3%83%87%e3%83%bc%e3%82%bf%e5%8f%97%e3%81%91%e6%b8%a1.html#comments</comments>
		<pubDate>Tue, 05 Jan 2010 15:03:06 +0000</pubDate>
		<dc:creator>isao</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://lab.branberyheag.com/?p=494</guid>
		<description><![CDATA[例えば、Google mapの経緯と緯度をデータを親ウィンドウから子ウィンドウへデータを渡した方として、aタグのリンク表記に「map.html?=134.77&#38;75.4」と記述しておいて、別ウィンドウが開くHTM [...]]]></description>
			<content:encoded><![CDATA[<p>例えば、Google mapの経緯と緯度をデータを親ウィンドウから子ウィンドウへデータを渡した方として、aタグのリンク表記に「map.html?=134.77&amp;75.4」と記述しておいて、別ウィンドウが開くHTMLにデータを解析するスクリプトを仕込んでおく。</p>
<p>あとは、正規表現でURLを取得してデータを取得すれば完了になる。</p>
<p>HTML５になると別ウィンドウへのデータの受け渡しも簡単になるようだ。今のところaタグに仕込んで置き、データを受けるウィンドウにはURLについたデータを解析するスクリプトを組んでおけば問題はなくなる。</p>
<p>簡単なデータを受け渡し方を紹介した。この他に別ウィンドウにデータを渡す方法ってあるのだろうか。</p>
<p>今作っているサイトはこの概念を使っているページがあるので、その時に改めて紹介する。<strong>関連した記事</strong>
<ul class="similar-posts">
<li><a href="http://lab.branberyheag.com/2009/12/28/javascript%e3%81%a7%e4%bb%96%e3%81%ae%e3%82%a6%e3%82%a3%e3%83%b3%e3%83%89%e3%82%a6%e3%81%ab%e3%83%87%e3%83%bc%e3%82%bf%e3%82%92%e6%b8%a1%e3%81%99%e6%96%b9%e6%b3%95.html" rel="bookmark" title="2009年12月28日">javascriptで他のウィンドウにデータを渡す方法</a></li>
<li><a href="http://lab.branberyheag.com/2009/07/30/crossdomain.html" rel="bookmark" title="2009年7月30日">[AS3.0][JS]クロスドメインに対応する</a></li>
<li><a href="http://lab.branberyheag.com/2010/04/21/simplexml.html" rel="bookmark" title="2010年4月21日">simple XMLで名前空間を取得する方法</a></li>
<li><a href="http://lab.branberyheag.com/2009/09/14/colorshortcuts.html" rel="bookmark" title="2009年9月14日">Tweener のColorShortcutsクラスでハマった</a></li>
<li><a href="http://lab.branberyheag.com/2010/06/17/javascript-2.html" rel="bookmark" title="2010年6月17日">Javascriptのパフォーマンスをあげるポイント</a></li>
</ul>
<p><!-- Similar Posts took 3.617 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://lab.branberyheag.com/2010/01/06/%e8%a6%aa%e3%82%a6%e3%82%a3%e3%83%b3%e3%83%89%e3%82%a6%e3%81%8b%e3%82%89%e5%ad%90%e3%82%a6%e3%82%a3%e3%83%b3%e3%83%89%e3%82%a6%e3%81%b8%e3%81%ae%e3%83%87%e3%83%bc%e3%82%bf%e5%8f%97%e3%81%91%e6%b8%a1.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>wordpressでページテンプレートを選択できるようにするには・・・</title>
		<link>http://lab.branberyheag.com/2009/12/29/wordpress%e3%81%a7%e3%83%9a%e3%83%bc%e3%82%b8%e3%83%86%e3%83%b3%e3%83%97%e3%83%ac%e3%83%bc%e3%83%88%e3%82%92%e9%81%b8%e6%8a%9e%e3%81%a7%e3%81%8d%e3%82%8b%e3%82%88%e3%81%86%e3%81%ab%e3%81%99%e3%82%8b.html</link>
		<comments>http://lab.branberyheag.com/2009/12/29/wordpress%e3%81%a7%e3%83%9a%e3%83%bc%e3%82%b8%e3%83%86%e3%83%b3%e3%83%97%e3%83%ac%e3%83%bc%e3%83%88%e3%82%92%e9%81%b8%e6%8a%9e%e3%81%a7%e3%81%8d%e3%82%8b%e3%82%88%e3%81%86%e3%81%ab%e3%81%99%e3%82%8b.html#comments</comments>
		<pubDate>Tue, 29 Dec 2009 01:53:09 +0000</pubDate>
		<dc:creator>isao</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://lab.branberyheag.com/?p=486</guid>
		<description><![CDATA[もう年末に入ってしまいましたね。ずっとプライベートでやっていたプロジェクトがいよいよ大詰め。
でも、本当に使ってくれたり、ユーザ登録してくれたりと結構不安でいっぱいです。まぁ、ブラウザ依存をなるべく少なくするのが、敷居の [...]]]></description>
			<content:encoded><![CDATA[<p>もう年末に入ってしまいましたね。ずっとプライベートでやっていたプロジェクトがいよいよ大詰め。<br />
でも、本当に使ってくれたり、ユーザ登録してくれたりと結構不安でいっぱいです。まぁ、ブラウザ依存をなるべく少なくするのが、敷居の低くする第一歩かもしれない。というかIE6、IE7が全然駄目だったりと言っていることとやっていることがめちゃくちゃな今日この頃。</p>
<p>さて、本題だけどページテンプレートがあるけど、これを複数テンプレート用意したいときとかある。<br />
wordpressだと簡単にできるようなので、テンプレートを作っただけではダメだった。当たり前だけどね。んで、いろいろと調べていくと新しいページテンプレートには以下のようなものを入れておかないといけないみたいだった。</p>
<pre class="brush: php;">
&lt;?php
/*
Template Name: Snarfer
*/
?&gt;
</pre>
<p>とテンプレートファイルの一番上に入れるようだ。これをやらないとwordpress側で認識しないみたい。<br />
これでトップページを作るっていうのひとつの手かもしれない。</p>
<p>参考にしたサイト<br />
<a href="http://d.hatena.ne.jp/kazuokohchi/20080526/1211794028" target="_blank">http://d.hatena.ne.jp/kazuokohchi/20080526/1211794028</a><br />
code X<br />
<a href="http://" target="_blank">http://codex.wordpress.org/Pages#Creating_your_own_Page_Templates</a><strong>関連した記事</strong>
<ul class="similar-posts">
<li><a href="http://lab.branberyheag.com/2010/06/07/featured-image.html" rel="bookmark" title="2010年6月7日">WordPress3.0機能メモ　 featured image アイキャッチ画像</a></li>
<li><a href="http://lab.branberyheag.com/2009/10/04/howto_deeplink_for_flex.html" rel="bookmark" title="2009年10月4日">Flexにおけるディープリンクの付け方</a></li>
<li><a href="http://lab.branberyheag.com/2009/09/16/flex3numericstepper.html" rel="bookmark" title="2009年9月16日">[flex3]NumericStepperのカスタマイズ</a></li>
<li><a href="http://lab.branberyheag.com/2009/08/17/as3%e3%82%aa%e3%83%96%e3%82%b8%e3%82%a7%e3%82%af%e3%83%88%e3%81%ae%e9%87%8d%e3%81%aa%e3%82%8a%e9%a0%86%e5%88%b6%e5%be%a1%e3%81%99%e3%82%8b%e3%81%ab%e3%81%af%e3%83%bb%e3%83%bb%e3%83%bb.html" rel="bookmark" title="2009年8月17日">[AS3]オブジェクトの重なり順制御するには・・・</a></li>
<li><a href="http://lab.branberyheag.com/2009/09/08/filefilter.html" rel="bookmark" title="2009年9月8日">FileFilter(ファイル選択ダイアログ)でハマった</a></li>
</ul>
<p><!-- Similar Posts took 4.186 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://lab.branberyheag.com/2009/12/29/wordpress%e3%81%a7%e3%83%9a%e3%83%bc%e3%82%b8%e3%83%86%e3%83%b3%e3%83%97%e3%83%ac%e3%83%bc%e3%83%88%e3%82%92%e9%81%b8%e6%8a%9e%e3%81%a7%e3%81%8d%e3%82%8b%e3%82%88%e3%81%86%e3%81%ab%e3%81%99%e3%82%8b.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>久々にflashに感動した</title>
		<link>http://lab.branberyheag.com/2009/12/16/flash_good_job.html</link>
		<comments>http://lab.branberyheag.com/2009/12/16/flash_good_job.html#comments</comments>
		<pubDate>Wed, 16 Dec 2009 08:49:15 +0000</pubDate>
		<dc:creator>isao</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[AS3.0]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://lab.branberyheag.com/?p=467</guid>
		<description><![CDATA[Sewing &#8211; wonderfl build flash online
これ、なんか新鮮。
http://level0.kayac.com/2009/12/wonderfl09_hara.php関連した記事 [...]]]></description>
			<content:encoded><![CDATA[<div style="text-align: center; width: 465px;"><a title="Sewing - wonderfl build flash online" href="http://wonderfl.net/code/a8ca5c13cc58d57b94c5af543438d376d2ce4e54">Sewing &#8211; wonderfl build flash online</a></div>
<p>これ、なんか新鮮。<br />
<a href="http://level0.kayac.com/2009/12/wonderfl09_hara.php">http://level0.kayac.com/2009/12/wonderfl09_hara.php</a><strong>関連した記事</strong>
<ul class="similar-posts">
<li><a href="http://lab.branberyheag.com/2009/12/16/as3_print_job.html" rel="bookmark" title="2009年12月16日">as3での印刷について</a></li>
<li><a href="http://lab.branberyheag.com/2010/02/04/%e3%83%a1%e3%83%a2jquery1-4%e3%81%ae%e6%96%b0%e6%a9%9f%e8%83%bd%e3%81%ae%e3%81%be%e3%81%a8%e3%82%81%e3%81%9d%e3%81%ae%ef%bc%92.html" rel="bookmark" title="2010年2月4日">[メモ]JQuery1.4の新機能のまとめその２</a></li>
<li><a href="http://lab.branberyheag.com/2010/05/13/about_html5.html" rel="bookmark" title="2010年5月13日">HTML5についていろいろと調べてみた</a></li>
<li><a href="http://lab.branberyheag.com/2009/10/04/howto_deeplink_for_flex.html" rel="bookmark" title="2009年10月4日">Flexにおけるディープリンクの付け方</a></li>
<li><a href="http://lab.branberyheag.com/2009/12/12/flex%e3%81%a7%e7%b8%a6%e6%9b%b8%e3%81%8d%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95%e3%81%a3%e3%81%a6%e3%81%82%e3%81%a3%e3%81%9f%e3%82%93%e3%81%a0%ef%bd%97.html" rel="bookmark" title="2009年12月12日">Flexで縦書きする方法ってあったんだｗ</a></li>
</ul>
<p><!-- Similar Posts took 3.056 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://lab.branberyheag.com/2009/12/16/flash_good_job.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>adobe AIRでのBasic認証</title>
		<link>http://lab.branberyheag.com/2009/12/16/adobe-air.html</link>
		<comments>http://lab.branberyheag.com/2009/12/16/adobe-air.html#comments</comments>
		<pubDate>Wed, 16 Dec 2009 05:49:18 +0000</pubDate>
		<dc:creator>isao</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Air]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://lab.branberyheag.com/?p=465</guid>
		<description><![CDATA[adobe AIRでのお話だけど、Basic認証スクリプトさえ実装すれば通るみたい。
こりゃ、知らなかった。
しかも一行だけっていうのが、すごい。
URLRequestDefaults.setLoginCredentia [...]]]></description>
			<content:encoded><![CDATA[<p>adobe AIRでのお話だけど、Basic認証スクリプトさえ実装すれば通るみたい。<br />
こりゃ、知らなかった。</p>
<p>しかも一行だけっていうのが、すごい。</p>
<pre class="brush: jscript;">URLRequestDefaults.setLoginCredentialsForHost(&lt;span&gt;&quot;twitter.com&quot;&lt;/span&gt;, &lt;span&gt;&quot;ユーザー名&quot;&lt;/span&gt;, &lt;span&gt;&quot;パスワード&quot;&lt;/span&gt;);</pre>
<p>何か役立ちそうなので、メモ。</p>
<p>100行以内で作る超簡易板Twitterクライアント<br />
<a href="http://d.hatena.ne.jp/matsu4512/20091109/1257749321" target="_blank">http://d.hatena.ne.jp/matsu4512/20091109/1257749321</a><strong>関連した記事</strong>
<ul class="similar-posts">
<li><a href="http://lab.branberyheag.com/2009/08/25/twitter-api_1.html" rel="bookmark" title="2009年8月25日">twitter APIの仕様書</a></li>
<li><a href="http://lab.branberyheag.com/2009/11/12/ie6.html" rel="bookmark" title="2009年11月12日">IE6でpngを対応させる（ filter:progid:DXImageTransform.Microsoft.AlphaImageLoader）</a></li>
<li><a href="http://lab.branberyheag.com/2009/08/07/as3_textfield-tips1.html" rel="bookmark" title="2009年8月7日">AS3 TextFieldでの折り返し</a></li>
<li><a href="http://lab.branberyheag.com/2009/12/29/wordpress%e3%81%a7%e3%83%9a%e3%83%bc%e3%82%b8%e3%83%86%e3%83%b3%e3%83%97%e3%83%ac%e3%83%bc%e3%83%88%e3%82%92%e9%81%b8%e6%8a%9e%e3%81%a7%e3%81%8d%e3%82%8b%e3%82%88%e3%81%86%e3%81%ab%e3%81%99%e3%82%8b.html" rel="bookmark" title="2009年12月29日">wordpressでページテンプレートを選択できるようにするには・・・</a></li>
<li><a href="http://lab.branberyheag.com/2010/04/21/twitter%e3%81%ae%e3%81%a4%e3%81%b6%e3%82%84%e3%81%8d%e3%81%a8%e3%81%84%e3%81%a3%e3%81%97%e3%82%87%e3%81%ab%e4%bd%8d%e7%bd%ae%e6%83%85%e5%a0%b1%e3%82%92%e9%80%81%e4%bf%a1%e3%81%ab%e3%81%a4%e3%81%84.html" rel="bookmark" title="2010年4月21日">twitterのつぶやきといっしょに位置情報を送信について</a></li>
</ul>
<p><!-- Similar Posts took 3.528 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://lab.branberyheag.com/2009/12/16/adobe-air.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
