<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by hirohisa on Medium]]></title>
        <description><![CDATA[Stories by hirohisa on Medium]]></description>
        <link>https://medium.com/@_hirohisa?source=rss-100915ffacf8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*tKyOMCKq06R9sU5A.jpeg</url>
            <title>Stories by hirohisa on Medium</title>
            <link>https://medium.com/@_hirohisa?source=rss-100915ffacf8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 08:42:25 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@_hirohisa/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Upgrade AFNetworking from 1.x to 2.x]]></title>
            <link>https://medium.com/@_hirohisa/upgrade-afnetworking-from-1-x-to-2-x-cdd350c654a9?source=rss-100915ffacf8------2</link>
            <guid isPermaLink="false">https://medium.com/p/cdd350c654a9</guid>
            <dc:creator><![CDATA[hirohisa]]></dc:creator>
            <pubDate>Sat, 27 Dec 2014 11:13:53 GMT</pubDate>
            <atom:updated>2014-12-27T11:13:53.366Z</atom:updated>
            <content:encoded><![CDATA[<p>オープンソースのiOS用HTTPネットワークライブラリ AFNetworking</p><p>iOS6.0+以上での使用であれば、2.xを使ったほうがよいので、1.xをつかている場合の移行方法を載せておきます</p><p><a href="https://gist.github.com/hirohisa/88acf9ed3ef59fc8c62e">https://gist.github.com/hirohisa/88acf9ed3ef59fc8c62e</a></p><p><strong># New Properties</strong><br>- @property (nonatomic, strong) AFHTTPRequestSerializer &lt;AFURLRequestSerialization&gt; * requestSerializer;<br>// -&gt; [AFHTTPRequestSerializer serializer];<br>- @property (nonatomic, strong) AFHTTPResponseSerializer &lt;AFURLResponseSerialization&gt; * responseSerializer;<br>// -&gt; [AFJSONResponseSerializer serializer];</p><p><strong># GET</strong></p><p>`getPath`を`GET`にするだけでOK</p><p><em>AFHTTPClient</em><br>[self getPath:path parameters:parameters success:^(AFHTTPRequestOperation *operation, id responseObject) { …<br>} failure:^(AFHTTPRequestOperation *operation, NSError *error) { …<br>}];</p><p><em>AFHTTPRequestOperationManager</em><br>[self GET:path parameters:parameters success:^(AFHTTPRequestOperation *operation, id responseObject) { …<br>} failure:^(AFHTTPRequestOperation *operation, NSError *error) { …<br>}];</p><p><strong># POST</strong></p><p>`postPath`を`POST`に変えて、`constructingBodyWithBlock:`を使うメソッドに切り替える</p><p><em>AFHTTPClient</em><br>[self postPath:path parameters:parameters success:^(AFHTTPRequestOperation *operation, id responseObject) { …<br>} failure:^(AFHTTPRequestOperation *operation, NSError *error) { …<br>}];</p><p><em>AFHTTPRequestOperationManager</em><br>fileをあげる際には、constructingBodyWithBlockを使う、基本 nilでOK<br>// multipart post<br>[self POST:path parameters:parameters constructingBodyWithBlock:nil success:^(AFHTTPRequestOperation *operation, id responseObject) { …<br>} failure:^(AFHTTPRequestOperation *operation, NSError *error) { …<br>}];</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cdd350c654a9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MeCab for Ruby]]></title>
            <link>https://medium.com/@_hirohisa/mecab-for-ruby-d67f53573c0?source=rss-100915ffacf8------2</link>
            <guid isPermaLink="false">https://medium.com/p/d67f53573c0</guid>
            <dc:creator><![CDATA[hirohisa]]></dc:creator>
            <pubDate>Sat, 05 Apr 2014 18:25:34 GMT</pubDate>
            <atom:updated>2014-09-18T10:59:57.713Z</atom:updated>
            <content:encoded><![CDATA[<h4>Installation instructions for MeCab</h4><p>MeCabよくいじるため、似たところでいつもぶつかって時間をつぶすので、ログ.</p><h4><strong>順番</strong></h4><ul><li>MeCab本体 と 辞書をDLしてくる</li><li>install</li><li>MeCabを使うためのモジュールをDL</li><li>install</li></ul><p>( gem installが失敗したのでmakeでインストール)</p><h4>スペック</h4><ul><li>OS Marvericks 10.9.2 (Mac)</li><li>言語 ruby 2.0.0p247 (2013-06-27 revision 41674) [universal.x86_64-darwin13]</li></ul><blockquote><em>追記</em></blockquote><ul><li>MeCab本体 と 辞書をDLしてくる</li><li>install</li></ul><p>以上の２点は、以前試した方法がうまくいかないので、 brew install mecabで楽々入ることを知ったので、そちらにしました。</p><p>$brew install mecab</p><p>$brew install mecab-ipadic</p><blockquote>MeCab本体 と 辞書をDLしてくる</blockquote><p><a href="https://code.google.com/p/mecab/downloads/list">https://code.google.com/p/mecab/downloads/list</a> 最新のをDL</p><p>今回は、mecab-0.996.tar.gz、mecab-ipadic-2.7.0-20070801.tar.gz</p><blockquote>install mecab-0.996</blockquote><p>tar zxvf mecab-0.996.tar.gz</p><p>./configure</p><p>make</p><p>make install</p><p>MeCab installして mecabが使えるようになる</p><p>$mecabしても辞書がないと怒られる</p><p>param.cpp(69) [ifs] no such file or directory: /usr/local/lib/mecab/dic/ipadic/dicrc</p><blockquote>install mecab-ipadic-2.7.0-20070801</blockquote><p>./configure —with-charset=utf8</p><p>$make</p><p>$(sudo) make install</p><p>mecabが使えればOK</p><blockquote>MeCabを使うためのモジュールをDL</blockquote><p>今回は、mecab-ruby-0.996.tar.gz</p><blockquote>ruby extconf.rb</blockquote><p><strong>extconf.rb修正, LDFLAGSを追加</strong></p><p>$CFLAGS += ‘ ‘ + `#{mecab_config} —cflags`.chomp<br>$LDFLAGS = ‘-L/usr/local/lib’ # 追加<br>have_header(‘mecab.h’) &amp;&amp; create_makefile(‘MeCab’)</p><p><strong>MeCab本体からファイルをcopy</strong></p><p>‘mecab.h’ file not foundと出るので、mecab-0.996.tar.gzからコピーしてくる</p><p>src/mecab.h</p><p>$ruby extconf.rb</p><blockquote>make</blockquote><p><strong>Makefileの修正</strong></p><p>Makefile を検索して “-multiply_definedsuppress”の行を消す</p><p><em>87: dldflags = -undefineddynamic_lookup -multiply_definedsuppress</em></p><p>$make</p><p>$(sudo) make install</p><blockquote>確認</blockquote><p>$irb</p><p>&gt; require ‘MeCab’</p><p>trueが返ってくればOK</p><h4>参考サイト</h4><p><a href="http://kzy52.com/entry/2014/01/05/173628">http://kzy52.com/entry/2014/01/05/173628</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d67f53573c0" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>