<?xml version="1.0" encoding="UTF-8" ?>
<feed xml:lang="ja" xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:thr="http://purl.org/syndication/thread/1.0">
  <title type="text">黒幕編集部</title>
  <subtitle type="html">妄想・想像・創造</subtitle>
  <link rel="self" type="application/atom+xml" href="http://devkuromaku.blog.shinobi.jp/atom"/>
  <link rel="alternate" type="text/html" href="http://devkuromaku.blog.shinobi.jp/"/>
  <updated>2007-04-21T12:47:44+09:00</updated>
  <author><name>編集長 黒幕</name></author>
  <generator uri="//www.ninja.co.jp/blog/" version="0.9">忍者ブログ</generator>
  <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" />
  <entry>
    <id>devkuromaku.blog.shinobi.jp://entry/45</id>
    <link rel="alternate" type="text/html" href="http://devkuromaku.blog.shinobi.jp/%E5%82%99%E5%BF%98%E9%8C%B2/clickonce%E3%81%AE%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E5%85%88%EF%BC%88win7-" />
    <published>2011-06-26T00:54:10+09:00</published> 
    <updated>2011-06-26T00:54:10+09:00</updated> 
    <category term="備忘録" label="備忘録" />
    <title>ClickOnceのインストール先（win7)</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![CDATA[ここにあるみたい。<br />
<pre>c:\Users\＜ユーザー名＞\AppData\Local\Apps\2.0\</pre>]]> 
    </content>
    <author>
            <name>編集長 黒幕</name>
        </author>
  </entry>
  <entry>
    <id>devkuromaku.blog.shinobi.jp://entry/40</id>
    <link rel="alternate" type="text/html" href="http://devkuromaku.blog.shinobi.jp/%E3%83%87%E3%83%BC%E3%82%BF%E3%83%99%E3%83%BC%E3%82%B9/%E3%80%90sqlite%E3%80%91%E6%97%A5%E4%BB%98%E5%9E%8B%E3%81%AE%E6%B3%A8%E6%84%8F%E7%82%B9" />
    <published>2011-06-25T14:22:47+09:00</published> 
    <updated>2011-06-25T14:22:47+09:00</updated> 
    <category term="データベース" label="データベース" />
    <title>【SQLite】日付型の注意点</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![CDATA[「ハイフン」で区切り必要がある。<br />
時刻は「0:00:00」ではなく、「00:00:00」とする必要がある。<br />
※「2011/04/06 0:00:00」でも追加処理はできてしまう。<br />
<pre>2011-04-06 00:00:00<br />
</pre>こうしておかないと、「追加できるけど参照できない」と<br />
いう何とも辛い状態になってしまう。<br />
<br />
また、内部的に文字列として扱うらしく、<br />
<pre>2011-04-06 00:00:00<br />
2011-4-06 00:00:00<br />
2011-04-6 00:00:00<br />
</pre>こんな感じでフォーマットがバラバラだと<br />
並べ替えしたときに意図した順番にならばなくなる。]]> 
    </content>
    <author>
            <name>編集長 黒幕</name>
        </author>
  </entry>
  <entry>
    <id>devkuromaku.blog.shinobi.jp://entry/44</id>
    <link rel="alternate" type="text/html" href="http://devkuromaku.blog.shinobi.jp/%E5%82%99%E5%BF%98%E9%8C%B2/excel2010%20%E3%83%95%E3%82%A9%E3%83%BC%E3%83%A0%E3%82%B3%E3%83%B3%E3%83%88%E3%83%AD%E3%83%BC%E3%83%AB%20%E3%83%81%E3%82%A7%E3%83%83%E3%82%AF%E3%83%9C%E3%83%83%E3%82%AF%E3%82%B9%E3%81%AE%E5%88%A4%E5%AE%9A" />
    <published>2011-03-16T00:00:26+09:00</published> 
    <updated>2011-03-16T00:00:26+09:00</updated> 
    <category term="備忘録" label="備忘録" />
    <title>Excel2010 フォームコントロール チェックボックスの判定</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![CDATA[いっつも忘れる。<br />
<pre>If (ActiveSheet.CheckBoxes("columnType").Value = xlOn) Then</pre>ちなみに、チェックボックスの名前は左上の「セルの名前」ボックスで<br />
変更可能。<br />
チェックボックスコントロールを選択すると今の名前が表示されるので<br />
入力してやれば変更できる。<br />
]]> 
    </content>
    <author>
            <name>編集長 黒幕</name>
        </author>
  </entry>
  <entry>
    <id>devkuromaku.blog.shinobi.jp://entry/43</id>
    <link rel="alternate" type="text/html" href="http://devkuromaku.blog.shinobi.jp/%E5%82%99%E5%BF%98%E9%8C%B2/.svn%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%82%92%E4%B8%80%E6%8B%AC%E5%89%8A%E9%99%A4" />
    <published>2011-02-09T21:21:49+09:00</published> 
    <updated>2011-02-09T21:21:49+09:00</updated> 
    <category term="備忘録" label="備忘録" />
    <title>.svnファイルを一括削除</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![CDATA[コマンドプロンプトやターミナルで対象のフォルダに移動。<br />
<pre>for /R %i in (.svn) do rd /Q /S "%i"</pre>]]> 
    </content>
    <author>
            <name>編集長 黒幕</name>
        </author>
  </entry>
  <entry>
    <id>devkuromaku.blog.shinobi.jp://entry/42</id>
    <link rel="alternate" type="text/html" href="http://devkuromaku.blog.shinobi.jp/linux%E3%82%B5%E3%83%BC%E3%83%90/usb%E3%83%95%E3%83%A9%E3%83%83%E3%82%B7%E3%83%A5%E3%81%8B%E3%82%89%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%99%E3%82%8B%E3%81%A8%E3%81%8D%E3%81%AE%E6%B3%A8%E6%84%8F%E7%82%B9" />
    <published>2011-02-02T21:25:29+09:00</published> 
    <updated>2011-02-02T21:25:29+09:00</updated> 
    <category term="Linuxサーバ" label="Linuxサーバ" />
    <title>USBフラッシュからインストールするときの注意点</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![CDATA[USBフラッシュ起動でCentOSをインストール。<br />
CDからインストールするみたく進めていくと、とんでもない目にあってしまったよ。<br />
ブートローダがUSBフラッシュにインストールされてしまう。<br />
<pre>高度なブートローダオプションの設定</pre>のチェックをつけて<br />
<pre>ドライバ順の変更</pre>でブートローダのインストール先を変更してやる必要がある。]]> 
    </content>
    <author>
            <name>編集長 黒幕</name>
        </author>
  </entry>
  <entry>
    <id>devkuromaku.blog.shinobi.jp://entry/41</id>
    <link rel="alternate" type="text/html" href="http://devkuromaku.blog.shinobi.jp/sqlite/%E3%80%90sqlite%E3%80%91%20%E7%8F%BE%E5%9C%A8%E6%97%A5%E4%BB%98%E6%99%82%E5%88%BB%E5%8F%96%E5%BE%97%E6%96%B9%E6%B3%95" />
    <published>2011-01-27T11:40:52+09:00</published> 
    <updated>2011-01-27T11:40:52+09:00</updated> 
    <category term="SQLite" label="SQLite" />
    <title>【SQLite】 現在日付時刻取得方法</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![CDATA[現在日付時刻取得方法。<br />
<pre>select datetime('now');</pre>けど、これだとなぜだか-9時間された値が返ってきてしまう。<br />
なんてことだ・・・<br />
仕方ないので、こうする。<br />
<pre>select datetime('now', '+09:00:00');</pre><br />
]]> 
    </content>
    <author>
            <name>編集長 黒幕</name>
        </author>
  </entry>
  <entry>
    <id>devkuromaku.blog.shinobi.jp://entry/39</id>
    <link rel="alternate" type="text/html" href="http://devkuromaku.blog.shinobi.jp/vs2008%EF%BC%88c-%EF%BC%89/propertyinfo.setvalue%E3%81%AB%E3%81%A4%E3%81%84%E3%81%A6" />
    <published>2010-10-13T01:13:58+09:00</published> 
    <updated>2010-10-13T01:13:58+09:00</updated> 
    <category term="VS2008（C#）" label="VS2008（C#）" />
    <title>propertyInfo.SetValueについて</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![CDATA[同じプロパティ名を持つ、異なるClassがある場合、<br />
自動転記とかしたいよね。今後、プロパティが増えたときも便利だし。<br />
そういうときに、propertyInfo.SetValueを使うんだけど、<br />
プロパティの型が違うと落ちてしまう。<br />
なので、強引に回避。<pre>TestClass obj = new TestClass();<br />
string value = "ほげ";<br />
PropertyInfo p = obj.GetType().GetProperty("HogeProperty");<br />
pSetValue(obj, <br />
          Convert.ChangeType(value, p.PropertyType),<br />
          null);<br />
</pre><br />
ただし、valueがnullの場合、Convert.ChangeTypeが落ちてしまうので<br />
nullの場合は、そのまま突っ込むようにしよう。<br />
<br />
余談だけど、p.PropertyTypeがNullableの可能性もある。<br />
その場合、下記のように値型を取得する。<br />
<pre>if (p.PropertyType.IsGenericType)<br />
{<br />
    if (p.PropertyType.GetGenericTypeDefinition() == typeof(Nullable<>))<br />
    {<br />
        // Nullableの場合、元の型を取得<br />
        // Nullable&lt;int&gt; → int<br />
        return Nullable.GetUnderlyingType(p.PropertyType);<br />
    }<br />
}]]> 
    </content>
    <author>
            <name>編集長 黒幕</name>
        </author>
  </entry>
  <entry>
    <id>devkuromaku.blog.shinobi.jp://entry/38</id>
    <link rel="alternate" type="text/html" href="http://devkuromaku.blog.shinobi.jp/vs2008%EF%BC%88c-%EF%BC%89/clickonce%20app.config%EF%BD%94%E3%81%A3%E3%81%A6%E3%81%A9%E3%81%93%E3%82%88" />
    <published>2010-09-12T20:46:14+09:00</published> 
    <updated>2010-09-12T20:46:14+09:00</updated> 
    <category term="VS2008（C#）" label="VS2008（C#）" />
    <title>ClickOnce App.configｔってどこよ</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![CDATA[ClickOnceを使ってみた。<br />
確かに、便利だけど、ローカル側のどこにインストールされたのか<br />
全く分からない。App.configとか、どこにあるか分からないと<br />
超困る。<br />
<br />
<pre>Documents and Settings\Local Settings\Apps\2.0<br />
</pre><br />
なんか、この辺りに落ちるみたい。]]> 
    </content>
    <author>
            <name>編集長 黒幕</name>
        </author>
  </entry>
  <entry>
    <id>devkuromaku.blog.shinobi.jp://entry/37</id>
    <link rel="alternate" type="text/html" href="http://devkuromaku.blog.shinobi.jp/vs2008%EF%BC%88c-%EF%BC%89/app.config%E3%82%92%E6%8C%87%E5%AE%9A%E3%81%AE%E3%83%91%E3%82%B9%E3%81%AB%E9%85%8D%E7%BD%AE%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95" />
    <published>2010-05-01T18:07:30+09:00</published> 
    <updated>2010-05-01T18:07:30+09:00</updated> 
    <category term="VS2008（C#）" label="VS2008（C#）" />
    <title>App.configを指定のパスに配置する方法</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![CDATA[備忘録<br />
これで、settingData に設定ファイルの中身が入る。<br />
<br />
<pre>ExeConfigurationFileMap ecfm = new ExeConfigurationFileMap();<br />
ecfm.ExeConfigFilename = （ファイルパス）;<br />
           <br />
KeyValueConfigurationCollection settingData =<br />
 　　ConfigurationManager.OpenMappedExeConfiguration(ecfm, 　<br />
 　　ConfigurationUserLevel.None).AppSettings.Settings;<br />
</pre><br />
<br />
]]> 
    </content>
    <author>
            <name>編集長 黒幕</name>
        </author>
  </entry>
  <entry>
    <id>devkuromaku.blog.shinobi.jp://entry/36</id>
    <link rel="alternate" type="text/html" href="http://devkuromaku.blog.shinobi.jp/vs2008%EF%BC%88c-%EF%BC%89/%E3%83%95%E3%82%A9%E3%83%BC%E3%83%A0%E3%81%AE%C3%97%E3%83%9C%E3%82%BF%E3%83%B3%E3%82%92%E9%9D%9E%E8%A1%A8%E7%A4%BA%E3%81%AB%E3%81%99%E3%82%8B%EF%BC%88alt-f4%E5%90%AB%E3%82%80-" />
    <published>2009-08-30T15:51:16+09:00</published> 
    <updated>2009-08-30T15:51:16+09:00</updated> 
    <category term="VS2008（C#）" label="VS2008（C#）" />
    <title>フォームの×ボタンを非表示にする（ALT+F4含む)</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![CDATA[タイトルの通り<br />
<pre>protected override CreateParams CreateParams<br />
{<br />
  get<br />
  {<br />
    const int CS_NOCLOSE = 0x200;<br />
    CreateParams cp = base.CreateParams;<br />
    cp.ClassStyle = cp.ClassStyle | CS_NOCLOSE;<br />
    return cp;<br />
  }<br />
}<br />
</pre><br />
<br />
こんな風にオーバーライドすればできる]]> 
    </content>
    <author>
            <name>編集長 黒幕</name>
        </author>
  </entry>
</feed>