tag:blogger.com,1999:blog-13175076887038181102024-03-20T00:53:12.649-07:00Beyond The HorizonAmrutha Shttp://www.blogger.com/profile/02981710049877674926noreply@blogger.comBlogger19125tag:blogger.com,1999:blog-1317507688703818110.post-76771749471160501952016-08-28T02:40:00.001-07:002016-08-28T07:55:42.529-07:00Experience with GSoC-2016<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Project Overview</span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Systers has many volunteers that offer their skills, time and commitment to accomplish their vision- Women in Computing. The community has implemented a Volunteer Management System to manage their volunteer contact information, track hours and events they worked, and provide reporting functionality at the least.</span></div>
<b id="docs-internal-guid-4b371814-d1a2-994f-05e4-0354d352a6bf" style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Django 1.3 introduced</span><a href="https://docs.djangoproject.com/en/1.9/topics/class-based-views/" style="text-decoration: none;"><span style="background-color: white; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: white; color: #1155cc; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">class-based views</span></a><span style="background-color: white; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> and also added a range of</span><a href="https://docs.djangoproject.com/en/1.9/ref/class-based-views/" style="text-decoration: none;"><span style="background-color: white; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: white; color: #1155cc; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">generic class-based views</span></a><span style="background-color: white; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">. From then, function-based views have been marked as deprecated. Most of the function-based views in the Systers VMS portal violates DRY. Class-based generic views helps to streamline common use cases, saving development time and effort.</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Accomplishments</span></div>
<ul style="margin-bottom: 0pt; margin-top: 0pt;">
<li dir="ltr" style="background-color: white; color: black; font-family: 'Times New Roman'; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Migration of all applications in VMS from FBV to CBV</span></div>
</li>
</ul>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Challenges</span></div>
<ul style="margin-bottom: 0pt; margin-top: 0pt;">
<li dir="ltr" style="background-color: white; color: black; font-family: 'Times New Roman'; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Cope up with the timeline which broke in between</span></div>
</li>
<li dir="ltr" style="background-color: white; color: black; font-family: 'Times New Roman'; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Correcting test case failures for each application</span></div>
</li>
</ul>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Take Aways</span></div>
<ul style="margin-bottom: 0pt; margin-top: 0pt;">
<li dir="ltr" style="background-color: white; color: black; font-family: 'Times New Roman'; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Working with wonderful mentors</span></div>
</li>
<li dir="ltr" style="background-color: white; color: black; font-family: 'Times New Roman'; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Understanding Python-Django deeply</span></div>
</li>
<li dir="ltr" style="background-color: white; color: black; font-family: 'Times New Roman'; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Working in a great community</span></div>
</li>
</ul>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Experience with GSoC-2016</span></div>
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Being an organization that motivates women into computing,</span><a href="http://anitaborg.org/get-involved/systers/" style="text-decoration: none;"><span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: #1155cc; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Systers- Anita Borg Institute</span></a><span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> was a great exposure for learning. The community always encourages new ideas and suggestions from everyone.</span></div>
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">My journey with Systers was an awesome experience. Though I couldn't do to their expectation level, I enjoyed the work with them. I started contributing to Systers by small bug fixes and enhancements. I had a good bond with the community. Since I was familiar with Python-Django framework, it was easy for me to understand the code base. Understanding the code, I proposed the migration of Volunteer Management System(VMS) from function based views to class based views.</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">During GSoC period</span></div>
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">The work was divided into modules - migration of each app. We were two girls working on VMS. Myself concentrated on migration while the other girl was on testing. We had weekly meeting with the mentors and weekly report submission. All the completed task and roadblocks are discussed in the meeting. The meetings were so systematic and the discussions were fruitful.</span></div>
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">In between, I had a break in timeline due to unexpected change of locations. There was a long lag in the timeline because of improper planning. I had to leave some enhancements undone due to time constraints. The complete migration of VMS is completed by deadline with the constant support of mentors. I owe them a lot for the continuous support.</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Why Systers and VMS</span></div>
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">I see that women, who are into technical field is few, and Systers provide a great platform for women in computing.</span></div>
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">The community has always been so active with instant replies on Slack channel and showed keen interest in solving issues. So when I thought of doing a GSoC project with Systers, it just felt right.</span></div>
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Having worked in Python-Django projects, I found it easy to understand the VMS code. Small bug fixes I did in VMS, helped me to work in VMS more easily. I will definitely continue working with the community and contribute my maximum for the betterment of VMS.</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">My learning</span></div>
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">More than technical stuff, my experience with the community is my learning. Talking to mentors, fighting with the timeline, writing blog posts, evaluations, goodies etc. It helped a lot to improve myself.</span></div>
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">The frequent roadblock I came across is test case failures. I had a troublesome time solving the issues. All together it was a nice time working with the team.</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">My suggestion for VMS</span></div>
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">The user interface can be made better using attractive themes and templates. It should be little more user friendly such that a new user should be able to navigate easily without any confusions.</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 14.6667px; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><b>To next year mentees</b></span></div>
<ul style="margin-bottom: 0pt; margin-top: 0pt;">
<li dir="ltr" style="background-color: transparent; color: black; font-family: 'Times New Roman'; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">My failures are my lessons. As I said I had a bad time following the timeline due to some unexpected things happened. Plan your time effectively such that no unexpected changes affect the flow of your work.</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: 'Times New Roman'; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Use mailing list effectively</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: 'Times New Roman'; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Talk to your mentors regularly. They can help you a lot in many ways.</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: 'Times New Roman'; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Document your things in parallel with your work</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: 'Times New Roman'; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Update the weekly reports without fail</span></div>
</li>
</ul>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">About mentors</span></div>
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Just a single word about them - Awesome</span></div>
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Thank you</span><a href="https://tapasweni-pathak.github.io/" style="text-decoration: none;"><span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: #1155cc; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Tapasweni Pathak</span></a><span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> and</span><a href="https://www.linkedin.com/in/nida-sahar-34780913" style="text-decoration: none;"><span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: #1155cc; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Nida Shar</span></a><span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> for your constant support and encouragement.</span></div>
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">References of work</span></div>
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt;">
<a href="https://github.com/systers/vms/wiki/GSoC'16---Migrating-VMS-from-Function-based-views-to-Class-based-views" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Wiki Page</span></a></div>
<br /></div>
</div>
Amrutha Shttp://www.blogger.com/profile/02981710049877674926noreply@blogger.com0tag:blogger.com,1999:blog-1317507688703818110.post-45426006752045818382016-08-26T13:08:00.000-07:002016-08-27T21:12:50.389-07:00Vote of thanks<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;">
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">GSoC 2016 was a great experience and learning. My project was migration of Volunteer Management System from existing Function based views to Class based views. Considering various advantages of shifting to CBV, I proposed the migration for all the apps in VMS to be a Google Summer of Code 2016 project. </span></div>
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">In this post, I would like to tell about my motivation for doing GSoC with Systers, and how I got in with the team!</span></div>
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">To start with, I thank the FOSS club of our University, </span><a href="http://foss.amrita.ac.in/" style="text-decoration: none;"><span style="background-color: white; color: #b45f06; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">FOSS@Amrita</span></a><span style="background-color: white; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">, which helped me all the way from day one. It is a student community at</span><a href="https://www.amrita.edu/" style="text-decoration: none;"><span style="background-color: white; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: white; color: #b45f06; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Amrita University</span></a><span style="background-color: white; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> that encourage, support and mentor students to improve their technical and social skills through contributing to Open Source. We had 10 selects from our college for GSoC 2016, which shows the strength and determination of our team. As a result,</span><a href="https://www.facebook.com/AmritaUniversity/" style="text-decoration: none;"><span style="background-color: white; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> Amrita University</span></a><span style="background-color: white; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">, Amritapuri Campus was ranked tenth in the total number of GSoC selections for this round, and the whole credit goes to the team.</span><br />
<span style="background-color: white; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">In the club, we not-only sit and code, but take part in various activities like hosting conferences, conducting workshops for school and college students, hackathons and all kind of stuff. The exposures and opportunities that one can get here is unlimited. I cannot end this post without mentioning some names who supported and motivated me throughout the project.</span></div>
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt;">
<a href="https://www.mediawiki.org/wiki/User:01tonythomas" style="text-decoration: none;"><span style="background-color: white; color: #b45f06; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Tony Thomas</span></a><span style="background-color: white; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> who was a trigger and a reason for me to start with Python-Django.</span></div>
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt;">
<a href="https://tapasweni-pathak.github.io/" style="text-decoration: none;"><span style="background-color: white; color: #b45f06; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Tapasweni Pathak</span></a><span style="background-color: white; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">, Nida Sahar- wonderful mentors I could ever get</span></div>
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">and some of the club mentors and well wishers, like:</span></div>
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Br. Biju Kumar, who gave me my first python-django project and a lab to work upon</span></div>
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Mr. Vipin Pavithran, who guides the FOSS club students with Mr. Bithin Alangot</span><br />
<span style="background-color: white; color: black; font-family: "times new roman"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<span style="background-color: white; font-family: Times, Times New Roman, serif; font-size: 14.6667px; vertical-align: baseline; white-space: pre-wrap;">Though I couldn’t perform as expected due to unexpected change of locations, they really supported me knowing my situation. They were so understanding and supportive. I thank everyone for the guidance and support they have given.</span></div>
</div>
Amrutha Shttp://www.blogger.com/profile/02981710049877674926noreply@blogger.com0tag:blogger.com,1999:blog-1317507688703818110.post-70858161608917830852016-06-24T21:58:00.000-07:002016-08-29T21:36:43.943-07:00Two views inside one<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "times new roman" , serif; font-size: 12pt;">It was some thing new
for me- implementing two views inside one. In the administrator app in VMS, I
used two views for report generation: one to display the form and other one to
list the volunteer details. The following is the sample code that use single view
that calls another two views.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt;">
<pre style="color: #222222; font-family: "Bitstream Vera Sans Mono", "Courier New", Monaco, monospace; font-size: 14.4px; overflow: auto;"><span class="k" style="color: green; font-weight: bold;">class</span> <span class="nc" style="color: blue; font-weight: bold;">ShowReportListView</span><span class="p">(</span><span class="n">LoginRequiredMixin</span><span class="p">,</span> <span class="n">ListView</span><span class="p">):</span>
<a href="https://www.blogger.com/null" name="line-2" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="n">template_name</span> <span class="o" style="color: #666666;">=</span> <span class="s" style="color: #ba2121;">"administrator/report.html"</span>
<a href="https://www.blogger.com/null" name="line-3" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="n">organization_list</span> <span class="o" style="color: #666666;">=</span> <span class="n">get_organizations_ordered_by_name</span><span class="p">()</span>
<a href="https://www.blogger.com/null" name="line-4" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="n">event_list</span> <span class="o" style="color: #666666;">=</span> <span class="n">get_events_ordered_by_name</span><span class="p">()</span>
<a href="https://www.blogger.com/null" name="line-5" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="n">job_list</span> <span class="o" style="color: #666666;">=</span> <span class="n">get_jobs_ordered_by_title</span><span class="p">()</span>
<a href="https://www.blogger.com/null" name="line-6" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a>
<a href="https://www.blogger.com/null" name="line-7" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="k" style="color: green; font-weight: bold;">def</span> <span class="nf" style="color: blue;">post</span><span class="p">(</span><span class="bp" style="color: green;">self</span><span class="p">,</span> <span class="n">request</span><span class="p">,</span> <span class="o" style="color: #666666;">*</span><span class="n">args</span><span class="p">,</span> <span class="o" style="color: #666666;">**</span><span class="n">kwargs</span><span class="p">):</span>
<a href="https://www.blogger.com/null" name="line-8" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="n">report_list</span> <span class="o" style="color: #666666;">=</span> <span class="n">get_administrator_report</span><span class="p">(</span>
<a href="https://www.blogger.com/null" name="line-9" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="bp" style="color: green;">self</span><span class="o" style="color: #666666;">.</span><span class="n">request</span><span class="o" style="color: #666666;">.</span><span class="n">POST</span><span class="p">[</span><span class="s" style="color: #ba2121;">'first_name'</span><span class="p">],</span>
<a href="https://www.blogger.com/null" name="line-10" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="bp" style="color: green;">self</span><span class="o" style="color: #666666;">.</span><span class="n">request</span><span class="o" style="color: #666666;">.</span><span class="n">POST</span><span class="p">[</span><span class="s" style="color: #ba2121;">'last_name'</span><span class="p">],</span>
<a href="https://www.blogger.com/null" name="line-11" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="bp" style="color: green;">self</span><span class="o" style="color: #666666;">.</span><span class="n">request</span><span class="o" style="color: #666666;">.</span><span class="n">POST</span><span class="p">[</span><span class="s" style="color: #ba2121;">'organization'</span><span class="p">],</span>
<a href="https://www.blogger.com/null" name="line-12" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="bp" style="color: green;">self</span><span class="o" style="color: #666666;">.</span><span class="n">request</span><span class="o" style="color: #666666;">.</span><span class="n">POST</span><span class="p">[</span><span class="s" style="background: rgb(255, 255, 153); color: #ba2121;">'event_name'</span><span class="p">],</span>
<a href="https://www.blogger.com/null" name="line-13" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="bp" style="color: green;">self</span><span class="o" style="color: #666666;">.</span><span class="n">request</span><span class="o" style="color: #666666;">.</span><span class="n">POST</span><span class="p">[</span><span class="s" style="color: #ba2121;">'job_name'</span><span class="p">],</span>
<a href="https://www.blogger.com/null" name="line-14" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="bp" style="color: green;">self</span><span class="o" style="color: #666666;">.</span><span class="n">request</span><span class="o" style="color: #666666;">.</span><span class="n">POST</span><span class="p">[</span><span class="s" style="color: #ba2121;">'start_date'</span><span class="p">],</span>
<a href="https://www.blogger.com/null" name="line-15" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="bp" style="color: green;">self</span><span class="o" style="color: #666666;">.</span><span class="n">request</span><span class="o" style="color: #666666;">.</span><span class="n">POST</span><span class="p">[</span><span class="s" style="color: #ba2121;">'end_date'</span><span class="p">],</span>
<a href="https://www.blogger.com/null" name="line-16" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="p">)</span>
<a href="https://www.blogger.com/null" name="line-17" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="n">organization</span> <span class="o" style="color: #666666;">=</span> <span class="bp" style="color: green;">self</span><span class="o" style="color: #666666;">.</span><span class="n">request</span><span class="o" style="color: #666666;">.</span><span class="n">POST</span><span class="p">[</span><span class="s" style="color: #ba2121;">'organization'</span><span class="p">]</span>
<a href="https://www.blogger.com/null" name="line-18" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="n">event_name</span> <span class="o" style="color: #666666;">=</span> <span class="bp" style="color: green;">self</span><span class="o" style="color: #666666;">.</span><span class="n">request</span><span class="o" style="color: #666666;">.</span><span class="n">POST</span><span class="p">[</span><span class="s" style="color: #ba2121;">'event_name'</span><span class="p">]</span>
<a href="https://www.blogger.com/null" name="line-19" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="n">total_hours</span> <span class="o" style="color: #666666;">=</span> <span class="n">calculate_total_report_hours</span><span class="p">(</span><span class="n">report_list</span><span class="p">)</span>
<a href="https://www.blogger.com/null" name="line-20" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="k" style="color: green; font-weight: bold;">return</span> <span class="n">render</span><span class="p">(</span><span class="n">request</span><span class="p">,</span> <span class="s" style="color: #ba2121;">'administrator/report.html'</span><span class="p">,</span>
<a href="https://www.blogger.com/null" name="line-21" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="p">{</span><span class="s" style="color: #ba2121;">'report_list'</span><span class="p">:</span> <span class="n">report_list</span><span class="p">,</span>
<a href="https://www.blogger.com/null" name="line-22" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="s" style="color: #ba2121;">'total_hours'</span><span class="p">:</span> <span class="n">total_hours</span><span class="p">,</span>
<a href="https://www.blogger.com/null" name="line-23" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="s" style="color: #ba2121;">'notification'</span><span class="p">:</span> <span class="bp" style="color: green;">True</span><span class="p">,</span>
<a href="https://www.blogger.com/null" name="line-24" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="s" style="color: #ba2121;">'organization_list'</span><span class="p">:</span> <span class="bp" style="color: green;">self</span><span class="o" style="color: #666666;">.</span><span class="n">organization_list</span><span class="p">,</span>
<a href="https://www.blogger.com/null" name="line-25" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="s" style="color: #ba2121;">'selected_organization'</span><span class="p">:</span> <span class="n">organization</span><span class="p">,</span>
<a href="https://www.blogger.com/null" name="line-26" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="s" style="color: #ba2121;">'event_list'</span><span class="p">:</span> <span class="bp" style="color: green;">self</span><span class="o" style="color: #666666;">.</span><span class="n">event_list</span><span class="p">,</span>
<a href="https://www.blogger.com/null" name="line-27" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="s" style="color: #ba2121;">'selected_event'</span><span class="p">:</span> <span class="n">event_name</span><span class="p">,</span>
<a href="https://www.blogger.com/null" name="line-28" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="s" style="color: #ba2121;">'job_list'</span><span class="p">:</span> <span class="bp" style="color: green;">self</span><span class="o" style="color: #666666;">.</span><span class="n">job_list</span><span class="p">})</span>
<a href="https://www.blogger.com/null" name="line-29" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a>
<a href="https://www.blogger.com/null" name="line-30" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a><span class="k" style="color: green; font-weight: bold;">class</span> <span class="nc" style="color: blue; font-weight: bold;">GenerateReportView</span><span class="p">(</span><span class="n">LoginRequiredMixin</span><span class="p">,</span> <span class="n">View</span><span class="p">):</span>
<a href="https://www.blogger.com/null" name="line-31" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a>
<a href="https://www.blogger.com/null" name="line-32" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="k" style="color: green; font-weight: bold;">def</span> <span class="nf" style="color: blue;">get</span><span class="p">(</span><span class="bp" style="color: green;">self</span><span class="p">,</span> <span class="n">request</span><span class="p">,</span> <span class="o" style="color: #666666;">*</span><span class="n">args</span><span class="p">,</span> <span class="o" style="color: #666666;">**</span><span class="n">kwargs</span><span class="p">):</span>
<a href="https://www.blogger.com/null" name="line-33" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="n">view</span> <span class="o" style="color: #666666;">=</span> <span class="n">ShowFormView</span><span class="o" style="color: #666666;">.</span><span class="n">as_view</span><span class="p">()</span>
<a href="https://www.blogger.com/null" name="line-34" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="k" style="color: green; font-weight: bold;">return</span> <span class="n">view</span><span class="p">(</span><span class="n">request</span><span class="p">,</span> <span class="o" style="color: #666666;">*</span><span class="n">args</span><span class="p">,</span><span class="o" style="color: #666666;">**</span><span class="n">kwargs</span><span class="p">)</span>
<a href="https://www.blogger.com/null" name="line-35" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a>
<a href="https://www.blogger.com/null" name="line-36" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="k" style="color: green; font-weight: bold;">def</span> <span class="nf" style="color: blue;">post</span><span class="p">(</span><span class="bp" style="color: green;">self</span><span class="p">,</span> <span class="n">request</span><span class="p">,</span> <span class="o" style="color: #666666;">*</span><span class="n">args</span><span class="p">,</span> <span class="o" style="color: #666666;">**</span><span class="n">kwargs</span><span class="p">):</span>
<a href="https://www.blogger.com/null" name="line-37" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="n">view</span> <span class="o" style="color: #666666;">=</span> <span class="n">ShowReportListView</span><span class="o" style="color: #666666;">.</span><span class="n">as_view</span><span class="p">()</span></pre>
</div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt;">
<span style="font-family: "courier new"; font-size: 12pt;"><br /></span></div>
<div class="MsoNormal" style="background: white; margin-bottom: 0.0001pt;">
<span style="font-family: "times new roman" , serif;"><span style="font-size: 12pt;">GenerateReportView calls ShowFormView that displays</span><span style="font-size: 12pt;"> the form and ShowReportListView that list the volunteers.<o:p></o:p></span></span></div>
<br />
<div class="MsoNormal">
<br /></div>
</div>
Amrutha Shttp://www.blogger.com/profile/02981710049877674926noreply@blogger.com0tag:blogger.com,1999:blog-1317507688703818110.post-48125700758719468402016-06-07T23:06:00.000-07:002016-08-29T22:03:25.618-07:00Django's authentication system<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: left;">
<div style="margin-bottom: .0001pt; margin: 0in;">
Django's
authentication system can serve the most common needs like <span style="background: white;">handling wide range of tasks, implementation of
passwords and permissions etc.</span><o:p></o:p></div>
<br />
<div style="margin: 0in 0in 0.0001pt;">
<span style="background: white;">My second module
of the GSoC project is the migration of authentication app to class based
views. Authentication app used function based view for login and logout process
earlier which was bit lengthy. The following was the function based view used
for authentication purpose earlier.</span><o:p></o:p></div>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><span style="background-color: white; line-height: 21px;"><br /></span></span>
<br />
<div style="margin-bottom: .0001pt; margin: 0in;">
<b>auhentication/views.py</b></div>
<pre style="background-color: white; font-family: 'DejaVu Sans Mono'; font-size: 9pt;"><pre style="color: #222222; font-family: "Bitstream Vera Sans Mono", "Courier New", Monaco, monospace; font-size: 14.4px; overflow: auto;"><pre style="font-family: "Bitstream Vera Sans Mono", "Courier New", Monaco, monospace; font-size: 14.4px; overflow: auto;"><span class="kn" style="color: green; font-weight: bold;">from</span> <span class="nn" style="color: blue; font-weight: bold;">authentication.forms</span> <span class="kn" style="color: green; font-weight: bold;">import</span> <span class="n">AuthenticationForm</span>
<a href="https://www.blogger.com/null" name="line-2" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a><span class="kn" style="color: green; font-weight: bold;">from</span> <span class="nn" style="color: blue; font-weight: bold;">django.contrib.auth</span> <span class="kn" style="color: green; font-weight: bold;">import</span> <span class="n">authenticate</span><span class="p">,</span> <span class="n">login</span><span class="p">,</span> <span class="n">logout</span>
<a href="https://www.blogger.com/null" name="line-3" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a><span class="kn" style="color: green; font-weight: bold;">from</span> <span class="nn" style="color: blue; font-weight: bold;">django.contrib.auth.decorators</span> <span class="kn" style="color: green; font-weight: bold;">import</span> <span class="n">login_required</span><span class="p">,</span> <span class="n">user_passes_test</span>
<a href="https://www.blogger.com/null" name="line-4" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a><span class="kn" style="color: green; font-weight: bold;">from</span> <span class="nn" style="color: blue; font-weight: bold;">django.core.urlresolvers</span> <span class="kn" style="color: green; font-weight: bold;">import</span> <span class="n">reverse</span>
<a href="https://www.blogger.com/null" name="line-5" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a><span class="kn" style="color: green; font-weight: bold;">from</span> <span class="nn" style="color: blue; font-weight: bold;">django.http</span> <span class="kn" style="color: green; font-weight: bold;">import</span> <span class="n">HttpResponse</span><span class="p">,</span> <span class="n">HttpResponseRedirect</span>
<a href="https://www.blogger.com/null" name="line-6" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a><span class="kn" style="color: green; font-weight: bold;">from</span> <span class="nn" style="color: blue; font-weight: bold;">django.shortcuts</span> <span class="kn" style="color: green; font-weight: bold;">import</span> <span class="n">render</span>
<a href="https://www.blogger.com/null" name="line-7" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a>
<a href="https://www.blogger.com/null" name="line-8" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a><span class="k" style="color: green; font-weight: bold;">def</span> <span class="nf" style="color: blue;">index</span><span class="p">(</span><span class="n">request</span><span class="p">):</span>
<a href="https://www.blogger.com/null" name="line-9" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="k" style="color: green; font-weight: bold;">return</span> <span class="n">HttpResponse</span><span class="p">(</span><span class="s" style="color: #ba2121;">"Hello world"</span><span class="p">)</span>
<a href="https://www.blogger.com/null" name="line-10" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a>
<a href="https://www.blogger.com/null" name="line-11" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a><span class="k" style="color: green; font-weight: bold;">def</span> <span class="nf" style="color: blue;">login_process</span><span class="p">(</span><span class="n">request</span><span class="p">):</span>
<a href="https://www.blogger.com/null" name="line-12" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a>
<a href="https://www.blogger.com/null" name="line-13" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="k" style="color: green; font-weight: bold;">if</span> <span class="n">request</span><span class="o" style="color: #666666;">.</span><span class="n">method</span> <span class="o" style="color: #666666;">==</span> <span class="s" style="color: #ba2121;">'POST'</span><span class="p">:</span>
<a href="https://www.blogger.com/null" name="line-14" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a>
<a href="https://www.blogger.com/null" name="line-15" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="n">authentication_form</span> <span class="o" style="color: #666666;">=</span> <span class="n">AuthenticationForm</span><span class="p">(</span><span class="n">request</span><span class="o" style="color: #666666;">.</span><span class="n">POST</span><span class="p">)</span>
<a href="https://www.blogger.com/null" name="line-16" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a>
<a href="https://www.blogger.com/null" name="line-17" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="k" style="color: green; font-weight: bold;">if</span> <span class="n">authentication_form</span><span class="o" style="color: #666666;">.</span><span class="n">is_valid</span><span class="p">():</span>
<a href="https://www.blogger.com/null" name="line-18" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="n">username</span> <span class="o" style="color: #666666;">=</span> <span class="n">request</span><span class="o" style="color: #666666;">.</span><span class="n">POST</span><span class="o" style="color: #666666;">.</span><span class="n">get</span><span class="p">(</span><span class="s" style="color: #ba2121;">'username'</span><span class="p">)</span>
<a href="https://www.blogger.com/null" name="line-19" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="n">password</span> <span class="o" style="color: #666666;">=</span> <span class="n">request</span><span class="o" style="color: #666666;">.</span><span class="n">POST</span><span class="o" style="color: #666666;">.</span><span class="n">get</span><span class="p">(</span><span class="s" style="color: #ba2121;">'password'</span><span class="p">)</span>
<a href="https://www.blogger.com/null" name="line-20" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a>
<a href="https://www.blogger.com/null" name="line-21" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="n">user</span> <span class="o" style="color: #666666;">=</span> <span class="n">authenticate</span><span class="p">(</span><span class="n">username</span><span class="o" style="color: #666666;">=</span><span class="n">username</span><span class="p">,</span> <span class="n">password</span><span class="o" style="color: #666666;">=</span><span class="n">password</span><span class="p">)</span>
<a href="https://www.blogger.com/null" name="line-22" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a>
<a href="https://www.blogger.com/null" name="line-23" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="k" style="color: green; font-weight: bold;">if</span> <span class="n">user</span><span class="p">:</span>
<a href="https://www.blogger.com/null" name="line-24" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="k" style="color: green; font-weight: bold;">if</span> <span class="n">user</span><span class="o" style="color: #666666;">.</span><span class="n">is_active</span><span class="p">:</span>
<a href="https://www.blogger.com/null" name="line-25" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="n">login</span><span class="p">(</span><span class="n">request</span><span class="p">,</span> <span class="n">user</span><span class="p">)</span>
<a href="https://www.blogger.com/null" name="line-26" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="k" style="color: green; font-weight: bold;">return</span> <span class="n">HttpResponseRedirect</span><span class="p">(</span><span class="n">reverse</span><span class="p">(</span><span class="s" style="color: #ba2121;">'home:index'</span><span class="p">))</span>
<a href="https://www.blogger.com/null" name="line-27" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="k" style="color: green; font-weight: bold;">else</span><span class="p">:</span>
<a href="https://www.blogger.com/null" name="line-28" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="k" style="color: green; font-weight: bold;">return</span> <span class="n">HttpResponse</span><span class="p">(</span><span class="s" style="color: #ba2121;">"Your account is disabled."</span><span class="p">)</span>
<a href="https://www.blogger.com/null" name="line-29" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="k" style="color: green; font-weight: bold;">else</span><span class="p">:</span>
<a href="https://www.blogger.com/null" name="line-30" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="k" style="color: green; font-weight: bold;">return</span> <span class="n">render</span><span class="p">(</span><span class="n">request</span><span class="p">,</span> <span class="s" style="color: #ba2121;">'authentication/login.html'</span><span class="p">,</span> <span class="p">{</span><span class="s" style="color: #ba2121;">'authentication_form'</span> <span class="p">:</span> <span class="n">authentication_form</span><span class="p">,</span> <span class="s" style="color: #ba2121;">'is_invalid_credentials'</span> <span class="p">:</span> <span class="bp" style="color: green;">True</span><span class="p">,})</span>
<a href="https://www.blogger.com/null" name="line-31" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="k" style="color: green; font-weight: bold;">else</span><span class="p">:</span>
<a href="https://www.blogger.com/null" name="line-32" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="k" style="color: green; font-weight: bold;">return</span> <span class="n">render</span><span class="p">(</span><span class="n">request</span><span class="p">,</span> <span class="s" style="color: #ba2121;">'authentication/login.html'</span><span class="p">,</span> <span class="p">{</span><span class="s" style="color: #ba2121;">'authentication_form'</span> <span class="p">:</span> <span class="n">authentication_form</span><span class="p">,})</span>
<a href="https://www.blogger.com/null" name="line-33" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="k" style="color: green; font-weight: bold;">else</span><span class="p">:</span>
<a href="https://www.blogger.com/null" name="line-34" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="k" style="color: green; font-weight: bold;">return</span> <span class="n">render</span><span class="p">(</span><span class="n">request</span><span class="p">,</span> <span class="s" style="color: #ba2121;">'authentication/login.html'</span><span class="p">,</span> <span class="p">{</span><span class="s" style="color: #ba2121;">'is_invalid_credentials'</span> <span class="p">:</span> <span class="bp" style="color: green;">False</span><span class="p">,})</span>
<a href="https://www.blogger.com/null" name="line-35" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a>
<a href="https://www.blogger.com/null" name="line-36" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a><span class="nd" style="color: #aa22ff;">@login_requireddef</span> <span class="n">logout_process</span><span class="p">(</span><span class="n">request</span><span class="p">):</span>
<a href="https://www.blogger.com/null" name="line-37" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a>
<a href="https://www.blogger.com/null" name="line-38" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="n">logout</span><span class="p">(</span><span class="n">request</span><span class="p">)</span>
<a href="https://www.blogger.com/null" name="line-39" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="k" style="color: green; font-weight: bold;">return</span> <span class="n">HttpResponseRedirect</span><span class="p">(</span><span class="n">reverse</span><span class="p">(</span><span class="s" style="color: #ba2121;">'home:index'</span><span class="p" style="background: rgb(255, 255, 153);">)</span></pre>
</pre>
</pre>
<pre style="background-color: white; font-family: 'DejaVu Sans Mono'; font-size: 9pt;"><pre style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial;"><b><span style="font-family: "times new roman" , serif; font-size: 12pt;">authentication/urls.py</span></b></pre>
</pre>
<pre style="background-color: white; font-family: 'DejaVu Sans Mono'; font-size: 9pt;"><pre style="font-family: 'DejaVu Sans Mono'; font-size: 9pt;"><pre style="color: #222222; font-family: "Bitstream Vera Sans Mono", "Courier New", Monaco, monospace; font-size: 14.4px; overflow: auto;"><span class="kn" style="color: green; font-weight: bold;">from</span> <span class="nn" style="color: blue; font-weight: bold;">django.conf.urls</span> <span class="kn" style="color: green; font-weight: bold;">import</span> <span class="n">patterns</span><span class="p">,</span> <span class="n">url</span>
<a href="https://www.blogger.com/null" name="line-2" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a><span class="kn" style="color: green; font-weight: bold;">from</span> <span class="nn" style="color: blue; font-weight: bold;">authentication</span> <span class="kn" style="color: green; font-weight: bold;">import</span> <span class="n">views</span>
<a href="https://www.blogger.com/null" name="line-3" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a>
<a href="https://www.blogger.com/null" name="line-4" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a><span class="n">urlpatterns</span> <span class="o" style="color: #666666;">=</span> <span class="n">patterns</span><span class="p">(</span><span class="s" style="color: #ba2121;">''</span><span class="p">,</span>
<a href="https://www.blogger.com/null" name="line-5" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="n">url</span><span class="p">(</span><span class="s" style="color: #ba2121;">r'^$'</span><span class="p">,</span> <span class="n">views</span><span class="o" style="color: #666666;">.</span><span class="n">index</span><span class="p">,</span> <span class="n">name</span><span class="o" style="color: #666666;">=</span><span class="s" style="color: #ba2121;">'index'</span><span class="p">),</span>
<a href="https://www.blogger.com/null" name="line-6" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="n">url</span><span class="p">(</span><span class="s" style="color: #ba2121;">r'^login/$'</span><span class="p">,</span> <span class="n">views</span><span class="o" style="color: #666666;">.</span><span class="n">login_process</span><span class="p">,</span> <span class="n">name</span><span class="o" style="color: #666666;">=</span><span class="s" style="color: #ba2121;">'login_process'</span><span class="p">),</span>
<a href="https://www.blogger.com/null" name="line-7" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="n">url</span><span class="p" style="background: rgb(255, 255, 153);">(</span><span class="s" style="color: #ba2121;">r'^logout/$'</span><span class="p">,</span> <span class="n">views</span><span class="o" style="color: #666666;">.</span><span class="n">logout_process</span><span class="p">,</span> <span class="n">name</span><span class="o" style="color: #666666;">=</span><span class="s" style="color: #ba2121;">'logout_process'</span><span class="p">),</span>
<a href="https://www.blogger.com/null" name="line-8" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a><span class="p">)</span></pre>
</pre>
</pre>
<span style="background: white;">It can be written in a simpler way using Django's built in
auth views. The rewritten code for authentication is as follows.</span></div>
<div style="margin: 0in 0in 0.0001pt;">
<span style="background: white;">Create a views.py
in vms</span><br />
<span style="background: white;"><br /></span></div>
<div style="margin-bottom: .0001pt; margin: 0in;">
<b>vms/views.py</b></div>
<pre style="background-color: white;"><pre style="font-family: 'DejaVu Sans Mono'; font-size: 9pt;"><pre style="color: #222222; font-family: "Bitstream Vera Sans Mono", "Courier New", Monaco, monospace; font-size: 14.4px; overflow: auto;"><span class="kn" style="color: green; font-weight: bold;">from</span> <span class="nn" style="color: blue; font-weight: bold;">django.shortcuts</span> <span class="kn" style="color: green; font-weight: bold;">import</span> <span class="n">redirect</span>
<a href="https://www.blogger.com/null" name="line-2" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a><span class="kn" style="color: green; font-weight: bold;">from</span> <span class="nn" style="color: blue; font-weight: bold;">django.views.generic.edit</span> <span class="kn" style="color: green; font-weight: bold;">import</span> <span class="n">FormView</span>
<a href="https://www.blogger.com/null" name="line-3" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a><span class="kn" style="color: green; font-weight: bold;">from</span> <span class="nn" style="color: blue; font-weight: bold;">django.core.mail</span> <span class="kn" style="color: green; font-weight: bold;">import</span> <span class="n">send_mail</span>
<a href="https://www.blogger.com/null" name="line-4" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a><span class="kn" style="color: green; font-weight: bold;">from</span> <span class="nn" style="color: blue; font-weight: bold;">django.core.mail.message</span> <span class="kn" style="color: green; font-weight: bold;">import</span> <span class="n">BadHeaderError</span>
<a href="https://www.blogger.com/null" name="line-5" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a><span class="kn" style="color: green; font-weight: bold;">from</span> <span class="nn" style="background: rgb(255 , 255 , 153); color: blue; font-weight: bold;">django.http.response</span> <span class="kn" style="color: green; font-weight: bold;">import</span> <span class="n">HttpResponse</span>
<a href="https://www.blogger.com/null" name="line-6" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a>
<a href="https://www.blogger.com/null" name="line-7" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a><span class="kn" style="color: green; font-weight: bold;">from</span> <span class="nn" style="color: blue; font-weight: bold;">vms</span> <span class="kn" style="color: green; font-weight: bold;">import</span> <span class="n">settings</span>
<a href="https://www.blogger.com/null" name="line-8" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a>
<a href="https://www.blogger.com/null" name="line-9" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a><span class="k" style="color: green; font-weight: bold;">def</span> <span class="nf" style="color: blue;">anonymous_required</span><span class="p">(</span><span class="n">func</span><span class="p">):</span>
<a href="https://www.blogger.com/null" name="line-10" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="k" style="color: green; font-weight: bold;">def</span> <span class="nf" style="color: blue;">as_view</span><span class="p">(</span><span class="n">request</span><span class="p">,</span> <span class="o" style="color: #666666;">*</span><span class="n">args</span><span class="p">,</span> <span class="o" style="color: #666666;">**</span><span class="n">kwargs</span><span class="p">):</span>
<a href="https://www.blogger.com/null" name="line-11" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="n">redirect_to</span> <span class="o" style="color: #666666;">=</span> <span class="n">kwargs</span><span class="o" style="color: #666666;">.</span><span class="n">get</span><span class="p">(</span><span class="s" style="color: #ba2121;">'next'</span><span class="p">,</span> <span class="n">settings</span><span class="o" style="color: #666666;">.</span><span class="n">LOGIN_REDIRECT_URL</span> <span class="p">)</span>
<a href="https://www.blogger.com/null" name="line-12" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="k" style="color: green; font-weight: bold;">if</span> <span class="n">request</span><span class="o" style="color: #666666;">.</span><span class="n">user</span><span class="o" style="color: #666666;">.</span><span class="n">is_authenticated</span><span class="p">():</span>
<a href="https://www.blogger.com/null" name="line-13" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="k" style="color: green; font-weight: bold;">return</span> <span class="n">redirect</span><span class="p">(</span><span class="n">redirect_to</span><span class="p">)</span>
<a href="https://www.blogger.com/null" name="line-14" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="n">response</span> <span class="o" style="color: #666666;">=</span> <span class="n">func</span><span class="p">(</span><span class="n">request</span><span class="p">,</span> <span class="o" style="color: #666666;">*</span><span class="n">args</span><span class="p">,</span> <span class="o" style="color: #666666;">**</span><span class="n">kwargs</span><span class="p">)</span>
<a href="https://www.blogger.com/null" name="line-15" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="k" style="color: green; font-weight: bold;">return</span> <span class="n">response</span>
<a href="https://www.blogger.com/null" name="line-16" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="k" style="color: green; font-weight: bold;">return</span> <span class="n">as_view</span></pre>
</pre>
<span style="font-family: "times new roman" , serif; font-size: 12pt; line-height: 21px; white-space: normal;">anonymous_required is the conventional decorator that allows the programmer to restrict access to some views only to logged in users</span></pre>
<pre style="background-color: white;"><span style="font-family: "times new roman" , serif; font-size: 12pt; line-height: 21px; white-space: normal;">
</span></pre>
<pre style="background-color: white;"><span style="font-family: "times new roman" , serif; font-size: 12pt; line-height: 21px; white-space: normal;">
</span></pre>
<pre style="background-color: white;"><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><span style="line-height: 21px; white-space: normal;"><span style="font-family: "times new roman" , serif; font-size: 12pt;">
</span></span></span></pre>
<pre style="background-color: white; font-family: 'DejaVu Sans Mono'; font-size: 9pt;"></pre>
<pre style="font-family: 'DejaVu Sans Mono'; font-size: 9pt;"><pre style="background-color: white; font-family: 'dejavu sans mono'; font-size: 9pt;"><pre style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial;"><b><span style="font-family: "times new roman" , serif; font-size: 12pt;">vms/urls.py</span></b></pre>
</pre>
<pre style="background-color: white; font-family: 'dejavu sans mono'; font-size: 9pt;"><pre style="color: #222222; font-family: "Bitstream Vera Sans Mono", "Courier New", Monaco, monospace; font-size: 14.4px; overflow: auto;"><span class="kn" style="color: green; font-weight: bold;">from</span> <span class="nn" style="color: blue; font-weight: bold;">django.conf.urls</span> <span class="kn" style="color: green; font-weight: bold;">import</span> <span class="n">patterns</span><span class="p">,</span> <span class="n">include</span><span class="p">,</span> <span class="n">url</span>
<a href="https://www.blogger.com/null" name="line-2" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a><span class="kn" style="color: green; font-weight: bold;">from</span> <span class="nn" style="color: blue; font-weight: bold;">django.contrib</span> <span class="kn" style="color: green; font-weight: bold;">import</span> <span class="n">admin</span>
<a href="https://www.blogger.com/null" name="line-3" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a><span class="kn" style="color: green; font-weight: bold;">from</span> <span class="nn" style="color: blue; font-weight: bold;">django.views.generic</span> <span class="kn" style="color: green; font-weight: bold;">import</span> <span class="n">TemplateView</span>
<a href="https://www.blogger.com/null" name="line-4" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a><span class="c" style="color: #408080; font-style: italic;">#from importlib._bootstrap import _NamespaceLoaderfrom vms.views import anonymous_required</span>
<a href="https://www.blogger.com/null" name="line-5" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a><span class="kn" style="color: green; font-weight: bold;">from</span> <span class="nn" style="color: blue; font-weight: bold;">django.contrib.auth.decorators</span> <span class="kn" style="color: green; font-weight: bold;">import</span> <span class="n">login_required</span>
<a href="https://www.blogger.com/null" name="line-6" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a><span class="kn" style="color: green; font-weight: bold;">import</span> <span class="nn" style="color: blue; font-weight: bold;">registration.views</span> <span class="kn" style="color: green; font-weight: bold;">as</span> <span class="nn" style="color: blue; font-weight: bold;">views</span>
<a href="https://www.blogger.com/null" name="line-7" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a><span class="kn" style="color: green; font-weight: bold;">from</span> <span class="nn" style="color: blue; font-weight: bold;">django.contrib.auth</span> <span class="kn" style="color: green; font-weight: bold;">import</span> <span class="n">views</span> <span class="k" style="color: green; font-weight: bold;">as</span> <span class="n">auth_views</span>
<a href="https://www.blogger.com/null" name="line-8" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a>
<a href="https://www.blogger.com/null" name="line-9" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a><span class="c" style="color: #408080; font-style: italic;">#admin.autodiscover()</span>
<a href="https://www.blogger.com/null" name="line-10" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a><span class="n">urlpatterns</span> <span class="o" style="color: #666666;">=</span> <span class="n">patterns</span><span class="p">(</span><span class="s" style="color: #ba2121;">''</span><span class="p">,</span>
<a href="https://www.blogger.com/null" name="line-11" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="n">url</span><span class="p">(</span><span class="s" style="color: #ba2121;">r'^portal'</span><span class="p">,</span> <span class="n">TemplateView</span><span class="o" style="color: #666666;">.</span><span class="n">as_view</span><span class="p">(</span><span class="n">template_name</span><span class="o" style="color: #666666;">=</span><span class="s" style="color: #ba2121;">'home/home.html'</span><span class="p">),</span><span class="n">name</span><span class="o" style="color: #666666;">=</span><span class="s" style="color: #ba2121;">'home'</span><span class="p">),</span>
<a href="https://www.blogger.com/null" name="line-12" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="n">url</span><span class="p">(</span><span class="s" style="color: #ba2121;">r'^login/$'</span><span class="p">,</span>
<a href="https://www.blogger.com/null" name="line-13" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="n">anonymous_required</span><span class="p">(</span><span class="n">auth_views</span><span class="o" style="color: #666666;">.</span><span class="n">login</span><span class="p">),</span>
<a href="https://www.blogger.com/null" name="line-14" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="p">{</span><span class="s" style="color: #ba2121;">'template_name'</span><span class="p">:</span> <span class="s" style="color: #ba2121;">'authentication/login.html'</span><span class="p">},</span>
<a href="https://www.blogger.com/null" name="line-15" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="n">name</span><span class="o" style="color: #666666;">=</span><span class="s" style="color: #ba2121;">'login_process'</span><span class="p">),</span>
<a href="https://www.blogger.com/null" name="line-16" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="n">url</span><span class="p">(</span><span class="s" style="color: #ba2121;">r'^user/logout/$'</span><span class="p">,</span>
<a href="https://www.blogger.com/null" name="line-17" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="n">auth_views</span><span class="o" style="color: #666666;">.</span><span class="n">logout</span><span class="p">,</span>
<a href="https://www.blogger.com/null" name="line-18" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="p">{</span><span class="s" style="color: #ba2121;">'template_name'</span><span class="p">:</span> <span class="s" style="color: #ba2121;">'home/home.html'</span><span class="p">},</span>
<a href="https://www.blogger.com/null" name="line-19" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a> <span class="n">name</span><span class="o" style="color: #666666;">=</span><span class="s" style="color: #ba2121;">'logout_process'</span><span class="p">),</span>
<a href="https://www.blogger.com/null" name="line-20" style="background-color: transparent; border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a><span class="p">)</span></pre>
</pre>
<div style="background-color: white; text-align: left;">
<span style="color: #222222; font-family: "times new roman"; font-size: small; white-space: normal;">Assuming that you are done setting up built-in Django user authentication, add this in your settings.py. NOTE: 'home' here is the URL of the homepage. It will redirect the user to homepage once he is logged in. It is up to you what to replace it with.</span></div>
<pre style="font-family: 'dejavu sans mono'; font-size: 9pt;"><div style="font-family: 'Times New Roman'; font-size: medium; white-space: normal;">
<div style="margin-bottom: .0001pt; margin: 0in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<b>vms/settings.py</b></div>
</div>
<pre style="color: #222222; font-family: "Bitstream Vera Sans Mono", "Courier New", Monaco, monospace; font-size: 14.4px; overflow: auto;"><span class="n" style="background: rgb(255, 255, 153);">LOGIN_URL</span> <span class="o" style="color: #666666;">=</span> <span class="n">reverse_lazy</span><span class="p">(</span><span class="s" style="color: #ba2121;">'auth:user_login'</span><span class="p">)</span>
<a href="https://www.blogger.com/null" name="line-2" style="border-bottom: 1px dotted rgb(102, 102, 102); color: #333333;"></a><span class="n">LOGIN_REDIRECT_URL</span> <span class="o" style="color: #666666;">=</span> <span class="s" style="color: #ba2121;">'home'</span></pre>
</pre>
</pre>
</div>
Amrutha Shttp://www.blogger.com/profile/02981710049877674926noreply@blogger.com0India20.593684 78.962880000000041-8.5806465 37.654286000000042 49.7680145 120.27147400000004tag:blogger.com,1999:blog-1317507688703818110.post-15066178572318562292016-05-07T03:10:00.000-07:002016-05-07T03:12:41.656-07:00Migrating Volunteer Management System to Class based views- [GSoC-16 Project]<div dir="ltr" style="text-align: left;" trbidi="on">
<b><span style="font-family: "georgia" , "times new roman" , serif;">Volunteer Management System</span></b><br />
<span id="docs-internal-guid-a9416900-8ae5-e21b-8f76-c746f4498546"><span style="background-color: white; font-size: 14.6667px; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: "georgia" , "times new roman" , serif;">Systers has many volunteers that offer their skills, time and commitment to accomplish their vision- Women in Computing. The community has implemented a Volunteer Management System to manage their volunteer contact information, track hours and events they worked, and provide reporting functionality at the least.</span></span></span><br />
<span id="docs-internal-guid-a9416900-8ae6-10a0-2d26-c7145cbe01f5"><span style="font-family: "georgia" , "times new roman" , serif;"><span style="background-color: white; font-size: 14.6667px; vertical-align: baseline; white-space: pre-wrap;">Django 1.3 introduced </span><a href="https://docs.djangoproject.com/en/1.9/topics/class-based-views/" style="text-decoration: none;"><span style="background-color: white; color: #1155cc; font-size: 14.6667px; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">class-based views</span></a><span style="background-color: white; font-size: 14.6667px; vertical-align: baseline; white-space: pre-wrap;"> and also added a range of </span><a href="https://docs.djangoproject.com/en/1.9/ref/class-based-views/" style="text-decoration: none;"><span style="background-color: white; color: #1155cc; font-size: 14.6667px; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">generic class-based views</span></a><span style="background-color: white; font-size: 14.6667px; vertical-align: baseline; white-space: pre-wrap;">. From then, function-based views have been marked as deprecated. Most of the function-based views in the Systers VMS portal violates DRY. Class-based generic views helps to streamline common use cases, saving development time and effort.</span></span></span><br />
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<br /></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-254ddcf2-8ae7-0083-d8e3-e89a968ef969"><span style="vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: "georgia" , "times new roman" , serif;"><b>Migrating FBV to CBV</b></span></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: black; font-size: 14.6667px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: "georgia" , "times new roman" , serif;">A view is a callable which takes a request and returns a response. This can be more than just a function in Django. Class-based views allows to structure our views and reuse code by harnessing inheritance and mixins.</span></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "georgia" , "times new roman" , serif; font-size: 14.6667px; line-height: 1.38; text-align: justify; white-space: pre-wrap;">One of the advantages of CBV is Inheritance. For instance, large projects like VMS has a lot of redundant code due the repetition of similar views. By migrating to CBV, views could be inherited and thus avoid code redundancy.</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<b style="font-weight: normal;"><span style="font-family: "georgia" , "times new roman" , serif;"><br /></span></b></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-size: 14.6667px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: "georgia" , "times new roman" , serif;">Few advantages, which VMS can achieve by migrating to Django’s class based views are :</span></span></div>
<ol style="margin-bottom: 0pt; margin-top: 0pt;">
<li dir="ltr" style="background-color: transparent; color: black; font-size: 14.6667px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: "georgia" , "times new roman" , serif;"><span style="background-color: transparent; color: black; font-size: 14.6667px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Django offers various generic views like </span><span style="background-color: transparent; color: black; font-size: 14.6667px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">CreateView, UpdateView, FormView, ListView</span><span style="background-color: transparent; color: black; font-size: 14.6667px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> and </span><span style="background-color: transparent; color: black; font-size: 14.6667px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">DetailView</span><span style="background-color: transparent; color: black; font-size: 14.6667px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> to handle views easily. For eg: Allow users to </span><span style="background-color: transparent; color: black; font-size: 14.6667px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Create, Update </span><span style="background-color: transparent; color: black; font-size: 14.6667px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">and </span><span style="background-color: transparent; color: black; font-size: 14.6667px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Delete</span><span style="background-color: transparent; color: black; font-size: 14.6667px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> events and shifts of volunteers with or without authorization, without violating DRY.</span></span></div>
</li>
</ol>
<ol start="2" style="margin-bottom: 0pt; margin-top: 0pt;">
<li dir="ltr" style="background-color: transparent; color: black; font-size: 14.6667px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-size: 14.6667px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: "georgia" , "times new roman" , serif;">Better code readability, reducing the number of lines of code, easing the code review process. </span></span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-size: 14.6667px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-size: 14.6667px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: "georgia" , "times new roman" , serif;">Replacing the decorators by mixins instead, makes them more flexible, extensible and DRYer, just like the move from FBVs to CBVs. </span></span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-size: 14.6667px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-size: 14.6667px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: "georgia" , "times new roman" , serif;">Better handling of form data, which is handled in a traditional way in FBVs.</span></span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-size: 14.6667px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "georgia" , "times new roman" , serif;"><span style="background-color: white; font-size: 14.6667px; vertical-align: baseline; white-space: pre-wrap;">Better support from the Django development community as the recent developments are CBV based</span><span style="font-size: 14.6667px; vertical-align: baseline; white-space: pre-wrap;">.</span></span></div>
</li>
</ol>
<div>
<span style="font-family: "georgia" , "times new roman" , serif;"><span style="font-size: 14.6667px; line-height: 20.24px; white-space: pre-wrap;"><br /></span></span></div>
<div>
<span style="font-family: "georgia" , "times new roman" , serif;"><span style="font-size: 14.6667px; line-height: 20.24px; white-space: pre-wrap;"><br /></span></span></div>
<div>
<span style="font-family: "georgia" , "times new roman" , serif;"><span style="font-size: 14.6667px; line-height: 20.24px; white-space: pre-wrap;"><br /></span></span></div>
<div>
<span style="font-family: "georgia" , "times new roman" , serif;"><span style="font-size: 14.6667px; line-height: 20.24px; white-space: pre-wrap;"><br /></span></span></div>
</div>
Amrutha Shttp://www.blogger.com/profile/02981710049877674926noreply@blogger.com0tag:blogger.com,1999:blog-1317507688703818110.post-45364253064305192942016-05-06T11:54:00.000-07:002016-05-06T12:45:33.751-07:00Systers- A sisterhood<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Georgia, Times New Roman, serif; font-size: small;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Systers is a forum for women who love computing. It's open for women of all ages who are into technical world. It was founded by </span><a href="https://en.wikipedia.org/wiki/Anita_Borg"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;"><span style="color: #3d85c6;">Anita Borg</span></span></a><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> with 12 other women as small mailing list. Then it grew up into a big team with the support and cooperation of other women. </span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Georgia, Times New Roman, serif; font-size: small;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">The motto of the community is </span><span style="background-color: white; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">“increase the number of women in computer science and make the environments in which women work more conducive to their continued participation in the field.”</span></span></div>
<span style="font-family: Georgia, Times New Roman, serif; font-size: small;"><b id="docs-internal-guid-def35378-8798-2a70-93a7-7de8c30c23a8" style="font-weight: normal;"><br /></b>
</span><br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: black; font-family: Georgia, Times New Roman, serif; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><b>My experience with Systers</b></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "georgia" , "times new roman" , serif; font-size: small;"><span style="font-family: Georgia, Times New Roman, serif;"><span style="background-color: white; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">As an organization that take effort to bring more women into the world of computing, I am very proud to be a part of it. My relationship with Systers started as a GSoC-2016 intern. The community has always been so active with instant replies on </span><a href="https://systers-opensource.slack.com/messages/general/details/" style="text-decoration: none;"><span style="background-color: white; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"><span style="color: #3d85c6;">Slack</span></span></a></span><span style="background-color: white; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: Georgia, Times New Roman, serif;"> channel and showed keen interest in solving issues. They value even our small contribution very much</span><span style="font-family: georgia, times new roman, serif;">. </span></span></span></div>
<span style="font-family: "georgia" , "times new roman" , serif; font-size: medium;"><span style="font-family: "verdana" , sans-serif;"><br /></span>
</span><br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: black; font-family: "georgia" , "times new roman" , serif; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">I started with small bug fixes in Volunteer Management Sytem- a Django application that developed to manage the volunteers in Systers community. To get done with my first bug wasn’t easy. Struggled to understand the code base and documentation. Eventually, when the patch was merged and when I got to see the trivial contribution that I made, it was pure joy. And that’s how I started contributing to Systers. </span></div>
<div>
<span style="background-color: white; color: black; font-family: "open sans"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
</div>
Amrutha Shttp://www.blogger.com/profile/02981710049877674926noreply@blogger.com0Kerala21.94304553343818 78.75-8.64073496656182 37.441406 52.526826033438184 120.058594tag:blogger.com,1999:blog-1317507688703818110.post-29426332999078631882015-05-08T23:46:00.001-07:002016-05-06T12:36:25.474-07:00Building a Sugar Desktop Environment <div dir="ltr" style="text-align: left;" trbidi="on">
<div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: "georgia" , "times new roman" , serif; line-height: 1.38; white-space: pre-wrap;">Clone the sugar-build repository from git</span></div>
<div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="color: #a64d79; font-family: "georgia" , "times new roman" , serif;">git clone git://github.com/sugarlabs/sugar-build.git</span></span></div>
<div style="text-align: left;">
<span style="font-family: "georgia" , "times new roman" , serif;"><b id="docs-internal-guid-4a9d2964-376a-73e5-9bc4-b48e8093de22" style="font-weight: normal;"><br /></b>
</span></div>
<div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "georgia" , "times new roman" , serif; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Enter in the directory and pull the latest source code</span><br />
<span style="color: #a64d79; font-family: georgia, 'times new roman', serif; line-height: 1.38; white-space: pre-wrap;">cd sugar-build</span></div>
<div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="color: #a64d79; font-family: "georgia" , "times new roman" , serif;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">./osbuild pull</span></span></div>
<div style="text-align: left;">
<span style="font-family: "georgia" , "times new roman" , serif;"><b style="font-weight: normal;"><br /></b>
</span></div>
<div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "georgia" , "times new roman" , serif; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Build the source code</span></div>
<div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="color: #a64d79; font-family: "georgia" , "times new roman" , serif;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">./osbuild shell</span><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br class="kix-line-break" /></span><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">build</span></span></div>
<div style="text-align: left;">
<span style="font-family: "georgia" , "times new roman" , serif;"><b style="font-weight: normal;"><br /></b>
</span></div>
<div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "georgia" , "times new roman" , serif; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Finally run the Sugar environment</span></div>
<div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="color: #a64d79; font-family: "georgia" , "times new roman" , serif;">run</span></span></div>
<div style="text-align: left;">
<span style="font-family: "georgia" , "times new roman" , serif;"><b style="font-weight: normal;"><br /></b>
</span></div>
<div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "georgia" , "times new roman" , serif; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">You will get your Sugar environment open if there is no error.</span></div>
<span style="font-family: "georgia" , "times new roman" , serif;"><b style="font-weight: normal;"><br /></b>
</span><br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: "georgia" , "times new roman" , serif;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><img alt="snapshot2.png" height="312px;" src="https://lh4.googleusercontent.com/m9nKaL7Ce0_BqdDHR-14ct7Bt950HwP-nYyd3feWez8iVqpVmm-YHmmv42Dw22_vYsnJMKv9HT4nx_a_jWf0OPiT88iODF2JLlfiCCkuJWDZPuN6B1yc5uJBcUfJBmbkAVG-9rQ" style="border: none; transform: rotate(0rad);" width="555px;" /></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: center;">
<span style="font-family: "georgia" , "times new roman" , serif;"><br /></span></div>
<span style="font-family: "georgia" , "times new roman" , serif;"><b style="font-weight: normal;"><br /></b>
</span><br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "georgia" , "times new roman" , serif; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Type Shift-Alt-Q inside sugar to exit.</span></div>
<br /></div>
Amrutha Shttp://www.blogger.com/profile/02981710049877674926noreply@blogger.com0Kerala, India14.604847155053898 79.453125-15.6302798449461 38.144531 44.839974155053895 120.761719tag:blogger.com,1999:blog-1317507688703818110.post-16710624784973153682015-02-06T04:19:00.002-08:002016-05-06T12:30:24.397-07:00Sugar for Children<div dir="ltr" style="text-align: left;" trbidi="on">
<style type="text/css">P { margin-bottom: 0.08in; }A:link { }</style>
<br />
<div align="JUSTIFY" style="font-style: normal; font-variant: normal; font-weight: normal; line-height: 114%; margin-bottom: 0in; text-decoration: none; text-indent: 0.5in;">
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right; margin-left: 1em; text-align: right;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfkQ2BaF5zFyg6y4W0fh5r4Dux970fX_8e7_zygJnEkFnD8jhkVdXKrqDvYD9IUutortKasYJQmohMVqnKGkDo6fqPsnIys263bHO2ESt0OH9x_LqeaSy0lWcvWxUTy38rs8cjIBleJyXa/s1600/sugar.png" imageanchor="1" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><span style="font-family: "georgia" , "times new roman" , serif;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfkQ2BaF5zFyg6y4W0fh5r4Dux970fX_8e7_zygJnEkFnD8jhkVdXKrqDvYD9IUutortKasYJQmohMVqnKGkDo6fqPsnIys263bHO2ESt0OH9x_LqeaSy0lWcvWxUTy38rs8cjIBleJyXa/s1600/sugar.png" width="320" /></span></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="font-family: "georgia" , "times new roman" , serif;">Sugar IDE</span></td></tr>
</tbody></table>
<span style="font-family: "trebuchet ms" , sans-serif;"><span style="color: black; font-size: small;"><span style="background-attachment: scroll; background-color: transparent; background-image: none; background-position: 0% 0%; background-repeat: repeat; font-family: "georgia" , "times new roman" , serif;">Sugar
is an interactive and easy to learn platform for kids. And now,
coming to what is Sugar? Sugar is a free and open source desktop
environment designed for interactive learning for children. It
started as a part of One Laptop per Child project (OLPC) as its
default desktop environment. The mission of OLPC is to develop low
cost laptops and provide children around the world with new
opportunities. Sugar is a free software developed under Sugar Labs,
which is a non-profit organization where developers and educationists
work together for the development of the software. Sugar Labs is a
community that supports and promotes Sugar learning platform.</span></span></span></div>
<span style="font-family: "georgia" , "times new roman" , serif;"><span style="font-family: "trebuchet ms" , sans-serif;"><span style="font-size: small;">
</span></span>
</span><br />
<div align="JUSTIFY" style="font-style: normal; font-variant: normal; font-weight: normal; line-height: 114%; margin-bottom: 0in; text-decoration: none; text-indent: 0.5in;">
<span style="font-family: "trebuchet ms" , sans-serif;"><span style="color: black; font-size: small;"><span style="background-attachment: scroll; background-color: transparent; background-image: none; background-position: 0% 0%; background-repeat: repeat; font-family: "georgia" , "times new roman" , serif;">Sugar
is an attractive and colorful desktop environment created with an aim
of quality education for children. Sugar does not use desktop, folder
or window as its user interface objects. Instead, it uses a full
screen view which helps children to concentrate on one job at a time.
It is developed in Python language and runs on GNU/Linux. It is
released under GNU General Public License and is available in 25
languages. Most applications in Sugar are the forks of existing
applications in GNOME. It is available as USB-Bootable Linux
distribution and Live CDs.</span></span></span></div>
<div align="JUSTIFY" style="font-style: normal; font-variant: normal; font-weight: normal; line-height: 114%; margin-bottom: 0in; text-decoration: none; text-indent: 0.5in;">
<b style="font-family: 'trebuchet ms', sans-serif; line-height: 114%; text-align: left; text-indent: 0.5in;"><br /></b>
<span style="font-family: Georgia, Times New Roman, serif;"><b style="line-height: 114%; text-align: left; text-indent: 0.5in;">Why Sugar is interesting?</b><span style="line-height: 114%; text-align: left; text-indent: 0.5in;"> </span></span></div>
<div style="font-style: normal; font-variant: normal; font-weight: normal; line-height: 114%; margin-bottom: 0in; text-align: left; text-decoration: none; text-indent: 0.5in;">
<span style="line-height: 114%; text-indent: 0.5in;"><span style="font-family: Georgia, Times New Roman, serif;">Sugar
supports sharing and collaboration for users. It does not contain
applications like other desktop environments. Learner applications in
Sugar are called Activities. It includes activities like
Pippy(introductory environment to learn Python), Journals(object and
activity browsing), Distance(measure the distance between two
laptops) etc which are exclusively designed for easy use for kids. In
the Sugar Neighborhood view, children see their connected friends;
they can join each other’s activities.</span></span></div>
<span style="font-family: "georgia" , "times new roman" , serif;"><span style="font-family: "trebuchet ms" , sans-serif;"><span style="font-size: small;">
</span></span>
</span><br />
<div align="JUSTIFY" style="font-style: normal; font-variant: normal; font-weight: normal; line-height: 114%; margin-bottom: 0in; text-decoration: none;">
<span style="font-family: "trebuchet ms" , sans-serif;"><span style="color: black; font-size: small;"><span style="background: none repeat scroll 0% 0% transparent; font-family: "georgia" , "times new roman" , serif;">Sugar
teaches you through three experiences:</span></span></span></div>
<span style="font-family: "georgia" , "times new roman" , serif;"><span style="font-family: "trebuchet ms" , sans-serif;"><span style="font-size: small;">
</span></span>
</span><br />
<div align="JUSTIFY" style="line-height: 114%; margin-bottom: 0in;">
<span style="font-family: "trebuchet ms" , sans-serif;"><span style="font-family: "georgia" , "times new roman" , serif; font-size: small;"><span style="font-variant: normal;"><span style="color: black;"><span style="text-decoration: none;"><span style="font-style: normal;"><b><span style="background: none repeat scroll 0% 0% transparent;">Sharing,</span></b></span></span></span></span><span style="font-variant: normal;"><span style="color: black;"><span style="text-decoration: none;"><span style="background: none repeat scroll 0% 0% transparent;">
</span></span></span></span><span style="font-variant: normal;"><span style="color: black;"><span style="text-decoration: none;"><span style="font-style: normal;"><span style="font-weight: normal;"><span style="background: none repeat scroll 0% 0% transparent;">which
shows the presence of others involved in the activity by sharing
ideas.</span></span></span></span></span></span></span></span></div>
<span style="font-family: "georgia" , "times new roman" , serif;"><span style="font-family: "trebuchet ms" , sans-serif;"><span style="font-size: small;">
</span></span>
</span><br />
<div align="JUSTIFY" style="line-height: 114%; margin-bottom: 0in;">
<span style="font-family: "trebuchet ms" , sans-serif;"><span style="font-family: "georgia" , "times new roman" , serif; font-size: small;"><span style="font-variant: normal;"><span style="color: black;"><span style="text-decoration: none;"><span style="font-style: normal;"><b><span style="background: none repeat scroll 0% 0% transparent;">Reflecting,
</span></b></span></span></span></span><span style="font-variant: normal;"><span style="color: black;"><span style="text-decoration: none;"><span style="font-style: normal;"><span style="font-weight: normal;"><span style="background: none repeat scroll 0% 0% transparent;">where
Sugar uses journals to record each activity of the user which helps
in progress assessment.</span></span></span></span></span></span></span></span></div>
<span style="font-family: "georgia" , "times new roman" , serif;"><span style="font-family: "trebuchet ms" , sans-serif;"><span style="font-size: small;">
</span></span>
</span><br />
<div align="JUSTIFY" style="line-height: 114%; margin-bottom: 0in;">
<span style="font-family: "trebuchet ms" , sans-serif;"><span style="font-family: "georgia" , "times new roman" , serif; font-size: small;"><span style="font-variant: normal;"><span style="color: black;"><span style="text-decoration: none;"><span style="font-style: normal;"><b><span style="background: none repeat scroll 0% 0% transparent;">Discovering,</span></b></span></span></span></span><span style="font-variant: normal;"><span style="color: black;"><span style="text-decoration: none;"><span style="background: none repeat scroll 0% 0% transparent;">
</span></span></span></span><span style="font-variant: normal;"><span style="color: black;"><span style="text-decoration: none;"><span style="font-style: normal;"><span style="font-weight: normal;"><span style="background: none repeat scroll 0% 0% transparent;">where
users of different levels of skills join together in a single
platform and go deeper and deeper with no restrictions.</span></span></span></span></span></span></span></span></div>
<span style="font-family: "georgia" , "times new roman" , serif;"><span style="font-family: "trebuchet ms" , sans-serif;"><span style="font-size: small;">
</span></span>
</span><br />
<div align="JUSTIFY" style="line-height: 114%; margin-bottom: 0in;">
<span style="font-family: "trebuchet ms" , sans-serif;"><span style="font-family: "georgia" , "times new roman" , serif; font-size: small;"><span style="font-variant: normal;"><span style="color: black;"><span style="text-decoration: none;"><span style="background: none repeat scroll 0% 0% transparent;">
</span></span></span></span><span style="font-variant: normal;"><span style="color: black;"><span style="text-decoration: none;"><span style="font-style: normal;"><span style="font-weight: normal;"><span style="background-attachment: scroll; background-clip: initial; background-color: transparent; background-image: none; background-origin: initial; background-position: 0% 0%; background-repeat: repeat; background-size: initial;">Sugar
provides children with the opportunity to explore, express and
experiment themselves. </span></span></span></span></span></span></span></span><br />
<span style="font-family: "georgia" , "times new roman" , serif;"><span style="font-family: "georgia" , "times new roman" , serif;"><br /></span>
<span style="font-family: "trebuchet ms" , sans-serif;"><span style="font-size: small;"><span style="font-variant: normal;"><span style="color: black;"><span style="text-decoration: none;"><span style="font-style: normal;"><span style="font-weight: normal;"><span style="background-attachment: scroll; background-color: transparent; background-image: none; background-position: 0% 0%; background-repeat: repeat; font-family: "georgia" , "times new roman" , serif;"><b>References </b></span></span></span></span></span></span></span></span></span><br />
<span style="font-family: "trebuchet ms" , sans-serif;"><span style="font-size: small;"><span style="font-variant: normal;"><span style="color: black;"><span style="text-decoration: none;"><span style="font-style: normal;"><span style="font-weight: normal;"><span style="background: none repeat scroll 0% 0% transparent; font-family: "georgia" , "times new roman" , serif;"><b>
<style type="text/css">P { margin-bottom: 0.08in; }A:link { }</style>
</b></span></span></span></span></span></span></span></span><br />
<div align="JUSTIFY" style="line-height: 114%; margin-bottom: 0in;">
<span style="font-family: "georgia" , "times new roman" , serif;"><span style="font-variant: normal;"><span style="color: black;"><span style="text-decoration: none;"><span style="font-family: "times new roman";"><span style="font-size: medium;"><span style="font-style: normal;"><span style="font-weight: normal;"><span style="background: transparent;">[1]
</span></span></span></span></span></span></span></span><a href="http://wiki.sugarlabs.org/go/Welcome_to_the_Sugar_Labs_wiki"><span style="font-variant: normal;"><span style="color: #1155cc;"><span style="text-decoration: none;"><span style="font-family: "times new roman";"><span style="font-size: medium;"><span style="font-style: normal;"><u><span style="font-weight: normal;"><span style="background: transparent;">http://wiki.sugarlabs.org/go/Welcome_to_the_Sugar_Labs_wiki</span></span></u></span></span></span></span></span></span></a></span></div>
<div align="JUSTIFY" style="line-height: 114%; margin-bottom: 0in;">
<span style="font-family: "georgia" , "times new roman" , serif;"><span style="font-variant: normal;"><span style="color: black;"><span style="text-decoration: none;"><span style="font-family: "times new roman";"><span style="font-size: medium;"><span style="font-style: normal;"><span style="font-weight: normal;"><span style="background: transparent;">[2]
</span></span></span></span></span></span></span></span><a href="http://developer.sugarlabs.org/"><span style="font-variant: normal;"><span style="color: #1155cc;"><span style="text-decoration: none;"><span style="font-family: "times new roman";"><span style="font-size: medium;"><span style="font-style: normal;"><u><span style="font-weight: normal;"><span style="background: transparent;">http://developer.sugarlabs.org/</span></span></u></span></span></span></span></span></span></a></span></div>
<div align="JUSTIFY" style="line-height: 114%; margin-bottom: 0in;">
<span style="font-family: "georgia" , "times new roman" , serif;"><span style="font-variant: normal;"><span style="color: black;"><span style="text-decoration: none;"><span style="font-family: "times new roman";"><span style="font-size: medium;"><span style="font-style: normal;"><span style="font-weight: normal;"><span style="background: transparent;">[3]
</span></span></span></span></span></span></span></span><a href="http://en.wikipedia.org/wiki/Sugar_Labs"><span style="font-variant: normal;"><span style="color: #1155cc;"><span style="text-decoration: none;"><span style="font-family: "times new roman";"><span style="font-size: medium;"><span style="font-style: normal;"><u><span style="font-weight: normal;"><span style="background: transparent;">http://en.wikipedia.org/wiki/Sugar_Labs</span></span></u></span></span></span></span></span></span></a></span></div>
<div align="JUSTIFY" style="line-height: 114%; margin-bottom: 0in;">
<span style="font-family: "georgia" , "times new roman" , serif;"><span style="font-variant: normal;"><span style="color: black;"><span style="text-decoration: none;"><span style="font-family: "times new roman";"><span style="font-size: medium;"><span style="font-style: normal;"><span style="font-weight: normal;"><span style="background: transparent;">[4]
</span></span></span></span></span></span></span></span><a href="http://en.wikipedia.org/wiki/Sugar_%28software%29"><span style="font-variant: normal;"><span style="color: #1155cc;"><span style="text-decoration: none;"><span style="font-family: "times new roman";"><span style="font-size: medium;"><span style="font-style: normal;"><u><span style="font-weight: normal;"><span style="background: transparent;">http://en.wikipedia.org/wiki/Sugar_%28software%29</span></span></u></span></span></span></span></span></span></a></span></div>
<div align="JUSTIFY" style="line-height: 114%; margin-bottom: 0in;">
<span style="font-family: "georgia" , "times new roman" , serif;"><span style="font-variant: normal;"><span style="color: black;"><span style="text-decoration: none;"><span style="font-family: "times new roman";"><span style="font-size: medium;"><span style="font-style: normal;"><span style="font-weight: normal;"><span style="background: transparent;">[5]
</span></span></span></span></span></span></span></span><a href="https://www.sugarlabs.org/"><span style="font-variant: normal;"><span style="color: #1155cc;"><span style="text-decoration: none;"><span style="font-family: "times new roman";"><span style="font-size: medium;"><span style="font-style: normal;"><u><span style="font-weight: normal;"><span style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial;">https://www.sugarlabs.org/</span></span></u></span></span></span></span></span></span></a></span></div>
<span style="font-family: "georgia" , "times new roman" , serif;"><span style="font-family: "georgia" , "times new roman" , serif;"><br /></span>
<span style="font-family: "georgia" , "times new roman" , serif;"><br /></span>
<span style="font-family: "georgia" , "times new roman" , serif;"><br /></span>
<span style="font-family: "georgia" , "times new roman" , serif;"><br /></span>
<span style="font-family: "georgia" , "times new roman" , serif;"><br /></span>
<span style="font-family: "georgia" , "times new roman" , serif;"><br /></span>
<span style="font-family: "georgia" , "times new roman" , serif;"><span style="font-family: "trebuchet ms" , sans-serif;"><span style="font-size: small;"><span style="font-variant: normal;"><span style="color: black;"><span style="text-decoration: none;"><span style="font-style: normal;"><span style="font-weight: normal;"><span style="background: none repeat scroll 0% 0% transparent;"> </span></span></span></span></span></span></span></span>
</span></span></div>
<span style="font-family: "trebuchet ms" , sans-serif;"><span style="font-size: small;">
</span></span><span style="font-family: "trebuchet ms" , sans-serif;"><span style="font-size: small;"><br /></span></span>
<br />
<span style="font-family: "trebuchet ms" , sans-serif;"><span style="font-size: small;">
</span></span></div>
Amrutha Shttp://www.blogger.com/profile/02981710049877674926noreply@blogger.com0India8.0592296272001924 76.9921875-7.7484833727998073 56.3378905 23.866942627200192 97.6464845tag:blogger.com,1999:blog-1317507688703818110.post-72698615990511889482015-01-09T04:21:00.000-08:002016-05-06T12:39:47.162-07:00Writing a simple Linux Device Driver<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" id="docs-internal-guid-ff09257a-ce9d-adf0-8336-3f1042362293" style="line-height: 1; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-size: small;"><span style="background-color: transparent; color: black; font-family: "georgia" , "times new roman" , serif; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"> A device driver is a program that controls a particular type of device that is attached to your computer. There are device drivers for printers, displays, CD-ROM readers, diskette drives, and so on.</span></span></div>
<div dir="ltr" id="docs-internal-guid-ff09257a-ce9d-adf0-8336-3f1042362293" style="line-height: 1; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "georgia" , "times new roman" , serif; line-height: 1;">Now let us write a simple Hello World driver code.</span></div>
<span style="color: black; font-family: "georgia" , "times new roman" , serif; line-height: 1; vertical-align: baseline;">Creat</span><span style="color: black; font-family: "georgia" , "times new roman" , serif; line-height: 1; vertical-align: baseline;">e a dire</span><span style="color: black; font-family: "georgia" , "times new roman" , serif; line-height: 1; vertical-align: baseline;">ctory anywhere in your home folder and navigate into that directory.</span><br />
<b style="line-height: 1;"><span style="color: #0b5394;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: small;"><span style="font-family: "georgia" , "times new roman" , serif; font-weight: normal; vertical-align: baseline;">mkdir hello</span></span></span></span></b><br />
<div dir="ltr" style="line-height: 1; margin-bottom: 0pt; margin-top: 0pt;">
<b><span style="color: #0b5394;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: small;"><span style="background-color: transparent; font-family: "georgia" , "times new roman" , serif; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">cd hello</span></span></span></span></b></div>
<span style="font-family: "georgia" , "times new roman" , serif; line-height: 1;">Create two files hello.c and Makefile</span><br />
<div dir="ltr" style="line-height: 1; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-size: small;"><span style="background-color: transparent; color: black; font-family: "georgia" , "times new roman" , serif; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">You can use any editor as you wish. Here I use Kate.</span></span></span></div>
<span style="color: #0b5394; font-family: "georgia" , "times new roman" , serif; line-height: 1;">kate hello.c</span><br />
<span style="font-family: "georgia" , "times new roman" , serif; line-height: 1;">Type the following code</span><br />
<span style="font-family: "georgia" , "times new roman" , serif; line-height: 1;"><br /></span>
<span style="color: #0b5394; font-family: "georgia" , "times new roman" , serif; line-height: 1;">#include <linux/init.h></span><br />
<div dir="ltr" style="line-height: 1; margin-bottom: 0pt; margin-top: 0pt;">
<span style="color: #0b5394;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: small;"><span style="background-color: transparent; font-family: "georgia" , "times new roman" , serif; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">#include <linux/module.h></span></span></span></span></div>
<span style="color: #0b5394; font-family: georgia, 'times new roman', serif; line-height: 1;">static int __init hello_init (void) {</span><br />
<div dir="ltr" style="line-height: 1; margin-bottom: 0pt; margin-top: 0pt;">
<span style="color: #0b5394;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: small;"><span style="background-color: transparent; font-family: "georgia" , "times new roman" , serif; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">printk(KERN_ALERT "Hello World!!!");</span></span></span></span></div>
<div dir="ltr" style="line-height: 1; margin-bottom: 0pt; margin-top: 0pt;">
<span style="color: #0b5394;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: small;"><span style="background-color: transparent; font-family: "georgia" , "times new roman" , serif; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">return 0;</span></span></span></span></div>
<div dir="ltr" style="line-height: 1; margin-bottom: 0pt; margin-top: 0pt;">
<span style="color: #0b5394;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: small;"><span style="background-color: transparent; font-family: "georgia" , "times new roman" , serif; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">}</span></span></span></span></div>
<span style="color: #0b5394; font-family: georgia, 'times new roman', serif; line-height: 1;">static int __exit hello_exit(void) {</span><br />
<div dir="ltr" style="line-height: 1; margin-bottom: 0pt; margin-top: 0pt;">
<span style="color: #0b5394;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: small;"><span style="background-color: transparent; font-family: "georgia" , "times new roman" , serif; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">printk(KERN_ALERT "Goodbye World!!!");</span></span></span></span></div>
<div dir="ltr" style="line-height: 1; margin-bottom: 0pt; margin-top: 0pt;">
<span style="color: #0b5394;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: small;"><span style="background-color: transparent; font-family: "georgia" , "times new roman" , serif; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">return 0;</span></span></span></span></div>
<div dir="ltr" style="line-height: 1; margin-bottom: 0pt; margin-top: 0pt;">
<span style="color: #0b5394;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: small;"><span style="background-color: transparent; font-family: "georgia" , "times new roman" , serif; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">}</span></span></span></span></div>
<span style="color: #0b5394; font-family: georgia, 'times new roman', serif; line-height: 1;">module_init(hello_init);</span><br />
<div dir="ltr" style="line-height: 1; margin-bottom: 0pt; margin-top: 0pt;">
<span style="color: #0b5394;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: small;"><span style="background-color: transparent; font-family: "georgia" , "times new roman" , serif; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">module_exit(hello_exit);</span></span></span></span><br />
<span style="color: #0b5394;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: small;"><span style="background-color: transparent; font-family: "georgia" , "times new roman" , serif; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"><br /></span></span></span></span></div>
<span style="font-family: "georgia" , "times new roman" , serif; line-height: 1;">Here, the hello_init() function runs when the module is loaded and hello_exit() funtion runs when the module is unloaded. Save the code.</span><br />
<span style="font-family: "georgia" , "times new roman" , serif; line-height: 1;">Next we can create the Makefile.</span><br />
<span style="color: #0b5394; font-family: "georgia" , "times new roman" , serif; line-height: 1;">kate Makefile</span><br />
<span style="font-family: "georgia" , "times new roman" , serif; line-height: 1;">Type the follwing code in it. Make sure that you intent the code perfectly.</span><br />
<span style="font-family: "georgia" , "times new roman" , serif;"><span style="font-size: small;"><br /></span>
</span><br />
<div dir="ltr" style="line-height: 1; margin-bottom: 0pt; margin-top: 0pt;">
<span style="color: #0b5394;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: small;"><span style="background-color: transparent; font-family: "georgia" , "times new roman" , serif; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">ifneq ($(KERNELRELEASE),)</span></span></span></span></div>
<div dir="ltr" style="line-height: 1; margin-bottom: 0pt; margin-top: 0pt;">
<span style="color: #0b5394;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: small;"><span style="background-color: transparent; font-family: "georgia" , "times new roman" , serif; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">obj-m := hello.o</span></span></span></span></div>
<span style="color: #0b5394; font-family: georgia, 'times new roman', serif; line-height: 1;">else</span><br />
<div dir="ltr" style="line-height: 1; margin-bottom: 0pt; margin-top: 0pt;">
<span style="color: #0b5394;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: small;"><span style="background-color: transparent; font-family: "georgia" , "times new roman" , serif; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">KERNELDIR ?= /lib/modules/$(shell uname -r)/build</span></span></span></span></div>
<div dir="ltr" style="line-height: 1; margin-bottom: 0pt; margin-top: 0pt;">
<span style="color: #0b5394;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: small;"><span style="background-color: transparent; font-family: "georgia" , "times new roman" , serif; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">PWD := $(shell pwd)</span></span></span></span></div>
<span style="color: #0b5394; font-family: georgia, 'times new roman', serif; line-height: 1;">default:</span><br />
<div dir="ltr" style="line-height: 1; margin-bottom: 0pt; margin-top: 0pt;">
<span style="color: #0b5394;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "georgia" , "times new roman" , serif; font-size: small;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"> </span><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">$(MAKE) -C $(KERNELDIR) M=$(PWD) modules</span></span></span></span></div>
<span style="color: #0b5394; font-family: georgia, 'times new roman', serif; line-height: 1;">clean:</span><br />
<div dir="ltr" style="line-height: 1; margin-bottom: 0pt; margin-top: 0pt;">
<span style="color: #0b5394;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "georgia" , "times new roman" , serif; font-size: small;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"> </span><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">rm -rf *.o *.ko *.mod.*</span></span></span></span></div>
<span style="color: #0b5394; font-family: georgia, 'times new roman', serif; line-height: 1;">endif</span><br />
<span style="font-family: "georgia" , "times new roman" , serif;"><span style="font-size: small;"><br /></span>
</span><br />
<div dir="ltr" style="line-height: 1; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-size: small;"><span style="background-color: transparent; color: black; font-family: "georgia" , "times new roman" , serif; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">When you are done till here, we need to build the module. For that type,</span></span></span></div>
<span style="color: #0b5394; font-family: "georgia" , "times new roman" , serif; line-height: 1;">make</span><br />
<span style="font-family: "georgia" , "times new roman" , serif; line-height: 1;">It hardly takes half a minute. When the module is successflly built, you get a bunch of object files in the hello directory. Thus the Hello World module is ready.</span><br />
<div dir="ltr" style="line-height: 1; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-size: small;"><span style="background-color: transparent; color: black; font-family: "georgia" , "times new roman" , serif; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">Now let's see the working of the module by loading it into the kernel. Type,</span></span></span></div>
<span style="color: #0b5394; font-family: "georgia" , "times new roman" , serif; line-height: 1;">sudo insmod hello.ko</span><br />
<span style="font-family: "georgia" , "times new roman" , serif; line-height: 1;">This will load the module into the kernel which we can check by typing ,</span><br />
<span style="color: #0b5394; font-family: "georgia" , "times new roman" , serif; line-height: 1;">lsmod</span><br />
<span style="font-family: "georgia" , "times new roman" , serif; line-height: 1;">You get a list of module on top you get your hello module. To see whether the module is running in you kernel or not, type</span><br />
<span style="color: #0b5394; font-family: "georgia" , "times new roman" , serif; line-height: 1;">dmesg</span><br />
<span style="font-family: "georgia" , "times new roman" , serif; line-height: 1;">The Hello World message will be printed that we wrote in hello.c file</span><br />
<span style="font-family: "georgia" , "times new roman" , serif; line-height: 1;">To remove the module type the following instruction in the terminal</span><br />
<span style="color: #0b5394; font-family: "georgia" , "times new roman" , serif; line-height: 1;">sudo rmmod hello</span><br />
<div dir="ltr" style="line-height: 1; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-size: small;"><span style="background-color: transparent; color: black; font-family: "georgia" , "times new roman" , serif; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">Here the exit function that we typed in hello.c is run. To check the output type,</span></span></span></div>
<span style="color: #0b5394; font-family: "georgia" , "times new roman" , serif; line-height: 1;">dmesg</span><br />
<span style="font-size: small;"><br /></span></div>
Amrutha Shttp://www.blogger.com/profile/02981710049877674926noreply@blogger.com0tag:blogger.com,1999:blog-1317507688703818110.post-11547168644388809142014-11-28T05:51:00.000-08:002016-05-06T12:46:47.415-07:00Thanks to SSR...<div dir="ltr" style="text-align: left;" trbidi="on">
<style type="text/css">p { margin-bottom: 0.25cm; line-height: 120%; }</style><span style="font-family: "georgia" , "times new roman" , serif;"><span style="font-family: "georgia" , "times new roman" , serif;"><br /></span>
</span><br />
<div style="font-weight: normal; line-height: 100%; margin-bottom: 0cm; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzeq8J8oZORGdYJ_zywGZF-JdxTvyWbOR5r1i0NXVXy4-Qnl8fSMlZcqQ-O6D8d58V7DEG6evTXNZ5qmJ2OrRo8l9av0gg0OgW4PUeA31HaU4Btt43RsVh4SSeV7ZBULE7jKGkW65x65WX/s1600/DSC04422.JPG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><span style="font-family: "georgia" , "times new roman" , serif;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzeq8J8oZORGdYJ_zywGZF-JdxTvyWbOR5r1i0NXVXy4-Qnl8fSMlZcqQ-O6D8d58V7DEG6evTXNZ5qmJ2OrRo8l9av0gg0OgW4PUeA31HaU4Btt43RsVh4SSeV7ZBULE7jKGkW65x65WX/s320/DSC04422.JPG" width="320" /></span></a><span style="font-family: "georgia" , "times new roman" , serif;"><span style="font-family: "georgia" , "times new roman" , serif;"> </span><span style="font-family: "times" , "times new roman" , serif;"> </span></span><span style="font-family: "georgia" , "times new roman" , serif;"><span style="font-family: "georgia" , "times new roman" , serif;"> </span><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><span style="font-size: small;"><span style="font-family: "georgia" , "times new roman" , serif;">
First
of all, thanks to SSR Project. You may be wondering what is SSR. SSR
stands for Student Social Responsibility Project conducted by our
college for all third year Engineering students. We can undertake any
project that is socially challenging or beneficial. We were divided
into teams of six. The first idea that clicked our brain was RCC
visit at Trivandrum. We were so excited to move with that idea. Next day
we contacted the RCC authorities. But BAD LUCK… They are not
encouraging any outsiders due to infection threat to the patients. We
had to drop our project . Then the next one…. Visiting Vimala
Hridaya, school for mentally challenged children. We ran up and down
the college for all the formalities and permissions. Finally we were
all set by one evening. But again bad luck. That project was chosen
by another team. Again disappointment… Then complete silence for a
few days</span><span style="font-family: "georgia" , "times new roman" , serif;">….</span></span></span></span></div>
<div style="text-align: left;">
</div>
<div style="font-weight: normal; line-height: 100%; margin-bottom: 0cm; text-align: left;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><span style="font-family: "georgia" , "times new roman" , serif; font-size: small;">Then
we came up with new more ideas. We wanted to do something that will
stay in future in the name of our project. That’s how we thought of
Self Defense for girls, Organic Gardening and Computer Skills for
students. We wrapped these ideas into one project… TOGETHER
TOWARDS A BETTER FUTURE.</span></span></div>
<div style="text-align: left;">
</div>
<div style="font-weight: normal; line-height: 100%; margin-bottom: 0cm; text-align: left;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><span style="font-family: "georgia" , "times new roman" , serif; font-size: small;">As
usual, we started up with a group discussion. We divided our project
into three parts</span></span></div>
<div style="text-align: left;">
</div>
<div style="font-weight: normal; line-height: 100%; margin-bottom: 0cm; text-align: left;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><span style="font-family: "georgia" , "times new roman" , serif; font-size: small;">Nirbhaya
- Self defense class for girls</span></span></div>
<div style="text-align: left;">
</div>
<div style="font-weight: normal; line-height: 100%; margin-bottom: 0cm; text-align: left;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><span style="font-family: "georgia" , "times new roman" , serif; font-size: small;">Swasth
- Organic gardening</span></span><br />
<span style="font-family: "georgia" , "times new roman" , serif; line-height: 100%;">Aastha
- Computer skills for students</span></div>
<div style="text-align: left;">
</div>
<div style="font-weight: normal; line-height: 100%; margin-bottom: 0cm; text-align: left;">
<br /></div>
<div style="text-align: left;">
</div>
<div style="font-weight: normal; line-height: 100%; margin-bottom: 0cm; text-align: left;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiUvhdlevo22qM3JFHAAepuSE1J-1rJRLFuJSeV0O78EZfkkAjC9YGer5aTukaQr316gd4dPeYQoF1eRV-jmG122Y9_p2onuUU6bar-c0JL2oN8_nYjCkfYbAu9y4IP5pE6EzjIp_XD37B/s1600/DSC04427.JPG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiUvhdlevo22qM3JFHAAepuSE1J-1rJRLFuJSeV0O78EZfkkAjC9YGer5aTukaQr316gd4dPeYQoF1eRV-jmG122Y9_p2onuUU6bar-c0JL2oN8_nYjCkfYbAu9y4IP5pE6EzjIp_XD37B/s1600/DSC04427.JPG" width="320" /></a></div>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><span style="font-family: "georgia" , "times new roman" , serif; font-size: small;"> </span></span><span style="font-family: "georgia" , "times new roman" , serif; line-height: 100%;">Here our journey starts….</span><span style="font-family: "georgia" , "times new roman" , serif; line-height: 100%;"> </span><br />
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><span style="font-family: "georgia" , "times new roman" , serif; font-size: small;">First
step was to get a lady who is trained in martial arts. We came to
know about one from our seniors. We ran to ashram(Mata
Amritanandamayi Math) to meet her.. Again the luck factor plays the
role. She went to Australia, her home town. Again disappointment.
But, the people in International office gave us a ray of hope. They
said that there is another lady who is trained in martial arts. They
took our phone number telling that they will ask her to contact us.
But, still the hope was too far… We waited for next two days for a
phone ring… But nothing happened. Suddenly after some days we got a
call. It was her, calling us asking to meet her. The very next day,
we ran to ashram with all the hopes fulfilled. But when we saw her,
we were hmmmmm. She is pretty old. Her name is Ms. Nirupama. She told
us that she is no longer practicing and it would be hard for her to
take a workshop. But we didn't give up. At last we got a YES from
her. That was great a response. We are again in ON mode.</span></span></div>
<div style="text-align: left;">
</div>
<div style="font-weight: normal; line-height: 100%; margin-bottom: 0cm; text-align: left;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><span style="font-family: "georgia" , "times new roman" , serif; font-size: small;">Things
became more easy after meeting her. When we told her about the other
two ideas, she took us to the organic garden there in ashram and we
were directed to the organic farm near the ashram beach. But we
couldn't meet the concerned person over there. We were asked to come
on next day. Again next day… We went there and waited around 3
hours. Finally we met Gurudas swami who is in charge of Organic
farming in ashram and he provided us with some vegetable seeds and
saplings. Thus the day 13th November was fixed for the project and
everything was done.</span></span></div>
<div style="font-weight: normal; line-height: 100%; margin-bottom: 0cm; text-align: left;">
</div>
<span style="font-family: "georgia" , "times new roman" , serif;"><br /></span>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvCf3mHnbQNSwcH2x9t-9ugJIqklLEqhL8cO9yrMB_LxLc-nq9foJ9VwlUqoDbjpGSbR6zZ1ikmcU0dQJeE1PCME8fOyiIwHEgXQiKXJcm8hvfcNcdX75bM80hQOcdHCiaOyfF8p4knPwh/s1600/DSC04472.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><span style="font-family: "georgia" , "times new roman" , serif;"><img border="0" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvCf3mHnbQNSwcH2x9t-9ugJIqklLEqhL8cO9yrMB_LxLc-nq9foJ9VwlUqoDbjpGSbR6zZ1ikmcU0dQJeE1PCME8fOyiIwHEgXQiKXJcm8hvfcNcdX75bM80hQOcdHCiaOyfF8p4knPwh/s1600/DSC04472.JPG" width="200" /></span></a><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><span style="font-family: "georgia" , "times new roman" , serif; font-size: small;"> On
13th November 2014</span></span><br />
<div style="text-align: left;">
</div>
<div style="font-weight: normal; line-height: 100%; margin-bottom: 0cm; text-align: left;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><span style="font-family: "georgia" , "times new roman" , serif; font-size: small;">By
8:30 am we reached ashram to pick Nirupama Ma’am. She was all set.
We hired an auto to Thazhava higher secondary school. By 9:45 we
reached the school. We could see many innocent faces looking at us
amazingly. Something that took me to my past was the sight of
teachers caning the students for silly reasons. It took sometime for
us to get back from our childhood days. We spoke to the principal and
we had to wait till 10:30 to start our session.</span></span></div>
<div style="text-align: left;">
</div>
<div style="font-weight: normal; line-height: 100%; margin-bottom: 0cm; text-align: left;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><span style="font-family: "georgia" , "times new roman" , serif; font-size: small;">By
10:30 am, IXth standard students lined up and came to the library.
Library was the spot allotted to us to conduct our session. All were
very enthusiastic to know what is going to happen. We introduced
ourselves and Nirupama Ma’am to them. It started with a warm up.
She taught the basic methods of defending, when they are attacked
from behind, front and various other directions. We ourself became
trainers to them repeating what she does. It lasted for two
hours.They were very eager to learn more. We had a great satisfaction
when we saw their interest. They really didn’t want to leave
Nirupama Ma’am. They hugged and kissed her. The session got over by
12:30 pm. Then it was time for lunch. School authorities had arranged
lunch for us. After lunch, Nirupama Ma'am returned to ashram.</span></span></div>
<div style="text-align: left;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "georgia" , "times new roman" , serif; font-size: small;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8RKKaQ5LMKyzSfCJ5vG-AmosMoC9bNE5KoW70QNahq2TkK-qCJW4fPbnxnMqZqgcdxoOINKPY-wsKXGIRmkMglM3VCG_Lh3v4Vles4klYaBbd2UswYNzHA7ruUZLJHDTojPIf1Ay09G4z/s1600/DSC04561.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8RKKaQ5LMKyzSfCJ5vG-AmosMoC9bNE5KoW70QNahq2TkK-qCJW4fPbnxnMqZqgcdxoOINKPY-wsKXGIRmkMglM3VCG_Lh3v4Vles4klYaBbd2UswYNzHA7ruUZLJHDTojPIf1Ay09G4z/s1600/DSC04561.JPG" width="320" /></a></span></div>
<div style="font-weight: normal; line-height: 100%; margin-bottom: 0cm; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHOvCpxTYHhp4W9gGIygnECpnYHf2jnNEfnuR_8Ri30ioAolH_VGI9-yHVk8vL-LrYLoJP1pBEHidz30cuWLqkxqpEYYOfd6kMzDJxx5_xL6hAiGpzx5JKcvco7jEFs35AqY-9HpokqP0X/s1600/DSC04636.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><span style="font-family: "georgia" , "times new roman" , serif;"><img border="0" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHOvCpxTYHhp4W9gGIygnECpnYHf2jnNEfnuR_8Ri30ioAolH_VGI9-yHVk8vL-LrYLoJP1pBEHidz30cuWLqkxqpEYYOfd6kMzDJxx5_xL6hAiGpzx5JKcvco7jEFs35AqY-9HpokqP0X/s1600/DSC04636.JPG" width="200" /></span></a><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><span style="font-family: "georgia" , "times new roman" , serif; font-size: small;"> </span></span><br />
<span style="font-family: "georgia" , "times new roman" , serif;"><br /></span>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><span style="font-family: "georgia" , "times new roman" , serif; font-size: small;">Then
we had Organic farming where we took a session for Viith and VIIIth
standard students. We were amazed to see their interest. More than
us, they shared the knowledge and experieces. We talked about
chemical pesticides and the future of mankind if we continue using
chemicals in food. We also discussed about why Organic farming is
important. We then distributed organic seeds, saplings and compost
which we collected from ashram to the students. They promised that
they will surely take care of the plants.</span></span></div>
<div style="text-align: left;">
</div>
<div style="font-weight: normal; line-height: 100%; margin-bottom: 0cm; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgv0ErPoE-2KyFtNhmJd1G9X4Ca4OISVCy6pHl4aBMQlTBrH7PAn0_tMojXxYinb_sxnPleb7DiKt6_5ZzgSE5AJqIN-VnN-HVCNY3zaJLn3R4eirCfGxX60eiaJRo2kODJOnZeTPWWjB9M/s1600/DSC04626.JPG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><span style="font-family: "georgia" , "times new roman" , serif;"><img border="0" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgv0ErPoE-2KyFtNhmJd1G9X4Ca4OISVCy6pHl4aBMQlTBrH7PAn0_tMojXxYinb_sxnPleb7DiKt6_5ZzgSE5AJqIN-VnN-HVCNY3zaJLn3R4eirCfGxX60eiaJRo2kODJOnZeTPWWjB9M/s1600/DSC04626.JPG" width="200" /></span></a><span style="font-family: "georgia" , "times new roman" , serif;"><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><span style="font-family: Georgia, Times New Roman, serif; font-size: small;"> The
next agenda was Computer Skills for IXth standard students. Due to
time limit, we had to stop it in one hour. We taught them basic Linux
commands and how to use Linux and its features. We also talked about
Cyber crimes and security. </span></span>
</span></div>
<div style="text-align: left;">
</div>
<div style="font-weight: normal; line-height: 100%; margin-bottom: 0cm; text-align: left;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><span style="font-family: "georgia" , "times new roman" , serif; font-size: small;"> And,
thus our project came to an end. We had a great time with students.
Thanks for the students who corporated with us. We understood that
they enjoyed it a lot and they need more programs from us. We got a
very good feedback from the students and teachers. More than a
project, it was an awesome learning experience.</span></span></div>
<div style="text-align: left;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY8rl-xotKxjGKgNOFyxPW8VoIDNMS0fWtcPxgEFoZ6yNijBnuyO5yjhxGloqG3T7Ol_aUSJml-DlPaELbzIG4FfMfghsuPTiOdD_kgTy-eTNSLIv2WW6-7NQkfJN0M8Wk8lu8RDmzZsYn/s1600/DSC02993.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><span style="font-family: "georgia" , "times new roman" , serif;"><img border="0" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY8rl-xotKxjGKgNOFyxPW8VoIDNMS0fWtcPxgEFoZ6yNijBnuyO5yjhxGloqG3T7Ol_aUSJml-DlPaELbzIG4FfMfghsuPTiOdD_kgTy-eTNSLIv2WW6-7NQkfJN0M8Wk8lu8RDmzZsYn/s1600/DSC02993.JPG" width="200" /></span></a></div>
<div style="font-weight: normal; line-height: 100%; margin-bottom: 0cm; text-align: left;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><span style="font-family: "georgia" , "times new roman" , serif; font-size: small;">A
great thanks to our college CIR(Corporate and Industrial Relations)
and the faculty members for giving us a Social Responsibility project
to learn from experiences. Though we had hurdles in the beginning,
everything went well with god's grace. Now, when we think of the
difficulties we had, its a great joy to cherish. Once again I would
like to quote “Experience is the best teacher”.</span></span></div>
<div style="text-align: left;">
</div>
<div style="font-weight: normal; line-height: 100%; margin-bottom: 0cm; text-align: left;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><span style="font-size: small;">
</span></span></div>
</div>
Amrutha Shttp://www.blogger.com/profile/02981710049877674926noreply@blogger.com0India11.178401873711785 76.11328125-4.2411491262882155 55.45898425 26.597952873711783 96.76757825tag:blogger.com,1999:blog-1317507688703818110.post-47108292292759564882014-11-21T20:47:00.000-08:002016-05-06T12:44:05.481-07:00GNU General Public License<div dir="ltr" style="text-align: left;" trbidi="on">
<style type="text/css">p { margin-bottom: 0.25cm; line-height: 120%; }a:link { }</style>
<br />
<div align="left" style="line-height: 100%; margin-bottom: 0cm;">
<span style="font-size: small;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhho7V-C_IWq2Cg1SzFna0uVdQyoRjXeRrdSpFNtJcjogfWBQjNv8xH1IJo0wykvdF_0nebCm2j0CtpkXaPLG83kpy1CmGV7EHY32DMfZRnjwG3x8Op6fzf9fUMQaCCfvHBcX2FgeIizyyL/s1600/gpl.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="99" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhho7V-C_IWq2Cg1SzFna0uVdQyoRjXeRrdSpFNtJcjogfWBQjNv8xH1IJo0wykvdF_0nebCm2j0CtpkXaPLG83kpy1CmGV7EHY32DMfZRnjwG3x8Op6fzf9fUMQaCCfvHBcX2FgeIizyyL/s1600/gpl.png" width="200" /></a><span style="font-family: Century Schoolbook L, serif;"><span style="text-decoration: none;"><span style="font-family: century schoolbook l, serif;"> </span><span style="font-family: Georgia, Times New Roman, serif;"> GNU
General Public License is the widely used license for free software
which ensures the users the right to study, copy, alter and share the
softwares. Softwares that </span></span><span style="font-family: Georgia, Times New Roman, serif;"><span style="text-decoration: none;">acquires
these rights are called Free software. This License is first </span><span style="text-decoration: none;">released</span><span style="text-decoration: none;">
by Richard Stallman of the Free Software Foundation</span><span style="text-decoration: none;">(FSF)</span><span style="text-decoration: none;">
for GNU Project </span><span style="text-decoration: none;">in 1989</span><span style="text-decoration: none;">.
This license is based on the copyleft principle. i.e, the chain of
users involved should distribute their work or modifications that
he/she has done to the software under the same license. It is the
first copyleft license for general use. </span></span></span></span><span style="font-family: Georgia, Times New Roman, serif;">
</span></div>
<div align="left" style="line-height: 100%; margin-bottom: 0cm;">
<span style="font-family: Georgia, Times New Roman, serif; font-size: small;"><span style="text-decoration: none;"> T</span><span style="color: #252525;"><span style="text-decoration: none;">he
GPL accounted for nearly 65% of the 43,442 </span></span><span style="color: #252525;"><span style="text-decoration: none;">free
softwares</span></span><span style="color: #0b0080;"><span style="text-decoration: none;">
</span></span><span style="color: #252525;"><span style="text-decoration: none;">projects
listed o</span></span><span style="color: #252525;"><span style="text-decoration: none;">n
Freecode as of August 2007</span></span><span style="color: #0b0080;"><sup><span style="text-decoration: none;">
</span></sup></span><span style="color: #252525;"><span style="text-decoration: none;">and
about 68% of the projects listed on</span></span><span style="color: #252525;"><span style="text-decoration: none;">
SourceForge.net </span></span><span style="color: #252525;"><span style="text-decoration: none;">by
January 2006</span></span><span style="color: #252525;"><span style="text-decoration: none;">.
Most widely used free software that are licensed under GPL includes
Linux Kernel and GNU Compiler Collection(GCC). There</span></span><span style="color: #252525;"><span style="text-decoration: none;">
are also som</span></span><span style="color: #252525;"><span style="text-decoration: none;">e</span></span><span style="color: #252525;"><span style="text-decoration: none;">
dual licensed </span></span><span style="color: #252525;"><span style="text-decoration: none;">free
</span></span><span style="color: #252525;"><span style="text-decoration: none;">softwares
like MySQL in</span></span><span style="color: #252525;"><span style="text-decoration: none;">
</span></span><span style="color: #252525;"><span style="text-decoration: none;">which
one being the GPL.</span></span></span></div>
<div align="left" style="line-height: 100%; margin-bottom: 0cm;">
<span style="font-family: Georgia, Times New Roman, serif; font-size: small;"><span style="color: #252525;"><span style="text-decoration: none;"> </span></span><span style="color: #252525;"><span style="text-decoration: none;">On
29 June 2007, the third new version of the license(GNU GPLv3) was
releas</span></span><span style="color: #252525;"><span style="text-decoration: none;">e</span></span><span style="color: #252525;"><span style="text-decoration: none;">d
to solve the issues that GNU GPLv</span></span><span style="color: #252525;"><span style="text-decoration: none;">2</span></span><span style="color: #252525;"><span style="text-decoration: none;">
had. </span></span><span style="color: #252525;"><span style="text-decoration: none;">To
keep the GPL updated, developers has the option to choose “any
later version” clause. This is to choose between the original terms
or terms imposed by the new version </span></span><span style="color: #252525;"><span style="text-decoration: none;">imposed
by FSF. For</span></span><span style="color: #252525;"><span style="text-decoration: none;">
example Linux Kernel is under GPLv2 without “any later version”
clause.</span></span></span></div>
<div align="left" style="line-height: 100%; margin-bottom: 0cm;">
<span style="font-family: Georgia, Times New Roman, serif; font-size: small;"><span style="color: #252525;"><span style="text-decoration: none;"> </span></span><span style="color: #252525;"><span style="text-decoration: none;">Now
let's see the different versions of the GPL</span></span></span></div>
<div align="left" style="line-height: 100%; margin-bottom: 0cm; text-decoration: none;">
<span style="color: #252525; font-size: small;"><span style="font-family: Georgia, Times New Roman, serif;"><b>Version
1</b></span></span></div>
<div align="left" style="line-height: 100%; margin-bottom: 0cm;">
<span style="font-family: Georgia, Times New Roman, serif; font-size: small;"><span style="color: #252525;"><span style="text-decoration: none;"> The
first version of GPL was released on 25</span></span><span style="color: #252525;"><sup><span style="text-decoration: none;">th</span></sup></span><span style="color: #252525;"><span style="text-decoration: none;">
February 1989. It was mainly published to prevent the restrictions
that violated the definition of the Free software. </span></span><span style="color: #252525;"><span style="text-decoration: none;">The
first problem that GPL solved is that, the distributors were asked to
produce the human readable form of the source code along with the
binaries under the same licensing conditions.</span></span></span></div>
<div align="left" style="line-height: 100%; margin-bottom: 0cm;">
<span style="font-family: Georgia, Times New Roman, serif; font-size: small;"><span style="color: #252525;"><span style="text-decoration: none;"> </span></span><span style="color: #252525;"><span style="text-decoration: none;">The
second problem was that vendors imposed additional re</span></span><span style="color: #252525;"><span style="text-decoration: none;">strictions
</span></span><span style="color: #252525;"><span style="text-decoration: none;">to
the license </span></span><span style="color: #252525;"><span style="text-decoration: none;">and
combined softwares with other which had other restriction on its
distribution. To avoid this GPLv1 said that altered or modified
software as a whole has to be distributed under same conditions.</span></span></span></div>
<div align="left" style="line-height: 100%; margin-bottom: 0cm;">
<span style="font-family: Georgia, Times New Roman, serif;"><span style="font-family: Century Schoolbook L, serif; font-size: small;"><span style="color: #252525;"><span style="text-decoration: none;"><b>Version
2</b></span></span><span style="color: #252525;"><span style="text-decoration: none;">
</span></span></span>
</span></div>
<div align="left" style="line-height: 100%; margin-bottom: 0cm;">
<span style="font-family: Georgia, Times New Roman, serif; font-size: small;"><span style="color: #252525;"><span style="text-decoration: none;"> </span></span><span style="color: #252525;"><span style="text-decoration: none;">According
to Stallman, the prominent change in GPLv2 was “Liberty or Death”.
</span></span><span style="color: #252525;"><span style="text-decoration: none;">It
states that, restrictions that prevent</span></span><span style="color: #252525;"><i><span style="text-decoration: none;">
</span></i></span><span style="color: #252525;"><span style="text-decoration: none;">him
or her from distributing GPL licensed software in a way that respects
other users' freedom, he or she cannot distribute it at all.</span></span></span></div>
<div align="left" style="line-height: 100%; margin-bottom: 0cm;">
<span style="font-family: Georgia, Times New Roman, serif; font-size: small;"><b><span style="color: #252525;"><span style="text-decoration: none;">V</span></span><span style="color: #252525;"><span style="text-decoration: none;">ersion
3</span></span></b></span></div>
<div align="left" style="font-weight: normal; line-height: 100%; margin-bottom: 0cm;">
<span style="font-family: Georgia, Times New Roman, serif; font-size: small;"> <span style="font-family: Century Schoolbook L, serif;"><span style="color: #252525;"><span style="text-decoration: none;">GPLv3 was released on 29</span></span><span style="color: #252525;"><sup><span style="text-decoration: none;">th</span></sup></span><span style="color: #252525;"><span style="text-decoration: none;">
June 2009 by Richard Stallman </span></span><span style="color: #252525;"><span style="text-decoration: none;">with
legal counsel from Eben Moglen and the Software Freedom Law Center.</span></span></span></span></div>
<div align="left" style="font-weight: normal; line-height: 100%; margin-bottom: 0cm;">
<span style="font-family: Georgia, Times New Roman, serif; font-size: small;"><span style="color: #252525;"><span style="text-decoration: none;"> </span></span><span style="color: #252525;"><span style="text-decoration: none;">The
major changes in GPLv3 are in relation to free software, software
patents, “source code” definition and hardware restrictions </span></span><span style="color: #252525;"><span style="text-decoration: none;">on
software modification</span></span><span style="color: #252525;"><span style="text-decoration: none;">.
</span></span><span style="color: #252525;"><span style="text-decoration: none;">GPLv3
</span></span><span style="color: #252525;"><span style="text-decoration: none;">improves
compatibility with several open source software licenses such as
Apache License, version 2.0.</span></span></span></div>
<div align="left" style="font-weight: normal; line-height: 100%; margin-bottom: 0cm;">
<span style="font-family: Georgia, Times New Roman, serif; font-size: small;"><span style="color: #252525;"><span style="text-decoration: none;"> </span></span><span style="color: #252525;"><span style="text-decoration: none;">It
was a long journey when they finally published the third version
GPLv3 on 29</span></span><span style="color: #252525;"><sup><span style="text-decoration: none;">th</span></sup></span><span style="color: #252525;"><span style="text-decoration: none;">
June 2009.</span></span></span></div>
</div>
Amrutha Shttp://www.blogger.com/profile/02981710049877674926noreply@blogger.com0India11.523087506868512 77.34375-18.779915993131489 36.035156 41.826091006868509 118.652344tag:blogger.com,1999:blog-1317507688703818110.post-81284037479636606042014-09-25T08:30:00.002-07:002016-05-06T12:46:03.874-07:00Critical Section<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Georgia, Times New Roman, serif;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">In concurrent programming, Critical section is a set of statements that should be run exclusively . When multiple processes that shares same data are run simultaneously there are chances for the data to be inconsistent. So an operating system is designed in such a way that only one of the processes among them is allowed to access the shared data at a time. A critical section terminates in a fixed time, so a process or task must wait for that fixed time to enter its critical section.</span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Georgia, Times New Roman, serif;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Critical section is used when multi threaded programming need to manipulate a shared data without creating further threads conflicting the data. It also ensures that a shared device is accessed only by a single process at a time.</span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Georgia, Times New Roman, serif;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">In single processor systems critical section can be implemented by disabling interrupts while entering the critical section, prevent system calls causing context switches while inside the critical section and restoring the interrupts while exit. With this implementation, any thread entering critical section any where in the system will prevent other thread trying to execute its critical section. Thus CPU can’t be accessed by any other process until the running process exits the CPU.</span></span></div>
<span id="docs-internal-guid-872fccc5-ad6e-dd94-4329-d29d0a6b367f"><span style="font-family: Georgia, Times New Roman, serif; vertical-align: baseline; white-space: pre-wrap;"> So far there are many algorithms that came up with solving the issues regarding the execution of critical section. The solutions for critical section is a wide area to discuss...</span></span></div>
Amrutha Shttp://www.blogger.com/profile/02981710049877674926noreply@blogger.com0tag:blogger.com,1999:blog-1317507688703818110.post-69924804908523841562014-08-12T10:09:00.000-07:002014-08-12T10:11:25.336-07:00top and htop commands in Linux<div dir="ltr" style="text-align: left;" trbidi="on">
Linux provides utilities called top and htop to monitor the real time processes. They displays the dynamic real-time view of the running system. But, both the command are quite different in action.<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Top command displays the Linux processes. It can display system summary information and processes or threads currently managed by the kernel. When we type top in terminal we get the currently running process as shown in Fig 1.<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEasHC6sJGc-mzQdaXaFqXE5ESL49e3KOQnbDpfALCD91OhW9cNWHCLvmk6fCJm1xui2G6WkCeV0lGERssceV-ZEqkO_cWFrjjklPMx6I5KHMUc8ZYGdgybaZwFCwrWeeTJKr-P8CqydAN/s1600/top.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEasHC6sJGc-mzQdaXaFqXE5ESL49e3KOQnbDpfALCD91OhW9cNWHCLvmk6fCJm1xui2G6WkCeV0lGERssceV-ZEqkO_cWFrjjklPMx6I5KHMUc8ZYGdgybaZwFCwrWeeTJKr-P8CqydAN/s1600/top.png" height="489" width="640" /></a></div>
Fig 1:top displaying running processes<br />
<br />
Even though htop is quite similar to top there are some extra features that makes htop better command utility than top. The htop utility is not already built in Linux, it should be downloaded and installed. Once it is installed it can be run through command line by just typing 'htop' (We can install it by just typing sudo apt-get install htop)<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>The Fig 2 shows the htop window look like,<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZbrfP9MYNhXDaaSSl349gIjhaupr37_jtMuhqZoNcRKQmlb_lVWClkr2pFqbcJuSks2kEKcd74okwuSEXU08zx959Cb-tgFRSRV_oUFXlZB8RPGMTeav1OvxhejrTWXAvtScThYFxsJcn/s1600/htop.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZbrfP9MYNhXDaaSSl349gIjhaupr37_jtMuhqZoNcRKQmlb_lVWClkr2pFqbcJuSks2kEKcd74okwuSEXU08zx959Cb-tgFRSRV_oUFXlZB8RPGMTeav1OvxhejrTWXAvtScThYFxsJcn/s1600/htop.png" height="337" width="640" /></a></div>
Fig 2 :htop window<br />
<br />
<br />
Now let's see what htop displays,<br />
<br />
The top left corner:<br />
The numbers 1,2,3 and 4 represents the number of cores in the system. The bars next to these numbers shows the loads on the cores. The colour difference in the bars represent different information. Below that lies memory and swap information.<br />
<br />
The top right corner:<br />
Here information related to loads, threads, load average and up time are displayed. Load average is the amount of work that system does. Here in my system load average is 0.34 which means very less load on CPU. If it goes up to 2 it means that system is making use of CPU 100%.<br />
<br />
Process related information:<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>The information about each process is divided into columns. The explanation of each column is as follows:<br />
<br />
<br />
PID: Process ID of a process<br />
USER: User owning the process<br />
PR: Priority of the process.<br />
NI: The nice value for a process.<br />
VIRT: Virtual memory consumption.<br />
RES: Physical RAM consumption in kilobytes.<br />
SHR: Shared memory consumption.<br />
S: Process status (sleeping, running etc).<br />
CPU%: CPU consumption<br />
MEM%: Physical RAM consumption.<br />
TIME+: Processor time used by the process.<br />
COMMAND: Command that started the process.<br />
<br />
Htop provides many features to customize it according to user's taste. At the bottom of the htop window we can see F-keys and its function written next to them.<br />
<br /></div>
Amrutha Shttp://www.blogger.com/profile/02981710049877674926noreply@blogger.com0tag:blogger.com,1999:blog-1317507688703818110.post-51892076718723583692014-08-02T08:12:00.001-07:002016-05-06T12:24:49.079-07:00Installing MariaDB<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<div style="text-align: left;">
<span style="background-color: white; color: black; font-family: Georgia, Times New Roman, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">You can know what is MariaDB from my previous blog <a href="http://amruthasangeeth.blogspot.in/2014/06/mariadb_17.html">http://amruthasangeeth.blogspot.in/2014/06/mariadb_17.html</a></span></div>
<div style="text-align: left;">
<span style="font-family: Georgia, Times New Roman, serif;"><br /></span></div>
<div style="text-align: left;">
<span style="font-family: Georgia, Times New Roman, serif;"><br /></span></div>
</div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<div style="text-align: left;">
<span style="background-color: white; color: black; font-family: Georgia, Times New Roman, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">Now let’s see the installation of MariaDB</span></div>
</div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: black; font-family: Georgia, Times New Roman, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline;">Step 1</span><br />
<span style="background-color: white; font-family: Georgia, Times New Roman, serif; font-size: 16px; line-height: 1.15;">First make sure that required packages are installed and add apt-get key for Mariadb repository using following command</span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Georgia, Times New Roman, serif;"><span style="background-color: white; color: #a61c00; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">$ sudo apt-get install software-properties-common</span><span style="background-color: white; color: #a61c00; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"><br class="kix-line-break" /></span><span style="background-color: white; color: #a61c00; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">$ sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db</span></span></div>
<span style="font-family: Georgia, Times New Roman, serif;"><br /></span>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: black; font-family: Georgia, Times New Roman, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline;">Add apt-get repository as per your Ubuntu version</span><br />
<span style="background-color: white; font-family: Georgia, Times New Roman, serif; font-size: 16px; font-style: italic; line-height: 1.15;">For Ubuntu 13.10</span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: #a61c00; font-family: Georgia, Times New Roman, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">$ sudo add-apt-repository 'deb http://ftp.kaist.ac.kr/mariadb/repo/5.5/ubuntu saucy main'</span></div>
<span style="background-color: white; font-family: Georgia, Times New Roman, serif; font-size: 16px; font-style: italic; line-height: 1.15; text-align: justify;">For Ubuntu 13.04</span><br />
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Georgia, Times New Roman, serif;"><span style="background-color: white; color: #a61c00; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">$ sudo add-apt-repository 'deb http://ftp.kaist.ac.kr/mariadb/repo/5.5/ubuntu raring main'</span><span style="background-color: white; color: black; font-size: 16px; font-style: italic; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"><br class="kix-line-break" /></span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: black; font-family: Georgia, Times New Roman, serif; font-size: 16px; font-style: italic; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">For Ubuntu 12.10</span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Georgia, Times New Roman, serif;"><span style="background-color: white; color: #a61c00; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">$ sudo add-apt-repository 'deb http://ftp.kaist.ac.kr/mariadb/repo/5.5/ubuntu quantal main'</span><span style="background-color: white; color: #a61c00; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"><br class="kix-line-break" /></span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: black; font-family: Georgia, Times New Roman, serif; font-size: 16px; font-style: italic; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">For Ubuntu 12.04 LTS</span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: #a61c00; font-family: Georgia, Times New Roman, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">$ sudo add-apt-repository 'deb http://ftp.kaist.ac.kr/mariadb/repo/5.5/ubuntu precise main'</span></div>
<span style="font-family: Georgia, Times New Roman, serif;"><br /></span>
<span style="font-family: Georgia, Times New Roman, serif;"><br /></span>
<span style="font-family: Georgia, Times New Roman, serif;"><br /></span>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: black; font-family: Georgia, Times New Roman, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline;">Step 2</span><br />
<span style="background-color: white; font-family: Georgia, Times New Roman, serif; font-size: 16px; line-height: 1.15;">Install MariaDB using the following commands</span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Georgia, Times New Roman, serif;"><span style="background-color: white; color: #a61c00; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">$ sudo apt-get update</span><span style="background-color: white; color: #a61c00; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"><br class="kix-line-break" /></span><span style="background-color: white; color: #a61c00; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">$ sudo apt-get install mariadb-server</span></span></div>
<span style="font-family: Georgia, Times New Roman, serif;"><br /></span>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: black; font-family: Georgia, Times New Roman, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">Provide the root account password as given below</span></div>
<span style="font-family: Georgia, Times New Roman, serif;"><br /></span>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: black; font-family: Georgia, Times New Roman, serif; font-size: 16px; font-style: italic; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"><img height="288px;" src="https://lh5.googleusercontent.com/q5D-zmYvuWg3lS5M6bBW33cTSatVVHUDnIAj2c3tjcX_CLzFLYhVd_l3Hn6TQspaohS6xM5QVYSF2MR7w2-vKdT0-St3auwnbvc319hLsajTyH2rljWwGLcXCWG7KIy9uw" style="-webkit-transform: rotate(0.00rad); border: none; transform: rotate(0.00rad);" width="567px;" /></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Georgia, Times New Roman, serif;"><span style="background-color: white; color: #a61c00; font-size: 16px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline;"> </span><span style="background-color: white; color: #a61c00; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"><br class="kix-line-break" /></span><span style="background-color: white; color: black; font-size: 16px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline;">Step 3</span></span><br />
<span style="background-color: white; font-family: Georgia, Times New Roman, serif; font-size: 16px; line-height: 1.15;">Login to MariaDB using the following command after installation</span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: #a61c00; font-family: Georgia, Times New Roman, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"> mysql -u root -p</span><br />
<span style="background-color: white; color: #a61c00; font-family: Georgia, Times New Roman, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"><br /></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: black; font-family: Georgia, Times New Roman, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"><img height="243px;" src="https://lh4.googleusercontent.com/u3DxxjPlT770U4y7U5d0u8x1IeZnQDfuY90ltlHIiwtINnu9fkgZFqtSbqv-bV99bGUEja_Kd15VUms-Q8K9FJj39QtKHl5DOvRv1PyzqiXzAkSMpRieuB_GepPw6ZtUBw" style="-webkit-transform: rotate(0.00rad); border: none; transform: rotate(0.00rad);" width="660px;" /></span></div>
<span style="font-family: Georgia, Times New Roman, serif;"><br /></span>
<span style="font-family: Georgia, Times New Roman, serif;"><br /></span>
<span style="font-family: Georgia, Times New Roman, serif;"><br /></span>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-right: -72pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: black; font-family: Georgia, Times New Roman, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline;">Creating a database in MariaDB</span><br />
<span style="background-color: white; font-family: Georgia, Times New Roman, serif; font-size: 16px; line-height: 1.15;">Entering the account administrator password set up during installation you will be given a MariaDB prompt.</span></div>
<span style="font-family: Georgia, Times New Roman, serif;"><br /></span>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-right: -72pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: black; font-family: Georgia, Times New Roman, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">We will create a database to learn on called students using the following command</span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-right: -72pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: #a61c00; font-family: Georgia, Times New Roman, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">CREATE DATABASE students;</span></div>
<span style="background-color: white; font-family: Georgia, Times New Roman, serif; font-size: 16px; line-height: 1.15; text-align: justify;">We will switch to the new database</span><br />
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-right: -72pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: #a61c00; font-family: Georgia, Times New Roman, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">USE students;</span></div>
<span style="background-color: white; font-family: Georgia, Times New Roman, serif; font-size: 16px; line-height: 1.15; text-align: justify;">Now the database is created and we can create a table.</span><br />
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-right: -72pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: #a61c00; font-family: Georgia, Times New Roman, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">CREATE TABLE details(student_id int(5) NOT NULL AUTO_INCREMENT,</span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-right: -72pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: #a61c00; font-family: Georgia, Times New Roman, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"> name varchar(20) DEFAULT NULL,</span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-right: -72pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: #a61c00; font-family: Georgia, Times New Roman, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"> age int(3) DEFAULT NULL,</span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-right: -72pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: #a61c00; font-family: Georgia, Times New Roman, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"> marks int(5) DEFAULT NULL,</span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-right: -72pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: #a61c00; font-family: Georgia, Times New Roman, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"> PRIMARY KEY(student_i)d</span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-right: -72pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: #a61c00; font-family: Georgia, Times New Roman, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"> );</span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-right: -72pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: black; font-family: Georgia, Times New Roman, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">To accomplish what we have done, use the following command,</span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-right: -72pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: #a61c00; font-family: Georgia, Times New Roman, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"> show columns in details;</span><br />
<span style="background-color: white; color: #a61c00; font-family: Georgia, Times New Roman, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"><br /></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-right: -72pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: #a61c00; font-family: Georgia, Times New Roman, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"><img height="150px;" src="https://lh5.googleusercontent.com/Jlp6DPevariDWHP_3Fy_PYJHVTYn7ua-vxs_JTlQZT8M8Dac1jfIT-DxEsh2wk_eNOplPuKe6l8SQeRuFoIxnl4R_FpVwTzbA9XQ4VLkL7L1iy5K8Lv7TyQ-E0hcj2NqAw" style="-webkit-transform: rotate(0.00rad); border: none; transform: rotate(0.00rad);" width="628px;" /></span></div>
<span style="font-family: Georgia, Times New Roman, serif;"><br /></span>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-right: -72pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: black; font-family: Georgia, Times New Roman, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">Each column in table creation command is separated by comma and follows this fashion,</span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-right: -72pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: #a61c00; font-family: Georgia, Times New Roman, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">Column_Name Data_Type[(size_of_data)] [NULL or NOT NULL] [DEFAULT default_value]</span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-right: -72pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: #a61c00; font-family: Georgia, Times New Roman, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"> [AUTO_INCREMENT]</span></div>
<span style="font-family: Georgia, Times New Roman, serif;"><br /></span>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-right: -72pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: black; font-family: Georgia, Times New Roman, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">The values of each column definition are,</span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-right: -72pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Georgia, Times New Roman, serif;"><span style="background-color: white; color: black; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">* </span><span style="background-color: white; color: black; font-size: 16px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline;">Column Name</span><span style="background-color: white; color: black; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">: Describes the attribute being assigned.</span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-right: -72pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Georgia, Times New Roman, serif;"><span style="background-color: white; color: black; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">* </span><span style="background-color: white; color: black; font-size: 16px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline;">Data Type</span><span style="background-color: white; color: black; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">: Specifies the type of data in the column.</span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Georgia, Times New Roman, serif;"><span style="background-color: white; color: black; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">* </span><span style="background-color: white; color: black; font-size: 16px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline;">Null</span><span style="background-color: white; color: black; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">: Defines whether null is a valid value for that field. Can be "null" or "not null".</span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Georgia, Times New Roman, serif;"><span style="background-color: white; color: black; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">* </span><span style="background-color: white; color: black; font-size: 16px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline;">Default Value</span><span style="background-color: white; color: black; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">: Sets the initial value of all newly created records that do not specify a value.</span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Georgia, Times New Roman, serif;"><span style="background-color: white; color: black; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">* </span><span style="background-color: white; color: black; font-size: 16px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline;">auto_increment</span><span style="background-color: white; color: black; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">: MySQL will handle the sequential numbering internally of any column marked with this option, in order to provide a unique value for each record.</span></span></div>
<span style="font-family: Georgia, Times New Roman, serif;"><br /></span>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: black; font-family: Georgia, Times New Roman, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">Ultimately before closing the table definition we need to use primary key by typing PRIMARY KEY(column name).It guarantees that , this column will serve as a unique field.</span></div>
<span style="font-family: Georgia, Times New Roman, serif;"><br /></span>
<span style="background-color: white; color: black; font-family: Georgia, Times New Roman, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline;">Inserting data into MariaDB table</span><br />
<span style="background-color: white; color: #a61c00; font-family: Georgia, Times New Roman, serif; font-size: 16px; line-height: 1.15; text-align: justify;">INSERT INTO details(name,age,marks) values ("anu",15,450);</span><br />
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: #a61c00; font-family: Georgia, Times New Roman, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"><br /></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: #a61c00; font-family: Georgia, Times New Roman, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"><img height="115px;" src="https://lh6.googleusercontent.com/jGR0pw9gAwxR6ZeWSiS0Jvthq-KXIN17JL-Xxvkq04Ov_7WDiQc1mCJSJbK7bSIlIVTy-M8tPPVIurid86GsgGC3ykD8GZJlr5Y520t4Ck-iXwakkac7gQUE9RZnEwEM3Q" style="-webkit-transform: rotate(0.00rad); border: none; transform: rotate(0.00rad);" width="337px;" /></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Georgia, Times New Roman, serif;"><span style="background-color: white; color: #a61c00; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"><br /></span>
<span style="background-color: white; color: #a61c00; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">INSERT INTO details(name,age,marks) VALUES("Bob",15,400);</span></span><br />
<span style="background-color: white; color: #a61c00; font-family: Georgia, Times New Roman, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"><br /></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: #a61c00; font-family: Georgia, Times New Roman, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"><img height="131px;" src="https://lh5.googleusercontent.com/SPrcKWPL5Zh1SSMhLAEQOLEMv79ptGNAQ-7ClWtdKkJwXYjib1cqdGeOiX8qN0BncpTvKTK4g3ZxZsjX6wg5_zYjGYSBXxJERBQVBLfRZZaoZQsiChuYfIVGILQ2okijHA" style="-webkit-transform: rotate(0.00rad); border: none; transform: rotate(0.00rad);" width="337px;" /></span></div>
<span style="font-family: Georgia, Times New Roman, serif;"><br /></span>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Georgia, Times New Roman, serif;"><span style="background-color: white; color: black; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">We need not add values in student_id.It is automatically incremented.All other values are given in quotes</span><span style="background-color: white; color: black; font-size: 16px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline;">.</span></span></div>
<span style="font-family: Georgia, Times New Roman, serif;"><br /></span>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: black; font-family: Georgia, Times New Roman, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline;">Deleting a table</span><br />
<span style="background-color: white; font-family: Georgia, Times New Roman, serif; font-size: 16px; line-height: 1.15;">To delete a table, type the following command</span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: #a61c00; font-family: Georgia, Times New Roman, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">DROP TABLE table_name;</span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: black; font-family: Georgia, Times New Roman, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">Once the table is deleted, the data inside it cannot be recovered.</span></div>
<span style="font-family: Georgia, Times New Roman, serif;"><br /></span>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: black; font-family: Georgia, Times New Roman, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">Now we can view the current table using “show tables” command. This command gives all the tables inside the database. </span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: #a61c00; font-family: Georgia, Times New Roman, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">SHOW tables;</span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: black; font-family: Georgia, Times New Roman, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"><img height="116px;" src="https://lh3.googleusercontent.com/r6XHdmPJaScrvUHynsDBaa6CZjJKeZv4qj7APd8G9m2RIeMuAVsBNU-Pzy-VBnOMBY9RENa1rXplUWxvI7ijLlwvdkBhV9zS2KEABxBn6iEPjM_XbDrXfT3BuzjCvpytqA" style="-webkit-transform: rotate(0.00rad); border: none; transform: rotate(0.00rad);" width="217px;" /></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: black; font-family: Georgia, Times New Roman, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">Then, after deleting the table.</span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: #a61c00; font-family: Georgia, Times New Roman, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">DROP TABLE details;</span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: black; font-family: Georgia, Times New Roman, serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline;">Query OK, 0 rows affected (0.02 sec)</span></div>
<span style="font-family: Georgia, Times New Roman, serif;"><br /></span>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: #a61c00; font-family: Georgia, Times New Roman, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">SHOW tables;</span></div>
<span style="background-color: white; color: #a61c00; font-family: Georgia, Times New Roman, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"><img height="60px;" src="https://lh3.googleusercontent.com/wA4DX3QOvEMO4LcRqYHa9qjNz6GPbp3tIZP-vZT2KbL_z0eO9A5ZkgSHI_5TgIo1m5EkIJqskdSigLZasWQD3EIOyflWNCloIYHSOsfyoVOPPzt1UwAddTYtWpAdRmFx2Q" style="-webkit-transform: rotate(0.00rad); border: none; transform: rotate(0.00rad);" width="308px;" /></span></div>
Amrutha Shttp://www.blogger.com/profile/02981710049877674926noreply@blogger.com0tag:blogger.com,1999:blog-1317507688703818110.post-64356184041675417602014-07-29T00:56:00.002-07:002014-08-12T09:47:10.428-07:00Database Languages<div dir="ltr" style="text-align: left;" trbidi="on">
<style type="text/css">p { margin-bottom: 0.25cm; line-height: 120%; }</style>
<br />
<div style="font-weight: normal; line-height: 100%; margin-bottom: 0cm;">
<span style="font-size: small;">A database system provide Data
Definition Language(DDL) to specify Database schema and Data Manipulation Language(DML) to express Database queries and updates.
They are a part of a single Database language, such as the widely used
SQL language.</span></div>
<span style="font-size: small;">
</span>
<br />
<div style="line-height: 100%; margin-bottom: 0cm;">
<span style="font-size: small;"><br /></span>
</div>
<span style="font-size: small;">
</span>
<br />
<div style="line-height: 100%; margin-bottom: 0cm;">
<span style="font-size: small;"><b>Data Manipulation Language (DML)</b></span></div>
<span style="font-size: small;">
</span>
<br />
<div style="font-weight: normal; line-height: 100%; margin-bottom: 0cm;">
<span style="line-height: 100%;">DML allows users to acces and manipulate data as organized by the appropriate</span></div>
<span style="font-size: small;">
</span>
<br />
<div style="font-weight: normal; line-height: 100%; margin-bottom: 0cm;">
<span style="font-size: small;">data models.The types of
access are,</span></div>
<span style="font-size: small;">
</span>
<br />
<div style="font-weight: normal; line-height: 100%; margin-bottom: 0cm;">
<span style="font-size: small;">* Retrieval of data</span></div>
<span style="font-size: small;">
</span>
<br />
<div style="font-weight: normal; line-height: 100%; margin-bottom: 0cm;">
<span style="font-size: small;">* Insertion of data</span></div>
<span style="font-size: small;">
</span>
<br />
<div style="font-weight: normal; line-height: 100%; margin-bottom: 0cm;">
<span style="font-size: small;">* Deletion of data</span></div>
<span style="font-size: small;">
</span>
<br />
<div style="font-weight: normal; line-height: 100%; margin-bottom: 0cm;">
<span style="font-size: small;">* Modification of data</span></div>
<span style="font-size: small;">
</span>
<br />
<div style="font-weight: normal; line-height: 100%; margin-bottom: 0cm;">
<span style="font-size: small;"><br /></span>
</div>
<span style="font-size: small;">
</span>
<br />
<div style="font-weight: normal; line-height: 100%; margin-bottom: 0cm;">
<span style="font-size: small;">Basically there are two types
of DMLs,</span></div>
<span style="font-size: small;">
</span>
<br />
<div style="font-weight: normal; line-height: 100%; margin-bottom: 0cm;">
<span style="font-size: small;">1) Procedural DML</span></div>
<span style="font-size: small;">
</span>
<br />
<div style="font-weight: normal; line-height: 100%; margin-bottom: 0cm;">
<span style="font-size: small;"> Here user need to specify
what data and how to access that data</span></div>
<span style="font-size: small;">
</span>
<br />
<div style="font-weight: normal; line-height: 100%; margin-bottom: 0cm;">
<span style="font-size: small;">2) Declarative DML (Non
procedural DML)</span></div>
<span style="font-size: small;">
</span>
<br />
<div style="font-weight: normal; line-height: 100%; margin-bottom: 0cm;">
<span style="font-size: small;"> Here user need to specify
what the data is and the DML will find an effective way to access
those data</span></div>
<span style="font-size: small;">
</span>
<br />
<div style="font-weight: normal; line-height: 100%; margin-bottom: 0cm;">
<span style="font-size: small;"><br /></span>
</div>
<span style="font-size: small;">
</span>
<br />
<div style="font-weight: normal; line-height: 100%; margin-bottom: 0cm;">
<span style="font-size: small;">Therefore users mostly prefer
Declarative DMLs since it is easier to learn and it can efficiently
carry out data access.</span></div>
<span style="font-size: small;">
</span>
<br />
<div style="line-height: 100%; margin-bottom: 0cm;">
<span style="font-size: small;"><br /></span>
</div>
<span style="font-size: small;">
</span>
<br />
<div style="line-height: 100%; margin-bottom: 0cm; text-decoration: none;">
<span style="font-size: small;"><b>Data Definition Language
(DDL)</b></span></div>
<span style="font-size: small;">
</span>
<br />
<div style="font-weight: normal; line-height: 100%; margin-bottom: 0cm; text-decoration: none;">
<span style="line-height: 100%;">We specify database schema by
a set of definitions and additional properties of data using DDL. We
specify the storage structure and access methods used by Database
system by a set of statements in a special type of DDL called data
storage and definition language.</span></div>
<span style="font-size: small;">
</span>
<br />
<div style="font-weight: normal; line-height: 100%; margin-bottom: 0cm; text-decoration: none;">
<span style="font-size: small;"> The DDL provides facilities
to specify certain consistency constraints. Database system implement
integrity constraints that can be tested with minimal overhead.</span></div>
<span style="font-size: small;">
</span>
<br />
<div style="font-weight: normal; line-height: 100%; margin-bottom: 0cm; text-decoration: none;">
<span style="font-size: small;"><br /></span>
</div>
<span style="font-size: small;">
</span>
<br />
<div style="font-weight: normal; line-height: 100%; margin-bottom: 0cm; text-decoration: none;">
<span style="font-size: small;">*<b> </b><b>Domain Constraints</b></span></div>
<span style="font-size: small;">
</span>
<br />
<div style="font-weight: normal; line-height: 100%; margin-bottom: 0cm; text-decoration: none;">
<span style="font-size: small;">Declaring an attribute like
int, char as a specific domain acts as constraints on the values it
can take. They are checked whenever new data items are entered.</span></div>
<span style="font-size: small;">
</span>
<br />
<div style="font-weight: normal; line-height: 100%; margin-bottom: 0cm; text-decoration: none;">
<span style="font-size: small;"><br /></span>
</div>
<span style="font-size: small;">
</span>
<br />
<div style="line-height: 100%; margin-bottom: 0cm; text-decoration: none;">
<span style="font-size: small;"><b>* Referential integrity</b></span></div>
<span style="font-size: small;">
</span>
<br />
<div style="font-weight: normal; line-height: 100%; margin-bottom: 0cm; text-decoration: none;">
<span style="font-size: small;"> There occurs some cases where
we want a value appearingin one relation must appear in another
relation. In some cases database modification cause violation in Referential integrity. When that happens, the action that causes the
violation is rejected.</span></div>
<span style="font-size: small;">
</span>
<br />
<div style="font-weight: normal; line-height: 100%; margin-bottom: 0cm; text-decoration: none;">
<span style="font-size: small;"><br /></span>
</div>
<span style="font-size: small;">
</span>
<br />
<div style="line-height: 100%; margin-bottom: 0cm; text-decoration: none;">
<span style="font-size: small;"><b>* Assertion</b></span></div>
<span style="font-size: small;">
</span>
<br />
<div style="font-weight: normal; line-height: 100%; margin-bottom: 0cm; text-decoration: none;">
<span style="font-size: small;"> Assertion is any condition
that a database must always satisfy. Domain constraints and
Refrential integrity are other forms of assertions. When an assertion
is created, system tests for its validity. If it is valid, database
allows further modification if it does not cause any violation.</span></div>
<span style="font-size: small;">
</span>
<br />
<div style="font-weight: normal; line-height: 100%; margin-bottom: 0cm; text-decoration: none;">
<span style="font-size: small;"><br /></span>
</div>
<span style="font-size: small;">
</span>
<br />
<div style="line-height: 100%; margin-bottom: 0cm; text-decoration: none;">
<span style="font-size: small;"><b>* Authorization</b></span></div>
<span style="font-size: small;">
</span>
<br />
<div style="font-weight: normal; line-height: 100%; margin-bottom: 0cm; text-decoration: none;">
<span style="font-size: small;"> Users are differentiated
according to type of access that they have to the database. This
differentiation among the users are expressed in terms of
Authorization.</span></div>
<span style="font-size: small;">
</span>
<br />
<div style="font-weight: normal; line-height: 100%; margin-bottom: 0cm; text-decoration: none;">
<span style="font-size: small;">The different types of
authorizations are,</span></div>
<span style="font-size: small;">
</span>
<br />
<ul>
<li><div style="font-weight: normal; line-height: 100%; margin-bottom: 0cm; text-decoration: none;">
<span style="font-size: small;">Read authorization</span></div>
</li>
<li><div style="font-weight: normal; line-height: 100%; margin-bottom: 0cm; text-decoration: none;">
<span style="font-size: small;">Insert authorization</span></div>
</li>
<li><div style="font-weight: normal; line-height: 100%; margin-bottom: 0cm; text-decoration: none;">
<span style="font-size: small;">Update authorization</span></div>
</li>
<li><div style="font-weight: normal; line-height: 100%; margin-bottom: 0cm; text-decoration: none;">
<span style="font-size: small;">Delete authorization</span></div>
</li>
</ul>
<span style="font-size: small;">
</span>
<br />
<div style="font-weight: normal; line-height: 100%; margin-bottom: 0cm; text-decoration: none;">
<span style="font-size: small;">Data dictionary is a special
type of table that can be accessed and updated by the database system
itself. The database system consults the data dictionary before
reading and modifying the data.</span></div>
<span style="font-size: small;">
</span></div>
Amrutha Shttp://www.blogger.com/profile/02981710049877674926noreply@blogger.com0India20.593684 78.962880000000041-8.580994 37.654286000000042 49.768361999999996 120.27147400000004tag:blogger.com,1999:blog-1317507688703818110.post-70849673508721568702014-07-04T23:21:00.001-07:002016-05-06T12:26:22.338-07:00Web Syndication<div dir="ltr" style="text-align: left;" trbidi="on">
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right; text-align: left;"><tbody>
<tr><td style="text-align: center;"><span style="font-family: "georgia" , "times new roman" , serif; font-size: small;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhksiGEwxIZAe9vzaR-mBpMinak7rukjX-jspj1MHwslv-9FvVB7BYyghQyxroZ3mdEnccw1_TlToVz1ww_tMtNsagzfdzwWCrkLlMc03wQnOvlfOwImUMW1H1yoZHhveWNzOUdiaIVRtcB/s1600/rss.png" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhksiGEwxIZAe9vzaR-mBpMinak7rukjX-jspj1MHwslv-9FvVB7BYyghQyxroZ3mdEnccw1_TlToVz1ww_tMtNsagzfdzwWCrkLlMc03wQnOvlfOwImUMW1H1yoZHhveWNzOUdiaIVRtcB/s1600/rss.png" width="200" /></a></span></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="font-family: "georgia" , "times new roman" , serif; font-size: small;">Common Web feed icon</span></td></tr>
</tbody></table>
<div dir="ltr" id="docs-internal-guid-cc227635-052a-88a8-9912-ee7d63b46c4d" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif; font-size: small;"><span style="background-color: transparent; font-family: "georgia" , "times new roman" , serif; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"> First
of all, what is Syndication? Basically syndication is the supply of
material for reuse and integration with other material, often through a
paid service subscription. The best example of web syndication is
Newspaper. News agencies distribute contents to newspapers, they
reformat it and integrate it with other copies and publish it.</span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: "georgia" , "times new roman" , serif; font-size: small;"><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"> </span><span style="background-color: transparent; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">Web
syndication refers to the websites providing information and the
websites displaying it. ie, A section of a website is made available for
other websites to use. For the providing sites, it is an exposure
across numerous online platform. For the receiving sites, it is an
effective way of adding depths to their sites and making it more
attractive. Online content syndication is a rapid growing industrial
sector in both hardware and software field. In the early days,
syndication was a heavy manual process. Then an agreement reached
favouring both supplier and customers reached. According to the
agreement the customers would simply copy the desired content from the
supplier's Web site and paste it into their own. Thus it became an easy
process. </span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="color: black; font-family: Georgia, Times New Roman, serif; font-size: small;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4CYBoyALlucRERk3JO9TJRTJqs-bbw1ILpaaXl4lUNV85xV2KvyIiw3s8oCDpHAdIanFXCxVvOg0O07BGULzSADbLR_h5Ufoctk2YjtesDN3ecs5iAFjdSqglkXdWqJJALhhEE8euPb27/s1600/wcs1.jpg" imageanchor="1" style="clear: left; float: left; font-family: georgia, 'times new roman', serif; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="185" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4CYBoyALlucRERk3JO9TJRTJqs-bbw1ILpaaXl4lUNV85xV2KvyIiw3s8oCDpHAdIanFXCxVvOg0O07BGULzSADbLR_h5Ufoctk2YjtesDN3ecs5iAFjdSqglkXdWqJJALhhEE8euPb27/s1600/wcs1.jpg" width="320" /></a><span style="font-family: "Helvetica Neue",Arial,Helvetica,sans-serif;"><span style="background-color: transparent; font-family: georgia, 'times new roman', serif; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"> </span><span style="background-color: transparent; font-family: Georgia, Times New Roman, serif; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">In
order to implement this new communication process, a series of XML
files are defined. There is no standard format for Web syndication. To
use this technology, site owners create or obtain specialized software
(such as a content management system) which, in the machine-readable XML
format, presents new articles in a list, giving a line or two of each
article and a link to the full article or post. Web logs and news
websites are common sources for web feeds, but feeds are also used to
deliver structured information ranging from weather data to "top ten"
lists of hit tunes. The term syndication is used to describe making
available a feed for an information source. Like syndicated print
newspaper features or broadcast programs, webfeed contents may be shared
and republished by other web sites.</span></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif; font-size: small;"></span></div>
</div>
Amrutha Shttp://www.blogger.com/profile/02981710049877674926noreply@blogger.com0tag:blogger.com,1999:blog-1317507688703818110.post-58989748745105080362014-07-01T04:06:00.003-07:002014-07-28T23:52:23.714-07:00A Movie Review <div dir="ltr" style="text-align: left;" trbidi="on">
<blockquote class="tr_bq">
<blockquote class="tr_bq">
<blockquote class="tr_bq">
<blockquote class="tr_bq">
<blockquote class="tr_bq">
<blockquote class="tr_bq">
<blockquote class="tr_bq">
<blockquote class="tr_bq">
<h2 style="text-align: left;">
<b><span style="font-family: Georgia,"Times New Roman",serif;">THIRA</span></b></h2>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
<style type="text/css">P { margin-bottom: 0.08in; direction: ltr; color: rgb(0, 0, 0); widows: 2; orphans: 2; }A:link { color: rgb(0, 0, 255); }</style>
<br />
<h2 align="CENTER" style="background: none repeat scroll 0% 0% rgb(255, 255, 255); margin-bottom: 0.14in;">
</h2>
<div class="separator" style="clear: both; text-align: center;">
<span style="color: black;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiEZGqr97MqbQvYRI-MbYm3_SN8PoeWrtoZflIDOD5p4hvepOqpla4YXvUVMGDU4rXbRX9Xm5qv_LQvEKcqWRI03HztLTcyuBQL2GXOm6jA1ze7wuPaROjsgcVWbM3HvCbFaxCNuFdjZqN/s1600/thira_141113_m.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiEZGqr97MqbQvYRI-MbYm3_SN8PoeWrtoZflIDOD5p4hvepOqpla4YXvUVMGDU4rXbRX9Xm5qv_LQvEKcqWRI03HztLTcyuBQL2GXOm6jA1ze7wuPaROjsgcVWbM3HvCbFaxCNuFdjZqN/s1600/thira_141113_m.jpg" height="160" width="320" /></a></span></div>
<div style="background: none repeat scroll 0% 0% rgb(255, 255, 255); margin-bottom: 0.14in; text-align: left; text-indent: 0.5in;">
<span style="font-family: "Helvetica Neue",Arial,Helvetica,sans-serif;"><span style="font-size: small;">Thira is 2013 released movie directed by Vineeth Sreenivasan. It
casts Dhyan Sreenivasan, Shobhana- the cenral character. The movie
deals with human trafficking. This movie is an eye-opener against
such crimes taking place in different parts of the country.
</span></span></div>
<div style="background: none repeat scroll 0% 0% rgb(255, 255, 255); margin-bottom: 0.14in; text-align: left;">
<br />
<span style="font-family: "Helvetica Neue",Arial,Helvetica,sans-serif;"><span style="font-size: small;">The film makes
the debut of Vineeth Sreenivasan’s young brother Dhyan Sreenivasan
and the return of actress Shobhana to Malayalam cinema after almost a
decade. Vineeth Sreenivasan was inspired by the life of Sunitha
Krishnan an Indian activist and founder of ‘Prajwal’ an
institution that assist trafficked women and girls in finding the
shelter.</span></span></div>
<div style="background: none repeat scroll 0% 0% rgb(255, 255, 255); margin-bottom: 0.14in; text-align: left;">
<span style="font-family: "Helvetica Neue",Arial,Helvetica,sans-serif;"><span style="font-size: small;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 255);">Movie
begins with the introduction of a cardiologist, Rohini Pranab
(Shobhana), who apart from her job of a doctor also runs an
organization for women which acts against women trafficking and helps
orphaned girls. Things get into trouble when some girls from the
organization get kidnapped.</span></span></span></div>
<div style="background: none repeat scroll 0% 0% rgb(255, 255, 255); margin-bottom: 0.14in; text-align: left;">
<span style="font-family: "Helvetica Neue",Arial,Helvetica,sans-serif;"><span style="font-size: small;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 255);"> </span></span><span style="font-size: small;"><span style="background: none repeat scroll 0% 0% rgb(240, 240, 240);">Rohini
sets out on a mission to find those who are behind her husband's
murder and who have trafficked the girls. On the same path, we are
introduced to Naveen (Dhyan Sreenivasan), who is in search of his
kidnapped sister. Naveen and Rohini meet by chance and come to know
that they have the same goal. Rest of the movie focuses on their
mission to find the lost ones.</span></span><span style="font-size: small;"> The story is set in
Kerala and Goa. Both of them finally identify the secret place where
the trafficked girls are kept and release with the wise help from
Rohini and action from Naveen.</span></span></div>
<div style="background: none repeat scroll 0% 0% rgb(255, 255, 255); margin-bottom: 0.14in; text-align: left;">
<span style="font-family: "Helvetica Neue",Arial,Helvetica,sans-serif;"><span style="font-size: small;"> Thira merely<b>
</b>reminds us that even those with
eyes, see only that which they want to see through the scene of girl
being kidnapped in the middle of the city in a day.</span></span></div>
<div style="background: none repeat scroll 0% 0% rgb(255, 255, 255); margin-bottom: 0.14in; text-align: left;">
<span style="font-family: "Helvetica Neue",Arial,Helvetica,sans-serif;"><span style="font-size: small;"> </span><span style="font-size: small;"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 255);">The
main issue with stories of these kinds is that they have a
predictable pattern with real events happening only at the beginning
and then towards the end. What keeps the viewers glued on to such
films are the portions that connect these two ends. Rakesh Mantodi's
script (co-written by Vineeth Sreenivasan) barely manages to make
things interesting and gripping beyond a point. Also, the dialogues
have been written in an old fashioned style.</span></span><span style="font-size: small;"><br /></span><span style="font-size: small;"><br /></span></span>
</div>
<div style="background: none repeat scroll 0% 0% rgb(255, 255, 255); margin-bottom: 0.14in; text-align: left;">
<span style="font-family: "Helvetica Neue",Arial,Helvetica,sans-serif;"><span style="font-size: small;">.
'Thira' does require an actress of great caliber, and Shobhana
delivers an incredible performance and Dhyan Sreenivasan makes a
notable debut as well, though he does need to work on his dubbing
skills.</span><span style="font-size: small;"><br /></span></span>
</div>
<div style="background: none repeat scroll 0% 0% rgb(255, 255, 255); margin-bottom: 0.14in; text-align: left;">
<br /></div>
</div>
Amrutha Shttp://www.blogger.com/profile/02981710049877674926noreply@blogger.com0tag:blogger.com,1999:blog-1317507688703818110.post-62906032070377842952014-06-22T06:56:00.002-07:002014-07-28T23:50:31.879-07:00A Book Review<div dir="ltr" style="text-align: left;" trbidi="on">
<blockquote class="tr_bq">
<blockquote class="tr_bq">
<h2 style="text-align: left;">
<span style="font-family: Georgia,"Times New Roman",serif;">HOW I BRAVED ANU AUNTY AND CO-FOUNDED A MILLION DOLLAR COMPANY -Varun Agarwaal
</span></h2>
</blockquote>
</blockquote>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZJcsyAt_pVTX7rAetZLHw2326fsLrF1ZEfGvPx5jd_HfTR_RaW7IqCa9yXgSdTFm45NuQBWS9k49CAbXdPE1Cbp_csW22gKba7BTc4fbA8oGN6RSAlDN3nKcLMGCdk6ZV7scAYDKUBbUt/s1600/varun.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZJcsyAt_pVTX7rAetZLHw2326fsLrF1ZEfGvPx5jd_HfTR_RaW7IqCa9yXgSdTFm45NuQBWS9k49CAbXdPE1Cbp_csW22gKba7BTc4fbA8oGN6RSAlDN3nKcLMGCdk6ZV7scAYDKUBbUt/s1600/varun.jpg" height="244" width="320" /></a><span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"> Varun Agarwaal, the author of this book is a young entrepreneur of India. This book inspires the reader to live their dream. In a country like India it is hard to fulfill one’s dream on their profession.</span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Here Varun Agarwaal teaches us to walk in our way which we trust to be successful. We live to achieve what we want to be, not anyone else’s life.</span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span class="Apple-tab-span" style="white-space: pre;"> </span>The main character in this story is Anu Aunty, his mother’s close friend. From his child hood onwards she brainwashes his mother Poornima about his career. She believes being a techie is the best job that anyone can achieve. But, Varun wanted a complete change from what others are doing. He dreams of becoming an entrepreneur. He plans of starting a company with his close friend Rohn Malhothra. His Mal. Varun and his friends hangout at different places in Bangalore. The plan of his company was sprouted in such a meeting at Noon Wines, one of the old pub in Bangalore. Both Varun and Mal planned to work on an idea - School Merchandising, which means making hoodies, tees etc for the alumni of schools, colleges and passing out batches of institution. They proceeded with their idea while their parents and rest of their friends were ignorant about it. </span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span class="Apple-tab-span" style="white-space: pre;"> </span>But Varun’s mother was always worried about him and his future. She is tensed that Varun has not got a job yet while his friends are pursuing MBA and applying for higher education. The repeated addition of phrases like ‘Thunder, lightening, rain, old Hindi movie soundtrack’ makes the situation funny.</span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"> Anu aunty was always behind him. Her son Arjun is good at studies and extracurricular activities. He is a techie now. Whenever Anu aunty and Varun’s mother meet together Anu aunty injects possessiveness in her mind by comparing Varun and Arjun. </span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"> Varun is very much confident on his new start up. The first thing did they did was, they searched for a manufacturer. They came across three manufacturers whom they had to strike off due to financial issues. Finally they ended up with a manufacturer from Tirupur who is Mal’s brother’s friend. He gave all the support for their start up. During the business journey Varun discovered that the best lessons of marketing and business can be learned from the kitty parties of aunties. </span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"> In the following days they met the manufacturer, shipped the material and their first motto was Bishop Cotton Boys’ School. Their first business went well. They declared a name for their start up- Alma Mater. They took a lot of effort for their website, business cards etc. Slowly their business spread worldwide. He discovered that the best way of marketing their product is through E-commerce. </span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"> He went through many challenges and difficulties for the success of their dream. It was he himself and Mal worked very hard without the help of any employees for establishing their company.</span><br />
<span class="Apple-tab-span" style="white-space: pre;"><span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"> </span></span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"> Varun’s book reflects the life many of us are leading or forced to lead. There would be an Anu aunty in everyone’s life that becomes a hurdle for making our dream come true. What we see here is instead of simply bowing down to the pressure of Anu aunty and her friends, Varun decide to tread the unconventional path.</span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"> So, through this book Varun gives a practical guide to entrepreneurship to all who wants to fulfill their dream. </span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
</div>
Amrutha Shttp://www.blogger.com/profile/02981710049877674926noreply@blogger.com0tag:blogger.com,1999:blog-1317507688703818110.post-76034993972224245742014-06-17T01:53:00.000-07:002014-07-28T23:20:02.400-07:00MariaDB<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: left;">
<span style="font-family: "Helvetica Neue",Arial,Helvetica,sans-serif; font-size: small;"><br id="docs-internal-guid-de107f00-a906-d6bd-2f0e-30e6d116dcc0" /></span>
</div>
<div style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<div class="separator" style="clear: both; text-align: center;">
<span style="color: black;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgX7wmKAVqkJWcDSZmFiP1gmukgLr9TEZ79c96OcV6gy6nGGEUlluS5ViPeVhPvF2IAAxuAJAt89BAqfE7NBWCsl84_5qp10oIhUXz_y6L2VInH2Lm8sw-6utmOJsP5yNAj3m2WaEov07bD/s1600/mariadb-seal-shaded-browntext-alt.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgX7wmKAVqkJWcDSZmFiP1gmukgLr9TEZ79c96OcV6gy6nGGEUlluS5ViPeVhPvF2IAAxuAJAt89BAqfE7NBWCsl84_5qp10oIhUXz_y6L2VInH2Lm8sw-6utmOJsP5yNAj3m2WaEov07bD/s1600/mariadb-seal-shaded-browntext-alt.png" /></a></span></div>
<span style="font-family: "Helvetica Neue",Arial,Helvetica,sans-serif; font-size: small;"><span style="background-color: white; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">MariaDB is a high performance, open source database that helps the world's busiest websites deliver more content, faster, to all its users. It is developed by the developers of MySQL with the help of Free and Open Source software community and is a fork of MySQL. It offers various features and enhancements like alternate storage engines, server optimizations and patches.</span></span></div>
<div style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: "Helvetica Neue",Arial,Helvetica,sans-serif; font-size: small;"><span style="background-color: white; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">The lead developer of MariaDB is </span><a href="http://en.wikipedia.org/wiki/Michael_Widenius" style="text-decoration: none;"><span style="background-color: white; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">Michael "Monty" Widenius</span></a><span style="background-color: white; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">, who is also the founder of MySQL and Monty Program AB.</span></span></div>
<div style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="font-family: "Helvetica Neue",Arial,Helvetica,sans-serif; font-size: small;"><span style="background-color: white; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">It is not a single person or a company that is developing the MariaDB/MySQL developments. It is the guardian of the MariaDB community that drives it. MariaDB foundation has the trademark of MariaDB server and owns mariadb.org. This ensures that official MariaDB development tree is always opened for the developer community. MariaDB foundation ensures that all the community patches, including MySQL source code are matched into MariaDB and also provides a lot of documentation. MariaDB is a registered trademark of SkySQL Corporation Ab used by MariaDB Foundation with permission.</span></span></div>
<div style="text-align: left;">
<span style="font-family: "Helvetica Neue",Arial,Helvetica,sans-serif; font-size: small;"><span style="background-color: white; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">It is the best choice for database professionals looking for best and robust SQL server. </span></span></div>
</div>
Amrutha Shttp://www.blogger.com/profile/02981710049877674926noreply@blogger.com0