tag:blogger.com,1999:blog-84793690715934596092024-03-14T10:02:49.465+06:00Notes from SAOSSupport on Major Operating Systems and SoftwareAtiqhttp://www.blogger.com/profile/14093941178872744344noreply@blogger.comBlogger96125tag:blogger.com,1999:blog-8479369071593459609.post-37167458135874849982011-05-28T05:28:00.003+06:002017-09-06T02:10:31.811+06:00I hate scripting but love it when it saves time!!The post has moved to SAOSLab's blog on Microsoft Azure:<br />
<a href="https://fftsys.azurewebsites.net/atiq/tech/Scripts-for-Windows-and-Linux">FFTSys Tech Blog on Azure Clound</a>Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-8479369071593459609.post-50514331859973494292011-05-20T16:16:00.011+06:002011-05-20T17:20:08.952+06:00PingGuin, Net Notifier Software<div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-v-pQdJD9s68/TdZHfWYdxpI/AAAAAAAAAkI/k6RN1KF6-lY/s1600/PingStory02.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://1.bp.blogspot.com/-v-pQdJD9s68/TdZHfWYdxpI/AAAAAAAAAkI/k6RN1KF6-lY/s320/PingStory02.jpg" width="320" /></a></div><br />
<div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Software is about making life easier. It's right that to check whether internet is available we make command line ping requests. To know whether the connection is really active we can just ping to www.anydomain.com i.e; </span><span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><a href="http://www.saosx.com/">www.saosx.com</a></span><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">. Whenever this ping fails we ping to our default gateway to check whether gateway is reachable. A gap between the host and gateway will result unreachability to web servers. When gateway is reachable we further need to check whether DNS servers are reachable. So we need more two pings. I always thought about automating these tasks. I have once indeed written a script that does all these works. Well, that's another story.</span><span class="fullpost"><br />
<br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;">I wanted to create a software for general people who can use this tool to automate the ping process to all three servers (gateway, pri dns, sec dns) . Moreover, I implemented feature to show balloon tips on the taskbar notification area whenever internet is available.</span><br />
<br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;">I have made attempts to make the software as user friendly as possible. When start the software the initial dialog box is shown which has a static box that updates whether internet is available or not. In that window I have enabled automatic retrieval of network interface settings so that user don't have to go through tedious typing everytime he/she starts the software.</span><br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-LCo4V66pi0g/TdZI2uqRAZI/AAAAAAAAAkQ/pZuuAzqTfK0/s1600/PingGuin01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://1.bp.blogspot.com/-LCo4V66pi0g/TdZI2uqRAZI/AAAAAAAAAkQ/pZuuAzqTfK0/s320/PingGuin01.png" width="304" /></a></div><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;">It is really amazing that the entire internet is running on kindness and openness of people. Why not I contribute some from my side! That's the reason behind my delivering of this software as open-source. Together we make a better world. I don't want others to go through same tedious procedure during building components for my software. You can straight visit my project source code here:<br />
<a href="http://code.google.com/p/pingguin/source/browse/#svn%2Ftrunk">http://code.google.com/p/pingguin/source/browse/#svn%2Ftrunk</a></span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"> It's an opensource project. You have freedom to use my code. But please acknowledge me and my project in comment. I will also welcome anyone to contribute in this project. Contribution can be of many forms. May be pointing out a bug, suggesting features that should be included in the future release or working with the code directly and improving the quality of work.</span><br />
<br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;">I would like to acknowledge my endless debts to msdn, microsoft forums, codeproject and all the forgotten resources of internet that helped me to get new ideas and develop and nourish them. <a href="http://msdn.microsoft.com/">msdn</a> is Microsoft Developer Network and forum for VC++ is available here: <a href="http://social.msdn.microsoft.com/Forums/en/category/visualc">http://social.msdn.microsoft.com/Forums/en/category/visualc</a> while <a href="http://www.codeproject.com/">codeproject</a> is an awesome website for helping developers across many programming languages and frameworks.</span><br />
<br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Native Software developers can take help on following topics from my this project:</span><br />
<ol><li><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Standard mechanism of accessing Windows Management Instrumentation information</span></li>
<li><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">DNS Lookup and PING API (alway check msdn for reference)</span></li>
<li><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Showing Balloon Tips and adding icon in the taskbar</span></li>
<li><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Displaying menu from resource using tray icon</span></li>
<li><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Creating Windows Threads using structure</span></li>
<li><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Unicode string manipulation (using tchar library)</span></li>
<li><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Creating Installer for Native Software (see PingGuin_Installer in the <a href="http://code.google.com/p/pingguin/source/browse/#svn%2Ftrunk%2FPingGUIN_Installer">svn trunk</a>)</span></li>
</ol><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">I'm building an API for network tools and parsing other types of information some of which release under project </span><span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><a href="http://code.google.com/p/sasubsync/">sasubsync</a></span><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">, </span><span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><a href="http://code.google.com/p/wiresharkparser/">Wireshark Parser</a></span><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">, Stutdown Timer, Blogger Code editor etc. A compendium will be provided in my site in future. So in related topics you are welcome to take help. If some code isn't available you can ask me.</span><br />
<br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;">By this time when I'm writing this post this software is available for Windows only. I'm checking user responses. According to that I'll decide whether to release for other platforms. You can download installer of pingguin for windows from here:<br />
<a href="http://code.google.com/p/pingguin/downloads/list">http://code.google.com/p/pingguin/downloads/list</a></span><br />
<br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;">This software is built in my off-time (killing my traveling time, yeah I call this little exploring in this universe as traveling, you can't sue me until you're oracle! :P). Hence, this software has still no relation with my software company, <a href="http://www.revesoft.com/home/index.php">Reve Systems</a>. It's all about <a href="http://code.google.com/p/pingguin/">pingguin</a>, a net notifier software. You are welcome to visit: </span><a href="http://code.google.com/p/pingguin/">http://code.google.com/p/pingguin/</a></div></span>Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-8479369071593459609.post-19821032456960391262011-01-19T05:08:00.005+06:002016-07-26T13:05:24.703+06:00Blog is migrating<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
<div style="text-align: start;">
The post has moved here:</div>
<div style="text-align: start;">
<a href="http://blog.fftsys.com/tech/install-unibijoy-avro-keyboard">http://blog.fftsys.com/tech/install-unibijoy-avro-keyboard</a></div>
</div>
<span class="fullpost">
</span></div>
Unknownnoreply@blogger.com5tag:blogger.com,1999:blog-8479369071593459609.post-89038802541934334642011-01-02T02:10:00.006+06:002011-01-25T00:38:53.184+06:00Installing Latex on Windows and Linux and Latex Document Compilation Instructions<div style="text-align: justify;"><span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">In this article, I’ll present some tips and tricks on how to do certain things on latex such as adding sections, subsections, inserting images and writing equations etc. Then I’ll provide a sample tex file and instructions for compiling the file using latex along with installation instructions of latex software on various operating systems.</span><br />
<br />
<span style="color: #4f81bd; font-family: Arial, sans-serif; font-size: 150%; line-height: 15px; white-space: normal;">Adding sections and subsections in latex documents</span><br />
<br />
<span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">To add a section, use section tag. Here’s an example,</span><br />
<span style="line-height: 15px; white-space: normal; font-family: Courier New, sans-serif; font-size: small;"><br />
<table width="100%" border="1" cellpadding="1"><tr><td nowrap="1"><pre>\section{Overview}</pre></td></tr>
</table></span></div><span class="fullpost"><div style="text-align: justify;"><span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">If this section is in a chapter it is preceded by a numbering. For example, if it is chapter 1 numbering is 1.1, 1.2 etc.<br />
<br />
If you want to add a subsection under a section use use subsection tag. Here's an example,</span><br />
<span style="line-height: 15px; white-space: normal; font-family: Courier New, sans-serif; font-size: small;"><br />
<table width="100%" border="1" cellpadding="1"><tr><td nowrap="1"><pre>\subsection{Formulation}</pre></td></tr>
</table></span><br />
<span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">It will have numbering like 1.1.1, 1.1.2 etc. If you need subsections under subsection, use subsubsection tag.<br />
<br />
No more nesting (after 3 levels) is supported.</span><br />
<br />
<span style="color: #4f81bd; font-family: Arial, sans-serif; font-size: 150%; line-height: 15px; white-space: normal;">How to insert images on latex documents</span><br />
<br />
<span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">The first thing you need to do is to convert your image (jpg, png, gif etc) to eps (a postscript format) which is easy to convert to pdf. To convert an image to eps format you need ImageMagick. In fedora installation command of ImageMagick is</span><br />
<span style="line-height: 15px; white-space: normal; font-family: Courier New, sans-serif; font-size: small;"><br />
<table width="100%" border="1" cellpadding="1"><tr><td nowrap="1"><pre># <b><kbd>yum install ImageMagick</kbd></b></pre></td></tr>
</table></span><br />
<span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">In Windows you can install ImageMagick after downloading from <a href="http://www.imagemagick.org/download/binaries/">http://www.imagemagick.org/download/binaries/</a><br />
<br />
Current latest release direct link for Windows:<br />
<a href="http://www.imagemagick.org/download/binaries/ImageMagick-6.6.6-7-Q16-windows-dll.exe">http://www.imagemagick.org/download/binaries/ImageMagick-6.6.6-7-Q16-windows-dll.exe</a><br />
<br />
Now use the convert command to convert the image.</span><br />
<span style="line-height: 15px; white-space: normal; font-family: Courier New, sans-serif; font-size: small;"><br />
<table width="100%" border="1" cellpadding="1"><tr><td nowrap="1"><pre>$ <b><kbd>convert filename.jpg filename.eps</kbd></b></pre></td></tr>
</table></span><br />
<span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">In widows you have to put the installation path as well with the command. For example, if it installed in C:\Program Files\ImageMagick directory.</span><br />
<span style="line-height: 15px; white-space: normal; font-family: Courier New, sans-serif; font-size: small;"><br />
<table width="100%" border="1" cellpadding="1"><tr><td nowrap="1"><pre>C:> <b><kbd>“C:\Program Files\ImageMagick\convert.exe” filename.jpg filename.eps</kbd></b></pre></td></tr>
</table></span><br />
<span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">To view eps files you need ghostscript. In Windows, you can install ghostscript from here:<br />
<a href="http://ghostscript.com/releases/gs900w32.exe">http://ghostscript.com/releases/gs900w32.exe</a><br />
<br />
In Fedora, you have to apply following command as root to install ghostscript,</span><br />
<span style="line-height: 15px; white-space: normal; font-family:Courier New, sans-serif; font-size: small;"><br />
<table width="100%" border="1" cellpadding="1"><tr><td nowrap="1"><pre># <b><kbd>yum install ghostscipt</kbd></b></pre></td></tr>
</table></span><br />
<span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">Now it’s time to include the eps file on tex. Use figure tag to make caption, includegraphics command to include the image. You need to specify the correct path of your image in \includegraphics command. Here’s an example,</span><br />
<span style="line-height: 15px; white-space: normal; font-family: Courier New, sans-serif; font-size: small;"><br />
<table width="100%" border="1" cellpadding="1"><tr><td nowrap="1"><pre><pre style="color:#ffffff; background-color:#000040; font-size:10pt; font-family:'Courier New';"><span style="color:#e5d28e"> 1 </span>\begin<span style="color:#bababa">{</span>figure<span style="color:#bababa">}[</span>htbp<span style="color:#bababa">]</span>
<span style="color:#e5d28e"> 2 </span> \centering
<span style="color:#e5d28e"> 3 </span>\includegraphics<span style="color:#bababa">{</span>.<span style="color:#bababa">/</span>Figures<span style="color:#bababa">/</span>SA_Spheric.eps<span style="color:#bababa">}</span>
<span style="color:#e5d28e"> 4 </span> \caption<span style="color:#bababa">{</span>Latitude and Longitude \<span style="color:#60ff60">label</span><span style="color:#bababa">{</span> Latitude and Longitude <span style="color:#bababa">}}</span>
<span style="color:#e5d28e"> 5 </span>\<span style="color:#e2e825">end</span><span style="color:#bababa">{</span>figure<span style="color:#bababa">}</span>
</pre></pre></td></tr>
</table></span><br />
<span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">Set the caption text and label text same. Label text is used on List of figures. In a template they are automatically numbered according to chapter. If you need to scale up image to half of its size use scalebox tag along with includegraphics.</span><br />
<span style="line-height: 15px; white-space: normal; font-family: Courier New, sans-serif; font-size: small;"><br />
<table width="100%" border="1" cellpadding="1"><tr><td nowrap="1"><pre>\scalebox{0.5}{ \includegraphics{./Figures/SA_Spheric.eps}}
</pre></td></tr>
</table></span><br />
<br />
<span style="color: #4f81bd; font-family: Arial, sans-serif; font-size: 150%; line-height: 15px; white-space: normal;">Writing scientific/math equations in latex</span><br />
<br />
<span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">If your equations require numbering on right side use this tag,</span><br />
<span style="line-height: 15px; white-space: normal; font-family: Courier New, sans-serif; font-size: small;"><br />
<table width="100%" border="1" cellpadding="1"><tr><td nowrap="1"><pre>\begin{equation} Your math exp \end{equation}</pre></td></tr>
</table></span><br />
<span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">For example,</span><br />
<span style="line-height: 15px; white-space: normal; font-family: Courier New, sans-serif; font-size: small;"><br />
<table width="100%" border="1" cellpadding="1"><tr><td nowrap="1"><pre>\begin{equation}\int r = \sqrt[2]{x^2 + y^2 + z^2}\end{equation}</pre></td></tr>
</table></span><br />
<span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">But if your equation doesn’t require numbering use tag like this,</span><br />
<span style="line-height: 15px; white-space: normal; font-family: Courier New, sans-serif; font-size: small;"><br />
<table width="100%" border="1" cellpadding="1"><tr><td nowrap="1"><pre>\begin{math} Your math exp \end{math}</pre></td></tr>
</table></span><br />
<span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">For example,<br />
</span><br />
<span style="line-height: 15px; white-space: normal; font-family: Courier New, sans-serif; font-size: small;"><br />
<table width="100%" border="1" cellpadding="1"><tr><td nowrap="1"><pre>Our equation is, \begin{math}\int r = \sqrt[2]{x^2 + y^2 + z^2}\end{math}. Proof ...</pre></td></tr>
</table></span><br />
<span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">Integration symbol: \int<br />
<br />
To show only root sign not n-th root use tag: \sqrt{x}, replace x with your expression or symbol<br />
<br />
To show nth root use tag: \sqrt[n]{x}<br />
<br />
To show fractions like ½ use \frac tag. Example,</span><br />
<span style="line-height: 15px; white-space: normal; font-family: Courier New, sans-serif; font-size: small;"><br />
<table width="100%" border="1" cellpadding="1"><tr><td nowrap="1"><pre>thd = \frac{1}{n}</pre></td></tr>
</table></span><br />
<span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">For summation sign use \sum tag,</span><br />
<span style="line-height: 15px; white-space: normal; font-family: Courier New, sans-serif; font-size: small;"><br />
<table width="100%" border="1" cellpadding="1"><tr><td nowrap="1"><pre>\sum\limits_{i = 1}^n Abs (t_i - t_{i-1})\end{equation}</pre></td></tr>
</table></span><br />
<span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">\limits is used to set limits on summation sign. Here, i=1 goes down and n goes up. You write texts preceding _ to put them down (subscript) and use ^ to superscript.<br />
<br />
For using only one math symbol you can use \ensuremath{} tag. For example,</span><br />
<span style="line-height: 15px; white-space: normal; font-family: Courier New, sans-serif; font-size: small;"><br />
<table width="100%" border="1" cellpadding="1"><tr><td nowrap="1"><pre>If angle in degree is \ensuremath{\theta} then the slope is ..</pre></td></tr>
</table></span><br />
<span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">Here are latex tags for some of the math symbols:</span><br />
<span style="line-height: 15px; white-space: normal; font-family: Courier New, sans-serif; font-size: small;"><br />
<table width="100%" border="1" cellpadding="1"><tr><td nowrap="1"><pre>\Phi
\lambda
\Pi
\epsilon</pre></td></tr>
</table></span><br />
<span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">You can find a detailed list of latex symbols here:<br />
<a href="http://web.ift.uib.no/Teori/KURS/WRK/TeX/symALL.html">http://web.ift.uib.no/Teori/KURS/WRK/TeX/symALL.html</a><br />
</span><br />
<br />
<span style="color: #4f81bd; font-family: Arial, sans-serif; font-size: 150%; line-height: 15px; white-space: normal;">Installation Instructions of Latex for Fedora Core</span><br />
<br />
<span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">Apply following commands after opening a terminal and logging into root. Alternatively you can apply su command and provide root password for instant switching.</span><br />
<span style="line-height: 15px; white-space: normal; font-family: Courier New, sans-serif; font-size: small;"><br />
<table width="100%" border="1" cellpadding="1"><tr><td nowrap="1"><pre>$ su
Password:
# yum install tetex-latex evince-dvi xdvik
</pre></td></tr>
</table></span><br />
<br />
<span style="color: #4f81bd; font-family: Arial, sans-serif; font-size: 150%; line-height: 15px; white-space: normal;">Installation Instructions of Latex for Ubuntu</span><br />
<br />
<span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">Apply following commands if you are using Ubuntu</span><br />
<span style="line-height: 15px; white-space: normal; font-family: Courier New, sans-serif; font-size: small;"><br />
<table width="100%" border="1" cellpadding="1"><tr><td nowrap="1"><pre># sudo apt-get install tetex-base tetex-bin
</pre></td></tr>
</table></span><br />
<br />
<span style="color: #4f81bd; font-family: Arial, sans-serif; font-size: 150%; line-height: 15px; white-space: normal;">Installation Instructions for Windows (XP, Vista, Seven)</span><br />
<br />
<span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">Download basic-miktex from here: <a href="http://miktex.org/2.9/setup">http://miktex.org/2.9/setup</a> and run the installer.</span><br />
<br />
<br />
<span style="color: #4f81bd; font-family: Arial, sans-serif; font-size: 150%; line-height: 15px; white-space: normal;">Compiling Tex Documents</span><br />
<br />
<span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">Now let’s learn how to compile latex document file. Here’s a sample tex file,</span><br />
<span style="line-height: 15px; white-space: normal; font-family: Courier New, sans-serif; font-size: small;"><br />
<table width="100%" border="1" cellpadding="1"><tr><td nowrap="1"><pre><pre style="color:#ffffff; background-color:#000040; font-size:10pt; font-family:'Courier New';">\documentclass<span style="color:#bababa">[</span><span style="color:#42cad9">12</span>pt<span style="color:#bababa">]{</span>article<span style="color:#bababa">}</span>
\usepackage<span style="color:#bababa">{</span>amsmath<span style="color:#bababa">}</span>
\title<span style="color:#bababa">{</span>\LaTeX<span style="color:#bababa">}</span>
\<span style="color:#60ff60">date</span><span style="color:#bababa">{}</span>
\begin<span style="color:#bababa">{</span>document<span style="color:#bababa">}</span>
\maketitle
\LaTeX<span style="color:#bababa">{}</span> is a document preparation system <span style="color:#e2e825">for</span> the \TeX<span style="color:#bababa">{}</span>
typesetting program. It offers programmable desktop publishing
features and extensive facilities <span style="color:#e2e825">for</span> automating most aspects of
typesetting and desktop publishing<span style="color:#bababa">,</span> including numbering and
cross<span style="color:#bababa">-</span>referencing<span style="color:#bababa">,</span> tables and figures<span style="color:#bababa">,</span> page layout<span style="color:#bababa">,</span> bibliographies<span style="color:#bababa">,</span>
and much more. \LaTeX<span style="color:#bababa">{}</span> was originally written in <span style="color:#42cad9">1984</span> by Leslie
Lamport and has become the dominant method <span style="color:#e2e825">for</span> using \TeX<span style="color:#bababa">;</span> few
people write in plain \TeX<span style="color:#bababa">{}</span> anymore. The current version is
\LaTeXe.
<span style="color:#bababa">%</span> This is a comment<span style="color:#bababa">;</span> it is <span style="color:#e2e825">not</span> shown in the final output.
<span style="color:#bababa">%</span> The following shows a little of the typesetting power of LaTeX<span style="color:#bababa">:</span>
\begin<span style="color:#bababa">{</span>align<span style="color:#bababa">}</span>
E <span style="color:#bababa">&=</span> mc^<span style="color:#42cad9">2</span> \\
m <span style="color:#bababa">&=</span> \frac<span style="color:#bababa">{</span>m_0<span style="color:#bababa">}{</span>\sqrt<span style="color:#bababa">{</span><span style="color:#42cad9">1</span><span style="color:#bababa">-</span>\frac<span style="color:#bababa">{</span>v^<span style="color:#42cad9">2</span><span style="color:#bababa">}{</span>c^<span style="color:#42cad9">2</span><span style="color:#bababa">}}}</span>
\<span style="color:#e2e825">end</span><span style="color:#bababa">{</span>align<span style="color:#bababa">}</span>
\<span style="color:#e2e825">end</span><span style="color:#bababa">{</span>document<span style="color:#bababa">}</span>
</pre></pre></td></tr>
</table></span><br />
<span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">Open a text editor. Create a new file and paste the code given above. Save the file with name test.tex.<br />
<br />
Now let’s compile the tex file. In Linux, apply following commands on terminal</span><br />
<span style="line-height: 15px; white-space: normal; font-family: Courier New, sans-serif; font-size: small;"><br />
<table width="100%" border="1" cellpadding="1"><tr><td nowrap="1"><pre>$ <b><kbd>latex test.tex
$ dvipdf test.dvi
</kbd></b></pre></td></tr>
</table></span><br />
<span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">A pdf file will be generated with same filename. In Linux if you need to view dvi files you can use either evince or xdvi</span><br />
<span style="line-height: 15px; white-space: normal; font-family: Courier New, sans-serif; font-size: small;"><br />
<table width="100%" border="1" cellpadding="1"><tr><td nowrap="1"><pre>$ <b><kbd>evince test.dvi &
$ xdvi test.dvi &
</kbd></b></pre></td></tr>
</table></span><br />
<span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">In Windows, you might skip generating dvi files. You can use pdflatex.<br />
<br />
To compile tex files in Windows you need to apply following command,</span><br />
<span style="line-height: 15px; white-space: normal; font-family: Courier New, sans-serif; font-size: small;"><br />
<table width="100%" border="1" cellpadding="1"><tr><td nowrap="1"><pre>D:> <b><kbd>"C:\Program Files\TeX\miktex\bin\pdflatex.exe" test.tex</kbd></b></pre></td></tr>
</table></span><br />
<span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">assuming "C:\Program Files\TeX” is your installation directory for basic-miktex.<br />
<br />
If there is no error on the tex file it will generate a pdf document which you can open using a pdf reader like Adobe pdf reader or Foxit Reader.</span><br />
<br />
<span style="color: #4f81bd; font-family: Arial, sans-serif; font-size: 150%; line-height: 15px; white-space: normal;">More tips and tricks</span><br />
<br />
<span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">Here’s an example of using bullets for following texts:</span><span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small; color: green;"><ul><li>Dining and canteen system</li>
<li>Library, reading room system</li>
<li>Debate,language club system</li>
<li>Games and sports system</li>
<li>Washing and cleaning system and Utensil management</li>
</ul></span><span style="line-height: 15px; white-space: normal; font-family: Courier New, sans-serif; font-size: small;"><br />
<table width="100%" border="1" cellpadding="1"><tr><td nowrap="1"><pre>\begin{itemize}
\item {Dining and canteen system}
\item {Library, reading room system}
\item {Debate,language club system}
\item {Games and sports system }
\item {Washing and cleaning system and Utensil management }
\end{itemize}</pre></td></tr>
</table></span><br />
<br />
<span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;"><b>Using tables</b><br />
Follow this link: <a href="http://en.wikibooks.org/wiki/LaTeX/Tables">http://en.wikibooks.org/wiki/LaTeX/Tables</a> It explains tables well.<br />
<br />
<b>Adding newlines: </b>use \\ to add a newline<br />
<br />
<b>Using Bold styles: </b> Use \textbf{text here} tag to bold your text.<br />
<br />
<b>Italicizing texts: </b>You can use \emph tag or \textit tag to italicize your text. Example,</span><br />
<span style="line-height: 15px; white-space: normal; font-family: Courier New, sans-serif; font-size: small;"><br />
<table width="100%" border="1" cellpadding="1"><tr><td nowrap="1"><pre><b><kbd>\emph{set your text here}
\textit{set your text here }
</kbd></b></pre></td></tr>
</table></span><br />
<span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;"><b>Subscripting: </b>Write texts preceding _ to make them subscripted. To write xi type x_i<br />
<br />
<b>Superscript: </b> use ^ to superscript. To write x^2 use x^2 exactly.<br />
</span><br />
<br />
<span style="color: #4f81bd; font-family: Arial, sans-serif; font-size: 150%; line-height: 15px; white-space: normal;">Troubleshooting</span><br />
<br />
<span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">If you get errors like this frequently,</span><br />
<span style="line-height: 15px; white-space: normal; font-family: Courier New, sans-serif; font-size: small;"><br />
<table width="100%" border="1" cellpadding="1"><tr><td nowrap="1"><pre><b><kbd>! Missing $ inserted.
<inserted text>
$
l.128 ...Distance (C_{i}, C_j)\end{math}, where K_
i, K_j is Cluster.
?
</kbd></b></pre></td></tr>
</table></span><br />
<span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">Latex expects including math tag during usage of math notations like superscript, subscript and symbols. Here’s an example,</span><br />
<span style="line-height: 15px; white-space: normal; font-family: Courier New, sans-serif; font-size: small;"><br />
<table width="100%" border="1" cellpadding="1"><tr><td nowrap="1"><pre><b><kbd>\begin{math} Your expression for example C_i end{math}</kbd></b></pre></td></tr>
</table></span><br />
<span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">When this syntax is ensured latex will not display those error messages anymore.</span></div></span>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8479369071593459609.post-84788207567340429102010-12-22T16:06:00.004+06:002011-01-25T00:50:04.922+06:00How to Update Fedora Core 13 to Fedora Core 14<div style="text-align: justify;"><span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">The process is simple. We have to apply some commands on terminal mode. After that update will be done using internet.<br />
<br />
It means we need internet on terminal. But when GUI closes; internet that is configured with NetworkManager is lost. Hence we have to try other way out.<br />
<br />
First, install system-config-network and then stop Network Manager Daemon</span><br />
<br />
<span style="line-height: 15px; white-space: normal; font-family: Courier New, sans-serif; font-size: small;"><table width="100%" border="1" cellpadding="1"><tr><td nowrap="1"><pre># <b><kbd>yum install system-config-network
# service NetworkManager stop</kbd></b></pre></td></tr>
</table></span></div><span class="fullpost"><div style="text-align: justify;"><span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">Now open system-config-network using system-config-network command on the terminal or run. Enter root password if it asks for.<br />
<br />
Untick the option "Controlled by Network Manager". Click apply. Now switch to terminal mode by pressing Alt + Ctrl + F2. Log in as root.</span><br />
<br />
<span style="line-height: 15px; white-space: normal; font-family: Courier New, sans-serif; font-size: small;"><table width="100%" border="1" cellpadding="1"><tr><td nowrap="1"><pre># <b><kbd>init 3</kbd></b></pre></td></tr>
</table></span></div><br />
<div style="text-align: left;"><span style="font-family: Arial, Helvetica, sans-serif; font-size: 150%; color: #b45f06;">Doing the update</span></div><div style="text-align: justify;"><span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">After it is done press enter and enter following commands.<br />
</span><br />
<span style="line-height: 15px; white-space: normal; font-family: Courier New, sans-serif; font-size: small;"><table width="100%" border="1" cellpadding="1"><tr><td nowrap="1"><pre># <b><kbd>rpm --import https://fedoraproject.org/static/97A1071F.txt
# yum update yum
# yum --releasever=14 distro-sync --skip-broken
</kbd></b></pre></td></tr>
</table></span></div><br />
<div style="text-align: left;"><span style="font-family: Arial, Helvetica, sans-serif; font-size: 150%; color: #b45f06;">Accelerate Linux with the ISP ISPROS and other ISPs which support GNU Mirror</span><br />
<span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">After update reboot your system using reboot command. After restart select Fedora 14 from Boot Menu. Once System is booted into Fedora 14 update the system using yum.</span><br />
<br />
<span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">If your ISP has its own GNU Linux Mirror then update will be very fast. With around 300 KBPS it will take around half an with an decent configuration PC.<br />
<br />
Bangladeshi Linux users can have this benefit with <a href="http://www.ispros.com.bd/mirrors/">ISPROS</a> isp. They have <a href="http://mirrors.ispros.com.bd/ubuntu-release">ubuntu mirror</a>, <a href="http://mirrors.ispros.com.bd/">fedora mirror</a>, <a href="http://mirrors.ispros.com.bd/">cent-os mirror</a> and <a href="http://mirrors.ispros.com.bd/gnu">gnu mirror</a> and some other useful mirrors(apache, php etc).<br />
<br />
One thing more if your Fedora yum does not choose ISPROS as mirror you can force it by changing fedora.repo Set your mirror list to this url: http://mirrors.ispros.com.bd/fedora/releases/$releasever/Everything/$basearch/os/ by editing the file /etc/yum.repos.d/fedora.repo.<br />
<br />
Enjoy Linux with ISPROS.<br />
</span></div></span>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8479369071593459609.post-79948197817592251192010-12-01T16:56:00.002+06:002011-01-25T00:55:33.306+06:00Windows Seven Tips & Tricks: Enable Classic Taskbar<div style="text-align: justify;"><span style="line-height: 15px; white-space: normal;"><span style="font-family: Verdana, sans-serif;">I always liked the classic taskbar. It's why I got to get it back with Windows Seven. Here's I'm telling you how to do it.<br />
<br />
First, reduce the taskbar size following <a href="http://sa-os.blogspot.com/2009/11/how-to-reduce-taskbar-size-in-windows.html">previous post</a>.</span></span></div><br />
<div style="text-align: justify;"><span style="line-height: 15px; white-space: normal;"><span style="font-family: Verdana, sans-serif;">Now right the click taskbar. Click properties. There is an option called "Taskbar buttons" on the middle of the dialog box.</span></span></div><span class="fullpost"><div style="text-align: justify;"><span style="line-height: 15px; white-space: normal;"><span style="font-family: Verdana, sans-serif;">Select the option "Combile when taskbar is full". "Click ok. You'll get your classic taskbar back. Screenshots attached below:</span></span></div><br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/_05muEG5f29w/TPYo8C5gFTI/AAAAAAAAAiU/qgmSCF4AAyI/s1600/Default+Taskbar.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://1.bp.blogspot.com/_05muEG5f29w/TPYo8C5gFTI/AAAAAAAAAiU/qgmSCF4AAyI/s320/Default+Taskbar.png" width="320" /></a><br />
Image 01: Default Taskbar of Windows Seven [Click Image to Enlarge]</div><br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/_05muEG5f29w/TPYpXkkXKXI/AAAAAAAAAiY/Pp6ctpCu4Eg/s1600/Classic+Taskbar.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://4.bp.blogspot.com/_05muEG5f29w/TPYpXkkXKXI/AAAAAAAAAiY/Pp6ctpCu4Eg/s320/Classic+Taskbar.jpg" width="320" /></a><br />
Image 02: Classic Taskbar of Windows Seven [Click Image to Enlarge]</div></span>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8479369071593459609.post-26676899774608630752010-12-01T15:42:00.005+06:002011-01-25T01:00:58.015+06:00How to Change MAC Address on Linux using NetworkManager<div style="text-align: justify;"><span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">In <a href="http://sa-os.blogspot.com/2009/12/how-to-change-mac-address-on-linux.html">previous post</a> I showed how to change MAC address on Linux using ifconfig command and system-config-network tool. Today I will show you how to change MAC address using Network Manager. The method is comparatively easier.<br />
<br />
<ul><li>Follow the steps given below to change MAC address.<br />
<br />
</li>
<li>Right click on the Network Manager applet and click "Edit Connections"<br />
<br />
</li>
<li>Select eth0 and click edit button</li></ul></span></div><span class="fullpost"><div style="text-align: justify;"><span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;"><ul><li>On Cloned MAC Address type the MAC address that you want to change to as shown in image below:</li>
</ul></span></div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/_05muEG5f29w/TPYYK2z4FSI/AAAAAAAAAiE/ofgNcRmgkDM/s1600/Screenshot-Editing+System+eth0.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://4.bp.blogspot.com/_05muEG5f29w/TPYYK2z4FSI/AAAAAAAAAiE/ofgNcRmgkDM/s320/Screenshot-Editing+System+eth0.png" width="289" /></a><br />
[Click Image to Enlarge]</div><br />
<div style="text-align: justify;"><span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;"><ul><li>Click apply.<br />
</li>
</ul><br />
You are done. It was damn easy. Right!? ping to check back your internet connection.</span></div><br />
<div style="text-align: left;"><span style="line-height: 15px; white-space: normal; font-family: Courier New, sans-serif; font-size: small;"><table width="100%" border="1" cellpadding="1"><tr><td nowrap="1"><pre>$ <b><kbd>$ ping www.google.com
PING www.l.google.com (74.125.43.105) 56(84) bytes of data.
64 bytes from bw-in-f105.1e100.net (74.125.43.105): icmp_seq=1 ttl=53 time=220 ms
64 bytes from bw-in-f105.1e100.net (74.125.43.105): icmp_seq=2 ttl=53 time=220 ms
64 bytes from bw-in-f105.1e100.net (74.125.43.105): icmp_seq=3 ttl=53 time=219 ms
64 bytes from bw-in-f105.1e100.net (74.125.43.105): icmp_seq=4 ttl=53 time=220 ms
64 bytes from bw-in-f105.1e100.net (74.125.43.105): icmp_seq=5 ttl=53 time=220 ms
^C
--- www.l.google.com ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4298ms
rtt min/avg/max/mdev = 219.408/220.194/220.799/0.709 ms
$</kbd></b></pre></td></tr>
</table></span></div><br />
<div style="text-align: justify;"><span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">If you don't find "Cloned MAC address" in Network Manager update your Network Manager and then try again.</span><br />
<span style="line-height: 15px; white-space: normal; font-family: Courier New, sans-serif; font-size: small;"><table width="100%" border="1" cellpadding="1"><tr><td nowrap="1"><pre>$ <b><kbd>$ yum update NetworkManager</kbd></b></pre></td></tr>
</table></span></div></span>Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-8479369071593459609.post-90288719732874482982010-12-01T14:33:00.002+06:002011-01-25T01:02:52.749+06:00Lex, Yacc Installation and Compilation Shell Script<div style="text-align: justify;"><span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">If you don't have lex and yacc install them using the following command.<br />
Fedora Core</span><br />
<span style="line-height: 15px; white-space: normal; font-family: Courier New, sans-serif; font-size: small;"><br />
<table width="100%" border="1" cellpadding="1"><tr><td nowrap="1"><pre># <b><kbd>yum -y install flex bison</kbd></b></pre></td></tr>
</table></span><br />
<span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">Ubuntu</span><br />
<span style="line-height: 15px; white-space: normal; font-family: Courier New, sans-serif; font-size: small;"><br />
<table width="100%" border="1" cellpadding="1"><tr><td nowrap="1"><pre>$ <b><kbd>sudo aptitude install flex bison</kbd></b></pre></td></tr>
</table></span></div><span class="fullpost"><div style="text-align: justify;"><span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">This script will be very useful for compiling lex and yacc files. Here is the script:</span><br />
<br />
<pre style="color:#ffffff; background-color:#000040; font-size:10pt; font-family:'Courier New';"><span style="color:#e5d28e"> 1 </span><span style="color:#60ff60">echo</span> SA<span style="color:#bababa">-</span>OS Script <span style="color:#bababa">[</span>http<span style="color:#bababa">://</span>sa<span style="color:#bababa">-</span>os.blogspot.com<span style="color:#bababa">]</span>
<span style="color:#e5d28e"> 2 </span><span style="color:#60ff60">echo</span> Generating lex
<span style="color:#e5d28e"> 3 </span>lex $<span style="color:#42cad9">1</span>
<span style="color:#e5d28e"> 4 </span><span style="color:#60ff60">echo</span> compling using yet another compiler compiler
<span style="color:#e5d28e"> 5 </span>yacc <span style="color:#bababa">-</span>d $<span style="color:#42cad9">2</span>
<span style="color:#e5d28e"> 6 </span><span style="color:#60ff60">echo</span> Creating objects <span style="color:#e2e825">for</span> c <span style="color:#60ff60">files</span>
<span style="color:#e5d28e"> 7 </span>gcc <span style="color:#bababa">-</span>c lex.yy.c y.tab.c
<span style="color:#e5d28e"> 8 </span><span style="color:#60ff60">echo</span> Creating executable
<span style="color:#e5d28e"> 9 </span>gcc <span style="color:#bababa">-</span>o p.out lex.yy.o y.tab.o <span style="color:#bababa">-</span>ll
<span style="color:#e5d28e">10 </span><span style="color:#60ff60">echo</span> Running executable
<span style="color:#e5d28e">11 </span>.<span style="color:#bababa">/</span>p.out
</pre><br />
<span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">After saving this in file named compile.sh<br />
<br />
You have to apply the following command to make it executable script.</span><br />
<span style="line-height: 15px; white-space: normal; font-family: Courier New, sans-serif; font-size: small;"><br />
<table width="100%" border="1" cellpadding="1"><tr><td nowrap="1"><pre>$ <b><kbd>chmod a+x compile.sh</kbd></b></pre></td></tr>
</table></span><br />
<br />
<span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">Now you can run the script like this:</span><br />
<span style="line-height: 15px; white-space: normal; font-family: Courier New, sans-serif; font-size: small;"><br />
<table width="100%" border="1" cellpadding="1"><tr><td nowrap="1"><pre>$ <b><kbd>./compile.sh lexfilename.l yaccfilename.y</kbd></b></pre></td></tr>
</table></span><br />
</div></span>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8479369071593459609.post-41157965964141242842010-11-28T03:21:00.002+06:002010-11-28T03:56:31.910+06:00Good Movies on Artificial Intelligence II<div style="text-align: justify;"><span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">In <a href="http://sa-os.blogspot.com/2010/02/good-movies-on-artificial-intelligence.html">previous post</a> I mentioned some movies on AI. Today I'm adding some more AI movies.</span></div><br />
<br />
<div style="text-align: center;"><span style="color: #4f81bd; font-family: Arial, sans-serif; font-size: 180%; line-height: 15px; white-space: normal;">A.I. Artificial Intelligence (2001)</span></div><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/_05muEG5f29w/TPFqEbqPZbI/AAAAAAAAAhg/oZDkmXk8ZBw/s1600/Artificial+Intelligence_Movie+Banner.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="216" src="http://3.bp.blogspot.com/_05muEG5f29w/TPFqEbqPZbI/AAAAAAAAAhg/oZDkmXk8ZBw/s320/Artificial+Intelligence_Movie+Banner.jpg" width="320" /></a></div><div style="text-align: justify;"><span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;"><br />
This movie (A.I) is directly related with Artificial Intelligence. An artificially intelligent robot is manufactured which looks exactly like the boy a couple recently lost. However intelligent or alike the robotic agent looks is it is difficult to replace a human child. Consequences follow.<br />
<br />
When the notorious real child is found back tragedy starts. Time comes to give this robot back to the manufacturer company for disposal. With uncontrolled emotion of love for this human-looking robot the mother cannot leave the boy for disposal. She leaves the robot boy in a forest. This leads to other interesting stories. But the boy only dreams to get back to her human mother for who his love is never defeated.<br />
<br />
To download wallpaper of this movie follow <a href="http://sa-sdft.blogspot.com/2009/11/artificial-intelligence-ai-wallpapers.html">here</a>. View more info on imdb about this movie: <a href="http://www.imdb.com/title/tt0212720/">http://www.imdb.com/title/tt0212720/</a></span></div><br />
<br />
<div style="text-align: center;"><span style="color: #4f81bd; font-family: Arial, sans-serif; font-size: 180%; line-height: 15px; white-space: normal;">2001: A Space Odyssey (1968)</span></div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/_05muEG5f29w/TPFs61DwxmI/AAAAAAAAAhk/SPY7szxVlVs/s1600/2001+a+space+odyssey+banner.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="214" src="http://1.bp.blogspot.com/_05muEG5f29w/TPFs61DwxmI/AAAAAAAAAhk/SPY7szxVlVs/s320/2001+a+space+odyssey+banner.jpg" width="320" /></a></div><br />
<div style="text-align: justify;"><span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">I’m adding this movie because of its reputation (it is ranked as one of the top 10 movies). The movie is not enjoyable if you don’t understand the central story. But it contains a good theme which is a juxtaposure of human evolution, technology and artificial intelligence. Human evolution part is related with a monolith. Artificial intelligent part is related with HAL computers.<br />
<br />
You can find good info about this movie and its plot <a href="http://en.wikipedia.org/wiki/2001:_A_Space_Odyssey_(film)">here</a>. View more info on imdb: <a href="http://www.imdb.com/title/tt0062622/">http://www.imdb.com/title/tt0062622/</a></span></div><br />
<div style="text-align: center;"><span style="color: #4f81bd; font-family: Arial, sans-serif; font-size: 180%; line-height: 15px; white-space: normal;">The Matrix (1999)</span></div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/_05muEG5f29w/TPFuZggrSrI/AAAAAAAAAho/slLzc_zUeYc/s1600/The+matrix+Banner.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://3.bp.blogspot.com/_05muEG5f29w/TPFuZggrSrI/AAAAAAAAAho/slLzc_zUeYc/s320/The+matrix+Banner.jpg" width="222" /></a></div><br />
<div style="text-align: justify;"><span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">This is an awesome mind-blowing science fiction movie. A Hacker learns the new definition of reality and when he possesses the control of it, it means he has matrix. With matrix human beings can be programmed according to necessities and can be useful in fighting in the world where they are also real!<br />
<br />
Among Matrix trilogy most enjoyable is this one. Matrix has good base story which is very scientific and detailed. View more info on imdb: <a href="http://www.imdb.com/title/tt0133093/
">http://www.imdb.com/title/tt0133093/</a></span></div><br />
<div style="text-align: center;"><span style="color: #4f81bd; font-family: Arial, sans-serif; font-size: 180%; line-height: 15px; white-space: normal;">The Matrix Reloaded (2003)</span></div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/_05muEG5f29w/TPFu9-YKJTI/AAAAAAAAAhs/Kn0VZcSrekc/s1600/The+matrix+reloaded+banner.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://2.bp.blogspot.com/_05muEG5f29w/TPFu9-YKJTI/AAAAAAAAAhs/Kn0VZcSrekc/s320/The+matrix+reloaded+banner.jpg" width="320" /></a></div><br />
<div style="text-align: justify;"><span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">It all about saving trinity and destroying Zion. Too dramatic but you will enjoy some special effects! View more info on imdb: <a href="http://www.imdb.com/title/tt0234215/">http://www.imdb.com/title/tt0234215/</a></span></div><br />
<br />
<div style="text-align: center;"><span style="color: #4f81bd; font-family: Arial, sans-serif; font-size: 180%; line-height: 15px; white-space: normal;">The Matrix Revolutions (2003)</span></div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/_05muEG5f29w/TPFv1M8SjAI/AAAAAAAAAhw/6Z43NoGd-6g/s1600/Matrix+Revolutions+Banner.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://1.bp.blogspot.com/_05muEG5f29w/TPFv1M8SjAI/AAAAAAAAAhw/6Z43NoGd-6g/s320/Matrix+Revolutions+Banner.jpg" width="214" /></a></div><br />
<div style="text-align: justify;"><span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">View info on imdb: <a href="http://www.imdb.com/title/tt0242653/">http://www.imdb.com/title/tt0242653/</a></span></div><br />
<br />
<div style="text-align: center;"><span style="color: #4f81bd; font-family: Arial, sans-serif; font-size: 180%; line-height: 15px; white-space: normal;">Endhiran (2010)</span></div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/_05muEG5f29w/TPFxFiauBZI/AAAAAAAAAh0/u9ST55PLtgM/s1600/Endhiran+movie+banner.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://1.bp.blogspot.com/_05muEG5f29w/TPFxFiauBZI/AAAAAAAAAh0/u9ST55PLtgM/s320/Endhiran+movie+banner.jpg" width="292" /></a></div><br />
<div style="text-align: justify;"><span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">It is a very good hindi movie that is worth watching. A scientist named Dr. Vasi builds an intelligent robot which resembles his image. The scientific body does not approve the robot. Hence emotion is also integrated into the robot. Then with awesome emotions it falls in love with its creator’s fiancée Aishwariya Rai! Let’s see how to fix this. :)<br />
<br />
View more info on imdb: <a href="http://www.imdb.com/title/tt1305797/">http://www.imdb.com/title/tt1305797/</a></span></div><br />
<div style="text-align: center;"><span style="color: #4f81bd; font-family: Arial, sans-serif; font-size: 180%; line-height: 15px; white-space: normal;">Inception (2010)</span></div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/_05muEG5f29w/TPFykNj6mgI/AAAAAAAAAh4/fC-F5MplPdM/s1600/Inception+movie+banner.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://2.bp.blogspot.com/_05muEG5f29w/TPFykNj6mgI/AAAAAAAAAh4/fC-F5MplPdM/s320/Inception+movie+banner.jpg" width="216" /></a></div><br />
<div style="text-align: justify;"><span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">The movie does not deal with artificially intelligent agents. Rather it deals with scientific theories of subconscious mind. The information can be stolen from a subconscious state of brain when it is at its most vulnerable. It is called extraction. Also ideas can be planted. With subconscious minds it always comes to dreaming. In dreams human agents are more powerful, they work as better agents. That’s the artificial part.<br />
<br />
Cobb is the best thief of information extraction. But he has a strong rival in his subconscious world a woman named Mal. Mal will always mess up the plan and cause Cobb to be defeated though once Mal was his love and everything. With all these hard obstacles of subconscious world Cobb has to win in his impossible plan called inception. They have to win fights on minds in a combined shared illusive, beautiful, adventurous subconscious environment.<br />
<br />
View info on imdb: <a href="http://www.imdb.com/title/tt1375666/">http://www.imdb.com/title/tt1375666/</a></span></div><br />
<br />
<div style="text-align: center;"><span style="color: #4f81bd; font-family: Arial, sans-serif; font-size: 180%; line-height: 15px; white-space: normal;">Transformers (2007)</span></div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/_05muEG5f29w/TPFzH0dro1I/AAAAAAAAAh8/pLbUK4rkBwc/s1600/Transformers+movie+banner.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://1.bp.blogspot.com/_05muEG5f29w/TPFzH0dro1I/AAAAAAAAAh8/pLbUK4rkBwc/s320/Transformers+movie+banner.jpg" width="215" /></a></div><br />
<div style="text-align: justify;"><span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;"><br />
There is a clash between two extra-terrestrial clans which affects existence of earth and beings. A young held teenager possesses all the power and clue who can save the world? Too dramatic! Huh? This one is better than the next of the sequel! View info on imdb: <a href="http://www.imdb.com/title/tt0418279/">http://www.imdb.com/title/tt0418279/</a></span></div><br />
<div style="text-align: center;"><span style="color: #4f81bd; font-family: Arial, sans-serif; font-size: 180%; line-height: 15px; white-space: normal;">Transformers: Revenge of the Fallen</span></div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/_05muEG5f29w/TPFzp0SqqzI/AAAAAAAAAiA/y-IaQTHvEAI/s1600/Transformers+revenge+of+the+fallen+movie+banner.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://4.bp.blogspot.com/_05muEG5f29w/TPFzp0SqqzI/AAAAAAAAAiA/y-IaQTHvEAI/s320/Transformers+revenge+of+the+fallen+movie+banner.jpg" width="216" /></a></div><br />
<div style="text-align: justify;"><span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">View info on imdb about this movie: <a href="http://www.imdb.com/title/tt1055369/">http://www.imdb.com/title/tt1055369/</a><br />
<br />
I’ve got some more movies. Before adding them I’ll watch them first to make sure if they relate with Artificial Intelligence. Relevant movies will be added on next post. Thanks for visiting.</span></div>Unknownnoreply@blogger.com4tag:blogger.com,1999:blog-8479369071593459609.post-43162631701683361612010-11-11T12:34:00.001+06:002010-11-11T12:34:10.357+06:00How to Disable Deprecation Warning on Visual Studio<div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Deprecation warnings can really be headache sometimes. But there are ways to disable it. Here I describe one.<br />
<br />
To deprecation warnings you have to define _CRT_SECURE_NO_DEPRECATE as true before including any header file. An example code is attached below:</span></div><br />
<div style="text-align: left;"><table width="100%" border="1" cellpadding="1"><tr bgcolor=#000040><td nowrap="1"><pre style="color:#ffffff; background-color:#000040; font-size:10pt; font-family:'Courier New';"><span style="color:#e5d28e"> 1 </span><span style="color:#bababa">/*******************************************************</span>
<span style="color:#e5d28e"> 2 </span><span style="color:#bababa">*</span> Problem Name<span style="color:#bababa">:</span> Money in the bag
<span style="color:#e5d28e"> 3 </span><span style="color:#bababa">*</span> Problem ID<span style="color:#bababa">:</span> <span style="color:#42cad9">1002</span>
<span style="color:#e5d28e"> 4 </span><span style="color:#bababa">*</span> Occassion<span style="color:#bababa">:</span> Offline Contest CSEDU Easy Volume
<span style="color:#e5d28e"> 5 </span><span style="color:#bababa">*</span>
<span style="color:#e5d28e"> 6 </span><span style="color:#bababa">*</span> Algorithm<span style="color:#bababa">:</span>
<span style="color:#e5d28e"> 7 </span><span style="color:#bababa">*</span> Special Case<span style="color:#bababa">:</span>
<span style="color:#e5d28e"> 8 </span><span style="color:#bababa">*</span> Judge Status<span style="color:#bababa">:</span> Accepted
<span style="color:#e5d28e"> 9 </span><span style="color:#bababa">*</span> Author<span style="color:#bababa">:</span> Saint Atique
<span style="color:#e5d28e">10 </span><span style="color:#bababa">*</span> Notes<span style="color:#bababa">:</span>
<span style="color:#e5d28e">11 </span><span style="color:#bababa">*</span>
<span style="color:#e5d28e">12 </span><span style="color:#bababa">*******************************************************/</span>
<span style="color:#e5d28e">13 </span>
<span style="color:#e5d28e">14 </span>#define _CRT_SECURE_NO_DEPRECATE <span style="color:#42cad9">1</span>
<span style="color:#e5d28e">15 </span><span style="color:#bababa">//</span>#define _CRT_NONSTDC_NO_DEPRECATE
<span style="color:#e5d28e">16 </span>
<span style="color:#e5d28e">17 </span>#include <span style="color:#bababa"><</span>iostream<span style="color:#bababa">></span>
<span style="color:#e5d28e">18 </span>#include <span style="color:#bababa"><</span>cmath<span style="color:#bababa">></span>
<span style="color:#e5d28e">19 </span>#include <span style="color:#bababa"><</span>cstring<span style="color:#bababa">></span>
<span style="color:#e5d28e">20 </span><span style="color:#bababa">//</span>#include <span style="color:#bababa"><</span>new<span style="color:#bababa">></span>
<span style="color:#e5d28e">21 </span>#include <span style="color:#bababa"><</span>vector<span style="color:#bababa">></span>
<span style="color:#e5d28e">22 </span>#include <span style="color:#bababa"><</span>queue<span style="color:#bababa">></span>
<span style="color:#e5d28e">23 </span>#include <span style="color:#bababa"><</span>map<span style="color:#bababa">></span>
<span style="color:#e5d28e">24 </span>#include <span style="color:#bababa"><</span>algorithm<span style="color:#bababa">></span>
<span style="color:#e5d28e">25 </span>#include <span style="color:#bababa"><</span>iomanip<span style="color:#bababa">>//</span><span style="color:#e2e825">for</span> cout formatting
<span style="color:#e5d28e">26 </span>#define INF <span style="color:#42cad9">2147483648</span>
<span style="color:#e5d28e">27 </span>#define EPS <span style="color:#42cad9">1e-8</span>
<span style="color:#e5d28e">28 </span>using namespace std<span style="color:#bababa">;</span>
<span style="color:#e5d28e">29 </span>
<span style="color:#e5d28e">30 </span>int main<span style="color:#bababa">() {</span>
<span style="color:#e5d28e">31 </span> <span style="color:#bababa">//</span>freopen<span style="color:#bababa">(</span><span style="color:#ffa0a0">"..\\1002_in.txt"</span><span style="color:#bababa">,</span> <span style="color:#ffa0a0">"r"</span><span style="color:#bababa">,</span> stdin<span style="color:#bababa">);</span>
<span style="color:#e5d28e">32 </span> <span style="color:#bababa">//</span>freopen<span style="color:#bababa">(</span><span style="color:#ffa0a0">"..\\1002_out.txt"</span><span style="color:#bababa">,</span> <span style="color:#ffa0a0">"w"</span><span style="color:#bababa">,</span> stdout<span style="color:#bababa">);</span>
<span style="color:#e5d28e">33 </span>
<span style="color:#e5d28e">34 </span> double tk_amount<span style="color:#bababa">[</span><span style="color:#42cad9">10</span><span style="color:#bababa">] = {</span><span style="color:#42cad9">1000</span><span style="color:#bababa">,</span> <span style="color:#42cad9">500</span><span style="color:#bababa">,</span> <span style="color:#42cad9">100</span><span style="color:#bababa">,</span> <span style="color:#42cad9">50</span><span style="color:#bababa">,</span> <span style="color:#42cad9">20</span><span style="color:#bababa">,</span> <span style="color:#42cad9">10</span><span style="color:#bababa">,</span> <span style="color:#42cad9">5</span><span style="color:#bababa">,</span> <span style="color:#42cad9">2</span><span style="color:#bababa">,</span> <span style="color:#42cad9">1</span><span style="color:#bababa">,</span> <span style="color:#42cad9">0.50</span><span style="color:#bababa">};</span>
<span style="color:#e5d28e">35 </span> double sum <span style="color:#bababa">=</span> <span style="color:#42cad9">0</span><span style="color:#bababa">;</span>
<span style="color:#e5d28e">36 </span> int i<span style="color:#bababa">,</span> n<span style="color:#bababa">;</span>
<span style="color:#e5d28e">37 </span>
<span style="color:#e5d28e">38 </span> <span style="color:#e2e825">for</span> <span style="color:#bababa">(</span>i<span style="color:#bababa">=</span><span style="color:#42cad9">0</span><span style="color:#bababa">;</span> i<span style="color:#bababa"><</span><span style="color:#42cad9">10</span><span style="color:#bababa">;</span> i<span style="color:#bababa">++) {</span>
<span style="color:#e5d28e">39 </span> cin<span style="color:#bababa">>></span>n<span style="color:#bababa">;</span>
<span style="color:#e5d28e">40 </span> sum <span style="color:#bababa">+=</span> n <span style="color:#bababa">*</span> tk_amount<span style="color:#bababa">[</span>i<span style="color:#bababa">];</span>
<span style="color:#e5d28e">41 </span> <span style="color:#bababa">}</span>
<span style="color:#e5d28e">42 </span>
<span style="color:#e5d28e">43 </span> cout.setf <span style="color:#bababa">(</span>ios<span style="color:#bababa">::</span>fixed<span style="color:#bababa">,</span> ios<span style="color:#bababa">::</span>floatfield<span style="color:#bababa">);</span>
<span style="color:#e5d28e">44 </span> cout.setf<span style="color:#bababa">(</span>ios<span style="color:#bababa">::</span>showpoint<span style="color:#bababa">);</span>
<span style="color:#e5d28e">45 </span> cout<span style="color:#bababa"><<</span>setprecision<span style="color:#bababa">(</span><span style="color:#42cad9">2</span><span style="color:#bababa">)<<</span>sum<span style="color:#bababa"><<</span><span style="color:#ffa0a0">" taka"</span><span style="color:#bababa"><<</span>endl<span style="color:#bababa">;</span>
<span style="color:#e5d28e">46 </span>
<span style="color:#e5d28e">47 </span> <span style="color:#bababa">//</span>fclose<span style="color:#bababa">(</span>stdin<span style="color:#bababa">);</span>
<span style="color:#e5d28e">48 </span> <span style="color:#bababa">//</span>fclose<span style="color:#bababa">(</span>stdout<span style="color:#bababa">);</span>
<span style="color:#e5d28e">49 </span> <span style="color:#e2e825">return</span> <span style="color:#42cad9">0</span><span style="color:#bababa">;</span>
<span style="color:#e5d28e">50 </span><span style="color:#bababa">}</span></pre></td></tr></table></div>Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-8479369071593459609.post-58796884476592671552010-11-11T12:14:00.004+06:002010-11-11T12:24:24.202+06:00How to Set Precision in C++<div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Programmers who use C++ for problem solving may need to set precision before printing floating numbers in standard output.<br />
<br />
To display a floating number value of variable result with precision 2 (equivalent to .%2lf in scanf) use following code:</span></div><div style="text-align: left;"><table width="100%" border="1" cellpadding="1"><tr bgcolor=#000040><td nowrap="1"><pre style="color:#ffffff; background-color:#000040; font-size:10pt; font-family:'Courier New';"><span style="color:#e5d28e"> 1 </span> cout.setf <span style="color:#bababa">(</span>ios<span style="color:#bababa">::</span>fixed<span style="color:#bababa">,</span> ios<span style="color:#bababa">::</span>floatfield<span style="color:#bababa">);</span>
<span style="color:#e5d28e"> 2 </span> cout.setf<span style="color:#bababa">(</span>ios<span style="color:#bababa">::</span>showpoint<span style="color:#bababa">);</span>
<span style="color:#e5d28e"> 3 </span> cout<span style="color:#bababa"><<</span>setprecision<span style="color:#bababa">(</span><span style="color:#42cad9">2</span><span style="color:#bababa">)<<</span>result<span style="color:#bababa"><<</span>endl<span style="color:#bababa">;</span></pre></td></tr></table></div><br />
<div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Here’s an example code used to solve a problem in easy volume section.</span></div><br />
<div style="text-align: left;"><table width="100%" border="1" cellpadding="1"><tr bgcolor=#000040><td nowrap="1"><pre style="color:#ffffff; background-color:#000040; font-size:10pt; font-family:'Courier New';"><span style="color:#e5d28e"> 1 </span><span style="color:#bababa">/*******************************************************</span>
<span style="color:#e5d28e"> 2 </span><span style="color:#bababa">*</span> Problem Name<span style="color:#bababa">:</span> Money in the bag
<span style="color:#e5d28e"> 3 </span><span style="color:#bababa">*</span> Problem ID<span style="color:#bababa">:</span> <span style="color:#42cad9">1002</span>
<span style="color:#e5d28e"> 4 </span><span style="color:#bababa">*</span> Occassion<span style="color:#bababa">:</span> Offline Contest CSEDU Easy Volume
<span style="color:#e5d28e"> 5 </span><span style="color:#bababa">*</span>
<span style="color:#e5d28e"> 6 </span><span style="color:#bababa">*</span> Algorithm<span style="color:#bababa">:</span>
<span style="color:#e5d28e"> 7 </span><span style="color:#bababa">*</span> Special Case<span style="color:#bababa">:</span>
<span style="color:#e5d28e"> 8 </span><span style="color:#bababa">*</span> Judge Status<span style="color:#bababa">:</span> Accepted
<span style="color:#e5d28e"> 9 </span><span style="color:#bababa">*</span> Author<span style="color:#bababa">:</span> Saint Atique
<span style="color:#e5d28e">10 </span><span style="color:#bababa">*</span> Notes<span style="color:#bababa">:</span>
<span style="color:#e5d28e">11 </span><span style="color:#bababa">*</span>
<span style="color:#e5d28e">12 </span><span style="color:#bababa">*******************************************************/</span>
<span style="color:#e5d28e">13 </span>
<span style="color:#e5d28e">14 </span>#define _CRT_SECURE_NO_DEPRECATE <span style="color:#42cad9">1</span>
<span style="color:#e5d28e">15 </span><span style="color:#bababa">//</span>#define _CRT_NONSTDC_NO_DEPRECATE
<span style="color:#e5d28e">16 </span>
<span style="color:#e5d28e">17 </span>#include <span style="color:#bababa"><</span>iostream<span style="color:#bababa">></span>
<span style="color:#e5d28e">18 </span>#include <span style="color:#bababa"><</span>cmath<span style="color:#bababa">></span>
<span style="color:#e5d28e">19 </span>#include <span style="color:#bababa"><</span>cstring<span style="color:#bababa">></span>
<span style="color:#e5d28e">20 </span><span style="color:#bababa">//</span>#include <span style="color:#bababa"><</span>new<span style="color:#bababa">></span>
<span style="color:#e5d28e">21 </span>#include <span style="color:#bababa"><</span>vector<span style="color:#bababa">></span>
<span style="color:#e5d28e">22 </span>#include <span style="color:#bababa"><</span>queue<span style="color:#bababa">></span>
<span style="color:#e5d28e">23 </span>#include <span style="color:#bababa"><</span>map<span style="color:#bababa">></span>
<span style="color:#e5d28e">24 </span>#include <span style="color:#bababa"><</span>algorithm<span style="color:#bababa">></span>
<span style="color:#e5d28e">25 </span>#include <span style="color:#bababa"><</span>iomanip<span style="color:#bababa">>//</span><span style="color:#e2e825">for</span> cout formatting
<span style="color:#e5d28e">26 </span>#define INF <span style="color:#42cad9">2147483648</span>
<span style="color:#e5d28e">27 </span>#define EPS <span style="color:#42cad9">1e-8</span>
<span style="color:#e5d28e">28 </span>using namespace std<span style="color:#bababa">;</span>
<span style="color:#e5d28e">29 </span>
<span style="color:#e5d28e">30 </span>int main<span style="color:#bababa">() {</span>
<span style="color:#e5d28e">31 </span> <span style="color:#bababa">//</span>freopen<span style="color:#bababa">(</span><span style="color:#ffa0a0">"..\\1002_in.txt"</span><span style="color:#bababa">,</span> <span style="color:#ffa0a0">"r"</span><span style="color:#bababa">,</span> stdin<span style="color:#bababa">);</span>
<span style="color:#e5d28e">32 </span> <span style="color:#bababa">//</span>freopen<span style="color:#bababa">(</span><span style="color:#ffa0a0">"..\\1002_out.txt"</span><span style="color:#bababa">,</span> <span style="color:#ffa0a0">"w"</span><span style="color:#bababa">,</span> stdout<span style="color:#bababa">);</span>
<span style="color:#e5d28e">33 </span>
<span style="color:#e5d28e">34 </span> double tk_amount<span style="color:#bababa">[</span><span style="color:#42cad9">10</span><span style="color:#bababa">] = {</span><span style="color:#42cad9">1000</span><span style="color:#bababa">,</span> <span style="color:#42cad9">500</span><span style="color:#bababa">,</span> <span style="color:#42cad9">100</span><span style="color:#bababa">,</span> <span style="color:#42cad9">50</span><span style="color:#bababa">,</span> <span style="color:#42cad9">20</span><span style="color:#bababa">,</span> <span style="color:#42cad9">10</span><span style="color:#bababa">,</span> <span style="color:#42cad9">5</span><span style="color:#bababa">,</span> <span style="color:#42cad9">2</span><span style="color:#bababa">,</span> <span style="color:#42cad9">1</span><span style="color:#bababa">,</span> <span style="color:#42cad9">0.50</span><span style="color:#bababa">};</span>
<span style="color:#e5d28e">35 </span> double sum <span style="color:#bababa">=</span> <span style="color:#42cad9">0</span><span style="color:#bababa">;</span>
<span style="color:#e5d28e">36 </span> int i<span style="color:#bababa">,</span> n<span style="color:#bababa">;</span>
<span style="color:#e5d28e">37 </span>
<span style="color:#e5d28e">38 </span> <span style="color:#e2e825">for</span> <span style="color:#bababa">(</span>i<span style="color:#bababa">=</span><span style="color:#42cad9">0</span><span style="color:#bababa">;</span> i<span style="color:#bababa"><</span><span style="color:#42cad9">10</span><span style="color:#bababa">;</span> i<span style="color:#bababa">++) {</span>
<span style="color:#e5d28e">39 </span> cin<span style="color:#bababa">>></span>n<span style="color:#bababa">;</span>
<span style="color:#e5d28e">40 </span> sum <span style="color:#bababa">+=</span> n <span style="color:#bababa">*</span> tk_amount<span style="color:#bababa">[</span>i<span style="color:#bababa">];</span>
<span style="color:#e5d28e">41 </span> <span style="color:#bababa">}</span>
<span style="color:#e5d28e">42 </span>
<span style="color:#e5d28e">43 </span> cout.setf <span style="color:#bababa">(</span>ios<span style="color:#bababa">::</span>fixed<span style="color:#bababa">,</span> ios<span style="color:#bababa">::</span>floatfield<span style="color:#bababa">);</span>
<span style="color:#e5d28e">44 </span> cout.setf<span style="color:#bababa">(</span>ios<span style="color:#bababa">::</span>showpoint<span style="color:#bababa">);</span>
<span style="color:#e5d28e">45 </span> cout<span style="color:#bababa"><<</span>setprecision<span style="color:#bababa">(</span><span style="color:#42cad9">2</span><span style="color:#bababa">)<<</span>sum<span style="color:#bababa"><<</span><span style="color:#ffa0a0">" taka"</span><span style="color:#bababa"><<</span>endl<span style="color:#bababa">;</span>
<span style="color:#e5d28e">46 </span>
<span style="color:#e5d28e">47 </span> <span style="color:#bababa">//</span>fclose<span style="color:#bababa">(</span>stdin<span style="color:#bababa">);</span>
<span style="color:#e5d28e">48 </span> <span style="color:#bababa">//</span>fclose<span style="color:#bababa">(</span>stdout<span style="color:#bababa">);</span>
<span style="color:#e5d28e">49 </span> <span style="color:#e2e825">return</span> <span style="color:#42cad9">0</span><span style="color:#bababa">;</span>
<span style="color:#e5d28e">50 </span><span style="color:#bababa">}</span></pre></td></tr></table></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8479369071593459609.post-15612014347213005662010-11-10T04:20:00.003+06:002010-11-10T04:32:12.373+06:00How to change Document Root on WAMP<div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">In this post we discuss how to change the www folder in apache based software wamp, which stands for Windows Apache, MySQL, PHP.<br />
<br />
By default wamp’s www folder is C: \wamp\www. It means if you put a file on that folder for example test.html and enter address like this,<br />
<i>http://localhost/test.html</i><br />
<br />
on the browser it will fetch your test.html page.<br />
<br />
To change the default www folder we need to change the configuration file of apache which is httpd.conf (httpd stands for http daemon). Follow the steps given below:</span></div><br />
<ul><li><div style="text-align: left;"><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Browse to the directory <b>C:\Program Files\wamp\bin\apache\Apache2.2.11\conf</b><br />
</span></div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/_05muEG5f29w/TNnGLGKtgHI/AAAAAAAAAhY/710_DmbValA/s1600/cdr01.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://4.bp.blogspot.com/_05muEG5f29w/TNnGLGKtgHI/AAAAAAAAAhY/710_DmbValA/s320/cdr01.jpg" width="320" /></a><br />
<br />
</div> <br />
</li>
<li><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Open the file using a text editor i.e. notepad or notepad++ etc.<br />
</span></div></li>
<div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/_05muEG5f29w/TNnHBwdDUDI/AAAAAAAAAhc/aERNJTw9Fls/s1600/cdr02.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="260" src="http://3.bp.blogspot.com/_05muEG5f29w/TNnHBwdDUDI/AAAAAAAAAhc/aERNJTw9Fls/s320/cdr02.jpg" width="320" /></a></div></ul><div style="text-align: justify;"><ul><li><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Search for the text ‘DocumentRoot’. You will see a line like this in the search result:<br />
<i>DocumentRoot "C:/wamp/www"</i><br />
<br />
</span></li>
<li><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Edit this line to your preferred directory where your web page files are stored. For example, D:\web<br />
<i>DocumentRoot "D:/web/"</i><br />
<br />
</span></li>
<li><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Again search for text ‘<Directory’<br />
On the second result you will see a line like this one:<br />
<i><Directory "C:/wamp/www/"></i><br />
<br />
You will have to change this one too.<br />
<i><Directory "D:/web/"></i><br />
<br />
</span></li>
<li><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Now clicking wamp icon on the system tray restart all services.</span></li>
</ul></div><br />
Changes will take into effect soon after you refresh localhost pages.Unknownnoreply@blogger.com9tag:blogger.com,1999:blog-8479369071593459609.post-5594175426199054402010-10-16T06:20:00.004+06:002010-10-16T06:32:38.239+06:00Bangla Font Fixing for Google Chrome & Other Windows Software<div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">In operating systems like Windows XP, Seven we see Vrinda font by default when</span><br />
<br />
<ul><li><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Visiting a website that does not specify a font for Bangla</span></li>
<li><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">In Windows Explorer</span></li>
<li><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Typing on any software like MS Office Softs switching keyboard mode using Avro</span></li>
</ul><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;">What if we could use our favorite bangle font instead of Vrinda? I think it’d be nice. Let’s see how to do it.<br />
Follow the steps given below:</span></div><div style="text-align: justify;"><ul><li><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Download font fixer from <a hre="http://www.vistaarc.com/download/font_fixer_2.0.0.exe">http://www.vistaarc.com/download/font_fixer_2.0.0.exe</a></span></li>
<li><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">If it is windows seven run it as administrator by right clicking. In Windows XP just double click it.</span></li></ul></div><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/_05muEG5f29w/TLjwMVE49MI/AAAAAAAAAhA/ts0eIgj0BdQ/s1600/ff.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/_05muEG5f29w/TLjwMVE49MI/AAAAAAAAAhA/ts0eIgj0BdQ/s1600/ff.jpg" /></a></div><br />
<div style="text-align: justify;"><ul><li><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Choose your favorite Bangla font.</span></li>
<li><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Click fix it.</span></li>
<li><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Close the window.</span></li>
<li><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Restart the computer.</span></li>
<li><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Visit a website using Google Chrome or type Bangla in any other software you’ll see the change. The default font has been set to your favorite one.</span></li></ul></div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/_05muEG5f29w/TLjwo3UMH0I/AAAAAAAAAhE/qNVHcckTHpM/s1600/gc.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://3.bp.blogspot.com/_05muEG5f29w/TLjwo3UMH0I/AAAAAAAAAhE/qNVHcckTHpM/s320/gc.jpg" width="320" /></a><br />
[Click image to enlarge]</div>Unknownnoreply@blogger.com5tag:blogger.com,1999:blog-8479369071593459609.post-58943224823290474632010-10-16T05:22:00.016+06:002010-10-24T22:17:05.202+06:00Xbox 360 Repair Tips for the Speedy Xbox Repair<div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Microsoft has revolutionized the gaming scene by the introduction of the Xbox 360 game. This console has gained huge popularity and people even of older age are hooked up with this game all the time. The least favorite thing for the gamers for the Xbox is that if some problem arises in Xbox, and you have to send it to the repair shop or to the Microsoft office for its repair. But, keeping in mind the craze of the people for this gaming console, many new Xbox repair options have been introduced. Moreover, the experts also recommend some <a href="http://www.learnxboxrepair.com/xbox-360-repair-tips.html">Xbox 360 repair tips</a>, for repairing the Xbox yourself. Some of the major tips are given below.</span><br />
<br />
<ul><li><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">One of the major problem reported by the Xbox users, is that the screen suddenly start freezing. The tip in such situation is to unplug the power, and then remove hard drive. After that switch on the gaming console. If the Xbox, starts working then get happy because you have managed to repair the Xbox. If it starts, then the next step is to shut the power off and place the hard drive in its original location inside the console. The same tip can be applied if the “red ring of death” problem arises.<br />
<br />
</span></li>
<li><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Another tip that can be followed for <a href="http://www.learnxboxrepair.com/">Xbox repair</a>is to unplug the power and remove the hard drive. In addition to this remove all the cables that are plugged into the gaming console. If it starts working after this, then you can simply put everything back in its position and then power up the console again.<br />
<br />
</span></li>
<li><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Above are some of the repair tips, if you want to repair the Xbox yourself. But, in case you dont and can afford the repair expanses, you can simply send your Xbox to Microsoft repair office. And if luckily, you are still in warranty, then you don’t even have to pay the charges but your Xbox will be repaired free of cost.<br />
<br />
</span></li>
<li><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Another tip for Xbox repair is that you can rely on any other repair company other than Microsoft, for the repair as Microsoft repair charges are not affordable by everyone. But, before sending your Xbox to any repair company makes sure that the repair company is authentic and reliable. Otherwise your Xbox won’t be repaired insated got worsen.</span></li>
</ul></div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/_05muEG5f29w/TMRath736EI/AAAAAAAAAhI/klGdmbx2TuA/s1600/Microsoft-Xbox-360-repair.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="259" src="http://3.bp.blogspot.com/_05muEG5f29w/TMRath736EI/AAAAAAAAAhI/klGdmbx2TuA/s320/Microsoft-Xbox-360-repair.jpg" width="320" /></a></div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/_05muEG5f29w/TMRa-1zZt1I/AAAAAAAAAhM/Rq-7CGUZfzI/s1600/xbox360_heatsink_closup.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://1.bp.blogspot.com/_05muEG5f29w/TMRa-1zZt1I/AAAAAAAAAhM/Rq-7CGUZfzI/s320/xbox360_heatsink_closup.jpg" width="320" /></a></div><br />
<div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">In case you have chosen to do Xbox repair yourself, in that case the tip for you is to purchase the repair guides for the repair, but make sure that the guide is authentic and the genuine one and has a money back guarantee. These guides can be really helpful for you but a great tip in respect to guides is that select the guide with the video instruction so that you get the detailed information for repair. So, these Xbox 360 repair tips are really helpful for you, if your Xbox is not working properly and you want it to get repaired as soon as possible.<br />
<br />
<br />
<br />
<i>-- Written by:<br />
Alisha John (Guest blogger)</i><br />
</span></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8479369071593459609.post-16962223382967783432010-08-27T17:31:00.007+06:002018-09-19T01:41:54.063+06:00Moved - Avro Keyboard 4.5.3 and UniBijoy<div style="text-align: left;"> Moved to <a href="https://atiqcs.wordpress.com/2011/01/09/install-unibijoy-avro-keyboard"> fftsys wp blog </a></div>
Unknownnoreply@blogger.com3tag:blogger.com,1999:blog-8479369071593459609.post-49008951746363528752010-08-18T23:16:00.010+06:002014-03-28T19:55:52.319+06:00Booting Solaris Operating System using Windows Boot Loader - redirectThe post has moved here:<br />
<a href="http://tech.saoslab.com/post/2010/08/18/boot-solaris-windows-bcdedit-bootloader">http://tech.saoslab.com/post/2010/08/18/boot-solaris-windows-bcdedit-bootloader</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8479369071593459609.post-68321883527539044232010-08-18T21:39:00.005+06:002017-04-03T05:51:01.180+06:00Blog is migrating<div style="text-align: justify;">
<div style="text-align: start;">
The post has moved here:</div>
<div style="text-align: start;">
<a href="http://blog.fftsys.com/tech/administration/mark-partition-as-active-windows-unix">http://blog.fftsys.com/tech/administration/mark-partition-as-active-windows-unix</a></div>
</div>
Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-8479369071593459609.post-65123762191418574802010-08-18T16:45:00.002+06:002010-08-18T16:49:23.384+06:00Cannot boot Ubuntu 10.04 after installation of Ubuntu or after installation of Windows Seven<div style="text-align: justify;"><span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;"><br />
You have just installed Ubuntu 10.04 but you cannot boot to it. System boot straights to Windows Seven and you are feeling deceived. I also faced this issue.<br />
<br />
May be there’s a problem with Ubuntu 10.04 distro that’s happening with some PCs having Windows Seven. Well here’s a fix. Follow the steps.</span><br />
<br />
<span style="line-height: 15px; white-space: pre-wrap;"> <span style='font-family:Wingdings'>Ø</span> Boot the system using Live CD.</span><br />
<br />
<span style="line-height: 15px; white-space: pre-wrap;"> <span style='font-family:Wingdings'>Ø</span> Press Alt+F2 and enter gnome-terminal command. And continue by entering:</span></div><div style="text-align: left;"><span style="line-height: 15px; white-space: normal; font-family: Courier New, sans-serif; font-size: small;"><br />
<table width="100%" border="1" cellpadding="1"><tr><td nowrap="1"><pre>$ sudo fdisk -l</pre></td></tr>
</table></span><br />
</div><div style="text-align: justify;"><span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;"><br />
It shows partition table. Here’s mine.</span></div><div style="text-align: left;"><span style="line-height: 15px; white-space: normal; font-family: Courier New, sans-serif; font-size: small;"><br />
<table width="100%" border="1" cellpadding="1"><tr><td nowrap="1"><pre>/dev/sda1 29 8369 66999082+ 83 Linux
/dev/sda2 * 8370 13995 45190845 7 HPFS/NTFS
/dev/sda3 13996 14593 4803435 5 Extended
/dev/sda5 13996 14593 4803403+ 82 Linux swap / Solaris
</pre></td></tr>
</table></span></div><div style="text-align: justify;"><span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;"><br />
Now mount Linux boot partition. As you can see from the output of previous command it was sda1 for my system.</span></div><div style="text-align: justify;"><span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;"><br />
$ sudo mount /dev/sda1 /mnt<br />
$ sudo mount --bind /dev /mnt/dev<br />
$ sudo mount --bind /proc /mnt/proc<br />
</span></div><div style="text-align: justify;"><span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;"><br />
Now chroot into the enviroment:</span></div><div style="text-align: left;"><span style="line-height: 15px; white-space: normal; font-family: Courier New, sans-serif; font-size: small;"><br />
<table width="100%" border="1" cellpadding="1"><tr><td nowrap="1"><pre>$ sudo chroot /mnt</pre></td></tr>
</table></span><br />
</div><div style="text-align: justify;"><span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;"><br />
After chrooting, we need not add sudo before commands.<br />
You may want to edit /etc/default/grub file to fit your system (timeout options etc)</span></div><div style="text-align: left;"><span style="line-height: 15px; white-space: normal; font-family: Courier New, sans-serif; font-size: small;"><br />
<table width="100%" border="1" cellpadding="1"><tr><td nowrap="1"><pre># vi /etc/default/grub</pre></td></tr>
</table></span><br />
</div><div style="text-align: justify;"><span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">After edition press ESC & then :wq to store and exit. Now install/recover Grub2 via command:</span></div><div style="text-align: left;"><span style="line-height: 15px; white-space: normal; font-family: Courier New, sans-serif; font-size: small;"><br />
<table width="100%" border="1" cellpadding="1"><tr><td nowrap="1"><pre># grub-install --recheck /dev/sda</pre></td></tr>
</table></span><br />
</div><div style="text-align: justify;"><span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">Now you can exit the chroot, umount the system and reboot your system:</span></div><div style="text-align: left;"><span style="line-height: 15px; white-space: normal; font-family: Courier New, sans-serif; font-size: small;"><br />
<table width="100%" border="1" cellpadding="1"><tr><td nowrap="1"><pre># exit
$ sudo umount /mnt/dev
$ sudo umount /mnt/proc
$ sudo umount /mnt
$ sudo reboot
</pre></td></tr>
</table></span><br />
</div>Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-8479369071593459609.post-68850397570689437912010-08-18T16:18:00.006+06:002010-08-18T21:21:24.851+06:00How to concatenate/merge Solaris 10 DVD image segments<div style="text-align: justify;"><span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;"><br />
Here's an example how to merge segments in Unix or Unix like systems:<br />
</span></div><div style="text-align: left;"><span style="line-height: 15px; white-space: normal; font-family: Courier New, sans-serif; font-size: small;"><br />
<table width="100%" border="1" cellpadding="1"><tr><td nowrap="1"><pre>[sa@ispros.com.bd ]$ cat sol-10-u8-ga-sparc-dvd-iso-a sol-10-u8-ga-sparc-dvd-iso-b > \
sol-10-GA-sp-dvd.iso</pre></td></tr>
</table></span><br />
</div><div style="text-align: justify;"><span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;"><br />
In Windows system, concatenate the files using the following command:<br />
</span></div><div style="text-align: left;"><span style="line-height: 15px; white-space: normal; font-family: Courier New, sans-serif; font-size: small;"><br />
<table width="100%" border="1" cellpadding="1"><tr><td nowrap="1"><pre>D:\> copy /b sol-10-u8-ga-x86-dvd-iso-a + sol-10-u8-ga-x86-dvd-iso-b \
sol-10-u8-ga-x86-dvd.iso</pre></td></tr>
</table></span><br />
</div><div style="text-align: justify;"><span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">The result is a true ISO image that you can use to burn a DVD. <br />
Use software like Nero or MagicISO to burn the DVD in Windows.<br />
</span></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8479369071593459609.post-28503635639357794342010-08-18T06:45:00.003+06:002010-09-23T06:16:44.524+06:00Why micrsoft.com doesn’t reply to ping<div style="text-align: left;"><span style="line-height: 15px; white-space: normal; font-family: Courier New, sans-serif; font-size: small;"><br />
<table width="100%" border="1" cellpadding="1"><tr><td nowrap="1"><pre>[sa@localhost ]$ ping www.microsoft.com
Pinging lb1.www.ms.akadns.net [65.55.21.250] with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Ping statistics for 65.55.21.250:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
</pre></td></tr>
</table></span><br />
</div><br />
<div style="text-align: justify;"><span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;"><br />
Do you know why Micrsoft.com doesn’t replies to ping?<br />
<br />
ping is a powerful small command line tool. Seeing the output of ping command a security analyst or hacker can grab important information about the target hosts. Target hosts can be web servers or a pc on local area network. Information includes Operating System & Version, availability of host etc.<br />
</span></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8479369071593459609.post-33961371447496529022010-06-04T23:25:00.001+06:002010-06-04T23:34:50.592+06:00Why Google Chrome Frequently Crashes? [Solved]<div style="text-align: justify;"><span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">Do you have Internet Download Manager (IDM) installed on your PC? Do you face frequent crashes on Google Chrome? Or cannot load certain web pages like twitter.com or some flashy pages, just hangs or shows alien behavior?</span></div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/_05muEG5f29w/TAk1iOEtHMI/AAAAAAAAAeI/p63W5OAlhI8/s1600/ChromeCrash01.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/_05muEG5f29w/TAk1iOEtHMI/AAAAAAAAAeI/p63W5OAlhI8/s320/ChromeCrash01.jpg" /></a><br />
Fig: Google Chrome 5.0.375.55 just crashed</div><br />
<div style="text-align: justify;"><span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">I faced this problem. I was always using stable releases of Google Chrome. Still having it hang I was really frustrated. However I found the cause after doing some experiments. The idea might came from a discussion of web forum or may Google’s help discussion. Someone was talking about uninstalling IDM.<br />
<br />
But you need not uninstall it. You just need to disable “advanced browser integration” for Google Chrome was enabled in idm. Open IDM main window as shown in image below.</span></div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/_05muEG5f29w/TAk2LKGGclI/AAAAAAAAAeQ/PIBX3aQ1-ig/s1600/ChromeCrash02.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/_05muEG5f29w/TAk2LKGGclI/AAAAAAAAAeQ/PIBX3aQ1-ig/s320/ChromeCrash02.jpg" /></a><br />
Fig: IDM Main Window</div><br />
<div style="text-align: justify;"><span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">Click options button. Under General tab. Under the text ‘Capture downloads from the following browsers’ un-tick Google Chrome.</span></div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/_05muEG5f29w/TAk2vdz1CaI/AAAAAAAAAeY/8TSc8DUM_4Q/s1600/ChromeCrash03.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/_05muEG5f29w/TAk2vdz1CaI/AAAAAAAAAeY/8TSc8DUM_4Q/s320/ChromeCrash03.jpg" /></a></div><div style="text-align: justify;"><span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">Click Ok. You’re done. After doing that I think you’ll never face crashes again like me. Though it could be better if Internet Download Manager Company had fixed their integration problem. Have fun with Google Chrome OS.</span></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8479369071593459609.post-12170395728770821552010-05-31T22:13:00.016+06:002010-05-31T23:56:24.671+06:00Yahoo Group Moderator Privileges Controlled by Owners<div style="text-align: justify;"><span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">Moderators can change delivery and posting settings for individual members. Owners can check the additional privileges they want to give the moderators which are noted below.</span></div><br />
<div style="text-align: left;"><span style="color: #4f81bd; font-family: Arial, sans-serif; font-size: 150%; line-height: 15px; white-space: normal;">Enable/Disable Notifications for Moderators</span></div><div style="text-align: justify;"><span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;"><span style="line-height: 15px; white-space: pre-wrap;"> <span style='font-family:Wingdings'>Ø</span> Notify moderator when there are pending messages/memberships which require approval.</span><br />
<span style="line-height: 15px; white-space: pre-wrap;"> <span style='font-family:Wingdings'>Ø</span> Notify moderator when a member joins/leaves this group or new files uploaded.</span><br />
<span style="line-height: 15px; white-space: pre-wrap;"> <span style='font-family:Wingdings'>Ø</span> Notify moderator when there are pending messages which have been identified as possible spam.</span></span></div><br />
<div style="text-align: left;"><span style="color: #4f81bd; font-family: Arial, sans-serif; font-size: 150%; line-height: 15px; white-space: normal;">Assign Moderator Privileges</span></div><div style="text-align: justify;"><span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;"><span style="line-height: 15px; white-space: pre-wrap;"> <span style='font-family:Wingdings'>Ø</span> Approve pending messages </span><br />
<span style="line-height: 15px; white-space: pre-wrap;"> <span style='font-family:Wingdings'>Ø</span> Add, remove, and change moderator privileges</span><br />
<span style="line-height: 15px; white-space: pre-wrap;"> <span style='font-family:Wingdings'>Ø</span> Approve pending members </span><br />
<span style="line-height: 15px; white-space: pre-wrap;"> <span style='font-family:Wingdings'>Ø</span> Set auto-send options for files</span><br />
<span style="line-height: 15px; white-space: pre-wrap;"> <span style='font-family:Wingdings'>Ø</span> Invite and add members </span><br />
<span style="line-height: 15px; white-space: pre-wrap;"> <span style='font-family:Wingdings'>Ø</span> Change group settings</span><br />
<span style="line-height: 15px; white-space: pre-wrap;"> <span style='font-family:Wingdings'>Ø</span> Remove members and reset bouncing members</span><br />
<span style="line-height: 15px; white-space: pre-wrap;"> <span style='font-family:Wingdings'>Ø</span> Delete this group</span><br />
<span style="line-height: 15px; white-space: pre-wrap;"> <span style='font-family:Wingdings'>Ø</span> Ban members</span></span></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8479369071593459609.post-67400751813157812692010-05-06T04:59:00.003+06:002010-12-24T04:12:56.319+06:00Design of an 8 to 3 Encoder using 4 to 2 encoders as components<div style="text-align: justify;"><span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;"><b>Problem 1: Design of a 4 to 2 Encoder (Behavioral)</b><br />
<br />
We first design a 4 to 2 Encoder. Then using 4 to 2 Encoder we construct 8 to 3 Encoder.</span><br />
<br />
<pre style="color:#ffffff; background-color:#000040; font-size:10pt; font-family:'Courier New';"><span style="color:#e5d28e"> 1 </span><span style="color:#ff7f9f">-- Encoder4To2.vhd</span>
<span style="color:#e5d28e"> 2 </span><span style="color:#ff7f9f">-- O(1) is MSB</span>
<span style="color:#e5d28e"> 3 </span><span style="color:#ff7f9f">-- O(0) is LSB</span>
<span style="color:#e5d28e"> 4 </span><span style="color:#e2e825">library</span> IEEE<span style="color:#bababa">;</span>
<span style="color:#e5d28e"> 5 </span><span style="color:#e2e825">use</span> IEEE.std_logic_1164.<span style="color:#e2e825">all</span><span style="color:#bababa">;</span>
<span style="color:#e5d28e"> 6 </span>
<span style="color:#e5d28e"> 7 </span><span style="color:#e2e825">entity</span> Encoder4To2 <span style="color:#e2e825">is</span>
<span style="color:#e5d28e"> 8 </span> <span style="color:#e2e825">port</span><span style="color:#bababa">(</span> I<span style="color:#bababa">:</span> <span style="color:#e2e825">in</span> <span style="color:#60ff60">std_logic_vector</span><span style="color:#bababa">(</span><span style="color:#42cad9">3</span> <span style="color:#e2e825">downto</span> <span style="color:#42cad9">0</span><span style="color:#bababa">);</span>
<span style="color:#e5d28e"> 9 </span> O<span style="color:#bababa">:</span> <span style="color:#e2e825">out</span> <span style="color:#60ff60">std_logic_vector</span><span style="color:#bababa">(</span><span style="color:#42cad9">1</span> <span style="color:#e2e825">downto</span> <span style="color:#42cad9">0</span><span style="color:#bababa">)</span>
<span style="color:#e5d28e">10 </span> <span style="color:#bababa">);</span>
<span style="color:#e5d28e">11 </span><span style="color:#e2e825">end</span> Encoder4To2<span style="color:#bababa">;</span>
<span style="color:#e5d28e">12 </span>
<span style="color:#e5d28e">13 </span><span style="color:#e2e825">architecture</span> EncIns <span style="color:#e2e825">of</span> Encoder4To2 <span style="color:#e2e825">is</span>
<span style="color:#e5d28e">14 </span><span style="color:#e2e825">begin</span>
<span style="color:#e5d28e">15 </span> O<span style="color:#bababa">(</span><span style="color:#42cad9">1</span><span style="color:#bababa">) <=</span> I<span style="color:#bababa">(</span><span style="color:#42cad9">1</span><span style="color:#bababa">)</span> <span style="color:#e2e825">OR</span> I<span style="color:#bababa">(</span><span style="color:#42cad9">0</span><span style="color:#bababa">);</span>
<span style="color:#e5d28e">16 </span> O<span style="color:#bababa">(</span><span style="color:#42cad9">0</span><span style="color:#bababa">) <=</span> I<span style="color:#bababa">(</span><span style="color:#42cad9">2</span><span style="color:#bababa">)</span> <span style="color:#e2e825">OR</span> I<span style="color:#bababa">(</span><span style="color:#42cad9">0</span><span style="color:#bababa">);</span>
<span style="color:#e5d28e">17 </span><span style="color:#e2e825">end</span> EncIns<span style="color:#bababa">;</span>
</pre><br />
<span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;"><b>Problem: Design of an 8 to 3 Encoder (Structural)</b><br />
<br />
Here's a diagram of 8 to 3 Encoder. In the image displayed below we see that input is a vector I which is a collection of 8 inputs (0 to 7). Output of 4 to 2 Encoder 1 are X0 and X1 and Output of 4 to 2 Encoder 2 are X2 and X3. Now a combinational logic which is implementation for several exressions calculates the output and store in vector O.<br />
<br />
There's one special case to consider! There are 2 cases when output of X(0) = X(1) = X(2) = X(3) = 0. We have to give unique outputs for each case. To distinguish them we add I(4) in the expression of O(0).</span></div><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/_05muEG5f29w/TRPGTGg6goI/AAAAAAAAAjA/dGPQak50jdQ/s1600/enc8to4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="238" src="http://3.bp.blogspot.com/_05muEG5f29w/TRPGTGg6goI/AAAAAAAAAjA/dGPQak50jdQ/s400/enc8to4.png" width="400" /></a><br />
Click the image to enlarge<br />
</div><br />
<div style="text-align: left;"><pre style="color:#ffffff; background-color:#000040; font-size:10pt; font-family:'Courier New';"><span style="color:#e5d28e"> 1 </span><span style="color:#bababa">--</span> Encoder8To3.vhd
<span style="color:#e5d28e"> 2 </span>library IEEE<span style="color:#bababa">;</span>
<span style="color:#e5d28e"> 3 </span><span style="color:#60ff60">use</span> IEEE.std_logic_1164.all<span style="color:#bababa">;</span>
<span style="color:#e5d28e"> 4 </span>
<span style="color:#e5d28e"> 5 </span>entity Encoder8To3 is
<span style="color:#e5d28e"> 6 </span> port<span style="color:#bababa">(</span> I<span style="color:#bababa">:</span> in std_logic_vector<span style="color:#bababa">(</span><span style="color:#42cad9">7</span> downto <span style="color:#42cad9">0</span><span style="color:#bababa">);</span>
<span style="color:#e5d28e"> 7 </span> O<span style="color:#bababa">:</span> out std_logic_vector<span style="color:#bababa">(</span><span style="color:#42cad9">2</span> downto <span style="color:#42cad9">0</span><span style="color:#bababa">)</span>
<span style="color:#e5d28e"> 8 </span> <span style="color:#bababa">);</span>
<span style="color:#e5d28e"> 9 </span><span style="color:#e2e825">end</span> Encoder8To3<span style="color:#bababa">;</span>
<span style="color:#e5d28e">10 </span>
<span style="color:#e5d28e">11 </span>architecture EncIns of Encoder8To3 is
<span style="color:#e5d28e">12 </span>component Encoder4To2
<span style="color:#e5d28e">13 </span> port<span style="color:#bababa">(</span> CI<span style="color:#bababa">:</span> in std_logic_vector<span style="color:#bababa">(</span><span style="color:#42cad9">3</span> downto <span style="color:#42cad9">0</span><span style="color:#bababa">);</span>
<span style="color:#e5d28e">14 </span> CO<span style="color:#bababa">:</span> out std_logic_vector<span style="color:#bababa">(</span><span style="color:#42cad9">1</span> downto <span style="color:#42cad9">0</span><span style="color:#bababa">)</span>
<span style="color:#e5d28e">15 </span> <span style="color:#bababa">);</span>
<span style="color:#e5d28e">16 </span><span style="color:#e2e825">end</span> component<span style="color:#bababa">;</span>
<span style="color:#e5d28e">17 </span>
<span style="color:#e5d28e">18 </span>signal X<span style="color:#bababa">:</span> std_logic_vector<span style="color:#bababa">(</span><span style="color:#42cad9">3</span> downto <span style="color:#42cad9">0</span><span style="color:#bababa">);</span>
<span style="color:#e5d28e">19 </span>
<span style="color:#e5d28e">20 </span>begin
<span style="color:#e5d28e">21 </span> E1<span style="color:#bababa">:</span> Encoder4To2 port map<span style="color:#bababa">(</span>CI<span style="color:#bababa">=></span>I<span style="color:#bababa">(</span><span style="color:#42cad9">3</span> downto <span style="color:#42cad9">0</span><span style="color:#bababa">),</span> CO <span style="color:#bababa">=></span> X<span style="color:#bababa">(</span><span style="color:#42cad9">1</span> downto <span style="color:#42cad9">0</span><span style="color:#bababa">));</span>
<span style="color:#e5d28e">22 </span> E2<span style="color:#bababa">:</span> Encoder4To2 port map<span style="color:#bababa">(</span>CI<span style="color:#bababa">=></span>I<span style="color:#bababa">(</span><span style="color:#42cad9">7</span> downto <span style="color:#42cad9">4</span><span style="color:#bababa">),</span> CO <span style="color:#bababa">=></span> X<span style="color:#bababa">(</span><span style="color:#42cad9">3</span> downto <span style="color:#42cad9">2</span><span style="color:#bababa">));</span>
<span style="color:#e5d28e">23 </span>
<span style="color:#e5d28e">24 </span> O<span style="color:#bababa">(</span><span style="color:#42cad9">0</span><span style="color:#bababa">) <=</span> X<span style="color:#bababa">(</span><span style="color:#42cad9">0</span><span style="color:#bababa">)</span> or X<span style="color:#bababa">(</span><span style="color:#42cad9">1</span><span style="color:#bababa">)</span> or I<span style="color:#bababa">(</span><span style="color:#42cad9">4</span><span style="color:#bababa">);</span>
<span style="color:#e5d28e">25 </span> O<span style="color:#bababa">(</span><span style="color:#42cad9">1</span><span style="color:#bababa">) <=</span> X<span style="color:#bababa">(</span><span style="color:#42cad9">0</span><span style="color:#bababa">)</span> or X<span style="color:#bababa">(</span><span style="color:#42cad9">2</span><span style="color:#bababa">);</span>
<span style="color:#e5d28e">26 </span> O<span style="color:#bababa">(</span><span style="color:#42cad9">2</span><span style="color:#bababa">) <=</span> X<span style="color:#bababa">(</span><span style="color:#42cad9">3</span><span style="color:#bababa">)</span> or X<span style="color:#bababa">(</span><span style="color:#42cad9">3</span><span style="color:#bababa">);</span>
<span style="color:#e5d28e">27 </span><span style="color:#e2e825">end</span> EncIns<span style="color:#bababa">;</span>
</pre><br />
</div>Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-8479369071593459609.post-25463305130554964722010-05-06T04:56:00.000+06:002010-05-06T04:56:10.220+06:00Design of D Flip flop<div style="text-align: justify;"><span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">Problem 1: Design a D Flip Flop Circuit (Behavioral)</span><br />
<pre style="color:#ffffff; background-color:#000040; font-size:10pt; font-family:'Courier New';"><span style="color:#e5d28e"> 1 </span><span style="color:#ff7f9f">-- DFF.vhd</span>
<span style="color:#e5d28e"> 2 </span><span style="color:#e2e825">entity</span> DFF <span style="color:#e2e825">is</span>
<span style="color:#e5d28e"> 3 </span> <span style="color:#e2e825">port</span><span style="color:#bababa">(</span>CLK<span style="color:#bababa">,</span> Reset<span style="color:#bababa">,</span> DATA<span style="color:#bababa">:</span> <span style="color:#e2e825">in</span> <span style="color:#60ff60">BIT</span><span style="color:#bababa">;</span>
<span style="color:#e5d28e"> 4 </span> Q<span style="color:#bababa">:</span> <span style="color:#e2e825">out</span> <span style="color:#60ff60">BIT</span><span style="color:#bababa">);</span>
<span style="color:#e5d28e"> 5 </span><span style="color:#e2e825">end</span> DFF<span style="color:#bababa">;</span>
<span style="color:#e5d28e"> 6 </span>
<span style="color:#e5d28e"> 7 </span><span style="color:#e2e825">architecture</span> DFFProc <span style="color:#e2e825">of</span> DFF <span style="color:#e2e825">is</span>
<span style="color:#e5d28e"> 8 </span><span style="color:#e2e825">begin</span>
<span style="color:#e5d28e"> 9 </span> p1<span style="color:#bababa">:</span> <span style="color:#e2e825">process</span> <span style="color:#bababa">(</span>CLK<span style="color:#bababa">,</span> Reset<span style="color:#bababa">)</span>
<span style="color:#e5d28e">10 </span> <span style="color:#e2e825">begin</span>
<span style="color:#e5d28e">11 </span> <span style="color:#e2e825">if</span> <span style="color:#bababa">(</span>Reset <span style="color:#bababa">=</span> <span style="color:#ffa0a0">'1'</span><span style="color:#bababa">)</span> <span style="color:#e2e825">then</span>
<span style="color:#e5d28e">12 </span> Q <span style="color:#bababa"><=</span> <span style="color:#ffa0a0">'0'</span><span style="color:#bababa">;</span>
<span style="color:#e5d28e">13 </span> <span style="color:#e2e825">elsif</span> <span style="color:#bababa">(</span>CLK<span style="color:#ffa0a0">' event and CLK = '</span><span style="color:#42cad9">1</span><span style="color:#ffa0a0">') then</span>
<span style="color:#e5d28e">14 </span><span style="color:#ffa0a0"> Q <= DATA;</span>
<span style="color:#e5d28e">15 </span><span style="color:#ffa0a0"> end if;</span>
<span style="color:#e5d28e">16 </span><span style="color:#ffa0a0"> end process p1;</span>
<span style="color:#e5d28e">17 </span><span style="color:#ffa0a0">end DFFProc;</span>
</pre><br />
<span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">Problem 2: Design a D Flip Flop Circuit (Structural)</span><br />
<pre style="color:#ffffff; background-color:#000040; font-size:10pt; font-family:'Courier New';"><span style="color:#e5d28e"> 1 </span><span style="color:#ff7f9f">-- DFF_struct.vhd</span>
<span style="color:#e5d28e"> 2 </span><span style="color:#e2e825">library</span> IEEE<span style="color:#bababa">;</span>
<span style="color:#e5d28e"> 3 </span><span style="color:#e2e825">use</span> IEEE.std_logic_1164.<span style="color:#e2e825">all</span><span style="color:#bababa">;</span>
<span style="color:#e5d28e"> 4 </span>
<span style="color:#e5d28e"> 5 </span><span style="color:#e2e825">entity</span> DFFStruct <span style="color:#e2e825">is</span>
<span style="color:#e5d28e"> 6 </span> <span style="color:#e2e825">port</span><span style="color:#bababa">(</span>CLK<span style="color:#bababa">,</span> Reset<span style="color:#bababa">,</span> DATA<span style="color:#bababa">:</span> <span style="color:#e2e825">in</span> <span style="color:#60ff60">std_logic</span><span style="color:#bababa">;</span>
<span style="color:#e5d28e"> 7 </span> Q<span style="color:#bababa">:</span> <span style="color:#e2e825">out</span> <span style="color:#60ff60">std_logic</span><span style="color:#bababa">);</span>
<span style="color:#e5d28e"> 8 </span><span style="color:#e2e825">end</span> DFFStruct<span style="color:#bababa">;</span>
<span style="color:#e5d28e"> 9 </span>
<span style="color:#e5d28e">10 </span><span style="color:#e2e825">architecture</span> DFFProc <span style="color:#e2e825">of</span> DFFStruct <span style="color:#e2e825">is</span>
<span style="color:#e5d28e">11 </span><span style="color:#e2e825">component</span> DFF
<span style="color:#e5d28e">12 </span> <span style="color:#e2e825">port</span><span style="color:#bababa">(</span>D<span style="color:#bababa">,</span> CLR<span style="color:#bababa">,</span> CLK<span style="color:#bababa">:</span> <span style="color:#e2e825">in</span> <span style="color:#60ff60">std_logic</span><span style="color:#bababa">;</span>
<span style="color:#e5d28e">13 </span> Output<span style="color:#bababa">:</span> <span style="color:#e2e825">out</span> <span style="color:#60ff60">std_logic</span><span style="color:#bababa">);</span>
<span style="color:#e5d28e">14 </span><span style="color:#e2e825">end component</span><span style="color:#bababa">;</span>
<span style="color:#e5d28e">15 </span>
<span style="color:#e5d28e">16 </span><span style="color:#e2e825">begin</span>
<span style="color:#e5d28e">17 </span>DFFcomp1<span style="color:#bababa">:</span> DFF <span style="color:#e2e825">port map</span><span style="color:#bababa">(</span>D <span style="color:#bababa">=></span> DATA<span style="color:#bababa">,</span> CLR <span style="color:#bababa">=></span> Reset<span style="color:#bababa">,</span>
<span style="color:#e5d28e">18 </span> CLK <span style="color:#bababa">=></span> CLK<span style="color:#bababa">,</span> Output <span style="color:#bababa">=></span> Q <span style="color:#bababa">);</span>
<span style="color:#e5d28e">19 </span><span style="color:#e2e825">end</span> DFFProc<span style="color:#bababa">;</span>
</pre><br />
</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8479369071593459609.post-90891597551473354752010-05-06T04:51:00.003+06:002010-05-08T16:25:28.848+06:00Designing Shifters and Rotators using VHDL<div style="text-align: justify;"><span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">Problem 1: Design an 8 bit left rotator (Behavioral/Structural)</span><br />
<pre style="color:#ffffff; background-color:#000040; font-size:10pt; font-family:'Courier New';"><span style="color:#e5d28e"> 1 </span><span style="color:#ff7f9f">-- LeftRotator.vhd</span>
<span style="color:#e5d28e"> 2 </span><span style="color:#ff7f9f">-- 1 bit left rotator controlled by clock's rising edge</span>
<span style="color:#e5d28e"> 3 </span><span style="color:#ff7f9f">-- to use rising_edge std_logic_1164 has to be imported</span>
<span style="color:#e5d28e"> 4 </span><span style="color:#ff7f9f">-- the parameter of rising_edge() should be std_logic</span>
<span style="color:#e5d28e"> 5 </span>
<span style="color:#e5d28e"> 6 </span><span style="color:#e2e825">library</span> IEEE<span style="color:#bababa">;</span>
<span style="color:#e5d28e"> 7 </span><span style="color:#e2e825">use</span> IEEE.std_logic_1164.<span style="color:#e2e825">all</span><span style="color:#bababa">;</span>
<span style="color:#e5d28e"> 8 </span>
<span style="color:#e5d28e"> 9 </span><span style="color:#e2e825">entity</span> LR <span style="color:#e2e825">is</span>
<span style="color:#e5d28e">10 </span> <span style="color:#e2e825">port</span><span style="color:#bababa">(</span>CLK<span style="color:#bababa">:</span> <span style="color:#e2e825">in</span> <span style="color:#60ff60">std_logic</span><span style="color:#bababa">;</span>
<span style="color:#e5d28e">11 </span> I<span style="color:#bababa">:</span> <span style="color:#e2e825">in</span> <span style="color:#60ff60">std_logic_vector</span><span style="color:#bababa">(</span><span style="color:#42cad9">7</span> <span style="color:#e2e825">downto</span> <span style="color:#42cad9">0</span><span style="color:#bababa">);</span>
<span style="color:#e5d28e">12 </span> O<span style="color:#bababa">:</span> <span style="color:#e2e825">out</span> <span style="color:#60ff60">std_logic_vector</span><span style="color:#bababa">(</span><span style="color:#42cad9">7</span> <span style="color:#e2e825">downto</span> <span style="color:#42cad9">0</span><span style="color:#bababa">));</span>
<span style="color:#e5d28e">13 </span><span style="color:#e2e825">end</span> LR<span style="color:#bababa">;</span>
<span style="color:#e5d28e">14 </span>
<span style="color:#e5d28e">15 </span><span style="color:#e2e825">architecture</span> LRins <span style="color:#e2e825">of</span> LR <span style="color:#e2e825">is</span>
<span style="color:#e5d28e">16 </span><span style="color:#e2e825">begin</span>
<span style="color:#e5d28e">17 </span> <span style="color:#e2e825">process</span>
<span style="color:#e5d28e">18 </span> <span style="color:#e2e825">begin</span>
<span style="color:#e5d28e">19 </span> <span style="color:#e2e825">wait until</span> rising_edge<span style="color:#bababa">(</span>CLK<span style="color:#bababa">);</span>
<span style="color:#e5d28e">20 </span> O <span style="color:#bababa"><=</span> I <span style="color:#bababa">(</span><span style="color:#42cad9">6</span> <span style="color:#e2e825">downto</span> <span style="color:#42cad9">0</span><span style="color:#bababa">) &</span> I<span style="color:#bababa">(</span><span style="color:#42cad9">7</span><span style="color:#bababa">);</span>
<span style="color:#e5d28e">21 </span> <span style="color:#e2e825">end process</span><span style="color:#bababa">;</span>
<span style="color:#e5d28e">22 </span><span style="color:#e2e825">end</span> LRins<span style="color:#bababa">;</span>
</pre><br />
<span style="line-height: 15px; white-space: normal; font-family: Verdana, sans-serif; font-size: small;">Problem: Design a 8 bit device that can perform following operations on receiving according commands. (Behavioral/Structural)<br />
when command input is<br />
000 (reset) gives same ouput as input<br />
001 left shift 1 bit<br />
010 left shift 2 bit<br />
011 right shift 1 bit<br />
100 right shift 2 bit<br />
101 left rotate 3 bit<br />
110 right rotate 3 bit<br />
111 swap left 4 bits with right</span><br />
<pre style="color:#ffffff; background-color:#000040; font-size:10pt; font-family:'Courier New';"><span style="color:#e5d28e"> 1 </span><span style="color:#ff7f9f">-- shifterAndRotator.vhd</span>
<span style="color:#e5d28e"> 2 </span><span style="color:#ff7f9f">-- 8 bit shifter and rotator with commands</span>
<span style="color:#e5d28e"> 3 </span><span style="color:#ff7f9f">-- for operations for specific amount of bits to</span>
<span style="color:#e5d28e"> 4 </span><span style="color:#ff7f9f">-- shift or rotate</span>
<span style="color:#e5d28e"> 5 </span>
<span style="color:#e5d28e"> 6 </span><span style="color:#e2e825">library</span> IEEE<span style="color:#bababa">;</span>
<span style="color:#e5d28e"> 7 </span><span style="color:#e2e825">use</span> IEEE.std_logic_1164.<span style="color:#e2e825">all</span><span style="color:#bababa">;</span>
<span style="color:#e5d28e"> 8 </span>
<span style="color:#e5d28e"> 9 </span><span style="color:#e2e825">entity</span> SR <span style="color:#e2e825">is</span>
<span style="color:#e5d28e">10 </span> <span style="color:#e2e825">port</span><span style="color:#bababa">(</span>Input<span style="color:#bababa">:</span> <span style="color:#e2e825">in</span> <span style="color:#60ff60">std_logic_vector</span><span style="color:#bababa">(</span><span style="color:#42cad9">7</span> <span style="color:#e2e825">downto</span> <span style="color:#42cad9">0</span><span style="color:#bababa">);</span>
<span style="color:#e5d28e">11 </span> Cmd<span style="color:#bababa">:</span> <span style="color:#e2e825">in</span> <span style="color:#60ff60">std_logic_vector</span><span style="color:#bababa">(</span><span style="color:#42cad9">2</span> <span style="color:#e2e825">downto</span> <span style="color:#42cad9">0</span><span style="color:#bababa">);</span>
<span style="color:#e5d28e">12 </span> Output<span style="color:#bababa">:</span> <span style="color:#e2e825">out</span> <span style="color:#60ff60">std_logic_vector</span><span style="color:#bababa">(</span><span style="color:#42cad9">7</span> <span style="color:#e2e825">downto</span> <span style="color:#42cad9">0</span><span style="color:#bababa">));</span>
<span style="color:#e5d28e">13 </span><span style="color:#e2e825">end</span> SR<span style="color:#bababa">;</span>
<span style="color:#e5d28e">14 </span>
<span style="color:#e5d28e">15 </span><span style="color:#e2e825">architecture</span> SRIns <span style="color:#e2e825">of</span> SR <span style="color:#e2e825">is</span>
<span style="color:#e5d28e">16 </span><span style="color:#e2e825">begin</span>
<span style="color:#e5d28e">17 </span> <span style="color:#e2e825">with</span> Cmd <span style="color:#e2e825">select</span>
<span style="color:#e5d28e">18 </span> Output <span style="color:#bababa"><=</span> Input <span style="color:#e2e825">when</span> "<span style="color:#42cad9">000</span>"<span style="color:#bababa">,</span>
<span style="color:#e5d28e">19 </span> Input<span style="color:#bababa">(</span><span style="color:#42cad9">6</span> <span style="color:#e2e825">downto</span> <span style="color:#42cad9">0</span><span style="color:#bababa">)&</span><span style="color:#ffa0a0">'0'</span> <span style="color:#e2e825">when</span> "<span style="color:#42cad9">001</span>"<span style="color:#bababa">,</span>
<span style="color:#e5d28e">20 </span> Input<span style="color:#bababa">(</span><span style="color:#42cad9">5</span> <span style="color:#e2e825">downto</span> <span style="color:#42cad9">0</span><span style="color:#bababa">)&</span>"<span style="color:#42cad9">00</span>" <span style="color:#e2e825">when</span> "<span style="color:#42cad9">010</span>"<span style="color:#bababa">,</span>
<span style="color:#e5d28e">21 </span> Input<span style="color:#bababa">(</span><span style="color:#42cad9">7</span> <span style="color:#e2e825">downto</span> <span style="color:#42cad9">1</span><span style="color:#bababa">)&</span><span style="color:#ffa0a0">'0'</span> <span style="color:#e2e825">when</span> "<span style="color:#42cad9">011</span>"<span style="color:#bababa">,</span>
<span style="color:#e5d28e">22 </span> Input<span style="color:#bababa">(</span><span style="color:#42cad9">7</span> <span style="color:#e2e825">downto</span> <span style="color:#42cad9">2</span><span style="color:#bababa">)&</span>"<span style="color:#42cad9">00</span>" <span style="color:#e2e825">when</span> "<span style="color:#42cad9">100</span>"<span style="color:#bababa">,</span>
<span style="color:#e5d28e">23 </span> Input<span style="color:#bababa">(</span><span style="color:#42cad9">4</span> <span style="color:#e2e825">downto</span> <span style="color:#42cad9">0</span><span style="color:#bababa">)&</span>Input<span style="color:#bababa">(</span><span style="color:#42cad9">7</span> <span style="color:#e2e825">downto</span> <span style="color:#42cad9">5</span><span style="color:#bababa">)</span> <span style="color:#e2e825">when</span> "<span style="color:#42cad9">101</span>"<span style="color:#bababa">,</span>
<span style="color:#e5d28e">24 </span> Input<span style="color:#bababa">(</span><span style="color:#42cad9">3</span> <span style="color:#e2e825">downto</span> <span style="color:#42cad9">0</span><span style="color:#bababa">)&</span>Input<span style="color:#bababa">(</span><span style="color:#42cad9">7</span> <span style="color:#e2e825">downto</span> <span style="color:#42cad9">4</span><span style="color:#bababa">)</span> <span style="color:#e2e825">when</span> "<span style="color:#42cad9">110</span>"<span style="color:#bababa">,</span>
<span style="color:#e5d28e">25 </span> Input<span style="color:#bababa">(</span><span style="color:#42cad9">3</span> <span style="color:#e2e825">downto</span> <span style="color:#42cad9">0</span><span style="color:#bababa">)&</span>Input<span style="color:#bababa">(</span><span style="color:#42cad9">7</span> <span style="color:#e2e825">downto</span> <span style="color:#42cad9">4</span><span style="color:#bababa">)</span> <span style="color:#e2e825">when</span> "<span style="color:#42cad9">101</span>"<span style="color:#bababa">;</span>
<span style="color:#e5d28e">26 </span><span style="color:#e2e825">end</span> SRIns<span style="color:#bababa">;</span>
</pre></div>Unknownnoreply@blogger.com0