<div class="xblock xblock-public_view xblock-public_view-vertical" data-course-id="course-v1:MITx+8.370.2x+1T2018" data-graded="True" data-init="VerticalStudentView" data-request-token="f60590b01ed511f095f616ffcd2b1d4d" data-runtime-version="1" data-block-type="vertical" data-usage-id="block-v1:MITx+8.370.2x+1T2018+type@vertical+block@Grovers_quantum_search_algorithm_-_introduction" data-runtime-class="LmsRuntime" data-has-score="False">
<h2 class="hd hd-2 unit-title">Grover's quantum search algorithm - introduction</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.370.2x+1T2018+type@video+block@U2L6a">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-course-id="course-v1:MITx+8.370.2x+1T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="f60590b01ed511f095f616ffcd2b1d4d" data-runtime-version="1" data-block-type="video" data-usage-id="block-v1:MITx+8.370.2x+1T2018+type@video+block@U2L6a" data-runtime-class="LmsRuntime" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">Grover's quantum search algorithm - introduction</h3>
<div
id="video_U2L6a"
class="video closed"
data-metadata='{"publishCompletionUrl": "/courses/course-v1:MITx+8.370.2x+1T2018/xblock/block-v1:MITx+8.370.2x+1T2018+type@video+block@U2L6a/handler/publish_completion", "duration": 0.0, "transcriptLanguage": "en", "ytTestTimeout": 1500, "prioritizeHls": false, "generalSpeed": 1.0, "sources": [], "captionDataDir": null, "autoAdvance": false, "poster": null, "autohideHtml5": false, "speed": null, "transcriptTranslationUrl": "/courses/course-v1:MITx+8.370.2x+1T2018/xblock/block-v1:MITx+8.370.2x+1T2018+type@video+block@U2L6a/handler/transcript/translation/__lang__", "recordedYoutubeIsAvailable": true, "completionEnabled": false, "end": 0.0, "ytMetadataEndpoint": "", "completionPercentage": 0.95, "savedVideoPosition": 0.0, "lmsRootURL": "https://openlearninglibrary.mit.edu", "saveStateEnabled": false, "start": 0.0, "streams": "1.00:SiOmnrBSNaw", "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+8.370.2x+1T2018/xblock/block-v1:MITx+8.370.2x+1T2018+type@video+block@U2L6a/handler/transcript/available_translations", "autoplay": false, "showCaptions": "true", "transcriptLanguages": {"en": "English"}, "saveStateUrl": "/courses/course-v1:MITx+8.370.2x+1T2018/xblock/block-v1:MITx+8.370.2x+1T2018+type@video+block@U2L6a/handler/xmodule_handler/save_user_state", "ytApiUrl": "https://www.youtube.com/iframe_api"}'
data-bumper-metadata='null'
data-autoadvance-enabled="False"
data-poster='null'
tabindex="-1"
>
<div class="focus_grabber first"></div>
<div class="tc-wrapper">
<div class="video-wrapper">
<span tabindex="0" class="spinner" aria-hidden="false" aria-label="Loading video player"></span>
<span tabindex="-1" class="btn-play fa fa-youtube-play fa-2x is-hidden" aria-hidden="true" aria-label="Play video"></span>
<div class="video-player-pre"></div>
<div class="video-player">
<div id="U2L6a"></div>
<h4 class="hd hd-4 video-error is-hidden">No playable video sources found.</h4>
<h4 class="hd hd-4 video-hls-error is-hidden">
Your browser does not support this video format. Try using a different browser.
</h4>
</div>
<div class="video-player-post"></div>
<div class="closed-captions"></div>
<div class="video-controls is-hidden">
<div>
<div class="vcr"><div class="vidtime">0:00 / 0:00</div></div>
<div class="secondary-controls"></div>
</div>
</div>
</div>
</div>
<div class="focus_grabber last"></div>
</div>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:MITx+8.370.2x+1T2018+type@html+block@site_search_box1">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-course-id="course-v1:MITx+8.370.2x+1T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="f60590b01ed511f095f616ffcd2b1d4d" data-runtime-version="1" data-block-type="html" data-usage-id="block-v1:MITx+8.370.2x+1T2018+type@html+block@site_search_box1" data-runtime-class="LmsRuntime" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.370.2x+1T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.370.2x+1T2018/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
var add_site_search = function(){
course_static_url = $('#dummy_course_static_link').attr('href').replace('/NONE', '');
jump_to_url = $('#dummy_jump_link').attr('href').replace('/NONE', '');
if (typeof String.prototype.startsWith != 'function') {
// see below for better implementation!
String.prototype.startsWith = function (str){
return this.indexOf(str) === 0;
};
}
if(typeof(String.prototype.trim) === "undefined")
{
String.prototype.trim = function()
{
return String(this).replace(/^\s+|\s+$/g, '');
};
}
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var amp = String.fromCharCode(38);
var rlb = rb + lb;
var mke = function(x){ return lb + x + rb; }
var search_module_url = "";
var get_search_module_ficus = function(){
var cid = $('div.xblock').data('course-id');
if (cid){
console.log("cid = ", cid);
// search_module_url = "/courses/course-v1:MITx+8.370.2x+1T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.370.2x+1T2018/courseware/welcome/Search_this_course/"; // automatically rewritten
console.log("3. search_module_url = ", search_module_url);
return;
}
var course_root_link = $('span.nav-item-course').find('a').attr('href');
if (course_root_link){
console.log("course_root_link = ", course_root_link);
search_module_url = course_root_link.replace("course/", "courseware/welcome/Search_this_course/");
console.log("2. search_module_url = ", search_module_url);
return
}
console.log("cannot determine search module url");
}
var get_search_module = function(){
// find search this module link
if (!($('div.course-index').length)){
return get_search_module_ficus();
}
$('div.course-index').find('nav').find('a').each(function(){
if ($(this).text().trim().startsWith("Search this course")){
search_module_url = $(this).attr('href');
console.log("search_module_url = ", search_module_url);
}
});
}
var go_to_search = function(){
get_search_module();
var sterm = $('#site-search-box').val();
// new_url = jump_to_url + "/Search_this_module/?q=" + sterm;
new_url = search_module_url + "?q=" + sterm;
console.log("sterm = ", sterm, " ; going to ", new_url);
window.location.href = new_url;
}
if (!$('#site-search-box').length){
$("nav.courseware").find("ol").append(lb + "section style='float:right'" + rlb + "input size='20'"
+ " id='site-search-box'"
+ rlb + "img src='" + course_static_url
+ "/images_search_glass.png'/" + rlb + "/input" + rlb + "/section" + rb);
}
$("#site-search-box").keypress(function(event) {
if (event.which == 13) {
event.preventDefault();
go_to_search();
}
});
// $('#site-search-box').bind("enterKey", go_to_search);
var get = function(x){
return eval(x);
}
return {'course_static_url': course_static_url,
'jump_to_url': jump_to_url,
'go_to_search': go_to_search,
'get_search_module': get_search_module,
'get_search_module_ficus': get_search_module_ficus,
'get': get,
}
}
var the_site_search = add_site_search();
var add_fix_transcript = function(){
if ($('div.wrap-instructor-info').length==0){
return;
}
$('div.xblock-student_view-video').each(function(key, vblock_e){
var vblock = $(vblock_e);
var vuid = vblock.data('usage-id').split('@');
var vid;
if (vuid.length==1){
vuid = vblock.data('usage-id').split(';_')
vid = vuid[5];
}else{
vid = vuid[2];
}
var mfnpre = vid.split("_video",1)[0];
var mfnid = mfnpre; // no periods
mfnpre = mfnpre.replace('8_370', '8.370'); // periods in gh filename
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var mke = function(x){ return lb + x + rb; }
var ftid = "fix_transcript_" + mfnid;
if (!$('#' + ftid).length){
var html = lb + "span id='" + ftid + "' style='float:right'" + rb + lb + "a href='#'" + rb;
html += "contribute transcript fix" + mke("/a") + mke("/span");
console.log("html = ", html);
vblock.after(html)
}
$('#' + ftid).click(function(){
var cst = $('ol.subtitles').find('li.current');
var cindex = Number(cst.data('index'));
var gurl;
if (mfnpre.endsWith('_cq_sol')){
gurl = "https://github.com/mitocw/content-mit-8370x-cq-sol-subtitles/blob/master/";
}else{
gurl = "https://github.com/mitocw/content-mit-8370x-subtitles/blob/master/";
}
gurl += mfnpre + ".txt#L" + String(cindex + 10 + 1);
console.log("going to ", gurl);
window.open(gurl, "MITx 8.370x subtitle source");
});
});
}
try{
add_fix_transcript();
}
catch(err){
console.log(err);
}
try{
var rb = String.fromCharCode(62);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 3000);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 8000);
}
catch(err){
console.log(err);
}
</script></span>
</div>
</div>
</div>
</div>
<div class="xblock xblock-public_view xblock-public_view-vertical" data-course-id="course-v1:MITx+8.370.2x+1T2018" data-graded="True" data-init="VerticalStudentView" data-request-token="f60590b01ed511f095f616ffcd2b1d4d" data-runtime-version="1" data-block-type="vertical" data-usage-id="block-v1:MITx+8.370.2x+1T2018+type@vertical+block@The_Grover_iteration" data-runtime-class="LmsRuntime" data-has-score="False">
<h2 class="hd hd-2 unit-title">The Grover iteration</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.370.2x+1T2018+type@video+block@U2L6b">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-course-id="course-v1:MITx+8.370.2x+1T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="f60590b01ed511f095f616ffcd2b1d4d" data-runtime-version="1" data-block-type="video" data-usage-id="block-v1:MITx+8.370.2x+1T2018+type@video+block@U2L6b" data-runtime-class="LmsRuntime" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">The Grover iteration</h3>
<div
id="video_U2L6b"
class="video closed"
data-metadata='{"publishCompletionUrl": "/courses/course-v1:MITx+8.370.2x+1T2018/xblock/block-v1:MITx+8.370.2x+1T2018+type@video+block@U2L6b/handler/publish_completion", "duration": 0.0, "transcriptLanguage": "en", "ytTestTimeout": 1500, "prioritizeHls": false, "generalSpeed": 1.0, "sources": [], "captionDataDir": null, "autoAdvance": false, "poster": null, "autohideHtml5": false, "speed": null, "transcriptTranslationUrl": "/courses/course-v1:MITx+8.370.2x+1T2018/xblock/block-v1:MITx+8.370.2x+1T2018+type@video+block@U2L6b/handler/transcript/translation/__lang__", "recordedYoutubeIsAvailable": true, "completionEnabled": false, "end": 0.0, "ytMetadataEndpoint": "", "completionPercentage": 0.95, "savedVideoPosition": 0.0, "lmsRootURL": "https://openlearninglibrary.mit.edu", "saveStateEnabled": false, "start": 0.0, "streams": "1.00:l30TisEMwP0", "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+8.370.2x+1T2018/xblock/block-v1:MITx+8.370.2x+1T2018+type@video+block@U2L6b/handler/transcript/available_translations", "autoplay": false, "showCaptions": "true", "transcriptLanguages": {"en": "English"}, "saveStateUrl": "/courses/course-v1:MITx+8.370.2x+1T2018/xblock/block-v1:MITx+8.370.2x+1T2018+type@video+block@U2L6b/handler/xmodule_handler/save_user_state", "ytApiUrl": "https://www.youtube.com/iframe_api"}'
data-bumper-metadata='null'
data-autoadvance-enabled="False"
data-poster='null'
tabindex="-1"
>
<div class="focus_grabber first"></div>
<div class="tc-wrapper">
<div class="video-wrapper">
<span tabindex="0" class="spinner" aria-hidden="false" aria-label="Loading video player"></span>
<span tabindex="-1" class="btn-play fa fa-youtube-play fa-2x is-hidden" aria-hidden="true" aria-label="Play video"></span>
<div class="video-player-pre"></div>
<div class="video-player">
<div id="U2L6b"></div>
<h4 class="hd hd-4 video-error is-hidden">No playable video sources found.</h4>
<h4 class="hd hd-4 video-hls-error is-hidden">
Your browser does not support this video format. Try using a different browser.
</h4>
</div>
<div class="video-player-post"></div>
<div class="closed-captions"></div>
<div class="video-controls is-hidden">
<div>
<div class="vcr"><div class="vidtime">0:00 / 0:00</div></div>
<div class="secondary-controls"></div>
</div>
</div>
</div>
</div>
<div class="focus_grabber last"></div>
</div>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:MITx+8.370.2x+1T2018+type@html+block@site_search_box2">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-course-id="course-v1:MITx+8.370.2x+1T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="f60590b01ed511f095f616ffcd2b1d4d" data-runtime-version="1" data-block-type="html" data-usage-id="block-v1:MITx+8.370.2x+1T2018+type@html+block@site_search_box2" data-runtime-class="LmsRuntime" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.370.2x+1T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.370.2x+1T2018/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
var add_site_search = function(){
course_static_url = $('#dummy_course_static_link').attr('href').replace('/NONE', '');
jump_to_url = $('#dummy_jump_link').attr('href').replace('/NONE', '');
if (typeof String.prototype.startsWith != 'function') {
// see below for better implementation!
String.prototype.startsWith = function (str){
return this.indexOf(str) === 0;
};
}
if(typeof(String.prototype.trim) === "undefined")
{
String.prototype.trim = function()
{
return String(this).replace(/^\s+|\s+$/g, '');
};
}
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var amp = String.fromCharCode(38);
var rlb = rb + lb;
var mke = function(x){ return lb + x + rb; }
var search_module_url = "";
var get_search_module_ficus = function(){
var cid = $('div.xblock').data('course-id');
if (cid){
console.log("cid = ", cid);
// search_module_url = "/courses/course-v1:MITx+8.370.2x+1T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.370.2x+1T2018/courseware/welcome/Search_this_course/"; // automatically rewritten
console.log("3. search_module_url = ", search_module_url);
return;
}
var course_root_link = $('span.nav-item-course').find('a').attr('href');
if (course_root_link){
console.log("course_root_link = ", course_root_link);
search_module_url = course_root_link.replace("course/", "courseware/welcome/Search_this_course/");
console.log("2. search_module_url = ", search_module_url);
return
}
console.log("cannot determine search module url");
}
var get_search_module = function(){
// find search this module link
if (!($('div.course-index').length)){
return get_search_module_ficus();
}
$('div.course-index').find('nav').find('a').each(function(){
if ($(this).text().trim().startsWith("Search this course")){
search_module_url = $(this).attr('href');
console.log("search_module_url = ", search_module_url);
}
});
}
var go_to_search = function(){
get_search_module();
var sterm = $('#site-search-box').val();
// new_url = jump_to_url + "/Search_this_module/?q=" + sterm;
new_url = search_module_url + "?q=" + sterm;
console.log("sterm = ", sterm, " ; going to ", new_url);
window.location.href = new_url;
}
if (!$('#site-search-box').length){
$("nav.courseware").find("ol").append(lb + "section style='float:right'" + rlb + "input size='20'"
+ " id='site-search-box'"
+ rlb + "img src='" + course_static_url
+ "/images_search_glass.png'/" + rlb + "/input" + rlb + "/section" + rb);
}
$("#site-search-box").keypress(function(event) {
if (event.which == 13) {
event.preventDefault();
go_to_search();
}
});
// $('#site-search-box').bind("enterKey", go_to_search);
var get = function(x){
return eval(x);
}
return {'course_static_url': course_static_url,
'jump_to_url': jump_to_url,
'go_to_search': go_to_search,
'get_search_module': get_search_module,
'get_search_module_ficus': get_search_module_ficus,
'get': get,
}
}
var the_site_search = add_site_search();
var add_fix_transcript = function(){
if ($('div.wrap-instructor-info').length==0){
return;
}
$('div.xblock-student_view-video').each(function(key, vblock_e){
var vblock = $(vblock_e);
var vuid = vblock.data('usage-id').split('@');
var vid;
if (vuid.length==1){
vuid = vblock.data('usage-id').split(';_')
vid = vuid[5];
}else{
vid = vuid[2];
}
var mfnpre = vid.split("_video",1)[0];
var mfnid = mfnpre; // no periods
mfnpre = mfnpre.replace('8_370', '8.370'); // periods in gh filename
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var mke = function(x){ return lb + x + rb; }
var ftid = "fix_transcript_" + mfnid;
if (!$('#' + ftid).length){
var html = lb + "span id='" + ftid + "' style='float:right'" + rb + lb + "a href='#'" + rb;
html += "contribute transcript fix" + mke("/a") + mke("/span");
console.log("html = ", html);
vblock.after(html)
}
$('#' + ftid).click(function(){
var cst = $('ol.subtitles').find('li.current');
var cindex = Number(cst.data('index'));
var gurl;
if (mfnpre.endsWith('_cq_sol')){
gurl = "https://github.com/mitocw/content-mit-8370x-cq-sol-subtitles/blob/master/";
}else{
gurl = "https://github.com/mitocw/content-mit-8370x-subtitles/blob/master/";
}
gurl += mfnpre + ".txt#L" + String(cindex + 10 + 1);
console.log("going to ", gurl);
window.open(gurl, "MITx 8.370x subtitle source");
});
});
}
try{
add_fix_transcript();
}
catch(err){
console.log(err);
}
try{
var rb = String.fromCharCode(62);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 3000);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 8000);
}
catch(err){
console.log(err);
}
</script></span>
</div>
</div>
</div>
</div>
<div class="xblock xblock-public_view xblock-public_view-vertical" data-course-id="course-v1:MITx+8.370.2x+1T2018" data-graded="True" data-init="VerticalStudentView" data-request-token="f60590b01ed511f095f616ffcd2b1d4d" data-runtime-version="1" data-block-type="vertical" data-usage-id="block-v1:MITx+8.370.2x+1T2018+type@vertical+block@Analysis_of_Grovers_iteration_-_analytical" data-runtime-class="LmsRuntime" data-has-score="False">
<h2 class="hd hd-2 unit-title">Analysis of Grover's iteration - analytical</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.370.2x+1T2018+type@video+block@U2L6c">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-course-id="course-v1:MITx+8.370.2x+1T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="f60590b01ed511f095f616ffcd2b1d4d" data-runtime-version="1" data-block-type="video" data-usage-id="block-v1:MITx+8.370.2x+1T2018+type@video+block@U2L6c" data-runtime-class="LmsRuntime" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">Analysis of Grover's iteration - analytical</h3>
<div
id="video_U2L6c"
class="video closed"
data-metadata='{"publishCompletionUrl": "/courses/course-v1:MITx+8.370.2x+1T2018/xblock/block-v1:MITx+8.370.2x+1T2018+type@video+block@U2L6c/handler/publish_completion", "duration": 0.0, "transcriptLanguage": "en", "ytTestTimeout": 1500, "prioritizeHls": false, "generalSpeed": 1.0, "sources": [], "captionDataDir": null, "autoAdvance": false, "poster": null, "autohideHtml5": false, "speed": null, "transcriptTranslationUrl": "/courses/course-v1:MITx+8.370.2x+1T2018/xblock/block-v1:MITx+8.370.2x+1T2018+type@video+block@U2L6c/handler/transcript/translation/__lang__", "recordedYoutubeIsAvailable": true, "completionEnabled": false, "end": 0.0, "ytMetadataEndpoint": "", "completionPercentage": 0.95, "savedVideoPosition": 0.0, "lmsRootURL": "https://openlearninglibrary.mit.edu", "saveStateEnabled": false, "start": 0.0, "streams": "1.00:hOmPuGEYUCc", "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+8.370.2x+1T2018/xblock/block-v1:MITx+8.370.2x+1T2018+type@video+block@U2L6c/handler/transcript/available_translations", "autoplay": false, "showCaptions": "true", "transcriptLanguages": {"en": "English"}, "saveStateUrl": "/courses/course-v1:MITx+8.370.2x+1T2018/xblock/block-v1:MITx+8.370.2x+1T2018+type@video+block@U2L6c/handler/xmodule_handler/save_user_state", "ytApiUrl": "https://www.youtube.com/iframe_api"}'
data-bumper-metadata='null'
data-autoadvance-enabled="False"
data-poster='null'
tabindex="-1"
>
<div class="focus_grabber first"></div>
<div class="tc-wrapper">
<div class="video-wrapper">
<span tabindex="0" class="spinner" aria-hidden="false" aria-label="Loading video player"></span>
<span tabindex="-1" class="btn-play fa fa-youtube-play fa-2x is-hidden" aria-hidden="true" aria-label="Play video"></span>
<div class="video-player-pre"></div>
<div class="video-player">
<div id="U2L6c"></div>
<h4 class="hd hd-4 video-error is-hidden">No playable video sources found.</h4>
<h4 class="hd hd-4 video-hls-error is-hidden">
Your browser does not support this video format. Try using a different browser.
</h4>
</div>
<div class="video-player-post"></div>
<div class="closed-captions"></div>
<div class="video-controls is-hidden">
<div>
<div class="vcr"><div class="vidtime">0:00 / 0:00</div></div>
<div class="secondary-controls"></div>
</div>
</div>
</div>
</div>
<div class="focus_grabber last"></div>
</div>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:MITx+8.370.2x+1T2018+type@html+block@site_search_box3">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-course-id="course-v1:MITx+8.370.2x+1T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="f60590b01ed511f095f616ffcd2b1d4d" data-runtime-version="1" data-block-type="html" data-usage-id="block-v1:MITx+8.370.2x+1T2018+type@html+block@site_search_box3" data-runtime-class="LmsRuntime" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.370.2x+1T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.370.2x+1T2018/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
var add_site_search = function(){
course_static_url = $('#dummy_course_static_link').attr('href').replace('/NONE', '');
jump_to_url = $('#dummy_jump_link').attr('href').replace('/NONE', '');
if (typeof String.prototype.startsWith != 'function') {
// see below for better implementation!
String.prototype.startsWith = function (str){
return this.indexOf(str) === 0;
};
}
if(typeof(String.prototype.trim) === "undefined")
{
String.prototype.trim = function()
{
return String(this).replace(/^\s+|\s+$/g, '');
};
}
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var amp = String.fromCharCode(38);
var rlb = rb + lb;
var mke = function(x){ return lb + x + rb; }
var search_module_url = "";
var get_search_module_ficus = function(){
var cid = $('div.xblock').data('course-id');
if (cid){
console.log("cid = ", cid);
// search_module_url = "/courses/course-v1:MITx+8.370.2x+1T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.370.2x+1T2018/courseware/welcome/Search_this_course/"; // automatically rewritten
console.log("3. search_module_url = ", search_module_url);
return;
}
var course_root_link = $('span.nav-item-course').find('a').attr('href');
if (course_root_link){
console.log("course_root_link = ", course_root_link);
search_module_url = course_root_link.replace("course/", "courseware/welcome/Search_this_course/");
console.log("2. search_module_url = ", search_module_url);
return
}
console.log("cannot determine search module url");
}
var get_search_module = function(){
// find search this module link
if (!($('div.course-index').length)){
return get_search_module_ficus();
}
$('div.course-index').find('nav').find('a').each(function(){
if ($(this).text().trim().startsWith("Search this course")){
search_module_url = $(this).attr('href');
console.log("search_module_url = ", search_module_url);
}
});
}
var go_to_search = function(){
get_search_module();
var sterm = $('#site-search-box').val();
// new_url = jump_to_url + "/Search_this_module/?q=" + sterm;
new_url = search_module_url + "?q=" + sterm;
console.log("sterm = ", sterm, " ; going to ", new_url);
window.location.href = new_url;
}
if (!$('#site-search-box').length){
$("nav.courseware").find("ol").append(lb + "section style='float:right'" + rlb + "input size='20'"
+ " id='site-search-box'"
+ rlb + "img src='" + course_static_url
+ "/images_search_glass.png'/" + rlb + "/input" + rlb + "/section" + rb);
}
$("#site-search-box").keypress(function(event) {
if (event.which == 13) {
event.preventDefault();
go_to_search();
}
});
// $('#site-search-box').bind("enterKey", go_to_search);
var get = function(x){
return eval(x);
}
return {'course_static_url': course_static_url,
'jump_to_url': jump_to_url,
'go_to_search': go_to_search,
'get_search_module': get_search_module,
'get_search_module_ficus': get_search_module_ficus,
'get': get,
}
}
var the_site_search = add_site_search();
var add_fix_transcript = function(){
if ($('div.wrap-instructor-info').length==0){
return;
}
$('div.xblock-student_view-video').each(function(key, vblock_e){
var vblock = $(vblock_e);
var vuid = vblock.data('usage-id').split('@');
var vid;
if (vuid.length==1){
vuid = vblock.data('usage-id').split(';_')
vid = vuid[5];
}else{
vid = vuid[2];
}
var mfnpre = vid.split("_video",1)[0];
var mfnid = mfnpre; // no periods
mfnpre = mfnpre.replace('8_370', '8.370'); // periods in gh filename
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var mke = function(x){ return lb + x + rb; }
var ftid = "fix_transcript_" + mfnid;
if (!$('#' + ftid).length){
var html = lb + "span id='" + ftid + "' style='float:right'" + rb + lb + "a href='#'" + rb;
html += "contribute transcript fix" + mke("/a") + mke("/span");
console.log("html = ", html);
vblock.after(html)
}
$('#' + ftid).click(function(){
var cst = $('ol.subtitles').find('li.current');
var cindex = Number(cst.data('index'));
var gurl;
if (mfnpre.endsWith('_cq_sol')){
gurl = "https://github.com/mitocw/content-mit-8370x-cq-sol-subtitles/blob/master/";
}else{
gurl = "https://github.com/mitocw/content-mit-8370x-subtitles/blob/master/";
}
gurl += mfnpre + ".txt#L" + String(cindex + 10 + 1);
console.log("going to ", gurl);
window.open(gurl, "MITx 8.370x subtitle source");
});
});
}
try{
add_fix_transcript();
}
catch(err){
console.log(err);
}
try{
var rb = String.fromCharCode(62);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 3000);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 8000);
}
catch(err){
console.log(err);
}
</script></span>
</div>
</div>
</div>
</div>
<div class="xblock xblock-public_view xblock-public_view-vertical" data-course-id="course-v1:MITx+8.370.2x+1T2018" data-graded="True" data-init="VerticalStudentView" data-request-token="f60590b01ed511f095f616ffcd2b1d4d" data-runtime-version="1" data-block-type="vertical" data-usage-id="block-v1:MITx+8.370.2x+1T2018+type@vertical+block@Grovers_iteration_-_graphical_depiction_and_completion_of_analysis" data-runtime-class="LmsRuntime" data-has-score="False">
<h2 class="hd hd-2 unit-title">Grover's iteration - graphical depiction and completion of analysis</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.370.2x+1T2018+type@video+block@U2L6d">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-course-id="course-v1:MITx+8.370.2x+1T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="f60590b01ed511f095f616ffcd2b1d4d" data-runtime-version="1" data-block-type="video" data-usage-id="block-v1:MITx+8.370.2x+1T2018+type@video+block@U2L6d" data-runtime-class="LmsRuntime" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">Grover's iteration - graphical depiction and completion of analysis</h3>
<div
id="video_U2L6d"
class="video closed"
data-metadata='{"publishCompletionUrl": "/courses/course-v1:MITx+8.370.2x+1T2018/xblock/block-v1:MITx+8.370.2x+1T2018+type@video+block@U2L6d/handler/publish_completion", "duration": 0.0, "transcriptLanguage": "en", "ytTestTimeout": 1500, "prioritizeHls": false, "generalSpeed": 1.0, "sources": [], "captionDataDir": null, "autoAdvance": false, "poster": null, "autohideHtml5": false, "speed": null, "transcriptTranslationUrl": "/courses/course-v1:MITx+8.370.2x+1T2018/xblock/block-v1:MITx+8.370.2x+1T2018+type@video+block@U2L6d/handler/transcript/translation/__lang__", "recordedYoutubeIsAvailable": true, "completionEnabled": false, "end": 0.0, "ytMetadataEndpoint": "", "completionPercentage": 0.95, "savedVideoPosition": 0.0, "lmsRootURL": "https://openlearninglibrary.mit.edu", "saveStateEnabled": false, "start": 0.0, "streams": "1.00:aX3oOGlFgB8", "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+8.370.2x+1T2018/xblock/block-v1:MITx+8.370.2x+1T2018+type@video+block@U2L6d/handler/transcript/available_translations", "autoplay": false, "showCaptions": "true", "transcriptLanguages": {"en": "English"}, "saveStateUrl": "/courses/course-v1:MITx+8.370.2x+1T2018/xblock/block-v1:MITx+8.370.2x+1T2018+type@video+block@U2L6d/handler/xmodule_handler/save_user_state", "ytApiUrl": "https://www.youtube.com/iframe_api"}'
data-bumper-metadata='null'
data-autoadvance-enabled="False"
data-poster='null'
tabindex="-1"
>
<div class="focus_grabber first"></div>
<div class="tc-wrapper">
<div class="video-wrapper">
<span tabindex="0" class="spinner" aria-hidden="false" aria-label="Loading video player"></span>
<span tabindex="-1" class="btn-play fa fa-youtube-play fa-2x is-hidden" aria-hidden="true" aria-label="Play video"></span>
<div class="video-player-pre"></div>
<div class="video-player">
<div id="U2L6d"></div>
<h4 class="hd hd-4 video-error is-hidden">No playable video sources found.</h4>
<h4 class="hd hd-4 video-hls-error is-hidden">
Your browser does not support this video format. Try using a different browser.
</h4>
</div>
<div class="video-player-post"></div>
<div class="closed-captions"></div>
<div class="video-controls is-hidden">
<div>
<div class="vcr"><div class="vidtime">0:00 / 0:00</div></div>
<div class="secondary-controls"></div>
</div>
</div>
</div>
</div>
<div class="focus_grabber last"></div>
</div>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:MITx+8.370.2x+1T2018+type@html+block@site_search_box4">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-course-id="course-v1:MITx+8.370.2x+1T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="f60590b01ed511f095f616ffcd2b1d4d" data-runtime-version="1" data-block-type="html" data-usage-id="block-v1:MITx+8.370.2x+1T2018+type@html+block@site_search_box4" data-runtime-class="LmsRuntime" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.370.2x+1T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.370.2x+1T2018/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
var add_site_search = function(){
course_static_url = $('#dummy_course_static_link').attr('href').replace('/NONE', '');
jump_to_url = $('#dummy_jump_link').attr('href').replace('/NONE', '');
if (typeof String.prototype.startsWith != 'function') {
// see below for better implementation!
String.prototype.startsWith = function (str){
return this.indexOf(str) === 0;
};
}
if(typeof(String.prototype.trim) === "undefined")
{
String.prototype.trim = function()
{
return String(this).replace(/^\s+|\s+$/g, '');
};
}
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var amp = String.fromCharCode(38);
var rlb = rb + lb;
var mke = function(x){ return lb + x + rb; }
var search_module_url = "";
var get_search_module_ficus = function(){
var cid = $('div.xblock').data('course-id');
if (cid){
console.log("cid = ", cid);
// search_module_url = "/courses/course-v1:MITx+8.370.2x+1T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.370.2x+1T2018/courseware/welcome/Search_this_course/"; // automatically rewritten
console.log("3. search_module_url = ", search_module_url);
return;
}
var course_root_link = $('span.nav-item-course').find('a').attr('href');
if (course_root_link){
console.log("course_root_link = ", course_root_link);
search_module_url = course_root_link.replace("course/", "courseware/welcome/Search_this_course/");
console.log("2. search_module_url = ", search_module_url);
return
}
console.log("cannot determine search module url");
}
var get_search_module = function(){
// find search this module link
if (!($('div.course-index').length)){
return get_search_module_ficus();
}
$('div.course-index').find('nav').find('a').each(function(){
if ($(this).text().trim().startsWith("Search this course")){
search_module_url = $(this).attr('href');
console.log("search_module_url = ", search_module_url);
}
});
}
var go_to_search = function(){
get_search_module();
var sterm = $('#site-search-box').val();
// new_url = jump_to_url + "/Search_this_module/?q=" + sterm;
new_url = search_module_url + "?q=" + sterm;
console.log("sterm = ", sterm, " ; going to ", new_url);
window.location.href = new_url;
}
if (!$('#site-search-box').length){
$("nav.courseware").find("ol").append(lb + "section style='float:right'" + rlb + "input size='20'"
+ " id='site-search-box'"
+ rlb + "img src='" + course_static_url
+ "/images_search_glass.png'/" + rlb + "/input" + rlb + "/section" + rb);
}
$("#site-search-box").keypress(function(event) {
if (event.which == 13) {
event.preventDefault();
go_to_search();
}
});
// $('#site-search-box').bind("enterKey", go_to_search);
var get = function(x){
return eval(x);
}
return {'course_static_url': course_static_url,
'jump_to_url': jump_to_url,
'go_to_search': go_to_search,
'get_search_module': get_search_module,
'get_search_module_ficus': get_search_module_ficus,
'get': get,
}
}
var the_site_search = add_site_search();
var add_fix_transcript = function(){
if ($('div.wrap-instructor-info').length==0){
return;
}
$('div.xblock-student_view-video').each(function(key, vblock_e){
var vblock = $(vblock_e);
var vuid = vblock.data('usage-id').split('@');
var vid;
if (vuid.length==1){
vuid = vblock.data('usage-id').split(';_')
vid = vuid[5];
}else{
vid = vuid[2];
}
var mfnpre = vid.split("_video",1)[0];
var mfnid = mfnpre; // no periods
mfnpre = mfnpre.replace('8_370', '8.370'); // periods in gh filename
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var mke = function(x){ return lb + x + rb; }
var ftid = "fix_transcript_" + mfnid;
if (!$('#' + ftid).length){
var html = lb + "span id='" + ftid + "' style='float:right'" + rb + lb + "a href='#'" + rb;
html += "contribute transcript fix" + mke("/a") + mke("/span");
console.log("html = ", html);
vblock.after(html)
}
$('#' + ftid).click(function(){
var cst = $('ol.subtitles').find('li.current');
var cindex = Number(cst.data('index'));
var gurl;
if (mfnpre.endsWith('_cq_sol')){
gurl = "https://github.com/mitocw/content-mit-8370x-cq-sol-subtitles/blob/master/";
}else{
gurl = "https://github.com/mitocw/content-mit-8370x-subtitles/blob/master/";
}
gurl += mfnpre + ".txt#L" + String(cindex + 10 + 1);
console.log("going to ", gurl);
window.open(gurl, "MITx 8.370x subtitle source");
});
});
}
try{
add_fix_transcript();
}
catch(err){
console.log(err);
}
try{
var rb = String.fromCharCode(62);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 3000);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 8000);
}
catch(err){
console.log(err);
}
</script></span>
</div>
</div>
</div>
</div>
<div class="xblock xblock-public_view xblock-public_view-vertical" data-course-id="course-v1:MITx+8.370.2x+1T2018" data-graded="True" data-init="VerticalStudentView" data-request-token="f60590b01ed511f095f616ffcd2b1d4d" data-runtime-version="1" data-block-type="vertical" data-usage-id="block-v1:MITx+8.370.2x+1T2018+type@vertical+block@CQ_Properties_of_the_Grover_iteration_operator" data-runtime-class="LmsRuntime" data-has-score="False">
<h2 class="hd hd-2 unit-title">CQ: Properties of the Grover iteration operator</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.370.2x+1T2018+type@problem+block@u2_6_cq_grover_iterop">
<div class="xblock xblock-public_view xblock-public_view-problem xmodule_display xmodule_ProblemBlock" data-course-id="course-v1:MITx+8.370.2x+1T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="f60590b01ed511f095f616ffcd2b1d4d" data-runtime-version="1" data-block-type="problem" data-usage-id="block-v1:MITx+8.370.2x+1T2018+type@problem+block@u2_6_cq_grover_iterop" data-runtime-class="LmsRuntime" data-has-score="True">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Problem"}
</script>
<div id="problem_u2_6_cq_grover_iterop" class="problems-wrapper" role="group"
aria-labelledby="u2_6_cq_grover_iterop-problem-title"
data-problem-id="block-v1:MITx+8.370.2x+1T2018+type@problem+block@u2_6_cq_grover_iterop" data-url="/courses/course-v1:MITx+8.370.2x+1T2018/xblock/block-v1:MITx+8.370.2x+1T2018+type@problem+block@u2_6_cq_grover_iterop/handler/xmodule_handler"
data-problem-score="0"
data-problem-total-possible="1"
data-attempts-used="0"
data-content="
<h3 class="hd hd-3 problem-header" id="u2_6_cq_grover_iterop-problem-title" aria-describedby="block-v1:MITx+8.370.2x+1T2018+type@problem+block@u2_6_cq_grover_iterop-problem-progress" tabindex="-1">
Properties of the Grover iteration operator
</h3>
<div class="problem-progress" id="block-v1:MITx+8.370.2x+1T2018+type@problem+block@u2_6_cq_grover_iterop-problem-progress"></div>
<div class="problem">
<div>
<p>
This is a concept question, provided to double-check your understanding of the previous video clip. </p>
<p>
Prof. Shor presented in lecture <a href="https://en.wikipedia.org/wiki/Grover%27s_algorithm" target="_blank">Grover's quantum search algorithm</a>, described using the Grover iteration operator </p>
<table id="a0000000002" class="eqnarray" cellspacing="0" cellpadding="7" width="100%" style="table-layout:auto">
<tr id="a0000000003">
<td style="width:40%; border:none">&#160;</td>
<td style="vertical-align:middle; text-align:right; border:none">
[mathjaxinline]\displaystyle G = (2|\psi \rangle \langle \psi |-I) O \, .[/mathjaxinline]
</td>
<td style="width:40%; border:none">&#160;</td>
<td class="eqnnum" style="width:20%; border:none;text-align:right">(1.1)</td>
</tr>
</table>
<p>
Which of the following statements are true about [mathjaxinline]G[/mathjaxinline]? Check all that apply: </p>
<p>
<div class="wrapper-problem-response" tabindex="-1" aria-label="Question 1" role="group"><div class="choicegroup capa_inputtype" id="inputtype_u2_6_cq_grover_iterop_2_1">
<fieldset aria-describedby="status_u2_6_cq_grover_iterop_2_1">
<div class="field">
<input type="checkbox" name="input_u2_6_cq_grover_iterop_2_1[]" id="input_u2_6_cq_grover_iterop_2_1_choice_0" class="field-input input-checkbox" value="choice_0"/><label id="u2_6_cq_grover_iterop_2_1-choice_0-label" for="input_u2_6_cq_grover_iterop_2_1_choice_0" class="response-label field-label label-inline" aria-describedby="status_u2_6_cq_grover_iterop_2_1">
<text>[mathjaxinline]|\psi \rangle[/mathjaxinline] is an equal superposition over all computational basis states</text>
</label>
</div>
<div class="field">
<input type="checkbox" name="input_u2_6_cq_grover_iterop_2_1[]" id="input_u2_6_cq_grover_iterop_2_1_choice_1" class="field-input input-checkbox" value="choice_1"/><label id="u2_6_cq_grover_iterop_2_1-choice_1-label" for="input_u2_6_cq_grover_iterop_2_1_choice_1" class="response-label field-label label-inline" aria-describedby="status_u2_6_cq_grover_iterop_2_1">
<text>[mathjaxinline]|\psi \rangle \langle \psi |[/mathjaxinline] is performed by using a bunch of Hadamard gates</text>
</label>
</div>
<div class="field">
<input type="checkbox" name="input_u2_6_cq_grover_iterop_2_1[]" id="input_u2_6_cq_grover_iterop_2_1_choice_2" class="field-input input-checkbox" value="choice_2"/><label id="u2_6_cq_grover_iterop_2_1-choice_2-label" for="input_u2_6_cq_grover_iterop_2_1_choice_2" class="response-label field-label label-inline" aria-describedby="status_u2_6_cq_grover_iterop_2_1">
<text>[mathjaxinline]O[/mathjaxinline] is the 'zero' operator which inverts the state about the mean</text>
</label>
</div>
<div class="field">
<input type="checkbox" name="input_u2_6_cq_grover_iterop_2_1[]" id="input_u2_6_cq_grover_iterop_2_1_choice_3" class="field-input input-checkbox" value="choice_3"/><label id="u2_6_cq_grover_iterop_2_1-choice_3-label" for="input_u2_6_cq_grover_iterop_2_1_choice_3" class="response-label field-label label-inline" aria-describedby="status_u2_6_cq_grover_iterop_2_1">
<text>[mathjaxinline]O[/mathjaxinline] is the 'Oracle' operator which shifts the phase of the marked item</text>
</label>
</div>
<div class="field">
<input type="checkbox" name="input_u2_6_cq_grover_iterop_2_1[]" id="input_u2_6_cq_grover_iterop_2_1_choice_4" class="field-input input-checkbox" value="choice_4"/><label id="u2_6_cq_grover_iterop_2_1-choice_4-label" for="input_u2_6_cq_grover_iterop_2_1_choice_4" class="response-label field-label label-inline" aria-describedby="status_u2_6_cq_grover_iterop_2_1">
<text>Grover's algorithm consists solely of applying [mathjaxinline]G[/mathjaxinline] approximately [mathjaxinline]\sqrt{N}[/mathjaxinline] times for a search space of [mathjaxinline]N[/mathjaxinline] items, to qubits starting in the [mathjaxinline]|+\rangle[/mathjaxinline] state</text>
</label>
</div>
<span id="answer_u2_6_cq_grover_iterop_2_1"/>
</fieldset>
<div class="indicator-container">
<span class="status unanswered" id="status_u2_6_cq_grover_iterop_2_1" data-tooltip="Not yet answered.">
<span class="sr">unanswered</span><span class="status-icon" aria-hidden="true"/>
</span>
</div>
</div></div>
</p>
</div>
<div class="action">
<input type="hidden" name="problem_id" value="Properties of the Grover iteration operator" />
<div class="submit-attempt-container">
<button type="button" class="submit btn-brand" data-submitting="Submitting" data-value="Submit" data-should-enable-submit-button="True" aria-describedby="submission_feedback_u2_6_cq_grover_iterop" >
<span class="submit-label">Submit</span>
</button>
<div class="submission-feedback" id="submission_feedback_u2_6_cq_grover_iterop">
<span class="sr">Some problems have options such as save, reset, hints, or show answer. These options follow the Submit button.</span>
</div>
</div>
<div class="problem-action-buttons-wrapper">
<span class="problem-action-button-wrapper">
<button type="button" class="save problem-action-btn btn-default btn-small" data-value="Save">
<span class="icon fa fa-floppy-o" aria-hidden="true"></span>
<span aria-hidden="true">Save</span>
<span class="sr">Save your answer</span>
</button>
</span>
</div>
</div>
<div class="notification warning notification-gentle-alert
is-hidden"
tabindex="-1">
<span class="icon fa fa-exclamation-circle" aria-hidden="true"></span>
<span class="notification-message" aria-describedby="u2_6_cq_grover_iterop-problem-title">
</span>
<div class="notification-btn-wrapper">
<button type="button" class="btn btn-default btn-small notification-btn review-btn sr">Review</button>
</div>
</div>
<div class="notification warning notification-save
is-hidden"
tabindex="-1">
<span class="icon fa fa-save" aria-hidden="true"></span>
<span class="notification-message" aria-describedby="u2_6_cq_grover_iterop-problem-title">None
</span>
<div class="notification-btn-wrapper">
<button type="button" class="btn btn-default btn-small notification-btn review-btn sr">Review</button>
</div>
</div>
<div class="notification general notification-show-answer
is-hidden"
tabindex="-1">
<span class="icon fa fa-info-circle" aria-hidden="true"></span>
<span class="notification-message" aria-describedby="u2_6_cq_grover_iterop-problem-title">Answers are displayed within the problem
</span>
<div class="notification-btn-wrapper">
<button type="button" class="btn btn-default btn-small notification-btn review-btn sr">Review</button>
</div>
</div>
</div>
"
data-graded="True">
<p class="loading-spinner">
<i class="fa fa-spinner fa-pulse fa-2x fa-fw"></i>
<span class="sr">Loading…</span>
</p>
</div>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:MITx+8.370.2x+1T2018+type@html+block@html_site_search_box1">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-course-id="course-v1:MITx+8.370.2x+1T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="f60590b01ed511f095f616ffcd2b1d4d" data-runtime-version="1" data-block-type="html" data-usage-id="block-v1:MITx+8.370.2x+1T2018+type@html+block@html_site_search_box1" data-runtime-class="LmsRuntime" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.370.2x+1T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.370.2x+1T2018/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
var add_site_search = function(){
course_static_url = $('#dummy_course_static_link').attr('href').replace('/NONE', '');
jump_to_url = $('#dummy_jump_link').attr('href').replace('/NONE', '');
if (typeof String.prototype.startsWith != 'function') {
// see below for better implementation!
String.prototype.startsWith = function (str){
return this.indexOf(str) === 0;
};
}
if(typeof(String.prototype.trim) === "undefined")
{
String.prototype.trim = function()
{
return String(this).replace(/^\s+|\s+$/g, '');
};
}
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var amp = String.fromCharCode(38);
var rlb = rb + lb;
var mke = function(x){ return lb + x + rb; }
var search_module_url = "";
var get_search_module_ficus = function(){
var cid = $('div.xblock').data('course-id');
if (cid){
console.log("cid = ", cid);
// search_module_url = "/courses/course-v1:MITx+8.370.2x+1T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.370.2x+1T2018/courseware/welcome/Search_this_course/"; // automatically rewritten
console.log("3. search_module_url = ", search_module_url);
return;
}
var course_root_link = $('span.nav-item-course').find('a').attr('href');
if (course_root_link){
console.log("course_root_link = ", course_root_link);
search_module_url = course_root_link.replace("course/", "courseware/welcome/Search_this_course/");
console.log("2. search_module_url = ", search_module_url);
return
}
console.log("cannot determine search module url");
}
var get_search_module = function(){
// find search this module link
if (!($('div.course-index').length)){
return get_search_module_ficus();
}
$('div.course-index').find('nav').find('a').each(function(){
if ($(this).text().trim().startsWith("Search this course")){
search_module_url = $(this).attr('href');
console.log("search_module_url = ", search_module_url);
}
});
}
var go_to_search = function(){
get_search_module();
var sterm = $('#site-search-box').val();
// new_url = jump_to_url + "/Search_this_module/?q=" + sterm;
new_url = search_module_url + "?q=" + sterm;
console.log("sterm = ", sterm, " ; going to ", new_url);
window.location.href = new_url;
}
if (!$('#site-search-box').length){
$("nav.courseware").find("ol").append(lb + "section style='float:right'" + rlb + "input size='20'"
+ " id='site-search-box'"
+ rlb + "img src='" + course_static_url
+ "/images_search_glass.png'/" + rlb + "/input" + rlb + "/section" + rb);
}
$("#site-search-box").keypress(function(event) {
if (event.which == 13) {
event.preventDefault();
go_to_search();
}
});
// $('#site-search-box').bind("enterKey", go_to_search);
var get = function(x){
return eval(x);
}
return {'course_static_url': course_static_url,
'jump_to_url': jump_to_url,
'go_to_search': go_to_search,
'get_search_module': get_search_module,
'get_search_module_ficus': get_search_module_ficus,
'get': get,
}
}
var the_site_search = add_site_search();
var add_fix_transcript = function(){
if ($('div.wrap-instructor-info').length==0){
return;
}
$('div.xblock-student_view-video').each(function(key, vblock_e){
var vblock = $(vblock_e);
var vuid = vblock.data('usage-id').split('@');
var vid;
if (vuid.length==1){
vuid = vblock.data('usage-id').split(';_')
vid = vuid[5];
}else{
vid = vuid[2];
}
var mfnpre = vid.split("_video",1)[0];
var mfnid = mfnpre; // no periods
mfnpre = mfnpre.replace('8_370', '8.370'); // periods in gh filename
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var mke = function(x){ return lb + x + rb; }
var ftid = "fix_transcript_" + mfnid;
if (!$('#' + ftid).length){
var html = lb + "span id='" + ftid + "' style='float:right'" + rb + lb + "a href='#'" + rb;
html += "contribute transcript fix" + mke("/a") + mke("/span");
console.log("html = ", html);
vblock.after(html)
}
$('#' + ftid).click(function(){
var cst = $('ol.subtitles').find('li.current');
var cindex = Number(cst.data('index'));
var gurl;
if (mfnpre.endsWith('_cq_sol')){
gurl = "https://github.com/mitocw/content-mit-8370x-cq-sol-subtitles/blob/master/";
}else{
gurl = "https://github.com/mitocw/content-mit-8370x-subtitles/blob/master/";
}
gurl += mfnpre + ".txt#L" + String(cindex + 10 + 1);
console.log("going to ", gurl);
window.open(gurl, "MITx 8.370x subtitle source");
});
});
}
try{
add_fix_transcript();
}
catch(err){
console.log(err);
}
try{
var rb = String.fromCharCode(62);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 3000);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 8000);
}
catch(err){
console.log(err);
}
</script></span>
</div>
</div>
</div>
</div>
<div class="xblock xblock-public_view xblock-public_view-vertical" data-course-id="course-v1:MITx+8.370.2x+1T2018" data-graded="True" data-init="VerticalStudentView" data-request-token="f60590b01ed511f095f616ffcd2b1d4d" data-runtime-version="1" data-block-type="vertical" data-usage-id="block-v1:MITx+8.370.2x+1T2018+type@vertical+block@Grovers_search_when_there_are_multiple_solutions" data-runtime-class="LmsRuntime" data-has-score="False">
<h2 class="hd hd-2 unit-title">Grover's search when there are multiple solutions</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.370.2x+1T2018+type@video+block@U2L6e">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-course-id="course-v1:MITx+8.370.2x+1T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="f60590b01ed511f095f616ffcd2b1d4d" data-runtime-version="1" data-block-type="video" data-usage-id="block-v1:MITx+8.370.2x+1T2018+type@video+block@U2L6e" data-runtime-class="LmsRuntime" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">Grover's search when there are multiple solutions</h3>
<div
id="video_U2L6e"
class="video closed"
data-metadata='{"publishCompletionUrl": "/courses/course-v1:MITx+8.370.2x+1T2018/xblock/block-v1:MITx+8.370.2x+1T2018+type@video+block@U2L6e/handler/publish_completion", "duration": 0.0, "transcriptLanguage": "en", "ytTestTimeout": 1500, "prioritizeHls": false, "generalSpeed": 1.0, "sources": [], "captionDataDir": null, "autoAdvance": false, "poster": null, "autohideHtml5": false, "speed": null, "transcriptTranslationUrl": "/courses/course-v1:MITx+8.370.2x+1T2018/xblock/block-v1:MITx+8.370.2x+1T2018+type@video+block@U2L6e/handler/transcript/translation/__lang__", "recordedYoutubeIsAvailable": true, "completionEnabled": false, "end": 0.0, "ytMetadataEndpoint": "", "completionPercentage": 0.95, "savedVideoPosition": 0.0, "lmsRootURL": "https://openlearninglibrary.mit.edu", "saveStateEnabled": false, "start": 0.0, "streams": "1.00:dNXHMrhnKUQ", "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+8.370.2x+1T2018/xblock/block-v1:MITx+8.370.2x+1T2018+type@video+block@U2L6e/handler/transcript/available_translations", "autoplay": false, "showCaptions": "true", "transcriptLanguages": {"en": "English"}, "saveStateUrl": "/courses/course-v1:MITx+8.370.2x+1T2018/xblock/block-v1:MITx+8.370.2x+1T2018+type@video+block@U2L6e/handler/xmodule_handler/save_user_state", "ytApiUrl": "https://www.youtube.com/iframe_api"}'
data-bumper-metadata='null'
data-autoadvance-enabled="False"
data-poster='null'
tabindex="-1"
>
<div class="focus_grabber first"></div>
<div class="tc-wrapper">
<div class="video-wrapper">
<span tabindex="0" class="spinner" aria-hidden="false" aria-label="Loading video player"></span>
<span tabindex="-1" class="btn-play fa fa-youtube-play fa-2x is-hidden" aria-hidden="true" aria-label="Play video"></span>
<div class="video-player-pre"></div>
<div class="video-player">
<div id="U2L6e"></div>
<h4 class="hd hd-4 video-error is-hidden">No playable video sources found.</h4>
<h4 class="hd hd-4 video-hls-error is-hidden">
Your browser does not support this video format. Try using a different browser.
</h4>
</div>
<div class="video-player-post"></div>
<div class="closed-captions"></div>
<div class="video-controls is-hidden">
<div>
<div class="vcr"><div class="vidtime">0:00 / 0:00</div></div>
<div class="secondary-controls"></div>
</div>
</div>
</div>
</div>
<div class="focus_grabber last"></div>
</div>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:MITx+8.370.2x+1T2018+type@html+block@site_search_box5">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-course-id="course-v1:MITx+8.370.2x+1T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="f60590b01ed511f095f616ffcd2b1d4d" data-runtime-version="1" data-block-type="html" data-usage-id="block-v1:MITx+8.370.2x+1T2018+type@html+block@site_search_box5" data-runtime-class="LmsRuntime" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.370.2x+1T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.370.2x+1T2018/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
var add_site_search = function(){
course_static_url = $('#dummy_course_static_link').attr('href').replace('/NONE', '');
jump_to_url = $('#dummy_jump_link').attr('href').replace('/NONE', '');
if (typeof String.prototype.startsWith != 'function') {
// see below for better implementation!
String.prototype.startsWith = function (str){
return this.indexOf(str) === 0;
};
}
if(typeof(String.prototype.trim) === "undefined")
{
String.prototype.trim = function()
{
return String(this).replace(/^\s+|\s+$/g, '');
};
}
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var amp = String.fromCharCode(38);
var rlb = rb + lb;
var mke = function(x){ return lb + x + rb; }
var search_module_url = "";
var get_search_module_ficus = function(){
var cid = $('div.xblock').data('course-id');
if (cid){
console.log("cid = ", cid);
// search_module_url = "/courses/course-v1:MITx+8.370.2x+1T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.370.2x+1T2018/courseware/welcome/Search_this_course/"; // automatically rewritten
console.log("3. search_module_url = ", search_module_url);
return;
}
var course_root_link = $('span.nav-item-course').find('a').attr('href');
if (course_root_link){
console.log("course_root_link = ", course_root_link);
search_module_url = course_root_link.replace("course/", "courseware/welcome/Search_this_course/");
console.log("2. search_module_url = ", search_module_url);
return
}
console.log("cannot determine search module url");
}
var get_search_module = function(){
// find search this module link
if (!($('div.course-index').length)){
return get_search_module_ficus();
}
$('div.course-index').find('nav').find('a').each(function(){
if ($(this).text().trim().startsWith("Search this course")){
search_module_url = $(this).attr('href');
console.log("search_module_url = ", search_module_url);
}
});
}
var go_to_search = function(){
get_search_module();
var sterm = $('#site-search-box').val();
// new_url = jump_to_url + "/Search_this_module/?q=" + sterm;
new_url = search_module_url + "?q=" + sterm;
console.log("sterm = ", sterm, " ; going to ", new_url);
window.location.href = new_url;
}
if (!$('#site-search-box').length){
$("nav.courseware").find("ol").append(lb + "section style='float:right'" + rlb + "input size='20'"
+ " id='site-search-box'"
+ rlb + "img src='" + course_static_url
+ "/images_search_glass.png'/" + rlb + "/input" + rlb + "/section" + rb);
}
$("#site-search-box").keypress(function(event) {
if (event.which == 13) {
event.preventDefault();
go_to_search();
}
});
// $('#site-search-box').bind("enterKey", go_to_search);
var get = function(x){
return eval(x);
}
return {'course_static_url': course_static_url,
'jump_to_url': jump_to_url,
'go_to_search': go_to_search,
'get_search_module': get_search_module,
'get_search_module_ficus': get_search_module_ficus,
'get': get,
}
}
var the_site_search = add_site_search();
var add_fix_transcript = function(){
if ($('div.wrap-instructor-info').length==0){
return;
}
$('div.xblock-student_view-video').each(function(key, vblock_e){
var vblock = $(vblock_e);
var vuid = vblock.data('usage-id').split('@');
var vid;
if (vuid.length==1){
vuid = vblock.data('usage-id').split(';_')
vid = vuid[5];
}else{
vid = vuid[2];
}
var mfnpre = vid.split("_video",1)[0];
var mfnid = mfnpre; // no periods
mfnpre = mfnpre.replace('8_370', '8.370'); // periods in gh filename
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var mke = function(x){ return lb + x + rb; }
var ftid = "fix_transcript_" + mfnid;
if (!$('#' + ftid).length){
var html = lb + "span id='" + ftid + "' style='float:right'" + rb + lb + "a href='#'" + rb;
html += "contribute transcript fix" + mke("/a") + mke("/span");
console.log("html = ", html);
vblock.after(html)
}
$('#' + ftid).click(function(){
var cst = $('ol.subtitles').find('li.current');
var cindex = Number(cst.data('index'));
var gurl;
if (mfnpre.endsWith('_cq_sol')){
gurl = "https://github.com/mitocw/content-mit-8370x-cq-sol-subtitles/blob/master/";
}else{
gurl = "https://github.com/mitocw/content-mit-8370x-subtitles/blob/master/";
}
gurl += mfnpre + ".txt#L" + String(cindex + 10 + 1);
console.log("going to ", gurl);
window.open(gurl, "MITx 8.370x subtitle source");
});
});
}
try{
add_fix_transcript();
}
catch(err){
console.log(err);
}
try{
var rb = String.fromCharCode(62);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 3000);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 8000);
}
catch(err){
console.log(err);
}
</script></span>
</div>
</div>
</div>
</div>
<div class="xblock xblock-public_view xblock-public_view-vertical" data-course-id="course-v1:MITx+8.370.2x+1T2018" data-graded="True" data-init="VerticalStudentView" data-request-token="f60590b01ed511f095f616ffcd2b1d4d" data-runtime-version="1" data-block-type="vertical" data-usage-id="block-v1:MITx+8.370.2x+1T2018+type@vertical+block@CQ_Number_of_Grover_iterations_required_for_search" data-runtime-class="LmsRuntime" data-has-score="False">
<h2 class="hd hd-2 unit-title">CQ: Number of Grover iterations required for search</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.370.2x+1T2018+type@problem+block@u2_6_cq_grover_iter">
<div class="xblock xblock-public_view xblock-public_view-problem xmodule_display xmodule_ProblemBlock" data-course-id="course-v1:MITx+8.370.2x+1T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="f60590b01ed511f095f616ffcd2b1d4d" data-runtime-version="1" data-block-type="problem" data-usage-id="block-v1:MITx+8.370.2x+1T2018+type@problem+block@u2_6_cq_grover_iter" data-runtime-class="LmsRuntime" data-has-score="True">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Problem"}
</script>
<div id="problem_u2_6_cq_grover_iter" class="problems-wrapper" role="group"
aria-labelledby="u2_6_cq_grover_iter-problem-title"
data-problem-id="block-v1:MITx+8.370.2x+1T2018+type@problem+block@u2_6_cq_grover_iter" data-url="/courses/course-v1:MITx+8.370.2x+1T2018/xblock/block-v1:MITx+8.370.2x+1T2018+type@problem+block@u2_6_cq_grover_iter/handler/xmodule_handler"
data-problem-score="0"
data-problem-total-possible="1"
data-attempts-used="0"
data-content="
<h3 class="hd hd-3 problem-header" id="u2_6_cq_grover_iter-problem-title" aria-describedby="block-v1:MITx+8.370.2x+1T2018+type@problem+block@u2_6_cq_grover_iter-problem-progress" tabindex="-1">
Number of Grover iterations required for search
</h3>
<div class="problem-progress" id="block-v1:MITx+8.370.2x+1T2018+type@problem+block@u2_6_cq_grover_iter-problem-progress"></div>
<div class="problem">
<div>
<p>
This is a concept question, provided to double-check your understanding of the previous video clip. </p>
<p>
How many times goes the Grover iteration operator need to be applied when [mathjaxinline]N=4[/mathjaxinline] items are being searched, with [mathjaxinline]M=1[/mathjaxinline] solutions? </p>
<p>
<div class="wrapper-problem-response" tabindex="-1" aria-label="Question 1" role="group"><div class="choicegroup capa_inputtype" id="inputtype_u2_6_cq_grover_iter_2_1">
<fieldset aria-describedby="status_u2_6_cq_grover_iter_2_1">
<div class="field">
<input type="checkbox" name="input_u2_6_cq_grover_iter_2_1[]" id="input_u2_6_cq_grover_iter_2_1_choice_0" class="field-input input-checkbox" value="choice_0"/><label id="u2_6_cq_grover_iter_2_1-choice_0-label" for="input_u2_6_cq_grover_iter_2_1_choice_0" class="response-label field-label label-inline" aria-describedby="status_u2_6_cq_grover_iter_2_1">
<text>4</text>
</label>
</div>
<div class="field">
<input type="checkbox" name="input_u2_6_cq_grover_iter_2_1[]" id="input_u2_6_cq_grover_iter_2_1_choice_1" class="field-input input-checkbox" value="choice_1"/><label id="u2_6_cq_grover_iter_2_1-choice_1-label" for="input_u2_6_cq_grover_iter_2_1_choice_1" class="response-label field-label label-inline" aria-describedby="status_u2_6_cq_grover_iter_2_1">
<text>3</text>
</label>
</div>
<div class="field">
<input type="checkbox" name="input_u2_6_cq_grover_iter_2_1[]" id="input_u2_6_cq_grover_iter_2_1_choice_2" class="field-input input-checkbox" value="choice_2"/><label id="u2_6_cq_grover_iter_2_1-choice_2-label" for="input_u2_6_cq_grover_iter_2_1_choice_2" class="response-label field-label label-inline" aria-describedby="status_u2_6_cq_grover_iter_2_1">
<text>2</text>
</label>
</div>
<div class="field">
<input type="checkbox" name="input_u2_6_cq_grover_iter_2_1[]" id="input_u2_6_cq_grover_iter_2_1_choice_3" class="field-input input-checkbox" value="choice_3"/><label id="u2_6_cq_grover_iter_2_1-choice_3-label" for="input_u2_6_cq_grover_iter_2_1_choice_3" class="response-label field-label label-inline" aria-describedby="status_u2_6_cq_grover_iter_2_1">
<text>1</text>
</label>
</div>
<span id="answer_u2_6_cq_grover_iter_2_1"/>
</fieldset>
<div class="indicator-container">
<span class="status unanswered" id="status_u2_6_cq_grover_iter_2_1" data-tooltip="Not yet answered.">
<span class="sr">unanswered</span><span class="status-icon" aria-hidden="true"/>
</span>
</div>
</div></div>
</p>
</div>
<div class="action">
<input type="hidden" name="problem_id" value="Number of Grover iterations required for search" />
<div class="submit-attempt-container">
<button type="button" class="submit btn-brand" data-submitting="Submitting" data-value="Submit" data-should-enable-submit-button="True" aria-describedby="submission_feedback_u2_6_cq_grover_iter" >
<span class="submit-label">Submit</span>
</button>
<div class="submission-feedback" id="submission_feedback_u2_6_cq_grover_iter">
<span class="sr">Some problems have options such as save, reset, hints, or show answer. These options follow the Submit button.</span>
</div>
</div>
<div class="problem-action-buttons-wrapper">
<span class="problem-action-button-wrapper">
<button type="button" class="save problem-action-btn btn-default btn-small" data-value="Save">
<span class="icon fa fa-floppy-o" aria-hidden="true"></span>
<span aria-hidden="true">Save</span>
<span class="sr">Save your answer</span>
</button>
</span>
</div>
</div>
<div class="notification warning notification-gentle-alert
is-hidden"
tabindex="-1">
<span class="icon fa fa-exclamation-circle" aria-hidden="true"></span>
<span class="notification-message" aria-describedby="u2_6_cq_grover_iter-problem-title">
</span>
<div class="notification-btn-wrapper">
<button type="button" class="btn btn-default btn-small notification-btn review-btn sr">Review</button>
</div>
</div>
<div class="notification warning notification-save
is-hidden"
tabindex="-1">
<span class="icon fa fa-save" aria-hidden="true"></span>
<span class="notification-message" aria-describedby="u2_6_cq_grover_iter-problem-title">None
</span>
<div class="notification-btn-wrapper">
<button type="button" class="btn btn-default btn-small notification-btn review-btn sr">Review</button>
</div>
</div>
<div class="notification general notification-show-answer
is-hidden"
tabindex="-1">
<span class="icon fa fa-info-circle" aria-hidden="true"></span>
<span class="notification-message" aria-describedby="u2_6_cq_grover_iter-problem-title">Answers are displayed within the problem
</span>
<div class="notification-btn-wrapper">
<button type="button" class="btn btn-default btn-small notification-btn review-btn sr">Review</button>
</div>
</div>
</div>
"
data-graded="True">
<p class="loading-spinner">
<i class="fa fa-spinner fa-pulse fa-2x fa-fw"></i>
<span class="sr">Loading…</span>
</p>
</div>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:MITx+8.370.2x+1T2018+type@html+block@html_site_search_box2">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-course-id="course-v1:MITx+8.370.2x+1T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="f60590b01ed511f095f616ffcd2b1d4d" data-runtime-version="1" data-block-type="html" data-usage-id="block-v1:MITx+8.370.2x+1T2018+type@html+block@html_site_search_box2" data-runtime-class="LmsRuntime" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.370.2x+1T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.370.2x+1T2018/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
var add_site_search = function(){
course_static_url = $('#dummy_course_static_link').attr('href').replace('/NONE', '');
jump_to_url = $('#dummy_jump_link').attr('href').replace('/NONE', '');
if (typeof String.prototype.startsWith != 'function') {
// see below for better implementation!
String.prototype.startsWith = function (str){
return this.indexOf(str) === 0;
};
}
if(typeof(String.prototype.trim) === "undefined")
{
String.prototype.trim = function()
{
return String(this).replace(/^\s+|\s+$/g, '');
};
}
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var amp = String.fromCharCode(38);
var rlb = rb + lb;
var mke = function(x){ return lb + x + rb; }
var search_module_url = "";
var get_search_module_ficus = function(){
var cid = $('div.xblock').data('course-id');
if (cid){
console.log("cid = ", cid);
// search_module_url = "/courses/course-v1:MITx+8.370.2x+1T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.370.2x+1T2018/courseware/welcome/Search_this_course/"; // automatically rewritten
console.log("3. search_module_url = ", search_module_url);
return;
}
var course_root_link = $('span.nav-item-course').find('a').attr('href');
if (course_root_link){
console.log("course_root_link = ", course_root_link);
search_module_url = course_root_link.replace("course/", "courseware/welcome/Search_this_course/");
console.log("2. search_module_url = ", search_module_url);
return
}
console.log("cannot determine search module url");
}
var get_search_module = function(){
// find search this module link
if (!($('div.course-index').length)){
return get_search_module_ficus();
}
$('div.course-index').find('nav').find('a').each(function(){
if ($(this).text().trim().startsWith("Search this course")){
search_module_url = $(this).attr('href');
console.log("search_module_url = ", search_module_url);
}
});
}
var go_to_search = function(){
get_search_module();
var sterm = $('#site-search-box').val();
// new_url = jump_to_url + "/Search_this_module/?q=" + sterm;
new_url = search_module_url + "?q=" + sterm;
console.log("sterm = ", sterm, " ; going to ", new_url);
window.location.href = new_url;
}
if (!$('#site-search-box').length){
$("nav.courseware").find("ol").append(lb + "section style='float:right'" + rlb + "input size='20'"
+ " id='site-search-box'"
+ rlb + "img src='" + course_static_url
+ "/images_search_glass.png'/" + rlb + "/input" + rlb + "/section" + rb);
}
$("#site-search-box").keypress(function(event) {
if (event.which == 13) {
event.preventDefault();
go_to_search();
}
});
// $('#site-search-box').bind("enterKey", go_to_search);
var get = function(x){
return eval(x);
}
return {'course_static_url': course_static_url,
'jump_to_url': jump_to_url,
'go_to_search': go_to_search,
'get_search_module': get_search_module,
'get_search_module_ficus': get_search_module_ficus,
'get': get,
}
}
var the_site_search = add_site_search();
var add_fix_transcript = function(){
if ($('div.wrap-instructor-info').length==0){
return;
}
$('div.xblock-student_view-video').each(function(key, vblock_e){
var vblock = $(vblock_e);
var vuid = vblock.data('usage-id').split('@');
var vid;
if (vuid.length==1){
vuid = vblock.data('usage-id').split(';_')
vid = vuid[5];
}else{
vid = vuid[2];
}
var mfnpre = vid.split("_video",1)[0];
var mfnid = mfnpre; // no periods
mfnpre = mfnpre.replace('8_370', '8.370'); // periods in gh filename
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var mke = function(x){ return lb + x + rb; }
var ftid = "fix_transcript_" + mfnid;
if (!$('#' + ftid).length){
var html = lb + "span id='" + ftid + "' style='float:right'" + rb + lb + "a href='#'" + rb;
html += "contribute transcript fix" + mke("/a") + mke("/span");
console.log("html = ", html);
vblock.after(html)
}
$('#' + ftid).click(function(){
var cst = $('ol.subtitles').find('li.current');
var cindex = Number(cst.data('index'));
var gurl;
if (mfnpre.endsWith('_cq_sol')){
gurl = "https://github.com/mitocw/content-mit-8370x-cq-sol-subtitles/blob/master/";
}else{
gurl = "https://github.com/mitocw/content-mit-8370x-subtitles/blob/master/";
}
gurl += mfnpre + ".txt#L" + String(cindex + 10 + 1);
console.log("going to ", gurl);
window.open(gurl, "MITx 8.370x subtitle source");
});
});
}
try{
add_fix_transcript();
}
catch(err){
console.log(err);
}
try{
var rb = String.fromCharCode(62);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 3000);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 8000);
}
catch(err){
console.log(err);
}
</script></span>
</div>
</div>
</div>
</div>
<div class="xblock xblock-public_view xblock-public_view-vertical" data-course-id="course-v1:MITx+8.370.2x+1T2018" data-graded="True" data-init="VerticalStudentView" data-request-token="f60590b01ed511f095f616ffcd2b1d4d" data-runtime-version="1" data-block-type="vertical" data-usage-id="block-v1:MITx+8.370.2x+1T2018+type@vertical+block@Grovers_search_algorithm_with_an_unknown_number_of_solutions" data-runtime-class="LmsRuntime" data-has-score="False">
<h2 class="hd hd-2 unit-title">Grover's search algorithm with an unknown number of solutions</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.370.2x+1T2018+type@video+block@U2L6f">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-course-id="course-v1:MITx+8.370.2x+1T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="f60590b01ed511f095f616ffcd2b1d4d" data-runtime-version="1" data-block-type="video" data-usage-id="block-v1:MITx+8.370.2x+1T2018+type@video+block@U2L6f" data-runtime-class="LmsRuntime" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">Grover's search algorithm with an unknown number of solutions</h3>
<div
id="video_U2L6f"
class="video closed"
data-metadata='{"publishCompletionUrl": "/courses/course-v1:MITx+8.370.2x+1T2018/xblock/block-v1:MITx+8.370.2x+1T2018+type@video+block@U2L6f/handler/publish_completion", "duration": 0.0, "transcriptLanguage": "en", "ytTestTimeout": 1500, "prioritizeHls": false, "generalSpeed": 1.0, "sources": [], "captionDataDir": null, "autoAdvance": false, "poster": null, "autohideHtml5": false, "speed": null, "transcriptTranslationUrl": "/courses/course-v1:MITx+8.370.2x+1T2018/xblock/block-v1:MITx+8.370.2x+1T2018+type@video+block@U2L6f/handler/transcript/translation/__lang__", "recordedYoutubeIsAvailable": true, "completionEnabled": false, "end": 0.0, "ytMetadataEndpoint": "", "completionPercentage": 0.95, "savedVideoPosition": 0.0, "lmsRootURL": "https://openlearninglibrary.mit.edu", "saveStateEnabled": false, "start": 0.0, "streams": "1.00:yWjAnzfBJMg", "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+8.370.2x+1T2018/xblock/block-v1:MITx+8.370.2x+1T2018+type@video+block@U2L6f/handler/transcript/available_translations", "autoplay": false, "showCaptions": "true", "transcriptLanguages": {"en": "English"}, "saveStateUrl": "/courses/course-v1:MITx+8.370.2x+1T2018/xblock/block-v1:MITx+8.370.2x+1T2018+type@video+block@U2L6f/handler/xmodule_handler/save_user_state", "ytApiUrl": "https://www.youtube.com/iframe_api"}'
data-bumper-metadata='null'
data-autoadvance-enabled="False"
data-poster='null'
tabindex="-1"
>
<div class="focus_grabber first"></div>
<div class="tc-wrapper">
<div class="video-wrapper">
<span tabindex="0" class="spinner" aria-hidden="false" aria-label="Loading video player"></span>
<span tabindex="-1" class="btn-play fa fa-youtube-play fa-2x is-hidden" aria-hidden="true" aria-label="Play video"></span>
<div class="video-player-pre"></div>
<div class="video-player">
<div id="U2L6f"></div>
<h4 class="hd hd-4 video-error is-hidden">No playable video sources found.</h4>
<h4 class="hd hd-4 video-hls-error is-hidden">
Your browser does not support this video format. Try using a different browser.
</h4>
</div>
<div class="video-player-post"></div>
<div class="closed-captions"></div>
<div class="video-controls is-hidden">
<div>
<div class="vcr"><div class="vidtime">0:00 / 0:00</div></div>
<div class="secondary-controls"></div>
</div>
</div>
</div>
</div>
<div class="focus_grabber last"></div>
</div>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:MITx+8.370.2x+1T2018+type@html+block@site_search_box6">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-course-id="course-v1:MITx+8.370.2x+1T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="f60590b01ed511f095f616ffcd2b1d4d" data-runtime-version="1" data-block-type="html" data-usage-id="block-v1:MITx+8.370.2x+1T2018+type@html+block@site_search_box6" data-runtime-class="LmsRuntime" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.370.2x+1T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.370.2x+1T2018/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
var add_site_search = function(){
course_static_url = $('#dummy_course_static_link').attr('href').replace('/NONE', '');
jump_to_url = $('#dummy_jump_link').attr('href').replace('/NONE', '');
if (typeof String.prototype.startsWith != 'function') {
// see below for better implementation!
String.prototype.startsWith = function (str){
return this.indexOf(str) === 0;
};
}
if(typeof(String.prototype.trim) === "undefined")
{
String.prototype.trim = function()
{
return String(this).replace(/^\s+|\s+$/g, '');
};
}
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var amp = String.fromCharCode(38);
var rlb = rb + lb;
var mke = function(x){ return lb + x + rb; }
var search_module_url = "";
var get_search_module_ficus = function(){
var cid = $('div.xblock').data('course-id');
if (cid){
console.log("cid = ", cid);
// search_module_url = "/courses/course-v1:MITx+8.370.2x+1T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.370.2x+1T2018/courseware/welcome/Search_this_course/"; // automatically rewritten
console.log("3. search_module_url = ", search_module_url);
return;
}
var course_root_link = $('span.nav-item-course').find('a').attr('href');
if (course_root_link){
console.log("course_root_link = ", course_root_link);
search_module_url = course_root_link.replace("course/", "courseware/welcome/Search_this_course/");
console.log("2. search_module_url = ", search_module_url);
return
}
console.log("cannot determine search module url");
}
var get_search_module = function(){
// find search this module link
if (!($('div.course-index').length)){
return get_search_module_ficus();
}
$('div.course-index').find('nav').find('a').each(function(){
if ($(this).text().trim().startsWith("Search this course")){
search_module_url = $(this).attr('href');
console.log("search_module_url = ", search_module_url);
}
});
}
var go_to_search = function(){
get_search_module();
var sterm = $('#site-search-box').val();
// new_url = jump_to_url + "/Search_this_module/?q=" + sterm;
new_url = search_module_url + "?q=" + sterm;
console.log("sterm = ", sterm, " ; going to ", new_url);
window.location.href = new_url;
}
if (!$('#site-search-box').length){
$("nav.courseware").find("ol").append(lb + "section style='float:right'" + rlb + "input size='20'"
+ " id='site-search-box'"
+ rlb + "img src='" + course_static_url
+ "/images_search_glass.png'/" + rlb + "/input" + rlb + "/section" + rb);
}
$("#site-search-box").keypress(function(event) {
if (event.which == 13) {
event.preventDefault();
go_to_search();
}
});
// $('#site-search-box').bind("enterKey", go_to_search);
var get = function(x){
return eval(x);
}
return {'course_static_url': course_static_url,
'jump_to_url': jump_to_url,
'go_to_search': go_to_search,
'get_search_module': get_search_module,
'get_search_module_ficus': get_search_module_ficus,
'get': get,
}
}
var the_site_search = add_site_search();
var add_fix_transcript = function(){
if ($('div.wrap-instructor-info').length==0){
return;
}
$('div.xblock-student_view-video').each(function(key, vblock_e){
var vblock = $(vblock_e);
var vuid = vblock.data('usage-id').split('@');
var vid;
if (vuid.length==1){
vuid = vblock.data('usage-id').split(';_')
vid = vuid[5];
}else{
vid = vuid[2];
}
var mfnpre = vid.split("_video",1)[0];
var mfnid = mfnpre; // no periods
mfnpre = mfnpre.replace('8_370', '8.370'); // periods in gh filename
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var mke = function(x){ return lb + x + rb; }
var ftid = "fix_transcript_" + mfnid;
if (!$('#' + ftid).length){
var html = lb + "span id='" + ftid + "' style='float:right'" + rb + lb + "a href='#'" + rb;
html += "contribute transcript fix" + mke("/a") + mke("/span");
console.log("html = ", html);
vblock.after(html)
}
$('#' + ftid).click(function(){
var cst = $('ol.subtitles').find('li.current');
var cindex = Number(cst.data('index'));
var gurl;
if (mfnpre.endsWith('_cq_sol')){
gurl = "https://github.com/mitocw/content-mit-8370x-cq-sol-subtitles/blob/master/";
}else{
gurl = "https://github.com/mitocw/content-mit-8370x-subtitles/blob/master/";
}
gurl += mfnpre + ".txt#L" + String(cindex + 10 + 1);
console.log("going to ", gurl);
window.open(gurl, "MITx 8.370x subtitle source");
});
});
}
try{
add_fix_transcript();
}
catch(err){
console.log(err);
}
try{
var rb = String.fromCharCode(62);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 3000);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 8000);
}
catch(err){
console.log(err);
}
</script></span>
</div>
</div>
</div>
</div>
<div class="xblock xblock-public_view xblock-public_view-vertical" data-course-id="course-v1:MITx+8.370.2x+1T2018" data-graded="True" data-init="VerticalStudentView" data-request-token="f60590b01ed511f095f616ffcd2b1d4d" data-runtime-version="1" data-block-type="vertical" data-usage-id="block-v1:MITx+8.370.2x+1T2018+type@vertical+block@Grovers_search_algorithm_-_question_and_answer" data-runtime-class="LmsRuntime" data-has-score="False">
<h2 class="hd hd-2 unit-title">Grover's search algorithm - question and answer</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.370.2x+1T2018+type@video+block@U2L6g">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-course-id="course-v1:MITx+8.370.2x+1T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="f60590b01ed511f095f616ffcd2b1d4d" data-runtime-version="1" data-block-type="video" data-usage-id="block-v1:MITx+8.370.2x+1T2018+type@video+block@U2L6g" data-runtime-class="LmsRuntime" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">Grover's search algorithm - question and answer</h3>
<div
id="video_U2L6g"
class="video closed"
data-metadata='{"publishCompletionUrl": "/courses/course-v1:MITx+8.370.2x+1T2018/xblock/block-v1:MITx+8.370.2x+1T2018+type@video+block@U2L6g/handler/publish_completion", "duration": 0.0, "transcriptLanguage": "en", "ytTestTimeout": 1500, "prioritizeHls": false, "generalSpeed": 1.0, "sources": [], "captionDataDir": null, "autoAdvance": false, "poster": null, "autohideHtml5": false, "speed": null, "transcriptTranslationUrl": "/courses/course-v1:MITx+8.370.2x+1T2018/xblock/block-v1:MITx+8.370.2x+1T2018+type@video+block@U2L6g/handler/transcript/translation/__lang__", "recordedYoutubeIsAvailable": true, "completionEnabled": false, "end": 0.0, "ytMetadataEndpoint": "", "completionPercentage": 0.95, "savedVideoPosition": 0.0, "lmsRootURL": "https://openlearninglibrary.mit.edu", "saveStateEnabled": false, "start": 0.0, "streams": "1.00:eD3D2On-ysM", "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+8.370.2x+1T2018/xblock/block-v1:MITx+8.370.2x+1T2018+type@video+block@U2L6g/handler/transcript/available_translations", "autoplay": false, "showCaptions": "true", "transcriptLanguages": {"en": "English"}, "saveStateUrl": "/courses/course-v1:MITx+8.370.2x+1T2018/xblock/block-v1:MITx+8.370.2x+1T2018+type@video+block@U2L6g/handler/xmodule_handler/save_user_state", "ytApiUrl": "https://www.youtube.com/iframe_api"}'
data-bumper-metadata='null'
data-autoadvance-enabled="False"
data-poster='null'
tabindex="-1"
>
<div class="focus_grabber first"></div>
<div class="tc-wrapper">
<div class="video-wrapper">
<span tabindex="0" class="spinner" aria-hidden="false" aria-label="Loading video player"></span>
<span tabindex="-1" class="btn-play fa fa-youtube-play fa-2x is-hidden" aria-hidden="true" aria-label="Play video"></span>
<div class="video-player-pre"></div>
<div class="video-player">
<div id="U2L6g"></div>
<h4 class="hd hd-4 video-error is-hidden">No playable video sources found.</h4>
<h4 class="hd hd-4 video-hls-error is-hidden">
Your browser does not support this video format. Try using a different browser.
</h4>
</div>
<div class="video-player-post"></div>
<div class="closed-captions"></div>
<div class="video-controls is-hidden">
<div>
<div class="vcr"><div class="vidtime">0:00 / 0:00</div></div>
<div class="secondary-controls"></div>
</div>
</div>
</div>
</div>
<div class="focus_grabber last"></div>
</div>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:MITx+8.370.2x+1T2018+type@html+block@site_search_box7">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-course-id="course-v1:MITx+8.370.2x+1T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="f60590b01ed511f095f616ffcd2b1d4d" data-runtime-version="1" data-block-type="html" data-usage-id="block-v1:MITx+8.370.2x+1T2018+type@html+block@site_search_box7" data-runtime-class="LmsRuntime" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.370.2x+1T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.370.2x+1T2018/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
var add_site_search = function(){
course_static_url = $('#dummy_course_static_link').attr('href').replace('/NONE', '');
jump_to_url = $('#dummy_jump_link').attr('href').replace('/NONE', '');
if (typeof String.prototype.startsWith != 'function') {
// see below for better implementation!
String.prototype.startsWith = function (str){
return this.indexOf(str) === 0;
};
}
if(typeof(String.prototype.trim) === "undefined")
{
String.prototype.trim = function()
{
return String(this).replace(/^\s+|\s+$/g, '');
};
}
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var amp = String.fromCharCode(38);
var rlb = rb + lb;
var mke = function(x){ return lb + x + rb; }
var search_module_url = "";
var get_search_module_ficus = function(){
var cid = $('div.xblock').data('course-id');
if (cid){
console.log("cid = ", cid);
// search_module_url = "/courses/course-v1:MITx+8.370.2x+1T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.370.2x+1T2018/courseware/welcome/Search_this_course/"; // automatically rewritten
console.log("3. search_module_url = ", search_module_url);
return;
}
var course_root_link = $('span.nav-item-course').find('a').attr('href');
if (course_root_link){
console.log("course_root_link = ", course_root_link);
search_module_url = course_root_link.replace("course/", "courseware/welcome/Search_this_course/");
console.log("2. search_module_url = ", search_module_url);
return
}
console.log("cannot determine search module url");
}
var get_search_module = function(){
// find search this module link
if (!($('div.course-index').length)){
return get_search_module_ficus();
}
$('div.course-index').find('nav').find('a').each(function(){
if ($(this).text().trim().startsWith("Search this course")){
search_module_url = $(this).attr('href');
console.log("search_module_url = ", search_module_url);
}
});
}
var go_to_search = function(){
get_search_module();
var sterm = $('#site-search-box').val();
// new_url = jump_to_url + "/Search_this_module/?q=" + sterm;
new_url = search_module_url + "?q=" + sterm;
console.log("sterm = ", sterm, " ; going to ", new_url);
window.location.href = new_url;
}
if (!$('#site-search-box').length){
$("nav.courseware").find("ol").append(lb + "section style='float:right'" + rlb + "input size='20'"
+ " id='site-search-box'"
+ rlb + "img src='" + course_static_url
+ "/images_search_glass.png'/" + rlb + "/input" + rlb + "/section" + rb);
}
$("#site-search-box").keypress(function(event) {
if (event.which == 13) {
event.preventDefault();
go_to_search();
}
});
// $('#site-search-box').bind("enterKey", go_to_search);
var get = function(x){
return eval(x);
}
return {'course_static_url': course_static_url,
'jump_to_url': jump_to_url,
'go_to_search': go_to_search,
'get_search_module': get_search_module,
'get_search_module_ficus': get_search_module_ficus,
'get': get,
}
}
var the_site_search = add_site_search();
var add_fix_transcript = function(){
if ($('div.wrap-instructor-info').length==0){
return;
}
$('div.xblock-student_view-video').each(function(key, vblock_e){
var vblock = $(vblock_e);
var vuid = vblock.data('usage-id').split('@');
var vid;
if (vuid.length==1){
vuid = vblock.data('usage-id').split(';_')
vid = vuid[5];
}else{
vid = vuid[2];
}
var mfnpre = vid.split("_video",1)[0];
var mfnid = mfnpre; // no periods
mfnpre = mfnpre.replace('8_370', '8.370'); // periods in gh filename
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var mke = function(x){ return lb + x + rb; }
var ftid = "fix_transcript_" + mfnid;
if (!$('#' + ftid).length){
var html = lb + "span id='" + ftid + "' style='float:right'" + rb + lb + "a href='#'" + rb;
html += "contribute transcript fix" + mke("/a") + mke("/span");
console.log("html = ", html);
vblock.after(html)
}
$('#' + ftid).click(function(){
var cst = $('ol.subtitles').find('li.current');
var cindex = Number(cst.data('index'));
var gurl;
if (mfnpre.endsWith('_cq_sol')){
gurl = "https://github.com/mitocw/content-mit-8370x-cq-sol-subtitles/blob/master/";
}else{
gurl = "https://github.com/mitocw/content-mit-8370x-subtitles/blob/master/";
}
gurl += mfnpre + ".txt#L" + String(cindex + 10 + 1);
console.log("going to ", gurl);
window.open(gurl, "MITx 8.370x subtitle source");
});
});
}
try{
add_fix_transcript();
}
catch(err){
console.log(err);
}
try{
var rb = String.fromCharCode(62);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 3000);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 8000);
}
catch(err){
console.log(err);
}
</script></span>
</div>
</div>
</div>
</div>
© All Rights Reserved