<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    
    <title>Nikep's blog - ソフトウェア</title>
    <link>http://www.nikep.net/srdpty/</link>
    <description>Interests about Software, Developement, Technologies and Hobbies...</description>
    <dc:language>ja</dc:language>
    <generator>Serendipity 1.6.2 - http://www.s9y.org/</generator>
    <pubDate>Sat, 15 Jun 2013 17:14:23 GMT</pubDate>

    <image>
        <url>http://www.nikep.net/srdpty/templates/default/img/s9y_banner_small.png</url>
        <title>RSS: Nikep's blog - ソフトウェア - Interests about Software, Developement, Technologies and Hobbies...</title>
        <link>http://www.nikep.net/srdpty/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>iOS: add parameters on file URL in NSURL for UIWebView</title>
    <link>http://www.nikep.net/srdpty/index.php?/archives/88-iOS-add-parameters-on-file-URL-in-NSURL-for-UIWebView.html</link>
            <category>開発</category>
    
    <comments>http://www.nikep.net/srdpty/index.php?/archives/88-iOS-add-parameters-on-file-URL-in-NSURL-for-UIWebView.html#comments</comments>
    <wfw:comment>http://www.nikep.net/srdpty/wfwcomment.php?cid=88</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.nikep.net/srdpty/rss.php?version=2.0&amp;type=comments&amp;cid=88</wfw:commentRss>
    

    <author>nospam@example.com (金子 恵季)</author>
    <content:encoded>
    &lt;br /&gt;
&lt;h2&gt;NSURL refuses to add parameters&lt;/h2&gt;&lt;p&gt;When using UIWebView, we prepare the URL of the contents as NSURL. In case of which the contents are local files and we want to add parameter like &amp;quot;info.html?param1=val1&amp;amp;param2=val2&amp;quot;, there should be a special way to make NSURL. I&#039;d like to explain how it is.&lt;/p&gt;&lt;p&gt;In case of local files, the normal way is using NSURL::fileURLWithPath. But loading is failed with NSURL which is made by fileURLWithPath from local file path combined with parameters. So we should use URLWithString method. But it fails again and it may be caused by malform of the path. After some trials I found that the path string should be escaped before URLWithString although we can use a plain text path string with fileURLWithPath.&lt;/p&gt;&lt;p&gt;The final code of getting NSURL from file URL with parameters.&lt;/p&gt;&lt;blockquote&gt;&lt;pre&gt;NSString path = [[NSBundle mainBundle] pathForResources:fileBase ofType:@&amp;quot;html&amp;quot;];&lt;br /&gt;NSString prms = [NSString stringWithFormat:@&amp;quot;?%@=%@&amp;amp;%@=%@&amp;quot;,key1,val1,key2,val2];&lt;br /&gt;path = [path stringByAppendingString:prms];&lt;br /&gt;NSString urlstr = [[NSString stringWithFormat:@&amp;quot;file://localhost/%@&amp;quot;,path] &lt;br /&gt;                             stringByAddingPercentEscapesUsingEncoding:NSUTF8String];&lt;br /&gt;NSURL url = [NSURL URLWithString urlstr];&lt;br /&gt;[webView loadRequest:[NSURLRequest requestWithURL:url];&lt;/pre&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/p&gt;&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Sun, 16 Jun 2013 01:45:43 +0900</pubDate>
    <guid isPermaLink="false">http://www.nikep.net/srdpty/index.php?/archives/88-guid.html</guid>
    
</item>
<item>
    <title>Ubuntu Tips: Fix auto.smb for automount Windows shares.</title>
    <link>http://www.nikep.net/srdpty/index.php?/archives/87-Ubuntu-Tips-Fix-auto.smb-for-automount-Windows-shares..html</link>
            <category>インストール</category>
    
    <comments>http://www.nikep.net/srdpty/index.php?/archives/87-Ubuntu-Tips-Fix-auto.smb-for-automount-Windows-shares..html#comments</comments>
    <wfw:comment>http://www.nikep.net/srdpty/wfwcomment.php?cid=87</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.nikep.net/srdpty/rss.php?version=2.0&amp;type=comments&amp;cid=87</wfw:commentRss>
    

    <author>nospam@example.com (金子 恵季)</author>
    <content:encoded>
    &lt;br /&gt;
&lt;p&gt;Ubuntu&#039;s autofs, or automounter, have the script auto.smb to mount Windows shares with share names by accessing for example &amp;quot;/smb/minitrue/tmp&amp;quot;. It works OK with samba shares, but NG with Windows shares according to some errors in the script. Until Today, I wrote direct settings in auto.xxx as follows for all shares instead of using the script.&lt;/p&gt;&lt;blockquote&gt;&lt;pre&gt;minitrue -fstype=cifs,rw,username=myUser,passwd=myPasswd,iocharset=utf8 ://minitrue/tmp&lt;/pre&gt;&lt;/blockquote&gt;&lt;p /&gt;&lt;p&gt;But I feel very inconvenient with it, and try to fix it. &lt;br /&gt;I found a solution for the issue in &lt;a href=&quot;http://ubuntuforums.org/showthread.php?t=885713&quot;&gt;the site&lt;/a&gt;, but it does not work correctly as is.&lt;/p&gt;&lt;p /&gt;&lt;p&gt;The problems are as follows:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;auto.smb uses smbclient for listing services and it executes with &amp;quot;-N&amp;quot; (=no-pass). It is OK for servers providing the listing function for anonymous account, but causes an error with those require an authentication. Therefore we should remove &amp;quot;-N&amp;quot; from options and add authentication parameters like &amp;quot;-credentials&amp;quot;.&lt;/li&gt;&lt;li&gt;mount seems to be done with mount.cifs and it does not allow to use credential file but direct parameters like username, password or domain.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Then the fixed script is as follows.&lt;/p&gt;&lt;blockquote&gt;&lt;pre&gt;#!/bin/bash&lt;br /&gt;# This file must be executable to work! chmod 755&lt;br /&gt;key=&amp;quot;$1&amp;quot;&lt;br /&gt;opts=&amp;quot;-fstype=cifs,rw,iocharset=utf8&amp;quot;&lt;br /&gt;creddir=&amp;quot;/etc/auto.credentials&amp;quot;&lt;br /&gt;credfile=&amp;quot;&amp;quot;&lt;/pre&gt;&lt;pre&gt;host=`echo $key | sed &#039;s!^//!!;s!/.*$!!&#039;`&lt;br /&gt;if [[ &amp;quot;$key&amp;quot; =~ &#039;/&#039; ]]; then&lt;br /&gt;    path=${key#*/}&lt;br /&gt;fi&lt;/pre&gt;&lt;pre&gt;if [ -z &amp;quot;$credfile&amp;quot; ]; then&lt;br /&gt;    # Search for credentials file&lt;br /&gt;    if [ -n &amp;quot;$path&amp;quot; ]; then&lt;br /&gt;        if [[ &amp;quot;$path&amp;quot; =~ &#039;/&#039; ]]; then&lt;br /&gt;            share=${path%%/*}&lt;br /&gt;        else&lt;br /&gt;            share=$path&lt;br /&gt;        fi&lt;br /&gt;    fi&lt;/pre&gt;&lt;pre&gt;    # First look for $creddir/$host.$share then for $creddir/$host&lt;br /&gt;    if [ -n &amp;quot;$share&amp;quot; ]; then&lt;br /&gt;        if [ -e &amp;quot;$creddir/$host.$share&amp;quot; ]; then&lt;br /&gt;            credfile=&amp;quot;$creddir/$host.$share&amp;quot;&lt;br /&gt;        elif [ -e &amp;quot;$creddir/$host&amp;quot; ]; then&lt;br /&gt;            credfile=&amp;quot;$creddir/$host&amp;quot;&lt;br /&gt;        fi&lt;br /&gt;    elif [ -e &amp;quot;$creddir/$host&amp;quot; ]; then&lt;br /&gt;        credfile=&amp;quot;$creddir/$host&amp;quot;&lt;br /&gt;    else&lt;br /&gt;        credfile=&amp;quot;$creddir/defaults&amp;quot;&lt;br /&gt;    fi&lt;br /&gt;fi&lt;/pre&gt;&lt;pre&gt;smclopts=&amp;quot;&amp;quot;&lt;br /&gt;if [ &amp;quot;z$credfile&amp;quot; != &amp;quot;z&amp;quot; ]; then&lt;br /&gt;    smclopts=&amp;quot;$smclopts --authentication-file=$credfile -gL&amp;quot;&lt;br /&gt;    credopts=&amp;quot;&amp;quot;&lt;/pre&gt;&lt;pre&gt;    username=`egrep &#039;^username&#039; $credfile | sed &#039;s!^.*= &lt;strong&gt;!!;s! &lt;/strong&gt;$!!&#039;`&lt;br /&gt;    password=`egrep &#039;^password&#039; $credfile | sed &#039;s!^.*= &lt;strong&gt;!!;s! &lt;/strong&gt;$!!&#039;`&lt;br /&gt;    domain=``egrep &#039;^domain&#039; $credfile | sed &#039;s!^.*= &lt;strong&gt;!!;s! &lt;/strong&gt;$!!&#039;`&lt;/pre&gt;&lt;pre&gt;    if [ &amp;quot;z$username&amp;quot; != &amp;quot;z&amp;quot; ]; then&lt;br /&gt;        [ &amp;quot;z$credopts&amp;quot; = &amp;quot;z&amp;quot; ] \&lt;br /&gt;          &amp;amp;&amp;amp; credopts=&amp;quot;username=\&amp;quot;$username\&amp;quot;&amp;quot; \&lt;br /&gt;          || credopts=&amp;quot;$credopts,username=\&amp;quot;$username\&amp;quot;&amp;quot;&lt;br /&gt;    fi&lt;/pre&gt;&lt;pre&gt;    if [ &amp;quot;z$password&amp;quot; != &amp;quot;z&amp;quot; ]; then&lt;br /&gt;        [ &amp;quot;z$credopts&amp;quot; = &amp;quot;z&amp;quot; ] \&lt;br /&gt;          &amp;amp;&amp;amp; credopts=&amp;quot;password=\&amp;quot;$password\&amp;quot;&amp;quot; \&lt;br /&gt;          || credopts=&amp;quot;$credopts,password=\&amp;quot;$password\&amp;quot;&amp;quot;&lt;br /&gt;    fi&lt;/pre&gt;&lt;pre&gt;    if [ &amp;quot;z$domain&amp;quot; != &amp;quot;z&amp;quot; ]; then&lt;br /&gt;        [ &amp;quot;z$credopts&amp;quot; = &amp;quot;z&amp;quot; ] \&lt;br /&gt;          &amp;amp;&amp;amp; credopts=&amp;quot;domain=\&amp;quot;$domain\&amp;quot;&amp;quot; \&lt;br /&gt;          || credopts=&amp;quot;$credopts,domain=\&amp;quot;$domain\&amp;quot;&amp;quot;&lt;br /&gt;    fi&lt;br /&gt;    opts=&amp;quot;$opts,$credopts&amp;quot;&lt;br /&gt;else&lt;br /&gt;    smclopts=&amp;quot;$smclopts -gNL&amp;quot;&lt;br /&gt;fi&lt;/pre&gt;&lt;pre&gt;&lt;br /&gt;for P in /bin /sbin /usr/bin /usr/sbin&lt;br /&gt;do&lt;br /&gt;    if [ -x $P/smbclient ]&lt;br /&gt;    then&lt;br /&gt;        SMBCLIENT=$P/smbclient&lt;br /&gt;        break&lt;br /&gt;    fi&lt;br /&gt;done&lt;/pre&gt;&lt;pre&gt;&lt;br /&gt;[ -x $SMBCLIENT ] || exit 1&lt;/pre&gt;&lt;pre&gt;$SMBCLIENT $smclopts $key 2&amp;gt;/dev/null| awk -v key=&amp;quot;$key&amp;quot; -v opts=&amp;quot;$opts&amp;quot; -F&#039;|&#039; -- &#039;&lt;br /&gt;    BEGIN    { ORS=&amp;quot;&amp;quot;; first=1 }&lt;br /&gt;    /Disk/    {&lt;br /&gt;          if (first)&lt;br /&gt;            print opts; first=0&lt;/pre&gt;&lt;pre&gt;          dir = $2&lt;br /&gt;          loc = $2&lt;/pre&gt;&lt;pre&gt;          # Enclose mount dir and location in quotes&lt;br /&gt;          # Double quote &amp;quot;$&amp;quot; in location as it is special&lt;br /&gt;          gsub(/\$$/, &amp;quot;\\$&amp;quot;, loc);&lt;br /&gt;          gsub(/\&amp;amp;/,&amp;quot;\\\\&amp;amp;&amp;quot;,loc)&lt;br /&gt;          print &amp;quot; \\\n\t \&amp;quot;/&amp;quot; dir &amp;quot;\&amp;quot;&amp;quot;, &amp;quot;\&amp;quot;://&amp;quot; key &amp;quot;/&amp;quot; loc &amp;quot;\&amp;quot;&amp;quot;&lt;br /&gt;        }&lt;br /&gt;    END     { if (!first) print &amp;quot;\n&amp;quot;; else exit 1 }&lt;br /&gt;    &#039;&lt;/pre&gt;&lt;/blockquote&gt;&lt;p&gt;After&lt;br /&gt;
 this fix, we should prepare credential file with name line &amp;quot;minitrue&amp;quot;, &lt;br /&gt;
