answer
stringlengths
15
1.25M
/* Javadoc style sheet */ /* Overall document style */ body { background-color:#ffffff; color:#353833; font-family:Arial, Helvetica, sans-serif; font-size:76%; margin:0; } a:link, a:visited { text-decoration:none; color:#4c6b87; } a:hover, a:focus { text-decoration:none; color:#bb7a2a; } a:active { text-decoration:none; color:#4c6b87; } a[name] { color:#353833; } a[name]:hover { text-decoration:none; color:#353833; } pre { font-size:1.3em; } h1 { font-size:1.8em; } h2 { font-size:1.5em; } h3 { font-size:1.4em; } h4 { font-size:1.3em; } h5 { font-size:1.2em; } h6 { font-size:1.1em; } ul { list-style-type:circle; } code, tt { font-size:1.3em } dt code { } table tr td dt code { font-size:1.2em; vertical-align:top; } sup { font-size:.6em; } .clear { clear:both; height:0px; overflow:hidden; } .aboutLanguage { float:right; padding:0px 21px; font-size:.8em; z-index:200; margin-top:-7px; } .legalCopy { margin-left:.5em; } .bar a, .bar a:link, .bar a:visited, .bar a:active { color:#FFFFFF; text-decoration:none; } .bar a:hover, .bar a:focus { color:#bb7a2a; } .tab { background-color:#0066FF; background-image:url(resources/titlebar.gif); background-position:left top; background-repeat:no-repeat; color:#ffffff; padding:8px; width:5em; font-weight:bold; } /* Navigation bar styles */ .bar { background-image:url(resources/background.gif); background-repeat:repeat-x; color:#FFFFFF; padding:.8em .5em .4em .8em; height:auto;/*height:1.8em;*/ font-size:1em; margin:0; } .topNav { background-image:url(resources/background.gif); background-repeat:repeat-x; color:#FFFFFF; float:left; padding:0; width:100%; clear:right; height:2.8em; padding-top:10px; overflow:hidden; } .bottomNav { margin-top:10px; background-image:url(resources/background.gif); background-repeat:repeat-x; color:#FFFFFF; float:left; padding:0; width:100%; clear:right; height:2.8em; padding-top:10px; overflow:hidden; } .subNav { background-color:#dee3e9; border-bottom:1px solid #9eadc0; float:left; width:100%; overflow:hidden; } .subNav div { clear:left; float:left; padding:0 0 5px 6px; } ul.navList, ul.subNavList { float:left; margin:0 25px 0 0; padding:0; } ul.navList li{ list-style:none; float:left; padding:3px 6px; } ul.subNavList li{ list-style:none; float:left; font-size:90%; } .topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited { color:#FFFFFF; text-decoration:none; } .topNav a:hover, .bottomNav a:hover { text-decoration:none; color:#bb7a2a; } .navBarCell1Rev { background-image:url(resources/tab.gif); background-color:#a88834; color:#FFFFFF; margin: auto 5px; border:1px solid #c9aa44; } /* Page header and footer styles */ .header, .footer { clear:both; margin:0 20px; padding:5px 0 0 0; } .indexHeader { margin:10px; position:relative; } .indexHeader h1 { font-size:1.3em; } .title { color:#2c4557; margin:10px 0; } .subTitle { margin:5px 0 0 0; } .header ul { margin:0 0 25px 0; padding:0; } .footer ul { margin:20px 0 5px 0; } .header ul li, .footer ul li { list-style:disc; } /* Heading styles */ div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 { background-color:#dee3e9; border-top:1px solid #9eadc0; border-bottom:1px solid #9eadc0; margin:0 0 6px -8px; padding:2px 5px; } ul.blockList ul.blockList ul.blockList li.blockList h3 { background-color:#dee3e9; border-top:1px solid #9eadc0; border-bottom:1px solid #9eadc0; margin:0 0 6px -8px; padding:2px 5px; } ul.blockList ul.blockList li.blockList h3 { padding:0; margin:15px 0; } ul.blockList li.blockList h2 { padding:0px 0 20px 0; } /* Page layout container styles */ .contentContainer, .sourceContainer, .classUseContainer, .<API key>, .<API key> { clear:both; padding:10px 20px; position:relative; } .indexContainer { margin:10px; position:relative; font-size:1.0em; } .indexContainer h2 { font-size:1.1em; padding:0 0 3px 0; } .indexContainer ul { margin:0; padding:0; } .indexContainer ul li { list-style:none; } .contentContainer .description dl dt, .contentContainer .details dl dt, .<API key> dl dt { font-size:1.1em; font-weight:bold; margin:10px 0 0 0; color:#4E4E4E; } .contentContainer .description dl dd, .contentContainer .details dl dd, .<API key> dl dd { margin:10px 0 10px 20px; } .<API key> dl.nameValue dt { margin-left:1px; font-size:1.1em; display:inline; font-weight:bold; } .<API key> dl.nameValue dd { margin:0 0 0 1px; font-size:1.1em; display:inline; } /* List styles */ ul.horizontal li { display:inline; font-size:0.9em; } ul.inheritance { margin:0; padding:0; } ul.inheritance li { display:inline; list-style:none; } ul.inheritance li ul.inheritance { margin-left:15px; padding-left:15px; padding-top:1px; } ul.blockList, ul.blockListLast { margin:10px 0 10px 0; padding:0; } ul.blockList li.blockList, ul.blockListLast li.blockList { list-style:none; margin-bottom:25px; } ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList { padding:0px 20px 5px 10px; border:1px solid #9eadc0; background-color:#f9f9f9; } ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList { padding:0 0 5px 8px; background-color:#ffffff; border:1px solid #9eadc0; border-top:none; } ul.blockList ul.blockList ul.blockList ul.blockList li.blockList { margin-left:0; padding-left:0; padding-bottom:15px; border:none; border-bottom:1px solid #9eadc0; } ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast { list-style:none; border-bottom:none; padding-bottom:0; } table tr td dl, table tr td dl dt, table tr td dl dd { margin-top:0; margin-bottom:1px; } /* Table styles */ .contentContainer table, .classUseContainer table, .<API key> table { border-bottom:1px solid #9eadc0; width:100%; } .contentContainer ul li table, .classUseContainer ul li table, .<API key> ul li table { width:100%; } .contentContainer .description table, .contentContainer .details table { border-bottom:none; } .contentContainer ul li table th.colOne, .contentContainer ul li table th.colFirst, .contentContainer ul li table th.colLast, .classUseContainer ul li table th, .<API key> ul li table th, .contentContainer ul li table td.colOne, .contentContainer ul li table td.colFirst, .contentContainer ul li table td.colLast, .classUseContainer ul li table td, .<API key> ul li table td{ vertical-align:top; padding-right:20px; } .contentContainer ul li table th.colLast, .classUseContainer ul li table th.colLast,.<API key> ul li table th.colLast, .contentContainer ul li table td.colLast, .classUseContainer ul li table td.colLast,.<API key> ul li table td.colLast, .contentContainer ul li table th.colOne, .classUseContainer ul li table th.colOne, .contentContainer ul li table td.colOne, .classUseContainer ul li table td.colOne { padding-right:3px; } .overviewSummary caption, .packageSummary caption, .contentContainer ul.blockList li.blockList caption, .summary caption, .classUseContainer caption, .<API key> caption { position:relative; text-align:left; background-repeat:no-repeat; color:#FFFFFF; font-weight:bold; clear:none; overflow:hidden; padding:0px; margin:0px; } caption a:link, caption a:hover, caption a:active, caption a:visited { color:#FFFFFF; } .overviewSummary caption span, .packageSummary caption span, .contentContainer ul.blockList li.blockList caption span, .summary caption span, .classUseContainer caption span, .<API key> caption span { white-space:nowrap; padding-top:8px; padding-left:8px; display:block; float:left; background-image:url(resources/titlebar.gif); height:18px; } .overviewSummary .tabEnd, .packageSummary .tabEnd, .contentContainer ul.blockList li.blockList .tabEnd, .summary .tabEnd, .classUseContainer .tabEnd, .<API key> .tabEnd { width:10px; background-image:url(resources/titlebar_end.gif); background-repeat:no-repeat; background-position:top right; position:relative; float:left; } ul.blockList ul.blockList li.blockList table { margin:0 0 12px 0px; width:100%; } .<API key> { background-color: #EEEEFF; } .altColor { background-color:#eeeeef; } .rowColor { background-color:#ffffff; } .overviewSummary td, .packageSummary td, .contentContainer ul.blockList li.blockList td, .summary td, .classUseContainer td, .<API key> td { text-align:left; padding:3px 3px 3px 7px; } th.colFirst, th.colLast, th.colOne, .<API key> th { background:#dee3e9; border-top:1px solid #9eadc0; border-bottom:1px solid #9eadc0; text-align:left; padding:3px 3px 3px 7px; } td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .<API key> td a:link, .<API key> td a:active, .<API key> td a:visited, .<API key> td a:hover { font-weight:bold; } td.colFirst, th.colFirst { border-left:1px solid #9eadc0; white-space:nowrap; } td.colLast, th.colLast { border-right:1px solid #9eadc0; } td.colOne, th.colOne { border-right:1px solid #9eadc0; border-left:1px solid #9eadc0; } table.overviewSummary { padding:0px; margin-left:0px; } table.overviewSummary td.colFirst, table.overviewSummary th.colFirst, table.overviewSummary td.colOne, table.overviewSummary th.colOne { width:25%; vertical-align:middle; } table.packageSummary td.colFirst, table.overviewSummary th.colFirst { width:25%; vertical-align:middle; } /* Content styles */ .description pre { margin-top:0; } .deprecatedContent { margin:0; padding:10px 0; } .docSummary { padding:0; } /* Formatting effect styles */ .sourceLineNo { color:green; padding:0 30px 0 0; } h1.hidden { visibility:hidden; overflow:hidden; font-size:.9em; } .block { display:block; margin:3px 0 0 0; } .strong { font-weight:bold; }
<?php /** * @file * Contains \Drupal\Core\Lock\<API key>. */ namespace Drupal\Core\Lock; /** * @defgroup lock Locking mechanisms * @{ * Functions to coordinate long-running operations across requests. * * In most environments, multiple Drupal page requests (a.k.a. threads or * processes) will execute in parallel. This leads to potential conflicts or * race conditions when two requests execute the same code at the same time. A * common example of this is a rebuild like menu_router_rebuild() where we * invoke many hook implementations to get and process data from all active * modules, and then delete the current data in the database to insert the new * afterwards. * * This is a cooperative, advisory lock system. Any long-running operation * that could potentially be attempted in parallel by multiple requests should * try to acquire a lock before proceeding. By obtaining a lock, one request * notifies any other requests that a specific operation is in progress which * must not be executed in parallel. * * To use this API, pick a unique name for the lock. A sensible choice is the * name of the function performing the operation. A very simple example use of * this API: * @code * function <API key>() { * $lock = \Drupal::lock(); * if ($lock->acquire('<API key>')) { * // Do the long operation here. * // ... * $lock->release('<API key>'); * } * } * @endcode * * If a function acquires a lock it should always release it when the operation * is complete by calling $lock->release(), as in the example. * * A function that has acquired a lock may attempt to renew a lock (extend the * duration of the lock) by calling $lock->acquire() again during the operation. * Failure to renew a lock is indicative that another request has acquired the * lock, and that the current operation may need to be aborted. * * If a function fails to acquire a lock it may either immediately return, or * it may call $lock->wait() if the rest of the current page request requires * that the operation in question be complete. After $lock->wait() returns, the * function may again attempt to acquire the lock, or may simply allow the page * request to proceed on the assumption that a parallel request completed the * operation. * * $lock->acquire() and $lock->wait() will automatically break (delete) a lock * whose duration has exceeded the timeout specified when it was acquired. * * @} End of "defgroup lock". */ /** * Lock backend interface. * * @ingroup lock */ interface <API key> { /** * Acquires a lock. * * @param string $name * Lock name. Limit of name's length is 255 characters. * @param float $timeout = 30.0 * (optional) Lock lifetime in seconds. * * @return bool */ public function acquire($name, $timeout = 30.0); /** * Checks if a lock is available for acquiring. * * @param string $name * Lock to acquire. * * @return bool */ public function lockMayBeAvailable($name); /** * Waits a short amount of time before a second lock acquire attempt. * * While this method is subject to have a generic implementation in abstract * backend implementation, some backends may provide non blocking or less I/O * intensive wait mechanism: this is why this method remains on the backend * interface. * * @param string $name * Lock name currently being locked. * @param int $delay = 30 * Milliseconds to wait for. * * @return bool * TRUE if the lock holds, FALSE if it may be available. You still need to * acquire the lock manually and it may fail again. */ public function wait($name, $delay = 30); /** * Releases the given lock. * * @param string $name */ public function release($name); /** * Releases all locks for the given lock token identifier. * * @param string $lockId * (optional) If none given, remove all locks from the current page. * Defaults to NULL. */ public function releaseAll($lockId = NULL); /** * Gets the unique page token for locks. * * Locks will be wiped out at the end of each page request on a token basis. * * @return string */ public function getLockId(); }
def freq_month(obj): if obj is None or obj == []: return months = {1: 'jan', 2: 'feb', 3: 'mar', 4: 'apr', 5: 'may', 6: 'jun', 7: 'jul', 8: 'aug', 9: 'sep', 10: 'oct', 11: 'nov', 12: 'dec', } frequencies = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ] # for i in range(0, len(obj)): # frequencies[ obj[i] -1] += 1 for i in obj: frequencies[ i-1 ] += 1 print "The following month(s) have a birthday celebration" for i in range(0, len(frequencies)): if frequencies[i] > 0: print str(months[i+1]) + " has " + str(frequencies[i]) return frequencies in_array = [3,6,2,7,7,7,] print freq_month(in_array) print freq_month([])
#include "mysqlrad.h" //Table Variables //Table Variables //uTemplate: Primary Key static unsigned uTemplate=0; //cLabel: Short label static char cLabel[33]={""}; //uTemplateSet: Short label static unsigned uTemplateSet=0; static char <API key>[256]={""}; //uTemplateType: Short label static unsigned uTemplateType=0; static char <API key>[256]={""}; //cComment: About the template static char *cComment={""}; //cTemplate: Template itself static char *cTemplate={""}; //uOwner: Record owner static unsigned uOwner=0; //uCreatedBy: uClient for last insert static unsigned uCreatedBy=0; #define ISM3FIELDS static time_t uCreatedDate=0; //uModBy: uClient for last update static unsigned uModBy=0; static time_t uModDate=0; #define VAR_LIST_tTemplate "tTemplate.uTemplate,tTemplate.cLabel,tTemplate.uTemplateSet,tTemplate.uTemplateType,tTemplate.cComment,tTemplate.cTemplate,tTemplate.uOwner,tTemplate.uCreatedBy,tTemplate.uCreatedDate,tTemplate.uModBy,tTemplate.uModDate" //Local only void Insert_tTemplate(void); void Update_tTemplate(char *cRowid); void <API key>(pentry entries[], int x); //In tTemplatefunc.h file included below void <API key>(pentry entries[], int x); void <API key>(pentry entries[], int x); void ExttTemplateButtons(void); void ExttTemplateNavBar(void); void ExttTemplateGetHook(entry gentries[], int x); void ExttTemplateSelect(void); void <API key>(void); void <API key>(void); void <API key>(void); void <API key>(void); #include "ttemplatefunc.h" //Table Variables Assignment Function void <API key>(pentry entries[], int x) { register int i; for(i=0;i<x;i++) { if(!strcmp(entries[i].name,"uTemplate")) sscanf(entries[i].val,"%u",&uTemplate); else if(!strcmp(entries[i].name,"cLabel")) sprintf(cLabel,"%.32s",entries[i].val); else if(!strcmp(entries[i].name,"uTemplateSet")) sscanf(entries[i].val,"%u",&uTemplateSet); else if(!strcmp(entries[i].name,"<API key>")) { sprintf(<API key>,"%.255s",entries[i].val); uTemplateSet=ReadPullDown("tTemplateSet","cLabel",<API key>); } else if(!strcmp(entries[i].name,"uTemplateType")) sscanf(entries[i].val,"%u",&uTemplateType); else if(!strcmp(entries[i].name,"<API key>")) { sprintf(<API key>,"%.255s",entries[i].val); uTemplateType=ReadPullDown("tTemplateType","cLabel",<API key>); } else if(!strcmp(entries[i].name,"cComment")) cComment=entries[i].val; else if(!strcmp(entries[i].name,"cTemplate")) cTemplate=entries[i].val; else if(!strcmp(entries[i].name,"uOwner")) sscanf(entries[i].val,"%u",&uOwner); else if(!strcmp(entries[i].name,"uCreatedBy")) sscanf(entries[i].val,"%u",&uCreatedBy); else if(!strcmp(entries[i].name,"uCreatedDate")) sscanf(entries[i].val,"%lu",&uCreatedDate); else if(!strcmp(entries[i].name,"uModBy")) sscanf(entries[i].val,"%u",&uModBy); else if(!strcmp(entries[i].name,"uModDate")) sscanf(entries[i].val,"%lu",&uModDate); } //After so we can overwrite form data if needed. <API key>(entries,x); }//<API key>() void <API key>(pentry entries[], int x) { register int i; for(i=0;i<x;i++) { if(!strncmp(entries[i].name,"ED",2)) { sscanf(entries[i].name+2,"%u",&uTemplate); guMode=2002; tTemplate(""); } } }//void <API key>(pentry entries[], int x) int tTemplateCommands(pentry entries[], int x) { ProcessControlVars(entries,x); <API key>(entries,x); if(!strcmp(gcFunction,"tTemplateTools")) { if(!strcmp(gcFind,LANG_NB_LIST)) { tTemplateList(); } //Default <API key>(entries,x); tTemplate(""); } else if(!strcmp(gcFunction,"tTemplateList")) { ProcessControlVars(entries,x); <API key>(entries,x); tTemplateList(); } return(0); }//tTemplateCommands() void tTemplate(const char *cResult) { MYSQL_RES *res; MYSQL_RES *res2; MYSQL_ROW field; //Internal skip reloading if(!cResult[0]) { if(guMode) <API key>(); else ExttTemplateSelect(); mysql_query(&gMysql,gcQuery); if(mysql_errno(&gMysql)) { if(strstr(mysql_error(&gMysql)," doesn't exist")) { CreatetTemplate(); unxsISP("New tTemplate table created"); } else { htmlPlainTextError(mysql_error(&gMysql)); } } res=mysql_store_result(&gMysql); if((guI=mysql_num_rows(res))) { if(guMode==6) { sprintf(gcQuery,"SELECT _rowid FROM tTemplate WHERE uTemplate=%u" ,uTemplate); mysql_query(&gMysql,gcQuery); res2=mysql_store_result(&gMysql); field=mysql_fetch_row(res2); sscanf(field[0],"%lu",&gluRowid); gluRowid++; } PageMachine("",0,""); if(!guMode) mysql_data_seek(res,gluRowid-1); field=mysql_fetch_row(res); sscanf(field[0],"%u",&uTemplate); sprintf(cLabel,"%.32s",field[1]); sscanf(field[2],"%u",&uTemplateSet); sscanf(field[3],"%u",&uTemplateType); cComment=field[4]; cTemplate=field[5]; sscanf(field[6],"%u",&uOwner); sscanf(field[7],"%u",&uCreatedBy); sscanf(field[8],"%lu",&uCreatedDate); sscanf(field[9],"%u",&uModBy); sscanf(field[10],"%lu",&uModDate); } }//Internal Skip Header_ism3(":: tTemplate",1); printf("<table width=100%% cellspacing=0 cellpadding=0>\n"); printf("<tr><td colspan=2 align=right valign=center>"); printf("<input type=hidden name=gcFunction value=tTemplateTools>"); printf("<input type=hidden name=gluRowid value=%lu>",gluRowid); if(guI) { if(guMode==6) //printf(" Found"); printf(LANG_NBR_FOUND); else if(guMode==5) //printf(" Modified"); printf(LANG_NBR_MODIFIED); else if(guMode==4) //printf(" New"); printf(LANG_NBR_NEW); printf(LANG_NBRF_SHOWING,gluRowid,guI); } else { if(!cResult[0]) //printf(" No records found"); printf(LANG_NBR_NORECS); } if(cResult[0]) printf("%s",cResult); printf("</td></tr>"); printf("<tr><td valign=top width=25%%>"); ExttTemplateButtons(); printf("</td><td valign=top>"); OpenFieldSet("tTemplate Record Data",100); if(guMode==2000 || guMode==2002) tTemplateInput(1); else tTemplateInput(0); CloseFieldSet(); //Bottom table printf("<tr><td colspan=2>"); <API key>(); Footer_ism3(); }//end of tTemplate(); void tTemplateInput(unsigned uMode) { //uTemplate OpenRow(<API key>,"black"); printf("<input title='%s' type=text name=uTemplate value=%u size=16 maxlength=10 " ,<API key>,uTemplate); if(guPermLevel>=20 && uMode) { printf("></td></tr>\n"); } else { printf("disabled></td></tr>\n"); printf("<input type=hidden name=uTemplate value=%u >\n",uTemplate); } //cLabel OpenRow(<API key>,"black"); printf("<input title='%s' type=text name=cLabel value=\"%s\" size=40 maxlength=32 " ,<API key>,EncodeDoubleQuotes(cLabel)); if(guPermLevel>=7 && uMode) { printf("></td></tr>\n"); } else { printf("disabled></td></tr>\n"); printf("<input type=hidden name=cLabel value=\"%s\">\n",EncodeDoubleQuotes(cLabel)); } //uTemplateSet OpenRow(<API key>,"black"); if(guPermLevel>=7 && uMode) tTablePullDown("tTemplateSet;<API key>","cLabel","cLabel",uTemplateSet,1); else tTablePullDown("tTemplateSet;<API key>","cLabel","cLabel",uTemplateSet,0); //uTemplateType OpenRow(<API key>,"black"); if(guPermLevel>=7 && uMode) tTablePullDown("tTemplateType;<API key>","cLabel","cLabel",uTemplateType,1); else tTablePullDown("tTemplateType;<API key>","cLabel","cLabel",uTemplateType,0); //cComment OpenRow(<API key>,"black"); printf("<textarea title='%s' cols=80 wrap=hard rows=16 name=cComment " ,<API key>); if(guPermLevel>=7 && uMode) { printf(">%s</textarea></td></tr>\n",cComment); } else { printf("disabled>%s</textarea></td></tr>\n",cComment); printf("<input type=hidden name=cComment value=\"%s\" >\n",EncodeDoubleQuotes(cComment)); } //cTemplate OpenRow(<API key>,"black"); printf("<textarea title='%s' cols=80 wrap=off rows=16 name=cTemplate " ,<API key>); if(guPermLevel>=7 && uMode) { printf(">%s</textarea></td></tr>\n",cTemplate); } else { printf("disabled>%s</textarea></td></tr>\n",cTemplate); printf("<input type=hidden name=cTemplate value=\"%s\" >\n",EncodeDoubleQuotes(cTemplate)); } //uOwner OpenRow(<API key>,"black"); if(guPermLevel>=20 && uMode) { printf("%s<input type=hidden name=uOwner value=%u >\n",ForeignKey(TCLIENT,"cLabel",uOwner),uOwner); } else { printf("%s<input type=hidden name=uOwner value=%u >\n",ForeignKey(TCLIENT,"cLabel",uOwner),uOwner); } //uCreatedBy OpenRow(<API key>,"black"); if(guPermLevel>=20 && uMode) { printf("%s<input type=hidden name=uCreatedBy value=%u >\n",ForeignKey(TCLIENT,"cLabel",uCreatedBy),uCreatedBy); } else { printf("%s<input type=hidden name=uCreatedBy value=%u >\n",ForeignKey(TCLIENT,"cLabel",uCreatedBy),uCreatedBy); } //uCreatedDate OpenRow(<API key>,"black"); if(uCreatedDate) printf("%s\n\n",ctime(&uCreatedDate)); else printf(" printf("<input type=hidden name=uCreatedDate value=%lu >\n",uCreatedDate); //uModBy OpenRow(<API key>,"black"); if(guPermLevel>=20 && uMode) { printf("%s<input type=hidden name=uModBy value=%u >\n",ForeignKey(TCLIENT,"cLabel",uModBy),uModBy); } else { printf("%s<input type=hidden name=uModBy value=%u >\n",ForeignKey(TCLIENT,"cLabel",uModBy),uModBy); } //uModDate OpenRow(<API key>,"black"); if(uModDate) printf("%s\n\n",ctime(&uModDate)); else printf(" printf("<input type=hidden name=uModDate value=%lu >\n",uModDate); printf("</tr>\n"); }//void tTemplateInput(unsigned uMode) void NewtTemplate(unsigned uMode) { register int i=0; MYSQL_RES *res; sprintf(gcQuery,"SELECT uTemplate FROM tTemplate\ WHERE uTemplate=%u" ,uTemplate); mysql_query(&gMysql,gcQuery); if(mysql_errno(&gMysql)) htmlPlainTextError(mysql_error(&gMysql)); res=mysql_store_result(&gMysql); i=mysql_num_rows(res); if(i) //tTemplate("<blink>Record already exists"); tTemplate(LANG_NBR_RECEXISTS); //insert query Insert_tTemplate(); if(mysql_errno(&gMysql)) htmlPlainTextError(mysql_error(&gMysql)); //sprintf(gcQuery,"New record %u added"); uTemplate=mysql_insert_id(&gMysql); #ifdef ISM3FIELDS uCreatedDate=luGetCreatedDate("tTemplate",uTemplate); unxsISPLog(uTemplate,"tTemplate","New"); #endif if(!uMode) { sprintf(gcQuery,<API key>,uTemplate); tTemplate(gcQuery); } }//NewtTemplate(unsigned uMode) void DeletetTemplate(void) { #ifdef ISM3FIELDS sprintf(gcQuery,"DELETE FROM tTemplate WHERE uTemplate=%u AND ( uOwner=%u OR %u>9 )" ,uTemplate,guLoginClient,guPermLevel); #else sprintf(gcQuery,"DELETE FROM tTemplate WHERE uTemplate=%u" ,uTemplate); #endif mysql_query(&gMysql,gcQuery); if(mysql_errno(&gMysql)) htmlPlainTextError(mysql_error(&gMysql)); //tTemplate("Record Deleted"); if(mysql_affected_rows(&gMysql)>0) { #ifdef ISM3FIELDS unxsISPLog(uTemplate,"tTemplate","Del"); #endif tTemplate(LANG_NBR_RECDELETED); } else { #ifdef ISM3FIELDS unxsISPLog(uTemplate,"tTemplate","DelError"); #endif tTemplate(<API key>); } }//void DeletetTemplate(void) void Insert_tTemplate(void) { //insert query sprintf(gcQuery,"INSERT INTO tTemplate SET uTemplate=%u,cLabel='%s',uTemplateSet=%u,uTemplateType=%u,cComment='%s',cTemplate='%s',uOwner=%u,uCreatedBy=%u,uCreatedDate=UNIX_TIMESTAMP(NOW())", uTemplate ,TextAreaSave(cLabel) ,uTemplateSet ,uTemplateType ,TextAreaSave(cComment) ,TextAreaSave(cTemplate) ,uOwner ,uCreatedBy ); mysql_query(&gMysql,gcQuery); }//void Insert_tTemplate(void) void Update_tTemplate(char *cRowid) { //update query sprintf(gcQuery,"UPDATE tTemplate SET uTemplate=%u,cLabel='%s',uTemplateSet=%u,uTemplateType=%u,cComment='%s',cTemplate='%s',uModBy=%u,uModDate=UNIX_TIMESTAMP(NOW()) WHERE _rowid=%s", uTemplate ,TextAreaSave(cLabel) ,uTemplateSet ,uTemplateType ,TextAreaSave(cComment) ,TextAreaSave(cTemplate) ,uModBy ,cRowid); mysql_query(&gMysql,gcQuery); }//void Update_tTemplate(void) void ModtTemplate(void) { register int i=0; MYSQL_RES *res; MYSQL_ROW field; #ifdef ISM3FIELDS unsigned uPreModDate=0; sprintf(gcQuery,"SELECT uTemplate,uModDate FROM tTemplate WHERE uTemplate=%u" ,uTemplate); #else sprintf(gcQuery,"SELECT uTemplate FROM tTemplate\ WHERE uTemplate=%u" ,uTemplate); #endif mysql_query(&gMysql,gcQuery); if(mysql_errno(&gMysql)) htmlPlainTextError(mysql_error(&gMysql)); res=mysql_store_result(&gMysql); i=mysql_num_rows(res); //if(i<1) tTemplate("<blink>Record does not exist"); if(i<1) tTemplate(<API key>); //if(i>1) tTemplate("<blink>Multiple rows!"); if(i>1) tTemplate(LANG_NBR_MULTRECS); field=mysql_fetch_row(res); #ifdef ISM3FIELDS sscanf(field[1],"%u",&uPreModDate); if(uPreModDate!=uModDate) tTemplate(LANG_NBR_EXTMOD); #endif Update_tTemplate(field[0]); if(mysql_errno(&gMysql)) htmlPlainTextError(mysql_error(&gMysql)); //sprintf(query,"record %s modified",field[0]); sprintf(gcQuery,<API key>,field[0]); #ifdef ISM3FIELDS uModDate=luGetModDate("tTemplate",uTemplate); unxsISPLog(uTemplate,"tTemplate","Mod"); #endif tTemplate(gcQuery); }//ModtTemplate(void) void tTemplateList(void) { MYSQL_RES *res; MYSQL_ROW field; <API key>(); mysql_query(&gMysql,gcQuery); if(mysql_error(&gMysql)[0]) htmlPlainTextError(mysql_error(&gMysql)); res=mysql_store_result(&gMysql); guI=mysql_num_rows(res); PageMachine("tTemplateList",1,"");//1 is auto header list guMode. Opens table! //Filter select drop down <API key>(); printf("<input type=text size=16 name=gcCommand maxlength=98 value=\"%s\" >",gcCommand); printf("</table>\n"); printf("<table bgcolor=#9BC1B3 border=0 width=100%%>\n"); printf("<tr bgcolor=black><td><font face=arial,helvetica color=white>uTemplate<td><font face=arial,helvetica color=white>cLabel<td><font face=arial,helvetica color=white>uTemplateSet<td><font face=arial,helvetica color=white>uTemplateType<td><font face=arial,helvetica color=white>cComment<td><font face=arial,helvetica color=white>cTemplate<td><font face=arial,helvetica color=white>uOwner<td><font face=arial,helvetica color=white>uCreatedBy<td><font face=arial,helvetica color=white>uCreatedDate<td><font face=arial,helvetica color=white>uModBy<td><font face=arial,helvetica color=white>uModDate</tr>"); mysql_data_seek(res,guStart-1); for(guN=0;guN<(guEnd-guStart+1);guN++) { field=mysql_fetch_row(res); if(!field) { printf("<tr><td><font face=arial,helvetica>End of data</table>"); Footer_ism3(); } if(guN % 2) printf("<tr bgcolor=#BBE1D3>"); else printf("<tr>"); time_t luTime8=strtoul(field[8],NULL,10); char cBuf8[32]; if(luTime8) ctime_r(&luTime8,cBuf8); else sprintf(cBuf8," time_t luTime10=strtoul(field[10],NULL,10); char cBuf10[32]; if(luTime10) ctime_r(&luTime10,cBuf10); else sprintf(cBuf10," printf("<td><input type=submit name=ED%s value=Edit> %s<td>%s<td>%s<td>%s<td><textarea disabled>%s</textarea><td><textarea disabled>%s</textarea><td>%s<td>%s<td>%s<td>%s<td>%s</tr>" ,field[0] ,field[0] ,field[1] ,ForeignKey("tTemplateSet","cLabel",strtoul(field[2],NULL,10)) ,ForeignKey("tTemplateType","cLabel",strtoul(field[3],NULL,10)) ,field[4] ,field[5] ,ForeignKey(TCLIENT,"cLabel",strtoul(field[6],NULL,10)) ,ForeignKey(TCLIENT,"cLabel",strtoul(field[7],NULL,10)) ,cBuf8 ,ForeignKey(TCLIENT,"cLabel",strtoul(field[9],NULL,10)) ,cBuf10 ); } printf("</table></form>\n"); Footer_ism3(); }//tTemplateList() void CreatetTemplate(void) { sprintf(gcQuery,"CREATE TABLE IF NOT EXISTS tTemplate ( uTemplate INT UNSIGNED PRIMARY KEY AUTO_INCREMENT, cLabel VARCHAR(32) NOT NULL DEFAULT '', uOwner INT UNSIGNED NOT NULL DEFAULT 0,index (uOwner), uCreatedBy INT UNSIGNED NOT NULL DEFAULT 0, uCreatedDate INT UNSIGNED NOT NULL DEFAULT 0, uModBy INT UNSIGNED NOT NULL DEFAULT 0, uModDate INT UNSIGNED NOT NULL DEFAULT 0, cComment TEXT NOT NULL DEFAULT '', cTemplate TEXT NOT NULL DEFAULT '', uTemplateSet INT UNSIGNED NOT NULL DEFAULT 0, uTemplateType INT UNSIGNED NOT NULL DEFAULT 0 )"); mysql_query(&gMysql,gcQuery); if(mysql_errno(&gMysql)) htmlPlainTextError(mysql_error(&gMysql)); }//CreatetTemplate()
<?php if (!defined('IS_ADMIN_FLAG')) { die('Illegal Access'); } if (isset($_GET['products_id']) && <API key> > 0 && <API key> > 0) { $<API key> = $db->Execute(sprintf(SQL_ALSO_PURCHASED, (int)$_GET['products_id'], (int)$_GET['products_id'])); $<API key> = $<API key>->RecordCount(); $row = 0; $col = 0; $list_box_contents = array(); $title = ''; // show only when 1 or more and equal to or greater than minimum set in admin if ($<API key> >= <API key> && $<API key> > 0) { if ($<API key> < <API key>) { $col_width = floor(100/$<API key>); } else { $col_width = floor(100/<API key>); } while (!$<API key>->EOF) { $<API key>->fields['products_name'] = <API key>($<API key>->fields['products_id']); $list_box_contents[$row][$col] = array('params' => 'class="<API key>"' . ' ' . 'style="width:' . $col_width . '%;"', 'text' => (($<API key>->fields['products_image'] == '' and <API key> == 0) ? '' : '<a href="' . zen_href_link(zen_get_info_page($<API key>->fields['products_id']), 'products_id=' . $<API key>->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $<API key>->fields['products_image'], $<API key>->fields['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br /><h3 class="itemTitle">') . '<a href="' . zen_href_link(zen_get_info_page($<API key>->fields['products_id']), 'products_id=' . $<API key>->fields['products_id']) . '">' . $<API key>->fields['products_name'] . '</a></h3>'); $col ++; if ($col > (<API key> - 1)) { $col = 0; $row ++; } $<API key>->MoveNext(); } } if ($<API key>->RecordCount() > 0 && $<API key>->RecordCount() >= <API key>) { $title = '<h2 class="centerBoxHeading">' . <API key> . '</h2>'; $<API key> = true; } } ?>
<?php namespace Magento\Framework\Css\PreProcessor\File\FileList; use Magento\Framework\View\File\FileList\CollateInterface; /** * File list collator */ class Collator implements CollateInterface { /** * Collate source files * * @param \Magento\Framework\View\File[] $files * @param \Magento\Framework\View\File[] $filesOrigin * @return \Magento\Framework\View\File[] */ public function collate($files, $filesOrigin) { foreach ($files as $file) { $fileId = substr($file->getFileIdentifier(), strpos($file->getFileIdentifier(), '|')); foreach (array_keys($filesOrigin) as $identifier) { if (false !== strpos($identifier, $fileId)) { unset($filesOrigin[$identifier]); } } $filesOrigin[$file->getFileIdentifier()] = $file; } return $filesOrigin; } }
package org.lastbamboo.common.util.mina.decode.binary; import org.littleshoot.mina.common.ByteBuffer; import org.littleshoot.mina.filter.codec.<API key>; import org.littleshoot.util.mina.DecodingState; /** * Decoding state for reading a single unsigned int. */ public abstract class <API key> implements DecodingState { public DecodingState decode(final ByteBuffer in, final <API key> out) throws Exception { if (in.remaining() > 3) { final long decoded = in.getUnsignedInt(); return finishDecode(decoded, out); } else { return this; } } /** * Called on the subclass when the unsigned int has been successfully * decoded. * * @param decodedShort The decoded unsigned int. * @param out The decoder output. * @return The next state. * @throws Exception If any unexpected error occurs. */ protected abstract DecodingState finishDecode(final long decodedShort, final <API key> out) throws Exception; }
package org.opennms.netmgt.config.datacollection; import java.io.Reader; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; import org.exolab.castor.xml.MarshalException; import org.exolab.castor.xml.Marshaller; import org.exolab.castor.xml.Unmarshaller; import org.exolab.castor.xml.ValidationException; import org.exolab.castor.xml.Validator; import org.opennms.core.xml.ValidateUsing; /** * a MIB object * * @version $Revision$ $Date$ */ @XmlRootElement(name="mibObj", namespace="http://xmlns.opennms.org/xsd/config/datacollection") @XmlAccessorType(XmlAccessType.NONE) @XmlType(propOrder={"oid", "instance", "alias", "type", "maxval", "minval"}) @ValidateUsing("<API key>.xsd") public class MibObj implements java.io.Serializable { private static final long serialVersionUID = -<API key>; /** * object identifier */ private String m_oid; /** * instance identifier. Only valid instance identifier * values are a positive integer value or the keyword * "ifIndex" which * indicates that the ifIndex of the interface is to be * substituted for * the instance value for each interface the oid is retrieved * for. */ private String m_instance; /** * a human readable name for the object (such as * "ifOctetsIn"). NOTE: This value is used as the RRD file * name and * data source name. RRD only supports data source names up to * 19 chars * in length. If the SNMP data collector encounters an alias * which * exceeds 19 characters it will be truncated. */ private String m_alias; /** * SNMP data type SNMP supported types: counter, gauge, * timeticks, integer, octetstring, string. The SNMP type is * mapped to * one of two RRD supported data types COUNTER or GAUGE, or * the * string.properties file. The mapping is as follows: SNMP * counter * -> RRD COUNTER; SNMP gauge, timeticks, integer, octetstring * -> * RRD GAUGE; SNMP string -> String properties file */ private String m_type; /** * Maximum Value. In order to correctly manage counter * wraps, it is possible to add a maximum value for a * collection. For * example, a 32-bit counter would have a max value of * 4294967295. */ private String m_maxval; /** * Minimum Value. For completeness, adding the ability * to use a minimum value. */ private String m_minval; public MibObj() { super(); } public MibObj(final String oid, final String instance, final String alias, final String type) { super(); m_oid = oid; m_instance = instance; m_alias = alias; m_type = type; } /** * Overrides the java.lang.Object.equals method. * * @param obj * @return true if the objects are equal. */ @Override() public boolean equals(final java.lang.Object obj) { if ( this == obj ) return true; if (obj instanceof MibObj) { final MibObj temp = (MibObj)obj; if (m_oid != null) { if (temp.m_oid == null) return false; else if (!(m_oid.equals(temp.m_oid))) return false; } else if (temp.m_oid != null) return false; if (m_instance != null) { if (temp.m_instance == null) return false; else if (!(m_instance.equals(temp.m_instance))) return false; } else if (temp.m_instance != null) return false; if (m_alias != null) { if (temp.m_alias == null) return false; else if (!(m_alias.equals(temp.m_alias))) return false; } else if (temp.m_alias != null) return false; if (m_type != null) { if (temp.m_type == null) return false; else if (!(m_type.equals(temp.m_type))) return false; } else if (temp.m_type != null) return false; if (m_maxval != null) { if (temp.m_maxval == null) return false; else if (!(m_maxval.equals(temp.m_maxval))) return false; } else if (temp.m_maxval != null) return false; if (m_minval != null) { if (temp.m_minval == null) return false; else if (!(m_minval.equals(temp.m_minval))) return false; } else if (temp.m_minval != null) return false; return true; } return false; } /** * Returns the value of field 'alias'. The field 'alias' has * the following description: a human readable name for the * object (such as * "ifOctetsIn"). NOTE: This value is used as the RRD file * name and * data source name. RRD only supports data source names up to * 19 chars * in length. If the SNMP data collector encounters an alias * which * exceeds 19 characters it will be truncated. * * @return the value of field 'Alias'. */ @XmlAttribute(name="alias", required=true) public String getAlias() { return m_alias; } /** * Returns the value of field 'instance'. The field 'instance' * has the following description: instance identifier. Only * valid instance identifier * values are a positive integer value or the keyword * "ifIndex" which * indicates that the ifIndex of the interface is to be * substituted for * the instance value for each interface the oid is retrieved * for. * * @return the value of field 'Instance'. */ @XmlAttribute(name="instance", required=true) public String getInstance() { return m_instance; } /** * Returns the value of field 'maxval'. The field 'maxval' has * the following description: Maximum Value. In order to * correctly manage counter * wraps, it is possible to add a maximum value for a * collection. For * example, a 32-bit counter would have a max value of * 4294967295. * * @return the value of field 'Maxval'. */ @XmlAttribute(name="maxval", required=false) public String getMaxval() { return m_maxval; } /** * Returns the value of field 'minval'. The field 'minval' has * the following description: Minimum Value. For completeness, * adding the ability * to use a minimum value. * * @return the value of field 'Minval'. */ @XmlAttribute(name="minval", required=false) public String getMinval() { return m_minval; } /** * Returns the value of field 'oid'. The field 'oid' has the * following description: object identifier * * @return the value of field 'Oid'. */ @XmlAttribute(name="oid", required=true) public String getOid() { return m_oid; } /** * Returns the value of field 'type'. The field 'type' has the * following description: SNMP data type SNMP supported types: * counter, gauge, * timeticks, integer, octetstring, string. The SNMP type is * mapped to * one of two RRD supported data types COUNTER or GAUGE, or * the * string.properties file. The mapping is as follows: SNMP * counter * -> RRD COUNTER; SNMP gauge, timeticks, integer, octetstring * -> * RRD GAUGE; SNMP string -> String properties file * * @return the value of field 'Type'. */ @XmlAttribute(name="type", required=true) public String getType() { return m_type; } /** * Overrides the java.lang.Object.hashCode method. * <p> * The following steps came from <b>Effective Java Programming * Language Guide</b> by Joshua Bloch, Chapter 3 * * @return a hash code value for the object. */ public int hashCode() { int result = 17; if (m_oid != null) { result = 37 * result + m_oid.hashCode(); } if (m_instance != null) { result = 37 * result + m_instance.hashCode(); } if (m_alias != null) { result = 37 * result + m_alias.hashCode(); } if (m_type != null) { result = 37 * result + m_type.hashCode(); } if (m_maxval != null) { result = 37 * result + m_maxval.hashCode(); } if (m_minval != null) { result = 37 * result + m_minval.hashCode(); } return result; } /** * Method isValid. * * @return true if this object is valid according to the schema */ @Deprecated public boolean isValid() { try { validate(); } catch (ValidationException vex) { return false; } return true; } /** * * * @param out * @throws MarshalException if object is * null or if any SAXException is thrown during marshaling * @throws ValidationException if this * object is an invalid instance according to the schema */ @Deprecated public void marshal(final java.io.Writer out) throws MarshalException, ValidationException { Marshaller.marshal(this, out); } /** * * * @param handler * @throws java.io.IOException if an IOException occurs during * marshaling * @throws ValidationException if this * object is an invalid instance according to the schema * @throws MarshalException if object is * null or if any SAXException is thrown during marshaling */ @Deprecated public void marshal(final org.xml.sax.ContentHandler handler) throws java.io.IOException, MarshalException, ValidationException { Marshaller.marshal(this, handler); } /** * Sets the value of field 'alias'. The field 'alias' has the * following description: a human readable name for the object * (such as * "ifOctetsIn"). NOTE: This value is used as the RRD file * name and * data source name. RRD only supports data source names up to * 19 chars * in length. If the SNMP data collector encounters an alias * which * exceeds 19 characters it will be truncated. * * @param alias the value of field 'alias'. */ public void setAlias(final String alias) { m_alias = alias.intern(); } /** * Sets the value of field 'instance'. The field 'instance' has * the following description: instance identifier. Only valid * instance identifier * values are a positive integer value or the keyword * "ifIndex" which * indicates that the ifIndex of the interface is to be * substituted for * the instance value for each interface the oid is retrieved * for. * * @param instance the value of field 'instance'. */ public void setInstance(final String instance) { m_instance = instance.intern(); } /** * Sets the value of field 'maxval'. The field 'maxval' has the * following description: Maximum Value. In order to correctly * manage counter * wraps, it is possible to add a maximum value for a * collection. For * example, a 32-bit counter would have a max value of * 4294967295. * * @param maxval the value of field 'maxval'. */ public void setMaxval(final String maxval) { m_maxval = maxval.intern(); } /** * Sets the value of field 'minval'. The field 'minval' has the * following description: Minimum Value. For completeness, * adding the ability * to use a minimum value. * * @param minval the value of field 'minval'. */ public void setMinval(final String minval) { m_minval = minval.intern(); } /** * Sets the value of field 'oid'. The field 'oid' has the * following description: object identifier * * @param oid the value of field 'oid'. */ public void setOid(final String oid) { m_oid = oid.intern(); } /** * Sets the value of field 'type'. The field 'type' has the * following description: SNMP data type SNMP supported types: * counter, gauge, * timeticks, integer, octetstring, string. The SNMP type is * mapped to * one of two RRD supported data types COUNTER or GAUGE, or * the * string.properties file. The mapping is as follows: SNMP * counter * -> RRD COUNTER; SNMP gauge, timeticks, integer, octetstring * -> * RRD GAUGE; SNMP string -> String properties file * * @param type the value of field 'type'. */ public void setType(final String type) { m_type = type.intern(); } /** * Method unmarshal. * * @param reader * @throws MarshalException if object is * null or if any SAXException is thrown during marshaling * @throws ValidationException if this * object is an invalid instance according to the schema * @return the unmarshaled * MibObj */ @Deprecated public static MibObj unmarshal(final Reader reader) throws MarshalException, ValidationException { return (MibObj)Unmarshaller.unmarshal(MibObj.class, reader); } /** * * * @throws ValidationException if this * object is an invalid instance according to the schema */ public void validate() throws ValidationException { Validator validator = new Validator(); validator.validate(this); } }
<?php // no direct access defined('_JEXEC') or die('Restricted access'); // Import Joomla! libraries jimport( 'joomla.application.component.view'); require_once( JPATH_COMPONENT.'/helpers/content.php' ); require_once( JPATH_COMPONENT.'/helpers/profiletypes.php' ); class <API key> extends JViewLegacy { protected $items; protected $pagination; protected $state; function display($tpl = null) { $mainframe = JFactory::getApplication(); $params = JComponentHelper::getParams( 'com_joomdle' ); $this->sidebar = JHtmlSidebar::render(); if (!$params->get( 'use_profiletypes' )) { JToolbarHelper::title(JText::_('<API key>'), 'customprofiletypes'); $this->message = JText::_('<API key>'); $tpl = "disabled"; parent::display($tpl); return; } /* List of profiletypes */ $this->profiletypes = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->addToolbar(); parent::display($tpl); } protected function addToolbar() { JToolbarHelper::title(JText::_('<API key>'), 'customprofiletypes'); JToolBarHelper::custom( '<API key>', 'publish', 'publish', '<API key>', true, false ); JToolBarHelper::custom( '<API key>', 'unpublish', 'unpublish', '<API key>', true, false ); JHtmlSidebar::setAction('index.php?option=com_joomdle&view=customprofiletypes'); JHtmlSidebar::addFilter( JText::_('<API key>'), 'filter_state', JHtml::_('select.options', <API key>::getStateOptions(), 'value', 'text', $this->state->get('filter.state')) ); } } ?>
/* * Support for unit tests of CUnit framework * * 12-Aug-2004 Initial implementation. (JDS) * * 02-May-2006 Added <API key> hooks. (JDS) */ /** @file * CUnit internal testingfunctions (implementation). */ /** @addtogroup Internal @{ */ #include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include "../../Headers/CUnit.h" #include "../../Headers/MyMem.h" #include "../../Headers/Util.h" #include "../../Headers/CUnit_intl.h" #include "test_cunit.h" static unsigned int f_nTests = 0; static unsigned int f_nFailures = 0; static unsigned int f_nTests_stored = 0; static unsigned int f_nFails_stored = 0; static clock_t f_start_time; static void <API key>(void); static void <API key>(void); int main() { /* No line buffering. */ setbuf(stdout, NULL); <API key>(); fprintf(stdout, "\n%s", _("Testing CUnit internals...")); /* individual module test functions go here */ test_cunit_CUError(); test_cunit_MyMem(); test_cunit_TestDB(); test_cunit_TestRun(); test_cunit_Util(); <API key>(); CU_cleanup_registry(); return 0; } void <API key>(const char* strName) { fprintf(stdout, _("\n testing %s ... "), strName); f_nTests_stored = f_nTests; f_nFails_stored = f_nFailures; } void <API key>(void) { fprintf(stdout, _("%d assertions, %d failures"), f_nTests - f_nTests_stored, f_nFailures - f_nFails_stored); } void test_cunit_add_test(void) { ++f_nTests; } void <API key>(void) { ++f_nFailures; } unsigned int <API key>(void) { return f_nTests; } unsigned int <API key>(void) { return f_nFailures; } void <API key>(void) { f_nTests = 0; f_nFailures = 0; f_start_time = clock(); } void <API key>(void) { fprintf(stdout, "\n\n "\n%s" "\n "\n %s%d" "\n %s%d" "\n %s%d" "\n\n%s%8.3f%s\n", _("CUnit Internal Test Results"), _("Total Number of Assertions: "), f_nTests, _("Successes: "), <API key>, _("Failures: "), f_nFailures, _("Total test time = "), ((double)clock() - (double)f_start_time)/(double)CLOCKS_PER_SEC, _(" seconds.")); } CU_BOOL <API key>(CU_BOOL value, const char* condition, const char* file, unsigned int line) { test_cunit_add_test(); if (CU_FALSE == value) { <API key>(); printf(_("\nTEST FAILED: File '%s', Line %d, Condition '%s.'\n"), file, line, condition); } return value; }
#ifndef _PDISKSEL_H #define _PDISKSEL_H #ifdef __cplusplus extern "C" { #endif /*@ @ requires valid_read_string(cmd_device); @ requires \valid_read(list_disk); @ requires valid_disk(list_disk->disk); @ requires \valid(list_search_space); @ requires \separated(cmd_device, list_disk, list_search_space); @ ensures valid_disk(\result); @*/ disk_t *<API key>(const char *cmd_device, const list_disk_t *list_disk, alloc_data_t *list_search_space); #ifdef __cplusplus } /* closing brace for extern "C" */ #endif #endif
#include "test_cvs.h" #include <QtTest/QtTest> #include <QUrl> #include <KIO/DeleteJob> #include <cvsjob.h> #include <cvsproxy.h> #include <tests/autotestshell.h> #include <tests/testcore.h> #define CVSTEST_BASEDIR "/tmp/kdevcvs_testdir/" #define CVS_REPO CVSTEST_BASEDIR "repo/" #define CVS_IMPORT CVSTEST_BASEDIR "import/" #define CVS_TESTFILE_NAME "testfile" #define CVS_CHECKOUT CVSTEST_BASEDIR "working/" // we need to add this since it is declared in cvsplugin.cpp which we don't compile here Q_LOGGING_CATEGORY(PLUGIN_CVS, "kdevplatform.plugins.cvs") void TestCvs::initTestCase() { KDevelop::AutoTestShell::init(); KDevelop::TestCore::initialize(KDevelop::Core::NoUi); m_proxy = new CvsProxy; // If the basedir for this cvs test exists from a // previous run; remove it... cleanup(); } void TestCvs::cleanupTestCase() { KDevelop::TestCore::shutdown(); delete m_proxy; } void TestCvs::init() { // Now create the basic directory structure QDir tmpdir("/tmp"); tmpdir.mkdir(CVSTEST_BASEDIR); tmpdir.mkdir(CVS_REPO); tmpdir.mkdir(CVS_IMPORT); } void TestCvs::cleanup() { if ( QFileInfo::exists(CVSTEST_BASEDIR) ) KIO::del(QUrl::fromLocalFile(QString(CVSTEST_BASEDIR)))->exec(); } void TestCvs::repoInit() { // make job that creates the local repository CvsJob* j = new CvsJob(0); QVERIFY( j ); j->setDirectory(CVSTEST_BASEDIR); *j << "cvs" << "-d" << CVS_REPO << "init"; // try to start the job QVERIFY( j->exec() ); //check if the CVSROOT directory in the new local repository exists now QVERIFY( QFileInfo::exists(QString(CVS_REPO "/CVSROOT")) ); } void TestCvs::importTestData() { // create a file so we don't import an empty dir QFile f(CVS_IMPORT "" CVS_TESTFILE_NAME); if(f.open(QIODevice::WriteOnly)) { QTextStream input( &f ); input << "HELLO WORLD"; } f.flush(); CvsJob* j = m_proxy->import(QUrl::fromLocalFile(CVS_IMPORT), CVS_REPO, "test", "vendor", "release", "test import message"); QVERIFY( j ); // try to start the job QVERIFY( j->exec() ); //check if the directory has been added to the repository QString testdir(CVS_REPO "/test"); QVERIFY( QFileInfo::exists(testdir) ); //check if the file has been added to the repository QString testfile(CVS_REPO "/test/" CVS_TESTFILE_NAME ",v"); QVERIFY( QFileInfo::exists(testfile) ); } void TestCvs::checkoutTestData() { CvsJob* j = m_proxy->checkout(QUrl::fromLocalFile(CVS_CHECKOUT), CVS_REPO, "test"); QVERIFY( j ); // try to start the job QVERIFY( j->exec() ); //check if the directory is there QString testdir(CVS_CHECKOUT); QVERIFY( QFileInfo::exists(testdir) ); //check if the file is there QString testfile(CVS_CHECKOUT "" CVS_TESTFILE_NAME); QVERIFY( QFileInfo::exists(testfile) ); } void TestCvs::testInitAndImport() { repoInit(); importTestData(); checkoutTestData(); } void TestCvs::testLogFolder() { repoInit(); importTestData(); checkoutTestData(); QString testdir(CVS_CHECKOUT); KDevelop::VcsRevision rev = KDevelop::VcsRevision::<API key>(KDevelop::VcsRevision::Head); CvsJob* job = m_proxy->log(QUrl::fromLocalFile(testdir), rev); QVERIFY(job); } QTEST_MAIN(TestCvs)
#ifdef HAVE_CONFIG_H #include <config.h> #endif /* HAVE_CONFIG_H */ #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif #include <sys/param.h> #include <sys/socket.h> #include <sys/poll.h> #include <netinet/in.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <memory.h> #include <errno.h> #include <fcntl.h> #include <signal.h> #include <unistd.h> #include <dirent.h> #include "gssd.h" #include "err_util.h" #include "nfslib.h" extern struct pollfd *pollarray; extern unsigned long pollsize; #define POLL_MILLISECS 500 static volatile int dir_changed = 1; static void dir_notify_handler(__attribute__((unused))int sig) { dir_changed = 1; } static void scan_poll_results(int ret) { int i; struct clnt_info *clp; for (clp = clnt_list.tqh_first; clp != NULL; clp = clp->list.tqe_next) { i = clp->gssd_poll_index; if (i >= 0 && pollarray[i].revents) { if (pollarray[i].revents & POLLHUP) { clp->gssd_close_me = 1; dir_changed = 1; } if (pollarray[i].revents & POLLIN) handle_gssd_upcall(clp); pollarray[clp->gssd_poll_index].revents = 0; ret if (!ret) break; } i = clp->krb5_poll_index; if (i >= 0 && pollarray[i].revents) { if (pollarray[i].revents & POLLHUP) { clp->krb5_close_me = 1; dir_changed = 1; } if (pollarray[i].revents & POLLIN) handle_krb5_upcall(clp); pollarray[clp->krb5_poll_index].revents = 0; ret if (!ret) break; } } } static int topdirs_add_entry(struct dirent *dent) { struct topdirs_info *tdi; tdi = calloc(sizeof(struct topdirs_info), 1); if (tdi == NULL) { printerr(0, "ERROR: Couldn't allocate struct topdirs_info\n"); return -1; } tdi->dirname = malloc(PATH_MAX); if (tdi->dirname == NULL) { printerr(0, "ERROR: Couldn't allocate directory name\n"); free(tdi); return -1; } snprintf(tdi->dirname, PATH_MAX, "%s/%s", pipefs_dir, dent->d_name); tdi->fd = open(tdi->dirname, O_RDONLY); if (tdi->fd == -1) { printerr(0, "ERROR: failed to open %s\n", tdi->dirname); free(tdi); return -1; } fcntl(tdi->fd, F_SETSIG, DNOTIFY_SIGNAL); fcntl(tdi->fd, F_NOTIFY, DN_CREATE|DN_DELETE|DN_MODIFY|DN_MULTISHOT); TAILQ_INSERT_HEAD(&topdirs_list, tdi, list); return 0; } static void topdirs_free_list(void) { struct topdirs_info *tdi; TAILQ_FOREACH(tdi, &topdirs_list, list) { free(tdi->dirname); if (tdi->fd != -1) close(tdi->fd); TAILQ_REMOVE(&topdirs_list, tdi, list); free(tdi); } } static int topdirs_init_list(void) { DIR *pipedir; struct dirent *dent; int ret; TAILQ_INIT(&topdirs_list); pipedir = opendir(pipefs_dir); if (pipedir == NULL) { printerr(0, "ERROR: could not open rpc_pipefs directory '%s': " "%s\n", pipefs_dir, strerror(errno)); return -1; } for (dent = readdir(pipedir); dent != NULL; dent = readdir(pipedir)) { if (dent->d_type != DT_DIR || strcmp(dent->d_name, ".") == 0 || strcmp(dent->d_name, "..") == 0) { continue; } ret = topdirs_add_entry(dent); if (ret) goto out_err; } closedir(pipedir); return 0; out_err: topdirs_free_list(); return -1; } #ifdef HAVE_PPOLL static void gssd_poll(struct pollfd *fds, unsigned long nfds) { sigset_t emptyset; int ret; sigemptyset(&emptyset); ret = ppoll(fds, nfds, NULL, &emptyset); if (ret < 0) { if (errno != EINTR) printerr(0, "WARNING: error return from poll\n"); } else if (ret == 0) { printerr(0, "WARNING: unexpected timeout\n"); } else { scan_poll_results(ret); } } #else /* !HAVE_PPOLL */ static void gssd_poll(struct pollfd *fds, unsigned long nfds) { int ret; /* race condition here: dir_changed could be set before we * enter the poll, and we'd never notice if it weren't for the * timeout. */ ret = poll(fds, nfds, POLL_MILLISECS); if (ret < 0) { if (errno != EINTR) printerr(0, "WARNING: error return from poll\n"); } else if (ret == 0) { /* timeout */ } else { /* ret > 0 */ scan_poll_results(ret); } } #endif /* !HAVE_PPOLL */ void gssd_run() { struct sigaction dn_act = { .sa_handler = dir_notify_handler }; sigset_t set; sigemptyset(&dn_act.sa_mask); sigaction(DNOTIFY_SIGNAL, &dn_act, NULL); /* just in case the signal is blocked... */ sigemptyset(&set); sigaddset(&set, DNOTIFY_SIGNAL); sigprocmask(SIG_UNBLOCK, &set, NULL); if (topdirs_init_list() != 0) return; init_client_list(); printerr(1, "beginning poll\n"); while (1) { while (dir_changed) { dir_changed = 0; if (update_client_list()) { /* Error msg is already printed */ exit(1); } /* release the parent after the initial dir scan */ release_parent(pipefds); } gssd_poll(pollarray, pollsize); } topdirs_free_list(); return; }
#!/usr/bin/env python import unittest from werkzeug.exceptions import NotFound, Forbidden from tests.logic_t.layer.LogicLayer.util import generate_ll class <API key>(unittest.TestCase): def setUp(self): self.ll = generate_ll() self.pl = self.ll.pl def <API key>(self): # given t1 = self.pl.create_task('t1') t2 = self.pl.create_task('t2') user = self.pl.create_user('name@example.com') t1.users.append(user) t2.users.append(user) self.pl.add(t1) self.pl.add(t2) self.pl.add(user) self.pl.commit() # precondition self.assertEqual(0, len(t1.prioritize_after)) self.assertEqual(0, len(t1.prioritize_before)) self.assertEqual(0, len(t2.prioritize_after)) self.assertEqual(0, len(t2.prioritize_before)) # when results = self.ll.<API key>(t1.id, t2.id, user) # then self.assertEqual(0, len(t1.prioritize_after)) self.assertEqual(1, len(t1.prioritize_before)) self.assertEqual(1, len(t2.prioritize_after)) self.assertEqual(0, len(t2.prioritize_before)) self.assertTrue(t2 in t1.prioritize_before) self.assertTrue(t1 in t2.prioritize_after) self.assertIsNotNone(results) self.assertEqual([t1, t2], list(results)) def <API key>(self): # given t1 = self.pl.create_task('t1') t2 = self.pl.create_task('t2') t1.prioritize_before.append(t2) user = self.pl.create_user('name@example.com') t1.users.append(user) t2.users.append(user) self.pl.add(t1) self.pl.add(t2) self.pl.add(user) self.pl.commit() # precondition self.assertEqual(0, len(t1.prioritize_after)) self.assertEqual(1, len(t1.prioritize_before)) self.assertEqual(1, len(t2.prioritize_after)) self.assertEqual(0, len(t2.prioritize_before)) self.assertTrue(t2 in t1.prioritize_before) self.assertTrue(t1 in t2.prioritize_after) # when results = self.ll.<API key>(t1.id, t2.id, user) # then self.assertEqual(0, len(t1.prioritize_after)) self.assertEqual(1, len(t1.prioritize_before)) self.assertEqual(1, len(t2.prioritize_after)) self.assertEqual(0, len(t2.prioritize_before)) self.assertTrue(t2 in t1.prioritize_before) self.assertTrue(t1 in t2.prioritize_after) self.assertIsNotNone(results) self.assertEqual([t1, t2], list(results)) def <API key>(self): # given t1 = self.pl.create_task('t1') t2 = self.pl.create_task('t2') user = self.pl.create_user('name@example.com') t1.users.append(user) t2.users.append(user) self.pl.add(t1) self.pl.add(t2) self.pl.add(user) self.pl.commit() # precondition self.assertEqual(0, len(t1.prioritize_after)) self.assertEqual(0, len(t1.prioritize_before)) self.assertEqual(0, len(t2.prioritize_after)) self.assertEqual(0, len(t2.prioritize_before)) # expect self.assertRaises(ValueError, self.ll.<API key>, None, t2.id, user) # expect self.assertRaises(ValueError, self.ll.<API key>, t1.id, None, user) # expect self.assertRaises(ValueError, self.ll.<API key>, None, None, user) # then self.assertEqual(0, len(t1.prioritize_after)) self.assertEqual(0, len(t1.prioritize_before)) self.assertEqual(0, len(t2.prioritize_after)) self.assertEqual(0, len(t2.prioritize_before)) def <API key>(self): # given t1 = self.pl.create_task('t1') t2 = self.pl.create_task('t2') user = self.pl.create_user('name@example.com') t1.users.append(user) t2.users.append(user) self.pl.add(t1) self.pl.add(t2) self.pl.add(user) self.pl.commit() # precondition self.assertEqual(0, len(t1.prioritize_after)) self.assertEqual(0, len(t1.prioritize_before)) self.assertEqual(0, len(t2.prioritize_after)) self.assertEqual(0, len(t2.prioritize_before)) # expect self.assertRaises(ValueError, self.ll.<API key>, t1.id, t2.id, None) # then self.assertEqual(0, len(t1.prioritize_after)) self.assertEqual(0, len(t1.prioritize_before)) self.assertEqual(0, len(t2.prioritize_after)) self.assertEqual(0, len(t2.prioritize_before)) def test_user_not_<API key>(self): # given t1 = self.pl.create_task('t1') t2 = self.pl.create_task('t2') user = self.pl.create_user('name@example.com') t2.users.append(user) self.pl.add(t1) self.pl.add(t2) self.pl.add(user) self.pl.commit() # precondition self.assertEqual(0, len(t1.prioritize_after)) self.assertEqual(0, len(t1.prioritize_before)) self.assertEqual(0, len(t2.prioritize_after)) self.assertEqual(0, len(t2.prioritize_before)) # expect self.assertRaises(Forbidden, self.ll.<API key>, t1.id, t2.id, user) # then self.assertEqual(0, len(t1.prioritize_after)) self.assertEqual(0, len(t1.prioritize_before)) self.assertEqual(0, len(t2.prioritize_after)) self.assertEqual(0, len(t2.prioritize_before)) def test_user_not_<API key>(self): # given t1 = self.pl.create_task('t1') t2 = self.pl.create_task('t2') user = self.pl.create_user('name@example.com') t1.users.append(user) self.pl.add(t1) self.pl.add(t2) self.pl.add(user) self.pl.commit() # precondition self.assertEqual(0, len(t1.prioritize_after)) self.assertEqual(0, len(t1.prioritize_before)) self.assertEqual(0, len(t2.prioritize_after)) self.assertEqual(0, len(t2.prioritize_before)) # expect self.assertRaises(Forbidden, self.ll.<API key>, t1.id, t2.id, user) # then self.assertEqual(0, len(t1.prioritize_after)) self.assertEqual(0, len(t1.prioritize_before)) self.assertEqual(0, len(t2.prioritize_after)) self.assertEqual(0, len(t2.prioritize_before)) def <API key>(self): # given t2 = self.pl.create_task('t2') user = self.pl.create_user('name@example.com') t2.users.append(user) self.pl.add(t2) self.pl.add(user) self.pl.commit() # precondition self.assertEqual(0, len(t2.prioritize_after)) self.assertEqual(0, len(t2.prioritize_before)) self.assertIsNone(self.pl.get_task(t2.id + 1)) # expect self.assertRaises(NotFound, self.ll.<API key>, t2.id + 1, t2.id, user) # then self.assertEqual(0, len(t2.prioritize_after)) self.assertEqual(0, len(t2.prioritize_before)) self.assertIsNone(self.pl.get_task(t2.id+1)) def <API key>(self): # given t1 = self.pl.create_task('t1') user = self.pl.create_user('name@example.com') t1.users.append(user) self.pl.add(t1) self.pl.add(user) self.pl.commit() # precondition self.assertEqual(0, len(t1.prioritize_after)) self.assertEqual(0, len(t1.prioritize_before)) self.assertIsNone(self.pl.get_task(t1.id + 1)) # expect self.assertRaises(NotFound, self.ll.<API key>, t1.id, t1.id + 1, user) # then self.assertEqual(0, len(t1.prioritize_after)) self.assertEqual(0, len(t1.prioritize_before)) self.assertIsNone(self.pl.get_task(t1.id + 1)) def <API key>(self): # given t1 = self.pl.create_task('t1') t2 = self.pl.create_task('t2') user = self.pl.create_user('name@example.com') t1.users.append(user) t2.users.append(user) t1.prioritize_before.append(t2) self.pl.add(t1) self.pl.add(t2) self.pl.add(user) self.pl.commit() # precondition self.assertEqual(0, len(t1.prioritize_after)) self.assertEqual(1, len(t1.prioritize_before)) self.assertEqual(1, len(t2.prioritize_after)) self.assertEqual(0, len(t2.prioritize_before)) self.assertTrue(t2 in t1.prioritize_before) self.assertTrue(t1 in t2.prioritize_after) # when results = self.ll.<API key>(t1.id, t2.id, user) # then self.assertEqual(0, len(t1.prioritize_after)) self.assertEqual(0, len(t1.prioritize_before)) self.assertEqual(0, len(t2.prioritize_after)) self.assertEqual(0, len(t2.prioritize_before)) self.assertIsNotNone(results) self.assertEqual([t1, t2], list(results)) def <API key>(self): # given t1 = self.pl.create_task('t1') t2 = self.pl.create_task('t2') user = self.pl.create_user('name@example.com') t1.users.append(user) t2.users.append(user) self.pl.add(t1) self.pl.add(t2) self.pl.add(user) self.pl.commit() # precondition self.assertEqual(0, len(t1.prioritize_after)) self.assertEqual(0, len(t1.prioritize_before)) self.assertEqual(0, len(t2.prioritize_after)) self.assertEqual(0, len(t2.prioritize_before)) # when results = self.ll.<API key>(t1.id, t2.id, user) # then self.assertEqual(0, len(t1.prioritize_after)) self.assertEqual(0, len(t1.prioritize_before)) self.assertEqual(0, len(t2.prioritize_after)) self.assertEqual(0, len(t2.prioritize_before)) self.assertIsNotNone(results) self.assertEqual([t1, t2], list(results)) def <API key>(self): # given t1 = self.pl.create_task('t1') t2 = self.pl.create_task('t2') user = self.pl.create_user('name@example.com') t1.users.append(user) t2.users.append(user) t1.prioritize_before.append(t2) self.pl.add(t1) self.pl.add(t2) self.pl.add(user) self.pl.commit() # precondition self.assertEqual(0, len(t1.prioritize_after)) self.assertEqual(1, len(t1.prioritize_before)) self.assertEqual(1, len(t2.prioritize_after)) self.assertEqual(0, len(t2.prioritize_before)) self.assertTrue(t2 in t1.prioritize_before) self.assertTrue(t1 in t2.prioritize_after) # expect self.assertRaises(ValueError, self.ll.<API key>, None, t2.id, user) # expect self.assertRaises(ValueError, self.ll.<API key>, t1.id, None, user) # expect self.assertRaises(ValueError, self.ll.<API key>, None, None, user) # then self.assertEqual(0, len(t1.prioritize_after)) self.assertEqual(1, len(t1.prioritize_before)) self.assertEqual(1, len(t2.prioritize_after)) self.assertEqual(0, len(t2.prioritize_before)) self.assertTrue(t2 in t1.prioritize_before) self.assertTrue(t1 in t2.prioritize_after) def <API key>(self): # given t1 = self.pl.create_task('t1') t2 = self.pl.create_task('t2') user = self.pl.create_user('name@example.com') t1.users.append(user) t2.users.append(user) t1.prioritize_before.append(t2) self.pl.add(t1) self.pl.add(t2) self.pl.add(user) self.pl.commit() # precondition self.assertEqual(0, len(t1.prioritize_after)) self.assertEqual(1, len(t1.prioritize_before)) self.assertEqual(1, len(t2.prioritize_after)) self.assertEqual(0, len(t2.prioritize_before)) self.assertTrue(t2 in t1.prioritize_before) self.assertTrue(t1 in t2.prioritize_after) # expect self.assertRaises(ValueError, self.ll.<API key>, t1.id, t2.id, None) # then self.assertEqual(0, len(t1.prioritize_after)) self.assertEqual(1, len(t1.prioritize_before)) self.assertEqual(1, len(t2.prioritize_after)) self.assertEqual(0, len(t2.prioritize_before)) self.assertTrue(t2 in t1.prioritize_before) self.assertTrue(t1 in t2.prioritize_after) def <API key><API key>(self): # given t1 = self.pl.create_task('t1') t2 = self.pl.create_task('t2') user = self.pl.create_user('name@example.com') t2.users.append(user) t1.prioritize_before.append(t2) self.pl.add(t1) self.pl.add(t2) self.pl.add(user) self.pl.commit() # note that this situation shouldn't happen anyways. a task shouldn't # be prioritized before another task unless both share a common set of # one or more authorized users # precondition self.assertEqual(0, len(t1.prioritize_after)) self.assertEqual(1, len(t1.prioritize_before)) self.assertEqual(1, len(t2.prioritize_after)) self.assertEqual(0, len(t2.prioritize_before)) self.assertTrue(t2 in t1.prioritize_before) self.assertTrue(t1 in t2.prioritize_after) # expect self.assertRaises(Forbidden, self.ll.<API key>, t1.id, t2.id, user) # then self.assertEqual(0, len(t1.prioritize_after)) self.assertEqual(1, len(t1.prioritize_before)) self.assertEqual(1, len(t2.prioritize_after)) self.assertEqual(0, len(t2.prioritize_before)) self.assertTrue(t2 in t1.prioritize_before) self.assertTrue(t1 in t2.prioritize_after) def <API key><API key>(self): # given t1 = self.pl.create_task('t1') t2 = self.pl.create_task('t2') user = self.pl.create_user('name@example.com') t1.users.append(user) t1.prioritize_before.append(t2) self.pl.add(t1) self.pl.add(t2) self.pl.add(user) self.pl.commit() # note that this situation shouldn't happen anyways. a task shouldn't # be prioritized before another task unless both share a common set of # one or more authorized users # precondition self.assertEqual(0, len(t1.prioritize_after)) self.assertEqual(1, len(t1.prioritize_before)) self.assertEqual(1, len(t2.prioritize_after)) self.assertEqual(0, len(t2.prioritize_before)) self.assertTrue(t2 in t1.prioritize_before) self.assertTrue(t1 in t2.prioritize_after) # expect self.assertRaises(Forbidden, self.ll.<API key>, t1.id, t2.id, user) # then self.assertEqual(0, len(t1.prioritize_after)) self.assertEqual(1, len(t1.prioritize_before)) self.assertEqual(1, len(t2.prioritize_after)) self.assertEqual(0, len(t2.prioritize_before)) self.assertTrue(t2 in t1.prioritize_before) self.assertTrue(t1 in t2.prioritize_after) def <API key>(self): # given t2 = self.pl.create_task('t2') user = self.pl.create_user('name@example.com') t2.users.append(user) self.pl.add(t2) self.pl.add(user) self.pl.commit() # precondition self.assertEqual(0, len(t2.prioritize_after)) self.assertEqual(0, len(t2.prioritize_before)) self.assertIsNone(self.pl.get_task(t2.id + 1)) # expect self.assertRaises(NotFound, self.ll.<API key>, t2.id + 1, t2.id, user) # then self.assertEqual(0, len(t2.prioritize_after)) self.assertEqual(0, len(t2.prioritize_before)) self.assertIsNone(self.pl.get_task(t2.id+1)) def <API key>(self): # given t1 = self.pl.create_task('t1') user = self.pl.create_user('name@example.com') t1.users.append(user) self.pl.add(t1) self.pl.add(user) self.pl.commit() # precondition self.assertEqual(0, len(t1.prioritize_after)) self.assertEqual(0, len(t1.prioritize_before)) self.assertIsNone(self.pl.get_task(t1.id + 1)) # expect self.assertRaises(NotFound, self.ll.<API key>, t1.id, t1.id + 1, user) # then self.assertEqual(0, len(t1.prioritize_after)) self.assertEqual(0, len(t1.prioritize_before)) self.assertIsNone(self.pl.get_task(t1.id + 1)) class <API key>(unittest.TestCase): def setUp(self): self.ll = generate_ll() self.pl = self.ll.pl def <API key>(self): # given t1 = self.pl.create_task('t1') t2 = self.pl.create_task('t2') user = self.pl.create_user('name@example.com') t1.users.append(user) t2.users.append(user) self.pl.add(t1) self.pl.add(t2) self.pl.add(user) self.pl.commit() # precondition self.assertEqual(0, len(t1.prioritize_before)) self.assertEqual(0, len(t1.prioritize_after)) self.assertEqual(0, len(t2.prioritize_before)) self.assertEqual(0, len(t2.prioritize_after)) # when results = self.ll.<API key>(t1.id, t2.id, user) # then self.assertEqual(0, len(t1.prioritize_before)) self.assertEqual(1, len(t1.prioritize_after)) self.assertEqual(1, len(t2.prioritize_before)) self.assertEqual(0, len(t2.prioritize_after)) self.assertTrue(t2 in t1.prioritize_after) self.assertTrue(t1 in t2.prioritize_before) self.assertIsNotNone(results) self.assertEqual([t1, t2], list(results)) def <API key>(self): # given t1 = self.pl.create_task('t1') t2 = self.pl.create_task('t2') t1.prioritize_after.append(t2) user = self.pl.create_user('name@example.com') t1.users.append(user) t2.users.append(user) self.pl.add(t1) self.pl.add(t2) self.pl.add(user) self.pl.commit() # precondition self.assertEqual(0, len(t1.prioritize_before)) self.assertEqual(1, len(t1.prioritize_after)) self.assertEqual(1, len(t2.prioritize_before)) self.assertEqual(0, len(t2.prioritize_after)) self.assertTrue(t2 in t1.prioritize_after) self.assertTrue(t1 in t2.prioritize_before) # when results = self.ll.<API key>(t1.id, t2.id, user) # then self.assertEqual(0, len(t1.prioritize_before)) self.assertEqual(1, len(t1.prioritize_after)) self.assertEqual(1, len(t2.prioritize_before)) self.assertEqual(0, len(t2.prioritize_after)) self.assertTrue(t2 in t1.prioritize_after) self.assertTrue(t1 in t2.prioritize_before) self.assertIsNotNone(results) self.assertEqual([t1, t2], list(results)) def <API key>(self): # given t1 = self.pl.create_task('t1') t2 = self.pl.create_task('t2') user = self.pl.create_user('name@example.com') t1.users.append(user) t2.users.append(user) self.pl.add(t1) self.pl.add(t2) self.pl.add(user) self.pl.commit() # precondition self.assertEqual(0, len(t1.prioritize_before)) self.assertEqual(0, len(t1.prioritize_after)) self.assertEqual(0, len(t2.prioritize_before)) self.assertEqual(0, len(t2.prioritize_after)) # expect self.assertRaises(ValueError, self.ll.<API key>, None, t2.id, user) # expect self.assertRaises(ValueError, self.ll.<API key>, t1.id, None, user) # expect self.assertRaises(ValueError, self.ll.<API key>, None, None, user) # then self.assertEqual(0, len(t1.prioritize_before)) self.assertEqual(0, len(t1.prioritize_after)) self.assertEqual(0, len(t2.prioritize_before)) self.assertEqual(0, len(t2.prioritize_after)) def <API key>(self): # given t1 = self.pl.create_task('t1') t2 = self.pl.create_task('t2') user = self.pl.create_user('name@example.com') t1.users.append(user) t2.users.append(user) self.pl.add(t1) self.pl.add(t2) self.pl.add(user) self.pl.commit() # precondition self.assertEqual(0, len(t1.prioritize_before)) self.assertEqual(0, len(t1.prioritize_after)) self.assertEqual(0, len(t2.prioritize_before)) self.assertEqual(0, len(t2.prioritize_after)) # expect self.assertRaises(ValueError, self.ll.<API key>, t1.id, t2.id, None) # then self.assertEqual(0, len(t1.prioritize_before)) self.assertEqual(0, len(t1.prioritize_after)) self.assertEqual(0, len(t2.prioritize_before)) self.assertEqual(0, len(t2.prioritize_after)) def test_user_not_<API key>(self): # given t1 = self.pl.create_task('t1') t2 = self.pl.create_task('t2') user = self.pl.create_user('name@example.com') t2.users.append(user) self.pl.add(t1) self.pl.add(t2) self.pl.add(user) self.pl.commit() # precondition self.assertEqual(0, len(t1.prioritize_before)) self.assertEqual(0, len(t1.prioritize_after)) self.assertEqual(0, len(t2.prioritize_before)) self.assertEqual(0, len(t2.prioritize_after)) # expect self.assertRaises(Forbidden, self.ll.<API key>, t1.id, t2.id, user) # then self.assertEqual(0, len(t1.prioritize_before)) self.assertEqual(0, len(t1.prioritize_after)) self.assertEqual(0, len(t2.prioritize_before)) self.assertEqual(0, len(t2.prioritize_after)) def test_user_not_<API key>(self): # given t1 = self.pl.create_task('t1') t2 = self.pl.create_task('t2') user = self.pl.create_user('name@example.com') t1.users.append(user) self.pl.add(t1) self.pl.add(t2) self.pl.add(user) self.pl.commit() # precondition self.assertEqual(0, len(t1.prioritize_before)) self.assertEqual(0, len(t1.prioritize_after)) self.assertEqual(0, len(t2.prioritize_before)) self.assertEqual(0, len(t2.prioritize_after)) # expect self.assertRaises(Forbidden, self.ll.<API key>, t1.id, t2.id, user) # then self.assertEqual(0, len(t1.prioritize_before)) self.assertEqual(0, len(t1.prioritize_after)) self.assertEqual(0, len(t2.prioritize_before)) self.assertEqual(0, len(t2.prioritize_after)) def <API key>(self): # given t2 = self.pl.create_task('t2') user = self.pl.create_user('name@example.com') t2.users.append(user) self.pl.add(t2) self.pl.add(user) self.pl.commit() # precondition self.assertEqual(0, len(t2.prioritize_before)) self.assertEqual(0, len(t2.prioritize_after)) self.assertIsNone(self.pl.get_task(t2.id + 1)) # expect self.assertRaises(NotFound, self.ll.<API key>, t2.id + 1, t2.id, user) # then self.assertEqual(0, len(t2.prioritize_before)) self.assertEqual(0, len(t2.prioritize_after)) self.assertIsNone(self.pl.get_task(t2.id+1)) def <API key>(self): # given t1 = self.pl.create_task('t1') user = self.pl.create_user('name@example.com') t1.users.append(user) self.pl.add(t1) self.pl.add(user) self.pl.commit() # precondition self.assertEqual(0, len(t1.prioritize_before)) self.assertEqual(0, len(t1.prioritize_after)) self.assertIsNone(self.pl.get_task(t1.id + 1)) # expect self.assertRaises(NotFound, self.ll.<API key>, t1.id, t1.id + 1, user) # then self.assertEqual(0, len(t1.prioritize_before)) self.assertEqual(0, len(t1.prioritize_after)) self.assertIsNone(self.pl.get_task(t1.id + 1)) def <API key>(self): # given t1 = self.pl.create_task('t1') t2 = self.pl.create_task('t2') user = self.pl.create_user('name@example.com') t1.users.append(user) t2.users.append(user) t1.prioritize_after.append(t2) self.pl.add(t1) self.pl.add(t2) self.pl.add(user) self.pl.commit() # precondition self.assertEqual(0, len(t1.prioritize_before)) self.assertEqual(1, len(t1.prioritize_after)) self.assertEqual(1, len(t2.prioritize_before)) self.assertEqual(0, len(t2.prioritize_after)) self.assertTrue(t2 in t1.prioritize_after) self.assertTrue(t1 in t2.prioritize_before) # when results = self.ll.<API key>(t1.id, t2.id, user) # then self.assertEqual(0, len(t1.prioritize_before)) self.assertEqual(0, len(t1.prioritize_after)) self.assertEqual(0, len(t2.prioritize_before)) self.assertEqual(0, len(t2.prioritize_after)) self.assertIsNotNone(results) self.assertEqual([t1, t2], list(results)) def <API key>(self): # given t1 = self.pl.create_task('t1') t2 = self.pl.create_task('t2') user = self.pl.create_user('name@example.com') t1.users.append(user) t2.users.append(user) self.pl.add(t1) self.pl.add(t2) self.pl.add(user) self.pl.commit() # precondition self.assertEqual(0, len(t1.prioritize_before)) self.assertEqual(0, len(t1.prioritize_after)) self.assertEqual(0, len(t2.prioritize_before)) self.assertEqual(0, len(t2.prioritize_after)) # when results = self.ll.<API key>(t1.id, t2.id, user) # then self.assertEqual(0, len(t1.prioritize_before)) self.assertEqual(0, len(t1.prioritize_after)) self.assertEqual(0, len(t2.prioritize_before)) self.assertEqual(0, len(t2.prioritize_after)) self.assertIsNotNone(results) self.assertEqual([t1, t2], list(results)) def <API key>(self): # given t1 = self.pl.create_task('t1') t2 = self.pl.create_task('t2') user = self.pl.create_user('name@example.com') t1.users.append(user) t2.users.append(user) t1.prioritize_after.append(t2) self.pl.add(t1) self.pl.add(t2) self.pl.add(user) self.pl.commit() # precondition self.assertEqual(0, len(t1.prioritize_before)) self.assertEqual(1, len(t1.prioritize_after)) self.assertEqual(1, len(t2.prioritize_before)) self.assertEqual(0, len(t2.prioritize_after)) self.assertTrue(t2 in t1.prioritize_after) self.assertTrue(t1 in t2.prioritize_before) # expect self.assertRaises(ValueError, self.ll.<API key>, None, t2.id, user) # expect self.assertRaises(ValueError, self.ll.<API key>, t1.id, None, user) # expect self.assertRaises(ValueError, self.ll.<API key>, None, None, user) # then self.assertEqual(0, len(t1.prioritize_before)) self.assertEqual(1, len(t1.prioritize_after)) self.assertEqual(1, len(t2.prioritize_before)) self.assertEqual(0, len(t2.prioritize_after)) self.assertTrue(t2 in t1.prioritize_after) self.assertTrue(t1 in t2.prioritize_before) def <API key>(self): # given t1 = self.pl.create_task('t1') t2 = self.pl.create_task('t2') user = self.pl.create_user('name@example.com') t1.users.append(user) t2.users.append(user) t1.prioritize_after.append(t2) self.pl.add(t1) self.pl.add(t2) self.pl.add(user) self.pl.commit() # precondition self.assertEqual(0, len(t1.prioritize_before)) self.assertEqual(1, len(t1.prioritize_after)) self.assertEqual(1, len(t2.prioritize_before)) self.assertEqual(0, len(t2.prioritize_after)) self.assertTrue(t2 in t1.prioritize_after) self.assertTrue(t1 in t2.prioritize_before) # expect self.assertRaises(ValueError, self.ll.<API key>, t1.id, t2.id, None) # then self.assertEqual(0, len(t1.prioritize_before)) self.assertEqual(1, len(t1.prioritize_after)) self.assertEqual(1, len(t2.prioritize_before)) self.assertEqual(0, len(t2.prioritize_after)) self.assertTrue(t2 in t1.prioritize_after) self.assertTrue(t1 in t2.prioritize_before) def <API key><API key>(self): # given t1 = self.pl.create_task('t1') t2 = self.pl.create_task('t2') user = self.pl.create_user('name@example.com') t2.users.append(user) t1.prioritize_after.append(t2) self.pl.add(t1) self.pl.add(t2) self.pl.add(user) self.pl.commit() # note that this situation shouldn't happen anyways. a task shouldn't # be prioritized before another task unless both share a common set of # one or more authorized users # precondition self.assertEqual(0, len(t1.prioritize_before)) self.assertEqual(1, len(t1.prioritize_after)) self.assertEqual(1, len(t2.prioritize_before)) self.assertEqual(0, len(t2.prioritize_after)) self.assertTrue(t2 in t1.prioritize_after) self.assertTrue(t1 in t2.prioritize_before) # expect self.assertRaises(Forbidden, self.ll.<API key>, t1.id, t2.id, user) # then self.assertEqual(0, len(t1.prioritize_before)) self.assertEqual(1, len(t1.prioritize_after)) self.assertEqual(1, len(t2.prioritize_before)) self.assertEqual(0, len(t2.prioritize_after)) self.assertTrue(t2 in t1.prioritize_after) self.assertTrue(t1 in t2.prioritize_before) def <API key><API key>(self): # given t1 = self.pl.create_task('t1') t2 = self.pl.create_task('t2') user = self.pl.create_user('name@example.com') t1.users.append(user) t1.prioritize_after.append(t2) self.pl.add(t1) self.pl.add(t2) self.pl.add(user) self.pl.commit() # note that this situation shouldn't happen anyways. a task shouldn't # be prioritized before another task unless both share a common set of # one or more authorized users # precondition self.assertEqual(0, len(t1.prioritize_before)) self.assertEqual(1, len(t1.prioritize_after)) self.assertEqual(1, len(t2.prioritize_before)) self.assertEqual(0, len(t2.prioritize_after)) self.assertTrue(t2 in t1.prioritize_after) self.assertTrue(t1 in t2.prioritize_before) # expect self.assertRaises(Forbidden, self.ll.<API key>, t1.id, t2.id, user) # then self.assertEqual(0, len(t1.prioritize_before)) self.assertEqual(1, len(t1.prioritize_after)) self.assertEqual(1, len(t2.prioritize_before)) self.assertEqual(0, len(t2.prioritize_after)) self.assertTrue(t2 in t1.prioritize_after) self.assertTrue(t1 in t2.prioritize_before) def <API key>(self): # given t2 = self.pl.create_task('t2') user = self.pl.create_user('name@example.com') t2.users.append(user) self.pl.add(t2) self.pl.add(user) self.pl.commit() # precondition self.assertEqual(0, len(t2.prioritize_before)) self.assertEqual(0, len(t2.prioritize_after)) self.assertIsNone(self.pl.get_task(t2.id + 1)) # expect self.assertRaises(NotFound, self.ll.<API key>, t2.id + 1, t2.id, user) # then self.assertEqual(0, len(t2.prioritize_before)) self.assertEqual(0, len(t2.prioritize_after)) self.assertIsNone(self.pl.get_task(t2.id+1)) def <API key>(self): # given t1 = self.pl.create_task('t1') user = self.pl.create_user('name@example.com') t1.users.append(user) self.pl.add(t1) self.pl.add(user) self.pl.commit() # precondition self.assertEqual(0, len(t1.prioritize_before)) self.assertEqual(0, len(t1.prioritize_after)) self.assertIsNone(self.pl.get_task(t1.id + 1)) # expect self.assertRaises(NotFound, self.ll.<API key>, t1.id, t1.id + 1, user) # then self.assertEqual(0, len(t1.prioritize_before)) self.assertEqual(0, len(t1.prioritize_after)) self.assertIsNone(self.pl.get_task(t1.id + 1))
<?php namespace eZ\Bundle\<API key>\Controller; use eZ\Bundle\<API key>\LegacyResponse\<API key>; use eZ\Publish\Core\MVC\Legacy\Kernel\URIHelper; use eZ\Publish\Core\MVC\Legacy\Templating\LegacyHelper; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\Request; use eZ\Publish\Core\MVC\<API key>; use ezpKernelRedirect; use Symfony\Component\Routing\RouterInterface; /** * Controller embedding legacy kernel. */ class <API key> { /** * @var \Closure */ private $kernelClosure; /** * @var \eZ\Publish\Core\MVC\<API key> */ private $configResolver; /** * Template declaration to wrap legacy responses in a Twig pagelayout (optional) * Either a template declaration string or null/false to use legacy pagelayout * Default is null. * * @var mixed */ private $legacyLayout; /** * @var \eZ\Publish\Core\MVC\Legacy\Kernel\URIHelper */ private $uriHelper; /** * @var \eZ\Bundle\<API key>\LegacyResponse\<API key> */ private $<API key>; /** * @var \eZ\Publish\Core\MVC\Legacy\Templating\LegacyHelper */ private $legacyHelper; /** * @var \Symfony\Component\Routing\RouterInterface */ private $router; public function __construct( \Closure $kernelClosure, <API key> $configResolver, URIHelper $uriHelper, <API key> $<API key>, LegacyHelper $legacyHelper, RouterInterface $router ) { $this->kernelClosure = $kernelClosure; $this->legacyLayout = $configResolver->getParameter('<API key>', 'ezpublish_legacy'); $this->configResolver = $configResolver; $this->uriHelper = $uriHelper; $this-><API key> = $<API key>; $this->legacyHelper = $legacyHelper; $this->router = $router; } /** * Base fallback action. * Will be basically used for every legacy module. * * @param \Symfony\Component\HttpFoundation\Request $request * * @return \eZ\Bundle\<API key>\LegacyResponse */ public function indexAction(Request $request) { $kernelClosure = $this->kernelClosure; /** @var \eZ\Publish\Core\MVC\Legacy\Kernel $kernel */ $kernel = $kernelClosure(); $legacyMode = $this->configResolver->getParameter('legacy_mode'); $kernel->setUseExceptions(false); // Fix up legacy URI with current request since we can be in a sub-request here. $this->uriHelper->updateLegacyURI($request); // If we have a layout for legacy AND we're not in legacy mode, we ask the legacy kernel not to generate layout. if (isset($this->legacyLayout) && !$legacyMode) { $kernel->setUsePagelayout(false); } $result = $kernel->run(); $kernel->setUseExceptions(true); if ($result instanceof ezpKernelRedirect) { return $this-><API key>-><API key>($result); } $this->legacyHelper-><API key>($result->getAttribute('module_result')); $response = $this-><API key>-><API key>($result); $this-><API key>->mapHeaders(headers_list(), $response); return $response; } /** * Generates a RedirectResponse to the appropriate login route. * * @return RedirectResponse */ public function loginAction() { return new RedirectResponse($this->router->generate('login')); } /** * Generates a RedirectResponse to the appropriate logout route. * * @return RedirectResponse */ public function logoutAction() { return new RedirectResponse($this->router->generate('logout')); } }
#include <linux/module.h> #include <linux/types.h> #include <linux/init.h> #include <linux/slab.h> #include <linux/device.h> #include <linux/notifier.h> #include <linux/err.h> #include <linux/power_supply.h> #include <linux/thermal.h> #include "power_supply.h" /* exported for the APM Power driver, APM emulation */ struct class *power_supply_class; EXPORT_SYMBOL_GPL(power_supply_class); <API key>(<API key>); EXPORT_SYMBOL_GPL(<API key>); static struct device_type <API key>; static bool <API key>(struct power_supply *supplier, struct power_supply *supply) { int i; if (!supply->supplied_from && !supplier->supplied_to) return false; /* Support both supplied_to and supplied_from modes */ if (supply->supplied_from) { if (!supplier->name) return false; for (i = 0; i < supply->num_supplies; i++) if (!strcmp(supplier->name, supply->supplied_from[i])) return true; } else { if (!supply->name) return false; for (i = 0; i < supplier->num_supplicants; i++) if (!strcmp(supplier->supplied_to[i], supply->name)) return true; } return false; } /** * <API key> - set current limit * @psy: the power supply to control * @limit: current limit in uA from the power supply. * 0 will disable the power supply. * * This function will set a maximum supply current from a source * and it will disable the charger when limit is 0. */ int <API key>(struct power_supply *psy, int limit) { const union <API key> ret = {limit,}; if (psy->set_property) return psy->set_property(psy, <API key>, &ret); return -ENXIO; } EXPORT_SYMBOL_GPL(<API key>); /** * <API key> - enable or disable charging * @psy: the power supply to control * @enable: sets enable property of power supply */ int <API key>(struct power_supply *psy, bool enable) { const union <API key> ret = {enable,}; if (psy->set_property) return psy->set_property(psy, <API key>, &ret); return -ENXIO; } EXPORT_SYMBOL_GPL(<API key>); /** * <API key> - set present state of the power supply * @psy: the power supply to control * @enable: sets present property of power supply */ int <API key>(struct power_supply *psy, bool enable) { const union <API key> ret = {enable,}; if (psy->set_property) return psy->set_property(psy, <API key>, &ret); return -ENXIO; } EXPORT_SYMBOL_GPL(<API key>); /** * <API key> - set online state of the power supply * @psy: the power supply to control * @enable: sets online property of power supply */ int <API key>(struct power_supply *psy, bool enable) { const union <API key> ret = {enable,}; if (psy->set_property) return psy->set_property(psy, <API key>, &ret); return -ENXIO; } EXPORT_SYMBOL_GPL(<API key>); /** <API key> - set health state of the power supply * @psy: the power supply to control * @health: sets health property of power supply */ int <API key>(struct power_supply *psy, int health) { const union <API key> ret = {health,}; if (psy->set_property) return psy->set_property(psy, <API key>, &ret); return -ENXIO; } EXPORT_SYMBOL(<API key>); /** * <API key> - set scope of the power supply * @psy: the power supply to control * @scope: value to set the scope property to, should be from * the SCOPE enum in power_supply.h */ int <API key>(struct power_supply *psy, int scope) { const union <API key> ret = {scope, }; if (psy->set_property) return psy->set_property(psy, <API key>, &ret); return -ENXIO; } EXPORT_SYMBOL_GPL(<API key>); /** * <API key> - set type of the power supply * @psy: the power supply to control * @supply_type: sets type property of power supply */ int <API key>(struct power_supply *psy, enum power_supply_type supply_type) { const union <API key> ret = {supply_type,}; if (psy->set_property) return psy->set_property(psy, <API key>, &ret); return -ENXIO; } EXPORT_SYMBOL_GPL(<API key>); /** * <API key> - set charge type of the power supply * @psy: the power supply to control * @enable: sets charge type property of power supply */ int <API key>(struct power_supply *psy, int charge_type) { const union <API key> ret = {charge_type,}; if (psy->set_property) return psy->set_property(psy, <API key>, &ret); return -ENXIO; } EXPORT_SYMBOL_GPL(<API key>); static int <API key>(struct device *dev, void *data) { struct power_supply *psy = (struct power_supply *)data; struct power_supply *pst = dev_get_drvdata(dev); if (<API key>(psy, pst)) { if (pst-><API key>) pst-><API key>(pst); } return 0; } static void <API key>(struct work_struct *work) { unsigned long flags; struct power_supply *psy = container_of(work, struct power_supply, changed_work); dev_dbg(psy->dev, "%s\n", __func__); spin_lock_irqsave(&psy->changed_lock, flags); if (psy->changed) { psy->changed = false; <API key>(&psy->changed_lock, flags); <API key>(power_supply_class, NULL, psy, <API key>); <API key>(psy); <API key>(&<API key>, <API key>, psy); kobject_uevent(&psy->dev->kobj, KOBJ_CHANGE); spin_lock_irqsave(&psy->changed_lock, flags); } /* * Dependent power supplies (e.g. battery) may have changed state * as a result of this event, so poll again and hold the * wakeup_source until all events are processed. */ if (!psy->changed) pm_relax(psy->dev); <API key>(&psy->changed_lock, flags); } void <API key>(struct power_supply *psy) { unsigned long flags; dev_dbg(psy->dev, "%s\n", __func__); spin_lock_irqsave(&psy->changed_lock, flags); psy->changed = true; pm_stay_awake(psy->dev); <API key>(&psy->changed_lock, flags); schedule_work(&psy->changed_work); } EXPORT_SYMBOL_GPL(<API key>); #ifdef CONFIG_OF #include <linux/of.h> static int <API key>(struct device *dev, void *data) { struct power_supply *psy = (struct power_supply *)data; struct power_supply *epsy = dev_get_drvdata(dev); struct device_node *np; int i = 0; do { np = of_parse_phandle(psy->of_node, "power-supplies", i++); if (!np) continue; if (np == epsy->of_node) { dev_info(psy->dev, "%s: Found supply : %s\n", psy->name, epsy->name); psy->supplied_from[i-1] = (char *)epsy->name; psy->num_supplies++; of_node_put(np); break; } of_node_put(np); } while (np); return 0; } static int <API key>(struct power_supply *psy) { int error; error = <API key>(power_supply_class, NULL, psy, <API key>); dev_dbg(psy->dev, "%s %d\n", __func__, error); return error; } static int <API key>(struct device *dev, void *data) { struct device_node *np = (struct device_node *)data; struct power_supply *epsy = dev_get_drvdata(dev); /* return error breaks out of <API key> loop */ if (epsy->of_node == np) return -EINVAL; return 0; } static int <API key>(struct device_node *supply_node) { int error; struct device *dev; struct class_dev_iter iter; /* * Use iterator to see if any other device is registered. * This is required since <API key> returns 0 * if there are no devices registered. */ class_dev_iter_init(&iter, power_supply_class, NULL, NULL); dev = class_dev_iter_next(&iter); if (!dev) return -EPROBE_DEFER; /* * We have to treat the return value as inverted, because if * we return error on not found, then it won't continue looking. * So we trick it by returning error on success to stop looking * once the matching device is found. */ error = <API key>(power_supply_class, NULL, supply_node, <API key>); return error ? 0 : -EPROBE_DEFER; } static int <API key>(struct power_supply *psy) { struct device_node *np; int cnt = 0; /* If there is already a list honor it */ if (psy->supplied_from && psy->num_supplies > 0) return 0; /* No device node found, nothing to do */ if (!psy->of_node) return 0; do { int ret; np = of_parse_phandle(psy->of_node, "power-supplies", cnt++); if (!np) continue; ret = <API key>(np); if (ret) { dev_dbg(psy->dev, "Failed to find supply, defer!\n"); of_node_put(np); return -EPROBE_DEFER; } of_node_put(np); } while (np); /* All supplies found, allocate char ** array for filling */ psy->supplied_from = devm_kzalloc(psy->dev, sizeof(psy->supplied_from), GFP_KERNEL); if (!psy->supplied_from) { dev_err(psy->dev, "Couldn't allocate memory for supply list\n"); return -ENOMEM; } *psy->supplied_from = devm_kzalloc(psy->dev, sizeof(char *) * cnt, GFP_KERNEL); if (!*psy->supplied_from) { dev_err(psy->dev, "Couldn't allocate memory for supply list\n"); return -ENOMEM; } return <API key>(psy); } #else static inline int <API key>(struct power_supply *psy) { return 0; } #endif static int <API key>(struct device *dev, void *data) { union <API key> ret = {0,}; struct power_supply *psy = (struct power_supply *)data; struct power_supply *epsy = dev_get_drvdata(dev); if (<API key>(epsy, psy)) if (!epsy->get_property(epsy, <API key>, &ret)) { if (ret.intval) return ret.intval; } return 0; } int <API key>(struct power_supply *psy) { int error; error = <API key>(power_supply_class, NULL, psy, <API key>); dev_dbg(psy->dev, "%s %d\n", __func__, error); return error; } EXPORT_SYMBOL_GPL(<API key>); static int <API key>(struct device *dev, void *data) { union <API key> ret = {0,}; struct power_supply *psy = dev_get_drvdata(dev); unsigned int *count = data; (*count)++; if (psy->type != <API key>) { if (psy->get_property(psy, <API key>, &ret)) return 0; if (ret.intval) return ret.intval; } return 0; } int <API key>(void) { int error; unsigned int count = 0; error = <API key>(power_supply_class, NULL, &count, <API key>); /* * If no power class device was found at all, most probably we are * running on a desktop system, so assume we are on mains power. */ if (count == 0) return 1; return error; } EXPORT_SYMBOL_GPL(<API key>); int <API key>(struct power_supply *psy) { if (psy->type == <API key> && psy->set_charged) { psy->set_charged(psy); return 0; } return -EINVAL; } EXPORT_SYMBOL_GPL(<API key>); static int <API key>(struct device *dev, const void *data) { const char *name = data; struct power_supply *psy = dev_get_drvdata(dev); return strcmp(psy->name, name) == 0; } struct power_supply *<API key>(const char *name) { struct device *dev = class_find_device(power_supply_class, NULL, name, <API key>); return dev ? dev_get_drvdata(dev) : NULL; } EXPORT_SYMBOL_GPL(<API key>); #ifdef CONFIG_OF static int <API key>(struct device *dev, const void *data) { return dev->parent && dev->parent->of_node == data; } struct power_supply *<API key>(struct device_node *np, const char *property) { struct device_node *power_supply_np; struct device *dev; power_supply_np = of_parse_phandle(np, property, 0); if (!power_supply_np) return ERR_PTR(-ENODEV); dev = class_find_device(power_supply_class, NULL, power_supply_np, <API key>); of_node_put(power_supply_np); return dev ? dev_get_drvdata(dev) : NULL; } EXPORT_SYMBOL_GPL(<API key>); #endif /* CONFIG_OF */ int power_supply_powers(struct power_supply *psy, struct device *dev) { return sysfs_create_link(&psy->dev->kobj, &dev->kobj, "powers"); } EXPORT_SYMBOL_GPL(power_supply_powers); static void <API key>(struct device *dev) { pr_debug("device: '%s': %s\n", dev_name(dev), __func__); kfree(dev); } int <API key>(struct notifier_block *nb) { return <API key>(&<API key>, nb); } EXPORT_SYMBOL_GPL(<API key>); void <API key>(struct notifier_block *nb) { <API key>(&<API key>, nb); } EXPORT_SYMBOL_GPL(<API key>); #ifdef CONFIG_THERMAL static int <API key>(struct thermal_zone_device *tzd, unsigned long *temp) { struct power_supply *psy; union <API key> val; int ret; WARN_ON(tzd == NULL); psy = tzd->devdata; ret = psy->get_property(psy, <API key>, &val); /* Convert tenths of degree Celsius to milli degree Celsius. */ if (!ret) *temp = val.intval * 100; return ret; } static struct <API key> psy_tzd_ops = { .get_temp = <API key>, }; static int <API key>(struct power_supply *psy) { int i; /* Register battery zone device psy reports temperature */ for (i = 0; i < psy->num_properties; i++) { if (psy->properties[i] == <API key>) { psy->tzd = <API key>(psy->name, 0, 0, psy, &psy_tzd_ops, NULL, 0, 0); if (IS_ERR(psy->tzd)) return PTR_ERR(psy->tzd); break; } } return 0; } static void <API key>(struct power_supply *psy) { if (IS_ERR_OR_NULL(psy->tzd)) return; <API key>(psy->tzd); } /* thermal cooling device callbacks */ static int <API key>(struct <API key> *tcd, unsigned long *state) { struct power_supply *psy; union <API key> val; int ret; psy = tcd->devdata; ret = psy->get_property(psy, <API key>, &val); if (!ret) *state = val.intval; return ret; } static int <API key>(struct <API key> *tcd, unsigned long *state) { struct power_supply *psy; union <API key> val; int ret; psy = tcd->devdata; ret = psy->get_property(psy, <API key>, &val); if (!ret) *state = val.intval; return ret; } static int <API key>(struct <API key> *tcd, unsigned long state) { struct power_supply *psy; union <API key> val; int ret; psy = tcd->devdata; val.intval = state; ret = psy->set_property(psy, <API key>, &val); return ret; } static struct <API key> psy_tcd_ops = { .get_max_state = <API key>, .get_cur_state = <API key>, .set_cur_state = <API key>, }; static int psy_register_cooler(struct power_supply *psy) { int i; /* Register for cooling device if psy can control charging */ for (i = 0; i < psy->num_properties; i++) { if (psy->properties[i] == <API key>) { psy->tcd = <API key>( (char *)psy->name, psy, &psy_tcd_ops); if (IS_ERR(psy->tcd)) return PTR_ERR(psy->tcd); break; } } return 0; } static void <API key>(struct power_supply *psy) { if (IS_ERR_OR_NULL(psy->tcd)) return; <API key>(psy->tcd); } #else static int <API key>(struct power_supply *psy) { return 0; } static void <API key>(struct power_supply *psy) { } static int psy_register_cooler(struct power_supply *psy) { return 0; } static void <API key>(struct power_supply *psy) { } #endif int <API key>(struct device *parent, struct power_supply *psy) { struct device *dev; int rc; dev = kzalloc(sizeof(*dev), GFP_KERNEL); if (!dev) return -ENOMEM; device_initialize(dev); dev->class = power_supply_class; dev->type = &<API key>; dev->parent = parent; dev->release = <API key>; dev_set_drvdata(dev, psy); psy->dev = dev; rc = dev_set_name(dev, "%s", psy->name); if (rc) goto dev_set_name_failed; INIT_WORK(&psy->changed_work, <API key>); rc = <API key>(psy); if (rc) { dev_info(dev, "Not all required supplies found, defer probe\n"); goto <API key>; } spin_lock_init(&psy->changed_lock); rc = device_init_wakeup(dev, true); if (rc) goto wakeup_init_failed; rc = device_add(dev); if (rc) goto device_add_failed; rc = <API key>(psy); if (rc) goto <API key>; rc = psy_register_cooler(psy); if (rc) goto <API key>; rc = <API key>(psy); if (rc) goto <API key>; <API key>(psy); goto success; <API key>: <API key>(psy); <API key>: <API key>(psy); <API key>: device_del(dev); device_add_failed: wakeup_init_failed: <API key>: dev_set_name_failed: put_device(dev); success: return rc; } EXPORT_SYMBOL_GPL(<API key>); void <API key>(struct power_supply *psy) { cancel_work_sync(&psy->changed_work); sysfs_remove_link(&psy->dev->kobj, "powers"); <API key>(psy); <API key>(psy); <API key>(psy); device_init_wakeup(psy->dev, false); device_unregister(psy->dev); } EXPORT_SYMBOL_GPL(<API key>); static int __init <API key>(void) { power_supply_class = class_create(THIS_MODULE, "power_supply"); if (IS_ERR(power_supply_class)) return PTR_ERR(power_supply_class); power_supply_class->dev_uevent = power_supply_uevent; <API key>(&<API key>); return 0; } static void __exit <API key>(void) { class_destroy(power_supply_class); } subsys_initcall(<API key>); module_exit(<API key>); MODULE_DESCRIPTION("Universal power supply monitor class"); MODULE_AUTHOR("Ian Molton <spyro@f2s.com>, " "Szabolcs Gyurko, " "Anton Vorontsov <cbou@mail.ru>"); MODULE_LICENSE("GPL");
# zabbix-slack Zabbix alert script for sending notifications to a Slack webhook (python requests)
<?php defined('_JEXEC') or die('Restricted access'); /** * Surveyforce Component Controller */ class <API key> extends JControllerLegacy { /** * display task * * @return void */ public function __construct($config = array()){ parent::__construct($config); } public function display($cachable = false, $urlparams = array()){ $app = JFactory::getApplication(); $view = JFactory::getApplication()->input->getCmd('view', 'surveys'); switch($view){ case "surveys": case "survey": case "questions": case "question": case "review": case "import": case "result": case "resultnote": case "export": case "getip": case "autocheck": case "print": case "lottery": case "addend": case "analyzes": case "analyze": case "voted": break; default: $app->redirect("index.php?option=com_surveyforce&view=surveys"); } JFactory::getApplication()->input->set('view', $view); parent::display($cachable); } public function get_options(){ if(!class_exists('SfAppPlugins')){ include_once <API key> . DIRECTORY_SEPARATOR . 'helpers' . DIRECTORY_SEPARATOR . 'app_plugin.php'; $appsLib = SfAppPlugins::getInstance(); $appsLib->loadApplications(); } $type = SurveyforceHelper::getQuestionType(JFactory::getApplication()->input->getCmd('sf_qtype')); $data['quest_type'] = $type->sf_plg_name; $data['quest_id'] = JFactory::getApplication()->input->get('quest_id'); $data['sf_qtype'] = JFactory::getApplication()->input->getCmd('sf_qtype'); $appsLib->triggerEvent('<API key>', $data); } public function testvote(){ $db = JFactory::getDBO(); $config = JFactory::getConfig(); $testsite_link = $config->get('testsite_link', false); $app = JFactory::getApplication(); $survey_id = $app->input->getInt('test_survey_id', 0); $api_request_url = $config->get('testsite_link', '') . "api/server_survey.php"; $<API key> = array('survey_id' => $survey_id); $ch = curl_init(); curl_setopt($ch, <API key>, TRUE); $api_request_url .= '?' . http_build_query($<API key>); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Accept: application/json')); curl_setopt($ch, CURLOPT_URL, $api_request_url); curl_setopt($ch, <API key>, false); $api_response = curl_exec($ch); $code = curl_getinfo($ch, CURLINFO_HTTP_CODE); $message = curl_error($ch); curl_close($ch); if($code == 200){ $result_data = json_decode($api_response); if($result_data->status == 0){ echo ""; JHtml::_('utility.recordLog', "api_log.php", "", JLog::ERROR); jexit(); } }else{ // API echo "API"; JHtml::_('utility.recordLog', "api_log.php", sprintf("Url:%s, Code:%d, Msg:%s", $api_request_url, $code, $message), JLog::ERROR); jexit(); } $query = $db->getQuery(true); $query->select('*'); $query->from('#<API key>'); $query->where('id = ' . $db->quote($survey_id)); $db->setQuery($query); $survey_row = $db->loadAssoc(); $query = $db->getQuery(true); $query->select('*'); $query->from('#<API key>'); $query->where('sf_survey = ' . $db->quote($survey_id)); $db->setQuery($query); $question_rows = $db->loadAssocList(); unset($options_rows); $options_rows = array(); unset($sub_options_rows); $sub_options_rows = array(); unset($cats_rows); $cats_rows = array(); if($question_rows){ $question_ids = array(); foreach($question_rows as $question_row){ $question_ids[] = $question_row["id"]; } $query = $db->getQuery(true); $query->select('*'); $query->from('#<API key>'); $query->where('quest_id IN (' . implode(",", $question_ids) . ')'); $db->setQuery($query); $options_rows = $db->loadAssocList(); $query = $db->getQuery(true); $query->select('*'); $query->from('#<API key>'); $query->where('quest_id IN (' . implode(",", $question_ids) . ')'); $db->setQuery($query); $sub_options_rows = $db->loadAssocList(); $query = $db->getQuery(true); $query->select('*'); $query->from('#<API key>'); $query->where('question_id IN (' . implode(",", $question_ids) . ')'); $db->setQuery($query); $cats_rows = $db->loadAssocList(); } // assign_summary $query = $db->getQuery(true); $query->select('*'); $query->from('#__assign_summary'); $query->where('survey_id = ' . $db->quote($survey_id)); $db->setQuery($query); $assign_summary_rows = $db->loadAssocList(); $<API key> = array('survey_id' => $survey_id, 'survey_row' => json_encode($survey_row), 'question_rows' => json_encode($question_rows), 'options_rows' => json_encode($options_rows), 'sub_options_rows' => json_encode($sub_options_rows), 'assign_summary_rows' => json_encode($assign_summary_rows), 'cats_rows' => json_encode($cats_rows)); $ch = curl_init(); curl_setopt($ch, <API key>, TRUE); curl_setopt($ch, CURLOPT_POST, TRUE); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($<API key>)); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Accept: application/json')); curl_setopt($ch, CURLOPT_URL, $api_request_url); curl_setopt($ch, <API key>, false); $api_response = curl_exec($ch); $code = curl_getinfo($ch, CURLINFO_HTTP_CODE); $message = curl_error($ch); curl_close($ch); if($code == 200){ $result_data = json_decode($api_response); if($result_data->status == 0){ echo ""; JHtml::_('utility.recordLog', "api_log.php", "", JLog::ERROR); jexit(); }else{ header("Location:" . $testsite_link . "index.php?option=com_surveyforce&view=intro&Itemid=120&sid=" . $survey_id); jexit(); } }else{ // API echo "API"; JHtml::_('utility.recordLog', "api_log.php", sprintf("Url:%s, Code:%d, Msg:%s", $api_request_url, $code, $message), JLog::ERROR); jexit(); } jexit(); } }
package org.mo.com.io; public class FLinkInput { }
<?php require_once CLASS_EX_REALDIR . 'page_extends/frontparts/bloc/<API key>.php'; /** * . * * @package Page * @author Designup.jp * @version 1.1 */ class <API key> extends <API key> { /** * Page . * * @return void */ public function init() { parent::init(); } /** * Page . * * @return void */ public function process() { $this->action(); $this->sendResponse(); } /** * Page . * * @return void */ public function action() { // $objSiteInfo = SC_Helper_DB_Ex::sfGetBasisData(); // $this->arrInfo = $objSiteInfo->data; $this->arrBestProducts = $this->lfGetRanking(); //$this->arrBestProducts8 = $this->lfGetRanking(8); //$this->arrReviewList = $this->getReviewList(); //$this->arrMakerList = $this->getMakerList(); } /** * . * * @return array $arrBestProducts */ public function lfGetRanking($getNumber = 10) { // $objRecommend = new <API key>(); $arrRanking = $this->getList($getNumber); $response = array(); if (count($arrRanking) > 0) { $objQuery =& SC_Query_Ex::<API key>(); $objProduct = new SC_Product_Ex(); // where& $arrProductId = array(); foreach ($arrRanking as $key => $val) { $arrProductId[] = $val['product_id']; } //$arrProducts = $objProduct->getListByProductIds($objQuery, $arrProductId); $arrProducts = $objProduct-><API key>($objQuery, $arrProductId); SC_Product_Ex::setIncTaxToProducts($arrProducts); $i=0; foreach ($arrRanking as $key => $value) { if (isset($arrProducts[$value['product_id']])) { $product = $arrProducts[$value['product_id']]; if ($product['status'] == 1 && (!NOSTOCK_HIDDEN || ($product['stock_max'] >= 1 || $product['stock_unlimited_max'] == 1))) { if ($i == $getNumber ) { break; } $response[] = array_merge($value, $arrProducts[$value['product_id']]); $i++; } } else { unset($arrRanking[$key]); } } } return $response; } /** * * * @return array $arrNewProducts */ public function getList($dispNumber = 0, $pageNumber = 0, $has_deleted = false) { $objQuery =& SC_Query_Ex::<API key>(); $col = 'OD.product_id,OD.price,SUM(OD.quantity),SUM(OD.quantity)*OD.price'; $table = 'dtb_order as O, dtb_order_detail as OD'; $where = 'O.order_id = OD.order_id AND O.del_flg = 0'; $objQuery->setGroupBy('OD.product_id'); $objQuery->setOrder('SUM(OD.quantity) DESC'); /* if ($dispNumber > 0) { if ($pageNumber > 0) { $objQuery->setLimitOffset($dispNumber, (($pageNumber - 1) * $dispNumber)); } else { $objQuery->setLimit($dispNumber); } } */ $arrRet = $objQuery->select($col, $table, $where); // echo "<pre>"; // var_dump($arrRet); // echo "</pre>"; return $arrRet; } /* public function getList($dispNumber = 0, $pageNumber = 0, $has_deleted = false) { $objQuery =& SC_Query_Ex::<API key>(); $col = 'product_id,price,SUM(quantity),SUM(quantity)*price'; $table = 'dtb_order_detail'; $where = ''; $objQuery->setGroupBy('product_id,price'); $objQuery->setOrder('SUM(quantity)*price DESC'); if ($dispNumber > 0) { if ($pageNumber > 0) { $objQuery->setLimitOffset($dispNumber, (($pageNumber - 1) * $dispNumber)); } else { $objQuery->setLimit($dispNumber); } } $arrRet = $objQuery->select($col, $table, $where); // // echo "<pre>"; // var_dump($arrRet); // echo "</pre>"; return $arrRet; } */ /** * * * * @return array $arrReviewList */ public function getReviewList($dispNumber = 0, $pageNumber = 0, $has_deleted = false) { $objQuery =& SC_Query_Ex::<API key>(); $col = 'product_id,TRUNC(AVG(recommend_level),0) AS recommend_level,COUNT(*) AS recommend_count'; $table = 'dtb_review'; $where = ''; $objQuery->setGroupBy('product_id'); $objQuery->setOrder('product_id DESC'); if ($dispNumber > 0) { if ($pageNumber > 0) { $objQuery->setLimitOffset($dispNumber, (($pageNumber - 1) * $dispNumber)); } else { $objQuery->setLimit($dispNumber); } } $arrRet = $objQuery->select($col, $table, $where); // echo "<pre>"; // var_dump($arrRet); // echo "</pre>"; return $arrRet; } /** * * * @return array $arrMakerList */ public function getMakerList($dispNumber = 0, $pageNumber = 0, $has_deleted = false) { $objQuery =& SC_Query_Ex::<API key>(); $col = '*'; $table = 'dtb_maker'; $where = ''; if ($dispNumber > 0) { if ($pageNumber > 0) { $objQuery->setLimitOffset($dispNumber, (($pageNumber - 1) * $dispNumber)); } else { $objQuery->setLimit($dispNumber); } } $arrRet = $objQuery->select($col, $table, $where); // echo "<pre>"; // var_dump($arrRet); // echo "</pre>"; return $arrRet; } }
#ifndef AUGUTILPP_LOG_HPP #define AUGUTILPP_LOG_HPP #include "augutilpp/config.hpp" #include "augctxpp/exception.hpp" #include "augutil/log.h" #include "augctx/defs.h" // AUG_MAXLINE #include <string> namespace aug { inline void vformatlog(char* buf, size_t& n, clockref clock, unsigned level, const char* format, va_list args) { verify(aug_vformatlog(buf, &n, clock.get(), level, format, args)); } inline void formatlog(char* buf, size_t& n, clockref clock, unsigned level, const char* format, ...) { va_list args; va_start(args, format); aug_result result(aug_vformatlog(buf, &n, clock.get(), level, format, args)); va_end(args); verify(result); } inline std::string vformatlog(clockref clock, unsigned level, const char* format, va_list args) { char buf[AUG_MAXLINE]; size_t n(sizeof(buf)); vformatlog(buf, n, clock, level, format, args); return std::string(buf, n); } inline std::string formatlog(clockref clock, unsigned level, const char* format, ...) { char buf[AUG_MAXLINE]; size_t n(sizeof(buf)); va_list args; va_start(args, format); aug_result result(aug_vformatlog(buf, &n, clock.get(), level, format, args)); va_end(args); verify(result); return std::string(buf, n); } inline logptr createdaemonlog(mpoolref mpool, clockref clock) { return object_attach<aug_log> (aug_createdaemonlog(mpool.get(), clock.get())); } inline void setdaemonlog(ctxref ctx) { verify(aug_setdaemonlog(ctx.get())); } } #endif // AUGUTILPP_LOG_HPP
<?php defined('_JEXEC') or die; jimport('joomla.application.component.controllerform'); /** * Item Controller */ class <API key> extends JControllerForm { /** * @var string The prefix to use with controller messages. */ protected $text_prefix = 'NN'; // Parent class access checks are sufficient for this controller. }
#include "precompiled.hpp" #include "c1/c1_Compilation.hpp" #include "c1/c1_Instruction.hpp" #include "c1/<API key>.hpp" #include "c1/c1_LIRAssembler.hpp" #include "c1/c1_MacroAssembler.hpp" #include "c1/c1_ValueStack.hpp" #include "ci/ciInstance.hpp" #include "runtime/os.hpp" void LIR_Assembler::patching_epilog(PatchingStub* patch, LIR_PatchCode patch_code, Register obj, CodeEmitInfo* info) { // We must have enough patching space so that call can be inserted. // We cannot use fat nops here, since the concurrent code rewrite may transiently while ((intx) _masm->pc() - (intx) patch->pc_start() < NativeGeneralJump::instruction_size) { _masm->nop(); } patch->install(_masm, patch_code, obj, info); append_code_stub(patch); #ifdef ASSERT Bytecodes::Code code = info->scope()->method()->java_code_at_bci(info->stack()->bci()); if (patch->id() == PatchingStub::access_field_id) { switch (code) { case Bytecodes::_putstatic: case Bytecodes::_getstatic: case Bytecodes::_putfield: case Bytecodes::_getfield: break; default: ShouldNotReachHere(); } } else if (patch->id() == PatchingStub::load_klass_id) { switch (code) { case Bytecodes::_new: case Bytecodes::_anewarray: case Bytecodes::_multianewarray: case Bytecodes::_instanceof: case Bytecodes::_checkcast: break; default: ShouldNotReachHere(); } } else if (patch->id() == PatchingStub::load_mirror_id) { switch (code) { case Bytecodes::_putstatic: case Bytecodes::_getstatic: case Bytecodes::_ldc: case Bytecodes::_ldc_w: break; default: ShouldNotReachHere(); } } else if (patch->id() == PatchingStub::load_appendix_id) { Bytecodes::Code bc_raw = info->scope()->method()->raw_code_at_bci(info->stack()->bci()); assert(Bytecodes::<API key>(bc_raw), "unexpected appendix resolution"); } else { ShouldNotReachHere(); } #endif } PatchingStub::PatchID LIR_Assembler::patching_id(CodeEmitInfo* info) { IRScope* scope = info->scope(); Bytecodes::Code bc_raw = scope->method()->raw_code_at_bci(info->stack()->bci()); if (Bytecodes::<API key>(bc_raw)) { return PatchingStub::load_appendix_id; } return PatchingStub::load_mirror_id; } LIR_Assembler::LIR_Assembler(Compilation* c): _compilation(c) , _masm(c->masm()) , _bs(Universe::heap()->barrier_set()) , _frame_map(c->frame_map()) , _current_block(NULL) , <API key>(NULL) , <API key>(0) { _slow_case_stubs = new CodeStubList(); } LIR_Assembler::~LIR_Assembler() { } void LIR_Assembler::check_codespace() { CodeSection* cs = _masm->code_section(); if (cs->remaining() < (int)(NOT_LP64(1*K)LP64_ONLY(2*K))) { BAILOUT("CodeBuffer overflow"); } } void LIR_Assembler::append_code_stub(CodeStub* stub) { _slow_case_stubs->append(stub); } void LIR_Assembler::emit_stubs(CodeStubList* stub_list) { for (int m = 0; m < stub_list->length(); m++) { CodeStub* s = (*stub_list)[m]; check_codespace(); CHECK_BAILOUT(); #ifndef PRODUCT if (CommentedAssembly) { stringStream st; s->print_name(&st); st.print(" slow case"); _masm->block_comment(st.as_string()); } #endif s->emit_code(this); #ifdef ASSERT s-><API key>(); #endif } } void LIR_Assembler::<API key>() { emit_stubs(_slow_case_stubs); } bool LIR_Assembler::needs_icache(ciMethod* method) const { return !method->is_static(); } int LIR_Assembler::code_offset() const { return _masm->offset(); } address LIR_Assembler::pc() const { return _masm->pc(); } // To bang the stack of this compiled method we use the stack size // that the interpreter would need in case of a deoptimization. This // removes the need to bang the stack in the deoptimization blob which // in turn simplifies stack overflow handling. int LIR_Assembler::bang_size_in_bytes() const { return MAX2(<API key>() + os::<API key>(), _compilation-><API key>()); } void LIR_Assembler::<API key>(ExceptionInfoList* info_list) { for (int i = 0; i < info_list->length(); i++) { XHandlers* handlers = info_list->at(i)->exception_handlers(); for (int j = 0; j < handlers->length(); j++) { XHandler* handler = handlers->handler_at(j); assert(handler->lir_op_id() != -1, "handler not processed by LinearScan"); assert(handler->entry_code() == NULL || handler->entry_code()->instructions_list()->last()->code() == lir_branch || handler->entry_code()->instructions_list()->last()->code() == lir_delay_slot, "last operation must be branch"); if (handler->entry_pco() == -1) { // entry code not emitted yet if (handler->entry_code() != NULL && handler->entry_code()->instructions_list()->length() > 1) { handler->set_entry_pco(code_offset()); if (CommentedAssembly) { _masm->block_comment("Exception adapter block"); } emit_lir_list(handler->entry_code()); } else { handler->set_entry_pco(handler->entry_block()-><API key>()); } assert(handler->entry_pco() != -1, "must be set now"); } } } } void LIR_Assembler::emit_code(BlockList* hir) { if (PrintLIR) { print_LIR(hir); } int n = hir->length(); for (int i = 0; i < n; i++) { emit_block(hir->at(i)); CHECK_BAILOUT(); } flush_debug_info(code_offset()); DEBUG_ONLY(<API key>()); } void LIR_Assembler::emit_block(BlockBegin* block) { if (block->is_set(BlockBegin::<API key>)) { <API key>(); } // if this block is the start of an exception handler, record the // PC offset of the first instruction for later construction of // the <API key> if (block->is_set(BlockBegin::<API key>)) { block-><API key>(code_offset()); } #ifndef PRODUCT if (<API key>) { // don't print Phi's InstructionPrinter ip(false); block->print(ip); } #endif /* PRODUCT */ assert(block->lir() != NULL, "must have LIR"); X86_ONLY(assert(_masm->rsp_offset() == 0, "frame size should be fixed")); #ifndef PRODUCT if (CommentedAssembly) { stringStream st; st.print_cr(" block B%d [%d, %d]", block->block_id(), block->bci(), block->end()->printable_bci()); _masm->block_comment(st.as_string()); } #endif emit_lir_list(block->lir()); X86_ONLY(assert(_masm->rsp_offset() == 0, "frame size should be fixed")); } void LIR_Assembler::emit_lir_list(LIR_List* list) { peephole(list); int n = list->length(); for (int i = 0; i < n; i++) { LIR_Op* op = list->at(i); check_codespace(); CHECK_BAILOUT(); #ifndef PRODUCT if (CommentedAssembly) { // Don't record out every op since that's too verbose. Print // branches since they include block and stub names. Also print // patching moves since they generate funny looking code. if (op->code() == lir_branch || (op->code() == lir_move && op->as_Op1()->patch_code() != lir_patch_none)) { stringStream st; op->print_on(&st); _masm->block_comment(st.as_string()); } } if (<API key>) { // print out the LIR operation followed by the resulting assembly list->at(i)->print(); tty->cr(); } #endif /* PRODUCT */ op->emit_code(this); if (compilation()->debug_info_recorder()-><API key>()) { process_debug_info(op); } #ifndef PRODUCT if (<API key>) { _masm->code()->decode(); } #endif /* PRODUCT */ } } #ifdef ASSERT void LIR_Assembler::<API key>() { CHECK_BAILOUT(); for (int i = 0; i < <API key>.length() - 1; i++) { if (!<API key>.at(i)->label()->is_bound()) { tty->print_cr("label of block B%d is not bound", <API key>.at(i)->block_id()); assert(false, "unbound label"); } } } #endif void LIR_Assembler::<API key>(CodeEmitInfo* info) { int pc_offset = code_offset(); flush_debug_info(pc_offset); info->record_debug_info(compilation()->debug_info_recorder(), pc_offset); if (info->exception_handlers() != NULL) { compilation()-><API key>(pc_offset, info->exception_handlers()); } } void LIR_Assembler::add_call_info(int pc_offset, CodeEmitInfo* cinfo) { flush_debug_info(pc_offset); cinfo->record_debug_info(compilation()->debug_info_recorder(), pc_offset); if (cinfo->exception_handlers() != NULL) { compilation()-><API key>(pc_offset, cinfo->exception_handlers()); } } static ValueStack* debug_info(Instruction* ins) { StateSplit* ss = ins->as_StateSplit(); if (ss != NULL) return ss->state(); return ins->state_before(); } void LIR_Assembler::process_debug_info(LIR_Op* op) { Instruction* src = op->source(); if (src == NULL) return; int pc_offset = code_offset(); if (<API key> == src) { <API key> = pc_offset; return; } ValueStack* vstack = debug_info(src); if (vstack == NULL) return; if (<API key> != NULL) { // Got some old debug info. Get rid of it. if (debug_info(<API key>) == vstack) { <API key> = pc_offset; return; } if (<API key> < pc_offset) { <API key>(); } <API key> = NULL; } // Remember the debug info. if (pc_offset > compilation()->debug_info_recorder()->last_pc_offset()) { <API key> = src; <API key> = pc_offset; } } // Index caller states in s, where 0 is the oldest, 1 its callee, etc. // Return NULL if n is too large. // Returns the caller_bci for the next-younger state, also. static ValueStack* nth_oldest(ValueStack* s, int n, int& bci_result) { ValueStack* t = s; for (int i = 0; i < n; i++) { if (t == NULL) break; t = t->caller_state(); } if (t == NULL) return NULL; for (;;) { ValueStack* tc = t->caller_state(); if (tc == NULL) return s; t = tc; bci_result = tc->bci(); s = s->caller_state(); } } void LIR_Assembler::<API key>() { int pc_offset = <API key>; ValueStack* vstack = debug_info(<API key>); int bci = vstack->bci(); <API key>* debug_info = compilation()->debug_info_recorder(); assert(debug_info-><API key>(), "sanity"); debug_info->add_non_safepoint(pc_offset); // Visit scopes from oldest to youngest. for (int n = 0; ; n++) { int s_bci = bci; ValueStack* s = nth_oldest(vstack, n, s_bci); if (s == NULL) break; IRScope* scope = s->scope(); //Always pass false for reexecute since these ScopeDescs are never used for deopt methodHandle null_mh; debug_info->describe_scope(pc_offset, null_mh, scope->method(), s->bci(), false/*reexecute*/); } debug_info->end_non_safepoint(pc_offset); } <API key>* LIR_Assembler::<API key>(CodeEmitInfo* cinfo) { return <API key>(code_offset(), cinfo); } <API key>* LIR_Assembler::<API key>(int pc_offset, CodeEmitInfo* cinfo) { <API key>* stub = new <API key>(pc_offset, cinfo); append_code_stub(stub); return stub; } void LIR_Assembler::<API key>(CodeEmitInfo* info) { <API key>(code_offset(), info); } void LIR_Assembler::<API key>(int pc_offset, CodeEmitInfo* cinfo) { DivByZeroStub* stub = new DivByZeroStub(pc_offset, cinfo); append_code_stub(stub); } void LIR_Assembler::emit_rtcall(LIR_OpRTCall* op) { rt_call(op->result_opr(), op->addr(), op->arguments(), op->tmp(), op->info()); } void LIR_Assembler::emit_call(LIR_OpJavaCall* op) { verify_oop_map(op->info()); if (os::is_MP()) { // must align calls sites, otherwise they can't be updated atomically on MP hardware align_call(op->code()); } // emit the static call stub stuff out of line <API key>(); CHECK_BAILOUT(); switch (op->code()) { case lir_static_call: case lir_dynamic_call: call(op, relocInfo::static_call_type); break; case lir_optvirtual_call: call(op, relocInfo::<API key>); break; case lir_icvirtual_call: ic_call(op); break; case lir_virtual_call: vtable_call(op); break; default: fatal("unexpected op code: %s", op->name()); break; } // JSR 292 // Record if this method has MethodHandle invokes. if (op-><API key>()) { compilation()-><API key>(true); } #if defined(X86) && defined(TIERED) // C2 leave fpu stack dirty clean it if (UseSSE < 2) { int i; for ( i = 1; i <= 7 ; i++ ) { ffree(i); } if (!op->result_opr()->is_float_kind()) { ffree(0); } } #endif // X86 && TIERED } void LIR_Assembler::emit_opLabel(LIR_OpLabel* op) { _masm->bind (*(op->label())); } void LIR_Assembler::emit_op1(LIR_Op1* op) { switch (op->code()) { case lir_move: if (op->move_kind() == lir_move_volatile) { assert(op->patch_code() == lir_patch_none, "can't patch volatiles"); volatile_move_op(op->in_opr(), op->result_opr(), op->type(), op->info()); } else { move_op(op->in_opr(), op->result_opr(), op->type(), op->patch_code(), op->info(), op->pop_fpu_stack(), op->move_kind() == lir_move_unaligned, op->move_kind() == lir_move_wide); } break; case lir_roundfp: { LIR_OpRoundFP* round_op = op->as_OpRoundFP(); roundfp_op(round_op->in_opr(), round_op->tmp(), round_op->result_opr(), round_op->pop_fpu_stack()); break; } case lir_return: return_op(op->in_opr()); break; case lir_safepoint: if (compilation()->debug_info_recorder()->last_pc_offset() == code_offset()) { _masm->nop(); } safepoint_poll(op->in_opr(), op->info()); break; case lir_fxch: fxch(op->in_opr()->as_jint()); break; case lir_fld: fld(op->in_opr()->as_jint()); break; case lir_ffree: ffree(op->in_opr()->as_jint()); break; case lir_branch: break; case lir_push: push(op->in_opr()); break; case lir_pop: pop(op->in_opr()); break; case lir_neg: negate(op->in_opr(), op->result_opr()); break; case lir_leal: leal(op->in_opr(), op->result_opr()); break; case lir_null_check: if (<API key>) { <API key>* stub = <API key>(op->info()); if (op->in_opr()->is_single_cpu()) { _masm->null_check(op->in_opr()->as_register(), stub->entry()); } else { Unimplemented(); } } break; case lir_monaddr: monitor_address(op->in_opr()->as_constant_ptr()->as_jint(), op->result_opr()); break; #ifdef SPARC case lir_pack64: pack64(op->in_opr(), op->result_opr()); break; case lir_unpack64: unpack64(op->in_opr(), op->result_opr()); break; #endif case lir_unwind: unwind_op(op->in_opr()); break; default: Unimplemented(); break; } } void LIR_Assembler::emit_op0(LIR_Op0* op) { switch (op->code()) { case lir_word_align: { _masm->align(BytesPerWord); break; } case lir_nop: assert(op->info() == NULL, "not supported"); _masm->nop(); break; case lir_label: Unimplemented(); break; case lir_build_frame: build_frame(); break; case lir_std_entry: // init offsets offsets()->set_value(CodeOffsets::OSR_Entry, _masm->offset()); _masm->align(CodeEntryAlignment); if (needs_icache(compilation()->method())) { check_icache(); } offsets()->set_value(CodeOffsets::Verified_Entry, _masm->offset()); _masm->verified_entry(); build_frame(); offsets()->set_value(CodeOffsets::Frame_Complete, _masm->offset()); break; case lir_osr_entry: offsets()->set_value(CodeOffsets::OSR_Entry, _masm->offset()); osr_entry(); break; case lir_24bit_FPU: set_24bit_FPU(); break; case lir_reset_FPU: reset_FPU(); break; case lir_breakpoint: breakpoint(); break; case lir_fpop_raw: fpop(); break; case lir_membar: membar(); break; case lir_membar_acquire: membar_acquire(); break; case lir_membar_release: membar_release(); break; case lir_membar_loadload: membar_loadload(); break; case <API key>: membar_storestore(); break; case <API key>: membar_loadstore(); break; case <API key>: membar_storeload(); break; case lir_get_thread: get_thread(op->result_opr()); break; default: ShouldNotReachHere(); break; } } void LIR_Assembler::emit_op2(LIR_Op2* op) { switch (op->code()) { case lir_cmp: if (op->info() != NULL) { assert(op->in_opr1()->is_address() || op->in_opr2()->is_address(), "shouldn't be codeemitinfo for non-address operands"); <API key>(op->info()); // exception possible } comp_op(op->condition(), op->in_opr1(), op->in_opr2(), op); break; case lir_cmp_l2i: case lir_cmp_fd2i: case lir_ucmp_fd2i: comp_fl2i(op->code(), op->in_opr1(), op->in_opr2(), op->result_opr(), op); break; case lir_cmove: cmove(op->condition(), op->in_opr1(), op->in_opr2(), op->result_opr(), op->type()); break; case lir_shl: case lir_shr: case lir_ushr: if (op->in_opr2()->is_constant()) { shift_op(op->code(), op->in_opr1(), op->in_opr2()->as_constant_ptr()->as_jint(), op->result_opr()); } else { shift_op(op->code(), op->in_opr1(), op->in_opr2(), op->result_opr(), op->tmp1_opr()); } break; case lir_add: case lir_sub: case lir_mul: case lir_mul_strictfp: case lir_div: case lir_div_strictfp: case lir_rem: assert(op->fpu_pop_count() < 2, ""); arith_op( op->code(), op->in_opr1(), op->in_opr2(), op->result_opr(), op->info(), op->fpu_pop_count() == 1); break; case lir_abs: case lir_sqrt: case lir_sin: case lir_tan: case lir_cos: case lir_log10: case lir_pow: intrinsic_op(op->code(), op->in_opr1(), op->in_opr2(), op->result_opr(), op); break; case lir_logic_and: case lir_logic_or: case lir_logic_xor: logic_op( op->code(), op->in_opr1(), op->in_opr2(), op->result_opr()); break; case lir_throw: throw_op(op->in_opr1(), op->in_opr2(), op->info()); break; case lir_xadd: case lir_xchg: atomic_op(op->code(), op->in_opr1(), op->in_opr2(), op->result_opr(), op->tmp1_opr()); break; default: Unimplemented(); break; } } void LIR_Assembler::build_frame() { _masm->build_frame(<API key>(), bang_size_in_bytes()); } void LIR_Assembler::roundfp_op(LIR_Opr src, LIR_Opr tmp, LIR_Opr dest, bool pop_fpu_stack) { assert((src->is_single_fpu() && dest->is_single_stack()) || (src->is_double_fpu() && dest->is_double_stack()), "round_fp: rounds register -> stack location"); reg2stack (src, dest, src->type(), pop_fpu_stack); } void LIR_Assembler::move_op(LIR_Opr src, LIR_Opr dest, BasicType type, LIR_PatchCode patch_code, CodeEmitInfo* info, bool pop_fpu_stack, bool unaligned, bool wide) { if (src->is_register()) { if (dest->is_register()) { assert(patch_code == lir_patch_none && info == NULL, "no patching and info allowed here"); reg2reg(src, dest); } else if (dest->is_stack()) { assert(patch_code == lir_patch_none && info == NULL, "no patching and info allowed here"); reg2stack(src, dest, type, pop_fpu_stack); } else if (dest->is_address()) { reg2mem(src, dest, type, patch_code, info, pop_fpu_stack, wide, unaligned); } else { ShouldNotReachHere(); } } else if (src->is_stack()) { assert(patch_code == lir_patch_none && info == NULL, "no patching and info allowed here"); if (dest->is_register()) { stack2reg(src, dest, type); } else if (dest->is_stack()) { stack2stack(src, dest, type); } else { ShouldNotReachHere(); } } else if (src->is_constant()) { if (dest->is_register()) { const2reg(src, dest, patch_code, info); // patching is possible } else if (dest->is_stack()) { assert(patch_code == lir_patch_none && info == NULL, "no patching and info allowed here"); const2stack(src, dest); } else if (dest->is_address()) { assert(patch_code == lir_patch_none, "no patching allowed here"); const2mem(src, dest, type, info, wide); } else { ShouldNotReachHere(); } } else if (src->is_address()) { mem2reg(src, dest, type, patch_code, info, wide, unaligned); } else { ShouldNotReachHere(); } } void LIR_Assembler::verify_oop_map(CodeEmitInfo* info) { #ifndef PRODUCT if (VerifyOops) { OopMapStream s(info->oop_map()); while (!s.is_done()) { OopMapValue v = s.current(); if (v.is_oop()) { VMReg r = v.reg(); if (!r->is_stack()) { stringStream st; st.print("bad oop %s at %d", r->as_Register()->name(), _masm->offset()); #ifdef SPARC _masm->_verify_oop(r->as_Register(), os::strdup(st.as_string(), mtCompiler), __FILE__, __LINE__); #else _masm->verify_oop(r->as_Register()); #endif } else { _masm->verify_stack_oop(r->reg2stack() * VMRegImpl::stack_slot_size); } } check_codespace(); CHECK_BAILOUT(); s.next(); } } #endif }
-- Unban a player banned with Punkbuster. -- From kmod script. -- params is parameters passed from et_ClientCommand function. -- * params["arg1"] => guid function execute_command(params) params.say = "chat" if params.nbArg < 2 then printCmdMsg(params, "Useage: unban [guid]\n") else if tonumber(et.trap_Cvar_Get("sv_punkbuster")) == 1 then et.<API key>( et.EXEC_APPEND, "pb_sv_unbanguid " .. params["arg1"] .. "\n" ) et.<API key>( et.EXEC_APPEND, "pb_sv_UpdBanFile\n" ) params.<API key> = true params.noDisplayCmd = true printCmdMsg( params, client[clientNum]["name"] .. " have been unbanned\n" ) else printCmdMsg( params, "Cannot unban with Punkbuster (Punkbuster is disable).\n" ) end end return 1 end
define(function () { return { customerAccount: ['<API key>', function (<API key>) { return <API key>.getCurrent(); }] }; });
<ul class="lang-switch nav navbar-nav navbar-right"> <li role="heading"><span class="nav-plain-text">Language:</span></li> <li><a {% if page.lang contains 'en' %} class="active-lang"{% endif %} href=" {% if page.url contains '/fr' %}{{ page.url | remove_first:'/fr' }} {% elsif page.url contains '/es' %}{{ page.url | remove_first:'/es' }} {% else %}{{ page.url }} {% endif %}" title="English">En</a></li> <li><a {% if page.lang contains 'fr' %} class="active-lang"{% endif %} href=" {% if page.url contains '/fr' %}{{ page.url }} {% elsif page.url contains '/es' %}{{ page.url | replace_first:'/es','/fr' }} {% else %}{{ page.url | prepend:'/fr' }} {% endif %}" title="French">Fr</a></li> <li><a {% if page.lang contains 'es' %} class="active-lang"{% endif %} href=" {% if page.url contains '/es' %}{{ page.url }} {% elsif page.url contains '/fr' %}{{ page.url | replace_first:'/fr','/es' }} {% else %}{{ page.url | prepend:'/es' }} {% endif %}" title="Spanish">Es</a></li> </ul>
#include "array" #include "cmath" #include "cstdlib" #include "iostream" #include "limits" #include "cubature.h" bool good_solution( const double integral, const double exact, const double max_relative_error ) { if ( std::fabs(integral - exact) > max_relative_error * std::max(std::fabs(integral), std::fabs(exact)) ) { return false; } return true; } int main() { constexpr double <API key> = 1e-9; // integration range const std::array<double, 3> start{1, 1, 1}, end{2, 2, 2}; double integral, error, exact; /* Returns x*y^2*z^3. In dimension(s) over which pcubature is integrating, x, y or z are given by r, the rest are given in extra_data. Format of extra_data: std::pair<std::array<size_t, 3>, std::array<double, 3>>. size_t tells the index of the dimension over which integration over Nth dimension in r actually goes. The first r_dims of size_t's contain valid data. For the rest the corresponding double contains the coordinate at which to integrate over the rest of dimensions of r. For example when integrating x and z from 0 to 1 with y == -2 integrand could be called by cubature as (999's mark unused data): f = integrand( 2, std::array<double, 2>{0, 0}.data(), std::pair< std::array<size_t, 3>, std::array<double, 3> >{{0, 2, 999}, {999, -2, 999}}.data(), 1, ret_val.data() ); and when integrating y from -2 to -1 with x == 0.5 and z == 2/3: f = integrand( 1, std::array<double, 1>{-2}.data(), std::pair< std::array<size_t, 3>, std::array<double, 3> >{{1, 999, 999}, {0.5, 999, 2/3}}.data(), 1, ret_val.data() ); */ auto integrand = []( unsigned r_dims, const double* r, void* extra_data, unsigned f_dims, double* f ) { if (r_dims == 0) { return -1; } if (f_dims != 1) { return -2; } if (r == NULL) { std::cerr << __FILE__ << "(" << __LINE__ << ")" << std::endl; abort(); } if (f == NULL) { std::cerr << __FILE__ << "(" << __LINE__ << ")" << std::endl; abort(); } if (extra_data == NULL) { std::cerr << __FILE__ << "(" << __LINE__ << ")" << std::endl; abort(); } const auto integration_info = *static_cast< std::pair< std::array<size_t, 3>, std::array<double, 3> >* >(extra_data); std::array<double, 3> real_r = integration_info.second; for (size_t i = 0; i < r_dims; i++) { if (integration_info.first[i] > 3) { std::cerr << __FILE__ << "(" << __LINE__ << ")" << std::endl; abort(); } real_r[integration_info.first[i]] = *(r + i); } *f = std::pow(real_r[0], 1) * std::pow(real_r[1], 2) * std::pow(real_r[2], 3); return 0; }; std::pair<std::array<size_t, 3>, std::array<double, 3>> <API key>; // 1d over x at y == 3/2 and z == 3/2 exact = std::pow(3./2., 6); <API key>.first[0] = 0; <API key>.first[1] = 999; <API key>.first[2] = 999; <API key>.second[0] = 999; <API key>.second[1] = 3.0 / 2.0; <API key>.second[2] = 3.0 / 2.0; if ( pcubature( 1, integrand, &<API key>, 1, start.data(), end.data(), 0, 0, 1e-3, ERROR_LINF, &integral, &error ) != 0 ) { std::cerr << __FILE__ << "(" << __LINE__ << ")" << std::endl; abort(); } if (not good_solution(integral, exact, <API key>)) { std::cerr << __FILE__ << "(" << __LINE__ << "): " << "Too large relative error when integrating from " << start[0] << " to " << end[0] << ", exact: " << exact << ", numerical: " << integral << std::endl; abort(); } // 2d over y and z at x == 3/2 exact = 105.0 / 8.0; <API key>.first[0] = 1; <API key>.first[1] = 2; <API key>.first[2] = 999; <API key>.second[0] = 3.0 / 2.0; <API key>.second[1] = 999; <API key>.second[2] = 999; if ( pcubature( 1, integrand, &<API key>, 2, start.data(), end.data(), 0, 0, 1e-3, ERROR_LINF, &integral, &error ) != 0 ) { std::cerr << __FILE__ << "(" << __LINE__ << ")" << std::endl; abort(); } if (not good_solution(integral, exact, <API key>)) { std::cerr << __FILE__ << "(" << __LINE__ << "): " << "Too large relative error when integrating from " << start[1] << "," << start[2] << " to " << end[1] << "," << end[2] << ", exact: " << exact << ", numerical: " << integral << std::endl; abort(); } // integrate over the edges of the unit cube from start to end std::array< std::pair< // exact value for below integration parameters double, // same as in <API key> std::pair< std::array<size_t, 3>, std::array<double, 3> > >, 12 > <API key>{{ // over x at min y, min z {3.0 / 2.0, {{0, 999, 999}, {999, 1, 1}}}, // x at min y, max z {12, {{0, 999, 999}, {999, 1, 2}}}, // x at max y, min z {6, {{0, 999, 999}, {999, 2, 1}}}, // x at max y, max z {48, {{0, 999, 999}, {999, 2, 2}}}, // over y at min x, min z {7.0 / 3.0, {{1, 999, 999}, {1, 999, 1}}}, // y at min x, max z {56.0 / 3.0, {{1, 999, 999}, {1, 999, 2}}}, // y at max y, min z {14.0 / 3.0, {{1, 999, 999}, {2, 999, 1}}}, // y at max x, max z {112.0 / 3.0, {{1, 999, 999}, {2, 999, 2}}}, // over z at min x, min y {15.0 / 4.0, {{2, 999, 999}, {1, 1, 999}}}, // z at min x, max y {15, {{2, 999, 999}, {1, 2, 999}}}, // z at max x, min y {15.0 / 2.0, {{2, 999, 999}, {2, 1, 999}}}, // z at max x, max y {30, {{2, 999, 999}, {2, 2, 999}}} }}; for (auto& info: <API key>) { const double exact = info.first; if ( pcubature( 1, integrand, &info.second, 1, start.data(), end.data(), 0, 0, 1e-3, ERROR_LINF, &integral, &error ) != 0 ) { std::cerr << __FILE__ << "(" << __LINE__ << ")" << std::endl; abort(); } if (not good_solution(integral, exact, <API key>)) { std::cerr << __FILE__ << "(" << __LINE__ << "): " << "Too large relative error, exact: " << exact << ", numerical: " << integral << std::endl; abort(); } } // integrate over the faces of the unit cube from start to end std::array< std::pair< double, std::pair< std::array<size_t, 3>, std::array<double, 3> > >, 6 > <API key>{{ // over x and y at min z {7.0 / 2.0, {{0, 1, 999}, {999, 999, 1}}}, // x, y at max z {28, {{0, 1, 999}, {999, 999, 2}}}, // x, z at min y {45.0 / 8.0, {{0, 2, 999}, {999, 1, 999}}}, // x, z at max y {45.0 / 2.0, {{0, 2, 999}, {999, 2, 999}}}, // y, z at min x {35.0 / 4.0, {{1, 2, 999}, {1, 999, 999}}}, // y, z at max x {35.0 / 2.0, {{1, 2, 999}, {2, 999, 999}}} }}; for (auto& info: <API key>) { const double exact = info.first; if ( pcubature( 1, integrand, &info.second, 2, start.data(), end.data(), 0, 0, 1e-3, ERROR_LINF, &integral, &error ) != 0 ) { std::cerr << __FILE__ << "(" << __LINE__ << ")" << std::endl; abort(); } if (not good_solution(integral, exact, <API key>)) { std::cerr << __FILE__ << "(" << __LINE__ << "): " << "Too large relative error, exact: " << exact << ", numerical: " << integral << std::endl; abort(); } } return EXIT_SUCCESS; }
#ifndef _LINUX_JBD2_H #define _LINUX_JBD2_H /* Allow this file to be included directly into e2fsprogs */ #ifndef __KERNEL__ #include "jfs_compat.h" #define JBD2_DEBUG #define jfs_debug jbd_debug #else #include <linux/types.h> #include <linux/buffer_head.h> #include <linux/journal-head.h> #include <linux/stddef.h> #include <linux/bit_spinlock.h> #include <linux/mutex.h> #include <linux/timer.h> #endif #define journal_oom_retry 1 /* * Define <API key> to cause a kernel BUG() if ext4 finds * certain classes of error which can occur due to failed IOs. Under * normal use we want ext4 to continue after such errors, because * hardware _can_ fail, but for debugging purposes when running tests on * known-good hardware we may want to trap these errors. */ #undef <API key> /* * The default maximum commit age, in seconds. */ #define <API key> 5 #ifdef CONFIG_JBD2_DEBUG /* * Define <API key> to enable more expensive internal * consistency checks. By default we don't do this unless * CONFIG_JBD2_DEBUG is on. */ #define <API key> extern u8 <API key>; #define jbd_debug(n, f, a...) \ do { \ if ((n) <= <API key>) { \ printk (KERN_DEBUG "(%s, %d): %s: ", \ __FILE__, __LINE__, __FUNCTION__); \ printk (f, } \ } while (0) #else #define jbd_debug(f, a...) #endif static inline void *jbd2_alloc(size_t size, gfp_t flags) { return (void *)__get_free_pages(flags, get_order(size)); } static inline void jbd2_free(void *ptr, size_t size) { free_pages((unsigned long)ptr, get_order(size)); }; #define <API key> 1024 #ifdef __KERNEL__ typedef struct handle_s handle_t; /* Atomic operation type */ /** * typedef journal_t - The journal_t maintains all of the journaling state information for a single filesystem. * * journal_t is linked to from the fs superblock structure. * * We use the journal_t to keep track of all outstanding transaction * activity on the filesystem, and to manage the state of the log * writing process. * * This is an opaque datatype. **/ typedef struct journal_s journal_t; /* Journal control structure */ #endif /* * Internal structures used by the logging mechanism: */ #define JBD2_MAGIC_NUMBER 0xc03b3998U /* The first 4 bytes of /dev/random! */ /* * On-disk structures */ /* * Descriptor block types: */ #define <API key> 1 #define JBD2_COMMIT_BLOCK 2 #define JBD2_SUPERBLOCK_V1 3 #define JBD2_SUPERBLOCK_V2 4 #define JBD2_REVOKE_BLOCK 5 /* * Standard header for all descriptor blocks: */ typedef struct journal_header_s { __be32 h_magic; __be32 h_blocktype; __be32 h_sequence; } journal_header_t; /* * Checksum types. */ #define JBD2_CRC32_CHKSUM 1 #define JBD2_MD5_CHKSUM 2 #define JBD2_SHA1_CHKSUM 3 #define <API key> 4 #define JBD2_CHECKSUM_BYTES (32 / sizeof(u32)) /* * Commit block header for storing transactional checksums: */ struct commit_header { __be32 h_magic; __be32 h_blocktype; __be32 h_sequence; unsigned char h_chksum_type; unsigned char h_chksum_size; unsigned char h_padding[2]; __be32 h_chksum[JBD2_CHECKSUM_BYTES]; __be64 h_commit_sec; __be32 h_commit_nsec; }; /* * The block tag: used to describe a single buffer in the journal. * t_blocknr_high is only used if INCOMPAT_64BIT is set, so this * raw struct shouldn't be used for pointer math or sizeof() - use * journal_tag_bytes(journal) instead to compute this. */ typedef struct journal_block_tag_s { __be32 t_blocknr; /* The on-disk block number */ __be32 t_flags; /* See below */ __be32 t_blocknr_high; /* most-significant high 32bits. */ } journal_block_tag_t; #define JBD2_TAG_SIZE32 (offsetof(journal_block_tag_t, t_blocknr_high)) #define JBD2_TAG_SIZE64 (sizeof(journal_block_tag_t)) /* * The revoke descriptor: used on disk to describe a series of blocks to * be revoked from the log */ typedef struct <API key> { journal_header_t r_header; __be32 r_count; /* Count of bytes used in the block */ } <API key>; /* Definitions for the journal tag flags word: */ #define JBD2_FLAG_ESCAPE 1 /* on-disk block is escaped */ #define JBD2_FLAG_SAME_UUID 2 /* block has same uuid as previous */ #define JBD2_FLAG_DELETED 4 /* block deleted by this transaction */ #define JBD2_FLAG_LAST_TAG 8 /* last tag in this descriptor block */ /* * The journal superblock. All fields are in big-endian byte order. */ typedef struct <API key> { /* 0x0000 */ journal_header_t s_header; /* 0x000C */ /* Static information describing the journal */ __be32 s_blocksize; /* journal device blocksize */ __be32 s_maxlen; /* total blocks in journal file */ __be32 s_first; /* first block of log information */ /* 0x0018 */ /* Dynamic information describing the current state of the log */ __be32 s_sequence; /* first commit ID expected in log */ __be32 s_start; /* blocknr of start of log */ /* 0x0020 */ /* Error value, as set by jbd2_journal_abort(). */ __be32 s_errno; /* 0x0024 */ /* Remaining fields are only valid in a version-2 superblock */ __be32 s_feature_compat; /* compatible feature set */ __be32 s_feature_incompat; /* incompatible feature set */ __be32 s_feature_ro_compat; /* readonly-compatible feature set */ /* 0x0030 */ __u8 s_uuid[16]; /* 128-bit uuid for journal */ /* 0x0040 */ __be32 s_nr_users; /* Nr of filesystems sharing log */ __be32 s_dynsuper; /* Blocknr of dynamic superblock copy*/ /* 0x0048 */ __be32 s_max_transaction; /* Limit of journal blocks per trans.*/ __be32 s_max_trans_data; /* Limit of data blocks per trans. */ /* 0x0050 */ __u32 s_padding[44]; /* 0x0100 */ __u8 s_users[16*48]; /* ids of all fs'es sharing the log */ /* 0x0400 */ } <API key>; #define <API key>(j,mask) \ ((j)->j_format_version >= 2 && \ ((j)->j_superblock->s_feature_compat & cpu_to_be32((mask)))) #define <API key>(j,mask) \ ((j)->j_format_version >= 2 && \ ((j)->j_superblock->s_feature_ro_compat & cpu_to_be32((mask)))) #define <API key>(j,mask) \ ((j)->j_format_version >= 2 && \ ((j)->j_superblock->s_feature_incompat & cpu_to_be32((mask)))) #define <API key> 0x00000001 #define <API key> 0x00000001 #define <API key> 0x00000002 #define <API key> 0x00000004 #define <API key> <API key> #define <API key> 0 #define <API key> (<API key> | \ <API key> | \ <API key>) #ifdef __KERNEL__ #include <linux/fs.h> #include <linux/sched.h> #define J_ASSERT(assert) BUG_ON(!(assert)) #if defined(CONFIG_BUFFER_DEBUG) void <API key>(struct buffer_head *bh); #define J_ASSERT_BH(bh, expr) \ do { \ if (!(expr)) \ <API key>(bh); \ J_ASSERT(expr); \ } while (0) #define J_ASSERT_JH(jh, expr) J_ASSERT_BH(jh2bh(jh), expr) #else #define J_ASSERT_BH(bh, expr) J_ASSERT(expr) #define J_ASSERT_JH(jh, expr) J_ASSERT(expr) #endif #if defined(<API key>) #define J_EXPECT(expr, why...) J_ASSERT(expr) #define J_EXPECT_BH(bh, expr, why...) J_ASSERT_BH(bh, expr) #define J_EXPECT_JH(jh, expr, why...) J_ASSERT_JH(jh, expr) #else #define __journal_expect(expr, why...) \ ({ \ int val = (expr); \ if (!val) { \ printk(KERN_ERR \ "EXT3-fs unexpected failure: %s;\n",# expr); \ printk(KERN_ERR why "\n"); \ } \ val; \ }) #define J_EXPECT(expr, why...) __journal_expect(expr, ## why) #define J_EXPECT_BH(bh, expr, why...) __journal_expect(expr, ## why) #define J_EXPECT_JH(jh, expr, why...) __journal_expect(expr, ## why) #endif enum jbd_state_bits { BH_JBD /* Has an attached ext3 journal_head */ = BH_PrivateStart, BH_JWrite, /* Being written to log (@@@ DEBUGGING) */ BH_Freed, /* Has been freed (truncated) */ BH_Revoked, /* Has been revoked from the log */ BH_RevokeValid, /* Revoked flag is valid */ BH_JBDDirty, /* Is dirty but journaled */ BH_State, /* Pins most journal_head state */ BH_JournalHead, /* Pins bh->b_private and jh->b_bh */ BH_Unshadow, /* Dummy bit, for BJ_Shadow wakeup filtering */ }; BUFFER_FNS(JBD, jbd) BUFFER_FNS(JWrite, jwrite) BUFFER_FNS(JBDDirty, jbddirty) TAS_BUFFER_FNS(JBDDirty, jbddirty) BUFFER_FNS(Revoked, revoked) TAS_BUFFER_FNS(Revoked, revoked) BUFFER_FNS(RevokeValid, revokevalid) TAS_BUFFER_FNS(RevokeValid, revokevalid) BUFFER_FNS(Freed, freed) static inline struct buffer_head *jh2bh(struct journal_head *jh) { return jh->b_bh; } static inline struct journal_head *bh2jh(struct buffer_head *bh) { return bh->b_private; } static inline void jbd_lock_bh_state(struct buffer_head *bh) { bit_spin_lock(BH_State, &bh->b_state); } static inline int <API key>(struct buffer_head *bh) { return bit_spin_trylock(BH_State, &bh->b_state); } static inline int <API key>(struct buffer_head *bh) { return bit_spin_is_locked(BH_State, &bh->b_state); } static inline void jbd_unlock_bh_state(struct buffer_head *bh) { bit_spin_unlock(BH_State, &bh->b_state); } static inline void <API key>(struct buffer_head *bh) { bit_spin_lock(BH_JournalHead, &bh->b_state); } static inline void <API key>(struct buffer_head *bh) { bit_spin_unlock(BH_JournalHead, &bh->b_state); } /* Flags in jbd_inode->i_flags */ #define __JI_COMMIT_RUNNING 0 /* Commit of the inode data in progress. We use this flag to protect us from * concurrent deletion of inode. We cannot use reference to inode for this * since we cannot afford doing last iput() on behalf of kjournald */ #define JI_COMMIT_RUNNING (1 << __JI_COMMIT_RUNNING) /** * struct jbd_inode is the structure linking inodes in ordered mode * present in a transaction so that we can sync them during commit. */ struct jbd2_inode { /* Which transaction does this inode belong to? Either the running * transaction or the committing one. [j_list_lock] */ transaction_t *i_transaction; /* Pointer to the running transaction modifying inode's data in case * there is already a committing transaction touching it. [j_list_lock] */ transaction_t *i_next_transaction; /* List of inodes in the i_transaction [j_list_lock] */ struct list_head i_list; /* VFS inode this inode belongs to [constant during the lifetime * of the structure] */ struct inode *i_vfs_inode; /* Flags of inode [j_list_lock] */ unsigned int i_flags; }; struct jbd2_revoke_table_s; /** * struct handle_s - The handle_s type is the concrete type associated with * handle_t. * @h_transaction: Which compound transaction is this update a part of? * @h_buffer_credits: Number of remaining buffers we are allowed to dirty. * @h_ref: Reference count on this handle * @h_err: Field for caller's use to track errors through large fs operations * @h_sync: flag for sync-on-close * @h_jdata: flag to force data journaling * @h_aborted: flag indicating fatal error on handle **/ /* Docbook can't yet cope with the bit fields, but will leave the documentation * in so it can be fixed later. */ struct handle_s { /* Which compound transaction is this update a part of? */ transaction_t *h_transaction; /* Number of remaining buffers we are allowed to dirty: */ int h_buffer_credits; /* Reference count on this handle */ int h_ref; /* Field for caller's use to track errors through large fs */ /* operations */ int h_err; /* Flags [no locking] */ unsigned int h_sync: 1; /* sync-on-close */ unsigned int h_jdata: 1; /* force data journaling */ unsigned int h_aborted: 1; /* fatal error on handle */ #ifdef <API key> struct lockdep_map h_lockdep_map; #endif }; /* * Some stats for checkpoint phase */ struct <API key> { unsigned long cs_chp_time; unsigned long cs_forced_to_close; unsigned long cs_written; unsigned long cs_dropped; }; /* * Lock ranking: * * j_list_lock * -><API key>() (This is "innermost") * * j_state_lock * ->jbd_lock_bh_state() * * jbd_lock_bh_state() * ->j_list_lock * * j_state_lock * ->t_handle_lock * * j_state_lock * ->j_list_lock (<API key>) * */ struct transaction_s { /* Pointer to the journal for this transaction. [no locking] */ journal_t *t_journal; /* Sequence number for this transaction [no locking] */ tid_t t_tid; /* * Transaction's current state * [no locking - only kjournald2 alters this] * [j_list_lock] guards transition of a transaction into T_FINISHED * state and subsequent call of <API key>() * FIXME: needs barriers * KLUDGE: [use j_state_lock] */ enum { T_RUNNING, T_LOCKED, T_RUNDOWN, T_FLUSH, T_COMMIT, T_FINISHED } t_state; /* * Where in the log does this transaction's commit start? [no locking] */ unsigned long t_log_start; /* Number of buffers on the t_buffers list [j_list_lock] */ int t_nr_buffers; struct journal_head *t_reserved_list; /* * Doubly-linked circular list of all metadata buffers owned by this * transaction [j_list_lock] */ struct journal_head *t_buffers; /* * Doubly-linked circular list of all forget buffers (superseded * buffers which we can un-checkpoint once this transaction commits) * [j_list_lock] */ struct journal_head *t_forget; /* * Doubly-linked circular list of all buffers still to be flushed before * this transaction can be checkpointed. [j_list_lock] */ struct journal_head *t_checkpoint_list; /* * Doubly-linked circular list of all buffers submitted for IO while * checkpointing. [j_list_lock] */ struct journal_head *<API key>; /* * Doubly-linked circular list of temporary buffers currently undergoing * IO in the log [j_list_lock] */ struct journal_head *t_iobuf_list; /* * Doubly-linked circular list of metadata buffers being shadowed by log * IO. The IO buffers on the iobuf list and the shadow buffers on this * list match each other one for one at all times. [j_list_lock] */ struct journal_head *t_shadow_list; /* * Doubly-linked circular list of control buffers being written to the * log. [j_list_lock] */ struct journal_head *t_log_list; /* * List of inodes whose data we've modified in data=ordered mode. * [j_list_lock] */ struct list_head t_inode_list; /* * Protects info related to handles */ spinlock_t t_handle_lock; /* * Longest time some handle had to wait for running transaction */ unsigned long t_max_wait; /* * When transaction started */ unsigned long t_start; /* * Checkpointing stats [j_checkpoint_sem] */ struct <API key> t_chp_stats; /* * Number of outstanding updates running on this transaction * [t_handle_lock] */ int t_updates; /* * Number of buffers reserved for use by all handles in this transaction * handle but not yet modified. [t_handle_lock] */ int <API key>; /* * Forward and backward links for the circular list of all transactions * awaiting checkpoint. [j_list_lock] */ transaction_t *t_cpnext, *t_cpprev; /* * When will the transaction expire (become due for commit), in jiffies? * [no locking] */ unsigned long t_expires; /* * How many handles used this transaction? [t_handle_lock] */ int t_handle_count; }; struct <API key> { unsigned long rs_wait; unsigned long rs_running; unsigned long rs_locked; unsigned long rs_flushing; unsigned long rs_logging; unsigned long rs_handle_count; unsigned long rs_blocks; unsigned long rs_blocks_logged; }; struct transaction_stats_s { int ts_type; unsigned long ts_tid; union { struct <API key> run; struct <API key> chp; } u; }; #define JBD2_STATS_RUN 1 #define <API key> 2 static inline unsigned long jbd2_time_diff(unsigned long start, unsigned long end) { if (end >= start) return end - start; return end + (MAX_JIFFY_OFFSET - start); } struct journal_s { /* General journaling state flags [j_state_lock] */ unsigned long j_flags; /* * Is there an outstanding uncleared error on the journal (from a prior * abort)? [j_state_lock] */ int j_errno; /* The superblock buffer */ struct buffer_head *j_sb_buffer; <API key> *j_superblock; /* Version of the superblock format */ int j_format_version; /* * Protect the various scalars in the journal */ spinlock_t j_state_lock; /* * Number of processes waiting to create a barrier lock [j_state_lock] */ int j_barrier_count; /* The barrier lock itself */ struct mutex j_barrier; /* * Transactions: The current running transaction... * [j_state_lock] [caller holding open handle] */ transaction_t *<API key>; /* * the transaction we are pushing to disk * [j_state_lock] [caller holding open handle] */ transaction_t *<API key>; /* * ... and a linked circular list of all transactions waiting for * checkpointing. [j_list_lock] */ transaction_t *<API key>; /* * Wait queue for waiting for a locked transaction to start committing, * or for a barrier lock to be released */ wait_queue_head_t <API key>; /* Wait queue for waiting for checkpointing to complete */ wait_queue_head_t j_wait_logspace; /* Wait queue for waiting for commit to complete */ wait_queue_head_t j_wait_done_commit; /* Wait queue to trigger checkpointing */ wait_queue_head_t j_wait_checkpoint; /* Wait queue to trigger commit */ wait_queue_head_t j_wait_commit; /* Wait queue to wait for updates to complete */ wait_queue_head_t j_wait_updates; /* Semaphore for locking against concurrent checkpoints */ struct mutex j_checkpoint_mutex; /* * Journal head: identifies the first unused block in the journal. * [j_state_lock] */ unsigned long j_head; /* * Journal tail: identifies the oldest still-used block in the journal. * [j_state_lock] */ unsigned long j_tail; /* * Journal free: how many free blocks are there in the journal? * [j_state_lock] */ unsigned long j_free; /* * Journal start and end: the block numbers of the first usable block * and one beyond the last usable block in the journal. [j_state_lock] */ unsigned long j_first; unsigned long j_last; /* * Device, blocksize and starting block offset for the location where we * store the journal. */ struct block_device *j_dev; int j_blocksize; unsigned long long j_blk_offset; char j_devname[BDEVNAME_SIZE+24]; /* * Device which holds the client fs. For internal journal this will be * equal to j_dev. */ struct block_device *j_fs_dev; /* Total maximum capacity of the journal region on disk. */ unsigned int j_maxlen; /* * Protects the buffer lists and internal buffer state. */ spinlock_t j_list_lock; /* Optional inode where we store the journal. If present, all */ /* journal block numbers are mapped into this inode via */ /* bmap(). */ struct inode *j_inode; /* * Sequence number of the oldest transaction in the log [j_state_lock] */ tid_t j_tail_sequence; /* * Sequence number of the next transaction to grant [j_state_lock] */ tid_t <API key>; /* * Sequence number of the most recently committed transaction * [j_state_lock]. */ tid_t j_commit_sequence; /* * Sequence number of the most recent transaction wanting commit * [j_state_lock] */ tid_t j_commit_request; /* * Journal uuid: identifies the object (filesystem, LVM volume etc) * backed by this journal. This will eventually be replaced by an array * of uuids, allowing us to index multiple devices within a single * journal and to perform atomic updates across them. */ __u8 j_uuid[16]; /* Pointer to the current commit thread for this journal */ struct task_struct *j_task; /* * Maximum number of metadata buffers to allow in a single compound * commit transaction */ int <API key>; /* * What is the maximum transaction lifetime before we begin a commit? */ unsigned long j_commit_interval; /* The timer used to wakeup the commit thread: */ struct timer_list j_commit_timer; /* * The revoke table: maintains the list of revoked blocks in the * current transaction. [j_revoke_lock] */ spinlock_t j_revoke_lock; struct jbd2_revoke_table_s *j_revoke; struct jbd2_revoke_table_s *j_revoke_table[2]; /* * array of bhs for <API key> */ struct buffer_head **j_wbuf; int j_wbufsize; pid_t j_last_sync_writer; /* * Journal statistics */ struct transaction_stats_s *j_history; int j_history_max; int j_history_cur; /* * Protect the transactions statistics history */ spinlock_t j_history_lock; struct proc_dir_entry *j_proc_entry; struct transaction_stats_s j_stats; /* Failed journal commit ID */ unsigned int j_failed_commit; /* * An opaque pointer to fs-private information. ext3 puts its * superblock pointer here */ void *j_private; }; /* * Journal flag definitions */ #define JBD2_UNMOUNT 0x001 /* Journal thread is being destroyed */ #define JBD2_ABORT 0x002 /* Journaling has been aborted for errors. */ #define JBD2_ACK_ERR 0x004 /* The errno in the sb has been acked */ #define JBD2_FLUSHED 0x008 /* The journal superblock has been flushed */ #define JBD2_LOADED 0x010 /* The journal superblock has been loaded */ #define JBD2_BARRIER 0x020 /* Use IDE barriers */ /* * Function declarations for the journaling transaction and buffer * management */ /* Filing buffers */ extern void <API key>(journal_t *, struct journal_head *); extern void <API key>(struct journal_head *); extern void <API key>(struct journal_head *); extern void <API key>(journal_t *, struct journal_head *); extern void <API key>(struct journal_head *, transaction_t *, int); extern void <API key>(struct journal_head *bh); extern void <API key>(struct journal_head *, transaction_t *, int); extern void <API key>(transaction_t *transaction); /* Log buffer allocation */ extern struct journal_head * <API key>(journal_t *); int <API key>(journal_t *, unsigned long long *); /* Commit management */ extern void <API key>(journal_t *); /* Checkpoint list management */ int <API key>(journal_t *journal); int <API key>(struct journal_head *); void <API key>(struct journal_head *, transaction_t *); /* Buffer IO */ extern int <API key>(transaction_t *transaction, struct journal_head *jh_in, struct journal_head **jh_out, unsigned long long blocknr); /* Transaction locking */ extern void __wait_on_journal (journal_t *); /* * Journal locking. * * We need to lock the journal during transaction state changes so that nobody * ever tries to take a handle on the running transaction while we are in the * middle of moving it to the commit phase. j_state_lock does this. * * Note that the locking is completely interrupt unsafe. We never touch * journal structures from interrupts. */ static inline handle_t *<API key>(void) { return current->journal_info; } /* The journaling code user interface: * * Create and destroy handles * Register buffer modifications against the current transaction. */ extern handle_t *jbd2_journal_start(journal_t *, int nblocks); extern int <API key> (handle_t *, int nblocks); extern int jbd2_journal_extend (handle_t *, int nblocks); extern int <API key>(handle_t *, struct buffer_head *); extern int <API key> (handle_t *, struct buffer_head *); extern int <API key>(handle_t *, struct buffer_head *); extern int <API key> (handle_t *, struct buffer_head *); extern void <API key> (handle_t *, struct buffer_head *); extern int jbd2_journal_forget (handle_t *, struct buffer_head *); extern void journal_sync_buffer (struct buffer_head *); extern void <API key>(journal_t *, struct page *, unsigned long); extern int <API key>(journal_t *, struct page *, gfp_t); extern int jbd2_journal_stop(handle_t *); extern int jbd2_journal_flush (journal_t *); extern void <API key> (journal_t *); extern void <API key> (journal_t *); extern journal_t * <API key>(struct block_device *bdev, struct block_device *fs_dev, unsigned long long start, int len, int bsize); extern journal_t * <API key> (struct inode *); extern int <API key> (journal_t *); extern int <API key> (journal_t *, unsigned long, unsigned long, unsigned long); extern int <API key> (journal_t *, unsigned long, unsigned long, unsigned long); extern int <API key> (journal_t *, unsigned long, unsigned long, unsigned long); extern void <API key> (journal_t *, unsigned long, unsigned long, unsigned long); extern int jbd2_journal_create (journal_t *); extern int jbd2_journal_load (journal_t *journal); extern void <API key> (journal_t *); extern int <API key> (journal_t *journal); extern int jbd2_journal_wipe (journal_t *, int); extern int <API key> (journal_t *); extern void <API key> (journal_t *, int); extern void <API key> (journal_t *); extern void jbd2_journal_abort (journal_t *, int); extern int jbd2_journal_errno (journal_t *); extern void <API key> (journal_t *); extern int <API key> (journal_t *); extern int jbd2_journal_bmap(journal_t *, unsigned long, unsigned long long *); extern int <API key>(journal_t *); extern int <API key>(handle_t *handle, struct jbd2_inode *inode); extern int <API key>(struct jbd2_inode *inode, loff_t new_size); extern void <API key>(struct jbd2_inode *jinode, struct inode *inode); extern void <API key>(journal_t *journal, struct jbd2_inode *jinode); /* * journal_head management */ struct journal_head *<API key>(struct buffer_head *bh); struct journal_head *<API key>(struct buffer_head *bh); void <API key>(struct buffer_head *bh); void <API key>(struct journal_head *jh); /* * handle management */ extern struct kmem_cache *jbd2_handle_cache; static inline handle_t *jbd2_alloc_handle(gfp_t gfp_flags) { return kmem_cache_alloc(jbd2_handle_cache, gfp_flags); } static inline void jbd2_free_handle(handle_t *handle) { kmem_cache_free(jbd2_handle_cache, handle); } /* Primary revoke support */ #define <API key> 256 extern int <API key>(journal_t *, int); extern void <API key>(void); extern int <API key>(void); extern void <API key>(journal_t *); extern int jbd2_journal_revoke (handle_t *, unsigned long long, struct buffer_head *); extern int <API key>(handle_t *, struct journal_head *); extern void <API key>(journal_t *, transaction_t *); /* Recovery revoke support */ extern int <API key>(journal_t *, unsigned long long, tid_t); extern int <API key>(journal_t *, unsigned long long, tid_t); extern void <API key>(journal_t *); extern void <API key>(journal_t *journal); /* * The log thread user interface: * * Request space in the current transaction, and force transaction commit * transitions on demand. */ int <API key>(journal_t *); /* Called with journal locked */ int <API key>(journal_t *journal, tid_t tid); int <API key>(journal_t *journal, tid_t tid); int <API key>(journal_t *journal, tid_t *tid); int <API key>(journal_t *journal); int <API key>(journal_t *journal, tid_t tid); int <API key>(journal_t *journal); void <API key>(journal_t *journal); extern void <API key>(journal_t *, transaction_t *); extern int <API key>(journal_t *); /* Debugging code only: */ #define jbd_ENOSYS() \ do { \ printk (KERN_ERR "JBD unimplemented function %s\n", __FUNCTION__); \ current->state = <API key>; \ schedule(); \ } while (1) /* * is_journal_abort * * Simple test wrapper function to test the JBD2_ABORT state flag. This * bit, when set, indicates that we have had a fatal error somewhere, * either inside the journaling layer or indicated to us by the client * (eg. ext3), and that we and should not commit any further * transactions. */ static inline int is_journal_aborted(journal_t *journal) { return journal->j_flags & JBD2_ABORT; } static inline int is_handle_aborted(handle_t *handle) { if (handle->h_aborted) return 1; return is_journal_aborted(handle->h_transaction->t_journal); } static inline void <API key>(handle_t *handle) { handle->h_aborted = 1; } #endif /* __KERNEL__ */ /* Comparison functions for transaction IDs: perform comparisons using * modulo arithmetic so that they work over sequence number wraps. */ static inline int tid_gt(tid_t x, tid_t y) { int difference = (x - y); return (difference > 0); } static inline int tid_geq(tid_t x, tid_t y) { int difference = (x - y); return (difference >= 0); } extern int <API key>(struct inode *inode); extern size_t journal_tag_bytes(journal_t *journal); /* * Return the minimum number of blocks which must be free in the journal * before a new transaction may be started. Must be called under j_state_lock. */ static inline int jbd_space_needed(journal_t *journal) { int nblocks = journal-><API key>; if (journal-><API key>) nblocks += journal-><API key>-> <API key>; return nblocks; } /* * Definitions which augment the buffer_head layer */ /* journaling buffer types */ #define BJ_None 0 /* Not journaled */ #define BJ_Metadata 1 /* Normal journaled metadata */ #define BJ_Forget 2 /* Buffer superseded by this transaction */ #define BJ_IO 3 /* Buffer is for temporary IO use */ #define BJ_Shadow 4 /* Buffer contents being shadowed to the log */ #define BJ_LogCtl 5 /* Buffer contains log descriptors */ #define BJ_Reserved 6 /* Buffer is reserved for access by journal */ #define BJ_Types 7 extern int jbd_blocks_per_page(struct inode *inode); #ifdef __KERNEL__ #define buffer_trace_init(bh) do {} while (0) #define print_buffer_fields(bh) do {} while (0) #define print_buffer_trace(bh) do {} while (0) #define BUFFER_TRACE(bh, info) do {} while (0) #define BUFFER_TRACE2(bh, bh2, info) do {} while (0) #define JBUFFER_TRACE(jh, info) do {} while (0) #endif /* __KERNEL__ */ #endif /* _LINUX_JBD2_H */
using System; using System.Collections.Generic; using System.Runtime.Serialization; namespace Components.Aphid.Parser { public class <API key> : SerializationBinder { private const string _prefix = "System.Collections.Generic.List`1[["; public override Type BindToType(string assemblyName, string typeName) { if (typeName.StartsWith(_prefix)) { var name = typeName.Substring(_prefix.Length).RemoveAtIndexOf(','); return typeof(List<>).MakeGenericType(Type.GetType(name)); } return Type.GetType(typeName); } } }
#ifndef BOOKMARK_H #define BOOKMARK_H #include "stanzaextension.h" #include "jid.h" namespace Jreen { //XEP-0048 class BookmarkPrivate; /*! For ease-of-use in a Jabber client, it is desirable to have a way to store shortcuts * to various services and resources (such as conference rooms and web pages) as "bookmarks" * that can be displayed in the user's client. * Several Jabber clients have already agreed on and implemented a method to provide this service; * that informal agreement is documented and expanded upon in this document */ class JREEN_EXPORT Bookmark : public Payload { Q_DECLARE_PRIVATE(Bookmark) J_PAYLOAD(Jreen::Bookmark) //dummy public: class ConferencePrivate; class JREEN_EXPORT Conference { public: Conference(); Conference(const QString &name, const JID &jid, const QString &nick, const QString &password = QString(), bool autojoin = false); Conference(const Conference &o); Conference &operator =(const Conference &o); ~Conference(); bool operator ==(const Conference &o); bool operator !=(const Conference &o); bool isValid() const; void setJid(const JID &jid); void setName(const QString &name); /*! set the user's preferred roomnick for the chatroom */ void setNick(const QString &nick); /*! set an unencrypted string for the password needed to enter a password-protected room. * \note For security reasons, use of this element is NOT RECOMMENDED. */ void setPassword(const QString &password); /*! set autojoin attribute */ void setAutojoin(bool set); /*! returns friendly name of bookmark */ QString name() const; /*! returns friendly name of bookmark */ QString nick() const; /*! returns the user's preferred roomnick for the chatroom */ QString password() const; /*! returns JabberID of the chat room. */ JID jid() const; /*! returns autojoin attribute */ bool autojoin() const; private: <API key><ConferencePrivate> d_ptr; }; /*! Default constructor \param jid - The JabberID of the chat room * \param name - A friendly name for the bookmark(optional) * \param nick - The user's preferred roomnick for the chatroom(optional). */ Bookmark(); /*! set friendly name of bookmark */ ~Bookmark(); QList<Conference> conferences() const; void addConference(const Conference &conf); void setConferences(const QList<Conference> &conferences); private: QScopedPointer<BookmarkPrivate> d_ptr; }; } // namespace Jreen #endif // BOOKMARK_H
# export AWS_ACCESS_KEY="Your-Access-Key" # export AWS_SECRET_KEY="Your-Secret-Key" today=`date +"%d-%m-%Y","%T"` logfile="/awslog/<API key>.log" # Grab all Instance IDs for REBOOT action and export the IDs to a text file sudo aws ec2 describe-instances --filters Name=tag:reboot-time,Values=18-00 Name=tag:bash-profile,Values=wd --query Reservations[*].Instances[*].[InstanceId] --output text > ~/tmp/<API key>.txt 2>&1 # Take list of rebooting instances for instance_id in $(cat ~/tmp/<API key>.txt) do # Reboot instances rebootresult=$(sudo aws ec2 reboot-instances --instance-ids $instance_id) # Put info into log file echo Atempt to reboot $today instances by AWS CLI with result $rebootresult --EMPTY FOR NO RESULT-- >> $logfile done
<?php global $<API key>; ?> <div id="ts-settings-files" class="tab-content"> <div class="<API key>"> <div class="<API key> <API key>"><i class="dashicons-download"></i>External Files Settings</div> <div class="<API key>"> <div class="<API key> ts-vcsc-critical" style="margin-top: 10px; font-size: 13px; text-align: justify; font-weight: bold;"> Changes to the default settings done in this section can severely impact the overall functionality of this add-on or WordPress itself. Only make changes if you really know what you are doing and if the add-on is not working correctly with the default settings! </div> <p> <h4>Force Load of jQuery:</h4> <p style="font-size: 12px; text-align: justify;">Please define if you want to force a load of jQuery and jQuery Migrate:</p> <div class="ts-switch-button ts-composer-switch" data-value="<?php echo ($<API key> == 1 ? 'true' : 'false'); ?>" data-width="80" data-style="compact" data-on="Yes" data-off="No" style="float: left; margin-right: 10px;"> <input type="checkbox" style="display: none; " id="<API key>" class="toggle-check <API key>" name="<API key>" value="1" <?php echo checked('1', $<API key>); ?>/> <div class="toggle toggle-light" style="width: 80px; height: 20px;"> <div class="toggle-slide"> <div class="toggle-inner"> <div class="toggle-on <?php echo ($<API key> == 1 ? 'active' : ''); ?>">Yes</div> <div class="toggle-blob"></div> <div class="toggle-off <?php echo ($<API key> == 0 ? 'active' : ''); ?>">No</div> </div> </div> </div> </div> <label class="labelToggleBox" for="<API key>">Force Load of jQuery</label> </p> <hr class='style-six' style='margin-top: 20px;'> <p> <h4>Load ONLY Lightbox Files on ALL Pages:</h4> <p style="font-size: 12px; text-align: justify;">Please define if you want to load the lightbox files on ALL pages, even if no shortcode has been detected:</p> <div class="ts-switch-button ts-composer-switch" data-value="<?php echo ($<API key> == 1 ? 'true' : 'false'); ?>" data-width="80" data-style="compact" data-on="Yes" data-off="No" style="float: left; margin-right: 10px;"> <input type="checkbox" style="display: none; " id="<API key>" class="toggle-check <API key>" name="<API key>" value="1" <?php echo checked('1', $<API key>); ?>/> <div class="toggle toggle-light" style="width: 80px; height: 20px;"> <div class="toggle-slide"> <div class="toggle-inner"> <div class="toggle-on <?php echo ($<API key> == 1 ? 'active' : ''); ?>">Yes</div> <div class="toggle-blob"></div> <div class="toggle-off <?php echo ($<API key> == 0 ? 'active' : ''); ?>">No</div> </div> </div> </div> </div> <label class="labelToggleBox" for="<API key>">Load Lightbox On All Pages</label></span> </p> <hr class='style-six' style='margin-top: 20px;'> <p> <h4>Load ONLY Tooltip Files on ALL Pages:</h4> <p style="font-size: 12px; text-align: justify;">Please define if you want to load the tooltip files on ALL pages, even if no shortcode has been detected:</p> <div class="ts-switch-button ts-composer-switch" data-value="<?php echo ($<API key> == 1 ? 'true' : 'false'); ?>" data-width="80" data-style="compact" data-on="Yes" data-off="No" style="float: left; margin-right: 10px;"> <input type="checkbox" style="display: none; " id="<API key>" class="toggle-check <API key>" name="<API key>" value="1" <?php echo checked('1', $<API key>); ?>/> <div class="toggle toggle-light" style="width: 80px; height: 20px;"> <div class="toggle-slide"> <div class="toggle-inner"> <div class="toggle-on <?php echo ($<API key> == 1 ? 'active' : ''); ?>">Yes</div> <div class="toggle-blob"></div> <div class="toggle-off <?php echo ($<API key> == 0 ? 'active' : ''); ?>">No</div> </div> </div> </div> </div> <label class="labelToggleBox" for="<API key>">Load Tooltips On All Pages</label> </p> <hr class='style-six' style='margin-top: 20px;'> <p> <h4>Load ONLY Icon Font Files on ALL Pages:</h4> <p style="font-size: 12px; text-align: justify;">Please define if you want to load the active Icon Font files on ALL pages, even if no shortcode has been detected:</p> <div class="ts-switch-button ts-composer-switch" data-value="<?php echo ($<API key> == 1 ? 'true' : 'false'); ?>" data-width="80" data-style="compact" data-on="Yes" data-off="No" style="float: left; margin-right: 10px;"> <input type="checkbox" style="display: none; " id="<API key>" class="toggle-check <API key>" name="<API key>" value="1" <?php echo checked('1', $<API key>); ?>/> <div class="toggle toggle-light" style="width: 80px; height: 20px;"> <div class="toggle-slide"> <div class="toggle-inner"> <div class="toggle-on <?php echo ($<API key> == 1 ? 'active' : ''); ?>">Yes</div> <div class="toggle-blob"></div> <div class="toggle-off <?php echo ($<API key> == 0 ? 'active' : ''); ?>">No</div> </div> </div> </div> </div> <label class="labelToggleBox" for="<API key>">Load active Icon Fonts On All Pages</label> </p> <hr class='style-six' style='margin-top: 20px;'> <p> <h4>Load ALL Files on ALL Pages:</h4> <p style="font-size: 12px; text-align: justify;">Please define if you want to load ALL of the plugin files on ALL pages, even if no shortcode has been detected:</p> <div class="ts-switch-button ts-composer-switch" data-value="<?php echo ($<API key> == 1 ? 'true' : 'false'); ?>" data-width="80" data-style="compact" data-on="Yes" data-off="No" style="float: left; margin-right: 10px;"> <input type="checkbox" style="display: none; " id="<API key>" class="toggle-check <API key>" name="<API key>" value="1" <?php echo checked('1', $<API key>); ?>/> <div class="toggle toggle-light" style="width: 80px; height: 20px;"> <div class="toggle-slide"> <div class="toggle-inner"> <div class="toggle-on <?php echo ($<API key> == 1 ? 'active' : ''); ?>">Yes</div> <div class="toggle-blob"></div> <div class="toggle-off <?php echo ($<API key> == 0 ? 'active' : ''); ?>">No</div> </div> </div> </div> </div> <label class="labelToggleBox" for="<API key>">Load ALL Files On All Pages</label> </p> <hr class='style-six' style='margin-top: 20px;'> <p> <h4>Load External Files in HEAD:</h4> <p style="font-size: 12px; text-align: justify;">Please define where you want to load the JS Files:</p> <div class="ts-switch-button ts-composer-switch" data-value="<?php echo ($<API key> == 1 ? 'true' : 'false'); ?>" data-width="80" data-style="compact" data-on="Yes" data-off="No" style="float: left; margin-right: 10px;"> <input type="checkbox" style="display: none; " id="<API key>" class="toggle-check <API key>" name="<API key>" value="1" <?php echo checked('1', $<API key>); ?>/> <div class="toggle toggle-light" style="width: 80px; height: 20px;"> <div class="toggle-slide"> <div class="toggle-inner"> <div class="toggle-on <?php echo ($<API key> == 1 ? 'active' : ''); ?>">Yes</div> <div class="toggle-blob"></div> <div class="toggle-off <?php echo ($<API key> == 0 ? 'active' : ''); ?>">No</div> </div> </div> </div> </div> <label class="labelToggleBox" for="<API key>">Load all Files in HEAD</label> </p> <hr class='style-six' style='margin-top: 20px;'> <p> <h4>Load Files via WordPress Standard:</h4> <p style="font-size: 12px; text-align: justify;">Please define if you want to load the script files via "wp_enqueue_script" and "wp_enqueue_style":</p> <div class="ts-switch-button ts-composer-switch" data-value="<?php echo ($<API key> == 1 ? 'true' : 'false'); ?>" data-width="80" data-style="compact" data-on="Yes" data-off="No" style="float: left; margin-right: 10px;"> <input type="checkbox" style="display: none; " id="<API key>" class="toggle-check <API key>" name="<API key>" value="1" <?php echo checked('1', $<API key>); ?>/> <div class="toggle toggle-light" style="width: 80px; height: 20px;"> <div class="toggle-slide"> <div class="toggle-inner"> <div class="toggle-on <?php echo ($<API key> == 1 ? 'active' : ''); ?>">Yes</div> <div class="toggle-blob"></div> <div class="toggle-off <?php echo ($<API key> == 0 ? 'active' : ''); ?>">No</div> </div> </div> </div> </div> <label class="labelToggleBox" for="<API key>">Load Files with Standard Method</label> </p> <div class="<API key> ts-vcsc-warning" style="margin-top: 30px; margin-bottom: 30px; font-size: 13px; text-align: justify;"> This plugin will load some external CSS and JS files in order to make the content elements work on the front end. Your theme or another plugin might already load the same file, which in some cases can cause problems. Use this page to enable/disable the files this plugin should be allowed to load on the front end. </div> <p> <h4>Load Modernizr File:</h4> <p style="font-size: 12px; text-align: justify;">Please define if you want to load the Modernizr file to ensure CSS3 compatibility for most browsers:</p> <div class="ts-switch-button ts-composer-switch" data-value="<?php echo ($<API key> == 1 ? 'true' : 'false'); ?>" data-width="80" data-style="compact" data-on="Yes" data-off="No" style="float: left; margin-right: 10px;"> <input type="checkbox" style="display: none; " id="<API key>" class="toggle-check <API key>" name="<API key>" value="1" <?php echo checked('1', $<API key>); ?>/> <div class="toggle toggle-light" style="width: 80px; height: 20px;"> <div class="toggle-slide"> <div class="toggle-inner"> <div class="toggle-on <?php echo ($<API key> == 1 ? 'active' : ''); ?>">Yes</div> <div class="toggle-blob"></div> <div class="toggle-off <?php echo ($<API key> == 0 ? 'active' : ''); ?>">No</div> </div> </div> </div> </div> <label class="labelToggleBox" for="<API key>">Load Modernizr</label> </p> <hr class='style-six' style='margin-top: 20px;'> <p> <h4>Load Waypoints File:</h4> <p style="font-size: 12px; text-align: justify;">Please define if you want to load the Waypoints File for Viewport Animations:</p> <div class="ts-switch-button ts-composer-switch" data-value="<?php echo ($<API key> == 1 ? 'true' : 'false'); ?>" data-width="80" data-style="compact" data-on="Yes" data-off="No" style="float: left; margin-right: 10px;"> <input type="checkbox" style="display: none; " id="<API key>" class="toggle-check <API key>" name="<API key>" value="1" <?php echo checked('1', $<API key>); ?>/> <div class="toggle toggle-light" style="width: 80px; height: 20px;"> <div class="toggle-slide"> <div class="toggle-inner"> <div class="toggle-on <?php echo ($<API key> == 1 ? 'active' : ''); ?>">Yes</div> <div class="toggle-blob"></div> <div class="toggle-off <?php echo ($<API key> == 0 ? 'active' : ''); ?>">No</div> </div> </div> </div> </div> <label class="labelToggleBox" for="<API key>">Load WayPoints</label> </p> <hr class='style-six' style='margin-top: 20px;'> <p> <h4>Load CountTo File:</h4> <p style="font-size: 12px; text-align: justify;">Please define if you want to load the CountTo File for the Icon Counter:</p> <div class="ts-switch-button ts-composer-switch" data-value="<?php echo ($<API key> == 1 ? 'true' : 'false'); ?>" data-width="80" data-style="compact" data-on="Yes" data-off="No" style="float: left; margin-right: 10px;"> <input type="checkbox" style="display: none; " id="<API key>" class="toggle-check <API key>" name="<API key>" value="1" <?php echo checked('1', $<API key>); ?>/> <div class="toggle toggle-light" style="width: 80px; height: 20px;"> <div class="toggle-slide"> <div class="toggle-inner"> <div class="toggle-on <?php echo ($<API key> == 1 ? 'active' : ''); ?>">Yes</div> <div class="toggle-blob"></div> <div class="toggle-off <?php echo ($<API key> == 0 ? 'active' : ''); ?>">No</div> </div> </div> </div> </div> <label class="labelToggleBox" for="<API key>">Load CountTo</label> </p> </div> </div> </div>
#ifndef <API key> #define <API key> #include "ObjectGridLoader.h" #include "UpdateData.h" #include <iostream> #include "Corpse.h" #include "Object.h" #include "DynamicObject.h" #include "GameObject.h" #include "Player.h" #include "Unit.h" namespace MaNGOS { struct VisibleNotifier { Camera& i_camera; UpdateData i_data; GuidSet i_clientGUIDs; std::set<WorldObject*> i_visibleNow; explicit VisibleNotifier(Camera& c) : i_camera(c), i_clientGUIDs(c.GetOwner()->m_clientGUIDs) {} template<class T> void Visit(GridRefManager<T>& m); void Visit(CameraMapType& ) {} void Notify(void); }; struct <API key> { WorldObject& i_object; explicit <API key>(WorldObject& object) : i_object(object) {} template<class T> void Visit(GridRefManager<T>&) {} void Visit(CameraMapType&); }; struct MessageDeliverer { Player const& i_player; WorldPacket* i_message; bool i_toSelf; MessageDeliverer(Player const& pl, WorldPacket* msg, bool to_self) : i_player(pl), i_message(msg), i_toSelf(to_self) {} void Visit(CameraMapType& m); template<class SKIP> void Visit(GridRefManager<SKIP>&) {} }; struct <API key> { uint32 i_phaseMask; WorldPacket* i_message; Player const* i_skipped_receiver; <API key>(WorldObject const* obj, WorldPacket* msg, Player const* skipped) : i_phaseMask(obj->GetPhaseMask()), i_message(msg), i_skipped_receiver(skipped) {} void Visit(CameraMapType& m); template<class SKIP> void Visit(GridRefManager<SKIP>&) {} }; struct <API key> { uint32 i_phaseMask; WorldPacket* i_message; explicit <API key>(WorldObject const& obj, WorldPacket* msg) : i_phaseMask(obj.GetPhaseMask()), i_message(msg) {} void Visit(CameraMapType& m); template<class SKIP> void Visit(GridRefManager<SKIP>&) {} }; struct <API key> { Player const& i_player; WorldPacket* i_message; bool i_toSelf; bool i_ownTeamOnly; float i_dist; <API key>(Player const& pl, WorldPacket* msg, float dist, bool to_self, bool ownTeamOnly) : i_player(pl), i_message(msg), i_toSelf(to_self), i_ownTeamOnly(ownTeamOnly), i_dist(dist) {} void Visit(CameraMapType& m); template<class SKIP> void Visit(GridRefManager<SKIP>&) {} }; struct <API key> { WorldObject const& i_object; WorldPacket* i_message; float i_dist; <API key>(WorldObject const& obj, WorldPacket* msg, float dist) : i_object(obj), i_message(msg), i_dist(dist) {} void Visit(CameraMapType& m); template<class SKIP> void Visit(GridRefManager<SKIP>&) {} }; struct ObjectUpdater { uint32 i_timeDiff; explicit ObjectUpdater(const uint32& diff) : i_timeDiff(diff) {} template<class T> void Visit(GridRefManager<T>& m); void Visit(PlayerMapType&) {} void Visit(CorpseMapType&) {} void Visit(CameraMapType&) {} void Visit(CreatureMapType&); }; struct <API key> { Player& i_player; <API key>(Player& pl) : i_player(pl) {} template<class T> void Visit(GridRefManager<T>&) {} void Visit(CreatureMapType&); }; struct <API key> { Creature& i_creature; <API key>(Creature& c) : i_creature(c) {} template<class T> void Visit(GridRefManager<T>&) {} #ifdef WIN32 template<> void Visit(PlayerMapType&); #endif }; struct <API key> { DynamicObject& i_dynobject; Unit* i_check; bool i_positive; <API key>(DynamicObject& dynobject, Unit* caster, bool positive) : i_dynobject(dynobject), i_positive(positive) { i_check = caster; Unit* owner = i_check->GetOwner(); if (owner) { i_check = owner; } } template<class T> inline void Visit(GridRefManager<T>&) {} #ifdef WIN32 template<> inline void Visit<Player>(PlayerMapType&); template<> inline void Visit<Creature>(CreatureMapType&); #endif void VisitHelper(Unit* target); }; // SEARCHERS & LIST SEARCHERS & WORKERS /* Model Searcher class: template<class Check> struct SomeSearcher { ResultType& i_result; Check & i_check; SomeSearcher(ResultType& result, Check & check) : i_phaseMask(check.GetFocusObject().GetPhaseMask()), i_result(result), i_check(check) {} void Visit(CreatureMapType &m); { ..some code fast return if result found for(CreatureMapType::iterator itr = m.begin(); itr != m.end(); ++itr) { if (!itr->getSource()->InSamePhase(i_phaseMask)) continue; if (!i_check(itr->getSource())) continue; ..some code for update result and possible stop search } } template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) {} }; */ // WorldObject searchers & workers template<class Check> struct WorldObjectSearcher { uint32 i_phaseMask; WorldObject*& i_object; Check& i_check; WorldObjectSearcher(WorldObject*& result, Check& check) : i_phaseMask(check.GetFocusObject().GetPhaseMask()), i_object(result), i_check(check) {} void Visit(GameObjectMapType& m); void Visit(PlayerMapType& m); void Visit(CreatureMapType& m); void Visit(CorpseMapType& m); void Visit(<API key>& m); template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED>&) {} }; template<class Check> struct <API key> { uint32 i_phaseMask; WorldObject*& i_object; Check& i_check; <API key>(WorldObject* & result, Check& check) : i_phaseMask(check.GetFocusObject().GetPhaseMask()), i_object(result), i_check(check) {} void Visit(PlayerMapType& m); void Visit(CreatureMapType& m); void Visit(CorpseMapType& m); void Visit(GameObjectMapType& m); void Visit(<API key>& m); template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED>&) {} }; template<class Check> struct <API key> { uint32 i_phaseMask; std::list<WorldObject*>& i_objects; Check& i_check; <API key>(std::list<WorldObject*>& objects, Check& check) : i_phaseMask(check.GetFocusObject().GetPhaseMask()), i_objects(objects), i_check(check) {} void Visit(PlayerMapType& m); void Visit(CreatureMapType& m); void Visit(CorpseMapType& m); void Visit(GameObjectMapType& m); void Visit(<API key>& m); template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED>&) {} }; template<class Do> struct WorldObjectWorker { uint32 i_phaseMask; Do const& i_do; WorldObjectWorker(WorldObject const* searcher, Do const& _do) : i_phaseMask(searcher->GetPhaseMask()), i_do(_do) {} void Visit(GameObjectMapType& m) { for (GameObjectMapType::iterator itr = m.begin(); itr != m.end(); ++itr) if (itr->getSource()->InSamePhase(i_phaseMask)) i_do(itr->getSource()); } void Visit(PlayerMapType& m) { for (PlayerMapType::iterator itr = m.begin(); itr != m.end(); ++itr) if (itr->getSource()->InSamePhase(i_phaseMask)) i_do(itr->getSource()); } void Visit(CreatureMapType& m) { for (CreatureMapType::iterator itr = m.begin(); itr != m.end(); ++itr) if (itr->getSource()->InSamePhase(i_phaseMask)) i_do(itr->getSource()); } void Visit(CorpseMapType& m) { for (CorpseMapType::iterator itr = m.begin(); itr != m.end(); ++itr) if (itr->getSource()->InSamePhase(i_phaseMask)) i_do(itr->getSource()); } void Visit(<API key>& m) { for (<API key>::iterator itr = m.begin(); itr != m.end(); ++itr) if (itr->getSource()->InSamePhase(i_phaseMask)) i_do(itr->getSource()); } template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED>&) {} }; // Gameobject searchers template<class Check> struct GameObjectSearcher { uint32 i_phaseMask; GameObject*& i_object; Check& i_check; GameObjectSearcher(GameObject*& result, Check& check) : i_phaseMask(check.GetFocusObject().GetPhaseMask()), i_object(result), i_check(check) {} void Visit(GameObjectMapType& m); template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED>&) {} }; // Last accepted by Check GO if any (Check can change requirements at each call) template<class Check> struct <API key> { uint32 i_phaseMask; GameObject*& i_object; Check& i_check; <API key>(GameObject*& result, Check& check) : i_phaseMask(check.GetFocusObject().GetPhaseMask()), i_object(result), i_check(check) {} void Visit(GameObjectMapType& m); template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED>&) {} }; template<class Check> struct <API key> { uint32 i_phaseMask; std::list<GameObject*>& i_objects; Check& i_check; <API key>(std::list<GameObject*>& objects, Check& check) : i_phaseMask(check.GetFocusObject().GetPhaseMask()), i_objects(objects), i_check(check) {} void Visit(GameObjectMapType& m); template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED>&) {} }; // Unit searchers // First accepted by Check Unit if any template<class Check> struct UnitSearcher { uint32 i_phaseMask; Unit*& i_object; Check& i_check; UnitSearcher(Unit*& result, Check& check) : i_phaseMask(check.GetFocusObject().GetPhaseMask()), i_object(result), i_check(check) {} void Visit(CreatureMapType& m); void Visit(PlayerMapType& m); template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED>&) {} }; // Last accepted by Check Unit if any (Check can change requirements at each call) template<class Check> struct UnitLastSearcher { uint32 i_phaseMask; Unit*& i_object; Check& i_check; UnitLastSearcher(Unit*& result, Check& check) : i_phaseMask(check.GetFocusObject().GetPhaseMask()), i_object(result), i_check(check) {} void Visit(CreatureMapType& m); void Visit(PlayerMapType& m); template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED>&) {} }; // All accepted by Check units if any template<class Check> struct UnitListSearcher { uint32 i_phaseMask; std::list<Unit*>& i_objects; Check& i_check; UnitListSearcher(std::list<Unit*>& objects, Check& check) : i_phaseMask(check.GetFocusObject().GetPhaseMask()), i_objects(objects), i_check(check) {} void Visit(PlayerMapType& m); void Visit(CreatureMapType& m); template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED>&) {} }; // Creature searchers template<class Check> struct CreatureSearcher { uint32 i_phaseMask; Creature*& i_object; Check& i_check; CreatureSearcher(Creature*& result, Check& check) : i_phaseMask(check.GetFocusObject().GetPhaseMask()), i_object(result), i_check(check) {} void Visit(CreatureMapType& m); template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED>&) {} }; // Last accepted by Check Creature if any (Check can change requirements at each call) template<class Check> struct <API key> { uint32 i_phaseMask; Creature*& i_object; Check& i_check; <API key>(Creature*& result, Check& check) : i_phaseMask(check.GetFocusObject().GetPhaseMask()), i_object(result), i_check(check) {} void Visit(CreatureMapType& m); template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED>&) {} }; template<class Check> struct <API key> { uint32 i_phaseMask; std::list<Creature*>& i_objects; Check& i_check; <API key>(std::list<Creature*>& objects, Check& check) : i_phaseMask(check.GetFocusObject().GetPhaseMask()), i_objects(objects), i_check(check) {} void Visit(CreatureMapType& m); template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED>&) {} }; template<class Do> struct CreatureWorker { uint32 i_phaseMask; Do& i_do; CreatureWorker(WorldObject const* searcher, Do& _do) : i_phaseMask(searcher->GetPhaseMask()), i_do(_do) {} void Visit(CreatureMapType& m) { for (CreatureMapType::iterator itr = m.begin(); itr != m.end(); ++itr) if (itr->getSource()->InSamePhase(i_phaseMask)) i_do(itr->getSource()); } template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED>&) {} }; // Player searchers template<class Check> struct PlayerSearcher { uint32 i_phaseMask; Player*& i_object; Check& i_check; PlayerSearcher(Player*& result, Check& check) : i_phaseMask(check.GetFocusObject().GetPhaseMask()), i_object(result), i_check(check) {} void Visit(PlayerMapType& m); template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED>&) {} }; template<class Check> struct PlayerListSearcher { uint32 i_phaseMask; std::list<Player*>& i_objects; Check& i_check; PlayerListSearcher(std::list<Player*>& objects, Check& check) : i_phaseMask(check.GetFocusObject().GetPhaseMask()), i_objects(objects), i_check(check) {} void Visit(PlayerMapType& m); template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED>&) {} }; template<class Do> struct PlayerWorker { uint32 i_phaseMask; Do& i_do; PlayerWorker(WorldObject const* searcher, Do& _do) : i_phaseMask(searcher->GetPhaseMask()), i_do(_do) {} void Visit(PlayerMapType& m) { for (PlayerMapType::iterator itr = m.begin(); itr != m.end(); ++itr) if (itr->getSource()->InSamePhase(i_phaseMask)) i_do(itr->getSource()); } template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED>&) {} }; template<class Do> struct CameraDistWorker { WorldObject const* i_searcher; float i_dist; Do& i_do; CameraDistWorker(WorldObject const* searcher, float _dist, Do& _do) : i_searcher(searcher), i_dist(_dist), i_do(_do) {} void Visit(CameraMapType& m) { for (CameraMapType::iterator itr = m.begin(); itr != m.end(); ++itr) if (itr->getSource()->GetBody()->InSamePhase(i_searcher) && itr->getSource()->GetBody()->IsWithinDist(i_searcher, i_dist)) i_do(itr->getSource()->GetOwner()); } template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED>&) {} }; // CHECKS && DO classes /* Model Check class: class SomeCheck { public: SomeCheck(SomeObjecType const* fobj, ..some other args) : i_fobj(fobj), ...other inits {} WorldObject const& GetFocusObject() const { return *i_fobj; } bool operator()(Creature* u) and for other intresting typs (Player/GameObject/Camera { return ..(code return true if Object fit to requirenment); } template<class NOT_INTERESTED> bool operator()(NOT_INTERESTED*) { return false; } private: SomeObjecType const* i_fobj; // Focus object used for check distance from, phase, so place in world ..other values need for check }; */ // WorldObject check classes class <API key> { public: <API key>(Player const* fobj, float range) : i_fobj(fobj), i_range(range) {} WorldObject const& GetFocusObject() const { return *i_fobj; } bool operator()(Creature* u) { if (i_fobj->isHonorOrXPTarget(u) || u->getDeathState() != CORPSE || u->IsDeadByDefault() || u->IsTaxiFlying() || (u->GetCreatureTypeMask() & (1 << (<API key> - 1))) == 0 || (u->GetDisplayId() != u->GetNativeDisplayId())) return false; return i_fobj->IsWithinDistInMap(u, i_range); } template<class NOT_INTERESTED> bool operator()(NOT_INTERESTED*) { return false; } private: Player const* i_fobj; float i_range; }; class <API key> { public: <API key>(WorldObject const* fobj, float range) : i_fobj(fobj), i_range(range) {} WorldObject const& GetFocusObject() const { return *i_fobj; } bool operator()(Player* u) { if (u->getDeathState() != CORPSE || u->IsTaxiFlying() || u->HasAuraType(SPELL_AURA_GHOST) || (u->GetDisplayId() != u->GetNativeDisplayId())) return false; return i_fobj->IsWithinDistInMap(u, i_range); } bool operator()(Creature* u) { if (u->getDeathState() != CORPSE || u->IsTaxiFlying() || u->IsDeadByDefault() || (u->GetDisplayId() != u->GetNativeDisplayId()) || (u->GetCreatureTypeMask() & <API key>) != 0) return false; return i_fobj->IsWithinDistInMap(u, i_range); } template<class NOT_INTERESTED> bool operator()(NOT_INTERESTED*) { return false; } private: WorldObject const* i_fobj; float i_range; }; class <API key> { public: <API key>(WorldObject const* fobj, float range) : i_fobj(fobj), i_range(range) {} WorldObject const& GetFocusObject() const { return *i_fobj; } bool operator()(Player* u) { if (i_fobj->IsFriendlyTo(u) || u->IsAlive() || u->IsTaxiFlying()) { return false; } return i_fobj->IsWithinDistInMap(u, i_range); } bool operator()(Corpse* u); bool operator()(Creature* u) { if (i_fobj->IsFriendlyTo(u) || u->IsAlive() || u->IsTaxiFlying() || (u->GetCreatureTypeMask() & <API key>) == 0) { return false; } return i_fobj->IsWithinDistInMap(u, i_range); } template<class NOT_INTERESTED> bool operator()(NOT_INTERESTED*) { return false; } private: WorldObject const* i_fobj; float i_range; }; // WorldObject do classes class RespawnDo { public: RespawnDo() {} void operator()(Creature* u) const; void operator()(GameObject* u) const; void operator()(WorldObject*) const {} void operator()(Corpse*) const {} }; // GameObject checks class <API key> { public: <API key>(Unit const* unit, uint32 focusId) : i_unit(unit), i_focusId(focusId) {} WorldObject const& GetFocusObject() const { return *i_unit; } bool operator()(GameObject* go) const { if (go->GetGOInfo()->type != <API key>) { return false; } if (go->GetGOInfo()->spellFocus.focusId != i_focusId) { return false; } float dist = (float)go->GetGOInfo()->spellFocus.dist; return go->IsWithinDistInMap(i_unit, dist); } private: Unit const* i_unit; uint32 i_focusId; }; // Find the nearest Fishing hole and return true only if source object is in range of hole class <API key> { public: <API key>(WorldObject const& obj, float range) : i_obj(obj), i_range(range) {} WorldObject const& GetFocusObject() const { return i_obj; } bool operator()(GameObject* go) { if (go->GetGOInfo()->type == <API key> && go->isSpawned() && i_obj.IsWithinDistInMap(go, i_range) && i_obj.IsWithinDistInMap(go, (float)go->GetGOInfo()->fishinghole.radius)) { i_range = i_obj.GetDistance(go); return true; } return false; } float GetLastRange() const { return i_range; } private: WorldObject const& i_obj; float i_range; // prevent clone <API key>(<API key> const&); }; // Success at unit in range, range update for next check (this can be use with <API key> to find nearest GO) class <API key> { public: <API key>(WorldObject const& obj, uint32 entry, float range) : i_obj(obj), i_entry(entry), i_range(range) {} WorldObject const& GetFocusObject() const { return i_obj; } bool operator()(GameObject* go) { if (go->GetEntry() == i_entry && i_obj.IsWithinDistInMap(go, i_range)) { i_range = i_obj.GetDistance(go); // use found GO range as new range limit for next check return true; } return false; } float GetLastRange() const { return i_range; } private: WorldObject const& i_obj; uint32 i_entry; float i_range; // prevent clone this object <API key>(<API key> const&); }; // Success at gameobject in range of xyz, range update for next check (this can be use with <API key> to find nearest GO) class <API key> { public: <API key>(WorldObject const& obj, uint32 entry, float x, float y, float z, float range) : i_obj(obj), i_entry(entry), i_x(x), i_y(y), i_z(z), i_range(range) {} WorldObject const& GetFocusObject() const { return i_obj; } bool operator()(GameObject* go) { if (go->GetEntry() == i_entry && go->IsWithinDist3d(i_x, i_y, i_z, i_range)) { // use found GO range as new range limit for next check i_range = go->GetDistance(i_x, i_y, i_z); return true; } return false; } float GetLastRange() const { return i_range; } private: WorldObject const& i_obj; uint32 i_entry; float i_x, i_y, i_z; float i_range; // prevent clone this object <API key>(<API key> const&); }; // Success at gameobject with entry in range of provided xyz class <API key> { public: <API key>(WorldObject const& obj, uint32 entry, float x, float y, float z, float range) : i_obj(obj), i_entry(entry), i_x(x), i_y(y), i_z(z), i_range(range) {} WorldObject const& GetFocusObject() const { return i_obj; } bool operator()(GameObject* go) { if (go->GetEntry() == i_entry && go->IsWithinDist3d(i_x, i_y, i_z, i_range)) { return true; } return false; } float GetLastRange() const { return i_range; } private: WorldObject const& i_obj; uint32 i_entry; float i_x, i_y, i_z; float i_range; // prevent clone this object <API key>(<API key> const&); }; // Success at gameobject of type in range of provided xyz class <API key> { public: <API key>(Unit const& obj, GameobjectTypes type, float x, float y, float z, float range, bool onlyHostile, bool onlyFriendly) : i_obj(obj), i_type(type), i_x(x), i_y(y), i_z(z), i_range(range), i_onlyHostile(onlyHostile), i_onlyFriendly(onlyFriendly) {} WorldObject const& GetFocusObject() const { return i_obj; } bool operator()(GameObject* go) { if (go->GetGoType() == i_type && (!i_onlyHostile || go->IsHostileTo(&i_obj)) && (!i_onlyFriendly || go->IsFriendlyTo(&i_obj)) && go->IsWithinDist3d(i_x, i_y, i_z, i_range)) return true; return false; } float GetLastRange() const { return i_range; } private: Unit const& i_obj; GameobjectTypes i_type; float i_x, i_y, i_z; float i_range; bool i_onlyHostile, i_onlyFriendly; // prevent clone this object <API key>(<API key> const&); }; // Unit checks class <API key> { public: <API key>(Unit const* obj, float range, uint32 hp) : i_obj(obj), i_range(range), i_hp(hp) {} WorldObject const& GetFocusObject() const { return *i_obj; } bool operator()(Unit* u) { if (u->IsAlive() && u->IsInCombat() && !i_obj->IsHostileTo(u) && i_obj->IsWithinDistInMap(u, i_range) && u->GetMaxHealth() - u->GetHealth() > i_hp) { i_hp = u->GetMaxHealth() - u->GetHealth(); return true; } return false; } private: Unit const* i_obj; float i_range; uint32 i_hp; }; class <API key> { public: <API key>(WorldObject const* obj, float range) : i_obj(obj), i_range(range) {} WorldObject const& GetFocusObject() const { return *i_obj; } bool operator()(Unit* u) { if (u->IsAlive() && u->IsInCombat() && !i_obj->IsHostileTo(u) && i_obj->IsWithinDistInMap(u, i_range) && (u->IsCharmed() || u->IsFrozen() || u->hasUnitState(<API key>))) { return true; } return false; } private: WorldObject const* i_obj; float i_range; }; class <API key> { public: <API key>(WorldObject const* obj, float range, uint32 spellid) : i_obj(obj), i_range(range), i_spell(spellid) {} WorldObject const& GetFocusObject() const { return *i_obj; } bool operator()(Unit* u) { if (u->IsAlive() && u->IsInCombat() && !i_obj->IsHostileTo(u) && i_obj->IsWithinDistInMap(u, i_range) && !(u->HasAura(i_spell, EFFECT_INDEX_0) || u->HasAura(i_spell, EFFECT_INDEX_1) || u->HasAura(i_spell, EFFECT_INDEX_2))) { return true; } return false; } private: WorldObject const* i_obj; float i_range; uint32 i_spell; }; class <API key> { public: <API key>(WorldObject const* obj, float range) : i_obj(obj), i_range(range) { <API key> = obj-><API key>(); } WorldObject const& GetFocusObject() const { return *i_obj; } bool operator()(Unit* u) { if (u->IsAlive() && (<API key> ? !i_obj->IsFriendlyTo(u) : i_obj->IsHostileTo(u)) && i_obj->IsWithinDistInMap(u, i_range)) { return true; } else { return false; } } private: WorldObject const* i_obj; bool <API key>; float i_range; }; class <API key> { public: <API key>(WorldObject const* obj, Unit const* funit, float range) : i_obj(obj), i_funit(funit), i_range(range) {} WorldObject const& GetFocusObject() const { return *i_obj; } bool operator()(Unit* u) { return u->IsAlive() && i_obj->IsWithinDistInMap(u, i_range) && !i_funit->IsFriendlyTo(u) && u-><API key>(i_funit, i_funit, false); } private: WorldObject const* i_obj; Unit const* i_funit; float i_range; }; class <API key> { public: <API key>(WorldObject const* obj, float range) : i_obj(obj), i_range(range) {} WorldObject const& GetFocusObject() const { return *i_obj; } bool operator()(Unit* u) { if (u->IsAlive() && i_obj->IsWithinDistInMap(u, i_range) && i_obj->IsFriendlyTo(u)) { return true; } else { return false; } } private: WorldObject const* i_obj; float i_range; }; class <API key> { public: <API key>(WorldObject const* obj, float range) : i_obj(obj), i_range(range) {} WorldObject const& GetFocusObject() const { return *i_obj; } bool operator()(Unit* u) { if (u->IsAlive() && i_obj->IsWithinDistInMap(u, i_range)) { return true; } return false; } private: WorldObject const* i_obj; float i_range; }; // Success at unit in range, range update for next check (this can be use with UnitLastSearcher to find nearest unit) class <API key> { public: <API key>(WorldObject const* obj, Unit const* funit, float range) : i_obj(obj), i_funit(funit), i_range(range) {} WorldObject const& GetFocusObject() const { return *i_obj; } bool operator()(Unit* u) { if (u-><API key>() && i_obj->IsWithinDistInMap(u, i_range) && !i_funit->IsFriendlyTo(u) && u-><API key>(i_funit, i_funit, false)) { i_range = i_obj->GetDistance(u); // use found unit range as new range limit for next check return true; } return false; } private: WorldObject const* i_obj; Unit const* i_funit; float i_range; // prevent clone this object <API key>(<API key> const&); }; class <API key> { public: <API key>(WorldObject const* obj, WorldObject const* originalCaster, float range) : i_obj(obj), i_originalCaster(originalCaster), i_range(range) { i_targetForUnit = i_originalCaster->isType(TYPEMASK_UNIT); i_targetForPlayer = (i_originalCaster->GetTypeId() == TYPEID_PLAYER); } WorldObject const& GetFocusObject() const { return *i_obj; } bool operator()(Unit* u) { // Check contains checks for: live, non-selectable, non-attackable flags, flight check and GM check, ignore totems if (!u-><API key>()) { return false; } // ignore totems as AoE targets if (u->GetTypeId() == TYPEID_UNIT && ((Creature*)u)->IsTotem()) { return false; } // check visibility only for unit-like original casters if (i_targetForUnit && !u-><API key>((Unit const*)i_originalCaster, i_originalCaster, false)) { return false; } if ((i_targetForPlayer ? !i_originalCaster->IsFriendlyTo(u) : i_originalCaster->IsHostileTo(u)) && i_obj->IsWithinDistInMap(u, i_range)) { return true; } return false; } private: WorldObject const* i_obj; WorldObject const* i_originalCaster; float i_range; bool i_targetForUnit; bool i_targetForPlayer; }; class <API key> { public: <API key>(WorldObject const* obj, float range) : i_obj(obj), i_range(range) { i_targetForPlayer = i_obj-><API key>(); } WorldObject const& GetFocusObject() const { return *i_obj; } bool operator()(Unit* u) { // Check contains checks for: live, non-selectable, non-attackable flags, flight check and GM check, ignore totems if (!u-><API key>()) { return false; } if (u->GetTypeId() == TYPEID_UNIT && ((Creature*)u)->IsTotem()) { return false; } if ((i_targetForPlayer ? !i_obj->IsFriendlyTo(u) : i_obj->IsHostileTo(u)) && i_obj->IsWithinDistInMap(u, i_range)) { return true; } return false; } private: WorldObject const* i_obj; float i_range; bool i_targetForPlayer; }; // do attack at call of help to friendly crearture class <API key> { public: <API key>(Unit* funit, Unit* enemy, float range) : i_funit(funit), i_enemy(enemy), i_range(range) {} void operator()(Creature* u); private: Unit* const i_funit; Unit* const i_enemy; float i_range; }; class AnyDeadUnitCheck { public: explicit AnyDeadUnitCheck(WorldObject const* fobj) : i_fobj(fobj) {} WorldObject const& GetFocusObject() const { return *i_fobj; } bool operator()(Unit* u) { return !u->IsAlive(); } private: WorldObject const* i_fobj; }; class AnyStealthedCheck { public: explicit AnyStealthedCheck(WorldObject const* fobj) : i_fobj(fobj) {} WorldObject const& GetFocusObject() const { return *i_fobj; } bool operator()(Unit* u) { return u->GetVisibility() == <API key>; } private: WorldObject const* i_fobj; }; // Creature checks class <API key> { public: explicit <API key>(Unit* funit) : i_funit(funit) {} WorldObject const& GetFocusObject() const { return *i_funit; } bool operator()(Creature* u) { if (u->IsAlive() && u->IsHostileTo(i_funit) && i_funit->IsWithinDistInMap(u, u->GetAttackDistance(i_funit))) { return true; } return false; } private: Unit* const i_funit; }; class <API key> { public: <API key>(Unit* funit, Unit* enemy, float range) : i_funit(funit), i_enemy(enemy), i_range(range) { } WorldObject const& GetFocusObject() const { return *i_funit; } bool operator()(Creature* u); private: Unit* const i_funit; Unit* const i_enemy; float i_range; }; class <API key> { public: <API key>(Creature* obj, Unit* enemy, float range) : i_obj(obj), i_enemy(enemy), i_range(range) {} WorldObject const& GetFocusObject() const { return *i_obj; } bool operator()(Creature* u) { if (u == i_obj) { return false; } if (!u->CanAssistTo(i_obj, i_enemy)) { return false; } if (!i_obj->IsWithinDistInMap(u, i_range)) { return false; } if (!i_obj->IsWithinLOSInMap(u)) { return false; } i_range = i_obj->GetDistance(u); // use found unit range as new range limit for next check return true; } float GetLastRange() const { return i_range; } private: Creature* const i_obj; Unit* const i_enemy; float i_range; // prevent clone this object <API key>(<API key> const&); }; // Success at unit in range, range update for next check (this can be use with <API key> to find nearest creature) class <API key> { public: <API key>(WorldObject const& obj, uint32 entry, bool onlyAlive, bool onlyDead, float range, bool excludeSelf = false) : i_obj(obj), i_entry(entry), i_onlyAlive(onlyAlive), i_onlyDead(onlyDead), i_excludeSelf(excludeSelf), i_range(range) {} WorldObject const& GetFocusObject() const { return i_obj; } bool operator()(Creature* u) { if (u->GetEntry() == i_entry && ((i_onlyAlive && u->IsAlive()) || (i_onlyDead && u->IsCorpse()) || (!i_onlyAlive && !i_onlyDead)) && (!i_excludeSelf || &i_obj != u) && i_obj.IsWithinDistInMap(u, i_range)) { i_range = i_obj.GetDistance(u); // use found unit range as new range limit for next check return true; } return false; } float GetLastRange() const { return i_range; } private: WorldObject const& i_obj; uint32 i_entry; bool i_onlyAlive; bool i_onlyDead; bool i_excludeSelf; float i_range; // prevent clone this object <API key>(<API key> const&); }; class <API key> { public: <API key>(const WorldObject* pObject, uint32 uiEntry, float fMaxRange) : m_pObject(pObject), m_uiEntry(uiEntry), m_fRange(fMaxRange) {} WorldObject const& GetFocusObject() const { return *m_pObject; } bool operator()(Unit* pUnit) { if (pUnit->GetEntry() == m_uiEntry && m_pObject->IsWithinDist(pUnit, m_fRange, false)) { return true; } return false; } private: const WorldObject* m_pObject; uint32 m_uiEntry; float m_fRange; // prevent clone this object <API key>(<API key> const&); }; // Player checks and do class <API key> { public: <API key>(WorldObject const* obj, float range) : i_obj(obj), i_range(range) {} WorldObject const& GetFocusObject() const { return *i_obj; } bool operator()(Player* u) { if (u->IsAlive() && i_obj->IsWithinDistInMap(u, i_range)) { return true; } return false; } private: WorldObject const* i_obj; float i_range; }; class <API key> { public: <API key>(WorldObject const* obj, float range, uint32 spellId) : i_obj(obj), i_range(range), i_spellId(spellId) {} WorldObject const& GetFocusObject() const { return *i_obj; } bool operator()(Player* u) { return u->IsAlive() && i_obj->IsWithinDistInMap(u, i_range) && u->HasAura(i_spellId); } private: WorldObject const* i_obj; float i_range; uint32 i_spellId; }; class <API key> { public: <API key>(WorldObject const* obj, float range) : i_obj(obj), i_range(range) {} WorldObject const& GetFocusObject() const { return *i_obj; } bool operator()(Player* u) { return u->CanUseCapturePoint() && i_obj->IsWithinDistInMap(u, i_range); } private: WorldObject const* i_obj; float i_range; }; // Prepare using Builder localized packets with caching and send to player template<class Builder> class LocalizedPacketDo { public: explicit LocalizedPacketDo(Builder& builder) : i_builder(builder) {} ~LocalizedPacketDo() { for (size_t i = 0; i < i_data_cache.size(); ++i) { delete i_data_cache[i]; } } void operator()(Player* p); private: Builder& i_builder; std::vector<WorldPacket*> i_data_cache; // 0 = default, i => i-1 locale index }; // Prepare using Builder localized packets with caching and send to player template<class Builder> class <API key> { public: typedef std::vector<WorldPacket*> WorldPacketList; explicit <API key>(Builder& builder) : i_builder(builder) {} ~<API key>() { for (size_t i = 0; i < i_data_cache.size(); ++i) for (size_t j = 0; j < i_data_cache[i].size(); ++j) { delete i_data_cache[i][j]; } } void operator()(Player* p); private: Builder& i_builder; std::vector<WorldPacketList> i_data_cache; // 0 = default, i => i-1 locale index }; #ifndef WIN32 template<> void <API key>::Visit<Creature>(CreatureMapType&); template<> void <API key>::Visit<Player>(PlayerMapType&); template<> void <API key>::Visit<Creature>(CreatureMapType&); template<> inline void <API key>::Visit<Creature>(CreatureMapType&); template<> inline void <API key>::Visit<Player>(PlayerMapType&); #endif } #endif
#! /bin/sh # This program is free software; you can redistribute it and/or modify # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # Make sure empty calls to AC_CONFIG_FILES or AC_CONFIG_HEADERS are diagnosed. . test-init.sh # We avoid using configure.ac stub initialized by our testsuite setup, as # we need to keep track of line numbers (to grep for error messages). cat > configure.ac << END AC_INIT([$me], [1.0]) AM_INIT_AUTOMAKE AC_CONFIG_FILES ([oops]) AC_CONFIG_HEADERS AC_OUTPUT END $ACLOCAL AUTOMAKE_fails grep 'configure\.ac:3:.* arguments .*AC_CONFIG_FILES' stderr grep 'configure\.ac:4:.* arguments .*AC_CONFIG_HEADERS' stderr :
package com.app.labeli; import com.app.labeli.member.Member; import net.tools.*; import android.app.ProgressDialog; import android.os.AsyncTask; import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentTransaction; import android.view.LayoutInflater; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; import android.widget.Button; import android.widget.EditText; import android.widget.Toast; /** * > @FragmentConnection * * Fragment to create a connection between app * and API. * * @author Florian "Aamu Lumi" Kauder * for the project @Label[i] */ public class FragmentConnection extends Fragment { private EditText editTextLogin, editTextPassword; private Button button; private ProgressDialog pDialog; public FragmentConnection() { } public void connectToAPI(View v){ if (editTextLogin.length() == 0) Toast.makeText(getActivity(), "Veuillez rentrer un identifiant", Toast.LENGTH_SHORT).show(); else if (editTextPassword.length() == 0) Toast.makeText(getActivity(), "Veuillez rentrer un mot de passe", Toast.LENGTH_SHORT).show(); else { new InitConnection(editTextLogin.getText().toString(), editTextPassword.getText().toString()) .execute(); } } @Override public void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); getActivity().getActionBar().setTitle("Connexion"); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment View v = inflater.inflate(R.layout.fragment_connection, container, false); editTextLogin = (EditText) v.findViewById(R.id.<API key>); editTextPassword = (EditText) v.findViewById(R.id.<API key>); button = (Button) v.findViewById(R.id.<API key>); button.setOnClickListener(new OnClickListener(){ @Override public void onClick(View arg0) { connectToAPI(arg0); } }); return v; } private class InitConnection extends AsyncTask<Void, Void, String> { String username, password; boolean success; public InitConnection(String username, String password){ this.username = username; this.password = password; this.success = false; } @Override protected void onPreExecute() { super.onPreExecute(); pDialog = new ProgressDialog(FragmentConnection.this.getActivity()); pDialog.setMessage("Connexion"); pDialog.setIndeterminate(false); pDialog.setCancelable(false); pDialog.show(); } @Override protected String doInBackground(Void... params) { success = APIConnection.login(username, password); return null; } @Override protected void onPostExecute(String file_url) { pDialog.dismiss(); if (!success) Toast.makeText(getActivity(), "Mauvais identifiant / mot de passe", Toast.LENGTH_SHORT).show(); else { Member loggedUser = APIConnection.getLoggedUser(); Toast.makeText(getActivity(), "Bonjour " + loggedUser.getFirstName() + " " + loggedUser.getLastName(), Toast.LENGTH_SHORT).show(); ((MainActivity)getActivity()).loadLeftMenu(); Fragment fragment = new FragmentAccount(); Bundle args = new Bundle(); fragment.setArguments(args); FragmentTransaction transaction = getActivity().<API key>().beginTransaction(); transaction.setTransition(FragmentTransaction.<API key>); transaction.replace(R.id.<API key>, fragment, fragment.getClass().getName()); transaction.addToBackStack(fragment.getClass().getName()); transaction.commit(); } } } }
require File.join(File.dirname(__FILE__), '..', 'spec_helper.rb') given "a message exists" do Message.all.destroy! request(resource(:messages), :method => "POST", :params => { :message => { :id => nil }}) end describe "resource(:messages)" do describe "GET" do before(:each) do @response = request(resource(:messages)) end it "responds successfully" do @response.should be_successful end it "contains a list of messages" do pending @response.should have_xpath(" end end describe "GET", :given => "a message exists" do before(:each) do @response = request(resource(:messages)) end it "has a list of messages" do pending @response.should have_xpath("//ul/li") end end describe "a successful POST" do before(:each) do Message.all.destroy! @response = request(resource(:messages), :method => "POST", :params => { :message => { :id => nil }}) end it "redirects to resource(:messages)" do @response.should redirect_to(resource(Message.first), :message => {:notice => "message was successfully created"}) end end end describe "resource(@message)" do describe "a successful DELETE", :given => "a message exists" do before(:each) do @response = request(resource(Message.first), :method => "DELETE") end it "should redirect to the index action" do @response.should redirect_to(resource(:messages)) end end end describe "resource(:messages, :new)" do before(:each) do @response = request(resource(:messages, :new)) end it "responds successfully" do @response.should be_successful end end describe "resource(@message, :edit)", :given => "a message exists" do before(:each) do @response = request(resource(Message.first, :edit)) end it "responds successfully" do @response.should be_successful end end describe "resource(@message)", :given => "a message exists" do describe "GET" do before(:each) do @response = request(resource(Message.first)) end it "responds successfully" do @response.should be_successful end end describe "PUT" do before(:each) do @message = Message.first @response = request(resource(@message), :method => "PUT", :params => { :message => {:id => @message.id} }) end it "redirect to the article show action" do @response.should redirect_to(resource(@message)) end end end
<?php if (isset($_POST['_wpcf7_mail_sent'])) { $expire=time()+60*60*24*30*2; setcookie("surveySent2", "true", $expire, '/'); } ?><!DOCTYPE html PUBLIC "- <html xmlns="http: <head profile="http://gmpg.org/xfn/11"> <title><?php bloginfo('name'); ?><?php wp_title(); ?></title> <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" /> <link rel="stylesheet" href="/wp-content/themes/aparatus/css.php?a=16" type="text/css" media="screen" /> <?php global $options; foreach ($options as $value) { if (get_settings( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_settings( $value['id'] ); } } ?> <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" /> <link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" /> <link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php bloginfo('atom_url'); ?>" /> <!--[if gte IE 7]> <link href="<?php echo str_replace("http: <![endif] <!--[if lt IE 7]> <link href="<?php echo str_replace("http: <![endif] <!--[if IE 7]> <link href="<?php echo str_replace("http: <![endif] <!--Css SmoothGallery <link rel="stylesheet" href="<?php echo str_replace("http: <?php wp_enqueue_script("jquery"); ?> <script type="text/javascript" src="<?php echo str_replace("http: <script type="text/javascript" src="<?php echo str_replace("http: <script type="text/javascript" src="<?php echo str_replace("http: <script type="text/javascript" src="<?php echo str_replace("http: <script type="text/javascript" src="<?php echo str_replace("http: <?php wp_get_archives('type=monthly&format=link'); ?> <?php //<API key>(); // off by default ?> <?php wp_head(); ?> <script type="text/javascript">/*<![CDATA[*/Cufon.replace('a#logo',{fontSize:'98px',lineHeight:'98px'});/*]]>*/</script> <script type="text/javascript">/*<![CDATA[*/ jQuery(document).ready(function () { jQuery('#nav2 ul li').each(function (i) { jQuery(this).mouseenter(function () { jQuery(this).addClass("sfhover"); }); jQuery(this).mouseleave(function () { jQuery(this).removeClass("sfhover"); }); }); }); <?php /* old code <?php } else { ?> sfHover = function() { var sfEls = document.getElementById("nav2").<API key>("LI"); for (var i=0; i<sfEls.length; i++) { sfEls[i].onmouseover=function() { this.className+=" sfhover"; } sfEls[i].onmouseout=function() { this.className=this.className.replace(new RegExp(" sfhoverb"), ""); } } } if (window.attachEvent) window.attachEvent("onload", sfHover); <?php } ?> <?php */ ?> </script> <script type="text/javascript" charset="utf-8">/*<![CDATA[*/ window.addEvent('domready', init); function init() { myTabs1 = new mootabs('myTabs', {height: '320px', width: '300px', changeTransition: Fx.Transitions.Back.easeOut, mouseOverClass: 'over'}); } </script> <meta name="<API key>" content="<API key>" /> <meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <?php wp_head();flush(); ?> </head> <body> <div class="bodywrapper"> <div id="header"><?php /** header **/ ?><div id="twitter-badge"><a href="http://twitter.com/<?php if ($apa_Twitter == ''){echo '_fearlessflyer';}else{echo $apa_Twitter;} ?>" onclick="pageTracker._trackEvent('Twitter', 'Follow me');" >follow</a></div><!--twitter-badge--> <?php if (is_front_page()) { ?><h1><?php } ?><a id="logo" href="<?php bloginfo('url');?>"><?php bloginfo('name');?></a><?php if (is_front_page()) { ?></h1><?php } ?> <?php if (is_front_page()) { ?><h2 style="float:left;margin:-20px 0 10px 10px;font-family:verdana,arial,helvetica;font-size:10px;font-weight:bold;">Where aspiring photographers <span style="font-size:11px;font-style:italic;color:#750000">click</span> with the pros</h2><?php } else { ?> <p style="float:left;margin:-20px 0 10px 10px;font-family:verdana,arial,helvetica;font-size:10px;font-weight:bold;">Where aspiring photographers <span style="color:#750000;font-style:italic;font-size:11px;">click</span> with the pros</p> <?php } ?> <div id="navigation"> <div id="page-nav"> <ul> <li id="welcome" class="current_page_item2"><a href="<?php bloginfo('url');?>" title="Home">Welcome</a></li> <li class="cat-item cat-page<?php if (is_page('2')) { ?> current-cat<?php } ?>"><a href="/about/" title="About the Photography Parlour">About</a></li> <li class="cat-item cat-page"><a href="/forum/" title="photography forum">Forum</a></li> <li class="cat-item cat-page"><a href="/shop/" title="photography shop">Shop</a></li> <li class="cat-item cat-page"><a href="/<API key>/" title="photography Advertising Information">Advertise</a></li> <li class="cat-item cat-page"><a href="/media-center/" title="Photography Media Center">Media Center</a></li> <li class="cat-item cat-page"><a href="/2010/05/<API key>/1937" title="Contribute to The Photography Parlour">Contribute</a></li> <li class="cat-item cat-page"><a href="/contact/" title="contact the photography parlour team">Contact</a></li> </ul> <span id="login"><?php /* <a href="<?php echo get_option('home'); ?>/wp-admin/">Login to Site</a> <a href="/<API key>/" title="Information for Advertisers">Advertising Info</a>*/ ?> <a href="http: <a class="rss" href="http://feeds.feedburner.com/<API key>" onclick="pageTracker._trackEvent('RSS', 'RSS FEED sign up');"></a> </span> </div><!--page-nav <script type="text/javascript">/*<![CDATA[*/Cufon.now();/*]]>*/</script> <div id="cat-nav"> <ul id="nav2"> <?php wp_list_categories('title_li=&sort_column=menu_order&exclude=1,114,115');?> </ul> </div><!--cat-nav </div><!--navigation </div><!--header <div id="wrap"> <?php Forumticker();
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Drawing; <summary> An AND gate class to store the correct image and calculate the appropriate output </summary> public class AndGate : Gate { <summary> Constructor </summary> public AndGate() { this.Input = new InputPoint[2]; this.Input[0] = new InputPoint(-45, -9, 10, this); this.Input[1] = new InputPoint(-45, 8, 10, this); this.Output = new OutputPoint(44, 0, 20, this); this.Img[0] = CircuitSimLib.Properties.Resources.and; } <summary> Calculates the output for an AND gate </summary> <returns>Returns a calculated int</returns> public override bool CalculateOutput() { return Input[0].<API key>() && Input[1].<API key>(); } }
<?php $social_channels = $view_data['settings']['right_tab']['social_channels']; $bar_layout_design = $view_data['settings']['right_tab']['bar_layout_design']; $call_to_action = $view_data['settings']['right_tab']['call_to_action']; $visibility_settings = $view_data['settings']['right_tab']['visibility_settings']; $channels = array( 'Facebook'=>'Facebook', 'Twitter'=>'Twitter', 'Google'=>'Google', 'Linkedin'=>'Linkedin', 'Pinterest'=>'Pinterest', 'Digg'=>'Digg', 'Myspace'=>'Myspace', 'Stumbleupon'=>'Stumbleupon', 'Bebo'=>'Bebo', 'Blogger'=>'Blogger', 'Delicious'=>'Delicious', 'Xing'=>'Xing', 'Tumblr'=>'Tumblr', 'Technorati'=>'Technorati', 'Reddit'=>'Reddit', 'Netlog'=>'Netlog', 'Identi'=>'Identi', 'Friendfeed'=>'Friendfeed', 'Evernote'=>'Evernote', 'Diigo'=>'Diigo', 'VK'=>'VK', 'Email'=>'Email', ); ?> <div id="<API key>" class="modal widget-settings" tabindex="-1" role="dialog" aria-labelledby="registerShareLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button> <h3><?php echo $social_channels['settings_category']; ?></h3> </div> <div class="modal-body"> <div class="drag-links row"> <div class="col-md-5"> <h5>Active channels</h5> <form class="form-horizontal" id="<API key>" novalidate="novalidate" title="<?php echo $social_channels['settings_category']; ?>"> <ul id="socialsuse" class="connected list" style="margin:0;"> <?php $socials = explode(',', $social_channels['socials']); foreach($socials as $social){ echo '<li class="'.$social.'"><div class="share-icns"></div><span>'.$social.'</span><input type="hidden" id="socials" name="options[socials][]" value="'.$social.'" /></li>'; unset($channels["{$social}"]); } ?> </ul> <div class="form-group" id="<API key>" style="margin-top: 20px;"> <h5>Open channel sharing in</h5> <select class="selectpicker form-control" name="options[socials_target]" id="socials_target" data-style="btn-default"> <option value="window" <?php echo($social_channels['socials_target'] == 'window')? 'selected': ''; ?>>New window</option> <option value="tab" <?php echo($social_channels['socials_target'] == 'tab')? 'selected': ''; ?>>New tab</option> </select> </div> </form> </div> <div class="col-md-1"> <div class="between-connected">Drag to activate <span class="appz-point-left"></span></div> </div> <div class="col-md-5"> <h5>Inactive channels</h5> <ul class="connected list no2" style="margin:0;"> <?php foreach($channels as $channel){ echo '<li class="'.$channel.'"><div class="share-icns"></div><span>'.$channel.'</span><input type="hidden" id="socials" name="options[socials][]" value="'.$channel.'" /></li>'; } ?> </ul> </div> </div> <div style="clear:both;"></div> </div> <div class="modal-footer"> <button class="btn btn-icon btn-default circle_remove" data-dismiss="modal" aria-hidden="true"><i class="appz-close-3"></i> Close</button> <button type="submit" class="btn btn-icon btn-primary circle_ok <API key>" settings="#<API key>" layout="right_tab" data-loading-text="loading..."><i class="<API key>"></i> Save</button> </div> </div> </div> </div><!--/Social Channels Settings--> <div id="<API key>" class="modal widget-settings" tabindex="-1" role="dialog" aria-labelledby="registerShareLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button> <h3><?php echo $bar_layout_design['settings_category']; ?></h3> </div> <div class="modal-body"> <form class="form-horizontal" id="<API key>" novalidate="novalidate" title="<?php echo $bar_layout_design['settings_category']; ?>"> <div class="row"> <div class="col-md-6"> <div class="form-group" id="bgcolor-group"> <h5>Background color</h5> <div class="input-group"> <input type="text" id="bgcolor-right_tab" name="options[bgcolor]" value="<?php echo $bar_layout_design['bgcolor']; ?>" class="form-control"/> <span class="input-group-btn"> <button href="javascript:void(0)" class="btn undo-color" target="#bgcolor-right_tab" original="<?php echo $bar_layout_design['bgcolor']; ?>"><i class="appz-undo"></i> Undo</button> </span> </div> <br/><br/> <div class="palette" target="#bgcolor-right_tab"></div> </div> <div class="form-group span11" id="icons-group"> <h5>Icons style</h5> <select style="width: 100%;" id="icons" name="options[icons]" class="select-icons" layout="right_tab"> <option value="white" <?php echo($bar_layout_design['icons'] == 'white')? 'selected': ''; ?>>White</option> <option value="black" <?php echo($bar_layout_design['icons'] == 'black')? 'selected': ''; ?>>Black</option> <option value="icons" <?php echo($bar_layout_design['icons'] == 'icons')? 'selected': ''; ?>>Shiny</option> <option value="variety" <?php echo($bar_layout_design['icons'] == 'variety')? 'selected': ''; ?>>Variety</option> <option value="satin" <?php echo($bar_layout_design['icons'] == 'satin')? 'selected': ''; ?>>Satin</option> <option value="shiny2" <?php echo($bar_layout_design['icons'] == 'shiny2')? 'selected': ''; ?>>Shiny 2</option> <option value="elegant" <?php echo($bar_layout_design['icons'] == 'elegant')? 'selected': ''; ?>>Elegant</option> <option value="metro" <?php echo($bar_layout_design['icons'] == 'metro')? 'selected': ''; ?>>Metro</option> <option value="milky" <?php echo($bar_layout_design['icons'] == 'milky')? 'selected': ''; ?>>Milky</option> <option value="bald" <?php echo($bar_layout_design['icons'] == 'bald')? 'selected': ''; ?>>Bald</option> <option value="round" <?php echo($bar_layout_design['icons'] == 'round')? 'selected': ''; ?>>Round</option> </select> </div> <div class="form-group" id="toolstyle-group"> <h5>Tooltip style</h5> <select class="selectpicker form-control" name="options[toolstyle]" id="toolstyle" data-style="btn-default"> <option value="darkminimal" <?php echo($bar_layout_design['toolstyle'] == 'darkminimal')? 'selected': ''; ?>>Dark minimal</option> <option value="lightminimal" <?php echo($bar_layout_design['toolstyle'] == 'lightminimal')? 'selected': ''; ?>>Light minimal</option> <option value="darkgray" <?php echo($bar_layout_design['toolstyle'] == 'darkgray')? 'selected': ''; ?>>Dark gray</option> </select> </div> </div><!--/span6--> <div class="col-md-6"> <div class="form-group" id="textcolor-group"> <h5>Text color</h5> <div class="input-group"> <input type="text" id="textcolor-right_tab" name="options[textcolor]" value="<?php echo $bar_layout_design['textcolor']; ?>" class="form-control"/> <span class="input-group-btn"> <button href="javascript:void(0)" class="btn undo-color" target="#textcolor-right_tab" original="<?php echo $bar_layout_design['textcolor']; ?>"><i class="appz-undo"></i> Undo</button> </span> </div> <br/><br/> <div class="palette" target="#textcolor-right_tab"></div> </div> <div class="form-group" id="position-group"> <h5>Bar position</h5> <select class="selectpicker form-control" name="options[position]" id="position" data-style="btn-default"> <option value="center" <?php echo($bar_layout_design['position'] == 'center')? 'selected': ''; ?>>Center</option> <option value="top" <?php echo($bar_layout_design['position'] == 'top')? 'selected': ''; ?>>Top</option> <option value="bottom" <?php echo($bar_layout_design['position'] == 'bottom')? 'selected': ''; ?>>Bottom</option> </select> </div> </div><!--/span6--> </div><!--/row--> </form> </div> <div class="modal-footer"> <button class="btn btn-icon btn-default circle_remove" data-dismiss="modal" aria-hidden="true"><i class="appz-close-3"></i> Close</button> <button type="submit" class="btn btn-icon btn-primary circle_ok <API key>" settings="#<API key>" layout="right_tab" data-loading-text="loading..."><i class="<API key>"></i> Save</button> </div> </div> </div> </div><!--/Bar layout design Settings--> <div id="<API key>" class="modal widget-settings" tabindex="-1" role="dialog" aria-labelledby="registerShareLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button> <h3><?php echo $visibility_settings['settings_category']; ?></h3> </div> <div class="modal-body"> <form class="form-horizontal" id="<API key>" novalidate="novalidate" title="Visibility settings"> <?php if( $view_data['site_list'] != NULL ): ?> <div class="row"> <div class="col-md-12"> <div class="form-group span11" id="exclude_blogs-group"> <h5>WPMU - Hide widget on specific blogs</h5> <select name="options[exclude_blogs][]" id="exclude_blogs" multiple ui_select style="width: 100%;" data-placeholder="Click to select blogs"> <?php foreach ( $view_data['site_list'] as $bid ) { $<API key> = get_blog_details( array( 'blog_id' => $bid->blog_id ) ); $option = '<option value="' . $bid->blog_id . '" '.((in_array($bid->blog_id, explode(',', $visibility_settings['exclude_blogs'])))? 'selected' : '').'>'; $option .= $<API key>->blogname; $option .= '</option>'; echo $option; } ?> </select> </div> </div> </div> <?php endif; ?> <div class="row"> <div class="col-md-6"> <div class="form-group span11" id="exclude_pages-group"> <h5>Hide widget on specific pages</h5> <select name="options[exclude_pages][]" id="exclude_pages" multiple ui_select style="width: 100%;" <?php echo(($view_data['site_list'] != NULL)? 'disabled' : 'data-placeholder="Click to select pages"'); ?>> <?php if($view_data['site_list'] == NULL) { $pages = get_pages(); foreach ( $pages as $page ) { $option = '<option value="' . $page->ID . '" '.((in_array($page->ID, explode(',', $visibility_settings['exclude_pages'])))? 'selected' : '').'>'; $option .= $page->post_title; $option .= '</option>'; echo $option; } } else { echo '<option selected="selected">Temporary disabled for WPMU</option>'; } ?> </select> </div> <div class="form-group span11" id="on_home-group"> <h5>Show widget on Home page</h5> <div class="toggle-button" <API key>="info"> <input data-toggle="value" target_id="on_home-right_tab" target_name="options[on_home]" type="checkbox" value="1" <?php echo($visibility_settings['on_home'] == 0)? '': 'checked="checked"'; ?>/> </div> </div> <div class="form-group span11" id="on_posts-group"> <h5>Show widget on posts</h5> <div class="toggle-button" <API key>="info"> <input data-toggle="value" target_id="on_posts-right_tab" target_name="options[on_posts]" type="checkbox" value="1" <?php echo($visibility_settings['on_posts'] == 0)? '': 'checked="checked"'; ?>/> </div> </div> </div><!--/span6--> <div class="col-md-6"> <div class="form-group span11" id="exclude_pages-group"> <h5>Hide widget on specific posts</h5> <select name="options[exclude_posts][]" id="exclude_posts" multiple ui_select style="width: 100%;" <?php echo(($view_data['site_list'] != NULL)? 'disabled' : 'data-placeholder="Click to select posts"'); ?>> <?php if($view_data['site_list'] == NULL) { $posts = get_posts(); foreach ( $posts as $post ) { $option = '<option value="' . $post->ID . '" '.((in_array($post->ID, explode(',', $visibility_settings['exclude_posts'])))? 'selected' : '').'>'; $option .= $post->post_title; $option .= '</option>'; echo $option; } } else { echo '<option selected="selected">Temporary disabled for WPMU</option>'; } ?> </select> </div> <div class="form-group span11" id="on_pages-group"> <h5>Show widget on pages</h5> <div class="toggle-button" <API key>="info"> <input data-toggle="value" target_id="on_pages-bottom_tab" target_name="options[on_pages]" type="checkbox" value="1" <?php echo($visibility_settings['on_pages'] == 0)? '': 'checked="checked"'; ?>/> </div> </div> <div class="form-group span11" id="on_custom-group"> <h5>Show widget on custom post types</h5> <select name="options[on_custom][]" id="on_custom" multiple ui_select style="width: 100%;" <?php echo(($view_data['site_list'] != NULL)? 'disabled' : 'data-placeholder="Click to select post types"'); ?>> <?php if($view_data['site_list'] == NULL) { $args=array( 'public' => true, '_builtin' => false ); $post_types=get_post_types($args,'names'); foreach ( $post_types as $post_type ) { $option = '<option value="' . $post_type . '" '.((in_array($post_type, explode(',', $visibility_settings['on_custom'])))? 'selected' : '').'>'; $option .= $post_type; $option .= '</option>'; echo $option; } } else { echo '<option selected="selected">Temporary disabled for WPMU</option>'; } ?> </select> </div> </div><!--/span6--> </div><!--/row--> </form> </div> <div class="modal-footer"> <button class="btn btn-icon btn-default circle_remove" data-dismiss="modal" aria-hidden="true"><i class="appz-close-3"></i> Close</button> <button type="submit" class="btn btn-icon btn-primary circle_ok <API key>" settings="#<API key>" layout="right_tab" data-loading-text="loading..."><i class="<API key>"></i> Save</button> </div> </div> </div> </div><!--/Visibility Settings--> <! <div id="preview_right_tab" class="modal <API key>" tabindex="-1" role="dialog" wp_address="<?php echo get_site_url(); ?>/?cunjo=right_tab" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button> <h3>Preview</h3> </div> <div class="modal-body"> Preview here </div> <div class="modal-footer"> <button class="btn btn-icon btn-default circle_remove" data-dismiss="modal" aria-hidden="true"><i class="appz-close-3"></i> Close</button> </div> </div> </div> </div><!--/Preview Widget--> <?php //echo '<pre>'.print_r($view_data, true).'</pre>'; ?>
import os from collections import OrderedDict from .sqldatabase import SqlDatabase from .retrieve_core_info import retrieveCoreInfo # Root class that all SQL table updaters derive from class SqlTableUpdater(): def __init__(self, tableName, tableColumns=[], coreInfo={}): self.tableName = tableName self.columnsDict = OrderedDict(tableColumns) self.dbFile = os.path.join(os.getcwd().replace("python", "metadata"), "libretro.sqlite") self.dbFileExists = os.path.isfile(self.dbFile) self.coreInfo = coreInfo # self.filterUnusedCores() def updateTable(self): pass def updateColumns(self, database, additionalStatement: str = ""): if not self.dbFileExists: database.createTable(self.tableName, self.columnsDict, additionalStatement) else: try: database.deleteTable(self.tableName) except: database.createTable(self.tableName, self.columnsDict, additionalStatement) def __del__(self): print("Updated " + self.tableName + " table.") def libretroSystemList(self): systems = [] for k, v in self.coreInfo['cores'].items(): if "categories" not in v or v["categories"] != "Emulator": continue if "database" in v: name = v["database"].split("|") for n in name: systems.append(n) # Split console and manufacturer names # Not really necessary for Libretro identifiers #tup = n.split(" - ") ## "MAME" #if len(tup) == 1: # systems.append(tup[0]) ## Nearly every one #elif len(tup) == 2: # systems.append(tup[1]) ## Sega - Master System - Mark III ## Sega - Mega Drive - Genesis #elif len(tup) == 3: # systems.append(tup[1]) # There are some cores that do not have "database" defined elif "systemname" in v: systems.append(v["systemname"]) systems = list(set(systems)) systems.sort() return systems # This map defines all Libretro-based systems that Phoenix supports. If it isn't in here, it isn't supported by Phoenix! # TODO: Place this information into an entirely separate database # WARNING: Do NOT change Phoenix UUIDs (1st column), even if there are spelling mistakes. Change friendlyName if you really need to. <API key> = { # friendlyName: North American console name without manufacturer # shortName: Abbreviation (typically 3 letters) # enabled: True iff a core is available, Phoenix can run it, and the game scanner can find it (extensions set) # Everything else "Arcade": {"enabled": False, "defaultCore": "mame_libretro", "friendlyName": "", "shortName": "", "manufacturer": "(Various)" }, # Conspicuously missing from No-Intro "Amstrad - CPC": {"enabled": False, "defaultCore": "cap32_libretro", "friendlyName": "", "shortName": "", "manufacturer": "Amstrad" }, "Atari - 2600": {"enabled": True, "defaultCore": "stella_libretro", "friendlyName": "", "shortName": "", "manufacturer": "Atari" }, "Capcom - CP System I": {"enabled": False, "defaultCore": "<API key>", "friendlyName": "", "shortName": "", "manufacturer": "Capcom" }, "Capcom - CP System II": {"enabled": False, "defaultCore": "<API key>", "friendlyName": "", "shortName": "", "manufacturer": "Capcom" }, "Capcom - CP System III": {"enabled": False, "defaultCore": "<API key>", "friendlyName": "", "shortName": "", "manufacturer": "Capcom" }, "Capcom - CPS Changer": {"enabled": False, "defaultCore": "mess2014_libretro", "friendlyName": "", "shortName": "", "manufacturer": "Capcom" }, "CHIP-8": {"enabled": False, "defaultCore": "emux_chip8_libretro", "friendlyName": "", "shortName": "", "manufacturer": "(Various)" }, "DOS": {"enabled": False, "defaultCore": "dosbox_libretro", "friendlyName": "", "shortName": "", "manufacturer": "(Various)" }, "Mattel - Intellivision": {"enabled": False, "defaultCore": "mess2014_libretro", "friendlyName": "", "shortName": "", "manufacturer": "Mattel" }, "Nintendo - Game & Watch": {"enabled": False, "defaultCore": "gw_libretro", "friendlyName": "", "shortName": "", "manufacturer": "Nintendo" }, "Sinclair - ZX81": {"enabled": False, "defaultCore": "81_libretro", "friendlyName": "", "shortName": "", "manufacturer": "Sinclair" }, "SNK - Neo Geo": {"enabled": False, "defaultCore": "mess2014_libretro", "friendlyName": "", "shortName": "", "manufacturer": "SNK" }, # No-Intro, both official and non-official (ROM-based games) "Atari - 5200": {"enabled": False, "defaultCore": "mess2014_libretro", "friendlyName": "", "shortName": "", "manufacturer": "Atari" }, "Atari - 7800": {"enabled": False, "defaultCore": "mess2014_libretro", "friendlyName": "", "shortName": "", "manufacturer": "Atari" }, "Atari - Jaguar": {"enabled": True, "defaultCore": "<API key>", "friendlyName": "", "shortName": "", "manufacturer": "Atari" }, "Atari - Lynx": {"enabled": True, "defaultCore": "<API key>", "friendlyName": "", "shortName": "", "manufacturer": "Atari" }, "Atari - ST": {"enabled": True, "defaultCore": "hatari_libretro", "friendlyName": "", "shortName": "", "manufacturer": "Atari" }, "Bandai - WonderSwan Color": {"enabled": True, "defaultCore": "<API key>", "friendlyName": "", "shortName": "", "manufacturer": "Bandai" }, "Bandai - WonderSwan": {"enabled": True, "defaultCore": "<API key>", "friendlyName": "", "shortName": "", "manufacturer": "Bandai" }, "Casio - Loopy": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Casio" }, "Casio - PV-1000": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Casio" }, "Coleco - ColecoVision": {"enabled": False, "defaultCore": "mess2014_libretro", "friendlyName": "", "shortName": "", "manufacturer": "Coleco" }, #"Commodore - 64 (PP)": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Commodore" }, #"Commodore - 64 (Tapes)": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Commodore" }, "Commodore - 64": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Commodore" }, "Commodore - Amiga": {"enabled": True, "defaultCore": "puae_libretro", "friendlyName": "", "shortName": "", "manufacturer": "Commodore" }, "Commodore - Plus-4": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Commodore" }, "Commodore - VIC-20": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Commodore" }, "Emerson - Arcadia 2001": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Emerson" }, "Entex - Adventure Vision": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Entex" }, "Epoch - Super Cassette Vision": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Epoch" }, "Fairchild - Channel F": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Fairchild" }, "Funtech - Super Acan": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Funtech" }, "GamePark - GP32": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "GamePark" }, "GCE - Vectrex": {"enabled": True, "defaultCore": "vecx_libretro", "friendlyName": "", "shortName": "", "manufacturer": "GCE" }, "Hartung - Game Master": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Hartung" }, "LeapFrog - Leapster Learning Game System": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "LeapFrog" }, "Magnavox - Odyssey2": {"enabled": False, "defaultCore": "o2em_libretro", "friendlyName": u"Odyssey²", "shortName": "", "manufacturer": "Magnavox" }, "Microsoft - MSX 2": {"enabled": False, "defaultCore": "bluemsx_libretro", "friendlyName": "MSX2", "shortName": "", "manufacturer": "Microsoft" }, "Microsoft - MSX": {"enabled": False, "defaultCore": "bluemsx_libretro", "friendlyName": "", "shortName": "", "manufacturer": "Microsoft" }, #"Microsoft - XBOX 360 (DLC)": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Microsoft" }, #"Microsoft - XBOX 360 (Games on Demand)": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Microsoft" }, #"Microsoft - XBOX 360 (Title Updates)": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Microsoft" }, "NEC - PC Engine - TurboGrafx 16": {"enabled": True, "defaultCore": "<API key>", "friendlyName": "TurboGrafx 16", "shortName": "", "manufacturer": "NEC" }, "NEC - Super Grafx": {"enabled": True, "defaultCore": "<API key>", "friendlyName": "SuperGrafx", "shortName": "", "manufacturer": "NEC" }, #"Nintendo - Famicom Disk System": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Nintendo" }, "Nintendo - Game Boy Advance (e-Cards)": {"enabled": True, "defaultCore": "vbam_libretro", "friendlyName": "", "shortName": "", "manufacturer": "Nintendo" }, "Nintendo - Game Boy Advance": {"enabled": True, "defaultCore": "vbam_libretro", "friendlyName": "", "shortName": "", "manufacturer": "Nintendo" }, "Nintendo - Game Boy Color": {"enabled": True, "defaultCore": "gambatte_libretro", "friendlyName": "", "shortName": "", "manufacturer": "Nintendo" }, "Nintendo - Game Boy": {"enabled": True, "defaultCore": "gambatte_libretro", "friendlyName": "", "shortName": "", "manufacturer": "Nintendo" }, #"Nintendo - New Nintendo 3DS (DLC)": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Nintendo" }, "Nintendo - New Nintendo 3DS": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Nintendo" }, #"Nintendo - Nintendo 3DS (DLC)": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Nintendo" }, "Nintendo - Nintendo 3DS": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Nintendo" }, "Nintendo - Nintendo 64": {"enabled": True, "defaultCore": "<API key>", "friendlyName": "", "shortName": "", "manufacturer": "Nintendo" }, #"Nintendo - Nintendo DS (Download Play) (BETA)": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Nintendo" }, "Nintendo - Nintendo DS": {"enabled": True, "defaultCore": "desmume_libretro", "friendlyName": "", "shortName": "", "manufacturer": "Nintendo" }, #"Nintendo - Nintendo DSi (DLC)": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Nintendo" }, "Nintendo - Nintendo DSi": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Nintendo" }, "Nintendo - Nintendo Entertainment System": {"enabled": True, "defaultCore": "fceumm_libretro", "friendlyName": "", "shortName": "", "manufacturer": "Nintendo" }, #"Nintendo - Nintendo Wii (DLC)": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Nintendo" }, "Nintendo - Pokemon Mini": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Nintendo" }, "Nintendo - Satellaview": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Nintendo" }, "Nintendo - Sufami Turbo": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Nintendo" }, "Nintendo - Super Nintendo Entertainment System": {"enabled": True, "defaultCore": "<API key>", "friendlyName": "Super Nintendo", "shortName": "", "manufacturer": "Nintendo" }, "Nintendo - Virtual Boy": {"enabled": True, "defaultCore": "<API key>", "friendlyName": "", "shortName": "", "manufacturer": "Nintendo" }, "Nokia - N-Gage": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Nokia" }, "Philips - Videopac+": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Philips" }, "RCA - Studio II": {"enabled": False, "defaultCore": "mess2014_libretro", "friendlyName": "", "shortName": "", "manufacturer": "RCA" }, "Sega - 32X": {"enabled": True, "defaultCore": "picodrive_libretro", "friendlyName": "", "shortName": "", "manufacturer": "Sega" }, "Sega - Game Gear": {"enabled": True, "defaultCore": "<API key>", "friendlyName": "", "shortName": "", "manufacturer": "Sega" }, "Sega - Master System - Mark III": {"enabled": False, "defaultCore": "emux_sms_libretro", "friendlyName": "Master System", "shortName": "", "manufacturer": "Sega" }, "Sega - Mega Drive - Genesis": {"enabled": True, "defaultCore": "<API key>", "friendlyName": "Genesis", "shortName": "", "manufacturer": "Sega" }, "Sega - PICO": {"enabled": True, "defaultCore": "picodrive_libretro", "friendlyName": "", "shortName": "", "manufacturer": "Sega" }, "Sega - SG-1000": {"enabled": True, "defaultCore": "<API key>", "friendlyName": "", "shortName": "", "manufacturer": "Sega" }, "Sinclair - ZX Spectrum +3": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Sinclair" }, "SNK - Neo Geo Pocket Color": {"enabled": True, "defaultCore": "<API key>", "friendlyName": "", "shortName": "", "manufacturer": "SNK" }, "SNK - Neo Geo Pocket": {"enabled": True, "defaultCore": "<API key>", "friendlyName": "", "shortName": "", "manufacturer": "SNK" }, #"Sony - PlayStation 3 (DLC)": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Sony" }, #"Sony - PlayStation 3 (Downloadable)": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Sony" }, #"Sony - PlayStation 3 (PSN)": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Sony" }, #"Sony - PlayStation Portable (DLC)": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Sony" }, #"Sony - PlayStation Portable (PSN)": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Sony" }, #"Sony - PlayStation Portable (PSX2PSP)": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Sony" }, #"Sony - PlayStation Portable (UMD Music)": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Sony" }, #"Sony - PlayStation Portable (UMD Video)": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Sony" }, "Sony - PlayStation Portable": {"enabled": True, "defaultCore": "ppsspp_libretro", "friendlyName": "", "shortName": "", "manufacturer": "Sony" }, "Tiger - Game.com": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Tiger" }, "Tiger - Gizmondo": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Tiger" }, "VTech - CreatiVision": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "VTech" }, "VTech - V.Smile": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "VTech" }, "Watara - Supervision": {"enabled": True, "defaultCore": "mess2014_libretro", "friendlyName": "", "shortName": "", "manufacturer": "Watara" }, # Redump.org (disc-based games) "Apple - Macintosh": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Apple" }, "Bandai - Playdia": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Bandai" }, "Bandai / Apple - Pippin": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Bandai / Apple" }, "Commodore - Amiga CD": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Commodore" }, "Commodore - Amiga CD32": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Commodore" }, "Commodore - Amiga CDTV": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Commodore" }, "Fujitsu - FM Towns series": {"enabled": False, "defaultCore": "mess2014_libretro", "friendlyName": "", "shortName": "", "manufacturer": "Fujitsu" }, "IBM PC compatible": {"enabled": False, "defaultCore": "", "friendlyName": "PC", "shortName": "", "manufacturer": "(Various)" }, "Mattel - HyperScan": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Mattel" }, "Microsoft - Xbox": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Microsoft" }, "Namco / Sega / Nintendo - Triforce": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Sega" }, "NEC - PC Engine CD - TurboGrafx-CD": {"enabled": False, "defaultCore": "mess2014_libretro", "friendlyName": "TurboGrafx-CD", "shortName": "", "manufacturer": "NEC" }, "NEC - PC-88 series": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "NEC" }, "NEC - PC-98 series": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "NEC" }, "NEC - PC-FX - PC-FXGA": {"enabled": False, "defaultCore": "<API key>", "friendlyName": "", "shortName": "", "manufacturer": "NEC" }, "Nintendo - GameCube": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Nintendo" }, "Palm OS": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Palm" }, "Panasonic - 3DO Interactive Multiplayer": {"enabled": False, "defaultCore": "4do_libretro", "friendlyName": "", "shortName": "", "manufacturer": "Panasonic" }, "Philips - CD-i": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Philips" }, "Photo - CD": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "(Various)" }, "Sega - Chihiro": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Sega" }, "Sega - Dreamcast": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Sega" }, "Sega - Lindbergh": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Sega" }, "Sega - Mega-CD": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Sega" }, "Sega - Naomi": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Sega" }, "Sega - Saturn": {"enabled": True, "defaultCore": "yabause_libretro", "friendlyName": "", "shortName": "", "manufacturer": "Sega" }, "SNK - Neo Geo CD": {"enabled": False, "defaultCore": "mess2014_libretro", "friendlyName": "", "shortName": "", "manufacturer": "SNK" }, "Sony - PlayStation 2": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Sony" }, "Sony - PlayStation": {"enabled": True, "defaultCore": "<API key>", "friendlyName": "", "shortName": "", "manufacturer": "Sony" }, "VTech - V.Flash": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "VTech" }, # Seventh-generation consoles (circa 2005) "Microsoft - Xbox 360": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Microsoft" }, "Nintendo - Wii": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Nintendo" }, "Sony - PlayStation 3": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Sony" }, # Eighth-generation consoles (circa 2012) "Microsoft - Xbox One": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Microsoft" }, "Nintendo - Wii U": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Nintendo" }, "Sony - PlayStation 4": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Sony" }, # Ninth-generation consoles (circa 2017) "Microsoft - Xbox One X": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Microsoft" }, "Nintendo - Switch": {"enabled": False, "defaultCore": "", "friendlyName": "", "shortName": "", "manufacturer": "Nintendo" }, } def phoenixSystems(self): return OrderedDict(sorted(self.<API key>.items(), key=lambda t: t[0])) def libretroToPhoenix(self, libretroSystem): return self.<API key>[libretroSystem] # This map essentially says "Register this Libretro core for this (these) Phoenix system(s)" when a .info file claims support for that system # If a core claims support for some Libretro ID, register that core for each Phoenix ID <API key> = { "3DO": {"Panasonic - 3DO Interactive Multiplayer"}, "Arcade (various)": {"Arcade"}, "Atari - 2600": {"Atari - 2600"}, "Atari - 5200": {"Atari - 5200"}, "Atari - 7800": {"Atari - 7800"}, "Atari - Jaguar": {"Atari - Jaguar"}, "Atari - Lynx": {"Atari - Lynx"}, "Atari ST/STE/TT/Falcon": {"Atari - ST"}, "Bandai - WonderSwan Color": {"Bandai - WonderSwan Color"}, "Bandai - WonderSwan": {"Bandai - WonderSwan"}, "CHIP-8": {"CHIP-8"}, "Commodore Amiga": {"Commodore - Amiga"}, "Commodore - C128": {"Arcade"}, "Commodore - 64": {"Commodore - 64"}, "CP System I": {"Capcom - CP System I"}, "CP System II": {"Capcom - CP System II"}, "CP System III": {"Capcom - CP System III"}, "CPC": {"Amstrad - CPC"}, "DOS": {"DOS"}, "FB Alpha - Arcade Games": {"Arcade"}, "GCE - Vectrex": {"GCE - Vectrex"}, "Handheld Electronic Game": {"Nintendo - Game & Watch"}, "IBM PC compatible": {"IBM PC compatible"}, "Magnavox - Odyssey2": {"Magnavox - Odyssey2"}, "MAME": {"Arcade"}, "MAME2003": {"Arcade"}, "Microsoft - MSX 2": {"Microsoft - MSX 2"}, "Microsoft - MSX2": {"Microsoft - MSX 2"}, "Microsoft - MSX": {"Microsoft - MSX"}, # MESS and UME "MULTI (various)": { "Atari - 2600", "Atari - 5200", "Atari - 7800", "Atari - Lynx", "Bandai - WonderSwan Color" "Bandai - WonderSwan", "Capcom - CPS Changer", "Coleco - ColecoVision", "Fujitsu - FM Towns series", "Magnavox - Odyssey2", "Mattel - Intellivision", "NEC - PC Engine - TurboGrafx 16", "NEC - PC Engine CD - TurboGrafx-CD", "NEC - Super Grafx", "Nintendo - Game Boy Advance", "Nintendo - Game Boy", "Philips - Videopac+", "RCA - Studio II", "Sega - Game Gear", "Sega - Master System - Mark III", "Sega - Mega Drive - Genesis", "Sega - PICO", "Sega - SG-1000", "SNK - Neo Geo CD", "SNK - Neo Geo", "Watara - Supervision", }, "NEC - PC Engine - TurboGrafx 16": {"NEC - PC Engine - TurboGrafx 16"}, "NEC - PC Engine SuperGrafx": {"NEC - Super Grafx"}, "NEC - PC Engine CD - TurboGrafx-CD": {"NEC - Super Grafx"}, "NEC - PC-FX": {"NEC - PC-FX - PC-FXGA"}, "NEC - Super Grafx": {"NEC - Super Grafx"}, "Neo Geo": {"SNK - Neo Geo"}, "Nintendo - 3DS": {"Nintendo - Nintendo 3DS"}, "Nintendo - Family Computer Disk System": {"Nintendo - Nintendo Entertainment System"}, "Nintendo - Famicom Disk System": {"Nintendo - Nintendo Entertainment System"}, "Nintendo - Game & Watch": {"Nintendo - Game & Watch"}, "Nintendo - Game Boy Advance (e-Cards)": {"Nintendo - Game Boy Advance (e-Cards)"}, "Nintendo - Game Boy Advance": {"Nintendo - Game Boy Advance"}, "Nintendo - Game Boy Color": {"Nintendo - Game Boy Color"}, "Nintendo - Game Boy": {"Nintendo - Game Boy"}, "Nintendo - GameCube": {"Nintendo - GameCube"}, "Nintendo - Nintendo 64": {"Nintendo - Nintendo 64"}, "Nintendo - Nintendo 64DD": {"Nintendo - Nintendo 64"}, "Nintendo - Nintendo DS": {"Nintendo - Nintendo DS"}, "Nintendo - Nintendo DS (Download Play)": {"Nintendo - Nintendo DS"}, "Nintendo - Nintendo DS (Download Play) (BETA)": {"Nintendo - Nintendo DS"}, "Nintendo - Nintendo DS Decrypted": {"Nintendo - Nintendo DS"}, "Nintendo - Nintendo Entertainment System": {"Nintendo - Nintendo Entertainment System"}, "Nintendo - Pokemon Mini": {"Nintendo - Pokemon Mini"}, "Nintendo - Sufami Turbo": {"Nintendo - Sufami Turbo"}, "Nintendo - Super Nintendo Entertainment System": {"Nintendo - Super Nintendo Entertainment System"}, "Nintendo - Virtual Boy": {"Nintendo - Virtual Boy"}, "Nintendo - Wii": {"Nintendo - Wii"}, "PC": {"IBM PC compatible"}, "PC-FX": {"NEC - PC-FX - PC-FXGA"}, "PC-98": {"NEC - PC-98 series"}, "Phillips - Videopac+": {"Philips - Videopac+"}, "Sega - 32X": {"Sega - 32X"}, "Sega - Dreamcast": {"Sega - Dreamcast"}, "Sega - Game Gear": {"Sega - Game Gear"}, "Sega - Master System - Mark III": {"Sega - Master System - Mark III"}, "Sega - Mega Drive - Genesis": {"Sega - Mega Drive - Genesis"}, "Sega - Mega-CD - Sega CD": {"Sega - Mega-CD"}, "Sega - NAOMI": {"Sega - Naomi"}, "Sega - PICO": {"Sega - PICO"}, "Sega - Saturn": {"Sega - Saturn"}, "Sega - SG-1000": {"Sega - SG-1000"}, "Sharp - X68000": {"Arcade"}, "Sinclair - ZX 81": {"Sinclair - ZX81"}, "Sinclair - ZX Spectrum": {"Sinclair - ZX Spectrum +3"}, "Sinclair - ZX Spectrum +3": {"Sinclair - ZX Spectrum +3"}, "SNK - Neo Geo Pocket Color": {"SNK - Neo Geo Pocket Color"}, "SNK - Neo Geo Pocket": {"SNK - Neo Geo Pocket"}, "Sony - PlayStation Portable": {"Sony - PlayStation Portable"}, "Sony - PlayStation": {"Sony - PlayStation"}, "The 3DO Company - 3DO": {"Panasonic - 3DO Interactive Multiplayer"}, "Uzebox": {"Arcade"}, "ZX Spectrum (various)": {"Sinclair - ZX Spectrum +3"}, } # Not all Phoenix IDs are availble in OpenVGDB, fail silently and gracefully if a match isn't found def phoenixToOpenVGDB(self, phoenixID): ret = "" try: ret = self.<API key>[phoenixID] except KeyError: ret = "" return ret <API key> = { "Panasonic - 3DO Interactive Multiplayer": "3DO Interactive Multiplayer", "Arcade": "Arcade", "Atari - 2600": "Atari 2600", "Atari - 5200": "Atari 5200", "Atari - 7800": "Atari 7800", "Atari - Jaguar": "Atari Jaguar CD", "Atari - Jaguar": "Atari Jaguar", "Atari - Lynx": "Atari Lynx", "Bandai - WonderSwan Color": "Bandai WonderSwan Color", "Bandai - WonderSwan": "Bandai WonderSwan", "Coleco - ColecoVision": "Coleco ColecoVision", "GCE - Vectrex": "GCE Vectrex", "Mattel - Intellivision": "Intellivision", "Magnavox - Odyssey2": "Magnavox Odyssey2", "NEC - PC Engine CD - TurboGrafx-CD": "NEC PC Engine CD/TurboGrafx-CD", "NEC - PC Engine - TurboGrafx 16": "NEC PC Engine/TurboGrafx-16", "NEC - PC-FX - PC-FXGA": "NEC PC-FX", "NEC - Super Grafx": "NEC SuperGrafx", "Nintendo - Nintendo 64": "Nintendo 64", "Nintendo - Nintendo DS": "Nintendo DS", "Nintendo - Nintendo Entertainment System": "Nintendo Entertainment System", "Nintendo - Nintendo Entertainment System": "Nintendo Famicom Disk System", "Nintendo - Game Boy Advance": "Nintendo Game Boy Advance", "Nintendo - Game Boy Color": "Nintendo Game Boy Color", "Nintendo - Game Boy": "Nintendo Game Boy", "Nintendo - GameCube": "Nintendo GameCube", "Nintendo - Super Nintendo Entertainment System": "Nintendo Super Nintendo Entertainment System", "Nintendo - Virtual Boy": "Nintendo Virtual Boy", "Nintendo - Wii": "Nintendo Wii", "Sega - 32X": "Sega 32X", "Sega - Mega-CD": "Sega CD/Mega-CD", "Sega - Game Gear": "Sega Game Gear", "Sega - Mega Drive - Genesis": "Sega Genesis/Mega Drive", "Sega - Master System - Mark III": "Sega Master System", "Sega - Saturn": "Sega Saturn", "Sega - SG-1000": "Sega SG-1000", "SNK - Neo Geo Pocket Color": "SNK Neo Geo Pocket Color", "SNK - Neo Geo Pocket": "SNK Neo Geo Pocket", "Sony - PlayStation Portable": "Sony PlayStation Portable", "Sony - PlayStation": "Sony PlayStation", } def <API key>(self): return OrderedDict(sorted(self.<API key>.items(), key=lambda t: t[0])) <API key> = { "3DO Interactive Multiplayer": "Panasonic - 3DO Interactive Multiplayer", "Arcade": "Arcade", "Atari 2600": "Atari - 2600", "Atari 5200": "Atari - 5200", "Atari 7800": "Atari - 7800", "Atari Jaguar CD": "Atari - Jaguar", "Atari Jaguar": "Atari - Jaguar", "Atari Lynx": "Atari - Lynx", "Bandai WonderSwan Color": "Bandai - WonderSwan Color", "Bandai WonderSwan": "Bandai - WonderSwan", "Coleco ColecoVision": "Coleco - ColecoVision", "GCE Vectrex": "GCE - Vectrex", "Intellivision": "Mattel - Intellivision", "Magnavox Odyssey2": "Magnavox - Odyssey2", "NEC PC Engine CD/TurboGrafx-CD": "NEC - PC Engine CD - TurboGrafx-CD", "NEC PC Engine/TurboGrafx-16": "NEC - PC Engine - TurboGrafx 16", "NEC PC-FX": "NEC - PC-FX - PC-FXGA", "NEC SuperGrafx": "NEC - Super Grafx", "Nintendo 64": "Nintendo - Nintendo 64", "Nintendo DS": "Nintendo - Nintendo DS", "Nintendo Entertainment System": "Nintendo - Nintendo Entertainment System", "Nintendo Famicom Disk System": "Nintendo - Nintendo Entertainment System", "Nintendo Game Boy Advance": "Nintendo - Game Boy Advance", "Nintendo Game Boy Color": "Nintendo - Game Boy Color", "Nintendo Game Boy": "Nintendo - Game Boy", "Nintendo GameCube": "Nintendo - GameCube", "Nintendo Super Nintendo Entertainment System": "Nintendo - Super Nintendo Entertainment System", "Nintendo Virtual Boy": "Nintendo - Virtual Boy", "Nintendo Wii": "Nintendo - Wii", "Sega 32X": "Sega - 32X", "Sega CD/Mega-CD": "Sega - Mega-CD", "Sega Game Gear": "Sega - Game Gear", "Sega Genesis/Mega Drive": "Sega - Mega Drive - Genesis", "Sega Master System": "Sega - Master System - Mark III", "Sega Saturn": "Sega - Saturn", "Sega SG-1000": "Sega - SG-1000", "SNK Neo Geo Pocket Color": "SNK - Neo Geo Pocket Color", "SNK Neo Geo Pocket": "SNK - Neo Geo Pocket", "Sony PlayStation Portable": "Sony - PlayStation Portable", "Sony PlayStation": "Sony - PlayStation", } def filterUnusedCores(self): for key in self.coreInfo["cores"].keys(): if ( # No reason specified #"4do_libretro" == key # or "81_libretro" == key # or "bluemsx_libretro" == key # or "<API key>" == key # or "<API key>" == key # or "<API key>" == key # or "cap32_libretro" == key # or "catsfc_libretro" == key # or "dosbox_libretro" == key # or "emux_chip8_libretro" == key # or "<API key>" == key # or "<API key>" == key # or "fmsx_libretro" == key # or "gpsp_libretro" == key # or "gw_libretro" == key # or "handy_libretro" == key # or "hatari_libretro" == key # or "imame4all_libretro" == key # or "mame078_libretro" == key # or "mame2010_libretro" == key # or "mame2014_libretro" == key # or "meteor_libretro" == key # or "o2em_libretro" == key # or "prosystem_libretro" == key # or "puae_libretro" == key # or "ume2014_libretro" == key # or "vecx_libretro" == key # or "<API key>" == key # ARM cores "pcsx" in key or "pocketsnes_libretro" == key ): del self.coreInfo["cores"][key]
#ifndef BUS_H #define BUS_H extern uint8_t device_address; void bus_interface_init(void); void bus_init(void); void __attribute__((noreturn)) bus_mainloop(void); #endif
#ifndef ICALBYDAYMASK_H #define ICALBYDAYMASK_H #import <Foundation/NSObject.h> #import "iCalRecurrenceRule.h" typedef enum { <API key> = 0x001, // order <API key> = 0x002, // 2^(order - 1) <API key> = 0x004, <API key> = 0x008, <API key> = 0x010, <API key> = 0x3ff, <API key> = 0x020, // 2^(order - 1) >> 5 <API key> = 0x040, <API key> = 0x080, <API key> = 0x100, <API key> = 0x200, } iCalWeekOccurrence; typedef iCalWeekOccurrence iCalWeekOccurrences[7]; // extern NSString *<API key>[]; @interface iCalByDayMask : NSObject { iCalWeekOccurrences days; } + (id) byDayMaskWithDays: (iCalWeekOccurrences) theDays; + (id) <API key>; - (id) initWithDays: (iCalWeekOccurrences) theDays; + (id) <API key>: (NSString *) byDayRule; - (id) initWithRuleString: (NSString *) byDayRule; + (id) <API key>: (NSArray *) values; - (id) <API key>: (NSArray *) values; - (BOOL) occursOnDay: (iCalWeekDay) weekDay; - (BOOL) occursOnDay: (iCalWeekDay) weekDay withWeekOccurrence: (iCalWeekOccurrence) occurrence; - (BOOL) occursOnDay: (iCalWeekDay) weekDay withWeekNumber: (int) week; - (BOOL) isWeekDays; //- (iCalWeekOccurrences *) allDays; - (iCalWeekDay) firstDay; - (int) firstOccurrence; - (iCalWeekOccurrences *) weekDayOccurrences; - (NSString *) asRuleString; - (NSString *) <API key>; - (NSArray *) asRuleArray; @end #endif /* ICALBYDAYMASK_H */
package teammates.test.cases.action; import org.testng.annotations.Test; import teammates.common.datatransfer.DataBundle; import teammates.common.datatransfer.attributes.<API key>; import teammates.common.datatransfer.attributes.<API key>; import teammates.common.datatransfer.attributes.<API key>; import teammates.common.datatransfer.attributes.<API key>; import teammates.common.datatransfer.questions.<API key>; import teammates.common.exception.<API key>; import teammates.common.util.Const; import teammates.common.util.EmailType; import teammates.common.util.EmailWrapper; import teammates.common.util.StringHelper; import teammates.common.util.TimeHelper; import teammates.logic.core.CoursesLogic; import teammates.storage.api.FeedbackQuestionsDb; import teammates.storage.api.FeedbackResponsesDb; import teammates.storage.api.FeedbackSessionsDb; import teammates.ui.controller.<API key>; import teammates.ui.controller.RedirectResult; /** * SUT: {@link <API key>}. */ public class <API key> extends BaseActionTest { private static final CoursesLogic coursesLogic = CoursesLogic.inst(); private final FeedbackSessionsDb fsDb = new FeedbackSessionsDb(); @Override protected String getActionUri() { return Const.ActionURIs.<API key>; } @Override protected void prepareTestData() { super.prepareTestData(); dataBundle = loadDataBundle("/<API key>.json"); <API key>(dataBundle); } @Override @Test public void <API key>() { prepareTestData(); <API key> <API key> = dataBundle.getInstructors().get("<API key>"); gaeSimulation.loginAsInstructor(<API key>.googleId); ______TS("Unsuccessful case: test empty feedback session name parameter"); String[] submissionParams = new String[]{ Const.ParamsNames.COURSE_ID, dataBundle.<API key>().get("response1ForQ1S1C1").courseId }; <API key> a; RedirectResult r; try { a = getAction(submissionParams); r = getRedirectResult(a); <API key>("Did not detect that parameters are null."); } catch (<API key> e) { assertEquals(String.format(Const.StatusCodes.NULL_POST_PARAMETER, Const.ParamsNames.<API key>), e.getMessage()); } ______TS("Unsuccessful case: test empty course id parameter"); submissionParams = new String[]{ Const.ParamsNames.<API key>, dataBundle.<API key>().get("response1ForQ1S1C1").feedbackSessionName }; try { a = getAction(submissionParams); r = getRedirectResult(a); <API key>("Did not detect that parameters are null."); } catch (<API key> e) { assertEquals(String.format(Const.StatusCodes.NULL_POST_PARAMETER, Const.ParamsNames.COURSE_ID), e.getMessage()); } ______TS("Successful case: edit existing answer"); FeedbackQuestionsDb fqDb = new FeedbackQuestionsDb(); <API key> fq = fqDb.getFeedbackQuestion("First Session", "idOfCourse1", 1); assertNotNull("Feedback question not found in database", fq); FeedbackResponsesDb frDb = new FeedbackResponsesDb(); <API key> fr = dataBundle.<API key>().get("response1ForQ1S1C1"); // necessary to get the correct responseId fr = frDb.getFeedbackResponse(fq.getId(), fr.giver, fr.recipient); assertNotNull("Feedback response not found in database", fr); <API key> = dataBundle.getInstructors().get("<API key>"); gaeSimulation.loginAsInstructor(<API key>.googleId); submissionParams = new String[]{ Const.ParamsNames.<API key> + "-1", "1", Const.ParamsNames.<API key> + "-1-0", fr.getId(), Const.ParamsNames.<API key>, fr.feedbackSessionName, Const.ParamsNames.COURSE_ID, fr.courseId, Const.ParamsNames.<API key> + "-1", fr.feedbackQuestionId, Const.ParamsNames.<API key> + "-1-0", fr.recipient, Const.ParamsNames.<API key> + "-1", fr.<API key>.toString(), Const.ParamsNames.<API key> + "-1-0", "Edited" + fr.getResponseDetails().getAnswerString() }; a = getAction(submissionParams); r = getRedirectResult(a); assertFalse(r.isError); assertEquals(Const.StatusMessages.<API key>, r.getStatusMessage()); assertEquals( <API key>(Const.ActionURIs.<API key>, r.isError, "<API key>"), r.<API key>()); assertNotNull(frDb.getFeedbackResponse(fq.getId(), fr.giver, fr.recipient)); // submission confirmation email not sent if parameter does not exist verifyNoEmailsSent(a); ______TS("Successful case: deleted response"); submissionParams = new String[]{ Const.ParamsNames.<API key> + "-1", "1", Const.ParamsNames.<API key> + "-1-0", fr.getId(), Const.ParamsNames.<API key>, fr.feedbackSessionName, Const.ParamsNames.COURSE_ID, fr.courseId, Const.ParamsNames.<API key> + "-1", fr.feedbackQuestionId, Const.ParamsNames.<API key> + "-1-0", fr.recipient, Const.ParamsNames.<API key> + "-1", fr.<API key>.toString(), Const.ParamsNames.<API key> + "-1-0", "", Const.ParamsNames.<API key>, "on" }; a = getAction(submissionParams); r = getRedirectResult(a); assertFalse(r.isError); assertEquals(Const.StatusMessages.<API key>, r.getStatusMessage()); assertEquals( <API key>( Const.ActionURIs.<API key>, r.isError, "<API key>"), r.<API key>()); assertNull(frDb.getFeedbackResponse(fq.getId(), fr.giver, fr.recipient)); // submission confirmation email sent <API key>(a, 1); EmailWrapper email = getEmailsSent(a).get(0); String courseName = coursesLogic.getCourse(fr.courseId).getName(); assertEquals(String.format(EmailType.<API key>.getSubject(), courseName, fr.feedbackSessionName), email.getSubject()); assertEquals(<API key>.email, email.getRecipient()); ______TS("Successful case: skipped question"); submissionParams = new String[]{ Const.ParamsNames.<API key> + "-1", "1", Const.ParamsNames.<API key>, fr.feedbackSessionName, Const.ParamsNames.COURSE_ID, fr.courseId, Const.ParamsNames.<API key> + "-1", fr.feedbackQuestionId, Const.ParamsNames.<API key> + "-1-0", fr.recipient, Const.ParamsNames.<API key> + "-1", fr.<API key>.toString(), Const.ParamsNames.<API key> + "-1-0", "", Const.ParamsNames.<API key>, "off" }; a = getAction(submissionParams); r = getRedirectResult(a); assertFalse(r.isError); assertEquals(Const.StatusMessages.<API key>, r.getStatusMessage()); assertEquals( <API key>( Const.ActionURIs.<API key>, r.isError, "<API key>"), r.<API key>()); assertNull(frDb.getFeedbackResponse(fq.getId(), fr.giver, fr.recipient)); // submission confirmation email not sent if parameter is not "on" verifyNoEmailsSent(a); ______TS("Successful case: new response"); submissionParams = new String[]{ Const.ParamsNames.<API key> + "-1", "1", Const.ParamsNames.<API key>, fr.feedbackSessionName, Const.ParamsNames.COURSE_ID, fr.courseId, Const.ParamsNames.<API key> + "-1", fr.feedbackQuestionId, Const.ParamsNames.<API key> + "-1-0", fr.recipient, Const.ParamsNames.<API key> + "-1", fr.<API key>.toString(), Const.ParamsNames.<API key> + "-1-0", "New " + fr.getResponseDetails().getAnswerString() }; a = getAction(submissionParams); r = getRedirectResult(a); assertFalse(r.isError); assertEquals(Const.StatusMessages.<API key>, r.getStatusMessage()); assertEquals( <API key>( Const.ActionURIs.<API key>, r.isError, "<API key>"), r.<API key>()); assertNotNull(frDb.getFeedbackResponse(fq.getId(), fr.giver, fr.recipient)); ______TS("Successful case: edit response, did not specify recipient"); fq = fqDb.getFeedbackQuestion("First Session", "idOfCourse1", 2); assertNotNull("Feedback question not found in database", fq); fr = dataBundle.<API key>().get("response1ForQ2S1C1"); // necessary to get the correct responseId fr = frDb.getFeedbackResponse(fq.getId(), fr.giver, fr.recipient); assertNotNull("Feedback response not found in database", fr); submissionParams = new String[]{ Const.ParamsNames.<API key> + "-2", "1", Const.ParamsNames.<API key> + "-2-0", fr.getId(), Const.ParamsNames.<API key>, fr.feedbackSessionName, Const.ParamsNames.COURSE_ID, fr.courseId, Const.ParamsNames.<API key> + "-2", fr.feedbackQuestionId, Const.ParamsNames.<API key> + "-2-0", "student1InCourse1@gmail.tmt", Const.ParamsNames.<API key> + "-2", fr.<API key>.toString(), Const.ParamsNames.<API key> + "-2-0", "Edited" + fr.getResponseDetails().getAnswerString() }; a = getAction(submissionParams); r = getRedirectResult(a); assertFalse(r.isError); assertEquals(Const.StatusMessages.<API key>, r.getStatusMessage()); assertEquals( <API key>( Const.ActionURIs.<API key>, r.isError, "<API key>"), r.<API key>()); assertNull(frDb.getFeedbackResponse(fq.getId(), fr.giver, fr.recipient)); ______TS("Successful case: new response, did not specify recipient"); submissionParams = new String[]{ Const.ParamsNames.<API key> + "-2", "1", Const.ParamsNames.<API key>, fr.feedbackSessionName, Const.ParamsNames.COURSE_ID, fr.courseId, Const.ParamsNames.<API key> + "-2", fr.feedbackQuestionId, Const.ParamsNames.<API key> + "-2-0", "student1InCourse1@gmail.tmt", Const.ParamsNames.<API key> + "-2", fr.<API key>.toString(), Const.ParamsNames.<API key> + "-2-0", fr.getResponseDetails().getAnswerString() }; a = getAction(submissionParams); r = getRedirectResult(a); assertFalse(r.isError); assertEquals(Const.StatusMessages.<API key>, r.getStatusMessage()); assertEquals( <API key>( Const.ActionURIs.<API key>, r.isError, "<API key>"), r.<API key>()); assertNull(frDb.getFeedbackResponse(fq.getId(), fr.giver, fr.recipient)); ______TS("Successful case: private session"); fq = fqDb.getFeedbackQuestion("Private Session", "idOfCourse1", 1); assertNotNull("Feedback question not found in database", fq); fr = dataBundle.<API key>().get("<API key>"); // necessary to get the correct responseId fr = frDb.getFeedbackResponse(fq.getId(), fr.giver, fr.recipient); assertNotNull("Feedback response not found in database", fr); submissionParams = new String[]{ Const.ParamsNames.<API key> + "-1", "1", Const.ParamsNames.<API key> + "-1-0", fr.getId(), Const.ParamsNames.<API key>, fr.feedbackSessionName, Const.ParamsNames.COURSE_ID, fr.courseId, Const.ParamsNames.<API key> + "-1", fr.feedbackQuestionId, Const.ParamsNames.<API key> + "-1-0", fr.recipient, Const.ParamsNames.<API key> + "-1", fr.<API key>.toString(), Const.ParamsNames.<API key> + "-1-0", "Edited" + fr.getResponseDetails().getAnswerString() }; a = getAction(submissionParams); r = getRedirectResult(a); assertFalse(r.isError); assertEquals(Const.StatusMessages.<API key>, r.getStatusMessage()); assertEquals( <API key>( Const.ActionURIs.<API key>, r.isError, "<API key>"), r.<API key>()); assertNotNull(frDb.getFeedbackResponse(fq.getId(), fr.giver, fr.recipient)); ______TS("Unsuccessful case: modified recipient to invalid recipient"); submissionParams = new String[]{ Const.ParamsNames.<API key> + "-1", "1", Const.ParamsNames.<API key> + "-1-0", fr.getId(), Const.ParamsNames.<API key>, fr.feedbackSessionName, Const.ParamsNames.COURSE_ID, fr.courseId, Const.ParamsNames.<API key> + "-1", fr.feedbackQuestionId, Const.ParamsNames.<API key> + "-1-0", "<API key>", Const.ParamsNames.<API key> + "-1", fr.<API key>.toString(), Const.ParamsNames.<API key> + "-1-0", fr.getResponseDetails().getAnswerString(), Const.ParamsNames.<API key>, "on" }; a = getAction(submissionParams); r = getRedirectResult(a); assertTrue(r.isError); assertEquals( <API key>( Const.ActionURIs.<API key>, r.isError, "<API key>"), r.<API key>()); assertNull(frDb.getFeedbackResponse(fq.getId(), fr.giver, "<API key>")); // submission confirmation email not sent if the action is an error, even with submission parameter "on" verifyNoEmailsSent(a); ______TS("Successful case: mcq: typical case"); DataBundle dataBundle = loadDataBundle("/<API key>.json"); <API key>(dataBundle); fq = fqDb.getFeedbackQuestion("MCQ Session", "FSQTT.idOfTypicalCourse1", 2); assertNotNull("Feedback question not found in database", fq); fr = dataBundle.<API key>().get("response1ForQ2S1C1"); // necessary to get the correct responseId fr = frDb.getFeedbackResponse(fq.getId(), fr.giver, fr.recipient); assertNotNull("Feedback response not found in database", fr); <API key> = dataBundle.getInstructors().get("<API key>"); gaeSimulation.loginAsInstructor(<API key>.googleId); submissionParams = new String[]{ Const.ParamsNames.<API key> + "-1", "1", Const.ParamsNames.<API key> + "-1-0", fr.getId(), Const.ParamsNames.<API key>, fr.feedbackSessionName, Const.ParamsNames.COURSE_ID, fr.courseId, Const.ParamsNames.<API key> + "-1", fr.feedbackQuestionId, Const.ParamsNames.<API key> + "-1-0", fr.recipient, Const.ParamsNames.<API key> + "-1", fr.<API key>.toString(), Const.ParamsNames.<API key> + "-1-0", "It's perfect" }; a = getAction(submissionParams); r = getRedirectResult(a); assertFalse(r.isError); assertEquals(Const.StatusMessages.<API key>, r.getStatusMessage()); assertEquals( <API key>( Const.ActionURIs.<API key>, r.isError, "FSQTT.<API key>"), r.<API key>()); assertNotNull(frDb.getFeedbackResponse(fq.getId(), fr.giver, fr.recipient)); ______TS("Successful case: mcq: question skipped"); submissionParams = new String[]{ Const.ParamsNames.<API key> + "-1", "1", Const.ParamsNames.<API key> + "-1-0", fr.getId(), Const.ParamsNames.<API key>, fr.feedbackSessionName, Const.ParamsNames.COURSE_ID, fr.courseId, Const.ParamsNames.<API key> + "-1", fr.feedbackQuestionId, Const.ParamsNames.<API key> + "-1-0", fr.recipient, Const.ParamsNames.<API key> + "-1", fr.<API key>.toString() }; a = getAction(submissionParams); r = getRedirectResult(a); assertFalse(r.isError); assertEquals(Const.StatusMessages.<API key>, r.getStatusMessage()); assertEquals( <API key>( Const.ActionURIs.<API key>, r.isError, "FSQTT.<API key>"), r.<API key>()); assertNull(frDb.getFeedbackResponse(fq.getId(), fr.giver, fr.recipient)); ______TS("Successful case: msq: typical case"); fq = fqDb.getFeedbackQuestion("MSQ Session", "FSQTT.idOfTypicalCourse1", 2); assertNotNull("Feedback question not found in database", fq); fr = dataBundle.<API key>().get("response1ForQ2S2C1"); // necessary to get the correct responseId fr = frDb.getFeedbackResponse(fq.getId(), fr.giver, fr.recipient); assertNotNull("Feedback response not found in database", fr); <API key> = dataBundle.getInstructors().get("<API key>"); gaeSimulation.loginAsInstructor(<API key>.googleId); submissionParams = new String[]{ Const.ParamsNames.<API key> + "-1", "1", Const.ParamsNames.<API key> + "-1-0", fr.getId(), Const.ParamsNames.<API key>, fr.feedbackSessionName, Const.ParamsNames.COURSE_ID, fr.courseId, Const.ParamsNames.<API key> + "-1", fr.feedbackQuestionId, Const.ParamsNames.<API key> + "-1-0", fr.recipient, Const.ParamsNames.<API key> + "-1", fr.<API key>.toString(), Const.ParamsNames.<API key> + "-1-0", "It's perfect" }; a = getAction(submissionParams); r = getRedirectResult(a); assertFalse(r.isError); assertEquals(Const.StatusMessages.<API key>, r.getStatusMessage()); assertEquals( <API key>( Const.ActionURIs.<API key>, r.isError, "FSQTT.<API key>"), r.<API key>()); assertNotNull(frDb.getFeedbackResponse(fq.getId(), fr.giver, fr.recipient)); ______TS("Successful csae: msq: question skipped"); submissionParams = new String[]{ Const.ParamsNames.<API key> + "-1", "1", Const.ParamsNames.<API key> + "-1-0", fr.getId(), Const.ParamsNames.<API key>, fr.feedbackSessionName, Const.ParamsNames.COURSE_ID, fr.courseId, Const.ParamsNames.<API key> + "-1", fr.feedbackQuestionId, Const.ParamsNames.<API key> + "-1-0", fr.recipient, Const.ParamsNames.<API key> + "-1", fr.<API key>.toString() }; a = getAction(submissionParams); r = getRedirectResult(a); assertFalse(r.isError); assertEquals(Const.StatusMessages.<API key>, r.getStatusMessage()); assertEquals( <API key>( Const.ActionURIs.<API key>, r.isError, "FSQTT.<API key>"), r.<API key>()); assertNull(frDb.getFeedbackResponse(fq.getId(), fr.giver, fr.recipient)); ______TS("Successful case: numerical scale: typical case"); fq = fqDb.getFeedbackQuestion("NUMSCALE Session", "FSQTT.idOfTypicalCourse1", 2); assertNotNull("Feedback question not found in database", fq); <API key> fqd = (<API key>) fq.getQuestionDetails(); fr = dataBundle.<API key>().get("response1ForQ2S3C1"); // necessary to get the correct responseId fr = frDb.getFeedbackResponse(fq.getId(), fr.giver, fr.recipient); assertNotNull("Feedback response not found in database", fr); <API key> = dataBundle.getInstructors().get("<API key>"); gaeSimulation.loginAsInstructor(<API key>.googleId); submissionParams = new String[]{ Const.ParamsNames.<API key> + "-1", "1", Const.ParamsNames.<API key> + "-1-0", fr.getId(), Const.ParamsNames.<API key>, fr.feedbackSessionName, Const.ParamsNames.COURSE_ID, fr.courseId, Const.ParamsNames.<API key> + "-1", fr.feedbackQuestionId, Const.ParamsNames.<API key> + "-1-0", fr.recipient, Const.ParamsNames.<API key> + "-1", fr.<API key>.toString(), Const.ParamsNames.<API key> + "-1-0", "3.5", Const.ParamsNames.<API key> + "-1-0", Integer.toString(fqd.getMinScale()), Const.ParamsNames.<API key> + "-1-0", Integer.toString(fqd.getMaxScale()), Const.ParamsNames.<API key> + "-1-0", StringHelper.<API key>(fqd.getStep()) }; a = getAction(submissionParams); r = getRedirectResult(a); assertFalse(r.isError); assertEquals(Const.StatusMessages.<API key>, r.getStatusMessage()); assertEquals( <API key>( Const.ActionURIs.<API key>, r.isError, "FSQTT.<API key>"), r.<API key>()); assertNotNull(frDb.getFeedbackResponse(fq.getId(), fr.giver, fr.recipient)); ______TS("Successful case: numerical scale: question skipped"); submissionParams = new String[]{ Const.ParamsNames.<API key> + "-1", "1", Const.ParamsNames.<API key> + "-1-0", fr.getId(), Const.ParamsNames.<API key>, fr.feedbackSessionName, Const.ParamsNames.COURSE_ID, fr.courseId, Const.ParamsNames.<API key> + "-1", fr.feedbackQuestionId, Const.ParamsNames.<API key> + "-1-0", fr.recipient, Const.ParamsNames.<API key> + "-1", fr.<API key>.toString(), Const.ParamsNames.<API key> + "-1-0", "", Const.ParamsNames.<API key> + "-1-0", Integer.toString(fqd.getMinScale()), Const.ParamsNames.<API key> + "-1-0", Integer.toString(fqd.getMaxScale()), Const.ParamsNames.<API key> + "-1-0", StringHelper.<API key>(fqd.getStep()) }; a = getAction(submissionParams); r = getRedirectResult(a); assertFalse(r.isError); assertEquals(Const.StatusMessages.<API key>, r.getStatusMessage()); assertEquals( <API key>( Const.ActionURIs.<API key>, r.isError, "FSQTT.<API key>"), r.<API key>()); assertNull(frDb.getFeedbackResponse(fq.getId(), fr.giver, fr.recipient)); ______TS("Successful case: const sum: typical case"); fq = fqDb.getFeedbackQuestion("CONSTSUM Session", "FSQTT.idOfTypicalCourse1", 2); assertNotNull("Feedback question not found in database", fq); fr = dataBundle.<API key>().get("response1ForQ2S4C1"); // necessary to get the correct responseId fr = frDb.getFeedbackResponse(fq.getId(), fr.giver, fr.recipient); assertNotNull("Feedback response not found in database", fr); <API key> fr2 = dataBundle.<API key>().get("response2ForQ2S4C1"); // necessary to get the correct responseId fr2 = frDb.getFeedbackResponse(fq.getId(), fr2.giver, fr2.recipient); assertNotNull("Feedback response not found in database", fr2); <API key> = dataBundle.getInstructors().get("<API key>"); gaeSimulation.loginAsInstructor(<API key>.googleId); submissionParams = new String[]{ Const.ParamsNames.<API key> + "-1", "2", Const.ParamsNames.<API key> + "-1-0", fr.getId(), Const.ParamsNames.<API key>, fr.feedbackSessionName, Const.ParamsNames.COURSE_ID, fr.courseId, Const.ParamsNames.<API key> + "-1", fr.feedbackQuestionId, Const.ParamsNames.<API key> + "-1-0", fr.recipient, Const.ParamsNames.<API key> + "-1", fr.<API key>.toString(), Const.ParamsNames.<API key> + "-1-0", "150", //Const sum question needs response to each recipient to sum up properly. Const.ParamsNames.<API key> + "-1-1", fr2.getId(), Const.ParamsNames.<API key>, fr2.feedbackSessionName, Const.ParamsNames.COURSE_ID, fr2.courseId, Const.ParamsNames.<API key> + "-1", fr2.feedbackQuestionId, Const.ParamsNames.<API key> + "-1-1", fr2.recipient, Const.ParamsNames.<API key> + "-1", fr2.<API key>.toString(), Const.ParamsNames.<API key> + "-1-1", "50", }; a = getAction(submissionParams); r = getRedirectResult(a); assertEquals(Const.StatusMessages.<API key>, r.getStatusMessage()); assertFalse(r.isError); assertEquals( <API key>( Const.ActionURIs.<API key>, r.isError, "FSQTT.<API key>"), r.<API key>()); assertNotNull(frDb.getFeedbackResponse(fq.getId(), fr.giver, fr.recipient)); assertNotNull(frDb.getFeedbackResponse(fq.getId(), fr2.giver, fr2.recipient)); ______TS("Successful case: const sum: question skipped"); submissionParams = new String[]{ Const.ParamsNames.<API key> + "-1", "1", Const.ParamsNames.<API key> + "-1-0", fr.getId(), Const.ParamsNames.<API key>, fr.feedbackSessionName, Const.ParamsNames.COURSE_ID, fr.courseId, Const.ParamsNames.<API key> + "-1", fr.feedbackQuestionId, Const.ParamsNames.<API key> + "-1-0", fr.recipient, Const.ParamsNames.<API key> + "-1", fr.<API key>.toString(), Const.ParamsNames.<API key> + "-1-0", "" }; a = getAction(submissionParams); r = getRedirectResult(a); assertFalse(r.isError); assertEquals(Const.StatusMessages.<API key>, r.getStatusMessage()); assertEquals( <API key>( Const.ActionURIs.<API key>, r.isError, "FSQTT.<API key>"), r.<API key>()); assertNull(frDb.getFeedbackResponse(fq.getId(), fr.giver, fr.recipient)); ______TS("Successful case: contrib qn: typical case"); // No tests since contrib qn can only be answered by students to own team members including self. } @Test public void <API key>() throws Exception { dataBundle = loadDataBundle("/<API key>.json"); FeedbackSessionsDb feedbackSessionDb = new FeedbackSessionsDb(); <API key> fs = dataBundle.getFeedbackSessions().get("Grace Period Session"); <API key> instructor = dataBundle.getInstructors().get("<API key>"); gaeSimulation.loginAsInstructor(instructor.googleId); String[] submissionParams = new String[]{ Const.ParamsNames.COURSE_ID, fs.getCourseId(), Const.ParamsNames.<API key>, fs.<API key>() }; ______TS("opened"); fs.setEndTime(TimeHelper.<API key>(1)); feedbackSessionDb.<API key>(fs); assertTrue(fs.isOpened()); assertFalse(fs.isInGracePeriod()); <API key> a = getAction(submissionParams); RedirectResult r = getRedirectResult(a); assertEquals( <API key>( Const.ActionURIs.<API key>, false, "<API key>"), r.<API key>()); assertEquals(Const.StatusMessages.<API key>, r.getStatusMessage()); assertFalse(r.isError); ______TS("during grace period"); fs.setEndTime(TimeHelper.<API key>(0)); feedbackSessionDb.<API key>(fs); assertFalse(fs.isOpened()); assertTrue(fs.isInGracePeriod()); a = getAction(submissionParams); r = getRedirectResult(a); assertEquals( <API key>(Const.ActionURIs.<API key>, false, "<API key>"), r.<API key>()); assertEquals(Const.StatusMessages.<API key>, r.getStatusMessage()); assertFalse(r.isError); ______TS("after grace period"); fs.setEndTime(TimeHelper.<API key>(-10)); feedbackSessionDb.<API key>(fs); assertFalse(fs.isOpened()); assertFalse(fs.isInGracePeriod()); a = getAction(submissionParams); r = getRedirectResult(a); assertEquals(Const.StatusMessages.<API key>, r.getStatusMessage()); } @Override protected <API key> getAction(String... params) { return (<API key>) gaeSimulation.getActionObject(getActionUri(), params); } @Override @Test protected void testAccessControl() throws Exception { dataBundle = <API key>(); <API key> fs = dataBundle.getFeedbackSessions().get("session1InCourse1"); String[] submissionParams = new String[]{ Const.ParamsNames.COURSE_ID, fs.getCourseId(), Const.ParamsNames.<API key>, fs.<API key>() }; <API key>(submissionParams); <API key>(submissionParams); <API key>(); } private void <API key>() throws Exception { dataBundle = <API key>(); <API key> fs = dataBundle.getFeedbackSessions().get("gracePeriodSession"); closeSession(fs); assertFalse(fs.isOpened()); assertTrue(fs.isInGracePeriod()); assertFalse(fs.isClosed()); String[] submissionParams = new String[]{ Const.ParamsNames.COURSE_ID, fs.getCourseId(), Const.ParamsNames.<API key>, fs.<API key>() }; <API key>(submissionParams); } private void closeSession(<API key> fs) throws Exception { fs.setEndTime(TimeHelper.<API key>(0)); fsDb.<API key>(fs); } }
#ifndef _INCLUDED_emserr_h #define _INCLUDED_emserr_h #include "types.h" #include "status.h" #if defined(__cplusplus) extern "C" { #endif extern tibems_status <API key>( tibemsErrorContext* errorContext); extern tibems_status <API key>( tibemsErrorContext errorContext); extern tibems_status <API key>( tibemsErrorContext errorContext, const char** string); extern tibems_status <API key>( tibemsErrorContext errorContext, const char** string); #ifdef __cplusplus } #endif #endif
# accounts/authentication.py import requests import logging from django.conf import settings from django.contrib.auth import get_user_model logger = logging.getLogger(__name__) User = get_user_model() PERSONA_VERIFY_URL = 'https://verifier.login.persona.org/verify' #DOMAIN = 'localhost' class Persona<API key>(object): def authenticate(self, assertion): logging.warning('entering authenticate function') response = requests.post( PERSONA_VERIFY_URL, data = {'assertion': assertion, 'audience': settings.DOMAIN} ) logging.warning('got response from persona') logging.warning(response.content.decode()) if response.ok and response.json()['status'] == 'okay': email = response.json()['email'] try: return User.objects.get(email=email) except User.DoesNotExist: return User.objects.create(email=email) else: logger.warning( 'Persona says no. Json was: {}'.format(response.json()) ) def get_user(self, email): try: return User.objects.get(email=email) except User.DoesNotExist: return None
#!/bin/bash for jobdir in $(ls -l|grep ^d|awk '{print $9}');do # Determine job type jobtype=$(echo $jobdir|cut -d '-' -f4) case $jobtype in absperm) sub="qsub -lwalltime=08:00:00 -lnodes=1:ppn=8 -N $jobdir -M tor@numericalrocks.com /home/steel/runscript-absperm.sh" ;; rwabsperm) sub="qsub -lwalltime=08:00:00 -lnodes=1:ppn=8 -N $jobdir -M tor@numericalrocks.com /home/steel/rwabsperm.sh" ;; rwff) sub="qsub -lwalltime=08:00:00 -lnodes=1:ppn=8 -N $jobdir -M tor@numericalrocks.com /home/steel/rwformationfactor.sh" ;; esac # Submit the job if jobdir has no .out files if (( $(ls -l $jobdir|grep -c .out) == 0 ));then cd $jobdir $sub cd .. fi done
#ifndef MIDI_CHUNK_H #define MIDI_CHUNK_H #include <ostream> #include <istream> #include <vector> #include "midi.h" namespace MIDI { class Chunk { public: char id[4]; u32 size; u8* data; Chunk(); Chunk(const char *i, const u32 s, const u8 *p = NULL); Chunk(std::istream & i); Chunk(const u8 *p); Chunk(const Chunk & c); ~Chunk(); Chunk & operator= (const Chunk & c); bool Write(std::ostream & o) const; bool Write(u8 *p) const; bool Read(std::istream & i); bool Read(const u8 *p); bool Read(const std::vector<u8> & b); void Dump(void) const; }; } #endif
#include <iostream> #include <fstream> #include <iterator> #include <string> #include <set> #include <stdio.h> #include <algorithm> using namespace std; typedef unsigned long long U64; typedef int S32; typedef unsigned int U32; typedef struct tag_things { U64 nCode; S32 nLongitude; S32 nLatitude; U32 nType:8; U32 nGender: 2; U32 nSub:8; U32 nFish:7; //(100g U32 nGears:3; #define _Gear_L0 0 #define _Gear_L1 1 #define _Gear_L2 2 #define _Gear_L3 3 #define _Gear_L4 4 U32 nRe:4; U32 nRe2; } Record_Things; bool operator<(const tag_things &lhs, const tag_things &rhs) { if (lhs.nCode != rhs.nCode) { return lhs.nCode < rhs.nCode; } if (lhs.nLatitude != rhs.nLatitude) { return lhs.nLatitude < rhs.nLatitude; } if (lhs.nLongitude != rhs.nLongitude) { return lhs.nLongitude < rhs.nLongitude; } return false; } int main(int argc, char *argv[]) { if (argc != 2) { cerr << "No input file!" << endl; return -1; } FILE *fp = fopen(argv[1], "r"); int num = 0; int cnt = 0; fread(&num, sizeof(int), 1, fp); printf("num: %d\n", num); Record_Things thing; set<Record_Things> rec_set; while (!feof(fp) && cnt < num) { fread(&thing, sizeof(Record_Things), 1, fp); rec_set.insert(thing); // printf("%lld, %d, %d, %d\n", thing.nCode, thing.nLongitude, // thing.nLatitude, thing.nRe2); ++cnt; } fclose(fp); // ofstream out_file("1.dat"); // out_file << num; // ostream_iterator<Record_Things> out_it(out_file, ""); // copy(rec_set.begin(), rec_set.end(), out_it); // out.close(); fp = fopen("1.dat", "wb"); fwrite(&num, sizeof(int), 1, fp); cout << sizeof(Record_Things) << endl; for (auto it = rec_set.begin(); it != rec_set.end(); ++it) { // cout << it->nCode << ", " << it->nLongitude << ", " << it->nLatitude // << ", " << it->nRe2 << endl; // out_file << *it; fwrite(&*it, sizeof(Record_Things), 1, fp); cout << sizeof(*it) << endl; } // out_file.close(); return 0; }
import os import sys import subprocess testP = { "2005": [ { "date": "2005-10-17", "videos": [ "http: "http://thecolbertreport.cc.com/videos/w9dr6d/first-show", "http://thecolbertreport.cc.com/videos/63ite2/<API key>", "http://thecolbertreport.cc.com/videos/2hvbwp/<API key>", "http://thecolbertreport.cc.com/videos/ydz3a0/stone-phillips", "http://thecolbertreport.cc.com/videos/4ewylv/<API key>", "http://thecolbertreport.cc.com/videos/e3mrnm/<API key>" ], "guest": "Stone Phillips" }, { "date": "2005-10-18", "videos": [ "http: "http://thecolbertreport.cc.com/videos/kzin67/<API key>", "http://thecolbertreport.cc.com/videos/5icgst/<API key>", "http://thecolbertreport.cc.com/videos/fydq17/lesley-stahl", "http://thecolbertreport.cc.com/videos/235ftw/<API key>", "http://thecolbertreport.cc.com/videos/joj31r/<API key>" ], "guest": "Lesley Stahl" }, { "date": "2005-10-19", "videos": [ "http: "http://thecolbertreport.cc.com/videos/gpmykq/<API key>", "http://thecolbertreport.cc.com/videos/95k30i/<API key>", "http://thecolbertreport.cc.com/videos/p42ju6/<API key>", "http://thecolbertreport.cc.com/videos/malmcz/<API key>", "http://thecolbertreport.cc.com/videos/db0w9q/fareed-zakaria", "http://thecolbertreport.cc.com/videos/8kkcau/<API key>" ], "guest": "Fareed Zakaria" }, { "date": "2005-10-20", "videos": [ "http: "http://thecolbertreport.cc.com/videos/p1n8k4/avian-flu", "http://thecolbertreport.cc.com/videos/mk7yrx/<API key>", "http://thecolbertreport.cc.com/videos/cz3euw/<API key>", "http://thecolbertreport.cc.com/videos/j1b7vj/jim-cramer", "http://thecolbertreport.cc.com/videos/rohluc/<API key>", "http://thecolbertreport.cc.com/videos/24lb41/<API key>" ], "guest": "Jim Cramer" }, { "date": "2005-10-24", "videos": [ "http: "http: "http://thecolbertreport.cc.com/videos/i491tt/lou-dobbs", "http://thecolbertreport.cc.com/videos/dd1sbx/<API key>", "http://thecolbertreport.cc.com/videos/wtqx4r/<API key>", "http://thecolbertreport.cc.com/videos/qgvny1/mug-shot", "http://thecolbertreport.cc.com/videos/vuftif/<API key>" ], "guest": "Lou Dobbs" }, { "date": "2005-10-25", "videos": [ "http: "http://thecolbertreport.cc.com/videos/whvmzj/<API key>", "http://thecolbertreport.cc.com/videos/iqvyat/<API key>", "http://thecolbertreport.cc.com/videos/qwe0c7/<API key>", "http://thecolbertreport.cc.com/videos/7ioxmq/greg-behrendt", "http://thecolbertreport.cc.com/videos/nwkm8y/<API key>", "http://thecolbertreport.cc.com/videos/vzk1ho/<API key>" ], "guest": "Greg Behrendt" }, { "date": "2005-10-26", "videos": [ "http: "http://thecolbertreport.cc.com/videos/39lnsj/outsourcing", "http://thecolbertreport.cc.com/videos/7o86ff/<API key>", "http://thecolbertreport.cc.com/videos/yuq4bm/neil-degrasse-tyson", "http://thecolbertreport.cc.com/videos/5fyjl2/<API key>", "http://thecolbertreport.cc.com/videos/wsfpru/the-pulse" ], "guest": "Neil deGrasse Tyson" }, { "date": "2005-10-27", "videos": [ "http: "http://thecolbertreport.cc.com/videos/nb6dxf/<API key>", "http: "http://thecolbertreport.cc.com/videos/1vbs16/<API key>", "http: "http://thecolbertreport.cc.com/videos/zyop79/<API key>", "http://thecolbertreport.cc.com/videos/h9zw2j/jeff-daniels", "http://thecolbertreport.cc.com/videos/3eb29d/<API key>" ], "guest": "Jeff Daniels" }, { "date": "2005-10-31", "videos": [ "http: "http://thecolbertreport.cc.com/videos/mqoacz/criminal-intent", "http://thecolbertreport.cc.com/videos/p3782h/<API key>", "http: "http://thecolbertreport.cc.com/videos/jfbl04/monica-crowley", "http://thecolbertreport.cc.com/videos/sxj08u/<API key>", "http://thecolbertreport.cc.com/videos/5d63df/<API key>-", "http://thecolbertreport.cc.com/videos/qc29ld/rocktober" ], "guest": "Monica Crowley" }, { "date": "2005-11-01", "videos": [ "http: "http://thecolbertreport.cc.com/videos/r7fmyb/<API key>", "http://thecolbertreport.cc.com/videos/ufgobt/<API key>", "http://thecolbertreport.cc.com/videos/b7u1wy/ken-burns", "http://thecolbertreport.cc.com/videos/kpjrtm/<API key>" ], "guest": "Ken Burns" }, { "date": "2005-11-02", "videos": [ "http: "http://thecolbertreport.cc.com/videos/xp1gbs/fatwa", "http://thecolbertreport.cc.com/videos/8e6qo8/c-span-coverage", "http: "http: "http://thecolbertreport.cc.com/videos/9438aw/the-war-on-wal-mart", "http://thecolbertreport.cc.com/videos/nvopei/bruce-feiler", "http://thecolbertreport.cc.com/videos/6v0azb/<API key>" ], "guest": "Bruce Feiler" }, { "date": "2005-11-03", "videos": [ "http: "http: "http://thecolbertreport.cc.com/videos/tq3k8n/bradley-whitford", "http: "http://thecolbertreport.cc.com/videos/cxtvxm/<API key>", "http://thecolbertreport.cc.com/videos/86juj9/judge-tubbs", "http://thecolbertreport.cc.com/videos/mkig56/<API key>" ], "guest": "Bradley Whitford" }, { "date": "2005-11-07", "videos": [ "http: "http://thecolbertreport.cc.com/videos/s0yn8n/<API key>", "http: "http://thecolbertreport.cc.com/videos/dzis1b/<API key>", "http://thecolbertreport.cc.com/videos/1xhewi/<API key>", "http://thecolbertreport.cc.com/videos/fjfr4z/eliot-spitzer", "http://thecolbertreport.cc.com/videos/ufqqpc/<API key>" ], "guest": "Eliot Spitzer" }, { "date": "2005-11-08", "videos": [ "http: "http://thecolbertreport.cc.com/videos/5lxdom/<API key>", "http://thecolbertreport.cc.com/videos/xul3qa/<API key>", "http: "http://thecolbertreport.cc.com/videos/7nl1pw/<API key>", "http://thecolbertreport.cc.com/videos/wgvsjo/<API key>", "http://thecolbertreport.cc.com/videos/0l19is/catherine-crier", "http://thecolbertreport.cc.com/videos/6zdr9d/<API key>", "http://thecolbertreport.cc.com/videos/ykxirt/<API key>" ], "guest": "Catherine Crier" }, { "date": "2005-11-09", "videos": [ "http: "http://thecolbertreport.cc.com/videos/5fvmyv/next-question", "http://thecolbertreport.cc.com/videos/bcmkct/<API key>", "http://thecolbertreport.cc.com/videos/43es16/<API key>", "http://thecolbertreport.cc.com/videos/nzfogn/mary-roach", "http://thecolbertreport.cc.com/videos/gqeqrk/<API key>" ], "guest": "Mary Roach" }, { "date": "2005-11-10", "videos": [ "http: "http://thecolbertreport.cc.com/videos/8c7dra/swear-to-god", "http://thecolbertreport.cc.com/videos/9kcrqk/<API key>", "http://thecolbertreport.cc.com/videos/o63fqi/cokie-roberts", "http://thecolbertreport.cc.com/videos/bd1uuq/<API key>", "http://thecolbertreport.cc.com/videos/c0bksd/<API key>" ], "guest": "Cokie Roberts" }, { "date": "2005-11-14", "videos": [ "http: "http://thecolbertreport.cc.com/videos/gfzikt/cma-buzz", "http://thecolbertreport.cc.com/videos/jaukv1/<API key>", "http://thecolbertreport.cc.com/videos/oel1ef/bob-kerrey", "http://thecolbertreport.cc.com/videos/2lpp85/<API key>", "http://thecolbertreport.cc.com/videos/1wb4cs/<API key>", "http://thecolbertreport.cc.com/videos/kuqe6u/<API key>" ], "guest": "Sen. Bob Kerrey" }, { "date": "2005-11-15", "videos": [ "http: "http://thecolbertreport.cc.com/videos/9jy462/sayako-s-wedding", "http://thecolbertreport.cc.com/videos/yctr24/<API key>", "http://thecolbertreport.cc.com/videos/4z4p4o/<API key>", "http://thecolbertreport.cc.com/videos/94g5r1/al-sharpton", "http://thecolbertreport.cc.com/videos/9disf3/<API key>", "http://thecolbertreport.cc.com/videos/w11pi7/<API key>" ], "guest": "Rev. Al Sharpton" }, { "date": "2005-11-16", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ebxyv5/<API key>", "http://thecolbertreport.cc.com/videos/eh69qj/<API key>", "http://thecolbertreport.cc.com/videos/h1e498/<API key>", "http://thecolbertreport.cc.com/videos/ddef4x/matt-taibbi", "http://thecolbertreport.cc.com/videos/4kvhir/america--sleep-safe" ], "guest": "Matt Taibbi" }, { "date": "2005-11-17", "videos": [ "http: "http://thecolbertreport.cc.com/videos/f8fusi/no-good-deed", "http://thecolbertreport.cc.com/videos/pxeto4/<API key>-", "http://thecolbertreport.cc.com/videos/bypiaq/<API key>", "http://thecolbertreport.cc.com/videos/smm3x9/tim-robbins", "http://thecolbertreport.cc.com/videos/wk6dps/<API key>", "http://thecolbertreport.cc.com/videos/8sxlv8/<API key>" ], "guest": "Tim Robbins" }, { "date": "2005-11-28", "videos": [ "http: "http://thecolbertreport.cc.com/videos/nrf3km/cyber-monday", "http: "http://thecolbertreport.cc.com/videos/r6xqra/viewer-phone-calls", "http://thecolbertreport.cc.com/videos/vdncvg/<API key>", "http://thecolbertreport.cc.com/videos/507rw4/brian-greene", "http://thecolbertreport.cc.com/videos/ngo5nh/<API key>" ], "guest": "Brian Greene" }, { "date": "2005-11-29", "videos": [ "http: "http://thecolbertreport.cc.com/videos/zaot6p/<API key>", "http://thecolbertreport.cc.com/videos/o2kdz0/<API key>", "http://thecolbertreport.cc.com/videos/6f1i25/<API key>", "http://thecolbertreport.cc.com/videos/75dr62/the--duke-s--things", "http://thecolbertreport.cc.com/videos/rtbpes/richard-preston" ], "guest": "Richard Preston" }, { "date": "2005-11-30", "videos": [ "http: "http://thecolbertreport.cc.com/videos/jsl09o/<API key>", "http://thecolbertreport.cc.com/videos/h7okp1/<API key>", "http://thecolbertreport.cc.com/videos/ut6y25/<API key>", "http://thecolbertreport.cc.com/videos/0frx2n/<API key>" ], "guest": "Katrina Vanden Heuvel" }, { "date": "2005-12-01", "videos": [ "http: "http://thecolbertreport.cc.com/videos/bocj8y/giant-gold-washer", "http://thecolbertreport.cc.com/videos/w4dblj/<API key>", "http: "http://thecolbertreport.cc.com/videos/idpn3b/richard-clarke", "http://thecolbertreport.cc.com/videos/9icneu/face-transplant" ], "guest": "Richard Clarke" }, { "date": "2005-12-05", "videos": [ "http: "http://thecolbertreport.cc.com/videos/utqsnp/<API key>", "http: "http://thecolbertreport.cc.com/videos/6ulwwh/apology", "http://thecolbertreport.cc.com/videos/sg4wi3/<API key>", "http://thecolbertreport.cc.com/videos/p01a0h/<API key>", "http://thecolbertreport.cc.com/videos/djl273/maureen-dowd" ], "guest": "Maureen Dowd" }, { "date": "2005-12-06", "videos": [ "http: "http: "http://thecolbertreport.cc.com/videos/c6b939/<API key>", "http://thecolbertreport.cc.com/videos/bgq83k/<API key>", "http://thecolbertreport.cc.com/videos/mjqiqk/anderson-cooper", "http://thecolbertreport.cc.com/videos/jo01oi/season-of-giving" ], "guest": "Anderson Cooper" }, { "date": "2005-12-07", "videos": [ "http: "http://thecolbertreport.cc.com/videos/k5nni4/<API key>", "http: "http://thecolbertreport.cc.com/videos/5ti5hp/<API key>", "http://thecolbertreport.cc.com/videos/1buius/craig-crawford" ], "guest": "Craig Crawford" }, { "date": "2005-12-08", "videos": [ "http: "http://thecolbertreport.cc.com/videos/zo8qem/the-mallomar", "http://thecolbertreport.cc.com/videos/9zltfz/<API key>-", "http://thecolbertreport.cc.com/videos/zc6wzp/<API key>", "http://thecolbertreport.cc.com/videos/0k58ru/<API key>", "http://thecolbertreport.cc.com/videos/f63xob/peggy-noonan", "http://thecolbertreport.cc.com/videos/huxiwh/<API key>" ], "guest": "Peggy Noonan" }, { "date": "2005-12-12", "videos": [ "http: "http://thecolbertreport.cc.com/videos/th38l3/the-real-christmas", "http://thecolbertreport.cc.com/videos/xld8bn/<API key>-", "http://thecolbertreport.cc.com/videos/4qrc6w/<API key>", "http: "http://thecolbertreport.cc.com/videos/tos96b/harry-smith", "http://thecolbertreport.cc.com/videos/onf96q/<API key>" ], "guest": "Harry Smith" }, { "date": "2005-12-13", "videos": [ "http: "http://thecolbertreport.cc.com/videos/f3vpvn/<API key>", "http: "http://thecolbertreport.cc.com/videos/53a836/sports-update", "http://thecolbertreport.cc.com/videos/reee2h/<API key>", "http: "http://thecolbertreport.cc.com/videos/mopfat/bob-costas", "http://thecolbertreport.cc.com/videos/97uhmb/<API key>" ], "guest": "Bob Costas" }, { "date": "2005-12-14", "videos": [ "http: "http://thecolbertreport.cc.com/videos/rxzsfq/king-kong", "http: "http://thecolbertreport.cc.com/videos/j8pyop/<API key>", "http://thecolbertreport.cc.com/videos/po8ta2/dermot-mulroney", "http://thecolbertreport.cc.com/videos/nf6l8d/<API key>" ], "guest": "Dermot Mulroney" }, { "date": "2005-12-15", "videos": [ "http: "http://thecolbertreport.cc.com/videos/7x2gjd/war-on-holiday", "http: "http://thecolbertreport.cc.com/videos/4epy8c/<API key>", "http://thecolbertreport.cc.com/videos/gn64jt/mark-cuban", "http://thecolbertreport.cc.com/videos/9d08kf/tax-deductions" ], "guest": "Mark Cuban" } ], "2006": [ { "date": "2006-01-09", "videos": [ "http: "http://thecolbertreport.cc.com/videos/gfhklq/merry-christmas", "http://thecolbertreport.cc.com/videos/k2b0t4/going-at-it", "http://thecolbertreport.cc.com/videos/tfsnjk/<API key>", "http://thecolbertreport.cc.com/videos/zvszwh/<API key>", "http://thecolbertreport.cc.com/videos/wm808s/<API key>", "http: "http://thecolbertreport.cc.com/videos/nctzb0/nancy-grace", "http://thecolbertreport.cc.com/videos/vt9veh/<API key>" ], "guest": "Nancy Grace" }, { "date": "2006-01-10", "videos": [ "http: "http://thecolbertreport.cc.com/videos/znlsxv/<API key>", "http://thecolbertreport.cc.com/videos/jz3vjq/<API key>", "http://thecolbertreport.cc.com/videos/fzr3d5/<API key>", "http://thecolbertreport.cc.com/videos/uk2dty/carl-bernstein", "http://thecolbertreport.cc.com/videos/lppcfe/<API key>" ], "guest": "Carl Bernstein" }, { "date": "2006-01-11", "videos": [ "http: "http://thecolbertreport.cc.com/videos/kci614/<API key>", "http://thecolbertreport.cc.com/videos/ho8xgd/alito-haters", "http: "http://thecolbertreport.cc.com/videos/bbh162/<API key>", "http://thecolbertreport.cc.com/videos/o71qa3/<API key>", "http://thecolbertreport.cc.com/videos/4z25yz/john-stossel", "http://thecolbertreport.cc.com/videos/gsuxni/<API key>" ], "guest": "John Stossel" }, { "date": "2006-01-12", "videos": [ "http: "http://thecolbertreport.cc.com/videos/smz33e/the-oscars", "http://thecolbertreport.cc.com/videos/hldbza/<API key>", "http://thecolbertreport.cc.com/videos/ycx56p/<API key>", "http://thecolbertreport.cc.com/videos/4huh6w/<API key>", "http://thecolbertreport.cc.com/videos/2qbk3w/kenneth-miller", "http://thecolbertreport.cc.com/videos/393ez5/<API key>" ], "guest": "Ken Miller" }, { "date": "2006-01-16", "videos": [ "http: "http://thecolbertreport.cc.com/videos/sfiw6u/<API key>", "http: "http://thecolbertreport.cc.com/videos/7te5id/<API key>", "http://thecolbertreport.cc.com/videos/2zgm7q/<API key>", "http://thecolbertreport.cc.com/videos/39qjdh/<API key>", "http://thecolbertreport.cc.com/videos/1jvqfi/<API key>" ], "guest": "George Stephanopoulos" }, { "date": "2006-01-17", "videos": [ "http: "http://thecolbertreport.cc.com/videos/uhh2bv/the-golden-globes", "http://thecolbertreport.cc.com/videos/lqd06o/<API key>", "http://thecolbertreport.cc.com/videos/pxy8xm/<API key>", "http: "http://thecolbertreport.cc.com/videos/l2yoxp/andrew-sullivan", "http://thecolbertreport.cc.com/videos/lpdbmt/<API key>" ], "guest": "Andrew Sullivan" }, { "date": "2006-01-18", "videos": [ "http: "http://thecolbertreport.cc.com/videos/z3vrpl/<API key>", "http://thecolbertreport.cc.com/videos/ti5lsj/<API key>", "http://thecolbertreport.cc.com/videos/92rf9j/<API key>", "http://thecolbertreport.cc.com/videos/rnpcxp/frank-mccourt", "http://thecolbertreport.cc.com/videos/86d7fs/<API key>" ], "guest": "Frank McCourt" }, { "date": "2006-01-19", "videos": [ "http: "http://thecolbertreport.cc.com/videos/9s67zo/<API key>", "http://thecolbertreport.cc.com/videos/xguuix/<API key>", "http://thecolbertreport.cc.com/videos/lidn3n/<API key>", "http://thecolbertreport.cc.com/videos/11mx9e/nina-totenberg", "http: ], "guest": "Nina Totenberg" }, { "date": "2006-01-23", "videos": [ "http: "http://thecolbertreport.cc.com/videos/k046s8/oprah-s-book-club", "http://thecolbertreport.cc.com/videos/ruzjfq/<API key>", "http: "http://thecolbertreport.cc.com/videos/puj7cw/david-gregory", "http://thecolbertreport.cc.com/videos/ipkxy5/dr--love" ], "guest": "David Gregory" }, { "date": "2006-01-24", "videos": [ "http: "http://thecolbertreport.cc.com/videos/63ywy8/<API key>", "http://thecolbertreport.cc.com/videos/xpxm3x/<API key>", "http://thecolbertreport.cc.com/videos/bpx4o0/<API key>", "http://thecolbertreport.cc.com/videos/44x8vn/robin-givhan", "http: ], "guest": "Robin Givhan" }, { "date": "2006-01-25", "videos": [ "http: "http://thecolbertreport.cc.com/videos/sc546i/<API key>", "http://thecolbertreport.cc.com/videos/dg5r31/<API key>", "http://thecolbertreport.cc.com/videos/d7q9f6/<API key>", "http://thecolbertreport.cc.com/videos/e7x760/norah-vincent" ], "guest": "Norah Vincent" }, { "date": "2006-01-26", "videos": [ "http: "http://thecolbertreport.cc.com/videos/xh484k/thundersnow", "http://thecolbertreport.cc.com/videos/qdqpdn/<API key>", "http: "http://thecolbertreport.cc.com/videos/qnlt2s/<API key>-", "http://thecolbertreport.cc.com/videos/lca5rm/<API key>", "http://thecolbertreport.cc.com/videos/gimvpm/paul-begala" ], "guest": "Paul Begala" }, { "date": "2006-01-30", "videos": [ "http: "http://thecolbertreport.cc.com/videos/vbdym4/<API key>", "http: "http: "http://thecolbertreport.cc.com/videos/3f4m4d/annie-duke" ], "guest": "Annie Duke" }, { "date": "2006-01-31", "videos": [ "http: "http: "http://thecolbertreport.cc.com/videos/fo1pme/<API key>", "http://thecolbertreport.cc.com/videos/165jzf/<API key>", "http://thecolbertreport.cc.com/videos/2uduhl/david-maresh", "http://thecolbertreport.cc.com/videos/iddejj/<API key>", "http://thecolbertreport.cc.com/videos/2na088/<API key>" ], "guest": "Dave Marash" }, { "date": "2006-02-01", "videos": [ "http: "http://thecolbertreport.cc.com/videos/y6qr8t/<API key>jobscape", "http://thecolbertreport.cc.com/videos/u7tnek/<API key>", "http://thecolbertreport.cc.com/videos/zfo99j/<API key>", "http://thecolbertreport.cc.com/videos/qm6xwf/emily-yoffe", "http://thecolbertreport.cc.com/videos/359g3f/<API key>" ], "guest": "Emily Yoffe" }, { "date": "2006-02-02", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ad4eb4/<API key>", "http://thecolbertreport.cc.com/videos/3bftnm/<API key>", "http://thecolbertreport.cc.com/videos/xbb82c/<API key>", "http://thecolbertreport.cc.com/videos/lggm23/<API key>", "http://thecolbertreport.cc.com/videos/waxwaq/<API key>", "http: ], "guest": "Gov. Christine Todd Whitman" }, { "date": "2006-02-06", "videos": [ "http: "http://thecolbertreport.cc.com/videos/x1tmbw/birth-day-off", "http://thecolbertreport.cc.com/videos/1gk1h5/the-golden-corner", "http://thecolbertreport.cc.com/videos/r9ih4w/<API key>", "http://thecolbertreport.cc.com/videos/4xxw86/<API key>", "http://thecolbertreport.cc.com/videos/kckjlf/<API key>", "http://thecolbertreport.cc.com/videos/lynt84/barbara-boxer", "http://thecolbertreport.cc.com/videos/xaj1wb/to-be-continued" ], "guest": "Barbara Boxer" }, { "date": "2006-02-07", "videos": [ "http: "http://thecolbertreport.cc.com/videos/nzdokc/math-is-hard", "http: "http://thecolbertreport.cc.com/videos/pc9syn/<API key>", "http://thecolbertreport.cc.com/videos/uvx8kk/james-woolsey", "http://thecolbertreport.cc.com/videos/xx0m7n/western-union" ], "guest": "R. James Woolsey" }, { "date": "2006-02-08", "videos": [ "http: "http://thecolbertreport.cc.com/videos/zmpne2/b-b-b-l-t-", "http://thecolbertreport.cc.com/videos/0qolhd/<API key>", "http: "http://thecolbertreport.cc.com/videos/29usyw/<API key>", "http://thecolbertreport.cc.com/videos/flyja7/<API key>", "http://thecolbertreport.cc.com/videos/6jmw8z/alan-dershowitz", "http: ], "guest": "Alan Dershowitz" }, { "date": "2006-02-09", "videos": [ "http: "http://thecolbertreport.cc.com/videos/qryfzw/<API key>", "http://thecolbertreport.cc.com/videos/c00cpa/<API key>--", "http://thecolbertreport.cc.com/videos/wpi1k4/<API key>", "http://thecolbertreport.cc.com/videos/8rwy8k/george-packer", "http://thecolbertreport.cc.com/videos/33a8tw/<API key>-" ], "guest": "George Packer" }, { "date": "2006-02-21", "videos": [ "http: "http://thecolbertreport.cc.com/videos/uo23hp/accidental-shooting", "http://thecolbertreport.cc.com/videos/loo817/<API key>--", "http://thecolbertreport.cc.com/videos/u7vgjy/<API key>", "http: "http://thecolbertreport.cc.com/videos/zyrf0h/lama-surya-das", "http: ], "guest": "Lama Surya Das" }, { "date": "2006-02-22", "videos": [ "http: "http://thecolbertreport.cc.com/videos/9a1fo6/<API key>", "http://thecolbertreport.cc.com/videos/0g837q/<API key>", "http://thecolbertreport.cc.com/videos/mvtu98/<API key>", "http://thecolbertreport.cc.com/videos/jkkvih/michael-eric-dyson" ], "guest": "Michael Eric Dyson" }, { "date": "2006-02-23", "videos": [ "http: "http: "http://thecolbertreport.cc.com/videos/754igf/<API key>", "http://thecolbertreport.cc.com/videos/s0zne3/<API key>", "http://thecolbertreport.cc.com/videos/kftjaw/<API key>", "http://thecolbertreport.cc.com/videos/rsogzl/david-brooks", "http://thecolbertreport.cc.com/videos/azjwel/<API key>" ], "guest": "David Brooks" }, { "date": "2006-02-27", "videos": [ "http: "http://thecolbertreport.cc.com/videos/a6q20s/<API key>", "http://thecolbertreport.cc.com/videos/opnyg5/<API key>", "http://thecolbertreport.cc.com/videos/2hdt17/<API key>", "http://thecolbertreport.cc.com/videos/5ggers/<API key>", "http://thecolbertreport.cc.com/videos/oop06i/tony-campolo", "http://thecolbertreport.cc.com/videos/14uaa2/<API key>" ], "guest": "Tony Campolo" }, { "date": "2006-02-28", "videos": [ "http: "http://thecolbertreport.cc.com/videos/roej3y/<API key>", "http://thecolbertreport.cc.com/videos/bdairu/<API key>-", "http://thecolbertreport.cc.com/videos/2v3htj/<API key>", "http://thecolbertreport.cc.com/videos/sz96fe/brett-o-donnell" ], "guest": "Brett O'Donnell" }, { "date": "2006-03-01", "videos": [ "http: "http://thecolbertreport.cc.com/videos/jndc1b/<API key>", "http: "http://thecolbertreport.cc.com/videos/1bozfl/<API key>", "http://thecolbertreport.cc.com/videos/11m5ii/arianna-huffington" ], "guest": "Arianna Huffington" }, { "date": "2006-03-02", "videos": [ "http: "http://thecolbertreport.cc.com/videos/stez1k/<API key>", "http://thecolbertreport.cc.com/videos/3k2tf6/<API key>", "http://thecolbertreport.cc.com/videos/gltobj/jeffrey-sachs", "http://thecolbertreport.cc.com/videos/wx4nw0/<API key>" ], "guest": "Jeffrey Sachs" }, { "date": "2006-03-06", "videos": [ "http: "http://thecolbertreport.cc.com/videos/l42kmx/<API key>", "http://thecolbertreport.cc.com/videos/tsfsdu/never-say-die", "http://thecolbertreport.cc.com/videos/5tdn6m/<API key>-", "http://thecolbertreport.cc.com/videos/tua61a/<API key>", "http://thecolbertreport.cc.com/videos/rlta2z/bob-schieffer", "http: ], "guest": "Bob Schieffer" }, { "date": "2006-03-07", "videos": [ "http: "http://thecolbertreport.cc.com/videos/4cutks/colbert-manor", "http://thecolbertreport.cc.com/videos/mtcb44/<API key>", "http://thecolbertreport.cc.com/videos/g0hyvn/<API key>", "http://thecolbertreport.cc.com/videos/8n27zq/norman-ornstein" ], "guest": "Norman Ornstean" }, { "date": "2006-03-08", "videos": [ "http: "http://thecolbertreport.cc.com/videos/x1smyo/<API key>", "http: "http://thecolbertreport.cc.com/videos/qhlrjh/<API key>", "http://thecolbertreport.cc.com/videos/1ggda8/<API key>", "http://thecolbertreport.cc.com/videos/ovaery/james-webb", "http://thecolbertreport.cc.com/videos/vggdk5/used-flag-offer" ], "guest": "James Webb" }, { "date": "2006-03-09", "videos": [ "http: "http://thecolbertreport.cc.com/videos/dx0yti/canadian-baseball-", "http: "http://thecolbertreport.cc.com/videos/7oy8db/<API key>", "http://thecolbertreport.cc.com/videos/15d41c/lorraine-bracco" ], "guest": "Lorraine Bracco" }, { "date": "2006-03-13", "videos": [ "http: "http://thecolbertreport.cc.com/videos/lmy7oh/predictions", "http://thecolbertreport.cc.com/videos/lykn1c/not-gay", "http://thecolbertreport.cc.com/videos/so8v2i/<API key>", "http://thecolbertreport.cc.com/videos/ufh2rw/christopher-buckley", "http://thecolbertreport.cc.com/videos/k79bmy/<API key>" ], "guest": "Christopher Buckley" }, { "date": "2006-03-14", "videos": [ "http: "http://thecolbertreport.cc.com/videos/i3ouk4/trusting-the-media", "http://thecolbertreport.cc.com/videos/i5bwzw/<API key>", "http://thecolbertreport.cc.com/videos/kiwto1/<API key>", "http: "http://thecolbertreport.cc.com/videos/loh9en/keith-olbermann", "http://thecolbertreport.cc.com/videos/8vssl2/<API key>" ], "guest": "Keith Olbermann" }, { "date": "2006-03-15", "videos": [ "http: "http://thecolbertreport.cc.com/videos/u8eaqc/sperm-donor", "http://thecolbertreport.cc.com/videos/g4bu6e/<API key>", "http://thecolbertreport.cc.com/videos/kruphn/al-franken", "http://thecolbertreport.cc.com/videos/usnoo7/<API key>", "http://thecolbertreport.cc.com/videos/z5ir97/<API key>" ], "guest": "Al Franken" }, { "date": "2006-03-16", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ecjm4u/<API key>", "http://thecolbertreport.cc.com/videos/2m2cs5/<API key>", "http://thecolbertreport.cc.com/videos/kgsuha/<API key>", "http://thecolbertreport.cc.com/videos/6o7ym9/frank-vincent", "http://thecolbertreport.cc.com/videos/cycayo/<API key>" ], "guest": "Frank Vincent" }, { "date": "2006-03-20", "videos": [ "http: "http://thecolbertreport.cc.com/videos/isowuv/<API key>", "http://thecolbertreport.cc.com/videos/vr4vvt/connie-chung", "http://thecolbertreport.cc.com/videos/yuth1j/<API key>", "http://thecolbertreport.cc.com/videos/6xoiww/<API key>", "http: ], "guest": "Connie Chung" }, { "date": "2006-03-21", "videos": [ "http: "http://thecolbertreport.cc.com/videos/zze24r/<API key>", "http: "http://thecolbertreport.cc.com/videos/eh7h1y/<API key>", "http://thecolbertreport.cc.com/videos/nbiu6f/steve-kroft", "http://thecolbertreport.cc.com/videos/jt1thw/<API key>" ], "guest": "Steve Kroft" }, { "date": "2006-03-22", "videos": [ "http: "http://thecolbertreport.cc.com/videos/nw6pi6/<API key>", "http://thecolbertreport.cc.com/videos/gx67le/<API key>", "http://thecolbertreport.cc.com/videos/c3fb4g/<API key>", "http://thecolbertreport.cc.com/videos/uqd7r1/dan-senor", "http://thecolbertreport.cc.com/videos/qay3pj/<API key>" ], "guest": "Dan Senor" }, { "date": "2006-03-23", "videos": [ "http: "http://thecolbertreport.cc.com/videos/rxxsf1/<API key>", "http://thecolbertreport.cc.com/videos/1q0pl8/miss-manners", "http://thecolbertreport.cc.com/videos/jeurtc/<API key>", "http://thecolbertreport.cc.com/videos/3x5mhp/john-kasich", "http://thecolbertreport.cc.com/videos/tgvvyb/<API key>" ], "guest": "John Kasich" }, { "date": "2006-03-27", "videos": [ "http: "http://thecolbertreport.cc.com/videos/lu2x91/off-the-market", "http://thecolbertreport.cc.com/videos/b1jlbx/<API key>", "http://thecolbertreport.cc.com/videos/hizymr/exercise-routine", "http: "http://thecolbertreport.cc.com/videos/jmwqn6/letter-to-the-judge", "http://thecolbertreport.cc.com/videos/6zqqyf/<API key>", "http: "http://thecolbertreport.cc.com/videos/i44o34/gary-hart", "http://thecolbertreport.cc.com/videos/bwhjyd/<API key>" ], "guest": "Gary Hart" }, { "date": "2006-03-28", "videos": [ "http: "http://thecolbertreport.cc.com/videos/wm4vs8/baby-eagle", "http://thecolbertreport.cc.com/videos/4s1h3q/<API key>", "http://thecolbertreport.cc.com/videos/erxj6i/<API key>", "http://thecolbertreport.cc.com/videos/3ejtt4/<API key>", "http://thecolbertreport.cc.com/videos/tyfnef/michael-brown", "http://thecolbertreport.cc.com/videos/t4qaaf/<API key>-" ], "guest": "Michael Brown" }, { "date": "2006-03-29", "videos": [ "http: "http://thecolbertreport.cc.com/videos/r9z4ro/eclipse", "http: "http://thecolbertreport.cc.com/videos/3xpeh4/<API key>", "http://thecolbertreport.cc.com/videos/k1c0hq/bruce-bartlett" ], "guest": "Bruce Bartlett" }, { "date": "2006-03-30", "videos": [ "http: "http://thecolbertreport.cc.com/videos/89u375/<API key>", "http://thecolbertreport.cc.com/videos/nuwaus/<API key>", "http://thecolbertreport.cc.com/videos/smbaky/<API key>", "http://thecolbertreport.cc.com/videos/n7sm3g/<API key>", "http://thecolbertreport.cc.com/videos/b95nrh/robert-greenwald", "http://thecolbertreport.cc.com/videos/0vbmc1/million-man-march", "http: ], "guest": "Robert Greenwald" }, { "date": "2006-04-03", "videos": [ "http: "http://thecolbertreport.cc.com/videos/cckn97/<API key>", "http://thecolbertreport.cc.com/videos/j51p1g/<API key>", "http://thecolbertreport.cc.com/videos/mq3zja/<API key>", "http://thecolbertreport.cc.com/videos/ci41dt/michael-smerconish", "http: ], "guest": "Michael Smerconish" }, { "date": "2006-04-04", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ouryux/delay-retires", "http: "http://thecolbertreport.cc.com/videos/fgj62q/<API key>", "http://thecolbertreport.cc.com/videos/3sqfo3/jesse-jackson" ], "guest": "Jesse Jackson" }, { "date": "2006-04-05", "videos": [ "http: "http://thecolbertreport.cc.com/videos/1sxrid/crying", "http: "http://thecolbertreport.cc.com/videos/6ythy9/<API key>", "http://thecolbertreport.cc.com/videos/4ipowz/<API key>", "http://thecolbertreport.cc.com/videos/7hiane/harvey-mansfield", "http://thecolbertreport.cc.com/videos/7q90hr/<API key>" ], "guest": "Harvey Mansfield" }, { "date": "2006-04-06", "videos": [ "http: "http://thecolbertreport.cc.com/videos/yy1ecn/<API key>", "http://thecolbertreport.cc.com/videos/wh4nku/<API key>", "http: "http://thecolbertreport.cc.com/videos/hqbc11/<API key>", "http://thecolbertreport.cc.com/videos/2v5yd4/markos-moulitsas", "http://thecolbertreport.cc.com/videos/a2gy6a/<API key>" ], "guest": "Markos Moulitsas" }, { "date": "2006-04-17", "videos": [ "http: "http://thecolbertreport.cc.com/videos/jh0t6d/dime-boycott", "http://thecolbertreport.cc.com/videos/nyextq/<API key>", "http://thecolbertreport.cc.com/videos/swdzeg/<API key>", "http://thecolbertreport.cc.com/videos/8ydrv2/reza-aslan", "http://thecolbertreport.cc.com/videos/nfyuyx/<API key>" ], "guest": "Reza Aslan" }, { "date": "2006-04-18", "videos": [ "http: "http://thecolbertreport.cc.com/videos/8zlfj4/stephen-jr--hatches-", "http://thecolbertreport.cc.com/videos/gi0de7/<API key>", "http: "http://thecolbertreport.cc.com/videos/5peygv/anthony-romero", "http://thecolbertreport.cc.com/videos/9g88m0/baby-monitor", "http://thecolbertreport.cc.com/videos/sdky8q/<API key>" ], "guest": "Anthony Romero" }, { "date": "2006-04-19", "videos": [ "http: "http://thecolbertreport.cc.com/videos/8e53yj/<API key>", "http://thecolbertreport.cc.com/videos/usn2co/global-warming-tv", "http: "http://thecolbertreport.cc.com/videos/0nrquc/<API key>", "http://thecolbertreport.cc.com/videos/x40hn2/caitlin-flanagan" ], "guest": "Caitlin Flanagan" }, { "date": "2006-04-20", "videos": [ "http: "http://thecolbertreport.cc.com/videos/qw6of6/<API key>", "http: "http://thecolbertreport.cc.com/videos/yrza7w/<API key>", "http://thecolbertreport.cc.com/videos/isrl05/ralph-nader" ], "guest": "Ralph Nader" }, { "date": "2006-04-24", "videos": [ "http: "http://thecolbertreport.cc.com/videos/yd10jl/wok-this-way", "http://thecolbertreport.cc.com/videos/nhj8qv/<API key>", "http://thecolbertreport.cc.com/videos/z1f4bz/duke-obilia-auction", "http://thecolbertreport.cc.com/videos/svw55c/hugh-hewitt", "http://thecolbertreport.cc.com/videos/qzp0e4/<API key>" ], "guest": "Hugh Hewitt" }, { "date": "2006-04-25", "videos": [ "http: "http://thecolbertreport.cc.com/videos/y1ry7v/<API key>", "http: "http://thecolbertreport.cc.com/videos/6iaobq/<API key>", "http: "http://thecolbertreport.cc.com/videos/gael38/sam-harris", "http://thecolbertreport.cc.com/videos/f00cpp/<API key>" ], "guest": "Sam Harris" }, { "date": "2006-04-26", "videos": [ "http: "http://thecolbertreport.cc.com/videos/pjxlyg/armed-and-ready", "http: "http://thecolbertreport.cc.com/videos/ydqtim/<API key>", "http://thecolbertreport.cc.com/videos/thlh72/sebastian-junger", "http://thecolbertreport.cc.com/videos/8puf3y/<API key>" ], "guest": "Sebastian Junger" }, { "date": "2006-04-27", "videos": [ "http: "http://thecolbertreport.cc.com/videos/z7tcn4/snow--informer", "http://thecolbertreport.cc.com/videos/6lr3t0/<API key>", "http://thecolbertreport.cc.com/videos/b4nnko/plagiarism", "http://thecolbertreport.cc.com/videos/g4i72k/<API key>", "http://thecolbertreport.cc.com/videos/u54lrz/bill-kristol", "http://thecolbertreport.cc.com/videos/efk2x7/<API key>" ], "guest": "Bill Kristol" }, { "date": "2006-05-01", "videos": [ "http: "http://thecolbertreport.cc.com/videos/7jined/<API key>", "http://thecolbertreport.cc.com/videos/8uzt2n/<API key>", "http: "http://thecolbertreport.cc.com/videos/5ptkiy/jon-meacham", "http: ], "guest": "Jon Meacham" }, { "date": "2006-05-02", "videos": [ "http: "http://thecolbertreport.cc.com/videos/y9f7ks/magic-", "http://thecolbertreport.cc.com/videos/fdtzal/<API key>", "http://thecolbertreport.cc.com/videos/hl6b8d/<API key>", "http://thecolbertreport.cc.com/videos/lh3j87/mike-huckabee" ], "guest": "Governor Mike Huckabee" }, { "date": "2006-05-03", "videos": [ "http: "http://thecolbertreport.cc.com/videos/72mru6/alan-town", "http://thecolbertreport.cc.com/videos/gdu7ux/<API key>", "http://thecolbertreport.cc.com/videos/f8iv5g/<API key>", "http://thecolbertreport.cc.com/videos/3pdcz2/paul-rieckhoff", "http://thecolbertreport.cc.com/videos/65gltn/<API key>" ], "guest": "Paul Rieckhoff" }, { "date": "2006-05-04", "videos": [ "http://thecolbertreport.cc.com/videos/mtzlgi/<API key>", "http: "http://thecolbertreport.cc.com/videos/ox5eqb/<API key>", "http://thecolbertreport.cc.com/videos/38ws3t/<API key>", "http://thecolbertreport.cc.com/videos/h6w8h9/<API key>", "http://thecolbertreport.cc.com/videos/71jv5y/rick-reilly", "http://thecolbertreport.cc.com/videos/4uy12b/stephen-s-keys" ], "guest": "Rick Reilly" }, { "date": "2006-05-08", "videos": [ "http: "http://thecolbertreport.cc.com/videos/gk0182/stegul", "http://thecolbertreport.cc.com/videos/fyqj80/<API key>", "http: "http://thecolbertreport.cc.com/videos/zdkg2i/shere-hite", "http://thecolbertreport.cc.com/videos/7581zo/<API key>-" ], "guest": "Shere Hite" }, { "date": "2006-05-09", "videos": [ "http: "http://thecolbertreport.cc.com/videos/t6b1ke/double-or-nothing", "http://thecolbertreport.cc.com/videos/mjq9vh/<API key>", "http://thecolbertreport.cc.com/videos/9w4u9e/<API key>", "http://thecolbertreport.cc.com/videos/s2q4vq/frank-rich", "http://thecolbertreport.cc.com/videos/hofw72/<API key>" ], "guest": "Frank Rich" }, { "date": "2006-05-10", "videos": [ "http://thecolbertreport.cc.com/videos/j0109g/<API key>", "http: "http://thecolbertreport.cc.com/videos/pc9isx/the-bird-flu", "http://thecolbertreport.cc.com/videos/6olwle/<API key>", "http://thecolbertreport.cc.com/videos/m1vdpp/<API key>", "http://thecolbertreport.cc.com/videos/kuohzs/william-bastone", "http://thecolbertreport.cc.com/videos/pksza0/<API key>" ], "guest": "Bill Bastone" }, { "date": "2006-05-11", "videos": [ "http: "http://thecolbertreport.cc.com/videos/jn8cw4/the-west-wing", "http://thecolbertreport.cc.com/videos/j7pjuz/<API key>", "http://thecolbertreport.cc.com/videos/yy27qi/madeleine-albright", "http: ], "guest": "Madeleine Albright" }, { "date": "2006-05-15", "videos": [ "http: "http://thecolbertreport.cc.com/videos/nxszdr/<API key>", "http://thecolbertreport.cc.com/videos/g2h9yx/<API key>", "http://thecolbertreport.cc.com/videos/pn3k09/<API key>", "http://thecolbertreport.cc.com/videos/f5iuwt/<API key>", "http://thecolbertreport.cc.com/videos/qrt5tg/kevin-phillips", "http://thecolbertreport.cc.com/videos/lww1s9/<API key>" ], "guest": "Kevin Phillips" }, { "date": "2006-05-16", "videos": [ "http: "http://thecolbertreport.cc.com/videos/swctyt/<API key>", "http://thecolbertreport.cc.com/videos/5qdvts/billboard", "http://thecolbertreport.cc.com/videos/r5u8hp/body-parts-for-sale", "http://thecolbertreport.cc.com/videos/kdtmpm/tyson-slocum", "http://thecolbertreport.cc.com/videos/53mwdm/<API key>" ], "guest": "Tyson Slocum" }, { "date": "2006-05-17", "videos": [ "http://thecolbertreport.cc.com/videos/8b6qml/<API key>", "http: "http://thecolbertreport.cc.com/videos/swctyt/<API key>", "http://thecolbertreport.cc.com/videos/5qdvts/billboard", "http://thecolbertreport.cc.com/videos/r5u8hp/body-parts-for-sale", "http://thecolbertreport.cc.com/videos/kdtmpm/tyson-slocum", "http://thecolbertreport.cc.com/videos/53mwdm/<API key>" ], "guest": "Jonathan Alter" }, { "date": "2006-05-17", "videos": [ "http: "http://thecolbertreport.cc.com/videos/xie8nv/<API key>", "http://thecolbertreport.cc.com/videos/3w6t72/<API key>", "http://thecolbertreport.cc.com/videos/1pm4i8/jonathan-alter", "http://thecolbertreport.cc.com/videos/3f6dmg/boycott", "http://thecolbertreport.cc.com/videos/bqqkk9/reagan-dimes" ], "guest": "Jonathan Alter" }, { "date": "2006-05-18", "videos": [ "http: "http://thecolbertreport.cc.com/videos/q374t3/<API key>", "http: "http://thecolbertreport.cc.com/videos/rvxfth/<API key>", "http://thecolbertreport.cc.com/videos/lga95g/<API key>", "http://thecolbertreport.cc.com/videos/jl63dd/ted-daeschler", "http://thecolbertreport.cc.com/videos/ddobv8/bears-eat-monkey" ], "guest": "Ted Daeschler" }, { "date": "2006-06-05", "videos": [ "http://thecolbertreport.cc.com/videos/63cmgz/<API key>", "http: "http://thecolbertreport.cc.com/videos/sygeud/stone-phillips", "http://thecolbertreport.cc.com/videos/oqbssv/helium-balloon-drop", "http://thecolbertreport.cc.com/videos/n2keyu/<API key>" ], "guest": "Stone Phillips" }, { "date": "2006-06-06", "videos": [ "http: "http://thecolbertreport.cc.com/videos/zo00tb/666", "http: "http://thecolbertreport.cc.com/videos/ohdrye/<API key>", "http://thecolbertreport.cc.com/videos/j42g38/christiane-amanpour", "http://thecolbertreport.cc.com/videos/5pxetf/<API key>" ], "guest": "Christiane Amanpour" }, { "date": "2006-06-07", "videos": [ "http: "http://thecolbertreport.cc.com/videos/krcfjp/balrog", "http://thecolbertreport.cc.com/videos/8enhyk/<API key>", "http: "http://thecolbertreport.cc.com/videos/q5rrxq/<API key>", "http://thecolbertreport.cc.com/videos/g6gwcq/steve-squyres", "http://thecolbertreport.cc.com/videos/l4kbi3/<API key>" ], "guest": "Steve Squyres" }, { "date": "2006-06-08", "videos": [ "http: "http://thecolbertreport.cc.com/videos/5h2hdf/<API key>", "http://thecolbertreport.cc.com/videos/9s5g2f/<API key>-", "http://thecolbertreport.cc.com/videos/tb1qzm/<API key>", "http://thecolbertreport.cc.com/videos/l9x3is/steve-johnson", "http://thecolbertreport.cc.com/videos/irk0rv/honorary-doctor" ], "guest": "Steve Johnson" }, { "date": "2006-06-12", "videos": [ "http: "http://thecolbertreport.cc.com/videos/6ev021/tony-awards", "http://thecolbertreport.cc.com/videos/m292m0/<API key>", "http://thecolbertreport.cc.com/videos/g6su9g/<API key>", "http://thecolbertreport.cc.com/videos/e9sys9/<API key>", "http://thecolbertreport.cc.com/videos/1zagcw/<API key>-", "http://thecolbertreport.cc.com/videos/rklfpc/<API key>" ], "guest": "Robert F. Kennedy Jr." }, { "date": "2006-06-13", "videos": [ "http: "http://thecolbertreport.cc.com/videos/g9ijaq/stephen-jr--update", "http://thecolbertreport.cc.com/videos/qieya3/<API key>", "http://thecolbertreport.cc.com/videos/c3pmq2/nsa-wiretapping", "http://thecolbertreport.cc.com/videos/2z4g9m/tim-flannery", "http://thecolbertreport.cc.com/videos/15yb0t/feline-bravery" ], "guest": "Tim Flannery" }, { "date": "2006-06-14", "videos": [ "http://thecolbertreport.cc.com/videos/6tm6zq/<API key>", "http: "http://thecolbertreport.cc.com/videos/3lnns6/<API key>", "http://thecolbertreport.cc.com/videos/l28ig3/<API key>", "http://thecolbertreport.cc.com/videos/tlf8t3/<API key>", "http://thecolbertreport.cc.com/videos/4xe4qw/david-sirota", "http://thecolbertreport.cc.com/videos/g3hppv/<API key>" ], "guest": "David Sirota" }, { "date": "2006-06-15", "videos": [ "http: "http://thecolbertreport.cc.com/videos/69j400/<API key>", "http://thecolbertreport.cc.com/videos/kt2s9v/<API key>", "http://thecolbertreport.cc.com/videos/mqgxig/<API key>", "http://thecolbertreport.cc.com/videos/p118td/michael-pollan", "http://thecolbertreport.cc.com/videos/avxgi1/biggie-ness" ], "guest": "Michael Pollan" }, { "date": "2006-06-19", "videos": [ "http: "http://thecolbertreport.cc.com/videos/hsj6mj/bill-gates", "http://thecolbertreport.cc.com/videos/dattp1/<API key>", "http://thecolbertreport.cc.com/videos/q5w5ph/<API key>", "http://thecolbertreport.cc.com/videos/vaw7tx/gustavo-arellano" ], "guest": "Gustavo Arellano" }, { "date": "2006-06-20", "videos": [ "http: "http://thecolbertreport.cc.com/videos/t2udf0/marrying-snakes", "http://thecolbertreport.cc.com/videos/5kkfzf/<API key>", "http://thecolbertreport.cc.com/videos/m05b1x/american-goal", "http://thecolbertreport.cc.com/videos/qitmnq/<API key>", "http://thecolbertreport.cc.com/videos/yji71b/bart-ehrman", "http://thecolbertreport.cc.com/videos/cahdxo/<API key>" ], "guest": "Bart Ehrman" }, { "date": "2006-06-21", "videos": [ "http: "http://thecolbertreport.cc.com/videos/sx1i4m/truthiness-cheer", "http://thecolbertreport.cc.com/videos/o652yy/<API key>", "http://thecolbertreport.cc.com/videos/alty3q/<API key>", "http://thecolbertreport.cc.com/videos/n3wvrq/<API key>", "http://thecolbertreport.cc.com/videos/qjlwml/bay-buchanan", "http://thecolbertreport.cc.com/videos/k5qunl/<API key>" ], "guest": "Bay Buchanan" }, { "date": "2006-06-22", "videos": [ "http://thecolbertreport.cc.com/videos/q057ll/<API key>", "http: "http://thecolbertreport.cc.com/videos/f4jomt/stephen-s-fault", "http://thecolbertreport.cc.com/videos/21iu1g/<API key>", "http://thecolbertreport.cc.com/videos/hfgyhs/<API key>", "http://thecolbertreport.cc.com/videos/abdpyq/<API key>", "http://thecolbertreport.cc.com/videos/2oh72f/douglas-brinkley", "http://thecolbertreport.cc.com/videos/vh4cyy/<API key>" ], "guest": "Doug Brinkley" }, { "date": "2006-06-26", "videos": [ "http: "http://thecolbertreport.cc.com/videos/0au60f/buffett-hires-gates", "http://thecolbertreport.cc.com/videos/7xr6qc/medal-of-audacity", "http://thecolbertreport.cc.com/videos/wzsdxf/<API key>", "http://thecolbertreport.cc.com/videos/gb7vwl/<API key>", "http://thecolbertreport.cc.com/videos/ny0s7o/mark-bowden", "http://thecolbertreport.cc.com/videos/7zeule/<API key>" ], "guest": "Mark Bowden" }, { "date": "2006-06-27", "videos": [ "http: "http://thecolbertreport.cc.com/videos/wmi0fy/flammo-mcburny", "http://thecolbertreport.cc.com/videos/jgpsp4/<API key>", "http://thecolbertreport.cc.com/videos/5xzyo9/<API key>", "http://thecolbertreport.cc.com/videos/nnrjlz/<API key>", "http://thecolbertreport.cc.com/videos/360rgd/chris-matthews", "http://thecolbertreport.cc.com/videos/iiom30/<API key>" ], "guest": "Chris Matthews" }, { "date": "2006-06-28", "videos": [ "http: "http://thecolbertreport.cc.com/videos/mdix0g/<API key>", "http://thecolbertreport.cc.com/videos/luor1n/american-flags", "http: "http://thecolbertreport.cc.com/videos/9i4qz9/<API key>", "http://thecolbertreport.cc.com/videos/pt4qqj/robert-baer", "http://thecolbertreport.cc.com/videos/h13p5y/<API key>" ], "guest": "Robert Baer" }, { "date": "2006-06-29", "videos": [ "http: "http://thecolbertreport.cc.com/videos/voqmme/<API key>", "http://thecolbertreport.cc.com/videos/z39ivs/the-president-s-bff", "http://thecolbertreport.cc.com/videos/qzor72/<API key>", "http://thecolbertreport.cc.com/videos/ncmucg/<API key>", "http://thecolbertreport.cc.com/videos/facpb9/christopher-noxon", "http://thecolbertreport.cc.com/videos/9y1lrr/star-jones" ], "guest": "Christopher Noxon" }, { "date": "2006-07-10", "videos": [ "http: "http://thecolbertreport.cc.com/videos/fweavv/<API key>", "http://thecolbertreport.cc.com/videos/gud4ld/<API key>", "http://thecolbertreport.cc.com/videos/ul4u7x/<API key>", "http://thecolbertreport.cc.com/videos/hfxzg3/amy-sedaris", "http://thecolbertreport.cc.com/videos/izyjak/<API key>" ], "guest": "Amy Sedaris" }, { "date": "2006-07-11", "videos": [ "http: "http://thecolbertreport.cc.com/videos/iqeepf/coddling-our-kids", "http://thecolbertreport.cc.com/videos/d006ym/<API key>", "http://thecolbertreport.cc.com/videos/0go470/<API key>", "http://thecolbertreport.cc.com/videos/wpkhsp/tony-hawk", "http://thecolbertreport.cc.com/videos/0eibi7/<API key>" ], "guest": "Tony Hawk" }, { "date": "2006-07-12", "videos": [ "http://thecolbertreport.cc.com/videos/ov83sj/<API key>", "http: "http://thecolbertreport.cc.com/videos/t0dd3g/<API key>", "http://thecolbertreport.cc.com/videos/pey6is/<API key>", "http://thecolbertreport.cc.com/videos/67j2yk/<API key>", "http://thecolbertreport.cc.com/videos/pabesh/mort-zuckerman", "http://thecolbertreport.cc.com/videos/c4tuhx/<API key>" ], "guest": "Mort Zuckerman" }, { "date": "2006-07-13", "videos": [ "http: "http://thecolbertreport.cc.com/videos/d3xq4i/tv-s-new-low", "http://thecolbertreport.cc.com/videos/d45lww/<API key>", "http://thecolbertreport.cc.com/videos/mu9fov/<API key>", "http://thecolbertreport.cc.com/videos/42xxhd/ron-suskind" ], "guest": "Ron Suskind" }, { "date": "2006-07-17", "videos": [ "http: "http://thecolbertreport.cc.com/videos/8g7ft7/microphone-on", "http://thecolbertreport.cc.com/videos/9s23g8/one-american-dollar", "http: "http: "http://thecolbertreport.cc.com/videos/udm6or/lee-silver", "http: ], "guest": "Lee Silver" }, { "date": "2006-07-18", "videos": [ "http: "http://thecolbertreport.cc.com/videos/zipmr4/column-width", "http://thecolbertreport.cc.com/videos/r9fvrq/wwiii", "http://thecolbertreport.cc.com/videos/y08094/<API key>", "http://thecolbertreport.cc.com/videos/dz7igl/<API key>", "http://thecolbertreport.cc.com/videos/j9c7t7/dhani-jones", "http://thecolbertreport.cc.com/videos/eaenq6/try-at-goodbye" ], "guest": "Dhani Jones" }, { "date": "2006-07-19", "videos": [ "http: "http://thecolbertreport.cc.com/videos/wzyudz/veto-virginity", "http://thecolbertreport.cc.com/videos/vmqv4k/oprah-and-gayle", "http://thecolbertreport.cc.com/videos/zjmkqr/<API key>", "http://thecolbertreport.cc.com/videos/yluk0n/<API key>", "http://thecolbertreport.cc.com/videos/xndme2/joe-scarborough", "http://thecolbertreport.cc.com/videos/3os5ld/<API key>" ], "guest": "Joe Scarborough" }, { "date": "2006-07-20", "videos": [ "http://thecolbertreport.cc.com/videos/vx02e0/<API key>", "http: "http://thecolbertreport.cc.com/videos/bpcz93/<API key>", "http://thecolbertreport.cc.com/videos/flwcdv/julian-bond", "http://thecolbertreport.cc.com/videos/8oaiw2/<API key>", "http://thecolbertreport.cc.com/videos/naagf7/tom-brokaw", "http://thecolbertreport.cc.com/videos/8yx1of/one-regret" ], "guest": "Tom Brokaw" }, { "date": "2006-07-24", "videos": [ "http: "http://thecolbertreport.cc.com/videos/b9z8jn/<API key>", "http: "http://thecolbertreport.cc.com/videos/qpue58/<API key>", "http: "http://thecolbertreport.cc.com/videos/0xazqv/howell-raines", "http: ], "guest": "Howell Raines" }, { "date": "2006-07-25", "videos": [ "http: "http://thecolbertreport.cc.com/videos/qik373/all-red-states", "http://thecolbertreport.cc.com/videos/mdzpjk/morning-shows", "http://thecolbertreport.cc.com/videos/e4fmv9/<API key>", "http://thecolbertreport.cc.com/videos/bqr3op/<API key>", "http://thecolbertreport.cc.com/videos/6xp57g/william-donohue", "http://thecolbertreport.cc.com/videos/wfh0qw/<API key>" ], "guest": "William Donohue" }, { "date": "2006-07-26", "videos": [ "http: "http://thecolbertreport.cc.com/videos/a62j0l/<API key>", "http://thecolbertreport.cc.com/videos/nxih1e/rescue-stephen-jr-", "http://thecolbertreport.cc.com/videos/b9kj0d/<API key>", "http://thecolbertreport.cc.com/videos/2wr9gw/<API key>", "http://thecolbertreport.cc.com/videos/ym3t0d/neal-katyal", "http://thecolbertreport.cc.com/videos/9nk4r7/<API key>" ], "guest": "Neal Katyal" }, { "date": "2006-07-27", "videos": [ "http://thecolbertreport.cc.com/videos/bgxe8v/<API key>norton", "http: "http://thecolbertreport.cc.com/videos/2pti2w/floyd-landis--balls", "http: "http://thecolbertreport.cc.com/videos/6quypd/<API key>", "http://thecolbertreport.cc.com/videos/a2w76v/joe-quesada" ], "guest": "Joe Quesada" }, { "date": "2006-07-31", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ipm2dm/book-club", "http://thecolbertreport.cc.com/videos/3jl3pu/bicycle-theft", "http://thecolbertreport.cc.com/videos/z1aahs/<API key>", "http://thecolbertreport.cc.com/videos/zqod1f/<API key>", "http://thecolbertreport.cc.com/videos/6tak7c/ned-lamont" ], "guest": "Ned Lamont" }, { "date": "2006-08-01", "videos": [ "http: "http://thecolbertreport.cc.com/videos/advrej/<API key>", "http://thecolbertreport.cc.com/videos/n4ao8r/cuba-libre", "http: "http://thecolbertreport.cc.com/videos/kxcfet/<API key>", "http://thecolbertreport.cc.com/videos/pcfi97/peter-beinart", "http: ], "guest": "Peter Beinart" }, { "date": "2006-08-02", "videos": [ "http: "http://thecolbertreport.cc.com/videos/1jctl5/<API key>", "http://thecolbertreport.cc.com/videos/tc2zff/<API key>", "http://thecolbertreport.cc.com/videos/9f950b/<API key>", "http://thecolbertreport.cc.com/videos/1gkx3r/no-joe-lieberman", "http://thecolbertreport.cc.com/videos/m7siat/linda-hirshman", "http://thecolbertreport.cc.com/videos/kx6zql/<API key>" ], "guest": "Linda Hirshman" }, { "date": "2006-08-03", "videos": [ "http://thecolbertreport.cc.com/videos/dij1sw/<API key>", "http://thecolbertreport.cc.com/videos/gdp73x/<API key>", "http://thecolbertreport.cc.com/videos/xzhg3v/<API key>", "http://thecolbertreport.cc.com/videos/o6s4zb/paul-hackett", "http://thecolbertreport.cc.com/videos/cujsej/<API key>" ], "guest": "Paul Hackett" }, { "date": "2006-08-08", "videos": [ "http: "http://thecolbertreport.cc.com/videos/oafdpt/lieberman-no-show", "http://thecolbertreport.cc.com/videos/kend9g/<API key>", "http: "http://thecolbertreport.cc.com/videos/ywy5cq/<API key>", "http://thecolbertreport.cc.com/videos/y3ycer/bill-rhoden", "http://thecolbertreport.cc.com/videos/h498ah/<API key>" ], "guest": "Bill Rhoden" }, { "date": "2006-08-09", "videos": [ "http: "http://thecolbertreport.cc.com/videos/m3m7kz/lieberman-loses", "http://thecolbertreport.cc.com/videos/coxidl/delay-and-jesus", "http://thecolbertreport.cc.com/videos/9jopn4/<API key>", "http://thecolbertreport.cc.com/videos/hpijh0/<API key>", "http://thecolbertreport.cc.com/videos/p3g7eb/alexandra-robbins" ], "guest": "Alexandra Robbins" }, { "date": "2006-08-10", "videos": [ "http://thecolbertreport.cc.com/videos/75wf4h/<API key>", "http://thecolbertreport.cc.com/videos/m276r1/<API key>", "http: "http://thecolbertreport.cc.com/videos/m3m7kz/lieberman-loses", "http://thecolbertreport.cc.com/videos/coxidl/delay-and-jesus", "http://thecolbertreport.cc.com/videos/9jopn4/<API key>", "http://thecolbertreport.cc.com/videos/hpijh0/<API key>", "http://thecolbertreport.cc.com/videos/p3g7eb/alexandra-robbins" ], "guest": "Eli Pariser" }, { "date": "2006-08-10", "videos": [ "http: "http://thecolbertreport.cc.com/videos/6kvez0/liquids-on-planes", "http://thecolbertreport.cc.com/videos/b2svxe/<API key>", "http://thecolbertreport.cc.com/videos/fyj6zj/<API key>", "http://thecolbertreport.cc.com/videos/d573ty/eli-pariser", "http://thecolbertreport.cc.com/videos/hjpfzb/<API key>" ], "guest": "Eli Pariser" }, { "date": "2006-08-14", "videos": [ "http: "http://thecolbertreport.cc.com/videos/8c9998/peaceland", "http://thecolbertreport.cc.com/videos/mjxd75/french-fries", "http://thecolbertreport.cc.com/videos/bghbjx/jon-s-apology", "http://thecolbertreport.cc.com/videos/ozm5pk/<API key>", "http://thecolbertreport.cc.com/videos/u393jw/ramesh-ponnuru", "http://thecolbertreport.cc.com/videos/2b5c2u/<API key>" ], "guest": "Ramesh Ponnuru" }, { "date": "2006-08-15", "videos": [ "http: "http://thecolbertreport.cc.com/videos/95fbpq/<API key>", "http://thecolbertreport.cc.com/videos/6qb0k5/<API key>", "http://thecolbertreport.cc.com/videos/2evzvd/<API key>", "http://thecolbertreport.cc.com/videos/mjhnvj/<API key>", "http://thecolbertreport.cc.com/videos/jdgp1k/david-gergen" ], "guest": "David Gergen" }, { "date": "2006-08-16", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ic96lx/alan-schlesinger", "http://thecolbertreport.cc.com/videos/lsglfu/<API key>", "http://thecolbertreport.cc.com/videos/gb4665/<API key>", "http://thecolbertreport.cc.com/videos/2ap7v2/<API key>", "http://thecolbertreport.cc.com/videos/5uanam/morgan-spurlock", "http://thecolbertreport.cc.com/videos/9nqss3/<API key>" ], "guest": "Morgan Spurlock" }, { "date": "2006-08-17", "videos": [ "http: "http://thecolbertreport.cc.com/videos/xzzu7h/continuity", "http://thecolbertreport.cc.com/videos/75yefr/neil-degrasse-tyson", "http://thecolbertreport.cc.com/videos/kc21ru/<API key>", "http://thecolbertreport.cc.com/videos/8n3z7e/<API key>", "http://thecolbertreport.cc.com/videos/nsqwib/neil-young" ], "guest": "Neil Young" }, { "date": "2006-08-21", "videos": [ "http: "http://thecolbertreport.cc.com/videos/vzigy3/<API key>", "http://thecolbertreport.cc.com/videos/u468bk/<API key>", "http://thecolbertreport.cc.com/videos/pqlyj1/<API key>", "http://thecolbertreport.cc.com/videos/euqtan/<API key>", "http://thecolbertreport.cc.com/videos/btgfsr/geoffrey-nunberg", "http://thecolbertreport.cc.com/videos/6p8hy2/<API key>" ], "guest": "Geoffrey Nunberg" }, { "date": "2006-08-22", "videos": [ "http: "http://thecolbertreport.cc.com/videos/xr6owy/<API key>", "http://thecolbertreport.cc.com/videos/p4wf5t/<API key>", "http://thecolbertreport.cc.com/videos/8t1wv1/<API key>", "http://thecolbertreport.cc.com/videos/6iv4i1/paul-krugman" ], "guest": "Paul Krugman" }, { "date": "2006-08-23", "videos": [ "http://thecolbertreport.cc.com/videos/rsqkbw/<API key>", "http://thecolbertreport.cc.com/videos/85w92g/<API key>", "http://thecolbertreport.cc.com/videos/l7z3b3/damian-kulash", "http://thecolbertreport.cc.com/videos/19r90f/<API key>", "http://thecolbertreport.cc.com/videos/9h0pam/gideon-yago", "http://thecolbertreport.cc.com/videos/l29lto/<API key>" ], "guest": "Gideon Yago" }, { "date": "2006-08-24", "videos": [ "http: "http://thecolbertreport.cc.com/videos/j3gjfh/<API key>", "http://thecolbertreport.cc.com/videos/8avj2z/fart-jokes", "http: "http://thecolbertreport.cc.com/videos/sui137/<API key>", "http://thecolbertreport.cc.com/videos/dw0hc5/janna-levin", "http://thecolbertreport.cc.com/videos/8v6ak5/<API key>" ], "guest": "Janna Levin" }, { "date": "2006-09-11", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ryb1sd/manilow-s-emmy", "http: "http://thecolbertreport.cc.com/videos/epkjf1/the-path-to-9-11", "http://thecolbertreport.cc.com/videos/dpqisf/martin-short", "http://thecolbertreport.cc.com/videos/0giino/<API key>" ], "guest": "Martin Short" }, { "date": "2006-09-12", "videos": [ "http://thecolbertreport.cc.com/videos/zj5aco/<API key>", "http: "http://thecolbertreport.cc.com/videos/fuhxnz/<API key>", "http://thecolbertreport.cc.com/videos/464nde/<API key>", "http://thecolbertreport.cc.com/videos/03wv59/<API key>", "http://thecolbertreport.cc.com/videos/uyjgfx/toby-keith", "http://thecolbertreport.cc.com/videos/df7axm/<API key>" ], "guest": "Toby Keith" }, { "date": "2006-09-13", "videos": [ "http: "http://thecolbertreport.cc.com/videos/a7pf2u/the-colmandos", "http://thecolbertreport.cc.com/videos/fftk8t/<API key>", "http://thecolbertreport.cc.com/videos/yr3sze/<API key>", "http://thecolbertreport.cc.com/videos/io94jl/ken-jennings", "http://thecolbertreport.cc.com/videos/m6mk95/<API key>" ], "guest": "Ken Jennings" }, { "date": "2006-09-14", "videos": [ "http: "http://thecolbertreport.cc.com/videos/m82cj5/sexy-photo", "http://thecolbertreport.cc.com/videos/39njye/george-allen", "http://thecolbertreport.cc.com/videos/dmk6s2/<API key>", "http: "http://thecolbertreport.cc.com/videos/6xq5fv/bill-simmons", "http://thecolbertreport.cc.com/videos/czqyfe/<API key>", "http://thecolbertreport.cc.com/videos/g844xc/bridge-contest" ], "guest": "Bill Simmons" }, { "date": "2006-09-18", "videos": [ "http: "http://thecolbertreport.cc.com/videos/51grfw/whitney-houston", "http://thecolbertreport.cc.com/videos/82m3g9/<API key>", "http://thecolbertreport.cc.com/videos/cyd2um/<API key>-", "http://thecolbertreport.cc.com/videos/r7b7p1/will-power", "http: ], "guest": "Will Power" }, { "date": "2006-09-19", "videos": [ "http: "http://thecolbertreport.cc.com/videos/dbmjaj/u-n--week", "http://thecolbertreport.cc.com/videos/5v40iy/<API key>", "http://thecolbertreport.cc.com/videos/qloab5/<API key>", "http://thecolbertreport.cc.com/videos/kf8re4/frank-rich", "http://thecolbertreport.cc.com/videos/ezwrh0/<API key>" ], "guest": "Frank Rich" }, { "date": "2006-09-20", "videos": [ "http://thecolbertreport.cc.com/videos/lj5z86/<API key>", "http://thecolbertreport.cc.com/videos/o1qorx/<API key>", "http://thecolbertreport.cc.com/videos/pz60rq/<API key>", "http://thecolbertreport.cc.com/videos/vkr39r/<API key>", "http://thecolbertreport.cc.com/videos/fn9d5q/james-carville", "http: ], "guest": "James Carville" }, { "date": "2006-09-21", "videos": [ "http: "http://thecolbertreport.cc.com/videos/tvrtdg/<API key>", "http://thecolbertreport.cc.com/videos/kxvydq/<API key>", "http://thecolbertreport.cc.com/videos/u1txo4/daniel-ellsberg", "http://thecolbertreport.cc.com/videos/42tk7e/<API key>", "http://thecolbertreport.cc.com/videos/yxzh84/daniel-golden" ], "guest": "Daniel Ellsberg" }, { "date": "2006-09-25", "videos": [ "http: "http://thecolbertreport.cc.com/videos/918nqn/heritage", "http://thecolbertreport.cc.com/videos/s08yij/buy-this-book", "http://thecolbertreport.cc.com/videos/1tds5k/<API key>", "http://thecolbertreport.cc.com/videos/az74i4/<API key>-", "http://thecolbertreport.cc.com/videos/te8evq/fun-in-the-sun", "http://thecolbertreport.cc.com/videos/c88j0x/arianna-huffington" ], "guest": "Arianna Huffington" }, { "date": "2006-09-26", "videos": [ "http: "http://thecolbertreport.cc.com/videos/76ov53/frank-rich-calls-in", "http://thecolbertreport.cc.com/videos/navjpx/<API key>", "http://thecolbertreport.cc.com/videos/22kzkk/<API key>", "http://thecolbertreport.cc.com/videos/kertmr/ted-danson", "http://thecolbertreport.cc.com/videos/en1nzg/<API key>" ], "guest": "Ted Danson" }, { "date": "2006-09-27", "videos": [ "http: "http://thecolbertreport.cc.com/videos/w75za8/oprah-and-friends", "http://thecolbertreport.cc.com/videos/2zj0db/<API key>", "http: "http://thecolbertreport.cc.com/videos/p20mpr/<API key>", "http://thecolbertreport.cc.com/videos/g1anyj/lowell-bergman", "http://thecolbertreport.cc.com/videos/8v25i1/<API key>" ], "guest": "Lowell Bergman" }, { "date": "2006-09-28", "videos": [ "http: "http://thecolbertreport.cc.com/videos/mechk8/<API key>", "http://thecolbertreport.cc.com/videos/jl58qd/<API key>", "http://thecolbertreport.cc.com/videos/a23i2j/<API key>", "http://thecolbertreport.cc.com/videos/kby4hb/<API key>", "http://thecolbertreport.cc.com/videos/c2vyau/steve-wozniak" ], "guest": "Steve Wozniak" }, { "date": "2006-10-02", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ak0wmf/mark-foley", "http: "http://thecolbertreport.cc.com/videos/0f7zu5/<API key>", "http://thecolbertreport.cc.com/videos/6cuxj4/michael-lewis", "http://thecolbertreport.cc.com/videos/gwcer9/<API key>" ], "guest": "Michael Lewis" }, { "date": "2006-10-03", "videos": [ "http: "http://thecolbertreport.cc.com/videos/85po0w/drunk-dialing", "http://thecolbertreport.cc.com/videos/hnt52c/lucifer", "http://thecolbertreport.cc.com/videos/ap05bd/<API key>", "http://thecolbertreport.cc.com/videos/oojn49/<API key>", "http://thecolbertreport.cc.com/videos/xqpdbq/andy-stern", "http://thecolbertreport.cc.com/videos/tbnr4f/<API key>" ], "guest": "Andy Stern" }, { "date": "2006-10-04", "videos": [ "http: "http://thecolbertreport.cc.com/videos/t3hp8a/mark-foley-the-rino", "http://thecolbertreport.cc.com/videos/2n2oat/<API key>", "http://thecolbertreport.cc.com/videos/536mbt/nobel-prize-sweep", "http://thecolbertreport.cc.com/videos/ga8yja/<API key>", "http://thecolbertreport.cc.com/videos/ps5fh4/byron-dorgan", "http://thecolbertreport.cc.com/videos/vbbgif/-<API key>" ], "guest": "Byron Dorgan" }, { "date": "2006-10-05", "videos": [ "http: "http://thecolbertreport.cc.com/videos/t7lg5x/<API key>", "http://thecolbertreport.cc.com/videos/2pcxy7/<API key>", "http://thecolbertreport.cc.com/videos/6qs8dt/maz-jobrani", "http://thecolbertreport.cc.com/videos/8vhk9f/<API key>", "http://thecolbertreport.cc.com/videos/cg4ud6/amy-goodman", "http://thecolbertreport.cc.com/videos/mex37x/<API key>" ], "guest": "Amy Goodman" }, { "date": "2006-10-09", "videos": [ "http: "http://thecolbertreport.cc.com/videos/vcdu14/<API key>", "http: "http://thecolbertreport.cc.com/videos/oqybt6/<API key>", "http://thecolbertreport.cc.com/videos/sxcbbt/randy-newman" ], "guest": "Randy Newman" }, { "date": "2006-10-10", "videos": [ "http://thecolbertreport.cc.com/videos/7x9ixq/<API key>", "http://thecolbertreport.cc.com/videos/2jugk2/<API key>", "http://thecolbertreport.cc.com/videos/tab5oc/<API key>", "http://thecolbertreport.cc.com/videos/vglnl3/ariel-levy", "http://thecolbertreport.cc.com/videos/6ooly1/<API key>" ], "guest": "Ariel Levy" }, { "date": "2006-10-11", "videos": [ "http: "http://thecolbertreport.cc.com/videos/bmktr8/<API key>", "http://thecolbertreport.cc.com/videos/lbop8f/stephen-cashes-in", "http://thecolbertreport.cc.com/videos/kpo74v/<API key>", "http://thecolbertreport.cc.com/videos/fxyspp/<API key>", "http://thecolbertreport.cc.com/videos/n67d6e/<API key>", "http://thecolbertreport.cc.com/videos/pkbxv2/<API key>", "http://thecolbertreport.cc.com/videos/8hq3dq/lightsaber-duel", "http://thecolbertreport.cc.com/videos/nkr8wo/<API key>" ], "guest": "Andrew Sullivan" }, { "date": "2006-10-12", "videos": [ "http://thecolbertreport.cc.com/videos/d5jz3y/<API key>", "http: "http://thecolbertreport.cc.com/videos/dikrto/congratulatory-mail", "http://thecolbertreport.cc.com/videos/9dfgke/<API key>", "http://thecolbertreport.cc.com/videos/htaz1s/<API key>", "http://thecolbertreport.cc.com/videos/gtnan5/<API key>", "http://thecolbertreport.cc.com/videos/f57spg/brian-schweitzer", "http://thecolbertreport.cc.com/videos/o1sfrf/<API key>" ], "guest": "Larry Miller" }, { "date": "2006-10-16", "videos": [ "http: "http://thecolbertreport.cc.com/videos/q81oyv/<API key>", "http://thecolbertreport.cc.com/videos/3yuat5/cbgb-s", "http://thecolbertreport.cc.com/videos/7i1kaz/<API key>", "http://thecolbertreport.cc.com/videos/rxjbs7/<API key>", "http://thecolbertreport.cc.com/videos/2he8tk/barry-scheck", "http://thecolbertreport.cc.com/videos/xuvjmp/the-wave" ], "guest": "Barry Scheck" }, { "date": "2006-10-17", "videos": [ "http: "http://thecolbertreport.cc.com/videos/fo3bt3/<API key>", "http://thecolbertreport.cc.com/videos/r8tksi/descending-screen", "http://thecolbertreport.cc.com/videos/18nq18/<API key>", "http://thecolbertreport.cc.com/videos/hlfrbf/anniversary-cake", "http://thecolbertreport.cc.com/videos/is87vo/judge-tubbs", "http://thecolbertreport.cc.com/videos/7fe2ut/richard-dawkins", "http://thecolbertreport.cc.com/videos/g41j5d/<API key>" ], "guest": "Richard Dawkins" }, { "date": "2006-10-18", "videos": [ "http: "http://thecolbertreport.cc.com/videos/szo4co/<API key>", "http: "http://thecolbertreport.cc.com/videos/jpgqk0/jeopardy", "http://thecolbertreport.cc.com/videos/wu6d7x/<API key>", "http://thecolbertreport.cc.com/videos/0usw0u/david-kuo", "http://thecolbertreport.cc.com/videos/pun0an/<API key>" ], "guest": "Deepak Chopra" }, { "date": "2006-10-19", "videos": [ "http://thecolbertreport.cc.com/videos/63h5y0/<API key>", "http: "http://thecolbertreport.cc.com/videos/zzoxmj/ebay-portrait-bid", "http://thecolbertreport.cc.com/videos/55o9xl/jim-gilchrist", "http://thecolbertreport.cc.com/videos/eh02b8/<API key>", "http://thecolbertreport.cc.com/videos/484q7z/peter-agre" ], "guest": "Matthew Dowd" }, { "date": "2006-10-30", "videos": [ "http: "http://thecolbertreport.cc.com/videos/501yrw/get-ready-for-barry", "http://thecolbertreport.cc.com/videos/fokcta/stay-the-course", "http://thecolbertreport.cc.com/videos/2ffwy9/<API key>", "http://thecolbertreport.cc.com/videos/3644s2/<API key>", "http://thecolbertreport.cc.com/videos/h5ly2o/barry-manilow" ], "guest": "Barry Manilow" }, { "date": "2006-10-31", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ixb36k/<API key>", "http://thecolbertreport.cc.com/videos/qrw2en/<API key>-", "http://thecolbertreport.cc.com/videos/ya17xq/portrait-auction", "http://thecolbertreport.cc.com/videos/crxtpi/<API key>", "http://thecolbertreport.cc.com/videos/2g6dhj/tim-robbins", "http://thecolbertreport.cc.com/videos/9z7u1s/<API key>" ], "guest": "Tim Robbins" }, { "date": "2006-11-01", "videos": [ "http://thecolbertreport.cc.com/videos/fio9x5/<API key>", "http: "http://thecolbertreport.cc.com/videos/07l6jg/john-kerry", "http: "http://thecolbertreport.cc.com/videos/j449s5/<API key>", "http://thecolbertreport.cc.com/videos/80bjyk/penn-jillette", "http://thecolbertreport.cc.com/videos/7w23zw/big-in--06" ], "guest": "Penn Jillette" }, { "date": "2006-11-02", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ryl8xd/<API key>", "http://thecolbertreport.cc.com/videos/ypv3hz/<API key>", "http://thecolbertreport.cc.com/videos/e8pbai/<API key>", "http://thecolbertreport.cc.com/videos/o5x0ja/<API key>", "http://thecolbertreport.cc.com/videos/vchsrw/ron-reagan" ], "guest": "Ron Reagan Jr." }, { "date": "2006-11-06", "videos": [ "http: "http://thecolbertreport.cc.com/videos/3x1o1e/saddam-s-hanging", "http://thecolbertreport.cc.com/videos/mfycn0/<API key>", "http://thecolbertreport.cc.com/videos/xjsetj/<API key>", "http://thecolbertreport.cc.com/videos/yu4stw/<API key>", "http://thecolbertreport.cc.com/videos/qtoavw/<API key>", "http://thecolbertreport.cc.com/videos/de4hy0/mark-halperin", "http://thecolbertreport.cc.com/videos/iuqlez/absentee-voting" ], "guest": "Mark Halperin" }, { "date": "2006-11-07", "videos": [ "http://thecolbertreport.cc.com/videos/rdhken/<API key>", "http://thecolbertreport.cc.com/videos/vmt5dv/<API key>", "http://thecolbertreport.cc.com/videos/42n9bh/<API key>", "http://thecolbertreport.cc.com/videos/gmknl3/<API key>", "http://thecolbertreport.cc.com/videos/1qhm06/<API key>", "http://thecolbertreport.cc.com/videos/3fzd37/<API key>" ], "guest": "Election Night Live Show" }, { "date": "2006-11-08", "videos": [ "http: "http: "http://thecolbertreport.cc.com/videos/8tjdnz/<API key>", "http://thecolbertreport.cc.com/videos/n1c32a/<API key>", "http://thecolbertreport.cc.com/videos/vzb4w6/jeff-greenfield", "http://thecolbertreport.cc.com/videos/3yplp6/special-memories" ], "guest": "Jeff Greenfield" }, { "date": "2006-11-09", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ec6t9w/<API key>", "http://thecolbertreport.cc.com/videos/0osdbo/<API key>", "http://thecolbertreport.cc.com/videos/ro28cv/<API key>", "http://thecolbertreport.cc.com/videos/sff21j/dean-kamen", "http://thecolbertreport.cc.com/videos/y6jo9b/<API key>" ], "guest": "Dean Kamen" }, { "date": "2006-11-13", "videos": [ "http: "http://thecolbertreport.cc.com/videos/tq9pyg/mccain-s-depression", "http://thecolbertreport.cc.com/videos/wze0m8/<API key>", "http://thecolbertreport.cc.com/videos/3l0etr/<API key>", "http://thecolbertreport.cc.com/videos/v04ko8/dan-rather", "http://thecolbertreport.cc.com/videos/39thdv/<API key>" ], "guest": "Dan Rather" }, { "date": "2006-11-14", "videos": [ "http: "http://thecolbertreport.cc.com/videos/41uzjx/lesbian-roles", "http://thecolbertreport.cc.com/videos/njn4f1/<API key>", "http://thecolbertreport.cc.com/videos/x9bnw7/<API key>", "http://thecolbertreport.cc.com/videos/mx7sjh/<API key>", "http://thecolbertreport.cc.com/videos/xokq2b/jeff-swartz", "http://thecolbertreport.cc.com/videos/cnxqlb/<API key>" ], "guest": "Jeff Swartz" }, { "date": "2006-11-15", "videos": [ "http://thecolbertreport.cc.com/videos/9sc11a/<API key>", "http: "http://thecolbertreport.cc.com/videos/41uzjx/lesbian-roles", "http://thecolbertreport.cc.com/videos/njn4f1/<API key>", "http://thecolbertreport.cc.com/videos/x9bnw7/<API key>", "http://thecolbertreport.cc.com/videos/mx7sjh/<API key>", "http://thecolbertreport.cc.com/videos/xokq2b/jeff-swartz", "http://thecolbertreport.cc.com/videos/cnxqlb/<API key>" ], "guest": "Al Franken, Dr. Michael Novacek" }, { "date": "2006-11-15", "videos": [ "http: "http://thecolbertreport.cc.com/videos/kl1xl0/<API key>", "http://thecolbertreport.cc.com/videos/w5bgh2/<API key>", "http://thecolbertreport.cc.com/videos/47a505/<API key>", "http://thecolbertreport.cc.com/videos/cnf5lf/mike-novacek" ], "guest": "Al Franken, Dr. Michael Novacek" }, { "date": "2006-11-16", "videos": [ "http: "http://thecolbertreport.cc.com/videos/zyzp0g/minority-whip", "http://thecolbertreport.cc.com/videos/euzyuf/sexiest-man-alive", "http://thecolbertreport.cc.com/videos/olggdr/<API key>-", "http://thecolbertreport.cc.com/videos/oplysq/<API key>", "http://thecolbertreport.cc.com/videos/3il1eo/richard-linklater", "http://thecolbertreport.cc.com/videos/s716ap/<API key>" ], "guest": "Richard Linklater" }, { "date": "2006-11-27", "videos": [ "http: "http://thecolbertreport.cc.com/videos/z4h5jm/putin--08", "http://thecolbertreport.cc.com/videos/k3p09y/tivo-cleaning", "http://thecolbertreport.cc.com/videos/dg34l1/<API key>", "http://thecolbertreport.cc.com/videos/ckqxms/<API key>", "http://thecolbertreport.cc.com/videos/lqdkhe/jim-lehrer", "http: ], "guest": "Jim Lehrer" }, { "date": "2006-11-28", "videos": [ "http: "http://thecolbertreport.cc.com/videos/47xxe1/<API key>", "http://thecolbertreport.cc.com/videos/voj40k/<API key>", "http://thecolbertreport.cc.com/videos/fenw0v/<API key>", "http://thecolbertreport.cc.com/videos/xi41md/harry-shearer", "http://thecolbertreport.cc.com/videos/iate4s/<API key>" ], "guest": "Harry Shearer" }, { "date": "2006-11-29", "videos": [ "http: "http://thecolbertreport.cc.com/videos/wanzdw/<API key>", "http://thecolbertreport.cc.com/videos/bp43w6/<API key>", "http://thecolbertreport.cc.com/videos/49jjmd/<API key>", "http://thecolbertreport.cc.com/videos/8rjs2g/nora-ephron" ], "guest": "Nora Ephron" }, { "date": "2006-11-30", "videos": [ "http: "http://thecolbertreport.cc.com/videos/4c2tdv/vilsack-attack", "http://thecolbertreport.cc.com/videos/z88s3n/<API key>", "http://thecolbertreport.cc.com/videos/0inrmr/<API key>", "http://thecolbertreport.cc.com/videos/jotybg/<API key>", "http://thecolbertreport.cc.com/videos/hv1lim/mike-lupica", "http://thecolbertreport.cc.com/videos/k1wdp2/<API key>" ], "guest": "Mike Lupica" }, { "date": "2006-12-04", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ozd0a8/sherman-wedding", "http://thecolbertreport.cc.com/videos/sjup2k/<API key>", "http: "http://thecolbertreport.cc.com/videos/tc5d1m/will-wright", "http://thecolbertreport.cc.com/videos/xpx8ua/<API key>" ], "guest": "Will Wright" }, { "date": "2006-12-05", "videos": [ "http: "http://thecolbertreport.cc.com/videos/6ixmt6/-return--to-the-moon", "http://thecolbertreport.cc.com/videos/mz0h4p/<API key>", "http://thecolbertreport.cc.com/videos/msrwcg/<API key>", "http://thecolbertreport.cc.com/videos/3odbkp/<API key>", "http://thecolbertreport.cc.com/videos/tjdbeu/<API key>", "http://thecolbertreport.cc.com/videos/c1sa92/steven-levitt" ], "guest": "Steven D. Leavitt" }, { "date": "2006-12-06", "videos": [ "http: "http://thecolbertreport.cc.com/videos/oamjbp/life-size-nativity", "http://thecolbertreport.cc.com/videos/ikcmp0/mary-cheney", "http: "http://thecolbertreport.cc.com/videos/76wnkt/<API key>", "http://thecolbertreport.cc.com/videos/0wqkww/john-sexton", "http://thecolbertreport.cc.com/videos/8suoui/<API key>" ], "guest": "John Sexton" }, { "date": "2006-12-07", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ebabt9/david-gregory", "http://thecolbertreport.cc.com/videos/kvccyn/<API key>", "http://thecolbertreport.cc.com/videos/tk750r/<API key>", "http://thecolbertreport.cc.com/videos/dntxcy/<API key>", "http://thecolbertreport.cc.com/videos/4koanp/<API key>", "http://thecolbertreport.cc.com/videos/dqyz7h/francis-collins", "http: ], "guest": "Dr. Francis S. Collins" }, { "date": "2006-12-11", "videos": [ "http: "http://thecolbertreport.cc.com/videos/t0abnh/defending-rosie", "http://thecolbertreport.cc.com/videos/uea9ov/jack-kingston", "http://thecolbertreport.cc.com/videos/k0a3hu/<API key>", "http://thecolbertreport.cc.com/videos/2cea2e/<API key>", "http://thecolbertreport.cc.com/videos/bqpkoy/peter-singer", "http://thecolbertreport.cc.com/videos/5alg6c/got-your-back" ], "guest": "Dr. Peter Singer" }, { "date": "2006-12-12", "videos": [ "http: "http://thecolbertreport.cc.com/videos/kn0mlp/<API key>", "http://thecolbertreport.cc.com/videos/dctycd/<API key>", "http://thecolbertreport.cc.com/videos/1o4xvk/<API key>", "http://thecolbertreport.cc.com/videos/e1504w/<API key>", "http://thecolbertreport.cc.com/videos/xd9itr/<API key>", "http://thecolbertreport.cc.com/videos/j01zz1/dan-savage", "http://thecolbertreport.cc.com/videos/s3gs7u/<API key>" ], "guest": "Dan Savage" }, { "date": "2006-12-13", "videos": [ "http: "http://thecolbertreport.cc.com/videos/yl018s/<API key>", "http://thecolbertreport.cc.com/videos/suc40d/<API key>", "http://thecolbertreport.cc.com/videos/5uk9gs/<API key>", "http://thecolbertreport.cc.com/videos/d0ml1u/<API key>", "http://thecolbertreport.cc.com/videos/x1f8dg/<API key>", "http://thecolbertreport.cc.com/videos/0kcywr/<API key>" ], "guest": "Doris Kearns Goodwin" }, { "date": "2006-12-14", "videos": [ "http: "http://thecolbertreport.cc.com/videos/3moulc/<API key>", "http://thecolbertreport.cc.com/videos/5dvej7/<API key>", "http: "http://thecolbertreport.cc.com/videos/klp05i/<API key>", "http://thecolbertreport.cc.com/videos/wauy3f/<API key>-", "http://thecolbertreport.cc.com/videos/yaoen5/daniel-pinchbeck", "http://thecolbertreport.cc.com/videos/ua9gte/<API key>" ], "guest": "Daniel Pinchbeck" }, { "date": "2006-12-18", "videos": [ "http: "http://thecolbertreport.cc.com/videos/j56gn9/diy-cold-medicine", "http://thecolbertreport.cc.com/videos/ndrsqu/profiles-in-balls", "http://thecolbertreport.cc.com/videos/mv0dai/<API key>", "http://thecolbertreport.cc.com/videos/c4vji3/<API key>", "http://thecolbertreport.cc.com/videos/nnpc32/jack-welch", "http://thecolbertreport.cc.com/videos/yy82av/the-jingle-terns" ], "guest": "Jack Welch" }, { "date": "2006-12-19", "videos": [ "http: "http://thecolbertreport.cc.com/videos/q9o6sw/person-of-the-year", "http://thecolbertreport.cc.com/videos/qh5kz9/<API key>", "http://thecolbertreport.cc.com/videos/v81egv/deepak-chopra", "http://thecolbertreport.cc.com/videos/3fhkpv/face-off-preview", "http://thecolbertreport.cc.com/videos/kza2d8/<API key>" ], "guest": "Deepak Chopra" }, { "date": "2006-12-20", "videos": [ "http: "http://thecolbertreport.cc.com/videos/8t5vas/<API key>", "http://thecolbertreport.cc.com/videos/lyahfg/shreddown", "http://thecolbertreport.cc.com/videos/iocz1g/chris-funk", "http://thecolbertreport.cc.com/videos/4hpbzt/peter-frampton", "http://thecolbertreport.cc.com/videos/m75mj9/<API key>" ], "guest": "Howard Zinn" } ], "2007": [ { "date": "2007-01-08", "videos": [ "http: "http://thecolbertreport.cc.com/videos/liauyt/<API key>", "http: "http://thecolbertreport.cc.com/videos/vfxu06/<API key>", "http://thecolbertreport.cc.com/videos/ya0sji/<API key>", "http://thecolbertreport.cc.com/videos/uuhxlg/<API key>", "http://thecolbertreport.cc.com/videos/duytly/ethan-nadelmann" ], "guest": "Ethan Nadelmann" }, { "date": "2007-01-09", "videos": [ "http://thecolbertreport.cc.com/videos/oxq1cl/not-a-sex-scandal", "http: "http://thecolbertreport.cc.com/videos/a9e13e/<API key>", "http://thecolbertreport.cc.com/videos/bmmv86/ohio-state-loses", "http://thecolbertreport.cc.com/videos/1yhdmp/<API key>", "http://thecolbertreport.cc.com/videos/ezqjm4/jim-cramer", "http://thecolbertreport.cc.com/videos/q6rkb3/<API key>" ], "guest": "Jim Cramer" }, { "date": "2007-01-10", "videos": [ "http: "http://thecolbertreport.cc.com/videos/j5htgu/president-s-speech", "http://thecolbertreport.cc.com/videos/crgbvq/<API key>", "http: "http://thecolbertreport.cc.com/videos/048s3c/<API key>", "http://thecolbertreport.cc.com/videos/ku9y06/david-kamp", "http://thecolbertreport.cc.com/videos/9nuye7/<API key>" ], "guest": "David Kamp" }, { "date": "2007-01-11", "videos": [ "http: "http://thecolbertreport.cc.com/videos/nhwjcd/<API key>", "http://thecolbertreport.cc.com/videos/7v6i3c/ken-roth", "http://thecolbertreport.cc.com/videos/jxfsrm/<API key>", "http://thecolbertreport.cc.com/videos/fxnp1o/judy-woodruff" ], "guest": "Judy Woodruff" }, { "date": "2007-01-15", "videos": [ "http: "http://thecolbertreport.cc.com/videos/bemyqb/<API key>", "http://thecolbertreport.cc.com/videos/ni7g5j/a-man-s-touch", "http: "http: "http://thecolbertreport.cc.com/videos/o7xhwp/alex-kuczynski" ], "guest": "Alex Kuczynski" }, { "date": "2007-01-16", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ycpx4s/squeaky-chair", "http://thecolbertreport.cc.com/videos/r7kinv/pesos-for-pizza", "http: "http://thecolbertreport.cc.com/videos/6q6sy0/<API key>", "http://thecolbertreport.cc.com/videos/2tdkm8/dinesh-d-souza" ], "guest": "Dinesh D'Souza" }, { "date": "2007-01-17", "videos": [ "http: "http://thecolbertreport.cc.com/videos/8amkmh/200th-episode", "http://thecolbertreport.cc.com/videos/wjuko4/lynn-swann", "http://thecolbertreport.cc.com/videos/xv8tlv/<API key>", "http://thecolbertreport.cc.com/videos/1qdsbp/richard-clarke" ], "guest": "Richard Clarke" }, { "date": "2007-01-18", "videos": [ "http: "http://thecolbertreport.cc.com/videos/kyc2cd/<API key>", "http://thecolbertreport.cc.com/videos/qtrfgo/<API key>", "http://thecolbertreport.cc.com/videos/dre6df/<API key>", "http://thecolbertreport.cc.com/videos/9seimt/bill-o-reilly", "http://thecolbertreport.cc.com/videos/cuouel/<API key>" ], "guest": "Bill O'Reilly" }, { "date": "2007-01-22", "videos": [ "http: "http://thecolbertreport.cc.com/videos/1t56vq/the-bears", "http://thecolbertreport.cc.com/videos/itbxtv/<API key>", "http://thecolbertreport.cc.com/videos/mfzk22/<API key>", "http://thecolbertreport.cc.com/videos/opisk9/<API key>", "http://thecolbertreport.cc.com/videos/rnd3lf/tom-schaller", "http://thecolbertreport.cc.com/videos/6mgw6m/<API key>" ], "guest": "Tom Schaller" }, { "date": "2007-01-23", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ebff8o/pre-tape", "http://thecolbertreport.cc.com/videos/vm00zm/lieber-vs--lieber", "http://thecolbertreport.cc.com/videos/jv328p/<API key>", "http://thecolbertreport.cc.com/videos/y849ls/michael-steele", "http://thecolbertreport.cc.com/videos/xxwpqf/wednesday-today" ], "guest": "Michael Steele" }, { "date": "2007-01-24", "videos": [ "http: "http://thecolbertreport.cc.com/videos/gzqy8i/<API key>", "http://thecolbertreport.cc.com/videos/e17mq9/<API key>", "http://thecolbertreport.cc.com/videos/3525mn/<API key>", "http://thecolbertreport.cc.com/videos/r5j10b/lou-dobbs" ], "guest": "Lou Dobbs" }, { "date": "2007-01-25", "videos": [ "http: "http://thecolbertreport.cc.com/videos/7z0x1m/right-away-", "http: "http://thecolbertreport.cc.com/videos/hkzk11/<API key>", "http://thecolbertreport.cc.com/videos/tufln6/mike-wallace" ], "guest": "Mike Wallace" }, { "date": "2007-01-29", "videos": [ "http: "http://thecolbertreport.cc.com/videos/1m6mdm/new-york-grieves", "http://thecolbertreport.cc.com/videos/z0b9vz/stephen-colbert-day", "http://thecolbertreport.cc.com/videos/6p6df7/<API key>", "http://thecolbertreport.cc.com/videos/11js13/<API key>", "http://thecolbertreport.cc.com/videos/zqi973/barry-lando" ], "guest": "Barry M. Lando" }, { "date": "2007-01-30", "videos": [ "http: "http://thecolbertreport.cc.com/videos/j1sd5a/new-military-weapon", "http://thecolbertreport.cc.com/videos/cv6q8o/david-leonhardt", "http://thecolbertreport.cc.com/videos/ttzs6x/<API key>", "http://thecolbertreport.cc.com/videos/bsbad5/<API key>", "http://thecolbertreport.cc.com/videos/eyhp38/donna-shalala", "http://thecolbertreport.cc.com/videos/dwv24s/<API key>" ], "guest": "Donna Shalala" }, { "date": "2007-01-31", "videos": [ "http://thecolbertreport.cc.com/videos/84e6zh/<API key>", "http: "http://thecolbertreport.cc.com/videos/v1la3q/global-warming", "http://thecolbertreport.cc.com/videos/3emlxq/<API key>", "http://thecolbertreport.cc.com/videos/qg7l5c/<API key>", "http://thecolbertreport.cc.com/videos/4lodkc/<API key>", "http://thecolbertreport.cc.com/videos/npjb41/jed-babbin" ], "guest": "Jed Babbin" }, { "date": "2007-02-01", "videos": [ "http: "http://thecolbertreport.cc.com/videos/mzq0ue/cartoon-terrorism", "http://thecolbertreport.cc.com/videos/492fjx/ending-racism", "http://thecolbertreport.cc.com/videos/rbb68f/<API key>", "http://thecolbertreport.cc.com/videos/2m3ntu/<API key>", "http://thecolbertreport.cc.com/videos/s2k3ll/chuck-schumer", "http://thecolbertreport.cc.com/videos/b1j62r/<API key>" ], "guest": "Sen. Chuck Schumer" }, { "date": "2007-02-05", "videos": [ "http: "http://thecolbertreport.cc.com/videos/raqy45/peyton-manseed", "http://thecolbertreport.cc.com/videos/1ppbxw/save-stephen-jr-", "http://thecolbertreport.cc.com/videos/pkx5sp/<API key>", "http://thecolbertreport.cc.com/videos/cu6q1h/<API key>", "http://thecolbertreport.cc.com/videos/qj7ov5/wendy-kopp" ], "guest": "Wendy Kopp" }, { "date": "2007-02-06", "videos": [ "http://thecolbertreport.cc.com/videos/irg0ck/<API key>", "http://thecolbertreport.cc.com/videos/7vpqnl/<API key>", "http: "http://thecolbertreport.cc.com/videos/rirgzz/pray-for-stephen", "http://thecolbertreport.cc.com/videos/ronvu0/<API key>", "http://thecolbertreport.cc.com/videos/sh2kz6/<API key>", "http://thecolbertreport.cc.com/videos/vnbq6e/charles-leduff" ], "guest": "Charlie LeDuff" }, { "date": "2007-02-07", "videos": [ "http: "http://thecolbertreport.cc.com/videos/skowle/<API key>", "http://thecolbertreport.cc.com/videos/hx3kkt/<API key>", "http: "http://thecolbertreport.cc.com/videos/pp2kiz/<API key>", "http://thecolbertreport.cc.com/videos/n36pgb/steven-pinker" ], "guest": "Steven Pinker" }, { "date": "2007-02-08", "videos": [ "http: "http://thecolbertreport.cc.com/videos/btxrus/space-madness", "http://thecolbertreport.cc.com/videos/q5bcg9/<API key>", "http://thecolbertreport.cc.com/videos/12d71h/debra-dickerson", "http://thecolbertreport.cc.com/videos/ls3y3l/<API key>", "http://thecolbertreport.cc.com/videos/m5tx4f/chris-hedges" ], "guest": "Chris Hedges" }, { "date": "2007-02-12", "videos": [ "http: "http://thecolbertreport.cc.com/videos/cvs0b4/<API key>", "http://thecolbertreport.cc.com/videos/wetex5/<API key>", "http://thecolbertreport.cc.com/videos/ovmu6y/michael-oppenheimer", "http://thecolbertreport.cc.com/videos/gbc95s/<API key>" ], "guest": "Michael Oppenheimer" }, { "date": "2007-02-13", "videos": [ "http://thecolbertreport.cc.com/videos/7zlyvc/<API key>", "http://thecolbertreport.cc.com/videos/dh1nxa/<API key>", "http://thecolbertreport.cc.com/videos/cbgmhg/sheryl-wudunn", "http://thecolbertreport.cc.com/videos/rewkbj/<API key>" ], "guest": "Sheryl WuDunn" }, { "date": "2007-02-14", "videos": [ "http://thecolbertreport.cc.com/videos/0unos7/<API key>", "http://thecolbertreport.cc.com/videos/sv6om5/<API key>", "http://thecolbertreport.cc.com/videos/qngp8d/<API key>", "http://thecolbertreport.cc.com/videos/e7leqz/<API key>", "http://thecolbertreport.cc.com/videos/npsgvg/<API key>", "http://thecolbertreport.cc.com/videos/tv0pg5/lance-armstrong", "http: ], "guest": "Lance Armstrong" }, { "date": "2007-02-15", "videos": [ "http: "http://thecolbertreport.cc.com/videos/5h0hc1/<API key>", "http://thecolbertreport.cc.com/videos/dv94hn/<API key>", "http://thecolbertreport.cc.com/videos/xsukru/<API key>", "http://thecolbertreport.cc.com/videos/gxjtk4/<API key>", "http://thecolbertreport.cc.com/videos/htsqly/shashi-tharoor" ], "guest": "Shashi Tharoor" }, { "date": "2007-02-26", "videos": [ "http: "http: "http://thecolbertreport.cc.com/videos/liy97p/<API key>", "http://thecolbertreport.cc.com/videos/rj64v2/zev-chafets", "http://thecolbertreport.cc.com/videos/lto66u/<API key>" ], "guest": "Zev Chafets" }, { "date": "2007-02-27", "videos": [ "http: "http://thecolbertreport.cc.com/videos/4q8yqr/gore-s-garbage", "http: "http://thecolbertreport.cc.com/videos/kyuvud/<API key>", "http: "http://thecolbertreport.cc.com/videos/xtu2o9/craig-venter" ], "guest": "Dr. Craig Venter" }, { "date": "2007-02-28", "videos": [ "http: "http://thecolbertreport.cc.com/videos/94efgl/<API key>-", "http://thecolbertreport.cc.com/videos/ax1yhn/obama-vs--colbert", "http://thecolbertreport.cc.com/videos/2j1fug/<API key>", "http://thecolbertreport.cc.com/videos/2w1ttr/<API key>", "http://thecolbertreport.cc.com/videos/rjcwpq/nina-jablonski" ], "guest": "Nina Jablonski" }, { "date": "2007-03-01", "videos": [ "http: "http://thecolbertreport.cc.com/videos/dnoicn/jesus--1-", "http://thecolbertreport.cc.com/videos/09pfnw/<API key>", "http://thecolbertreport.cc.com/videos/xp8ghf/<API key>", "http://thecolbertreport.cc.com/videos/hdb72u/larry-king", "http://thecolbertreport.cc.com/videos/din9ey/<API key>" ], "guest": "Larry King" }, { "date": "2007-03-05", "videos": [ "http: "http://thecolbertreport.cc.com/videos/f0veng/<API key>", "http://thecolbertreport.cc.com/videos/9rmkm6/<API key>", "http://thecolbertreport.cc.com/videos/erco0p/<API key>", "http://thecolbertreport.cc.com/videos/w9i285/mara-vanderslice", "http://thecolbertreport.cc.com/videos/u5x46t/<API key>-" ], "guest": "Mara Vanderslice, Ben and Jerry" }, { "date": "2007-03-06", "videos": [ "http: "http://thecolbertreport.cc.com/videos/987dug/<API key>", "http://thecolbertreport.cc.com/videos/5xpqn0/libby-verdict", "http: "http://thecolbertreport.cc.com/videos/ryt5zt/<API key>", "http://thecolbertreport.cc.com/videos/d9k0w9/mark-frauenfelder" ], "guest": "Mark Frauenfelder" }, { "date": "2007-03-07", "videos": [ "http: "http://thecolbertreport.cc.com/videos/o5rj01/mega-millions", "http: "http://thecolbertreport.cc.com/videos/mw47n3/<API key>", "http://thecolbertreport.cc.com/videos/k8n6ln/michael-spector", "http://thecolbertreport.cc.com/videos/eu60l7/<API key>" ], "guest": "Michael Specter" }, { "date": "2007-03-08", "videos": [ "http://thecolbertreport.cc.com/videos/hdanpb/<API key>", "http://thecolbertreport.cc.com/videos/1fsr4r/<API key>", "http: "http://thecolbertreport.cc.com/videos/fkezkh/jesus-libby", "http://thecolbertreport.cc.com/videos/kf01z4/<API key>", "http://thecolbertreport.cc.com/videos/gfi7dr/<API key>", "http://thecolbertreport.cc.com/videos/na2cwe/ted-koppel" ], "guest": "Ted Koppel" }, { "date": "2007-03-12", "videos": [ "http: "http://thecolbertreport.cc.com/videos/cxle7m/<API key>", "http://thecolbertreport.cc.com/videos/qs3d07/<API key>", "http: "http://thecolbertreport.cc.com/videos/0z68wk/nicholas-kristof", "http://thecolbertreport.cc.com/videos/paedah/<API key>" ], "guest": "Nicholas D. Kristof" }, { "date": "2007-03-13", "videos": [ "http: "http://thecolbertreport.cc.com/videos/n1695w/time-travel", "http://thecolbertreport.cc.com/videos/o93g04/<API key>", "http://thecolbertreport.cc.com/videos/aln9gt/donald-shields", "http://thecolbertreport.cc.com/videos/nebseq/<API key>", "http://thecolbertreport.cc.com/videos/pajwaw/michael-eric-dyson", "http://thecolbertreport.cc.com/videos/goeagu/<API key>" ], "guest": "Michael Eric Dyson" }, { "date": "2007-03-14", "videos": [ "http: "http://thecolbertreport.cc.com/videos/mi3odp/<API key>", "http://thecolbertreport.cc.com/videos/jdieqt/<API key>", "http://thecolbertreport.cc.com/videos/6t5ydk/rocky-mountain-high", "http: "http://thecolbertreport.cc.com/videos/3w6h8k/ed-viesturs", "http://thecolbertreport.cc.com/videos/x40idi/<API key>" ], "guest": "Ed Viesturs" }, { "date": "2007-03-15", "videos": [ "http://thecolbertreport.cc.com/videos/3yjwcu/<API key>", "http://thecolbertreport.cc.com/videos/l2j89r/<API key>", "http: "http://thecolbertreport.cc.com/videos/mi3odp/<API key>", "http://thecolbertreport.cc.com/videos/jdieqt/<API key>", "http://thecolbertreport.cc.com/videos/6t5ydk/rocky-mountain-high", "http: "http://thecolbertreport.cc.com/videos/3w6h8k/ed-viesturs", "http://thecolbertreport.cc.com/videos/x40idi/<API key>" ], "guest": "Ayaan Hirsi Ali" }, { "date": "2007-03-15", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ojcmho/st--patrick-s-day", "http://thecolbertreport.cc.com/videos/9wsh6f/<API key>", "http://thecolbertreport.cc.com/videos/pvxlng/ayaan-hirsi-ali", "http: ], "guest": "Ayaan Hirsi Ali" }, { "date": "2007-03-19", "videos": [ "http: "http://thecolbertreport.cc.com/videos/zfhuml/<API key>", "http://thecolbertreport.cc.com/videos/ichd6m/<API key>", "http://thecolbertreport.cc.com/videos/ovsoy3/<API key>", "http://thecolbertreport.cc.com/videos/i34oa7/<API key>", "http://thecolbertreport.cc.com/videos/nby1fe/jerome-groopman", "http://thecolbertreport.cc.com/videos/woj3kf/<API key>" ], "guest": "Jerome Groopman" }, { "date": "2007-03-20", "videos": [ "http: "http://thecolbertreport.cc.com/videos/p3nkju/willie-recall", "http://thecolbertreport.cc.com/videos/8w2rhi/<API key>", "http://thecolbertreport.cc.com/videos/4fyygp/<API key>", "http://thecolbertreport.cc.com/videos/rn79kl/<API key>", "http://thecolbertreport.cc.com/videos/fxdmt0/willie-nelson" ], "guest": "Willie Nelson" }, { "date": "2007-03-21", "videos": [ "http: "http://thecolbertreport.cc.com/videos/r7dj9j/<API key>", "http://thecolbertreport.cc.com/videos/wyig4v/impeach-bush", "http: "http://thecolbertreport.cc.com/videos/6b13mn/<API key>", "http://thecolbertreport.cc.com/videos/4jygnv/benjamin-barber", "http://thecolbertreport.cc.com/videos/psro3f/<API key>" ], "guest": "Benjamin Barber" }, { "date": "2007-03-22", "videos": [ "http: "http://thecolbertreport.cc.com/videos/yic3o0/<API key>", "http://thecolbertreport.cc.com/videos/ez9npn/<API key>", "http://thecolbertreport.cc.com/videos/xgjo8q/face-reading-expert", "http://thecolbertreport.cc.com/videos/pd3hdf/<API key>", "http://thecolbertreport.cc.com/videos/i2wwym/katie-couric", "http: ], "guest": "Katie Couric" }, { "date": "2007-03-26", "videos": [ "http: "http://thecolbertreport.cc.com/videos/t9n8i2/mummy", "http://thecolbertreport.cc.com/videos/t7x0xg/torture-gonzales", "http://thecolbertreport.cc.com/videos/hc58hq/<API key>", "http://thecolbertreport.cc.com/videos/r6ez6r/stephen-colbert-day", "http://thecolbertreport.cc.com/videos/a19udk/john-perry-barlow", "http: ], "guest": "John Perry Barlow" }, { "date": "2007-03-27", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ct77qc/<API key>", "http://thecolbertreport.cc.com/videos/y05sqg/madeleine-albright", "http://thecolbertreport.cc.com/videos/ac6sto/<API key>", "http://thecolbertreport.cc.com/videos/z3a4ow/james-fallows" ], "guest": "Madeleine Albright, James Fallows" }, { "date": "2007-03-28", "videos": [ "http: "http://thecolbertreport.cc.com/videos/8b58j1/<API key>", "http://thecolbertreport.cc.com/videos/eoe8d4/claim-to-the-arctic", "http://thecolbertreport.cc.com/videos/e6rbbg/<API key>", "http://thecolbertreport.cc.com/videos/7t7l7y/<API key>", "http://thecolbertreport.cc.com/videos/oval1w/jabari-asim", "http://thecolbertreport.cc.com/videos/tffkup/<API key>" ], "guest": "Jabari Asim" }, { "date": "2007-03-29", "videos": [ "http: "http://thecolbertreport.cc.com/videos/yp03mv/equal-rights", "http://thecolbertreport.cc.com/videos/bwtu8b/<API key>", "http://thecolbertreport.cc.com/videos/m1iokb/<API key>", "http://thecolbertreport.cc.com/videos/rmylpg/<API key>", "http://thecolbertreport.cc.com/videos/dune0v/<API key>", "http://thecolbertreport.cc.com/videos/gp6vcm/clive-james", "http://thecolbertreport.cc.com/videos/cnmwu7/<API key>" ], "guest": "Clive James" }, { "date": "2007-04-09", "videos": [ "http: "http://thecolbertreport.cc.com/videos/c2ss4c/end-of-lent", "http://thecolbertreport.cc.com/videos/jdh0qr/colin-beavan", "http://thecolbertreport.cc.com/videos/p1vkhv/ethnic-slurs", "http://thecolbertreport.cc.com/videos/uyodpo/formula-401k", "http://thecolbertreport.cc.com/videos/d7vjve/<API key>", "http://thecolbertreport.cc.com/videos/vx3kr4/<API key>" ], "guest": "Colin Beavan, Katrina vanden Heuvel" }, { "date": "2007-04-10", "videos": [ "http: "http://thecolbertreport.cc.com/videos/t52s2y/stiff-upper-lip", "http://thecolbertreport.cc.com/videos/7xhdfc/<API key>", "http://thecolbertreport.cc.com/videos/a6j19l/<API key>", "http://thecolbertreport.cc.com/videos/mmtey6/<API key>", "http://thecolbertreport.cc.com/videos/niryzs/jeannette-walls", "http://thecolbertreport.cc.com/videos/tjfkfk/the-apology" ], "guest": "Jeannette Walls" }, { "date": "2007-04-11", "videos": [ "http: "http://thecolbertreport.cc.com/videos/rndpay/<API key>", "http://thecolbertreport.cc.com/videos/o57n2d/<API key>", "http://thecolbertreport.cc.com/videos/y3z7pz/<API key>", "http://thecolbertreport.cc.com/videos/qk7xuu/<API key>", "http://thecolbertreport.cc.com/videos/6ombuy/vali-nasr", "http://thecolbertreport.cc.com/videos/py0zro/<API key>" ], "guest": "Vali Nasr" }, { "date": "2007-04-12", "videos": [ "http: "http://thecolbertreport.cc.com/videos/44wpo2/the-pope-and-iraq", "http://thecolbertreport.cc.com/videos/i2w6da/<API key>", "http://thecolbertreport.cc.com/videos/rp5qr3/<API key>-", "http://thecolbertreport.cc.com/videos/szc2kp/dr--richard-land", "http://thecolbertreport.cc.com/videos/z4a9cf/<API key>" ], "guest": "Dr. Richard Land" }, { "date": "2007-04-16", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ow68vg/mope-retraction", "http://thecolbertreport.cc.com/videos/ndyxmi/<API key>", "http://thecolbertreport.cc.com/videos/fiwckw/<API key>", "http://thecolbertreport.cc.com/videos/vsf7vy/<API key>", "http://thecolbertreport.cc.com/videos/le9tdo/<API key>", "http://thecolbertreport.cc.com/videos/yq2yld/<API key>", "http://thecolbertreport.cc.com/videos/1dnqiw/john-kerry" ], "guest": "Sen. John Kerry" }, { "date": "2007-04-17", "videos": [ "http://thecolbertreport.cc.com/videos/35u6vo/<API key>", "http://thecolbertreport.cc.com/videos/ctnp41/turtle-race-update", "http: "http://thecolbertreport.cc.com/videos/1ca1nf/<API key>", "http://thecolbertreport.cc.com/videos/ofyxod/elaine-pagels", "http://thecolbertreport.cc.com/videos/ka39h6/<API key>", "http: ], "guest": "Elaine Pagels" }, { "date": "2007-04-18", "videos": [ "http: "http://thecolbertreport.cc.com/videos/z7yfgh/<API key>", "http: "http://thecolbertreport.cc.com/videos/d5i37n/<API key>", "http: "http://thecolbertreport.cc.com/videos/edyu8c/<API key>", "http://thecolbertreport.cc.com/videos/ebje1q/<API key>", "http://thecolbertreport.cc.com/videos/33tv9j/paulina-porizkova", "http://thecolbertreport.cc.com/videos/tn0cbn/<API key>" ], "guest": "William Cohen" }, { "date": "2007-04-19", "videos": [ "http: "http://thecolbertreport.cc.com/videos/luoh3l/god-s-pet-chimp", "http://thecolbertreport.cc.com/videos/goj3np/<API key>", "http://thecolbertreport.cc.com/videos/tv447i/sean-penn", "http://thecolbertreport.cc.com/videos/iowvf0/<API key>-", "http://thecolbertreport.cc.com/videos/nzuytf/hyperbole-off" ], "guest": "Gov. Mike Huckabee" }, { "date": "2007-04-23", "videos": [ "http: "http://thecolbertreport.cc.com/videos/tuitvp/gonzales-forgot", "http://thecolbertreport.cc.com/videos/xgp7gj/stephanie-s-winning-", "http://thecolbertreport.cc.com/videos/bsgdkg/<API key>", "http://thecolbertreport.cc.com/videos/mksggb/<API key>", "http://thecolbertreport.cc.com/videos/25567u/russell-simmons", "http://thecolbertreport.cc.com/videos/75z88c/<API key>" ], "guest": "Russell Simmons" }, { "date": "2007-04-24", "videos": [ "http: "http://thecolbertreport.cc.com/videos/9lfdmb/bye-bye-to-boris", "http://thecolbertreport.cc.com/videos/zf1m9m/<API key>", "http://thecolbertreport.cc.com/videos/zebgor/<API key>", "http://thecolbertreport.cc.com/videos/o4vs3o/60--good-news", "http://thecolbertreport.cc.com/videos/63paz7/<API key>", "http://thecolbertreport.cc.com/videos/i6gv9q/dr--andrew-weil", "http://thecolbertreport.cc.com/videos/858p8x/<API key>" ], "guest": "Dr. Andrew Weil" }, { "date": "2007-04-25", "videos": [ "http: "http://thecolbertreport.cc.com/videos/9cksb2/<API key>", "http://thecolbertreport.cc.com/videos/uixydp/<API key>", "http://thecolbertreport.cc.com/videos/xlgsnw/new-issue-of-gq", "http://thecolbertreport.cc.com/videos/vsu32z/<API key>", "http://thecolbertreport.cc.com/videos/877wu4/david-walker", "http: ], "guest": "David Walker" }, { "date": "2007-04-26", "videos": [ "http://thecolbertreport.cc.com/videos/uxgeoh/<API key>", "http://thecolbertreport.cc.com/videos/nfu1lw/<API key>", "http: "http://thecolbertreport.cc.com/videos/ph7bwx/stephanie-lost", "http://thecolbertreport.cc.com/videos/nn2tor/<API key>", "http://thecolbertreport.cc.com/videos/7ibt5q/<API key>", "http://thecolbertreport.cc.com/videos/wax9na/tom-wolfe", "http://thecolbertreport.cc.com/videos/4y1aqm/<API key>" ], "guest": "Tom Wolfe" }, { "date": "2007-04-30", "videos": [ "http: "http://thecolbertreport.cc.com/videos/hpmi3p/<API key>", "http://thecolbertreport.cc.com/videos/lv3s81/neil-degrasse-tyson", "http: "http://thecolbertreport.cc.com/videos/iwnuxq/bill-bradley" ], "guest": "Bill Bradley" }, { "date": "2007-05-01", "videos": [ "http: "http://thecolbertreport.cc.com/videos/scarky/<API key>", "http://thecolbertreport.cc.com/videos/oh320q/npr-correction", "http://thecolbertreport.cc.com/videos/q45jin/<API key>-", "http://thecolbertreport.cc.com/videos/cgfptc/stephen-s-horse", "http://thecolbertreport.cc.com/videos/m9pls7/malcolm-gladwell", "http: ], "guest": "Malcolm Gladwell" }, { "date": "2007-05-02", "videos": [ "http: "http://thecolbertreport.cc.com/videos/vvfvju/hr-1591", "http://thecolbertreport.cc.com/videos/a3d8vy/<API key>", "http://thecolbertreport.cc.com/videos/oo27ij/mike-gravel", "http://thecolbertreport.cc.com/videos/u82od0/gina-kolata" ], "guest": "Gina Kolata" }, { "date": "2007-05-03", "videos": [ "http://thecolbertreport.cc.com/videos/33wl1k/<API key>", "http: "http://thecolbertreport.cc.com/videos/wsiuq8/<API key>", "http://thecolbertreport.cc.com/videos/0wtt0d/<API key>", "http://thecolbertreport.cc.com/videos/2iymfl/<API key>", "http://thecolbertreport.cc.com/videos/6azbk5/conn-iggulden", "http://thecolbertreport.cc.com/videos/dblp9v/<API key>" ], "guest": "Conn Iggulden" }, { "date": "2007-05-07", "videos": [ "http: "http://thecolbertreport.cc.com/videos/5ra6xp/bonjour--mon-frere", "http://thecolbertreport.cc.com/videos/o0gs8q/<API key>", "http://thecolbertreport.cc.com/videos/ojz8he/<API key>", "http://thecolbertreport.cc.com/videos/x5zaaj/<API key>", "http://thecolbertreport.cc.com/videos/1i1xa2/richard-preston" ], "guest": "Richard Preston" }, { "date": "2007-05-08", "videos": [ "http: "http://thecolbertreport.cc.com/videos/4vb9ha/<API key>", "http://thecolbertreport.cc.com/videos/v2jrqr/<API key>", "http: "http://thecolbertreport.cc.com/videos/296em4/<API key>" ], "guest": "Nassim Nicholas Taleb" }, { "date": "2007-05-09", "videos": [ "http: "http://thecolbertreport.cc.com/videos/hs4hrn/mother-s-day", "http://thecolbertreport.cc.com/videos/01nwrp/formal-request", "http://thecolbertreport.cc.com/videos/ijt89t/salman-rushdie", "http://thecolbertreport.cc.com/videos/y81ejs/kiss-the-host", "http://thecolbertreport.cc.com/videos/4mwns0/thompson-fuss", "http://thecolbertreport.cc.com/videos/8ixf7m/jane-fonda", "http://thecolbertreport.cc.com/videos/bhwtjj/<API key>" ], "guest": "Salman Rushdie, Jane Fonda" }, { "date": "2007-05-10", "videos": [ "http: "http: "http://thecolbertreport.cc.com/videos/6mm58j/<API key>", "http://thecolbertreport.cc.com/videos/1yenb5/<API key>", "http://thecolbertreport.cc.com/videos/ya8jd7/jann-wenner", "http://thecolbertreport.cc.com/videos/tbehsa/<API key>", "http://thecolbertreport.cc.com/videos/59lqle/<API key>" ], "guest": "Jann Wenner" }, { "date": "2007-05-14", "videos": [ "http: "http://thecolbertreport.cc.com/videos/2wmvq0/ferrari-list", "http://thecolbertreport.cc.com/videos/ji8vnp/<API key>", "http://thecolbertreport.cc.com/videos/62strl/<API key>", "http://thecolbertreport.cc.com/videos/324045/<API key>", "http://thecolbertreport.cc.com/videos/70la8y/<API key>" ], "guest": "William Langewiesche" }, { "date": "2007-05-15", "videos": [ "http: "http://thecolbertreport.cc.com/videos/0oyxpf/mcnulty-guilty", "http://thecolbertreport.cc.com/videos/c0yfoq/pasadena--india", "http://thecolbertreport.cc.com/videos/lda912/<API key>", "http://thecolbertreport.cc.com/videos/7heoq8/<API key>", "http://thecolbertreport.cc.com/videos/yqaslk/<API key>", "http://thecolbertreport.cc.com/videos/q5o3oe/walter-isaacson", "http://thecolbertreport.cc.com/videos/3mglju/r-i-p--ted-maiman" ], "guest": "Walter Isaacson" }, { "date": "2007-05-16", "videos": [ "http: "http://thecolbertreport.cc.com/videos/9nd4g1/<API key>", "http://thecolbertreport.cc.com/videos/lqz6xp/<API key>", "http://thecolbertreport.cc.com/videos/vb25tk/<API key>", "http://thecolbertreport.cc.com/videos/vd7dcd/howard-dean", "http://thecolbertreport.cc.com/videos/west8f/<API key>" ], "guest": "Howard Dean" }, { "date": "2007-05-17", "videos": [ "http: "http://thecolbertreport.cc.com/videos/xbgufk/the-hammer-is-here-", "http://thecolbertreport.cc.com/videos/g57yti/baby-gun-permit", "http://thecolbertreport.cc.com/videos/wqfqxb/tom-delay", "http://thecolbertreport.cc.com/videos/nfhqh3/randy-kearse", "http: ], "guest": "Randy Kearse, Rep. Tom DeLay" }, { "date": "2007-05-21", "videos": [ "http: "http://thecolbertreport.cc.com/videos/j7bshe/<API key>", "http://thecolbertreport.cc.com/videos/s5odvt/<API key>", "http: "http://thecolbertreport.cc.com/videos/zg6n7b/<API key>", "http://thecolbertreport.cc.com/videos/zhetqf/jared-diamond" ], "guest": "Jared Diamond" }, { "date": "2007-05-22", "videos": [ "http: "http://thecolbertreport.cc.com/videos/pp3dmv/popularity-contest", "http://thecolbertreport.cc.com/videos/szr9pb/barack-s-a-liar", "http://thecolbertreport.cc.com/videos/4wuift/<API key>", "http://thecolbertreport.cc.com/videos/7bglee/<API key>", "http://thecolbertreport.cc.com/videos/661huh/john-amaechi", "http://thecolbertreport.cc.com/videos/ivskf6/<API key>" ], "guest": "John Amaechi" }, { "date": "2007-05-23", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ac7obb/bush-is-back-", "http://thecolbertreport.cc.com/videos/2t0qn4/<API key>", "http://thecolbertreport.cc.com/videos/m6d100/<API key>-", "http://thecolbertreport.cc.com/videos/0v2e97/bob-deans", "http: ], "guest": "Bay Buchanan, Bob Deans" }, { "date": "2007-05-24", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ihom0u/fleet-week", "http://thecolbertreport.cc.com/videos/5d38de/big-loud-flag", "http://thecolbertreport.cc.com/videos/oxz2g4/up-in-smoke", "http://thecolbertreport.cc.com/videos/brpu8j/<API key>", "http://thecolbertreport.cc.com/videos/vylxk3/jimmy-wales", "http://thecolbertreport.cc.com/videos/xj2s00/speaking-fee" ], "guest": "Jimmy Wales" }, { "date": "2007-06-04", "videos": [ "http: "http://thecolbertreport.cc.com/videos/oujnzk/uneventful-vacation", "http://thecolbertreport.cc.com/videos/5475j4/<API key>", "http://thecolbertreport.cc.com/videos/3bhuju/jan-schakowsky", "http://thecolbertreport.cc.com/videos/svome1/<API key>", "http://thecolbertreport.cc.com/videos/o9kyh0/leon-botstein", "http://thecolbertreport.cc.com/videos/kaun5v/<API key>" ], "guest": "Rep. Jan Schakowsky, Leon Botstein" }, { "date": "2007-06-05", "videos": [ "http: "http://thecolbertreport.cc.com/videos/cvm31h/<API key>-", "http: "http://thecolbertreport.cc.com/videos/8226p8/<API key>", "http://thecolbertreport.cc.com/videos/n0lk8c/the-god-machine-", "http://thecolbertreport.cc.com/videos/l7y8g1/<API key>", "http://thecolbertreport.cc.com/videos/rsex2i/jessica-valenti" ], "guest": "Jessica Valenti" }, { "date": "2007-06-06", "videos": [ "http: "http://thecolbertreport.cc.com/videos/h69756/sinner-edwards", "http://thecolbertreport.cc.com/videos/5mthf9/<API key>", "http://thecolbertreport.cc.com/videos/cujedg/<API key>", "http://thecolbertreport.cc.com/videos/ngt9bf/carl-bernstein", "http://thecolbertreport.cc.com/videos/xd82es/<API key>" ], "guest": "Carl Bernstein" }, { "date": "2007-06-07", "videos": [ "http: "http://thecolbertreport.cc.com/videos/w1jmjp/pope-jump", "http: "http://thecolbertreport.cc.com/videos/tl388o/<API key>", "http://thecolbertreport.cc.com/videos/ty2mfm/cullen-murphy", "http://thecolbertreport.cc.com/videos/sitbn5/<API key>" ], "guest": "Cullen Murphy" }, { "date": "2007-06-11", "videos": [ "http: "http://thecolbertreport.cc.com/videos/dufa3e/<API key>", "http: "http://thecolbertreport.cc.com/videos/kd0cks/<API key>", "http://thecolbertreport.cc.com/videos/qrkfud/<API key>", "http://thecolbertreport.cc.com/videos/zpjdcg/michael-gershon" ], "guest": "Dr. Michael D. Gershon" }, { "date": "2007-06-12", "videos": [ "http: "http://thecolbertreport.cc.com/videos/8dqxf0/<API key>", "http://thecolbertreport.cc.com/videos/sse01t/<API key>", "http://thecolbertreport.cc.com/videos/lhl8km/<API key>", "http://thecolbertreport.cc.com/videos/ey1hjm/<API key>", "http://thecolbertreport.cc.com/videos/2krcmy/<API key>", "http://thecolbertreport.cc.com/videos/gdyajn/josh-wolf", "http://thecolbertreport.cc.com/videos/r2b64h/<API key>" ], "guest": "Josh Wolf" }, { "date": "2007-06-13", "videos": [ "http: "http://thecolbertreport.cc.com/videos/fytk75/ruined-anniversary", "http://thecolbertreport.cc.com/videos/6nklj9/<API key>", "http://thecolbertreport.cc.com/videos/tnydpx/<API key>", "http: "http://thecolbertreport.cc.com/videos/o2ywub/ron-paul", "http://thecolbertreport.cc.com/videos/cakp5s/<API key>" ], "guest": "Rep. Ron Paul" }, { "date": "2007-06-14", "videos": [ "http: "http://thecolbertreport.cc.com/videos/6uc0h1/<API key>", "http://thecolbertreport.cc.com/videos/g52jco/stephen-benjamin", "http://thecolbertreport.cc.com/videos/0agktt/<API key>", "http://thecolbertreport.cc.com/videos/a0p792/daniel-b--smith", "http://thecolbertreport.cc.com/videos/llk3nk/<API key>" ], "guest": "Daniel B. Smith" }, { "date": "2007-06-18", "videos": [ "http: "http://thecolbertreport.cc.com/videos/k3t99j/papal-encounter", "http://thecolbertreport.cc.com/videos/rbx9fh/the-price-is-right", "http://thecolbertreport.cc.com/videos/w0pe9q/<API key>", "http://thecolbertreport.cc.com/videos/yfclcj/stephen-on-itunes", "http://thecolbertreport.cc.com/videos/7jalja/<API key>", "http://thecolbertreport.cc.com/videos/ozfwje/toby-keith" ], "guest": "Toby Keith" }, { "date": "2007-06-19", "videos": [ "http: "http://thecolbertreport.cc.com/videos/qxyadz/<API key>, "http://thecolbertreport.cc.com/videos/0y4kih/marybeth-garrigan", "http://thecolbertreport.cc.com/videos/mzxikb/<API key>", "http://thecolbertreport.cc.com/videos/ij3mgr/<API key>", "http://thecolbertreport.cc.com/videos/u1dk1e/<API key>", "http://thecolbertreport.cc.com/videos/kxk02d/<API key>" ], "guest": "Harriet the Eagle with handler, Anne-Marie Slaughter" }, { "date": "2007-06-20", "videos": [ "http: "http://thecolbertreport.cc.com/videos/beccdu/<API key>", "http: "http://thecolbertreport.cc.com/videos/4yziuf/<API key>", "http://thecolbertreport.cc.com/videos/7m9bgr/will-schwalbe", "http://thecolbertreport.cc.com/videos/glo9c6/<API key>" ], "guest": "Will Schwalbe" }, { "date": "2007-06-21", "videos": [ "http: "http://thecolbertreport.cc.com/videos/psamg7/<API key>", "http://thecolbertreport.cc.com/videos/38xzef/<API key>", "http://thecolbertreport.cc.com/videos/2oyfu8/vincent-bugliosi", "http://thecolbertreport.cc.com/videos/dlqbr6/<API key>", "http: ], "guest": "Vincent Bugliosi" }, { "date": "2007-06-25", "videos": [ "http: "http://thecolbertreport.cc.com/videos/xvrdq7/the-freegans", "http://thecolbertreport.cc.com/videos/dqezp0/<API key>", "http://thecolbertreport.cc.com/videos/oldt6o/<API key>", "http://thecolbertreport.cc.com/videos/mhjtgw/tom-hayden", "http: ], "guest": "Tom Hayden" }, { "date": "2007-06-26", "videos": [ "http: "http://thecolbertreport.cc.com/videos/id2z8d/christmas-in-june", "http://thecolbertreport.cc.com/videos/eelu64/<API key>", "http://thecolbertreport.cc.com/videos/tpff57/<API key>", "http://thecolbertreport.cc.com/videos/0t819z/christmas-presents", "http://thecolbertreport.cc.com/videos/5awnum/<API key>", "http://thecolbertreport.cc.com/videos/1uvv46/david-france", "http://thecolbertreport.cc.com/videos/96ew1f/<API key>" ], "guest": "David France" }, { "date": "2007-06-27", "videos": [ "http: "http://thecolbertreport.cc.com/videos/y34h2c/<API key>", "http://thecolbertreport.cc.com/videos/wepdgq/tom-blanton", "http://thecolbertreport.cc.com/videos/f6in26/<API key>", "http://thecolbertreport.cc.com/videos/msuhoe/daniel-gilbert" ], "guest": "Tom Blanton, Daniel Gilbert" }, { "date": "2007-06-28", "videos": [ "http: "http://thecolbertreport.cc.com/videos/2o9nj2/spot-the-difference", "http://thecolbertreport.cc.com/videos/kb8br0/<API key>", "http://thecolbertreport.cc.com/videos/0lfyqf/<API key>", "http://thecolbertreport.cc.com/videos/owh6vd/<API key>", "http://thecolbertreport.cc.com/videos/f9y6wb/doug-bailey", "http://thecolbertreport.cc.com/videos/oxeeoj/<API key>" ], "guest": "Doug Bailey" }, { "date": "2007-07-16", "videos": [ "http: "http://thecolbertreport.cc.com/videos/bwablo/<API key>", "http://thecolbertreport.cc.com/videos/lnroz7/richard-florida", "http://thecolbertreport.cc.com/videos/scrz03/<API key>", "http://thecolbertreport.cc.com/videos/r0qxf5/ben-nelson", "http://thecolbertreport.cc.com/videos/zabqma/<API key>" ], "guest": "Richard Florida, Sen. Ben Nelson" }, { "date": "2007-07-17", "videos": [ "http: "http://thecolbertreport.cc.com/videos/zl176l/<API key>", "http://thecolbertreport.cc.com/videos/depupc/<API key>", "http://thecolbertreport.cc.com/videos/hdn59k/1-428-minutes-to-go", "http://thecolbertreport.cc.com/videos/gafa5t/<API key>", "http://thecolbertreport.cc.com/videos/ev6dp9/mark-moffett", "http://thecolbertreport.cc.com/videos/1jb3qq/<API key>" ], "guest": "Mark Moffett" }, { "date": "2007-07-18", "videos": [ "http: "http://thecolbertreport.cc.com/videos/gn1bt7/2007-filibustacular", "http://thecolbertreport.cc.com/videos/hqa77b/<API key>", "http://thecolbertreport.cc.com/videos/ysfdjx/pope-goes-green", "http://thecolbertreport.cc.com/videos/artj1e/<API key>", "http://thecolbertreport.cc.com/videos/ga3vsc/john-mellencamp" ], "guest": "John Mellencamp" }, { "date": "2007-07-19", "videos": [ "http: "http://thecolbertreport.cc.com/videos/1esv0i/<API key>", "http://thecolbertreport.cc.com/videos/a9zoea/michael-moore", "http://thecolbertreport.cc.com/videos/bn2nox/<API key>", "http://thecolbertreport.cc.com/videos/9p0lhk/frank-sulloway", "http://thecolbertreport.cc.com/videos/qhp9z3/<API key>" ], "guest": "Frank Sulloway" }, { "date": "2007-07-23", "videos": [ "http: "http://thecolbertreport.cc.com/videos/fkxqbr/<API key>", "http://thecolbertreport.cc.com/videos/4rqgp5/<API key>", "http://thecolbertreport.cc.com/videos/l0ig1p/<API key>", "http://thecolbertreport.cc.com/videos/6e6gd1/simon-schama", "http://thecolbertreport.cc.com/videos/vfxa7p/<API key>" ], "guest": "Simon Schama" }, { "date": "2007-07-24", "videos": [ "http: "http://thecolbertreport.cc.com/videos/d9v0fp/bush-s-butt", "http://thecolbertreport.cc.com/videos/nvdygh/<API key>", "http://thecolbertreport.cc.com/videos/e5420t/<API key>", "http://thecolbertreport.cc.com/videos/yqgj2h/anthony-romero", "http://thecolbertreport.cc.com/videos/alsjeo/<API key>" ], "guest": "Anthony D. Romero" }, { "date": "2007-07-25", "videos": [ "http: "http://thecolbertreport.cc.com/videos/4md3eg/daily-kos", "http://thecolbertreport.cc.com/videos/ikcdyi/<API key>", "http://thecolbertreport.cc.com/videos/bdjzxb/thompson-campaign", "http://thecolbertreport.cc.com/videos/bc0mf3/<API key>", "http://thecolbertreport.cc.com/videos/2f2r58/charles-kaiser" ], "guest": "Charles Kaiser" }, { "date": "2007-07-26", "videos": [ "http: "http://thecolbertreport.cc.com/videos/3or3gc/<API key>-", "http://thecolbertreport.cc.com/videos/if6h6s/<API key>", "http://thecolbertreport.cc.com/videos/8p2na8/<API key>", "http://thecolbertreport.cc.com/videos/kcb6kk/bob-shrum" ], "guest": "Robert Shrum" }, { "date": "2007-07-30", "videos": [ "http: "http://thecolbertreport.cc.com/videos/tyo2os/<API key>", "http://thecolbertreport.cc.com/videos/9e0vz0/<API key>", "http://thecolbertreport.cc.com/videos/brdooe/<API key>", "http://thecolbertreport.cc.com/videos/ii5xvp/<API key>", "http://thecolbertreport.cc.com/videos/o55kxd/evan-osnos" ], "guest": "Evan Osnos" }, { "date": "2007-07-31", "videos": [ "http: "http://thecolbertreport.cc.com/videos/bgyn76/<API key>", "http://thecolbertreport.cc.com/videos/aryder/<API key>-", "http://thecolbertreport.cc.com/videos/tg3umi/<API key>", "http://thecolbertreport.cc.com/videos/egvqvt/<API key>", "http://thecolbertreport.cc.com/videos/i9cr44/<API key>", "http://thecolbertreport.cc.com/videos/3tom79/<API key>" ], "guest": "Kathleen Kennedy Townsend" }, { "date": "2007-08-01", "videos": [ "http: "http://thecolbertreport.cc.com/videos/b8kbe8/dr--jerry-vizzone", "http://thecolbertreport.cc.com/videos/zd2nvn/<API key>", "http://thecolbertreport.cc.com/videos/nlqwhc/<API key>", "http://thecolbertreport.cc.com/videos/agisiu/michael-beschloss", "http://thecolbertreport.cc.com/videos/a0yv9l/<API key>" ], "guest": "Michael Beschloss" }, { "date": "2007-08-02", "videos": [ "http://thecolbertreport.cc.com/videos/qjky5n/<API key>", "http: "http://thecolbertreport.cc.com/videos/b8kbe8/dr--jerry-vizzone", "http://thecolbertreport.cc.com/videos/zd2nvn/<API key>", "http://thecolbertreport.cc.com/videos/nlqwhc/<API key>", "http://thecolbertreport.cc.com/videos/agisiu/michael-beschloss", "http://thecolbertreport.cc.com/videos/a0yv9l/<API key>" ], "guest": "Michael J. Behe" }, { "date": "2007-08-02", "videos": [ "http: "http://thecolbertreport.cc.com/videos/4fa4lg/superhighway", "http://thecolbertreport.cc.com/videos/sg9xg3/rick-macarthur", "http://thecolbertreport.cc.com/videos/vc3b3c/<API key>", "http://thecolbertreport.cc.com/videos/ptvqa7/<API key>", "http://thecolbertreport.cc.com/videos/z81ulz/michael-behe" ], "guest": "Michael J. Behe" }, { "date": "2007-08-07", "videos": [ "http: "http://thecolbertreport.cc.com/videos/4kw9z4/<API key>", "http://thecolbertreport.cc.com/videos/f3w2rh/<API key>", "http://thecolbertreport.cc.com/videos/zwnri3/<API key>", "http://thecolbertreport.cc.com/videos/d21xmf/ian-bogost", "http://thecolbertreport.cc.com/videos/kzlukl/<API key>" ], "guest": "Ian Bogost" }, { "date": "2007-08-08", "videos": [ "http: "http://thecolbertreport.cc.com/videos/oxms8d/<API key>", "http://thecolbertreport.cc.com/videos/jtqjr6/jim-cramer", "http://thecolbertreport.cc.com/videos/nveh3o/<API key>", "http://thecolbertreport.cc.com/videos/7zavlx/tina-brown" ], "guest": "Jim Cramer, Tina Brown" }, { "date": "2007-08-09", "videos": [ "http: "http: "http: "http://thecolbertreport.cc.com/videos/h9y997/judd-apatow", "http: ], "guest": "Judd Apatow" }, { "date": "2007-08-13", "videos": [ "http: "http://thecolbertreport.cc.com/videos/gavjew/rove-resigns", "http://thecolbertreport.cc.com/videos/qu995y/<API key>", "http: "http://thecolbertreport.cc.com/videos/fk3k31/michael-jacobson", "http://thecolbertreport.cc.com/videos/dnjitq/<API key>" ], "guest": "Michael Jacobson" }, { "date": "2007-08-14", "videos": [ "http://thecolbertreport.cc.com/videos/0imzs4/<API key>", "http://thecolbertreport.cc.com/videos/n35y17/jerry-miller", "http://thecolbertreport.cc.com/videos/5o7ie1/dr--spencer-wells", "http://thecolbertreport.cc.com/videos/x03vyw/<API key>" ], "guest": "Jerry Miller, Spencer Wells" }, { "date": "2007-08-15", "videos": [ "http: "http://thecolbertreport.cc.com/videos/rv9k9s/<API key>", "http://thecolbertreport.cc.com/videos/3zlayh/markos-moulitsas", "http://thecolbertreport.cc.com/videos/6mvd9x/<API key>", "http://thecolbertreport.cc.com/videos/zp4iw7/<API key>", "http://thecolbertreport.cc.com/videos/734nxn/michael-wallis", "http://thecolbertreport.cc.com/videos/z4d4y4/<API key>" ], "guest": "Michael Wallis" }, { "date": "2007-08-16", "videos": [ "http: "http://thecolbertreport.cc.com/videos/14jprr/<API key>", "http://thecolbertreport.cc.com/videos/kgguey/mike-huckabee", "http://thecolbertreport.cc.com/videos/fnrvrc/<API key>", "http://thecolbertreport.cc.com/videos/u8nc37/andrew-keen" ], "guest": "Andrew Keen" }, { "date": "2007-08-20", "videos": [ "http: "http://thecolbertreport.cc.com/videos/xo98yh/<API key>", "http://thecolbertreport.cc.com/videos/us6itk/<API key>", "http://thecolbertreport.cc.com/videos/9a8i9h/<API key>", "http://thecolbertreport.cc.com/videos/o9ho2y/nathan-sawaya" ], "guest": "Nathan Sawaya" }, { "date": "2007-08-21", "videos": [ "http: "http://thecolbertreport.cc.com/videos/bcfeni/<API key>", "http://thecolbertreport.cc.com/videos/7gfsui/<API key>", "http://thecolbertreport.cc.com/videos/v4twhy/<API key>", "http://thecolbertreport.cc.com/videos/4o129i/michael-shermer" ], "guest": "Michael Shermer" }, { "date": "2007-08-22", "videos": [ "http: "http://thecolbertreport.cc.com/videos/k7oqos/foreshadowing", "http://thecolbertreport.cc.com/videos/9snnh5/<API key>", "http://thecolbertreport.cc.com/videos/ymi1da/<API key>-", "http://thecolbertreport.cc.com/videos/r18bn4/<API key>", "http://thecolbertreport.cc.com/videos/xxwsh0/richard-branson", "http://thecolbertreport.cc.com/videos/eb410v/doused" ], "guest": "Richard Branson" }, { "date": "2007-08-23", "videos": [ "http: "http://thecolbertreport.cc.com/videos/uc4umy/<API key>", "http://thecolbertreport.cc.com/videos/en1mx1/thomas-ricks", "http://thecolbertreport.cc.com/videos/xjgukn/fractured-freedom", "http://thecolbertreport.cc.com/videos/0arcqm/<API key>", "http://thecolbertreport.cc.com/videos/3xfbbo/free-at-last", "http://thecolbertreport.cc.com/videos/qta5f5/the-auction-begins-" ], "guest": "Thomas Ricks" }, { "date": "2007-09-10", "videos": [ "http: "http://thecolbertreport.cc.com/videos/vdvpmz/kicking-the-habit", "http://thecolbertreport.cc.com/videos/p14g3t/<API key>", "http://thecolbertreport.cc.com/videos/2qi5qf/cast-auction", "http://thecolbertreport.cc.com/videos/u1yamr/bjorn-lomborg" ], "guest": "Bjorn Lomborg" }, { "date": "2007-09-11", "videos": [ "http: "http://thecolbertreport.cc.com/videos/3l7k3j/general-betray-us", "http://thecolbertreport.cc.com/videos/5yaj4x/<API key>", "http://thecolbertreport.cc.com/videos/mjzhz2/<API key>", "http://thecolbertreport.cc.com/videos/5z4esb/<API key>", "http://thecolbertreport.cc.com/videos/o07u14/garrison-keillor" ], "guest": "Garrison Keillor" }, { "date": "2007-09-12", "videos": [ "http: "http://thecolbertreport.cc.com/videos/8lpy3i/1-888-mops-key", "http: "http://thecolbertreport.cc.com/videos/r6x2pm/michael-bloomberg", "http://thecolbertreport.cc.com/videos/3rano7/<API key>", "http://thecolbertreport.cc.com/videos/n46uq9/joel-klein", "http://thecolbertreport.cc.com/videos/pc4v8w/klein-s-penance" ], "guest": "Joel Klein" }, { "date": "2007-09-13", "videos": [ "http: "http://thecolbertreport.cc.com/videos/rvio16/the-emmys", "http://thecolbertreport.cc.com/videos/g1gps7/father-james-martin", "http://thecolbertreport.cc.com/videos/9unkmu/wriststrong", "http://thecolbertreport.cc.com/videos/5c8kig/ed-begley-jr-", "http://thecolbertreport.cc.com/videos/9mwknn/<API key>" ], "guest": "Ed Begley Jr." }, { "date": "2007-09-18", "videos": [ "http: "http://thecolbertreport.cc.com/videos/6l9i7j/<API key>", "http://thecolbertreport.cc.com/videos/6we8r4/<API key>", "http://thecolbertreport.cc.com/videos/jx6a68/susan-sarandon" ], "guest": "Susan Sarandon" }, { "date": "2007-09-19", "videos": [ "http: "http://thecolbertreport.cc.com/videos/zeoen2/<API key>", "http://thecolbertreport.cc.com/videos/0aau1u/<API key>", "http://thecolbertreport.cc.com/videos/7ooxuh/<API key>", "http://thecolbertreport.cc.com/videos/nnhbey/naomi-wolf" ], "guest": "Naomi Wolf" }, { "date": "2007-09-20", "videos": [ "http: "http://thecolbertreport.cc.com/videos/0ek76n/rabbi-fish", "http://thecolbertreport.cc.com/videos/2h18lo/blistering-rebuttal", "http://thecolbertreport.cc.com/videos/z6i9oa/<API key>", "http: "http://thecolbertreport.cc.com/videos/wthvm9/jeffrey-toobin", "http://thecolbertreport.cc.com/videos/1pktzf/<API key>" ], "guest": "Jeffrey Toobin" }, { "date": "2007-09-24", "videos": [ "http: "http://thecolbertreport.cc.com/videos/kwfydk/<API key>", "http://thecolbertreport.cc.com/videos/zztck4/<API key>", "http://thecolbertreport.cc.com/videos/l00qbc/the-metric-system", "http://thecolbertreport.cc.com/videos/pkz7i5/thomas-l--friedman", "http://thecolbertreport.cc.com/videos/emtni3/<API key>" ], "guest": "Thomas Friedman" }, { "date": "2007-09-25", "videos": [ "http: "http://thecolbertreport.cc.com/videos/cminr7/no-nuclear-iran", "http://thecolbertreport.cc.com/videos/2g01er/<API key>", "http://thecolbertreport.cc.com/videos/bjhu7f/k--david-harrison", "http://thecolbertreport.cc.com/videos/b5cc0e/<API key>", "http://thecolbertreport.cc.com/videos/5ny4ja/john-grisham" ], "guest": "John Grisham" }, { "date": "2007-09-26", "videos": [ "http: "http://thecolbertreport.cc.com/videos/rn3hke/forgiving-bennett", "http://thecolbertreport.cc.com/videos/agyblq/canadian-dollar", "http://thecolbertreport.cc.com/videos/nj93xu/<API key>", "http://thecolbertreport.cc.com/videos/0iswbv/sam-waterston", "http://thecolbertreport.cc.com/videos/79m504/tony-bennett" ], "guest": "Tony Bennett" }, { "date": "2007-09-27", "videos": [ "http: "http://thecolbertreport.cc.com/videos/o502gv/king-tut", "http://thecolbertreport.cc.com/videos/mhmga5/<API key>", "http://thecolbertreport.cc.com/videos/th2rny/<API key>", "http://thecolbertreport.cc.com/videos/ev9qqd/david-schwartz", "http://thecolbertreport.cc.com/videos/q0vng8/<API key>" ], "guest": "David Schwartz" }, { "date": "2007-10-01", "videos": [ "http: "http://thecolbertreport.cc.com/videos/s3koea/<API key>", "http: "http://thecolbertreport.cc.com/videos/7s7h6l/<API key>", "http://thecolbertreport.cc.com/videos/5wkeol/charlie-savage", "http://thecolbertreport.cc.com/videos/g86mf6/<API key>" ], "guest": "Charlie Savage" }, { "date": "2007-10-02", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ws1a9l/end-of-the-universe", "http://thecolbertreport.cc.com/videos/boxkhr/the-real-showdown", "http://thecolbertreport.cc.com/videos/f1ovth/<API key>", "http://thecolbertreport.cc.com/videos/berne3/<API key>", "http://thecolbertreport.cc.com/videos/non4mf/john-mearsheimer", "http://thecolbertreport.cc.com/videos/yxngw7/<API key>" ], "guest": "John Mearsheimer" }, { "date": "2007-10-03", "videos": [ "http: "http://thecolbertreport.cc.com/videos/rsugzz/krugman-correction", "http://thecolbertreport.cc.com/videos/ujxs1h/<API key>", "http://thecolbertreport.cc.com/videos/ttvyxm/<API key>", "http://thecolbertreport.cc.com/videos/bohex1/<API key>", "http://thecolbertreport.cc.com/videos/1scf3a/jim-lovell" ], "guest": "Jim Lovell" }, { "date": "2007-10-04", "videos": [ "http: "http://thecolbertreport.cc.com/videos/9ie5cp/<API key>", "http://thecolbertreport.cc.com/videos/t9j9vd/<API key>", "http://thecolbertreport.cc.com/videos/ze1fvk/<API key>", "http://thecolbertreport.cc.com/videos/i58e8l/john-kao", "http://thecolbertreport.cc.com/videos/jy5aw2/<API key>" ], "guest": "John Kao" }, { "date": "2007-10-08", "videos": [ "http: "http://thecolbertreport.cc.com/videos/pw4m4c/doggie-co-author", "http://thecolbertreport.cc.com/videos/xkdwvy/<API key>", "http://thecolbertreport.cc.com/videos/56gzq7/<API key>", "http://thecolbertreport.cc.com/videos/og377e/george-saunders", "http://thecolbertreport.cc.com/videos/p6057q/<API key>" ], "guest": "George Saunders" }, { "date": "2007-10-09", "videos": [ "http: "http://thecolbertreport.cc.com/videos/plzp6y/<API key>-", "http://thecolbertreport.cc.com/videos/ubbze1/new-reagan-coin", "http://thecolbertreport.cc.com/videos/597azm/<API key>", "http://thecolbertreport.cc.com/videos/1znjlb/obama-s-lapel", "http://thecolbertreport.cc.com/videos/x1wzb3/<API key>", "http://thecolbertreport.cc.com/videos/r0xdzt/<API key>" ], "guest": "Stephen Colbert" }, { "date": "2007-10-10", "videos": [ "http: "http://thecolbertreport.cc.com/videos/4ht7gm/<API key>", "http://thecolbertreport.cc.com/videos/79ara8/<API key>", "http://thecolbertreport.cc.com/videos/dzvdm0/<API key>", "http://thecolbertreport.cc.com/videos/97z30b/wesley-clark" ], "guest": "Gen. Wesley Clark" }, { "date": "2007-10-11", "videos": [ "http: "http://thecolbertreport.cc.com/videos/a27soa/<API key>", "http://thecolbertreport.cc.com/videos/o6xiyi/frank-gaffney", "http://thecolbertreport.cc.com/videos/zipx3v/<API key>", "http://thecolbertreport.cc.com/videos/zv1po1/chris-jordan" ], "guest": "Chris Jordan" }, { "date": "2007-10-15", "videos": [ "http: "http://thecolbertreport.cc.com/videos/9esznw/<API key>", "http://thecolbertreport.cc.com/videos/oogvcb/<API key>", "http://thecolbertreport.cc.com/videos/cmpb1d/kucinich-s-pockets", "http://thecolbertreport.cc.com/videos/biff8k/paul-glastris" ], "guest": "Dennis Kucinich, Paul Glastris" }, { "date": "2007-10-16", "videos": [ "http: "http://thecolbertreport.cc.com/videos/0pl61p/planet-in-peril", "http://thecolbertreport.cc.com/videos/f97ynd/<API key>", "http://thecolbertreport.cc.com/videos/9phoww/jeff-greenfield", "http://thecolbertreport.cc.com/videos/9j5u2v/bob-drogin" ], "guest": "Bob Drogin, Jeff Greenfield" }, { "date": "2007-10-17", "videos": [ "http: "http://thecolbertreport.cc.com/videos/el4ceo/the-big-news", "http://thecolbertreport.cc.com/videos/ps9172/<API key>", "http://thecolbertreport.cc.com/videos/duz61o/<API key>", "http://thecolbertreport.cc.com/videos/dvoers/garry-kasparov", "http://thecolbertreport.cc.com/videos/e0223g/<API key>" ], "guest": "Garry Kasparov" }, { "date": "2007-10-18", "videos": [ "http: "http://thecolbertreport.cc.com/videos/z3kzwl/pumpkin-shortage", "http://thecolbertreport.cc.com/videos/6o9coa/<API key>", "http://thecolbertreport.cc.com/videos/p1wo65/<API key>", "http://thecolbertreport.cc.com/videos/rcmqef/craig-newmark", "http://thecolbertreport.cc.com/videos/i2rw4t/<API key>" ], "guest": "Craig Newmark, Anderson Cooper" }, { "date": "2007-10-29", "videos": [ "http: "http://thecolbertreport.cc.com/videos/oqlp6f/<API key>", "http://thecolbertreport.cc.com/videos/2hfe9b/<API key>", "http://thecolbertreport.cc.com/videos/wli1tg/<API key>", "http://thecolbertreport.cc.com/videos/49my1v/<API key>", "http://thecolbertreport.cc.com/videos/pmtsjp/richard-berman", "http://thecolbertreport.cc.com/videos/1yeaa0/<API key>" ], "guest": "Richard Berman" }, { "date": "2007-10-30", "videos": [ "http: "http://thecolbertreport.cc.com/videos/f3dddn/massie-ritsch", "http://thecolbertreport.cc.com/videos/rrhz2o/<API key>", "http://thecolbertreport.cc.com/videos/czdur4/j--craig-venter" ], "guest": "Massie Ritsch, Craig Venter" }, { "date": "2007-10-31", "videos": [ "http: "http://thecolbertreport.cc.com/videos/iwuly8/hallo-weening", "http://thecolbertreport.cc.com/videos/lshob0/<API key>", "http://thecolbertreport.cc.com/videos/pcplr6/<API key>", "http://thecolbertreport.cc.com/videos/hpr411/<API key>", "http://thecolbertreport.cc.com/videos/s7cadq/<API key>", "http://thecolbertreport.cc.com/videos/4uxxf3/lawrence-wilkerson" ], "guest": "Col. Lawrence Wilkerson" }, { "date": "2007-11-01", "videos": [ "http: "http://thecolbertreport.cc.com/videos/dzscg7/<API key>", "http://thecolbertreport.cc.com/videos/9d4e78/<API key>", "http://thecolbertreport.cc.com/videos/tcxqui/walter-kirn", "http://thecolbertreport.cc.com/videos/zymn63/<API key>" ], "guest": "Walter Kirn" } ], "2008": [ { "date": "2008-01-07", "videos": [ "http: "http://thecolbertreport.cc.com/videos/cva2to/applause", "http://thecolbertreport.cc.com/videos/mdmdd0/<API key>", "http://thecolbertreport.cc.com/videos/lp7qsd/2008-election", "http: "http://thecolbertreport.cc.com/videos/mbip8q/<API key>", "http://thecolbertreport.cc.com/videos/v60qiq/richard-freeman", "http://thecolbertreport.cc.com/videos/ckwp47/first-wrap-up" ], "guest": "Andrew Sullivan, Richard Freeman" }, { "date": "2008-01-08", "videos": [ "http://thecolbertreport.cc.com/videos/8ws9bh/self-driving-car", "http://thecolbertreport.cc.com/videos/2785cy/<API key>", "http://thecolbertreport.cc.com/videos/2hhoxp/meteorite-market", "http://thecolbertreport.cc.com/videos/ljxmh2/chris-beam", "http://thecolbertreport.cc.com/videos/tl8ofm/gary-rosen", "http://thecolbertreport.cc.com/videos/m7kpci/note-to-strikers" ], "guest": "Chris Beam, Gary Rosen" }, { "date": "2008-01-09", "videos": [ "http://thecolbertreport.cc.com/videos/33bwbo/she-won-", "http://thecolbertreport.cc.com/videos/fu1w6p/<API key>", "http://thecolbertreport.cc.com/videos/weeodm/mike-huckabee", "http://thecolbertreport.cc.com/videos/d0g8tk/matt-taibbi", "http://thecolbertreport.cc.com/videos/je02b9/studio-on-fire" ], "guest": "Gov. Mike Huckabee, Matt Taibbi" }, { "date": "2008-01-10", "videos": [ "http://thecolbertreport.cc.com/videos/613lgd/<API key>", "http://thecolbertreport.cc.com/videos/s269t4/norman-ornstein", "http://thecolbertreport.cc.com/videos/y7lisr/<API key>", "http://thecolbertreport.cc.com/videos/x10j2p/muhammad-yunus", "http://thecolbertreport.cc.com/videos/ypiss3/to-the-writers" ], "guest": "Norman Ornstein, Muhammad Yunus" }, { "date": "2008-01-14", "videos": [ "http://thecolbertreport.cc.com/videos/pm5v1p/<API key>", "http://thecolbertreport.cc.com/videos/1vwzy6/<API key>", "http://thecolbertreport.cc.com/videos/7k6fkq/<API key>", "http://thecolbertreport.cc.com/videos/dytre7/<API key>", "http://thecolbertreport.cc.com/videos/xgsf42/neil-shubin", "http://thecolbertreport.cc.com/videos/tmke9w/digesting-lo-mein" ], "guest": "Neil Shubin" }, { "date": "2008-01-15", "videos": [ "http://thecolbertreport.cc.com/videos/4wimo2/<API key>", "http://thecolbertreport.cc.com/videos/hrzpve/peter-hopkins", "http://thecolbertreport.cc.com/videos/1m3t4h/<API key>", "http://thecolbertreport.cc.com/videos/b0e6w3/jared-cohen", "http://thecolbertreport.cc.com/videos/4f2fw9/parting-shot" ], "guest": "Peter Hopkins, Jared Cohen" }, { "date": "2008-01-16", "videos": [ "http://thecolbertreport.cc.com/videos/6mjra2/primary-update", "http://thecolbertreport.cc.com/videos/ng3cbb/<API key>", "http://thecolbertreport.cc.com/videos/v0glj4/<API key>", "http://thecolbertreport.cc.com/videos/zlpayq/deborah-tannen" ], "guest": "Deborah Tannen" }, { "date": "2008-01-17", "videos": [ "http://thecolbertreport.cc.com/videos/0tl5ul/push-polling", "http://thecolbertreport.cc.com/videos/phko2g/<API key>", "http://thecolbertreport.cc.com/videos/xj86rv/lou-dobbs", "http://thecolbertreport.cc.com/videos/ykpl7i/david-levy" ], "guest": "Lou Dobbs, David Levy" }, { "date": "2008-01-21", "videos": [ "http://thecolbertreport.cc.com/videos/3xkco0/nevada-caucus", "http://thecolbertreport.cc.com/videos/qznknb/huckabee-s-message", "http://thecolbertreport.cc.com/videos/i2josd/allan-sloan", "http://thecolbertreport.cc.com/videos/wjtmux/<API key>", "http://thecolbertreport.cc.com/videos/ia8xzl/eric-weiner" ], "guest": "Allan Sloan, Eric Weiner" }, { "date": "2008-01-22", "videos": [ "http://thecolbertreport.cc.com/videos/8q1hh4/dow-drop", "http://thecolbertreport.cc.com/videos/7cp97e/malcolm-gladwell", "http://thecolbertreport.cc.com/videos/xw3v9i/andrew-young", "http://thecolbertreport.cc.com/videos/5tvl4o/let-my-people-go" ], "guest": "Malcolm Gladwell, Andrew Young" }, { "date": "2008-01-23", "videos": [ "http://thecolbertreport.cc.com/videos/1vjtzq/fred-thompson-out", "http://thecolbertreport.cc.com/videos/1fbgf9/<API key>", "http://thecolbertreport.cc.com/videos/08lghg/big-check", "http://thecolbertreport.cc.com/videos/wmftq8/jeb-corliss", "http://thecolbertreport.cc.com/videos/rp759h/andrew-mclean" ], "guest": "Marie Wood, Jeb Corliss, Andrew McLean" }, { "date": "2008-01-24", "videos": [ "http://thecolbertreport.cc.com/videos/7uwyyh/rudy-in-florida", "http://thecolbertreport.cc.com/videos/xoh710/clinton-s-hero", "http://thecolbertreport.cc.com/videos/swzg9r/debra-dickerson", "http://thecolbertreport.cc.com/videos/0wz55a/<API key>", "http://thecolbertreport.cc.com/videos/bpcnyw/charles-nesson" ], "guest": "Debra Dickerson, Charles Nesson" }, { "date": "2008-01-28", "videos": [ "http://thecolbertreport.cc.com/videos/na6amv/obama-just-like-jfk", "http://thecolbertreport.cc.com/videos/zvtkxx/<API key>", "http://thecolbertreport.cc.com/videos/07hrs5/marjane-satrapi", "http://thecolbertreport.cc.com/videos/wrdlsf/<API key>-", "http://thecolbertreport.cc.com/videos/l1477t/rick-warren" ], "guest": "Marjane Satrapi, Rick Warren" }, { "date": "2008-01-29", "videos": [ "http://thecolbertreport.cc.com/videos/aeooxe/googley-eyed-clams", "http://thecolbertreport.cc.com/videos/laposi/joe-quesada", "http://thecolbertreport.cc.com/videos/xw6ugs/french-clam", "http://thecolbertreport.cc.com/videos/38i4eg/alex-ross" ], "guest": "Joe Quesada, Alex Ross" }, { "date": "2008-01-30", "videos": [ "http://thecolbertreport.cc.com/videos/akx9de/<API key>", "http://thecolbertreport.cc.com/videos/t6sflk/florida-primary", "http://thecolbertreport.cc.com/videos/vb4t2x/carl-hiaasen", "http://thecolbertreport.cc.com/videos/n87g1n/<API key>", "http://thecolbertreport.cc.com/videos/m4iax5/frans-de-waal" ], "guest": "Carl Hiaasen, Frans de Waal" }, { "date": "2008-01-31", "videos": [ "http://thecolbertreport.cc.com/videos/z0raub/timetables", "http://thecolbertreport.cc.com/videos/8l0ndt/<API key>", "http://thecolbertreport.cc.com/videos/2lwxda/tim-harford", "http://thecolbertreport.cc.com/videos/0d4uq9/<API key>", "http://thecolbertreport.cc.com/videos/kgrty6/andrew-napolitano" ], "guest": "Tim Harford, Andrew Napolitano" }, { "date": "2008-02-04", "videos": [ "http://thecolbertreport.cc.com/videos/pwg4p2/conan-and-jon", "http://thecolbertreport.cc.com/videos/y5zzyu/tony-campolo", "http://thecolbertreport.cc.com/videos/tmuhtk/jacob-weisberg", "http://thecolbertreport.cc.com/videos/7r0nt2/<API key>" ], "guest": "Tony Campolo, Jacob Weisberg" }, { "date": "2008-02-05", "videos": [ "http://thecolbertreport.cc.com/videos/yvxknz/happy-super-tuesday-", "http://thecolbertreport.cc.com/videos/nqwcui/hillary-is-a-target", "http://thecolbertreport.cc.com/videos/xonm3y/angelo-falcon", "http://thecolbertreport.cc.com/videos/xq9nc4/mukasey-on-torture", "http://thecolbertreport.cc.com/videos/gjwjsl/bob-dole" ], "guest": "Angelo Falcon, Bob Dole" }, { "date": "2008-02-06", "videos": [ "http://thecolbertreport.cc.com/videos/j3dp2u/late-night-fight", "http://thecolbertreport.cc.com/videos/gqstf6/<API key>", "http://thecolbertreport.cc.com/videos/yxx0w5/richard-brookhiser", "http://thecolbertreport.cc.com/videos/ammxmv/<API key>", "http://thecolbertreport.cc.com/videos/nhkpwj/tad-devine" ], "guest": "Tad Devine" }, { "date": "2008-02-07", "videos": [ "http://thecolbertreport.cc.com/videos/ctzo98/<API key>", "http://thecolbertreport.cc.com/videos/v43el0/huckabee-s-still-in", "http://thecolbertreport.cc.com/videos/negp2q/<API key>", "http://thecolbertreport.cc.com/videos/oxf63b/mark-moffett" ], "guest": "Mark Moffett" }, { "date": "2008-02-11", "videos": [ "http://thecolbertreport.cc.com/videos/bs8egm/obama-wins-a-grammy", "http://thecolbertreport.cc.com/videos/lnkbna/goodbye-mitt", "http://thecolbertreport.cc.com/videos/myptag/aubrey-de-grey", "http://thecolbertreport.cc.com/videos/in3tg3/portrait-check-in", "http://thecolbertreport.cc.com/videos/8sjpoa/philip-zimbardo" ], "guest": "Aubrey de Grey, Philip Zimbardo" }, { "date": "2008-02-12", "videos": [ "http://thecolbertreport.cc.com/videos/gucgvs/<API key>", "http://thecolbertreport.cc.com/videos/6g98j7/eliot-spitzer", "http://thecolbertreport.cc.com/videos/udbv19/<API key>", "http://thecolbertreport.cc.com/videos/ekpicq/lisa-randall" ], "guest": "Gov. Eliot Spitzer, Eleanor Holmes Norton, Lisa Randall" }, { "date": "2008-02-13", "videos": [ "http: "http://thecolbertreport.cc.com/videos/mvp1nc/the-writers-return-", "http://thecolbertreport.cc.com/videos/n3dwin/david-gracer", "http://thecolbertreport.cc.com/videos/aebxex/<API key>", "http://thecolbertreport.cc.com/videos/n39iqt/<API key>" ], "guest": "David Gracer, Richard Thompson Ford" }, { "date": "2008-02-14", "videos": [ "http: "http://thecolbertreport.cc.com/videos/qg63hg/<API key>", "http://thecolbertreport.cc.com/videos/slbgcr/clemens-hearing", "http://thecolbertreport.cc.com/videos/0i3hg8/john-feinstein", "http://thecolbertreport.cc.com/videos/dmxs6z/<API key>", "http://thecolbertreport.cc.com/videos/hxt6mo/leonard-nimoy" ], "guest": "John Feinstein, Leonard Nimoy" }, { "date": "2008-02-26", "videos": [ "http: "http://thecolbertreport.cc.com/videos/cexk3g/obama-s-photo", "http://thecolbertreport.cc.com/videos/x6h69l/<API key>", "http://thecolbertreport.cc.com/videos/4s0owa/<API key>-" ], "guest": "Henry Louis Gates Jr." }, { "date": "2008-02-27", "videos": [ "http://thecolbertreport.cc.com/videos/3uzan2/<API key>", "http: "http://thecolbertreport.cc.com/videos/fb142a/mccain-rally", "http://thecolbertreport.cc.com/videos/717g03/<API key>", "http://thecolbertreport.cc.com/videos/ni7mzt/tony-snow" ], "guest": "Tony Snow" }, { "date": "2008-02-28", "videos": [ "http://thecolbertreport.cc.com/videos/upjayy/the-music-man", "http: "http://thecolbertreport.cc.com/videos/wq9qga/russian-billboard", "http://thecolbertreport.cc.com/videos/c64r8o/cold-war-update", "http://thecolbertreport.cc.com/videos/zrhp7w/richard-brookhiser", "http://thecolbertreport.cc.com/videos/n7g9t0/ingrid-newkirk", "http://thecolbertreport.cc.com/videos/zsj0rq/<API key>" ], "guest": "Richard Brookhiser, Ingrid Newkirk" }, { "date": "2008-03-03", "videos": [ "http: "http://thecolbertreport.cc.com/videos/1gyoec/<API key>", "http://thecolbertreport.cc.com/videos/do24ht/<API key>", "http://thecolbertreport.cc.com/videos/dvfqt3/<API key>", "http://thecolbertreport.cc.com/videos/8llta1/shashi-tharoor", "http://thecolbertreport.cc.com/videos/beqjns/leap-day" ], "guest": "Lorin Maazel, Shashi Tharoor" }, { "date": "2008-03-04", "videos": [ "http: "http://thecolbertreport.cc.com/videos/509s01/william-donohue", "http://thecolbertreport.cc.com/videos/myyov6/howard-dean", "http://thecolbertreport.cc.com/videos/wvt9ny/<API key>", "http://thecolbertreport.cc.com/videos/86yukf/jennifer-8--lee", "http://thecolbertreport.cc.com/videos/10okbb/to-howard-dean", "http://thecolbertreport.cc.com/videos/q08fbb/<API key>" ], "guest": "William Donohue, Howard Dean, Jennifer 8. Lee" }, { "date": "2008-03-05", "videos": [ "http: "http://thecolbertreport.cc.com/videos/d60bre/<API key>", "http://thecolbertreport.cc.com/videos/q038rv/hucka-bye", "http://thecolbertreport.cc.com/videos/6296yb/robert-reich", "http://thecolbertreport.cc.com/videos/lrlzri/<API key>", "http://thecolbertreport.cc.com/videos/z6yixf/gregory-rodriguez", "http://thecolbertreport.cc.com/videos/p6i1w8/r-i-p--gary-gygax" ], "guest": "Robert Reich, Gregory Rodriguez" }, { "date": "2008-03-06", "videos": [ "http: "http://thecolbertreport.cc.com/videos/m9ob1y/<API key>", "http://thecolbertreport.cc.com/videos/i9idne/<API key>", "http://thecolbertreport.cc.com/videos/0ih0ea/<API key>", "http://thecolbertreport.cc.com/videos/cv6bwa/john-legend" ], "guest": "John Legend" }, { "date": "2008-03-10", "videos": [ "http: "http://thecolbertreport.cc.com/videos/3a9bum/whores-", "http://thecolbertreport.cc.com/videos/8p3t8b/<API key>", "http://thecolbertreport.cc.com/videos/fdo5yd/the--72-democrats", "http://thecolbertreport.cc.com/videos/7m46n6/george-mcgovern" ], "guest": "George McGovern" }, { "date": "2008-03-11", "videos": [ "http: "http://thecolbertreport.cc.com/videos/me89dy/<API key>", "http://thecolbertreport.cc.com/videos/twuo43/<API key>", "http://thecolbertreport.cc.com/videos/f7ltv5/<API key>", "http://thecolbertreport.cc.com/videos/gcwzrr/geraldo-rivera", "http://thecolbertreport.cc.com/videos/8h6jvx/<API key>" ], "guest": "Geraldo Rivera" }, { "date": "2008-03-12", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ntzxtt/spitzer-sandwich", "http://thecolbertreport.cc.com/videos/ippftn/<API key>", "http://thecolbertreport.cc.com/videos/50a47x/<API key>", "http://thecolbertreport.cc.com/videos/nouiem/howard-kurtz" ], "guest": "Howard Kurtz" }, { "date": "2008-03-13", "videos": [ "http: "http://thecolbertreport.cc.com/videos/k8bsjv/airborne-lawsuit", "http://thecolbertreport.cc.com/videos/d51tqz/<API key>", "http://thecolbertreport.cc.com/videos/tvjvip/hussein-ibish", "http://thecolbertreport.cc.com/videos/oe7yd2/<API key>", "http://thecolbertreport.cc.com/videos/mzut29/sudhir-venkatesh" ], "guest": "Hussein Ibish, Sudhir Venkatesh" }, { "date": "2008-03-17", "videos": [ "http: "http: "http://thecolbertreport.cc.com/videos/v28dea/stephen-in-philly", "http://thecolbertreport.cc.com/videos/rxdrv8/<API key>", "http://thecolbertreport.cc.com/videos/tw4jo4/<API key>", "http://thecolbertreport.cc.com/videos/5j8sg4/samantha-power" ], "guest": "Samantha Power" }, { "date": "2008-03-18", "videos": [ "http: "http://thecolbertreport.cc.com/videos/wsz08m/yes-we-can-", "http://thecolbertreport.cc.com/videos/xtwx8p/<API key>", "http://thecolbertreport.cc.com/videos/mogf73/<API key>", "http://thecolbertreport.cc.com/videos/5boih5/carole-king" ], "guest": "Carole King" }, { "date": "2008-03-19", "videos": [ "http: "http://thecolbertreport.cc.com/videos/hrjm1z/patterson-affair", "http://thecolbertreport.cc.com/videos/scqdwy/<API key>", "http://thecolbertreport.cc.com/videos/y6aybj/<API key>", "http://thecolbertreport.cc.com/videos/037ygf/<API key>", "http://thecolbertreport.cc.com/videos/vk922m/dee-dee-myers" ], "guest": "Dee Dee Myers" }, { "date": "2008-03-20", "videos": [ "http://thecolbertreport.cc.com/videos/vq76dq/<API key>", "http://thecolbertreport.cc.com/videos/wkdrt1/aqua-colbert", "http://thecolbertreport.cc.com/videos/l1sl1c/water-is-life", "http://thecolbertreport.cc.com/videos/3mtvfm/dean-kamen", "http://thecolbertreport.cc.com/videos/4y9sds/<API key>" ], "guest": "Dean Kamen" }, { "date": "2008-03-31", "videos": [ "http: "http://thecolbertreport.cc.com/videos/aqkiox/opening-day", "http://thecolbertreport.cc.com/videos/0fo1qd/bowling-in-pa", "http://thecolbertreport.cc.com/videos/2ii77j/eric-alterman", "http://thecolbertreport.cc.com/videos/b149k1/<API key>", "http://thecolbertreport.cc.com/videos/3p6caw/michael-reynolds" ], "guest": "Eric Alterman, Michael Reynolds" }, { "date": "2008-04-01", "videos": [ "http: "http://thecolbertreport.cc.com/videos/irlo9m/portrait-update", "http://thecolbertreport.cc.com/videos/inwuqm/<API key>", "http://thecolbertreport.cc.com/videos/fpyy9k/<API key>", "http://thecolbertreport.cc.com/videos/700kdb/van-jones", "http://thecolbertreport.cc.com/videos/lrepiq/portrait-displayed" ], "guest": "Van Jones" }, { "date": "2008-04-02", "videos": [ "http: "http://thecolbertreport.cc.com/videos/sbidx5/<API key>", "http://thecolbertreport.cc.com/videos/3fc86e/<API key>", "http://thecolbertreport.cc.com/videos/n3f5qh/r-e-m-" ], "guest": "R.E.M." }, { "date": "2008-04-03", "videos": [ "http: "http://thecolbertreport.cc.com/videos/tyapiy/peabody-credit", "http://thecolbertreport.cc.com/videos/xwlefp/<API key>", "http://thecolbertreport.cc.com/videos/gx1oov/<API key>", "http://thecolbertreport.cc.com/videos/dm9a7h/clay-shirky", "http://thecolbertreport.cc.com/videos/jsqez9/<API key>" ], "guest": "Clay Shirky" }, { "date": "2008-04-07", "videos": [ "http: "http://thecolbertreport.cc.com/videos/we6e20/<API key>", "http://thecolbertreport.cc.com/videos/xh2gv1/trevor-paglen", "http://thecolbertreport.cc.com/videos/3xlgs3/<API key>", "http://thecolbertreport.cc.com/videos/82gipv/jesse-ventura" ], "guest": "Trevor Paglen, Jesse Ventura" }, { "date": "2008-04-08", "videos": [ "http: "http://thecolbertreport.cc.com/videos/yme30m/pope-coming-to-nyc", "http://thecolbertreport.cc.com/videos/g0ke6u/children-s-drawings", "http://thecolbertreport.cc.com/videos/0dimmt/<API key>", "http://thecolbertreport.cc.com/videos/elawer/madeleine-albright" ], "guest": "Madeleine Albright" }, { "date": "2008-04-09", "videos": [ "http: "http://thecolbertreport.cc.com/videos/iekisu/olympic-torch", "http://thecolbertreport.cc.com/videos/ypse7c/<API key>", "http://thecolbertreport.cc.com/videos/jycq7p/<API key>", "http://thecolbertreport.cc.com/videos/nlvpn4/jeff-gore" ], "guest": "Jeff Gore" }, { "date": "2008-04-10", "videos": [ "http: "http://thecolbertreport.cc.com/videos/6sdfwa/petraeus-hearings", "http://thecolbertreport.cc.com/videos/x8pxwi/<API key>", "http://thecolbertreport.cc.com/videos/z2z65o/<API key>", "http: "http://thecolbertreport.cc.com/videos/torkh7/robin-wright" ], "guest": "Robin Wright" }, { "date": "2008-04-14", "videos": [ "http://thecolbertreport.cc.com/videos/qfrdo9/from-philadelphia", "http://thecolbertreport.cc.com/videos/5phute/<API key>", "http://thecolbertreport.cc.com/videos/1b60fj/chris-matthews" ], "guest": "Chris Matthews" }, { "date": "2008-04-15", "videos": [ "http: "http://thecolbertreport.cc.com/videos/3aqwqx/nice-roomba", "http://thecolbertreport.cc.com/videos/ad5qga/<API key>", "http://thecolbertreport.cc.com/videos/7unrts/independence-park", "http://thecolbertreport.cc.com/videos/upl7xe/michelle-obama" ], "guest": "Michelle Obama, The Roots" }, { "date": "2008-04-16", "videos": [ "http: "http://thecolbertreport.cc.com/videos/pi51oz/jackie-o--amendment", "http://thecolbertreport.cc.com/videos/9z3000/<API key>", "http://thecolbertreport.cc.com/videos/9zm7cy/<API key>", "http://thecolbertreport.cc.com/videos/51r39w/ed-rendell", "http://thecolbertreport.cc.com/videos/1bzrgk/<API key>" ], "guest": "Philadelphia Eagles Cheerleaders, Gov. Ed Rendell" }, { "date": "2008-04-17", "videos": [ "http://thecolbertreport.cc.com/videos/ky7oxg/<API key>", "http://thecolbertreport.cc.com/videos/uzusr0/<API key>", "http://thecolbertreport.cc.com/videos/1i62sd/<API key>", "http://thecolbertreport.cc.com/videos/ew5t9y/patrick-murphy", "http://thecolbertreport.cc.com/videos/x3zme5/<API key>", "http://thecolbertreport.cc.com/videos/ol0nn3/<API key>" ], "guest": "Hillary Clinton, John Edwards, Barack Obama" }, { "date": "2008-04-21", "videos": [ "http: "http://thecolbertreport.cc.com/videos/foffke/<API key>", "http://thecolbertreport.cc.com/videos/5jm58y/<API key>", "http://thecolbertreport.cc.com/videos/ehgxth/father-james-martin", "http://thecolbertreport.cc.com/videos/oo6wpp/bernie-sanders", "http://thecolbertreport.cc.com/videos/e7gpah/farewell-to-bobby" ], "guest": "Fr. James Martin, Sen. Bernie Sanders" }, { "date": "2008-04-22", "videos": [ "http: "http://thecolbertreport.cc.com/videos/tp640v/earth-is-awesome", "http://thecolbertreport.cc.com/videos/uyxyc7/obama-copycattery", "http://thecolbertreport.cc.com/videos/a2ha6c/<API key>", "http://thecolbertreport.cc.com/videos/0nsiap/<API key>", "http://thecolbertreport.cc.com/videos/5427ng/susan-jacoby", "http://thecolbertreport.cc.com/videos/l34czb/<API key>" ], "guest": "Susan Jacoby" }, { "date": "2008-04-23", "videos": [ "http: "http://thecolbertreport.cc.com/videos/6wperh/<API key>", "http://thecolbertreport.cc.com/videos/hpr26d/<API key>", "http://thecolbertreport.cc.com/videos/fqo64s/<API key>", "http://thecolbertreport.cc.com/videos/5azl7m/mitch-albom", "http://thecolbertreport.cc.com/videos/qdf6zq/<API key>" ], "guest": "Mitch Albom" }, { "date": "2008-04-24", "videos": [ "http: "http://thecolbertreport.cc.com/videos/a1qle2/petraeus--promotion", "http://thecolbertreport.cc.com/videos/uddwea/<API key>", "http://thecolbertreport.cc.com/videos/e3l9yt/<API key>", "http://thecolbertreport.cc.com/videos/lr9uai/maria-shriver" ], "guest": "Maria Shriver" }, { "date": "2008-04-28", "videos": [ "http: "http://thecolbertreport.cc.com/videos/244o0l/<API key>", "http://thecolbertreport.cc.com/videos/9v4qwg/electability", "http://thecolbertreport.cc.com/videos/ejbmnx/<API key>", "http://thecolbertreport.cc.com/videos/3osshb/<API key>", "http://thecolbertreport.cc.com/videos/222rjo/feist" ], "guest": "Feist" }, { "date": "2008-04-29", "videos": [ "http: "http://thecolbertreport.cc.com/videos/vc3sa7/<API key>", "http://thecolbertreport.cc.com/videos/uk74h6/<API key>", "http://thecolbertreport.cc.com/videos/ry65tk/<API key>", "http: "http://thecolbertreport.cc.com/videos/s3buaq/anne-lamott" ], "guest": "Anne Lamott" }, { "date": "2008-04-30", "videos": [ "http: "http://thecolbertreport.cc.com/videos/xju86c/salinger-watch", "http://thecolbertreport.cc.com/videos/1rdkem/<API key>", "http://thecolbertreport.cc.com/videos/4ngs9u/<API key>", "http://thecolbertreport.cc.com/videos/vjk2cd/noah-feldman" ], "guest": "Donna Brazile, Noah Feldman" }, { "date": "2008-05-01", "videos": [ "http: "http://thecolbertreport.cc.com/videos/clfbo3/jenna-bush-wedding", "http://thecolbertreport.cc.com/videos/sctmlw/<API key>", "http://thecolbertreport.cc.com/videos/aka0f3/<API key>", "http://thecolbertreport.cc.com/videos/zck6ux/<API key>" ], "guest": "James Kunstler" }, { "date": "2008-05-05", "videos": [ "http: "http://thecolbertreport.cc.com/videos/wtbn4l/<API key>", "http: "http://thecolbertreport.cc.com/videos/oov14y/speed-racer", "http://thecolbertreport.cc.com/videos/91hddq/<API key>", "http://thecolbertreport.cc.com/videos/2uj60r/carl-hiaasen", "http://thecolbertreport.cc.com/videos/k44vbf/rain-dance-off" ], "guest": "Carl Hiaasen" }, { "date": "2008-05-06", "videos": [ "http: "http://thecolbertreport.cc.com/videos/e3fb1q/sexy-voice-study", "http://thecolbertreport.cc.com/videos/qy6hoq/<API key>", "http://thecolbertreport.cc.com/videos/byyq8n/<API key>", "http://thecolbertreport.cc.com/videos/y777b4/nathan-gunn" ], "guest": "Nathan Gunn" }, { "date": "2008-05-07", "videos": [ "http: "http://thecolbertreport.cc.com/videos/20qjta/<API key>", "http://thecolbertreport.cc.com/videos/su4v1v/<API key>", "http://thecolbertreport.cc.com/videos/07p71k/hasan-elahi", "http://thecolbertreport.cc.com/videos/bc4u9e/<API key>", "http://thecolbertreport.cc.com/videos/av0o9p/george-johnson" ], "guest": "Hasan Elahi, George Johnson" }, { "date": "2008-05-08", "videos": [ "http://thecolbertreport.cc.com/videos/ey98z2/<API key>", "http://thecolbertreport.cc.com/videos/6wn8i5/garrett-reisman", "http://thecolbertreport.cc.com/videos/qnk6x8/gas-dollar", "http://thecolbertreport.cc.com/videos/txq3hp/arianna-huffington", "http://thecolbertreport.cc.com/videos/uafvva/<API key>" ], "guest": "Arianna Huffington" }, { "date": "2008-05-12", "videos": [ "http: "http://thecolbertreport.cc.com/videos/tj7sih/big-russ", "http://thecolbertreport.cc.com/videos/kdeptj/<API key>", "http://thecolbertreport.cc.com/videos/k7k3ke/<API key>", "http://thecolbertreport.cc.com/videos/3i279j/dr--mehmet-oz" ], "guest": "Dr. Mehmet Oz" }, { "date": "2008-05-13", "videos": [ "http://thecolbertreport.cc.com/videos/oycul0/<API key>", "http: "http://thecolbertreport.cc.com/videos/mpq03a/hillary-drop-out", "http://thecolbertreport.cc.com/videos/qxr59r/<API key>", "http://thecolbertreport.cc.com/videos/np2mes/<API key>", "http://thecolbertreport.cc.com/videos/24b8xh/<API key>" ], "guest": "Jennifer Hooper McCarty" }, { "date": "2008-05-14", "videos": [ "http: "http://thecolbertreport.cc.com/videos/fygt2g/<API key>", "http://thecolbertreport.cc.com/videos/ry9ff3/<API key>", "http://thecolbertreport.cc.com/videos/xnkjrq/<API key>", "http://thecolbertreport.cc.com/videos/gxghyw/laura-dern", "http://thecolbertreport.cc.com/videos/4tldfc/grover-norquist", "http://thecolbertreport.cc.com/videos/zujfq0/<API key>" ], "guest": "Laura Dern, Grover Norquist" }, { "date": "2008-05-15", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ekfqs4/<API key>", "http://thecolbertreport.cc.com/videos/wy0c00/<API key>", "http://thecolbertreport.cc.com/videos/scm34l/<API key>", "http://thecolbertreport.cc.com/videos/ak0o7t/<API key>", "http://thecolbertreport.cc.com/videos/rarvxz/andrei-cherny" ], "guest": "Andrei Cherny" }, { "date": "2008-05-27", "videos": [ "http: "http://thecolbertreport.cc.com/videos/k0kiom/fleet-week", "http://thecolbertreport.cc.com/videos/xuhumb/mccain-s-preachers", "http://thecolbertreport.cc.com/videos/dxmleo/tony-perkins", "http://thecolbertreport.cc.com/videos/o5c67w/brian-greene" ], "guest": "Tony Perkins, Brian Greene" }, { "date": "2008-05-28", "videos": [ "http: "http://thecolbertreport.cc.com/videos/euhkkf/microbe-beat-", "http://thecolbertreport.cc.com/videos/z1nl4c/<API key>", "http://thecolbertreport.cc.com/videos/jhmlmk/<API key>", "http://thecolbertreport.cc.com/videos/ngaz1d/claire-mccaskill" ], "guest": "Sen. Claire McCaskill" }, { "date": "2008-05-29", "videos": [ "http: "http://thecolbertreport.cc.com/videos/79u1cf/<API key>", "http://thecolbertreport.cc.com/videos/6735i1/<API key>", "http://thecolbertreport.cc.com/videos/ug78n1/tad-devine", "http://thecolbertreport.cc.com/videos/lhma93/<API key>", "http://thecolbertreport.cc.com/videos/3qprbm/david-sirota", "http://thecolbertreport.cc.com/videos/g0kftc/sneak-preview" ], "guest": "Tad Devine, David Sirota" }, { "date": "2008-06-02", "videos": [ "http: "http://thecolbertreport.cc.com/videos/dvmsby/obama-s-church", "http://thecolbertreport.cc.com/videos/38jpc2/fire-at-universal", "http://thecolbertreport.cc.com/videos/jlvsj6/<API key>", "http://thecolbertreport.cc.com/videos/8cygn0/<API key>", "http://thecolbertreport.cc.com/videos/p0u6f8/jon-paskowitz", "http://thecolbertreport.cc.com/videos/piym7c/final-thought" ], "guest": "Jon Paskowitz" }, { "date": "2008-06-03", "videos": [ "http: "http://thecolbertreport.cc.com/videos/o005k6/<API key>", "http://thecolbertreport.cc.com/videos/viwun3/<API key>", "http://thecolbertreport.cc.com/videos/po30h9/<API key>", "http://thecolbertreport.cc.com/videos/xhigi4/george-will" ], "guest": "George Will" }, { "date": "2008-06-04", "videos": [ "http: "http://thecolbertreport.cc.com/videos/hfq15q/<API key>", "http://thecolbertreport.cc.com/videos/wsbc0i/<API key>", "http://thecolbertreport.cc.com/videos/sn90ui/salman-rushdie", "http://thecolbertreport.cc.com/videos/uji4o5/<API key>" ], "guest": "Rep. Bob Barr, Salman Rushdie" }, { "date": "2008-06-05", "videos": [ "http: "http://thecolbertreport.cc.com/videos/n90wjr/<API key>", "http://thecolbertreport.cc.com/videos/ugt12v/<API key>", "http://thecolbertreport.cc.com/videos/6nrkel/<API key>", "http://thecolbertreport.cc.com/videos/ibt0j9/pat-buchanan" ], "guest": "Pat Buchanan" }, { "date": "2008-06-09", "videos": [ "http: "http://thecolbertreport.cc.com/videos/icuy8o/<API key>", "http://thecolbertreport.cc.com/videos/numnri/<API key>", "http: "http://thecolbertreport.cc.com/videos/gv27al/philip-weiss" ], "guest": "Phil Weiss" }, { "date": "2008-06-10", "videos": [ "http: "http://thecolbertreport.cc.com/videos/cbjixz/new-giant-iphone", "http://thecolbertreport.cc.com/videos/w5you4/tickling-the-rocks", "http://thecolbertreport.cc.com/videos/skw5sl/<API key>", "http://thecolbertreport.cc.com/videos/qhpj5f/<API key>", "http://thecolbertreport.cc.com/videos/9bdggo/alan-rabinowitz" ], "guest": "Alan Rabinowitz" }, { "date": "2008-06-11", "videos": [ "http: "http://thecolbertreport.cc.com/videos/gbgmuk/israel-s-new-bird", "http://thecolbertreport.cc.com/videos/twddgu/<API key>", "http://thecolbertreport.cc.com/videos/pp8c40/<API key>", "http://thecolbertreport.cc.com/videos/zudzs0/david-hajdu", "http://thecolbertreport.cc.com/videos/idly59/memorized-script" ], "guest": "David Hajdu" }, { "date": "2008-06-12", "videos": [ "http: "http://thecolbertreport.cc.com/videos/nsgvgc/<API key>-", "http://thecolbertreport.cc.com/videos/86su5q/winona-laduke", "http://thecolbertreport.cc.com/videos/qrbimj/we-the-mediator", "http://thecolbertreport.cc.com/videos/t6nh85/dickson-despommier" ], "guest": "Winona LaDuke, Dixon Despommier" }, { "date": "2008-06-16", "videos": [ "http: "http://thecolbertreport.cc.com/videos/6vk2ye/tim-russert-tribute", "http://thecolbertreport.cc.com/videos/mpqoje/<API key>", "http://thecolbertreport.cc.com/videos/cqvvlk/<API key>", "http://thecolbertreport.cc.com/videos/8xg385/kenneth-miller" ], "guest": "Kenneth R. Miller" }, { "date": "2008-06-17", "videos": [ "http: "http://thecolbertreport.cc.com/videos/kwlu8o/peabody-award", "http://thecolbertreport.cc.com/videos/tapfcu/neal-katyal", "http://thecolbertreport.cc.com/videos/fuhy6f/<API key>", "http://thecolbertreport.cc.com/videos/vcz3hv/jonathan-zittrain", "http://thecolbertreport.cc.com/videos/ci1ljt/peabody-on-mantel" ], "guest": "Neal Katyal, Jonathan Zittrain" }, { "date": "2008-06-18", "videos": [ "http: "http://thecolbertreport.cc.com/videos/prx5o1/<API key>", "http://thecolbertreport.cc.com/videos/ciovvr/<API key>", "http://thecolbertreport.cc.com/videos/vtx5qc/<API key>", "http://thecolbertreport.cc.com/videos/ir7gne/junot-diaz" ], "guest": "Dr. Uma Mysorekar, Junot Diaz" }, { "date": "2008-06-19", "videos": [ "http: "http://thecolbertreport.cc.com/videos/6sj17e/<API key>", "http://thecolbertreport.cc.com/videos/mr1053/<API key>", "http://thecolbertreport.cc.com/videos/zcd35g/cookie-monster", "http://thecolbertreport.cc.com/videos/aytt4h/<API key>-<API key>, "http://thecolbertreport.cc.com/videos/m7daav/bishop-n-t--wright", "http://thecolbertreport.cc.com/videos/der3el/<API key>" ], "guest": "Bishop N.T. Wright" }, { "date": "2008-06-23", "videos": [ "http: "http://thecolbertreport.cc.com/videos/a4nt5i/<API key>", "http://thecolbertreport.cc.com/videos/kj72hq/<API key>", "http://thecolbertreport.cc.com/videos/vlidof/<API key>", "http://thecolbertreport.cc.com/videos/ymze92/barbara-ehrenreich", "http://thecolbertreport.cc.com/videos/1f40by/<API key>" ], "guest": "Barbara Ehrenreich" }, { "date": "2008-06-24", "videos": [ "http: "http://thecolbertreport.cc.com/videos/n11h6w/<API key>", "http://thecolbertreport.cc.com/videos/ov4362/oil-crisis", "http: "http://thecolbertreport.cc.com/videos/f5yznc/dr--jason-bond", "http://thecolbertreport.cc.com/videos/ilejmp/will-smith" ], "guest": "Jason Bond, Will Smith" }, { "date": "2008-06-25", "videos": [ "http: "http://thecolbertreport.cc.com/videos/q0qc77/paul-goldberger", "http://thecolbertreport.cc.com/videos/ajsxzq/<API key>", "http://thecolbertreport.cc.com/videos/zucjth/neil-degrasse-tyson", "http://thecolbertreport.cc.com/videos/2r47v6/stephen-s-gun" ], "guest": "Paul Goldberger, Neil deGrasse Tyson" }, { "date": "2008-06-26", "videos": [ "http: "http://thecolbertreport.cc.com/videos/038ej3/<API key>", "http://thecolbertreport.cc.com/videos/txteih/<API key>", "http://thecolbertreport.cc.com/videos/hdan1z/<API key>", "http://thecolbertreport.cc.com/videos/6vucxh/robert-wexler", "http://thecolbertreport.cc.com/videos/s7cul5/<API key>" ], "guest": "Rep. Robert Wexler" }, { "date": "2008-07-14", "videos": [ "http: "http://thecolbertreport.cc.com/videos/t1ic5h/<API key>", "http://thecolbertreport.cc.com/videos/e8zxmm/<API key>", "http://thecolbertreport.cc.com/videos/6fnysv/<API key>", "http://thecolbertreport.cc.com/videos/iuafl5/daniel-c--esty", "http://thecolbertreport.cc.com/videos/zeelo6/one-last-sip" ], "guest": "Lama Surya Das, Daniel C. Esty" }, { "date": "2008-07-15", "videos": [ "http: "http://thecolbertreport.cc.com/videos/iojfbw/<API key>", "http://thecolbertreport.cc.com/videos/4r3fs4/julia-e--sweig", "http://thecolbertreport.cc.com/videos/slbivd/<API key>", "http://thecolbertreport.cc.com/videos/w3v1ei/jason-riley" ], "guest": "Julia E. Sweig, Jason Riley" }, { "date": "2008-07-16", "videos": [ "http: "http://thecolbertreport.cc.com/videos/nxgrjc/rush-is-here", "http: "http://thecolbertreport.cc.com/videos/r6ylvr/<API key>" ], "guest": "Rush" }, { "date": "2008-07-17", "videos": [ "http: "http://thecolbertreport.cc.com/videos/hy6e1y/ofec", "http://thecolbertreport.cc.com/videos/fdazma/<API key>", "http://thecolbertreport.cc.com/videos/75y9kg/<API key>", "http://thecolbertreport.cc.com/videos/ti6y23/elizabeth-edwards", "http://thecolbertreport.cc.com/videos/2i4pii/esquire-cover" ], "guest": "Elizabeth Edwards" }, { "date": "2008-07-21", "videos": [ "http://thecolbertreport.cc.com/videos/ypasrv/<API key>", "http: "http://thecolbertreport.cc.com/videos/2uxo91/<API key>", "http://thecolbertreport.cc.com/videos/ytt7lh/<API key>", "http://thecolbertreport.cc.com/videos/7zt9o1/jim-webb" ], "guest": "Sen. Jim Webb" }, { "date": "2008-07-22", "videos": [ "http: "http://thecolbertreport.cc.com/videos/5us80y/obama-s-trip", "http://thecolbertreport.cc.com/videos/twxrmk/<API key>", "http://thecolbertreport.cc.com/videos/g536lz/<API key>", "http://thecolbertreport.cc.com/videos/dqvjy7/<API key>", "http://thecolbertreport.cc.com/videos/ypbiy1/margaret-spellings" ], "guest": "Margaret Spellings" }, { "date": "2008-07-23", "videos": [ "http: "http://thecolbertreport.cc.com/videos/008wql/starbucks-closings", "http://thecolbertreport.cc.com/videos/ckerul/<API key>", "http://thecolbertreport.cc.com/videos/p099m0/<API key>", "http://thecolbertreport.cc.com/videos/ef4747/nas-pt--1" ], "guest": "Nas" }, { "date": "2008-07-24", "videos": [ "http: "http://thecolbertreport.cc.com/videos/mzk1jw/<API key>", "http://thecolbertreport.cc.com/videos/y6db2n/laurie-goodstein", "http://thecolbertreport.cc.com/videos/oyh9ck/<API key>", "http://thecolbertreport.cc.com/videos/qkxsxv/garrett-reisman", "http://thecolbertreport.cc.com/videos/my4p2n/decoder-rings" ], "guest": "Laurie Goodstein, Garrett Reisman" }, { "date": "2008-07-28", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ahi7x5/obama-returns", "http://thecolbertreport.cc.com/videos/n5o1z2/<API key>", "http://thecolbertreport.cc.com/videos/wksh33/<API key>", "http://thecolbertreport.cc.com/videos/2fxv2r/toby-keith" ], "guest": "Toby Keith" }, { "date": "2008-07-29", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ft9iza/mccain-s-mustache", "http://thecolbertreport.cc.com/videos/je97nz/<API key>", "http://thecolbertreport.cc.com/videos/079fu3/<API key>", "http://thecolbertreport.cc.com/videos/4pok23/eric-roston" ], "guest": "Eric Roston" }, { "date": "2008-07-30", "videos": [ "http: "http://thecolbertreport.cc.com/videos/0igq3j/fat-cat", "http://thecolbertreport.cc.com/videos/z8lld1/<API key>", "http://thecolbertreport.cc.com/videos/77hd54/spiders-for-stephen-", "http://thecolbertreport.cc.com/videos/9riu8g/canton-apology", "http://thecolbertreport.cc.com/videos/paplnu/<API key>" ], "guest": "Crosby, Stills &amp; Nash" }, { "date": "2008-07-31", "videos": [ "http: "http://thecolbertreport.cc.com/videos/cy7kpu/starbucks-cuts-jobs", "http://thecolbertreport.cc.com/videos/evgv9c/brendan-koerner", "http://thecolbertreport.cc.com/videos/3pi9ch/<API key>", "http://thecolbertreport.cc.com/videos/k8sku2/buzz-aldrin", "http://thecolbertreport.cc.com/videos/xrkpup/<API key>" ], "guest": "Brendan I. Koerner, Buzz Aldrin" }, { "date": "2008-08-04", "videos": [ "http: "http://thecolbertreport.cc.com/videos/j7c1ly/<API key>", "http://thecolbertreport.cc.com/videos/n4qhgk/<API key>", "http://thecolbertreport.cc.com/videos/gjy6co/<API key>", "http://thecolbertreport.cc.com/videos/j0iwzv/lucas-conley" ], "guest": "Lucas Conley, The Apples in Stereo" }, { "date": "2008-08-05", "videos": [ "http: "http://thecolbertreport.cc.com/videos/a60qui/starbucks-promotion", "http://thecolbertreport.cc.com/videos/ts3set/<API key>", "http://thecolbertreport.cc.com/videos/c8orpt/<API key>", "http://thecolbertreport.cc.com/videos/u7dbu9/<API key>", "http://thecolbertreport.cc.com/videos/sw0u58/david-carr", "http://thecolbertreport.cc.com/videos/zghj54/<API key>" ], "guest": "David Carr" }, { "date": "2008-08-06", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ad4cbz/<API key>", "http://thecolbertreport.cc.com/videos/v2zmtk/<API key>", "http://thecolbertreport.cc.com/videos/luli3g/<API key>", "http://thecolbertreport.cc.com/videos/3pe5h3/kevin-costner", "http://thecolbertreport.cc.com/videos/ot8cw0/spanish-audio" ], "guest": "Jason Bond, Kevin Costner" }, { "date": "2008-08-07", "videos": [ "http: "http://thecolbertreport.cc.com/videos/e6qhsv/<API key>", "http://thecolbertreport.cc.com/videos/f3opxi/<API key>", "http://thecolbertreport.cc.com/videos/6u4m61/<API key>", "http://thecolbertreport.cc.com/videos/dmymte/thomas-frank", "http://thecolbertreport.cc.com/videos/iwrdpe/reading-newsweek" ], "guest": "Devin Gordon, Thomas Frank" }, { "date": "2008-08-11", "videos": [ "http: "http://thecolbertreport.cc.com/videos/riwpa4/<API key>", "http://thecolbertreport.cc.com/videos/bfwvvn/<API key>", "http://thecolbertreport.cc.com/videos/txv0gu/<API key>", "http://thecolbertreport.cc.com/videos/8j40t0/jorge-ramos", "http://thecolbertreport.cc.com/videos/b7houz/<API key>" ], "guest": "Jorge Ramos" }, { "date": "2008-08-12", "videos": [ "http: "http://thecolbertreport.cc.com/videos/zgupdj/<API key>", "http://thecolbertreport.cc.com/videos/6d57uu/<API key>", "http://thecolbertreport.cc.com/videos/5njkui/joey-cheek", "http://thecolbertreport.cc.com/videos/jhg2wn/<API key>", "http://thecolbertreport.cc.com/videos/bv3152/jane-mayer", "http://thecolbertreport.cc.com/videos/dwnfyl/<API key>" ], "guest": "Joey Cheek, Jane Mayer" }, { "date": "2008-08-13", "videos": [ "http: "http://thecolbertreport.cc.com/videos/zewvls/<API key>", "http://thecolbertreport.cc.com/videos/3ae93q/<API key>", "http://thecolbertreport.cc.com/videos/htzkd9/<API key>", "http://thecolbertreport.cc.com/videos/1clyqz/<API key>", "http://thecolbertreport.cc.com/videos/yplzsy/dick-meyer", "http://thecolbertreport.cc.com/videos/x9tyb8/goodbye-from-wprg" ], "guest": "Dick Meyer" }, { "date": "2008-08-14", "videos": [ "http: "http://thecolbertreport.cc.com/videos/0gs1a9/jeopardy-shout-out", "http://thecolbertreport.cc.com/videos/s99fxp/<API key>", "http://thecolbertreport.cc.com/videos/9x55ta/<API key>", "http://thecolbertreport.cc.com/videos/ebnqyp/bing-west", "http://thecolbertreport.cc.com/videos/h0yxjt/gold-medals" ], "guest": "Bing West" }, { "date": "2008-08-26", "videos": [ "http: "http://thecolbertreport.cc.com/videos/zpxtn2/<API key>", "http://thecolbertreport.cc.com/videos/ez5jp1/<API key>", "http://thecolbertreport.cc.com/videos/tojy8p/<API key>", "http://thecolbertreport.cc.com/videos/ax1v4e/bob-barr", "http://thecolbertreport.cc.com/videos/f120f5/scott-mcclellan", "http://thecolbertreport.cc.com/videos/twqqkj/up-next" ], "guest": "Rep. Bob Barr, Scott McClellan" }, { "date": "2008-08-27", "videos": [ "http: "http://thecolbertreport.cc.com/videos/63yvi3/live-from-dynasty", "http://thecolbertreport.cc.com/videos/xfzios/<API key>", "http://thecolbertreport.cc.com/videos/m1mag5/repo-man", "http://thecolbertreport.cc.com/videos/402muh/mike-huckabee", "http://thecolbertreport.cc.com/videos/llvqjv/<API key>" ], "guest": "Gov. Mike Huckabee" }, { "date": "2008-08-28", "videos": [ "http: "http://thecolbertreport.cc.com/videos/9lke5e/<API key>", "http://thecolbertreport.cc.com/videos/53s26i/<API key>", "http://thecolbertreport.cc.com/videos/kmna3f/<API key>", "http://thecolbertreport.cc.com/videos/eifqog/richard-brookhiser", "http://thecolbertreport.cc.com/videos/c42fhd/stephen-s-brownies" ], "guest": "Rick Brookhiser" }, { "date": "2008-08-29", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ctsiz5/sarah-palin-for-vp", "http://thecolbertreport.cc.com/videos/9os3w0/<API key>", "http://thecolbertreport.cc.com/videos/rufbl6/john-mcwhorter", "http://thecolbertreport.cc.com/videos/bzvjxb/<API key>" ], "guest": "John McWhorter" }, { "date": "2008-09-02", "videos": [ "http: "http://thecolbertreport.cc.com/videos/8tw46w/<API key>", "http://thecolbertreport.cc.com/videos/rf8uos/<API key>", "http://thecolbertreport.cc.com/videos/gmnlx9/<API key>", "http://thecolbertreport.cc.com/videos/f81p33/<API key>", "http://thecolbertreport.cc.com/videos/xhysj6/blowing-your-mind" ], "guest": "Laura D'Andrea Tyson" }, { "date": "2008-09-03", "videos": [ "http: "http://thecolbertreport.cc.com/videos/kepht9/<API key>", "http://thecolbertreport.cc.com/videos/sbatmc/rnc-tuesday", "http://thecolbertreport.cc.com/videos/awnw4i/<API key>", "http://thecolbertreport.cc.com/videos/4cdiam/<API key>", "http://thecolbertreport.cc.com/videos/x8u7qp/<API key>", "http://thecolbertreport.cc.com/videos/rk1eeg/who-wants-beads-" ], "guest": "Doris Kearns Goodwin" }, { "date": "2008-09-04", "videos": [ "http: "http://thecolbertreport.cc.com/videos/1cwp12/<API key>", "http://thecolbertreport.cc.com/videos/kyo8u3/adam-brickley", "http://thecolbertreport.cc.com/videos/c6ux4z/<API key>", "http://thecolbertreport.cc.com/videos/yywrwl/ron-paul", "http://thecolbertreport.cc.com/videos/kwoupb/<API key>" ], "guest": "Adam Brickley, Ron Paul" }, { "date": "2008-09-05", "videos": [ "http: "http://thecolbertreport.cc.com/videos/2rjlbj/<API key>", "http://thecolbertreport.cc.com/videos/njb4bu/<API key>", "http://thecolbertreport.cc.com/videos/zk7gig/<API key>", "http://thecolbertreport.cc.com/videos/xeizbt/david-paterson", "http://thecolbertreport.cc.com/videos/u3k61y/<API key>" ], "guest": "Gov. David Paterson" }, { "date": "2008-09-15", "videos": [ "http://thecolbertreport.cc.com/videos/jshk87/<API key>", "http: "http://thecolbertreport.cc.com/videos/7yzozt/<API key>", "http://thecolbertreport.cc.com/videos/f9h01l/<API key>-", "http://thecolbertreport.cc.com/videos/r0u91k/<API key>", "http://thecolbertreport.cc.com/videos/ihx562/peter-j--gomes", "http://thecolbertreport.cc.com/videos/4ebszq/another-episode" ], "guest": "Rev. Peter J. Gomes" }, { "date": "2008-09-16", "videos": [ "http: "http://thecolbertreport.cc.com/videos/k0bsca/<API key>", "http://thecolbertreport.cc.com/videos/mkpl4k/tyson-slocum", "http://thecolbertreport.cc.com/videos/75xh2f/<API key>-", "http://thecolbertreport.cc.com/videos/3tm40j/rick-reilly", "http://thecolbertreport.cc.com/videos/vnf5o3/thirty-minutes" ], "guest": "Tyson Slocum, Rick Reilly" }, { "date": "2008-09-17", "videos": [ "http: "http://thecolbertreport.cc.com/videos/y012iz/<API key>", "http://thecolbertreport.cc.com/videos/kyb0cu/<API key>", "http://thecolbertreport.cc.com/videos/n6eo9j/country-first", "http://thecolbertreport.cc.com/videos/uwjjvf/bob-lutz", "http://thecolbertreport.cc.com/videos/3odd8c/<API key>" ], "guest": "Bob Lutz" }, { "date": "2008-09-18", "videos": [ "http: "http://thecolbertreport.cc.com/videos/1jklj8/<API key>", "http://thecolbertreport.cc.com/videos/j1rb59/<API key>", "http://thecolbertreport.cc.com/videos/jgr23t/<API key>", "http://thecolbertreport.cc.com/videos/r2z9cm/maria-bartiromo", "http://thecolbertreport.cc.com/videos/f0iah5/off-to-the-emmys" ], "guest": "Maria Bartiromo" }, { "date": "2008-09-23", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ikji5j/<API key>", "http: "http://thecolbertreport.cc.com/videos/bna75w/peter-grosz-insults", "http://thecolbertreport.cc.com/videos/iscpss/<API key>", "http://thecolbertreport.cc.com/videos/8uwmb0/jackson-browne" ], "guest": "Jackson Browne" }, { "date": "2008-09-24", "videos": [ "http: "http://thecolbertreport.cc.com/videos/zxun4o/<API key>", "http://thecolbertreport.cc.com/videos/y03i0s/joe-nocera", "http://thecolbertreport.cc.com/videos/ug1eaa/<API key>", "http://thecolbertreport.cc.com/videos/m77ip1/cornel-west", "http://thecolbertreport.cc.com/videos/5lq5u2/colbertnation-com" ], "guest": "Joe Nocera, Cornel West" }, { "date": "2008-09-25", "videos": [ "http: "http://thecolbertreport.cc.com/videos/n6lmpg/<API key>", "http://thecolbertreport.cc.com/videos/k6o1ga/<API key>", "http://thecolbertreport.cc.com/videos/bqde8h/nicholas-carr", "http://thecolbertreport.cc.com/videos/c44c8h/one-more-thing" ], "guest": "Nicholas Carr" }, { "date": "2008-09-29", "videos": [ "http: "http://thecolbertreport.cc.com/videos/05f4cg/<API key>", "http://thecolbertreport.cc.com/videos/bweuwc/<API key>", "http://thecolbertreport.cc.com/videos/cgij7r/<API key>", "http://thecolbertreport.cc.com/videos/vp621m/paul-begala", "http://thecolbertreport.cc.com/videos/gpa8yw/good-night" ], "guest": "Paul Begala" }, { "date": "2008-09-30", "videos": [ "http: "http://thecolbertreport.cc.com/videos/9st6mt/<API key>", "http://thecolbertreport.cc.com/videos/f9oh9q/<API key>", "http://thecolbertreport.cc.com/videos/d0zdru/<API key>", "http://thecolbertreport.cc.com/videos/j67wur/out-of-time" ], "guest": "James Taylor" }, { "date": "2008-10-01", "videos": [ "http://thecolbertreport.cc.com/videos/t7tnvd/<API key>", "http: "http://thecolbertreport.cc.com/videos/9st6mt/<API key>", "http://thecolbertreport.cc.com/videos/f9oh9q/<API key>", "http://thecolbertreport.cc.com/videos/d0zdru/<API key>", "http://thecolbertreport.cc.com/videos/j67wur/out-of-time" ], "guest": "Dave Levin" }, { "date": "2008-10-01", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ovyu4c/<API key>", "http://thecolbertreport.cc.com/videos/bhfa94/<API key>", "http://thecolbertreport.cc.com/videos/86s1x0/<API key>", "http://thecolbertreport.cc.com/videos/1v6olb/dave-levin", "http://thecolbertreport.cc.com/videos/e5ngk1/<API key>" ], "guest": "Dave Levin" }, { "date": "2008-10-02", "videos": [ "http: "http://thecolbertreport.cc.com/videos/jwi5c6/<API key>", "http://thecolbertreport.cc.com/videos/nkfn9g/<API key>", "http://thecolbertreport.cc.com/videos/9cm5sl/<API key>", "http://thecolbertreport.cc.com/videos/kvfh5w/naomi-klein", "http://thecolbertreport.cc.com/videos/xsttzx/<API key>" ], "guest": "Stephen Greenblatt, Naomi Klein" }, { "date": "2008-10-06", "videos": [ "http: "http://thecolbertreport.cc.com/videos/1hb3kb/oj-simpson-guilty", "http://thecolbertreport.cc.com/videos/qlbk95/<API key>", "http://thecolbertreport.cc.com/videos/qnwvgs/<API key>", "http://thecolbertreport.cc.com/videos/tn9q1r/jim-cramer", "http://thecolbertreport.cc.com/videos/gpjjik/life-drawing-lesson" ], "guest": "Jim Cramer" }, { "date": "2008-10-07", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ehcjcu/stephen-s-town-hall", "http://thecolbertreport.cc.com/videos/yulr8u/<API key>", "http://thecolbertreport.cc.com/videos/e56sfz/<API key>", "http://thecolbertreport.cc.com/videos/xoy3ny/nate-silver", "http://thecolbertreport.cc.com/videos/0t800l/phone-book" ], "guest": "Nate Silver" }, { "date": "2008-10-08", "videos": [ "http: "http://thecolbertreport.cc.com/videos/rb63v8/<API key>", "http://thecolbertreport.cc.com/videos/pmvhoi/<API key>", "http://thecolbertreport.cc.com/videos/r8hb9t/<API key>", "http://thecolbertreport.cc.com/videos/7943ea/joe-scarborough", "http://thecolbertreport.cc.com/videos/02dsh7/<API key>" ], "guest": "Joe Scarborough" }, { "date": "2008-10-09", "videos": [ "http: "http://thecolbertreport.cc.com/videos/l3uq93/<API key>", "http://thecolbertreport.cc.com/videos/pqsng6/<API key>", "http://thecolbertreport.cc.com/videos/f6283x/<API key>", "http://thecolbertreport.cc.com/videos/ge3feb/oliver-stone", "http://thecolbertreport.cc.com/videos/w87c40/bad-news" ], "guest": "David Gergen, Oliver Stone" }, { "date": "2008-10-13", "videos": [ "http: "http://thecolbertreport.cc.com/videos/fnytnd/<API key>", "http://thecolbertreport.cc.com/videos/1jl5yn/<API key>", "http://thecolbertreport.cc.com/videos/1goeih/<API key>", "http://thecolbertreport.cc.com/videos/gyyaxy/kathleen-parker", "http://thecolbertreport.cc.com/videos/6y4q65/happy-birthday" ], "guest": "Bethany McLean, Kathleen Parker" }, { "date": "2008-10-14", "videos": [ "http: "http://thecolbertreport.cc.com/videos/7pd7zc/<API key>", "http: "http://thecolbertreport.cc.com/videos/pfbd0x/<API key>", "http://thecolbertreport.cc.com/videos/usq8wp/joseph-stiglitz", "http://thecolbertreport.cc.com/videos/lvn4rk/good-night" ], "guest": "Joseph Stiglitz" }, { "date": "2008-10-15", "videos": [ "http: "http://thecolbertreport.cc.com/videos/9308mk/kfc-snacker", "http://thecolbertreport.cc.com/videos/l7yb6p/<API key>", "http://thecolbertreport.cc.com/videos/4e7lhp/<API key>", "http://thecolbertreport.cc.com/videos/38m5c1/tina-brown", "http://thecolbertreport.cc.com/videos/8g4g6k/chest-tivo" ], "guest": "Tina Brown" }, { "date": "2008-10-16", "videos": [ "http: "http://thecolbertreport.cc.com/videos/clx1g3/the-final-debate", "http://thecolbertreport.cc.com/videos/irar1b/<API key>", "http://thecolbertreport.cc.com/videos/vhpq80/robert-greenwald", "http://thecolbertreport.cc.com/videos/dtl1jb/a-new-portrait" ], "guest": "Brent Glass, Robert Greenwald" }, { "date": "2008-10-20", "videos": [ "http: "http://thecolbertreport.cc.com/videos/hztig3/<API key>", "http://thecolbertreport.cc.com/videos/m2bwgq/fareed-zakaria", "http://thecolbertreport.cc.com/videos/f1sjmz/<API key>", "http://thecolbertreport.cc.com/videos/ihme7b/wynton-marsalis", "http://thecolbertreport.cc.com/videos/1zx8mm/good-night" ], "guest": "Fareed Zakaria, Wynton Marsalis" }, { "date": "2008-10-21", "videos": [ "http: "http://thecolbertreport.cc.com/videos/1q0lgd/<API key>", "http://thecolbertreport.cc.com/videos/6mt8jf/<API key>", "http://thecolbertreport.cc.com/videos/yf6nbq/battle-of-the-gods", "http://thecolbertreport.cc.com/videos/ajdj8y/<API key>", "http://thecolbertreport.cc.com/videos/2f3tuj/michael-farris", "http://thecolbertreport.cc.com/videos/gsnyc0/<API key>" ], "guest": "Michael Farris" }, { "date": "2008-10-22", "videos": [ "http: "http://thecolbertreport.cc.com/videos/bnfehb/<API key>", "http://thecolbertreport.cc.com/videos/2fhvot/<API key>", "http://thecolbertreport.cc.com/videos/l9sa9k/<API key>", "http://thecolbertreport.cc.com/videos/bfif72/david-frum", "http://thecolbertreport.cc.com/videos/zijniy/<API key>" ], "guest": "David Frum" }, { "date": "2008-10-23", "videos": [ "http: "http://thecolbertreport.cc.com/videos/mxdemq/<API key>", "http://thecolbertreport.cc.com/videos/9r8mtw/<API key>", "http://thecolbertreport.cc.com/videos/d9d59e/<API key>", "http://thecolbertreport.cc.com/videos/vu40sp/jonathan-alter", "http://thecolbertreport.cc.com/videos/4q4n65/a-short-goodbye" ], "guest": "Jonathan Alter" }, { "date": "2008-10-27", "videos": [ "http: "http://thecolbertreport.cc.com/videos/o5x5iu/<API key>", "http://thecolbertreport.cc.com/videos/05r6nq/<API key>-", "http://thecolbertreport.cc.com/videos/7g8kx1/<API key>", "http://thecolbertreport.cc.com/videos/fnuvdv/yo-yo-ma" ], "guest": "Yo-Yo Ma" }, { "date": "2008-10-28", "videos": [ "http: "http://thecolbertreport.cc.com/videos/xk09yu/<API key>", "http://thecolbertreport.cc.com/videos/7j217q/obama-the-socialist", "http://thecolbertreport.cc.com/videos/bxzmkn/<API key>", "http://thecolbertreport.cc.com/videos/wz2u1e/canton--ohio", "http://thecolbertreport.cc.com/videos/ytg04i/sherman-alexie", "http://thecolbertreport.cc.com/videos/jz4m1g/tickets-to-canada" ], "guest": "Brian Moore, Sherman Alexie" }, { "date": "2008-10-29", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ks5pt8/<API key>", "http://thecolbertreport.cc.com/videos/7qwbk4/<API key>", "http://thecolbertreport.cc.com/videos/k5qv33/<API key>", "http://thecolbertreport.cc.com/videos/cxwcsb/david-simon", "http://thecolbertreport.cc.com/videos/prhqai/colbert-completists" ], "guest": "David Simon" }, { "date": "2008-10-30", "videos": [ "http: "http://thecolbertreport.cc.com/videos/b7m8ic/obama-infomercial", "http://thecolbertreport.cc.com/videos/7mbhhk/<API key>", "http://thecolbertreport.cc.com/videos/tiopht/<API key>", "http://thecolbertreport.cc.com/videos/ugfx1s/wilco-interview" ], "guest": "Wilco" }, { "date": "2008-11-03", "videos": [ "http: "http://thecolbertreport.cc.com/videos/jtvn9v/<API key>", "http://thecolbertreport.cc.com/videos/q31c3b/charlie-cook", "http://thecolbertreport.cc.com/videos/syw57q/<API key>", "http://thecolbertreport.cc.com/videos/3lix4b/andrew-sullivan", "http://thecolbertreport.cc.com/videos/5snsio/election-eve-prayer" ], "guest": "Charlie Cook, Andrew Sullivan" }, { "date": "2008-11-05", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ek3v6r/president-obama", "http: "http://thecolbertreport.cc.com/videos/b3gurg/<API key>", "http://thecolbertreport.cc.com/videos/1bpyxl/andrew-young", "http://thecolbertreport.cc.com/videos/wmwkia/note-to-gorlock" ], "guest": "Ambassador Andrew Young" }, { "date": "2008-11-06", "videos": [ "http: "http://thecolbertreport.cc.com/videos/8cjwkf/<API key>", "http://thecolbertreport.cc.com/videos/91wunt/<API key>", "http://thecolbertreport.cc.com/videos/aedolr/<API key>", "http://thecolbertreport.cc.com/videos/tp44lf/rachel-maddow" ], "guest": "Rachel Maddow" }, { "date": "2008-11-11", "videos": [ "http: "http://thecolbertreport.cc.com/videos/t0o0ln/<API key>", "http://thecolbertreport.cc.com/videos/cf9i7o/<API key>", "http://thecolbertreport.cc.com/videos/a4htau/<API key>", "http://thecolbertreport.cc.com/videos/97cxi9/kevin-johnson", "http://thecolbertreport.cc.com/videos/knwq1k/gay-black-violence" ], "guest": "Dan Savage, Kevin Johnson" }, { "date": "2008-11-12", "videos": [ "http: "http://thecolbertreport.cc.com/videos/hs06sa/formula-4ou1", "http://thecolbertreport.cc.com/videos/jdc5wl/<API key>", "http://thecolbertreport.cc.com/videos/vq5z69/<API key>", "http://thecolbertreport.cc.com/videos/h8pdku/bob-woodward", "http://thecolbertreport.cc.com/videos/yj3fvl/good-night" ], "guest": "Bob Woodward" }, { "date": "2008-11-13", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ws4itq/<API key>", "http://thecolbertreport.cc.com/videos/54gy81/<API key>", "http://thecolbertreport.cc.com/videos/9so57k/<API key>", "http://thecolbertreport.cc.com/videos/84locu/stephen-moore", "http://thecolbertreport.cc.com/videos/kwiam8/<API key>" ], "guest": "Stephen Moore" }, { "date": "2008-11-17", "videos": [ "http: "http://thecolbertreport.cc.com/videos/vfh1d7/<API key>", "http://thecolbertreport.cc.com/videos/tyr5yf/<API key>", "http://thecolbertreport.cc.com/videos/xubttj/<API key>", "http://thecolbertreport.cc.com/videos/okezd5/soup-war", "http://thecolbertreport.cc.com/videos/lu8hmu/malcolm-gladwell", "http://thecolbertreport.cc.com/videos/f67l6s/stephen-drinks-soup" ], "guest": "Tom Brokaw, Malcolm Gladwell" }, { "date": "2008-11-18", "videos": [ "http: "http://thecolbertreport.cc.com/videos/gpyfhe/<API key>", "http://thecolbertreport.cc.com/videos/tda4m3/<API key>", "http://thecolbertreport.cc.com/videos/rfqomg/<API key>" ], "guest": "Paul Simon" }, { "date": "2008-11-19", "videos": [ "http: "http: "http://thecolbertreport.cc.com/videos/hjm6c3/<API key>", "http://thecolbertreport.cc.com/videos/p1vjk5/michael-lewis", "http://thecolbertreport.cc.com/videos/5n2dbq/tearful-apology" ], "guest": "Michael Lewis" }, { "date": "2008-11-20", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ag7dg1/<API key>", "http://thecolbertreport.cc.com/videos/2frm4q/<API key>", "http://thecolbertreport.cc.com/videos/c48nk9/thomas-friedman", "http://thecolbertreport.cc.com/videos/bd8wju/<API key>" ], "guest": "Cory Booker, Thomas L. Friedman" }, { "date": "2008-12-01", "videos": [ "http: "http://thecolbertreport.cc.com/videos/tq2nxp/<API key>", "http://thecolbertreport.cc.com/videos/qarmhd/war-in-afghanistan", "http://thecolbertreport.cc.com/videos/rven6i/khaled-hosseini", "http://thecolbertreport.cc.com/videos/36dgrv/<API key>", "http://thecolbertreport.cc.com/videos/7058uf/roland-fryer", "http://thecolbertreport.cc.com/videos/n1in3i/good-night" ], "guest": "Khaled Hosseini, Roland Fryer" }, { "date": "2008-12-02", "videos": [ "http: "http://thecolbertreport.cc.com/videos/qvwoip/<API key>", "http://thecolbertreport.cc.com/videos/ztjt9g/<API key>", "http://thecolbertreport.cc.com/videos/fic3d1/<API key>", "http://thecolbertreport.cc.com/videos/bshkcz/jeffrey-goldberg", "http://thecolbertreport.cc.com/videos/utntlq/<API key>" ], "guest": "Jeffrey Goldberg" }, { "date": "2008-12-03", "videos": [ "http: "http://thecolbertreport.cc.com/videos/owefww/nasa-spider-escapes", "http://thecolbertreport.cc.com/videos/z33t4w/<API key>", "http://thecolbertreport.cc.com/videos/mcfi82/<API key>", "http://thecolbertreport.cc.com/videos/2karre/barbara-walters", "http://thecolbertreport.cc.com/videos/r6ufyo/<API key>" ], "guest": "Barbara Walters" }, { "date": "2008-12-04", "videos": [ "http: "http://thecolbertreport.cc.com/videos/2fjry6/<API key>", "http://thecolbertreport.cc.com/videos/2d2zn0/<API key>", "http://thecolbertreport.cc.com/videos/d5jif7/<API key>", "http://thecolbertreport.cc.com/videos/n7jvhg/nicholas-wade", "http://thecolbertreport.cc.com/videos/sugr09/returning-monday" ], "guest": "Sen. Bob Graham, Nicholas Wade" }, { "date": "2008-12-08", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ao9vg7/<API key>", "http://thecolbertreport.cc.com/videos/gctknh/<API key>", "http: "http://thecolbertreport.cc.com/videos/hpitea/geoffrey-canada", "http://thecolbertreport.cc.com/videos/0r2h5l/stephen-on-conan" ], "guest": "Geoffrey Canada" }, { "date": "2008-12-09", "videos": [ "http: "http://thecolbertreport.cc.com/videos/onbk9a/<API key>", "http://thecolbertreport.cc.com/videos/600m6s/<API key>", "http://thecolbertreport.cc.com/videos/yflimf/<API key>", "http://thecolbertreport.cc.com/videos/srrck8/charlie-kaufman", "http://thecolbertreport.cc.com/videos/zkndmq/nixon-angel" ], "guest": "Kevin Bacon, Charlie Kaufman" }, { "date": "2008-12-10", "videos": [ "http: "http://thecolbertreport.cc.com/videos/f9io4y/<API key>", "http://thecolbertreport.cc.com/videos/imth2d/<API key>", "http://thecolbertreport.cc.com/videos/jnn2lb/<API key>", "http://thecolbertreport.cc.com/videos/i1wzcc/richard-haass", "http://thecolbertreport.cc.com/videos/uw87dl/good-night" ], "guest": "Richard Haass" }, { "date": "2008-12-11", "videos": [ "http: "http://thecolbertreport.cc.com/videos/djirpd/michael-phelps", "http://thecolbertreport.cc.com/videos/j11gba/<API key>", "http://thecolbertreport.cc.com/videos/zc9rq9/<API key>", "http://thecolbertreport.cc.com/videos/1756ia/<API key>" ], "guest": "Michael Phelps" } ], "2009": [ { "date": "2009-01-05", "videos": [ "http: "http://thecolbertreport.cc.com/videos/za98w3/<API key>", "http://thecolbertreport.cc.com/videos/hq4p9o/<API key>", "http://thecolbertreport.cc.com/videos/nrlhy0/john-king", "http://thecolbertreport.cc.com/videos/5hoaoz/<API key>" ], "guest": "Riley Crane" }, { "date": "2009-01-06", "videos": [ "http://thecolbertreport.cc.com/videos/sn2rhf/ponzi-schemes", "http://thecolbertreport.cc.com/videos/k6j6as/<API key>", "http://thecolbertreport.cc.com/videos/4zhwch/<API key>", "http://thecolbertreport.cc.com/videos/g9ppzt/matt-miller", "http://thecolbertreport.cc.com/videos/yys5yk/thank-you--stephen" ], "guest": "Capt. Charles Moore" }, { "date": "2009-01-07", "videos": [ "http: "http://thecolbertreport.cc.com/videos/92yx1q/che-stadium", "http://thecolbertreport.cc.com/videos/d1e1eu/<API key>", "http://thecolbertreport.cc.com/videos/nqulkz/<API key>", "http://thecolbertreport.cc.com/videos/amgd80/<API key>", "http://thecolbertreport.cc.com/videos/yau33c/benicio-del-toro" ], "guest": "James Fowler" }, { "date": "2009-01-08", "videos": [ "http: "http://thecolbertreport.cc.com/videos/wcgnr1/<API key>", "http://thecolbertreport.cc.com/videos/926dzf/<API key>", "http://thecolbertreport.cc.com/videos/fk4a9c/<API key>", "http://thecolbertreport.cc.com/videos/gteixg/a-really-good-book", "http://thecolbertreport.cc.com/videos/6428p8/pro-commie-epic" ], "guest": "Lawrence Lessig" }, { "date": "2009-01-12", "videos": [ "http: "http://thecolbertreport.cc.com/videos/9c4f03/<API key>", "http://thecolbertreport.cc.com/videos/bwmns5/<API key>", "http://thecolbertreport.cc.com/videos/0o1xwh/<API key>", "http://thecolbertreport.cc.com/videos/dkx1ya/anthony-romero", "http://thecolbertreport.cc.com/videos/by8gkb/a-lot-more-to-say" ], "guest": "Anthony Romero" }, { "date": "2009-01-13", "videos": [ "http: "http://thecolbertreport.cc.com/videos/fmzudp/<API key>", "http://thecolbertreport.cc.com/videos/9et79a/<API key>", "http://thecolbertreport.cc.com/videos/m3x3ok/<API key>", "http://thecolbertreport.cc.com/videos/k1og3a/niall-ferguson", "http://thecolbertreport.cc.com/videos/5px40o/<API key>" ], "guest": "Niall Ferguson" }, { "date": "2009-01-14", "videos": [ "http: "http://thecolbertreport.cc.com/videos/34mj4v/<API key>", "http://thecolbertreport.cc.com/videos/y0f472/<API key>", "http://thecolbertreport.cc.com/videos/ur3zl1/<API key>", "http://thecolbertreport.cc.com/videos/gizrjk/alan-khazei", "http://thecolbertreport.cc.com/videos/9hlcm3/<API key>" ], "guest": "Alan Khazei" }, { "date": "2009-01-15", "videos": [ "http: "http://thecolbertreport.cc.com/videos/95lbi6/bush-and-the-press", "http://thecolbertreport.cc.com/videos/sy3mow/<API key>", "http://thecolbertreport.cc.com/videos/7iuuwa/<API key>", "http://thecolbertreport.cc.com/videos/ux2atw/shepard-fairey", "http://thecolbertreport.cc.com/videos/wfge8o/<API key>" ], "guest": "David Gregory, Shepard Fairey" }, { "date": "2009-01-19", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ul1a7j/mlk-day-mascot", "http://thecolbertreport.cc.com/videos/lypf68/<API key>", "http://thecolbertreport.cc.com/videos/ydvpvb/frank-rich", "http://thecolbertreport.cc.com/videos/52s3oy/<API key>" ], "guest": "Frank Rich" }, { "date": "2009-01-20", "videos": [ "http://thecolbertreport.cc.com/videos/ymrs37/<API key>", "http://thecolbertreport.cc.com/videos/301bds/<API key>", "http://thecolbertreport.cc.com/videos/9hjhcy/<API key>", "http://thecolbertreport.cc.com/videos/mmoodw/jabari-asim", "http://thecolbertreport.cc.com/videos/kai9la/<API key>" ], "guest": "Jabari Asim" }, { "date": "2009-01-21", "videos": [ "http: "http://thecolbertreport.cc.com/videos/l2d6st/president-yo-yo-ma", "http://thecolbertreport.cc.com/videos/axsw46/<API key>", "http://thecolbertreport.cc.com/videos/xkmfex/<API key>", "http://thecolbertreport.cc.com/videos/8l6srp/elizabeth-alexander", "http://thecolbertreport.cc.com/videos/a3p8mj/good-night" ], "guest": "Elizabeth Alexander" }, { "date": "2009-01-22", "videos": [ "http: "http://thecolbertreport.cc.com/videos/t6meak/<API key>", "http://thecolbertreport.cc.com/videos/mtzrkq/<API key>", "http://thecolbertreport.cc.com/videos/689o7m/<API key>", "http://thecolbertreport.cc.com/videos/8awmoy/jon-meacham", "http://thecolbertreport.cc.com/videos/ili9if/<API key>" ], "guest": "Jon Meacham" }, { "date": "2009-01-26", "videos": [ "http: "http://thecolbertreport.cc.com/videos/4oz085/<API key>", "http://thecolbertreport.cc.com/videos/cw8n8j/<API key>", "http://thecolbertreport.cc.com/videos/yxtpn8/<API key>", "http://thecolbertreport.cc.com/videos/uj76wp/ed-young", "http://thecolbertreport.cc.com/videos/49ccbt/1-877-sean-930" ], "guest": "Chris Mooney, Ed Young" }, { "date": "2009-01-27", "videos": [ "http: "http://thecolbertreport.cc.com/videos/8ws8hw/<API key>", "http://thecolbertreport.cc.com/videos/ei15xx/<API key>", "http://thecolbertreport.cc.com/videos/yzw1s5/<API key>", "http://thecolbertreport.cc.com/videos/7ljyqd/philippe-petit", "http://thecolbertreport.cc.com/videos/qx6mra/omar-returns" ], "guest": "Philippe Petit" }, { "date": "2009-01-28", "videos": [ "http://thecolbertreport.cc.com/videos/mrairj/<API key>", "http: "http://thecolbertreport.cc.com/videos/4c854b/<API key>", "http://thecolbertreport.cc.com/videos/m2fb3c/denis-dutton", "http://thecolbertreport.cc.com/videos/x3yxrz/call-1-877-sean-930" ], "guest": "Paul McCartney, Denis Dutton" }, { "date": "2009-01-29", "videos": [ "http: "http://thecolbertreport.cc.com/videos/7k3noc/<API key>", "http://thecolbertreport.cc.com/videos/05hiht/<API key>", "http://thecolbertreport.cc.com/videos/ra6q6v/<API key>", "http://thecolbertreport.cc.com/videos/n7s40p/john-podesta", "http://thecolbertreport.cc.com/videos/t92qhf/<API key>" ], "guest": "John Podesta" }, { "date": "2009-02-02", "videos": [ "http: "http://thecolbertreport.cc.com/videos/qx0vt7/<API key>", "http://thecolbertreport.cc.com/videos/3n4xx4/<API key>", "http://thecolbertreport.cc.com/videos/9kc6le/<API key>", "http://thecolbertreport.cc.com/videos/1tdafu/dan-zaccagnino", "http://thecolbertreport.cc.com/videos/z0ddpw/so-long--farewell" ], "guest": "Dan Zaccagnino" }, { "date": "2009-02-03", "videos": [ "http: "http://thecolbertreport.cc.com/videos/cfzmri/<API key>", "http://thecolbertreport.cc.com/videos/b8o45v/<API key>", "http://thecolbertreport.cc.com/videos/eo7n2c/<API key>", "http://thecolbertreport.cc.com/videos/lr21yl/<API key>-", "http://thecolbertreport.cc.com/videos/fz6ra7/<API key>" ], "guest": "Henry Louis Gates Jr." }, { "date": "2009-02-04", "videos": [ "http: "http://thecolbertreport.cc.com/videos/7z1jvo/<API key>", "http://thecolbertreport.cc.com/videos/1t7nor/<API key>", "http://thecolbertreport.cc.com/videos/vtzs6d/<API key>", "http://thecolbertreport.cc.com/videos/7z3biy/tell-your-friends" ], "guest": "Steve Martin" }, { "date": "2009-02-05", "videos": [ "http: "http://thecolbertreport.cc.com/videos/hkvbbb/<API key>", "http://thecolbertreport.cc.com/videos/7v0jg2/<API key>", "http://thecolbertreport.cc.com/videos/9xbuuq/<API key>", "http://thecolbertreport.cc.com/videos/e378n6/<API key>", "http://thecolbertreport.cc.com/videos/avti1a/jonah-lehrer", "http://thecolbertreport.cc.com/videos/qj4lmo/<API key>" ], "guest": "James Surowiecki, Jonah Lehrer" }, { "date": "2009-02-09", "videos": [ "http: "http://thecolbertreport.cc.com/videos/it28fw/the-new-word-czar", "http://thecolbertreport.cc.com/videos/13lrs0/<API key>", "http://thecolbertreport.cc.com/videos/hr5hvl/<API key>" ], "guest": "TV on the Radio" }, { "date": "2009-02-10", "videos": [ "http: "http://thecolbertreport.cc.com/videos/mj9pcq/the-visa-black-card", "http://thecolbertreport.cc.com/videos/l6kty8/<API key>", "http://thecolbertreport.cc.com/videos/nj38bb/<API key>", "http://thecolbertreport.cc.com/videos/9w33a7/robert-ballard", "http://thecolbertreport.cc.com/videos/gissod/<API key>" ], "guest": "Robert Ballard" }, { "date": "2009-02-11", "videos": [ "http: "http://thecolbertreport.cc.com/videos/l5ealo/<API key>", "http://thecolbertreport.cc.com/videos/jxgbb9/<API key>", "http://thecolbertreport.cc.com/videos/wfrwar/truth-from-the-gut", "http://thecolbertreport.cc.com/videos/42vhyq/steven-pinker", "http://thecolbertreport.cc.com/videos/tpb22v/<API key>" ], "guest": "Eleanor Holmes Norton, Steven Pinker" }, { "date": "2009-02-12", "videos": [ "http://thecolbertreport.cc.com/videos/m1tx5d/<API key>", "http://thecolbertreport.cc.com/videos/f0688o/<API key>", "http://thecolbertreport.cc.com/videos/vgbtpp/<API key>", "http://thecolbertreport.cc.com/videos/tbf4y6/adam-gopnik", "http://thecolbertreport.cc.com/videos/okmu84/<API key>" ], "guest": "David Ross, Ed Colbert, Adam Gopnik" }, { "date": "2009-02-23", "videos": [ "http: "http://thecolbertreport.cc.com/videos/xlgfrl/<API key>", "http://thecolbertreport.cc.com/videos/legx6j/<API key>", "http://thecolbertreport.cc.com/videos/om9959/helen-fisher" ], "guest": "Father James Martin, Helen Fisher" }, { "date": "2009-02-24", "videos": [ "http://thecolbertreport.cc.com/videos/mngx54/<API key>", "http://thecolbertreport.cc.com/videos/9jcm4g/1997-flashback", "http://thecolbertreport.cc.com/videos/pljjhc/<API key>", "http://thecolbertreport.cc.com/videos/n75sz3/cliff-sloan", "http://thecolbertreport.cc.com/videos/yg82dj/happy-mardi-gras", "http://thecolbertreport.cc.com/videos/823sva/<API key>", "http://thecolbertreport.cc.com/videos/gks8m8/breaded-fish-sticks" ], "guest": "Cliff Sloan" }, { "date": "2009-02-25", "videos": [ "http: "http://thecolbertreport.cc.com/videos/fbot0q/<API key>", "http://thecolbertreport.cc.com/videos/o1f5mr/<API key>", "http://thecolbertreport.cc.com/videos/jyyb0h/john-fetterman", "http://thecolbertreport.cc.com/videos/10ufmk/<API key>" ], "guest": "John Fetterman" }, { "date": "2009-02-26", "videos": [ "http: "http://thecolbertreport.cc.com/videos/1q3zjs/<API key>", "http://thecolbertreport.cc.com/videos/5j9jjo/<API key>", "http://thecolbertreport.cc.com/videos/831wm1/kris-kristofferson", "http://thecolbertreport.cc.com/videos/lh0vwj/<API key>", "http://thecolbertreport.cc.com/videos/um02qq/analog-tv" ], "guest": "Kris Kristofferson" }, { "date": "2009-03-02", "videos": [ "http://thecolbertreport.cc.com/videos/tfciz3/<API key>", "http://thecolbertreport.cc.com/videos/xtntgt/snow-in-the-studio", "http://thecolbertreport.cc.com/videos/52t6yh/<API key>", "http://thecolbertreport.cc.com/videos/j78ngs/david-byrne" ], "guest": "David Byrne" }, { "date": "2009-03-03", "videos": [ "http://thecolbertreport.cc.com/videos/qs5iv1/<API key>", "http://thecolbertreport.cc.com/videos/0c92nb/guns-for-roses", "http://thecolbertreport.cc.com/videos/l9p0ah/<API key>", "http://thecolbertreport.cc.com/videos/oayyzq/mark-bittman", "http://thecolbertreport.cc.com/videos/tfciz3/<API key>" ], "guest": "Mark Bittman" }, { "date": "2009-03-04", "videos": [ "http: "http://thecolbertreport.cc.com/videos/kob10w/<API key>", "http://thecolbertreport.cc.com/videos/9opkqc/<API key>", "http://thecolbertreport.cc.com/videos/sx98t6/carl-wilson", "http://thecolbertreport.cc.com/videos/239tij/goodnight", "http: "http://thecolbertreport.cc.com/videos/00d1sm/<API key>", "http://thecolbertreport.cc.com/videos/nhjls5/<API key>" ], "guest": "Carl Wilson" }, { "date": "2009-03-05", "videos": [ "http: "http://thecolbertreport.cc.com/videos/w194ds/obama-s-swing-set", "http://thecolbertreport.cc.com/videos/a7l1re/<API key>", "http://thecolbertreport.cc.com/videos/n8dlml/steven-johnson", "http://thecolbertreport.cc.com/videos/nfx4fy/<API key>", "http://thecolbertreport.cc.com/videos/1y41q9/<API key>-" ], "guest": "Steven Johnson" }, { "date": "2009-03-09", "videos": [ "http: "http://thecolbertreport.cc.com/videos/4bvnlr/<API key>", "http://thecolbertreport.cc.com/videos/z9c9ak/<API key>", "http://thecolbertreport.cc.com/videos/54ad8f/lisa-hannigan" ], "guest": "Lisa Hannigan" }, { "date": "2009-03-10", "videos": [ "http: "http://thecolbertreport.cc.com/videos/i1w6au/<API key>", "http://thecolbertreport.cc.com/videos/858jnr/<API key>", "http://thecolbertreport.cc.com/videos/ogsw1c/jay-keasling", "http://thecolbertreport.cc.com/videos/ovf9hb/sick-three-way", "http://thecolbertreport.cc.com/videos/mtwuig/<API key>", "http://thecolbertreport.cc.com/videos/psylhz/<API key>", "http://thecolbertreport.cc.com/videos/dw94ms/<API key>" ], "guest": "William Gerstenmaier, Dr. Jay Keasling" }, { "date": "2009-03-11", "videos": [ "http: "http://thecolbertreport.cc.com/videos/4sbc36/<API key>", "http://thecolbertreport.cc.com/videos/7bt4s0/<API key>", "http://thecolbertreport.cc.com/videos/rovggj/howard-fineman", "http://thecolbertreport.cc.com/videos/vpswgr/stephen-s-encore", "http://thecolbertreport.cc.com/videos/m6st31/<API key>" ], "guest": "Howard Fineman" }, { "date": "2009-03-12", "videos": [ "http: "http://thecolbertreport.cc.com/videos/uvfw3m/<API key>", "http://thecolbertreport.cc.com/videos/p4j2xc/<API key>", "http://thecolbertreport.cc.com/videos/8nmnda/peter-singer", "http://thecolbertreport.cc.com/videos/8tqo3i/goodnight", "http://thecolbertreport.cc.com/videos/xjpl01/<API key>" ], "guest": "Simon Johnson, Peter Singer" }, { "date": "2009-03-16", "videos": [ "http: "http://thecolbertreport.cc.com/videos/yz9sik/<API key>", "http://thecolbertreport.cc.com/videos/pe3tou/<API key>", "http://thecolbertreport.cc.com/videos/ck0fd5/neil-gaiman", "http://thecolbertreport.cc.com/videos/qxrsxr/<API key>" ], "guest": "Jonathan Chait, Neil Gaiman" }, { "date": "2009-03-17", "videos": [ "http: "http://thecolbertreport.cc.com/videos/v1zxe6/<API key>", "http://thecolbertreport.cc.com/videos/bsv6p7/<API key>", "http://thecolbertreport.cc.com/videos/7byrkj/david-grann", "http://thecolbertreport.cc.com/videos/zrpt32/<API key>", "http://thecolbertreport.cc.com/videos/59sfdt/<API key>" ], "guest": "David Grann" }, { "date": "2009-03-18", "videos": [ "http: "http://thecolbertreport.cc.com/videos/an5849/<API key>", "http://thecolbertreport.cc.com/videos/fnlgez/<API key>", "http://thecolbertreport.cc.com/videos/5hu17z/juan-cole", "http://thecolbertreport.cc.com/videos/bokh2r/sam-s-club-time", "http://thecolbertreport.cc.com/videos/3i8x9a/<API key>" ], "guest": "Juan Cole" }, { "date": "2009-03-19", "videos": [ "http: "http://thecolbertreport.cc.com/videos/tkjk8k/<API key>", "http://thecolbertreport.cc.com/videos/oi2fxr/<API key>", "http://thecolbertreport.cc.com/videos/m9oys8/john-mccardell", "http://thecolbertreport.cc.com/videos/f189zq/<API key>", "http://thecolbertreport.cc.com/videos/wa8cs2/<API key>" ], "guest": "John McCardell" }, { "date": "2009-03-30", "videos": [ "http: "http://thecolbertreport.cc.com/videos/04agpr/violence-in-mexico", "http://thecolbertreport.cc.com/videos/ttpqpq/<API key>", "http://thecolbertreport.cc.com/videos/y6yflv/<API key>", "http://thecolbertreport.cc.com/videos/yz8bqz/derrick-pitts" ], "guest": "Derrick Pitts" }, { "date": "2009-03-31", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ga9h1c/<API key>", "http://thecolbertreport.cc.com/videos/19bdth/<API key>", "http://thecolbertreport.cc.com/videos/fkt6tu/david-plotz", "http://thecolbertreport.cc.com/videos/ch71k9/sudoku-answers", "http://thecolbertreport.cc.com/videos/7l6w83/<API key>", "http://thecolbertreport.cc.com/videos/k0knxh/30-minute-applause" ], "guest": "David Plotz" }, { "date": "2009-04-01", "videos": [ "http: "http://thecolbertreport.cc.com/videos/1o1nya/<API key>", "http://thecolbertreport.cc.com/videos/5t3340/<API key>", "http://thecolbertreport.cc.com/videos/wol3qg/dambisa-moyo", "http://thecolbertreport.cc.com/videos/vof9z5/hide-and-seek", "http://thecolbertreport.cc.com/videos/jt0f3j/the-10-31-project" ], "guest": "Dambisa Moyo" }, { "date": "2009-04-02", "videos": [ "http: "http://thecolbertreport.cc.com/videos/78s5oz/cheney-s-<API key>, "http://thecolbertreport.cc.com/videos/mkb4ls/<API key>", "http://thecolbertreport.cc.com/videos/4qhn4o/biz-stone", "http://thecolbertreport.cc.com/videos/5uxqom/<API key>", "http://thecolbertreport.cc.com/videos/idkq46/<API key>" ], "guest": "Biz Stone" }, { "date": "2009-04-06", "videos": [ "http://thecolbertreport.cc.com/videos/d5ju1a/<API key>", "http: "http://thecolbertreport.cc.com/videos/f3bajc/body-loss", "http://thecolbertreport.cc.com/videos/y3ocaq/<API key>", "http://thecolbertreport.cc.com/videos/2zq8u0/rich-lowry", "http://thecolbertreport.cc.com/videos/k9vxpy/make-lemonade" ], "guest": "Tom Brokaw, Rich Lowry" }, { "date": "2009-04-07", "videos": [ "http: "http://thecolbertreport.cc.com/videos/9kk3jy/<API key>", "http://thecolbertreport.cc.com/videos/6uykwu/<API key>", "http://thecolbertreport.cc.com/videos/31tszu/queen-noor", "http://thecolbertreport.cc.com/videos/pqumra/hiccup-free", "http://thecolbertreport.cc.com/videos/njp3xz/<API key>", "http://thecolbertreport.cc.com/videos/u5yf3y/<API key>" ], "guest": "Queen Noor" }, { "date": "2009-04-08", "videos": [ "http: "http://thecolbertreport.cc.com/videos/lyeuyj/<API key>", "http://thecolbertreport.cc.com/videos/10cwvc/<API key>", "http://thecolbertreport.cc.com/videos/eknw52/phil-bronstein", "http://thecolbertreport.cc.com/videos/jmb43t/electronic-edition", "http://thecolbertreport.cc.com/videos/7jw15b/<API key>" ], "guest": "Phil Bronstein" }, { "date": "2009-04-09", "videos": [ "http://thecolbertreport.cc.com/videos/ly7fhn/<API key>", "http://thecolbertreport.cc.com/videos/1adwqk/<API key>", "http://thecolbertreport.cc.com/videos/lywaay/bart-ehrman", "http://thecolbertreport.cc.com/videos/vd2m1k/<API key>", "http://thecolbertreport.cc.com/videos/4wgqsm/<API key>" ], "guest": "Bart Ehrman" }, { "date": "2009-04-14", "videos": [ "http: "http://thecolbertreport.cc.com/videos/1tgxfo/<API key>", "http://thecolbertreport.cc.com/videos/bz4xly/<API key>", "http://thecolbertreport.cc.com/videos/gxfl4g/susie-orbach", "http://thecolbertreport.cc.com/videos/5m2sci/goodnight--helen" ], "guest": "Sunita L. Williams, Susie Orbach" }, { "date": "2009-04-15", "videos": [ "http: "http://thecolbertreport.cc.com/videos/whfbdu/<API key>", "http://thecolbertreport.cc.com/videos/xkxq0s/<API key>", "http://thecolbertreport.cc.com/videos/0ca7u5/jim-lehrer", "http://thecolbertreport.cc.com/videos/g6fu2q/homework-assignment", "http://thecolbertreport.cc.com/videos/5rzknc/<API key>" ], "guest": "Jim Lehrer" }, { "date": "2009-04-16", "videos": [ "http: "http://thecolbertreport.cc.com/videos/abfalc/teabagging-protests", "http://thecolbertreport.cc.com/videos/npq9t7/<API key>", "http://thecolbertreport.cc.com/videos/btde8y/douglas-kmiec", "http://thecolbertreport.cc.com/videos/gu6q0n/goodnight-salute", "http://thecolbertreport.cc.com/videos/a8qba2/tax-atax" ], "guest": "Kanishk Tharoor, Doug Kmiec" }, { "date": "2009-04-20", "videos": [ "http: "http://thecolbertreport.cc.com/videos/3g58oe/<API key>", "http://thecolbertreport.cc.com/videos/pzg5id/<API key>", "http://thecolbertreport.cc.com/videos/b1hfbd/<API key>", "http://thecolbertreport.cc.com/videos/qi09sh/joe-arpaio" ], "guest": "Ken Quinn, Sheriff Joe Arpaio" }, { "date": "2009-04-21", "videos": [ "http: "http://thecolbertreport.cc.com/videos/mnalwu/<API key>", "http://thecolbertreport.cc.com/videos/hezs49/<API key>", "http://thecolbertreport.cc.com/videos/7lqvgy/mike-krzyzewski", "http://thecolbertreport.cc.com/videos/4dj3xs/<API key>", "http://thecolbertreport.cc.com/videos/g9ilpe/anger-s-aweigh", "http://thecolbertreport.cc.com/videos/h6pabb/<API key>" ], "guest": "Coach Mike Kryzewski" }, { "date": "2009-04-22", "videos": [ "http: "http://thecolbertreport.cc.com/videos/g6q0sp/-<API key>", "http://thecolbertreport.cc.com/videos/7ax5b6/<API key>", "http://thecolbertreport.cc.com/videos/ui31iq/ira-glass", "http://thecolbertreport.cc.com/videos/77b5v5/<API key>", "http://thecolbertreport.cc.com/videos/zbqudz/<API key>" ], "guest": "Ira Glass" }, { "date": "2009-04-23", "videos": [ "http: "http://thecolbertreport.cc.com/videos/16z7m7/<API key>", "http://thecolbertreport.cc.com/videos/dbshcz/<API key>", "http://thecolbertreport.cc.com/videos/2tn51j/elizabeth-bintliff", "http://thecolbertreport.cc.com/videos/ylolny/goodnight--daisy", "http://thecolbertreport.cc.com/videos/g1doyw/summit-of-all-fears" ], "guest": "Elizabeth Bintliff" }, { "date": "2009-04-27", "videos": [ "http: "http://thecolbertreport.cc.com/videos/u3yqqg/<API key>", "http://thecolbertreport.cc.com/videos/ioe7hh/<API key>", "http://thecolbertreport.cc.com/videos/6ywn6l/<API key>", "http://thecolbertreport.cc.com/videos/jlx2r1/the-decemberists" ], "guest": "The Decemberists" }, { "date": "2009-04-28", "videos": [ "http: "http://thecolbertreport.cc.com/videos/pwdiki/<API key>", "http://thecolbertreport.cc.com/videos/14mfow/<API key>", "http://thecolbertreport.cc.com/videos/u40xb8/daniel-gross", "http://thecolbertreport.cc.com/videos/l8q5cp/<API key>" ], "guest": "Richard Engel, Daniel Gross" }, { "date": "2009-04-29", "videos": [ "http: "http://thecolbertreport.cc.com/videos/0gktuh/<API key>", "http://thecolbertreport.cc.com/videos/ou4xko/<API key>", "http://thecolbertreport.cc.com/videos/i5hw2i/david-kessler", "http://thecolbertreport.cc.com/videos/seesef/feet-teeth", "http://thecolbertreport.cc.com/videos/5kllsr/<API key>", "http://thecolbertreport.cc.com/videos/ewzt0z/<API key>" ], "guest": "David Kessler" }, { "date": "2009-04-30", "videos": [ "http: "http://thecolbertreport.cc.com/videos/hr47fj/<API key>", "http://thecolbertreport.cc.com/videos/zhiu9l/ethan-nadelmann", "http://thecolbertreport.cc.com/videos/1e83az/the-after-show", "http://thecolbertreport.cc.com/videos/dnh80p/<API key>" ], "guest": "Jonathan Alter, Ethan Nadelman" }, { "date": "2009-05-04", "videos": [ "http: "http://thecolbertreport.cc.com/videos/e4d421/<API key>", "http://thecolbertreport.cc.com/videos/57pcxy/j-j--abrams", "http://thecolbertreport.cc.com/videos/3q06z6/<API key>" ], "guest": "J.J. Abrams" }, { "date": "2009-05-05", "videos": [ "http: "http://thecolbertreport.cc.com/videos/daeu0o/<API key>", "http://thecolbertreport.cc.com/videos/73g8ui/<API key>", "http://thecolbertreport.cc.com/videos/sye42t/paul-rieckhoff", "http: "http://thecolbertreport.cc.com/videos/0a05it/<API key>" ], "guest": "Cliff Sloan, Paul Rieckhoff" }, { "date": "2009-05-06", "videos": [ "http: "http://thecolbertreport.cc.com/videos/k97z53/<API key>", "http://thecolbertreport.cc.com/videos/4h8qcx/<API key>", "http://thecolbertreport.cc.com/videos/q7lfqg/laurie-garrett", "http://thecolbertreport.cc.com/videos/2y8ihh/hug-your-television", "http://thecolbertreport.cc.com/videos/mekuw6/<API key>" ], "guest": "Laurie Garrett" }, { "date": "2009-05-07", "videos": [ "http: "http://thecolbertreport.cc.com/videos/40ivqy/<API key>", "http://thecolbertreport.cc.com/videos/ednx54/<API key>", "http://thecolbertreport.cc.com/videos/as8qiu/mitchell-joachim", "http://thecolbertreport.cc.com/videos/4bas9p/<API key>", "http://thecolbertreport.cc.com/videos/686y3f/<API key>" ], "guest": "Mitchell Joachim" }, { "date": "2009-05-11", "videos": [ "http: "http://thecolbertreport.cc.com/videos/cctfpl/<API key>", "http://thecolbertreport.cc.com/videos/bwc8x1/<API key>", "http://thecolbertreport.cc.com/videos/cguksk/<API key>", "http://thecolbertreport.cc.com/videos/3ttm11/jeff-daniels" ], "guest": "Tamara Draut" }, { "date": "2009-05-12", "videos": [ "http: "http://thecolbertreport.cc.com/videos/zy5zj6/howard-s-end", "http://thecolbertreport.cc.com/videos/n89zl7/<API key>", "http://thecolbertreport.cc.com/videos/hs7gtm/<API key>", "http://thecolbertreport.cc.com/videos/a0bgn9/ron-howard", "http://thecolbertreport.cc.com/videos/6fx090/credit-check", "http://thecolbertreport.cc.com/videos/lzvish/<API key>" ], "guest": "Ron Howard" }, { "date": "2009-05-13", "videos": [ "http: "http://thecolbertreport.cc.com/videos/g3716f/<API key>", "http://thecolbertreport.cc.com/videos/hp9jyy/<API key>", "http://thecolbertreport.cc.com/videos/eon7i2/michael-pollan", "http://thecolbertreport.cc.com/videos/0it13s/<API key>", "http://thecolbertreport.cc.com/videos/5715dt/our-plan-in-havana", "http://thecolbertreport.cc.com/videos/g7s21x/you-are-a-dummy" ], "guest": "Michael Pollan" }, { "date": "2009-05-14", "videos": [ "http: "http://thecolbertreport.cc.com/videos/priitm/caveman-porn-stash", "http://thecolbertreport.cc.com/videos/phfour/<API key>", "http://thecolbertreport.cc.com/videos/m82ydm/yusuf", "http://thecolbertreport.cc.com/videos/vyychn/<API key>" ], "guest": "Yusuf" }, { "date": "2009-05-18", "videos": [ "http: "http://thecolbertreport.cc.com/videos/gc17yz/<API key>", "http://thecolbertreport.cc.com/videos/oh4xki/<API key>", "http://thecolbertreport.cc.com/videos/phv8h6/meghan-mccain", "http://thecolbertreport.cc.com/videos/h4dfgj/<API key>" ], "guest": "Meghan McCain" }, { "date": "2009-05-19", "videos": [ "http: "http://thecolbertreport.cc.com/videos/um8x6x/<API key>", "http://thecolbertreport.cc.com/videos/9w54d6/<API key>", "http://thecolbertreport.cc.com/videos/tn9xuo/walter-kirn", "http://thecolbertreport.cc.com/videos/l2dw5z/stephen-s-show", "http://thecolbertreport.cc.com/videos/y5v5ns/<API key>" ], "guest": "Walter Kirn" }, { "date": "2009-05-20", "videos": [ "http: "http://thecolbertreport.cc.com/videos/b9eth2/<API key>-", "http://thecolbertreport.cc.com/videos/e5f1sd/<API key>", "http://thecolbertreport.cc.com/videos/u2rpts/seth-shostak", "http://thecolbertreport.cc.com/videos/m63aac/goodnight", "http://thecolbertreport.cc.com/videos/i401ml/<API key>-" ], "guest": "Seth Shostak" }, { "date": "2009-05-21", "videos": [ "http: "http://thecolbertreport.cc.com/videos/hck7te/<API key>", "http://thecolbertreport.cc.com/videos/4kzrbn/<API key>", "http://thecolbertreport.cc.com/videos/ait1y2/green-day", "http://thecolbertreport.cc.com/videos/iuaf6k/<API key>" ], "guest": "Green Day" }, { "date": "2009-06-01", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ckumab/<API key>", "http://thecolbertreport.cc.com/videos/ezeifx/<API key>", "http://thecolbertreport.cc.com/videos/2p70rc/<API key>", "http://thecolbertreport.cc.com/videos/4suoo4/byron-dorgan" ], "guest": "Jeffrey Toobin, Sen. Byron Dorgan" }, { "date": "2009-06-02", "videos": [ "http: "http://thecolbertreport.cc.com/videos/xahwo7/<API key>", "http://thecolbertreport.cc.com/videos/m4ur7f/<API key>", "http://thecolbertreport.cc.com/videos/bpwglm/katty-kay", "http://thecolbertreport.cc.com/videos/860dm5/<API key>", "http://thecolbertreport.cc.com/videos/ch9xnn/supreme-court-press", "http://thecolbertreport.cc.com/videos/t28i3d/dance-for-stephen" ], "guest": "Katty Kay" }, { "date": "2009-06-03", "videos": [ "http: "http://thecolbertreport.cc.com/videos/1azzsn/<API key>-", "http://thecolbertreport.cc.com/videos/in49m6/<API key>", "http://thecolbertreport.cc.com/videos/ughago/eric-schlosser", "http://thecolbertreport.cc.com/videos/fw7nrm/<API key>-", "http://thecolbertreport.cc.com/videos/rfeepg/<API key>" ], "guest": "Eric Schlosser" }, { "date": "2009-06-04", "videos": [ "http: "http://thecolbertreport.cc.com/videos/oqx005/<API key>", "http://thecolbertreport.cc.com/videos/anuhnx/<API key>", "http://thecolbertreport.cc.com/videos/obi6e0/dag-soderberg", "http://thecolbertreport.cc.com/videos/u226dl/<API key>" ], "guest": "Dag Soderberg, David Byrne" }, { "date": "2009-06-08", "videos": [ "http://thecolbertreport.cc.com/videos/gbu94e/<API key>", "http://thecolbertreport.cc.com/videos/wy7a2l/<API key>", "http://thecolbertreport.cc.com/videos/n4g2vg/<API key>", "http://thecolbertreport.cc.com/videos/c4z5y3/<API key>", "http://thecolbertreport.cc.com/videos/m6uaot/<API key>" ], "guest": "Stephen broadcasts from Iraq, Gen. Ray Odierno" }, { "date": "2009-06-09", "videos": [ "http://thecolbertreport.cc.com/videos/xuowp6/<API key>-", "http://thecolbertreport.cc.com/videos/nlvzz2/<API key>", "http://thecolbertreport.cc.com/videos/8querl/<API key>", "http://thecolbertreport.cc.com/videos/xjmvnq/<API key>", "http://thecolbertreport.cc.com/videos/bdo17v/<API key>", "http://thecolbertreport.cc.com/videos/clgan9/<API key>-" ], "guest": "Stephen broadcasts from Iraq (1)" }, { "date": "2009-06-10", "videos": [ "http://thecolbertreport.cc.com/videos/3avxyi/<API key>", "http://thecolbertreport.cc.com/videos/cyrxgp/admiral-crunch", "http://thecolbertreport.cc.com/videos/xfobul/<API key>-", "http: "http://thecolbertreport.cc.com/videos/nlng6v/<API key>", "http://thecolbertreport.cc.com/videos/xbtx2g/<API key>" ], "guest": "Stephen broadcasts from Iraq (2)" }, { "date": "2009-06-11", "videos": [ "http://thecolbertreport.cc.com/videos/x1yyko/<API key>", "http://thecolbertreport.cc.com/videos/ithwrz/<API key>", "http://thecolbertreport.cc.com/videos/9p7eto/<API key>", "http://thecolbertreport.cc.com/videos/hqcfyh/<API key>", "http://thecolbertreport.cc.com/videos/aa7w7z/<API key>", "http://thecolbertreport.cc.com/videos/74tfzb/<API key>" ], "guest": "Stephen broadcasts from Iraq (3)" }, { "date": "2009-06-15", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ycfoc7/<API key>", "http://thecolbertreport.cc.com/videos/cgcvlh/<API key>", "http://thecolbertreport.cc.com/videos/px4jql/austan-goolsbee", "http://thecolbertreport.cc.com/videos/22hank/<API key>" ], "guest": "Austan Goolsbee" }, { "date": "2009-06-16", "videos": [ "http: "http://thecolbertreport.cc.com/videos/e51xox/<API key>", "http://thecolbertreport.cc.com/videos/86p43v/<API key>", "http://thecolbertreport.cc.com/videos/guirtz/<API key>", "http://thecolbertreport.cc.com/videos/8g3agb/jim-rogers", "http://thecolbertreport.cc.com/videos/1bur1p/<API key>" ], "guest": "Karim Sadjadpour, Jim Rogers" }, { "date": "2009-06-17", "videos": [ "http: "http://thecolbertreport.cc.com/videos/y8n8bj/<API key>", "http://thecolbertreport.cc.com/videos/v8qfms/<API key>", "http://thecolbertreport.cc.com/videos/fgc5qj/<API key>", "http://thecolbertreport.cc.com/videos/6wqhd0/<API key>", "http://thecolbertreport.cc.com/videos/1jvq35/teh-runoff", "http://thecolbertreport.cc.com/videos/31otgs/goodnight" ], "guest": "Joshua Micah Marshall" }, { "date": "2009-06-18", "videos": [ "http: "http://thecolbertreport.cc.com/videos/0qwej8/<API key>", "http://thecolbertreport.cc.com/videos/nmpsnk/<API key>", "http://thecolbertreport.cc.com/videos/e8rev9/paul-muldoon", "http://thecolbertreport.cc.com/videos/dvld1q/<API key>", "http://thecolbertreport.cc.com/videos/e8h8e5/<API key>", "http://thecolbertreport.cc.com/videos/e72lp2/<API key>" ], "guest": "Paul Muldoon" }, { "date": "2009-06-22", "videos": [ "http: "http://thecolbertreport.cc.com/videos/91fk6r/zicam-recall", "http://thecolbertreport.cc.com/videos/h9527k/<API key>", "http://thecolbertreport.cc.com/videos/he9dc0/simon-schama", "http://thecolbertreport.cc.com/videos/k4vrsb/<API key>" ], "guest": "Simon Schama" }, { "date": "2009-06-23", "videos": [ "http://thecolbertreport.cc.com/videos/wovkbp/<API key>", "http://thecolbertreport.cc.com/videos/yaknra/<API key>", "http://thecolbertreport.cc.com/videos/xc1sqp/<API key>", "http://thecolbertreport.cc.com/videos/fmv6yq/david-kilcullen", "http://thecolbertreport.cc.com/videos/i99yp3/<API key>" ], "guest": "Howard Dean, David Kilcullen" }, { "date": "2009-06-24", "videos": [ "http: "http://thecolbertreport.cc.com/videos/5xejpe/<API key>", "http://thecolbertreport.cc.com/videos/neths8/matthew-crawford", "http://thecolbertreport.cc.com/videos/i50dum/<API key>", "http://thecolbertreport.cc.com/videos/jkobj5/<API key>", "http://thecolbertreport.cc.com/videos/411cqv/<API key>" ], "guest": "Matthew Crawford" }, { "date": "2009-06-25", "videos": [ "http: "http://thecolbertreport.cc.com/videos/g71yl5/<API key>", "http://thecolbertreport.cc.com/videos/5gki1y/<API key>", "http://thecolbertreport.cc.com/videos/ohjhjq/jim-fouratt", "http://thecolbertreport.cc.com/videos/l3h2eg/<API key>", "http://thecolbertreport.cc.com/videos/nw0bxn/<API key>" ], "guest": "Jim Fouratt" }, { "date": "2009-06-29", "videos": [ "http://thecolbertreport.cc.com/videos/ehxpq9/<API key>", "http://thecolbertreport.cc.com/videos/di8fs8/<API key>", "http://thecolbertreport.cc.com/videos/8ouc6a/<API key>", "http://thecolbertreport.cc.com/videos/4zr9io/neil-degrasse-tyson" ], "guest": "Neil DeGrasse Tyson" }, { "date": "2009-06-30", "videos": [ "http: "http://thecolbertreport.cc.com/videos/hy9hl7/<API key>", "http://thecolbertreport.cc.com/videos/hzd5cg/<API key>", "http://thecolbertreport.cc.com/videos/jzev8y/<API key>-", "http://thecolbertreport.cc.com/videos/knfvfz/<API key>", "http://thecolbertreport.cc.com/videos/8x5ezx/kevin-mattson", "http://thecolbertreport.cc.com/videos/ehxpq9/<API key>" ], "guest": "Alexi Lalas, Kevin Mattson" }, { "date": "2009-07-01", "videos": [ "http: "http://thecolbertreport.cc.com/videos/opbzv4/<API key>", "http://thecolbertreport.cc.com/videos/6wo5t4/the-clinton-curse", "http://thecolbertreport.cc.com/videos/heqh3g/<API key>", "http://thecolbertreport.cc.com/videos/r9zau8/nicholas-kristof", "http://thecolbertreport.cc.com/videos/sldptb/<API key>" ], "guest": "Nicholas Kristof" }, { "date": "2009-07-02", "videos": [ "http: "http://thecolbertreport.cc.com/videos/mc9la4/<API key>", "http://thecolbertreport.cc.com/videos/n31uuy/<API key>", "http://thecolbertreport.cc.com/videos/v5trw8/ed-viesturs", "http://thecolbertreport.cc.com/videos/zc3q4z/<API key>", "http://thecolbertreport.cc.com/videos/sedae1/<API key>", "http://thecolbertreport.cc.com/videos/wyj1b1/<API key>" ], "guest": "Ed Viesturs" }, { "date": "2009-07-13", "videos": [ "http: "http://thecolbertreport.cc.com/videos/m8x1rr/<API key>", "http://thecolbertreport.cc.com/videos/qvijip/paul-krugman", "http://thecolbertreport.cc.com/videos/2wjc98/goodnight" ], "guest": "Paul Rieckhoff, Paul Krugman" }, { "date": "2009-07-14", "videos": [ "http: "http://thecolbertreport.cc.com/videos/17wwbv/<API key>", "http://thecolbertreport.cc.com/videos/o7y2te/leymah-gbowee", "http://thecolbertreport.cc.com/videos/9nhp7n/<API key>", "http://thecolbertreport.cc.com/videos/55a0ws/<API key>", "http://thecolbertreport.cc.com/videos/bfjyjy/<API key>" ], "guest": "Leymah Gbowee" }, { "date": "2009-07-15", "videos": [ "http: "http://thecolbertreport.cc.com/videos/7avxb3/<API key>", "http://thecolbertreport.cc.com/videos/yhsbjx/<API key>", "http://thecolbertreport.cc.com/videos/jkayfy/douglas-rushkoff", "http://thecolbertreport.cc.com/videos/1ikoxj/<API key>", "http://thecolbertreport.cc.com/videos/9vyt62/<API key>", "http://thecolbertreport.cc.com/videos/jb4xw4/<API key>" ], "guest": "Douglas Rushkoff" }, { "date": "2009-07-16", "videos": [ "http: "http://thecolbertreport.cc.com/videos/7pmbq4/the-memy-awards", "http://thecolbertreport.cc.com/videos/3ahlmo/<API key>", "http://thecolbertreport.cc.com/videos/7hp904/edmund-andrews", "http://thecolbertreport.cc.com/videos/1wc2dn/<API key>", "http://thecolbertreport.cc.com/videos/cqz0pq/<API key>" ], "guest": "Edmund Andrews" }, { "date": "2009-07-20", "videos": [ "http://thecolbertreport.cc.com/videos/z5a6bx/<API key>", "http://thecolbertreport.cc.com/videos/0a6zq6/reverse-racism", "http://thecolbertreport.cc.com/videos/wqv2b7/<API key>", "http://thecolbertreport.cc.com/videos/bowvin/bob-park", "http://thecolbertreport.cc.com/videos/x2ppm1/<API key>" ], "guest": "Geoffrey Canada, Bob Park" }, { "date": "2009-07-21", "videos": [ "http: "http://thecolbertreport.cc.com/videos/1egi6s/<API key>", "http://thecolbertreport.cc.com/videos/puckfx/<API key>", "http://thecolbertreport.cc.com/videos/gwtxoo/aaron-carroll", "http://thecolbertreport.cc.com/videos/o84f1o/<API key>", "http://thecolbertreport.cc.com/videos/hmh0yy/<API key>" ], "guest": "Dr. Aaron Carroll" }, { "date": "2009-07-22", "videos": [ "http: "http://thecolbertreport.cc.com/videos/43yfk6/<API key>", "http://thecolbertreport.cc.com/videos/8st941/<API key>", "http://thecolbertreport.cc.com/videos/gda2z2/pope-wrist-watch", "http://thecolbertreport.cc.com/videos/hlljrv/chris-anderson", "http://thecolbertreport.cc.com/videos/tzs7et/<API key>" ], "guest": "Matthew Waxman, Chris Anderson" }, { "date": "2009-07-23", "videos": [ "http://thecolbertreport.cc.com/videos/abmeny/<API key>", "http://thecolbertreport.cc.com/videos/al2ar6/<API key>", "http: "http://thecolbertreport.cc.com/videos/l3lw8t/sniper-trifle", "http://thecolbertreport.cc.com/videos/1y6s8z/<API key>" ], "guest": "Zev Chafets" }, { "date": "2009-07-27", "videos": [ "http: "http://thecolbertreport.cc.com/videos/bx3wyo/<API key>", "http://thecolbertreport.cc.com/videos/5mjokj/<API key>", "http://thecolbertreport.cc.com/videos/c4hocz/movits-" ], "guest": "Movits" }, { "date": "2009-07-28", "videos": [ "http://thecolbertreport.cc.com/videos/nwsa83/<API key>", "http://thecolbertreport.cc.com/videos/574gc1/<API key>", "http://thecolbertreport.cc.com/videos/wg36jw/arianna-huffington", "http://thecolbertreport.cc.com/videos/aayh4c/<API key>", "http: ], "guest": "Arianna Huffington" }, { "date": "2009-07-29", "videos": [ "http: "http://thecolbertreport.cc.com/videos/em0er2/frank-the-roommate", "http://thecolbertreport.cc.com/videos/hw67wd/<API key>", "http://thecolbertreport.cc.com/videos/2dvjk4/kevin-baker", "http://thecolbertreport.cc.com/videos/h00qyf/<API key>", "http://thecolbertreport.cc.com/videos/zafhtu/<API key>" ], "guest": "Kevin Baker" }, { "date": "2009-07-30", "videos": [ "http: "http://thecolbertreport.cc.com/videos/uq6k19/<API key>", "http://thecolbertreport.cc.com/videos/fmie7p/<API key>-", "http://thecolbertreport.cc.com/videos/g75n20/kathryn-bigelow", "http://thecolbertreport.cc.com/videos/2mqpw1/<API key>", "http://thecolbertreport.cc.com/videos/10c870/<API key>" ], "guest": "Kathryn Bigelow" }, { "date": "2009-08-03", "videos": [ "http: "http://thecolbertreport.cc.com/videos/g2s68c/<API key>", "http://thecolbertreport.cc.com/videos/kc14p7/<API key>", "http://thecolbertreport.cc.com/videos/yre45i/tony-zinni", "http://thecolbertreport.cc.com/videos/vv0gs6/<API key>" ], "guest": "Gen. Tony Zinni" }, { "date": "2009-08-04", "videos": [ "http://thecolbertreport.cc.com/videos/2qha08/merry-barackmas", "http://thecolbertreport.cc.com/videos/wyon84/<API key>", "http://thecolbertreport.cc.com/videos/m1d4yt/kurt-andersen", "http://thecolbertreport.cc.com/videos/e8glog/<API key>", "http://thecolbertreport.cc.com/videos/lqp674/<API key>" ], "guest": "Kurt Andersen" }, { "date": "2009-08-05", "videos": [ "http://thecolbertreport.cc.com/videos/dozbxd/<API key>", "http://thecolbertreport.cc.com/videos/pedumk/<API key>", "http://thecolbertreport.cc.com/videos/8s2cpt/kris-kobach", "http://thecolbertreport.cc.com/videos/5f7tro/<API key>", "http://thecolbertreport.cc.com/videos/7wxgsg/<API key>" ], "guest": "Kris Kobach" }, { "date": "2009-08-06", "videos": [ "http: "http://thecolbertreport.cc.com/videos/7qrkub/<API key>", "http://thecolbertreport.cc.com/videos/04qijm/<API key>", "http://thecolbertreport.cc.com/videos/zar0yt/meryl-streep", "http://thecolbertreport.cc.com/videos/diktol/<API key>", "http://thecolbertreport.cc.com/videos/updeyd/human-week" ], "guest": "Meryl Streep" }, { "date": "2009-08-10", "videos": [ "http: "http://thecolbertreport.cc.com/videos/0aiuqk/death-panels", "http://thecolbertreport.cc.com/videos/1d8uxl/<API key>", "http://thecolbertreport.cc.com/videos/klodac/barbara-boxer", "http: ], "guest": "Sen. Barbara Boxer" }, { "date": "2009-08-11", "videos": [ "http: "http://thecolbertreport.cc.com/videos/tq0ixs/<API key>", "http://thecolbertreport.cc.com/videos/kc7xgf/<API key>", "http://thecolbertreport.cc.com/videos/0ivmu5/jonathan-cohn", "http://thecolbertreport.cc.com/videos/9pu9xl/<API key>", "http://thecolbertreport.cc.com/videos/dra60l/<API key>" ], "guest": "Jonathan Cohn" }, { "date": "2009-08-12", "videos": [ "http: "http://thecolbertreport.cc.com/videos/cypmfk/<API key>", "http://thecolbertreport.cc.com/videos/5esjcx/<API key>", "http://thecolbertreport.cc.com/videos/53n2qf/mark-johnson", "http://thecolbertreport.cc.com/videos/j153gh/<API key>" ], "guest": "Mark Johnson" }, { "date": "2009-08-13", "videos": [ "http: "http://thecolbertreport.cc.com/videos/d9wypw/<API key>", "http://thecolbertreport.cc.com/videos/1fblyv/<API key>", "http://thecolbertreport.cc.com/videos/pfw8xc/mark-devlin", "http://thecolbertreport.cc.com/videos/xagarl/<API key>", "http://thecolbertreport.cc.com/videos/8bsp4q/<API key>" ], "guest": "Mark Devlin" }, { "date": "2009-08-17", "videos": [ "http: "http://thecolbertreport.cc.com/videos/54nh4d/<API key>", "http://thecolbertreport.cc.com/videos/xe1vuk/<API key>", "http://thecolbertreport.cc.com/videos/p4m942/bill-mckibben", "http://thecolbertreport.cc.com/videos/rasuqa/<API key>" ], "guest": "Bill McKibben" }, { "date": "2009-08-18", "videos": [ "http: "http://thecolbertreport.cc.com/videos/wu0pjh/<API key>", "http://thecolbertreport.cc.com/videos/z3d9c9/<API key>", "http://thecolbertreport.cc.com/videos/xjhfzn/robert-wright", "http://thecolbertreport.cc.com/videos/nw5bk3/sign-off--shofar", "http://thecolbertreport.cc.com/videos/79rlpw/<API key>" ], "guest": "Robert Wright" }, { "date": "2009-08-19", "videos": [ "http://thecolbertreport.cc.com/videos/eu5hos/<API key>", "http://thecolbertreport.cc.com/videos/f6lol5/<API key>", "http://thecolbertreport.cc.com/videos/ckefur/ang-lee", "http://thecolbertreport.cc.com/videos/qwyqmu/<API key>", "http://thecolbertreport.cc.com/videos/jrwpha/<API key>" ], "guest": "Ang Lee" }, { "date": "2009-08-20", "videos": [ "http: "http://thecolbertreport.cc.com/videos/bgxuqk/<API key>", "http://thecolbertreport.cc.com/videos/ho2y6d/<API key>", "http://thecolbertreport.cc.com/videos/3muzmh/chris-matthews", "http://thecolbertreport.cc.com/videos/gv0u6s/<API key>", "http://thecolbertreport.cc.com/videos/k1zrq2/<API key>" ], "guest": "Chris Matthews" }, { "date": "2009-09-14", "videos": [ "http: "http://thecolbertreport.cc.com/videos/npiiku/<API key>", "http://thecolbertreport.cc.com/videos/ehltxr/<API key>", "http://thecolbertreport.cc.com/videos/ljbubg/cory-booker", "http://thecolbertreport.cc.com/videos/4kq9de/<API key>" ], "guest": "Cory Booker" }, { "date": "2009-09-15", "videos": [ "http://thecolbertreport.cc.com/videos/drgqxg/<API key>", "http://thecolbertreport.cc.com/videos/c9v1s6/<API key>", "http://thecolbertreport.cc.com/videos/qm9oq3/christiane-amanpour", "http://thecolbertreport.cc.com/videos/tcjp92/<API key>", "http://thecolbertreport.cc.com/videos/hen1ip/<API key>" ], "guest": "Christiane Amanpour" }, { "date": "2009-09-16", "videos": [ "http: "http://thecolbertreport.cc.com/videos/dp3jiw/<API key>", "http://thecolbertreport.cc.com/videos/p1ugzo/figgy-moonpowder", "http://thecolbertreport.cc.com/videos/1642tt/wayne-coyne", "http://thecolbertreport.cc.com/videos/pafbhp/<API key>" ], "guest": "The Flaming Lips" }, { "date": "2009-09-17", "videos": [ "http://thecolbertreport.cc.com/videos/oclyoo/goat-lab", "http://thecolbertreport.cc.com/videos/5psdx6/<API key>", "http://thecolbertreport.cc.com/videos/3zmd8j/frank-bruni", "http://thecolbertreport.cc.com/videos/xl4dp2/<API key>" ], "guest": "Frank Bruni" }, { "date": "2009-09-22", "videos": [ "http: "http://thecolbertreport.cc.com/videos/brwe58/<API key>", "http://thecolbertreport.cc.com/videos/h3pbsv/<API key>", "http://thecolbertreport.cc.com/videos/oqiy0y/shai-agassi", "http://thecolbertreport.cc.com/videos/zxvw0a/<API key>" ], "guest": "Shai Agassi" }, { "date": "2009-09-23", "videos": [ "http://thecolbertreport.cc.com/videos/epco4o/<API key>", "http://thecolbertreport.cc.com/videos/xtts8p/<API key>", "http://thecolbertreport.cc.com/videos/hwx2pv/aj-jacobs", "http://thecolbertreport.cc.com/videos/8ch7no/<API key>", "http://thecolbertreport.cc.com/videos/npdo9z/<API key>" ], "guest": "Michael Moore, A.J. Jacobs" }, { "date": "2009-09-24", "videos": [ "http: "http://thecolbertreport.cc.com/videos/srdbkv/<API key>", "http://thecolbertreport.cc.com/videos/f4xrhk/<API key>", "http://thecolbertreport.cc.com/videos/xqer72/ken-burns", "http://thecolbertreport.cc.com/videos/cqqzqe/<API key>", "http://thecolbertreport.cc.com/videos/rh4p4f/<API key>" ], "guest": "Ken Burns" }, { "date": "2009-09-28", "videos": [ "http://thecolbertreport.cc.com/videos/ph4cw3/<API key>", "http://thecolbertreport.cc.com/videos/89wc6t/do--dump-or-marry", "http://thecolbertreport.cc.com/videos/r9at2m/sheryl-wudunn", "http://thecolbertreport.cc.com/videos/wsefin/<API key>" ], "guest": "Sheryl WuDunn" }, { "date": "2009-09-29", "videos": [ "http: "http://thecolbertreport.cc.com/videos/4bcajc/spider-pope", "http://thecolbertreport.cc.com/videos/22jcm5/<API key>", "http://thecolbertreport.cc.com/videos/03ei16/matt-latimer", "http://thecolbertreport.cc.com/videos/7bmnxg/<API key>", "http://thecolbertreport.cc.com/videos/ph4cw3/<API key>" ], "guest": "Matt Latimer" }, { "date": "2009-09-30", "videos": [ "http: "http://thecolbertreport.cc.com/videos/rrbojv/<API key>", "http://thecolbertreport.cc.com/videos/m2yjay/a-pace-odyssey", "http://thecolbertreport.cc.com/videos/jhrv69/richard-dawkins", "http://thecolbertreport.cc.com/videos/t5u4g8/<API key>", "http://thecolbertreport.cc.com/videos/kf4xf5/<API key>" ], "guest": "Richard Dawkins" }, { "date": "2009-10-01", "videos": [ "http://thecolbertreport.cc.com/videos/wlav1v/<API key>", "http://thecolbertreport.cc.com/videos/6dv0jz/<API key>", "http://thecolbertreport.cc.com/videos/zxuz0a/francis-collins", "http://thecolbertreport.cc.com/videos/q9o9qv/<API key>", "http://thecolbertreport.cc.com/videos/91s6ka/<API key>" ], "guest": "George Wendt, Dr. Francis Collins" }, { "date": "2009-10-05", "videos": [ "http: "http://thecolbertreport.cc.com/videos/7yi77e/<API key>", "http://thecolbertreport.cc.com/videos/k8e7bl/<API key>", "http://thecolbertreport.cc.com/videos/wfl2if/arne-duncan", "http://thecolbertreport.cc.com/videos/d1uxmt/<API key>" ], "guest": "Arne Duncan" }, { "date": "2009-10-06", "videos": [ "http://thecolbertreport.cc.com/videos/lomf6q/<API key>", "http://thecolbertreport.cc.com/videos/7060r2/<API key>", "http://thecolbertreport.cc.com/videos/yz886x/john-darnielle", "http://thecolbertreport.cc.com/videos/58l1kv/<API key>" ], "guest": "Lara Logan, the Mountain Goats" }, { "date": "2009-10-07", "videos": [ "http: "http://thecolbertreport.cc.com/videos/p6tyac/<API key>", "http://thecolbertreport.cc.com/videos/i1e7h0/<API key>", "http://thecolbertreport.cc.com/videos/59gyno/alison-gopnik", "http://thecolbertreport.cc.com/videos/9ergzb/<API key>", "http://thecolbertreport.cc.com/videos/qm22ls/<API key>" ], "guest": "Alison Gopnik" }, { "date": "2009-10-08", "videos": [ "http: "http://thecolbertreport.cc.com/videos/u1v1j7/<API key>", "http://thecolbertreport.cc.com/videos/jigfye/<API key>", "http://thecolbertreport.cc.com/videos/ih4ouf/colin-beavan", "http://thecolbertreport.cc.com/videos/7t5ve1/<API key>", "http://thecolbertreport.cc.com/videos/81wvda/<API key>" ], "guest": "Colin Beavan" }, { "date": "2009-10-12", "videos": [ "http: "http://thecolbertreport.cc.com/videos/xiuiwd/happy-columbus-day", "http://thecolbertreport.cc.com/videos/vnmcv0/<API key>", "http://thecolbertreport.cc.com/videos/2ko3eq/sanjay-gupta", "http://thecolbertreport.cc.com/videos/izp5gd/<API key>" ], "guest": "Shashi Tharoor, Dr. Sanjay Gupta" }, { "date": "2009-10-13", "videos": [ "http: "http://thecolbertreport.cc.com/videos/4cco61/<API key>", "http://thecolbertreport.cc.com/videos/7jpek6/<API key>", "http://thecolbertreport.cc.com/videos/s52xb5/sylvia-earle", "http: "http://thecolbertreport.cc.com/videos/l4n6tb/<API key>" ], "guest": "David Javerbaum, Sylvia Earle" }, { "date": "2009-10-14", "videos": [ "http://thecolbertreport.cc.com/videos/g6skj6/<API key>", "http://thecolbertreport.cc.com/videos/3copn0/<API key>", "http://thecolbertreport.cc.com/videos/ljym9p/the-rza", "http://thecolbertreport.cc.com/videos/wijvgm/<API key>", "http://thecolbertreport.cc.com/videos/m5y3ox/<API key>" ], "guest": "Amy Farrell, The RZA" }, { "date": "2009-10-15", "videos": [ "http: "http://thecolbertreport.cc.com/videos/0a133r/the-money-shot", "http://thecolbertreport.cc.com/videos/8xmsj4/<API key>", "http://thecolbertreport.cc.com/videos/7s45sd/jerry-mitchell", "http://thecolbertreport.cc.com/videos/sgqznj/<API key>", "http://thecolbertreport.cc.com/videos/ubn9ao/<API key>" ], "guest": "Jerry Mitchell" }, { "date": "2009-10-26", "videos": [ "http://thecolbertreport.cc.com/videos/4srpg9/<API key>", "http://thecolbertreport.cc.com/videos/gy6tin/<API key>", "http://thecolbertreport.cc.com/videos/xhz2mw/cornel-west", "http://thecolbertreport.cc.com/videos/2onypd/<API key>" ], "guest": "Cornel West" }, { "date": "2009-10-27", "videos": [ "http: "http://thecolbertreport.cc.com/videos/3f3ssx/<API key>", "http://thecolbertreport.cc.com/videos/wtcyjy/<API key>", "http://thecolbertreport.cc.com/videos/8c9hx0/gail-collins", "http://thecolbertreport.cc.com/videos/plvf84/<API key>-", "http://thecolbertreport.cc.com/videos/liq1p2/<API key>", "http://thecolbertreport.cc.com/videos/dtlk2w/<API key>" ], "guest": "Randall Balmer, Gail Collins" }, { "date": "2009-10-28", "videos": [ "http: "http://thecolbertreport.cc.com/videos/qvcosm/<API key>", "http://thecolbertreport.cc.com/videos/1r96o8/big-bang-theory", "http://thecolbertreport.cc.com/videos/3r9su2/brian-cox", "http://thecolbertreport.cc.com/videos/bzrvnc/<API key>", "http://thecolbertreport.cc.com/videos/1va17m/<API key>" ], "guest": "Brian Cox" }, { "date": "2009-10-29", "videos": [ "http: "http://thecolbertreport.cc.com/videos/yl6xd1/<API key>", "http://thecolbertreport.cc.com/videos/al6ssq/<API key>", "http://thecolbertreport.cc.com/videos/ku01px/bill-simmons", "http://thecolbertreport.cc.com/videos/xalyef/<API key>", "http://thecolbertreport.cc.com/videos/w56skk/<API key>" ], "guest": "Rosanne Cash, Bill Simmons" }, { "date": "2009-11-02", "videos": [ "http: "http://thecolbertreport.cc.com/videos/uke17x/used-karzai", "http://thecolbertreport.cc.com/videos/uxgb9s/<API key>", "http://thecolbertreport.cc.com/videos/t62cji/nicholas-thompson", "http://thecolbertreport.cc.com/videos/7g9pgn/<API key>" ], "guest": "Nicholas Thompson" }, { "date": "2009-11-03", "videos": [ "http: "http://thecolbertreport.cc.com/videos/zbi6j6/<API key>", "http://thecolbertreport.cc.com/videos/olb2ep/<API key>", "http://thecolbertreport.cc.com/videos/qdk21v/andrew-sullivan", "http://thecolbertreport.cc.com/videos/sqdke8/<API key>", "http://thecolbertreport.cc.com/videos/b7il1x/<API key>" ], "guest": "Andrew Sullivan" }, { "date": "2009-11-04", "videos": [ "http: "http://thecolbertreport.cc.com/videos/hzm3ur/-<API key>", "http://thecolbertreport.cc.com/videos/src597/<API key>", "http://thecolbertreport.cc.com/videos/lkkq9m/harold-evans", "http://thecolbertreport.cc.com/videos/64ucdo/<API key>", "http://thecolbertreport.cc.com/videos/ol1mvi/<API key>" ], "guest": "Harold Evans" }, { "date": "2009-11-05", "videos": [ "http: "http://thecolbertreport.cc.com/videos/i7dq6q/guy-fawkers", "http://thecolbertreport.cc.com/videos/6vac7m/<API key>", "http://thecolbertreport.cc.com/videos/cj1lqu/william-bratton", "http://thecolbertreport.cc.com/videos/6e51a0/<API key>", "http://thecolbertreport.cc.com/videos/hnu3dh/<API key>" ], "guest": "Joey Cheek, Chief William Bratton" }, { "date": "2009-11-09", "videos": [ "http: "http://thecolbertreport.cc.com/videos/zhrahz/trouble--coverage", "http://thecolbertreport.cc.com/videos/uaeaom/<API key>", "http://thecolbertreport.cc.com/videos/62flai/thomas-campbell", "http://thecolbertreport.cc.com/videos/5hgk8f/<API key>" ], "guest": "Thomas Campbell" }, { "date": "2009-11-10", "videos": [ "http: "http://thecolbertreport.cc.com/videos/bpec5m/<API key>", "http://thecolbertreport.cc.com/videos/476wty/maria-shriver", "http://thecolbertreport.cc.com/videos/rl73xb/<API key>", "http://thecolbertreport.cc.com/videos/ocuoqq/<API key>", "http://thecolbertreport.cc.com/videos/i4pgl0/<API key>" ], "guest": "Maria Shriver" }, { "date": "2009-11-11", "videos": [ "http: "http://thecolbertreport.cc.com/videos/d3hhgz/<API key>", "http://thecolbertreport.cc.com/videos/1al5v4/<API key>", "http://thecolbertreport.cc.com/videos/p4wqld/<API key>", "http://thecolbertreport.cc.com/videos/xp7fig/<API key>", "http://thecolbertreport.cc.com/videos/2vmljd/<API key>" ], "guest": "Christopher Caldwell" }, { "date": "2009-11-12", "videos": [ "http: "http://thecolbertreport.cc.com/videos/cnw6wz/<API key>", "http://thecolbertreport.cc.com/videos/ips2v8/<API key>", "http://thecolbertreport.cc.com/videos/2k90o4/<API key>", "http://thecolbertreport.cc.com/videos/1yilwm/woody-harrelson", "http://thecolbertreport.cc.com/videos/l85kiv/grover-the-hill" ], "guest": "Woody Harrelson" }, { "date": "2009-11-16", "videos": [ "http: "http://thecolbertreport.cc.com/videos/8ggl86/<API key>", "http://thecolbertreport.cc.com/videos/xgze85/<API key>", "http://thecolbertreport.cc.com/videos/6einjp/paul-goldberger", "http://thecolbertreport.cc.com/videos/i42i9t/<API key>" ], "guest": "Paul Goldberger" }, { "date": "2009-11-17", "videos": [ "http: "http://thecolbertreport.cc.com/videos/z1cr8v/<API key>", "http://thecolbertreport.cc.com/videos/ij8d04/malcolm-gladwell", "http://thecolbertreport.cc.com/videos/w71om6/<API key>", "http://thecolbertreport.cc.com/videos/mwjf6e/<API key>" ], "guest": "Malcolm Gladwell" }, { "date": "2009-11-18", "videos": [ "http: "http://thecolbertreport.cc.com/videos/odu5xx/<API key>", "http://thecolbertreport.cc.com/videos/cuhtda/<API key>", "http://thecolbertreport.cc.com/videos/ah5dzo/norah-jones", "http://thecolbertreport.cc.com/videos/1vm4fs/<API key>", "http://thecolbertreport.cc.com/videos/udd9qu/<API key>", "http://thecolbertreport.cc.com/videos/p8c7xo/<API key>" ], "guest": "Norah Jones" }, { "date": "2009-11-19", "videos": [ "http://thecolbertreport.cc.com/videos/6iz54h/<API key>", "http://thecolbertreport.cc.com/videos/4tmz49/<API key>", "http://thecolbertreport.cc.com/videos/zy3jiq/<API key>", "http://thecolbertreport.cc.com/videos/tf53hs/<API key>" ], "guest": "John Pike, Elvis Costello" }, { "date": "2009-11-30", "videos": [ "http: "http://thecolbertreport.cc.com/videos/qljewq/<API key>", "http://thecolbertreport.cc.com/videos/ahhfo9/<API key>", "http://thecolbertreport.cc.com/videos/ec0x55/cevin-soling", "http://thecolbertreport.cc.com/videos/53k9co/<API key>" ], "guest": "Dan Esty, Cevin Soling" }, { "date": "2009-12-01", "videos": [ "http: "http://thecolbertreport.cc.com/videos/fj2x2m/<API key>", "http://thecolbertreport.cc.com/videos/zwjey6/<API key>", "http://thecolbertreport.cc.com/videos/s6mur0/sherman-alexie", "http://thecolbertreport.cc.com/videos/km8wtf/<API key>", "http://thecolbertreport.cc.com/videos/bohr52/<API key>" ], "guest": "Guy Consolmagno, Sherman Alexie" }, { "date": "2009-12-02", "videos": [ "http: "http://thecolbertreport.cc.com/videos/yvq647/deployment-figures", "http://thecolbertreport.cc.com/videos/et6ksb/craig-watkins", "http://thecolbertreport.cc.com/videos/cyylc0/<API key>", "http://thecolbertreport.cc.com/videos/ndi826/<API key>" ], "guest": "Craig Watkins" }, { "date": "2009-12-03", "videos": [ "http://thecolbertreport.cc.com/videos/qrqaja/<API key>", "http: "http://thecolbertreport.cc.com/videos/knxrx6/tiger-s-tale", "http://thecolbertreport.cc.com/videos/hw80nv/<API key>", "http://thecolbertreport.cc.com/videos/heye88/janet-napolitano", "http://thecolbertreport.cc.com/videos/dy9y1l/<API key>", "http://thecolbertreport.cc.com/videos/qx8k9b/<API key>" ], "guest": "Sec. Janet Napolitano" }, { "date": "2009-12-07", "videos": [ "http: "http://thecolbertreport.cc.com/videos/l9wksx/<API key>", "http://thecolbertreport.cc.com/videos/t0b3f4/<API key>", "http://thecolbertreport.cc.com/videos/pgp8y2/bill-t--jones" ], "guest": "Bill T. Jones, a performance by the cast of \"Fela\"" }, { "date": "2009-12-08", "videos": [ "http: "http://thecolbertreport.cc.com/videos/0y3uce/<API key>", "http://thecolbertreport.cc.com/videos/gcu1ou/<API key>", "http://thecolbertreport.cc.com/videos/9o2lyz/andy-schlafly", "http://thecolbertreport.cc.com/videos/2v1vhb/<API key>", "http://thecolbertreport.cc.com/videos/w4zn3p/<API key>" ], "guest": "Sen. Bernie Sanders, Andy Schlafly" }, { "date": "2009-12-09", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ckek7p/<API key>", "http://thecolbertreport.cc.com/videos/h3kb0s/<API key>", "http://thecolbertreport.cc.com/videos/is6uvv/matt-taibbi", "http://thecolbertreport.cc.com/videos/mlp3y1/<API key>", "http://thecolbertreport.cc.com/videos/2l8p98/fed-s-dead" ], "guest": "Matt Taibbi" }, { "date": "2009-12-10", "videos": [ "http://thecolbertreport.cc.com/videos/03g0d5/<API key>", "http://thecolbertreport.cc.com/videos/zivscx/<API key>", "http://thecolbertreport.cc.com/videos/hjnxot/lara-logan", "http://thecolbertreport.cc.com/videos/y74r8f/<API key>", "http://thecolbertreport.cc.com/videos/2jc7dn/<API key>" ], "guest": "Lara Logan" }, { "date": "2009-12-14", "videos": [ "http: "http://thecolbertreport.cc.com/videos/9wxgc9/<API key>", "http://thecolbertreport.cc.com/videos/t1tsns/<API key>", "http://thecolbertreport.cc.com/videos/vt4qtf/snoop-dogg" ], "guest": "Katherine Reutter, Snoop Dogg" }, { "date": "2009-12-15", "videos": [ "http: "http://thecolbertreport.cc.com/videos/3plx6x/<API key>", "http://thecolbertreport.cc.com/videos/10vyk2/<API key>", "http://thecolbertreport.cc.com/videos/i16cci/alicia-keys", "http://thecolbertreport.cc.com/videos/qn15hk/<API key>", "http://thecolbertreport.cc.com/videos/u5g55p/<API key>" ], "guest": "Alicia Keys" }, { "date": "2009-12-16", "videos": [ "http://thecolbertreport.cc.com/videos/ozgmuy/<API key>", "http://thecolbertreport.cc.com/videos/4jdam2/<API key>", "http://thecolbertreport.cc.com/videos/bjlb37/tom-brokaw", "http://thecolbertreport.cc.com/videos/q9eqq1/<API key>", "http://thecolbertreport.cc.com/videos/ufq6qh/<API key>" ], "guest": "Tom Brokaw" } ], "2010": [ { "date": "2010-01-04", "videos": [ "http://thecolbertreport.cc.com/videos/a6c63f/<API key>", "http://thecolbertreport.cc.com/videos/qr3067/<API key>", "http://thecolbertreport.cc.com/videos/ca8z2z/<API key>", "http://thecolbertreport.cc.com/videos/hospuh/<API key>", "http://thecolbertreport.cc.com/videos/bqki32/<API key>", "http://thecolbertreport.cc.com/videos/ytow3n/<API key>" ], "guest": "Erick Erickson" }, { "date": "2010-01-05", "videos": [ "http: "http://thecolbertreport.cc.com/videos/qomtkk/<API key>", "http://thecolbertreport.cc.com/videos/ywy8j4/<API key>", "http://thecolbertreport.cc.com/videos/s2n141/<API key>", "http://thecolbertreport.cc.com/videos/t3fpvm/<API key>", "http://thecolbertreport.cc.com/videos/r8x6ag/riley-crane", "http://thecolbertreport.cc.com/videos/doe1xo/<API key>" ], "guest": "Riley Crane" }, { "date": "2010-01-06", "videos": [ "http: "http://thecolbertreport.cc.com/videos/u584e6/<API key>", "http://thecolbertreport.cc.com/videos/g2gimh/<API key>", "http://thecolbertreport.cc.com/videos/h3mxst/<API key>", "http://thecolbertreport.cc.com/videos/4cd9bx/charles-moore", "http://thecolbertreport.cc.com/videos/elm4s5/<API key>" ], "guest": "Capt. Charles Moore" }, { "date": "2010-01-07", "videos": [ "http: "http://thecolbertreport.cc.com/videos/f2zb2u/<API key>", "http://thecolbertreport.cc.com/videos/z3kdhi/<API key>", "http://thecolbertreport.cc.com/videos/wi0ong/<API key>", "http://thecolbertreport.cc.com/videos/c3suh9/james-fowler", "http://thecolbertreport.cc.com/videos/tso1cs/<API key>" ], "guest": "Barry Scheck, James Fowler" }, { "date": "2010-01-11", "videos": [ "http://thecolbertreport.cc.com/videos/xptxw6/<API key>", "http://thecolbertreport.cc.com/videos/3s1wqs/<API key>", "http://thecolbertreport.cc.com/videos/y47i8f/<API key>", "http://thecolbertreport.cc.com/videos/4q61kj/morgan-freeman", "http://thecolbertreport.cc.com/videos/8e60wq/<API key>" ], "guest": "Eugene Jarecki, Morgan Freeman" }, { "date": "2010-01-12", "videos": [ "http: "http://thecolbertreport.cc.com/videos/7qig8p/<API key>", "http://thecolbertreport.cc.com/videos/8ln9tv/<API key>", "http://thecolbertreport.cc.com/videos/7jfkm7/raj-patel" ], "guest": "Raj Patel" }, { "date": "2010-01-13", "videos": [ "http: "http://thecolbertreport.cc.com/videos/34mknq/game-change-gossip", "http://thecolbertreport.cc.com/videos/kwpeqs/<API key>", "http://thecolbertreport.cc.com/videos/t39jgx/<API key>", "http://thecolbertreport.cc.com/videos/1xyrig/john-heilemann", "http://thecolbertreport.cc.com/videos/erf677/<API key>" ], "guest": "John Heilemann" }, { "date": "2010-01-14", "videos": [ "http: "http://thecolbertreport.cc.com/videos/dbcboq/watercressgate", "http://thecolbertreport.cc.com/videos/et1vio/<API key>", "http://thecolbertreport.cc.com/videos/7owg19/<API key>", "http://thecolbertreport.cc.com/videos/gqd029/kathleen-sebelius", "http://thecolbertreport.cc.com/videos/afqd2o/<API key>" ], "guest": "Kathleen Sebelius" }, { "date": "2010-01-18", "videos": [ "http: "http://thecolbertreport.cc.com/videos/uqolbx/<API key>", "http://thecolbertreport.cc.com/videos/6s93dq/<API key>", "http://thecolbertreport.cc.com/videos/2kgg0x/<API key>", "http://thecolbertreport.cc.com/videos/r6fzoi/emily-pilloton", "http://thecolbertreport.cc.com/videos/47fs6h/<API key>" ], "guest": "Dr. Margaret Palmer, Emily Pilloton" }, { "date": "2010-01-19", "videos": [ "http: "http://thecolbertreport.cc.com/videos/9t5rlw/<API key>", "http://thecolbertreport.cc.com/videos/eseeb0/<API key>", "http://thecolbertreport.cc.com/videos/nw0obk/<API key>", "http://thecolbertreport.cc.com/videos/wljw31/stephen-bosworth", "http://thecolbertreport.cc.com/videos/5zz1m5/<API key>" ], "guest": "Amb. Stephen Bosworth" }, { "date": "2010-01-20", "videos": [ "http: "http://thecolbertreport.cc.com/videos/9fshqm/boston-dream-guy", "http://thecolbertreport.cc.com/videos/h7cxuq/<API key>", "http://thecolbertreport.cc.com/videos/r0fs08/<API key>", "http://thecolbertreport.cc.com/videos/9qoq3s/dick-ebersol", "http://thecolbertreport.cc.com/videos/ekjbd1/<API key>" ], "guest": "Dick Ebersol" }, { "date": "2010-01-21", "videos": [ "http: "http://thecolbertreport.cc.com/videos/a891l1/<API key>", "http://thecolbertreport.cc.com/videos/3t1wu4/<API key>", "http://thecolbertreport.cc.com/videos/61faxb/<API key>", "http://thecolbertreport.cc.com/videos/fqdy69/<API key>", "http://thecolbertreport.cc.com/videos/nchr4z/john-farmer", "http://thecolbertreport.cc.com/videos/ngpu7c/<API key>" ], "guest": "John Farmer" }, { "date": "2010-01-25", "videos": [ "http: "http://thecolbertreport.cc.com/videos/2i26ye/<API key>", "http://thecolbertreport.cc.com/videos/iyaiyz/<API key>", "http://thecolbertreport.cc.com/videos/fgn6yx/<API key>-", "http://thecolbertreport.cc.com/videos/y99wku/kati-marton", "http://thecolbertreport.cc.com/videos/6u56ui/<API key>" ], "guest": "Kati Marton" }, { "date": "2010-01-26", "videos": [ "http://thecolbertreport.cc.com/videos/8ukd1u/<API key>", "http://thecolbertreport.cc.com/videos/1qu3mj/<API key>", "http://thecolbertreport.cc.com/videos/4cv6sy/<API key>", "http://thecolbertreport.cc.com/videos/t59ksv/mika-brzezinski", "http://thecolbertreport.cc.com/videos/oz7mss/<API key>" ], "guest": "Paul Begala, Mika Brzezinski" }, { "date": "2010-01-27", "videos": [ "http: "http://thecolbertreport.cc.com/videos/69904a/<API key>", "http://thecolbertreport.cc.com/videos/99bavp/<API key>", "http://thecolbertreport.cc.com/videos/9hb7jh/<API key>", "http://thecolbertreport.cc.com/videos/suw63r/arthur-benjamin", "http://thecolbertreport.cc.com/videos/iljqkj/<API key>" ], "guest": "Arthur Benjamin" }, { "date": "2010-01-28", "videos": [ "http://thecolbertreport.cc.com/videos/pg6y12/<API key>", "http://thecolbertreport.cc.com/videos/lnaqfo/david-gergen", "http://thecolbertreport.cc.com/videos/jsxv0a/<API key>", "http://thecolbertreport.cc.com/videos/xebsoq/<API key>" ], "guest": "David Gergen" }, { "date": "2010-02-01", "videos": [ "http://thecolbertreport.cc.com/videos/pg94s5/<API key>", "http://thecolbertreport.cc.com/videos/2n1vl2/<API key>", "http://thecolbertreport.cc.com/videos/k0hjb1/harold-ford-jr-", "http: ], "guest": "Nicole Detling Miller, Jessica Smith, Harold Ford Jr." }, { "date": "2010-02-02", "videos": [ "http: "http://thecolbertreport.cc.com/videos/idx9j1/<API key>", "http://thecolbertreport.cc.com/videos/2ffk5q/<API key>", "http://thecolbertreport.cc.com/videos/0xtws0/eliot-spitzer", "http://thecolbertreport.cc.com/videos/wfnsyt/<API key>" ], "guest": "Eliot Spitzer" }, { "date": "2010-02-03", "videos": [ "http: "http://thecolbertreport.cc.com/videos/4nj8ql/<API key>", "http://thecolbertreport.cc.com/videos/5iocp5/job-man-caravan", "http://thecolbertreport.cc.com/videos/sysu7h/<API key>", "http://thecolbertreport.cc.com/videos/t6rlnb/john-durant", "http://thecolbertreport.cc.com/videos/s0494z/<API key>" ], "guest": "Peter Cove, John Durant" }, { "date": "2010-02-04", "videos": [ "http: "http://thecolbertreport.cc.com/videos/qkvdcs/<API key>", "http://thecolbertreport.cc.com/videos/qqtebr/<API key>", "http://thecolbertreport.cc.com/videos/6a6j6j/<API key>", "http://thecolbertreport.cc.com/videos/sm98y8/<API key>-", "http://thecolbertreport.cc.com/videos/bsgq92/<API key>" ], "guest": "Henry Louis Gates" }, { "date": "2010-02-08", "videos": [ "http://thecolbertreport.cc.com/videos/ek3awf/<API key>", "http://thecolbertreport.cc.com/videos/52kgrq/<API key>", "http://thecolbertreport.cc.com/videos/2idiz7/<API key>", "http://thecolbertreport.cc.com/videos/mtoffp/<API key>", "http://thecolbertreport.cc.com/videos/xdafq2/<API key>", "http://thecolbertreport.cc.com/videos/r5okcx/<API key>" ], "guest": "Jonathan Safran Foer" }, { "date": "2010-02-09", "videos": [ "http://thecolbertreport.cc.com/videos/msydxm/<API key>", "http://thecolbertreport.cc.com/videos/s5t5z4/<API key>", "http://thecolbertreport.cc.com/videos/nwoc1b/<API key>", "http://thecolbertreport.cc.com/videos/884juj/<API key>", "http://thecolbertreport.cc.com/videos/uao9dj/<API key>", "http://thecolbertreport.cc.com/videos/zcybb6/<API key>" ], "guest": "George Stephanopoulos" }, { "date": "2010-02-10", "videos": [ "http://thecolbertreport.cc.com/videos/ka4dxt/<API key>", "http: "http://thecolbertreport.cc.com/videos/br6hwk/<API key>", "http://thecolbertreport.cc.com/videos/cu5mso/<API key>", "http://thecolbertreport.cc.com/videos/3752v8/<API key>", "http://thecolbertreport.cc.com/videos/34z9mm/claire-danes", "http://thecolbertreport.cc.com/videos/f2whru/<API key>" ], "guest": "Claire Danes" }, { "date": "2010-02-11", "videos": [ "http://thecolbertreport.cc.com/videos/eyfb9f/<API key>", "http://thecolbertreport.cc.com/videos/65cpdn/<API key>", "http://thecolbertreport.cc.com/videos/n5w4fs/<API key>", "http://thecolbertreport.cc.com/videos/li6roe/<API key>", "http://thecolbertreport.cc.com/videos/s9qfmt/david-ross", "http://thecolbertreport.cc.com/videos/qbth0f/<API key>" ], "guest": "Al Michaels, David Ross" }, { "date": "2010-02-22", "videos": [ "http://thecolbertreport.cc.com/videos/jvyagn/<API key>", "http: "http://thecolbertreport.cc.com/videos/racwcb/<API key>", "http://thecolbertreport.cc.com/videos/tzovg4/<API key>", "http://thecolbertreport.cc.com/videos/5l4d9t/<API key>", "http://thecolbertreport.cc.com/videos/gg3l88/shaun-white", "http://thecolbertreport.cc.com/videos/iohppn/<API key>" ], "guest": "Shaun White" }, { "date": "2010-02-23", "videos": [ "http://thecolbertreport.cc.com/videos/iar6l3/<API key>", "http://thecolbertreport.cc.com/videos/us6yyq/<API key>", "http://thecolbertreport.cc.com/videos/1ftd3s/<API key>", "http://thecolbertreport.cc.com/videos/yd5amw/bob-costas", "http://thecolbertreport.cc.com/videos/4vx1ll/<API key>" ], "guest": "Lindsey Vonn, Bob Costas" }, { "date": "2010-02-24", "videos": [ "http://thecolbertreport.cc.com/videos/j11loy/<API key>", "http://thecolbertreport.cc.com/videos/eom1sq/<API key>", "http://thecolbertreport.cc.com/videos/8olwnj/<API key>", "http://thecolbertreport.cc.com/videos/l0ax8q/<API key>", "http://thecolbertreport.cc.com/videos/php8ta/<API key>", "http://thecolbertreport.cc.com/videos/mrk7jd/<API key>", "http://thecolbertreport.cc.com/videos/7u3h32/<API key>", "http://thecolbertreport.cc.com/videos/ampazf/<API key>" ], "guest": "Scott Hamilton, Jeret Peterson, Ryan St. Onge" }, { "date": "2010-02-25", "videos": [ "http://thecolbertreport.cc.com/videos/i93x4n/<API key>", "http: "http://thecolbertreport.cc.com/videos/jy3odd/<API key>", "http://thecolbertreport.cc.com/videos/zoz0j2/<API key>", "http://thecolbertreport.cc.com/videos/iactcg/<API key>", "http://thecolbertreport.cc.com/videos/j2htnd/seth-wescott", "http://thecolbertreport.cc.com/videos/2pub5y/<API key>" ], "guest": "Shani Davis, Seth Wescott" }, { "date": "2010-03-01", "videos": [ "http://thecolbertreport.cc.com/videos/r61kzy/<API key>", "http://thecolbertreport.cc.com/videos/z9bfu8/<API key>", "http://thecolbertreport.cc.com/videos/4nmlgo/<API key>", "http://thecolbertreport.cc.com/videos/6qwf52/<API key>", "http://thecolbertreport.cc.com/videos/ncbadn/don-cheadle", "http://thecolbertreport.cc.com/videos/zbx22j/<API key>" ], "guest": "Don Cheadle" }, { "date": "2010-03-02", "videos": [ "http: "http://thecolbertreport.cc.com/videos/wa48j7/<API key>", "http: "http://thecolbertreport.cc.com/videos/odsatp/<API key>", "http://thecolbertreport.cc.com/videos/cc44qu/david-brooks", "http://thecolbertreport.cc.com/videos/ci6g0d/<API key>" ], "guest": "David Brooks" }, { "date": "2010-03-03", "videos": [ "http://thecolbertreport.cc.com/videos/srp7ci/<API key>", "http://thecolbertreport.cc.com/videos/37u7lc/<API key>", "http://thecolbertreport.cc.com/videos/elhxu1/<API key>", "http://thecolbertreport.cc.com/videos/m631tw/garry-wills", "http://thecolbertreport.cc.com/videos/d3nhmb/<API key>" ], "guest": "Scheherazade Rehman, Garry Wills" }, { "date": "2010-03-04", "videos": [ "http://thecolbertreport.cc.com/videos/lfv3jf/health-care-magic", "http://thecolbertreport.cc.com/videos/cgobmb/iraqracy", "http://thecolbertreport.cc.com/videos/qdumax/<API key>", "http://thecolbertreport.cc.com/videos/vy9si5/barry-schwartz", "http://thecolbertreport.cc.com/videos/r3uuup/<API key>" ], "guest": "Barry Schwartz" }, { "date": "2010-03-08", "videos": [ "http://thecolbertreport.cc.com/videos/1919hp/<API key>", "http://thecolbertreport.cc.com/videos/zqfavl/<API key>", "http://thecolbertreport.cc.com/videos/1nrjt6/tom-hanks-pt--1", "http://thecolbertreport.cc.com/videos/49pae4/tom-hanks-pt--2", "http://thecolbertreport.cc.com/videos/60qghm/<API key>", "http://thecolbertreport.cc.com/videos/xdowah/<API key>" ], "guest": "Tom Hanks" }, { "date": "2010-03-09", "videos": [ "http://thecolbertreport.cc.com/videos/6zrwd6/<API key>", "http://thecolbertreport.cc.com/videos/rokdab/<API key>", "http://thecolbertreport.cc.com/videos/b670fj/<API key>", "http://thecolbertreport.cc.com/videos/evq830/annie-leonard", "http://thecolbertreport.cc.com/videos/887xl8/<API key>" ], "guest": "Annie Leonard" }, { "date": "2010-03-10", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ij37tl/non-sexual-groping", "http://thecolbertreport.cc.com/videos/94dkr8/<API key>", "http://thecolbertreport.cc.com/videos/9m4kr7/survival-seed-bank", "http://thecolbertreport.cc.com/videos/ski7ov/sean-carroll", "http://thecolbertreport.cc.com/videos/4k81na/<API key>" ], "guest": "Sean Carroll" }, { "date": "2010-03-11", "videos": [ "http://thecolbertreport.cc.com/videos/nce2ba/<API key>", "http://thecolbertreport.cc.com/videos/8tmwv8/<API key>", "http://thecolbertreport.cc.com/videos/8r95fc/<API key>", "http://thecolbertreport.cc.com/videos/c8f0b1/david-aaronovitch", "http://thecolbertreport.cc.com/videos/96nihd/<API key>" ], "guest": "David Aaronovitch" }, { "date": "2010-03-15", "videos": [ "http: "http://thecolbertreport.cc.com/videos/hut7vd/<API key>", "http://thecolbertreport.cc.com/videos/cfbe28/<API key>", "http://thecolbertreport.cc.com/videos/402t35/<API key>", "http://thecolbertreport.cc.com/videos/rf3mus/robert-baer", "http://thecolbertreport.cc.com/videos/mdf427/<API key>" ], "guest": "Robert Baer" }, { "date": "2010-03-16", "videos": [ "http: "http://thecolbertreport.cc.com/videos/jz5m0e/barack-joe-bama", "http://thecolbertreport.cc.com/videos/wuyjzf/<API key>", "http://thecolbertreport.cc.com/videos/wl96gx/<API key>", "http://thecolbertreport.cc.com/videos/4h8104/rebecca-skloot", "http://thecolbertreport.cc.com/videos/r6jed2/<API key>" ], "guest": "Rebecca Skloot" }, { "date": "2010-03-17", "videos": [ "http://thecolbertreport.cc.com/videos/86ybsq/<API key>", "http://thecolbertreport.cc.com/videos/wpflq2/<API key>", "http://thecolbertreport.cc.com/videos/m84hav/<API key>", "http://thecolbertreport.cc.com/videos/wqbtkw/nell-irvin-painter", "http://thecolbertreport.cc.com/videos/vvqhqa/<API key>" ], "guest": "Nell Irvin Painter" }, { "date": "2010-03-18", "videos": [ "http://thecolbertreport.cc.com/videos/9cthmz/middle-eastern-dogs", "http://thecolbertreport.cc.com/videos/oymi80/<API key>", "http://thecolbertreport.cc.com/videos/70uuap/<API key>", "http://thecolbertreport.cc.com/videos/42czdy/mary-matalin", "http://thecolbertreport.cc.com/videos/xqfew6/<API key>" ], "guest": "Mary Matalin" }, { "date": "2010-03-29", "videos": [ "http://thecolbertreport.cc.com/videos/uolmzb/<API key>", "http://thecolbertreport.cc.com/videos/ua8bnx/<API key>", "http://thecolbertreport.cc.com/videos/ixrazk/<API key>", "http://thecolbertreport.cc.com/videos/m8ik8j/<API key>", "http://thecolbertreport.cc.com/videos/yksbdg/claire-mccaskill", "http://thecolbertreport.cc.com/videos/s0mkwg/<API key>" ], "guest": "Sen. Claire McCaskill" }, { "date": "2010-03-30", "videos": [ "http: "http://thecolbertreport.cc.com/videos/fbk80n/ricky-martin-is-gay", "http://thecolbertreport.cc.com/videos/fvq7gv/<API key>", "http://thecolbertreport.cc.com/videos/dx0lyr/<API key>", "http://thecolbertreport.cc.com/videos/51a308/simon-johnson", "http://thecolbertreport.cc.com/videos/c9ef0m/<API key>" ], "guest": "Simon Johnson" }, { "date": "2010-03-31", "videos": [ "http: "http://thecolbertreport.cc.com/videos/phkk0m/<API key>", "http://thecolbertreport.cc.com/videos/mnvsrm/<API key>", "http://thecolbertreport.cc.com/videos/p9l3um/<API key>", "http://thecolbertreport.cc.com/videos/wj35p0/craig-mullaney", "http://thecolbertreport.cc.com/videos/bnjl9e/<API key>" ], "guest": "Craig Mullaney" }, { "date": "2010-04-01", "videos": [ "http: "http://thecolbertreport.cc.com/videos/iymjih/<API key>", "http://thecolbertreport.cc.com/videos/2nbqob/<API key>", "http://thecolbertreport.cc.com/videos/d9x5mh/jell-o-tampering", "http://thecolbertreport.cc.com/videos/3z9wwh/judith-shulevitz", "http://thecolbertreport.cc.com/videos/vjehbr/<API key>" ], "guest": "David Frum, Judith Shulevitz" }, { "date": "2010-04-05", "videos": [ "http: "http://thecolbertreport.cc.com/videos/9ef1ri/<API key>", "http://thecolbertreport.cc.com/videos/xo27p1/<API key>", "http://thecolbertreport.cc.com/videos/rp7kua/<API key>", "http://thecolbertreport.cc.com/videos/672vju/dean-kamen", "http://thecolbertreport.cc.com/videos/zv5abl/<API key>" ], "guest": "Dean Kamen" }, { "date": "2010-04-06", "videos": [ "http://thecolbertreport.cc.com/videos/l4nkoq/<API key>", "http://thecolbertreport.cc.com/videos/506dri/<API key>", "http://thecolbertreport.cc.com/videos/hovkbz/al-sharpton", "http://thecolbertreport.cc.com/videos/z3ifg9/<API key>" ], "guest": "Joe Bastardi, Brenda Ekwurzel, Rev. Al Sharpton" }, { "date": "2010-04-07", "videos": [ "http://thecolbertreport.cc.com/videos/b1trvk/<API key>", "http://thecolbertreport.cc.com/videos/ov8dk6/<API key>", "http://thecolbertreport.cc.com/videos/ds7vyt/<API key>", "http://thecolbertreport.cc.com/videos/23bsc5/david-simon", "http://thecolbertreport.cc.com/videos/c3sk5b/<API key>" ], "guest": "David Simon" }, { "date": "2010-04-08", "videos": [ "http: "http://thecolbertreport.cc.com/videos/p89oku/<API key>", "http://thecolbertreport.cc.com/videos/06i9x0/<API key>", "http://thecolbertreport.cc.com/videos/as4xr9/<API key>", "http://thecolbertreport.cc.com/videos/kkc8ee/neil-degrasse-tyson", "http://thecolbertreport.cc.com/videos/54hsqy/<API key>" ], "guest": "Neil DeGrasse Tyson" }, { "date": "2010-04-12", "videos": [ "http://thecolbertreport.cc.com/videos/5mdm7i/<API key>", "http://thecolbertreport.cc.com/videos/vxvlp9/<API key>", "http://thecolbertreport.cc.com/videos/ag970g/<API key>", "http://thecolbertreport.cc.com/videos/3a0o7p/<API key>", "http://thecolbertreport.cc.com/videos/q1yz2t/julian-assange", "http://thecolbertreport.cc.com/videos/abcefn/<API key>" ], "guest": "Jeffrey Toobin, Julian Assange" }, { "date": "2010-04-13", "videos": [ "http://thecolbertreport.cc.com/videos/z1lfjo/dow-hits-11-000", "http://thecolbertreport.cc.com/videos/fzwwcp/<API key>", "http://thecolbertreport.cc.com/videos/l0qwni/<API key>", "http://thecolbertreport.cc.com/videos/aab36z/jon-mooallem", "http://thecolbertreport.cc.com/videos/qrdpob/<API key>" ], "guest": "Jon Mooallem" }, { "date": "2010-04-14", "videos": [ "http://thecolbertreport.cc.com/videos/i50gi7/<API key>", "http://thecolbertreport.cc.com/videos/xhpjb5/<API key>", "http://thecolbertreport.cc.com/videos/f941v8/<API key>", "http://thecolbertreport.cc.com/videos/ohefue/david-shields", "http://thecolbertreport.cc.com/videos/igm53s/<API key>" ], "guest": "David Shields" }, { "date": "2010-04-15", "videos": [ "http: "http://thecolbertreport.cc.com/videos/1fannu/<API key>", "http://thecolbertreport.cc.com/videos/1ymc3v/<API key>", "http://thecolbertreport.cc.com/videos/5gztgb/<API key>", "http://thecolbertreport.cc.com/videos/q2q4mc/aimee-mullins", "http://thecolbertreport.cc.com/videos/t03669/<API key>" ], "guest": "Aimee Mullins" }, { "date": "2010-04-19", "videos": [ "http://thecolbertreport.cc.com/videos/o36u2p/<API key>", "http://thecolbertreport.cc.com/videos/55ox6j/<API key>", "http://thecolbertreport.cc.com/videos/cyx4fw/<API key>", "http://thecolbertreport.cc.com/videos/ca04kl/george-will", "http://thecolbertreport.cc.com/videos/8di6ao/<API key>" ], "guest": "Andrew Ross Sorkin, George Will" }, { "date": "2010-04-20", "videos": [ "http: "http://thecolbertreport.cc.com/videos/q0xdhc/<API key>", "http://thecolbertreport.cc.com/videos/f5imzl/<API key>", "http://thecolbertreport.cc.com/videos/2o8c1s/<API key>", "http://thecolbertreport.cc.com/videos/n3iff5/jeffrey-katzenberg", "http://thecolbertreport.cc.com/videos/kuy0dk/<API key>" ], "guest": "Jeffrey Katzenberg" }, { "date": "2010-04-21", "videos": [ "http://thecolbertreport.cc.com/videos/6z2omj/the-new--100-bill", "http://thecolbertreport.cc.com/videos/2nsr1s/<API key>", "http://thecolbertreport.cc.com/videos/mqfg58/<API key>", "http://thecolbertreport.cc.com/videos/0teg38/craig-robinson", "http://thecolbertreport.cc.com/videos/2tayao/<API key>" ], "guest": "Craig Robinson" }, { "date": "2010-04-22", "videos": [ "http://thecolbertreport.cc.com/videos/62j0m5/<API key>", "http://thecolbertreport.cc.com/videos/tqucn8/<API key>", "http://thecolbertreport.cc.com/videos/g660yb/<API key>", "http://thecolbertreport.cc.com/videos/0le7r3/gorillaz", "http://thecolbertreport.cc.com/videos/s79r6n/<API key>" ], "guest": "Gorillaz" }, { "date": "2010-04-26", "videos": [ "http: "http://thecolbertreport.cc.com/videos/exfe65/<API key>", "http://thecolbertreport.cc.com/videos/ddudkb/<API key>", "http://thecolbertreport.cc.com/videos/4qgs1h/<API key>", "http://thecolbertreport.cc.com/videos/j7hi89/sharon-jones" ], "guest": "Sharon Jones and the Dap-Kings" }, { "date": "2010-04-27", "videos": [ "http: "http://thecolbertreport.cc.com/videos/7b23mk/<API key>", "http://thecolbertreport.cc.com/videos/ais5bh/<API key>", "http://thecolbertreport.cc.com/videos/rjye16/conn-iggulden", "http://thecolbertreport.cc.com/videos/68bzkf/<API key>" ], "guest": "Conn Iggulden" }, { "date": "2010-04-28", "videos": [ "http: "http://thecolbertreport.cc.com/videos/uzkxfc/<API key>", "http://thecolbertreport.cc.com/videos/tzdwrb/<API key>", "http://thecolbertreport.cc.com/videos/ke79c8/<API key>", "http://thecolbertreport.cc.com/videos/pj9ppq/gregg-easterbrook", "http://thecolbertreport.cc.com/videos/1tu0hz/<API key>" ], "guest": "Gregg Easterbrook" }, { "date": "2010-04-29", "videos": [ "http://thecolbertreport.cc.com/videos/qu7aln/<API key>", "http://thecolbertreport.cc.com/videos/dima6g/<API key>", "http://thecolbertreport.cc.com/videos/u1djps/<API key>", "http://thecolbertreport.cc.com/videos/yqd68y/<API key>", "http://thecolbertreport.cc.com/videos/byd88g/ok-go" ], "guest": "Abel Maldonado, OK Go" }, { "date": "2010-05-03", "videos": [ "http://thecolbertreport.cc.com/videos/caaib9/<API key>", "http://thecolbertreport.cc.com/videos/i2zwg4/<API key>", "http://thecolbertreport.cc.com/videos/bfve2i/bp-s-undersea-dome", "http://thecolbertreport.cc.com/videos/6yc052/elizabeth-warren", "http://thecolbertreport.cc.com/videos/jj9r4k/<API key>" ], "guest": "Elizabeth Warren" }, { "date": "2010-05-04", "videos": [ "http: "http://thecolbertreport.cc.com/videos/zfi7tc/<API key>", "http://thecolbertreport.cc.com/videos/dvwpph/<API key>", "http://thecolbertreport.cc.com/videos/xyjhb7/<API key>", "http://thecolbertreport.cc.com/videos/j2pf36/mark-moffett", "http://thecolbertreport.cc.com/videos/d97fmn/<API key>" ], "guest": "Michael J. Fox, Mark W. Moffett" }, { "date": "2010-05-05", "videos": [ "http: "http://thecolbertreport.cc.com/videos/2nfnz7/<API key>", "http://thecolbertreport.cc.com/videos/bw8v97/<API key>", "http://thecolbertreport.cc.com/videos/2p2tqn/<API key>", "http://thecolbertreport.cc.com/videos/pnjs6i/dave-isay", "http://thecolbertreport.cc.com/videos/xufsxi/<API key>" ], "guest": "David Isay" }, { "date": "2010-05-06", "videos": [ "http://thecolbertreport.cc.com/videos/pvx1hb/<API key>", "http://thecolbertreport.cc.com/videos/97ikxz/<API key>", "http://thecolbertreport.cc.com/videos/8a0q0r/<API key>", "http://thecolbertreport.cc.com/videos/xo7hie/stewart-brand", "http://thecolbertreport.cc.com/videos/0txjlv/<API key>" ], "guest": "Stewart Brand" }, { "date": "2010-05-10", "videos": [ "http: "http://thecolbertreport.cc.com/videos/0m67h9/<API key>", "http://thecolbertreport.cc.com/videos/pxkemd/<API key>", "http://thecolbertreport.cc.com/videos/oejc0z/<API key>", "http://thecolbertreport.cc.com/videos/6ikft9/gary-johnson", "http://thecolbertreport.cc.com/videos/xeq5yb/<API key>" ], "guest": "Gov. Gary Johnson" }, { "date": "2010-05-11", "videos": [ "http: "http://thecolbertreport.cc.com/videos/pcdm2a/<API key>", "http://thecolbertreport.cc.com/videos/1227nt/<API key>", "http://thecolbertreport.cc.com/videos/rp68kf/<API key>", "http://thecolbertreport.cc.com/videos/d04me7/hampton-sides", "http://thecolbertreport.cc.com/videos/qv4b2o/<API key>" ], "guest": "Hampton Sides" }, { "date": "2010-05-12", "videos": [ "http: "http://thecolbertreport.cc.com/videos/rxu3ed/<API key>", "http://thecolbertreport.cc.com/videos/zf5e7d/<API key>", "http://thecolbertreport.cc.com/videos/0mg8t8/<API key>", "http://thecolbertreport.cc.com/videos/jynvz7/deepak-chopra", "http://thecolbertreport.cc.com/videos/0mpxm3/<API key>" ], "guest": "Deepak Chopra" }, { "date": "2010-05-13", "videos": [ "http: "http://thecolbertreport.cc.com/videos/mp7sng/confirming-elena", "http://thecolbertreport.cc.com/videos/o1qad4/the-hold-steady", "http://thecolbertreport.cc.com/videos/ugcamu/<API key>" ], "guest": "The Hold Steady" }, { "date": "2010-06-01", "videos": [ "http: "http://thecolbertreport.cc.com/videos/395e6g/vodka-eyeballing", "http://thecolbertreport.cc.com/videos/6f9c47/up-brit-creek", "http://thecolbertreport.cc.com/videos/p943d0/<API key>", "http://thecolbertreport.cc.com/videos/ngl48j/ayaan-hirsi-ali", "http://thecolbertreport.cc.com/videos/jygylj/<API key>" ], "guest": "Ayaan Hirsi Ali" }, { "date": "2010-06-02", "videos": [ "http: "http://thecolbertreport.cc.com/videos/gqwbeo/<API key>", "http://thecolbertreport.cc.com/videos/qrxaw1/<API key>", "http://thecolbertreport.cc.com/videos/4dk71f/<API key>", "http://thecolbertreport.cc.com/videos/dvcqzb/lisa-miller", "http://thecolbertreport.cc.com/videos/a4ztpz/<API key>" ], "guest": "Lisa Miller" }, { "date": "2010-06-03", "videos": [ "http: "http: "http://thecolbertreport.cc.com/videos/44gj25/<API key>", "http://thecolbertreport.cc.com/videos/p34tly/<API key>", "http://thecolbertreport.cc.com/videos/fo5d9i/vampire-weekend" ], "guest": "Vampire Weekend" }, { "date": "2010-06-07", "videos": [ "http: "http://thecolbertreport.cc.com/videos/y0xgng/<API key>", "http://thecolbertreport.cc.com/videos/lc7nxu/<API key>", "http://thecolbertreport.cc.com/videos/c2l6b4/<API key>", "http://thecolbertreport.cc.com/videos/30w6f5/jonathan-alter", "http://thecolbertreport.cc.com/videos/ow5rnp/<API key>" ], "guest": "James Carville, Jonathan Alter" }, { "date": "2010-06-08", "videos": [ "http://thecolbertreport.cc.com/videos/uj5obr/<API key>", "http://thecolbertreport.cc.com/videos/yj9oop/<API key>", "http://thecolbertreport.cc.com/videos/n3e887/mark-frauenfelder", "http://thecolbertreport.cc.com/videos/r1zjxy/<API key>" ], "guest": "Mark Frauenfelder" }, { "date": "2010-06-09", "videos": [ "http://thecolbertreport.cc.com/videos/ou7te0/<API key>", "http://thecolbertreport.cc.com/videos/0eesk5/<API key>", "http://thecolbertreport.cc.com/videos/41cjs4/<API key>", "http://thecolbertreport.cc.com/videos/12z179/sam-nunn", "http://thecolbertreport.cc.com/videos/hv8uj4/<API key>" ], "guest": "Amb. Michael Oren, Sen. Sam Nunn" }, { "date": "2010-06-10", "videos": [ "http://thecolbertreport.cc.com/videos/6iz8ha/bp-stock-sinks", "http://thecolbertreport.cc.com/videos/e46kh9/<API key>", "http://thecolbertreport.cc.com/videos/9rht3y/<API key>", "http://thecolbertreport.cc.com/videos/19ikyl/alan-bean", "http://thecolbertreport.cc.com/videos/gewg17/<API key>" ], "guest": "Alan Bean" }, { "date": "2010-06-14", "videos": [ "http: "http://thecolbertreport.cc.com/videos/vlk9h9/<API key>", "http://thecolbertreport.cc.com/videos/xhnftx/<API key>", "http://thecolbertreport.cc.com/videos/b6bfik/<API key>", "http://thecolbertreport.cc.com/videos/bd9ero/stephen-prothero", "http://thecolbertreport.cc.com/videos/t2lbqh/<API key>" ], "guest": "Stephen Prothero" }, { "date": "2010-06-15", "videos": [ "http: "http://thecolbertreport.cc.com/videos/w6pwpk/<API key>", "http://thecolbertreport.cc.com/videos/o42e2u/<API key>", "http://thecolbertreport.cc.com/videos/zkoqn2/carl-safina", "http://thecolbertreport.cc.com/videos/vr28jt/<API key>" ], "guest": "Dr. Carl Safina" }, { "date": "2010-06-16", "videos": [ "http: "http://thecolbertreport.cc.com/videos/atwjd4/<API key>", "http://thecolbertreport.cc.com/videos/fq1qpx/<API key>", "http://thecolbertreport.cc.com/videos/0occfp/<API key>", "http://thecolbertreport.cc.com/videos/ak28k2/devo" ], "guest": "Devo" }, { "date": "2010-06-17", "videos": [ "http://thecolbertreport.cc.com/videos/zp0vlt/<API key>", "http://thecolbertreport.cc.com/videos/mgk9uw/<API key>", "http://thecolbertreport.cc.com/videos/lmlfss/<API key>", "http://thecolbertreport.cc.com/videos/r0x7kl/<API key>", "http://thecolbertreport.cc.com/videos/pw3z5k/<API key>", "http://thecolbertreport.cc.com/videos/psfs9q/david-mamet", "http://thecolbertreport.cc.com/videos/t0bf7h/<API key>" ], "guest": "David Mamet" }, { "date": "2010-06-21", "videos": [ "http://thecolbertreport.cc.com/videos/3xh3zp/<API key>", "http://thecolbertreport.cc.com/videos/tsbncg/<API key>", "http://thecolbertreport.cc.com/videos/lw3o9e/<API key>", "http://thecolbertreport.cc.com/videos/6rxgjl/wes-moore", "http://thecolbertreport.cc.com/videos/xr56ob/<API key>" ], "guest": "Wes Moore" }, { "date": "2010-06-22", "videos": [ "http://thecolbertreport.cc.com/videos/f7v2qo/<API key>", "http://thecolbertreport.cc.com/videos/mt3j86/<API key>", "http://thecolbertreport.cc.com/videos/dry79y/<API key>", "http://thecolbertreport.cc.com/videos/eyzb5g/<API key>", "http://thecolbertreport.cc.com/videos/ej23e4/gloria-steinem", "http://thecolbertreport.cc.com/videos/jewfph/<API key>" ], "guest": "Gloria Steinem" }, { "date": "2010-06-23", "videos": [ "http: "http://thecolbertreport.cc.com/videos/wcoc11/us-defeats-algeria", "http://thecolbertreport.cc.com/videos/licobk/<API key>", "http://thecolbertreport.cc.com/videos/3dk57p/<API key>", "http://thecolbertreport.cc.com/videos/quds8l/tim-westergren", "http://thecolbertreport.cc.com/videos/p3f9t8/<API key>" ], "guest": "Tim Westergren" }, { "date": "2010-06-24", "videos": [ "http: "http://thecolbertreport.cc.com/videos/i8ohf4/<API key>", "http://thecolbertreport.cc.com/videos/5m2oyq/<API key>", "http://thecolbertreport.cc.com/videos/6ppo8y/<API key>", "http://thecolbertreport.cc.com/videos/3td47y/michael-specter", "http://thecolbertreport.cc.com/videos/86kjse/<API key>" ], "guest": "Michael Specter" }, { "date": "2010-06-28", "videos": [ "http://thecolbertreport.cc.com/videos/cchudg/<API key>", "http://thecolbertreport.cc.com/videos/t7kbm8/<API key>", "http://thecolbertreport.cc.com/videos/nxs1np/doomsday-bunkers", "http://thecolbertreport.cc.com/videos/kpz62f/john-waters", "http://thecolbertreport.cc.com/videos/q1un38/<API key>" ], "guest": "Michael Hastings, John Waters" }, { "date": "2010-06-29", "videos": [ "http: "http://thecolbertreport.cc.com/videos/5i29xg/<API key>", "http://thecolbertreport.cc.com/videos/gxmj8l/<API key>", "http://thecolbertreport.cc.com/videos/cxtlq7/lube-job", "http://thecolbertreport.cc.com/videos/t7eba8/julian-castro", "http://thecolbertreport.cc.com/videos/6s4ag9/<API key>" ], "guest": "Mayor Julian Castro" }, { "date": "2010-06-30", "videos": [ "http://thecolbertreport.cc.com/videos/4nay3b/<API key>", "http://thecolbertreport.cc.com/videos/200t0y/<API key>", "http://thecolbertreport.cc.com/videos/85xlkw/nicholas-carr", "http://thecolbertreport.cc.com/videos/zz75v5/<API key>" ], "guest": "Nicholas Carr" }, { "date": "2010-07-01", "videos": [ "http: "http://thecolbertreport.cc.com/videos/p1rz8m/<API key>", "http://thecolbertreport.cc.com/videos/ytd0xh/<API key>", "http://thecolbertreport.cc.com/videos/zgf08n/<API key>", "http://thecolbertreport.cc.com/videos/7p27ga/manny-howard", "http://thecolbertreport.cc.com/videos/lruog2/<API key>" ], "guest": "Manny Howard" }, { "date": "2010-07-05", "videos": [ "http://thecolbertreport.cc.com/videos/88l8y3/stephen-is-sick", "http://thecolbertreport.cc.com/videos/yw04k6/<API key>", "http://thecolbertreport.cc.com/videos/2vgxvc/<API key>", "http://thecolbertreport.cc.com/videos/tod2oy/michio-kaku", "http://thecolbertreport.cc.com/videos/59nr33/<API key>" ], "guest": "Paul Krugman, Dr. Michio Kaku" }, { "date": "2010-07-06", "videos": [ "http: "http://thecolbertreport.cc.com/videos/vh6d9y/<API key>", "http://thecolbertreport.cc.com/videos/v4t63q/<API key>", "http://thecolbertreport.cc.com/videos/52xc1z/<API key>", "http://thecolbertreport.cc.com/videos/44dhom/garret-keizer", "http://thecolbertreport.cc.com/videos/p9lstk/<API key>" ], "guest": "Garret Keizer" }, { "date": "2010-07-07", "videos": [ "http://thecolbertreport.cc.com/videos/yx0x8s/the-carell-corral", "http://thecolbertreport.cc.com/videos/u8pmv7/<API key>", "http://thecolbertreport.cc.com/videos/2vaaww/<API key>", "http://thecolbertreport.cc.com/videos/7ctnwz/<API key>", "http://thecolbertreport.cc.com/videos/s7mibo/steve-carell", "http://thecolbertreport.cc.com/videos/ytvd7r/<API key>" ], "guest": "Steve Carell" }, { "date": "2010-07-08", "videos": [ "http: "http://thecolbertreport.cc.com/videos/x5lln0/modest-con-2010", "http://thecolbertreport.cc.com/videos/zjdl0i/<API key>", "http://thecolbertreport.cc.com/videos/eieifn/<API key>", "http://thecolbertreport.cc.com/videos/nlmfgk/arturo-rodriguez", "http://thecolbertreport.cc.com/videos/oc0gsm/<API key>" ], "guest": "Arturo Rodriguez" }, { "date": "2010-07-26", "videos": [ "http: "http://thecolbertreport.cc.com/videos/snrn4u/<API key>", "http://thecolbertreport.cc.com/videos/qqashr/racial-pro-firing", "http://thecolbertreport.cc.com/videos/1axxh8/<API key>", "http://thecolbertreport.cc.com/videos/u5kfga/hephzibah-anderson", "http://thecolbertreport.cc.com/videos/rcl3ml/<API key>" ], "guest": "Hephzibah Anderson" }, { "date": "2010-07-27", "videos": [ "http: "http://thecolbertreport.cc.com/videos/56iw57/<API key>", "http://thecolbertreport.cc.com/videos/m571z2/<API key>", "http://thecolbertreport.cc.com/videos/431v9v/<API key>", "http://thecolbertreport.cc.com/videos/2afxlp/kevin-kline", "http://thecolbertreport.cc.com/videos/y6qd20/<API key>" ], "guest": "Thomas S. Blanton, Kevin Kline" }, { "date": "2010-07-28", "videos": [ "http://thecolbertreport.cc.com/videos/it4pai/<API key>", "http://thecolbertreport.cc.com/videos/ce9wme/<API key>", "http://thecolbertreport.cc.com/videos/k9y4mw/<API key>", "http://thecolbertreport.cc.com/videos/hjiro1/elon-musk", "http://thecolbertreport.cc.com/videos/fl5n9q/<API key>" ], "guest": "Elon Musk" }, { "date": "2010-07-29", "videos": [ "http: "http://thecolbertreport.cc.com/videos/dzk032/the-oil-is-missing", "http://thecolbertreport.cc.com/videos/i9hga3/<API key>", "http://thecolbertreport.cc.com/videos/jt67k1/apology-box", "http://thecolbertreport.cc.com/videos/sdjfj9/andy-cohen", "http://thecolbertreport.cc.com/videos/6hqby7/<API key>" ], "guest": "Andy Cohen" }, { "date": "2010-08-02", "videos": [ "http: "http://thecolbertreport.cc.com/videos/o9k8cr/<API key>", "http://thecolbertreport.cc.com/videos/wx3505/<API key>", "http://thecolbertreport.cc.com/videos/3dwyx0/<API key>", "http://thecolbertreport.cc.com/videos/ln5q1u/jimmy-cliff" ], "guest": "Jimmy Cliff" }, { "date": "2010-08-03", "videos": [ "http://thecolbertreport.cc.com/videos/s8t2k9/<API key>", "http://thecolbertreport.cc.com/videos/noj1lw/<API key>", "http://thecolbertreport.cc.com/videos/jrpte4/<API key>", "http://thecolbertreport.cc.com/videos/a5r0r5/laura-ingraham", "http://thecolbertreport.cc.com/videos/9838f3/<API key>" ], "guest": "Laura Ingraham" }, { "date": "2010-08-04", "videos": [ "http://thecolbertreport.cc.com/videos/eirad0/<API key>", "http://thecolbertreport.cc.com/videos/4mbc26/<API key>", "http://thecolbertreport.cc.com/videos/vhx4eu/<API key>", "http://thecolbertreport.cc.com/videos/t5nlmh/michael-posner", "http://thecolbertreport.cc.com/videos/gc9gia/<API key>" ], "guest": "Michael Posner" }, { "date": "2010-08-05", "videos": [ "http: "http://thecolbertreport.cc.com/videos/1qu0ts/<API key>", "http://thecolbertreport.cc.com/videos/gw1rft/<API key>", "http://thecolbertreport.cc.com/videos/bdzvwl/savion-glover", "http://thecolbertreport.cc.com/videos/our78a/<API key>" ], "guest": "Savion Glover" }, { "date": "2010-08-10", "videos": [ "http: "http://thecolbertreport.cc.com/videos/40r2zf/<API key>", "http://thecolbertreport.cc.com/videos/jbgt2s/<API key>", "http://thecolbertreport.cc.com/videos/v2az23/<API key>", "http://thecolbertreport.cc.com/videos/uhmewn/dylan-ratigan", "http://thecolbertreport.cc.com/videos/p3wgd1/<API key>" ], "guest": "Dylan Ratigan" }, { "date": "2010-08-11", "videos": [ "http://thecolbertreport.cc.com/videos/jwpn0p/<API key>", "http://thecolbertreport.cc.com/videos/tpcehb/david-finkel", "http://thecolbertreport.cc.com/videos/j0nge7/<API key>" ], "guest": "David Finkel" }, { "date": "2010-08-12", "videos": [ "http: "http://thecolbertreport.cc.com/videos/t6cmn9/happy-ramadan", "http://thecolbertreport.cc.com/videos/tavgu2/<API key>", "http://thecolbertreport.cc.com/videos/obv2rl/senior-moment", "http://thecolbertreport.cc.com/videos/lx17lm/chuck-close", "http://thecolbertreport.cc.com/videos/h6dwnn/<API key>" ], "guest": "Chuck Close" }, { "date": "2010-08-16", "videos": [ "http://thecolbertreport.cc.com/videos/q61axv/<API key>", "http://thecolbertreport.cc.com/videos/yh08ag/<API key>", "http://thecolbertreport.cc.com/videos/gr3fyt/john-fetterman", "http://thecolbertreport.cc.com/videos/6ksdhb/<API key>" ], "guest": "Richard Clarke, John Fetterman" }, { "date": "2010-08-17", "videos": [ "http: "http://thecolbertreport.cc.com/videos/c3sn86/<API key>", "http://thecolbertreport.cc.com/videos/2hdefm/<API key>", "http://thecolbertreport.cc.com/videos/tno3pg/<API key>", "http://thecolbertreport.cc.com/videos/2kzgs4/barry-levine", "http: ], "guest": "Barry Levine" }, { "date": "2010-08-18", "videos": [ "http: "http://thecolbertreport.cc.com/videos/50c2du/<API key>", "http://thecolbertreport.cc.com/videos/08wn77/<API key>", "http://thecolbertreport.cc.com/videos/l06vi1/<API key>", "http://thecolbertreport.cc.com/videos/389e2m/thomas-french", "http://thecolbertreport.cc.com/videos/b2scuj/<API key>" ], "guest": "Thomas French" }, { "date": "2010-08-19", "videos": [ "http: "http://thecolbertreport.cc.com/videos/m4f5im/<API key>-", "http://thecolbertreport.cc.com/videos/2rjk08/<API key>", "http://thecolbertreport.cc.com/videos/c2uztk/jon-krakauer", "http://thecolbertreport.cc.com/videos/g9w04r/<API key>" ], "guest": "Jon Krakauer" }, { "date": "2010-08-23", "videos": [ "http://thecolbertreport.cc.com/videos/zn0m8s/<API key>", "http://thecolbertreport.cc.com/videos/xa3l6x/<API key>", "http://thecolbertreport.cc.com/videos/8vazj8/<API key>", "http://thecolbertreport.cc.com/videos/jjg6uf/leslie-kean", "http: ], "guest": "Leslie Kean" }, { "date": "2010-08-24", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ay7pky/terror-bunker-5200", "http://thecolbertreport.cc.com/videos/rxmuip/<API key>", "http://thecolbertreport.cc.com/videos/7azwuj/mahmoody-blues", "http://thecolbertreport.cc.com/videos/vly30s/jeffrey-goldberg", "http://thecolbertreport.cc.com/videos/p0468k/<API key>" ], "guest": "Jeffrey Goldberg" }, { "date": "2010-08-25", "videos": [ "http://thecolbertreport.cc.com/videos/ckwof5/<API key>", "http://thecolbertreport.cc.com/videos/bn16zn/<API key>", "http://thecolbertreport.cc.com/videos/nmp9j3/<API key>", "http://thecolbertreport.cc.com/videos/boejnl/heidi-cullen", "http://thecolbertreport.cc.com/videos/8mv6il/<API key>" ], "guest": "Andrew Hacker, Heidi Cullen" }, { "date": "2010-08-26", "videos": [ "http: "http://thecolbertreport.cc.com/videos/cg8fb2/<API key>", "http://thecolbertreport.cc.com/videos/3k8c17/glenn-livid", "http://thecolbertreport.cc.com/videos/ozbh2e/<API key>", "http://thecolbertreport.cc.com/videos/idhto6/richard-engel", "http://thecolbertreport.cc.com/videos/054o86/<API key>" ], "guest": "Richard Engel" }, { "date": "2010-09-07", "videos": [ "http: "http://thecolbertreport.cc.com/videos/xvxdbg/geese-witherspoon", "http://thecolbertreport.cc.com/videos/os39h8/<API key>", "http://thecolbertreport.cc.com/videos/ylp5nt/anthony-romero", "http://thecolbertreport.cc.com/videos/olfody/<API key>" ], "guest": "Anthony Romero" }, { "date": "2010-09-08", "videos": [ "http: "http://thecolbertreport.cc.com/videos/kmgrcb/<API key>", "http://thecolbertreport.cc.com/videos/l21o2y/<API key>", "http://thecolbertreport.cc.com/videos/dp7uzb/joe-biden", "http://thecolbertreport.cc.com/videos/r1r2jw/<API key>" ], "guest": "Vice President Joe Biden, Gen. Raymond Odierno" }, { "date": "2010-09-09", "videos": [ "http://thecolbertreport.cc.com/videos/txd70l/<API key>", "http://thecolbertreport.cc.com/videos/tvmzxz/<API key>", "http://thecolbertreport.cc.com/videos/9543jt/<API key>" ], "guest": "Sen. Jim Webb, Lt. Col. Brent Cummings, John Legend" }, { "date": "2010-09-13", "videos": [ "http: "http://thecolbertreport.cc.com/videos/1x4nj0/<API key>", "http://thecolbertreport.cc.com/videos/wzt5ev/<API key>", "http://thecolbertreport.cc.com/videos/nwwxfb/<API key>", "http://thecolbertreport.cc.com/videos/hr5uxa/lisa-birnbach", "http://thecolbertreport.cc.com/videos/w7kfgs/<API key>" ], "guest": "Lisa Birnbach" }, { "date": "2010-09-14", "videos": [ "http: "http://thecolbertreport.cc.com/videos/pet2x5/<API key>", "http://thecolbertreport.cc.com/videos/7cbxuw/<API key>", "http://thecolbertreport.cc.com/videos/oh49ge/<API key>", "http://thecolbertreport.cc.com/videos/yevohc/sean-wilentz", "http://thecolbertreport.cc.com/videos/fugenz/<API key>" ], "guest": "Sean Wilentz" }, { "date": "2010-09-15", "videos": [ "http: "http://thecolbertreport.cc.com/videos/f8g0cq/libertea", "http://thecolbertreport.cc.com/videos/7v15m5/<API key>", "http://thecolbertreport.cc.com/videos/n9nk9d/saul-griffith", "http://thecolbertreport.cc.com/videos/mjozqh/<API key>" ], "guest": "Saul Griffith" }, { "date": "2010-09-16", "videos": [ "http://thecolbertreport.cc.com/videos/uj8r4c/<API key>", "http://thecolbertreport.cc.com/videos/5klha6/<API key>", "http://thecolbertreport.cc.com/videos/pck634/lawrence-o-donnell", "http://thecolbertreport.cc.com/videos/h5yz8n/<API key>" ], "guest": "Lawrence O'Donnell" }, { "date": "2010-09-20", "videos": [ "http: "http://thecolbertreport.cc.com/videos/1fmwjo/<API key>", "http://thecolbertreport.cc.com/videos/diatjd/<API key>", "http://thecolbertreport.cc.com/videos/a4y4ey/<API key>", "http://thecolbertreport.cc.com/videos/b65ofd/pavement" ], "guest": "Pavement" }, { "date": "2010-09-21", "videos": [ "http: "http://thecolbertreport.cc.com/videos/t99up5/<API key>", "http://thecolbertreport.cc.com/videos/2vrsvg/colbertslist", "http://thecolbertreport.cc.com/videos/tnb3an/eric-schmidt", "http://thecolbertreport.cc.com/videos/kecowj/<API key>" ], "guest": "Eric Schmidt" }, { "date": "2010-09-22", "videos": [ "http: "http://thecolbertreport.cc.com/videos/gcap67/<API key>", "http://thecolbertreport.cc.com/videos/xq0472/<API key>", "http://thecolbertreport.cc.com/videos/xr7q4y/<API key>", "http://thecolbertreport.cc.com/videos/kgnwdf/guillermo-del-toro", "http://thecolbertreport.cc.com/videos/lnpblj/<API key>" ], "guest": "Guillermo Del Toro" }, { "date": "2010-09-23", "videos": [ "http: "http://thecolbertreport.cc.com/videos/puxqvp/<API key>", "http://thecolbertreport.cc.com/videos/imp10g/sanchez-bump", "http://thecolbertreport.cc.com/videos/937jzh/oscar-goodman", "http://thecolbertreport.cc.com/videos/hitep1/<API key>" ], "guest": "Oscar Goodman" }, { "date": "2010-09-27", "videos": [ "http: "http://thecolbertreport.cc.com/videos/aychpz/corn-packer-apology", "http://thecolbertreport.cc.com/videos/nc19il/the-delawert-report", "http://thecolbertreport.cc.com/videos/pcae92/<API key>", "http://thecolbertreport.cc.com/videos/kby55r/<API key>", "http://thecolbertreport.cc.com/videos/y2afey/ken-burns", "http://thecolbertreport.cc.com/videos/g2pys1/<API key>" ], "guest": "Ken Burns" }, { "date": "2010-09-28", "videos": [ "http: "http://thecolbertreport.cc.com/videos/gspyir/<API key>", "http://thecolbertreport.cc.com/videos/57ib6e/terror-a-new-one", "http://thecolbertreport.cc.com/videos/ut4vp1/ross-douthat", "http://thecolbertreport.cc.com/videos/0pm7c2/<API key>" ], "guest": "Paul Begala, Ross Douthat" }, { "date": "2010-09-29", "videos": [ "http://thecolbertreport.cc.com/videos/umvy3w/<API key>", "http://thecolbertreport.cc.com/videos/kup6co/<API key>", "http://thecolbertreport.cc.com/videos/z1c69t/<API key>", "http://thecolbertreport.cc.com/videos/q56zhc/steven-rattner", "http://thecolbertreport.cc.com/videos/kn5pkq/<API key>" ], "guest": "Steve Rattner" }, { "date": "2010-09-30", "videos": [ "http: "http://thecolbertreport.cc.com/videos/xic7q8/<API key>", "http://thecolbertreport.cc.com/videos/xd5pkh/droid-rage", "http://thecolbertreport.cc.com/videos/w8i263/stat-of-the-union", "http://thecolbertreport.cc.com/videos/h7gmgz/aaron-sorkin", "http://thecolbertreport.cc.com/videos/7zrc6h/<API key>" ], "guest": "Aaron Sorkin" }, { "date": "2010-10-04", "videos": [ "http: "http://thecolbertreport.cc.com/videos/h7fctl/we-world-war-won-it", "http://thecolbertreport.cc.com/videos/k8t4ao/<API key>", "http://thecolbertreport.cc.com/videos/nbdcz5/<API key>", "http://thecolbertreport.cc.com/videos/pl2b2g/eugene-robinson", "http://thecolbertreport.cc.com/videos/3w0ogs/<API key>" ], "guest": "Eugene Robinson" }, { "date": "2010-10-05", "videos": [ "http: "http://thecolbertreport.cc.com/videos/9xty22/<API key>", "http://thecolbertreport.cc.com/videos/0xyglo/<API key>", "http://thecolbertreport.cc.com/videos/e4gleb/<API key>", "http://thecolbertreport.cc.com/videos/98qo87/leon-botstein", "http://thecolbertreport.cc.com/videos/gi2fk6/<API key>" ], "guest": "Leon Botstein" }, { "date": "2010-10-06", "videos": [ "http: "http://thecolbertreport.cc.com/videos/gu3bg9/<API key>", "http://thecolbertreport.cc.com/videos/rex0nc/rawesome-foods-raid", "http://thecolbertreport.cc.com/videos/6krvaq/<API key>", "http://thecolbertreport.cc.com/videos/01gaiu/<API key>" ], "guest": "Mavis Staples &amp; Jeff Tweedy" }, { "date": "2010-10-07", "videos": [ "http://thecolbertreport.cc.com/videos/sy1j26/<API key>", "http://thecolbertreport.cc.com/videos/5qjigz/<API key>", "http://thecolbertreport.cc.com/videos/rzuziw/<API key>", "http://thecolbertreport.cc.com/videos/077dy4/davis-guggenheim", "http://thecolbertreport.cc.com/videos/th4oe4/<API key>" ], "guest": "Davis Guggenheim" }, { "date": "2010-10-11", "videos": [ "http: "http://thecolbertreport.cc.com/videos/2buyr8/<API key>", "http://thecolbertreport.cc.com/videos/f1n1ah/<API key>", "http://thecolbertreport.cc.com/videos/6x3w7h/<API key>", "http://thecolbertreport.cc.com/videos/l23gil/robert-reich", "http://thecolbertreport.cc.com/videos/6314hj/<API key>" ], "guest": "Robert Reich" }, { "date": "2010-10-12", "videos": [ "http: "http://thecolbertreport.cc.com/videos/que3dz/<API key>", "http://thecolbertreport.cc.com/videos/xpawsw/<API key>", "http://thecolbertreport.cc.com/videos/o656bc/<API key>", "http://thecolbertreport.cc.com/videos/bncunr/brendan-steinhauser", "http://thecolbertreport.cc.com/videos/4i1iy2/<API key>" ], "guest": "Brendan Steinhauser" }, { "date": "2010-10-13", "videos": [ "http: "http://thecolbertreport.cc.com/videos/40azz5/<API key>", "http://thecolbertreport.cc.com/videos/fg5dcw/<API key>", "http://thecolbertreport.cc.com/videos/nq3g54/tax-shelter-skelter", "http://thecolbertreport.cc.com/videos/ip94pd/austan-goolsbee", "http://thecolbertreport.cc.com/videos/7n0fzv/<API key>" ], "guest": "Austan Goolsbee" }, { "date": "2010-10-14", "videos": [ "http://thecolbertreport.cc.com/videos/ke3ug4/<API key>", "http://thecolbertreport.cc.com/videos/jvi6id/<API key>", "http://thecolbertreport.cc.com/videos/8kgt7i/<API key>", "http://thecolbertreport.cc.com/videos/wc2nwv/bill-bryson", "http://thecolbertreport.cc.com/videos/ns0u0b/<API key>" ], "guest": "Bill Bryson" }, { "date": "2010-10-25", "videos": [ "http://thecolbertreport.cc.com/videos/ou6z90/<API key>", "http://thecolbertreport.cc.com/videos/t96zw6/<API key>", "http://thecolbertreport.cc.com/videos/r3cpem/<API key>", "http://thecolbertreport.cc.com/videos/tx8w6w/nicholas-negroponte", "http://thecolbertreport.cc.com/videos/hjbcjo/<API key>" ], "guest": "Nicholas Negroponte" }, { "date": "2010-10-26", "videos": [ "http: "http://thecolbertreport.cc.com/videos/upm6ow/<API key>", "http://thecolbertreport.cc.com/videos/rh943m/<API key>-", "http://thecolbertreport.cc.com/videos/57deny/<API key>", "http://thecolbertreport.cc.com/videos/9dol4n/garry-wills", "http://thecolbertreport.cc.com/videos/ifnetg/<API key>" ], "guest": "Gary Wills" }, { "date": "2010-10-27", "videos": [ "http://thecolbertreport.cc.com/videos/qjfe6u/<API key>-", "http: "http://thecolbertreport.cc.com/videos/a393lf/<API key>", "http://thecolbertreport.cc.com/videos/ah47vl/<API key>", "http://thecolbertreport.cc.com/videos/k3z37d/<API key>", "http://thecolbertreport.cc.com/videos/tmruw9/apolo-ohno", "http://thecolbertreport.cc.com/videos/g0i5r2/<API key>" ], "guest": "Rep. Tom Perriello, Apolo Anton Ohno" }, { "date": "2010-10-28", "videos": [ "http://thecolbertreport.cc.com/videos/ea746g/the-mcrib-is-back", "http://thecolbertreport.cc.com/videos/y2nj3n/fear-for-all-pt--1", "http://thecolbertreport.cc.com/videos/ttx9jf/fear-for-all-pt--2", "http://thecolbertreport.cc.com/videos/el1mv0/maira-kalman", "http://thecolbertreport.cc.com/videos/p6c0ah/<API key>" ], "guest": "Maira Kalman" }, { "date": "2010-11-01", "videos": [ "http: "http://thecolbertreport.cc.com/videos/pjth2k/<API key>", "http://thecolbertreport.cc.com/videos/6y87u2/<API key>", "http://thecolbertreport.cc.com/videos/ghbjcp/<API key>", "http://thecolbertreport.cc.com/videos/r4udbe/jonathan-alter", "http://thecolbertreport.cc.com/videos/h06l8n/<API key>" ], "guest": "Jonathan Alter" }, { "date": "2010-11-02", "videos": [ "http://thecolbertreport.cc.com/videos/q6wjad/<API key>", "http://thecolbertreport.cc.com/videos/5y5ul8/<API key>", "http://thecolbertreport.cc.com/videos/yubkdk/<API key>", "http://thecolbertreport.cc.com/videos/ii11zs/<API key>", "http://thecolbertreport.cc.com/videos/fpxe9g/<API key>" ], "guest": "Katrina vanden Heuvel, David Frum" }, { "date": "2010-11-03", "videos": [ "http: "http://thecolbertreport.cc.com/videos/dnol9b/<API key>", "http://thecolbertreport.cc.com/videos/tsa7r8/<API key>", "http://thecolbertreport.cc.com/videos/g1n60y/<API key>", "http://thecolbertreport.cc.com/videos/0ciqy7/<API key>" ], "guest": "Doris Kearns Goodwin" }, { "date": "2010-11-04", "videos": [ "http: "http://thecolbertreport.cc.com/videos/jssup2/<API key>", "http://thecolbertreport.cc.com/videos/59l5bf/<API key>", "http://thecolbertreport.cc.com/videos/px319n/elvis-costello" ], "guest": "Elvis Costello" }, { "date": "2010-11-08", "videos": [ "http://thecolbertreport.cc.com/videos/bf24qu/<API key>", "http://thecolbertreport.cc.com/videos/odml1w/<API key>", "http://thecolbertreport.cc.com/videos/450kbl/<API key>", "http://thecolbertreport.cc.com/videos/itfuo6/reza-aslan", "http://thecolbertreport.cc.com/videos/flh0gj/<API key>" ], "guest": "Reza Aslan" }, { "date": "2010-11-09", "videos": [ "http://thecolbertreport.cc.com/videos/ndicnt/decision-points", "http://thecolbertreport.cc.com/videos/t6dluv/<API key>", "http://thecolbertreport.cc.com/videos/2tsnui/<API key>", "http://thecolbertreport.cc.com/videos/thu56b/cee-lo-green" ], "guest": "Cee-Lo Green" }, { "date": "2010-11-10", "videos": [ "http://thecolbertreport.cc.com/videos/r8nn6k/<API key>", "http://thecolbertreport.cc.com/videos/h0bv7g/<API key>", "http://thecolbertreport.cc.com/videos/qra7vl/statue-of-jesus", "http://thecolbertreport.cc.com/videos/0cxark/martha-stewart", "http://thecolbertreport.cc.com/videos/gd9t0s/<API key>" ], "guest": "Martha Stewart" }, { "date": "2010-11-11", "videos": [ "http://thecolbertreport.cc.com/videos/vavqn0/<API key>", "http: "http://thecolbertreport.cc.com/videos/6obewf/<API key>", "http://thecolbertreport.cc.com/videos/pigos8/<API key>", "http://thecolbertreport.cc.com/videos/8zchd5/<API key>", "http://thecolbertreport.cc.com/videos/opi39p/quincy-jones", "http://thecolbertreport.cc.com/videos/dlv5sb/<API key>" ], "guest": "Quincy Jones" }, { "date": "2010-11-15", "videos": [ "http://thecolbertreport.cc.com/videos/zwpnzb/<API key>", "http://thecolbertreport.cc.com/videos/dzeed3/<API key>", "http://thecolbertreport.cc.com/videos/yi115x/<API key>", "http://thecolbertreport.cc.com/videos/zgerlg/david-stern", "http://thecolbertreport.cc.com/videos/f5nt0v/<API key>" ], "guest": "David Stern" }, { "date": "2010-11-16", "videos": [ "http: "http://thecolbertreport.cc.com/videos/r1nlt4/<API key>", "http://thecolbertreport.cc.com/videos/6x0tmp/<API key>", "http://thecolbertreport.cc.com/videos/5n8eoi/<API key>", "http://thecolbertreport.cc.com/videos/brwtip/john-legend" ], "guest": "John Legend" }, { "date": "2010-11-17", "videos": [ "http: "http://thecolbertreport.cc.com/videos/bzhpi2/<API key>", "http://thecolbertreport.cc.com/videos/izlih7/old-people-in-space", "http://thecolbertreport.cc.com/videos/rhup4k/chair-apparent", "http://thecolbertreport.cc.com/videos/x10udl/ian-frazier", "http://thecolbertreport.cc.com/videos/iu8jdu/<API key>" ], "guest": "Ian Frazier" }, { "date": "2010-11-18", "videos": [ "http://thecolbertreport.cc.com/videos/rip59b/<API key>", "http://thecolbertreport.cc.com/videos/6dqu0c/<API key>", "http://thecolbertreport.cc.com/videos/fbks4j/<API key>", "http://thecolbertreport.cc.com/videos/9ldbp0/salvatore-giunta", "http://thecolbertreport.cc.com/videos/92wwov/<API key>" ], "guest": "Staff Sgt. Salvatore Giunta" }, { "date": "2010-11-29", "videos": [ "http: "http://thecolbertreport.cc.com/videos/5liwl3/<API key>", "http://thecolbertreport.cc.com/videos/qhebrf/<API key>", "http://thecolbertreport.cc.com/videos/1fhpey/dan-savage", "http://thecolbertreport.cc.com/videos/nilxac/<API key>" ], "guest": "Dan Savage" }, { "date": "2010-11-30", "videos": [ "http://thecolbertreport.cc.com/videos/0th7i0/<API key>", "http://thecolbertreport.cc.com/videos/rd3bzl/<API key>", "http://thecolbertreport.cc.com/videos/t2kayc/<API key>", "http://thecolbertreport.cc.com/videos/5qjkay/tom-vilsack", "http://thecolbertreport.cc.com/videos/ovt98b/<API key>" ], "guest": "Tom Vilsack" }, { "date": "2010-12-01", "videos": [ "http://thecolbertreport.cc.com/videos/373wri/<API key>", "http://thecolbertreport.cc.com/videos/hml13u/<API key>", "http://thecolbertreport.cc.com/videos/df8z4y/<API key>", "http://thecolbertreport.cc.com/videos/hbifbv/michelle-rhee", "http://thecolbertreport.cc.com/videos/5oq9dq/<API key>" ], "guest": "Michelle Rhee" }, { "date": "2010-12-02", "videos": [ "http: "http://thecolbertreport.cc.com/videos/y4fa8v/<API key>", "http://thecolbertreport.cc.com/videos/vaqkqk/<API key>", "http://thecolbertreport.cc.com/videos/efh5u1/<API key>", "http://thecolbertreport.cc.com/videos/trmu6j/david-stockman", "http://thecolbertreport.cc.com/videos/v9n94y/<API key>" ], "guest": "David Stockman" }, { "date": "2010-12-06", "videos": [ "http://thecolbertreport.cc.com/videos/exzvsm/<API key>", "http://thecolbertreport.cc.com/videos/bwubcy/<API key>", "http://thecolbertreport.cc.com/videos/eoidl7/<API key>", "http://thecolbertreport.cc.com/videos/wdodc8/garry-trudeau", "http://thecolbertreport.cc.com/videos/gktluk/<API key>" ], "guest": "Garry Trudeau" }, { "date": "2010-12-07", "videos": [ "http://thecolbertreport.cc.com/videos/ishllr/<API key>", "http://thecolbertreport.cc.com/videos/n0u86v/<API key>", "http://thecolbertreport.cc.com/videos/ya6qw9/<API key>", "http://thecolbertreport.cc.com/videos/gf8r28/<API key>", "http://thecolbertreport.cc.com/videos/99syt9/<API key>" ], "guest": "Julie Nixon Eisenhower &amp; David Eisenhower" }, { "date": "2010-12-08", "videos": [ "http://thecolbertreport.cc.com/videos/f6likw/<API key>", "http://thecolbertreport.cc.com/videos/kml8x8/<API key>", "http://thecolbertreport.cc.com/videos/2akwcg/steve-martin-pt--1", "http://thecolbertreport.cc.com/videos/yqcbtk/steve-martin-pt--2", "http://thecolbertreport.cc.com/videos/ct0ud7/<API key>" ], "guest": "Steve Martin" }, { "date": "2010-12-09", "videos": [ "http://thecolbertreport.cc.com/videos/znivka/<API key>", "http://thecolbertreport.cc.com/videos/fi19uy/<API key>", "http://thecolbertreport.cc.com/videos/fk2pnu/<API key>", "http://thecolbertreport.cc.com/videos/1akto9/julie-taymor", "http://thecolbertreport.cc.com/videos/hcd55s/<API key>" ], "guest": "Julie Taymor" }, { "date": "2010-12-13", "videos": [ "http: "http://thecolbertreport.cc.com/videos/eolk50/<API key>", "http://thecolbertreport.cc.com/videos/c1yv8b/<API key>", "http://thecolbertreport.cc.com/videos/btsd4o/<API key>", "http://thecolbertreport.cc.com/videos/rufuhr/patti-smith", "http://thecolbertreport.cc.com/videos/t0590z/<API key>" ], "guest": "Patti Smith" }, { "date": "2010-12-14", "videos": [ "http://thecolbertreport.cc.com/videos/ycermm/<API key>", "http://thecolbertreport.cc.com/videos/rsdutw/<API key>", "http://thecolbertreport.cc.com/videos/4tx5ks/stephen-wins-<TwitterConsumerkey>", "http://thecolbertreport.cc.com/videos/ouqrnm/stephen-sondheim", "http://thecolbertreport.cc.com/videos/ajg2h0/<API key>" ], "guest": "David Boies, Stephen Sondheim" }, { "date": "2010-12-15", "videos": [ "http: "http://thecolbertreport.cc.com/videos/67nfxh/<API key>", "http://thecolbertreport.cc.com/videos/fv3gl9/<API key>", "http://thecolbertreport.cc.com/videos/rr8wvk/<API key>", "http://thecolbertreport.cc.com/videos/e05lny/laird-hamilton", "http://thecolbertreport.cc.com/videos/nv267b/<API key>" ], "guest": "Omar Wasow, Laird Hamilton" }, { "date": "2010-12-16", "videos": [ "http://thecolbertreport.cc.com/videos/cb861t/christmas-holy-week", "http://thecolbertreport.cc.com/videos/m38gcf/<API key>", "http://thecolbertreport.cc.com/videos/tvxon5/amy-sedaris", "http://thecolbertreport.cc.com/videos/zejxdk/paul-simon" ], "guest": "Amy Sedaris, Paul Simon" } ], "2011": [ { "date": "2011-01-03", "videos": [ "http: "http://thecolbertreport.cc.com/videos/pgayak/snowpocalypse-2010", "http://thecolbertreport.cc.com/videos/7b084t/<API key>", "http://thecolbertreport.cc.com/videos/44ybv8/<API key>", "http://thecolbertreport.cc.com/videos/vopb2f/ed-rendell", "http://thecolbertreport.cc.com/videos/bvg4tu/<API key>" ], "guest": "Sen. Bernie Sanders" }, { "date": "2011-01-04", "videos": [ "http: "http://thecolbertreport.cc.com/videos/tq4xo3/<API key>", "http://thecolbertreport.cc.com/videos/kafccc/gold-faithful", "http://thecolbertreport.cc.com/videos/0ds0c9/<API key>", "http://thecolbertreport.cc.com/videos/leatvt/geoffrey-canada", "http://thecolbertreport.cc.com/videos/h983ts/<API key>" ], "guest": "John Heilemann" }, { "date": "2011-01-05", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ttqn4k/<API key>", "http://thecolbertreport.cc.com/videos/4c01zx/<API key>-", "http://thecolbertreport.cc.com/videos/d2586v/<API key>-", "http://thecolbertreport.cc.com/videos/1yfs5a/atul-gawande", "http://thecolbertreport.cc.com/videos/ta25ww/<API key>" ], "guest": "Steve Case" }, { "date": "2011-01-06", "videos": [ "http://thecolbertreport.cc.com/videos/gfffz6/shout-out-to-arby-s", "http://thecolbertreport.cc.com/videos/g7dtso/<API key>", "http://thecolbertreport.cc.com/videos/t27er5/<API key>", "http://thecolbertreport.cc.com/videos/n6wqjn/<API key>", "http://thecolbertreport.cc.com/videos/i48v1q/ronald-depinho", "http://thecolbertreport.cc.com/videos/x8bqqt/<API key>" ], "guest": "Dr. Ronald DePinho" }, { "date": "2011-01-10", "videos": [ "http: "http://thecolbertreport.cc.com/videos/xl3r2n/<API key>", "http://thecolbertreport.cc.com/videos/6s01yh/bull-sessions", "http://thecolbertreport.cc.com/videos/cng4n9/<API key>", "http://thecolbertreport.cc.com/videos/oelxfx/<API key>", "http://thecolbertreport.cc.com/videos/gk32r8/fen-montaigne", "http://thecolbertreport.cc.com/videos/oslcyl/<API key>" ], "guest": "Fen Montaigne" }, { "date": "2011-01-11", "videos": [ "http: "http://thecolbertreport.cc.com/videos/q63emf/<API key>", "http://thecolbertreport.cc.com/videos/rbg8gh/<API key>", "http://thecolbertreport.cc.com/videos/oqami3/lithuania-perfume", "http://thecolbertreport.cc.com/videos/mqh8rb/chris-hughes", "http: ], "guest": "Chris Hughes" }, { "date": "2011-01-12", "videos": [ "http://thecolbertreport.cc.com/videos/1aza8n/<API key>", "http://thecolbertreport.cc.com/videos/b4mxvn/<API key>", "http://thecolbertreport.cc.com/videos/56kjjw/<API key>", "http://thecolbertreport.cc.com/videos/cmxyxs/<API key>", "http://thecolbertreport.cc.com/videos/splrfl/<API key>" ], "guest": "Bernard-Henri Levy" }, { "date": "2011-01-13", "videos": [ "http://thecolbertreport.cc.com/videos/h5qwzv/<API key>", "http://thecolbertreport.cc.com/videos/nhx7bu/<API key>", "http://thecolbertreport.cc.com/videos/wdqdqn/israeli-vulture-spy", "http://thecolbertreport.cc.com/videos/xczq8w/kevin-spacey", "http://thecolbertreport.cc.com/videos/iyyhr8/<API key>" ], "guest": "Kevin Spacey" }, { "date": "2011-01-17", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ztaz7m/<API key>", "http://thecolbertreport.cc.com/videos/9ycstf/<API key>", "http://thecolbertreport.cc.com/videos/ib4cpu/<API key>", "http://thecolbertreport.cc.com/videos/kd5rmr/sherry-turkle", "http://thecolbertreport.cc.com/videos/tj76rr/<API key>" ], "guest": "Sherry Turkle" }, { "date": "2011-01-18", "videos": [ "http: "http://thecolbertreport.cc.com/videos/y6lk8z/<API key>", "http://thecolbertreport.cc.com/videos/1zj4bl/<API key>", "http://thecolbertreport.cc.com/videos/l4vdiw/coma-cozy", "http://thecolbertreport.cc.com/videos/zeukt7/cornel-west", "http://thecolbertreport.cc.com/videos/njlf77/<API key>" ], "guest": "Cornel West" }, { "date": "2011-01-19", "videos": [ "http: "http://thecolbertreport.cc.com/videos/0s8rfq/<API key>", "http://thecolbertreport.cc.com/videos/nujiex/<API key>", "http://thecolbertreport.cc.com/videos/vb8d7c/<API key>", "http://thecolbertreport.cc.com/videos/czmy3b/ron-reagan", "http://thecolbertreport.cc.com/videos/0ycmn7/<API key>" ], "guest": "Ron Reagan Jr." }, { "date": "2011-01-20", "videos": [ "http://thecolbertreport.cc.com/videos/091ydv/<API key>", "http://thecolbertreport.cc.com/videos/bq6mnl/<API key>", "http://thecolbertreport.cc.com/videos/c8u4qm/<API key>", "http://thecolbertreport.cc.com/videos/6pfgfg/chris-matthews", "http://thecolbertreport.cc.com/videos/jjup5d/<API key>" ], "guest": "Chris Matthews" }, { "date": "2011-01-24", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ry0uh0/<API key>", "http://thecolbertreport.cc.com/videos/e7bfej/<API key>", "http://thecolbertreport.cc.com/videos/mjnoqk/<API key>", "http://thecolbertreport.cc.com/videos/rsyf0v/charlie-rose", "http://thecolbertreport.cc.com/videos/v0sh08/<API key>" ], "guest": "Charlie Rose" }, { "date": "2011-01-25", "videos": [ "http: "http://thecolbertreport.cc.com/videos/d21szi/<API key>", "http://thecolbertreport.cc.com/videos/5198pt/<API key>", "http://thecolbertreport.cc.com/videos/ooebba/nazi-ometer", "http://thecolbertreport.cc.com/videos/2lr90o/amy-chua", "http://thecolbertreport.cc.com/videos/71c1bx/<API key>" ], "guest": "Amy Chua" }, { "date": "2011-01-26", "videos": [ "http://thecolbertreport.cc.com/videos/99necf/<API key>", "http://thecolbertreport.cc.com/videos/d2sy94/<API key>", "http://thecolbertreport.cc.com/videos/za0351/<API key>-oda", "http://thecolbertreport.cc.com/videos/wja66h/<API key>", "http://thecolbertreport.cc.com/videos/7znx6n/<API key>" ], "guest": "Michael Waldman, Christine Yvette Lewis" }, { "date": "2011-01-27", "videos": [ "http: "http://thecolbertreport.cc.com/videos/959fok/candyquake", "http://thecolbertreport.cc.com/videos/bhf8jv/<API key>", "http://thecolbertreport.cc.com/videos/uffqf8/<API key>", "http://thecolbertreport.cc.com/videos/zgxlja/brian-greene", "http://thecolbertreport.cc.com/videos/nkbrns/<API key>" ], "guest": "Dr. Daryl Bem, Brian Greene" }, { "date": "2011-01-31", "videos": [ "http: "http://thecolbertreport.cc.com/videos/uv1y3k/<API key>", "http://thecolbertreport.cc.com/videos/w70tw3/<API key>", "http://thecolbertreport.cc.com/videos/35ink0/paul-offit", "http://thecolbertreport.cc.com/videos/ccilnn/<API key>" ], "guest": "Samer Shehata, Dr. Paul Offit" }, { "date": "2011-02-01", "videos": [ "http://thecolbertreport.cc.com/videos/wk9d57/<API key>", "http://thecolbertreport.cc.com/videos/ie8q6j/<API key>", "http://thecolbertreport.cc.com/videos/2ucxw7/<API key>", "http://thecolbertreport.cc.com/videos/odeko3/<API key>", "http://thecolbertreport.cc.com/videos/4shxg7/michael-lewis", "http://thecolbertreport.cc.com/videos/s7oggh/<API key>" ], "guest": "Leslie Dach, Michael Lewis" }, { "date": "2011-02-02", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ct2jwf/bing-gets-served", "http://thecolbertreport.cc.com/videos/a4bw27/<API key>", "http://thecolbertreport.cc.com/videos/q27618/crisis-in-egypt", "http://thecolbertreport.cc.com/videos/yjimo0/<API key>", "http://thecolbertreport.cc.com/videos/dme3nu/sean-dorrance-kelly", "http://thecolbertreport.cc.com/videos/n2upjg/<API key>" ], "guest": "Sean Kelly" }, { "date": "2011-02-03", "videos": [ "http: "http://thecolbertreport.cc.com/videos/lo20rh/<API key>", "http://thecolbertreport.cc.com/videos/vuogyk/<API key>", "http://thecolbertreport.cc.com/videos/91t3tp/<API key>", "http://thecolbertreport.cc.com/videos/i5rwqs/jane-mcgonigal", "http://thecolbertreport.cc.com/videos/hffd6m/<API key>" ], "guest": "Jane McGonigal" }, { "date": "2011-02-14", "videos": [ "http: "http://thecolbertreport.cc.com/videos/4drnjr/<API key>", "http://thecolbertreport.cc.com/videos/gv0hvh/<API key>", "http://thecolbertreport.cc.com/videos/qtecuk/<API key>", "http://thecolbertreport.cc.com/videos/4qawhf/<API key>" ], "guest": "LCD Soundsystem" }, { "date": "2011-02-15", "videos": [ "http: "http://thecolbertreport.cc.com/videos/sjuyr9/<API key>", "http://thecolbertreport.cc.com/videos/ara6q6/<API key>", "http://thecolbertreport.cc.com/videos/n9a7wj/<API key>gould", "http://thecolbertreport.cc.com/videos/uobmig/david-albright", "http://thecolbertreport.cc.com/videos/95itm9/<API key>" ], "guest": "Christiane Amanpour, David Albright" }, { "date": "2011-02-16", "videos": [ "http: "http://thecolbertreport.cc.com/videos/bojft9/<API key>", "http://thecolbertreport.cc.com/videos/uk8a3q/<API key>", "http://thecolbertreport.cc.com/videos/8r9j45/murdoch-he-wrote", "http://thecolbertreport.cc.com/videos/re8ih2/eric-foner", "http://thecolbertreport.cc.com/videos/i84xxd/<API key>" ], "guest": "Eric Foner" }, { "date": "2011-02-17", "videos": [ "http://thecolbertreport.cc.com/videos/62enfw/<API key>", "http://thecolbertreport.cc.com/videos/yjsn8n/<API key>", "http://thecolbertreport.cc.com/videos/tvwda6/<API key>", "http://thecolbertreport.cc.com/videos/sjlg3t/jeffrey-leonard", "http://thecolbertreport.cc.com/videos/m0qkxm/<API key>" ], "guest": "Jeffrey Leonard" }, { "date": "2011-02-21", "videos": [ "http://thecolbertreport.cc.com/videos/86hqgf/<API key>", "http://thecolbertreport.cc.com/videos/lp0v0e/<API key>", "http://thecolbertreport.cc.com/videos/fwkicl/<API key>", "http://thecolbertreport.cc.com/videos/8du0y6/eugene-jarecki", "http://thecolbertreport.cc.com/videos/58iq33/<API key>" ], "guest": "Eugene Jarecki" }, { "date": "2011-02-22", "videos": [ "http: "http://thecolbertreport.cc.com/videos/bm2a1j/<API key>", "http://thecolbertreport.cc.com/videos/usnwve/<API key>", "http://thecolbertreport.cc.com/videos/f6avpd/<API key>", "http://thecolbertreport.cc.com/videos/p92sec/bing-west", "http://thecolbertreport.cc.com/videos/2kp9tj/<API key>" ], "guest": "Randi Weingarten, Bing West" }, { "date": "2011-02-23", "videos": [ "http: "http://thecolbertreport.cc.com/videos/883h13/<API key>", "http://thecolbertreport.cc.com/videos/fn2n7y/bust-in-show", "http://thecolbertreport.cc.com/videos/tnaq8e/<API key>", "http://thecolbertreport.cc.com/videos/iap6wk/stephanie-coontz", "http://thecolbertreport.cc.com/videos/uyxtz0/<API key>" ], "guest": "Stephanie Coontz" }, { "date": "2011-02-24", "videos": [ "http://thecolbertreport.cc.com/videos/7a9kp1/<API key>", "http://thecolbertreport.cc.com/videos/xjtazd/<API key>", "http://thecolbertreport.cc.com/videos/8jruu4/<API key>", "http://thecolbertreport.cc.com/videos/tyiacl/<API key>", "http://thecolbertreport.cc.com/videos/hxtqey/mike-huckabee", "http://thecolbertreport.cc.com/videos/6ahql2/<API key>" ], "guest": "Glenn Greenwald, Mike Huckabee" }, { "date": "2011-02-28", "videos": [ "http: "http://thecolbertreport.cc.com/videos/8fpe6c/<API key>", "http://thecolbertreport.cc.com/videos/ohhby5/<API key>", "http://thecolbertreport.cc.com/videos/lrah7j/<API key>", "http://thecolbertreport.cc.com/videos/4oq5za/michael-scheuer", "http://thecolbertreport.cc.com/videos/qg45nm/<API key>" ], "guest": "Michael Scheuer" }, { "date": "2011-03-01", "videos": [ "http: "http://thecolbertreport.cc.com/videos/hl74h7/<API key>", "http://thecolbertreport.cc.com/videos/ce6ez1/<API key>", "http://thecolbertreport.cc.com/videos/6zdcls/<API key>", "http://thecolbertreport.cc.com/videos/zxzpiz/evan-osnos", "http://thecolbertreport.cc.com/videos/b6gm2j/<API key>" ], "guest": "Evan Osnos" }, { "date": "2011-03-02", "videos": [ "http: "http://thecolbertreport.cc.com/videos/jh2tli/<API key>", "http://thecolbertreport.cc.com/videos/i9x3xr/<API key>", "http://thecolbertreport.cc.com/videos/uz0ktw/eulogy-spot", "http://thecolbertreport.cc.com/videos/7lrvtf/harry-connick-jr-", "http://thecolbertreport.cc.com/videos/ninj2e/<API key>" ], "guest": "Harry Connick Jr." }, { "date": "2011-03-03", "videos": [ "http://thecolbertreport.cc.com/videos/nb3zpi/<API key>", "http://thecolbertreport.cc.com/videos/7vwzpc/<API key>", "http://thecolbertreport.cc.com/videos/4oi0dh/<API key>", "http://thecolbertreport.cc.com/videos/zxu7kb/mark-moffett", "http://thecolbertreport.cc.com/videos/2x8ter/<API key>" ], "guest": "Mark W. Moffett" }, { "date": "2011-03-07", "videos": [ "http: "http://thecolbertreport.cc.com/videos/dmu7rh/<API key>", "http://thecolbertreport.cc.com/videos/zql2lp/<API key>", "http://thecolbertreport.cc.com/videos/mrhaui/<API key>", "http://thecolbertreport.cc.com/videos/ux0w7b/joshua-foer", "http://thecolbertreport.cc.com/videos/un3kdu/<API key>" ], "guest": "Joshua Foer" }, { "date": "2011-03-08", "videos": [ "http://thecolbertreport.cc.com/videos/2s9pic/<API key>", "http://thecolbertreport.cc.com/videos/29cv4a/light-bulb-ban", "http://thecolbertreport.cc.com/videos/yuo5to/<API key>", "http://thecolbertreport.cc.com/videos/2nv2ie/<API key>", "http://thecolbertreport.cc.com/videos/dqh7vp/dan-sinker", "http://thecolbertreport.cc.com/videos/wjd0wx/<API key>" ], "guest": "Dan Sinker" }, { "date": "2011-03-09", "videos": [ "http: "http://thecolbertreport.cc.com/videos/durtx6/<API key>", "http://thecolbertreport.cc.com/videos/c3zm6w/bench-press", "http://thecolbertreport.cc.com/videos/qi1r7y/<API key>", "http://thecolbertreport.cc.com/videos/mbmsxi/david-brooks", "http://thecolbertreport.cc.com/videos/bh348l/<API key>" ], "guest": "David Brooks" }, { "date": "2011-03-10", "videos": [ "http: "http://thecolbertreport.cc.com/videos/w8nzdj/<API key>", "http://thecolbertreport.cc.com/videos/hagj8b/colbert-pac-ad", "http://thecolbertreport.cc.com/videos/k698u1/<API key>", "http://thecolbertreport.cc.com/videos/84jg83/reza-aslan", "http://thecolbertreport.cc.com/videos/x9iaae/<API key>" ], "guest": "Reza Aslan" }, { "date": "2011-03-21", "videos": [ "http: "http://thecolbertreport.cc.com/videos/btot11/<API key>", "http://thecolbertreport.cc.com/videos/kvj8rv/<API key>", "http://thecolbertreport.cc.com/videos/9m4lpg/<API key>" ], "guest": "Steve Martin and the Steep Canyon Rangers" }, { "date": "2011-03-22", "videos": [ "http: "http://thecolbertreport.cc.com/videos/4k1vs5/<API key>", "http://thecolbertreport.cc.com/videos/tadiop/<API key>", "http://thecolbertreport.cc.com/videos/7fv2d8/<API key>", "http://thecolbertreport.cc.com/videos/iky4d9/ayman-mohyeldin", "http://thecolbertreport.cc.com/videos/f8fwxt/<API key>" ], "guest": "Ayman Mohyeldin" }, { "date": "2011-03-23", "videos": [ "http://thecolbertreport.cc.com/videos/m2qxvd/<API key>", "http://thecolbertreport.cc.com/videos/3rhe0w/<API key>", "http://thecolbertreport.cc.com/videos/3ccbj2/<API key>", "http://thecolbertreport.cc.com/videos/wd1pjd/nathan-myhrvold", "http://thecolbertreport.cc.com/videos/l5f2yi/<API key>" ], "guest": "Nathan Myhrvold" }, { "date": "2011-03-24", "videos": [ "http: "http://thecolbertreport.cc.com/videos/o0idw2/<API key>", "http://thecolbertreport.cc.com/videos/pst3ox/<API key>", "http://thecolbertreport.cc.com/videos/strtop/channeled-rage", "http://thecolbertreport.cc.com/videos/rfce7l/jody-williams", "http://thecolbertreport.cc.com/videos/3z7nhm/<API key>" ], "guest": "Jody Williams" }, { "date": "2011-03-28", "videos": [ "http: "http://thecolbertreport.cc.com/videos/vou6it/<API key>", "http://thecolbertreport.cc.com/videos/xeu06g/chaos-in-chaonada", "http://thecolbertreport.cc.com/videos/s3xgtv/<API key>", "http://thecolbertreport.cc.com/videos/c06ht5/maine-squeeze", "http://thecolbertreport.cc.com/videos/2p412b/michael-moore", "http://thecolbertreport.cc.com/videos/lplrhl/<API key>-" ], "guest": "Michael Moore" }, { "date": "2011-03-29", "videos": [ "http: "http://thecolbertreport.cc.com/videos/wtajtw/<API key>", "http://thecolbertreport.cc.com/videos/fkwv1e/<API key>", "http://thecolbertreport.cc.com/videos/oa9b4m/<API key>", "http://thecolbertreport.cc.com/videos/730dpm/<API key>", "http://thecolbertreport.cc.com/videos/7m3guo/anthony-fauci", "http://thecolbertreport.cc.com/videos/ms1yr8/<API key>" ], "guest": "Dr. Anthony Fauci" }, { "date": "2011-03-30", "videos": [ "http://thecolbertreport.cc.com/videos/6nwkpk/<API key>", "http: "http://thecolbertreport.cc.com/videos/wtajtw/<API key>", "http://thecolbertreport.cc.com/videos/fkwv1e/<API key>", "http://thecolbertreport.cc.com/videos/oa9b4m/<API key>", "http://thecolbertreport.cc.com/videos/730dpm/<API key>", "http://thecolbertreport.cc.com/videos/7m3guo/anthony-fauci", "http://thecolbertreport.cc.com/videos/ms1yr8/<API key>" ], "guest": "Tim Shriver" }, { "date": "2011-03-30", "videos": [ "http://thecolbertreport.cc.com/videos/zxtidm/<API key>", "http://thecolbertreport.cc.com/videos/8stgre/colbert-pac", "http://thecolbertreport.cc.com/videos/dtl1ew/<API key>", "http://thecolbertreport.cc.com/videos/i3lpcq/<API key>-", "http://thecolbertreport.cc.com/videos/wug1p5/tim-shriver", "http://thecolbertreport.cc.com/videos/dwx5m0/<API key>" ], "guest": "Tim Shriver" }, { "date": "2011-03-31", "videos": [ "http: "http://thecolbertreport.cc.com/videos/oth30j/<API key>", "http://thecolbertreport.cc.com/videos/j56fvd/madison-as-hell", "http://thecolbertreport.cc.com/videos/o6su04/piers-gibbon", "http://thecolbertreport.cc.com/videos/gq7wfn/<API key>" ], "guest": "Piers Gibbon" }, { "date": "2011-04-04", "videos": [ "http://thecolbertreport.cc.com/videos/nknyci/<API key>", "http://thecolbertreport.cc.com/videos/8fsxhp/<API key>", "http://thecolbertreport.cc.com/videos/953smc/<API key>", "http://thecolbertreport.cc.com/videos/zr09m5/the-glennpocalypse", "http://thecolbertreport.cc.com/videos/j7j5ds/andrew-chaikin", "http://thecolbertreport.cc.com/videos/9h7n61/<API key>" ], "guest": "Andrew Chaikin" }, { "date": "2011-04-05", "videos": [ "http://thecolbertreport.cc.com/videos/x139me/<API key>", "http://thecolbertreport.cc.com/videos/dq1pyh/<API key>", "http://thecolbertreport.cc.com/videos/zw8gjf/james-franco-pt--1", "http://thecolbertreport.cc.com/videos/91jml7/james-franco-pt--2", "http://thecolbertreport.cc.com/videos/upimil/<API key>" ], "guest": "James Franco" }, { "date": "2011-04-06", "videos": [ "http://thecolbertreport.cc.com/videos/1fi1u8/<API key>", "http://thecolbertreport.cc.com/videos/vu85n8/<API key>", "http://thecolbertreport.cc.com/videos/53yz6p/wd-40-1", "http://thecolbertreport.cc.com/videos/q5s3lh/sir-david-tang", "http://thecolbertreport.cc.com/videos/oqhpiw/<API key>" ], "guest": "Sir David Tang" }, { "date": "2011-04-07", "videos": [ "http://thecolbertreport.cc.com/videos/x9mvny/<API key>", "http://thecolbertreport.cc.com/videos/ruv6gp/<API key>", "http: "http://thecolbertreport.cc.com/videos/a3oo5c/<API key>", "http://thecolbertreport.cc.com/videos/uepxed/<API key>", "http://thecolbertreport.cc.com/videos/4zz0jd/<API key>", "http://thecolbertreport.cc.com/videos/hv2afg/jeff-greenfield", "http://thecolbertreport.cc.com/videos/b9aslx/<API key>" ], "guest": "Jeff Greenfield" }, { "date": "2011-04-11", "videos": [ "http://thecolbertreport.cc.com/videos/5p5wwd/<API key>", "http://thecolbertreport.cc.com/videos/wueypc/<API key>", "http://thecolbertreport.cc.com/videos/5o6455/<API key>", "http://thecolbertreport.cc.com/videos/5ej465/<API key>", "http://thecolbertreport.cc.com/videos/sse1uc/<API key>" ], "guest": "Jamie Hyneman &amp; Adam Savage" }, { "date": "2011-04-12", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ez4az7/<API key>", "http://thecolbertreport.cc.com/videos/xcin15/mitt-happens", "http://thecolbertreport.cc.com/videos/l039ce/<API key>", "http://thecolbertreport.cc.com/videos/pqpkrr/<API key>", "http://thecolbertreport.cc.com/videos/2gpjkk/ray-kurzweil", "http://thecolbertreport.cc.com/videos/ry2cgl/<API key>" ], "guest": "Ray Kurzweil" }, { "date": "2011-04-13", "videos": [ "http://thecolbertreport.cc.com/videos/tjsqfs/<API key>", "http://thecolbertreport.cc.com/videos/ha4gop/<API key>", "http://thecolbertreport.cc.com/videos/jc9fbz/<API key>", "http://thecolbertreport.cc.com/videos/nm38xu/morgan-spurlock", "http://thecolbertreport.cc.com/videos/l1ikyh/<API key>" ], "guest": "Morgan Spurlock" }, { "date": "2011-04-14", "videos": [ "http://thecolbertreport.cc.com/videos/fziyvf/<API key>", "http://thecolbertreport.cc.com/videos/pfzzi1/<API key>", "http://thecolbertreport.cc.com/videos/yzb7q2/<API key>", "http://thecolbertreport.cc.com/videos/k099cq/<API key>", "http://thecolbertreport.cc.com/videos/iybrlk/caroline-kennedy", "http: ], "guest": "Caroline Kennedy" }, { "date": "2011-04-25", "videos": [ "http://thecolbertreport.cc.com/videos/00rg0h/catholic-bender", "http://thecolbertreport.cc.com/videos/tml3zz/<API key>", "http://thecolbertreport.cc.com/videos/e943tp/<API key>", "http://thecolbertreport.cc.com/videos/nxhrou/ron-paul", "http://thecolbertreport.cc.com/videos/8813vl/<API key>" ], "guest": "Rep. Ron Paul" }, { "date": "2011-04-26", "videos": [ "http: "http://thecolbertreport.cc.com/videos/zv4zje/<API key>", "http://thecolbertreport.cc.com/videos/rmltni/<API key>", "http://thecolbertreport.cc.com/videos/i3gdyb/a-c--grayling", "http: ], "guest": "A.C. Grayling" }, { "date": "2011-04-27", "videos": [ "http: "http://thecolbertreport.cc.com/videos/cnt2qq/<API key>", "http://thecolbertreport.cc.com/videos/vog079/<API key>", "http://thecolbertreport.cc.com/videos/qu6i2l/<API key>", "http://thecolbertreport.cc.com/videos/okt7ac/ice-t", "http://thecolbertreport.cc.com/videos/bi5bau/<API key>" ], "guest": "Ice-T" }, { "date": "2011-04-28", "videos": [ "http: "http://thecolbertreport.cc.com/videos/6ei496/<API key>", "http://thecolbertreport.cc.com/videos/8ureil/<API key>", "http://thecolbertreport.cc.com/videos/dfmioz/<API key>", "http://thecolbertreport.cc.com/videos/r7zj9a/wade-graham", "http://thecolbertreport.cc.com/videos/tsom8o/<API key>" ], "guest": "Wade Graham" }, { "date": "2011-05-02", "videos": [ "http: "http://thecolbertreport.cc.com/videos/6kw3l1/<API key>", "http://thecolbertreport.cc.com/videos/501cxj/<API key>", "http://thecolbertreport.cc.com/videos/w147rj/<API key>", "http://thecolbertreport.cc.com/videos/x03tm5/francis-fukuyama", "http://thecolbertreport.cc.com/videos/s3o1z2/<API key>" ], "guest": "Francis Fukuyama" }, { "date": "2011-05-03", "videos": [ "http: "http://thecolbertreport.cc.com/videos/h9f07a/<API key>", "http://thecolbertreport.cc.com/videos/5n9zp7/<API key>", "http://thecolbertreport.cc.com/videos/h1wdo9/<API key>", "http://thecolbertreport.cc.com/videos/u2r1n6/rex-ryan", "http://thecolbertreport.cc.com/videos/ukrfvl/<API key>" ], "guest": "Rex Ryan" }, { "date": "2011-05-04", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ndiuxr/<API key>-", "http://thecolbertreport.cc.com/videos/kbkvj6/<API key>", "http://thecolbertreport.cc.com/videos/kt1w5q/<API key>", "http://thecolbertreport.cc.com/videos/50b5cb/amy-farrell", "http://thecolbertreport.cc.com/videos/jcmie8/<API key>" ], "guest": "Amy Farrell" }, { "date": "2011-05-05", "videos": [ "http://thecolbertreport.cc.com/videos/lbrn85/<API key>", "http://thecolbertreport.cc.com/videos/avpz0y/<API key>-", "http://thecolbertreport.cc.com/videos/g2bhyr/<API key>", "http://thecolbertreport.cc.com/videos/4neb1g/bill-james", "http://thecolbertreport.cc.com/videos/k2or8w/<API key>" ], "guest": "Bill James" }, { "date": "2011-05-09", "videos": [ "http: "http://thecolbertreport.cc.com/videos/6rdbxz/<API key>", "http://thecolbertreport.cc.com/videos/mqyr6k/<API key>", "http://thecolbertreport.cc.com/videos/38grqn/<API key>", "http://thecolbertreport.cc.com/videos/d8bi6b/lupe-fiasco", "http://thecolbertreport.cc.com/videos/vonv0r/<API key>-" ], "guest": "Lupe Fiasco" }, { "date": "2011-05-10", "videos": [ "http://thecolbertreport.cc.com/videos/r02fac/<API key>", "http://thecolbertreport.cc.com/videos/w3lgcs/<API key>", "http://thecolbertreport.cc.com/videos/zu0ju2/<API key>", "http://thecolbertreport.cc.com/videos/i4gyok/geoffrey-rush", "http://thecolbertreport.cc.com/videos/wmfolw/<API key>" ], "guest": "Geoffrey Rush" }, { "date": "2011-05-11", "videos": [ "http: "http://thecolbertreport.cc.com/videos/txo75b/<API key>", "http://thecolbertreport.cc.com/videos/1ssaiz/corp-constituency", "http://thecolbertreport.cc.com/videos/nfv0i1/<API key>", "http://thecolbertreport.cc.com/videos/rqvi06/award-to-the-wise", "http://thecolbertreport.cc.com/videos/sjt27k/eric-greitens", "http://thecolbertreport.cc.com/videos/q3siyv/<API key>" ], "guest": "Eric Greitens" }, { "date": "2011-05-12", "videos": [ "http: "http://thecolbertreport.cc.com/videos/zz94qv/<API key>", "http://thecolbertreport.cc.com/videos/vkp4tr/terror--a-new-one", "http://thecolbertreport.cc.com/videos/9o0mt6/<API key>", "http://thecolbertreport.cc.com/videos/dqvz13/<API key>", "http://thecolbertreport.cc.com/videos/yx5grt/john-bradshaw", "http://thecolbertreport.cc.com/videos/sw8fy6/<API key>" ], "guest": "John Bradshaw" }, { "date": "2011-05-16", "videos": [ "http://thecolbertreport.cc.com/videos/9xaxr4/<API key>", "http://thecolbertreport.cc.com/videos/duon08/<API key>", "http://thecolbertreport.cc.com/videos/epwg6t/<API key>", "http://thecolbertreport.cc.com/videos/g3ep11/alison-klayman", "http://thecolbertreport.cc.com/videos/4r7evh/<API key>" ], "guest": "Alison Klayman" }, { "date": "2011-05-17", "videos": [ "http: "http://thecolbertreport.cc.com/videos/1ugsri/<API key>", "http://thecolbertreport.cc.com/videos/l4p5dq/<API key>", "http://thecolbertreport.cc.com/videos/pg06l0/<API key>", "http://thecolbertreport.cc.com/videos/58filp/amy-kremer", "http://thecolbertreport.cc.com/videos/no1rv9/<API key>" ], "guest": "Amy Kremer" }, { "date": "2011-05-18", "videos": [ "http://thecolbertreport.cc.com/videos/faf2no/<API key>", "http://thecolbertreport.cc.com/videos/6pf58s/<API key>", "http://thecolbertreport.cc.com/videos/bdi4g4/<API key>", "http: "http://thecolbertreport.cc.com/videos/55ye8a/<API key>", "http://thecolbertreport.cc.com/videos/tohq6g/<API key>", "http://thecolbertreport.cc.com/videos/2cxcrh/breaking-newt", "http://thecolbertreport.cc.com/videos/vvu071/austan-goolsbee", "http://thecolbertreport.cc.com/videos/sklv51/<API key>" ], "guest": "Austan Goolsbee" }, { "date": "2011-05-19", "videos": [ "http://thecolbertreport.cc.com/videos/7qmvog/<API key>", "http://thecolbertreport.cc.com/videos/pb82sf/<API key>", "http://thecolbertreport.cc.com/videos/3gd1zf/<API key>", "http://thecolbertreport.cc.com/videos/5ec3r8/kareem-abdul-jabbar", "http://thecolbertreport.cc.com/videos/p12tcc/<API key>" ], "guest": "Kareem Abdul-Jabbar" }, { "date": "2011-05-31", "videos": [ "http: "http://thecolbertreport.cc.com/videos/xxn340/<API key>", "http://thecolbertreport.cc.com/videos/fgthom/<API key>", "http://thecolbertreport.cc.com/videos/bmwaxh/<API key>", "http://thecolbertreport.cc.com/videos/7bl2ga/invisible-judgment", "http://thecolbertreport.cc.com/videos/ox3on4/james-stewart", "http://thecolbertreport.cc.com/videos/vn091b/<API key>" ], "guest": "James B. Stewart" }, { "date": "2011-06-01", "videos": [ "http: "http://thecolbertreport.cc.com/videos/mqb30h/<API key>", "http://thecolbertreport.cc.com/videos/ul70kx/meat-tweet", "http://thecolbertreport.cc.com/videos/jph6sv/harmful-cell-phones", "http://thecolbertreport.cc.com/videos/beqc1p/<API key>", "http://thecolbertreport.cc.com/videos/5a4ke7/<API key>-", "http: ], "guest": "Robert Kennedy Jr." }, { "date": "2011-06-02", "videos": [ "http: "http://thecolbertreport.cc.com/videos/rqi6dy/<API key>", "http://thecolbertreport.cc.com/videos/1db84y/<API key>", "http://thecolbertreport.cc.com/videos/qhexu1/<API key>", "http://thecolbertreport.cc.com/videos/8t7m7k/salman-khan", "http://thecolbertreport.cc.com/videos/rqa2ar/<API key>" ], "guest": "Salman Khan" }, { "date": "2011-06-06", "videos": [ "http://thecolbertreport.cc.com/videos/bwqzbu/<API key>", "http://thecolbertreport.cc.com/videos/uvi91o/<API key>", "http://thecolbertreport.cc.com/videos/x424g2/<API key>", "http://thecolbertreport.cc.com/videos/qyadrw/<API key>", "http://thecolbertreport.cc.com/videos/fdolcv/werner-herzog", "http://thecolbertreport.cc.com/videos/ed6qec/<API key>" ], "guest": "Werner Herzog" }, { "date": "2011-06-07", "videos": [ "http://thecolbertreport.cc.com/videos/suzxde/<API key>", "http://thecolbertreport.cc.com/videos/1w9fvc/<API key>", "http://thecolbertreport.cc.com/videos/fvvawg/sugar-ray-leonard", "http://thecolbertreport.cc.com/videos/b4ot0e/<API key>" ], "guest": "Sugar Ray Leonard" }, { "date": "2011-06-08", "videos": [ "http://thecolbertreport.cc.com/videos/fq1085/<API key>", "http://thecolbertreport.cc.com/videos/bmggoz/<API key>", "http://thecolbertreport.cc.com/videos/ycdgvg/<API key>", "http://thecolbertreport.cc.com/videos/yvz8wj/bre-pettis", "http://thecolbertreport.cc.com/videos/ao2r17/<API key>" ], "guest": "Bre Pettis" }, { "date": "2011-06-09", "videos": [ "http://thecolbertreport.cc.com/videos/tz9edm/<API key>", "http://thecolbertreport.cc.com/videos/umrvml/<API key>", "http://thecolbertreport.cc.com/videos/qgxogp/<API key>", "http://thecolbertreport.cc.com/videos/oneftb/<API key>", "http://thecolbertreport.cc.com/videos/5f3kap/tom-ridge", "http://thecolbertreport.cc.com/videos/vvj5q2/<API key>" ], "guest": "Tom Ridge" }, { "date": "2011-06-13", "videos": [ "http://thecolbertreport.cc.com/videos/0zzkov/<API key>", "http://thecolbertreport.cc.com/videos/vgcql3/<API key>", "http://thecolbertreport.cc.com/videos/vyyl7z/<API key>", "http://thecolbertreport.cc.com/videos/2j87li/<API key>", "http://thecolbertreport.cc.com/videos/w5b5l1/<API key>" ], "guest": "Henry Kissinger" }, { "date": "2011-06-14", "videos": [ "http: "http://thecolbertreport.cc.com/videos/egh1n7/<API key>", "http://thecolbertreport.cc.com/videos/ykt712/close-sesame", "http://thecolbertreport.cc.com/videos/s6kp16/janny-scott", "http://thecolbertreport.cc.com/videos/j0gylk/<API key>" ], "guest": "Janny Scott" }, { "date": "2011-06-15", "videos": [ "http: "http://thecolbertreport.cc.com/videos/zj00ia/<API key>", "http://thecolbertreport.cc.com/videos/xbt4w9/kindergarten-gop", "http://thecolbertreport.cc.com/videos/ynp682/<API key>", "http://thecolbertreport.cc.com/videos/46tlsv/<API key>", "http://thecolbertreport.cc.com/videos/5h6ee5/keith-olbermann", "http://thecolbertreport.cc.com/videos/5rh3rg/<API key>" ], "guest": "Keith Olbermann" }, { "date": "2011-06-20", "videos": [ "http: "http://thecolbertreport.cc.com/videos/q7b70y/<API key>", "http://thecolbertreport.cc.com/videos/y7lr8u/<API key>", "http://thecolbertreport.cc.com/videos/gds7n9/justin-vernon", "http://thecolbertreport.cc.com/videos/su735n/<API key>" ], "guest": "Bon Iver" }, { "date": "2011-06-21", "videos": [ "http://thecolbertreport.cc.com/videos/3o3le7/<API key>", "http://thecolbertreport.cc.com/videos/ct0au7/<API key>", "http://thecolbertreport.cc.com/videos/v43nph/<API key>", "http://thecolbertreport.cc.com/videos/7e8ifi/florence-welch", "http://thecolbertreport.cc.com/videos/ei7r0b/<API key>" ], "guest": "Florence and the Machine" }, { "date": "2011-06-22", "videos": [ "http://thecolbertreport.cc.com/videos/f5h9ob/<API key>", "http://thecolbertreport.cc.com/videos/ozlnky/<API key>", "http://thecolbertreport.cc.com/videos/u3bmmq/<API key>", "http://thecolbertreport.cc.com/videos/c7shlp/talib-kweli" ], "guest": "Talib Kweli" }, { "date": "2011-06-23", "videos": [ "http://thecolbertreport.cc.com/videos/ihqt34/<API key>", "http://thecolbertreport.cc.com/videos/zbc2ok/<API key>", "http://thecolbertreport.cc.com/videos/1if3ir/<API key>", "http://thecolbertreport.cc.com/videos/4evhq9/<API key>", "http://thecolbertreport.cc.com/videos/39or3g/jack-white" ], "guest": "The Black Belles" }, { "date": "2011-06-27", "videos": [ "http: "http://thecolbertreport.cc.com/videos/zz1v27/<API key>", "http://thecolbertreport.cc.com/videos/7e3kfb/<API key>", "http://thecolbertreport.cc.com/videos/npgonl/<API key>", "http://thecolbertreport.cc.com/videos/89vjk7/grover-norquist", "http://thecolbertreport.cc.com/videos/fe2wnr/<API key>" ], "guest": "Grover Norquist" }, { "date": "2011-06-28", "videos": [ "http: "http://thecolbertreport.cc.com/videos/im5by3/<API key>", "http://thecolbertreport.cc.com/videos/b2dez1/<API key>", "http://thecolbertreport.cc.com/videos/eztgrx/<API key>", "http://thecolbertreport.cc.com/videos/jfztdi/alexandra-pelosi", "http://thecolbertreport.cc.com/videos/1it2j9/<API key>" ], "guest": "Alexandra Pelosi" }, { "date": "2011-06-29", "videos": [ "http: "http://thecolbertreport.cc.com/videos/s3xttd/<API key>", "http://thecolbertreport.cc.com/videos/7gul1z/<API key>", "http://thecolbertreport.cc.com/videos/kco7lo/<API key>", "http://thecolbertreport.cc.com/videos/o7wrgl/<API key>", "http://thecolbertreport.cc.com/videos/zc23xv/gary-sinise", "http://thecolbertreport.cc.com/videos/80a7v2/<API key>" ], "guest": "Gary Sinise" }, { "date": "2011-06-30", "videos": [ "http: "http://thecolbertreport.cc.com/videos/gffis7/<API key>-", "http://thecolbertreport.cc.com/videos/uf525x/<API key>", "http://thecolbertreport.cc.com/videos/owodco/<API key>", "http://thecolbertreport.cc.com/videos/807lhi/timothy-garton-ash", "http://thecolbertreport.cc.com/videos/b2dqnd/<API key>" ], "guest": "Timothy Garton Ash" }, { "date": "2011-07-11", "videos": [ "http: "http://thecolbertreport.cc.com/videos/sgqex9/<API key>", "http://thecolbertreport.cc.com/videos/m3svek/anti-frack-attacks", "http://thecolbertreport.cc.com/videos/2h3oe2/<API key>", "http://thecolbertreport.cc.com/videos/z2r2b0/michael-shermer", "http://thecolbertreport.cc.com/videos/g47pr3/<API key>" ], "guest": "Michael Shermer" }, { "date": "2011-07-12", "videos": [ "http://thecolbertreport.cc.com/videos/20gpt7/herman-cain-train", "http://thecolbertreport.cc.com/videos/7aive1/<API key>", "http://thecolbertreport.cc.com/videos/7sobpk/<API key>", "http://thecolbertreport.cc.com/videos/vw4tol/dan-savage", "http://thecolbertreport.cc.com/videos/nkuukl/<API key>" ], "guest": "Dan Savage" }, { "date": "2011-07-13", "videos": [ "http: "http://thecolbertreport.cc.com/videos/70lgql/flagworth-2012", "http://thecolbertreport.cc.com/videos/7gb5kn/<API key>", "http://thecolbertreport.cc.com/videos/palj9t/<API key>", "http://thecolbertreport.cc.com/videos/5ulzg5/david-mccullough", "http: ], "guest": "David McCullough" }, { "date": "2011-07-14", "videos": [ "http: "http://thecolbertreport.cc.com/videos/8oisqi/carmageddon", "http://thecolbertreport.cc.com/videos/uqj8qb/<API key>", "http://thecolbertreport.cc.com/videos/a29405/<API key>", "http://thecolbertreport.cc.com/videos/1o1flh/<API key>", "http://thecolbertreport.cc.com/videos/82ovjs/jose-antonio-vargas", "http://thecolbertreport.cc.com/videos/9nwz4n/<API key>" ], "guest": "Jose Antonio Vargas" }, { "date": "2011-07-18", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ybue54/epic-blockbuster", "http://thecolbertreport.cc.com/videos/7t9e81/<API key>", "http://thecolbertreport.cc.com/videos/73lwqj/<API key>", "http://thecolbertreport.cc.com/videos/9q309t/<API key>", "http://thecolbertreport.cc.com/videos/36812w/john-prendergast", "http://thecolbertreport.cc.com/videos/d8rt51/<API key>" ], "guest": "John Prendergast" }, { "date": "2011-07-19", "videos": [ "http://thecolbertreport.cc.com/videos/bcunwj/newt-s-white-whale", "http://thecolbertreport.cc.com/videos/nhl043/<API key>", "http://thecolbertreport.cc.com/videos/6cdpui/<API key>", "http://thecolbertreport.cc.com/videos/maophz/david-carr", "http://thecolbertreport.cc.com/videos/50pek1/<API key>" ], "guest": "David Carr" }, { "date": "2011-07-20", "videos": [ "http://thecolbertreport.cc.com/videos/pmh9y8/humanized-by-pie", "http://thecolbertreport.cc.com/videos/ozixqy/voter-id-laws", "http://thecolbertreport.cc.com/videos/2i29ww/<API key>", "http://thecolbertreport.cc.com/videos/2p2ijk/michael-sandel", "http: ], "guest": "Michael Sandel" }, { "date": "2011-07-21", "videos": [ "http: "http://thecolbertreport.cc.com/videos/l3rcr1/<API key>", "http://thecolbertreport.cc.com/videos/vntv81/<API key>", "http://thecolbertreport.cc.com/videos/6yym31/<API key>", "http://thecolbertreport.cc.com/videos/9catel/david-eagleman", "http://thecolbertreport.cc.com/videos/nn8qoh/<API key>" ], "guest": "David Eagleman" }, { "date": "2011-07-25", "videos": [ "http://thecolbertreport.cc.com/videos/l0wxhe/y2-gay", "http://thecolbertreport.cc.com/videos/fbd6kf/<API key>", "http://thecolbertreport.cc.com/videos/wznkdz/<API key>", "http://thecolbertreport.cc.com/videos/z4gfkc/brian-cox", "http://thecolbertreport.cc.com/videos/9q5n38/<API key>" ], "guest": "Brian Cox" }, { "date": "2011-07-26", "videos": [ "http: "http://thecolbertreport.cc.com/videos/umjv5s/<API key>", "http://thecolbertreport.cc.com/videos/zq2rpw/-poor--in-america", "http://thecolbertreport.cc.com/videos/j2gcnk/-<API key>", "http://thecolbertreport.cc.com/videos/a4awyb/<API key>", "http://thecolbertreport.cc.com/videos/azl59v/brooke-gladstone", "http://thecolbertreport.cc.com/videos/ly4qfz/<API key>" ], "guest": "Brooke Gladstone" }, { "date": "2011-07-27", "videos": [ "http://thecolbertreport.cc.com/videos/zq1omv/<API key>", "http://thecolbertreport.cc.com/videos/x50fvb/<API key>", "http://thecolbertreport.cc.com/videos/3o44r7/helium-runs-out", "http://thecolbertreport.cc.com/videos/omkngv/missy-cummings", "http://thecolbertreport.cc.com/videos/y4zc9o/<API key>" ], "guest": "Mary \"Missy\" Cummings" }, { "date": "2011-07-28", "videos": [ "http://thecolbertreport.cc.com/videos/8c1oeo/<API key>", "http://thecolbertreport.cc.com/videos/yzmsiz/<API key>", "http://thecolbertreport.cc.com/videos/e4r2vc/<API key>", "http://thecolbertreport.cc.com/videos/z6f8m4/buddy-roemer-pt--1", "http://thecolbertreport.cc.com/videos/n4ldiq/buddy-roemer-pt--2", "http://thecolbertreport.cc.com/videos/tzpdu5/<API key>" ], "guest": "Buddy Roemer" }, { "date": "2011-08-01", "videos": [ "http: "http://thecolbertreport.cc.com/videos/lrz1ud/-<API key>", "http://thecolbertreport.cc.com/videos/mgkqu6/<API key>", "http://thecolbertreport.cc.com/videos/6v3oa3/<API key>", "http://thecolbertreport.cc.com/videos/mqbxt0/tony-hsieh", "http: ], "guest": "Tony Hsieh" }, { "date": "2011-08-02", "videos": [ "http: "http://thecolbertreport.cc.com/videos/j862uf/<API key>", "http://thecolbertreport.cc.com/videos/pzfcj1/<API key>", "http://thecolbertreport.cc.com/videos/y1xqdj/<API key>", "http://thecolbertreport.cc.com/videos/gg2p1r/baby-teeth-economy", "http://thecolbertreport.cc.com/videos/id20x6/al-hunt", "http://thecolbertreport.cc.com/videos/h26uru/<API key>" ], "guest": "Al Hunt" }, { "date": "2011-08-03", "videos": [ "http: "http://thecolbertreport.cc.com/videos/3i1326/<API key>", "http://thecolbertreport.cc.com/videos/f3w320/<API key>", "http://thecolbertreport.cc.com/videos/cvc16w/<API key>", "http://thecolbertreport.cc.com/videos/6x0m3y/robert-wittman", "http://thecolbertreport.cc.com/videos/utsxoh/<API key>" ], "guest": "Robert Wittman" }, { "date": "2011-08-04", "videos": [ "http: "http://thecolbertreport.cc.com/videos/8tx5s2/<API key>", "http://thecolbertreport.cc.com/videos/7ahjkr/<API key>", "http://thecolbertreport.cc.com/videos/ma6ejy/<API key>", "http://thecolbertreport.cc.com/videos/8q9pe2/<API key>", "http://thecolbertreport.cc.com/videos/d8704f/anthony-bourdain", "http://thecolbertreport.cc.com/videos/afj5qe/<API key>" ], "guest": "Anthony Bourdain" }, { "date": "2011-08-08", "videos": [ "http://thecolbertreport.cc.com/videos/smerqo/<API key>", "http://thecolbertreport.cc.com/videos/y7x3es/<API key>", "http://thecolbertreport.cc.com/videos/lu1v74/<API key>", "http://thecolbertreport.cc.com/videos/wkairk/nassir-ghaemi", "http://thecolbertreport.cc.com/videos/4zkkn5/<API key>" ], "guest": "Nassir Ghaemi" }, { "date": "2011-08-09", "videos": [ "http: "http://thecolbertreport.cc.com/videos/pxptx8/heatsteria", "http://thecolbertreport.cc.com/videos/rtqznl/<API key>", "http://thecolbertreport.cc.com/videos/gj6vb5/ric-ocasek" ], "guest": "The Cars" }, { "date": "2011-08-10", "videos": [ "http: "http://thecolbertreport.cc.com/videos/1jlwac/<API key>", "http://thecolbertreport.cc.com/videos/cw4el2/<API key>", "http://thecolbertreport.cc.com/videos/uulxb3/<API key>", "http://thecolbertreport.cc.com/videos/15zleh/<API key>", "http://thecolbertreport.cc.com/videos/zxka8u/elliot-ackerman", "http://thecolbertreport.cc.com/videos/mvgmwy/<API key>" ], "guest": "Elliott Ackerman" }, { "date": "2011-08-11", "videos": [ "http://thecolbertreport.cc.com/videos/pi19ix/<API key>", "http://thecolbertreport.cc.com/videos/x1aodj/<API key>", "http://thecolbertreport.cc.com/videos/etbj36/<API key>-", "http://thecolbertreport.cc.com/videos/90ptp7/<API key>", "http://thecolbertreport.cc.com/videos/swbu9s/<API key>", "http://thecolbertreport.cc.com/videos/yu257u/gloria-steinem", "http://thecolbertreport.cc.com/videos/7x3ryp/<API key>" ], "guest": "Gloria Steinem" }, { "date": "2011-08-15", "videos": [ "http://thecolbertreport.cc.com/videos/40fotx/<API key>", "http://thecolbertreport.cc.com/videos/vvlrva/<API key>", "http://thecolbertreport.cc.com/videos/lqjncy/<API key>", "http://thecolbertreport.cc.com/videos/0yyo1z/<API key>", "http://thecolbertreport.cc.com/videos/dzchwi/<API key>", "http://thecolbertreport.cc.com/videos/dkh4ps/susan-rice-pt--1", "http://thecolbertreport.cc.com/videos/nla0b4/susan-rice-pt--2", "http://thecolbertreport.cc.com/videos/1rtsq5/<API key>" ], "guest": "Amb. Susan Rice" }, { "date": "2011-08-16", "videos": [ "http://thecolbertreport.cc.com/videos/i0nwuy/<API key>", "http://thecolbertreport.cc.com/videos/8gjrx4/<API key>", "http://thecolbertreport.cc.com/videos/rmrfc3/<API key>-", "http://thecolbertreport.cc.com/videos/cjfda6/<API key>", "http://thecolbertreport.cc.com/videos/m00z1i/<API key>", "http://thecolbertreport.cc.com/videos/a8v2gy/<API key>", "http://thecolbertreport.cc.com/videos/nnfhdg/<API key>", "http://thecolbertreport.cc.com/videos/h83o7v/<API key>" ], "guest": "STS-135 astronauts" }, { "date": "2011-08-17", "videos": [ "http://thecolbertreport.cc.com/videos/brmz0s/<API key>", "http: "http://thecolbertreport.cc.com/videos/yk47i3/<API key>", "http://thecolbertreport.cc.com/videos/uiim37/<API key>", "http://thecolbertreport.cc.com/videos/4km5oi/jeff-bridges", "http://thecolbertreport.cc.com/videos/1bb0sg/<API key>" ], "guest": "Jeff Bridges" }, { "date": "2011-08-18", "videos": [ "http: "http://thecolbertreport.cc.com/videos/oqd808/<API key>", "http://thecolbertreport.cc.com/videos/j31bbb/<API key>-", "http://thecolbertreport.cc.com/videos/94c0x7/<API key>", "http://thecolbertreport.cc.com/videos/ger41z/<API key>", "http://thecolbertreport.cc.com/videos/1yhudu/kevin-mitnick", "http://thecolbertreport.cc.com/videos/5r0lwc/<API key>" ], "guest": "Kevin Mitnick" }, { "date": "2011-09-06", "videos": [ "http://thecolbertreport.cc.com/videos/s3kv9p/<API key>", "http://thecolbertreport.cc.com/videos/fk34r7/<API key>", "http://thecolbertreport.cc.com/videos/ovw3t4/<API key>", "http://thecolbertreport.cc.com/videos/1cua0e/tim-pawlenty", "http://thecolbertreport.cc.com/videos/d2roue/<API key>" ], "guest": "Gov. Tim Pawlenty" }, { "date": "2011-09-07", "videos": [ "http: "http://thecolbertreport.cc.com/videos/nw0vtw/<API key>", "http://thecolbertreport.cc.com/videos/dhg1or/<API key>", "http://thecolbertreport.cc.com/videos/796niz/<API key>", "http://thecolbertreport.cc.com/videos/h8ndj7/robin-wright", "http://thecolbertreport.cc.com/videos/we0bnb/<API key>" ], "guest": "Robin B. Wright" }, { "date": "2011-09-08", "videos": [ "http://thecolbertreport.cc.com/videos/6ut02o/<API key>", "http://thecolbertreport.cc.com/videos/0yghln/rick-perry-presents", "http://thecolbertreport.cc.com/videos/pf00vn/<API key>", "http://thecolbertreport.cc.com/videos/5x0a3c/tom-brokaw", "http://thecolbertreport.cc.com/videos/lwsx3m/<API key>" ], "guest": "Tom Brokaw" }, { "date": "2011-09-12", "videos": [ "http://thecolbertreport.cc.com/videos/3ooncl/<API key>", "http://thecolbertreport.cc.com/videos/4ig8mh/<API key>", "http://thecolbertreport.cc.com/videos/eicjwv/<API key>", "http://thecolbertreport.cc.com/videos/sxy47f/diane-sawyer", "http://thecolbertreport.cc.com/videos/g2jfq9/<API key>" ], "guest": "Diane Sawyer" }, { "date": "2011-09-13", "videos": [ "http: "http://thecolbertreport.cc.com/videos/6jpgl3/<API key>", "http://thecolbertreport.cc.com/videos/swyrcg/<API key>", "http://thecolbertreport.cc.com/videos/q1hw3n/<API key>", "http://thecolbertreport.cc.com/videos/t7gpb8/ron-paul-2012", "http://thecolbertreport.cc.com/videos/2cr39e/al-gore", "http://thecolbertreport.cc.com/videos/e1gewo/<API key>-" ], "guest": "Al Gore" }, { "date": "2011-09-14", "videos": [ "http://thecolbertreport.cc.com/videos/thyhg7/jobs-bill-clipgate", "http://thecolbertreport.cc.com/videos/gvt0ij/return-to-sender", "http://thecolbertreport.cc.com/videos/3h08e2/<API key>", "http://thecolbertreport.cc.com/videos/gz48mn/<API key>", "http://thecolbertreport.cc.com/videos/dx27ks/michael-moore", "http://thecolbertreport.cc.com/videos/3rxw2x/<API key>" ], "guest": "Michael Moore" }, { "date": "2011-09-15", "videos": [ "http: "http://thecolbertreport.cc.com/videos/rte3k7/<API key>", "http://thecolbertreport.cc.com/videos/15vhbi/<API key>", "http://thecolbertreport.cc.com/videos/rje3k2/<API key>", "http://thecolbertreport.cc.com/videos/h90n13/<API key>", "http://thecolbertreport.cc.com/videos/b406bd/david-copperfield", "http://thecolbertreport.cc.com/videos/7m5lpn/<API key>" ], "guest": "David Copperfield" }, { "date": "2011-09-20", "videos": [ "http://thecolbertreport.cc.com/videos/tpoc1g/<API key>", "http://thecolbertreport.cc.com/videos/whouap/<API key>-", "http://thecolbertreport.cc.com/videos/pyq49u/<API key>", "http://thecolbertreport.cc.com/videos/3q875w/<API key>", "http://thecolbertreport.cc.com/videos/xnvm51/jeffrey-kluger", "http://thecolbertreport.cc.com/videos/t0vjb4/<API key>" ], "guest": "Jeffrey Kluger" }, { "date": "2011-09-21", "videos": [ "http: "http://thecolbertreport.cc.com/videos/negwpt/<API key>", "http://thecolbertreport.cc.com/videos/kyxdz3/<API key>", "http://thecolbertreport.cc.com/videos/t51ow7/<API key>", "http://thecolbertreport.cc.com/videos/wvyk91/<API key>", "http://thecolbertreport.cc.com/videos/z0celp/daniel-yergin", "http: ], "guest": "Daniel Yergin" }, { "date": "2011-09-22", "videos": [ "http://thecolbertreport.cc.com/videos/9dc7h4/<API key>", "http://thecolbertreport.cc.com/videos/szcqls/<API key>", "http://thecolbertreport.cc.com/videos/6uyhy5/<API key>", "http://thecolbertreport.cc.com/videos/ncny69/jeremy-ben-ami", "http://thecolbertreport.cc.com/videos/akoxfi/<API key>" ], "guest": "Jeremy Ben-Ami" }, { "date": "2011-09-26", "videos": [ "http: "http://thecolbertreport.cc.com/videos/p9c0ds/<API key>", "http://thecolbertreport.cc.com/videos/u4qbft/<API key>", "http://thecolbertreport.cc.com/videos/grlcgn/radiohead", "http://thecolbertreport.cc.com/videos/xqeu3w/<API key>", "http://thecolbertreport.cc.com/videos/wwvu7o/<API key>" ], "guest": "Radiohead" }, { "date": "2011-09-27", "videos": [ "http://thecolbertreport.cc.com/videos/9qb4vy/<API key>", "http://thecolbertreport.cc.com/videos/tsm4sg/<API key>", "http://thecolbertreport.cc.com/videos/5mvmay/<API key>", "http://thecolbertreport.cc.com/videos/ptxagr/melinda-gates", "http://thecolbertreport.cc.com/videos/zlthc8/<API key>" ], "guest": "Melinda Gates" }, { "date": "2011-09-28", "videos": [ "http: "http://thecolbertreport.cc.com/videos/udzuyb/<API key>", "http://thecolbertreport.cc.com/videos/tbuq71/<API key>", "http://thecolbertreport.cc.com/videos/3qmkez/<API key>", "http://thecolbertreport.cc.com/videos/ndmtp9/ken-burns", "http://thecolbertreport.cc.com/videos/osmia6/<API key>" ], "guest": "Ken Burns" }, { "date": "2011-09-29", "videos": [ "http://thecolbertreport.cc.com/videos/0agwtq/mark-cuban-dances", "http://thecolbertreport.cc.com/videos/ivvzeu/<API key>", "http://thecolbertreport.cc.com/videos/3yzu4u/<API key>", "http://thecolbertreport.cc.com/videos/ujyuht/<API key>", "http://thecolbertreport.cc.com/videos/qiwg3k/mark-cuban", "http://thecolbertreport.cc.com/videos/8ekdsc/<API key>" ], "guest": "Mark Cuban" }, { "date": "2011-10-03", "videos": [ "http://thecolbertreport.cc.com/videos/fehwjq/<API key>", "http://thecolbertreport.cc.com/videos/m272fc/<API key>", "http://thecolbertreport.cc.com/videos/v2njjc/<API key>", "http://thecolbertreport.cc.com/videos/25ffk2/<API key>", "http://thecolbertreport.cc.com/videos/wmazj5/jerome-groopman", "http://thecolbertreport.cc.com/videos/kp6658/<API key>" ], "guest": "Jerome Groopman" }, { "date": "2011-10-04", "videos": [ "http: "http://thecolbertreport.cc.com/videos/3wq74s/chris-christie-2012", "http://thecolbertreport.cc.com/videos/3dpzet/<API key>", "http://thecolbertreport.cc.com/videos/cwuy2m/<API key>", "http://thecolbertreport.cc.com/videos/xhc68w/john-lithgow", "http://thecolbertreport.cc.com/videos/n16lxn/<API key>" ], "guest": "John Lithgow" }, { "date": "2011-10-05", "videos": [ "http: "http://thecolbertreport.cc.com/videos/xnxfq5/herman-cain-2012", "http://thecolbertreport.cc.com/videos/dbbjic/<API key>", "http://thecolbertreport.cc.com/videos/6kkk93/<API key>", "http://thecolbertreport.cc.com/videos/ifegp7/<API key>-", "http://thecolbertreport.cc.com/videos/7edjef/<API key>" ], "guest": "Mos Def &amp; Talib Kweli" }, { "date": "2011-10-06", "videos": [ "http://thecolbertreport.cc.com/videos/0qyxlz/<API key>", "http: "http://thecolbertreport.cc.com/videos/z103m6/<API key>", "http://thecolbertreport.cc.com/videos/yarfv2/<API key>", "http://thecolbertreport.cc.com/videos/fottda/<API key>", "http://thecolbertreport.cc.com/videos/98xl59/jason-amerine", "http://thecolbertreport.cc.com/videos/oy1k9u/<API key>" ], "guest": "Jason Amerine" }, { "date": "2011-10-17", "videos": [ "http://thecolbertreport.cc.com/videos/nng5h7/<API key>", "http://thecolbertreport.cc.com/videos/gj3y6l/<API key>", "http://thecolbertreport.cc.com/videos/z27tp0/<API key>", "http://thecolbertreport.cc.com/videos/6vl2zq/<API key>", "http://thecolbertreport.cc.com/videos/01fxlb/harry-belafonte", "http://thecolbertreport.cc.com/videos/s0qu24/<API key>" ], "guest": "Harry Belafonte" }, { "date": "2011-10-18", "videos": [ "http://thecolbertreport.cc.com/videos/h40j2n/talking-iphone-4s", "http://thecolbertreport.cc.com/videos/ta7e7u/<API key>", "http://thecolbertreport.cc.com/videos/cbwqbb/<API key>", "http://thecolbertreport.cc.com/videos/3h8h2l/steven-pinker", "http://thecolbertreport.cc.com/videos/9c1bsf/<API key>" ], "guest": "Steven Pinker" }, { "date": "2011-10-19", "videos": [ "http: "http://thecolbertreport.cc.com/videos/gghhza/<API key>", "http://thecolbertreport.cc.com/videos/ubi151/job-killing-epa", "http://thecolbertreport.cc.com/videos/zi48pt/<API key>", "http://thecolbertreport.cc.com/videos/f49qpp/<API key>", "http://thecolbertreport.cc.com/videos/fztuzs/ali-soufan", "http://thecolbertreport.cc.com/videos/kodm5a/<API key>" ], "guest": "Ali Soufan" }, { "date": "2011-10-20", "videos": [ "http: "http://thecolbertreport.cc.com/videos/5p2a33/<API key>", "http://thecolbertreport.cc.com/videos/5xgc3k/<API key>", "http://thecolbertreport.cc.com/videos/ql433h/<API key>-", "http://thecolbertreport.cc.com/videos/qw2pao/chris-martin" ], "guest": "Coldplay" }, { "date": "2011-10-24", "videos": [ "http://thecolbertreport.cc.com/videos/x027jm/<API key>", "http://thecolbertreport.cc.com/videos/f8t1zf/<API key>", "http://thecolbertreport.cc.com/videos/45wqla/<API key>-", "http://thecolbertreport.cc.com/videos/6s8sdq/<API key>", "http://thecolbertreport.cc.com/videos/5jjhhv/<API key>", "http://thecolbertreport.cc.com/videos/541ucf/jon-huntsman", "http://thecolbertreport.cc.com/videos/53t2yg/<API key>" ], "guest": "Jon Huntsman" }, { "date": "2011-10-25", "videos": [ "http: "http://thecolbertreport.cc.com/videos/darfes/<API key>", "http://thecolbertreport.cc.com/videos/3uz7qn/<API key>", "http://thecolbertreport.cc.com/videos/n2dzu0/<API key>", "http://thecolbertreport.cc.com/videos/wsqtx0/susan-saladoff", "http://thecolbertreport.cc.com/videos/89ebii/<API key>" ], "guest": "Susan Saladoff" }, { "date": "2011-10-26", "videos": [ "http://thecolbertreport.cc.com/videos/lj5z4k/<API key>", "http://thecolbertreport.cc.com/videos/xlwljf/<API key>-", "http: "http://thecolbertreport.cc.com/videos/zwe40u/<API key>", "http://thecolbertreport.cc.com/videos/7rtf6k/<API key>", "http://thecolbertreport.cc.com/videos/dcq3ky/<API key>", "http://thecolbertreport.cc.com/videos/sqeewv/taylor-branch", "http://thecolbertreport.cc.com/videos/6twlww/<API key>" ], "guest": "Taylor Branch" }, { "date": "2011-10-27", "videos": [ "http: "http://thecolbertreport.cc.com/videos/gmesd4/<API key>", "http://thecolbertreport.cc.com/videos/xhn542/<API key>", "http://thecolbertreport.cc.com/videos/s2ax4o/toby-keith" ], "guest": "Toby Keith" }, { "date": "2011-10-31", "videos": [ "http://thecolbertreport.cc.com/videos/l7lj84/<API key>", "http://thecolbertreport.cc.com/videos/0svkvx/<API key>", "http://thecolbertreport.cc.com/videos/d4hmi3/<API key>", "http://thecolbertreport.cc.com/videos/4tqlz9/<API key>", "http://thecolbertreport.cc.com/videos/n0jrmj/neil-macgregor", "http://thecolbertreport.cc.com/videos/tyvfoe/<API key>" ], "guest": "Neil MacGregor" }, { "date": "2011-11-01", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ysh9bq/<API key>", "http://thecolbertreport.cc.com/videos/hqjgoz/<API key>", "http://thecolbertreport.cc.com/videos/yo2avl/<API key>", "http://thecolbertreport.cc.com/videos/pez22q/<API key>" ], "guest": "Yo-Yo Ma" }, { "date": "2011-11-02", "videos": [ "http: "http://thecolbertreport.cc.com/videos/n3ifbc/<API key>", "http://thecolbertreport.cc.com/videos/icx1x6/<API key>", "http://thecolbertreport.cc.com/videos/6dlo6v/muffingate", "http://thecolbertreport.cc.com/videos/6jv4ha/michael-pollan", "http://thecolbertreport.cc.com/videos/c8yk04/<API key>" ], "guest": "Michael Pollan" }, { "date": "2011-11-03", "videos": [ "http: "http://thecolbertreport.cc.com/videos/tvwydl/ghost-sex", "http://thecolbertreport.cc.com/videos/gxg7x0/<API key>", "http://thecolbertreport.cc.com/videos/2nhcbh/<API key>", "http://thecolbertreport.cc.com/videos/rwwdgv/nathan-wolfe", "http: ], "guest": "Nathan Wolfe" }, { "date": "2011-11-07", "videos": [ "http://thecolbertreport.cc.com/videos/px6doe/<API key>", "http://thecolbertreport.cc.com/videos/otywae/<API key>", "http://thecolbertreport.cc.com/videos/6nuhjw/<API key>", "http://thecolbertreport.cc.com/videos/xisem8/niall-ferguson", "http://thecolbertreport.cc.com/videos/e9gc1y/<API key>" ], "guest": "Niall Ferguson" }, { "date": "2011-11-08", "videos": [ "http://thecolbertreport.cc.com/videos/m4n0nh/<API key>", "http://thecolbertreport.cc.com/videos/yk540u/<API key>", "http://thecolbertreport.cc.com/videos/3krrxg/<API key>", "http://thecolbertreport.cc.com/videos/s4sqap/seth-meyers", "http://thecolbertreport.cc.com/videos/fz9les/<API key>" ], "guest": "Seth Meyers" }, { "date": "2011-11-09", "videos": [ "http: "http://thecolbertreport.cc.com/videos/gs7ppt/<API key>", "http://thecolbertreport.cc.com/videos/e94bhi/<API key>", "http://thecolbertreport.cc.com/videos/v1f4n3/<API key>", "http://thecolbertreport.cc.com/videos/3k5pcf/james-martin", "http://thecolbertreport.cc.com/videos/9mrd4k/<API key>" ], "guest": "Father Jim Martin" }, { "date": "2011-11-10", "videos": [ "http: "http://thecolbertreport.cc.com/videos/pg0q9t/<API key>", "http://thecolbertreport.cc.com/videos/g1tcu5/<API key>", "http://thecolbertreport.cc.com/videos/4vt0hx/brian-eno" ], "guest": "Brian Eno" }, { "date": "2011-11-14", "videos": [ "http: "http://thecolbertreport.cc.com/videos/3zodum/<API key>", "http://thecolbertreport.cc.com/videos/5vb30b/<API key>", "http://thecolbertreport.cc.com/videos/hu2y6t/vodka-tampons", "http://thecolbertreport.cc.com/videos/uoo5c0/thomas-thwaites", "http://thecolbertreport.cc.com/videos/9x16t1/<API key>" ], "guest": "Thomas Thwaites" }, { "date": "2011-11-15", "videos": [ "http://thecolbertreport.cc.com/videos/c73ioe/<API key>", "http://thecolbertreport.cc.com/videos/qzjgvi/<API key>", "http://thecolbertreport.cc.com/videos/ufsd5o/<API key>-", "http://thecolbertreport.cc.com/videos/f1tu06/elijah-wood", "http: ], "guest": "Elijah Wood" }, { "date": "2011-11-16", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ukaw6z/<API key>", "http://thecolbertreport.cc.com/videos/6dwdiy/<API key>", "http://thecolbertreport.cc.com/videos/z9qeks/<API key>", "http://thecolbertreport.cc.com/videos/94gywl/chris-matthews", "http://thecolbertreport.cc.com/videos/aekw8v/<API key>" ], "guest": "Chris Matthews" }, { "date": "2011-11-17", "videos": [ "http: "http://thecolbertreport.cc.com/videos/41apq9/<API key>", "http: "http://thecolbertreport.cc.com/videos/h76098/<API key>", "http://thecolbertreport.cc.com/videos/y88hzi/susan-orlean", "http://thecolbertreport.cc.com/videos/8d1q2a/<API key>" ], "guest": "Susan Orlean" }, { "date": "2011-11-28", "videos": [ "http: "http://thecolbertreport.cc.com/videos/58ikdq/<API key>", "http://thecolbertreport.cc.com/videos/h84vbf/<API key>", "http://thecolbertreport.cc.com/videos/qggo98/<API key>", "http://thecolbertreport.cc.com/videos/ut1g77/<API key>", "http: ], "guest": "Siddhartha Mukherjee" }, { "date": "2011-11-29", "videos": [ "http: "http://thecolbertreport.cc.com/videos/fafzt9/<API key>", "http://thecolbertreport.cc.com/videos/r8p3nn/<API key>", "http://thecolbertreport.cc.com/videos/4dohxr/<API key>", "http://thecolbertreport.cc.com/videos/9nbfru/<API key>" ], "guest": "Tinariwen" }, { "date": "2011-11-30", "videos": [ "http://thecolbertreport.cc.com/videos/fc3loc/<API key>", "http://thecolbertreport.cc.com/videos/akure9/<API key>", "http://thecolbertreport.cc.com/videos/d0x6zg/<API key>", "http://thecolbertreport.cc.com/videos/j1oeb0/conservative-siri", "http://thecolbertreport.cc.com/videos/okgz78/stephen-sondheim", "http://thecolbertreport.cc.com/videos/ga76kd/<API key>" ], "guest": "Stephen Sondheim" }, { "date": "2011-12-01", "videos": [ "http://thecolbertreport.cc.com/videos/eclhxy/<API key>", "http://thecolbertreport.cc.com/videos/70sj7m/<API key>", "http://thecolbertreport.cc.com/videos/nmrgz9/<API key>", "http://thecolbertreport.cc.com/videos/pzi69s/<API key>", "http://thecolbertreport.cc.com/videos/pmypbg/richard-branson", "http://thecolbertreport.cc.com/videos/rhwqc7/<API key>" ], "guest": "Richard Branson" }, { "date": "2011-12-05", "videos": [ "http://thecolbertreport.cc.com/videos/yy5x27/<API key>", "http://thecolbertreport.cc.com/videos/xn3r3g/<API key>", "http://thecolbertreport.cc.com/videos/f2zdhx/<API key>", "http://thecolbertreport.cc.com/videos/dt8216/jimmie-johnson", "http://thecolbertreport.cc.com/videos/0ewfq6/<API key>" ], "guest": "Jimmie Johnson" }, { "date": "2011-12-06", "videos": [ "http://thecolbertreport.cc.com/videos/1o3huj/<API key>", "http://thecolbertreport.cc.com/videos/fcu2h2/<API key>debate", "http://thecolbertreport.cc.com/videos/dphj6u/the-black-keys", "http://thecolbertreport.cc.com/videos/4t05a5/<API key>" ], "guest": "The Black Keys" }, { "date": "2011-12-07", "videos": [ "http://thecolbertreport.cc.com/videos/5kfnqe/<API key>date", "http://thecolbertreport.cc.com/videos/h7qfup/<API key>", "http://thecolbertreport.cc.com/videos/6dds1t/<API key>", "http://thecolbertreport.cc.com/videos/c66w64/<API key>", "http://thecolbertreport.cc.com/videos/pueyvf/david-hallberg" ], "guest": "David Hallberg" }, { "date": "2011-12-08", "videos": [ "http: "http://thecolbertreport.cc.com/videos/sd4lua/<API key>", "http://thecolbertreport.cc.com/videos/lbdchz/<API key>", "http://thecolbertreport.cc.com/videos/3d10i3/<API key>", "http://thecolbertreport.cc.com/videos/ovws10/jack-abramoff", "http://thecolbertreport.cc.com/videos/gt2hau/<API key>" ], "guest": "Jack Abramoff" }, { "date": "2011-12-12", "videos": [ "http: "http://thecolbertreport.cc.com/videos/52a05g/christmas-cram", "http://thecolbertreport.cc.com/videos/zuufyt/<API key>", "http://thecolbertreport.cc.com/videos/qv9fb0/<API key>", "http://thecolbertreport.cc.com/videos/kx2u80/samuel-l--jackson", "http://thecolbertreport.cc.com/videos/v6sdfa/<API key>" ], "guest": "Samuel L. Jackson" }, { "date": "2011-12-13", "videos": [ "http: "http://thecolbertreport.cc.com/videos/7zgxss/<API key>", "http://thecolbertreport.cc.com/videos/frhjj0/<API key>", "http://thecolbertreport.cc.com/videos/flxy99/<API key>", "http://thecolbertreport.cc.com/videos/sn7cpj/mark-whitaker", "http://thecolbertreport.cc.com/videos/eswjdg/<API key>" ], "guest": "Mark Whitaker" }, { "date": "2011-12-14", "videos": [ "http://thecolbertreport.cc.com/videos/18wgz1/<API key>response", "http://thecolbertreport.cc.com/videos/khf3hx/<API key>", "http://thecolbertreport.cc.com/videos/vg9vdy/<API key>", "http://thecolbertreport.cc.com/videos/qvom30/tv-hat", "http://thecolbertreport.cc.com/videos/lqslc3/ray-odierno" ], "guest": "Gen. Raymond Odierno" }, { "date": "2011-12-15", "videos": [ "http://thecolbertreport.cc.com/videos/8900sr/<API key>battle", "http://thecolbertreport.cc.com/videos/dwccb9/<API key>", "http://thecolbertreport.cc.com/videos/9ugow2/<API key>", "http://thecolbertreport.cc.com/videos/iqj0p8/daniel-craig", "http://thecolbertreport.cc.com/videos/tri39n/2011-goodbye" ], "guest": "Daniel Craig" } ], "2012": [ { "date": "2012-01-03", "videos": [ "http://thecolbertreport.cc.com/videos/9u9qx6/iowa-caucus-2012", "http://thecolbertreport.cc.com/videos/yx6r23/<API key>", "http://thecolbertreport.cc.com/videos/5mqn59/<API key>", "http://thecolbertreport.cc.com/videos/qx2w8n/<API key>", "http://thecolbertreport.cc.com/videos/ioguwl/bernie-sanders", "http://thecolbertreport.cc.com/videos/4ob0g2/<API key>" ], "guest": "Sen. Bernie Sanders" }, { "date": "2012-01-04", "videos": [ "http://thecolbertreport.cc.com/videos/s8am6m/<API key>", "http://thecolbertreport.cc.com/videos/m762nz/<API key>", "http://thecolbertreport.cc.com/videos/x195wh/<API key>", "http://thecolbertreport.cc.com/videos/61k2nf/<API key>", "http://thecolbertreport.cc.com/videos/1ja4vs/john-heilemann", "http://thecolbertreport.cc.com/videos/xyq4st/<API key>" ], "guest": "John Heilemann" }, { "date": "2012-01-05", "videos": [ "http: "http://thecolbertreport.cc.com/videos/js72my/fun-rick-santorum", "http://thecolbertreport.cc.com/videos/5xw4yi/<API key>", "http://thecolbertreport.cc.com/videos/sjbolu/<API key>", "http://thecolbertreport.cc.com/videos/lgtesz/steve-case", "http://thecolbertreport.cc.com/videos/o6dbzj/<API key>" ], "guest": "Steve Case" }, { "date": "2012-01-09", "videos": [ "http: "http://thecolbertreport.cc.com/videos/3m6txc/<API key>", "http://thecolbertreport.cc.com/videos/l08ywe/<API key>", "http://thecolbertreport.cc.com/videos/75c0w9/<API key>", "http://thecolbertreport.cc.com/videos/e3zsob/<API key>", "http://thecolbertreport.cc.com/videos/j2sskk/<API key>" ], "guest": "Neil Shubin" }, { "date": "2012-01-10", "videos": [ "http://thecolbertreport.cc.com/videos/9llvcg/<API key>", "http://thecolbertreport.cc.com/videos/m98f4t/<API key>", "http://thecolbertreport.cc.com/videos/wwvi39/<API key>", "http://thecolbertreport.cc.com/videos/fqk2fh/bill-moyers", "http://thecolbertreport.cc.com/videos/wdmkv8/<API key>" ], "guest": "Ben Gibbard" }, { "date": "2012-01-11", "videos": [ "http: "http://thecolbertreport.cc.com/videos/f8j0ng/<API key>", "http://thecolbertreport.cc.com/videos/7t7ct3/<API key>", "http://thecolbertreport.cc.com/videos/73ux63/<API key>", "http://thecolbertreport.cc.com/videos/wx04iy/<API key>", "http://thecolbertreport.cc.com/videos/vjhrm3/<API key>" ], "guest": "George Stephanopoulos" }, { "date": "2012-01-12", "videos": [ "http://thecolbertreport.cc.com/videos/hrwtsb/<API key>", "http://thecolbertreport.cc.com/videos/av6bvx/<API key>", "http://thecolbertreport.cc.com/videos/5otlsk/<API key>", "http://thecolbertreport.cc.com/videos/ui35sv/mike-allen", "http://thecolbertreport.cc.com/videos/mnp9up/<API key>" ], "guest": "Mike Allen" }, { "date": "2012-01-16", "videos": [ "http://thecolbertreport.cc.com/videos/dyktip/<API key>", "http: "http://thecolbertreport.cc.com/videos/ke9tkw/<API key>", "http://thecolbertreport.cc.com/videos/buf78z/<API key>", "http://thecolbertreport.cc.com/videos/uh4wcy/<API key>", "http://thecolbertreport.cc.com/videos/cgtb89/scott-douglas", "http://thecolbertreport.cc.com/videos/td091t/<API key>--" ], "guest": "Rev. Scott Douglas" }, { "date": "2012-01-17", "videos": [ "http://thecolbertreport.cc.com/videos/knvkbe/<API key>", "http: "http://thecolbertreport.cc.com/videos/ufvy9m/<API key>", "http://thecolbertreport.cc.com/videos/qil57h/<API key>", "http://thecolbertreport.cc.com/videos/0alvjc/jennifer-granholm", "http://thecolbertreport.cc.com/videos/mbnjnn/<API key>" ], "guest": "Jennifer Granholm" }, { "date": "2012-01-18", "videos": [ "http://thecolbertreport.cc.com/videos/bpbhtr/<API key>", "http: "http://thecolbertreport.cc.com/videos/q6xocp/<API key>", "http://thecolbertreport.cc.com/videos/fx3xum/<API key>", "http://thecolbertreport.cc.com/videos/zvmmfs/<API key>", "http: "http://thecolbertreport.cc.com/videos/i8qam3/david-frum", "http://thecolbertreport.cc.com/videos/3mfkme/<API key>" ], "guest": "David Frum" }, { "date": "2012-01-19", "videos": [ "http://thecolbertreport.cc.com/videos/pebyno/<API key>", "http://thecolbertreport.cc.com/videos/7qvxgu/<API key>", "http://thecolbertreport.cc.com/videos/k3pbui/<API key>", "http://thecolbertreport.cc.com/videos/nno4x3/<API key>" ], "guest": "Carrie Rebora Barratt" }, { "date": "2012-01-23", "videos": [ "http: "http://thecolbertreport.cc.com/videos/iql42n/<API key>", "http://thecolbertreport.cc.com/videos/50z46i/<API key>", "http://thecolbertreport.cc.com/videos/e3y9nd/<API key>", "http://thecolbertreport.cc.com/videos/vim94y/<API key>", "http://thecolbertreport.cc.com/videos/gu52h0/<API key>" ], "guest": "Bruce Bueno De Mesquita" }, { "date": "2012-01-24", "videos": [ "http://thecolbertreport.cc.com/videos/n2rnnr/<API key>", "http://thecolbertreport.cc.com/videos/jc76hc/<API key>", "http: "http://thecolbertreport.cc.com/videos/q3ro37/<API key>", "http://thecolbertreport.cc.com/videos/zop8mz/18th-gop-debate", "http://thecolbertreport.cc.com/videos/gzi3ec/<API key>", "http://thecolbertreport.cc.com/videos/kg7hw1/<API key>", "http://thecolbertreport.cc.com/videos/381zai/andrew-sullivan", "http://thecolbertreport.cc.com/videos/14903e/<API key>-" ], "guest": "Andrew Sullivan" }, { "date": "2012-01-25", "videos": [ "http://thecolbertreport.cc.com/videos/9f0foj/<API key>", "http://thecolbertreport.cc.com/videos/2uwi0i/<API key>", "http://thecolbertreport.cc.com/videos/3un4zv/<API key>", "http://thecolbertreport.cc.com/videos/kwuhk6/terry-gross", "http://thecolbertreport.cc.com/videos/r2j6o1/<API key>" ], "guest": "Terry Gross" }, { "date": "2012-01-26", "videos": [ "http://thecolbertreport.cc.com/videos/05qh1w/<API key>", "http://thecolbertreport.cc.com/videos/5gcr8j/<API key>", "http://thecolbertreport.cc.com/videos/pudtpb/<API key>-", "http://thecolbertreport.cc.com/videos/y191mp/<API key>", "http://thecolbertreport.cc.com/videos/sg6jkh/drew-barrymore", "http://thecolbertreport.cc.com/videos/kk56ka/<API key>" ], "guest": "Drew Barrymore" }, { "date": "2012-01-30", "videos": [ "http://thecolbertreport.cc.com/videos/rcm539/<API key>", "http://thecolbertreport.cc.com/videos/1ws9v2/<API key>", "http://thecolbertreport.cc.com/videos/n3pkmh/<API key>", "http://thecolbertreport.cc.com/videos/tlfrhi/<API key>", "http://thecolbertreport.cc.com/videos/amck6x/laurence-tribe", "http://thecolbertreport.cc.com/videos/v9f5m2/<API key>" ], "guest": "Laurence H. Tribe" }, { "date": "2012-01-31", "videos": [ "http: "http://thecolbertreport.cc.com/videos/f44hch/<API key>", "http://thecolbertreport.cc.com/videos/udnnzi/<API key>", "http://thecolbertreport.cc.com/videos/qs311n/bjork", "http://thecolbertreport.cc.com/videos/u7u9lh/<API key>-" ], "guest": "Bjork" }, { "date": "2012-02-01", "videos": [ "http: "http://thecolbertreport.cc.com/videos/o3p6c2/<API key>", "http://thecolbertreport.cc.com/videos/3nohh2/<API key>", "http://thecolbertreport.cc.com/videos/uswa0x/<API key>", "http://thecolbertreport.cc.com/videos/kqctrf/ameena-matthews", "http://thecolbertreport.cc.com/videos/5m98im/<API key>" ], "guest": "Ameena Matthews" }, { "date": "2012-02-02", "videos": [ "http: "http://thecolbertreport.cc.com/videos/uu5zmj/<API key>", "http://thecolbertreport.cc.com/videos/bwbr2v/<API key>", "http://thecolbertreport.cc.com/videos/lh3kq3/<API key>", "http://thecolbertreport.cc.com/videos/04ottd/<API key>", "http://thecolbertreport.cc.com/videos/a7r0zs/christiane-amanpour", "http://thecolbertreport.cc.com/videos/uzu0lz/<API key>" ], "guest": "Christiane Amanpour" }, { "date": "2012-02-13", "videos": [ "http: "http://thecolbertreport.cc.com/videos/2kynbu/linsanity-", "http://thecolbertreport.cc.com/videos/hgxqxc/<API key>", "http://thecolbertreport.cc.com/videos/ju995r/<API key>", "http://thecolbertreport.cc.com/videos/eks7za/bill-mckibben", "http://thecolbertreport.cc.com/videos/k6qadu/<API key>" ], "guest": "Bill McKibben" }, { "date": "2012-02-14", "videos": [ "http: "http://thecolbertreport.cc.com/videos/3rk6lv/<API key>", "http://thecolbertreport.cc.com/videos/jx9ojl/<API key>", "http://thecolbertreport.cc.com/videos/lyzukj/<API key>", "http://thecolbertreport.cc.com/videos/ej01p5/william-broad", "http://thecolbertreport.cc.com/videos/mhuyjx/<API key>" ], "guest": "William Broad" }, { "date": "2012-02-20", "videos": [ "http: "http://thecolbertreport.cc.com/videos/7ghzcu/<API key>", "http://thecolbertreport.cc.com/videos/lydem1/<API key>", "http://thecolbertreport.cc.com/videos/tqad40/ann-patchett", "http://thecolbertreport.cc.com/videos/qgsly5/<API key>" ], "guest": "Ann Patchett" }, { "date": "2012-02-21", "videos": [ "http: "http://thecolbertreport.cc.com/videos/dgnc7d/douchebag-showdown", "http://thecolbertreport.cc.com/videos/mnahgd/<API key>", "http://thecolbertreport.cc.com/videos/s0vtdx/robert-kagan", "http://thecolbertreport.cc.com/videos/x36uyb/<API key>" ], "guest": "Robert Kagan" }, { "date": "2012-02-22", "videos": [ "http: "http://thecolbertreport.cc.com/videos/krghr1/<API key>", "http://thecolbertreport.cc.com/videos/dv9iqc/<API key>", "http://thecolbertreport.cc.com/videos/w2qw1t/<API key>", "http://thecolbertreport.cc.com/videos/d6raxz/nancy-pelosi", "http://thecolbertreport.cc.com/videos/9mdx7s/<API key>" ], "guest": "Rep. Nancy Pelosi" }, { "date": "2012-02-23", "videos": [ "http://thecolbertreport.cc.com/videos/g3b2me/arizona-gop-debate", "http://thecolbertreport.cc.com/videos/6wnf2j/<API key>", "http://thecolbertreport.cc.com/videos/zzgfft/<API key>", "http://thecolbertreport.cc.com/videos/jshg47/placido-domingo" ], "guest": "Placido Domingo" }, { "date": "2012-02-27", "videos": [ "http://thecolbertreport.cc.com/videos/6llqzw/<API key>", "http://thecolbertreport.cc.com/videos/45yrtw/peggielene-bartels", "http://thecolbertreport.cc.com/videos/xr2dmf/<API key>" ], "guest": "Peggielene Bartels" }, { "date": "2012-02-28", "videos": [ "http: "http://thecolbertreport.cc.com/videos/b44eo3/<API key>", "http://thecolbertreport.cc.com/videos/hsyhov/<API key>", "http: "http://thecolbertreport.cc.com/videos/0xatad/ross-eisenbrey", "http://thecolbertreport.cc.com/videos/8ebxgr/<API key>" ], "guest": "Ross Eisenbrey" }, { "date": "2012-02-29", "videos": [ "http: "http://thecolbertreport.cc.com/videos/y0ejfo/<API key>", "http://thecolbertreport.cc.com/videos/3dllp7/<API key>", "http://thecolbertreport.cc.com/videos/3adb3i/<API key>", "http://thecolbertreport.cc.com/videos/puth71/william-shatner", "http://thecolbertreport.cc.com/videos/dhcxcx/<API key>" ], "guest": "William Shatner" }, { "date": "2012-03-01", "videos": [ "http: "http://thecolbertreport.cc.com/videos/y0ejfo/<API key>", "http://thecolbertreport.cc.com/videos/3dllp7/<API key>", "http://thecolbertreport.cc.com/videos/3adb3i/<API key>", "http://thecolbertreport.cc.com/videos/puth71/william-shatner", "http://thecolbertreport.cc.com/videos/dhcxcx/<API key>" ], "guest": "Claire Danes" }, { "date": "2012-03-01", "videos": [ "http://thecolbertreport.cc.com/videos/eolisf/<API key>", "http://thecolbertreport.cc.com/videos/bf1ekb/<API key>", "http://thecolbertreport.cc.com/videos/ncu1ti/<API key>", "http://thecolbertreport.cc.com/videos/tw0ear/claire-danes", "http://thecolbertreport.cc.com/videos/4gz8ak/<API key>" ], "guest": "Claire Danes" }, { "date": "2012-03-05", "videos": [ "http://thecolbertreport.cc.com/videos/xceapv/<API key>", "http://thecolbertreport.cc.com/videos/29dn96/<API key>", "http://thecolbertreport.cc.com/videos/pww7ru/<API key>", "http://thecolbertreport.cc.com/videos/nwk5lf/audra-mcdonald" ], "guest": "Audra McDonald" }, { "date": "2012-03-06", "videos": [ "http://thecolbertreport.cc.com/videos/4yvx5w/<API key>", "http://thecolbertreport.cc.com/videos/nzr8wl/<API key>", "http://thecolbertreport.cc.com/videos/rxyz0z/<API key>", "http://thecolbertreport.cc.com/videos/h24vfx/<API key>", "http://thecolbertreport.cc.com/videos/em4ksp/<API key>" ], "guest": "Jonathan Safran Foer" }, { "date": "2012-03-07", "videos": [ "http: "http://thecolbertreport.cc.com/videos/3df60s/higgs-boson-humor", "http://thecolbertreport.cc.com/videos/y5rjly/<API key>", "http://thecolbertreport.cc.com/videos/7v4ikl/<API key>", "http://thecolbertreport.cc.com/videos/ciyqhs/<API key>", "http://thecolbertreport.cc.com/videos/060vqq/willem-dafoe", "http://thecolbertreport.cc.com/videos/c0qp1t/<API key>" ], "guest": "Willem Dafoe" }, { "date": "2012-03-08", "videos": [ "http://thecolbertreport.cc.com/videos/3nl0qx/eric-bolling-s-<API key>, "http://thecolbertreport.cc.com/videos/fig5ri/<API key>" ], "guest": "Don Fleming, Elvis Costello, Emmylou Harris" }, { "date": "2012-03-12", "videos": [ "http://thecolbertreport.cc.com/videos/c4fdt8/<API key>", "http://thecolbertreport.cc.com/videos/2v3qmo/<API key>", "http://thecolbertreport.cc.com/videos/lo9wk9/<API key>", "http://thecolbertreport.cc.com/videos/16w3vh/<API key>", "http://thecolbertreport.cc.com/videos/nmtsxp/katherine-boo", "http://thecolbertreport.cc.com/videos/owkzk2/<API key>" ], "guest": "Katherine Boo" }, { "date": "2012-03-13", "videos": [ "http://thecolbertreport.cc.com/videos/bz7jdm/<API key>", "http://thecolbertreport.cc.com/videos/qn0q26/<API key>", "http://thecolbertreport.cc.com/videos/h98570/<API key>", "http://thecolbertreport.cc.com/videos/msz5qh/andrew-bird" ], "guest": "Andrew Bird" }, { "date": "2012-03-14", "videos": [ "http://thecolbertreport.cc.com/videos/m77cwc/<API key>", "http://thecolbertreport.cc.com/videos/rwxeui/<API key>", "http://thecolbertreport.cc.com/videos/yeczkv/<API key>", "http://thecolbertreport.cc.com/videos/7n8gsd/<API key>", "http://thecolbertreport.cc.com/videos/zkum1o/mark-mckinnon", "http://thecolbertreport.cc.com/videos/d8t6uu/<API key>" ], "guest": "Mark McKinnon" }, { "date": "2012-03-15", "videos": [ "http://thecolbertreport.cc.com/videos/eq8308/<API key>", "http://thecolbertreport.cc.com/videos/zjy3q9/<API key>", "http://thecolbertreport.cc.com/videos/krx9gw/<API key>", "http://thecolbertreport.cc.com/videos/vh5p5b/<API key>", "http://thecolbertreport.cc.com/videos/8o29gb/dexter-filkins", "http://thecolbertreport.cc.com/videos/e66q9g/<API key>" ], "guest": "Dexter Filkins" }, { "date": "2012-03-26", "videos": [ "http://thecolbertreport.cc.com/videos/no5p1a/<API key>", "http: "http://thecolbertreport.cc.com/videos/3ejcul/<API key>", "http://thecolbertreport.cc.com/videos/008ndt/<API key>", "http://thecolbertreport.cc.com/videos/7faawr/<API key>", "http://thecolbertreport.cc.com/videos/rc1xqe/david-page", "http://thecolbertreport.cc.com/videos/20xgt7/<API key>" ], "guest": "Dr. David Page" }, { "date": "2012-03-27", "videos": [ "http: "http://thecolbertreport.cc.com/videos/cua8o6/<API key>", "http://thecolbertreport.cc.com/videos/ykhpki/<API key>", "http://thecolbertreport.cc.com/videos/53yh09/<API key>", "http://thecolbertreport.cc.com/videos/ghn5jt/charles-murray", "http://thecolbertreport.cc.com/videos/y9plha/<API key>" ], "guest": "Charles Murray" }, { "date": "2012-03-28", "videos": [ "http://thecolbertreport.cc.com/videos/lg7nrp/<API key>", "http://thecolbertreport.cc.com/videos/svf90k/<API key>", "http://thecolbertreport.cc.com/videos/tnvz1z/<API key>", "http://thecolbertreport.cc.com/videos/bmkpwj/mark-ruffalo", "http://thecolbertreport.cc.com/videos/jjebsm/<API key>" ], "guest": "Mark Ruffalo" }, { "date": "2012-03-29", "videos": [ "http://thecolbertreport.cc.com/videos/7erwuh/<API key>", "http: "http://thecolbertreport.cc.com/videos/nuvo4m/<API key>", "http://thecolbertreport.cc.com/videos/7qagdx/<API key>", "http://thecolbertreport.cc.com/videos/2m6prp/<API key>", "http://thecolbertreport.cc.com/videos/7dpy0t/peter-beinart", "http://thecolbertreport.cc.com/videos/r5oifs/<API key>" ], "guest": "Peter Beinart" }, { "date": "2012-04-02", "videos": [ "http: "http://thecolbertreport.cc.com/videos/1nq1ce/<API key>", "http://thecolbertreport.cc.com/videos/1bsxs9/<API key>", "http://thecolbertreport.cc.com/videos/fmif88/<API key>cologne", "http://thecolbertreport.cc.com/videos/5yl006/gary-johnson", "http://thecolbertreport.cc.com/videos/77h3h1/<API key>" ], "guest": "Gov. Gary Johnson" }, { "date": "2012-04-03", "videos": [ "http://thecolbertreport.cc.com/videos/33j3ar/lftb-colbology", "http://thecolbertreport.cc.com/videos/z52jo4/<API key>presidenthood", "http://thecolbertreport.cc.com/videos/v3p6ss/<API key>", "http://thecolbertreport.cc.com/videos/ag45p1/<API key>", "http://thecolbertreport.cc.com/videos/y4berw/<API key>", "http://thecolbertreport.cc.com/videos/1b9vpb/nikki-haley", "http://thecolbertreport.cc.com/videos/asl5su/<API key>" ], "guest": "Gov. Nikki Haley" }, { "date": "2012-04-04", "videos": [ "http: "http://thecolbertreport.cc.com/videos/6y1ct4/<API key>", "http://thecolbertreport.cc.com/videos/4io3p9/<API key>", "http://thecolbertreport.cc.com/videos/x8e4ps/<API key>", "http://thecolbertreport.cc.com/videos/6ml3sk/<API key>", "http://thecolbertreport.cc.com/videos/plj4a3/robert-ballard", "http://thecolbertreport.cc.com/videos/qyyf0b/<API key>" ], "guest": "Robert D. Ballard" }, { "date": "2012-04-05", "videos": [ "http://thecolbertreport.cc.com/videos/om9vmg/<API key>", "http://thecolbertreport.cc.com/videos/lnmh56/<API key>", "http://thecolbertreport.cc.com/videos/0u9fik/<API key>", "http://thecolbertreport.cc.com/videos/ji5xxu/anne-rice", "http://thecolbertreport.cc.com/videos/si0xcn/<API key>" ], "guest": "Anne Rice" }, { "date": "2012-04-09", "videos": [ "http://thecolbertreport.cc.com/videos/8ziziz/<API key>", "http://thecolbertreport.cc.com/videos/oyaen8/<API key>", "http://thecolbertreport.cc.com/videos/csp74m/<API key>", "http://thecolbertreport.cc.com/videos/kruk2j/bob-lutz", "http://thecolbertreport.cc.com/videos/9wc34u/<API key>" ], "guest": "Bob Lutz" }, { "date": "2012-04-10", "videos": [ "http: "http://thecolbertreport.cc.com/videos/82ub2z/<API key>", "http://thecolbertreport.cc.com/videos/qu7492/<API key>", "http://thecolbertreport.cc.com/videos/3la5nh/<API key>", "http://thecolbertreport.cc.com/videos/mfxyfn/<API key>", "http://thecolbertreport.cc.com/videos/o4ah40/richard-hersh", "http://thecolbertreport.cc.com/videos/es5mrc/<API key>" ], "guest": "Richard Hersh" }, { "date": "2012-04-11", "videos": [ "http://thecolbertreport.cc.com/videos/3ygjj0/<API key>", "http: "http://thecolbertreport.cc.com/videos/ingur1/<API key>", "http://thecolbertreport.cc.com/videos/f8r4k5/<API key>", "http://thecolbertreport.cc.com/videos/v3wlgc/<API key>", "http://thecolbertreport.cc.com/videos/u0cci1/<API key>" ], "guest": "Michelle Obama" }, { "date": "2012-04-12", "videos": [ "http: "http://thecolbertreport.cc.com/videos/m5gmsh/<API key>", "http://thecolbertreport.cc.com/videos/v73czf/<API key>food", "http://thecolbertreport.cc.com/videos/s55d89/<API key>", "http://thecolbertreport.cc.com/videos/x9epzo/james-cameron", "http://thecolbertreport.cc.com/videos/avonwu/<API key>" ], "guest": "James Cameron" }, { "date": "2012-04-16", "videos": [ "http://thecolbertreport.cc.com/videos/z2fjas/<API key>", "http://thecolbertreport.cc.com/videos/2ixpov/<API key>, "http://thecolbertreport.cc.com/videos/ilt6wv/<API key>", "http://thecolbertreport.cc.com/videos/44j8wl/<API key>", "http://thecolbertreport.cc.com/videos/ru5vnr/bonnie-raitt" ], "guest": "Bonnie Raitt" }, { "date": "2012-04-17", "videos": [ "http: "http://thecolbertreport.cc.com/videos/gxlf9b/<API key>", "http://thecolbertreport.cc.com/videos/sfsf06/<API key>", "http://thecolbertreport.cc.com/videos/vklngm/<API key>", "http://thecolbertreport.cc.com/videos/6fhp9q/jonah-lehrer", "http://thecolbertreport.cc.com/videos/culsks/<API key>" ], "guest": "Jonah Lehrer" }, { "date": "2012-04-18", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ddq41n/<API key>", "http://thecolbertreport.cc.com/videos/er0kn7/<API key>", "http://thecolbertreport.cc.com/videos/vw1qdm/<API key>", "http://thecolbertreport.cc.com/videos/xzzk73/arianna-huffington", "http://thecolbertreport.cc.com/videos/tttdob/<API key>" ], "guest": "Arianna Huffington" }, { "date": "2012-04-19", "videos": [ "http: "http://thecolbertreport.cc.com/videos/a9n2pr/<API key>", "http://thecolbertreport.cc.com/videos/zdgaqc/<API key>", "http://thecolbertreport.cc.com/videos/nb2ksl/<API key>", "http://thecolbertreport.cc.com/videos/uio9bo/<API key>", "http://thecolbertreport.cc.com/videos/h2p67e/<API key>", "http://thecolbertreport.cc.com/videos/g291q8/<API key>" ], "guest": "Tavis Smiley &amp; Cornel West" }, { "date": "2012-04-23", "videos": [ "http: "http://thecolbertreport.cc.com/videos/m8blpo/<API key>", "http://thecolbertreport.cc.com/videos/2gwl1y/<API key>", "http://thecolbertreport.cc.com/videos/v2y3wl/<API key>", "http://thecolbertreport.cc.com/videos/14wyxm/don-mcleroy", "http://thecolbertreport.cc.com/videos/l9d2q6/<API key>" ], "guest": "Don McLeroy" }, { "date": "2012-04-24", "videos": [ "http://thecolbertreport.cc.com/videos/ly3so2/<API key>", "http: "http://thecolbertreport.cc.com/videos/i4eh7r/<API key>", "http://thecolbertreport.cc.com/videos/ycnifi/magnus-carlsen", "http: ], "guest": "Magnus Carlsen" }, { "date": "2012-04-25", "videos": [ "http: "http://thecolbertreport.cc.com/videos/or4jr5/<API key>", "http://thecolbertreport.cc.com/videos/6xkuod/<API key>", "http://thecolbertreport.cc.com/videos/gi36k3/<API key>", "http://thecolbertreport.cc.com/videos/88pieq/michael-sandel", "http://thecolbertreport.cc.com/videos/wduflz/<API key>" ], "guest": "Michael Sandel" }, { "date": "2012-04-26", "videos": [ "http: "http://thecolbertreport.cc.com/videos/9rs6oa/<API key>", "http://thecolbertreport.cc.com/videos/2w9amu/<API key>", "http://thecolbertreport.cc.com/videos/1ytfce/jack-white", "http://thecolbertreport.cc.com/videos/kymj2z/<API key>" ], "guest": "Jack White" }, { "date": "2012-04-30", "videos": [ "http: "http://thecolbertreport.cc.com/videos/u2x3gk/<API key>", "http://thecolbertreport.cc.com/videos/g6gv3q/<API key>", "http://thecolbertreport.cc.com/videos/z2rpip/<API key>", "http://thecolbertreport.cc.com/videos/csg3jo/diane-keaton", "http://thecolbertreport.cc.com/videos/tly3vi/<API key>" ], "guest": "Diane Keaton" }, { "date": "2012-05-01", "videos": [ "http: "http://thecolbertreport.cc.com/videos/pktymf/<API key>", "http://thecolbertreport.cc.com/videos/0zj7f4/<API key>", "http://thecolbertreport.cc.com/videos/7af7jl/<API key>", "http://thecolbertreport.cc.com/videos/cpb2np/carne-ross", "http://thecolbertreport.cc.com/videos/a9ioqx/<API key>" ], "guest": "Carne Ross" }, { "date": "2012-05-02", "videos": [ "http: "http://thecolbertreport.cc.com/videos/n232ru/<API key>", "http://thecolbertreport.cc.com/videos/goj2h9/<API key>", "http://thecolbertreport.cc.com/videos/sv3iag/<API key>", "http://thecolbertreport.cc.com/videos/luw0ia/jonathan-haidt", "http://thecolbertreport.cc.com/videos/k7vmo6/<API key>" ], "guest": "Jonathan Haidt" }, { "date": "2012-05-03", "videos": [ "http://thecolbertreport.cc.com/videos/msaxn6/<API key>", "http://thecolbertreport.cc.com/videos/eki0dc/<API key>", "http://thecolbertreport.cc.com/videos/2v2ixr/<API key>", "http://thecolbertreport.cc.com/videos/z3ac6o/lena-dunham", "http://thecolbertreport.cc.com/videos/1iw8uv/<API key>" ], "guest": "Lena Dunham" }, { "date": "2012-05-07", "videos": [ "http://thecolbertreport.cc.com/videos/1jhhu2/<API key>", "http: "http://thecolbertreport.cc.com/videos/d6nh6o/<API key>", "http://thecolbertreport.cc.com/videos/d69ur0/<API key>", "http://thecolbertreport.cc.com/videos/fplvtb/-<API key>", "http://thecolbertreport.cc.com/videos/jrnml0/<API key>", "http://thecolbertreport.cc.com/videos/u65qci/andy-cohen", "http://thecolbertreport.cc.com/videos/xh5269/<API key>" ], "guest": "Andy Cohen" }, { "date": "2012-05-08", "videos": [ "http://thecolbertreport.cc.com/videos/p05t1b/<API key>-", "http://thecolbertreport.cc.com/videos/b2tfg8/<API key>", "http://thecolbertreport.cc.com/videos/ad10bn/michelle-alexander", "http: ], "guest": "Michelle Alexander" }, { "date": "2012-05-09", "videos": [ "http://thecolbertreport.cc.com/videos/v1k3ci/<API key>", "http://thecolbertreport.cc.com/videos/b6tiga/<API key>", "http://thecolbertreport.cc.com/videos/t3omhb/<API key>", "http://thecolbertreport.cc.com/videos/o2c49w/anna-wintour", "http://thecolbertreport.cc.com/videos/bogip6/<API key>" ], "guest": "Anna Wintour" }, { "date": "2012-05-10", "videos": [ "http: "http://thecolbertreport.cc.com/videos/7lnqh4/<API key>", "http://thecolbertreport.cc.com/videos/n27g4x/<API key>", "http://thecolbertreport.cc.com/videos/b9m4e5/<API key>monkeys", "http://thecolbertreport.cc.com/videos/ytlc6i/<API key>", "http://thecolbertreport.cc.com/videos/v6gyoh/francis-collins", "http://thecolbertreport.cc.com/videos/vbl44w/<API key>" ], "guest": "Dr. Francis Collins" }, { "date": "2012-05-29", "videos": [ "http: "http://thecolbertreport.cc.com/videos/cpgg7x/<API key>", "http://thecolbertreport.cc.com/videos/oo0mhd/<API key>", "http://thecolbertreport.cc.com/videos/cw4fxf/<API key>", "http://thecolbertreport.cc.com/videos/32y78g/charlize-theron", "http://thecolbertreport.cc.com/videos/gr0i67/<API key>" ], "guest": "Charlize Theron" }, { "date": "2012-05-30", "videos": [ "http: "http://thecolbertreport.cc.com/videos/kydmtj/<API key>", "http://thecolbertreport.cc.com/videos/s73hgy/<API key>", "http://thecolbertreport.cc.com/videos/dfm2k1/alan-alda", "http://thecolbertreport.cc.com/videos/b6lw83/<API key>" ], "guest": "Alan Alda" }, { "date": "2012-05-31", "videos": [ "http: "http://thecolbertreport.cc.com/videos/sib2qy/<API key>", "http://thecolbertreport.cc.com/videos/s3t2y6/<API key>", "http://thecolbertreport.cc.com/videos/pufh72/<API key>", "http://thecolbertreport.cc.com/videos/pz3adl/jack-hitt", "http://thecolbertreport.cc.com/videos/e9e1b2/<API key>-" ], "guest": "Jack Hitt" }, { "date": "2012-06-04", "videos": [ "http://thecolbertreport.cc.com/videos/nhsal8/<API key>", "http://thecolbertreport.cc.com/videos/w6itwj/<API key>", "http://thecolbertreport.cc.com/videos/r7x6me/<API key>", "http://thecolbertreport.cc.com/videos/cx6fmy/john-lewis", "http://thecolbertreport.cc.com/videos/5u46bt/<API key>" ], "guest": "Rep. John Lewis" }, { "date": "2012-06-05", "videos": [ "http: "http://thecolbertreport.cc.com/videos/xt64qc/<API key>", "http://thecolbertreport.cc.com/videos/w4utag/<API key>", "http://thecolbertreport.cc.com/videos/kkce78/<API key>", "http://thecolbertreport.cc.com/videos/90ifev/jill-biden", "http://thecolbertreport.cc.com/videos/hhgz9k/<API key>" ], "guest": "Jill Biden" }, { "date": "2012-06-06", "videos": [ "http://thecolbertreport.cc.com/videos/ta5d10/<API key>", "http://thecolbertreport.cc.com/videos/y1zpiy/<API key>", "http://thecolbertreport.cc.com/videos/0vve8r/<API key>", "http://thecolbertreport.cc.com/videos/pqv8yf/neil-patrick-harris", "http://thecolbertreport.cc.com/videos/1n5kn0/<API key>" ], "guest": "Neil Patrick Harris" }, { "date": "2012-06-07", "videos": [ "http: "http://thecolbertreport.cc.com/videos/n107py/<API key>-", "http://thecolbertreport.cc.com/videos/5zzgas/<API key>", "http://thecolbertreport.cc.com/videos/mlqu18/<API key>", "http://thecolbertreport.cc.com/videos/gfpnqx/regina-spektor", "http://thecolbertreport.cc.com/videos/8x9qre/<API key>" ], "guest": "Regina Spektor" }, { "date": "2012-06-11", "videos": [ "http://thecolbertreport.cc.com/videos/8zxgdh/<API key>", "http://thecolbertreport.cc.com/videos/4dkvt6/<API key>", "http://thecolbertreport.cc.com/videos/u1f5qa/<API key>", "http://thecolbertreport.cc.com/videos/beuiqq/-<API key>", "http://thecolbertreport.cc.com/videos/0lbz7s/martin-sheen", "http://thecolbertreport.cc.com/videos/h1jqol/<API key>" ], "guest": "Martin Sheen" }, { "date": "2012-06-12", "videos": [ "http: "http://thecolbertreport.cc.com/videos/4p817x/<API key>", "http://thecolbertreport.cc.com/videos/nu56lh/<API key>", "http://thecolbertreport.cc.com/videos/dfjz7v/<API key>", "http://thecolbertreport.cc.com/videos/e4m68b/<API key>", "http://thecolbertreport.cc.com/videos/eici19/will-allen", "http://thecolbertreport.cc.com/videos/uaovz2/<API key>" ], "guest": "Will Allen" }, { "date": "2012-06-13", "videos": [ "http://thecolbertreport.cc.com/videos/f93cwg/<API key>", "http://thecolbertreport.cc.com/videos/e61ypw/<API key>", "http://thecolbertreport.cc.com/videos/clm6h7/<API key>", "http://thecolbertreport.cc.com/videos/0nbwzv/gregg-allman", "http://thecolbertreport.cc.com/videos/0bcb4l/<API key>" ], "guest": "Gregg Allman" }, { "date": "2012-06-14", "videos": [ "http://thecolbertreport.cc.com/videos/wdhef3/<API key>", "http://thecolbertreport.cc.com/videos/zy2va1/<API key>", "http://thecolbertreport.cc.com/videos/a5uuwa/<API key>", "http://thecolbertreport.cc.com/videos/jylspq/steve-coll", "http://thecolbertreport.cc.com/videos/nw9c2r/<API key>" ], "guest": "Steve Coll" }, { "date": "2012-06-18", "videos": [ "http: "http://thecolbertreport.cc.com/videos/c3nu3d/<API key>", "http://thecolbertreport.cc.com/videos/z9bjae/<API key>", "http://thecolbertreport.cc.com/videos/f3coxy/<API key>", "http://thecolbertreport.cc.com/videos/x4uwku/paul-krugman", "http://thecolbertreport.cc.com/videos/fdw0ht/<API key>" ], "guest": "Paul Krugman" }, { "date": "2012-06-19", "videos": [ "http://thecolbertreport.cc.com/videos/0r91gj/<API key>", "http://thecolbertreport.cc.com/videos/zxypkl/<API key>", "http://thecolbertreport.cc.com/videos/ugscr4/<API key>", "http://thecolbertreport.cc.com/videos/xdevam/olivia-wilde", "http://thecolbertreport.cc.com/videos/kada0a/<API key>" ], "guest": "Olivia Wilde" }, { "date": "2012-06-20", "videos": [ "http: "http://thecolbertreport.cc.com/videos/w6vibi/<API key>", "http://thecolbertreport.cc.com/videos/95tn0n/<API key>", "http://thecolbertreport.cc.com/videos/b65og2/<API key>", "http://thecolbertreport.cc.com/videos/4h0l60/<API key>", "http://thecolbertreport.cc.com/videos/lwb6am/daniel-klaidman", "http://thecolbertreport.cc.com/videos/31ptzz/<API key>" ], "guest": "Daniel Klaidman" }, { "date": "2012-06-21", "videos": [ "http://thecolbertreport.cc.com/videos/7r29kf/<API key>", "http://thecolbertreport.cc.com/videos/zdprqc/<API key>", "http://thecolbertreport.cc.com/videos/5yjil8/<API key>", "http://thecolbertreport.cc.com/videos/e6ik9l/lawrence-krauss", "http://thecolbertreport.cc.com/videos/e8ivor/<API key>-" ], "guest": "Lawrence Krauss" }, { "date": "2012-06-25", "videos": [ "http: "http://thecolbertreport.cc.com/videos/cbsvdk/<API key>", "http://thecolbertreport.cc.com/videos/wn3vzl/<API key>responses", "http://thecolbertreport.cc.com/videos/1nhpf3/<API key>", "http://thecolbertreport.cc.com/videos/0u5f3i/<API key>", "http://thecolbertreport.cc.com/videos/2q2di6/frank-deford", "http://thecolbertreport.cc.com/videos/wri423/<API key>" ], "guest": "Frank Deford" }, { "date": "2012-06-26", "videos": [ "http: "http://thecolbertreport.cc.com/videos/8wlx7c/<API key>", "http://thecolbertreport.cc.com/videos/06bwvh/<API key>", "http://thecolbertreport.cc.com/videos/ohfzqq/<API key>", "http://thecolbertreport.cc.com/videos/r8iy26/richard-ford", "http://thecolbertreport.cc.com/videos/ybvbi1/<API key>" ], "guest": "Richard Ford" }, { "date": "2012-06-27", "videos": [ "http://thecolbertreport.cc.com/videos/g8onr9/<API key>", "http://thecolbertreport.cc.com/videos/gl54n8/<API key>", "http://thecolbertreport.cc.com/videos/t2x64z/<API key>", "http://thecolbertreport.cc.com/videos/td6pu4/<API key>", "http://thecolbertreport.cc.com/videos/5em8r3/<API key>", "http://thecolbertreport.cc.com/videos/aj465n/melinda-gates", "http://thecolbertreport.cc.com/videos/bxvxkj/<API key>" ], "guest": "Melinda Gates" }, { "date": "2012-06-28", "videos": [ "http://thecolbertreport.cc.com/videos/coii6k/<API key>", "http://thecolbertreport.cc.com/videos/p7wwtp/<API key>", "http://thecolbertreport.cc.com/videos/n5b9bc/<API key>", "http://thecolbertreport.cc.com/videos/xqmuun/<API key>", "http://thecolbertreport.cc.com/videos/843q05/aaron-sorkin", "http://thecolbertreport.cc.com/videos/hdpyh9/<API key>" ], "guest": "Aaron Sorkin" }, { "date": "2012-07-16", "videos": [ "http: "http://thecolbertreport.cc.com/videos/nw0ci8/<API key>", "http://thecolbertreport.cc.com/videos/xmrkal/<API key>", "http://thecolbertreport.cc.com/videos/hs3epw/<API key>", "http://thecolbertreport.cc.com/videos/gxb8p4/<API key>", "http://thecolbertreport.cc.com/videos/nj5kky/<API key>" ], "guest": "Anne-Marie Slaughter" }, { "date": "2012-07-17", "videos": [ "http://thecolbertreport.cc.com/videos/5r1yvx/<API key>", "http://thecolbertreport.cc.com/videos/577ry9/<API key>", "http://thecolbertreport.cc.com/videos/xrrg9u/<API key>", "http://thecolbertreport.cc.com/videos/8qe1km/nas" ], "guest": "Nas" }, { "date": "2012-07-18", "videos": [ "http: "http://thecolbertreport.cc.com/videos/jhpgom/-<API key>", "http://thecolbertreport.cc.com/videos/40x15i/<API key>", "http://thecolbertreport.cc.com/videos/5qgquz/<API key>", "http://thecolbertreport.cc.com/videos/67w2nh/annise-parker", "http://thecolbertreport.cc.com/videos/2wz88p/<API key>" ], "guest": "Mayor Annise D. Parker" }, { "date": "2012-07-19", "videos": [ "http://thecolbertreport.cc.com/videos/h8wtk8/<API key>", "http://thecolbertreport.cc.com/videos/64cfhk/<API key>", "http://thecolbertreport.cc.com/videos/7dpxne/<API key>", "http://thecolbertreport.cc.com/videos/uknspr/<API key>", "http://thecolbertreport.cc.com/videos/xfd2bp/lisa-jackson", "http://thecolbertreport.cc.com/videos/iw4bs9/<API key>" ], "guest": "Lisa Jackson" }, { "date": "2012-07-23", "videos": [ "http: "http://thecolbertreport.cc.com/videos/0xmom4/<API key>", "http://thecolbertreport.cc.com/videos/v7f1z0/<API key>", "http://thecolbertreport.cc.com/videos/p2oill/<API key>", "http://thecolbertreport.cc.com/videos/3cxwny/vikram-gandhi", "http://thecolbertreport.cc.com/videos/rwkf73/<API key>" ], "guest": "Vikram Gandhi" }, { "date": "2012-07-24", "videos": [ "http: "http://thecolbertreport.cc.com/videos/h74nmb/<API key>", "http://thecolbertreport.cc.com/videos/zxif76/<API key>", "http://thecolbertreport.cc.com/videos/x2crx4/<API key>", "http://thecolbertreport.cc.com/videos/bov9or/james-fallows", "http://thecolbertreport.cc.com/videos/lpy9h0/<API key>" ], "guest": "James Fallows" }, { "date": "2012-07-25", "videos": [ "http://thecolbertreport.cc.com/videos/0mcg76/<API key>", "http://thecolbertreport.cc.com/videos/w5w9pn/<API key>", "http://thecolbertreport.cc.com/videos/x14yw9/<API key>", "http://thecolbertreport.cc.com/videos/f7r40e/<API key>-", "http://thecolbertreport.cc.com/videos/4414pc/dan-gross", "http://thecolbertreport.cc.com/videos/e1brl1/<API key>" ], "guest": "Dan Gross" }, { "date": "2012-07-26", "videos": [ "http: "http://thecolbertreport.cc.com/videos/4fk2ow/<API key>-", "http://thecolbertreport.cc.com/videos/kycpil/<API key>", "http://thecolbertreport.cc.com/videos/lra5ae/<API key>", "http://thecolbertreport.cc.com/videos/4nngh8/peter-westmacott", "http://thecolbertreport.cc.com/videos/ccwpvt/<API key>" ], "guest": "Amb. Peter Westmacott" }, { "date": "2012-07-30", "videos": [ "http://thecolbertreport.cc.com/videos/70ka18/<API key>", "http://thecolbertreport.cc.com/videos/lav3uh/<API key>", "http://thecolbertreport.cc.com/videos/zdpacy/<API key>", "http://thecolbertreport.cc.com/videos/554xm8/joan-rivers", "http://thecolbertreport.cc.com/videos/d69lls/<API key>-" ], "guest": "Joan Rivers" }, { "date": "2012-07-31", "videos": [ "http: "http://thecolbertreport.cc.com/videos/sbevip/<API key>", "http://thecolbertreport.cc.com/videos/8qmv9k/<API key>", "http://thecolbertreport.cc.com/videos/f5vsty/<API key>", "http://thecolbertreport.cc.com/videos/lfsrga/<API key>", "http://thecolbertreport.cc.com/videos/p9ejfs/jeff-koons", "http://thecolbertreport.cc.com/videos/e0ikf9/<API key>" ], "guest": "Jeff Koons" }, { "date": "2012-08-01", "videos": [ "http://thecolbertreport.cc.com/videos/fjidln/<API key>", "http://thecolbertreport.cc.com/videos/llkyw5/<API key>", "http://thecolbertreport.cc.com/videos/u1lf6f/<API key>", "http://thecolbertreport.cc.com/videos/gayfdj/john-grunsfeld", "http: ], "guest": "John Grunsfeld" }, { "date": "2012-08-02", "videos": [ "http://thecolbertreport.cc.com/videos/x1we2u/<API key>", "http://thecolbertreport.cc.com/videos/3wx6bt/<API key>", "http://thecolbertreport.cc.com/videos/ql0bqa/<API key>", "http://thecolbertreport.cc.com/videos/tdj576/<API key>", "http://thecolbertreport.cc.com/videos/t85slm/<API key>", "http://thecolbertreport.cc.com/videos/fyzakp/chris-hayes", "http://thecolbertreport.cc.com/videos/m1idm3/<API key>" ], "guest": "Chris Hayes" }, { "date": "2012-08-06", "videos": [ "http: "http://thecolbertreport.cc.com/videos/h9qt0r/mars-rover-landing", "http://thecolbertreport.cc.com/videos/w2s6c0/<API key>", "http://thecolbertreport.cc.com/videos/x7yc4w/pete-seeger", "http://thecolbertreport.cc.com/videos/aj407y/<API key>-" ], "guest": "Pete Seeger" }, { "date": "2012-08-07", "videos": [ "http://thecolbertreport.cc.com/videos/1vt8t5/<API key>", "http://thecolbertreport.cc.com/videos/k4260i/<API key>", "http://thecolbertreport.cc.com/videos/q82dz5/<API key>", "http://thecolbertreport.cc.com/videos/nlroaz/mark-shriver", "http://thecolbertreport.cc.com/videos/jx7y7x/<API key>" ], "guest": "Mark Shriver" }, { "date": "2012-08-08", "videos": [ "http: "http://thecolbertreport.cc.com/videos/4fqxvr/<API key>", "http://thecolbertreport.cc.com/videos/h3tu8s/<API key>", "http://thecolbertreport.cc.com/videos/zgmish/liza-mundy", "http://thecolbertreport.cc.com/videos/d5p8ok/<API key>" ], "guest": "Liza Mundy" }, { "date": "2012-08-09", "videos": [ "http://thecolbertreport.cc.com/videos/8gpwtc/<API key>", "http://thecolbertreport.cc.com/videos/sr618c/<API key>", "http://thecolbertreport.cc.com/videos/zzeqj6/<API key>", "http://thecolbertreport.cc.com/videos/i891sf/woody-harrelson", "http://thecolbertreport.cc.com/videos/nynu71/<API key>" ], "guest": "Woody Harrelson" }, { "date": "2012-08-13", "videos": [ "http://thecolbertreport.cc.com/videos/d4650t/<API key>", "http://thecolbertreport.cc.com/videos/6jv3cb/<API key>", "http://thecolbertreport.cc.com/videos/wk9zh3/<API key>-", "http://thecolbertreport.cc.com/videos/r9jxwl/<API key>" ], "guest": "Fun." }, { "date": "2012-08-14", "videos": [ "http://thecolbertreport.cc.com/videos/9sxdgp/<API key>", "http://thecolbertreport.cc.com/videos/ovgwtm/<API key>", "http://thecolbertreport.cc.com/videos/ajslu2/-<API key>", "http://thecolbertreport.cc.com/videos/4uk1xx/<API key>", "http://thecolbertreport.cc.com/videos/1eoihc/<API key>" ], "guest": "Grizzly Bear" }, { "date": "2012-08-15", "videos": [ "http://thecolbertreport.cc.com/videos/jus7dh/<API key>", "http://thecolbertreport.cc.com/videos/lkqb8i/<API key>", "http://thecolbertreport.cc.com/videos/iwgkv9/fierce-five-interns", "http://thecolbertreport.cc.com/videos/tzk5xz/<API key>", "http://thecolbertreport.cc.com/videos/buxzdm/<API key>", "http://thecolbertreport.cc.com/videos/891lvk/<API key>" ], "guest": "The U.S. Women's Olympic Gymnastics team, Santigold" }, { "date": "2012-08-16", "videos": [ "http://thecolbertreport.cc.com/videos/bx6qnh/<API key>", "http://thecolbertreport.cc.com/videos/tgqk3o/<API key>", "http://thecolbertreport.cc.com/videos/ymbqe6/<API key>", "http://thecolbertreport.cc.com/videos/x5cie8/<API key>", "http://thecolbertreport.cc.com/videos/ez1hov/<API key>" ], "guest": "The Flaming Lips" }, { "date": "2012-08-28", "videos": [ "http://thecolbertreport.cc.com/videos/z0q2d6/<API key>", "http://thecolbertreport.cc.com/videos/2a1lg4/<API key>", "http://thecolbertreport.cc.com/videos/kcyg86/<API key>", "http://thecolbertreport.cc.com/videos/2f1kwv/andrew-sullivan", "http://thecolbertreport.cc.com/videos/qomrph/<API key>" ], "guest": "Andrew Sullivan" }, { "date": "2012-08-29", "videos": [ "http://thecolbertreport.cc.com/videos/ane28t/<API key>", "http://thecolbertreport.cc.com/videos/std0vn/<API key>", "http://thecolbertreport.cc.com/videos/3teieb/<API key>", "http://thecolbertreport.cc.com/videos/w1ej3a/<API key>", "http://thecolbertreport.cc.com/videos/n7yuw7/<API key>", "http://thecolbertreport.cc.com/videos/v0fegj/jennifer-burns", "http://thecolbertreport.cc.com/videos/gxzmx3/<API key>" ], "guest": "Jennifer Burns" }, { "date": "2012-08-30", "videos": [ "http://thecolbertreport.cc.com/videos/0pjdyn/<API key>", "http://thecolbertreport.cc.com/videos/7543m5/<API key>", "http://thecolbertreport.cc.com/videos/vo7txi/<API key>", "http://thecolbertreport.cc.com/videos/ghjrfh/jon-huntsman-pt--1", "http://thecolbertreport.cc.com/videos/93jjo7/jon-huntsman-pt--2", "http://thecolbertreport.cc.com/videos/vi4rti/<API key>" ], "guest": "Jon Huntsman" }, { "date": "2012-08-31", "videos": [ "http://thecolbertreport.cc.com/videos/x9yoif/<API key>", "http://thecolbertreport.cc.com/videos/9czru3/<API key>", "http://thecolbertreport.cc.com/videos/spqhue/<API key>", "http://thecolbertreport.cc.com/videos/qrijg7/<API key>", "http://thecolbertreport.cc.com/videos/cx5s7v/<API key>", "http://thecolbertreport.cc.com/videos/n0qmbf/james-carville", "http://thecolbertreport.cc.com/videos/2cv31s/<API key>" ], "guest": "James Carville" }, { "date": "2012-09-04", "videos": [ "http://thecolbertreport.cc.com/videos/r83jxh/<API key>", "http://thecolbertreport.cc.com/videos/mxucyy/<API key>", "http://thecolbertreport.cc.com/videos/bg56qn/<API key>", "http://thecolbertreport.cc.com/videos/cy97ce/<API key>", "http://thecolbertreport.cc.com/videos/stj7xj/reihan-salam", "http://thecolbertreport.cc.com/videos/awwi1z/<API key>" ], "guest": "Reihan Salam" }, { "date": "2012-09-05", "videos": [ "http://thecolbertreport.cc.com/videos/4axjsp/<API key>", "http://thecolbertreport.cc.com/videos/lnxbm7/<API key>", "http://thecolbertreport.cc.com/videos/zp0jy0/<API key>", "http://thecolbertreport.cc.com/videos/75ubcv/<API key>", "http://thecolbertreport.cc.com/videos/fjhhan/michael-grunwald", "http://thecolbertreport.cc.com/videos/05j0ux/<API key>" ], "guest": "Michael Grunwald" }, { "date": "2012-09-06", "videos": [ "http://thecolbertreport.cc.com/videos/vf84g8/<API key>", "http://thecolbertreport.cc.com/videos/qfodha/<API key>", "http://thecolbertreport.cc.com/videos/p7kw6y/<API key>", "http://thecolbertreport.cc.com/videos/epwrup/bill-richardson", "http://thecolbertreport.cc.com/videos/8ivg8l/<API key>" ], "guest": "Bill Richardson" }, { "date": "2012-09-07", "videos": [ "http://thecolbertreport.cc.com/videos/9wdqkq/<API key>", "http://thecolbertreport.cc.com/videos/cr72mv/<API key>", "http://thecolbertreport.cc.com/videos/l9ys9b/<API key>", "http://thecolbertreport.cc.com/videos/6oqr0u/<API key>", "http://thecolbertreport.cc.com/videos/oq50sl/ed-rendell", "http://thecolbertreport.cc.com/videos/fbd0do/<API key>" ], "guest": "Ed Rendell" }, { "date": "2012-09-17", "videos": [ "http: "http://thecolbertreport.cc.com/videos/q2ib3a/<API key>", "http://thecolbertreport.cc.com/videos/kelspo/<API key>", "http://thecolbertreport.cc.com/videos/liknzb/<API key>", "http://thecolbertreport.cc.com/videos/454q6n/drew-faust", "http: ], "guest": "Drew Faust" }, { "date": "2012-09-18", "videos": [ "http: "http://thecolbertreport.cc.com/videos/53lqfp/<API key>", "http://thecolbertreport.cc.com/videos/dsvsbf/<API key>", "http://thecolbertreport.cc.com/videos/m021ol/<API key>", "http://thecolbertreport.cc.com/videos/ni1t1w/jeffrey-toobin", "http://thecolbertreport.cc.com/videos/qteu69/<API key>" ], "guest": "Jeffrey Toobin" }, { "date": "2012-09-19", "videos": [ "http: "http://thecolbertreport.cc.com/videos/yf80jg/<API key>", "http: "http://thecolbertreport.cc.com/videos/4yfsux/wife-of-jesus", "http://thecolbertreport.cc.com/videos/3vyhzj/itzhak-perlman" ], "guest": "Itzhak Perlman" }, { "date": "2012-09-20", "videos": [ "http://thecolbertreport.cc.com/videos/8f3t3h/<API key>", "http://thecolbertreport.cc.com/videos/asy3gz/<API key>", "http://thecolbertreport.cc.com/videos/3f13ot/<API key>", "http://thecolbertreport.cc.com/videos/2ufg9n/<API key>", "http://thecolbertreport.cc.com/videos/nxad9d/errol-morris", "http://thecolbertreport.cc.com/videos/sbgok9/<API key>" ], "guest": "Errol Morris" }, { "date": "2012-09-25", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ahsdxc/<API key>", "http://thecolbertreport.cc.com/videos/495xja/<API key>", "http://thecolbertreport.cc.com/videos/9vebvz/-<API key>", "http://thecolbertreport.cc.com/videos/vk8jsq/<API key>", "http://thecolbertreport.cc.com/videos/1my2a8/claressa-shields", "http://thecolbertreport.cc.com/videos/n6n3t7/<API key>-" ], "guest": "Claressa Shields" }, { "date": "2012-09-26", "videos": [ "http: "http://thecolbertreport.cc.com/videos/diooyo/<API key>", "http://thecolbertreport.cc.com/videos/pnhcq0/<API key>", "http://thecolbertreport.cc.com/videos/kzi40s/<API key>", "http://thecolbertreport.cc.com/videos/lsl385/jim-holt", "http://thecolbertreport.cc.com/videos/jwctvx/<API key>" ], "guest": "Jim Holt" }, { "date": "2012-09-27", "videos": [ "http://thecolbertreport.cc.com/videos/373l0t/-<API key>-", "http://thecolbertreport.cc.com/videos/s9359o/<API key>", "http://thecolbertreport.cc.com/videos/zpnkfm/-<API key>", "http://thecolbertreport.cc.com/videos/7tmsil/<API key>", "http://thecolbertreport.cc.com/videos/e6j3e4/<API key>", "http://thecolbertreport.cc.com/videos/xrnkns/<API key>-" ], "guest": "Vince Gilligan" }, { "date": "2012-10-01", "videos": [ "http://thecolbertreport.cc.com/videos/21ytsa/<API key>", "http://thecolbertreport.cc.com/videos/v5694x/<API key>", "http://thecolbertreport.cc.com/videos/h64sbo/<API key>", "http://thecolbertreport.cc.com/videos/k9q5kh/ben-folds-five" ], "guest": "Ben Folds Five" }, { "date": "2012-10-02", "videos": [ "http: "http://thecolbertreport.cc.com/videos/yeek7a/-<API key>", "http://thecolbertreport.cc.com/videos/cy7c9f/<API key>", "http://thecolbertreport.cc.com/videos/x5r0se/<API key>", "http://thecolbertreport.cc.com/videos/oe7wh2/<API key>", "http://thecolbertreport.cc.com/videos/78yg26/jorge-ramos", "http://thecolbertreport.cc.com/videos/dictxb/<API key>" ], "guest": "Jorge Ramos" }, { "date": "2012-10-03", "videos": [ "http: "http://thecolbertreport.cc.com/videos/05md2w/<API key>", "http://thecolbertreport.cc.com/videos/2cmp66/<API key>", "http://thecolbertreport.cc.com/videos/idoutl/<API key>", "http://thecolbertreport.cc.com/videos/nw3yhm/kenny-rogers", "http://thecolbertreport.cc.com/videos/rt3hz7/<API key>" ], "guest": "Kenny Rogers" }, { "date": "2012-10-04", "videos": [ "http://thecolbertreport.cc.com/videos/5uncqq/<API key>", "http://thecolbertreport.cc.com/videos/cl08kb/<API key>", "http://thecolbertreport.cc.com/videos/inrj8y/<API key>", "http://thecolbertreport.cc.com/videos/mw7xqx/<API key>", "http://thecolbertreport.cc.com/videos/nvjrik/<API key>", "http://thecolbertreport.cc.com/videos/fkt99i/george-church", "http://thecolbertreport.cc.com/videos/8vqy9e/<API key>" ], "guest": "Dr. George Church" }, { "date": "2012-10-08", "videos": [ "http: "http://thecolbertreport.cc.com/videos/53brnc/<API key>", "http://thecolbertreport.cc.com/videos/uey9b0/<API key>", "http://thecolbertreport.cc.com/videos/s8mn29/<API key>", "http://thecolbertreport.cc.com/videos/43khod/mark-kelly", "http://thecolbertreport.cc.com/videos/sq2eio/<API key>-" ], "guest": "Mark Kelly" }, { "date": "2012-10-09", "videos": [ "http: "http://thecolbertreport.cc.com/videos/69kfag/<API key>", "http://thecolbertreport.cc.com/videos/0g0ihq/<API key>", "http://thecolbertreport.cc.com/videos/fu9mpp/<API key>", "http://thecolbertreport.cc.com/videos/fgftvy/morrissey" ], "guest": "Morrissey" }, { "date": "2012-10-10", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ejqp1v/<API key>", "http://thecolbertreport.cc.com/videos/jur0u9/<API key>", "http://thecolbertreport.cc.com/videos/t1y0rc/<API key>", "http://thecolbertreport.cc.com/videos/plccwf/naomi-wolf", "http://thecolbertreport.cc.com/videos/od1her/<API key>-" ], "guest": "Naomi Wolf" }, { "date": "2012-10-11", "videos": [ "http: "http://thecolbertreport.cc.com/videos/kiyawb/<API key>", "http://thecolbertreport.cc.com/videos/s190yi/<API key>", "http://thecolbertreport.cc.com/videos/2ksunf/<API key>", "http://thecolbertreport.cc.com/videos/xhdwfk/chrystia-freeland", "http://thecolbertreport.cc.com/videos/zr1go5/<API key>" ], "guest": "Chrystia Freeland" }, { "date": "2012-10-15", "videos": [ "http: "http://thecolbertreport.cc.com/videos/0bmyur/<API key>", "http://thecolbertreport.cc.com/videos/iudpa7/<API key>", "http://thecolbertreport.cc.com/videos/0q2emr/<API key>", "http://thecolbertreport.cc.com/videos/zj6xib/evan-thomas", "http://thecolbertreport.cc.com/videos/n0kt18/<API key>" ], "guest": "Evan Thomas" }, { "date": "2012-10-16", "videos": [ "http://thecolbertreport.cc.com/videos/keo9r0/<API key>", "http://thecolbertreport.cc.com/videos/4aqbh6/<API key>", "http://thecolbertreport.cc.com/videos/y46z6y/<API key>", "http://thecolbertreport.cc.com/videos/4uld4g/<API key>", "http://thecolbertreport.cc.com/videos/4c7frp/cory-booker", "http: ], "guest": "Cory Booker" }, { "date": "2012-10-17", "videos": [ "http://thecolbertreport.cc.com/videos/wd584x/<API key>", "http://thecolbertreport.cc.com/videos/rjvmac/libya-gate-scandal", "http://thecolbertreport.cc.com/videos/j531em/<API key>", "http://thecolbertreport.cc.com/videos/jr7tf6/<API key>", "http://thecolbertreport.cc.com/videos/hhxtxg/<API key>", "http://thecolbertreport.cc.com/videos/f4jil4/tyler-perry", "http://thecolbertreport.cc.com/videos/namywp/<API key>" ], "guest": "Tyler Perry" }, { "date": "2012-10-18", "videos": [ "http://thecolbertreport.cc.com/videos/1dfeya/<API key>", "http://thecolbertreport.cc.com/videos/rgzljg/mitt-s-first-day", "http://thecolbertreport.cc.com/videos/2q39xi/junk-food-feed", "http://thecolbertreport.cc.com/videos/xttei6/<API key>", "http://thecolbertreport.cc.com/videos/t8vgd4/the-killers", "http://thecolbertreport.cc.com/videos/ieuitc/<API key>-" ], "guest": "The Killers" }, { "date": "2012-10-22", "videos": [ "http://thecolbertreport.cc.com/videos/0t7wmw/<API key>", "http://thecolbertreport.cc.com/videos/jhyr4v/<API key>", "http://thecolbertreport.cc.com/videos/t1yx0h/<API key>", "http://thecolbertreport.cc.com/videos/8uddyg/donald-sadoway", "http://thecolbertreport.cc.com/videos/czceut/<API key>" ], "guest": "Donald Sadoway" }, { "date": "2012-10-23", "videos": [ "http://thecolbertreport.cc.com/videos/nept6x/<API key>", "http://thecolbertreport.cc.com/videos/wowfoq/<API key>", "http://thecolbertreport.cc.com/videos/twexhe/<API key>", "http://thecolbertreport.cc.com/videos/hrawp4/john-grisham", "http://thecolbertreport.cc.com/videos/rxk7z1/<API key>" ], "guest": "John Grisham" }, { "date": "2012-10-24", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ifrr4g/<API key>", "http://thecolbertreport.cc.com/videos/n9028e/<API key>", "http://thecolbertreport.cc.com/videos/gzidte/<API key>", "http://thecolbertreport.cc.com/videos/swkt4w/anthony-everitt", "http://thecolbertreport.cc.com/videos/ug2zqb/<API key>" ], "guest": "Anthony Everitt" }, { "date": "2012-10-25", "videos": [ "http: "http: "http://thecolbertreport.cc.com/videos/zu00re/<API key>", "http://thecolbertreport.cc.com/videos/pb058e/mitch-daniels-pt--1", "http://thecolbertreport.cc.com/videos/9tzl4i/mitch-daniels-pt--2", "http://thecolbertreport.cc.com/videos/pstvp6/<API key>" ], "guest": "Gov. Mitch Daniels" }, { "date": "2012-10-31", "videos": [ "http://thecolbertreport.cc.com/videos/rky5ab/<API key>", "http://thecolbertreport.cc.com/videos/ey2jqz/<API key>", "http://thecolbertreport.cc.com/videos/lk60fg/<API key>", "http://thecolbertreport.cc.com/videos/5vx4ad/<API key>", "http://thecolbertreport.cc.com/videos/x89ju7/lilly-ledbetter", "http://thecolbertreport.cc.com/videos/jqfgo3/<API key>" ], "guest": "Lilly Ledbetter" }, { "date": "2012-11-01", "videos": [ "http: "http://thecolbertreport.cc.com/videos/mtuxrh/<API key>", "http://thecolbertreport.cc.com/videos/pdmw4z/<API key>", "http://thecolbertreport.cc.com/videos/rmzkbz/<API key>", "http://thecolbertreport.cc.com/videos/w4v4gd/<API key>" ], "guest": "David Byrne &amp; St. Vincent" }, { "date": "2012-11-05", "videos": [ "http://thecolbertreport.cc.com/videos/mm7c7b/<API key>", "http://thecolbertreport.cc.com/videos/h3qcht/<API key>", "http://thecolbertreport.cc.com/videos/ga4hky/<API key>", "http://thecolbertreport.cc.com/videos/ef460s/-<API key>", "http://thecolbertreport.cc.com/videos/tl7vb4/nate-silver", "http: ], "guest": "Nate Silver" }, { "date": "2012-11-06", "videos": [ "http://thecolbertreport.cc.com/videos/2wfr8k/<API key>", "http://thecolbertreport.cc.com/videos/ydqq2x/<API key>", "http://thecolbertreport.cc.com/videos/b9hvj6/andrew-sullivan", "http://thecolbertreport.cc.com/videos/vghwne/<API key>", "http://thecolbertreport.cc.com/videos/cao81i/<API key>" ], "guest": "Andrew Sullivan" }, { "date": "2012-11-07", "videos": [ "http: "http://thecolbertreport.cc.com/videos/zviz5s/<API key>", "http://thecolbertreport.cc.com/videos/hbkurh/<API key>", "http://thecolbertreport.cc.com/videos/btqtta/<API key>", "http://thecolbertreport.cc.com/videos/wjevw3/<API key>", "http://thecolbertreport.cc.com/videos/xs8d72/<API key>", "http://thecolbertreport.cc.com/videos/6iwo2a/<API key>" ], "guest": "Doris Kearns Goodwin" }, { "date": "2012-11-08", "videos": [ "http: "http://thecolbertreport.cc.com/videos/op51y2/<API key>", "http://thecolbertreport.cc.com/videos/ryj0jw/<API key>-", "http://thecolbertreport.cc.com/videos/25lwb9/<API key>", "http://thecolbertreport.cc.com/videos/doygtf/rachel-maddow", "http://thecolbertreport.cc.com/videos/jzxfgf/<API key>" ], "guest": "Rachel Maddow" }, { "date": "2012-11-12", "videos": [ "http://thecolbertreport.cc.com/videos/3szdub/<API key>", "http://thecolbertreport.cc.com/videos/kj1cs9/<API key>", "http: "http://thecolbertreport.cc.com/videos/tl4uce/<API key>", "http://thecolbertreport.cc.com/videos/6vpcf3/ken-burns", "http://thecolbertreport.cc.com/videos/3w1i4s/<API key>" ], "guest": "Ken Burns" }, { "date": "2012-11-13", "videos": [ "http: "http://thecolbertreport.cc.com/videos/uml8yd/<API key>", "http://thecolbertreport.cc.com/videos/s5vmrx/<API key>", "http://thecolbertreport.cc.com/videos/icmpvx/newt-gingrich-pt--1", "http://thecolbertreport.cc.com/videos/61deqz/newt-gingrich-pt--2", "http://thecolbertreport.cc.com/videos/ujlf67/<API key>" ], "guest": "Newt Gingrich" }, { "date": "2012-11-14", "videos": [ "http: "http://thecolbertreport.cc.com/videos/3zu15f/<API key>", "http://thecolbertreport.cc.com/videos/kvs6wn/<API key>", "http://thecolbertreport.cc.com/videos/ba8i6j/<API key>", "http://thecolbertreport.cc.com/videos/wvf1nd/tony-kushner-pt--1", "http://thecolbertreport.cc.com/videos/ezygjv/tony-kushner-pt--2", "http://thecolbertreport.cc.com/videos/cz0sty/<API key>" ], "guest": "Tony Kushner" }, { "date": "2012-11-15", "videos": [ "http: "http://thecolbertreport.cc.com/videos/regxdh/<API key>", "http://thecolbertreport.cc.com/videos/jy83mg/general-s-hospital", "http://thecolbertreport.cc.com/videos/xve006/<API key>", "http://thecolbertreport.cc.com/videos/we1zlp/chris-stringer", "http://thecolbertreport.cc.com/videos/f23a7f/<API key>" ], "guest": "Chris Stringer" }, { "date": "2012-11-26", "videos": [ "http: "http://thecolbertreport.cc.com/videos/i4lmrj/<API key>", "http://thecolbertreport.cc.com/videos/242ato/<API key>", "http://thecolbertreport.cc.com/videos/ob3lcn/<API key>", "http://thecolbertreport.cc.com/videos/std5aq/jake-tapper", "http://thecolbertreport.cc.com/videos/o2lec3/<API key>" ], "guest": "Jake Tapper" }, { "date": "2012-11-27", "videos": [ "http://thecolbertreport.cc.com/videos/oh9w4r/canada-s-grinch", "http://thecolbertreport.cc.com/videos/7imsna/<API key>", "http://thecolbertreport.cc.com/videos/72sdt0/<API key>", "http://thecolbertreport.cc.com/videos/1fuekz/dolly-parton", "http://thecolbertreport.cc.com/videos/nqrlrq/<API key>" ], "guest": "Dolly Parton" }, { "date": "2012-11-28", "videos": [ "http: "http://thecolbertreport.cc.com/videos/omvkv3/<API key>", "http://thecolbertreport.cc.com/videos/tnr1l8/<API key>", "http://thecolbertreport.cc.com/videos/xpxkwl/filibuster-reform", "http://thecolbertreport.cc.com/videos/qc393o/frank-oz", "http://thecolbertreport.cc.com/videos/b9jkcc/<API key>" ], "guest": "Frank Oz" }, { "date": "2012-11-29", "videos": [ "http: "http://thecolbertreport.cc.com/videos/cehmsr/<API key>", "http://thecolbertreport.cc.com/videos/9o0ttj/<API key>", "http://thecolbertreport.cc.com/videos/dgy710/<API key>-", "http://thecolbertreport.cc.com/videos/qyxymb/sean-carroll", "http://thecolbertreport.cc.com/videos/z8pd91/<API key>" ], "guest": "Sean Carroll" }, { "date": "2012-12-03", "videos": [ "http://thecolbertreport.cc.com/videos/c2msxt/<API key>", "http://thecolbertreport.cc.com/videos/i94qww/<API key>", "http://thecolbertreport.cc.com/videos/zkpe65/<API key>", "http://thecolbertreport.cc.com/videos/47ssk7/<API key>", "http://thecolbertreport.cc.com/videos/zm84yu/ian-mckellen", "http://thecolbertreport.cc.com/videos/u8z3mx/<API key>" ], "guest": "Ian McKellen" }, { "date": "2012-12-04", "videos": [ "http://thecolbertreport.cc.com/videos/ri5csw/<API key>", "http: "http://thecolbertreport.cc.com/videos/n7lg1x/<API key>", "http://thecolbertreport.cc.com/videos/v8syf8/martin-freeman", "http://thecolbertreport.cc.com/videos/rmahy7/<API key>" ], "guest": "Martin Freeman" }, { "date": "2012-12-05", "videos": [ "http://thecolbertreport.cc.com/videos/qtkdcn/<API key>", "http://thecolbertreport.cc.com/videos/6x66a7/<API key>", "http://thecolbertreport.cc.com/videos/9j5qtc/<API key>", "http://thecolbertreport.cc.com/videos/m8dp2f/andy-serkis", "http://thecolbertreport.cc.com/videos/msip4s/<API key>" ], "guest": "Peter Jackson" }, { "date": "2012-12-06", "videos": [ "http://thecolbertreport.cc.com/videos/teluzg/<API key>", "http://thecolbertreport.cc.com/videos/hhe4hg/<API key>", "http://thecolbertreport.cc.com/videos/d0n0vz/<API key>", "http://thecolbertreport.cc.com/videos/1voj50/<API key>", "http://thecolbertreport.cc.com/videos/0tvck8/peter-jackson", "http://thecolbertreport.cc.com/videos/fbqohj/<API key>" ], "guest": "Andy Serkis" }, { "date": "2012-12-10", "videos": [ "http://thecolbertreport.cc.com/videos/0cfmll/<API key>", "http://thecolbertreport.cc.com/videos/8skoq2/fox-news-s-<API key>, "http://thecolbertreport.cc.com/videos/gdygvq/diana-krall" ], "guest": "Diana Krall, Elvis Costello" }, { "date": "2012-12-11", "videos": [ "http: "http://thecolbertreport.cc.com/videos/69xjmc/<API key>", "http://thecolbertreport.cc.com/videos/iwvp9d/<API key>", "http://thecolbertreport.cc.com/videos/8is78z/<API key>", "http://thecolbertreport.cc.com/videos/m3omdi/malcolm-gladwell" ], "guest": "Malcolm Gladwell, Audra McDonald" }, { "date": "2012-12-12", "videos": [ "http://thecolbertreport.cc.com/videos/hoair6/<API key>-", "http://thecolbertreport.cc.com/videos/8aazot/<API key>", "http://thecolbertreport.cc.com/videos/yr83zl/<API key>", "http://thecolbertreport.cc.com/videos/38iv8s/mandy-patinkin" ], "guest": "Mandy Patinkin, Michael Stipe" }, { "date": "2012-12-13", "videos": [ "http://thecolbertreport.cc.com/videos/ao4d2q/<API key>", "http://thecolbertreport.cc.com/videos/dseos2/<API key>-", "http://thecolbertreport.cc.com/videos/clpvpj/<API key>", "http://thecolbertreport.cc.com/videos/wozbhp/simone-campbell" ], "guest": "Sister Simone Campbell, Jeff Tweedy, Mavis Staples, Sean Lennon" } ], "2013": [ { "date": "2013-01-07", "videos": [ "http: "http://thecolbertreport.cc.com/videos/83h5da/<API key>", "http://thecolbertreport.cc.com/videos/9nmhtf/<API key>", "http://thecolbertreport.cc.com/videos/wq7dip/<API key>", "http://thecolbertreport.cc.com/videos/b1uvtc/<API key>", "http://thecolbertreport.cc.com/videos/ayoamg/jimmy-wales", "http://thecolbertreport.cc.com/videos/a1dzb3/<API key>" ], "guest": "Jimmy Wales" }, { "date": "2013-01-08", "videos": [ "http: "http://thecolbertreport.cc.com/videos/gdcdgs/postage-price-hike", "http://thecolbertreport.cc.com/videos/vcqeg7/<API key>", "http://thecolbertreport.cc.com/videos/ps8djx/<API key>", "http://thecolbertreport.cc.com/videos/kq9pp2/chris-kluwe", "http://thecolbertreport.cc.com/videos/gcv2eh/<API key>" ], "guest": "Chris Kluwe" }, { "date": "2013-01-09", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ip7ql9/<API key>", "http://thecolbertreport.cc.com/videos/tzcfhr/<API key>", "http://thecolbertreport.cc.com/videos/52uula/<API key>", "http://thecolbertreport.cc.com/videos/ysa6lr/neil-shubin", "http://thecolbertreport.cc.com/videos/5majke/<API key>" ], "guest": "Neil Shubin" }, { "date": "2013-01-10", "videos": [ "http://thecolbertreport.cc.com/videos/uej3ac/<API key>", "http://thecolbertreport.cc.com/videos/5n5w35/<API key>", "http://thecolbertreport.cc.com/videos/35sqrd/<API key>", "http://thecolbertreport.cc.com/videos/ro7hjf/benjamin-gibbard" ], "guest": "Ben Gibbard" }, { "date": "2013-01-14", "videos": [ "http://thecolbertreport.cc.com/videos/y2ynrh/<API key>", "http://thecolbertreport.cc.com/videos/8zsm19/<API key>", "http://thecolbertreport.cc.com/videos/zftq7q/<API key>", "http://thecolbertreport.cc.com/videos/4lcqtx/<API key>", "http://thecolbertreport.cc.com/videos/bainem/piers-morgan", "http://thecolbertreport.cc.com/videos/hoc2kn/<API key>" ], "guest": "Piers Morgan" }, { "date": "2013-01-15", "videos": [ "http: "http://thecolbertreport.cc.com/videos/p5ll7c/<API key>", "http://thecolbertreport.cc.com/videos/uuduw3/<API key>", "http://thecolbertreport.cc.com/videos/r78s3t/<API key>", "http://thecolbertreport.cc.com/videos/an9lge/jared-diamond", "http://thecolbertreport.cc.com/videos/usj2pz/<API key>" ], "guest": "Jared Diamond" }, { "date": "2013-01-16", "videos": [ "http: "http://thecolbertreport.cc.com/videos/s9aj13/healthy-fake-smiles", "http://thecolbertreport.cc.com/videos/uhkynp/<API key>", "http://thecolbertreport.cc.com/videos/hbxrk6/<API key>", "http://thecolbertreport.cc.com/videos/62nu7n/<API key>", "http://thecolbertreport.cc.com/videos/m7jh2f/tom-brokaw", "http://thecolbertreport.cc.com/videos/ib0ftp/<API key>" ], "guest": "Tom Brokaw" }, { "date": "2013-01-17", "videos": [ "http://thecolbertreport.cc.com/videos/r3kb1q/<API key>", "http://thecolbertreport.cc.com/videos/qqx0s8/corporate-scamwich", "http://thecolbertreport.cc.com/videos/df7rup/obama-s-gun-grab", "http://thecolbertreport.cc.com/videos/w73nzv/<API key>", "http://thecolbertreport.cc.com/videos/g1jrq5/<API key>", "http://thecolbertreport.cc.com/videos/vem33s/akhil-reed-amar", "http://thecolbertreport.cc.com/videos/jawwj8/<API key>" ], "guest": "Akhil Reed Amar" }, { "date": "2013-01-21", "videos": [ "http: "http://thecolbertreport.cc.com/videos/xjexam/<API key>", "http://thecolbertreport.cc.com/videos/li25sm/<API key>", "http://thecolbertreport.cc.com/videos/djvjxw/<API key>bears", "http://thecolbertreport.cc.com/videos/o7bw1e/ta-nehisi-coates", "http://thecolbertreport.cc.com/videos/9hwods/<API key>" ], "guest": "Ta-Nehisi Coates" }, { "date": "2013-01-22", "videos": [ "http://thecolbertreport.cc.com/videos/u2sxvp/<API key>", "http://thecolbertreport.cc.com/videos/4h7ltu/<API key>", "http://thecolbertreport.cc.com/videos/0f673t/<API key>", "http://thecolbertreport.cc.com/videos/tccphp/<API key>", "http://thecolbertreport.cc.com/videos/rn0fho/kathryn-bigelow", "http://thecolbertreport.cc.com/videos/msaso2/<API key>-" ], "guest": "Kathryn Bigelow" }, { "date": "2013-01-23", "videos": [ "http://thecolbertreport.cc.com/videos/3reklz/beyonce-s-lip-gate", "http://thecolbertreport.cc.com/videos/vw3zie/<API key>", "http://thecolbertreport.cc.com/videos/f3o0qj/<API key>", "http://thecolbertreport.cc.com/videos/202a1c/sally-field", "http://thecolbertreport.cc.com/videos/hd80sm/<API key>" ], "guest": "Sally Field" }, { "date": "2013-01-24", "videos": [ "http://thecolbertreport.cc.com/videos/xaaxud/<API key>", "http://thecolbertreport.cc.com/videos/i1sdq5/<API key>", "http://thecolbertreport.cc.com/videos/vgqq4z/<API key>", "http://thecolbertreport.cc.com/videos/ktiaje/tavi-gevinson", "http://thecolbertreport.cc.com/videos/scixor/<API key>" ], "guest": "Tavi Gevinson" }, { "date": "2013-01-28", "videos": [ "http: "http://thecolbertreport.cc.com/videos/27at9z/rapiscan-scanners", "http://thecolbertreport.cc.com/videos/mm5bdz/<API key>", "http://thecolbertreport.cc.com/videos/0q31iw/<API key>", "http://thecolbertreport.cc.com/videos/qdf7ec/<API key>", "http://thecolbertreport.cc.com/videos/tquuvs/<API key>" ], "guest": "Michael Shellenberger" }, { "date": "2013-01-29", "videos": [ "http: "http://thecolbertreport.cc.com/videos/81oaln/<API key>", "http://thecolbertreport.cc.com/videos/k95k9v/<API key>", "http://thecolbertreport.cc.com/videos/7c8y4f/<API key>", "http://thecolbertreport.cc.com/videos/gfoq4g/<API key>", "http://thecolbertreport.cc.com/videos/jtkgrc/george-saunders", "http://thecolbertreport.cc.com/videos/jzuerq/<API key>-" ], "guest": "George Saunders" }, { "date": "2013-01-30", "videos": [ "http: "http://thecolbertreport.cc.com/videos/drdd3e/<API key>", "http://thecolbertreport.cc.com/videos/qnfsur/<API key>", "http://thecolbertreport.cc.com/videos/i6hr57/non-racist-kkk", "http://thecolbertreport.cc.com/videos/kiwt0s/bill-gates", "http://thecolbertreport.cc.com/videos/4wroqd/<API key>" ], "guest": "Bill Gates" }, { "date": "2013-01-31", "videos": [ "http://thecolbertreport.cc.com/videos/101faw/<API key>", "http://thecolbertreport.cc.com/videos/odn1pg/<API key>", "http://thecolbertreport.cc.com/videos/7wymxs/<API key>", "http://thecolbertreport.cc.com/videos/v42kz3/matthew-guerrieri", "http://thecolbertreport.cc.com/videos/o489no/<API key>-" ], "guest": "Matthew Guerrieri" }, { "date": "2013-02-04", "videos": [ "http: "http://thecolbertreport.cc.com/videos/kb76z3/super-bowl-xlvii", "http://thecolbertreport.cc.com/videos/vow0uy/<API key>", "http://thecolbertreport.cc.com/videos/ur7z4s/<API key>", "http://thecolbertreport.cc.com/videos/qxsatq/sonia-sotomayor", "http://thecolbertreport.cc.com/videos/cmttl3/<API key>" ], "guest": "Justice Sonia Sotomayor" }, { "date": "2013-02-05", "videos": [ "http: "http://thecolbertreport.cc.com/videos/e96s3c/royal-remains", "http://thecolbertreport.cc.com/videos/t6wn9f/<API key>", "http://thecolbertreport.cc.com/videos/a1z0cu/<API key>", "http://thecolbertreport.cc.com/videos/dyxduh/julie-andrews", "http://thecolbertreport.cc.com/videos/y7gdjs/<API key>" ], "guest": "Julie Andrews" }, { "date": "2013-02-06", "videos": [ "http: "http://thecolbertreport.cc.com/videos/33sahu/the-penny-pinch", "http://thecolbertreport.cc.com/videos/r6xbr9/<API key>", "http://thecolbertreport.cc.com/videos/07240r/<API key>", "http://thecolbertreport.cc.com/videos/acokbc/lawrence-wright", "http://thecolbertreport.cc.com/videos/kt2abh/<API key>" ], "guest": "Lawrence Wright" }, { "date": "2013-02-07", "videos": [ "http: "http://thecolbertreport.cc.com/videos/k4xzoo/winter-storm-nemo", "http://thecolbertreport.cc.com/videos/xknwhm/<API key>", "http://thecolbertreport.cc.com/videos/044mxj/-<API key>", "http://thecolbertreport.cc.com/videos/eqsq39/benh-zeitlin", "http://thecolbertreport.cc.com/videos/xarh0o/<API key>" ], "guest": "Behn Zeitlin" }, { "date": "2013-02-11", "videos": [ "http://thecolbertreport.cc.com/videos/xstxbo/<API key>", "http://thecolbertreport.cc.com/videos/s7p70k/<API key>", "http://thecolbertreport.cc.com/videos/v1p2wr/<API key>", "http://thecolbertreport.cc.com/videos/he6l0j/garry-wills", "http://thecolbertreport.cc.com/videos/38op41/<API key>--" ], "guest": "Garry Wills" }, { "date": "2013-02-12", "videos": [ "http: "http://thecolbertreport.cc.com/videos/hwigu9/rnc-autopsy", "http://thecolbertreport.cc.com/videos/6t4bfw/<API key>", "http://thecolbertreport.cc.com/videos/b91wqa/arizona-s-gun-posse", "http://thecolbertreport.cc.com/videos/87jshg/roger-hodge", "http://thecolbertreport.cc.com/videos/4j42vn/<API key>" ], "guest": "Roger Hodge" }, { "date": "2013-02-13", "videos": [ "http://thecolbertreport.cc.com/videos/r8y2v4/<API key>", "http://thecolbertreport.cc.com/videos/7g4eal/state-of-the-rubio", "http://thecolbertreport.cc.com/videos/89tt3v/<API key>", "http://thecolbertreport.cc.com/videos/wrywsk/dave-grohl", "http://thecolbertreport.cc.com/videos/rsui4q/<API key>" ], "guest": "Dave Grohl" }, { "date": "2013-02-14", "videos": [ "http://thecolbertreport.cc.com/videos/8k6qf1/st--valentine-s-day", "http://thecolbertreport.cc.com/videos/bg5se9/<API key>", "http://thecolbertreport.cc.com/videos/a7o9iy/<API key>", "http://thecolbertreport.cc.com/videos/gha2xx/<API key>", "http://thecolbertreport.cc.com/videos/jipac1/gavin-newsom", "http://thecolbertreport.cc.com/videos/tl6blx/<API key>-" ], "guest": "Gavin Newsom" }, { "date": "2013-02-19", "videos": [ "http://thecolbertreport.cc.com/videos/mk66vx/<API key>", "http://thecolbertreport.cc.com/videos/18bt84/<API key>", "http://thecolbertreport.cc.com/videos/nzi8fo/<API key>", "http://thecolbertreport.cc.com/videos/qsppoj/emily-bazelon", "http://thecolbertreport.cc.com/videos/rivg1z/<API key>" ], "guest": "Emily Bazelon" }, { "date": "2013-02-20", "videos": [ "http://thecolbertreport.cc.com/videos/tq706t/<API key>", "http://thecolbertreport.cc.com/videos/76hws3/<API key>", "http://thecolbertreport.cc.com/videos/t95tyj/<API key>", "http://thecolbertreport.cc.com/videos/oy70q1/<API key>-", "http://thecolbertreport.cc.com/videos/d68kfy/david-goldhill", "http://thecolbertreport.cc.com/videos/4869v6/<API key>" ], "guest": "David Goldhill" }, { "date": "2013-02-21", "videos": [ "http://thecolbertreport.cc.com/videos/5dzdoq/-<API key>", "http://thecolbertreport.cc.com/videos/0x6brn/geo-group-stadium", "http://thecolbertreport.cc.com/videos/yhhjej/<API key>", "http://thecolbertreport.cc.com/videos/ef8eii/lil-buck" ], "guest": "Lil Buck" }, { "date": "2013-02-25", "videos": [ "http: "http://thecolbertreport.cc.com/videos/n5lz93/<API key>", "http://thecolbertreport.cc.com/videos/ub1skg/<API key>", "http://thecolbertreport.cc.com/videos/ovpx97/simon-garfield", "http://thecolbertreport.cc.com/videos/7ucjsc/<API key>" ], "guest": "Simon Garfield" }, { "date": "2013-02-26", "videos": [ "http: "http://thecolbertreport.cc.com/videos/gy9em4/<API key>", "http://thecolbertreport.cc.com/videos/f5k4cb/<API key>", "http://thecolbertreport.cc.com/videos/xdriyp/drone-ducking-tips", "http://thecolbertreport.cc.com/videos/wr3lk3/michio-kaku", "http://thecolbertreport.cc.com/videos/i7sahj/<API key>" ], "guest": "Dr. Michio Kaku" }, { "date": "2013-02-27", "videos": [ "http: "http://thecolbertreport.cc.com/videos/8okga0/<API key>", "http://thecolbertreport.cc.com/videos/9mtjmn/<API key>", "http://thecolbertreport.cc.com/videos/9mvj8u/<API key>", "http://thecolbertreport.cc.com/videos/r7gapm/<API key>", "http://thecolbertreport.cc.com/videos/cxjhmj/paola-antonelli", "http://thecolbertreport.cc.com/videos/7trotu/<API key>" ], "guest": "Paola Antonelli" }, { "date": "2013-02-28", "videos": [ "http: "http://thecolbertreport.cc.com/videos/1epo24/<API key>", "http://thecolbertreport.cc.com/videos/d7le3o/<API key>", "http://thecolbertreport.cc.com/videos/tnbuj0/<API key>", "http://thecolbertreport.cc.com/videos/66dbox/jon-favreau", "http://thecolbertreport.cc.com/videos/o5hoan/<API key>" ], "guest": "Obama speechwriter Jon Favreau" }, { "date": "2013-03-04", "videos": [ "http://thecolbertreport.cc.com/videos/ouzof3/<API key>", "http://thecolbertreport.cc.com/videos/xlk2nw/<API key>", "http://thecolbertreport.cc.com/videos/4v9opj/<API key>", "http://thecolbertreport.cc.com/videos/ala255/kirk-bloodsworth", "http://thecolbertreport.cc.com/videos/7xfdsz/<API key>" ], "guest": "Kirk Bloodsworth" }, { "date": "2013-03-05", "videos": [ "http: "http://thecolbertreport.cc.com/videos/d8ua02/<API key>", "http://thecolbertreport.cc.com/videos/yesa8j/obama-s-israel-trip", "http://thecolbertreport.cc.com/videos/xeotb9/<API key>", "http://thecolbertreport.cc.com/videos/r5gahs/<API key>", "http://thecolbertreport.cc.com/videos/23396i/james-franco", "http://thecolbertreport.cc.com/videos/ki0n4m/<API key>" ], "guest": "James Franco" }, { "date": "2013-03-06", "videos": [ "http://thecolbertreport.cc.com/videos/5pvbru/-snowquester-", "http://thecolbertreport.cc.com/videos/2ox5xp/voting-rights-act", "http://thecolbertreport.cc.com/videos/5yipjs/<API key>", "http://thecolbertreport.cc.com/videos/3ddous/<API key>", "http://thecolbertreport.cc.com/videos/25fidf/brendan-o-connell", "http://thecolbertreport.cc.com/videos/76de2t/<API key>" ], "guest": "Brendan O'Connell" }, { "date": "2013-03-07", "videos": [ "http://thecolbertreport.cc.com/videos/7nblia/<API key>", "http://thecolbertreport.cc.com/videos/aq09bw/<API key>", "http://thecolbertreport.cc.com/videos/rz6ppl/the-bachelor", "http://thecolbertreport.cc.com/videos/uldxcb/john-sexton", "http://thecolbertreport.cc.com/videos/mhruf7/<API key>" ], "guest": "John Sexton" }, { "date": "2013-03-25", "videos": [ "http://thecolbertreport.cc.com/videos/6zcxhr/<API key>", "http://thecolbertreport.cc.com/videos/t23n7e/<API key>-", "http://thecolbertreport.cc.com/videos/7cya4y/<API key>", "http://thecolbertreport.cc.com/videos/bwz16t/junot-diaz", "http://thecolbertreport.cc.com/videos/vwhyh8/<API key>-" ], "guest": "Junot Diaz" }, { "date": "2013-03-26", "videos": [ "http://thecolbertreport.cc.com/videos/ftxoqq/<API key>", "http://thecolbertreport.cc.com/videos/k5798h/<API key>", "http://thecolbertreport.cc.com/videos/rj8f1x/<API key>", "http://thecolbertreport.cc.com/videos/udr4lu/eric-topol", "http://thecolbertreport.cc.com/videos/755nas/<API key>" ], "guest": "Dr. Eric Topol" }, { "date": "2013-03-27", "videos": [ "http: "http://thecolbertreport.cc.com/videos/8f2crl/<API key>", "http://thecolbertreport.cc.com/videos/jk0icd/<API key>", "http://thecolbertreport.cc.com/videos/gd7ki7/sharia-mops", "http://thecolbertreport.cc.com/videos/0i05bg/carl-edgar-blake-ii", "http: ], "guest": "Carl Edgar Blake II" }, { "date": "2013-03-28", "videos": [ "http://thecolbertreport.cc.com/videos/mmwqg6/<API key>", "http://thecolbertreport.cc.com/videos/o26xyc/<API key>", "http://thecolbertreport.cc.com/videos/qbupod/<API key>", "http://thecolbertreport.cc.com/videos/sliefv/robert-lustig", "http://thecolbertreport.cc.com/videos/qlgxw8/<API key>" ], "guest": "Dr. Robert Lustig" }, { "date": "2013-04-01", "videos": [ "http: "http://thecolbertreport.cc.com/videos/mbhysf/<API key>", "http://thecolbertreport.cc.com/videos/egcbz2/health-care-lottery", "http://thecolbertreport.cc.com/videos/g3wft7/<API key>", "http://thecolbertreport.cc.com/videos/rmu5w0/sigourney-weaver", "http://thecolbertreport.cc.com/videos/lt4lab/<API key>-" ], "guest": "Sigourney Weaver" }, { "date": "2013-04-02", "videos": [ "http://thecolbertreport.cc.com/videos/dgrhqs/gay-marriage-fraud", "http://thecolbertreport.cc.com/videos/sq7yjh/<API key>", "http://thecolbertreport.cc.com/videos/0pozxj/<API key>", "http://thecolbertreport.cc.com/videos/w7owfy/florida-s-bong-bill", "http://thecolbertreport.cc.com/videos/7qy183/jim-mcgreevey", "http://thecolbertreport.cc.com/videos/1qietk/<API key>" ], "guest": "Jim McGreevey" }, { "date": "2013-04-03", "videos": [ "http://thecolbertreport.cc.com/videos/3ci6sy/-<API key>", "http://thecolbertreport.cc.com/videos/54w6pz/<API key>", "http://thecolbertreport.cc.com/videos/heku72/<API key>", "http://thecolbertreport.cc.com/videos/tnl1m7/a-c--grayling", "http://thecolbertreport.cc.com/videos/kfs88u/<API key>" ], "guest": "A.C. Grayling" }, { "date": "2013-04-04", "videos": [ "http: "http://thecolbertreport.cc.com/videos/2h8ym1/<API key>", "http://thecolbertreport.cc.com/videos/0tmqs0/<API key>", "http://thecolbertreport.cc.com/videos/97bihb/<API key>", "http://thecolbertreport.cc.com/videos/wb31l0/francis-collins", "http: ], "guest": "Dr. Francis Collins" }, { "date": "2013-04-08", "videos": [ "http://thecolbertreport.cc.com/videos/2htlq3/<API key>", "http://thecolbertreport.cc.com/videos/z4m9xu/<API key>", "http://thecolbertreport.cc.com/videos/y3hr34/<API key>", "http://thecolbertreport.cc.com/videos/hmills/<API key>", "http://thecolbertreport.cc.com/videos/jmsckt/<API key>" ], "guest": "Bill Clinton" }, { "date": "2013-04-09", "videos": [ "http: "http://thecolbertreport.cc.com/videos/9a1zbe/<API key>", "http://thecolbertreport.cc.com/videos/k04x7j/<API key>", "http://thecolbertreport.cc.com/videos/yq6m6x/<API key>", "http://thecolbertreport.cc.com/videos/qa420d/charlie-leduff", "http://thecolbertreport.cc.com/videos/jti3ea/<API key>" ], "guest": "Charlie LeDuff" }, { "date": "2013-04-10", "videos": [ "http://thecolbertreport.cc.com/videos/r4g4o0/<API key>", "http://thecolbertreport.cc.com/videos/b0yf3a/<API key>", "http://thecolbertreport.cc.com/videos/xr32ry/<API key>", "http://thecolbertreport.cc.com/videos/mvszff/shane-smith", "http://thecolbertreport.cc.com/videos/fhj67z/<API key>" ], "guest": "Shane Smith" }, { "date": "2013-04-11", "videos": [ "http://thecolbertreport.cc.com/videos/ycrshs/nasa-lasso", "http://thecolbertreport.cc.com/videos/2ixasd/<API key>", "http://thecolbertreport.cc.com/videos/t10bgi/<API key>", "http://thecolbertreport.cc.com/videos/82a7wi/<API key>", "http://thecolbertreport.cc.com/videos/oiajpp/cass-sunstein", "http://thecolbertreport.cc.com/videos/5r04eq/<API key>" ], "guest": "Cass Sunstein" }, { "date": "2013-04-16", "videos": [ "http: "http://thecolbertreport.cc.com/videos/s94ied/<API key>", "http://thecolbertreport.cc.com/videos/h77c6i/rollie-eggmaster", "http://thecolbertreport.cc.com/videos/c5i1jr/caroline-kennedy", "http://thecolbertreport.cc.com/videos/yygt35/<API key>" ], "guest": "Caroline Kennedy" }, { "date": "2013-04-17", "videos": [ "http://thecolbertreport.cc.com/videos/yfwqpo/<API key>", "http://thecolbertreport.cc.com/videos/b1ekda/bitcoin-plunge", "http://thecolbertreport.cc.com/videos/rxy9ze/<API key>", "http://thecolbertreport.cc.com/videos/2sml1x/-<API key>", "http://thecolbertreport.cc.com/videos/n7jblw/alan-cumming", "http://thecolbertreport.cc.com/videos/4y7jmv/<API key>" ], "guest": "Alan Cumming" }, { "date": "2013-04-18", "videos": [ "http://thecolbertreport.cc.com/videos/jr70gq/<API key>-", "http://thecolbertreport.cc.com/videos/de4kxw/<API key>", "http://thecolbertreport.cc.com/videos/x7fhfp/gun-control-block", "http://thecolbertreport.cc.com/videos/tvksjy/richard-engel", "http://thecolbertreport.cc.com/videos/17gkl6/<API key>" ], "guest": "Richard Engel" }, { "date": "2013-04-22", "videos": [ "http: "http://thecolbertreport.cc.com/videos/vlo1dt/boston-bombers", "http://thecolbertreport.cc.com/videos/pd1fay/toronto-terror-plot", "http://thecolbertreport.cc.com/videos/06tavh/<API key>", "http://thecolbertreport.cc.com/videos/hkxcsa/<API key>", "http://thecolbertreport.cc.com/videos/d8p3y1/michael-pollan", "http://thecolbertreport.cc.com/videos/34u7cu/<API key>" ], "guest": "Michael Pollan" }, { "date": "2013-04-23", "videos": [ "http://thecolbertreport.cc.com/videos/12jjaw/scoobygate", "http://thecolbertreport.cc.com/videos/dcyvro/<API key>", "http://thecolbertreport.cc.com/videos/kbgnf0/<API key>", "http://thecolbertreport.cc.com/videos/54pqtc/eric-schmidt", "http://thecolbertreport.cc.com/videos/uwzpai/<API key>" ], "guest": "Eric Schmidt" }, { "date": "2013-04-24", "videos": [ "http://thecolbertreport.cc.com/videos/kwa0vp/ap-twitter-hack", "http://thecolbertreport.cc.com/videos/tk4his/<API key>", "http://thecolbertreport.cc.com/videos/r1hl69/<API key>", "http://thecolbertreport.cc.com/videos/zi0nnq/danica-patrick", "http://thecolbertreport.cc.com/videos/zwp3mi/<API key>" ], "guest": "Danica Patrick" }, { "date": "2013-04-25", "videos": [ "http://thecolbertreport.cc.com/videos/md1l1j/<API key>", "http://thecolbertreport.cc.com/videos/1waayt/colbert-s-book-club", "http://thecolbertreport.cc.com/videos/zfq57f/<API key>", "http://thecolbertreport.cc.com/videos/ypl8dh/<API key>", "http://thecolbertreport.cc.com/videos/9j0img/gene-robinson", "http://thecolbertreport.cc.com/videos/vqrjkz/<API key>-" ], "guest": "Bishop Gene Robinson" }, { "date": "2013-04-29", "videos": [ "http: "http://thecolbertreport.cc.com/videos/s55dpi/<API key>", "http://thecolbertreport.cc.com/videos/q8gaki/<API key>", "http://thecolbertreport.cc.com/videos/su6rj1/<API key>", "http://thecolbertreport.cc.com/videos/u2ew19/yelp-prison-reviews", "http://thecolbertreport.cc.com/videos/8ewxg4/iggy-pop" ], "guest": "Iggy &amp; the Stooges" }, { "date": "2013-04-30", "videos": [ "http: "http://thecolbertreport.cc.com/videos/6brvhc/<API key>", "http://thecolbertreport.cc.com/videos/yxooec/<API key>", "http://thecolbertreport.cc.com/videos/4iphqy/<API key>", "http://thecolbertreport.cc.com/videos/z5q514/<API key>", "http: ], "guest": "Evan Spiegel &amp; Bobby Murphy" }, { "date": "2013-05-01", "videos": [ "http://thecolbertreport.cc.com/videos/82vhzw/<API key>", "http://thecolbertreport.cc.com/videos/7a77hc/<API key>", "http://thecolbertreport.cc.com/videos/rf6pzs/<API key>", "http://thecolbertreport.cc.com/videos/cm8gvz/<API key>", "http://thecolbertreport.cc.com/videos/sq79ll/<API key>-" ], "guest": "Macklemore &amp; Ryan Lewis" }, { "date": "2013-05-02", "videos": [ "http: "http://thecolbertreport.cc.com/videos/7emy7s/<API key>", "http://thecolbertreport.cc.com/videos/2k1660/gitmo-hunger-strike", "http://thecolbertreport.cc.com/videos/is0h3a/<API key>", "http://thecolbertreport.cc.com/videos/nhiiwp/<API key>iron-man-3-", "http://thecolbertreport.cc.com/videos/mqwnf6/ben-kingsley", "http://thecolbertreport.cc.com/videos/t46my4/<API key>" ], "guest": "Ben Kingsley" }, { "date": "2013-05-06", "videos": [ "http: "http://thecolbertreport.cc.com/videos/tnugl6/<API key>-", "http://thecolbertreport.cc.com/videos/rxk0vp/<API key>", "http://thecolbertreport.cc.com/videos/ltsnqq/<API key>", "http://thecolbertreport.cc.com/videos/wm2xsq/robert-caro", "http://thecolbertreport.cc.com/videos/479h8q/<API key>" ], "guest": "Robert Caro" }, { "date": "2013-05-07", "videos": [ "http://thecolbertreport.cc.com/videos/bpnvtc/<API key>", "http://thecolbertreport.cc.com/videos/wwbl80/<API key>", "http://thecolbertreport.cc.com/videos/p3cofn/promposals", "http://thecolbertreport.cc.com/videos/eyzxx1/douglas-rushkoff", "http://thecolbertreport.cc.com/videos/ampziq/<API key>" ], "guest": "Douglas Rushkoff" }, { "date": "2013-05-08", "videos": [ "http: "http://thecolbertreport.cc.com/videos/fyx23e/<API key>", "http://thecolbertreport.cc.com/videos/m0huaq/<API key>", "http://thecolbertreport.cc.com/videos/gbxmpo/going-diaperless", "http://thecolbertreport.cc.com/videos/xg0uqu/richard-besser", "http://thecolbertreport.cc.com/videos/in85s8/<API key>" ], "guest": "Dr. Richard Besser" }, { "date": "2013-05-09", "videos": [ "http://thecolbertreport.cc.com/videos/t96yfm/<API key>-", "http://thecolbertreport.cc.com/videos/1i7t2j/<API key>-", "http://thecolbertreport.cc.com/videos/4apw9e/<API key>-", "http://thecolbertreport.cc.com/videos/tetoi9/baz-luhrmann", "http://thecolbertreport.cc.com/videos/uuyuly/<API key>-" ], "guest": "Jennifer Egan, Baz Luhrmann" }, { "date": "2013-05-13", "videos": [ "http://thecolbertreport.cc.com/videos/hdvhlq/<API key>", "http://thecolbertreport.cc.com/videos/gxwgja/<API key>", "http://thecolbertreport.cc.com/videos/jgqf2m/<API key>", "http://thecolbertreport.cc.com/videos/l06a4l/<API key>", "http://thecolbertreport.cc.com/videos/ny9pcg/<API key>" ], "guest": "Jessica Buchanan &amp; Erik Landemalm" }, { "date": "2013-05-14", "videos": [ "http: "http://thecolbertreport.cc.com/videos/1nghxb/<API key>", "http://thecolbertreport.cc.com/videos/0jjvya/<API key>", "http://thecolbertreport.cc.com/videos/h5zenk/<API key>", "http://thecolbertreport.cc.com/videos/tq7jny/dan-brown", "http://thecolbertreport.cc.com/videos/ftry54/<API key>" ], "guest": "Dan Brown" }, { "date": "2013-05-15", "videos": [ "http://thecolbertreport.cc.com/videos/c91oeg/bug-protein", "http://thecolbertreport.cc.com/videos/qxjgw6/<API key>", "http://thecolbertreport.cc.com/videos/ft1gyx/<API key>", "http://thecolbertreport.cc.com/videos/xjltw5/cyndi-lauper", "http://thecolbertreport.cc.com/videos/f06og4/<API key>" ], "guest": "Cyndi Lauper" }, { "date": "2013-05-16", "videos": [ "http: "http://thecolbertreport.cc.com/videos/vshddv/asparagusgate", "http://thecolbertreport.cc.com/videos/x9725b/<API key>", "http://thecolbertreport.cc.com/videos/6685w4/3d-printed-guns", "http://thecolbertreport.cc.com/videos/7xqphc/daniel-lieberman", "http://thecolbertreport.cc.com/videos/yktive/<API key>" ], "guest": "Dr. Daniel Lieberman" }, { "date": "2013-05-20", "videos": [ "http://thecolbertreport.cc.com/videos/iqqmsb/<API key>", "http://thecolbertreport.cc.com/videos/xwopvb/<API key>", "http://thecolbertreport.cc.com/videos/5qyy0w/<API key>", "http://thecolbertreport.cc.com/videos/irj43w/david-sassoon", "http://thecolbertreport.cc.com/videos/m9mkd8/<API key>" ], "guest": "David Sassoon" }, { "date": "2013-05-21", "videos": [ "http: "http://thecolbertreport.cc.com/videos/7fm2v2/<API key>", "http://thecolbertreport.cc.com/videos/pbfcaq/<API key>", "http://thecolbertreport.cc.com/videos/3jp6f3/<API key>", "http://thecolbertreport.cc.com/videos/cqajs7/noah-feldman", "http://thecolbertreport.cc.com/videos/2jhy5w/<API key>" ], "guest": "Noah Feldman" }, { "date": "2013-05-22", "videos": [ "http: "http://thecolbertreport.cc.com/videos/24adff/<API key>", "http://thecolbertreport.cc.com/videos/icnp2y/<API key>", "http://thecolbertreport.cc.com/videos/60entl/-citizen-koch-", "http://thecolbertreport.cc.com/videos/15h43y/matt-berninger" ], "guest": "The National" }, { "date": "2013-05-23", "videos": [ "http://thecolbertreport.cc.com/videos/2j741e/aumf-repeal", "http://thecolbertreport.cc.com/videos/khhujw/<API key>", "http://thecolbertreport.cc.com/videos/0bv6m0/redemption-for-all", "http://thecolbertreport.cc.com/videos/ur1l6x/c-j--chivers", "http://thecolbertreport.cc.com/videos/ahpe36/<API key>" ], "guest": "C.J. Chivers" }, { "date": "2013-06-03", "videos": [ "http://thecolbertreport.cc.com/videos/ex0o10/stephen-s-week-off", "http://thecolbertreport.cc.com/videos/ervy41/<API key>", "http://thecolbertreport.cc.com/videos/s86l5y/trackingpoint-rifle", "http://thecolbertreport.cc.com/videos/4fwbkt/john-dingell", "http://thecolbertreport.cc.com/videos/yrhc20/<API key>" ], "guest": "Rep. John Dingell" }, { "date": "2013-06-04", "videos": [ "http://thecolbertreport.cc.com/videos/fivedj/<API key>", "http://thecolbertreport.cc.com/videos/x7wc5a/<API key>", "http://thecolbertreport.cc.com/videos/u1fvmr/<API key>", "http://thecolbertreport.cc.com/videos/tz8gve/alex-gibney", "http://thecolbertreport.cc.com/videos/fbuavt/<API key>" ], "guest": "Alex Gibney" }, { "date": "2013-06-05", "videos": [ "http: "http://thecolbertreport.cc.com/videos/eogja8/commando-of-steel", "http://thecolbertreport.cc.com/videos/fva65v/<API key>", "http://thecolbertreport.cc.com/videos/ibdfsk/<API key>", "http://thecolbertreport.cc.com/videos/bqahez/<API key>", "http://thecolbertreport.cc.com/videos/wqd06c/jonathan-alter", "http://thecolbertreport.cc.com/videos/el0t4o/<API key>" ], "guest": "Jonathan Alter" }, { "date": "2013-06-06", "videos": [ "http://thecolbertreport.cc.com/videos/onw7lq/<API key>", "http://thecolbertreport.cc.com/videos/hbmw2f/<API key>", "http://thecolbertreport.cc.com/videos/zhz7uc/<API key>", "http://thecolbertreport.cc.com/videos/lcf7d3/<API key>", "http: ], "guest": "Stephen King, John Mellencamp, T Bone Burnett" }, { "date": "2013-06-10", "videos": [ "http://thecolbertreport.cc.com/videos/oc2w3x/<API key>", "http://thecolbertreport.cc.com/videos/bkbpaj/<API key>", "http://thecolbertreport.cc.com/videos/rnftw3/<API key>", "http://thecolbertreport.cc.com/videos/147u1d/<API key>", "http://thecolbertreport.cc.com/videos/vii2l9/dan-savage", "http://thecolbertreport.cc.com/videos/kmqz9h/<API key>" ], "guest": "Dan Savage" }, { "date": "2013-06-11", "videos": [ "http: "http://thecolbertreport.cc.com/videos/1mm086/<API key>", "http://thecolbertreport.cc.com/videos/jejy0d/<API key>", "http://thecolbertreport.cc.com/videos/sa86i9/<API key>", "http://thecolbertreport.cc.com/videos/s2d0lp/daniel-bergner", "http://thecolbertreport.cc.com/videos/x7nfzj/<API key>" ], "guest": "Daniel Bergner" }, { "date": "2013-06-12", "videos": [ "http://thecolbertreport.cc.com/videos/jdqve3/<API key>", "http://thecolbertreport.cc.com/videos/eweibb/<API key>", "http://thecolbertreport.cc.com/videos/9i45f0/paul-mccartney", "http://thecolbertreport.cc.com/videos/2ildb8/nyc-bike-share" ], "guest": "Paul McCartney" }, { "date": "2013-06-19", "videos": [ "http://thecolbertreport.cc.com/videos/yxgnju/<API key>", "http://thecolbertreport.cc.com/videos/jm7bya/<API key>", "http://thecolbertreport.cc.com/videos/rtfkei/<API key>", "http://thecolbertreport.cc.com/videos/vztqfg/the-postal-service", "http://thecolbertreport.cc.com/videos/7vr4pz/<API key>" ], "guest": "The Postal Service" }, { "date": "2013-06-20", "videos": [ "http: "http://thecolbertreport.cc.com/videos/v8ee5f/<API key>", "http://thecolbertreport.cc.com/videos/k3dodo/<API key>", "http://thecolbertreport.cc.com/videos/7udg5z/<API key>", "http://thecolbertreport.cc.com/videos/0mw5zk/joss-whedon", "http://thecolbertreport.cc.com/videos/ooshhr/<API key>" ], "guest": "Joss Whedon" }, { "date": "2013-06-24", "videos": [ "http://thecolbertreport.cc.com/videos/6gyv8z/<API key>", "http://thecolbertreport.cc.com/videos/oztyjs/<API key>", "http://thecolbertreport.cc.com/videos/93t9s1/<API key>", "http://thecolbertreport.cc.com/videos/dzzcx7/andrew-solomon", "http://thecolbertreport.cc.com/videos/h7v6sr/<API key>" ], "guest": "Andrew Solomon" }, { "date": "2013-06-25", "videos": [ "http: "http://thecolbertreport.cc.com/videos/348hon/<API key>", "http://thecolbertreport.cc.com/videos/ysuxww/<API key>", "http://thecolbertreport.cc.com/videos/3gv8et/<API key>", "http://thecolbertreport.cc.com/videos/mnxaxk/<API key>", "http://thecolbertreport.cc.com/videos/ip1pn0/peniel-joseph", "http://thecolbertreport.cc.com/videos/b4zgvh/<API key>" ], "guest": "Peniel Joseph" }, { "date": "2013-06-26", "videos": [ "http: "http://thecolbertreport.cc.com/videos/nzd784/<API key>", "http://thecolbertreport.cc.com/videos/um981i/<API key>", "http://thecolbertreport.cc.com/videos/btpztg/<API key>", "http://thecolbertreport.cc.com/videos/3ca2a0/bill-moyers", "http://thecolbertreport.cc.com/videos/09w1k9/<API key>" ], "guest": "Bill Moyers" }, { "date": "2013-06-27", "videos": [ "http://thecolbertreport.cc.com/videos/9lyyd3/<API key>", "http://thecolbertreport.cc.com/videos/3wbx1d/<API key>", "http://thecolbertreport.cc.com/videos/ncxmfs/-<API key>", "http://thecolbertreport.cc.com/videos/0gj3ie/chuck-schumer", "http://thecolbertreport.cc.com/videos/6kec7y/<API key>" ], "guest": "Sen. Chuck Schumer" }, { "date": "2013-07-15", "videos": [ "http://thecolbertreport.cc.com/videos/6jl3zv/stephen-s-vacation", "http://thecolbertreport.cc.com/videos/0gzuno/<API key>", "http://thecolbertreport.cc.com/videos/9nhthn/<API key>", "http://thecolbertreport.cc.com/videos/6dlnrd/<API key>", "http://thecolbertreport.cc.com/videos/vwtsg0/jeremy-scahill", "http://thecolbertreport.cc.com/videos/88fai0/<API key>" ], "guest": "Jeremy Scahill" }, { "date": "2013-07-16", "videos": [ "http: "http://thecolbertreport.cc.com/videos/rr5gb5/royal-baby-bump", "http://thecolbertreport.cc.com/videos/dd82ys/<API key>", "http://thecolbertreport.cc.com/videos/e8110o/npr-on-multitasking", "http://thecolbertreport.cc.com/videos/e5obyh/david-karp", "http: ], "guest": "David Karp" }, { "date": "2013-07-17", "videos": [ "http://thecolbertreport.cc.com/videos/84x6wp/<API key>", "http://thecolbertreport.cc.com/videos/eiwwmp/<API key>", "http://thecolbertreport.cc.com/videos/dii80x/food-stamp-funding", "http://thecolbertreport.cc.com/videos/279goq/<API key>", "http://thecolbertreport.cc.com/videos/pw17w7/<API key>", "http://thecolbertreport.cc.com/videos/qfpfy4/<API key>" ], "guest": "Jerry Seinfeld" }, { "date": "2013-07-18", "videos": [ "http://thecolbertreport.cc.com/videos/r4piw8/<API key>", "http://thecolbertreport.cc.com/videos/2m27vd/<API key>", "http://thecolbertreport.cc.com/videos/dpebt7/<API key>", "http://thecolbertreport.cc.com/videos/m8rn8j/<API key>", "http://thecolbertreport.cc.com/videos/y56hes/jeff-bridges", "http://thecolbertreport.cc.com/videos/fiop8t/<API key>-" ], "guest": "Jeff Bridges" }, { "date": "2013-07-22", "videos": [ "http://thecolbertreport.cc.com/videos/20zlbx/<API key>", "http://thecolbertreport.cc.com/videos/d0bn33/<API key>", "http://thecolbertreport.cc.com/videos/8fg72p/<API key>", "http://thecolbertreport.cc.com/videos/0p9n45/<API key>", "http://thecolbertreport.cc.com/videos/3azmuc/kjerstin-gruys", "http://thecolbertreport.cc.com/videos/mritg0/<API key>" ], "guest": "Kjerstin Gruys" }, { "date": "2013-07-23", "videos": [ "http://thecolbertreport.cc.com/videos/y6fmk6/<API key>-", "http://thecolbertreport.cc.com/videos/adczam/<API key>", "http://thecolbertreport.cc.com/videos/3vijkd/<API key>", "http://thecolbertreport.cc.com/videos/vbghld/<API key>", "http://thecolbertreport.cc.com/videos/5tqazj/kenneth-goldsmith", "http://thecolbertreport.cc.com/videos/fvgc0u/<API key>" ], "guest": "Kenneth Goldsmith" }, { "date": "2013-07-24", "videos": [ "http://thecolbertreport.cc.com/videos/508jwm/royal-baby-fever", "http://thecolbertreport.cc.com/videos/eodctw/<API key>", "http://thecolbertreport.cc.com/videos/4sgopv/<API key>", "http://thecolbertreport.cc.com/videos/bf89i9/<API key>", "http://thecolbertreport.cc.com/videos/zwqhae/anant-agarwal", "http://thecolbertreport.cc.com/videos/gbago4/<API key>" ], "guest": "Anant Agarwal" }, { "date": "2013-07-25", "videos": [ "http://thecolbertreport.cc.com/videos/l1dtzt/<API key>", "http://thecolbertreport.cc.com/videos/lyjdmu/<API key>", "http://thecolbertreport.cc.com/videos/h9c7gh/<API key>", "http://thecolbertreport.cc.com/videos/8chokd/<API key>", "http://thecolbertreport.cc.com/videos/263vwc/olympia-snowe", "http://thecolbertreport.cc.com/videos/kx84kd/<API key>" ], "guest": "Olympia Snowe" }, { "date": "2013-07-29", "videos": [ "http: "http://thecolbertreport.cc.com/videos/n0w3zw/obamacare-cards", "http://thecolbertreport.cc.com/videos/pna3x8/<API key>", "http://thecolbertreport.cc.com/videos/2i98l3/the-lumineers", "http://thecolbertreport.cc.com/videos/1i7dzf/<API key>" ], "guest": "The Lumineers" }, { "date": "2013-07-30", "videos": [ "http: "http://thecolbertreport.cc.com/videos/mulhwo/<API key>", "http://thecolbertreport.cc.com/videos/gr77sg/senator-gridlock", "http://thecolbertreport.cc.com/videos/hrha3p/<API key>", "http://thecolbertreport.cc.com/videos/jah6al/<API key>", "http://thecolbertreport.cc.com/videos/bhod50/atul-gawande", "http://thecolbertreport.cc.com/videos/c1f9z7/<API key>" ], "guest": "Atul Gawande" }, { "date": "2013-07-31", "videos": [ "http: "http://thecolbertreport.cc.com/videos/6p4joy/<API key>", "http://thecolbertreport.cc.com/videos/hcbpix/<API key>-", "http://thecolbertreport.cc.com/videos/21zxm1/<API key>", "http://thecolbertreport.cc.com/videos/zyu4c8/<API key>", "http://thecolbertreport.cc.com/videos/ngxjwr/emily-matchar", "http://thecolbertreport.cc.com/videos/f1q01l/<API key>" ], "guest": "Emily Matchar" }, { "date": "2013-08-01", "videos": [ "http: "http://thecolbertreport.cc.com/videos/09hbf0/<API key>", "http://thecolbertreport.cc.com/videos/o0rsdt/<API key>", "http://thecolbertreport.cc.com/videos/y8ilbl/grab-ask-5800", "http://thecolbertreport.cc.com/videos/opj4x1/<API key>", "http://thecolbertreport.cc.com/videos/gyog46/bryan-cranston", "http://thecolbertreport.cc.com/videos/qv7up3/<API key>" ], "guest": "Bryan Cranston" }, { "date": "2013-08-05", "videos": [ "http://thecolbertreport.cc.com/videos/n525ux/<API key>", "http://thecolbertreport.cc.com/videos/1y9s5s/<API key>", "http://thecolbertreport.cc.com/videos/91y2gj/hugh-laurie", "http://thecolbertreport.cc.com/videos/g0yu17/<API key>", "http://thecolbertreport.cc.com/videos/n9o8qy/<API key>" ], "guest": "Hugh Laurie" }, { "date": "2013-08-06", "videos": [ "http://thecolbertreport.cc.com/videos/4ybtps/<API key>", "http://thecolbertreport.cc.com/videos/s9j4ux/<API key>-" ], "guest": "Robin Thicke" }, { "date": "2013-08-07", "videos": [ "http://thecolbertreport.cc.com/videos/0t0r8t/<API key>", "http://thecolbertreport.cc.com/videos/je51p5/<API key>", "http://thecolbertreport.cc.com/videos/m9o287/<API key>", "http://thecolbertreport.cc.com/videos/b0jyca/<API key>", "http://thecolbertreport.cc.com/videos/rrfnhj/ashton-kutcher", "http://thecolbertreport.cc.com/videos/iqw6df/<API key>" ], "guest": "Ashton Kutcher" }, { "date": "2013-08-08", "videos": [ "http://thecolbertreport.cc.com/videos/ehgkke/ganjay-supta", "http://thecolbertreport.cc.com/videos/x55kjy/hollywood-heroes", "http://thecolbertreport.cc.com/videos/lual8r/<API key>", "http://thecolbertreport.cc.com/videos/qqmmcz/<API key>", "http://thecolbertreport.cc.com/videos/6duz1s/colum-mccann", "http://thecolbertreport.cc.com/videos/fama3f/<API key>-" ], "guest": "Colum McCann" }, { "date": "2013-08-12", "videos": [ "http://thecolbertreport.cc.com/videos/m7rv7i/<API key>", "http://thecolbertreport.cc.com/videos/qokabz/<API key>", "http://thecolbertreport.cc.com/videos/vni3w0/<API key>", "http://thecolbertreport.cc.com/videos/swss3n/<API key>", "http://thecolbertreport.cc.com/videos/lixrq0/sheldon-whitehouse", "http://thecolbertreport.cc.com/videos/ck9vu0/<API key>" ], "guest": "Sen. Sheldon Whitehouse" }, { "date": "2013-08-13", "videos": [ "http://thecolbertreport.cc.com/videos/jtshn3/<API key>", "http://thecolbertreport.cc.com/videos/o5aiwi/<API key>", "http://thecolbertreport.cc.com/videos/miwb3z/<API key>", "http://thecolbertreport.cc.com/videos/pd148a/john-lewis-pt--1", "http://thecolbertreport.cc.com/videos/ocqoae/john-lewis-pt--2", "http://thecolbertreport.cc.com/videos/z6ytj0/<API key>-" ], "guest": "Rep. John Lewis" }, { "date": "2013-08-14", "videos": [ "http: "http://thecolbertreport.cc.com/videos/wjgfbx/<API key>", "http://thecolbertreport.cc.com/videos/y58ew9/<API key>", "http://thecolbertreport.cc.com/videos/oafmw7/<API key>", "http://thecolbertreport.cc.com/videos/wc12me/kevin-spacey", "http://thecolbertreport.cc.com/videos/o1qztj/<API key>" ], "guest": "Kevin Spacey" }, { "date": "2013-08-15", "videos": [ "http://thecolbertreport.cc.com/videos/fwx35y/obama-rodeo-clown", "http://thecolbertreport.cc.com/videos/0bdl0z/<API key>", "http: "http://thecolbertreport.cc.com/videos/jngkv0/<API key>", "http://thecolbertreport.cc.com/videos/8ax5jq/richard-brodhead", "http://thecolbertreport.cc.com/videos/42qo92/<API key>" ], "guest": "Richard Brodhead" }, { "date": "2013-09-03", "videos": [ "http://thecolbertreport.cc.com/videos/pkboc3/<API key>", "http: "http://thecolbertreport.cc.com/videos/tx5zzr/<API key>", "http://thecolbertreport.cc.com/videos/dhyi3l/<API key>", "http://thecolbertreport.cc.com/videos/pwzlgj/timothy-dolan-pt--1", "http://thecolbertreport.cc.com/videos/m4p07o/timothy-dolan-pt--2", "http://thecolbertreport.cc.com/videos/xws5t1/<API key>-" ], "guest": "Timothy Cardinal Dolan" }, { "date": "2013-09-04", "videos": [ "http: "http://thecolbertreport.cc.com/videos/020ri3/cris-ish-in-syri-eh", "http://thecolbertreport.cc.com/videos/jtjmpo/<API key>", "http://thecolbertreport.cc.com/videos/hrfvxe/perfect-polly", "http://thecolbertreport.cc.com/videos/q9zsg7/gary-england", "http://thecolbertreport.cc.com/videos/jnebqk/<API key>" ], "guest": "Gary England" }, { "date": "2013-09-05", "videos": [ "http: "http://thecolbertreport.cc.com/videos/cgxdol/<API key>", "http://thecolbertreport.cc.com/videos/cn86ce/<API key>", "http://thecolbertreport.cc.com/videos/l0disu/<API key>", "http://thecolbertreport.cc.com/videos/ub6jy0/john-prine" ], "guest": "John Prine" }, { "date": "2013-09-09", "videos": [ "http://thecolbertreport.cc.com/videos/m0qnfl/egypt-s-stork-bust", "http://thecolbertreport.cc.com/videos/4zp755/<API key>", "http://thecolbertreport.cc.com/videos/jvhzt0/<API key>", "http://thecolbertreport.cc.com/videos/a4utu0/<API key>", "http://thecolbertreport.cc.com/videos/f9cuxl/billie-jean-king", "http://thecolbertreport.cc.com/videos/2dw2cm/<API key>" ], "guest": "Billie Jean King" }, { "date": "2013-09-10", "videos": [ "http://thecolbertreport.cc.com/videos/o8sjcq/<API key>", "http://thecolbertreport.cc.com/videos/49qji6/<API key>", "http://thecolbertreport.cc.com/videos/ueo7a2/<API key>-", "http://thecolbertreport.cc.com/videos/f2a6ao/<API key>", "http://thecolbertreport.cc.com/videos/2p7nwl/<API key>" ], "guest": "Shane Salerno" }, { "date": "2013-09-11", "videos": [ "http://thecolbertreport.cc.com/videos/lop9g2/<API key>", "http://thecolbertreport.cc.com/videos/pymjnx/<API key>", "http://thecolbertreport.cc.com/videos/cta0kn/<API key>", "http://thecolbertreport.cc.com/videos/w9ejb1/<API key>", "http://thecolbertreport.cc.com/videos/p83qs9/sheryl-crow" ], "guest": "Sheryl Crow" }, { "date": "2013-09-12", "videos": [ "http://thecolbertreport.cc.com/videos/r3zogj/<API key>", "http://thecolbertreport.cc.com/videos/bujbay/<API key>", "http://thecolbertreport.cc.com/videos/7z7vfu/<API key>", "http://thecolbertreport.cc.com/videos/cm16zd/philip-mudd", "http://thecolbertreport.cc.com/videos/4lw1cp/<API key>" ], "guest": "Philip Mudd" }, { "date": "2013-09-16", "videos": [ "http: "http://thecolbertreport.cc.com/videos/2lxvvp/<API key>", "http://thecolbertreport.cc.com/videos/ggices/<API key>", "http://thecolbertreport.cc.com/videos/vui8um/miss-america-2013", "http://thecolbertreport.cc.com/videos/v77k60/andrew-bacevich", "http://thecolbertreport.cc.com/videos/c31p0i/<API key>" ], "guest": "Andrew Bacevich" }, { "date": "2013-09-17", "videos": [ "http: "http://thecolbertreport.cc.com/videos/hwlkz5/<API key>", "http://thecolbertreport.cc.com/videos/cgb0cw/<API key>", "http://thecolbertreport.cc.com/videos/rkpujl/<API key>", "http://thecolbertreport.cc.com/videos/2dwhox/arne-duncan", "http://thecolbertreport.cc.com/videos/ukxkfk/<API key>" ], "guest": "Arne Duncan" }, { "date": "2013-09-18", "videos": [ "http://thecolbertreport.cc.com/videos/g7l8kk/<API key>", "http://thecolbertreport.cc.com/videos/8pp3si/<API key>", "http://thecolbertreport.cc.com/videos/v0wk5h/<API key>", "http://thecolbertreport.cc.com/videos/ft7l84/nicholson-baker", "http://thecolbertreport.cc.com/videos/lpg81o/<API key>-" ], "guest": "Nicholson Baker" }, { "date": "2013-09-19", "videos": [ "http://thecolbertreport.cc.com/videos/1j1cxh/<API key>", "http://thecolbertreport.cc.com/videos/4iux0d/<API key>", "http://thecolbertreport.cc.com/videos/6nrq55/<API key>", "http://thecolbertreport.cc.com/videos/7qwiwv/<API key>", "http://thecolbertreport.cc.com/videos/x5xw6g/jack-johnson" ], "guest": "Jack Johnson" }, { "date": "2013-09-24", "videos": [ "http://thecolbertreport.cc.com/videos/ecu59e/<API key>", "http://thecolbertreport.cc.com/videos/nsfkr7/<API key>", "http://thecolbertreport.cc.com/videos/vb7ms1/<API key>", "http://thecolbertreport.cc.com/videos/7xtam8/metallica", "http://thecolbertreport.cc.com/videos/g9dzis/<API key>" ], "guest": "Metallica" }, { "date": "2013-09-25", "videos": [ "http://thecolbertreport.cc.com/videos/8fmvel/<API key>", "http://thecolbertreport.cc.com/videos/lsiidb/<API key>", "http://thecolbertreport.cc.com/videos/ks6rd5/<API key>-", "http://thecolbertreport.cc.com/videos/urqr8j/<API key>", "http://thecolbertreport.cc.com/videos/93nnw6/<API key>" ], "guest": "Joseph Gordon-Levitt" }, { "date": "2013-09-26", "videos": [ "http://thecolbertreport.cc.com/videos/itk7kp/<API key>", "http://thecolbertreport.cc.com/videos/u1mo7v/chris-fischer", "http: "http://thecolbertreport.cc.com/videos/153u0a/<API key>", "http://thecolbertreport.cc.com/videos/87ddew/<API key>" ], "guest": "Chris Fischer" }, { "date": "2013-09-30", "videos": [ "http://thecolbertreport.cc.com/videos/mp715j/<API key>", "http://thecolbertreport.cc.com/videos/pbvraa/<API key>", "http://thecolbertreport.cc.com/videos/wzj7bh/<API key>", "http://thecolbertreport.cc.com/videos/xid9jc/<API key>" ], "guest": "Vince Gilligan" }, { "date": "2013-10-01", "videos": [ "http://thecolbertreport.cc.com/videos/99odk6/<API key>", "http://thecolbertreport.cc.com/videos/cn352h/<API key>", "http://thecolbertreport.cc.com/videos/1ntmd2/<API key>", "http://thecolbertreport.cc.com/videos/gfz4h7/<API key>", "http://thecolbertreport.cc.com/videos/obk0r1/daniel-radcliffe", "http://thecolbertreport.cc.com/videos/7ni2qs/<API key>" ], "guest": "Daniel Radcliffe" }, { "date": "2013-10-02", "videos": [ "http: "http://thecolbertreport.cc.com/videos/qx1ar9/<API key>", "http://thecolbertreport.cc.com/videos/qz6a9i/<API key>", "http://thecolbertreport.cc.com/videos/xjdheq/<API key>-", "http://thecolbertreport.cc.com/videos/5ynb8q/chris-matthews", "http://thecolbertreport.cc.com/videos/mvs3wz/<API key>" ], "guest": "Chris Matthews" }, { "date": "2013-10-03", "videos": [ "http://thecolbertreport.cc.com/videos/7l0bys/<API key>", "http://thecolbertreport.cc.com/videos/amjasd/<API key>", "http://thecolbertreport.cc.com/videos/qt2vrd/david-finkel", "http://thecolbertreport.cc.com/videos/6as11u/<API key>" ], "guest": "David Finkel" }, { "date": "2013-10-07", "videos": [ "http://thecolbertreport.cc.com/videos/iyj9i2/<API key>", "http://thecolbertreport.cc.com/videos/f9ohl9/<API key>", "http://thecolbertreport.cc.com/videos/rodf66/<API key>", "http://thecolbertreport.cc.com/videos/d10tae/<API key>", "http://thecolbertreport.cc.com/videos/feyjl3/james-spithill", "http://thecolbertreport.cc.com/videos/m7oe3o/<API key>" ], "guest": "James Spithill" }, { "date": "2013-10-08", "videos": [ "http: "http://thecolbertreport.cc.com/videos/u5kkik/<API key>", "http://thecolbertreport.cc.com/videos/2b5rst/<API key>", "http://thecolbertreport.cc.com/videos/049124/<API key>", "http://thecolbertreport.cc.com/videos/llhqmr/paul-giamatti", "http://thecolbertreport.cc.com/videos/tuzaza/<API key>-" ], "guest": "Paul Giamatti" }, { "date": "2013-10-09", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ssksja/<API key>", "http://thecolbertreport.cc.com/videos/h502rh/twitter-s-ipo", "http://thecolbertreport.cc.com/videos/k9g3h2/<API key>", "http://thecolbertreport.cc.com/videos/ldxsu2/tom-hanks", "http://thecolbertreport.cc.com/videos/uevql0/<API key>" ], "guest": "Tom Hanks" }, { "date": "2013-10-10", "videos": [ "http://thecolbertreport.cc.com/videos/xqbppa/<API key>", "http://thecolbertreport.cc.com/videos/bzo5fv/<API key>", "http://thecolbertreport.cc.com/videos/rt3php/<API key>", "http://thecolbertreport.cc.com/videos/r2mded/<API key>", "http://thecolbertreport.cc.com/videos/twnvtr/<API key>", "http://thecolbertreport.cc.com/videos/gn1hnb/<API key>" ], "guest": "Reed Albergotti &amp; Vanessa O'Connell" }, { "date": "2013-10-21", "videos": [ "http://thecolbertreport.cc.com/videos/zabrcj/<API key>", "http://thecolbertreport.cc.com/videos/fs5lvs/<API key>", "http://thecolbertreport.cc.com/videos/xmc07q/the-reflektors", "http://thecolbertreport.cc.com/videos/z30io4/<API key>" ], "guest": "The Reflektors" }, { "date": "2013-10-22", "videos": [ "http: "http://thecolbertreport.cc.com/videos/tpp3c7/<API key>", "http://thecolbertreport.cc.com/videos/w4k85n/<API key>", "http://thecolbertreport.cc.com/videos/wv85sy/<API key>", "http://thecolbertreport.cc.com/videos/413dai/a--scott-berg", "http://thecolbertreport.cc.com/videos/j9enbw/<API key>-" ], "guest": "A. Scott Berg" }, { "date": "2013-10-23", "videos": [ "http://thecolbertreport.cc.com/videos/pfan07/<API key>", "http://thecolbertreport.cc.com/videos/51c17c/<API key>", "http://thecolbertreport.cc.com/videos/w07qf1/<API key>", "http://thecolbertreport.cc.com/videos/j95qfd/<API key>", "http://thecolbertreport.cc.com/videos/rtpako/<API key>" ], "guest": "Gwen Ifill, Judy Woodruff" }, { "date": "2013-10-24", "videos": [ "http: "http://thecolbertreport.cc.com/videos/8rabqj/<API key>", "http://thecolbertreport.cc.com/videos/6zcsyl/<API key>", "http://thecolbertreport.cc.com/videos/60wsnw/<API key>", "http://thecolbertreport.cc.com/videos/9ak9w5/stephen-fry", "http://thecolbertreport.cc.com/videos/9py49q/<API key>" ], "guest": "Stephen Fry" }, { "date": "2013-10-28", "videos": [ "http://thecolbertreport.cc.com/videos/xfzjxy/<API key>", "http://thecolbertreport.cc.com/videos/0m56pa/<API key>", "http://thecolbertreport.cc.com/videos/7egvpg/<API key>", "http://thecolbertreport.cc.com/videos/boarwv/<API key>", "http://thecolbertreport.cc.com/videos/kz8x10/orlando-bloom", "http://thecolbertreport.cc.com/videos/fl658q/<API key>" ], "guest": "Orlando Bloom" }, { "date": "2013-10-29", "videos": [ "http: "http://thecolbertreport.cc.com/videos/qingaf/<API key>", "http://thecolbertreport.cc.com/videos/yxqllm/<API key>", "http://thecolbertreport.cc.com/videos/j9efvm/billy-collins", "http://thecolbertreport.cc.com/videos/fnaadw/<API key>-" ], "guest": "Billy Collins" }, { "date": "2013-10-30", "videos": [ "http: "http://thecolbertreport.cc.com/videos/me8aye/<API key>", "http://thecolbertreport.cc.com/videos/jns4fj/<API key>", "http://thecolbertreport.cc.com/videos/ammjdj/<API key>", "http://thecolbertreport.cc.com/videos/7frodo/jack-andraka", "http://thecolbertreport.cc.com/videos/s14fzp/<API key>" ], "guest": "Jack Andraka" }, { "date": "2013-10-31", "videos": [ "http: "http://thecolbertreport.cc.com/videos/8q3ppm/<API key>", "http://thecolbertreport.cc.com/videos/2krnuz/<API key>", "http://thecolbertreport.cc.com/videos/mzqttu/<API key>", "http://thecolbertreport.cc.com/videos/owduja/zach-sims", "http://thecolbertreport.cc.com/videos/53uet6/<API key>" ], "guest": "Zach Sims" }, { "date": "2013-11-04", "videos": [ "http: "http://thecolbertreport.cc.com/videos/v68n7l/<API key>", "http://thecolbertreport.cc.com/videos/oi11jp/<API key>", "http://thecolbertreport.cc.com/videos/29w6fx/-<API key>", "http://thecolbertreport.cc.com/videos/z1sht0/david-folkenflik", "http://thecolbertreport.cc.com/videos/vl9eiz/<API key>" ], "guest": "David Folkenflik" }, { "date": "2013-11-05", "videos": [ "http://thecolbertreport.cc.com/videos/owoy1b/<API key>", "http://thecolbertreport.cc.com/videos/7bd2cq/<API key>", "http://thecolbertreport.cc.com/videos/s5iv9f/<API key>", "http://thecolbertreport.cc.com/videos/6abc8c/<API key>", "http://thecolbertreport.cc.com/videos/9v56tr/julius-erving", "http://thecolbertreport.cc.com/videos/du2t8n/<API key>" ], "guest": "Julius Erving" }, { "date": "2013-11-06", "videos": [ "http://thecolbertreport.cc.com/videos/rpo0ya/ms--marvel-s-reboot", "http://thecolbertreport.cc.com/videos/el55uc/<API key>", "http://thecolbertreport.cc.com/videos/hdhamk/<API key>", "http://thecolbertreport.cc.com/videos/7nyym9/brian-lehrer", "http://thecolbertreport.cc.com/videos/snu1i2/<API key>-" ], "guest": "Brian Lehrer" }, { "date": "2013-11-07", "videos": [ "http://thecolbertreport.cc.com/videos/d61yyh/<API key>", "http://thecolbertreport.cc.com/videos/4cx9x8/<API key>allegations", "http://thecolbertreport.cc.com/videos/7cyanz/<API key>", "http://thecolbertreport.cc.com/videos/80epmw/daniel-lieberman", "http://thecolbertreport.cc.com/videos/tx4mq5/<API key>" ], "guest": "Daniel Lieberman" }, { "date": "2013-11-11", "videos": [ "http://thecolbertreport.cc.com/videos/84rhzu/-<API key>", "http://thecolbertreport.cc.com/videos/uwudem/-<API key>", "http://thecolbertreport.cc.com/videos/bd4gnc/<API key>", "http://thecolbertreport.cc.com/videos/2lqizl/peter-baker", "http://thecolbertreport.cc.com/videos/kglpif/<API key>" ], "guest": "Peter Baker" }, { "date": "2013-11-12", "videos": [ "http: "http://thecolbertreport.cc.com/videos/pqrcpb/<API key>", "http://thecolbertreport.cc.com/videos/s7e3qv/<API key>", "http://thecolbertreport.cc.com/videos/0qvety/<API key>", "http://thecolbertreport.cc.com/videos/9s2qhn/<API key>", "http://thecolbertreport.cc.com/videos/91wur1/david-christian", "http://thecolbertreport.cc.com/videos/61ms6y/<API key>-" ], "guest": "David Christian" }, { "date": "2013-11-13", "videos": [ "http://thecolbertreport.cc.com/videos/1p3who/<API key>", "http://thecolbertreport.cc.com/videos/h4v9zq/<API key>", "http://thecolbertreport.cc.com/videos/w8qzgv/<API key>", "http://thecolbertreport.cc.com/videos/sn95d6/<API key>" ], "guest": "Blind Boys of Alabama" }, { "date": "2013-11-14", "videos": [ "http://thecolbertreport.cc.com/videos/2o6sb0/<API key>", "http://thecolbertreport.cc.com/videos/8olyhc/rob-ford-s-defiance", "http://thecolbertreport.cc.com/videos/wrbvsm/alexis-ohanian", "http://thecolbertreport.cc.com/videos/nmbdiq/<API key>" ], "guest": "Alexis Ohanian" }, { "date": "2013-11-18", "videos": [ "http: "http://thecolbertreport.cc.com/videos/m7v6ee/<API key>", "http://thecolbertreport.cc.com/videos/suwtn9/<API key>", "http://thecolbertreport.cc.com/videos/gnc6o8/<API key>", "http://thecolbertreport.cc.com/videos/12pe6a/<API key>", "http://thecolbertreport.cc.com/videos/cdeggb/steve-mcqueen", "http://thecolbertreport.cc.com/videos/5ow82m/<API key>" ], "guest": "Steve McQueen" }, { "date": "2013-11-19", "videos": [ "http://thecolbertreport.cc.com/videos/kzu5qm/<API key>", "http://thecolbertreport.cc.com/videos/fkmwr4/<API key>", "http://thecolbertreport.cc.com/videos/nj0wp7/<API key>", "http://thecolbertreport.cc.com/videos/ppx1hm/<API key>", "http://thecolbertreport.cc.com/videos/g1usdl/rick-santorum", "http://thecolbertreport.cc.com/videos/jnk6o6/<API key>" ], "guest": "Rick Santorum" }, { "date": "2013-11-20", "videos": [ "http: "http://thecolbertreport.cc.com/videos/xxqfor/<API key>", "http://thecolbertreport.cc.com/videos/s2213y/<API key>", "http://thecolbertreport.cc.com/videos/aiu6v1/<API key>", "http://thecolbertreport.cc.com/videos/bjap7z/m-i-a-" ], "guest": "M.I.A." }, { "date": "2013-11-21", "videos": [ "http: "http://thecolbertreport.cc.com/videos/16t3na/<API key>", "http://thecolbertreport.cc.com/videos/ynxkze/<API key>", "http://thecolbertreport.cc.com/videos/pqqitw/<API key>-", "http://thecolbertreport.cc.com/videos/5idfv3/j-j--abrams", "http: ], "guest": "J.J. Abrams" }, { "date": "2013-12-02", "videos": [ "http: "http://thecolbertreport.cc.com/videos/eax2go/<API key>", "http://thecolbertreport.cc.com/videos/32fik6/<API key>", "http://thecolbertreport.cc.com/videos/kzzho9/<API key>", "http://thecolbertreport.cc.com/videos/tllp9w/daniel-goleman", "http://thecolbertreport.cc.com/videos/4pjxs1/<API key>" ], "guest": "Daniel Goleman" }, { "date": "2013-12-03", "videos": [ "http: "http://thecolbertreport.cc.com/videos/6yqi5n/<API key>", "http://thecolbertreport.cc.com/videos/ojh0t8/<API key>", "http://thecolbertreport.cc.com/videos/fepuu2/<API key>", "http://thecolbertreport.cc.com/videos/g14s8s/ed-stone", "http://thecolbertreport.cc.com/videos/jkirej/<API key>" ], "guest": "Ed Stone" }, { "date": "2013-12-04", "videos": [ "http://thecolbertreport.cc.com/videos/xzvt8w/do-nothing-congress", "http://thecolbertreport.cc.com/videos/vjdf7c/<API key>", "http://thecolbertreport.cc.com/videos/y2lfd6/<API key>", "http://thecolbertreport.cc.com/videos/hzc351/bryan-stevenson", "http://thecolbertreport.cc.com/videos/eanv4b/sign-off" ], "guest": "Bryan Stevenson" }, { "date": "2013-12-05", "videos": [ "http: "http://thecolbertreport.cc.com/videos/r2orue/<API key>", "http://thecolbertreport.cc.com/videos/t96lm4/<API key>", "http://thecolbertreport.cc.com/videos/q1iez3/<API key>", "http://thecolbertreport.cc.com/videos/zy6hlf/<API key>", "http://thecolbertreport.cc.com/videos/blunby/alan-mulally", "http://thecolbertreport.cc.com/videos/xyy6ql/sign-off" ], "guest": "Allan Mulally" }, { "date": "2013-12-09", "videos": [ "http://thecolbertreport.cc.com/videos/8h6usc/<API key>", "http://thecolbertreport.cc.com/videos/w58dfp/<API key>", "http://thecolbertreport.cc.com/videos/5y4hrs/<API key>", "http://thecolbertreport.cc.com/videos/76e84o/<API key>", "http://thecolbertreport.cc.com/videos/lv0hd2/david-keith", "http://thecolbertreport.cc.com/videos/6p2s11/sign-off" ], "guest": "David Keith" }, { "date": "2013-12-10", "videos": [ "http: "http://thecolbertreport.cc.com/videos/7yd7o2/<API key>", "http://thecolbertreport.cc.com/videos/z9zxq1/<API key>", "http://thecolbertreport.cc.com/videos/kaj6y2/<API key>", "http://thecolbertreport.cc.com/videos/pt29fq/alex-blumberg", "http://thecolbertreport.cc.com/videos/99z3wt/<API key>" ], "guest": "Alex Blumberg" }, { "date": "2013-12-11", "videos": [ "http://thecolbertreport.cc.com/videos/zye2nw/<API key>", "http://thecolbertreport.cc.com/videos/2vwk2a/<API key>", "http://thecolbertreport.cc.com/videos/ayrep6/<API key>", "http://thecolbertreport.cc.com/videos/jna07l/<API key>-", "http://thecolbertreport.cc.com/videos/ld1i97/elizabeth-gilbert", "http://thecolbertreport.cc.com/videos/nxssxf/<API key>" ], "guest": "Elizabeth Gilbert" }, { "date": "2013-12-12", "videos": [ "http://thecolbertreport.cc.com/videos/juqc9w/<API key>", "http://thecolbertreport.cc.com/videos/ygi28a/<API key>", "http://thecolbertreport.cc.com/videos/btidng/<API key>", "http://thecolbertreport.cc.com/videos/gv6c5c/george-packer", "http://thecolbertreport.cc.com/videos/o3drqn/<API key>" ], "guest": "George Packer" }, { "date": "2013-12-16", "videos": [ "http: "http://thecolbertreport.cc.com/videos/t0srep/<API key>", "http://thecolbertreport.cc.com/videos/4q1rc7/<API key>", "http://thecolbertreport.cc.com/videos/qepegb/<API key>", "http://thecolbertreport.cc.com/videos/1wx2c5/jonah-peretti" ], "guest": "Jonah Peretti, Gregg Allman, the National" }, { "date": "2013-12-17", "videos": [ "http: "http://thecolbertreport.cc.com/videos/hdex9j/<API key>", "http://thecolbertreport.cc.com/videos/v7f6xw/<API key>", "http://thecolbertreport.cc.com/videos/18yj36/-<API key>-", "http://thecolbertreport.cc.com/videos/0hlwua/garry-trudeau" ], "guest": "Garry Trudeau, Cyndi Lauper, Alan Cumming" }, { "date": "2013-12-18", "videos": [ "http: "http://thecolbertreport.cc.com/videos/w20rkq/<API key>", "http://thecolbertreport.cc.com/videos/hqucv3/<API key>", "http://thecolbertreport.cc.com/videos/7ick9v/<API key>", "http://thecolbertreport.cc.com/videos/vv4aaz/keanu-reeves", "http://thecolbertreport.cc.com/videos/52csyt/<API key>" ], "guest": "Keanu Reeves, Aaron Neville" }, { "date": "2013-12-19", "videos": [ "http://thecolbertreport.cc.com/videos/rdc6qs/<API key>", "http://thecolbertreport.cc.com/videos/p9rfx1/<API key>-", "http://thecolbertreport.cc.com/videos/na7pll/<API key>", "http://thecolbertreport.cc.com/videos/3q7h60/ben-stiller" ], "guest": "Ben Stiller, the Blind Boys of Alabama" } ], "2014": [ { "date": "2014-01-06", "videos": [ "http: "http://thecolbertreport.cc.com/videos/vobbe1/polar-vortex", "http://thecolbertreport.cc.com/videos/3goywo/<API key>", "http://thecolbertreport.cc.com/videos/hyg1jb/<API key>", "http://thecolbertreport.cc.com/videos/5qceid/ken-roth", "http://thecolbertreport.cc.com/videos/f9w0xq/<API key>" ], "guest": "Kenneth Roth" }, { "date": "2014-01-07", "videos": [ "http://thecolbertreport.cc.com/videos/4uqurx/<API key>", "http://thecolbertreport.cc.com/videos/s9iccj/<API key>", "http://thecolbertreport.cc.com/videos/v3sijl/<API key>", "http://thecolbertreport.cc.com/videos/b9gbou/<API key>", "http://thecolbertreport.cc.com/videos/bz0qvj/john-seigenthaler", "http://thecolbertreport.cc.com/videos/a4c8i8/<API key>-" ], "guest": "John Seigenthaler" }, { "date": "2014-01-08", "videos": [ "http: "http://thecolbertreport.cc.com/videos/2zkpvh/<API key>", "http://thecolbertreport.cc.com/videos/bkjqeq/<API key>", "http://thecolbertreport.cc.com/videos/ct0fks/<API key>", "http://thecolbertreport.cc.com/videos/i292oo/ishmael-beah", "http://thecolbertreport.cc.com/videos/srasr6/<API key>" ], "guest": "Ishmael Beah" }, { "date": "2014-01-09", "videos": [ "http://thecolbertreport.cc.com/videos/3nlrc7/<API key>", "http://thecolbertreport.cc.com/videos/ez26gi/<API key>", "http://thecolbertreport.cc.com/videos/gvlcow/<API key>-", "http://thecolbertreport.cc.com/videos/cjww9c/jeff-skoll", "http://thecolbertreport.cc.com/videos/zmnwvz/<API key>" ], "guest": "Jeff Skoll" }, { "date": "2014-01-13", "videos": [ "http: "http://thecolbertreport.cc.com/videos/nmeif6/<API key>", "http://thecolbertreport.cc.com/videos/l6fcm2/<API key>", "http://thecolbertreport.cc.com/videos/ekq6m6/<API key>", "http://thecolbertreport.cc.com/videos/zf2igg/<API key>" ], "guest": "David Fanning" }, { "date": "2014-01-14", "videos": [ "http://thecolbertreport.cc.com/videos/e0ksix/<API key>", "http://thecolbertreport.cc.com/videos/8aoa48/<API key>", "http://thecolbertreport.cc.com/videos/4lplhb/<API key>", "http://thecolbertreport.cc.com/videos/1urzjl/deborah-solomon", "http://thecolbertreport.cc.com/videos/b5df4x/<API key>" ], "guest": "Deborah Solomon" }, { "date": "2014-01-15", "videos": [ "http://thecolbertreport.cc.com/videos/daejaf/ad-for-america", "http://thecolbertreport.cc.com/videos/bxdt1w/<API key>", "http://thecolbertreport.cc.com/videos/rbh95h/<API key>", "http://thecolbertreport.cc.com/videos/tkqmyv/gabriel-sherman", "http://thecolbertreport.cc.com/videos/efgh7j/<API key>" ], "guest": "Gabriel Sherman" }, { "date": "2014-01-16", "videos": [ "http://thecolbertreport.cc.com/videos/pqopug/<API key>", "http://thecolbertreport.cc.com/videos/6omuyc/<API key>", "http://thecolbertreport.cc.com/videos/d589xx/<API key>", "http://thecolbertreport.cc.com/videos/4g3c4f/naquasia-legrand", "http://thecolbertreport.cc.com/videos/h6vhef/<API key>" ], "guest": "Naquasia LeGrand" }, { "date": "2014-01-20", "videos": [ "http: "http://thecolbertreport.cc.com/videos/6qy0qw/<API key>", "http://thecolbertreport.cc.com/videos/bg48ms/<API key>", "http://thecolbertreport.cc.com/videos/1ah0qw/<API key>", "http://thecolbertreport.cc.com/videos/szyyzo/scott-stossel", "http://thecolbertreport.cc.com/videos/3kds6e/<API key>" ], "guest": "Scott Stossel" }, { "date": "2014-01-21", "videos": [ "http://thecolbertreport.cc.com/videos/6g3tkl/<API key>-", "http://thecolbertreport.cc.com/videos/27el91/<API key>", "http://thecolbertreport.cc.com/videos/c8gx08/<API key>-", "http://thecolbertreport.cc.com/videos/2tt8np/<API key>", "http://thecolbertreport.cc.com/videos/8vzg0l/<API key>" ], "guest": "Michael Chabon, Mariel Hemingway" }, { "date": "2014-01-22", "videos": [ "http: "http://thecolbertreport.cc.com/videos/id8eug/<API key>", "http://thecolbertreport.cc.com/videos/db8f37/<API key>", "http://thecolbertreport.cc.com/videos/wjov9z/tikker-death-watch", "http://thecolbertreport.cc.com/videos/y85ykp/charles-duhigg", "http: ], "guest": "Charles Duhigg" }, { "date": "2014-01-23", "videos": [ "http://thecolbertreport.cc.com/videos/ay6diu/<API key>", "http://thecolbertreport.cc.com/videos/nnj3ic/<API key>", "http://thecolbertreport.cc.com/videos/qatuhg/<API key>", "http://thecolbertreport.cc.com/videos/0i8pwp/<API key>", "http://thecolbertreport.cc.com/videos/fykny6/patricia-churchland", "http://thecolbertreport.cc.com/videos/5axbrg/<API key>" ], "guest": "Patricia Churchland" }, { "date": "2014-01-27", "videos": [ "http://thecolbertreport.cc.com/videos/qs3r6w/<API key>", "http://thecolbertreport.cc.com/videos/51gnff/<API key>", "http://thecolbertreport.cc.com/videos/mk6zsq/nate-silver", "http://thecolbertreport.cc.com/videos/c58bm1/<API key>" ], "guest": "Nate Silver" }, { "date": "2014-01-28", "videos": [ "http://thecolbertreport.cc.com/videos/gzw6pe/<API key>", "http://thecolbertreport.cc.com/videos/g3ng7g/<API key>", "http://thecolbertreport.cc.com/videos/y1y1q6/<API key>", "http://thecolbertreport.cc.com/videos/wx55bg/justin-tuck", "http://thecolbertreport.cc.com/videos/q6n89x/<API key>" ], "guest": "Justin Tuck" }, { "date": "2014-01-29", "videos": [ "http://thecolbertreport.cc.com/videos/79qyj3/<API key>", "http://thecolbertreport.cc.com/videos/pzw1hz/<API key>", "http://thecolbertreport.cc.com/videos/0czypw/<API key>", "http://thecolbertreport.cc.com/videos/6h1tef/cris-carter" ], "guest": "Cris Carter" }, { "date": "2014-01-30", "videos": [ "http://thecolbertreport.cc.com/videos/vp5oqx/<API key>", "http://thecolbertreport.cc.com/videos/8z0t1l/<API key>", "http://thecolbertreport.cc.com/videos/b88aif/<API key>", "http://thecolbertreport.cc.com/videos/7aqq1s/drew-brees", "http://thecolbertreport.cc.com/videos/yucj0t/<API key>" ], "guest": "Drew Brees" }, { "date": "2014-02-03", "videos": [ "http://thecolbertreport.cc.com/videos/kmzt7v/<API key>", "http://thecolbertreport.cc.com/videos/65qhlv/<API key>", "http://thecolbertreport.cc.com/videos/nezg8b/<API key>", "http://thecolbertreport.cc.com/videos/nocpjv/jennifer-senior", "http://thecolbertreport.cc.com/videos/msb2vl/<API key>" ], "guest": "Jennifer Senior" }, { "date": "2014-02-04", "videos": [ "http://thecolbertreport.cc.com/videos/m0k7nu/<API key>scandal-connection", "http://thecolbertreport.cc.com/videos/81q2jm/<API key>", "http://thecolbertreport.cc.com/videos/49r39y/pussy-riot-pt--1", "http://thecolbertreport.cc.com/videos/08f0xw/pussy-riot-pt--2", "http://thecolbertreport.cc.com/videos/ubzb8b/<API key>-" ], "guest": "Pussy Riot" }, { "date": "2014-02-05", "videos": [ "http: "http://thecolbertreport.cc.com/videos/w3uorg/<API key>", "http://thecolbertreport.cc.com/videos/djw49l/<API key>", "http://thecolbertreport.cc.com/videos/cjdkxj/lake-street-dive", "http://thecolbertreport.cc.com/videos/6itibl/<API key>" ], "guest": "Lake Street Dive" }, { "date": "2014-02-06", "videos": [ "http://thecolbertreport.cc.com/videos/tzqa3o/<API key>", "http://thecolbertreport.cc.com/videos/e3q55j/<API key>", "http://thecolbertreport.cc.com/videos/yzcp46/<API key>", "http://thecolbertreport.cc.com/videos/ze9n7p/paul-krugman", "http://thecolbertreport.cc.com/videos/1ur5x9/<API key>-" ], "guest": "Paul Krugman" }, { "date": "2014-02-10", "videos": [ "http://thecolbertreport.cc.com/videos/alv9kr/<API key>", "http://thecolbertreport.cc.com/videos/155uge/<API key>-", "http://thecolbertreport.cc.com/videos/s385jl/taliban-dognappers", "http://thecolbertreport.cc.com/videos/hmu6hf/patrick-kennedy", "http://thecolbertreport.cc.com/videos/bl6jzi/<API key>" ], "guest": "Patrick Kennedy" }, { "date": "2014-02-11", "videos": [ "http: "http://thecolbertreport.cc.com/videos/yesavg/blade-in-the-usa", "http://thecolbertreport.cc.com/videos/ow2caa/<API key>", "http://thecolbertreport.cc.com/videos/cxui4b/<API key>", "http://thecolbertreport.cc.com/videos/8yt2ar/charlie-crist", "http://thecolbertreport.cc.com/videos/v6h2iw/<API key>" ], "guest": "Charlie Crist" }, { "date": "2014-02-12", "videos": [ "http://thecolbertreport.cc.com/videos/mke8f4/<API key>", "http://thecolbertreport.cc.com/videos/ngjlqq/<API key>", "http://thecolbertreport.cc.com/videos/f7yt2f/<API key>", "http://thecolbertreport.cc.com/videos/zqevr4/godfrey-reggio", "http://thecolbertreport.cc.com/videos/wd8rlk/<API key>" ], "guest": "Godfrey Reggio" }, { "date": "2014-02-18", "videos": [ "http: "http://thecolbertreport.cc.com/videos/esabem/<API key>", "http://thecolbertreport.cc.com/videos/icw75d/<API key>", "http://thecolbertreport.cc.com/videos/px4k4w/<API key>", "http://thecolbertreport.cc.com/videos/fpn2d7/brian-greene", "http://thecolbertreport.cc.com/videos/7cxypm/<API key>" ], "guest": "Brian Greene" }, { "date": "2014-02-19", "videos": [ "http: "http://thecolbertreport.cc.com/videos/z8viri/<API key>", "http://thecolbertreport.cc.com/videos/k0fmq0/<API key>", "http://thecolbertreport.cc.com/videos/pdgpm2/<API key>", "http://thecolbertreport.cc.com/videos/80x11s/alexander-payne", "http://thecolbertreport.cc.com/videos/r3yso9/<API key>" ], "guest": "Alexander Payne" }, { "date": "2014-02-20", "videos": [ "http://thecolbertreport.cc.com/videos/gtx5i8/<API key>", "http://thecolbertreport.cc.com/videos/7alqr9/<API key>", "http://thecolbertreport.cc.com/videos/i1pl20/stanley-mcchrystal", "http://thecolbertreport.cc.com/videos/3j3ziw/<API key>" ], "guest": "Gen. Stanley McChrystal" }, { "date": "2014-02-24", "videos": [ "http: "http://thecolbertreport.cc.com/videos/dxcy1y/<API key>", "http://thecolbertreport.cc.com/videos/y1wxc3/crisis-in-ukraine", "http://thecolbertreport.cc.com/videos/8067fc/<API key>", "http://thecolbertreport.cc.com/videos/2y58gs/darlene-love", "http://thecolbertreport.cc.com/videos/illjzj/<API key>" ], "guest": "Darlene Love" }, { "date": "2014-02-25", "videos": [ "http://thecolbertreport.cc.com/videos/blcgek/<API key>", "http://thecolbertreport.cc.com/videos/uov6m4/<API key>", "http://thecolbertreport.cc.com/videos/y2j7vo/<API key>", "http://thecolbertreport.cc.com/videos/yw875l/<API key>", "http://thecolbertreport.cc.com/videos/w2zhlc/st--vincent" ], "guest": "St. Vincent" }, { "date": "2014-02-26", "videos": [ "http://thecolbertreport.cc.com/videos/7vvoyf/<API key>", "http://thecolbertreport.cc.com/videos/gs9vcz/<API key>-", "http://thecolbertreport.cc.com/videos/y307f3/<API key>", "http://thecolbertreport.cc.com/videos/tb28zm/<API key>", "http://thecolbertreport.cc.com/videos/3w27qv/<API key>" ], "guest": "Meryl Davis &amp; Charlie White" }, { "date": "2014-02-27", "videos": [ "http: "http://thecolbertreport.cc.com/videos/28qta1/<API key>", "http://thecolbertreport.cc.com/videos/p8fj8f/<API key>", "http://thecolbertreport.cc.com/videos/300ry4/<API key>", "http://thecolbertreport.cc.com/videos/8ijgcp/jeff-goldblum", "http://thecolbertreport.cc.com/videos/axkpkj/<API key>" ], "guest": "Jeff Goldblum" }, { "date": "2014-03-03", "videos": [ "http://thecolbertreport.cc.com/videos/hbrhpe/<API key>", "http://thecolbertreport.cc.com/videos/q8u939/<API key>", "http://thecolbertreport.cc.com/videos/8jpus1/<API key>", "http://thecolbertreport.cc.com/videos/ysbw7d/<API key>", "http://thecolbertreport.cc.com/videos/wwqhgn/caitlin-flanagan", "http://thecolbertreport.cc.com/videos/z2x5tb/<API key>-" ], "guest": "Caitlin Flanagan" }, { "date": "2014-03-04", "videos": [ "http: "http://thecolbertreport.cc.com/videos/avavv1/<API key>", "http://thecolbertreport.cc.com/videos/r79jgq/<API key>", "http://thecolbertreport.cc.com/videos/dpc49v/<API key>", "http://thecolbertreport.cc.com/videos/bjwnn1/jaron-lanier", "http://thecolbertreport.cc.com/videos/38n33x/<API key>" ], "guest": "Jaron Lanier" }, { "date": "2014-03-05", "videos": [ "http: "http://thecolbertreport.cc.com/videos/chbquj/<API key>", "http://thecolbertreport.cc.com/videos/ak3veo/<API key>", "http://thecolbertreport.cc.com/videos/ppqf1u/<API key>", "http://thecolbertreport.cc.com/videos/0exuju/beau-willimon", "http://thecolbertreport.cc.com/videos/gexopu/<API key>" ], "guest": "Beau Willimon" }, { "date": "2014-03-06", "videos": [ "http: "http://thecolbertreport.cc.com/videos/te4fyy/<API key>", "http://thecolbertreport.cc.com/videos/awc6am/<API key>", "http://thecolbertreport.cc.com/videos/3si7rs/<API key>", "http://thecolbertreport.cc.com/videos/f3jjle/theaster-gates", "http://thecolbertreport.cc.com/videos/g6qd4x/<API key>" ], "guest": "Theaster Gates" }, { "date": "2014-03-10", "videos": [ "http: "http://thecolbertreport.cc.com/videos/a6f94j/<API key>", "http://thecolbertreport.cc.com/videos/bn0fy6/<API key>-", "http://thecolbertreport.cc.com/videos/gh6urb/<API key>", "http://thecolbertreport.cc.com/videos/42g6iq/<API key>", "http://thecolbertreport.cc.com/videos/1bou2c/<API key>" ], "guest": "Neil DeGrasse Tyson" }, { "date": "2014-03-11", "videos": [ "http: "http://thecolbertreport.cc.com/videos/usi00y/<API key>", "http://thecolbertreport.cc.com/videos/pis5qm/<API key>", "http://thecolbertreport.cc.com/videos/pvjhwj/<API key>", "http://thecolbertreport.cc.com/videos/qacc88/<API key>", "http://thecolbertreport.cc.com/videos/nba46a/ronan-farrow", "http://thecolbertreport.cc.com/videos/hncfzx/<API key>" ], "guest": "Ronan Farrow" }, { "date": "2014-03-12", "videos": [ "http://thecolbertreport.cc.com/videos/ut2zdq/<API key>-", "http://thecolbertreport.cc.com/videos/h6q3h4/<API key>", "http://thecolbertreport.cc.com/videos/i7q6ld/<API key>", "http://thecolbertreport.cc.com/videos/wp6hv1/<API key>", "http://thecolbertreport.cc.com/videos/2qsrw5/maria-shriver", "http://thecolbertreport.cc.com/videos/i6cs26/<API key>" ], "guest": "Maria Shriver" }, { "date": "2014-03-13", "videos": [ "http://thecolbertreport.cc.com/videos/5js43m/<API key>", "http://thecolbertreport.cc.com/videos/a1ejoq/<API key>", "http://thecolbertreport.cc.com/videos/xkuwmd/<API key>", "http://thecolbertreport.cc.com/videos/k9goh1/simon-schama", "http://thecolbertreport.cc.com/videos/tl1mce/<API key>" ], "guest": "Simon Schama" }, { "date": "2014-03-24", "videos": [ "http://thecolbertreport.cc.com/videos/hjb6kt/<API key>", "http://thecolbertreport.cc.com/videos/imczen/<API key>", "http://thecolbertreport.cc.com/videos/8cy48v/<API key>", "http://thecolbertreport.cc.com/videos/g4poyv/bryan-cranston", "http://thecolbertreport.cc.com/videos/a2iw3f/<API key>" ], "guest": "Bryan Cranston" }, { "date": "2014-03-25", "videos": [ "http://thecolbertreport.cc.com/videos/9n1euv/<API key>", "http://thecolbertreport.cc.com/videos/0k0w7y/<API key>", "http://thecolbertreport.cc.com/videos/xepzs5/jimmy-carter-pt--1", "http://thecolbertreport.cc.com/videos/t3jp2g/jimmy-carter-pt--2", "http://thecolbertreport.cc.com/videos/uyisf5/<API key>" ], "guest": "Jimmy Carter" }, { "date": "2014-03-26", "videos": [ "http://thecolbertreport.cc.com/videos/1zhwtt/drunk-<API key>, "http://thecolbertreport.cc.com/videos/b6cwb3/<API key><API key>", "http://thecolbertreport.cc.com/videos/q8pyub/<API key>", "http://thecolbertreport.cc.com/videos/mcpvbd/errol-morris", "http://thecolbertreport.cc.com/videos/ycwnol/<API key>" ], "guest": "Errol Morris" }, { "date": "2014-03-27", "videos": [ "http: "http://thecolbertreport.cc.com/videos/uqmqua/<API key>", "http://thecolbertreport.cc.com/videos/cabdj6/<API key>", "http://thecolbertreport.cc.com/videos/srj2lz/<API key>", "http://thecolbertreport.cc.com/videos/77oyfl/darren-aronofsky", "http://thecolbertreport.cc.com/videos/tyuheg/<API key>" ], "guest": "Darren Aronofsky" }, { "date": "2014-03-31", "videos": [ "http: "http://thecolbertreport.cc.com/videos/3yhe9h/emoji-ethnicity", "http://thecolbertreport.cc.com/videos/1zkr18/<API key>", "http://thecolbertreport.cc.com/videos/35dcpo/<API key>", "http://thecolbertreport.cc.com/videos/vj7n1j/biz-stone-pt--1", "http://thecolbertreport.cc.com/videos/yc8huq/biz-stone-pt--2", "http://thecolbertreport.cc.com/videos/adyesn/<API key>", "http://thecolbertreport.cc.com/videos/p65waq/<API key>" ], "guest": "Biz Stone" }, { "date": "2014-04-01", "videos": [ "http://thecolbertreport.cc.com/videos/3ljnpx/<API key>", "http://thecolbertreport.cc.com/videos/cviqog/<API key>", "http://thecolbertreport.cc.com/videos/64v4nu/<API key>", "http://thecolbertreport.cc.com/videos/784uo8/john-malkovich", "http://thecolbertreport.cc.com/videos/rc1p9n/<API key>", "http://thecolbertreport.cc.com/videos/c9xd2d/<API key>" ], "guest": "John Malkovich" }, { "date": "2014-04-02", "videos": [ "http://thecolbertreport.cc.com/videos/zxr7i2/<API key>", "http://thecolbertreport.cc.com/videos/o639ag/<API key>", "http://thecolbertreport.cc.com/videos/1ypxfz/<API key>", "http://thecolbertreport.cc.com/videos/pnhs3f/dan-harris", "http://thecolbertreport.cc.com/videos/wrxyua/<API key>" ], "guest": "Dan Harris" }, { "date": "2014-04-03", "videos": [ "http://thecolbertreport.cc.com/videos/kas793/<API key>", "http://thecolbertreport.cc.com/videos/n79fg2/<API key>", "http://thecolbertreport.cc.com/videos/n6lhb9/<API key>", "http://thecolbertreport.cc.com/videos/4vb00q/<API key>", "http://thecolbertreport.cc.com/videos/fgsnrb/mark-mazzetti", "http://thecolbertreport.cc.com/videos/255jt7/<API key>" ], "guest": "Mark Mazzetti" }, { "date": "2014-04-07", "videos": [ "http://thecolbertreport.cc.com/videos/lz94c9/<API key>", "http://thecolbertreport.cc.com/videos/jjifoz/<API key>", "http://thecolbertreport.cc.com/videos/jvziju/<API key>", "http://thecolbertreport.cc.com/videos/xj9d66/edward-frenkel", "http://thecolbertreport.cc.com/videos/2dvxf1/<API key>" ], "guest": "Edward Frenkel" }, { "date": "2014-04-08", "videos": [ "http: "http://thecolbertreport.cc.com/videos/wpor0d/<API key>", "http://thecolbertreport.cc.com/videos/ncl2k5/<API key>", "http://thecolbertreport.cc.com/videos/nemi1a/<API key>", "http://thecolbertreport.cc.com/videos/uyjkgv/jane-goodall", "http: ], "guest": "Jane Goodall" }, { "date": "2014-04-09", "videos": [ "http: "http://thecolbertreport.cc.com/videos/o3rniz/<API key>", "http://thecolbertreport.cc.com/videos/8a5aao/<API key>", "http://thecolbertreport.cc.com/videos/3pg0sn/<API key>", "http://thecolbertreport.cc.com/videos/l9zuu1/<API key>", "http://thecolbertreport.cc.com/videos/wr794b/sheryl-sandberg", "http://thecolbertreport.cc.com/videos/mroadr/<API key>" ], "guest": "Sheryl Sandberg" }, { "date": "2014-04-10", "videos": [ "http://thecolbertreport.cc.com/videos/k436zi/<API key>", "http://thecolbertreport.cc.com/videos/kv1taq/<API key>", "http://thecolbertreport.cc.com/videos/3a9611/<API key>-", "http://thecolbertreport.cc.com/videos/yi8cxa/sting" ], "guest": "Sting" }, { "date": "2014-04-21", "videos": [ "http: "http://thecolbertreport.cc.com/videos/0w61r2/<API key>", "http://thecolbertreport.cc.com/videos/055g6r/<API key>", "http://thecolbertreport.cc.com/videos/7d5y74/<API key>", "http://thecolbertreport.cc.com/videos/hls49q/<API key>", "http://thecolbertreport.cc.com/videos/p5o99a/ken-burns", "http://thecolbertreport.cc.com/videos/v2nud8/<API key>" ], "guest": "Ken Burns" }, { "date": "2014-04-22", "videos": [ "http: "http://thecolbertreport.cc.com/videos/1j1m90/<API key>", "http://thecolbertreport.cc.com/videos/0bsy88/<API key>", "http://thecolbertreport.cc.com/videos/kg42wy/<API key>", "http://thecolbertreport.cc.com/videos/yeczpa/george-will", "http://thecolbertreport.cc.com/videos/0b7ymc/<API key>" ], "guest": "George Will" }, { "date": "2014-04-23", "videos": [ "http: "http://thecolbertreport.cc.com/videos/8l716g/<API key>", "http://thecolbertreport.cc.com/videos/tn3469/<API key>", "http://thecolbertreport.cc.com/videos/lz21l6/<API key>", "http://thecolbertreport.cc.com/videos/g5cgj8/john-calipari", "http://thecolbertreport.cc.com/videos/6glbo4/<API key>" ], "guest": "John Calipari" }, { "date": "2014-04-24", "videos": [ "http://thecolbertreport.cc.com/videos/2c27q9/<API key>", "http://thecolbertreport.cc.com/videos/ehanpl/<API key>", "http://thecolbertreport.cc.com/videos/5mf7zk/<API key>", "http://thecolbertreport.cc.com/videos/ufdzm1/george-saunders", "http://thecolbertreport.cc.com/videos/vtuwb7/<API key>" ], "guest": "George Saunders" }, { "date": "2014-04-28", "videos": [ "http://thecolbertreport.cc.com/videos/6fq0xa/popechella", "http://thecolbertreport.cc.com/videos/yhq2cw/<API key>", "http://thecolbertreport.cc.com/videos/svsc0q/<API key>", "http://thecolbertreport.cc.com/videos/5my1ja/<API key>", "http://thecolbertreport.cc.com/videos/i1lidr/michael-mcfaul", "http://thecolbertreport.cc.com/videos/gu3d7a/<API key>-" ], "guest": "Michael McFaul" }, { "date": "2014-04-29", "videos": [ "http: "http://thecolbertreport.cc.com/videos/jfz395/<API key>", "http://thecolbertreport.cc.com/videos/td7npw/<API key>", "http://thecolbertreport.cc.com/videos/8pyjlg/<API key>", "http://thecolbertreport.cc.com/videos/eyae6k/robert-rodriguez", "http://thecolbertreport.cc.com/videos/11mf9t/<API key>" ], "guest": "Robert Rodriguez" }, { "date": "2014-04-30", "videos": [ "http: "http://thecolbertreport.cc.com/videos/6lmqu6/<API key>", "http://thecolbertreport.cc.com/videos/so1kau/<API key>", "http://thecolbertreport.cc.com/videos/2nuw76/<API key>", "http://thecolbertreport.cc.com/videos/tfpj0x/<API key>", "http://thecolbertreport.cc.com/videos/fs6gac/audra-mcdonald" ], "guest": "Audra McDonald" }, { "date": "2014-05-01", "videos": [ "http://thecolbertreport.cc.com/videos/798k8c/-watters--world-", "http://thecolbertreport.cc.com/videos/1e524e/-<API key>", "http://thecolbertreport.cc.com/videos/zbjl95/<API key>", "http://thecolbertreport.cc.com/videos/hji3d3/saul-williams", "http://thecolbertreport.cc.com/videos/ie7s2m/<API key>-" ], "guest": "Saul Williams" }, { "date": "2014-05-05", "videos": [ "http: "http://thecolbertreport.cc.com/videos/oxvwlw/<API key>", "http://thecolbertreport.cc.com/videos/0hu2aq/<API key>", "http://thecolbertreport.cc.com/videos/fo52kn/<API key>", "http://thecolbertreport.cc.com/videos/c0s4ec/edward-o--wilson", "http://thecolbertreport.cc.com/videos/4tegd5/<API key>" ], "guest": "Edward O. Wilson" }, { "date": "2014-05-06", "videos": [ "http: "http://thecolbertreport.cc.com/videos/khlwzq/<API key>", "http://thecolbertreport.cc.com/videos/s4me1v/<API key>", "http://thecolbertreport.cc.com/videos/zekn1k/<API key>", "http://thecolbertreport.cc.com/videos/iihdkg/bette-midler", "http: ], "guest": "Bette Midler" }, { "date": "2014-05-07", "videos": [ "http: "http://thecolbertreport.cc.com/videos/p4t1a2/<API key>", "http://thecolbertreport.cc.com/videos/ywt77c/<API key>", "http://thecolbertreport.cc.com/videos/2u61x6/<API key>", "http://thecolbertreport.cc.com/videos/uz2nio/david-remnick", "http://thecolbertreport.cc.com/videos/q5zpsy/<API key>" ], "guest": "David Remnick" }, { "date": "2014-05-08", "videos": [ "http://thecolbertreport.cc.com/videos/84cvwk/<API key>", "http://thecolbertreport.cc.com/videos/1u7a5d/<API key>", "http://thecolbertreport.cc.com/videos/vkcose/<API key>", "http://thecolbertreport.cc.com/videos/8jno3s/<API key>", "http://thecolbertreport.cc.com/videos/m2n3c9/ellen-page", "http://thecolbertreport.cc.com/videos/u05pdf/<API key>" ], "guest": "Ellen Page" }, { "date": "2014-05-12", "videos": [ "http://thecolbertreport.cc.com/videos/nnz78u/<API key>", "http://thecolbertreport.cc.com/videos/g2hf60/<API key>", "http://thecolbertreport.cc.com/videos/2j80wh/<API key>", "http://thecolbertreport.cc.com/videos/31s76v/<API key>", "http://thecolbertreport.cc.com/videos/xovmc1/<API key>" ], "guest": "Glenn Greenwald" }, { "date": "2014-05-13", "videos": [ "http://thecolbertreport.cc.com/videos/wn13ym/<API key>", "http://thecolbertreport.cc.com/videos/vmje6p/-bringbackourgirls", "http://thecolbertreport.cc.com/videos/2rgt3x/-<API key>", "http://thecolbertreport.cc.com/videos/jrmo9v/<API key>", "http://thecolbertreport.cc.com/videos/s46r2u/the-black-keys", "http://thecolbertreport.cc.com/videos/7bxzr7/<API key>" ], "guest": "The Black Keys" }, { "date": "2014-05-14", "videos": [ "http: "http://thecolbertreport.cc.com/videos/5ob1j2/<API key>", "http: "http://thecolbertreport.cc.com/videos/4a4ahs/<API key>", "http://thecolbertreport.cc.com/videos/hffa7o/keri-russell", "http://thecolbertreport.cc.com/videos/2b3fgm/<API key>" ], "guest": "Keri Russell" }, { "date": "2014-05-15", "videos": [ "http://thecolbertreport.cc.com/videos/bvzi2n/<API key>", "http://thecolbertreport.cc.com/videos/pb1byh/<API key>", "http://thecolbertreport.cc.com/videos/o2wt62/<API key>", "http://thecolbertreport.cc.com/videos/lmgmhg/thomas-friedman", "http: ], "guest": "Thomas Friedman" }, { "date": "2014-05-19", "videos": [ "http: "http://thecolbertreport.cc.com/videos/el90zp/co-ed-lab-rats", "http://thecolbertreport.cc.com/videos/7oum5k/<API key>", "http://thecolbertreport.cc.com/videos/7sujj3/<API key>", "http://thecolbertreport.cc.com/videos/79q9bs/elizabeth-warren", "http://thecolbertreport.cc.com/videos/igbz3e/<API key>" ], "guest": "Elizabeth Warren" }, { "date": "2014-05-20", "videos": [ "http://thecolbertreport.cc.com/videos/oimxrw/china-s-cyber-spies", "http://thecolbertreport.cc.com/videos/zfayee/<API key>", "http://thecolbertreport.cc.com/videos/dbim9j/<API key>", "http://thecolbertreport.cc.com/videos/zopbx2/matthew-weiner", "http://thecolbertreport.cc.com/videos/g4ax73/<API key>" ], "guest": "Matt Weiner" }, { "date": "2014-05-21", "videos": [ "http://thecolbertreport.cc.com/videos/6uijkp/<API key>", "http://thecolbertreport.cc.com/videos/sk5fyk/<API key>", "http://thecolbertreport.cc.com/videos/zn3est/<API key>", "http://thecolbertreport.cc.com/videos/xnk3xl/patrick-stewart", "http://thecolbertreport.cc.com/videos/8pgnos/<API key>" ], "guest": "Patrick Stewart" }, { "date": "2014-05-22", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ouzxbu/va-hospital-outrage", "http://thecolbertreport.cc.com/videos/s6rmi7/<API key>", "http://thecolbertreport.cc.com/videos/74fcac/<API key>", "http://thecolbertreport.cc.com/videos/b40eb0/ray-mabus", "http://thecolbertreport.cc.com/videos/764wvl/<API key>" ], "guest": "Ray Mabus" }, { "date": "2014-06-02", "videos": [ "http://thecolbertreport.cc.com/videos/xtbsgf/<API key>", "http://thecolbertreport.cc.com/videos/i8fthl/<API key>", "http://thecolbertreport.cc.com/videos/oq97o4/<API key>", "http://thecolbertreport.cc.com/videos/e301vf/thomas-piketty", "http: ], "guest": "Thomas Piketty" }, { "date": "2014-06-03", "videos": [ "http: "http://thecolbertreport.cc.com/videos/u6nqsd/open-carry-backlash", "http://thecolbertreport.cc.com/videos/57iigb/<API key>", "http://thecolbertreport.cc.com/videos/ifxi76/<API key>", "http://thecolbertreport.cc.com/videos/vf38fj/<API key>", "http://thecolbertreport.cc.com/videos/ttwu42/morgan-freeman", "http://thecolbertreport.cc.com/videos/qmezm2/<API key>" ], "guest": "Morgan Freeman" }, { "date": "2014-06-04", "videos": [ "http://thecolbertreport.cc.com/videos/yuxdmx/<API key>", "http://thecolbertreport.cc.com/videos/ukf9gv/amazon-vs--hachette", "http://thecolbertreport.cc.com/videos/t1nxwu/<API key>", "http://thecolbertreport.cc.com/videos/w5wvxu/<API key>", "http://thecolbertreport.cc.com/videos/olnbg3/jonah-hill", "http://thecolbertreport.cc.com/videos/k89vi0/<API key>-" ], "guest": "Jonah Hill" }, { "date": "2014-06-05", "videos": [ "http: "http://thecolbertreport.cc.com/videos/hfogr3/bergdghazi", "http://thecolbertreport.cc.com/videos/2408x6/<API key>olympic-problems", "http://thecolbertreport.cc.com/videos/q8dzb2/<API key>-", "http://thecolbertreport.cc.com/videos/muek3m/chrissie-hynde" ], "guest": "Chrissie Hynde" }, { "date": "2014-06-09", "videos": [ "http://thecolbertreport.cc.com/videos/tpxhoo/<API key>", "http://thecolbertreport.cc.com/videos/7uozsl/<API key>", "http://thecolbertreport.cc.com/videos/uyh5xo/<API key>", "http://thecolbertreport.cc.com/videos/allxmi/esther-perel", "http://thecolbertreport.cc.com/videos/x78nyg/<API key>" ], "guest": "Esther Perel" }, { "date": "2014-06-10", "videos": [ "http://thecolbertreport.cc.com/videos/gdbreq/<API key>", "http://thecolbertreport.cc.com/videos/p8wqsa/<API key>", "http://thecolbertreport.cc.com/videos/n30nzb/<API key>", "http://thecolbertreport.cc.com/videos/2lc1uv/john-waters", "http://thecolbertreport.cc.com/videos/dxz774/<API key>" ], "guest": "John Waters" }, { "date": "2014-06-11", "videos": [ "http: "http://thecolbertreport.cc.com/videos/1d3kl4/<API key>", "http://thecolbertreport.cc.com/videos/m87g43/<API key>", "http://thecolbertreport.cc.com/videos/2kgoki/rob-rhinehart", "http://thecolbertreport.cc.com/videos/6v0f1z/<API key>" ], "guest": "Rob Rhinehart" }, { "date": "2014-06-12", "videos": [ "http://thecolbertreport.cc.com/videos/iywdca/<API key>-", "http://thecolbertreport.cc.com/videos/4n51kp/<API key>", "http://thecolbertreport.cc.com/videos/0z44gm/<API key>", "http://thecolbertreport.cc.com/videos/sqbqhw/james-webb", "http: ], "guest": "James Webb" }, { "date": "2014-06-16", "videos": [ "http://thecolbertreport.cc.com/videos/6mpwy3/<API key>", "http://thecolbertreport.cc.com/videos/wlnavl/<API key>", "http://thecolbertreport.cc.com/videos/eozrlj/<API key>", "http://thecolbertreport.cc.com/videos/n3etz1/ta-nehisi-coates", "http://thecolbertreport.cc.com/videos/200z2y/<API key>" ], "guest": "Ta-Nehisi Coates" }, { "date": "2014-06-17", "videos": [ "http://thecolbertreport.cc.com/videos/ddo89r/<API key>", "http://thecolbertreport.cc.com/videos/xoa360/<API key>", "http://thecolbertreport.cc.com/videos/qpaogb/<API key>", "http://thecolbertreport.cc.com/videos/8buw4s/<API key>", "http://thecolbertreport.cc.com/videos/4gkwgg/<API key>" ], "guest": "David Boies &amp; Theodore B. Olson" }, { "date": "2014-06-18", "videos": [ "http: "http://thecolbertreport.cc.com/videos/hgs925/<API key>", "http://thecolbertreport.cc.com/videos/a1yfmv/<API key>", "http://thecolbertreport.cc.com/videos/qj2x93/<API key>", "http://thecolbertreport.cc.com/videos/3ul9zn/<API key>", "http://thecolbertreport.cc.com/videos/och071/<API key>" ], "guest": "Katty Kay &amp; Claire Shipman" }, { "date": "2014-06-19", "videos": [ "http://thecolbertreport.cc.com/videos/gt99v3/the-iraq-pack", "http://thecolbertreport.cc.com/videos/445utq/<API key>", "http://thecolbertreport.cc.com/videos/cbr3yz/-yo--smartphone-app", "http://thecolbertreport.cc.com/videos/3abzv4/jay-carney", "http://thecolbertreport.cc.com/videos/h0b8ou/<API key>" ], "guest": "Jay Carney" }, { "date": "2014-06-23", "videos": [ "http://thecolbertreport.cc.com/videos/7bqhfd/<API key>", "http://thecolbertreport.cc.com/videos/k8orr2/<API key>", "http://thecolbertreport.cc.com/videos/72elnv/<API key>", "http://thecolbertreport.cc.com/videos/07oysy/john-green", "http://thecolbertreport.cc.com/videos/mwnvtk/<API key>" ], "guest": "John Green" }, { "date": "2014-06-24", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ee0zj7/<API key>", "http://thecolbertreport.cc.com/videos/bveu0w/<API key>", "http://thecolbertreport.cc.com/videos/bu43e8/<API key>", "http://thecolbertreport.cc.com/videos/bo739z/edie-falco", "http://thecolbertreport.cc.com/videos/hgf6rh/<API key>" ], "guest": "Edie Falco" }, { "date": "2014-06-25", "videos": [ "http://thecolbertreport.cc.com/videos/rpnj8s/<API key>", "http://thecolbertreport.cc.com/videos/glsyx9/<API key>", "http://thecolbertreport.cc.com/videos/nx3ix1/<API key>", "http://thecolbertreport.cc.com/videos/rki77c/<API key>", "http://thecolbertreport.cc.com/videos/rn2gd8/<API key>", "http://thecolbertreport.cc.com/videos/q6den3/<API key>" ], "guest": "Rep. Eleanor Holmes Norton" }, { "date": "2014-06-26", "videos": [ "http://thecolbertreport.cc.com/videos/suqg0f/<API key>", "http://thecolbertreport.cc.com/videos/autzis/<API key>", "http://thecolbertreport.cc.com/videos/jrdas9/paul-rudd-pt--1", "http://thecolbertreport.cc.com/videos/rb9bo7/paul-rudd-pt--2", "http://thecolbertreport.cc.com/videos/8vp2bp/<API key>" ], "guest": "Paul Rudd" }, { "date": "2014-07-14", "videos": [ "http: "http://thecolbertreport.cc.com/videos/9cspva/world-cup-recap", "http://thecolbertreport.cc.com/videos/mlyvqh/<API key>", "http://thecolbertreport.cc.com/videos/xivy3m/hobby-lobby-case", "http://thecolbertreport.cc.com/videos/9nzwjt/vessyl-digital-cup", "http://thecolbertreport.cc.com/videos/6cvwe6/<API key>", "http://thecolbertreport.cc.com/videos/rpfaco/<API key>" ], "guest": "Jad Abumrad, Robert Krulwich" }, { "date": "2014-07-15", "videos": [ "http://thecolbertreport.cc.com/videos/nnucn6/obama-s-senioritis", "http://thecolbertreport.cc.com/videos/f0uh68/<API key>", "http://thecolbertreport.cc.com/videos/08a2dg/vint-cerf-pt--1", "http://thecolbertreport.cc.com/videos/x9hnxr/vint-cerf-pt--2", "http://thecolbertreport.cc.com/videos/dixoxg/<API key>" ], "guest": "Vint Cerf" }, { "date": "2014-07-16", "videos": [ "http: "http://thecolbertreport.cc.com/videos/53n0nf/<API key>", "http://thecolbertreport.cc.com/videos/cbs1n7/<API key>", "http://thecolbertreport.cc.com/videos/1flr4c/<API key>", "http://thecolbertreport.cc.com/videos/ypm476/bill-de-blasio", "http://thecolbertreport.cc.com/videos/slmbh6/<API key>-" ], "guest": "Mayor Bill de Blasio" }, { "date": "2014-07-17", "videos": [ "http://thecolbertreport.cc.com/videos/ket4ms/<API key>", "http://thecolbertreport.cc.com/videos/z3gi0q/<API key>", "http://thecolbertreport.cc.com/videos/bfvmgh/coal-rolling", "http://thecolbertreport.cc.com/videos/70ezhu/steven-m--wise", "http://thecolbertreport.cc.com/videos/n00bpi/<API key>" ], "guest": "Steven Wise" }, { "date": "2014-07-21", "videos": [ "http: "http://thecolbertreport.cc.com/videos/n71mkf/world-news-wrap-up", "http://thecolbertreport.cc.com/videos/8e5dyu/<API key>", "http://thecolbertreport.cc.com/videos/egw3ua/nancy-pelosi-pt--1", "http://thecolbertreport.cc.com/videos/q8mj7b/nancy-pelosi-pt--2", "http://thecolbertreport.cc.com/videos/98szje/<API key>-" ], "guest": "Rep. Nancy Pelosi" }, { "date": "2014-07-22", "videos": [ "http://thecolbertreport.cc.com/videos/a6s2qu/<API key>", "http://thecolbertreport.cc.com/videos/d24npe/<API key>", "http://thecolbertreport.cc.com/videos/stx9ln/<API key>", "http://thecolbertreport.cc.com/videos/qf023x/<API key>", "http://thecolbertreport.cc.com/videos/1872w0/julia-ioffe", "http://thecolbertreport.cc.com/videos/rxjlpc/<API key>" ], "guest": "Julia Ioffe" }, { "date": "2014-07-23", "videos": [ "http://thecolbertreport.cc.com/videos/74ly7x/<API key>", "http://thecolbertreport.cc.com/videos/w0dhco/six-californias", "http://thecolbertreport.cc.com/videos/rmgh1u/<API key>", "http://thecolbertreport.cc.com/videos/qb2d4f/<API key>", "http://thecolbertreport.cc.com/videos/a368r9/<API key>", "http://thecolbertreport.cc.com/videos/8nsg9g/<API key>" ], "guest": "Mary Mazzio, Oscar Vazquez" }, { "date": "2014-07-24", "videos": [ "http://thecolbertreport.cc.com/videos/9bfzta/<API key>", "http://thecolbertreport.cc.com/videos/br4k5m/<API key>", "http://thecolbertreport.cc.com/videos/o26y1r/elon-musk-pt--1", "http://thecolbertreport.cc.com/videos/s4aaoq/elon-musk-pt--2", "http://thecolbertreport.cc.com/videos/baab8l/<API key>", "http://thecolbertreport.cc.com/videos/9pmgk5/<API key>" ], "guest": "Elon Musk" }, { "date": "2014-07-28", "videos": [ "http://thecolbertreport.cc.com/videos/99fqm5/<API key>", "http://thecolbertreport.cc.com/videos/yxerhp/<API key>", "http://thecolbertreport.cc.com/videos/c8gyzb/-<API key>", "http://thecolbertreport.cc.com/videos/me3jxh/beck" ], "guest": "Beck" }, { "date": "2014-07-29", "videos": [ "http://thecolbertreport.cc.com/videos/go3xsz/<API key>", "http://thecolbertreport.cc.com/videos/zo7j8y/<API key>", "http://thecolbertreport.cc.com/videos/oeurov/<API key>", "http://thecolbertreport.cc.com/videos/84mh53/<API key>" ], "guest": "Jon Batiste &amp; Stay Human" }, { "date": "2014-07-30", "videos": [ "http://thecolbertreport.cc.com/videos/vy7myr/<API key>", "http://thecolbertreport.cc.com/videos/mfm78m/<API key>", "http://thecolbertreport.cc.com/videos/gv7xvj/<API key>", "http://thecolbertreport.cc.com/videos/psbsuw/naked-tv", "http://thecolbertreport.cc.com/videos/lb70bp/james-franco", "http://thecolbertreport.cc.com/videos/n2673s/<API key>" ], "guest": "James Franco" }, { "date": "2014-07-31", "videos": [ "http://thecolbertreport.cc.com/videos/dwf82q/<API key>", "http://thecolbertreport.cc.com/videos/cruj3s/<API key>", "http://thecolbertreport.cc.com/videos/m4juon/<API key>", "http://thecolbertreport.cc.com/videos/2mpwlv/campbell-brown", "http://thecolbertreport.cc.com/videos/26ag1q/<API key>" ], "guest": "Campbell Brown" }, { "date": "2014-08-04", "videos": [ "http://thecolbertreport.cc.com/videos/zcyj0l/<API key>", "http://thecolbertreport.cc.com/videos/9hxmyy/<API key>", "http://thecolbertreport.cc.com/videos/c505xx/pat-buchanan", "http://thecolbertreport.cc.com/videos/ecplh0/john-w--dean", "http://thecolbertreport.cc.com/videos/jg7vda/<API key>", "http://thecolbertreport.cc.com/videos/2kctj0/<API key>" ], "guest": "Pat Buchanan, John W. Dean" }, { "date": "2014-08-05", "videos": [ "http://thecolbertreport.cc.com/videos/eu8j9u/<API key>", "http://thecolbertreport.cc.com/videos/imtefo/-<API key>", "http://thecolbertreport.cc.com/videos/8tvtmw/<API key>", "http://thecolbertreport.cc.com/videos/wb06vr/james-cameron", "http://thecolbertreport.cc.com/videos/tovjr3/<API key>" ], "guest": "James Cameron" }, { "date": "2014-08-06", "videos": [ "http://thecolbertreport.cc.com/videos/v652g6/<API key>", "http://thecolbertreport.cc.com/videos/mrntln/<API key>", "http://thecolbertreport.cc.com/videos/82nvgq/news-anchor-baby", "http://thecolbertreport.cc.com/videos/gn8hz0/michael-fassbender" ], "guest": "Michael Fassbender" }, { "date": "2014-08-07", "videos": [ "http: "http://thecolbertreport.cc.com/videos/bmd26v/<API key>", "http://thecolbertreport.cc.com/videos/nm2atj/ebola-panic", "http://thecolbertreport.cc.com/videos/7a9ir7/<API key>", "http://thecolbertreport.cc.com/videos/ddvyto/brian-chesky", "http://thecolbertreport.cc.com/videos/dc3x0v/<API key>" ], "guest": "Brian Chesky" }, { "date": "2014-08-26", "videos": [ "http: "http://thecolbertreport.cc.com/videos/pupsy6/<API key>", "http://thecolbertreport.cc.com/videos/llmmz6/<API key>", "http://thecolbertreport.cc.com/videos/crpfrn/<API key>", "http://thecolbertreport.cc.com/videos/30umwt/<API key>" ], "guest": "Jeff Bridges, Lois Lowry" }, { "date": "2014-08-27", "videos": [ "http: "http://thecolbertreport.cc.com/videos/4komvc/outrage-in-ferguson", "http://thecolbertreport.cc.com/videos/h1itnw/<API key>", "http://thecolbertreport.cc.com/videos/8ye61k/<API key>", "http://thecolbertreport.cc.com/videos/v6x4qn/michael-sheen", "http://thecolbertreport.cc.com/videos/4g1qgo/<API key>-" ], "guest": "Michael Sheen" }, { "date": "2014-08-28", "videos": [ "http://thecolbertreport.cc.com/videos/2x4lop/isis-panic", "http://thecolbertreport.cc.com/videos/yr7egy/<API key>", "http://thecolbertreport.cc.com/videos/bac98y/<API key>", "http://thecolbertreport.cc.com/videos/vmcz6o/jr", "http://thecolbertreport.cc.com/videos/q6o47f/<API key>" ], "guest": "JR" }, { "date": "2014-09-02", "videos": [ "http://thecolbertreport.cc.com/videos/7ohwx8/<API key>", "http://thecolbertreport.cc.com/videos/kc4ojp/<API key>", "http://thecolbertreport.cc.com/videos/ukyqb3/<API key>", "http://thecolbertreport.cc.com/videos/xuzel5/<API key>", "http://thecolbertreport.cc.com/videos/sximkb/mandy-patinkin", "http://thecolbertreport.cc.com/videos/hpkdp0/<API key>" ], "guest": "Mandy Patinkin" }, { "date": "2014-09-03", "videos": [ "http: "http://thecolbertreport.cc.com/videos/v7c4zm/<API key>", "http://thecolbertreport.cc.com/videos/2ccwew/<API key>", "http://thecolbertreport.cc.com/videos/r6svso/<API key>", "http://thecolbertreport.cc.com/videos/ewijdy/randall-munroe", "http://thecolbertreport.cc.com/videos/cs2fnl/<API key>" ], "guest": "Randall Munroe" }, { "date": "2014-09-04", "videos": [ "http: "http://thecolbertreport.cc.com/videos/lo5wee/<API key>", "http://thecolbertreport.cc.com/videos/zq72u5/<API key>", "http://thecolbertreport.cc.com/videos/g7yyhh/<API key>", "http://thecolbertreport.cc.com/videos/s4ds82/<API key>", "http://thecolbertreport.cc.com/videos/fj6l1s/<API key>" ], "guest": "Doris Kearns Goodwin" }, { "date": "2014-09-08", "videos": [ "http: "http://thecolbertreport.cc.com/videos/dzxra6/<API key>", "http://thecolbertreport.cc.com/videos/3160bg/<API key>", "http://thecolbertreport.cc.com/videos/jz3rdd/pavlok-fitness-band", "http://thecolbertreport.cc.com/videos/23mu4v/john-lithgow", "http://thecolbertreport.cc.com/videos/a0x0bs/<API key>" ], "guest": "John Lithgow" }, { "date": "2014-09-09", "videos": [ "http://thecolbertreport.cc.com/videos/j5s4z1/<API key>", "http://thecolbertreport.cc.com/videos/s6gte9/<API key>", "http://thecolbertreport.cc.com/videos/hkfm7z/<API key>", "http://thecolbertreport.cc.com/videos/e4y7wx/jason-segel", "http://thecolbertreport.cc.com/videos/93zpki/<API key>" ], "guest": "Jason Segel" }, { "date": "2014-09-10", "videos": [ "http: "http://thecolbertreport.cc.com/videos/p2b64y/obama-s-isis-speech", "http://thecolbertreport.cc.com/videos/lqm25y/dalai-lama-drama", "http://thecolbertreport.cc.com/videos/4pdz7v/<API key>", "http://thecolbertreport.cc.com/videos/wn86jw/the-buypartisan-app", "http://thecolbertreport.cc.com/videos/hyx04c/henry-kissinger", "http://thecolbertreport.cc.com/videos/bipiaj/<API key>" ], "guest": "Henry Kissinger" }, { "date": "2014-09-11", "videos": [ "http://thecolbertreport.cc.com/videos/oeusg2/<API key>-", "http://thecolbertreport.cc.com/videos/li99ni/<API key>", "http://thecolbertreport.cc.com/videos/wna0mw/<API key>", "http://thecolbertreport.cc.com/videos/ndpng7/lonn-taylor", "http://thecolbertreport.cc.com/videos/cl9arb/<API key>" ], "guest": "Lonn Taylor" }, { "date": "2014-09-15", "videos": [ "http://thecolbertreport.cc.com/videos/848h60/<API key>", "http://thecolbertreport.cc.com/videos/lmtq66/<API key>", "http://thecolbertreport.cc.com/videos/exs7p5/<API key>", "http://thecolbertreport.cc.com/videos/0txz3z/<API key>", "http://thecolbertreport.cc.com/videos/m1a8gr/mindy-kaling", "http://thecolbertreport.cc.com/videos/0j1qdb/sign-off" ], "guest": "Mindy Kaling" }, { "date": "2014-09-16", "videos": [ "http: "http://thecolbertreport.cc.com/videos/0agoip/<API key>", "http://thecolbertreport.cc.com/videos/mzktzw/<API key>", "http://thecolbertreport.cc.com/videos/oyl7ka/unlocking-the-truth" ], "guest": "Unlocking the Truth" }, { "date": "2014-09-17", "videos": [ "http://thecolbertreport.cc.com/videos/6d36zv/caped-cash-cows", "http://thecolbertreport.cc.com/videos/zryrry/<API key>", "http://thecolbertreport.cc.com/videos/d791f1/<API key>", "http://thecolbertreport.cc.com/videos/xq6f9b/<API key>", "http://thecolbertreport.cc.com/videos/arckqm/viggo-mortensen", "http: ], "guest": "Viggo Mortensen" }, { "date": "2014-09-18", "videos": [ "http://thecolbertreport.cc.com/videos/hn1ueg/checky", "http://thecolbertreport.cc.com/videos/yupbhd/<API key>", "http://thecolbertreport.cc.com/videos/wjga35/<API key>", "http://thecolbertreport.cc.com/videos/rd6gao/terry-gilliam", "http://thecolbertreport.cc.com/videos/148dzu/<API key>" ], "guest": "Terry Gilliam" }, { "date": "2014-09-22", "videos": [ "http://thecolbertreport.cc.com/videos/uc4f7i/<API key>", "http://thecolbertreport.cc.com/videos/01cyc2/<API key>", "http://thecolbertreport.cc.com/videos/x58aop/charles-kr<API key>, "http://thecolbertreport.cc.com/videos/jq352p/tweedy" ], "guest": "Tweedy" }, { "date": "2014-09-23", "videos": [ "http://thecolbertreport.cc.com/videos/j6xqew/<API key>", "http://thecolbertreport.cc.com/videos/ybvlae/<API key>", "http://thecolbertreport.cc.com/videos/b5ni29/<API key>", "http://thecolbertreport.cc.com/videos/k5a58t/naomi-klein", "http: ], "guest": "Naomi Klein" }, { "date": "2014-09-24", "videos": [ "http://thecolbertreport.cc.com/videos/5mneco/<API key>", "http://thecolbertreport.cc.com/videos/tw7sr5/<API key>" ], "guest": "Bill Cosby" }, { "date": "2014-09-25", "videos": [ "http://thecolbertreport.cc.com/videos/p49ls4/<API key>", "http: "http://thecolbertreport.cc.com/videos/tjmnw0/<API key>", "http://thecolbertreport.cc.com/videos/7dpl33/<API key>", "http://thecolbertreport.cc.com/videos/0w775u/<API key>", "http://thecolbertreport.cc.com/videos/g36k7p/walter-mischel", "http://thecolbertreport.cc.com/videos/fhpqlq/<API key>" ], "guest": "Walter Mischel" }, { "date": "2014-09-29", "videos": [ "http://thecolbertreport.cc.com/videos/6ythcp/<API key>", "http://thecolbertreport.cc.com/videos/eecxwy/<API key>", "http://thecolbertreport.cc.com/videos/6w3vad/<API key>", "http://thecolbertreport.cc.com/videos/ojmtk8/jamie-oliver", "http://thecolbertreport.cc.com/videos/z231mw/<API key>" ], "guest": "Jamie Oliver" }, { "date": "2014-09-30", "videos": [ "http://thecolbertreport.cc.com/videos/6k6hq3/<API key>", "http://thecolbertreport.cc.com/videos/h1yge9/<API key>", "http://thecolbertreport.cc.com/videos/8x6lww/<API key>", "http://thecolbertreport.cc.com/videos/qofokt/jeffrey-tambor", "http://thecolbertreport.cc.com/videos/pnsz05/<API key>" ], "guest": "Jeffrey Tambor" }, { "date": "2014-10-01", "videos": [ "http://thecolbertreport.cc.com/videos/v6tds1/<API key>", "http://thecolbertreport.cc.com/videos/v51zzo/<API key>", "http://thecolbertreport.cc.com/videos/zzbhqi/<API key>", "http://thecolbertreport.cc.com/videos/oviilh/mike-mullen", "http://thecolbertreport.cc.com/videos/5tiz1y/<API key>", "http://thecolbertreport.cc.com/videos/8f6kuv/<API key>" ], "guest": "Adm. Mike Mullen" }, { "date": "2014-10-02", "videos": [ "http: "http://thecolbertreport.cc.com/videos/x6d5sz/<API key>", "http://thecolbertreport.cc.com/videos/hhhqqd/<API key>", "http://thecolbertreport.cc.com/videos/e72awe/solitocity", "http://thecolbertreport.cc.com/videos/ye2fnr/lynn-sherr", "http://thecolbertreport.cc.com/videos/7nl6i5/<API key>" ], "guest": "Lynn Sherr" }, { "date": "2014-10-06", "videos": [ "http: "http://thecolbertreport.cc.com/videos/heaxbs/<API key>", "http://thecolbertreport.cc.com/videos/ssmvma/<API key>", "http://thecolbertreport.cc.com/videos/ayvbym/<API key>-", "http://thecolbertreport.cc.com/videos/fcax26/james-m--mcpherson", "http://thecolbertreport.cc.com/videos/bfwqfb/<API key>" ], "guest": "James McPherson" }, { "date": "2014-10-07", "videos": [ "http://thecolbertreport.cc.com/videos/hhqgbw/ebolapalooza", "http://thecolbertreport.cc.com/videos/nx3ewk/<API key>", "http://thecolbertreport.cc.com/videos/q2857u/<API key>", "http://thecolbertreport.cc.com/videos/7swpxt/leon-wieseltier", "http://thecolbertreport.cc.com/videos/rete59/<API key>" ], "guest": "Leon Wieseltier" }, { "date": "2014-10-08", "videos": [ "http: "http://thecolbertreport.cc.com/videos/khi8w0/<API key>", "http://thecolbertreport.cc.com/videos/m899eo/<API key>", "http://thecolbertreport.cc.com/videos/hzou6l/carol-burnett", "http: ], "guest": "Carol Burnett" }, { "date": "2014-10-09", "videos": [ "http://thecolbertreport.cc.com/videos/blfnlw/<API key>-", "http://thecolbertreport.cc.com/videos/jdri4u/<API key>-", "http: "http://thecolbertreport.cc.com/videos/0gscic/<API key>", "http://thecolbertreport.cc.com/videos/hpfwm4/<API key>", "http://thecolbertreport.cc.com/videos/xfjyum/<API key>", "http://thecolbertreport.cc.com/videos/jfanx7/robert-plant", "http://thecolbertreport.cc.com/videos/o2y6sr/<API key>-" ], "guest": "Robert Plant" }, { "date": "2014-10-13", "videos": [ "http://thecolbertreport.cc.com/videos/fhnqjo/<API key>interested-in", "http: "http://thecolbertreport.cc.com/videos/sx2hh2/<API key>", "http://thecolbertreport.cc.com/videos/fp4xfy/walter-isaacson", "http://thecolbertreport.cc.com/videos/f4t3xr/<API key>", "http://thecolbertreport.cc.com/videos/bxbwj4/<API key>" ], "guest": "Walter Isaacson" }, { "date": "2014-10-14", "videos": [ "http://thecolbertreport.cc.com/videos/zg3zai/<API key>--", "http://thecolbertreport.cc.com/videos/wcjcgn/<API key>", "http://thecolbertreport.cc.com/videos/akzlpt/<API key>", "http://thecolbertreport.cc.com/videos/namhpu/neil-young", "http://thecolbertreport.cc.com/videos/veswmj/<API key>-" ], "guest": "Neil Young" }, { "date": "2014-10-15", "videos": [ "http://thecolbertreport.cc.com/videos/qw8rwv/<API key>", "http://thecolbertreport.cc.com/videos/q2u206/<API key>", "http://thecolbertreport.cc.com/videos/xv3cdl/<API key>", "http://thecolbertreport.cc.com/videos/18x57e/justin-simien", "http://thecolbertreport.cc.com/videos/4tsbtt/<API key>" ], "guest": "Justin Simien" }, { "date": "2014-10-16", "videos": [ "http://thecolbertreport.cc.com/videos/uebndp/<API key>", "http://thecolbertreport.cc.com/videos/aywapn/<API key>", "http://thecolbertreport.cc.com/videos/3o1uzs/<API key>", "http://thecolbertreport.cc.com/videos/z4umi5/william-deresiewicz", "http://thecolbertreport.cc.com/videos/xrvm7x/stephen-s-old-ipod" ], "guest": "Bill Deresiewicz" }, { "date": "2014-10-27", "videos": [ "http: "http://thecolbertreport.cc.com/videos/8hjpi2/ebola-in-new-york", "http://thecolbertreport.cc.com/videos/whfeyg/<API key>", "http://thecolbertreport.cc.com/videos/jjpinj/meredith-vieira", "http: ], "guest": "Meredith Vieira" }, { "date": "2014-10-28", "videos": [ "http://thecolbertreport.cc.com/videos/xxvx4u/<API key>", "http://thecolbertreport.cc.com/videos/jxddq4/<API key>", "http://thecolbertreport.cc.com/videos/6cj1fk/<API key>", "http://thecolbertreport.cc.com/videos/nzy3nz/<API key>", "http://thecolbertreport.cc.com/videos/c7wjzg/michael-lewis", "http://thecolbertreport.cc.com/videos/64x2gg/<API key>" ], "guest": "Michael Lewis" }, { "date": "2014-10-29", "videos": [ "http://thecolbertreport.cc.com/videos/ladjef/gamergate", "http://thecolbertreport.cc.com/videos/wr7hqq/<API key>", "http://thecolbertreport.cc.com/videos/ll1e16/heroism-in-canada", "http://thecolbertreport.cc.com/videos/1h66nr/jill-lepore", "http://thecolbertreport.cc.com/videos/1fc6m9/<API key>" ], "guest": "Jill Lepore" }, { "date": "2014-10-30", "videos": [ "http: "http://thecolbertreport.cc.com/videos/hxvn8w/-<API key>", "http://thecolbertreport.cc.com/videos/365nm9/<API key>", "http://thecolbertreport.cc.com/videos/cykxut/<API key>", "http://thecolbertreport.cc.com/videos/tqbn3t/david-miliband", "http://thecolbertreport.cc.com/videos/4rgfpm/<API key>" ], "guest": "David Miliband" }, { "date": "2014-11-03", "videos": [ "http: "http://thecolbertreport.cc.com/videos/p6uab8/<API key>", "http://thecolbertreport.cc.com/videos/qmg04s/<API key>", "http://thecolbertreport.cc.com/videos/rw2v1b/<API key>", "http://thecolbertreport.cc.com/videos/lffyr9/chuck-todd", "http://thecolbertreport.cc.com/videos/xrfsl8/<API key>" ], "guest": "Chuck Todd" }, { "date": "2014-11-04", "videos": [ "http://thecolbertreport.cc.com/videos/1g0aji/<API key>", "http://thecolbertreport.cc.com/videos/cmr0z4/<API key>", "http://thecolbertreport.cc.com/videos/w3muth/<API key>", "http://thecolbertreport.cc.com/videos/ekj19q/andrew-sullivan", "http://thecolbertreport.cc.com/videos/ckxbqk/<API key>" ], "guest": "Andrew Sullivan" }, { "date": "2014-11-05", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ywqnjy/<API key>", "http://thecolbertreport.cc.com/videos/wq84nn/<API key>", "http://thecolbertreport.cc.com/videos/7feu8t/<API key>-", "http://thecolbertreport.cc.com/videos/w2qs7x/kirsten-gillibrand", "http://thecolbertreport.cc.com/videos/tno5bj/<API key>" ], "guest": "Sen. Kirsten Gillibrand" }, { "date": "2014-11-06", "videos": [ "http: "http://thecolbertreport.cc.com/videos/rtdlsr/<API key>", "http://thecolbertreport.cc.com/videos/3rw0tz/<API key>", "http://thecolbertreport.cc.com/videos/sc6mpp/<API key>", "http://thecolbertreport.cc.com/videos/v06v9z/steven-johnson", "http://thecolbertreport.cc.com/videos/yzaj23/<API key>" ], "guest": "Steven Johnson" }, { "date": "2014-11-10", "videos": [ "http: "http://thecolbertreport.cc.com/videos/xnwueh/<API key>", "http://thecolbertreport.cc.com/videos/avadrz/<API key>-", "http://thecolbertreport.cc.com/videos/87vgoo/<API key>", "http://thecolbertreport.cc.com/videos/sbmlul/andy-cohen", "http://thecolbertreport.cc.com/videos/7uog9s/<API key>" ], "guest": "Andy Cohen" }, { "date": "2014-11-11", "videos": [ "http: "http://thecolbertreport.cc.com/videos/wht7i8/<API key>", "http://thecolbertreport.cc.com/videos/thgfth/<API key>", "http: "http://thecolbertreport.cc.com/videos/41fe1h/<API key>", "http://thecolbertreport.cc.com/videos/ncl44x/<API key>" ], "guest": "Diane Von Furstenberg" }, { "date": "2014-11-12", "videos": [ "http: "http://thecolbertreport.cc.com/videos/a1b4ph/<API key>", "http://thecolbertreport.cc.com/videos/rn92gg/<API key>", "http://thecolbertreport.cc.com/videos/hhmb28/<API key>-klingenschmitt", "http://thecolbertreport.cc.com/videos/6wtwlg/terence-tao", "http: ], "guest": "Terence Tao" }, { "date": "2014-11-13", "videos": [ "http://thecolbertreport.cc.com/videos/jtbvle/<API key>", "http://thecolbertreport.cc.com/videos/fe3wjm/<API key>", "http://thecolbertreport.cc.com/videos/cvq86c/<API key>", "http://thecolbertreport.cc.com/videos/3pu1ey/jennifer-lawrence", "http://thecolbertreport.cc.com/videos/9aqahd/<API key>" ], "guest": "Jennifer Lawrence" }, { "date": "2014-11-17", "videos": [ "http://thecolbertreport.cc.com/videos/qed7bp/<API key>", "http://thecolbertreport.cc.com/videos/9dr12d/<API key>-", "http://thecolbertreport.cc.com/videos/7vjzxb/<API key>", "http://thecolbertreport.cc.com/videos/67tlr7/<API key>", "http://thecolbertreport.cc.com/videos/uqho5w/<API key>" ], "guest": "Sen. Bernie Sanders" }, { "date": "2014-11-18", "videos": [ "http: "http://thecolbertreport.cc.com/videos/ib2b3k/polar-plunge", "http://thecolbertreport.cc.com/videos/iw2iwg/<API key>", "http://thecolbertreport.cc.com/videos/bbfckz/<API key>", "http://thecolbertreport.cc.com/videos/o8su6y/eva-longoria", "http://thecolbertreport.cc.com/videos/vu8jpe/<API key>" ], "guest": "Eva Longoria" }, { "date": "2014-11-19", "videos": [ "http://thecolbertreport.cc.com/videos/7mkltp/<API key>", "http://thecolbertreport.cc.com/videos/dvppp6/<API key>", "http://thecolbertreport.cc.com/videos/sdqbxm/black-friday-sale", "http://thecolbertreport.cc.com/videos/9yc4ry/toni-morrison", "http://thecolbertreport.cc.com/videos/y4ygag/<API key>" ], "guest": "Toni Morrison" }, { "date": "2014-11-20", "videos": [ "http://thecolbertreport.cc.com/videos/01iemp/<API key>", "http://thecolbertreport.cc.com/videos/fie7ef/<API key><API key>", "http://thecolbertreport.cc.com/videos/e55wo4/jon-stewart-pt--1", "http://thecolbertreport.cc.com/videos/vbi9v5/jon-stewart-pt--2", "http://thecolbertreport.cc.com/videos/zwcggy/<API key>" ], "guest": "Jon Stewart" }, { "date": "2014-12-01", "videos": [ "http: "http://thecolbertreport.cc.com/videos/umsrnb/<API key>", "http://thecolbertreport.cc.com/videos/wud7e1/<API key>", "http://thecolbertreport.cc.com/videos/d6xq50/<API key>", "http://thecolbertreport.cc.com/videos/3h1qqa/john-mccain", "http://thecolbertreport.cc.com/videos/dnrg1a/<API key>" ], "guest": "Sen. John McCain" }, { "date": "2014-12-02", "videos": [ "http: "http://thecolbertreport.cc.com/videos/hyqrm1/<API key>", "http://thecolbertreport.cc.com/videos/ethq4d/<API key>", "http://thecolbertreport.cc.com/videos/lje2l4/<API key>", "http://thecolbertreport.cc.com/videos/z0hz76/<API key>" ], "guest": "Tony Bennett &amp; Lady Gaga" }, { "date": "2014-12-03", "videos": [ "http: "http://thecolbertreport.cc.com/videos/nxwili/<API key>", "http://thecolbertreport.cc.com/videos/ziipwv/<API key>", "http://thecolbertreport.cc.com/videos/fpdlpw/<API key>", "http://thecolbertreport.cc.com/videos/4r9o52/christopher-nolan", "http://thecolbertreport.cc.com/videos/nwo3n2/<API key>" ], "guest": "Christopher Nolan" }, { "date": "2014-12-04", "videos": [ "http://thecolbertreport.cc.com/videos/ik935r/<API key>", "http://thecolbertreport.cc.com/videos/d5k5nz/<API key>", "http://thecolbertreport.cc.com/videos/pxune6/<API key>", "http://thecolbertreport.cc.com/videos/nucbbu/paul-farmer", "http: ], "guest": "Dr. Paul Farmer" }, { "date": "2014-12-08", "videos": [ "http://thecolbertreport.cc.com/videos/u8bqev/<API key>", "http://thecolbertreport.cc.com/videos/cnlqbr/<API key>", "http://thecolbertreport.cc.com/videos/88p9oh/<API key>", "http://thecolbertreport.cc.com/videos/i14vel/<API key>", "http://thecolbertreport.cc.com/videos/mpmtan/<API key>", "http: "http://thecolbertreport.cc.com/videos/4mkbqz/<API key>" ], "guest": "President Barack Obama" }, { "date": "2014-12-09", "videos": [ "http://thecolbertreport.cc.com/videos/tgnj0t/-<API key>", "http://thecolbertreport.cc.com/videos/vd3icz/<API key>", "http://thecolbertreport.cc.com/videos/pz35hw/<API key>", "http://thecolbertreport.cc.com/videos/2kz4pi/james-corden", "http: ], "guest": "James Corden" }, { "date": "2014-12-10", "videos": [ "http://thecolbertreport.cc.com/videos/kquici/cia-torture-report", "http://thecolbertreport.cc.com/videos/rlpjf5/<API key>", "http://thecolbertreport.cc.com/videos/z4grj8/<API key>", "http://thecolbertreport.cc.com/videos/8i6klx/sarah-koenig", "http://thecolbertreport.cc.com/videos/im3k81/<API key>" ], "guest": "Sarah Koenig" }, { "date": "2014-12-11", "videos": [ "http://thecolbertreport.cc.com/videos/anckrc/<API key>", "http://thecolbertreport.cc.com/videos/399enl/<API key>", "http://thecolbertreport.cc.com/videos/p9nk9d/<API key>", "http://thecolbertreport.cc.com/videos/509747/smaug", "http://thecolbertreport.cc.com/videos/mfxigz/<API key>" ], "guest": "\"The Hobbit: Battle of the Five Armies\" special" }, { "date": "2014-12-15", "videos": [ "http: "http://thecolbertreport.cc.com/videos/lwna3x/<API key>", "http://thecolbertreport.cc.com/videos/0frisd/<API key>", "http://thecolbertreport.cc.com/videos/9xetgg/<API key>", "http://thecolbertreport.cc.com/videos/j9u5in/seth-rogen", "http://thecolbertreport.cc.com/videos/bhrczk/<API key>" ], "guest": "Seth Rogen" }, { "date": "2014-12-16", "videos": [ "http://thecolbertreport.cc.com/videos/arfo3o/<API key>", "http://thecolbertreport.cc.com/videos/tnwzte/<API key>", "http://thecolbertreport.cc.com/videos/vd8ci4/<API key>", "http://thecolbertreport.cc.com/videos/w5h8eb/kendrick-lamar", "http://thecolbertreport.cc.com/videos/pjrqsj/<API key>" ], "guest": "Kendrick Lamar" } ] } working_folder = 'G:/Downloads' for colbDate in testP['2014']: if 1: newfileResize = 'G:/downloads/The Colbert Report 2014/TheColbertReport '+colbDate['date']+'.mp4' if not os.path.exists(newfileResize): folderName = 'G:/downloads/The Colbert Report 2014/'+colbDate['date'] try: os.mkdir(folderName) except: pass pos = 0 for vid in colbDate['videos']: pos+=1 done = False while not done: folderContents = os.listdir(folderName) for folderContent in folderContents: if folderContent.startswith(str(pos)+' ') and (not folderContent.endswith('.part')): done = True if not done: cmd = os.path.join(working_folder,'youtube-dl.exe') + ' --no-continue -o "'+folderName+'/'+str(pos)+' %(title)s.%(ext)s" '+vid subprocess.call(cmd,shell=True) vids = [] for vid in os.listdir(folderName): if vid.endswith('.mp4'): vids.append(os.path.join(folderName,vid)) vids.sort() newfile = 'G:/downloads/The Colbert Report 2014/TheColbertReport '+colbDate['date']+'temp.mp4' if not os.path.exists(newfileResize): cmd = r' -cat "' + r'" -cat "'.join(vids) + r'" -new "'+newfile+'"' exc = "G:/Downloads/mp4box.exe -tmp G:/temp/ " + cmd subprocess.call(exc,shell=True) cmd = "G:/Downloads/ffmpeg/bin/ffmpeg.exe -i \"" + newfile + "\" -vf scale=1024:576 \""+newfileResize+"\"" subprocess.call(cmd,shell=True) while os.path.exists(newfile): try: os.remove(newfile) except: pass else: print 'file found ' + newfile
<?php defined('_JEXEC') or die('Restricted access'); require_once(JPATH_SITE.DS.'components'.DS.'com_youtubegallery'.DS.'includes'.DS.'render.php'); require_once(JPATH_SITE.DS.'components'.DS.'com_youtubegallery'.DS.'includes'.DS.'misc.php'); $listid=(int)$params->get( 'listid' ); $themeid=(int)$params->get( 'themeid' ); $align=''; if($listid!=0 and $themeid!=0) { $misc=new YouTubeGalleryMisc; if(!$misc-><API key>($listid)) echo '<p>No video found</p>'; if(!$misc->getThemeTableRow($themeid)) echo '<p>No theme found</p>'; $firstvideo=''; $youtubegallerycode=''; $<API key>=0; $misc->update_playlist(); //if($theme_row->openinnewwindow==4) // $videoid=''; //Hot Video Switch // else $videoid=JRequest::getVar('videoid'); if($misc->theme_row->playvideo==1 and $videoid!='') $misc->theme_row->autoplay=1; $videoid_new=$videoid; $videolist=$misc-><API key>($videoid_new,$<API key>); if($videoid=='') { if($misc->theme_row->playvideo==1 and $videoid_new!='') $videoid=$videoid_new; } $renderer= new <API key>; $gallerymodule=$renderer->render( $videolist, $misc->videolist_row, $misc->theme_row, $<API key>, $videoid ); if($params->get( 'allowcontentplugins' )) { $o = new stdClass(); $o->text=$gallerymodule; $dispatcher = JDispatcher::getInstance(); JPluginHelper::importPlugin('content'); $r = $dispatcher->trigger('onContentPrepare', array ('com_content.article', &$o, &$params_, 0)); $gallerymodule=$o->text; } $align=$params->get( 'galleryalign' ); switch($align) { case 'left' : $youtubegallerycode.= '<div style="float:left;position:relative;">'.$gallerymodule.'</div>'; break; case 'center' : $youtubegallerycode.= '<div style="width:'.$misc->theme_row->width.'px;margin-left:auto;margin-right:auto;position:relative;">'.$gallerymodule.'</div>'; break; case 'right' : $youtubegallerycode.= '<div style="float:right;position:relative;">'.$gallerymodule.'</div>'; break; default : $youtubegallerycode.= $gallerymodule; break; }//switch($align) echo $youtubegallerycode; } else echo '<p>Video list or Theme not selected</p>'; ?>
<?php $absolute_path = __FILE__; $path_to_file = explode( 'wp-content', $absolute_path ); $path_to_wp = $path_to_file[0]; require_once( $path_to_wp.'/wp-load.php' ); $to = isset($_POST['to'])?trim($_POST['to']):''; $name = isset($_POST['name'])?trim($_POST['name']):''; $email = isset($_POST['email'])?trim($_POST['email']):''; $content = isset($_POST['content'])?trim($_POST['content']):''; $error = true; if($to == '' || $email == '' || $content == '' || $name == '') $error = false; $sitename = get_bloginfo('name'); if($error){ $subject = 'A message from '.$name; $headers = 'From: '.$email . "\r\n" . 'Reply-To: '.$email . "\r\n"; mail($to, $subject, $content, $headers); }
<html lang="en"> <head> <title>abbr - GNU Texinfo 4.8</title> <meta http-equiv="Content-Type" content="text/html"> <meta name="description" content="GNU Texinfo 4.8"> <meta name="generator" content="makeinfo 4.8"> <link title="Top" rel="start" href="index.html#Top"> <link rel="up" href="Indicating.html#Indicating" title="Indicating"> <link rel="prev" href="cite.html#cite" title="cite"> <link rel="next" href="acronym.html#acronym" title="acronym"> <link href="http: <! This manual is for GNU Texinfo (version 4.8, 29 December 2004), a documentation system that can produce both online information and a printed manual from a single source. Copyright (C) 1988, 1990, 1991, 1992, 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover texts being ``A GNU Manual,'' and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled ``GNU Free Documentation License.'' (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify this GNU Manual, like GNU software. Copies published by the Free Software Foundation raise funds for GNU development.'' <meta http-equiv="Content-Style-Type" content="text/css"> <style type="text/css"><! pre.display { font-family:inherit } pre.format { font-family:inherit } pre.smalldisplay { font-family:inherit; font-size:smaller } pre.smallformat { font-family:inherit; font-size:smaller } pre.smallexample { font-size:smaller } pre.smalllisp { font-size:smaller } span.sc { font-variant:small-caps } span.roman { font-family:serif; font-weight:normal; } span.sansserif { font-family:sans-serif; font-weight:normal; } --></style> </head> <body> <div class="node"> <p> <a name="abbr"></a> Next:&nbsp;<a rel="next" accesskey="n" href="acronym.html#acronym">acronym</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="cite.html#cite">cite</a>, Up:&nbsp;<a rel="up" accesskey="u" href="Indicating.html#Indicating">Indicating</a> <hr> </div> <h4 class="subsection">9.1.14 <code>@abbr</code>{<var>abbreviation</var>[, <var>meaning</var>]}</h4> <p><a name="index-abbr-430"></a> <a name="<API key>"></a>You can use the <code>@abbr</code> command for general abbreviations. The abbreviation is given as the single argument in braces, as in `<samp><span class="samp">@abbr{Comput.}</span></samp>'. As a matter of style, or for particular abbreviations, you may prefer to omit periods, as in `<samp><span class="samp">@abbr{Mr} Stallman</span></samp>'. <p><code>@abbr</code> accepts an optional second argument, intended to be used for the meaning of the abbreviation. <p>If the abbreviation ends with a lowercase letter and a period, and is not at the end of a sentence, and has no second argument, remember to use the <code>@.</code> command (see <a href="<API key>.html#<API key>">Not Ending a Sentence</a>) to get the correct spacing. However, you do not have to use <code>@.</code> within the abbreviation itself; Texinfo automatically assumes periods within the abbreivation do not end a sentence. <p><a name="<API key>"></a>In TeX and in the Info output, the first argument is printed as-is; if the second argument is present, it is printed in parentheses after the abbreviation. In HTML and XML, the <code>&lt;abbr&gt;</code> tag is used; in Docbook, the <code>&lt;abbrev&gt;</code> tag is used. For instance: <pre class="example"> @abbr{Comput. J., Computer Journal} </pre> <p class="noindent">produces: <pre class="display"> <abbr title="Computer Journal">Comput. J.</abbr> (Computer Journal) </pre> <p>For abbreviations consisting of all capital letters, you may prefer to use the <code>@acronym</code> command instead. See the next section for more on the usage of these two commands. </body></html>
/* $Id: http_client.h 3227 2010-06-29 13:43:05Z ming $ */ #ifndef <API key> #define <API key> /** * @file http_client.h * @brief Simple HTTP Client */ #include <pj/activesock.h> #include <pjlib-util/types.h> PJ_BEGIN_DECL /** * @defgroup PJ_HTTP_CLIENT Simple HTTP Client * @ingroup PJ_PROTOCOLS * @{ * This contains a simple HTTP client implementation. * Some known limitations: * - Does not support chunked Transfer-Encoding. */ /** * This opaque structure describes the http request. */ typedef struct pj_http_req pj_http_req; /** * Defines the maximum number of elements in a pj_http_headers * structure. */ #define PJ_HTTP_HEADER_SIZE 32 /** * This structure describes http request/response headers. * Application should call #<API key>() to * add a header field. */ typedef struct pj_http_headers { unsigned count; /**< Number of header fields */ struct pj_http_header_elmt { pj_str_t name; pj_str_t value; } header[PJ_HTTP_HEADER_SIZE]; /**< Header elements/fields */ } pj_http_headers; /** * Parameters that can be given during http request creation. Application * must initialize this structure with #<API key>(). */ typedef struct pj_http_req_param { /** * The address family of the URL. * Default is pj_AF_INET(). */ int addr_family; /** * The HTTP request method. * Default is GET. */ pj_str_t method; /** * The HTTP protocol version ("1.0" or "1.1"). * Default is "1.0". */ pj_str_t version; /** * HTTP request operation timeout. * Default is <API key>. */ pj_time_val timeout; /** * User-defined data. * Default is NULL. */ void *user_data; /** * HTTP request headers. * Default is empty. */ pj_http_headers headers; /** * This structure describes the http request body. If application * specifies the data to send, the data must remain valid until * the HTTP request is sent. Alternatively, application can choose * to specify total_size as the total data size to send instead * while leaving the data NULL (and its size 0). In this case, * HTTP request will then call on_send_data() callback once it is * ready to send the request body. This will be useful if * application does not wish to load the data into the buffer at * once. * * Default is empty. */ struct pj_http_reqdata { void *data; /**< Request body data */ pj_size_t size; /**< Request body size */ pj_size_t total_size; /**< If total_size > 0, data */ /**< will be provided later */ } reqdata; } pj_http_req_param; /** * This structure describes HTTP response. */ typedef struct pj_http_resp { pj_str_t version; /**< HTTP version of the server */ pj_uint16_t status_code; /**< Status code of the request */ pj_str_t reason; /**< Reason phrase */ pj_http_headers headers; /**< Response headers */ /** * The value of content-length header field. -1 if not * specified. */ pj_int32_t content_length; void *data; /**< Data received */ pj_size_t size; /**< Data size */ } pj_http_resp; /** * This structure describes HTTP URL. */ typedef struct pj_http_url { pj_str_t protocol; /**< Protocol used */ pj_str_t host; /**< Host name */ pj_uint16_t port; /**< Port number */ pj_str_t path; /**< Path */ } pj_http_url; /** * This structure describes the callbacks to be called by the HTTP request. */ typedef struct <API key> { /** * This callback is called when a complete HTTP response header * is received. * * @param http_req The http request. * @param resp The response of the request. */ void (*on_response)(pj_http_req *http_req, const pj_http_resp *resp); /** * This callback is called when the HTTP request is ready to send * its request body. Application may wish to use this callback if * it wishes to load the data at a later time or if it does not * wish to load the whole data into memory. In order for this * callback to be called, application MUST set http_req_param.total_size * to a value greater than 0. * * @param http_req The http request. * @param data Pointer to the data that will be sent. Application * must set the pointer to the current data chunk/segment * to be sent. Data must remain valid until the next * on_send_data() callback or for the last segment, * until it is sent. * @param size Pointer to the data size that will be sent. */ void (*on_send_data)(pj_http_req *http_req, void **data, pj_size_t *size); /** * This callback is called when a segment of response body data * arrives. If this callback is specified (i.e. not NULL), the * on_complete() callback will be called with zero-length data * (within the response parameter), hence the application must * store and manage its own data buffer, otherwise the * on_complete() callback will be called with the response * parameter containing the complete data. * * @param http_req The http request. * @param data The buffer containing the data. * @param size The length of data in the buffer. */ void (*on_data_read)(pj_http_req *http_req, void *data, pj_size_t size); /** * This callback is called when the HTTP request is completed. * If the callback on_data_read() is specified, the variable * response->data will be set to NULL, otherwise it will * contain the complete data. Response data is allocated from * pj_http_req's internal memory pool so the data remain valid * as long as pj_http_req is not destroyed and application does * not start a new request. * * If no longer required, application may choose to destroy * pj_http_req immediately by calling #pj_http_req_destroy() inside * the callback. * * @param http_req The http request. * @param status The status of the request operation. PJ_SUCCESS * if the operation completed successfully * (connection-wise). To check the server's * status-code response to the HTTP request, * application should check resp->status_code instead. * @param resp The response of the corresponding request. If * the status argument is non-PJ_SUCCESS, this * argument will be set to NULL. */ void (*on_complete)(pj_http_req *http_req, pj_status_t status, const pj_http_resp *resp); } <API key>; /** * Initialize the http request parameters with the default values. * * @param param The parameter to be initialized. */ PJ_DECL(void) <API key>(pj_http_req_param *param); /** * Add a header element/field. Application MUST make sure that * name and val pointer remains valid until the HTTP request is sent. * * @param headers The headers. * @param name The header field name. * @param value The header field value. * * @return PJ_SUCCESS if the operation has been successful, * or the appropriate error code on failure. */ PJ_DECL(pj_status_t) <API key>(pj_http_headers *headers, pj_str_t *name, pj_str_t *val); /** * The same as #<API key>() with char * as * its parameters. Application MUST make sure that name and val pointer * remains valid until the HTTP request is sent. * * @param headers The headers. * @param name The header field name. * @param value The header field value. * * @return PJ_SUCCESS if the operation has been successful, * or the appropriate error code on failure. */ PJ_DECL(pj_status_t) <API key>(pj_http_headers *headers, char *name, char *val); /** * Parse a http URL into its components. * * @param url The URL to be parsed. * @param hurl Pointer to receive the parsed result. * * @return PJ_SUCCESS if the operation has been successful, * or the appropriate error code on failure. */ PJ_DECL(pj_status_t) <API key>(const pj_str_t *url, pj_http_url *hurl); /** * Create the HTTP request. * * @param pool Pool to use. HTTP request will use the pool's factory * to allocate its own memory pool. * @param url HTTP URL request. * @param timer The timer to use. * @param ioqueue The ioqueue to use. * @param param Optional parameters. When this parameter is not * specifed (NULL), the default values will be used. * @param hcb Pointer to structure containing application * callbacks. * @param http_req Pointer to receive the http request instance. * * @return PJ_SUCCESS if the operation has been successful, * or the appropriate error code on failure. */ PJ_DECL(pj_status_t) pj_http_req_create(pj_pool_t *pool, const pj_str_t *url, pj_timer_heap_t *timer, pj_ioqueue_t *ioqueue, const pj_http_req_param *param, const <API key> *hcb, pj_http_req **http_req); /** * Set the timeout of the HTTP request operation. Note that if the * HTTP request is currently running, the timeout will only affect * subsequent request operations. * * @param http_req The http request. * @param timeout Timeout value for HTTP request operation. */ PJ_DECL(void) <API key>(pj_http_req *http_req, const pj_time_val* timeout); /** * Starts an asynchronous HTTP request to the URL specified. * * @param http_req The http request. * * @return * - PJ_SUCCESS if success * - non-zero which indicates the appropriate error code. */ PJ_DECL(pj_status_t) pj_http_req_start(pj_http_req *http_req); /** * Cancel the asynchronous HTTP request. * * @param http_req The http request. * @param notify If non-zero, the on_complete() callback will be * called with status PJ_ECANCELLED to notify that * the query has been cancelled. * * @return * - PJ_SUCCESS if success * - non-zero which indicates the appropriate error code. */ PJ_DECL(pj_status_t) pj_http_req_cancel(pj_http_req *http_req, pj_bool_t notify); /** * Destroy the http request. * * @param http_req The http request to be destroyed. * * @return PJ_SUCCESS if success. */ PJ_DECL(pj_status_t) pj_http_req_destroy(pj_http_req *http_req); /** * Find out whether the http request is running. * * @param http_req The http request. * * @return PJ_TRUE if a request is pending, or * PJ_FALSE if idle */ PJ_DECL(pj_bool_t) <API key>(const pj_http_req *http_req); /** * Retrieve the user data previously associated with this http * request. * * @param http_req The http request. * * @return The user data. */ PJ_DECL(void *) <API key>(pj_http_req *http_req); PJ_END_DECL #endif /* <API key> */
using System; namespace Server.Items { public class StatuetteDyeTub : DyeTub, Engines.VeteranRewards.IRewardItem { public override bool AllowDyables{ get{ return false; } } public override bool AllowStatuettes{ get{ return true; } } public override int TargetMessage{ get{ return 1049777; } } // Target the statuette to dye public override int FailMessage{ get{ return 1049778; } } // You can only dye veteran reward statuettes with this tub. public override int LabelNumber{ get{ return 1049741; } } // Reward Statuette Dye Tub public override CustomHuePicker CustomHuePicker{ get{ return CustomHuePicker.LeatherDyeTub; } } private bool m_IsRewardItem; [CommandProperty( AccessLevel.GameMaster )] public bool IsRewardItem { get{ return m_IsRewardItem; } set{ m_IsRewardItem = value; } } [Constructable] public StatuetteDyeTub() { LootType = LootType.Blessed; } public override void OnDoubleClick( Mobile from ) { if ( m_IsRewardItem && !Engines.VeteranRewards.RewardSystem.CheckIsUsableBy( from, this, null ) ) return; base.OnDoubleClick( from ); } public StatuetteDyeTub( Serial serial ) : base( serial ) { } public override void Serialize( GenericWriter writer ) { base.Serialize( writer ); writer.Write( (int) 1 ); // version writer.Write( (bool) m_IsRewardItem ); } public override void Deserialize( GenericReader reader ) { base.Deserialize( reader ); int version = reader.ReadInt(); switch ( version ) { case 1: { m_IsRewardItem = reader.ReadBool(); break; } } } } }
#include <iconv.h> #include <string.h> #include "ass_mp.h" #include "mp_global.h" #include "mp_msg.h" #include "libmpdemux/stheader.h" #include "sub/isdbsubdec.h" #include "libavutil/avstring.h" #include "libavutil/crc.h" #include "libavutil/intreadwrite.h" #undef AV_NOPTS_VALUE #define AV_NOPTS_VALUE ((signed)INT64_C(0x8000000000000000)) #define ISDBSUB_DATA_ID 0x80 #define ISDBSUB_DU_TYPE_TXT 0x20 #define ISDBSUB_UNIT_SEP 0x1F #define <API key> (180 * 1000) #define ISDBSUB_NO_DGID -1 #define ISDBSUB_MAX_LANG 2 /* ARIB TR-B14/B15 */ #define <API key>(format) \ ((format) == ISDBSUB_FMT_960H || (format) == ISDBSUB_FMT_720H) #define LAYOUT_GET_WIDTH(format) \ (((format) == ISDBSUB_FMT_960H || (format) == ISDBSUB_FMT_960V) ? 960 : 720) #define LAYOUT_GET_HEIGHT(format) \ (((format) == ISDBSUB_FMT_960H || (format) == ISDBSUB_FMT_960V) ? 540 : 480) #define MPEGTS_MAX_PTS (((2LL<<33) + 45)/90) #define RGBA(r,g,b,a) (((unsigned)(255 - (a)) << 24) | ((b) << 16) | ((g) << 8) | (r)) static const AVCRC *Crc_table; typedef uint32_t rgba; static rgba Default_clut[128] = { RGBA(0,0,0,255), RGBA(255,0,0,255), RGBA(0,255,0,255), RGBA(255,255,0,255), RGBA(0,0,255,255), RGBA(255,0,255,255), RGBA(0,255,255,255), RGBA(255,255,255,255), //8-15 RGBA(0,0,0,0), RGBA(170,0,0,255), RGBA(0,170,0,255), RGBA(170,170,0,255), RGBA(0,0,170,255), RGBA(170,0,170,255), RGBA(0,170,170,255), RGBA(170,170,170,255), //16-23 RGBA(0,0,85,255), RGBA(0,85,0,255), RGBA(0,85,85,255), RGBA(0,85,170,255), RGBA(0,85,255,255), RGBA(0,170,85,255), RGBA(0,170,255,255), RGBA(0,255,85,255), //24-31 RGBA(0,255,170,255), RGBA(85,0,0,255), RGBA(85,0,85,255), RGBA(85,0,170,255), RGBA(85,0,255,255), RGBA(85,85,0,255), RGBA(85,85,85,255), RGBA(85,85,170,255), //32-39 RGBA(85,85,255,255), RGBA(85,170,0,255), RGBA(85,170,85,255), RGBA(85,170,170,255), RGBA(85,170,255,255), RGBA(85,255,0,255), RGBA(85,255,85,255), RGBA(85,255,170,255), //40-47 RGBA(85,255,255,255), RGBA(170,0,85,255), RGBA(170,0,255,255), RGBA(170,85,0,255), RGBA(170,85,85,255), RGBA(170,85,170,255), RGBA(170,85,255,255), RGBA(170,170,85,255), //48-55 RGBA(170,170,255,255), RGBA(170,255,0,255), RGBA(170,255,85,255), RGBA(170,255,170,255), RGBA(170,255,255,255), RGBA(255,0,85,255), RGBA(255,0,170,255), RGBA(255,85,0,255), //56-63 RGBA(255,85,85,255), RGBA(255,85,170,255), RGBA(255,85,255,255), RGBA(255,170,0,255), RGBA(255,170,85,255), RGBA(255,170,170,255), RGBA(255,170,255,255), RGBA(255,255,85,255), RGBA(255,255,170,255), // 65-127 are caliculated later. }; static const uint8_t * const Default_macro[16] = { "\x1B\x24\x42\x1B\x29\x4A\x1B\x2A\x30\x1B\x2B\x20\x70\x0F\x1B\x7D", "\x1B\x24\x42\x1B\x29\x31\x1B\x2A\x30\x1B\x2B\x20\x70\x0F\x1B\x7D", "\x1B\x24\x42\x1B\x29\x20\x41\x1B\x2A\x30\x1B\x2B\x20\x70\x0F\x1B\x7D", "\x1B\x28\x32\x1B\x29\x34\x1B\x2A\x35\x1B\x2B\x20\x70\x0F\x1B\x7D", "\x1B\x28\x32\x1B\x29\x33\x1B\x2A\x35\x1B\x2B\x20\x70\x0F\x1B\x7D", "\x1B\x28\x32\x1B\x29\x20\x41\x1B\x2A\x35\x1B\x2B\x20\x70\x0F\x1B\x7D", "\x1B\x28\x20\x41\x1B\x29\x20\x42\x1B\x2A\x20\x43\x1B\x2B\x20\x70\x0F\x1B\x7D", "\x1B\x28\x20\x44\x1B\x29\x20\x45\x1B\x2A\x20\x46\x1B\x2B\x20\x70\x0F\x1B\x7D", "\x1B\x28\x20\x47\x1B\x29\x20\x48\x1B\x2A\x20\x49\x1B\x2B\x20\x70\x0F\x1B\x7D", "\x1B\x28\x20\x4A\x1B\x29\x20\x4B\x1B\x2A\x20\x4C\x1B\x2B\x20\x70\x0F\x1B\x7D", "\x1B\x28\x20\x4D\x1B\x29\x20\x4E\x1B\x2A\x20\x4F\x1B\x2B\x20\x70\x0F\x1B\x7D", "\x1B\x24\x42\x1B\x29\x20\x42\x1B\x2A\x30\x1B\x2B\x20\x70\x0F\x1B\x7D", "\x1B\x24\x42\x1B\x29\x20\x43\x1B\x2A\x30\x1B\x2B\x20\x70\x0F\x1B\x7D", "\x1B\x24\x42\x1B\x29\x20\x44\x1B\x2A\x30\x1B\x2B\x20\x70\x0F\x1B\x7D", "\x1B\x28\x31\x1B\x29\x30\x1B\x2A\x4A\x1B\x2B\x20\x70\x0F\x1B\x7D", "\x1B\x28\x4A\x1B\x29\x32\x1B\x2A\x20\x41\x1B\x2B\x20\x70\x0F\x1B\x7D" }; struct b24str_state { int gl; /* index of the group invoked to GL */ int gr; /* index of the group invoked to GR */ int ss; /* flag if in SS2 or SS3. 2:SS2, 3:SS3 */ struct group { unsigned char mb; /* how many bytes one character consists of. */ // code for character sets #define CODE_ASCII ('\x40') #define CODE_ASCII2 ('\x4A') #define CODE_JISX0208 ('\x42') #define CODE_JISX0213_1 ('\x51') #define CODE_JISX0213_2 ('\x50') #define CODE_JISX0201_KATA ('\x49') #define CODE_MOSAIC_C ('\x34') #define CODE_MOSAIC_D ('\x35') #define CODE_EXT ('\x3B') #define CODE_X_HIRA ('\x30') #define CODE_X_HIRA_P ('\x37') #define CODE_X_KATA ('\x31') #define CODE_X_KATA_P ('\x38') #define CODE_X_DRCS_MB ('\x40') #define CODE_X_DRCS_MIN ('\x41') #define CODE_X_DRCS_MAX ('\x4F') #define CODE_X_MACRO ('\x70') unsigned char code; /* character set that this group designates */ } g[4]; }; struct isdbsub_layout { enum isdbsub_format { ISDBSUB_FMT_960H = 0x08, ISDBSUB_FMT_960V, ISDBSUB_FMT_720H, ISDBSUB_FMT_720V, } format; int is_profile_c; // profile C: "1seg". see ARIB TR-B14 3-4 // clipping area. struct disp_area { int x, y; int w, h; } display_area; // for tracking pen position int font_size; // valid values: {16, 20, 24, 30, 36} (TR-B14/B15) struct fscale { // in [percent] int fscx, fscy; } font_scale; // 1/2x1/2, 1/2*1, 1*1, 1*2, 2*1, 2*2 struct spacing { int col, row; } cell_spacing; // internal use for tracking pen position/line break. // Although texts are laid out by libass, // we need to track pen position by ourselves // in order to calculate line breaking positions and charcter/line spacing. int prev_char_sep; int prev_line_desc; int prev_line_bottom; // offset from display_area.y, not from top-margin. int line_desc; int linesep_upper; int line_height; int line_width; // pen position x int prev_break_idx; // ctx->text.buf[prev_break_idx] holds the previous "\N" int shift_baseline; // special case where baseline should be shifted down ? int block_offset_h; // text[0].hspacing / 2 int block_offset_v; // line[0].lspacing_upper int repeat_count; // -1: none, 0: until EOL, 1...i: repeat the next char i times int in_combining; // bool struct scroll_param { enum {SCROLL_DIR_NONE, SCROLL_DIR_COLUMN, SCROLL_DIR_ROW} direction; int rollout; // bool int speed; // in pixel/sec } scroll; }; typedef struct isdbsub_state { int auto_display; // bool. forced to be displayed w/o user interaction int rollup_mode; // bool uint8_t need_init; // bool uint8_t clut_high_idx; // color = default_clut[high_idx << 8 | low_idx] uint32_t fg_color; uint32_t bg_color; uint32_t mat_color; struct isdbsub_layout layout_state; struct b24str_state text_state; } ISDBSubState; typedef struct ISDBSubContext { int last_mngmnt_id; // "data group id" of the last subtitle management data int64_t last_mngmnt_pts; // time when the last mgmnt data was received int64_t pts; int64_t duration; enum { ISDBSUB_TMD_FREE, <API key>, ISDBSUB_TMD_OFFSET } timing_mode; struct timecode { int hour, min, sec, ms; } offset, start; // currently unused. ISDBSubState default_states[ISDBSUB_MAX_LANG]; int lang_tag; // language tag of the currently decoding subtitle text data ISDBSubState current_state; //modified default_state[lang_tag] iconv_t iconv; struct my_str { char *buf; size_t len; size_t used; size_t txt_tail; // tail of the text, excluding trailing control sequences. } text; // for output int is_style_inited; char *script_info; char *events; } ISDBSubContext; struct margins { int l, r, v; }; static void memdump(int level, const char *buf, int buf_size) { int i; for (i=0; i < buf_size; i++) { mp_msg(MSGT_DECSUB, level, "%02hhx ", buf[i]); if (i % 16 == 15) mp_msg(MSGT_DECSUB, level, "\n"); } if (i % 16) mp_msg(MSGT_DECSUB, level, "\n"); } static char *my_astrconcat(char *a, char *b) { char *ret; if (a == NULL) return b ? strdup(b) : NULL; if (b == NULL) return a; ret = av_asprintf("%s%s", a, b); free(a); return ret; } static char *pts_to_str(int64_t t, char *buf) { int ms10, sec, min, hour; if (t == AV_NOPTS_VALUE) return "NOPTS"; ms10 = (t % 1000) / 10; t /= 1000; sec = t % 60; t /= 60; min = t % 60; t /= 60; hour = t; snprintf(buf, 13, "%02d:%02d:%02d.%02d", hour, min, sec, ms10); return buf; } // NOTE: state->layout_state.format must be set before calling this func. static void init_layout(struct isdbsub_layout *l) { l->font_size = 36; l->display_area.x = 0; l->display_area.y = 0; switch (l->format) { case ISDBSUB_FMT_960H: l->display_area.w = 960; l->display_area.h = 540; l->cell_spacing.col = 4; l->cell_spacing.row = 24; break; case ISDBSUB_FMT_960V: l->display_area.w = 960; l->display_area.h = 540; l->cell_spacing.col = 12; l->cell_spacing.row = 24; break; case ISDBSUB_FMT_720H: l->display_area.w = 720; l->display_area.h = 480; l->cell_spacing.col = 4; l->cell_spacing.row = 16; break; case ISDBSUB_FMT_720V: l->display_area.w = 720; l->display_area.h = 480; l->cell_spacing.col = 8; l->cell_spacing.row = 24; break; } // profile C uses a fixed format, // which does not define specific position or size and // just requires to display texts in either 16x3 or 12x4 characters. // we use ISDBSUB_FMT_960H for the base format. if (l->is_profile_c) { l->display_area.x = 160; l->display_area.y = 360; l->display_area.w = 640; l->display_area.h = 180; } } static void reset_state(ISDBSubState *state) { struct isdbsub_layout *l = &state->layout_state; struct b24str_state *s = &state->text_state; state->need_init = 1; state->clut_high_idx = 0; state->fg_color = Default_clut[7]; // white state->bg_color = Default_clut[8]; // translucent state->mat_color = Default_clut[8]; // FIXME: should be set in init_layout()? l->block_offset_h = l->cell_spacing.col / 2; l->block_offset_v = l->cell_spacing.row / 2; l->font_scale.fscx = 100; l->font_scale.fscy = 100; l->prev_char_sep = 0; l->prev_line_desc = 0; l->prev_line_bottom = 0; // 0 means blcok_offset & pen_pos. are not defined yet. l->line_height = 0; l->line_width = 0; l->line_desc = 0; l->linesep_upper = 0; l->prev_break_idx = 0; l->shift_baseline = 0; l->repeat_count = -1; l->in_combining = 0; l->scroll.direction = SCROLL_DIR_NONE; s->gl = 0; s->gr = 2; s->ss = 0; // not in SS{2,3} s->g[0].mb = 2; s->g[0].code = CODE_JISX0208; s->g[1].mb = 1; s->g[1].code = CODE_ASCII; s->g[2].mb = 1; s->g[2].code = CODE_X_HIRA; s->g[3].mb = 1; s->g[3].code = CODE_X_MACRO; // profile C uses different default. if (l->is_profile_c) { s->g[3].mb = 1; s->g[3].code = CODE_X_DRCS_MIN; s->gl = 3; s->gr = 0; } } static void get_margins(ISDBSubContext *ctx, struct margins *m) { struct isdbsub_layout *lstate = &ctx->current_state.layout_state; if (<API key>(lstate->format)) { m->l = lstate->display_area.x + lstate->block_offset_h; m->r = LAYOUT_GET_WIDTH(lstate->format) - (lstate->display_area.x + lstate->display_area.w); m->v = lstate->display_area.y + lstate->block_offset_v; if (lstate->is_profile_c) m->v = 0; } else { m->l = lstate->display_area.y + lstate->block_offset_v; m->r = LAYOUT_GET_HEIGHT(lstate->format) - (lstate->display_area.y + lstate->display_area.h); m->v = LAYOUT_GET_WIDTH(lstate->format) - (lstate->display_area.x + lstate->display_area.w) + lstate->block_offset_h; } } static void clear_text(ISDBSubContext *ctx) { ctx->text.used = 0; ctx->text.txt_tail = 0; } static void fixup_linesep(ISDBSubContext *ctx); static void append_event(ISDBSubContext *ctx) { ISDBSubState *state = &ctx->current_state; struct isdbsub_layout *l = &state->layout_state; char start[16], end[16]; struct margins m; char effect[36], clipping[64]; char *dialog; char c0 = 0; if (ctx->pts == AV_NOPTS_VALUE || ctx->text.buf == NULL || !ctx->text.used) return; fixup_linesep(ctx); mp_msg(MSGT_DECSUB, MSGL_DBG2, "append_event: %lu\n", ctx->text.used); #if 0 if (state->rollup_mode) ctx->duration = l->line_count * 5 * 1000; // FIXME else if (l->scroll.direction != SCROLL_DIR_NONE && l->scroll.speed > 0) ctx->duration = (display_area.w + (rollout ? text_box.w : 0)) * 1000 / scroll.speed * (rollout ? 0 : 5000); #endif if (ctx->duration <= 0) ctx->duration = 5000; else if (ctx->duration < 100) ctx->duration = 100; pts_to_str(ctx->pts, start); pts_to_str(ctx->pts + ctx->duration, end); effect[0] = '\0'; get_margins(ctx, &m); if (state->rollup_mode) { if (<API key>(ctx->current_state.layout_state.format)) av_strlcatf(effect, sizeof(effect), "Scroll up;;;"); else av_strlcatf(effect, sizeof(effect), "Banner;;;;"); // LtoR } else if ((<API key>(l->format) && l->scroll.direction == SCROLL_DIR_COLUMN) || (!<API key>(l->format) && l->scroll.direction == SCROLL_DIR_ROW)) av_strlcatf(effect, sizeof(effect), "Banner;%d;%d;0;%d", 1000 / l->scroll.speed, (l->scroll.direction == SCROLL_DIR_ROW), !l->scroll.rollout); else if (l->scroll.direction != SCROLL_DIR_NONE) av_strlcatf(effect, sizeof(effect), "Scroll up;%d;%d;%d;%d", <API key>(l->format) ? m.v : m.l, l->display_area.y + l->display_area.h, 1000 / l->scroll.speed, !l->scroll.rollout); clipping[0] = '\0'; av_strlcatf(clipping, sizeof(clipping), "{\\clip(%d,%d,%d,%d)}", l->display_area.x, l->display_area.y, l->display_area.x + l->display_area.w, l->display_area.y + l->display_area.h); // control sequences for the next event may be appended. if (ctx->text.txt_tail != ctx->text.used) { c0 = ctx->text.buf[ctx->text.txt_tail]; ctx->text.buf[ctx->text.txt_tail] = '\0'; } dialog = av_asprintf("Dialogue: %s,%s,%s,%d,%d,%d,%s,%s%s\n", l->is_profile_c ? "prof_c" : (<API key>(l->format) ? "hstyle" : "vstyle"), pts_to_str(ctx->pts, start), pts_to_str(ctx->pts + ctx->duration, end), m.l, m.r, m.v, effect, clipping, ctx->text.buf); if (ctx->events) { ctx->events = my_astrconcat(ctx->events, dialog); free(dialog); } else ctx->events = dialog; ctx->pts += ctx->duration; ctx->duration = 0; state->need_init = 1; if (ctx->text.txt_tail != ctx->text.used) { ctx->text.buf[ctx->text.txt_tail] = c0; memmove(ctx->text.buf, ctx->text.buf + ctx->text.txt_tail, ctx->text.used - ctx->text.txt_tail); ctx->text.used -= ctx->text.txt_tail; ctx->text.txt_tail = 0; } } static void reserve_buf(ISDBSubContext *ctx, size_t len) { size_t blen; if (ctx->text.len >= ctx->text.used + len) return; blen = ((ctx->text.used + len + 127) >> 7) << 7; ctx->text.buf = av_realloc(ctx->text.buf, blen); if (!ctx->text.buf) { mp_msg(MSGT_DECSUB, MSGL_WARN, "out of memory for ctx->text.\n"); return; } ctx->text.len = blen; mp_msg(MSGT_DECSUB, MSGL_V, "expanded ctx->text(%lu)\n", blen); } static int append_str(ISDBSubContext *ctx, const char *str) { size_t tlen = strlen(str); reserve_buf(ctx, tlen + 1); // +1 for terminating '\0' memcpy(ctx->text.buf + ctx->text.used, str, tlen); ctx->text.used += tlen; ctx->text.buf[ctx->text.used] = '\0'; return 0; } static int prepend_str(ISDBSubContext *ctx, const char *str) { struct isdbsub_layout *ls = &ctx->current_state.layout_state; size_t tlen = strlen(str); reserve_buf(ctx, tlen + 1); // +1 for terminating '\0' memmove(ctx->text.buf + tlen, ctx->text.buf, ctx->text.used); memcpy(ctx->text.buf, str, tlen); if (ls->prev_break_idx) ls->prev_break_idx += tlen; ctx->text.used += tlen; ctx->text.buf[ctx->text.used] = '\0'; return 0; } static void do_output(ISDBSubContext *ctx, uint8_t **outbufp, int *osize) { int header = 0; if (!ctx->script_info && !ctx->events) return; mp_msg(MSGT_DECSUB, MSGL_DBG2, "making output.\n"); if (ctx->script_info) { *outbufp = my_astrconcat(*outbufp, ctx->script_info); free(ctx->script_info); ctx->script_info = NULL; header = 1; } if (!ctx->is_style_inited) { // once #define STYLE_PARAMS_FONT \ ":lang=ja:charset=3000:spacing=dual" #define STYLE_PARAMS_COMMON \ "&H00FFFFFF, &HFF000000, &HFF000000, &HFF000000, 1, 0, 0, 1\n" *outbufp = my_astrconcat(*outbufp, "[V4+ Styles]\n" "Format: Name, Fontname, Fontsize, Alignment, " "PrimaryColour, OutlineColour, BackColour, ClippingColour, " "BorderStyle, Outline, Shadow, <API key>\n" "Style: vstyle, @" STYLE_PARAMS_FONT ", 36, 9, " STYLE_PARAMS_COMMON "Style: hstyle, " STYLE_PARAMS_FONT ", 36, 7, " STYLE_PARAMS_COMMON "Style: prof_c, " STYLE_PARAMS_FONT ", 36, 2, " STYLE_PARAMS_COMMON); #undef STYLE_PARAMS_FONT #undef STYLE_PARAMS_COMMON ctx->is_style_inited = 1; header = 1; } if (ctx->events || header) { if (header) *outbufp = my_astrconcat(*outbufp, "\n[Events]\n" "Format: Style, Start, End, MarginL, MarginR, MarginV, " "Effect, Text\n"); *outbufp = my_astrconcat(*outbufp, ctx->events); free(ctx->events); ctx->events = NULL; } *osize = strlen(*outbufp); mp_msg(MSGT_DECSUB, MSGL_V, "ass output:\n%s\n", *outbufp); } static void set_format(ISDBSubContext *ctx) { struct isdbsub_layout *ls = &ctx->current_state.layout_state; clear_text(ctx); reset_state(&ctx->current_state); free(ctx->script_info); ctx->script_info = av_asprintf("[Script Info]\nScript Type: v4.00+\n" "PlayDepth: 24\nPlayResX: %d\nPlayResY: %d\nLanguage: ja\n" "WrapStyle: 2\nStreamingMode: 1\n\n", LAYOUT_GET_WIDTH(ls->format), LAYOUT_GET_HEIGHT(ls->format)); } static void set_color(ISDBSubContext *ctx, int whatcolor, uint32_t color) { char fmt[32]; if (whatcolor < 1 || whatcolor > 5) return; fmt[0] = '\0'; av_strlcatf(fmt, sizeof(fmt), "{\\%dc&H%06X&\\%da&H%02X&}", whatcolor, color & 0xffffff, whatcolor, color >> 24); append_str(ctx, fmt); mp_msg(MSGT_DECSUB, MSGL_DBG2, "(%d)-th color set to 0x%08X.\n", whatcolor, color); } static void set_font_scale(ISDBSubContext *ctx) { struct isdbsub_layout *ls = &ctx->current_state.layout_state; char fmt[24]; fmt[0] = '\0'; av_strlcatf(fmt, sizeof(fmt), "{\\fscx%d\\fscy%d}", ls->font_scale.fscx, ls->font_scale.fscy); append_str(ctx, fmt); mp_msg(MSGT_DECSUB, MSGL_DBG2, "font scale: (%d, %d)\n", ls->font_scale.fscx, ls->font_scale.fscy); } static const uint8_t *get_csi_params(const uint8_t *q, unsigned int *p1, unsigned int *p2) { if (!p1) return NULL; *p1 = 0; for (; *q >= 0x30 && *q <= 0x39; q++) { *p1 *= 10; *p1 += *q - 0x30; } if (!p2) return q; *p2 = 0; if (*q != 0x20 && *q != 0x3B) return NULL; for (q++; *q >= 0x30 && *q <= 0x39; q++) { *p2 *= 10; *p2 += *q - 0x30; } return q; } // called at the start of sub-text or after each SWF/SDP/SDF occurrences. // Define some style overrides at the start of Dialog line outputs, // which are not defined in [style] nor ASS default. // Note that SDP/SDF don't reset the other style parameters. // Note2: multiple calls of this func safely overwrite the previous defs. static void setup_line_head(ISDBSubContext *ctx) { ISDBSubState *state = &ctx->current_state; struct isdbsub_layout *ls = &state->layout_state; char item[256]; int cscale; if (<API key>(ls->format)) cscale = ls->font_scale.fscx; else cscale = ls->font_scale.fscy; item[0] = '\0'; // lsp will be corrected later. // Note: ASS scales \fsp by font scale of the preceeding char. av_strlcatf(item, sizeof(item), "{\\lsp0\\fsp%d}", ls->cell_spacing.col); ls->prev_char_sep = ls->cell_spacing.col * cscale / 100; av_strlcatf(item, sizeof(item), "{\\fs%d}", ls->font_size); if (ls->font_scale.fscx != 100) av_strlcatf(item, sizeof(item), "{\\fscx%d}", ls->font_scale.fscx); if (ls->font_scale.fscy != 100) av_strlcatf(item, sizeof(item), "{\\fscy%d}", ls->font_scale.fscy); if (state->fg_color != 0x00FFFFFF) { if ((state->fg_color & 0xFFFFFF) != 0xFFFFFF) av_strlcatf(item, sizeof(item), "{\\1c&H%06X&}", state->fg_color & 0xFFFFFF); if ((state->fg_color >> 24) != 0x00) av_strlcatf(item, sizeof(item), "{\\1a&H%02X&}", state->fg_color >> 24); } if (state->bg_color != 0xFF000000) { if ((state->bg_color & 0xFFFFFF) != 0) av_strlcatf(item, sizeof(item), "{\\4c&H%06X&}", state->bg_color & 0xFFFFFF); if ((state->bg_color >> 24) != 0xFF) av_strlcatf(item, sizeof(item), "{\\4a&H%02X&}", state->bg_color >> 24); } if (state->mat_color != 0xFF000000) { if ((state->mat_color & 0xFFFFFF) != 0) av_strlcatf(item, sizeof(item), "{\\5c&H%06X&}", state->mat_color & 0xFFFFFF); if ((state->mat_color >> 24) != 0xFF) av_strlcatf(item, sizeof(item), "{\\5a&H%02X&}", state->mat_color >> 24); } prepend_str(ctx, item); state->need_init = 0; } static void advance_by_pixels(ISDBSubContext *ctx, int csp) { struct isdbsub_layout *ls = &ctx->current_state.layout_state; int cscale; int csep_orig; char tmp[32]; if (<API key>(ls->format)) cscale = ls->font_scale.fscx; else cscale = ls->font_scale.fscy; csep_orig = ls->cell_spacing.col * cscale / 100; tmp[0] = '\0'; av_strlcatf(tmp, sizeof(tmp), "{\\fsp%d}\xe2\x80\x8b{\\fsp%d}", csp * 100 / cscale, ls->cell_spacing.col); append_str(ctx, tmp); ls->line_width += csp; ls->prev_char_sep = csep_orig; mp_msg(MSGT_DECSUB, MSGL_DBG2, "advanced %d pixel using fsp.\n", csp); } static void do_line_break(ISDBSubContext *ctx); // move pen position to (col, row) relative to display area's top left. // Note 1: In vertical layout, coordinates are rotated 90 deg. // on the display area's top right. // Note 2: the cell includes line/char spacings in both sides. static void move_penpos(ISDBSubContext *ctx, int col, int row) { struct isdbsub_layout *ls = &ctx->current_state.layout_state; int csp_l, col_ofs; int cur_bottom; int cell_height; int cell_desc; mp_msg(MSGT_DECSUB, MSGL_DBG2, "move pen pos. to (%d, %d).\n", col, row); if (<API key>(ls->format)) { // convert pen pos. to upper left of the cell. cell_height = (ls->font_size + ls->cell_spacing.row) * ls->font_scale.fscy / 100; if (ls->font_scale.fscy == 200) cell_desc = ls->cell_spacing.row / 2; else cell_desc = ls->cell_spacing.row * ls->font_scale.fscy / 200; row -= cell_height; csp_l = ls->cell_spacing.col * ls->font_scale.fscx / 200; if (ls->line_width == 0 && ls->prev_line_bottom == 0) ls->block_offset_h = csp_l; col_ofs = ls->block_offset_h; } else { cell_height = (ls->font_size + ls->cell_spacing.row) * ls->font_scale.fscx / 100; cell_desc = cell_height / 2; row -= cell_height - cell_desc; csp_l = ls->cell_spacing.col * ls->font_scale.fscy / 200; if (ls->line_width == 0 && ls->prev_line_bottom == 0) ls->block_offset_v = csp_l; col_ofs = ls->block_offset_v; } cur_bottom = ls->prev_line_bottom + ls->linesep_upper + ls->line_height + ls->line_desc; // allow adjusting +- cell_height/2 at maximum // to align to the current line bottom. if (row + cell_height / 2 > cur_bottom) { // (col, row) is below the current line bottom do_line_break(ctx); // ls->prev_line_bottom == cur_bottom ls->linesep_upper = row + cell_height - cell_desc - ls->prev_line_bottom; ls->line_height = 0; advance_by_pixels(ctx, col + csp_l - col_ofs); } else if (row + cell_height * 3 / 2 > cur_bottom && col + csp_l > col_ofs + ls->line_width) { // append to the current line... advance_by_pixels(ctx, col + csp_l - (col_ofs + ls->line_width)); } else { mp_msg(MSGT_DECSUB, MSGL_INFO, "backward move not supported.\n"); return; } } static void set_position(ISDBSubContext *ctx, unsigned int p1, unsigned int p2) { struct isdbsub_layout *ls = &ctx->current_state.layout_state; int cw, ch; int col, row; if (<API key>(ls->format)) { cw = (ls->font_size + ls->cell_spacing.col) * ls->font_scale.fscx / 100; ch = (ls->font_size + ls->cell_spacing.row) * ls->font_scale.fscy / 100; // pen position is at bottom left col = p2 * cw; row = p1 * ch + ch; } else { cw = (ls->font_size + ls->cell_spacing.col) * ls->font_scale.fscy / 100; ch = (ls->font_size + ls->cell_spacing.row) * ls->font_scale.fscx / 100; // pen position is at upper center, // but in -90deg rotated coordinates, it is at middle left. col = p2 * cw; row = p1 * ch + ch / 2; } move_penpos(ctx, col, row); } static void forward_position(ISDBSubContext *ctx, int rows, int cols); static const uint8_t *proc_ctl(ISDBSubContext *ctx, const uint8_t *buf, int buf_size) { ISDBSubState *state = &ctx->current_state; struct b24str_state *ts = &state->text_state; struct isdbsub_layout *ls = &state->layout_state; uint8_t code; unsigned int p1, p2; int i, mb; const uint8_t *q; while (buf_size > 0) { code = buf[0]; if ((code & 0x60) != 0) break; buf++; buf_size p1 = p2 = 0; switch (code) { case 0x00: // NULL break; // cursor case 0x09: // APF // append a space forward_position(ctx, 0, 1); break; case 0x16: // PAPF (0x40..0x7F) if (buf_size < 1) return NULL; p1 = buf[0] & 0x3F; buf++; buf_size forward_position(ctx, 0, p1); break; case 0x0D: // APR forward_position(ctx, 1, 0); mp_msg(MSGT_DECSUB, MSGL_DBG2, "explicit line break.\n"); break; case 0x1C: // APS (0x40..0x7F, 0x40..0x7F) if (buf_size < 2) return NULL; p1 = buf[0] & 0x3F; p2 = buf[1] & 0x3F; buf += 2; buf_size -= 2; mp_msg(MSGT_DECSUB, MSGL_DBG2, "aps: (%d, %d).\n", p1, p2); set_position(ctx, p1, p2); break; case 0x0C: if (!state->rollup_mode) { init_layout(ls); reset_state(state); clear_text(ctx); mp_msg(MSGT_DECSUB, MSGL_DBG2, "screen cleared.\n"); } break; // iso2022 text state case 0x0E: // LS1 ts->ss = 0; ts->gl = 1; break; case 0x0F: // LS0 ts->ss = 0; ts->gl = 0; break; case 0x19: // SS2 ts->ss = 2; break; case 0x1D: // SS3 ts->ss = 3; break; case 0x1B: // ESC(....) if (buf_size < 1) return NULL; p1 = buf[0]; buf++; buf_size mb = 1; switch (p1) { case 0x6E: // LS2 case 0x6F: // LS3 ts->gl = 2 + (p1 & 0x01); break; case 0x7E: // LS1R case 0x7D: // LS2R case 0x7C: // LS3R ts->gr = 0x7F - p1; break; // 0x28-0x2B (F) designate 1B set to G0-G3 // 0x24 [0x29-2B] (F) designate 2B set to G0-G3 // 0x28-0x2B 0x20 (F) designate 1B DRCS/MACRO to G0-G3 // 0x24 0x28-0x2B 0x20 (F) designate 2B DRCS to G0-G3 case 0x24: if (buf_size < 1) return NULL; mb = 2; p1 = buf[0]; if (p1 >= 0x28 && p1 <= 0x2B) { buf++; buf_size } else p1 = 0x28; // fall through case 0x28: case 0x29: case 0x2A: case 0x2B: if (buf_size < 1) return NULL; p2 = buf[0]; buf++; buf_size if (p2 == 0x20) { if (buf_size < 1) return NULL; p2 = buf[0]; buf++; buf_size } ts->g[p1 - 0x28].mb = mb; ts->g[p1 - 0x28].code = p2; break; default: mp_msg(MSGT_DECSUB, MSGL_V, "unknown escape sequence: 0x%02hhx\n", p1); } break; // color case 0x80: // BKF case 0x81: // RDF case 0x82: // GRF case 0x83: // YLF case 0x84: // BLF case 0x85: // MGF case 0x86: // CNF case 0x87: // WHF p1 = (state->clut_high_idx << 4) | (code & 0x0F); state->fg_color = Default_clut[p1]; set_color(ctx, 1, state->fg_color); break; case 0x90: // COL(0x48..0x7F) or (0x20, 0x40..0x4F) if (buf_size < 1) return NULL; p1 = buf[0]; buf++; buf_size if (p1 == 0x20) { if (buf_size < 1) return NULL; state->clut_high_idx = (buf[0] & 0x0F); buf++; buf_size break; } p2 = (state->clut_high_idx << 4) | (p1 & 0x0F); if ((p1 & 0xF0) == 0x40) { state->fg_color = Default_clut[p2]; set_color(ctx, 1, state->fg_color); } break; // character size case 0x88: // SSZ ls->font_scale.fscx = 50; ls->font_scale.fscy = 50; set_font_scale(ctx); break; case 0x89: // MSZ ls->font_scale.fscx = 50; ls->font_scale.fscy = 100; set_font_scale(ctx); break; case 0x8A: // NSZ ls->font_scale.fscx = 100; ls->font_scale.fscy = 100; set_font_scale(ctx); break; case 0x8B: // SZX ({0x41,0x44,0x45}) if (buf_size < 1) return NULL; p1 = buf[0]; buf++; buf_size ls->font_scale.fscx = 100; ls->font_scale.fscy = 100; if ((p1 & 0xFB) == 0x41) ls->font_scale.fscy = 200; if ((p1 & 0xFE) == 0x44) ls->font_scale.fscx = 200; set_font_scale(ctx); break; case 0x98: // RPC (0x40..0x7F) if (buf_size < 1) return NULL; p1 = buf[0] & 0x3F; buf++; buf_size ls->repeat_count = p1; mp_msg(MSGT_DECSUB, MSGL_DBG2, "repeat char %d times.\n", p1); break; case 0x99: // SPL append_str(ctx, "{\\u0}"); break; case 0x9A: // STL append_str(ctx, "{\\u1}"); break; case 0x9B: // CSI for (i = 0; i < buf_size; i++) if (buf[i] >= 0x40 && buf[i] <= 0x6F) break; if (i == buf_size) { buf += buf_size; buf_size = 0; break; } switch (buf[i]) { // SWF1 (0x30..0x39, ...., 0x20, 0x53) // -SWF2 ({0x38,0x3F?}, 0x3B, 0x30..0x32, 0x3B, 0x30..0x39, ...., [0x3B, 0x30..0x39,...,] 0x20, 0x53) case 0x53: q = get_csi_params(buf, &p1, NULL); if (!q || *q != 0x20 || p1 < 7 || p1 > 10) break; ls->format = ISDBSUB_FMT_960H + (p1 - 7); set_format(ctx); // calls reset_state, thus sate->need_init = 1 mp_msg(MSGT_DECSUB, MSGL_DBG2, "new format: %d\n", ls->format); break; // SDF (0x30..0x39,..., 0x3B, 0x30..0x39,..., 0x20, 0x56) case 0x56: q = get_csi_params(buf, &p1, &p2); if (!q || *q != 0x20) break; ls->display_area.w = p1; ls->display_area.h = p2; state->need_init = 1; mp_msg(MSGT_DECSUB, MSGL_DBG2, "new disp. area size: (%u, %u)\n", p1, p2); break; // SDP (0x30..0x39,..., 0x3B, 0x30..0x39,..., 0x20, 0x5F) case 0x5F: q = get_csi_params(buf, &p1, &p2); if (!q || *q != 0x20) break; ls->display_area.x = p1; ls->display_area.y = p2; state->need_init = 1; mp_msg(MSGT_DECSUB, MSGL_DBG2, "new disp. area pos: (%u, %u)\n", p1, p2); break; // RCS (0x30..0x39,...., 0x20, 0x6E) case 0x6E: q = get_csi_params(buf, &p1, NULL); if (!q || *q != 0x20 || p1 > 15) break; state->mat_color = Default_clut[state->clut_high_idx << 4 | p1]; set_color(ctx, 5, state->mat_color); break; // SSM (0x30..0x39,..., 0x3B, 0x30..0x39,..., 0x20, 0x57) case 0x57: q = get_csi_params(buf, &p1, &p2); if (!q || *q != 0x20 || p1 != p2) break; if (p1 == 16 || p1 == 20 || p1 == 24 || p1 == 30 || p1 == 36) { char fs[8]; ls->font_size = p1; fs[0] = '\0'; av_strlcatf(fs, sizeof(fs), "{\\fs%d}", p1); append_str(ctx, fs); if (ls->line_width != 0) ls->shift_baseline = 0; mp_msg(MSGT_DECSUB, MSGL_DBG2, "font size:%d\n", p1); } break; // SHS (0x30..0x39,..., 0x20, 0x58) // SVS (0x30..0x39,..., 0x20, 0x59) case 0x58: case 0x59: q = get_csi_params(buf, &p1, NULL); if (!q || *q != 0x20) break; if (code == 0x58) ls->cell_spacing.col = p1; else { ls->cell_spacing.row = p1; if (ls->line_width != 0) ls->shift_baseline = 0; } mp_msg(MSGT_DECSUB, MSGL_DBG2, "%c-spacing:%u.\n", (code == 0x58) ? 'h' : 'v', p1); // no output here. automatically inserted later in proc_char(). break; // ORN (0x30, 0x20, 0x63) or (0x31, 0x3B, 0x30..0x39 * 4, 0x20, 0x63) case 0x63: q = get_csi_params(buf, &p1, &p2); if (!q) break; if (p1 == 0) // no ornaments append_str(ctx, "{\\bord0\\3a&HFF&\\3c&H000000&}"); else if (p1 == 1 && *q == 0x20) { // outline int idx = (p2 / 100) << 4 | (p2 % 100); if (idx < 0 || idx > 127) break; append_str(ctx, "{\\bord1}"); set_color(ctx, 3, Default_clut[idx]); } break; // SCR (0x30..0x34, 0x3B, 0x30..0x39..., 0x20, 0x67) case 0x67: q = get_csi_params(buf, &p1, &p2); if (!q || *q != 0x20 || p1 > 4) break; if (p1 != 0) clear_text(ctx); ls->scroll.direction = (p1 + 1) / 2; ls->scroll.rollout = (p1 == 2 || p1 == 4); if (p2 == 0) p2 = 1; ls->scroll.speed = p2; break; // ACPS (0x30..0x39,...., 0x3B, 0x30..0x39,...., 0x20, 0x61) case 0x61: q = get_csi_params(buf, &p1, &p2); if (!q || *q != 0x20) break; if ((signed) p1 < ls->display_area.x || (signed) p1 >= ls->display_area.x + ls->display_area.w || (signed) p2 < ls->display_area.y || (signed) p2 >= ls->display_area.y + ls->display_area.h) { mp_msg(MSGT_DECSUB, MSGL_WARN, "invalid parameters (%u, %u) in ACPS.\n", p1, p2); break; } if (<API key>(ls->format)) move_penpos(ctx, p1 - ls->display_area.x, p2 - ls->display_area.y); else move_penpos(ctx, ls->display_area.w - (p1 - ls->display_area.x), p2 - ls->display_area.y); break; // -CCC ({0x30, 0x32..0x34}, 0x20, 0x54) // -PLD (0x5B) // -PLU (0x5C) // -GSM (0x30..0x39,..., 0x3B, 0x30..0x39,..., 0x20, 0x42) // -GAA ({0x30,0x31}, 0x20, 0x5D) // -SRC (0x30..0x33, 0x3B, 0x30..0x39 * 4, 0x20, 0x5E) // -TCC (0x30..0x3A, 0x3B, 0x30..0x33, 0x3B, 0x30..0x39,..., 0x20, 0x62) // -CFS (0x30..0x39,..., 0x20, 0x65) // -MDF (0x30..0x33, 0x20, 0x64) // -XCS (0x30..0x31, 0x20, 0x66) // PRA (0x30..0x39,..., 0x20, 0x68) // -ACS (0x30, 0x20, 0x69)....(0x9B, 0x31,0x20,0x69) {(0x9B,{0x32,0x34},0x20,0x69)...(0x9B,{0x33,0x35},0x20, 0x69)}+ // -SCS (0x6F)(0x9B,...).....(0x9B,0x6F) default: mp_msg(MSGT_DECSUB, MSGL_V, "invalid/un-supported CSI. terminating code:0x%02hhx len:%d\n", buf[i], i); } i++; buf += i; buf_size -= i; break; // non-supported control codes case 0x9D: // -TIME (0x20, 0x40..0x7F) or (0x28, 0x40..0x43) or (0x29, ...., 0x40..0x43) if (buf_size < 2) return NULL; if (buf[0] == 0x20 || buf[0] == 0x28) { if (buf[0] == 0x20) { // wait. copy & split out as another event ctx->duration = (buf[1] - 0x40) * 100; append_event(ctx); } buf += 2; buf_size -= 2; break; } if (buf[0] != 0x29) return NULL; while (buf_size > 0 && (buf[0] & 0xFC) != 0x40) { buf++; buf_size } if ((buf[0] & 0xFC) != 0x40) return NULL; // buf_size > 0 buf++; buf_size mp_msg(MSGT_DECSUB, MSGL_V, "un-supported control code: 0x%02hhx\n", code); break; case 0x95: // -MACRO (0x4F) or (0x40..0x41, 0x21..0x7E, ...., 0x95, 0x4F) if (buf_size < 1) return NULL; if (buf[0] == 0x40 || buf[0] == 0x41) { while (buf_size > 1 && buf[0] != 0x95) { buf++; buf_size } if (buf[0] != 0x95) return NULL; // buf_size > 1 buf++; buf_size } if (buf[0] != 0x4F) return NULL; buf++; buf_size mp_msg(MSGT_DECSUB, MSGL_V, "un-supported control code: 0x%02hhx\n", code); break; case 0x92: // -CDC ({0x40,0x4F}) or (0x20, 0x40..0x4A) if (buf_size >= 2 && buf[0] == 0x20) { buf++; buf_size } // fall through case 0x91: // -FLC ({0x40,0x47,0x4F}) case 0x93: // -POL (0x40..0x42) case 0x94: // -WHM ({0x40,0x44,0x45}) case 0x97: // -HLC (0x40..0x4F) if (buf_size < 1) return NULL; buf++; buf_size // fall through case 0x08: // APB case 0x0A: // APD case 0x0B: // -APU default: // un-used/unknown control codes mp_msg(MSGT_DECSUB, MSGL_V, "unknown/ignored control code: 0x%02hhx\n", code); break; } } return buf; } static const uint8_t * const combining1[] = { "\xcc\x81", // U+0301 combinng accute accent "\xcc\x80", // U+0300 combining grave accent "\xcc\x88", // U+0308 combining diaeresis "\xcc\x82", // U+0302 combining circumflex accent "\xcc\x84", // U+0304 combining macron "\xcc\xb2", // U+0332 combining low line }; static const uint8_t * const hira_symbols[9] = { "\xe3\x82\x9d" /* U+309D */, "\xe3\x82\x9e" /* U+309E */, "\xe3\x83\xbc" /* U+30FC */, "\xe3\x80\x82" /* U+3002 */, "\xe3\x80\x8c" /* U+300C */, "\xe3\x80\x8d" /* U+300D */, "\xe3\x80\x81" /* U+3001 */, "\xe3\x83\xbb" /* U+30FB */, }; static const uint8_t * const kata_symbols[9] = { "\xe3\x83\xbd" /* U+30FD */, "\xe3\x83\xbe" /* U+30FE */, "\xe3\x83\xbc" /* U+30FC */, "\xe3\x80\x82" /* U+3002 */, "\xe3\x80\x8c" /* U+300C */, "\xe3\x80\x8d" /* U+300D */, "\xe3\x80\x81" /* U+3001 */, "\xe3\x83\xbb" /* U+30FB */, }; /* ARIB STD B24 table.7-11 -> UTF-8 */ static const uint8_t * const trans_ext85[] = { /* 1- 10 */ "\xe3\x90\x82", "\xf0\xa0\x85\x98", "\xe4\xbb\xbd", "\xe4\xbb\xbf", "\xe4\xbe\x9a", "\xe4\xbf\x89", "\xe5\x82\x9c", "\xe5\x84\x9e", "\xe5\x86\xbc", "\xe3\x94\x9f", /* 11- 20 */ "\xe5\x8c\x87", "\xe5\x8d\xa1", "\xe5\x8d\xac", "\xe5\xa9\xb9", "\xf0\xa0\xae\xb7", "\xe5\x91\x8d", "\xe5\x92\x96", "\xe5\x92\x9c", "\xe5\x92\xa9", "\xe5\x94\x8e", /* 21- 30 */ "\xe5\x95\x8a", "\xe5\x99\xb2", "\xe5\x9b\xa4", "\xe5\x9c\xb3", "\xe5\x9c\xb4", "\xef\xa8\x90", "\xe5\xa2\x80", "\xe5\xa7\xa4", "\xe5\xa8\xa3", "\xe5\xa9\x95", /* 31- 40 */ "\xe5\xaf\xac", "\xef\xa8\x91", "\xe3\x9f\xa2", "\xe5\xba\xac", "\xe5\xbc\xb4", "\xe5\xbd\x85", "\xe5\xbe\xb7", "\xe6\x80\x97", "\xe6\x81\xb5", "\xe6\x84\xb0", /* 41- 50 */ "\xe6\x98\xa4", "\xe6\x9b\x88", "\xe6\x9b\x99", "\xe6\x9b\xba", "\xe6\x9b\xbb", "\xee\x82\x88", "\xe6\xa2\x81", "\xe6\xa4\x91", "\xe6\xa4\xbb", "\xe6\xa9\x85", /* 51- 60 */ "\xe6\xaa\x91", "\xe6\xab\x9b", "\xf0\xa3\x8f\x8c", "\xf0\xa3\x8f\xbe", "\xf0\xa3\x97\x84", "\xe6\xaf\xb1", "\xe6\xb3\xa0", "\xe6\xb4\xae", "\xef\xa9\x85", "\xe6\xb6\xbf", /* 61- 70 */ "\xe6\xb7\x8a", "\xe6\xb7\xb8", "\xef\xa9\x86", "\xe6\xbd\x9e", "\xe6\xbf\xb9", "\xe7\x81\xa4", "\xe7\x85\x95", "\xf0\xa4\x8b\xae", "\xe7\x85\x87", "\xe7\x87\x81", /* 71- 80 */ "\xe7\x88\x80", "\xe7\x8e\x9f", "\xe7\x8e\xa8", "\xe7\x8f\x89", "\xe7\x8f\x96", "\xe7\x90\x9b", "\xe7\x90\xa1", "\xef\xa9\x8a", "\xe7\x90\xa6", "\xe7\x90\xaa", /* 81- 90 */ "\xe7\x90\xac", "\xe7\x90\xb9", "\xe7\x91\x8b", "\xe3\xbb\x9a", "\xe7\x95\xb5", "\xe7\x96\x81", "\xe7\x9d\xb2", "\xe4\x82\x93", "\xe7\xa3\x88", "\xe7\xa3\xa0", /* 91-100 */ "\xe7\xa5\x87", "\xe7\xa6\xae", "\xe7\xa5\x93", "\xe8\xa2\x82", "\xe8\xa5\xa6", "\xe7\xa7\x9a", "\xe7\xa8\x9e", "\xe7\xad\xbf", "\xe7\xb0\xb1", "\xe4\x89\xa4", /* 101-110 */ "\xe7\xb6\x8b", "\xe7\xbe\xa1", "\xe8\x84\x98", "\xe8\x84\xba", "\xe8\x88\x98", "\xe8\x8a\xae", "\xe8\x91\x9b", "\xe8\x93\x9c", "\xe8\x93\xac", "\xe8\x95\x99", /* 111-120 */ "\xe8\x97\x8e", "\xe8\x9d\x95", "\xe8\x9f\xac", "\xe8\xa0\x8b", "\xe8\xa3\xb5", "\xe8\xa7\x92", "\xe8\xab\xb6", "\xe8\xb7\x8e", "\xe8\xbe\xbb", "\xe8\xbf\xb6", /* 121-130 */ "\xe9\x83\x9d", "\xe9\x84\xa7", "\xe9\x84\xad", "\xe9\x86\xb2", "\xe9\x88\xb3", "\xe9\x8a\x88", "\xe9\x8c\xa1", "\xe9\x8d\x88", "\xe9\x96\x92", "\xe9\x9b\x9e", /* 131-137 */ "\xe9\xa4\x83", "\xe9\xa5\x80", "\xe9\xab\x99", "\xe9\xaf\x96", "\xe9\xb7\x97", "\xe9\xba\xb4", "\xe9\xba\xb5", }; static const uint8_t * const trans_ext90[][96] = { { /* row 90 */ /* 1- 10 */ "\xe2\x9b\x8c", "\xe2\x9b\x8d", "\xe2\x9d\x97", "\xe2\x9b\x8f", "\xe2\x9b\x90", "\xe2\x9b\x91", "", "\xe2\x9b\x92", "\xe2\x9b\x95", "\xe2\x9b\x93", /* 11- 20 */ "\xe2\x9b\x94", "", "", "", "", "", "\xf0\x9f\x85\xbf", "\xf0\x9f\x86\x8a", "", "", "\xe2\x9b\x96", /* 21- 30 */ "\xe2\x9b\x97", "\xe2\x9b\x98", "\xe2\x9b\x99", "\xe2\x9b\x9a", "\xe2\x9b\x9b", "\xe2\x9b\x9c", "\xe2\x9b\x9d", "\xe2\x9b\x9e", "\xe2\x9b\x9f", "\xe2\x9b\xa0", /* 31- 40 */ "\xe2\x9b\xa1", "\xe2\xad\x95", "\xe3\x89\x88", "\xe3\x89\x89", "\xe3\x89\x8a", "\xe3\x89\x8b", "\xe3\x89\x8c", "\xe3\x89\x8d", "\xe3\x89\x8e", "\xe3\x89\x8f", /* 41- 50 */ "", "", "", "", "\xe2\x92\x91", "\xe2\x92\x92", "\xe2\x92\x93", "\xf0\x9f\x85\x8a", "\xf0\x9f\x85\x8c", "\xf0\x9f\x84\xbf", /* 51- 60 */ "\xf0\x9f\x85\x86", "\xf0\x9f\x85\x8b", "\xf0\x9f\x88\x90", "\xf0\x9f\x88\x91", "\xf0\x9f\x88\x92", "\xf0\x9f\x88\x93", "\xf0\x9f\x85\x82", "\xf0\x9f\x88\x94", "\xf0\x9f\x88\x95", "\xf0\x9f\x88\x96", /* 61- 70 */ "\xf0\x9f\x85\x8d", "\xf0\x9f\x84\xb1", "\xf0\x9f\x84\xbd", "\xe2\xac\x9b", "\xe2\xac\xa4", "\xf0\x9f\x88\x97", "\xf0\x9f\x88\x98", "\xf0\x9f\x88\x99", "\xf0\x9f\x88\x9a", "\xf0\x9f\x88\x9b", /* 71- 80 */ "\xe2\x9a\xbf", "\xf0\x9f\x88\x9c", "\xf0\x9f\x88\x9d", "\xf0\x9f\x88\x9e", "\xf0\x9f\x88\x9f", "\xf0\x9f\x88\xa0", "\xf0\x9f\x88\xa1", "\xf0\x9f\x88\xa2", "\xf0\x9f\x88\xa3", "\xf0\x9f\x88\xa4", /* 81- 84 */ "\xf0\x9f\x88\xa5", "\xf0\x9f\x85\x8e", "\xe3\x8a\x99", "\xf0\x9f\x88\x80", }, { /* row 91 */ /* 1- 10 */ "\xe2\x9b\xa3", "\xe2\xad\x96", "\xe2\xad\x97", "\xe2\xad\x98", "\xe2\xad\x99", "\xe2\x98\x93", "\xe3\x8a\x8b", "\xe3\x80\x92", "\xe2\x9b\xa8", "\xe3\x89\x86", /* 11- 20 */ "\xe3\x89\x85", "\xe2\x9b\xa9", "\xe0\xbf\x96", "\xe2\x9b\xaa", "\xe2\x9b\xab", "\xe2\x9b\xac", "\xe2\x99\xa8", "\xe2\x9b\xad", "\xe2\x9b\xae", "\xe2\x9b\xaf", /* 21- 30 */ "\xe2\x9a\x93", "\xe2\x9c\x88", "\xe2\x9b\xb0", "\xe2\x9b\xb1", "\xe2\x9b\xb2", "\xe2\x9b\xb3", "\xe2\x9b\xb4", "\xe2\x9b\xb5", "\xf0\x9f\x85\x97", "\xe2\x92\xb9", /* 31- 40 */ "\xe2\x93\x88", "\xe2\x9b\xb6", "\xf0\x9f\x85\x9f", "\xf0\x9f\x86\x8b", "\xf0\x9f\x86\x8d", "\xf0\x9f\x86\x8c", "\xf0\x9f\x85\xb9", "\xe2\x9b\xb7", "\xe2\x9b\xb8", "\xe2\x9b\xb9", /* 41- 49 */ "\xe2\x9b\xba", "\xf0\x9f\x85\xbb", "\xe2\x98\x8e", "\xe2\x9b\xbb", "\xe2\x9b\xbc", "\xe2\x9b\xbd", "\xe2\x9b\xbe", "\xf0\x9f\x85\xbc", "\xe2\x9b\xbf", }, { /* row 92 */ /* 1- 10 */ "\xe2\x9e\xa1", "\xe2\xac\x85", "\xe2\xac\x86", "\xe2\xac\x87", "\xe2\xac\xaf", "\xe2\xac\xae", "\xe5\xb9\xb4", "\xe6\x9c\x88", "\xe6\x97\xa5", "\xe5\x86\x86", /* 11- 20 */ "\xe3\x8e\xa1", "\xe3\x8e\xa5", "\xe3\x8e\x9d", "\xe3\x8e\xa0", "\xe3\x8e\xa4", "\xf0\x9f\x84\x80", "\xe2\x92\x88", "\xe2\x92\x89", "\xe2\x92\x8a", "\xe2\x92\x8b", /* 21- 30 */ "\xe2\x92\x8c", "\xe2\x92\x8d", "\xe2\x92\x8e", "\xe2\x92\x8f", "\xe2\x92\x90", "\xe6\xb0\x8f", "\xe5\x89\xaf", "\xe5\x85\x83", "\xe6\x95\x85", "\xe5\x89\x8d", /* 31- 40 */ "\xe6\x96\xb0", "\xf0\x9f\x84\x81", "\xf0\x9f\x84\x82", "\xf0\x9f\x84\x83", "\xf0\x9f\x84\x84", "\xf0\x9f\x84\x85", "\xf0\x9f\x84\x86", "\xf0\x9f\x84\x87", "\xf0\x9f\x84\x88", "\xf0\x9f\x84\x89", /* 41- 50 */ "\xf0\x9f\x84\x8a", "\xe3\x88\xb3", "\xe3\x88\xb6", "\xe3\x88\xb2", "\xe3\x88\xb1", "\xe3\x88\xb9", "\xe3\x89\x84", "\xe2\x96\xb6", "\xe2\x97\x80", "\xe3\x80\x96", /* 51- 60 */ "\xe3\x80\x97", "\xe2\x9f\x90", "\xc2\xb2", "\xc2\xb3", "\xf0\x9f\x84\xad", /* no unicode chars for musical score symbols (56...85) */ "?", "?", "?", "?", "?", /* 61- 70 */ "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", /* 71- 80 */ "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", /* 81- 90 */ "?", "?", "?", "?", "?", "\xf0\x9f\x84\xac", "\xf0\x9f\x84\xab", "\xe3\x89\x87", "\xf0\x9f\x86\x90", "\xf0\x9f\x88\xa6", "\xe2\x84\xbb", }, { /* row 93 */ /* 1- 10 */ "\xe3\x88\xaa", "\xe3\x88\xab", "\xe3\x88\xac", "\xe3\x88\xad", "\xe3\x88\xae", "\xe3\x88\xaf", "\xe3\x88\xb0", "\xe3\x88\xb7", "\xe3\x8d\xbe", "\xe3\x8d\xbd", /* 11- 20 */ "\xe3\x8d\xbc", "\xe3\x8d\xbb", "\xe2\x84\x96", "\xe2\x84\xa1", "\xe3\x80\xb6", "\xe2\x9a\xbe", "\xf0\x9f\x89\x80", "\xf0\x9f\x89\x81", "\xf0\x9f\x89\x82", "\xf0\x9f\x89\x83", /* 21- 30 */ "\xf0\x9f\x89\x84", "\xf0\x9f\x89\x85", "\xf0\x9f\x89\x86", "\xf0\x9f\x89\x87", "\xf0\x9f\x89\x88", "\xf0\x9f\x84\xaa", "\xf0\x9f\x88\xa7", "\xf0\x9f\x88\xa8", "\xf0\x9f\x88\xa9", "\xf0\x9f\x88\x94", /* 31- 40 */ "\xf0\x9f\x88\xaa", "\xf0\x9f\x88\xab", "\xf0\x9f\x88\xac", "\xf0\x9f\x88\xad", "\xf0\x9f\x88\xae", "\xf0\x9f\x88\xaf", "\xf0\x9f\x88\xb0", "\xf0\x9f\x88\xb1", "\xe2\x84\x93", "\xe3\x8e\x8f", /* 41- 50 */ "\xe3\x8e\x90", "\xe3\x8f\x8a", "\xe3\x8e\x9e", "\xe3\x8e\xa2", "\xe3\x8d\xb1", "", "", "\xc2\xbd", "\xe2\x86\x89", "\xe2\x85\x93", /* 51- 60 */ "\xe2\x85\x94", "\xc2\xbc", "\xc2\xbe", "\xe2\x85\x95", "\xe2\x85\x96", "\xe2\x85\x97", "\xe2\x85\x98", "\xe2\x85\x99", "\xe2\x85\x9a", "\xe2\x85\x90", /* 61- 70 */ "\xe2\x85\x9b", "\xe2\x85\x91", "\xe2\x85\x92", "\xe2\x98\x80", "\xe2\x98\x81", "\xe2\x98\x82", "\xe2\x9b\x84", "\xe2\x98\x96", "\xe2\x98\x97", "\xe2\x9b\x89", /* 71- 80 */ "\xe2\x9b\x8a", "\xe2\x99\xa6", "\xe2\x99\xa5", "\xe2\x99\xa3","\xe2\x99\xa0", "\xe2\x9b\x8b", "\xe2\xa8\x80", "\xe2\x80\xbc", "\xe2\x81\x89", "\xe2\x9b\x85", /* 81- 90 */ "\xe2\x98\x94", "\xe2\x9b\x86", "\xe2\x98\x83", "\xe2\x9b\x87", "\xe2\x9a\xa1", "\xe2\x9b\x87", "", "\xe2\x9a\x9e", "\xe2\x9a\x9f", "\xe2\x99\xac", "\xe2\x98\x8e", }, { /* row 94 */ /* 1- 10 */ "\xe2\x85\xa0", "\xe2\x85\xa1", "\xe2\x85\xa2", "\xe2\x85\xa3", "\xe2\x85\xa4", "\xe2\x85\xa5", "\xe2\x85\xa6", "\xe2\x85\xa7", "\xe2\x85\xa8", "\xe2\x85\xa9", /* 11- 20 */ "\xe2\x85\xaa", "\xe2\x85\xab", "\xe2\x91\xb0", "\xe2\x91\xb1", "\xe2\x91\xb2", "\xe2\x91\xb3", "\xe2\x91\xb4", "\xe2\x91\xb5", "\xe2\x91\xb6", "\xe2\x91\xb7", /* 21- 30 */ "\xe2\x91\xb8", "\xe2\x91\xb9", "\xe2\x91\xba", "\xe2\x91\xbb", "\xe2\x91\xbc", "\xe2\x91\xbd", "\xe2\x91\xbe", "\xe2\x91\xbf", "\xe3\x89\x91", "\xe3\x89\x92", /* 31- 40 */ "\xe3\x89\x93", "\xe3\x89\x94", "\xf0\x9f\x84\x90", "\xf0\x9f\x84\x91", "\xf0\x9f\x84\x92", "\xf0\x9f\x84\x93", "\xf0\x9f\x84\x94", "\xf0\x9f\x84\x95", "\xf0\x9f\x84\x96", "\xf0\x9f\x84\x97", /* 41- 50 */ "\xf0\x9f\x84\x98", "\xf0\x9f\x84\x99", "\xf0\x9f\x84\x9a", "\xf0\x9f\x84\x9b", "\xf0\x9f\x84\x9c", "\xf0\x9f\x84\x9d", "\xf0\x9f\x84\x9e", "\xf0\x9f\x84\x9f", "\xf0\x9f\x84\xa0", "\xf0\x9f\x84\xa1", /* 51- 60 */ "\xf0\x9f\x84\xa2", "\xf0\x9f\x84\xa3", "\xf0\x9f\x84\xa4", "\xf0\x9f\x84\xa5", "\xf0\x9f\x84\xa6", "\xf0\x9f\x84\xa7", "\xf0\x9f\x84\xa8", "\xf0\x9f\x84\xa9", "\xe3\x89\x95", "\xe3\x89\x96", /* 61- 70 */ "\xe3\x89\x97", "\xe3\x89\x98", "\xe3\x89\x99", "\xe3\x89\x9a", "\xe2\x91\xa0", "\xe2\x91\xa1", "\xe2\x91\xa2", "\xe2\x91\xa3", "\xe2\x91\xa4", "\xe2\x91\xa5", /* 71- 80 */ "\xe2\x91\xa6", "\xe2\x91\xa7", "\xe2\x91\xa8", "\xe2\x91\xa9", "\xe2\x91\xaa", "\xe2\x91\xab", "\xe2\x91\xac", "\xe2\x91\xad", "\xe2\x91\xae", "\xe2\x91\xaf", /* 81- 90 */ "\xe2\x9d\xb6", "\xe2\x9d\xb7", "\xe2\x9d\xb8", "\xe2\x9d\xb9", "\xe2\x9d\xba", "\xe2\x9d\xbb", "\xe2\x9d\xbc", "\xe2\x9d\xbd", "\xe2\x9d\xbe", "\xe2\x9d\xbf", /* 91- 93 */ "\xe2\x93\xab", "\xe2\x93\xac", "\xe3\x89\x9b", } }; static unsigned char append_arib_char (ISDBSubContext *ctx, uint8_t c1, uint8_t c2) { struct isdbsub_layout *ls = &ctx->current_state.layout_state; struct b24str_state *ts = &ctx->current_state.text_state; int gidx; uint8_t code; size_t ilen, olen, ret; char indata[3], *obuf, *ibuf; const uint8_t *p; uint8_t *q; int len; ibuf = indata; // make room for a new char. (at least 6 + 1 bytes) reserve_buf(ctx, 7); obuf = ctx->text.buf + ctx->text.used; olen = ctx->text.len - ctx->text.used; if (ts->ss > 1) gidx = ts->ss; else if (c1 & 0x80) gidx = ts->gr; else gidx = ts->gl; code = ts->g[gidx].code; // some hacks if ((c1 & 0x7F) == 0x20 || (c1 & 0x7F) == 0x7F) // SP or DEL code = CODE_ASCII; if (code == CODE_JISX0208 && (c1 & 0x7F) >= 0x75) code = CODE_EXT; switch (code) { case CODE_ASCII: case CODE_ASCII2: ls->in_combining = 0; c1 &= 0x7F; if (c1 != 0x7F) ctx->text.buf[ctx->text.used++] = c1; // no conversion needed else { // replace DELL with black-square (U+25A0) memcpy(ctx->text.buf + ctx->text.used, "\xe2\x96\xa0", 3); ctx->text.used += 3; } break; case CODE_JISX0208: case CODE_JISX0213_1: c1 |= 0x80; c2 |= 0x80; // non-spacing char? if ((c1 == 0xA1 && c2 >= 0xAD && c2 <= 0xB2) || (c1 == 0xA2 && c2 == 0xFE)) { ls->in_combining = 1; // U+20DD (0xe2839d) combining enclosing circle p = (c1 == 0xA1) ? combining1[c2 - 0xAD] : (const uint8_t *) "\xe2\x83\x9d"; len = strlen(p); memcpy(ctx->text.buf + ctx->text.used, p, len); ctx->text.used += len; break; } ls->in_combining = 0; ibuf[0] = c1; ibuf[1] = c2;// ibuf[]: EUC-JP2013 kanji ilen = 2; ret = iconv(ctx->iconv, &ibuf, &ilen, &obuf, &olen); if (ret != (size_t) -1) ctx->text.used += obuf - &ctx->text.buf[ctx->text.used]; else mp_msg(MSGT_DECSUB, MSGL_INFO, "bad data as EUC-JP(%d). sp:%lu 0x%02hhx 0x%02hhx\n", errno, olen, c1, c2); break; case CODE_JISX0213_2: ls->in_combining = 0; c1 |= 0x80; c2 |= 0x80; ilen = 3; ibuf[0] = '\x8f'; ibuf[0] = c1; ibuf[1] = c2; ret = iconv(ctx->iconv, &ibuf, &ilen, &obuf, &olen); if (ret != (size_t) -1) ctx->text.used += obuf - &ctx->text.buf[ctx->text.used]; else mp_msg(MSGT_DECSUB, MSGL_INFO, "bad data as EUC-JP. 0x8f 0x%02hhx 0x%02hhx\n", c1, c2); break; case CODE_JISX0201_KATA: ls->in_combining = 0; c1 &= 0x7F; // map to U+FF60 + (c1 - 0x20) = U+FF00 + (c1 + 0x40) c1 += 0x40; q = ctx->text.buf + ctx->text.used; q[0] = 0xef; q[1] = 0xbc + (c1 >> 6); q[2] = 0x80 + (c1 & 0x3F); ctx->text.used += 3; break; case CODE_X_HIRA: case CODE_X_HIRA_P: case CODE_X_KATA: case CODE_X_KATA_P: ls->in_combining = 0; c1 &= 0x7F; if (c1 < 0x77) { q = ctx->text.buf + ctx->text.used; // hira: {U+3040+ (c1 - 0x20)} -> {U+3000 + (c1 + 0x20)} // kata: {U+30A0 + (c1 - 0x20)} -> {U+3000 + (c1 + 0x80)} c1 += (code == CODE_X_HIRA || code == CODE_X_HIRA_P) ? 0x20 : 0x80; q[0] = 0xe3; q[1] = 0x80 + (c1 >> 6); q[2] = 0x80 + (c1 & 0x3F); ctx->text.used += 3; } else { c1 -= 0x77; p = (code == CODE_X_HIRA || code == CODE_X_HIRA_P) ? hira_symbols[c1] : kata_symbols[c1]; len = strlen(p); memcpy(ctx->text.buf + ctx->text.used, p, len); ctx->text.used += len; } break; case CODE_EXT: // symbols defined in row 85.86, 90..94 ls->in_combining = 0; c1 &= 0x7F; c2 &= 0x7F; switch (c1) { case 0x75: // row 85-86 case 0x76: c2 -= 0x21; if (c1 == 0x76) c2 += 94; if (c2 < 137) { p = trans_ext85[c2]; len = strlen(p); memcpy(ctx->text.buf + ctx->text.used, p, len); ctx->text.used += len; } else mp_msg(MSGT_DECSUB, MSGL_INFO, "bad data as extra char.\n"); break; case 0x7A: // row 90-94 case 0x7B: case 0x7C: case 0x7D: case 0x7E: c1 -= 0x7A; c2 -= 0x21; p = trans_ext90[c1][c2]; len = strlen(p); if (len > 0) { memcpy(ctx->text.buf + ctx->text.used, p, len); ctx->text.used += len; } else mp_msg(MSGT_DECSUB, MSGL_INFO, "bad data as extra char.\n"); break; default: mp_msg(MSGT_DECSUB, MSGL_V, "un-supported data 0x%02hhx 0x%02hhx.\n", c1, c2); } break; // non-spacing mosaic chars... just skip. // don't touch in_combining, as other non-spacing char's may follow/precede... case CODE_MOSAIC_C: case CODE_MOSAIC_D: break; case CODE_X_MACRO: break; // processed later default: ls->in_combining = 0; // replace this unknown char with U+FFFD memcpy(ctx->text.buf + ctx->text.used, "\xef\xbf\xbd", 3); ctx->text.used += 3; mp_msg(MSGT_DECSUB, MSGL_V, "unknown charset:0x%02hhx data 0x%02hhx 0x%02hhx.\n", code, c1, c2); break; } ctx->text.buf[ctx->text.used] = '\0'; return code; } static void insert_str(ISDBSubContext *ctx, const char *txt, int begin) { int end = ctx->text.used; size_t len = strlen(txt); if (len == 0 || len > 128) return; reserve_buf(ctx, len + 1); // +1 for terminating '\0' memmove(ctx->text.buf + begin + len, ctx->text.buf + begin, end - begin); memcpy(ctx->text.buf + begin, txt, len); ctx->text.txt_tail += len; ctx->text.used += len; ctx->text.buf[ctx->text.used] = '\0'; } static void advance(ISDBSubContext *ctx); static void fixup_linesep(ISDBSubContext *ctx) { struct isdbsub_layout *ls = &ctx->current_state.layout_state; char tmp[16]; int lsp; if (ls->prev_break_idx <= 0) return; // adjust baseline if all chars in the line are 50% tall of one font size. if (ls->shift_baseline && <API key>(ls->format)) { int delta = ls->cell_spacing.row / 4; ls->linesep_upper += delta; ls->line_desc -= delta; mp_msg(MSGT_DECSUB, MSGL_V, "baseline shifted down %dpx.\n", delta); } // not the first line tmp[0]='\0'; lsp = ls->prev_line_desc + ls->linesep_upper; av_strlcatf(tmp, sizeof(tmp), "{\\lsp%d}", lsp); insert_str(ctx, tmp, ls->prev_break_idx); } static void do_line_break(ISDBSubContext *ctx) { struct isdbsub_layout *ls = &ctx->current_state.layout_state; int csp; char tmp[32]; if (<API key>(ls->format)) csp = ls->cell_spacing.col * ls->font_scale.fscx / 100; else csp = ls->cell_spacing.col * ls->font_scale.fscy / 100; if (ls->line_width == 0) { if (ls->prev_line_bottom == 0) { if (<API key>(ls->format)) ls->block_offset_h = csp / 2; else ls->block_offset_v = csp / 2; } // avoid empty lines by prepending a space, // as ASS halves line-spacing of empty lines. append_str(ctx, "\xe3\x80\x80"); advance(ctx); } fixup_linesep(ctx); ls->prev_break_idx = ctx->text.used; tmp[0] = '\0'; av_strlcatf(tmp, sizeof(tmp), "\\N{\\lsp0\\fsp%d}", ls->cell_spacing.col); append_str(ctx, tmp); ls->prev_line_desc = ls->line_desc; ls->prev_line_bottom += ls->linesep_upper + ls->line_height + ls->line_desc; ls->prev_char_sep = csp; ls->line_height = 0; ls->line_width = 0; ls->line_desc = 0; ls->linesep_upper = 0; ls->shift_baseline = 0; } // a new char will be appended. check h-spacing and line-breaking. static void pre_advance(ISDBSubContext *ctx) { struct isdbsub_layout *ls = &ctx->current_state.layout_state; int csp, cscale; int w; int blocklen; int delta; if (<API key>(ls->format)) { cscale = ls->font_scale.fscx; w = ls->font_size * cscale / 100; csp = ls->cell_spacing.col * cscale / 100; if (ls->prev_line_bottom == 0 && ls->line_width == 0) ls->block_offset_h = csp / 2; blocklen = ls->display_area.w - ls->block_offset_h; } else { cscale = ls->font_scale.fscy; w = ls->font_size * cscale / 100; csp = ls->cell_spacing.col * cscale / 100; if (ls->prev_line_bottom == 0 && ls->line_width == 0) ls->block_offset_v = csp / 2; blocklen = ls->display_area.h - ls->block_offset_v; } if (csp != ls->prev_char_sep) delta = ((ls->prev_char_sep + 1) / 2 + csp / 2) - ls->prev_char_sep; else delta = 0; // check line break; // note: at the head of a line, line breaking is useless. if (ls->line_width != 0 && ls->line_width + delta + w > blocklen) { mp_msg(MSGT_DECSUB, MSGL_V, "auto line break at %lu.\n", ctx->text.used); do_line_break(ctx); } else if (ls->line_width != 0 && delta != 0) { char tmp[32]; // need to compensate the wrong charsep of the previously added char. // hack: insert zero-width space with the compensating \fsp. (can be <0) // note that \fsp is scaled by \fscx in ASS. tmp[0] = '\0'; av_strlcatf(tmp, sizeof(tmp), "{\\fsp%d}\xe2\x80\x8b{\\fsp%d}", delta * 100 / cscale, ls->cell_spacing.col); append_str(ctx, tmp); ls->line_width += delta; } } static void advance(ISDBSubContext *ctx) { struct isdbsub_layout *ls = &ctx->current_state.layout_state; int cscale; int h; int asc, desc; int csp; if (<API key>(ls->format)) { cscale = ls->font_scale.fscx; h = ls->font_size * ls->font_scale.fscy / 100; if (ls->font_scale.fscy == 200) { desc = ls->cell_spacing.row / 2; asc = ls->cell_spacing.row * 2 - desc + h; } else { desc = ls->cell_spacing.row * ls->font_scale.fscy / 200; asc = ls->cell_spacing.row * ls->font_scale.fscy / 100 - desc + h; } if (asc > ls->line_height + ls->linesep_upper) { if (h > ls->line_height) ls->line_height = h; ls->linesep_upper = asc - ls->line_height; } else if (h > ls->line_height) { ls->linesep_upper = ls->line_height + ls->linesep_upper - h; ls->line_height = h; } if (ls->prev_line_bottom == 0 && ls->linesep_upper > ls->block_offset_v) ls->block_offset_v = ls->linesep_upper; if (ls->font_scale.fscy != 50) ls->shift_baseline = 0; } else { int lsp; cscale = ls->font_scale.fscy; h = ls->font_size * ls->font_scale.fscx / 100; lsp = ls->cell_spacing.row * ls->font_scale.fscx / 100; desc = h / 2 + lsp / 2; asc = h - h / 2 + lsp - lsp / 2; if (asc > ls->line_height + ls->linesep_upper) { if (h - h / 2 > ls->line_height) ls->line_height = h - h / 2; ls->linesep_upper = asc - ls->line_height; } else if (h - h / 2 > ls->line_height) { ls->linesep_upper = ls->line_height + ls->linesep_upper - h + h / 2; ls->line_height = h - h / 2; } if (ls->prev_line_bottom == 0 && ls->linesep_upper > ls->block_offset_h) ls->block_offset_h = ls->linesep_upper; ls->shift_baseline = 0; } if (desc > ls->line_desc) ls->line_desc = desc; csp = ls->cell_spacing.col * cscale / 100; ls->line_width += ls->font_size * cscale / 100 + csp; ls->prev_char_sep = csp; } static void forward_position(ISDBSubContext *ctx, int rows, int cols) { int i; for (i = 0; i < rows; i++) do_line_break(ctx); for (i = 0; i < cols; i++) { pre_advance(ctx); append_str(ctx, "\xe3\x80\x80"); advance(ctx); } if (rows > 0 && cols > 0) ctx->current_state.layout_state.shift_baseline = 1; } static const uint8_t *proc_char(ISDBSubContext *ctx, const uint8_t *buf, int buf_size) { struct isdbsub_layout *ls = &ctx->current_state.layout_state; struct b24str_state *ts = &ctx->current_state.text_state; unsigned int begin, end; char *ch = NULL; begin = end = ctx->text.used; while (buf_size > 0 && (buf[0] & 0x60) != 0) { uint8_t c1, c2 = 0; unsigned char ctype; c1 = buf[0]; buf ++; buf_size if ((c1 & 0x7F) != 0x20 && (c1 & 0x7F) != 0x7F) { // not (SP or DEL) // multi-byte? if ((ts->ss > 0 && ts->g[ts->ss].mb > 1) || (!ts->ss && (c1 & 0x80) && ts->g[ts->gr].mb > 1) || (!ts->ss && !(c1 & 0x80) && ts->g[ts->gl].mb > 1)) { if (buf_size < 1) return NULL; c2 = buf[0]; buf ++; buf_size } } if (!ls->in_combining) { pre_advance(ctx); begin = end = ctx->text.used; } ctype = append_arib_char(ctx, c1, c2); ts->ss = 0; if (ctype == 0) continue; if (ctype == CODE_X_MACRO) { mp_msg(MSGT_DECSUB, MSGL_DBG2, "macro 0x%02hhx.\n", c1); if ((c1 & 0x70) == 0x60) { c1 &= 0x0F; proc_ctl(ctx, Default_macro[c1], strlen(Default_macro[c1])); } continue; } // if non-spacing sequence has terminated,.. if (!ls->in_combining && end - begin > 0 && ctx->text.used > end) { char tmp[8]; // UTF-8 char is 6bytes at maximum.... unsigned int len; len = ctx->text.used - end; if (len > sizeof(tmp)) // for safety. len = sizeof(tmp); memcpy(tmp, ctx->text.buf + end, len); memmove(ctx->text.buf + begin + len, ctx->text.buf + begin, end - begin); memcpy(ctx->text.buf + begin, tmp, len); mp_msg(MSGT_DECSUB, MSGL_V, "moved the terminating spacing char to the head(%d).\n", begin); } end = ctx->text.used; if (ls->in_combining) continue; // ls->in_combining == 0 advance(ctx); // repeat if (ls->repeat_count >= 0) { // save the repeating char first. ch = calloc(1, end - begin + 1); if (ch) memcpy(ch, ctx->text.buf + begin, end - begin); else { mp_msg(MSGT_DECSUB, MSGL_WARN, "out of memory for repeating char.\n"); ls->repeat_count = -1; } } if (ls->repeat_count == 0) { pre_advance(ctx); while (ls->line_width != 0) { append_str(ctx, ch); advance(ctx); // prepare for the next one. pre_advance(ctx); } } else if (ls->repeat_count > 0) { while (--ls->repeat_count > 0) { pre_advance(ctx); append_str(ctx, ch); advance(ctx); } } if (ls->repeat_count > -1) free(ch); ls->repeat_count = -1; } if (buf_size <= 0) return NULL; // buf_size > 0 => assert((buf[0] & 0x60) == 0); return buf; } static void process_txt_du(ISDBSubContext *ctx, const uint8_t *buf, int buf_size) { const char *p, *q; ctx->current_state = ctx->default_states[ctx->lang_tag]; reset_state(&ctx->current_state); iconv(ctx->iconv, NULL, NULL, NULL, NULL); p = buf; while (buf_size > 0) { q = proc_ctl(ctx, p, buf_size); // update ctx->current_state if (!q) break; buf_size -= q - p; p = q; q = proc_char(ctx, p, buf_size); // append to ctx->text ctx->text.txt_tail = ctx->text.used; if (!q) break; buf_size -= q - p; p = q; if (ctx->current_state.need_init) setup_line_head(ctx); } } static void process_mngmnt_dg(ISDBSubContext *ctx, const uint8_t *buf, int buf_size) { const uint8_t *p = buf; int lang_num; int du_loop_len; int i; ctx->timing_mode = *(p++) >> 6; if (ctx->timing_mode == ISDBSUB_TMD_OFFSET) { ctx->offset.hour = (p[0] >> 4) * 10 + (p[0] & 0x0f); ctx->offset.min = (p[1] >> 4) * 10 + (p[1] & 0x0f); ctx->offset.sec = (p[2] >> 4) * 10 + (p[2] & 0x0f); ctx->offset.ms = (p[3] >> 4) * 100 + (p[3] & 0x0f) * 10 + (p[4] >> 4); p += 5; } lang_num = *(p++); for (i = 0; i < lang_num; i++) { int lang_tag = *p >> 5; int disp_mode = *p & 0x0f; p++; if ((disp_mode & 0x0c) == 0x0c) p++; // skip display condition p += 3; // skip lang code if (lang_tag < ISDBSUB_MAX_LANG) { ISDBSubState *state = &ctx->default_states[lang_tag]; int format; state->auto_display = disp_mode >> 3; state->rollup_mode = (*p & 0x03); format = *p >> 4; state->layout_state.is_profile_c = (format == 0x0F); if (state->layout_state.is_profile_c) format = ISDBSUB_FMT_960H; if (format < ISDBSUB_FMT_960H || format > ISDBSUB_FMT_720V) { mp_msg(MSGT_DECSUB, MSGL_INFO, "illegal format:0x%02x in sub. mngment data.\n", format); format = ISDBSUB_FMT_960H; // fallback } state->layout_state.format = format; if ((*p & 0x0c) != 0x00) mp_msg(MSGT_DECSUB, MSGL_WARN, "char encoding:%d not supported.\n", ((*p & 0x0c) >> 2)); init_layout(&state->layout_state); reset_state(state); clear_text(ctx); } p++; } ctx->current_state = ctx->default_states[ctx->lang_tag]; set_format(ctx); du_loop_len = AV_RB24(p); p += 3; if (p + du_loop_len > buf + buf_size) du_loop_len = buf + buf_size - p; while (du_loop_len >= 5) { int du_size = AV_RB24(p + 2); if (p[0] != ISDBSUB_UNIT_SEP || du_loop_len < 5 + du_size) break; du_loop_len -= (5 + du_size); // ignore DRCS. only txt data units. if (p[1] == ISDBSUB_DU_TYPE_TXT) { memdump(MSGL_DBG2, p + 5, du_size); process_txt_du(ctx, p + 5, du_size); // control seq. only // copy back SWF, SDP, SDF,... ctx->default_states[ctx->lang_tag] = ctx->current_state; } p += 5 + du_size; } } static void process_sub_dg(ISDBSubContext *ctx, const uint8_t *buf, int buf_size) { const uint8_t *p = buf; int du_loop_len; if (ctx->pts == AV_NOPTS_VALUE) { mp_msg(MSGT_DECSUB, MSGL_INFO, "no timestamp on subtitle text data."); return; } clear_text(ctx); setup_line_head(ctx); ctx->timing_mode = *(p++) >> 6; // subtitle data should be TMD_FREE (ARIB TR-B15). if (ctx->timing_mode != ISDBSUB_TMD_FREE) { ctx->start.hour = (p[0] >> 4) * 10 + (p[0] & 0x0f); ctx->start.min = (p[1] >> 4) * 10 + (p[1] & 0x0f); ctx->start.sec = (p[2] >> 4) * 10 + (p[2] & 0x0f); ctx->start.ms = (p[3] >> 4) * 100 + (p[3] & 0x0f) * 10 + (p[4] >> 4); if (ctx->timing_mode == ISDBSUB_TMD_OFFSET) { ctx->start.ms += ctx->offset.ms; if (ctx->start.ms >= 1000) { ctx->start.ms -= 1000; ctx->start.sec ++; } ctx->start.sec += ctx->offset.sec; if (ctx->start.sec >= 60) { ctx->start.sec -= 60; ctx->start.min ++; } ctx->start.min += ctx->offset.min; if (ctx->start.min >= 60) { ctx->start.min -= 60; ctx->start.hour ++; } ctx->start.hour += ctx->offset.hour; } p += 5; } du_loop_len = AV_RB24(p); p += 3; if (p + du_loop_len > buf + buf_size) du_loop_len = buf + buf_size - p; while (du_loop_len >= 5) { int du_size = AV_RB24(p + 2); if (p[0] != ISDBSUB_UNIT_SEP || du_loop_len < 5 + du_size) break; du_loop_len -= (5 + du_size); // ignore DRCS. only txt data units. if (p[1] == ISDBSUB_DU_TYPE_TXT) { memdump(MSGL_DBG2, p + 5, du_size); process_txt_du(ctx, p + 5, du_size); } p += 5 + du_size; } append_event(ctx); } static int do_init(ISDBSubContext *ctx) { int i; for (i = 65; i < 73; i++) Default_clut[i] = Default_clut[i - 65] & ~RGBA(0,0,0,128); for (i = 73; i < 128; i++) Default_clut[i] = Default_clut[i - 64] & ~RGBA(0,0,0,128); Crc_table = av_crc_get_table(AV_CRC_16_CCITT); ctx->last_mngmnt_id = ISDBSUB_NO_DGID; ctx->last_mngmnt_pts = AV_NOPTS_VALUE; ctx->iconv = iconv_open("UTF-8", "EUC-JISX0213"); if (ctx->iconv == (iconv_t) -1) return -1; return 0; } void isdbsub_reset(struct sh_sub *sh) { ISDBSubContext *ctx = sh->context; if (!ctx) return; if (ctx->iconv != (iconv_t) -1) iconv_close(ctx->iconv); free(ctx->text.buf); free(ctx->script_info); free(ctx->events); free(ctx); sh->context = NULL; } /** * Decode a ISDB subtitle packet. * \return < 0 on error, 'a' if further processing is needed */ int isdbsub_decode(struct sh_sub *sh, uint8_t **data, int *size, double *pts, double *endpts) { ISDBSubContext *ctx = sh->context; const uint8_t *buf = *data; int buf_size = *size; int64_t orig_pts; const uint8_t *p, *p_end; mp_msg(MSGT_DECSUB, MSGL_V, "ISDB sub packet:\n"); memdump(MSGL_DBG2, buf, buf_size); ass_font_scale = 1.; if (!ctx) { ctx = sh->context = calloc(1, sizeof(ISDBSubContext)); if (!sh->context || do_init(sh->context)) { mp_msg(MSGT_DECSUB, MSGL_WARN, "Could not initialize codec context.\n"); return -1; } } if (buf_size <= 10 || buf[0] != ISDBSUB_DATA_ID || buf[1] != 0xff) { mp_msg(MSGT_DECSUB, MSGL_INFO, "incomplete or broken packet\n"); return -1; } /* set default output */ *data = NULL; *size = 0; orig_pts = (*pts != MP_NOPTS_VALUE) ? *pts * 1000 : AV_NOPTS_VALUE; ctx->pts = orig_pts; ctx->duration = 5 * 1000; //temporary. ctx->lang_tag = sh->cur_lang_tag; if (orig_pts != AV_NOPTS_VALUE && ctx->last_mngmnt_pts != AV_NOPTS_VALUE) { int64_t t = orig_pts; char t1[16], t2[16]; // check pts timeout, but taking PTS wrap-around into account. if (t < ctx->last_mngmnt_pts && (ctx->last_mngmnt_pts - t) > (MPEGTS_MAX_PTS >> 1)) { mp_msg(MSGT_DECSUB, MSGL_INFO, "PTS wrap-around %s -> %s\n", pts_to_str(ctx->last_mngmnt_pts, t1), pts_to_str(t, t2)); t += MPEGTS_MAX_PTS; } if (t < ctx->last_mngmnt_pts || t - ctx->last_mngmnt_pts > <API key>) { mp_msg(MSGT_DECSUB, MSGL_INFO, "Subtitle Management DataGroup time-out. %s -> %s\n", pts_to_str(ctx->last_mngmnt_pts, t1), pts_to_str(t, t2)); ctx->last_mngmnt_pts = AV_NOPTS_VALUE; } } p = buf + 3 + (buf[2] & 0x0f); p_end = buf + buf_size; while (p_end - p >= 7) { int dg_id = p[0] >> 2; int dg_size = AV_RB16(p + 3); uint32_t crc = 0; if (p + 5 + dg_size + 2 > p_end || (crc = av_crc(Crc_table, 0, p, 5 + dg_size + 2)) != 0) { mp_msg(MSGT_DECSUB, MSGL_INFO, "incomplete or broken packet. " "ofs:%ld l:%d crc:0x%04hx\n", p - buf, 5 + dg_size + 2, crc); return -1; } p += 5; if ((dg_id & 0x0f) == 0) { // subtile management data group char t1[16]; if (dg_id != ctx->last_mngmnt_id || ctx->last_mngmnt_pts == AV_NOPTS_VALUE) process_mngmnt_dg(ctx, p, dg_size); else mp_msg(MSGT_DECSUB, MSGL_DBG2, "Skip the same subtitle management data group.\n"); ctx->last_mngmnt_id = dg_id; ctx->last_mngmnt_pts = orig_pts; mp_msg(MSGT_DECSUB, MSGL_DBG2, "last_mngmnt_pts set to %s\n", pts_to_str(orig_pts, t1)); } else if ((dg_id & 0x0f) == ctx->lang_tag + 1) { // subtile data group if (ctx->last_mngmnt_id == ISDBSUB_NO_DGID) mp_msg(MSGT_DECSUB, MSGL_V, "no management data group received yet.\n"); else if ((dg_id & 0xf0) == ctx->last_mngmnt_id) process_sub_dg(ctx, p, dg_size); } else mp_msg(MSGT_DECSUB, MSGL_DBG2, "Subtitle data group id 0x%02x, length %d\n", dg_id, dg_size); p += dg_size + 2; } if (orig_pts != AV_NOPTS_VALUE && ctx->last_mngmnt_pts == AV_NOPTS_VALUE) { ctx->last_mngmnt_pts = orig_pts; mp_msg(MSGT_DECSUB, MSGL_V, "replaced empty last_mngmnt_pts with the next received PTS.\n"); } do_output(ctx, data, size); if (endpts && orig_pts != AV_NOPTS_VALUE) *endpts = (ctx->pts + ctx->duration) / 1000.0; return *data ? 'a' : 0; }
<?php # -*- coding: utf-8 -*- namespace W2M\Test\Unit\Import\Iterator; use W2M\Import\Iterator, W2M\Test\Helper, SimpleXMLElement; class TermIteratorTest extends Helper\MonkeyTestCase { public function test_current() { $sxml = new SimpleXMLElement( '<root/>' ); $iterator_mock = $this->mock_builder-><API key>(); $parser_mock = $this->mock_builder-><API key>(); $import_term_mock = $this->mock_builder->type_wp_import_term(); $iterator_mock->expects( $this->once() ) ->method( 'current' ) ->willReturn( $sxml ); $parser_mock->expects( $this->once() ) ->method( 'parse_term' ) ->with( $sxml ) ->willReturn( $import_term_mock ); $testee = new Iterator\TermIterator( $iterator_mock, $parser_mock ); $this->assertSame( $import_term_mock, $testee->current() ); } }
// This program is free software: you can redistribute it and/or modify // the Free Software Foundation, version 2.0 or later versions. // This program is distributed in the hope that it will be useful, // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // A copy of the GPL 2.0 should have been included with the program. // Official git repository and contact information can be found at #include "base/basictypes.h" #include "Common/Log.h" #include "Common/Vulkan/VulkanContext.h" #include "GPU/Vulkan/VulkanUtil.h" Vulkan2D::Vulkan2D(VulkanContext *vulkan) : vulkan_(vulkan) { InitDeviceObjects(); } Vulkan2D::~Vulkan2D() { <API key>(); } void Vulkan2D::Shutdown() { <API key>(); } void Vulkan2D::<API key>() { for (int i = 0; i < vulkan_->GetInflightFrames(); i++) { if (frameData_[i].descPool != VK_NULL_HANDLE) { vulkan_->Delete().<API key>(frameData_[i].descPool); frameData_[i].descPool = VK_NULL_HANDLE; } } for (auto it : pipelines_) { vulkan_->Delete().QueueDeletePipeline(it.second); } pipelines_.clear(); VkDevice device = vulkan_->GetDevice(); if (<API key> != VK_NULL_HANDLE) { <API key>(device, <API key>, nullptr); <API key> = VK_NULL_HANDLE; } if (pipelineLayout_ != VK_NULL_HANDLE) { <API key>(device, pipelineLayout_, nullptr); pipelineLayout_ = VK_NULL_HANDLE; } // pipelineBasicTex_ and pipelineBasicTex_ come from vulkan2D_. if (pipelineCache_ != VK_NULL_HANDLE) { vulkan_->Delete().<API key>(pipelineCache_); pipelineCache_ = VK_NULL_HANDLE; } } void Vulkan2D::InitDeviceObjects() { pipelineCache_ = vulkan_->CreatePipelineCache(); // All resources we need for PSP drawing. Usually only bindings 0 and 2-4 are populated. <API key> bindings[2] = {}; bindings[0].descriptorCount = 1; bindings[0].descriptorType = <API key>; bindings[0].stageFlags = <API key>; bindings[0].binding = 0; bindings[1].descriptorCount = 1; bindings[1].descriptorType = <API key>; bindings[1].stageFlags = <API key>; bindings[1].binding = 1; VkDevice device = vulkan_->GetDevice(); <API key> dsl = { <API key> }; dsl.bindingCount = 2; dsl.pBindings = bindings; VkResult res = <API key>(device, &dsl, nullptr, &<API key>); assert(VK_SUCCESS == res); <API key> dpTypes[1]; dpTypes[0].descriptorCount = 3000; dpTypes[0].type = <API key>; <API key> dp = { <API key> }; dp.flags = 0; // Don't want to mess around with individually freeing these, let's go fixed each frame and zap the whole array. Might try the dynamic approach later. dp.maxSets = 3000; dp.pPoolSizes = dpTypes; dp.poolSizeCount = ARRAY_SIZE(dpTypes); for (int i = 0; i < ARRAY_SIZE(frameData_); i++) { VkResult res = <API key>(vulkan_->GetDevice(), &dp, nullptr, &frameData_[i].descPool); assert(VK_SUCCESS == res); } VkPushConstantRange push = {}; push.offset = 0; push.size = 16; push.stageFlags = <API key>; <API key> pl = { <API key> }; pl.pPushConstantRanges = &push; pl.<API key> = 1; pl.setLayoutCount = 1; pl.pSetLayouts = &<API key>; pl.flags = 0; res = <API key>(device, &pl, nullptr, &pipelineLayout_); assert(VK_SUCCESS == res); } void Vulkan2D::DeviceLost() { <API key>(); } void Vulkan2D::DeviceRestore(VulkanContext *vulkan) { vulkan_ = vulkan; InitDeviceObjects(); } void Vulkan2D::BeginFrame() { int curFrame = vulkan_->GetCurFrame(); FrameData &frame = frameData_[curFrame]; frame.descSets.clear(); <API key>(vulkan_->GetDevice(), frame.descPool, 0); } void Vulkan2D::EndFrame() { } VkDescriptorSet Vulkan2D::GetDescriptorSet(VkImageView tex1, VkSampler sampler1, VkImageView tex2, VkSampler sampler2) { DescriptorSetKey key; key.imageView[0] = tex1; key.imageView[1] = tex2; key.sampler[0] = sampler1; key.sampler[1] = sampler2; int curFrame = vulkan_->GetCurFrame(); FrameData *frame = &frameData_[curFrame]; auto iter = frame->descSets.find(key); if (iter != frame->descSets.end()) { return iter->second; } // Didn't find one in the frame descriptor set cache, let's make a new one. // We wipe the cache on every frame. VkDescriptorSet desc; <API key> descAlloc = { <API key> }; descAlloc.pSetLayouts = &<API key>; descAlloc.descriptorPool = frame->descPool; descAlloc.descriptorSetCount = 1; VkResult result = <API key>(vulkan_->GetDevice(), &descAlloc, &desc); assert(result == VK_SUCCESS); // We just don't write to the slots we don't care about. <API key> writes[2]; memset(writes, 0, sizeof(writes)); // Main and sub textures int n = 0; <API key> image1 = {}; <API key> image2 = {}; if (tex1) { // TODO: Also support LAYOUT_GENERAL to be able to texture from framebuffers without transitioning them? image1.imageLayout = <API key>; image1.imageView = tex1; image1.sampler = sampler1; writes[n].sType = <API key>; writes[n].dstBinding = 0; writes[n].pImageInfo = &image1; writes[n].descriptorCount = 1; writes[n].descriptorType = <API key>; writes[n].dstSet = desc; n++; } if (tex2) { // TODO: Also support LAYOUT_GENERAL to be able to texture from framebuffers without transitioning them? image2.imageLayout = <API key>; image2.imageView = tex2; image2.sampler = sampler2; writes[n].sType = <API key>; writes[n].dstBinding = 1; writes[n].pImageInfo = &image2; writes[n].descriptorCount = 1; writes[n].descriptorType = <API key>; writes[n].dstSet = desc; n++; } <API key>(vulkan_->GetDevice(), n, writes, 0, nullptr); frame->descSets[key] = desc; return desc; } VkPipeline Vulkan2D::GetPipeline(VkRenderPass rp, VkShaderModule vs, VkShaderModule fs, bool readVertices, <API key> depthStencilMode) { PipelineKey key; key.vs = vs; key.fs = fs; key.rp = rp; key.depthStencilMode = depthStencilMode; key.readVertices = readVertices; auto iter = pipelines_.find(key); if (iter != pipelines_.end()) { return iter->second; } <API key> blend0 = {}; blend0.blendEnable = false; blend0.colorWriteMask = depthStencilMode == <API key>::<API key> ? <API key> : 0xF; <API key> cbs = { <API key> }; cbs.pAttachments = &blend0; cbs.attachmentCount = 1; cbs.logicOpEnable = false; <API key> dss = { <API key> }; dss.<API key> = false; dss.depthTestEnable = false; dss.stencilTestEnable = false; switch (depthStencilMode) { case <API key>::NONE: break; case <API key>::<API key>: dss.stencilTestEnable = true; dss.front.reference = 0xFF; dss.front.compareMask = 0xFF; dss.front.compareOp = <API key>; dss.front.depthFailOp = <API key>; dss.front.failOp = <API key>; dss.front.passOp = <API key>; dss.back = dss.front; break; } VkDynamicState dynamicStates[5]; int numDyn = 0; dynamicStates[numDyn++] = <API key>; dynamicStates[numDyn++] = <API key>; if (depthStencilMode == <API key>::<API key>) { dynamicStates[numDyn++] = <API key>; dynamicStates[numDyn++] = <API key>; dynamicStates[numDyn++] = <API key>; } <API key> ds = { <API key> }; ds.pDynamicStates = dynamicStates; ds.dynamicStateCount = numDyn; <API key> rs = { <API key> }; rs.lineWidth = 1.0f; <API key> ms = { <API key> }; ms.<API key> = <API key>; <API key> ss[2] = {}; ss[0].sType = <API key>; ss[0].stage = <API key>; ss[0].module = vs; ss[0].pName = "main"; ss[0].flags = 0; ss[1].sType = <API key>; ss[1].stage = <API key>; ss[1].module = fs; ss[1].pName = "main"; ss[1].flags = 0; <API key> inputAssembly = { <API key> }; inputAssembly.flags = 0; inputAssembly.topology = <API key>; inputAssembly.<API key> = true; <API key> attrs[2]; int attributeCount = 2; attrs[0].binding = 0; attrs[0].format = <API key>; attrs[0].location = 0; attrs[0].offset = 0; attrs[1].binding = 0; attrs[1].format = <API key>; attrs[1].location = 1; attrs[1].offset = 12; int vertexStride = 12 + 8; <API key> ibd = {}; ibd.binding = 0; ibd.inputRate = <API key>; ibd.stride = vertexStride; <API key> vis = { <API key> }; vis.<API key> = readVertices ? 1 : 0; vis.<API key> = readVertices ? &ibd : nullptr; vis.<API key> = readVertices ? attributeCount : 0; vis.<API key> = readVertices ? attrs : nullptr; <API key> views = { <API key> }; views.viewportCount = 1; views.scissorCount = 1; views.pViewports = nullptr; // dynamic views.pScissors = nullptr; // dynamic <API key> pipe = { <API key> }; pipe.flags = 0; pipe.stageCount = 2; pipe.pStages = ss; pipe.basePipelineIndex = 0; pipe.pColorBlendState = &cbs; pipe.pDepthStencilState = &dss; pipe.pRasterizationState = &rs; pipe.pVertexInputState = &vis; pipe.pViewportState = &views; pipe.pTessellationState = nullptr; pipe.pDynamicState = &ds; pipe.pInputAssemblyState = &inputAssembly; pipe.pMultisampleState = &ms; pipe.layout = pipelineLayout_; pipe.basePipelineHandle = VK_NULL_HANDLE; pipe.basePipelineIndex = 0; pipe.renderPass = rp; pipe.subpass = 0; VkPipeline pipeline; VkResult result = <API key>(vulkan_->GetDevice(), pipelineCache_, 1, &pipe, nullptr, &pipeline); if (result == VK_SUCCESS) { pipelines_[key] = pipeline; return pipeline; } else { return VK_NULL_HANDLE; } } VkShaderModule CompileShaderModule(VulkanContext *vulkan, <API key> stage, const char *code, std::string *error) { std::vector<uint32_t> spirv; bool success = GLSLtoSPV(stage, code, spirv, error); if (!error->empty()) { if (success) { ERROR_LOG(G3D, "Warnings in shader compilation!"); } else { ERROR_LOG(G3D, "Error in shader compilation!"); } ERROR_LOG(G3D, "Messages: %s", error->c_str()); ERROR_LOG(G3D, "Shader source:\n%s", code); <API key>("Messages:\n"); <API key>(error->c_str()); return VK_NULL_HANDLE; } else { VkShaderModule module; if (vulkan->CreateShaderModule(spirv, &module)) { return module; } else { return VK_NULL_HANDLE; } } }
'use strict'; angular.module('sbAdminApp') .controller('CustomerListCtrl', function ($scope, $http, $rootScope, $stateParams, $location) { $scope.page = {itemsPerPage: 20}; $scope.iForm = {pageSize : $scope.page.itemsPerPage}; $scope.showLevel = true; if ($stateParams.searchFounder == 1) { $scope.searchFounder = true; } $scope.level = $stateParams.level; if ($stateParams.page) { $scope.iForm.page = parseInt($stateParams.page); } $http.get("/org/customer/level-enumeration") .success(function (data) { $scope.levels = data; }); $http.get("/org/customer/status-enumeration") .success(function (data) { $scope.statuses = data; }); $http({ url: "/org/team/all", method: "GET" }) .success(function (data) { $scope.teams = data; }); $http({ url: "/org/customer/list", method: "GET", params: $scope.iForm }) .success(function (data) { $scope.items = data.content; $scope.page.totalItems = data.total; $scope.page.currentPage = data.page + 1; }); $scope.pageChanged = function() { $scope.iForm.page = $scope.page.currentPage - 1; $location.search($scope.iForm); } $scope.search = function () { $scope.iForm.page = 0; $location.search($scope.iForm); } });
.itemmoex{ float: left; padding: 10px; } .moexname { float:left; } .moexvalue { float: left; font-size: 24px; line-height: 30px; margin-left: 10px; } .moexdif { float: left; clear: left; margin-left: 40px; } .moexlegend { clear: left; font-size: 12px; color:#999; margin: 0 0 3px 46px; }
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <sys/types.h> #include <fcntl.h> #include <time.h> int main(void) { int handle; char msg[] = "This is a test"; char ch[50]; int n; /* create a file */ handle = open("hello.txt", O_CREAT | O_RDWR, 0777); /* write some data to the file */ write(handle, msg, strlen(msg)); /* seek to the beginning of the file */ lseek(handle, 0L, SEEK_SET); /* reads chars from the file until we hit EOF */ /* do { read(handle, &ch, 1); printf("%c", ch); }while(ch != EOF);*/ while((n= read(handle, ch, 50)) > 0) { ch[n]='\0'; printf("%s\n", ch); sleep(1); } close(handle); return 0; }
# INSTALL PROCEDURE (for Debian linux) for copy/paste on terminal use ctrl+shift+v (you must activate terminal shortcut keys) # COMMANDS (when install is finished) SSH CONNECT: ssh *user@serverip* -p *portnumber* REMOTE CONNECT: mysql -h *serverip* -P *mariadbport* -u root -p DUMP: mysqldump -h *serverip* -P *mariadbport* -u dump -p custompos > dump.sql DUMP: ssh *user@serverip* -p *sshport* mysqldump -u root -p custompos > dump.sql LOCAL RESTORE: mysql -u root -p custompos < dump.sql REMOTE RESTORE: - on client copy dump file to /home/*user*/dump.sql then: - scp -p *sshport* dump.sql *user@serverip*:/home/*user*/dump.sql - on server cd /home/*user*/ then: - mysql -u root -p custompos < dump.sql # SSH SETUP apt-get install openssh-server (if not already done) apt-get install sudo (root is often brutforced and should be accessible only localy) adduser *user* (if needed) usermod -aG sudo *user* nano /etc/sudoers root ALL=(ALL:ALL) ALL user ALL=(ALL:ALL) ALL on client ssh-keygen -t rsa (save securely your passphrase) ssh-copy-id *user@serverip* (passphrase needed, if no key is found, reload key with: ssh-add ~/.ssh/id_rsa) on server nano /etc/ssh/sshd_config Port [sshport] Protocol 2 <API key> yes PermitRootLogin no (before activing this, verify if the user access works) RSAAuthentication no UsePAM no <API key> no <API key> no <API key> no <API key> no MaxAuthTries 10 ClientAliveInterval 600 ClientAliveCountMax 0 restart ssh server /etc/init.d/ssh reload # TIME SERVER (customPOS use client date, they must be up to date) apt-get install ntp nano /etc/ntp.conf (change for your country NTP pool) systemctl enable ntp (for automatic NTP start on boot) ntpq -p (to check if the server is synchronized) sudo ntpdate serverip (to check if client can connect to the server) # MARIADB apt-get install mariadb-server (if needed) remove every *.cnf file in /etc/mysql and subdirectories except: debian.cnf debian-start mariadb.cnf my.cnf <API key> nano /etc/mysql/mariadb.cnf [client-server] port=mariadbport [mysqld] <API key>=latin1 sql_mode=STRICT_ALL_TABLES <API key>=InnoDB <API key>=InnoDB <API key>=InnoDB datadir=/var/lib/mysql/ temp-pool <API key> <API key>=2 <API key>=4G [mysqldump] quick quote-names max_allowed_packet = 16M /etc/init.d/mysql reload check if mariadb is listening on your chosen port: netstat -anp | grep *portnumber* if not you may have duplicate config file # CREATE DATABASE & TABLES & STORED PROCEDURES ssh *user@serverip* -p *portnumber* mysql -u root -p copy/paste (ctrl+shift+v) the content of tables.sql directly on mysql session copy/paste (ctrl+shift+v) the content of stored.procedure.sql directly on mysql session # AUTOMATIC BACKUP (example for weekly backup everyday at 22h00, older files will be overwrited) create and grant 'dump'@'localhost' : CREATE USER 'dump'@'localhost' IDENTIFIED BY 'password'; GRANT LOCK TABLES,SELECT ON custompos.* TO 'dump'@'localhost'; crontab -e 0 22 * * 1 mysqldump -u dump -ppassword custompos > /home/user/dump1.sql 0 22 * * 2 mysqldump -u dump -ppassword custompos > /home/user/dump2.sql 0 22 * * 3 mysqldump -u dump -ppassword custompos > /home/user/dump3.sql 0 22 * * 4 mysqldump -u dump -ppassword custompos > /home/user/dump4.sql 0 22 * * 5 mysqldump -u dump -ppassword custompos > /home/user/dump5.sql 0 22 * * 6 mysqldump -u dump -ppassword custompos > /home/user/dump6.sql 0 22 * * 0 mysqldump -u dump -ppassword custompos > /home/user/dump0.sql # USERS & PRIVILEGE CREATE AND GRANT ADMINISTRATOR (access via LibreOffice-Base, be carefull with these privileges: accidental mouse move will creat new inserts) CREATE USER 'admin'@'x.x.x.%' IDENTIFIED BY 'password'; GRANT ALL ON custompos.customer TO 'admin'@'x.x.x.%'; GRANT SELECT,UPDATE,DELETE ON custompos.devis TO 'admin'@'x.x.x.%'; GRANT ALL ON custompos.devisdet TO 'admin'@'x.x.x.%'; GRANT SELECT,UPDATE,DELETE ON custompos.entree TO 'admin'@'x.x.x.%'; GRANT ALL ON custompos.entreedet TO 'admin'@'x.x.x.%'; GRANT SELECT,UPDATE,DELETE ON custompos.fact TO 'admin'@'x.x.x.%'; GRANT ALL ON custompos.factdet TO 'admin'@'x.x.x.%'; GRANT ALL ON custompos.fourn TO 'admin'@'x.x.x.%'; GRANT SELECT,UPDATE,DELETE ON custompos.regl TO 'admin'@'x.x.x.%'; GRANT ALL ON custompos.stk TO 'admin'@'x.x.x.%'; GRANT SELECT ON custompos.output TO 'admin'@'x.x.x.%'; GRANT ALL ON custompos.utilisateur TO 'admin'@'x.x.x.%'; CREATE AND GRANT ASSISTANT (access via LibreOffice-Base, Example to adapt) REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'assistant'@'x.x.x.%'; GRANT SELECT,UPDATE (datefact,utilisateur,numclient,nom,lieu,transport,bc,pay1,pay2,pay3,pay4,mode1,mode2,mode3,mode4,rendu,typefact,echeance,lettre,contact,chq1,chq2,chq3,chq4,bl) ON `custompos`.`fact` TO 'assistant'@'x.x.x.%'; GRANT SELECT,UPDATE (design) ON `custompos`.`factdet` TO 'assistant'@'x.x.x.%'; GRANT SELECT,UPDATE ON `custompos`.`regl` TO 'assistant'@'x.x.x.%'; GRANT SELECT,UPDATE ON `custompos`.`stk` TO 'assistant'@'x.x.x.%'; GRANT SELECT,UPDATE ON `custompos`.`customer` TO 'assistant'@'x.x.x.%'; GRANT SELECT,UPDATE (nom,fact) ON `custompos`.`entree` TO 'assistant'@'x.x.x.%'; GRANT SELECT ON `custompos`.`entreedet` TO 'assistant'@'x.x.x.%'; GRANT SELECT ON custompos.output TO 'assistant'@'x.x.x.%'; CREATE AND GRANT PRIVILEGED USERS (for customPOS access) CREATE USER 'user'@'x.x.x.%' IDENTIFIED BY 'password'; GRANT SELECT,UPDATE ON custompos.customer TO 'user'@'x.x.x.%' GRANT SELECT,INSERT ON custompos.devis TO 'user'@'x.x.x.%' GRANT SELECT,INSERT ON custompos.devisdet TO 'user'@'x.x.x.%' GRANT SELECT,INSERT ON custompos.fact TO 'user'@'x.x.x.%' GRANT SELECT,INSERT ON custompos.factdet TO 'user'@'x.x.x.%' GRANT SELECT,INSERT ON custompos.regl TO 'user'@'x.x.x.%' GRANT SELECT,UPDATE ON custompos.stk TO 'user'@'x.x.x.%' GRANT SELECT ON custompos.utilisateur TO 'user'@'x.x.x.%' GRANT UPDATE (freecell) ON custompos.utilisateur TO 'user'@'x.x.x.%' GRANT EXECUTE ON PROCEDURE custompos.balances TO 'user'@'x.x.x.%' GRANT EXECUTE ON PROCEDURE custompos.balance TO 'user'@'x.x.x.%' GRANT EXECUTE ON PROCEDURE custompos.fdj2 TO 'user'@'x.x.x.%' CREATE AND GRANT RESTRICTED USERS (for customPOS access) CREATE USER 'user'@'x.x.x.%' IDENTIFIED BY 'password' GRANT SELECT,UPDATE ON custompos.customer TO 'user'@'x.x.x.%' GRANT SELECT,INSERT ON custompos.devis TO 'user'@'x.x.x.%' GRANT SELECT,INSERT ON custompos.devisdet TO 'user'@'x.x.x.%' GRANT SELECT,INSERT ON custompos.entree TO 'user'@'x.x.x.%' GRANT SELECT,INSERT ON custompos.entreedet TO 'user'@'x.x.x.%' GRANT SELECT,INSERT ON custompos.fact TO 'user'@'x.x.x.%' GRANT SELECT,INSERT ON custompos.factdet TO 'user'@'x.x.x.%' GRANT SELECT ON custompos.fourn TO 'user'@'x.x.x.%' GRANT SELECT,INSERT ON custompos.regl TO 'user'@'x.x.x.%' GRANT SELECT,UPDATE ON custompos.stk TO 'user'@'x.x.x.%' GRANT SELECT ON custompos.output TO 'user'@'x.x.x.%' GRANT SELECT ON custompos.utilisateur TO 'user'@'x.x.x.%' GRANT EXECUTE ON PROCEDURE custompos.balances TO 'user'@'x.x.x.%' GRANT EXECUTE ON PROCEDURE custompos.balance TO 'user'@'x.x.x.%'
#!/usr/bin/env lua -- -*-lua-*- -- $Id: pm_led.lua $ -- Created: Wed Mar 13 09:38:57 2013 mstenber -- Last modified: Mon Sep 30 13:33:12 2013 mstenber -- Edit time: 21 min -- This is used to indicate the pm.lua state to external parties. Two -- notifications are currently supported: -- 'pd' indicates there is PD lease received on interfaces -- 'global' indicates global address has been assigned to an -- interfaces (ospf-lap) require 'pm_handler' require 'mst' LED_SCRIPT='/usr/share/hnet/led_handler.sh' module(..., package.seeall) local _pmh = pm_handler.pm_handler_with_pa pm_led = _pmh:new_subclass{class='pm_led'} function pm_led:init() _pmh.init(self) self.states = {} self.enabled = true end function pm_led:set_state(ledname, value) local old = self.states[ledname] if old == value then return end self.states[ledname] = value self:apply_state(ledname, value) end function pm_led:apply_state(ledname, value) self:d('applying led state', ledname, value) if not self.enabled then self:d('not enabled, skipping led update') return end local s = string.format('%s %s %s', LED_SCRIPT, ledname, value and '1' or 0) self.shell(s) end function pm_led:<API key>() -- this is a hack; but it can remain a hack too.. self:d('<API key>') -- loop through skv, looking at stuff with prefix for k, v in pairs(self._pm.skv:get_combined_state()) do --self:d('key is', k) if string.find(k, '^' .. elsa_pa.PD_SKVPREFIX) then self:d('considering', k) for i, v in ipairs(v) do if v.prefix then self:d('found prefix!', v) return true end end end end return false end function pm_led:skv_changed(k, v) if string.find(k, '^' .. elsa_pa.PD_SKVPREFIX) then for i, v in ipairs(v) do if v.prefix then self:queue() end end end end function pm_led:have_global_ipv6() for i, v in ipairs(self.usp:get_ipv6()) do -- for the time being, we're happy with ULAs too if they're desired -- (XXX - should this be the case?) return true end return false end function pm_led:run() local found = self:<API key>() self:set_state('pd', found) local found = self:have_global_ipv6() self:set_state('global', found) end
# -*- coding: utf-8 -*- import random from operator import attrgetter import pytest from cfme import test_requirements from cfme.cloud.provider import CloudProvider from cfme.cloud.provider.azure import AzureProvider from cfme.cloud.provider.ec2 import EC2Provider from cfme.cloud.provider.gce import GCEProvider from cfme.cloud.provider.openstack import OpenStackProvider from cfme.common.provider import BaseProvider from cfme.infrastructure.provider.rhevm import RHEVMProvider from cfme.infrastructure.provider.virtualcenter import VMwareProvider from cfme.utils import conf from cfme.utils.blockers import BZ from cfme.utils.log import logger from cfme.utils.wait import wait_for from cfme.fixtures.provider import setup_or_skip pytestmark = [ pytest.mark.tier(1), test_requirements.c_and_u, pytest.mark.provider( [VMwareProvider, RHEVMProvider, EC2Provider, OpenStackProvider, AzureProvider, GCEProvider], required_fields=[(['cap_and_util', 'capandu_vm'], 'cu-24x7')], scope="module") ] @pytest.fixture(scope="module") def <API key>(request, provider): BaseProvider.clear_providers() setup_or_skip(request, provider) yield BaseProvider.clear_providers() def vm_count(appliance, metrics_tbl, mgmt_system_id): return bool(appliance.db.client.session.query(metrics_tbl).filter( metrics_tbl.parent_ems_id == mgmt_system_id).filter( metrics_tbl.resource_type == "VmOrTemplate").count() ) def host_count(appliance, metrics_tbl, mgmt_system_id): return bool(appliance.db.client.session.query(metrics_tbl).filter( metrics_tbl.parent_ems_id == mgmt_system_id).filter( metrics_tbl.resource_type == "Host").count() ) @pytest.fixture(scope="module") def metrics_collection(appliance, <API key>, provider, enable_candu): """Check the db is gathering collection data for the given provider. Metadata: test_flag: metrics_collection """ metrics_tbl = appliance.db.client['metrics'] mgmt_systems_tbl = appliance.db.client['<API key>'] logger.info("Fetching provider ID for %s", provider.key) mgmt_system_id = appliance.db.client.session.query(mgmt_systems_tbl).filter( mgmt_systems_tbl.name == conf.cfme_data.get('management_systems', {})[provider.key]['name'] ).first().id logger.info("ID fetched; testing metrics collection now") # vms for both infa and cloud provider wait_for( vm_count, [appliance, metrics_tbl, mgmt_system_id], delay=20, timeout=1500, fail_condition=False, message="wait for VMs") # host only for infa if provider.category == "infra": wait_for( vm_count, [appliance, metrics_tbl, mgmt_system_id], delay=20, timeout=1500, fail_condition=False, message="wait for hosts.") def get_host_name(provider): cfme_host = random.choice(provider.data["hosts"]) return cfme_host.name def query_metric_db(appliance, provider, metric, vm_name=None, host_name=None): metrics_tbl = appliance.db.client['metrics'] ems = appliance.db.client['<API key>'] if vm_name is None: if host_name is not None: object_name = host_name elif vm_name is not None: object_name = vm_name with appliance.db.client.transaction: provs = ( appliance.db.client.session.query(metrics_tbl.id) .join(ems, metrics_tbl.parent_ems_id == ems.id) .filter(metrics_tbl.resource_name == object_name, ems.name == provider.name) ) return appliance.db.client.session.query(metrics_tbl).filter( metrics_tbl.id.in_(provs.subquery())) @pytest.mark.rhv2 # Tests to check that specific metrics are being collected @pytest.mark.meta( blockers=[BZ(1511099, forced_streams=["5.8", "upstream"], unblock=lambda provider: not provider.one_of(GCEProvider))] ) def <API key>(metrics_collection, appliance, provider): vm_name = provider.data['cap_and_util']['capandu_vm'] if provider.category == "infra": query = query_metric_db(appliance, provider, '<API key>', vm_name) average_rate = attrgetter('<API key>') elif provider.category == "cloud": query = query_metric_db(appliance, provider, '<API key>', vm_name) average_rate = attrgetter('<API key>') for record in query: if average_rate(record) is not None: assert average_rate(record) > 0, 'Zero VM CPU Usage' break @pytest.mark.rhv2 @pytest.mark.uncollectif( lambda provider: provider.one_of(EC2Provider) or provider.one_of(GCEProvider)) def <API key>(metrics_collection, appliance, provider): vm_name = provider.data['cap_and_util']['capandu_vm'] if provider.type == 'azure': query = query_metric_db(appliance, provider, '<API key>', vm_name) average_rate = attrgetter('<API key>') else: query = query_metric_db(appliance, provider, 'derived_memory_used', vm_name) average_rate = attrgetter('derived_memory_used') for record in query: if average_rate(record) is not None: assert average_rate(record) > 0, 'Zero VM Memory Usage' break @pytest.mark.rhv2 @pytest.mark.meta( blockers=[BZ(1408963, forced_streams=["5.8", "upstream"], unblock=lambda provider: not provider.one_of(RHEVMProvider))] ) @pytest.mark.meta( blockers=[BZ(1511099, forced_streams=["5.8", "upstream"], unblock=lambda provider: not provider.one_of(GCEProvider))] ) def <API key>(metrics_collection, appliance, provider): vm_name = provider.data['cap_and_util']['capandu_vm'] query = query_metric_db(appliance, provider, '<API key>', vm_name) for record in query: if record.<API key> is not None: assert record.<API key> > 0, 'Zero VM Network IO' break @pytest.mark.rhv2 @pytest.mark.uncollectif( lambda provider: provider.one_of(EC2Provider)) @pytest.mark.meta( blockers=[BZ(1511099, forced_streams=["5.8", "upstream"], unblock=lambda provider: not provider.one_of(GCEProvider))] ) def <API key>(metrics_collection, appliance, provider): vm_name = provider.data['cap_and_util']['capandu_vm'] query = query_metric_db(appliance, provider, '<API key>', vm_name) for record in query: if record.<API key> is not None: assert record.<API key> > 0, 'Zero VM Disk IO' break @pytest.mark.rhv2 @pytest.mark.uncollectif( lambda provider: provider.one_of(CloudProvider)) def <API key>(metrics_collection, appliance, provider): host_name = get_host_name(provider) query = query_metric_db(appliance, provider, '<API key>', host_name) for record in query: if record.<API key> is not None: assert record.<API key> > 0, 'Zero Host CPU Usage' break @pytest.mark.rhv2 @pytest.mark.uncollectif( lambda provider: provider.one_of(CloudProvider)) def <API key>(metrics_collection, appliance, provider): host_name = get_host_name(provider) query = query_metric_db(appliance, provider, 'derived_memory_used', host_name) for record in query: if record.derived_memory_used is not None: assert record.derived_memory_used > 0, 'Zero Host Memory Usage' break @pytest.mark.rhv2 @pytest.mark.uncollectif( lambda provider: provider.one_of(CloudProvider)) def <API key>(metrics_collection, appliance, provider): host_name = get_host_name(provider) query = query_metric_db(appliance, provider, '<API key>', host_name) for record in query: if record.<API key> is not None: assert record.<API key> > 0, 'Zero Host Network IO' break @pytest.mark.rhv2 @pytest.mark.uncollectif( lambda provider: provider.one_of(CloudProvider)) @pytest.mark.meta( blockers=[BZ(1424589, forced_streams=["5.8", "5.9", "upstream"], unblock=lambda provider: not provider.one_of(RHEVMProvider))] ) def <API key>(metrics_collection, appliance, provider): host_name = get_host_name(provider) query = query_metric_db(appliance, provider, '<API key>', host_name) for record in query: if record.<API key> is not None: assert record.<API key> > 0, 'Zero Host Disk IO' break
#nav-drop { margin-left: 50px; } #navbar > li { display: inline; float: left; margin-left: 30px; } #navbar > ul > li > a { color: #fff; text-shadow: 0 0 2px rgba(0, 0, 0, 0.4); } #navbar > li > a:hover { background: none; } #navbar { margin-top: 105px; background: none; border: none; box-shadow: none; } #navbar .active > a { background: none; } #navbar > li a.dropdown-toggle { background: none; } #navbar > li > ul.dropdown-menu { border-top: 2px solid #3e3433; margin-top: 15px; } /* Navbar "hovernav" dropdown menu - this works only for screen sizes larger than phones. The Bootstrap CSS is unchanged. */ nav a { text-decoration: none; } nav > ul > li { float: left; margin-left: 30px; } .navbar-nav > li { margin-left: 40px; } #navbar .navbar-default .navbar-nav > li > a { color: #fff; } #nav-1 li a { color: #fff; } #navbar a { text-transform: capitalize; } #menu-bootstrap_menu li a { color: #fff; text-shadow: 0 0 1px rgba(0, 0, 0, 0.7); font-family: 'Merriweather', serif; } #menu-bootstrap_menu > li > ul > li { color: #000; border-bottom: 1px solid #3e3433; } #menu-bootstrap_menu > li > ul > li > a { color: #000; } #menu-bootstrap_menu > li > ul > li:last-child { border: none; } #menu-bootstrap_menu > li > ul { border-top: 3px solid #3e3433; opacity: 0.8; } #dropdown { border-top: 3px solid #3e3433; opacity: 0.8; } #dropdown li { border-bottom: 1px solid #3e3433; } #dropdown li:last-child { border: none; } #dropdown li a { color: #3e3433; } #navbar .navbar-nav > .open > a, #navbar .navbar-nav > .open > a:hover, #navbar .navbar-nav > .open > a:focus { background: none; } @media all and (max-width: 1200px) { #menu-bootstrap_menu li { margin-left: 10px; } #menu-bootstrap_menu li:last-child { display: none; } } @media all and (max-width: 767px) { #menu-bootstrap_menu { background: #372d2b; width: 440px; margin-left: 130px; z-index: 1; position: relative; } #collapse { margin-top: -38px; border: none; } } @media all and (max-width:480px){ #top_text span { display:none; } } .navbar-toggle { border: none; } #menu-bootstrap_menu > li > ul > li > a { color: #fff; } } /** * contact css */ #contact_heading h2 { font-family: 'Merriweather', serif; text-shadow: 0 0 2px rgba(0, 0, 0, 0.7); border-bottom: 1px dotted #372d2b; } #required { content: '*'; color: red; } #contact_page { box-shadow: 0 1px 5px rgba(0, 0, 0, 0.7); width: 1100px; margin: 0 auto } #contact_page_h2 { font-family: 'Merriweather', serif; text-shadow: 0 0 2px rgba(0, 0, 0, 0.7); } .widget_wysija_cont .wysija-submit { margin-left: 100px; margin-bottom: 20px; } #model-content { color: #382e2c; } #navigation { margin-top: 40px; } body { color: #fff; } a { color: #372d2b; } #header { background: url("../images/header.png"); height: 180px; } .top_header { background-color: #313030; height: 32px; } #top_text { color: #fff; line-height: 30px; } #top_text a { color: #fff; } #logo { margin-top: -102px; } #reservation { background-color: #c24818; padding: 5px 15px 5px 15px; margin-top: 10px; border:none; color:#fff; } #wine-menu { background-color: #c24818; padding: 5px 15px 5px 15px; border:none; color:#fff; } #reservation a { color: #fff; text-decoration: none; } #reservation:hover { background-color: #953712; } #bottom_footer { background-color: #f3f3f3; padding-top: 20px; width: 100%; box-shadow: 0 1px 5px rgba(0, 0, 0, 0.7); padding-bottom: 50px; border-top: 1px solid #eef; margin-top: 10px; } .bottom_footer_h2 { color: #693523; text-shadow: 0 0 1px rgba(0, 0, 0, 0.7); font-family: 'Merriweather', serif; } #bottom_footer_1 ul { margin-left: 10px; font-family: 'Merriweather', serif; } #bottom_footer_1 ul li a { color: #a8a8a8; } #bottom_footer_1 ul li a:hover { _text-decoration: none; color: #693523; } #bottom_footer_0 { margin-top: 30px; padding-left: 30px; } #<API key> img { float: left; } #<API key> { padding-top: 20px; } @media all and (max-width: 990px) { #<API key> img { display: none; } } @media all and (max-width: 768px) { #nav-1 > li { margin-left: 10px; } } #facebook { color: #3b5998; } #twitter { color: #4099FF; } #google-plus { color: #D34836; } #google-plus:hover { color: #712319; text-decoration: none; } #twitter:hover { color: #0065d9; text-decoration: none; } #facebook:hover { color: #1e2e4f; text-decoration: none; } #close { margin-top: -30px; font-size: 30px; color: #000; } #main-content { height: 400px; } #our-partner img { display: inline; float: left; margin-right: 20px; padding: 10px 0; } #last_bottom_footer { background: #362c2a; height: 30px; } #restaurants_footer { background: #f9f2ea; border: 1px solid #eef; box-shadow: 0 2px 9px; } #restaurant_content { color: #000; } .restaurant_h2 { color: #693523; text-shadow: 0 0 1px rgba(0, 0, 0, 0.7); font-family: 'Merriweather', serif; } #restaurant_img { margin-left: 5px; } #thumbs_60_1 { border: 1px solid #eef; padding-left:20px; padding-top:10px; } .photospace .slideshow-container { margin-left:10px; } #menu-bootstrap_menu>li>ul>li>a { color:#000; } .menu_items { font-weight: bold; float:left; padding-left: 5px; } .menu_price { font-weight: bold; float:right; display: block; } .menu_description { font-style: italic; font-variant: normal; display: block; padding-left:10px; } #menu-sidebar { background:linear-gradient(to bottom, #c24818 0%,#c24818 100%); background:-<API key>(to bottom, #c24818 0%,#c24818 100%); background:-moz-linear-gradient(to bottom, #c24818 0%,#c24818 100%); background:-o-linear-gradient(to bottom, #c24818 0%,#c24818 100%); border-radius: 5px; padding:10px; margin-top:40px; } #menu-sidebar>ul>li>a { color:#fff; text-shadow: 1px 1px 2px rgba(0,0,0,0.3); padding-top:12px; font-size:16px; } #menu-sidebar>ul>li { border-bottom: 1px solid #eef; } #menu-sidebar>ul>li:last-child { border:none; } line-height: 30px; color:#fff; font-size:14px; } b { color:#c24818; text-shadow:0 0 1px rgba(0,0,0,0.5); }
(function() { tinymce.PluginManager.requireLangPack('kotofey_shortcodes'); tinymce.create('tinymce.plugins.kotofey_shortcodes', { init : function(ed, url) { ed.addCommand('<API key>', function() { ed.windowManager.open({ file : url + '/interface.php', width : 290 + ed.getLang('kotofey_shortcodes.delta_width', 0), height : 150 + ed.getLang('kotofey_shortcodes.delta_height', 0), inline : 1 }, { plugin_url : url }); }); ed.addButton('kotofey_shortcodes', { title : 'Click to add a shortcode', cmd : '<API key>', image : url + '/shortcode_button.png' }); ed.onNodeChange.add(function(ed, cm, n) { cm.setActive('kotofey_shortcodes', n.nodeName == 'IMG'); }); }, createControl : function(n, cm) { return null; }, getInfo : function() { return { longname : 'kotofey_shortcodes', author : 'kotofey', authorurl : 'http://themeforest.net/user/kotofey', infourl : 'http://themeforest.net/user/kotofey', version : "1.0" }; } }); tinymce.PluginManager.add('kotofey_shortcodes', tinymce.plugins.kotofey_shortcodes); })();
#include <linux/slab.h> #include <linux/kernel.h> #include <linux/blkdev.h> #include <linux/spinlock.h> #include <scsi/scsi.h> #include <scsi/scsi_host.h> #include <scsi/scsi_cmnd.h> #include <scsi/scsi_eh.h> #include <scsi/scsi_device.h> #include <scsi/scsi_tcq.h> #include <scsi/scsi_transport.h> #include <linux/libata.h> #include <linux/hdreg.h> #include <linux/uaccess.h> #include <linux/suspend.h> #include <asm/unaligned.h> #include "libata.h" #define SECTOR_SIZE 512 #define ATA_SCSI_RBUF_SIZE 4096 static DEFINE_SPINLOCK(ata_scsi_rbuf_lock); static u8 ata_scsi_rbuf[ATA_SCSI_RBUF_SIZE]; typedef unsigned int (*ata_xlat_func_t)(struct ata_queued_cmd *qc); static struct ata_device *__ata_scsi_find_dev(struct ata_port *ap, const struct scsi_device *scsidev); static struct ata_device *ata_scsi_find_dev(struct ata_port *ap, const struct scsi_device *scsidev); static int ata_scsi_user_scan(struct Scsi_Host *shost, unsigned int channel, unsigned int id, unsigned int lun); #define RW_RECOVERY_MPAGE 0x1 #define <API key> 12 #define CACHE_MPAGE 0x8 #define CACHE_MPAGE_LEN 20 #define CONTROL_MPAGE 0xa #define CONTROL_MPAGE_LEN 12 #define ALL_MPAGES 0x3f #define ALL_SUB_MPAGES 0xff static const u8 <API key>[<API key>] = { RW_RECOVERY_MPAGE, <API key> - 2, (1 << 7), /* AWRE */ 0, /* read retry count */ 0, 0, 0, 0, 0, /* write retry count */ 0, 0, 0 }; static const u8 def_cache_mpage[CACHE_MPAGE_LEN] = { CACHE_MPAGE, CACHE_MPAGE_LEN - 2, 0, /* contains WCE, needs to be 0 for logic */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* contains DRA, needs to be 0 for logic */ 0, 0, 0, 0, 0, 0, 0 }; static const u8 def_control_mpage[CONTROL_MPAGE_LEN] = { CONTROL_MPAGE, CONTROL_MPAGE_LEN - 2, 2, /* DSENSE=0, GLTSD=1 */ 0, /* [QAM+QERR may be 1, see 05-359r1] */ 0, 0, 0, 0, 0xff, 0xff, 0, 30 /* extended self test time, see 05-359r1 */ }; /* * libata transport template. libata doesn't do real transport stuff. * It just needs the eh_timed_out hook. */ static struct <API key> <API key> = { .eh_strategy_handler = ata_scsi_error, .eh_timed_out = ata_scsi_timed_out, .user_scan = ata_scsi_user_scan, }; static const struct { enum link_pm value; const char *name; } link_pm_policy[] = { { NOT_AVAILABLE, "max_performance" }, { MIN_POWER, "min_power" }, { MAX_PERFORMANCE, "max_performance" }, { MEDIUM_POWER, "medium_power" }, }; static const char *ata_scsi_lpm_get(enum link_pm policy) { int i; for (i = 0; i < ARRAY_SIZE(link_pm_policy); i++) if (link_pm_policy[i].value == policy) return link_pm_policy[i].name; return NULL; } static ssize_t ata_scsi_lpm_put(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct Scsi_Host *shost = class_to_shost(dev); struct ata_port *ap = ata_shost_to_port(shost); enum link_pm policy = 0; int i; /* * we are skipping array location 0 on purpose - this * is because a value of NOT_AVAILABLE is displayed * to the user as max_performance, but when the user * writes "max_performance", they actually want the * value to match MAX_PERFORMANCE. */ for (i = 1; i < ARRAY_SIZE(link_pm_policy); i++) { const int len = strlen(link_pm_policy[i].name); if (strncmp(link_pm_policy[i].name, buf, len) == 0) { policy = link_pm_policy[i].value; break; } } if (!policy) return -EINVAL; ata_lpm_schedule(ap, policy); return count; } static ssize_t ata_scsi_lpm_show(struct device *dev, struct device_attribute *attr, char *buf) { struct Scsi_Host *shost = class_to_shost(dev); struct ata_port *ap = ata_shost_to_port(shost); const char *policy = ata_scsi_lpm_get(ap->pm_policy); if (!policy) return -EINVAL; return snprintf(buf, 23, "%s\n", policy); } DEVICE_ATTR(<API key>, S_IRUGO | S_IWUSR, ata_scsi_lpm_show, ata_scsi_lpm_put); EXPORT_SYMBOL_GPL(<API key>); static ssize_t ata_scsi_park_show(struct device *device, struct device_attribute *attr, char *buf) { struct scsi_device *sdev = to_scsi_device(device); struct ata_port *ap; struct ata_link *link; struct ata_device *dev; unsigned long flags, now; unsigned int uninitialized_var(msecs); int rc = 0; ap = ata_shost_to_port(sdev->host); spin_lock_irqsave(ap->lock, flags); dev = ata_scsi_find_dev(ap, sdev); if (!dev) { rc = -ENODEV; goto unlock; } if (dev->flags & ATA_DFLAG_NO_UNLOAD) { rc = -EOPNOTSUPP; goto unlock; } link = dev->link; now = jiffies; if (ap->pflags & <API key> && link->eh_context.unloaded_mask & (1 << dev->devno) && time_after(dev->unpark_deadline, now)) msecs = jiffies_to_msecs(dev->unpark_deadline - now); else msecs = 0; unlock: spin_unlock_irq(ap->lock); return rc ? rc : snprintf(buf, 20, "%u\n", msecs); } static ssize_t ata_scsi_park_store(struct device *device, struct device_attribute *attr, const char *buf, size_t len) { struct scsi_device *sdev = to_scsi_device(device); struct ata_port *ap; struct ata_device *dev; long int input; unsigned long flags; int rc; rc = strict_strtol(buf, 10, &input); if (rc || input < -2) return -EINVAL; if (input > ATA_TMOUT_MAX_PARK) { rc = -EOVERFLOW; input = ATA_TMOUT_MAX_PARK; } ap = ata_shost_to_port(sdev->host); spin_lock_irqsave(ap->lock, flags); dev = ata_scsi_find_dev(ap, sdev); if (unlikely(!dev)) { rc = -ENODEV; goto unlock; } if (dev->class != ATA_DEV_ATA) { rc = -EOPNOTSUPP; goto unlock; } if (input >= 0) { if (dev->flags & ATA_DFLAG_NO_UNLOAD) { rc = -EOPNOTSUPP; goto unlock; } dev->unpark_deadline = ata_deadline(jiffies, input); dev->link->eh_info.dev_action[dev->devno] |= ATA_EH_PARK; <API key>(ap); complete(&ap->park_req_pending); } else { switch (input) { case -1: dev->flags &= ~ATA_DFLAG_NO_UNLOAD; break; case -2: dev->flags |= ATA_DFLAG_NO_UNLOAD; break; } } unlock: <API key>(ap->lock, flags); return rc ? rc : len; } DEVICE_ATTR(unload_heads, S_IRUGO | S_IWUSR, ata_scsi_park_show, ata_scsi_park_store); EXPORT_SYMBOL_GPL(<API key>); static void ata_scsi_set_sense(struct scsi_cmnd *cmd, u8 sk, u8 asc, u8 ascq) { cmd->result = (DRIVER_SENSE << 24) | <API key>; <API key>(0, cmd->sense_buffer, sk, asc, ascq); } static ssize_t <API key>(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct Scsi_Host *shost = class_to_shost(dev); struct ata_port *ap = ata_shost_to_port(shost); if (ap->ops->em_store && (ap->flags & ATA_FLAG_EM)) return ap->ops->em_store(ap, buf, count); return -EINVAL; } static ssize_t <API key>(struct device *dev, struct device_attribute *attr, char *buf) { struct Scsi_Host *shost = class_to_shost(dev); struct ata_port *ap = ata_shost_to_port(shost); if (ap->ops->em_show && (ap->flags & ATA_FLAG_EM)) return ap->ops->em_show(ap, buf); return -EINVAL; } DEVICE_ATTR(em_message, S_IRUGO | S_IWUSR, <API key>, <API key>); EXPORT_SYMBOL_GPL(dev_attr_em_message); static ssize_t <API key>(struct device *dev, struct device_attribute *attr, char *buf) { struct Scsi_Host *shost = class_to_shost(dev); struct ata_port *ap = ata_shost_to_port(shost); return snprintf(buf, 23, "%d\n", ap->em_message_type); } DEVICE_ATTR(em_message_type, S_IRUGO, <API key>, NULL); EXPORT_SYMBOL_GPL(<API key>); static ssize_t <API key>(struct device *dev, struct device_attribute *attr, char *buf) { struct scsi_device *sdev = to_scsi_device(dev); struct ata_port *ap = ata_shost_to_port(sdev->host); struct ata_device *atadev = ata_scsi_find_dev(ap, sdev); if (ap->ops->sw_activity_show && (ap->flags & <API key>)) return ap->ops->sw_activity_show(atadev, buf); return -EINVAL; } static ssize_t <API key>(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct scsi_device *sdev = to_scsi_device(dev); struct ata_port *ap = ata_shost_to_port(sdev->host); struct ata_device *atadev = ata_scsi_find_dev(ap, sdev); enum sw_activity val; int rc; if (ap->ops->sw_activity_store && (ap->flags & <API key>)) { val = simple_strtoul(buf, NULL, 0); switch (val) { case OFF: case BLINK_ON: case BLINK_OFF: rc = ap->ops->sw_activity_store(atadev, val); if (!rc) return count; else return rc; } } return -EINVAL; } DEVICE_ATTR(sw_activity, S_IWUSR | S_IRUGO, <API key>, <API key>); EXPORT_SYMBOL_GPL(<API key>); struct device_attribute *<API key>[] = { &<API key>, NULL }; EXPORT_SYMBOL_GPL(<API key>); static void <API key>(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)) { ata_scsi_set_sense(cmd, ILLEGAL_REQUEST, 0x24, 0x0); /* "Invalid field in cbd" */ done(cmd); } /** * ata_std_bios_param - generic bios head/sector/cylinder calculator used by sd. * @sdev: SCSI device for which BIOS geometry is to be determined * @bdev: block device associated with @sdev * @capacity: capacity of SCSI device * @geom: location to which geometry will be output * * Generic bios head/sector/cylinder calculator * used by sd. Most BIOSes nowadays expect a XXX/255/16 (CHS) * mapping. Some situations may arise where the disk is not * bootable if this is not used. * * LOCKING: * Defined by the SCSI layer. We don't really care. * * RETURNS: * Zero. */ int ata_std_bios_param(struct scsi_device *sdev, struct block_device *bdev, sector_t capacity, int geom[]) { geom[0] = 255; geom[1] = 63; sector_div(capacity, 255*63); geom[2] = capacity; return 0; } /** * <API key> - unlock native capacity * @sdev: SCSI device to adjust device capacity for * * This function is called if a partition on @sdev extends beyond * the end of the device. It requests EH to unlock HPA. * * LOCKING: * Defined by the SCSI layer. Might sleep. */ void <API key>(struct scsi_device *sdev) { struct ata_port *ap = ata_shost_to_port(sdev->host); struct ata_device *dev; unsigned long flags; spin_lock_irqsave(ap->lock, flags); dev = ata_scsi_find_dev(ap, sdev); if (dev && dev->n_sectors < dev->n_native_sectors) { dev->flags |= <API key>; dev->link->eh_info.action |= ATA_EH_RESET; <API key>(ap); } <API key>(ap->lock, flags); ata_port_wait_eh(ap); } void ata_scsi_reconfig(struct scsi_device *sdev) { struct ata_port *ap = ata_shost_to_port(sdev->host); struct ata_device *dev; dev = ata_scsi_find_dev(ap, sdev); if (!dev) return; ata_dev_read_id(dev, &dev->class, 0, dev->id); dev->pio_mask = UINT_MAX; dev->mwdma_mask = UINT_MAX; dev->udma_mask = UINT_MAX; ata_dev_configure(dev); ata_set_mode(&ap->link, &dev); } EXPORT_SYMBOL(ata_scsi_reconfig); /** * ata_get_identity - Handler for HDIO_GET_IDENTITY ioctl * @ap: target port * @sdev: SCSI device to get identify data for * @arg: User buffer area for identify data * * LOCKING: * Defined by the SCSI layer. We don't really care. * * RETURNS: * Zero on success, negative errno on error. */ static int ata_get_identity(struct ata_port *ap, struct scsi_device *sdev, void __user *arg) { struct ata_device *dev = ata_scsi_find_dev(ap, sdev); u16 __user *dst = arg; char buf[40]; if (!dev) return -ENOMSG; if (copy_to_user(dst, dev->id, ATA_ID_WORDS * sizeof(u16))) return -EFAULT; ata_id_string(dev->id, buf, ATA_ID_PROD, ATA_ID_PROD_LEN); if (copy_to_user(dst + ATA_ID_PROD, buf, ATA_ID_PROD_LEN)) return -EFAULT; ata_id_string(dev->id, buf, ATA_ID_FW_REV, ATA_ID_FW_REV_LEN); if (copy_to_user(dst + ATA_ID_FW_REV, buf, ATA_ID_FW_REV_LEN)) return -EFAULT; ata_id_string(dev->id, buf, ATA_ID_SERNO, ATA_ID_SERNO_LEN); if (copy_to_user(dst + ATA_ID_SERNO, buf, ATA_ID_SERNO_LEN)) return -EFAULT; return 0; } /** * ata_cmd_ioctl - Handler for HDIO_DRIVE_CMD ioctl * @scsidev: Device to which we are issuing command * @arg: User provided data for issuing command * * LOCKING: * Defined by the SCSI layer. We don't really care. * * RETURNS: * Zero on success, negative errno on error. */ int ata_cmd_ioctl(struct scsi_device *scsidev, void __user *arg) { int rc = 0; u8 scsi_cmd[MAX_COMMAND_SIZE]; u8 args[4], *argbuf = NULL, *sensebuf = NULL; int argsize = 0; enum dma_data_direction data_dir; int cmd_result; if (arg == NULL) return -EINVAL; if (copy_from_user(args, arg, sizeof(args))) return -EFAULT; sensebuf = kzalloc(<API key>, GFP_NOIO); if (!sensebuf) return -ENOMEM; memset(scsi_cmd, 0, sizeof(scsi_cmd)); if (args[3]) { argsize = SECTOR_SIZE * args[3]; argbuf = kmalloc(argsize, GFP_KERNEL); if (argbuf == NULL) { rc = -ENOMEM; goto error; } scsi_cmd[1] = (4 << 1); /* PIO Data-in */ scsi_cmd[2] = 0x0e; /* no off.line or cc, read from dev, block count in sector count field */ data_dir = DMA_FROM_DEVICE; } else { scsi_cmd[1] = (3 << 1); /* Non-data */ scsi_cmd[2] = 0x20; /* cc but no off.line or data xfer */ data_dir = DMA_NONE; } scsi_cmd[0] = ATA_16; scsi_cmd[4] = args[2]; if (args[0] == ATA_CMD_SMART) { /* hack -- ide driver does this too */ scsi_cmd[6] = args[3]; scsi_cmd[8] = args[1]; scsi_cmd[10] = 0x4f; scsi_cmd[12] = 0xc2; } else { scsi_cmd[6] = args[1]; } scsi_cmd[14] = args[0]; /* Good values for timeout and retries? Values below from <API key>() for default case... */ cmd_result = scsi_execute(scsidev, scsi_cmd, data_dir, argbuf, argsize, sensebuf, (10*HZ), 5, 0, NULL); if (driver_byte(cmd_result) == DRIVER_SENSE) {/* sense data available */ u8 *desc = sensebuf + 8; cmd_result &= ~(0xFF<<24); /* DRIVER_SENSE is not an error */ /* If we set cc then ATA pass-through will cause a * check condition even if no error. Filter that. */ if (cmd_result & <API key>) { struct scsi_sense_hdr sshdr; <API key>(sensebuf, <API key>, &sshdr); if (sshdr.sense_key == 0 && sshdr.asc == 0 && sshdr.ascq == 0) cmd_result &= ~<API key>; } /* Send userspace a few ATA registers (same as drivers/ide) */ if (sensebuf[0] == 0x72 && /* format is "descriptor" */ desc[0] == 0x09) { /* code is "ATA Descriptor" */ args[0] = desc[13]; /* status */ args[1] = desc[3]; /* error */ args[2] = desc[5]; /* sector count (0:7) */ if (copy_to_user(arg, args, sizeof(args))) rc = -EFAULT; } } if (cmd_result) { rc = -EIO; goto error; } if ((argbuf) && copy_to_user(arg + sizeof(args), argbuf, argsize)) rc = -EFAULT; error: kfree(sensebuf); kfree(argbuf); return rc; } /** * ata_task_ioctl - Handler for HDIO_DRIVE_TASK ioctl * @scsidev: Device to which we are issuing command * @arg: User provided data for issuing command * * LOCKING: * Defined by the SCSI layer. We don't really care. * * RETURNS: * Zero on success, negative errno on error. */ int ata_task_ioctl(struct scsi_device *scsidev, void __user *arg) { int rc = 0; u8 scsi_cmd[MAX_COMMAND_SIZE]; u8 args[7], *sensebuf = NULL; int cmd_result; if (arg == NULL) return -EINVAL; if (copy_from_user(args, arg, sizeof(args))) return -EFAULT; sensebuf = kzalloc(<API key>, GFP_NOIO); if (!sensebuf) return -ENOMEM; memset(scsi_cmd, 0, sizeof(scsi_cmd)); scsi_cmd[0] = ATA_16; scsi_cmd[1] = (3 << 1); /* Non-data */ scsi_cmd[2] = 0x20; /* cc but no off.line or data xfer */ scsi_cmd[4] = args[1]; scsi_cmd[6] = args[2]; scsi_cmd[8] = args[3]; scsi_cmd[10] = args[4]; scsi_cmd[12] = args[5]; scsi_cmd[13] = args[6] & 0x4f; scsi_cmd[14] = args[0]; /* Good values for timeout and retries? Values below from <API key>() for default case... */ cmd_result = scsi_execute(scsidev, scsi_cmd, DMA_NONE, NULL, 0, sensebuf, (10*HZ), 5, 0, NULL); if (driver_byte(cmd_result) == DRIVER_SENSE) {/* sense data available */ u8 *desc = sensebuf + 8; cmd_result &= ~(0xFF<<24); /* DRIVER_SENSE is not an error */ /* If we set cc then ATA pass-through will cause a * check condition even if no error. Filter that. */ if (cmd_result & <API key>) { struct scsi_sense_hdr sshdr; <API key>(sensebuf, <API key>, &sshdr); if (sshdr.sense_key == 0 && sshdr.asc == 0 && sshdr.ascq == 0) cmd_result &= ~<API key>; } /* Send userspace ATA registers */ if (sensebuf[0] == 0x72 && /* format is "descriptor" */ desc[0] == 0x09) {/* code is "ATA Descriptor" */ args[0] = desc[13]; /* status */ args[1] = desc[3]; /* error */ args[2] = desc[5]; /* sector count (0:7) */ args[3] = desc[7]; /* lbal */ args[4] = desc[9]; /* lbam */ args[5] = desc[11]; /* lbah */ args[6] = desc[12]; /* select */ if (copy_to_user(arg, args, sizeof(args))) rc = -EFAULT; } } if (cmd_result) { rc = -EIO; goto error; } error: kfree(sensebuf); return rc; } static int ata_ioc32(struct ata_port *ap) { if (ap->flags & ATA_FLAG_PIO_DMA) return 1; if (ap->pflags & ATA_PFLAG_PIO32) return 1; return 0; } int ata_sas_scsi_ioctl(struct ata_port *ap, struct scsi_device *scsidev, int cmd, void __user *arg) { int val = -EINVAL, rc = -EINVAL; unsigned long flags; switch (cmd) { case ATA_IOC_GET_IO32: spin_lock_irqsave(ap->lock, flags); val = ata_ioc32(ap); <API key>(ap->lock, flags); if (copy_to_user(arg, &val, 1)) return -EFAULT; return 0; case ATA_IOC_SET_IO32: val = (unsigned long) arg; rc = 0; spin_lock_irqsave(ap->lock, flags); if (ap->pflags & <API key>) { if (val) ap->pflags |= ATA_PFLAG_PIO32; else ap->pflags &= ~ATA_PFLAG_PIO32; } else { if (val != ata_ioc32(ap)) rc = -EINVAL; } <API key>(ap->lock, flags); return rc; case HDIO_GET_IDENTITY: return ata_get_identity(ap, scsidev, arg); case HDIO_DRIVE_CMD: if (!capable(CAP_SYS_ADMIN) || !capable(CAP_SYS_RAWIO)) return -EACCES; return ata_cmd_ioctl(scsidev, arg); case HDIO_DRIVE_TASK: if (!capable(CAP_SYS_ADMIN) || !capable(CAP_SYS_RAWIO)) return -EACCES; return ata_task_ioctl(scsidev, arg); default: rc = -ENOTTY; break; } return rc; } EXPORT_SYMBOL_GPL(ata_sas_scsi_ioctl); int ata_scsi_ioctl(struct scsi_device *scsidev, int cmd, void __user *arg) { return ata_sas_scsi_ioctl(ata_shost_to_port(scsidev->host), scsidev, cmd, arg); } EXPORT_SYMBOL_GPL(ata_scsi_ioctl); /** * ata_scsi_qc_new - acquire new ata_queued_cmd reference * @dev: ATA device to which the new command is attached * @cmd: SCSI command that originated this ATA command * @done: SCSI command completion function * * Obtain a reference to an unused ata_queued_cmd structure, * which is the basic libata structure representing a single * ATA command sent to the hardware. * * If a command was available, fill in the SCSI-specific * portions of the structure with information on the * current command. * * LOCKING: * spin_lock_irqsave(host lock) * * RETURNS: * Command allocated, or %NULL if none available. */ static struct ata_queued_cmd *ata_scsi_qc_new(struct ata_device *dev, struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)) { struct ata_queued_cmd *qc; qc = ata_qc_new_init(dev); if (qc) { qc->scsicmd = cmd; qc->scsidone = done; qc->sg = scsi_sglist(cmd); qc->n_elem = scsi_sg_count(cmd); } else { cmd->result = (DID_OK << 16) | (QUEUE_FULL << 1); done(cmd); } return qc; } static void <API key>(struct ata_queued_cmd *qc) { struct scsi_cmnd *scmd = qc->scsicmd; qc->extrabytes = scmd->request->extra_len; qc->nbytes = scsi_bufflen(scmd) + qc->extrabytes; } /** * ata_dump_status - user friendly display of error info * @id: id of the port in question * @tf: ptr to filled out taskfile * * Decode and dump the ATA error/status registers for the user so * that they have some idea what really happened at the non * make-believe layer. * * LOCKING: * inherited from caller */ static void ata_dump_status(unsigned id, struct ata_taskfile *tf) { u8 stat = tf->command, err = tf->feature; printk(KERN_WARNING "ata%u: status=0x%02x { ", id, stat); if (stat & ATA_BUSY) { printk("Busy }\n"); /* Data is not valid in this case */ } else { if (stat & 0x40) printk("DriveReady "); if (stat & 0x20) printk("DeviceFault "); if (stat & 0x10) printk("SeekComplete "); if (stat & 0x08) printk("DataRequest "); if (stat & 0x04) printk("CorrectedError "); if (stat & 0x02) printk("Index "); if (stat & 0x01) printk("Error "); printk("}\n"); if (err) { printk(KERN_WARNING "ata%u: error=0x%02x { ", id, err); if (err & 0x04) printk("DriveStatusError "); if (err & 0x80) { if (err & 0x04) printk("BadCRC "); else printk("Sector "); } if (err & 0x40) printk("UncorrectableError "); if (err & 0x10) printk("SectorIdNotFound "); if (err & 0x02) printk("TrackZeroNotFound "); if (err & 0x01) printk("AddrMarkNotFound "); printk("}\n"); } } } /** * ata_to_sense_error - convert ATA error to SCSI error * @id: ATA device number * @drv_stat: value contained in ATA status register * @drv_err: value contained in ATA error register * @sk: the sense key we'll fill out * @asc: the additional sense code we'll fill out * @ascq: the additional sense code qualifier we'll fill out * @verbose: be verbose * * Converts an ATA error into a SCSI error. Fill out pointers to * SK, ASC, and ASCQ bytes for later use in fixed or descriptor * format sense blocks. * * LOCKING: * spin_lock_irqsave(host lock) */ static void ata_to_sense_error(unsigned id, u8 drv_stat, u8 drv_err, u8 *sk, u8 *asc, u8 *ascq, int verbose) { int i; /* Based on the 3ware driver translation table */ static const unsigned char sense_table[][4] = { /* BBD|ECC|ID|MAR */ {0xd1, ABORTED_COMMAND, 0x00, 0x00}, // Device busy Aborted command /* BBD|ECC|ID */ {0xd0, ABORTED_COMMAND, 0x00, 0x00}, // Device busy Aborted command /* ECC|MC|MARK */ {0x61, HARDWARE_ERROR, 0x00, 0x00}, // Device fault Hardware error /* ICRC|ABRT */ /* NB: ICRC & !ABRT is BBD */ {0x84, ABORTED_COMMAND, 0x47, 0x00}, // Data CRC error SCSI parity error /* MC|ID|ABRT|TRK0|MARK */ {0x37, NOT_READY, 0x04, 0x00}, // Unit offline Not ready /* MCR|MARK */ {0x09, NOT_READY, 0x04, 0x00}, // Unrecovered disk error Not ready /* Bad address mark */ {0x01, MEDIUM_ERROR, 0x13, 0x00}, // Address mark not found Address mark not found for data field /* TRK0 */ {0x02, HARDWARE_ERROR, 0x00, 0x00}, // Track 0 not found Hardware error /* Abort & !ICRC */ {0x04, ABORTED_COMMAND, 0x00, 0x00}, // Aborted command Aborted command /* Media change request */ {0x08, NOT_READY, 0x04, 0x00}, // Media change request FIXME: faking offline /* SRV */ {0x10, ABORTED_COMMAND, 0x14, 0x00}, // ID not found Recorded entity not found /* Media change */ {0x08, NOT_READY, 0x04, 0x00}, // Media change FIXME: faking offline /* ECC */ {0x40, MEDIUM_ERROR, 0x11, 0x04}, // Uncorrectable ECC error Unrecovered read error /* BBD - block marked bad */ {0x80, MEDIUM_ERROR, 0x11, 0x04}, // Block marked bad Medium error, unrecovered read error {0xFF, 0xFF, 0xFF, 0xFF}, // END mark }; static const unsigned char stat_table[][4] = { /* Must be first because BUSY means no other bits valid */ {0x80, ABORTED_COMMAND, 0x47, 0x00}, // Busy, fake parity for now {0x20, HARDWARE_ERROR, 0x00, 0x00}, // Device fault {0x08, ABORTED_COMMAND, 0x47, 0x00}, // Timed out in xfer, fake parity for now {0x04, RECOVERED_ERROR, 0x11, 0x00}, // Recovered ECC error Medium error, recovered {0xFF, 0xFF, 0xFF, 0xFF}, // END mark }; /* * Is this an error we can process/parse */ if (drv_stat & ATA_BUSY) { drv_err = 0; /* Ignore the err bits, they're invalid */ } if (drv_err) { /* Look for drv_err */ for (i = 0; sense_table[i][0] != 0xFF; i++) { /* Look for best matches first */ if ((sense_table[i][0] & drv_err) == sense_table[i][0]) { *sk = sense_table[i][1]; *asc = sense_table[i][2]; *ascq = sense_table[i][3]; goto translate_done; } } /* No immediate match */ if (verbose) printk(KERN_WARNING "ata%u: no sense translation for " "error 0x%02x\n", id, drv_err); } /* Fall back to interpreting status bits */ for (i = 0; stat_table[i][0] != 0xFF; i++) { if (stat_table[i][0] & drv_stat) { *sk = stat_table[i][1]; *asc = stat_table[i][2]; *ascq = stat_table[i][3]; goto translate_done; } } /* No error? Undecoded? */ if (verbose) printk(KERN_WARNING "ata%u: no sense translation for " "status: 0x%02x\n", id, drv_stat); /* We need a sensible error return here, which is tricky, and one that won't cause people to do things like return a disk wrongly */ *sk = ABORTED_COMMAND; *asc = 0x00; *ascq = 0x00; translate_done: if (verbose) printk(KERN_ERR "ata%u: translated ATA stat/err 0x%02x/%02x " "to SCSI SK/ASC/ASCQ 0x%x/%02x/%02x\n", id, drv_stat, drv_err, *sk, *asc, *ascq); return; } /* * <API key> - Generate check condition sense block. * @qc: Command that completed. * * This function is specific to the ATA descriptor format sense * block specified for the ATA pass through commands. Regardless * of whether the command errored or not, return a sense * block. Copy all controller registers into the sense * block. Clear sense key, ASC & ASCQ if there is no error. * * LOCKING: * None. */ static void <API key>(struct ata_queued_cmd *qc) { struct scsi_cmnd *cmd = qc->scsicmd; struct ata_taskfile *tf = &qc->result_tf; unsigned char *sb = cmd->sense_buffer; unsigned char *desc = sb + 8; int verbose = qc->ap->ops->error_handler == NULL; memset(sb, 0, <API key>); cmd->result = (DRIVER_SENSE << 24) | <API key>; /* * Use ata_to_sense_error() to map status register bits * onto sense key, asc & ascq. */ if (qc->err_mask || tf->command & (ATA_BUSY | ATA_DF | ATA_ERR | ATA_DRQ)) { ata_to_sense_error(qc->ap->print_id, tf->command, tf->feature, &sb[1], &sb[2], &sb[3], verbose); sb[1] &= 0x0f; } /* * Sense data is current and format is descriptor. */ sb[0] = 0x72; desc[0] = 0x09; /* set length of additional sense data */ sb[7] = 14; desc[1] = 12; /* * Copy registers into sense buffer. */ desc[2] = 0x00; desc[3] = tf->feature; /* == error reg */ desc[5] = tf->nsect; desc[7] = tf->lbal; desc[9] = tf->lbam; desc[11] = tf->lbah; desc[12] = tf->device; desc[13] = tf->command; /* == status reg */ /* * Fill in Extend bit, and the high order bytes * if applicable. */ if (tf->flags & ATA_TFLAG_LBA48) { desc[2] |= 0x01; desc[4] = tf->hob_nsect; desc[6] = tf->hob_lbal; desc[8] = tf->hob_lbam; desc[10] = tf->hob_lbah; } } /** * ata_gen_ata_sense - generate a SCSI fixed sense block * @qc: Command that we are erroring out * * Generate sense block for a failed ATA command @qc. Descriptor * format is used to accomodate LBA48 block address. * * LOCKING: * None. */ static void ata_gen_ata_sense(struct ata_queued_cmd *qc) { struct ata_device *dev = qc->dev; struct scsi_cmnd *cmd = qc->scsicmd; struct ata_taskfile *tf = &qc->result_tf; unsigned char *sb = cmd->sense_buffer; unsigned char *desc = sb + 8; int verbose = qc->ap->ops->error_handler == NULL; u64 block; memset(sb, 0, <API key>); cmd->result = (DRIVER_SENSE << 24) | <API key>; /* sense data is current and format is descriptor */ sb[0] = 0x72; /* Use ata_to_sense_error() to map status register bits * onto sense key, asc & ascq. */ if (qc->err_mask || tf->command & (ATA_BUSY | ATA_DF | ATA_ERR | ATA_DRQ)) { ata_to_sense_error(qc->ap->print_id, tf->command, tf->feature, &sb[1], &sb[2], &sb[3], verbose); sb[1] &= 0x0f; } block = ata_tf_read_block(&qc->result_tf, dev); /* information sense data descriptor */ sb[7] = 12; desc[0] = 0x00; desc[1] = 10; desc[2] |= 0x80; /* valid */ desc[6] = block >> 40; desc[7] = block >> 32; desc[8] = block >> 24; desc[9] = block >> 16; desc[10] = block >> 8; desc[11] = block; } static void <API key>(struct scsi_device *sdev) { sdev->use_10_for_rw = 1; sdev->use_10_for_ms = 1; /* Schedule policy is determined by ->qc_defer() callback and * it needs to see every deferred qc. Set dev_blocked to 1 to * prevent SCSI midlayer from automatically deferring * requests. */ sdev->max_device_blocked = 1; } /** * atapi_drain_needed - Check whether data transfer may overflow * @rq: request to be checked * * ATAPI commands which transfer variable length data to host * might overflow due to application error or hardare bug. This * function checks whether overflow should be drained and ignored * for @request. * * LOCKING: * None. * * RETURNS: * 1 if ; otherwise, 0. */ static int atapi_drain_needed(struct request *rq) { if (likely(!blk_pc_request(rq))) return 0; if (!blk_rq_bytes(rq) || (rq->cmd_flags & REQ_RW)) return 0; return atapi_cmd_type(rq->cmd[0]) == ATAPI_MISC; } static int ata_scsi_dev_config(struct scsi_device *sdev, struct ata_device *dev) { if (!ata_id_has_unload(dev->id)) dev->flags |= ATA_DFLAG_NO_UNLOAD; /* configure max sectors */ <API key>(sdev->request_queue, dev->max_sectors); sdev->sector_size = ATA_SECT_SIZE; if (dev->class == ATA_DEV_ATAPI) { struct request_queue *q = sdev->request_queue; void *buf; /* set DMA padding */ <API key>(sdev->request_queue, ATA_DMA_PAD_SZ - 1); /* configure draining */ buf = kmalloc(ATAPI_MAX_DRAIN, q->bounce_gfp | GFP_KERNEL); if (!buf) { ata_dev_printk(dev, KERN_ERR, "drain buffer allocation failed\n"); return -ENOMEM; } blk_queue_dma_drain(q, atapi_drain_needed, buf, ATAPI_MAX_DRAIN); } else { sdev->manage_start_stop = 1; } /* * ata_pio_sectors() expects buffer for each sector to not cross * page boundary. Enforce it by requiring buffers to be sector * aligned, which works iff sector_size is not larger than * PAGE_SIZE. ATAPI devices also need the alignment as * IDENTIFY_PACKET is executed as ATA_PROT_PIO. */ if (sdev->sector_size > PAGE_SIZE) ata_dev_printk(dev, KERN_WARNING, "sector_size=%u > PAGE_SIZE, PIO may malfunction\n", sdev->sector_size); <API key>(sdev->request_queue, sdev->sector_size - 1); if (dev->flags & ATA_DFLAG_AN) set_bit(<API key>, sdev->supported_events); if (dev->flags & ATA_DFLAG_NCQ) { int depth; depth = min(sdev->host->can_queue, ata_id_queue_depth(dev->id)); depth = min(ATA_MAX_QUEUE - 1, depth); <API key>(sdev, MSG_SIMPLE_TAG, depth); } return 0; } /** * <API key> - Set SCSI device attributes * @sdev: SCSI device to examine * * This is called before we actually start reading * and writing to the device, to configure certain * SCSI mid-layer behaviors. * * LOCKING: * Defined by SCSI layer. We don't really care. */ int <API key>(struct scsi_device *sdev) { struct ata_port *ap = ata_shost_to_port(sdev->host); struct ata_device *dev = __ata_scsi_find_dev(ap, sdev); int rc = 0; <API key>(sdev); if (dev) rc = ata_scsi_dev_config(sdev, dev); return rc; } /** * <API key> - SCSI device is about to be destroyed * @sdev: SCSI device to be destroyed * * @sdev is about to be destroyed for hot/warm unplugging. If * this unplugging was initiated by libata as indicated by NULL * dev->sdev, this function doesn't have to do anything. * Otherwise, SCSI layer initiated warm-unplug is in progress. * Clear dev->sdev, schedule the device for ATA detach and invoke * EH. * * LOCKING: * Defined by SCSI layer. We don't really care. */ void <API key>(struct scsi_device *sdev) { struct ata_port *ap = ata_shost_to_port(sdev->host); struct request_queue *q = sdev->request_queue; unsigned long flags; struct ata_device *dev; if (!ap->ops->error_handler) return; spin_lock_irqsave(ap->lock, flags); dev = __ata_scsi_find_dev(ap, sdev); if (dev && dev->sdev) { /* SCSI device already in CANCEL state, no need to offline it */ dev->sdev = NULL; dev->flags |= ATA_DFLAG_DETACH; <API key>(ap); } <API key>(ap->lock, flags); kfree(q->dma_drain_buffer); q->dma_drain_buffer = NULL; q->dma_drain_size = 0; } /** * <API key> - SCSI callback for queue depth config * @sdev: SCSI device to configure queue depth for * @queue_depth: new queue depth * @reason: calling context * * This is libata standard hostt->change_queue_depth callback. * SCSI will call into this callback when user tries to set queue * depth via sysfs. * * LOCKING: * SCSI layer (we don't care) * * RETURNS: * Newly configured queue depth. */ int <API key>(struct scsi_device *sdev, int queue_depth, int reason) { struct ata_port *ap = ata_shost_to_port(sdev->host); struct ata_device *dev; unsigned long flags; if (reason != SCSI_QDEPTH_DEFAULT) return -EOPNOTSUPP; if (queue_depth < 1 || queue_depth == sdev->queue_depth) return sdev->queue_depth; dev = ata_scsi_find_dev(ap, sdev); if (!dev || !ata_dev_enabled(dev)) return sdev->queue_depth; /* NCQ enabled? */ spin_lock_irqsave(ap->lock, flags); dev->flags &= ~ATA_DFLAG_NCQ_OFF; if (queue_depth == 1 || !ata_ncq_enabled(dev)) { dev->flags |= ATA_DFLAG_NCQ_OFF; queue_depth = 1; } <API key>(ap->lock, flags); /* limit and apply queue depth */ queue_depth = min(queue_depth, sdev->host->can_queue); queue_depth = min(queue_depth, ata_id_queue_depth(dev->id)); queue_depth = min(queue_depth, ATA_MAX_QUEUE - 1); if (sdev->queue_depth == queue_depth) return -EINVAL; <API key>(sdev, MSG_SIMPLE_TAG, queue_depth); return queue_depth; } static unsigned int <API key>(struct ata_queued_cmd *qc) { struct scsi_cmnd *scmd = qc->scsicmd; struct ata_taskfile *tf = &qc->tf; const u8 *cdb = scmd->cmnd; if (scmd->cmd_len < 5) goto invalid_fld; tf->flags |= ATA_TFLAG_DEVICE | ATA_TFLAG_ISADDR; tf->protocol = ATA_PROT_NODATA; if (cdb[1] & 0x1) { ; /* ignore IMMED bit, violates sat-r05 */ } if (cdb[4] & 0x2) goto invalid_fld; /* LOEJ bit set not supported */ if (((cdb[4] >> 4) & 0xf) != 0) goto invalid_fld; /* power conditions not supported */ if (cdb[4] & 0x1) { tf->nsect = 1; /* 1 sector, lba=0 */ if (qc->dev->flags & ATA_DFLAG_LBA) { tf->flags |= ATA_TFLAG_LBA; tf->lbah = 0x0; tf->lbam = 0x0; tf->lbal = 0x0; tf->device |= ATA_LBA; } else { /* CHS */ tf->lbal = 0x1; /* sect */ tf->lbam = 0x0; /* cyl low */ tf->lbah = 0x0; /* cyl high */ } tf->command = ATA_CMD_VERIFY; /* READ VERIFY */ } else { /* Some odd clown BIOSen issue spindown on power off (ACPI S4 * or S5) causing some drives to spin up and down again. */ if ((qc->ap->flags & <API key>) && system_state == SYSTEM_POWER_OFF) goto skip; if ((qc->ap->flags & <API key>) && <API key>()) goto skip; /* Issue ATA STANDBY IMMEDIATE command */ tf->command = ATA_CMD_STANDBYNOW1; } /* * Standby and Idle condition timers could be implemented but that * would require libata to implement the Power condition mode page * and allow the user to change it. Changing mode pages requires * MODE SELECT to be implemented. */ return 0; invalid_fld: ata_scsi_set_sense(scmd, ILLEGAL_REQUEST, 0x24, 0x0); /* "Invalid field in cbd" */ return 1; skip: scmd->result = SAM_STAT_GOOD; return 1; } /** * ata_scsi_flush_xlat - Translate SCSI SYNCHRONIZE CACHE command * @qc: Storage for translated ATA taskfile * * Sets up an ATA taskfile to issue FLUSH CACHE or * FLUSH CACHE EXT. * * LOCKING: * spin_lock_irqsave(host lock) * * RETURNS: * Zero on success, non-zero on error. */ static unsigned int ata_scsi_flush_xlat(struct ata_queued_cmd *qc) { struct ata_taskfile *tf = &qc->tf; tf->flags |= ATA_TFLAG_DEVICE; tf->protocol = ATA_PROT_NODATA; if (qc->dev->flags & ATA_DFLAG_FLUSH_EXT) tf->command = ATA_CMD_FLUSH_EXT; else tf->command = ATA_CMD_FLUSH; /* flush is critical for IO integrity, consider it an IO command */ qc->flags |= ATA_QCFLAG_IO; return 0; } /** * scsi_6_lba_len - Get LBA and transfer length * @cdb: SCSI command to translate * * Calculate LBA and transfer length for 6-byte commands. * * RETURNS: * @plba: the LBA * @plen: the transfer length */ static void scsi_6_lba_len(const u8 *cdb, u64 *plba, u32 *plen) { u64 lba = 0; u32 len; VPRINTK("six-byte command\n"); lba |= ((u64)(cdb[1] & 0x1f)) << 16; lba |= ((u64)cdb[2]) << 8; lba |= ((u64)cdb[3]); len = cdb[4]; *plba = lba; *plen = len; } /** * scsi_10_lba_len - Get LBA and transfer length * @cdb: SCSI command to translate * * Calculate LBA and transfer length for 10-byte commands. * * RETURNS: * @plba: the LBA * @plen: the transfer length */ static void scsi_10_lba_len(const u8 *cdb, u64 *plba, u32 *plen) { u64 lba = 0; u32 len = 0; VPRINTK("ten-byte command\n"); lba |= ((u64)cdb[2]) << 24; lba |= ((u64)cdb[3]) << 16; lba |= ((u64)cdb[4]) << 8; lba |= ((u64)cdb[5]); len |= ((u32)cdb[7]) << 8; len |= ((u32)cdb[8]); *plba = lba; *plen = len; } /** * scsi_16_lba_len - Get LBA and transfer length * @cdb: SCSI command to translate * * Calculate LBA and transfer length for 16-byte commands. * * RETURNS: * @plba: the LBA * @plen: the transfer length */ static void scsi_16_lba_len(const u8 *cdb, u64 *plba, u32 *plen) { u64 lba = 0; u32 len = 0; VPRINTK("sixteen-byte command\n"); lba |= ((u64)cdb[2]) << 56; lba |= ((u64)cdb[3]) << 48; lba |= ((u64)cdb[4]) << 40; lba |= ((u64)cdb[5]) << 32; lba |= ((u64)cdb[6]) << 24; lba |= ((u64)cdb[7]) << 16; lba |= ((u64)cdb[8]) << 8; lba |= ((u64)cdb[9]); len |= ((u32)cdb[10]) << 24; len |= ((u32)cdb[11]) << 16; len |= ((u32)cdb[12]) << 8; len |= ((u32)cdb[13]); *plba = lba; *plen = len; } /** * <API key> - Translate SCSI VERIFY command into an ATA one * @qc: Storage for translated ATA taskfile * * Converts SCSI VERIFY command to an ATA READ VERIFY command. * * LOCKING: * spin_lock_irqsave(host lock) * * RETURNS: * Zero on success, non-zero on error. */ static unsigned int <API key>(struct ata_queued_cmd *qc) { struct scsi_cmnd *scmd = qc->scsicmd; struct ata_taskfile *tf = &qc->tf; struct ata_device *dev = qc->dev; u64 dev_sectors = qc->dev->n_sectors; const u8 *cdb = scmd->cmnd; u64 block; u32 n_block; tf->flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE; tf->protocol = ATA_PROT_NODATA; if (cdb[0] == VERIFY) { if (scmd->cmd_len < 10) goto invalid_fld; scsi_10_lba_len(cdb, &block, &n_block); } else if (cdb[0] == VERIFY_16) { if (scmd->cmd_len < 16) goto invalid_fld; scsi_16_lba_len(cdb, &block, &n_block); } else goto invalid_fld; if (!n_block) goto nothing_to_do; if (block >= dev_sectors) goto out_of_range; if ((block + n_block) > dev_sectors) goto out_of_range; if (dev->flags & ATA_DFLAG_LBA) { tf->flags |= ATA_TFLAG_LBA; if (lba_28_ok(block, n_block)) { /* use LBA28 */ tf->command = ATA_CMD_VERIFY; tf->device |= (block >> 24) & 0xf; } else if (lba_48_ok(block, n_block)) { if (!(dev->flags & ATA_DFLAG_LBA48)) goto out_of_range; /* use LBA48 */ tf->flags |= ATA_TFLAG_LBA48; tf->command = ATA_CMD_VERIFY_EXT; tf->hob_nsect = (n_block >> 8) & 0xff; tf->hob_lbah = (block >> 40) & 0xff; tf->hob_lbam = (block >> 32) & 0xff; tf->hob_lbal = (block >> 24) & 0xff; } else /* request too large even for LBA48 */ goto out_of_range; tf->nsect = n_block & 0xff; tf->lbah = (block >> 16) & 0xff; tf->lbam = (block >> 8) & 0xff; tf->lbal = block & 0xff; tf->device |= ATA_LBA; } else { /* CHS */ u32 sect, head, cyl, track; if (!lba_28_ok(block, n_block)) goto out_of_range; /* Convert LBA to CHS */ track = (u32)block / dev->sectors; cyl = track / dev->heads; head = track % dev->heads; sect = (u32)block % dev->sectors + 1; DPRINTK("block %u track %u cyl %u head %u sect %u\n", (u32)block, track, cyl, head, sect); /* Check whether the converted CHS can fit. Cylinder: 0-65535 Head: 0-15 Sector: 1-255*/ if ((cyl >> 16) || (head >> 4) || (sect >> 8) || (!sect)) goto out_of_range; tf->command = ATA_CMD_VERIFY; tf->nsect = n_block & 0xff; /* Sector count 0 means 256 sectors */ tf->lbal = sect; tf->lbam = cyl; tf->lbah = cyl >> 8; tf->device |= head; } return 0; invalid_fld: ata_scsi_set_sense(scmd, ILLEGAL_REQUEST, 0x24, 0x0); /* "Invalid field in cbd" */ return 1; out_of_range: ata_scsi_set_sense(scmd, ILLEGAL_REQUEST, 0x21, 0x0); /* "Logical Block Address out of range" */ return 1; nothing_to_do: scmd->result = SAM_STAT_GOOD; return 1; } /** * ata_scsi_rw_xlat - Translate SCSI r/w command into an ATA one * @qc: Storage for translated ATA taskfile * * Converts any of six SCSI read/write commands into the * ATA counterpart, including starting sector (LBA), * sector count, and taking into account the device's LBA48 * support. * * Commands %READ_6, %READ_10, %READ_16, %WRITE_6, %WRITE_10, and * %WRITE_16 are currently supported. * * LOCKING: * spin_lock_irqsave(host lock) * * RETURNS: * Zero on success, non-zero on error. */ static unsigned int ata_scsi_rw_xlat(struct ata_queued_cmd *qc) { struct scsi_cmnd *scmd = qc->scsicmd; const u8 *cdb = scmd->cmnd; unsigned int tf_flags = 0; u64 block; u32 n_block; int rc; if (cdb[0] == WRITE_10 || cdb[0] == WRITE_6 || cdb[0] == WRITE_16) tf_flags |= ATA_TFLAG_WRITE; /* Calculate the SCSI LBA, transfer length and FUA. */ switch (cdb[0]) { case READ_10: case WRITE_10: if (unlikely(scmd->cmd_len < 10)) goto invalid_fld; scsi_10_lba_len(cdb, &block, &n_block); if (unlikely(cdb[1] & (1 << 3))) tf_flags |= ATA_TFLAG_FUA; break; case READ_6: case WRITE_6: if (unlikely(scmd->cmd_len < 6)) goto invalid_fld; scsi_6_lba_len(cdb, &block, &n_block); /* for 6-byte r/w commands, transfer length 0 * means 256 blocks of data, not 0 block. */ if (!n_block) n_block = 256; break; case READ_16: case WRITE_16: if (unlikely(scmd->cmd_len < 16)) goto invalid_fld; scsi_16_lba_len(cdb, &block, &n_block); if (unlikely(cdb[1] & (1 << 3))) tf_flags |= ATA_TFLAG_FUA; break; default: DPRINTK("no-byte command\n"); goto invalid_fld; } /* Check and compose ATA command */ if (!n_block) /* For 10-byte and 16-byte SCSI R/W commands, transfer * length 0 means transfer 0 block of data. * However, for ATA R/W commands, sector count 0 means * 256 or 65536 sectors, not 0 sectors as in SCSI. * * WARNING: one or two older ATA drives treat 0 as 0... */ goto nothing_to_do; qc->flags |= ATA_QCFLAG_IO; qc->nbytes = n_block * ATA_SECT_SIZE; rc = ata_build_rw_tf(&qc->tf, qc->dev, block, n_block, tf_flags, qc->tag); if (likely(rc == 0)) return 0; if (rc == -ERANGE) goto out_of_range; /* treat all other errors as -EINVAL, fall through */ invalid_fld: ata_scsi_set_sense(scmd, ILLEGAL_REQUEST, 0x24, 0x0); /* "Invalid field in cbd" */ return 1; out_of_range: ata_scsi_set_sense(scmd, ILLEGAL_REQUEST, 0x21, 0x0); /* "Logical Block Address out of range" */ return 1; nothing_to_do: scmd->result = SAM_STAT_GOOD; return 1; } static void <API key>(struct ata_queued_cmd *qc) { struct ata_port *ap = qc->ap; struct scsi_cmnd *cmd = qc->scsicmd; u8 *cdb = cmd->cmnd; int need_sense = (qc->err_mask != 0); /* For ATA pass thru (SAT) commands, generate a sense block if * user mandated it or if there's an error. Note that if we * generate because the user forced us to, a check condition * is generated and the ATA register values are returned * whether the command completed successfully or not. If there * was no error, SK, ASC and ASCQ will all be zero. */ if (((cdb[0] == ATA_16) || (cdb[0] == ATA_12)) && ((cdb[2] & 0x20) || need_sense)) { <API key>(qc); } else { if (!need_sense) { cmd->result = SAM_STAT_GOOD; } else { /* TODO: decide which descriptor format to use * for 48b LBA devices and call that here * instead of the fixed desc, which is only * good for smaller LBA (and maybe CHS?) * devices. */ ata_gen_ata_sense(qc); } } if (need_sense && !ap->ops->error_handler) ata_dump_status(ap->print_id, &qc->result_tf); qc->scsidone(cmd); ata_qc_free(qc); } /** * ata_scsi_translate - Translate then issue SCSI command to ATA device * @dev: ATA device to which the command is addressed * @cmd: SCSI command to execute * @done: SCSI command completion function * @xlat_func: Actor which translates @cmd to an ATA taskfile * * Our ->queuecommand() function has decided that the SCSI * command issued can be directly translated into an ATA * command, rather than handled internally. * * This function sets up an ata_queued_cmd structure for the * SCSI command, and sends that ata_queued_cmd to the hardware. * * The xlat_func argument (actor) returns 0 if ready to execute * ATA command, else 1 to finish translation. If 1 is returned * then cmd->result (and possibly cmd->sense_buffer) are assumed * to be set reflecting an error condition or clean (early) * termination. * * LOCKING: * spin_lock_irqsave(host lock) * * RETURNS: * 0 on success, <API key> if the command * needs to be deferred. */ static int ata_scsi_translate(struct ata_device *dev, struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *), ata_xlat_func_t xlat_func) { struct ata_port *ap = dev->link->ap; struct ata_queued_cmd *qc; int rc; VPRINTK("ENTER\n"); qc = ata_scsi_qc_new(dev, cmd, done); if (!qc) goto err_mem; /* data is present; dma-map it */ if (cmd->sc_data_direction == DMA_FROM_DEVICE || cmd->sc_data_direction == DMA_TO_DEVICE) { if (unlikely(scsi_bufflen(cmd) < 1)) { ata_dev_printk(dev, KERN_WARNING, "WARNING: zero len r/w req\n"); goto err_did; } ata_sg_init(qc, scsi_sglist(cmd), scsi_sg_count(cmd)); qc->dma_dir = cmd->sc_data_direction; } qc->complete_fn = <API key>; if (xlat_func(qc)) goto early_finish; if (ap->ops->qc_defer) { if ((rc = ap->ops->qc_defer(qc))) goto defer; } /* select device, send command to hardware */ ata_qc_issue(qc); VPRINTK("EXIT\n"); return 0; early_finish: ata_qc_free(qc); qc->scsidone(cmd); DPRINTK("EXIT - early finish (good or error)\n"); return 0; err_did: ata_qc_free(qc); cmd->result = (DID_ERROR << 16); qc->scsidone(cmd); err_mem: DPRINTK("EXIT - internal\n"); return 0; defer: ata_qc_free(qc); DPRINTK("EXIT - defer\n"); if (rc == ATA_DEFER_LINK) return <API key>; else return <API key>; } /** * ata_scsi_rbuf_get - Map response buffer. * @cmd: SCSI command containing buffer to be mapped. * @flags: unsigned long variable to store irq enable status * @copy_in: copy in from user buffer * * Prepare buffer for simulated SCSI commands. * * LOCKING: * spin_lock_irqsave(ata_scsi_rbuf_lock) on success * * RETURNS: * Pointer to response buffer. */ static void *ata_scsi_rbuf_get(struct scsi_cmnd *cmd, bool copy_in, unsigned long *flags) { spin_lock_irqsave(&ata_scsi_rbuf_lock, *flags); memset(ata_scsi_rbuf, 0, ATA_SCSI_RBUF_SIZE); if (copy_in) sg_copy_to_buffer(scsi_sglist(cmd), scsi_sg_count(cmd), ata_scsi_rbuf, ATA_SCSI_RBUF_SIZE); return ata_scsi_rbuf; } /** * ata_scsi_rbuf_put - Unmap response buffer. * @cmd: SCSI command containing buffer to be unmapped. * @copy_out: copy out result * @flags: @flags passed to ata_scsi_rbuf_get() * * Returns rbuf buffer. The result is copied to @cmd's buffer if * @copy_back is true. * * LOCKING: * Unlocks ata_scsi_rbuf_lock. */ static inline void ata_scsi_rbuf_put(struct scsi_cmnd *cmd, bool copy_out, unsigned long *flags) { if (copy_out) sg_copy_from_buffer(scsi_sglist(cmd), scsi_sg_count(cmd), ata_scsi_rbuf, ATA_SCSI_RBUF_SIZE); <API key>(&ata_scsi_rbuf_lock, *flags); } /** * ata_scsi_rbuf_fill - wrapper for SCSI command simulators * @args: device IDENTIFY data / SCSI command of interest. * @actor: Callback hook for desired SCSI command simulator * * Takes care of the hard work of simulating a SCSI command... * Mapping the response buffer, calling the command's handler, * and handling the handler's return value. This return value * indicates whether the handler wishes the SCSI command to be * completed successfully (0), or not (in which case cmd->result * and sense buffer are assumed to be set). * * LOCKING: * spin_lock_irqsave(host lock) */ static void ata_scsi_rbuf_fill(struct ata_scsi_args *args, unsigned int (*actor)(struct ata_scsi_args *args, u8 *rbuf)) { u8 *rbuf; unsigned int rc; struct scsi_cmnd *cmd = args->cmd; unsigned long flags; rbuf = ata_scsi_rbuf_get(cmd, false, &flags); rc = actor(args, rbuf); ata_scsi_rbuf_put(cmd, rc == 0, &flags); if (rc == 0) cmd->result = SAM_STAT_GOOD; args->done(cmd); } /** * ata_scsiop_inq_std - Simulate INQUIRY command * @args: device IDENTIFY data / SCSI command of interest. * @rbuf: Response buffer, to which simulated SCSI cmd output is sent. * * Returns standard device identification data associated * with non-VPD INQUIRY command output. * * LOCKING: * spin_lock_irqsave(host lock) */ static unsigned int ata_scsiop_inq_std(struct ata_scsi_args *args, u8 *rbuf) { const u8 versions[] = { 0x60, /* SAM-3 (no version claimed) */ 0x03, 0x20, /* SBC-2 (no version claimed) */ 0x02, 0x60 /* SPC-3 (no version claimed) */ }; u8 hdr[] = { TYPE_DISK, 0, 0x5, /* claim SPC-3 version compatibility */ 2, 95 - 4 }; VPRINTK("ENTER\n"); /* set scsi removeable (RMB) bit per ata bit */ if (ata_id_removeable(args->id)) hdr[1] |= (1 << 7); memcpy(rbuf, hdr, sizeof(hdr)); memcpy(&rbuf[8], "ATA ", 8); ata_id_string(args->id, &rbuf[16], ATA_ID_PROD, 16); ata_id_string(args->id, &rbuf[32], ATA_ID_FW_REV, 4); if (rbuf[32] == 0 || rbuf[32] == ' ') memcpy(&rbuf[32], "n/a ", 4); memcpy(rbuf + 59, versions, sizeof(versions)); return 0; } /** * ata_scsiop_inq_00 - Simulate INQUIRY VPD page 0, list of pages * @args: device IDENTIFY data / SCSI command of interest. * @rbuf: Response buffer, to which simulated SCSI cmd output is sent. * * Returns list of inquiry VPD pages available. * * LOCKING: * spin_lock_irqsave(host lock) */ static unsigned int ata_scsiop_inq_00(struct ata_scsi_args *args, u8 *rbuf) { const u8 pages[] = { 0x00, /* page 0x00, this page */ 0x80, /* page 0x80, unit serial no page */ 0x83, /* page 0x83, device ident page */ 0x89, /* page 0x89, ata info page */ 0xb0, /* page 0xb0, block limits page */ 0xb1, /* page 0xb1, block device characteristics page */ }; rbuf[3] = sizeof(pages); /* number of supported VPD pages */ memcpy(rbuf + 4, pages, sizeof(pages)); return 0; } /** * ata_scsiop_inq_80 - Simulate INQUIRY VPD page 80, device serial number * @args: device IDENTIFY data / SCSI command of interest. * @rbuf: Response buffer, to which simulated SCSI cmd output is sent. * * Returns ATA device serial number. * * LOCKING: * spin_lock_irqsave(host lock) */ static unsigned int ata_scsiop_inq_80(struct ata_scsi_args *args, u8 *rbuf) { const u8 hdr[] = { 0, 0x80, /* this page code */ 0, ATA_ID_SERNO_LEN, /* page len */ }; memcpy(rbuf, hdr, sizeof(hdr)); ata_id_string(args->id, (unsigned char *) &rbuf[4], ATA_ID_SERNO, ATA_ID_SERNO_LEN); return 0; } /** * ata_scsiop_inq_83 - Simulate INQUIRY VPD page 83, device identity * @args: device IDENTIFY data / SCSI command of interest. * @rbuf: Response buffer, to which simulated SCSI cmd output is sent. * * Yields two logical unit device identification designators: * - vendor specific ASCII containing the ATA serial number * - SAT defined "t10 vendor id based" containing ASCII vendor * name ("ATA "), model and serial numbers. * * LOCKING: * spin_lock_irqsave(host lock) */ static unsigned int ata_scsiop_inq_83(struct ata_scsi_args *args, u8 *rbuf) { const int <API key> = 68; int num; rbuf[1] = 0x83; /* this page code */ num = 4; /* piv=0, assoc=lu, code_set=ACSII, designator=vendor */ rbuf[num + 0] = 2; rbuf[num + 3] = ATA_ID_SERNO_LEN; num += 4; ata_id_string(args->id, (unsigned char *) rbuf + num, ATA_ID_SERNO, ATA_ID_SERNO_LEN); num += ATA_ID_SERNO_LEN; /* SAT defined lu model and serial numbers descriptor */ /* piv=0, assoc=lu, code_set=ACSII, designator=t10 vendor id */ rbuf[num + 0] = 2; rbuf[num + 1] = 1; rbuf[num + 3] = <API key>; num += 4; memcpy(rbuf + num, "ATA ", 8); num += 8; ata_id_string(args->id, (unsigned char *) rbuf + num, ATA_ID_PROD, ATA_ID_PROD_LEN); num += ATA_ID_PROD_LEN; ata_id_string(args->id, (unsigned char *) rbuf + num, ATA_ID_SERNO, ATA_ID_SERNO_LEN); num += ATA_ID_SERNO_LEN; rbuf[3] = num - 4; /* page len (assume less than 256 bytes) */ return 0; } /** * ata_scsiop_inq_89 - Simulate INQUIRY VPD page 89, ATA info * @args: device IDENTIFY data / SCSI command of interest. * @rbuf: Response buffer, to which simulated SCSI cmd output is sent. * * Yields SAT-specified ATA VPD page. * * LOCKING: * spin_lock_irqsave(host lock) */ static unsigned int ata_scsiop_inq_89(struct ata_scsi_args *args, u8 *rbuf) { struct ata_taskfile tf; memset(&tf, 0, sizeof(tf)); rbuf[1] = 0x89; /* our page code */ rbuf[2] = (0x238 >> 8); /* page size fixed at 238h */ rbuf[3] = (0x238 & 0xff); memcpy(&rbuf[8], "linux ", 8); memcpy(&rbuf[16], "libata ", 16); memcpy(&rbuf[32], DRV_VERSION, 4); ata_id_string(args->id, &rbuf[32], ATA_ID_FW_REV, 4); /* we don't store the ATA device signature, so we fake it */ tf.command = ATA_DRDY; /* really, this is Status reg */ tf.lbal = 0x1; tf.nsect = 0x1; ata_tf_to_fis(&tf, 0, 1, &rbuf[36]); /* TODO: PMP? */ rbuf[36] = 0x34; /* force D2H Reg FIS (34h) */ rbuf[56] = ATA_CMD_ID_ATA; memcpy(&rbuf[60], &args->id[0], 512); return 0; } static unsigned int ata_scsiop_inq_b0(struct ata_scsi_args *args, u8 *rbuf) { u32 min_io_sectors; rbuf[1] = 0xb0; rbuf[3] = 0x3c; /* required VPD size with unmap support */ /* * Optimal transfer length granularity. * * This is always one physical block, but for disks with a smaller * logical than physical sector size we need to figure out what the * latter is. */ if (<API key>(args->id)) min_io_sectors = <API key>(args->id); else min_io_sectors = 1; put_unaligned_be16(min_io_sectors, &rbuf[6]); /* * Optimal unmap granularity. * * The ATA spec doesn't even know about a granularity or alignment * for the TRIM command. We can leave away most of the unmap related * VPD page entries, but we have specifify a granularity to signal * that we support some form of unmap - in thise case via WRITE SAME * with the unmap bit set. */ if (ata_id_has_trim(args->id)) { put_unaligned_be32(65535 * 512 / 8, &rbuf[20]); put_unaligned_be32(1, &rbuf[28]); } return 0; } static unsigned int ata_scsiop_inq_b1(struct ata_scsi_args *args, u8 *rbuf) { int form_factor = ata_id_form_factor(args->id); int media_rotation_rate = <API key>(args->id); rbuf[1] = 0xb1; rbuf[3] = 0x3c; rbuf[4] = media_rotation_rate >> 8; rbuf[5] = media_rotation_rate; rbuf[7] = form_factor; return 0; } /** * ata_scsiop_noop - Command handler that simply returns success. * @args: device IDENTIFY data / SCSI command of interest. * @rbuf: Response buffer, to which simulated SCSI cmd output is sent. * * No operation. Simply returns success to caller, to indicate * that the caller should successfully complete this SCSI command. * * LOCKING: * spin_lock_irqsave(host lock) */ static unsigned int ata_scsiop_noop(struct ata_scsi_args *args, u8 *rbuf) { VPRINTK("ENTER\n"); return 0; } /** * ata_msense_caching - Simulate MODE SENSE caching info page * @id: device IDENTIFY data * @buf: output buffer * * Generate a caching info page, which conditionally indicates * write caching to the SCSI layer, depending on device * capabilities. * * LOCKING: * None. */ static unsigned int ata_msense_caching(u16 *id, u8 *buf) { memcpy(buf, def_cache_mpage, sizeof(def_cache_mpage)); if (<API key>(id)) buf[2] |= (1 << 2); /* write cache enable */ if (!<API key>(id)) buf[12] |= (1 << 5); /* disable read ahead */ return sizeof(def_cache_mpage); } /** * ata_msense_ctl_mode - Simulate MODE SENSE control mode page * @buf: output buffer * * Generate a generic MODE SENSE control mode page. * * LOCKING: * None. */ static unsigned int ata_msense_ctl_mode(u8 *buf) { memcpy(buf, def_control_mpage, sizeof(def_control_mpage)); return sizeof(def_control_mpage); } /** * <API key> - Simulate MODE SENSE r/w error recovery page * @buf: output buffer * * Generate a generic MODE SENSE r/w error recovery page. * * LOCKING: * None. */ static unsigned int <API key>(u8 *buf) { memcpy(buf, <API key>, sizeof(<API key>)); return sizeof(<API key>); } /* * We can turn this into a real blacklist if it's needed, for now just * blacklist any Maxtor BANC1G10 revision firmware */ static int <API key>(u16 *id) { unsigned char model[ATA_ID_PROD_LEN + 1], fw[ATA_ID_FW_REV_LEN + 1]; if (!libata_fua) return 0; if (!ata_id_has_fua(id)) return 0; ata_id_c_string(id, model, ATA_ID_PROD, sizeof(model)); ata_id_c_string(id, fw, ATA_ID_FW_REV, sizeof(fw)); if (strcmp(model, "Maxtor")) return 1; if (strcmp(fw, "BANC1G10")) return 1; return 0; /* blacklisted */ } /** * <API key> - Simulate MODE SENSE 6, 10 commands * @args: device IDENTIFY data / SCSI command of interest. * @rbuf: Response buffer, to which simulated SCSI cmd output is sent. * * Simulate MODE SENSE commands. Assume this is invoked for direct * access devices (e.g. disks) only. There should be no block * descriptor for other device types. * * LOCKING: * spin_lock_irqsave(host lock) */ static unsigned int <API key>(struct ata_scsi_args *args, u8 *rbuf) { struct ata_device *dev = args->dev; u8 *scsicmd = args->cmd->cmnd, *p = rbuf; const u8 sat_blk_desc[] = { 0, 0, 0, 0, /* number of blocks: sat unspecified */ 0, 0, 0x2, 0x0 /* block length: 512 bytes */ }; u8 pg, spg; unsigned int ebd, page_control, six_byte; u8 dpofua; VPRINTK("ENTER\n"); six_byte = (scsicmd[0] == MODE_SENSE); ebd = !(scsicmd[1] & 0x8); /* dbd bit inverted == edb */ /* * LLBA bit in msense(10) ignored (compliant) */ page_control = scsicmd[2] >> 6; switch (page_control) { case 0: /* current */ break; /* supported */ case 3: /* saved */ goto saving_not_supp; case 1: /* changeable */ case 2: /* defaults */ default: goto invalid_fld; } if (six_byte) p += 4 + (ebd ? 8 : 0); else p += 8 + (ebd ? 8 : 0); pg = scsicmd[2] & 0x3f; spg = scsicmd[3]; /* * No mode subpages supported (yet) but asking for _all_ * subpages may be valid */ if (spg && (spg != ALL_SUB_MPAGES)) goto invalid_fld; switch(pg) { case RW_RECOVERY_MPAGE: p += <API key>(p); break; case CACHE_MPAGE: p += ata_msense_caching(args->id, p); break; case CONTROL_MPAGE: p += ata_msense_ctl_mode(p); break; case ALL_MPAGES: p += <API key>(p); p += ata_msense_caching(args->id, p); p += ata_msense_ctl_mode(p); break; default: /* invalid page code */ goto invalid_fld; } dpofua = 0; if (<API key>(args->id) && (dev->flags & ATA_DFLAG_LBA48) && (!(dev->flags & ATA_DFLAG_PIO) || dev->multi_count)) dpofua = 1 << 4; if (six_byte) { rbuf[0] = p - rbuf - 1; rbuf[2] |= dpofua; if (ebd) { rbuf[3] = sizeof(sat_blk_desc); memcpy(rbuf + 4, sat_blk_desc, sizeof(sat_blk_desc)); } } else { unsigned int output_len = p - rbuf - 2; rbuf[0] = output_len >> 8; rbuf[1] = output_len; rbuf[3] |= dpofua; if (ebd) { rbuf[7] = sizeof(sat_blk_desc); memcpy(rbuf + 8, sat_blk_desc, sizeof(sat_blk_desc)); } } return 0; invalid_fld: ata_scsi_set_sense(args->cmd, ILLEGAL_REQUEST, 0x24, 0x0); /* "Invalid field in cbd" */ return 1; saving_not_supp: ata_scsi_set_sense(args->cmd, ILLEGAL_REQUEST, 0x39, 0x0); /* "Saving parameters not supported" */ return 1; } /** * ata_scsiop_read_cap - Simulate READ CAPACITY[ 16] commands * @args: device IDENTIFY data / SCSI command of interest. * @rbuf: Response buffer, to which simulated SCSI cmd output is sent. * * Simulate READ CAPACITY commands. * * LOCKING: * None. */ static unsigned int ata_scsiop_read_cap(struct ata_scsi_args *args, u8 *rbuf) { struct ata_device *dev = args->dev; u64 last_lba = dev->n_sectors - 1; /* LBA of the last block */ u8 log_per_phys = 0; u16 lowest_aligned = 0; u16 word_106 = dev->id[106]; u16 word_209 = dev->id[209]; if ((word_106 & 0xc000) == 0x4000) { /* Number and offset of logical sectors per physical sector */ if (word_106 & (1 << 13)) log_per_phys = word_106 & 0xf; if ((word_209 & 0xc000) == 0x4000) { u16 first = dev->id[209] & 0x3fff; if (first > 0) lowest_aligned = (1 << log_per_phys) - first; } } VPRINTK("ENTER\n"); if (args->cmd->cmnd[0] == READ_CAPACITY) { if (last_lba >= 0xffffffffULL) last_lba = 0xffffffff; /* sector count, 32-bit */ rbuf[0] = last_lba >> (8 * 3); rbuf[1] = last_lba >> (8 * 2); rbuf[2] = last_lba >> (8 * 1); rbuf[3] = last_lba; /* sector size */ rbuf[6] = ATA_SECT_SIZE >> 8; rbuf[7] = ATA_SECT_SIZE & 0xff; } else { /* sector count, 64-bit */ rbuf[0] = last_lba >> (8 * 7); rbuf[1] = last_lba >> (8 * 6); rbuf[2] = last_lba >> (8 * 5); rbuf[3] = last_lba >> (8 * 4); rbuf[4] = last_lba >> (8 * 3); rbuf[5] = last_lba >> (8 * 2); rbuf[6] = last_lba >> (8 * 1); rbuf[7] = last_lba; /* sector size */ rbuf[10] = ATA_SECT_SIZE >> 8; rbuf[11] = ATA_SECT_SIZE & 0xff; rbuf[12] = 0; rbuf[13] = log_per_phys; rbuf[14] = (lowest_aligned >> 8) & 0x3f; rbuf[15] = lowest_aligned; if (ata_id_has_trim(args->id)) { rbuf[14] |= 0x80; /* TPE */ if (<API key>(args->id)) rbuf[14] |= 0x40; /* TPRZ */ } } return 0; } /** * <API key> - Simulate REPORT LUNS command * @args: device IDENTIFY data / SCSI command of interest. * @rbuf: Response buffer, to which simulated SCSI cmd output is sent. * * Simulate REPORT LUNS command. * * LOCKING: * spin_lock_irqsave(host lock) */ static unsigned int <API key>(struct ata_scsi_args *args, u8 *rbuf) { VPRINTK("ENTER\n"); rbuf[3] = 8; /* just one lun, LUN 0, size 8 bytes */ return 0; } static void <API key>(struct ata_queued_cmd *qc) { if (qc->err_mask && ((qc->err_mask & AC_ERR_DEV) == 0)) { /* FIXME: not quite right; we don't want the * translation of taskfile registers into * a sense descriptors, since that's only * correct for ATA, not ATAPI */ <API key>(qc); } qc->scsidone(qc->scsicmd); ata_qc_free(qc); } /* is it pointless to prefer PIO for "safety reasons"? */ static inline int ata_pio_use_silly(struct ata_port *ap) { return (ap->flags & ATA_FLAG_PIO_DMA); } static void atapi_request_sense(struct ata_queued_cmd *qc) { struct ata_port *ap = qc->ap; struct scsi_cmnd *cmd = qc->scsicmd; DPRINTK("ATAPI request sense\n"); /* FIXME: is this needed? */ memset(cmd->sense_buffer, 0, <API key>); #ifdef CONFIG_ATA_SFF if (ap->ops->sff_tf_read) ap->ops->sff_tf_read(ap, &qc->tf); #endif /* fill these in, for the case where they are -not- overwritten */ cmd->sense_buffer[0] = 0x70; cmd->sense_buffer[2] = qc->tf.feature >> 4; ata_qc_reinit(qc); /* setup sg table and init transfer direction */ sg_init_one(&qc->sgent, cmd->sense_buffer, <API key>); ata_sg_init(qc, &qc->sgent, 1); qc->dma_dir = DMA_FROM_DEVICE; memset(&qc->cdb, 0, qc->dev->cdb_len); qc->cdb[0] = REQUEST_SENSE; qc->cdb[4] = <API key>; qc->tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE; qc->tf.command = ATA_CMD_PACKET; if (ata_pio_use_silly(ap)) { qc->tf.protocol = ATAPI_PROT_DMA; qc->tf.feature |= ATAPI_PKT_DMA; } else { qc->tf.protocol = ATAPI_PROT_PIO; qc->tf.lbam = <API key>; qc->tf.lbah = 0; } qc->nbytes = <API key>; qc->complete_fn = <API key>; ata_qc_issue(qc); DPRINTK("EXIT\n"); } static void atapi_qc_complete(struct ata_queued_cmd *qc) { struct scsi_cmnd *cmd = qc->scsicmd; unsigned int err_mask = qc->err_mask; VPRINTK("ENTER, err_mask 0x%X\n", err_mask); /* handle completion from new EH */ if (unlikely(qc->ap->ops->error_handler && (err_mask || qc->flags & <API key>))) { if (!(qc->flags & <API key>)) { /* FIXME: not quite right; we don't want the * translation of taskfile registers into a * sense descriptors, since that's only * correct for ATA, not ATAPI */ <API key>(qc); } /* SCSI EH automatically locks door if sdev->locked is * set. Sometimes door lock request continues to * fail, for example, when no media is present. This * creates a loop - SCSI EH issues door lock which * fails and gets invoked again to acquire sense data * for the failed command. * * If door lock fails, always clear sdev->locked to * avoid this infinite loop. * * This may happen before SCSI scan is complete. Make * sure qc->dev->sdev isn't NULL before dereferencing. */ if (qc->cdb[0] == <API key> && qc->dev->sdev) qc->dev->sdev->locked = 0; qc->scsicmd->result = <API key>; qc->scsidone(cmd); ata_qc_free(qc); return; } /* successful completion or old EH failure path */ if (unlikely(err_mask & AC_ERR_DEV)) { cmd->result = <API key>; atapi_request_sense(qc); return; } else if (unlikely(err_mask)) { /* FIXME: not quite right; we don't want the * translation of taskfile registers into * a sense descriptors, since that's only * correct for ATA, not ATAPI */ <API key>(qc); } else { u8 *scsicmd = cmd->cmnd; if ((scsicmd[0] == INQUIRY) && ((scsicmd[1] & 0x03) == 0)) { unsigned long flags; u8 *buf; buf = ata_scsi_rbuf_get(cmd, true, &flags); /* ATAPI devices typically report zero for their SCSI version, * and sometimes deviate from the spec WRT response data * format. If SCSI version is reported as zero like normal, * then we make the following fixups: 1) Fake MMC-5 version, * to indicate to the Linux scsi midlayer this is a modern * device. 2) Ensure response data format / ATAPI information * are always correct. */ if (buf[2] == 0) { buf[2] = 0x5; buf[3] = 0x32; } ata_scsi_rbuf_put(cmd, true, &flags); } cmd->result = SAM_STAT_GOOD; } qc->scsidone(cmd); ata_qc_free(qc); } /** * atapi_xlat - Initialize PACKET taskfile * @qc: command structure to be initialized * * LOCKING: * spin_lock_irqsave(host lock) * * RETURNS: * Zero on success, non-zero on failure. */ static unsigned int atapi_xlat(struct ata_queued_cmd *qc) { struct scsi_cmnd *scmd = qc->scsicmd; struct ata_device *dev = qc->dev; int nodata = (scmd->sc_data_direction == DMA_NONE); int using_pio = !nodata && (dev->flags & ATA_DFLAG_PIO); unsigned int nbytes; memset(qc->cdb, 0, dev->cdb_len); memcpy(qc->cdb, scmd->cmnd, scmd->cmd_len); qc->complete_fn = atapi_qc_complete; qc->tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE; if (scmd->sc_data_direction == DMA_TO_DEVICE) { qc->tf.flags |= ATA_TFLAG_WRITE; DPRINTK("direction: write\n"); } qc->tf.command = ATA_CMD_PACKET; <API key>(qc); /* check whether ATAPI DMA is safe */ if (!nodata && !using_pio && atapi_check_dma(qc)) using_pio = 1; /* Some controller variants snoop this value for Packet * transfers to do state machine and FIFO management. Thus we * want to set it properly, and for DMA where it is * effectively meaningless. */ nbytes = min(ata_qc_raw_nbytes(qc), (unsigned int)63 * 1024); /* Most ATAPI devices which honor transfer chunk size don't * behave according to the spec when odd chunk size which * matches the transfer length is specified. If the number of * bytes to transfer is 2n+1. According to the spec, what * should happen is to indicate that 2n+1 is going to be * transferred and transfer 2n+2 bytes where the last byte is * padding. * * In practice, this doesn't happen. ATAPI devices first * indicate and transfer 2n bytes and then indicate and * transfer 2 bytes where the last byte is padding. * * This inconsistency confuses several controllers which * perform PIO using DMA such as Intel AHCIs and sil3124/32. * These controllers use actual number of transferred bytes to * update DMA poitner and transfer of 4n+2 bytes make those * controller push DMA pointer by 4n+4 bytes because SATA data * FISes are aligned to 4 bytes. This causes data corruption * and buffer overrun. * * Always setting nbytes to even number solves this problem * because then ATAPI devices don't have to split data at 2n * boundaries. */ if (nbytes & 0x1) nbytes++; qc->tf.lbam = (nbytes & 0xFF); qc->tf.lbah = (nbytes >> 8); if (nodata) qc->tf.protocol = ATAPI_PROT_NODATA; else if (using_pio) qc->tf.protocol = ATAPI_PROT_PIO; else { /* DMA data xfer */ qc->tf.protocol = ATAPI_PROT_DMA; qc->tf.feature |= ATAPI_PKT_DMA; if ((dev->flags & ATA_DFLAG_DMADIR) && (scmd->sc_data_direction != DMA_TO_DEVICE)) /* some SATA bridges need us to indicate data xfer direction */ qc->tf.feature |= ATAPI_DMADIR; } /* FIXME: We need to translate 0x05 READ_BLOCK_LIMITS to a MODE_SENSE as ATAPI tape drives don't get this right otherwise */ return 0; } static struct ata_device *ata_find_dev(struct ata_port *ap, int devno) { if (!sata_pmp_attached(ap)) { if (likely(devno < <API key>(&ap->link))) return &ap->link.device[devno]; } else { if (likely(devno < ap->nr_pmp_links)) return &ap->pmp_link[devno].device[0]; } return NULL; } static struct ata_device *__ata_scsi_find_dev(struct ata_port *ap, const struct scsi_device *scsidev) { int devno; /* skip commands not addressed to targets we simulate */ if (!sata_pmp_attached(ap)) { if (unlikely(scsidev->channel || scsidev->lun)) return NULL; devno = scsidev->id; } else { if (unlikely(scsidev->id || scsidev->lun)) return NULL; devno = scsidev->channel; } return ata_find_dev(ap, devno); } /** * ata_scsi_find_dev - lookup ata_device from scsi_cmnd * @ap: ATA port to which the device is attached * @scsidev: SCSI device from which we derive the ATA device * * Given various information provided in struct scsi_cmnd, * map that onto an ATA bus, and using that mapping * determine which ata_device is associated with the * SCSI command to be sent. * * LOCKING: * spin_lock_irqsave(host lock) * * RETURNS: * Associated ATA device, or %NULL if not found. */ static struct ata_device * ata_scsi_find_dev(struct ata_port *ap, const struct scsi_device *scsidev) { struct ata_device *dev = __ata_scsi_find_dev(ap, scsidev); if (unlikely(!dev || !ata_dev_enabled(dev))) return NULL; return dev; } /* * ata_scsi_map_proto - Map pass-thru protocol value to taskfile value. * @byte1: Byte 1 from pass-thru CDB. * * RETURNS: * ATA_PROT_UNKNOWN if mapping failed/unimplemented, protocol otherwise. */ static u8 ata_scsi_map_proto(u8 byte1) { switch((byte1 & 0x1e) >> 1) { case 3: /* Non-data */ return ATA_PROT_NODATA; case 6: /* DMA */ case 10: /* UDMA Data-in */ case 11: /* UDMA Data-Out */ return ATA_PROT_DMA; case 4: /* PIO Data-in */ case 5: /* PIO Data-out */ return ATA_PROT_PIO; case 0: /* Hard Reset */ case 1: /* SRST */ case 8: /* Device Diagnostic */ case 9: /* Device Reset */ case 7: /* DMA Queued */ case 12: /* FPDMA */ case 15: /* Return Response Info */ default: /* Reserved */ break; } return ATA_PROT_UNKNOWN; } /** * ata_scsi_pass_thru - convert ATA pass-thru CDB to taskfile * @qc: command structure to be initialized * * Handles either 12 or 16-byte versions of the CDB. * * RETURNS: * Zero on success, non-zero on failure. */ static unsigned int ata_scsi_pass_thru(struct ata_queued_cmd *qc) { struct ata_taskfile *tf = &(qc->tf); struct scsi_cmnd *scmd = qc->scsicmd; struct ata_device *dev = qc->dev; const u8 *cdb = scmd->cmnd; if ((tf->protocol = ata_scsi_map_proto(cdb[1])) == ATA_PROT_UNKNOWN) goto invalid_fld; /* * 12 and 16 byte CDBs use different offsets to * provide the various register values. */ if (cdb[0] == ATA_16) { /* * 16-byte CDB - may contain extended commands. * * If that is the case, copy the upper byte register values. */ if (cdb[1] & 0x01) { tf->hob_feature = cdb[3]; tf->hob_nsect = cdb[5]; tf->hob_lbal = cdb[7]; tf->hob_lbam = cdb[9]; tf->hob_lbah = cdb[11]; tf->flags |= ATA_TFLAG_LBA48; } else tf->flags &= ~ATA_TFLAG_LBA48; /* * Always copy low byte, device and command registers. */ tf->feature = cdb[4]; tf->nsect = cdb[6]; tf->lbal = cdb[8]; tf->lbam = cdb[10]; tf->lbah = cdb[12]; tf->device = cdb[13]; tf->command = cdb[14]; } else { /* * 12-byte CDB - incapable of extended commands. */ tf->flags &= ~ATA_TFLAG_LBA48; tf->feature = cdb[3]; tf->nsect = cdb[4]; tf->lbal = cdb[5]; tf->lbam = cdb[6]; tf->lbah = cdb[7]; tf->device = cdb[8]; tf->command = cdb[9]; } /* enforce correct master/slave bit */ tf->device = dev->devno ? tf->device | ATA_DEV1 : tf->device & ~ATA_DEV1; /* READ/WRITE LONG use a non-standard sect_size */ qc->sect_size = ATA_SECT_SIZE; switch (tf->command) { case ATA_CMD_READ_LONG: case <API key>: case ATA_CMD_WRITE_LONG: case <API key>: if (tf->protocol != ATA_PROT_PIO || tf->nsect != 1) goto invalid_fld; qc->sect_size = scsi_bufflen(scmd); } /* * Set flags so that all registers will be written, pass on * write indication (used for PIO/DMA setup), result TF is * copied back and we don't whine too much about its failure. */ tf->flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE; if (scmd->sc_data_direction == DMA_TO_DEVICE) tf->flags |= ATA_TFLAG_WRITE; qc->flags |= <API key> | ATA_QCFLAG_QUIET; /* * Set transfer length. * * TODO: find out if we need to do more here to * cover scatter/gather case. */ <API key>(qc); /* We may not issue DMA commands if no DMA mode is set */ if (tf->protocol == ATA_PROT_DMA && dev->dma_mode == 0) goto invalid_fld; /* sanity check for pio multi commands */ if ((cdb[1] & 0xe0) && !is_multi_taskfile(tf)) goto invalid_fld; if (is_multi_taskfile(tf)) { unsigned int multi_count = 1 << (cdb[1] >> 5); /* compare the passed through multi_count * with the cached multi_count of libata */ if (multi_count != dev->multi_count) ata_dev_printk(dev, KERN_WARNING, "invalid multi_count %u ignored\n", multi_count); } /* * Filter SET_FEATURES - XFER MODE command -- otherwise, * SET_FEATURES - XFER MODE must be preceded/succeeded * by an update to hardware-specific registers for each * controller (i.e. the reason for ->set_piomode(), * ->set_dmamode(), and ->post_set_mode() hooks). */ if (tf->command == <API key> && tf->feature == SETFEATURES_XFER) goto invalid_fld; /* * Filter TPM commands by default. These provide an * essentially uncontrolled encrypted "back door" between * applications and the disk. Set libata.allow_tpm=1 if you * have a real reason for wanting to use them. This ensures * that installed software cannot easily mess stuff up without * user intent. DVR type users will probably ship with this enabled * for movie content management. * * Note that for ATA8 we can issue a DCS change and DCS freeze lock * for this and should do in future but that it is not sufficient as * DCS is an optional feature set. Thus we also do the software filter * so that we comply with the TC consortium stated goal that the user * can turn off TC features of their system. */ if (tf->command >= 0x5C && tf->command <= 0x5F && !libata_allow_tpm) goto invalid_fld; return 0; invalid_fld: ata_scsi_set_sense(scmd, ILLEGAL_REQUEST, 0x24, 0x00); /* "Invalid field in cdb" */ return 1; } static unsigned int <API key>(struct ata_queued_cmd *qc) { struct ata_taskfile *tf = &qc->tf; struct scsi_cmnd *scmd = qc->scsicmd; struct ata_device *dev = qc->dev; const u8 *cdb = scmd->cmnd; u64 block; u32 n_block; u32 size; void *buf; /* we may not issue DMA commands if no DMA mode is set */ if (unlikely(!dev->dma_mode)) goto invalid_fld; if (unlikely(scmd->cmd_len < 16)) goto invalid_fld; scsi_16_lba_len(cdb, &block, &n_block); /* for now we only support WRITE SAME with the unmap bit set */ if (unlikely(!(cdb[1] & 0x8))) goto invalid_fld; /* * WRITE SAME always has a sector sized buffer as payload, this * should never be a multiple entry S/G list. */ if (!scsi_sg_count(scmd)) goto invalid_fld; buf = page_address(sg_page(scsi_sglist(scmd))); size = <API key>(buf, 512, block, n_block); tf->protocol = ATA_PROT_DMA; tf->hob_feature = 0; tf->feature = ATA_DSM_TRIM; tf->hob_nsect = (size / 512) >> 8; tf->nsect = size / 512; tf->command = ATA_CMD_DSM; tf->flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE | ATA_TFLAG_LBA48 | ATA_TFLAG_WRITE; <API key>(qc); return 0; invalid_fld: ata_scsi_set_sense(scmd, ILLEGAL_REQUEST, 0x24, 0x00); /* "Invalid field in cdb" */ return 1; } /** * ata_get_xlat_func - check if SCSI to ATA translation is possible * @dev: ATA device * @cmd: SCSI command opcode to consider * * Look up the SCSI command given, and determine whether the * SCSI command is to be translated or simulated. * * RETURNS: * Pointer to translation function if possible, %NULL if not. */ static inline ata_xlat_func_t ata_get_xlat_func(struct ata_device *dev, u8 cmd) { switch (cmd) { case READ_6: case READ_10: case READ_16: case WRITE_6: case WRITE_10: case WRITE_16: return ata_scsi_rw_xlat; case WRITE_SAME_16: return <API key>; case SYNCHRONIZE_CACHE: if (ata_try_flush_cache(dev)) return ata_scsi_flush_xlat; break; case VERIFY: case VERIFY_16: return <API key>; case ATA_12: case ATA_16: return ata_scsi_pass_thru; case START_STOP: return <API key>; } return NULL; } /** * ata_scsi_dump_cdb - dump SCSI command contents to dmesg * @ap: ATA port to which the command was being sent * @cmd: SCSI command to dump * * Prints the contents of a SCSI command via printk(). */ static inline void ata_scsi_dump_cdb(struct ata_port *ap, struct scsi_cmnd *cmd) { #ifdef ATA_DEBUG struct scsi_device *scsidev = cmd->device; u8 *scsicmd = cmd->cmnd; DPRINTK("CDB (%u:%d,%d,%d) %02x %02x %02x %02x %02x %02x %02x %02x %02x\n", ap->print_id, scsidev->channel, scsidev->id, scsidev->lun, scsicmd[0], scsicmd[1], scsicmd[2], scsicmd[3], scsicmd[4], scsicmd[5], scsicmd[6], scsicmd[7], scsicmd[8]); #endif } static inline int __ata_scsi_queuecmd(struct scsi_cmnd *scmd, void (*done)(struct scsi_cmnd *), struct ata_device *dev) { u8 scsi_op = scmd->cmnd[0]; ata_xlat_func_t xlat_func; int rc = 0; if (dev->class == ATA_DEV_ATA) { if (unlikely(!scmd->cmd_len || scmd->cmd_len > dev->cdb_len)) goto bad_cdb_len; xlat_func = ata_get_xlat_func(dev, scsi_op); } else { if (unlikely(!scmd->cmd_len)) goto bad_cdb_len; xlat_func = NULL; if (likely((scsi_op != ATA_16) || !atapi_passthru16)) { /* relay SCSI command to ATAPI device */ int len = COMMAND_SIZE(scsi_op); if (unlikely(len > scmd->cmd_len || len > dev->cdb_len)) goto bad_cdb_len; xlat_func = atapi_xlat; } else { /* ATA_16 passthru, treat as an ATA command */ if (unlikely(scmd->cmd_len > 16)) goto bad_cdb_len; xlat_func = ata_get_xlat_func(dev, scsi_op); } } if (xlat_func) rc = ata_scsi_translate(dev, scmd, done, xlat_func); else ata_scsi_simulate(dev, scmd, done); return rc; bad_cdb_len: DPRINTK("bad CDB len=%u, scsi_op=0x%02x, max=%u\n", scmd->cmd_len, scsi_op, dev->cdb_len); scmd->result = DID_ERROR << 16; done(scmd); return 0; } /** * ata_scsi_queuecmd - Issue SCSI cdb to libata-managed device * @cmd: SCSI command to be sent * @done: Completion function, called when command is complete * * In some cases, this function translates SCSI commands into * ATA taskfiles, and queues the taskfiles to be sent to * hardware. In other cases, this function simulates a * SCSI device by evaluating and responding to certain * SCSI commands. This creates the overall effect of * ATA and ATAPI devices appearing as SCSI devices. * * LOCKING: * Releases scsi-layer-held lock, and obtains host lock. * * RETURNS: * Return value from __ata_scsi_queuecmd() if @cmd can be queued, * 0 otherwise. */ int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)) { struct ata_port *ap; struct ata_device *dev; struct scsi_device *scsidev = cmd->device; struct Scsi_Host *shost = scsidev->host; int rc = 0; ap = ata_shost_to_port(shost); spin_unlock(shost->host_lock); spin_lock(ap->lock); ata_scsi_dump_cdb(ap, cmd); dev = ata_scsi_find_dev(ap, scsidev); if (likely(dev)) rc = __ata_scsi_queuecmd(cmd, done, dev); else { cmd->result = (DID_BAD_TARGET << 16); done(cmd); } spin_unlock(ap->lock); spin_lock(shost->host_lock); return rc; } /** * ata_scsi_simulate - simulate SCSI command on ATA device * @dev: the target device * @cmd: SCSI command being sent to device. * @done: SCSI command completion function. * * Interprets and directly executes a select list of SCSI commands * that can be handled internally. * * LOCKING: * spin_lock_irqsave(host lock) */ void ata_scsi_simulate(struct ata_device *dev, struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)) { struct ata_scsi_args args; const u8 *scsicmd = cmd->cmnd; u8 tmp8; args.dev = dev; args.id = dev->id; args.cmd = cmd; args.done = done; switch(scsicmd[0]) { /* TODO: worth improving? */ case FORMAT_UNIT: <API key>(cmd, done); break; case INQUIRY: if (scsicmd[1] & 2) /* is CmdDt set? */ <API key>(cmd, done); else if ((scsicmd[1] & 1) == 0) /* is EVPD clear? */ ata_scsi_rbuf_fill(&args, ata_scsiop_inq_std); else switch (scsicmd[2]) { case 0x00: ata_scsi_rbuf_fill(&args, ata_scsiop_inq_00); break; case 0x80: ata_scsi_rbuf_fill(&args, ata_scsiop_inq_80); break; case 0x83: ata_scsi_rbuf_fill(&args, ata_scsiop_inq_83); break; case 0x89: ata_scsi_rbuf_fill(&args, ata_scsiop_inq_89); break; case 0xb0: ata_scsi_rbuf_fill(&args, ata_scsiop_inq_b0); break; case 0xb1: ata_scsi_rbuf_fill(&args, ata_scsiop_inq_b1); break; default: <API key>(cmd, done); break; } break; case MODE_SENSE: case MODE_SENSE_10: ata_scsi_rbuf_fill(&args, <API key>); break; case MODE_SELECT: /* unconditionally return */ case MODE_SELECT_10: /* bad-field-in-cdb */ <API key>(cmd, done); break; case READ_CAPACITY: ata_scsi_rbuf_fill(&args, ata_scsiop_read_cap); break; case SERVICE_ACTION_IN: if ((scsicmd[1] & 0x1f) == <API key>) ata_scsi_rbuf_fill(&args, ata_scsiop_read_cap); else <API key>(cmd, done); break; case REPORT_LUNS: ata_scsi_rbuf_fill(&args, <API key>); break; case REQUEST_SENSE: ata_scsi_set_sense(cmd, 0, 0, 0); cmd->result = (DRIVER_SENSE << 24); done(cmd); break; /* if we reach this, then writeback caching is disabled, * turning this into a no-op. */ case SYNCHRONIZE_CACHE: /* fall through */ /* no-op's, complete with success */ case REZERO_UNIT: case SEEK_6: case SEEK_10: case TEST_UNIT_READY: ata_scsi_rbuf_fill(&args, ata_scsiop_noop); break; case SEND_DIAGNOSTIC: tmp8 = scsicmd[1] & ~(1 << 3); if ((tmp8 == 0x4) && (!scsicmd[3]) && (!scsicmd[4])) ata_scsi_rbuf_fill(&args, ata_scsiop_noop); else <API key>(cmd, done); break; /* all other commands */ default: ata_scsi_set_sense(cmd, ILLEGAL_REQUEST, 0x20, 0x0); /* "Invalid command operation code" */ done(cmd); break; } } int ata_scsi_add_hosts(struct ata_host *host, struct scsi_host_template *sht) { int i, rc; for (i = 0; i < host->n_ports; i++) { struct ata_port *ap = host->ports[i]; struct Scsi_Host *shost; rc = -ENOMEM; shost = scsi_host_alloc(sht, sizeof(struct ata_port *)); if (!shost) goto err_alloc; *(struct ata_port **)&shost->hostdata[0] = ap; ap->scsi_host = shost; shost->transportt = &<API key>; shost->unique_id = ap->print_id; shost->max_id = 16; shost->max_lun = 1; shost->max_channel = 1; shost->max_cmd_len = 16; /* Schedule policy is determined by ->qc_defer() * callback and it needs to see every deferred qc. * Set host_blocked to 1 to prevent SCSI midlayer from * automatically deferring requests. */ shost->max_host_blocked = 1; rc = scsi_add_host(ap->scsi_host, ap->host->dev); if (rc) goto err_add; } return 0; err_add: scsi_host_put(host->ports[i]->scsi_host); err_alloc: while (--i >= 0) { struct Scsi_Host *shost = host->ports[i]->scsi_host; scsi_remove_host(shost); scsi_host_put(shost); } return rc; } void ata_scsi_scan_host(struct ata_port *ap, int sync) { int tries = 5; struct ata_device *last_failed_dev = NULL; struct ata_link *link; struct ata_device *dev; repeat: ata_for_each_link(link, ap, EDGE) { ata_for_each_dev(dev, link, ENABLED) { struct scsi_device *sdev; int channel = 0, id = 0; if (dev->sdev) continue; if (ata_is_host_link(link)) id = dev->devno; else channel = link->pmp; sdev = __scsi_add_device(ap->scsi_host, channel, id, 0, NULL); if (!IS_ERR(sdev)) { dev->sdev = sdev; scsi_device_put(sdev); } } } /* If we scanned while EH was in progress or allocation * failure occurred, scan would have failed silently. Check * whether all devices are attached. */ ata_for_each_link(link, ap, EDGE) { ata_for_each_dev(dev, link, ENABLED) { if (!dev->sdev) goto exit_loop; } } exit_loop: if (!link) return; /* we're missing some SCSI devices */ if (sync) { /* If caller requested synchrnous scan && we've made * any progress, sleep briefly and repeat. */ if (dev != last_failed_dev) { msleep(100); last_failed_dev = dev; goto repeat; } /* We might be failing to detect boot device, give it * a few more chances. */ if (--tries) { msleep(100); goto repeat; } ata_port_printk(ap, KERN_ERR, "WARNING: synchronous SCSI scan " "failed without making any progress,\n" " switching to async\n"); } queue_delayed_work(ata_aux_wq, &ap->hotplug_task, <API key>(HZ)); } /** * <API key> - offline attached SCSI device * @dev: ATA device to offline attached SCSI device for * * This function is called from ata_eh_hotplug() and responsible * for taking the SCSI device attached to @dev offline. This * function is called with host lock which protects dev->sdev * against clearing. * * LOCKING: * spin_lock_irqsave(host lock) * * RETURNS: * 1 if attached SCSI device exists, 0 otherwise. */ int <API key>(struct ata_device *dev) { if (dev->sdev) { <API key>(dev->sdev, SDEV_OFFLINE); return 1; } return 0; } /** * ata_scsi_remove_dev - remove attached SCSI device * @dev: ATA device to remove attached SCSI device for * * This function is called from ata_eh_scsi_hotplug() and * responsible for removing the SCSI device attached to @dev. * * LOCKING: * Kernel thread context (may sleep). */ static void ata_scsi_remove_dev(struct ata_device *dev) { struct ata_port *ap = dev->link->ap; struct scsi_device *sdev; unsigned long flags; /* Alas, we need to grab scan_mutex to ensure SCSI device * state doesn't change underneath us and thus * scsi_device_get() always succeeds. The mutex locking can * be removed if there is __scsi_device_get() interface which * increments reference counts regardless of device state. */ mutex_lock(&ap->scsi_host->scan_mutex); spin_lock_irqsave(ap->lock, flags); /* clearing dev->sdev is protected by host lock */ sdev = dev->sdev; dev->sdev = NULL; if (sdev) { /* If user initiated unplug races with us, sdev can go * away underneath us after the host lock and * scan_mutex are released. Hold onto it. */ if (scsi_device_get(sdev) == 0) { /* The following ensures the attached sdev is * offline on return from <API key>() * regardless it wins or loses the race * against this function. */ <API key>(sdev, SDEV_OFFLINE); } else { WARN_ON(1); sdev = NULL; } } <API key>(ap->lock, flags); mutex_unlock(&ap->scsi_host->scan_mutex); if (sdev) { ata_dev_printk(dev, KERN_INFO, "detaching (SCSI %s)\n", dev_name(&sdev->sdev_gendev)); scsi_remove_device(sdev); scsi_device_put(sdev); } } static void <API key>(struct ata_link *link) { struct ata_port *ap = link->ap; struct ata_device *dev; ata_for_each_dev(dev, link, ALL) { unsigned long flags; if (!(dev->flags & ATA_DFLAG_DETACHED)) continue; spin_lock_irqsave(ap->lock, flags); dev->flags &= ~ATA_DFLAG_DETACHED; <API key>(ap->lock, flags); ata_scsi_remove_dev(dev); } } /** * <API key> - send media change event * @dev: Pointer to the disk device with media change event * * Tell the block layer to send a media change notification * event. * * LOCKING: * spin_lock_irqsave(host lock) */ void <API key>(struct ata_device *dev) { if (dev->sdev) <API key>(dev->sdev, <API key>, GFP_ATOMIC); } /** * ata_scsi_hotplug - SCSI part of hotplug * @work: Pointer to ATA port to perform SCSI hotplug on * * Perform SCSI part of hotplug. It's executed from a separate * workqueue after EH completes. This is necessary because SCSI * hot plugging requires working EH and hot unplugging is * synchronized with hot plugging with a mutex. * * LOCKING: * Kernel thread context (may sleep). */ void ata_scsi_hotplug(struct work_struct *work) { struct ata_port *ap = container_of(work, struct ata_port, hotplug_task.work); int i; if (ap->pflags & ATA_PFLAG_UNLOADING) { DPRINTK("ENTER/EXIT - unloading\n"); return; } DPRINTK("ENTER\n"); /* Unplug detached devices. We cannot use link iterator here * because PMP links have to be scanned even if PMP is * currently not attached. Iterate manually. */ <API key>(&ap->link); if (ap->pmp_link) for (i = 0; i < SATA_PMP_MAX_PORTS; i++) <API key>(&ap->pmp_link[i]); /* scan for new ones */ ata_scsi_scan_host(ap, 0); DPRINTK("EXIT\n"); } /** * ata_scsi_user_scan - indication for user-initiated bus scan * @shost: SCSI host to scan * @channel: Channel to scan * @id: ID to scan * @lun: LUN to scan * * This function is called when user explicitly requests bus * scan. Set probe pending flag and invoke EH. * * LOCKING: * SCSI layer (we don't care) * * RETURNS: * Zero. */ static int ata_scsi_user_scan(struct Scsi_Host *shost, unsigned int channel, unsigned int id, unsigned int lun) { struct ata_port *ap = ata_shost_to_port(shost); unsigned long flags; int devno, rc = 0; if (!ap->ops->error_handler) return -EOPNOTSUPP; if (lun != SCAN_WILD_CARD && lun) return -EINVAL; if (!sata_pmp_attached(ap)) { if (channel != SCAN_WILD_CARD && channel) return -EINVAL; devno = id; } else { if (id != SCAN_WILD_CARD && id) return -EINVAL; devno = channel; } spin_lock_irqsave(ap->lock, flags); if (devno == SCAN_WILD_CARD) { struct ata_link *link; ata_for_each_link(link, ap, EDGE) { struct ata_eh_info *ehi = &link->eh_info; ehi->probe_mask |= ATA_ALL_DEVICES; ehi->action |= ATA_EH_RESET; } } else { struct ata_device *dev = ata_find_dev(ap, devno); if (dev) { struct ata_eh_info *ehi = &dev->link->eh_info; ehi->probe_mask |= 1 << dev->devno; ehi->action |= ATA_EH_RESET; } else rc = -EINVAL; } if (rc == 0) { <API key>(ap); <API key>(ap->lock, flags); ata_port_wait_eh(ap); } else <API key>(ap->lock, flags); return rc; } /** * ata_scsi_dev_rescan - initiate scsi_rescan_device() * @work: Pointer to ATA port to perform scsi_rescan_device() * * After ATA pass thru (SAT) commands are executed successfully, * libata need to propagate the changes to SCSI layer. This * function must be executed from ata_aux_wq such that sdev * attach/detach don't race with rescan. * * LOCKING: * Kernel thread context (may sleep). */ void ata_scsi_dev_rescan(struct work_struct *work) { struct ata_port *ap = container_of(work, struct ata_port, scsi_rescan_task); struct ata_link *link; struct ata_device *dev; unsigned long flags; spin_lock_irqsave(ap->lock, flags); ata_for_each_link(link, ap, EDGE) { ata_for_each_dev(dev, link, ENABLED) { struct scsi_device *sdev = dev->sdev; if (!sdev) continue; if (scsi_device_get(sdev)) continue; <API key>(ap->lock, flags); scsi_rescan_device(&(sdev->sdev_gendev)); scsi_device_put(sdev); spin_lock_irqsave(ap->lock, flags); } } <API key>(ap->lock, flags); } /** * ata_sas_port_alloc - Allocate port for a SAS attached SATA device * @host: ATA host container for all SAS ports * @port_info: Information from low-level host driver * @shost: SCSI host that the scsi device is attached to * * LOCKING: * PCI/etc. bus probe sem. * * RETURNS: * ata_port pointer on success / NULL on failure. */ struct ata_port *ata_sas_port_alloc(struct ata_host *host, struct ata_port_info *port_info, struct Scsi_Host *shost) { struct ata_port *ap; ap = ata_port_alloc(host); if (!ap) return NULL; ap->port_no = 0; ap->lock = shost->host_lock; ap->pio_mask = port_info->pio_mask; ap->mwdma_mask = port_info->mwdma_mask; ap->udma_mask = port_info->udma_mask; ap->flags |= port_info->flags; ap->ops = port_info->port_ops; ap->cbl = ATA_CBL_SATA; return ap; } EXPORT_SYMBOL_GPL(ata_sas_port_alloc); /** * ata_sas_port_start - Set port up for dma. * @ap: Port to initialize * * Called just after data structures for each port are * initialized. * * May be used as the port_start() entry in ata_port_operations. * * LOCKING: * Inherited from caller. */ int ata_sas_port_start(struct ata_port *ap) { return 0; } EXPORT_SYMBOL_GPL(ata_sas_port_start); /** * ata_port_stop - Undo ata_sas_port_start() * @ap: Port to shut down * * May be used as the port_stop() entry in ata_port_operations. * * LOCKING: * Inherited from caller. */ void ata_sas_port_stop(struct ata_port *ap) { } EXPORT_SYMBOL_GPL(ata_sas_port_stop); /** * ata_sas_port_init - Initialize a SATA device * @ap: SATA port to initialize * * LOCKING: * PCI/etc. bus probe sem. * * RETURNS: * Zero on success, non-zero on error. */ int ata_sas_port_init(struct ata_port *ap) { int rc = ap->ops->port_start(ap); if (!rc) { ap->print_id = ata_print_id++; rc = ata_bus_probe(ap); } return rc; } EXPORT_SYMBOL_GPL(ata_sas_port_init); /** * <API key> - Destroy a SATA port allocated by ata_sas_port_alloc * @ap: SATA port to destroy * */ void <API key>(struct ata_port *ap) { if (ap->ops->port_stop) ap->ops->port_stop(ap); kfree(ap); } EXPORT_SYMBOL_GPL(<API key>); /** * <API key> - Default slave_config routine for libata devices * @sdev: SCSI device to configure * @ap: ATA port to which SCSI device is attached * * RETURNS: * Zero. */ int <API key>(struct scsi_device *sdev, struct ata_port *ap) { <API key>(sdev); ata_scsi_dev_config(sdev, ap->link.device); return 0; } EXPORT_SYMBOL_GPL(<API key>); /** * ata_sas_queuecmd - Issue SCSI cdb to libata-managed device * @cmd: SCSI command to be sent * @done: Completion function, called when command is complete * @ap: ATA port to which the command is being sent * * RETURNS: * Return value from __ata_scsi_queuecmd() if @cmd can be queued, * 0 otherwise. */ int ata_sas_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *), struct ata_port *ap) { int rc = 0; ata_scsi_dump_cdb(ap, cmd); if (likely(ata_dev_enabled(ap->link.device))) rc = __ata_scsi_queuecmd(cmd, done, ap->link.device); else { cmd->result = (DID_BAD_TARGET << 16); done(cmd); } return rc; } EXPORT_SYMBOL_GPL(ata_sas_queuecmd);
#include "common.h" #include "font.h" #ifdef PSP_BUILD #include <pspctrl.h> #include <pspkernel.h> #include <pspdebug.h> #include <pspdisplay.h> #include <pspgu.h> #include <psppower.h> #include <psprtc.h> static float *screen_vertex = (float *)0x441FC100; static u32 *ge_cmd = (u32 *)0x441FC000; static u16 *psp_gu_vram_base = (u16 *)(0x44000000); static u32 *ge_cmd_ptr = (u32 *)0x441FC000; static u32 gecbid; static u32 video_direct = 0; static u32 __attribute__((aligned(16))) display_list[32]; #define GBA_SCREEN_WIDTH 240 #define GBA_SCREEN_HEIGHT 160 #define PSP_SCREEN_WIDTH 480 #define PSP_SCREEN_HEIGHT 272 #define PSP_LINE_SIZE 512 #define PSP_ALL_BUTTON_MASK 0xFFFF #define GE_CMD_FBP 0x9C #define GE_CMD_FBW 0x9D #define GE_CMD_TBP0 0xA0 #define GE_CMD_TBW0 0xA8 #define GE_CMD_TSIZE0 0xB8 #define GE_CMD_TFLUSH 0xCB #define GE_CMD_CLEAR 0xD3 #define GE_CMD_VTYPE 0x12 #define GE_CMD_BASE 0x10 #define GE_CMD_VADDR 0x01 #define GE_CMD_IADDR 0x02 #define GE_CMD_PRIM 0x04 #define GE_CMD_FINISH 0x0F #define GE_CMD_SIGNAL 0x0C #define GE_CMD_NOP 0x00 #define GE_CMD(cmd, operand) \ *ge_cmd_ptr = (((GE_CMD_##cmd) << 24) | (operand)); \ ge_cmd_ptr++ \ static u16 *screen_texture = (u16 *)(0x4000000 + (512 * 272 * 2)); static u16 *<API key> = (u16 *)(0x4000000 + (512 * 272 * 2)); static u16 *screen_pixels = (u16 *)(0x4000000 + (512 * 272 * 2)); static u32 screen_pitch = 240; static void Ge_Finish_Callback(int id, void *arg) { } #define get_screen_pixels() \ screen_pixels \ #define get_screen_pitch() \ screen_pitch \ #else SDL_Surface *screen; const u32 video_scale = 1; #define get_screen_pixels() \ ((u16 *)screen->pixels) \ #define get_screen_pitch() \ (screen->pitch / 2) \ #endif void <API key>(u32 start, u32 end, u16 *scanline, u32 enable_flags, u32 dispcnt, u32 bldcnt, <API key> *layer_renderers); void <API key>(u32 start, u32 end, u16 *scanline, u32 enable_flags, u32 dispcnt, u32 bldcnt, <API key> *layer_renderers); #define no_op \ // This old version is not necessary if the palette is either being converted // transparently or the ABGR 1555 format is being used natively. The direct // version (without conversion) is much faster. #define <API key>(palette, source) \ current_pixel = palette[source]; \ convert_palette(current_pixel) \ #define tile_lookup_palette(palette, source) \ current_pixel = palette[source]; \ #define <API key>(index) \ tile_lookup_palette(palette, current_pixel); \ dest_ptr[index] = current_pixel \ #define <API key>(index) \ <API key>(index) \ #define tile_expand_copy(index) \ dest_ptr[index] = copy_ptr[index] \ #define <API key>(delta) \ dest_ptr += delta \ #define <API key>(delta) \ <API key>(delta) \ #define <API key>(delta) \ <API key>(delta); \ copy_ptr += delta \ #define <API key>(layer) \ ((io_registers[REG_BLDCNT] >> layer) & 0x01) \ // For color blending operations, will create a mask that has in bit // 10 if the layer is target B, and bit 9 if the layer is target A. #define color_combine_mask(layer) \ (<API key>(layer) | \ ((io_registers[REG_BLDCNT] >> (layer + 7)) & 0x02)) << 9 \ // For alpha blending renderers, draw the palette index (9bpp) and // layer bits rather than the raw RGB. For the base this should write to // the 32bit location directly. #define <API key>(index) \ dest_ptr[index] = current_pixel | pixel_combine \ #define tile_expand_base_bg(index) \ dest_ptr[index] = bg_combine \ // For layered (transparent) writes this should shift the "stack" and write // to the bottom. This will preserve the topmost pixel and the most recent // one. #define <API key>(index) \ dest_ptr[index] = (dest_ptr[index] << 16) | current_pixel | pixel_combine \ // OBJ should only shift if the top isn't already OBJ #define <API key>(index) \ dest = dest_ptr[index]; \ if(dest & 0x00000100) \ { \ dest_ptr[index] = (dest & 0xFFFF0000) | current_pixel | pixel_combine; \ } \ else \ { \ dest_ptr[index] = (dest << 16) | current_pixel | pixel_combine; \ } \ // For color effects that don't need to preserve the previous layer. // The color32 version should be used with 32bit wide dest_ptr so as to be // compatible with alpha combine on top of it. #define <API key>(index) \ dest_ptr[index] = current_pixel | pixel_combine \ #define <API key>(index) \ <API key>(index) \ #define <API key>(index) \ <API key>(index) \ #define <API key>(index) \ <API key>(index) \ // Operations for isolation 8bpp pixels within 32bpp pixel blocks. #define <API key>(op_param) \ current_pixel = current_pixels & 0xFF \ #define <API key>(shift) \ current_pixel = (current_pixels >> shift) & 0xFF \ #define <API key>(shift) \ current_pixel = current_pixels >> shift \ #define <API key>(shift) \ // Base should always draw raw in 8bpp mode; color 0 will be drawn where // color 0 is. #define <API key>(index) \ <API key>(index) \ #define <API key>(index) \ if(current_pixel) \ { \ <API key>(index); \ } \ else \ { \ tile_expand_base_bg(index); \ } \ #define <API key>(index) \ <API key>(index) \ #define <API key>(index) \ <API key>(index) \ #define tile_8bpp_draw_base(index, op, op_param, alpha_op) \ tile_8bpp_pixel_op_##op(op_param); \ <API key>##alpha_op(index) \ // Transparent (layered) writes should only replace what is there if the // pixel is not transparent (zero) #define <API key>(index, op, op_param, alpha_op) \ tile_8bpp_pixel_op_##op(op_param); \ if(current_pixel) \ { \ <API key>##alpha_op(index); \ } \ #define tile_8bpp_draw_copy(index, op, op_param, alpha_op) \ tile_8bpp_pixel_op_##op(op_param); \ if(current_pixel) \ { \ tile_expand_copy(index); \ } \ // Get the current tile from the map in 8bpp mode #define get_tile_8bpp() \ current_tile = *map_ptr; \ tile_ptr = tile_base + ((current_tile & 0x3FF) * 64) \ // Draw half of a tile in 8bpp mode, for base renderer #define <API key>(index, combine_op, alpha_op) \ tile_8bpp_draw_##combine_op(index + 0, mask, 0, alpha_op); \ tile_8bpp_draw_##combine_op(index + 1, shift_mask, 8, alpha_op); \ tile_8bpp_draw_##combine_op(index + 2, shift_mask, 16, alpha_op); \ tile_8bpp_draw_##combine_op(index + 3, shift, 24, alpha_op) \ // Like the above, but draws the half-tile horizontally flipped #define <API key>(index, combine_op, alpha_op) \ tile_8bpp_draw_##combine_op(index + 3, mask, 0, alpha_op); \ tile_8bpp_draw_##combine_op(index + 2, shift_mask, 8, alpha_op); \ tile_8bpp_draw_##combine_op(index + 1, shift_mask, 16, alpha_op); \ tile_8bpp_draw_##combine_op(index + 0, shift, 24, alpha_op) \ #define <API key>(index, alpha_op, flip_op) \ <API key>##flip_op(index, base, alpha_op) \ // Draw half of a tile in 8bpp mode, for transparent renderer; as an // optimization the entire thing is checked against zero (in transparent // capable renders it is more likely for the pixels to be transparent than // opaque) #define <API key>(index, alpha_op, flip_op) \ if(current_pixels != 0) \ { \ <API key>##flip_op(index, transparent, alpha_op); \ } \ #define <API key>(index, alpha_op, flip_op) \ if(current_pixels != 0) \ { \ <API key>##flip_op(index, copy, alpha_op); \ } \ // Helper macro for drawing 8bpp tiles clipped against the edge of the screen #define partial_tile_8bpp(combine_op, alpha_op) \ for(i = 0; i < partial_tile_run; i++) \ { \ tile_8bpp_draw_##combine_op(0, mask, 0, alpha_op); \ current_pixels >>= 8; \ advance_dest_ptr_##combine_op(1); \ } \ // Draws 8bpp tiles clipped against the left side of the screen, // partial_tile_offset indicates how much clipped in it is, partial_tile_run // indicates how much it should draw. #define <API key>(combine_op, alpha_op) \ if(partial_tile_offset >= 4) \ { \ current_pixels = *((u32 *)(tile_ptr + 4)) >> \ ((partial_tile_offset - 4) * 8); \ partial_tile_8bpp(combine_op, alpha_op); \ } \ else \ { \ partial_tile_run -= 4; \ current_pixels = *((u32 *)tile_ptr) >> (partial_tile_offset * 8); \ partial_tile_8bpp(combine_op, alpha_op); \ current_pixels = *((u32 *)(tile_ptr + 4)); \ <API key>##combine_op(0, alpha_op, noflip); \ advance_dest_ptr_##combine_op(4); \ } \ // Draws 8bpp tiles clipped against both the left and right side of the // screen, IE, runs of less than 8 - partial_tile_offset. #define <API key>(combine_op, alpha_op) \ if(partial_tile_offset >= 4) \ { \ current_pixels = *((u32 *)(tile_ptr + 4)) >> \ ((partial_tile_offset - 4) * 8); \ partial_tile_8bpp(combine_op, alpha_op); \ } \ else \ { \ current_pixels = *((u32 *)tile_ptr) >> (partial_tile_offset * 8); \ if((partial_tile_offset + partial_tile_run) > 4) \ { \ u32 old_run = partial_tile_run; \ partial_tile_run = 4 - partial_tile_offset; \ partial_tile_8bpp(combine_op, alpha_op); \ partial_tile_run = old_run - partial_tile_run; \ current_pixels = *((u32 *)(tile_ptr + 4)); \ partial_tile_8bpp(combine_op, alpha_op); \ } \ else \ { \ partial_tile_8bpp(combine_op, alpha_op); \ } \ } \ // Draws 8bpp tiles clipped against the right side of the screen, // partial_tile_run indicates how much there is to draw. #define <API key>(combine_op, alpha_op) \ if(partial_tile_run >= 4) \ { \ current_pixels = *((u32 *)tile_ptr); \ <API key>##combine_op(0, alpha_op, noflip); \ advance_dest_ptr_##combine_op(4); \ tile_ptr += 4; \ partial_tile_run -= 4; \ } \ \ current_pixels = *((u32 *)(tile_ptr)); \ partial_tile_8bpp(combine_op, alpha_op) \ // Draws a non-clipped (complete) 8bpp tile. #define tile_noflip_8bpp(combine_op, alpha_op) \ current_pixels = *((u32 *)tile_ptr); \ <API key>##combine_op(0, alpha_op, noflip); \ current_pixels = *((u32 *)(tile_ptr + 4)); \ <API key>##combine_op(4, alpha_op, noflip) \ // Like the above versions but draws flipped tiles. #define <API key>(combine_op, alpha_op) \ for(i = 0; i < partial_tile_run; i++) \ { \ tile_8bpp_draw_##combine_op(0, shift, 24, alpha_op); \ current_pixels <<= 8; \ advance_dest_ptr_##combine_op(1); \ } \ #define <API key>(combine_op, alpha_op) \ if(partial_tile_offset >= 4) \ { \ current_pixels = *((u32 *)tile_ptr) << ((partial_tile_offset - 4) * 8); \ <API key>(combine_op, alpha_op); \ } \ else \ { \ partial_tile_run -= 4; \ current_pixels = *((u32 *)(tile_ptr + 4)) << \ ((partial_tile_offset - 4) * 8); \ <API key>(combine_op, alpha_op); \ current_pixels = *((u32 *)tile_ptr); \ <API key>##combine_op(0, alpha_op, flip); \ advance_dest_ptr_##combine_op(4); \ } \ #define <API key>(combine_op, alpha_op) \ if(partial_tile_offset >= 4) \ { \ current_pixels = *((u32 *)tile_ptr) << ((partial_tile_offset - 4) * 8); \ <API key>(combine_op, alpha_op); \ } \ else \ { \ current_pixels = *((u32 *)(tile_ptr + 4)) << \ ((partial_tile_offset - 4) * 8); \ \ if((partial_tile_offset + partial_tile_run) > 4) \ { \ u32 old_run = partial_tile_run; \ partial_tile_run = 4 - partial_tile_offset; \ <API key>(combine_op, alpha_op); \ partial_tile_run = old_run - partial_tile_run; \ current_pixels = *((u32 *)(tile_ptr)); \ <API key>(combine_op, alpha_op); \ } \ else \ { \ <API key>(combine_op, alpha_op); \ } \ } \ #define <API key>(combine_op, alpha_op) \ if(partial_tile_run >= 4) \ { \ current_pixels = *((u32 *)(tile_ptr + 4)); \ <API key>##combine_op(0, alpha_op, flip); \ advance_dest_ptr_##combine_op(4); \ tile_ptr -= 4; \ partial_tile_run -= 4; \ } \ \ current_pixels = *((u32 *)(tile_ptr + 4)); \ <API key>(combine_op, alpha_op) \ #define tile_flip_8bpp(combine_op, alpha_op) \ current_pixels = *((u32 *)(tile_ptr + 4)); \ <API key>##combine_op(0, alpha_op, flip); \ current_pixels = *((u32 *)tile_ptr); \ <API key>##combine_op(4, alpha_op, flip) \ // Operations for isolating 4bpp tiles in a 32bit block #define <API key>(op_param) \ current_pixel = current_pixels & 0x0F \ #define <API key>(shift) \ current_pixel = (current_pixels >> shift) & 0x0F \ #define <API key>(shift) \ current_pixel = current_pixels >> shift \ #define <API key>(op_param) \ // Draws a single 4bpp pixel as base, normal renderer; checks to see if the // pixel is zero because if so the current palette should not be applied. // These ifs can be replaced with a lookup table, may or may not be superior // this way, should be benchmarked. The lookup table would be from 0-255 // identity map except for multiples of 16, which would map to 0. #define <API key>(index) \ if(current_pixel) \ { \ current_pixel |= current_palette; \ <API key>(index); \ } \ else \ { \ <API key>(index); \ } \ #define <API key>(index) \ if(current_pixel) \ { \ current_pixel |= current_palette; \ <API key>(index); \ } \ else \ { \ tile_expand_base_bg(index); \ } \ #define <API key>(index) \ <API key>(index) \ #define <API key>(index) \ <API key>(index) \ #define tile_4bpp_draw_base(index, op, op_param, alpha_op) \ tile_4bpp_pixel_op_##op(op_param); \ <API key>##alpha_op(index) \ // Draws a single 4bpp pixel as layered, if not transparent. #define <API key>(index, op, op_param, alpha_op) \ tile_4bpp_pixel_op_##op(op_param); \ if(current_pixel) \ { \ current_pixel |= current_palette; \ <API key>##alpha_op(index); \ } \ #define tile_4bpp_draw_copy(index, op, op_param, alpha_op) \ tile_4bpp_pixel_op_##op(op_param); \ if(current_pixel) \ { \ current_pixel |= current_palette; \ tile_expand_copy(index); \ } \ // Draws eight background pixels in transparent mode, for alpha or normal // renderers. #define <API key>(value) \ dest_ptr[0] = value; \ dest_ptr[1] = value; \ dest_ptr[2] = value; \ dest_ptr[3] = value; \ dest_ptr[4] = value; \ dest_ptr[5] = value; \ dest_ptr[6] = value; \ dest_ptr[7] = value \ // Draws eight background pixels for the alpha renderer, basically color zero // with the background flag high. #define <API key>() \ <API key>(bg_combine) \ #define <API key>() \ <API key>() \ #define <API key>() \ <API key>() \ // Draws eight background pixels for the normal renderer, just a bunch of // zeros. #define <API key>() \ current_pixel = palette[0]; \ <API key>(current_pixel) \ // Draws eight 4bpp pixels. #define <API key>(combine_op, alpha_op) \ tile_4bpp_draw_##combine_op(0, mask, 0, alpha_op); \ tile_4bpp_draw_##combine_op(1, shift_mask, 4, alpha_op); \ tile_4bpp_draw_##combine_op(2, shift_mask, 8, alpha_op); \ tile_4bpp_draw_##combine_op(3, shift_mask, 12, alpha_op); \ tile_4bpp_draw_##combine_op(4, shift_mask, 16, alpha_op); \ tile_4bpp_draw_##combine_op(5, shift_mask, 20, alpha_op); \ tile_4bpp_draw_##combine_op(6, shift_mask, 24, alpha_op); \ tile_4bpp_draw_##combine_op(7, shift, 28, alpha_op) \ // Draws eight 4bpp pixels in reverse order (for hflip). #define <API key>(combine_op, alpha_op) \ tile_4bpp_draw_##combine_op(7, mask, 0, alpha_op); \ tile_4bpp_draw_##combine_op(6, shift_mask, 4, alpha_op); \ tile_4bpp_draw_##combine_op(5, shift_mask, 8, alpha_op); \ tile_4bpp_draw_##combine_op(4, shift_mask, 12, alpha_op); \ tile_4bpp_draw_##combine_op(3, shift_mask, 16, alpha_op); \ tile_4bpp_draw_##combine_op(2, shift_mask, 20, alpha_op); \ tile_4bpp_draw_##combine_op(1, shift_mask, 24, alpha_op); \ tile_4bpp_draw_##combine_op(0, shift, 28, alpha_op) \ // Draws eight 4bpp pixels in base mode, checks if all are zero, if so draws // the appropriate background pixels. #define <API key>(alpha_op, flip_op) \ if(current_pixels != 0) \ { \ <API key>##flip_op(base, alpha_op); \ } \ else \ { \ <API key>##alpha_op(); \ } \ // Draws eight 4bpp pixels in transparent (layered) mode, checks if all are // zero and if so draws nothing. #define <API key>(alpha_op, flip_op) \ if(current_pixels != 0) \ { \ <API key>##flip_op(transparent, alpha_op); \ } \ #define <API key>(alpha_op, flip_op) \ if(current_pixels != 0) \ { \ <API key>##flip_op(copy, alpha_op); \ } \ // Gets the current tile in 4bpp mode, also getting the current palette and // the pixel block. #define get_tile_4bpp() \ current_tile = *map_ptr; \ current_palette = (current_tile >> 12) << 4; \ tile_ptr = tile_base + ((current_tile & 0x3FF) * 32); \ // Helper macro for drawing clipped 4bpp tiles. #define partial_tile_4bpp(combine_op, alpha_op) \ for(i = 0; i < partial_tile_run; i++) \ { \ tile_4bpp_draw_##combine_op(0, mask, 0, alpha_op); \ current_pixels >>= 4; \ advance_dest_ptr_##combine_op(1); \ } \ // Draws a 4bpp tile clipped against the left edge of the screen. // partial_tile_offset is how far in it's clipped, partial_tile_run is // how many to draw. #define <API key>(combine_op, alpha_op) \ current_pixels = *((u32 *)tile_ptr) >> (partial_tile_offset * 4); \ partial_tile_4bpp(combine_op, alpha_op) \ // Draws a 4bpp tile clipped against both edges of the screen, same as right. #define <API key>(combine_op, alpha_op) \ <API key>(combine_op, alpha_op) \ // Draws a 4bpp tile clipped against the right edge of the screen. // partial_tile_offset is how many to draw. #define <API key>(combine_op, alpha_op) \ current_pixels = *((u32 *)tile_ptr); \ partial_tile_4bpp(combine_op, alpha_op) \ // Draws a complete 4bpp tile row (not clipped) #define tile_noflip_4bpp(combine_op, alpha_op) \ current_pixels = *((u32 *)tile_ptr); \ <API key>##combine_op(alpha_op, noflip) \ // Like the above, but draws flipped tiles. #define <API key>(combine_op, alpha_op) \ for(i = 0; i < partial_tile_run; i++) \ { \ tile_4bpp_draw_##combine_op(0, shift, 28, alpha_op); \ current_pixels <<= 4; \ advance_dest_ptr_##combine_op(1); \ } \ #define <API key>(combine_op, alpha_op) \ current_pixels = *((u32 *)tile_ptr) << (partial_tile_offset * 4); \ <API key>(combine_op, alpha_op) \ #define <API key>(combine_op, alpha_op) \ <API key>(combine_op, alpha_op) \ #define <API key>(combine_op, alpha_op) \ current_pixels = *((u32 *)tile_ptr); \ <API key>(combine_op, alpha_op) \ #define tile_flip_4bpp(combine_op, alpha_op) \ current_pixels = *((u32 *)tile_ptr); \ <API key>##combine_op(alpha_op, flip) \ // Draws a single (partial or complete) tile from the tilemap, flipping // as necessary. #define single_tile_map(tile_type, combine_op, color_depth, alpha_op) \ get_tile_##color_depth(); \ if(current_tile & 0x800) \ tile_ptr += vertical_pixel_flip; \ \ if(current_tile & 0x400) \ { \ tile_type##_flip_##color_depth(combine_op, alpha_op); \ } \ else \ { \ tile_type##_noflip_##color_depth(combine_op, alpha_op); \ } \ // Draws multiple sequential tiles from the tilemap, hflips and vflips as // necessary. #define multiple_tile_map(combine_op, color_depth, alpha_op) \ for(i = 0; i < tile_run; i++) \ { \ single_tile_map(tile, combine_op, color_depth, alpha_op); \ advance_dest_ptr_##combine_op(8); \ map_ptr++; \ } \ // Draws a partial tile from a tilemap clipped against the left edge of the // screen. #define <API key>(combine_op, color_depth, alpha_op) \ single_tile_map(partial_tile_right, combine_op, color_depth, alpha_op); \ map_ptr++ \ // Draws a partial tile from a tilemap clipped against both edges of the // screen. #define <API key>(combine_op, color_depth, alpha_op) \ single_tile_map(partial_tile_mid, combine_op, color_depth, alpha_op) \ // Draws a partial tile from a tilemap clipped against the right edge of the // screen. #define <API key>(combine_op, color_depth, alpha_op) \ single_tile_map(partial_tile_left, combine_op, color_depth, alpha_op) \ // Advances a non-flipped 4bpp obj to the next tile. #define <API key>() \ tile_ptr += 32 \ // Advances a non-flipped 8bpp obj to the next tile. #define <API key>() \ tile_ptr += 64 \ // Advances a flipped 4bpp obj to the next tile. #define <API key>() \ tile_ptr -= 32 \ // Advances a flipped 8bpp obj to the next tile. #define <API key>() \ tile_ptr -= 64 \ // Draws multiple sequential tiles from an obj, flip_op determines if it should // be flipped or not (set to flip or noflip) #define multiple_tile_obj(combine_op, color_depth, alpha_op, flip_op) \ for(i = 0; i < tile_run; i++) \ { \ tile_##flip_op##_##color_depth(combine_op, alpha_op); \ obj_advance_##flip_op##_##color_depth(); \ advance_dest_ptr_##combine_op(8); \ } \ // Draws an obj's tile clipped against the left side of the screen #define <API key>(combine_op, color_depth, alpha_op, flip_op) \ partial_tile_right_##flip_op##_##color_depth(combine_op, alpha_op); \ obj_advance_##flip_op##_##color_depth() \ // Draws an obj's tile clipped against both sides of the screen #define <API key>(combine_op, color_depth, alpha_op, flip_op) \ partial_tile_mid_##flip_op##_##color_depth(combine_op, alpha_op) \ // Draws an obj's tile clipped against the right side of the screen #define <API key>(combine_op, color_depth, alpha_op, flip_op) \ partial_tile_left_##flip_op##_##color_depth(combine_op, alpha_op) \ // Extra variables specific for 8bpp/4bpp tile renderers. #define <API key>() \ #define <API key>() \ u32 current_palette \ // Byte lengths of complete tiles and tile rows in 4bpp and 8bpp. #define tile_width_4bpp 4 #define tile_size_4bpp 32 #define tile_width_8bpp 8 #define tile_size_8bpp 64 // Render a single scanline of text tiles #define tile_render(color_depth, combine_op, alpha_op) \ { \ u32 <API key> = (vertical_offset % 8) * \ tile_width_##color_depth; \ u32 vertical_pixel_flip = \ ((tile_size_##color_depth - tile_width_##color_depth) - \ <API key>) - <API key>; \ <API key>##color_depth(); \ u8 *tile_base = vram + (((bg_control >> 2) & 0x03) * (1024 * 16)) + \ <API key>; \ u32 pixel_run = 256 - (horizontal_offset % 256); \ u32 current_tile; \ \ map_base += ((vertical_offset % 256) / 8) * 32; \ partial_tile_offset = (horizontal_offset % 8); \ \ if(pixel_run >= end) \ { \ if(partial_tile_offset) \ { \ partial_tile_run = 8 - partial_tile_offset; \ if(end < partial_tile_run) \ { \ partial_tile_run = end; \ <API key>(combine_op, color_depth, alpha_op); \ return; \ } \ else \ { \ end -= partial_tile_run; \ <API key>(combine_op, color_depth, alpha_op); \ } \ } \ \ tile_run = end / 8; \ multiple_tile_map(combine_op, color_depth, alpha_op); \ \ partial_tile_run = end % 8; \ \ if(partial_tile_run) \ { \ <API key>(combine_op, color_depth, alpha_op); \ } \ } \ else \ { \ if(partial_tile_offset) \ { \ partial_tile_run = 8 - partial_tile_offset; \ <API key>(combine_op, color_depth, alpha_op); \ } \ \ tile_run = (pixel_run - partial_tile_run) / 8; \ multiple_tile_map(combine_op, color_depth, alpha_op); \ map_ptr = second_ptr; \ end -= pixel_run; \ tile_run = end / 8; \ multiple_tile_map(combine_op, color_depth, alpha_op); \ \ partial_tile_run = end % 8; \ if(partial_tile_run) \ { \ <API key>(combine_op, color_depth, alpha_op); \ } \ } \ } \ #define <API key> u16 #define <API key> u32 #define <API key> u32 #define <API key> u16 #define <API key> u32 #define <API key> u32 #define <API key> u16 #define <API key> u16 // If rendering a scanline that is not a target A then there's no point in // keeping what's underneath it because it can't blend with it. #define <API key>(bg_type, combine_op) \ if((pixel_combine & 0x00000200) == 0) \ { \ render_scanline_##bg_type##_##combine_op##_color32(layer, \ start, end, scanline); \ return; \ } \ #define <API key>(bg_type) \ #define <API key>(bg_type) \ #define <API key>(bg_type) \ u32 bg_combine = color_combine_mask(5); \ u32 pixel_combine = color_combine_mask(layer) | (bg_combine << 16); \ <API key>(bg_type, base) \ #define <API key>() \ u32 bg_combine = color_combine_mask(5); \ u32 pixel_combine = color_combine_mask(layer) \ #define <API key>(bg_type) \ u32 pixel_combine = color_combine_mask(layer); \ <API key>(bg_type, transparent) \ #define <API key>() \ u32 pixel_combine = color_combine_mask(layer) \ #define <API key>(bg_type) \ <API key>() \ #define <API key>(bg_type) \ <API key>() \ #define <API key>(bg_type) \ <API key>() \ #define <API key>(bg_type) \ <API key>() \ // Map widths and heights u32 map_widths[] = { 256, 512, 256, 512 }; u32 map_heights[] = { 256, 256, 512, 512 }; // Build text scanline rendering functions. #define <API key>(combine_op, alpha_op) \ void <API key>##combine_op##_##alpha_op(u32 layer, \ u32 start, u32 end, void *scanline) \ { \ <API key>##combine_op##_##alpha_op(text); \ u32 bg_control = io_registers[REG_BG0CNT + layer]; \ u32 map_size = (bg_control >> 14) & 0x03; \ u32 map_width = map_widths[map_size]; \ u32 map_height = map_heights[map_size]; \ u32 horizontal_offset = \ (io_registers[REG_BG0HOFS + (layer * 2)] + start) % 512; \ u32 vertical_offset = (io_registers[REG_VCOUNT] + \ io_registers[REG_BG0VOFS + (layer * 2)]) % 512; \ u32 current_pixel; \ u32 current_pixels; \ u32 partial_tile_run = 0; \ u32 partial_tile_offset; \ u32 tile_run; \ u16 *palette = <API key>; \ u32 i; \ <API key>##alpha_op *dest_ptr = \ ((<API key>##alpha_op *)scanline) + start; \ \ u16 *map_base = (u16 *)(vram + ((bg_control >> 8) & 0x1F) * (1024 * 2)); \ u16 *map_ptr, *second_ptr; \ u8 *tile_ptr; \ \ end -= start; \ \ if((map_size & 0x02) && (vertical_offset >= 256)) \ { \ map_base += ((map_width / 8) * 32) + \ (((vertical_offset - 256) / 8) * 32); \ } \ else \ { \ map_base += (((vertical_offset % 256) / 8) * 32); \ } \ \ if(map_size & 0x01) \ { \ if(horizontal_offset >= 256) \ { \ horizontal_offset -= 256; \ map_ptr = map_base + (32 * 32) + (horizontal_offset / 8); \ second_ptr = map_base; \ } \ else \ { \ map_ptr = map_base + (horizontal_offset / 8); \ second_ptr = map_base + (32 * 32); \ } \ } \ else \ { \ horizontal_offset %= 256; \ map_ptr = map_base + (horizontal_offset / 8); \ second_ptr = map_base; \ } \ \ if(bg_control & 0x80) \ { \ tile_render(8bpp, combine_op, alpha_op); \ } \ else \ { \ tile_render(4bpp, combine_op, alpha_op); \ } \ } \ <API key>(base, normal); <API key>(transparent, normal); <API key>(base, color16); <API key>(transparent, color16); <API key>(base, color32); <API key>(transparent, color32); <API key>(base, alpha); <API key>(transparent, alpha); s32 affine_reference_x[2]; s32 affine_reference_y[2]; #define <API key>() \ current_pixel = <API key>[0] \ #define <API key>() \ current_pixel = bg_combine \ #define <API key>() \ <API key>() \ #define <API key>() \ <API key>() \ #define <API key>(alpha_op) \ <API key>##alpha_op() \ #define <API key>(alpha_op) \ #define <API key>(alpha_op) \ #define <API key>(alpha_op) \ dest_ptr[0] = current_pixel #define <API key>(alpha_op) \ #define <API key>(alpha_op) \ #define <API key>(alpha_op) \ <API key>##alpha_op(); \ for(; i < end; i++) \ { \ <API key>(alpha_op); \ <API key>(1); \ } \ #define <API key>(alpha_op) \ #define <API key>(alpha_op) \ #define affine_render_next(combine_op) \ source_x += dx; \ source_y += dy; \ advance_dest_ptr_##combine_op(1) \ #define <API key>() \ tile_base += ((pixel_y % 8) * 8); \ map_base += (pixel_y / 8) << map_pitch \ #define <API key>(combine_op, alpha_op) \ map_offset = (pixel_x / 8); \ if(map_offset != last_map_offset) \ { \ tile_ptr = tile_base + (map_base[map_offset] * 64); \ last_map_offset = map_offset; \ } \ tile_ptr = tile_base + (map_base[(pixel_x / 8)] * 64); \ current_pixel = tile_ptr[(pixel_x % 8)]; \ tile_8bpp_draw_##combine_op(0, none, 0, alpha_op); \ affine_render_next(combine_op) \ #define affine_render_scale(combine_op, alpha_op) \ { \ pixel_y = source_y >> 8; \ u32 i = 0; \ <API key>##combine_op(alpha_op); \ if((u32)pixel_y < (u32)width_height) \ { \ <API key>(); \ for(; i < end; i++) \ { \ pixel_x = source_x >> 8; \ \ if((u32)pixel_x < (u32)width_height) \ { \ break; \ } \ \ affine_render_bg_##combine_op(alpha_op); \ affine_render_next(combine_op); \ } \ \ for(; i < end; i++) \ { \ pixel_x = source_x >> 8; \ \ if((u32)pixel_x >= (u32)width_height) \ break; \ \ <API key>(combine_op, alpha_op); \ } \ } \ <API key>##combine_op(alpha_op); \ } \ #define <API key>(combine_op, alpha_op) \ { \ u32 wrap_mask = width_height - 1; \ pixel_y = (source_y >> 8) & wrap_mask; \ if((u32)pixel_y < (u32)width_height) \ { \ <API key>(); \ for(i = 0; i < end; i++) \ { \ pixel_x = (source_x >> 8) & wrap_mask; \ <API key>(combine_op, alpha_op); \ } \ } \ } \ #define <API key>(combine_op, alpha_op) \ map_offset = (pixel_x / 8) + ((pixel_y / 8) << map_pitch); \ if(map_offset != last_map_offset) \ { \ tile_ptr = tile_base + (map_base[map_offset] * 64); \ last_map_offset = map_offset; \ } \ \ current_pixel = tile_ptr[(pixel_x % 8) + ((pixel_y % 8) * 8)]; \ tile_8bpp_draw_##combine_op(0, none, 0, alpha_op); \ affine_render_next(combine_op) \ #define <API key>(combine_op, alpha_op) \ { \ <API key>##combine_op(alpha_op); \ for(i = 0; i < end; i++) \ { \ pixel_x = source_x >> 8; \ pixel_y = source_y >> 8; \ \ if(((u32)pixel_x < (u32)width_height) && \ ((u32)pixel_y < (u32)width_height)) \ { \ break; \ } \ affine_render_bg_##combine_op(alpha_op); \ affine_render_next(combine_op); \ } \ \ for(; i < end; i++) \ { \ pixel_x = source_x >> 8; \ pixel_y = source_y >> 8; \ \ if(((u32)pixel_x >= (u32)width_height) || \ ((u32)pixel_y >= (u32)width_height)) \ { \ <API key>##combine_op(alpha_op); \ break; \ } \ \ <API key>(combine_op, alpha_op); \ } \ } \ #define <API key>(combine_op, alpha_op) \ { \ u32 wrap_mask = width_height - 1; \ for(i = 0; i < end; i++) \ { \ pixel_x = (source_x >> 8) & wrap_mask; \ pixel_y = (source_y >> 8) & wrap_mask; \ \ <API key>(combine_op, alpha_op); \ } \ } \ // Build affine background renderers. #define <API key>(combine_op, alpha_op) \ void <API key>##combine_op##_##alpha_op(u32 layer, \ u32 start, u32 end, void *scanline) \ { \ <API key>##combine_op##_##alpha_op(affine); \ u32 bg_control = io_registers[REG_BG0CNT + layer]; \ u32 current_pixel; \ s32 source_x, source_y; \ u32 vcount = io_registers[REG_VCOUNT]; \ u32 pixel_x, pixel_y; \ u32 layer_offset = (layer - 2) * 8; \ s32 dx, dy; \ u32 map_size = (bg_control >> 14) & 0x03; \ u32 width_height = 1 << (7 + map_size); \ u32 map_pitch = map_size + 4; \ u8 *map_base = vram + (((bg_control >> 8) & 0x1F) * (1024 * 2)); \ u8 *tile_base = vram + (((bg_control >> 2) & 0x03) * (1024 * 16)); \ u8 *tile_ptr; \ u16 *palette = <API key>; \ u32 map_offset, last_map_offset = (u32)-1; \ u32 i; \ <API key>##alpha_op *dest_ptr = \ ((<API key>##alpha_op *)scanline) + start; \ \ dx = (s16)io_registers[REG_BG2PA + layer_offset]; \ dy = (s16)io_registers[REG_BG2PC + layer_offset]; \ source_x = affine_reference_x[layer - 2] + (start * dx); \ source_y = affine_reference_y[layer - 2] + (start * dy); \ \ end -= start; \ \ switch(((bg_control >> 12) & 0x02) | (dy != 0)) \ { \ case 0x00: \ affine_render_scale(combine_op, alpha_op); \ break; \ \ case 0x01: \ <API key>(combine_op, alpha_op); \ break; \ \ case 0x02: \ <API key>(combine_op, alpha_op); \ break; \ \ case 0x03: \ <API key>(combine_op, alpha_op); \ break; \ } \ } \ <API key>(base, normal); <API key>(transparent, normal); <API key>(base, color16); <API key>(transparent, color16); <API key>(base, color32); <API key>(transparent, color32); <API key>(base, alpha); <API key>(transparent, alpha); #define <API key>(alpha_op) \ convert_palette(current_pixel); \ *dest_ptr = current_pixel \ #define <API key>(alpha_op) \ tile_expand_base_##alpha_op(0) \ #define <API key>(alpha_op) \ <API key>(alpha_op) \ #define bitmap_render_scale(type, alpha_op, width, height) \ pixel_y = (source_y >> 8); \ if((u32)pixel_y < (u32)height) \ { \ pixel_x = (source_x >> 8); \ src_ptr += (pixel_y * width); \ if(dx == 0x100) \ { \ if(pixel_x < 0) \ { \ end += pixel_x; \ dest_ptr -= pixel_x; \ pixel_x = 0; \ } \ else \ \ if(pixel_x > 0) \ { \ src_ptr += pixel_x; \ } \ \ if((pixel_x + end) >= width) \ end = (width - pixel_x); \ \ for(i = 0; (s32)i < (s32)end; i++) \ { \ current_pixel = *src_ptr; \ <API key>##type(alpha_op); \ src_ptr++; \ dest_ptr++; \ } \ } \ else \ { \ if((u32)(source_y >> 8) < (u32)height) \ { \ for(i = 0; i < end; i++) \ { \ pixel_x = (source_x >> 8); \ \ if((u32)pixel_x < (u32)width) \ break; \ \ source_x += dx; \ dest_ptr++; \ } \ \ for(; i < end; i++) \ { \ pixel_x = (source_x >> 8); \ \ if((u32)pixel_x >= (u32)width) \ break; \ \ current_pixel = src_ptr[pixel_x]; \ <API key>##type(alpha_op); \ \ source_x += dx; \ dest_ptr++; \ } \ } \ } \ } \ #define <API key>(type, alpha_op, width, height) \ for(i = 0; i < end; i++) \ { \ pixel_x = source_x >> 8; \ pixel_y = source_y >> 8; \ \ if(((u32)pixel_x < (u32)width) && ((u32)pixel_y < (u32)height)) \ break; \ \ source_x += dx; \ source_y += dy; \ dest_ptr++; \ } \ \ for(; i < end; i++) \ { \ pixel_x = (source_x >> 8); \ pixel_y = (source_y >> 8); \ \ if(((u32)pixel_x >= (u32)width) || ((u32)pixel_y >= (u32)height)) \ break; \ \ current_pixel = src_ptr[pixel_x + (pixel_y * width)]; \ <API key>##type(alpha_op); \ \ source_x += dx; \ source_y += dy; \ dest_ptr++; \ } \ #define <API key>() \ u16 *src_ptr = (u16 *)vram \ #define <API key>() \ u16 *palette = <API key>; \ u8 *src_ptr; \ if(io_registers[REG_DISPCNT] & 0x10) \ src_ptr = vram + 0xA000; \ else \ src_ptr = vram \ #define <API key>() \ u16 *src_ptr; \ if(io_registers[REG_DISPCNT] & 0x10) \ src_ptr = (u16 *)(vram + 0xA000); \ else \ src_ptr = (u16 *)vram \ // Build bitmap scanline rendering functions. #define <API key>(type, alpha_op, width, height) \ void <API key>##type##_##alpha_op(u32 start, u32 end, \ void *scanline) \ { \ u32 bg_control = io_registers[REG_BG2CNT]; \ u32 current_pixel; \ s32 source_x, source_y; \ u32 vcount = io_registers[REG_VCOUNT]; \ s32 pixel_x, pixel_y; \ \ s32 dx = (s16)io_registers[REG_BG2PA]; \ s32 dy = (s16)io_registers[REG_BG2PC]; \ \ u32 i; \ \ <API key>##alpha_op *dest_ptr = \ ((<API key>##alpha_op *)scanline) + start; \ <API key>##type(); \ \ end -= start; \ \ source_x = affine_reference_x[0] + (start * dx); \ source_y = affine_reference_y[0] + (start * dy); \ \ if(dy == 0) \ { \ bitmap_render_scale(type, alpha_op, width, height); \ } \ else \ { \ <API key>(type, alpha_op, width, height); \ } \ } \ <API key>(mode3, normal, 240, 160); <API key>(mode4, normal, 240, 160); <API key>(mode5, normal, 160, 128); // Fill in the renderers for a layer based on the mode type, #define <API key>(type) \ { \ render_scanline_##type##_base_normal, \ render_scanline_##type##_transparent_normal, \ render_scanline_##type##_base_alpha, \ render_scanline_##type##_transparent_alpha, \ render_scanline_##type##_base_color16, \ render_scanline_##type##<API key>, \ render_scanline_##type##_base_color32, \ render_scanline_##type##<API key> \ } \ // Use if a layer is unsupported for that mode. #define <API key>() \ { \ NULL, NULL, NULL, NULL \ } \ #define <API key>(type) \ { \ <API key>##type##_normal \ } \ // Structs containing functions to render the layers for each mode, for // each render type. <API key> tile_mode_renderers[3][4] = { { <API key>(text), <API key>(text), <API key>(text), <API key>(text) }, { <API key>(text), <API key>(text), <API key>(affine), <API key>(text) }, { <API key>(text), <API key>(text), <API key>(affine), <API key>(affine) } }; <API key> <API key>[3] = { <API key>(mode3), <API key>(mode4), <API key>(mode5) }; #define <API key>() \ <API key> *layer_renderers = \ tile_mode_renderers[dispcnt & 0x07] \ #define <API key>() \ <API key> *layer_renderers = \ <API key> + ((dispcnt & 0x07) - 3) \ // Adjust a flipped obj's starting position #define <API key>(color_depth) \ #define <API key>(color_depth) \ + (tile_size_##color_depth * ((obj_width - 8) / 8)) \ // Adjust the obj's starting point if it goes too far off the left edge of \ // the screen. \ #define <API key>(color_depth) \ tile_ptr += (partial_tile_offset / 8) * tile_size_##color_depth \ #define <API key>(color_depth) \ tile_ptr -= (partial_tile_offset / 8) * tile_size_##color_depth \ // Get the current row offset into an obj in 1D map space #define obj_tile_offset_1D(color_depth, flip_op) \ tile_ptr = tile_base + ((obj_attribute_2 & 0x3FF) * 32) \ + ((vertical_offset / 8) * (obj_width / 8) * tile_size_##color_depth) \ + ((vertical_offset % 8) * tile_width_##color_depth) \ obj_tile_offset_##flip_op(color_depth) \ // Get the current row offset into an obj in 2D map space #define obj_tile_offset_2D(color_depth, flip_op) \ tile_ptr = tile_base + ((obj_attribute_2 & 0x3FF) * 32) \ + ((vertical_offset / 8) * 1024) \ + ((vertical_offset % 8) * tile_width_##color_depth) \ obj_tile_offset_##flip_op(color_depth) \ // Get the palette for 4bpp obj. #define <API key>() \ current_palette = (obj_attribute_2 >> 8) & 0xF0 \ #define <API key>() \ // Render the current row of an obj. #define obj_render(combine_op, color_depth, alpha_op, map_space, flip_op) \ { \ obj_get_palette_##color_depth(); \ obj_tile_offset_##map_space(color_depth, flip_op); \ \ if(obj_x < (s32)start) \ { \ dest_ptr = scanline + start; \ pixel_run = obj_width - (start - obj_x); \ if((s32)pixel_run > 0) \ { \ if((obj_x + obj_width) >= end) \ { \ pixel_run = end - start; \ partial_tile_offset = start - obj_x; \ <API key>##flip_op(color_depth); \ partial_tile_offset %= 8; \ \ if(partial_tile_offset) \ { \ partial_tile_run = 8 - partial_tile_offset; \ if((s32)pixel_run < (s32)partial_tile_run) \ { \ if((s32)pixel_run > 0) \ { \ partial_tile_run = pixel_run; \ <API key>(combine_op, color_depth, alpha_op, \ flip_op); \ } \ continue; \ } \ else \ { \ pixel_run -= partial_tile_run; \ <API key>(combine_op, color_depth, alpha_op, \ flip_op); \ } \ } \ tile_run = pixel_run / 8; \ multiple_tile_obj(combine_op, color_depth, alpha_op, flip_op); \ partial_tile_run = pixel_run % 8; \ if(partial_tile_run) \ { \ <API key>(combine_op, color_depth, alpha_op, \ flip_op); \ } \ } \ else \ { \ partial_tile_offset = start - obj_x; \ <API key>##flip_op(color_depth); \ partial_tile_offset %= 8; \ if(partial_tile_offset) \ { \ partial_tile_run = 8 - partial_tile_offset; \ <API key>(combine_op, color_depth, alpha_op, \ flip_op); \ } \ tile_run = pixel_run / 8; \ multiple_tile_obj(combine_op, color_depth, alpha_op, flip_op); \ } \ } \ } \ else \ \ if((obj_x + obj_width) >= end) \ { \ pixel_run = end - obj_x; \ if((s32)pixel_run > 0) \ { \ dest_ptr = scanline + obj_x; \ tile_run = pixel_run / 8; \ multiple_tile_obj(combine_op, color_depth, alpha_op, flip_op); \ partial_tile_run = pixel_run % 8; \ if(partial_tile_run) \ { \ <API key>(combine_op, color_depth, alpha_op, flip_op); \ } \ } \ } \ else \ { \ dest_ptr = scanline + obj_x; \ tile_run = obj_width / 8; \ multiple_tile_obj(combine_op, color_depth, alpha_op, flip_op); \ } \ } \ #define obj_scale_offset_1D(color_depth) \ tile_ptr = tile_base + ((obj_attribute_2 & 0x3FF) * 32) \ + ((vertical_offset / 8) * (max_x / 8) * tile_size_##color_depth) \ + ((vertical_offset % 8) * tile_width_##color_depth) \ // Get the current row offset into an obj in 2D map space #define obj_scale_offset_2D(color_depth) \ tile_ptr = tile_base + ((obj_attribute_2 & 0x3FF) * 32) \ + ((vertical_offset / 8) * 1024) \ + ((vertical_offset % 8) * tile_width_##color_depth) \ #define <API key>(combine_op, alpha_op) \ if(tile_x & 0x01) \ { \ current_pixel = tile_ptr[tile_map_offset + ((tile_x >> 1) & 0x03)] >> 4; \ } \ else \ { \ current_pixel = \ tile_ptr[tile_map_offset + ((tile_x >> 1) & 0x03)] & 0x0F; \ } \ \ tile_4bpp_draw_##combine_op(0, none, 0, alpha_op) \ #define <API key>(combine_op, alpha_op) \ current_pixel = tile_ptr[tile_map_offset + (tile_x & 0x07)]; \ tile_8bpp_draw_##combine_op(0, none, 0, alpha_op); \ #define obj_render_scale(combine_op, color_depth, alpha_op, map_space) \ { \ u32 vertical_offset; \ source_y += (y_delta * dmy); \ vertical_offset = (source_y >> 8); \ if((u32)vertical_offset < (u32)max_y) \ { \ obj_scale_offset_##map_space(color_depth); \ source_x += (y_delta * dmx) - (middle_x * dx); \ \ for(i = 0; i < obj_width; i++) \ { \ tile_x = (source_x >> 8); \ \ if((u32)tile_x < (u32)max_x) \ break; \ \ source_x += dx; \ advance_dest_ptr_##combine_op(1); \ } \ \ for(; i < obj_width; i++) \ { \ tile_x = (source_x >> 8); \ \ if((u32)tile_x >= (u32)max_x) \ break; \ \ tile_map_offset = (tile_x >> 3) * tile_size_##color_depth; \ <API key>##color_depth(combine_op, alpha_op); \ \ source_x += dx; \ advance_dest_ptr_##combine_op(1); \ } \ } \ } \ #define <API key>(color_depth) \ obj_tile_pitch = (max_x / 8) * tile_size_##color_depth \ #define <API key>(color_depth) \ obj_tile_pitch = 1024 \ #define <API key>(combine_op, alpha_op) \ if(tile_x & 0x01) \ { \ current_pixel = tile_ptr[tile_map_offset + \ ((tile_x >> 1) & 0x03) + ((tile_y & 0x07) * obj_pitch)] >> 4; \ } \ else \ { \ current_pixel = tile_ptr[tile_map_offset + \ ((tile_x >> 1) & 0x03) + ((tile_y & 0x07) * obj_pitch)] & 0x0F; \ } \ \ tile_4bpp_draw_##combine_op(0, none, 0, alpha_op) \ #define <API key>(combine_op, alpha_op) \ current_pixel = tile_ptr[tile_map_offset + \ (tile_x & 0x07) + ((tile_y & 0x07) * obj_pitch)]; \ \ tile_8bpp_draw_##combine_op(0, none, 0, alpha_op) \ #define obj_render_rotate(combine_op, color_depth, alpha_op, map_space) \ { \ tile_ptr = tile_base + ((obj_attribute_2 & 0x3FF) * 32); \ obj_rotate_offset_##map_space(color_depth); \ \ source_x += (y_delta * dmx) - (middle_x * dx); \ source_y += (y_delta * dmy) - (middle_x * dy); \ \ for(i = 0; i < obj_width; i++) \ { \ tile_x = (source_x >> 8); \ tile_y = (source_y >> 8); \ \ if(((u32)tile_x < (u32)max_x) && ((u32)tile_y < (u32)max_y)) \ break; \ \ source_x += dx; \ source_y += dy; \ advance_dest_ptr_##combine_op(1); \ } \ \ for(; i < obj_width; i++) \ { \ tile_x = (source_x >> 8); \ tile_y = (source_y >> 8); \ \ if(((u32)tile_x >= (u32)max_x) || ((u32)tile_y >= (u32)max_y)) \ break; \ \ tile_map_offset = ((tile_x >> 3) * tile_size_##color_depth) + \ ((tile_y >> 3) * obj_tile_pitch); \ <API key>##color_depth(combine_op, alpha_op); \ \ source_x += dx; \ source_y += dy; \ advance_dest_ptr_##combine_op(1); \ } \ } \ // Render the current row of an affine transformed OBJ. #define obj_render_affine(combine_op, color_depth, alpha_op, map_space) \ { \ s16 *params = oam_ram + (((obj_attribute_1 >> 9) & 0x1F) * 16); \ s32 dx = params[3]; \ s32 dmx = params[7]; \ s32 dy = params[11]; \ s32 dmy = params[15]; \ s32 source_x, source_y; \ s32 tile_x, tile_y; \ u32 tile_offset; \ u32 tile_map_offset; \ s32 middle_x; \ s32 middle_y; \ s32 max_x = obj_width; \ s32 max_y = obj_height; \ s32 y_delta; \ u32 obj_pitch = tile_width_##color_depth; \ u32 obj_tile_pitch; \ \ middle_x = (obj_width / 2); \ middle_y = (obj_height / 2); \ \ source_x = (middle_x << 8); \ source_y = (middle_y << 8); \ \ \ if(obj_attribute_0 & 0x200) \ { \ obj_width *= 2; \ obj_height *= 2; \ middle_x *= 2; \ middle_y *= 2; \ } \ \ if((s32)obj_x < (s32)start) \ { \ u32 x_delta = start - obj_x; \ middle_x -= x_delta; \ obj_width -= x_delta; \ obj_x = start; \ \ if((s32)obj_width <= 0) \ continue; \ } \ \ if((s32)(obj_x + obj_width) >= (s32)end) \ { \ obj_width = end - obj_x; \ \ if((s32)obj_width <= 0) \ continue; \ } \ dest_ptr = scanline + obj_x; \ \ y_delta = vcount - (obj_y + middle_y); \ \ obj_get_palette_##color_depth(); \ \ if(dy == 0) \ { \ obj_render_scale(combine_op, color_depth, alpha_op, map_space); \ } \ else \ { \ obj_render_rotate(combine_op, color_depth, alpha_op, map_space); \ } \ } \ u32 obj_width_table[] = { 8, 16, 32, 64, 16, 32, 32, 64, 8, 8, 16, 32 }; u32 obj_height_table[] = { 8, 16, 32, 64, 8, 8, 16, 32, 16, 32, 32, 64 }; u8 obj_priority_list[5][160][128]; u32 obj_priority_count[5][160]; u32 obj_alpha_count[160]; // Build obj rendering functions #define <API key>(map_space) \ #define <API key>() \ u32 dest; \ u32 pixel_combine = color_combine_mask(4) | (1 << 8) \ #define <API key>(map_space) \ <API key>(); \ if((pixel_combine & 0x00000200) == 0) \ { \ <API key>##map_space(priority, start, end, scanline); \ return; \ } \ #define <API key>(map_space) \ <API key>() \ #define <API key>(map_space) \ <API key>() \ #define <API key>(map_space) \ <API key>(); \ u32 base_pixel_combine = pixel_combine \ #define <API key>(type) \ u32 bldcnt = io_registers[REG_BLDCNT]; \ u32 dispcnt = io_registers[REG_DISPCNT]; \ u32 obj_enable = io_registers[REG_WINOUT] >> 8; \ <API key>##type(); \ u32 copy_start, copy_end; \ u16 copy_buffer[240]; \ u16 *copy_ptr \ #define <API key>(map_space) \ <API key>(tile) \ #define <API key>(map_space) \ <API key>(bitmap) \ #define <API key>(combine_op, alpha_op, map_space) \ if(obj_attribute_0 & 0x100) \ { \ if((obj_attribute_0 >> 13) & 0x01) \ { \ obj_render_affine(combine_op, 8bpp, alpha_op, map_space); \ } \ else \ { \ obj_render_affine(combine_op, 4bpp, alpha_op, map_space); \ } \ } \ else \ { \ vertical_offset = vcount - obj_y; \ \ if((obj_attribute_1 >> 13) & 0x01) \ vertical_offset = obj_height - vertical_offset - 1; \ \ switch(((obj_attribute_0 >> 12) & 0x02) | \ ((obj_attribute_1 >> 12) & 0x01)) \ { \ case 0x0: \ obj_render(combine_op, 4bpp, alpha_op, map_space, noflip); \ break; \ \ case 0x1: \ obj_render(combine_op, 4bpp, alpha_op, map_space, flip); \ break; \ \ case 0x2: \ obj_render(combine_op, 8bpp, alpha_op, map_space, noflip); \ break; \ \ case 0x3: \ obj_render(combine_op, 8bpp, alpha_op, map_space, flip); \ break; \ } \ } \ #define <API key>(combine_op, alpha_op, map_space) \ <API key>(combine_op, alpha_op, map_space) \ #define <API key>(combine_op, alpha_op, map_space) \ if((obj_attribute_0 >> 10) & 0x03) \ { \ pixel_combine = 0x00000300; \ <API key>(combine_op, alpha_obj, map_space); \ } \ else \ { \ pixel_combine = base_pixel_combine; \ <API key>(combine_op, color32, map_space); \ } \ #define <API key>(alpha_op) \ #define <API key>(type) \ copy_start = obj_x; \ if(obj_attribute_0 & 0x200) \ copy_end = obj_x + (obj_width * 2); \ else \ copy_end = obj_x + obj_width; \ \ if(copy_start < start) \ copy_start = start; \ if(copy_end > end) \ copy_end = end; \ \ if((copy_start < end) && (copy_end > start)) \ { \ <API key>##type(copy_start, copy_end, copy_buffer, \ obj_enable, dispcnt, bldcnt, layer_renderers); \ copy_ptr = copy_buffer + copy_start; \ } \ else \ { \ continue; \ } \ #define <API key>() \ <API key>(tile) \ #define <API key>() \ <API key>(bitmap) \ #define <API key>(alpha_op) \ <API key>##alpha_op() \ #define <API key>(combine_op, alpha_op, map_space, \ partial_alpha_op) \ void <API key>##alpha_op##_##map_space(u32 priority, \ u32 start, u32 end, <API key>##alpha_op *scanline) \ { \ <API key>##alpha_op(map_space); \ s32 obj_num, i; \ s32 obj_x, obj_y; \ s32 obj_size; \ s32 obj_width, obj_height; \ u32 obj_attribute_0, obj_attribute_1, obj_attribute_2; \ s32 vcount = io_registers[REG_VCOUNT]; \ u32 tile_run; \ u32 current_pixels; \ u32 current_pixel; \ u32 current_palette; \ u32 vertical_offset; \ u32 partial_tile_run, partial_tile_offset; \ u32 pixel_run; \ u16 *oam_ptr; \ u16 *palette = <API key> + 256; \ <API key>##alpha_op *dest_ptr; \ u8 *tile_base = vram + 0x10000; \ u8 *tile_ptr; \ u32 obj_count = obj_priority_count[priority][vcount]; \ u8 *obj_list = obj_priority_list[priority][vcount]; \ \ for(obj_num = 0; obj_num < obj_count; obj_num++) \ { \ oam_ptr = oam_ram + (obj_list[obj_num] * 4); \ obj_attribute_0 = oam_ptr[0]; \ obj_attribute_1 = oam_ptr[1]; \ obj_attribute_2 = oam_ptr[2]; \ obj_size = ((obj_attribute_0 >> 12) & 0x0C) | (obj_attribute_1 >> 14); \ \ obj_x = (s32)(obj_attribute_1 << 23) >> 23; \ obj_width = obj_width_table[obj_size]; \ \ <API key>##combine_op(alpha_op); \ \ obj_y = obj_attribute_0 & 0xFF; \ \ if(obj_y > 160) \ obj_y -= 256; \ \ obj_height = obj_height_table[obj_size]; \ <API key>##partial_alpha_op(combine_op, alpha_op, map_space); \ } \ } \ <API key>(transparent, normal, 1D, no_partial_alpha); <API key>(transparent, normal, 2D, no_partial_alpha); <API key>(transparent, color16, 1D, no_partial_alpha); <API key>(transparent, color16, 2D, no_partial_alpha); <API key>(transparent, color32, 1D, no_partial_alpha); <API key>(transparent, color32, 2D, no_partial_alpha); <API key>(transparent, alpha_obj, 1D, no_partial_alpha); <API key>(transparent, alpha_obj, 2D, no_partial_alpha); <API key>(transparent, partial_alpha, 1D, partial_alpha); <API key>(transparent, partial_alpha, 2D, partial_alpha); <API key>(copy, copy_tile, 1D, no_partial_alpha); <API key>(copy, copy_tile, 2D, no_partial_alpha); <API key>(copy, copy_bitmap, 1D, no_partial_alpha); <API key>(copy, copy_bitmap, 2D, no_partial_alpha); void order_obj(u32 video_mode) { s32 obj_num, priority, row; s32 obj_x, obj_y; s32 obj_size, obj_mode; s32 obj_width, obj_height; u32 obj_priority; u32 obj_attribute_0, obj_attribute_1, obj_attribute_2; s32 vcount = io_registers[REG_VCOUNT]; u32 partial_tile_run, partial_tile_offset; u32 pixel_run; u32 current_count; u16 *oam_ptr = oam_ram + 508; u16 *palette = <API key> + 256; u16 *dest_ptr; u8 *tile_base = vram + 0x10000; u8 *tile_ptr; for(priority = 0; priority < 5; priority++) { for(row = 0; row < 160; row++) { obj_priority_count[priority][row] = 0; } } for(row = 0; row < 160; row++) { obj_alpha_count[row] = 0; } for(obj_num = 127; obj_num >= 0; obj_num--, oam_ptr -= 4) { obj_attribute_0 = oam_ptr[0]; obj_attribute_2 = oam_ptr[2]; obj_size = obj_attribute_0 & 0xC000; obj_priority = (obj_attribute_2 >> 10) & 0x03; obj_mode = (obj_attribute_0 >> 10) & 0x03; if(((obj_attribute_0 & 0x0300) != 0x0200) && (obj_size != 0xC000) && (obj_mode != 3) && ((video_mode < 3) || ((obj_attribute_2 & 0x3FF) >= 512))) { obj_y = obj_attribute_0 & 0xFF; if(obj_y > 160) obj_y -= 256; obj_attribute_1 = oam_ptr[1]; obj_size = ((obj_size >> 12) & 0x0C) | (obj_attribute_1 >> 14); obj_height = obj_height_table[obj_size]; obj_width = obj_width_table[obj_size]; if(obj_attribute_0 & 0x200) { obj_height *= 2; obj_width *= 2; } if(((obj_y + obj_height) > 0) && (obj_y < 160)) { obj_x = (s32)(obj_attribute_1 << 23) >> 23; if(((obj_x + obj_width) > 0) && (obj_x < 240)) { if(obj_y < 0) { obj_height += obj_y; obj_y = 0; } if((obj_y + obj_height) >= 160) { obj_height = 160 - obj_y; } if(obj_mode == 1) { for(row = obj_y; row < obj_y + obj_height; row++) { current_count = obj_priority_count[obj_priority][row]; obj_priority_list[obj_priority][row][current_count] = obj_num; obj_priority_count[obj_priority][row] = current_count + 1; obj_alpha_count[row]++; } } else { if(obj_mode == 2) { obj_priority = 4; } for(row = obj_y; row < obj_y + obj_height; row++) { current_count = obj_priority_count[obj_priority][row]; obj_priority_list[obj_priority][row][current_count] = obj_num; obj_priority_count[obj_priority][row] = current_count + 1; } } } } } } } u32 layer_order[16]; u32 layer_count; u32 order_layers(u32 layer_flags) { s32 priority, layer_number; layer_count = 0; for(priority = 3; priority >= 0; priority { for(layer_number = 3; layer_number >= 0; layer_number { if(((layer_flags >> layer_number) & 1) && ((io_registers[REG_BG0CNT + layer_number] & 0x03) == priority)) { layer_order[layer_count] = layer_number; layer_count++; } } if((obj_priority_count[priority][io_registers[REG_VCOUNT]] > 0) && (layer_flags & 0x10)) { layer_order[layer_count] = priority | 0x04; layer_count++; } } } #define fill_line(_start, _end) \ u32 i; \ \ for(i = _start; i < _end; i++) \ { \ dest_ptr[i] = color; \ } \ #define <API key>() \ color = <API key>[color] \ #define <API key>() \ #define <API key>() \ #define <API key>() \ #define fill_line_builder(type) \ void fill_line_##type(u16 color, <API key>##type *dest_ptr, \ u32 start, u32 end) \ { \ fill_line_color_##type(); \ fill_line(start, end); \ } \ fill_line_builder(normal); fill_line_builder(alpha); fill_line_builder(color16); fill_line_builder(color32); // Alpha blend two pixels (pixel_top and pixel_bottom). #define blend_pixel() \ pixel_bottom = <API key>[(pixel_pair >> 16) & 0x1FF]; \ pixel_bottom = (pixel_bottom | (pixel_bottom << 16)) & 0x07E0F81F; \ pixel_top = ((pixel_top * blend_a) + (pixel_bottom * blend_b)) >> 4; \ // Alpha blend two pixels, allowing for saturation (individual channels > 31). // The operation is optimized towards saturation not occuring. #define <API key>() \ pixel_bottom = <API key>[(pixel_pair >> 16) & 0x1FF]; \ pixel_bottom = (pixel_bottom | (pixel_bottom << 16)) & 0x07E0F81F; \ pixel_top = ((pixel_top * blend_a) + (pixel_bottom * blend_b)) >> 4; \ if(pixel_top & 0x08010020) \ { \ if(pixel_top & 0x08000000) \ pixel_top |= 0x07E00000; \ \ if(pixel_top & 0x00010000) \ pixel_top |= 0x0000F800; \ \ if(pixel_top & 0x00000020) \ pixel_top |= 0x0000001F; \ } \ #define brighten_pixel() \ pixel_top = upper + ((pixel_top * blend) >> 4); \ #define darken_pixel() \ pixel_top = (pixel_top * blend) >> 4; \ #define <API key> \ ((pixel_pair & 0x04000200) == 0x04000200) \ #define <API key>(pixel_source) \ ((pixel_source & 0x00000200) == 0x00000200) \ #define <API key>(expand_type, pixel_source) \ pixel_top = (pixel_top | (pixel_top << 16)) & 0x07E0F81F; \ expand_type##_pixel(); \ pixel_top &= 0x07E0F81F; \ pixel_top = (pixel_top >> 16) | pixel_top \ #define expand_pixel(expand_type, pixel_source) \ pixel_top = <API key>[pixel_source & 0x1FF]; \ <API key>(expand_type, pixel_source); \ *screen_dest_ptr = pixel_top \ #define expand_loop(expand_type, effect_condition, pixel_source) \ screen_src_ptr += start; \ screen_dest_ptr += start; \ \ end -= start; \ \ for(i = 0; i < end; i++) \ { \ pixel_source = *screen_src_ptr; \ if(effect_condition) \ { \ expand_pixel(expand_type, pixel_source); \ } \ else \ { \ *screen_dest_ptr = \ <API key>[pixel_source & 0x1FF]; \ } \ \ screen_src_ptr++; \ screen_dest_ptr++; \ } \ #define <API key>(alpha_expand, expand_type) \ screen_src_ptr += start; \ screen_dest_ptr += start; \ \ end -= start; \ \ for(i = 0; i < end; i++) \ { \ pixel_pair = *screen_src_ptr; \ if(<API key>(pixel_pair)) \ { \ if(<API key>) \ { \ expand_pixel(alpha_expand, pixel_pair); \ } \ else \ { \ expand_pixel(expand_type, pixel_pair); \ } \ } \ else \ { \ *screen_dest_ptr = \ <API key>[pixel_pair & 0x1FF]; \ } \ \ screen_src_ptr++; \ screen_dest_ptr++; \ } \ #define <API key>(expand_type) \ if((blend_a + blend_b) > 16) \ { \ <API key>(blend_saturate, expand_type); \ } \ else \ { \ <API key>(blend, expand_type); \ } \ // Blend top two pixels of scanline with each other. void expand_blend(u32 *screen_src_ptr, u16 *screen_dest_ptr, u32 start, u32 end) { u32 pixel_pair; u32 pixel_top, pixel_bottom; u32 bldalpha = io_registers[REG_BLDALPHA]; u32 blend_a = bldalpha & 0x1F; u32 blend_b = (bldalpha >> 8) & 0x1F; u32 i; if(blend_a > 16) blend_a = 16; if(blend_b > 16) blend_b = 16; // The individual colors can saturate over 31, this should be taken // care of in an alternate pass as it incurs a huge additional speedhit. if((blend_a + blend_b) > 16) { expand_loop(blend_saturate, <API key>, pixel_pair); } else { expand_loop(blend, <API key>, pixel_pair); } } // Blend scanline with white. void expand_darken(u16 *screen_src_ptr, u16 *screen_dest_ptr, u32 start, u32 end) { u32 pixel_top; s32 blend = 16 - (io_registers[REG_BLDY] & 0x1F); u32 i; if(blend < 0) blend = 0; expand_loop(darken, <API key>(pixel_top), pixel_top); } // Blend scanline with black. void expand_brighten(u16 *screen_src_ptr, u16 *screen_dest_ptr, u32 start, u32 end) { u32 pixel_top; u32 blend = io_registers[REG_BLDY] & 0x1F; u32 upper; u32 i; if(blend > 16) blend = 16; upper = ((0x07E0F81F * blend) >> 4) & 0x07E0F81F; blend = 16 - blend; expand_loop(brighten, <API key>(pixel_top), pixel_top); } // Expand scanline such that if both top and bottom pass it's alpha, // if only top passes it's as specified, and if neither pass it's normal. void <API key>(u32 *screen_src_ptr, u16 *screen_dest_ptr, u32 start, u32 end) { s32 blend = 16 - (io_registers[REG_BLDY] & 0x1F); u32 pixel_pair; u32 pixel_top, pixel_bottom; u32 bldalpha = io_registers[REG_BLDALPHA]; u32 blend_a = bldalpha & 0x1F; u32 blend_b = (bldalpha >> 8) & 0x1F; u32 i; if(blend < 0) blend = 0; if(blend_a > 16) blend_a = 16; if(blend_b > 16) blend_b = 16; <API key>(darken); } void <API key>(u32 *screen_src_ptr, u16 *screen_dest_ptr, u32 start, u32 end) { s32 blend = io_registers[REG_BLDY] & 0x1F; u32 pixel_pair; u32 pixel_top, pixel_bottom; u32 bldalpha = io_registers[REG_BLDALPHA]; u32 blend_a = bldalpha & 0x1F; u32 blend_b = (bldalpha >> 8) & 0x1F; u32 upper; u32 i; if(blend > 16) blend = 16; upper = ((0x07E0F81F * blend) >> 4) & 0x07E0F81F; blend = 16 - blend; if(blend_a > 16) blend_a = 16; if(blend_b > 16) blend_b = 16; <API key>(brighten); } // Render an OBJ layer from start to end, depending on the type (1D or 2D) // stored in dispcnt. #define render_obj_layer(type, dest, _start, _end) \ current_layer &= ~0x04; \ if(dispcnt & 0x40) \ <API key>##type##_1D(current_layer, _start, _end, dest); \ else \ <API key>##type##_2D(current_layer, _start, _end, dest) \ // Render a target all the way with the background color as taken from the // palette. #define fill_line_bg(type, dest, _start, _end) \ fill_line_##type(0, dest, _start, _end) \ // Render all layers as they appear in the layer order. #define render_layers(tile_alpha, obj_alpha, dest) \ { \ current_layer = layer_order[0]; \ if(current_layer & 0x04) \ { \ /* If the first one is OBJ render the background then render it. */ \ fill_line_bg(tile_alpha, dest, 0, 240); \ render_obj_layer(obj_alpha, dest, 0, 240); \ } \ else \ { \ /* Otherwise render a base layer. */ \ layer_renderers[current_layer].tile_alpha##_render_base(current_layer, \ 0, 240, dest); \ } \ \ /* Render the rest of the layers. */ \ for(layer_order_pos = 1; layer_order_pos < layer_count; layer_order_pos++) \ { \ current_layer = layer_order[layer_order_pos]; \ if(current_layer & 0x04) \ { \ render_obj_layer(obj_alpha, dest, 0, 240); \ } \ else \ { \ layer_renderers[current_layer]. \ tile_alpha##_render_transparent(current_layer, 0, 240, dest); \ } \ } \ } \ #define <API key> \ (((io_registers[REG_BLDALPHA] & 0x1F1F) != 0x001F) && \ ((io_registers[REG_BLDCNT] & 0x3F) != 0) && \ ((io_registers[REG_BLDCNT] & 0x3F00) != 0)) \ #define <API key> \ (((io_registers[REG_BLDY] & 0x1F) != 0) && \ ((io_registers[REG_BLDCNT] & 0x3F) != 0)) \ #define <API key>(renderer, layer_condition, \ alpha_condition, fade_condition, _start, _end) \ { \ if(layer_condition) \ { \ if(obj_alpha_count[io_registers[REG_VCOUNT]] > 0) \ { \ /* Render based on special effects mode. */ \ u32 screen_buffer[240]; \ switch((bldcnt >> 6) & 0x03) \ { \ /* Alpha blend */ \ case 0x01: \ { \ if(alpha_condition) \ { \ renderer(alpha, alpha_obj, screen_buffer); \ expand_blend(screen_buffer, scanline, _start, _end); \ return; \ } \ break; \ } \ \ /* Fade to white */ \ case 0x02: \ { \ if(fade_condition) \ { \ renderer(color32, partial_alpha, screen_buffer); \ <API key>(screen_buffer, scanline, \ _start, _end); \ return; \ } \ break; \ } \ \ /* Fade to black */ \ case 0x03: \ { \ if(fade_condition) \ { \ renderer(color32, partial_alpha, screen_buffer); \ <API key>(screen_buffer, scanline, \ _start, _end); \ return; \ } \ break; \ } \ } \ \ renderer(color32, partial_alpha, screen_buffer); \ expand_blend(screen_buffer, scanline, _start, _end); \ } \ else \ { \ /* Render based on special effects mode. */ \ switch((bldcnt >> 6) & 0x03) \ { \ /* Alpha blend */ \ case 0x01: \ { \ if(alpha_condition) \ { \ u32 screen_buffer[240]; \ renderer(alpha, alpha_obj, screen_buffer); \ expand_blend(screen_buffer, scanline, _start, _end); \ return; \ } \ break; \ } \ \ /* Fade to white */ \ case 0x02: \ { \ if(fade_condition) \ { \ renderer(color16, color16, scanline); \ expand_brighten(scanline, scanline, _start, _end); \ return; \ } \ break; \ } \ \ /* Fade to black */ \ case 0x03: \ { \ if(fade_condition) \ { \ renderer(color16, color16, scanline); \ expand_darken(scanline, scanline, _start, _end); \ return; \ } \ break; \ } \ } \ \ renderer(normal, normal, scanline); \ } \ } \ else \ { \ u32 pixel_top = <API key>[0]; \ switch((bldcnt >> 6) & 0x03) \ { \ /* Fade to white */ \ case 0x02: \ { \ if(<API key>(5)) \ { \ u32 blend = io_registers[REG_BLDY] & 0x1F; \ u32 upper; \ \ if(blend > 16) \ blend = 16; \ \ upper = ((0x07E0F81F * blend) >> 4) & 0x07E0F81F; \ blend = 16 - blend; \ \ <API key>(brighten, pixel_top); \ } \ break; \ } \ \ /* Fade to black */ \ case 0x03: \ { \ if(<API key>(5)) \ { \ s32 blend = 16 - (io_registers[REG_BLDY] & 0x1F); \ \ if(blend < 0) \ blend = 0; \ \ <API key>(darken, pixel_top); \ } \ break; \ } \ } \ fill_line_color16(pixel_top, scanline, _start, _end); \ } \ } \ // Renders an entire scanline from 0 to 240, based on current color mode. void <API key>(u16 *scanline, u32 dispcnt) { u32 current_layer; u32 layer_order_pos; u32 bldcnt = io_registers[REG_BLDCNT]; <API key>(); <API key>(render_layers, layer_count, <API key>, <API key>, 0, 240); } void <API key>(u16 *scanline, u32 dispcnt) { u32 bldcnt = io_registers[REG_BLDCNT]; <API key>(); u32 current_layer; u32 layer_order_pos; fill_line_bg(normal, scanline, 0, 240); for(layer_order_pos = 0; layer_order_pos < layer_count; layer_order_pos++) { current_layer = layer_order[layer_order_pos]; if(current_layer & 0x04) { render_obj_layer(normal, scanline, 0, 240); } else { layer_renderers->normal_render(0, 240, scanline); } } } // Render layers from start to end based on if they're allowed in the // enable flags. #define <API key>(tile_alpha, obj_alpha, dest) \ { \ __label__ skip; \ current_layer = layer_order[layer_order_pos]; \ /* If OBJ aren't enabled skip to the first non-OBJ layer */ \ if(!(enable_flags & 0x10)) \ { \ while((current_layer & 0x04) || !((1 << current_layer) & enable_flags)) \ { \ layer_order_pos++; \ current_layer = layer_order[layer_order_pos]; \ \ /* Oops, ran out of layers, render the background. */ \ if(layer_order_pos == layer_count) \ { \ fill_line_bg(tile_alpha, dest, start, end); \ goto skip; \ } \ } \ \ /* Render the first valid layer */ \ layer_renderers[current_layer].tile_alpha##_render_base(current_layer, \ start, end, dest); \ \ layer_order_pos++; \ \ /* Render the rest of the layers if active, skipping OBJ ones. */ \ for(; layer_order_pos < layer_count; layer_order_pos++) \ { \ current_layer = layer_order[layer_order_pos]; \ if(!(current_layer & 0x04) && ((1 << current_layer) & enable_flags)) \ { \ layer_renderers[current_layer]. \ tile_alpha##_render_transparent(current_layer, start, end, dest); \ } \ } \ } \ else \ { \ /* Find the first active layer, skip all of the inactive ones */ \ while(!((current_layer & 0x04) || ((1 << current_layer) & enable_flags))) \ { \ layer_order_pos++; \ current_layer = layer_order[layer_order_pos]; \ \ /* Oops, ran out of layers, render the background. */ \ if(layer_order_pos == layer_count) \ { \ fill_line_bg(tile_alpha, dest, start, end); \ goto skip; \ } \ } \ \ if(current_layer & 0x04) \ { \ /* If the first one is OBJ render the background then render it. */ \ fill_line_bg(tile_alpha, dest, start, end); \ render_obj_layer(obj_alpha, dest, start, end); \ } \ else \ { \ /* Otherwise render a base layer. */ \ layer_renderers[current_layer]. \ tile_alpha##_render_base(current_layer, start, end, dest); \ } \ \ layer_order_pos++; \ \ /* Render the rest of the layers. */ \ for(; layer_order_pos < layer_count; layer_order_pos++) \ { \ current_layer = layer_order[layer_order_pos]; \ if(current_layer & 0x04) \ { \ render_obj_layer(obj_alpha, dest, start, end); \ } \ else \ { \ if(enable_flags & (1 << current_layer)) \ { \ layer_renderers[current_layer]. \ tile_alpha##_render_transparent(current_layer, start, end, dest); \ } \ } \ } \ } \ \ skip: \ ; \ } \ // Render all of the BG and OBJ in a tiled scanline from start to end ONLY if // enable_flag allows that layer/OBJ. Also conditionally render color effects. void <API key>(u32 start, u32 end, u16 *scanline, u32 enable_flags, u32 dispcnt, u32 bldcnt, <API key> *layer_renderers) { u32 current_layer; u32 layer_order_pos = 0; <API key>(<API key>, (layer_count && (enable_flags & 0x1F)), ((enable_flags & 0x20) && <API key>), ((enable_flags & 0x20) && <API key>), start, end); } // Render the BG and OBJ in a bitmap scanline from start to end ONLY if // enable_flag allows that layer/OBJ. Also conditionally render color effects. void <API key>(u32 start, u32 end, u16 *scanline, u32 enable_flags, u32 dispcnt, u32 bldcnt, <API key> *layer_renderers) { u32 current_layer; u32 layer_order_pos; fill_line_bg(normal, scanline, start, end); for(layer_order_pos = 0; layer_order_pos < layer_count; layer_order_pos++) { current_layer = layer_order[layer_order_pos]; if(current_layer & 0x04) { if(enable_flags & 0x10) { render_obj_layer(normal, scanline, start, end); } } else { if(enable_flags & 0x04) layer_renderers->normal_render(start, end, scanline); } } } #define window_x_coords(window_number) \ window_##window_number##_x1 = \ io_registers[REG_WIN##window_number##H] >> 8; \ window_##window_number##_x2 = \ io_registers[REG_WIN##window_number##H] & 0xFF; \ window_##window_number##_enable = \ (winin >> (window_number * 8)) & 0x3F; \ \ if(window_##window_number##_x1 > 240) \ window_##window_number##_x1 = 240; \ \ if(window_##window_number##_x2 > 240) \ window_##window_number##_x2 = 240 \ #define window_coords(window_number) \ u32 window_##window_number##_x1, window_##window_number##_x2; \ u32 window_##window_number##_y1, window_##window_number##_y2; \ u32 window_##window_number##_enable; \ window_##window_number##_y1 = \ io_registers[REG_WIN##window_number##V] >> 8; \ window_##window_number##_y2 = \ io_registers[REG_WIN##window_number##V] & 0xFF; \ \ if(window_##window_number##_y1 > window_##window_number##_y2) \ { \ if((((vcount <= window_##window_number##_y2) || \ (vcount > window_##window_number##_y1)) || \ (window_##window_number##_y2 > 227)) && \ (window_##window_number##_y1 <= 227)) \ { \ window_x_coords(window_number); \ } \ else \ { \ window_##window_number##_x1 = 240; \ window_##window_number##_x2 = 240; \ } \ } \ else \ { \ if((((vcount >= window_##window_number##_y1) && \ (vcount < window_##window_number##_y2)) || \ (window_##window_number##_y2 > 227)) && \ (window_##window_number##_y1 <= 227)) \ { \ window_x_coords(window_number); \ } \ else \ { \ window_##window_number##_x1 = 240; \ window_##window_number##_x2 = 240; \ } \ } \ #define <API key>(type, start, end, window_type) \ if(start != end) \ { \ <API key>##type(start, end, scanline, \ window_##window_type##_enable, dispcnt, bldcnt, layer_renderers); \ } \ #define <API key>(type, start, end, window_type) \ <API key>##type(start, end, scanline, \ window_##window_type##_enable, dispcnt, bldcnt, layer_renderers) \ #define <API key>(type, clip_start, clip_end, start, end, \ window_type) \ { \ if(start != end) \ { \ if(start < clip_start) \ { \ if(end > clip_start) \ { \ if(end > clip_end) \ { \ <API key>(type, clip_start, clip_end, \ window_type); \ } \ else \ { \ <API key>(type, clip_start, end, window_type); \ } \ } \ } \ else \ \ if(end > clip_end) \ { \ if(start < clip_end) \ <API key>(type, start, clip_end, window_type); \ } \ else \ { \ <API key>(type, start, end, window_type); \ } \ } \ } \ #define <API key>(type, start, end) \ if(window_1_x1 != 240) \ { \ if(window_1_x1 > window_1_x2) \ { \ <API key>(type, start, end, 0, window_1_x2, 1); \ <API key>(type, start, end, window_1_x2, window_1_x1, \ out); \ <API key>(type, start, end, window_1_x1, 240, 1); \ } \ else \ { \ <API key>(type, start, end, 0, window_1_x1, out); \ <API key>(type, start, end, window_1_x1, window_1_x2, \ 1); \ <API key>(type, start, end, window_1_x2, 240, out); \ } \ } \ else \ { \ <API key>(type, start, end, out); \ } \ #define <API key>(type, start, end); \ <API key>(type, start, end, out); \ if(dispcnt & 0x40) \ <API key>##type##_1D(4, start, end, scanline); \ else \ <API key>##type##_2D(4, start, end, scanline) \ #define <API key>(type, clip_start, clip_end, start, \ end) \ { \ if(start != end) \ { \ if(start < clip_start) \ { \ if(end > clip_start) \ { \ if(end > clip_end) \ { \ <API key>(type, clip_start, clip_end); \ } \ else \ { \ <API key>(type, clip_start, end); \ } \ } \ } \ else \ \ if(end > clip_end) \ { \ if(start < clip_end) \ { \ <API key>(type, start, clip_end); \ } \ } \ else \ { \ <API key>(type, start, end); \ } \ } \ } \ #define <API key>(type, start, end) \ if(window_1_x1 != 240) \ { \ if(window_1_x1 > window_1_x2) \ { \ <API key>(type, start, end, 0, window_1_x2, 1); \ <API key>(type, start, end, window_1_x2, \ window_1_x1); \ <API key>(type, start, end, window_1_x1, 240, 1); \ } \ else \ { \ <API key>(type, start, end, 0, window_1_x1); \ <API key>(type, start, end, window_1_x1, window_1_x2, \ 1); \ <API key>(type, start, end, window_1_x2, 240); \ } \ } \ else \ { \ <API key>(type, start, end); \ } \ #define <API key>(type, window_number) \ u32 winin = io_registers[REG_WININ]; \ window_coords(window_number); \ if(window_##window_number##_x1 > window_##window_number##_x2) \ { \ <API key>(type, 0, window_##window_number##_x2, \ window_number); \ <API key>(type, window_##window_number##_x2, \ window_##window_number##_x1, out); \ <API key>(type, window_##window_number##_x1, 240, \ window_number); \ } \ else \ { \ <API key>(type, 0, window_##window_number##_x1, out); \ <API key>(type, window_##window_number##_x1, \ window_##window_number##_x2, window_number); \ <API key>(type, window_##window_number##_x2, 240, out); \ } \ #define render_window_multi(type, front, back) \ if(window_##front##_x1 > window_##front##_x2) \ { \ <API key>(type, 0, window_##front##_x2, front); \ render_window_clip_##back(type, window_##front##_x2, \ window_##front##_x1); \ <API key>(type, window_##front##_x1, 240, front); \ } \ else \ { \ render_window_clip_##back(type, 0, window_##front##_x1); \ <API key>(type, window_##front##_x1, window_##front##_x2, \ front); \ render_window_clip_##back(type, window_##front##_x2, 240); \ } \ #define <API key>(type) \ void <API key>##type(u16 *scanline, u32 dispcnt) \ { \ u32 vcount = io_registers[REG_VCOUNT]; \ u32 winout = io_registers[REG_WINOUT]; \ u32 bldcnt = io_registers[REG_BLDCNT]; \ u32 window_out_enable = winout & 0x3F; \ \ <API key>##type(); \ \ switch(dispcnt >> 13) \ { \ /* Just window 0 */ \ case 0x01: \ { \ <API key>(type, 0); \ break; \ } \ \ /* Just window 1 */ \ case 0x02: \ { \ <API key>(type, 1); \ break; \ } \ \ /* Windows 1 and 2 */ \ case 0x03: \ { \ u32 winin = io_registers[REG_WININ]; \ window_coords(0); \ window_coords(1); \ render_window_multi(type, 0, 1); \ break; \ } \ \ /* Just OBJ windows */ \ case 0x04: \ { \ u32 window_obj_enable = winout >> 8; \ <API key>(type, 0, 240); \ break; \ } \ \ /* Window 0 and OBJ window */ \ case 0x05: \ { \ u32 window_obj_enable = winout >> 8; \ u32 winin = io_registers[REG_WININ]; \ window_coords(0); \ render_window_multi(type, 0, obj); \ break; \ } \ \ /* Window 1 and OBJ window */ \ case 0x06: \ { \ u32 window_obj_enable = winout >> 8; \ u32 winin = io_registers[REG_WININ]; \ window_coords(1); \ render_window_multi(type, 1, obj); \ break; \ } \ \ /* Window 0, 1, and OBJ window */ \ case 0x07: \ { \ u32 window_obj_enable = winout >> 8; \ u32 winin = io_registers[REG_WININ]; \ window_coords(0); \ window_coords(1); \ render_window_multi(type, 0, 1_obj); \ break; \ } \ } \ } \ <API key>(tile); <API key>(bitmap); u32 active_layers[6] = { 0x1F, 0x17, 0x1C, 0x14, 0x14, 0x14 }; u32 <API key> = 240; u32 <API key> = 160; u32 resolution_width, resolution_height; void update_scanline() { u32 pitch = get_screen_pitch(); u32 dispcnt = io_registers[REG_DISPCNT]; u32 display_flags = (dispcnt >> 8) & 0x1F; u32 vcount = io_registers[REG_VCOUNT]; u16 *screen_offset = get_screen_pixels() + (vcount * pitch); u32 video_mode = dispcnt & 0x07; u32 current_layer; // If OAM has been modified since the last scanline has been updated then // reorder and reprofile the OBJ lists. if(oam_update) { order_obj(video_mode); oam_update = 0; } order_layers((dispcnt >> 8) & active_layers[video_mode]); if(skip_next_frame) return; // If the screen is in in forced blank draw pure white. if(dispcnt & 0x80) { fill_line_color16(0xFFFF, screen_offset, 0, 240); } else { if(video_mode < 3) { if(dispcnt >> 13) { <API key>(screen_offset, dispcnt); } else { <API key>(screen_offset, dispcnt); } } else { if(dispcnt >> 13) <API key>(screen_offset, dispcnt); else <API key>(screen_offset, dispcnt); } } affine_reference_x[0] += (s16)io_registers[REG_BG2PB]; affine_reference_y[0] += (s16)io_registers[REG_BG2PD]; affine_reference_x[1] += (s16)io_registers[REG_BG3PB]; affine_reference_y[1] += (s16)io_registers[REG_BG3PD]; } #ifdef PSP_BUILD u32 screen_flip = 0; void flip_screen() { if(video_direct == 0) { u32 *old_ge_cmd_ptr = ge_cmd_ptr; <API key>(); // Render the current screen ge_cmd_ptr = ge_cmd + 2; GE_CMD(TBP0, ((u32)screen_pixels & 0x00FFFFFF)); GE_CMD(TBW0, (((u32)screen_pixels & 0xFF000000) >> 8) | GBA_SCREEN_WIDTH); ge_cmd_ptr = old_ge_cmd_ptr; sceGeListEnQueue(ge_cmd, ge_cmd_ptr, gecbid, NULL); // Flip to the next screen screen_flip ^= 1; if(screen_flip) screen_pixels = screen_texture + (240 * 160 * 2); else screen_pixels = screen_texture; } } #else #define <API key>() \ <API key>[x2] = current_pixel; \ <API key>[x2 - 1] = current_pixel; \ x2 -= 2 \ #define <API key>() \ <API key>[x2] = current_pixel; \ <API key>[x2 - 1] = current_pixel; \ <API key>[x2 - 2] = current_pixel; \ x2 -= 3 \ #define <API key>() \ <API key>[x2] = current_pixel; \ <API key>[x2 - 1] = current_pixel; \ <API key>[x2 - 2] = current_pixel; \ <API key>[x2 - 3] = current_pixel; \ x2 -= 4 \ #define <API key>(scale_factor) \ for(y = 0; y < 160; y++) \ { \ for(x = 239, x2 = (240 * video_scale) - 1; x >= 0; x { \ current_pixel = <API key>[x]; \ integer_scale_copy_##scale_factor(); \ <API key>[x2] = <API key>[x]; \ <API key>[x2 - 1] = <API key>[x]; \ <API key>[x2 - 2] = <API key>[x]; \ } \ <API key> += pitch; \ } \ void flip_screen() { if((video_scale != 1) && (current_scale != unscaled)) { s32 x, y; s32 x2, y2; u16 *screen_ptr = get_screen_pixels(); u16 *<API key> = screen_ptr; u32 pitch = get_screen_pitch(); u16 current_pixel; u32 i; switch(video_scale) { case 2: <API key>(2); break; case 3: <API key>(3); break; default: case 4: <API key>(4); break; } for(y = 159, y2 = (160 * video_scale) - 1; y >= 0; y { for(i = 0; i < video_scale; i++) { memcpy(screen_ptr + (y2 * pitch), screen_ptr + (y * pitch), 480 * video_scale); y2 } } } SDL_Flip(screen); } #endif u32 frame_to_render; void update_screen() { if(!skip_next_frame) flip_screen(); } #ifdef PSP_BUILD void init_video() { sceDisplaySetMode(0, PSP_SCREEN_WIDTH, PSP_SCREEN_HEIGHT); <API key>(); <API key>((void*)psp_gu_vram_base, PSP_LINE_SIZE, <API key>, <API key>); sceGuInit(); sceGuStart(GU_DIRECT, display_list); sceGuDrawBuffer(GU_PSM_5650, (void*)0, PSP_LINE_SIZE); sceGuDispBuffer(PSP_SCREEN_WIDTH, PSP_SCREEN_HEIGHT, (void*)0, PSP_LINE_SIZE); sceGuClear(GU_COLOR_BUFFER_BIT); sceGuOffset(2048 - (PSP_SCREEN_WIDTH / 2), 2048 - (PSP_SCREEN_HEIGHT / 2)); sceGuViewport(2048, 2048, PSP_SCREEN_WIDTH, PSP_SCREEN_HEIGHT); sceGuScissor(0, 0, PSP_SCREEN_WIDTH + 1, PSP_SCREEN_HEIGHT + 1); sceGuEnable(GU_SCISSOR_TEST); sceGuTexMode(GU_PSM_5650, 0, 0, GU_FALSE); sceGuTexFunc(GU_TFX_REPLACE, GU_TCC_RGBA); sceGuTexFilter(GU_LINEAR, GU_LINEAR); sceGuEnable(GU_TEXTURE_2D); sceGuFrontFace(GU_CW); sceGuDisable(GU_BLEND); sceGuFinish(); sceGuSync(0, 0); <API key>(); sceGuDisplay(GU_TRUE); PspGeCallbackData gecb; gecb.signal_func = NULL; gecb.signal_arg = NULL; gecb.finish_func = Ge_Finish_Callback; gecb.finish_arg = NULL; gecbid = sceGeSetCallback(&gecb); screen_vertex[0] = 0 + 0.5; screen_vertex[1] = 0 + 0.5; screen_vertex[2] = 0 + 0.5; screen_vertex[3] = 0 + 0.5; screen_vertex[4] = 0; screen_vertex[5] = GBA_SCREEN_WIDTH - 0.5; screen_vertex[6] = GBA_SCREEN_HEIGHT - 0.5; screen_vertex[7] = PSP_SCREEN_WIDTH - 0.5; screen_vertex[8] = PSP_SCREEN_HEIGHT - 0.5; screen_vertex[9] = 0; // Set framebuffer to PSP VRAM GE_CMD(FBP, ((u32)psp_gu_vram_base & 0x00FFFFFF)); GE_CMD(FBW, (((u32)psp_gu_vram_base & 0xFF000000) >> 8) | PSP_LINE_SIZE); // Set texture 0 to the screen texture GE_CMD(TBP0, ((u32)screen_texture & 0x00FFFFFF)); GE_CMD(TBW0, (((u32)screen_texture & 0xFF000000) >> 8) | GBA_SCREEN_WIDTH); // Set the texture size to 256 by 256 (2^8 by 2^8) GE_CMD(TSIZE0, (8 << 8) | 8); // Flush the texture cache GE_CMD(TFLUSH, 0); // Use 2D coordinates, no indeces, no weights, 32bit float positions, // 32bit float texture coordinates GE_CMD(VTYPE, (1 << 23) | (0 << 11) | (0 << 9) | (3 << 7) | (0 << 5) | (0 << 2) | 3); // Set the base of the index list pointer to 0 GE_CMD(BASE, 0); // Set the rest of index list pointer to 0 (not being used) GE_CMD(IADDR, 0); // Set the base of the screen vertex list pointer GE_CMD(BASE, ((u32)screen_vertex & 0xFF000000) >> 8); // Set the rest of the screen vertex list pointer GE_CMD(VADDR, ((u32)screen_vertex & 0x00FFFFFF)); // Primitive kick: render sprite (primitive 6), 2 vertices GE_CMD(PRIM, (6 << 16) | 2); // Done with commands GE_CMD(FINISH, 0); // Raise signal interrupt GE_CMD(SIGNAL, 0); GE_CMD(NOP, 0); GE_CMD(NOP, 0); } #else void init_video() { SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK | <API key>); screen = SDL_SetVideoMode(240 * video_scale, 160 * video_scale, 16, 0); SDL_ShowCursor(0); } #endif video_scale_type screen_scale = scaled_aspect; video_scale_type current_scale = scaled_aspect; video_filter_type screen_filter = filter_bilinear; #ifdef PSP_BUILD void <API key>() { if(video_direct != 1) { video_direct = 1; screen_pixels = psp_gu_vram_base; screen_pitch = 512; sceGuStart(GU_DIRECT, display_list); sceGuDispBuffer(PSP_SCREEN_WIDTH, PSP_SCREEN_HEIGHT, (void*)0, PSP_LINE_SIZE); sceGuFinish(); } } void set_gba_resolution(video_scale_type scale) { u32 filter_linear = 0; screen_scale = scale; switch(scale) { case unscaled: screen_vertex[2] = 120 + 0.5; screen_vertex[3] = 56 + 0.5; screen_vertex[7] = GBA_SCREEN_WIDTH + 120 - 0.5; screen_vertex[8] = GBA_SCREEN_HEIGHT + 56 - 0.5; break; case scaled_aspect: screen_vertex[2] = 36 + 0.5; screen_vertex[3] = 0 + 0.5; screen_vertex[7] = 408 + 36 - 0.5; screen_vertex[8] = PSP_SCREEN_HEIGHT - 0.5; break; case fullscreen: screen_vertex[2] = 0; screen_vertex[3] = 0; screen_vertex[7] = PSP_SCREEN_WIDTH; screen_vertex[8] = PSP_SCREEN_HEIGHT; break; } sceGuStart(GU_DIRECT, display_list); if(screen_filter == filter_bilinear) sceGuTexFilter(GU_LINEAR, GU_LINEAR); else sceGuTexFilter(GU_NEAREST, GU_NEAREST); sceGuFinish(); sceGuSync(0, 0); clear_screen(0x0000); } void <API key>() { if(video_direct != 0) { set_gba_resolution(screen_scale); video_direct = 0; screen_pixels = screen_texture; screen_flip = 0; screen_pitch = 240; sceGuStart(GU_DIRECT, display_list); sceGuDispBuffer(PSP_SCREEN_WIDTH, PSP_SCREEN_HEIGHT, (void*)0, PSP_LINE_SIZE); sceGuFinish(); } } void clear_screen(u16 color) { u32 i; u16 *src_ptr = get_screen_pixels(); sceGuSync(0, 0); for(i = 0; i < (512 * 272); i++, src_ptr++) { *src_ptr = color; } // I don't know why this doesn't work. /* color = (((color & 0x1F) * 255 / 31) << 0) | ((((color >> 5) & 0x3F) * 255 / 63) << 8) | ((((color >> 11) & 0x1F) * 255 / 31) << 16) | (0xFF << 24); sceGuStart(GU_DIRECT, display_list); sceGuDrawBuffer(GU_PSM_5650, (void*)0, PSP_LINE_SIZE); //sceGuDispBuffer(PSP_SCREEN_WIDTH, PSP_SCREEN_HEIGHT, // (void*)0, PSP_LINE_SIZE); sceGuClearColor(color); sceGuClear(GU_COLOR_BUFFER_BIT); sceGuFinish(); sceGuSync(0, 0); */ } #else void <API key>() { if(current_scale != unscaled) { current_scale = unscaled; screen = SDL_SetVideoMode(480, 272, 16, 0); resolution_width = 480; resolution_height = 272; } } void <API key>() { if(current_scale != screen_scale) { current_scale = screen_scale; screen = SDL_SetVideoMode(<API key> * video_scale, <API key> * video_scale, 16, 0); resolution_width = <API key>; resolution_height = <API key>; } } void set_gba_resolution(video_scale_type scale) { if(screen_scale != scale) { screen_scale = scale; switch(scale) { case unscaled: case scaled_aspect: case fullscreen: <API key> = 240 * video_scale; <API key> = 160 * video_scale; break; } } } void clear_screen(u16 color) { u16 *dest_ptr = get_screen_pixels(); u32 line_skip = get_screen_pitch() - screen->w; u32 x, y; for(y = 0; y < screen->h; y++) { for(x = 0; x < screen->w; x++, dest_ptr++) { *dest_ptr = color; } dest_ptr += line_skip; } } #endif u16 *copy_screen() { u16 *copy = malloc(240 * 160 * 2); memcpy(copy, get_screen_pixels(), 240 * 160 * 2); return copy; } void blit_to_screen(u16 *src, u32 w, u32 h, u32 dest_x, u32 dest_y) { u32 pitch = get_screen_pitch(); u16 *dest_ptr = get_screen_pixels() + dest_x + (dest_y * pitch); u16 *src_ptr = src; u32 line_skip = pitch - w; u32 x, y; for(y = 0; y < h; y++) { for(x = 0; x < w; x++, src_ptr++, dest_ptr++) { *dest_ptr = *src_ptr; } dest_ptr += line_skip; } } void print_string_ext(const char *str, u16 fg_color, u16 bg_color, u32 x, u32 y, void *_dest_ptr, u32 pitch, u32 pad) { u16 *dest_ptr = (u16 *)_dest_ptr + (y * pitch) + x; u8 current_char = str[0]; u32 current_row; u32 glyph_offset; u32 i = 0, i2, i3; u32 str_index = 1; u32 current_x = x; while(current_char) { if(current_char == '\n') { y += FONT_HEIGHT; current_x = x; dest_ptr = get_screen_pixels() + (y * pitch) + x; } else { glyph_offset = _font_offset[current_char]; current_x += FONT_WIDTH; for(i2 = 0; i2 < FONT_HEIGHT; i2++, glyph_offset++) { current_row = _font_bits[glyph_offset]; for(i3 = 0; i3 < FONT_WIDTH; i3++) { if((current_row >> (15 - i3)) & 0x01) *dest_ptr = fg_color; else *dest_ptr = bg_color; dest_ptr++; } dest_ptr += (pitch - FONT_WIDTH); } dest_ptr = dest_ptr - (pitch * FONT_HEIGHT) + FONT_WIDTH; } i++; current_char = str[str_index]; if((i < pad) && (current_char == 0)) { current_char = ' '; } else { str_index++; } if(current_x >= 480) break; } } void print_string(const char *str, u16 fg_color, u16 bg_color, u32 x, u32 y) { print_string_ext(str, fg_color, bg_color, x, y, get_screen_pixels(), get_screen_pitch(), 0); } void print_string_pad(const char *str, u16 fg_color, u16 bg_color, u32 x, u32 y, u32 pad) { print_string_ext(str, fg_color, bg_color, x, y, get_screen_pixels(), get_screen_pitch(), pad); } #define <API key>(type) \ void video_##type##_savestate(file_tag_type savestate_file) \ { \ file_##type##_array(savestate_file, affine_reference_x); \ file_##type##_array(savestate_file, affine_reference_y); \ } \ <API key>(read); <API key>(write_mem);
#ifndef __ASM_ARM_IRQ_H #define __ASM_ARM_IRQ_H #include <mach/irqs.h> #ifndef irq_canonicalize #define irq_canonicalize(i) (i) #endif #ifndef NR_IRQS #define NR_IRQS 128 #endif /* * Use this value to indicate lack of interrupt * capability */ #ifndef NO_IRQ #define NO_IRQ ((unsigned int)(-1)) #endif /* * Migration helpers */ #define __IRQT_FALEDGE <API key> #define __IRQT_RISEDGE <API key> #define __IRQT_LOWLVL IRQ_TYPE_LEVEL_LOW #define __IRQT_HIGHLVL IRQ_TYPE_LEVEL_HIGH #define IRQT_NOEDGE (0) #define IRQT_RISING (__IRQT_RISEDGE) #define IRQT_FALLING (__IRQT_FALEDGE) #define IRQT_BOTHEDGE (__IRQT_RISEDGE|__IRQT_FALEDGE) #define IRQT_LOW (__IRQT_LOWLVL) #define IRQT_HIGH (__IRQT_HIGHLVL) #define IRQT_PROBE IRQ_TYPE_PROBE #ifndef __ASSEMBLY__ struct irqaction; extern void migrate_irqs(void); extern void asm_do_IRQ(unsigned int, struct pt_regs *); void init_IRQ(void); #endif #endif
package com.lj.learning.dao; // THIS CODE IS GENERATED BY greenDAO, EDIT ONLY INSIDE THE "KEEP"-SECTIONS // KEEP INCLUDES - put your custom includes here // KEEP INCLUDES END /** * Entity mapped to table "SHEET". */ public class Sheet implements java.io.Serializable { private Long id; /** Not-null value. */ private String sheetname; /** Not-null value. */ private String databasename; // KEEP FIELDS - put your custom fields here // KEEP FIELDS END public Sheet() { } public Sheet(Long id) { this.id = id; } public Sheet(Long id, String sheetname, String databasename) { this.id = id; this.sheetname = sheetname; this.databasename = databasename; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } /** Not-null value. */ public String getSheetname() { return sheetname; } /** Not-null value; ensure this value is available before it is saved to the database. */ public void setSheetname(String sheetname) { this.sheetname = sheetname; } /** Not-null value. */ public String getDatabasename() { return databasename; } /** Not-null value; ensure this value is available before it is saved to the database. */ public void setDatabasename(String databasename) { this.databasename = databasename; } // KEEP METHODS - put your custom methods here // KEEP METHODS END }
Beans - Atom Snippet Plugin ================= This package adds support for Beans related snippets in the Atom editor. * [Issues](https://github.com/ThemeButler/<API key>/issues) ## Current snippets available: * [Add Attribute](#add-attribute) * [Remove Attribute](#remove-attribute) * [Replace Attribute](#replace-attribute) * [Remove Markup](#remove-markup) * [Remove Action](#remove-action) * [Modify Action](#modify-action) * [Set Layout](#set-layout) * [Load Document](#load-document) * [Enqueue UIkit Components](#enqueue-uikit) * [Dequeue UIkit Components](#dequeue-uikit) * [Show UIkit Components](#show-uikit) * [Add Markup](#load-document) * [Register Widget Area](#register-widgetarea) * [Output Widget Area](#output-widgetarea) * [Register & Output Widgetarea](#new-widgetarea) * [Adjust Grid](#adjust-grid) <h2 id="add-attribute">Add Attribute</h2> Add an attribute on any element with a markup-id. **Shortcut:** beans_add_attribute **Output:** <pre>beans_add_attribute( 'markup_id', 'attribute_type', 'attribute' );</pre> # Examples: <pre>beans_add_attribute( 'beans_primary_nav', 'class', 'tm-nav' );</pre> This example adds the _tm-nav_ class. <pre><API key>( 'beans_header', 'data-uk-sticky' );</pre> This example adds an empty _data_uk_sticky_ attribute, which is used by the UIkit Sticky component. <h2 id="remove-attribute">Remove Attribute</h2> Remove an attribute on any element with a markup-id. Can be used to remove a specific attribute value (like a class) or the attribute itself. See below for an example. **Shortcut:** <API key> **Output:** <pre><API key>( 'markup_id', 'attribute_type', 'attribute' );</pre> # Examples: <pre><API key>( 'beans_primary_nav', 'class', 'uk-float-right' );</pre> This example removes the _uk-float-right_ class, while leaving the rest of the classes intact. <pre><API key>( 'beans_primary_nav', 'class' );</pre> This example removes the entire class=" " attribute, along with any assigned classes. **Original:** <pre>&lt;nav class=&quot;tm-nav uk-float-right&quot;&gt;</pre> **Remove attribute value:** <pre>&lt;nav class=&quot;tm-nav&quot;&gt;</pre> **Remove attribute:** <pre>&lt;nav&gt;</pre> <h2 id="replace-attribute">Replace Attribute</h2> Replace an attribute on any element with a markup-id. Can be used to replace a specific attribute value (like a class) or the attribute itself. See below examples. **Shortcut:** <API key> **Output:** <pre><API key>( 'markup_id', 'attribute_type', 'old_attribute', 'new_attribute' );</pre> # Examples: **Original:** <pre>&lt;nav class=&quot;tm-nav uk-float-right&quot;&gt;</pre> **Replace attribute value:** <pre><API key>( 'beans_primary_nav', 'class', 'uk-float-right', 'uk-float-left' );</pre> <pre>&lt;nav class=&quot;uk-left&quot;&gt;</pre> <h2 id="add-attribute">Modify Action</h2> Modify the placement of elements controlled by Beans. **Shortcut:** <API key> <h2 id="set-layout">Set Layout</h2> Set the content / sidebar layout dynamically for a specific layout. Generally used in your page templates. **Shortcut:** _beans-set-layout_ <h2 id="load-document">Load Document</h2> Loads the Beans document. This is needed in the page templates, usually at the bottom. **Shortcut:** _beans-load-doc_ <h2 id="enqueue-uikit">Enqueue UIkit Components</h2> Enqueue any of the Core or Add-on components available in UIkit. **Shortcut:** <API key> <h2 id="dequeue-uikit">Dequeue UIkit Components</h2> Dequeue any of the Core or Add-on components that are not needed. Use the _beans-show-uikit_ to see which components are being loaded. **Shortcut:** <API key> <h2 id="show-uikit">Show Loaded UIkit Components</h2> Outputs a list of all the UIkit components and styles that are being loaded. **Shortcut:** _beans-show-uikit_ <h2 id="add-markup">Add Markup</h2> Output custom markup using any of Beans dynamic placement hooks. **Shortcut:** _beans-add-markup_ <h2 id="register-widgetarea">Register Widget Area</h2> Register a custom widget-area in WordPress. **Shortcut:** <API key> <h2 id="output-widgetarea">Output Widget Area</h2> Output a widget-area in your theme, using any of Beans dynamic placement hooks. **Shortcut:** <API key> <h2 id="new-widgetarea">Register &amp; Output Widget Area</h2> Register a new widget-area and output it using any of Beans dynamic placement hooks. **Shortcut:** <API key> <h2 id="adjust-grid">Adjust Grid</h2> Modify Beans default layout grid (ie, the sidebars and content) width and placement. **Shortcut:** <API key>
#ifndef NET_HTTP_HTTP_<API key> #define NET_HTTP_HTTP_<API key> #pragma once #include <map> #include <string> #include <vector> #include "base/memory/scoped_ptr.h" #include "net/base/net_export.h" #include "net/http/http_auth.h" #include "net/http/<API key>.h" class GURL; namespace net { class BoundNetLog; class HostResolver; class HttpAuthHandler; class Http<API key>; class NET_EXPORT <API key> { public: enum CreateReason { CREATE_CHALLENGE, CREATE_PREEMPTIVE, }; <API key>() : <API key>(NULL) {} virtual ~<API key>() {} void <API key>(URLSecurityManager* <API key>) { <API key> = <API key>; } URLSecurityManager* <API key>() { return <API key>; } virtual int CreateAuthHandler(Http<API key>* challenge, HttpAuth::Target target, const GURL& origin, CreateReason create_reason, int digest_nonce_count, const BoundNetLog& net_log, scoped_ptr<HttpAuthHandler>* handler) = 0; int Create<API key>(const std::string& challenge, HttpAuth::Target target, const GURL& origin, const BoundNetLog& net_log, scoped_ptr<HttpAuthHandler>* handler); int CreatePreemptive<API key>( const std::string& challenge, HttpAuth::Target target, const GURL& origin, int digest_nonce_count, const BoundNetLog& net_log, scoped_ptr<HttpAuthHandler>* handler); static Http<API key>* CreateDefault(HostResolver* resolver); private: URLSecurityManager* <API key>; <API key>(<API key>); }; class NET_EXPORT Http<API key> : public <API key> { public: Http<API key>(); virtual ~Http<API key>(); void <API key>(const std::string& scheme, URLSecurityManager* <API key>); void <API key>(const std::string& scheme, <API key>* factory); <API key>* GetSchemeFactory(const std::string& scheme) const; static Http<API key>* Create( const std::vector<std::string>& supported_schemes, URLSecurityManager* security_manager, HostResolver* host_resolver, const std::string& gssapi_library_name, bool <API key>, bool <API key>); virtual int CreateAuthHandler(Http<API key>* challenge, HttpAuth::Target target, const GURL& origin, CreateReason reason, int digest_nonce_count, const BoundNetLog& net_log, scoped_ptr<HttpAuthHandler>* handler); private: typedef std::map<std::string, <API key>*> FactoryMap; FactoryMap factory_map_; <API key>(Http<API key>); }; } #endif
object-diff ======== A tool for comparing java objects
#ifndef MDP4_H #define MDP4_H extern struct mdp_dma_data dma2_data; extern struct mdp_dma_data dma_s_data; extern struct mdp_dma_data dma_e_data; extern struct mdp_dma_data dma_wb_data; extern unsigned int mdp_hist_frame_cnt; extern struct completion mdp_hist_comp; extern boolean mdp_is_in_isr; extern uint32 mdp_intr_mask; extern spinlock_t mdp_spin_lock; extern struct mdp4_statistic mdp4_stat; extern uint32 mdp4_extn_disp; extern char *mmss_cc_base; /* mutimedia sub system clock control */ extern spinlock_t dsi_clk_lock; extern u32 mdp_max_clk; #if defined(<API key>) extern u64 mdp_max_bw; #define MDP4_BW_AB_FACTOR (115) /* 1.15 */ #define MDP4_BW_IB_FACTOR (125) /* 1.25 */ #define <API key> (0x4000000) #endif #define <API key> 0x10000 #define <API key> 0x18000 #define <API key> 0x88000 #define MDP4_VIDEO_BASE 0x20000 #define MDP4_VIDEO_OFF 0x10000 #define MDP4_VIDEO_CSC_OFF 0x4000 #define MDP4_RGB_BASE 0x40000 #define MDP4_RGB_OFF 0x10000 /* chip select controller */ #define CS_CONTROLLER_0 0x0707ffff #define CS_CONTROLLER_1 0x03073f3f #if defined (CONFIG_ARCH_MSM8930) #define CSC_RESTORE #define CMAP_RESTORE #endif #ifdef CMAP_RESTORE extern unsigned char cmap_lut_changed; #endif #ifdef CSC_RESTORE extern bool csc_dmap_changed; extern struct mdp_csc_cfg_data <API key>; #endif #if defined(<API key>) #else enum { OVERLAY_PERF_LEVEL1 = 1, OVERLAY_PERF_LEVEL2, OVERLAY_PERF_LEVEL3, OVERLAY_PERF_LEVEL4 }; #endif typedef int (*cmd_fxn_t)(struct platform_device *pdev); enum { /* display */ PRIMARY_INTF_SEL, SECONDARY_INTF_SEL, EXTERNAL_INTF_SEL }; enum { LCDC_RGB_INTF, DTV_INTF = LCDC_RGB_INTF, MDDI_LCDC_INTF, MDDI_INTF, EBI2_INTF, TV_INTF = EBI2_INTF, DSI_VIDEO_INTF, DSI_CMD_INTF }; enum { MDDI_PRIMARY_SET, MDDI_SECONDARY_SET, MDDI_EXTERNAL_SET }; enum { EBI2_LCD0, EBI2_LCD1 }; #define MDP4_3D_NONE 0 #define <API key> 1 #define MDP4_3D_TOP_DOWN 2 #define MDP4_PANEL_MDDI BIT(0) #define MDP4_PANEL_LCDC BIT(1) #define MDP4_PANEL_DTV BIT(2) #define MDP4_PANEL_ATV BIT(3) #define <API key> BIT(4) #define MDP4_PANEL_DSI_CMD BIT(5) #define <API key> BIT(6) enum { OVERLAY_MODE_NONE, OVERLAY_MODE_BLT }; enum { <API key>, <API key>, <API key>, <API key> }; enum { OVERLAY_FRAMEBUF, OVERLAY_DIRECTOUT }; /* system interrupts */ /*note histogram interrupts defined in mdp.h*/ #define INTR_OVERLAY0_DONE BIT(0) #define INTR_OVERLAY1_DONE BIT(1) #define INTR_DMA_S_DONE BIT(2) #define INTR_DMA_E_DONE BIT(3) #define INTR_DMA_P_DONE BIT(4) #define INTR_PRIMARY_VSYNC BIT(7) #define <API key> BIT(8) #define INTR_EXTERNAL_VSYNC BIT(9) #define <API key> BIT(10) #define INTR_PRIMARY_RDPTR BIT(11) /* read pointer */ #define INTR_OVERLAY2_DONE BIT(30) #ifdef <API key> #define MDP4_ANY_INTR_MASK (0) #else #define MDP4_ANY_INTR_MASK (INTR_DMA_P_DONE) #endif enum { OVERLAY_PIPE_VG1, /* video/graphic */ OVERLAY_PIPE_VG2, OVERLAY_PIPE_RGB1, OVERLAY_PIPE_RGB2, OVERLAY_PIPE_RGB3, OVERLAY_PIPE_VG3, OVERLAY_PIPE_VG4, OVERLAY_PIPE_MAX }; enum { OVERLAY_TYPE_RGB, OVERLAY_TYPE_VIDEO, OVERLAY_TYPE_BF }; enum { MDP4_MIXER0, MDP4_MIXER1, MDP4_MIXER2, MDP4_MIXER_MAX }; enum { <API key>, <API key>, <API key> }; enum { <API key>, /* pipe not used */ <API key>, MDP4_MIXER_STAGE0, /* zorder 0 */ MDP4_MIXER_STAGE1, /* zorder 1 */ MDP4_MIXER_STAGE2, /* zorder 2 */ MDP4_MIXER_STAGE3, /* zorder 3 */ <API key> }; enum { <API key>, <API key>, <API key> }; enum { MDP4_CHROMA_RGB, MDP4_CHROMA_H2V1, MDP4_CHROMA_H1V2, MDP4_CHROMA_420 }; #define CSC_MAX_BLOCKS 6 #define <API key> BIT(9) #define <API key> BIT(8) #define <API key> BIT(7) #define <API key> BIT(6) #define <API key> (0 << 4) #define <API key> (1 << 4) #define <API key> (2 << 4) #define <API key> (3 << 4) #define <API key> BIT(3) #define <API key> BIT(2) #define <API key> (0 << 0) #define <API key> (1 << 0) #define <API key> (2 << 0) #define <API key> (3 << 0) #define <API key> BIT(22) #define <API key> BIT(18) #define <API key> BIT(17) #define <API key> BIT(12) #define <API key> BIT(8) #define <API key> BIT(19) #define MDP4_OP_DEINT_EN BIT(18) #define MDP4_OP_IGC_LUT_EN BIT(16) #define MDP4_OP_DITHER_EN BIT(15) #define MDP4_OP_FLIP_UD BIT(14) #define MDP4_OP_FLIP_LR BIT(13) #define MDP4_OP_CSC_EN BIT(11) #define <API key> BIT(10) #define <API key> BIT(9) #define MDP4_OP_SCALEY_FIR (0 << 4) #define <API key> (1 << 4) #define <API key> (2 << 4) #define MDP4_OP_SCALEX_FIR (0 << 2) #define <API key> (1 << 2) #define <API key> (2 << 2) #define <API key> (1 << 4) #define <API key> (0 << 3) #define <API key> (1 << 3) #define <API key> (0 << 2) #define <API key> (1 << 2) #define MDP4_OP_SCALEY_EN BIT(1) #define MDP4_OP_SCALEX_EN BIT(0) #define <API key> (8) #define <API key> (20) #define MDP4_PIPE_PER_MIXER 2 #define MDP4_MAX_PLANE 4 #define VSYNC_PERIOD 16 #if defined(<API key>) #ifdef BLT_RGB565 #define BLT_BPP 2 #else #define BLT_BPP 3 #endif #endif struct mdp4_hsic_regs { int32_t params[NUM_HSIC_PARAM]; int32_t conv_matrix[3][3]; int32_t pre_limit[6]; int32_t post_limit[6]; int32_t pre_bias[3]; int32_t post_bias[3]; int32_t dirty; }; struct <API key> { struct ion_handle *ihdl[MDP4_MAX_PLANE]; struct ion_handle *prev_ihdl[MDP4_MAX_PLANE]; u8 mark_unmap; }; #define IOMMU_FREE_LIST_MAX 32 struct iommu_free_list { int total; int fndx; struct ion_handle *ihdl[IOMMU_FREE_LIST_MAX]; }; struct blend_cfg { u32 op; u32 bg_alpha; u32 fg_alpha; u32 co3_sel; u32 transp_low0; u32 transp_low1; u32 transp_high0; u32 transp_high1; int solidfill; struct mdp4_overlay_pipe *solidfill_pipe; }; struct mdp4_overlay_pipe { uint32 pipe_used; uint32 pipe_type; /* rgb, video/graphic */ uint32 pipe_num; uint32 pipe_ndx; uint32 pipe_share; uint32 mixer_num; /* which mixer used */ uint32 mixer_stage; /* which stage of mixer used */ uint32 src_format; uint32 src_width; /* source img width */ uint32 src_height; /* source img height */ uint32 is_3d; uint32 src_width_3d; /* source img width */ uint32 src_height_3d; /* source img height */ uint32 src_w; /* roi */ uint32 src_h; /* roi */ uint32 src_x; /* roi */ uint32 src_y; /* roi */ uint32 dst_w; /* roi */ uint32 dst_h; /* roi */ uint32 dst_x; /* roi */ uint32 dst_y; /* roi */ uint32 flags; uint32 op_mode; uint32 transp; uint32 blend_op; uint32 phasex_step; uint32 phasey_step; uint32 alpha; uint32 is_fg; /* control alpha & color key */ uint32 srcp0_addr; /* interleave, luma */ uint32 srcp0_ystride; struct file *srcp0_file; int put0_need; uint32 srcp1_addr; /* pseudoplanar, chroma plane */ uint32 srcp1_ystride; struct file *srcp1_file; int put1_need; uint32 srcp2_addr; /* planar color 2*/ uint32 srcp2_ystride; struct file *srcp2_file; int put2_need; uint32 srcp3_addr; /* alpha/color 3 */ uint32 srcp3_ystride; uint32 fetch_plane; uint32 frame_format; /* video */ uint32 chroma_site; /* video */ uint32 chroma_sample; /* video */ uint32 solid_fill; uint32 vc1_reduce; /* video */ uint32 unpack_align_msb;/* 0 to LSB, 1 to MSB */ uint32 unpack_tight;/* 0 for loose, 1 for tight */ uint32 unpack_count;/* 0 = 1 component, 1 = 2 component ... */ uint32 rotated_90; /* has been rotated 90 degree */ uint32 bpp; /* byte per pixel */ uint32 alpha_enable;/* source has alpha */ /* * number of bits for source component, * 0 = 1 bit, 1 = 2 bits, 2 = 6 bits, 3 = 8 bits */ uint32 a_bit; /* component 3, alpha */ uint32 r_bit; /* component 2, R_Cr */ uint32 b_bit; /* component 1, B_Cb */ uint32 g_bit; /* component 0, G_lumz */ /* * unpack pattern * A = C3, R = C2, B = C1, G = C0 */ uint32 element3; /* 0 = C0, 1 = C1, 2 = C2, 3 = C3 */ uint32 element2; /* 0 = C0, 1 = C1, 2 = C2, 3 = C3 */ uint32 element1; /* 0 = C0, 1 = C1, 2 = C2, 3 = C3 */ uint32 element0; /* 0 = C0, 1 = C1, 2 = C2, 3 = C3 */ ulong ov_blt_addr; /* blt mode addr */ ulong dma_blt_addr; /* blt mode addr */ ulong blt_base; ulong blt_offset; uint32 blt_cnt; uint32 blt_changed; uint32 ov_cnt; uint32 dmap_cnt; uint32 dmae_cnt; uint32 blt_end; /* used by mddi only */ uint32 blt_ov_koff; uint32 blt_ov_done; uint32 blt_dmap_koff; uint32 blt_dmap_done; uint32 req_clk; #if defined(<API key>) uint64 bw_ab_quota; uint64 bw_ib_quota; #else uint32 req_bw; #endif uint32 luma_align_size; struct <API key> pp_cfg; struct mdp_overlay req_data; struct completion comp; struct completion dmas_comp; struct <API key> iommu; /* [START] force FLIP_MODE for INVERSE PANEL - hoseok.kim@lge.com */ #if defined(<API key>) || defined(<API key>) uint32 ext_flag; struct msm_fb_data_type *mfd; #endif /* [END] force FLIP_MODE for INVERSE PANEL - hoseok.kim@lge.com */ }; struct mdp4_statistic { ulong intr_tot; ulong intr_dma_p; ulong intr_dma_s; ulong intr_dma_e; ulong intr_overlay0; ulong intr_overlay1; ulong intr_overlay2; ulong intr_vsync_p; /* Primary interface */ ulong intr_underrun_p; /* Primary interface */ ulong intr_vsync_e; /* external interface */ ulong intr_underrun_e; /* external interface */ ulong intr_histogram; ulong intr_rdptr; ulong dsi_mdp_start; ulong dsi_clk_on; ulong dsi_clk_off; ulong intr_dsi; ulong intr_dsi_mdp; ulong intr_dsi_cmd; ulong intr_dsi_err; ulong kickoff_ov0; ulong kickoff_ov1; ulong kickoff_ov2; ulong kickoff_dmap; ulong kickoff_dmae; ulong kickoff_dmas; ulong blt_dsi_cmd; /* blt */ ulong blt_dsi_video; /* blt */ ulong blt_lcdc; /* blt */ ulong blt_dtv; /* blt */ ulong blt_mddi; /* blt */ ulong overlay_set[MDP4_MIXER_MAX]; ulong overlay_unset[MDP4_MIXER_MAX]; ulong overlay_play[MDP4_MIXER_MAX]; ulong overlay_commit[MDP4_MIXER_MAX]; ulong pipe[OVERLAY_PIPE_MAX]; ulong wait4vsync0; ulong wait4vsync1; ulong iommu_map; ulong iommu_unmap; ulong iommu_drop; ulong dsi_clkoff; ulong err_mixer; ulong err_zorder; ulong err_size; ulong err_scale; ulong err_format; ulong err_stage; ulong err_play; ulong err_underflow; }; struct vsync_update { int update_cnt; /* pipes to be updated */ struct completion vsync_comp; struct mdp4_overlay_pipe plist[OVERLAY_PIPE_MAX]; }; struct mdp4_overlay_pipe *<API key>(int ndx); void mdp4_sw_reset(unsigned long bits); void <API key>(int output, unsigned long intf); void mdp4_overlay_cfg(int layer, int blt_mode, int refresh, int direct_out); void mdp4_ebi2_lcd_setup(int lcd, unsigned long base, int ystride); void mdp4_mddi_setup(int which, unsigned long id); unsigned long mdp4_display_status(void); void mdp4_enable_clk_irq(void); void <API key>(void); void mdp4_dma_p_update(struct msm_fb_data_type *mfd); void mdp4_dma_s_update(struct msm_fb_data_type *mfd); void mdp_pipe_ctrl(MDP_BLOCK_TYPE block, <API key> state, boolean isr); void mdp4_pipe_kickoff(uint32 pipe, struct msm_fb_data_type *mfd); int mdp4_lcdc_on(struct platform_device *pdev); int mdp4_lcdc_off(struct platform_device *pdev); void mdp4_lcdc_update(struct msm_fb_data_type *mfd); void mdp4_intr_clear_set(ulong clear, ulong set); void mdp4_dma_p_cfg(void); unsigned is_mdp4_hw_reset(void); void <API key>(void); void mdp4_hw_init(void); void mdp4_isr_read(int); void mdp4_clear_lcdc(void); void <API key>(int mixer_num); void mdp4_vg_qseed_init(int vg_num); void mdp4_vg_csc_update(struct mdp_csc *p); irqreturn_t mdp4_isr(int irq, void *ptr); void <API key>(uint32 format, struct mdp4_overlay_pipe *pipe); uint32 mdp4_overlay_format(struct mdp4_overlay_pipe *pipe); uint32 <API key>(struct mdp4_overlay_pipe *pipe); uint32 <API key>(struct mdp4_overlay_pipe *pipe); void mdp4_lcdc_base_swap(int cndx, struct mdp4_overlay_pipe *pipe); void mdp4_lcdc_overlay(struct msm_fb_data_type *mfd); #ifdef CONFIG_FB_MSM_DTV void <API key>(void); void <API key>(struct msm_fb_data_type *mfd, struct mdp4_overlay_pipe *pipe); void <API key>(struct msm_fb_data_type *mfd, struct mdp4_overlay_pipe *pipe); int <API key>(struct msm_fb_data_type *mfd, struct mdp4_overlay_pipe *pipe); int <API key>(struct msm_fb_data_type *mfd, struct mdp4_overlay_pipe *pipe); void mdp4_dmae_done_dtv(void); void mdp4_dtv_wait4vsync(int cndx, long long *vtime); void mdp4_dtv_vsync_ctrl(struct fb_info *info, int enable); void mdp4_dtv_base_swap(int cndx, struct mdp4_overlay_pipe *pipe); #else static inline void <API key>(void) { /* empty */ } static inline void <API key>(struct msm_fb_data_type *mfd, struct mdp4_overlay_pipe *pipe) { /* empty */ } static inline void <API key>(struct msm_fb_data_type *mfd, struct mdp4_overlay_pipe *pipe) { /* empty */ } static inline int <API key>(struct msm_fb_data_type *mfd, struct mdp4_overlay_pipe *pipe) { return 0; } static inline int <API key>(struct msm_fb_data_type *mfd, struct mdp4_overlay_pipe *pipe) { return 0; } static inline void mdp4_dmae_done_dtv(void) { /* empty */ } static inline void mdp4_dtv_wait4vsync(int cndx, long long *vtime) { /* empty */ } static inline void mdp4_dtv_vsync_ctrl(struct fb_info *info, int enable) { /* empty */ } static inline void <API key>(struct msm_fb_data_type *mfd) { return; } static inline void <API key>(struct msm_fb_data_type *mfd) { return; } static inline void mdp4_dtv_base_swap(struct mdp4_overlay_pipe *pipe) { /* empty */ } #endif /* CONFIG_FB_MSM_DTV */ void <API key>(void); int <API key>(struct msm_fb_data_type *mfd, struct mdp4_overlay_pipe *pipe); int <API key>(struct msm_fb_data_type *mfd, struct mdp4_overlay_pipe *pipe); void mdp4_dtv_overlay(struct msm_fb_data_type *mfd); int mdp4_dtv_on(struct platform_device *pdev); int mdp4_dtv_off(struct platform_device *pdev); void mdp4_atv_overlay(struct msm_fb_data_type *mfd); int mdp4_atv_on(struct platform_device *pdev); int mdp4_atv_off(struct platform_device *pdev); void <API key>(cmd_fxn_t fxn); void <API key>(struct msm_fb_data_type *mfd); void <API key>(struct fb_info *info, int enable); void <API key>(int cndx); void <API key>(int cndx); void mdp4_primary_rdptr(void); void <API key>(struct msm_fb_data_type *mfd); int <API key>(int cndx, int wait); int <API key>(int cndx, int wait); int <API key>(int cndx); void mdp4_dsi_rdptr_init(int cndx); void mdp4_dsi_vsync_init(int cndx); void <API key>(int cndx); void mdp4_dtv_vsync_init(int cndx); ssize_t <API key>(struct device *dev, struct device_attribute *attr, char *buf); ssize_t <API key>(struct device *dev, struct device_attribute *attr, char *buf); ssize_t <API key>(struct device *dev, struct device_attribute *attr, char *buf); ssize_t mdp4_dtv_show_event(struct device *dev, struct device_attribute *attr, char *buf); void <API key>(int state); int <API key>(void); void <API key>(struct mdp4_overlay_pipe *pipe); void <API key>(struct mdp4_overlay_pipe *pipe, int all); void <API key>(int mixer); void <API key>(int); struct mdp4_overlay_pipe *<API key>(int mixer, int stage); void mdp4_mixer_stage_up(struct mdp4_overlay_pipe *pipe, int commit); void <API key>(struct mdp4_overlay_pipe *pipe, int commit); void <API key>(int mixer); int <API key>(struct mdp4_overlay_pipe *pipe); void <API key>(struct mdp4_overlay_pipe *pipe); void mdp4_mddi_overlay(struct msm_fb_data_type *mfd); int <API key>(uint32 format); int <API key>(struct mdp4_overlay_pipe *pipe); int mdp4_overlay_get(struct fb_info *info, struct mdp_overlay *req); int mdp4_overlay_set(struct fb_info *info, struct mdp_overlay *req); int <API key>(struct fb_info *info, long long *vtime); int <API key>(struct fb_info *info, int enable); int mdp4_overlay_unset(struct fb_info *info, int ndx); int <API key>(int mixer); int <API key>(struct fb_info *info, struct msmfb_overlay_data *req); int mdp4_overlay_play(struct fb_info *info, struct msmfb_overlay_data *req); int mdp4_overlay_commit(struct fb_info *info); struct mdp4_overlay_pipe *<API key>(int ptype, int mixer); void <API key>(int mixer); void <API key>(struct mdp4_overlay_pipe *pipe); void <API key>(int mixer); void <API key>(int cndx, struct mdp4_overlay_pipe *pipe); void <API key>(int cndx, struct mdp4_overlay_pipe *pipe); void mdp4_dtv_pipe_queue(int cndx, struct mdp4_overlay_pipe *pipe); void <API key>(struct mdp4_overlay_pipe *pipe); void <API key>(struct msm_fb_data_type *mfd, int lcdc); void <API key>(struct mdp4_overlay_pipe *pipe); void <API key>(struct msm_fb_data_type *mfd, int atv); void <API key>(struct mdp4_overlay_pipe *pipe); int <API key>(struct mdp4_overlay_pipe *pipe); void <API key>(void); void <API key>(int cndx); void <API key>(struct mdp_dma_data *dma); void <API key>(struct mdp_dma_data *dma); void <API key>(int cndx); void <API key>(int cndx); void mdp4_dmap_done_lcdc(int cndx); void <API key>(void); void <API key>(void); void <API key>(void); void <API key>(void); void <API key>(int cndx, long long *vtime); void <API key>(struct msm_fb_data_type *mfd, struct mdp4_overlay_pipe *pipe); void <API key>(void); #ifndef <API key> void <API key>(struct msm_fb_data_type *mfd); void <API key>(void); #else static inline void <API key>(struct msm_fb_data_type *mfd, struct mdp4_overlay_pipe *pipe) { /* empty */ } static inline void <API key>(struct msm_fb_data_type *mfd) { /* empty */ } static inline void <API key>(struct msm_fb_data_type *mfd) { /* empty */ } static inline void <API key>(void) { /* empty */ } static inline void <API key>(struct msm_fb_data_type *mfd) { /*empty*/ } static inline void <API key>(struct msm_fb_data_type *mfd) { /*empty*/ } static inline void <API key>(struct msm_fb_data_type *mfd, struct msmfb_overlay_blt *req) { /* empty */ } static inline void <API key>(struct msm_fb_data_type *mfd, struct msmfb_overlay_blt *req) { /* empty*/ } #endif void <API key>(struct msm_fb_data_type *mfd, struct mdp4_overlay_pipe *pipe); void <API key>(int num); void <API key>(int num); void <API key>(int mixer_num); void mdp4_fetch_cfg(uint32 clk); uint32 <API key>(uint32 ndx); void mdp4_vg_qseed_init(int); int mdp4_overlay_blt(struct fb_info *info, struct msmfb_overlay_blt *req); #ifdef <API key> void <API key>(struct msm_fb_data_type *mfd); void <API key>(struct msm_fb_data_type *mfd); void <API key>(struct msm_fb_data_type *mfd); void <API key>(struct msm_fb_data_type *mfd); void <API key>(struct msm_fb_data_type *mfd, struct msmfb_overlay_blt *req); void <API key>(struct msm_fb_data_type *mfd, struct msmfb_overlay_blt *req); void <API key>(int cndx, struct mdp4_overlay_pipe *pipe); #ifdef CONFIG_FB_MSM_MDP40 static inline void <API key>(struct msm_fb_data_type *mfd) { /* empty */ } #endif #else /* <API key> */ int <API key>(struct msm_fb_data_type *mfd, struct msmfb_overlay_blt *req); void <API key>(struct msm_fb_data_type *mfd, struct msmfb_overlay_blt *req); int <API key>(struct msm_fb_data_type *mfd); int <API key>(struct msm_fb_data_type *mfd); void <API key>(struct msm_fb_data_type *mfd); static inline int <API key>(struct msm_fb_data_type *mfd) { return -ENODEV; } static inline int <API key>(struct msm_fb_data_type *mfd) { return -ENODEV; } static inline void <API key>(struct msm_fb_data_type *mfd) { } static inline void <API key>(struct msm_fb_data_type *mfd) { } static inline void <API key>( struct msm_fb_data_type *mfd, struct msmfb_overlay_blt *req) { } static inline int <API key>( struct msm_fb_data_type *mfd, struct msmfb_overlay_blt *req) { return -ENODEV; } static inline void <API key>( struct msm_fb_data_type *mfd, struct msmfb_overlay_blt *req) { } static inline void <API key>( struct msm_fb_data_type *mfd, struct msmfb_overlay_blt *req) { } static inline void <API key>(int cndx, struct mdp4_overlay_pipe *pipe) { /* empty */ } static inline void <API key>(struct msm_fb_data_type *mfd) { } static inline void <API key>(struct msm_fb_data_type *mfd) { } #endif /* <API key> */ void <API key>(struct msm_fb_data_type *mfd, struct msmfb_overlay_blt *req); int <API key>(struct msm_fb_data_type *mfd, struct msmfb_overlay_blt *req); void <API key>(struct msm_fb_data_type *mfd); void <API key>(struct msm_fb_data_type *mfd); void <API key>(struct msm_fb_data_type *mfd); void <API key>(struct msm_fb_data_type *mfd); void <API key>(int mixer_num, uint32 mode); void <API key>(int mixer_num, uint32 mode); int <API key>(int mixer_num); uint32 <API key>(void); void <API key>(struct msm_fb_data_type *mfd, struct mdp4_overlay_pipe *pipe); void <API key>(struct msm_fb_data_type *mfd, struct mdp4_overlay_pipe *pipe); void <API key>(void); void <API key>(void); #ifdef <API key> void <API key>(struct msm_fb_data_type *mfd); int mdp4_dsi_cmd_on(struct platform_device *pdev); int mdp4_dsi_cmd_off(struct platform_device *pdev); int mdp4_dsi_video_off(struct platform_device *pdev); int mdp4_dsi_video_on(struct platform_device *pdev); void <API key>(void); void <API key>(int cndx, struct mdp4_overlay_pipe *pipe); void <API key>(int cndx, long long *vtime); void <API key>(int cndx, long long *vtime); void <API key>(int cndx, struct mdp4_overlay_pipe *pipe); void <API key>(int cndx, struct mdp4_overlay_pipe *pipe); int <API key>(int cndx, int wait); int <API key>(int cndx, int wait); void <API key>(struct fb_info *info, int enable); void <API key>(struct fb_info *info, int enable); #ifdef <API key> static inline void <API key>(void) { /* empty */ } #else /* <API key> */ void <API key>(void); #endif #else /* <API key> */ static inline int mdp4_dsi_cmd_on(struct platform_device *pdev) { return 0; } static inline int mdp4_dsi_cmd_off(struct platform_device *pdev) { return 0; } static inline int mdp4_dsi_video_on(struct platform_device *pdev) { return 0; } static inline int mdp4_dsi_video_off(struct platform_device *pdev) { return 0; } static inline void <API key>(void) { } static inline void <API key>(int cndx, struct mdp4_overlay_pipe *pipe) { } static inline void <API key>(int cndx, long long *vtime) { } static inline void <API key>(int cndx, long long *vtime) { } static inline void <API key>(int cndx, struct mdp4_overlay_pipe *pipe) { } static inline void <API key>(int cndx, struct mdp4_overlay_pipe *pipe) { } static inline int <API key>(int cndx, int wait) { return 0; } static inline int <API key>(int cndx, int wait) { return 0; } static inline void <API key>(struct fb_info *info, int enable) { } static inline void <API key>(struct fb_info *info, int enable) { } static inline void <API key>(void) { /* empty */ } #ifdef CONFIG_FB_MSM_MDP40 static inline void <API key>(struct msm_fb_data_type *mfd) { /* empty */ } #endif #endif /* <API key> */ void <API key>(struct msm_fb_data_type *mfd, struct mdp4_overlay_pipe *pipe); void <API key>(struct msm_fb_data_type *mfd, struct mdp4_overlay_pipe *pipe); void <API key>(struct msm_fb_data_type *mfd, struct mdp4_overlay_pipe *pipe); void <API key>(int mixer_num, uint32 panel_3d); int <API key>(struct fb_info *info, struct msmfb_overlay_3d *req); void <API key>(struct msm_fb_data_type *mfd, struct msmfb_overlay_3d *r3d); void <API key>(struct msm_fb_data_type *mfd, struct msmfb_overlay_3d *r3d); int mdp4_mixer_info(int mixer_num, struct mdp_mixer_info *info); void mdp_dmap_vsync_set(int enable); int mdp_dmap_vsync_get(void); void mdp_hw_cursor_done(void); void mdp_hw_cursor_init(void); int <API key>(struct fb_info *info, struct fb_cursor *cursor); int mdp_ppp_blit(struct fb_info *info, struct mdp_blit_req *req); void <API key>(void); uint32_t mdp4_ss_table_value(int8_t param, int8_t index); void <API key>(struct mdp4_overlay_pipe *pipe); #ifdef <API key> static inline int <API key>(void) { return 0; } #else int <API key>(void); #endif int <API key>(struct platform_device *pdev); int <API key>(struct platform_device *pdev); void <API key>(struct msm_fb_data_type *mfd); void <API key>(struct mdp_dma_data *dma); int <API key>(struct fb_info *info); int mdp4_writeback_stop(struct fb_info *info); int <API key>(struct fb_info *info, struct msmfb_data *data); int <API key>(struct fb_info *info, struct msmfb_data *data); void <API key>(struct msm_fb_data_type *mfd); int mdp4_writeback_init(struct fb_info *info); int <API key>(struct fb_info *info); uint32_t mdp_block2base(uint32_t block); int mdp_hist_lut_config(struct mdp_hist_lut_data *data); void mdp4_hsic_update(struct mdp4_overlay_pipe *pipe); int mdp4_csc_config(struct mdp_csc_cfg_data *config); void mdp4_csc_write(struct mdp_csc_cfg *data, uint32_t base); int mdp4_csc_enable(struct mdp_csc_cfg_data *config); int mdp4_pcc_cfg(struct mdp_pcc_cfg_data *cfg_ptr); int mdp4_argc_cfg(struct mdp_pgc_lut_data *pgc_ptr); int mdp4_qseed_cfg(struct mdp_qseed_cfg_data *cfg); int <API key>(struct mdp_qseed_cfg *cfg, uint32_t base); u32 <API key>(struct msm_fb_data_type *mfd, u32 mix_num); void <API key>(struct msm_fb_data_type *mfd, u32 mix_num); void <API key>(struct msm_fb_data_type *mfd, u32 mix_num); int mdp4_igc_lut_config(struct mdp_igc_lut_data *cfg); void <API key>(int ndx, int all); void <API key>(int mixer, struct ion_handle *ihdl); void <API key>(int mixer); void <API key>(void); void mdp4_iommu_unmap(struct mdp4_overlay_pipe *pipe); void mdp4_iommu_attach(void); int <API key>(struct fb_info *info, struct mdp_overlay *req, struct mdp4_overlay_pipe **ppipe); void <API key>(struct mdp4_overlay_pipe *pipe); int <API key>(struct fb_info *info, struct mdp4_overlay_pipe *pipe, unsigned long srcp0_addr, unsigned long srcp1_addr, unsigned long srcp2_addr); #if defined(<API key>) int <API key>(struct mdp4_overlay_pipe *pipe, struct msm_fb_data_type *mfd); int <API key>(struct msm_fb_data_type *mfd, struct mdp4_overlay_pipe *pipe); #else int <API key>(struct mdp4_overlay_pipe *pipe, struct msm_fb_data_type *mfd); #endif int <API key>(struct msm_fb_data_type *mfd, struct mdp4_overlay_pipe *plist); void <API key>(struct msm_fb_data_type *mfd, int flag); int <API key>(struct msm_fb_data_type *mfd, struct mdp_blend_cfg *mdp_blend_cfg); u32 mdp4_get_mixer_num(u32 panel_type); #ifndef <API key> static inline void mdp4_wfd_pipe_queue(int cndx, struct mdp4_overlay_pipe *pipe) { /* empty */ } static inline void mdp4_wfd_init(int cndx) { /* empty */ } static inline int <API key>(struct msm_fb_data_type *mfd, int cndx, int wait) { return 0; } #else void mdp4_wfd_pipe_queue(int cndx, struct mdp4_overlay_pipe *pipe); void mdp4_wfd_init(int cndx); int <API key>(struct msm_fb_data_type *mfd, int cndx, int wait); #endif #endif /* MDP_H */
package Net::Gopher::Response; =head1 NAME Net::Gopher::Response - Class encapsulating Gopher responses =head1 SYNOPSIS use Net::Gopher; my $response = $ng->request($request); if ($response->is_success) { if ($response->is_menu) { # you can use as_menu() to parse Gopher menus: my @items = $response->as_menu; foreach my $item (@items) { print join("::", $item->{'type'}, $item->{'display'}, $item->{'selector'}, $item->{'host'}, $item->{'port'}, $item->{'gopher_plus'} ), "\n"; } } if ($response->is_blocks) { # when issuing item attribute information requests, use # item_blocks() to retrieve Net::Gopher::Response::Blocks # objects, which you can call methods like as_info() and # as_admin() on to parse the block values: my %info = $response->item_blocks('INFO')->as_info; print join("::", $info{'type'}, $info{'display'}, $info{'selector'}, $info{'host'}, $info{'port'}, $info{'gopher_plus'} ), "\n"; my %admin = $response->item_blocks('ADMIN')->as_admin; print "Maintained by $admin{'Admin'}[0] ", "who can be emailed at $admin{'Admin'}[1]\n"; } } else { print $response->error; } =head1 DESCRIPTION The L<Net::Gopher|Net::Gopher> C<request()>, C<gopher()>, C<gopher_plus()>, C<item()>, and C<directory()> methods all return B<Net::Gopher::Response> objects. These objects encapsulate responses from Gopher and Gopher+ servers. In Gopher, a response is just a series of bytes terminated by a period on a line by itself. In Gopher+, a response consists of a status line (the first line), of which the first character is the status (success or failure; + or -), followed by a newline (CRLF) and the content of the response. This class contains methods to help you manipulate both Gopher as well as Gopher+ responses. =head1 METHODS The following methods are available: =cut use 5.005; use strict; use warnings; use Carp; use Net::Gopher::Utility qw( check_params $CRLF $NEWLINE %GOPHER_ITEM_TYPES %<API key> ); use base qw(Net::Gopher::Response::Blocks); sub new { my $invo = shift; my $class = ref $invo || $invo; my ($error, $request, $response, $status_line, $status, $content) = check_params( [ 'Error', 'Request', 'Response', 'StatusLine', 'Status', 'Content' ], @_ ); my $self = { # any error that occurred while sending the request or while # receiving the response: error => $error, # the Net::Gopher::Request object: request => $request, # the entire response--every single byte: response => $response, # the first line of the response including the newline (only # in Gopher+): status_line => $status_line, # the status code (+ or -) (only in Gopher+): status => $status, # content of the response: content => $content, # if this was a Gopher+ item/directory attribute information # request, then this will be used to store the parsed # information blocks: blocks => undef }; bless($self, $class); # remove the socket class name from error messages (IO::Socket # puts them in): if (defined $self->error) { $self->{'error'} =~ s/IO::Socket::INET:\s } return $self; } =head2 status_line() For a Gopher+ request, this method will return the status line (the first line) of the response, including the newline character. For a Gopher request, this will return undef. =cut sub status_line { return shift->{'status_line'} } =head2 status() For a Gopher+ request, this method will return the status (the first character of the status line) of the response, either a "+" or a "-" indicating success or failure. For a Gopher request, this will return undef. =cut sub status { return shift->{'status'} } =head2 content() Both C<content()> and C<as_string()> can be used to retrieve the strings containing the server's response. With C<content()>, however, if the item requested was text, then escaped periods are unescaped (i.e., '..' at the start of a line becomes '.'). Also if the response was terminated by a period on a line by itself but it isn't a text file or menu, then the period on a line by itself will be removed from the content (though you can still check to see if it was period terminated using the L<is_terminated()|Net::Gopher::Response/is_terminated()> method). This is because if you were requesting an image or some other non-text file, odds are you don't want the newline and period at the end the content. And finally if the item was text, then line endings are converted from CRLF and CR to LF. This is done so you can use '\n', '.', etc., in patterns (please read C<perldoc -f binmode> (it's short)). In Gopher+, besides the modifications listed above, C<content()> does not include the status line (first line) of the response (since the status line isn't content), only everything after it. =cut sub content { return shift->{'content'} } =head2 as_string() For both Gopher as well as Gopher+ requests, if the request was successful, then this method will return the entire unmodified response, every single byte, from the server. This includes the status line in Gopher+. =cut sub as_string { return shift->{'response'} } =head2 as_menu() If you got a Gopher menu as your response from the server, then you can use this method to parse it and return its values. When called, this method will parse the content returned by C<content()> and return either an array (in list context) or a reference to an array (in scalar context) containing references to hashes as its elements. Each hash contains the data for one menu item and has the following key=value pairs: type = The item type (e.g., 0, 1, I, g, etc.); display = The display string (e.g., "A file you should download"); selector = The selector string (e.g., /foo/bar); host = The hostname (e.g., gopher.host.com); port = The port number (e.g., 70); gopher_plus = The Gopher+ character (e.g., +, !, ?, etc.); Only items that list some type of resource that can be downloaded will be added to the list; meaning that inline text ('i' item type) is skipped. =cut sub as_menu { my $self = shift; # get the content, minus the period on a line by itself: (my $content = $self->content) =~ s/\n\.\n?$ my @menu; MENU: foreach my $item (split(/\n/, $content)) { # get the item type and display string, selector, host, port, # and Gopher+ string: my ($type_and_display, $selector, $host, $port, $gopher_plus) = split(/\t/, $item); # separate the item type and the item description: my ($type, $display) = $type_and_display =~ /^(.)(.*)/; # skip it if it's inline text: next if ($type eq 'i'); foreach ($type, $display, $selector, $host, $port) { unless (defined $_) { carp "Couldn't parse menu item"; last MENU; } } push(@menu, { type => $type, display => $display, selector => $selector, host => $host, port => $port, gopher_plus => $gopher_plus } ); } return (wantarray) ? @menu : \@menu; } sub request { return shift->{'request'} }; =head2 item_blocks([@block_names]) C<item_blocks()>, C<directory_blocks()>, and C<as_blocks()> allow you to parse information blocks. Each of these methods returns one or more information blocks in the form of L<Net::Gopher::Response::Blocks|BLOCK METHODS> objects. This method is a more simple alternative to the C<directory_blocks()> method. Use this method when you make item attribute information requests (!) and use C<directory_blocks()> when you make directory attribute information requests ($). This method can be used to retrieve item information block values by specifying the block name or block names as arguments. When specifying names, remember that leading '+' and trailing ':' are stripped from block names, so rather than asking for '+INFO:', you should ask for just plain 'INFO'. If you don't supply any block names, then this method will return a list containing every block name for the item: # Net::Gopher::Response::Blocks object for the INFO block: my $info = $response->item_blocks('INFO'); # print the block value: print $info->content; # the name of every block: my @block_names = $response->item_blocks; Please note that with this method, with the C<directory_blocks()> method, and with the C<as_blocks()> method, the blocks in the server's response are only parsed once, the first time you call any one of these methods, and stored in the response object, so multiple calls to any of these three methods will not result in performance degradation. =cut sub item_blocks { my $self = shift; my @block_names = @_; $self->_parse_blocks() unless (defined $self->{'blocks'}); if (@block_names) { return @{ $self->{'blocks'}[0] }{@block_names}; } else { return sort keys %{ $self->{'blocks'}[0] }; } } =head2 directory_blocks([\%item | $item] [, @block_names]) C<item_blocks()>, C<directory_blocks()>, and C<as_blocks()> allow you to parse information blocks. Each of these methods returns one or more information blocks in the form of L<Net::Gopher::Response::Blocks|BLOCK METHODS> objects. If the request was a Gopher+ directory attribute information request, then you can use method to get attribute information blocks for any of the items in the server's response. This method works like the C<item_blocks()> method, allowing you to specify the block values you want; however, with this method you must also specify which item you want the block values from. This is done using a hash ref as the first argument in which you specify certain attributes about the item, then this method will go searching each item's INFO block to see if it matches, and when the method finds the first matching item, it returns the block values you specified, for that item. The hash can contain any of the following key=value pairs: N = The item must be the n'th item in the response. Type = The item must be of this type. Display = The item must have this display string. Selector = The item must have this selector string. Host = The item must be on this host. Port = The item must be at this port. GopherPlus = The item must have this Gopher+ string. So to get the VIEWS and ADMIN B<Net::Gopher::Response::Bocks> objects for the item with the selector of /welcome, you'd do this: my ($views, $admin) = $response->directory_blocks( {Selector => '/welcome'}, 'VIEWS', 'ADMIN' ); Or use even more options for more accuracy: my $views = $response->directory_blocks( { N => 7, Selector => '/welcome', Host => 'gopher.somehost.com', Port => '70', }, 'VIEWS' ); Which means the VIEWS B<Net::Gopher::Response::Blocks> object for the 7th item in the response, which must have a selector string of /welcome, on gopher.somehost.com at port 70. If you only want to specify the item by number, you can forgo the hash ref altogether. To get the ADMIN block object for the second item, you can just do this: my $admin = $response->directory_blocks(2, 'ADMIN'); To get the names of all of the information blocks for a single item, don't specify any block names, only a parameters hash or item number: my @block_names = $response->directory_blocks( { Type => 1, Selector => '/stuff', Host => 'gopher.somehost.com', Port => 70 } ); Or: # the names of all of the blocks for the fourth item: my @block_names = $response->directory_blocks(4); To get the total number of items, don't specify a parameters hash/item number or block names: my $num_items = $response->directory_blocks; Please note that with this method, with the C<directory_blocks()> method, and with the C<as_blocks()> method, the blocks in the server's response are only parsed once, the first time you call any one of these methods, and stored in the response object, so multiple calls to any of these three methods will not result in performance degradation. =cut sub directory_blocks { my $self = shift; my $from_item = shift; my @block_names = @_; $self->_parse_blocks() unless (defined $self->{'blocks'}); if (defined $from_item and ref $from_item) { my %match; if (ref $from_item eq 'ARRAY') { %match = @$from_item; } else { %match = %$from_item; } my ($n,$type,$display,$selector,$host,$port,$gopher_plus) = check_params( [ 'N', 'Type', 'Display', 'Selector', 'Host', 'Port', 'GopherPlus' ], %match ); # a reference to hash contaiing the block names and values # for the item the user specified: my $matching_item; # the items to search: my @items = (defined $n) ? $self->{'blocks'}[$n - 1] : @{ $self->{'blocks'} }; my %template = ( type => $type, display => $display, selector => $selector, host => $host, port => $port, gopher_plus => $gopher_plus ); # now search the items looking for the one that matches: foreach my $item (@items) { # get the item's INFO block: my %info = $item->{'INFO'}->as_info; my $matches = 1; foreach my $key (keys %template) { next unless (defined $template{$key}); # check the value against the template: if (ref $template{$key} eq 'Regexp') { unless ($info{$key} =~ $template{$key}) { $matches = 0; last; } } else { unless ($info{$key} eq $template{$key}) { $matches = 0; last; } } } if ($matches) { $matching_item = $item; last; } } return unless ($matching_item); if (@block_names) { return @{$matching_item}{@block_names}; } else { return sort keys %$matching_item; } } elsif (defined $from_item) { my $i = $from_item - 1; if (@block_names) { # hash slice to lookup and return all of the block # values the user wanted from this item: return @{ $self->{'blocks'}[$i] }{@block_names}; } else { return sort keys %{ $self->{'blocks'}[$i] }; } } else { # return the total number of items: return scalar @{ $self->{'blocks'} }; } } =head2 as_blocks() C<item_blocks()>, C<directory_blocks()>, and C<as_blocks()> allow you to parse information blocks. Each of these methods returns one or more information blocks in the form of L<Net::Gopher::Response::Blocks|BLOCK METHODS> objects. This method can be used to directly get all of the information blocks at once. If you made a directory attribute information request, then the blocks are stored in an array, where each element of the array is reference to a hash containing block names and block values for a single item. In list context this method will return the array and in scalar context it will return a reference to the array: my @items = $response->as_blocks; # INFO block for the second item: my %info = $items[1]{'INFO'}->as_info; print "$info{'display'} ($info{'host'}:$info{'port'}$info{'selector'})\n"; If you made an item attribute information request, then the block names and values for the single item are stored in a hash, and the hash is returned in list context, and a reference to the hash is returned in scalar context: my %blocks = $response->as_blocks; # ADMIN block for the only item: my %admin = $blocks{'ADMIN'}->as_admin; print "Run by $admin{'Admin'}[0] ($admin{'Admin'}[1]).\n"; Please note that with this method, with the C<directory_blocks()> method, and with the C<as_blocks()> method, the blocks in the server's response are only parsed once, the first time you call any one of these methods, and stored in the response object, so multiple calls to any of these three methods will not result in performance degradation. =cut sub as_blocks { my $self = shift; $self->_parse_blocks() unless (defined $self->{'blocks'}); my @items; foreach my $item (@{ $self->{'blocks'} }) { push(@items, { %$item }); } if (@items == 1) { return wantarray ? %{ $items[0] } : $items[0]; } else { return wantarray ? @items : \@items; } } =head2 is_success() This method will return true if the request was successful, false otherwise. First, whether it's a Gopher or Gopher+ request, it won't be "successful" if any network errors occurred. Beyond that, in Gopher+, for a request to be a "success" means that the status code returned by the server indicated success (a code of +). In plain old Gopher, success is rather loosely defined. Basically, since Gopher has no built-in uniform error handling, as long as some response was received from the server (even "An error has occurred" or "The item you requested does not exist"), this method will return true. For more accuracy with Gopher requests you can use the C<is_terminated()> method. If C<is_success()> returns false, meaning an error has occurred, then you can obtain the error message by calling the C<error()> method on the B<Net::Gopher::Response> object. =cut sub is_success { my $self = shift; if (defined $self->status) { if ($self->status eq '+') { return 1; } else { return; } } elsif (defined $self->error) { return; } else { return 1; } } =head2 is_error() This method will return true if the request was unsuccessful; false otherwise. Success and failure are the same as described above (see L<is_success()|Net::Gopher::Response/is_success()>). =cut sub is_error { my $self = shift; if (defined $self->status) { if ($self->status eq '-') { return 1; } else { return; } } elsif (defined $self->error) { return 1; } else { return; } } =head2 is_blocks() This method will return true if the response contains item attribute information blocks; false otherwise. =cut sub is_blocks { my $self = shift; my $block = qr/\+\S+ \s .*?/sx; if ($self->content =~ /^$block (?: \n$block)*$/sx) { return 1; } else { return; } } =head2 is_gopher_plus() This method will return true if the response was a Gopher+ style response with a status line, status, etc. =cut sub is_gopher_plus { my $self = shift; if ($self->status_line) { return 1; } else { return; } } =head2 is_menu() This method will return true if the response is a Gopher menu that can be parsed with as_menu(); false otherwise. =cut sub is_menu { my $self = shift; my $field = qr/[^\t\012\015]*?/; my $item = qr/$field\t$field\t$field\t$field (?:\t[\+\!\?\$])?/x; if ($self->content =~ /^ $item (?:\n $item)* (?:\n\.\n?|\n)? $/x) { return 1; } else { return; } } =head2 is_terminated() This returns true if the response was terminated by a period on a line by itself; false otherwise. =cut sub is_terminated { my $self = shift; my $error = shift; # Since as_string() returns the unmodified response, it will always # have the period on a line by itself in it; but that also means the # line endings weren't converted to LF, so we can't use \n to match the # period on a line by itself: if ($self->as_string =~ /$NEWLINE\.$NEWLINE?$/) { return 1; } else { return; } } sub is_text { my $self = shift; return unless ($self->is_success); if ($self->is_gopher_plus) { if ($self->request->item_type eq '0' or $self->request->item_type eq '1' or (defined $self->request->representation and $self->request->representation =~ /^(text\/.*| Directory\/.*| application\/gopher\+?\-menu)/ix)) { return 1; } else { return; } } else { if ($self->request->item_type eq '0' or $self->request->item_type eq '1') { return 1; } else { return; } } } =head2 error() This method returns the error message of the last error to occur or undef if no error has occurred. =cut sub error { return shift->{'error'} } # Method # _convert_newlines() # Purpose # This method is used to conver all CRLF and CR line endings in # the response content with LF so the '\n', '.', '\s', etc. meta # symbols will work in pattern matches (see <perldoc -f binmode> # for more). # Parameters # None. sub _convert_newlines { my $self = shift; # replace CRLF and CR with LF: $self->{'content'} =~ s/\015\012/\012/g; $self->{'content'} =~ s/\015/\012/g; } # Method # <API key>() # Purpose # For responses that are terminated by periods on lines by # themselves, this method will remove from the response content # everything on after the period on a line by itself, unescape # escaped periods, and--for non-text items--remove the period on # a line by itself too. # Parameters # None. sub <API key> { my $self = shift; # For items terminated by periods on lines by themselves, lines that # only contain periods are escaped by adding another period. Those # lines must be unescaped: $self->{'content'} =~ s/($NEWLINE)\.\.($NEWLINE)/$1.$2/g; # remove anything after the period on a line by itself: $self->{'content'} =~ s/($NEWLINE\.$NEWLINE?).*/$1/s; # if there's a status, then the response was a Gopher+ request, item # attribute information request, or a directory attribute information # request: my $type = $self->request->item_type; unless ($self->is_text) { if ($self->is_gopher_plus) { if (exists $<API key>{$type}) { # remove the period on a line by itself in the # response content for this non-text response: $self->{'content'} =~ s/$NEWLINE\.$NEWLINE? } } else { if (exists $GOPHER_ITEM_TYPES{$type}) { # remove the period on a line by itself in the # response content for this non-text response: $self->{'content'} =~ s/$NEWLINE\.$NEWLINE? } } } } # Method # _parse_blocks() # Purpose # This method parses the information blocks in $self->{'content'} # and stores them in $self->{'blocks'}, where # $self->{'blocks'} is a reference to an array and each # element in the array is reference to a hash containing the # block names and block values for a single item. # Parameters # None. sub _parse_blocks { my $self = shift; # $self->{'blocks'} will contain a reference to an array that # will have hashrefs as its elements. Each hash will contain the item # attribute information block names and block values for a single item. # For Gopher+ '!' requests, the $self->{'blocks'} array will only # contain one element (for the single item's blocks). But for # Gopher+ '$' requests, since $ retrieves item attribute information # blocks for every item in a directory, the array will contain multiple # elements: $self->{'blocks'} = []; # remove all leading whitespace and the leading + for the first block # name: (my $content = $self->content) =~ s/^\s*\+ # this will store the block names and block values for each item, one # at a time: my %blocks; foreach my $name_and_value (split(/\n\+/, $content)) { # get the space separated name and value: my ($name, $value) = $name_and_value =~ /(\S+)\s(.*)/s; # block names are usually postfixed with colons: $name =~ s/:$ # if the current item already has a block by this name, then # this block belongs to the next item, so save this item's # hash and start a new one: if (exists $blocks{$name}) { # we need to save a reference to a hash containing # %blocks names and values, but not %blocks itself # because we're going to empty it to make room # for this item: push(@{ $self->{'blocks'} }, { %blocks }); %blocks = (); } $blocks{$name} = new Net::Gopher::Response::Blocks ( BlockName => $name, BlockValue => $value ); } # add the last item's attribute information blocks to the list: push(@{ $self->{'blocks'} }, { %blocks }); } 1; __END__ =head1 BLOCK METHODS The C<item_blocks()>, C<directory_blocks()>, and C<as_blocks()> methods all return one or more information blocks in the form of B<Net::Gopher::Response::Blocks> objects. Here are all of the methods you can call on these objects: =head2 content() This method will return the content of the block value, with the leading space at the beginning of each line removed. =head2 as_string() This method will return the unmodified block value, with leading spaces still intact. =head2 as_admin() ADMIN blocks contain attributes detailing information about a particular item including who the administrator of it is and when it was last modified. ADMIN blocks have at least two attributes: I<Admin> and I<Mod-Date>, though they can (and often do) contain many more. The I<Admin> attribute contains the name of the administrator and his or her email address (e.g., "John Doe <jdoe@notreal.email>"). I<Mod-Date> contains a timestamp for when the item was last modified. Like C<as_attributes()>, this method will parse these attributes and return a hash (in list context) or a reference to a hash (in scalar context) containing the attribute names and values. Unlike C<as_attributes()>, this method parses the individual I<Admin> and I<Mod-Date> attributes values and stores them as arrays (each described below). For the I<Admin> attribute, this method will extract the administrator name and email from the Admin attribute value and create a two element array with them: my %admin = $response->item_blocks('ADMIN')->as_admin; my ($name, $email) = @{ $admin{'Admin'} }; print "Run by $name ($email).n"; For the I<Mod-Date> attribute, this method will extract the timestamp convert it into an array containing values in the same format as those returned by Perl's C<localtime()> function corresponding with the timestamp (to find out exactly what the array will contain, see C<perldoc -f localtime>): my %admin = $response->item_blocks('ADMIN')->as_admin; my ($name, $email) = @{ $admin{'Admin'} } print "This box is maintained by $name ($email)."; my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = @{ $admin{'Mod-Date'} }; As mentioned above, in addition to I<Admin> and I<Mod-Date>, the hash may contain other attributes including I<Abstract>, I<Version>, I<Org>, I<Loc> and others--all of which are stored as in the hash as plain text, not as arrays. Note that this method is inherited by B<Net::Gopher::Response>. You can call this method directly on a B<Net::Gopher::Response> object, in which case this method will call C<$response-E<gt>item_blocks('ADMIN')> and use that. Thus, this: my %admin = $response->as_admin; is the same as this: my %admin = $response->item_blocks('ADMIN')->as_admin; =head2 as_ask() ASK blocks contain a form to be filled out by the user, with ASK queries on lines by themselves consisting of query type, followed by the question and any default values separated by tabs (e.g., "Ask: Some question?\tdefault answer 1\tdefault answer 2", "Choose: A question?choice 1\tchoice 2\tchoice3"). This method parses the ASK block and will return an array (in list context) or a reference to an array (in scalar context) containing hash refs of each query in the order they appeared, with each hash having the following key=value pairs: type = The type of query (e.g, Ask, AskP, Select, Choose, etc.). question = The question. defaults = A reference to an array containing the default answers. Note that this method is inherited by B<Net::Gopher::Response>. You can call this method directly on a B<Net::Gopher::Response> object, in which case this method will call C<$response-E<gt>item_blocks('ASK')> and use that. Thus, this: my @ask = $response->as_ask; is the same as this: my @ask = $response->item_blocks('ASK')->as_ask; =head2 as_info() INFO blocks contain tab delimited item information like that which you'd find in a Gopher menu. This method parses INFO blocks and returns a hash (in list context) or a reference to a hash (in scalar context) containing the information from the tab delimited fields in the same format as described above (see L<as_menu()|Net::Gopher::Response/as_menu()>): my %info = $response->item_blocks('INFO')->as_info; Note that this method is inherited by B<Net::Gopher::Response>. You can call this method directly on a B<Net::Gopher::Response> object, in which case this method will call C<$response-E<gt>item_blocks('INFO')> and use that. Thus, this: my %info = $response->as_info; is the same as this: my %info = $response->item_blocks('INFO')->as_info; =head2 as_views() VIEWS blocks contain a list of available formats for a particular item. This method parses VIEWS blocks and returns an array (in list context) or a reference to an array (in scalar context) containing each view in the form of a reference to hash with the following key=value pairs: type = The MIME type (e.g., text/plain, application/gopher+-menu, etc.). language = The ISO 639 language code (e.g., En_US). size = The size in bytes. Note that this method will convert the <> size format used in Gopher+ to an integer; the total size in bytes (e.g., <80> becomes 80, <40K> becomes 40000, <.4K> becomes 400, <400B> becomes 400, etc.): my @views = $response->item_blocks('VIEWS')->as_views; foreach my $view (@views) { print "$view->{'type'} ($view->{'size'} bytes) ($type->{'language'})\n"; my $another_response = $ng->request( Gopher => { Host => $host, Selector => $selector, Representation => $view->{'type'} } ); } Note that this method is inherited by B<Net::Gopher::Response>. You can call this method directly on a B<Net::Gopher::Response> object, in which case this method will call C<$response-E<gt>item_blocks('VIEWS')> and use that. Thus, this: my @views = $response->as_views; is the same as this: my @views = $response->item_blocks('VIEWS')->as_views; =head2 as_attributes() If the block value contains a series of C<Name: value> attributes on lines by themselves, then you can use this method to parse them. This method will return a hash (in list context) or a reference to a hash (in scalar context) containing the attribute names and values. =head2 is_attributes() This method checks to see if the block value can be successfully parsed by C<as_attributes()>. If the value contains a series of C<Name: value> attributes, then this method will return true; false otherwise. =head1 BUGS If you encounter bugs, you can alert me of them by emailing me at <william_g_davis at users dot sourceforge dot net> or, if you have PerlMonks account, you can go to perlmonks.org and /msg me (William G. Davis). =head1 SEE ALSO Net::Gopher, Net::Gopher::Request =head1 COPYRIGHT Copyright 2003, William G. Davis. This code is free software released under the GNU General Public License, the full terms of which can be found in the "COPYING" file that came with the distribution of the module. =cut
<?php /** * This houses all the code to integrate with X */ class <API key> { /** * Theme integrations should provide a stylesheet function returning the stylesheet name * This will be matched with get_stylesheet() to determine if the integration will load */ public static function stylesheet() { return 'x'; } /** * Theme integrations are loaded on the after_theme_setup hook */ public function __construct() { add_action( 'init', array( $this, 'init' ) ); add_action( '<API key>', array( $this, 'load_preview' ) ); add_filter( '<API key>', array( $this, 'addDefaultSettings' ) ); // Don't enqueue native styles add_filter( '<API key>', '__return_false' ); add_filter( '<API key>', '__return_false' ); // Don't load the Customizer add_filter( '<API key>', '__return_false' ); // Enable X specific settings pane items add_filter( 'x_settings_pane', '__return_true' ); // Declare support for page builder features add_filter( '<API key>', '__return_true' ); // Shortcode generator tweaks add_action('<API key>', array( $this, '<API key>' ), -9999 ); add_filter('<API key>', array( $this, '<API key>' ) ); // Alias legacy shortcode names. add_action('<API key>', array( $this, 'aliasShortcodes' ) ); add_filter('<API key>', array( $this, 'scrollTopSelector' ) ); add_filter('<API key>', array( $this, 'recentPostTypes' ) ); // Use Audio and Video shortcodes for X native players. add_filter( '<API key>', '<API key>' ); add_filter( 'wp_audio_shortcode', '<API key>' ); add_filter( '<API key>', '<API key>' ); add_filter( '<API key>', '<API key>' ); add_filter( 'wp_video_shortcode', '<API key>' ); add_filter( '<API key>', '<API key>' ); } public function init() { // Add Logic for additional contact methods if not overridden in a child theme if ( ! function_exists( '<API key>' ) ) add_filter( 'user_contactmethods', array( $this, '<API key>' ) ); add_action( 'admin_menu', array( $this, 'optionsPage' ) ); // Remove empty p and br HTML elements for legacy pages not using Cornerstone sections add_filter( 'the_content', 'cs_noemptyp' ); // Enqueue Legacy font classes $settings = CS()->settings(); if ( isset( $settings['<API key>'] ) && $settings['<API key>'] ) { add_filter( '<API key>', '__return_true' ); } } public function aliasShortcodes() { // Alias [social] to [icon] for backwards compatability. cs_alias_shortcode( 'social', 'x_icon', false ); // Alias deprecated shortcode names. // Mk2 cs_alias_shortcode( array( 'alert', 'x_alert' ), 'cs_alert' ); cs_alias_shortcode( array( 'x_text' ), 'cs_text' ); cs_alias_shortcode( array( 'icon_list', 'x_icon_list' ), 'cs_icon_list' ); cs_alias_shortcode( array( 'icon_list_item', 'x_icon_list_item' ), 'cs_icon_list_item' ); // Mk1 cs_alias_shortcode( 'accordion', 'x_accordion', false ); cs_alias_shortcode( 'accordion_item', 'x_accordion_item', false ); cs_alias_shortcode( 'author', 'x_author', false ); cs_alias_shortcode( 'block_grid', 'x_block_grid', false ); cs_alias_shortcode( 'block_grid_item', 'x_block_grid_item', false ); cs_alias_shortcode( 'blockquote', 'x_blockquote', false ); cs_alias_shortcode( 'button', 'x_button', false ); cs_alias_shortcode( 'callout', 'x_callout', false ); cs_alias_shortcode( 'clear', 'x_clear', false ); cs_alias_shortcode( 'code', 'x_code', false ); cs_alias_shortcode( 'column', 'x_column', false ); cs_alias_shortcode( 'columnize', 'x_columnize', false ); cs_alias_shortcode( 'container', 'x_container', false ); cs_alias_shortcode( 'content_band', 'x_content_band', false ); cs_alias_shortcode( 'counter', 'x_counter', false ); cs_alias_shortcode( 'custom_headline', 'x_custom_headline', false ); cs_alias_shortcode( 'dropcap', 'x_dropcap', false ); cs_alias_shortcode( 'extra', 'x_extra', false ); cs_alias_shortcode( 'feature_headline', 'x_feature_headline', false ); cs_alias_shortcode( 'gap', 'x_gap', false ); cs_alias_shortcode( 'google_map', 'x_google_map', false ); cs_alias_shortcode( 'google_map_marker', 'x_google_map_marker', false ); cs_alias_shortcode( 'highlight', 'x_highlight', false ); cs_alias_shortcode( 'icon', 'x_icon', false ); cs_alias_shortcode( 'image', 'x_image', false ); cs_alias_shortcode( 'lightbox', 'x_lightbox', false ); cs_alias_shortcode( 'line', 'x_line', false ); cs_alias_shortcode( 'map', 'x_map', false ); cs_alias_shortcode( 'pricing_table', 'x_pricing_table', false ); cs_alias_shortcode( '<API key>', '<API key>', false ); cs_alias_shortcode( 'promo', 'x_promo', false ); cs_alias_shortcode( 'prompt', 'x_prompt', false ); cs_alias_shortcode( 'protect', 'x_protect', false ); cs_alias_shortcode( 'pullquote', 'x_pullquote', false ); cs_alias_shortcode( 'raw_output', 'x_raw_output', false ); cs_alias_shortcode( 'recent_posts', 'x_recent_posts', false ); cs_alias_shortcode( 'responsive_text', 'x_responsive_text', false ); cs_alias_shortcode( 'search', 'x_search', false ); cs_alias_shortcode( 'share', 'x_share', false ); cs_alias_shortcode( 'skill_bar', 'x_skill_bar', false ); cs_alias_shortcode( 'slider', 'x_slider', false ); cs_alias_shortcode( 'slide', 'x_slide', false ); cs_alias_shortcode( 'tab_nav', 'x_tab_nav', false ); cs_alias_shortcode( 'tab_nav_item', 'x_tab_nav_item', false ); cs_alias_shortcode( 'tabs', 'x_tabs', false ); cs_alias_shortcode( 'tab', 'x_tab', false ); cs_alias_shortcode( 'toc', 'x_toc', false ); cs_alias_shortcode( 'toc_item', 'x_toc_item', false ); cs_alias_shortcode( 'visibility', 'x_visibility', false ); } public function recentPostTypes( $types ) { $types['portfolio'] = 'x-portfolio'; return $types; } public function scrollTopSelector() { return '.x-navbar-fixed-top'; } public function <API key>( $user_contactmethods ) { if ( isset( $user_contactmethods['yim'] ) ) unset( $user_contactmethods['yim'] ); if ( isset( $user_contactmethods['aim'] ) ) unset( $user_contactmethods['aim'] ); if ( isset( $user_contactmethods['jabber'] ) ) unset( $user_contactmethods['jabber'] ); $user_contactmethods['facebook'] = __( 'Facebook Profile', csl18n() ); $user_contactmethods['twitter'] = __( 'Twitter Profile', csl18n() ); $user_contactmethods['googleplus'] = __( 'Google+ Profile', csl18n() ); return $user_contactmethods; } public function <API key>() { remove_all_actions( '<API key>' ); $list_stacks = array( 'integrity' => __( 'Integrity', csl18n() ), 'renew' => __( 'Renew', csl18n() ), 'icon' => __( 'Icon', csl18n() ), 'ethos' => __( 'Ethos', csl18n() ) ); $stack = $this->x_get_stack(); $stack_name = ( isset( $list_stacks[ $stack ] ) ) ? $list_stacks[ $stack ] : 'X'; printf( __('You&apos;re using %s. Click the button below to check out a live example of this shortcode when using this Stack.', csl18n() ), '<strong>' . $stack_name . '</strong>' ); } public function <API key>( $attributes ) { if ( isset($attributes['demo']) ) $attributes['demo'] = str_replace( 'integrity', $this->x_get_stack(), $attributes['demo'] ); return $attributes; } public function x_get_stack() { // Some plugins abort the theme loading process in certain contexts. // This provide a safe fallback for x_get_stack calls if ( function_exists( 'x_get_stack' ) ) return x_get_stack(); return apply_filters( 'x_option_x_stack', get_option( 'x_stack', 'integrity' ) ); } public function addDefaultSettings( $settings ) { $settings['<API key>'] = get_option( 'x_pre_v4', false ); return $settings; } /** * Swap out the Design and Product Validation Metaboxes on the Options page */ public function optionsPage() { remove_action( '<API key>', array( CS()->component( 'Admin' ), 'renderValidationMB' ) ); add_action( '<API key>', array( $this, 'legacyFontClasses' ) ); add_action( '<API key>', array( $this, 'renderValidationMB' ) ); add_filter( '<API key>', array( $this, 'removeInfoItems' ) ); } public function legacyFontClasses() { ?> <tr> <th> <label for="<API key>"> <strong><?php _e( 'Enable Legacy Font Classes', csl18n() ); ?></strong> <span><?php _e( 'Check to enable legacy font classes.', csl18n() ); ?></span> </label> </th> <td> <fieldset> <?php echo CS()->component( 'Admin' )->settings->renderField( '<API key>', array( 'type' => 'checkbox', 'value' => '1', 'label' => __( 'Enable', csl18n() ) ) ) ?> </fieldset> </td> </tr> <?php } /** * Output custom Product Validation Metabox */ public function renderValidationMB() { ?> <?php if ( x_is_validated() ) : ?> <p class="cs-validated"><strong>Congrats! X is active and validated</strong>. Because of this you don't need to validate Cornerstone and automatic updates are up and running.</p> <?php else : ?> <p class="cs-not-validated"><strong>Uh oh! It looks like X isn't validated</strong>. Cornerstone validates through X, which enables automatic updates. Head over to the product validation page to get that setup.<br><a href="<?php echo <API key>(); ?>">Validate</a></p> <?php endif; } public function removeInfoItems( $info_items ) { unset( $info_items['api-key'] ); unset( $info_items['design-options'] ); $info_items['<API key>' ] = array( 'title' => __( 'Enable Legacy Font Classes', csl18n() ), 'content' => __( 'X no longer provides the <strong>.x-icon*</strong> classes. This was done for performance reasons. If you need these classes, you can enable them again with this setting.', csl18n() ) ); return $info_items; } public function load_preview() { if ( defined( '<API key>' ) ) remove_action( 'wp_footer', 'x_video_lock_output' ); } } // Native shortcode alterations. // [audio] // 1. Library. // 2. Output. // 3. Class. function <API key>() { wp_enqueue_script( 'mediaelement' ); return false; } function <API key>( $html ) { return '<div class="x-audio player" data-x-element="x_mejs">' . $html . '</div>'; } function <API key>() { return 'x-mejs <API key> advanced-controls'; } // [video] // 1. Library. // 2. Output. // 3. Class. function <API key>() { wp_enqueue_script( 'mediaelement' ); return false; } function <API key>( $output ) { return '<div class="x-video player" data-x-element="x_mejs">' . preg_replace('/<div(.*?)>/', '<div class="x-video-inner">', $output ) . '</div>'; } function <API key>() { return 'x-mejs <API key> advanced-controls'; }
/* * $Id: hppcl.h,v 1.5 2008-07-27 03:22:41 haley Exp $ */ #ifndef _hppcl_ #define _hppcl_ #define HPPCL_RESET "E" #define HPPCL_PORTRAIT "&l0O" #define HPPCL_LANDSCAPE "&l1O" #define HPPCL_ENCODING "" #define HPPCL_START "1A" #define HPPCL_END "B" #define HPPCL_EJECT "&l0H" #define HPPCL_POSITION "%dx%dY" #define HPPCL_TRANSFER "%dW" #define HPPCL_RESOLUTION "%dR" #ifdef DEAD #define HPPCL_PAPER_WIDTH 8.5 #define HPPCL_PAPER_HEIGHT 11.0 #endif #define HPPCL_PAPER_WIDTH 8.0 #define HPPCL_PAPER_HEIGHT 10.0 #define HPPCL_MAX_RES 300 /* default resolution 300dpi */ typedef struct HPPCL_Info { int do_compress; int orientation; int dpi; char *trans_data; int row_size; int image_size; int start_x; int start_y; } HPPCL_Info; #endif /* _hppcl_ */
<?php // no direct access defined('_JEXEC') or die('Restricted access'); ?> <div class="jbBoxTopLeft"><div class="jbBoxTopRight"><div class="jbBoxTop"> <div class="jbTextHeader"><?php echo JText::_('<API key>'); ?></div> </div></div></div> <div class="jbBoxOuter"><div class="jbBoxInner"> <div class="jbLeft jbMargin10"><?php $iconsBoard = $this->joobbIconSet->getIconsByGroup('iconBoard'); for ($i = 0, $n = count($iconsBoard); $i < $n; $i++) : $icon = $iconsBoard[$i]; ?> <div class="jbLeft jbPaddingRight20" style="text-align: center;"> <img src="<?php echo $icon->fileName; ?>" alt="<?php echo $icon->title; ?>" /> <div style="text-align: center;"><?php echo $icon->title; ?></div> </div><?php endfor; ?> </div> <br clear="all" /> </div></div> <div class="jbBoxBottomLeft"><div class="jbBoxBottomRight"><div class="jbBoxBottom"></div></div></div> <div class="jbMarginBottom10"></div>
<HTML ><HEAD ><TITLE >Audio</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+ "><LINK REL="HOME" TITLE="SDL Library Documentation" HREF="index.html"><LINK REL="UP" TITLE="SDL Reference" HREF="reference.html"><LINK REL="PREVIOUS" TITLE="SDL_JoystickClose" HREF="sdljoystickclose.html"><LINK REL="NEXT" TITLE="SDL_AudioSpec" HREF="sdlaudiospec.html"><META NAME="KEYWORD" CONTENT="audio"><META NAME="KEYWORD" CONTENT="function"></HEAD ><BODY CLASS="CHAPTER" BGCOLOR="#FFF8DC" TEXT="#000000" LINK="#0000ee" VLINK="#551a8b" ALINK="#ff0000" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >SDL Library Documentation</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="sdljoystickclose.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="sdlaudiospec.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="CHAPTER" ><H1 ><A NAME="AUDIO" ></A >Chapter 10. Audio</H1 ><DIV CLASS="TOC" ><DL ><DT ><B >Table of Contents</B ></DT ><DT ><A HREF="sdlaudiospec.html" >SDL_AudioSpec</A >&nbsp;--&nbsp;Audio Specification Structure</DT ><DT ><A HREF="sdlopenaudio.html" >SDL_OpenAudio</A >&nbsp;--&nbsp;Opens the audio device with the desired parameters.</DT ><DT ><A HREF="sdlpauseaudio.html" >SDL_PauseAudio</A >&nbsp;--&nbsp;Pauses and unpauses the audio callback processing</DT ><DT ><A HREF="sdlgetaudiostatus.html" >SDL_GetAudioStatus</A >&nbsp;--&nbsp;Get the current audio state</DT ><DT ><A HREF="sdlloadwav.html" >SDL_LoadWAV</A >&nbsp;--&nbsp;Load a WAVE file</DT ><DT ><A HREF="sdlfreewav.html" >SDL_FreeWAV</A >&nbsp;--&nbsp;Frees previously opened WAV data</DT ><DT ><A HREF="sdlaudiocvt.html" >SDL_AudioCVT</A >&nbsp;--&nbsp;Audio Conversion Structure</DT ><DT ><A HREF="sdlbuildaudiocvt.html" >SDL_BuildAudioCVT</A >&nbsp;--&nbsp;Initializes a SDL_AudioCVT structure for conversion</DT ><DT ><A HREF="sdlconvertaudio.html" >SDL_ConvertAudio</A >&nbsp;--&nbsp;Convert audio data to a desired audio format.</DT ><DT ><A HREF="sdlmixaudio.html" >SDL_MixAudio</A >&nbsp;--&nbsp;Mix audio data</DT ><DT ><A HREF="sdllockaudio.html" >SDL_LockAudio</A >&nbsp;--&nbsp;Lock out the callback function</DT ><DT ><A HREF="sdlunlockaudio.html" >SDL_UnlockAudio</A >&nbsp;--&nbsp;Unlock the callback function</DT ><DT ><A HREF="sdlcloseaudio.html" >SDL_CloseAudio</A >&nbsp;--&nbsp;Shuts down audio processing and closes the audio device.</DT ></DL ></DIV ><P >Sound on the computer is translated from waves that you hear into a series of values, or samples, each representing the amplitude of the wave. When these samples are sent in a stream to a sound card, an approximation of the original wave can be recreated. The more bits used to represent the amplitude, and the greater frequency these samples are gathered, the closer the approximated sound is to the original, and the better the quality of sound.</P ><P >This library supports both 8 and 16 bit signed and unsigned sound samples, at frequencies ranging from 11025 Hz to 44100 Hz, depending on the underlying hardware. If the hardware doesn't support the desired audio format or frequency, it can be emulated if desired (See <A HREF="sdlopenaudio.html" ><TT CLASS="FUNCTION" >SDL_OpenAudio()</TT ></A >)</P ><P >A commonly supported audio format is 16 bits per sample at 22050 Hz.</P ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="sdljoystickclose.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="sdlaudiospec.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >SDL_JoystickClose</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="reference.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >SDL_AudioSpec</TD ></TR ></TABLE ></DIV ></BODY ></HTML >
<nav> <ul> <li><a href="">Usuaris</a></li> </ul> </nav>
#ifndef LMP_FORCE_H #define LMP_FORCE_H #include "pointers.h" #include <map> #include <string> namespace LAMMPS_NS { class Force : protected Pointers { public: double boltz; // Boltzmann constant (eng/degree-K) double hplanck; // Planck's constant (energy-time) double mvv2e; // conversion of mv^2 to energy double ftm2v; // conversion of ft/m to velocity double mv2d; // conversion of mass/volume to density double nktv2p; // conversion of NkT/V to pressure double qqr2e; // conversion of q^2/r to energy double qe2f; // conversion of qE to force double vxmu2f; // conversion of vx dynamic-visc to force double xxt2kmu; // conversion of xx/t to kinematic-visc double dielectric; // dielectric constant double qqrd2e; // q^2/r to energy w/ dielectric constant double e_mass; // electron mass double hhmrr2e; // conversion of (hbar)^2/(mr^2) to energy double mvh2r; // conversion of mv/hbar to distance // hbar = h/(2*pi) double angstrom; // 1 angstrom in native units double femtosecond; // 1 femtosecond in native units double qelectron; // 1 electron charge abs() in native units int newton,newton_pair,newton_bond; // Newton's 3rd law settings class Pair *pair; char *pair_style; typedef Pair *(*PairCreator)(LAMMPS *); std::map<std::string,PairCreator> *pair_map; class Bond *bond; char *bond_style; class Angle *angle; char *angle_style; class Dihedral *dihedral; char *dihedral_style; class Improper *improper; char *improper_style; class KSpace *kspace; char *kspace_style; // index [0] is not used in these arrays double special_lj[4]; // 1-2, 1-3, 1-4 prefactors for LJ double special_coul[4]; // 1-2, 1-3, 1-4 prefactors for Coulombics int special_angle; // 0 if defined angles are ignored // 1 if only weight 1,3 atoms if in an angle int special_dihedral; // 0 if defined dihedrals are ignored // 1 if only weight 1,4 atoms if in a dihedral int special_extra; // extra space for added bonds Force(class LAMMPS *); ~Force(); void init(); void create_pair(const char *, const char *suffix = NULL); class Pair *new_pair(const char *, const char *, int &); class Pair *pair_match(const char *, int); void create_bond(const char *, const char *suffix = NULL); class Bond *new_bond(const char *, const char *, int &); class Bond *bond_match(const char *); void create_angle(const char *, const char *suffix = NULL); class Angle *new_angle(const char *, const char *, int &); void create_dihedral(const char *, const char *suffix = NULL); class Dihedral *new_dihedral(const char *, const char *, int &); void create_improper(const char *, const char *suffix = NULL); class Improper *new_improper(const char *, const char *, int &); void create_kspace(int, char **, const char *suffix = NULL); class KSpace *new_kspace(int, char **, const char *, int &); class KSpace *kspace_match(const char *, int); void set_special(int, char **); void bounds(char *, int, int &, int &, int nmin=1); void boundsbig(char *, bigint, bigint &, bigint &, bigint nmin=1); double numeric(const char *, int, char *); int inumeric(const char *, int, char *); bigint bnumeric(const char *, int, char *); bigint memory_usage(); private: template <typename T> static Pair *pair_creator(LAMMPS *); }; } #endif
public class ValueGenerator { }
package remasterkit; import java.awt.BorderLayout; import java.awt.EventQueue; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.UIManager; import javax.swing.border.EmptyBorder; import javax.swing.JLabel; import javax.swing.ImageIcon; import javax.swing.border.TitledBorder; import javax.swing.border.LineBorder; import java.awt.Color; import java.awt.Toolkit; import javax.swing.JButton; import java.awt.Font; import javax.swing.JCheckBox; import com.jtattoo.plaf.graphite.GraphiteLookAndFeel; import javax.swing.JComboBox; import javax.swing.<API key>; import javax.swing.JTextField; public class Menu_Utama extends JFrame { private JPanel contentPane; private JTextField txtName; private JTextField txtURL; /** * Launch the application. */ public static void main(String[] args) { EventQueue.invokeLater(new Runnable() { public void run() { try { UIManager.setLookAndFeel(new GraphiteLookAndFeel()); Menu_Utama frame = new Menu_Utama(); frame.setVisible(true); } catch (Exception e) { e.printStackTrace(); } } }); } /** * Create the frame. */ public Menu_Utama() { setIconImage(Toolkit.getDefaultToolkit().getImage("/home/newbieilmu/workspace/app.remasterkit/src/icon/logo.png")); setTitle("RemasterKit(Custom Linuxmu Sesuka Hati)"); <API key>(JFrame.EXIT_ON_CLOSE); setBounds(100, 100, 589, 357); contentPane = new JPanel(); contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); setContentPane(contentPane); contentPane.setLayout(null); JPanel panelRKit = new JPanel(); panelRKit.setBorder(new TitledBorder(null, "RemasterKit", TitledBorder.LEADING, TitledBorder.TOP, null, null)); panelRKit.setBounds(146, 12, 421, 163); contentPane.add(panelRKit); panelRKit.setLayout(null); JLabel lblPilihDe = new JLabel("1. Pilih DE "); lblPilihDe.setBounds(12, 27, 105, 18); panelRKit.add(lblPilihDe); JComboBox cmbDE = new JComboBox(); cmbDE.setModel(new <API key>(new String[] {"LXDE", "MATE", "GNOME", "KDE", "Manokwari"})); cmbDE.setBounds(110, 24, 89, 24); panelRKit.add(cmbDE); JLabel lblUbahSourcelist = new JLabel("2. Source.List"); lblUbahSourcelist.setBounds(12, 57, 105, 18); panelRKit.add(lblUbahSourcelist); JLabel lblPilihConsole = new JLabel("3. Console "); lblPilihConsole.setBounds(12, 87, 105, 18); panelRKit.add(lblPilihConsole); JLabel lblInstallDeb = new JLabel("4. Install DEB"); lblInstallDeb.setBounds(12, 117, 105, 18); panelRKit.add(lblInstallDeb); JLabel lblPaketList = new JLabel("5. Paket List "); lblPaketList.setBounds(217, 27, 105, 18); panelRKit.add(lblPaketList); JLabel lblSynaptic = new JLabel("6. Synaptic "); lblSynaptic.setBounds(217, 58, 105, 18); panelRKit.add(lblSynaptic); JLabel lblDesktop = new JLabel("7. Desktop"); lblDesktop.setBounds(217, 88, 105, 18); panelRKit.add(lblDesktop); JLabel lblUbiquity = new JLabel("8. Ubiquity"); lblUbiquity.setBounds(217, 120, 105, 18); panelRKit.add(lblUbiquity); JButton btnSource = new JButton("Source.list"); btnSource.setEnabled(false); btnSource.setBounds(110, 54, 86, 24); panelRKit.add(btnSource); JButton btnConsole = new JButton("Console"); btnConsole.setEnabled(false); btnConsole.setBounds(110, 84, 86, 24); panelRKit.add(btnConsole); JButton btnDeb = new JButton("DEB"); btnDeb.setEnabled(false); btnDeb.setBounds(110, 114, 86, 24); panelRKit.add(btnDeb); JButton btnPaketList = new JButton("Paket list"); btnPaketList.setEnabled(false); btnPaketList.setBounds(309, 24, 86, 24); panelRKit.add(btnPaketList); JButton btnSynaptic = new JButton("Synaptic"); btnSynaptic.setEnabled(false); btnSynaptic.setBounds(309, 55, 86, 24); panelRKit.add(btnSynaptic); JButton btnDekstop = new JButton("Dekstop"); btnDekstop.setEnabled(false); btnDekstop.setBounds(309, 87, 86, 24); panelRKit.add(btnDekstop); JButton btnUbiquity = new JButton("Ubiquity"); btnUbiquity.setEnabled(false); btnUbiquity.setBounds(309, 117, 86, 24); panelRKit.add(btnUbiquity); JButton btnAbout = new JButton("Tentang"); btnAbout.setBounds(299, 280, 86, 31); contentPane.add(btnAbout); JButton btnCredits = new JButton("Kredits"); btnCredits.setBounds(389, 280, 86, 31); contentPane.add(btnCredits); JButton btnLisensi = new JButton("Lisensi"); btnLisensi.setBounds(481, 280, 86, 31); contentPane.add(btnLisensi); JLabel lblIcon1 = new JLabel(""); lblIcon1.setIcon(new ImageIcon("/home/newbieilmu/workspace/app.remasterkit/src/icon/<API key>.png")); lblIcon1.setBounds(12, 12, 55, 67); contentPane.add(lblIcon1); JLabel lblicon2 = new JLabel(""); lblicon2.setIcon(new ImageIcon("/home/newbieilmu/workspace/app.remasterkit/src/icon/1374533644_Import.png")); lblicon2.setBounds(12, 72, 55, 67); contentPane.add(lblicon2); JLabel lblicon3 = new JLabel(""); lblicon3.setIcon(new ImageIcon("/home/newbieilmu/workspace/app.remasterkit/src/icon/1374533631_Export.png")); lblicon3.setBounds(12, 137, 55, 67); contentPane.add(lblicon3); JLabel lblicon4 = new JLabel(""); lblicon4.setIcon(new ImageIcon("/home/newbieilmu/workspace/app.remasterkit/src/icon/1374534090_118.png")); lblicon4.setBounds(12, 202, 55, 67); contentPane.add(lblicon4); JLabel lblKonfigurasi = new JLabel("Konfigurasi"); lblKonfigurasi.setFont(new Font("Dialog", Font.BOLD, 13)); lblKonfigurasi.setBounds(67, 35, 86, 18); contentPane.add(lblKonfigurasi); JLabel lblImport = new JLabel("Import"); lblImport.setFont(new Font("Dialog", Font.BOLD, 13)); lblImport.setBounds(67, 91, 86, 18); contentPane.add(lblImport); JLabel lblEksport = new JLabel("Eksport"); lblEksport.setFont(new Font("Dialog", Font.BOLD, 13)); lblEksport.setBounds(67, 151, 86, 18); contentPane.add(lblEksport); JLabel lblBuild = new JLabel("Build"); lblBuild.setFont(new Font("Dialog", Font.BOLD, 13)); lblBuild.setBounds(67, 216, 86, 18); contentPane.add(lblBuild); JPanel panelSetting = new JPanel(); panelSetting.setBorder(new TitledBorder(null, "Setting ", TitledBorder.LEADING, TitledBorder.TOP, null, null)); panelSetting.setBounds(146, 181, 421, 88); contentPane.add(panelSetting); panelSetting.setLayout(null); JLabel lblNamaLinuxmu = new JLabel("Nama Linuxmu :"); lblNamaLinuxmu.setBounds(12, 24, 92, 18); panelSetting.add(lblNamaLinuxmu); txtName = new JTextField(); txtName.setColumns(10); txtName.setBounds(122, 22, 179, 22); panelSetting.add(txtName); JLabel lblUrl = new JLabel("URL :"); lblUrl.setBounds(12, 54, 92, 18); panelSetting.add(lblUrl); txtURL = new JTextField(); txtURL.setColumns(10); txtURL.setBounds(122, 52, 179, 22); panelSetting.add(txtURL); JButton btnDonasi = new JButton("Donasi"); btnDonasi.setBounds(207, 280, 86, 31); contentPane.add(btnDonasi); } }
#include <signal.h> #include <stdio.h> #include <stdlib.h> #include <sys/wait.h> #include <unistd.h> #include "posixtest.h" void handler(int signo) { } int main() { struct sigaction act; act.sa_handler = handler; act.sa_flags = 0; sigemptyset(&act.sa_mask); sigaddset(&act.sa_mask, SIGSTOP); if (sigaction(SIGSEGV, &act, 0) == -1) { printf("Test FAILED\n"); return PTS_FAIL; } printf("Test PASSED\n"); return PTS_PASS; }
#!/usr/bin/env python # -*- coding: utf-8 -*- import requests from <API key> import USERNAME, PASSWORD, OMERO_WEB_HOST, \ SERVER_NAME session = requests.Session() # Start by getting supported versions from the base url... api_url = '%s/api/' % OMERO_WEB_HOST print "Starting at:", api_url r = session.get(api_url) # we get a list of versions versions = r.json()['data'] # use most recent version... version = versions[-1] # get the 'base' url base_url = version['url:base'] r = session.get(base_url) # which lists a bunch of urls as starting points urls = r.json() servers_url = urls['url:servers'] login_url = urls['url:login'] projects_url = urls['url:projects'] save_url = urls['url:save'] schema_url = urls['url:schema'] # To login we need to get CSRF token token_url = urls['url:token'] token = session.get(token_url).json()['data'] print 'CSRF token', token # We add this to our session header # Needed for all POST, PUT, DELETE requests session.headers.update({'X-CSRFToken': token, 'Referer': login_url}) # List the servers available to connect to servers = session.get(servers_url).json()['data'] print 'Servers:' for s in servers: print '-id:', s['id'] print ' name:', s['server'] print ' host:', s['host'] print ' port:', s['port'] # find one called SERVER_NAME servers = [s for s in servers if s['server'] == SERVER_NAME] if len(servers) < 1: raise Exception("Found no server called '%s'" % SERVER_NAME) server = servers[0] # Login with username, password and token payload = {'username': USERNAME, 'password': PASSWORD, # 'csrfmiddlewaretoken': token, # Using CSRFToken in header instead 'server': server['id']} r = session.post(login_url, data=payload) login_rsp = r.json() assert r.status_code == 200 assert login_rsp['success'] eventContext = login_rsp['eventContext'] print 'eventContext', eventContext # Can get our 'default' group groupId = eventContext['groupId'] # With successful login, request.session will contain # OMERO session details and reconnect to OMERO on # each subsequent call... # List projects: # Limit number of projects per page payload = {'limit': 2} data = session.get(projects_url, params=payload).json() assert len(data['data']) < 3 print "Projects:" for p in data['data']: print ' ', p['@id'], p['Name'] # Create a project: projType = schema_url + '#Project' # Need to specify target group url = save_url + '?group=' + str(groupId) r = session.post(url, json={'Name': 'API TEST foo', '@type': projType}) assert r.status_code == 201 project = r.json()['data'] project_id = project['@id'] print 'Created Project:', project_id, project['Name'] # Get project by ID project_url = projects_url + str(project_id) + '/' r = session.get(project_url) project = r.json() print project # Update a project project['Name'] = 'API test updated' r = session.put(save_url, json=project) # Delete a project: r = session.delete(project_url)
CREATE FUNCTION [dbo].[<API key>] ( @fd DATETIME, @td DATETIME, @campusid INT, @pledges BIT, @nontaxded BIT, @includeUnclosed BIT, @tagid INT, @fundids VARCHAR(MAX) ) RETURNS TABLE AS RETURN ( SELECT p.FamilyId, p.PeopleId, c.ContributionDate AS Date, CASE WHEN fa.HeadOfHouseholdId = sp.PeopleId AND ISNULL(sp.<API key>, CASE WHEN sp.MaritalStatusId = 20 THEN 2 ELSE 1 END) = 2 AND ISNULL(p.<API key>, CASE WHEN p.MaritalStatusId = 20 THEN 2 ELSE 1 END) = 2 THEN sp.PeopleId ELSE c.PeopleId END AS CreditGiverId, CASE WHEN ISNULL(sp.<API key>, CASE WHEN sp.MaritalStatusId = 20 THEN 2 ELSE 1 END) = 1 OR ISNULL(p.<API key>, CASE WHEN p.MaritalStatusId = 20 THEN 2 ELSE 1 END) = 1 THEN NULL WHEN fa.HeadOfHouseholdId = sp.PeopleId THEN c.PeopleId ELSE sp.PeopleId END AS CreditGiverId2, CASE WHEN fa.HeadOfHouseholdId = sp.PeopleId THEN p.PeopleId ELSE sp.PeopleId END AS SpouseId, CASE WHEN fa.HeadOfHouseholdId = sp.PeopleId THEN sp.Name2 ELSE p.Name2 END AS HeadName, CASE WHEN fa.HeadOfHouseholdId = sp.PeopleId THEN p.Name2 ELSE sp.Name2 END AS SpouseName, CASE WHEN ContributionTypeId <> 8 THEN ContributionAmount ELSE 0 END AS Amount, CASE WHEN ContributionTypeId = 8 THEN ContributionAmount ELSE 0 END AS PledgeAmount, h.BundleHeaderId, c.ContributionDesc, c.CheckNo, c.FundId, f.FundName, CASE WHEN f.FundPledgeFlag = 1 AND f.FundStatusId = 1 THEN 1 ELSE 0 END AS OpenPledgeFund, bht.Description AS BundleType, bst.Description AS BundleStatus, c.ContributionId from dbo.ContributionSearch(null, null, null, null, @fd, @td, @campusid, null, null, 0, case when @nontaxded = 1 then 'NonTaxDed' when @nontaxded = 0 then 'TaxDed' else 'Both' end, null, null, null, @includeUnclosed, null, null, @tagid, @fundids) cs join dbo.Contribution c on c.ContributionId = cs.ContributionId JOIN dbo.ContributionFund f ON c.FundId = f.FundId LEFT JOIN dbo.BundleDetail d ON c.ContributionId = d.ContributionId LEFT JOIN dbo.BundleHeader h ON d.BundleHeaderId = h.BundleHeaderId LEFT JOIN lookup.BundleHeaderTypes bht ON h.BundleHeaderTypeId = bht.Id LEFT JOIN lookup.BundleStatusTypes bst ON h.BundleStatusId = bst.Id LEFT JOIN dbo.People p ON c.PeopleId = p.PeopleId LEFT JOIN dbo.Families fa ON p.FamilyId = fa.FamilyId LEFT JOIN dbo.People sp ON sp.PeopleId = p.SpouseId WHERE c.ContributionTypeId <> 8 -- NO PLEDGES ) GO IF @@ERROR <> 0 SET NOEXEC ON GO
package com.algebraweb.editor.client; import com.google.gwt.user.client.ui.Button; /** * A button for the control panel. Will be styled accordingly. * * @author Patrick Brosi * */ public class ControlPanelButton extends Button { public ControlPanelButton(String desc) { super(); this.addStyleName("<API key>"); super.getElement().setAttribute("title", desc); this.setWidth("39px"); this.setHeight("39px"); } public ControlPanelButton(String desc, String styleClass) { this(desc); this.addStyleName("controllbutton-" + styleClass); } }
<?php interface AccesoDAO{ /** * Get Domain object by primry key * * @param String $id primary key * @Return Acceso */ public function load($id); /** * Get all records from table */ public function queryAll(); /** * Get all records from table ordered by field * @Param $orderColumn column name */ public function queryAllOrderBy($orderColumn); /** * Delete record from table * @param acceso primary key */ public function delete($usuario); /** * Insert record to table * * @param Acceso acceso */ public function insert($acceso); /** * Update record in table * * @param Acceso acceso */ public function update($acceso); /** * Delete all rows */ public function clean(); public function queryByContrasenia($value); public function queryByRol($value); public function deleteByContrasenia($value); public function deleteByRol($value); } ?>
#python imports import sys import os import time import datetime import subprocess import json import requests from termcolor import colored #third-party imports #No third-party imports #programmer generated imports from logger import logger from fileio import fileio def POE(POE): if (POE.logging == True): LOG = logger() newlogentry = '' reputation_dump = '' <API key> = '' malwarebazaar = '' if (POE.logging == True): newlogentry = 'Module: <API key>' LOG.WriteStrongLog(POE.logdir, POE.targetfilename, newlogentry) if (POE.SHA256 == ''): print (colored('\r\n[x] Unable to execute Malware Bazaar Search - hash value must be SHA256.', 'red', attrs=['bold'])) newlogentry = 'Unable to execute Malware Bazaar Search - hash value must be SHA256' LOG.WriteStrongSubLog(POE.logdir, POE.targetfilename, newlogentry) return -1 global json query_status = '' first_seen = '' last_seen = '' signature = '' sig_count = 0 output = POE.logdir + 'MalwareBazaarSearch.json' FI = fileio() print (colored('\r\n[*] Running abuse.ch Malware Bazaar Search against: ' + POE.target, 'white', attrs=['bold'])) malwarebazaar = "https://mb-api.abuse.ch/api/v1/" #API URL data = { #Our header params 'query': 'get_info', 'hash': POE.SHA256, } response_dump = requests.post(malwarebazaar, data=data, timeout=15) # Give us the results as JSON if (POE.debug == True): print (response_dump) try: FI.WriteLogFile(output, response_dump.content.decode("utf-8", "ignore")) print (colored('[*] Malware Bazaar data had been written to file here: ', 'green') + colored(output, 'blue', attrs=['bold'])) if ((POE.logging == True) and (POE.nolinksummary == False)): newlogentry = 'Malware Bazaar data has been generated to file here: <a href=\"' + output + '\"> Malware Bazaar Host Output </a>' LOG.WriteSubLog(POE.logdir, POE.targetfilename, newlogentry) except: print (colored('[x] Unable to write Malware Bazaar data to file', 'red', attrs=['bold'])) if (POE.logging == True): newlogentry = 'Unable to write Malware Bazaar data to file' LOG.WriteStrongSubLog(POE.logdir, POE.targetfilename, newlogentry) POE.csv_line += 'N/A,' return -1 try: #Open the file we just downloaded print ('[-] Reading Malware Bazaar file: ' + output.strip()) with open(output.strip(), 'rb') as read_file: data = json.load(read_file, cls=None) read_file.close() # Check what kind of results we have query_status = data["query_status"] print ('[*] query_status: ' + query_status) if (query_status == 'ok'): with open(output.strip(), 'r') as read_file: for string in read_file: if (POE.debug == True): print ('[DEBUG] string: ' + string.strip()) if ('first_seen' in string): first_seen = string.strip() if ('last_seen' in string): last_seen = string.strip() if (('signature' in string) and (sig_count == 0)): signature = string.strip() sig_count += 1 print ('[*] Sample ' + first_seen.replace(',','')) print ('[*] Sample ' + last_seen.replace(',','')) print ('[*] Sample ' + signature.replace(',','')) if (POE.logging == True): newlogentry = 'Sample ' + first_seen.replace(',','') LOG.WriteSubLog(POE.logdir, POE.targetfilename, newlogentry) newlogentry = 'Sample ' + last_seen.replace(',','') LOG.WriteSubLog(POE.logdir, POE.targetfilename, newlogentry) newlogentry = 'Sample ' + signature.replace(',','') LOG.WriteSubLog(POE.logdir, POE.targetfilename, newlogentry) #Can't find anything on this one... elif (query_status == 'hash_not_found'): print (colored('[-] The hash value has not been found...', 'yellow', attrs=['bold'])) if (POE.logging == True): newlogentry = 'No results available for host...' LOG.WriteSubLog(POE.logdir, POE.targetfilename, newlogentry) #Can't find anything on this one... elif (query_status == 'no_results'): print (colored('[-] No results available for host...', 'yellow', attrs=['bold'])) if (POE.logging == True): newlogentry = 'No results available for host...' LOG.WriteSubLog(POE.logdir, POE.targetfilename, newlogentry) #Something weird happened... else: print (colored('[x] An error has occurred...', 'red', attrs=['bold'])) if (POE.logging == True): newlogentry = 'An error has occurred...' LOG.WriteSubLog(POE.logdir, POE.targetfilename, newlogentry) except Exception as e: print (colored('[x] Error: ' + str(e) + ' Terminating...', 'red', attrs=['bold'])) read_file.close() return -1 #Clean up before returning read_file.close() return 0
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <style> * { margin: 0; padding: 0; } body { font-size: 12px; line-height: 1.7; } li { list-style: none; } #content { width: 800px; margin: 0 auto; padding: 20px; } #content h1 { color: #0088bb; } #content .item { padding: 20px; margin-bottom: 20px; border: 1px dotted #0088bb; } #content .item h2 { font-size: 16px; font-weight: bold; border-bottom: 2px solid #0088bb; margin-bottom: 10px; } #content .item li { display: inline; margin-right: 10px; } #content .item li a img { width: 230px; height: 230px; border: none; } #menu { position: fixed; top: 100px; left: 50%; margin-left: 400px; width: 50px; } #menu ul li a { display: block; margin: 5px 0; font-size: 14px; font-weight: bold; color: #333; width: 80px; height: 50px; line-height: 50px; text-decoration: none; text-align: center; } #menu ul li a:hover, #menu ul li a.current { color: #fff; background: #0088bb; } </style> </head> <body> <div id="menu"> <ul> <li><a href="#item1" class="current">1F </a></li> <li><a href="#item2">2F </a></li> <li><a href="#item3">3F </a></li> <li><a href="#item4">4F </a></li> <li><a href="#item5">5F </a></li> </ul> </div> <div id="content"> <h1></h1> <div id="item1" class="item"> <h2>1F </h2> <ul> <li><a href="#"><img src="1F.jpg" alt=""/></a></li> <li><a href="#"><img src="1F.jpg" alt=""/></a></li> <li><a href="#"><img src="1F.jpg" alt=""/></a></li> <li><a href="#"><img src="1F.jpg" alt=""/></a></li> <li><a href="#"><img src="1F.jpg" alt=""/></a></li> <li><a href="#"><img src="1F.jpg" alt=""/></a></li> <li><a href="#"><img src="1F.jpg" alt=""/></a></li> <li><a href="#"><img src="1F.jpg" alt=""/></a></li> <li><a href="#"><img src="1F.jpg" alt=""/></a></li> </ul> </div> <div id="item2" class="item"> <h2>2F </h2> <ul> <li><a href="#"><img src="2F.jpg" alt=""/></a></li> <li><a href="#"><img src="2F.jpg" alt=""/></a></li> <li><a href="#"><img src="2F.jpg" alt=""/></a></li> <li><a href="#"><img src="2F.jpg" alt=""/></a></li> <li><a href="#"><img src="2F.jpg" alt=""/></a></li> <li><a href="#"><img src="2F.jpg" alt=""/></a></li> <li><a href="#"><img src="2F.jpg" alt=""/></a></li> <li><a href="#"><img src="2F.jpg" alt=""/></a></li> <li><a href="#"><img src="2F.jpg" alt=""/></a></li> </ul> </div> <div id="item3" class="item"> <h2>3F </h2> <ul> <li><a href="#"><img src="3F.jpg" alt=""/></a></li> <li><a href="#"><img src="3F.jpg" alt=""/></a></li> <li><a href="#"><img src="3F.jpg" alt=""/></a></li> <li><a href="#"><img src="3F.jpg" alt=""/></a></li> <li><a href="#"><img src="3F.jpg" alt=""/></a></li> <li><a href="#"><img src="3F.jpg" alt=""/></a></li> <li><a href="#"><img src="3F.jpg" alt=""/></a></li> <li><a href="#"><img src="3F.jpg" alt=""/></a></li> <li><a href="#"><img src="3F.jpg" alt=""/></a></li> </ul> </div> <div id="item4" class="item"> <h2>4F </h2> <ul> <li><a href="#"><img src="4F.png" alt=""/></a></li> <li><a href="#"><img src="4F.png" alt=""/></a></li> <li><a href="#"><img src="4F.png" alt=""/></a></li> <li><a href="#"><img src="4F.png" alt=""/></a></li> <li><a href="#"><img src="4F.png" alt=""/></a></li> <li><a href="#"><img src="4F.png" alt=""/></a></li> <li><a href="#"><img src="4F.png" alt=""/></a></li> <li><a href="#"><img src="4F.png" alt=""/></a></li> <li><a href="#"><img src="4F.png" alt=""/></a></li> </ul> </div> <div id="item5" class="item"> <h2>5F </h2> <ul> <li><a href="#"><img src="5F.jpg" alt=""/></a></li> <li><a href="#"><img src="5F.jpg" alt=""/></a></li> <li><a href="#"><img src="5F.jpg" alt=""/></a></li> <li><a href="#"><img src="5F.jpg" alt=""/></a></li> <li><a href="#"><img src="5F.jpg" alt=""/></a></li> <li><a href="#"><img src="5F.jpg" alt=""/></a></li> <li><a href="#"><img src="5F.jpg" alt=""/></a></li> <li><a href="#"><img src="5F.jpg" alt=""/></a></li> <li><a href="#"><img src="5F.jpg" alt=""/></a></li> </ul> </div> </div> </body> </html>
// QueenMaxima, a chess playing program. // This program is free software; you can redistribute it and/or // as published by the Free Software Foundation; either version 2 // This program is distributed in the hope that it will be useful, // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include <string.h> #include <stdio.h> #include "hashcodes.h" #include "legality.h" #include "fast.h" #include "attack.h" bool _fast_moveokw (TFastNode* node, int move) // returns "move would be generated" { int ssq = SOURCESQ (move); int piece = PIECE (move); if ((!piece) || node -> matrix [ssq] != piece) { return false; } int tsq = TARGETSQ (move); if (! (move & _LL(4294934528))) { //a normal noncapture if (node->matrix[tsq]) { return false; } if (piece==PAWN) { return !node->matrix [ssq+8]; } return t.pieceattacks [piece] [ssq] [tsq] && (piece == KNIGHT || piece == KING || nooccs(node,ssq,tsq)); } else if (!SPECIAL(move)) { //a normal capture if (node->matrix [tsq] != CAPTURED (move) + KING) { return false; } return t.pieceattacks [piece][ssq][tsq] && (piece == PAWN || piece==KNIGHT || piece==KING || nooccs(node,ssq,tsq)); } else switch (SPECIALCASE (move)) { case _SHORT_CASTLE: return _SCW (node) && node -> matrix [g1] == 0 && node -> matrix [f1] == 0; case _LONG_CASTLE: return _LCW (node) && node -> matrix [b1] == 0 && node -> matrix [c1] == 0 && node -> matrix [d1] == 0; case _EN_PASSANT: return _EPSQ (node) == tsq && node -> matrix [ssq] == PAWN; default: // promotion if (_CAPTURE (move)) { return node -> matrix [ssq] == PAWN && node -> matrix [tsq] == CAPTURED (move)+KING; } else { return node -> matrix [ssq] == PAWN && node -> matrix [tsq] == 0; } } BOOST_ASSERT (false); return false; } bool _fast_moveokb(TFastNode* node, int move) { // returns "move would be generated" int ssq = SOURCESQ (move), piece = PIECE(move); if (!piece || node -> matrix [ssq] != piece+KING) { return false; } int tsq = TARGETSQ(move); if (! (move & _LL(4294934528))) { //not a special move or a capture if (node->matrix[tsq]) { return false; } if (piece==PAWN) { return !node->matrix[ssq-8]; } return (t.pieceattacks [piece] [tsq] [ssq] && (piece == KNIGHT || piece == KING || nooccs (node, ssq, tsq))); } else if (!SPECIAL (move)) { //a normal capture if (node->matrix [tsq] != CAPTURED (move)) { return false; } return t.pieceattacks [piece][tsq][ssq] && (piece == PAWN || piece==KNIGHT || piece==KING || nooccs (node, ssq, tsq)); } else switch (SPECIALCASE (move)) { case _SHORT_CASTLE: return _SCB (node) && (node -> matrix [g8] == 0) && (node -> matrix [f8] == 0); case _LONG_CASTLE: return _LCB (node) && (node -> matrix [b8] == 0) && (node -> matrix [c8] == 0) && (node -> matrix [d8] == 0); case _EN_PASSANT: return (_EPSQ (node) == tsq) && (node -> matrix [ssq] == BPAWN); default: // promotion if (_CAPTURE (move)) { return (node -> matrix [ssq] == BPAWN) && (node -> matrix [tsq] == CAPTURED (move)); } else { return (node -> matrix [ssq] == BPAWN) && (node -> matrix [tsq] == 0); } } BOOST_ASSERT (false); return false; } bool <API key> (TFastNode* node, int move) { bool result; int flags = node -> flags, fifty = node -> fifty; if (move == ENCODESCB) { return ! attacked_by_PNBRQK (node, e8) && ! attacked_by_PNBRQK (node, f8) && ! attacked_by_PNBRQK (node, g8); } if (move == ENCODELCB) { return ! attacked_by_PNBRQK (node, e8) && ! attacked_by_PNBRQK (node, d8) && ! attacked_by_PNBRQK (node, c8); } _fast_dobmove (node, move); result = ! attacked_by_PNBRQK (node, node -> bkpos); _fast_undobmove (node, move, flags, fifty); return result; } bool <API key> (TFastNode* node, int move) { bool result; int flags = node -> flags, fifty = node -> fifty; if (move == ENCODESCW) { return ! attacked_by_pnbrqk (node, e1) && ! attacked_by_pnbrqk (node, f1) && ! attacked_by_pnbrqk (node, g1); } if (move == ENCODELCW) { return ! attacked_by_pnbrqk (node, e1) && ! attacked_by_pnbrqk (node, d1) && ! attacked_by_pnbrqk (node, c1); } _fast_dowmove (node, move); result = ! attacked_by_pnbrqk (node, node -> wkpos); _fast_undowmove (node, move, flags, fifty); return result; } bool legal_move (TFastNode* node, int move) { if (node -> flags & _WTM) { return legal_move_w(node, move); } else { return legal_move_b(node, move); } } bool legal_move_w (TFastNode* node, int move) { int sq = SOURCESQ (move), offset_ssq_wk, offset_ssq_tsq, piece = PIECE (move); if (piece < KING) { // voor promoties, en_passant en normale zetten geldt: offset_ssq_wk = t.direction [sq] [node->wkpos]; if (! offset_ssq_wk) { return true; // niet op een lijn met de koning. vaak knalt ie er hier meteen weer uit. } offset_ssq_tsq = t.direction [sq] [TARGETSQ (move)]; if (offset_ssq_wk == offset_ssq_tsq || offset_ssq_wk == - offset_ssq_tsq) { return true; // stuk blijft op dezelfde lijn } if (! SPECIAL (move) || SPECIALCASE (move) != _EN_PASSANT || (offset_ssq_wk != 1 && offset_ssq_wk != -1)) { // uitzonderingen met en_passant komen alleen voor als koning en pion op hor. lijn staan (toch?) // omdat er bij enpassant slaan twee stukken van de horizontale lijn verdwijnen. sq += offset_ssq_wk; while (sq != node -> wkpos) { if (node -> matrix [sq]) { return true; // niet gepind want er staat een stuk (w/z) tussen } sq += offset_ssq_wk; } sq = t.sqonline [node -> wkpos] [SOURCESQ (move)]; while (sq != node -> wkpos) { BOOST_ASSERT (sq >= 0 && sq <= 63); piece = node -> matrix [sq]; if (piece) { return piece < BBISHOP || ! t.pieceattacks [piece - KING] [sq] [node->wkpos]; } sq = t.sqonline [node -> wkpos] [sq]; } return true; } // en passant en koning, pion en geslagen pion op 1 horizontale lijn int csq = TARGETSQ (move) - 8; sq += offset_ssq_wk; while (sq != node->wkpos) { if (node -> matrix [sq] && (sq != csq)) { return true; // niet gepind want er staat een stuk (w/z) tussen } sq += offset_ssq_wk; } sq = t.sqonline [node -> wkpos] [SOURCESQ (move)]; while (sq != node -> wkpos) { BOOST_ASSERT (sq >= 0 && sq <= 63); piece = node -> matrix [sq]; if (piece && (sq != csq)) { return piece < BROOK || ! t.pieceattacks [piece - KING] [sq] [node -> wkpos]; } sq = t.sqonline [node -> wkpos] [sq]; } return true; } // de koning zet if (attacked_by_pnbrqk (node, TARGETSQ (move))) { return false; } if (! SPECIAL (move)) { return true; } if (attacked_by_pnbrqk (node, e1)) { return false; } if (move == ENCODESCW) { return ! attacked_by_pnbrqk (node, f1); } return ! attacked_by_pnbrqk (node, d1); } bool legal_move_b (TFastNode* node, int move) { int sq = SOURCESQ (move), offset_ssq_bk, offset_ssq_tsq, piece = PIECE (move); if (piece < KING) { // voor promoties, en_passant en normale zetten geldt: offset_ssq_bk = t.direction [sq] [node->bkpos]; if (! offset_ssq_bk) { return true; // niet op een lijn met de koning. vaak knalt ie er hier meteen weer uit. } offset_ssq_tsq = t.direction [sq] [TARGETSQ (move)]; if (offset_ssq_bk == offset_ssq_tsq || offset_ssq_bk == - offset_ssq_tsq) { return true; // stuk blijft op dezelfde lijn } sq += offset_ssq_bk; if (! SPECIAL (move) || SPECIALCASE (move) != _EN_PASSANT || (offset_ssq_bk != 1 && offset_ssq_bk != -1)) { // uitzonderingen met en_passant komen alleen voor als koning en pion op hor. lijn staan (toch?) // omdat er bij enpassant slaan twee stukken van de horizontale lijn verdwijnen. while (sq != node -> bkpos) { if (node -> matrix [sq]) { return true; // niet gepind want er staat een stuk (w/z) tussen } sq += offset_ssq_bk; } sq = t.sqonline [node -> bkpos] [SOURCESQ (move)]; while (sq != node -> bkpos) { BOOST_ASSERT (sq >= 0 && sq <= 63); piece = node -> matrix [sq]; if (piece) { return piece > QUEEN || piece < BISHOP || ! t.pieceattacks [piece] [sq] [node->bkpos]; } sq = t.sqonline [node -> bkpos] [sq]; } return true; } // en passant en koning, pion en geslagen pion op 1 horizontale lijn int csq = TARGETSQ (move) + 8; while (sq != node -> bkpos) { if (node -> matrix [sq] && sq != csq) { return true; // niet gepind want er staat een stuk (w/z) tussen } sq += offset_ssq_bk; } sq = t.sqonline [node -> bkpos] [ SOURCESQ (move)]; while (sq != node -> bkpos) { BOOST_ASSERT (sq >= 0 && sq <= 63); piece = node -> matrix [sq]; if (piece && sq != csq) { return piece > QUEEN || piece < ROOK || ! t.pieceattacks [piece] [sq] [node -> bkpos]; } sq = t.sqonline [node -> bkpos] [sq]; } return true; } // de koning zet if (attacked_by_PNBRQK (node, TARGETSQ (move))) { return false; } if (! SPECIAL (move)) { return true; } if (attacked_by_PNBRQK (node, e8)) { return false; } if (move == ENCODESCB) { return ! attacked_by_PNBRQK (node, f8); } return ! attacked_by_PNBRQK (node, d8); } int _fast_inspectnode (TFastNode* node) { _int64 hashcode = 0, pawncode = 0; int i; if ((bool)((node -> hashcode & 1) > 0) != (bool)((node -> flags & _WTM) >0)) { return 500; } if (node->wpawns > 8 || node->wpawns < 0) { return 1; } if (node->wknights + node->wpawns > 10 || node->wknights < 0) { return 2; } if (node->wbishops + node->wpawns > 10 || node->wbishops < 0) { return 3; } if (node->wrooks + node->wpawns > 10 || node->wrooks < 0) { return 4; } if (node->wqueens + node->wpawns > 10 || node->wqueens < 0) { return 5; } if (node->wkpos < 0 || node->wkpos > 63) { return 6; } if (node->bpawns > 8 || node->bpawns < 0) { return 11; } if (node->bknights + node->bpawns > 10 || node->bknights < 0) { return 12; } if (node->bbishops + node->bpawns > 10 || node->bbishops < 0) { return 13; } if (node->brooks + node->bpawns > 10 || node->brooks < 0) { return 14; } if (node->bqueens + node->bpawns > 10 || node->bqueens < 0) { return 15; } if (node->bkpos < 0 || node->bkpos > 63) { return 16; } int sq; char matrix[64]; memset (matrix, 0, sizeof (matrix)); for (i = 0; i < node->wpawns; i++) { sq = node->wpawnlist [i]; hashcode ^= hashnumbers [PAWN - 1] [sq]; pawncode ^= hashnumbers [PAWN - 1] [sq]; if (node->index [sq] != i) { std::cout << boost::format("node->index[%d] = %d ; i = %d\n") % sq % node->index[sq] % i; return 21; } matrix [sq] = PAWN; if (node->matrix [sq] != PAWN) { return 41; } } for (i = 0; i < node->wknights; i++) { sq = node->wknightlist [i]; hashcode ^= hashnumbers [KNIGHT - 1] [sq]; if (node->index [sq] != i) { return 22; } matrix [sq] = KNIGHT; if (node->matrix [sq] != KNIGHT) { return 42; } } for (i = 0; i < node->wbishops; i++) { sq = node->wbishoplist [i]; hashcode ^= hashnumbers [BISHOP - 1] [sq]; if (node->index [sq] != i) { return 23; } matrix [sq] = BISHOP; if (node->matrix [sq] != BISHOP) { return 43; } } for (i = 0; i < node->wrooks; i++) { sq = node->wrooklist [i]; hashcode ^= hashnumbers [ROOK - 1] [sq]; if (node->index [sq] != i) { return 24; } matrix [sq] = ROOK; if (node->matrix [sq] != ROOK) { return 44; } } for (i = 0; i < node->wqueens; i++) { sq = node->wqueenlist [i]; hashcode ^= hashnumbers [QUEEN - 1] [sq]; if (node->index [sq] != i) { return 25; } matrix [sq] = QUEEN; if (node->matrix [sq] != QUEEN) { return 45; } } matrix [node->wkpos] = KING; hashcode ^= hashnumbers [KING - 1] [node -> wkpos]; if (node->matrix [node->wkpos] != KING) { return 46; } for (i = 0; i < node->bpawns; i++) { sq = node->bpawnlist [i]; hashcode ^= hashnumbers [BPAWN - 1] [sq]; pawncode ^= hashnumbers [BPAWN - 1] [sq]; if (node->index [sq] != i) { return 31; } matrix [sq] = BPAWN; if (node->matrix [sq] != BPAWN) { return 51; } } for (i = 0; i < node->bknights; i++) { sq = node->bknightlist [i]; hashcode ^= hashnumbers [BKNIGHT - 1] [sq]; if (node->index [sq] != i) { return 32; } matrix [sq] = BKNIGHT; if (node->matrix [sq] != BKNIGHT) { return 52; } } for (i = 0; i < node->bbishops; i++) { sq = node->bbishoplist [i]; hashcode ^= hashnumbers [BBISHOP - 1] [sq]; if (node->index [sq] != i) { return 33; } matrix [sq] = BBISHOP; if (node->matrix [sq] != BBISHOP) { return 53; } } for (i = 0; i < node->brooks; i++) { sq = node->brooklist [i]; hashcode ^= hashnumbers [BROOK - 1] [sq]; if (node->index [sq] != i) { return 34; } matrix [sq] = BROOK; if (node->matrix [sq] != BROOK) { return 54; } } for (i = 0; i < node->bqueens; i++) { sq = node->bqueenlist [i]; hashcode ^= hashnumbers [BQUEEN - 1] [sq]; if (node->index [sq] != i) { return 35; } matrix [sq] = BQUEEN; if (node->matrix [sq] != BQUEEN) { return 55; } } matrix [node->bkpos] = BKING; hashcode ^= hashnumbers [BKING - 1] [node -> bkpos]; if (node->matrix [node->bkpos] != BKING) { return 56; } if (memcmp (matrix, node->matrix, sizeof (matrix))) { return 100; } if (_SCW(node)) { hashcode ^= _LL(0x47bc71a493da706e); } if (_SCB(node)) { hashcode ^= _LL(0x6fed622e98f98b7e); } if (_LCW(node)) { hashcode ^= _LL(0x6338be439fd357dc); } if (_LCB(node)) { hashcode ^= _LL(0xce107ca2947d2d58); } if (_EPSQ(node)) { hashcode ^= ephash [_EPSQ (node)]; } if (node-> flags & _WTM) { hashcode |= 1; } else { hashcode &= _LL(0xFFFFFFFFFFFFFFFE); } if (hashcode != node -> hashcode) { std::cout << boost::format("hashcode = %Ld, node -> hashcode = %Ld\n") % hashcode % node -> hashcode; return 200; } if (pawncode != node -> pawncode) { std::cout << boost::format("pawncode = %Ld, node -> pawncode = %Ld\n") % pawncode % node -> pawncode; return 201; } // if (_result_value < -CHESS_INF || _result_value > CHESS_INF) { // return 300; return 0; }
<?php /* * Comments cell type. * Displays form and coments * */ if( !function_exists('<API key>') ) { function <API key>() { if ( function_exists('<API key>') ) { <API key> ( 'comments-cell', array ( 'name' => __('Comments', 'ddl-layouts'), 'description' => __('Display the comments section. This cell is typically used in layouts for blog posts and pages that need comments enable.', 'ddl-layouts'), 'category' => __('Site elements', 'ddl-layouts'), 'cell-image-url' => <API key>.'<API key>.svg', 'button-text' => __('Assign comments cell', 'ddl-layouts'), 'dialog-title-create' => __('Create a new comments cell', 'ddl-layouts'), 'dialog-title-edit' => __('Edit comments cell', 'ddl-layouts'), '<API key>' => '<API key>', '<API key>' => '<API key>', '<API key>' => '<API key>', 'has_settings' => true, 'cell-class' => '', 'preview-image-url' => <API key> . '<API key>.png', 'allow-multiple' => false, 'register-scripts' => array( array( '<API key>', WPDDL_GUI_RELPATH . 'editor/js/<API key>.js', array( 'jquery' ), WPDDL_VERSION, true ), ), 'translatable_fields' => array( 'title_one_comment' => array('title' => 'One comment text', 'type' => 'LINE'), '<API key>' => array('title' => 'Multiple comments text', 'type' => 'LINE'), 'ddl_prev_link_text' => array('title' => 'Older Comments text', 'type' => 'LINE'), 'ddl_next_link_text' => array('title' => 'Newer Comments text', 'type' => 'LINE'), '<API key>' => array('title' => 'Comments are closed text', 'type' => 'LINE'), 'reply_text' => array('title' => 'Reply text', 'type' => 'LINE'), 'password_text' => array('title' => 'Password protected post text', 'type' => 'LINE') ) ) ); add_action( '<API key>', '<API key>' ); add_action( '<API key>', '<API key>' ); } } add_action( 'init', '<API key>' ); function <API key>() { ob_start(); ?> <h3 class="ddl-section-title"> <?php _e('Comments list', 'ddl-layouts'); ?> </h3> <div class="ddl-form"> <p> <label for="<?php the_ddl_name_attr('avatar_size'); ?>"><?php _e( 'Avatar size', 'ddl-layouts' ) ?>:</label> <input type="number" value="24" placeholder="<?php _e( '32', 'ddl-layouts' ) ?>" name="<?php the_ddl_name_attr('avatar_size'); ?>" id="<?php the_ddl_name_attr('avatar_size'); ?>" class="ddl-narrow-width" onkeypress='return event.charCode >= 48 && event.charCode <= 57'> </p> </div> <h3 class="ddl-section-title"> <?php _e( 'Title for comments list', 'ddl-layouts' ) ?> </h3> <div class="ddl-form"> <p> <label for="<?php the_ddl_name_attr('title_one_comment'); ?>"><?php _e( 'For one comment', 'ddl-layouts' ) ?>:</label> <input type="text" name="<?php the_ddl_name_attr('title_one_comment'); ?>" id="<?php the_ddl_name_attr('title_one_comment'); ?>" value="<?php _e( 'One thought on %TITLE%', 'ddl-layouts' ) ?>"> <div id="<API key>"></div> </p> <p> <label for="<?php the_ddl_name_attr('<API key>'); ?>"><?php _e( 'For two or more', 'ddl-layouts' ) ?>:</label> <input type="text" name="<?php the_ddl_name_attr('<API key>'); ?>" id="<?php the_ddl_name_attr('<API key>'); ?>" value="<?php _e( '%COUNT% thoughts on %TITLE%', 'ddl-layouts' ) ?>"> <div id="<API key>"></div> <span class="desc"><?php _e( 'Use the %TITLE% placeholder to display the post title and the %COUNT% placeholder to display the number of comments.', 'ddl-layouts' ) ?></span> </p> </div> <h3 class="ddl-section-title"> <?php _e( 'Navigation and miscellaneous texts', 'ddl-layouts' ) ?> </h3> <div class="ddl-form"> <p> <label for="<?php the_ddl_name_attr('ddl_prev_link_text'); ?>"><?php _e( 'Previous link text', 'ddl-layouts' ) ?>:</label> <input type="text" name="<?php the_ddl_name_attr('ddl_prev_link_text'); ?>" id="<?php the_ddl_name_attr('ddl_prev_link_text'); ?>" value="<?php _e( '<< Older Comments', 'ddl-layouts' ) ?>"> </p> <p> <label for="<?php the_ddl_name_attr('ddl_next_link_text'); ?>"><?php _e( 'Next link text', 'ddl-layouts' ) ?>:</label> <input type="text" name="<?php the_ddl_name_attr('ddl_next_link_text'); ?>" id="<?php the_ddl_name_attr('ddl_next_link_text'); ?>" value="<?php _e( 'Newer Comments >>', 'ddl-layouts' ) ?>"> </p> <p> <label for="<?php the_ddl_name_attr('<API key>'); ?>"><?php _e( 'Comments closed text', 'ddl-layouts' ) ?>:</label> <input type="text" name="<?php the_ddl_name_attr('<API key>'); ?>" id="<?php the_ddl_name_attr('<API key>'); ?>" value="<?php _e( 'Comments are closed', 'ddl-layouts' ) ?>"> <div id="<API key>"></div> </p> <p> <label for="<?php the_ddl_name_attr('reply_text'); ?>"><?php _e( 'Reply text', 'ddl-layouts' ) ?>:</label> <input type="text" name="<?php the_ddl_name_attr('reply_text'); ?>" id="<?php the_ddl_name_attr('reply_text'); ?>" value="<?php _e( 'Reply', 'ddl-layouts' ) ?>"> <div id="reply_text_message"></div> </p> <p> <label for="<?php the_ddl_name_attr('password_text'); ?>"><?php _e( 'Password protected text', 'ddl-layouts' ) ?>:</label> <input type="text" name="<?php the_ddl_name_attr('password_text'); ?>" id="<?php the_ddl_name_attr('password_text'); ?>" value="<?php _e( 'This post is password protected. Enter the password to view any comments.', 'ddl-layouts' ) ?>"> <div id="<API key>"></div> </p> </div> <div class="ddl-form"> <div class="ddl-form-item"> <br /> <?php <API key>(WPDLL_COMMENTS_CELL, __('Learn about the Comments cell', 'ddl-layouts')); ?> </div> </div> <?php global $current_user; get_currentuserinfo(); ?> <?php return ob_get_clean(); } // Callback function for displaying the cell in the editor. function <API key>() { ob_start(); ?> <div class="cell-content"> <p class="cell-name">{{ name }} &ndash; <?php _e('Comment Cell', 'ddl-layouts'); ?></p> <div class="cell-preview"> <div class="<API key>"> <img src="<?php echo WPDDL_RES_RELPATH . '/images/cell-icons/comments.svg'; ?>" height="130px"> </div> </div> </div> <?php return ob_get_clean(); } //Hook for previous page link, add post id and prev page to link function <API key>(){ global $post; if ( !isset($post->ID)){ return; } $page = get_query_var('cpage'); if ( intval($page) <= 1 ){ return; } $prevpage = intval($page) - 1; return ' data-page="'.$prevpage.'" data-postid="'.$post->ID.'" '; } //Hook for next page link, add post id and next page to link function <API key>(){ global $post; if ( !isset($post->ID)){ return; } $page = get_query_var('cpage'); $nextpage = intval($page) + 1; return ' data-page="'.$nextpage.'" data-postid="'.$post->ID.'" '; } //Load page content, Ajax pagination. Most of code same, so we can do one function for this function <API key>(){ $nonce = $_POST["wpnonce"]; if (! wp_verify_nonce( $nonce, '<API key>' ) ) { echo 'Error'; } else { global $wpddlayout, $wp_query, $withcomments, $wpdb, $id, $post, $comment, $user_login, $user_ID, $user_identity, $overridden_cpage; if ( !isset($_POST['page']) && !isset($_POST['postid']) ){ echo 'Error'; } $load_page = $_POST['page']; // Current page to load $post_id = $_POST['postid']; $post = get_post($post_id); // Get post setup_postdata( $post ); // load global $post $comments = <API key>(); set_query_var('cpage' ,$load_page); //Set query page $overridden_cpage = true; $wp_query->query = array( 'page_id' => $post->ID, 'cpage' => $load_page); set_query_var( 'post_id', $post->ID); set_query_var( 'p', $post->ID); $wp_query->is_singular = 1; $layout_id = $_POST['layout_name']; $cell_id = $_POST['cell_id']; get_the_ddlayout($layout_id); global $wpddlayout; $wpddlayout-><API key>( $cell_id, $layout_id ); $post = get_post($post_id); // Get post setup_postdata( $post ); // load global $post } $comments_list = <API key>( $comments, $post, $load_page); echo $comments_list; die(); } // Callback function for display the cell in the front end. function <API key>() { global $wpddlayout, $wp_query, $withcomments, $post, $wpdb, $id, $comment, $user_login, $user_ID, $user_identity, $overridden_cpage; if ( !(is_single() || is_page() || $withcomments) || empty($post) ) return; $wpddlayout->enqueue_scripts('<API key>'); $wpddlayout->localize_script('<API key>', 'DDL_Comments_cell', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ), 'security' => wp_create_nonce( '<API key>' ), 'layout_name' => $wpddlayout-><API key>(), 'cell_id' => get_ddl_field('unique_id') )); $comments = <API key>(); $overridden_cpage = false; if ( '' == get_query_var('cpage') && get_option('page_comments') ) { set_query_var( 'cpage', 'newest' == get_option('<API key>') ? <API key>() : 1 ); $overridden_cpage = true; } $load_page = ''; if ( isset($_GET['cpage']) ){ $load_page = $_GET['cpage']; } $comments_list = <API key>( $comments, $post, $load_page); return $comments_list; } //Get comments array for current post function <API key>(){ global $wpddlayout, $wp_query, $withcomments, $post, $wpdb, $id, $comment, $user_login, $user_ID, $user_identity, $overridden_cpage; $commenter = <API key>(); $comment_author = $commenter['comment_author']; $<API key> = $commenter['<API key>']; $comment_author_url = esc_url($commenter['comment_author_url']); if ( $user_ID) { $comments = $wpdb->get_results($wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND (comment_approved = '1' OR ( user_id = %d AND comment_approved = '0' ) ) ORDER BY comment_date_gmt", $post->ID, $user_ID)); } else if ( empty($comment_author) ) { $comments = get_comments( array('post_id' => $post->ID, 'status' => 'approve', 'order' => 'ASC') ); } else { $comments = $wpdb->get_results($wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND ( comment_approved = '1' OR ( comment_author = %s AND <API key> = %s AND comment_approved = '0' ) ) ORDER BY comment_date_gmt", $post->ID, <API key>($comment_author,ENT_QUOTES), $<API key>)); } $wp_query->comments = apply_filters( 'comments_array', $comments, $post->ID ); $comments = &$wp_query->comments; $wp_query->comment_count = count($wp_query->comments); <API key>($wp_query->comments); return $comments; } //Generate comments listing function <API key>($comments, $post, $load_page=''){ ob_start(); ?> <div id="comments"> <?php if ( <API key>($post) ) : ?> <p class="nopassword"><?php the_ddl_field('password_text'); ?></p> </div><!-- #comments --> <?php return ob_get_clean(); endif; ?> <?php if ( comments_open() ): $num_comments = get_comments_number(); ?> <?php if ( $num_comments > 0 ): ?> <h2 id="comments-title"> <?php $one_comment_text = str_replace( array('%TITLE%', '%COUNT%'), array('%2$s','%1$s'), get_ddl_field('title_one_comment')); $two_comments_text = str_replace( array('%TITLE%', '%COUNT%'), array('%2$s','%1$s'), get_ddl_field('<API key>')); printf( _n( $one_comment_text, $two_comments_text, $num_comments ), number_format_i18n( $num_comments ), '<span>' . $post->post_title . '</span>' ); ?> </h2> <?php if ( <API key>($comments) > 1 && get_option( 'page_comments' ) ):?> <?php add_filter('<API key>','<API key>'); add_filter('<API key>','<API key>'); ?> <nav id="comment-nav-above"> <div class="nav-previous <API key>"><?php <API key>( get_ddl_field('ddl_prev_link_text') ); ?></div> <div class="nav-next js-ddl-next-link"><?php next_comments_link( get_ddl_field('ddl_next_link_text') ); ?></div> </nav> <?php endif; // check for comment navigation ?> <?php $comments_defaults = array(); //Set comments style $comments_defaults['style'] = apply_filters('<API key>', 'ul'); //Avatar Size if ( get_ddl_field('avatar_size') != '' ){ $comments_defaults['avatar_size'] = get_ddl_field('avatar_size'); } //Reply text if ( get_ddl_field('reply_text') != '' ){ $comments_defaults['reply_text'] = get_ddl_field('reply_text'); } if ( <API key>($comments) > 1 && get_option( 'page_comments' ) ): $comments_defaults['per_page'] = get_option('comments_per_page'); if ( empty($load_page) ){ if ('newest' == get_option('<API key>')){ $comments_defaults['page'] = <API key>($comments); }else{ $comments_defaults['page'] = 1; } }else{ //Current page $comments_defaults['page'] = $load_page; } endif; $<API key> = '<ul class="commentlist">'; $after_comments_list = '</ul>'; if ( $comments_defaults['style'] == 'ol' ){ $<API key> = '<ol class="commentlist">'; $after_comments_list = '</ol>'; } if ( $comments_defaults['style'] == 'div' ){ $<API key> = '<div class="commentlist">'; $after_comments_list = '</div>'; } echo '<div id="comments-listing">'; echo $<API key>; //Generate and print comments listing wp_list_comments( $comments_defaults, $comments ); echo $after_comments_list; echo '</div>'; ?> <?php endif;?> <?php // Generate comment form comment_form(); ?> <?php else:?> <p class="nocomments"><?php the_ddl_field('<API key>'); ?></p> <?php endif;?> </div> <?php return ob_get_clean(); } }
<? class CategoryID extends Handler { protected $REST_vars; protected $DBs; protected $User; // RUN // public function run() { switch ( $this->REST_vars["method"] ) { case "get": $this->get(); break; case "delete": case "put": case "post": default: throw new Error($GLOBALS["HTTP_STATUS"]["Bad Request"], get_class($this) . " Error: Request method not supported."); } } // GET // protected function get() { // Get category with given categoryID $select = " SELECT `id`, `name` FROM `Categories` WHERE `id` = ? "; $binds = ["i", $this->REST_vars["categoryID"]]; $res = $this->DBs->select($select, $binds); if ( is_null($res) ) { throw new Error($GLOBALS["HTTP_STATUS"]["Internal Error"], get_class($this) . " Error: Failed to retrieve request."); } $JSON = []; while ($row = $res->fetch_assoc()) { $obj = []; $obj["id"] = $row['id']; $obj["name"] = $row['name']; $JSON[] = $obj; } / $this->send( $JSON, $GLOBALS["HTTP_STATUS"]["OK"] ); } } ?>
<?php /** * Controllo se il file viene richiamato direttamente senza * essere incluso dalla procedura standard del plugin. * * @package SZGoogle */ if (!defined('SZ_PLUGIN_GOOGLE') or !SZ_PLUGIN_GOOGLE) die(); $HTML = <<<EOD <h2>Documentation</h2> <p>With this feature you can place on its website a widget that displays the recommendations related to the pages of your website based on social iterations. This feature will be displayed only on the mobile version of the web site and ignored on different devices. To enable this option, you must select the specific field that you find the admin panel but you also need to perform operations on google+ page connected to your site. <a target="_blank" href="https://developers.google.com/+/web/recommendations/?hl=it">Content recommendations for mobile websites</a>.</p> <h2>Configuration</h2> <p>In the settings section of the Google+ page you can control the behavior of the widget that relates to the advice and the display mode. So do not try to change these settings in the options but use the plugin configuration page directly on google plus.</p> <p><b>The following options are available from the settings page:</b></p> <ul> <li>Turn on or off recommendations.</li> <li>Choose pages or paths which should not show recommendations.</li> <li>Choose pages or paths to prevent from displaying in the recommendations bar.</li> </ul> <p><b>Choose when to show the recommendations bar:</b></p> <ul> <li>When the user scrolls up.</li> <li>When the user scrolls past an element with a specified ID.</li> <li>When the user scrolls past an element that matches a DOM query selector.</li> </ul> <h2>Warnings</h2> <p>The plugin <b>SZ-Google</b> has been developed with a technique of loading individual modules to optimize overall performance, so before you use a shortcode, a widget, or a PHP function you should check that the module general and the specific option appears enabled via the field dedicated option that you find in the admin panel.</p> EOD; /** * Richiamo della funzione per la creazione della pagina di * documentazione standard in base al contenuto della variabile HTML */ $this-><API key>(__('google+ recommendations','szgoogleadmin'),NULL,NULL,false,$HTML,basename(__FILE__));
/** * This header is generated by class-dump-z 0.2b. * * Source: /System/Library/PrivateFrameworks/iWorkImport.framework/iWorkImport */ #import <iWorkImport/GQDRStrokePattern.h> #import <iWorkImport/XXUnknownSuperclass.h> #import <iWorkImport/iWorkImport-Structs.h> __attribute__((visibility("hidden"))) @interface GQDRStrokePattern : XXUnknownSuperclass { @private int mType; // 4 = 0x4 } + (id)solidPattern; // 0xde35 - (int)type; // 0xde05 @end @interface GQDRStrokePattern (Private) - (int)<API key>:(xmlTextReader *)reader; // 0xde81 @end
#ifndef MANGOS_MAP_H #define MANGOS_MAP_H #include "Common.h" #include "Platform/Define.h" #include "Policies/ThreadingModel.h" #include "ace/RW_Thread_Mutex.h" #include "ace/Thread_Mutex.h" #include "DBCStructure.h" #include "GridDefines.h" #include "Cell.h" #include "Object.h" #include "Timer.h" #include "SharedDefines.h" #include "GridMap.h" #include "GameSystem/GridRefManager.h" #include "MapRefManager.h" #include "Utilities/TypeList.h" #include "ScriptMgr.h" #include "CreatureLinkingMgr.h" #include "vmap/DynamicTree.h" #include <bitset> #include <list> struct CreatureInfo; class Creature; class Unit; class WorldPacket; class InstanceData; class Group; class MapPersistentState; class <API key>; class <API key>; class <API key>; struct ScriptInfo; class BattleGround; class GridMap; class GameObjectModel; // GCC have alternative #pragma pack(N) syntax and old gcc version not support pack(push,N), also any gcc version not support it at some platform #if defined( __GNUC__ ) #pragma pack(1) #else #pragma pack(push,1) #endif struct InstanceTemplate { uint32 map; // instance map uint32 parent; // non-continent parent instance (for instance with entrance in another instances) // or 0 (not related to continent 0 map id) uint32 levelMin; uint32 levelMax; uint32 script_id; }; struct WorldTemplate { uint32 map; // non-instance map uint32 script_id; }; enum <API key> { <API key> = 70 }; #if defined( __GNUC__ ) #pragma pack() #else #pragma pack(pop) #endif #define MIN_UNLOAD_DELAY 1 // immediate unload class MANGOS_DLL_SPEC Map : public GridRefManager<NGridType> { friend class MapReference; friend class ObjectGridLoader; friend class ObjectWorldLoader; protected: Map(uint32 id, time_t, uint32 InstanceId, uint8 SpawnMode); public: virtual ~Map(); // currently unused for normal maps bool CanUnload(uint32 diff) { if (!m_unloadTimer) return false; if (m_unloadTimer <= diff) return true; m_unloadTimer -= diff; return false; } virtual bool Add(Player*); virtual void Remove(Player*, bool); template<class T> void Add(T*); template<class T> void Remove(T*, bool); static void DeleteFromWorld(Player* player); // player object will deleted at call virtual void Update(const uint32&); void MessageBroadcast(Player*, WorldPacket*, bool to_self); void MessageBroadcast(WorldObject*, WorldPacket*); void <API key>(Player*, WorldPacket*, float dist, bool to_self, bool own_team_only = false); void <API key>(WorldObject*, WorldPacket*, float dist); float <API key>() const { return m_VisibleDistance; } // function for setting up visibility distance for maps on per-type/per-Id basis virtual void <API key>(); void PlayerRelocation(Player*, float x, float y, float z, float angl); void CreatureRelocation(Creature* creature, float x, float y, float z, float orientation); template<class T, class CONTAINER> void Visit(const Cell& cell, <API key><T, CONTAINER>& visitor); bool IsRemovalGrid(float x, float y) const { GridPair p = MaNGOS::ComputeGridPair(x, y); return(!getNGrid(p.x_coord, p.y_coord) || getNGrid(p.x_coord, p.y_coord)->GetGridState() == GRID_STATE_REMOVAL); } bool IsLoaded(float x, float y) const { GridPair p = MaNGOS::ComputeGridPair(x, y); return loaded(p); } bool GetUnloadLock(const GridPair& p) const { return getNGrid(p.x_coord, p.y_coord)->getUnloadLock(); } void SetUnloadLock(const GridPair& p, bool on) { getNGrid(p.x_coord, p.y_coord)-><API key>(on); } void LoadGrid(const Cell& cell, bool no_unload = false); bool UnloadGrid(const uint32& x, const uint32& y, bool pForce); virtual void UnloadAll(bool pForce); void ResetGridExpiry(NGridType& grid, float factor = 1) const { grid.ResetTimeTracker((time_t)((float)i_gridExpiry * factor)); } time_t GetGridExpiry(void) const { return i_gridExpiry; } uint32 GetId(void) const { return i_id; } // some calls like isInWater should not use vmaps due to processor power // can return INVALID_HEIGHT if under z+2 z coord not found height virtual void <API key>(); bool <API key>(Creature* c); // used only in CreatureRelocation and ObjectGridUnloader bool CheckGridIntegrity(Creature* c, bool moved) const; uint32 GetInstanceId() const { return i_InstanceId; } virtual bool CanEnter(Player* player); const char* GetMapName() const; // have meaning only for instanced map (that have set real difficulty), NOT USE its for BaseMap // _currently_ spawnmode == difficulty, but this can be changes later, so use appropriate spawmmode/difficult functions // for simplify later code support // regular difficulty = continent/dungeon normal/first raid normal difficulty uint8 GetSpawnMode() const { return (i_spawnMode); } Difficulty GetDifficulty() const { return Difficulty(GetSpawnMode()); } bool IsRegularDifficulty() const { return GetDifficulty() == REGULAR_DIFFICULTY; } uint32 GetMaxPlayers() const; // dependent from map difficulty uint32 GetMaxResetDelay() const; // dependent from map difficulty MapDifficultyEntry const* GetMapDifficulty() const; // dependent from map difficulty bool Instanceable() const { return i_mapEntry && i_mapEntry->Instanceable(); } // NOTE: this duplicate of Instanceable(), but Instanceable() can be changed when BG also will be instanceable bool IsDungeon() const { return i_mapEntry && i_mapEntry->IsDungeon(); } bool IsRaid() const { return i_mapEntry && i_mapEntry->IsRaid(); } bool IsNonRaidDungeon() const { return i_mapEntry && i_mapEntry->IsNonRaidDungeon(); } bool <API key>() const { return IsRaid() || GetDifficulty() > <API key>; } bool IsBattleGround() const { return i_mapEntry && i_mapEntry->IsBattleGround(); } bool IsBattleArena() const { return i_mapEntry && i_mapEntry->IsBattleArena(); } bool <API key>() const { return i_mapEntry && i_mapEntry-><API key>(); } // can't be NULL for loaded map MapPersistentState* GetPersistentState() const { return m_persistentState; } void <API key>(WorldObject* obj); void <API key>(WorldObject* obj, Cell cell, CellPair cellpair); void resetMarkedCells() { marked_cells.reset(); } bool isCellMarked(uint32 pCellId) { return marked_cells.test(pCellId); } void markCell(uint32 pCellId) { marked_cells.set(pCellId); } bool HavePlayers() const { return !m_mapRefManager.isEmpty(); } uint32 <API key>() const; bool <API key>(uint32 x, uint32 y) const; void SendToPlayers(WorldPacket const* data) const; typedef MapRefManager PlayerList; PlayerList const& GetPlayers() const { return m_mapRefManager; } // per-map script storage bool ScriptsStart(ScriptMapMapName const& scripts, uint32 id, Object* source, Object* target); void ScriptCommandStart(ScriptInfo const& script, uint32 delay, Object* source, Object* target); // must called with AddToWorld void AddToActive(WorldObject* obj); // must called with RemoveFromWorld void RemoveFromActive(WorldObject* obj); Player* GetPlayer(ObjectGuid guid); Creature* GetCreature(ObjectGuid guid); Pet* GetPet(ObjectGuid guid); Creature* GetAnyTypeCreature(ObjectGuid guid); // normal creature or pet or vehicle GameObject* GetGameObject(ObjectGuid guid); DynamicObject* GetDynamicObject(ObjectGuid guid); Corpse* GetCorpse(ObjectGuid guid); // !!! find corpse can be not in world Unit* GetUnit(ObjectGuid guid); // only use if sure that need objects at current map, specially for player case WorldObject* GetWorldObject(ObjectGuid guid); // only use if sure that need objects at current map, specially for player case typedef <API key><<API key>, ObjectGuid> <API key>; <API key>& GetObjectsStore() { return m_objectsStore; } void AddUpdateObject(Object* obj) { <API key>.insert(obj); } void RemoveUpdateObject(Object* obj) { <API key>.erase(obj); } // DynObjects currently uint32 <API key>(HighGuid guidhigh); // get corresponding TerrainData object for this particular map const TerrainInfo* GetTerrain() const { return m_TerrainData; } void CreateInstanceData(bool load); InstanceData* GetInstanceData() { return i_data; } uint32 GetScriptId() const { return i_script_id; } void MonsterYellToMap(ObjectGuid guid, int32 textId, uint32 language, Unit* target); void MonsterYellToMap(CreatureInfo const* cinfo, int32 textId, uint32 language, Unit* target, uint32 senderLowGuid = 0); void <API key>(uint32 soundId, uint32 zoneId = 0); // Dynamic VMaps float GetHeight(uint32 phasemask, float x, float y, float z) const; bool IsInLineOfSight(float x1, float y1, float z1, float x2, float y2, float z2, uint32 phasemask) const; bool GetHitPosition(float srcX, float srcY, float srcZ, float& destX, float& destY, float& destZ, uint32 phasemask, float modifyDist) const; // Object Model insertion/remove/test for dynamic vmaps use void <API key>(const GameObjectModel& mdl); void <API key>(const GameObjectModel& mdl); bool <API key>(const GameObjectModel& mdl) const; // Get Holder for Creature Linking <API key>* <API key>() { return &<API key>; } private: void LoadMapAndVMap(int gx, int gy); void SetTimer(uint32 t) { i_gridExpiry = t < MIN_GRID_DELAY ? MIN_GRID_DELAY : t; } void SendInitSelf(Player* player); void SendInitTransports(Player* player); void <API key>(Player* player); bool <API key>(Creature* creature, Cell new_cell); bool loaded(const GridPair&) const; void EnsureGridCreated(const GridPair&); bool EnsureGridLoaded(Cell const&); void <API key>(Cell const&, Player* player = NULL); void buildNGridLinkage(NGridType* pNGridType) { pNGridType->link(this); } template<class T> void AddType(T* obj); template<class T> void RemoveType(T* obj, bool); NGridType* getNGrid(uint32 x, uint32 y) const { MANGOS_ASSERT(x < MAX_NUMBER_OF_GRIDS); MANGOS_ASSERT(y < MAX_NUMBER_OF_GRIDS); return i_grids[x][y]; } bool <API key>(uint32 x, uint32 y) const { return getNGrid(x, y)-><API key>(); } void <API key>(bool pLoaded, uint32 x, uint32 y) { getNGrid(x, y)-><API key>(pLoaded); } void setNGrid(NGridType* grid, uint32 x, uint32 y); void ScriptsProcess(); void SendObjectUpdates(); std::set<Object*> <API key>; protected: MapEntry const* i_mapEntry; uint8 i_spawnMode; uint32 i_id; uint32 i_InstanceId; uint32 m_unloadTimer; float m_VisibleDistance; MapPersistentState* m_persistentState; MapRefManager m_mapRefManager; MapRefManager::iterator m_mapRefIter; typedef std::set<WorldObject*> ActiveNonPlayers; ActiveNonPlayers m_activeNonPlayers; ActiveNonPlayers::iterator <API key>; <API key> m_objectsStore; private: time_t i_gridExpiry; NGridType* i_grids[MAX_NUMBER_OF_GRIDS][MAX_NUMBER_OF_GRIDS]; // Shared geodata object with map coord info... TerrainInfo* const m_TerrainData; bool m_bLoadedGrids[MAX_NUMBER_OF_GRIDS][MAX_NUMBER_OF_GRIDS]; std::bitset<<API key>* <API key>> marked_cells; std::set<WorldObject*> i_objectsToRemove; typedef std::multimap<time_t, ScriptAction> ScriptScheduleMap; ScriptScheduleMap m_scriptSchedule; InstanceData* i_data; uint32 i_script_id; // Map local low guid counters ObjectGuidGenerator<HIGHGUID_UNIT> m_CreatureGuids; ObjectGuidGenerator<HIGHGUID_GAMEOBJECT> m_GameObjectGuids; ObjectGuidGenerator<<API key>> m_DynObjectGuids; ObjectGuidGenerator<HIGHGUID_PET> m_PetGuids; ObjectGuidGenerator<HIGHGUID_VEHICLE> m_VehicleGuids; // Type specific code for add/remove to/from grid template<class T> void AddToGrid(T*, NGridType*, Cell const&); template<class T> void RemoveFromGrid(T*, NGridType*, Cell const&); // Holder for information about linked mobs <API key> <API key>; // Dynamic Map tree object DynamicMapTree m_dyn_tree; }; class MANGOS_DLL_SPEC WorldMap : public Map { private: using Map::GetPersistentState; // hide in subclass for overwrite public: WorldMap(uint32 id, time_t expiry) : Map(id, expiry, 0, REGULAR_DIFFICULTY) {} ~WorldMap() {} // can't be NULL for loaded map <API key>* GetPersistanceState() const; }; class MANGOS_DLL_SPEC DungeonMap : public Map { private: using Map::GetPersistentState; // hide in subclass for overwrite public: DungeonMap(uint32 id, time_t, uint32 InstanceId, uint8 SpawnMode); ~DungeonMap(); bool Add(Player*) override; void Remove(Player*, bool) override; void Update(const uint32&) override; bool Reset(InstanceResetMethod method); void PermBindAllPlayers(Player* player); void UnloadAll(bool pForce) override; void SendResetWarnings(uint32 timeLeft) const; void SetResetSchedule(bool on); // can't be NULL for loaded map <API key>* GetPersistanceState() const; virtual void <API key>() override; private: bool m_resetAfterUnload; bool m_unloadWhenEmpty; }; class MANGOS_DLL_SPEC BattleGroundMap : public Map { private: using Map::GetPersistentState; // hide in subclass for overwrite public: BattleGroundMap(uint32 id, time_t, uint32 InstanceId, uint8 spawnMode); ~BattleGroundMap(); void Update(const uint32&) override; bool Add(Player*) override; void Remove(Player*, bool) override; bool CanEnter(Player* player) override; void SetUnload(); void UnloadAll(bool pForce) override; virtual void <API key>() override; BattleGround* GetBG() { return m_bg; } void SetBG(BattleGround* bg) { m_bg = bg; } // can't be NULL for loaded map <API key>* GetPersistanceState() const; private: BattleGround* m_bg; }; template<class T, class CONTAINER> inline void Map::Visit(const Cell& cell, <API key><T, CONTAINER>& visitor) { const uint32 x = cell.GridX(); const uint32 y = cell.GridY(); const uint32 cell_x = cell.CellX(); const uint32 cell_y = cell.CellY(); if (!cell.NoCreate() || loaded(GridPair(x, y))) { EnsureGridLoaded(cell); getNGrid(x, y)->Visit(cell_x, cell_y, visitor); } } #endif
const fs = require('fs'); const util = require('../../util'); // test equality function equal(a, b, options) { if (a === b) { return options.fn(this); } return options.inverse(this); } // great than function gt(a, b, options) { if (a >= b) { return options.fn(this); } return options.inverse(this); } // between function between(a, b, c, options) { if (a >= b && a <= c) { return options.fn(this); } return options.inverse(this); } // less than function lt(a, b, options) { if (a < b) { return options.fn(this); } return options.inverse(this); } function ignoreNan(val, symbol) { const isNumber = (val >= 0 || val < 0); return isNumber ? `${util.roundDecimal(val, 2)} ${symbol}` : ''; } // test inequality function inequal(a, b, options) { if (a !== b) { return options.fn(this); } return options.inverse(this); } // test File Exit function fileExist(a, b, options) { try { fs.statSync(`${a}${b}`); return options.fn(this); } catch (err) { return options.inverse(this); } } exports.equal = equal; exports.gt = gt; exports.lt = lt; exports.between = between; exports.ignoreNan = ignoreNan; exports.inequal = inequal; exports.fileExist = fileExist;
<?php /** * @file * Definition of Drupal\views_ui\ViewUI. */ namespace Drupal\views_ui; use Drupal\views\ViewExecutable; use Drupal\Core\Database\Database; use Drupal\Core\TypedData\<API key>; use Drupal\views\Plugin\views\query\Sql; use Drupal\views\Plugin\Core\Entity\View; use Drupal\views\<API key>; /** * Stores UI related temporary settings. */ class ViewUI implements <API key> { /** * Indicates if a view is currently being edited. * * @var bool */ public $editing = FALSE; /** * Stores an array of errors for any displays. * * @var array */ public $display_errors; /** * Stores an array of displays that have been changed. * * @var array */ public $changed_display; /** * How long the view takes to build. * * @var int */ public $build_time; /** * How long the view takes to render. * * @var int */ public $render_time; /** * How long the view takes to execute. * * @var int */ public $execute_time; /** * If this view is locked for editing. * * @var bool */ public $locked; /** * If this view has been changed. * * @var bool */ public $changed; /** * Stores options temporarily while editing. * * @var array */ public $temporary_options; /** * Stores a stack of UI forms to display. * * @var array */ public $stack; /** * Is the view runned in a context of the preview in the admin interface. * * @var bool */ public $live_preview; public $displayID; public $renderPreview = FALSE; /** * The View storage object. * * @var \Drupal\views\Plugin\Core\Entity\View */ protected $storage; /** * The View executable object. * * @var \Drupal\views\ViewExecutable */ protected $executable; /** * Constructs a View UI object. * * @param \Drupal\views\<API key> $storage * The View storage object to wrap. */ public function __construct(<API key> $storage) { $this->entityType = 'view'; $this->storage = $storage; $this->executable = $storage->get('executable'); } /** * Overrides \Drupal\Core\Config\Entity\ConfigEntityBase::get(). */ public function get($property_name, $langcode = NULL) { if (property_exists($this->storage, $property_name)) { return $this->storage->get($property_name, $langcode); } return isset($this->{$property_name}) ? $this->{$property_name} : NULL; } /** * Overrides \Drupal\Core\Config\Entity\ConfigEntityBase::set(). */ public function set($property_name, $value) { if (property_exists($this->storage, $property_name)) { $this->storage->set($property_name, $value); } else { $this->{$property_name} = $value; } } public static function <API key>() { return '<div class="message">' . t("Click on an item to edit that item's details.") . '</div>'; } /** * Basic submit handler applicable to all 'standard' forms. * * This submit handler determines whether the user wants the submitted changes * to apply to the default display or to the current display, and dispatches * control appropriately. */ public function standardSubmit($form, &$form_state) { // Determine whether the values the user entered are intended to apply to // the current display or the default display. list($was_defaulted, $is_defaulted, $revert) = $this->getOverrideValues($form, $form_state); // Based on the user's choice in the display dropdown, determine which display // these changes apply to. if ($revert) { // If it's revert just change the override and return. $display = &$this->executable->displayHandlers->get($form_state['display_id']); $display->optionsOverride($form, $form_state); // Don't execute the normal submit handling but still store the changed view into cache. views_ui_cache_set($this); return; } elseif ($was_defaulted === $is_defaulted) { // We're not changing which display these form values apply to. // Run the regular submit handler for this form. } elseif ($was_defaulted && !$is_defaulted) { // We were using the default display's values, but we're now overriding // the default display and saving values specific to this display. $display = &$this->executable->displayHandlers->get($form_state['display_id']); // optionsOverride toggles the override of this section. $display->optionsOverride($form, $form_state); $display->submitOptionsForm($form, $form_state); } elseif (!$was_defaulted && $is_defaulted) { // We used to have an override for this display, but the user now wants // to go back to the default display. // Overwrite the default display with the current form values, and make // the current display use the new default values. $display = &$this->executable->displayHandlers->get($form_state['display_id']); // optionsOverride toggles the override of this section. $display->optionsOverride($form, $form_state); $display->submitOptionsForm($form, $form_state); } $submit_handler = $form['#form_id'] . '_submit'; if (function_exists($submit_handler)) { $submit_handler($form, $form_state); } } /** * Submit handler for cancel button */ public function standardCancel($form, &$form_state) { if (!empty($this->changed) && isset($this->form_cache)) { unset($this->form_cache); views_ui_cache_set($this); } $form_state['redirect'] = 'admin/structure/views/view/' . $this->id() . '/edit'; } /** * Provide a standard set of Apply/Cancel/OK buttons for the forms. Also provide * a hidden op operator because the forms plugin doesn't seem to properly * provide which button was clicked. * * TODO: Is the hidden op operator still here somewhere, or is that part of the * docblock outdated? */ public function getStandardButtons(&$form, &$form_state, $form_id, $name = NULL, $third = NULL, $submit = NULL) { $form['buttons'] = array( '#prefix' => '<div class="clearfix"><div class="form-buttons">', '#suffix' => '</div></div>', ); if (empty($name)) { $name = t('Apply'); if (!empty($this->stack) && count($this->stack) > 1) { $name = t('Apply and continue'); } $names = array(t('Apply'), t('Apply and continue')); } // Forms that are purely informational set an ok_button flag, so we know not // to create an "Apply" button for them. if (empty($form_state['ok_button'])) { $form['buttons']['submit'] = array( '#type' => 'submit', '#value' => $name, // The regular submit handler ($form_id . '_submit') does not apply if // we're updating the default display. It does apply if we're updating // the current display. Since we have no way of knowing at this point // which display the user wants to update, <API key> will // take care of running the regular submit handler as appropriate. '#submit' => array(array($this, 'standardSubmit')), '#button_type' => 'primary', ); // Form API button click detection requires the button's #value to be the // same between the form build of the initial page request, and the initial // form build of the request processing the form submission. Ideally, the // button's #value shouldn't change until the form rebuild step. However, // views_ui_ajax_form() implements a different multistep form workflow than // the Form API does, and adjusts $view->stack prior to form processing, so // we compensate by extending button click detection code to support any of // the possible button labels. if (isset($names)) { $form['buttons']['submit']['#values'] = $names; $form['buttons']['submit']['#process'] = array_merge(array('<API key>'), <API key>($form['buttons']['submit']['#type'], '#process', array())); } // If a validation handler exists for the form, assign it to this button. if (function_exists($form_id . '_validate')) { $form['buttons']['submit']['#validate'][] = $form_id . '_validate'; } } // Create a "Cancel" button. For purely informational forms, label it "OK". $cancel_submit = function_exists($form_id . '_cancel') ? $form_id . '_cancel' : array($this, 'standardCancel'); $form['buttons']['cancel'] = array( '#type' => 'submit', '#value' => empty($form_state['ok_button']) ? t('Cancel') : t('Ok'), '#submit' => array($cancel_submit), '#validate' => array(), ); // Some forms specify a third button, with a name and submit handler. if ($third) { if (empty($submit)) { $submit = 'third'; } $third_submit = function_exists($form_id . '_' . $submit) ? $form_id . '_' . $submit : array($this, 'standardCancel'); $form['buttons'][$submit] = array( '#type' => 'submit', '#value' => $third, '#validate' => array(), '#submit' => array($third_submit), ); } // Compatibility, to be removed later: // TODO: When is "later"? // We used to set these items on the form, but now we want them on the $form_state: if (isset($form['#title'])) { $form_state['title'] = $form['#title']; } if (isset($form['#url'])) { $form_state['url'] = $form['#url']; } if (isset($form['#section'])) { $form_state['#section'] = $form['#section']; } // Finally, we never want these cached -- our object cache does that for us. $form['#no_cache'] = TRUE; // If this isn't an ajaxy form, then we want to set the title. if (!empty($form['#title'])) { drupal_set_title($form['#title']); } } /** * Return the was_defaulted, is_defaulted and revert state of a form. */ public function getOverrideValues($form, $form_state) { // Make sure the dropdown exists in the first place. if (isset($form_state['values']['override']['dropdown'])) { // #default_value is used to determine whether it was the default value or not. // So the available options are: $display, 'default' and 'default_revert', not 'defaults'. $was_defaulted = ($form['override']['dropdown'][' $is_defaulted = ($form_state['values']['override']['dropdown'] === 'default'); $revert = ($form_state['values']['override']['dropdown'] === 'default_revert'); if ($was_defaulted !== $is_defaulted && isset($form['#section'])) { // We're changing which display these values apply to. // Update the #section so it knows what to mark changed. $form['#section'] = str_replace('default-', $form_state['display_id'] . '-', $form['#section']); } } else { // The user didn't get the dropdown for overriding the default display. $was_defaulted = FALSE; $is_defaulted = FALSE; $revert = FALSE; } return array($was_defaulted, $is_defaulted, $revert); } /** * Submit handler to break_lock a view. */ public function submitBreakLock(&$form, &$form_state) { drupal_container()->get('user.tempstore')->get('views')->delete($this->id()); $form_state['redirect'] = 'admin/structure/views/view/' . $this->id() . '/edit'; drupal_set_message(t('The lock has been broken and you may now edit this view.')); } /** * Form constructor callback to reorder displays on a view */ public function <API key>($form, &$form_state) { $display_id = $form_state['display_id']; $form['view'] = array('#type' => 'value', '#value' => $this); $form['#tree'] = TRUE; $count = count($this->get('display')); $displays = $this->get('display'); uasort($displays, array('static', 'sortPosition')); $this->set('display', $displays); foreach ($displays as $display) { $form[$display['id']] = array( 'title' => array('#markup' => $display['display_title']), 'weight' => array( '#type' => 'weight', '#value' => $display['position'], '#delta' => $count, '#title' => t('Weight for @display', array('@display' => $display['display_title'])), '#title_display' => 'invisible', ), '#tree' => TRUE, '#display' => $display, 'removed' => array( '#type' => 'checkbox', '#id' => 'display-removed-' . $display['id'], '#attributes' => array('class' => array('<API key>')), '#default_value' => isset($display['deleted']), ), ); if (isset($display['deleted']) && $display['deleted']) { $form[$display['id']]['deleted'] = array('#type' => 'value', '#value' => TRUE); } if ($display['id'] === 'default') { unset($form[$display['id']]['weight']); unset($form[$display['id']]['removed']); } } $form['#title'] = t('Displays Reorder'); $form['#section'] = 'reorder'; // Add javascript settings that will be added via $.extend for tabledragging $form['#js']['tableDrag']['reorder-displays']['weight'][0] = array( 'target' => 'weight', 'source' => NULL, 'relationship' => 'sibling', 'action' => 'order', 'hidden' => TRUE, 'limit' => 0, ); $form['#action'] = url('admin/structure/views/nojs/reorder-displays/' . $this->id() . '/' . $display_id); $this->getStandardButtons($form, $form_state, '<API key>'); $form['buttons']['submit']['#submit'] = array(array($this, '<API key>')); return $form; } /** * Submit handler for rearranging display form */ public function <API key>($form, &$form_state) { foreach ($form_state['input'] as $display => $info) { // add each value that is a field with a weight to our list, but only if // it has had its 'removed' checkbox checked. if (is_array($info) && isset($info['weight']) && empty($info['removed'])) { $order[$display] = $info['weight']; } } // Sort the order array asort($order); // Fixing up positions $position = 1; foreach (array_keys($order) as $display) { $order[$display] = $position++; } // Setting up position and removing deleted displays $displays = $this->get('display'); foreach ($displays as $display_id => $display) { // Don't touch the default !!! if ($display_id === 'default') { $displays[$display_id]['position'] = 0; continue; } if (isset($order[$display_id])) { $displays[$display_id]['position'] = $order[$display_id]; } else { $displays[$display_id]['deleted'] = TRUE; } } // Sorting back the display array as the position is not enough uasort($displays, array('static', 'sortPosition')); $this->set('display', $displays); // Store in cache views_ui_cache_set($this); $form_state['redirect'] = array('admin/structure/views/view/' . $this->id() . '/edit', array('fragment' => 'views-tab-default')); } /** * Add another form to the stack; clicking 'apply' will go to this form * rather than closing the ajax popup. */ public function addFormToStack($key, $display_id, $args, $top = FALSE, $rebuild_keys = FALSE) { // Reset the cache of IDs. Drupal rather aggressively prevents ID // duplication but this causes it to remember IDs that are no longer even // being used. $seen_ids_init = &drupal_static('drupal_html_id:init'); $seen_ids_init = array(); if (empty($this->stack)) { $this->stack = array(); } $stack = array($this->buildIdentifier($key, $display_id, $args), $key, $display_id, $args); // If we're being asked to add this form to the bottom of the stack, no // special logic is required. Our work is equally easy if we were asked to add // to the top of the stack, but there's nothing in it yet. if (!$top || empty($this->stack)) { $this->stack[] = $stack; } // If we're adding to the top of an existing stack, we have to maintain the // existing integer keys, so they can be used for the "2 of 3" progress // indicator (which will now read "2 of 4"). else { $keys = array_keys($this->stack); $first = current($keys); $last = end($keys); for ($i = $last; $i >= $first; $i if (!isset($this->stack[$i])) { continue; } // Move form number $i to the next position in the stack. $this->stack[$i + 1] = $this->stack[$i]; unset($this->stack[$i]); } // Now that the previously $first slot is free, move the new form into it. $this->stack[$first] = $stack; ksort($this->stack); // Start the keys from 0 again, if requested. if ($rebuild_keys) { $this->stack = array_values($this->stack); } } } /** * Submit handler for adding new item(s) to a view. */ public function submitItemAdd($form, &$form_state) { $type = $form_state['type']; $types = ViewExecutable::viewsHandlerTypes(); $section = $types[$type]['plural']; // Handle the override select. list($was_defaulted, $is_defaulted) = $this->getOverrideValues($form, $form_state); if ($was_defaulted && !$is_defaulted) { // We were using the default display's values, but we're now overriding // the default display and saving values specific to this display. $display = &$this->executable->displayHandlers->get($form_state['display_id']); // setOverride toggles the override of this section. $display->setOverride($section); } elseif (!$was_defaulted && $is_defaulted) { // We used to have an override for this display, but the user now wants // to go back to the default display. // Overwrite the default display with the current form values, and make // the current display use the new default values. $display = &$this->executable->displayHandlers->get($form_state['display_id']); // optionsOverride toggles the override of this section. $display->setOverride($section); } if (!empty($form_state['values']['name']) && is_array($form_state['values']['name'])) { // Loop through each of the items that were checked and add them to the view. foreach (array_keys(array_filter($form_state['values']['name'])) as $field) { list($table, $field) = explode('.', $field, 2); if ($cut = strpos($field, '$')) { $field = substr($field, 0, $cut); } $id = $this->executable->addItem($form_state['display_id'], $type, $table, $field); // check to see if we have group by settings $key = $type; // Footer,header and empty text have a different internal handler type(area). if (isset($types[$type]['type'])) { $key = $types[$type]['type']; } $handler = views_get_handler($table, $field, $key); if ($this->executable->displayHandlers->get('default')->useGroupBy() && $handler->usesGroupBy()) { $this->addFormToStack('config-item-group', $form_state['display_id'], array($type, $id)); } // check to see if this type has settings, if so add the settings form first if ($handler && $handler->hasExtraOptions()) { $this->addFormToStack('config-item-extra', $form_state['display_id'], array($type, $id)); } // Then add the form to the stack $this->addFormToStack('config-item', $form_state['display_id'], array($type, $id)); } } if (isset($this->form_cache)) { unset($this->form_cache); } // Store in cache views_ui_cache_set($this); } public function renderPreview($display_id, $args = array()) { // Save the current path so it can be restored before returning from this function. $old_q = current_path(); // Determine where the query and performance statistics should be output. $config = config('views.settings'); $show_query = $config->get('ui.show.sql_query.enabled'); $show_info = $config->get('ui.show.preview_information'); $show_location = $config->get('ui.show.sql_query.where'); $show_stats = $config->get('ui.show.<API key>'); if ($show_stats) { $show_stats = $config->get('ui.show.sql_query.where'); } $combined = $show_query && $show_stats; $rows = array('query' => array(), 'statistics' => array()); $output = ''; $errors = $this->executable->validate(); if ($errors === TRUE) { $this->ajax = TRUE; $this->executable->live_preview = TRUE; $this->views_ui_context = TRUE; // AJAX happens via $_POST but everything expects exposed data to // be in GET. Copy stuff but remove ajax-framework specific keys. // If we're clicking on links in a preview, though, we could actually // still have some in $_GET, so we use $_REQUEST to ensure we get it all. $exposed_input = drupal_container()->get('request')->request->all(); foreach (array('view_name', 'view_display_id', 'view_args', 'view_path', 'view_dom_id', 'pager_element', 'view_base_path', 'ajax_html_ids', 'ajax_page_state', 'form_id', 'form_build_id', 'form_token') as $key) { if (isset($exposed_input[$key])) { unset($exposed_input[$key]); } } $this->executable->setExposedInput($exposed_input); if (!$this->executable->setDisplay($display_id)) { return t('Invalid display id @display', array('@display' => $display_id)); } $this->executable->setArguments($args); // Store the current view URL for later use: if ($this->executable->display_handler->getOption('path')) { $path = $this->executable->getUrl(); } // Make view links come back to preview. $this->override_path = 'admin/structure/views/nojs/preview/' . $this->id() . '/' . $display_id; // Also override the current path so we get the pager. $original_path = current_path(); $q = _current_path($this->override_path); if ($args) { $q .= '/' . implode('/', $args); _current_path($q); } // Suppress contextual links of entities within the result set during a // Preview. // @todo We'll want to add contextual links specific to editing the View, so // the suppression may need to be moved deeper into the Preview pipeline. <API key>(); $preview = $this->executable->preview($display_id, $args); <API key>(); // Reset variables. unset($this->override_path); _current_path($original_path); // Prepare the query information and statistics to show either above or // below the view preview. if ($show_info || $show_query || $show_stats) { // Get information from the preview for display. if (!empty($this->executable->build_info['query'])) { if ($show_query) { $query = $this->executable->build_info['query']; // Only the sql default class has a method getArguments. $quoted = array(); if ($this->executable->query instanceof Sql) { $quoted = $query->getArguments(); $connection = Database::getConnection(); foreach ($quoted as $key => $val) { if (is_array($val)) { $quoted[$key] = implode(', ', array_map(array($connection, 'quote'), $val)); } else { $quoted[$key] = $connection->quote($val); } } } $rows['query'][] = array('<strong>' . t('Query') . '</strong>', '<pre>' . check_plain(strtr($query, $quoted)) . '</pre>'); if (!empty($this->executable->additional_queries)) { $queries = '<strong>' . t('These queries were run during view rendering:') . '</strong>'; foreach ($this->executable->additional_queries as $query) { if ($queries) { $queries .= "\n"; } $queries .= t('[@time ms]', array('@time' => intval($query[1] * 100000) / 100)) . ' ' . $query[0]; } $rows['query'][] = array('<strong>' . t('Other queries') . '</strong>', '<pre>' . $queries . '</pre>'); } } if ($show_info) { $rows['query'][] = array('<strong>' . t('Title') . '</strong>', filter_xss_admin($this->executable->getTitle())); if (isset($path)) { $path = l($path, $path); } else { $path = t('This display has no path.'); } $rows['query'][] = array('<strong>' . t('Path') . '</strong>', $path); } if ($show_stats) { $rows['statistics'][] = array('<strong>' . t('Query build time') . '</strong>', t('@time ms', array('@time' => intval($this->executable->build_time * 100000) / 100))); $rows['statistics'][] = array('<strong>' . t('Query execute time') . '</strong>', t('@time ms', array('@time' => intval($this->executable->execute_time * 100000) / 100))); $rows['statistics'][] = array('<strong>' . t('View render time') . '</strong>', t('@time ms', array('@time' => intval($this->executable->render_time * 100000) / 100))); } drupal_alter('views_preview_info', $rows, $this); } else { // No query was run. Display that information in place of either the // query or the performance statistics, whichever comes first. if ($combined || ($show_location === 'above')) { $rows['query'] = array(array('<strong>' . t('Query') . '</strong>', t('No query was run'))); } else { $rows['statistics'] = array(array('<strong>' . t('Query') . '</strong>', t('No query was run'))); } } } } else { foreach ($errors as $error) { drupal_set_message($error, 'error'); } $preview = t('Unable to preview due to validation errors.'); } // Assemble the preview, the query info, and the query statistics in the // requested order. if ($show_location === 'above') { if ($combined) { $output .= '<div class="views-query-info">' . theme('table', array('rows' => array_merge($rows['query'], $rows['statistics']))) . '</div>'; } else { $output .= '<div class="views-query-info">' . theme('table', array('rows' => $rows['query'])) . '</div>'; } } elseif ($show_stats === 'above') { $output .= '<div class="views-query-info">' . theme('table', array('rows' => $rows['statistics'])) . '</div>'; } $output .= $preview; if ($show_location === 'below') { if ($combined) { $output .= '<div class="views-query-info">' . theme('table', array('rows' => array_merge($rows['query'], $rows['statistics']))) . '</div>'; } else { $output .= '<div class="views-query-info">' . theme('table', array('rows' => $rows['query'])) . '</div>'; } } elseif ($show_stats === 'below') { $output .= '<div class="views-query-info">' . theme('table', array('rows' => $rows['statistics'])) . '</div>'; } _current_path($old_q); return $output; } /** * Get the user's current progress through the form stack. * * @return * FALSE if the user is not currently in a multiple-form stack. Otherwise, * an associative array with the following keys: * - current: The number of the current form on the stack. * - total: The total number of forms originally on the stack. */ public function getFormProgress() { $progress = FALSE; if (!empty($this->stack)) { $stack = $this->stack; // The forms on the stack have integer keys that don't change as the forms // are completed, so we can see which ones are still left. $keys = array_keys($this->stack); // Add 1 to the array keys for the benefit of humans, who start counting // from 1 and not 0. $current = reset($keys) + 1; $total = end($keys) + 1; if ($total > 1) { $progress = array(); $progress['current'] = $current; $progress['total'] = $total; } } return $progress; } /** * Build a form identifier that we can use to see if one form * is the same as another. Since the arguments differ slightly * we do a lot of spiffy concatenation here. */ public function buildIdentifier($key, $display_id, $args) { $form = views_ui_ajax_forms($key); // Automatically remove the single-form cache if it exists and // does not match the key. $identifier = implode('-', array($key, $this->id(), $display_id)); foreach ($form['args'] as $id) { $arg = (!empty($args)) ? array_shift($args) : NULL; $identifier .= '-' . $arg; } return $identifier; } /** * Display position sorting function */ public static function sortPosition($display1, $display2) { if ($display1['position'] != $display2['position']) { return $display1['position'] < $display2['position'] ? -1 : 1; } return 0; } /** * Build up a $form_state object suitable for use with drupal_build_form * based on known information about a form. */ public function buildFormState($js, $key, $display_id, $args) { $form = views_ui_ajax_forms($key); // Build up form state $form_state = array( 'form_key' => $key, 'form_id' => $form['form_id'], 'view' => &$this, 'ajax' => $js, 'display_id' => $display_id, 'no_redirect' => TRUE, ); // If an method was specified, use that for the callback. if (isset($form['callback'])) { $form_state['build_info']['args'] = array(); $form_state['build_info']['callback'] = array($this, $form['callback']); } foreach ($form['args'] as $id) { $form_state[$id] = (!empty($args)) ? array_shift($args) : NULL; } return $form_state; } /** * Passes through all unknown calls onto the storage object. */ public function __call($method, $args) { return <API key>(array($this->storage, $method), $args); } /** * Implements \IteratorAggregate::getIterator(). */ public function getIterator() { return $this->__call(__FUNCTION__, func_get_args()); } /** * Implements \Drupal\Core\Entity\EntityInterface::id(). */ public function id() { return $this->__call(__FUNCTION__, func_get_args()); } /** * Implements \Drupal\Core\Entity\EntityInterface::uuid(). */ public function uuid() { return $this->__call(__FUNCTION__, func_get_args()); } /** * Implements \Drupal\Core\Entity\EntityInterface::isNew(). */ public function isNew() { return $this->__call(__FUNCTION__, func_get_args()); } /** * Implements \Drupal\Core\Entity\EntityInterface::entityType(). */ public function entityType() { return $this->__call(__FUNCTION__, func_get_args()); } /** * Implements \Drupal\Core\Entity\EntityInterface::bundle(). */ public function bundle() { return $this->__call(__FUNCTION__, func_get_args()); } /** * Implements \Drupal\Core\Entity\EntityInterface::isDefaultRevision(). */ public function isDefaultRevision($new_value = NULL) { return $this->__call(__FUNCTION__, func_get_args()); } /** * Implements \Drupal\Core\Entity\EntityInterface::getRevisionId(). */ public function getRevisionId() { return $this->__call(__FUNCTION__, func_get_args()); } /** * Implements \Drupal\Core\Entity\EntityInterface::entityInfo(). */ public function entityInfo() { return $this->__call(__FUNCTION__, func_get_args()); } /** * Implements \Drupal\Core\Entity\EntityInterface::createDuplicate(). */ public function createDuplicate() { return $this->__call(__FUNCTION__, func_get_args()); } /** * Implements \Drupal\Core\Entity\EntityInterface::delete(). */ public function delete() { return $this->__call(__FUNCTION__, func_get_args()); } /** * Implements \Drupal\Core\Entity\EntityInterface::save(). */ public function save() { return $this->__call(__FUNCTION__, func_get_args()); } /** * Implements \Drupal\Core\Entity\EntityInterface::uri(). */ public function uri() { return $this->__call(__FUNCTION__, func_get_args()); } /** * Implements \Drupal\Core\Entity\EntityInterface::label(). */ public function label($langcode = NULL) { return $this->__call(__FUNCTION__, func_get_args()); } /** * Implements \Drupal\Core\Entity\EntityInterface::isNewRevision(). */ public function isNewRevision() { return $this->__call(__FUNCTION__, func_get_args()); } /** * Implements \Drupal\Core\Entity\EntityInterface::setNewRevision(). */ public function setNewRevision($value = TRUE) { return $this->__call(__FUNCTION__, func_get_args()); } /** * Implements \Drupal\Core\Entity\EntityInterface::enforceIsNew(). */ public function enforceIsNew($value = TRUE) { return $this->__call(__FUNCTION__, func_get_args()); } /** * Implements \Drupal\Core\Entity\EntityInterface::getExportProperties(). */ public function getExportProperties() { return $this->__call(__FUNCTION__, func_get_args()); } /** * Implements \Drupal\Core\TypedData\<API key>::getTranslation(). */ public function getTranslation($langcode, $strict = TRUE) { return $this->__call(__FUNCTION__, func_get_args()); } /** * Implements \Drupal\Core\TypedData\<API key>::<API key>(). */ public function <API key>($include_default = TRUE) { return $this->__call(__FUNCTION__, func_get_args()); } /** * Implements \Drupal\Core\TypedData\<API key>::language)(). */ public function language() { return $this->__call(__FUNCTION__, func_get_args()); } /** * Implements \Drupal\Core\TypedData\AccessibleInterface::access(). */ public function access($operation = 'view', \Drupal\user\Plugin\Core\Entity\User $account = NULL) { return $this->__call(__FUNCTION__, func_get_args()); } /** * Implements \Drupal\Core\TypedData\<API key>::isEmpty)(). */ public function isEmpty() { return $this->__call(__FUNCTION__, func_get_args()); } /** * Implements \Drupal\Core\TypedData\<API key>::getPropertyValues(). */ public function getPropertyValues() { return $this->__call(__FUNCTION__, func_get_args()); } /** * Implements \Drupal\Core\TypedData\<API key>::<API key>(). */ public function <API key>() { return $this->__call(__FUNCTION__, func_get_args()); } /** * Implements \Drupal\Core\TypedData\<API key>::<API key>(). */ public function <API key>($name) { return $this->__call(__FUNCTION__, func_get_args()); } /** * Implements \Drupal\Core\TypedData\<API key>::setPropertyValues(). */ public function setPropertyValues($values) { return $this->__call(__FUNCTION__, func_get_args()); } /** * Implements \Drupal\Core\TypedData\<API key>::getProperties(). */ public function getProperties($include_computed = FALSE) { return $this->__call(__FUNCTION__, func_get_args()); } /** * Implements \Drupal\views\<API key>::enable(). */ public function enable() { return $this->__call(__FUNCTION__, func_get_args()); } /** * Implements \Drupal\views\<API key>::disable(). */ public function disable() { return $this->__call(__FUNCTION__, func_get_args()); } /** * Implements \Drupal\views\<API key>::isEnabled(). */ public function isEnabled() { return $this->__call(__FUNCTION__, func_get_args()); } /** * Implements \Drupal\Core\Config\Entity\<API key>::getOriginalID(). */ public function getOriginalID() { return $this->__call(__FUNCTION__, func_get_args()); } /** * Implements \Drupal\Core\Config\Entity\<API key>::setOriginalID(). */ public function setOriginalID($id) { return $this->__call(__FUNCTION__, func_get_args()); } /** * Implements Drupal\Core\Entity\EntityInterface::getBCEntity(). */ public function getBCEntity() { return $this->__call(__FUNCTION__, func_get_args()); } /** * Implements Drupal\Core\Entity\EntityInterface::getOriginalEntity(). */ public function getOriginalEntity() { return $this->__call(__FUNCTION__, func_get_args()); } /** * Implements \Drupal\Core\TypedData\<API key>::getName(). */ public function getName() { return $this->__call(__FUNCTION__, func_get_args()); } /** * Implements \Drupal\Core\TypedData\<API key>::getRoot(). */ public function getRoot() { return $this->__call(__FUNCTION__, func_get_args()); } /** * Implements \Drupal\Core\TypedData\<API key>::getPropertyPath(). */ public function getPropertyPath() { return $this->__call(__FUNCTION__, func_get_args()); } /** * Implements \Drupal\Core\TypedData\<API key>::getParent(). */ public function getParent() { return $this->__call(__FUNCTION__, func_get_args()); } /** * Implements \Drupal\Core\TypedData\<API key>::setContext(). */ public function setContext($name = NULL, <API key> $parent = NULL) { return $this->__call(__FUNCTION__, func_get_args()); } }
#ifndef LINUX_HARDIRQ_H #define LINUX_HARDIRQ_H #include <linux/preempt.h> #include <linux/lockdep.h> #include <linux/ftrace_irq.h> #include <asm/hardirq.h> /* * We put the hardirq and softirq counter into the preemption * counter. The bitmask has the following meaning: * * - bits 0-7 are the preemption count (max preemption depth: 256) * - bits 8-15 are the softirq count (max # of softirqs: 256) * * The hardirq count can in theory reach the same as NR_IRQS. * In reality, the number of nested IRQS is limited to the stack * size as well. For archs with over 1000 IRQS it is not practical * to expect that they will all nest. We give a max of 10 bits for * hardirq nesting. An arch may choose to give less than 10 bits. * m68k expects it to be 8. * * - bits 16-25 are the hardirq count (max # of nested hardirqs: 1024) * - bit 26 is the NMI_MASK * - bit 28 is the PREEMPT_ACTIVE flag * * PREEMPT_MASK: 0x000000ff * SOFTIRQ_MASK: 0x0000ff00 * HARDIRQ_MASK: 0x03ff0000 * NMI_MASK: 0x04000000 */ #define PREEMPT_BITS 8 #define SOFTIRQ_BITS 8 #define NMI_BITS 1 #define MAX_HARDIRQ_BITS 10 #ifndef HARDIRQ_BITS # define HARDIRQ_BITS MAX_HARDIRQ_BITS #endif #if HARDIRQ_BITS > MAX_HARDIRQ_BITS #error HARDIRQ_BITS too high! #endif #define PREEMPT_SHIFT 0 #define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS) #define HARDIRQ_SHIFT (SOFTIRQ_SHIFT + SOFTIRQ_BITS) #define NMI_SHIFT (HARDIRQ_SHIFT + HARDIRQ_BITS) #define __IRQ_MASK(x) ((1UL << (x))-1) #define PREEMPT_MASK (__IRQ_MASK(PREEMPT_BITS) << PREEMPT_SHIFT) #define SOFTIRQ_MASK (__IRQ_MASK(SOFTIRQ_BITS) << SOFTIRQ_SHIFT) #define HARDIRQ_MASK (__IRQ_MASK(HARDIRQ_BITS) << HARDIRQ_SHIFT) #define NMI_MASK (__IRQ_MASK(NMI_BITS) << NMI_SHIFT) #define PREEMPT_OFFSET (1UL << PREEMPT_SHIFT) #define SOFTIRQ_OFFSET (1UL << SOFTIRQ_SHIFT) #define HARDIRQ_OFFSET (1UL << HARDIRQ_SHIFT) #define NMI_OFFSET (1UL << NMI_SHIFT) #define <API key> (2 * SOFTIRQ_OFFSET) #ifndef PREEMPT_ACTIVE #define PREEMPT_ACTIVE_BITS 1 #define <API key> (NMI_SHIFT + NMI_BITS) #define PREEMPT_ACTIVE (__IRQ_MASK(PREEMPT_ACTIVE_BITS) << <API key>) #endif #if PREEMPT_ACTIVE < (1 << (NMI_SHIFT + NMI_BITS)) #error PREEMPT_ACTIVE is too low! #endif #define hardirq_count() (preempt_count() & HARDIRQ_MASK) #define softirq_count() (preempt_count() & SOFTIRQ_MASK) #define irq_count() (preempt_count() & (HARDIRQ_MASK | SOFTIRQ_MASK \ | NMI_MASK)) /* * Are we doing bottom half or hardware interrupt processing? * Are we in a softirq context? Interrupt context? * in_softirq - Are we currently processing softirq or have bh disabled? * in_serving_softirq - Are we currently processing softirq? */ #define in_irq() (hardirq_count()) #define in_softirq() (softirq_count()) #define in_interrupt() (irq_count()) #define in_serving_softirq() (softirq_count() & SOFTIRQ_OFFSET) /* * Are we in NMI context? */ #define in_nmi() (preempt_count() & NMI_MASK) #if defined(<API key>) # define <API key> 1 #else # define <API key> 0 #endif /* * Are we running in atomic context? WARNING: this macro cannot * always detect atomic context; in particular, it cannot know about * held spinlocks in non-preemptible kernels. Thus it should not be * used in the general case to determine whether sleeping is possible. * Do not use in_atomic() in driver code. */ #define in_atomic() ((preempt_count() & ~PREEMPT_ACTIVE) != 0) /* * Check whether we were atomic before we did preempt_disable(): * (used by the scheduler, *after* releasing the kernel lock) */ #define <API key>() \ ((preempt_count() & ~PREEMPT_ACTIVE) != <API key>) #ifdef <API key> # define preemptible() (preempt_count() == 0 && !irqs_disabled()) # define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1) #else # define preemptible() 0 # define IRQ_EXIT_OFFSET HARDIRQ_OFFSET #endif extern void synchronize_irq(unsigned int irq); struct task_struct; #if !defined(<API key>) && !defined(<API key>) static inline void <API key>(struct task_struct *tsk) { } #else extern void <API key>(struct task_struct *tsk); #endif #if defined(CONFIG_TINY_RCU) || defined(<API key>) static inline void rcu_nmi_enter(void) { } static inline void rcu_nmi_exit(void) { } #else extern void rcu_nmi_enter(void); extern void rcu_nmi_exit(void); #endif /* * It is safe to do non-atomic ops on ->hardirq_context, * because NMI handlers may not preempt and the ops are * always balanced, so the interrupted value of ->hardirq_context * will always be restored. */ #define __irq_enter() \ do { \ <API key>(current); \ add_preempt_count(HARDIRQ_OFFSET); \ trace_hardirq_enter(); \ } while (0) /* * Enter irq context (on NO_HZ, update jiffies): */ extern void irq_enter(void); /* * Exit irq context without processing softirqs: */ #define __irq_exit() \ do { \ trace_hardirq_exit(); \ <API key>(current); \ sub_preempt_count(HARDIRQ_OFFSET); \ } while (0) /* * Exit irq context and process softirqs if needed: */ extern void irq_exit(void); #define nmi_enter() \ do { \ ftrace_nmi_enter(); \ BUG_ON(in_nmi()); \ add_preempt_count(NMI_OFFSET + HARDIRQ_OFFSET); \ lockdep_off(); \ rcu_nmi_enter(); \ trace_hardirq_enter(); \ } while (0) #define nmi_exit() \ do { \ trace_hardirq_exit(); \ rcu_nmi_exit(); \ lockdep_on(); \ BUG_ON(!in_nmi()); \ sub_preempt_count(NMI_OFFSET + HARDIRQ_OFFSET); \ ftrace_nmi_exit(); \ } while (0) #endif /* LINUX_HARDIRQ_H */
<?php /* * Description : front page video search page layout */ ?>
// m25pxx.c // SPI flash driver for Numonyx M25Pxx devices and compatibles. // // This file is part of eCos, the Embedded Configurable Operating System. // eCos is free software; you can redistribute it and/or modify it under // Software Foundation; either version 2 or (at your option) any later // version. // eCos is distributed in the hope that it will be useful, but WITHOUT // for more details. // along with eCos; if not, write to the Free Software Foundation, Inc., // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // As a special exception, if other files instantiate templates or use // macros or inline functions from this file, or you compile this file // and link it with other works to produce a work based on this file, // this file does not by itself cause the resulting work to be covered by // must still be made available in accordance with section (3) of the GNU // This exception does not invalidate any other reasons why a work based // // // Author(s): Chris Holgate // Purpose: Numonyx M25Pxx SPI flash driver implementation // #include <cyg/io/spi.h> #include <cyg/io/flash.h> #include <cyg/io/flash_dev.h> #include <cyg/infra/cyg_type.h> #include <cyg/infra/cyg_ass.h> #include <pkgconf/<API key>.h> #include <string.h> // Enable polled SPI operation for non-kernel builds. #ifdef CYGPKG_KERNEL #define M25PXX_POLLED false #else #define M25PXX_POLLED true #endif // Implement delay functions for kernel and non-kernel builds. The kernel // build assumes that the API calls are made in the thread context. #ifdef CYGPKG_KERNEL #define M25PXX_DELAY_MS(_msdelay_) cyg_thread_delay (\ 1 + ((1000 * _msdelay_ * <API key>) / (<API key> / 1000))) #else #define M25PXX_DELAY_MS(_msdelay_) <API key> (_msdelay_ * 1000) #endif // Maintenance and debug macros. #define TODO_M25P(_msg_) CYG_ASSERT(false, "TODO (M25P) : " _msg_) #define FAIL_M25P(_msg_) CYG_ASSERT(false, "FAIL (M25P) : " _msg_) #define ASSERT_M25P(_test_, _msg_) CYG_ASSERT(_test_, "FAIL (M25P) : " _msg_) #define TRACE_M25P(_msg_, _args_...) if (dev->pf) dev->pf ("M25PXX : " _msg_, ##_args_) // Define M25Pxx SPI protocol. typedef enum m25pxx_cmd { M25PXX_CMD_WREN = 0x06, // Write enable. M25PXX_CMD_WDRI = 0x04, // Write disable. M25PXX_CMD_RDID = 0x9F, // Read identification. M25PXX_CMD_RDSR = 0x05, // Read status register. M25PXX_CMD_WRSR = 0x01, // Write status register. M25PXX_CMD_READ = 0x03, // Read data. M25PXX_CMD_FREAD = 0x0B, // Read data (fast transaction). M25PXX_CMD_PP = 0x02, // Page program. M25PXX_CMD_SE = 0x20, //0xD8, // Sector erase. // Modified for MX25L1606E by reille 2013.05.26 M25PXX_CMD_BE = 0xC7, // Bulk erase. M25PXX_CMD_RES = 0xAB, // Read electronic signature. } m25pxx_cmd; // Status register bitfields. #define M25PXX_STATUS_WIP 0x01 /* Write in progress. */ #define M25PXX_STATUS_WEL 0x02 /* Write enable latch. */ #define M25PXX_STATUS_BP0 0x04 /* Block protect 0. */ #define M25PXX_STATUS_BP1 0x08 /* Block protect 1. */ #define M25PXX_STATUS_BP2 0x10 /* Block protect 2. */ #define M25PXX_STATUS_SRWD 0x80 /* Status register write protect. */ // Page size of 256 bytes appears to be common for all devices. #define M25PXX_PAGE_SIZE 256 // Array containing a list of supported devices. This allows the device // parameters to be dynamically detected on initialisation. typedef struct m25pxx_params { cyg_uint16 sector_size; // Number of pages in a sector. cyg_uint16 sector_count; // Number of sectors on device. cyg_uint32 jedec_id; // 3 byte JEDEC identifier for this device. } m25pxx_params; static const m25pxx_params <API key> [] = { { // Support for Numonyx 128 MBit devices. sector_size : 1024, sector_count : 64, jedec_id : 0x00202018 }, { // Support for Numonyx 64 MBit devices. sector_size : 256, sector_count : 128, jedec_id : 0x00202017 }, { // Support for Numonyx 16 MBit devices. sector_size : 256, sector_count : 64, jedec_id : 0x00202016 }, { // Support for Numonyx 16 MBit devices. sector_size : 16, // 256, // Modified for MX25L1606E by reille 2013.05.26 sector_count : 512, // 32, // Modified for MX25L1606E by reille 2013.05.26 jedec_id : 0x00C22015, // 0x00202015 // Modified for MX25L1606E by reille 2013.05.26 }, { // Support for Numonyx 8 MBit devices. sector_size : 256, sector_count : 16, jedec_id : 0x00202014 }, { // Support for Numonyx 4 MBit devices. sector_size : 256, sector_count : 8, jedec_id : 0x00202013 }, { // Support for Numonyx 2 MBit devices. sector_size : 256, sector_count : 4, jedec_id : 0x00202012 }, { // Support for Numonyx 1 MBit devices. sector_size : 128, sector_count : 4, jedec_id : 0x00202011 }, { // Support for Numonyx 512 KBit devices. sector_size : 128, sector_count : 2, jedec_id : 0x00202010 }, { // Null terminating entry. sector_size : 0, sector_count : 0, jedec_id : 0 } }; // Utility functions for address calculations. // Strips out any device address offset to give address within device. static cyg_bool <API key> (struct cyg_flash_dev* dev, cyg_flashaddr_t* addr) { cyg_bool retval = false; // Range check address before modifying it. if ((*addr >= dev->start) && (*addr <= dev->end)) { *addr -= dev->start; retval = true; } return retval; } // Wrapper functions for various SPI transactions. // Read back the 3-byte JEDEC ID, returning it as a 32-bit integer. // This function is called during flash initialisation, which can often be // called from the startup/idle thread. This means that we should always use // SPI polled mode in order to prevent the thread from attempting to sleep. static inline cyg_uint32 m25pxx_spi_rdid (struct cyg_flash_dev *dev) { cyg_spi_device* spi_device = (cyg_spi_device*) dev->priv; const cyg_uint8 tx_buf [4] = { M25PXX_CMD_RDID, 0, 0, 0 }; cyg_uint8 rx_buf [4]; cyg_uint32 retval = 0; // Carry out SPI transfer. cyg_spi_transfer (spi_device, true, 4, tx_buf, rx_buf); // Convert 3-byte ID to 32-bit integer. retval |= ((cyg_uint32) rx_buf[1]) << 16; retval |= ((cyg_uint32) rx_buf[2]) << 8; retval |= ((cyg_uint32) rx_buf[3]); return retval; } // Send write enable command. static inline void m25pxx_spi_wren (struct cyg_flash_dev *dev) { cyg_spi_device* spi_device = (cyg_spi_device*) dev->priv; const cyg_uint8 tx_buf [1] = { M25PXX_CMD_WREN }; cyg_spi_transfer (spi_device, M25PXX_POLLED, 1, tx_buf, NULL); } // Send sector erase command. The address parameter is a device local address // within the sector to be erased. static inline void m25pxx_spi_se (struct cyg_flash_dev *dev, cyg_flashaddr_t addr) { cyg_spi_device* spi_device = (cyg_spi_device*) dev->priv; const cyg_uint8 tx_buf [4] = { M25PXX_CMD_SE, (cyg_uint8) (addr >> 16), (cyg_uint8) (addr >> 8), (cyg_uint8) (addr) }; cyg_spi_transfer (spi_device, M25PXX_POLLED, 4, tx_buf, NULL); } // Read and return the 8-bit device status register. static inline cyg_uint8 m25pxx_spi_rdsr (struct cyg_flash_dev *dev) { cyg_spi_device* spi_device = (cyg_spi_device*) dev->priv; const cyg_uint8 tx_buf [2] = { M25PXX_CMD_RDSR, 0 }; cyg_uint8 rx_buf [2]; // Carry out SPI transfer and return the status byte. cyg_spi_transfer (spi_device, M25PXX_POLLED, 2, tx_buf, rx_buf); return rx_buf [1]; } // Program a single page. static inline void m25pxx_spi_pp (struct cyg_flash_dev *dev, cyg_flashaddr_t addr, cyg_uint8* wbuf, cyg_uint32 wbuf_len) { cyg_spi_device* spi_device = (cyg_spi_device*) dev->priv; const cyg_uint8 tx_buf [4] = { M25PXX_CMD_PP, (cyg_uint8) (addr >> 16), (cyg_uint8) (addr >> 8), (cyg_uint8) (addr) }; // Implement the program operation as a multistage SPI transaction. <API key> (spi_device); <API key> (spi_device, M25PXX_POLLED, 4, tx_buf, NULL, false); <API key> (spi_device, M25PXX_POLLED, wbuf_len, wbuf, NULL, false); <API key> (spi_device); } // Implement fast reads to the specified buffer. static inline void m25pxx_spi_fread (struct cyg_flash_dev *dev, cyg_flashaddr_t addr, cyg_uint8* rbuf, cyg_uint32 rbuf_len) { cyg_spi_device* spi_device = (cyg_spi_device*) dev->priv; const cyg_uint8 tx_buf [5] = { M25PXX_CMD_FREAD, (cyg_uint8) (addr >> 16), (cyg_uint8) (addr >> 8), (cyg_uint8) (addr), 0 }; // Implement the read operation as a multistage SPI transaction. <API key> (spi_device); <API key> (spi_device, M25PXX_POLLED, 5, tx_buf, NULL, false); <API key> (spi_device, M25PXX_POLLED, rbuf_len, NULL, rbuf, false); <API key> (spi_device); } // Standard Flash device API. All the following functions assume that a valid // SPI device handle is passed in the 'priv' reference of the flash device // data structure. // Initialise the SPI flash, reading back the flash parameters. static int m25pxx_init (struct cyg_flash_dev *dev) { m25pxx_params* dev_params = (m25pxx_params*) <API key>; cyg_uint32 device_id; int retval = FLASH_ERR_INVALID; // Find the device in the supported devices list. device_id = m25pxx_spi_rdid (dev); while ((dev_params->jedec_id != 0) && (dev_params->jedec_id != device_id)) { dev_params ++; } // Found supported device - update device parameters. M25PXX devices have a // uniform sector distribution, so only 1 block info record is required. if (dev_params->jedec_id != 0) { ASSERT_M25P (dev->num_block_infos == 1, "Only 1 block info record required."); ASSERT_M25P (dev->block_info != NULL, "Null pointer to block info record."); if ((dev->num_block_infos == 1) && (dev->block_info != NULL)) { TRACE_M25P ("Init device with JEDEC ID 0x%06X.\n", device_id); dev->end = dev->start + (M25PXX_PAGE_SIZE * (cyg_flashaddr_t) dev_params->sector_size * (cyg_flashaddr_t) dev_params->sector_count) - 1; // Strictly speaking the block info fields are 'read only'. However, we // have a legitimate reason for updating the contents here and can cast // away the const. ((<API key>*) dev->block_info)->block_size = M25PXX_PAGE_SIZE * (size_t) dev_params->sector_size; ((<API key>*) dev->block_info)->blocks = (cyg_uint32) dev_params->sector_count; retval = FLASH_ERR_OK; } } return retval; } // Erase a single sector of the flash. static int m25pxx_erase_block (struct cyg_flash_dev *dev, cyg_flashaddr_t block_base) { cyg_flashaddr_t local_base = block_base; int retval = FLASH_ERR_INVALID; cyg_uint8 dev_status; // Fix up the block address and send the sector erase command. if (<API key> (dev, &local_base)) { m25pxx_spi_wren (dev); m25pxx_spi_se (dev, local_base); // Spin waiting for the erase to complete. This can take between 1 and 3 // seconds, so we use a polling interval of 1/2 sec. do { M25PXX_DELAY_MS (500); dev_status = m25pxx_spi_rdsr (dev); } while (dev_status & M25PXX_STATUS_WIP); retval = FLASH_ERR_OK; } return retval; } // Program an arbitrary number of pages into flash and verify written data. static int m25pxx_program (struct cyg_flash_dev *dev, cyg_flashaddr_t base, const void* data, size_t len) { cyg_flashaddr_t local_base = base; int retval = FLASH_ERR_OK; cyg_uint8* tx_ptr = (cyg_uint8*) data; cyg_uint32 tx_bytes_left = (cyg_uint32) len; cyg_uint32 tx_bytes; cyg_uint8 dev_status; // Fix up the block address. if (!<API key> (dev, &local_base)) { retval = FLASH_ERR_INVALID; goto out; } // The start of the transaction may not be page aligned, so we need to work // out how many bytes to transmit before we hit the first page boundary. tx_bytes = M25PXX_PAGE_SIZE - (((cyg_uint32) local_base) & (M25PXX_PAGE_SIZE - 1)); if (tx_bytes > tx_bytes_left) tx_bytes = tx_bytes_left; // Perform page program operations. while (tx_bytes_left) { m25pxx_spi_wren (dev); m25pxx_spi_pp (dev, local_base, tx_ptr, tx_bytes); // Spin waiting for write to complete. This can take up to 5ms, so // we use a polling interval of 1ms - which may get rounded up to the // RTC tick granularity. do { M25PXX_DELAY_MS (1); dev_status = m25pxx_spi_rdsr (dev); } while (dev_status & M25PXX_STATUS_WIP); // Update counters and data pointers for the next page. tx_bytes_left -= tx_bytes; tx_ptr += tx_bytes; local_base += tx_bytes; tx_bytes = (tx_bytes_left > M25PXX_PAGE_SIZE) ? M25PXX_PAGE_SIZE : tx_bytes_left; } out: return retval; } // Read back an arbitrary amount of data from flash. static int m25pxx_read (struct cyg_flash_dev *dev, const cyg_flashaddr_t base, void* data, size_t len) { cyg_flashaddr_t local_base = base; int retval = FLASH_ERR_INVALID; cyg_uint8* rx_ptr = (cyg_uint8*) data; cyg_uint32 rx_bytes_left = (cyg_uint32) len; cyg_uint32 rx_bytes; // Determine the maximum transfer size to use. cyg_uint32 rx_block_size = (<API key> == 0) ? 0xFFFFFFFF : <API key>; // Fix up the block address and fill the read buffer. if (<API key> (dev, &local_base)) { while (rx_bytes_left) { rx_bytes = (rx_bytes_left < rx_block_size) ? rx_bytes_left : rx_block_size; m25pxx_spi_fread (dev, local_base, rx_ptr, rx_bytes); // Update counters and data pointers for next read block. rx_bytes_left -= rx_bytes; rx_ptr += rx_bytes; local_base += rx_bytes; } retval = FLASH_ERR_OK; } return retval; } // Fill in the driver data structures. CYG_FLASH_FUNS ( <API key>, // Exported name of function pointers. m25pxx_init, // Flash initialisation. <API key>, // Query operations not supported. m25pxx_erase_block, // Sector erase. m25pxx_program, // Program multiple pages. m25pxx_read, // Read arbitrary amount of data. <API key>, // Locking not supported (no per-sector locks). <API key> );