From 81fc9cf63387dc3a02b4ba76fb95bbce28834ff6 Mon Sep 17 00:00:00 2001 From: urmisaha Date: Fri, 24 Jan 2020 17:37:40 +0530 Subject: [PATCH 01/15] fetching similar questions from stackoverflow and showing as a list in front end --- requirements.txt | 2 +- static/website/js/custom.js | 12 ++- .../templates/ajax-similar-questions.html | 2 +- static/website/templates/new-question.html | 28 +++++-- website/views.py | 76 +++++++++++++++---- 5 files changed, 93 insertions(+), 27 deletions(-) diff --git a/requirements.txt b/requirements.txt index 510ea27..42d5943 100755 --- a/requirements.txt +++ b/requirements.txt @@ -12,4 +12,4 @@ django-compressor==2.2 django-extensions==2.1.3 django-filter==2.0.0 django-debug-toolbar==1.4 -python-dotenv==0.10.3 \ No newline at end of file +python-dotenv==0.10.3 diff --git a/static/website/js/custom.js b/static/website/js/custom.js index d60e1d5..98d63e6 100755 --- a/static/website/js/custom.js +++ b/static/website/js/custom.js @@ -3,6 +3,7 @@ $(document).ready(function() { $tutorial = $("#id_tutorial"); $minute_range = $("#id_minute_range"); $second_range = $("#id_second_range"); + $title = $("#id_title"); var tutorial = $tutorial.val(); var category = $category.val(); @@ -65,7 +66,7 @@ $(document).ready(function() { } }); - $tutorial.change(function() { + $tutorial.on('input', function() { /* resetting dropdowns */ reset("minute_range", "second_range"); var category = $category.val(); @@ -98,7 +99,8 @@ $(document).ready(function() { } }); - $second_range.change(function() { + + $title.change(function() { $.ajax({ url: "/ajax-similar-questions/", type: "POST", @@ -106,13 +108,15 @@ $(document).ready(function() { category: $category.val(), tutorial: $tutorial.val(), minute_range: $minute_range.val(), - second_range: $second_range.val() + second_range: $second_range.val(), + title: $title.val() }, dataType: "html", success: function(data) { $response = $(data); var similar_count= $response.find("#similar-count").text(); - $("#similar-link").show().html(similar_count); + console.log(similar_count); + $("#similar-link").show(); $("#modal-body").html(data); } }); diff --git a/static/website/templates/ajax-similar-questions.html b/static/website/templates/ajax-similar-questions.html index 64f194f..2870dae 100755 --- a/static/website/templates/ajax-similar-questions.html +++ b/static/website/templates/ajax-similar-questions.html @@ -13,7 +13,7 @@ {% for question in questions %} - + {{ question.title }} diff --git a/static/website/templates/new-question.html b/static/website/templates/new-question.html index 2be36a3..e66a785 100755 --- a/static/website/templates/new-question.html +++ b/static/website/templates/new-question.html @@ -31,13 +31,13 @@

{% render_field form.second_range class+="form-control" disabled="disabled" %}
-
+

@@ -48,6 +48,20 @@

{% render_field form.title class+="form-control" %} + + + + + +
{% render_field form.body class+="form-control" %} @@ -59,7 +73,7 @@

- -

+ --> + + + + +{% endblock %} + +{% block javascript %} + +{% endblock %} diff --git a/website/forms.py b/website/forms.py index c7d5232..d9d8d1b 100755 --- a/website/forms.py +++ b/website/forms.py @@ -44,7 +44,7 @@ def __init__(self, *args, **kwargs): seconds = ( ("", "sec"), ) - + if not category and args and 'category' in args[0] and args[0]['category']: category = args[0]['category'] if FossCategory.objects.filter(foss=category).exists(): @@ -66,7 +66,6 @@ def __init__(self, *args, **kwargs): self.fields['minute_range'] = forms.CharField(widget=forms.Select(choices=minutes)) self.fields['second_range'] = forms.CharField(widget=forms.Select(choices=seconds)) - class AnswerQuesitionForm(forms.Form): question = forms.IntegerField(widget=forms.HiddenInput()) body = forms.CharField(widget=forms.Textarea()) diff --git a/website/tfidf.py b/website/tfidf.py new file mode 100644 index 0000000..9a23e3c --- /dev/null +++ b/website/tfidf.py @@ -0,0 +1,99 @@ +import sys, os, re +import pandas as pd +from sklearn.feature_extraction.text import CountVectorizer, TfidfTransformer +from nltk.corpus import stopwords + +def pre_process(text): + text=text.lower() # lowercase + text=re.sub("","",text) # remove tags + text=re.sub("(\\d|\\W)+"," ",text) # remove special characters and digits + return text + + +# load a set of stop words +stopwords = stopwords.words('english') + +cv = "" +tfidf_transformer = "" +feature_names = "" + +def create_vocab_tfidf(dirpath): + global cv + global tfidf_transformer + global feature_names + filenames = [] + docs = [] + listOfDir = os.listdir(dirpath) + for dir in listOfDir: + path = os.path.join(dirpath, dir) + for file in os.listdir(path): + filenames.append(file.split(".")[0].replace('-', " ")) + with open(path+"/"+file, "r") as f: + doc = ' '.join([str(line) for line in f.readlines()]) + docs.append(doc) + + df_idf = pd.DataFrame() + df_idf['title'] = filenames + print(df_idf['title']) + df_idf['body'] = docs + df_idf['text'] = df_idf['title'] + df_idf['body'] + df_idf['text'] = df_idf['text'].apply(lambda x:pre_process(x)) + + # get the text column + docs=df_idf['text'].tolist() + + # create a vocabulary of words, ignore words that appear in 85% of documents, eliminate stop words + cv=CountVectorizer(max_df=0.85,stop_words=stopwords) + word_count_vector=cv.fit_transform(docs) + print(list(cv.vocabulary_.keys())[:50]) + + tfidf_transformer=TfidfTransformer(smooth_idf=True,use_idf=True) + tfidf_transformer.fit(word_count_vector) + + # this is done only once, this is a mapping of index to words + feature_names=cv.get_feature_names() + + +#################################################################################################### + + +def sort_coo(coo_matrix): + tuples = zip(coo_matrix.col, coo_matrix.data) + return sorted(tuples, key=lambda x: (x[1], x[0]), reverse=True) + +def extract_topn_from_vector(feature_names, sorted_items, topn): + """get the feature names and tf-idf score of top n items""" + + sorted_items = sorted_items[:topn] # use only topn items from vector + score_vals = [] + feature_vals = [] + + # word index and corresponding tf-idf score + for idx, score in sorted_items: + #keep track of feature name and its corresponding score + score_vals.append(round(score, 3)) + feature_vals.append(feature_names[idx]) + + #create a tuples of feature,score + results= {} + for idx in range(len(feature_vals)): + results[feature_vals[idx]]=score_vals[idx] + return results + + +# extract keywords +def extract_keywords(filename): + print(filename) + with open(filename, "r") as f: + doc = ' '.join([str(line) for line in f.readlines()]) + + #generate tf-idf for the given document + tf_idf_vector=tfidf_transformer.transform(cv.transform([doc])) + + #sort the tf-idf vectors by descending order of scores + sorted_items=sort_coo(tf_idf_vector.tocoo()) + + #extract only the top n; n is given as the last argument + keywords=extract_topn_from_vector(feature_names,sorted_items, 5) + print(keywords) + return list(keywords.keys()) \ No newline at end of file diff --git a/website/urls.py b/website/urls.py index 5e58529..87d904f 100755 --- a/website/urls.py +++ b/website/urls.py @@ -21,6 +21,7 @@ url(r'^user/(?P\d+)/answers/$', views.user_answers, name='user_answers'), url(r'^clear-notifications/$', views.clear_notifications, name='clear_notifications'), url(r'^search/$', views.search, name='search'), + url(r'^faq/$', views.faq, name='faq'), url(r'^unanswered-notification/$', views.unanswered_notification, name='unanswered_notification'), # Ajax helpers @@ -32,6 +33,7 @@ url(r'^ajax-answer-comment-update/$', views.ajax_answer_comment_update, name='ajax_answer_comment_update'), url(r'^ajax-similar-questions/$', views.ajax_similar_questions, name='ajax_similar_questions'), + url(r'^ajax-faq-questions/$', views.ajax_faq_questions, name='ajax_faq_questions'), url(r'^ajax-notification-remove/$', views.ajax_notification_remove, name='ajax_notification_remove'), url(r'^ajax-keyword-search/$', views.ajax_keyword_search, name='ajax_keyword_search'), url(r'^ajax-time-search/$', views.ajax_time_search, name='ajax_time_search'), diff --git a/website/views.py b/website/views.py index b39288d..eabd915 100755 --- a/website/views.py +++ b/website/views.py @@ -1,6 +1,7 @@ import json import pandas import pymongo +from stackapi import StackAPI from django.http import HttpResponse, HttpResponseRedirect, HttpResponseForbidden from django.shortcuts import render, get_object_or_404 @@ -21,12 +22,16 @@ from .sortable import SortableHeader, get_sorted_list, get_field_index from django.db.models import Count +from .tfidf import * + User = get_user_model() categories = [] +cat_tutorials = [] + trs = TutorialResources.objects.filter(Q(status=1) | Q(status=2), language__name='English') trs = trs.values('tutorial_detail__foss__foss').order_by('tutorial_detail__foss__foss') - + for tr in trs.values_list('tutorial_detail__foss__foss').distinct(): categories.append(tr[0]) @@ -380,22 +385,41 @@ def search(request): } return render(request, 'website/templates/search.html', context) +def faq(request): + context = {} + category = request.GET.get('category', None) + tutorial = request.GET.get('tutorial', None) + minute_range = request.GET.get('minute_range', None) + second_range = request.GET.get('second_range', None) + # pass minute_range and second_range value to NewQuestionForm to populate on select + form = NewQuestionForm(category=category, tutorial=tutorial, + minute_range=minute_range, second_range=second_range) + context['category'] = category + + context['form'] = form + context.update(csrf(request)) + return render(request, 'website/templates/faq.html', context) + + # Ajax Section # All the ajax views go below - def ajax_category(request): context = { 'categories': categories } return render(request, 'website/templates/ajax_categories.html', context) - def ajax_tutorials(request): if request.method == 'POST': category = request.POST.get('category') tutorials = TutorialDetails.objects.using('spoken').filter( foss__foss=category).order_by('level', 'order') + cat = tutorials[0].foss + path = settings.MEDIA_ROOT + 'videos/' + str(cat.pk) + create_vocab_tfidf(path) + for tut in tutorials: + cat_tutorials.append(tut.tutorial) context = { 'tutorials': tutorials } @@ -503,43 +527,100 @@ def ajax_answer_comment_update(request): return HttpResponseForbidden("Not Authorised") -def get_relevant_questions(query): - print(query) +def get_relevant_questions(category, tutorial, query, terms): tags = set() - # for file in os.listdir("extracted_questions"): - # df = pandas.read_csv("extracted_questions/"+file, header=None, names=['question_id', 'tag', 'link', 'tags', 'accepted_answer']) - # # print(df['tag'].values[1]) - # tags.add(df['tag'].values[1]) - # # print(tags) - # for tag in df['tags']: - # for t in tag.split(';'): - # tags.add(t) - # # print(tags) - tags = ["c++", "django", "polymorphism", "inheritance", "overloading", "opetaor"] - - rel_tags = set() - - for word in query.split(): - if word in tags: - rel_tags.add(word) - - # print(rel_tags) + # create tags from categories and tutorials + stack_tags = [] + stack_tags.extend(categories) + stack_tags.extend(cat_tutorials) + stack_tags = [x.lower() for x in stack_tags] + rel_tags = [] + + ''' + this part is run when the function is called from ask a question page with a query + relevant words from query are extracted + ''' + if query != "": + for word in query.split(): + if word in stack_tags: + rel_tags.append(word) + + # this part is run when the function is called from FAQ page with category and tutorial selected, here query="" + if len(terms) != 0: + rel_tags.extend(terms) + + print("rel_tags") + print(rel_tags) client = pymongo.MongoClient("mongodb://localhost:27017/") db = client.stackapi collec_ques = db.questions + # collec_ques.create_index('question_id', unique=True) # fetch questions - questions = [] + tot_ques = [] + all_tags = [] + entries = [] + print("Fetching data.. ") + SITE = StackAPI('stackoverflow') + category = category.split()[0] + tutorial = tutorial.split()[0] + # Fetching questions with only category name(e.g. latex) as tag + questions = SITE.fetch('questions', fromdate=1257136000, min=20, tagged=category, sort='votes', order='desc') + entries.extend(questions['items']) + # Fetching questions with both category name(e.g. latex) AND tutorial name(e.g. beamer) tags + c_t = category + ';' + tutorial + questions = SITE.fetch('questions', fromdate=1257136000, min=20, tagged=c_t, sort='votes', order='desc') + entries.extend(questions['items']) + # Fetching questions with addition of rel_tags(obtained from quert/srt files) for t in rel_tags: - print("\nFetching questions for tag: " + t + "\n") - items = collec_ques.find({"tags": t}).limit(5) + tag = c_t + ';' + t + questions = SITE.fetch('questions', fromdate=1257136000, min=20, tagged=category+';'+t, sort='votes', order='desc') + entries.extend(questions['items']) + questions = SITE.fetch('questions', fromdate=1257136000, min=20, tagged=tutorial+';'+t, sort='votes', order='desc') + entries.extend(questions['items']) + questions = SITE.fetch('questions', fromdate=1257136000, min=20, tagged=tag, sort='votes', order='desc') + entries.extend(questions['items']) + + if len(entries) == 0: + return tot_ques, all_tags + + # inserting fetched data into mongodb + collec_ques.insert_many(entries) + + rel_tags.extend([category, tutorial]) + q_ids = [] + for t in rel_tags: + items = collec_ques.find({"tags": t}).limit(20) + print("Fetched " + str(items.count()) + " questions for tag: " + t) for item in items: - print(item) - q = {'title': item['title'], 'uid': item['question_id'], 'body': item['link']} - questions.append(q) - return questions + all_tags.extend(item['tags']) + if item['question_id'] not in q_ids: + q_ids.append(item['question_id']) + q = {'title': item['title'], 'uid': item['question_id'], 'body': item['link'], 'tags': item['tags']} + tot_ques.append(q) + return tot_ques, all_tags + +def ajax_faq_questions(request): + if request.method == 'POST': + category = request.POST['category'] + tutorial = request.POST['tutorial'] + td_rec = TutorialDetails.objects.using('spoken').filter(tutorial=tutorial, foss__foss=category).order_by('level', 'order') + cat = td_rec[0].foss + td = td_rec[0] + filename = settings.MEDIA_ROOT + 'videos/' + str(cat.pk) + '/' + str(td.pk) + '/' + tutorial.replace(' ', '-') + '-English.srt' + topic_keys = extract_keywords(filename) + print(topic_keys) + + questions, tags = get_relevant_questions(category.lower(), tutorial.lower(), '', topic_keys) + print(str(len(questions)) + " relevant questions and tags are ") + print(tags) + context = { + 'questions': questions, + 'tags': tags + } + return render(request, 'website/templates/ajax_faq_questions.html', context) def ajax_similar_questions(request): @@ -550,12 +631,12 @@ def ajax_similar_questions(request): # minute_range = request.POST['minute_range'] # second_range = request.POST['second_range'] - questions = get_relevant_questions(titl) - + questions, tags = get_relevant_questions(category.lower(), tutorial.lower(), titl.lower(), []) # add more filtering when the forum grows # questions = Question.objects.filter(category=category).filter(tutorial=tutorial) context = { - 'questions': questions + 'questions': questions, + 'tags': tags } return render(request, 'website/templates/ajax-similar-questions.html', context) From 69601ff910baebac831e7b4457112ae70c41ad31 Mon Sep 17 00:00:00 2001 From: urmisaha Date: Tue, 21 Apr 2020 14:05:23 +0530 Subject: [PATCH 03/15] removing media folder --- .../10/Mathematical-Typesetting-English.srt | 546 --------- media/videos/14/11/Equations-English.srt | 586 ---------- .../14/12/Tables-and-Figures-English.srt | 1006 ----------------- media/videos/14/13/Beamer-English.srt | 834 -------------- media/videos/14/16/Bibliography-English.srt | 222 ---- .../Feedback-diagram-with-Maths-English.srt | 504 --------- ...aTeX-on-Windows-using-TeXworks-English.srt | 554 --------- media/videos/14/7/Letter-Writing-English.srt | 310 ----- .../videos/14/806/Report-Writing-English.srt | 516 --------- ...etting-General-Privacy-Options-English.srt | 350 ------ media/videos/4/313/Popups-English.srt | 382 ------- .../4/314/Themes-Popup-blocking-English.srt | 440 ------- media/videos/4/315/Bookmarks-English.srt | 550 --------- media/videos/4/316/Extensions-English.srt | 418 ------- media/videos/4/317/Add-ons-English.srt | 395 ------- media/videos/4/71/Introduction-English.srt | 266 ----- ...Firefox-interface-and-toolbars-English.srt | 358 ------ .../Searching-and-Auto-complete-English.srt | 370 ------ ...bbed-Browsing-Blocking-Pop-ups-English.srt | 282 ----- media/videos/43/430/Tokens-English.srt | 682 ----------- media/videos/43/431/Functions-English.srt | 630 ----------- .../43/432/Scope-Of-Variables-English.srt | 402 ------- .../433/If-And-Else-If-statement-English.srt | 604 ---------- ...Nested-If-And-Switch-Statement-English.srt | 514 --------- ...rement-And-Decrement-Operators-English.srt | 510 --------- .../43/437/Relational-Operators-English.srt | 574 ---------- media/videos/43/439/Loops-English.srt | 654 ----------- media/videos/43/440/Arrays-English.srt | 494 -------- .../43/445/Understanding-Pointers-English.srt | 302 ----- .../Command-line-arguments-in-C-English.srt | 234 ---- .../Installation-of-PostgreSQL-English.srt | 492 -------- .../Create-database-using-PgAdmin-English.srt | 374 ------ .../899/Table-with-primary-keys-English.srt | 529 --------- .../92/932/Select-statement-English.srt | 520 --------- ...elect-with-Aggregate-functions-English.srt | 440 ------- .../92/967/Foreign-key-Constraint-English.srt | 497 -------- .../Aggregation-facilities-in-SQL-English.srt | 401 ------- media/videos/92/985/Updating-Data-English.srt | 287 ----- ...Overview-of-RDBMS---PostgreSQL-English.srt | 320 ------ 39 files changed, 18349 deletions(-) delete mode 100644 media/videos/14/10/Mathematical-Typesetting-English.srt delete mode 100644 media/videos/14/11/Equations-English.srt delete mode 100644 media/videos/14/12/Tables-and-Figures-English.srt delete mode 100644 media/videos/14/13/Beamer-English.srt delete mode 100644 media/videos/14/16/Bibliography-English.srt delete mode 100644 media/videos/14/197/Feedback-diagram-with-Maths-English.srt delete mode 100644 media/videos/14/519/LaTeX-on-Windows-using-TeXworks-English.srt delete mode 100644 media/videos/14/7/Letter-Writing-English.srt delete mode 100644 media/videos/14/806/Report-Writing-English.srt delete mode 100644 media/videos/4/262/Setting-General-Privacy-Options-English.srt delete mode 100644 media/videos/4/313/Popups-English.srt delete mode 100644 media/videos/4/314/Themes-Popup-blocking-English.srt delete mode 100644 media/videos/4/315/Bookmarks-English.srt delete mode 100644 media/videos/4/316/Extensions-English.srt delete mode 100644 media/videos/4/317/Add-ons-English.srt delete mode 100644 media/videos/4/71/Introduction-English.srt delete mode 100644 media/videos/4/73/Firefox-interface-and-toolbars-English.srt delete mode 100644 media/videos/4/76/Searching-and-Auto-complete-English.srt delete mode 100644 media/videos/4/77/Tabbed-Browsing-Blocking-Pop-ups-English.srt delete mode 100644 media/videos/43/430/Tokens-English.srt delete mode 100644 media/videos/43/431/Functions-English.srt delete mode 100644 media/videos/43/432/Scope-Of-Variables-English.srt delete mode 100644 media/videos/43/433/If-And-Else-If-statement-English.srt delete mode 100644 media/videos/43/434/Nested-If-And-Switch-Statement-English.srt delete mode 100644 media/videos/43/435/Increment-And-Decrement-Operators-English.srt delete mode 100644 media/videos/43/437/Relational-Operators-English.srt delete mode 100644 media/videos/43/439/Loops-English.srt delete mode 100644 media/videos/43/440/Arrays-English.srt delete mode 100644 media/videos/43/445/Understanding-Pointers-English.srt delete mode 100644 media/videos/61/605/Command-line-arguments-in-C-English.srt delete mode 100644 media/videos/92/897/Installation-of-PostgreSQL-English.srt delete mode 100644 media/videos/92/898/Create-database-using-PgAdmin-English.srt delete mode 100644 media/videos/92/899/Table-with-primary-keys-English.srt delete mode 100644 media/videos/92/932/Select-statement-English.srt delete mode 100644 media/videos/92/933/Select-with-Aggregate-functions-English.srt delete mode 100644 media/videos/92/967/Foreign-key-Constraint-English.srt delete mode 100644 media/videos/92/982/Aggregation-facilities-in-SQL-English.srt delete mode 100644 media/videos/92/985/Updating-Data-English.srt delete mode 100644 media/videos/92/990/Overview-of-RDBMS---PostgreSQL-English.srt diff --git a/media/videos/14/10/Mathematical-Typesetting-English.srt b/media/videos/14/10/Mathematical-Typesetting-English.srt deleted file mode 100644 index 95d6d4c..0000000 --- a/media/videos/14/10/Mathematical-Typesetting-English.srt +++ /dev/null @@ -1,546 +0,0 @@ -Narration - -1 -00:00:01 --> 00:00:05 -Welcome to this spoken tutorial on Mathematical Typesetting in LaTeX. - -2 -00:00:06 --> 00:00:07 -My name is Kannan Moudgalya. - -3 -00:00:08 --> 00:00:14 -A reminder: we should call it LaTeX and not latex. - -4 -00:00:15 --> 00:00:19 -In this tutorial, we will learn how to create mathematical symbols in LaTeX. - -5 -00:00:20 --> 00:00:28 -In particular, how to get into and leave from the mathematical mode. The role of spaces and creating them, - -6 -00:00:29 --> 00:00:30 -Mathematical symbols. - -7 -00:00:31 --> 00:00:36 -Finally, A M S math package and its use in creating matrices. - -8 -00:00:37 --> 00:00:42 -I am creating this tutorial on our less than 10,000 Rupee laptop. - -9 -00:00:43 --> 00:00:46 -I am using Ubuntu, TeXworks and LaTeX. - -10 -00:00:47 --> 00:00:52 -The prerequisites are the following- basic spoken tutorials on LaTeX, - -11 -00:00:53 --> 00:00:55 -exposure to the side-by-side tutorial. - -12 -00:00:56 --> 00:00:59 -All are available from our website. - -13 -00:01:00 --> 00:01:03 -I shall use the file 'maths.tex'. - -14 -00:01:04 --> 00:01:10 -It is available as a code file in our web page where you found this tutorial. - -15 -00:01:11 --> 00:01:16 -In the same location, you will find this 'pdf' file from the TeX user group, India. - -16 -00:01:17 --> 00:01:19 -We shall use it when we do assignments - -17 -00:01:20 --> 00:01:23 -Let me go to the ‘TeXworks’ window. - -18 -00:01:24 --> 00:01:26 -I have already opened the file 'maths.tex'. - -19 -00:01:27 --> 00:01:31 -Please download this file and practise along with me. - -20 -00:01:32 --> 00:01:35 -We have already seen the commands that are at the top of this file. - -21 -00:01:36 --> 00:01:41 -This command removes the paragraph indent. - -22 -00:01:42 --> 00:01:46 -We will study the effect of this statement through an assignment. - -23 -00:01:47 --> 00:01:51 -Let us start with Greek symbols that are used in mathematics. - -24 -00:01:52 --> 00:01:56 -We use dollar sign to get into mathematical mode in LaTeX. - -25 -00:01:57 --> 00:02:05 -Let us begin with alpha. We write dollar back slash alpha dollar. - -26 -00:02:06 --> 00:02:14 -Let us compile and see that we get the Greek letter alpha in the 'pdf'. - -27 -00:02:15 --> 00:02:19 -The first dollar says that we are getting into the mathematical mode. - -28 -00:02:20 --> 00:02:23 -The second dollar says that we are leaving this mode. - -29 -00:02:24 --> 00:02:29 -From now on, I will not explicitly mention dollar or the back slash. - -30 -00:02:30 --> 00:02:33 -But you have to do exactly what you see on the screen. - -31 -00:02:34 --> 00:02:49 -Similarly we write beta, gamma and delta. Let us compile. - -32 -00:02:50 --> 00:02:55 -I did not save the 'tex' file, as TeXworks does it automatically. - -33 -00:02:56 --> 00:02:59 -Let us delete these. - -34 -00:03:00 --> 00:03:04 -We will next take up the concept of spaces in mathematical expressions. - -35 -00:03:05 --> 00:03:11 -How do we generate alpha a, that is, the product of alpha and 'a'? - -36 -00:03:12 --> 00:03:16 -Let us try 'alpha a'. - -37 -00:03:17 --> 00:03:20 -Let me compile. - -38 -00:03:21 --> 00:03:26 -'LaTeX' complains that 'alpha a' is an undefined control sequence. - -39 -00:03:27 --> 00:03:33 -It says that it does not understand this command. Let me close this. - -40 -00:03:34 --> 00:03:38 -LaTeX handles this through a space after every command. - -41 -00:03:39 --> 00:03:43 -Let us leave a space after 'alpha'. - -42 -00:03:44 --> 00:03:51 -Let us abort the compilation. Let's recompile; this has solved the problem. - -43 -00:03:52 --> 00:03:56 -As it is used to terminate a command, the space does not appear in 'pdf'. - -44 -00:03:57 --> 00:04:02 -What do we do if we WANT to introduce spaces in the output? - -45 -00:04:03 --> 00:04:06 -We have to explicitly tell LaTeX, as we do now. - -46 -00:04:07 --> 00:04:10 -Let us ask LaTeX to start a new line. - -47 -00:04:11 --> 00:04:16 -Let us write alpha backslash space a. - -48 -00:04:17 --> 00:04:19 -Compile it. - -49 -00:04:20 --> 00:04:22 -This has created a space. - -50 -00:04:23 --> 00:04:30 -If you want more space, use 'quad', as we do now. - -51 -00:04:31 --> 00:04:33 -Compile it. - -52 -00:04:34 --> 00:04:39 -You can see that 'quad' has left a large space. - -53 -00:04:40 --> 00:04:42 -We will now move to another topic. - -54 -00:04:43 --> 00:04:49 -Let us delete the last two lines. Let’s compile. - -55 -00:04:50 --> 00:04:55 -What happens to the font when we go from the text to the mathematical mode? - -56 -00:04:56 --> 00:05:03 -To understand this, let us write “Product of $\alpha and a is”. - -57 -00:05:04 --> 00:05:06 -Compile. - -58 -00:05:07 --> 00:05:13 -You can see that the font of these two 'a' s are different. - -59 -00:05:14 --> 00:05:24 -This is solved by writing this 'a' also inside dollar signs. - -60 -00:05:25 --> 00:05:26 -Let me compile. - -61 -00:05:27 --> 00:05:31 -Now the fonts of these two 'a' s are identical. - -62 -00:05:32 --> 00:05:36 -Not keeping the font of variables identical is a common mistake. - -63 -00:05:37 --> 00:05:39 -Let’s get rid of these. - -64 -00:05:40 --> 00:05:42 -Let’s compile. - -65 -00:05:43 --> 00:05:47 -Let us now discuss a rule for creating minus signs. - -66 -00:05:48 --> 00:05:57 -Suppose that we want to create minus alpha and compile. - -67 -00:05:58 --> 00:06:00 -Let’s compile. - -68 -00:06:01 --> 00:06:06 -Notice that the minus sign appears as a small dash here. - -69 -00:06:07 --> 00:06:14 -Let us also copy with the minus sign, inside the dollar sign. - -70 -00:06:15 --> 00:06:17 -Let us compile again. - -71 -00:06:18 --> 00:06:26 -See the difference in the minus sign now. The second one is what we need, the dash is not to be used. - -72 -00:06:27 --> 00:06:32 -Not putting the minus sign within dollars is a common mistake made by beginners. - -73 -00:06:33 --> 00:06:35 -Let us delete all of these. - -74 -00:06:36 --> 00:06:42 -Next we would like to explain the 'frac' command that is used to create fractions. - -75 -00:06:43 --> 00:06:49 -'frac a b'. Let's compile. - -76 -00:06:50 --> 00:06:59 -It generates 'a' by 'b'. The command 'frac' is terminated by a space. It looks for two arguments. - -77 -00:07:00 --> 00:07:06 -The first character 'a' is taken as the first argument. It becomes the numerator. - -78 -00:07:07 --> 00:07:12 -The second character 'b' is taken as the second argument; it becomes the denominator. - -79 -00:07:13 --> 00:07:19 -Notice that the size of 'a' and 'b' gets reduced automatically. - -80 -00:07:20 --> 00:07:23 -What do we do if we have longer characters? - -81 -00:07:24 --> 00:07:30 -What if we want to create 'ab' by 'cd'? I want you to try this. - -82 -00:07:31 --> 00:07:36 -In LaTeX, the arguments longer than one character are enclosed by braces. - -83 -00:07:37 --> 00:07:40 -For example, let us put braces here. - -84 -00:07:41 --> 00:07:46 -When we compile this, we get the desired output. - -85 -00:07:47 --> 00:07:51 -All the entries within the braces are taken as a single argument. - -86 -00:07:52 --> 00:08:00 -As a result, one can enter any complicated expression within braces. Let us delete all of these. - -87 -00:08:01 --> 00:08:04 -Now we will look at subscripts and superscripts. - -88 -00:08:05 --> 00:08:13 -x underscore a creates x sub a. - -89 -00:08:14 --> 00:08:18 -The size of 'a' gets automatically reduced to an appropriate level. - -90 -00:08:19 --> 00:08:27 -What if we want to put 'ab' as the subscript? you have to use braces. Try it yourself. - -91 -00:08:28 --> 00:08:32 -Superscripts are created by the caret or the up arrow symbol. - -92 -00:08:33 --> 00:08:42 -For example, if you want to create 'x' to the power 3, you will write: x up arrow 3. - -93 -00:08:43 --> 00:08:47 -We can also put subscripts and superscripts simultaneously. - -94 -00:08:48 --> 00:08:57 -Let us put x sub a superscript b; let’s compile. - -95 -00:08:58 --> 00:09:07 -Once again, using braces, we can produce complicated subscripts and superscripts. Let me delete this. - -96 -00:09:08 --> 00:09:11 -Alright.. next we will move onto Matrices. - -97 -00:09:12 --> 00:09:18 -The package a m s math has some matrix definitions that I like. - -98 -00:09:19 --> 00:09:25 -Let us include it through the 'usepackage' command. - -99 -00:09:26 --> 00:09:30 -The ampersand, that is, the 'and' symbol is used to separate the columns. - -100 -00:09:31 --> 00:09:33 -Let us create a matrix now. - -101 -00:09:34 --> 00:09:43 -We write 'begin matrix' 'a' and 'b', 'end matrix'. Don’t forget the dollar signs. - -102 -00:09:44 --> 00:09:48 -Compile and see the matrix, as expected. - -103 -00:09:49 --> 00:09:58 -Now suppose, we want to add a second row to this, we put two back slashes, meaning, go to the next line. - -104 -00:09:59 --> 00:10:10 -Suppose that we want three entries in the second row, say, 'c, d, e'. Compile it and see the second row also included now. - -105 -00:10:11 --> 00:10:16 -Supposing we change matrix to 'pmatrix', at 'begin' and 'end'. - -106 -00:10:17 --> 00:10:20 -Compile and get this. - -107 -00:10:21 --> 00:10:27 -It is now time for you to start exploring. Let us go to the slides now. - -108 -00:10:28 --> 00:10:30 -Let us summarise what we learnt in this tutorial- - -109 -00:10:31 --> 00:10:36 -Entering and leaving the mathematical mode Using spaces and creating them - -110 -00:10:37 --> 00:10:43 -Fractions, subscripts and superscripts Defining an argument with in braces - -111 -00:10:44 --> 00:10:47 -'amsmath' package to create matrices. - -112 -00:10:48 --> 00:10:50 -Let me give some assignments. - -113 -00:10:51 --> 00:11:00 -This assignment is on spaces - large and small, please pause the video, read the slide and do the assignment. - -114 -00:11:01 --> 00:11:05 -This assignment is on fractions using braces. - -115 -00:11:06 --> 00:11:10 -This assignment is on subscripts and superscripts. - -116 -00:11:11 --> 00:11:16 -Through this assignment, we shall learn a few more methods to create matrices. - -117 -00:11:17 --> 00:11:20 -This assignment is on creating more mathematical symbols. - -118 -00:11:21 --> 00:11:28 -This is based on the TUG India LaTeX guide. Let us see that document now. - -119 -00:11:29 --> 00:11:33 -I already asked you to download this document from our web page. - -120 -00:11:34 --> 00:11:38 -You will reproduce some symbols given in this document. - -121 -00:11:39 --> 00:11:42 -You will try out more symbols through in the next assignment. - -122 -00:11:43 --> 00:11:47 -This assignment is also based on the TUG India document. - -123 -00:11:48 --> 00:11:52 -You will experiment with the paragraph indent in this assignment. - -124 -00:11:53 --> 00:11:55 -This brings us to the end of this tutorial. - -125 -00:11:56 --> 00:11:59 -This video summarises the Spoken Tutorial project. - -126 -00:12:00 --> 00:12:03 -If you do not have good bandwidth, you may download and watch it. - -127 -00:12:04 --> 00:12:10 -We conduct workshops using Spoken Tutorials. Give certificates. Please contact us. - -128 -00:12:11 --> 00:12:19 -Do you have questions in THIS Spoken Tutorial? please visit this site, choose the minute and second where you have the question. - -129 -00:12:20 --> 00:12:26 -Explain your question briefly. Someone from our team will answer them. - -130 -00:12:27 --> 00:12:35 -The Spoken Tutorial forum is for specific questions on this tutorial. Please do not post unrelated and general questions. - -131 -00:12:36 --> 00:12:43 -This will help reduce the clutter. With less clutter, we can use these discussions as instructional material. - -132 -00:12:44 --> 00:12:49 -For topics not covered in spoken tutorials, visit stack exchange at this address. - -133 -00:12:50 --> 00:12:52 -This is a great place to get answers on LaTeX. - -134 -00:12:53 --> 00:13:02 -You may also have questions on our workshops, certificates, etc. For this, get in touch with us at this email address. - -135 -00:13:03 --> 00:13:08 -Spoken Tutorial project is funded by NMEICT, MHRD, Government of India. - -136 -00:13:09 --> 00:13:14 -Thanks for joining Goodbye. - diff --git a/media/videos/14/11/Equations-English.srt b/media/videos/14/11/Equations-English.srt deleted file mode 100644 index a412797..0000000 --- a/media/videos/14/11/Equations-English.srt +++ /dev/null @@ -1,586 +0,0 @@ -Narration - -1 -00:00:00 --> 00:00:05 -Welcome to this tutorial on creating equations through Latex. - -2 -00:00:06 --> 00:00:09 -You see three windows as usual. - -3 -00:00:10 --> 00:00:29 -I have created a 12pt size, article class document. And using AMSmath package and also using the 'ccliscences' package for creative commons copyright statement as here. - -4 -00:00:30 --> 00:00:42 -make title creates the title page. new page command takes the rest of the document to a new page. - -5 -00:00:43 --> 00:00:50 -There are many ways to create equations, I will use the command align star to create equations. - -6 -00:00:51 --> 00:01:02 -Let us begin with a matrix differential equation consisting of four components. - -7 -00:01:03 --> 00:01:26 -Align star, Frac d by dt of begin b-matrix, x_1, next line x_2, end b-matrix. - -8 -00:01:27 --> 00:01:36 -Let me close this. Let us compile it. - -9 -00:01:37 --> 00:01:41 -So we have created ‘d by dt of x1 x2’. - -10 -00:01:42 --> 00:01:47 -Let us now augment the vector with two more components. - -11 -00:01:48 --> 00:02:02 -You do it as follows. Next line x3, next line x4. Save it. Compile it. So I have four components. - -12 -00:02:03 --> 00:02:19 -Let me now say that this is equal to the right hand side matrix begin b-matrix. - -13 -00:02:20 --> 00:02:28 -Zero, zero, one, zero. - -14 -00:02:29 --> 00:02:36 -Next line: zero, zero, zero, one. - -15 -00:02:37 --> 00:02:46 -And then, let's close this matrix. Save. - -16 -00:02:47 --> 00:02:52 -So I have this. So I have written the first two rows. - -17 -00:02:53 --> 00:02:59 -It is always a good idea to compile after every few small additions so that we have not made a mistake. - -18 -00:03:00 --> 00:03:05 -Note that the align star environment takes the role of the dollar signs. - -19 -00:03:06 --> 00:03:13 -For example, we did not enter the dollar sign at all. As a matter of fact, we should not enter the dollar sign within the align star environment. - -20 -00:03:14 --> 00:03:24 -Let us add a third line to the matrix on the right hand side and illustrate this idea. - -21 -00:03:25 --> 00:03:49 -Zero, dollar minus gamma, zero, zero. So there are four entries. Compile it. It comes and says, missing dollar inserted. - -22 -00:03:50 --> 00:03:58 -What we will do is, let's come here, get rid of these dollar signs. Save it. - -23 -00:03:59 --> 00:04:27 -Exit compilation by this x. recompile it and note that minus gamma has come. So we need one more line here, we put that. Zero, alpha without dollar sign, zero, zero. Alright, now this is the way to do that. - -24 -00:04:28 --> 00:04:33 -Let's complete this equation. I have a few more terms here. - -25 -00:04:34 --> 00:04:38 -Let me just see if it is here, yes, it is here. - -26 -00:04:39 --> 00:04:45 -Let’s cut this. Put this here. - -27 -00:04:46 --> 00:04:51 -Let’s see what happens when I compile this. - -28 -00:04:52 --> 00:04:58 -This is a model of an inverted pendulum. - -29 -00:04:59 --> 00:05:03 -What do you do when you have more than one equation? - -30 -00:05:04 --> 00:05:12 -Let us add one more align statement. And I have written this equation here. - -31 -00:05:13 --> 00:05:16 -Let me bring it from there. - -32 -00:05:17 --> 00:05:25 -Here is the equation, so let me say begin align star. - -33 -00:05:26 --> 00:05:38 -Let’s cut this. Copy this. Close this align. We compile it. - -34 -00:05:39 --> 00:05:43 -When I compile it, I get the second equation appearing. - -35 -00:05:44 --> 00:05:51 -There are two problems with this. There is a large gap between the two equations, also we may want to align the equations. - -36 -00:05:52 --> 00:06:00 -In view of these observations, we put both of these equations into a single align star environment. - -37 -00:06:01 --> 00:06:07 -So we will do this as follows. Delete this. - -38 -00:06:08 --> 00:06:13 -Save this. Compile it. - -39 -00:06:14 --> 00:06:19 -Now what has happened is that both the equations have come on the same line. - -40 -00:06:20 --> 00:06:32 -We will take care of that by telling latex to split this by the reverse slash. Two of them. - -41 -00:06:33 --> 00:06:39 -When I compile it, now these have gone to second equation. - -42 -00:06:40 --> 00:06:59 -But the equations are not aligned. Suppose that we want to align the 'equal to' sign, suppose we want to align these two signs, we put an ampersand symbol in front of the 'equal to' signs here. Let's put it. - -43 -00:07:00 --> 00:07:17 -And then we will put it here also. Ampersand. Let’s compile this. Now notice that both of them are aligned. - -44 -00:07:18 --> 00:07:23 -Suppose that we want to introduce some text in between the equations without upsetting the alignment. - -45 -00:07:24 --> 00:07:28 -This can be achieved using the inter-text command. - -46 -00:07:29 --> 00:07:47 -So we remove... we made a mistake here, the 'delta mu' has come here. So, what we should do is, let us first put this properly, compile this. - -47 -00:07:48 --> 00:07:50 -Now 'delta mu' has come there. 'U of t' is here. - -48 -00:07:51 --> 00:08:06 -Now we want to introduce some text between these two. So the line separator slash slash is removed and in that place we introduce this text that we want to include. - -49 -00:08:07 --> 00:08:23 -Let’s take this text and put it there. Whatever text we want to put, appears in braces with an inter-text command. - -50 -00:08:24 --> 00:08:36 -Note that the opening brace has to be closed, not closing the brace is a common mistake made by the beginners. - -51 -00:08:37 --> 00:08:49 -Let's compile this. So here is the text and you also have the equations aligned. - -52 -00:08:50 --> 00:08:53 -Note also the use of the dollar sign within the inter-text command. - -53 -00:08:54 --> 00:09:02 -Inter-text is like running text, so this is not really a part of the align environment. You need to include dollars here. - -54 -00:09:03 --> 00:09:13 -These equations don’t have numbers. In fact, the star in the align star command has told latex not to put the equation numbers. - -55 -00:09:14 --> 00:09:29 -Let us remove the star and see what the align environment does. Let’s remove the star here. Also remove the star here. Let’s see what happens. - -56 -00:09:30 --> 00:09:35 -So equation numbers have appeared automatically. - -57 -00:09:36 --> 00:09:48 -We want to refer to them, so for example, let’s say we want to refer to them, so I have this here. - -58 -00:09:49 --> 00:09:54 -Suppose, this is the second equation I want to discretize, so I write this statement. - -59 -00:09:55 --> 00:10:03 -Let me take this here, below this, put it. - -60 -00:10:04 --> 00:10:12 -Let me compile it. So it says "we will now discretize the PID controller given in equation 2". - -61 -00:10:13 --> 00:10:19 -The equation numbers unfortunately may change while insertion or deletion of equations. - -62 -00:10:20 --> 00:10:31 -To demonstrate this, let us suppose, we include an equation here. - -63 -00:10:32 --> 00:10:39 -Slash, slash, a equals b. - -64 -00:10:40 --> 00:10:46 -And then we will delete these lines. Let’s compile this. - -65 -00:10:47 --> 00:10:52 -Now I have 'a equals b' as the second equation. Now this has become the third equation. - -66 -00:10:53 --> 00:11:03 -Here we have hard-coded that equation 2 has to be discretized but this is no longer the second equation. - -67 -00:11:04 --> 00:11:11 -Hard-coding of equation numbers in referencing always has this problem. This is solved by the label command. - -68 -00:11:12 --> 00:11:38 -So, let us come here and here at the end of the equation we introduce ‘label equation PID’ and then here I write in equation ‘ref’, ref is the command and whatever that comes here label, should appear here also, again within the braces, 'equation PID’. - -69 -00:11:39 --> 00:11:46 -Let's see what happens when I compile it. - -70 -00:11:47 --> 00:11:51 -On compiling it, we see question marks here. - -71 -00:11:52 --> 00:12:02 -On second compilation, see what has happened here – now it has become three. On second compilation the numbers become correct. - -72 -00:12:03 --> 00:12:07 -This is similar to what we saw in table of contents. - -73 -00:12:08 --> 00:12:14 -Let us now delete the 'a equals b' equation. - -74 -00:12:15 --> 00:12:21 -Let us get rid of this also. - -75 -00:12:22 --> 00:12:29 -Let’s compile it. This equation 2 is gone but you still have this three. - -76 -00:12:30 --> 00:12:39 -On first compilation the reference gives the previous number, on second compilation the numbers become correct. - -77 -00:12:40 --> 00:12:53 -The labels are case sensitive. For example, here I have called it equation PID, PID is in capitals. Let’s change this to small pid. - -78 -00:12:54 --> 00:13:01 -What happens now, here it says that it doesn’t know that. - -79 -00:13:02 --> 00:13:20 -It's only that these have to be identical, these need not be characters. For example, suppose I want to give numbers here, let me just put hundred, let me put 100. Save it. Compile it. - -80 -00:13:21 --> 00:13:29 -Okay, it doesn’t know it yet in the first compilation but if I compile it second time it will know. Numbers are the same. - -81 -00:13:30 --> 00:13:34 -In a similar way we can create labels for sections, sub-sections and so on. - -82 -00:13:35 --> 00:13:44 -So let us do that, let us demonstrate this with section. Let us do it here. - -83 -00:13:45 --> 00:13:55 -section, this is first section, label sec 100. - -84 -00:13:56 --> 00:13:59 -Then we go to the end of the document here. - -85 -00:14:00 --> 00:14:22 -And say: section ref sec-100, shows how to write equations. Save it here. - -86 -00:14:23 --> 00:14:25 -‘Section, question marks shows how to write equations’. - -87 -00:14:26 --> 00:14:29 -On next compilation, this is taken care of. - -88 -00:14:30 --> 00:14:33 -So section 1, this number is the same as this number. - -89 -00:14:34 --> 00:14:41 -So this works for sections, sub-sections and so on. In fact, with any environment that has a number associated with it. - -90 -00:14:42 --> 00:14:55 -Alright, let’s delete these. - -91 -00:14:56 --> 00:15:03 -Let's compile these once again. Alright. - -92 -00:15:04 --> 00:15:08 -We will now see how to accommodate long equations. - -93 -00:15:09 --> 00:15:22 -So, I have already written it here. Let me just go there at the end of the document, okay here it is. - -94 -00:15:23 --> 00:15:28 -Okay. So let me add this. - -95 -00:15:29 --> 00:15:39 -Put it here. Let's see what happens when I compile it. - -96 -00:15:40 --> 00:15:48 -So I have a third equation that I have added here, it’s a long equation. It’s a long equation so it doesn’t fit into one line. - -97 -00:15:49 --> 00:16:10 -So let us break it into two. The way to do that is, let us break it here, slash slash and come here and I’m putting an align with this ampersand. - -98 -00:16:11 --> 00:16:25 -Let me save it, compile it. See that this equation has been broken into two parts and I am aligning it with the plus sign. - -99 -00:16:26 --> 00:16:29 -All these equal signs and plus signs are aligned now. - -100 -00:16:30 --> 00:16:34 -Unfortunately we have equation numbers in both parts. - -101 -00:16:35 --> 00:16:50 -Supposing we don’t want the number in the first line, suppose we don’t want this number. Include the command ‘no number’ before this slash, slash symbol. Do this as follows. - -102 -00:16:51 --> 00:17:01 -Save this. Compile this. See that this equation number is gone and this has become three automatically. - -103 -00:17:02 --> 00:17:15 -We see that the braces we wanted in some terms are missing. For example, here I have said e n, e n minus 1. Here it appears without these braces. This is because, braces are delimiters in latex. - -104 -00:17:16 --> 00:17:23 -We now want to tell latex to not interpret these braces. This is done by putting a reverse slash before the braces. - -105 -00:17:24 --> 00:17:35 -Let me put a reverse slash here. Let me also put a reverse slash here. - -106 -00:17:36 --> 00:17:45 -See that now we have the braces here; similarly let's put it here also. - -107 -00:17:46 --> 00:17:57 -Here and here. Let'sSave this, now we have got that. - -108 -00:17:58 --> 00:18:07 -We will now show how to create large brackets in equations. For example, here, these brackets are very small. - -109 -00:18:08 --> 00:18:14 -The way to do that is using – what are known as left and right commands. - -110 -00:18:15 --> 00:18:20 -So let's come here – so the equation is here. - -111 -00:18:21 --> 00:18:37 -The way to do this is – K slash left and on this side I have this, so here I put slash right. - -112 -00:18:38 --> 00:18:44 -Let’s compile this. See this, it has become bigger. - -113 -00:18:45 --> 00:18:57 -We can do this also with square brackets. - -114 -00:18:58 --> 00:19:11 -I got square brackets. I can also put braces, only thing is that I have to tell latex not to interpret. So I put a slash brace. - -115 -00:19:12 --> 00:19:16 -Let’s compile this. - -116 -00:19:17 --> 00:19:21 -See this braces. - -117 -00:19:22 --> 00:19:34 -When we have one equation split into multiple lines, we will have to put only the left on the first. For example, here, we have a bracket here, we have a bracket here, I want to make this slightly bigger. So let me do that here. - -118 -00:19:35 --> 00:19:56 -Suppose for example, I want to put a left bracket here and here I want to put a right bracket. Compile it. - -119 -00:19:57 --> 00:20:03 -It comes and complains ‘forgotten right’, because I opened it here but I didn’t close it in the same equation. - -120 -00:20:04 --> 00:20:14 -The way to do that is to use what is known as slash right dot, that means don’t worry about the right hand side. - -121 -00:20:15 --> 00:20:29 -Similarly , here we have to say slash left dot, don’t worry about the left here. Let me exit here. Let me re-compile it. So this is taken care of. - -122 -00:20:30 --> 00:20:44 -Now suppose I want to push this a little inside. I can always say slash h-space 1cm. - -123 -00:20:45 --> 00:20:50 -Let me just do that shift. - -124 -00:20:51 --> 00:20:53 -So, this has been shifted, this has been aligned. - -125 -00:20:54 --> 00:20:58 -If you don’t want this, you want the plus sign to come inside, - -126 -00:20:59 --> 00:21:07 -let’s do this here, put the plus sign here. - -127 -00:21:08 --> 00:21:16 -Okay, this plus is inside. Now this is nicely done. - -128 -00:21:17 --> 00:21:26 -All commands that work in between the dollar signs also work between the aligned environment but for the ampersand symbol that is used for the aligning of multiple equations. - -129 -00:21:27 --> 00:21:31 -All commands that work in the aligned environment also work within the dollar symbols. - -130 -00:21:32 --> 00:21:40 -Nevertheless, there is a small difference in the way some outputs appear in the aligned environment and in the running mode obtained with the dollar. - -131 -00:21:41 --> 00:21:45 -This can be illustrated with the integral mode. - -132 -00:21:46 --> 00:21:49 -So let's come here. - -133 -00:21:50 --> 00:21:52 -Let me delete these. - -134 -00:21:53 --> 00:22:09 -So I have this statement here. Let me take this, - -135 -00:22:10 --> 00:22:14 -let me put it here. - -136 -00:22:15 --> 00:22:20 -"The integral mode includes the term" this integral. - -137 -00:22:21 --> 00:22:27 -Let me close this, otherwise alignment will complain. - -138 -00:22:28 --> 00:22:32 -So what I have done is: "The integral mode includes the term" this integral. - -139 -00:22:33 --> 00:22:46 -Note the size of this integral and size of this integral. This is a lot bigger and this is smaller. - -140 -00:22:47 --> 00:22:51 -Such changes also occur in the case of fractions, sum and product to cite a few. - -141 -00:22:52 --> 00:22:57 -There is one other thing that I want to tell before completing this tutorial. - -142 -00:22:58 --> 00:23:10 -Aligned environment does not like blank lines in between. Suppose for example, I create a blank line here. - -143 -00:23:11 --> 00:23:23 -It comes and says that paragraph ended before alignment was complete. If you really want a space, leave a percentage which tells latex that it is a comment. - -144 -00:23:24 --> 00:23:31 -Re-compiling. It goes through and you get all the text as before. - -145 -00:23:32 --> 00:23:36 -This brings us to the end of this tutorial. Thanks for listening. - -146 -00:23:37 --> 00:23:42 -This is Kannan Moudgalya, signing off. Good-bye. - diff --git a/media/videos/14/12/Tables-and-Figures-English.srt b/media/videos/14/12/Tables-and-Figures-English.srt deleted file mode 100644 index f070313..0000000 --- a/media/videos/14/12/Tables-and-Figures-English.srt +++ /dev/null @@ -1,1006 +0,0 @@ -Narration - -1 -00:00:00 --> 00:00:04 -Welcome to this tutorial on Tables and Figures. - -2 -00:00:05 --> 00:00:07 -We have two objectives in this tutorial. - -3 -00:00:08 --> 00:00:21 -The first one is to explain how to create tables using the tabular environment; the second objective is to explain how to include tables in latex documents using the table environment. - -4 -00:00:22 --> 00:00:26 -A similar technique can be used to include figures also. - -5 -00:00:27 --> 00:00:31 -We have seen how to create the title page, - -6 -00:00:32 --> 00:00:44 -this one has title, author information, and Creative Commons, copyright information as explained in the tutorial on equations. - -7 -00:00:45 --> 00:00:50 -Today’s date appears in the last column created by this command. - -8 -00:00:51 --> 00:00:57 -Let us go to the second page. - -9 -00:00:58 --> 00:01:04 -I will now explain to you, how to create this table in a step-by-step fashion. - -10 -00:01:05 --> 00:01:07 -Let us start with a clean slate. - -11 -00:01:08 --> 00:01:18 -Let me delete these commands. - -12 -00:01:19 --> 00:01:28 -I will compile this and start with a clean slate. - -13 -00:01:29 --> 00:01:37 -The tabular environment is created using begin tabular and end tabular commands. - -14 -00:01:38 --> 00:02:02 -Let me do that here. - -15 -00:02:03 --> 00:02:13 -The ‘r r’ characters within the braces, next to the begin tabular, say that there are two columns and that they are right aligned. - -16 -00:02:14 --> 00:02:19 -In the first line, the entries are "mango" and "mixed". - -17 -00:02:20 --> 00:02:23 -Two reverse-slashes indicate next line. - -18 -00:02:24 --> 00:02:27 -Let me enter the next line. - -19 -00:02:28 --> 00:02:31 -"Jackfruit". - -20 -00:02:32 --> 00:02:36 -"Kolli hills". - -21 -00:02:37 --> 00:02:39 -"Banana". - -22 -00:02:40 --> 00:02:41 -"Green". - -23 -00:02:42 --> 00:02:46 -Let me end this tabular environment. - -24 -00:02:47 --> 00:02:50 -Let me compile this. - -25 -00:02:51 --> 00:02:55 -And, this has appeared here. - -26 -00:02:56 --> 00:03:01 -We get the 3 by 2 table. There are three rows and 2 columns. - -27 -00:03:02 --> 00:03:08 -The two columns are right aligned as indicated by the 'r r' character. - -28 -00:03:09 --> 00:03:19 -To separate the two columns, we introduce a vertical line between the column alignment characters. - -29 -00:03:20 --> 00:03:22 -So, let me put that vertical line. - -30 -00:03:23 --> 00:03:27 -Save it,Compile it. - -31 -00:03:28 --> 00:03:30 -You see that a vertical line has come. - -32 -00:03:31 --> 00:03:41 -If you want vertical lines at the end also, put them at appropriate places. - -33 -00:03:42 --> 00:03:47 -Let me put them, save them, compile them. - -34 -00:03:48 --> 00:03:49 -So, these have come. - -35 -00:03:50 --> 00:03:53 -As a matter of fact, we can put more vertical lines. - -36 -00:03:54 --> 00:04:01 -Let me put one more vertical line at the beginning. - -37 -00:04:02 --> 00:04:06 -There you are! A second line has come. - -38 -00:04:07 --> 00:04:10 -See there are two vertical lines. - -39 -00:04:11 --> 00:04:14 -We will now try different alignments. - -40 -00:04:15 --> 00:04:26 -Let's put a ‘c’ here to say that the second column should be center aligned. - -41 -00:04:27 --> 00:04:29 -This is center aligned now. - -42 -00:04:30 --> 00:04:33 -Let us make the first column left aligned. - -43 -00:04:34 --> 00:04:39 -Right now, it is right aligned; let me make them left aligned. - -44 -00:04:40 --> 00:04:42 -'l',Save - -45 -00:04:43 --> 00:04:45 -Compile. - -46 -00:04:46 --> 00:04:49 -Now it is left aligned. - -47 -00:04:50 --> 00:04:55 -We will now separate the rows with horizontal lines as follows. - -48 -00:04:56 --> 00:04:59 -Let's put a h-line here. - -49 -00:05:00 --> 00:05:03 -Let us see what happens when we do that. - -50 -00:05:04 --> 00:05:06 -It puts a top line. - -51 -00:05:07 --> 00:05:15 -If I put another h-line here, - -52 -00:05:16 --> 00:05:18 -see a line has come,So, let me complete this. - -53 -00:05:19 --> 00:05:21 -Let me put h-line. - -54 -00:05:22 --> 00:05:29 -Here I have to put a break line with two reverse slashes and then h-line. - -55 -00:05:30 --> 00:05:35 -H-line begins from the beginning of the sentence. - -56 -00:05:36 --> 00:05:41 -So, now I have completed the horizontal lines. - -57 -00:05:42 --> 00:05:48 -Now, let us add three more columns and one more row. - -58 -00:05:49 --> 00:06:00 -So, what I do is- I come here, and 'c' , 'c', 'r'. - -59 -00:06:01 --> 00:06:07 -So, I have added three more columns, first two of them are center aligned the third one is right aligned. - -60 -00:06:08 --> 00:06:14 -And then here I want to say: - -61 -00:06:15 --> 00:06:18 -"fruit" - -62 -00:06:19 --> 00:06:21 -"type" - -63 -00:06:22 --> 00:06:25 -"number of units" - -64 -00:06:26 --> 00:06:29 -"cost per unit" - -65 -00:06:30 --> 00:06:37 -"cost rupees" - -66 -00:06:38 --> 00:06:40 -h-line. - -67 -00:06:41 --> 00:06:42 -So, "mixed" - -68 -00:06:43 --> 00:06:44 -"20" - -69 -00:06:45 --> 00:06:46 -"75" rupees - -70 -00:06:47 --> 00:06:50 -"1500" rupees. - -71 -00:06:51 --> 00:06:53 -"Jackfruit" - -72 -00:06:54 --> 00:06:56 -"10" of them - -73 -00:06:57 --> 00:06:58 -"50" rupees - -74 -00:06:59 --> 00:07:00 -"500" rupees. - -75 -00:07:01 --> 00:07:04 -"Banana green" - -76 -00:07:05 --> 00:07:06 -"10" dozens - -77 -00:07:07 --> 00:07:11 -"20" rupees a dozen and "200" rupees total. - -78 -00:07:12 --> 00:07:19 -So, let’s see whether we can compile this. - -79 -00:07:20 --> 00:07:24 -So, it has created the table. - -80 -00:07:25 --> 00:07:33 -See the need for right alignment, this is.. so that we can add these numbers. - -81 -00:07:34 --> 00:07:38 -Suppose, that we want to split the columns in two. - -82 -00:07:39 --> 00:07:47 -For example, here these two columns have fruit details and these three have cost calculations. - -83 -00:07:48 --> 00:07:54 -So, this is done with the help of what is known as multi-column command. - -84 -00:07:55 --> 00:07:58 -Let me do it as follows. - -85 -00:07:59 --> 00:08:03 -multi-column - -86 -00:08:04 --> 00:08:05 -take 2 - -87 -00:08:06 --> 00:08:09 -center-aligned - -88 -00:08:10 --> 00:08:11 -Fruit Details. - -89 -00:08:12 --> 00:08:18 -First two are over then I put a tab to indicate the next column. - -90 -00:08:19 --> 00:08:23 -Go to the next line. - -91 -00:08:24 --> 00:08:28 -multi-column, three, also to be center-aligned. - -92 -00:08:29 --> 00:08:36 -Cost within braces – cost calculations - -93 -00:08:37 --> 00:08:43 -slash h-line. - -94 -00:08:44 --> 00:08:45 -So, there you are. - -95 -00:08:46 --> 00:08:51 -The first two have the title "Fruit details", the next three have the title "Cost calculations". - -96 -00:08:52 --> 00:08:58 -I don’t have the vertical lines that’s because I didn’t tell latex to do that. So let’s do that. - -97 -00:08:59 --> 00:09:04 -Here, I want two vertical lines, here I want one vertical line. - -98 -00:09:05 --> 00:09:10 -Before this, I already have the line here, so let me just put this here. - -99 -00:09:11 --> 00:09:15 -See what happens. - -100 -00:09:16 --> 00:09:23 -So, now the vertical lines have also come. - -101 -00:09:24 --> 00:09:39 -Because these 2 and 3 are single character arguments its possible to write them without braces. - -102 -00:09:40 --> 00:09:41 -Okay, same thing works. - -103 -00:09:42 --> 00:09:51 -Sometimes it is necessary to draw horizontal lines between only a few columns. - -104 -00:09:52 --> 00:09:53 -So, we explain this as follows. - -105 -00:09:54 --> 00:10:04 -Let me split this "mango" instead of "mixed", let me call this "Malgoa" - -106 -00:10:05 --> 00:10:12 -and then "18" kilograms - -107 -00:10:13 --> 00:10:16 -"50" kilograms. - -108 -00:10:17 --> 00:10:22 -Let me delete this. - -109 -00:10:23 --> 00:10:32 -okay,And here, let me say that it is "Alfanso" - -110 -00:10:33 --> 00:10:34 -"2" dozens - -111 -00:10:35 --> 00:10:43 -"300" rupees a dozen, and a total of 1500. - -112 -00:10:44 --> 00:10:49 -Let’s see what happens when I save this. Compile this. - -113 -00:10:50 --> 00:11:18 -So, I’ve got this. What happens is, this line comes here and as well as here and I don’t want this and this. So, this is taken care of by saying instead of this horizontal line, I want a 'c' line and between the columns 2 and 4. - -114 -00:11:19 --> 00:11:21 -So, I should have done this here. - -115 -00:11:22 --> 00:11:26 -So let me put this back here. - -116 -00:11:27 --> 00:11:29 -H-line here. - -117 -00:11:30 --> 00:11:39 -c-line 2 to 4. - -118 -00:11:40 --> 00:11:51 -Okay, so now I have the line between columns two and four only. - -119 -00:11:52 --> 00:11:57 -So, this central line has split the mangoes into two of the most popular mangoes in India. - -120 -00:11:58 --> 00:12:03 -We will conclude this example, conclude this table with a last row. - -121 -00:12:04 --> 00:12:10 -Let me total up as follows. - -122 -00:12:11 --> 00:12:13 -multi-column four - -123 -00:12:14 --> 00:12:19 -2 vertical lines, right-aligned - -124 -00:12:20 --> 00:12:23 -vertical separator - -125 -00:12:24 --> 00:12:26 -Total cost - -126 -00:12:27 --> 00:12:31 -Rupees. - -127 -00:12:32 --> 00:12:34 -Close this. - -128 -00:12:35 --> 00:12:37 -Next tab - -129 -00:12:38 --> 00:12:41 -2200 - -130 -00:12:42 --> 00:12:47 -h-line. - -131 -00:12:48 --> 00:12:49 -So there you are. - -132 -00:12:50 --> 00:12:58 -So, this was the table that we started with at the beginning of this tutorial. - -133 -00:12:59 --> 00:13:03 -How do we work with the tables created using the tabular environment? - -134 -00:13:04 --> 00:13:09 -Latex treats the entire table created using the tabular environment as a single object. - -135 -00:13:10 --> 00:13:16 -For example- if you write, - -136 -00:13:17 --> 00:13:23 -This is - -137 -00:13:24 --> 00:13:26 -an - -138 -00:13:27 --> 00:13:38 -example - -139 -00:13:39 --> 00:13:46 -"This is an example table". - -140 -00:13:47 --> 00:13:55 -What happens is this table gets sandwiched between these two. "This is an" example to, "example table". - -141 -00:13:56 --> 00:14:00 -This table appears in a running sentence. - -142 -00:14:01 --> 00:14:04 -It is possible to include tables using a centre environment. - -143 -00:14:05 --> 00:14:17 -A more common approach is to include it in the table environment. As we show now. - -144 -00:14:18 --> 00:14:20 -begin - -145 -00:14:21 --> 00:14:24 -table - -146 -00:14:25 --> 00:14:32 -Close this. - -147 -00:14:33 --> 00:14:35 -So, what happens is now ‘this is an example table’. - -148 -00:14:36 --> 00:14:49 -This statement comes separately and whatever that appeared between this ‘begin’ and ‘end’ table have been placed separately as a table. - -149 -00:14:50 --> 00:14:56 -In other words, even though the table appears in between some text, it has been put separately. - -150 -00:14:57 --> 00:14:58 -This is not centered. - -151 -00:14:59 --> 00:15:07 -What I can do is, give a command here called ‘centering’ - -152 -00:15:08 --> 00:15:16 -to place this at the center of the document. - -153 -00:15:17 --> 00:15:19 -Let us now create a caption. - -154 -00:15:20 --> 00:15:22 -Table caption is put before the table. - -155 -00:15:23 --> 00:15:30 -Let me put a caption here. - -156 -00:15:31 --> 00:15:41 - "Caption cost of fruits in India". - -157 -00:15:42 --> 00:15:43 -So, the caption has come. - -158 -00:15:44 --> 00:15:46 -This is too close; I want to leave a small space. - -159 -00:15:47 --> 00:15:56 -Let me do that by giving through this v-space command 1 ex. - -160 -00:15:57 --> 00:16:00 -That is the space equivalent of the ‘x’ character. - -161 -00:16:01 --> 00:16:03 -So, I have left this vertical space. - -162 -00:16:04 --> 00:16:05 -So, now it looks okay. - -163 -00:16:06 --> 00:16:10 -By default, Latex places tables at the top of the page. - -164 -00:16:11 --> 00:16:13 -This placement is done automatically. - -165 -00:16:14 --> 00:16:17 -The table is ‘floated’ to the next available slot. - -166 -00:16:18 --> 00:16:24 -To explain this, let me cut and paste some text from the bottom of this document. - -167 -00:16:25 --> 00:16:27 -Let me delete this. - -168 -00:16:28 --> 00:16:37 -Let me delete this. - -169 -00:16:38 --> 00:16:42 -Alright. - -170 -00:16:43 --> 00:16:48 -Now, there is some write up about these fruits. - -171 -00:16:49 --> 00:16:54 -Go to the top of this. - -172 -00:16:55 --> 00:16:57 -Paste it here. - -173 -00:16:58 --> 00:17:00 -Compile it. - -174 -00:17:01 --> 00:17:05 -So, as before, the table got placed at the top of this page. - -175 -00:17:06 --> 00:17:11 -Let me put some more text here. - -176 -00:17:12 --> 00:17:15 -Four copies. - -177 -00:17:16 --> 00:17:25 -So, now what has happened is- - -178 -00:17:26 --> 00:17:30 -this table has been floated to the second page and - -179 -00:17:31 --> 00:17:34 -there is nothing else here. So, it has been placed at the middle of this page. - -180 -00:17:35 --> 00:17:42 -Let me put one more copy of this, some more text. - -181 -00:17:43 --> 00:17:48 -So, now what has happened is- - -182 -00:17:49 --> 00:18:00 -this is the title page, this is the text page, the table has been floated, it has gone to the top of this page. - -183 -00:18:01 --> 00:18:05 -As in equations, we can also create labels and use them for referencing. - -184 -00:18:06 --> 00:18:11 -For example, - -185 -00:18:12 --> 00:18:14 -you give this command below the caption command. - -186 -00:18:15 --> 00:18:20 -You have to give it below the caption command because it is the caption command that creates the table number. - -187 -00:18:21 --> 00:18:25 -For example, here 'table 1' has been created automatically by this caption command. - -188 -00:18:26 --> 00:18:32 -If you put the label after this, this label will refer to the number created using the caption command. - -189 -00:18:33 --> 00:18:39 -So label - -190 -00:18:40 --> 00:18:42 -fruits. - -191 -00:18:43 --> 00:18:47 -So, let me just go back and say - -192 -00:18:48 --> 00:18:52 -let me add this line here. - -193 -00:18:53 --> 00:19:07 -The cost of these fruits is shown in Table reference, you have to give the label, it should be the same as this. - -194 -00:19:08 --> 00:19:11 -tab fruits - -195 -00:19:12 --> 00:19:15 -Let me compile it. - -196 -00:19:16 --> 00:19:21 -So there it is,On first compilation, this variable is not assigned. - -197 -00:19:22 --> 00:19:27 -So let me re-compile it, so now I have got this. - -198 -00:19:28 --> 00:19:32 -We can create a list of tables automatically - -199 -00:19:33 --> 00:19:36 -as we explain now. - -200 -00:19:37 --> 00:19:49 -After the make title, suppose we want this list of tables - one word, is the command. - -201 -00:19:50 --> 00:19:52 -So what has happened is - -202 -00:19:53 --> 00:19:56 -it has created a list of tables. - -203 -00:19:57 --> 00:20:02 -Typically one would have to compile twice to make sure the table number comes correct. - -204 -00:20:03 --> 00:20:12 -Here it comes, the table according to this list is in page two but we know that it is in page 3. - -205 -00:20:13 --> 00:20:14 -So, this is in page 3. - -206 -00:20:15 --> 00:20:19 -So, let's go back and compile it once more. - -207 -00:20:20 --> 00:20:25 -So there you are, it is in page 3. - -208 -00:20:26 --> 00:20:28 -So this has been explained before. - -209 -00:20:29 --> 00:20:35 -Alright, this comes to the end of this part in which we explained the tables. - -210 -00:20:36 --> 00:20:47 -We will now explain how to create figures using the command called include graphics. - -211 -00:20:48 --> 00:20:59 -So for this, we need to include this package called graphicx. - -212 -00:21:00 --> 00:21:07 -Okay! Suppose I go to the bottom of this, - -213 -00:21:08 --> 00:21:13 -and say, the command is as follows. begin figure - -214 -00:21:14 --> 00:21:18 -include graphics - -215 -00:21:19 --> 00:21:28 -width equals. - -216 -00:21:29 --> 00:21:35 -I have a file called iitb.pdf. - -217 -00:21:36 --> 00:21:37 -There you are. - -218 -00:21:38 --> 00:21:50 -I include it here with the width of this figure coming out to be equal to that of the line width. - -219 -00:21:51 --> 00:21:54 -Let me end this figure. - -220 -00:21:55 --> 00:22:00 -Compile this. - -221 -00:22:01 --> 00:22:03 -There you are. - -222 -00:22:04 --> 00:22:08 -So, it has also been put at the top of this page. - -223 -00:22:09 --> 00:22:16 -Alright! What I will do is, let me just, so this is for if I want to use the entire line width . - -224 -00:22:17 --> 00:22:25 -Suppose I want to use point 5, that is half a line width, - -225 -00:22:26 --> 00:22:28 -then it has been made small. - -226 -00:22:29 --> 00:22:31 -And note that it has been left aligned. - -227 -00:22:32 --> 00:22:37 -As in the table, I can say centering - -228 -00:22:38 --> 00:22:48 -which will center this at the middle. - -229 -00:22:49 --> 00:22:59 -I can also create a caption; figure captions are created after the figure is included. - -230 -00:23:00 --> 00:23:12 -Golden Jubilee logo of IIT Bombay. - -231 -00:23:13 --> 00:23:27 -Okay, as before I can create a label and refer to it using the ref command. - -232 -00:23:28 --> 00:23:35 -I can also make this list of figures appear along with the list of tables. - -233 -00:23:36 --> 00:23:44 -So, suppose I want list of figures also. - -234 -00:23:45 --> 00:23:47 -I will compile it. - -235 -00:23:48 --> 00:23:50 -I will compile it twice. - -236 -00:23:51 --> 00:23:55 -and there it is. List of figures also comes automatically. - -237 -00:23:56 --> 00:24:07 -All the figure captions will appear here. - -238 -00:24:08 --> 00:24:10 -There is one last thing that I want to show you here. - -239 -00:24:11 --> 00:24:14 -That is how to rotate these figures. - -240 -00:24:15 --> 00:24:20 -This is done by the angle option. - -241 -00:24:21 --> 00:24:24 -Suppose, angle... I want to rotate by 90 degrees. - -242 -00:24:25 --> 00:24:28 -So, let's go to this figure. - -243 -00:24:29 --> 00:24:31 -Let’s compile this. - -244 -00:24:32 --> 00:24:36 -So, this has been rotated by 90 degrees. - -245 -00:24:37 --> 00:24:41 -Rotate it by 'minus 90'. - -246 -00:24:42 --> 00:24:47 -Alright. So, this is the way to include the figures. - -247 -00:24:48 --> 00:24:52 -Here, I am assuming that iitb.pdf is available. - -248 -00:24:53 --> 00:24:54 -This brings us to the end of this tutorial. - -249 -00:24:55 --> 00:25:04 -The beginners of latex should compile after every few changes to the source document and make sure that what they have entered is correct. - -250 -00:25:05 --> 00:25:06 -Thank you for listening to this tutorial. - -251 -00:25:07 --> 00:25:12 -This is Kannan Moudgalya, signing off. Good-bye. - diff --git a/media/videos/14/13/Beamer-English.srt b/media/videos/14/13/Beamer-English.srt deleted file mode 100644 index 0558368..0000000 --- a/media/videos/14/13/Beamer-English.srt +++ /dev/null @@ -1,834 +0,0 @@ -Narration - -1 -00:00:00 --> 00:00:07 -Welcome to this spoken tutorial on presentation using Latex and Beamer. - -2 -00:00:08 --> 00:00:13 -Let me first explain the arrangement that I have on the screen. - -3 -00:00:14 --> 00:00:20 -I have the source file here, I will do the compilation here using pdflatex command - -4 -00:00:21 --> 00:00:27 -and the resulting output will be seen here in this corner. - -5 -00:00:28 --> 00:00:32 -First let's see this, we will come back to this shortly. - -6 -00:00:33 --> 00:00:44 -Let's do this first. The first slide here, comes from this source – begin frame, end frame, title page. - -7 -00:00:45 --> 00:00:54 -And the title page is defined in terms of title, author and date. - -8 -00:00:55 --> 00:01:00 -The document class that I am using is "beamer". We have begun the document here. - -9 -00:01:01 --> 00:01:12 -Alright, this is the first slide. Let's go to the second one. This is the outline. How is this created? - -10 -00:01:13 --> 00:01:19 -Begin frame, end frame define one slide. Frame title is "outline". It comes here. - -11 -00:01:20 --> 00:01:27 -Then I use the normal itemized command. Let’s go to the third slide. - -12 -00:01:28 --> 00:01:35 -This slide talks about other spoken tutorials on Latex. There are many spoken tutorials on Latex already available. - -13 -00:01:36 --> 00:01:42 -You are encouraged to see them in case you are not comfortable in using latex. - -14 -00:01:43 --> 00:01:49 -These explain how to use latex, this explains how to install and run latex on Windows. - -15 -00:01:50 --> 00:01:57 -And we hope to give more permanent links for all of these from fosse dot in. - -16 -00:01:58 --> 00:02:09 -So, this is the source for this slide. - -17 -00:02:10 --> 00:02:14 -You can see that we have come to the end of this document. - -18 -00:02:15 --> 00:02:21 -Now I’m going to show you how to embellish this document with lots of other features that beamer offers. - -19 -00:02:22 --> 00:02:30 -Let’s go to the beginning. Let’s go to the top of this file. Now what I am going to do is, whatever change, - -20 -00:02:31 --> 00:02:38 -whatever improvement that I am going to make to this are here. I am going to add one at a time and then explain. - -21 -00:02:39 --> 00:02:46 -Let’s see what happens when I add this command - beamer theme split. - -22 -00:02:47 --> 00:03:01 -Let me cut it, come back here, let me save it and then compile it – pdflatex beamer. - -23 -00:03:02 --> 00:03:11 -Let me go and click this. So you can see that it has created this banner here and some banner here. - -24 -00:03:12 --> 00:03:22 -Here also.. alright. Then what we do is, you come here and use the package. - -25 -00:03:23 --> 00:03:37 -Let's add this – beamer theme shadow. Let me cut it, go here, paste it. All of these are pasted above the "document" command. - -26 -00:03:38 --> 00:03:48 -Let me compile this. Alright, let’s see what happens when I click this. It has become bigger. - -27 -00:03:49 --> 00:03:59 -You can see that there is a change of color here. So, this is done by the command – beamer theme shadow. - -28 -00:04:00 --> 00:04:05 -There are lots of these packages. I am going to illustrate some of the other features now. - -29 -00:04:06 --> 00:04:16 -We will give references for future reading as a part of this introduction, as we see here – ‘References for further reading’. - -30 -00:04:17 --> 00:04:24 -The outline of this talk is as follows. We will spend some time on title page, author name, color, logo etc. - -31 -00:04:25 --> 00:04:35 -"Minimal animation" that you can use to present your talk, "Two column format, Figures and Tables, Equations, Verbatim" and so on. - -32 -00:04:36 --> 00:04:48 -Alright, let’s come back to the beginning. The next one is logo. Let’s cut and paste logo from here. - -33 -00:04:49 --> 00:04:58 -This also has to be pasted above the begin document command. This logo, let’s see what this looks like. - -34 -00:04:59 --> 00:05:07 -Let me just see it by open iitb logo.pdf. I am giving the same name over here. - -35 -00:05:08 --> 00:05:14 -When I open it, you can see that this is the image file that I am talking about. - -36 -00:05:15 --> 00:05:23 -On including this "logo" command, of height 1 cm. it is going to come in this corner. - -37 -00:05:24 --> 00:05:34 -So let’s see what it looks like. Let’s click this. You can see that iitb logo has come. - -38 -00:05:35 --> 00:05:41 -Now this is going to come on every page, from now on. - -39 -00:05:42 --> 00:05:54 -Next, we will add this command. For presentations, sometimes it is useful to make all the lettering bold. - -40 -00:05:55 --> 00:06:07 -So in view of that, I will include this, cut, paste. - -41 -00:06:08 --> 00:06:14 -Actually I will have to include this after the begin document command. - -42 -00:06:15 --> 00:06:27 -Let me save this. Let me compile it. Alright now, watch this. As I click this, all the letters will become bold. - -43 -00:06:28 --> 00:06:36 -You can see that it has become bold. - -44 -00:06:37 --> 00:06:42 -Then, now I am going to improve the writing here. - -45 -00:06:43 --> 00:06:53 -For example, it tries to fill lots of things here. Here, the title comes here, here the author information comes but lots of information is coming. - -46 -00:06:54 --> 00:07:01 -Sometimes I may want to have a smaller title here. For example, this space may not be large enough. - -47 -00:07:02 --> 00:07:06 -So what we will do is, that is solved using this. - -48 -00:07:07 --> 00:07:12 -For example, this is the running title. - -49 -00:07:13 --> 00:07:28 -Let me cut this. This should come after the command title, between the title command and the actual title. - -50 -00:07:29 --> 00:07:35 -So, let me paste it here. You can see that whatever I have pasted now is within square brackets. - -51 -00:07:36 --> 00:07:45 -So let’s save it. Run it. - -52 -00:07:46 --> 00:07:50 -So, as I do it, let’s click this. Look at this as I click what happens to this part. - -53 -00:07:51 --> 00:08:02 -You can see that the title has now changed. I have put only the bottom portion because that’s what I’m giving within the square bracket – "Presentation using LaTeX and Beamer". - -54 -00:08:03 --> 00:08:11 -Then I am saying that h-space is half a cm. I am giving a space here. And then I have the page number over here. - -55 -00:08:12 --> 00:08:20 -It says 1 by 3 here. Then 2 by 3 here. 3 by 3 here and so on. - -56 -00:08:21 --> 00:08:27 -That is achieved using ‘insert frame number divided by insert total frame number’. - -57 -00:08:28 --> 00:08:36 -Now, I will do the same thing for author. So, let's come here. - -58 -00:08:37 --> 00:08:48 -Let’s cut this. And after author, this comes. - -59 -00:08:49 --> 00:08:55 -Let me save it. Compile it. Click this. - -60 -00:08:56 --> 00:09:04 -You can see that Kannan Moudgalya has come. This is what I have given within the square brackets. Now this is going to come on every page. - -61 -00:09:05 --> 00:09:18 -Let’s go to the next topic. This is including equations. - -62 -00:09:19 --> 00:09:23 -The whole thing is in the form of a frame – a complete frame. - -63 -00:09:24 --> 00:09:29 -So, what I will do is, I will cut the whole thing. - -64 -00:09:30 --> 00:09:37 -Come back here, go to the bottom of this document. Save it. - -65 -00:09:38 --> 00:09:44 -So, I have created a new slide. Let’s see what this looks like. - -66 -00:09:45 --> 00:09:50 -So this is where the frame starts. - -67 -00:09:51 --> 00:10:06 -Let us compile this. Now you see that 4 pages are there. So, it still says three, so if I click this once more, so it becomes 4. - -68 -00:10:07 --> 00:10:14 -So this is the equation containing slide. I am not going to explain how to write these equations. - -69 -00:10:15 --> 00:10:20 -These are explained in the spoken-tutorial that I have created earlier on creating equations. - -70 -00:10:21 --> 00:10:27 -All that I have done is, I went to that latex document, cut and pasted it here, that’s all. - -71 -00:10:28 --> 00:10:35 -And.. of course I have removed the equation numbers. It does not make sense to give equation numbers in a slide. - -72 -00:10:36 --> 00:10:43 -On the other hand, it may be useful for you at times to highlight the color. - -73 -00:10:44 --> 00:10:53 -For example- if I want to change this into blue, I will do the following. Come here. - -74 -00:10:54 --> 00:11:04 -The command is – color, blue- and then I have to close this. - -75 -00:11:05 --> 00:11:15 -Save it. Compile it. And click this. You can see that this has become blue. - -76 -00:11:16 --> 00:11:28 -So, you may not want to refer to an equation by numbers but you can say that consider the equation in blue or you may want to say that look at the mass balance equation and so on. - -77 -00:11:29 --> 00:11:34 -You want to refer to it by something that people can remember in talks. - -78 -00:11:35 --> 00:11:49 -Next what we will do is, what I will do now is to include animation - -79 -00:11:50 --> 00:11:57 -which is useful to present information concept by concept. - -80 -00:11:58 --> 00:12:07 -So I have cut, let's paste it here. Let us see what this looks like. - -81 -00:12:08 --> 00:12:16 -Let's first compile it and see what happens. - -82 -00:12:17 --> 00:12:20 -This is from the spoken tutorial on letter writing. This information is also there. - -83 -00:12:21 --> 00:12:32 -The only difference that I have done now is that between begin enumerate and end enumerate, I have put this ‘item plus minus alert’. - -84 -00:12:33 --> 00:12:44 -Let’s see what this does. See, here I have put a command called ‘pause’, so the moment I put a command pause, it stops there, now the begin enumerate starts. - -85 -00:12:45 --> 00:12:52 -So, let me just go forward. Page-down. Next page, next page, next page. - -86 -00:12:53 --> 00:13:04 -As I go down, you see that the latest information is in red, all others are in the default color namely black. I have come to the end of the document. - -87 -00:13:05 --> 00:13:17 -So, this is one easy way to create animation where you want to present information a little at a time. - -88 -00:13:18 --> 00:13:31 -Next what I want to do is- change the alerted color to blue. For example, here the alerted color is red, this is known as alerted color. - -89 -00:13:32 --> 00:13:40 -I want to make this alerted color blue. So that this is consistent with this color that I have chosen. - -90 -00:13:41 --> 00:13:51 -Okay, let me come here, cut this. - -91 -00:13:52 --> 00:13:59 -This should go to the beginning of this document before the begin document command. - -92 -00:14:00 --> 00:14:11 -Let me compile it, when I click this you can see now that the alerted color has now become blue. - -93 -00:14:12 --> 00:14:23 -It is achieved through the command ‘set beamer color – alerted text’ there is a space here ‘foreground equals blue’, fg equals blue. - -94 -00:14:24 --> 00:14:32 -Now what I am going to do is- to show, how easy it is to change the color of the entire document. - -95 -00:14:33 --> 00:14:45 -So, what I will do is.. will come here, after this slash document class, before the beamer frame starts. I will write here "brown". - -96 -00:14:46 --> 00:14:51 -Save it. Compile it. - -97 -00:14:52 --> 00:15:02 -You can see that it has become brown. So without too much work. - -98 -00:15:03 --> 00:15:08 -So what I will do is, I will take this back to the original color. - -99 -00:15:09 --> 00:15:20 -The default color is blue, so I don’t have to type it. Now we are back in blue. - -100 -00:15:21 --> 00:15:29 -So let’s come here, I will delete this. I will now include figures. - -101 -00:15:30 --> 00:15:40 -Cut this. Come here. Go to the end of this. - -102 -00:15:41 --> 00:15:52 -The last one. Let’s compile it. Let’s go to the next page. So, example of the figure is given here. - -103 -00:15:53 --> 00:16:04 -Alright, what are the guidelines in placing this? There are some important guidelines. We will see it with the next bit. - -104 -00:16:05 --> 00:16:20 -Let’s cut this. Paste this. Compile it. - -105 -00:16:21 --> 00:16:27 -So, I have got this. "Hints for including figures". - -106 -00:16:28 --> 00:16:36 -Let’s come to the source where we created the figure. This is how we created this figure. So, what are the guidelines? - -107 -00:16:37 --> 00:16:45 -"Do not use floated environments in presentations". for example, don’t say 'begin figure, end figure' which you need in the latex documents. - -108 -00:16:46 --> 00:17:00 -By the way, if you want to know about how to include a figure and more about it you have to go to the spoken tutorial on Tables and Figures. - -109 -00:17:01 --> 00:17:07 -So, do not use this. Use ‘include graphics’ directly. - -110 -00:17:08 --> 00:17:18 -So, for example, include graphics command is used and I’m saying that use the complete width of the text and the file is 'iitb'. - -111 -00:17:19 --> 00:17:29 -By the way, Beamer already comes with necessary packages. So, you don’t have to include any package. Use any package, it is already included. - -112 -00:17:30 --> 00:17:39 -And then we put the whole thing in the center environment. And this frame is over. - -113 -00:17:40 --> 00:17:43 -Do not include caption, figure number etc. - -114 -00:17:44 --> 00:17:50 -Once again people are not going to remember these numbers. - -115 -00:17:51 --> 00:17:55 -If you want to refer to a previously shown figure, show it again. - -116 -00:17:56 --> 00:18:04 -It does not cost any money to create another slide. Make a copy of the earlier shown slide and do it again. - -117 -00:18:05 --> 00:18:11 -Alright, that completes the figure and the guidelines. And we have come to the end of this document. - -118 -00:18:12 --> 00:18:23 -Let us now see how to include a two column environment. - -119 -00:18:24 --> 00:18:31 -Let’s come here. Let’s go to the end of the document. Save it. - -120 -00:18:32 --> 00:18:41 -What I will do is to make it easier, I will first remove this so that it becomes easy. - -121 -00:18:42 --> 00:18:56 -So, what I’m going to do is- I’m going to give, show part of the information. Let’s compile this and see what happens. - -122 -00:18:57 --> 00:19:27 -So I have this, two columns. - -123 -00:19:28 --> 00:19:34 -This is not saved, that is why. See the star star. What I will do is, let me first save it. - -124 -00:19:35 --> 00:19:44 -So, this is the problem if you try to compile it without saving. The pdf file that you see here, does not correspond to what you have here. - -125 -00:19:45 --> 00:19:57 -So, let’s compile this. Let’s come here. Now what you see here corresponds to what you have here. - -126 -00:19:58 --> 00:20:14 -Let me just center it. So, frame title 'Two Columns' and I’m using the command ‘mini page’ and I’m centering it and I’m using 45 percent of the text width. - -127 -00:20:15 --> 00:20:24 -begin enumerate. These two and then end enumerate. And as before I am alerting. - -128 -00:20:25 --> 00:20:36 -See these two. This is the end of the document. Now what I will do is, I will come and attach whatever I had at the end of this. - -129 -00:20:37 --> 00:20:51 -Here, the previous 'mini page' got over. Now I am going to create another mini page. In this 'mini-page', I am going to put this iitb, the same image that we saw earlier. - -130 -00:20:52 --> 00:21:06 -And this mini-page also is 45 percent size. Let’s compile this, let’s first save this. - -131 -00:21:07 --> 00:21:21 -Now let me click this. Now you see it has come. But it has a small problem in that. When I go to this page, it shows the first item and also this figure. - -132 -00:21:22 --> 00:21:34 -Although the figure comes later on, it shows this because no where have we told latex to show this later. It is perhaps implicit. - -133 -00:21:35 --> 00:21:43 -So for example, if you say that, if you put this information within this item then we say that show this first and then show this. - -134 -00:21:44 --> 00:21:49 -But no where are we saying that this should come later. - -135 -00:21:50 --> 00:21:58 -So one has to be careful of such evinces. One way to solve this problem is to put a ‘pause’. - -136 -00:21:59 --> 00:22:07 -Let me compile this. Save this. So now this is okay. - -137 -00:22:08 --> 00:22:23 -This problem is solved. The first one, the second one, and then one more, it pauses once. And, you can see that it has been solved. - -138 -00:22:24 --> 00:22:38 -Alright, let’s come here. The next one is the table. - -139 -00:22:39 --> 00:22:50 -Save this. Let’s compile this. You can see that the table has come. - -140 -00:22:51 --> 00:22:56 -I am not going to explain how to create this table, this has already been explained in the spoken tutorial on tables. - -141 -00:22:57 --> 00:23:11 -All that I have done is to cut and to paste it here. Let’s go to the beginning of the frame. - -142 -00:23:12 --> 00:23:21 -It’s the same table that we used earlier, I just cut and pasted it. You can see the begin tabular and end tabular commands coming within center environment. - -143 -00:23:22 --> 00:23:27 -OK..What are the guidelines? The guidelines are similar to figures. - -144 -00:23:28 --> 00:23:43 -So, let’s see that also. See the guidelines are here. - -145 -00:23:44 --> 00:23:50 -Let me compile. See this, move forward. - -146 -00:23:51 --> 00:23:55 -Once again, do not use floated environments in presentations. - -147 -00:23:56 --> 00:24:01 -In the spoken tutorial on tables, we put the tabular inside the table environment. - -148 -00:24:02 --> 00:24:10 -Table environment is a floated one, do not include it here. Insert it directly. - -149 -00:24:11 --> 00:24:16 -For example, we put it directly inside the center environment. - -150 -00:24:17 --> 00:24:24 -Do not include caption, table number etc. make a copy of it, if required. - -151 -00:24:25 --> 00:24:39 -Now, here I want to point out the way animation happens. For example, in this slide, it does not alert with a different color. - -152 -00:24:40 --> 00:24:45 -Recall that we used the blue color for alerting. Why does it happen? - -153 -00:24:46 --> 00:24:51 -That is because we have used a different kind of environment here. - -154 -00:24:52 --> 00:25:00 -begin itemize, end itemize, within that we used item plus minus. Previously we were using the word 'alert'. - -155 -00:25:01 --> 00:25:11 -Recall that. We are not using that anymore. As a result, it just comes in black. This is simpler way to include animation. - -156 -00:25:12 --> 00:25:21 -You can pick and choose. So, this is what I have written here. "Show different animations in the previous slide". - -157 -00:25:22 --> 00:25:27 -Now, there is a need to convert this into a handout. For example- if you try to print this, - -158 -00:25:28 --> 00:25:39 -whatever we have here, it will produce 24 pages even though there are only 10 pages. - -159 -00:25:40 --> 00:25:48 -There are only 10 unique frames but there are 24 pages. But if you try to print out, it will produce 24 pages. - -160 -00:25:49 --> 00:25:59 -One way to do that, to take care of this is to use a simple switch here called 'handout'. - -161 -00:26:00 --> 00:26:12 -If I do this, let me compile it; now there are only 10 pages. Let’s compile this once more. - -162 -00:26:13 --> 00:26:23 -Now the animation is no longer there. If I go to the next page, next page, next page, next page, next page and so on. - -163 -00:26:24 --> 00:26:34 -Of course, what if I want to change the color? Then you put 'brown' once again. - -164 -00:26:35 --> 00:26:41 -You can see that it has changed. So, all the parameters here are to be included separated by commas. - -165 -00:26:42 --> 00:26:51 -So, let me just put this back to blue. Compile it. - -166 -00:26:52 --> 00:27:05 -Now what we will do is, sometimes you have to include Verbatim environment. - -167 -00:27:06 --> 00:27:12 -So, let me just take this example. - -168 -00:27:13 --> 00:27:23 -Let’s go here, go to the end. Save it. So this is where the verbatim begins. - -169 -00:27:24 --> 00:27:29 -So you can see that the verbatim is created. - -170 -00:27:30 --> 00:27:38 -Here, I have illustrated it with some SciLab commands. I have changed the color here to blue, here to blue and so on. - -171 -00:27:39 --> 00:27:51 -The only unique thing that you have to do is to say begin frame within square bracket – fragile. - -172 -00:27:52 --> 00:28:00 -If you don’t do that, there will be a problem. Okay.. so you see this, we will come back and check that. - -173 -00:28:01 --> 00:28:08 -So suppose I delete this. Save it. Compile it. - -174 -00:28:09 --> 00:28:13 -It will come and say that something is not okay. - -175 -00:28:14 --> 00:28:20 -So, let's put this back – fragile. Save it, exit from here. - -176 -00:28:21 --> 00:28:29 -Compile it once again. It has come now. - -177 -00:28:30 --> 00:28:39 -Beamer class has lots of information. How does one know about other things. - -178 -00:28:40 --> 00:28:47 -So, I have some information here, let’s go to the bottom. - -179 -00:28:48 --> 00:28:53 -So essentially that information, where to get this extra information is in this slide. - -180 -00:28:54 --> 00:29:07 -We will compile it and we will go through that. The authoritative source for beamer is this file, 'beamer user guide dot pdf'. - -181 -00:29:08 --> 00:29:20 -I located it at this point but it is also available through this beamer project website by the author of beamer class. - -182 -00:29:21 --> 00:29:31 -I’ll just illustrate this; I’ve already downloaded this. It’s in that site that I have mentioned earlier. - -183 -00:29:32 --> 00:29:38 -For example, it’s a 224 page document. It’s a huge document. - -184 -00:29:39 --> 00:29:44 -What I want to show here is that you can use the information from here directly. - -185 -00:29:45 --> 00:29:56 -So let’s come here. In the very first page, the author talks about how to create simple slides and he has given the source also. - -186 -00:29:57 --> 00:30:08 -We will cut this, copy, let me minimize this. Let me go to the end of the document. - -187 -00:30:09 --> 00:30:20 -We paste it. Save it. Compile it. So let’s go to the next page. - -188 -00:30:21 --> 00:30:32 -You can see that whatever we saw there has come here. Here the author has used what is known as the theorem environment. - -189 -00:30:33 --> 00:30:41 -So, for example- begin theorem, end theorem, it comes here. He has also used the frame subtitle that comes here in small letters. - -190 -00:30:42 --> 00:30:51 -And then begin proof, end proof come here. He says 'proof', it opens another window, calls it ‘proof dot’. - -191 -00:30:52 --> 00:31:00 -This is how it is defined, how this environment is defined. He uses a different alert mechanism. - -192 -00:31:01 --> 00:31:20 -So if you want to see this, you just go back; remove this handout so that we can see the animation. Compile it. - -193 -00:31:21 --> 00:31:30 -So let’s go to page number 34. - -194 -00:31:31 --> 00:31:36 -Let’s see the animation now by going backwards. You see this, you see this. - -195 -00:31:37 --> 00:31:50 -So what he does here is, so these two items are numbered one, and the others are numbered two and three. - -196 -00:31:51 --> 00:31:59 -In other words, it is possible to arbitrarily specify the sequence in which the things that you have on the slide will appear. - -197 -00:32:00 --> 00:32:09 -We don’t have time to go through this in more detail. I would suggest that you go through the reference given here to know more about it. - -198 -00:32:10 --> 00:32:19 -This guide has lots of features, this beamer class has very large number of classes, and you may want to try out some of them. - -199 -00:32:20 --> 00:32:35 -Okay. Let me change this back to handout. - -200 -00:32:36 --> 00:32:41 -The problem with the presentation mode, we are now going to the handout mode, - -201 -00:32:42 --> 00:32:47 -the presentation mode where you show the animations, generally takes a lot of time to compile. - -202 -00:32:48 --> 00:32:58 -So, typically you would want to work with the handout mode as much as possible and only once in a while when you really want to check it out you want to use the presentation mode. - -203 -00:32:59 --> 00:33:05 -Finally of course, when you make the presentation, you may want to use the presentation mode. - -204 -00:33:06 --> 00:33:14 -And if you want to take a printout, use the handout mode. Let’s go to the end. We are almost at the end of the spoken tutorial. - -205 -00:33:15 --> 00:33:30 -Let’s acknowledge. In fact let me just copy the whole thing, come here. - -206 -00:33:31 --> 00:33:41 -Let me just compile it here as usual. Okay. - -207 -00:33:42 --> 00:33:52 -The funding for this spoken tutorial has come from the National Mission on Education through ICT. This is the website of this mission. - -208 -00:33:53 --> 00:33:58 -I want to thank you for joining us. This is Kannan Moudgalya, signing off. We would like to receive your feedback at kannan@iitb.ac.in. Thank you very much. - diff --git a/media/videos/14/16/Bibliography-English.srt b/media/videos/14/16/Bibliography-English.srt deleted file mode 100644 index 2c49403..0000000 --- a/media/videos/14/16/Bibliography-English.srt +++ /dev/null @@ -1,222 +0,0 @@ -Narration - -1 -00:00:00 --> 00:00:08 -Welcome to this brief tutorial on creating references using LaTeX and BibTeX. - -2 -00:00:09 --> 00:00:22 -What you first need to do is to create a database of references as in this file 'ref.bib'. - -3 -00:00:23 --> 00:00:29 -Let’s go down this file and let's go back to the top. - -4 -00:00:30 --> 00:00:42 -Each of these references begins with a unique key word. For example, the key word for this reference is KMM07. - -5 -00:00:43 --> 00:00:59 -In the LaTeX file, let me open the LaTeX file, at the place where you want to use a reference, give the command 'cite key word'. - -6 -00:01:00 --> 00:01:14 -For example- cite key word, cite keyword, Look at this, cite KMM07, the first reference we saw in 'ref.bib'. - -7 -00:01:15 --> 00:01:22 -The next thing you have to do is to include the name of the file that has the references in the source file. - -8 -00:01:23 --> 00:01:37 -Here, I have included it towards the end of this document – 'bibliography ref'. Recall that the references are in the file 'ref.bib'. - -9 -00:01:38 --> 00:01:43 -Finally, you have to say what bibliography style is to be used. - -10 -00:01:44 --> 00:01:47 -That is included at the top of this source file. - -11 -00:01:48 --> 00:01:52 -This command 'bibliography style plain'. - -12 -00:01:53 --> 00:02:03 -Suppose that we use plain style here, the following sequence of commands is to be executed to create the references in the plain style. - -13 -00:02:04 --> 00:02:12 -First, compile the source file using 'pdf LaTeX references'. - -14 -00:02:13 --> 00:02:22 -Execute the command BibTeX references. - -15 -00:02:23 --> 00:02:30 -Third one, compile the source file, twice more, using pdf LaTeX references. - -16 -00:02:31 --> 00:02:34 -Once. Twice. - -17 -00:02:35 --> 00:02:39 -The references are now created, let’s go and see. - -18 -00:02:40 --> 00:02:57 -The second page, here is the text, here is the list of references. Let’s just go down. - -19 -00:02:58 --> 00:03:06 -The plain style lists the references in alphabetical order and with numbering. - -20 -00:03:07 --> 00:03:12 -These numbers are used in the main text as well. - -21 -00:03:13 --> 00:03:22 -The referencing style 'u-n-s-r-t' is identical to the plain style but for one difference. - -22 -00:03:23 --> 00:03:30 -Put 'u-n-s-r-t' here. - -23 -00:03:31 --> 00:03:35 -References are listed in the order they are invoked first. - -24 -00:03:36 --> 00:04:06 -Let us change the plain to 'u-n-s-r-t', like the way we have done and then repeat the procedure of LaTeXing and BibTeXing. Which is, first, LaTeX the source file using pdf LaTeX, then BibTeX the source file using BibTeX and then LaTeX the source file twice more. First time, second time. - -25 -00:04:07 --> 00:04:08 -Note what has happened now. - -26 -00:04:09 --> 00:04:19 -You can see that this has generated the references in the order they are cited in the paper. For example, this first reference is cited first here. - -27 -00:04:20 --> 00:04:25 -Reference two is cited ‘2’ because it has been cited here. - -28 -00:04:26 --> 00:04:29 -It has been listed as second in this list. - -29 -00:04:30 --> 00:04:38 -Let’s just go down this list. - -30 -00:04:39 --> 00:04:43 -Okay. Let's come back. - -31 -00:04:44 --> 00:04:51 -To produce the references in the way the computer scientists use, change the style to 'alpha'. - -32 -00:04:52 --> 00:04:58 -Let’s change this to 'alpha'. - -33 -00:04:59 --> 00:05:19 -Save and then repeat the LaTeXing and BibTeXing procedure. Which is, pdf LaTeX source file, BibTeX references, pdf LaTeX references once, twice. Note that. - -34 -00:05:20 --> 00:05:25 -Now, we obtain this style of referencing. - -35 -00:05:26 --> 00:05:30 -Let’s just go down this and see. - -36 -00:05:31 --> 00:05:36 -Okay. - -37 -00:05:37 --> 00:05:47 -There are many other styles of referencing. I have now downloaded two files: 'Harvard.sty' and 'ifac.bst'. - -38 -00:05:48 --> 00:05:57 -Make the following two changes. First, include 'Harvard' in the use packages command - -39 -00:05:58 --> 00:06:07 -like I do now and then change the style to 'ifac'. - -40 -00:06:08 --> 00:06:12 -Save the file. - -41 -00:06:13 --> 00:06:17 -Now, let’s do the LaTeXing and BibTeXing procedure once again. - -42 -00:06:18 --> 00:06:30 -Latex, BibTeX, LaTeX once, LaTeX twice. - -43 -00:06:31 --> 00:06:36 -We get the reference list as this pdf file. - -44 -00:06:37 --> 00:06:45 -Let’s just go down once. - -45 -00:06:46 --> 00:06:51 -It is alphabetically arranged but there are no serial numbers compared to the plain style. - -46 -00:06:52 --> 00:06:59 -The referencing is by author name and year; author name... and year. - -47 -00:07:00 --> 00:07:14 -In this style, there is a special command called cite-as-noun. That helps, put the name of the person cited in running text and not within brackets. - -48 -00:07:15 --> 00:07:21 -Note that here we have used only cite and we have got all the references within brackets only. - -49 -00:07:22 --> 00:07:27 -Suppose for example, - -50 -00:07:28 --> 00:07:43 -look at this second paragraph.. The textbook by 'cite KMM07'. The textbook by.. the whole thing comes within the brackets. Suppose, I change this to 'cite-as-noun'. - -51 -00:07:44 --> 00:07:49 -Save it and compile it. - -52 -00:07:50 --> 00:07:58 -As a result, now, this Moudgalya has come outside the bracket in running text. - -53 -00:07:59 --> 00:08:03 -If you need some other referencing style, search the web. - -54 -00:08:04 --> 00:08:09 -There are good chances that someone has already written the required 'sty' and 'bst' files. - -55 -00:08:10 --> 00:08:15 -This brings us to the end of this tutorial. Thank you for joining. This is Kannan Moudgalya, signing off. Good-bye. - diff --git a/media/videos/14/197/Feedback-diagram-with-Maths-English.srt b/media/videos/14/197/Feedback-diagram-with-Maths-English.srt deleted file mode 100644 index f10ce07..0000000 --- a/media/videos/14/197/Feedback-diagram-with-Maths-English.srt +++ /dev/null @@ -1,504 +0,0 @@ -Narration - -1 -00:00:00 --> 00:00:04 -Welcome to the spoken tutorial on embedding mathematics in Xfig. - -2 -00:00:05 --> 00:00:10 -In this tutorial, I shall explain how to create this figure. - -3 -00:00:11 --> 00:00:15 -Observe the mathematical expression in the second block. - -4 -00:00:16 --> 00:00:22 -You can embed any mathematical expression after learning this tutorial. - -5 -00:00:23 --> 00:00:35 -We shall create the figure in the previous slide, starting from this figure, which was created in the spoken tutorial on “Feedback Diagrams through Xfig”. - -6 -00:00:36 --> 00:00:41 -You should learn this tutorial before starting the current one. - -7 -00:00:42 --> 00:00:47 -Let me now explain, what all you need to learn the material taught in this course. - -8 -00:00:48 --> 00:00:51 -I am using Xfig Version 3.2, patch level 5. - -9 -00:00:52 --> 00:00:55 -You also need LaTeX and a familiarity with it. - -10 -00:00:56 --> 00:01:00 -You also need image cropping software. - -11 -00:01:01 --> 00:01:08 -pdfcrop works on Linux and Mac OS X. We will cover it in this tutorial. - -12 -00:01:09 --> 00:01:14 -Briss is said to work on Windows also, but not covered in this tutorial. - -13 -00:01:15 --> 00:01:18 -Let us go to Xfig. - -14 -00:01:19 --> 00:01:25 -Let us choose the File, then Open. - -15 -00:01:26 --> 00:01:41 -If we scroll through the list, we will see the file “feedback.fig”, created in the spoken tutorial on “Feedback Diagrams through Xfig”. Let us click it. - -16 -00:01:42 --> 00:01:44 -We will see the figure inside this box. - -17 -00:01:45 --> 00:01:52 -Let us open it. - -18 -00:01:53 --> 00:02:00 -Let us bring it inside. - -19 -00:02:01 --> 00:02:04 -Let us also zoom it. - -20 -00:02:05 --> 00:02:19 -Using the Save as option on “File”, we will save this figure as maths. - -21 -00:02:20 --> 00:02:23 -Let us save it. - -22 -00:02:24 --> 00:02:26 -We now have the file "maths.fig". - -23 -00:02:27 --> 00:02:33 -Let us select “Edit” and click the text “Plant”. - -24 -00:02:34 --> 00:02:49 -Let me take the mouse here. Let me delete this and enter -

$G(z) = \frac z{z-1}$ -

- -25 -00:02:50 --> 00:02:55 -Make sure that the mouse stays within the box while typing. - -26 -00:02:56 --> 00:03:00 -The default value for “Flag”' is “Normal” - change it to “Special”. - -27 -00:03:01 --> 00:03:06 -Click “Done”. - -28 -00:03:07 --> 00:03:11 -As the text is long, it overlaps with other entries. - -29 -00:03:12 --> 00:03:22 -Let us move the text outside the box and work with it. - -30 -00:03:23 --> 00:03:25 -Let me click here. - -31 -00:03:26 --> 00:03:30 -Let me choose Grid Mode. - -32 -00:03:31 --> 00:03:38 -Once we are satisfied with any changes that we may want here, we can put it back inside the box. - -33 -00:03:39 --> 00:03:43 -Let us save this file. - -34 -00:03:44 --> 00:03:50 -Let us export using combined pdf and Latex files. - -35 -00:03:51 --> 00:04:02 -File > Export > Combined pdf/LaTeX. Let us Export. - -36 -00:04:03 --> 00:04:10 -There is an error message that I get. But let us not worry about this. - -37 -00:04:11 --> 00:04:12 -Let me go to the terminal. - -38 -00:04:13 --> 00:04:20 -Let me type ls -lrt. - -39 -00:04:21 --> 00:04:25 -We get a list of files, with the last one being the most recent. - -40 -00:04:26 --> 00:04:32 -The last two files are maths.pdf_t and maths.pdf. - -41 -00:04:33 --> 00:04:41 -Let us give the command open maths.pdf. - -42 -00:04:42 --> 00:04:44 -Let us bring it inside. - -43 -00:04:45 --> 00:04:49 -We can see the block diagram without the mathematical expression. - -44 -00:04:50 --> 00:04:51 -Let me close this. - -45 -00:04:52 --> 00:05:00 -Let us see maths.pdf_t in emacs editor that I have already opened. - -46 -00:05:01 --> 00:05:13 -It is here. Let me open it. - -47 -00:05:14 --> 00:05:16 -Please note that you do NOT have to use emacs. - -48 -00:05:17 --> 00:05:21 -You can use WHATEVER editor that you are comfortable with. - -49 -00:05:22 --> 00:05:25 -You can see that the “picture” environment is used. - -50 -00:05:26 --> 00:05:40 -It also makes use of includegraphics and color packages – we need to tell LaTeX to take care of this requirement. - -51 -00:05:41 --> 00:05:58 -Let me now open the file maths-bp.tex; I have already created for this tutorial. - -52 -00:05:59 --> 00:06:01 -I have used article class. - -53 -00:06:02 --> 00:06:14 -I have used color and graphicx packages as these are used in the file pdf_t, the one we saw earlier. - -54 -00:06:15 --> 00:06:19 -I want empty pagestyle as I do not want the page number. - -55 -00:06:20 --> 00:06:26 -Finally, I want to include the file maths.pdf_t. - -56 -00:06:27 --> 00:06:41 -Let us invoke the command pdflatex maths-bp in the terminal. - -57 -00:06:42 --> 00:06:47 -We get the message that the maths-bp.pdf is created. - -58 -00:06:48 --> 00:06:57 -Let us open it with the command open maths-bp.pdf. - -59 -00:06:58 --> 00:07:06 -We have the file we want. Let me zoom it. - -60 -00:07:07 --> 00:07:29 -Now that we know that the mathematical expression is working, let us move the text inside the block. - -61 -00:07:30 --> 00:07:37 -Let us save and export. It is already in the required language. Export. - -62 -00:07:38 --> 00:07:40 -Let us dismiss this warning. - -63 -00:07:41 --> 00:07:43 -Let me compile it again. - -64 -00:07:44 --> 00:07:48 -Let us click the pdf browser that has the file. - -65 -00:07:49 --> 00:07:55 -Now you see the mathematical expression inside the box, the way we want. - -66 -00:07:56 --> 00:08:00 -Let us now see what happens if we do not choose the Special flag. - -67 -00:08:01 --> 00:08:03 -Let me come here. - -68 -00:08:04 --> 00:08:24 -Let me edit the text, change the Special Flag to Normal. Done. - -69 -00:08:25 --> 00:08:36 -File > Save. Let me export. - -70 -00:08:37 --> 00:08:40 -Let me compile. Let me come here. - -71 -00:08:41 --> 00:08:45 -The formula is no longer in the form we want. - -72 -00:08:46 --> 00:09:02 -Let us change the “Special Flag” back to “Special”. - -73 -00:09:03 --> 00:09:11 -Save, Export. - -74 -00:09:12 --> 00:09:17 -Recompile. You see that the file is in the form we want. - -75 -00:09:18 --> 00:09:21 -Let us now improve the appearance of this formula. - -76 -00:09:22 --> 00:09:27 -In this case, the use of 'dfrac' will make the fraction look better. - -77 -00:09:28 --> 00:09:37 -In view of this, let us change 'frac' to 'dfrac'. - -78 -00:09:38 --> 00:09:42 -Let me click here. Keep the mouse inside the box. - -79 -00:09:43 --> 00:09:51 -Put 'd' here. Done. Save, Export. - -80 -00:09:52 --> 00:10:02 -Let us compile once again using pdflatex. - -81 -00:10:03 --> 00:10:10 -We get the error message “Undefined control sequence” "\dfrac". - -82 -00:10:11 --> 00:10:20 -LaTeX complains because the command \dfrac is defined in the package “Amsmath” but we have not included it. - -83 -00:10:21 --> 00:10:26 -We need to include it in the file maths-bp.tex'. - -84 -00:10:27 --> 00:10:34 -Let us do it. Let us go to emacs. - -85 -00:10:35 --> 00:10:40 -Enter “\usepackage{amsmath}”. - -86 -00:10:41 --> 00:10:48 -Let us save the file. Let us compile once again. Let me first exit. - -87 -00:10:49 --> 00:10:58 -Let me now recompile. Now it compiles. Let us click this. - -88 -00:10:59 --> 00:11:02 -We see that the fraction has now come out nicely. - -89 -00:11:03 --> 00:11:10 -We have now achieved our objective of learning how to embed mathematical expressions in Xfig. - -90 -00:11:11 --> 00:11:15 -It is important to note that Xfig does not interpret the LaTeX commands at all. - -91 -00:11:16 --> 00:11:19 -The interpretation is done by the “pdflatex” command. - -92 -00:11:20 --> 00:11:24 -The LaTeX commands have to be correct and consistent at the time of compilation. - -93 -00:11:25 --> 00:11:30 -We will now explain how to remove the white space around the figure. - -94 -00:11:31 --> 00:11:32 -Let me go to the terminal. - -95 -00:11:33 --> 00:11:52 -Let me type the command “pdfcrop maths-bp.pdf” - this is the file we created, into “maths-out.pdf”. - -96 -00:11:53 --> 00:11:56 -Pdfcrop says, one page written on this file. - -97 -00:11:57 --> 00:12:08 -“pdfcrop” takes an input file, trims the space around the figure and writes out the cropped file in the output file. - -98 -00:12:09 --> 00:12:11 -“pdfcrop” is already installed in my system. - -99 -00:12:12 --> 00:12:14 -If you do not have it, you need to install it first. - -100 -00:12:15 --> 00:12:28 -Let us view this output file by the command, “open maths-out.pdf”. - -101 -00:12:29 --> 00:12:30 -Let me bring it inside. - -102 -00:12:31 --> 00:12:33 -The figure has now become extremely compact. - -103 -00:12:34 --> 00:12:37 -The white space that was here has been completely removed. - -104 -00:12:38 --> 00:12:41 -We can now insert this into documents. - -105 -00:12:42 --> 00:12:51 -Let me close this. Let me close this also. Let me close this also. - -106 -00:12:52 --> 00:12:56 -Let me come back to the slides. - -107 -00:12:57 --> 00:13:00 -The software “briss” can also be used to crop the white space. - -108 -00:13:01 --> 00:13:07 -It is supposed to work on Linux, Mac OS X and also on Windows. - -109 -00:13:08 --> 00:13:16 -I have checked its working on Mac OS X. But we will not demonstrate it here. - -110 -00:13:17 --> 00:13:19 -We have now come to the end of this tutorial. - -111 -00:13:20 --> 00:13:26 -We have an assignment for you. Make the diagram created in this tutorial more symmetric and beautiful. - -112 -00:13:27 --> 00:13:29 -Try out different mathematical expressions. - -113 -00:13:30 --> 00:13:35 -Try out other options such as flip and rotate, not covered in the spoken tutorial. - -114 -00:13:36 --> 00:13:40 -Try to build different diagrams. Explore the library. - -115 -00:13:41 --> 00:13:46 -Do an internet search and locate information relevant to Xfig. - -116 -00:13:47 --> 00:14:01 -Useful learning material is available at spoken-tutorial.org. It is here. - -117 -00:14:02 --> 00:14:08 -The concept of spoken tutorials is explained in "What is a Spoken Tutorial?". - -118 -00:14:09 --> 00:14:18 -You may learn LaTeX using the spoken tutorials, available here, which I have downloaded in this tab. - -119 -00:14:19 --> 00:14:28 -The tutorial on Mathematical Typesetting explains how to create maths in LaTeX. - -120 -00:14:29 --> 00:14:37 -The tutorial on Tables and Figures explains how to place figures of the type created in this tutorial into documents. - -121 -00:14:38 --> 00:14:52 -This website has a lot of information, including Xfig tutorials. Come back to the slides. - -122 -00:14:53 --> 00:15:02 -Spoken Tutorial is a part of the Talk to a Teacher project, supported by the National Mission on Education through ICT (NMEICT), MHRD, Government of India. - -123 -00:15:03 --> 00:15:11 -More information on this mission is available at:spoken-tutorial.org/NMEICT-Intro. - -124 -00:15:12 --> 00:15:15 -We welcome your participation and also feedback. - -125 -00:15:16 --> 00:15:21 -This is Kannan Moudgalya, signing off. Thanks for joining. - diff --git a/media/videos/14/519/LaTeX-on-Windows-using-TeXworks-English.srt b/media/videos/14/519/LaTeX-on-Windows-using-TeXworks-English.srt deleted file mode 100644 index ef58b9c..0000000 --- a/media/videos/14/519/LaTeX-on-Windows-using-TeXworks-English.srt +++ /dev/null @@ -1,554 +0,0 @@ -Narration - -1 -00:00:01 --> 00:00:05 -Dear Friends, Welcome to the spoken tutorial on “LaTeX on Windows using TeXworks” - -2 -00:00:06 --> 00:00:11 -In this tutorial we will learn to, Download and install MikTeX . - -3 -00:00:12 --> 00:00:14 -Write basic LaTeX documents using TeXworks. - -4 -00:00:15 --> 00:00:18 -Configure MikTeX to download missing packages. - -5 -00:00:19 --> 00:00:26 -To record this tutorial, I am using Windows7 operating system and MikTeX2.9 - -6 -00:00:27 --> 00:00:30 -Let us now see the salient features of TeXworks - -7 -00:00:31 --> 00:00:33 -It is platform independent - -8 -00:00:34 --> 00:00:35 -It has an embedded pdf reader - -9 -00:00:36 --> 00:00:39 -It supports Indian language typesetting - -10 -00:00:40 --> 00:00:44 -Before we start with TeXworks, we have to install MikTeX. - -11 -00:00:45 --> 00:00:51 -MikTeX is an up-to-date implementation of TeX/LaTeX and related programs for Windows. - -12 -00:00:52 --> 00:01:03 -It contains the necessary packages to create basic documents in LaTeX on Windows ,Moreover, TeXworks is a default editor available with MikTeX installation. - -13 -00:01:04 --> 00:01:09 -Go to the website www.miktex.org - -14 -00:01:10 --> 00:01:18 -Click on the download link for recommended MikTeX installer. This will download the MikTeX installer. - -15 -00:01:19 --> 00:01:21 -Download and save it on your Desktop.. - -16 -00:01:22 --> 00:01:27 -It is a large file, about 154 mega bytes. Hence, it will take some time to download. - -17 -00:01:28 --> 00:01:31 -I have already downloaded this file. Here it is. - -18 -00:01:32 --> 00:01:35 -Double click on this file to start the installation. - -19 -00:01:36 --> 00:01:39 -Check the check box and click on Next. - -20 -00:01:40 --> 00:01:43 -Choose all default options. - -21 -00:01:44 --> 00:01:46 -The installation will take around 5 to 10 minutes. - -22 -00:01:47 --> 00:01:54 -I have already installed MikTeX on my computer. Hence I will not proceed with the installation. - -23 -00:01:55 --> 00:01:57 -After successfully installing MikTeX on your computer, - -24 -00:01:58 --> 00:02:03 -let us see how to use the TeXworks editor which comes with MikTeX. - -25 -00:02:04 --> 00:02:06 -Click on the Windows start button. - -26 -00:02:07 --> 00:02:09 -Click on All Programs. - -27 -00:02:10 --> 00:02:11 -Click on MikTeX2.9. - -28 -00:02:12 --> 00:02:14 -Click on TeXworks. - -29 -00:02:15 --> 00:02:17 -TeXworks editor will open. - -30 -00:02:18 --> 00:02:21 -Let me open an already existing LaTeX document. - -31 -00:02:22 --> 00:02:32 -I will click on File, then click on Open and choose the directory. Then I will open the file hello.tex. - -32 -00:02:33 --> 00:02:37 -You can see that the text written in the file is colored. - -33 -00:02:38 --> 00:02:46 -This is called syntax highlighting. It helps the user differentiate between the user content and the LaTeX syntax. - -34 -00:02:47 --> 00:02:51 -In case the LaTeX syntax is not highlighted, do the following. - -35 -00:02:52 --> 00:02:58 -In the TeXworks window, click on Format button available on the Menu bar. - -36 -00:02:59 --> 00:03:02 -Select Syntax Colouring and then click on LaTeX. - -37 -00:03:03 --> 00:03:10 -If you want TeXworks to apply syntax highlighting every time you create a LaTeX document, do the following - -38 -00:03:11 --> 00:03:15 -On the menu bar, click on Edit and then click on Preferences. - -39 -00:03:16 --> 00:03:21 -In the Editor tab, click on the dropdown button which gives options for Syntax Colouring. - -40 -00:03:22 --> 00:03:26 -Choose LaTeX and then click on Ok. - -41 -00:03:27 --> 00:03:32 -In this way, syntax highlighting will be applied to all documents created in the future. - -42 -00:03:33 --> 00:03:36 -Now we are ready to compile our LaTeX document. - -43 -00:03:37 --> 00:03:42 -Press Ctrl and t keys together to start the compilation. - -44 -00:03:43 --> 00:03:48 -Once the document is compiled without errors, the resulting pdf will be opened. - -45 -00:03:49 --> 00:03:52 -Note that this pdf reader comes along with TeXworks. - -46 -00:03:53 --> 00:03:59 -It is the default pdf reader used by TeXworks to display the compiled pdf documents. - -47 -00:04:00 --> 00:04:03 -We have completed the basic installation of LATEX. - -48 -00:04:04 --> 00:04:06 -This is sufficient for many formatting requirements. - -49 -00:04:07 --> 00:04:13 -You may now leave this tutorial. Practice the remaining LATEX tutorials on the playlist - -50 -00:04:14 --> 00:04:24 -While practising other tutorials, you may get the following error message:“The required file ABC is missing. It is a part of the following package: XYZ” - -51 -00:04:25 --> 00:04:28 -Here ABC is a file inside the package XYZ - -52 -00:04:29 --> 00:04:32 -ABC and XYZ will be specific to your case. - -53 -00:04:33 --> 00:04:37 -When you get such an error message, listen to the rest of this tutorial. - -54 -00:04:38 --> 00:04:45 -Two ways to solve that problem are explained in the rest of this tutorial. At least one of them should work for you. - -55 -00:04:46 --> 00:04:47 -Goodbye for now - -56 -00:04:48 --> 00:04:55 -Do you want to know how to solve a problem of the following type: Listen to the rest of this tutorial and practise with me. - -57 -00:04:56 --> 00:04:58 -Now let us compile a Beamer document. - -58 -00:04:59 --> 00:05:04 -Beamer package by default is not included in the MikTeX setup that we have installed. - -59 -00:05:05 --> 00:05:11 -This means that we have to : download it from some source and add it to our current MikTeX distribution - -60 -00:05:12 --> 00:05:15 -There are two ways of installing a missing package. - -61 -00:05:16 --> 00:05:20 -One way is to install it on the fly while we are compiling a LaTeX document - -62 -00:05:21 --> 00:05:27 -This LaTeX document will typically require a package not available in your MikTeX distribution. - -63 -00:05:28 --> 00:05:34 -Other way, is to manually choose and install a package using Package Manager of MikTeX. - -64 -00:05:35 --> 00:05:36 -Let us see the first method. - -65 -00:05:37 --> 00:05:43 -We will open and compile a LaTeX document, which requires MikTeX to install packages from the internet. - -66 -00:05:44 --> 00:05:47 -First close the TeXworks editor. - -67 -00:05:48 --> 00:05:52 -It is required that we open the tex file with administrator privileges. - -68 -00:05:53 --> 00:06:01 -Click on the start button. Then click on All programs. Click on MikTeX2.9 - -69 -00:06:02 --> 00:06:07 -Right click on TeXworks and choose Run as Administrator - -70 -00:06:08 --> 00:06:12 -This will launch the TeXworks editor with administrator privileges. - -71 -00:06:13 --> 00:06:20 -Now click on File. Then click on Open Choose the file beamer.tex - -72 -00:06:21 --> 00:06:25 -Press Ctrl and t keys together to start the compilation. - -73 -00:06:26 --> 00:06:29 -A Package Installation dialog box will open. - -74 -00:06:30 --> 00:06:34 -It will ask to install the missing package beamer.cls. - -75 -00:06:35 --> 00:06:39 -Click on Change button on this dialog box. - -76 -00:06:40 --> 00:06:43 -Change Package Repository dialog box will open. - -77 -00:06:44 --> 00:06:48 -Choose the option Packages shall be installed from the internet. - -78 -00:06:49 --> 00:06:51 -Click on Connection Settings. - -79 -00:06:52 --> 00:06:55 -It will prompt you to configure the proxy settings. - -80 -00:06:56 --> 00:07:02 -If you are not on a proxy network then leave the Use proxy server checkbox unchecked. - -81 -00:07:03 --> 00:07:08 -Since i am on a proxy network, i will enable the option by clicking on the checkbox - -82 -00:07:09 --> 00:07:12 -I will enter the proxy address. - -83 -00:07:13 --> 00:07:15 -I will enter proxy port number. - -84 -00:07:16 --> 00:07:22 -I will enable the option Authentication required by clicking on the corresponding checkbox - -85 -00:07:23 --> 00:07:26 -Click on Ok. And then click on Next - -86 -00:07:27 --> 00:07:30 -It will ask me the proxy username and password. - -87 -00:07:31 --> 00:07:35 -I will enter the information and click on OK. - -88 -00:07:36 --> 00:07:40 -It will show a list of various remote package repositories. - -89 -00:07:41 --> 00:07:44 -Choose one from the list and click on Finish. - -90 -00:07:45 --> 00:07:47 -Click on Install. - -91 -00:07:48 --> 00:07:51 -It will install the beamer.cls package - -92 -00:07:52 --> 00:07:56 -Once again the Package Installation dialog box will open. - -93 -00:07:57 --> 00:08:02 -It will prompt to install the missing package pgfcore.sty. - -94 -00:08:03 --> 00:08:08 -You may uncheck the option Always show this dialog before installing packages. - -95 -00:08:09 --> 00:08:15 -If you do this, MikTeX will not prompt you again, if it encounters a missing package. - -96 -00:08:16 --> 00:08:17 -Click on Install. - -97 -00:08:18 --> 00:08:27 -Now if there any more missing packages, it will automatically install it, without asking for your permission. - -98 -00:08:28 --> 00:08:34 -Once the installation completes, it will finish the compilation and open the pdf output. - -99 -00:08:35 --> 00:08:38 -We can see that we have successfully compiled a Beamer document. - -100 -00:08:39 --> 00:08:43 -Now let us see the second method of installing missing packages. - -101 -00:08:44 --> 00:08:46 -Click on the Windows start button. - -102 -00:08:47 --> 00:08:48 -Click on All Programs. - -103 -00:08:49 --> 00:08:51 -Click on MikTeX2.9 - -104 -00:08:52 --> 00:08:54 -Click on Maintenance (Admin) - -105 -00:08:55 --> 00:08:59 -Cick on Package Manager (Admin) - -106 -00:09:00 --> 00:09:03 -It will show a list of various packages available. - -107 -00:09:04 --> 00:09:06 -Now let us take a look at this list. - -108 -00:09:07 --> 00:09:09 -There are six columns in this list. - -109 -00:09:10 --> 00:09:17 -These are Name, Category, Size, Packaged date, Installed on date and Title. - -110 -00:09:18 --> 00:09:21 -The Installed on column is very important to us. - -111 -00:09:22 --> 00:09:28 -The packages for which this column is blank indicates that these packages are not installed. - -112 -00:09:29 --> 00:09:32 -Let us see how to install a particular package. - -113 -00:09:33 --> 00:09:37 -Let me choose the package abc, for example. - -114 -00:09:38 --> 00:09:44 -Notice that the moment I choose the package, the plus button on the top left side gets enabled. - -115 -00:09:45 --> 00:09:49 -The plus button is the install button. Click on the plus button. - -116 -00:09:50 --> 00:09:57 -A window will open which will list the number of packages you have chosen to install or uninstall. - -117 -00:09:58 --> 00:10:00 -Click on Proceed. - -118 -00:10:01 --> 00:10:07 -Since I have configured a proxy network connection, it will prompt me for the proxy username and password. - -119 -00:10:08 --> 00:10:10 -Let me type my username and password - -120 -00:10:11 --> 00:10:12 -Click on Ok - -121 -00:10:13 --> 00:10:19 -A window will open which will show the download progress of the package selected for installation. - -122 -00:10:20 --> 00:10:25 -It may happen that it fails to download the requested package due to remote server connectivity issues. - -123 -00:10:26 --> 00:10:30 -In that case, change the package repository and try again. - -124 -00:10:31 --> 00:10:35 -We can see that the installation of selected package is completed. - -125 -00:10:36 --> 00:10:37 -Click on Close. - -126 -00:10:38 --> 00:10:40 -The package list will get refreshed. - -127 -00:10:41 --> 00:10:48 -Notice that 11 september 2013 appears in the Installed on column for package abc. - -128 -00:10:49 --> 00:10:53 -This completes the tutorial LaTeX on Windows using TeXworks - -129 -00:10:54 --> 00:10:58 -In this tutorial we learnt to - Download and install MikTeX. - -130 -00:10:59 --> 00:11:02 -Write a basic LaTeX document using TeXworks - -131 -00:11:03 --> 00:11:07 -Configure MikTeX to download missing packages in 2 different ways - -132 -00:11:08 --> 00:11:11 -Watch the video available at , http://spoken-tutorial.org/What_is_a_Spoken_Tutorial - -133 -00:11:12 --> 00:11:17 -It summarizes the Spoken Tutorial project, If you do not have good bandwidth, you can download and watch it. - -134 -00:11:18 --> 00:11:27 -The Spoken Tutorial Project Team Conducts workshops using spoken tutorials. Gives certificates to those who pass an online test . - -135 -00:11:28 --> 00:11:32 -For more details, please write to contact@spoken-tutorial.org - -136 -00:11:33 --> 00:11:44 -Spoken Tutorial Project is a part of the Talk to a Teacher project. It is supported by the National Mission on Education through ICT, MHRD, Government of India. - -137 -00:11:45 --> 00:11:55 -More information on the same is available at, http://spoken-tutorial.org /NMEICT-Intro - -138 -00:11:56 --> 00:12:01 -This is Rupak Rokade from IIT Bombay signing off. Thanks for watching. - diff --git a/media/videos/14/7/Letter-Writing-English.srt b/media/videos/14/7/Letter-Writing-English.srt deleted file mode 100644 index 26cbad7..0000000 --- a/media/videos/14/7/Letter-Writing-English.srt +++ /dev/null @@ -1,310 +0,0 @@ -Narration - -1 -00:00:00 --> 00:00:05 -Welcome to this tutorial on how to write letters using latex. - -2 -00:00:06 --> 00:00:07 -You can see three windows. - -3 -00:00:08 --> 00:00:12 -These correspond to the three distinct phases in typesetting through latex: - -4 -00:00:13 --> 00:00:21 -creation of source file, compilation to produce the pdf file and viewing it through a pdf reader. - -5 -00:00:22 --> 00:00:33 -I am using the free pdf reader “Skim” in Mac OSX because it automatically loads the latest pdf file after every compilation. - -6 -00:00:34 --> 00:00:41 -There are pdf browsers in Linux and also in Windows that have this capability. - -7 -00:00:42 --> 00:00:46 -Let us go through the source file and see what each command does. - -8 -00:00:47 --> 00:00:53 -The first line says that this belongs to 'letter document' class. - -9 -00:00:54 --> 00:00:56 -12 point is the text size. - -10 -00:00:57 --> 00:01:06 -The first component of the letter is the ‘from address’. It appears between the braces here. - -11 -00:01:07 --> 00:01:13 -The result of this is seen in the top right hand corner of the output file. - -12 -00:01:14 --> 00:01:18 -Two consecutive slashes start a new line. - -13 -00:01:19 --> 00:01:24 -If I remove the double slashes from here – - -14 -00:01:25 --> 00:01:36 -save, compile using pdflatex – - -15 -00:01:37 --> 00:01:42 -you can see that these two lines get merged in one line. - -16 -00:01:43 --> 00:01:48 -Previously with a double slash we asked latex to split the line. - -17 -00:01:49 --> 00:01:55 -Now these reverse slashes are no longer there, so latex does not know that it has to break the line there. - -18 -00:01:56 --> 00:02:03 -Let me put the slashes back. - -19 -00:02:04 --> 00:02:07 -Save, Compile. - -20 -00:02:08 --> 00:02:14 -It is to be understood that after every change we need to save before compilation. - -21 -00:02:15 --> 00:02:20 -Let us see what happens when we give an empty address. - -22 -00:02:21 --> 00:02:23 -Let me just come here, - -23 -00:02:24 --> 00:02:26 -mark it, - -24 -00:02:27 --> 00:02:36 -go to the end of the line, delete it, save it, compile it. - -25 -00:02:37 --> 00:02:43 -You can see that the from address has disappeared from here. - -26 -00:02:44 --> 00:02:53 -Note that today’s date appears automatically in American style: month, date and then year. - -27 -00:02:54 --> 00:03:01 -This is obtained through the command slash date slash today. - -28 -00:03:02 --> 00:03:11 -We can prevent the automatic appearance of the date with an empty list, as we do now. - -29 -00:03:12 --> 00:03:16 -Save. - -30 -00:03:17 --> 00:03:19 -Compile,The date has gone. - -31 -00:03:20 --> 00:03:29 -Suppose that we want to put our own date, let us enter it with date first as follows. - -32 -00:03:30 --> 00:03:39 -9th July 2007, Save, Compile. - -33 -00:03:40 --> 00:03:42 -Got the date. - -34 -00:03:43 --> 00:03:46 -This is the date on which this tutorial was created the first time. - -35 -00:03:47 --> 00:03:52 -On compiling it, we see this Indian format appearing in the output file. - -36 -00:03:53 --> 00:04:01 -Let us put the address back. - -37 -00:04:02 --> 00:04:07 -And the document is back to the previous state by recompiling. - -38 -00:04:08 --> 00:04:16 -The signature command's argument appears at the bottom of the letter. - -39 -00:04:17 --> 00:04:21 -We begin the document and then the letter. - -40 -00:04:22 --> 00:04:29 -The ‘to address’ comes first. It appears in the top left hand corner of the output. - -41 -00:04:30 --> 00:04:33 -I have addressed this to Mr. N. K. Sinha. - -42 -00:04:34 --> 00:04:39 -The command ‘slash opening’ is used to address the recipient. - -43 -00:04:40 --> 00:04:47 -You may have already noticed that all latex commands begin with a reverse slash. - -44 -00:04:48 --> 00:04:52 -The text of the letter comes next. - -45 -00:04:53 --> 00:04:59 -One starts a new paragraph in latex through a blank line as we show now. - -46 -00:05:00 --> 00:05:06 -Let me come here. Right now this sentence starting at ‘we are’ is here. - -47 -00:05:07 --> 00:05:11 -Let’s open. Let's take this to the next line. - -48 -00:05:12 --> 00:05:16 -I have left a blank line. Let me save this. - -49 -00:05:17 --> 00:05:18 -Compile this. - -50 -00:05:19 --> 00:05:24 -You can see that this has gone to a new paragraph. - -51 -00:05:25 --> 00:05:28 -With a new paragraph, the letter has gone to two pages. - -52 -00:05:29 --> 00:05:36 -Let us see if the font size is reduced to 10, we can bring the letter back to one page. - -53 -00:05:37 --> 00:05:41 -Let me do that now. - -54 -00:05:42 --> 00:05:47 -Save. - -55 -00:05:48 --> 00:05:53 -Compile,You can see that the whole letter has come into one page. - -56 -00:05:54 --> 00:05:59 -Let me put this back to 12 pt. - -57 -00:06:00 --> 00:06:05 -And let me also remove this paragraph bit. - -58 -00:06:06 --> 00:06:11 -And let me compile this. - -59 -00:06:12 --> 00:06:13 -Okay. - -60 -00:06:14 --> 00:06:28 -I now want to explain the itemize environment which is created with a pair of 'begin' and 'end itemize' commands. - -61 -00:06:29 --> 00:06:36 -Every piece of text that starts with a ‘slash item’ appears in a bulleted form. - -62 -00:06:37 --> 00:06:40 -Can I get numbers in the place of bullets here? - -63 -00:06:41 --> 00:06:45 -You just have to change the "itemize" into "enumerate" as I do now. - -64 -00:06:46 --> 00:06:52 -Let me just change this to "enumerate". - -65 -00:06:53 --> 00:06:59 -Save it. - -66 -00:07:00 --> 00:07:04 -Of course! It is always a good idea to save as often as possible. - -67 -00:07:05 --> 00:07:08 -Let me compile this again. - -68 -00:07:09 --> 00:07:14 -You can see that the bullets have become numbers now. - -69 -00:07:15 --> 00:07:21 -In closing, I have included, ‘Yours sincerely’ which comes here. - -70 -00:07:22 --> 00:07:25 -We have already talked about the signature. - -71 -00:07:26 --> 00:07:34 -Finally, the command 'cc' helps mark this letter to other recipients. - -72 -00:07:35 --> 00:07:43 -I end the letter with ‘end letter’ command and then the document is completed with the ‘end document’ command. - -73 -00:07:44 --> 00:07:47 -Feel free to modify the content and try them out. - -74 -00:07:48 --> 00:07:57 -Until you become confident, change only one thing at a time and make sure by immediate compilation that whatever you have done is correct. - -75 -00:07:58 --> 00:08:09 -Although I talked about the letter writing process in a Mac, the same source file will work in all Latex systems including those in Linux and Windows operating systems. - -76 -00:08:10 --> 00:08:12 -This brings us to the end of this tutorial. - -77 -00:08:13 --> 00:08:18 -Thanks for listening,This is Kannan Moudgalya from CDEEP, IIT Bombay, signing off. Good bye. - diff --git a/media/videos/14/806/Report-Writing-English.srt b/media/videos/14/806/Report-Writing-English.srt deleted file mode 100644 index 1dea135..0000000 --- a/media/videos/14/806/Report-Writing-English.srt +++ /dev/null @@ -1,516 +0,0 @@ -Narration - -1 -00:00:01 --> 00:00:08 -Welcome to this spoken tutorial on Report Writing in LaTeX. I am calling it “latek” and not “latex”. - -2 -00:00:09 --> 00:00:12 -My name is Kannan Moudgalya. - -3 -00:00:13 --> 00:00:18 -In this tutorial, we will learn how to write a document. - -4 -00:00:19 --> 00:00:37 -In particular, how to Use ‘report’ and ‘articleclass, -

How to create sections, -

Automate the numbering of sections, -

Create Table of contents and -

How to create the title page. -

- -5 -00:00:38 --> 00:00:43 -I am creating this tutorial on our less than 10,000 Rupee laptop. - -6 -00:00:44 --> 00:00:50 -And, I am using Ubuntu Linux, TeXworks and LaTeX. - -7 -00:00:51 --> 00:00:56 -You can also use TeXworks on Windows or Mac - the method is identical. - -8 -00:00:57 --> 00:01:01 -You can use LaTeX by itself, without TeXworks also. - -9 -00:01:02 --> 00:01:06 -You are welcome to use more expensive Linux computers also! - -10 -00:01:07 --> 00:01:22 -The prerequisites to learn this are the following: -

Spoken tutorials that introduce LaTeX, -

The file ‘report dot tex’, -

Knowledge of the side-by-side method required to practise this tutorial. -

- -11 -00:01:23 --> 00:01:31 -Information on all of the above are available on our website: spoken tutorial dot org. - -12 -00:01:32 --> 00:01:35 -Let me go to the TeXworks window. - -13 -00:01:36 --> 00:01:43 -I have already opened the file report.tex. Please download this file and practise along with me. - -14 -00:01:44 --> 00:01:54 -I am using 12 point as the font size, ‘a4 paper’ and ‘article’ class. - -15 -00:01:55 --> 00:02:01 -I am using the geometry package to set margins, through the 'usepackage' command. - -16 -00:02:02 --> 00:02:06 -A reverse slash should come at the beginning of every command. - -17 -00:02:07 --> 00:02:12 -Although I will not say it explicitly, you should not forget to put the reverse slash. - -18 -00:02:13 --> 00:02:19 -Similarly, I will not explicitly mention braces, but you may have to use them. - -19 -00:02:20 --> 00:02:24 -Please reproduce exactly what is done in the video. - -20 -00:02:25 --> 00:02:30 -The usepackage command has optional parameters inside square brackets. - -21 -00:02:31 --> 00:02:34 -The name of the package is within braces. - -22 -00:02:35 --> 00:02:40 -I have set horizontal and vertical margins of 4.5 cm each. - -23 -00:02:41 --> 00:02:46 -Look at the top left hand corner of the 'TexWorks’ window. - -24 -00:02:47 --> 00:02:54 -In case 'pdfLaTeX’ is not already chosen, please select it from the pull down menu. - -25 -00:02:55 --> 00:02:58 -To the left, there is a green circle with an arrow. - -26 -00:02:59 --> 00:03:03 -Click the arrow and compile this file. - -27 -00:03:04 --> 00:03:08 -We get the file ‘report.pdf’ shown on the right hand side. - -28 -00:03:09 --> 00:03:17 -Look at the titles - section, sub-section and sub-sub-section in the output file. - -29 -00:03:18 --> 00:03:22 -These are created using identical commands given in the source file. - -30 -00:03:23 --> 00:03:29 -Observe the distinctive features of these section titles in the 'pdf' file. - -31 -00:03:30 --> 00:03:36 -The sizes of these titles are created proportionately and automatically. - -32 -00:03:37 --> 00:03:44 -Also, the section title is the largest and the sub-sub-section title is the smallest. - -33 -00:03:45 --> 00:03:49 -Irrespective of blank lines in the source file, the output remains the same. - -34 -00:03:50 --> 00:03:54 -Let me delete one line here. Compile. - -35 -00:03:55 --> 00:03:56 -There is no change here. - -36 -00:03:57 --> 00:04:01 -Let me now change the paper size to a5. - -37 -00:04:02 --> 00:04:05 -This will reduce the width of every line in the output. - -38 -00:04:06 --> 00:04:09 -Let me compile the text as we did before. - -39 -00:04:10 --> 00:04:16 -Let me magnify it by pressing control + so that you can see the output clearly. - -40 -00:04:17 --> 00:04:19 -Let me bring it to the centre. - -41 -00:04:20 --> 00:04:27 -For the rest of this tutorial, we will use the a5 paper only. You are welcome to change it to a4. - -42 -00:04:28 --> 00:04:36 -Note that I did not save the file. This is because TexWorks saves the file automatically before compilation. - -43 -00:04:37 --> 00:04:43 -Let us change the font to a smaller one of 10 point and compile. - -44 -00:04:44 --> 00:04:53 -Hey, the font size has become smaller - should we be surprised? But, proportional sizing and spacing remain the same. - -45 -00:04:54 --> 00:04:58 -Let me change the font back to 12 point. - -46 -00:04:59 --> 00:05:03 -We will now discuss another important aspect of section titles. - -47 -00:05:04 --> 00:05:08 -It is the automatic generation of section numbers. - -48 -00:05:09 --> 00:05:17 -To illustrate this further, I will add a new section called ‘Inserted section’. - -49 -00:05:18 --> 00:05:28 -On compilation, it appears here with a correct number in sequence. Thus, numbering also is automatically taken care of by LaTeX. - -50 -00:05:29 --> 00:05:35 -LaTeX creates table of contents through a file with extension “toc”. - -51 -00:05:36 --> 00:05:41 -Let me add ‘table of contents’, one word, here. - -52 -00:05:42 --> 00:05:43 -Compile. - -53 -00:05:44 --> 00:05:49 -The word ‘Contents’ appears in the output but nothing else. - -54 -00:05:50 --> 00:05:52 -Let me compile once again. - -55 -00:05:53 --> 00:05:58 -All the titles are now present in the table of contents along with page numbers. - -56 -00:05:59 --> 00:06:04 -You have to compile it the third time to get the correct page numbers. - -57 -00:06:05 --> 00:06:08 -Why three times? Please see the assignment. - -58 -00:06:09 --> 00:06:13 -Just one word, ‘table of contents’, is what is needed. - -59 -00:06:14 --> 00:06:16 -What an amazing capability in LaTeX! - -60 -00:06:17 --> 00:06:23 -This is achieved through a file with extension “toc” that LaTeX maintains. - -61 -00:06:24 --> 00:06:29 -This multi pass compilation procedure works with changes in titles as well. - -62 -00:06:30 --> 00:06:35 -Let me change the section title to ‘Modified section’. - -63 -00:06:36 --> 00:06:41 -Let me compile it. Table of Contents does not change. - -64 -00:06:42 --> 00:06:45 -Let me compile it once more and solve this problem. - -65 -00:06:46 --> 00:06:48 -Now we have a modified section here. - -66 -00:06:49 --> 00:06:56 -We will create a title for this document. Let me do it here, just before ‘begin document’. - -67 -00:06:57 --> 00:07:12 -I will create a ‘title’, ‘Author’ information and the ‘date’ as follows. - -68 -00:07:13 --> 00:07:16 -So, I have added these three commands. - -69 -00:07:17 --> 00:07:21 -Order in which these come or the place where they come does not matter. - -70 -00:07:22 --> 00:07:25 -But they should come before the begin document command. - -71 -00:07:26 --> 00:07:30 -Don’t forget the reverse slash in all the commands. - -72 -00:07:31 --> 00:07:37 -Double slash here means the next line. We compile it. - -73 -00:07:38 --> 00:07:41 -There are no changes in the ‘pdf’ file. - -74 -00:07:42 --> 00:07:46 -The reason is that I have not told LaTeX what to do with this information. - -75 -00:07:47 --> 00:07:54 -So, I add the ‘make title’ command, one word, just after the 'begin document'. - -76 -00:07:55 --> 00:07:57 -Let me compile it. - -77 -00:07:58 --> 00:08:02 -The title appears in the output, at the place where I put this command - -78 -00:08:03 --> 00:08:06 -namely, at the beginning of the document. - -79 -00:08:07 --> 00:08:14 -We will now change the class of this document from article to report. - -80 -00:08:15 --> 00:08:23 -Simultaneously, we define a chapter with this command: 'Chapter First Chapter'. - -81 -00:08:24 --> 00:08:26 -Report style requires at least one chapter. - -82 -00:08:27 --> 00:08:30 -Let us compile it and see the output. - -83 -00:08:31 --> 00:08:34 -Notice the changes in the output. - -84 -00:08:35 --> 00:08:39 -Title appears on a whole page that has no number. - -85 -00:08:40 --> 00:08:46 -Contents also appear on an entire page, with page number 1. - -86 -00:08:47 --> 00:08:53 -Please pause here and find out how many entries in 'Contents' are wrong. - -87 -00:08:54 --> 00:08:59 -Let us go to the next page. Notice the way the chapter begins. - -88 -00:09:00 --> 00:09:07 -How many distinguishing features can you identify? You should find at least five. - -89 -00:09:08 --> 00:09:11 -Let us compile it for the second time. - -90 -00:09:12 --> 00:09:20 -Observe that the Contents page now has the correct information. The page numbers are correct now. - -91 -00:09:21 --> 00:09:31 -Let us add a chapter, called ‘New Chapter’. - -92 -00:09:32 --> 00:09:33 -Compile it. - -93 -00:09:34 --> 00:09:46 -Let me compile once again and see it coming on a new page. - -94 -00:09:47 --> 00:09:52 -Insert the command appendix before this new chapter. - -95 -00:09:53 --> 00:09:58 -On compilation, you see the word “Appendix” appearing. - -96 -00:09:59 --> 00:10:01 -The chapter number is A. - -97 -00:10:02 --> 00:10:04 -Let us go to the slides now. - -98 -00:10:05 --> 00:10:07 -Let us summarize what we learnt in this tutorial. - -99 -00:10:08 --> 00:10:20 -Writing a document in LaTeX, -

Automatically creating chapter and section titles, -

Automatic numbering, -

Table of contents and title page creation, -

Creating Appendix. -

- -100 -00:10:21 --> 00:10:23 -Let me give some assignments. - -101 -00:10:24 --> 00:10:28 -This assignment is on a4 paper and letter paper. - -102 -00:10:29 --> 00:10:34 -Please pause the video, read the slide and do the assignment. - -103 -00:10:35 --> 00:10:40 -This assignment is on font size. - -104 -00:10:41 --> 00:10:46 -This is on report dot toc. - -105 -00:10:47 --> 00:10:51 -This is on number of compilations. - -106 -00:10:52 --> 00:10:58 -This is on the location of Table of Contents. - -107 -00:10:59 --> 00:11:06 -This assignment is on the use of the 'chapter' command in 'report' and 'article'. - -108 -00:11:07 --> 00:11:14 -This assignment is on the effect of the 'appendix' command in the 'report' class. - -109 -00:11:15 --> 00:11:21 -This is the same as the previous assignment, but in the 'article' class. - -110 -00:11:22 --> 00:11:26 -This is on the geometry package. - -111 -00:11:27 --> 00:11:33 -This assignment is on LaTeX classes, in general. - -112 -00:11:34 --> 00:11:37 -With this, we have come to the end of this tutorial. - -113 -00:11:38 --> 00:11:45 -This video summarizes the Spoken Tutorial project. If you do not have bandwidth, you may download and watch it. - -114 -00:11:46 --> 00:11:52 -We conduct workshops using Spoken Tutorials. Give certificates. Please contact us. - -115 -00:11:53 --> 00:11:55 -Do you have questions in THIS Spoken Tutorial? - -116 -00:11:56 --> 00:12:02 -Please visit this site. Choose the minute and second where you have the question. - -117 -00:12:03 --> 00:12:08 -Explain your question briefly. Someone from our team will answer them. - -118 -00:12:09 --> 00:12:12 -The Spoken Tutorial forum is for specific questions on this tutorial. - -119 -00:12:13 --> 00:12:18 -Please do not post unrelated and general questions on them. - -120 -00:12:19 --> 00:12:27 -This will help reduce the clutter. With less clutter, we can use these discussions as instructionalmaterial. - -121 -00:12:28 --> 00:12:34 -For topics not covered in spoken tutorials, visit stack exchange at this address. - -122 -00:12:35 --> 00:12:44 -This is a great place to get answers on LaTeX. You may also have questions on our workshops, certificates etc. - -123 -00:12:45 --> 00:12:49 -For this, get in touch with us at this email address. - -124 -00:12:50 --> 00:12:55 -Spoken Tutorial project is funded by NMEICT, MHRD, Government of India. - -125 -00:12:56 --> 00:13:01 -Thanks for joining. Goodbye. - diff --git a/media/videos/4/262/Setting-General-Privacy-Options-English.srt b/media/videos/4/262/Setting-General-Privacy-Options-English.srt deleted file mode 100644 index 65ed8e3..0000000 --- a/media/videos/4/262/Setting-General-Privacy-Options-English.srt +++ /dev/null @@ -1,350 +0,0 @@ -Narration - -1 -00:00:00 --> 00:00:03 -Welcome to the tutorial of Mozilla Firefox. - -2 -00:00:04 --> 00:00:10 -In this tutorial, we will learn how to: set General preferences, set Privacy preferences. - -3 -00:00:11 --> 00:00:17 -In this tutorial, we are using Firefox version 7.0 on Ubuntu 10.04. - -4 -00:00:18 --> 00:00:23 -Preferences within Mozilla Firefox allows us to perform repetitive tasks with ease. - -5 -00:00:24 --> 00:00:28 -For Windows users, this feature is called Options. - -6 -00:00:29 --> 00:00:32 -Say for example, we want to set our email login page as our home page. - -7 -00:00:33 --> 00:00:36 -So, we will click on Edit and Preferences. - -8 -00:00:37 --> 00:00:41 -Windows users should click on Tools and Options. - -9 -00:00:42 --> 00:00:49 -The Preferences or Options dialog box opens. At the top of the dialog box, there are a number of tabs. - -10 -00:00:50 --> 00:00:52 -Each one has a different function. - -11 -00:00:53 --> 00:01:03 -The General panel contains preferences related to the most commonly used settings such as : setting Firefox home page, setting file download location. - -12 -00:01:04 --> 00:01:07 -Let us learn how to set 'Gmail' as our default home page. - -13 -00:01:08 --> 00:01:15 -Under Start up, in the When Firefox starts drop-down menu, select ‘Show my home page’. - -14 -00:01:16 --> 00:01:21 -By default, the Home page field is set to ‘Mozilla Firefox Start Page’. - -15 -00:01:22 --> 00:01:28 -Click on the Home Page field and type ‘www.gmail.com’. - -16 -00:01:29 --> 00:01:32 -Click on the Close button to close the dialog box. - -17 -00:01:33 --> 00:01:35 -Our settings will be saved automatically. - -18 -00:01:36 --> 00:01:39 -Now, close this Firefox window. - -19 -00:01:40 --> 00:01:41 -And open a new Firefox window. - -20 -00:01:42 --> 00:01:45 -You will notice that the 'Gmail login page' is the homepage. - -21 -00:01:46 --> 00:01:50 -Next, let us now learn how Mozilla Firefox handles downloads. - -22 -00:01:51 --> 00:01:53 -Click on Edit and Preferences. - -23 -00:01:54 --> 00:01:57 -As before, Windows users, please click on Tools > Options. - -24 -00:01:58 --> 00:02:01 -Click on the ‘General’ tab. - -25 -00:02:02 --> 00:02:08 -In the ‘Downloads’ option, put a check on the check box ‘Show the Downloads window when downloading a file’. - -26 -00:02:09 --> 00:02:11 -Now check the radio-button that says ‘Save files to’. - -27 -00:02:12 --> 00:02:17 -Click the Browse button and change the default folder to Desktop. Click on the Open button. - -28 -00:02:18 --> 00:02:23 -Click on the Close button to close the dialog box. - -29 -00:02:24 --> 00:02:27 -As before, our settings will be saved automatically. - -30 -00:02:28 --> 00:02:33 -In the browser’s Search bar, type ‘Flowers’ and click the magnifying lens to the right. - -31 -00:02:34 --> 00:02:37 -Right-click on the first search result that appears. - -32 -00:02:38 --> 00:02:39 -And click on ‘Save Link As’. - -33 -00:02:40 --> 00:02:45 -You notice that by default the link would be downloaded to Desktop. - -34 -00:02:46 --> 00:02:50 -Click Save and the file will be saved on the Desktop. - -35 -00:02:51 --> 00:02:55 -The Tabs panel contains preferences related to the tabbed browsing feature. - -36 -00:02:56 --> 00:03:01 -The Content panel contains preferences related to how websites are displayed. - -37 -00:03:02 --> 00:03:10 -The Applications panel lets you decide how Mozilla Firefox should handle different types of files. - -38 -00:03:11 --> 00:03:12 -It could be a PDF document or an audio file . - -39 -00:03:13 --> 00:03:18 -As an assignment, explore these tabs and the options therein. - -40 -00:03:19 --> 00:03:24 -The Privacy panel contains preferences related to your web-privacy. - -41 -00:03:25 --> 00:03:29 -Under Tracking, let's put a check on ‘Tell web sites I do not want to be tracked’. - -42 -00:03:30 --> 00:03:36 -Selecting this option will stop websites from storing information about your browsing behavior. - -43 -00:03:37 --> 00:03:40 -Under History, there are many options. - -44 -00:03:41 --> 00:03:44 -In the ‘Firefox will’ field, choose ‘Never remember history’. - -45 -00:03:45 --> 00:03:52 -Enabling this option means that the history of your browsing will not be retained in your computer. - -46 -00:03:53 --> 00:04:00 -If we click on ‘Clear all current history’ then all the browsing history stored on your computer will be cleared. - -47 -00:04:01 --> 00:04:03 -Coming down to the Location Bar- - -48 -00:04:04 --> 00:04:10 -In the ‘When using the location bar, suggest:’ field, we will click on the drop down-menu and select 'Nothing'. - -49 -00:04:11 --> 00:04:18 -On doing so, whenever you enter a new URL in the address bar, you will not be prompted with suggestions. - -50 -00:04:19 --> 00:04:22 -Click Close to close the dialog box. - -51 -00:04:23 --> 00:04:25 -your privacy is now completely protected. - -52 -00:04:26 --> 00:04:31 -The Security panel contains preferences related to keeping your web browsing safe. - -53 -00:04:32 --> 00:04:35 -The Sync panel lets you set up or manage a “Firefox Sync” account. - -54 -00:04:36 --> 00:04:44 -Firefox Sync lets us use our history, bookmarks and passwords across different devices. - -55 -00:04:45 --> 00:04:48 -The Advanced panel contains some important Firefox settings. - -56 -00:04:49 --> 00:04:56 -It has Browsing and System Default settings to control the behavior of Firefox. - -57 -00:04:57 --> 00:05:02 -We can also configure the way Firefox connects to the Internet using the Network option. - -58 -00:05:03 --> 00:05:08 -Within the Network tab, under Connections, click on the Settings button. - -59 -00:05:09 --> 00:05:10 -This opens up the Connection Settings dialog box. - -60 -00:05:11 --> 00:05:14 -Here, you can configure the Proxies. - -61 -00:05:15 --> 00:05:20 -Proxies are used to improve performance and provide better security. - -62 -00:05:21 --> 00:05:25 -By default, the ‘Use system proxy settings’ radio-button is selected. - -63 -00:05:26 --> 00:05:30 -This option uses the settings configured for your operating system. - -64 -00:05:31 --> 00:05:37 -To enter the proxy settings manually, click on Manual proxy configuration radio-button. - -65 -00:05:38 --> 00:05:41 -You can now enter the proxy settings in these fields. - -66 -00:05:42 --> 00:05:48 -Click on the Close button to close the Connection Settings dialog box. - -67 -00:05:49 --> 00:05:54 -Again click on the Close button to close the Preferences or Options dialog box. - -68 -00:05:55 --> 00:05:57 -Your settings will be saved automatically. - -69 -00:05:58 --> 00:06:04 -Lastly, we can update Firefox using the Update tab in the Advanced panel. - -70 -00:06:05 --> 00:06:07 -This brings us to the end of this tutorial. - -71 -00:06:08 --> 00:06:14 -In this tutorial, we learnt how to: set General preferences, set Privacy preferences. - -72 -00:06:15 --> 00:06:18 -Try this comprehension test assignment. - -73 -00:06:19 --> 00:06:20 -Open a new browser window. - -74 -00:06:21 --> 00:06:27 -Change your home page to ‘spoken-tutorial.org’. - -75 -00:06:28 --> 00:06:29 -Change your default download location to ‘Home Folder’ and - -76 -00:06:30 --> 00:06:37 -change your ‘When using the location bar, suggest:’ setting to History and Bookmarks. - -77 -00:06:38 --> 00:06:40 -Watch the video available at the following link: http://spoken-tutorial.org/What_is_a_Spoken_Tutorial. - -78 -00:06:41 --> 00:06:44 -It summarizes the Spoken Tutorial project. - -79 -00:06:45 --> 00:06:47 -If you do not have good bandwidth, you can download and watch it. - -80 -00:06:48 --> 00:06:49 -The Spoken Tutorial Project team: - -81 -00:06:50 --> 00:06:53 -Conducts workshops using spoken tutorials. - -82 -00:06:54 --> 00:06:57 -Gives certificates for those who pass an online test. - -83 -00:06:58 --> 00:07:03 -For more details, please write to: contact at spoken hyphen tutorial dot org. - -84 -00:07:04 --> 00:07:06 -Spoken Tutorial project is a part of the Talk to a Teacher project. - -85 -00:07:07 --> 00:07:11 -It is supported by the National Mission on Education through ICT, MHRD, Government of India. - -86 -00:07:12 --> 00:07:26 -More information on this mission is available at: http://spoken-tutorial.org/NMEICT-Intro. - -87 -00:07:27 --> 00:07:32 -This tutorial has been contributed by DesiCrew Solutions Pvt.Ltd. Thanks for joining. - diff --git a/media/videos/4/313/Popups-English.srt b/media/videos/4/313/Popups-English.srt deleted file mode 100644 index b7c4be9..0000000 --- a/media/videos/4/313/Popups-English.srt +++ /dev/null @@ -1,382 +0,0 @@ -Narration - -1 -00:00:00 --> 00:00:06 -Welcome to the spoken tutorial on Setting Pop-up and Image options in Mozilla Firefox. - -2 -00:00:07 --> 00:00:12 -In this tutorial, we will learn: * How to set Pop-up and image preferences. - -3 -00:00:13 --> 00:00:14 -Customize Toolbar. - -4 -00:00:15 --> 00:00:20 -Pop-up windows or pop-ups are windows that appear automatically without your permission. - -5 -00:00:21 --> 00:00:26 -They vary in size but usually don't cover the whole screen. - -6 -00:00:27 --> 00:00:36 -Some pop-ups open on top of the current Firefox window while others appear underneath Firefox (pop-unders). - -7 -00:00:37 --> 00:00:41 -Pop-ups can be quite irritating and that’s why we want to disable them. - -8 -00:00:42 --> 00:00:49 -In this tutorial, we are using Firefox version 7.0 on Ubuntu 10.04. - -9 -00:00:50 --> 00:00:52 -Let us open a Firefox browser. - -10 -00:00:53 --> 00:01:00 -In the URL bar, let us type ‘w w w dot pop up test dot com’. - -11 -00:01:01 --> 00:01:02 -Press the Enter key. - -12 -00:01:03 --> 00:01:06 -This site shows you what a pop-up is. - -13 -00:01:07 --> 00:01:11 -Click on the link that says ‘Multi-PopUp Test’. - -14 -00:01:12 --> 00:01:19 -You will see 6 pop-ups. - -15 -00:01:20 --> 00:01:21 -Click on Back. - -16 -00:01:22 --> 00:01:27 -2 more pop-ups appear. See how irritating they are? - -17 -00:01:28 --> 00:01:36 -Firefox allows you to control both pop-ups and pop-unders. This is done by clicking on Edit and then Preferences. - -18 -00:01:37 --> 00:01:42 -Windows users, please click on Tools and then on Options. - -19 -00:01:43 --> 00:01:47 -In the Preferences window, click on the Content tab. - -20 -00:01:48 --> 00:01:52 -The Block pop-up windows option is already turned on, by default. - -21 -00:01:53 --> 00:01:55 -If not, then you need to check it. - -22 -00:01:56 --> 00:02:01 -So, you don't have to worry about enabling it to prevent pop-ups from appearing in Firefox. - -23 -00:02:02 --> 00:02:08 -Now you can close the Firefox Preference window by clicking on the Close button. - -24 -00:02:09 --> 00:02:11 -You can also choose exceptions. - -25 -00:02:12 --> 00:02:16 -Exceptions are sites whose pop-ups are acceptable to you. - -26 -00:02:17 --> 00:02:19 -Click on Edit and then Preferences. - -27 -00:02:20 --> 00:02:25 -Windows users, please click on Tools and then on Options. - -28 -00:02:26 --> 00:02:33 -In order to add exceptions, click on the Exceptions button next to the field Block pop-up windows. - -29 -00:02:34 --> 00:02:36 -This opens up a dialog box. - -30 -00:02:37 --> 00:02:43 -In the Address of website field, type: ‘w w w dot google dot com’. - -31 -00:02:44 --> 00:02:45 -Click on the Allow button. - -32 -00:02:46 --> 00:02:49 -Click Close to close the dialog box. - -33 -00:02:50 --> 00:02:54 -Click Close to close the Preferences dialog box. - -34 -00:02:55 --> 00:03:00 -Now pop-ups will be disallowed from all sites except from 'google.com'. - -35 -00:03:01 --> 00:03:08 -Now in the URL bar, type: ‘w w w dot pop up test dot com’ and press Enter. - -36 -00:03:09 --> 00:03:11 -Click on the link 'Multi-PopUp Test'. - -37 -00:03:12 --> 00:03:14 -Not a single pop-up has appeared. - -38 -00:03:15 --> 00:03:19 -Your pop-up blocker is effective! - -39 -00:03:20 --> 00:03:23 -Images take time and bandwidth to download. - -40 -00:03:24 --> 00:03:29 -Mozilla Firefox has an option to selectively stop the downloading of images. - -41 -00:03:30 --> 00:03:32 -Click on Edit and then Preferences. - -42 -00:03:33 --> 00:03:38 -Windows users, please click on Tools and then on Options. - -43 -00:03:39 --> 00:03:43 -In the Preferences dialog box, choose the Content tab. - -44 -00:03:44 --> 00:03:48 -Disable the check-box for Load images automatically. - -45 -00:03:49 --> 00:03:52 -Click on Close to close the dialog box. - -46 -00:03:53 --> 00:03:59 -Now, in the Search bar, let us type "Flowers" and press the Enter key. - -47 -00:04:00 --> 00:04:03 -From the 'google' home page, click on Images. - -48 -00:04:04 --> 00:04:07 -click on the first image link that appears. - -49 -00:04:08 --> 00:04:11 -You see that the image does not load. - -50 -00:04:12 --> 00:04:17 -Mozilla Firefox offers a number of options to customize the toolbars. - -51 -00:04:18 --> 00:04:22 -Let’s say we want to hide any toolbar. For example, the Menu bar. - -52 -00:04:23 --> 00:04:26 -Right-click on an empty section of the Menu bar. - -53 -00:04:27 --> 00:04:29 -And uncheck it. -

That's it! -

- -54 -00:04:30 --> 00:04:35 -To view the the Menu bar again right-click on an empty section of the toolbar again. - -55 -00:04:36 --> 00:04:39 -Now check the Menu bar option. - -56 -00:04:40 --> 00:04:45 -Firefox offers advanced options to customize the toolbars. Let's look at some. - -57 -00:04:46 --> 00:04:53 -Let us add an icon to the Toolbar which will allow us to print a web-page with a single click. - -58 -00:04:54 --> 00:04:57 -Right-click on an empty section of the Toolbar. - -59 -00:04:58 --> 00:04:59 -Click on Customize. - -60 -00:05:00 --> 00:05:03 -The Customize Toolbar dialog box appears. - -61 -00:05:04 --> 00:05:08 -Within the dialog box, you can see the Print icon. - -62 -00:05:09 --> 00:05:11 -Drag the icon onto the Toolbar. - -63 -00:05:12 --> 00:05:16 -Close the dialog box by clicking on Done. - -64 -00:05:17 --> 00:05:20 -Click on the Print icon in the Toolbar. - -65 -00:05:21 --> 00:05:24 -This brings up the Print dialog box. - -66 -00:05:25 --> 00:05:27 -We will not be printing now. - -67 -00:05:28 --> 00:05:31 -So, click on Cancel to close the dialog box. - -68 -00:05:32 --> 00:05:34 -You can also add or remove toolbars. - -69 -00:05:35 --> 00:05:39 -To do so, right-click on the Toolbar and select Customize. - -70 -00:05:40 --> 00:05:43 -Click on Add New Toolbar button. - -71 -00:05:44 --> 00:05:49 -Enter a name for the new toolbar. Let’s name it Sample Toolbar. - -72 -00:05:50 --> 00:05:52 -Click on OK button. - -73 -00:05:53 --> 00:06:00 -Now drag and drop an icon, say Downloads, onto the Sample Toolbar. - -74 -00:06:01 --> 00:06:03 -Notice the new Toolbar in the browser. - -75 -00:06:04 --> 00:06:09 -To remove a toolbar, click on Restore Default Set button. - -76 -00:06:10 --> 00:06:15 -In order to maximize the contents area, we can reduce the size of the icons. - -77 -00:06:16 --> 00:06:21 -Check on the check-box titled "Use Small icons". - -78 -00:06:22 --> 00:06:26 -Click Done to close the dialog box. - -79 -00:06:27 --> 00:06:31 -We see that the size of the icons has become smaller. - -80 -00:06:32 --> 00:06:35 -This brings us to the end of this tutorial. - -81 -00:06:36 --> 00:06:40 -In this tutorial, we learnt how to: Set Pop-up and Image preferences. - -82 -00:06:41 --> 00:06:42 -Customize Toolbar. - -83 -00:06:43 --> 00:06:45 -Here is an assignment for you. - -84 -00:06:46 --> 00:06:58 -Open a new Mozilla Firefox window. Block all the pop-ups except those from 'www.yahoo.com'. Insert a bookmarks toolbar. - -85 -00:06:59 --> 00:07:01 -Watch the video available at the following link. - -86 -00:07:02 --> 00:07:04 -It summarizes the Spoken Tutorial project. - -87 -00:07:05 --> 00:07:09 -If you do not have good bandwidth, you can download and watch it. - -88 -00:07:10 --> 00:07:14 -The Spoken Tutorial Project team: * Conducts workshops using spoken tutorials. - -89 -00:07:15 --> 00:07:17 -Gives certificates for those who pass an online test. - -90 -00:07:18 --> 00:07:24 -For more details, please write to: contact at spoken hyphen tutorial dot org. - -91 -00:07:25 --> 00:07:28 -Spoken Tutorial project is a part of the Talk to a Teacher project. - -92 -00:07:29 --> 00:07:37 -It is supported by the National Mission on Education through ICT, MHRD, Government of India. - -93 -00:07:38 --> 00:07:47 -More information on the same is available at the following link. http://spoken-tutorial.org/NMEICT-Intro. - -94 -00:07:48 --> 00:07:53 -This tutorial has been contributed by DesiCrew Solutions Pvt. Ltd. -

Thanks for joining. -

- diff --git a/media/videos/4/314/Themes-Popup-blocking-English.srt b/media/videos/4/314/Themes-Popup-blocking-English.srt deleted file mode 100644 index 03a6365..0000000 --- a/media/videos/4/314/Themes-Popup-blocking-English.srt +++ /dev/null @@ -1,440 +0,0 @@ -Narration - -1 -00:00:00 --> 00:00:04 -Welcome to this spoken tutorial on Themes in Mozilla Firefox. - -2 -00:00:05 --> 00:00:12 -In this tutorial, we will learn about: Themes, Personas, Ad blocking in Mozilla Firefox. - -3 -00:00:13 --> 00:00:19 -Mozilla Firefox offers customization to suit the tastes or preferences of the user. - -4 -00:00:20 --> 00:00:22 -One of the customization is Themes. - -5 -00:00:23 --> 00:00:26 -A theme: * changes how Firefox looks. - -6 -00:00:27 --> 00:00:31 -Changes the background colors, the look of the buttons and the layout. - -7 -00:00:32 --> 00:00:39 -In this tutorial, we are using Firefox version 7.0 on Ubuntu 10.04. - -8 -00:00:40 --> 00:00:42 -Let us open a Firefox browser. - -9 -00:00:43 --> 00:00:47 -Let us first learn how to change the Theme of Mozilla Firefox. - -10 -00:00:48 --> 00:00:57 -First, let’s enable the 'Load images automatically' option so that we can view the images displayed in the browser. - -11 -00:00:58 --> 00:01:02 -From the Menu bar, click on Edit and then Preferences. - -12 -00:01:03 --> 00:01:07 -In the Preferences dialog box, choose the Content tab. - -13 -00:01:08 --> 00:01:11 -Check the Load images automatically box. - -14 -00:01:12 --> 00:01:13 -Click Close. - -15 -00:01:14 --> 00:01:24 -Now, click on the URL bar and type: addons dot mozilla dot org slash firefox slash themes - -16 -00:01:25 --> 00:01:26 -press Enter. - -17 -00:01:27 --> 00:01:31 -This takes us to the Themes page for Mozilla Firefox Add-ons. - -18 -00:01:32 --> 00:01:36 -We see a large number of themes here as thumbnails. - -19 -00:01:37 --> 00:01:40 -The thumbnails show you how the themes would appear. - -20 -00:01:41 --> 00:01:42 -Here you can preview the theme, - -21 -00:01:43 --> 00:01:45 -see the categories of themes available and - -22 -00:01:46 --> 00:01:51 -see the ratings given by other users who have used the theme. - -23 -00:01:52 --> 00:01:56 -Let us hover our mouse pointer over some themes. - -24 -00:01:57 --> 00:02:00 -Now, click on the theme Shine Bright Skin. - -25 -00:02:01 --> 00:02:04 -This is one of many themes available on this page. - -26 -00:02:05 --> 00:02:08 -The Shine Bright Skin theme page appears. - -27 -00:02:09 --> 00:02:11 -Click on the Continue to Download button. - -28 -00:02:12 --> 00:02:16 -This takes you to a page which gives additional details about the theme. - -29 -00:02:17 --> 00:02:21 -Click on the Add to Firefox button to install the theme. - -30 -00:02:22 --> 00:02:26 -The Add-on downloading progress bar appears. - -31 -00:02:27 --> 00:02:31 -Next, a Software Installation confirmation message appears. - -32 -00:02:32 --> 00:02:33 -Click Install Now. - -33 -00:02:34 --> 00:02:39 -A message that the 'theme will be installed once you restart Firefox' is displayed. - -34 -00:02:40 --> 00:02:42 -Click Restart Now. - -35 -00:02:43 --> 00:02:45 -Mozilla Firefox shuts down. - -36 -00:02:46 --> 00:02:50 -When it restarts, the new theme is applied. - -37 -00:02:51 --> 00:02:53 -Let’s go back to our Themes page. - -38 -00:02:54 --> 00:02:56 -Now, let us choose another theme. - -39 -00:02:57 --> 00:03:00 -This theme displays Add to Firefox button. - -40 -00:03:01 --> 00:03:04 -This will download the chosen theme. - -41 -00:03:05 --> 00:03:09 -Once the download is complete, a warning message window appears. - -42 -00:03:10 --> 00:03:12 -Click on the Install Now button. - -43 -00:03:13 --> 00:03:15 -You will be prompted to restart the Firefox browser. - -44 -00:03:16 --> 00:03:18 -Click on Restart Now button. - -45 -00:03:19 --> 00:03:21 -Mozilla Firefox shuts down. - -46 -00:03:22 --> 00:03:26 -When it restarts, the new themes are applied. - -47 -00:03:27 --> 00:03:30 -So you see, Themes help to improve the look and feel of the browser. - -48 -00:03:31 --> 00:03:35 -It customizes the Firefox browser to your unique taste. - -49 -00:03:36 --> 00:03:39 -If, for some reason, you wish to go back to the default theme - -50 -00:03:40 --> 00:03:43 -then just click on Tools and Add-ons. - -51 -00:03:44 --> 00:03:47 -On the left panel, click on the Appearance tab. - -52 -00:03:48 --> 00:03:52 -Here, all the themes which have been downloaded are visible. - -53 -00:03:53 --> 00:03:55 -See the Default Theme here. - -54 -00:03:56 --> 00:03:58 -Click on the Enable button. - -55 -00:03:59 --> 00:04:01 -Click on the Restart Now button. - -56 -00:04:02 --> 00:04:05 -Mozilla Firefox will shut down and restart. - -57 -00:04:06 --> 00:04:11 -When it restarts, the Default theme is once again visible. - -58 -00:04:12 --> 00:04:15 -Let’s close the Add-ons tab. - -59 -00:04:16 --> 00:04:21 -Personas are free, easy-to-install skins for Firefox. - -60 -00:04:22 --> 00:04:25 -Personas Plus extends this built-in functionality: - -61 -00:04:26 --> 00:04:27 -to give greater control - -62 -00:04:28 --> 00:04:33 -easier access to new, popular and even your own favorite Personas. - -63 -00:04:34 --> 00:04:43 -Click on the URL bar and type: -

addons dot mozilla dot org slash firefox slash personas -

- -64 -00:04:44 --> 00:04:46 -press Enter. - -65 -00:04:47 --> 00:04:51 -This takes us to the Personas page for Mozilla Firefox Add-ons. - -66 -00:04:52 --> 00:04:55 -We see a large number of 'Personas' here. - -67 -00:04:56 --> 00:05:00 -Click on any Persona of your choice. - -68 -00:05:01 --> 00:05:05 -This will take you to a page which gives details of the chosen Persona. - -69 -00:05:06 --> 00:05:08 -Click on the Add to Firefox button. - -70 -00:05:09 --> 00:05:15 -A Notification bar will appear at the top to alert you that a new theme is installed. - -71 -00:05:16 --> 00:05:20 -Click on the small “x” mark on the right of the Notification bar. - -72 -00:05:21 --> 00:05:27 -Firefox installs this Persona automatically. - -73 -00:05:28 --> 00:05:31 -Often 'ads' interfere with our internet experience. - -74 -00:05:32 --> 00:05:35 -But there are specialized software that help to block ads. - -75 -00:05:36 --> 00:05:38 -One such add-on is Adblock. - -76 -00:05:39 --> 00:05:42 -Click on Tools and then on Add-ons. - -77 -00:05:43 --> 00:05:50 -In the search tab, at the top-right corner, search for Adblock.Press Enter. - -78 -00:05:51 --> 00:05:54 -A list of 'Ad' blocking software is displayed. - -79 -00:05:55 --> 00:05:58 -Click on the Install button for Adblock Plus. - -80 -00:05:59 --> 00:06:01 -'Adblock' starts downloading. - -81 -00:06:02 --> 00:06:05 -That's it! Ad blocker is now installed. - -82 -00:06:06 --> 00:06:13 -A notification message will be displayed which says- “Adblock will be installed after you restart Firefox”. - -83 -00:06:14 --> 00:06:16 -Click on the Restart Now link. - -84 -00:06:17 --> 00:06:20 -Mozilla Firefox will shut down and restart. - -85 -00:06:21 --> 00:06:24 -When it restarts, the ad blocker will take effect. - -86 -00:06:25 --> 00:06:29 -However, using ad blockers have some negative consequences. - -87 -00:06:30 --> 00:06:34 -Some sites do not allow you to enter them when ad blocker is on. - -88 -00:06:35 --> 00:06:40 -This is because many free sites earn their income from 'ads'. - -89 -00:06:41 --> 00:06:45 -Adblocker may prevent some sites from being displayed on your browser. - -90 -00:06:46 --> 00:06:50 -This factor has to be considered carefully when blocking ads. - -91 -00:06:51 --> 00:06:53 -This brings us to the end of this tutorial. - -92 -00:06:54 --> 00:06:59 -In this tutorial, we learnt about: Themes, Personas and Ad blocking. - -93 -00:07:00 --> 00:07:02 -Try this assignment. - -94 -00:07:03 --> 00:07:05 -Install the theme 'NASA night launch'. - -95 -00:07:06 --> 00:07:09 -Then switch back to the default theme. - -96 -00:07:10 --> 00:07:14 -Block all pop-ups except those from yahoo.com - -97 -00:07:15 --> 00:07:17 -Watch the video available at the following link. - -98 -00:07:18 --> 00:07:20 -It summarizes the Spoken Tutorial project. - -99 -00:07:21 --> 00:07:24 -If you do not have good bandwidth, you can download and watch it. - -100 -00:07:25 --> 00:07:27 -The Spoken Tutorial Project team: - -101 -00:07:28 --> 00:07:30 -Conducts workshops using spoken tutorials. - -102 -00:07:31 --> 00:07:34 -Gives certificates for those who pass an online test. - -103 -00:07:35 --> 00:07:40 -For more details, please write to: contact at spoken hyphen tutorial dot org. - -104 -00:07:41 --> 00:07:44 -Spoken Tutorial project is a part of the Talk to a Teacher project. - -105 -00:07:45 --> 00:07:52 -It is supported by the National Mission on Education through ICT, MHRD, Government of India. - -106 -00:07:53 --> 00:07:55 -More information on this mission is available at: - -107 -00:07:56 --> 00:08:03 -spoken hyphen tutorial dot org slash NMEICT hyphen Intro. - -108 -00:08:04 --> 00:08:07 -This tutorial has been contributed by DesiCrew Solutions Pvt. Ltd. - -109 -00:08:08 --> 00:08:13 -Thanks for joining. - diff --git a/media/videos/4/315/Bookmarks-English.srt b/media/videos/4/315/Bookmarks-English.srt deleted file mode 100644 index 111d92d..0000000 --- a/media/videos/4/315/Bookmarks-English.srt +++ /dev/null @@ -1,550 +0,0 @@ -Narration - -1 -00:00:00 --> 00:00:06 -Welcome to the Spoken Tutorial on Organizing Bookmarks and Printing in Mozilla Firefox. - -2 -00:00:07 --> 00:00:10 -In this tutorial, we will learn about Bookmarks. - -3 -00:00:11 --> 00:00:17 -We will also learn how to: Organize Bookmarks, set up the Firefox page, Preview and Print it. - -4 -00:00:18 --> 00:00:25 -Here we are using Firefox 7.0 on Ubuntu 10.04. - -5 -00:00:26 --> 00:00:28 -Let us open the Firefox browser. - -6 -00:00:29 --> 00:00:31 -By default, the yahoo home page opens. - -7 -00:00:32 --> 00:00:36 -Bookmarks help you navigate to pages that you use often. - -8 -00:00:37 --> 00:00:41 -We had learnt a little bit about Bookmarks in an earlier tutorial. - -9 -00:00:42 --> 00:00:45 -We had also added a bookmark for gmail there. - -10 -00:00:46 --> 00:00:49 -Let’s click on this to open the gmail home page. - -11 -00:00:50 --> 00:00:52 -You are directed to the gmail home page. - -12 -00:00:53 --> 00:00:58 -Did you notice the yellow star on the right of the gmail address, in the Address bar? - -13 -00:00:59 --> 00:01:02 -This indicates that this site has been bookmarked. - -14 -00:01:03 --> 00:01:08 -You can also use the star to change the name of a bookmark and store it in a different folder. - -15 -00:01:09 --> 00:01:17 -Let’s change the name of gmail to mygmailpage and store it in a new folder named MyNewBookmarks. - -16 -00:01:18 --> 00:01:21 -In the Address bar, click on the yellow star. - -17 -00:01:22 --> 00:01:24 -The Edit This Bookmark dialog box appears. - -18 -00:01:25 --> 00:01:28 -In the Name field, enter mygmailpage. - -19 -00:01:29 --> 00:01:33 -Click on the Folder drop-down and select Choose. - -20 -00:01:34 --> 00:01:38 -Select Bookmarks menu and click on New folder. - -21 -00:01:39 --> 00:01:40 -A New Folder is created. - -22 -00:01:41 --> 00:01:44 -Rename this folder MyBookmarks. - -23 -00:01:45 --> 00:01:48 -In Tags, type: email. - -24 -00:01:49 --> 00:01:51 -Tags help us categorize bookmarks. - -25 -00:01:52 --> 00:01:54 -You can associate a number of tags with a bookmark. - -26 -00:01:55 --> 00:01:57 -For example, when you bookmark a shopping site, - -27 -00:01:58 --> 00:02:02 -You might tag it with the words gifts, books or toys. - -28 -00:02:03 --> 00:02:05 -Click Done. - -29 -00:02:06 --> 00:02:08 -Alternately, you can also press the Ctrl and D keys - -30 -00:02:09 --> 00:02:11 -to bookmark the page. - -31 -00:02:12 --> 00:02:15 -From the Menu bar, click on Bookmarks. - -32 -00:02:16 --> 00:02:19 -The MyBookMarks folder is displayed in the Bookmarks menu. - -33 -00:02:20 --> 00:02:22 -Place the cursor on the folder. - -34 -00:02:23 --> 00:02:26 -The mygmailpage bookmark is saved there. - -35 -00:02:27 --> 00:02:30 -Now, in the Address bar, type the tag "email". - -36 -00:02:31 --> 00:02:37 -Notice that the site mygmailpage is displayed as the first option on the list. - -37 -00:02:38 --> 00:02:44 -So, we have renamed the bookmark, saved it in another folder and located it using a tag! - -38 -00:02:45 --> 00:02:52 -Now, let’s bookmark the www dot google dot com website. - -39 -00:02:53 --> 00:02:55 -In the Address bar, select the address and delete it. - -40 -00:02:56 --> 00:03:00 -Now type www dot google dot com - -41 -00:03:01 --> 00:03:02 -Press Enter. - -42 -00:03:03 --> 00:03:07 -Now, from the right corner of the Address bar, click on the star. - -43 -00:03:08 --> 00:03:11 -The 'google' website is bookmarked. - -44 -00:03:12 --> 00:03:35 -In the same manner, let’s bookmark four more sites Spoken Tutorial, Yahoo, Firefox Add-ons and Ubuntu . - -45 -00:03:36 --> 00:03:39 -Notice that we have not saved these bookmarks to a folder. - -46 -00:03:40 --> 00:03:43 -And how do we delete a bookmark we created? - -47 -00:03:44 --> 00:03:49 -Of course, you’ve already noticed the Remove bookmark button in the Edit This Bookmark dialog box. - -48 -00:03:50 --> 00:03:54 -Let’s delete the www.google.com bookmark. - -49 -00:03:55 --> 00:04:02 -In the Address bar, type: 'www.google.com'. Click on the yellow star. - -50 -00:04:03 --> 00:04:08 -From the Edit This Bookmark dialog box, click the Remove Bookmark button. - -51 -00:04:09 --> 00:04:13 -From Menu bar, click on Bookmarks and MyBookmarks. - -52 -00:04:14 --> 00:04:18 -The google bookmark is no longer visible in the Bookmark menu. - -53 -00:04:19 --> 00:04:22 -How can you access the bookmarks you created? - -54 -00:04:23 --> 00:04:25 -You can access bookmarks in many ways. - -55 -00:04:26 --> 00:04:32 -The easiest way to access a site that you bookmarked is to type the name in the Address bar. - -56 -00:04:33 --> 00:04:38 -Click on the Address bar, select the address displayed and delete it. - -57 -00:04:39 --> 00:04:42 -Now, in the Address bar, type the letter G. - -58 -00:04:43 --> 00:04:48 -Notice that a list of the websites that begin with 'G' are displayed. - -59 -00:04:49 --> 00:04:54 -These are also the sites that you've bookmarked, tagged, and visited. - -60 -00:04:55 --> 00:04:59 -You can also view and arrange your bookmarks in the Library window. - -61 -00:05:00 --> 00:05:05 -From the Menu bar, click on Bookmarks and select Show All Bookmarks. - -62 -00:05:06 --> 00:05:08 -The Library window opens. - -63 -00:05:09 --> 00:05:15 -By default, all the bookmarks that you created are saved in the Unsorted Bookmarks folder. - -64 -00:05:16 --> 00:05:23 -Notice that the Yahoo, Spoken Tutorial, Ubuntu and FireFox Add-ons bookmarks are listed here. - -65 -00:05:24 --> 00:05:28 -Let’s say, we want to add the Yahoo India bookmark to the Bookmarks menu. - -66 -00:05:29 --> 00:05:33 -First, let’s move the Library window to the centre of the screen. - -67 -00:05:34 --> 00:05:38 -Now, we can view the Menu bar and the options clearly. - -68 -00:05:39 --> 00:05:42 -From the Unsorted Bookmarks folder, select the Yahoo bookmark. - -69 -00:05:43 --> 00:05:48 -Press the left mouse button and drag the bookmark to the Bookmarks menu. - -70 -00:05:49 --> 00:05:52 -Ensure that the cursor is over the Bookmarks menu. - -71 -00:05:53 --> 00:05:55 -The Bookmark menu expands. - -72 -00:05:56 --> 00:06:00 -Place the mouse pointer on the menu and release the 'left mouse button'. - -73 -00:06:01 --> 00:06:03 -Now click on the Bookmark menu. - -74 -00:06:04 --> 00:06:07 -The Yahoo bookmark now appears on the Bookmark menu. - -75 -00:06:08 --> 00:06:14 -To open a bookmark directly from the Library window, simply double-click on it. - -76 -00:06:15 --> 00:06:18 -Now, let’s close the Library window. - -77 -00:06:19 --> 00:06:22 -Firefox also allows you to sort bookmarks. - -78 -00:06:23 --> 00:06:25 -Let’s sort bookmarks by Names. - -79 -00:06:26 --> 00:06:31 -From Menu bar, click View, select Sidebar and then click on Bookmarks. - -80 -00:06:32 --> 00:06:36 -The Bookmarks sidebar opens in the left panel. - -81 -00:06:37 --> 00:06:41 -Let’s bookmark Google.com again. - -82 -00:06:42 --> 00:06:47 -From the Bookmarks sidebar, select the Unsorted Bookmarks folder and right-click on it. - -83 -00:06:48 --> 00:06:50 -Select Sort By Name. - -84 -00:06:51 --> 00:06:53 -The bookmarks are sorted by name. - -85 -00:06:54 --> 00:06:56 -You can also rearrange the bookmarks manually. - -86 -00:06:57 --> 00:07:02 -From the Bookmarks Sidebar, click on and open the Bookmarks Menu folder. - -87 -00:07:03 --> 00:07:07 -Next, click on and open the Unsorted Bookmarks folder. - -88 -00:07:08 --> 00:07:11 -Move the mouse over the Spoken Tutorial bookmark. - -89 -00:07:12 --> 00:07:21 -Now, press the left mouse button and drag the bookmark up to Ubuntu and Free Software folder in the Bookmarks Sidebar. - -90 -00:07:22 --> 00:07:24 -Release the mouse-button. - -91 -00:07:25 --> 00:07:29 -The bookmark is moved to the Ubuntu and Free Software folder. - -92 -00:07:30 --> 00:07:34 -Changes you make in the Bookmarks Sidebar are also reflected in the Bookmarks menu. - -93 -00:07:35 --> 00:07:38 -You can also sort bookmarks automatically. - -94 -00:07:39 --> 00:07:44 -From the Menu bar, click Bookmarks and select Show all bookmarks. - -95 -00:07:45 --> 00:07:50 -In the Library window that appears, from the left panel, select Unsorted bookmarks. - -96 -00:07:51 --> 00:07:56 -Now, click on Views, Sort and Sort by Added. - -97 -00:07:57 --> 00:08:03 -The addresses are sorted by the order in which they were added as bookmarks. Click Close. - -98 -00:08:04 --> 00:08:07 -Finally, let’s learn how to print this web page. - -99 -00:08:08 --> 00:08:11 -First let’s set up this web page for printing. - -100 -00:08:12 --> 00:08:16 -From the Firefox menu bar, click File and select Page Setup. - -101 -00:08:17 --> 00:08:20 -The Page Setup dialog box appears. - -102 -00:08:21 --> 00:08:23 -Select the Paper Size as 'A4'. - -103 -00:08:24 --> 00:08:27 -Choose Orientation as Portrait. - -104 -00:08:28 --> 00:08:29 -Click Apply. - -105 -00:08:30 --> 00:08:35 -To check how the settings have been applied, click File and select Print Preview. - -106 -00:08:36 --> 00:08:39 -You can see the page exactly as it would look when it is printed. - -107 -00:08:40 --> 00:08:41 -Click Close to exit. - -108 -00:08:42 --> 00:08:46 -From the Firefox Menu bar, click File and select Print. - -109 -00:08:47 --> 00:08:49 -The Print dialog box appears on the screen. - -110 -00:08:50 --> 00:08:54 -Here, we select the Generic Printer option in General Tab. - -111 -00:08:55 --> 00:09:00 -Next, in the Range field, select All Pages. - -112 -00:09:01 --> 00:09:03 -In Copies, we will select 1. - -113 -00:09:04 --> 00:09:09 -Click the Options tab and select "Ignore Scaling and Shrink To Fit Page Width". - -114 -00:09:10 --> 00:09:11 -Click Print. - -115 -00:09:12 --> 00:09:16 -If the printer is configured correctly, the printer should start printing now. - -116 -00:09:17 --> 00:09:22 -This brings us to the end of this tutorial. In this tutorial, we learnt about - -117 -00:09:23 --> 00:09:31 -Bookmarks.We also learnt how to: Organize Bookmarks, Setup up the Firefox Page, Preview and Print. - -118 -00:09:32 --> 00:09:34 -Here is an assignment for you. - -119 -00:09:35 --> 00:09:37 -Open a new Mozilla Firefox window. - -120 -00:09:38 --> 00:09:40 -Go to five new sites. - -121 -00:09:41 --> 00:09:42 -Bookmark all of them. - -122 -00:09:43 --> 00:09:46 -Save all the bookmarks in a new folder. - -123 -00:09:47 --> 00:09:50 -Organize the bookmarks in reverse alphabetical order. - -124 -00:09:51 --> 00:09:54 -Go to the last bookmarked site. - -125 -00:09:55 --> 00:09:57 -Setup the web page for printing and print it. - -126 -00:09:58 --> 00:10:01 -Watch the video available at the following link. - -127 -00:10:02 --> 00:10:04 -It summarizes the Spoken Tutorial project. - -128 -00:10:05 --> 00:10:09 -If you do not have good bandwidth, you can download and watch it. - -129 -00:10:10 --> 00:10:14 -The Spoken Tutorial Project Team:Conducts workshops using spoken tutorials. - -130 -00:10:15 --> 00:10:17 -Gives certificates for those who pass an online test. - -131 -00:10:18 --> 00:10:24 -For more details, please write to contact at spoken hyphen tutorial dot org. - -132 -00:10:25 --> 00:10:28 -Spoken Tutorial Project is a part of the Talk to a Teacher project. - -133 -00:10:29 --> 00:10:36 -It is supported by the National Mission on Education through ICT, MHRD, Government of India. - -134 -00:10:37 --> 00:10:39 -More information on this mission is available at: - -135 -00:10:40 --> 00:10:46 -spoken hyphen tutorial dot org slash NMEICT hyphen Intro. - -136 -00:10:47 --> 00:10:51 -This tutorial has been contributed by DesiCrew Solutions Pvt. Ltd. - -137 -00:10:52 --> 00:10:57 -Thanks for joining. - diff --git a/media/videos/4/316/Extensions-English.srt b/media/videos/4/316/Extensions-English.srt deleted file mode 100644 index 01e450c..0000000 --- a/media/videos/4/316/Extensions-English.srt +++ /dev/null @@ -1,418 +0,0 @@ -Narration - -1 -00:00:00 --> 00:00:04 -Welcome to the Spoken Tutorial on Extensions in Mozilla Firefox. - -2 -00:00:05 --> 00:00:13 -In this tutorial, we will learn about: Extensions or Add-ons, installing Extensions, recommended Extensions. - -3 -00:00:14 --> 00:00:19 -Here we are using Firefox 7.0 on Ubuntu 10.04. - -4 -00:00:20 --> 00:00:22 -Let us open the Firefox browser. - -5 -00:00:23 --> 00:00:26 -By default, the yahoo home page opens. - -6 -00:00:27 --> 00:00:28 -What are Extensions or Add-ons? - -7 -00:00:29 --> 00:00:30 -Extensions allow you to: - -8 -00:00:31 --> 00:00:34 -Add new features to the Firefox browser. - -9 -00:00:35 --> 00:00:36 -Enhance existing features. - -10 -00:00:37 --> 00:00:41 -Customize the Firefox browser to suit your preferences. - -11 -00:00:42 --> 00:00:44 -Extensions are a part of the Firefox browser - -12 -00:00:45 --> 00:00:47 -and extend the browser’s capabilities. - -13 -00:00:48 --> 00:00:50 -For example, you can install extensions that: - -14 -00:00:51 --> 00:00:53 -Block advertisements or pop-ups. - -15 -00:00:54 --> 00:00:55 -Compare prices of commodities and even - -16 -00:00:56 --> 00:00:59 -display weather updates. - -17 -00:01:00 --> 00:01:02 -Let’s install the Grab and Drag extension. - -18 -00:01:03 --> 00:01:06 -Grab and Drag let’s you scroll through web pages in various ways. - -19 -00:01:07 --> 00:01:11 -It is similar to the 'grab and drag' function in Adobe Acrobat. - -20 -00:01:12 --> 00:01:15 -From the Menu bar, click Tools and Add-ons. - -21 -00:01:16 --> 00:01:19 -The Add-ons Manager tab opens. - -22 -00:01:20 --> 00:01:27 -Alternately, you can also press the Ctrl+Shift+A keys together to open the Add-ons Manager tab. - -23 -00:01:28 --> 00:01:33 -The left panel in Add-ons Manager displays the available options. - -24 -00:01:34 --> 00:01:38 -Notice, by default the option Get Add-ons is selected. - -25 -00:01:39 --> 00:01:44 -The right panel displays information for the option selected in the left panel. - -26 -00:01:45 --> 00:01:50 -So, the right panel defines Add-ons and tells you how to get started with add-ons. - -27 -00:01:51 --> 00:01:54 -It even lists some Add-ons you can install. - -28 -00:01:55 --> 00:01:58 -Now, we shall install the new Add-on- Grab and Drag. - -29 -00:01:59 --> 00:02:07 -First, in the Search bar, located on the top-right corner, type: Grab and Drag. Press Enter. - -30 -00:02:08 --> 00:02:13 -The right panel, now lists the add-ons that best match the name we searched for. - -31 -00:02:14 --> 00:02:19 -Also, notice that all the add-ons that have the word drag in the title are displayed. - -32 -00:02:20 --> 00:02:25 -Notice that the first name on the list, Grab and Drag, is an exact match. - -33 -00:02:26 --> 00:02:27 -Click on Install. - -34 -00:02:28 --> 00:02:34 -As with most softwares, some add-ons too may have 'end-user license agreements'. - -35 -00:02:35 --> 00:02:40 -On the End-User License Agreement dialog box, click Accept and Install. - -36 -00:02:41 --> 00:02:45 -The Add-on downloading progress bar appears. - -37 -00:02:46 --> 00:02:49 -Next, a message that the 'add-on will be installed - -38 -00:02:50 --> 00:02:53 -when you restart Mozilla Firefox'is displayed. - -39 -00:02:54 --> 00:02:56 -Click on Restart Now. - -40 -00:02:57 --> 00:03:00 -The Firefox browser closes and reopens. - -41 -00:03:01 --> 00:03:04 -The Add-ons Manager opens in a new tab. - -42 -00:03:05 --> 00:03:10 -Notice that the Grab and Drag extension is displayed in the right panel of the Extensions tab. - -43 -00:03:11 --> 00:03:17 -Following the previous steps, let’s install another extension Scrap Book. - -44 -00:03:18 --> 00:03:23 -Scrap Book allows you to save and manage Web page collections. - -45 -00:03:24 --> 00:03:32 -Notice that the installation progress bar and the message to close and restart Firefox are not displayed separately. - -46 -00:03:33 --> 00:03:35 -They are displayed in the Scrap Book bar. - -47 -00:03:36 --> 00:03:39 -Click Restart Now. - -48 -00:03:40 --> 00:03:43 -Scrap Book is installed in Firefox. - -49 -00:03:44 --> 00:03:47 -Pause this tutorial and do this assignment. - -50 -00:03:48 --> 00:03:51 -In the Firefox browser, open Add-ons Manager. - -51 -00:03:52 --> 00:03:58 -Install a new add-on from the Featured Add-ons list, in the Get Add-ons option. - -52 -00:03:59 --> 00:04:02 -You manage extensions that is- add, delete or update them - -53 -00:04:03 --> 00:04:05 -using the Extensions option - -54 -00:04:06 --> 00:04:07 -in the Add-ons Manager. - -55 -00:04:08 --> 00:04:12 -In the Firefox browser, click the Add-ons Manager tab. - -56 -00:04:13 --> 00:04:15 -From the left panel, click Extensions. - -57 -00:04:16 --> 00:04:21 -The right panel now displays the Extensions that are installed on your computer. - -58 -00:04:22 --> 00:04:26 -To learn more about ScrapBook, select it and click More. - -59 -00:04:27 --> 00:04:30 -Details about Scrap Book are displayed. - -60 -00:04:31 --> 00:04:34 -Click on the website link to learn all about the Extensions. - -61 -00:04:35 --> 00:04:39 -Now, from the left panel, click on the Extension option. - -62 -00:04:40 --> 00:04:45 -Notice, for each Extension you can set preferences, disable or remove it. - -63 -00:04:46 --> 00:04:48 -Select Grab and Drag and click on Preferences. - -64 -00:04:49 --> 00:04:52 -You can set your preferences using this dialog box. - -65 -00:04:53 --> 00:04:56 -Click Cancel to exit the dialog box. - -66 -00:04:57 --> 00:05:00 -Now, select Scrap Book and click Preferences. - -67 -00:05:01 --> 00:05:08 -Notice that the Scrap Book Options dialog box is different from the Grab and Drag Preferences dialog box. - -68 -00:05:09 --> 00:05:12 -Therefore, each Extension has different settings that can be changed. - -69 -00:05:13 --> 00:05:16 -If the Preferences button is not visible for an Extension, - -70 -00:05:17 --> 00:05:20 -it implies that there are no preferences for it. - -71 -00:05:21 --> 00:05:25 -Click Close to exit the ScrapBook Options dialog box. - -72 -00:05:26 --> 00:05:30 -As with most softwares, add-ons too are updated on a regular basis. - -73 -00:05:31 --> 00:05:36 -To update Scrap Book, select it, right-click and click Find Updates. - -74 -00:05:37 --> 00:05:41 -If Updates are found, the Update button is displayed. - -75 -00:05:42 --> 00:05:46 -Click on it to update the add-on. - -76 -00:05:47 --> 00:05:50 -As there are no updates for Scrap Book, the Update button is not displayed. - -77 -00:05:51 --> 00:05:57 -Finally, if you do not want to use an Extension click the Disable button. - -78 -00:05:58 --> 00:06:02 -And to remove an Extension from your computer, click Remove. - -79 -00:06:03 --> 00:06:05 -We have learnt all about Extensions! - -80 -00:06:06 --> 00:06:12 -You can now use Extensions to streamline tasks by adding more functionalities to Firefox. - -81 -00:06:13 --> 00:06:17 -You can use the Get Add-ons option to learn about a number of Add-ons. - -82 -00:06:18 --> 00:06:23 -You can then select and install Add-ons that are most relevant or useful to you. - -83 -00:06:24 --> 00:06:30 -To learn more about Firefox Extensions, please visit the Firefox website. - -84 -00:06:31 --> 00:06:33 -This brings us to the end of this tutorial. - -85 -00:06:34 --> 00:06:41 -In this tutorial, we learnt about: Extensions, Installing Extensions, Recommended Extensions. - -86 -00:06:42 --> 00:06:44 -Here is an assignment for you. - -87 -00:06:45 --> 00:06:48 -Search for an extension called WebMail Notifier and - -88 -00:06:49 --> 00:06:51 -install it on your computer. - -89 -00:06:52 --> 00:07:00 -Find out about the features of this extension and how you can use them to check unread mails from your mail accounts. - -90 -00:07:01 --> 00:07:02 -Disable the Extension. - -91 -00:07:03 --> 00:07:06 -Then remove it from Firefox. - -92 -00:07:07 --> 00:07:09 -Watch the video available at the following link. - -93 -00:07:10 --> 00:07:12 -It summarizes the Spoken Tutorial project. - -94 -00:07:13 --> 00:07:17 -If you do not have good bandwidth, you can download and watch it. - -95 -00:07:18 --> 00:07:18 -The Spoken Tutorial Project team: - -96 -00:07:19 --> 00:07:22 -Conducts workshops using spoken tutorials. - -97 -00:07:23 --> 00:07:26 -Gives certificates for those who pass an online test. - -98 -00:07:27 --> 00:07:32 -For more details, please write to: contact at spoken hyphen tutorial dot org. - -99 -00:07:33 --> 00:07:36 -Spoken Tutorial project is a part of the Talk to a Teacher project. - -100 -00:07:37 --> 00:07:44 -It is supported by the National Mission on Education through ICT, MHRD, Government of India. - -101 -00:07:45 --> 00:07:47 -More information on this mission is available at: - -102 -00:07:48 --> 00:07:55 -spoken hyphen tutorial dot org slash NMEICT hyphen Intro. - -103 -00:07:56 --> 00:07:59 -This tutorial has been contributed by DesiCrew Solutions Pvt. Ltd. - -104 -00:08:00 --> 00:08:05 -Thanks for joining. - diff --git a/media/videos/4/317/Add-ons-English.srt b/media/videos/4/317/Add-ons-English.srt deleted file mode 100644 index c610cd9..0000000 --- a/media/videos/4/317/Add-ons-English.srt +++ /dev/null @@ -1,395 +0,0 @@ -Narration - -1 -00:00:01 --> 00:00:07 -Welcome to the Spoken tutorial on Advanced Firefox features in Mozilla Firefox. - -2 -00:00:08 --> 00:00:18 -In this tutorial, we will learn about Advanced Firefox features- -

Quick find link -Firefox Sync -Plug-ins. -

- -3 -00:00:19 --> 00:00:25 -Here, we are using Firefox 7.0 on Ubuntu 10.04. - -4 -00:00:26 --> 00:00:28 -Let us open the Firefox browser. - -5 -00:00:29 --> 00:00:32 -By default, the "yahoo" home page opens. - -6 -00:00:33 --> 00:00:36 -Now, let's learn about searching for links in Firefox. - -7 -00:00:37 --> 00:00:42 -Firefox allows you to search for and find links within a web-page. - -8 -00:00:43 --> 00:00:50 -In the Address bar, type: www. Google.co.in and press Enter. - -9 -00:00:51 --> 00:00:57 -Notice that the cursor is now placed inside the Google search bar. - -10 -00:00:58 --> 00:01:03 -Next, click the cursor any where on the page outside the search bar. - -11 -00:01:04 --> 00:01:08 -Now from the keyboard, press the apostrophe key. - -12 -00:01:09 --> 00:01:15 -The Quick Find links only search box appears at the bottom left corner of the window. - -13 -00:01:16 --> 00:01:24 -Inside this box, let's type Bengali. Notice that the link Bengali is highlighted. - -14 -00:01:25 --> 00:01:30 -You can now search quickly and easily for links within a web page. - -15 -00:01:31 --> 00:01:42 -Suppose, you want to access the Firefox browser with your settings and preferences from any other computer or device, like your mobile phone, will that be possible? - -16 -00:01:43 --> 00:01:54 -Yes! The Firefox Sync feature stores all your browser data like- bookmarks, history and installed extensions securely on a Mozilla server. - -17 -00:01:55 --> 00:02:01 -You can Sync other computers to this server and so you can access your browser data. - -18 -00:02:02 --> 00:02:05 -Now, let's enable the Sync features. - -19 -00:02:06 --> 00:02:14 -From the Menu bar, click Tools and Set Up Sync . The Firefox Sync Setup dialog box appears. - -20 -00:02:15 --> 00:02:20 -As we are using Sync for the first time, click Create a New Account. - -21 -00:02:21 --> 00:02:23 -The Account Details dialog box appears. - -22 -00:02:24 --> 00:02:29 -For the purpose of this tutorial, we have already created a g-mail account- - -23 -00:02:30 --> 00:02:41 -ST.USERFF@gmail.com. In the Email Address field, enter ST.USERFF@gmail.com. - -24 -00:02:42 --> 00:02:46 -In Choose a Password field, let's enter the password. - -25 -00:02:47 --> 00:02:51 -In the Confirm Password field, re-enter the password. - -26 -00:02:52 --> 00:02:57 -By default, the server- Firefox Sync Server is selected. - -27 -00:02:58 --> 00:03:07 -We will not change the settings. Check the “Terms of Service” and “Privacy Policy” box. - -28 -00:03:08 --> 00:03:10 -Click Next. Firefox displays the Sync Key. - -29 -00:03:11 --> 00:03:17 -This is the key which you must enter in other systems to access your Sync from those machines. - -30 -00:03:18 --> 00:03:23 -Click the Save button. In the Save Sync Key dialog box that appears, - -31 -00:03:24 --> 00:03:27 -browse to the Desktop. Click Save. - -32 -00:03:28 --> 00:03:34 -The 'Firefox sync key.html' file is saved as the HTML file in the desktop. - -33 -00:03:35 --> 00:03:40 -Make a note of this key and save the number where you can access it easily. - -34 -00:03:41 --> 00:03:47 -You will not be able to access your Sync account from other computer without entering this key. - -35 -00:03:48 --> 00:03:52 -Click Next. In the Confirm you are not a Robot dialog box, - -36 -00:03:53 --> 00:03:58 -enter the words displayed in the box. The setup is complete. - -37 -00:03:59 --> 00:04:05 -Click on the Sync Options button on the left of the Firefox Sync Setup dialog box. - -38 -00:04:06 --> 00:04:08 -You can set your Sync options here. - -39 -00:04:09 --> 00:04:16 -For the purpose of this tutorial, we shall not change the default option. Click Done. - -40 -00:04:17 --> 00:04:24 -Click Next. Firefox verifies the contents. Then the Finish button is displayed, click Finish. - -41 -00:04:25 --> 00:04:28 -You have setup 'Firefox Sync' on your computer. - -42 -00:04:29 --> 00:04:34 -And now, how do you access your browser data from another computer? - -43 -00:04:35 --> 00:04:39 -You need Sync to other computer or device tool. - -44 -00:04:40 --> 00:04:45 -For the purpose of this tutorial, we shall list these instructions in slides. - -45 -00:04:46 --> 00:04:51 -You can follow these instructions to 'Sync' your other computer or device. - -46 -00:04:52 --> 00:04:56 -Open the Firefox browser in the other computer or device. - -47 -00:04:57 --> 00:05:02 -From the Menu bar, click Tools and Setup Firefox Sync. - -48 -00:05:03 --> 00:05:09 -Click I have a Firefox Sync account. Enter your email-id and password. - -49 -00:05:10 --> 00:05:14 -Enter your Sync key . Click Finish. - -50 -00:05:15 --> 00:05:22 -The other computer is also Sync now. You can access your browser data from the other computer tools. - -51 -00:05:23 --> 00:05:27 -You can also save new bookmark and change your preferences here. - -52 -00:05:28 --> 00:05:33 -These changes will be automatically updated in the Sync manager. - -53 -00:05:34 --> 00:05:41 -Finally, let's learn how to Sync an original computer with the updated data in the Sync manager. - -54 -00:05:42 --> 00:05:45 -Now from the Menu bar, click Tools. - -55 -00:05:46 --> 00:05:50 -Notice that the Sync options now displays as Sync Now. - -56 -00:05:51 --> 00:05:54 -You can click on it to 'Sync' your data with the 'Sync manager'. - -57 -00:05:55 --> 00:06:01 -You may also want to delete your Firefox Sync account or clear your Sync data. - -58 -00:06:02 --> 00:06:05 -How do you do this? This is simple too. - -59 -00:06:06 --> 00:06:20 -Open a new browser. In the Address bar, type: https://account.services.mozilla.com. Press Enter. - -60 -00:06:21 --> 00:06:27 -In the Username, enter: "ST.USERFF@gmail.com". - -61 -00:06:28 --> 00:06:32 -Now enter the password. Click Login. - -62 -00:06:33 --> 00:06:35 -The Firefox Sync webpage opens. - -63 -00:06:36 --> 00:06:39 -You can now modify the Firefox settings and data. - -64 -00:06:40 --> 00:06:42 -Let's logout of this page now. - -65 -00:06:43 --> 00:06:48 -Now, let's learn about plug-ins. What is a Plug-in? - -66 -00:06:49 --> 00:06:56 -A plug-in is a software program that adds a specific functionality to the Firefox browser. - -67 -00:06:57 --> 00:06:59 -However, plug-ins are different from extensions. - -68 -00:07:00 --> 00:07:03 -plug-ins are programs, created by other companies. - -69 -00:07:04 --> 00:07:09 -Plug-ins integrate third party programs into the Firefox browser. - -70 -00:07:10 --> 00:07:20 -Plug-ins let you play videos, view multi-media content, perform virus scans and 'power animation in firefox'. - -71 -00:07:21 --> 00:07:27 -For e.g: Flash is a plug-in you installed to view videos in the Firefox browser. - -72 -00:07:28 --> 00:07:32 -Let's view the plug-ins that are installed in Firefox. - -73 -00:07:33 --> 00:07:37 -From Menu bar, select Tools and addons - -74 -00:07:38 --> 00:07:44 -The addon manager tab opens. From the left panel, click plug-ins. - -75 -00:07:45 --> 00:07:49 -The right panel now displays the plug-ins that are installed on your computer. - -76 -00:07:50 --> 00:07:52 -And how do you install plug-ins? - -77 -00:07:53 --> 00:08:00 -Each plug-in has to be downloaded from the relevant website and then installed on your computer. - -78 -00:08:01 --> 00:08:04 -The installation procedure may be different for each plug-in. - -79 -00:08:05 --> 00:08:15 -To learn more about plug-ins available for mozilla firefox and instructions on how to install them, please visit the mozilla website. - -80 -00:08:16 --> 00:08:18 -Let's close this browser. - -81 -00:08:19 --> 00:08:23 -To disable the plug-ins, simply click the Disable button. - -82 -00:08:24 --> 00:08:26 -This brings us to the end of this tutorial. - -83 -00:08:27 --> 00:08:35 -In this tutorial, we learnt about: -

Quick Find Link -Firefox Sync and Plug-ins. -

- -84 -00:08:36 --> 00:08:37 -Here is an assignment for you- - -85 -00:08:38 --> 00:08:42 -Download and install 3 plug-ins for Firefox. - -86 -00:08:43 --> 00:08:49 -Create a 'Firefox Sync account'. Access your Firefox browser from another computer. - -87 -00:08:50 --> 00:08:55 -Watch the video available at the following link. It summarizes the Spoken Tutorial project. - -88 -00:08:56 --> 00:09:00 -If you do not have good bandwidth, you can download and watch it. - -89 -00:09:01 --> 00:09:05 -The Spoken Tutorial project team : * conduct workshops using spoken tutorials. - -90 -00:09:06 --> 00:09:09 -Gives certificates for those who pass an online test. - -91 -00:09:10 --> 00:09:15 -For more details, please write to: contact at spoken hyphen tutorial dot org. - -92 -00:09:16 --> 00:09:20 -Spoken Tutorial Project is a part of the Talk to a Teacher project. - -93 -00:09:21 --> 00:09:27 -It is supported by the National Mission on Education through ICT, MHRD, Government of India. - -94 -00:09:28 --> 00:09:30 -More information on this mission is available at: - -95 -00:09:31 --> 00:09:35 -spoken hyphen tutorial dot org slash NMEICT hyphen Intro. - -96 -00:09:36 --> 00:09:41 -This tutorial has been contributed by DesiCrew Solutions Pvt. Ltd. -

Thanks for joining. -

- diff --git a/media/videos/4/71/Introduction-English.srt b/media/videos/4/71/Introduction-English.srt deleted file mode 100644 index ad3525a..0000000 --- a/media/videos/4/71/Introduction-English.srt +++ /dev/null @@ -1,266 +0,0 @@ -Narration - -1 -00:00:00 --> 00:00:04 -Welcome to the Spoken tutorial on Introduction to Mozilla Firefox. - -2 -00:00:05 --> 00:00:09 -In this tutorial, we will cover the following topics: - -3 -00:00:10 --> 00:00:11 -What is Mozilla Firefox? - -4 -00:00:12 --> 00:00:13 -Why Firefox? - -5 -00:00:14 --> 00:00:20 -Versions, System Requirements, Download and Install Firefox, Visit a website. - -6 -00:00:21 --> 00:00:26 -"Mozilla Firefox" or simply "Firefox" is a free, open source web browser. - -7 -00:00:27 --> 00:00:32 -It is the default web browser for Ubuntu Linux, serving as a window to the Internet. - -8 -00:00:33 --> 00:00:38 -It allows you to view the Internet web-pages and navigate through the web pages. - -9 -00:00:39 --> 00:00:46 -It also searches for web pages using search engines such as Google, Yahoo Search or Bing. - -10 -00:00:47 --> 00:00:53 -Firefox has been developed by volunteer programmers at the Mozilla Foundation, a non-profit organization. - -11 -00:00:54 --> 00:00:58 -Visit 'mozilla.org' for detailed information on Mozilla. - -12 -00:00:59 --> 00:01:04 -Firefox works on Windows, Mac OSX and Linux Operating Systems. - -13 -00:01:05 --> 00:01:11 -Some examples of other popular web browsers for Ubuntu are 'Konqueror', 'Google Chrome' and 'Opera'. - -14 -00:01:12 --> 00:01:19 -In this tutorial, we will use Firefox version 7.0 for Ubuntu 10.04. - -15 -00:01:20 --> 00:01:26 -Firefox makes browsing better by bringing together speed, privacy and latest technologies. - -16 -00:01:27 --> 00:01:38 -It has a variety of features such as tabbed windows, built-in spell checking, pop-up blocker, integrated web search, Phishing protection. - -17 -00:01:39 --> 00:01:44 -Firefox provides faster web browsing with rapid rendering of graphics, improved page loading. - -18 -00:01:45 --> 00:01:55 -It also offers a variety of security and privacy options against fraudulent websites, spyware and viruses, trojans or other malware. - -19 -00:01:56 --> 00:02:05 -And it offers customization by way of add-ons and thousands of easy-to-install themes created by users. - -20 -00:02:06 --> 00:02:15 -Here are the System Requirements to run Firefox on Linux OS such as -Fedora, Ubuntu, Red Hat, Debian and SUSE. - -21 -00:02:16 --> 00:02:23 -You will need the following libraries or packages to run Firefox on Ubuntu 10.04. - -22 -00:02:24 --> 00:02:28 -GTK+ 2.10 or higher - -23 -00:02:29 --> 00:02:31 -GLib 2.12 or higher - -24 -00:02:32 --> 00:02:36 -libstdc++ 4.3 or higher - -25 -00:02:37 --> 00:02:39 -Pango 1.14 or higher - -26 -00:02:40 --> 00:02:43 -X.Org 1.7 or higher. - -27 -00:02:44 --> 00:02:54 -And the recommended hardware are Pentium 4 or above with 512MB of RAM and 200MB of hard drive space. - -28 -00:02:55 --> 00:03:01 -For complete information on System requirements, visit the Firefox website shown on the screen. - -29 -00:03:02 --> 00:03:10 -Let us now download and install Mozilla Firefox by visiting the official website at 'mozilla.com' as shown on the screen. - -30 -00:03:11 --> 00:03:14 -Here, we can always find the latest version of Firefox. - -31 -00:03:15 --> 00:03:22 -Or we can click on the all Systems and Languages link, below the green area, for more options. - -32 -00:03:23 --> 00:03:27 -Notice that Mozilla offers Firefox in over 70 languages. - -33 -00:03:28 --> 00:03:32 -Here, we can download various localized versions such as Hindi or Bengali. - -34 -00:03:33 --> 00:03:41 -We can also choose the operating system: Windows, Mac or Linux by clicking on the various icons. - -35 -00:03:42 --> 00:03:50 -In Ubuntu Linux, first select the location to save the file. By default, the Downloads directory in your 'Home page' folder is selected. - -36 -00:03:51 --> 00:03:57 -Now you can select the Save File option and click on the OK button, appearing in the pop-up window. - -37 -00:03:58 --> 00:04:05 -This will save Firefox archive to the Downloads directory, under the Home directory. - -38 -00:04:06 --> 00:04:16 -Open a 'Terminal' Window and go to your Downloads directory by typing the following command: cd ~/Downloads. - -39 -00:04:17 --> 00:04:18 -Now, press the Enter key. - -40 -00:04:19 --> 00:04:34 -Extract the contents of the downloaded file by typing the following command: tar xjf firefox-7.0.1.tar.bz2 - -41 -00:04:35 --> 00:04:37 -Now press the Enter key. - -42 -00:04:38 --> 00:04:43 -This will start extracting the files required to run Firefox 7.0. - -43 -00:04:44 --> 00:04:51 -In the Terminal Window, go to the Firefox directory by typing the following command: cd firefox - -44 -00:04:52 --> 00:04:53 -Now press the Enter key. - -45 -00:04:54 --> 00:04:57 -This will take you to the Firefox directory. - -46 -00:04:58 --> 00:05:05 -To launch the Firefox browser, type the following command: ./firefox and press the Enter key. - -47 -00:05:06 --> 00:05:14 -Alternately, you can launch Firefox by using the following command when your current directory is not the home directory. - -48 -00:05:15 --> 00:05:20 -~/Downloads/firefox/firefox - -49 -00:05:21 --> 00:05:24 -We will see how to set up the default homepage later. - -50 -00:05:25 --> 00:05:32 -For now, as an example, let us go to 'Rediff.com' website that has the latest news and information. - -51 -00:05:33 --> 00:05:39 -In the Address bar, below the menu bar, type: www.rediff.com. - -52 -00:05:40 --> 00:05:46 -The content on the home page of 'Rediff.com' website is displayed. - -53 -00:05:47 --> 00:05:52 -Now, from this page, we can navigate to the various links to view contents in those pages. - -54 -00:05:53 --> 00:05:57 -Let us click on the first link below the Headlines tab. - -55 -00:05:58 --> 00:06:04 -This is how we can visit websites using Firefox and then navigate to various pages from there. - -56 -00:06:05 --> 00:06:11 -In future tutorials, we will learn more about the Firefox interface and various other features. - -57 -00:06:12 --> 00:06:15 -Watch the video available at the following link. - -58 -00:06:16 --> 00:06:18 -It summarizes the Spoken Tutorial project. - -59 -00:06:19 --> 00:06:23 -If you do not have good bandwidth, you can download and watch it. - -60 -00:06:24 --> 00:06:28 -The Spoken Tutorial Project team: * Conducts workshops using spoken tutorials. - -61 -00:06:29 --> 00:06:32 -Gives certificates for those who pass an online test. - -62 -00:06:33 --> 00:06:38 -For more details, please write to: contact at spoken hypen tutorial dot org. - -63 -00:06:39 --> 00:06:43 -Spoken Tutorial project is a part of the Talk to a Teacher project. - -64 -00:06:44 --> 00:06:50 -It is supported by the National Mission on Education through ICT, MHRD, Government of India. - -65 -00:06:51 --> 00:07:01 -More information on this mission is available at: spoken hyphen tutorial dot org slash NMEICT hyphen Intro. - -66 -00:07:02 --> 00:07:07 -This tutorial has been contributed by DesiCrew Solutions Pvt.Ltd. Thanks for joining. - diff --git a/media/videos/4/73/Firefox-interface-and-toolbars-English.srt b/media/videos/4/73/Firefox-interface-and-toolbars-English.srt deleted file mode 100644 index ae0f5c9..0000000 --- a/media/videos/4/73/Firefox-interface-and-toolbars-English.srt +++ /dev/null @@ -1,358 +0,0 @@ -Narration - -1 -00:00:00 --> 00:00:04 -Welcome to the Spoken Tutorial on the Mozilla Firefox Interface and Toolbars. - -2 -00:00:05 --> 00:00:10 -In this tutorial, we will learn about the Firefox interface and the toolbars. - -3 -00:00:11 --> 00:00:18 -In this tutorial, we will use Firefox version 7.0 for Ubuntu 10.04. - -4 -00:00:19 --> 00:00:22 -Let’s now take a look at the Firefox interface. - -5 -00:00:23 --> 00:00:27 -Firefox has all the features that a modern browser needs to have. - -6 -00:00:28 --> 00:00:33 -To learn how to use Mozilla Firefox effectively, one should be familiar with each of its features. - -7 -00:00:34 --> 00:00:40 -The Mozilla Firefox interface can be split up into 6 distinct areas, namely- - -8 -00:00:41 --> 00:00:52 -The Menu bar, the Navigation toolbar, the Bookmarks bar, the Side bar, the Status bar, and the Content area. - -9 -00:00:53 --> 00:00:56 -Let’s look at each of these and learn what it does. - -10 -00:00:57 --> 00:01:00 -Let's click on the File menu and click on New Window. - -11 -00:01:01 --> 00:01:04 -A new window pops up. - -12 -00:01:05 --> 00:01:07 -Some people have trouble looking at small script in their browser. - -13 -00:01:08 --> 00:01:13 -So, let's zoom into the page by clicking on View > Zoom and Zoom In. - -14 -00:01:14 --> 00:01:17 -Alternately, you can press Ctrl + +. - -15 -00:01:18 --> 00:01:20 -This will make the text bigger. - -16 -00:01:21 --> 00:01:26 -To know which version of Mozilla Firefox you are using, click on Help and About Firefox. - -17 -00:01:27 --> 00:01:31 -By default, Firefox displays a Homepage. - -18 -00:01:32 --> 00:01:38 -But, to set your own preferred webpage as Homepage, click on Edit and Preferences. - -19 -00:01:39 --> 00:01:41 -Windows users please click on Tools and Options. - -20 -00:01:42 --> 00:01:51 -In the General tab, click on Home Page field and type: ‘www.yahoo.com’ or any of your preferred webpage. - -21 -00:01:52 --> 00:01:59 -Now you can close Firefox Preferences window by clicking the Close button on the bottom right hand corner. - -22 -00:02:00 --> 00:02:04 -You can use the Edit menu to search for particular words within the webpage. - -23 -00:02:05 --> 00:02:11 -In the address bar, type: ‘www.google.com’ - -24 -00:02:12 --> 00:02:13 -Click on Edit and Find. - -25 -00:02:14 --> 00:02:18 -A small toolbar appears at the bottom of the browser window. - -26 -00:02:19 --> 00:02:22 -In the textbox, type the word ‘Gujarati’. - -27 -00:02:23 --> 00:02:27 -You will observe that the word ‘Gujarati’ on the page gets highlighted. - -28 -00:02:28 --> 00:02:32 -This function is very useful when searching through large text on a webpage. - -29 -00:02:33 --> 00:02:34 -Let's close this. - -30 -00:02:35 --> 00:02:40 -As the name suggests, the Navigation toolbar helps you navigate through the internet. - -31 -00:02:41 --> 00:02:47 -The Navigation bar is the large text box where you type the address of the webpage that you want to visit. - -32 -00:02:48 --> 00:02:51 -It is called the URL bar or Address bar. - -33 -00:02:52 --> 00:02:56 -Click on the URL and delete the address that is already there. - -34 -00:02:57 --> 00:03:01 -Now, type: ‘www.google.com’. - -35 -00:03:02 --> 00:03:05 -Press the Enter key.You will now be in the Google Homepage. - -36 -00:03:06 --> 00:03:11 -Clicking on the 'back-arrow' icon will take you back to the page where you were before. - -37 -00:03:12 --> 00:03:16 -Click on the forward arrow to go back to the Google homepage. - -38 -00:03:17 --> 00:03:21 -To the right of the URL bar, is an icon shaped like a house. - -39 -00:03:22 --> 00:03:27 -This button takes you back to the default home page from whichever webpage you are on. - -40 -00:03:28 --> 00:03:33 -This function is useful when you are browsing from a particular site or a search engine. - -41 -00:03:34 --> 00:03:35 -Let's click on the homepage button. - -42 -00:03:36 --> 00:03:41 -Remember, we changed the 'home page' to ‘www.yahoo.com’ earlier on. - -43 -00:03:42 --> 00:03:48 -As a result, clicking on the homepage button brings us to the "yahoo" homepage. - -44 -00:03:49 --> 00:03:50 -Now let's look at the Bookmarks bar. - -45 -00:03:51 --> 00:03:56 -'Bookmarks' help you navigate to pages that you visit or refer to often. - -46 -00:03:57 --> 00:04:02 -In the URL bar, type: ‘www.gmail.com’. - -47 -00:04:03 --> 00:04:09 -Once the page loads, click on the star symbol to the right of the URL bar. - -48 -00:04:10 --> 00:04:12 -You see that the star turns yellow. - -49 -00:04:13 --> 00:04:16 -Click on the star again.A dialog box pops up. - -50 -00:04:17 --> 00:04:22 -From the ‘Folder’ drop down menu, choose 'Bookmarks toolbar'. - -51 -00:04:23 --> 00:04:27 -Observe that the 'Gmail' bookmark is now added to the Bookmarks toolbar. - -52 -00:04:28 --> 00:04:32 -Click on the Homepage icon to go to the "yahoo" homepage. - -53 -00:04:33 --> 00:04:38 -Click on the 'Gmail' bookmark. This will direct you to the Gmail login page. - -54 -00:04:39 --> 00:04:45 -You can use the bookmarks bar for sites which you visit often but don’t want to have as your homepage. - -55 -00:04:46 --> 00:04:48 -Next we will look at the Sidebar. - -56 -00:04:49 --> 00:04:53 -Click on View and Sidebar and then click on History. - -57 -00:04:54 --> 00:05:01 -You see that the bar on the left side now has 3 options - Today, Yesterday and Older than 6 months. - -58 -00:05:02 --> 00:05:08 -The displayed option is subject to the intervals between the usage of Firefox on that computer. - -59 -00:05:09 --> 00:05:14 -Click on the plus sign, next to the Today icon, to expand the menu. - -60 -00:05:15 --> 00:05:18 -Choose the "google" link to be directed back to the google homepage. - -61 -00:05:19 --> 00:05:24 -See how easy it is to go back to the site that you visited before! - -62 -00:05:25 --> 00:05:28 -The Sidebar even has a Search function of its own. - -63 -00:05:29 --> 00:05:33 -You can type in the name of the site that you want to search for, in the search box. - -64 -00:05:34 --> 00:05:36 -This will then search through your history to find it. - -65 -00:05:37 --> 00:05:38 -In the search box, type: "google". - -66 -00:05:39 --> 00:05:42 -The "google" homepage comes up as the first result. - -67 -00:05:43 --> 00:05:50 -You can make the Sidebar disappear by clicking the small ‘x’ on the top right hand corner of the side bar. - -68 -00:05:51 --> 00:05:54 -Next, let's see what the Status bar does. - -69 -00:05:55 --> 00:06:01 -The Status bar is the area at the bottom of your browser window that shows you the status of the site you are loading. - -70 -00:06:02 --> 00:06:09 -Go to the URL bar and type: ‘www.wired.com’ and press Enter key. - -71 -00:06:10 --> 00:06:15 -Look at the Status bar quickly. It shows you the status of the loading of that webpage. - -72 -00:06:16 --> 00:06:24 -The Status bar can help you to understand why a particular site is not loading, the time it may take to load etc. - -73 -00:06:25 --> 00:06:27 -Finally, let's look at the Content area. - -74 -00:06:28 --> 00:06:32 -This is where you see the contents of the webpage you are viewing. - -75 -00:06:33 --> 00:06:34 -This brings us to the end of this tutorial. - -76 -00:06:35 --> 00:06:42 -In this tutorial, we learnt about: the Firefox interface, the toolbars. - -77 -00:06:43 --> 00:06:45 -Try this comprehension assignment.. - -78 -00:06:46 --> 00:06:53 -Change your home page to ‘www.spoken-tutorial.org’ and navigate to it. - -79 -00:06:54 --> 00:06:59 -Then go to the ‘yahoo’ website by using the browser’s History function. - -80 -00:07:00 --> 00:07:04 -Watch the video available at the following link. - -81 -00:07:05 --> 00:07:06 -It summarizes the Spoken Tutorial project. - -82 -00:07:07 --> 00:07:11 -If you do not have good bandwidth, you can download and watch it. - -83 -00:07:12 --> 00:07:16 -The Spoken Tutorial Project team: * Conducts workshops using spoken tutorials. - -84 -00:07:17 --> 00:07:20 -Gives certificates for those who pass an online test. - -85 -00:07:21 --> 00:07:26 -For more details, please write to: contact at spoken hypen tutorial dot org. - -86 -00:07:27 --> 00:07:30 -Spoken Tutorial project is a part of the Talk to a Teacher project. - -87 -00:07:31 --> 00:07:38 -It is supported by the National Mission on Education through ICT, MHRD, Government of India. - -88 -00:07:39 --> 00:07:49 -More information on this mission is available at: spoken hyphen tutorial dot org slash NMEICT hyphen Intro. - -89 -00:07:50 --> 00:07:55 -This tutorial has been contributed by DesiCrew Solutiona Pvt.Ltd.Thanks for joining. - diff --git a/media/videos/4/76/Searching-and-Auto-complete-English.srt b/media/videos/4/76/Searching-and-Auto-complete-English.srt deleted file mode 100644 index edd4876..0000000 --- a/media/videos/4/76/Searching-and-Auto-complete-English.srt +++ /dev/null @@ -1,370 +0,0 @@ -Narration - -1 -00:00:00 --> 00:00:05 -Welcome to the Spoken tutorial on the Mozilla Firefox - Search and Auto-complete features. - -2 -00:00:06 --> 00:00:14 -In this tutorial, we will learn how to use Search, manage Search Engines, use the Find bar, - -3 -00:00:15 --> 00:00:17 -use Auto-complete in the Address bar. - -4 -00:00:18 --> 00:00:25 -In this tutorial, we will use Firefox version 7.0 on Ubuntu 10.04. - -5 -00:00:26 --> 00:00:30 -One of the most common things people do on the internet is to search for information. - -6 -00:00:31 --> 00:00:36 -One can search for a specific website or for some other information. - -7 -00:00:37 --> 00:00:43 -Mozilla Firefox has a number of functionalities that make it easy to search for information on the Internet. - -8 -00:00:44 --> 00:00:46 -Let’s look at some of the ways. - -9 -00:00:47 --> 00:00:49 -One way is to search by visiting other websites. - -10 -00:00:50 --> 00:00:53 -After all, search engines are websites too! - -11 -00:00:54 --> 00:00:58 -In the URL bar, type: ‘www.google.com’. - -12 -00:00:59 --> 00:01:00 -The google home page comes up. - -13 -00:01:01 --> 00:01:06 -In the search box of the google home page, type: ‘email’ and click Search. - -14 -00:01:07 --> 00:01:09 -The search engine brings up all the results. - -15 -00:01:10 --> 00:01:15 -We see that the top result is for g mail, the email from 'google'. - -16 -00:01:16 --> 00:01:19 -But, there is an easier way to do the same thing with Mozilla Firefox. - -17 -00:01:20 --> 00:01:25 -Next to the 'URL bar' on the navigation toolbar, there is a Search bar field. - -18 -00:01:26 --> 00:01:32 -Alternately, you can press Ctrl+K to directly go to the Search bar field. - -19 -00:01:33 --> 00:01:35 -Click on the search bar and type ‘email’. - -20 -00:01:36 --> 00:01:39 -Click the magnifying glass icon that is next to it. - -21 -00:01:40 --> 00:01:43 -We will see the results of the search in the contents area. - -22 -00:01:44 --> 00:01:49 -We see that the top result is for 'gmail', the email from 'google'. - -23 -00:01:50 --> 00:01:57 -On the left side of the 'Search bar', the logo of the search engine which has been used to bring up the results is seen. - -24 -00:01:58 --> 00:02:01 -The default search engine used in Mozilla Firefox is ‘google’. - -25 -00:02:02 --> 00:02:07 -But, we need not be constrained by this. We can choose the search engine of our choice. - -26 -00:02:08 --> 00:02:11 -Click on the google’s search engine logo within the Search bar. - -27 -00:02:12 --> 00:02:20 -We notice that a drop-down box appears with the logos of most popular search engines including “Yahoo” and “Bing”. - -28 -00:02:21 --> 00:02:23 -Select “Yahoo” from the drop-down box. - -29 -00:02:24 --> 00:02:29 -We observe that the logo on the left of the search bar has now changed to the “Yahoo” logo. - -30 -00:02:30 --> 00:02:35 -Now, let's type ‘email’ again in the 'Search bar' and click the magnifying glass. - -31 -00:02:36 --> 00:02:41 -This time we see that the results in the Contents area are from the “Yahoo” search engine. - -32 -00:02:42 --> 00:02:45 -Observe that the results are slightly different from last time. - -33 -00:02:46 --> 00:02:52 -The top result is no longer 'gmail'. Instead, the top result is “Yahoo” mail. - -34 -00:02:53 --> 00:02:56 -Click on the search engine logo within the 'Search bar' again. - -35 -00:02:57 --> 00:03:00 -In the drop-down box, select Manage Search Engines. - -36 -00:03:01 --> 00:03:06 -This opens a dialog box entitled ‘Manage Search Engine List'. - -37 -00:03:07 --> 00:03:09 -Click on the last item in the list. - -38 -00:03:10 --> 00:03:15 -The buttons on the right side are now enabled. Click on the Remove button. - -39 -00:03:16 --> 00:03:20 -We see that the item we chose is no longer on the list. - -40 -00:03:21 --> 00:03:23 -Click on OK to close the dialog box. - -41 -00:03:24 --> 00:03:28 -Click on the search engine logo within the 'Search bar' again. - -42 -00:03:29 --> 00:03:31 -Click on “Manage Search Engines”. - -43 -00:03:32 --> 00:03:36 -The “Manage Search Engines List" dialog box pops up. - -44 -00:03:37 --> 00:03:41 -At the bottom of the dialog is a link that says ‘Get more search engines…’. - -45 -00:03:42 --> 00:03:45 -Click on it.A new browser tab opens. - -46 -00:03:46 --> 00:03:50 -It displays a number of search engines that we can add to the search bar. - -47 -00:03:51 --> 00:03:54 -You can add any of the 'search engines' according to your requirement. - -48 -00:03:55 --> 00:03:59 -Let's close this tab by clicking on the 'x' at the corner of the tab. - -49 -00:04:00 --> 00:04:06 -We can find specific text which is within the Contents area with the help of the Find bar. - -50 -00:04:07 --> 00:04:12 -In the URL bar, type: ‘www.gmail.com’ and press Enter. - -51 -00:04:13 --> 00:04:18 -When the 'gmail home page' has loaded, click on Edit and then on Find. - -52 -00:04:19 --> 00:04:21 -A Find bar appears at the bottom of the browser window. - -53 -00:04:22 --> 00:04:27 -In the text box of the “Find bar”, type: ‘gmail’. - -54 -00:04:28 --> 00:04:35 -As we type, we see that the first instance of that text is being highlighted in the Contents area. - -55 -00:04:36 --> 00:04:40 -Clicking on Next will move the focus to the next instance of the word. - -56 -00:04:41 --> 00:04:45 -Clicking on Previous will move the focus to the previous instance of the word. - -57 -00:04:46 --> 00:04:48 -Click on Highlight all option. - -58 -00:04:49 --> 00:04:55 -We see that all instances of the search text are highlighted in the Contents area. - -59 -00:04:56 --> 00:05:03 -Mozilla Firefox makes it easy to type web addresses in the 'URL bar' with its auto-complete function. - -60 -00:05:04 --> 00:05:07 -We don’t have to type the entire web address in the address bar. - -61 -00:05:08 --> 00:05:11 -Try this: In the 'address bar', type: ‘gma’. - -62 -00:05:12 --> 00:05:16 -We see that Mozilla Firefox tries to auto-complete the word we are typing. - -63 -00:05:17 --> 00:05:22 -It brings up a drop-down list with websites that start with ‘gma’. - -64 -00:05:23 --> 00:05:26 -Choose the ‘gmail’ link from the drop-down list. - -65 -00:05:27 --> 00:05:29 -The ‘gmail’ webpage loads in the 'Contents area'. - -66 -00:05:30 --> 00:05:33 -If we do not like this feature, we can turn it off. - -67 -00:05:34 --> 00:05:36 -Click on Edit and then on Preferences. - -68 -00:05:37 --> 00:05:40 -Windows users can click on Tools and then on Options. - -69 -00:05:41 --> 00:05:45 -Choose the Privacy tab from the list of main-menu tabs. - -70 -00:05:46 --> 00:05:52 -At the very bottom of the dialog box, is an option named ‘When using the location bar, suggest’. - -71 -00:05:53 --> 00:05:55 -Click on the arrow of the drop-down list to expand it. - -72 -00:05:56 --> 00:05:58 -Select 'Nothing' from the list. - -73 -00:05:59 --> 00:06:02 -Click on ‘Close’ to close the dialog box. - -74 -00:06:03 --> 00:06:08 -Let's go back to the 'address bar' and type ‘gma’. Notice that no suggestions come up. - -75 -00:06:09 --> 00:06:15 -This concludes this tutorial of Mozilla Firefox - Searching and Auto-complete features. - -76 -00:06:16 --> 00:06:26 -In this tutorial, we learnt how to: use Search, manage Search Engine, use the Find bar, use Auto-compete in Address bar. - -77 -00:06:27 --> 00:06:29 -Try this comprehension test assignment. - -78 -00:06:30 --> 00:06:33 -Change the search engine in the search bar to “Yahoo”. - -79 -00:06:34 --> 00:06:35 -Search for ‘spoken tutorial’. - -80 -00:06:36 --> 00:06:39 -Click on the first result. - -81 -00:06:40 --> 00:06:43 -Find how many times the word “video” appears in the page. - -82 -00:06:44 --> 00:06:50 -Now, click on ‘Highlight all’ to highlight all the instances of the word “video” in the webpage. - -83 -00:06:51 --> 00:06:53 -Watch the video available at the following link: http://spoken-tutorial.org/What_is_ a_Spoken_Tutorial. - -84 -00:06:54 --> 00:06:57 -It summarizes the Spoken Tutorial project. - -85 -00:06:58 --> 00:07:01 -If you do not have good bandwidth, you can download and watch it. - -86 -00:07:02 --> 00:07:07 -The Spoken Tutorial Project team: * Conducts workshops using spoken tutorials. - -87 -00:07:08 --> 00:07:10 -Gives certificates for those who pass an online test. - -88 -00:07:11 --> 00:07:17 -For more details, please write to: contact@spoken-tutorial.org - -89 -00:07:18 --> 00:07:21 -Spoken Tutorial project is a part of the Talk to a Teacher project. - -90 -00:07:22 --> 00:07:29 -It is supported by the National Mission on Education through ICT, MHRD, Government of India. - -91 -00:07:30 --> 00:07:40 -More information on this mission is available at: spoken hyphen tutorial dot org slash NMEICT hyphen Intro. - -92 -00:07:41 --> 00:07:46 -This tutorial has been contributed by DesiCrew Solutions Pvt.Ltd.Thanks for joining. - diff --git a/media/videos/4/77/Tabbed-Browsing-Blocking-Pop-ups-English.srt b/media/videos/4/77/Tabbed-Browsing-Blocking-Pop-ups-English.srt deleted file mode 100644 index a698c28..0000000 --- a/media/videos/4/77/Tabbed-Browsing-Blocking-Pop-ups-English.srt +++ /dev/null @@ -1,282 +0,0 @@ -Narration - -1 -00:00:00 --> 00:00:03 -Welcome to this Spoken tutorial of Mozilla Firefox. - -2 -00:00:04 --> 00:00:12 -In this tutorial, we will learn about: Tabbed Browsing, Storing content offline, Blocking Pop-ups. - -3 -00:00:13 --> 00:00:20 -In this tutorial, we will use Firefox version 7.0 on Ubuntu 10.04. - -4 -00:00:21 --> 00:00:28 -Mozilla Firefox allows you to load multiple web pages into separate tabs within the same browser window. - -5 -00:00:29 --> 00:00:35 -The biggest advantage of tabbed browsing is that it eliminates the need to display multiple browser windows. - -6 -00:00:36 --> 00:00:39 -And hence it helps to keep your desktop clutter-free. - -7 -00:00:40 --> 00:00:44 -Each tab occupies the browser's entire viewing area when displayed. - -8 -00:00:45 --> 00:00:51 -It eliminates the need to frequently resize and reposition the opened browser windows. - -9 -00:00:52 --> 00:00:59 -Tabbed browsing also consumes less memory and operating system resources than tiled-window browsing - -10 -00:01:00 --> 00:01:04 -provided the user does not open too many tabs at once. - -11 -00:01:05 --> 00:01:07 -Let's say, you are on a particular webpage. - -12 -00:01:08 --> 00:01:10 -Here is a link - “Firefox for Desktop”. - -13 -00:01:11 --> 00:01:13 -You can open this link in a new tab. - -14 -00:01:14 --> 00:01:16 -To do so, right-click on the link. - -15 -00:01:17 --> 00:01:20 -In the context menu, click on Open link in new tab. - -16 -00:01:21 --> 00:01:27 -You notice that a new tab opens to the right of the existing tab, in the same browser window. - -17 -00:01:28 --> 00:01:33 -So, without closing or moving out of your window, you can open another webpage in the same window. - -18 -00:01:34 --> 00:01:39 -You can also open a new tab by clicking on File and New Tab. - -19 -00:01:40 --> 00:01:43 -The shortcut keys for this are Ctrl+T. - -20 -00:01:44 --> 00:01:49 -Notice that when you open a new tab, the new tab immediately becomes active. - -21 -00:01:50 --> 00:01:55 -Now go to the URL bar and type: ‘www.google.com’. - -22 -00:01:56 --> 00:02:00 -You will now have 3 tabs, each with a different web page! - -23 -00:02:01 --> 00:02:07 -You can also open a new tab by clicking the ‘+’ button to the right of the rightmost tab. - -24 -00:02:08 --> 00:02:10 -We can also arrange the tabs as per our requirements. - -25 -00:02:11 --> 00:02:16 -Just click on a tab and without releasing the mouse button, move it to the required location. - -26 -00:02:17 --> 00:02:19 -Now release the 'mouse button'. - -27 -00:02:20 --> 00:02:22 -The tab is now in the desired location. - -28 -00:02:23 --> 00:02:28 -Let us look at some basic operations which Mozilla Firefox allows us to perform. - -29 -00:02:29 --> 00:02:31 -Let us change the search engine to “google”. - -30 -00:02:32 --> 00:02:39 -In the Search bar type: ‘email wikipedia’ and click on the magnifying glass to the right of the 'Search bar'. - -31 -00:02:40 --> 00:02:43 -The relevant Wikipedia page is the first search result. - -32 -00:02:44 --> 00:02:47 -Let's open this page by clicking on the link. - -33 -00:02:48 --> 00:02:51 -Now, click on File and then on “Save Page As”. - -34 -00:02:52 --> 00:02:58 -Let's save the file on the Desktop with the name ‘Search.html’. - -35 -00:02:59 --> 00:03:04 -Now, let us open a new tab in the browser window by clicking on File and New Tab. - -36 -00:03:05 --> 00:03:09 -Now, let's open our saved page in this new Tab window. - -37 -00:03:10 --> 00:03:11 -Click on File and Open File . - -38 -00:03:12 --> 00:03:16 -Browse and open the saved file. - -39 -00:03:17 --> 00:03:24 -In the URL bar, you see that the address is not an internet address but a local location on your computer. - -40 -00:03:25 --> 00:03:28 -Now you can read this page, even when you are offline. - -41 -00:03:29 --> 00:03:33 -Pop-ups are windows that appear automatically without your permission. - -42 -00:03:34 --> 00:03:41 -Firefox allows us to control both pop-ups and pop-unders through the Content tab within Preferences window. - -43 -00:03:42 --> 00:03:45 -On 'Windows', this would be within the Options window. - -44 -00:03:46 --> 00:03:49 -Pop-up blocking is turned on, by default. - -45 -00:03:50 --> 00:03:51 -Click on Edit and Preferences. - -46 -00:03:52 --> 00:03:55 -Windows users please click on Tools and Options. - -47 -00:03:56 --> 00:04:01 -In the Content tab, the first option Block pop-up windows is checked, by default. - -48 -00:04:02 --> 00:04:04 -If not, then please check this option. - -49 -00:04:05 --> 00:04:10 -The various options of this dialog box will be discussed in another tutorial. - -50 -00:04:11 --> 00:04:12 -Click on the Close button. - -51 -00:04:13 --> 00:04:15 -This brings us to the end of this tutorial. - -52 -00:04:16 --> 00:04:18 -Here is a quick summary of what we learnt: - -53 -00:04:19 --> 00:04:24 -Tabbed Browsing, Storing content offline, Blocking Pop ups. - -54 -00:04:25 --> 00:04:28 -Try this comprehension test assignment. - -55 -00:04:29 --> 00:04:32 -Open a new tab.Change the search engine to ‘google’. - -56 -00:04:33 --> 00:04:35 -Search for 'The history of email'. - -57 -00:04:36 --> 00:04:42 -Save the first result and open it in a new tab to view as an offline document. - -58 -00:04:43 --> 00:04:45 -Change the search engine to ‘bing’. - -59 -00:04:46 --> 00:04:48 -Again, search for 'The history of email'. - -60 -00:04:49 --> 00:04:57 -Save the link ‘History of Email & Ray Tomlinson’ and open it in a new tab to view as an offline document. - -61 -00:04:58 --> 00:05:01 -Watch the video available at the following link: http://spoken-tutorial.org/What_is_a_Spoken_Tutorial - -62 -00:05:02 --> 00:05:03 -It summarizes the Spoken Tutorial project. - -63 -00:05:04 --> 00:05:08 -If you do not have good bandwidth, you can download and watch it. - -64 -00:05:09 --> 00:05:13 -The Spoken Tutorial Project team: * conducts workshops using spoken tutorials. - -65 -00:05:14 --> 00:05:17 -Gives certificates for those who pass an online test. - -66 -00:05:18 --> 00:05:24 -For more details, please write to: contact@spoken-tutorial.org - -67 -00:05:25 --> 00:05:28 -Spoken Tutorial project is a part of the Talk to a Teacher project. - -68 -00:05:29 --> 00:05:36 -It is supported by the National Mission on Education through ICT, MHRD, Government of India. - -69 -00:05:37 --> 00:05:47 -More information on this mission is available at: spoken hyphen tutorial dot org slash NMEICT hyphen Intro. - -70 -00:05:48 --> 00:05:53 -This tutorial has been contributed by DesiCrew Solutions Pvt.Ltd. Thanks for joining. - diff --git a/media/videos/43/430/Tokens-English.srt b/media/videos/43/430/Tokens-English.srt deleted file mode 100644 index d0d624c..0000000 --- a/media/videos/43/430/Tokens-English.srt +++ /dev/null @@ -1,682 +0,0 @@ -Narration - -1 -00:00:01 --> 00:00:05 -Welcome to the spoken tutorial on Tokens in C and C Plus Plus. - -2 -00:00:06 --> 00:00:08 -In this tutorial we will learn , - -3 -00:00:09 --> 00:00:11 -How to define and use tokens. - -4 -00:00:12 --> 00:00:14 -We will do this with the help of an example. - -5 -00:00:15 --> 00:00:19 -We will also see some common errors and their solutions. - -6 -00:00:20 --> 00:00:25 -To record this tutorial, I am using Ubuntu Operating system version 11.10, - -7 -00:00:26 --> 00:00:32 -gcc and g++ Compiler version 4.6.1. - -8 -00:00:33 --> 00:00:35 -Let us start with an introduction. - -9 -00:00:36 --> 00:00:45 -Token is a generic word for data types, variables, constants and identifiers. - -10 -00:00:46 --> 00:00:48 -Let us start with our program. - -11 -00:00:49 --> 00:00:52 -I have already typed the code on the editor. - -12 -00:00:53 --> 00:00:55 -Let me open it. - -13 -00:00:56 --> 00:01:03 -Note that our file name is 'tokens.c'. - -14 -00:01:04 --> 00:01:08 -In this program we will initialize the variables and print their values. - -15 -00:01:09 --> 00:01:11 -Let me explain the code now. - -16 -00:01:12 --> 00:01:15 -This is our header file. - -17 -00:01:16 --> 00:01:19 -This is our main function. - -18 -00:01:20 --> 00:01:21 -Here, int is a keyword. - -19 -00:01:22 --> 00:01:25 -The compiler knows the meaning of keyword. - -20 -00:01:26 --> 00:01:27 -a is an integer variable. - -21 -00:01:28 --> 00:01:31 -We have assigned a value of 2 to it. - -22 -00:01:32 --> 00:01:34 -This is called as initialization. - -23 -00:01:35 --> 00:01:42 -If a value is not assigned to a variable then it is called as declaration of the variable. - -24 -00:01:43 --> 00:01:45 -Here, b is a constant. - -25 -00:01:46 --> 00:01:52 -We have initialized 'b' by assigning a value of 4 to it. - -26 -00:01:53 --> 00:01:57 -const keyword is used to create 'read only' variable. - -27 -00:01:58 --> 00:02:05 -Let us switch back to our slides to know more about keywords and constant. - -28 -00:02:06 --> 00:02:10 -Keywords have fixed meanings that cannot be changed. - -29 -00:02:11 --> 00:02:14 -Keywords cannot be used as variable names. - -30 -00:02:15 --> 00:02:17 -There are 32 keywords in C. - -31 -00:02:18 --> 00:02:27 -To name some, auto, break, case, char, enum, extern, etc. - -32 -00:02:28 --> 00:02:32 -Constants: constants are fixed values. - -33 -00:02:33 --> 00:02:37 -They do not change during the execution of a program. - -34 -00:02:38 --> 00:02:44 -There are two types of constants, Numeric constants and Character constants. - -35 -00:02:45 --> 00:02:46 -Now come back to our program. - -36 -00:02:47 --> 00:02:51 -Here, float is a data type of variable c. - -37 -00:02:52 --> 00:02:55 -We have assigned it a value of 1.5. - -38 -00:02:56 --> 00:03:03 -Data type is a finite set of values along with a set of rules. - -39 -00:03:04 --> 00:03:06 -Here, d is a variable. - -40 -00:03:07 --> 00:03:11 -char and single quotes suggest that we are dealing with a character. - -41 -00:03:12 --> 00:03:19 -As a result, d is a character variable storing the value A. - -42 -00:03:20 --> 00:03:29 -It is easy to see that int, double, float and char are data types. - -43 -00:03:30 --> 00:03:34 -a, c and d are variables. - -44 -00:03:35 --> 00:03:36 -Now come back to our slides. - -45 -00:03:37 --> 00:03:47 -We will know more about data types and variables. - -46 -00:03:48 --> 00:03:49 -Data types: Let us begin with integer data type. - -47 -00:03:50 --> 00:03:52 -It is declared as int. - -48 -00:03:53 --> 00:04:00 -If we want to print an integer data type , we will use %d as the format specifier. - -49 -00:04:01 --> 00:04:08 -Similarly, we will use float and %f for floating point numbers. - -50 -00:04:09 --> 00:04:14 -For character data type, we will use char and %c. - -51 -00:04:15 --> 00:04:23 -And For double data type, we will use double and %lf as the format specifier. - -52 -00:04:24 --> 00:04:28 -Now we will see the range of data types. - -53 -00:04:29 --> 00:04:33 -Integer data type has a range of this - -54 -00:04:34 --> 00:04:38 -Floating point has a range of this - -55 -00:04:39 --> 00:04:41 -Character has a range of this - -56 -00:04:42 --> 00:04:46 -And Double has a range of this - -57 -00:04:47 --> 00:04:55 -The values stored in the variable must not be greater or less than this range. - -58 -00:04:56 --> 00:04:59 -Now we will move on to variables. - -59 -00:05:00 --> 00:05:01 -Variable is a data name. - -60 -00:05:02 --> 00:05:05 -It may be used to store a data value . - -61 -00:05:06 --> 00:05:09 -The values can change when a program runs. - -62 -00:05:10 --> 00:05:13 -Before using a variable it must be declared. - -63 -00:05:14 --> 00:05:17 -We should try to give meaningful names to variables. - -64 -00:05:18 --> 00:05:23 -example john, marks, sum etc. - -65 -00:05:24 --> 00:05:26 -Now we will move back to our program. - -66 -00:05:27 --> 00:05:31 -Here, printf is the identifier name for this function. - -67 -00:05:32 --> 00:05:34 -Come back to our slides. - -68 -00:05:35 --> 00:05:37 -Let us know about identifiers. - -69 -00:05:38 --> 00:05:40 -Identifiers are user defined names. - -70 -00:05:41 --> 00:05:45 -An identifier consists of letters and digits. - -71 -00:05:46 --> 00:05:50 -Both uppercase and lowercase letters are permitted. - -72 -00:05:51 --> 00:05:54 -First character must be an alphabet or underscore. - -73 -00:05:55 --> 00:05:57 -Now Come back to our program. - -74 -00:05:58 --> 00:06:01 -Here we have initialized the variables and constants. - -75 -00:06:02 --> 00:06:04 -Here we print them. - -76 -00:06:05 --> 00:06:07 -And this is our return statement. - -77 -00:06:08 --> 00:06:09 -Now click on Save. - -78 -00:06:10 --> 00:06:11 -Let us execute the program. - -79 -00:06:12 --> 00:06:20 -Please open the terminal window by pressing Ctrl, Alt and T keys simultaneously on your keyboard. - -80 -00:06:21 --> 00:06:29 -To compile, type gcc space tokens dot c space hyphen o tok. Press Enter. - -81 -00:06:30 --> 00:06:34 -To execute, type ./tok (dot slash tok). - -82 -00:06:35 --> 00:06:38 -The output is displayed. - -83 -00:06:39 --> 00:06:43 -We can see that here we have six values after the decimal point. - -84 -00:06:44 --> 00:06:47 -And here we have two values. - -85 -00:06:48 --> 00:06:53 -Now let us find out how this happened. Come back to our program. - -86 -00:06:54 --> 00:06:58 -This is because we have % point 2f here. - -87 -00:06:59 --> 00:07:03 -It denotes that we can print only two values after the decimal point. - -88 -00:07:04 --> 00:07:08 -Suppose here I want an output with three decimal places. - -89 -00:07:09 --> 00:07:15 -Let us replace % point 2f with % point 3f. - -90 -00:07:16 --> 00:07:18 -Now click on Save. - -91 -00:07:19 --> 00:07:21 -Come back to our terminal. - -92 -00:07:22 --> 00:07:27 -Compile as before, execute as before. - -93 -00:07:28 --> 00:07:32 -We see here three values after the decimal point. - -94 -00:07:33 --> 00:07:35 -Now we will execute the same program in c++. - -95 -00:07:36 --> 00:07:39 -Come back to our program. - -96 -00:07:40 --> 00:07:41 -I will change a few things here. - -97 -00:07:42 --> 00:07:49 -First press Shift+Ctrl+s keys simultaneously on your keyboard. - -98 -00:07:50 --> 00:07:57 -Now save the file with an extension .cpp and click on Save. - -99 -00:07:58 --> 00:08:02 -Let us change the header file as iostream - -100 -00:08:03 --> 00:08:07 -Now include the using statement. - -101 -00:08:08 --> 00:08:10 -And click on Save. - -102 -00:08:11 --> 00:08:14 -Now replace the printf statement with the cout statement - -103 -00:08:15 --> 00:08:20 -since we use cout<< function to print a line in C++. - -104 -00:08:21 --> 00:08:26 -Click on Search for and replace text option. - -105 -00:08:27 --> 00:08:32 -Type here printf opening bracket “(” - -106 -00:08:33 --> 00:08:39 -And here in this column type, cout and two opening angle brackets “<<”. - -107 -00:08:40 --> 00:08:44 -Now click on Replace All and click on Close. - -108 -00:08:45 --> 00:08:49 -We don't need the format specifier and '\n' - -109 -00:08:50 --> 00:08:51 -Let us delete them. - -110 -00:08:52 --> 00:09:00 -Now delete the comma and type two opening angle brackets. - -111 -00:09:01 --> 00:09:03 -Click on Save. Now delete the closing bracket. - -112 -00:09:04 --> 00:09:08 -Type two opening angle brackets again. - -113 -00:09:09 --> 00:09:15 -And within the double quotes type \n. - -114 -00:09:16 --> 00:09:19 -Now Click on Save. - -115 -00:09:20 --> 00:09:23 -Let us execute the program. Come back to our terminal. - -116 -00:09:24 --> 00:09:34 -To compile, type g++ space tokens dot cpp space hyphen o space tok1. - -117 -00:09:35 --> 00:09:45 -Here we have tok1 because we don't want to overwrite the output parameter tok for the file tokens.c. - -118 -00:09:46 --> 00:09:47 -Now press Enter. - -119 -00:09:48 --> 00:09:54 -To execute, type ./tok1 . Press Enter. - -120 -00:09:55 --> 00:09:58 -The output is displayed. - -121 -00:09:59 --> 00:10:02 -Now let us move on to some common errors which we can come across. - -122 -00:10:03 --> 00:10:04 -Come back to our program. - -123 -00:10:05 --> 00:10:11 -Suppose here I will reassign a new value to b as 8. - -124 -00:10:12 --> 00:10:14 -Now click on Save. Let us see what happens. - -125 -00:10:15 --> 00:10:16 -Come back to our terminal. - -126 -00:10:17 --> 00:10:21 -Let me clear the prompt. - -127 -00:10:22 --> 00:10:25 -Now compile as before. - -128 -00:10:26 --> 00:10:31 -We see an error at line no.7 in our tokens. cpp file. - -129 -00:10:32 --> 00:10:35 -"Assignment of read only variable 'b' ". - -130 -00:10:36 --> 00:10:38 -Come back to our program. - -131 -00:10:39 --> 00:10:44 -This is because 'b' is a constant. Constants are fixed values. - -132 -00:10:45 --> 00:10:48 -They do not change during the execution of program. - -133 -00:10:49 --> 00:10:53 -Hence it is giving an error. Let us fix the error. - -134 -00:10:54 --> 00:10:56 -Delete this. Click on Save. - -135 -00:10:57 --> 00:11:00 -Let us execute again. Come back to our terminal. - -136 -00:11:01 --> 00:11:02 -Compile as before. - -137 -00:11:03 --> 00:11:08 -Execute as before. Yes, it is working. - -138 -00:11:09 --> 00:11:11 -Now we will see another common error. - -139 -00:11:12 --> 00:11:14 -Switch back to our program. - -140 -00:11:15 --> 00:11:20 -Suppose here I will miss the single quotes. Click on Save. - -141 -00:11:21 --> 00:11:24 -Let us execute. Come back to our terminal. - -142 -00:11:25 --> 00:11:27 -Compile as before. - -143 -00:11:28 --> 00:11:33 -We see an error at line no.9 in our tokens dot cpp file. - -144 -00:11:34 --> 00:11:39 -" 'A' was not declared in the scope". Come back to our program. - -145 -00:11:40 --> 00:11:46 -This is because anything within the single quotes is considered as a character value. - -146 -00:11:47 --> 00:11:52 -And here we have declared 'd' as a character variable. - -147 -00:11:53 --> 00:11:58 -Let us fix the error. Type single quotes at line no.9 here. - -148 -00:11:59 --> 00:12:01 -Now Click on Save. Let us execute. - -149 -00:12:02 --> 00:12:03 -Come back to our terminal. - -150 -00:12:04 --> 00:12:05 -Now Compile as before. - -151 -00:12:06 --> 00:12:12 -Execute as before. Yes it is working. - -152 -00:12:13 --> 00:12:14 -Now switch back to our slides. - -153 -00:12:15 --> 00:12:17 -Let us summarize.In this tutorial we learnt, - -154 -00:12:18 --> 00:12:23 -Data types eg. int, double, float etc. - -155 -00:12:24 --> 00:12:28 -Variables eg. int a=2; - -156 -00:12:29 --> 00:12:33 -Identifiers eg. printf() and - -157 -00:12:34 --> 00:12:39 -Constant eg. double const b=4; - -158 -00:12:40 --> 00:12:44 -As an assignment,Write a program to calculate the simple interest. - -159 -00:12:45 --> 00:12:49 -Hint: principal * rate * time upon 100. - -160 -00:12:50 --> 00:12:53 -Watch the video available at the link shown below. - -161 -00:12:54 --> 00:12:55 -It summarizes the Spoken Tutorial project. - -162 -00:12:56 --> 00:13:00 -If you do not have good bandwidth, you can download and watch it. - -163 -00:13:01 --> 00:13:02 -The Spoken Tutorial Project Team: - -164 -00:13:03 --> 00:13:06 -Conducts workshops using spoken tutorials, - -165 -00:13:07 --> 00:13:09 -Gives certificates to those who pass an online test. - -166 -00:13:10 --> 00:13:18 -For more details, please write to contact @spoken-tutorial.org - -167 -00:13:19 --> 00:13:23 -Spoken Tutorial Project is a part of the Talk to a Teacher project. - -168 -00:13:24 --> 00:13:29 -It is supported by the National Mission on Education through ICT, MHRD, Government of India. - -169 -00:13:30 --> 00:13:34 -More information on this Mission is available at the link shown below. - -170 -00:13:35 --> 00:13:40 -Ashwini Patil from IIT Bombay signing off .Thank You for joining. - diff --git a/media/videos/43/431/Functions-English.srt b/media/videos/43/431/Functions-English.srt deleted file mode 100644 index 3ab6888..0000000 --- a/media/videos/43/431/Functions-English.srt +++ /dev/null @@ -1,630 +0,0 @@ -Narration - -1 -00:00:01 --> 00:00:05 -Welcome to the spoken tutorial on Functions in C and C++. - -2 -00:00:06 --> 00:00:08 -In this tutorial we will learn, - -3 -00:00:09 --> 00:00:10 -What is a function - -4 -00:00:11 --> 00:00:12 -Syntax of a function - -5 -00:00:13 --> 00:00:15 -Significance of return statement - -6 -00:00:16 --> 00:00:17 -We will do this through examples. - -7 -00:00:18 --> 00:00:21 -We will also see some common errors and their solutions. - -8 -00:00:22 --> 00:00:24 -To record this tutorial, I am using, - -9 -00:00:25 --> 00:00:28 -Ubuntu Operating System version 11.10, - -10 -00:00:29 --> 00:00:34 -gcc and g++ Compiler version 4.6.1 . - -11 -00:00:35 --> 00:00:38 -Let us start with the introduction to functions. - -12 -00:00:39 --> 00:00:44 -A function is a self-contained program executing a specific task. - -13 -00:00:45 --> 00:00:48 -Every program consists of one or more functions. - -14 -00:00:49 --> 00:00:54 -Once executed, the control will be returned back from where it was accessed. - -15 -00:00:55 --> 00:00:58 -Let us see the syntax for function. - -16 -00:00:59 --> 00:01:04 -ret-type defines the type of data that the function returns. - -17 -00:01:05 --> 00:01:08 -fun_name defines the name of the function. - -18 -00:01:09 --> 00:01:13 -parameters is the list of variable names and their types. - -19 -00:01:14 --> 00:01:17 -We can specify an empty parameter list. - -20 -00:01:18 --> 00:01:20 -This is called as functions without arguments. - -21 -00:01:21 --> 00:01:25 -And this is called as functions with arguments. - -22 -00:01:26 --> 00:01:28 -Let us see a program using void. - -23 -00:01:29 --> 00:01:31 -I have already typed the program on the editor. - -24 -00:01:32 --> 00:01:34 -So I will open it. - -25 -00:01:35 --> 00:01:37 -Note that our file name is function. - -26 -00:01:38 --> 00:01:42 -And I have saved the file with the extension .c (dot c). - -27 -00:01:43 --> 00:01:44 -Let me explain the code. - -28 -00:01:45 --> 00:01:46 -This is our header file. - -29 -00:01:47 --> 00:01:50 -Before using any function, it must be defined. - -30 -00:01:51 --> 00:01:53 -Here we have defined a function called add. - -31 -00:01:54 --> 00:01:57 -Note that add function is without any arguments. - -32 -00:01:58 --> 00:02:00 -And the return type is void. - -33 -00:02:01 --> 00:02:02 -There are two types of functions- - -34 -00:02:03 --> 00:02:05 -User-defined that is our add function and - -35 -00:02:06 --> 00:02:11 -Pre-defined that is printf and main function . - -36 -00:02:12 --> 00:02:18 -Here we have initialized a and b by assigning them values as 2 and 3. - -37 -00:02:19 --> 00:02:20 -Here we have declared a variable c. - -38 -00:02:21 --> 00:02:23 -Then we add the values of a and b. - -39 -00:02:24 --> 00:02:26 -The result is stored in c. - -40 -00:02:27 --> 00:02:28 -Then we print the result. - -41 -00:02:29 --> 00:02:31 -This is our main function. - -42 -00:02:32 --> 00:02:33 -Here we call the add function. - -43 -00:02:34 --> 00:02:38 -The addition operation will be performed and the result will be printed. - -44 -00:02:39 --> 00:02:41 -Now click on Save. - -45 -00:02:42 --> 00:02:44 -Let us execute the program. - -46 -00:02:45 --> 00:02:52 -Please open the terminal window by pressing Ctrl, Alt and T keys simultaneously. - -47 -00:02:53 --> 00:02:59 -To compile, type gcc function dot c hyphen o fun. - -48 -00:03:00 --> 00:03:04 -To execute, type ./fun (dot slash fun). - -49 -00:03:05 --> 00:03:09 -We see the output is displayed as Sum of a and b is 5 . - -50 -00:03:10 --> 00:03:12 -Now come back to our program. - -51 -00:03:13 --> 00:03:19 -Functions contain special identifiers called as parameters or arguments. - -52 -00:03:20 --> 00:03:22 -Let us see the same example with arguments. - -53 -00:03:23 --> 00:03:26 -I will change a few things here. - -54 -00:03:27 --> 00:03:31 -Type int add(int a, int b) - -55 -00:03:32 --> 00:03:35 -Here we have declared a function add. - -56 -00:03:36 --> 00:03:40 -int a and int b are the arguments of the function add. - -57 -00:03:41 --> 00:03:45 -Let us delete this.No need to initialize a and b here. - -58 -00:03:46 --> 00:03:48 -Delete the printf statement. - -59 -00:03:49 --> 00:03:51 -Type int main() - -60 -00:03:52 --> 00:03:53 -Let us declare a variable sum here. - -61 -00:03:54 --> 00:03:56 -Type int sum; - -62 -00:03:57 --> 00:04:02 -Then type sum = add(5,4); - -63 -00:04:03 --> 00:04:04 -Here we call the add function. - -64 -00:04:05 --> 00:04:09 -Then we pass the parameters as 5 and 4. - -65 -00:04:10 --> 00:04:13 -5 will be stored in a and 4 will be stored in b. - -66 -00:04:14 --> 00:04:17 -The addition operation will be performed. - -67 -00:04:18 --> 00:04:19 -Let us now print the result. - -68 -00:04:20 --> 00:04:26 -Hence type here printf(“Sum is %d\n”, sum); - -69 -00:04:27 --> 00:04:31 -Delete this, as we have already called the function above. - -70 -00:04:32 --> 00:04:35 -Type return 0; - -71 -00:04:36 --> 00:04:40 -A non-void function must use a return statement that returns a value. - -72 -00:04:41 --> 00:04:42 -Click on Save. - -73 -00:04:43 --> 00:04:44 -Let us execute the program. - -74 -00:04:45 --> 00:04:47 -Come back to our terminal. - -75 -00:04:48 --> 00:04:49 -Now compile the program as before. - -76 -00:04:50 --> 00:04:51 -Let us execute. - -77 -00:04:52 --> 00:04:56 -The output is displayed as Sum is 9 . - -78 -00:04:57 --> 00:05:01 -Now let us see how to execute the same program in C++. - -79 -00:05:02 --> 00:05:03 -Come back to our program. - -80 -00:05:04 --> 00:05:06 -Let me change a few things here. - -81 -00:05:07 --> 00:05:11 -First press Shift, Ctrl and S keys simultaneously. - -82 -00:05:12 --> 00:05:17 -Now save the file with .cpp extension. - -83 -00:05:18 --> 00:05:23 -Click on Save. First we will change the header file as - -84 -00:05:24 --> 00:05:27 -We will include the using statement here. - -85 -00:05:28 --> 00:05:31 -The function declaration is same in C++. - -86 -00:05:32 --> 00:05:36 -So there is no need to change anything here. - -87 -00:05:37 --> 00:05:47 -Now replace the printf statement with the cout statement, as we use cout<< function to print a line in C++. - -88 -00:05:48 --> 00:05:51 -We don't need the format specifier and \n here. - -89 -00:05:52 --> 00:05:53 -Delete the comma. - -90 -00:05:54 --> 00:05:57 -Now, type two opening angle brackets. - -91 -00:05:58 --> 00:06:02 -After sum , again type two opening angle brackets. - -92 -00:06:03 --> 00:06:06 -Within double quotes, type backslash n. - -93 -00:06:07 --> 00:06:08 -Delete this closing bracket. - -94 -00:06:09 --> 00:06:10 -Now Click on Save. - -95 -00:06:11 --> 00:06:13 -Let us compile the program. - -96 -00:06:14 --> 00:06:15 -Come back to our terminal. - -97 -00:06:16 --> 00:06:22 -Type g++ function dot cpp hyphen o fun1 - -98 -00:06:23 --> 00:06:30 -Here we have fun1, this is because we don't want to overwrite the output file fun. - -99 -00:06:31 --> 00:06:33 -Press Enter. - -100 -00:06:34 --> 00:06:37 -Type ./fun1 - -101 -00:06:38 --> 00:06:41 -The output is displayed as: Sum is 9 - -102 -00:06:42 --> 00:06:46 -Now we will see the common errors which we can come across. - -103 -00:06:47 --> 00:06:50 -Suppose here, we type x in place of 4. - -104 -00:06:51 --> 00:06:54 -I will retain the rest of the code as it is. - -105 -00:06:55 --> 00:06:57 -Click on Save. - -106 -00:06:58 --> 00:07:01 -Let us compile the program. - -107 -00:07:02 --> 00:07:05 -We see an error at line no. 10. - -108 -00:07:06 --> 00:07:08 - 'x' was not declared in this scope. - -109 -00:07:09 --> 00:07:12 -This is because 'x' is a character variable. - -110 -00:07:13 --> 00:07:14 -It was not declared anywhere. - -111 -00:07:15 --> 00:07:20 -And our add function has integer variable as an argument. - -112 -00:07:21 --> 00:07:24 -So, there is a mismatch in return type and return value. - -113 -00:07:25 --> 00:07:26 -Now come back to our program. - -114 -00:07:27 --> 00:07:29 -Let us fix the error. - -115 -00:07:30 --> 00:07:31 -Type 4 at line no. 10. - -116 -00:07:32 --> 00:07:34 -Click on Save. - -117 -00:07:35 --> 00:07:36 -Let us execute again. - -118 -00:07:37 --> 00:07:39 -Let me clear the prompt. - -119 -00:07:40 --> 00:07:41 -Compile the program as before. - -120 -00:07:42 --> 00:07:44 -Yes! It is working. - -121 -00:07:45 --> 00:07:49 -Now we will see another common error which we can come across. - -122 -00:07:50 --> 00:07:54 -Suppose here we pass only one parameter. - -123 -00:07:55 --> 00:07:57 -Delete 4. Click on Save. - -124 -00:07:58 --> 00:07:59 -Switch to the terminal. - -125 -00:08:00 --> 00:08:05 -Let us compile.We see an error at line no 10. - -126 -00:08:06 --> 00:08:10 -too few arguments to function 'int add (int, int)' - -127 -00:08:11 --> 00:08:13 -Switch back to our program. - -128 -00:08:14 --> 00:08:18 -You can see here we have two parameters - -129 -00:08:19 --> 00:08:21 -int a and int b. - -130 -00:08:22 --> 00:08:24 -And here we are passing only one parameter. - -131 -00:08:25 --> 00:08:26 -Hence it is giving an error. - -132 -00:08:27 --> 00:08:28 -Let us fix the error. - -133 -00:08:29 --> 00:08:30 -Type 4. - -134 -00:08:31 --> 00:08:33 -Click on Save . - -135 -00:08:34 --> 00:08:35 -Switch to the terminal. - -136 -00:08:36 --> 00:08:38 -Let us execute again. - -137 -00:08:39 --> 00:08:41 -Yes! It is working. - -138 -00:08:42 --> 00:08:43 -Come back to our slides. - -139 -00:08:44 --> 00:08:48 -To summarize, in this tutorial we have learnt - - -140 -00:08:49 --> 00:08:50 -function Syntax of function - -141 -00:08:51 --> 00:08:52 -function without arguments - -142 -00:08:53 --> 00:08:54 -Eg- void add() - -143 -00:08:55 --> 00:08:56 -Function with arguments - -144 -00:08:57 --> 00:09:01 -Eg- int add(int a, int b) - -145 -00:09:02 --> 00:09:06 -As an assignment- Write a program to calculate the square of a number. - -146 -00:09:07 --> 00:09:10 -Watch the video available at the link shown below. - -147 -00:09:11 --> 00:09:13 -It summarizes the Spoken Tutorial project. - -148 -00:09:14 --> 00:09:17 -If you do not have good bandwidth, you can download and watch it. - -149 -00:09:18 --> 00:09:20 -The Spoken Tutorial Project Team: - -150 -00:09:21 --> 00:09:23 -Conducts workshops using spoken tutorials, - -151 -00:09:24 --> 00:09:27 -Gives certificates to those who pass an online test. - -152 -00:09:28 --> 00:09:34 -For more details, please write to, contact@spoken-tutorial.org - -153 -00:09:35 --> 00:09:39 -Spoken Tutorial Project is a part of Talk to a Teacher project. - -154 -00:09:40 --> 00:09:46 -It is supported by the National Mission on Education through ICT, MHRD, Government of India. - -155 -00:09:47 --> 00:09:51 -More information on this Mission is available at the link shown below. - -156 -00:09:52 --> 00:09:54 -This is Ashwini Patil from IIT Bombay. - -157 -00:09:55 --> 00:10:00 -Thank You for joining. - diff --git a/media/videos/43/432/Scope-Of-Variables-English.srt b/media/videos/43/432/Scope-Of-Variables-English.srt deleted file mode 100644 index 19bc634..0000000 --- a/media/videos/43/432/Scope-Of-Variables-English.srt +++ /dev/null @@ -1,402 +0,0 @@ -Narration - -1 -00:00:01 --> 00:00:07 -Welcome to the spoken tutorial on Scope of variables in C and C++. - -2 -00:00:08 --> 00:00:10 -In this tutorial we will learn, - -3 -00:00:11 --> 00:00:12 -What is the Scope of variable? - -4 -00:00:13 --> 00:00:15 -What is a Global variable? - -5 -00:00:16 --> 00:00:18 -What is a Local variable? - -6 -00:00:19 --> 00:00:21 -Few examples. - -7 -00:00:22 --> 00:00:26 -We will also see some common errors and their solutions. - -8 -00:00:27 --> 00:00:29 -To record this tutorial, I am using - -9 -00:00:30 --> 00:00:40 -Ubuntu Operating System version 11.04, gcc and g++ Compiler version 4.6.1. - -10 -00:00:41 --> 00:00:46 -Let us start with the introduction to the scope of variables. - -11 -00:00:47 --> 00:00:53 -It is the region of code within which the variable can be accessed. - -12 -00:00:54 --> 00:00:58 -Depending on it's type and place of declaration it is divided into two categories: - -13 -00:00:59 --> 00:01:01 -Global Variable & - -14 -00:01:02 --> 00:01:04 -Local Variable. - -15 -00:01:05 --> 00:01:06 -Now we will see an example. - -16 -00:01:07 --> 00:01:09 -I have already typed the program on the editor. - -17 -00:01:10 --> 00:01:13 -Let me open it. - -18 -00:01:14 --> 00:01:18 -Note that our file name is scope.c. - -19 -00:01:19 --> 00:01:22 -Let me explain the code now. - -20 -00:01:23 --> 00:01:25 -This is our header file. - -21 -00:01:26 --> 00:01:31 -Here we have declared two global variables a and b. - -22 -00:01:32 --> 00:01:38 -And we have initialized them by assigning values as 5 and 2. - -23 -00:01:39 --> 00:01:43 -A global variable is available to all functions in your program. - -24 -00:01:44 --> 00:01:50 -These are declared outside any functions, above main() function. - -25 -00:01:51 --> 00:01:52 -These have a global scope. - -26 -00:01:53 --> 00:01:58 -Here we have declared a function add without arguments. - -27 -00:01:59 --> 00:02:06 -Here 'sum' is a local variable, it is declared inside the function add. - -28 -00:02:07 --> 00:02:12 -A local variable is available only to the function inside which it is declared. - -29 -00:02:13 --> 00:02:15 -These variables are declared inside a block. - -30 -00:02:16 --> 00:02:18 -These have local scope. - -31 -00:02:19 --> 00:02:28 -Then sum of a & b will be stored in the variable 'sum'. Here we print the sum. - -32 -00:02:29 --> 00:02:32 -This is our main() function. - -33 -00:02:33 --> 00:02:37 -The add function is called and then executed. - -34 -00:02:38 --> 00:02:39 -And this is our return statement. - -35 -00:02:40 --> 00:02:42 -Now click on Save. - -36 -00:02:43 --> 00:02:44 -Let us execute the program. - -37 -00:02:45 --> 00:02:54 -Please open the terminal window by pressing Ctrl, Alt and T keys simultaneously on your keyboard. - -38 -00:02:55 --> 00:03:04 -To compile, type gcc space scope.c space hyphen o space sco and press Enter. - -39 -00:03:05 --> 00:03:09 -To execute, type ./sco (dot slash sco), press Enter. - -40 -00:03:10 --> 00:03:12 -The output is displayed as - -41 -00:03:13 --> 00:03:15 -Sum of a and b is 7. - -42 -00:03:16 --> 00:03:19 -Now let us see how to execute the same program in C++. - -43 -00:03:20 --> 00:03:30 -Come back to our program. First press Shift, Ctrl & S keys simultaneously on your keyboard. - -44 -00:03:31 --> 00:03:40 -Now save the file with an extension .cpp (dot cpp) and click on Save. - -45 -00:03:41 --> 00:03:46 -Let us change the header file as iostream. - -46 -00:03:47 --> 00:03:57 -Now include the using statement. Click on save . - -47 -00:03:58 --> 00:04:02 -The declaration of global variable and local variable is same in C++. - -48 -00:04:03 --> 00:04:06 -So, no need to change anything. - -49 -00:04:07 --> 00:04:12 -Now replace the printf statement with the cout statement. - -50 -00:04:13 --> 00:04:16 -Delete the format specifier and '\n'. - -51 -00:04:17 --> 00:04:18 -Now delete the comma. - -52 -00:04:19 --> 00:04:21 -Type two opening angle brackets. - -53 -00:04:22 --> 00:04:25 -Delete the closing bracket, again type two opening angle brackets. - -54 -00:04:26 --> 00:04:34 -And within the double quotes type backslash n. Now click on Save. - -55 -00:04:35 --> 00:04:38 -Let us execute the program. - -56 -00:04:39 --> 00:04:41 -Come back to our terminal. - -57 -00:04:42 --> 00:04:51 -To compile, type g++ space scope dot cpp space -o space sco1 - -58 -00:04:52 --> 00:05:03 -Here we have sco1 because we don't want to overwrite output parameter sco for the file 'scope.c'. - -59 -00:05:04 --> 00:05:06 -Now press Enter. - -60 -00:05:07 --> 00:05:13 -To execute type ./sco1 and press Enter. - -61 -00:05:14 --> 00:05:18 -The output is displayed as Sum of a and b is 7. - -62 -00:05:19 --> 00:05:26 -We can see that it is similar to our C code. - -63 -00:05:27 --> 00:05:30 -Now we will see some common errors which we can come across. - -64 -00:05:31 --> 00:05:40 -Come back to our program. Suppose here I will declare a variable a again. - -65 -00:05:41 --> 00:05:44 -Type int a and a semicolon. - -66 -00:05:45 --> 00:05:54 -Click on Save. We have declared the variable 'a' above the main() function and after the add function. - -67 -00:05:55 --> 00:05:56 -Let us see what happens. - -68 -00:05:57 --> 00:06:00 -Come back to our terminal. - -69 -00:06:01 --> 00:06:04 -Now compile as before. - -70 -00:06:05 --> 00:06:17 -We see errors, redefinition of 'int a' , 'int a' previously defined here. Come back to our program. - -71 -00:06:18 --> 00:06:19 -a is a global variable. - -72 -00:06:20 --> 00:06:21 -It has a global scope. - -73 -00:06:22 --> 00:06:26 -We cannot declare the variable twice as it is already declared globally. - -74 -00:06:27 --> 00:06:33 -We can only declare variable a as a local variable . - -75 -00:06:34 --> 00:06:35 -Let us fix the error. - -76 -00:06:36 --> 00:06:38 -Delete this . - -77 -00:06:39 --> 00:06:40 -Click on Save. - -78 -00:06:41 --> 00:06:44 -Let us execute again Come back to our terminal. - -79 -00:06:45 --> 00:06:48 -Now compile as before, execute as before. - -80 -00:06:49 --> 00:06:51 -Yes, it is working. - -81 -00:06:52 --> 00:06:55 -This brings us to the end of this tutorial. - -82 -00:06:56 --> 00:06:57 -Let us summarize. - -83 -00:06:58 --> 00:06:59 -In this tutorial we learnt , - -84 -00:07:00 --> 00:07:01 -Scope of variable, - -85 -00:07:02 --> 00:07:06 -Global variable, e.g : int a=5 & - -86 -00:07:07 --> 00:07:11 -and local variable ,e.g:int sum - -87 -00:07:12 --> 00:07:13 -As an assignment, - -88 -00:07:14 --> 00:07:18 -write a program to print the difference of two numbers. - -89 -00:07:19 --> 00:07:21 -Watch the video available at the link shown below . - -90 -00:07:22 --> 00:07:24 -It summarizes the Spoken Tutorial project. - -91 -00:07:25 --> 00:07:29 -If you do not have good bandwidth, you can download and watch it. - -92 -00:07:30 --> 00:07:31 -The Spoken Tutorial Project Team: - -93 -00:07:32 --> 00:07:34 -Conducts workshops using spoken tutorials, - -94 -00:07:35 --> 00:07:39 -Gives certificates to those who pass an online test . - -95 -00:07:40 --> 00:07:46 -For more details, please write to,contact@spoken-tutorial.org - -96 -00:07:47 --> 00:07:51 -Spoken Tutorial Project is a part of the Talk to a Teacher project. - -97 -00:07:52 --> 00:07:59 -It is supported by the National Mission on Education through ICT, MHRD, Government of India. - -98 -00:08:00 --> 00:08:03 -More information on this Mission is available at the link shown below - -99 -00:08:04 --> 00:08:07 -This is Ashwini Patil from IIT Bombay signing off. - -100 -00:08:08 --> 00:08:13 -Thank You for watching. - diff --git a/media/videos/43/433/If-And-Else-If-statement-English.srt b/media/videos/43/433/If-And-Else-If-statement-English.srt deleted file mode 100644 index 5420170..0000000 --- a/media/videos/43/433/If-And-Else-If-statement-English.srt +++ /dev/null @@ -1,604 +0,0 @@ -Narration - -1 -00:00:02 --> 00:00:07 -Welcome to the spoken tutorial on Conditional statements in C and C++. - -2 -00:00:08 --> 00:00:10 -In this tutorial we will learn: - -3 -00:00:11 --> 00:00:13 -How to execute a single statement - -4 -00:00:14 --> 00:00:15 -How to execute group of statements. - -5 -00:00:16 --> 00:00:18 -We will do this through examples. - -6 -00:00:19 --> 00:00:24 -We will also see some common errors and their solutions. - -7 -00:00:25 --> 00:00:30 -To record this tutorial, I am using Ubuntu Operating system version 11.10. - -8 -00:00:31 --> 00:00:37 -gcc and g++ Compiler version 4.6.1. - -9 -00:00:38 --> 00:00:42 -Let us start with the introduction to conditional statements. - -10 -00:00:43 --> 00:00:48 -A statement in a program controls the flow of program execution. - -11 -00:00:49 --> 00:00:54 -It helps to make decision on what code is to be executed. - -12 -00:00:55 --> 00:00:59 -We can check the conditions, whether true or false. - -13 -00:01:00 --> 00:01:06 -We can execute a single statement or a group of statements. - -14 -00:01:07 --> 00:01:12 -Let us understand the flow of if statements. - -15 -00:01:13 --> 00:01:19 -Here, if the condition is true then statement 1 will be executed. - -16 -00:01:20 --> 00:01:28 -If the condition is false then statement 2 will be executed. - -17 -00:01:29 --> 00:01:31 -Now we will see the flow of else if statement. - -18 -00:01:32 --> 00:01:40 -Here, if condition 1 is true then statement 1 will be executed. - -19 -00:01:41 --> 00:01:48 -If condition 1 is false then it will check for another condition that is condition 2. - -20 -00:01:49 --> 00:01:53 -If condition 2 is true then statement 3 will be executed. - -21 -00:01:54 --> 00:02:01 -And If condition 2 is false then statement 2 will be executed. - -22 -00:02:02 --> 00:02:05 -Now Let us move on to our program. - -23 -00:02:06 --> 00:02:08 -I have already typed the code on the editor. - -24 -00:02:09 --> 00:02:12 -So, let me open it. - -25 -00:02:13 --> 00:02:17 -Note that our file name is ifstmt.c. - -26 -00:02:18 --> 00:02:25 -In this program we will calculate the sum of two numbers and will check a few conditions. - -27 -00:02:26 --> 00:02:29 -Let me explain the code now. - -28 -00:02:30 --> 00:02:33 -This is our header file. - -29 -00:02:34 --> 00:02:37 -This is our main() function. - -30 -00:02:38 --> 00:02:45 -Here we have declared three integer variables a, b and sum. - -31 -00:02:46 --> 00:02:48 -Here we are asking for user input. - -32 -00:02:49 --> 00:02:51 -User will enter the values of a and b. - -33 -00:02:52 --> 00:02:57 -The values will be stored in variable a and variable b. - -34 -00:02:58 --> 00:03:01 -The scanf() function reads data from the console. - -35 -00:03:02 --> 00:03:05 -It then stores the result in the given variable. - -36 -00:03:06 --> 00:03:09 -The format specifier in the scanf() helps to know the type of data. - -37 -00:03:10 --> 00:03:17 -Like here we have %d, it denotes that we are dealing with integer data type. - -38 -00:03:18 --> 00:03:21 -Here we add the values of a and b. - -39 -00:03:22 --> 00:03:24 -We will store the result in sum. - -40 -00:03:25 --> 00:03:28 -Then we print the result. - -41 -00:03:29 --> 00:03:29 -This is our if statement. - -42 -00:03:30 --> 00:03:35 -Here, we check the condition whether sum is greater than 20. - -43 -00:03:36 --> 00:03:41 -If the condition is true, then we print Sum is greater than 20. - -44 -00:03:42 --> 00:03:47 -Now let me comment out these lines. - -45 -00:03:48 --> 00:03:50 -This is our return statement. - -46 -00:03:51 --> 00:03:52 -Now click on Save. - -47 -00:03:53 --> 00:03:57 -First we will see the execution of if statement. - -48 -00:03:58 --> 00:04:08 -Please open the terminal window by pressing Ctrl, Alt and T keys simultaneously on your keyboard. - -49 -00:04:09 --> 00:04:19 -To compile, type gcc space ifstmt dot c space -o space if and press Enter. - -50 -00:04:20 --> 00:04:25 -To execute, type ./if (dot slash if). Press Enter. - -51 -00:04:26 --> 00:04:30 -It is displayed as Enter the values of a and b. - -52 -00:04:31 --> 00:04:37 -I will give the values as 10 and 12. - -53 -00:04:38 --> 00:04:44 -The output is displayed as Sum of a and b is 22. Sum is greater than 20. - -54 -00:04:45 --> 00:04:47 -Now come back to our program. - -55 -00:04:48 --> 00:04:51 -We will check another condition. - -56 -00:04:52 --> 00:04:55 -Let me remove the comment from here. - -57 -00:04:56 --> 00:04:59 -I will give the comment here. - -58 -00:05:00 --> 00:05:04 -Now click on Save. This is our else-if statement. - -59 -00:05:05 --> 00:05:10 -Here, we check another condition whether Sum is greater than 10. - -60 -00:05:11 --> 00:05:17 -If the condition is true then we print 'Sum is greater than 10 and less than 20'. - -61 -00:05:18 --> 00:05:19 -Now come back to our terminal. - -62 -00:05:20 --> 00:05:22 -Let us compile as before. - -63 -00:05:23 --> 00:05:25 -Let us execute as before. - -64 -00:05:26 --> 00:05:27 -It is displayed as - -65 -00:05:28 --> 00:05:29 -Enter the value of a and b. - -66 -00:05:30 --> 00:05:34 -I will give the values as 10 and 2. - -67 -00:05:35 --> 00:05:37 -The output is displayed as: Sum of a and b is 12. - -68 -00:05:38 --> 00:05:41 -Sum is greater than 10 and less than 20. - -69 -00:05:42 --> 00:05:43 -Let me clear the prompt. - -70 -00:05:44 --> 00:05:47 -Now come back to our program. - -71 -00:05:48 --> 00:05:55 -I will remove the comment from here and here. Now click on Save. - -72 -00:05:56 --> 00:06:03 -If both the above conditions are false then we print 'Sum is less than 10'. - -73 -00:06:04 --> 00:06:06 -This is our else statement. - -74 -00:06:07 --> 00:06:10 -Now let us execute and see. Come back to our terminal. - -75 -00:06:11 --> 00:06:17 -Let us compile as before. Let us execute as before. - -76 -00:06:18 --> 00:06:21 -Here it is displayed as Enter the value of a and b. - -77 -00:06:22 --> 00:06:26 -I will give the values as 3 and 5. - -78 -00:06:27 --> 00:06:30 -The output is displayed as sum of a and b is 8. - -79 -00:06:31 --> 00:06:33 -Sum is less than 10. - -80 -00:06:34 --> 00:06:37 -Now we will see some common errors which we can come across. - -81 -00:06:38 --> 00:06:40 -Come back to our program. - -82 -00:06:41 --> 00:06:46 -Suppose, here at the end of if statement I will type a semicolon (;). - -83 -00:06:47 --> 00:06:49 -Let us see what will happen. Click on Save. - -84 -00:06:50 --> 00:06:52 -Let us execute. Come back to our terminal. - -85 -00:06:53 --> 00:06:55 -Let us compile as before. - -86 -00:06:56 --> 00:07:01 -We see an error: 'else' without a previous 'if' - -87 -00:07:02 --> 00:07:06 -Come back to our program. It is a syntax error. - -88 -00:07:07 --> 00:07:09 -if statement will never terminate with a semicolon. - -89 -00:07:10 --> 00:07:15 -And the else if statement will never work without an if. - -90 -00:07:16 --> 00:07:21 -Let us fix the error. Delete the semicolon (;) here. - -91 -00:07:22 --> 00:07:24 -Now Click on Save. - -92 -00:07:25 --> 00:07:28 -Let us execute. Come back to the terminal. - -93 -00:07:29 --> 00:07:34 -Let us compile as before. Let us execute as before. - -94 -00:07:35 --> 00:07:36 -Enter the value of a and b. - -95 -00:07:37 --> 00:07:42 -I will give the values as 3 and 6. - -96 -00:07:43 --> 00:07:44 -The output is displayed as - -97 -00:07:45 --> 00:07:51 -Sum of a and b is 9. Sum is less than 10. - -98 -00:07:52 --> 00:07:56 -NOW WE WILL SEE HOW TO EXECUTE THE SAME PROGRAM IN C++. - -99 -00:07:57 --> 00:07:58 -Come back to our program. - -100 -00:07:59 --> 00:08:02 -I will change a few things here. - -101 -00:08:03 --> 00:08:10 -Press Shift, Ctrl and S keys simultaneously on your keyboard. - -102 -00:08:11 --> 00:08:19 -Now save the file with an extension dot cpp and click on Save. - -103 -00:08:20 --> 00:08:25 -We will change the header file as iostream. - -104 -00:08:26 --> 00:08:29 -Let us include the using statement here. - -105 -00:08:30 --> 00:08:34 -Now click on the Search for and replace text option. - -106 -00:08:35 --> 00:08:39 -Let us replace the printf statement with the cout statement. - -107 -00:08:40 --> 00:08:45 -Click on Replace all and click on Close. - -108 -00:08:46 --> 00:08:48 -Now delete the closing brackets here. - -109 -00:08:49 --> 00:08:53 -Replace the scanf() statement with the cin statement. - -110 -00:08:54 --> 00:08:59 -Type cin and two closing angle brackets >>. - -111 -00:09:00 --> 00:09:04 -As we use cin >> function to read a line in C++. - -112 -00:09:05 --> 00:09:08 -Now delete the format specifiers. - -113 -00:09:09 --> 00:09:11 -Delete the comma and ampersand &. - -114 -00:09:12 --> 00:09:16 -Delete the comma here and type two closing angle brackets. - -115 -00:09:17 --> 00:09:24 -Again delete the ampersandand the closing brackets. Now click on Save. - -116 -00:09:25 --> 00:09:30 -Here delete the closing bracket and the comma. - -117 -00:09:31 --> 00:09:36 -Now delete the backslash n (\n) and format specifier. - -118 -00:09:37 --> 00:09:41 -Now type two opening brackets. - -119 -00:09:42 --> 00:09:48 -Again type two opening angle brackets and within the double quotes type backslash n “\n”. - -120 -00:09:49 --> 00:09:52 -Here also we will delete the closing bracket. - -121 -00:09:53 --> 00:09:58 -Now again delete the closing bracket here and here. - -122 -00:09:59 --> 00:10:01 -Now click on Save. - -123 -00:10:02 --> 00:10:03 -Let us execute. - -124 -00:10:04 --> 00:10:09 -Come back to the terminal. Let me clear the prompt. - -125 -00:10:10 --> 00:10:19 -To compile, type g++ space ifstmt.cpp space -o space if1 - -126 -00:10:20 --> 00:10:30 -Here we have 'if1' because we don't want to overwrite the output parameter if for the file 'ifstmt.c'. - -127 -00:10:31 --> 00:10:38 -Now Press 'Enter'.To execute type ./if1 (dot slash if1) and press Enter. - -128 -00:10:39 --> 00:10:47 -Enter the value of a and b. I will give the values as 20 and 10. - -129 -00:10:48 --> 00:10:51 -The output is displayed as Sum of a and b is 30 - -130 -00:10:52 --> 00:10:55 -Sum is greater than 20 - -131 -00:10:56 --> 00:10:58 -This brings us to the end of this tutorial. - -132 -00:10:59 --> 00:11:01 -Now come back to our slides. - -133 -00:11:02 --> 00:11:03 -Let us summarize. - -134 -00:11:04 --> 00:11:10 -In this tutorial we learned 'if' statement eg. if(condition), - -135 -00:11:11 --> 00:11:16 -And 'else if' statement eg. else if(condition). - -136 -00:11:17 --> 00:11:23 -As an assignment, Write a program to check 'a' is greater than 'b' or less than 'b'. - -137 -00:11:24 --> 00:11:27 -Hint: use 'if' statement. - -138 -00:11:28 --> 00:11:33 -Write another program to check which value is greater 'a', 'b' or 'c'. - -139 -00:11:34 --> 00:11:37 -Hint: use 'else-if' statement. - -140 -00:11:38 --> 00:11:40 -Watch the video available at the link shown below. - -141 -00:11:41 --> 00:11:43 -It summarizes the Spoken Tutorial project. - -142 -00:11:44 --> 00:11:47 -If you do not have good bandwidth, you can download and watch it. - -143 -00:11:48 --> 00:11:49 -The Spoken Tutorial Project Team, - -144 -00:11:50 --> 00:11:53 -Conducts workshops using spoken tutorials. - -145 -00:11:54 --> 00:11:56 -Gives certificates to those who pass an online test. - -146 -00:11:57 --> 00:12:03 -For more details, please write to, contact @ spoken hyphen tutorial dot org. - -147 -00:12:04 --> 00:12:08 -Spoken Tutorial Project is a part of the Talk to a Teacher project. - -148 -00:12:09 --> 00:12:14 -It is supported by the National Mission on Education through ICT, MHRD, Government of India. - -149 -00:12:15 --> 00:12:19 -More information on this Mission is available at the link shown below. - -150 -00:12:20 --> 00:12:25 -This is Ashwini Patil from IIT Bombay. -

Thank You for watching. -

- diff --git a/media/videos/43/434/Nested-If-And-Switch-Statement-English.srt b/media/videos/43/434/Nested-If-And-Switch-Statement-English.srt deleted file mode 100644 index 02bf83b..0000000 --- a/media/videos/43/434/Nested-If-And-Switch-Statement-English.srt +++ /dev/null @@ -1,514 +0,0 @@ -Narration - -1 -00:00:01 --> 00:00:06 -Welcome to the spoken tutorial on Nested if and Switch statements in C and C++. - -2 -00:00:07 --> 00:00:08 -In this tutorial we will learn, - -3 -00:00:09 --> 00:00:11 -how to use nested if statement and - -4 -00:00:12 --> 00:00:16 -switch statement.We will do this with the help of some examples. - -5 -00:00:17 --> 00:00:19 -To record this tutorial, I am using - -6 -00:00:20 --> 00:00:23 -Ubuntu operating system version 11.10, - -7 -00:00:24 --> 00:00:29 -gcc and g++ Compiler version 4.6.1 on Ubuntu. - -8 -00:00:30 --> 00:00:35 -First we will learn how to write nested if and switch statements with an example. - -9 -00:00:36 --> 00:00:38 -I have already written the program. - -10 -00:00:39 --> 00:00:44 -Let’s have a look. In this program we will learn to check the range of integers. - -11 -00:00:45 --> 00:00:49 -Note that our file name is nested-if.c. - -12 -00:00:50 --> 00:00:51 -Let me explain the code now. - -13 -00:00:52 --> 00:00:53 -This is our Header file. - -14 -00:00:54 --> 00:00:55 -This is our main() function. - -15 -00:00:56 --> 00:01:01 -Inside the main() function we have declared two integer variables 'x and y'. - -16 -00:01:02 --> 00:01:07 -Here we prompt the users to enter a number between the range of 0 to 39. - -17 -00:01:08 --> 00:01:11 -We take the value of y as input from the user. - -18 -00:01:12 --> 00:01:13 -This is our if condition. - -19 -00:01:14 --> 00:01:18 -Here, we will check whether y/10=0. - -20 -00:01:19 --> 00:01:24 -If the condition is true, we print "you have entered the number in the range of 0-9". - -21 -00:01:25 --> 00:01:27 -This is our else-if condition. - -22 -00:01:28 --> 00:01:31 -Here we check that y/10 equals to 1. - -23 -00:01:32 --> 00:01:33 -If the condition is true, - -24 -00:01:34 --> 00:01:38 -we print "you have entered a number in the range of 10-19". - -25 -00:01:39 --> 00:01:44 -In this else if condition we check whether the number is in the range of 20-29. - -26 -00:01:45 --> 00:01:50 -And here we will see that the number is in the range of 30 to 39. - -27 -00:01:51 --> 00:01:52 -This is our else condition. - -28 -00:01:53 --> 00:01:54 -If all of the above conditions are false, - -29 -00:01:55 --> 00:01:57 -we print "number not in range". - -30 -00:01:58 --> 00:02:00 -And this is our return statement. - -31 -00:02:01 --> 00:02:02 -Now let us execute the program. - -32 -00:02:03 --> 00:02:11 -Please open the terminal window by pressing Ctrl+Alt and T keys simultaneously on your keyboard. - -33 -00:02:12 --> 00:02:22 -To execute, type gcc space nested-if.c space hyphen o space nested. Press Enter. - -34 -00:02:23 --> 00:02:27 -Type dot slash “nested” (./nested). Press Enter. - -35 -00:02:28 --> 00:02:31 -We see Enter a number between 0 to 39. - -36 -00:02:32 --> 00:02:33 -I will enter 12. - -37 -00:02:34 --> 00:02:34 -The output is displayed as: - -38 -00:02:35 --> 00:02:39 - you have entered the number in the range of 10-19. - -39 -00:02:40 --> 00:02:41 -Let us enter another number. - -40 -00:02:42 --> 00:02:47 -Let's execute again. Press the up arrow key, press Enter. - -41 -00:02:48 --> 00:02:49 -I will give 5 this time. - -42 -00:02:50 --> 00:02:51 -We see the output as : - -43 -00:02:52 --> 00:02:55 -you have entered the number in the range of 0-9. - -44 -00:02:56 --> 00:02:59 -The conditional execution can also be done in another way. - -45 -00:03:00 --> 00:03:01 -By using switch statement. - -46 -00:03:02 --> 00:03:04 -Let’s see how it is done. - -47 -00:03:05 --> 00:03:07 -We will see the same program using switch. - -48 -00:03:08 --> 00:03:09 -I have already opened the program. - -49 -00:03:10 --> 00:03:12 -Let's switch back to our text editor. - -50 -00:03:13 --> 00:03:15 -I have explained this in the previous program. - -51 -00:03:16 --> 00:03:19 -So I will move on to the switch statements. - -52 -00:03:20 --> 00:03:27 -Here, we divide the inputs i.e y by 10 and the result is stored in the variable x. - -53 -00:03:28 --> 00:03:31 -That means the quotient will be stored in x. - -54 -00:03:32 --> 00:03:35 -With the help of the quotient we can identify the range of the number. - -55 -00:03:36 --> 00:03:40 -Here, we tell the switch command that the variable to be checked is x. - -56 -00:03:41 --> 00:03:44 -This is case 0 . If case 0 is satisfied - -57 -00:03:45 --> 00:03:50 -then we print you have entered the number in the range of 0-9. - -58 -00:03:51 --> 00:03:54 -We add break to come out of the loop if the case is satisfied. - -59 -00:03:55 --> 00:03:57 -We need to break the loop each time. - -60 -00:03:58 --> 00:04:02 -It is because only one condition can be true at a time. - -61 -00:04:03 --> 00:04:07 -This is “case 1”. “case 1” means “if the value of x is 1”. - -62 -00:04:08 --> 00:04:11 -We print you have entered a number in the range of 10-19. - -63 -00:04:12 --> 00:04:13 -This is “case 2” . - -64 -00:04:14 --> 00:04:19 -Here we print you have entered a number in the range of 20-29. - -65 -00:04:20 --> 00:04:25 -And this is case 3. Here we check whether the number is in the range of 30-39. - -66 -00:04:26 --> 00:04:35 -This is the default case. Default case specifies what needs to be done if none of the above cases are satisfied. - -67 -00:04:36 --> 00:04:38 -Here we print "number not in range". - -68 -00:04:39 --> 00:04:40 -And This is our return statement. - -69 -00:04:41 --> 00:04:42 -Let us execute the program. - -70 -00:04:43 --> 00:04:45 -Switch back to the terminal. - -71 -00:04:46 --> 00:04:54 -Type gcc space switch.c space -o space switch. Press Enter. - -72 -00:04:55 --> 00:04:59 -Type ./switch(dot slash switch). Press Enter. - -73 -00:05:00 --> 00:05:05 -Enter a number between 0 to 39. I will enter 35. - -74 -00:05:06 --> 00:05:09 -The output is displayed as “you have entered the number in the range of 30 to 39”. - -75 -00:05:10 --> 00:05:15 -Now we will see how to execute the programs in C++. - -76 -00:05:16 --> 00:05:17 -Switch back to the text editor. - -77 -00:05:18 --> 00:05:22 -Note that our file name is nested-if.cpp. - -78 -00:05:23 --> 00:05:26 -Here the logic and implementation are same. - -79 -00:05:27 --> 00:05:29 -There are a few changes like: - -80 -00:05:30 --> 00:05:34 -The header file as "iostream" in place of "stdio.h". - -81 -00:05:35 --> 00:05:38 -Here we have included the using statement - -82 -00:05:39 --> 00:05:40 -Using namespace std. - -83 -00:05:41 --> 00:05:45 -And the cout and cin function in place of printf and scanf. - -84 -00:05:46 --> 00:05:50 -You can see that the rest of the code is similar to our C program. - -85 -00:05:51 --> 00:05:52 -Let’s execute the code. - -86 -00:05:53 --> 00:05:55 -Come back to the terminal. - -87 -00:05:56 --> 00:06:06 -Type g++ space nested-if.cpp space -o space nested1. Press Enter. - -88 -00:06:07 --> 00:06:10 -Type ./nested1. Press Enter. - -89 -00:06:11 --> 00:06:15 -Enter a number between 0 to 39. I will enter 40. - -90 -00:06:16 --> 00:06:19 -The output is displayed as: “number not in range” - -91 -00:06:20 --> 00:06:23 -Now let’s see the switch program in C++. - -92 -00:06:24 --> 00:06:26 -Come back to our text editor. - -93 -00:06:27 --> 00:06:30 -Here also the logic and implementation are same. - -94 -00:06:31 --> 00:06:33 -You can see that the header file is iostream. - -95 -00:06:34 --> 00:06:36 -Here is the using statement. - -96 -00:06:37 --> 00:06:40 -And we have changed the cout and cin function. - -97 -00:06:41 --> 00:06:44 -Rest of the code is similar to our switch.c program. - -98 -00:06:45 --> 00:06:47 -Let us execute.Come back to our terminal. - -99 -00:06:48 --> 00:06:57 -Type g++ space switch.cpp space -o space switch1. Press Enter. - -100 -00:06:58 --> 00:07:01 -Type ./switch1. Press Enter. - -101 -00:07:02 --> 00:07:04 -Enter a number between 0 to 39. - -102 -00:07:05 --> 00:07:08 -I will enter 25. - -103 -00:07:09 --> 00:07:10 -The output is displayed as: - -104 -00:07:11 --> 00:07:14 -“you have entered the number in the range of 20-29” - -105 -00:07:15 --> 00:07:17 -Now let us switch back to our slides. - -106 -00:07:18 --> 00:07:22 -We will see the comparison between switch and nested-if statements. - -107 -00:07:23 --> 00:07:27 -Switch statement is evaluated according to the result of the expression. - -108 -00:07:28 --> 00:07:33 -Netsed-if statement is run only if the result of the expression is true. - -109 -00:07:34 --> 00:07:38 -In switch, we treat various values of the variable as cases. - -110 -00:07:39 --> 00:07:44 -In nested-if we have to write the conditional statement for each value of the variable. - -111 -00:07:45 --> 00:07:49 -Switch statement can only check the integer values. - -112 -00:07:50 --> 00:07:54 -Nested if can check for both, integer and fractional values. - -113 -00:07:55 --> 00:07:57 -This brings us to the end of this tutorial. - -114 -00:07:58 --> 00:07:59 -Let us summarize. - -115 -00:08:00 --> 00:08:07 -In this tutorial, we learnt * 'nested if' statement. e.g. else if( y/10 equals to 0) - -116 -00:08:08 --> 00:08:11 -switch statement. e.g. switch(x) and - -117 -00:08:12 --> 00:08:15 -Difference between nested-if and switch statements. - -118 -00:08:16 --> 00:08:22 -As an assignment,write a program to check whether the age of the employee is between 20 to 60. - -119 -00:08:23 --> 00:08:25 -Watch the video available at the link shown http://spoken-tutorial.org /What\_is\_a\_Spoken\_Tutorial. - -120 -00:08:26 --> 00:08:28 -It summarizes the Spoken Tutorial project. - -121 -00:08:29 --> 00:08:32 -If you do not have good bandwidth, you can download and watch it. - -122 -00:08:33 --> 00:08:37 -The Spoken Tutorial Project Team, Conducts workshops using spoken tutorials. - -123 -00:08:38 --> 00:08:41 -Gives certificates to those who pass an online test. - -124 -00:08:42 --> 00:08:48 -For more details please write to contact @spoken-tutorial.org - -125 -00:08:49 --> 00:08:51 -Spoken Tutorial Project is a part of the Talk to a Teacher project. - -126 -00:08:52 --> 00:08:57 -It is supported by the National Mission on Education through ICT, MHRD, Government of India. - -127 -00:08:58 --> 00:09:03 -More information on this Mission is available at: http://spoken-tutorial.org\NMEICT-Intro. - -128 -00:09:04 --> 00:09:09 -The script is contributed by Chaitanya Mokashi. This is Ashwini patil from IIT Bombay signing off. Thank you for joining. - diff --git a/media/videos/43/435/Increment-And-Decrement-Operators-English.srt b/media/videos/43/435/Increment-And-Decrement-Operators-English.srt deleted file mode 100644 index 3b4bdb3..0000000 --- a/media/videos/43/435/Increment-And-Decrement-Operators-English.srt +++ /dev/null @@ -1,510 +0,0 @@ -Narration - -1 -00:00:01 --> 00:00:07 -Welcome to the spoken tutorial on Increment and Decrement Operators in C and C++. - -2 -00:00:08 --> 00:00:09 -In this tutorial, we will learn about: - -3 -00:00:10 --> 00:00:11 -Increment and decrement operators. - -4 -00:00:12 --> 00:00:17 -'++' eg. a++ which is postfix increment operator. - -5 -00:00:18 --> 00:00:21 -++a which is prefix increment operator. - -6 -00:00:22 --> 00:00:26 -'--' eg. a-- is a postfix decrement operator. - -7 -00:00:27 --> 00:00:30 ---a is a prefix decrement operator. - -8 -00:00:31 --> 00:00:34 -We will also learn about Typecasting. - -9 -00:00:35 --> 00:00:39 -To record this tutorial, I am using: Ubuntu 11.10 as the operating system, - -10 -00:00:40 --> 00:00:47 -gcc and g++ Compiler version 4.6.1 in Ubuntu. - -11 -00:00:48 --> 00:00:53 -The ++ operator increases the existing value of the operand by one. - -12 -00:00:54 --> 00:00:59 -a++ and ++a are equivalent to a = a + 1. - -13 -00:01:00 --> 00:01:05 -The -- operator decreases the existing value of the operand by one. - -14 -00:01:06 --> 00:01:12 -a-- and --a are equivalent to a = a - 1. - -15 -00:01:13 --> 00:01:18 -I will now demonstrate the use of increment and decrement operators with the help of a C program. - -16 -00:01:19 --> 00:01:24 -I have already made the program, so I'll explain the code. - -17 -00:01:25 --> 00:01:29 -Here, we have the code for increment and decrement operators in C. - -18 -00:01:30 --> 00:01:34 -Here, I have taken an integer variable a that holds the value 1. - -19 -00:01:35 --> 00:01:38 -This way we will be able to observe the changes in the value of a. - -20 -00:01:39 --> 00:01:46 -It will thus give us a better idea about the working of the operators. - -21 -00:01:47 --> 00:01:50 -Let's see how the postfix increment operator works. - -22 -00:01:51 --> 00:01:54 -The output of this printf statement is 1. - -23 -00:01:55 --> 00:01:56 -The value won't change. - -24 -00:01:57 --> 00:02:03 -This is because the postfix operation occurs after the operand is evaluated. - -25 -00:02:04 --> 00:02:09 -If an operation is performed on a++, it is performed on the current value of a. - -26 -00:02:10 --> 00:02:16 -After that the value of a is incremented. - -27 -00:02:17 --> 00:02:26 -Now if we see the value of a here, it has been incremented by 1. - -28 -00:02:27 --> 00:02:34 -We again initialize 'a' to 1 so as to reflect on the changes. - -29 -00:02:35 --> 00:02:37 -We now come to the prefix increment operators. - -30 -00:02:38 --> 00:02:41 -This printf statement prints 2 on the screen. - -31 -00:02:42 --> 00:02:48 -This is because a prefix operation occurs before the operand is evaluated. - -32 -00:02:49 --> 00:02:57 -So the value of 'a' is first incremented by 1 and then it is printed. - -33 -00:02:58 --> 00:03:02 -We again print a's value to see that there are no further changes. - -34 -00:03:03 --> 00:03:06 -Now let's check by executing this code. - -35 -00:03:07 --> 00:03:18 -I will comment out the following lines. Type /*, */ - -36 -00:03:19 --> 00:03:21 -Click on Save. - -37 -00:03:22 --> 00:03:28 -I have saved my file as incrdecr.c. - -38 -00:03:29 --> 00:03:34 -Open the terminal window by pressing Ctrl, Alt and T keys simultaneously. - -39 -00:03:35 --> 00:03:50 -To compile, type the following on the terminal; gcc space incrdecr dot c space minus o space incr. Press Enter. - -40 -00:03:51 --> 00:03:58 -To execute the code, type ./incr (dot slash incr). Press enter. - -41 -00:03:59 --> 00:04:00 -The output is displayed on the screen. - -42 -00:04:01 --> 00:04:05 -This is the output when you print a++. - -43 -00:04:06 --> 00:04:08 -This is the output when you print ++a. - -44 -00:04:09 --> 00:04:12 -We can see that the result is as discussed before. - -45 -00:04:13 --> 00:04:15 -Now Coming back to the rest of the program. - -46 -00:04:16 --> 00:04:20 -I will now explain the postfix and prefix decrement operators. - -47 -00:04:21 --> 00:04:28 -Remove the multi-line comments from here and here . - -48 -00:04:29 --> 00:04:34 -We now again assign the value of 1 to a. - -49 -00:04:35 --> 00:04:39 -This printf statement outputs the value of 1 as explained previously. - -50 -00:04:40 --> 00:04:46 -a's value will be decremented after a-- is evaluated as it is a postfix expression. - -51 -00:04:47 --> 00:04:50 -The next statement prints a's value as o. - -52 -00:04:51 --> 00:04:53 -a's value has now being decremented by 1. - -53 -00:04:54 --> 00:04:57 -We now have the prefix decrement operator. - -54 -00:04:58 --> 00:04:59 -Output of this printf statement would be 0. - -55 -00:05:00 --> 00:05:04 -As it is a prefix operation. - -56 -00:05:05 --> 00:05:08 -The prefix operation occurs before the operand is evaluated. - -57 -00:05:09 --> 00:05:10 -This printf statements output is 0. - -58 -00:05:11 --> 00:05:14 -No further changes have been made to a's value. - -59 -00:05:15 --> 00:05:20 -Type return 0; and close the ending curly bracket. - -60 -00:05:21 --> 00:05:23 -Click on Save. - -61 -00:05:24 --> 00:05:26 -Switch back to the terminal. - -62 -00:05:27 --> 00:05:41 -To compile, type the following on the terminal; gcc space incrdecr dot c space minus o space incr. Press Enter. - -63 -00:05:42 --> 00:05:51 -To execute, type ./incr. Press Enter. - -64 -00:05:52 --> 00:05:55 -This is the output when you print a--. - -65 -00:05:56 --> 00:05:58 -This is the output when you print --a. - -66 -00:05:59 --> 00:06:04 -So, now we see how the increment and decrement operator work. - -67 -00:06:05 --> 00:06:06 -If we want to write the same program in C++, - -68 -00:06:07 --> 00:06:09 -I can make a few changes to the above C code. - -69 -00:06:10 --> 00:06:12 -Let me go back to the editor. - -70 -00:06:13 --> 00:06:15 -Here is the C++ file with the necessary code. - -71 -00:06:16 --> 00:06:19 -Notice that the header is different from the C file header. - -72 -00:06:20 --> 00:06:23 -We have the using namespace statement also. - -73 -00:06:24 --> 00:06:27 -Also note that the output statement in C++ is cout. - -74 -00:06:28 --> 00:06:32 -So, apart from these differences, the two codes are very similar. - -75 -00:06:33 --> 00:06:39 -Save the file. The file is saved with an extension .cpp. - -76 -00:06:40 --> 00:06:41 -Let's compile the code. - -77 -00:06:42 --> 00:06:59 -Open the terminal and type g++ space incrdecr dot cpp space minus o space incr. Press Enter. - -78 -00:07:00 --> 00:07:06 -To execute, type ./ incr (dot slash incr). Press Enter. - -79 -00:07:07 --> 00:07:09 -The output is displayed on the screen. - -80 -00:07:10 --> 00:07:14 -So, we see the output is identical to the C program. - -81 -00:07:15 --> 00:07:16 -We now have the concept of typecasting. - -82 -00:07:17 --> 00:07:21 -It is implemented the same way in both C and C++. - -83 -00:07:22 --> 00:07:26 -Typecasting is used to make a variable of one type, act like another type. - -84 -00:07:27 --> 00:07:32 -Typecasting is done by enclosing the data type, you want, within parentheses. - -85 -00:07:33 --> 00:07:37 -This cast is put in front of the variable you want to cast. - -86 -00:07:38 --> 00:07:41 -This typecast is valid for one single operation only. - -87 -00:07:42 --> 00:07:46 -Now a' will behave as a float variable, for a single operation. - -88 -00:07:47 --> 00:07:49 -Here is an example that I have already created. - -89 -00:07:50 --> 00:07:53 -I shall now explain the code. - -90 -00:07:54 --> 00:07:59 -We first declare variables a and b as integers and c as float. - -91 -00:08:00 --> 00:08:05 -a is assigned the value of 5. b is assigned the value of 2. - -92 -00:08:06 --> 00:08:09 -We will perform operations on a and b. - -93 -00:08:10 --> 00:08:13 -We divide a by b. The result of division is stored in c. - -94 -00:08:14 --> 00:08:19 -We have used %.2f to denote a precision of 2 decimal places. - -95 -00:08:20 --> 00:08:24 -The result displayed will be 2.00 against the expected result of 2.50. - -96 -00:08:25 --> 00:08:30 -The fractional part has been truncated as both the operands a and b are integers. - -97 -00:08:31 --> 00:08:34 -To perform real division, one of the operands will have to be typecast to float. - -98 -00:08:35 --> 00:08:40 -Here we are typecasting a to float. c now holds the value of real division. - -99 -00:08:41 --> 00:08:46 -Now the result of real division is displayed. The answer is 2.50 as expected. - -100 -00:08:47 --> 00:08:50 -Type return 0; and close the ending curly bracket. - -101 -00:08:51 --> 00:08:54 -Click on Save. Save the file with .c (dot c) extension. - -102 -00:08:55 --> 00:08:58 -I have saved my file as typecast.c. - -103 -00:08:59 --> 00:09:00 -Open the terminal. - -104 -00:09:01 --> 00:09:16 -To compile, type gcc space typecast dot c space minus o space type. Press Enter. - -105 -00:09:17 --> 00:09:24 -To execute, type ./type. Press Enter. - -106 -00:09:25 --> 00:09:26 -The output is displayed on the screen. - -107 -00:09:27 --> 00:09:31 -Looking at the two values we see the effects of typecasting. - -108 -00:09:32 --> 00:09:33 -We will summarize the tutorial now. - -109 -00:09:34 --> 00:09:35 -In this tutorial we learnt- - -110 -00:09:36 --> 00:09:39 -how to use the increment and decrement operators, - -111 -00:09:40 --> 00:09:43 -we learnt about the forms, Postfix and Prefix, - -112 -00:09:44 --> 00:09:46 -also we learnt about typecasting and how it is used. - -113 -00:09:47 --> 00:09:48 -As an assignment: - -114 -00:09:49 --> 00:09:55 -Write a program to solve the following expression, a divided by b plus c divided by d. - -115 -00:09:56 --> 00:10:00 -The values of a, b, c and d are taken as input from the user. - -116 -00:10:01 --> 00:10:04 -Use typecasting to perform real division. - -117 -00:10:05 --> 00:10:07 -Watch the video available at the following link. - -118 -00:10:08 --> 00:10:09 -It summarizes the Spoken Tutorial project. - -119 -00:10:10 --> 00:10:14 -If you do not have good bandwidth, you can download and watch it. - -120 -00:10:15 --> 00:10:16 -The Spoken Tutorial Project Team: - -121 -00:10:17 --> 00:10:19 -Conducts workshops using spoken tutorials. - -122 -00:10:20 --> 00:10:23 -Gives certificates for those who pass an online test. - -123 -00:10:24 --> 00:10:32 -For more details, please write to contact at spoken hyphen tutorial dot org. - -124 -00:10:33 --> 00:10:36 -Spoken Tutorial Project is a part of the Talk to a Teacher project. - -125 -00:10:37 --> 00:10:43 -It is supported by the National Mission on Education through ICT, MHRD, Government of India. - -126 -00:10:44 --> 00:10:54 -More information on this mission is available at spoken hyphen tutorial dot org slash NMEICT hyphen Intro. - -127 -00:10:55 --> 00:11:00 -This is Ritwik Joshi from IIT Bombay.Thank you for joining. - diff --git a/media/videos/43/437/Relational-Operators-English.srt b/media/videos/43/437/Relational-Operators-English.srt deleted file mode 100644 index 0ba5eb4..0000000 --- a/media/videos/43/437/Relational-Operators-English.srt +++ /dev/null @@ -1,574 +0,0 @@ -Narration - -1 -00:00:01 --> 00:00:05 -Welcome to the spoken tutorial on Relational Operators in C and C++. - -2 -00:00:06 --> 00:00:08 -In this tutorial, we will learn about: - -3 -00:00:09 --> 00:00:10 -Relational operators like, - -4 -00:00:11 --> 00:00:13 -Less than: e.g. a < b - -5 -00:00:14 --> 00:00:16 -Greater than: e.g. a > b - -6 -00:00:17 --> 00:00:21 -Less than or equal to: e.g. a <= b - -7 -00:00:22 --> 00:00:26 -Greater than or equal to: e.g. a >= b - -8 -00:00:27 --> 00:00:29 -Equal to: e.g. a == b - -9 -00:00:30 --> 00:00:36 -Not equal to: e.g. a != b - -10 -00:00:37 --> 00:00:41 -To record this tutorial, I am using: Ubuntu 11.10 as the operating system, - -11 -00:00:42 --> 00:00:49 -gcc and g++ Compiler version 4.6.1 in Ubuntu. - -12 -00:00:50 --> 00:00:52 -Let us begin with an introduction. - -13 -00:00:53 --> 00:00:56 -Relational operators are used to compare integer and floating point numbers. - -14 -00:00:57 --> 00:01:03 -Expressions using relational operators return 0 for false and 1 for true. - -15 -00:01:04 --> 00:01:08 -Now I will demonstrate the relational operators with the help of a C program. - -16 -00:01:09 --> 00:01:10 -I have already made the program. - -17 -00:01:11 --> 00:01:14 -So, I'll open the editor and explain the code. - -18 -00:01:15 --> 00:01:19 -First, we declare two variables a and b. - -19 -00:01:20 --> 00:01:25 -This printf statement prompts the user to enter the values of a and b. - -20 -00:01:26 --> 00:01:31 -This scanf statement takes input for the variables a and b. - -21 -00:01:32 --> 00:01:34 -Now we have the greater than (>) operator. - -22 -00:01:35 --> 00:01:37 -This operator compares the two operands on either side of the operator. - -23 -00:01:38 --> 00:01:42 -It returns True if a is greater than b. - -24 -00:01:43 --> 00:01:46 -This printf statement is executed if the above condition is true. - -25 -00:01:47 --> 00:01:49 -If the above condition is false then it is skipped. - -26 -00:01:50 --> 00:01:52 -The control then jumps to the next statement. - -27 -00:01:53 --> 00:01:55 -We now have the less than (<) operator. - -28 -00:01:56 --> 00:01:56 -This too compares the operands. - -29 -00:01:57 --> 00:02:01 -It returns true when a is less than b. - -30 -00:02:02 --> 00:02:05 -This printf statement is executed if the above condition is true. - -31 -00:02:06 --> 00:02:08 -It is skipped otherwise. - -32 -00:02:09 --> 00:02:12 -Let's execute the code till here. - -33 -00:02:13 --> 00:02:15 -First comment out the following. - -34 -00:02:16 --> 00:02:20 -Type /* (slash asterisk) - -35 -00:02:21 --> 00:02:23 -*/ (asterisk slash). - -36 -00:02:24 --> 00:02:25 -Click on Save. - -37 -00:02:26 --> 00:02:28 -I have saved my file as relational.c. - -38 -00:02:29 --> 00:02:34 -Open the terminal window by pressing Ctrl, Alt and T keys simultaneously. - -39 -00:02:35 --> 00:02:48 -To compile, type the following on the terminal gcc space relational dot c space -o space rel. - -40 -00:02:49 --> 00:02:50 -Press Enter. - -41 -00:02:51 --> 00:02:55 -To execute, type ./rel (dot slash rel). Press Enter. - -42 -00:02:56 --> 00:03:00 -I enter a as 8 and b as 3. - -43 -00:03:01 --> 00:03:02 -The output is displayed: - -44 -00:03:03 --> 00:03:06 -8 is greater than 3. - -45 -00:03:07 --> 00:03:10 -You can try executing this code with different values of a and b. - -46 -00:03:11 --> 00:03:13 -Coming back to the code. - -47 -00:03:14 --> 00:03:17 -Delete the comment from here - -48 -00:03:18 --> 00:03:23 -and put it here. - -49 -00:03:24 --> 00:03:27 -Now we have the less than or equal to (<=) operator. - -50 -00:03:28 --> 00:03:32 -This operator compares the two operands on either side of the operator. - -51 -00:03:33 --> 00:03:37 -It returns true if a is less than or equal to b. - -52 -00:03:38 --> 00:03:41 -This printf statement is executed if the above condition is true. - -53 -00:03:42 --> 00:03:44 -If the above condition is false then it is skipped. - -54 -00:03:45 --> 00:03:48 -The control then jumps to the next statement. - -55 -00:03:49 --> 00:03:51 -Next comes the greater than or equal to (>=) operator. - -56 -00:03:52 --> 00:03:59 -It compares a and b and returns true if a is greater than or equal to b. - -57 -00:04:00 --> 00:04:04 -If the condition is true then this printf statement will be executed. - -58 -00:04:05 --> 00:04:06 -Now let's execute the code till here. - -59 -00:04:07 --> 00:04:08 -Click on Save. - -60 -00:04:09 --> 00:04:11 -Switch back to the terminal. - -61 -00:04:12 --> 00:04:16 -Compile and execute as before. - -62 -00:04:17 --> 00:04:21 -I enter a as 8 and b as 3. - -63 -00:04:22 --> 00:04:24 -The output is displayed: - -64 -00:04:25 --> 00:04:29 -8 is greater than or equal to 3 - -65 -00:04:30 --> 00:04:32 -Now Coming back to rest of the code. - -66 -00:04:33 --> 00:04:38 -Delete the multiline comments from here - -67 -00:04:39 --> 00:04:42 -and here. - -68 -00:04:43 --> 00:04:46 -We now have the equal to operator. - -69 -00:04:47 --> 00:04:49 -It is denoted by double equal signs (==). - -70 -00:04:50 --> 00:04:56 -This operator returns true when both operands are equal to one another. - -71 -00:04:57 --> 00:04:59 -This printf statement executes when a is equal to b. - -72 -00:05:00 --> 00:05:05 -If not, the control then jumps on to the next statement. - -73 -00:05:06 --> 00:05:07 -Similarly, we have the not equal to operator. - -74 -00:05:08 --> 00:05:14 -This operator returns true when the operands are not equal to one another. - -75 -00:05:15 --> 00:05:19 -This printf statement will execute when a is not equal to b. - -76 -00:05:20 --> 00:05:23 -Coming to the end of the program. return 0; - -77 -00:05:24 --> 00:05:25 -Click on Save. - -78 -00:05:26 --> 00:05:27 -Switch back to the terminal. - -79 -00:05:28 --> 00:05:31 -Compile and execute as before. - -80 -00:05:32 --> 00:05:37 -Enter a as 8 and b as 3. - -81 -00:05:38 --> 00:05:39 -The output is displayed on the screen: - -82 -00:05:40 --> 00:05:43 -8 is not equal to 3 - -83 -00:05:44 --> 00:05:47 -So, we see how the relational operators work. - -84 -00:05:48 --> 00:05:50 -Try executing this code with different set of inputs. - -85 -00:05:51 --> 00:05:55 -Now, writing a similar program in C++ is quite easy. - -86 -00:05:56 --> 00:05:58 -There are a few differences in the syntax. - -87 -00:05:59 --> 00:06:03 -I have already made the code in C++. - -88 -00:06:04 --> 00:06:07 -Here is the code for relational operators in C++. - -89 -00:06:08 --> 00:06:11 -Notice that the header is different. - -90 -00:06:12 --> 00:06:14 -Also we have the using statement here. - -91 -00:06:15 --> 00:06:18 -The output statement in C++ is cout. - -92 -00:06:19 --> 00:06:21 -And the input statement in C++ is cin. - -93 -00:06:22 --> 00:06:25 -So, apart from these differences, the two codes are very similar. - -94 -00:06:26 --> 00:06:27 -Click on Save. - -95 -00:06:28 --> 00:06:31 -Please make sure the file is saved with the extension .cpp. - -96 -00:06:32 --> 00:06:36 -I have saved my file as relational.cpp. - -97 -00:06:37 --> 00:06:38 -Let's compile the code. - -98 -00:06:39 --> 00:06:49 -Open the terminal and type g++ relational.cpp space minus o space rel1 - -99 -00:06:50 --> 00:06:55 -To execute, type ./rel1 (dot slash rel1), press Enter. - -100 -00:06:56 --> 00:06:59 -I enter a as 8 and b as 3. - -101 -00:07:00 --> 00:07:01 -The output is displayed: - -102 -00:07:02 --> 00:07:06 -We see that the output is same as the one in C program. - -103 -00:07:07 --> 00:07:09 -Now let us see an error which we can come across. - -104 -00:07:10 --> 00:07:12 -Come back to the program. - -105 -00:07:13 --> 00:07:18 -Suppose here we replace the 'double equal to' sign with the 'single equal to'. - -106 -00:07:19 --> 00:07:20 -Click on Save. - -107 -00:07:21 --> 00:07:22 -Come back to the terminal. - -108 -00:07:23 --> 00:07:32 -Compile and execute as before. - -109 -00:07:33 --> 00:07:36 -Here we see it is showing 3 is equal to 3. - -110 -00:07:37 --> 00:07:39 -Come back to our program. - -111 -00:07:40 --> 00:07:42 -This is because here we have an assignment operator. - -112 -00:07:43 --> 00:07:45 -So value of b is assigned to a. - -113 -00:07:46 --> 00:07:48 -Now, let us fix this error. - -114 -00:07:49 --> 00:07:50 -Type an equal to sign. - -115 -00:07:51 --> 00:07:53 -Click on Save. - -116 -00:07:54 --> 00:07:55 -Switch back to the terminal. - -117 -00:07:56 --> 00:08:03 -Compile and execute as before. - -118 -00:08:04 --> 00:08:05 -The output is now correct. - -119 -00:08:06 --> 00:08:07 -Let's summarize the tutorial. - -120 -00:08:08 --> 00:08:09 -In this tutorial, we learnt - -121 -00:08:10 --> 00:08:11 -relational operators like: - -122 -00:08:12 --> 00:08:13 -Less than: e.g. a < b - -123 -00:08:14 --> 00:08:16 -Greater than: e.g. a>b - -124 -00:08:17 --> 00:08:21 -Less than or equal to: e.g. a<=b - -125 -00:08:22 --> 00:08:26 -Greater than or equal to: e.g. a>=b - -126 -00:08:27 --> 00:08:28 -Equal to: e.g. a==b - -127 -00:08:29 --> 00:08:33 -Not equal to: e.g. a!=b - -128 -00:08:34 --> 00:08:34 -As an assignment: - -129 -00:08:35 --> 00:08:38 -Write a program that takes the marks of three students as input. - -130 -00:08:39 --> 00:08:42 -Compare the marks to see which student has scored the highest. - -131 -00:08:43 --> 00:08:47 -Check also if two or more students have scored equal marks. - -132 -00:08:48 --> 00:08:50 -Watch the video available at the following link. - -133 -00:08:51 --> 00:08:53 -It summarizes the Spoken Tutorial project. - -134 -00:08:54 --> 00:08:57 -If you do not have good bandwidth, you can download and watch it. - -135 -00:08:58 --> 00:08:59 -The Spoken Tutorial Project Team: - -136 -00:09:00 --> 00:09:02 -Conducts workshops using spoken tutorials. - -137 -00:09:03 --> 00:09:05 -Gives certificates for those who pass an online test. - -138 -00:09:06 --> 00:09:13 -For more details, please write to contact at spoken hyphen tutorial dot org. - -139 -00:09:14 --> 00:09:17 -Spoken Tutorial Project is a part of the Talk to a Teacher project. - -140 -00:09:18 --> 00:09:23 -It is supported by the National Mission on Education through ICT, MHRD, Government of India. - -141 -00:09:24 --> 00:09:26 -More information on this Mission is available at - -142 -00:09:27 --> 00:09:33 -spoken hyphen tutorial dot org slash NMEICT hyphen Intro. - -143 -00:09:34 --> 00:09:39 -This is Ritwik Joshi from IIT Bombay.Thank you for joining. - diff --git a/media/videos/43/439/Loops-English.srt b/media/videos/43/439/Loops-English.srt deleted file mode 100644 index 4f719b9..0000000 --- a/media/videos/43/439/Loops-English.srt +++ /dev/null @@ -1,654 +0,0 @@ -Narration - -1 -00:00:01 --> 00:00:05 -Welcome to the spoken tutorial on Loops in C and C++. - -2 -00:00:06 --> 00:00:08 -In this tutorial we will learn, - -3 -00:00:09 --> 00:00:11 -for loop,while loop and - -4 -00:00:12 --> 00:00:16 -do…while loop. We will do this with the help of some examples. - -5 -00:00:17 --> 00:00:20 -We will also see some common errors and their solutions. - -6 -00:00:21 --> 00:00:23 -To record this tutorial, I am using - -7 -00:00:24 --> 00:00:27 -Ubuntu Operating System version 11.04, - -8 -00:00:28 --> 00:00:33 -gcc and g++ Compiler version 4.6.1 on Ubuntu. - -9 -00:00:34 --> 00:00:37 -Let us start with the introduction to loops. - -10 -00:00:38 --> 00:00:43 -Loops are used to execute a group of instructions repeatedly. - -11 -00:00:44 --> 00:00:47 -Depending on the purpose they are divided into three types: - -12 -00:00:48 --> 00:00:50 -while loop do…..while loop and - -13 -00:00:51 --> 00:00:55 -for loop Let us start with the while loop first. - -14 -00:00:56 --> 00:00:59 -A while loop tests the condition in the beginning. - -15 -00:01:00 --> 00:01:02 -The structure is: while ( condition ) - -16 -00:01:03 --> 00:01:06 -within the bracket statement block. - -17 -00:01:07 --> 00:01:08 -Now move on to do….while loop . - -18 -00:01:09 --> 00:01:14 -A do..while loop is executed at least once before the condition could be validated. - -19 -00:01:15 --> 00:01:16 -The structure is: - -20 -00:01:17 --> 00:01:19 -do (within the brackets) statement block, - -21 -00:01:20 --> 00:01:22 -after the bracket the while ( condition ). - -22 -00:01:23 --> 00:01:26 -You can see that the condition is checked at the end. - -23 -00:01:27 --> 00:01:31 -Now,let us see an example on while loop and do...while loop . - -24 -00:01:32 --> 00:01:34 -I have already typed the code on the editor. - -25 -00:01:35 --> 00:01:36 -Let me open it. - -26 -00:01:37 --> 00:01:40 -Note that our file name is while.c.. - -27 -00:01:41 --> 00:01:46 -Today we are going to learn addition of first 10 numbers using while loop. - -28 -00:01:47 --> 00:01:48 -Let me explain the code now. - -29 -00:01:49 --> 00:01:50 -This is our header file. - -30 -00:01:51 --> 00:01:58 -Inside the main() function we have declared two integer variables x and y and initialized to 0. - -31 -00:01:59 --> 00:02:01 -This is our while loop. - -32 -00:02:02 --> 00:02:05 -The condition of the while loop is x is less than or equal to 10. - -33 -00:02:06 --> 00:02:09 -Here the value of x is added to the value of y. - -34 -00:02:10 --> 00:02:14 -The value obtained after the addition is stored in y. - -35 -00:02:15 --> 00:02:17 -Then we print the value of y. - -36 -00:02:18 --> 00:02:19 -Here x is incremented. - -37 -00:02:20 --> 00:02:24 -That means the variable x is increased by one. - -38 -00:02:25 --> 00:02:26 -And this is our return statement. - -39 -00:02:27 --> 00:02:29 -Now,let us execute the program. - -40 -00:02:30 --> 00:02:38 -Please open the terminal window by pressing Ctrl, Alt and T keys simultaneously on your keyboard. - -41 -00:02:39 --> 00:02:44 -Type gcc space while dot c space hyphen o space while - -42 -00:02:45 --> 00:02:46 -Press Enter. - -43 -00:02:47 --> 00:02:51 -Type ./while (dot slash while). Press Enter. - -44 -00:02:52 --> 00:02:53 -The output is displayed. - -45 -00:02:54 --> 00:02:56 -Now lets us see the working of while loop. - -46 -00:02:57 --> 00:02:59 -Let me resize the window. - -47 -00:03:00 --> 00:03:03 -Here, first the value of x and y is 0. - -48 -00:03:04 --> 00:03:05 -This is our while condition. - -49 -00:03:06 --> 00:03:14 -Here we check whether x is less than or equal to 10 which means the values of x will be from 0 to 10. - -50 -00:03:15 --> 00:03:21 -Then we add y plus x (i.e) 0 plus 0, we get 0. - -51 -00:03:22 --> 00:03:26 -We print the value of y, here we get 0. - -52 -00:03:27 --> 00:03:32 -Then x is incremented which means now the value of x will be 1. - -53 -00:03:33 --> 00:03:43 -Then we will check the condition again, 1 is less than or equal to 10. If the condition is true then we will add the values, - -54 -00:03:44 --> 00:03:49 -y (i.e ) 0 plus x that is 1. 0 plus 1 is 1. - -55 -00:03:50 --> 00:03:52 -We print the value as 1. - -56 -00:03:53 --> 00:03:54 -Again x is incremented. - -57 -00:03:55 --> 00:03:58 -Now the value of x is 2. - -58 -00:03:59 --> 00:04:00 -We check the condition again. - -59 -00:04:01 --> 00:04:10 -2 is less than or equal to 10, if the condition is true then we will add the values, (i.e ) 1 plus 2 which will give 3. - -60 -00:04:11 --> 00:04:12 -We print the value as 3. - -61 -00:04:13 --> 00:04:19 -Like this, it will go on up to x is less than or equal to 10 (x<=10). - -62 -00:04:20 --> 00:04:23 -Now, we will see the same program using do….while loop . - -63 -00:04:24 --> 00:04:25 -Here is our program. - -64 -00:04:26 --> 00:04:30 -Note that our file name is do hyphen while dot c . - -65 -00:04:31 --> 00:04:34 -This part is already explained in the previous program. - -66 -00:04:35 --> 00:04:37 -So, let us move on to a do...while loop . - -67 -00:04:38 --> 00:04:43 -Here, first the body of the loop will be executed and then the condition is checked. - -68 -00:04:44 --> 00:04:51 -The value of x is added to the value of y and the value obtained after the addition is stored in y. - -69 -00:04:52 --> 00:04:54 -The logic is same as in while program. - -70 -00:04:55 --> 00:04:57 -Now let us execute the program. - -71 -00:04:58 --> 00:04:59 -Come back to our terminal. - -72 -00:05:00 --> 00:05:07 -Type gcc space do hyphen while dot c space hyphen o space do . Press Enter . - -73 -00:05:08 --> 00:05:11 -Type dot slash do (./do). Press Enter . - -74 -00:05:12 --> 00:05:15 -We can see that the output is similar to our while program. - -75 -00:05:16 --> 00:05:19 -Now, let us see the working of do...while loop . - -76 -00:05:20 --> 00:05:21 -Let me resize the window. - -77 -00:05:22 --> 00:05:24 -Here the value x and y is 0. - -78 -00:05:25 --> 00:05:28 -We add those values. Then we will get 0. - -79 -00:05:29 --> 00:05:30 -Now the value of y is 0. - -80 -00:05:31 --> 00:05:32 -We print the value as 0. - -81 -00:05:33 --> 00:05:41 -Then x is incremented by 1 which means now the value of x is 1, then the condition will be checked. - -82 -00:05:42 --> 00:05:44 -You can see that the body of loop is executed first. - -83 -00:05:45 --> 00:05:51 -Anyhow, if the condition is false then also we will get a value that is 0. - -84 -00:05:52 --> 00:05:55 -Now, here we will check whether 1 is less than or equal to 10. - -85 -00:05:56 --> 00:05:59 -The condition is true. Again we will add the values. - -86 -00:06:00 --> 00:06:01 -Now 0 plus 1. - -87 -00:06:02 --> 00:06:04 -Then we will print the value of y as 1. - -88 -00:06:05 --> 00:06:07 -Again x will be incremented. - -89 -00:06:08 --> 00:06:10 -Now the value of x is 2. - -90 -00:06:11 --> 00:06:14 -Then we check 2 is less than or equal to 10. - -91 -00:06:15 --> 00:06:16 -We will go back here. - -92 -00:06:17 --> 00:06:19 -Then we will add the values. 1 plus 2 is 3. - -93 -00:06:20 --> 00:06:22 -We print the value of y as 3. - -94 -00:06:23 --> 00:06:29 -Like this, the conditions will be checked till the value of x will be less than or equal to 10. - -95 -00:06:30 --> 00:06:32 -And this is our return statement. - -96 -00:06:33 --> 00:06:37 -Note that here the while condition ends with the semicolon. - -97 -00:06:38 --> 00:06:42 -In while loop the condition does not end with the semicolon. - -98 -00:06:43 --> 00:06:47 -Now let us see how to execute these programs in C++. - -99 -00:06:48 --> 00:06:51 -This is our while program in C++. - -100 -00:06:52 --> 00:06:55 -The logic and implementation are same as in our C program. - -101 -00:06:56 --> 00:07:03 -There are a few changes like the header file as iostream in place of stdio.h. - -102 -00:07:04 --> 00:07:15 -We have included the 'using' statement here using namespace std and here we have used the cout function in place of printf function. - -103 -00:07:16 --> 00:07:20 -The structure of while loop is same as in our C program. - -104 -00:07:21 --> 00:07:22 -Lets us execute the program. - -105 -00:07:23 --> 00:07:24 -Come back to a terminal. - -106 -00:07:25 --> 00:07:27 -Let me clear the prompt. - -107 -00:07:28 --> 00:07:37 -To execute, type g++ space while dot cpp space hyphen o space while1 . Press Enter . - -108 -00:07:38 --> 00:07:42 -Type dot slash while1 (./while1). Press Enter . - -109 -00:07:43 --> 00:07:47 -You can see that the output is similar to our while program in C. - -110 -00:07:48 --> 00:07:51 -Now let us see the do... while program in C++. - -111 -00:07:52 --> 00:07:53 -Come back to the text editor. - -112 -00:07:54 --> 00:08:02 -Here also there are similar changes like the header file , the using statement and the cout function. - -113 -00:08:03 --> 00:08:05 -Rest of the things are similar. - -114 -00:08:06 --> 00:08:07 -Lets us execute the program. - -115 -00:08:08 --> 00:08:09 -Come back to our terminal. - -116 -00:08:10 --> 00:08:18 -Type g++ space do hyphen while dot cpp space hyphen o space do1 . Press Enter . - -117 -00:08:19 --> 00:08:22 -Type dot slash do1 (./do1). Press Enter . - -118 -00:08:23 --> 00:08:27 -We can see that the output is similar to our do...while program in C. - -119 -00:08:28 --> 00:08:31 -Now we will see some common errors and their solutions. - -120 -00:08:32 --> 00:08:34 -Come back to our text editor. - -121 -00:08:35 --> 00:08:40 -Suppose, here I will not increment the value of x. - -122 -00:08:41 --> 00:08:43 -Click on Save Let us see what happens. - -123 -00:08:44 --> 00:08:46 -Come back to the terminal Let me clear the prompt. - -124 -00:08:47 --> 00:08:49 -Lets us execute the program. - -125 -00:08:50 --> 00:08:53 -Press the up-arrow key twice. - -126 -00:08:54 --> 00:08:56 -Again press the up-arrow key. - -127 -00:08:57 --> 00:08:58 -The output is displayed. - -128 -00:08:59 --> 00:09:06 -We can see number of zeros, this is because the loop does not have the terminating condition . - -129 -00:09:07 --> 00:09:09 -It is known as infinite loop. - -130 -00:09:10 --> 00:09:13 -Infinite loop can cause the system to become unresponsive. - -131 -00:09:14 --> 00:09:20 -It causes the program to consume all the processors time but it can be terminated. - -132 -00:09:21 --> 00:09:24 -Come back to our program, let us fix the error. - -133 -00:09:25 --> 00:09:27 -Type x++ and a semicolon. - -134 -00:09:28 --> 00:09:30 -Click on Save. Let us execute again. - -135 -00:09:31 --> 00:09:32 -Come back to terminal. - -136 -00:09:33 --> 00:09:37 -Press the up-arrow key. - -137 -00:09:38 --> 00:09:39 -Yes, it is working. - -138 -00:09:40 --> 00:09:42 -This brings us to the end of this tutorial. - -139 -00:09:43 --> 00:09:44 -We will move back to our slides. - -140 -00:09:45 --> 00:09:46 -Let us summarize. - -141 -00:09:47 --> 00:09:49 -In this tutorial we learned, - -142 -00:09:50 --> 00:09:53 -while loop example. while(x is less than or equal to 10) - -143 -00:09:54 --> 00:09:55 -do….while loop . - -144 -00:09:56 --> 00:09:58 -example. do statement block and - -145 -00:09:59 --> 00:10:00 -while condition at the end. - -146 -00:10:01 --> 00:10:02 -As an assignment, - -147 -00:10:03 --> 00:10:06 -write a program to print the following, using for loops. - -148 -00:10:07 --> 00:10:09 -0 to 9. - -149 -00:10:10 --> 00:10:11 -The syntax of the for loop is - -150 -00:10:12 --> 00:10:19 -for (variable initialization; variable condition; and variable increment or decrement) - -151 -00:10:20 --> 00:10:23 -and here will be the body of the loop. - -152 -00:10:24 --> 00:10:26 -Watch the video available at the link shown below. - -153 -00:10:27 --> 00:10:29 -It summarizes the Spoken Tutorial project. - -154 -00:10:30 --> 00:10:32 -If you do not have good bandwidth, you can download and watch it. - -155 -00:10:33 --> 00:10:34 -The Spoken Tutorial Project Team: - -156 -00:10:35 --> 00:10:37 -Conducts workshops using spoken tutorials. - -157 -00:10:38 --> 00:10:41 -Gives certificates to those who pass an online test. - -158 -00:10:42 --> 00:10:46 -For more details, please write to contact@spoken-tutorial.org. - -159 -00:10:47 --> 00:10:50 -Spoken Tutorial Project is a part of Talk to a Teacher project. - -160 -00:10:51 --> 00:10:57 -It is supported by the National Mission on Education through ICT, MHRD, Government of India. - -161 -00:10:58 --> 00:11:01 -More information on this mission is available at the link shown below. - -162 -00:11:02 --> 00:11:07 -This script as been contributed by Dhawal Goyal. This is Ashwini Patil from IIT Bombay, signing off. - -163 -00:11:08 --> 00:11:13 -Thank You for joining. - diff --git a/media/videos/43/440/Arrays-English.srt b/media/videos/43/440/Arrays-English.srt deleted file mode 100644 index 5fcc67d..0000000 --- a/media/videos/43/440/Arrays-English.srt +++ /dev/null @@ -1,494 +0,0 @@ -Narration - -1 -00:00:01 --> 00:00:06 -Welcome to the spoken-tutorial on Arrays in C and C++. - -2 -00:00:07 --> 00:00:08 -In this tutorial we will learn: - -3 -00:00:09 --> 00:00:10 -What is an array - -4 -00:00:11 --> 00:00:12 -Declaration of an array - -5 -00:00:13 --> 00:00:15 -Initialization of an array - -6 -00:00:16 --> 00:00:17 -Few Examples on array. - -7 -00:00:18 --> 00:00:21 -We will also see some common errors and their solutions. - -8 -00:00:22 --> 00:00:24 -To record this tutorial, I am using - -9 -00:00:25 --> 00:00:29 -Ubuntu Operating System version 11.04, - -10 -00:00:30 --> 00:00:35 -gcc and g++ Compiler version 4.6.1 . - -11 -00:00:36 --> 00:00:38 -Let us start with the introduction to Array. - -12 -00:00:39 --> 00:00:43 -Array is the collection of data or elements of same data-type. - -13 -00:00:44 --> 00:00:47 -Array index starts from 0. - -14 -00:00:48 --> 00:00:51 -The first element is stored at index 0. - -15 -00:00:52 --> 00:00:54 -There are three types of arrays: - -16 -00:00:55 --> 00:00:56 -Single dimensional array - -17 -00:00:57 --> 00:00:58 -Two dimensional array and - -18 -00:00:59 --> 00:01:00 -Multi-dimensional array. - -19 -00:01:01 --> 00:01:05 -We will be discussing single dimensional array in this tutorial. - -20 -00:01:06 --> 00:01:08 -Let us see how to declare single dimensional array. - -21 -00:01:09 --> 00:01:10 -The Syntax for this is: - -22 -00:01:11 --> 00:01:15 -data-type name of the array and size - -23 -00:01:16 --> 00:01:23 -example, here we have declared an integer array 'star' which contains 5 elements. - -24 -00:01:24 --> 00:01:28 -The array index will start from star 0 to star 4. - -25 -00:01:29 --> 00:01:31 -We saw the declaration of an array. - -26 -00:01:32 --> 00:01:34 -Now, we will see the initialization of an array. - -27 -00:01:35 --> 00:01:37 -The Syntax for this is: - -28 -00:01:38 --> 00:01:43 -data-type,( name of the array ), size is equal to elements - -29 -00:01:44 --> 00:01:53 -example: here we have declared an 'integer array star' with size 3. The elements of the array are 1,2 and 3. - -30 -00:01:54 --> 00:01:58 -Here the index will start from star 0 to star 2. - -31 -00:01:59 --> 00:02:00 -Now, lets us move to the examples. - -32 -00:02:01 --> 00:02:03 -I have already typed the program on the editor. - -33 -00:02:04 --> 00:02:05 -So, let me open it. - -34 -00:02:06 --> 00:02:09 -Please note that our file name is array.c - -35 -00:02:10 --> 00:02:15 -In this program, we will calculate the sum of the elements stored in an array. - -36 -00:02:16 --> 00:02:17 -Let me explain the code now. - -37 -00:02:18 --> 00:02:19 -This is our header file. - -38 -00:02:20 --> 00:02:21 -This is our main() function. - -39 -00:02:22 --> 00:02:27 -Here, we have declared and initialized an array star with size 3. - -40 -00:02:28 --> 00:02:32 -The elements of the array are 4, 5 and 6. - -41 -00:02:33 --> 00:02:35 -Then we have declared an 'integer variable' sum. - -42 -00:02:36 --> 00:02:40 -Here we add the elements of the array and store the result in sum. - -43 -00:02:41 --> 00:02:49 -Note that 4 will be stored at index 0, 5 will be stored at index 1 and 6 will be stored at index 2. - -44 -00:02:50 --> 00:02:51 -Then we print the sum. - -45 -00:02:52 --> 00:02:53 -This is our return statement. - -46 -00:02:54 --> 00:02:56 -Now, click on Save. - -47 -00:02:57 --> 00:02:58 -Let us execute the program. - -48 -00:02:59 --> 00:03:08 -Please open the terminal window by pressing Ctrl, Alt and T keys simultaneously on your keyboard. - -49 -00:03:09 --> 00:03:18 -To compile, type gcc space array dot c space hypen o array and press Enter. - -50 -00:03:19 --> 00:03:23 -To execute, type dot slash array (./array). Press Enter. - -51 -00:03:24 --> 00:03:25 -Here the output is displayed as, - -52 -00:03:26 --> 00:03:27 -The sum is 15. - -53 -00:03:28 --> 00:03:31 -Now let us see some common errors which we can come across. - -54 -00:03:32 --> 00:03:33 -Come back to our program. - -55 -00:03:34 --> 00:03:38 -Suppose, here at line number 4, we miss the curly brackets. - -56 -00:03:39 --> 00:03:41 -Click on Save. Let us see what happens. - -57 -00:03:42 --> 00:03:43 -Come back to the terminal. - -58 -00:03:44 --> 00:03:46 -Let us compile as before. - -59 -00:03:47 --> 00:03:48 -We see an error: - -60 -00:03:49 --> 00:03:55 -Invalid initializer and Expected identifier or bracket before numeric constant. - -61 -00:03:56 --> 00:04:00 -This is because arrays must be initialized within curly brackets. - -62 -00:04:01 --> 00:04:03 -Come back to our program. Let us fix the error. - -63 -00:04:04 --> 00:04:08 -Type the curly brackets here at line number 4. - -64 -00:04:09 --> 00:04:11 -Now, click on Save. - -65 -00:04:12 --> 00:04:14 -Lets us execute. Come back to the terminal. - -66 -00:04:15 --> 00:04:18 -Let us compile as before. Let us execute as before. - -67 -00:04:19 --> 00:04:20 -Yes, it is working. - -68 -00:04:21 --> 00:04:24 -Now we will execute the same program in C++. - -69 -00:04:25 --> 00:04:27 -Come back to our program. - -70 -00:04:28 --> 00:04:29 -I will change a few things here. - -71 -00:04:30 --> 00:04:37 -First, press Shift , Ctrl and S keys simultaneously on your keyboard. - -72 -00:04:38 --> 00:04:43 -Now save the file with the extension dot cpp (.cpp) and click on Save. - -73 -00:04:44 --> 00:04:48 -Let us change the header file as iostream. - -74 -00:04:49 --> 00:04:54 -Now include the using statement. - -75 -00:04:55 --> 00:05:00 -The declaration and initialization of an array is same in C++. - -76 -00:05:01 --> 00:05:03 -Hence no need to change anything here. - -77 -00:05:04 --> 00:05:08 -Now replace the printf statement with the cout statement. - -78 -00:05:09 --> 00:05:16 -Delete the format specifier and backslash n (\n), now delete the comma and type two opening angle brackets. - -79 -00:05:17 --> 00:05:25 -Delete the bracket here. Again type two opening angle brackets and within the double quotes type backslash n (\n). - -80 -00:05:26 --> 00:05:28 -Now, click on Save. - -81 -00:05:29 --> 00:05:31 -Let us execute. Come back to a terminal. - -82 -00:05:32 --> 00:05:41 -To compile, type g++ space array dot cpp space hyphen o space array1 - -83 -00:05:42 --> 00:05:50 -Here we have array1 because we don't want to overwrite the output parameter array for the file array dot c. - -84 -00:05:51 --> 00:05:53 -Now press Enter. - -85 -00:05:54 --> 00:05:58 -To execute type, dot slash array1(./array1) . Press Enter. - -86 -00:05:59 --> 00:06:01 -The output is displayed as: The sum is 15 - -87 -00:06:02 --> 00:06:06 -We can see that it is similar to our C code. - -88 -00:06:07 --> 00:06:09 -Now, we will see another common error. - -89 -00:06:10 --> 00:06:11 -Come back to our program. - -90 -00:06:12 --> 00:06:13 -Suppose here, at line number 7, - -91 -00:06:14 --> 00:06:22 -I will type star[1], star[2] and star[3]; - -92 -00:06:23 --> 00:06:27 -click on Save.Let us execute. Come back to our terminal. - -93 -00:06:28 --> 00:06:29 -Let me clear the prompt. - -94 -00:06:30 --> 00:06:32 -Let us compile as before. - -95 -00:06:33 --> 00:06:35 -Let us execute as before. - -96 -00:06:36 --> 00:06:38 -We get an unexpected output. - -97 -00:06:39 --> 00:06:42 -This is because array index starts from 0. - -98 -00:06:43 --> 00:06:48 -Come back to our program. We can see here the array index starts from one. - -99 -00:06:49 --> 00:06:53 -Hence it is giving an error. Let us fix the error. - -100 -00:06:54 --> 00:07:01 -Type 0 here 1 and 2. Click on Save. - -101 -00:07:02 --> 00:07:04 -Let us execute. Come back to our terminal. - -102 -00:07:05 --> 00:07:08 -Let us compile as before. Execute as before. - -103 -00:07:09 --> 00:07:11 -Yes, it is working. - -104 -00:07:12 --> 00:07:13 -Now, we will go back to our slides. - -105 -00:07:14 --> 00:07:15 -Le us summarize. - -106 -00:07:16 --> 00:07:18 -In this tutorial we learned: - -107 -00:07:19 --> 00:07:22 -Arrays , To declare Single Dimensional Arrays - -108 -00:07:23 --> 00:07:25 -To initialize Single Dimensional Arrays - -109 -00:07:26 --> 00:07:30 -example int star[3]={4, 5, 6} - -110 -00:07:31 --> 00:07:39 -To add the elements of the array, example sum is equal to star 0 plus star 1 plus star 2. - -111 -00:07:40 --> 00:07:46 -As an assignment, write a program to calculate the difference of the elements stored in an array. - -112 -00:07:47 --> 00:07:49 -Watch the video available at the link shown below. - -113 -00:07:50 --> 00:07:52 -It summarizes the Spoken Tutorial project. - -114 -00:07:53 --> 00:07:56 -If you do not have good bandwidth, you can download and watch it. - -115 -00:07:57 --> 00:07:59 -The Spoken Tutorial Project Team: - -116 -00:08:00 --> 00:08:02 -Conducts workshops using spoken tutorials. - -117 -00:08:03 --> 00:08:05 -Gives certificates to those who pass an online test. - -118 -00:08:06 --> 00:08:12 -For more details, please write to, contact@spoken-tutorial.org. - -119 -00:08:13 --> 00:08:16 -Spoken Tutorial Project is a part of Talk to a Teacher project. - -120 -00:08:17 --> 00:08:24 -It is supported by the National Mission on Education through ICT, MHRD, Government of India. - -121 -00:08:25 --> 00:08:29 -More information on this mission is available at the link shown below. - -122 -00:08:30 --> 00:08:32 -This is Ashwini Patil from IIT Bombay, signing off. - -123 -00:08:33 --> 00:08:38 -Thank You for watching. - diff --git a/media/videos/43/445/Understanding-Pointers-English.srt b/media/videos/43/445/Understanding-Pointers-English.srt deleted file mode 100644 index 4a0eba2..0000000 --- a/media/videos/43/445/Understanding-Pointers-English.srt +++ /dev/null @@ -1,302 +0,0 @@ -Narration - -1 -00:00:01 --> 00:00:05 -Welcome to the spoken tutorial on Pointers in C and C++ . - -2 -00:00:06 --> 00:00:07 -In this tutorial we will learn: - -3 -00:00:08 --> 00:00:09 -Pointers - -4 -00:00:10 --> 00:00:11 -To create Pointers - -5 -00:00:12 --> 00:00:13 -And operations on Pointers. - -6 -00:00:14 --> 00:00:17 -We will do this with the help of an example. - -7 -00:00:18 --> 00:00:24 -To record this tutorial, I am using Ubuntu operating system version 11.10, - -8 -00:00:25 --> 00:00:30 -gcc and g++ compiler version 4.6.1 on Ubuntu. - -9 -00:00:31 --> 00:00:33 -Let us start with an introduction to pointers. - -10 -00:00:34 --> 00:00:37 -Pointers point to the locations in memory. - -11 -00:00:38 --> 00:00:40 -Pointers store the memory address. - -12 -00:00:41 --> 00:00:44 -It also gives value stored at that address. - -13 -00:00:45 --> 00:00:47 -Now, let us see an example on pointers. - -14 -00:00:48 --> 00:00:53 -Note that our file name is pointers_demo.c. - -15 -00:00:54 --> 00:00:55 -Let us go through the code now. - -16 -00:00:56 --> 00:00:59 -This is our header file as stdio.h. - -17 -00:01:00 --> 00:01:02 -This is our main() function. - -18 -00:01:03 --> 00:01:08 -Here we have long integer num, assigned value 10. - -19 -00:01:09 --> 00:01:11 -Then we have declared a pointer ptr. - -20 -00:01:12 --> 00:01:15 -Asterisk sign is used to declare a pointer. - -21 -00:01:16 --> 00:01:19 -This pointer can point to type long int. - -22 -00:01:20 --> 00:01:27 -In the 'printf' statement, ampersand is used for retrieving memory address of the variable. - -23 -00:01:28 --> 00:01:32 -So, ampersand num (&num) will give the memory address of num. - -24 -00:01:33 --> 00:01:36 -This statement will print the address of the variable num. - -25 -00:01:37 --> 00:01:40 -Over here, ptr stores the address of num. - -26 -00:01:41 --> 00:01:44 -This statement will print the address of ptr. - -27 -00:01:45 --> 00:01:48 -sizeof() function will give the size of ptr. - -28 -00:01:49 --> 00:01:50 -This is will give the value of ptr. - -29 -00:01:51 --> 00:01:53 -That is the memory address of num. - -30 -00:01:54 --> 00:01:58 -And here asterisk ptr will give the value at the address. - -31 -00:01:59 --> 00:02:02 -So, using asterisk will not give the memory address. - -32 -00:02:03 --> 00:02:05 -Instead it will give the value. - -33 -00:02:06 --> 00:02:09 -%ld is a format specifier for the long int. - -34 -00:02:10 --> 00:02:12 -Now, let us execute the program. - -35 -00:02:13 --> 00:02:20 -Open the terminal window by pressing Ctrl, Alt and T keys simultaneously on your keyboard. - -36 -00:02:21 --> 00:02:31 -To compile, type gcc space pointers underscore demo dot c space hyphen o space point - -37 -00:02:32 --> 00:02:33 -Press Enter. - -38 -00:02:34 --> 00:02:38 -Type dot slash point. Press Enter. - -39 -00:02:39 --> 00:02:41 -The output is displayed. - -40 -00:02:42 --> 00:02:47 -We see that the num address and ptr value is same - -41 -00:02:48 --> 00:02:52 -where as memory address of num and ptr are different. - -42 -00:02:53 --> 00:02:56 -Then the size of pointer is 8 bytes. - -43 -00:02:57 --> 00:03:02 -Also the value pointed by ptr is 10 which was assigned to num. - -44 -00:03:03 --> 00:03:06 -Now let us see the same program in C++. - -45 -00:03:07 --> 00:03:12 -Note that our file name is pointer underscore demo.cpp. - -46 -00:03:13 --> 00:03:18 -Here we have a few changes like the header file as iostream. - -47 -00:03:19 --> 00:03:22 -Then we are using the std namespace. - -48 -00:03:23 --> 00:03:27 -And here we have the cout function in place of printf() function. - -49 -00:03:28 --> 00:03:29 -Rest all the things are similar. - -50 -00:03:30 --> 00:03:33 -Let us execute the program. Come back to our terminal. - -51 -00:03:34 --> 00:03:49 -To compile, type g++ space pointers_demo.cpp space hyphen o space point1, press Enter. - -52 -00:03:50 --> 00:03:54 -Type dot slash point1, press Enter. - -53 -00:03:55 --> 00:03:59 -We can see that the output is similar to our C program. - -54 -00:04:00 --> 00:04:02 -This brings us to the end of this tutorial. - -55 -00:04:03 --> 00:04:04 -Come back to our slide. - -56 -00:04:05 --> 00:04:07 -Let us summarize.In this tutorial, we learnt: - -57 -00:04:08 --> 00:04:09 -About the pointer. - -58 -00:04:10 --> 00:04:11 -To create a pointer. - -59 -00:04:12 --> 00:04:13 -And operation on pointer. - -60 -00:04:14 --> 00:04:17 -As an assignment, write a C and C++ program - -61 -00:04:18 --> 00:04:20 -to declare a variable and pointer. - -62 -00:04:21 --> 00:04:23 -Store the address of variable in the pointer. - -63 -00:04:24 --> 00:04:26 -And print the value of the pointer. - -64 -00:04:27 --> 00:04:29 -Watch the video available at the link shown below. - -65 -00:04:30 --> 00:04:32 -It summarizes the Spoken Tutorial project. - -66 -00:04:33 --> 00:04:36 -If you do not have good bandwidth, you can download and watch it. - -67 -00:04:37 --> 00:04:38 -The Spoken Tutorial Project Team: - -68 -00:04:39 --> 00:04:42 -Conducts workshops using spoken tutorials. - -69 -00:04:43 --> 00:04:46 -Gives certificates to those who pass an online test. - -70 -00:04:47 --> 00:04:52 -For more details, please write to contact@spoken-tutorial.org. - -71 -00:04:53 --> 00:04:57 -Spoken Tutorial Project is a part of the Talk to a Teacher project. - -72 -00:04:58 --> 00:05:05 -It is supported by the National Mission on Education through ICT, MHRD, Government of India. - -73 -00:05:06 --> 00:05:09 -More information on this mission is available at the link shown below. - -74 -00:05:10 --> 00:05:13 -This is Ashwini Patil from IIT Bombay, signing off. - -75 -00:05:14 --> 00:05:19 -Thank You for joining. - diff --git a/media/videos/61/605/Command-line-arguments-in-C-English.srt b/media/videos/61/605/Command-line-arguments-in-C-English.srt deleted file mode 100644 index 7a1569e..0000000 --- a/media/videos/61/605/Command-line-arguments-in-C-English.srt +++ /dev/null @@ -1,234 +0,0 @@ -Narration - -1 -00:00:01 --> 00:00:06 -Hello and welcome to the spoken tutorial on Command Line Arguments. - -2 -00:00:07 --> 00:00:14 -In this tutorial, we will learn about main() function with arguments, with an example. - -3 -00:00:15 --> 00:00:26 -For this tutorial, I am using Ubuntu Operating system version 11.10 and gcc Compiler version 4.6.1 on Ubuntu. - -4 -00:00:27 --> 00:00:32 -To follow this tutorial, you should be familiar with C tutorials. - -5 -00:00:33 --> 00:00:38 -If not, for relevant tutorials, please visit our website which is as shown. - -6 -00:00:39 --> 00:00:44 -Let us start with our program. I have a code file. I will open it. - -7 -00:00:45 --> 00:00:49 -File name is main hyphen with hyphen args.c. - -8 -00:00:50 --> 00:00:52 -Let me explain the program. - -9 -00:00:53 --> 00:01:00 -These are the header files. stdio.h defines core input and output functions. - -10 -00:01:01 --> 00:01:15 -stdlib.h header file defines- -

Numeric conversion function -Pseudo-random numbers -Generation function -Memory allocation -Process control functions. -

- -11 -00:01:16 --> 00:01:27 -This is our main() function. Inside this, we have passed two arguments- -

int argc, char asterisk asterisk argv (**argv). -

- -12 -00:01:28 --> 00:01:33 -argc refers to the number of command line arguments passed to the program. - -13 -00:01:34 --> 00:01:37 -This includes the actual name of the program. - -14 -00:01:38 --> 00:01:43 -argv contains actual arguments starting from index 0. - -15 -00:01:44 --> 00:01:47 -Index 0 is the name of the program. - -16 -00:01:48 --> 00:01:52 -Index 1 will be the first argument passed to the program. - -17 -00:01:53 --> 00:01:58 -Index 2 will be the second argument passed to the program and so on. - -18 -00:01:59 --> 00:02:04 -This statement will display the total number of arguments passed to the program. - -19 -00:02:05 --> 00:02:08 -This will display the first argument passed to the program. - -20 -00:02:09 --> 00:02:12 -1 represents the argument at index 1. - -21 -00:02:13 --> 00:02:17 -'while' condition will decrement the number of arguments. - -22 -00:02:18 --> 00:02:22 -This statement will print all the arguments passed to the program. - -23 -00:02:23 --> 00:02:26 -At the end, we have return 0 statement. - -24 -00:02:27 --> 00:02:34 -Let us open the terminal by pressing Ctrl+Alt and T keys simultaneously on your keyboard. - -25 -00:02:35 --> 00:02:48 -Type: gcc space main hyphen with hyphen args.c space hyphen o space args. Press Enter. - -26 -00:02:49 --> 00:02:53 -Type: dot slash args. Press Enter. - -27 -00:02:54 --> 00:03:05 -You can see the output as: -

"Total number of arguments are 1" -

"The first argument is null" -

"arguments are ./args" -

- -28 -00:03:06 --> 00:03:10 -Command line arguments are given during execution. - -29 -00:03:11 --> 00:03:18 -Total number of arguments are 1 as the zeroth argument is the executable filename itself. - -30 -00:03:19 --> 00:03:25 -The first argument is null as we have not passed any argument to the program. - -31 -00:03:26 --> 00:03:30 -Argument is only one i.e. dot slash args. - -32 -00:03:31 --> 00:03:33 -Now let us execute again. - -33 -00:03:34 --> 00:03:46 -Press the up-arrow key space type: Sunday space Monday space Tuesday. Press Enter. - -34 -00:03:47 --> 00:04:03 -Now we can see the output: -

Total number of arguments are 4 -

The first argument is Sunday -

Arguments are ./args Sunday Monday and Tuesday . -

- -35 -00:04:04 --> 00:04:05 -Let me explain the output. - -36 -00:04:06 --> 00:04:13 -Total number of arguments are 4 as- ./args, Sunday, Monday and Tuesday. - -37 -00:04:14 --> 00:04:16 -The first argument is Sunday. - -38 -00:04:17 --> 00:04:21 -The zeroth argument always gives executable file-name. - -39 -00:04:22 --> 00:04:24 -Sunday is assigned to first argument. - -40 -00:04:25 --> 00:04:27 -Monday is assigned to second argument. - -41 -00:04:28 --> 00:04:30 -Tuesday is assigned to third argument. - -42 -00:04:31 --> 00:04:36 -This brings us to the end of this tutorial. Let us summarize. - -43 -00:04:37 --> 00:04:44 -In this tutorial, we learnt: -

Command line arguments -argc -argv. -

- -44 -00:04:45 --> 00:04:50 -As an assignment, execute the program with different arguments. - -45 -00:04:51 --> 00:04:53 -Watch the video available at the link shown below. - -46 -00:04:54 --> 00:04:56 -It summarizes the Spoken Tutorial project. - -47 -00:04:57 --> 00:05:01 -If you do not have good bandwidth, you can download and watch it. - -48 -00:05:02 --> 00:05:07 -The Spoken Tutorial Project team: Conducts workshops using spoken tutorials. - -49 -00:05:08 --> 00:05:17 -Gives certificates to those who pass an online test. For more details, please write to contact@spoken-tutorial.org - -50 -00:05:18 --> 00:05:21 -Spoken Tutorial Project is a part of the Talk to a Teacher project. - -51 -00:05:22 --> 00:05:29 -It is supported by the National Mission on Education through ICT, MHRD, Government of India. - -52 -00:05:30 --> 00:05:35 -More information on this mission is available at the link shown below: http://spoken-tutorial.org\NMEICT-Intro. - -53 -00:05:36 --> 00:05:41 -This is Ashwini Patil from IIT Bombay, signning off.Thank you for joining. - diff --git a/media/videos/92/897/Installation-of-PostgreSQL-English.srt b/media/videos/92/897/Installation-of-PostgreSQL-English.srt deleted file mode 100644 index c361f48..0000000 --- a/media/videos/92/897/Installation-of-PostgreSQL-English.srt +++ /dev/null @@ -1,492 +0,0 @@ -Narration - -1 -00:00:01 --> 00:00:06 -Welcome to the Spoken Tutorial on Installation of PostgreSQL. - -2 -00:00:07 --> 00:00:16 -In this tutorial, we will learn to install PostgreSQL on Ubuntu Linux OS and Windows operating system. - -3 -00:00:17 --> 00:00:24 -We will also learn to connect to PostgreSQL database and set password for the database. - -4 -00:00:25 --> 00:00:37 -To record this tutorial, I am using: -

Ubuntu Linux 14.04 operating system, -

Windows 7 operating system and -

a working internet connection. -

- -5 -00:00:38 --> 00:00:48 -To follow this tutorial, you should be familiar with either of the mentioned operating system -

and have working knowledge of any programming language. -

- -6 -00:00:49 --> 00:00:53 -PostgreSQL is a relational database management software. - -7 -00:00:54 --> 00:00:58 -It is a powerful and most advanced open source database system. - -8 -00:00:59 --> 00:01:06 -It runs on various platforms such as Linux, Windows and Mac Operating System. - -9 -00:01:07 --> 00:01:12 -First we will see how to install PostgreSQL on Linux. - -10 -00:01:13 --> 00:01:19 -Press CTRL + ALT +T keys simultaneously to open the terminal. - -11 -00:01:20 --> 00:01:33 -In the terminal window, type: sudo apt hyphen get update and press Enter. -

Enter the administrative password if prompted. -

- -12 -00:01:34 --> 00:01:42 -This command will update the Ubuntu's default repositories. -

Wait until it finishes all the updates. -

- -13 -00:01:43 --> 00:01:46 -Press Ctrl L to clear the screen. - -14 -00:01:47 --> 00:01:58 -Next, type: sudo apt hyphen get install postgresql and press Enter. - -15 -00:01:59 --> 00:02:02 -We can see the installation process has begun. - -16 -00:02:03 --> 00:02:08 -Press 'Y' wherever there is a prompt to confirm the configuration. - -17 -00:02:09 --> 00:02:14 -Installation will take sometime to complete, depending upon your internet speed. - -18 -00:02:15 --> 00:02:24 -Now we can see that the installation has been completed successfully. -

Press Ctrl + L to clear the screen. -

- -19 -00:02:25 --> 00:02:36 -By default, a user account called postgres is created during installation. -

But there is no password set for this user account. -

- -20 -00:02:37 --> 00:02:48 -To set the password, type: sudo hyphen u postgres psql postgres and press Enter. - -21 -00:02:49 --> 00:02:58 -Enter your system password if prompted. -

Notice that the prompt has changed to postgres equal to hash. -

- -22 -00:02:59 --> 00:03:04 -At the prompt, type: slash password postgres. - -23 -00:03:05 --> 00:03:14 -Immediately you will be prompted to set a new password for the Postgres user. -

I'll enter the password as 'postgres'. -

- -24 -00:03:15 --> 00:03:18 -You can enter a password of your choice. - -25 -00:03:19 --> 00:03:22 -Enter the same password one more time. - -26 -00:03:23 --> 00:03:26 -Please remember this password for future use. - -27 -00:03:27 --> 00:03:35 -Next, type: select version open bracket close bracket semicolon and press Enter. - -28 -00:03:36 --> 00:03:40 -Do not forget to put the semicolon at the end of each statement. - -29 -00:03:41 --> 00:03:46 -The PostgreSQL version that we have installed now, is displayed on the terminal. - -30 -00:03:47 --> 00:03:51 -This indicates that we have successfully installed PostgreSQL. - -31 -00:03:52 --> 00:03:59 -I have increased the terminal font size for this demo. -

Hence the output is seen in a different window. -

- -32 -00:04:00 --> 00:04:06 -So, I’ll hit the ‘q’ key to exit. -

You may not require to do so. -

- -33 -00:04:07 --> 00:04:10 -Now let us see how to disconnect from the server. - -34 -00:04:11 --> 00:04:16 -Type slash q and press Enter to disconnect from the server. - -35 -00:04:17 --> 00:04:22 -Notice that we are back at the command prompt of the terminal. - -36 -00:04:23 --> 00:04:28 -Every time when you want to work with PostgreSQL, you need to be connected to the server. - -37 -00:04:29 --> 00:04:34 -Psql is an interactive terminal program provided by PostgreSQL. - -38 -00:04:35 --> 00:04:43 -Using psql tool, we can execute SQL statements, manage database objects etc. - -39 -00:04:44 --> 00:04:50 -Another way to connect to a database is using pgAdmin GUI application. - -40 -00:04:51 --> 00:04:56 -We can interact with PostgreSQL database server through this interface. - -41 -00:04:57 --> 00:05:02 -We will be demonstrating all features using pgAdmin in this series. - -42 -00:05:03 --> 00:05:10 -Switch back to terminal. -

Let us again connect to the postgreSQL database from the command line. -

- -43 -00:05:11 --> 00:05:28 -For this, type: sudo psql hyphen capital U postgres hyphen h localhost hyphen capital W -

and press Enter to connect to the server. -

- -44 -00:05:29 --> 00:05:34 -hyphen h is the hostname or IP of the local server. - -45 -00:05:35 --> 00:05:40 -Enter the password for postgres user which you have set after installation. - -46 -00:05:41 --> 00:05:48 -We can see the prompt changes to Postgres. -

Press Ctrl + L to clear the screen. -

- -47 -00:05:49 --> 00:05:56 -Let us verify the PostgreSQL database and whether the server has been started by a simple query. - -48 -00:05:57 --> 00:06:04 -Type: Select current underscore user, now(); - -49 -00:06:05 --> 00:06:12 -We can see the user name and current date as output. -

Hit ‘q’ key to exit. -

- -50 -00:06:13 --> 00:06:20 -During installation, some sample databases are created automatically. -

Let us have a look at them. -

- -51 -00:06:21 --> 00:06:27 -Type: slash list or slash l and press Enter. - -52 -00:06:28 --> 00:06:37 -We can see the below database names that are available in PostgreSQL server, by default. -

Hit ‘q’ key to exit. -

- -53 -00:06:38 --> 00:06:44 -To change a database', type: slash c database name. - -54 -00:06:45 --> 00:06:53 -I will type: slash c postgres. -

Then type the postgres password. -

- -55 -00:06:54 --> 00:07:01 -We can see a message saying You are now connected to database “postgres” as user “postgres”. - -56 -00:07:02 --> 00:07:07 -We can create our own database and tables as per our requirement. - -57 -00:07:08 --> 00:07:12 -All the database commands can be executed from the command line. - -58 -00:07:13 --> 00:07:16 -Type: 'slash q' to disconnect from the server. - -59 -00:07:17 --> 00:07:20 -Now let us see how to install PgAdmin. - -60 -00:07:21 --> 00:07:29 -PgAdmin can be installed by using any one of the following methods on Ubuntu Linux Operating System. - -61 -00:07:30 --> 00:07:38 -Go to Ubuntu Software Centre or Synaptic Package manager, search for PgAdmin and install. - -62 -00:07:39 --> 00:07:44 -For more details, refer to the ‘Linux’ spoken tutorials on our website. - -63 -00:07:45 --> 00:07:55 -Or, in the Terminal, type: sudo apt hyphen get install pgadmin3 and press Enter. - -64 -00:07:56 --> 00:08:02 -I have already installed PgAdmin in my machine. -

I'll show how to open PgAdmin. -

- -65 -00:08:03 --> 00:08:07 -Click Dash Home on the top left corner of the desktop. - -66 -00:08:08 --> 00:08:11 -In the Search box, type: PgAdmin. - -67 -00:08:12 --> 00:08:16 -The PgAdmin icon appears. Click on it. - -68 -00:08:17 --> 00:08:20 -The PgAdmin interface opens. - -69 -00:08:21 --> 00:08:27 -Now let us learn to install PostgreSQL on Windows OS. - -70 -00:08:28 --> 00:08:40 -Open your web browser and go to www.postgresql.org/download -

Click on the Windows link. -

- -71 -00:08:41 --> 00:08:45 -Then, click on the Download the graphical installer link. - -72 -00:08:46 --> 00:08:52 -I have installed postgres version 9.3.x in Linux Operating System. - -73 -00:08:53 --> 00:09:01 -Now I would like to install the same version in Windows also. -

You can also install the latest stable version. -

- -74 -00:09:02 --> 00:09:08 -So, click on the Previous supported versions and look for version 9.3.x - -75 -00:09:09 --> 00:09:12 -Click the link near to the Windows icon. - -76 -00:09:13 --> 00:09:19 -It will open a dialog box to save the file. -

Click on the Save File button. -

- -77 -00:09:20 --> 00:09:24 -It will take sometime to download the file. Wait until it is finished. - -78 -00:09:25 --> 00:09:29 -I have already downloaded it in my machine in the Downloads folder. - -79 -00:09:30 --> 00:08:36 -Go to the Downloads folder and double-click on the downloaded file. It will open a window. - -80 -00:08:37 --> 00:08:39 -Click on the Run button. - -81 -00:08:40 --> 00:09:43 -In the setup window, click on the Next button. - -82 -00:09:44 --> 00:09:51 -Select the components and click on the Next button. -

In the Installation directory, click on the Next button. -

- -83 -00:09:52 --> 00:09:59 -Enter the password for postgres and re-type one more time. Click on the Next button. - -84 -00:10:00 --> 00:10:05 -Installation has started. Wait until it finishes completely. - -85 -00:10:06 --> 00:10:10 -Next, click on the Finish button to complete the installation. - -86 -00:10:11 --> 00:10:14 -Lastly, exit from the wizard. - -87 -00:10:15 --> 00:10:19 -Let us see how to open the PostgreSQL command line on Windows. - -88 -00:10:20 --> 00:10:29 -Click on Start, then All program, then PostgreSQL and psql to open the command line. - -89 -00:10:30 --> 00:10:32 -We can see the postgres prompt. - -90 -00:10:33 --> 00:10:41 -Type: select version() semicolon and press Enter to see the installed version of postgresql. - -91 -00:10:42 --> 00:10:48 -This indicates that we have successfully installed in Windows. -

Close the window. -

- -92 -00:10:49 --> 00:10:52 -Let us open the PgAdmin from Windows. - -93 -00:10:53 --> 00:11:03 -Click on Start, then All program, then PostgreSQL and PgAdmin3 to open the GUI interface. - -94 -00:11:04 --> 00:11:08 -With this, we come to the end of this tutorial. Let us summarize. - -95 -00:11:09 --> 00:11:17 -In this tutorial, we have learnt to install PostgreSQL on Ubuntu Linux and Windows operating systems. - -96 -00:11:18 --> 00:11:27 -As an assignment, connect to the server and list the default available database. -

Change to anyone of the available database. -

- -97 -00:11:28 --> 00:11:35 -The video at the following link summarizes the Spoken Tutorial project. -

Please download and watch it. -

- -98 -00:11:36 --> 00:11:44 -The Spoken Tutorial Project team -

conducts workshops using spoken tutorials and gives certificates on passing online tests. -

- -99 -00:11:45 --> 00:11:48 -For more details, please write to us. - -100 -00:11:49 --> 00:11:53 -Do you have questions in THIS Spoken Tutorial? -

Please visit this site -

- -101 -00:11:54 --> 00:12:01 -Choose the minute and second where you have the question. -

Explain your question briefly. -

- -102 -00:12:02 --> 00:12:05 -Someone from our team will answer them. - -103 -00:12:06 --> 00:12:10 -The Spoken Tutorial forum is for specific questions on this tutorial. - -104 -00:12:11 --> 00:12:16 -Please do not post unrelated and general questions on them. - -105 -00:12:17 --> 00:12:24 -This will help reduce the clutter. -

With less clutter, we can use these discussion as instructional material. -

- -106 -00:12:25 --> 00:12:37 -Spoken Tutorial project is funded by NMEICT, MHRD, Government of India. -

More information on this mission is available at this link. -

- -107 -00:12:38 --> 00:12:43 -This is Nirmala Venkat from IIT Bombay, signing off. Thanks for watching. - diff --git a/media/videos/92/898/Create-database-using-PgAdmin-English.srt b/media/videos/92/898/Create-database-using-PgAdmin-English.srt deleted file mode 100644 index 69c04a7..0000000 --- a/media/videos/92/898/Create-database-using-PgAdmin-English.srt +++ /dev/null @@ -1,374 +0,0 @@ -Narration - -1 -00:00:01 --> 00:00:06 -Welcome to the Spoken Tutorial on Create a database using pgAdmin. - -2 -00:00:07 --> 00:00:11 -In this tutorial, we will learn about how to: -

connect to the server, -

- -3 -00:00:12 --> 00:00:16 -database and its objects, -

how to create a database, -

- -4 -00:00:17 --> 00:00:22 -Table and its attributes and -

how to create a table. -

- -5 -00:00:23 --> 00:00:29 -To record this tutorial, I am using: -

Ubuntu Linux 14.04 operating system, -

- -6 -00:00:30 --> 00:00:37 -PostgreSQL 9.3.x and -

pgAdmin 1.18 -

- -7 -00:00:38 --> 00:00:47 -To follow this tutorial, you should have good understanding of basic computer concepts and -

working knowledge of any programming language. -

- -8 -00:00:48 --> 00:00:50 -Let us open the pgAdmin. - -9 -00:00:51 --> 00:00:55 -Click Dash Home on the top left corner of the computer desktop. - -10 -00:00:56 --> 00:01:04 -In the Search box, type: pgAdmin. The pgAdmin icon appears. Click on it. - -11 -00:01:05 --> 00:01:08 -The pgAdmin interface is opened now. - -12 -00:01:09 --> 00:01:13 -Here, on the left hand side, we can see the object browser pane. - -13 -00:01:14 --> 00:01:17 -The various objects of the database are displayed here. - -14 -00:01:18 --> 00:01:22 -The upper right pane shows the relevant properties of each object. - -15 -00:01:23 --> 00:01:29 -The lower right pane is the SQL pane where the script of the currently selected object is displayed. - -16 -00:01:30 --> 00:01:32 -Let us see how to connect to the server. - -17 -00:01:33 --> 00:01:38 -Click on the connection icon on the top left corner of the tool bar. - -18 -00:01:39 --> 00:01:42 -New Server Registration window appears. - -19 -00:01:43 --> 00:01:55 -In the Properties tab, enter localhost in the Name field and localhost in the Host field. -

Keep all the other parameters same. -

- -20 -00:01:56 --> 00:02:02 -The database name, and the Username which are shown here are the names given during installation. - -21 -00:02:03 --> 00:02:09 -Enter the password which you gave during installation. -

Click on Ok button. -

- -22 -00:02:10 --> 00:02:17 -Small pop-up windows will appear from time to time. -

These give additional information for our understanding. -

- -23 -00:02:18 --> 00:02:26 -Always click on this check-box 'Do not show this hint again', before you close these windows. -

I won't explicitly mention this. -

- -24 -00:02:27 --> 00:02:29 -Click on Ok button. - -25 -00:02:30 --> 00:02:37 -Here, we can see the connection established to localhost. -

Click on the localhost node. -

- -26 -00:02:38 --> 00:02:41 -We can see several objects for this particular server. - -27 -00:02:42 --> 00:02:51 -Now, click on the Databases node. -

The default database 'postgres' that is created during installation is displayed here. -

- -28 -00:02:52 --> 00:02:58 -Database is a collection of information or data which is stored in an organized way. - -29 -00:02:59 --> 00:03:06 -A database has objects such as tables, views, procedures, functions etc. - -30 -00:03:07 --> 00:03:11 -We will learn about these objects in the future tutorials, in this series. - -31 -00:03:12 --> 00:03:17 -We can have multiple databases depending upon our application requirement. - -32 -00:03:18 --> 00:03:20 -Switch back to pgAdmin interface. - -33 -00:03:21 --> 00:03:25 -Now, we will create a new database for our demonstration purpose. - -34 -00:03:26 --> 00:03:30 -Right-click on the Databases node and select New Database. - -35 -00:03:31 --> 00:03:36 -Type Sampledb as the database name and click Ok. - -36 -00:03:37 --> 00:03:43 -Now, we can see the database is listed under the database node, which we created just now. - -37 -00:03:44 --> 00:03:49 -Next, we will add a student table to this sampledb database. - -38 -00:03:50 --> 00:03:57 -What is table? In RDBMS, we store data in database objects called tables. - -39 -00:03:58 --> 00:04:03 -A table is a collection of related data that is stored in rows and columns format. - -40 -00:04:04 --> 00:04:10 -This is an example of a STUDENT table. -

Tables have columns which are called as fields. -

- -41 -00:04:11 --> 00:04:21 -The fields in the STUDENT table are Student ID, student name, address, city, Phone, Date of birth, CGPA etc. - -42 -00:04:22 --> 00:04:29 -A column is a set of value of a particular data type. This is also called as attribute. - -43 -00:04:30 --> 00:04:36 -Here, in the STUDENT table, Student Name is one of the attribute that represents names of students. - -44 -00:04:37 --> 00:04:40 -Now switch back to the interface. - -45 -00:04:41 --> 00:04:52 -To create a new table in Sampledb database, click on the Sampledb node. -

Then click Schemas and then Public and Tables. -

- -46 -00:04:53 --> 00:05:01 -Right-click on the table node and select New Table. -

Let us give “students” as table name. -

- -47 -00:05:02 --> 00:05:09 -Click on the Columns tab to enter the columns for this table. -

Click on the Add button. -

- -48 -00:05:10 --> 00:05:14 -In the new window that opens, enter Student name in the Name field. - -49 -00:05:15 --> 00:05:19 -Select character varying as data type from the drop-down list box. - -50 -00:05:20 --> 00:05:24 -The data type specifies what type of data the field can hold. - -51 -00:05:25 --> 00:05:28 -Enter 50 as the length of the field. - -52 -00:05:29 --> 00:05:33 -The length specifies the maximum length of the column of the table. - -53 -00:05:34 --> 00:05:38 -Click Ok button to add column to the table. - -54 -00:05:39 --> 00:05:43 -We will see what are the common data types used in PostgreSQL. - -55 -00:05:44 --> 00:05:47 -Integer, numeric represents numeric data type. - -56 -00:05:48 --> 00:05:54 -For example: phone no, age, quantity are of numeric data type. - -57 -00:05:55 --> 00:06:00 -numeric(n,d) - is also numeric data type with decimal places. - -58 -00:06:01 --> 00:06:06 -Here n is the total digits and d is the number of digits after the decimal. - -59 -00:06:07 --> 00:06:13 -It can be used to represent fields like basic salary, unit price etc. - -60 -00:06:14 --> 00:06:18 -char and character varying represents string data type. - -61 -00:06:19 --> 00:06:28 -Fields such as name, address, email are of string data type. -

Text is a string data type with unlimited length. -

- -62 -00:06:29 --> 00:06:32 -Date represents date data type. - -63 -00:06:33 --> 00:06:40 -Likewise, I'll add City column with character varying data type and length as 40. - -64 -00:06:41 --> 00:06:44 -Add the column Gender as shown. - -65 -00:06:45 --> 00:06:48 -Add a Date of Birth column with date data type. - -66 -00:06:49 --> 00:06:55 -Next, add a CGPA field. Select the data type as numeric. - -67 -00:06:56 --> 00:07:02 -Enter 2 as length and 1 as precision. This is same as the decimal data type. - -68 -00:07:03 --> 00:07:10 -We have entered all the columns for the student table. Click on Ok button. - -69 -00:07:11 --> 00:07:20 -A window shows some message about Primary keys. -

We will see the importance of Primary keys in the future tutorials. -

- -70 -00:07:21 --> 00:07:27 -We can see the student table is created in the sampledb database. -

Click on it. -

- -71 -00:07:28 --> 00:07:34 -In the SQL pane, we can see the syntax of the create table command generated automatically. - -72 -00:07:35 --> 00:07:39 -With this, we come to the end of this tutorial. Let us summarize. - -73 -00:07:40 --> 00:07:46 -In this tutorial, we have learnt - how to connect to the server, -

database and its objects, -

- -74 -00:07:47 --> 00:07:53 -How to create a database, -

Table and its attributes and how to create a table. -

- -75 -00:07:54 --> 00:07:59 -As an Assignment, connect to the server and check the default available database. - -76 -00:08:00 --> 00:08:12 -Create a new database Organization. In the Organization database, create a table Emp with the columns Emp name, Address, Date of Birth and Salary. - -77 -00:08:13 --> 00:08:19 -The video at the following link summarizes the Spoken Tutorial project. -

Please download and watch it. -

- -78 -00:08:20 --> 00:08:27 -The Spoken Tutorial Project team conducts workshops and gives certificates. -

For more details, please write to us. -

- -79 -00:08:28 --> 00:08:31 -Please post your timed queries in this forum. - -80 -00:08:32 --> 00:08:43 -Spoken Tutorial project is funded by NMEICT, MHRD, Government of India. -

More information on this mission is available at this link. -

- -81 -00:08:44 --> 00:08:49 -This is Nirmala Venkat from IIT Bombay, signing off. Thanks for watching. - diff --git a/media/videos/92/899/Table-with-primary-keys-English.srt b/media/videos/92/899/Table-with-primary-keys-English.srt deleted file mode 100644 index 84d3c45..0000000 --- a/media/videos/92/899/Table-with-primary-keys-English.srt +++ /dev/null @@ -1,529 +0,0 @@ -Narration - -1 -00:00:01 --> 00:00:05 -Welcome to the Spoken Tutorial on Table with primary keys. - -2 -00:00:06 --> 00:00:12 -In this tutorial, we will learn to: -

insert data, -

retrieve data, -

- -3 -00:00:13 --> 00:00:20 -data redundancy, -

importance of primary keys and create a table with primary keys. -

- -4 -00:00:21 --> 00:00:35 -To record this tutorial, I am using: -

Ubuntu Linux 14.04 operating system, -

PostgreSQL 9.3.x and -

pgAdmin 1.18. -

- -5 -00:00:36 --> 00:00:42 -To follow this tutorial, you should have good understanding of basic computer concepts and - -6 -00:00:43 --> 00:00:47 -working knowledge of any programming language. - -7 -00:00:48 --> 00:00:50 -Let us open pgAdmin. - -8 -00:00:51 --> 00:00:58 -Ensure that you have connected to the localhost server. -

Select the 'Sampledb' database. -

- -9 -00:00:59 --> 00:01:05 -Click on the 'students' table and then click on Columns node. - -10 -00:01:06 --> 00:01:14 -We can see the students table with 5 columns which we created earlier. -

The structure of the table is ready. -

- -11 -00:01:15 --> 00:01:19 -Let us learn how to insert some data into this table. - -12 -00:01:20 --> 00:01:28 -Right-click on the students table. -

From the drop-down menu, select Scripts and then select INSERT script. -

- -13 -00:01:29 --> 00:01:35 -The SQL Editor window opens up with the basic syntax for an Insert statement. - -14 -00:01:36 --> 00:01:41 -Insert statement inserts one or more rows into a table. - -15 -00:01:42 --> 00:01:49 -The values to be inserted must match the order of the columns and the datatype of each column. - -16 -00:01:50 --> 00:01:57 -That is - column 1 takes the value 1 and column 2 takes the value 2 and so on. - -17 -00:01:58 --> 00:02:05 -Type the values as shown. -

Here I have entered a single row of data for the student 'Ram'. -

- -18 -00:02:06 --> 00:02:09 -The order of the column name should match the values. - -19 -00:02:10 --> 00:02:20 -Note that character data type values are always enclosed in quotes. -

And numeric data type values are not enclosed within quotes. -

- -20 -00:02:21 --> 00:02:24 -Next we will execute the insert statement. - -21 -00:02:25 --> 00:02:29 -Click on the triangle icon in the toolbar to execute the query. - -22 -00:02:30 --> 00:02:35 -We can see the message 'Query returned successfully: One row affected'. - -23 -00:02:36 --> 00:02:41 -This indicates that one row of data is inserted into the students table. - -24 -00:02:42 --> 00:02:44 -I’ll insert one more record. - -25 -00:02:45 --> 00:02:51 -Execute the query. -

I have inserted 2 records now. -

- -26 -00:02:52 --> 00:02:56 -Let us now retrieve the data which we have inserted, from the table. - -27 -00:02:57 --> 00:03:02 -Click on the “Clear edit window” icon in the toolbar to clear the previous statement. - -28 -00:03:03 --> 00:03:06 -Then type: Select asterisk from - -29 -00:03:07 --> 00:03:14 -Here we have to specify the table name. Press Ctrl and spacebar together. - -30 -00:03:15 --> 00:03:22 -A list of available tables appears as shown. -

Select the Students table. -

- -31 -00:03:23 --> 00:03:28 -Here, Select is a query command which is used to retrieve data from the tables. - -32 -00:03:29 --> 00:03:32 -Asterisk means all the rows from the table. - -33 -00:03:33 --> 00:03:37 -This statement will fetch all the values from the students table. - -34 -00:03:38 --> 00:03:43 -Now click on the triangle icon in the toolbar to execute the query. - -35 -00:03:44 --> 00:03:48 -We can see the output in a tabular form, in the output pane. - -36 -00:03:49 --> 00:03:55 -Next I will demonstrate how to add multiple student details at the same time. - -37 -00:03:56 --> 00:04:00 -The syntax to insert multiple rows is shown here. - -38 -00:04:01 --> 00:04:05 -We can insert multiple rows in a single insert statement. - -39 -00:04:06 --> 00:04:12 -Here, I have entered the information of the students 'Ram', 'Kishore' and ‘Pooja’. - -40 -00:04:13 --> 00:04:17 -Let us save the script of this Insert statement for future use. - -41 -00:04:18 --> 00:04:22 -To do so, click on the Save file icon on the toolbar. - -42 -00:04:23 --> 00:04:27 -Enter the name of the file as insertscript hyphen student. - -43 -00:04:28 --> 00:04:34 -Select the folder where you want to save the file. I'll select Desktop. - -44 -00:04:35 --> 00:04:40 -By default, the file will always be saved with 'dot sql' extension. - -45 -00:04:41 --> 00:04:43 -Click on the Save button. - -46 -00:04:44 --> 00:04:49 -As before, click on the triangle icon in the toolbar to execute the query. - -47 -00:04:50 --> 00:04:59 -In the output pane, we can see the message “3 rows affected”. -

This indicates that three records are inserted in the students table. -

- -48 -00:05:00 --> 00:05:04 -Once again we will retrieve the data from the students table. - -49 -00:05:05 --> 00:05:14 -To do so, click on the Previous queries drop-down box. -

All the previous typed sql statements are stored here. -

- -50 -00:05:15 --> 00:05:19 -Click on “Select asterisk from students” from the list. - -51 -00:05:20 --> 00:05:22 -Now execute the query. - -52 -00:05:23 --> 00:05:30 -We can see there are two students with the same name ‘Ram’ but the other column values are different. - -53 -00:05:31 --> 00:05:37 -How will the institute or organization identify a particular student Ram’s details? - -54 -00:05:38 --> 00:05:48 -Each student is unique and they need to be identified with some unique attribute. -

For example, student-id will be unique for each student. -

- -55 -00:05:49 --> 00:05:54 -Therefore in our example student id can be the ‘primary key constraint’. - -56 -00:05:55 --> 00:06:02 -Primary key is a column or a set of columns that uniquely identifies each row in the table. - -57 -00:06:03 --> 00:06:07 -Follow these rules when you define a primary key for a table. - -58 -00:06:08 --> 00:06:11 -A table should have only one primary key. - -59 -00:06:12 --> 00:06:16 -A primary key can be a single column or a set of columns. - -60 -00:06:17 --> 00:06:25 -The combination of values in these multiple columns must be unique. -

It should not contain null values. -

- -61 -00:06:26 --> 00:06:31 -For example- - -62 -00:06:32 --> 00:06:37 -here, there is a duplicate row of data for the student name ‘Kishore’. - -63 -00:06:38 --> 00:06:42 -By mistake, I have entered the student Kishore’s details twice. - -64 -00:06:43 --> 00:06:54 -First, I demonstrated to insert a single record 2 times and then I inserted 3 records. -

The duplication of data is Data redundancy. -

- -65 -00:06:55 --> 00:07:01 -Data redundancy, that is data repetition will affect the performance of the database. - -66 -00:07:02 --> 00:07:08 -More information on Data redundancy is given in the Additional material link of this tutorial. - -67 -00:07:09 --> 00:07:17 -How can we prevent insertion of duplicate data? -

We can do so by adding a primary key constraint to a table. -

- -68 -00:07:18 --> 00:07:21 -Now I’ll show how to add a primary key. - -69 -00:07:22 --> 00:07:25 -Let’s go to the pgAdmin main screen. - -70 -00:07:26 --> 00:07:31 -Let me copy the script of create table statement and paste in the SQL Editor. - -71 -00:07:32 --> 00:07:37 -This is the code which we executed to create the students table. - -72 -00:07:38 --> 00:07:44 -Can we add a student name column as the primary key to identify each student? - -73 -00:07:45 --> 00:07:52 -No, student name cannot be assigned as a primary key as there may be many students with the same name. - -74 -00:07:53 --> 00:07:57 -We have to identify a column with unique values. - -75 -00:07:58 --> 00:08:04 -So, we will add a student id column to this table to identify each student. - -76 -00:08:05 --> 00:08:08 -Type the code as shown on the screen. - -77 -00:08:09 --> 00:08:15 -I have added a new column called studentid which will store a unique code for each student. - -78 -00:08:16 --> 00:08:23 -I have defined studentid as the primary key. -

Now let’s execute the query. -

- -79 -00:08:24 --> 00:08:29 -We can see an error saying "relation 'students' already exists". - -80 -00:08:30 --> 00:08:35 -This means we tried to create a table with the same name students. - -81 -00:08:36 --> 00:08:40 -Two objects cannot have the same name in a database. - -82 -00:08:41 --> 00:08:46 -First we will drop the students table along with the data which we inserted now. - -83 -00:08:47 --> 00:08:52 -Then we will again create the students table with primary key constraints. - -84 -00:08:53 --> 00:08:55 -Go to the pgAdmin main screen. - -85 -00:08:56 --> 00:09:02 -Right-click on the students table. -

From the drop-down menu, select Delete/Drop. -

- -86 -00:09:03 --> 00:09:09 -A pop-up window for Drop table appears. -

Click on the Yes button. -

- -87 -00:09:10 --> 00:09:15 -This removes a table definition and all its associated data. - -88 -00:09:16 --> 00:09:20 -The syntax to drop a table is DROP TABLE tablename. - -89 -00:09:21 --> 00:09:26 -We can also type the statement in the SQL Editor and execute the query. - -90 -00:09:27 --> 00:09:29 -Switch to the SQL Editor window. - -91 -00:09:30 --> 00:09:35 -Now, let us create the students table with student id as primary key. - -92 -00:09:36 --> 00:09:46 -Execute the query. -

Now the students table is successfully created. -

But the table is empty without any data. -

- -93 -00:09:47 --> 00:09:53 -I'll insert the data from the insertscript hyphen student.sql file which we saved earlier. - -94 -00:09:54 --> 00:10:00 -Click “Open file” icon in the toolbar and select the insertscript hyphen student file. - -95 -00:10:01 --> 00:10:09 -The file is opened in the SQL editor window. -

I’ll add the studentid column as shown. -

- -96 -00:10:10 --> 00:10:14 -Next I’ll pass a unique id for each student. - -97 -00:10:15 --> 00:10:28 -I’ll add another record for student Ram with unique student id as shown. -

Note there is no duplicate row of data. -

Now execute the query. -

- -98 -00:10:29 --> 00:10:33 -We can see that four records have been successfully inserted. - -99 -00:10:34 --> 00:10:40 -What will happen if we try to insert the same set of data into the students table again? - -100 -00:10:41 --> 00:10:46 -Let us try that. Execute the insert statement one more time. - -101 -00:10:47 --> 00:10:53 -We can see the error message “duplicate key value violates unique constraint”. - -102 -00:10:54 --> 00:11:04 -It shows an error which indicates the duplication of data. -

Hence the primary key helps to avoid the data redundancy in a table. -

- -103 -00:11:05 --> 00:11:08 -Next, let us retrieve the inserted data. - -104 -00:11:09 --> 00:11:12 -We can see there is no duplication of data. - -105 -00:11:13 --> 00:11:18 -With this we come to the end of this tutorial. Let us summarize. - -106 -00:11:19 --> 00:11:24 -In this tutorial, we have learnt about: -

inserting data, -

retrieving data, -

- -107 -00:11:25 --> 00:11:31 -data redundancy, -

importance of Primary keys, -

creating table with primary keys. -

- -108 -00:11:32 --> 00:11:38 -As an Assignment, drop the Emp table which was created in an earlier assignment in this series. - -109 -00:11:39 --> 00:11:46 -Create the Emp table with empno as primary key. -

Keep the other columns the same. -

- -110 -00:11:47 --> 00:11:54 -Insert few records into the Emp table. -

Retrieve the data and see the output. -

- -111 -00:11:55 --> 00:12:02 -The video at the following link summarizes the Spoken Tutorial project. -

Please download and watch it. -

- -112 -00:12:03 --> 00:12:11 -The Spoken Tutorial Project team conducts workshops and gives certificates. -

For more details, please write to us. -

- -113 -00:12:12 --> 00:12:15 -Please post your timed queries in this forum. - -114 -00:12:16 --> 00:12:28 -Spoken Tutorial project is funded by NMEICT, MHRD, Government of India. -

More information on this mission is available at this link. -

- -115 -00:12:29 --> 00:12:34 -This is Nirmala Venkat from IIT Bombay, signing off. Thanks for watching. - diff --git a/media/videos/92/932/Select-statement-English.srt b/media/videos/92/932/Select-statement-English.srt deleted file mode 100644 index 5b380c4..0000000 --- a/media/videos/92/932/Select-statement-English.srt +++ /dev/null @@ -1,520 +0,0 @@ -Narration - -1 -00:00:01 --> 00:00:05 -Welcome to the Spoken Tutorial on Select statement. - -2 -00:00:06 --> 00:00:11 -In this tutorial, we will learn about: -

basic Select statement, -

- -3 -00:00:12 --> 00:00:14 -Select with WHERE clause, - -4 -00:00:15 --> 00:00:17 -Select with relational operators, - -5 -00:00:18 --> 00:00:20 -Select with logical operators, - -6 -00:00:21 --> 00:00:23 -Alias for column names. - -7 -00:00:24 --> 00:00:30 -To record this tutorial, I am using: -

Ubuntu Linux 14.04 operating system, -

- -8 -00:00:31 --> 00:00:38 -PostgreSQL 9.3.x -

and pgAdmin 1.18 -

- -9 -00:00:39 --> 00:00:45 -To follow this tutorial, you should have basic understanding of database and tables. - -10 -00:00:46 --> 00:00:52 -For more details, refer to the RDBMS PostgreSQL series on this website. - -11 -00:00:53 --> 00:00:55 -Let us open pgAdmin. - -12 -00:00:56 --> 00:01:03 -Right-click on the students table and select View Data and then View All Rows. - -13 -00:01:04 --> 00:01:09 -We can see the students table with the 4 records that we inserted earlier. - -14 -00:01:10 --> 00:01:18 -I'll show how to insert records in the Edit Data window. - -15 -00:01:19 --> 00:01:24 -Click on the save icon on the top left of the toolbar to save the changes. - -16 -00:01:25 --> 00:01:32 -We can insert records either in this Edit data window or through the Insert statement. -

Close this window. -

- -17 -00:01:33 --> 00:01:42 -I’ll insert some more records for demonstration purpose. -

I’ll open the SQL editor window and type the insert statement shown here. -

- -18 -00:01:43 --> 00:01:50 -Note that I have entered ‘NULL’ value in the date of birth column for student id ‘s012’. - -19 -00:01:51 --> 00:01:58 -In PostgreSQL, the term NULL is used to represent a missing value or an unknown value. - -20 -00:01:59 --> 00:02:02 -A field with a NULL value represents no value. - -21 -00:02:03 --> 00:02:08 -Execute the query. -

Retrieve the data from the table to see the output. -

- -22 -00:02:09 --> 00:02:12 -So far, we have inserted 14 records. - -23 -00:02:13 --> 00:02:16 -A NULL value field appears to be blank. - -24 -00:02:17 --> 00:02:21 -Null is not the same as a zero value or space value. - -25 -00:02:22 --> 00:02:26 -It implies that a database field value has not been stored. - -26 -00:02:27 --> 00:02:34 -Pause the tutorial and do this assignment. -

Insert 10 records into the students table. -

- -27 -00:02:35 --> 00:02:40 -Next, we will see about how to use SELECT statement with many clauses. - -28 -00:02:41 --> 00:02:44 -The SELECT statement retrieves data from a database. - -29 -00:02:45 --> 00:02:50 -The data is returned in rows and columns format i.e. in a tabular format. - -30 -00:02:51 --> 00:02:56 -It has many clauses that we can combine to form a powerful query. - -31 -00:02:57 --> 00:03:04 -The basic syntax of the SELECT statement is: -

Select column-names from table-name; -

- -32 -00:03:05 --> 00:03:09 -Now let us learn to write queries using Select statements. - -33 -00:03:10 --> 00:03:13 -Switch back to the PgAdmin main screen. - -34 -00:03:14 --> 00:03:20 -Right-click on students node and select Scripts and then click on SELECT script. - -35 -00:03:21 --> 00:03:25 -This is a simple Select statement which retrieves data from the students table. - -36 -00:03:26 --> 00:03:33 -You can specify the column names as shown here or use 'asterisk' to select all the columns. - -37 -00:03:34 --> 00:03:42 -I want the details of certain columns only. -

So, type the code as shown here with specific column names. -

- -38 -00:03:43 --> 00:03:53 -The SQL statement will display - the student id, student name, city and cgpa columns -

from the Students table. -

- -39 -00:03:54 --> 00:03:57 -Now, let’s execute the query to see the output. - -40 -00:03:58 --> 00:04:03 -The expected rows and columns are displayed. -

Let’s move ahead. -

- -41 -00:04:04 --> 00:04:13 -SELECT with WHERE clause is used to filter the rows which match the criteria that is specified and to limit the number of rows. - -42 -00:04:14 --> 00:04:22 -The syntax of this statement is, SELECT column-names FROM table-name WHERE condition. - -43 -00:04:23 --> 00:04:29 -Records that satisfy the specified condition will be displayed on executing this statement. - -44 -00:04:30 --> 00:04:33 -Let’s switch back to the pgAdmin SQL Editor. - -45 -00:04:34 --> 00:04:42 -Type: SELECT studentid, studentname, city, cgpa from students where city ='Mumbai'. - -46 -00:04:43 --> 00:04:45 -Now, execute this query. - -47 -00:04:46 --> 00:04:56 -It will retrieve the rows from the students table and display students from Mumbai city. -

WHERE is followed by a condition that returns either true or false. -

- -48 -00:04:57 --> 00:05:02 -Here the City is the column name and 'Mumbai' is the value to filter. - -49 -00:05:03 --> 00:05:11 -Now, let’s change the city value to 'Bangalore' and execute the query. -

We can see that there are no records retrieved. -

- -50 -00:05:12 --> 00:05:16 -This is because the condition returns false on execution - -51 -00:05:17 --> 00:05:20 -which means there are no records that match with the given condition. - -52 -00:05:21 --> 00:05:27 -Next, we will see how to use comparison or relational operators in the WHERE clause. - -53 -00:05:28 --> 00:05:33 -Relational operators listed here, can also be used within the WHERE clause. - -54 -00:05:34 --> 00:05:36 -Switch back to the pgAdmin SQL Editor. - -55 -00:05:37 --> 00:05:48 -Type: Select studentid, studentname, city, cgpa from students where cgpa > 8.5 - -56 -00:05:49 --> 00:05:50 -Execute the query. - -57 -00:05:51 --> 00:05:56 -The output shows details of students who have cgpa greater than 8.5 - -58 -00:05:57 --> 00:06:03 -Let us type another query to retrieve the student details who are not from Mumbai city. - -59 -00:06:04 --> 00:06:06 -Note the 'Not equal to' operator. - -60 -00:06:07 --> 00:06:13 -It is symbolized by an open and close angular bracket. -

Execute the query. -

- -61 -00:06:14 --> 00:06:20 -Likewise, we can use relational operators to filter data depending upon our requirement. - -62 -00:06:21 --> 00:06:26 -Next let’s learn how to use arithmetic operators in the Select statement. - -63 -00:06:27 --> 00:06:32 -When we need to do calculations within SQL statements, we can use arithmetic expressions. - -64 -00:06:33 --> 00:06:39 -Arithmetic expressions contain column names, arithmetic operators and numeric values. - -65 -00:06:40 --> 00:06:46 -Arithmetic operators will however not work for character data type columns. - -66 -00:06:47 --> 00:06:53 -Let’s do a simple arithmetic calculation using some operators. -

Clear the screen. -

- -67 -00:06:54 --> 00:07:02 -Type: Select 2+15+98+45; -

Execute to see the output. -

- -68 -00:07:03 --> 00:07:10 -Type: Select 230 divided by 5; -

Again execute the query to see the output. -

- -69 -00:07:11 --> 00:07:15 -Let us see how to use arithmetic operators with a column of the table. - -70 -00:07:16 --> 00:07:25 -We have a column called cgpa with numeric data type. -

CGPA stands for Cumulative Grade Point Average. -

- -71 -00:07:26 --> 00:07:32 -Let us calculate the percentage from cgpa score. -

Switch back to SQL Editor window. -

- -72 -00:07:33 --> 00:07:43 -Type the query as shown here. -

What we want to do is, multiply the cgpa with 9.5 to get the actual percentage. -

- -73 -00:07:44 --> 00:07:49 -Here, we are using the multiplication operator asterisk, to calculate the percentage. - -74 -00:07:50 --> 00:07:52 -Let’s execute the query now. - -75 -00:07:53 --> 00:08:01 -Percentage is calculated and displayed in a new column, as shown here. -

But there is no specific column name for this column. -

- -76 -00:08:02 --> 00:08:08 -This percentage data is not stored in the database. It only displays the calculation. - -77 -00:08:09 --> 00:08:17 -Now I want to give a name to this column so that it is more meaningful. -

For that, we can use an alias name. -

- -78 -00:08:18 --> 00:08:22 -An alias is used to rename a column temporarily. - -79 -00:08:23 --> 00:08:26 -It appears as a heading in the output of the query. - -80 -00:08:27 --> 00:08:34 -Use column alias if the original column name is not meaningful or -

when there is a column name conflict. -

- -81 -00:08:35 --> 00:08:43 -Here, add the text as Percentage after the calculation column. -

Execute the query to see the output. -

- -82 -00:08:44 --> 00:08:50 -We can also specify in capital letters as “PERCENTAGE” within double quotes. - -83 -00:08:51 --> 00:08:58 -Please note, column names which are mixed-case or uppercase have to be within double quotes in postgresql. - -84 -00:08:59 --> 00:09:00 -Execute the query. - -85 -00:09:01 --> 00:09:06 -We can see the column name has changed to PERCENTAGE in capital letters. - -86 -00:09:07 --> 00:09:12 -Next we will see how to use logical operators within the Select statement. - -87 -00:09:13 --> 00:09:17 -Logical operators are used where more than one condition needs to be checked. - -88 -00:09:18 --> 00:09:24 -Or, using logical operators, we can combine two or more conditions. - -89 -00:09:25 --> 00:09:37 -The most commonly used logical operators are: -

AND: This joins two or more conditions and returns results only when all the conditions are true. -

- -90 -00:09:38 --> 00:09:46 -OR: This joins two or more conditions and returns results when at least one of the conditions is true. - -91 -00:09:47 --> 00:09:52 -NOT: This operator results in the reverse of a condition. - -92 -00:09:53 --> 00:09:59 -Switch back to PgAdmin interface. -

Let us see few examples for logical operators. -

- -93 -00:10:00 --> 00:10:10 -Type the code as shown. -

Here, we are checking for two conditions i.e. students who are from Pune city whose gender is Female. -

- -94 -00:10:11 --> 00:10:19 -It will return the output when both the conditions are true. -

Notice how the 'AND' logical operator is written. -

- -95 -00:10:20 --> 00:10:22 -Execute the query to see the output. - -96 -00:10:23 --> 00:10:28 -Next, let’s change the 'AND' to 'OR' logical operator and see the output. - -97 -00:10:29 --> 00:10:33 -The records are retrieved if either one of the conditions is true. - -98 -00:10:34 --> 00:10:39 -That is either the student is from Pune city or gender is ‘Female’ - -99 -00:10:40 --> 00:10:45 -This query will display students who are not from Mumbai or Chennai. - -100 -00:10:46 --> 00:10:51 -Here we have used the NOT and AND operators together. - -101 -00:10:52 --> 00:10:54 -Execute the query and see the output. - -102 -00:10:55 --> 00:11:00 -With this, we come to the end of this tutorial. -

Let us summarize. -

- -103 -00:11:01 --> 00:11:04 -In this tutorial, we have learnt about -

basic Select statement, -

- -104 -00:11:05 --> 00:11:09 -Select with WHERE clause, -

Select with relational operators, -

- -105 -00:11:10 --> 00:11:14 -Select with logical operators and -

Alias for column names. -

- -106 -00:11:15 --> 00:11:23 -As an assignment, write a Select statement to display all columns from students table for the student name 'Ram'. - -107 -00:11:24 --> 00:11:33 -Display studentid, studentname, dob of students whose cgpa is greater than 8 and less than 9.5 - -108 -00:11:34 --> 00:11:39 -The video at the following link summarizes the Spoken Tutorial project. -

Please download and watch it. -

- -109 -00:11:40 --> 00:11:48 -The Spoken Tutorial Project team conducts workshops and gives certificates. -

For more details, please write to us. -

- -110 -00:11:49 --> 00:11:52 -Please post your timed queries in this forum. - -111 -00:11:53 --> 00:12:03 -Spoken Tutorial project is funded by NMEICT, MHRD, Government of India. -

More information on this mission is available at this link. -

- -112 -00:12:04 --> 00:12:09 -This is Nirmala Venkat from IIT Bombay, signing off. Thanks for watching. - diff --git a/media/videos/92/933/Select-with-Aggregate-functions-English.srt b/media/videos/92/933/Select-with-Aggregate-functions-English.srt deleted file mode 100644 index 4436482..0000000 --- a/media/videos/92/933/Select-with-Aggregate-functions-English.srt +++ /dev/null @@ -1,440 +0,0 @@ -Narration - -1 -00:00:01 --> 00:00:06 -Welcome to the Spoken Tutorial on Select with Aggregate functions. - -2 -00:00:07 --> 00:00:15 -In this tutorial, we will learn more clauses that can be used with the select statement, such as- -

Distinct, -

- -3 -00:00:16 --> 00:00:18 -Between, -

Like, -

- -4 -00:00:19 --> 00:00:25 -In, -

Is Null and Aggregate functions. -

- -5 -00:00:26 --> 00:00:40 -To record this tutorial, I am using: -

Ubuntu Linux 14.04 operating system, -

PostgreSQL 9.3.x, -

pgAdmin 1.18 -

- -6 -00:00:41 --> 00:00:47 -To follow this tutorial, you should have basic understanding of database and tables. - -7 -00:00:48 --> 00:00:54 -For more details, refer to the RDBMS – PostgreSQL series on this website. - -8 -00:00:55 --> 00:01:00 -Let’s begin. First we will learn about the DISTINCT clause. - -9 -00:01:01 --> 00:01:17 -DISTINCT keyword is used in the SELECT statement to list distinct and unique values. -

It removes the duplicate rows or column values from the query result. -

- -10 -00:01:18 --> 00:01:27 -The syntax is as follows: -

SELECT DISTINCT column-names FROM table-name WHERE [condition] -

- -11 -00:01:28 --> 00:01:32 -Let us open the pgAdmin for the demonstration. - -12 -00:01:33 --> 00:01:37 -Click on the SQL icon to open the SQL Editor. - -13 -00:01:38 --> 00:01:47 -Type the code as shown here. -

This select statement will retrieve the unique city names from the students table. -

- -14 -00:01:48 --> 00:01:53 -It will eliminate duplicate values from the specified column i.e. city. - -15 -00:01:54 --> 00:01:58 -Let us execute the query to see the output. - -16 -00:01:59 --> 00:02:02 -Next, we will learn about the BETWEEN operator. - -17 -00:02:03 --> 00:02:08 -BETWEEN operator is used to retrieve values within a given range. - -18 -00:02:09 --> 00:02:18 -The syntax is: SELECT column-names FROM table-name WHERE column-name BETWEEN value1 and value2; - -19 -00:02:19 --> 00:02:22 -Let's see an example for between operator. - -20 -00:02:23 --> 00:02:27 -Let's clear the screen and type the code for the query. - -21 -00:02:28 --> 00:02:37 -Say, I want to retrieve details of students who are born between January 1995 and January 1996. - -22 -00:02:38 --> 00:02:46 -Let's see the output. -

Notice the output shows the list of students as expected. -

- -23 -00:02:47 --> 00:02:51 -We will see another example for BETWEEN operator. - -24 -00:02:52 --> 00:03:01 -This query will show all rows from the students table where the cgpa value is between 7.8 and 8.5. - -25 -00:03:02 --> 00:03:04 -Let us see the output. - -26 -00:03:05 --> 00:03:12 -Notice from the output that the value is inclusive of 7.8 and 8.5. - -27 -00:03:13 --> 00:03:17 -The same query can also be written as shown here. - -28 -00:03:18 --> 00:03:26 -Instead of BETWEEN operator, we can use- greater than or equal to and -

lesser than or equal to operators. -

- -29 -00:03:27 --> 00:03:31 -Execute the query to see the output. - -30 -00:03:32 --> 00:03:35 -Next we will learn about the LIKE operator. - -31 -00:03:36 --> 00:03:41 -LIKE operator is used to match text values against a given pattern. - -32 -00:03:42 --> 00:03:46 -It allows wildcard characters to be used within the WHERE clause. - -33 -00:03:47 --> 00:03:52 -There are two wildcards that can be used in conjunction with the LIKE operator- - -34 -00:03:53 --> 00:03:59 -Percent (%): -

The percent sign matches any sequence of string of any length. -

- -35 -00:04:00 --> 00:04:05 -Underscore (_): -

The underscore matches a single character. -

- -36 -00:04:06 --> 00:04:10 -We will see few examples using percent wildcard. - -37 -00:04:11 --> 00:04:21 -Suppose I don't remember the exact name of a student. -

But I remember that the student’s name begins with the letter 'Ra'. -

- -38 -00:04:22 --> 00:04:28 -It is very difficult to search the entire students table as there are many rows in the table. - -39 -00:04:29 --> 00:04:34 -To make the search easy, we can use the LIKE operator as shown here. - -40 -00:04:35 --> 00:04:47 -Here, all the student's names start with 'Ra' and is followed by any sequence of characters. -

This is called pattern matching. -

- -41 -00:04:48 --> 00:04:51 -Let us see a few more examples. - -42 -00:04:52 --> 00:04:55 -Type the code as shown. - -43 -00:04:56 --> 00:05:02 -This query returns those rows where the students’ names end with 'la'. - -44 -00:05:03 --> 00:05:09 -There can be any number of characters before 'la'. - -45 -00:05:10 --> 00:05:20 -Let us see another pattern. -

This statement returns all the rows where the student’s name has 'am' in the middle. -

- -46 -00:05:21 --> 00:05:26 -Note percent sign before and after 'am'. - -47 -00:05:27 --> 00:05:33 -Next we will see how to use underscore to match a single character. - -48 -00:05:34 --> 00:05:43 -This will fetch rows of students whose name has three characters and has 'a' in the 2nd position. - -49 -00:05:44 --> 00:05:57 -Underscore 'r' percent matches students whose names begin with a single character. -

It is followed by 'r' and ends with any number of characters. -

Let's see the output. -

- -50 -00:05:58 --> 00:06:02 -Next we will see how to use IN operator. - -51 -00:06:03 --> 00:06:21 -Use IN operator in the WHERE clause to check if the value matches any value in a given list. -

The syntax is: Select column-name from table-name WHERE column-name IN ( value1, value2...) etc. -

- -52 -00:06:22 --> 00:06:24 -Let us see an example. - -53 -00:06:25 --> 00:06:34 -This statement will return all rows from the students table where the city is either Chennai, Nagpur or Hyderabad. - -54 -00:06:35 --> 00:06:43 -It helps to reduce the usage of multiple OR conditions to get the same result. -

Let us see the output. -

- -55 -00:06:44 --> 00:06:50 -Next we will see how to use the IS NULL operator in the select statement. - -56 -00:06:51 --> 00:06:57 -This statement will list down the records where the date of birth column is empty. - -57 -00:06:58 --> 00:07:06 -In the same way, we can also use the IS NOT NULL operator as shown here. - -58 -00:07:07 --> 00:07:10 -Let us now learn about aggregate function. - -59 -00:07:11 --> 00:07:15 -Aggregate functions are PostgreSQL built-in functions. - -60 -00:07:16 --> 00:07:21 -It operates on several rows of a query and returns a single result. - -61 -00:07:22 --> 00:07:24 -List of aggregate functions - - -62 -00:07:25 --> 00:07:29 -Count – It returns the number of rows in a table. - -63 -00:07:30 --> 00:07:33 -Sum – Returns the sum of a selected column. - -64 -00:07:34 --> 00:07:38 -Max - Returns the largest value of a specified column. - -65 -00:07:39 --> 00:07:43 -Min – Returns the smallest value of a specified column. - -66 -00:07:44 --> 00:07:48 -Avg – Returns the average value for a specified column. - -67 -00:07:49 --> 00:07:52 -Switch back to SQL Editor window. - -68 -00:07:53 --> 00:08:02 -Let’s say, we want to count the number of existing records in the students table. -

For that, type the code as shown here. -

- -69 -00:08:03 --> 00:08:12 -The count open parentheses asterisk close parentheses function returns the number of rows that are fetched by the SELECT statement. - -70 -00:08:13 --> 00:08:16 -Execute this query to see the output. - -71 -00:08:17 --> 00:08:20 -There are 14 records in the students table. - -72 -00:08:21 --> 00:08:26 -We can also specify the column name in the function as shown here. - -73 -00:08:27 --> 00:08:30 -Once again execute the query. - -74 -00:08:31 --> 00:08:39 -Why is it showing 13? -

Because the count function only counts values which are not NULL. -

- -75 -00:08:40 --> 00:08:44 -Let us see the output when we specify the date of birth column. - -76 -00:08:45 --> 00:08:48 -Type the code and execute. - -77 -00:08:49 --> 00:08:55 -Here, we can see the date of birth column value is NULL for the student 'Ram charan'. - -78 -00:08:56 --> 00:09:06 -I have left date of birth column blank during record creation for this student. -

So the count function displays the output as 13. -

- -79 -00:09:07 --> 00:09:10 -Next, let us see how to use the SUM function. - -80 -00:09:11 --> 00:09:13 -Let us clear the screen. - -81 -00:09:14 --> 00:09:23 -Type the code as shown here and execute the query. -

This returns the summed-up value of the cgpa column. -

- -82 -00:09:24 --> 00:09:29 -You can also give an additional 'Where' condition as shown here. - -83 -00:09:30 --> 00:09:37 -This returns the sum of cgpa values of the students who are from Mumbai city. - -84 -00:09:38 --> 00:09:41 -Next, let us find the maximum cgpa score. - -85 -00:09:42 --> 00:09:53 -This select statement returns the maximum cgpa score from the students table. -

9.6 is the highest cgpa score in the students table. -

- -86 -00:09:54 --> 00:09:59 -Likewise, you can try the remaining aggregate functions on your own. - -87 -00:10:00 --> 00:10:05 -With this we come to the end of this tutorial. -

Let us summarize. -

- -88 -00:10:06 --> 00:10:20 -In this tutorial, we have learnt about More clauses that can be used with the select statement, such as- -

Distinct , Between , Like , In , Is Null and Aggregate functions. -

- -89 -00:10:21 --> 00:01:30 -As an assignment, write select statements to display all columns from students table where the student name ends with 'a'. - -90 -00:01:31 --> 00:10:35 -Display the minimum and average of the cgpa column. - -91 -00:10:36 --> 00:10:43 -The video at the following link summarizes the Spoken Tutorial project. -

Please download and watch it. -

- -92 -00:10:44 --> 00:10:53 -The Spoken Tutorial Project team -

conducts workshops and gives certificates -

For more details, please write to us. -

- -93 -00:10:54 --> 00:10:57 -Please post your timed queries in this forum. - -94 -00:10:58 --> 00:11:10 -Spoken Tutorial project is funded by NMEICT, MHRD, Government of India. -

More information on this mission is available at this link. -

- -95 -00:11:11 --> 00:11:16 -This is Nirmala Venkat from IIT Bombay, signing off. Thanks for watching. - diff --git a/media/videos/92/967/Foreign-key-Constraint-English.srt b/media/videos/92/967/Foreign-key-Constraint-English.srt deleted file mode 100644 index f4820c4..0000000 --- a/media/videos/92/967/Foreign-key-Constraint-English.srt +++ /dev/null @@ -1,497 +0,0 @@ -Narration - -1 -00:00:01 --> 00:00:05 -Welcome to the Spoken Tutorial on Foreign key constraint. - -2 -00:00:06 --> 00:00:12 -In this tutorial, we will learn about -

Foreign key constraint, -

Alter table command, -

- -3 -00:00:13 --> 00:00:16 -how to add a foreign key and -

check constraint. -

- -4 -00:00:17 --> 00:00:23 -To record this tutorial, I am using: Ubuntu Linux 14.04 operating system, - -5 -00:00:24 --> 00:00:31 -PostgreSQL 9.3.x and -

pgAdmin 1.18 -

- -6 -00:00:32 --> 00:00:38 -To follow this tutorial, you should have basic understanding of database and tables. - -7 -00:00:39 --> 00:00:45 -For more details, refer to the RDBMS – PostgreSQL series on this website. - -8 -00:00:46 --> 00:00:48 -This is the students table which we created. - -9 -00:00:49 --> 00:00:57 -I want to add details such as department name and department head for each student as shown here. - -10 -00:00:58 --> 00:01:03 -As we can see, the department name and department head data is repeated. - -11 -00:01:04 --> 00:01:10 -So, we will separate these data into different tables and then relate them with foreign key. - -12 -00:01:11 --> 00:01:19 -It is important to separate student and department data into separate tables since one can exist without another. - -13 -00:01:20 --> 00:01:21 -What is a foreign key? - -14 -00:01:22 --> 00:01:27 -A foreign key represents a link between columns in two different tables. - -15 -00:01:28 --> 00:01:32 -A foreign key in a table points to a primary key in another table. - -16 -00:01:33 --> 00:01:37 -A table can contain more than one foreign key constraint. - -17 -00:01:38 --> 00:01:44 -The table that has the foreign key is called as the referencing table or child table. - -18 -00:01:45 --> 00:01:51 -The table to which the foreign key references is called the referenced table or parent table. - -19 -00:01:52 --> 00:01:58 -Let’s see an example of foreign key link between students and department tables. - -20 -00:01:59 --> 00:02:08 -Here, the department table is the parent table in which the departmentid is the primary key. -

Students table is the child table. -

- -21 -00:02:09 --> 00:02:16 -Deptid column is the foreign key which references the departmentid of the department table. - -22 -00:02:17 --> 00:02:23 -Note that the foreign key column and the referenced key column must have similar data types. - -23 -00:02:24 --> 00:02:28 -Open the SQL editor window in the pgAdmin. - -24 -00:02:29 --> 00:02:34 -First let us create the parent table department i.e the referenced table. - -25 -00:02:35 --> 00:02:48 -Type the code. -

Departmenttid is the primary key which uniquely identifies each department. -

The parent table department is ready to execute. -

- -26 -00:02:49 --> 00:02:52 -Let's insert some data to the department table. - -27 -00:02:53 --> 00:02:58 -Clear the editor window. -

Type the code and execute the query. -

- -28 -00:02:59 --> 00:03:09 -Now, let us retrieve the records. -

Clear the window. Type: select asterisk from department. -

- -29 -00:03:10 --> 00:03:18 -This is the parent table. Each student must belong to one of the departments shown here. - -30 -00:03:19 --> 00:03:21 -Switch back to the pgAdmin main screen. - -31 -00:03:22 --> 00:03:26 -We have already created the students table with the 'Create table' command. - -32 -00:03:27 --> 00:03:38 -Next we need to add a new column deptid to the existing students table. -

This will assign each student to a particular department. -

- -33 -00:03:39 --> 00:03:42 -To do so, we need to use the Alter table command. - -34 -00:03:43 --> 00:03:48 -Alter table command is used to change the structure of an existing table. - -35 -00:03:49 --> 00:03:59 -This command is used to add, delete or modify columns in an existing table. -

It is used to add or drop constraints. -

- -36 -00:04:00 --> 00:04:05 -Using this command, even the data type of the columns can be changed. - -37 -00:04:06 --> 00:04:15 -The syntax to Alter table is ALTER TABLE table-name ADD new-column-name data type; - -38 -00:04:16 --> 00:04:21 -The syntax to add multiple columns at the same time is shown here. - -39 -00:04:22 --> 00:04:27 -Let’s switch back to the pgadmin SQL editor window for the demonstration. - -40 -00:04:28 --> 00:04:36 -Let us add a new column by the name deptid to the students table. -

Type the code and execute. -

- -41 -00:04:37 --> 00:04:41 -Let us check this. -

Go to the pgAdmin main screen. -

- -42 -00:04:42 --> 00:04:51 -Right-click on students column node and select Refresh to update the changes. -

We can see the deptid column. -

- -43 -00:04:52 --> 00:04:55 -Now, let us add the foreign key constraint. - -44 -00:04:56 --> 00:05:04 -Type the code as shown. Here, deptid column of students table is a foreign key. - -45 -00:05:05 --> 00:05:10 -This references the departmentid column of the department table. - -46 -00:05:11 --> 00:05:17 -The foreign key constraint maintains referential integrity between the child and parent tables. - -47 -00:05:18 --> 00:05:24 -This means that the values in a column must match the values in some row of another table. - -48 -00:05:25 --> 00:05:27 -Let us now execute the query. - -49 -00:05:28 --> 00:05:35 -Go to the pgAdmin main screen. -

Right click on the students table node and click refresh. -

- -50 -00:05:36 --> 00:05:42 -In the SQL Pane, we can see a constraint name for each constraint automatically created. - -51 -00:05:43 --> 00:05:48 -We can also specify a constraint name while creating or altering a table. - -52 -00:05:49 --> 00:05:54 -Use this constraint name to drop the constraint if it is not required later. - -53 -00:05:55 --> 00:06:02 -Now right-click on students node, and then on View data and then on View All rows. - -54 -00:06:03 --> 00:06:11 -Deptid column is empty. Let us add department details to each student as shown. - -55 -00:06:12 --> 00:06:19 -Let me type 'MEC' for Mechanical department, for the student Pooja and press Enter. - -56 -00:06:20 --> 00:06:32 -We can see a error message of “foreign key violation”. -

It says deptid='mec' is not present in table department. -

- -57 -00:06:33 --> 00:06:39 -Foreign key constraint prevents invalid data from being inserted into the foreign key columns. - -58 -00:06:40 --> 00:06:48 -It has to be one of the values of the referencing column. I.e departmentid column value from the department table. - -59 -00:06:49 --> 00:06:51 -Click on the OK button. - -60 -00:06:52 --> 00:06:57 -Now, I'll enter 'MT' as department id and save the record. - -61 -00:06:58 --> 00:07:03 -Enter a valid departmentid for other students also as shown. - -62 -00:07:04 --> 00:07:08 -Let me open department and students table in 2 different windows. - -63 -00:07:09 --> 00:07:18 -These tables have One-to-Many relationship. -

A row from one table can have multiple matching rows in another table. -

- -64 -00:07:19 --> 00:07:24 -This relationship is created using Primary key and Foreign key constraints. - -65 -00:07:25 --> 00:07:30 -Let us see the advantages of using Foreign key. -

It will enforce the constraint. -

- -66 -00:07:31 --> 00:07:41 -For example, it will enforce every student should have a department. -

It controls redundancy and avoid inconsistency. -

- -67 -00:07:42 --> 00:07:49 -For example, it controls the entry of different names of head for the same department. - -68 -00:07:50 --> 00:07:53 -Next we will learn more about Alter table command. - -69 -00:07:54 --> 00:08:01 -We can use ALTER TABLE Alter column command to change the data type or length of a column in a table. - -70 -00:08:02 --> 00:08:10 -The syntax is ALTER TABLE table-name ALTER column-name TYPE data type; - -71 -00:08:11 --> 00:08:17 -Say, I want to change the cgpa column's length from 2,1 to 3,1. - -72 -00:08:18 --> 00:08:21 -Type the code as shown and then execute. - -73 -00:08:22 --> 00:08:26 -Now, the cgpa column length is altered in the students table. - -74 -00:08:27 --> 00:08:33 -Let's check. Refresh the students table and see the changes. - -75 -00:08:34 --> 00:08:36 -Next we will learn about constraints. - -76 -00:08:37 --> 00:08:42 -Constraints are the conditions or rules enforced on columns or tables. - -77 -00:08:43 --> 00:08:47 -These are used to prevent invalid data entry into the database. - -78 -00:08:48 --> 00:08:56 -Column level constraints are applied to only one column. -

Table level constraints are applied to the whole table. -

- -79 -00:08:57 --> 00:09:03 -Some of the commonly used constraints in PostgreSQL are: -

NOT NULL constraint, -

UNIQUE constraint, -

- -80 -00:09:04 --> 00:09:10 -Primary key constraint, -

Foreign key constraint, -

and Check constraint. -

- -81 -00:09:11 --> 00:09:15 -Next, we will see how to add a check constraint to the cgpa column. - -82 -00:09:16 --> 00:09:32 -Type the code as shown. -

Alter table students add constraint cgpa underscore chk check cgpa greater than or equal to zero and cgpa less than or equal to 10. -

- -83 -00:09:33 --> 00:09:38 -Here, I have given the constraint name as cgpa underscore chk. - -84 -00:09:39 --> 00:09:50 -It specifies a condition that the cgpa value should be between 0 and 10. -

This restricts the user from entering invalid data. -

- -85 -00:09:51 --> 00:09:53 -Let’s now execute the query. - -86 -00:09:54 --> 00:10:01 -Now, let us insert one more record to the students table with cgpa as 22 and see what happens. - -87 -00:10:02 --> 00:10:07 -Right-click on students node, select View Data and then Views All Rows. - -88 -00:10:08 --> 00:10:10 -I'll enter the data as shown. - -89 -00:10:11 --> 00:10:16 -In the cgpa column, I'll enter 22 and press Enter. - -90 -00:10:17 --> 00:10:21 -We can see an error message of check constraint violation. - -91 -00:10:22 --> 00:10:28 -This indicates that we have entered a invalid data. -

Click on the “OK” button. -

- -92 -00:10:29 --> 00:10:40 -Now enter 10 as cgpa, CS as deptid and save the record. -

The record is successfully saved. -

- -93 -00:10:41 --> 00:10:46 -Let us see the syntax for how to use constraints in the create table command. - -94 -00:10:47 --> 00:10:49 -Switch to the pgAdmin main screen. - -95 -00:10:50 --> 00:10:53 -Click on the students node and then refresh. - -96 -00:10:54 --> 00:11:03 -Now come to the sql pane. -

Here we can see the create table syntax for the students table along with the constraints. -

- -97 -00:11:04 --> 00:11:10 -We can add constraints while creating a table if the table structure is properly designed initially. - -98 -00:11:11 --> 00:11:16 -With this, we come to the end of this tutorial. -

Let us summarize. -

- -99 -00:11:17 --> 00:11:22 -In this tutorial, we have learnt about -

Foreign key constraint, -

Alter table command, -

- -100 -00:11:23 --> 00:11:27 -how to add a foreign key and Check constraints. - -101 -00:11:28 --> 00:11:34 -As an Assignment, alter the students table to add a NOT NULL constraint to the column city. - -102 -00:11:35 --> 00:11:43 -Insert a record and leave the city column empty. -

Save the record. Note the error and resolve it. -

- -103 -00:11:44 --> 00:11:51 -The video at the following link summarizes the Spoken Tutorial project. -

Please download and watch it. -

- -104 -00:11:52 --> 00:11:59 -The Spoken Tutorial Project team conducts workshops gives certificates. -

For more details, please write to us. -

- -105 -00:12:00 --> 00:12:03 -Please post your timed queries in this forum. - -106 -00:12:04 --> 00:12:14 -Spoken Tutorial project is funded by NMEICT, MHRD, Government of India. -

More information on this mission is available at this link. -

- -107 -00:12:15 --> 00:12:20 -This is Nirmala Venkat from IIT Bombay, signing off. Thanks for watching. - diff --git a/media/videos/92/982/Aggregation-facilities-in-SQL-English.srt b/media/videos/92/982/Aggregation-facilities-in-SQL-English.srt deleted file mode 100644 index f39bcac..0000000 --- a/media/videos/92/982/Aggregation-facilities-in-SQL-English.srt +++ /dev/null @@ -1,401 +0,0 @@ -Narration - -1 -00:00:01 --> 00:00:06 -Welcome to the Spoken Tutorial on Aggregation facilities in SQL. - -2 -00:00:07 --> 00:00:15 -In this tutorial, we will learn about: Group by , Having and Order by clause. - -3 -00:00:16 --> 00:00:22 -To record this tutorial, I am using: Ubuntu Linux 14.04 operating system, - -4 -00:00:23 --> 00:00:30 -PostgreSQL 9.3.x, -

pgAdmin 1.18 -

- -5 -00:00:31 --> 00:00:40 -To follow this tutorial, you should have basic understanding of SELECT statement and Aggregate functions. - -6 -00:00:41 --> 00:00:47 -For more details, refer to the previous RDBMS PostgreSQL tutorials on this website. - -7 -00:00:48 --> 00:00:54 -Aggregate functions perform calculations on a set of values and return a single value. - -8 -00:00:55 --> 00:00:59 -We learnt about these functions in the earlier tutorials. - -9 -00:01:00 --> 00:01:05 -Aggregate functions are mostly used with the Group By clause of the SELECT statement. - -10 -00:01:06 --> 00:01:11 -Group by clause is used to collect identical data in groups. - -11 -00:01:12 --> 00:01:20 -It returns one record for each group. -

Group by can be done with one or more columns. -

- -12 -00:01:21 --> 00:01:36 -The syntax for group by clause is: -

SELECT column1 comma aggregate-function of column2 -

FROM table-name' -

[WHERE condition] -

GROUP BY column1 comma column2 -

- -13 -00:01:37 --> 00:01:42 -Let’s open the SQL Editor window in pgAdmin for demonstration. - -14 -00:01:43 --> 00:01:49 -Type the code as shown here and execute the query. - -15 -00:01:50 --> 00:01:59 -We can see the student details from various departments and cities. -

How can we group these records based on a column? -

- -16 -00:02:00 --> 00:02:05 -Say, we want to display how many students are there in each department. - -17 -00:02:06 --> 00:02:10 -Let us write a query. -

First, clear the SQL editor window. -

- -18 -00:02:11 --> 00:02:14 -Now type the code as shown here. - -19 -00:02:15 --> 00:02:20 -This query will group the records in the students table with the deptid column. - -20 -00:02:21 --> 00:02:27 -After grouping, the aggregate function 'Count' will count the number of records under each department. - -21 -00:02:28 --> 00:02:35 -The grouping is based on rows with the same value in the specified column i.e deptid - -22 -00:02:36 --> 00:02:39 -Note that the table is not physically rearranged. - -23 -00:02:40 --> 00:02:43 -Let’s execute the code and see the output. - -24 -00:02:44 --> 00:02:48 -The number of students in each department is displayed as output. - -25 -00:02:49 --> 00:02:53 -Next, let us see how to add where condition in the Group by clause. - -26 -00:02:54 --> 00:02:56 -We will change the same code to add a condition. - -27 -00:02:57 --> 00:03:03 -Here a where condition is specified to display the total number of students in the department 'CS'. - -28 -00:03:04 --> 00:03:10 -The Where clause used in a query containing a Group By clause, eliminates the rows before grouping. - -29 -00:03:11 --> 00:03:13 -Execute the code now to see the output. - -30 -00:03:14 --> 00:03:17 -Let us see a few more examples of Group by clause. - -31 -00:03:18 --> 00:03:20 -Type the code as shown here. - -32 -00:03:21 --> 00:03:30 -I want to group the students table to find out the number of male and female students. -

So, we have to group the rows with the column gender. -

- -33 -00:03:31 --> 00:03:32 -Execute the query. - -34 -00:03:33 --> 00:03:35 -We can see the output as expected. - -35 -00:03:36 --> 00:03:42 -Now I want to find out the maximum CGPA score of students from each city. - -36 -00:03:43 --> 00:03:47 -For this, I'll type the query as shown. - -37 -00:03:48 --> 00:03:51 -Now execute the code to see the output. - -38 -00:03:52 --> 00:03:58 -Likewise, we can make use of any aggregate function in the SELECT statement with Group by clause. - -39 -00:03:59 --> 00:04:04 -Next we will see how to use more than one column in Group by clause. - -40 -00:04:05 --> 00:04:07 -Type the code as shown here. - -41 -00:04:08 --> 00:04:13 -Here, after group by you can see two columns deptid and city. - -42 -00:04:14 --> 00:04:20 -First it will group the records with department and then group with city, for each department. - -43 -00:04:21 --> 00:04:31 -The list of column names in the SELECT clause must appear in the Group by clause also. -

Let us execute and see the output. -

- -44 -00:04:32 --> 00:04:35 -Next we will learn about the Having clause. - -45 -00:04:36 --> 00:04:42 -HAVING clause is used to retrieve rows for the specified condition from a grouped result. - -46 -00:04:43 --> 00:04:53 -Use the WHERE clause to exclude rows that you don't want to group, whereas use the HAVING clause to filter rows after they have been grouped. - -47 -00:04:54 --> 00:05:08 -The syntax is -

SELECT column1 comma aggregate-function of column2 -

FROM table-name -

[WHERE condition] -

GROUP BY column1 comma column2 -

HAVING Condition -

- -48 -00:05:09 --> 00:05:14 -Let us see an example for this. -

Switch to the SQL Editor window. -

- -49 -00:05:15 --> 00:05:23 -We will add the condition 'having city= 'Chennai'. -

The HAVING clause comes after the Group By clause. -

- -50 -00:05:24 --> 00:05:31 -Note that you can apply HAVING clause only to columns that appear in the Group By clause or an aggregate function. - -51 -00:05:32 --> 00:05:34 -Execute and see the result. - -52 -00:05:35 --> 00:05:44 -We can see two rows as output. -

There are 3 students from CS department and 1 student from EE department. -

- -53 -00:05:45 --> 00:05:49 -The condition specifies that the students are from Chennai. - -54 -00:05:50 --> 00:05:52 -Let’s see another example. - -55 -00:05:53 --> 00:06:01 -Here, we are using aggregate function 'count' in the having clause. -

That is, the count should be greater than 1. -

- -56 -00:06:02 --> 00:06:10 -Here, the student records are grouped by department and then by city. -

The having condition is applied to the filtered rows. -

- -57 -00:06:11 --> 00:06:15 -Once again, execute to see the result. - -58 -00:06:16 --> 00:06:18 -Next we will see the Order by clause. - -59 -00:06:19 --> 00:06:24 -Order By clause is used to sort the records in ascending or descending order. - -60 -00:06:25 --> 00:06:29 -This clause is always used at the end of the SELECT statement. - -61 -00:06:30 --> 00:06:33 -The syntax is shown here. - -62 -00:06:34 --> 00:06:37 -Let us switch back to SQL Editor window for demonstration. - -63 -00:06:38 --> 00:06:41 -Type the code as shown on the screen. - -64 -00:06:42 --> 00:06:46 -I have added the Order by clause to the end of the SELECT statement. - -65 -00:06:47 --> 00:06:55 -Now execute the query. -

We see that the total number of students in each department is sorted in ascending order. -

- -66 -00:06:56 --> 00:07:00 -By default, the sorting is always done in ascending order. - -67 -00:07:01 --> 00:07:06 -Type DESC at the end of the query to sort in descending order. - -68 -00:07:07 --> 00:07:10 -Execute the query to see the output. - -69 -00:07:11 --> 00:07:15 -We can also sort result set on multiple columns. - -70 -00:07:16 --> 00:07:22 -Type the code. -

This query will sort the students table by city in ascending order. -

- -71 -00:07:23 --> 00:07:30 -Use a comma to separate the columns. -

Then, within each city, it will sort by the student names. -

- -72 -00:07:31 --> 00:07:37 -Columns specified in the ORDER BY clause must be one of the columns selected in the SELECT column list. - -73 -00:07:38 --> 00:07:49 -Let us see the output. Here the city is sorted in ascending order and within each city the student name is sorted in ascending order. - -74 -00:07:50 --> 00:07:57 -Let us modify the same query to see city in descending order and the student name in ascending order. - -75 -00:07:58 --> 00:08:02 -Execute to see the output. - -76 -00:08:03 --> 00:08:10 -We will see another example of order by in Group by clause. -

Execute the query to see the output. -

- -77 -00:08:11 --> 00:08:24 -Here we can see the sorted result of grouped rows. -

Dept id is sorted in ascending order and within each department, the city is sorted in ascending order. -

- -78 -00:08:25 --> 00:08:31 -With this we come to the end of this tutorial. -

Let us summarize. -

- -79 -00:08:32 --> 00:08:39 -In this tutorial, we have learnt about the clauses: -

Group by -

Having -

Order by. -

- -80 -00:08:40 --> 00:08:46 -As an assignment- Write a Select statement to display the number of students with the same CGPA. - -81 -00:08:47 --> 00:08:50 -Hint: Group the rows by CGPA column. - -82 -00:08:51 --> 00:08:57 -The video at the following link summarizes the Spoken Tutorial project. -

Please download and watch it. -

- -83 -00:08:58 --> 00:09:06 -The Spoken Tutorial Project team conducts workshops and gives certificates. -

For more details, please write to us. -

- -84 -00:09:07 --> 00:09:10 -Please post your timed queries in this forum. - -85 -00:09:11 --> 00:09:21 -Spoken Tutorial project is funded by NMEICT, MHRD, Government of India. -

More information on this mission is available at this link. -

- -86 -00:09:22 --> 00:09:27 -This is Nirmala Venkat from IIT Bombay, signing off. Thanks for watching. - diff --git a/media/videos/92/985/Updating-Data-English.srt b/media/videos/92/985/Updating-Data-English.srt deleted file mode 100644 index fe0e44b..0000000 --- a/media/videos/92/985/Updating-Data-English.srt +++ /dev/null @@ -1,287 +0,0 @@ -Narration - -1 -00:00:01 --> 00:00:05 -Welcome to the Spoken Tutorial on Updating Data. - -2 -00:00:06 --> 00:00:12 -In this tutorial, we will learn about Update statement and Delete statement. - -3 -00:00:13 --> 00:00:19 -To record this tutorial, I am using: -

Ubuntu Linux 14.04 operating system, -

- -4 -00:00:20 --> 00:00:27 -PostgreSQL 9.3.x -

and pgAdmin 1.18 -

- -5 -00:00:28 --> 00:00:34 -To follow this tutorial, you should have basic understanding of SELECT statement. - -6 -00:00:35 --> 00:00:40 -For more details, refer to the RDBMS PostgreSQL series on this website. - -7 -00:00:41 --> 00:00:46 -The update query is used to modify the existing records in a table. - -8 -00:00:47 --> 00:00:52 -We have to use the WHERE clause with the UPDATE statement to update the selected rows. - -9 -00:00:53 --> 00:01:02 -The syntax for update statement is shown here. -

The columns to be modified are to be specified in the SET clause. -

- -10 -00:01:03 --> 00:01:11 -Column1 would be assigned the value1 and Column2 would be assigned the value2 and so on. - -11 -00:01:12 --> 00:01:16 -Other columns in the table will retain their previous values. - -12 -00:01:17 --> 00:01:23 -WHERE clause is used to find the exact row based on the specified condition to update it. - -13 -00:01:24 --> 00:01:29 -If no conditions are provided then all records in the table will be updated. - -14 -00:01:30 --> 00:01:33 -Let's switch to pgAdmin main screen. - -15 -00:01:34 --> 00:01:42 -Now, right-click on students node, then on View data and then on View All rows. - -16 -00:01:43 --> 00:01:50 -Notice here - it says the student whose id is 's008', is from 'Chennai' city. - -17 -00:01:51 --> 00:01:55 -Now I want to change the city to 'Bangalore' for this student. - -18 -00:01:56 --> 00:02:04 -Now, switch to the SQL editor window and type the update statement as shown here. - -19 -00:02:05 --> 00:02:09 -This is a simple update statement which updates a single column. - -20 -00:02:10 --> 00:02:17 -The existing city value 'Chennai' will be changed to 'Bangalore' for the studentid s008. - -21 -00:02:18 --> 00:02:23 -Execute the query. -

We can see a message that the query is successful. -

- -22 -00:02:24 --> 00:02:27 -Let's retrieve the record to see the changes. - -23 -00:02:28 --> 00:02:33 -Clear the editor window and type this select statement. - -24 -00:02:34 --> 00:02:44 -Now, execute the query to see the output. -

Note the updated value in the city field for student ‘s008’. -

- -25 -00:02:45 --> 00:02:49 -Next we will see how to update multiple columns. - -26 -00:02:50 --> 00:03:01 -Type the code. We can also update multiple columns by separating the column and value pairs, with commas, as shown here. - -27 -00:03:02 --> 00:03:07 -Remember, the date of birth column was null for the student 'Ram charan'. - -28 -00:03:08 --> 00:03:15 -This will update two columns, date of birth and city, with the values given in the update statement. - -29 -00:03:16 --> 00:03:19 -What will happen if you forget to give the where condition? - -30 -00:03:20 --> 00:03:24 -The entire students table will be updated with the given value. - -31 -00:03:25 --> 00:03:27 -Execute the query. - -32 -00:03:28 --> 00:03:32 -Let us see the updated value for the student name ‘Ram Charan’. - -33 -00:03:33 --> 00:03:36 -Type the select statement as shown here. - -34 -00:03:37 --> 00:03:45 -Execute the query. -

We can see the date of birth column and city column have been updated. -

- -35 -00:03:46 --> 00:03:49 -Next we will learn about the delete statement. - -36 -00:03:50 --> 00:03:58 -The syntax for delete statement is as follows: -

DELETE FROM table-name -

[WHERE condition] -

- -37 -00:03:59 --> 00:04:05 -WHERE clause is used in the delete statement to delete specific rows which satisfy a particular condition. - -38 -00:04:06 --> 00:04:10 -All records will be deleted if no conditions are specified. - -39 -00:04:11 --> 00:04:14 -Let us see an example of the delete statement. - -40 -00:04:15 --> 00:04:17 -Switch to the SQL Editor window. - -41 -00:04:18 --> 00:04:27 -Type the code as shown here. -

This statement will delete the student record whose id is 's014'. -

- -42 -00:04:28 --> 00:04:33 -Let us execute the query. -

So, one row is deleted now. -

- -43 -00:04:34 --> 00:04:39 -If you want to remove all the rows from the students table, type delete from students. - -44 -00:04:40 --> 00:04:49 -There is no Where condition is specified here. -

I'll not execute the query, as I don’t want to delete all the records. -

- -45 -00:04:50 --> 00:04:56 -Next let us see an example where we have two conditions in the DELETE statement. - -46 -00:04:57 --> 00:05:00 -Type the code as shown here. - -47 -00:05:01 --> 00:05:14 -This delete statement will delete the student details which satisfies two different conditions. -

That is, the department should be 'CS' and CGPA score should be less than 7.5 -

- -48 -00:05:15 --> 00:05:17 -Let us execute this query. - -49 -00:05:18 --> 00:05:26 -In the output, we can see ‘0 rows affected’. -

This indicates that no records are deleted. -

- -50 -00:05:27 --> 00:05:33 -That means there are no records in the student table which satisfies both the conditions. - -51 -00:05:34 --> 00:05:46 -With this we have covered the basics of common SQL statements such as -

INSERT , SELECT , DELETE and UPDATE in this series. -

- -52 -00:05:47 --> 00:05:57 -These statements are otherwise called as Data Manipulation language. -

DML is the short form of Data Manipulation Language. -

- -53 -00:05:58 --> 00:06:03 -It includes commands that are used to manipulate data in a database. - -54 -00:06:04 --> 00:06:09 -With this we come to the end of this tutorial. -

Let us summarize. -

- -55 -00:06:10 --> 00:06:16 -In this tutorial, we have learnt about the - Update statement and Delete statement. - -56 -00:06:17 --> 00:06:27 -As an assignment, for studentid 's013', modify the student name from 'Sharmila' to 'Sharmila Babu' in the students table. - -57 -00:06:28 --> 00:06:32 -Delete the students whose cgpa is less than 5. - -58 -00:06:33 --> 00:06:39 -The video at the following link summarizes the Spoken Tutorial project. -

Please download and watch it. -

- -59 -00:06:40 --> 00:06:48 -The Spoken Tutorial Project team conducts workshops and gives certificates. -

For more details, please write to us. -

- -60 -00:06:49 --> 00:06:52 -Please post your timed queries in this forum. - -61 -00:06:53 --> 00:07:04 -Spoken Tutorial project is funded by NMEICT, MHRD, Government of India. -

More information on this mission is available at this link. -

- -62 -00:07:05 --> 00:07:10 -This is Nirmala Venkat from IIT Bombay, signing off. Thanks for watching. - diff --git a/media/videos/92/990/Overview-of-RDBMS---PostgreSQL-English.srt b/media/videos/92/990/Overview-of-RDBMS---PostgreSQL-English.srt deleted file mode 100644 index 23439c7..0000000 --- a/media/videos/92/990/Overview-of-RDBMS---PostgreSQL-English.srt +++ /dev/null @@ -1,320 +0,0 @@ -Narration - -1 -00:00:01 --> 00:00:06 -Welcome to the Spoken Tutorial on Overview of RDBMS - PostgreSQL. - -2 -00:00:07 --> 00:00:19 -In this tutorial, we will learn about: -

RDBMS, -

features of PostgreSQL and the content available in various tutorials under this series. -

- -3 -00:00:20 --> 00:00:33 -For this tutorial, I am using: -

Ubuntu Linux 14.04 operating system, -

PostgreSQL 9.3.x, -

pgAdmin 1.18 -

- -4 -00:00:34 --> 00:00:43 -To follow this tutorial, you should have good understanding of basic computer concepts and -

working knowledge of any programming language. -

- -5 -00:00:44 --> 00:00:47 -First, let us learn about RDBMS. - -6 -00:00:48 --> 00:00:52 -RDBMS stands for Relational Database Management System. - -7 -00:00:53 --> 00:00:59 -RDBMS is a program that helps to create, update and manage database. - -8 -00:01:00 --> 00:01:05 -MS SQL Server, -

IBM DB2, -

ORACLE, -

- -9 -00:01:06 --> 00:01:13 -My-SQL and -

Microsoft Access -

are some of the software based on RDBMS. -

- -10 -00:01:14 --> 00:01:18 -Next, let us see some of the key features of the PostgreSQL. - -11 -00:01:19 --> 00:01:24 -PostgreSQL is the most advanced open source database management system. - -12 -00:01:25 --> 00:01:31 -It can run on various platforms such as Linux, Windows and Mac Operating System. - -13 -00:01:32 --> 00:01:36 -It requires minimum maintenance because of its stability. - -14 -00:01:37 --> 00:01:44 -We can define our own data types, index types and develop a custom plugin to meet our requirement. - -15 -00:01:45 --> 00:01:52 -An active community support is available to help solve issues when working with PostgreSQL. - -16 -00:01:53 --> 00:02:08 -PostgreSQL can be used by programmers, project managers, system administrators and -

any software professional, who want to build products, websites, tools, etc. -

- -17 -00:02:09 --> 00:02:14 -Now, we will briefly go through the individual tutorials in this series. - -18 -00:02:15 --> 00:02:23 -The first tutorial in this series explains- Installation of PostgreSQL in Ubuntu Linux and Windows. - -19 -00:02:24 --> 00:02:33 -Installation of pgAdmin, -

setting the password and how to connect and disconnect from the server. -

- -20 -00:02:34 --> 00:02:48 -Here is a glimpse of the tutorial. - -21 -00:02:49 --> 00:02:53 -The next tutorial is 'Create database using PgAdmin'. - -22 -00:02:54 --> 00:02:58 -It will help us to understand how to connect to the server, - -23 -00:02:59 --> 00:03:03 -create a new database, -

create a new table, -

- -24 -00:03:04 --> 00:03:09 -add columns to the table and -

common data types used in PostgreSQL. -

- -25 -00:03:10 --> 00:03:28 -Let us have a look at this tutorial. - -26 -00:03:29 --> 00:03:32 -The next tutorial is 'Table with Primary keys'. - -27 -00:03:33 --> 00:03:37 -Here we will learn to: -

insert data, -

retrieve data, -

- -28 -00:03:38 --> 00:03:45 -Data Redundancy, -

importance of primary keys and create a table with primary keys. -

- -29 -00:03:46 --> 00:04:00 -Here is a glimpse of the tutorial. - -30 -00:04:01 --> 00:04:10 -The next tutorial is 'Select' statement. -

This will help us to know how to write a basic Select statement. -

- -31 -00:04:11 --> 00:04:15 -Select with WHERE clause, -

Select with relational operators, -

- -32 -00:04:16 --> 00:04:21 -Select with logical operators, -

Alias for column names. -

- -33 -00:04:22 --> 00:04:46 -Let me play this tutorial. - -34 -00:04:47 --> 00:04:51 -The next tutorial will explain the Aggregate functions in select statement. - -35 -00:04:52 --> 00:04:59 -First, it covers more clauses that can be used with the select statement, such as- -

Distinct, -

Between, -

- -36 -00:05:00 --> 00:05:04 -Like, -

In, -

Is Null. -

- -37 -00:05:05 --> 00:05:10 -PostgreSQL built-in functions, otherwise called as aggregate functions. - -38 -00:05:11 --> 00:05:15 -The functions such as Count, -

Sum, -

- -39 -00:05:16 --> 00:05:22 -Max , -

Min, -

Avg -

are covered later, in this tutorial. -

- -40 -00:05:23 --> 00:05:42 -Let's have a look at this tutorial. - -41 -00:05:43 --> 00:05:50 -The next tutorial is about Foreign Key constraint. -

It explains the importance of using foreign keys. -

- -42 -00:05:51 --> 00:05:55 -Example to demonstrate the parent and child table relationship. - -43 -00:05:56 --> 00:06:03 -Alter table command to modify the existing table structure and -

different types of constraints. -

- -44 -00:06:04 --> 00:06:27 -Here is a glimpse of the tutorial. - -45 -00:06:28 --> 00:06:33 -The next tutorial will explain the Aggregation facilities in SQL statements. - -46 -00:06:34 --> 00:06:41 -Here we will learn about -

Group by , -

Having and -

Order by clauses. -

- -47 -00:06:42 --> 00:07:00 -Let's have a look at this tutorial. - -48 -00:07:01 --> 00:07:05 -The last tutorial in the basic level of this series is Updating Data. - -49 -00:07:06 --> 00:07:10 -It will explain how to update data and delete data. - -50 -00:07:11 --> 00:07:17 -Here we will learn how to use -

Update statement and Delete statement -

- -51 -00:07:18 --> 00:07:26 -Here is a glimpse of the tutorial. - -52 -00:07:27 --> 00:07:31 -This brings us to the end of this tutorial. Let us summarize. - -53 -00:07:32 --> 00:07:41 -In this tutorial, we learnt about RDBMS - PostgreSQL and went through the tutorials in this series. - -54 -00:07:42 --> 00:07:49 -The video at the following link summarizes the Spoken Tutorial project. -

Please download and watch it. -

- -55 -00:07:50 --> 00:07:58 -The Spoken Tutorial Project team: conducts workshops and gives certificates. -

For more details, please write to us. -

- -56 -00:07:59 --> 00:08:03 -Do you have questions in THIS Spoken Tutorial? -

Please visit this site. -

- -57 -00:08:04 --> 00:08:09 -Choose the minute and second where you have the question, -

explain your question briefly. -

- -58 -00:08:10 --> 00:08:13 -Someone from our team will answer them. - -59 -00:08:14 --> 00:08:22 -The Spoken Tutorial forum is for specific questions on this tutorial. -

Please do not post unrelated and general questions on them. -

- -60 -00:08:23 --> 00:08:31 -This will help reduce the clutter. -

With less clutter, we can use these discussion as instructional material. -

- -61 -00:08:32 --> 00:08:42 -Spoken Tutorial project is funded by NMEICT, MHRD, Government of India. -

More information on this mission is available at this link. -

- -62 -00:08:43 --> 00:08:48 -This is Nirmala Venkat from IIT Bombay, signing off. Thanks for watching. - From 10b751edfe5f1cdaba8ffd65be2fc64e0b31395b Mon Sep 17 00:00:00 2001 From: urmisaha Date: Fri, 24 Apr 2020 21:43:31 +0530 Subject: [PATCH 04/15] getting tags from spoken database, showing questions and then fetching from stackoverflow --- .gitignore | 3 +- spoken_auth/models.py | 9 ++++ static/website/js/custom.js | 9 ++++ website/urls.py | 1 + website/views.py | 101 +++++++++++++++++++++--------------- 5 files changed, 81 insertions(+), 42 deletions(-) diff --git a/.gitignore b/.gitignore index 9ebc923..6aa15a5 100755 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ static/CACHE/* robots.txt # C extensions *.so +media/ # Packages *.egg @@ -43,4 +44,4 @@ nosetests.xml .pydevproject uwsgi-master.pid .env -.vscode \ No newline at end of file +.vscode diff --git a/spoken_auth/models.py b/spoken_auth/models.py index 63be79c..6929fb1 100755 --- a/spoken_auth/models.py +++ b/spoken_auth/models.py @@ -81,3 +81,12 @@ class TutorialResources(models.Model): class Meta: db_table = 'creation_tutorialresource' + + +class TutorialCommonContent(models.Model): + id = models.IntegerField(primary_key=True) + tutorial_detail = models.ForeignKey(TutorialDetails, on_delete=models.CASCADE,) + keyword = models.TextField() + + class Meta: + db_table = 'creation_tutorialcommoncontent' diff --git a/static/website/js/custom.js b/static/website/js/custom.js index e4936a4..1b8d494 100755 --- a/static/website/js/custom.js +++ b/static/website/js/custom.js @@ -115,6 +115,15 @@ $(document).ready(function() { console.log(similar_count); $("#similar-link").show(); $("#modal-body").html(data); + + $.ajax({ + url:"/ajax-fetch-questions/", + type: "POST", + data: { + category: $category.val(), + tutorial: $tutorial.val(), + } + }); } }); }); diff --git a/website/urls.py b/website/urls.py index 87d904f..d2829cd 100755 --- a/website/urls.py +++ b/website/urls.py @@ -34,6 +34,7 @@ name='ajax_answer_comment_update'), url(r'^ajax-similar-questions/$', views.ajax_similar_questions, name='ajax_similar_questions'), url(r'^ajax-faq-questions/$', views.ajax_faq_questions, name='ajax_faq_questions'), + url(r'^ajax-fetch-questions/$', views.ajax_fetch_questions, name='ajax_fetch_questions'), url(r'^ajax-notification-remove/$', views.ajax_notification_remove, name='ajax_notification_remove'), url(r'^ajax-keyword-search/$', views.ajax_keyword_search, name='ajax_keyword_search'), url(r'^ajax-time-search/$', views.ajax_time_search, name='ajax_time_search'), diff --git a/website/views.py b/website/views.py index eabd915..5ebd582 100755 --- a/website/views.py +++ b/website/views.py @@ -13,7 +13,7 @@ from django.contrib.auth import get_user_model from website.models import Question, Answer, Notification, AnswerComment -from spoken_auth.models import TutorialDetails, TutorialResources +from spoken_auth.models import TutorialDetails, TutorialResources, TutorialCommonContent from website.forms import NewQuestionForm, AnswerQuesitionForm from website.helpers import get_video_info, prettify from django.conf import settings @@ -527,26 +527,12 @@ def ajax_answer_comment_update(request): return HttpResponseForbidden("Not Authorised") -def get_relevant_questions(category, tutorial, query, terms): - tags = set() - - # create tags from categories and tutorials - stack_tags = [] - stack_tags.extend(categories) - stack_tags.extend(cat_tutorials) - stack_tags = [x.lower() for x in stack_tags] +def get_questions_from_stack(category, tutorial, query, terms, db_tags): rel_tags = [] - ''' - this part is run when the function is called from ask a question page with a query - relevant words from query are extracted - ''' - if query != "": - for word in query.split(): - if word in stack_tags: - rel_tags.append(word) - # this part is run when the function is called from FAQ page with category and tutorial selected, here query="" + if len(db_tags) != 0: + rel_tags.extend(db_tags) if len(terms) != 0: rel_tags.extend(terms) @@ -562,45 +548,71 @@ def get_relevant_questions(category, tutorial, query, terms): tot_ques = [] all_tags = [] entries = [] - print("Fetching data.. ") + print("Fetching data from stackoverflow.. ") SITE = StackAPI('stackoverflow') category = category.split()[0] - tutorial = tutorial.split()[0] + # Fetching questions with only category name(e.g. latex) as tag questions = SITE.fetch('questions', fromdate=1257136000, min=20, tagged=category, sort='votes', order='desc') entries.extend(questions['items']) - # Fetching questions with both category name(e.g. latex) AND tutorial name(e.g. beamer) tags - c_t = category + ';' + tutorial - questions = SITE.fetch('questions', fromdate=1257136000, min=20, tagged=c_t, sort='votes', order='desc') - entries.extend(questions['items']) + # Fetching questions with addition of rel_tags(obtained from quert/srt files) - for t in rel_tags: - tag = c_t + ';' + t + for t in db_tags: questions = SITE.fetch('questions', fromdate=1257136000, min=20, tagged=category+';'+t, sort='votes', order='desc') entries.extend(questions['items']) - questions = SITE.fetch('questions', fromdate=1257136000, min=20, tagged=tutorial+';'+t, sort='votes', order='desc') - entries.extend(questions['items']) - questions = SITE.fetch('questions', fromdate=1257136000, min=20, tagged=tag, sort='votes', order='desc') + + for t in rel_tags: + questions = SITE.fetch('questions', fromdate=1257136000, min=20, tagged=category+';'+t, sort='votes', order='desc') entries.extend(questions['items']) - if len(entries) == 0: - return tot_ques, all_tags - # inserting fetched data into mongodb collec_ques.insert_many(entries) - - rel_tags.extend([category, tutorial]) + print("Data fetched and inserted into mongodb") + +def ajax_fetch_questions(request): + if request.method == 'POST': + category = request.POST['category'] + tutorial = request.POST['tutorial'] + td_rec = TutorialDetails.objects.using('spoken').filter(tutorial=tutorial, foss__foss=category).order_by('level', 'order') + cat = td_rec[0].foss + td = td_rec[0] + db_tags = TutorialCommonContent.objects.using('spoken').filter(tutorial_detail=td.pk) + db_tags = db_tags[0].keyword.replace(".", "").split(", ") + print("list of db_tags >>>>>>>>>>>>") + print(db_tags) + filename = settings.MEDIA_ROOT + 'videos/' + str(cat.pk) + '/' + str(td.pk) + '/' + tutorial.replace(' ', '-') + '-English.srt' + topic_keys = extract_keywords(filename) + print("topic_keys >>>>>>>>>>>>>") + print(topic_keys) + + get_questions_from_stack(category.lower(), tutorial.lower(), '', topic_keys, db_tags) + return HttpResponse("Successfully fetched data from stackoverflow") + +def get_questions_from_db(topic_keys, db_tags): + rel_tags = [] + if len(db_tags) != 0: + rel_tags.extend(db_tags) + if len(topic_keys) != 0: + rel_tags.extend(topic_keys) + print("rel_tags") + print(rel_tags) + client = pymongo.MongoClient("mongodb://localhost:27017/") + db = client.stackapi + collec_ques = db.questions + + questions = [] + tags = [] q_ids = [] for t in rel_tags: - items = collec_ques.find({"tags": t}).limit(20) + items = collec_ques.find({"tags": t}) print("Fetched " + str(items.count()) + " questions for tag: " + t) for item in items: - all_tags.extend(item['tags']) + tags.extend(item['tags']) if item['question_id'] not in q_ids: q_ids.append(item['question_id']) q = {'title': item['title'], 'uid': item['question_id'], 'body': item['link'], 'tags': item['tags']} - tot_ques.append(q) - return tot_ques, all_tags + questions.append(q) + return questions, tags def ajax_faq_questions(request): if request.method == 'POST': @@ -609,13 +621,20 @@ def ajax_faq_questions(request): td_rec = TutorialDetails.objects.using('spoken').filter(tutorial=tutorial, foss__foss=category).order_by('level', 'order') cat = td_rec[0].foss td = td_rec[0] + db_tags = TutorialCommonContent.objects.using('spoken').filter(tutorial_detail=td.pk) + db_tags = db_tags[0].keyword.replace(".", "").split(", ") + print("list of db_tags >>>>>>>>>>>>") + print(db_tags) filename = settings.MEDIA_ROOT + 'videos/' + str(cat.pk) + '/' + str(td.pk) + '/' + tutorial.replace(' ', '-') + '-English.srt' topic_keys = extract_keywords(filename) + print("topic_keys >>>>>>>>>>>>>") print(topic_keys) - questions, tags = get_relevant_questions(category.lower(), tutorial.lower(), '', topic_keys) + ''' Fetching questions from mongodb database''' + questions, tags = get_questions_from_db(topic_keys, db_tags) print(str(len(questions)) + " relevant questions and tags are ") - print(tags) + print(set(tags)) + context = { 'questions': questions, 'tags': tags @@ -631,7 +650,7 @@ def ajax_similar_questions(request): # minute_range = request.POST['minute_range'] # second_range = request.POST['second_range'] - questions, tags = get_relevant_questions(category.lower(), tutorial.lower(), titl.lower(), []) + questions, tags = get_relevant_questions(category.lower(), tutorial.lower(), titl.lower(), [], []) # add more filtering when the forum grows # questions = Question.objects.filter(category=category).filter(tutorial=tutorial) context = { From f8f8bfcaa8bd8a648256f1c6f3b70f2e4ecf345f Mon Sep 17 00:00:00 2001 From: urmisaha Date: Sun, 26 Apr 2020 20:46:07 +0530 Subject: [PATCH 05/15] faq page front-end showing extra information, data entered into mongodb with upsert to avoid duplicacy --- .../website/templates/ajax_faq_questions.html | 44 +++++++++++++++---- static/website/templates/base.html | 3 +- static/website/templates/faq.html | 2 +- website/views.py | 29 +++++++----- 4 files changed, 57 insertions(+), 21 deletions(-) diff --git a/static/website/templates/ajax_faq_questions.html b/static/website/templates/ajax_faq_questions.html index 487c272..36416b0 100644 --- a/static/website/templates/ajax_faq_questions.html +++ b/static/website/templates/ajax_faq_questions.html @@ -9,20 +9,46 @@ {% endif %}
- - {% if questions.count == 0 %} -

No similar questions found

+ {% if questions|length == 0 %} +

No similar questions found

+ {% else %} + + + + + + + {% endif %} + {% for question in questions %} + + {% endfor %} diff --git a/static/website/templates/base.html b/static/website/templates/base.html index b3961d2..32c7671 100644 --- a/static/website/templates/base.html +++ b/static/website/templates/base.html @@ -17,7 +17,8 @@ {% endcompress %} - + +
Accepted
Answer
Author
Details
Question Details
+ {% if question.accepted_answer != "" %} + + {% endif %} + + + - - {{ question.title }} - - {% for tag in question.tags %} - {{ tag }} - {% endfor %} +
+ +   {{ question.title }} + +
+ {% for tag in question.tags %} + {{ tag }} + {% endfor %} +
+
+
+ {{ question.views }} + {{ question.score }} + {{ question.score }} +
+