&amp;quot;minitrue.tmp&amp;quot; and &amp;quot;defaults&amp;quot; in the directory &amp;quot;/etc/auto.credentials/&amp;quot;.&lt;br /&gt;
 The format of the files can be refered by &amp;quot;man smbclient&amp;quot;.&lt;/p&gt;&lt;p&gt;The file defaults should be like as follows,&lt;/p&gt;&lt;blockquote&gt;&lt;pre&gt;username = myUser&lt;br /&gt;password = myPassword&lt;br /&gt;domain = myDomain&lt;/pre&gt;&lt;/blockquote&gt;&lt;p&gt;The file must be create for the shared path, if username or password is different from the defaults.&lt;/p&gt;&lt;h2&gt;日本語で追加&lt;/h2&gt;&lt;p align=&quot;justify&quot;&gt;automountのsmbマウントがauto.smbでできない場合の修正方法を説明します。(できていれば、/smb/host/shareでアクセスすると、自動でマウントされます)&lt;/p&gt;&lt;p&gt;まとめ&lt;/p&gt;&lt;ul&gt;&lt;li&gt;オリジナルのauto.smbは、サービスのリストを得るために、smbclientを無名アクセスで行っています。このため、通常のWindows共有で蹴られます。認証情報のオプション(-credentials)を付けて実行する必要があります。&lt;/li&gt;&lt;li&gt;マウント自体は、mount.cifsを使用しています。こちらにも同じ認証情報を渡さないとなりませんが、ドメイン、ユーザ、パスワードで分けて渡します。&lt;/li&gt;&lt;li&gt;認証情報は、相手サーバによって違うのが普通なので、複数の認証ファイルを使い分けるようにしないとなりません。&lt;/li&gt;&lt;/ul&gt;結局のところ、&lt;a href=&quot;http://ubuntuforums.org/showthread.php?t=885713&quot;&gt;このサイト&lt;/a&gt; のを参考にして、上記スクリプトにしました。利用には、以下のようにします。&lt;p /&gt;&lt;ul&gt;&lt;li&gt;/etc/auto.credentials/に認証ファイルを置きます。&lt;br /&gt;共有名が、\\host\share であれば、host.shareのファイル、&lt;br /&gt;share間で共通であれば、hostのファイル、&lt;br /&gt;デフォルトはdefaultsのファイルです。&lt;/li&gt;&lt;li&gt;マッチングの優先度は、細かく指定されているほう(host.share &amp;gt; host &amp;gt; defaults)になります。&lt;/li&gt;&lt;li&gt;書式は、&lt;br /&gt;username = 認証ユーザ名&lt;br /&gt;password = このユーザのパスワード&lt;br /&gt;domain = この共有のドメイン&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;p /&gt;&lt;p /&gt;&lt;p /&gt;&lt;p /&gt;&lt;p /&gt;&lt;p /&gt;&lt;p /&gt;&lt;p /&gt;&lt;p /&gt;&lt;p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;&lt;a href=&quot;http://www.nikep.net/srdpty/index.php?/archives/87-Ubuntu-Tips-Fix-auto.smb-for-automount-Windows-shares..html#extended&quot;&gt;&quot;Ubuntu Tips: Fix auto.smb for automount Windows shares.&quot; の続きを読む...&lt;/a&gt;
    </content:encoded>

    <pubDate>Wed, 15 May 2013 01:04:21 +0900</pubDate>
    <guid isPermaLink="false">http://www.nikep.net/srdpty/index.php?/archives/87-guid.html</guid>
    
</item>
<item>
    <title>iOS/iPhone開発小技</title>
    <link>http://www.nikep.net/srdpty/index.php?/archives/86-iOSiPhone.html</link>
            <category>開発</category>
    
    <comments>http://www.nikep.net/srdpty/index.php?/archives/86-iOSiPhone.html#comments</comments>
    <wfw:comment>http://www.nikep.net/srdpty/wfwcomment.php?cid=86</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.nikep.net/srdpty/rss.php?version=2.0&amp;type=comments&amp;cid=86</wfw:commentRss>
    

    <author>nospam@example.com (金子 恵季)</author>
    <content:encoded>
    &lt;br /&gt;
