ラベル [2010]卒業研究 の投稿を表示しています。 すべての投稿を表示
ラベル [2010]卒業研究 の投稿を表示しています。 すべての投稿を表示

2010年12月16日木曜日

[卒業研究] Visual BasicからのXMLファイル入出力

以下サンプルコード(一部抜粋)

書き込み
Dim i As Integer
i = 1
Dim xml = XDocument.Load(savedXmlFileName)
For Each op In outputPictList
    Dim str1 = xml.Descendants("Objects").FirstOrDefault()
    str1.Add(New XElement("Pict"))
    Dim str2 = xml.Descendants("Pict").LastOrDefault
    str2.Add(New XElement("pictNum", pictList(i, 0)))
    str2.Add(New XElement("indexNum", pictList(i, 1)))
    str2.Add(New XElement("viewFileName", pictList(i, 2)))
    str2.Add(New XElement("fileFullPath", pictList(i, 3)))
    str2.Add(New XElement("rotateDegree", pictList(i, 4)))
    str2.Add(New XElement("statusOfMarker", pictList(i, 5)))
    str2.Add(New XElement("pictTitle", pictList(i, 6)))

    xml.Save(savedXmlFileName)
    i = i + 1
Next

読み込み
Dim doc1 = XDocument.Load(savedXmlFileName)
Dim query1 = From c In doc1.Descendants("Pict")
                Where c.Element("fileFullPath") IsNot Nothing

Dim i As Integer
i = 1
For Each c In query1
    pictList(pictNum, 0) = pictNum
    pictList(pictNum, 1) = c.Element("indexNum").Value
    pictList(pictNum, 2) = c.Element("viewFileName").Value
    pictList(pictNum, 3) = c.Element("fileFullPath").Value
    pictList(pictNum, 4) = c.Element("rotateDegree").Value
    pictList(pictNum, 5) = c.Element("statusOfMarker").Value
    pictList(pictNum, 6) = c.Element("pictTitle").Value
    CheckedListBox1.Items.Add(pictNum & " : " & c.Element("viewFileName").Value)
    i = i + 1

    pictNum = pictNum + 1
Next

XMLファイル
<?xml version="1.0" encoding="utf-8"?>
<Objects>
  <Pict>
    <pictNum>1</pictNum>
    <indexNum>1</indexNum>
    <viewFileName>Chrysanthemum.jpg</viewFileName>
    <fileFullPath>C:\Users\username\Desktop\pict\Chrysanthemum.jpg</fileFullPath>
    <rotateDegree>0</rotateDegree>
    <statusOfMarker>0</statusOfMarker>
    <pictTitle>pict1</pictTitle>
  </Pict>
  <Pict>
    <pictNum>2</pictNum>
    <indexNum>2</indexNum>
    <viewFileName>Desert.jpg</viewFileName>
    <fileFullPath>C:\Users\username\Desktop\pict\Desert.jpg</fileFullPath>
    <rotateDegree>0</rotateDegree>
    <statusOfMarker>0</statusOfMarker>
    <pictTitle>pict2</pictTitle>
  </Pict>
  <Pict>
    <pictNum>3</pictNum>
    <indexNum>3</indexNum>
    <viewFileName>Hydrangeas.jpg</viewFileName>
    <fileFullPath>C:\Users\username\Desktop\pict\Hydrangeas.jpg</fileFullPath>
    <rotateDegree>0</rotateDegree>
    <statusOfMarker>0</statusOfMarker>
    <pictTitle>pict3</pictTitle>
  </Pict>
  <Pict>
    <pictNum>4</pictNum>
    <indexNum>4</indexNum>
    <viewFileName>Jellyfish.jpg</viewFileName>
    <fileFullPath>C:\Users\username\Desktop\pict\Jellyfish.jpg</fileFullPath>
    <rotateDegree>0</rotateDegree>
    <statusOfMarker>0</statusOfMarker>
    <pictTitle>pict4</pictTitle>
  </Pict>
  <Pict>
    <pictNum>5</pictNum>
    <indexNum>5</indexNum>
    <viewFileName>Koala.jpg</viewFileName>
    <fileFullPath>C:\Users\username\Desktop\pict\Koala.jpg</fileFullPath>
    <rotateDegree>0</rotateDegree>
    <statusOfMarker>0</statusOfMarker>
    <pictTitle>pict5</pictTitle>
  </Pict>
  <Pict>
    <pictNum>6</pictNum>
    <indexNum>6</indexNum>
    <viewFileName>Lighthouse.jpg</viewFileName>
    <fileFullPath>C:\Users\username\Desktop\pict\Lighthouse.jpg</fileFullPath>
    <rotateDegree>0</rotateDegree>
    <statusOfMarker>0</statusOfMarker>
    <pictTitle>pict6</pictTitle>
  </Pict>
  <Pict>
    <pictNum>7</pictNum>
    <indexNum>7</indexNum>
    <viewFileName>Penguins.jpg</viewFileName>
    <fileFullPath>C:\Users\username\Desktop\pict\Penguins.jpg</fileFullPath>
    <rotateDegree>0</rotateDegree>
    <statusOfMarker>0</statusOfMarker>
    <pictTitle>pict7</pictTitle>
  </Pict>
  <Pict>
    <pictNum>8</pictNum>
    <indexNum>8</indexNum>
    <viewFileName>Tulips.jpg</viewFileName>
    <fileFullPath>C:\Users\username\Desktop\pict\Tulips.jpg</fileFullPath>
    <rotateDegree>0</rotateDegree>
    <statusOfMarker>0</statusOfMarker>
    <pictTitle>pict8</pictTitle>
  </Pict>
