<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4746951324506260429</id><updated>2024-09-08T13:32:57.926-04:00</updated><category term="MFC"/><title type='text'>emocias</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://emocias.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4746951324506260429/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://emocias.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/4746951324506260429/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>emocias</name><uri>http://www.blogger.com/profile/05285285831867688681</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://1.bp.blogspot.com/_INA6k_5WIIE/TOK9p4Ht3sI/AAAAAAAAAAQ/aNMCwPAqTsc/S220/vladstudio_xmasnight2_1600x900_love_baroque%255B1%255D.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>28</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4746951324506260429.post-8217361719576069554</id><published>2014-04-28T20:55:00.002-04:00</published><updated>2014-04-28T20:57:36.912-04:00</updated><title type='text'></title><content type='html'>&lt;h3 class=&quot;post-title entry-title&quot; itemprop=&quot;name&quot; style=&quot;background-color: white; color: #646464; font-family: Georgia, Utopia, &#39;Palatino Linotype&#39;, Palatino, serif; margin: 20px 0px 0px; position: relative;&quot;&gt;
Compile Qt 5 64bit library with Visual Studio 2010 Professional&lt;/h3&gt;
&lt;div class=&quot;post-header&quot; style=&quot;background-color: white; color: #646464; font-family: Georgia, Utopia, &#39;Palatino Linotype&#39;, Palatino, serif; font-size: 13px; line-height: 1.6; margin: 0px 0px 1em;&quot;&gt;
&lt;div class=&quot;post-header-line-1&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;post-body entry-content&quot; id=&quot;post-body-931235948287711239&quot; itemprop=&quot;description articleBody&quot; style=&quot;background-color: white; color: #646464; font-family: Georgia, Utopia, &#39;Palatino Linotype&#39;, Palatino, serif; font-size: 13px; line-height: 18.200000762939453px; position: relative; width: 590px;&quot;&gt;
&lt;br /&gt;
&lt;div style=&quot;border: 0px; font-family: Georgia, serif; font-size: 17px; line-height: 22px; margin-bottom: 22px; outline: 0px; padding: 0px; text-align: justify; vertical-align: baseline;&quot;&gt;
Qt does not support 64bit library officially, but you can build that.&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: Georgia, serif; font-size: 17px; line-height: 22px; margin-bottom: 22px; outline: 0px; padding: 0px; text-align: justify; vertical-align: baseline;&quot;&gt;
Although 64bit library is unstable, it is useful to establish 64bit environment with QT and Visual Studio 2010 professional.&amp;nbsp;First of all, Visual Studio 2010 professional is installed on you system. Steps are as followings:&lt;/div&gt;
&lt;ol style=&quot;border: 0px; list-style-image: initial; list-style-position: initial; margin: 0px 0px 22px 2.5em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;li style=&quot;background-color: transparent; border: 0px; font-family: Georgia, serif; font-size: 17px; line-height: 22px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;Install&lt;/span&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://www.perl.org/get.html&quot; style=&quot;background-color: transparent; border: 0px; color: #743399; margin: 0px; outline: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;&quot; title=&quot;Perl&quot;&gt;Perl&lt;/a&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;if Qt version is more than 4.8.0 because it use Perl to configure building.&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background-color: transparent; border: 0px; font-family: Georgia, serif; font-size: 17px; line-height: 22px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Download and install qt5(visual studio 2010).&lt;/li&gt;
&lt;li style=&quot;background-color: transparent; border: 0px; font-family: Georgia, serif; font-size: 17px; line-height: 22px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Open Visual Studio x64 Win64 Command Prompt (2010)&lt;/li&gt;
&lt;ul style=&quot;font-family: Georgia, serif; font-size: 17px; line-height: 22px; margin: 0.5em 0px; padding: 0px 2.5em;&quot;&gt;
&lt;li style=&quot;background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Location: Start-&amp;gt;All Programs-&amp;gt;Microsoft Visual Studio 2010-&amp;gt;Visual Studio Tools-&amp;gt;Visual Studio x64 Win64 Command Prompt (2010)&lt;/li&gt;
&lt;/ul&gt;
&lt;li style=&quot;background-color: transparent; border: 0px; font-family: Georgia, serif; font-size: 17px; line-height: 22px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Set up environmental variables&lt;br /&gt;&lt;code style=&quot;background-color: transparent; border: 0px; font-family: Monaco, monospace; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;gt; Set QTDIR=C:\Qt\5.2.1\qtbase&lt;br /&gt;&amp;gt; Set QMAKESPEC=win32-msvc2010&lt;/code&gt;&lt;/li&gt;
&lt;li style=&quot;background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: Georgia, serif;&quot;&gt;&lt;span style=&quot;font-size: 17px; line-height: 22px;&quot;&gt;Update&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;code style=&quot;background-color: transparent; border: 0px; font-family: Monaco, monospace; font-size: 16px; line-height: 22px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;PATH&lt;/code&gt;&lt;span style=&quot;font-family: Georgia, serif;&quot;&gt;&lt;span style=&quot;font-size: 17px; line-height: 22px;&quot;&gt;&amp;nbsp;variable to include&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;code style=&quot;background-color: transparent; border: 0px; font-family: Monaco, monospace; font-size: 16px; line-height: 22px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;%QTDIR%\bin in System&amp;nbsp;&lt;/code&gt;&lt;span style=&quot;font-family: Monaco, monospace;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;environments&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background-color: transparent; border: 0px; font-family: Georgia, serif; font-size: 17px; line-height: 22px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Download the latest version of&amp;nbsp;&lt;a href=&quot;ftp://ftp.qt.nokia.com/jom/&quot; style=&quot;background-color: transparent; border: 0px; color: #743399; margin: 0px; outline: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;jom&lt;/a&gt;&amp;nbsp;which speeds up Visual C++ Qt Builds by supporting parallel processes.&lt;/li&gt;
&lt;li style=&quot;background-color: transparent; border: 0px; font-family: Georgia, serif; font-size: 17px; line-height: 22px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Extract jom files to&amp;nbsp;&lt;code style=&quot;background-color: transparent; border: 0px; font-family: Monaco, monospace; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;C:\Qt\jom&lt;/code&gt;&amp;nbsp;folder&lt;/li&gt;
&lt;li style=&quot;background-color: transparent; border: 0px; font-family: Georgia, serif; font-size: 17px; line-height: 22px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Run following commands in it (every line is a different command: type it then press&amp;nbsp;&lt;code style=&quot;background-color: transparent; border: 0px; font-family: Monaco, monospace; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Enter&lt;/code&gt;):&lt;br /&gt;&lt;code style=&quot;background-color: transparent; border: 0px; font-family: Monaco, monospace; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;gt; cd c:\Qt\5.2.1\qtbase&lt;br /&gt;&amp;gt; configure -debug-and-release -opensource -platform win32-msvc2010 -opengl desktop -nomake examples&lt;br /&gt;&amp;gt; ..\jom\jom.exe -j N&lt;/code&gt;&lt;div style=&quot;background-color: transparent; border: 0px; margin-bottom: 22px; outline: 0px; padding: 0px; text-align: justify; vertical-align: baseline;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: transparent; border: 0px; margin-bottom: 22px; outline: 0px; padding: 0px; text-align: justify; vertical-align: baseline;&quot;&gt;
Where&amp;nbsp;&lt;code style=&quot;background-color: transparent; border: 0px; font-family: Monaco, monospace; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;N&lt;/code&gt;&amp;nbsp;is number of CPU cores you want to utilize for Qt compilation. Larger is better.&lt;/div&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: transparent; border: 0px; font-family: Georgia, serif; font-size: 17px; line-height: 22px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Run the following command.&amp;nbsp;&lt;/li&gt;
&lt;ul style=&quot;line-height: 1.4; margin: 0.5em 0px; padding: 0px 2.5em;&quot;&gt;
&lt;li style=&quot;margin: 0px 0px 0.25em; padding: 0px;&quot;&gt;&lt;span style=&quot;background-color: transparent; font-family: Georgia, serif; font-size: 17px; line-height: 22px;&quot;&gt;&amp;gt; ..\jom\jom.exe clean&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0px 0px 0.25em; padding: 0px;&quot;&gt;&lt;span style=&quot;background-color: transparent; font-family: Georgia, serif; font-size: 17px; line-height: 22px; text-align: justify;&quot;&gt;One can safely shrink its size by deleting temporary files created during the process.&amp;nbsp;&amp;nbsp;Note that PDB files will be deleted too.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li style=&quot;background-color: transparent; border: 0px; font-family: Georgia, serif; font-size: 17px; line-height: 22px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;Download and install&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://qt.nokia.com/downloads/visual-studio-add-in&quot; style=&quot;background-color: transparent; border: 0px; color: #743399; margin: 0px; outline: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;Qt Visual Studio Add-in&lt;/a&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background-color: transparent; border: 0px; font-family: Georgia, serif; font-size: 17px; line-height: 22px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;Run Visual Studio 2010. Integrate just compiled Qt to IDE using menu&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;background-color: transparent; border: 0px; font-family: Monaco, monospace; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Qt &amp;gt; Qt Options &amp;gt; Qt Versions &amp;gt; Add&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://emocias.blogspot.com/feeds/8217361719576069554/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4746951324506260429/8217361719576069554' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4746951324506260429/posts/default/8217361719576069554'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4746951324506260429/posts/default/8217361719576069554'/><link rel='alternate' type='text/html' href='http://emocias.blogspot.com/2014/04/compile-qt-5-64bit-library-with-visual.html' title=''/><author><name>emocias</name><uri>http://www.blogger.com/profile/05285285831867688681</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://1.bp.blogspot.com/_INA6k_5WIIE/TOK9p4Ht3sI/AAAAAAAAAAQ/aNMCwPAqTsc/S220/vladstudio_xmasnight2_1600x900_love_baroque%255B1%255D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4746951324506260429.post-4270598901493389324</id><published>2013-05-14T13:38:00.004-04:00</published><updated>2013-05-14T13:38:41.936-04:00</updated><title type='text'>Getting MAC address on the linux by using C++</title><content type='html'>&lt;br /&gt;
After getting a list of network interfaces,&lt;br /&gt;
This code will print MAC address per each interface except loopback.&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;sys/ioctl.h&amp;gt;&lt;br /&gt;
#include &amp;lt;net/if.h&amp;gt;&lt;br /&gt;
#include &amp;lt;unistd.h&amp;gt;&lt;br /&gt;
#include &amp;lt;netinet/in.h&amp;gt;&lt;br /&gt;
#include &amp;lt;string.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#define MAC_STRING_LENGTH 13&lt;br /&gt;
&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; char mac_address[MAC_STRING_LENGTH];&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; struct ifreq ifr;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; struct ifconf ifc;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; char buf[1024];&lt;br /&gt;
&amp;nbsp; &amp;nbsp; int success = 0;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; int sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_IP);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if (sock == -1) { return -1;}&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ifc.ifc_len = sizeof(buf);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ifc.ifc_buf = buf;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if (ioctl(sock, SIOCGIFCONF, &amp;amp;ifc) == -1)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; std::cout &amp;lt;&amp;lt; &quot;error&quot; &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; struct ifreq* it = ifc.ifc_req;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; const struct ifreq* const end = it + (ifc.ifc_len / sizeof(struct ifreq));&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; for (; it != end; ++it) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; std::cout &amp;lt;&amp;lt; it-&amp;gt;ifr_name &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; strcpy(ifr.ifr_name, it-&amp;gt;ifr_name);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (ioctl(sock, SIOCGIFFLAGS, &amp;amp;ifr) == 0) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (! (ifr.ifr_flags &amp;amp; IFF_LOOPBACK)) { // don&#39;t count loopback&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (ioctl(sock, SIOCGIFHWADDR, &amp;amp;ifr) == 0) {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (int i = 0; i &amp;lt; 6; ++i)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; snprintf(mac_address+i*2,MAC_STRING_LENGTH-i*2,&quot;%02x&quot;,(unsigned char) ifr.ifr_addr.sa_data[i]);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; std::cout &amp;lt;&amp;lt; mac_address &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; std::cout &amp;lt;&amp;lt; &quot;error&quot; &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
}&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://emocias.blogspot.com/feeds/4270598901493389324/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4746951324506260429/4270598901493389324' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4746951324506260429/posts/default/4270598901493389324'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4746951324506260429/posts/default/4270598901493389324'/><link rel='alternate' type='text/html' href='http://emocias.blogspot.com/2013/05/getting-mac-address-on-linux-by-using-c.html' title='Getting MAC address on the linux by using C++'/><author><name>emocias</name><uri>http://www.blogger.com/profile/05285285831867688681</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://1.bp.blogspot.com/_INA6k_5WIIE/TOK9p4Ht3sI/AAAAAAAAAAQ/aNMCwPAqTsc/S220/vladstudio_xmasnight2_1600x900_love_baroque%255B1%255D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4746951324506260429.post-46734051115748931</id><published>2013-02-09T22:18:00.002-05:00</published><updated>2013-02-09T22:18:27.238-05:00</updated><title type='text'>vncserver on Debian</title><content type='html'>vncserver allows you to access the remote desktop where the operating system is Windows or Linux. This article will describe how to set up vncserver on linux and use vncviewer. Especially I have tested on Debian Squeeze and used tightvncserver which is one of vnc servers.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
[Server Side]&lt;/h3&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;First of all, you need to set up vncserver on linux.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;1. installation of vncserver&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp;# apt-get install tightvncserver&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp;After installing vncserver, you need to configure several options.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp;# tightvncserver :1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp;# tightvncserver -kill :11&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp;( This command will initialize the default options and kill the vncserver process)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp;By editing the following file, set up options.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp;# vi ~/.vnc/xstartup&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;xsetroot -solid grey&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;x-terminal-emulator -geometry 80x24+10+10 -ls -title &quot;$VNCDESKTOP Desktop&quot; &amp;amp;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;gnome-session &amp;amp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp;&quot;gnome-session &amp;amp;&quot; option supports the desktop based on GNOME.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp;Finally, you can start vncserver like this.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp;# vncserver :1 -geometry 1920x1200 -depth 24 -dpi 95&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp;&quot;:1&quot; is the display number, &quot;-geometry 1920x1200&quot; is the display resolution, &quot;-depth 24&quot; is the color depth, and &quot;-dpi 95&quot; is the font size. Usually the desktop accessed by vncviewer has the small font size. So, you need to reset the font size on the server by &quot;-dpi&quot; option.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3&gt;
[Client Side]&lt;/h3&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
To access the vnc server, you can use &lt;a href=&quot;http://www.tightvnc.com/&quot;&gt;TightVNC &lt;/a&gt;client which is a free remote control software package.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://3.bp.blogspot.com/-7-YwlQx_Cms/URcO0KpA2qI/AAAAAAAAA6g/OMXMJCUHqWc/s1600/Untitled.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;230&quot; src=&quot;http://3.bp.blogspot.com/-7-YwlQx_Cms/URcO0KpA2qI/AAAAAAAAA6g/OMXMJCUHqWc/s320/Untitled.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Input a remote host in the edit box &quot;Remote Host:&quot; like &quot;xxx.xxx.xxx:1&quot;.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
After an IP information, you should attach a display number which has already been configured when starting vncserver.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3&gt;
[Share the desktop]&lt;/h3&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Here is another tip.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
If you want to share the same desktop view between the linux server and the client,you have to use &quot;x11vnc&quot; command.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
On the server side, type the following command.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
$ x11vnc -display :0&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
After that, type a remote host in TightVNC client.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Only enter IP or host name.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://emocias.blogspot.com/feeds/46734051115748931/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4746951324506260429/46734051115748931' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4746951324506260429/posts/default/46734051115748931'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4746951324506260429/posts/default/46734051115748931'/><link rel='alternate' type='text/html' href='http://emocias.blogspot.com/2013/02/vncserver-on-debian.html' title='vncserver on Debian'/><author><name>emocias</name><uri>http://www.blogger.com/profile/05285285831867688681</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://1.bp.blogspot.com/_INA6k_5WIIE/TOK9p4Ht3sI/AAAAAAAAAAQ/aNMCwPAqTsc/S220/vladstudio_xmasnight2_1600x900_love_baroque%255B1%255D.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-7-YwlQx_Cms/URcO0KpA2qI/AAAAAAAAA6g/OMXMJCUHqWc/s72-c/Untitled.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4746951324506260429.post-5873311500222769854</id><published>2012-10-25T13:58:00.001-04:00</published><updated>2012-10-25T13:58:40.914-04:00</updated><title type='text'>Fail to start Oracle Enterprise Manager 11g</title><content type='html'>I will post how to recover Oracle Enterprise Manager (OEM) for 11g when failing to start OEM after changing the password of sysdba. Normally OEM is working well. However, OEM has a problem after changing the password sometimes. To fix this problem, you can reconfigure the setting of OEM.&lt;br /&gt;
Here is a way.&lt;br /&gt;
First of all, type the following command.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;oracle&amp;gt; emca -deconfig dbcontrol db&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;oracle&amp;gt; emctl start dbconsole&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;-&amp;gt; after doing this command, if OEM is not working, try to run this command.&lt;br /&gt;
&lt;b&gt;oracle&amp;gt; emca -config dbcontrol db&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
Enter the following information:&lt;br /&gt;Database SID: bm&lt;br /&gt;Listener port number: 1521&lt;br /&gt;Listener ORACLE_HOME [ /db/app/oracle/product/11.2.0/dbhome_1 ]:&lt;br /&gt;Password for SYS user:&lt;br /&gt;Password for DBSNMP user:&lt;br /&gt;Password for SYSMAN user:&lt;/blockquote&gt;
&lt;div&gt;
Enter your database SID, listener port, oracle home, and the passwords of SYS, DBSNMP, SYSMAN.&lt;/div&gt;
&lt;div&gt;
This command will reconfigure all the settings for OEM.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://emocias.blogspot.com/feeds/5873311500222769854/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4746951324506260429/5873311500222769854' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4746951324506260429/posts/default/5873311500222769854'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4746951324506260429/posts/default/5873311500222769854'/><link rel='alternate' type='text/html' href='http://emocias.blogspot.com/2012/10/fail-to-start-oracle-enterprise-manager.html' title='Fail to start Oracle Enterprise Manager 11g'/><author><name>emocias</name><uri>http://www.blogger.com/profile/05285285831867688681</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://1.bp.blogspot.com/_INA6k_5WIIE/TOK9p4Ht3sI/AAAAAAAAAAQ/aNMCwPAqTsc/S220/vladstudio_xmasnight2_1600x900_love_baroque%255B1%255D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4746951324506260429.post-931235948287711239</id><published>2012-08-09T15:15:00.001-04:00</published><updated>2013-05-17T13:06:07.892-04:00</updated><title type='text'>Compile Qt 4.8.2 64bit library with Visual Studio 2010 Professional</title><content type='html'>&lt;br /&gt;
&lt;div style=&quot;background-color: white; border: 0px; font-family: Georgia, serif; font-size: 17px; line-height: 22px; margin-bottom: 22px; outline: 0px; padding: 0px; text-align: justify; vertical-align: baseline;&quot;&gt;
Qt does not support 64bit library officially, but you can build that.&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; font-family: Georgia, serif; font-size: 17px; line-height: 22px; margin-bottom: 22px; outline: 0px; padding: 0px; text-align: justify; vertical-align: baseline;&quot;&gt;
Although 64bit library is unstable, it is useful to establish 64bit environment with QT and Visual Studio 2010 professional.&amp;nbsp;First of all, Visual Studio 2010 professional is installed on you system. Steps are as followings:&lt;/div&gt;
&lt;ol style=&quot;background-color: white; border: 0px; list-style-image: initial; list-style-position: initial; margin: 0px 0px 22px 2.5em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;li style=&quot;background-color: transparent; border: 0px; font-family: Georgia, serif; font-size: 17px; line-height: 22px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;Install&lt;/span&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://www.perl.org/get.html&quot; style=&quot;background-color: transparent; border: 0px; color: #743399; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot; title=&quot;Perl&quot;&gt;Perl&lt;/a&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;if Qt version is more than 4.8.0 because it use Perl to configure building.&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background-color: transparent; border: 0px; font-family: Georgia, serif; font-size: 17px; line-height: 22px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Download and install &lt;a href=&quot;http://qt.nokia.com/downloads/windows-cpp-vs2010&quot;&gt;Qt libraries 4.8.2 for Windows (VS 2010)&lt;/a&gt;.&lt;/li&gt;
&lt;li style=&quot;background-color: transparent; border: 0px; font-family: Georgia, serif; font-size: 17px; line-height: 22px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Open Visual Studio x64 Win64 Command Prompt (2010)&lt;/li&gt;
&lt;ul style=&quot;font-family: Georgia, serif; font-size: 17px; line-height: 22px;&quot;&gt;
&lt;li style=&quot;background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Location: Start-&amp;gt;All Programs-&amp;gt;Microsoft Visual Studio 2010-&amp;gt;Visual Studio Tools-&amp;gt;Visual Studio x64 Win64 Command Prompt (2010)&lt;/li&gt;
&lt;/ul&gt;
&lt;li style=&quot;background-color: transparent; border: 0px; font-family: Georgia, serif; font-size: 17px; line-height: 22px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Set up environmental variables&lt;br /&gt;&lt;code style=&quot;background-color: transparent; border: 0px; font-family: Monaco, monospace; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;gt; Set QTDIR=C:\Qt\4.7.1&lt;br /&gt;&amp;gt; Set QMAKESPEC=win32-msvc2010&lt;/code&gt;&lt;/li&gt;
&lt;li style=&quot;background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: Georgia, serif;&quot;&gt;&lt;span style=&quot;font-size: 17px; line-height: 22px;&quot;&gt;Update&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;code style=&quot;background-color: transparent; border: 0px; font-family: Monaco, monospace; font-size: 16px; line-height: 22px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;PATH&lt;/code&gt;&lt;span style=&quot;font-family: Georgia, serif;&quot;&gt;&lt;span style=&quot;font-size: 17px; line-height: 22px;&quot;&gt;&amp;nbsp;variable to include&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;code style=&quot;background-color: transparent; border: 0px; font-family: Monaco, monospace; font-size: 16px; line-height: 22px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;%QTDIR%\bin in System&amp;nbsp;&lt;/code&gt;&lt;span style=&quot;font-family: Monaco, monospace;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;environments&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background-color: transparent; border: 0px; font-family: Georgia, serif; font-size: 17px; line-height: 22px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Download the latest version of&amp;nbsp;&lt;a href=&quot;ftp://ftp.qt.nokia.com/jom/&quot; style=&quot;background-color: transparent; border: 0px; color: #743399; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;jom&lt;/a&gt;&amp;nbsp;which speeds up Visual C++ Qt Builds by supporting parallel processes.&lt;/li&gt;
&lt;li style=&quot;background-color: transparent; border: 0px; font-family: Georgia, serif; font-size: 17px; line-height: 22px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Extract jom files to&amp;nbsp;&lt;code style=&quot;background-color: transparent; border: 0px; font-family: Monaco, monospace; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;C:\Qt\jom&lt;/code&gt;&amp;nbsp;folder&lt;/li&gt;
&lt;li style=&quot;background-color: transparent; border: 0px; font-family: Georgia, serif; font-size: 17px; line-height: 22px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Run following commands in it (every line is a different command: type it then press&amp;nbsp;&lt;code style=&quot;background-color: transparent; border: 0px; font-family: Monaco, monospace; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Enter&lt;/code&gt;):&lt;br /&gt;&lt;code style=&quot;background-color: transparent; border: 0px; font-family: Monaco, monospace; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;gt; cd c:\Qt\4.7.1&lt;br /&gt;&amp;gt; configure -debug-and-release -opensource -platform win32-msvc2010 -opengl desktop&lt;br /&gt;&amp;gt; ..\jom\jom.exe -j N&lt;/code&gt;&lt;div style=&quot;background-color: transparent; border: 0px; margin-bottom: 22px; outline: 0px; padding: 0px; text-align: justify; vertical-align: baseline;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: transparent; border: 0px; margin-bottom: 22px; outline: 0px; padding: 0px; text-align: justify; vertical-align: baseline;&quot;&gt;
Where&amp;nbsp;&lt;code style=&quot;background-color: transparent; border: 0px; font-family: Monaco, monospace; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;N&lt;/code&gt;&amp;nbsp;is number of CPU cores you want to utilize for Qt compilation. Larger is better.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: transparent; border: 0px; font-family: Georgia, serif; font-size: 17px; line-height: 22px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Run the following command.&amp;nbsp;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;background-color: transparent; font-family: Georgia, serif; font-size: 17px; line-height: 22px;&quot;&gt;&amp;gt; ..\jom\jom.exe clean&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: transparent; font-family: Georgia, serif; font-size: 17px; line-height: 22px; text-align: justify;&quot;&gt;One can safely shrink its size by deleting temporary files created during the process.&amp;nbsp;&amp;nbsp;Note that PDB files will be deleted too.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li style=&quot;background-color: transparent; border: 0px; font-family: Georgia, serif; font-size: 17px; line-height: 22px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;Download and install&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://qt.nokia.com/downloads/visual-studio-add-in&quot; style=&quot;background-color: transparent; border: 0px; color: #743399; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Qt Visual Studio Add-in&lt;/a&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background-color: transparent; border: 0px; font-family: Georgia, serif; font-size: 17px; line-height: 22px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;Run Visual Studio 2010. Integrate just compiled Qt to IDE using menu&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;background-color: transparent; border: 0px; font-family: Monaco, monospace; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Qt &amp;gt; Qt Options &amp;gt; Qt Versions &amp;gt; Add&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 style=&quot;background-color: white; border: 0px; clear: both; font-family: Georgia, serif; font-size: 19px; line-height: 22px; margin: 0px; outline: 0px; padding: 28px 0px 14px; vertical-align: baseline;&quot;&gt;
Remarks&lt;/h2&gt;
&lt;div style=&quot;background-color: white; border: 0px; font-family: Georgia, serif; font-size: 17px; line-height: 22px; margin-bottom: 22px; outline: 0px; padding: 0px; text-align: justify; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;*&lt;/strong&gt;&amp;nbsp;Jom is&amp;nbsp;&lt;code style=&quot;background-color: transparent; border: 0px; font-family: Monaco, monospace; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;nmake&lt;/code&gt;&amp;nbsp;replacement for Qt compilation on multi-core CPU. Its parameter&amp;nbsp;&lt;code style=&quot;background-color: transparent; border: 0px; font-family: Monaco, monospace; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;-j N&amp;nbsp;&lt;/code&gt;allows to setup number of parallel processes for compilation. Number of physical CPU cores is a good choice for&amp;nbsp;&lt;code style=&quot;background-color: transparent; border: 0px; font-family: Monaco, monospace; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;N&lt;/code&gt;.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://emocias.blogspot.com/feeds/931235948287711239/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4746951324506260429/931235948287711239' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4746951324506260429/posts/default/931235948287711239'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4746951324506260429/posts/default/931235948287711239'/><link rel='alternate' type='text/html' href='http://emocias.blogspot.com/2012/08/compile-qt-482-64bit-library-with.html' title='Compile Qt 4.8.2 64bit library with Visual Studio 2010 Professional'/><author><name>emocias</name><uri>http://www.blogger.com/profile/05285285831867688681</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://1.bp.blogspot.com/_INA6k_5WIIE/TOK9p4Ht3sI/AAAAAAAAAAQ/aNMCwPAqTsc/S220/vladstudio_xmasnight2_1600x900_love_baroque%255B1%255D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4746951324506260429.post-1857032268249850591</id><published>2012-06-19T12:08:00.003-04:00</published><updated>2012-06-19T12:08:57.730-04:00</updated><title type='text'>[Oracle] Identify the locked row id in table described</title><content type='html'>This sql will get locked id in Table &amp;lt;table_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
select dbms_rowid.rowid_create(1,row_wait_obj#, row_wait_file#, row_wait_block#, row_wait_row#) from v$session where sid = (select s.sid from dba_objects, &amp;nbsp;v$lock s where object_id = s.ID1 and object_name = &#39;&amp;lt;table_name&amp;gt;&#39;);</content><link rel='replies' type='application/atom+xml' href='http://emocias.blogspot.com/feeds/1857032268249850591/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4746951324506260429/1857032268249850591' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4746951324506260429/posts/default/1857032268249850591'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4746951324506260429/posts/default/1857032268249850591'/><link rel='alternate' type='text/html' href='http://emocias.blogspot.com/2012/06/oracle-identify-locked-row-id-in-table.html' title='[Oracle] Identify the locked row id in table described'/><author><name>emocias</name><uri>http://www.blogger.com/profile/05285285831867688681</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://1.bp.blogspot.com/_INA6k_5WIIE/TOK9p4Ht3sI/AAAAAAAAAAQ/aNMCwPAqTsc/S220/vladstudio_xmasnight2_1600x900_love_baroque%255B1%255D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4746951324506260429.post-8107318397223925768</id><published>2012-05-25T16:43:00.000-04:00</published><updated>2012-05-25T16:43:58.807-04:00</updated><title type='text'>Environment variables on Oracle 11g Release 2</title><content type='html'>&lt;ul&gt;
&lt;li&gt;Setting up environment variables&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;blockquote&gt;
$ vi .bashrc&lt;br /&gt;
# add ORACLE_HOME, ORACLE_BASE and ORACLE_SID&lt;br /&gt;
# example&lt;br /&gt;
export ORACLE_BASE=/db/app/oracle&lt;br /&gt;
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1&lt;br /&gt;
export ORACLE_SID=oracle_sid&lt;/blockquote&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Test&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;blockquote&gt;
$ sqlplus /nolog&lt;br /&gt;
SQL&amp;gt; connect / as sysdba&lt;br /&gt;
SQL&amp;gt; &amp;nbsp;startup&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #4c4c4c; font-family: Arial; font-size: 15px; line-height: 25px;&quot;&gt;ORA-01078: failure in processing system parameters&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #4c4c4c; font-family: Arial; font-size: 15px; line-height: 25px;&quot;&gt;LRM-00109: could not open parameter file &#39;anywhere&#39;&lt;/span&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
If you are facing the above error while startup of oracle, possible reasons might be the init{ORACLE_SID}.ora file not accessible by oracle user. To solve this problem, you can get your pfile at the location $ORACLE_BASE/admin/$ORACLE_SID/pfile/. A typical file name is init.ora.{NUMBER}. From that location, make a spfile by the following:&lt;/blockquote&gt;
&lt;blockquote&gt;
$ORACLE_BASE=/db/app/oracle/ and $ORACLE_SID=ora_sid&lt;br /&gt;
$sqlplus /nolog&lt;br /&gt;
SQL&amp;gt; connect / as sysdba&lt;br /&gt;
SQL&amp;gt; create spfile from pfile=&#39;/db/app/oracle/admin/ora_sid/pfile/init.ora.{NUMBER}&lt;br /&gt;
&amp;nbsp; &amp;nbsp;File created.&lt;br /&gt;
SQL&amp;gt; startup&lt;/blockquote&gt;</content><link rel='replies' type='application/atom+xml' href='http://emocias.blogspot.com/feeds/8107318397223925768/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4746951324506260429/8107318397223925768' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4746951324506260429/posts/default/8107318397223925768'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4746951324506260429/posts/default/8107318397223925768'/><link rel='alternate' type='text/html' href='http://emocias.blogspot.com/2012/05/environment-variables-on-oracle-11g.html' title='Environment variables on Oracle 11g Release 2'/><author><name>emocias</name><uri>http://www.blogger.com/profile/05285285831867688681</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://1.bp.blogspot.com/_INA6k_5WIIE/TOK9p4Ht3sI/AAAAAAAAAAQ/aNMCwPAqTsc/S220/vladstudio_xmasnight2_1600x900_love_baroque%255B1%255D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4746951324506260429.post-5928400555769771386</id><published>2012-05-25T16:15:00.002-04:00</published><updated>2012-05-25T16:44:36.426-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MFC"/><title type='text'>Using Key simulation in MFC</title><content type='html'>Sometimes, we need to send keys to another process when developing MFC application.&lt;br /&gt;
We called sending keys &quot;Key simulation&quot;&lt;br /&gt;
For this purpose, we can use the function &quot;SendInput&quot; as a function of MFC.&lt;br /&gt;
Here I will describe an example. So, see the function description.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have to get a window handle to send keys.&lt;br /&gt;
In MFC, there are several methods for this. Here I will use FindWindowEx method.&lt;br /&gt;
When finding the specific window handle, you can describe &quot;class name&quot; or &quot;Window title name&quot;&lt;br /&gt;
I think &quot;Window title name&quot; is more convenient.&lt;br /&gt;
&lt;br /&gt;
// Get window handle&lt;br /&gt;
&lt;br /&gt;
HWND hWindow = ::FindWindowEx(NULL, NULL, &quot;Class Name&quot;, 0);&lt;br /&gt;
or&lt;br /&gt;
HWND hWindow = ::FindWindowEx(NULL, NULL, 0, &quot;Window title name&quot;);
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
// Get thread and process id&lt;/div&gt;
&lt;br /&gt;
PROCESS_INFORMATION pi;&lt;br /&gt;
pi.dwThreadId = ::GetWindowThreadProcessId(hWindow, &amp;amp;(pi.dwThreadId));&lt;br /&gt;
&lt;br /&gt;
SendKey(WORD(&#39;A&#39;), MapVirtualKey(&#39;A&#39;,0), pi);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Refer two methods &#39;SendKey&#39; and &#39;SendCtrlShiftKey&#39;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
void SendKey(WORD vk, WORD scan, PROCESS_INFORMATION pi)&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;INPUT is;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;is.type = INPUT_KEYBOARD; &amp;nbsp;//INPUT_KEYBOARD = 1&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;is.ki.time = 0;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;is.ki.wVk = vk;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;is.ki.wScan = scan;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;is.ki.dwFlags = NULL;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;is.ki.dwExtraInfo = NULL;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;SendInput(1, &amp;amp;is, sizeof(INPUT)); // Key down&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;WaitForInputIdle( pi.hProcess, INFINITE );&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;is.ki.wVk = vk;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;is.ki.dwFlags = KEYEVENTF_KEYUP;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;is.ki.wScan = scan;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;is.type = INPUT_KEYBOARD;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;SendInput(1, &amp;amp;is, sizeof(INPUT)); // Key up&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;WaitForInputIdle( pi.hProcess, INFINITE );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
void SendCtrlShiftKey(WORD vk, PROCESS_INFORMATION pi)&lt;br /&gt;
{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;INPUT inp[6];&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;short Ecnt = 0x00;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// VK_CONTROL down.&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;inp[0].ki.time = NULL;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;inp[0].type = INPUT_KEYBOARD;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;inp[0].ki.dwExtraInfo = NULL;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;inp[0].ki.dwFlags = NULL;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;inp[0].ki.wVk = VK_CONTROL;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;inp[0].ki.wScan = MapVirtualKey(VK_CONTROL,0);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// VK_SHIFT down.&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;inp[1].ki.time = NULL;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;inp[1].type = INPUT_KEYBOARD;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;inp[1].ki.dwExtraInfo = NULL;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;inp[1].ki.dwFlags = NULL;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;inp[1].ki.wVk = VK_SHIFT;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;inp[1].ki.wScan = MapVirtualKey(VK_SHIFT,0);&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// Character Key down.&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;inp[2].ki.time = NULL;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;inp[2].type = INPUT_KEYBOARD;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;inp[2].ki.dwExtraInfo = NULL;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;inp[2].ki.dwFlags = NULL;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;inp[2].ki.wVk = vk;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;inp[2].ki.wScan = MapVirtualKey(vk,0);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// VK_CONTROL up.&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;inp[3].ki.time = NULL;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;inp[3].type = INPUT_KEYBOARD;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;inp[3].ki.dwExtraInfo = NULL;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;inp[3].ki.dwFlags = KEYEVENTF_KEYUP;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;inp[3].ki.wVk = VK_CONTROL;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;inp[3].ki.wScan = MapVirtualKey(VK_CONTROL,0);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// VK_SHIFT up.&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;inp[4].ki.time = NULL;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;inp[4].type = INPUT_KEYBOARD;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;inp[4].ki.dwExtraInfo = NULL;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;inp[4].ki.dwFlags = KEYEVENTF_KEYUP;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;inp[4].ki.wVk = VK_SHIFT;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;inp[4].ki.wScan = MapVirtualKey(VK_SHIFT,0);&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// Character Key up.&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;inp[5].ki.time = NULL;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;inp[5].type = INPUT_KEYBOARD;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;inp[5].ki.dwExtraInfo = NULL;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;inp[5].ki.dwFlags = KEYEVENTF_KEYUP;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;inp[5].ki.wVk = vk;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;inp[5].ki.wScan = MapVirtualKey(vk,0);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;SendInput(1,inp,sizeof(INPUT)); // VK_CONTROL down&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;WaitForInputIdle( pi.hProcess, INFINITE );&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;SendInput(1,&amp;amp;inp[1],sizeof(INPUT)); // VK_SHIFT down&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;WaitForInputIdle( pi.hProcess, INFINITE );&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;SendInput(1,&amp;amp;inp[2],sizeof(INPUT)); // Key down&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;WaitForInputIdle( pi.hProcess, INFINITE );&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;SendInput(1,&amp;amp;inp[5],sizeof(INPUT)); // Key up&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;WaitForInputIdle( pi.hProcess, INFINITE );&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;SendInput(1,&amp;amp;inp[4],sizeof(INPUT)); // VK_SHIFT up&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;WaitForInputIdle( pi.hProcess, INFINITE );&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;SendInput(1,&amp;amp;inp[3],sizeof(INPUT)); // VK_SHIFT up&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;WaitForInputIdle( pi.hProcess, INFINITE );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://emocias.blogspot.com/feeds/5928400555769771386/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4746951324506260429/5928400555769771386' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4746951324506260429/posts/default/5928400555769771386'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4746951324506260429/posts/default/5928400555769771386'/><link rel='alternate' type='text/html' href='http://emocias.blogspot.com/2012/05/using-key-simulation-in-mfc.html' title='Using Key simulation in MFC'/><author><name>emocias</name><uri>http://www.blogger.com/profile/05285285831867688681</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://1.bp.blogspot.com/_INA6k_5WIIE/TOK9p4Ht3sI/AAAAAAAAAAQ/aNMCwPAqTsc/S220/vladstudio_xmasnight2_1600x900_love_baroque%255B1%255D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4746951324506260429.post-884623966404674823</id><published>2012-05-25T15:55:00.000-04:00</published><updated>2012-05-25T15:55:54.557-04:00</updated><title type='text'>Cydia</title><content type='html'>[Cydia Source List]&lt;br /&gt;
&lt;br /&gt;
http://sinfuliphonerepo.com&lt;br /&gt;
http://cydia.hackulo.us&lt;br /&gt;
http://repo.hackyouriphone.org&lt;br /&gt;
http://repo.biteyourapple.net&lt;br /&gt;
http://cydia.xsellize.com&lt;br /&gt;
http://repo.insanelyi.com&lt;br /&gt;
&lt;br /&gt;
[Essential applications]&lt;br /&gt;
1. mobileterminal: change password [alpine]&lt;br /&gt;
2. OpenSSH&lt;br /&gt;
3. SBSetting&lt;br /&gt;
4. CyDelete&lt;br /&gt;
5. afc2add&lt;br /&gt;
6. Installous 4&lt;br /&gt;
7. AppSync 5.0+&lt;br /&gt;
8. iFile</content><link rel='replies' type='application/atom+xml' href='http://emocias.blogspot.com/feeds/884623966404674823/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4746951324506260429/884623966404674823' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4746951324506260429/posts/default/884623966404674823'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4746951324506260429/posts/default/884623966404674823'/><link rel='alternate' type='text/html' href='http://emocias.blogspot.com/2012/05/cydia.html' title='Cydia'/><author><name>emocias</name><uri>http://www.blogger.com/profile/05285285831867688681</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://1.bp.blogspot.com/_INA6k_5WIIE/TOK9p4Ht3sI/AAAAAAAAAAQ/aNMCwPAqTsc/S220/vladstudio_xmasnight2_1600x900_love_baroque%255B1%255D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4746951324506260429.post-910839600722992311</id><published>2011-10-11T18:28:00.000-04:00</published><updated>2011-10-11T18:28:58.544-04:00</updated><title type='text'>Restoring Grub2 from the booting cd-rom</title><content type='html'>In case of Debian Squeeze,&lt;br /&gt;
after going into the install steps, proceed until loading the device drivers.&lt;br /&gt;
Then, if pushed Ctrl+Alt+F2, you can get the command prompt.&lt;br /&gt;
&lt;br /&gt;
# fdisk -l&lt;br /&gt;
# mount -t ext4 /dev/XXX /chroot&lt;br /&gt;
# mount --bind /dev /chroot/dev&lt;br /&gt;
# mount -t sysfs none /chroot/sys&lt;br /&gt;
# mount -t proc none /chroot/proc&lt;br /&gt;
# chroot /chroot/&lt;br /&gt;
# grub-install /dev/XXX</content><link rel='replies' type='application/atom+xml' href='http://emocias.blogspot.com/feeds/910839600722992311/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4746951324506260429/910839600722992311' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4746951324506260429/posts/default/910839600722992311'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4746951324506260429/posts/default/910839600722992311'/><link rel='alternate' type='text/html' href='http://emocias.blogspot.com/2011/10/restoring-grub2-from-booting-cd-rom.html' title='Restoring Grub2 from the booting cd-rom'/><author><name>emocias</name><uri>http://www.blogger.com/profile/05285285831867688681</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://1.bp.blogspot.com/_INA6k_5WIIE/TOK9p4Ht3sI/AAAAAAAAAAQ/aNMCwPAqTsc/S220/vladstudio_xmasnight2_1600x900_love_baroque%255B1%255D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4746951324506260429.post-1240754120463719662</id><published>2011-10-11T09:37:00.000-04:00</published><updated>2012-05-25T16:44:46.445-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MFC"/><title type='text'>Single instance in MFC</title><content type='html'>Sometimes you want to make your application only with a single instance.&lt;br /&gt;
Unfortunately MFC don&#39;t provide any APIs. However, there is the simplest method by MUTEX.&lt;br /&gt;
&lt;br /&gt;
First, you create the globally unique identifier (GUID) to create MUTEX.&lt;br /&gt;
MFC provides creating GUID: Tools-Create GUID.&lt;br /&gt;
after creating it, just copy and paste in your code.&lt;br /&gt;
&lt;br /&gt;
The following code located in InitInstance() of MFC.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;CString stringGUID = L&quot;........&quot;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;HANDLE hMutex = CreateMutex(NULL, TRUE, stringGUID);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;if( GetLastError() == ERROR_ALREADY_EXISTS )&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; CloseHandle(hMutex);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; return FALSE;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;/blockquote&gt;</content><link rel='replies' type='application/atom+xml' href='http://emocias.blogspot.com/feeds/1240754120463719662/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4746951324506260429/1240754120463719662' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4746951324506260429/posts/default/1240754120463719662'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4746951324506260429/posts/default/1240754120463719662'/><link rel='alternate' type='text/html' href='http://emocias.blogspot.com/2011/10/single-instance-in-mfc.html' title='Single instance in MFC'/><author><name>emocias</name><uri>http://www.blogger.com/profile/05285285831867688681</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://1.bp.blogspot.com/_INA6k_5WIIE/TOK9p4Ht3sI/AAAAAAAAAAQ/aNMCwPAqTsc/S220/vladstudio_xmasnight2_1600x900_love_baroque%255B1%255D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4746951324506260429.post-6443753575392788259</id><published>2011-06-03T12:00:00.002-04:00</published><updated>2011-06-03T12:00:49.302-04:00</updated><title type='text'>libconfig - C/C++ Configuration File Library</title><content type='html'>Libconfig is a great library which can process configuration files base on structured format such as XML.&lt;br /&gt;
According to&lt;a href=&quot;http://www.hyperrealm.com/libconfig/&quot;&gt;http://www.hyperrealm.com/libconfig/&lt;/a&gt;, this file format is more compact and more readable than XML. Advantages are the follows:&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;type-aware: by parser, it is automatically bound to the appropriate type such as int, float, array, and string.&lt;/li&gt;
&lt;li&gt;support both the C and C++&lt;/li&gt;
&lt;li&gt;works on various operating systems: GNU/Linux, Mac OS X, Solaris, FreeBSD, and Windows (2000, XP, and later)&lt;/li&gt;
&lt;/ol&gt;&lt;br /&gt;
&lt;br /&gt;
I tested whether or not it works on Windows 7 and Visual studio 2005. The result is very successful.&lt;br /&gt;
Here is a sample configuration file.&lt;br /&gt;
&lt;blockquote&gt;&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;#----------------------------
# Example Configuration File
#---------------------------
#

application:
{

 /* This section defines some settings for our
  * main application window, such as size and
  * position.
  */

  window:
  {
    title = &quot;My Application&quot;;
    size = { /* width */ w = 640; /* height */ h = 480; };
    pos = { x = 350; y = 250; };
  };

  a = 5;
  b = 6;
  ff = 1E6;
  test-comment = &quot;/* hello\n \&quot;there\&quot;*/&quot;;

  test-long-string = &quot;A very long string that spans multiple lines. &quot;
  /* but wait, there&#39;s more... */ &quot;Adjacent strings are automatically&quot;
  &quot; concatenated.&quot;;

  test-escaped-string = &quot;\&quot;This is\n a test.\&quot;&quot;;

  group1:
  {
    x = 5;  y = 10;
    my_array = [ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22 ];
    flag = TRUE;

    group2: { zzz = &quot;this is a test&quot;; };

    states = [ &quot;CT&quot;, // Connecticut
  &quot;CA&quot;, // California
  &quot;TX&quot;, // Texas
  &quot;NV&quot;, // Nevada
  &quot;FL&quot;  // Florida
    ];
  };

  /* this would cause an error */
  // a = &quot;hi!&quot;;
};

binary = [ 0xAA, 0xBB, 0xCC ];

list = ( ( &quot;abc&quot;, 123, true ), 1.234, ( /* an empty list */ ) ,[ 1, 2, 3 ],
    { a = (1, 2, true); } );

books = ( &quot;inventory&quot;,
          { title  = &quot;Treasure Island&quot;;
            author = &quot;Robert Louis Stevenson&quot;;
            price  = 29.99;
            qty    = 5; },
          { title  = &quot;Snow Crash&quot;;
            author = &quot;Neal Stephenson&quot;;
            price  = 9.99;
            qty    = 8; },
          { } );

# miscellaneous stuff

misc:
{
  port = 5000;
  pi = 3.14159265;
  enabled = FALSE;
  mask = 0xAABBCCDD;
  unicode = &quot;STARGÎ›ÌŠTE SG-1&quot;; // UTF-8 string
  bigint = 9223372036854775807L;
  bighex = 0x1122334455667788L;
};


### eof&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;
As shown in the sample configuration above, this is so very powerful&amp;nbsp;that I love the libconfig library.&lt;br /&gt;
Finally, I provide a sample code to read a configuration file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;pre style=&quot;background-color: #eeeeee; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0.75em; padding-left: 1.5em; padding-right: 1.5em; padding-top: 0.75em;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;#include &amp;lt;iostream&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;#include &amp;lt;iomanip&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;#include &amp;lt;cstdlib&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;#include &amp;lt;libconfig.h++&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;using namespace std;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;using namespace libconfig;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;// This example reads the configuration file &#39;example.cfg&#39; and displays&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;// some of its contents.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;int main(int argc, char **argv)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; Config cfg;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; // Read the file. If there is an error, report it and exit.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; try&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; cfg.readFile(&quot;example.cfg&quot;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; catch(const FileIOException &amp;amp;fioex)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; std::cerr &amp;lt;&amp;lt; &quot;I/O error while reading file.&quot; &amp;lt;&amp;lt; std::endl;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; return(EXIT_FAILURE);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; catch(const ParseException &amp;amp;pex)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; std::cerr &amp;lt;&amp;lt; &quot;Parse error at &quot; &amp;lt;&amp;lt; pex.getFile() &amp;lt;&amp;lt; &quot;:&quot; &amp;lt;&amp;lt; pex.getLine()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&amp;lt; &quot; - &quot; &amp;lt;&amp;lt; pex.getError() &amp;lt;&amp;lt; std::endl;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; return(EXIT_FAILURE);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; // Get the store name.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; try&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; string name = cfg.lookup(&quot;name&quot;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; cout &amp;lt;&amp;lt; &quot;Store name: &quot; &amp;lt;&amp;lt; name &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; endl;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; catch(const SettingNotFoundException &amp;amp;nfex)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; cerr &amp;lt;&amp;lt; &quot;No &#39;name&#39; setting in configuration file.&quot; &amp;lt;&amp;lt; endl;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; const Setting&amp;amp; root = cfg.getRoot();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; // Output a list of all books in the inventory.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; try&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; const Setting &amp;amp;books = root[&quot;inventory&quot;][&quot;books&quot;];&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; int count = books.getLength();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; cout &amp;lt;&amp;lt; setw(30) &amp;lt;&amp;lt; left &amp;lt;&amp;lt; &quot;TITLE&quot; &amp;lt;&amp;lt; &quot; &amp;nbsp;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;&amp;lt; setw(30) &amp;lt;&amp;lt; left &amp;lt;&amp;lt; &quot;AUTHOR&quot; &amp;lt;&amp;lt; &quot; &amp;nbsp; &quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;&amp;lt; setw(6) &amp;lt;&amp;lt; left &amp;lt;&amp;lt; &quot;PRICE&quot; &amp;lt;&amp;lt; &quot; &amp;nbsp;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;&amp;lt; &quot;QTY&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;&amp;lt; endl;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; for(int i = 0; i &amp;lt; count; ++i)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; const Setting &amp;amp;book = books[i];&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; // Only output the record if all of the expected fields are present.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; string title, author;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; double price;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; int qty;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; if(!(book.lookupValue(&quot;title&quot;, title)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;amp;&amp;amp; book.lookupValue(&quot;author&quot;, author)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;amp;&amp;amp; book.lookupValue(&quot;price&quot;, price)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;amp;&amp;amp; book.lookupValue(&quot;qty&quot;, qty)))&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; continue;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; cout &amp;lt;&amp;lt; setw(30) &amp;lt;&amp;lt; left &amp;lt;&amp;lt; title &amp;lt;&amp;lt; &quot; &amp;nbsp;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;&amp;lt; setw(30) &amp;lt;&amp;lt; left &amp;lt;&amp;lt; author &amp;lt;&amp;lt; &quot; &amp;nbsp;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;&amp;lt; &#39;$&#39; &amp;lt;&amp;lt; setw(6) &amp;lt;&amp;lt; right &amp;lt;&amp;lt; price &amp;lt;&amp;lt; &quot; &amp;nbsp;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;&amp;lt; qty&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;&amp;lt; endl;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; cout &amp;lt;&amp;lt; endl;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; catch(const SettingNotFoundException &amp;amp;nfex)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; // Ignore.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; // Output a list of all books in the inventory.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; try&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; const Setting &amp;amp;movies = root[&quot;inventory&quot;][&quot;movies&quot;];&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; int count = movies.getLength();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; cout &amp;lt;&amp;lt; setw(30) &amp;lt;&amp;lt; left &amp;lt;&amp;lt; &quot;TITLE&quot; &amp;lt;&amp;lt; &quot; &amp;nbsp;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;&amp;lt; setw(10) &amp;lt;&amp;lt; left &amp;lt;&amp;lt; &quot;MEDIA&quot; &amp;lt;&amp;lt; &quot; &amp;nbsp; &quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;&amp;lt; setw(6) &amp;lt;&amp;lt; left &amp;lt;&amp;lt; &quot;PRICE&quot; &amp;lt;&amp;lt; &quot; &amp;nbsp;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;&amp;lt; &quot;QTY&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;&amp;lt; endl;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; for(int i = 0; i &amp;lt; count; ++i)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; const Setting &amp;amp;movie = movies[i];&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; // Only output the record if all of the expected fields are present.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; string title, media;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; double price;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; int qty;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; if(!(movie.lookupValue(&quot;title&quot;, title)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;amp;&amp;amp; movie.lookupValue(&quot;media&quot;, media)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;amp;&amp;amp; movie.lookupValue(&quot;price&quot;, price)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;amp;&amp;amp; movie.lookupValue(&quot;qty&quot;, qty)))&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; continue;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; cout &amp;lt;&amp;lt; setw(30) &amp;lt;&amp;lt; left &amp;lt;&amp;lt; title &amp;lt;&amp;lt; &quot; &amp;nbsp;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;&amp;lt; setw(10) &amp;lt;&amp;lt; left &amp;lt;&amp;lt; media &amp;lt;&amp;lt; &quot; &amp;nbsp;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;&amp;lt; &#39;$&#39; &amp;lt;&amp;lt; setw(6) &amp;lt;&amp;lt; right &amp;lt;&amp;lt; price &amp;lt;&amp;lt; &quot; &amp;nbsp;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;&amp;lt; qty&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;&amp;lt; endl;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; cout &amp;lt;&amp;lt; endl;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; catch(const SettingNotFoundException &amp;amp;nfex)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; // Ignore.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; return(EXIT_SUCCESS);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://emocias.blogspot.com/feeds/6443753575392788259/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4746951324506260429/6443753575392788259' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4746951324506260429/posts/default/6443753575392788259'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4746951324506260429/posts/default/6443753575392788259'/><link rel='alternate' type='text/html' href='http://emocias.blogspot.com/2011/06/libconfig-cc-configuration-file-library.html' title='libconfig - C/C++ Configuration File Library'/><author><name>emocias</name><uri>http://www.blogger.com/profile/05285285831867688681</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://1.bp.blogspot.com/_INA6k_5WIIE/TOK9p4Ht3sI/AAAAAAAAAAQ/aNMCwPAqTsc/S220/vladstudio_xmasnight2_1600x900_love_baroque%255B1%255D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4746951324506260429.post-1686578031424659502</id><published>2011-06-03T11:46:00.001-04:00</published><updated>2011-11-23T19:18:03.090-05:00</updated><title type='text'>libconfig - C/C++ Configuration File Library</title><content type='html'>Libconfig is a great library which can process configuration files base on structured format such as XML.&lt;br /&gt;
According to&lt;a href=&quot;http://www.hyperrealm.com/libconfig/&quot;&gt;http://www.hyperrealm.com/libconfig/&lt;/a&gt;, this file format is more compact and more readable than XML. Advantages are the follows:&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;type-aware: by parser, it is automatically bound to the appropriate type such as int, float, array, and string.&lt;/li&gt;
&lt;li&gt;support both the C and C++&lt;/li&gt;
&lt;li&gt;works on various operating systems: GNU/Linux, Mac OS X, Solaris, FreeBSD, and Windows (2000, XP, and later)&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;br /&gt;
I tested whether or not it works on Windows 7 and Visual studio 2005. The result is very successful.&lt;br /&gt;
Here is a sample configuration file.&lt;br /&gt;
&lt;blockquote&gt;
&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;#----------------------------
# Example Configuration File
#---------------------------
#

application:
{

 /* This section defines some settings for our
  * main application window, such as size and
  * position.
  */

  window:
  {
    title = &quot;My Application&quot;;
    size = { /* width */ w = 640; /* height */ h = 480; };
    pos = { x = 350; y = 250; };
  };

  a = 5;
  b = 6;
  ff = 1E6;
  test-comment = &quot;/* hello\n \&quot;there\&quot;*/&quot;;

  test-long-string = &quot;A very long string that spans multiple lines. &quot;
  /* but wait, there&#39;s more... */ &quot;Adjacent strings are automatically&quot;
  &quot; concatenated.&quot;;

  test-escaped-string = &quot;\&quot;This is\n a test.\&quot;&quot;;

  group1:
  {
    x = 5;  y = 10;
    my_array = [ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22 ];
    flag = TRUE;

    group2: { zzz = &quot;this is a test&quot;; };

    states = [ &quot;CT&quot;, // Connecticut
  &quot;CA&quot;, // California
  &quot;TX&quot;, // Texas
  &quot;NV&quot;, // Nevada
  &quot;FL&quot;  // Florida
    ];
  };

  /* this would cause an error */
  // a = &quot;hi!&quot;;
};

binary = [ 0xAA, 0xBB, 0xCC ];

list = ( ( &quot;abc&quot;, 123, true ), 1.234, ( /* an empty list */ ) ,[ 1, 2, 3 ],
    { a = (1, 2, true); } );

books = ( &quot;inventory&quot;,
          { title  = &quot;Treasure Island&quot;;
            author = &quot;Robert Louis Stevenson&quot;;
            price  = 29.99;
            qty    = 5; },
          { title  = &quot;Snow Crash&quot;;
            author = &quot;Neal Stephenson&quot;;
            price  = 9.99;
            qty    = 8; },
          { } );

# miscellaneous stuff

misc:
{
  port = 5000;
  pi = 3.14159265;
  enabled = FALSE;
  mask = 0xAABBCCDD;
  unicode = &quot;STARGÎ›ÌŠTE SG-1&quot;; // UTF-8 string
  bigint = 9223372036854775807L;
  bighex = 0x1122334455667788L;
};


### eof&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;br /&gt;
As shown in the sample configuration above, this is so very powerful&amp;nbsp;that I love the libconfig library.&lt;br /&gt;
Finally, I provide a sample code to read a configuration file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;pre style=&quot;background-color: #eeeeee; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0.75em; padding-left: 1.5em; padding-right: 1.5em; padding-top: 0.75em;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;#include &amp;lt;iostream&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;#include &amp;lt;iomanip&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;#include &amp;lt;cstdlib&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;#include &amp;lt;libconfig.h++&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;using namespace std;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;using namespace libconfig;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;// This example reads the configuration file &#39;example.cfg&#39; and displays&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;// some of its contents.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;int main(int argc, char **argv)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; Config cfg;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; // Read the file. If there is an error, report it and exit.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; try&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; cfg.readFile(&quot;example.cfg&quot;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; catch(const FileIOException &amp;amp;fioex)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; std::cerr &amp;lt;&amp;lt; &quot;I/O error while reading file.&quot; &amp;lt;&amp;lt; std::endl;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; return(EXIT_FAILURE);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; catch(const ParseException &amp;amp;pex)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; std::cerr &amp;lt;&amp;lt; &quot;Parse error at &quot; &amp;lt;&amp;lt; pex.getFile() &amp;lt;&amp;lt; &quot;:&quot; &amp;lt;&amp;lt; pex.getLine()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&amp;lt; &quot; - &quot; &amp;lt;&amp;lt; pex.getError() &amp;lt;&amp;lt; std::endl;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; return(EXIT_FAILURE);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; // Get the store name.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; try&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; string name = cfg.lookup(&quot;name&quot;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; cout &amp;lt;&amp;lt; &quot;Store name: &quot; &amp;lt;&amp;lt; name &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; endl;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; catch(const SettingNotFoundException &amp;amp;nfex)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; cerr &amp;lt;&amp;lt; &quot;No &#39;name&#39; setting in configuration file.&quot; &amp;lt;&amp;lt; endl;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; const Setting&amp;amp; root = cfg.getRoot();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; // Output a list of all books in the inventory.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; try&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; const Setting &amp;amp;books = root[&quot;inventory&quot;][&quot;books&quot;];&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; int count = books.getLength();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; cout &amp;lt;&amp;lt; setw(30) &amp;lt;&amp;lt; left &amp;lt;&amp;lt; &quot;TITLE&quot; &amp;lt;&amp;lt; &quot; &amp;nbsp;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;&amp;lt; setw(30) &amp;lt;&amp;lt; left &amp;lt;&amp;lt; &quot;AUTHOR&quot; &amp;lt;&amp;lt; &quot; &amp;nbsp; &quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;&amp;lt; setw(6) &amp;lt;&amp;lt; left &amp;lt;&amp;lt; &quot;PRICE&quot; &amp;lt;&amp;lt; &quot; &amp;nbsp;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;&amp;lt; &quot;QTY&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;&amp;lt; endl;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; for(int i = 0; i &amp;lt; count; ++i)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; const Setting &amp;amp;book = books[i];&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; // Only output the record if all of the expected fields are present.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; string title, author;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; double price;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; int qty;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; if(!(book.lookupValue(&quot;title&quot;, title)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;amp;&amp;amp; book.lookupValue(&quot;author&quot;, author)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;amp;&amp;amp; book.lookupValue(&quot;price&quot;, price)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;amp;&amp;amp; book.lookupValue(&quot;qty&quot;, qty)))&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; continue;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; cout &amp;lt;&amp;lt; setw(30) &amp;lt;&amp;lt; left &amp;lt;&amp;lt; title &amp;lt;&amp;lt; &quot; &amp;nbsp;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;&amp;lt; setw(30) &amp;lt;&amp;lt; left &amp;lt;&amp;lt; author &amp;lt;&amp;lt; &quot; &amp;nbsp;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;&amp;lt; &#39;$&#39; &amp;lt;&amp;lt; setw(6) &amp;lt;&amp;lt; right &amp;lt;&amp;lt; price &amp;lt;&amp;lt; &quot; &amp;nbsp;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;&amp;lt; qty&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;&amp;lt; endl;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; cout &amp;lt;&amp;lt; endl;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; catch(const SettingNotFoundException &amp;amp;nfex)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; // Ignore.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; // Output a list of all books in the inventory.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; try&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; const Setting &amp;amp;movies = root[&quot;inventory&quot;][&quot;movies&quot;];&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; int count = movies.getLength();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; cout &amp;lt;&amp;lt; setw(30) &amp;lt;&amp;lt; left &amp;lt;&amp;lt; &quot;TITLE&quot; &amp;lt;&amp;lt; &quot; &amp;nbsp;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;&amp;lt; setw(10) &amp;lt;&amp;lt; left &amp;lt;&amp;lt; &quot;MEDIA&quot; &amp;lt;&amp;lt; &quot; &amp;nbsp; &quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;&amp;lt; setw(6) &amp;lt;&amp;lt; left &amp;lt;&amp;lt; &quot;PRICE&quot; &amp;lt;&amp;lt; &quot; &amp;nbsp;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;&amp;lt; &quot;QTY&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;&amp;lt; endl;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; for(int i = 0; i &amp;lt; count; ++i)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; const Setting &amp;amp;movie = movies[i];&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; // Only output the record if all of the expected fields are present.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; string title, media;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; double price;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; int qty;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; if(!(movie.lookupValue(&quot;title&quot;, title)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;amp;&amp;amp; movie.lookupValue(&quot;media&quot;, media)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;amp;&amp;amp; movie.lookupValue(&quot;price&quot;, price)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;amp;&amp;amp; movie.lookupValue(&quot;qty&quot;, qty)))&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; continue;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; cout &amp;lt;&amp;lt; setw(30) &amp;lt;&amp;lt; left &amp;lt;&amp;lt; title &amp;lt;&amp;lt; &quot; &amp;nbsp;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;&amp;lt; setw(10) &amp;lt;&amp;lt; left &amp;lt;&amp;lt; media &amp;lt;&amp;lt; &quot; &amp;nbsp;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;&amp;lt; &#39;$&#39; &amp;lt;&amp;lt; setw(6) &amp;lt;&amp;lt; right &amp;lt;&amp;lt; price &amp;lt;&amp;lt; &quot; &amp;nbsp;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;&amp;lt; qty&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;&amp;lt; endl;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; cout &amp;lt;&amp;lt; endl;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; catch(const SettingNotFoundException &amp;amp;nfex)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; // Ignore.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp; return(EXIT_SUCCESS);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://emocias.blogspot.com/feeds/1686578031424659502/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4746951324506260429/1686578031424659502' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4746951324506260429/posts/default/1686578031424659502'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4746951324506260429/posts/default/1686578031424659502'/><link rel='alternate' type='text/html' href='http://emocias.blogspot.com/2011/06/libconfig-cc-configuration-file-library_03.html' title='libconfig - C/C++ Configuration File Library'/><author><name>emocias</name><uri>http://www.blogger.com/profile/05285285831867688681</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://1.bp.blogspot.com/_INA6k_5WIIE/TOK9p4Ht3sI/AAAAAAAAAAQ/aNMCwPAqTsc/S220/vladstudio_xmasnight2_1600x900_love_baroque%255B1%255D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4746951324506260429.post-670956143423860136</id><published>2011-06-02T08:58:00.001-04:00</published><updated>2011-06-02T09:00:19.521-04:00</updated><title type='text'>Windows 8: Building Video</title><content type='html'>Microsoft revealed a new operating system, windows 8.&lt;br /&gt;
The below movie shows the working by Touch Screen.&lt;br /&gt;
Maybe, it is optimized for Tablet PC.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;349&quot; src=&quot;http://www.youtube.com/embed/p92QfWOw88I&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;</content><link rel='replies' type='application/atom+xml' href='http://emocias.blogspot.com/feeds/670956143423860136/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4746951324506260429/670956143423860136' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4746951324506260429/posts/default/670956143423860136'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4746951324506260429/posts/default/670956143423860136'/><link rel='alternate' type='text/html' href='http://emocias.blogspot.com/2011/06/windows-8-building-video.html' title='Windows 8: Building Video'/><author><name>emocias</name><uri>http://www.blogger.com/profile/05285285831867688681</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://1.bp.blogspot.com/_INA6k_5WIIE/TOK9p4Ht3sI/AAAAAAAAAAQ/aNMCwPAqTsc/S220/vladstudio_xmasnight2_1600x900_love_baroque%255B1%255D.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/p92QfWOw88I/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4746951324506260429.post-3651758927532429618</id><published>2011-06-01T20:02:00.000-04:00</published><updated>2011-06-01T20:02:43.711-04:00</updated><title type='text'>Automatically Scheduling of SyncToy</title><content type='html'>SyncToy doesn&#39;t have the feature to allow user to schedule folders to run synchronization process.&lt;br /&gt;
But, we can use Task Scheduler of Windows 7.&lt;br /&gt;
&lt;br /&gt;
[Procedure]&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Click Task Scheduler, Location: Start menu - All Programs - Accessories - System Tools - Task Scheduler&lt;/li&gt;
&lt;li&gt;Click Create Basic Task in the Actions&lt;/li&gt;
&lt;li&gt;Type in a Name and Description&lt;/li&gt;
&lt;li&gt;Click Next button&lt;/li&gt;
&lt;li&gt;Select the frequency of when you want the task to start&lt;/li&gt;
&lt;li&gt;Click Next button&lt;/li&gt;
&lt;li&gt;Input date and times&lt;/li&gt;
&lt;li&gt;Click Next button&lt;/li&gt;
&lt;li&gt;Select Start a program&lt;/li&gt;
&lt;li&gt;Click Next button&lt;/li&gt;
&lt;li&gt;In Program/script, Locate the SyncToyCmd.exe&lt;/li&gt;
&lt;li&gt;In Add arguments, Type -R which run all folder pairs that are active for run all. If you want to run just a single folder pair, add -R&quot;Folder pair name&quot; to the end of the command line&lt;/li&gt;
&lt;li&gt;Click Next button&lt;/li&gt;
&lt;/ol&gt;</content><link rel='replies' type='application/atom+xml' href='http://emocias.blogspot.com/feeds/3651758927532429618/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4746951324506260429/3651758927532429618' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4746951324506260429/posts/default/3651758927532429618'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4746951324506260429/posts/default/3651758927532429618'/><link rel='alternate' type='text/html' href='http://emocias.blogspot.com/2011/06/automatically-scheduling-of-synctoy.html' title='Automatically Scheduling of SyncToy'/><author><name>emocias</name><uri>http://www.blogger.com/profile/05285285831867688681</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://1.bp.blogspot.com/_INA6k_5WIIE/TOK9p4Ht3sI/AAAAAAAAAAQ/aNMCwPAqTsc/S220/vladstudio_xmasnight2_1600x900_love_baroque%255B1%255D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4746951324506260429.post-2039504348066709672</id><published>2011-06-01T10:41:00.003-04:00</published><updated>2011-06-01T10:52:43.628-04:00</updated><title type='text'>log4cplus - Logging library to C++ such as log4j</title><content type='html'>log4cplus is the excellent logging library to C++ such as log4j.&lt;br /&gt;
You can see at log4cplus.sourceforge.net.&lt;br /&gt;
Current version is 1.0.4, released on January 2011.&lt;br /&gt;
&lt;br /&gt;
I tested this library on Visual studio 2005.&lt;br /&gt;
It is based on Win32 platform, so you can easily build it.&lt;br /&gt;
The following example is to save logging information into a specified log file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;lt;Code Example&amp;gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #535353; font-family: sans-serif, Arial, Verdana, Helvetica; font-size: 13px; line-height: 16px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;background-color: #eeeeee; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; clear: both; color: #666666; font-style: normal; font-weight: normal; line-height: 1.1em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.75em; padding-left: 1.5em; padding-right: 1.5em; padding-top: 0.75em;&quot;&gt;&lt;div style=&quot;color: black; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; white-space: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;#include &amp;lt;log4cplus/logger.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; white-space: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;#include &amp;lt;log4cplus/configurator.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; white-space: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;#include &amp;lt;log4cplus/fileappender.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; white-space: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; white-space: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;using namespace log4cplus;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; white-space: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; white-space: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;int main()&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; white-space: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; white-space: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; SharedAppenderPtr myAppender(new FileAppender(&quot;LogFile.log&quot;));&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; white-space: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; BasicConfigurator config;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; white-space: normal;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;color: black; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; white-space: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; config.configure();&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; white-space: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; white-space: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; logger = Logger::getInstance(&quot;main&quot;);&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; white-space: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; logger.addAppender(myAppender);&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; white-space: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; logger.setLogLevel(ALL_LOG_LEVEL);&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; white-space: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; white-space: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; LOG4CPLUS_WARN(logger, &quot;Warning Test&quot;);&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; white-space: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; white-space: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; return 0;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; white-space: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://emocias.blogspot.com/feeds/2039504348066709672/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4746951324506260429/2039504348066709672' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4746951324506260429/posts/default/2039504348066709672'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4746951324506260429/posts/default/2039504348066709672'/><link rel='alternate' type='text/html' href='http://emocias.blogspot.com/2011/06/log4cplus-logging-library-to-c-such-as.html' title='log4cplus - Logging library to C++ such as log4j'/><author><name>emocias</name><uri>http://www.blogger.com/profile/05285285831867688681</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://1.bp.blogspot.com/_INA6k_5WIIE/TOK9p4Ht3sI/AAAAAAAAAAQ/aNMCwPAqTsc/S220/vladstudio_xmasnight2_1600x900_love_baroque%255B1%255D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4746951324506260429.post-930048891651449953</id><published>2011-06-01T09:54:00.000-04:00</published><updated>2011-06-01T09:54:24.273-04:00</updated><title type='text'>Centos - Sudoers file</title><content type='html'>In Centos, to use the command &quot;sudo&quot;, you add a user information to /etc/sudoers.&lt;br /&gt;
&lt;br /&gt;
For example, Basically root is &quot;root ALL=(ALL) ALL&quot;&lt;br /&gt;
&lt;br /&gt;
You can modify this file for new sudo user.&lt;br /&gt;
username ALL=(ALL)ALL</content><link rel='replies' type='application/atom+xml' href='http://emocias.blogspot.com/feeds/930048891651449953/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4746951324506260429/930048891651449953' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4746951324506260429/posts/default/930048891651449953'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4746951324506260429/posts/default/930048891651449953'/><link rel='alternate' type='text/html' href='http://emocias.blogspot.com/2011/06/centos-sudoers-file.html' title='Centos - Sudoers file'/><author><name>emocias</name><uri>http://www.blogger.com/profile/05285285831867688681</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://1.bp.blogspot.com/_INA6k_5WIIE/TOK9p4Ht3sI/AAAAAAAAAAQ/aNMCwPAqTsc/S220/vladstudio_xmasnight2_1600x900_love_baroque%255B1%255D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4746951324506260429.post-5985091829191594174</id><published>2011-05-23T11:05:00.001-04:00</published><updated>2011-05-23T11:46:31.708-04:00</updated><title type='text'>Noise Generation</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 32px; font-weight: bold;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;reference:&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 32px; font-weight: bold;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 32px; font-weight: bold;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small; font-weight: normal;&quot;&gt;&lt;a href=&quot;http://homepages.inf.ed.ac.uk/rbf/HIPR2/noise.htm&quot;&gt;http://homepages.inf.ed.ac.uk/rbf/HIPR2/noise.htm&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h1&gt;Noise Generation&lt;/h1&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;center&gt;&lt;img align=&quot;middle&quot; alt=&quot;&quot; src=&quot;http://homepages.inf.ed.ac.uk/rbf/HIPR2/noisbig.gif&quot; /&gt;&lt;br /&gt;
&lt;strong&gt;Common Names:&lt;/strong&gt;&amp;nbsp;Noise Generation&lt;/center&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;Brief Description&lt;/h2&gt;Real world signals usually contain departures from the ideal signal that would be produced by our model of the signal production process. Such departures are referred to as&amp;nbsp;&lt;em&gt;noise&lt;/em&gt;. Noise arises as a result of unmodelled or unmodellable processes going on in the production and capture of the real signal. It is not part of the ideal signal and may be caused by a wide range of sources,&amp;nbsp;&lt;em&gt;e.g.&lt;/em&gt;&amp;nbsp;variations in the detector sensitivity, environmental variations, the discrete nature of radiation, transmission or quantization errors,&amp;nbsp;&lt;em&gt;etc.&lt;/em&gt;&amp;nbsp;It is also possible to treat irrelevant scene details as if they are image noise (&lt;em&gt;e.g.&lt;/em&gt;&amp;nbsp;surface reflectance textures). The characteristics of noise depend on its source, as does the operator which best reduces its effects.&lt;br /&gt;
Many image processing packages contain operators to artificially add noise to an image. Deliberately corrupting an image with noise allows us to test the resistance of an image processing operator to noise and assess the performance of various noise filters.&lt;br /&gt;
&lt;a href=&quot;http://www.blogger.com/post-create.g?blogID=4746951324506260429&quot; name=&quot;how&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;http://homepages.inf.ed.ac.uk/rbf/HIPR2/mote.gif&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h2&gt;How It Works&lt;/h2&gt;Noise can generally be grouped into two classes:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;independent noise.&lt;/li&gt;
&lt;li&gt;noise which is dependent on the image data.&lt;/li&gt;
&lt;/ul&gt;&lt;em&gt;Image independent noise&lt;/em&gt;&amp;nbsp;can often be described by an additive noise model, where the recorded image&amp;nbsp;&lt;em&gt;f(i,j)&lt;/em&gt;&amp;nbsp;is the sum of the&amp;nbsp;&lt;em&gt;true&lt;/em&gt;&amp;nbsp;image&amp;nbsp;&lt;em&gt;s(i,j)&lt;/em&gt;&amp;nbsp;and the noise&amp;nbsp;&lt;em&gt;n(i,j)&lt;/em&gt;:&lt;br /&gt;
&lt;blockquote&gt;&lt;img align=&quot;bottom&quot; alt=&quot;Eqn:eqnnois1&quot; src=&quot;http://homepages.inf.ed.ac.uk/rbf/HIPR2/eqns/eqnnois1.gif&quot; /&gt;&lt;/blockquote&gt;The noise&amp;nbsp;&lt;em&gt;n(i,j)&lt;/em&gt;&amp;nbsp;is often&amp;nbsp;&lt;em&gt;zero-mean&lt;/em&gt;&amp;nbsp;and described by its variance&amp;nbsp;&lt;img align=&quot;middle&quot; alt=&quot;Eqn:eqnnois2&quot; src=&quot;http://homepages.inf.ed.ac.uk/rbf/HIPR2/eqns/eqnnois2.gif&quot; /&gt;. The impact of the noise on the image is often described by the&amp;nbsp;&lt;em&gt;signal to noise ratio&lt;/em&gt;&amp;nbsp;(SNR), which is given by&lt;br /&gt;
&lt;blockquote&gt;&lt;img align=&quot;bottom&quot; alt=&quot;Eqn:eqnnois3&quot; src=&quot;http://homepages.inf.ed.ac.uk/rbf/HIPR2/eqns/eqnnois3.gif&quot; /&gt;&lt;/blockquote&gt;where&amp;nbsp;&lt;img align=&quot;middle&quot; alt=&quot;Eqn:eqnnois4&quot; src=&quot;http://homepages.inf.ed.ac.uk/rbf/HIPR2/eqns/eqnnois4.gif&quot; /&gt;&amp;nbsp;and&amp;nbsp;&lt;img align=&quot;middle&quot; alt=&quot;Eqn:eqnnois5&quot; src=&quot;http://homepages.inf.ed.ac.uk/rbf/HIPR2/eqns/eqnnois5.gif&quot; /&gt;&amp;nbsp;are the variances of the true image and the recorded image, respectively.In many cases, additive noise is evenly distributed over the&amp;nbsp;&lt;a href=&quot;http://homepages.inf.ed.ac.uk/rbf/HIPR2/fourier.htm&quot;&gt;frequency domain&lt;/a&gt;&amp;nbsp;(&lt;em&gt;i.e.&lt;/em&gt;&amp;nbsp;&lt;em&gt;white noise&lt;/em&gt;), whereas an image contains mostly low frequency information. Hence, the noise is dominant for high frequencies and its effects can be reduced using some kind of lowpass filter. This can be done either with a&amp;nbsp;&lt;a href=&quot;http://homepages.inf.ed.ac.uk/rbf/HIPR2/freqfilt.htm&quot;&gt;frequency filter&lt;/a&gt;&amp;nbsp;or with a&amp;nbsp;&lt;a href=&quot;http://homepages.inf.ed.ac.uk/rbf/HIPR2/filtops.htm&quot;&gt;spatial filter&lt;/a&gt;. (Often a spatial filter is preferable, as it is computationally less expensive than a frequency filter.)&lt;br /&gt;
&lt;a href=&quot;http://www.blogger.com/post-create.g?blogID=4746951324506260429&quot; name=&quot;2&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;http://homepages.inf.ed.ac.uk/rbf/HIPR2/mote.gif&quot; /&gt;&lt;/a&gt;In the second case of&amp;nbsp;&lt;em&gt;data-dependent noise&lt;/em&gt;&amp;nbsp;(&lt;em&gt;e.g.&lt;/em&gt;&amp;nbsp;arising when monochromatic radiation is scattered from a surface whose roughness is of the order of a wavelength, causing wave interference which results in image&amp;nbsp;&lt;em&gt;speckle&lt;/em&gt;), it is possible to model noise with a multiplicative, or non-linear, model. These models are mathematically more complicated; hence, if possible, the noise is assumed to be data independent.&lt;br /&gt;
&lt;a href=&quot;http://www.blogger.com/post-create.g?blogID=4746951324506260429&quot; name=&quot;3&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;http://homepages.inf.ed.ac.uk/rbf/HIPR2/mote.gif&quot; /&gt;&lt;/a&gt;&lt;em&gt;Detector Noise&lt;/em&gt;&lt;br /&gt;
One kind of noise which occurs in all recorded images to a certain extent is&amp;nbsp;&lt;em&gt;detector noise&lt;/em&gt;. This kind of noise is due to the discrete nature of radiation,&amp;nbsp;&lt;em&gt;i.e.&lt;/em&gt;&amp;nbsp;the fact that each imaging system is recording an image by counting photons. Allowing some assumptions (which are valid for many applications) this noise can be modeled with an independent, additive model, where the noise&amp;nbsp;&lt;em&gt;n(i,j)&lt;/em&gt;&amp;nbsp;has a zero-mean Gaussian distribution described by its standard deviation (&lt;img align=&quot;middle&quot; alt=&quot;Eqn:eqnsigma&quot; src=&quot;http://homepages.inf.ed.ac.uk/rbf/HIPR2/eqns/eqnsigma.gif&quot; /&gt;), or variance. (The 1-D Gaussian distribution has the form shown in Figure 1.) This means that each pixel in the noisy image is the sum of the true pixel value and a random, Gaussian distributed noise value.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;center&gt;&lt;img alt=&quot;&quot; src=&quot;http://homepages.inf.ed.ac.uk/rbf/HIPR2/figs/gauss1.gif&quot; /&gt;&lt;/center&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Figure 1&lt;/strong&gt;&amp;nbsp;1-D Gaussian distribution with mean 0 and standard deviation 1&lt;/blockquote&gt;&lt;br /&gt;
&lt;em&gt;Salt and Pepper Noise&lt;/em&gt;&lt;br /&gt;
Another common form of noise is&amp;nbsp;&lt;em&gt;data drop-out&lt;/em&gt;&amp;nbsp;noise (commonly referred to as&amp;nbsp;&lt;em&gt;intensity spikes&lt;/em&gt;,&amp;nbsp;&lt;em&gt;speckle&lt;/em&gt;&amp;nbsp;or&amp;nbsp;&lt;em&gt;salt and pepper noise&lt;/em&gt;). Here, the noise is caused by errors in the data transmission. The corrupted pixels are either set to the maximum value (which looks like snow in the image) or have single bits flipped over. In some cases, single pixels are set alternatively to zero or to the maximum value, giving the image a `salt and pepper&#39; like appearance. Unaffected pixels always remain unchanged. The noise is usually quantified by the percentage of pixels which are corrupted.&lt;br /&gt;
&lt;a href=&quot;http://www.blogger.com/post-create.g?blogID=4746951324506260429&quot; name=&quot;guidelines&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;http://homepages.inf.ed.ac.uk/rbf/HIPR2/mote.gif&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h2&gt;Guidelines for Use&lt;/h2&gt;In this section we will show some examples of images corrupted with different kinds of noise and give a short overview of which noise reduction operators are most appropriate. A fuller discussion of the effects of the operators is given in the corresponding worksheets.&lt;br /&gt;
&lt;a href=&quot;http://www.blogger.com/post-create.g?blogID=4746951324506260429&quot; name=&quot;4&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;http://homepages.inf.ed.ac.uk/rbf/HIPR2/mote.gif&quot; /&gt;&lt;/a&gt;&lt;em&gt;Gaussian Noise&lt;/em&gt;&lt;br /&gt;
We will begin by considering additive noise with a Gaussian distribution. If we add Gaussian noise with&amp;nbsp;&lt;img align=&quot;middle&quot; alt=&quot;Eqn:eqnsigma&quot; src=&quot;http://homepages.inf.ed.ac.uk/rbf/HIPR2/eqns/eqnsigma.gif&quot; /&gt;&amp;nbsp;values of&amp;nbsp;&lt;em&gt;8&lt;/em&gt;, we obtain the image&lt;br /&gt;
&lt;blockquote&gt;&lt;a href=&quot;http://homepages.inf.ed.ac.uk/rbf/HIPR2/images/fce5noi4.gif&quot;&gt;&lt;img alt=&quot;fce5noi4&quot; src=&quot;http://homepages.inf.ed.ac.uk/rbf/HIPR2/thumbs/fce5noi4.GIF&quot; /&gt;&lt;/a&gt;&lt;/blockquote&gt;Increasing&amp;nbsp;&lt;img align=&quot;middle&quot; alt=&quot;Eqn:eqnsigma&quot; src=&quot;http://homepages.inf.ed.ac.uk/rbf/HIPR2/eqns/eqnsigma.gif&quot; /&gt;&amp;nbsp;yields&lt;br /&gt;
&lt;blockquote&gt;&lt;a href=&quot;http://homepages.inf.ed.ac.uk/rbf/HIPR2/images/fce5noi5.gif&quot;&gt;&lt;img alt=&quot;fce5noi5&quot; src=&quot;http://homepages.inf.ed.ac.uk/rbf/HIPR2/thumbs/fce5noi5.GIF&quot; /&gt;&lt;/a&gt;&lt;/blockquote&gt;and&lt;br /&gt;
&lt;blockquote&gt;&lt;a href=&quot;http://homepages.inf.ed.ac.uk/rbf/HIPR2/images/fce5noi6.gif&quot;&gt;&lt;img alt=&quot;fce5noi6&quot; src=&quot;http://homepages.inf.ed.ac.uk/rbf/HIPR2/thumbs/fce5noi6.GIF&quot; /&gt;&lt;/a&gt;&lt;/blockquote&gt;for&amp;nbsp;&lt;img align=&quot;middle&quot; alt=&quot;Eqn:eqnsigma&quot; src=&quot;http://homepages.inf.ed.ac.uk/rbf/HIPR2/eqns/eqnsigma.gif&quot; /&gt;=&lt;em&gt;13&lt;/em&gt;&amp;nbsp;and&amp;nbsp;&lt;em&gt;20&lt;/em&gt;. Compare these images to the original&lt;br /&gt;
&lt;blockquote&gt;&lt;a href=&quot;http://homepages.inf.ed.ac.uk/rbf/HIPR2/images/fce5.gif&quot;&gt;&lt;img alt=&quot;fce5&quot; src=&quot;http://homepages.inf.ed.ac.uk/rbf/HIPR2/thumbs/fce5.GIF&quot; /&gt;&lt;/a&gt;&lt;/blockquote&gt;&lt;br /&gt;
Gaussian noise can be reduced using a spatial filter. However, it must be kept in mind that when smoothing an image, we reduce not only the noise, but also the fine-scaled image details because they also correspond to blocked high frequencies. The most effective basic spatial filtering techniques for noise removal include:&amp;nbsp;&lt;a href=&quot;http://homepages.inf.ed.ac.uk/rbf/HIPR2/mean.htm&quot;&gt;mean filtering&lt;/a&gt;,&amp;nbsp;&lt;a href=&quot;http://homepages.inf.ed.ac.uk/rbf/HIPR2/median.htm&quot;&gt;median filtering&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href=&quot;http://homepages.inf.ed.ac.uk/rbf/HIPR2/gsmooth.htm&quot;&gt;Gaussian smoothing&lt;/a&gt;.&amp;nbsp;&lt;a href=&quot;http://homepages.inf.ed.ac.uk/rbf/HIPR2/crimmins.htm&quot;&gt;Crimmins Speckle Removal&lt;/a&gt;&amp;nbsp;filter can also produce good noise removal. More sophisticated algorithms which utilize statistical properties of the image and/or noise fields exist for noise removal. For example, adaptive smoothing algorithms may be defined which adjust the filter response according to local variations in the statistical properties of the data.&lt;br /&gt;
&lt;a href=&quot;http://www.blogger.com/post-create.g?blogID=4746951324506260429&quot; name=&quot;5&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;http://homepages.inf.ed.ac.uk/rbf/HIPR2/mote.gif&quot; /&gt;&lt;/a&gt;&lt;em&gt;Salt and Pepper Noise&lt;/em&gt;&lt;br /&gt;
In the following examples, images have been corrupted with various kinds and amounts of drop-out noise. In&lt;br /&gt;
&lt;blockquote&gt;&lt;a href=&quot;http://homepages.inf.ed.ac.uk/rbf/HIPR2/images/fce5noi3.gif&quot;&gt;&lt;img alt=&quot;fce5noi3&quot; src=&quot;http://homepages.inf.ed.ac.uk/rbf/HIPR2/thumbs/fce5noi3.GIF&quot; /&gt;&lt;/a&gt;&lt;/blockquote&gt;pixels have been set to 0 or 255 with probability&amp;nbsp;&lt;em&gt;p&lt;/em&gt;=1%. In&lt;br /&gt;
&lt;blockquote&gt;&lt;a href=&quot;http://homepages.inf.ed.ac.uk/rbf/HIPR2/images/fce5noi7.gif&quot;&gt;&lt;img alt=&quot;fce5noi7&quot; src=&quot;http://homepages.inf.ed.ac.uk/rbf/HIPR2/thumbs/fce5noi7.GIF&quot; /&gt;&lt;/a&gt;&lt;/blockquote&gt;pixel bits were flipped with&amp;nbsp;&lt;em&gt;p&lt;/em&gt;=3%, and in&lt;br /&gt;
&lt;blockquote&gt;&lt;a href=&quot;http://homepages.inf.ed.ac.uk/rbf/HIPR2/images/fce5noi8.gif&quot;&gt;&lt;img alt=&quot;fce5noi8&quot; src=&quot;http://homepages.inf.ed.ac.uk/rbf/HIPR2/thumbs/fce5noi8.GIF&quot; /&gt;&lt;/a&gt;&lt;/blockquote&gt;5% of the pixels (whose locations are chosen at random) are set to the maximum value, producing the snowy appearance.&lt;br /&gt;
For this kind of noise, conventional lowpass filtering,&amp;nbsp;&lt;em&gt;e.g.&lt;/em&gt;&amp;nbsp;&lt;a href=&quot;http://homepages.inf.ed.ac.uk/rbf/HIPR2/mean.htm&quot;&gt;mean filtering&lt;/a&gt;&amp;nbsp;or&amp;nbsp;&lt;a href=&quot;http://homepages.inf.ed.ac.uk/rbf/HIPR2/gsmooth.htm&quot;&gt;Gaussian smoothing&lt;/a&gt;&amp;nbsp;is relatively unsuccessful because the corrupted pixel value can vary significantly from the original and therefore the mean can be significantly different from the true value. A&amp;nbsp;&lt;a href=&quot;http://homepages.inf.ed.ac.uk/rbf/HIPR2/median.htm&quot;&gt;median filter&lt;/a&gt;&amp;nbsp;removes drop-out noise more efficiently and at the same time preserves the edges and small details in the image better.&amp;nbsp;&lt;a href=&quot;http://homepages.inf.ed.ac.uk/rbf/HIPR2/csmooth.htm&quot;&gt;Conservative smoothing&lt;/a&gt;&amp;nbsp;can be used to obtain a result which preserves a great deal of high frequency detail, but is only effective at reducing low levels of noise.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;Interactive Experimentation&lt;/h2&gt;You can interactively experiment with this operator by clicking&amp;nbsp;&lt;a href=&quot;http://homepages.inf.ed.ac.uk/rbf/HIPR2/noisedemo.htm&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;Exercises&lt;/h2&gt;&lt;ol&gt;&lt;li&gt;The image&lt;blockquote&gt;&lt;a href=&quot;http://homepages.inf.ed.ac.uk/rbf/HIPR2/images/che1noi1.gif&quot;&gt;&lt;img alt=&quot;che1noi1&quot; src=&quot;http://homepages.inf.ed.ac.uk/rbf/HIPR2/thumbs/che1noi1.GIF&quot; /&gt;&lt;/a&gt;&lt;/blockquote&gt;is a binary chessboard image with 2% of drop-out noise. Which operator yields the best results in removing the noise?&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;The image&lt;blockquote&gt;&lt;a href=&quot;http://homepages.inf.ed.ac.uk/rbf/HIPR2/images/che1noi2.gif&quot;&gt;&lt;img alt=&quot;che1noi2&quot; src=&quot;http://homepages.inf.ed.ac.uk/rbf/HIPR2/thumbs/che1noi2.GIF&quot; /&gt;&lt;/a&gt;&lt;/blockquote&gt;is the same image corrupted with Gaussian noise with a variance of 180. Is the operator used in&amp;nbsp;&lt;em&gt;Exercise 1&lt;/em&gt;&amp;nbsp;still the most appropriate? Compare the best results obtained from both noisy images.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Compare the images achieved by&amp;nbsp;&lt;a href=&quot;http://homepages.inf.ed.ac.uk/rbf/HIPR2/median.htm&quot;&gt;median filter&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href=&quot;http://homepages.inf.ed.ac.uk/rbf/HIPR2/mean.htm&quot;&gt;mean filter&lt;/a&gt;&amp;nbsp;filtering&lt;blockquote&gt;&lt;a href=&quot;http://homepages.inf.ed.ac.uk/rbf/HIPR2/images/fce5noi5.gif&quot;&gt;&lt;img alt=&quot;fce5noi5&quot; src=&quot;http://homepages.inf.ed.ac.uk/rbf/HIPR2/thumbs/fce5noi5.GIF&quot; /&gt;&lt;/a&gt;&lt;/blockquote&gt;with the result that you obtain by applying a&amp;nbsp;&lt;a href=&quot;http://homepages.inf.ed.ac.uk/rbf/HIPR2/freqfilt.htm&quot;&gt;frequency lowpass filter&lt;/a&gt;&amp;nbsp;to the image. How does the mean filter relate to the frequency filter? Compare the computational costs of mean, median and frequency filtering.&lt;/li&gt;
&lt;/ol&gt;&lt;br /&gt;
&lt;h2&gt;References&lt;/h2&gt;&lt;strong&gt;R. Gonzales and R. Woods&lt;/strong&gt;&amp;nbsp;&lt;em&gt;Digital Image Processing&lt;/em&gt;, Addison Wesley, 1992, pp 187 - 213.&lt;br /&gt;
&lt;strong&gt;A. Jain&lt;/strong&gt;&amp;nbsp;&lt;em&gt;Fundamentals of Digital Image Processing&lt;/em&gt;, Prentice Hall, 1989, pp 244 - 253, 273 - 275.&lt;br /&gt;
&lt;strong&gt;E. Davies&lt;/strong&gt;&amp;nbsp;&lt;em&gt;Machine Vision: Theory, Algorithms and Practicalities&lt;/em&gt;, Academic Press, 1990, pp 29 - 30, 40 - 47, 493.&lt;br /&gt;
&lt;strong&gt;B. Horn&lt;/strong&gt;&amp;nbsp;&lt;em&gt;Robot Vision&lt;/em&gt;, MIT Press, 1986, Chap.&amp;nbsp;2.&lt;br /&gt;
&lt;strong&gt;A. Marion&lt;/strong&gt;&amp;nbsp;&lt;em&gt;An Introduction to Image Processing&lt;/em&gt;, Chapman and Hall, 1991, Chap.&amp;nbsp;5.</content><link rel='replies' type='application/atom+xml' href='http://emocias.blogspot.com/feeds/5985091829191594174/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4746951324506260429/5985091829191594174' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4746951324506260429/posts/default/5985091829191594174'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4746951324506260429/posts/default/5985091829191594174'/><link rel='alternate' type='text/html' href='http://emocias.blogspot.com/2011/05/gausian-noise-generation.html' title='Noise Generation'/><author><name>emocias</name><uri>http://www.blogger.com/profile/05285285831867688681</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://1.bp.blogspot.com/_INA6k_5WIIE/TOK9p4Ht3sI/AAAAAAAAAAQ/aNMCwPAqTsc/S220/vladstudio_xmasnight2_1600x900_love_baroque%255B1%255D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4746951324506260429.post-7422473927572226478</id><published>2011-05-17T12:07:00.002-04:00</published><updated>2011-05-17T12:07:30.996-04:00</updated><title type='text'>Eclipse CDT winth MinGW-w64</title><content type='html'>&lt;div style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;This tutorial discusses how you can use MinGW 64-bit and Eclipse to build an application.&amp;nbsp; This tutorial is based on 64-bit MinGW (probably version 4.5--the version is not clear from the download page) and Eclipse Galieo (SR2 Build ID:2010 02 18-1602) and Eclipse Helios (SR1 for Windows 64 bit,&amp;nbsp;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;filename&quot;&gt;eclipse-cpp-helios-SR1-win32-x86_64&lt;/span&gt;&lt;/span&gt;). The following parts of this tutorial assume that you already installed Eclipse and MinGW 64-bit at your preferred paths and will only discuss how you can change Eclipse settings to build and run your applications.&lt;/div&gt;&lt;h2 style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;Get Compiler&lt;/h2&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;The first task is to obtain a proper MinGW w64 compiler.&amp;nbsp; Although our target platform is Windows 64-bit, the compiler may be a 32-bit application that performs cross-compilation for you.&amp;nbsp; You can choose your preferred version from&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;&lt;a href=&quot;http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/&quot; id=&quot;u90b&quot; style=&quot;color: #de7008; text-decoration: none;&quot; title=&quot;here&quot;&gt;here&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;.&amp;nbsp; There are some significant different for personal and automated builds (as of Dec 2010).&amp;nbsp; For example, the sezero build I used (mingw-w64-bin_x86_64-mingw_20101003_sezero) is 64-bit binary producing 64-bit application, while a binary from the automated build (mingw-w64-1.0-bin_i686-mingw_20101129) is 32-bit binary generating 64-bit application.&amp;nbsp; Technically, the automated build performs cross-compilation, while the sezero build performs native compilation.&amp;nbsp; As sezero build has a conventional directory structures and file names (same as MinGW 32-bit), I recommend using the sezero build.&amp;nbsp; It will save you a lot of time and you will not encounter some naming troubles in later steps.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;In summary, from the link provided above, it is best if you go to the &#39;Personal Builds&#39; section and download the latest sezero build.&amp;nbsp; This is probably the best way to use Windows 64-bit to generate 64-bit applications.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;h2 style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;Change Compiler Settings (Galieo SR2)&lt;/h2&gt;&lt;ol style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;&lt;li&gt;Go to menu Project-&amp;gt;Properties.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Go to node C/C++ Build-&amp;gt;Environment.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Update the path variable according to your MinGW w64 installation.&amp;nbsp; For example, change it to C:\MinGW_w64\bin.&amp;nbsp;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Switch to topic C/C++ Build-&amp;gt;Settings.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;i&gt;[update (Dec 27, 2010): some recent MinGW versions (native compilation) come with &#39;as&#39;, &#39;g++&#39;, and &#39;gcc&#39; commands. This step may be unnecessary for your MinGW build. However, some versions (cross-compilation) still have this issue and this step is required.&amp;nbsp; If you use sezero build, this step is probably unnecessary.]&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
There are four commands to update: GCC Assembler, GCC C++ Assembler, GCC C Compiler, and MinGW C++ Linker.&amp;nbsp; Correct commands depends on the platform of MinGW w64 you choose.&amp;nbsp; No worry.&amp;nbsp; It is quite obvious to know what commands to use, as the command names are in the format [platform prefix]-[default command].exe.&amp;nbsp; For example, we need to update the command &#39;as&#39;, &#39;g++&#39;, &#39;gcc&#39;, and &#39;g++&#39; for GCC assembler, C++ compiler, C compiler and C++ linker, respectively.&amp;nbsp; The correct commands may be &#39;x86_64-w64-mingw32-as&#39;, &#39;x86_64-w64-mingw32-g++&#39;, &#39;x86_64-w64-mingw32-gcc&#39;, and &#39;x86_64-w64-mingw32-g++&#39;, respectively.&lt;br /&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;h2 style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;Change Compiler Settings (Helios SR1)&lt;/h2&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;Eclipse Helios is virtually blank regarding compiler configurations, but it seems to be compatible with various GCC toolchains (Mac, Solaris, Cygwin, MinGW, and Linux).&amp;nbsp; Our first task is to choose a proper toolchain as follows.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;ol style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;&lt;li&gt;Go to menu Project-&amp;gt;Properties.&lt;/li&gt;
&lt;li&gt;Go to node &#39;Tool Chain Editor.&#39; (The spelling of toolchain in Eclipse is not consistent.&amp;nbsp; There are both &#39;tool chain&#39; and &#39;toolchain.&#39;)&lt;/li&gt;
&lt;li&gt;Set the current toolchain to &#39;MinGW GCC.&#39;&lt;/li&gt;
&lt;li&gt;Set the current builder to &#39;CDT Internal Builder.&#39;&amp;nbsp; You are free to use &#39;GNU Make Builder&#39; if you prefer.&lt;/li&gt;
&lt;li&gt;Go to node &#39;Settings.&#39;&lt;/li&gt;
&lt;li&gt;Change the path of compiler/assembler commands.&amp;nbsp; For example, highlight &#39;GCC C++ Compiler&#39; and change the command to &#39;C:\MinGW_64bit\bin\g++&#39; if you save MinGW at C:\MinGW_64bit.&lt;br /&gt;
&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;There is no path variable any more, but there is a new node called &#39;Discovery Options&#39; inside &#39;C/C++ Build.&#39;&amp;nbsp; If we check &#39;Automate discovery paths and symbols,&#39; most path settings are not necessary during program compilation.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;If you employ OpenMP, you might want to see more detail at&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;&lt;a href=&quot;http://www.ipd.uni-karlsruhe.de/multicore/research/download/HowToGuide-OpenMP.pdf&quot; id=&quot;zea8&quot; style=&quot;color: #de7008; text-decoration: none;&quot; title=&quot;this link&quot;&gt;this site&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;.&amp;nbsp; Basically, you have to change the miscellaneous flag of GCC C++ Compiler and MinGW C++ Linker to include -fopenmp.&amp;nbsp; Remember, however, that we have to change run-time settings, as OpenMP requires additional run-time libraries.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;h2 style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;Change Default Include Folders&lt;/h2&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;(This step is required for Galieo, but not for Helios.&amp;nbsp; If you use Helios and choose &#39;Automate discovery paths and symbols&#39; in &#39;C/C++ Build,&#39; the defualt include folders should be correct right of the beginning.)&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;It is quite painful in this part, as Eclipse uses the C:/mingw by default.&amp;nbsp; If you have multiple versions of MinGW, you have to change them.&amp;nbsp; Fortunately, (almost) all include files are all the same among versions.&amp;nbsp; Therefore, if we add header files to the default MinGW installation path, things should work across versions.&amp;nbsp; These are, however, the include paths for the Eclipse editor.&amp;nbsp; This means that Eclipse source-code editor can parse and show some hints if we add header files to the default 32-bit MinGW path, even though we are going to use 64-bit MinGW to perform actual program compilation.&amp;nbsp; Therefore, for actual compilation, we need true addendum to an include folder that a compiler uses.&amp;nbsp; See an example below.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;Example: add OpenGL header files to Eclipse for actual compilation.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;If we want to add header files to a &#39;global&#39; include folder, such as GL, the include folder that will make things work has a platform prefix, say &#39;x86_64-w64-mingw32\include&#39;.&amp;nbsp; This is the case when we call gcc with the same prefix from a bin directory, such as &#39;x86_64-w64-mingw32-gcc.exe&#39;.&amp;nbsp; Addition of header files in other directories has no effect in actual compilation.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;h2 style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;Change Run-Time Settings&lt;/h2&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;At this step, you can build your 64-bit application, but you probably see that you cannot run it, even within the Eclipse environment itself.&amp;nbsp; Your program might just be terminated without any reported error message.&amp;nbsp; To deal with the problem, you also need to change run-time settings as follows.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;ol style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;&lt;li&gt;Go to menu &#39;Run-&amp;gt;Run Configurations...&#39;&lt;/li&gt;
&lt;li&gt;Go to tab &#39;Environment&#39;.&lt;/li&gt;
&lt;li&gt;Create a environment variable by using the &#39;New&#39; button.&lt;/li&gt;
&lt;li&gt;In a new popup window, set &#39;Name&#39; to PATH and &#39;Value&#39; to $PATH;C:\MinGW_64bit\bin, provided that C:\MinGW_64bit is the installation folder for your 64-bit MinGW.&amp;nbsp; Note: if you have more paths to include, separate them with a semi-colon.&lt;br /&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;Alternatively, you can set Windows environment path variable to include the MinGW path.&amp;nbsp; Nonetheless, if you have both 32-bit and 64-bit MinGW in the paths, some DLL names may cause DLL conflict and you may get 32-bit library instead of 64-bit library when you call your program.&amp;nbsp; If your machine, however, has only 64-bit MinGW, using the Windows path variable is probably the most convenient way because you will have no need to create a path variable in Eclipse run-time settings for this purpose again.&amp;nbsp; Nevertheless, dealing with Eclipse run-time settings does not need admin previlage to execute and it is always a viable option.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;Because setting the Eclipse environment variable does not change any path variable outside Eclipse, we cannot run the application by double clicking on it or calling at command prompt, unless path variable for the executable session is set.&amp;nbsp; To temporarily change Windows path variable, a command &#39;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;set path=%path$;C:\MinGW_64bit\bin&#39;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp;may be used&lt;/span&gt;&amp;nbsp;[ref:&lt;a href=&quot;http://vlaurie.com/computers2/Articles/environment.htm&quot; id=&quot;so5l&quot; style=&quot;color: #de7008; text-decoration: none;&quot; title=&quot;http://vlaurie.com/computers2/Articles/environment.htm&quot;&gt;http://vlaurie.com/computers2/Articles/environment.htm&lt;/a&gt;].&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;&amp;nbsp; Again, separate library paths with a semi-colon if you have multiple library paths to add.&amp;nbsp; This effectively appends the MinGW path to the existing path variable, specifically for the command prompt session.&amp;nbsp; Therefore, it may be a bit awkward if we want to call an executable file from Windows Explorer, as a batch file may need to be created.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;&lt;b&gt;OpenMP Note&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;: for sezero&#39;s MinGW build, you may need to unpack pthreads-w64.zip into the root of your MinGW folder (C:\MinGW_64bit) so that required OpenMP run-time libraries are available in a proper place.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;&lt;b&gt;Tips&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;: some error messages from Windows may not show up in Eclipse when we run or debug our programs within Eclipse environment.&amp;nbsp; Try using a command prompt (cmd.exe) and you may see more informative error messages.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;h3 style=&quot;background-attachment: initial; background-clip: initial; background-color: #eeeeee; background-image: initial; background-origin: initial; color: #555555; font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px; font: normal normal bold 110%/normal Verdana, sans-serif; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 2px; padding-left: 2px; padding-right: 0px; padding-top: 2px;&quot;&gt;Optional: Using MSYS to check if the compiled application is 64-bit&lt;/h3&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;There are at least two ways to check if an application is 64-bit or 32-bit.&amp;nbsp; The easiest way is to run it and see its process name in the Windows Task Manager.&amp;nbsp; If the process name has a suffix *32, it is 32-bit.&amp;nbsp; If there is no such suffix, it is 64-bit.&amp;nbsp; There is another way.&amp;nbsp; It is less convenient in my opinion, but you can probably use it to check your application programmatically without running it at all.&amp;nbsp; This is possible if you use MSYS as discussed below.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;ol style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;&lt;li&gt;Copy the executable file to a place where MSYS environment can reach.&amp;nbsp; This is probably your home folder in C:\msys.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Enter &#39;file my_executable.exe&#39;.&amp;nbsp; For MSYS 1.0.11 32 bits (I ran it on 64-bit Windows 7), a 64-bit executable will get a message &#39;my_executable.exe: PE executable for MS Windows&#39;.&amp;nbsp; There is nothing about 32-bit or 64-bit tags showing up.&amp;nbsp; A 32-bit executable, however, will get a message &#39;my_executable.exe: PE executable for MS Windows (console) Intel 80386 32-bit&#39;.&amp;nbsp; Namely, a 32-bit executable gets a clear description about its platform, while a 64-bit executable does not get any definite description.&amp;nbsp; This is analogous to what the Task Manager does.&lt;br /&gt;
&lt;br /&gt;
For more recent version of MSYS, the file command gives PE32 for a 32-bit executable and PE32+ for a 64-bit executable.&lt;/li&gt;
&lt;/ol&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;Pinyo Taeprasartsit&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;(May, Dec 2010)&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;This document can be viewed at&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;&lt;a href=&quot;http://pinyotae.blogspot.com/2010/05/eclipse-mingw-x64.html&quot; id=&quot;q4v2&quot; style=&quot;color: #de7008; text-decoration: none;&quot; title=&quot;my blog&quot;&gt;my blog&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;and&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;&lt;a href=&quot;http://docs.google.com/View?id=dggq8h5d_494hnb5n5qk&quot; id=&quot;hqf6&quot; style=&quot;color: #de7008; text-decoration: none;&quot; title=&quot;my Google docs&quot;&gt;my Google docs&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;.&amp;nbsp; I welcome questions, comments, and suggestions.&amp;nbsp; Please leave a message in&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;&lt;a href=&quot;http://pinyotae.blogspot.com/2010/05/eclipse-mingw-x64.html&quot; id=&quot;navu&quot; style=&quot;color: #de7008; text-decoration: none;&quot; title=&quot;my blog&quot;&gt;my blog&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 14px;&quot;&gt;if you have any.&amp;nbsp; Thank you.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://emocias.blogspot.com/feeds/7422473927572226478/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4746951324506260429/7422473927572226478' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4746951324506260429/posts/default/7422473927572226478'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4746951324506260429/posts/default/7422473927572226478'/><link rel='alternate' type='text/html' href='http://emocias.blogspot.com/2011/05/eclipse-cdt-winth-mingw-w64.html' title='Eclipse CDT winth MinGW-w64'/><author><name>emocias</name><uri>http://www.blogger.com/profile/05285285831867688681</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://1.bp.blogspot.com/_INA6k_5WIIE/TOK9p4Ht3sI/AAAAAAAAAAQ/aNMCwPAqTsc/S220/vladstudio_xmasnight2_1600x900_love_baroque%255B1%255D.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4746951324506260429.post-6659704583158713325</id><published>2011-05-11T16:27:00.000-04:00</published><updated>2011-05-13T16:33:33.737-04:00</updated><title type='text'>VirtualBox: using Guest OS on physical partition</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #222222; font-family: sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: #ebf1f5; background-image: initial; background-origin: initial; border-bottom-color: rgb(187, 204, 221); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(187, 204, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(187, 204, 221); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(187, 204, 221); border-top-style: solid; border-top-width: 1px; color: #222222; line-height: 1.1em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;&quot;&gt;Setting up VirtualBox to boot linux from the physical Drive&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
In case of windows operating system,&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #222222; font-family: sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: #ebf1f5; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(187, 204, 221); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(187, 204, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(187, 204, 221); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(187, 204, 221); border-top-style: solid; border-top-width: 1px; color: #222222; line-height: 1.1em; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;&quot;&gt;cd c:\Program Files\Oracle\VirtualBox\
&lt;/pre&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #222222; font-family: sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: #ebf1f5; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(187, 204, 221); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(187, 204, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(187, 204, 221); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(187, 204, 221); border-top-style: solid; border-top-width: 1px; color: #222222; line-height: 1.1em; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;&quot;&gt;VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk -rawdisk \\.\PhysicalDrive?
&lt;/pre&gt;&lt;div&gt;- ? is the number of physical drive.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://emocias.blogspot.com/feeds/6659704583158713325/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4746951324506260429/6659704583158713325' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4746951324506260429/posts/default/6659704583158713325'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4746951324506260429/posts/default/6659704583158713325'/><link rel='alternate' type='text/html' href='http://emocias.blogspot.com/2011/05/virtualbox-using-guest-os-on-physical.html' title='VirtualBox: using Guest OS on physical partition'/><author><name>emocias</name><uri>http://www.blogger.com/profile/05285285831867688681</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://1.bp.blogspot.com/_INA6k_5WIIE/TOK9p4Ht3sI/AAAAAAAAAAQ/aNMCwPAqTsc/S220/vladstudio_xmasnight2_1600x900_love_baroque%255B1%255D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4746951324506260429.post-5528438004781735892</id><published>2011-04-06T18:55:00.001-04:00</published><updated>2011-04-06T18:55:12.549-04:00</updated><title type='text'></title><content type='html'>&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #333333; font-family: &#39;Luxi Sans&#39;, &#39;Bitstream Vera Sans&#39;, &#39;Lucida Grande&#39;, &#39;Trebuchet MS&#39;, helvetica, verdana, arial, sans-serif; font-size: small;&quot;&gt;&lt;div align=&quot;left&quot; class=&quot;contentHeader&quot; style=&quot;border-bottom-color: rgb(102, 102, 102); border-bottom-style: dashed; border-bottom-width: 1px; color: red; font: normal normal bold 17pt/normal arial, helvetica, sans-serif; text-decoration: none;&quot;&gt;Installation of Oracle 11g Release 1 (11.1.0.6.0) on RedHat EL 4, 5 and (Oracle) Enteprise Linux 4, 5&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
This paper (HOWTO) describes step-by-step installation of Oracle 11g R1 database software on RedHat Enterprise Linux 4 and 5 or Enteprise Linux 4 and 5 shipped by Oracle Corp. This article is useful for Centos Linux release 4 and 5. Note that Centos distribution is not certified by Oracle Corporation.&lt;br /&gt;
This article does not cover database creation process, and ASM Instance creation process.&lt;br /&gt;
&lt;br /&gt;
This paper covers following steps:&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://ivan.kartik.sk/oracle/install_ora11gR1_elinux.html#st1&quot;&gt;Pre-Instalation Tasks&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://ivan.kartik.sk/oracle/install_ora11gR1_elinux.html#st2&quot;&gt;Download &amp;amp; Install&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://ivan.kartik.sk/oracle/install_ora11gR1_elinux.html#st3&quot;&gt;Post-Instalation Tasks&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://ivan.kartik.sk/oracle/install_ora11gR1_elinux.html#st4&quot;&gt;Common Installation Errors&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;h3&gt;&lt;a href=&quot;&quot; name=&quot;st1&quot;&gt;Pre-Instalation Tasks&lt;/a&gt;&lt;/h3&gt;1. Create oracle User Account&lt;br /&gt;
&lt;br /&gt;
Login as root and create te user oracle which belongs to dba group.&lt;div class=&quot;contentCommand&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #cccccc; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(102, 102, 102); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(102, 102, 102); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(102, 102, 102); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(102, 102, 102); border-top-style: dashed; border-top-width: 1px; color: black; font-family: Courier; font-size: 13px; font-weight: bold; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;&quot;&gt;su -&lt;br /&gt;
# groupadd dba&lt;br /&gt;
# useradd -g dba oracle&lt;/div&gt;&lt;br /&gt;
2. Setting System parameters&lt;br /&gt;
Edit the /etc/sysctl.conf and add following lines:&lt;div class=&quot;contentCommand&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #cccccc; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(102, 102, 102); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(102, 102, 102); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(102, 102, 102); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(102, 102, 102); border-top-style: dashed; border-top-width: 1px; color: black; font-family: Courier; font-size: 13px; font-weight: bold; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;&quot;&gt;kernel.shmall = 2097152&lt;br /&gt;
kernel.shmmax = 2147483648&lt;br /&gt;
kernel.shmmni = 4096&lt;br /&gt;
kernel.sem = 250 32000 100 128&lt;br /&gt;
fs.file-max = 6553600&lt;br /&gt;
net.ipv4.ip_local_port_range = 1024 65000&lt;br /&gt;
net.core.rmem_default = 4194304&lt;br /&gt;
net.core.rmem_max = 4194304&lt;br /&gt;
net.core.wmem_default = 262144&lt;br /&gt;
net.core.wmem_max = 262144&lt;/div&gt;&lt;span style=&quot;color: red;&quot;&gt;Note: You need reboot system or execute &quot;sysctl -p&quot; command to apply above settings.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;For RedHat (OEL, Centos, WBL) 4 version:&amp;nbsp;&lt;/span&gt;Edit the /etc/pam.d/login file and add following line:&lt;div class=&quot;contentCommand&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #cccccc; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(102, 102, 102); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(102, 102, 102); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(102, 102, 102); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(102, 102, 102); border-top-style: dashed; border-top-width: 1px; color: black; font-family: Courier; font-size: 13px; font-weight: bold; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;&quot;&gt;session required /lib/security/pam_limits.so&lt;/div&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;For RedHat (OEL, Centos) 5 version:&amp;nbsp;&lt;/span&gt;Edit the /etc/pam.d/login file and add following line:&lt;div class=&quot;contentCommand&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #cccccc; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(102, 102, 102); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(102, 102, 102); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(102, 102, 102); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(102, 102, 102); border-top-style: dashed; border-top-width: 1px; color: black; font-family: Courier; font-size: 13px; font-weight: bold; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;&quot;&gt;session required pam_limits.so&lt;/div&gt;&lt;br /&gt;
Edit the /etc/security/limits.conf file and add following lines:&lt;div class=&quot;contentCommand&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #cccccc; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(102, 102, 102); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(102, 102, 102); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(102, 102, 102); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(102, 102, 102); border-top-style: dashed; border-top-width: 1px; color: black; font-family: Courier; font-size: 13px; font-weight: bold; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;&quot;&gt;oracle&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;soft&amp;nbsp;&amp;nbsp;nproc&amp;nbsp;&amp;nbsp;2047&lt;br /&gt;
oracle&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;hard&amp;nbsp;&amp;nbsp;nproc&amp;nbsp;&amp;nbsp;16384&lt;br /&gt;
oracle&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;soft&amp;nbsp;&amp;nbsp;nofile&amp;nbsp;&amp;nbsp;1024&lt;br /&gt;
oracle&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;hard&amp;nbsp;&amp;nbsp;nofile&amp;nbsp;&amp;nbsp;65536&lt;/div&gt;&lt;br /&gt;
3. Creating oracle directories&lt;br /&gt;
&lt;div class=&quot;contentCommand&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #cccccc; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(102, 102, 102); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(102, 102, 102); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(102, 102, 102); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(102, 102, 102); border-top-style: dashed; border-top-width: 1px; color: black; font-family: Courier; font-size: 13px; font-weight: bold; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;&quot;&gt;# mkdir /opt/oracle&lt;br /&gt;
# mkdir /opt/oracle/111&lt;br /&gt;
# chown -R oracle:dba /opt/oracle&lt;/div&gt;&lt;br /&gt;
4. Setting Oracle Enviroment&lt;br /&gt;
Edit the /home/oracle/.bash_profile file and add following lines:&lt;div class=&quot;contentCommand&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #cccccc; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(102, 102, 102); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(102, 102, 102); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(102, 102, 102); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(102, 102, 102); border-top-style: dashed; border-top-width: 1px; color: black; font-family: Courier; font-size: 13px; font-weight: bold; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;&quot;&gt;ORACLE_BASE=/opt/oracle&lt;br /&gt;
ORACLE_HOME=$ORACLE_BASE/111&lt;br /&gt;
ORACLE_SID=ORCL&lt;br /&gt;
LD_LIBRARY_PATH=$ORACLE_HOME/lib&lt;br /&gt;
PATH=$PATH:$ORACLE_HOME/bin&lt;br /&gt;
&lt;br /&gt;
export ORACLE_BASE ORACLE_HOME ORACLE_SID LD_LIBRARY_PATH PATH&lt;/div&gt;&lt;br /&gt;
Save the .bash_profile and execute following commands for load new enviroment:&lt;div class=&quot;contentCommand&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #cccccc; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(102, 102, 102); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(102, 102, 102); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(102, 102, 102); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(102, 102, 102); border-top-style: dashed; border-top-width: 1px; color: black; font-family: Courier; font-size: 13px; font-weight: bold; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;&quot;&gt;cd /home/oracle&lt;br /&gt;
. .bash_profile&lt;/div&gt;&lt;br /&gt;
&lt;h3&gt;&lt;a href=&quot;&quot; name=&quot;st2&quot;&gt;Download &amp;amp; Install&lt;/a&gt;&lt;/h3&gt;1. Download and install required .rpm packages&lt;br /&gt;
&lt;br /&gt;
Some additional packages are required for succesful instalation of Oracle software. To check wheter required packages are installed on your operating system use following command:&lt;div class=&quot;contentCommand&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #cccccc; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(102, 102, 102); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(102, 102, 102); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(102, 102, 102); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(102, 102, 102); border-top-style: dashed; border-top-width: 1px; color: black; font-family: Courier; font-size: 13px; font-weight: bold; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;&quot;&gt;rpm -q binutils elfutils elfutils-libelf gcc gcc-c++ glibc glibc-common glibc-devel compat-libstdc++-33 cpp make compat-db sysstat libaio libaio-devel unixODBC unixODBC-devel|sort&lt;/div&gt;&lt;br /&gt;
If some package is not installed then install it from installation media or download it from following locations:&lt;br /&gt;
&lt;a href=&quot;ftp://ftp.redhat.com/pub/redhat/linux/enterprise/4/en/os/i386/SRPMS/&quot; target=&quot;_blank&quot;&gt;RedHat Enterprise Linux 4&lt;/a&gt;&amp;nbsp;-&amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt;source packages only&lt;/span&gt;&lt;br /&gt;
&lt;a href=&quot;ftp://ftp.redhat.com/pub/redhat/linux/enterprise/5Server/en/os/SRPMS/&quot; target=&quot;_blank&quot;&gt;RedHat Enterprise Linux 5&lt;/a&gt;&amp;nbsp;-&amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt;source packages only&lt;/span&gt;&lt;br /&gt;
&lt;a href=&quot;http://centos.arcticnetwork.ca/4/os/i386/CentOS/RPMS/&quot; target=&quot;_blank&quot;&gt;Centos Linux 4&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://centos.arcticnetwork.ca/5/os/i386/CentOS/&quot; target=&quot;_blank&quot;&gt;Centos Linux 5&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;This is example how to build RPM package from source package (libaio-0.3.105-2.src.rpm). Note gcc, make and rpm-build (and dependent) packages must be already installed on your system.&lt;/span&gt;&lt;div class=&quot;contentCommand&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #cccccc; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(102, 102, 102); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(102, 102, 102); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(102, 102, 102); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(102, 102, 102); border-top-style: dashed; border-top-width: 1px; color: black; font-family: Courier; font-size: 13px; font-weight: bold; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;&quot;&gt;# rpm -ivh libaio-0.3.105-2.src.rpm&lt;br /&gt;
# cd /usr/src/redhat/SPECS/&lt;br /&gt;
# rpmbuild --target i386 libaio.spec&lt;br /&gt;
# cd ../RPMS/i386/&lt;br /&gt;
# rpm -ivh libaio-0.3.105-2.i386.rpm libaio-devel-0.3.105-2.i386.rpm&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Install the required packages using the rpm command:&lt;div class=&quot;contentCommand&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #cccccc; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(102, 102, 102); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(102, 102, 102); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(102, 102, 102); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(102, 102, 102); border-top-style: dashed; border-top-width: 1px; color: black; font-family: Courier; font-size: 13px; font-weight: bold; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;&quot;&gt;rpm -ivh&amp;nbsp;&lt;i&gt;&amp;lt;package_name&amp;gt;&lt;/i&gt;.rpm&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
2. Download the Oracle 11g release 1 (11.1.0.6.0) software from&amp;nbsp;&lt;a href=&quot;http://www.oracle.com/technology/software/products/database/index.html&quot; target=&quot;_blank&quot;&gt;Oracle website&lt;/a&gt;.&lt;br /&gt;
Extract the files using following command:&lt;div class=&quot;contentCommand&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #cccccc; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(102, 102, 102); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(102, 102, 102); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(102, 102, 102); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(102, 102, 102); border-top-style: dashed; border-top-width: 1px; color: black; font-family: Courier; font-size: 13px; font-weight: bold; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;&quot;&gt;unzip linux_11gR1_database.zip&lt;/div&gt;&lt;br /&gt;
3. Start the Oracle software installation process.&lt;br /&gt;
&lt;br /&gt;
Now the system is prepared for Oracle software installation. To start the installation process execute the following commands:&lt;div class=&quot;contentCommand&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #cccccc; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(102, 102, 102); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(102, 102, 102); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(102, 102, 102); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(102, 102, 102); border-top-style: dashed; border-top-width: 1px; color: black; font-family: Courier; font-size: 13px; font-weight: bold; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;&quot;&gt;cd database&lt;br /&gt;
./runInstaller&lt;/div&gt;&lt;br /&gt;
&lt;h3&gt;&lt;a href=&quot;&quot; name=&quot;st3&quot;&gt;Post-Instalation Tasks&lt;/a&gt;&lt;/h3&gt;&lt;b&gt;1. (Optional) Auto Startup and Shutdown of Database and Listener&lt;br /&gt;
&lt;/b&gt;Login as root and modify /etc/oratab file and change last character to Y for apropriate database.&lt;div class=&quot;contentCommand&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #cccccc; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(102, 102, 102); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(102, 102, 102); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(102, 102, 102); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(102, 102, 102); border-top-style: dashed; border-top-width: 1px; color: black; font-family: Courier; font-size: 13px; font-weight: bold; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;&quot;&gt;ORCL:/opt/oracle/111:Y&lt;/div&gt;&lt;br /&gt;
As root user create new file &quot;oracle&quot; (init script for startup and shutdown the database) in /etc/init.d/ directory with following content:&lt;div class=&quot;contentCommand&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #cccccc; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(102, 102, 102); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(102, 102, 102); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(102, 102, 102); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(102, 102, 102); border-top-style: dashed; border-top-width: 1px; color: black; font-family: Courier; font-size: 13px; font-weight: bold; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;&quot;&gt;#!/bin/bash&lt;br /&gt;
#&lt;br /&gt;
# oracle Init file for starting and stopping&lt;br /&gt;
# Oracle Database. Script is valid for 10g and 11g versions.&lt;br /&gt;
#&lt;br /&gt;
# chkconfig: 35 80 30&lt;br /&gt;
# description: Oracle Database startup script&lt;br /&gt;
&lt;br /&gt;
# Source function library.&lt;br /&gt;
&lt;br /&gt;
. /etc/rc.d/init.d/functions&lt;br /&gt;
&lt;br /&gt;
ORACLE_OWNER=&quot;oracle&quot;&lt;br /&gt;
ORACLE_HOME=&quot;/opt/oracle/111&quot;&lt;br /&gt;
&lt;br /&gt;
case &quot;$1&quot; in&lt;br /&gt;
start)&lt;br /&gt;
echo -n $&quot;Starting Oracle DB:&quot;&lt;br /&gt;
su - $ORACLE_OWNER -c &quot;$ORACLE_HOME/bin/dbstart $ORACLE_HOME&quot;&lt;br /&gt;
echo &quot;OK&quot;&lt;br /&gt;
;;&lt;br /&gt;
stop)&lt;br /&gt;
echo -n $&quot;Stopping Oracle DB:&quot;&lt;br /&gt;
su - $ORACLE_OWNER -c &quot;$ORACLE_HOME/bin/dbshut $ORACLE_HOME&quot;&lt;br /&gt;
echo &quot;OK&quot;&lt;br /&gt;
;;&lt;br /&gt;
*)&lt;br /&gt;
echo $&quot;Usage: $0 {start|stop}&quot;&lt;br /&gt;
esac&lt;/div&gt;&lt;br /&gt;
Execute (as root) following commands (First script change the permissions, second script is configuring execution for specific runlevels):&lt;div class=&quot;contentCommand&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #cccccc; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(102, 102, 102); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(102, 102, 102); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(102, 102, 102); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(102, 102, 102); border-top-style: dashed; border-top-width: 1px; color: black; font-family: Courier; font-size: 13px; font-weight: bold; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;&quot;&gt;chmod 750 /etc/init.d/oracle&lt;br /&gt;
chkconfig --add oracle --level 0356&lt;/div&gt;&lt;br /&gt;
&lt;b&gt;2. (Optional) Auto Startup and Shutdown of Enterprise Manager Database Control&lt;br /&gt;
&lt;/b&gt;As root user create new file &quot;oraemctl&quot; (init script for startup and shutdown EM DB Console) in /etc/init.d/ directory with following content:&lt;div class=&quot;contentCommand&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #cccccc; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(102, 102, 102); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(102, 102, 102); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(102, 102, 102); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(102, 102, 102); border-top-style: dashed; border-top-width: 1px; color: black; font-family: Courier; font-size: 13px; font-weight: bold; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;&quot;&gt;#!/bin/bash&lt;br /&gt;
#&lt;br /&gt;
# oraemctl Starting and stopping Oracle Enterprise Manager Database Control.&lt;br /&gt;
# Script is valid for 10g and 11g versions.&lt;br /&gt;
#&lt;br /&gt;
# chkconfig: 35 80 30&lt;br /&gt;
# description: Enterprise Manager DB Control startup script&lt;br /&gt;
&lt;br /&gt;
# Source function library.&lt;br /&gt;
&lt;br /&gt;
. /etc/rc.d/init.d/functions&lt;br /&gt;
&lt;br /&gt;
ORACLE_OWNER=&quot;oracle&quot;&lt;br /&gt;
ORACLE_HOME=&quot;/opt/oracle/111&quot;&lt;br /&gt;
&lt;br /&gt;
case &quot;$1&quot; in&lt;br /&gt;
start)&lt;br /&gt;
echo -n $&quot;Starting Oracle EM DB Console:&quot;&lt;br /&gt;
su - $ORACLE_OWNER -c &quot;$ORACLE_HOME/bin/emctl start dbconsole&quot;&lt;br /&gt;
echo &quot;OK&quot;&lt;br /&gt;
;;&lt;br /&gt;
stop)&lt;br /&gt;
echo -n $&quot;Stopping Oracle EM DB Console:&quot;&lt;br /&gt;
su - $ORACLE_OWNER -c &quot;$ORACLE_HOME/bin/emctl stop dbconsole&quot;&lt;br /&gt;
echo &quot;OK&quot;&lt;br /&gt;
;;&lt;br /&gt;
*)&lt;br /&gt;
echo $&quot;Usage: $0 {start|stop}&quot;&lt;br /&gt;
esac&lt;/div&gt;&lt;br /&gt;
Execute (as root) following commands (First script change the permissions, second script is configuring execution for specific runlevels):&lt;br /&gt;
&lt;div class=&quot;contentCommand&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #cccccc; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(102, 102, 102); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(102, 102, 102); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(102, 102, 102); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(102, 102, 102); border-top-style: dashed; border-top-width: 1px; color: black; font-family: Courier; font-size: 13px; font-weight: bold; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;&quot;&gt;chmod 750 /etc/init.d/oraemctl&lt;br /&gt;
chkconfig --add oraemctl --level 0356&lt;/div&gt;&lt;br /&gt;
&lt;b&gt;3. (Optional) You may consider to use rlwrap for comfortable work with sqlplus and adrci utility.&lt;/b&gt;&amp;nbsp;RPM package for RedHat compatible (x86) distribution you can download&amp;nbsp;&lt;a href=&quot;http://ivan.kartik.sk/oracle/download_from.php?site_id=5&quot;&gt;here&lt;/a&gt;.&lt;div class=&quot;contentCommand&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #cccccc; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(102, 102, 102); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(102, 102, 102); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(102, 102, 102); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(102, 102, 102); border-top-style: dashed; border-top-width: 1px; color: black; font-family: Courier; font-size: 13px; font-weight: bold; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;&quot;&gt;su -&lt;br /&gt;
# rpm -ivh rlwrap-0.24-rh.i386.rpm&lt;br /&gt;
# exit&lt;br /&gt;
echo &quot;alias sqlplus=&#39;rlwrap sqlplus&#39;&quot; &amp;gt;&amp;gt; /home/oracle/.bash_profile&lt;br /&gt;
echo &quot;alias adrci=&#39;rlwrap adrci&#39;&quot; &amp;gt;&amp;gt; /home/oracle/.bash_profile&lt;br /&gt;
. /home/oracle/.bash_profile&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;&lt;a href=&quot;&quot; name=&quot;st4&quot;&gt;Common Installation Errors&lt;/a&gt;&lt;/h3&gt;&lt;span style=&quot;color: red;&quot;&gt;DISPLAY not set. Please set the DISPLAY and try again.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
Solution: Execute &quot;export DISPLAY=:0.0&quot; when you perform installation on local machine or &quot;export DISPLAY=&lt;clientip&gt;:0.0 when you perform installation on remote machine connected over SSH&quot;. Don&#39;t forget to execute &quot;xhost +&quot; command on client machine.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
Solution: Install libaio and libaio-devel packages. If packages already installed and error still occurs try execute &quot;ldconfig&quot; as root.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;Check complete. The overall result of this check is: Failed &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
Solution: Install missing package or set check system parameters (See reason of failure).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;center&gt;&lt;a href=&quot;&quot; name=&quot;contact&quot;&gt;Comments, suggestions, questions, errors (also grammatical :) )? Feel free to&amp;nbsp;&lt;/a&gt;&lt;a href=&quot;http://ivan.kartik.sk/oracle/install_ora11gR1_elinux.html#contact&quot;&gt;contact me&lt;/a&gt;.&lt;/center&gt;&lt;/clientip&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://emocias.blogspot.com/feeds/5528438004781735892/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4746951324506260429/5528438004781735892' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4746951324506260429/posts/default/5528438004781735892'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4746951324506260429/posts/default/5528438004781735892'/><link rel='alternate' type='text/html' href='http://emocias.blogspot.com/2011/04/installation-of-oracle-11g-release-1-11.html' title=''/><author><name>emocias</name><uri>http://www.blogger.com/profile/05285285831867688681</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://1.bp.blogspot.com/_INA6k_5WIIE/TOK9p4Ht3sI/AAAAAAAAAAQ/aNMCwPAqTsc/S220/vladstudio_xmasnight2_1600x900_love_baroque%255B1%255D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4746951324506260429.post-1468848952772800429</id><published>2011-04-06T15:36:00.002-04:00</published><updated>2011-04-06T15:36:53.187-04:00</updated><title type='text'>Environment variables on Oracle 11g Release 2</title><content type='html'>&lt;ul&gt;&lt;li&gt;Setting up environment variables&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;blockquote&gt;$ vi .bashrc&lt;br /&gt;
# add ORACLE_HOME, ORACLE_BASE and ORACLE_SID&lt;br /&gt;
# example&lt;br /&gt;
export ORACLE_BASE=/db/app/oracle&lt;br /&gt;
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1&lt;br /&gt;
export ORACLE_SID=oracle_sid&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Test&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;blockquote&gt;$ sqlplus /nolog&lt;br /&gt;
SQL&amp;gt; connect / as sysdba&lt;br /&gt;
SQL&amp;gt; &amp;nbsp;startup&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #4c4c4c; font-family: Arial; font-size: 15px; line-height: 25px;&quot;&gt;ORA-01078: failure in processing system parameters&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #4c4c4c; font-family: Arial; font-size: 15px; line-height: 25px;&quot;&gt;LRM-00109: could not open parameter file &#39;anywhere&#39;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;If you are facing the above error while startup of oracle, possible reasons might be the init{ORACLE_SID}.ora file not accessible by oracle user. To solve this problem, you can get your pfile at the location $ORACLE_BASE/admin/$ORACLE_SID/pfile/. A typical file name is init.ora.{NUMBER}. From that location, make a spfile by the following:&lt;/blockquote&gt;&lt;blockquote&gt;$ORACLE_BASE=/db/app/oracle/ and $ORACLE_SID=ora_sid&lt;br /&gt;
$sqlplus /nolog&lt;br /&gt;
SQL&amp;gt; connect / as sysdba&lt;br /&gt;
SQL&amp;gt; create spfile from pfile=&#39;/db/app/oracle/admin/ora_sid/pfile/init.ora.{NUMBER}&lt;br /&gt;
&amp;nbsp; &amp;nbsp;File created.&lt;br /&gt;
SQL&amp;gt; startup&lt;/blockquote&gt;</content><link rel='replies' type='application/atom+xml' href='http://emocias.blogspot.com/feeds/1468848952772800429/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4746951324506260429/1468848952772800429' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4746951324506260429/posts/default/1468848952772800429'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4746951324506260429/posts/default/1468848952772800429'/><link rel='alternate' type='text/html' href='http://emocias.blogspot.com/2011/04/environment-variables-on-oracle-11g.html' title='Environment variables on Oracle 11g Release 2'/><author><name>emocias</name><uri>http://www.blogger.com/profile/05285285831867688681</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://1.bp.blogspot.com/_INA6k_5WIIE/TOK9p4Ht3sI/AAAAAAAAAAQ/aNMCwPAqTsc/S220/vladstudio_xmasnight2_1600x900_love_baroque%255B1%255D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4746951324506260429.post-5142664159688708105</id><published>2011-02-21T17:30:00.000-05:00</published><updated>2011-02-21T17:30:48.350-05:00</updated><title type='text'>Compare with or Compare to?</title><content type='html'>reference:&amp;nbsp;&lt;a href=&quot;http://homepage.smc.edu/quizzes/cheney_joyce/comparewithcompare.html&quot;&gt;http://homepage.smc.edu/quizzes/cheney_joyce/comparewithcompare.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
To identify either the similarities or the differences between two things, use &quot;compare to.&quot; To identify both the similarities and the differences, use &quot;compare with.&quot; In comparing with something, one finds or discusses both things that are alike and things that are different.&lt;br /&gt;
&lt;br /&gt;
[Test]&lt;br /&gt;
1. In order to decide which city to tour, we had to (compare them with, compare them to) each other.&lt;br /&gt;
2. (Compared to, Compared with) running, walking is good for people who have knee problems.&lt;br /&gt;
3. Andy compared his math teacher (with, to) his English teacher and pointed out what they had in common and what they did not.&lt;br /&gt;
4. When Geri compares her old boyfriend (to, with) her new boyfriend, she points out all the ways in which they are alike.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. with&lt;br /&gt;
2. to&lt;br /&gt;
3. with&lt;br /&gt;
4. to</content><link rel='replies' type='application/atom+xml' href='http://emocias.blogspot.com/feeds/5142664159688708105/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4746951324506260429/5142664159688708105' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4746951324506260429/posts/default/5142664159688708105'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4746951324506260429/posts/default/5142664159688708105'/><link rel='alternate' type='text/html' href='http://emocias.blogspot.com/2011/02/compare-with-or-compare-to.html' title='Compare with or Compare to?'/><author><name>emocias</name><uri>http://www.blogger.com/profile/05285285831867688681</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://1.bp.blogspot.com/_INA6k_5WIIE/TOK9p4Ht3sI/AAAAAAAAAAQ/aNMCwPAqTsc/S220/vladstudio_xmasnight2_1600x900_love_baroque%255B1%255D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4746951324506260429.post-824342597016643923</id><published>2011-01-18T14:25:00.000-05:00</published><updated>2011-01-18T14:25:22.061-05:00</updated><title type='text'>Getting the hash value in C++</title><content type='html'>C++ standard provides classes that get the hash value of the string corresponding to the character sequence.&lt;br /&gt;
&lt;br /&gt;
ref - http://cplusplus.com/reference/std/locale/collate/hash/&lt;br /&gt;
&lt;br /&gt;
A hash for a string is a value that uniquely identifies the content of the string, so that two strings with the same hash value, would compare equal by collate::compare, and two strings with different hash values would compare not equal.&lt;br /&gt;
&lt;br /&gt;
Thus, two strings can be easily compared for equality by simply comparing their hash values, which are of an integer type.&lt;br /&gt;
During its operation, the version of this function in the generic template simply calls the virtual protected member do_transform, which is the member function in charge of performing the actions described above.&lt;br /&gt;
&lt;br /&gt;
[Example]&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family: verdana, arial, helvetica, sans-serif; font-size: 12px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;code&gt;&lt;cite style=&quot;color: #007000; font-style: normal;&quot;&gt;// collate::hash example&lt;/cite&gt;
&lt;dfn style=&quot;color: #500070; font-style: normal;&quot;&gt;#include &amp;lt;iostream&amp;gt;&lt;/dfn&gt;
&lt;dfn style=&quot;color: #500070; font-style: normal;&quot;&gt;#include &amp;lt;locale&amp;gt;&lt;/dfn&gt;
&lt;var style=&quot;color: #0000b0; font-style: normal;&quot;&gt;using&lt;/var&gt; &lt;var style=&quot;color: #0000b0; font-style: normal;&quot;&gt;namespace&lt;/var&gt; std;

&lt;var style=&quot;color: #0000b0; font-style: normal;&quot;&gt;int&lt;/var&gt; main ()
{
  string myberry = &lt;kbd style=&quot;color: #600030; font-style: normal;&quot;&gt;&quot;strawberry&quot;&lt;/kbd&gt;;
  string yourberry;

  locale loc;                 &lt;cite style=&quot;color: #007000; font-style: normal;&quot;&gt;// the &quot;C&quot; locale&lt;/cite&gt;

  &lt;var style=&quot;color: #0000b0; font-style: normal;&quot;&gt;const&lt;/var&gt; collate&amp;lt;&lt;var style=&quot;color: #0000b0; font-style: normal;&quot;&gt;char&lt;/var&gt;&amp;gt;&amp;amp; coll = use_facet&amp;lt;collate&amp;lt;&lt;var style=&quot;color: #0000b0; font-style: normal;&quot;&gt;char&lt;/var&gt;&amp;gt; &amp;gt;(loc);

  &lt;var style=&quot;color: #0000b0; font-style: normal;&quot;&gt;long&lt;/var&gt; myhash = coll.hash(myberry.data(),myberry.data()+myberry.length());

  cout &amp;lt;&amp;lt; &lt;kbd style=&quot;color: #600030; font-style: normal;&quot;&gt;&quot;Please, enter your favorite berry:&quot;&lt;/kbd&gt;;
  getline (cin,yourberry);

  &lt;var style=&quot;color: #0000b0; font-style: normal;&quot;&gt;long&lt;/var&gt; yourhash = coll.hash(yourberry.data(),yourberry.data()+yourberry.length());

  &lt;var style=&quot;color: #0000b0; font-style: normal;&quot;&gt;if&lt;/var&gt; (myhash == yourhash)
    cout &amp;lt;&amp;lt; &lt;kbd style=&quot;color: #600030; font-style: normal;&quot;&gt;&quot;Mine too!\n&quot;&lt;/kbd&gt;;
  &lt;var style=&quot;color: #0000b0; font-style: normal;&quot;&gt;else&lt;/var&gt;
    cout &amp;lt;&amp;lt; &lt;kbd style=&quot;color: #600030; font-style: normal;&quot;&gt;&quot;I prefer strawberries...\n&quot;&lt;/kbd&gt;;

  &lt;var style=&quot;color: #0000b0; font-style: normal;&quot;&gt;return&lt;/var&gt; 0;
}&lt;/code&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://emocias.blogspot.com/feeds/824342597016643923/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4746951324506260429/824342597016643923' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4746951324506260429/posts/default/824342597016643923'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4746951324506260429/posts/default/824342597016643923'/><link rel='alternate' type='text/html' href='http://emocias.blogspot.com/2011/01/getting-hash-value-in-c.html' title='Getting the hash value in C++'/><author><name>emocias</name><uri>http://www.blogger.com/profile/05285285831867688681</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://1.bp.blogspot.com/_INA6k_5WIIE/TOK9p4Ht3sI/AAAAAAAAAAQ/aNMCwPAqTsc/S220/vladstudio_xmasnight2_1600x900_love_baroque%255B1%255D.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4746951324506260429.post-6445321841344117900</id><published>2011-01-05T09:16:00.003-05:00</published><updated>2011-01-05T09:25:11.083-05:00</updated><title type='text'>Vi Set</title><content type='html'>&lt;blockquote dir=&quot;ltr&quot; style=&quot;margin-right: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 2px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; line-height: 19px;&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;:set ai (autoindeant)&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;윗라인과 같이 자동으로 들려쓰기를 해 줍니다.&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;blockquote dir=&quot;ltr&quot; style=&quot;margin-right: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 2px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;:set nu(number) or nonu(nonumber)&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;blockquote dir=&quot;ltr&quot; style=&quot;margin-right: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 2px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d;&quot;&gt;&lt;b&gt;:set showmatch or noshowmatch&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;blockquote dir=&quot;ltr&quot; style=&quot;margin-right: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 2px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; line-height: 19px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;:set si&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;코딩 할때 if, for 같은 것을 입력 하고 다음 라인으로 이동시 자동으로 들여쓰기를해줍니다.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;:set paste&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;set ai, set si 같은 옵션을 사용할 경우 붙여 넣기를 하면 계단현상이&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;발생함으로 붙여 넣기 할경우에 이 옵션을 켜주면 방지할 수 있음&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;:set ts=4 (tabstop)&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;[tab] 키를 입력 하였을때 이동하는 크기를 조정 합니다.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;:set sw=4 (shiftwidth)&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;&quot;set si&quot; 했을 경우 들려쓰기 하는 깊이를 설정 합니다.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;:set et (expandtab)&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;[tab] 키를 입력 하였을때 tab에 대당하는 space 만큼 이동 됩니다.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;(Python 언어 코딩 할때 매우 편리 합니다.)&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;:set encoding=cp949 or utf-8&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;작업 하는 컴퓨터 또는 개발 언어에서 기본 인코딩 타입을 설정 할 수 있습니다.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;:set t_ti= t_te=&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;터미널 환경에서 vi를 종료 할때, 편집 하던 화면이 그대로 남도록 함&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;BSD 에서는 기본값인데, Linux 에서는 화면이 지워집니다.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;BSD 환경에 익숙한 사람은 여간 불편한게 아니랍니다. 이 옵션을 주시면&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;바로 해결 됩니다.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;:set ruler&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;우측 하단에 라인 및 컬럼 위치 표시및 전체 문서의 위치를 %로 표시&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;:set ff=unix &amp;nbsp;(dos, mac)&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;라인변경 문자를 변경합니다.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;:set key=&amp;lt;password&amp;gt;, set key=&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;문서를 암호화 시키고, 암호를 풀수 있음&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;:set ic (ignorecase)&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;검색패턴 사용시 대소문자를 구별 하지 않음&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;:set wam&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;저장하지 않고 종료시에 경고메시지 출력&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;:set sm (showmatch)&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;가로를 닫을때 열기 괄호를 보여줌&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;&amp;nbsp;[참고]&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;&amp;nbsp;* 알고 있겠지만 모든 명령의 취소는 no를 앞에 붙여 주시면 됩니다.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; 예) &amp;nbsp;:set noai&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;&amp;nbsp;* 항상 같은 설정이 되도록 하려면 UNIX는 홈디렉토리 아래에 .vimrc 에 넣어 주시구요&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; windows 는 &amp;nbsp;vim 설치 디렉토리에 _vimrc 파일에 넣어 주시면 됩니다.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; 예) set ts=4&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; set si&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; set ai&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; set sw=4&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; set encoding=cp494&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;vi 편집 작업시&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;&amp;nbsp;1) 화면 스크롤&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;^F : 한 화면 앞으로 스크롤&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; ^B : 한 화면 뒤로 스크롤&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; ^D : 반 화면 앞으로 스크롤&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; ^U : 반 화면 뒤로 스크롤&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; ^E : 한줄 앞으로 스크롤&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; ^Y : 한줄 뒤로 스크롤&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;H (shift+h) : 화면의 맨 윗줄로&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;M (shift+m) : 화면의 중간 줄로&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;L (shift+l): 화면의 맨 아랫줄로&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;&amp;nbsp;2) 화면 나누기&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; : vs &amp;nbsp;--&amp;gt; 수직으로 나눔&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; : sp &amp;nbsp;--&amp;gt; 스평으로 나눔&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; ^ww &amp;nbsp; --&amp;gt; 화면 간의 이동&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;&amp;nbsp;3) 글자 변경&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; Ctrl + A &amp;nbsp;--&amp;gt; 커서 위치의 숫자 증가&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; Ctrl + A &amp;nbsp;--&amp;gt; 커서 위치의 숫자 감소&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;&amp;nbsp;4) 마크 이동&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; m[a~z] --&amp;gt; 현재의 위치를 기록&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&#39;[a~z] &amp;nbsp;--&amp;gt; 기록한 위치로 이동&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&#39;&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp;--&amp;gt; 이동하기 전의 위치로 이동&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;&amp;nbsp;5) 접기&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;V 로 블럭 설정을 한후에 &#39;zf&#39; 하면 접힘&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&#39;zo&#39; 를 하면 다시 펴짐&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;&amp;nbsp;6) 함수/변수명 자동 완성&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; 호출 하고자 하는 변수명이나 함수명의 앞글자만 쓰고서 ^p 를 입력 하면 자동 완성 됨&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;&amp;nbsp;7) 잠시 쉘로 나가기&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6d6d6d; font-family: inherit;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; ^z, 들어 올때는 fg&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;</content><link rel='replies' type='application/atom+xml' href='http://emocias.blogspot.com/feeds/6445321841344117900/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4746951324506260429/6445321841344117900' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4746951324506260429/posts/default/6445321841344117900'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4746951324506260429/posts/default/6445321841344117900'/><link rel='alternate' type='text/html' href='http://emocias.blogspot.com/2011/01/vi-set.html' title='Vi Set'/><author><name>emocias</name><uri>http://www.blogger.com/profile/05285285831867688681</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://1.bp.blogspot.com/_INA6k_5WIIE/TOK9p4Ht3sI/AAAAAAAAAAQ/aNMCwPAqTsc/S220/vladstudio_xmasnight2_1600x900_love_baroque%255B1%255D.jpg'/></author><thr:total>0</thr:total></entry></feed>