AITB International Conference, 2019
Kathmandu, Nepal
My Youtube Channel
Please Subscribe
Flag of Nepal
Built in OpenGL
World Covid-19 Data Visualization
Choropleth map
Word Cloud in Python
With masked image
Saturday, June 23, 2018
Saturday, May 12, 2018
How to restore/import dump file in MySQL workbench ?
The following steps can be applied to import dump file :
1. Open MySQL workbench and connect to database using your password. You can see the window as given below:
2. You will be provided two ways to import the dump files.
First, you can import the dump files by selecting the option "import from dump project folder". Here you can select the folder where all your dump files are stored. It will automatically import the files in database from which it was created if the database with the same name exists. So, it is better to create database with the same name and then start the importing process.
Second, you can select the option "import from self-contained file" which will allow you to add dump files one by one. In this option before starting import process, choose the default target schema as your database in which you want to import the dump files, from the drop down list.
Then click on "start import" button. This will import your single dump files in the selected database. Similarly, you can repeat the process to import other files as well.
3. You are done with it. If you don't see the imported table in your selected schema then close and re-open the MySQL workbench.
1. Open MySQL workbench and connect to database using your password. You can see the window as given below:
2. You will be provided two ways to import the dump files.
First, you can import the dump files by selecting the option "import from dump project folder". Here you can select the folder where all your dump files are stored. It will automatically import the files in database from which it was created if the database with the same name exists. So, it is better to create database with the same name and then start the importing process.
Second, you can select the option "import from self-contained file" which will allow you to add dump files one by one. In this option before starting import process, choose the default target schema as your database in which you want to import the dump files, from the drop down list.
Then click on "start import" button. This will import your single dump files in the selected database. Similarly, you can repeat the process to import other files as well.
3. You are done with it. If you don't see the imported table in your selected schema then close and re-open the MySQL workbench.
How to backup data in MySQL workbench ?
The following steps can be applied to backup data in MySQL using workbench :
1. Open workbench and connect to your database using your username and password.
2. Click on "Data Export" option under "Management" at the left side of the screen.
1. Open workbench and connect to your database using your username and password.
2. Click on "Data Export" option under "Management" at the left side of the screen.
3. You will find a list of schema from where you can select which of the schema's table do you want to backup. If you want to backup all the tables of particular table then simply click on that schema but if you want to backup only few tables of a particular schema then double click on that schema and you can see the list of tables present in the selected schema on the right side of the screen where you can unselect the table you don't want to backup.
4. Select the folder where you want the backup file to be created.
5. Finally, click on the button "start export" and wait for the operations to complete.
6. You are done. Check your specified folder to get the backup file. You can again import/restore the data whenever needed.
The above process will backup each tables separately. If you desire to backup all the tables in a single file then after step 3 in above process, click on "Export to self-contained file" radio button and also tick the option "create dump in a single transaction" and select the folder where you want to save the file. Then click on export button.
Tuesday, May 1, 2018
How to watch IPL 2018 for free ?
There are many ways you can go through to watch IPL 2018 for free. I will be discussing few methods here.
First of all if you are in India you can watch IPL through Jio TV app or airtel TV app which you can download from playstore.
There are few other methods which might not be official to watch IPL on internet from broadcaster.
1. You can download an app named "Live NetTV" by clicking here and you can run on your android mobile. You can get tons of channel here. When installed on your android phone, click on "sports" option and scroll down to find "sky sports cricket" channel in international category. You can stream from there. You will get various links over there. You can choose whichever works for you.
You can also stream it on "willow cricket" channel available in the same category.
How to run in PC?
If you desire to run this app in PC, download bluestacks or any other android emulator and then you can install this app over there.
2. You can also use alternative android app like "Mobdro" to watch IPL live on moblie. Here also you can find various channels for live streaming of IPL may be you can find star sports 1 as well here along with the channels mentioned above.
3. If you don't want to use apps or watch on mobile, here are few links which can help you for live streaming on your PC.
4. You can also watch IPL live on "Hotstar" but the problem is you will get it free for only ten minutes. After that you will have to subscribe to any one of their plan to watch it. You can actually watch free on hotstar as well but it a is tedious job you will do i.e. you will have to clear the cookies of your browser in every 10 minutes.
Except above all you can watch the highlights of every match, press conference, presentations, amazing moments of the matches of IPL anytime on its official website "iplt20.com".
Also you can watch some matches on DD sports but an hour delay, probably only one match in a week.
Saturday, April 28, 2018
Are you not able to see available networks for wifi in windows 10 ? Here is the solution.
Sometimes while working in our laptop, suddenly we are not able to see the available networks for connection though the network is easily available on other devices. It is frequently seen problem in windows 10. This problem may arise while upgrading our operating system from may be windows 7/8/8.1 to windows 10 or may be the wireless driver is corrupted due to some reasons while working in our PC. So, here is one of many possible solutions that might help you.
Follow the given steps:-
Open device manager. You can do the in the given way:
Open run by using shortcut key "Windows+R" or from entering "run" in search box.
Then write "devmgmt.msc" and press ok.
Step 2:
Expand the option "Network adapters" . Right click on "Inter(R) Dual Band Wireless" option and choose "update driver". A window will be displayed with two options. If you have the driver in your PC then select second option and locate the driver to install it otherwise go for first option which will automatically locate and install the driver from PC if available otherwise from online source if your PC is connected to internet through some kind of MODEM.
When your driver is installed or updated, you will be available to see the available networks for wifi.
If the problem persists then uninstall the current driver installed in your PC and reinstall the latest driver by downloading from the online sources.
How to compress video without loosing the quality ?
Here, we will be using VLC media player so if you don't have please install it.
Follow the given steps to compress the video without loosing quality:-
Step 1:
Open VLC media player. Click on menu "media" at the leftmost corner of menu bar. Then select "conver/save.." option from the drop down menu.
Step 2:
After performing step 1, a window will display as given in figure below. Click on "add" button and browse and select the video you want to compress. Then click on "Convert/save" button.
Step 3:
You will see a window as shown in figure below. Click on "Browse" button and select the destination location where you want the video to be saved after compression is completed. Finally click on "Start" button for the compression to start.
Step 4:
You can see the window as given below. Wait until compression is completed. Time consumed depends on the size of your video. When the compression is completed you can see the size of your original video reduced by approximately more than 5-6 times.
Finally, your job is completed.
Follow the given steps to compress the video without loosing quality:-
Step 1:
Open VLC media player. Click on menu "media" at the leftmost corner of menu bar. Then select "conver/save.." option from the drop down menu.
Step 2:
After performing step 1, a window will display as given in figure below. Click on "add" button and browse and select the video you want to compress. Then click on "Convert/save" button.
Step 3:
You will see a window as shown in figure below. Click on "Browse" button and select the destination location where you want the video to be saved after compression is completed. Finally click on "Start" button for the compression to start.
Step 4:
You can see the window as given below. Wait until compression is completed. Time consumed depends on the size of your video. When the compression is completed you can see the size of your original video reduced by approximately more than 5-6 times.
Finally, your job is completed.
Sunday, March 11, 2018
Is your PC turning off automatically after few seconds of turning on ?
Are you facing the problem of PC turning off automatically after few seconds (approximately 10-20 seconds) of PC turned on? When you search at websites, you can find various reasons for the cause of this problem. Those reasons may be correct at their place. One more reason for this cause could be a virus. In the initial this problem sounds like your OS is corrupted but the fact is through some media, a virus has been placed in your PC to run at Startup. So, when your turn on your PC, it will automatically shut down after few seconds only.
The solution to this problem is when you turn on your PC, make sure to open 'task manager' by right clicking on taskbar (or more efficiently with the help of shortcut key' ctrl+shift+esc') and then click on 'Startup' tab. After that disable the program with filename something like '1r...' (or something you feel like suspicious) and having white blank icon (probably it would be located on the top of the list). This whole process should be completed within given 10-20 seconds only. When you are done with doing this, your PC might turn off once more but don't worry if you have managed to disable the virus, it won't happen again. Finally, go to task manager again, then click on startup tab and right click on that virus program which you just disabled and open its location and delete it. Also clean your temporary files.
This might help you, if not there could be other problem with your PC.
Saturday, February 24, 2018
How to add page no. from the desired page in MS Word ?
In this post, I will be discussing how to add page number from the desired page in MS Word. When we write report of some projects, there will be abstract, acknowledgement, table of contents and so on. In this case, probably we desire to include page no. in the document from introduction part of the report. It is just an example. There can be various cases where we actually require to add page no. from desired place. So here is the solution for this problem and getting rid of preparing documents in fragments and then combining those fragments into a single file.
The following steps should be followed:-
1. Open your document file and add page no. in whole document from 'insert' tab in MS Word.
2. Take your mouse cursor on the page from which you want to add page no.
3. Click on 'layout' tab and then on combobox named 'Breaks'. A drop down window will appear. Select the option 'continuous'.
4. Go to the destinated or desired page, double left click on the page no. of that page (suppose you want to add page no. from page 3 then go to page 3 and double right click on the page no. 3). Look at the top bar in 'Design' tab. You can see a label 'Link to previous' selected so unselect it.
5. Go to the following page( if you were in page 3 then go to page 2) and double left click on the page no. of that particular page. Then press backspace(In short, remove that page no.). On doing so, you can see the all page no. above and including that page will be removed. But the page no. say 3 is still numbered the same. So now our task is to change that particular page no. 3 to page no.1 and same as other. It can be done by in the given way:-
i. Double left click on that page no. (i.e. page no.3)
ii. Then go to insert and select 'Format page numbers' form the drop down menu of 'Page no.' . A window will be displayed, under 'page numbering' select 'start at' radio button and write '1' in the box.
In this way, your task will be completed.
Refer the video given below to visualize the above process.
The following steps should be followed:-
1. Open your document file and add page no. in whole document from 'insert' tab in MS Word.
2. Take your mouse cursor on the page from which you want to add page no.
3. Click on 'layout' tab and then on combobox named 'Breaks'. A drop down window will appear. Select the option 'continuous'.
4. Go to the destinated or desired page, double left click on the page no. of that page (suppose you want to add page no. from page 3 then go to page 3 and double right click on the page no. 3). Look at the top bar in 'Design' tab. You can see a label 'Link to previous' selected so unselect it.
5. Go to the following page( if you were in page 3 then go to page 2) and double left click on the page no. of that particular page. Then press backspace(In short, remove that page no.). On doing so, you can see the all page no. above and including that page will be removed. But the page no. say 3 is still numbered the same. So now our task is to change that particular page no. 3 to page no.1 and same as other. It can be done by in the given way:-
i. Double left click on that page no. (i.e. page no.3)
ii. Then go to insert and select 'Format page numbers' form the drop down menu of 'Page no.' . A window will be displayed, under 'page numbering' select 'start at' radio button and write '1' in the box.
In this way, your task will be completed.
Refer the video given below to visualize the above process.
How to import external template to the blogger?
There are some templates available for free to the user by blogger but those templates might not be sufficient for many of the users. So, we may want to import our own template or the template downloaded from external sources. There are many websites which provide templates for free of cost. So, in this article we will be discussing the way of importing templates from external sources.
The following steps should be followed:-
Step 1: Download the desired template from external links.
For example: https://btemplates.com/ , https://templated.co/ etc
Step 2: Extract the zip file in a folder (if the downloaded file is zipped) and find the file with '.xml' extension.
Step 3: Log in to your blogger account and select option 'theme' from the left side bar. Then click on button 'Backup/restore' available on right top corner as shown in figure below:
Step 4: When the button is clicked, a window is popped which looks like as shown in figure below:
Click on button 'choose file' and then open the extracted template's folder (downloaded from the external links). Choose the file with '.xml' extension and click on upload button. You can back up your current template by clicking on the button 'Download theme' before uploading the '.xml' file so that you can use your current template later on if you didn't like the downloaded template.
Step 5: The new template will be implemented by now but you the default widgets of the template might not be according to your requirement so go back and click on option 'layout' and manage the widgets according to your wish.
Note: If there is slider for picture then to modify it or to add your own picture, you need to edit the HTML code. Similarly, to add menu, sub menu also we need to modify HTML code. Some templates clearly mention the place for modification of code for picture slider, menu and so on.
The steps for modifying the code for addition of menu, sub menu, picture's slider, fevicon and so on will be elaborated in next posts under Tech articles. We will also discuss how to add desired number of ads in between the posts from google adsense.
Remember some templates might not work in blogger so in that case go for next template.
How to change favicon in blogger ?
What is favicon?
favicon (favorite icon is a small little icon used to identify your blog in the browser. When someone bookmark your blog then this favicon will be displayed in his/her bookmark list so that a particular blog can be idenified easily. It also appears in the tab of browser in which your blog is opened. Hence, try to select icon which will be relevant to your blog.
1. Log in to your blogger.
2. Choose 'layout' option from the left side bar .
3. You can see a tab 'favicon' tab on the top.
4.Click on 'edit' seen in the tab.
5. Choose the desired image and then click on the 'save' button.
warning: The size of selected image should not exceed 100 KB and the extension should be .ico. Also the image must be square.
6. Your job is done.
Friday, February 23, 2018
Tuesday, January 30, 2018
How to calculate log base 2 ?
The calculator we use, we can find the logarithmic operations like log base e and log base 10. So, the question arises what shall we do if we want to calculate log base 2 or log to the base any number other than log base e and log base 10. The answer is within your calculator. You just need to recall a logarithmic formula read in mathematics. The formula is :
logd(a)
/ logd(b) = logb(a)
So, if you want to calculate log(x) with base 2 then use the formula in your calculator as:
log10(x)
/ log10(2) =
log2(x)
or, you can use
ln(x)
/ ln(2)=
log2(x)
Similarly, you can calculate log to the
base any number using above formula.
For example:
log2(4)= ln(4)
/ ln(2)=2
log2(8)= ln(8) / ln(2)=3
log2(3)= ln(3) / ln(2)=1.584962501
Friday, January 26, 2018
Is drag and drop the future of programming?
Drag and drop in
programming means selecting an object from the given toolbox holding the mouse
click, moving it (dragging) on the form given in the software and then finally
placing (dropping) at the desired place on the form. This feature comes with
GUI (Graphical User Interface) based programming. A form is given to the
programmer, and a toolbox containing various components to handle the events
occurring in the program. A programmer has to write programs for those events
according to the requirements of their program. The components contained in the
toolbox could be button, timer, label, textbox, picture box and so on. These
may vary for different softwares but the motive will be same, to handle the
events. There are many softwares that provide drag and drop platform for
programming, for example Visual C++, Visual Basic, Visual C#, MIT App Inventor,
Scratch etc.
Day by day new milestones
are being achieved in the field of drag and drop programming. It is faster to
code in the software having the support of drag and drop. It saves the time
which is consumed in creating the components like button, textbox etc. during
text programming. In Visual Studio (which provides drag and drop support) ,we
can find windows form for Visual C++, Visual C#, Visual Basic to use the drag
and drop feature. Drag and drop enables rapid application development which
makes this feature even more special. Even some professional software
developers are using this platform in their programming. Though Microsoft stopped
supporting Visual Basic on April 8, 2008, some programmers still prefer it
because of its simplicity in coding and as a result it won technical impact
award at the 19th D.I.C.E award in 2016. It shows that to some or more
extent, people are preferring easy coding. The development of MIT App Inventor,
Scratch and many other similar softwares are the evidences for this. MIT app
Inventor, Scratch are even one step ahead than what visual studio offers in
terms of drag and drop feature. They actually provide drag and drop along with
block based programming. Programmers don’t even have to write code for defining
an event in the program. They can simply drag and drop the components on the
form given and then they can arrange different blocks, given for each
components, to get the desired output. These softwares are cloud based so they
are even promoting the concept of cloud computing, which is actually supposed
to be the future of computer science. Because softwares using drag and drop are
relatively easier than text programming doesn’t mean they are used to build
only simple applications. Though the limitations are there for block based drag
and drop softwares like MIT App Inventor, Scratch etc, which are still in the
phase of development, other softwares like Visual C++, C# are very powerful and
highly efficient. We can build powerful video games, database management
system, apps for windows, Mac and even for mobile using these softwares.
Considering all those
features and advantages of drag and drop based programming software, the
question arises, “Is drag and drop the future of programming?”. Are we ready to
make a transition from text based programming to drag and drop programming?
Don’t we need knowledge of core programming anymore? Are we done with text
based programming? A lot of questions arises. It is actually a debatable topic.
Yes, of course drag and drop is not going to replace text based programming
like C, C++ because the development of drag and drop based programming has been
possible because of these text based programming languages only. Even the
enhancements and improvements being made in the field of drag and drop based
programming are due to continuous hard work of text based programmers who have
depth knowledge of core programming and computer system. New revolutions in the
field of programming are possible only through text based programming. The one
who is expert in programming, find drag and drop annoying because of the use of
mouse during programming and large consumption of time in dragging and dropping
process. Drag and drop based programming can be used in school level to
motivate and attract students towards programming where students don’t have to
be worry about syntactic errors and finding bugs in the program. They can give
their thoughts a visual shape. They will develop the habit of generating ideas
and solving problems. They can enjoy programming rather than directly jumping
to some tough languages like C, C++. They can see their thoughts coming alive
in the form of programs which will encourage them towards programming and
eventually towards Computer Science. When they start programming and making
apps in drag and drop environment, they will reach a point where they will
realize its limitations and they feel like jumping to a text based programming for
further enhancements of their skills in the field of programming and making
even more powerful and performance driven softwares. And this transition is not
going to make them feel programming as a difficult task because till then they
would have developed the habit of generating new and innovative ideas, solving
problems with different angles, converting thoughts into programs. It will be
just a change of language which can even help them to sort out the limitations
of drag and drop and improve its upcoming versions.
So, drag and drop is not
the future of programming but, for sure it is going to help in encouraging and
producing more creative and innovative programmers in the coming future.
Saturday, January 20, 2018
Computer Organisation & Architecture
PROGRAM IN MATLAB FOR DIVISION OF TWO UNSIGNED INTEGER BINARY NUMBERS
(N-BIT NUMBERS)
(N-BIT NUMBERS)
. To implement non-restoring division algorithm in digital computer
function lab5_coa
n=input('enter n:');
a=input('enter a:');
b=input('enter b:');
c=b;
q=a;
carry=0;
for i=1:1:n
a(1,i)=0;
end
for i=n:-1:1
if(c(1,i)==1)
c(1,i)=0;
else
c(1,i)=1;
end
end
for i=1:1:n-1
x(1,i)=0;
end
x(1,n)=1;
for i=n:-1:1
sum=xor(xor(x(1,i),c(1,i)),carry);
carry=or(and(x(1,i),c(1,i)),and(xor(x(1,i),c(1,i)),carry));
r(1,i)=sum;
end
c=r;
for i=1:1:n-1
a(1,i)=a(1,i+1);
end
a(1,n)=q(1,1);
for i=1:1:n-1
q(1,i)=q(1,i+1);
end
carry=0;
for i=n:-1:1
sum=xor(xor(a(1,i),c(1,i)),carry);
carry=or(and(a(1,i),c(1,i)),and(xor(a(1,i),c(1,i)),carry));
a(1,i)=sum;
end
%LOOPING CONDITION
for count=1:1:n-1
if (a(1,1)==1)
q(1,n)=0;
for i=1:1:n-1
a(1,i)=a(1,i+1);
end
a(1,n)=q(1,1);
for i=1:1:n-1
q(1,i)=q(1,i+1);
end
carry=0;
for i=n:-1:1
sum=xor(xor(a(1,i),b(1,i)),carry);
carry=or(and(a(1,i),b(1,i)),and(xor(a(1,i),b(1,i)),carry));
a(1,i)=sum;
end
else
q(1,n)=1;
for i=1:1:n-1
a(1,i)=a(1,i+1);
end
a(1,n)=q(1,1);
for i=1:1:n-1
q(1,i)=q(1,i+1);
end
carry=0;
for i=n:-1:1
sum=xor(xor(a(1,i),c(1,i)),carry);
carry=or(and(a(1,i),c(1,i)),and(xor(a(1,i),c(1,i)),carry));
a(1,i)=sum;
end
end
end
% After completion of loop for count n-1
if(a(1,1)==1)
q(1,n)=0;
carry=0;
for i=n:-1:1
sum=xor(xor(a(1,i),b(1,i)),carry);
carry=or(and(a(1,i),b(1,i)),and(xor(a(1,i),b(1,i)),carry));
a(1,i)=sum;
end
else
q(1,n)=1;
else
q(1,n)=1;
end
fprintf('Remainder =');
disp(a);
fprintf('Quotient=');
disp(q);
end
Computer Organisation & Architecture
PROGRAM IN MATLAB FOR DIVISION OF TWO UNSIGNED INTEGER BINARY NUMBERS (N-BIT NUMBERS)
. To implement restoring division algorithm in digital computer
. To implement restoring division algorithm in digital computer
function div
n=input('enter n:');
a=input('enter a:');
b=input('enter b:');
c=b;
q=a;
carry=0;
for i=1:1:n
a(1,i)=0;
end
for i=n:-1:1
if(c(1,i)==1)
c(1,i)=0;
else
c(1,i)=1;
end
end
for i=1:1:n-1
x(1,i)=0;
end
x(1,n)=1;
for i=n:-1:1
sum=xor(xor(x(1,i),c(1,i)),carry);
carry=or(and(x(1,i),c(1,i)),and(xor(x(1,i),c(1,i)),carry));
r(1,i)=sum;
end
c=r;
for count=0:1:n-1
for i=1:1:n-1
a(1,i)=a(1,i+1);
end
a(1,n)=q(1,1);
for i=1:1:n-1
q(1,i)=q(1,i+1);
end
carry=0;
for i=n:-1:1
sum=xor(xor(a(1,i),c(1,i)),carry);
carry=or(and(a(1,i),c(1,i)),and(xor(a(1,i),c(1,i)),carry));
a(1,i)=sum;
end
if (a(1,1)==1)
q(1,n)=0;
carry=0;
for i=n:-1:1
sum=xor(xor(a(1,i),b(1,i)),carry);
carry=or(and(a(1,i),b(1,i)),and(xor(a(1,i),b(1,i)),carry));
a(1,i)=sum;
end
else
q(1,n)=1;
end
end
fprintf('Remainder =');
disp(a);
fprintf('Quotient=');
disp(q);
end
Computer Organisation & Architecture
PROGRAM IN MATLAB FOR MULTIPLICATION OF TWO UNSIGNED INTEGER BINARY NUMBERS BY PARTIAL-PRODUCT METHOD (4BITS NUMBERS)
function lab2_coa
a=input('enter a:');
b=input('enter b:');
r=[0 0 0 0 0 0 0 0];
c=0;
for j=4:-1:1
if(b(1,j)==0)
continue;
end
for i=4:-1:1
sum=xor(xor(r(1,i+j),a(1,i)),c);
carry=or(and(r(1,i+j),a(1,i)),and(xor(r(1,i+j),a(1,i)),c));
c=carry;
r(1,i+j)=sum;
end
end
disp(r);
disp(c);
end
function lab2_coa
a=input('enter a:');
b=input('enter b:');
r=[0 0 0 0 0 0 0 0];
c=0;
for j=4:-1:1
if(b(1,j)==0)
continue;
end
for i=4:-1:1
sum=xor(xor(r(1,i+j),a(1,i)),c);
carry=or(and(r(1,i+j),a(1,i)),and(xor(r(1,i+j),a(1,i)),c));
c=carry;
r(1,i+j)=sum;
end
end
disp(r);
disp(c);
end
Computer Organisation & Architecture
PROGRAM IN MATLAB FOR SUBTRACTION OF TWO UNSIGNED INTEGER BINARY NUMBER (4BITS NUMBERS)
function lab3_coa
a=input('enter a:');
b=input('enter b:');
c=0;
temp=a;
for i=4:-1:1
if(b(1,i)==1)
b(1,i)=0;
else
b(1,i)=1;
end
end
a=[0 0 0 1];
for i=4:-1:1
sum=xor(xor(a(1,i),b(1,i)),c);
carry=or(and(a(1,i),b(1,i)),and(xor(a(1,i),b(1,i)),c));
c=carry;
result(1,i)=sum;
end
a=temp;
b=result;
c=0;
for i=4:-1:1
sum=xor(xor(a(1,i),b(1,i)),c);
carry=or(and(a(1,i),b(1,i)),and(xor(a(1,i),b(1,i)),c));
c=carry;
result(1,i)=sum;
end
if(c==0)
fprintf('The number is negative.');
for i=4:-1:1
if(result(1,i)==1)
result(1,i)=0;
else
result(1,i)=1;
end
end
a=[0 0 0 1];
for i=4:-1:1
sum=xor(xor(a(1,i),result(1,i)),c);
carry=or(and(a(1,i),result(1,i)),and(xor(a(1,i),result(1,i)),c));
c=carry;
result(1,i)=sum;
end
end
disp(result);
disp(c);
end
function lab3_coa
a=input('enter a:');
b=input('enter b:');
c=0;
temp=a;
for i=4:-1:1
if(b(1,i)==1)
b(1,i)=0;
else
b(1,i)=1;
end
end
a=[0 0 0 1];
for i=4:-1:1
sum=xor(xor(a(1,i),b(1,i)),c);
carry=or(and(a(1,i),b(1,i)),and(xor(a(1,i),b(1,i)),c));
c=carry;
result(1,i)=sum;
end
a=temp;
b=result;
c=0;
for i=4:-1:1
sum=xor(xor(a(1,i),b(1,i)),c);
carry=or(and(a(1,i),b(1,i)),and(xor(a(1,i),b(1,i)),c));
c=carry;
result(1,i)=sum;
end
if(c==0)
fprintf('The number is negative.');
for i=4:-1:1
if(result(1,i)==1)
result(1,i)=0;
else
result(1,i)=1;
end
end
a=[0 0 0 1];
for i=4:-1:1
sum=xor(xor(a(1,i),result(1,i)),c);
carry=or(and(a(1,i),result(1,i)),and(xor(a(1,i),result(1,i)),c));
c=carry;
result(1,i)=sum;
end
end
disp(result);
disp(c);
end
Computer Organisation & Architecture
PROGRAM IN MATLAB FOR ADDITION OF TWO UNSIGNED INTEGER BINARY NUMBER (4-BITS NUMBERS)
function lab0_coa
a=input('enter a:');
b=input('enter b:');
c=input('enter c:');
for i=4:-1:1
sum=xor(xor(a(1,i),b(1,i)),c);
carry=or(and(a(1,i),b(1,i)),and(xor(a(1,i),b(1,i)),c));
c=carry;
result(1,i)=sum;
end
disp(result);
disp(c);
end
Tuesday, December 26, 2017
Program for 2D reflection along Y-axis (using graphics.h)
#include <graphics.h>
#include <stdlib.h>
#include <stdio.h>
#include<math.h>
int main()
{
int gm;
int gd=DETECT;
int x1,x2,x3,y1,y2,y3;
//initgraph(&gd,&gm,"c:\tc\bg:");
initwindow(1200,600);
printf("\n\t Enter the three points of a triangle: ");
setcolor(6);
setlinestyle(0,0,3);
scanf("%d%d%d%d%d%d",&x1,&y1,&x2,&y2,&x3,&y3);
line(x1,y1,x2,y2);
line(x2,y2,x3,y3);
line(x3,y3,x1,y1);
setcolor(4);
line(x1,y1+240,x2,y2+240);
line(x2,y2+240,x3,y3+240);
line(x3,y3+240,x1,y1+240);
getch();
closegraph();
}
Program for 2D reflection in C along X-axis (using graphics.h)
#include <graphics.h>
#include <stdlib.h>
#include <stdio.h>
#include<math.h>
int main()
{
int gm;
int gd=DETECT;
int x1,x2,x3,y1,y2,y3;
//initgraph(&gd,&gm,"c:\tc\bg:");
initwindow(1200,600);
printf("\n\t Enter the three points of a triangle: ");
setcolor(6);
setlinestyle(0,0,3);
scanf("%d%d%d%d%d%d",&x1,&y1,&x2,&y2,&x3,&y3);
line(x1,y1,x2,y2);
line(x2,y2,x3,y3);
line(x3,y3,x1,y1);
setcolor(4);
line(x1,y1+240,x2,y2+240);
line(x2,y2+240,x3,y3+240);
line(x3,y3+240,x1,y1+240);
getch();
closegraph();
}
Program for 2D schearing in C (using graphics.h)
#include <graphics.h>
#include <stdlib.h>
#include <stdio.h>
#include<math.h>
int main()
{
int gm;
int gd=DETECT;
int x1,x2,x3,y1,y2,y3,nx1,nx2,nx3,ny1,ny2,ny3;
int shx,shy;
initwindow(1200,600);
printf("\n\t Enter the three points of a triangle: ");
setcolor(6);
setlinestyle(0,0,3);
scanf("%d%d%d%d%d%d",&x1,&y1,&x2,&y2,&x3,&y3);
line(x1,y1,x2,y2);
line(x2,y2,x3,y3);
line(x3,y3,x1,y1);
setcolor(4);
printf("\n Enter the shearing factor");
scanf("%d%d",&shx,­);
nx1=x1+y1*shx;
ny1=y1+x1*shy;
nx2=x2+y2*shx;
ny2=y2+x2*shy;
nx3=x3+y3*shx;
ny3=y3+x3*shy;
line(nx1,ny1,nx2,ny2);
line(nx2,ny2,nx3,ny3);
line(nx3,ny3,nx1,ny1);
getch();
closegraph();
}
#include <stdlib.h>
#include <stdio.h>
#include<math.h>
int main()
{
int gm;
int gd=DETECT;
int x1,x2,x3,y1,y2,y3,nx1,nx2,nx3,ny1,ny2,ny3;
int shx,shy;
initwindow(1200,600);
printf("\n\t Enter the three points of a triangle: ");
setcolor(6);
setlinestyle(0,0,3);
scanf("%d%d%d%d%d%d",&x1,&y1,&x2,&y2,&x3,&y3);
line(x1,y1,x2,y2);
line(x2,y2,x3,y3);
line(x3,y3,x1,y1);
setcolor(4);
printf("\n Enter the shearing factor");
scanf("%d%d",&shx,­);
nx1=x1+y1*shx;
ny1=y1+x1*shy;
nx2=x2+y2*shx;
ny2=y2+x2*shy;
nx3=x3+y3*shx;
ny3=y3+x3*shy;
line(nx1,ny1,nx2,ny2);
line(nx2,ny2,nx3,ny3);
line(nx3,ny3,nx1,ny1);
getch();
closegraph();
}
Program for 2D scaling in c (using graphics.h)
#include <graphics.h>
#include <stdlib.h>
#include <stdio.h>
#include<math.h>
int main()
{
int gm;
int gd=DETECT;
int x1,x2,x3,y1,y2,y3;
int sx,sy;
initwindow(1200,600);
printf("\n\t Enter the three points of a triangle: ");
setcolor(6);
setlinestyle(0,0,3);
scanf("%d%d%d%d%d%d",&x1,&y1,&x2,&y2,&x3,&y3);
line(x1,y1,x2,y2);
line(x2,y2,x3,y3);
line(x3,y3,x1,y1);
setcolor(4);
printf("\n Enter the scalling factor");
scanf("%d%d",&sx,&sy);
line(x1*sx,y1*sy,x2*sx,y2*sy);
line(x2*sx,y2*sy,x3*sx,y3*sy);
line(x3*sx,y3*sy,x1*sx,y1*sy);
getch();
closegraph();
}
#include <stdlib.h>
#include <stdio.h>
#include<math.h>
int main()
{
int gm;
int gd=DETECT;
int x1,x2,x3,y1,y2,y3;
int sx,sy;
initwindow(1200,600);
printf("\n\t Enter the three points of a triangle: ");
setcolor(6);
setlinestyle(0,0,3);
scanf("%d%d%d%d%d%d",&x1,&y1,&x2,&y2,&x3,&y3);
line(x1,y1,x2,y2);
line(x2,y2,x3,y3);
line(x3,y3,x1,y1);
setcolor(4);
printf("\n Enter the scalling factor");
scanf("%d%d",&sx,&sy);
line(x1*sx,y1*sy,x2*sx,y2*sy);
line(x2*sx,y2*sy,x3*sx,y3*sy);
line(x3*sx,y3*sy,x1*sx,y1*sy);
getch();
closegraph();
}
Program for 2D translation in C (using graphics.h)
#include <graphics.h>
#include <stdlib.h>
#include <stdio.h>
#include<math.h>
int main()
{
int gm;
int gd=DETECT;
int x1,x2,x3,y1,y2,y3,nx1,nx2,nx3,ny1,ny2,ny3;
int xt,yt;
initwindow(1200,600);
printf("\n\t Enter the three points of a triangle: ");
setcolor(6);
setlinestyle(0,0,3);
scanf("%d%d%d%d%d%d",&x1,&y1,&x2,&y2,&x3,&y3);
line(x1,y1,x2,y2);
line(x2,y2,x3,y3);
line(x3,y3,x1,y1);
setcolor(4);
printf("\n Enter the translation factor");
scanf("%d%d",&xt,&yt);
nx1=x1+xt;
ny1=y1+yt;
nx2=x2+xt;
ny2=y2+yt;
nx3=x3+xt;
ny3=y3+yt;
line(nx1,ny1,nx2,ny2);
line(nx2,ny2,nx3,ny3);
line(nx3,ny3,nx1,ny1);
getch();
closegraph();
}
#include <stdlib.h>
#include <stdio.h>
#include<math.h>
int main()
{
int gm;
int gd=DETECT;
int x1,x2,x3,y1,y2,y3,nx1,nx2,nx3,ny1,ny2,ny3;
int xt,yt;
initwindow(1200,600);
printf("\n\t Enter the three points of a triangle: ");
setcolor(6);
setlinestyle(0,0,3);
scanf("%d%d%d%d%d%d",&x1,&y1,&x2,&y2,&x3,&y3);
line(x1,y1,x2,y2);
line(x2,y2,x3,y3);
line(x3,y3,x1,y1);
setcolor(4);
printf("\n Enter the translation factor");
scanf("%d%d",&xt,&yt);
nx1=x1+xt;
ny1=y1+yt;
nx2=x2+xt;
ny2=y2+yt;
nx3=x3+xt;
ny3=y3+yt;
line(nx1,ny1,nx2,ny2);
line(nx2,ny2,nx3,ny3);
line(nx3,ny3,nx1,ny1);
getch();
closegraph();
}
Tuesday, December 19, 2017
C++ program to draw a circle and ellipse in a single window (using graphics.h)
#include <graphics.h>
#include <iostream>
#include <conio.h>
using namespace std;
void circle();
void ellipse();
void plotpoints(int,int,int,int);
int main(){
int gdriver = DETECT, gmode;
initgraph(&gdriver,&gmode,"c:\\turboc3\\bgi");
circle();
ellipse();
getch();
closegraph();
return 0;
}
void circle()
{
int x,y,p,xc,yc,r;
cout<<"Enter co-ordinate for centre of circle:";
cin>>xc>>yc;
cout<<"Enter radius of circle: ";
cin>>r;
x = 0;
y = r;
p = 1-r;
while(x<=y){
if(p<0){
x=x+1;
y=y+0;
p=p+2*x +1;
}
else{
x=x+1;
y=y-1;
p=p+2*x-2*y+1;
}
putpixel(xc+x,yc+y,WHITE);
putpixel(xc+y,yc+x,WHITE);
putpixel(xc+x,yc-y,WHITE);
putpixel(xc+y,yc-x,WHITE);
putpixel(xc-x,yc-y,WHITE);
putpixel(xc-y,yc-x,WHITE);
putpixel(xc-x,yc+y,WHITE);
putpixel(xc-y,yc+x,WHITE);
delay(50);
}
}
void ellipse()
{
int x,y,p,xc,yc,rx,ry;
cout<<"Enter co-ordinate for centre of ellipse:";
cin>>xc>>yc;
cout<<"Enter the value of rx and ry of ellipse: ";
cin>>rx>>ry;
x=0;
y=ry;
p=ry*ry-ry*rx*rx+(1/4)*rx*rx;
while((2*ry*ry*x)<(2*rx*rx*y))
{
if(p<0)
{
p=p+2*x*ry*ry+ry*ry;
x=x+1;
y=y+0;
}
else
{
p=p-2*y*rx*rx+2*x*ry*ry+ry*ry;
x=x+1;
y=y-1;
}
plotpoints(x,y,xc,yc);
}
p=(x+0.5)*(x+0.5)*ry*ry+rx*rx*(y-1)*(y-1)-rx*rx*ry*ry;
while(y>0)
{
if(p<0)
{
x=x+1;
y=y-1;
p=p+2*x*ry*ry+rx*rx-2*y*rx*rx;
}
else
{
x=x+0;
y=y-1;
p=p+rx*rx-2*y*rx*rx;
}
plotpoints(x,y,xc,yc);
}
}
void plotpoints(int x,int y,int xc,int yc)
{
putpixel(x+xc,y+yc,WHITE);
putpixel(-x+xc,y+yc,WHITE);
putpixel(x+xc,-y+yc,WHITE);
putpixel(-x+xc,-y+yc,WHITE);
delay(50);
}
Monday, December 18, 2017
C++ program to draw an ellipse using Mid-point algorithm (using graphics.h)
#include<math.h>
#include <graphics.h>
#include <iostream>
#include <conio.h>
using namespace std;
void plotpoints(int,int,int,int);
int main(){
int xc,yc,x,y,p,rx,ry;
int gdriver = DETECT, gmode;
initgraph(&gdriver,&gmode,"c:\\turboc3\\bgi");
cout<<"Enter co-ordinate for centre of ellipse:";
cin>>xc>>yc;
cout<<"Enter the value of rx and ry of ellipse: ";
cin>>rx>>ry;
x=0;
y=ry;
p=ry*ry-ry*rx*rx+(1/4)*rx*rx;
while((2*ry*ry*x)<(2*rx*rx*y))
{
if(p<0)
{
p=p+2*x*ry*ry+ry*ry;
x=x+1;
y=y+0;
}
else
{
p=p-2*y*rx*rx+2*x*ry*ry+ry*ry;
x=x+1;
y=y-1;
}
plotpoints(x,y,xc,yc);
}
p=(x+0.5)*(x+0.5)*ry*ry+rx*rx*(y-1)*(y-1)-rx*rx*ry*ry;
while(y>0)
{
if(p<0)
{
x=x+1;
y=y-1;
p=p+2*x*ry*ry+rx*rx-2*y*rx*rx;
}
else
{
x=x+0;
y=y-1;
p=p+rx*rx-2*y*rx*rx;
}
plotpoints(x,y,xc,yc);
}
getch();
closegraph();
return 0;
}
void plotpoints(int x,int y,int xc,int yc)
{
putpixel(x+xc,y+yc,WHITE);
putpixel(-x+xc,y+yc,WHITE);
putpixel(x+xc,-y+yc,WHITE);
putpixel(-x+xc,-y+yc,WHITE);
delay(50);
}
#include <graphics.h>
#include <iostream>
#include <conio.h>
using namespace std;
void plotpoints(int,int,int,int);
int main(){
int xc,yc,x,y,p,rx,ry;
int gdriver = DETECT, gmode;
initgraph(&gdriver,&gmode,"c:\\turboc3\\bgi");
cout<<"Enter co-ordinate for centre of ellipse:";
cin>>xc>>yc;
cout<<"Enter the value of rx and ry of ellipse: ";
cin>>rx>>ry;
x=0;
y=ry;
p=ry*ry-ry*rx*rx+(1/4)*rx*rx;
while((2*ry*ry*x)<(2*rx*rx*y))
{
if(p<0)
{
p=p+2*x*ry*ry+ry*ry;
x=x+1;
y=y+0;
}
else
{
p=p-2*y*rx*rx+2*x*ry*ry+ry*ry;
x=x+1;
y=y-1;
}
plotpoints(x,y,xc,yc);
}
p=(x+0.5)*(x+0.5)*ry*ry+rx*rx*(y-1)*(y-1)-rx*rx*ry*ry;
while(y>0)
{
if(p<0)
{
x=x+1;
y=y-1;
p=p+2*x*ry*ry+rx*rx-2*y*rx*rx;
}
else
{
x=x+0;
y=y-1;
p=p+rx*rx-2*y*rx*rx;
}
plotpoints(x,y,xc,yc);
}
getch();
closegraph();
return 0;
}
void plotpoints(int x,int y,int xc,int yc)
{
putpixel(x+xc,y+yc,WHITE);
putpixel(-x+xc,y+yc,WHITE);
putpixel(x+xc,-y+yc,WHITE);
putpixel(-x+xc,-y+yc,WHITE);
delay(50);
}
C++ program to draw a circle using Mid-point algorithm (using graphics.h)
#include <graphics.h>
#include <iostream>
#include <conio.h>
using namespace std;
int main(){
int xc,yc,x,y,p,r;
int gdriver = DETECT, gmode;
initgraph(&gdriver,&gmode,"c:\\turboc3\\bgi");
cout<<"Enter co-ordinate for centre of circle:";
cin>>xc>>yc;
cout<<"Enter radius of circle: ";
cin>>r;
x = 0;
y = r;
p = 1-r;
while(x<=y){
if(p<0){
x=x+1;
y=y+0;
p=p+2*x +1;
}
else{
x=x+1;
y=y-1;
p=p+2*x-2*y+1;
}
putpixel(xc+x,yc+y,WHITE);
putpixel(xc+y,yc+x,WHITE);
putpixel(xc+x,yc-y,WHITE);
putpixel(xc+y,yc-x,WHITE);
putpixel(xc-x,yc-y,WHITE);
putpixel(xc-y,yc-x,WHITE);
putpixel(xc-x,yc+y,WHITE);
putpixel(xc-y,yc+x,WHITE);
delay(100);
}
getch();
closegraph();
return 0;
}
#include <iostream>
#include <conio.h>
using namespace std;
int main(){
int xc,yc,x,y,p,r;
int gdriver = DETECT, gmode;
initgraph(&gdriver,&gmode,"c:\\turboc3\\bgi");
cout<<"Enter co-ordinate for centre of circle:";
cin>>xc>>yc;
cout<<"Enter radius of circle: ";
cin>>r;
x = 0;
y = r;
p = 1-r;
while(x<=y){
if(p<0){
x=x+1;
y=y+0;
p=p+2*x +1;
}
else{
x=x+1;
y=y-1;
p=p+2*x-2*y+1;
}
putpixel(xc+x,yc+y,WHITE);
putpixel(xc+y,yc+x,WHITE);
putpixel(xc+x,yc-y,WHITE);
putpixel(xc+y,yc-x,WHITE);
putpixel(xc-x,yc-y,WHITE);
putpixel(xc-y,yc-x,WHITE);
putpixel(xc-x,yc+y,WHITE);
putpixel(xc-y,yc+x,WHITE);
delay(100);
}
getch();
closegraph();
return 0;
}
C++ program to draw a line using Bresenham's algorithm (using graphics.h)
#include<iostream>
#include<graphics.h>
using namespace std;
void drawline(int,int,int,int);
int main(){
int gdriver=DETECT, gmode, x1, y1, x2, y2;
initgraph(&gdriver, &gmode, "c:\\turboc3\\bgi");
cout<<"Enter co-ordinates of start point: ";
cin>>x1>>y1;
cout<<"Enter co-ordinates of end point: ";
cin>>x2>>y2;
drawline(x1, y1, x2, y2);
getch();
closegraph();
return 0;
}
void drawline(int x1,int y1,int x2,int y2 )
{
int dx,dy,xinc,yinc,x,y,k,pk;
dx=x2-x1;
dy=y2-y1;
if(x2>x1)
xinc=1;
else
xinc=-1;
if(y2>y1)
yinc=1;
else
yinc=-1;
if(abs(dx)>abs(dy)){
x=x1;
y=y1;
pk=2*dy-dx;
for(k=0;k<=dx;k++)
{
if(pk<0)
{
putpixel(x,y,RED);
x=x+xinc;
y=y+0;
pk=pk+2*dy;
}
else{
putpixel(x,y,RED),
x=x+xinc;
y=y+yinc;
pk=pk+2*(dy-dx);
}
delay(100);
}
}
else {
x=x1;
y=y1;
pk=2*dx-dy;
for(k=0;k<=dy;k++)
{
if(pk<0)
{
putpixel(x,y,RED),
x=x+0;
y=y+yinc;
pk=pk+2*dx;
}
else{
putpixel(x,y,RED),
x=x+xinc;
y=y+yinc;
pk=pk+2*(dx-dy);
}
delay(100);
}
}
}
#include<graphics.h>
using namespace std;
void drawline(int,int,int,int);
int main(){
int gdriver=DETECT, gmode, x1, y1, x2, y2;
initgraph(&gdriver, &gmode, "c:\\turboc3\\bgi");
cout<<"Enter co-ordinates of start point: ";
cin>>x1>>y1;
cout<<"Enter co-ordinates of end point: ";
cin>>x2>>y2;
drawline(x1, y1, x2, y2);
getch();
closegraph();
return 0;
}
void drawline(int x1,int y1,int x2,int y2 )
{
int dx,dy,xinc,yinc,x,y,k,pk;
dx=x2-x1;
dy=y2-y1;
if(x2>x1)
xinc=1;
else
xinc=-1;
if(y2>y1)
yinc=1;
else
yinc=-1;
if(abs(dx)>abs(dy)){
x=x1;
y=y1;
pk=2*dy-dx;
for(k=0;k<=dx;k++)
{
if(pk<0)
{
putpixel(x,y,RED);
x=x+xinc;
y=y+0;
pk=pk+2*dy;
}
else{
putpixel(x,y,RED),
x=x+xinc;
y=y+yinc;
pk=pk+2*(dy-dx);
}
delay(100);
}
}
else {
x=x1;
y=y1;
pk=2*dx-dy;
for(k=0;k<=dy;k++)
{
if(pk<0)
{
putpixel(x,y,RED),
x=x+0;
y=y+yinc;
pk=pk+2*dx;
}
else{
putpixel(x,y,RED),
x=x+xinc;
y=y+yinc;
pk=pk+2*(dx-dy);
}
delay(100);
}
}
}
C++ Program for drawing line using DAA algorithm (using graphics.h)
#include <graphics.h>
#include <iostream>
#include <math.h>
using namespace std;
int main( )
{
float x,y,x1,y1,x2,y2,dx,dy,step;
int i,gd=DETECT,gm;
initgraph(&gd,&gm,"c:\\turboc3\\bgi");
cout<<"Enter the value of x1 and y1 : ";
cin>>x1>>y1;
cout<<"Enter the value of x2 and y2: ";
cin>>x2>>y2;
dx=abs(x2-x1);
dy=abs(y2-y1);
if(dx>=dy)
step=dx;
else
step=dy;
dx=dx/step;
dy=dy/step;
x=x1;
y=y1;
i=1;
while(i<=step)
{
putpixel(x,y,GREEN);
x=x+dx;
y=y+dy;
i=i+1;
delay(100);
}
getch();
closegraph();
}
#include <iostream>
#include <math.h>
using namespace std;
int main( )
{
float x,y,x1,y1,x2,y2,dx,dy,step;
int i,gd=DETECT,gm;
initgraph(&gd,&gm,"c:\\turboc3\\bgi");
cout<<"Enter the value of x1 and y1 : ";
cin>>x1>>y1;
cout<<"Enter the value of x2 and y2: ";
cin>>x2>>y2;
dx=abs(x2-x1);
dy=abs(y2-y1);
if(dx>=dy)
step=dx;
else
step=dy;
dx=dx/step;
dy=dy/step;
x=x1;
y=y1;
i=1;
while(i<=step)
{
putpixel(x,y,GREEN);
x=x+dx;
y=y+dy;
i=i+1;
delay(100);
}
getch();
closegraph();
}
Thursday, December 14, 2017
Assistant Maya
This android app will help you get your daily class routine delivered to you in the form of voice and also you can schedule your daily plans so that Maya can recall them for you whenever you require.
Click here to download.
Click here to download.
Wednesday, December 13, 2017
Sunday, October 29, 2017
Exploring Thailand: A Five-Day Adventure
It all started one year back (the planning, preparation and some sorts of online researches about that particular country). But because it was a foreign tour and it was the first time for all of us, it took quite a bit more time to gather all the informations, thus it could not happened at that time. we were five members including me, my brother, sister and my parents. Managing the holidays of all five at the same time we decided to go on tour in the first week of October but though we informed our travel agency approximately one month prior to departure, we were late. Since it was the time of holiday in Nepal, all the tickets of Nepal Airlines were booked. Then we were pushed in the last week of October. Actually it was a challenging date because lots of preparations were to made and there were lots of holidays in that month so it took us some time to get visa of Thailand. Before departing for Bangkok ,we were left with only one day to manage all the financial papers ,exchange the cash, make traveller card to meet the requirements of Department of immigration of Nepal. We were lucky enough to get all those things done within few hours (thanks to the holidays for Diwali because of which there was no queue in the bank).
So after all the preparations done, we were ready to fly on 23rd October to Bangkok at 11:15 am.
Day 1
It was really an exciting experience to be there. The airport was very huge and of high standard. It required quite few distance to walk to claim for the baggage. Every thing was very well managed there at the airport. We took our baggage and went to gate no. 10 as instructed by our travel agency to wait for their representative to pick up for transfer to Pattaya city. It took about two hours to reach our hotel "Crown Pattaya beach hotel" in Pattaya, from an airport in Bangkok. The hotel was very clean and tidy. The rooms were very good. Though it was the night time I could not resist myself from seeing the beautiful roads fully pitched. Because the road conditions in our country is really bad, I was amazed seeing their roads.
Everywhere there was flyover to reduce the traffic problems. One thing what I noticed was most of the roads were one way only so it was quite easy while crossing the road. When we reached hotel, we checked in there and after putting our luggage in our room, we went to find Indian hotel. Before leaving for Thailand, I had done few research about the food in Thailand. We were actually worried about what type of food we would get there because we were vegetarian and we preferred only Indian food. We thought it would be difficult to find Indian hotel but God is great. Surprisingly, there was a Punjabi hotel 1-2 minutes from our hotel on walking. Though the food was a bit costly 200 Bhats/person, it was actually very tasty and also food was served on buffet system. Lots of varities were provided in the food. Really speaking, it made my night. After having food we went for a walk besides the beach. The trees planted there in systematic and proper manner, the tall buildings nearly above twenty or thirty floors, lightning everywhere was pleasant to see. We then moved to hotel after walk for few minutes. Overnight at hotel and the first day ended this way.
Day 2
We had one and half hours to enjoy at the island. The water was crystal clear and sands were as white as powder. We enjoyed alot during that period of time. We enjoyed coconut water. I enjoyed driving Jet Ski. It felt as if one and half hours flew so quickly. As planned before, we left for the city at 11:30 am to have lunch in an Indian restaurant. When we reached the city, on walking only few steps, we show a man having our photographs framed individually with the frame captioned "Pattaya City". We were surprised because we didn't actually remember when did he take our photographs and more importantly for what purpose. Was it a kind of giveaway to their guests? Was it a kind of tourism attraction? It was a bit confusing but soon we realised that the photos were taken while we were getting onto the boat to drive to Coral island. It was taken so cleverly that it felt like I am actually posing for the camera for someone to take my photographs. What came as surprise that it wasn't any kind of giveaway for the guests, actually it was for sell. It was a kind of business strategy. That's how tourism works. Lots of people involved in it with creative business skills. The photos were priced 100 Bhats for each. We bought our five frames. The photos were really good.
We then had delicious Indian food in the restaurant nearby. The lady who had picked us from the hotel planned a whole day tour in the city. We first went to underwater sea world. It was worth watching huge no. of sea lives at one palce. We spent 1-2 hours there and then headed to Tiger park . The park was made along with restaurants attached to it.
The park was divided into three parts for large, medium and small tigers. We can take photographs with tigers live there at tiger park paying the specified amount at the counter. The rate varies according to the size of tiger you are willing to take photograph with.
To end the day with the last destination in Pattaya city, we headed to floating market. The name says all. Yes, the whole market is floating on water. We took a ride on wooden made small boat around the market. It was a different experience to be there. We sat there for more than an hour to . The market is very famous for its food varities especially sea food, ice cream and some other stores as well. It was already approximately 7 PM when we left for our hotel. We then had food ,and hence day 2 ended travelling and visiting exciting and beautiful place whole day from the morning.
Day 3
Day 4
It was actually holiday all around Thailand. Very few shops were opened because of the death cremation of the late king. Vehicles were in less number on the road. Almost every Thai people dressed in black dress . Some of them carrying memories of their late king hanging around umbrella in the form of photographs. Various groups of people were distributing food, water, cold drinks etc at various locations to every people passing by them. The love and respect for their king could be easily seen from all this scenario. We felt our one day will be wasted but we made it worth. Withour knowing the destination , we began our journey around the city on foot in the morning hoping to get to know the city more closely.
The park was more like Dreamland with every possible beautiful and natural scenario. Water at the middle, small bridges over the water, small boats in duck shape for sailing, everywhere green and tall building when looking in the sky. It felt like staying there for some hours but we were already late to leave for hotel so spending some quality minutes we headed towards our hotel. Had dinner and stayed overnight at the hotel and hence day 4 also ended on a sweet note.
Day 5
It was the last day in Thailand of our tour. We had our flight at 4 pm and we had to leave for airport at 2 pm. So it was not probably one of those days to go far way roaming because of time bound. Hence, we did our rest of shoppings in the nearby markets, had launch in the restaurant and then checked out from hotel to leave fot the airport. The driver who took us to the hotel was very humble, cooperative and funny person. We reached airport in half an hour, completed all the formalities at the airport and said our final bye to Thailand. We reached Tribhuvan airport at 7:15 pm local time and hence our five days journey ended here.
At last, we had lots of fun in those five days, explored new things in life, visited various new places and had opportunities to meet new people whose life style was completely different than ours. Actually, it was a refreshing experience. Though language was a bit of problem but it was sorted on its own.