</Objects>

2010年12月2日木曜日

[卒業研究] 卒業論文の書き方

卒業論文は卒業研究の単なる作業メモではなく,文章として「読める」ものでなければならない.

つまり,行った事や結果の羅列ではなく,まず卒業研究として行った事の,そもそもの妥当性や事情を説明した上で,内容の説明を行い,最後に結果や今後の展望について纏める必要がある.

これによって卒業研究が世の中でどのような位置付けにあるかが,読者に伝わる.

具体的には,起承転結を意識して記述すると良い.

また論文を書く際の心構えについては,こちらのサイトが参考になる.

2010年10月21日木曜日

[卒業研究] システム構成図

fig.1 システム構成図

[卒業研究] サーバ構成案

卒業研究用サーバの構成について,いくつか候補を挙げてみます.
(可能であれば 同構成のサーバを2台用意して,開発時には本番環境と開発環境で分けて作業を進め,リリース後は開発環境をコールドスタンバイ機とする)

1. サーバ
(1-1)HP ProLiant MicroServer \35,700
http://h50146.www5.hp.com/products/servers/proliant/micro/index.html
※CPUは非力ながら,RAIDが標準で組める!コンパクトな筐体ながら,大口径FAN使用で静音!!ただしHDDが1つなので,もう1つ追加してミラーリングしたい所.
リンク1,リンク2, システム構成案(PDF)

(1-2)HP ProLiant ML110 G5 \11,280(\3,300割引クーポン使用で\7,980)
http://h50146.www5.hp.com/products/old/servers/proliant/ml110g5/
http://nttxstore.jp/_II_HP13207801
※とにかく安い!!

(1-3)NEC Express5800/GT110b \16,800(\2,000割引クーポン使用で\14,800)
http://www.nec.co.jp/products/pcserver/g/gt110b/index.shtml
http://nttxstore.jp/_II_P813280396
※一昔前に格安サーバで有名だった機種.

2.OS
(2-1)CentOS \Free
http://www.centos.org/

(2-2)Red Hat Enterprise Linux(RHEL) ライセンス\Free(サポートは有料)
http://www.jp.redhat.com/rhel/

(2-3)Microsoft Windows Server 2008 R2 Standard Edition (5CAL) アカデミック版 ¥57,775
http://www.coneco.net/PriceList/1091014006/order/MONEY/

3.無停電電源装置(UPS)
(3-1)APC ES 550 BE550G-JP ¥8,663
http://www.apc.com/products/resource/include/techspec_index.cfm?base_sku=BE550G-JP&total_watts=200
http://kakaku.com/item/K0000107355/spec/

(3-2)APC RS 550 BR550G-JP ¥13,511
http://www.apc.com/products/resource/include/techspec_index.cfm?base_sku=BR550G-JP&total_watts=200
http://kakaku.com/item/K0000056754/

(3-3)オムロン BY50S ¥16,481
http://www.omron.co.jp/ped-j/dengen/product/ups/by35-50s/by35-50s.html
http://kakaku.com/item/K0000066780/spec/

※OSとの連携機能(自動シャットダウン等)を確認する必要有り.

4.モニター
(4-1)なし \0
※コスト削減の為,既存モニターを利用する.

(4-2)HP 1910m 18.5インチワイド液晶モニター \10,500
http://h50146.www5.hp.com/products/desktops/personal/monitors/1910m/

(4-3)Dell IN1920 18.5 インチ HD ワイドスクリーンフラットパネルモニタ \10,500
http://www1.jp.dell.com/content/products/compare.aspx/19_20lcd?c=jp&cs=jpdhs1&l=ja&s=dhs

※本来ならサーバ用途の場合,16:9のワイド画面ではなく従来からの4:3の方がベター(縦方向の課解像度が高ければ,表示できる行数が増えるため)だが,現状では価格の問題でワイド画面を選択せざるを得ない状況です.

5.作業用(閲覧用)端末
ノートPC?

2010年9月9日木曜日

[卒業研究] ブラウザでの2Dハードウェアレンダリング

ブラウザでの画像・文字等の表示(レンダリング)にハードウェアを援用する試み.
従来は3Dオブジェクトにおいてはハードウェア(グラフィックカード等)を援用する形で,表示の高速化・高品質化を実現してきたが,それを2Dにも拡大したもの.
Firefox 4.0では2Dのアクセラレーションをデフォルトで有効化するとの事.

また,IE9ではJavaScriptエンジンがマルチコアCPUを利用してコンパイルしている.

※従来,ブラウザに最も求められていたものは互換性だったが,昨今では環境に依存する(つまり互換性をスポイルする)ハードウェアを利用してでも高速化したいという要求が高まっていることを示していると思われる.

参考
http://hacks.mozilla.org/2010/09/hardware-acceleration/

[卒業研究] Canvas or SVG?

ブラウザ上で高品質なグラフィックを扱う方法として,スケール可能(拡大縮小しても画像が荒れない)なフォーマットの使用が考えられる.
使用するブラウザのサポートが前提となるが,現時点ではHTML5のCanvas要素や,従来から存在するSVGを使用する方法が有力であろう.
しかしながら,それぞれ似て事なる技術の為,使用には注意が必要だ.

Canvas
・プログラミング可能
・Javascript必須

SVG
・グラフィックソフトのサポートあり
・データ形式はXML

※Canvasが開発者向けなのに対して,SVGはデザイナー向けと言えるかもしれません.

参考
http://www.sitepoint.com/blogs/2010/07/06/canvas-vs-svg-how-to-choose/