&lt;p align=&quot;justify&quot;&gt;ここ暫く、常駐でiPhoneアプリの開発をしてきました。他人のアプリ開発をすると、想定外の機能や仕様を実装することになることがしばしばです。そうすると、知らなかったやり方を調べたり考案したりしなくてはならず、勉強になることも多いです。この過程で分った、iOS開発のtipsを紹介して行きます。&lt;/p&gt;&lt;h1 align=&quot;justify&quot;&gt;iOSアプリのスレッドの扱い&lt;/h1&gt;&lt;p align=&quot;justify&quot;&gt;iOSの開発では、通常はスレッドを意識する必要はありません。基本的には、システムから呼ばれる(例えばViewController Class等の)メソッドを実装するわけですが、これらは、殆どMainThreadで動きます。また、非同期APIなどでは、システムが適宜スレッドを分けて実行してくれるからです。しかし、UIActionIndicaterを使うときなどで、例えばUIWebViewのデリゲートが別スレッドから呼ばれるのに気づいたります。&lt;/p&gt;&lt;h2&gt;新たに別スレッドを上げて、非同期に実行する&lt;/h2&gt;&lt;div align=&quot;justify&quot;&gt;&lt;p&gt;iOSでは、コールバックとして呼ばれたメインスレッドを止めてしまうことはできませんので、重い処理や、待ちを入れないとならない処理は、別スレッドで実行する必要があります。これは、以下のように、doInTheOtherThreadメソッドを作成して呼出します。このとき、別スレッドのメソッドは、メモリプールを別に取らないとならないようで&lt;/p&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;p&gt;&lt;code class=&quot;prettyprint&quot;&gt;&lt;span class=&quot;pln&quot;&gt;&lt;/span&gt;&lt;font face=&quot;arial,helvetica,sans-serif&quot;&gt;&lt;i&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; performSelectorInBackground&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;@selector&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;doInTheOtherThread&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; withObject&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;paramObj];&lt;/span&gt;&lt;/i&gt;&lt;span class=&quot;pun&quot;&gt;&lt;/span&gt;&lt;/font&gt;&lt;/code&gt;&lt;font face=&quot;arial,helvetica,sans-serif&quot;&gt;&lt;code class=&quot;prettyprint&quot;&gt;&lt;/code&gt;&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;div align=&quot;justify&quot;&gt;&lt;pre&gt;&lt;font face=&quot;arial,helvetica,sans-serif&quot;&gt;&lt;code class=&quot;prettyprint&quot;&gt;&lt;span class=&quot;pln&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/font&gt;&lt;/pre&gt;&lt;div align=&quot;left&quot;&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;font face=&quot;arial,helvetica,sans-serif&quot;&gt;&lt;i&gt;......;&lt;/i&gt;&lt;/font&gt;&lt;/pre&gt;&lt;pre&gt;&lt;font face=&quot;arial,helvetica,sans-serif&quot;&gt;&lt;i&gt;&lt;code class=&quot;prettyprint&quot;&gt;&lt;span class=&quot;pun&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;void&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;code class=&quot;prettyprint&quot;&gt;&lt;span class=&quot;pln&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;code class=&quot;prettyprint&quot;&gt;&lt;span class=&quot;pln&quot;&gt;doInTheOtherThread:(id)paramObj  &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;/span&gt;&lt;span class=&quot;com&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;NSAutoreleasePool&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;pool&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[[&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;NSAutoreleasePool&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; alloc&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; init&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;br /&gt;    if (pool == nil) return;&lt;br /&gt;    .....;&lt;/span&gt;&lt;/code&gt;&lt;/i&gt;&lt;i&gt;&lt;code class=&quot;prettyprint&quot;&gt;&lt;span class=&quot;pun&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;pool drain&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;&lt;br /&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/i&gt;&lt;/font&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/div&gt;&lt;h2&gt;別スレッドから、メインスレッドとして実行する&lt;/h2&gt;&lt;p align=&quot;justify&quot;&gt;処理は別スレッドで行った場合で、一部の処理をメインスレッドで実行したい場合です。特に、UIメッセージはメインスレッドから発行しないとなりませんので、この目的で頻繁に使います。この場合は、当該処理をメソッドに分けて、メインスレッドのコンテキストで実行します。&lt;/p&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;i&gt;&lt;font face=&quot;times new roman,times,serif&quot;&gt;[NSObject performSelectorOnMainThread:doInTheMainThread withObject:paramObj waitUntilDone:YES]; &lt;/font&gt;&lt;/i&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;p align=&quot;justify&quot; /&gt;&lt;h2&gt;メインスレッドで一時的に待ちを入れる&lt;/h2&gt;&lt;p align=&quot;justify&quot;&gt;メインスレッドはメソッド内部で待ちに入ることはできない(再開できなくなります)のですが、RunLoopに戻って実行を遅延させることはできます。これは、例えばUIActionIndicatorの表示をする際に使うことができます。(これを使わない限り、startAnimationとstopAnimationを一つの関数の中で実行しても、表示されません)&lt;/p&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;i&gt;&lt;font face=&quot;times new roman,times,serif&quot;&gt;[[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:0.0f]];&lt;/font&gt;&lt;/i&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;p align=&quot;left&quot; /&gt;&lt;p align=&quot;justify&quot; /&gt;&lt;h2&gt;非メインスレッドで同期する&lt;/h2&gt;&lt;p align=&quot;justify&quot;&gt;メインスレッドでなければ、mutexで待合わせることは可能です。例えば、以下のようなコードになります。この場合は、2回目のlockでウェイトします。&lt;/p&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;i&gt;&lt;font face=&quot;times new roman,times,serif&quot;&gt;MethodRunOnThread1 {&lt;br /&gt;  pthread_mutex_init(&amp;amp;mutex, &amp;amp;attr);&lt;br /&gt;  pthread_mutex_lock(&amp;amp;mutex);&lt;br /&gt;&lt;font size=&quot;2&quot; face=&quot;times new roman,times,serif&quot;&gt;  &lt;code class=&quot;prettyprint&quot;&gt;&lt;font&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; performSelectorInBackground&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;@selector&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;/span&gt;&lt;/font&gt;&lt;/code&gt;MethodRunOnThread2&lt;code class=&quot;prettyprint&quot;&gt;&lt;font&gt;&lt;span class=&quot;pln&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; withObject&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;nil];&lt;/span&gt;&lt;/font&gt;&lt;/code&gt;&lt;/font&gt;&lt;br /&gt;  pthread_mutex_lock(&amp;amp;mutex);&lt;br /&gt;  phtread_mutex_unlock(&amp;amp;mutex);&lt;br /&gt;  do_next_things...;&lt;br /&gt;}&lt;/font&gt;&lt;/i&gt;&lt;/pre&gt;&lt;i&gt;&lt;font face=&quot;times new roman,times,serif&quot;&gt;MethodRunOnThread2 {&lt;br /&gt;   do something;&lt;br /&gt;   phread_mutex_unlock(&amp;amp;mutex);&lt;br /&gt;}&lt;/font&gt;&lt;/i&gt;&lt;/blockquote&gt;&lt;pre&gt;  &lt;/pre&gt;&lt;pre&gt;&lt;p align=&quot;justify&quot; /&gt;&lt;p align=&quot;justify&quot; /&gt;&lt;p /&gt;&lt;p align=&quot;justify&quot; /&gt;&lt;p align=&quot;justify&quot;&gt;&lt;br /&gt;
&lt;/p&gt;&lt;/pre&gt; 
    </content:encoded>

    <pubDate>Fri, 13 Jan 2012 01:01:57 +0900</pubDate>
    <guid isPermaLink="false">http://www.nikep.net/srdpty/index.php?/archives/86-guid.html</guid>
    
</item>
<item>
    <title>YouTube仕様変更2011/8/4に対応</title>
    <link>http://www.nikep.net/srdpty/index.php?/archives/85-YouTube201184.html</link>
            <category>開発</category>
    
    <comments>http://www.nikep.net/srdpty/index.php?/archives/85-YouTube201184.html#comments</comments>
    <wfw:comment>http://www.nikep.net/srdpty/wfwcomment.php?cid=85</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.nikep.net/srdpty/rss.php?version=2.0&amp;type=comments&amp;cid=85</wfw:commentRss>
    

    <author>nospam@example.com (金子 恵季)</author>
    <content:encoded>
    &lt;br /&gt;
&lt;h1&gt;YouTubeダウンローダを最新仕様に更新&lt;/h1&gt;&lt;p align=&quot;justify&quot;&gt;&lt;a title=&quot;YouTubeダウンローダー&amp;変換サービス&quot; href=&quot;/ytdownloader.var&quot;&gt;YouTubeダウンロードサービス&lt;/a&gt;と&lt;a title=&quot;YouTube Downloader Script&quot; href=&quot;/software.var#_youtube&quot;&gt;ダウンロードスクリプト&lt;/a&gt;がエラーしていたのを修正しました。&lt;/p&gt;&lt;div align=&quot;justify&quot;&gt;&lt;p&gt;Apacheのログを見る限りでは、8/4にYouTubeの仕様が変更されており、ダウンロードが一切できなくなっていました。別の仕事の納期が迫っていたために放置していたのですが、今週頭になんとか上がり、2〜3日前から見ていました。昨日、ようやく最新仕様に合わせて動かすことができるようになりました。&lt;/p&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot;&gt;変更点は、以下のようなものでした。&lt;/div&gt;&lt;ol&gt;&lt;li&gt;fmt_url_mapがなくなって、url_encoded_fmt_stream_mapになった。&lt;/li&gt;&lt;li&gt;この記述があるタグも変わり、&amp;lt;embed type=&amp;quot;application/x-shockwave-flash&amp;quot;とyt.setConfig({ &#039;PLAYER_CONFIG&#039;:の二箇所になった。後者は初顔。&lt;/li&gt;&lt;li&gt;&lt;div align=&quot;justify&quot;&gt;webmコーデックのファイル(43,44,45)が新登場。&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div align=&quot;justify&quot;&gt;&lt;p&gt;url_encoded_fmt_stream_mapは以前と書式が異なります。今回は、itagでフォーマットタイプを知り、url=http://....でURLを得ます。楽勝と思い実装してみたのですが、なぜか上手く行きません。やみくもにやっていては駄目と思われましたので、少し分析してみました。&lt;/p&gt;&lt;p&gt;はまってしまっていた罠は、以下の2点のようでした。&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&amp;lt;embed ...のほうは、urlエンコードが2回掛かっています。また、PLAYER_CONFIGのほうは、urlエンコードが1回と、Unicode Escape(一部文字に)が1回掛かっています。&lt;/li&gt;&lt;li&gt;webmフォーマットのファイルはurlパラメタそのままで取得できますが、他のフォーマット(mp4/flv)は、quality=以下を切ってやらないと&amp;quot;403 Forbidden&amp;quot;になってしまいます。&lt;/li&gt;&lt;/ol&gt;&lt;p align=&quot;justify&quot;&gt;(1)はプレイヤへの引数渡しの際の禁止文字の都合なのだろうと推測できますが、元々のパラメタが呪文文字列(数字)なので、結構悩みました。(2)に関しては全く見当が付きません。処置が的確なのかどうかすら分らない状態です。&lt;/p&gt;&lt;h2&gt;結論&lt;/h2&gt;&lt;p align=&quot;justify&quot;&gt;このコードで動いています。(embed, PLAYER_CONFIGのどちらでも動きます)&lt;/p&gt;&lt;pre&gt;&lt;i&gt;&lt;font face=&quot;times new roman,times,serif&quot;&gt;	if (m|\&#039;PLAYER_CONFIG\&#039;: {(.*)}$|) {&lt;br /&gt;	    my $rt = GetFmtUrlMapFromPlayerConfig($1);&lt;br /&gt;	    %vphash = %$rt;&lt;br /&gt;	    if (length($title) &amp;lt;= 0) {&lt;br /&gt;		$title = GetTitleFromPlayerConfig($1);&lt;br /&gt;	    }&lt;br /&gt;	} elsif (m|&amp;lt;embed type=\&amp;quot;application/x-shockwave-flash\&amp;quot; +([^&amp;gt;]*)&amp;gt;|) {&lt;br /&gt;	    my $rt = GetFmtUrlMapFromEmbed($1);&lt;br /&gt;	    %vphash = %$rt;&lt;br /&gt;	    if (length($title) &amp;lt;= 0) {&lt;br /&gt;		$title = GetTitleFromEmbed($1);&lt;br /&gt;	    }&lt;br /&gt;	}&lt;/font&gt;&lt;/i&gt;&lt;/pre&gt;&lt;pre&gt;&lt;i&gt;&lt;font face=&quot;times new roman,times,serif&quot;&gt;sub GetFmtUrlMapFromEmbed&lt;br /&gt;{&lt;br /&gt;    my ($argstr) = @_;&lt;br /&gt;    if ($argstr =~ m|;fmt_url_map=([^;\&amp;quot;]+)[;\&amp;quot;]|) {&lt;br /&gt;	my $ar = urldecode($1);&lt;br /&gt;	my @vpbacks = split(/,/, $ar);&lt;br /&gt;	foreach my $vpback (@vpbacks) {&lt;br /&gt;	    $vpback =~ m/^[\s]*([0-9]*)|(.*)[\s]*$/;&lt;br /&gt;	    $vphsh{$1} = $2;&lt;br /&gt;	}&lt;br /&gt;    } elsif ($argstr =~ m|url_encoded_fmt_stream_map=([^\;]+)\;|) {&lt;br /&gt;	my $ar = urldecode($1);&lt;br /&gt;	my @prms = split(/,/, $ar);&lt;br /&gt;	foreach my $prm (@prms) {&lt;br /&gt;	    if ($prm =~ m!itag=([0-9]+)[^0-9]*!) {&lt;br /&gt;		my $fmt = $1;&lt;br /&gt;		my $ar = urldecode($prm);&lt;br /&gt;		if ($ar =~ m!url=([^\;]+)!) {&lt;br /&gt;		    $ar = $1;&lt;br /&gt;		    if ($fmt &amp;lt; 40) {&lt;br /&gt;			#-- not webm&lt;br /&gt;			$ar =~ s!&amp;amp;quality=.*!!;&lt;br /&gt;		    }&lt;br /&gt;		    $vphsh{$fmt} = $ar;&lt;br /&gt;		}&lt;br /&gt;	    }&lt;br /&gt;	}&lt;br /&gt;    }&lt;br /&gt;    return %vphsh;&lt;br /&gt;}&lt;/font&gt;&lt;/i&gt;&lt;/pre&gt;&lt;pre&gt;&lt;i&gt;&lt;font face=&quot;times new roman,times,serif&quot;&gt;sub GetFmtUrlMapFromPlayerConfig&lt;br /&gt;{&lt;br /&gt;    my ($argstr) = @_;&lt;br /&gt;    if ($argstr =~ m|\&amp;quot;url_encoded_fmt_stream_map\&amp;quot;: \&amp;quot;([^\&amp;quot;]+)\&amp;quot;|) {&lt;br /&gt;	my @prms = split(/,/, $1);&lt;br /&gt;	foreach my $prm (@prms) {&lt;br /&gt;	    if ($prm =~ m!itag=([0-9]+)[^0-9]*!) {&lt;br /&gt;		my $fmt = $1;&lt;br /&gt;		my $ar = UnicodeUnescape(urldecode($prm));&lt;br /&gt;		if ($ar =~ m!url=([^\;]+)!) {&lt;br /&gt;		    $ar = $1;&lt;br /&gt;		    if ($fmt &amp;lt; 40) {&lt;br /&gt;			#-- not webm&lt;br /&gt;			$ar =~ s!&amp;amp;quality=.*!!;&lt;br /&gt;		    }&lt;br /&gt;		    $vphsh{$fmt} = $ar;&lt;br /&gt;		}&lt;br /&gt;	    }&lt;br /&gt;	}&lt;br /&gt;    }&lt;br /&gt;    return %vphsh;&lt;br /&gt;}&lt;/font&gt;&lt;/i&gt;&lt;/pre&gt;&lt;p&gt;れで動くようになりましたが、webm対応ができていません。今後、主力のコーデックになるようなので、将来的には対応は必須なのでしょう。しかし、現在はバックワードコンパチビリティのためのmp4はおろか、flvまで用意されているようですので、後回しにします。というのも、コーデックが新しいので、サーバで使っているシステムに導入するのは骨なのです。それに、性能の上では圧倒的に優れている、という訳でもなさそうなことも一因です。&lt;/p&gt;&lt;p align=&quot;justify&quot;&gt;しかし、政治的な観点では、ライセンスフリーのwebmは大歓迎ですので、なんとかしたいものです。GIFやMP3で繰り返された混乱は、サービスを提供する側からすると大きな障害になってしまいますので。&lt;/p&gt;&lt;p /&gt;&lt;p /&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot;&gt;&lt;/div&gt; 
    </content:encoded>

    <pubDate>Fri, 19 Aug 2011 04:05:08 +0900</pubDate>
    <guid isPermaLink="false">http://www.nikep.net/srdpty/index.php?/archives/85-guid.html</guid>
    
</item>
<item>
    <title>LinuxでMTPを使う</title>
    <link>http://www.nikep.net/srdpty/index.php?/archives/84-LinuxMTP.html</link>
            <category>インストール</category>
    
    <comments>http://www.nikep.net/srdpty/index.php?/archives/84-LinuxMTP.html#comments</comments>
    <wfw:comment>http://www.nikep.net/srdpty/wfwcomment.php?cid=84</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.nikep.net/srdpty/rss.php?version=2.0&amp;type=comments&amp;cid=84</wfw:commentRss>
    

    <author>nospam@example.com (金子 恵季)</author>
    <content:encoded>
    &lt;br /&gt;
&lt;h1&gt;FOMAにメディアファイルを入れる方法&lt;/h1&gt;&lt;p&gt;メディアファイルのフォーマット変換サービスが、最近のFOMA端末では動かないとのことなので、情報を集めていました。どうやら、AAC on MP4とWMAしか再生できなくなっているということが分りましたので、実機で試してみることにしました。その仮定で、MTPやらデータベース化やら、技術的な問題が出ましたので、(全部のFOMAに当て嵌るかは不明ですが)整理します。特に、Linuxで携帯を利用するMTPのやり方について詳しく解説します。&lt;/p&gt;&lt;p&gt;実機はテスト用の昨年入手していたDoCoMo F-08Bです。さっそく作成した音声ファイルを読み込ませようとすると上手く行かないのでした。&lt;/p&gt;&lt;ol&gt;&lt;li&gt;USBマスストレージ: ファイルはコピーできるのですが、データフォルダからは見えません。&lt;br /&gt;　どこにコピーしても、ネットで調べた命名規則(mol060みたいな)にしても駄目。&lt;/li&gt;&lt;li&gt;SDカードにコピー: これも1と同様。こんなんでは、マスストレージやSDカードに対応してると言えないのでは…。&lt;/li&gt;&lt;li&gt;メール添付: ミュージックに入らずに、iモーションの「データ交換」に入る。&lt;br /&gt;　再生可も、ミュージックプレイヤーからはアクセスできないためプレイリストに入れられない。&lt;/li&gt;&lt;li&gt;FOMAシリーズSDユーティリティ: それで仕方なく、富士通製転送プログラムをインストールする。&lt;br /&gt;　勿論 Windows でしか動かない。音声ファイルはコピーできるものの、依然としてミュージックプレイヤからはアクセスできない。&lt;br /&gt;　メディアファイルに関しては、「FOMA90Xiでしか使えないよ」、という警告が出る。&lt;/li&gt;&lt;li&gt;Window Media Player: それで、Windows Media Player 11のファイルの同期を行うことでコピーできました。&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;なんと言いますか、無理やり機能制限を加えて行く内に、ぐちゃぐちゃな仕様になってしまいましたという感じの、典型的なガラケーでイライラさせられてしまいました。皆さん、これで使うことができているのでしょうか?&lt;/p&gt;&lt;p&gt;ちょっと理由を考えてみました。&lt;br /&gt;多分、1と2は、メディアファイルをデータベース化したからと思われます。怪しいファイルができていたり、太ったりするので、これに入っていると思われますが、中身が読めません。iPodやWalkmanと同じで、プロプラな制御しかさせないよ、というがっかりな仕組みです。&lt;br /&gt;4はいかにもなガラケー的な解決方法で、追加で(タイトルが半角カナ文字な)アプリをインストールしないとなりません。しかも、これで完結できないのが、信じられないところです。&lt;br /&gt;5は、これまた嫌われ者のMedia Player 11を使わないとならないということと、いちいち、端末設定をMTPモードに切り替えないとならないというゴミっぷりです。WMP11は、iTunesと同じく、ただ音楽を再生したいだけなのに、不要な音楽を新しく買え買え、言われてうんざりです。&lt;/p&gt;&lt;p&gt;整理すると、音声ファイルはデータベース管理になっていて、ファイルシステムのファイルとしては見えません。従って、SDカードにファイルとして書き込むことはできますが、携帯電話から音声ファイルとしては認識されなくなります。代わりに、本体はMTPモードを持っています(マスストレージ上のアプリプロトコルではなく)。MTPはケータイの中でデータベースに接続されているため、データフォルダやミュージックプレイヤ等から見える状態で書き込まれます。&lt;/p&gt;&lt;h2&gt;MTP&lt;/h2&gt;&lt;p align=&quot;justify&quot;&gt;Microsoft発案のメディア転送プロトコルですが、ファイル単位でマニピュレートするだけのもののようです。本当にこんなもの新しくいるの？って感じです。しかし、幸いなことに、Linuxでも使えることが分りました。&lt;/p&gt;&lt;ul&gt;&lt;li&gt;最低限必要なのは、libmtp。libusbがなれば要インストールですが、最新のものではlibmtpがコンパイル不可なので、0.1.12版が良いようです。これにはユーティリティが付いており、リスティング、コピー、削除等ができます。&lt;/li&gt;&lt;li&gt;これでは不便なので、mtpfsを追加します。これによって、ファイルシステムにマウントすることができるようになります。&lt;/li&gt;&lt;/ul&gt;&lt;p align=&quot;justify&quot;&gt;libmtpには、以下のようなユーティリティが付いていて、大体のマニピュレートを網羅しています。&lt;/p&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;font face=&quot;arial,helvetica,sans-serif&quot;&gt;&lt;font face=&quot;times new roman,times,serif&quot;&gt;&lt;i&gt;mtp-albumart      mtp-files         mtp-newfolder     mtp-thumb&lt;br /&gt;mtp-albums        mtp-folders       mtp-newplaylist   mtp-tracks&lt;br /&gt;mtp-connect       mtp-format        mtp-playlists     mtp-trexist&lt;br /&gt;mtp-delfile       mtp-getfile       mtp-reset         &lt;br /&gt;mtp-detect        mtp-getplaylist   mtp-sendfile      &lt;br /&gt;mtp-emptyfolders  mtp-hotplug       mtp-sendtr        &lt;/i&gt;&lt;/font&gt;&lt;/font&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;p align=&quot;justify&quot;&gt;&lt;br /&gt;デバイスは、mtp-detectで表示されていれば認識されていることになります。(継いだだけの段階では、ドライバがないよ、と言われます)。しかし、mtp-filesしてもフラットにファイルがリストされてしまい、かなり使い難いです。&lt;/p&gt;&lt;p align=&quot;justify&quot;&gt;マウントするためには、mtpfsを使います。fuseがなければ、事前インストールが必要になります。これも理由は不明なのですが、デバイスファイル経由のアクセスにはされていないみたいで、マウントはいきなり、以下のようにします。&lt;/p&gt;&lt;div align=&quot;justify&quot;&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;font face=&quot;times new roman,times,serif&quot;&gt;&lt;i&gt;mtpfs -o allow_other /mnt/mtp&lt;/i&gt;&lt;/font&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;p align=&quot;justify&quot;&gt;&lt;br /&gt;デバイスファイルがないので、mount -vt mtp ...のようにはできなくて、恰好悪いです。&lt;/p&gt;&lt;p align=&quot;justify&quot;&gt;しかしながら、これによって、Linuxでも扱えるようになりました。ケータイXXX転送みたいなプロプラなアプリを購入しないとならないよりはマシとも言えるかもしれません。&lt;/p&gt;&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Tue, 24 May 2011 03:23:20 +0900</pubDate>
    <guid isPermaLink="false">http://www.nikep.net/srdpty/index.php?/archives/84-guid.html</guid>
    
</item>
<item>
    <title>YouTubeダウンローダーでタイトルが取れないのを修正</title>
    <link>http://www.nikep.net/srdpty/index.php?/archives/83-YouTube.html</link>
            <category>開発</category>
    
    <comments>http://www.nikep.net/srdpty/index.php?/archives/83-YouTube.html#comments</comments>
    <wfw:comment>http://www.nikep.net/srdpty/wfwcomment.php?cid=83</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.nikep.net/srdpty/rss.php?version=2.0&amp;type=comments&amp;cid=83</wfw:commentRss>
    

    <author>nospam@example.com (金子 恵季)</author>
    <content:encoded>
    &lt;h1 align=&quot;justify&quot;&gt;YouTubeビデオのタイトルの仕様変更対応&lt;/h1&gt;&lt;p align=&quot;justify&quot;&gt;YouTube ダウンローダスクリプトでタイトルが取れなくなっているのに気が付きました。このため、&amp;quot;タイトル名.mp4&amp;quot;というファイル名になりません。どうやら、YouTubeに変更があったようです。しばらく放置していたのですが、修正することにしました。&lt;/p&gt;&lt;p&gt;手元で問題のページをwgetで取得してみると、今迄取得に使っていた&amp;lt;meta title=&amp;quot;&amp;quot;&amp;gt;のタグはあるようなのですが、スクリプトにすると取得てきていないようです。少し謎です。YouTubeはクライアントの違いによって色々なHTMLを返してくるようになっていますので、素直にデバッグは諦めて、他の部分に記載されたタイトルから拾うことにしました。&lt;/p&gt;&lt;p&gt;それで、修正したものがこちらです。&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://www.nikep.net/software.php#_youtube&quot;&gt;YouTubeダウンロードスクリプト&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://www.nikep.net/ytdownloader.var&quot;&gt;YouTubeダウンロードサービス&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;何か不具合があれば、お知らせ下さいませ。&lt;/p&gt;&lt;p&gt;なお、スクリプトのほうは、&lt;a href=&quot;http://www.nikep.net/srdpty/index.php?/archives/27-YouTube.html#comments&quot;&gt;バグ報告いただいていた件&lt;/a&gt;(wgetで動作しない)も修正してあります。&lt;/p&gt;&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Fri, 06 May 2011 01:28:15 +0900</pubDate>
    <guid isPermaLink="false">http://www.nikep.net/srdpty/index.php?/archives/83-guid.html</guid>
    
</item>
<item>
    <title>Decreasing number of the wallpaper distributing system</title>
    <link>http://www.nikep.net/srdpty/index.php?/archives/82-Decreasing-number-of-the-wallpaper-distributing-system.html</link>
            <category>開発</category>
    
    <comments>http://www.nikep.net/srdpty/index.php?/archives/82-Decreasing-number-of-the-wallpaper-distributing-system.html#comments</comments>
    <wfw:comment>http://www.nikep.net/srdpty/wfwcomment.php?cid=82</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.nikep.net/srdpty/rss.php?version=2.0&amp;type=comments&amp;cid=82</wfw:commentRss>
    

    <author>nospam@example.com (金子 恵季)</author>
    <content:encoded>
    &lt;br /&gt;
&lt;h1&gt;Wallpapers for photostand application.&lt;/h1&gt;&lt;p&gt;I provide &lt;a href=&quot;http://www.nikep.net/wallpaperservice.var&quot;&gt;the wallpaper distributing system&lt;/a&gt; for &lt;a href=&quot;http://www.nikep.net/wphotostand.var&quot;&gt;Linux &lt;/a&gt;and &lt;a href=&quot;http://www.nikep.net/photostand.var&quot;&gt;Windows&lt;/a&gt;. And I&#039;m sorry to have a trouble to display a uncool picture on users screen.&lt;b&gt;&lt;/b&gt;&lt;br /&gt;  &lt;/p&gt;&lt;p&gt;Two days ago I found some wallpapers are replaced to &amp;quot;Oops&amp;quot; image instead of original ones. To my understanding, it is made by a site to avoid their pictures from downloading without showing their advertisement banners. The site is included in my directory, from which a recommended pictures are selected by matching user keywords. &lt;/p&gt;&lt;p&gt;Basically I don&#039;t have any pictures becase of copy right reason, and the service has a directory of pictures with thumbnails, so that it acts as a kind of search engine of images. (Only exclusion is nasaimage, and we provide under its rule of copyright). And I think that it is fair for each sites to decide how to distribute their contents, so I should respect their desision and give up checking the site technically.&lt;/p&gt;&lt;p&gt;Then I remove the site URL from the directory and rebuild a database of picture pool. And I feel disappointed to find that the number of pictures in the pool is decreased to be a half of the day before. &lt;br /&gt; &lt;/p&gt;&lt;p&gt;I think to be a risk that my service depends much on a few other&#039;s site. So I add three small wallpaper sites in the directory Yesterday. It does not increase the number dramatically, but I&#039;d like to add many other site to be the number of pictures up to 10 thousand again.&lt;/p&gt;&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Mon, 02 May 2011 06:33:44 +0900</pubDate>
    <guid isPermaLink="false">http://www.nikep.net/srdpty/index.php?/archives/82-guid.html</guid>
    
</item>
<item>
    <title>Utility Scripts for FireGestures II</title>
    <link>http://www.nikep.net/srdpty/index.php?/archives/81-Utility-Scripts-for-FireGestures-II.html</link>
            <category>開発</category>
    
    <comments>http://www.nikep.net/srdpty/index.php?/archives/81-Utility-Scripts-for-FireGestures-II.html#comments</comments>
    <wfw:comment>http://www.nikep.net/srdpty/wfwcomment.php?cid=81</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.nikep.net/srdpty/rss.php?version=2.0&amp;type=comments&amp;cid=81</wfw:commentRss>
    

    <author>nospam@example.com (金子 恵季)</author>
    <content:encoded>
    &lt;br /&gt;
&lt;h1&gt;Script To Copy Link URL to clipboard.&lt;/h1&gt;&lt;p&gt;I create an another javascript for FireGestures. The function is to copy URL of the link to system clipboard/cut buffer. Basically it should work on any systems such as Linux, Windows or Mac OS X.&lt;/p&gt;&lt;p&gt;I like to use FireGestures on firefox browser, and &lt;a href=&quot;http://www.nikep.net/srdpty/index.php?/archives/78-Scripts-for-FireGesture-on-Firefox.html&quot;&gt;made some user scripts&lt;/a&gt; to extend the funtion. This script is useful when you download media files by using download scripts instead of viewing on the browser. I made it to use when I want to get sequencial images or video files with &lt;a href=&quot;http://www.nikep.net/software.var#_incwget&quot;&gt;incwget&lt;/a&gt;, and download videos from YouTube with &lt;a href=&quot;http://www.nikep.net/software.var#_youtube&quot;&gt;ytdownloader.pl&lt;/a&gt;. Mozilla supports the function with right button menu, but I often feel irritated to copy many URLs.&lt;/p&gt;&lt;p&gt;The code is here;&lt;/p&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;i&gt;&lt;font face=&quot;times new roman,times,serif&quot;&gt;var linkURL = FireGestures.getLinkURL();&lt;br /&gt;if (!linkURL)&lt;br /&gt;  throw FireGestures.getLocaleString(&amp;quot;ERROR_NOT_ON_LINK&amp;quot;);&lt;br /&gt;var clipboard = Cc[&amp;quot;@mozilla.org/widget/clipboardhelper;1&amp;quot;].getService(Ci.nsIClipboardHelp&lt;br /&gt;er);&lt;br /&gt;clipboard.copyString(linkURL);&lt;/font&gt;&lt;/i&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;p /&gt;&lt;p&gt;&lt;br /&gt;
&lt;/p&gt; 
    </content:encoded>

    <pubDate>Tue, 26 Apr 2011 03:49:38 +0900</pubDate>
    <guid isPermaLink="false">http://www.nikep.net/srdpty/index.php?/archives/81-guid.html</guid>
    
</item>
<item>
    <title>iPadアプリケーション</title>
    <link>http://www.nikep.net/srdpty/index.php?/archives/79-iPad.html</link>
            <category>開発</category>
    
    <comments>http://www.nikep.net/srdpty/index.php?/archives/79-iPad.html#comments</comments>
    <wfw:comment>http://www.nikep.net/srdpty/wfwcomment.php?cid=79</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.nikep.net/srdpty/rss.php?version=2.0&amp;type=comments&amp;cid=79</wfw:commentRss>
    

    <author>nospam@example.com (金子 恵季)</author>
    <content:encoded>
    &lt;br /&gt;
&lt;h1&gt;iPadアプリ「幸福の王子」公開&lt;/h1&gt;&lt;p align=&quot;justify&quot;&gt;&lt;a href=&quot;http://eitokusya.com/main/&quot; title=&quot;eitokusya&quot;&gt;合同会社英徳社&lt;/a&gt;からiPadアプリ「幸福の王子」がAppStoreに出ました。私がソフトウェア部分の開発を請け負っていたものです。&lt;/p&gt;&lt;p align=&quot;justify&quot;&gt;&lt;a href=&quot;http://www.nikep.net/srdpty/uploads/talkbook-info.jpg&quot; class=&quot;serendipity_image_link&quot;&gt;&lt;!-- s9ymdb:70 --&gt;&lt;img width=&quot;110&quot; height=&quot;85&quot; src=&quot;http://www.nikep.net/srdpty/uploads/talkbook-info.serendipityThumb.jpg&quot; style=&quot;border: 0px none ; float: right; padding-left: 5px; padding-right: 5px;&quot; class=&quot;serendipity_image_right&quot; /&gt;&lt;/a&gt;絵本アプリで、テキストと挿絵を見ながら、日本語、英語のバイリンガルで朗読してくれます。お話はオスカー・ワイルドの原作で、王子様の黄金像と心優しい燕の悲しい、良く知られた物語です。朗読は、役者さんに入れていただいた、とのことで、大変聞き易いものになっています。物語全部ですので、日本語のほうだけで30分くらいあり、長い通勤などでも充分楽しめるボリュームがあります。&lt;/p&gt;&lt;p align=&quot;justify&quot;&gt;ソフト的には、英語学習者、日本語学習者に使っていただくことも想定して、お話途中で音声とテキスト画面をワンボタンで切り替えが可能にしています。また、どこを読んでいるか、カーソルで追えるようになっており、再生箇所をタッチで指定することもできます。&lt;/p&gt;&lt;p align=&quot;justify&quot;&gt;画面的に定型のiPad/iPhoneアプリではなかったりすることも含めて、お客様からどういった声をいただけるのか、とても楽しみです。&lt;/p&gt;&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Fri, 25 Mar 2011 03:41:24 +0900</pubDate>
    <guid isPermaLink="false">http://www.nikep.net/srdpty/index.php?/archives/79-guid.html</guid>
    
</item>
<item>
    <title>Scripts for FireGesture on Firefox</title>
    <link>http://www.nikep.net/srdpty/index.php?/archives/78-Scripts-for-FireGesture-on-Firefox.html</link>
            <category>開発</category>
    
    <comments>http://www.nikep.net/srdpty/index.php?/archives/78-Scripts-for-FireGesture-on-Firefox.html#comments</comments>
    <wfw:comment>http://www.nikep.net/srdpty/wfwcomment.php?cid=78</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.nikep.net/srdpty/rss.php?version=2.0&amp;type=comments&amp;cid=78</wfw:commentRss>
    

    <author>nospam@example.com (金子 恵季)</author>
    <content:encoded>
    &lt;br /&gt;
&lt;h1&gt;Utility Scripts for FireGestures&lt;/h1&gt;&lt;p&gt;I wrote some scripts of internet search of words in clipboard for FireGestures.&lt;/p&gt;&lt;p&gt;FireGesture is a very useful addon to enable flexible mouse gestures on Firefox. It has a extension scheme with that user defined gestures and functions can be added. User functions should be written by Javascipt. A little before I downloaded a script named &amp;quot;open URL in clipboard&amp;quot;, and I wrote some scripts from it.&lt;/p&gt;&lt;p /&gt;&lt;ol&gt;&lt;li&gt;Web Search&lt;/li&gt;&lt;li&gt;Wikipedia search&lt;/li&gt;&lt;li&gt;Image Search&lt;/li&gt;&lt;li&gt;Map Search&lt;/li&gt;&lt;li&gt;Video Search&lt;/li&gt;&lt;li&gt;Dictionary Search&lt;/li&gt;&lt;/ol&gt;&lt;h2&gt;Base script&lt;/h2&gt;&lt;p /&gt;&lt;p&gt;Base scripts of those are identical as follows. The default behavier is open new tab to show the page. (It can be changed with some flags in the script.)&lt;/p&gt;&lt;blockquote&gt;&lt;font size=&quot;2&quot; face=&quot;&#039;times new roman&#039;, times, serif&quot; class=&quot;Apple-style-span&quot;&gt;&lt;i&gt;const IN_NEW_TAB = true;&lt;/i&gt;&lt;/font&gt;&lt;br /&gt;&lt;font size=&quot;2&quot; face=&quot;&#039;times new roman&#039;, times, serif&quot; class=&quot;Apple-style-span&quot;&gt;&lt;i&gt;const IN_BACKGROUND = true;&lt;/i&gt;&lt;/font&gt;&lt;br /&gt;&lt;font size=&quot;2&quot; face=&quot;&#039;times new roman&#039;, times, serif&quot; class=&quot;Apple-style-span&quot;&gt;&lt;i&gt;var str = readFromClipboard();&lt;/i&gt;&lt;/font&gt;&lt;br /&gt;&lt;font size=&quot;2&quot; face=&quot;&#039;times new roman&#039;, times, serif&quot; class=&quot;Apple-style-span&quot;&gt;&lt;i&gt;if (!str)&lt;/i&gt;&lt;/font&gt;&lt;font size=&quot;2&quot; face=&quot;&#039;times new roman&#039;, times, serif&quot; class=&quot;Apple-style-span&quot;&gt;&lt;i&gt; return;&lt;/i&gt;&lt;/font&gt;&lt;br /&gt;&lt;font size=&quot;2&quot; face=&quot;&#039;times new roman&#039;, times, serif&quot; class=&quot;Apple-style-span&quot;&gt;&lt;i&gt;  str = encodeURIComponent(str);&lt;/i&gt;&lt;/font&gt;&lt;br /&gt;&lt;font size=&quot;2&quot; face=&quot;&#039;times new roman&#039;, times, serif&quot; class=&quot;Apple-style-span&quot;&gt;&lt;i&gt;&lt;font color=&quot;#ff3300&quot; class=&quot;Apple-style-span&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;str = &lt;/font&gt;&amp;quot;http://www.google.co.jp/search?hl=ja&amp;amp;source=hp&amp;amp;q=&amp;quot; + str + &amp;quot;&amp;amp;aq=f&amp;amp;aqi=g10&amp;amp;aql=&amp;amp;oq=&amp;amp;gs_rfai=&amp;quot;;&lt;/font&gt;&lt;br /&gt;if (IN_NEW_TAB)&lt;br /&gt;
&lt;br /&gt;  gBrowser.loadOneTab(str, null, null, null, IN_BACKGROUND, false);&lt;br /&gt;else&lt;br /&gt;  gBrowser.loadURI(str);&lt;/i&gt;&lt;/font&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;font size=&quot;3&quot; face=&quot;arial,helvetica,sans-serif&quot; class=&quot;Apple-style-span&quot;&gt;And then replace the red line to other URL of search engine sites for each media. The followings are my setting living in Japan, so that URLs are Japanse sites. Please change them to fit your country environment.&lt;/font&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Web Search: Gesture: letter &amp;quot;G&amp;quot; (ULDRUL), URL (&lt;font size=&quot;2&quot;&gt;&lt;i&gt;&amp;quot;http://www.google.co.jp/search?hl=ja&amp;amp;source=hp&amp;amp;q=&amp;quot; + str + &amp;quot;&amp;amp;aq=f&amp;amp;aqi=g10&amp;amp;aql=&amp;amp;oq=&amp;amp;gs_rfai=&amp;quot;&lt;/i&gt;&lt;/font&gt;)&lt;/li&gt;&lt;li&gt;Wikipedia search: Gesture: letter &amp;quot;W&amp;quot; (DUDU), URL(&lt;i&gt;&lt;font size=&quot;2&quot;&gt;&amp;quot;http://ja.wikipedia.org/w/index.php?search=&amp;quot; + str&lt;/font&gt;&lt;/i&gt;)&lt;/li&gt;&lt;li&gt;Image Search: letter &amp;quot;GI&amp;quot; (ILDRULD), URL(&lt;font size=&quot;2&quot;&gt;&lt;i&gt;&amp;quot;http://images.google.co.jp/images?hl=ja&amp;amp;source=imghp&amp;amp;q=&amp;quot; + str + &amp;quot;&amp;amp;gbv=2&amp;amp;aq=f&amp;amp;aqi=g4&amp;amp;aql=&amp;amp;oq=&amp;amp;gs_rfai=&amp;quot;&lt;/i&gt;&lt;/font&gt;)&lt;/li&gt;&lt;li&gt;Map Search: letter &amp;quot;M&amp;quot; (UDUD), URL(&lt;font size=&quot;2&quot;&gt;&lt;i&gt;&amp;quot;http://maps.google.co.jp/maps?f=q&amp;amp;source=s_q&amp;amp;hl=ja&amp;amp;geocode=&amp;amp;q=&amp;quot; + str + &amp;quot;&amp;amp;ie=UTF8&amp;quot;&lt;/i&gt;&lt;/font&gt;)&lt;/li&gt;&lt;li&gt;Video Search: letter &amp;quot;Y&amp;quot;(DRUDLUR), URL&lt;i&gt;(&lt;font size=&quot;2&quot;&gt;&amp;quot;http://www.youtube.com/results?search_query=&amp;quot; + str&lt;/font&gt;&lt;/i&gt;)&lt;/li&gt;&lt;li&gt;Dictionary: letter &amp;quot;D&amp;quot;(DRUL), URL(&lt;font size=&quot;2&quot;&gt;&lt;i&gt;&amp;quot;http://www.weblio.jp/content/&amp;quot; + str&lt;/i&gt;&lt;/font&gt;)&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;font size=&quot;3&quot; face=&quot;arial,helvetica,sans-serif&quot; class=&quot;Apple-style-span&quot;&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size=&quot;3&quot; face=&quot;arial,helvetica,sans-serif&quot; class=&quot;Apple-style-span&quot;&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size=&quot;3&quot; face=&quot;arial,helvetica,sans-serif&quot; class=&quot;Apple-style-span&quot;&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size=&quot;2&quot; face=&quot;verdana, arial, helvetica, sans-serif&quot; class=&quot;Apple-style-span&quot;&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size=&quot;2&quot; face=&quot;verdana, arial, helvetica, sans-serif&quot; class=&quot;Apple-style-span&quot;&gt;&lt;/font&gt;&lt;/p&gt;&lt;pre&gt;&lt;font size=&quot;2&quot; face=&quot;&#039;times new roman&#039;, times, serif&quot; class=&quot;Apple-style-span&quot;&gt;&lt;i&gt;&lt;/i&gt;&lt;/font&gt;&lt;/pre&gt;&lt;pre&gt;&lt;font size=&quot;2&quot; face=&quot;&#039;times new roman&#039;, times, serif&quot; class=&quot;Apple-style-span&quot;&gt;&lt;i&gt;&lt;/i&gt;&lt;/font&gt;&lt;/pre&gt;&lt;p /&gt;&lt;p /&gt;&lt;p /&gt;&lt;p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/p&gt; 
    </content:encoded>

    <pubDate>Wed, 09 Mar 2011 05:39:46 +0900</pubDate>
    <guid isPermaLink="false">http://www.nikep.net/srdpty/index.php?/archives/78-guid.html</guid>
    
</item>
<item>
    <title>YouTubeダウンローダーの更新</title>
    <link>http://www.nikep.net/srdpty/index.php?/archives/77-YouTube.html</link>
            <category>開発</category>
    
    <comments>http://www.nikep.net/srdpty/index.php?/archives/77-YouTube.html#comments</comments>
    <wfw:comment>http://www.nikep.net/srdpty/wfwcomment.php?cid=77</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.nikep.net/srdpty/rss.php?version=2.0&amp;type=comments&amp;cid=77</wfw:commentRss>
    

    <author>nospam@example.com (金子 恵季)</author>
    <content:encoded>
    &lt;br /&gt;
&lt;h1 align=&quot;justify&quot;&gt;YouTubeの最新仕様に対応&lt;/h1&gt;&lt;p&gt;昨日、&lt;a href=&quot;http://www.nikep.net/ytdownloader.var&quot; title=&quot;ytdownloader&quot;&gt;YouTubeダウンローダー&amp;amp;変換サービス&lt;/a&gt;でYouTubeのファイルを変換して見ようとして、うまく行かないのがあるのに気付きました。普段あまり見ない映画系のビデオでした。分野に依るのかもしれませんが、ビデオのURLがうまく取れてないらしいのです。&lt;/p&gt;&lt;p&gt;ファイルを調べてみたところ、確かに今迄に実装したビデオURL形式が一つもなく、以下の3種類の組み合わせだけになっているものでした。&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&amp;lt;embed type=\&amp;quot;application/x-shockwave-flash\&amp;quot; で始まるもの&lt;/li&gt;&lt;li&gt;var swfConfig =  で始まるもの&lt;/li&gt;&lt;li&gt;PLAYER_CONFIG で始まるもの&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;これらの内容自体は皆同じビデオURLを指定しているようです。そこで、この3つに対応するため、&lt;a href=&quot;http://www.nikep.net/srdpty/index.php?/archives/51-YouTube.html&quot;&gt;これ&lt;/a&gt;以来久し振りにコードを変更し、とりあえず動くようにはできました。ただ、あいかわらず、複数の形式が1つのページに入っているのですが、規則性も、どれを優先すれば良いのかも分かりません。&lt;/p&gt;&lt;p&gt;これで、都合7種類(&amp;quot;fullscreenurl&amp;quot;は既に使われていないかも)の指定形式があることになります。登場してすぐになくなった呪文パラメタを要するものを加えると9種類です。&lt;/p&gt;&lt;p align=&quot;justify&quot;&gt;YouTubeに関して残っているものとしては、ログインしないと見られないアダルト系のビデオがあります。やるとすると、ダミーユーザを作ってログインをシミュレートした後にCookieを送れば良いのだと思います。しかしながら、あまり需要がなさそうです。YouTubeは基本的に健全なサイトですから。&lt;/p&gt;&lt;p /&gt;&lt;p /&gt;&lt;br /&gt;
&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Sat, 05 Mar 2011 03:37:44 +0900</pubDate>
    <guid isPermaLink="false">http://www.nikep.net/srdpty/index.php?/archives/77-guid.html</guid>
    
</item>
<item>
    <title>Slashdot用GreaseMonkeyスクリプト</title>
    <link>http://www.nikep.net/srdpty/index.php?/archives/75-SlashdotGreaseMonkey.html</link>
            <category>開発</category>
    
    <comments>http://www.nikep.net/srdpty/index.php?/archives/75-SlashdotGreaseMonkey.html#comments</comments>
    <wfw:comment>http://www.nikep.net/srdpty/wfwcomment.php?cid=75</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.nikep.net/srdpty/rss.php?version=2.0&amp;type=comments&amp;cid=75</wfw:commentRss>
    

    <author>nospam@example.com (金子 恵季)</author>
    <content:encoded>
    &lt;br /&gt;
&lt;h1&gt;スラドの公告ページを回避するスクリプト&lt;/h1&gt;&lt;p align=&quot;justify&quot;&gt;スラッシュドットに貼られた外部リンクをクリックすると、公告付きベージが表示され、そこから改めてクリックして外に出るようになっています。運営のために仕方ないのかもしれませんが、何ともウザイ仕様です。これを回避するGreaseMonkey user scriptです。&lt;/p&gt;&lt;p align=&quot;justify&quot;&gt;&lt;a href=&quot;/slashdots/slashdots.user.js&quot; title=&quot;slashdots.user.js&quot;&gt;これ→(slashdots.user.js)&lt;/a&gt;です。&lt;/p&gt;&lt;h2&gt;使い方&lt;/h2&gt;&lt;p align=&quot;justify&quot;&gt;何もありません。インストールすれば即、効きます。&lt;/p&gt;&lt;h2&gt;アンインストール&lt;/h2&gt;&lt;p align=&quot;justify&quot;&gt;GreaseMonkeyの管理画面から「アンインストール」します。&lt;/p&gt;&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Mon, 14 Feb 2011 02:35:44 +0900</pubDate>
    <guid isPermaLink="false">http://www.nikep.net/srdpty/index.php?/archives/75-guid.html</guid>
    
</item>
<item>
    <title>Tフォントのインストール</title>
    <link>http://www.nikep.net/srdpty/index.php?/archives/76-T.html</link>
            <category>インストール</category>
    
    <comments>http://www.nikep.net/srdpty/index.php?/archives/76-T.html#comments</comments>
    <wfw:comment>http://www.nikep.net/srdpty/wfwcomment.php?cid=76</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.nikep.net/srdpty/rss.php?version=2.0&amp;type=comments&amp;cid=76</wfw:commentRss>
    

    <author>nospam@example.com (金子 恵季)</author>
    <content:encoded>
    &lt;h1&gt;GTフォントのLinuxでの利用方法&lt;br /&gt;
&lt;/h1&gt;&lt;p&gt;&lt;a href=&quot;http://slashdot.jp/it/11/02/10/0926206.shtml&quot;&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://slashdot.jp/it/11/02/10/0926206.shtml&quot;&gt;スラドの記事&lt;/a&gt;によれば、Tフォントがリリースされたようなので、インストールしてみました。&lt;/p&gt;&lt;p&gt;昔、GTフォントとして公開されていたもののようです。以前は不具合が多くて使っていませんでしたが、フィックスされているとのことです。字体は、明朝、ゴシック、楷書の3書体。良く分らないグリフのファイルが沢山入っていたり、等幅フォントのときにアルファベットも全角になるなど、独自の主張があるようです。&lt;/p&gt;&lt;p&gt;ブラウザで使っている限りでは、中々きれいですが、ゴシックには少し癖があるでしょうか。個人的な意見としては、IPAより少し落ちますが、通常使うフォントとしては申し分ありませんし、マイクロソフトのウィンドウズに付属するフォントよりも遥かにきれいです。これだけのフォントが無償で公開されるということは本当にありがたいことです。&lt;/p&gt;&lt;p&gt;freetype用のfonts.scaleと、xtt用のfonts.dirを置きます。(&lt;a href=&quot;http://www.nikep.net/srdpty/uploads/ttfont_dir.zip&quot; title=&quot;ttfont_dir.zip&quot; target=&quot;_blank&quot;&gt;ttfont_dir.zip&lt;/a&gt;)&lt;br /&gt;xtt用は、太字、イタリック、反イタリックの生成も行っています。&lt;/p&gt;&lt;p&gt;唯一、不具合というか、原因は良く分らないのですが、ブラウザ(Firefox)で下線がやたら太くなることがあります。フォントのせいではないかもしれません。&lt;/p&gt;&lt;p&gt;&lt;br /&gt;
&lt;/p&gt; 
    </content:encoded>

    <pubDate>Sun, 13 Feb 2011 02:50:00 +0900</pubDate>
    <guid isPermaLink="false">http://www.nikep.net/srdpty/index.php?/archives/76-guid.html</guid>
    
</item>
<item>
    <title>アノテートなしのSKK辞書</title>
    <link>http://www.nikep.net/srdpty/index.php?/archives/74-SKK.html</link>
            <category>インストール</category>
    
    <comments>http://www.nikep.net/srdpty/index.php?/archives/74-SKK.html#comments</comments>
    <wfw:comment>http://www.nikep.net/srdpty/wfwcomment.php?cid=74</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.nikep.net/srdpty/rss.php?version=2.0&amp;type=comments&amp;cid=74</wfw:commentRss>
    

    <author>nospam@example.com (金子 恵季)</author>
    <content:encoded>
    &lt;br /&gt;
&lt;h1&gt;unannotationなSKK-JISYO.L&lt;/h1&gt;&lt;p&gt;久し振りに&lt;a href=&quot;http://openlab.ring.gr.jp/skk/index-j.html&quot;&gt;skk openlabo&lt;/a&gt;を見てみましたら、辞書が沢山更新されていましたので、入れ替えてみました。&lt;/p&gt;&lt;p&gt;しかし、既に使う人が居ないのか、unannotatedな辞書(註釈が入っていない)は配布されていません。また、註釈を抜くツールunannotate.awkも配布が打ち切られているようですし、捜し出してきたものを現在の辞書に適用してもうまく行きませんでした。&lt;/p&gt;&lt;p&gt;そこで、超簡単なスクリプト(&lt;a href=&quot;http://www.nikep.net/srdpty/uploads/skk-unannotate.pl.zip&quot; title=&quot;skk-unannotate.pl.zip&quot; target=&quot;_blank&quot;&gt;skk-unannotate.pl.zip&lt;/a&gt;)を作成して、カレントの辞書の註釈抜きバージョン(&lt;a href=&quot;http://www.nikep.net/srdpty/uploads/unannotate.zip&quot; title=&quot;unannotate.zip&quot; target=&quot;_blank&quot;&gt;unannotate.zip&lt;/a&gt;)を作成しました。註釈のフォーマット仕様を調べず、眺めただけで書いていますので、もしかすると不具合があるかもしれません。&lt;/p&gt;&lt;p&gt;それにしても、現在のリリース物には、ゴミエントリ(行頭が&amp;quot;&amp;gt;&amp;quot;のものなど)があるようなのですが、未チェックなのでしょうかねぇ。&lt;/p&gt;&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Fri, 07 Jan 2011 02:59:25 +0900</pubDate>
    <guid isPermaLink="false">http://www.nikep.net/srdpty/index.php?/archives/74-guid.html</guid>
    
</item>
<item>
    <title>Ricoh IPSIO SP4000をLinuxで使う</title>
    <link>http://www.nikep.net/srdpty/index.php?/archives/72-Ricoh-IPSIO-SP4000Linux.html</link>
            <category>インストール</category>
    
    <comments>http://www.nikep.net/srdpty/index.php?/archives/72-Ricoh-IPSIO-SP4000Linux.html#comments</comments>
    <wfw:comment>http://www.nikep.net/srdpty/wfwcomment.php?cid=72</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.nikep.net/srdpty/rss.php?version=2.0&amp;type=comments&amp;cid=72</wfw:commentRss>
    

    <author>nospam@example.com (金子 恵季)</author>
    <content:encoded>
    &lt;br /&gt;
&lt;h1&gt;RPDL4プリンタをLinuxで使う&lt;/h1&gt;&lt;h2&gt; Ricoh IPSiO SP4000 &lt;/h2&gt;&lt;p&gt;&lt;!-- s9ymdb:66 --&gt;&lt;img width=&quot;110&quot; height=&quot;95&quot; class=&quot;serendipity_image_right&quot; style=&quot;border: 0px none ; float: right; padding-left: 5px; padding-right: 5px;&quot; src=&quot;http://www.nikep.net/srdpty/uploads/RicohipsioSP4000.serendipityThumb.jpg&quot; /&gt;業務用レーザープリンターで、 少し前から安売りされていています。HP複合機の調子悪くなってきたため物色していたのですが、Linuxでも使えるらしいことが分り、購入しました。少し前から動かしていたのですが、今回年賀状印刷で設定を見直しました。RPCS, RPDL 4をサポートしていますが、Postscriptは未サポートです。Linuxで動かすことに関しては、リコーのドライバ配布もあるために楽観視していたのですが、色々と問題がありました。&lt;/p&gt;&lt;p&gt;私のマシンにインストールされているGhostscript 7.07 では、RPCSも RPDLの未サポートです。古いシステム(FedoraCore1)のため新しいGhostscriptも動きませんので、リコーからドライバを取ってきます。しかしながら、これは、Debian向けということで、Ghostscript-ESP(gs-esp)というもので、通常?のGhostscriptとは互換性がありません。そのため/その上、同梱されているバイナリは動作しませんでした。&lt;/p&gt;&lt;p&gt;そこで、幾つか道が考えられます。&lt;/p&gt;&lt;ol&gt;&lt;li&gt;GhostscriptにRPDL 4のドライバを追加する。&lt;/li&gt;&lt;li&gt;gs-espを追加する。&lt;/li&gt;&lt;/ol&gt;&lt;p align=&quot;justify&quot;&gt;まず、素性の良い(1)をやってみました。色々と拾ってきてコンパイルします。RPSL4対応ができたように見えるのですが、少なくともこのプリンターでは印字できません。なにやらエラーが表示されるだけです。&lt;/p&gt;&lt;p&gt;それで気を取り直して(2)でやってみます。リコーの配布物はgs-esp_7.07.1-rpdl4.tar.gzで、ソースパッチとバイナリ(不動)、PPDファイルが入っています。そこで、gs-eps-7.07を取ってきて、リコーのパッチを当ててビルドすることに。&lt;br /&gt;コンパイルすると日本語関係のパッチが足りなくて？色々エラーが出ます。この辺りは強引に直して、とりあえず進めます。最後の libpng 関連のエラーは、古いlibpng.so.3をリンクさせれば出なくなります。(ln -s libpng.so.3 libpng.so)&lt;br /&gt;後は、CUPS の設定(PPDファイルをコピーしてcupsconfigを起動します)すれば動くようになりました。PPDはリコーのものでＯＫです。とりあえずprintcap にも rp=ipsio で追加します。&lt;/p&gt;&lt;p&gt;さて、こうして作成したgs-espは、SP4000の印刷はできるものの、Ghostscriptとしては駄目駄目になってしまいました。article9.psなどを表示できません。仕方ないので、/usr/bin/gsは元々のGhostscriptに戻します。新しいgs-espは違う名前(gs-esp-rpdl)でインストールしました。この場合、PPDファイルのパスを合わせて変更しておきます。&lt;/p&gt;&lt;h2&gt;結論&lt;/h2&gt;&lt;p align=&quot;justify&quot;&gt;レーザープリンタを買うなら、Postscript対応のものに限ります。(因みにIPSIOも4010以降は PS サポート)。昔、CanonやXeroxのLIPSやらESC/P対応プリンタで苦労したことを思い出しました。これはLinuxだけの話ではなく、Windowsでも、OSが新しくなったときにドライバーが提供されなければ同様の苦労が待っています。それにしても、Postscriptのライセンス料金はそんなに高いのかなぁ。&lt;/p&gt;&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Wed, 29 Dec 2010 16:50:36 +0900</pubDate>
    <guid isPermaLink="false">http://www.nikep.net/srdpty/index.php?/archives/72-guid.html</guid>
    
</item>

</channel>
</rss>