code
stringlengths 3
1.05M
| repo_name
stringlengths 4
116
| path
stringlengths 3
942
| language
stringclasses 30
values | license
stringclasses 15
values | size
int32 3
1.05M
|
---|---|---|---|---|---|
/* iCalByDayMask.h - this file is part of SOPE
*
* Copyright (C) 2010-2015 Inverse inc.
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef ICALBYDAYMASK_H
#define ICALBYDAYMASK_H
#import <Foundation/NSObject.h>
#import "iCalRecurrenceRule.h"
typedef enum {
iCalWeekOccurrenceFirst = 0x001, // order
iCalWeekOccurrenceSecond = 0x002, // 2^(order - 1)
iCalWeekOccurrenceThird = 0x004,
iCalWeekOccurrenceFourth = 0x008,
iCalWeekOccurrenceFifth = 0x010,
iCalWeekOccurrenceAll = 0x3ff,
iCalWeekOccurrenceLast = 0x020, // 2^(order - 1) >> 5
iCalWeekOccurrenceSecondLast = 0x040,
iCalWeekOccurrenceThirdLast = 0x080,
iCalWeekOccurrenceFourthLast = 0x100,
iCalWeekOccurrenceFifthLast = 0x200,
} iCalWeekOccurrence;
typedef iCalWeekOccurrence iCalWeekOccurrences[7];
// extern NSString *iCalWeekOccurrenceString[];
@interface iCalByDayMask : NSObject
{
iCalWeekOccurrences days;
}
+ (id) byDayMaskWithDays: (iCalWeekOccurrences) theDays;
+ (id) byDayMaskWithWeekDays;
- (id) initWithDays: (iCalWeekOccurrences) theDays;
+ (id) byDayMaskWithRuleString: (NSString *) byDayRule;
- (id) initWithRuleString: (NSString *) byDayRule;
+ (id) byDayMaskWithDaysAndOccurrences: (NSArray *) values;
- (id) initWithDaysAndOccurrences: (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 *) asRuleStringWithIntegers;
- (NSArray *) asRuleArray;
@end
#endif /* ICALBYDAYMASK_H */
| saydulk/sogo | SOPE/NGCards/iCalByDayMask.h | C | gpl-2.0 | 2,502 |
package teammates.test.cases.action;
import org.testng.annotations.Test;
import teammates.common.datatransfer.DataBundle;
import teammates.common.datatransfer.attributes.FeedbackQuestionAttributes;
import teammates.common.datatransfer.attributes.FeedbackResponseAttributes;
import teammates.common.datatransfer.attributes.FeedbackSessionAttributes;
import teammates.common.datatransfer.attributes.InstructorAttributes;
import teammates.common.datatransfer.questions.FeedbackNumericalScaleQuestionDetails;
import teammates.common.exception.NullPostParameterException;
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.InstructorFeedbackSubmissionEditSaveAction;
import teammates.ui.controller.RedirectResult;
/**
* SUT: {@link InstructorFeedbackSubmissionEditSaveAction}.
*/
public class InstructorFeedbackSubmissionEditSaveActionTest extends BaseActionTest {
private static final CoursesLogic coursesLogic = CoursesLogic.inst();
private final FeedbackSessionsDb fsDb = new FeedbackSessionsDb();
@Override
protected String getActionUri() {
return Const.ActionURIs.INSTRUCTOR_FEEDBACK_SUBMISSION_EDIT_SAVE;
}
@Override
protected void prepareTestData() {
super.prepareTestData();
dataBundle = loadDataBundle("/InstructorFeedbackSubmissionEditSaveActionTest.json");
removeAndRestoreDataBundle(dataBundle);
}
@Override
@Test
public void testExecuteAndPostProcess() {
prepareTestData();
InstructorAttributes instructor1InCourse1 = dataBundle.getInstructors().get("instructor1InCourse1");
gaeSimulation.loginAsInstructor(instructor1InCourse1.googleId);
______TS("Unsuccessful case: test empty feedback session name parameter");
String[] submissionParams = new String[]{
Const.ParamsNames.COURSE_ID, dataBundle.getFeedbackResponses().get("response1ForQ1S1C1").courseId
};
InstructorFeedbackSubmissionEditSaveAction a;
RedirectResult r;
try {
a = getAction(submissionParams);
r = getRedirectResult(a);
signalFailureToDetectException("Did not detect that parameters are null.");
} catch (NullPostParameterException e) {
assertEquals(String.format(Const.StatusCodes.NULL_POST_PARAMETER,
Const.ParamsNames.FEEDBACK_SESSION_NAME), e.getMessage());
}
______TS("Unsuccessful case: test empty course id parameter");
submissionParams = new String[]{
Const.ParamsNames.FEEDBACK_SESSION_NAME,
dataBundle.getFeedbackResponses().get("response1ForQ1S1C1").feedbackSessionName
};
try {
a = getAction(submissionParams);
r = getRedirectResult(a);
signalFailureToDetectException("Did not detect that parameters are null.");
} catch (NullPostParameterException 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();
FeedbackQuestionAttributes fq = fqDb.getFeedbackQuestion("First Session", "idOfCourse1", 1);
assertNotNull("Feedback question not found in database", fq);
FeedbackResponsesDb frDb = new FeedbackResponsesDb();
FeedbackResponseAttributes fr = dataBundle.getFeedbackResponses().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);
instructor1InCourse1 = dataBundle.getInstructors().get("instructor1InCourse1");
gaeSimulation.loginAsInstructor(instructor1InCourse1.googleId);
submissionParams = new String[]{
Const.ParamsNames.FEEDBACK_QUESTION_RESPONSETOTAL + "-1", "1",
Const.ParamsNames.FEEDBACK_RESPONSE_ID + "-1-0", fr.getId(),
Const.ParamsNames.FEEDBACK_SESSION_NAME, fr.feedbackSessionName,
Const.ParamsNames.COURSE_ID, fr.courseId,
Const.ParamsNames.FEEDBACK_QUESTION_ID + "-1", fr.feedbackQuestionId,
Const.ParamsNames.FEEDBACK_RESPONSE_RECIPIENT + "-1-0", fr.recipient,
Const.ParamsNames.FEEDBACK_QUESTION_TYPE + "-1", fr.feedbackQuestionType.toString(),
Const.ParamsNames.FEEDBACK_RESPONSE_TEXT + "-1-0", "Edited" + fr.getResponseDetails().getAnswerString()
};
a = getAction(submissionParams);
r = getRedirectResult(a);
assertFalse(r.isError);
assertEquals(Const.StatusMessages.FEEDBACK_RESPONSES_SAVED, r.getStatusMessage());
assertEquals(
getPageResultDestination(Const.ActionURIs.INSTRUCTOR_HOME_PAGE, r.isError, "instructor1InCourse1"),
r.getDestinationWithParams());
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.FEEDBACK_QUESTION_RESPONSETOTAL + "-1", "1",
Const.ParamsNames.FEEDBACK_RESPONSE_ID + "-1-0", fr.getId(),
Const.ParamsNames.FEEDBACK_SESSION_NAME, fr.feedbackSessionName,
Const.ParamsNames.COURSE_ID, fr.courseId,
Const.ParamsNames.FEEDBACK_QUESTION_ID + "-1", fr.feedbackQuestionId,
Const.ParamsNames.FEEDBACK_RESPONSE_RECIPIENT + "-1-0", fr.recipient,
Const.ParamsNames.FEEDBACK_QUESTION_TYPE + "-1", fr.feedbackQuestionType.toString(),
Const.ParamsNames.FEEDBACK_RESPONSE_TEXT + "-1-0", "",
Const.ParamsNames.SEND_SUBMISSION_EMAIL, "on"
};
a = getAction(submissionParams);
r = getRedirectResult(a);
assertFalse(r.isError);
assertEquals(Const.StatusMessages.FEEDBACK_RESPONSES_SAVED, r.getStatusMessage());
assertEquals(
getPageResultDestination(
Const.ActionURIs.INSTRUCTOR_HOME_PAGE, r.isError, "instructor1InCourse1"),
r.getDestinationWithParams());
assertNull(frDb.getFeedbackResponse(fq.getId(), fr.giver, fr.recipient));
// submission confirmation email sent
verifyNumberOfEmailsSent(a, 1);
EmailWrapper email = getEmailsSent(a).get(0);
String courseName = coursesLogic.getCourse(fr.courseId).getName();
assertEquals(String.format(EmailType.FEEDBACK_SUBMISSION_CONFIRMATION.getSubject(), courseName,
fr.feedbackSessionName),
email.getSubject());
assertEquals(instructor1InCourse1.email, email.getRecipient());
______TS("Successful case: skipped question");
submissionParams = new String[]{
Const.ParamsNames.FEEDBACK_QUESTION_RESPONSETOTAL + "-1", "1",
Const.ParamsNames.FEEDBACK_SESSION_NAME, fr.feedbackSessionName,
Const.ParamsNames.COURSE_ID, fr.courseId,
Const.ParamsNames.FEEDBACK_QUESTION_ID + "-1", fr.feedbackQuestionId,
Const.ParamsNames.FEEDBACK_RESPONSE_RECIPIENT + "-1-0", fr.recipient,
Const.ParamsNames.FEEDBACK_QUESTION_TYPE + "-1", fr.feedbackQuestionType.toString(),
Const.ParamsNames.FEEDBACK_RESPONSE_TEXT + "-1-0", "",
Const.ParamsNames.SEND_SUBMISSION_EMAIL, "off"
};
a = getAction(submissionParams);
r = getRedirectResult(a);
assertFalse(r.isError);
assertEquals(Const.StatusMessages.FEEDBACK_RESPONSES_SAVED, r.getStatusMessage());
assertEquals(
getPageResultDestination(
Const.ActionURIs.INSTRUCTOR_HOME_PAGE, r.isError, "instructor1InCourse1"),
r.getDestinationWithParams());
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.FEEDBACK_QUESTION_RESPONSETOTAL + "-1", "1",
Const.ParamsNames.FEEDBACK_SESSION_NAME, fr.feedbackSessionName,
Const.ParamsNames.COURSE_ID, fr.courseId,
Const.ParamsNames.FEEDBACK_QUESTION_ID + "-1", fr.feedbackQuestionId,
Const.ParamsNames.FEEDBACK_RESPONSE_RECIPIENT + "-1-0", fr.recipient,
Const.ParamsNames.FEEDBACK_QUESTION_TYPE + "-1", fr.feedbackQuestionType.toString(),
Const.ParamsNames.FEEDBACK_RESPONSE_TEXT + "-1-0", "New " + fr.getResponseDetails().getAnswerString()
};
a = getAction(submissionParams);
r = getRedirectResult(a);
assertFalse(r.isError);
assertEquals(Const.StatusMessages.FEEDBACK_RESPONSES_SAVED, r.getStatusMessage());
assertEquals(
getPageResultDestination(
Const.ActionURIs.INSTRUCTOR_HOME_PAGE, r.isError, "instructor1InCourse1"),
r.getDestinationWithParams());
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.getFeedbackResponses().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.FEEDBACK_QUESTION_RESPONSETOTAL + "-2", "1",
Const.ParamsNames.FEEDBACK_RESPONSE_ID + "-2-0", fr.getId(),
Const.ParamsNames.FEEDBACK_SESSION_NAME, fr.feedbackSessionName,
Const.ParamsNames.COURSE_ID, fr.courseId,
Const.ParamsNames.FEEDBACK_QUESTION_ID + "-2", fr.feedbackQuestionId,
Const.ParamsNames.FEEDBACK_RESPONSE_RECIPIENT + "-2-0", "[email protected]",
Const.ParamsNames.FEEDBACK_QUESTION_TYPE + "-2", fr.feedbackQuestionType.toString(),
Const.ParamsNames.FEEDBACK_RESPONSE_TEXT + "-2-0", "Edited" + fr.getResponseDetails().getAnswerString()
};
a = getAction(submissionParams);
r = getRedirectResult(a);
assertFalse(r.isError);
assertEquals(Const.StatusMessages.FEEDBACK_RESPONSES_SAVED, r.getStatusMessage());
assertEquals(
getPageResultDestination(
Const.ActionURIs.INSTRUCTOR_HOME_PAGE, r.isError, "instructor1InCourse1"),
r.getDestinationWithParams());
assertNull(frDb.getFeedbackResponse(fq.getId(), fr.giver, fr.recipient));
______TS("Successful case: new response, did not specify recipient");
submissionParams = new String[]{
Const.ParamsNames.FEEDBACK_QUESTION_RESPONSETOTAL + "-2", "1",
Const.ParamsNames.FEEDBACK_SESSION_NAME, fr.feedbackSessionName,
Const.ParamsNames.COURSE_ID, fr.courseId,
Const.ParamsNames.FEEDBACK_QUESTION_ID + "-2", fr.feedbackQuestionId,
Const.ParamsNames.FEEDBACK_RESPONSE_RECIPIENT + "-2-0", "[email protected]",
Const.ParamsNames.FEEDBACK_QUESTION_TYPE + "-2", fr.feedbackQuestionType.toString(),
Const.ParamsNames.FEEDBACK_RESPONSE_TEXT + "-2-0", fr.getResponseDetails().getAnswerString()
};
a = getAction(submissionParams);
r = getRedirectResult(a);
assertFalse(r.isError);
assertEquals(Const.StatusMessages.FEEDBACK_RESPONSES_SAVED, r.getStatusMessage());
assertEquals(
getPageResultDestination(
Const.ActionURIs.INSTRUCTOR_HOME_PAGE, r.isError, "instructor1InCourse1"),
r.getDestinationWithParams());
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.getFeedbackResponses().get("response1ForPrivateSession");
// 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.FEEDBACK_QUESTION_RESPONSETOTAL + "-1", "1",
Const.ParamsNames.FEEDBACK_RESPONSE_ID + "-1-0", fr.getId(),
Const.ParamsNames.FEEDBACK_SESSION_NAME, fr.feedbackSessionName,
Const.ParamsNames.COURSE_ID, fr.courseId,
Const.ParamsNames.FEEDBACK_QUESTION_ID + "-1", fr.feedbackQuestionId,
Const.ParamsNames.FEEDBACK_RESPONSE_RECIPIENT + "-1-0", fr.recipient,
Const.ParamsNames.FEEDBACK_QUESTION_TYPE + "-1", fr.feedbackQuestionType.toString(),
Const.ParamsNames.FEEDBACK_RESPONSE_TEXT + "-1-0", "Edited" + fr.getResponseDetails().getAnswerString()
};
a = getAction(submissionParams);
r = getRedirectResult(a);
assertFalse(r.isError);
assertEquals(Const.StatusMessages.FEEDBACK_RESPONSES_SAVED, r.getStatusMessage());
assertEquals(
getPageResultDestination(
Const.ActionURIs.INSTRUCTOR_HOME_PAGE, r.isError, "instructor1InCourse1"),
r.getDestinationWithParams());
assertNotNull(frDb.getFeedbackResponse(fq.getId(), fr.giver, fr.recipient));
______TS("Unsuccessful case: modified recipient to invalid recipient");
submissionParams = new String[]{
Const.ParamsNames.FEEDBACK_QUESTION_RESPONSETOTAL + "-1", "1",
Const.ParamsNames.FEEDBACK_RESPONSE_ID + "-1-0", fr.getId(),
Const.ParamsNames.FEEDBACK_SESSION_NAME, fr.feedbackSessionName,
Const.ParamsNames.COURSE_ID, fr.courseId,
Const.ParamsNames.FEEDBACK_QUESTION_ID + "-1", fr.feedbackQuestionId,
Const.ParamsNames.FEEDBACK_RESPONSE_RECIPIENT + "-1-0", "invalid_recipient_email",
Const.ParamsNames.FEEDBACK_QUESTION_TYPE + "-1", fr.feedbackQuestionType.toString(),
Const.ParamsNames.FEEDBACK_RESPONSE_TEXT + "-1-0", fr.getResponseDetails().getAnswerString(),
Const.ParamsNames.SEND_SUBMISSION_EMAIL, "on"
};
a = getAction(submissionParams);
r = getRedirectResult(a);
assertTrue(r.isError);
assertEquals(
getPageResultDestination(
Const.ActionURIs.INSTRUCTOR_HOME_PAGE, r.isError, "instructor1InCourse1"),
r.getDestinationWithParams());
assertNull(frDb.getFeedbackResponse(fq.getId(), fr.giver, "invalid_recipient_email"));
// 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("/FeedbackSessionQuestionTypeTest.json");
removeAndRestoreDataBundle(dataBundle);
fq = fqDb.getFeedbackQuestion("MCQ Session", "FSQTT.idOfTypicalCourse1", 2);
assertNotNull("Feedback question not found in database", fq);
fr = dataBundle.getFeedbackResponses().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);
instructor1InCourse1 = dataBundle.getInstructors().get("instructor1OfCourse1");
gaeSimulation.loginAsInstructor(instructor1InCourse1.googleId);
submissionParams = new String[]{
Const.ParamsNames.FEEDBACK_QUESTION_RESPONSETOTAL + "-1", "1",
Const.ParamsNames.FEEDBACK_RESPONSE_ID + "-1-0", fr.getId(),
Const.ParamsNames.FEEDBACK_SESSION_NAME, fr.feedbackSessionName,
Const.ParamsNames.COURSE_ID, fr.courseId,
Const.ParamsNames.FEEDBACK_QUESTION_ID + "-1", fr.feedbackQuestionId,
Const.ParamsNames.FEEDBACK_RESPONSE_RECIPIENT + "-1-0", fr.recipient,
Const.ParamsNames.FEEDBACK_QUESTION_TYPE + "-1", fr.feedbackQuestionType.toString(),
Const.ParamsNames.FEEDBACK_RESPONSE_TEXT + "-1-0", "It's perfect"
};
a = getAction(submissionParams);
r = getRedirectResult(a);
assertFalse(r.isError);
assertEquals(Const.StatusMessages.FEEDBACK_RESPONSES_SAVED, r.getStatusMessage());
assertEquals(
getPageResultDestination(
Const.ActionURIs.INSTRUCTOR_HOME_PAGE, r.isError, "FSQTT.idOfInstructor1OfCourse1"),
r.getDestinationWithParams());
assertNotNull(frDb.getFeedbackResponse(fq.getId(), fr.giver, fr.recipient));
______TS("Successful case: mcq: question skipped");
submissionParams = new String[]{
Const.ParamsNames.FEEDBACK_QUESTION_RESPONSETOTAL + "-1", "1",
Const.ParamsNames.FEEDBACK_RESPONSE_ID + "-1-0", fr.getId(),
Const.ParamsNames.FEEDBACK_SESSION_NAME, fr.feedbackSessionName,
Const.ParamsNames.COURSE_ID, fr.courseId,
Const.ParamsNames.FEEDBACK_QUESTION_ID + "-1", fr.feedbackQuestionId,
Const.ParamsNames.FEEDBACK_RESPONSE_RECIPIENT + "-1-0", fr.recipient,
Const.ParamsNames.FEEDBACK_QUESTION_TYPE + "-1", fr.feedbackQuestionType.toString()
};
a = getAction(submissionParams);
r = getRedirectResult(a);
assertFalse(r.isError);
assertEquals(Const.StatusMessages.FEEDBACK_RESPONSES_SAVED, r.getStatusMessage());
assertEquals(
getPageResultDestination(
Const.ActionURIs.INSTRUCTOR_HOME_PAGE, r.isError, "FSQTT.idOfInstructor1OfCourse1"),
r.getDestinationWithParams());
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.getFeedbackResponses().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);
instructor1InCourse1 = dataBundle.getInstructors().get("instructor1OfCourse1");
gaeSimulation.loginAsInstructor(instructor1InCourse1.googleId);
submissionParams = new String[]{
Const.ParamsNames.FEEDBACK_QUESTION_RESPONSETOTAL + "-1", "1",
Const.ParamsNames.FEEDBACK_RESPONSE_ID + "-1-0", fr.getId(),
Const.ParamsNames.FEEDBACK_SESSION_NAME, fr.feedbackSessionName,
Const.ParamsNames.COURSE_ID, fr.courseId,
Const.ParamsNames.FEEDBACK_QUESTION_ID + "-1", fr.feedbackQuestionId,
Const.ParamsNames.FEEDBACK_RESPONSE_RECIPIENT + "-1-0", fr.recipient,
Const.ParamsNames.FEEDBACK_QUESTION_TYPE + "-1", fr.feedbackQuestionType.toString(),
Const.ParamsNames.FEEDBACK_RESPONSE_TEXT + "-1-0", "It's perfect"
};
a = getAction(submissionParams);
r = getRedirectResult(a);
assertFalse(r.isError);
assertEquals(Const.StatusMessages.FEEDBACK_RESPONSES_SAVED, r.getStatusMessage());
assertEquals(
getPageResultDestination(
Const.ActionURIs.INSTRUCTOR_HOME_PAGE, r.isError, "FSQTT.idOfInstructor1OfCourse1"),
r.getDestinationWithParams());
assertNotNull(frDb.getFeedbackResponse(fq.getId(), fr.giver, fr.recipient));
______TS("Successful csae: msq: question skipped");
submissionParams = new String[]{
Const.ParamsNames.FEEDBACK_QUESTION_RESPONSETOTAL + "-1", "1",
Const.ParamsNames.FEEDBACK_RESPONSE_ID + "-1-0", fr.getId(),
Const.ParamsNames.FEEDBACK_SESSION_NAME, fr.feedbackSessionName,
Const.ParamsNames.COURSE_ID, fr.courseId,
Const.ParamsNames.FEEDBACK_QUESTION_ID + "-1", fr.feedbackQuestionId,
Const.ParamsNames.FEEDBACK_RESPONSE_RECIPIENT + "-1-0", fr.recipient,
Const.ParamsNames.FEEDBACK_QUESTION_TYPE + "-1", fr.feedbackQuestionType.toString()
};
a = getAction(submissionParams);
r = getRedirectResult(a);
assertFalse(r.isError);
assertEquals(Const.StatusMessages.FEEDBACK_RESPONSES_SAVED, r.getStatusMessage());
assertEquals(
getPageResultDestination(
Const.ActionURIs.INSTRUCTOR_HOME_PAGE, r.isError, "FSQTT.idOfInstructor1OfCourse1"),
r.getDestinationWithParams());
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);
FeedbackNumericalScaleQuestionDetails fqd =
(FeedbackNumericalScaleQuestionDetails) fq.getQuestionDetails();
fr = dataBundle.getFeedbackResponses().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);
instructor1InCourse1 = dataBundle.getInstructors().get("instructor1OfCourse1");
gaeSimulation.loginAsInstructor(instructor1InCourse1.googleId);
submissionParams = new String[]{
Const.ParamsNames.FEEDBACK_QUESTION_RESPONSETOTAL + "-1", "1",
Const.ParamsNames.FEEDBACK_RESPONSE_ID + "-1-0", fr.getId(),
Const.ParamsNames.FEEDBACK_SESSION_NAME, fr.feedbackSessionName,
Const.ParamsNames.COURSE_ID, fr.courseId,
Const.ParamsNames.FEEDBACK_QUESTION_ID + "-1", fr.feedbackQuestionId,
Const.ParamsNames.FEEDBACK_RESPONSE_RECIPIENT + "-1-0", fr.recipient,
Const.ParamsNames.FEEDBACK_QUESTION_TYPE + "-1", fr.feedbackQuestionType.toString(),
Const.ParamsNames.FEEDBACK_RESPONSE_TEXT + "-1-0", "3.5",
Const.ParamsNames.FEEDBACK_QUESTION_NUMSCALE_MIN + "-1-0", Integer.toString(fqd.getMinScale()),
Const.ParamsNames.FEEDBACK_QUESTION_NUMSCALE_MAX + "-1-0", Integer.toString(fqd.getMaxScale()),
Const.ParamsNames.FEEDBACK_QUESTION_NUMSCALE_STEP + "-1-0", StringHelper.toDecimalFormatString(fqd.getStep())
};
a = getAction(submissionParams);
r = getRedirectResult(a);
assertFalse(r.isError);
assertEquals(Const.StatusMessages.FEEDBACK_RESPONSES_SAVED, r.getStatusMessage());
assertEquals(
getPageResultDestination(
Const.ActionURIs.INSTRUCTOR_HOME_PAGE, r.isError, "FSQTT.idOfInstructor1OfCourse1"),
r.getDestinationWithParams());
assertNotNull(frDb.getFeedbackResponse(fq.getId(), fr.giver, fr.recipient));
______TS("Successful case: numerical scale: question skipped");
submissionParams = new String[]{
Const.ParamsNames.FEEDBACK_QUESTION_RESPONSETOTAL + "-1", "1",
Const.ParamsNames.FEEDBACK_RESPONSE_ID + "-1-0", fr.getId(),
Const.ParamsNames.FEEDBACK_SESSION_NAME, fr.feedbackSessionName,
Const.ParamsNames.COURSE_ID, fr.courseId,
Const.ParamsNames.FEEDBACK_QUESTION_ID + "-1", fr.feedbackQuestionId,
Const.ParamsNames.FEEDBACK_RESPONSE_RECIPIENT + "-1-0", fr.recipient,
Const.ParamsNames.FEEDBACK_QUESTION_TYPE + "-1", fr.feedbackQuestionType.toString(),
Const.ParamsNames.FEEDBACK_RESPONSE_TEXT + "-1-0", "",
Const.ParamsNames.FEEDBACK_QUESTION_NUMSCALE_MIN + "-1-0", Integer.toString(fqd.getMinScale()),
Const.ParamsNames.FEEDBACK_QUESTION_NUMSCALE_MAX + "-1-0", Integer.toString(fqd.getMaxScale()),
Const.ParamsNames.FEEDBACK_QUESTION_NUMSCALE_STEP + "-1-0", StringHelper.toDecimalFormatString(fqd.getStep())
};
a = getAction(submissionParams);
r = getRedirectResult(a);
assertFalse(r.isError);
assertEquals(Const.StatusMessages.FEEDBACK_RESPONSES_SAVED, r.getStatusMessage());
assertEquals(
getPageResultDestination(
Const.ActionURIs.INSTRUCTOR_HOME_PAGE, r.isError, "FSQTT.idOfInstructor1OfCourse1"),
r.getDestinationWithParams());
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.getFeedbackResponses().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);
FeedbackResponseAttributes fr2 = dataBundle.getFeedbackResponses().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);
instructor1InCourse1 = dataBundle.getInstructors().get("instructor1OfCourse1");
gaeSimulation.loginAsInstructor(instructor1InCourse1.googleId);
submissionParams = new String[]{
Const.ParamsNames.FEEDBACK_QUESTION_RESPONSETOTAL + "-1", "2",
Const.ParamsNames.FEEDBACK_RESPONSE_ID + "-1-0", fr.getId(),
Const.ParamsNames.FEEDBACK_SESSION_NAME, fr.feedbackSessionName,
Const.ParamsNames.COURSE_ID, fr.courseId,
Const.ParamsNames.FEEDBACK_QUESTION_ID + "-1", fr.feedbackQuestionId,
Const.ParamsNames.FEEDBACK_RESPONSE_RECIPIENT + "-1-0", fr.recipient,
Const.ParamsNames.FEEDBACK_QUESTION_TYPE + "-1", fr.feedbackQuestionType.toString(),
Const.ParamsNames.FEEDBACK_RESPONSE_TEXT + "-1-0", "150",
//Const sum question needs response to each recipient to sum up properly.
Const.ParamsNames.FEEDBACK_RESPONSE_ID + "-1-1", fr2.getId(),
Const.ParamsNames.FEEDBACK_SESSION_NAME, fr2.feedbackSessionName,
Const.ParamsNames.COURSE_ID, fr2.courseId,
Const.ParamsNames.FEEDBACK_QUESTION_ID + "-1", fr2.feedbackQuestionId,
Const.ParamsNames.FEEDBACK_RESPONSE_RECIPIENT + "-1-1", fr2.recipient,
Const.ParamsNames.FEEDBACK_QUESTION_TYPE + "-1", fr2.feedbackQuestionType.toString(),
Const.ParamsNames.FEEDBACK_RESPONSE_TEXT + "-1-1", "50",
};
a = getAction(submissionParams);
r = getRedirectResult(a);
assertEquals(Const.StatusMessages.FEEDBACK_RESPONSES_SAVED, r.getStatusMessage());
assertFalse(r.isError);
assertEquals(
getPageResultDestination(
Const.ActionURIs.INSTRUCTOR_HOME_PAGE, r.isError, "FSQTT.idOfInstructor1OfCourse1"),
r.getDestinationWithParams());
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.FEEDBACK_QUESTION_RESPONSETOTAL + "-1", "1",
Const.ParamsNames.FEEDBACK_RESPONSE_ID + "-1-0", fr.getId(),
Const.ParamsNames.FEEDBACK_SESSION_NAME, fr.feedbackSessionName,
Const.ParamsNames.COURSE_ID, fr.courseId,
Const.ParamsNames.FEEDBACK_QUESTION_ID + "-1", fr.feedbackQuestionId,
Const.ParamsNames.FEEDBACK_RESPONSE_RECIPIENT + "-1-0", fr.recipient,
Const.ParamsNames.FEEDBACK_QUESTION_TYPE + "-1", fr.feedbackQuestionType.toString(),
Const.ParamsNames.FEEDBACK_RESPONSE_TEXT + "-1-0", ""
};
a = getAction(submissionParams);
r = getRedirectResult(a);
assertFalse(r.isError);
assertEquals(Const.StatusMessages.FEEDBACK_RESPONSES_SAVED, r.getStatusMessage());
assertEquals(
getPageResultDestination(
Const.ActionURIs.INSTRUCTOR_HOME_PAGE, r.isError, "FSQTT.idOfInstructor1OfCourse1"),
r.getDestinationWithParams());
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 testGracePeriodExecuteAndPostProcess() throws Exception {
dataBundle = loadDataBundle("/InstructorFeedbackSubmissionEditSaveActionTest.json");
FeedbackSessionsDb feedbackSessionDb = new FeedbackSessionsDb();
FeedbackSessionAttributes fs = dataBundle.getFeedbackSessions().get("Grace Period Session");
InstructorAttributes instructor = dataBundle.getInstructors().get("instructor1InCourse1");
gaeSimulation.loginAsInstructor(instructor.googleId);
String[] submissionParams = new String[]{
Const.ParamsNames.COURSE_ID, fs.getCourseId(),
Const.ParamsNames.FEEDBACK_SESSION_NAME, fs.getFeedbackSessionName()
};
______TS("opened");
fs.setEndTime(TimeHelper.getDateOffsetToCurrentTime(1));
feedbackSessionDb.updateFeedbackSession(fs);
assertTrue(fs.isOpened());
assertFalse(fs.isInGracePeriod());
InstructorFeedbackSubmissionEditSaveAction a = getAction(submissionParams);
RedirectResult r = getRedirectResult(a);
assertEquals(
getPageResultDestination(
Const.ActionURIs.INSTRUCTOR_HOME_PAGE, false, "instructor1InCourse1"),
r.getDestinationWithParams());
assertEquals(Const.StatusMessages.FEEDBACK_RESPONSES_SAVED, r.getStatusMessage());
assertFalse(r.isError);
______TS("during grace period");
fs.setEndTime(TimeHelper.getDateOffsetToCurrentTime(0));
feedbackSessionDb.updateFeedbackSession(fs);
assertFalse(fs.isOpened());
assertTrue(fs.isInGracePeriod());
a = getAction(submissionParams);
r = getRedirectResult(a);
assertEquals(
getPageResultDestination(Const.ActionURIs.INSTRUCTOR_HOME_PAGE, false, "instructor1InCourse1"),
r.getDestinationWithParams());
assertEquals(Const.StatusMessages.FEEDBACK_RESPONSES_SAVED, r.getStatusMessage());
assertFalse(r.isError);
______TS("after grace period");
fs.setEndTime(TimeHelper.getDateOffsetToCurrentTime(-10));
feedbackSessionDb.updateFeedbackSession(fs);
assertFalse(fs.isOpened());
assertFalse(fs.isInGracePeriod());
a = getAction(submissionParams);
r = getRedirectResult(a);
assertEquals(Const.StatusMessages.FEEDBACK_SUBMISSIONS_NOT_OPEN, r.getStatusMessage());
}
@Override
protected InstructorFeedbackSubmissionEditSaveAction getAction(String... params) {
return (InstructorFeedbackSubmissionEditSaveAction) gaeSimulation.getActionObject(getActionUri(), params);
}
@Override
@Test
protected void testAccessControl() throws Exception {
dataBundle = getTypicalDataBundle();
FeedbackSessionAttributes fs = dataBundle.getFeedbackSessions().get("session1InCourse1");
String[] submissionParams = new String[]{
Const.ParamsNames.COURSE_ID, fs.getCourseId(),
Const.ParamsNames.FEEDBACK_SESSION_NAME, fs.getFeedbackSessionName()
};
verifyUnaccessibleWithoutSubmitSessionInSectionsPrivilege(submissionParams);
verifyOnlyInstructorsOfTheSameCourseCanAccess(submissionParams);
testGracePeriodAccessControlForInstructors();
}
private void testGracePeriodAccessControlForInstructors() throws Exception {
dataBundle = getTypicalDataBundle();
FeedbackSessionAttributes 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.FEEDBACK_SESSION_NAME, fs.getFeedbackSessionName()
};
verifyOnlyInstructorsOfTheSameCourseCanAccess(submissionParams);
}
private void closeSession(FeedbackSessionAttributes fs) throws Exception {
fs.setEndTime(TimeHelper.getDateOffsetToCurrentTime(0));
fsDb.updateFeedbackSession(fs);
}
}
| Gorgony/teammates | src/test/java/teammates/test/cases/action/InstructorFeedbackSubmissionEditSaveActionTest.java | Java | gpl-2.0 | 34,801 |
/*
* Copyright (c) 2001-2006 TIBCO Software Inc.
* All rights reserved.
* For more information, please contact:
* TIBCO Software Inc., Palo Alto, California, USA
*
* $Id: emserr.h 23734 2006-11-21 20:02:10Z $
*
*/
#ifndef _INCLUDED_emserr_h
#define _INCLUDED_emserr_h
#include "types.h"
#include "status.h"
#if defined(__cplusplus)
extern "C" {
#endif
extern tibems_status
tibemsErrorContext_Create(
tibemsErrorContext* errorContext);
extern tibems_status
tibemsErrorContext_Close(
tibemsErrorContext errorContext);
extern tibems_status
tibemsErrorContext_GetLastErrorString(
tibemsErrorContext errorContext,
const char** string);
extern tibems_status
tibemsErrorContext_GetLastErrorStackTrace(
tibemsErrorContext errorContext,
const char** string);
#ifdef __cplusplus
}
#endif
#endif
| shured/TIBCO-Test | include/tibems/emserr.h | C | gpl-2.0 | 895 |
# 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'
#DOMAIN = 'http://hotzenplotz.pythonanywhere.com'
class PersonaAuthenticationBackend(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
| thomec/tango | accounts/authentication.py | Python | gpl-2.0 | 1,296 |
#!/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 [email protected] /home/steel/runscript-absperm.sh"
;;
rwabsperm)
sub="qsub -lwalltime=08:00:00 -lnodes=1:ppn=8 -N $jobdir -M [email protected] /home/steel/rwabsperm.sh"
;;
rwff)
sub="qsub -lwalltime=08:00:00 -lnodes=1:ppn=8 -N $jobdir -M [email protected] /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
| simontakite/sysadmin | cluster/stallo/submitall.sh | Shell | gpl-2.0 | 759 |
/***************************************************************************
* Copyright (C) 2009 by Andrey Afletdinov <[email protected]> *
* *
* Part of the Free Heroes2 Engine: *
* http://sourceforge.net/projects/fheroes2 *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#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
| blchinezu/EZX-Projects | Games/FHeroes2/src/engine/midi_chunk.h | C | gpl-2.0 | 2,213 |
#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; // 性别,1男2女
U32 nSub:8;
U32 nFish:7; //投放的鱼克数(最大100g)
U32 nGears:3; //投放档位
#define _Gear_L0 0 // 无限制
#define _Gear_L1 1 // 1公里
#define _Gear_L2 2 // 4公里
#define _Gear_L3 3 // 8公里
#define _Gear_L4 4 // 20公里
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;
} | opensvn/cpp_primer_5th | set_rec.cc | C++ | gpl-2.0 | 2,553 |
import os
import sys
import subprocess
testP = {
"2005": [
{
"date": "2005-10-17",
"videos": [
"http://thecolbertreport.cc.com/videos/61f6xj/intro---10-17-05",
"http://thecolbertreport.cc.com/videos/w9dr6d/first-show",
"http://thecolbertreport.cc.com/videos/63ite2/the-word---truthiness",
"http://thecolbertreport.cc.com/videos/2hvbwp/threatdown---bird-flu",
"http://thecolbertreport.cc.com/videos/ydz3a0/stone-phillips",
"http://thecolbertreport.cc.com/videos/4ewylv/gravitas-off-with-stone-phillips",
"http://thecolbertreport.cc.com/videos/e3mrnm/sign-off---commemorating-chewbacca-s-american-citizenship"
],
"guest": "Stone Phillips"
},
{
"date": "2005-10-18",
"videos": [
"http://thecolbertreport.cc.com/videos/u39l6v/intro---10-18-05",
"http://thecolbertreport.cc.com/videos/kzin67/the-word---bacchanalia",
"http://thecolbertreport.cc.com/videos/5icgst/all-you-need-to-know---illegal-immigration",
"http://thecolbertreport.cc.com/videos/fydq17/lesley-stahl",
"http://thecolbertreport.cc.com/videos/235ftw/better-know-a-district---georgia-s-1st---jack-kingston",
"http://thecolbertreport.cc.com/videos/joj31r/sign-off---a-fax-from-james-brady"
],
"guest": "Lesley Stahl"
},
{
"date": "2005-10-19",
"videos": [
"http://thecolbertreport.cc.com/videos/vmoc19/intro---10-19-05",
"http://thecolbertreport.cc.com/videos/gpmykq/the-word---disappointed",
"http://thecolbertreport.cc.com/videos/95k30i/stephen-settles-the-debate---whales-and-cod-vs--polar-bears-and-seal-hunters",
"http://thecolbertreport.cc.com/videos/p42ju6/on-notice---bobby-s-candy-apples",
"http://thecolbertreport.cc.com/videos/malmcz/tip-wag---teen-pregnancy---katie-s-no-lady",
"http://thecolbertreport.cc.com/videos/db0w9q/fareed-zakaria",
"http://thecolbertreport.cc.com/videos/8kkcau/sign-off---the-in-box---you-re-great"
],
"guest": "Fareed Zakaria"
},
{
"date": "2005-10-20",
"videos": [
"http://thecolbertreport.cc.com/videos/rwhdnt/intro---10-20-05",
"http://thecolbertreport.cc.com/videos/p1n8k4/avian-flu",
"http://thecolbertreport.cc.com/videos/mk7yrx/russ-lieber---candy-and-air",
"http://thecolbertreport.cc.com/videos/cz3euw/un-american-news---the-foreign-press",
"http://thecolbertreport.cc.com/videos/j1b7vj/jim-cramer",
"http://thecolbertreport.cc.com/videos/rohluc/sign-off---credit-cards",
"http://thecolbertreport.cc.com/videos/24lb41/the-word---love-handles"
],
"guest": "Jim Cramer"
},
{
"date": "2005-10-24",
"videos": [
"http://thecolbertreport.cc.com/videos/67cs19/intro---10-24-05",
"http://thecolbertreport.cc.com/videos/gv2cjs/the-word---pussy",
"http://thecolbertreport.cc.com/videos/i491tt/lou-dobbs",
"http://thecolbertreport.cc.com/videos/dd1sbx/fract---the-wright-brothers",
"http://thecolbertreport.cc.com/videos/wtqx4r/bring--em-back-or-leave--em-dead---inquisition",
"http://thecolbertreport.cc.com/videos/qgvny1/mug-shot",
"http://thecolbertreport.cc.com/videos/vuftif/against-the-pundocracy"
],
"guest": "Lou Dobbs"
},
{
"date": "2005-10-25",
"videos": [
"http://thecolbertreport.cc.com/videos/lldiq0/intro---10-25-05",
"http://thecolbertreport.cc.com/videos/whvmzj/benjamin-shalom-bernanke",
"http://thecolbertreport.cc.com/videos/iqvyat/the-word---overrated",
"http://thecolbertreport.cc.com/videos/qwe0c7/threatdown---anti-bacterial-soap",
"http://thecolbertreport.cc.com/videos/7ioxmq/greg-behrendt",
"http://thecolbertreport.cc.com/videos/nwkm8y/greg-behrendt-fields-calls",
"http://thecolbertreport.cc.com/videos/vzk1ho/yet-another-day---soup-and-pets"
],
"guest": "Greg Behrendt"
},
{
"date": "2005-10-26",
"videos": [
"http://thecolbertreport.cc.com/videos/nxsljd/intro---10-26-05",
"http://thecolbertreport.cc.com/videos/39lnsj/outsourcing",
"http://thecolbertreport.cc.com/videos/7o86ff/the-word---perspective",
"http://thecolbertreport.cc.com/videos/yuq4bm/neil-degrasse-tyson",
"http://thecolbertreport.cc.com/videos/5fyjl2/tip-wag---public-nudity-advice",
"http://thecolbertreport.cc.com/videos/wsfpru/the-pulse"
],
"guest": "Neil deGrasse Tyson"
},
{
"date": "2005-10-27",
"videos": [
"http://thecolbertreport.cc.com/videos/ap807f/intro---10-27-05",
"http://thecolbertreport.cc.com/videos/nb6dxf/lieber---white-pumpkins",
"http://thecolbertreport.cc.com/videos/llj5fu/the-word---quitter",
"http://thecolbertreport.cc.com/videos/1vbs16/bookshelf-of-broken-dreams",
"http://thecolbertreport.cc.com/videos/ynldrg/fract---the-states",
"http://thecolbertreport.cc.com/videos/zyop79/better-know-a-district---massachusetts--4th---barney-frank",
"http://thecolbertreport.cc.com/videos/h9zw2j/jeff-daniels",
"http://thecolbertreport.cc.com/videos/3eb29d/yet-another-day---checking-in-with-christina-and-ernesto"
],
"guest": "Jeff Daniels"
},
{
"date": "2005-10-31",
"videos": [
"http://thecolbertreport.cc.com/videos/11fva6/intro---10-31-05",
"http://thecolbertreport.cc.com/videos/mqoacz/criminal-intent",
"http://thecolbertreport.cc.com/videos/p3782h/patrick-fitzgerald-s-press-conference",
"http://thecolbertreport.cc.com/videos/ey4w8s/the-word---alito",
"http://thecolbertreport.cc.com/videos/jfbl04/monica-crowley",
"http://thecolbertreport.cc.com/videos/sxj08u/fract---greatest-lakes",
"http://thecolbertreport.cc.com/videos/5d63df/stephen-settles-the-debate---ramadan-or-halloween-",
"http://thecolbertreport.cc.com/videos/qc29ld/rocktober"
],
"guest": "Monica Crowley"
},
{
"date": "2005-11-01",
"videos": [
"http://thecolbertreport.cc.com/videos/1zu9d3/intro---11-1-05",
"http://thecolbertreport.cc.com/videos/r7fmyb/the-word---camilla-mania",
"http://thecolbertreport.cc.com/videos/ufgobt/emergency-evacuation-plan",
"http://thecolbertreport.cc.com/videos/b7u1wy/ken-burns",
"http://thecolbertreport.cc.com/videos/kpjrtm/formidable-opponent---charity"
],
"guest": "Ken Burns"
},
{
"date": "2005-11-02",
"videos": [
"http://thecolbertreport.cc.com/videos/1kskdq/intro---11-2-05",
"http://thecolbertreport.cc.com/videos/xp1gbs/fatwa",
"http://thecolbertreport.cc.com/videos/8e6qo8/c-span-coverage",
"http://thecolbertreport.cc.com/videos/ayw8g9/the-word---cat",
"http://thecolbertreport.cc.com/videos/ey3oos/fract---civil-war",
"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/lieber---one-testicle"
],
"guest": "Bruce Feiler"
},
{
"date": "2005-11-03",
"videos": [
"http://thecolbertreport.cc.com/videos/4g6fdp/intro---11-3-05",
"http://thecolbertreport.cc.com/videos/9lmjfq/the-word---shhhh----",
"http://thecolbertreport.cc.com/videos/tq3k8n/bradley-whitford",
"http://thecolbertreport.cc.com/videos/wwof8g/fract---karl-marx",
"http://thecolbertreport.cc.com/videos/cxtvxm/better-know-a-district---ohio-s-11th---stephanie-tubbs-jones",
"http://thecolbertreport.cc.com/videos/86juj9/judge-tubbs",
"http://thecolbertreport.cc.com/videos/mkig56/the-in-box---kicking-ass"
],
"guest": "Bradley Whitford"
},
{
"date": "2005-11-07",
"videos": [
"http://thecolbertreport.cc.com/videos/lbtbtl/intro---11-7-05",
"http://thecolbertreport.cc.com/videos/s0yn8n/rioting-do-s-and-don-ts",
"http://thecolbertreport.cc.com/videos/2iezg1/the-word---hoser",
"http://thecolbertreport.cc.com/videos/dzis1b/fract---frnap--the-freedom-snap",
"http://thecolbertreport.cc.com/videos/1xhewi/threatdown---pirates",
"http://thecolbertreport.cc.com/videos/fjfr4z/eliot-spitzer",
"http://thecolbertreport.cc.com/videos/ufqqpc/rock--em-sock--em-robots"
],
"guest": "Eliot Spitzer"
},
{
"date": "2005-11-08",
"videos": [
"http://thecolbertreport.cc.com/videos/2lgs12/intro---11-8-05",
"http://thecolbertreport.cc.com/videos/5lxdom/america-doesn-t-torture",
"http://thecolbertreport.cc.com/videos/xul3qa/intercepted-satellite-feed",
"http://thecolbertreport.cc.com/videos/huzs1z/the-word---t-o-",
"http://thecolbertreport.cc.com/videos/7nl1pw/fract---franagram--american-patriot",
"http://thecolbertreport.cc.com/videos/wgvsjo/tip-wag---convicted-murderers",
"http://thecolbertreport.cc.com/videos/0l19is/catherine-crier",
"http://thecolbertreport.cc.com/videos/6zdr9d/wilford-brimley-calls---cocoon",
"http://thecolbertreport.cc.com/videos/ykxirt/yet-another-day---flesh-eating-virus"
],
"guest": "Catherine Crier"
},
{
"date": "2005-11-09",
"videos": [
"http://thecolbertreport.cc.com/videos/s6miz8/intro---11-9-05",
"http://thecolbertreport.cc.com/videos/5fvmyv/next-question",
"http://thecolbertreport.cc.com/videos/bcmkct/the-word---willy-loman",
"http://thecolbertreport.cc.com/videos/43es16/all-you-need-to-know---kansas-education",
"http://thecolbertreport.cc.com/videos/nzfogn/mary-roach",
"http://thecolbertreport.cc.com/videos/gqeqrk/better-know-a-district---florida-s-7th---john-mica"
],
"guest": "Mary Roach"
},
{
"date": "2005-11-10",
"videos": [
"http://thecolbertreport.cc.com/videos/jqfk3o/intro---11-10-05",
"http://thecolbertreport.cc.com/videos/8c7dra/swear-to-god",
"http://thecolbertreport.cc.com/videos/9kcrqk/the-word---armistice",
"http://thecolbertreport.cc.com/videos/o63fqi/cokie-roberts",
"http://thecolbertreport.cc.com/videos/bd1uuq/the-in-box---asian-stereotypes",
"http://thecolbertreport.cc.com/videos/c0bksd/the-dacolbert-code---samuel-alito"
],
"guest": "Cokie Roberts"
},
{
"date": "2005-11-14",
"videos": [
"http://thecolbertreport.cc.com/videos/e5zymg/intro---11-14-05",
"http://thecolbertreport.cc.com/videos/gfzikt/cma-buzz",
"http://thecolbertreport.cc.com/videos/jaukv1/the-word---testosterone",
"http://thecolbertreport.cc.com/videos/oel1ef/bob-kerrey",
"http://thecolbertreport.cc.com/videos/2lpp85/tip-line---flag-sticker",
"http://thecolbertreport.cc.com/videos/1wb4cs/un-american-news---shame-cotton",
"http://thecolbertreport.cc.com/videos/kuqe6u/internets-anniversary"
],
"guest": "Sen. Bob Kerrey"
},
{
"date": "2005-11-15",
"videos": [
"http://thecolbertreport.cc.com/videos/c8h749/intro---11-15-05",
"http://thecolbertreport.cc.com/videos/9jy462/sayako-s-wedding",
"http://thecolbertreport.cc.com/videos/yctr24/the-word---the-orient",
"http://thecolbertreport.cc.com/videos/4z4p4o/bring--em-back-or-leave--em-dead---asian-history",
"http://thecolbertreport.cc.com/videos/94g5r1/al-sharpton",
"http://thecolbertreport.cc.com/videos/9disf3/fract---mt--rushmore",
"http://thecolbertreport.cc.com/videos/w11pi7/formidable-opponent---torture"
],
"guest": "Rev. Al Sharpton"
},
{
"date": "2005-11-16",
"videos": [
"http://thecolbertreport.cc.com/videos/nl3o0c/intro---11-16-05",
"http://thecolbertreport.cc.com/videos/ebxyv5/the-word---information",
"http://thecolbertreport.cc.com/videos/eh69qj/on-notice-dead-to-me---juan-gabriel",
"http://thecolbertreport.cc.com/videos/h1e498/better-know-a-district---colorado-s-2nd---mark-udall",
"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://thecolbertreport.cc.com/videos/zl8rtq/intro---11-17-05",
"http://thecolbertreport.cc.com/videos/f8fusi/no-good-deed",
"http://thecolbertreport.cc.com/videos/pxeto4/the-word---mcconaughey-",
"http://thecolbertreport.cc.com/videos/bypiaq/threatdown---children",
"http://thecolbertreport.cc.com/videos/smm3x9/tim-robbins",
"http://thecolbertreport.cc.com/videos/wk6dps/here-today--more-tomorrow",
"http://thecolbertreport.cc.com/videos/8sxlv8/thanksgiving-vacation"
],
"guest": "Tim Robbins"
},
{
"date": "2005-11-28",
"videos": [
"http://thecolbertreport.cc.com/videos/sf87bf/intro---11-28-05",
"http://thecolbertreport.cc.com/videos/nrf3km/cyber-monday",
"http://thecolbertreport.cc.com/videos/sqsdz6/the-word---never",
"http://thecolbertreport.cc.com/videos/r6xqra/viewer-phone-calls",
"http://thecolbertreport.cc.com/videos/vdncvg/stephen-settles-the-debate---science-vs--faith",
"http://thecolbertreport.cc.com/videos/507rw4/brian-greene",
"http://thecolbertreport.cc.com/videos/ngo5nh/sign-off---check-your-local-listings"
],
"guest": "Brian Greene"
},
{
"date": "2005-11-29",
"videos": [
"http://thecolbertreport.cc.com/videos/4yku0o/intro---11-29-05",
"http://thecolbertreport.cc.com/videos/zaot6p/better-know-a-district---california-s-50th---randy--duke--cunningham",
"http://thecolbertreport.cc.com/videos/o2kdz0/the-word---confidence",
"http://thecolbertreport.cc.com/videos/6f1i25/was-it-really-that-bad----black-death",
"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://thecolbertreport.cc.com/videos/951mir/intro---11-30-05",
"http://thecolbertreport.cc.com/videos/jsl09o/the-word---gay-gay-gay-gay-gay",
"http://thecolbertreport.cc.com/videos/h7okp1/fract---nobody-messes-with-house",
"http://thecolbertreport.cc.com/videos/ut6y25/katrina-vanden-heuvel",
"http://thecolbertreport.cc.com/videos/0frx2n/around-the-world-in-11-6-seconds---media"
],
"guest": "Katrina Vanden Heuvel"
},
{
"date": "2005-12-01",
"videos": [
"http://thecolbertreport.cc.com/videos/j4tan3/intro---12-1-05",
"http://thecolbertreport.cc.com/videos/bocj8y/giant-gold-washer",
"http://thecolbertreport.cc.com/videos/w4dblj/the-word---spectacle",
"http://thecolbertreport.cc.com/videos/3yvygm/tip-wag---seattle",
"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://thecolbertreport.cc.com/videos/0yxnmj/intro---12-5-05",
"http://thecolbertreport.cc.com/videos/utqsnp/kennedy-center-honors",
"http://thecolbertreport.cc.com/videos/278dqm/the-word---xmas",
"http://thecolbertreport.cc.com/videos/6ulwwh/apology",
"http://thecolbertreport.cc.com/videos/sg4wi3/this-week-in-history---december-4th-10th",
"http://thecolbertreport.cc.com/videos/p01a0h/colbert-nation-citizen-award",
"http://thecolbertreport.cc.com/videos/djl273/maureen-dowd"
],
"guest": "Maureen Dowd"
},
{
"date": "2005-12-06",
"videos": [
"http://thecolbertreport.cc.com/videos/ad0e3u/intro---12-6-05",
"http://thecolbertreport.cc.com/videos/l23e5t/the-word---backsies",
"http://thecolbertreport.cc.com/videos/c6b939/better-know-a-district---virginia-s-8th---jim-moran",
"http://thecolbertreport.cc.com/videos/bgq83k/fract---the-star-spangled-banner",
"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://thecolbertreport.cc.com/videos/uvfu4h/intro---12-7-05",
"http://thecolbertreport.cc.com/videos/k5nni4/burritos-happy-holidays",
"http://thecolbertreport.cc.com/videos/rmm1zo/the-word---hell--no-",
"http://thecolbertreport.cc.com/videos/5ti5hp/threatdown---threats",
"http://thecolbertreport.cc.com/videos/1buius/craig-crawford"
],
"guest": "Craig Crawford"
},
{
"date": "2005-12-08",
"videos": [
"http://thecolbertreport.cc.com/videos/muvtpz/intro---12-8-07",
"http://thecolbertreport.cc.com/videos/zo8qem/the-mallomar",
"http://thecolbertreport.cc.com/videos/9zltfz/the-word---satisfied-",
"http://thecolbertreport.cc.com/videos/zc6wzp/papa-bear-nailed-him",
"http://thecolbertreport.cc.com/videos/0k58ru/movies-that-are-destroying-america---christmas",
"http://thecolbertreport.cc.com/videos/f63xob/peggy-noonan",
"http://thecolbertreport.cc.com/videos/huxiwh/nationwide-secret-santa"
],
"guest": "Peggy Noonan"
},
{
"date": "2005-12-12",
"videos": [
"http://thecolbertreport.cc.com/videos/26ln5h/intro---12-12-05",
"http://thecolbertreport.cc.com/videos/th38l3/the-real-christmas",
"http://thecolbertreport.cc.com/videos/xld8bn/the-word---belly-achin-",
"http://thecolbertreport.cc.com/videos/4qrc6w/un-american-news---tootsie",
"http://thecolbertreport.cc.com/videos/gljaa1/fract---war",
"http://thecolbertreport.cc.com/videos/tos96b/harry-smith",
"http://thecolbertreport.cc.com/videos/onf96q/the-in-box---custom-stamps"
],
"guest": "Harry Smith"
},
{
"date": "2005-12-13",
"videos": [
"http://thecolbertreport.cc.com/videos/hh6w14/intro---12-13-05",
"http://thecolbertreport.cc.com/videos/f3vpvn/the-de-ballification-of-the-american-sportscape",
"http://thecolbertreport.cc.com/videos/omscph/the-word---lombardi",
"http://thecolbertreport.cc.com/videos/53a836/sports-update",
"http://thecolbertreport.cc.com/videos/reee2h/formidable-opponent---steroids",
"http://thecolbertreport.cc.com/videos/raw18i/fract---nba",
"http://thecolbertreport.cc.com/videos/mopfat/bob-costas",
"http://thecolbertreport.cc.com/videos/97uhmb/sign-off---excellence-in-everything"
],
"guest": "Bob Costas"
},
{
"date": "2005-12-14",
"videos": [
"http://thecolbertreport.cc.com/videos/irtzij/intro---12-14-05",
"http://thecolbertreport.cc.com/videos/rxzsfq/king-kong",
"http://thecolbertreport.cc.com/videos/g7vs24/the-word---travolta",
"http://thecolbertreport.cc.com/videos/j8pyop/tip-wag---redefining-cruel-and-unusual",
"http://thecolbertreport.cc.com/videos/po8ta2/dermot-mulroney",
"http://thecolbertreport.cc.com/videos/nf6l8d/sign-off---three-stockings"
],
"guest": "Dermot Mulroney"
},
{
"date": "2005-12-15",
"videos": [
"http://thecolbertreport.cc.com/videos/12ie90/intro---12-15-05",
"http://thecolbertreport.cc.com/videos/7x2gjd/war-on-holiday",
"http://thecolbertreport.cc.com/videos/1286w8/the-word---jetpack",
"http://thecolbertreport.cc.com/videos/4epy8c/better-know-a-district---new-york-s-11th---major-owens",
"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://thecolbertreport.cc.com/videos/ccm8j9/intro---1-9-2006",
"http://thecolbertreport.cc.com/videos/gfhklq/merry-christmas",
"http://thecolbertreport.cc.com/videos/k2b0t4/going-at-it",
"http://thecolbertreport.cc.com/videos/tfsnjk/the-lusk-alito-connection",
"http://thecolbertreport.cc.com/videos/zvszwh/the-word---there-is-no-word",
"http://thecolbertreport.cc.com/videos/wm808s/tip-wag---addicted-to-cute",
"http://thecolbertreport.cc.com/videos/fx17nm/fract---columbus",
"http://thecolbertreport.cc.com/videos/nctzb0/nancy-grace",
"http://thecolbertreport.cc.com/videos/vt9veh/on-notice-dead-to-me---word-of-the-year"
],
"guest": "Nancy Grace"
},
{
"date": "2006-01-10",
"videos": [
"http://thecolbertreport.cc.com/videos/zffhux/intro---1-10-02",
"http://thecolbertreport.cc.com/videos/znlsxv/off-notice---the-e-street-band",
"http://thecolbertreport.cc.com/videos/jz3vjq/the-word---sleeper-cell",
"http://thecolbertreport.cc.com/videos/fzr3d5/balls-for-kidz---bear-hunting",
"http://thecolbertreport.cc.com/videos/uk2dty/carl-bernstein",
"http://thecolbertreport.cc.com/videos/lppcfe/the-in-box---taking-a-bullet"
],
"guest": "Carl Bernstein"
},
{
"date": "2006-01-11",
"videos": [
"http://thecolbertreport.cc.com/videos/yq13d1/intro---1-11-06",
"http://thecolbertreport.cc.com/videos/kci614/colbert-report-consumer-alert",
"http://thecolbertreport.cc.com/videos/ho8xgd/alito-haters",
"http://thecolbertreport.cc.com/videos/vko8sm/the-word---whatever",
"http://thecolbertreport.cc.com/videos/bbh162/threatdown---fathers-and-sons",
"http://thecolbertreport.cc.com/videos/o71qa3/fract---colbert-trivia",
"http://thecolbertreport.cc.com/videos/4z25yz/john-stossel",
"http://thecolbertreport.cc.com/videos/gsuxni/sign-off---future-money"
],
"guest": "John Stossel"
},
{
"date": "2006-01-12",
"videos": [
"http://thecolbertreport.cc.com/videos/vkw0ea/intro---1-12-06",
"http://thecolbertreport.cc.com/videos/smz33e/the-oscars",
"http://thecolbertreport.cc.com/videos/hldbza/the-word---double-stick-tape",
"http://thecolbertreport.cc.com/videos/ycx56p/better-know-a-district---new-jersey-s-9th---steven-rothman",
"http://thecolbertreport.cc.com/videos/4huh6w/fract---frnap--monarchy",
"http://thecolbertreport.cc.com/videos/2qbk3w/kenneth-miller",
"http://thecolbertreport.cc.com/videos/393ez5/michael-adams--apology"
],
"guest": "Ken Miller"
},
{
"date": "2006-01-16",
"videos": [
"http://thecolbertreport.cc.com/videos/hk33gu/intro---1-16-06",
"http://thecolbertreport.cc.com/videos/sfiw6u/martin-luther-king-jr--day",
"http://thecolbertreport.cc.com/videos/a3wcdf/the-word---cerrado-",
"http://thecolbertreport.cc.com/videos/7te5id/movies-that-are-destroying-america---transamerica",
"http://thecolbertreport.cc.com/videos/2zgm7q/fract---captain-north-korea",
"http://thecolbertreport.cc.com/videos/39qjdh/george-stephanopoulos",
"http://thecolbertreport.cc.com/videos/1jvqfi/sign-off---i-have-a-dreamsicle"
],
"guest": "George Stephanopoulos"
},
{
"date": "2006-01-17",
"videos": [
"http://thecolbertreport.cc.com/videos/btjtm2/intro---1-17-2006",
"http://thecolbertreport.cc.com/videos/uhh2bv/the-golden-globes",
"http://thecolbertreport.cc.com/videos/lqd06o/age-defying-pancakes",
"http://thecolbertreport.cc.com/videos/pxy8xm/the-word---old-school",
"http://thecolbertreport.cc.com/videos/3wpryl/tip-wag---eminem",
"http://thecolbertreport.cc.com/videos/l2yoxp/andrew-sullivan",
"http://thecolbertreport.cc.com/videos/lpdbmt/wilford-brimley-calls---oatmeal"
],
"guest": "Andrew Sullivan"
},
{
"date": "2006-01-18",
"videos": [
"http://thecolbertreport.cc.com/videos/nh5ji3/intro---1-18-06",
"http://thecolbertreport.cc.com/videos/z3vrpl/the-de-edumacation-of-the-american-brainscape",
"http://thecolbertreport.cc.com/videos/ti5lsj/the-word---smarterer",
"http://thecolbertreport.cc.com/videos/92rf9j/bring--em-back-or-leave--em-dead---teacher-s-edition",
"http://thecolbertreport.cc.com/videos/rnpcxp/frank-mccourt",
"http://thecolbertreport.cc.com/videos/86d7fs/sign-off---the-bully-system"
],
"guest": "Frank McCourt"
},
{
"date": "2006-01-19",
"videos": [
"http://thecolbertreport.cc.com/videos/1ibsf9/intro---1-19-06",
"http://thecolbertreport.cc.com/videos/9s67zo/who-s-attacking-me-now----humane-society",
"http://thecolbertreport.cc.com/videos/xguuix/the-word---public-see",
"http://thecolbertreport.cc.com/videos/lidn3n/better-know-a-district---new-york-s-17th---eliot-engel",
"http://thecolbertreport.cc.com/videos/11mx9e/nina-totenberg",
"http://thecolbertreport.cc.com/videos/9g8c9i/sign-off---drink-on"
],
"guest": "Nina Totenberg"
},
{
"date": "2006-01-23",
"videos": [
"http://thecolbertreport.cc.com/videos/rnxq1m/intro---1-23-06",
"http://thecolbertreport.cc.com/videos/k046s8/oprah-s-book-club",
"http://thecolbertreport.cc.com/videos/ruzjfq/the-word---charlie-daniels",
"http://thecolbertreport.cc.com/videos/0wj0h7/threatdown---hamas",
"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://thecolbertreport.cc.com/videos/4cxurq/intro---1-24-06",
"http://thecolbertreport.cc.com/videos/63ywy8/most-depressing-day-of-the-year",
"http://thecolbertreport.cc.com/videos/xpxm3x/the-word---chernobyl",
"http://thecolbertreport.cc.com/videos/bpx4o0/formidable-opponent---superpowers",
"http://thecolbertreport.cc.com/videos/44x8vn/robin-givhan",
"http://thecolbertreport.cc.com/videos/meshre/the-in-box---dvds"
],
"guest": "Robin Givhan"
},
{
"date": "2006-01-25",
"videos": [
"http://thecolbertreport.cc.com/videos/fcwdw2/intro---1-25-06",
"http://thecolbertreport.cc.com/videos/sc546i/bill-o-reilly--fan-of-the-show",
"http://thecolbertreport.cc.com/videos/dg5r31/the-word---remote-control",
"http://thecolbertreport.cc.com/videos/d7q9f6/better-know-a-district---new-jersey-s-8th---bill-pascrell",
"http://thecolbertreport.cc.com/videos/e7x760/norah-vincent"
],
"guest": "Norah Vincent"
},
{
"date": "2006-01-26",
"videos": [
"http://thecolbertreport.cc.com/videos/lquo7k/intro---1-26-06",
"http://thecolbertreport.cc.com/videos/xh484k/thundersnow",
"http://thecolbertreport.cc.com/videos/qdqpdn/who-s-attacking-me-now----marina-core",
"http://thecolbertreport.cc.com/videos/9v3sqy/the-word---wham-o",
"http://thecolbertreport.cc.com/videos/qnlt2s/one-of-the-heroes--lily-s-",
"http://thecolbertreport.cc.com/videos/lca5rm/colbert-cruise---write-off",
"http://thecolbertreport.cc.com/videos/gimvpm/paul-begala"
],
"guest": "Paul Begala"
},
{
"date": "2006-01-30",
"videos": [
"http://thecolbertreport.cc.com/videos/fhkpsg/intro---1-30-06",
"http://thecolbertreport.cc.com/videos/vbdym4/james-frey-s-truthiness",
"http://thecolbertreport.cc.com/videos/e6nijq/the-word---abortion",
"http://thecolbertreport.cc.com/videos/5se9xj/tip-wag---google",
"http://thecolbertreport.cc.com/videos/3f4m4d/annie-duke"
],
"guest": "Annie Duke"
},
{
"date": "2006-01-31",
"videos": [
"http://thecolbertreport.cc.com/videos/2cxabn/intro---1-31-06",
"http://thecolbertreport.cc.com/videos/d5gebw/the-word---jesi",
"http://thecolbertreport.cc.com/videos/fo1pme/all-you-need-to-know---samuel-alito",
"http://thecolbertreport.cc.com/videos/165jzf/fract---the-american-flag",
"http://thecolbertreport.cc.com/videos/2uduhl/david-maresh",
"http://thecolbertreport.cc.com/videos/iddejj/sign-off---god-bless",
"http://thecolbertreport.cc.com/videos/2na088/craziest-f--king-thing-i-ve-ever-heard---snake-and-hamster"
],
"guest": "Dave Marash"
},
{
"date": "2006-02-01",
"videos": [
"http://thecolbertreport.cc.com/videos/dk9yev/intro---2-1-06",
"http://thecolbertreport.cc.com/videos/y6qr8t/the-american-worker--a-hero-s-salute-to-the-besieged-heroes-of-the-american-jobscape",
"http://thecolbertreport.cc.com/videos/u7tnek/the-word---you-re-welcome",
"http://thecolbertreport.cc.com/videos/zfo99j/lieber---minimum-wage",
"http://thecolbertreport.cc.com/videos/qm6xwf/emily-yoffe",
"http://thecolbertreport.cc.com/videos/359g3f/sign-off---blue-collar-workday"
],
"guest": "Emily Yoffe"
},
{
"date": "2006-02-02",
"videos": [
"http://thecolbertreport.cc.com/videos/1dag2u/intro---2-2-06",
"http://thecolbertreport.cc.com/videos/ad4eb4/groundhog-day-forecast",
"http://thecolbertreport.cc.com/videos/3bftnm/stephen-s-famous-five-meat-chili",
"http://thecolbertreport.cc.com/videos/xbb82c/the-word---aggravated-assault",
"http://thecolbertreport.cc.com/videos/lggm23/better-know-a-district---new-york-s-8th---jerrold-nadler",
"http://thecolbertreport.cc.com/videos/waxwaq/christine-todd-whitman",
"http://thecolbertreport.cc.com/videos/1q178e/sign-off---tivo"
],
"guest": "Gov. Christine Todd Whitman"
},
{
"date": "2006-02-06",
"videos": [
"http://thecolbertreport.cc.com/videos/dpnfel/intro---2-6-06",
"http://thecolbertreport.cc.com/videos/x1tmbw/birth-day-off",
"http://thecolbertreport.cc.com/videos/1gk1h5/the-golden-corner",
"http://thecolbertreport.cc.com/videos/r9ih4w/the-word---metaphorically",
"http://thecolbertreport.cc.com/videos/4xxw86/threatdown---killer-bees",
"http://thecolbertreport.cc.com/videos/kckjlf/fract---native-american-state-names",
"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://thecolbertreport.cc.com/videos/aa2a90/intro---2-7-06",
"http://thecolbertreport.cc.com/videos/nzdokc/math-is-hard",
"http://thecolbertreport.cc.com/videos/iwl7g4/the-word---kidding",
"http://thecolbertreport.cc.com/videos/pc9syn/fract---frnap--royalty",
"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://thecolbertreport.cc.com/videos/3vblh5/intro---2-8-06",
"http://thecolbertreport.cc.com/videos/zmpne2/b-b-b-l-t-",
"http://thecolbertreport.cc.com/videos/0qolhd/electronic-surveillance",
"http://thecolbertreport.cc.com/videos/pi8m0r/the-word---eureka",
"http://thecolbertreport.cc.com/videos/29usyw/better-know-a-district---pennsylvania-s-2nd---chaka-fattah",
"http://thecolbertreport.cc.com/videos/flyja7/fract---bush-s-height",
"http://thecolbertreport.cc.com/videos/6jmw8z/alan-dershowitz",
"http://thecolbertreport.cc.com/videos/96mt5f/the-in-box---terry"
],
"guest": "Alan Dershowitz"
},
{
"date": "2006-02-09",
"videos": [
"http://thecolbertreport.cc.com/videos/afiwhq/intro---2-9-06",
"http://thecolbertreport.cc.com/videos/qryfzw/big-brass-balls-award",
"http://thecolbertreport.cc.com/videos/c00cpa/the-word---u-s-a---u-s-a--",
"http://thecolbertreport.cc.com/videos/wpi1k4/stephen-s-laws-of-love",
"http://thecolbertreport.cc.com/videos/8rwy8k/george-packer",
"http://thecolbertreport.cc.com/videos/33a8tw/charlene--i-m-right-behind-you-"
],
"guest": "George Packer"
},
{
"date": "2006-02-21",
"videos": [
"http://thecolbertreport.cc.com/videos/z5opi6/intro---2-21-06",
"http://thecolbertreport.cc.com/videos/uo23hp/accidental-shooting",
"http://thecolbertreport.cc.com/videos/loo817/the-word---u-s-a---u-s-a--",
"http://thecolbertreport.cc.com/videos/u7vgjy/better-know-a-district---new-jersey-s-13th",
"http://thecolbertreport.cc.com/videos/gb5q2m/fract---americana",
"http://thecolbertreport.cc.com/videos/zyrf0h/lama-surya-das",
"http://thecolbertreport.cc.com/videos/501uix/sign-off---dna"
],
"guest": "Lama Surya Das"
},
{
"date": "2006-02-22",
"videos": [
"http://thecolbertreport.cc.com/videos/i0btk9/intro---2-22-06",
"http://thecolbertreport.cc.com/videos/9a1fo6/speed-skating-debacle",
"http://thecolbertreport.cc.com/videos/0g837q/the-word---absolutely-maybe",
"http://thecolbertreport.cc.com/videos/mvtu98/threatdown---gay-adoption",
"http://thecolbertreport.cc.com/videos/jkkvih/michael-eric-dyson"
],
"guest": "Michael Eric Dyson"
},
{
"date": "2006-02-23",
"videos": [
"http://thecolbertreport.cc.com/videos/v60d4d/intro---2-23-06",
"http://thecolbertreport.cc.com/videos/rr6syc/threatdown---bears",
"http://thecolbertreport.cc.com/videos/754igf/presidential-visions",
"http://thecolbertreport.cc.com/videos/s0zne3/the-word---hippocratical",
"http://thecolbertreport.cc.com/videos/kftjaw/pharmaceuticals--prescription-for-progress",
"http://thecolbertreport.cc.com/videos/rsogzl/david-brooks",
"http://thecolbertreport.cc.com/videos/azjwel/sign-off---pause-your-tvs"
],
"guest": "David Brooks"
},
{
"date": "2006-02-27",
"videos": [
"http://thecolbertreport.cc.com/videos/te5not/intro---2-27-06",
"http://thecolbertreport.cc.com/videos/a6q20s/the-de-deification-of-the-american-faithscape",
"http://thecolbertreport.cc.com/videos/opnyg5/who-hates-whom-in-the-name-of-god",
"http://thecolbertreport.cc.com/videos/2hdt17/the-word---trial-separation",
"http://thecolbertreport.cc.com/videos/5ggers/pick-your-apocalypse",
"http://thecolbertreport.cc.com/videos/oop06i/tony-campolo",
"http://thecolbertreport.cc.com/videos/14uaa2/confess-your-sins-to-stephen"
],
"guest": "Tony Campolo"
},
{
"date": "2006-02-28",
"videos": [
"http://thecolbertreport.cc.com/videos/cebyqr/intro---2-28-06",
"http://thecolbertreport.cc.com/videos/roej3y/who-s-attacking-me-now----anderson-cooper",
"http://thecolbertreport.cc.com/videos/bdairu/the-word---laissez-les-bons-temps-rouler-",
"http://thecolbertreport.cc.com/videos/2v3htj/tip-wag---wheeled-transportation",
"http://thecolbertreport.cc.com/videos/sz96fe/brett-o-donnell"
],
"guest": "Brett O'Donnell"
},
{
"date": "2006-03-01",
"videos": [
"http://thecolbertreport.cc.com/videos/ldd32b/intro---3-1-06",
"http://thecolbertreport.cc.com/videos/jndc1b/better-know-a-district---california-s-50th",
"http://thecolbertreport.cc.com/videos/4j8lfp/the-word---faith",
"http://thecolbertreport.cc.com/videos/1bozfl/better-know-a-founder---benjamin-franklin",
"http://thecolbertreport.cc.com/videos/11m5ii/arianna-huffington"
],
"guest": "Arianna Huffington"
},
{
"date": "2006-03-02",
"videos": [
"http://thecolbertreport.cc.com/videos/ubq51o/intro---3-2-06",
"http://thecolbertreport.cc.com/videos/stez1k/the-word---homo-sapien-agenda",
"http://thecolbertreport.cc.com/videos/3k2tf6/the-dacolbert-code---the-oscars",
"http://thecolbertreport.cc.com/videos/gltobj/jeffrey-sachs",
"http://thecolbertreport.cc.com/videos/wx4nw0/sign-off---end-of-an-era"
],
"guest": "Jeffrey Sachs"
},
{
"date": "2006-03-06",
"videos": [
"http://thecolbertreport.cc.com/videos/404ffy/intro---3-6-06",
"http://thecolbertreport.cc.com/videos/l42kmx/hollywood-decontamination",
"http://thecolbertreport.cc.com/videos/tsfsdu/never-say-die",
"http://thecolbertreport.cc.com/videos/5tdn6m/the-word---spoiler-alert-",
"http://thecolbertreport.cc.com/videos/tua61a/threatdown---non-blondes",
"http://thecolbertreport.cc.com/videos/rlta2z/bob-schieffer",
"http://thecolbertreport.cc.com/videos/iwpji5/sign-off---narnia"
],
"guest": "Bob Schieffer"
},
{
"date": "2006-03-07",
"videos": [
"http://thecolbertreport.cc.com/videos/ca0riz/intro---3-7-06",
"http://thecolbertreport.cc.com/videos/4cutks/colbert-manor",
"http://thecolbertreport.cc.com/videos/mtcb44/the-word---the-long-war",
"http://thecolbertreport.cc.com/videos/g0hyvn/all-you-need-to-know---video-games",
"http://thecolbertreport.cc.com/videos/8n27zq/norman-ornstein"
],
"guest": "Norman Ornstean"
},
{
"date": "2006-03-08",
"videos": [
"http://thecolbertreport.cc.com/videos/xbwofw/intro---3-8-06",
"http://thecolbertreport.cc.com/videos/x1smyo/colbert-manor-revisited",
"http://thecolbertreport.cc.com/videos/to3c41/the-word---monopoly",
"http://thecolbertreport.cc.com/videos/qhlrjh/stephen-s-sound-advice---civil-war-do-s---don-ts",
"http://thecolbertreport.cc.com/videos/1ggda8/fract---america-rocks",
"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://thecolbertreport.cc.com/videos/vaflyt/intro---3-9-06",
"http://thecolbertreport.cc.com/videos/dx0yti/canadian-baseball-",
"http://thecolbertreport.cc.com/videos/6l67tv/the-word---d-i-y-",
"http://thecolbertreport.cc.com/videos/7oy8db/better-know-a-district---california-s-39th-district---linda-sanchez",
"http://thecolbertreport.cc.com/videos/15d41c/lorraine-bracco"
],
"guest": "Lorraine Bracco"
},
{
"date": "2006-03-13",
"videos": [
"http://thecolbertreport.cc.com/videos/d7ebhg/intro---3-13-06",
"http://thecolbertreport.cc.com/videos/lmy7oh/predictions",
"http://thecolbertreport.cc.com/videos/lykn1c/not-gay",
"http://thecolbertreport.cc.com/videos/so8v2i/the-word---sidney-poitier",
"http://thecolbertreport.cc.com/videos/ufh2rw/christopher-buckley",
"http://thecolbertreport.cc.com/videos/k79bmy/sign-off---mad-magazine"
],
"guest": "Christopher Buckley"
},
{
"date": "2006-03-14",
"videos": [
"http://thecolbertreport.cc.com/videos/9rlemm/intro---3-14-06",
"http://thecolbertreport.cc.com/videos/i3ouk4/trusting-the-media",
"http://thecolbertreport.cc.com/videos/i5bwzw/the-word---scapegoat",
"http://thecolbertreport.cc.com/videos/kiwto1/was-it-really-that-bad----before-unions",
"http://thecolbertreport.cc.com/videos/402x36/fract---hawaii",
"http://thecolbertreport.cc.com/videos/loh9en/keith-olbermann",
"http://thecolbertreport.cc.com/videos/8vssl2/hiphopketball-ii--the-rejazzebration-remix--06"
],
"guest": "Keith Olbermann"
},
{
"date": "2006-03-15",
"videos": [
"http://thecolbertreport.cc.com/videos/wt5xpw/intro---3-15-06",
"http://thecolbertreport.cc.com/videos/u8eaqc/sperm-donor",
"http://thecolbertreport.cc.com/videos/g4bu6e/the-word---none-of-the-above",
"http://thecolbertreport.cc.com/videos/kruphn/al-franken",
"http://thecolbertreport.cc.com/videos/usnoo7/al-franken-fields-calls",
"http://thecolbertreport.cc.com/videos/z5ir97/craziest-f--king-thing-i-ve-ever-heard---bear-wrestling"
],
"guest": "Al Franken"
},
{
"date": "2006-03-16",
"videos": [
"http://thecolbertreport.cc.com/videos/yna7fv/intro---3-16-06",
"http://thecolbertreport.cc.com/videos/ecjm4u/who-s-attacking-me-now----commander-coconut",
"http://thecolbertreport.cc.com/videos/2m2cs5/the-word---sweet-dreams",
"http://thecolbertreport.cc.com/videos/kgsuha/better-know-a-protectorate---the-virgin-islands---donna-christensen",
"http://thecolbertreport.cc.com/videos/6o7ym9/frank-vincent",
"http://thecolbertreport.cc.com/videos/cycayo/sign-off---i-ll-miss-you"
],
"guest": "Frank Vincent"
},
{
"date": "2006-03-20",
"videos": [
"http://thecolbertreport.cc.com/videos/nnadg0/intro---3-20-06",
"http://thecolbertreport.cc.com/videos/isowuv/movies-that-are-destroying-america---post-oscar-wrap-up",
"http://thecolbertreport.cc.com/videos/vr4vvt/connie-chung",
"http://thecolbertreport.cc.com/videos/yuth1j/jessica-simpson-turns-down-gop",
"http://thecolbertreport.cc.com/videos/6xoiww/war-in-iraq---third-anniversary",
"http://thecolbertreport.cc.com/videos/b7697r/the-word---stop-it"
],
"guest": "Connie Chung"
},
{
"date": "2006-03-21",
"videos": [
"http://thecolbertreport.cc.com/videos/xvs8w8/intro---3-21-06",
"http://thecolbertreport.cc.com/videos/zze24r/world-baseball-classic",
"http://thecolbertreport.cc.com/videos/teon93/the-word---eat-it",
"http://thecolbertreport.cc.com/videos/eh7h1y/employee-performance-reviews",
"http://thecolbertreport.cc.com/videos/nbiu6f/steve-kroft",
"http://thecolbertreport.cc.com/videos/jt1thw/the-in-box---corrections"
],
"guest": "Steve Kroft"
},
{
"date": "2006-03-22",
"videos": [
"http://thecolbertreport.cc.com/videos/70ntar/intro---3-22-06",
"http://thecolbertreport.cc.com/videos/nw6pi6/advice-for-jennifer-anniston",
"http://thecolbertreport.cc.com/videos/gx67le/better-know-a-district---california-s-27th---brad-sherman",
"http://thecolbertreport.cc.com/videos/c3fb4g/the-word---i-am-the-great-and-powerful-oz",
"http://thecolbertreport.cc.com/videos/uqd7r1/dan-senor",
"http://thecolbertreport.cc.com/videos/qay3pj/sign-off---thank-you--america"
],
"guest": "Dan Senor"
},
{
"date": "2006-03-23",
"videos": [
"http://thecolbertreport.cc.com/videos/ou0ql7/intro---3-23-06",
"http://thecolbertreport.cc.com/videos/rxxsf1/home--hearth--heart-and-heartland---this-land-is-your-land",
"http://thecolbertreport.cc.com/videos/1q0pl8/miss-manners",
"http://thecolbertreport.cc.com/videos/jeurtc/stephen-s-sound-advice---how-to-raise-a-hero",
"http://thecolbertreport.cc.com/videos/3x5mhp/john-kasich",
"http://thecolbertreport.cc.com/videos/tgvvyb/sign-off---the-reason-for-the-hearth"
],
"guest": "John Kasich"
},
{
"date": "2006-03-27",
"videos": [
"http://thecolbertreport.cc.com/videos/yvu55b/intro---3-27-06",
"http://thecolbertreport.cc.com/videos/lu2x91/off-the-market",
"http://thecolbertreport.cc.com/videos/b1jlbx/immigration-protests",
"http://thecolbertreport.cc.com/videos/hizymr/exercise-routine",
"http://thecolbertreport.cc.com/videos/fafxll/the-word---tense",
"http://thecolbertreport.cc.com/videos/jmwqn6/letter-to-the-judge",
"http://thecolbertreport.cc.com/videos/6zqqyf/threatdown---drug-candy",
"http://thecolbertreport.cc.com/videos/hx3fbe/fract---bald-eagle",
"http://thecolbertreport.cc.com/videos/i44o34/gary-hart",
"http://thecolbertreport.cc.com/videos/bwhjyd/sign-off---tomorrow-s-guest"
],
"guest": "Gary Hart"
},
{
"date": "2006-03-28",
"videos": [
"http://thecolbertreport.cc.com/videos/9tw416/intro---3-28-06",
"http://thecolbertreport.cc.com/videos/wm4vs8/baby-eagle",
"http://thecolbertreport.cc.com/videos/4s1h3q/the-word---easter-under-attack---marketing",
"http://thecolbertreport.cc.com/videos/erxj6i/lieber---school-vouchers",
"http://thecolbertreport.cc.com/videos/3ejtt4/fract---commemorative-spoons",
"http://thecolbertreport.cc.com/videos/tyfnef/michael-brown",
"http://thecolbertreport.cc.com/videos/t4qaaf/sign-off---goodnight--stephen-jr-"
],
"guest": "Michael Brown"
},
{
"date": "2006-03-29",
"videos": [
"http://thecolbertreport.cc.com/videos/4mdlim/intro---3-29-06",
"http://thecolbertreport.cc.com/videos/r9z4ro/eclipse",
"http://thecolbertreport.cc.com/videos/mqt5m8/the-word---merrier",
"http://thecolbertreport.cc.com/videos/3xpeh4/better-know-a-district---california-s-29th---adam-schiff",
"http://thecolbertreport.cc.com/videos/k1c0hq/bruce-bartlett"
],
"guest": "Bruce Bartlett"
},
{
"date": "2006-03-30",
"videos": [
"http://thecolbertreport.cc.com/videos/uaktnl/intro---3-30-06",
"http://thecolbertreport.cc.com/videos/89u375/what-jill-carroll-missed",
"http://thecolbertreport.cc.com/videos/nuwaus/women-s-history-month---soledad-o-brien",
"http://thecolbertreport.cc.com/videos/smbaky/tip-wag---the-templeton-prize",
"http://thecolbertreport.cc.com/videos/n7sm3g/fract---drug-testing-standards",
"http://thecolbertreport.cc.com/videos/b95nrh/robert-greenwald",
"http://thecolbertreport.cc.com/videos/0vbmc1/million-man-march",
"http://thecolbertreport.cc.com/videos/zcqswd/the-word---f--k"
],
"guest": "Robert Greenwald"
},
{
"date": "2006-04-03",
"videos": [
"http://thecolbertreport.cc.com/videos/r2tcqv/intro---4-3-06",
"http://thecolbertreport.cc.com/videos/cckn97/who-s-honoring-me-now----southern-poverty-law-center",
"http://thecolbertreport.cc.com/videos/j51p1g/the-word---stay-the-course",
"http://thecolbertreport.cc.com/videos/mq3zja/stephen-s-sound-advice---taxes",
"http://thecolbertreport.cc.com/videos/ci41dt/michael-smerconish",
"http://thecolbertreport.cc.com/videos/716068/sign-off---nutz"
],
"guest": "Michael Smerconish"
},
{
"date": "2006-04-04",
"videos": [
"http://thecolbertreport.cc.com/videos/9ew48u/intro---4-4-06",
"http://thecolbertreport.cc.com/videos/ouryux/delay-retires",
"http://thecolbertreport.cc.com/videos/3pmhdv/the-word---birdie",
"http://thecolbertreport.cc.com/videos/fgj62q/balls-for-kidz---plastic-surgery",
"http://thecolbertreport.cc.com/videos/3sqfo3/jesse-jackson"
],
"guest": "Jesse Jackson"
},
{
"date": "2006-04-05",
"videos": [
"http://thecolbertreport.cc.com/videos/pxrtxy/intro---4-5-06",
"http://thecolbertreport.cc.com/videos/1sxrid/crying",
"http://thecolbertreport.cc.com/videos/alac6s/the-word---martyr",
"http://thecolbertreport.cc.com/videos/6ythy9/formidable-opponent---immigration",
"http://thecolbertreport.cc.com/videos/4ipowz/fract---russian-girls",
"http://thecolbertreport.cc.com/videos/7hiane/harvey-mansfield",
"http://thecolbertreport.cc.com/videos/7q90hr/sign-off---en-espanol"
],
"guest": "Harvey Mansfield"
},
{
"date": "2006-04-06",
"videos": [
"http://thecolbertreport.cc.com/videos/4p2khi/intro---4-6-06",
"http://thecolbertreport.cc.com/videos/yy1ecn/who-s-not-honoring-me-now----peabody-award",
"http://thecolbertreport.cc.com/videos/wh4nku/easter-under-attack---recalled-eggs",
"http://thecolbertreport.cc.com/videos/h6f8ks/the-word---nazis",
"http://thecolbertreport.cc.com/videos/hqbc11/better-know-a-district---oregon-s-5th---darlene-hooley",
"http://thecolbertreport.cc.com/videos/2v5yd4/markos-moulitsas",
"http://thecolbertreport.cc.com/videos/a2gy6a/sign-off---spring-break"
],
"guest": "Markos Moulitsas"
},
{
"date": "2006-04-17",
"videos": [
"http://thecolbertreport.cc.com/videos/rho2b5/intro---4-17-06",
"http://thecolbertreport.cc.com/videos/jh0t6d/dime-boycott",
"http://thecolbertreport.cc.com/videos/nyextq/on-notice---journal-of-paleolimnology",
"http://thecolbertreport.cc.com/videos/swdzeg/was-it-really-that-bad----san-francisco-earthquake",
"http://thecolbertreport.cc.com/videos/8ydrv2/reza-aslan",
"http://thecolbertreport.cc.com/videos/nfyuyx/craziest-f--king-thing-i-ve-ever-heard---fly-glasses"
],
"guest": "Reza Aslan"
},
{
"date": "2006-04-18",
"videos": [
"http://thecolbertreport.cc.com/videos/mwy60m/intro---4-18-06",
"http://thecolbertreport.cc.com/videos/8zlfj4/stephen-jr--hatches-",
"http://thecolbertreport.cc.com/videos/gi0de7/the-word---sir--yes--sir",
"http://thecolbertreport.cc.com/videos/6epoa4/threatdown---pooh",
"http://thecolbertreport.cc.com/videos/5peygv/anthony-romero",
"http://thecolbertreport.cc.com/videos/9g88m0/baby-monitor",
"http://thecolbertreport.cc.com/videos/sdky8q/who-s-not-honoring-me-now----pulitzer-prize"
],
"guest": "Anthony Romero"
},
{
"date": "2006-04-19",
"videos": [
"http://thecolbertreport.cc.com/videos/msbasq/intro---4-19-06",
"http://thecolbertreport.cc.com/videos/8e53yj/white-house-press-secretary",
"http://thecolbertreport.cc.com/videos/usn2co/global-warming-tv",
"http://thecolbertreport.cc.com/videos/ai2zb9/the-word---save-it",
"http://thecolbertreport.cc.com/videos/0nrquc/tip-wag---tom-cruise-and-katie-holmes",
"http://thecolbertreport.cc.com/videos/x40hn2/caitlin-flanagan"
],
"guest": "Caitlin Flanagan"
},
{
"date": "2006-04-20",
"videos": [
"http://thecolbertreport.cc.com/videos/ejbl27/intro---4-20-06",
"http://thecolbertreport.cc.com/videos/qw6of6/protecting-kids-from-papers",
"http://thecolbertreport.cc.com/videos/agw4nc/the-word---bard",
"http://thecolbertreport.cc.com/videos/yrza7w/better-know-a-district---maryland-s-4th---albert-wynn",
"http://thecolbertreport.cc.com/videos/isrl05/ralph-nader"
],
"guest": "Ralph Nader"
},
{
"date": "2006-04-24",
"videos": [
"http://thecolbertreport.cc.com/videos/ed2ifv/intro---4-24-06",
"http://thecolbertreport.cc.com/videos/yd10jl/wok-this-way",
"http://thecolbertreport.cc.com/videos/nhj8qv/money---politics--the-machine-that-ain-t-broke",
"http://thecolbertreport.cc.com/videos/z1f4bz/duke-obilia-auction",
"http://thecolbertreport.cc.com/videos/svw55c/hugh-hewitt",
"http://thecolbertreport.cc.com/videos/qzp0e4/sign-off---chatty-cathy"
],
"guest": "Hugh Hewitt"
},
{
"date": "2006-04-25",
"videos": [
"http://thecolbertreport.cc.com/videos/h6j9ry/intro---4-25-06",
"http://thecolbertreport.cc.com/videos/y1ry7v/contacting-john-lennon",
"http://thecolbertreport.cc.com/videos/ef5fdk/the-word---panama",
"http://thecolbertreport.cc.com/videos/6iaobq/threatdown---tom-hanks",
"http://thecolbertreport.cc.com/videos/6smo0z/fract---middle-name",
"http://thecolbertreport.cc.com/videos/gael38/sam-harris",
"http://thecolbertreport.cc.com/videos/f00cpp/sign-off---bush-clock"
],
"guest": "Sam Harris"
},
{
"date": "2006-04-26",
"videos": [
"http://thecolbertreport.cc.com/videos/xo40za/intro---4-26-06",
"http://thecolbertreport.cc.com/videos/pjxlyg/armed-and-ready",
"http://thecolbertreport.cc.com/videos/hhuez9/the-word---english",
"http://thecolbertreport.cc.com/videos/ydqtim/better-know-a-district---georgia-s-11th---phil-gingrey",
"http://thecolbertreport.cc.com/videos/thlh72/sebastian-junger",
"http://thecolbertreport.cc.com/videos/8puf3y/sign-off---yellowcake"
],
"guest": "Sebastian Junger"
},
{
"date": "2006-04-27",
"videos": [
"http://thecolbertreport.cc.com/videos/5ry4l9/intro---4-27-06",
"http://thecolbertreport.cc.com/videos/z7tcn4/snow--informer",
"http://thecolbertreport.cc.com/videos/6lr3t0/the-word---white-gloves",
"http://thecolbertreport.cc.com/videos/b4nnko/plagiarism",
"http://thecolbertreport.cc.com/videos/g4i72k/all-you-need-to-know---sleight-of-hand",
"http://thecolbertreport.cc.com/videos/u54lrz/bill-kristol",
"http://thecolbertreport.cc.com/videos/efk2x7/sign-off---the-nfl-draft"
],
"guest": "Bill Kristol"
},
{
"date": "2006-05-01",
"videos": [
"http://thecolbertreport.cc.com/videos/w2hp62/intro---5-1-06",
"http://thecolbertreport.cc.com/videos/7jined/white-house-correspondents--dinner",
"http://thecolbertreport.cc.com/videos/8uzt2n/the-word---drug-fueled-sex-crime",
"http://thecolbertreport.cc.com/videos/yzcgdu/tip-wag---exxon",
"http://thecolbertreport.cc.com/videos/5ptkiy/jon-meacham",
"http://thecolbertreport.cc.com/videos/i3oqoh/sign-off---spam"
],
"guest": "Jon Meacham"
},
{
"date": "2006-05-02",
"videos": [
"http://thecolbertreport.cc.com/videos/341pc6/intro---5-2-06",
"http://thecolbertreport.cc.com/videos/y9f7ks/magic-",
"http://thecolbertreport.cc.com/videos/fdtzal/the-word---healthy-appetite",
"http://thecolbertreport.cc.com/videos/hl6b8d/stephen-for-press-secretary",
"http://thecolbertreport.cc.com/videos/lh3j87/mike-huckabee"
],
"guest": "Governor Mike Huckabee"
},
{
"date": "2006-05-03",
"videos": [
"http://thecolbertreport.cc.com/videos/wjeu9g/intro---5-3-06",
"http://thecolbertreport.cc.com/videos/72mru6/alan-town",
"http://thecolbertreport.cc.com/videos/gdu7ux/the-word---name-game",
"http://thecolbertreport.cc.com/videos/f8iv5g/stephen-s-sound-advice---gas-prices",
"http://thecolbertreport.cc.com/videos/3pdcz2/paul-rieckhoff",
"http://thecolbertreport.cc.com/videos/65gltn/betterer-know-a-district---georgia-s-11th---phil-gingrey-bonus-edition"
],
"guest": "Paul Rieckhoff"
},
{
"date": "2006-05-04",
"videos": [
"http://thecolbertreport.cc.com/videos/mtzlgi/exclusive---better-know-a-district---oregon-s-3rd---earl-blumenauer",
"http://thecolbertreport.cc.com/videos/pgiz58/intro---5-4-06",
"http://thecolbertreport.cc.com/videos/ox5eqb/national-day-of-prayer",
"http://thecolbertreport.cc.com/videos/38ws3t/the-word---indulgence",
"http://thecolbertreport.cc.com/videos/h6w8h9/better-know-a-district---oregon-s-3rd---earl-blumenauer",
"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://thecolbertreport.cc.com/videos/6p8qc0/intro---5-8-06",
"http://thecolbertreport.cc.com/videos/gk0182/stegul",
"http://thecolbertreport.cc.com/videos/fyqj80/porter-goss-resignation",
"http://thecolbertreport.cc.com/videos/3ig0g8/the-word---not",
"http://thecolbertreport.cc.com/videos/zdkg2i/shere-hite",
"http://thecolbertreport.cc.com/videos/7581zo/sign-off---thank-you--stephen-"
],
"guest": "Shere Hite"
},
{
"date": "2006-05-09",
"videos": [
"http://thecolbertreport.cc.com/videos/v9p03c/intro---5-9-06",
"http://thecolbertreport.cc.com/videos/t6b1ke/double-or-nothing",
"http://thecolbertreport.cc.com/videos/mjq9vh/the-word---superegomaniac",
"http://thecolbertreport.cc.com/videos/9w4u9e/movies-that-are-destroying-america---summer-movies",
"http://thecolbertreport.cc.com/videos/s2q4vq/frank-rich",
"http://thecolbertreport.cc.com/videos/hofw72/sign-off---closing-credits-contest"
],
"guest": "Frank Rich"
},
{
"date": "2006-05-10",
"videos": [
"http://thecolbertreport.cc.com/videos/j0109g/exclusive---better-know-a-district---nebraska-s-2nd---lee-terry",
"http://thecolbertreport.cc.com/videos/z0wmkf/intro---5-10-06",
"http://thecolbertreport.cc.com/videos/pc9isx/the-bird-flu",
"http://thecolbertreport.cc.com/videos/6olwle/the-word---athletes-are-above-the-law",
"http://thecolbertreport.cc.com/videos/m1vdpp/better-know-a-district---nebraska-s-2nd---lee-terry",
"http://thecolbertreport.cc.com/videos/kuohzs/william-bastone",
"http://thecolbertreport.cc.com/videos/pksza0/sign-off---what-you-deserve"
],
"guest": "Bill Bastone"
},
{
"date": "2006-05-11",
"videos": [
"http://thecolbertreport.cc.com/videos/3oo94k/intro---5-11-06",
"http://thecolbertreport.cc.com/videos/jn8cw4/the-west-wing",
"http://thecolbertreport.cc.com/videos/j7pjuz/the-word---fill--er-up",
"http://thecolbertreport.cc.com/videos/yy27qi/madeleine-albright",
"http://thecolbertreport.cc.com/videos/8nl4m3/tip-wag---gold"
],
"guest": "Madeleine Albright"
},
{
"date": "2006-05-15",
"videos": [
"http://thecolbertreport.cc.com/videos/uhk7yp/intro---5-15-06",
"http://thecolbertreport.cc.com/videos/nxszdr/ahmadinejad-s-letter",
"http://thecolbertreport.cc.com/videos/g2h9yx/the-word---lunchables",
"http://thecolbertreport.cc.com/videos/pn3k09/summaries-of-summaries",
"http://thecolbertreport.cc.com/videos/f5iuwt/all-you-need-to-know---dick-cheney",
"http://thecolbertreport.cc.com/videos/qrt5tg/kevin-phillips",
"http://thecolbertreport.cc.com/videos/lww1s9/craziest-f--king-thing-i-ve-ever-heard---gas-prices"
],
"guest": "Kevin Phillips"
},
{
"date": "2006-05-16",
"videos": [
"http://thecolbertreport.cc.com/videos/x3193a/intro---5-16-06",
"http://thecolbertreport.cc.com/videos/swctyt/the-word---inoculation",
"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/search-for-a-new-black-friend"
],
"guest": "Tyson Slocum"
},
{
"date": "2006-05-17",
"videos": [
"http://thecolbertreport.cc.com/videos/8b6qml/exclusive---better-know-a-president---theodore-roosevelt",
"http://thecolbertreport.cc.com/videos/x3193a/intro---5-16-06",
"http://thecolbertreport.cc.com/videos/swctyt/the-word---inoculation",
"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/search-for-a-new-black-friend"
],
"guest": "Jonathan Alter"
},
{
"date": "2006-05-17",
"videos": [
"http://thecolbertreport.cc.com/videos/wnj4cc/intro---5-17-06",
"http://thecolbertreport.cc.com/videos/xie8nv/the-word---democrats",
"http://thecolbertreport.cc.com/videos/3w6t72/better-know-a-president---theodore-roosevelt",
"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://thecolbertreport.cc.com/videos/ddjyzq/intro---5-18-06",
"http://thecolbertreport.cc.com/videos/q374t3/stephen-colbert-s-guardian-eagles",
"http://thecolbertreport.cc.com/videos/91osyo/the-word---libya",
"http://thecolbertreport.cc.com/videos/rvxfth/difference-makers---tim-donnelly",
"http://thecolbertreport.cc.com/videos/lga95g/fract---this-day-in-stephen-history",
"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/my-first-100-shows--how-i-changed-the-world",
"http://thecolbertreport.cc.com/videos/dk29ec/the-word---me",
"http://thecolbertreport.cc.com/videos/sygeud/stone-phillips",
"http://thecolbertreport.cc.com/videos/oqbssv/helium-balloon-drop",
"http://thecolbertreport.cc.com/videos/n2keyu/the-in-box---100th-episode"
],
"guest": "Stone Phillips"
},
{
"date": "2006-06-06",
"videos": [
"http://thecolbertreport.cc.com/videos/0jvvnp/intro---6-6-06",
"http://thecolbertreport.cc.com/videos/zo00tb/666",
"http://thecolbertreport.cc.com/videos/fvrhwv/the-word---military",
"http://thecolbertreport.cc.com/videos/ohdrye/stephen-s-sound-advice---graduation",
"http://thecolbertreport.cc.com/videos/j42g38/christiane-amanpour",
"http://thecolbertreport.cc.com/videos/5pxetf/sign-off---666-almost-over"
],
"guest": "Christiane Amanpour"
},
{
"date": "2006-06-07",
"videos": [
"http://thecolbertreport.cc.com/videos/4y1ae4/intro---6-7-06",
"http://thecolbertreport.cc.com/videos/krcfjp/balrog",
"http://thecolbertreport.cc.com/videos/8enhyk/search-for-a-new-black-friend---first-submissions",
"http://thecolbertreport.cc.com/videos/b9ck5g/the-word---big-deal",
"http://thecolbertreport.cc.com/videos/q5rrxq/threatdown---bad-heroin",
"http://thecolbertreport.cc.com/videos/g6gwcq/steve-squyres",
"http://thecolbertreport.cc.com/videos/l4kbi3/sign-off---vaughniston"
],
"guest": "Steve Squyres"
},
{
"date": "2006-06-08",
"videos": [
"http://thecolbertreport.cc.com/videos/s8vv3c/intro---6-8-06",
"http://thecolbertreport.cc.com/videos/5h2hdf/good-news-about-terror",
"http://thecolbertreport.cc.com/videos/9s5g2f/the-word---goooooaaaaaal-",
"http://thecolbertreport.cc.com/videos/tb1qzm/better-know-a-district---texas--22nd---tom-delay",
"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://thecolbertreport.cc.com/videos/kjiw2u/intro---6-12-06",
"http://thecolbertreport.cc.com/videos/6ev021/tony-awards",
"http://thecolbertreport.cc.com/videos/m292m0/on-notice---mort-zuckerman",
"http://thecolbertreport.cc.com/videos/g6su9g/the-word---tom-delay-s-farewell-address",
"http://thecolbertreport.cc.com/videos/e9sys9/tip-wag---college-students",
"http://thecolbertreport.cc.com/videos/1zagcw/robert-f--kennedy-jr-",
"http://thecolbertreport.cc.com/videos/rklfpc/a-tip-from-stephen-colbert-s-gardening-almanac"
],
"guest": "Robert F. Kennedy Jr."
},
{
"date": "2006-06-13",
"videos": [
"http://thecolbertreport.cc.com/videos/04ejnu/intro---6-13-06",
"http://thecolbertreport.cc.com/videos/g9ijaq/stephen-jr--update",
"http://thecolbertreport.cc.com/videos/qieya3/the-word---great-f---ing-idea",
"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/exclusive---better-know-a-district---georgia-s-8th---lynn-westmoreland",
"http://thecolbertreport.cc.com/videos/ddmy1c/intro---6-14-06",
"http://thecolbertreport.cc.com/videos/3lnns6/surprise-visit-to-iraq",
"http://thecolbertreport.cc.com/videos/l28ig3/the-word---license-renewal",
"http://thecolbertreport.cc.com/videos/tlf8t3/better-know-a-district---georgia-s-8th---lynn-westmoreland",
"http://thecolbertreport.cc.com/videos/4xe4qw/david-sirota",
"http://thecolbertreport.cc.com/videos/g3hppv/sign-off---disappearing-act"
],
"guest": "David Sirota"
},
{
"date": "2006-06-15",
"videos": [
"http://thecolbertreport.cc.com/videos/b9zn8f/intro---6-15-06",
"http://thecolbertreport.cc.com/videos/69j400/search-for-a-new-black-friend----miami-vice--premiere",
"http://thecolbertreport.cc.com/videos/kt2s9v/the-word---lock---load",
"http://thecolbertreport.cc.com/videos/mqgxig/formidable-opponent---guantanamo-bay",
"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://thecolbertreport.cc.com/videos/1zww1j/intro---6-19-06",
"http://thecolbertreport.cc.com/videos/hsj6mj/bill-gates",
"http://thecolbertreport.cc.com/videos/dattp1/the-word---risky-business",
"http://thecolbertreport.cc.com/videos/q5w5ph/threatdown---the-homo-sexy-edition",
"http://thecolbertreport.cc.com/videos/vaw7tx/gustavo-arellano"
],
"guest": "Gustavo Arellano"
},
{
"date": "2006-06-20",
"videos": [
"http://thecolbertreport.cc.com/videos/wanyh5/intro---6-20-06",
"http://thecolbertreport.cc.com/videos/t2udf0/marrying-snakes",
"http://thecolbertreport.cc.com/videos/5kkfzf/the-word---everything-must-go",
"http://thecolbertreport.cc.com/videos/m05b1x/american-goal",
"http://thecolbertreport.cc.com/videos/qitmnq/stephen-makes-it-simple---government",
"http://thecolbertreport.cc.com/videos/yji71b/bart-ehrman",
"http://thecolbertreport.cc.com/videos/cahdxo/sign-off---i-ll-call-you"
],
"guest": "Bart Ehrman"
},
{
"date": "2006-06-21",
"videos": [
"http://thecolbertreport.cc.com/videos/ghd1lj/intro---6-21-06",
"http://thecolbertreport.cc.com/videos/sx1i4m/truthiness-cheer",
"http://thecolbertreport.cc.com/videos/o652yy/don-t-mess-with-jesus",
"http://thecolbertreport.cc.com/videos/alty3q/world-cup-trash-talk---alexi-lalas",
"http://thecolbertreport.cc.com/videos/n3wvrq/tip-wag---episcopal-church",
"http://thecolbertreport.cc.com/videos/qjlwml/bay-buchanan",
"http://thecolbertreport.cc.com/videos/k5qunl/sign-off---insane-clown"
],
"guest": "Bay Buchanan"
},
{
"date": "2006-06-22",
"videos": [
"http://thecolbertreport.cc.com/videos/q057ll/exclusive---better-know-a-district---colorado-s-1st---diana-degette",
"http://thecolbertreport.cc.com/videos/wjjbzb/intro---6-22-06",
"http://thecolbertreport.cc.com/videos/f4jomt/stephen-s-fault",
"http://thecolbertreport.cc.com/videos/21iu1g/stephen-hawking-is-an-a-hole",
"http://thecolbertreport.cc.com/videos/hfgyhs/the-word---cut-and-run",
"http://thecolbertreport.cc.com/videos/abdpyq/better-know-a-district---colorado-s-1st---diana-degette",
"http://thecolbertreport.cc.com/videos/2oh72f/douglas-brinkley",
"http://thecolbertreport.cc.com/videos/vh4cyy/sign-off---not-winning-prizes"
],
"guest": "Doug Brinkley"
},
{
"date": "2006-06-26",
"videos": [
"http://thecolbertreport.cc.com/videos/nxwjfg/intro---6-26-06",
"http://thecolbertreport.cc.com/videos/0au60f/buffett-hires-gates",
"http://thecolbertreport.cc.com/videos/7xr6qc/medal-of-audacity",
"http://thecolbertreport.cc.com/videos/wzsdxf/the-word---class-warfare",
"http://thecolbertreport.cc.com/videos/gb7vwl/all-you-need-to-know---hot-planet",
"http://thecolbertreport.cc.com/videos/ny0s7o/mark-bowden",
"http://thecolbertreport.cc.com/videos/7zeule/sign-off---highlights-magazine"
],
"guest": "Mark Bowden"
},
{
"date": "2006-06-27",
"videos": [
"http://thecolbertreport.cc.com/videos/fqk84n/intro---6-27-06",
"http://thecolbertreport.cc.com/videos/wmi0fy/flammo-mcburny",
"http://thecolbertreport.cc.com/videos/jgpsp4/greatest-conservative-rock-songs",
"http://thecolbertreport.cc.com/videos/5xzyo9/the-word---cold--dead-fingers",
"http://thecolbertreport.cc.com/videos/nnrjlz/movies-that-are-destroying-america---a-scanner-darkly",
"http://thecolbertreport.cc.com/videos/360rgd/chris-matthews",
"http://thecolbertreport.cc.com/videos/iiom30/sign-off---rubber-mop"
],
"guest": "Chris Matthews"
},
{
"date": "2006-06-28",
"videos": [
"http://thecolbertreport.cc.com/videos/iehmr9/intro---6-28-06",
"http://thecolbertreport.cc.com/videos/mdix0g/the-smoking-side-dish",
"http://thecolbertreport.cc.com/videos/luor1n/american-flags",
"http://thecolbertreport.cc.com/videos/ygvw1r/the-word---superman",
"http://thecolbertreport.cc.com/videos/9i4qz9/citizens-in-action---fondue-it-yourself",
"http://thecolbertreport.cc.com/videos/pt4qqj/robert-baer",
"http://thecolbertreport.cc.com/videos/h13p5y/sign-off---mr--potato-head"
],
"guest": "Robert Baer"
},
{
"date": "2006-06-29",
"videos": [
"http://thecolbertreport.cc.com/videos/edzwgb/intro---6-29-06",
"http://thecolbertreport.cc.com/videos/voqmme/farewell--supreme-court",
"http://thecolbertreport.cc.com/videos/z39ivs/the-president-s-bff",
"http://thecolbertreport.cc.com/videos/qzor72/the-word---monkey-butter",
"http://thecolbertreport.cc.com/videos/ncmucg/difference-makers---steve-pelkey",
"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://thecolbertreport.cc.com/videos/lp1b85/intro---7-10-06",
"http://thecolbertreport.cc.com/videos/fweavv/world-cup-co-champions",
"http://thecolbertreport.cc.com/videos/gud4ld/the-word---silver-foxes",
"http://thecolbertreport.cc.com/videos/ul4u7x/stephen-s-sound-advice---avoiding-wildfires",
"http://thecolbertreport.cc.com/videos/hfxzg3/amy-sedaris",
"http://thecolbertreport.cc.com/videos/izyjak/wilford-brimley-calls---mexico"
],
"guest": "Amy Sedaris"
},
{
"date": "2006-07-11",
"videos": [
"http://thecolbertreport.cc.com/videos/2clwx9/intro---7-11-06",
"http://thecolbertreport.cc.com/videos/iqeepf/coddling-our-kids",
"http://thecolbertreport.cc.com/videos/d006ym/the-word---psychopharmaparenting",
"http://thecolbertreport.cc.com/videos/0go470/stephen-r-a-p-s----talkin--to-kids",
"http://thecolbertreport.cc.com/videos/wpkhsp/tony-hawk",
"http://thecolbertreport.cc.com/videos/0eibi7/stephen-colbert-s-world-of-colbertcraft"
],
"guest": "Tony Hawk"
},
{
"date": "2006-07-12",
"videos": [
"http://thecolbertreport.cc.com/videos/ov83sj/exclusive---better-know-a-district---washington-s-2nd---rick-larsen",
"http://thecolbertreport.cc.com/videos/xl7bdt/intro---7-12-06",
"http://thecolbertreport.cc.com/videos/t0dd3g/massachusetts---gaysrael",
"http://thecolbertreport.cc.com/videos/pey6is/the-word---the-america-conventions",
"http://thecolbertreport.cc.com/videos/67j2yk/better-know-a-district---washington-s-2nd---rick-larsen",
"http://thecolbertreport.cc.com/videos/pabesh/mort-zuckerman",
"http://thecolbertreport.cc.com/videos/c4tuhx/sign-off---space-open"
],
"guest": "Mort Zuckerman"
},
{
"date": "2006-07-13",
"videos": [
"http://thecolbertreport.cc.com/videos/rlgq2q/intro---7-13-06",
"http://thecolbertreport.cc.com/videos/d3xq4i/tv-s-new-low",
"http://thecolbertreport.cc.com/videos/d45lww/the-word---inquisition",
"http://thecolbertreport.cc.com/videos/mu9fov/threatdown---gay-clones",
"http://thecolbertreport.cc.com/videos/42xxhd/ron-suskind"
],
"guest": "Ron Suskind"
},
{
"date": "2006-07-17",
"videos": [
"http://thecolbertreport.cc.com/videos/q6xn0v/intro---7-17-06",
"http://thecolbertreport.cc.com/videos/8g7ft7/microphone-on",
"http://thecolbertreport.cc.com/videos/9s23g8/one-american-dollar",
"http://thecolbertreport.cc.com/videos/ne3cif/the-word---t---a",
"http://thecolbertreport.cc.com/videos/mn3izi/tip-wag---arizona",
"http://thecolbertreport.cc.com/videos/udm6or/lee-silver",
"http://thecolbertreport.cc.com/videos/yz4kpe/sign-off---lemons"
],
"guest": "Lee Silver"
},
{
"date": "2006-07-18",
"videos": [
"http://thecolbertreport.cc.com/videos/6nca03/intro---7-18-06",
"http://thecolbertreport.cc.com/videos/zipmr4/column-width",
"http://thecolbertreport.cc.com/videos/r9fvrq/wwiii",
"http://thecolbertreport.cc.com/videos/y08094/the-word---solidarity",
"http://thecolbertreport.cc.com/videos/dz7igl/stephen-colbert-s-problems-without-solutions---bears",
"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://thecolbertreport.cc.com/videos/2v2a4w/intro---7-19-06",
"http://thecolbertreport.cc.com/videos/wzyudz/veto-virginity",
"http://thecolbertreport.cc.com/videos/vmqv4k/oprah-and-gayle",
"http://thecolbertreport.cc.com/videos/zjmkqr/the-word---r-e-s-p-e-c-t",
"http://thecolbertreport.cc.com/videos/yluk0n/the-convenientest-truth",
"http://thecolbertreport.cc.com/videos/xndme2/joe-scarborough",
"http://thecolbertreport.cc.com/videos/3os5ld/sign-off---buck-o-neil"
],
"guest": "Joe Scarborough"
},
{
"date": "2006-07-20",
"videos": [
"http://thecolbertreport.cc.com/videos/vx02e0/exclusive---better-know-a-district---florida-s-19th---robert-wexler",
"http://thecolbertreport.cc.com/videos/e2w8gi/intro---7-20-06",
"http://thecolbertreport.cc.com/videos/bpcz93/search-for-a-new-black-friend---friend-exchange-rate",
"http://thecolbertreport.cc.com/videos/flwcdv/julian-bond",
"http://thecolbertreport.cc.com/videos/8oaiw2/better-know-a-district---florida-s-19th---robert-wexler",
"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://thecolbertreport.cc.com/videos/8l2dhx/intro---7-24-06",
"http://thecolbertreport.cc.com/videos/b9z8jn/celebrating-america-s-kick-assedness",
"http://thecolbertreport.cc.com/videos/mchynh/war---",
"http://thecolbertreport.cc.com/videos/qpue58/the-word---moral-minority",
"http://thecolbertreport.cc.com/videos/zo2o8b/threatdown---camp",
"http://thecolbertreport.cc.com/videos/0xazqv/howell-raines",
"http://thecolbertreport.cc.com/videos/530hq6/sign-off---proud"
],
"guest": "Howell Raines"
},
{
"date": "2006-07-25",
"videos": [
"http://thecolbertreport.cc.com/videos/3bdqam/intro---7-25-06",
"http://thecolbertreport.cc.com/videos/qik373/all-red-states",
"http://thecolbertreport.cc.com/videos/mdzpjk/morning-shows",
"http://thecolbertreport.cc.com/videos/e4fmv9/the-word---opposite-day",
"http://thecolbertreport.cc.com/videos/bqr3op/formidable-opponent---stem-cell-research",
"http://thecolbertreport.cc.com/videos/6xp57g/william-donohue",
"http://thecolbertreport.cc.com/videos/wfh0qw/sign-off---food-for-thought"
],
"guest": "William Donohue"
},
{
"date": "2006-07-26",
"videos": [
"http://thecolbertreport.cc.com/videos/sz2q6w/intro---7-26-06",
"http://thecolbertreport.cc.com/videos/a62j0l/stephen-s-family-tree",
"http://thecolbertreport.cc.com/videos/nxih1e/rescue-stephen-jr-",
"http://thecolbertreport.cc.com/videos/b9kj0d/the-word---democrazy",
"http://thecolbertreport.cc.com/videos/2wr9gw/stephen-s-sound-advice---blackouts",
"http://thecolbertreport.cc.com/videos/ym3t0d/neal-katyal",
"http://thecolbertreport.cc.com/videos/9nk4r7/sign-off---super-hero-stamps"
],
"guest": "Neal Katyal"
},
{
"date": "2006-07-27",
"videos": [
"http://thecolbertreport.cc.com/videos/bgxe8v/exclusive---better-know-a-district---district-of-columbia---eleanor-holmes-norton",
"http://thecolbertreport.cc.com/videos/jdsi7h/intro---7-27-06",
"http://thecolbertreport.cc.com/videos/2pti2w/floyd-landis--balls",
"http://thecolbertreport.cc.com/videos/0qi0dm/the-word---secretary-general-bolton",
"http://thecolbertreport.cc.com/videos/6quypd/better-know-a-district---district-of-columbia---eleanor-holmes-norton",
"http://thecolbertreport.cc.com/videos/a2w76v/joe-quesada"
],
"guest": "Joe Quesada"
},
{
"date": "2006-07-31",
"videos": [
"http://thecolbertreport.cc.com/videos/2k66vv/intro---7-31-06",
"http://thecolbertreport.cc.com/videos/ipm2dm/book-club",
"http://thecolbertreport.cc.com/videos/3jl3pu/bicycle-theft",
"http://thecolbertreport.cc.com/videos/z1aahs/the-word---wikiality",
"http://thecolbertreport.cc.com/videos/zqod1f/tip-wag---lance-bass",
"http://thecolbertreport.cc.com/videos/6tak7c/ned-lamont"
],
"guest": "Ned Lamont"
},
{
"date": "2006-08-01",
"videos": [
"http://thecolbertreport.cc.com/videos/b1r2b5/intro---8-1-06",
"http://thecolbertreport.cc.com/videos/advrej/courting-joe-lieberman",
"http://thecolbertreport.cc.com/videos/n4ao8r/cuba-libre",
"http://thecolbertreport.cc.com/videos/uqnkmr/the-word---uncool",
"http://thecolbertreport.cc.com/videos/kxcfet/balls-for-kidz---carnivals",
"http://thecolbertreport.cc.com/videos/pcfi97/peter-beinart",
"http://thecolbertreport.cc.com/videos/wm5ib9/sign-off---energy"
],
"guest": "Peter Beinart"
},
{
"date": "2006-08-02",
"videos": [
"http://thecolbertreport.cc.com/videos/7ofk8i/intro---8-2-06",
"http://thecolbertreport.cc.com/videos/1jctl5/chair-for-joe-lieberman",
"http://thecolbertreport.cc.com/videos/tc2zff/on-notice---how-the-on-notice-board-is-made",
"http://thecolbertreport.cc.com/videos/9f950b/the-word---single-serving",
"http://thecolbertreport.cc.com/videos/1gkx3r/no-joe-lieberman",
"http://thecolbertreport.cc.com/videos/m7siat/linda-hirshman",
"http://thecolbertreport.cc.com/videos/kx6zql/sign-off---cocoa-puffs"
],
"guest": "Linda Hirshman"
},
{
"date": "2006-08-03",
"videos": [
"http://thecolbertreport.cc.com/videos/dij1sw/war--what-it-s-good-for---intro",
"http://thecolbertreport.cc.com/videos/gdp73x/war--what-it-s-good-for---russ-lieber",
"http://thecolbertreport.cc.com/videos/xzhg3v/meet-an-ally---palau",
"http://thecolbertreport.cc.com/videos/o6s4zb/paul-hackett",
"http://thecolbertreport.cc.com/videos/cujsej/war--what-it-s-good-for---the-eternal-flame"
],
"guest": "Paul Hackett"
},
{
"date": "2006-08-08",
"videos": [
"http://thecolbertreport.cc.com/videos/ggdajm/intro---8-8-06",
"http://thecolbertreport.cc.com/videos/oafdpt/lieberman-no-show",
"http://thecolbertreport.cc.com/videos/kend9g/press-room-renovations",
"http://thecolbertreport.cc.com/videos/cru76e/the-word---ten-hut-",
"http://thecolbertreport.cc.com/videos/ywy5cq/tek-jansen---operation--heart-of-the-phoenix---dead-or-alive",
"http://thecolbertreport.cc.com/videos/y3ycer/bill-rhoden",
"http://thecolbertreport.cc.com/videos/h498ah/sign-off---toss-to-jon"
],
"guest": "Bill Rhoden"
},
{
"date": "2006-08-09",
"videos": [
"http://thecolbertreport.cc.com/videos/8ku3ic/intro---8-9-06",
"http://thecolbertreport.cc.com/videos/m3m7kz/lieberman-loses",
"http://thecolbertreport.cc.com/videos/coxidl/delay-and-jesus",
"http://thecolbertreport.cc.com/videos/9jopn4/the-word---pencils-down",
"http://thecolbertreport.cc.com/videos/hpijh0/tip-wag---hungarian-bridge",
"http://thecolbertreport.cc.com/videos/p3g7eb/alexandra-robbins"
],
"guest": "Alexandra Robbins"
},
{
"date": "2006-08-10",
"videos": [
"http://thecolbertreport.cc.com/videos/75wf4h/exclusive---better-know-a-district---california-s-6th---lynn-woolsey-pt--1",
"http://thecolbertreport.cc.com/videos/m276r1/exclusive---better-know-a-district---california-s-6th---lynn-woolsey-pt--2",
"http://thecolbertreport.cc.com/videos/8ku3ic/intro---8-9-06",
"http://thecolbertreport.cc.com/videos/m3m7kz/lieberman-loses",
"http://thecolbertreport.cc.com/videos/coxidl/delay-and-jesus",
"http://thecolbertreport.cc.com/videos/9jopn4/the-word---pencils-down",
"http://thecolbertreport.cc.com/videos/hpijh0/tip-wag---hungarian-bridge",
"http://thecolbertreport.cc.com/videos/p3g7eb/alexandra-robbins"
],
"guest": "Eli Pariser"
},
{
"date": "2006-08-10",
"videos": [
"http://thecolbertreport.cc.com/videos/qehfxb/intro---8-10-06",
"http://thecolbertreport.cc.com/videos/6kvez0/liquids-on-planes",
"http://thecolbertreport.cc.com/videos/b2svxe/the-word---cappuccino",
"http://thecolbertreport.cc.com/videos/fyj6zj/better-know-a-district---california-s-6th---lynn-woolsey",
"http://thecolbertreport.cc.com/videos/d573ty/eli-pariser",
"http://thecolbertreport.cc.com/videos/hjpfzb/sign-off---remedy-for-insomnia"
],
"guest": "Eli Pariser"
},
{
"date": "2006-08-14",
"videos": [
"http://thecolbertreport.cc.com/videos/voo1ci/intro---8-14-06",
"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/stephen-s-sound-advice---protecting-your-online-identity",
"http://thecolbertreport.cc.com/videos/u393jw/ramesh-ponnuru",
"http://thecolbertreport.cc.com/videos/2b5c2u/sign-off---e-mail-password"
],
"guest": "Ramesh Ponnuru"
},
{
"date": "2006-08-15",
"videos": [
"http://thecolbertreport.cc.com/videos/s8rzc5/intro---8-15-06",
"http://thecolbertreport.cc.com/videos/95fbpq/sharing-the-spotlight-with-ahmadinejad",
"http://thecolbertreport.cc.com/videos/6qb0k5/the-word---dumb-ocracy",
"http://thecolbertreport.cc.com/videos/2evzvd/hungarian-bridge-progress-report",
"http://thecolbertreport.cc.com/videos/mjhnvj/all-you-need-to-know---proper-condom-use",
"http://thecolbertreport.cc.com/videos/jdgp1k/david-gergen"
],
"guest": "David Gergen"
},
{
"date": "2006-08-16",
"videos": [
"http://thecolbertreport.cc.com/videos/5nmn6o/intro---8-16-06",
"http://thecolbertreport.cc.com/videos/ic96lx/alan-schlesinger",
"http://thecolbertreport.cc.com/videos/lsglfu/the-word---el-comandante",
"http://thecolbertreport.cc.com/videos/gb4665/let-s-make-this-happen",
"http://thecolbertreport.cc.com/videos/2ap7v2/was-it-really-that-bad----cold-war",
"http://thecolbertreport.cc.com/videos/5uanam/morgan-spurlock",
"http://thecolbertreport.cc.com/videos/9nqss3/sign-off---historic-hoax"
],
"guest": "Morgan Spurlock"
},
{
"date": "2006-08-17",
"videos": [
"http://thecolbertreport.cc.com/videos/b66unq/intro---8-17-06",
"http://thecolbertreport.cc.com/videos/xzzu7h/continuity",
"http://thecolbertreport.cc.com/videos/75yefr/neil-degrasse-tyson",
"http://thecolbertreport.cc.com/videos/kc21ru/better-know-a-district---california-s-31st",
"http://thecolbertreport.cc.com/videos/8n3z7e/better-know-a-district---california-s-31st---javier-becerra",
"http://thecolbertreport.cc.com/videos/nsqwib/neil-young"
],
"guest": "Neil Young"
},
{
"date": "2006-08-21",
"videos": [
"http://thecolbertreport.cc.com/videos/uz7rxo/intro---8-21-06",
"http://thecolbertreport.cc.com/videos/vzigy3/green-screen-challenge---the-announcement",
"http://thecolbertreport.cc.com/videos/u468bk/atheists-in-foxholes",
"http://thecolbertreport.cc.com/videos/pqlyj1/the-word---side-effects",
"http://thecolbertreport.cc.com/videos/euqtan/threatdown---drivers-eat",
"http://thecolbertreport.cc.com/videos/btgfsr/geoffrey-nunberg",
"http://thecolbertreport.cc.com/videos/6p8hy2/sign-off---pants-off"
],
"guest": "Geoffrey Nunberg"
},
{
"date": "2006-08-22",
"videos": [
"http://thecolbertreport.cc.com/videos/h5huhm/intro---8-22-06",
"http://thecolbertreport.cc.com/videos/xr6owy/cheating-death---fields-medal",
"http://thecolbertreport.cc.com/videos/p4wf5t/the-word---99-problems",
"http://thecolbertreport.cc.com/videos/8t1wv1/stephen-colbert-salutes-hungary",
"http://thecolbertreport.cc.com/videos/6iv4i1/paul-krugman"
],
"guest": "Paul Krugman"
},
{
"date": "2006-08-23",
"videos": [
"http://thecolbertreport.cc.com/videos/rsqkbw/american-pop-culture--it-s-crumbelievable----intro",
"http://thecolbertreport.cc.com/videos/85w92g/american-pop-culture--it-s-crumbelievable----pop-culture-icons",
"http://thecolbertreport.cc.com/videos/l7z3b3/damian-kulash",
"http://thecolbertreport.cc.com/videos/19r90f/american-pop-culture--it-s-crumbelievable----cable-tv-vs--the-american-family",
"http://thecolbertreport.cc.com/videos/9h0pam/gideon-yago",
"http://thecolbertreport.cc.com/videos/l29lto/american-pop-culture--it-s-crumbelievable----stephen-steps-up"
],
"guest": "Gideon Yago"
},
{
"date": "2006-08-24",
"videos": [
"http://thecolbertreport.cc.com/videos/86h1lx/intro---8-24-06",
"http://thecolbertreport.cc.com/videos/j3gjfh/national-peach-month",
"http://thecolbertreport.cc.com/videos/8avj2z/fart-jokes",
"http://thecolbertreport.cc.com/videos/ejrivu/the-word---bad-boys",
"http://thecolbertreport.cc.com/videos/sui137/30-days-with-the-colbert-report",
"http://thecolbertreport.cc.com/videos/dw0hc5/janna-levin",
"http://thecolbertreport.cc.com/videos/8v6ak5/green-screen-challenge---socialized-medicine"
],
"guest": "Janna Levin"
},
{
"date": "2006-09-11",
"videos": [
"http://thecolbertreport.cc.com/videos/e2o0vm/intro---9-11-06",
"http://thecolbertreport.cc.com/videos/ryb1sd/manilow-s-emmy",
"http://thecolbertreport.cc.com/videos/vnwrl5/the-word---shall",
"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/sign-off---lullaby-clap"
],
"guest": "Martin Short"
},
{
"date": "2006-09-12",
"videos": [
"http://thecolbertreport.cc.com/videos/zj5aco/exclusive---better-know-a-challenger---new-jersey-s-3rd---richard-sexton",
"http://thecolbertreport.cc.com/videos/2vdm17/intro---9-12-06",
"http://thecolbertreport.cc.com/videos/fuhxnz/green-screen-challenge---entry",
"http://thecolbertreport.cc.com/videos/464nde/the-word---missed-opportunity",
"http://thecolbertreport.cc.com/videos/03wv59/better-know-a-challenger---new-jersey-s-3rd---richard-sexton",
"http://thecolbertreport.cc.com/videos/uyjgfx/toby-keith",
"http://thecolbertreport.cc.com/videos/df7axm/sign-off---special-episode"
],
"guest": "Toby Keith"
},
{
"date": "2006-09-13",
"videos": [
"http://thecolbertreport.cc.com/videos/9h47r2/intro---9-13-06",
"http://thecolbertreport.cc.com/videos/a7pf2u/the-colmandos",
"http://thecolbertreport.cc.com/videos/fftk8t/the-word---caveat-emptor",
"http://thecolbertreport.cc.com/videos/yr3sze/formidable-opponent---iraq-withdrawal",
"http://thecolbertreport.cc.com/videos/io94jl/ken-jennings",
"http://thecolbertreport.cc.com/videos/m6mk95/sign-off---cigarettes"
],
"guest": "Ken Jennings"
},
{
"date": "2006-09-14",
"videos": [
"http://thecolbertreport.cc.com/videos/3i56pi/intro---9-14-06",
"http://thecolbertreport.cc.com/videos/m82cj5/sexy-photo",
"http://thecolbertreport.cc.com/videos/39njye/george-allen",
"http://thecolbertreport.cc.com/videos/dmk6s2/hungarian-bridge---andras-simonyi",
"http://thecolbertreport.cc.com/videos/ogtff2/tip-wag---nasa",
"http://thecolbertreport.cc.com/videos/6xq5fv/bill-simmons",
"http://thecolbertreport.cc.com/videos/czqyfe/sign-off---get-on-it--nation",
"http://thecolbertreport.cc.com/videos/g844xc/bridge-contest"
],
"guest": "Bill Simmons"
},
{
"date": "2006-09-18",
"videos": [
"http://thecolbertreport.cc.com/videos/wteen9/intro---9-18-06",
"http://thecolbertreport.cc.com/videos/51grfw/whitney-houston",
"http://thecolbertreport.cc.com/videos/82m3g9/the-word---wiper-fluid",
"http://thecolbertreport.cc.com/videos/cyd2um/tek-jansen---operation--destiny-s-underbelly--entrapped-",
"http://thecolbertreport.cc.com/videos/r7b7p1/will-power",
"http://thecolbertreport.cc.com/videos/j44oq1/sign-off---bust"
],
"guest": "Will Power"
},
{
"date": "2006-09-19",
"videos": [
"http://thecolbertreport.cc.com/videos/spzrjp/intro---9-19-06",
"http://thecolbertreport.cc.com/videos/dbmjaj/u-n--week",
"http://thecolbertreport.cc.com/videos/5v40iy/the-word---tribalism",
"http://thecolbertreport.cc.com/videos/qloab5/threatdown---toby-keith",
"http://thecolbertreport.cc.com/videos/kf8re4/frank-rich",
"http://thecolbertreport.cc.com/videos/ezwrh0/sign-off---fantasy-colbert-report-league"
],
"guest": "Frank Rich"
},
{
"date": "2006-09-20",
"videos": [
"http://thecolbertreport.cc.com/videos/lj5z86/green-screen-challenge---the-challenge-continues",
"http://thecolbertreport.cc.com/videos/o1qorx/who-s-not-honoring-me-now----the-macarthur-foundation",
"http://thecolbertreport.cc.com/videos/pz60rq/green-screen-challenge---typical-democrats",
"http://thecolbertreport.cc.com/videos/vkr39r/stephen-s-sound-advice---high-school",
"http://thecolbertreport.cc.com/videos/fn9d5q/james-carville",
"http://thecolbertreport.cc.com/videos/g7hl0x/the-word---lose"
],
"guest": "James Carville"
},
{
"date": "2006-09-21",
"videos": [
"http://thecolbertreport.cc.com/videos/yujezq/intro---9-21-06",
"http://thecolbertreport.cc.com/videos/tvrtdg/days-of-repentance-hotline",
"http://thecolbertreport.cc.com/videos/kxvydq/better-know-a-challenger---new-jersey-s-5th---paul-aronsohn",
"http://thecolbertreport.cc.com/videos/u1txo4/daniel-ellsberg",
"http://thecolbertreport.cc.com/videos/42tk7e/sign-off---pentagon-papers",
"http://thecolbertreport.cc.com/videos/yxzh84/daniel-golden"
],
"guest": "Daniel Ellsberg"
},
{
"date": "2006-09-25",
"videos": [
"http://thecolbertreport.cc.com/videos/ubu45l/intro---9-25-06",
"http://thecolbertreport.cc.com/videos/918nqn/heritage",
"http://thecolbertreport.cc.com/videos/s08yij/buy-this-book",
"http://thecolbertreport.cc.com/videos/1tds5k/the-word---opposition-party",
"http://thecolbertreport.cc.com/videos/az74i4/green-screen-challenge---goodbye--darth-maul-",
"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://thecolbertreport.cc.com/videos/13qtu2/intro---9-26-06",
"http://thecolbertreport.cc.com/videos/76ov53/frank-rich-calls-in",
"http://thecolbertreport.cc.com/videos/navjpx/the-word---good-morning",
"http://thecolbertreport.cc.com/videos/22kzkk/four-horsemen-of-the-a-pop-calypse---justin-timberlake",
"http://thecolbertreport.cc.com/videos/kertmr/ted-danson",
"http://thecolbertreport.cc.com/videos/en1nzg/alpha-dog-of-the-week---tom-selleck"
],
"guest": "Ted Danson"
},
{
"date": "2006-09-27",
"videos": [
"http://thecolbertreport.cc.com/videos/dkn6is/intro---9-27-06",
"http://thecolbertreport.cc.com/videos/w75za8/oprah-and-friends",
"http://thecolbertreport.cc.com/videos/2zj0db/mort-zuckerman-dials-the-atone-phone",
"http://thecolbertreport.cc.com/videos/wq2mkf/the-word---iraq",
"http://thecolbertreport.cc.com/videos/p20mpr/tip-wag---george-clooney",
"http://thecolbertreport.cc.com/videos/g1anyj/lowell-bergman",
"http://thecolbertreport.cc.com/videos/8v25i1/sign-off---world-of-colbertcraft"
],
"guest": "Lowell Bergman"
},
{
"date": "2006-09-28",
"videos": [
"http://thecolbertreport.cc.com/videos/b0od22/intro---9-28-06",
"http://thecolbertreport.cc.com/videos/mechk8/green-screen-challenge---ipod---colbert",
"http://thecolbertreport.cc.com/videos/jl58qd/blitzkrieg-on-grinchitude---santa-claus--in",
"http://thecolbertreport.cc.com/videos/a23i2j/jon-stewart-calls-in",
"http://thecolbertreport.cc.com/videos/kby4hb/un-american-news---spain",
"http://thecolbertreport.cc.com/videos/c2vyau/steve-wozniak"
],
"guest": "Steve Wozniak"
},
{
"date": "2006-10-02",
"videos": [
"http://thecolbertreport.cc.com/videos/vaflyc/intro---10-2-06",
"http://thecolbertreport.cc.com/videos/ak0wmf/mark-foley",
"http://thecolbertreport.cc.com/videos/clzwmu/the-word---copycat",
"http://thecolbertreport.cc.com/videos/0f7zu5/threatdown---saudi-arabia",
"http://thecolbertreport.cc.com/videos/6cuxj4/michael-lewis",
"http://thecolbertreport.cc.com/videos/gwcer9/sign-off---actual-apologies"
],
"guest": "Michael Lewis"
},
{
"date": "2006-10-03",
"videos": [
"http://thecolbertreport.cc.com/videos/fkksjm/intro---10-3-06",
"http://thecolbertreport.cc.com/videos/85po0w/drunk-dialing",
"http://thecolbertreport.cc.com/videos/hnt52c/lucifer",
"http://thecolbertreport.cc.com/videos/ap05bd/the-word---experience",
"http://thecolbertreport.cc.com/videos/oojn49/steagle-colbeagle-the-eagle---mascot",
"http://thecolbertreport.cc.com/videos/xqpdbq/andy-stern",
"http://thecolbertreport.cc.com/videos/tbnr4f/sign-off---retire-the-jersey"
],
"guest": "Andy Stern"
},
{
"date": "2006-10-04",
"videos": [
"http://thecolbertreport.cc.com/videos/pi53om/intro---10-4-06",
"http://thecolbertreport.cc.com/videos/t3hp8a/mark-foley-the-rino",
"http://thecolbertreport.cc.com/videos/2n2oat/the-word---must-not-see-tv",
"http://thecolbertreport.cc.com/videos/536mbt/nobel-prize-sweep",
"http://thecolbertreport.cc.com/videos/ga8yja/green-screen-challenge---d-d",
"http://thecolbertreport.cc.com/videos/ps5fh4/byron-dorgan",
"http://thecolbertreport.cc.com/videos/vbbgif/-20-million-victory-party"
],
"guest": "Byron Dorgan"
},
{
"date": "2006-10-05",
"videos": [
"http://thecolbertreport.cc.com/videos/r5fn7m/intro---10-5-06",
"http://thecolbertreport.cc.com/videos/t7lg5x/handling-sex-scandals",
"http://thecolbertreport.cc.com/videos/2pcxy7/behavioral-profiling",
"http://thecolbertreport.cc.com/videos/6qs8dt/maz-jobrani",
"http://thecolbertreport.cc.com/videos/8vhk9f/better-know-a-district---florida-s-16th---mark-foley",
"http://thecolbertreport.cc.com/videos/cg4ud6/amy-goodman",
"http://thecolbertreport.cc.com/videos/mex37x/starbucks-price-hike"
],
"guest": "Amy Goodman"
},
{
"date": "2006-10-09",
"videos": [
"http://thecolbertreport.cc.com/videos/uz4y5r/intro---10-9-06",
"http://thecolbertreport.cc.com/videos/vcdu14/stephen-greets-kim-jong-il",
"http://thecolbertreport.cc.com/videos/94jsyv/the-word---safety",
"http://thecolbertreport.cc.com/videos/oqybt6/sport-report---saginaw-spirit-3-0-with-steagle-colbeagle",
"http://thecolbertreport.cc.com/videos/sxcbbt/randy-newman"
],
"guest": "Randy Newman"
},
{
"date": "2006-10-10",
"videos": [
"http://thecolbertreport.cc.com/videos/7x9ixq/a-salute-to-the-american-lady",
"http://thecolbertreport.cc.com/videos/2jugk2/stephen-r-a-p-s----gender-issues",
"http://thecolbertreport.cc.com/videos/tab5oc/jane-fonda-and-gloria-steinem",
"http://thecolbertreport.cc.com/videos/vglnl3/ariel-levy",
"http://thecolbertreport.cc.com/videos/6ooly1/sign-off---mrs--colbert"
],
"guest": "Ariel Levy"
},
{
"date": "2006-10-11",
"videos": [
"http://thecolbertreport.cc.com/videos/m063rn/intro---10-11-06",
"http://thecolbertreport.cc.com/videos/bmktr8/shout-out----from-baghdad-to-the-report",
"http://thecolbertreport.cc.com/videos/lbop8f/stephen-cashes-in",
"http://thecolbertreport.cc.com/videos/kpo74v/green-screen-challenge---the-final-cut",
"http://thecolbertreport.cc.com/videos/fxyspp/green-screen-challenge---the-finalists",
"http://thecolbertreport.cc.com/videos/n67d6e/green-screen-challenge---the-winner",
"http://thecolbertreport.cc.com/videos/pkbxv2/tek-jansen---space-station-theta-zeus-aquarius",
"http://thecolbertreport.cc.com/videos/8hq3dq/lightsaber-duel",
"http://thecolbertreport.cc.com/videos/nkr8wo/green-screen---george-lucas"
],
"guest": "Andrew Sullivan"
},
{
"date": "2006-10-12",
"videos": [
"http://thecolbertreport.cc.com/videos/d5jz3y/exclusive---better-know-a-challenger---new-jersey-s-4th---carol-gay",
"http://thecolbertreport.cc.com/videos/yw8t41/intro---10-12-06",
"http://thecolbertreport.cc.com/videos/dikrto/congratulatory-mail",
"http://thecolbertreport.cc.com/videos/9dfgke/north-korean-weapons-test-scare",
"http://thecolbertreport.cc.com/videos/htaz1s/gay-republicans---andrew-sullivan",
"http://thecolbertreport.cc.com/videos/gtnan5/better-know-a-challenger---new-jersey-s-4th---carol-gay",
"http://thecolbertreport.cc.com/videos/f57spg/brian-schweitzer",
"http://thecolbertreport.cc.com/videos/o1sfrf/sign-off---revved-up"
],
"guest": "Larry Miller"
},
{
"date": "2006-10-16",
"videos": [
"http://thecolbertreport.cc.com/videos/plp18s/intro---10-16-06",
"http://thecolbertreport.cc.com/videos/q81oyv/bush-impersonator-impersonator",
"http://thecolbertreport.cc.com/videos/3yuat5/cbgb-s",
"http://thecolbertreport.cc.com/videos/7i1kaz/the-word---russian-dolls",
"http://thecolbertreport.cc.com/videos/rxjbs7/tip-wag---midterm-elections-edition",
"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://thecolbertreport.cc.com/videos/ae5ru6/intro---10-17-06",
"http://thecolbertreport.cc.com/videos/fo3bt3/one-year-anniversary",
"http://thecolbertreport.cc.com/videos/r8tksi/descending-screen",
"http://thecolbertreport.cc.com/videos/18nq18/the-word---irreconcilable-differences",
"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/second-year-portrait"
],
"guest": "Richard Dawkins"
},
{
"date": "2006-10-18",
"videos": [
"http://thecolbertreport.cc.com/videos/nm42tm/intro---10-18-06",
"http://thecolbertreport.cc.com/videos/szo4co/elephant-vasectomies",
"http://thecolbertreport.cc.com/videos/bl7nra/the-word---sherlock",
"http://thecolbertreport.cc.com/videos/jpgqk0/jeopardy",
"http://thecolbertreport.cc.com/videos/wu6d7x/sport-report---smack-talk",
"http://thecolbertreport.cc.com/videos/0usw0u/david-kuo",
"http://thecolbertreport.cc.com/videos/pun0an/santorum-s-iraqi-lord-of-the-rings"
],
"guest": "Deepak Chopra"
},
{
"date": "2006-10-19",
"videos": [
"http://thecolbertreport.cc.com/videos/63h5y0/exclusive---better-know-a-challenger---new-york-s-19th---john-hall",
"http://thecolbertreport.cc.com/videos/simwwd/intro---10-19-06",
"http://thecolbertreport.cc.com/videos/zzoxmj/ebay-portrait-bid",
"http://thecolbertreport.cc.com/videos/55o9xl/jim-gilchrist",
"http://thecolbertreport.cc.com/videos/eh02b8/better-know-a-challenger---new-york-s-19th---john-hall",
"http://thecolbertreport.cc.com/videos/484q7z/peter-agre"
],
"guest": "Matthew Dowd"
},
{
"date": "2006-10-30",
"videos": [
"http://thecolbertreport.cc.com/videos/xsr78j/intro---10-30-06",
"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/the-word---shameless",
"http://thecolbertreport.cc.com/videos/3644s2/threatdown---greatdown",
"http://thecolbertreport.cc.com/videos/h5ly2o/barry-manilow"
],
"guest": "Barry Manilow"
},
{
"date": "2006-10-31",
"videos": [
"http://thecolbertreport.cc.com/videos/vll3lh/intro---10-31-06",
"http://thecolbertreport.cc.com/videos/ixb36k/costumes-for-the-girls",
"http://thecolbertreport.cc.com/videos/qrw2en/the-word---thanks--gays-",
"http://thecolbertreport.cc.com/videos/ya17xq/portrait-auction",
"http://thecolbertreport.cc.com/videos/crxtpi/welcome-to-the-house-of-horrors---nancy-pelosi",
"http://thecolbertreport.cc.com/videos/2g6dhj/tim-robbins",
"http://thecolbertreport.cc.com/videos/9z7u1s/freak-show---log-cabin-republican"
],
"guest": "Tim Robbins"
},
{
"date": "2006-11-01",
"videos": [
"http://thecolbertreport.cc.com/videos/fio9x5/exclusive---better-know-a-challenger---california-s-30th---david-nelson-jones",
"http://thecolbertreport.cc.com/videos/ngeqml/intro---11-1-06",
"http://thecolbertreport.cc.com/videos/07l6jg/john-kerry",
"http://thecolbertreport.cc.com/videos/5a62pu/the-word---rip-off",
"http://thecolbertreport.cc.com/videos/j449s5/better-know-a-challenger---california-s-30th---david-nelson-jones",
"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://thecolbertreport.cc.com/videos/c1jp7z/intro---11-2-06",
"http://thecolbertreport.cc.com/videos/ryl8xd/a-historidocufictiomentary-of-george-allen",
"http://thecolbertreport.cc.com/videos/ypv3hz/p-k--winsome---black-republican",
"http://thecolbertreport.cc.com/videos/e8pbai/sport-report---the-spirit-shop",
"http://thecolbertreport.cc.com/videos/o5x0ja/chad-walldorf--portrait-winner",
"http://thecolbertreport.cc.com/videos/vchsrw/ron-reagan"
],
"guest": "Ron Reagan Jr."
},
{
"date": "2006-11-06",
"videos": [
"http://thecolbertreport.cc.com/videos/5l9ww2/intro---11-6-06",
"http://thecolbertreport.cc.com/videos/3x1o1e/saddam-s-hanging",
"http://thecolbertreport.cc.com/videos/mfycn0/vote-your-conscience",
"http://thecolbertreport.cc.com/videos/xjsetj/the-word---happy-ending",
"http://thecolbertreport.cc.com/videos/yu4stw/ted-haggard-s-media-field-day",
"http://thecolbertreport.cc.com/videos/qtoavw/what-to-expect-when-you-re-electing",
"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/midterm-midtacular---beatty---bening-confirmation-call",
"http://thecolbertreport.cc.com/videos/vmt5dv/better-know-a-district---midterm-midtacular",
"http://thecolbertreport.cc.com/videos/42n9bh/midterm-midtacular---update-from-the-daily-show",
"http://thecolbertreport.cc.com/videos/gmknl3/midterm-midtacular---democrat-majority",
"http://thecolbertreport.cc.com/videos/1qhm06/stephen-s-final-thoughts",
"http://thecolbertreport.cc.com/videos/3fzd37/robert-wexler-and-eleanor-holmes-norton"
],
"guest": "Election Night Live Show"
},
{
"date": "2006-11-08",
"videos": [
"http://thecolbertreport.cc.com/videos/veyf2a/intro---11-8-06",
"http://thecolbertreport.cc.com/videos/0085n8/the-word---sigh",
"http://thecolbertreport.cc.com/videos/8tjdnz/better-know-a-district---new-york-s-19th---john-hall",
"http://thecolbertreport.cc.com/videos/n1c32a/tek-jansen---theme-song",
"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://thecolbertreport.cc.com/videos/vsle8s/intro---11-9-06",
"http://thecolbertreport.cc.com/videos/ec6t9w/shout-out----michael-rehm",
"http://thecolbertreport.cc.com/videos/0osdbo/the-word---putin--08",
"http://thecolbertreport.cc.com/videos/ro28cv/p-k--winsome---a-journey-home",
"http://thecolbertreport.cc.com/videos/sff21j/dean-kamen",
"http://thecolbertreport.cc.com/videos/y6jo9b/sign-off---buy-american"
],
"guest": "Dean Kamen"
},
{
"date": "2006-11-13",
"videos": [
"http://thecolbertreport.cc.com/videos/xhi69f/intro---11-13-06",
"http://thecolbertreport.cc.com/videos/tq9pyg/mccain-s-depression",
"http://thecolbertreport.cc.com/videos/wze0m8/the-word---back-off--old-man",
"http://thecolbertreport.cc.com/videos/3l0etr/tip-wag---quitters-edition",
"http://thecolbertreport.cc.com/videos/v04ko8/dan-rather",
"http://thecolbertreport.cc.com/videos/39thdv/alpha-dog-of-the-week---ronald-reagan"
],
"guest": "Dan Rather"
},
{
"date": "2006-11-14",
"videos": [
"http://thecolbertreport.cc.com/videos/2xysq8/intro---10-14-06",
"http://thecolbertreport.cc.com/videos/41uzjx/lesbian-roles",
"http://thecolbertreport.cc.com/videos/njn4f1/stephen-jr--in-canada",
"http://thecolbertreport.cc.com/videos/x9bnw7/the-word---expecting",
"http://thecolbertreport.cc.com/videos/mx7sjh/vote-for-gail-jingle",
"http://thecolbertreport.cc.com/videos/xokq2b/jeff-swartz",
"http://thecolbertreport.cc.com/videos/cnxqlb/kid-activity-corner---nancy-pelosi-hand-turkeys"
],
"guest": "Jeff Swartz"
},
{
"date": "2006-11-15",
"videos": [
"http://thecolbertreport.cc.com/videos/9sc11a/exclusive---better-know-a-founder---thomas-jefferson",
"http://thecolbertreport.cc.com/videos/2xysq8/intro---10-14-06",
"http://thecolbertreport.cc.com/videos/41uzjx/lesbian-roles",
"http://thecolbertreport.cc.com/videos/njn4f1/stephen-jr--in-canada",
"http://thecolbertreport.cc.com/videos/x9bnw7/the-word---expecting",
"http://thecolbertreport.cc.com/videos/mx7sjh/vote-for-gail-jingle",
"http://thecolbertreport.cc.com/videos/xokq2b/jeff-swartz",
"http://thecolbertreport.cc.com/videos/cnxqlb/kid-activity-corner---nancy-pelosi-hand-turkeys"
],
"guest": "Al Franken, Dr. Michael Novacek"
},
{
"date": "2006-11-15",
"videos": [
"http://thecolbertreport.cc.com/videos/zmp3r0/intro---11-15-06",
"http://thecolbertreport.cc.com/videos/kl1xl0/rush-limbaugh-s-comments",
"http://thecolbertreport.cc.com/videos/w5bgh2/democrats--victory-dance---al-franken",
"http://thecolbertreport.cc.com/videos/47a505/better-know-a-founder---thomas-jefferson",
"http://thecolbertreport.cc.com/videos/cnf5lf/mike-novacek"
],
"guest": "Al Franken, Dr. Michael Novacek"
},
{
"date": "2006-11-16",
"videos": [
"http://thecolbertreport.cc.com/videos/hstabl/intro---11-16-06",
"http://thecolbertreport.cc.com/videos/zyzp0g/minority-whip",
"http://thecolbertreport.cc.com/videos/euzyuf/sexiest-man-alive",
"http://thecolbertreport.cc.com/videos/olggdr/the-word---play-ball-",
"http://thecolbertreport.cc.com/videos/oplysq/movies-that-are-destroying-america---xmas",
"http://thecolbertreport.cc.com/videos/3il1eo/richard-linklater",
"http://thecolbertreport.cc.com/videos/s716ap/sign-off---strawberry"
],
"guest": "Richard Linklater"
},
{
"date": "2006-11-27",
"videos": [
"http://thecolbertreport.cc.com/videos/1xjoh6/intro---11-27-06",
"http://thecolbertreport.cc.com/videos/z4h5jm/putin--08",
"http://thecolbertreport.cc.com/videos/k3p09y/tivo-cleaning",
"http://thecolbertreport.cc.com/videos/dg34l1/the-word---jacksquat",
"http://thecolbertreport.cc.com/videos/ckqxms/threatdown---100-hoops",
"http://thecolbertreport.cc.com/videos/lqdkhe/jim-lehrer",
"http://thecolbertreport.cc.com/videos/y3zgee/sign-off---love"
],
"guest": "Jim Lehrer"
},
{
"date": "2006-11-28",
"videos": [
"http://thecolbertreport.cc.com/videos/0tspod/intro---11-28-06",
"http://thecolbertreport.cc.com/videos/47xxe1/who-s-honoring-me-now----gq",
"http://thecolbertreport.cc.com/videos/voj40k/the-word---ecu-menace",
"http://thecolbertreport.cc.com/videos/fenw0v/alabama-miracle---helen-keller-museum",
"http://thecolbertreport.cc.com/videos/xi41md/harry-shearer",
"http://thecolbertreport.cc.com/videos/iate4s/sign-off---exceptional-audience"
],
"guest": "Harry Shearer"
},
{
"date": "2006-11-29",
"videos": [
"http://thecolbertreport.cc.com/videos/mr063e/intro---11-29-06",
"http://thecolbertreport.cc.com/videos/wanzdw/who-s-riding-my-coattails-now----jeopardy",
"http://thecolbertreport.cc.com/videos/bp43w6/the-word---killing-two-birds",
"http://thecolbertreport.cc.com/videos/49jjmd/alabama-miracle---the-stephen-colbert-museum---gift-shop--grand-opening",
"http://thecolbertreport.cc.com/videos/8rjs2g/nora-ephron"
],
"guest": "Nora Ephron"
},
{
"date": "2006-11-30",
"videos": [
"http://thecolbertreport.cc.com/videos/wzpzqs/intro---11-30-06",
"http://thecolbertreport.cc.com/videos/4c2tdv/vilsack-attack",
"http://thecolbertreport.cc.com/videos/z88s3n/p-k--winsome---if-p-k--winsome-did-it",
"http://thecolbertreport.cc.com/videos/0inrmr/colbert-nation-merchandise",
"http://thecolbertreport.cc.com/videos/jotybg/alabama-miracle---the-morning-after",
"http://thecolbertreport.cc.com/videos/hv1lim/mike-lupica",
"http://thecolbertreport.cc.com/videos/k1wdp2/sign-off---wall-notch"
],
"guest": "Mike Lupica"
},
{
"date": "2006-12-04",
"videos": [
"http://thecolbertreport.cc.com/videos/9s5cs9/intro---12-4-06",
"http://thecolbertreport.cc.com/videos/ozd0a8/sherman-wedding",
"http://thecolbertreport.cc.com/videos/sjup2k/the-word---american-orthodox",
"http://thecolbertreport.cc.com/videos/shtpb9/tip-wag---christmas",
"http://thecolbertreport.cc.com/videos/tc5d1m/will-wright",
"http://thecolbertreport.cc.com/videos/xpx8ua/sign-off---extra-special-comment---tie-stain"
],
"guest": "Will Wright"
},
{
"date": "2006-12-05",
"videos": [
"http://thecolbertreport.cc.com/videos/z40k91/intro---12-5-06",
"http://thecolbertreport.cc.com/videos/6ixmt6/-return--to-the-moon",
"http://thecolbertreport.cc.com/videos/mz0h4p/robert-gates--confirmation",
"http://thecolbertreport.cc.com/videos/msrwcg/the-word---honest-injun",
"http://thecolbertreport.cc.com/videos/3odbkp/sport-report---coach-mancini",
"http://thecolbertreport.cc.com/videos/tjdbeu/sign-off---number-one-source",
"http://thecolbertreport.cc.com/videos/c1sa92/steven-levitt"
],
"guest": "Steven D. Leavitt"
},
{
"date": "2006-12-06",
"videos": [
"http://thecolbertreport.cc.com/videos/fe08hq/intro---12-6-06",
"http://thecolbertreport.cc.com/videos/oamjbp/life-size-nativity",
"http://thecolbertreport.cc.com/videos/ikcmp0/mary-cheney",
"http://thecolbertreport.cc.com/videos/4fr9o9/the-word---words",
"http://thecolbertreport.cc.com/videos/76wnkt/tek-jansen---tek-the-halls",
"http://thecolbertreport.cc.com/videos/0wqkww/john-sexton",
"http://thecolbertreport.cc.com/videos/8suoui/sign-off---cardboard-box"
],
"guest": "John Sexton"
},
{
"date": "2006-12-07",
"videos": [
"http://thecolbertreport.cc.com/videos/k9wcbv/intro---12-7-06",
"http://thecolbertreport.cc.com/videos/ebabt9/david-gregory",
"http://thecolbertreport.cc.com/videos/kvccyn/the-word---case-closed",
"http://thecolbertreport.cc.com/videos/tk750r/elizabeth-de-la-vega",
"http://thecolbertreport.cc.com/videos/dntxcy/green-screen-challenge---counter-challenge",
"http://thecolbertreport.cc.com/videos/4koanp/alpha-dog-of-the-week---john-bolton",
"http://thecolbertreport.cc.com/videos/dqyz7h/francis-collins",
"http://thecolbertreport.cc.com/videos/rqe98q/sign-off---tgit"
],
"guest": "Dr. Francis S. Collins"
},
{
"date": "2006-12-11",
"videos": [
"http://thecolbertreport.cc.com/videos/ri4vbo/intro---12-11-06",
"http://thecolbertreport.cc.com/videos/t0abnh/defending-rosie",
"http://thecolbertreport.cc.com/videos/uea9ov/jack-kingston",
"http://thecolbertreport.cc.com/videos/k0a3hu/the-white-christmas-album",
"http://thecolbertreport.cc.com/videos/2cea2e/threatdown---christmas-style",
"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://thecolbertreport.cc.com/videos/35u0ts/intro---12-12-06",
"http://thecolbertreport.cc.com/videos/kn0mlp/augusto-pinochet-s-coup",
"http://thecolbertreport.cc.com/videos/dctycd/shout-out----beef-hammer-flag",
"http://thecolbertreport.cc.com/videos/1o4xvk/the-word---casualty-of-war",
"http://thecolbertreport.cc.com/videos/e1504w/who-s-honoring-me-now----merriam-webster-s-word-of-the-year",
"http://thecolbertreport.cc.com/videos/xd9itr/better-know-a-district---new-members-of-congress-at-the-kennedy-school",
"http://thecolbertreport.cc.com/videos/j01zz1/dan-savage",
"http://thecolbertreport.cc.com/videos/s3gs7u/sign-off---post-show-taco-bell-chalupa-chow-down"
],
"guest": "Dan Savage"
},
{
"date": "2006-12-13",
"videos": [
"http://thecolbertreport.cc.com/videos/6ohkja/intro---12-13-06",
"http://thecolbertreport.cc.com/videos/yl018s/stephen-jr--s-christmas-miracle",
"http://thecolbertreport.cc.com/videos/suc40d/the-word---it-s-a-small-world",
"http://thecolbertreport.cc.com/videos/5uk9gs/replenishing-the-eggnog-supply",
"http://thecolbertreport.cc.com/videos/d0ml1u/sea-tac-s-christmas-trees-restored",
"http://thecolbertreport.cc.com/videos/x1f8dg/doris-kearns-goodwin",
"http://thecolbertreport.cc.com/videos/0kcywr/charge-me-twice-for-stephen"
],
"guest": "Doris Kearns Goodwin"
},
{
"date": "2006-12-14",
"videos": [
"http://thecolbertreport.cc.com/videos/lwojc9/intro---12-14-06",
"http://thecolbertreport.cc.com/videos/3moulc/finger-strengthening",
"http://thecolbertreport.cc.com/videos/5dvej7/the-american-people-are-to-blame",
"http://thecolbertreport.cc.com/videos/60ds73/the-word---clarity",
"http://thecolbertreport.cc.com/videos/klp05i/blood-in-the-water---bruce-tinsley-s-dui",
"http://thecolbertreport.cc.com/videos/wauy3f/caesar-honeybee-or-tyrone-hunnibi-",
"http://thecolbertreport.cc.com/videos/yaoen5/daniel-pinchbeck",
"http://thecolbertreport.cc.com/videos/ua9gte/letter-to-representative-jack-kingston"
],
"guest": "Daniel Pinchbeck"
},
{
"date": "2006-12-18",
"videos": [
"http://thecolbertreport.cc.com/videos/t66x66/intro---12-18-06",
"http://thecolbertreport.cc.com/videos/j56gn9/diy-cold-medicine",
"http://thecolbertreport.cc.com/videos/ndrsqu/profiles-in-balls",
"http://thecolbertreport.cc.com/videos/mv0dai/the-word---the-draft",
"http://thecolbertreport.cc.com/videos/c4vji3/tip-wag---art-edition",
"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://thecolbertreport.cc.com/videos/an4q7j/intro---12-19-06",
"http://thecolbertreport.cc.com/videos/q9o6sw/person-of-the-year",
"http://thecolbertreport.cc.com/videos/qh5kz9/stephen-goes-to-harvard",
"http://thecolbertreport.cc.com/videos/v81egv/deepak-chopra",
"http://thecolbertreport.cc.com/videos/3fhkpv/face-off-preview",
"http://thecolbertreport.cc.com/videos/kza2d8/the-word---tit-for-tat"
],
"guest": "Deepak Chopra"
},
{
"date": "2006-12-20",
"videos": [
"http://thecolbertreport.cc.com/videos/ouau0r/intro---12-20-06",
"http://thecolbertreport.cc.com/videos/8t5vas/rock-and-awe--countdown-to-guitarmageddon",
"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/shreddown---the-judgment"
],
"guest": "Howard Zinn"
}
],
"2007": [
{
"date": "2007-01-08",
"videos": [
"http://thecolbertreport.cc.com/videos/35rb23/intro---1-8-07",
"http://thecolbertreport.cc.com/videos/liauyt/the-gallotastic-executacular---hangin--with-mr--hussein",
"http://thecolbertreport.cc.com/videos/2eciiy/the-word---facts",
"http://thecolbertreport.cc.com/videos/vfxu06/who-s-attacking-me-now----lake-superior-state-university",
"http://thecolbertreport.cc.com/videos/ya0sji/who-s-honoring-me-now----gay-com",
"http://thecolbertreport.cc.com/videos/uuhxlg/stephen-s-sound-advice---surviving-the-winter-blues",
"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://thecolbertreport.cc.com/videos/rsuyoo/intro---1-9-07",
"http://thecolbertreport.cc.com/videos/a9e13e/the-word---texas-hold--em",
"http://thecolbertreport.cc.com/videos/bmmv86/ohio-state-loses",
"http://thecolbertreport.cc.com/videos/1yhdmp/we-the-mediator---celebrity-feuds",
"http://thecolbertreport.cc.com/videos/ezqjm4/jim-cramer",
"http://thecolbertreport.cc.com/videos/q6rkb3/sign-off---farewell--james-brown"
],
"guest": "Jim Cramer"
},
{
"date": "2007-01-10",
"videos": [
"http://thecolbertreport.cc.com/videos/b3d5l1/intro---1-10-07",
"http://thecolbertreport.cc.com/videos/j5htgu/president-s-speech",
"http://thecolbertreport.cc.com/videos/crgbvq/invasion-of-the-country-snatchers",
"http://thecolbertreport.cc.com/videos/ie5gtu/the-word---worry",
"http://thecolbertreport.cc.com/videos/048s3c/tek-jansen---hounds-of-hell--ragtime-billy-peaches",
"http://thecolbertreport.cc.com/videos/ku9y06/david-kamp",
"http://thecolbertreport.cc.com/videos/9nuye7/sign-off---thawing-meat"
],
"guest": "David Kamp"
},
{
"date": "2007-01-11",
"videos": [
"http://thecolbertreport.cc.com/videos/21xsg9/intro---1-11-07",
"http://thecolbertreport.cc.com/videos/nhwjcd/what-number-is-stephen-thinking-of----doubled-up",
"http://thecolbertreport.cc.com/videos/7v6i3c/ken-roth",
"http://thecolbertreport.cc.com/videos/jxfsrm/tip-wag---science-and-technology",
"http://thecolbertreport.cc.com/videos/fxnp1o/judy-woodruff"
],
"guest": "Judy Woodruff"
},
{
"date": "2007-01-15",
"videos": [
"http://thecolbertreport.cc.com/videos/tpjoll/intro---1-15-07",
"http://thecolbertreport.cc.com/videos/bemyqb/inspired-by-dr--king",
"http://thecolbertreport.cc.com/videos/ni7g5j/a-man-s-touch",
"http://thecolbertreport.cc.com/videos/xb55y0/the-word---victory-",
"http://thecolbertreport.cc.com/videos/eamlaf/bears---balls---gas",
"http://thecolbertreport.cc.com/videos/o7xhwp/alex-kuczynski"
],
"guest": "Alex Kuczynski"
},
{
"date": "2007-01-16",
"videos": [
"http://thecolbertreport.cc.com/videos/795pdp/intro---1-16-07",
"http://thecolbertreport.cc.com/videos/ycpx4s/squeaky-chair",
"http://thecolbertreport.cc.com/videos/r7kinv/pesos-for-pizza",
"http://thecolbertreport.cc.com/videos/hwlhus/the-word---symbolic",
"http://thecolbertreport.cc.com/videos/6q6sy0/sport-report---bend-it-like-beckham",
"http://thecolbertreport.cc.com/videos/2tdkm8/dinesh-d-souza"
],
"guest": "Dinesh D'Souza"
},
{
"date": "2007-01-17",
"videos": [
"http://thecolbertreport.cc.com/videos/ufcy26/intro---1-17-07",
"http://thecolbertreport.cc.com/videos/8amkmh/200th-episode",
"http://thecolbertreport.cc.com/videos/wjuko4/lynn-swann",
"http://thecolbertreport.cc.com/videos/xv8tlv/better-know-a-district---washington-s-3rd---brian-baird",
"http://thecolbertreport.cc.com/videos/1qdsbp/richard-clarke"
],
"guest": "Richard Clarke"
},
{
"date": "2007-01-18",
"videos": [
"http://thecolbertreport.cc.com/videos/z0tcp1/intro---1-18-07",
"http://thecolbertreport.cc.com/videos/kyc2cd/the-advent-of-o-reilly",
"http://thecolbertreport.cc.com/videos/qtrfgo/the-word---go-it-alone",
"http://thecolbertreport.cc.com/videos/dre6df/we-the-mediator---trump-v--o-donnell",
"http://thecolbertreport.cc.com/videos/9seimt/bill-o-reilly",
"http://thecolbertreport.cc.com/videos/cuouel/o-reilly-s-microwave"
],
"guest": "Bill O'Reilly"
},
{
"date": "2007-01-22",
"videos": [
"http://thecolbertreport.cc.com/videos/9vl9tx/intro---1-22-07",
"http://thecolbertreport.cc.com/videos/1t56vq/the-bears",
"http://thecolbertreport.cc.com/videos/itbxtv/who-s-riding-my-coattails-now----terence-koh",
"http://thecolbertreport.cc.com/videos/mfzk22/the-word---exact-words",
"http://thecolbertreport.cc.com/videos/opisk9/balls-for-kidz---gambling",
"http://thecolbertreport.cc.com/videos/rnd3lf/tom-schaller",
"http://thecolbertreport.cc.com/videos/6mgw6m/sign-off---zeppelin-reunion"
],
"guest": "Tom Schaller"
},
{
"date": "2007-01-23",
"videos": [
"http://thecolbertreport.cc.com/videos/xjsnlx/intro---1-23-07",
"http://thecolbertreport.cc.com/videos/ebff8o/pre-tape",
"http://thecolbertreport.cc.com/videos/vm00zm/lieber-vs--lieber",
"http://thecolbertreport.cc.com/videos/jv328p/threatdown---the-weather-channel",
"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://thecolbertreport.cc.com/videos/goh39c/intro---1-24-07",
"http://thecolbertreport.cc.com/videos/gzqy8i/state-of-the-union---cheney-wins",
"http://thecolbertreport.cc.com/videos/e17mq9/the-word---great-news",
"http://thecolbertreport.cc.com/videos/3525mn/better-know-a-district---pennsylvania-s-4th---jason-altmire",
"http://thecolbertreport.cc.com/videos/r5j10b/lou-dobbs"
],
"guest": "Lou Dobbs"
},
{
"date": "2007-01-25",
"videos": [
"http://thecolbertreport.cc.com/videos/n139mj/intro---1-25-07",
"http://thecolbertreport.cc.com/videos/7z0x1m/right-away-",
"http://thecolbertreport.cc.com/videos/5rmbin/the-word---smafu",
"http://thecolbertreport.cc.com/videos/hkzk11/sport-report---more-with-coach-mancini",
"http://thecolbertreport.cc.com/videos/tufln6/mike-wallace"
],
"guest": "Mike Wallace"
},
{
"date": "2007-01-29",
"videos": [
"http://thecolbertreport.cc.com/videos/o0maxx/intro---1-29-07",
"http://thecolbertreport.cc.com/videos/1m6mdm/new-york-grieves",
"http://thecolbertreport.cc.com/videos/z0b9vz/stephen-colbert-day",
"http://thecolbertreport.cc.com/videos/6p6df7/the-word---wikilobbying",
"http://thecolbertreport.cc.com/videos/11js13/tip-wag---tom-cruise",
"http://thecolbertreport.cc.com/videos/zqi973/barry-lando"
],
"guest": "Barry M. Lando"
},
{
"date": "2007-01-30",
"videos": [
"http://thecolbertreport.cc.com/videos/np3o3k/intro---1-30-07",
"http://thecolbertreport.cc.com/videos/j1sd5a/new-military-weapon",
"http://thecolbertreport.cc.com/videos/cv6q8o/david-leonhardt",
"http://thecolbertreport.cc.com/videos/ttzs6x/caviar-omelets-for-the-troops",
"http://thecolbertreport.cc.com/videos/bsbad5/judge--jury---executioner---adultery",
"http://thecolbertreport.cc.com/videos/eyhp38/donna-shalala",
"http://thecolbertreport.cc.com/videos/dwv24s/sign-off---microwave-gift-to-o-reilly"
],
"guest": "Donna Shalala"
},
{
"date": "2007-01-31",
"videos": [
"http://thecolbertreport.cc.com/videos/84e6zh/exclusive---better-know-a-district---new-york-s-6th---gregory-meeks",
"http://thecolbertreport.cc.com/videos/4mp2yh/intro---1-31-07",
"http://thecolbertreport.cc.com/videos/v1la3q/global-warming",
"http://thecolbertreport.cc.com/videos/3emlxq/on-notice---jane-fonda-fantasies",
"http://thecolbertreport.cc.com/videos/qg7l5c/the-word---black-sheep",
"http://thecolbertreport.cc.com/videos/4lodkc/better-know-a-district---new-york-s-6th---gregory-meeks",
"http://thecolbertreport.cc.com/videos/npjb41/jed-babbin"
],
"guest": "Jed Babbin"
},
{
"date": "2007-02-01",
"videos": [
"http://thecolbertreport.cc.com/videos/89lmed/intro---2-1-07",
"http://thecolbertreport.cc.com/videos/mzq0ue/cartoon-terrorism",
"http://thecolbertreport.cc.com/videos/492fjx/ending-racism",
"http://thecolbertreport.cc.com/videos/rbb68f/the-word---we-shall-overcome",
"http://thecolbertreport.cc.com/videos/2m3ntu/movies-that-are-destroying-america---oscars-edition",
"http://thecolbertreport.cc.com/videos/s2k3ll/chuck-schumer",
"http://thecolbertreport.cc.com/videos/b1j62r/the-most-poetic-f--king-thing-i-ve-ever-heard"
],
"guest": "Sen. Chuck Schumer"
},
{
"date": "2007-02-05",
"videos": [
"http://thecolbertreport.cc.com/videos/qonzal/intro---2-5-07",
"http://thecolbertreport.cc.com/videos/raqy45/peyton-manseed",
"http://thecolbertreport.cc.com/videos/1ppbxw/save-stephen-jr-",
"http://thecolbertreport.cc.com/videos/pkx5sp/the-word---second-opinion",
"http://thecolbertreport.cc.com/videos/cu6q1h/threatdown---giant-mexican-babies",
"http://thecolbertreport.cc.com/videos/qj7ov5/wendy-kopp"
],
"guest": "Wendy Kopp"
},
{
"date": "2007-02-06",
"videos": [
"http://thecolbertreport.cc.com/videos/irg0ck/exclusive---better-know-a-district---ohio-s-18th---zack-space-pt--1",
"http://thecolbertreport.cc.com/videos/7vpqnl/exclusive---better-know-a-district---ohio-s-18th---zack-space-pt--2",
"http://thecolbertreport.cc.com/videos/w05aan/intro---2-6-07",
"http://thecolbertreport.cc.com/videos/rirgzz/pray-for-stephen",
"http://thecolbertreport.cc.com/videos/ronvu0/the-word---making-a-killing",
"http://thecolbertreport.cc.com/videos/sh2kz6/better-know-a-district---ohio-s-18th---zack-space",
"http://thecolbertreport.cc.com/videos/vnbq6e/charles-leduff"
],
"guest": "Charlie LeDuff"
},
{
"date": "2007-02-07",
"videos": [
"http://thecolbertreport.cc.com/videos/lh3p6z/intro---2-7-07",
"http://thecolbertreport.cc.com/videos/skowle/the-san-francisco-treat",
"http://thecolbertreport.cc.com/videos/hx3kkt/california-values-watch",
"http://thecolbertreport.cc.com/videos/fykjnf/the-word---silence",
"http://thecolbertreport.cc.com/videos/pp2kiz/tek-jansen---from-the-future",
"http://thecolbertreport.cc.com/videos/n36pgb/steven-pinker"
],
"guest": "Steven Pinker"
},
{
"date": "2007-02-08",
"videos": [
"http://thecolbertreport.cc.com/videos/5l6ygo/intro---2-8-07",
"http://thecolbertreport.cc.com/videos/btxrus/space-madness",
"http://thecolbertreport.cc.com/videos/q5bcg9/stephen-for-president---a-sign",
"http://thecolbertreport.cc.com/videos/12d71h/debra-dickerson",
"http://thecolbertreport.cc.com/videos/ls3y3l/was-it-really-that-bad----salem-witch-trials",
"http://thecolbertreport.cc.com/videos/m5tx4f/chris-hedges"
],
"guest": "Chris Hedges"
},
{
"date": "2007-02-12",
"videos": [
"http://thecolbertreport.cc.com/videos/sudz5h/intro---2-12-07",
"http://thecolbertreport.cc.com/videos/cvs0b4/the-word---inappropriate",
"http://thecolbertreport.cc.com/videos/wetex5/tip-wag---john-howard",
"http://thecolbertreport.cc.com/videos/ovmu6y/michael-oppenheimer",
"http://thecolbertreport.cc.com/videos/gbc95s/alpha-dog-of-the-week---amitabh-bachchan"
],
"guest": "Michael Oppenheimer"
},
{
"date": "2007-02-13",
"videos": [
"http://thecolbertreport.cc.com/videos/7zlyvc/the-word---apocalypse-mao--murdered-by-the-orient-s-success---frenemy",
"http://thecolbertreport.cc.com/videos/dh1nxa/apocalypse-mao--murdered-by-the-orient-s-success---take-the-pulse",
"http://thecolbertreport.cc.com/videos/cbgmhg/sheryl-wudunn",
"http://thecolbertreport.cc.com/videos/rewkbj/apocalypse-mao--murdered-by-the-orient-s-success---eight-child-policy"
],
"guest": "Sheryl WuDunn"
},
{
"date": "2007-02-14",
"videos": [
"http://thecolbertreport.cc.com/videos/0unos7/catching-up-with-china",
"http://thecolbertreport.cc.com/videos/sv6om5/safe-sex-for-senior-citizens",
"http://thecolbertreport.cc.com/videos/qngp8d/the-word---bad-medicine",
"http://thecolbertreport.cc.com/videos/e7leqz/stephen-protects-valentine-s-day",
"http://thecolbertreport.cc.com/videos/npsgvg/sport-report---westminster-kennel-club-dog-show",
"http://thecolbertreport.cc.com/videos/tv0pg5/lance-armstrong",
"http://thecolbertreport.cc.com/videos/4zrnjn/intro---2-14-07"
],
"guest": "Lance Armstrong"
},
{
"date": "2007-02-15",
"videos": [
"http://thecolbertreport.cc.com/videos/bemh6r/intro---2-15-07",
"http://thecolbertreport.cc.com/videos/5h0hc1/the-365-most-influential-cultural-figures-of-2007---j-j--abrams",
"http://thecolbertreport.cc.com/videos/dv94hn/helen-thomas-s-chair",
"http://thecolbertreport.cc.com/videos/xsukru/the-365-most-influential-cultural-figures-of-2007---candice-bergen",
"http://thecolbertreport.cc.com/videos/gxjtk4/better-know-a-district---arkansas--2nd---vic-snyder",
"http://thecolbertreport.cc.com/videos/htsqly/shashi-tharoor"
],
"guest": "Shashi Tharoor"
},
{
"date": "2007-02-26",
"videos": [
"http://thecolbertreport.cc.com/videos/7kzllg/intro---2-26-07",
"http://thecolbertreport.cc.com/videos/6q3fey/the-word---success",
"http://thecolbertreport.cc.com/videos/liy97p/stephen-s-sound-advice---avoiding-humiliation-on-the-campaign-trail",
"http://thecolbertreport.cc.com/videos/rj64v2/zev-chafets",
"http://thecolbertreport.cc.com/videos/lto66u/sign-off---the-stupidest-person-in-the-world"
],
"guest": "Zev Chafets"
},
{
"date": "2007-02-27",
"videos": [
"http://thecolbertreport.cc.com/videos/m6llmb/intro---2-27-07",
"http://thecolbertreport.cc.com/videos/4q8yqr/gore-s-garbage",
"http://thecolbertreport.cc.com/videos/08vl33/the-word---recoil",
"http://thecolbertreport.cc.com/videos/kyuvud/dead-to-me---raptors",
"http://thecolbertreport.cc.com/videos/a5eovz/tip-wag---bilk",
"http://thecolbertreport.cc.com/videos/xtu2o9/craig-venter"
],
"guest": "Dr. Craig Venter"
},
{
"date": "2007-02-28",
"videos": [
"http://thecolbertreport.cc.com/videos/k64d0x/intro---2-28-07",
"http://thecolbertreport.cc.com/videos/94efgl/david-geffen-the-intern-",
"http://thecolbertreport.cc.com/videos/ax1yhn/obama-vs--colbert",
"http://thecolbertreport.cc.com/videos/2j1fug/profiles-in-quitters---tom-vilsack",
"http://thecolbertreport.cc.com/videos/2w1ttr/problems-without-solutions--stay-at-home-dads",
"http://thecolbertreport.cc.com/videos/rjcwpq/nina-jablonski"
],
"guest": "Nina Jablonski"
},
{
"date": "2007-03-01",
"videos": [
"http://thecolbertreport.cc.com/videos/uvhlbh/intro---3-1-07",
"http://thecolbertreport.cc.com/videos/dnoicn/jesus--1-",
"http://thecolbertreport.cc.com/videos/09pfnw/the-word---bury-the-lead",
"http://thecolbertreport.cc.com/videos/xp8ghf/better-know-a-district---tennessee-s-9th---steve-cohen",
"http://thecolbertreport.cc.com/videos/hdb72u/larry-king",
"http://thecolbertreport.cc.com/videos/din9ey/sign-off---all-the-time"
],
"guest": "Larry King"
},
{
"date": "2007-03-05",
"videos": [
"http://thecolbertreport.cc.com/videos/s5zpws/intro---3-5-07",
"http://thecolbertreport.cc.com/videos/f0veng/stop-the-war-in-congress",
"http://thecolbertreport.cc.com/videos/9rmkm6/ben-and-jerry---introducing-americone-dream",
"http://thecolbertreport.cc.com/videos/erco0p/bears---balls---bees",
"http://thecolbertreport.cc.com/videos/w9i285/mara-vanderslice",
"http://thecolbertreport.cc.com/videos/u5x46t/sign-off---you-get-a-pint-"
],
"guest": "Mara Vanderslice, Ben and Jerry"
},
{
"date": "2007-03-06",
"videos": [
"http://thecolbertreport.cc.com/videos/jokvk3/intro---3-6-07",
"http://thecolbertreport.cc.com/videos/987dug/stephen-wins-the-lottery",
"http://thecolbertreport.cc.com/videos/5xpqn0/libby-verdict",
"http://thecolbertreport.cc.com/videos/yjwisn/the-word---wwjd",
"http://thecolbertreport.cc.com/videos/ryt5zt/threatdown---cheney-s-clot",
"http://thecolbertreport.cc.com/videos/d9k0w9/mark-frauenfelder"
],
"guest": "Mark Frauenfelder"
},
{
"date": "2007-03-07",
"videos": [
"http://thecolbertreport.cc.com/videos/t3l2qk/intro---3-7-07",
"http://thecolbertreport.cc.com/videos/o5rj01/mega-millions",
"http://thecolbertreport.cc.com/videos/f4wilr/the-word---don-t",
"http://thecolbertreport.cc.com/videos/mw47n3/easter-under-attack---bunny",
"http://thecolbertreport.cc.com/videos/k8n6ln/michael-spector",
"http://thecolbertreport.cc.com/videos/eu60l7/sign-off---colbert-savings-time"
],
"guest": "Michael Specter"
},
{
"date": "2007-03-08",
"videos": [
"http://thecolbertreport.cc.com/videos/hdanpb/exclusive---better-know-a-district---kentucky-s-3rd---john-yarmuth-pt--1",
"http://thecolbertreport.cc.com/videos/1fsr4r/exclusive---better-know-a-district---kentucky-s-3rd---john-yarmuth-pt--2",
"http://thecolbertreport.cc.com/videos/v9pxbp/intro---3-8-07",
"http://thecolbertreport.cc.com/videos/fkezkh/jesus-libby",
"http://thecolbertreport.cc.com/videos/kf01z4/the-word---comic-justice",
"http://thecolbertreport.cc.com/videos/gfi7dr/better-know-a-district---kentucky-s-3rd---john-yarmuth",
"http://thecolbertreport.cc.com/videos/na2cwe/ted-koppel"
],
"guest": "Ted Koppel"
},
{
"date": "2007-03-12",
"videos": [
"http://thecolbertreport.cc.com/videos/eoubiy/intro---3-12-07",
"http://thecolbertreport.cc.com/videos/cxle7m/newt-gingrich-s-extramarital-affair",
"http://thecolbertreport.cc.com/videos/qs3d07/the-word---home-field-advantage",
"http://thecolbertreport.cc.com/videos/rp8fy7/tip-wag---u-s--mint",
"http://thecolbertreport.cc.com/videos/0z68wk/nicholas-kristof",
"http://thecolbertreport.cc.com/videos/paedah/sign-off---captain-america-shield"
],
"guest": "Nicholas D. Kristof"
},
{
"date": "2007-03-13",
"videos": [
"http://thecolbertreport.cc.com/videos/3gv9du/intro---3-13-07",
"http://thecolbertreport.cc.com/videos/n1695w/time-travel",
"http://thecolbertreport.cc.com/videos/o93g04/willie-nelson-s-cobbler",
"http://thecolbertreport.cc.com/videos/aln9gt/donald-shields",
"http://thecolbertreport.cc.com/videos/nebseq/four-horsemen-of-the-a-pop-calypse---300",
"http://thecolbertreport.cc.com/videos/pajwaw/michael-eric-dyson",
"http://thecolbertreport.cc.com/videos/goeagu/the-word---goodnight"
],
"guest": "Michael Eric Dyson"
},
{
"date": "2007-03-14",
"videos": [
"http://thecolbertreport.cc.com/videos/gjg322/intro---3-14-07",
"http://thecolbertreport.cc.com/videos/mi3odp/when-ancestors-attack---barack-obama",
"http://thecolbertreport.cc.com/videos/jdieqt/the-word---high-fidelity",
"http://thecolbertreport.cc.com/videos/6t5ydk/rocky-mountain-high",
"http://thecolbertreport.cc.com/videos/xy5mon/sport-report---ncaa",
"http://thecolbertreport.cc.com/videos/3w6h8k/ed-viesturs",
"http://thecolbertreport.cc.com/videos/x40idi/sign-off---united-we-lick"
],
"guest": "Ed Viesturs"
},
{
"date": "2007-03-15",
"videos": [
"http://thecolbertreport.cc.com/videos/3yjwcu/exclusive---better-know-a-district---illinois--17th---phil-hare-pt--1",
"http://thecolbertreport.cc.com/videos/l2j89r/exclusive---better-know-a-district---illinois--17th---phil-hare-pt--2",
"http://thecolbertreport.cc.com/videos/gjg322/intro---3-14-07",
"http://thecolbertreport.cc.com/videos/mi3odp/when-ancestors-attack---barack-obama",
"http://thecolbertreport.cc.com/videos/jdieqt/the-word---high-fidelity",
"http://thecolbertreport.cc.com/videos/6t5ydk/rocky-mountain-high",
"http://thecolbertreport.cc.com/videos/xy5mon/sport-report---ncaa",
"http://thecolbertreport.cc.com/videos/3w6h8k/ed-viesturs",
"http://thecolbertreport.cc.com/videos/x40idi/sign-off---united-we-lick"
],
"guest": "Ayaan Hirsi Ali"
},
{
"date": "2007-03-15",
"videos": [
"http://thecolbertreport.cc.com/videos/in8gsh/intro---3-15-07",
"http://thecolbertreport.cc.com/videos/ojcmho/st--patrick-s-day",
"http://thecolbertreport.cc.com/videos/9wsh6f/better-know-a-district---illinois--17th---phil-hare",
"http://thecolbertreport.cc.com/videos/pvxlng/ayaan-hirsi-ali",
"http://thecolbertreport.cc.com/videos/nfjx5l/sign-off---candy"
],
"guest": "Ayaan Hirsi Ali"
},
{
"date": "2007-03-19",
"videos": [
"http://thecolbertreport.cc.com/videos/akdm39/intro---3-19-07",
"http://thecolbertreport.cc.com/videos/zfhuml/emanuel-attacks-stephen",
"http://thecolbertreport.cc.com/videos/ichd6m/the-word---pound-of-flesh",
"http://thecolbertreport.cc.com/videos/ovsoy3/willie-nelson-tomorrow",
"http://thecolbertreport.cc.com/videos/i34oa7/threatdown---seniors",
"http://thecolbertreport.cc.com/videos/nby1fe/jerome-groopman",
"http://thecolbertreport.cc.com/videos/woj3kf/alpha-dog-of-the-week---pennies"
],
"guest": "Jerome Groopman"
},
{
"date": "2007-03-20",
"videos": [
"http://thecolbertreport.cc.com/videos/nepea4/intro---3-20-07",
"http://thecolbertreport.cc.com/videos/p3nkju/willie-recall",
"http://thecolbertreport.cc.com/videos/8w2rhi/the-word---supernatural",
"http://thecolbertreport.cc.com/videos/4fyygp/threatdown---polar-bear-cub",
"http://thecolbertreport.cc.com/videos/rn79kl/stephen-colbert-day---honor",
"http://thecolbertreport.cc.com/videos/fxdmt0/willie-nelson"
],
"guest": "Willie Nelson"
},
{
"date": "2007-03-21",
"videos": [
"http://thecolbertreport.cc.com/videos/b4r6li/intro---3-21-07",
"http://thecolbertreport.cc.com/videos/r7dj9j/stephen-s-stoned-friend",
"http://thecolbertreport.cc.com/videos/wyig4v/impeach-bush",
"http://thecolbertreport.cc.com/videos/js464k/the-word---sex",
"http://thecolbertreport.cc.com/videos/6b13mn/better-know-a-district---new-york-s-22nd---maurice-hinchey",
"http://thecolbertreport.cc.com/videos/4jygnv/benjamin-barber",
"http://thecolbertreport.cc.com/videos/psro3f/sign-off---goodnights"
],
"guest": "Benjamin Barber"
},
{
"date": "2007-03-22",
"videos": [
"http://thecolbertreport.cc.com/videos/rf90w7/intro---3-22-07",
"http://thecolbertreport.cc.com/videos/yic3o0/infomosexual-graphics",
"http://thecolbertreport.cc.com/videos/ez9npn/eleanor-holmes-norton",
"http://thecolbertreport.cc.com/videos/xgjo8q/face-reading-expert",
"http://thecolbertreport.cc.com/videos/pd3hdf/sport-report---ncaa-final-four",
"http://thecolbertreport.cc.com/videos/i2wwym/katie-couric",
"http://thecolbertreport.cc.com/videos/k6m8na/sign-off---future"
],
"guest": "Katie Couric"
},
{
"date": "2007-03-26",
"videos": [
"http://thecolbertreport.cc.com/videos/k1iiew/intro---3-26-07",
"http://thecolbertreport.cc.com/videos/t9n8i2/mummy",
"http://thecolbertreport.cc.com/videos/t7x0xg/torture-gonzales",
"http://thecolbertreport.cc.com/videos/hc58hq/for-your-editing-pleasure",
"http://thecolbertreport.cc.com/videos/r6ez6r/stephen-colbert-day",
"http://thecolbertreport.cc.com/videos/a19udk/john-perry-barlow",
"http://thecolbertreport.cc.com/videos/dc5qfy/sign-off---photo-op"
],
"guest": "John Perry Barlow"
},
{
"date": "2007-03-27",
"videos": [
"http://thecolbertreport.cc.com/videos/9hzwxa/intro---3-2707",
"http://thecolbertreport.cc.com/videos/ct77qc/sean-penn-unleashes-on-president-bush",
"http://thecolbertreport.cc.com/videos/y05sqg/madeleine-albright",
"http://thecolbertreport.cc.com/videos/ac6sto/tip-wag---drug-dealers",
"http://thecolbertreport.cc.com/videos/z3a4ow/james-fallows"
],
"guest": "Madeleine Albright, James Fallows"
},
{
"date": "2007-03-28",
"videos": [
"http://thecolbertreport.cc.com/videos/c3lbed/intro---3-28-07",
"http://thecolbertreport.cc.com/videos/8b58j1/dancing-with-the-stars",
"http://thecolbertreport.cc.com/videos/eoe8d4/claim-to-the-arctic",
"http://thecolbertreport.cc.com/videos/e6rbbg/the-word---monkey-business",
"http://thecolbertreport.cc.com/videos/7t7l7y/the-axis-of-evil-of-the-week",
"http://thecolbertreport.cc.com/videos/oval1w/jabari-asim",
"http://thecolbertreport.cc.com/videos/tffkup/sign-off---going-to-bed-angry"
],
"guest": "Jabari Asim"
},
{
"date": "2007-03-29",
"videos": [
"http://thecolbertreport.cc.com/videos/82ki4g/intro---3-29-07",
"http://thecolbertreport.cc.com/videos/yp03mv/equal-rights",
"http://thecolbertreport.cc.com/videos/bwtu8b/strolling-in-baghdad",
"http://thecolbertreport.cc.com/videos/m1iokb/the-word---lemon-raid",
"http://thecolbertreport.cc.com/videos/rmylpg/alpha-dog-of-the-week---toby",
"http://thecolbertreport.cc.com/videos/dune0v/nightgown-novel-model",
"http://thecolbertreport.cc.com/videos/gp6vcm/clive-james",
"http://thecolbertreport.cc.com/videos/cnmwu7/sign-off---it-s-been-real"
],
"guest": "Clive James"
},
{
"date": "2007-04-09",
"videos": [
"http://thecolbertreport.cc.com/videos/2secqi/intro---4-9-07",
"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/katrina-vanden-heuvel",
"http://thecolbertreport.cc.com/videos/vx3kr4/sign-off---goodnight--ladies"
],
"guest": "Colin Beavan, Katrina vanden Heuvel"
},
{
"date": "2007-04-10",
"videos": [
"http://thecolbertreport.cc.com/videos/gqey9e/intro---4-10-07",
"http://thecolbertreport.cc.com/videos/t52s2y/stiff-upper-lip",
"http://thecolbertreport.cc.com/videos/7xhdfc/the-word---hip-replacement",
"http://thecolbertreport.cc.com/videos/a6j19l/stephen-s-racial-slurs",
"http://thecolbertreport.cc.com/videos/mmtey6/bears---balls---home",
"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://thecolbertreport.cc.com/videos/ikived/intro---4-11-07",
"http://thecolbertreport.cc.com/videos/rndpay/the-great-turtle-race",
"http://thecolbertreport.cc.com/videos/o57n2d/the-word---season-pass",
"http://thecolbertreport.cc.com/videos/y3z7pz/anna-nicole-s-baby-daddy",
"http://thecolbertreport.cc.com/videos/qk7xuu/sport-report---spirit-loses",
"http://thecolbertreport.cc.com/videos/6ombuy/vali-nasr",
"http://thecolbertreport.cc.com/videos/py0zro/sign-off---not-literally"
],
"guest": "Vali Nasr"
},
{
"date": "2007-04-12",
"videos": [
"http://thecolbertreport.cc.com/videos/tvo9j1/intro---4-12-07",
"http://thecolbertreport.cc.com/videos/44wpo2/the-pope-and-iraq",
"http://thecolbertreport.cc.com/videos/i2w6da/the-word---body-armor",
"http://thecolbertreport.cc.com/videos/rp5qr3/a-girl-for-stephen-jr-",
"http://thecolbertreport.cc.com/videos/szc2kp/dr--richard-land",
"http://thecolbertreport.cc.com/videos/z4a9cf/sign-off---french-canadian-viewers"
],
"guest": "Dr. Richard Land"
},
{
"date": "2007-04-16",
"videos": [
"http://thecolbertreport.cc.com/videos/opgo7c/intro---4-16-07",
"http://thecolbertreport.cc.com/videos/ow68vg/mope-retraction",
"http://thecolbertreport.cc.com/videos/ndyxmi/the-metaphor-off-is-on",
"http://thecolbertreport.cc.com/videos/fiwckw/the-word---clean-slate",
"http://thecolbertreport.cc.com/videos/vsf7vy/paulina-likes-stephen",
"http://thecolbertreport.cc.com/videos/le9tdo/alpha-dog-of-the-week---paul-wolfowitz",
"http://thecolbertreport.cc.com/videos/yq2yld/sign-off---fondest-memories",
"http://thecolbertreport.cc.com/videos/1dnqiw/john-kerry"
],
"guest": "Sen. John Kerry"
},
{
"date": "2007-04-17",
"videos": [
"http://thecolbertreport.cc.com/videos/35u6vo/metaphor-off-training",
"http://thecolbertreport.cc.com/videos/ctnp41/turtle-race-update",
"http://thecolbertreport.cc.com/videos/k0gjix/the-word---plan-b",
"http://thecolbertreport.cc.com/videos/1ca1nf/tip-wag---fake-sperm",
"http://thecolbertreport.cc.com/videos/ofyxod/elaine-pagels",
"http://thecolbertreport.cc.com/videos/ka39h6/sign-off---stephen-s-taxes",
"http://thecolbertreport.cc.com/videos/28ne1f/intro---4-17-07"
],
"guest": "Elaine Pagels"
},
{
"date": "2007-04-18",
"videos": [
"http://thecolbertreport.cc.com/videos/xjlfa3/intro---4-18-07",
"http://thecolbertreport.cc.com/videos/z7yfgh/who-s-not-honoring-me-now----pulitzer",
"http://thecolbertreport.cc.com/videos/y8uyv4/the-word---branding",
"http://thecolbertreport.cc.com/videos/d5i37n/national-library-week---frank-mccourt",
"http://thecolbertreport.cc.com/videos/hr8hfi/milk---hormones",
"http://thecolbertreport.cc.com/videos/edyu8c/national-library-week---sebastian-junger",
"http://thecolbertreport.cc.com/videos/ebje1q/national-library-week---david-remnick",
"http://thecolbertreport.cc.com/videos/33tv9j/paulina-porizkova",
"http://thecolbertreport.cc.com/videos/tn0cbn/sign-off---upcoming-metaphor-off"
],
"guest": "William Cohen"
},
{
"date": "2007-04-19",
"videos": [
"http://thecolbertreport.cc.com/videos/wh0xf2/intro---4-19-07",
"http://thecolbertreport.cc.com/videos/luoh3l/god-s-pet-chimp",
"http://thecolbertreport.cc.com/videos/goj3np/the-word----400-haircut",
"http://thecolbertreport.cc.com/videos/tv447i/sean-penn",
"http://thecolbertreport.cc.com/videos/iowvf0/meta-free-phor-all--shall-i-nail-thee-to-a-summer-s-day-",
"http://thecolbertreport.cc.com/videos/nzuytf/hyperbole-off"
],
"guest": "Gov. Mike Huckabee"
},
{
"date": "2007-04-23",
"videos": [
"http://thecolbertreport.cc.com/videos/e9s3wp/intro---4-23-07",
"http://thecolbertreport.cc.com/videos/tuitvp/gonzales-forgot",
"http://thecolbertreport.cc.com/videos/xgp7gj/stephanie-s-winning-",
"http://thecolbertreport.cc.com/videos/bsgdkg/mike-huckabee---running-mate-bid",
"http://thecolbertreport.cc.com/videos/mksggb/threatdown---myspace",
"http://thecolbertreport.cc.com/videos/25567u/russell-simmons",
"http://thecolbertreport.cc.com/videos/75z88c/colbert-nation-online-discussion-group"
],
"guest": "Russell Simmons"
},
{
"date": "2007-04-24",
"videos": [
"http://thecolbertreport.cc.com/videos/6edbk9/intro---4-24-07",
"http://thecolbertreport.cc.com/videos/9lfdmb/bye-bye-to-boris",
"http://thecolbertreport.cc.com/videos/zf1m9m/d-c--voting-rights---eleanor-holmes-norton",
"http://thecolbertreport.cc.com/videos/zebgor/the-word---act-globally",
"http://thecolbertreport.cc.com/videos/o4vs3o/60--good-news",
"http://thecolbertreport.cc.com/videos/63paz7/alpha-dog-of-the-week---uncle-ben",
"http://thecolbertreport.cc.com/videos/i6gv9q/dr--andrew-weil",
"http://thecolbertreport.cc.com/videos/858p8x/sign-off---captain-lead"
],
"guest": "Dr. Andrew Weil"
},
{
"date": "2007-04-25",
"videos": [
"http://thecolbertreport.cc.com/videos/939oo7/intro---4-25-07",
"http://thecolbertreport.cc.com/videos/9cksb2/dead-to-me---long-war",
"http://thecolbertreport.cc.com/videos/uixydp/the-word---sacrifice",
"http://thecolbertreport.cc.com/videos/xlgsnw/new-issue-of-gq",
"http://thecolbertreport.cc.com/videos/vsu32z/four-horsemen-of-the-a-pop-calypse---prayer",
"http://thecolbertreport.cc.com/videos/877wu4/david-walker",
"http://thecolbertreport.cc.com/videos/dqbrsh/sign-off---promises"
],
"guest": "David Walker"
},
{
"date": "2007-04-26",
"videos": [
"http://thecolbertreport.cc.com/videos/uxgeoh/exclusive---better-know-a-protectorate---guam---madeleine-bordallo-pt--1",
"http://thecolbertreport.cc.com/videos/nfu1lw/exclusive---better-know-a-protectorate---guam---madeleine-bordallo-pt--2",
"http://thecolbertreport.cc.com/videos/tioqro/intro---4-26-07",
"http://thecolbertreport.cc.com/videos/ph7bwx/stephanie-lost",
"http://thecolbertreport.cc.com/videos/nn2tor/the-word---mending-wall",
"http://thecolbertreport.cc.com/videos/7ibt5q/better-know-a-protectorate---guam---madeleine-bordallo",
"http://thecolbertreport.cc.com/videos/wax9na/tom-wolfe",
"http://thecolbertreport.cc.com/videos/4y1aqm/sign-off---yuri-kuklachev"
],
"guest": "Tom Wolfe"
},
{
"date": "2007-04-30",
"videos": [
"http://thecolbertreport.cc.com/videos/qiwo3g/intro---4-30-07",
"http://thecolbertreport.cc.com/videos/hpmi3p/first-democratic-debate-for--08",
"http://thecolbertreport.cc.com/videos/lv3s81/neil-degrasse-tyson",
"http://thecolbertreport.cc.com/videos/o5hsha/tip-wag---shrek",
"http://thecolbertreport.cc.com/videos/iwnuxq/bill-bradley"
],
"guest": "Bill Bradley"
},
{
"date": "2007-05-01",
"videos": [
"http://thecolbertreport.cc.com/videos/qd26kv/intro---5-1-07",
"http://thecolbertreport.cc.com/videos/scarky/mitt-s-favorite-book",
"http://thecolbertreport.cc.com/videos/oh320q/npr-correction",
"http://thecolbertreport.cc.com/videos/q45jin/the-word---who-cares-",
"http://thecolbertreport.cc.com/videos/cgfptc/stephen-s-horse",
"http://thecolbertreport.cc.com/videos/m9pls7/malcolm-gladwell",
"http://thecolbertreport.cc.com/videos/zj4aga/sign-off---lutefisk"
],
"guest": "Malcolm Gladwell"
},
{
"date": "2007-05-02",
"videos": [
"http://thecolbertreport.cc.com/videos/zxhw8e/intro---5-2-07",
"http://thecolbertreport.cc.com/videos/vvfvju/hr-1591",
"http://thecolbertreport.cc.com/videos/a3d8vy/the-word---better-safe-than-sorry",
"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/exclusive---better-know-a-district---virginia-s-11th---tom-davis",
"http://thecolbertreport.cc.com/videos/42iy2c/intro---5-3-07",
"http://thecolbertreport.cc.com/videos/wsiuq8/battle-of-the-surfaces",
"http://thecolbertreport.cc.com/videos/0wtt0d/the-word---the-unquisition",
"http://thecolbertreport.cc.com/videos/2iymfl/better-know-a-district---virginia-s-11th---tom-davis",
"http://thecolbertreport.cc.com/videos/6azbk5/conn-iggulden",
"http://thecolbertreport.cc.com/videos/dblp9v/sign-off---impatiens"
],
"guest": "Conn Iggulden"
},
{
"date": "2007-05-07",
"videos": [
"http://thecolbertreport.cc.com/videos/re08sm/intro---5-7-07",
"http://thecolbertreport.cc.com/videos/5ra6xp/bonjour--mon-frere",
"http://thecolbertreport.cc.com/videos/o0gs8q/republican-debate---diversity",
"http://thecolbertreport.cc.com/videos/ojz8he/the-word---the-intolerant",
"http://thecolbertreport.cc.com/videos/x5zaaj/cheating-death---vaxadrin",
"http://thecolbertreport.cc.com/videos/1i1xa2/richard-preston"
],
"guest": "Richard Preston"
},
{
"date": "2007-05-08",
"videos": [
"http://thecolbertreport.cc.com/videos/ah3swk/intro---5-8-07",
"http://thecolbertreport.cc.com/videos/4vb9ha/shout-out----uss-rhode-island",
"http://thecolbertreport.cc.com/videos/v2jrqr/the-word---rendered-moot",
"http://thecolbertreport.cc.com/videos/bkd3bl/threatdown---oprah",
"http://thecolbertreport.cc.com/videos/296em4/nassim-nicholas-taleb"
],
"guest": "Nassim Nicholas Taleb"
},
{
"date": "2007-05-09",
"videos": [
"http://thecolbertreport.cc.com/videos/bbia54/intro---5-9-07",
"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/sign-off---bedtime-recipe"
],
"guest": "Salman Rushdie, Jane Fonda"
},
{
"date": "2007-05-10",
"videos": [
"http://thecolbertreport.cc.com/videos/h5fw40/intro---5-10-07",
"http://thecolbertreport.cc.com/videos/5mohm3/the-word---illusion",
"http://thecolbertreport.cc.com/videos/6mm58j/hometown-hero-town---naperville--il",
"http://thecolbertreport.cc.com/videos/1yenb5/the-in-box---doctor-colbert",
"http://thecolbertreport.cc.com/videos/ya8jd7/jann-wenner",
"http://thecolbertreport.cc.com/videos/tbehsa/sign-off---time-capsule",
"http://thecolbertreport.cc.com/videos/59lqle/he-s-singing-in-korean"
],
"guest": "Jann Wenner"
},
{
"date": "2007-05-14",
"videos": [
"http://thecolbertreport.cc.com/videos/q3z8ca/intro---5-14-07",
"http://thecolbertreport.cc.com/videos/2wmvq0/ferrari-list",
"http://thecolbertreport.cc.com/videos/ji8vnp/the-word---supporting-role",
"http://thecolbertreport.cc.com/videos/62strl/tip-wag---mitt-romney",
"http://thecolbertreport.cc.com/videos/324045/william-langewiesche",
"http://thecolbertreport.cc.com/videos/70la8y/stealing-lincoln-s-body"
],
"guest": "William Langewiesche"
},
{
"date": "2007-05-15",
"videos": [
"http://thecolbertreport.cc.com/videos/458uob/intro---5-15-07",
"http://thecolbertreport.cc.com/videos/0oyxpf/mcnulty-guilty",
"http://thecolbertreport.cc.com/videos/c0yfoq/pasadena--india",
"http://thecolbertreport.cc.com/videos/lda912/the-word---heated-debate",
"http://thecolbertreport.cc.com/videos/7heoq8/bonus-wag---bush-graphic",
"http://thecolbertreport.cc.com/videos/yqaslk/alpha-dog-of-the-week---michael-wiley",
"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://thecolbertreport.cc.com/videos/l9r090/intro---5-16-07",
"http://thecolbertreport.cc.com/videos/9nd4g1/second-republican-debate",
"http://thecolbertreport.cc.com/videos/lqz6xp/the-word---level-playing-field",
"http://thecolbertreport.cc.com/videos/vb25tk/formidable-opponent---peanuts",
"http://thecolbertreport.cc.com/videos/vd7dcd/howard-dean",
"http://thecolbertreport.cc.com/videos/west8f/sign-off---name-of-city-here"
],
"guest": "Howard Dean"
},
{
"date": "2007-05-17",
"videos": [
"http://thecolbertreport.cc.com/videos/j0njxq/intro---5-17-07",
"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://thecolbertreport.cc.com/videos/vz0202/sign-off---rafters"
],
"guest": "Randy Kearse, Rep. Tom DeLay"
},
{
"date": "2007-05-21",
"videos": [
"http://thecolbertreport.cc.com/videos/43r84a/intro---5-21-07",
"http://thecolbertreport.cc.com/videos/j7bshe/god-loves-a-big-screen-tv",
"http://thecolbertreport.cc.com/videos/s5odvt/presidential-fraternity",
"http://thecolbertreport.cc.com/videos/w89fii/the-word---his-way",
"http://thecolbertreport.cc.com/videos/zg6n7b/cheating-death---internal-decapitation",
"http://thecolbertreport.cc.com/videos/zhetqf/jared-diamond"
],
"guest": "Jared Diamond"
},
{
"date": "2007-05-22",
"videos": [
"http://thecolbertreport.cc.com/videos/vn2u9p/intro---5-22-07",
"http://thecolbertreport.cc.com/videos/pp3dmv/popularity-contest",
"http://thecolbertreport.cc.com/videos/szr9pb/barack-s-a-liar",
"http://thecolbertreport.cc.com/videos/4wuift/the-word---party-of-change",
"http://thecolbertreport.cc.com/videos/7bglee/threatdown---environmentalists",
"http://thecolbertreport.cc.com/videos/661huh/john-amaechi",
"http://thecolbertreport.cc.com/videos/ivskf6/sign-off---lesson-forgotten"
],
"guest": "John Amaechi"
},
{
"date": "2007-05-23",
"videos": [
"http://thecolbertreport.cc.com/videos/pwwndq/intro---5-23-07",
"http://thecolbertreport.cc.com/videos/ac7obb/bush-is-back-",
"http://thecolbertreport.cc.com/videos/2t0qn4/illegal-immigration---bay-buchanan",
"http://thecolbertreport.cc.com/videos/m6d100/threatdown---pellicano-",
"http://thecolbertreport.cc.com/videos/0v2e97/bob-deans",
"http://thecolbertreport.cc.com/videos/1kaqcp/sign-off---hi-def"
],
"guest": "Bay Buchanan, Bob Deans"
},
{
"date": "2007-05-24",
"videos": [
"http://thecolbertreport.cc.com/videos/fc4ao7/intro---5-24-07",
"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/better-know-a-district---arizona-s-7th---raul-grijalva",
"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://thecolbertreport.cc.com/videos/38wiug/intro---6-4-07",
"http://thecolbertreport.cc.com/videos/oujnzk/uneventful-vacation",
"http://thecolbertreport.cc.com/videos/5475j4/democratic-presidential-debate---venue",
"http://thecolbertreport.cc.com/videos/3bhuju/jan-schakowsky",
"http://thecolbertreport.cc.com/videos/svome1/better-know-a-district---illinois--9th---jan-schakowsky",
"http://thecolbertreport.cc.com/videos/o9kyh0/leon-botstein",
"http://thecolbertreport.cc.com/videos/kaun5v/sign-off---mardi-gras-mask"
],
"guest": "Rep. Jan Schakowsky, Leon Botstein"
},
{
"date": "2007-06-05",
"videos": [
"http://thecolbertreport.cc.com/videos/7sdcg5/intro---6-5-07",
"http://thecolbertreport.cc.com/videos/cvm31h/you-ve-been-scootered-",
"http://thecolbertreport.cc.com/videos/j3ieeu/yahoo-korea---rain",
"http://thecolbertreport.cc.com/videos/8226p8/the-word---mission-control",
"http://thecolbertreport.cc.com/videos/n0lk8c/the-god-machine-",
"http://thecolbertreport.cc.com/videos/l7y8g1/when-animals-attack-our-morals---flamingos",
"http://thecolbertreport.cc.com/videos/rsex2i/jessica-valenti"
],
"guest": "Jessica Valenti"
},
{
"date": "2007-06-06",
"videos": [
"http://thecolbertreport.cc.com/videos/jorp7o/intro---6-6-07",
"http://thecolbertreport.cc.com/videos/h69756/sinner-edwards",
"http://thecolbertreport.cc.com/videos/5mthf9/the-word---airogance",
"http://thecolbertreport.cc.com/videos/cujedg/tip-wag---deep-purple",
"http://thecolbertreport.cc.com/videos/ngt9bf/carl-bernstein",
"http://thecolbertreport.cc.com/videos/xd82es/craziest-f--king-thing-i-ve-ever-heard---octopi"
],
"guest": "Carl Bernstein"
},
{
"date": "2007-06-07",
"videos": [
"http://thecolbertreport.cc.com/videos/b0xqmj/intro---6-7-07",
"http://thecolbertreport.cc.com/videos/w1jmjp/pope-jump",
"http://thecolbertreport.cc.com/videos/ovs97y/the-word---rodham",
"http://thecolbertreport.cc.com/videos/tl388o/better-know-a-district---washington-s-9th---adam-smith",
"http://thecolbertreport.cc.com/videos/ty2mfm/cullen-murphy",
"http://thecolbertreport.cc.com/videos/sitbn5/sign-off---vomitorium"
],
"guest": "Cullen Murphy"
},
{
"date": "2007-06-11",
"videos": [
"http://thecolbertreport.cc.com/videos/1yiwr5/intro---6-11-07",
"http://thecolbertreport.cc.com/videos/dufa3e/commencement-speeches",
"http://thecolbertreport.cc.com/videos/2k0q1b/the-word---easy-a",
"http://thecolbertreport.cc.com/videos/kd0cks/revenge-on-knox-college",
"http://thecolbertreport.cc.com/videos/qrkfud/albania-greets-president-bush",
"http://thecolbertreport.cc.com/videos/zpjdcg/michael-gershon"
],
"guest": "Dr. Michael D. Gershon"
},
{
"date": "2007-06-12",
"videos": [
"http://thecolbertreport.cc.com/videos/b08r7k/intro---6-12-07",
"http://thecolbertreport.cc.com/videos/8dqxf0/bush-s-missing-watch",
"http://thecolbertreport.cc.com/videos/sse01t/mr--dyachenko--tear-down-this-wall",
"http://thecolbertreport.cc.com/videos/lhl8km/tommy-chong--commentator",
"http://thecolbertreport.cc.com/videos/ey1hjm/mr--dyachenko--tear-down-this-watermelon",
"http://thecolbertreport.cc.com/videos/2krcmy/colbert-platinum---butler-shortage",
"http://thecolbertreport.cc.com/videos/gdyajn/josh-wolf",
"http://thecolbertreport.cc.com/videos/r2b64h/mr--dyachenko--tear-me-off-a-piece-of-this-cake"
],
"guest": "Josh Wolf"
},
{
"date": "2007-06-13",
"videos": [
"http://thecolbertreport.cc.com/videos/onm1u4/intro---6-13-07",
"http://thecolbertreport.cc.com/videos/fytk75/ruined-anniversary",
"http://thecolbertreport.cc.com/videos/6nklj9/freezing-cold-case-files--otzi",
"http://thecolbertreport.cc.com/videos/tnydpx/the-word---pathophysiology",
"http://thecolbertreport.cc.com/videos/2bu2sn/threatdown---robots",
"http://thecolbertreport.cc.com/videos/o2ywub/ron-paul",
"http://thecolbertreport.cc.com/videos/cakp5s/sign-off---crispy-deliciousness"
],
"guest": "Rep. Ron Paul"
},
{
"date": "2007-06-14",
"videos": [
"http://thecolbertreport.cc.com/videos/oa9gd7/intro---6-14-07",
"http://thecolbertreport.cc.com/videos/6uc0h1/fred-thompson-on-fire",
"http://thecolbertreport.cc.com/videos/g52jco/stephen-benjamin",
"http://thecolbertreport.cc.com/videos/0agktt/bears---balls---summer-vacation-edition",
"http://thecolbertreport.cc.com/videos/a0p792/daniel-b--smith",
"http://thecolbertreport.cc.com/videos/llk3nk/sign-off---the-land-of-nod"
],
"guest": "Daniel B. Smith"
},
{
"date": "2007-06-18",
"videos": [
"http://thecolbertreport.cc.com/videos/rwup1e/intro---6-18-07",
"http://thecolbertreport.cc.com/videos/k3t99j/papal-encounter",
"http://thecolbertreport.cc.com/videos/rbx9fh/the-price-is-right",
"http://thecolbertreport.cc.com/videos/w0pe9q/the-word---mcconaughey",
"http://thecolbertreport.cc.com/videos/yfclcj/stephen-on-itunes",
"http://thecolbertreport.cc.com/videos/7jalja/tip-wag---arnold-schwarzenegger",
"http://thecolbertreport.cc.com/videos/ozfwje/toby-keith"
],
"guest": "Toby Keith"
},
{
"date": "2007-06-19",
"videos": [
"http://thecolbertreport.cc.com/videos/ndbsf6/intro---6-19-07",
"http://thecolbertreport.cc.com/videos/qxyadz/secret-clapton-concert",
"http://thecolbertreport.cc.com/videos/0y4kih/marybeth-garrigan",
"http://thecolbertreport.cc.com/videos/mzxikb/countdown-to-armageddon",
"http://thecolbertreport.cc.com/videos/ij3mgr/alpha-dog-of-the-week---robert-bork",
"http://thecolbertreport.cc.com/videos/u1dk1e/anne-marie-slaughter",
"http://thecolbertreport.cc.com/videos/kxk02d/sign-off---manifesto"
],
"guest": "Harriet the Eagle with handler, Anne-Marie Slaughter"
},
{
"date": "2007-06-20",
"videos": [
"http://thecolbertreport.cc.com/videos/jbdbyq/intro---6-20-07",
"http://thecolbertreport.cc.com/videos/beccdu/bloomberg-for-president",
"http://thecolbertreport.cc.com/videos/xe5j30/the-word---justice",
"http://thecolbertreport.cc.com/videos/4yziuf/cheating-death---colgate",
"http://thecolbertreport.cc.com/videos/7m9bgr/will-schwalbe",
"http://thecolbertreport.cc.com/videos/glo9c6/sign-off---job-well-done"
],
"guest": "Will Schwalbe"
},
{
"date": "2007-06-21",
"videos": [
"http://thecolbertreport.cc.com/videos/um7qsm/intro---6-21-07",
"http://thecolbertreport.cc.com/videos/psamg7/ron-paul-s-colbert-bump",
"http://thecolbertreport.cc.com/videos/38xzef/difference-makers---tim-donnelly",
"http://thecolbertreport.cc.com/videos/2oyfu8/vincent-bugliosi",
"http://thecolbertreport.cc.com/videos/dlqbr6/sign-off---goodbye-to-mr--wizard",
"http://thecolbertreport.cc.com/videos/35278z/the-word---porking"
],
"guest": "Vincent Bugliosi"
},
{
"date": "2007-06-25",
"videos": [
"http://thecolbertreport.cc.com/videos/wvrrio/intro---6-25-07",
"http://thecolbertreport.cc.com/videos/xvrdq7/the-freegans",
"http://thecolbertreport.cc.com/videos/dqezp0/the-word---fourth-branch",
"http://thecolbertreport.cc.com/videos/oldt6o/threatdown---coral-reefs",
"http://thecolbertreport.cc.com/videos/mhjtgw/tom-hayden",
"http://thecolbertreport.cc.com/videos/5zivhy/sign-off---contract"
],
"guest": "Tom Hayden"
},
{
"date": "2007-06-26",
"videos": [
"http://thecolbertreport.cc.com/videos/2dxfpk/intro---6-26-07",
"http://thecolbertreport.cc.com/videos/id2z8d/christmas-in-june",
"http://thecolbertreport.cc.com/videos/eelu64/tony-blair-s-conversion",
"http://thecolbertreport.cc.com/videos/tpff57/the-word---elsewhere",
"http://thecolbertreport.cc.com/videos/0t819z/christmas-presents",
"http://thecolbertreport.cc.com/videos/5awnum/alpha-dog-of-the-week---fred-thompson",
"http://thecolbertreport.cc.com/videos/1uvv46/david-france",
"http://thecolbertreport.cc.com/videos/96ew1f/sign-off---visions-of-sugarplums"
],
"guest": "David France"
},
{
"date": "2007-06-27",
"videos": [
"http://thecolbertreport.cc.com/videos/47zhcv/intro---6-27-07",
"http://thecolbertreport.cc.com/videos/y34h2c/give-stephen-an-iphone",
"http://thecolbertreport.cc.com/videos/wepdgq/tom-blanton",
"http://thecolbertreport.cc.com/videos/f6in26/four-horsemen-of-the-a-pop-calypse---shaq",
"http://thecolbertreport.cc.com/videos/msuhoe/daniel-gilbert"
],
"guest": "Tom Blanton, Daniel Gilbert"
},
{
"date": "2007-06-28",
"videos": [
"http://thecolbertreport.cc.com/videos/ftc2tr/intro---6-28-07",
"http://thecolbertreport.cc.com/videos/2o9nj2/spot-the-difference",
"http://thecolbertreport.cc.com/videos/kb8br0/civil-unrest-in-iran",
"http://thecolbertreport.cc.com/videos/0lfyqf/the-word---profiles-in-timing",
"http://thecolbertreport.cc.com/videos/owh6vd/colbert-platinum---luxury-car-wrecks",
"http://thecolbertreport.cc.com/videos/f9y6wb/doug-bailey",
"http://thecolbertreport.cc.com/videos/oxeeoj/sign-off---going-on-vacation"
],
"guest": "Doug Bailey"
},
{
"date": "2007-07-16",
"videos": [
"http://thecolbertreport.cc.com/videos/rsv8g9/intro---7-16-07",
"http://thecolbertreport.cc.com/videos/bwablo/tunneling-to-free-scooter-libby",
"http://thecolbertreport.cc.com/videos/lnroz7/richard-florida",
"http://thecolbertreport.cc.com/videos/scrz03/difference-makers---johnna-mink",
"http://thecolbertreport.cc.com/videos/r0qxf5/ben-nelson",
"http://thecolbertreport.cc.com/videos/zabqma/sign-off---take-five"
],
"guest": "Richard Florida, Sen. Ben Nelson"
},
{
"date": "2007-07-17",
"videos": [
"http://thecolbertreport.cc.com/videos/cliw91/intro---7-17-07",
"http://thecolbertreport.cc.com/videos/zl176l/all-night-senate-session",
"http://thecolbertreport.cc.com/videos/depupc/the-word---victimcrite",
"http://thecolbertreport.cc.com/videos/hdn59k/1-428-minutes-to-go",
"http://thecolbertreport.cc.com/videos/gafa5t/tip-wag---michael-chertoff-s-gut-o-meter",
"http://thecolbertreport.cc.com/videos/ev6dp9/mark-moffett",
"http://thecolbertreport.cc.com/videos/1jb3qq/threatdown---500-threat-marathon"
],
"guest": "Mark Moffett"
},
{
"date": "2007-07-18",
"videos": [
"http://thecolbertreport.cc.com/videos/uf8wpk/intro---7-18-07",
"http://thecolbertreport.cc.com/videos/gn1bt7/2007-filibustacular",
"http://thecolbertreport.cc.com/videos/hqa77b/the-word---smiley-face",
"http://thecolbertreport.cc.com/videos/ysfdjx/pope-goes-green",
"http://thecolbertreport.cc.com/videos/artj1e/alpha-dog-of-the-week---david-beckham",
"http://thecolbertreport.cc.com/videos/ga3vsc/john-mellencamp"
],
"guest": "John Mellencamp"
},
{
"date": "2007-07-19",
"videos": [
"http://thecolbertreport.cc.com/videos/19mw0q/intro---7-19-07",
"http://thecolbertreport.cc.com/videos/1esv0i/republican-candidates--suffering",
"http://thecolbertreport.cc.com/videos/a9zoea/michael-moore",
"http://thecolbertreport.cc.com/videos/bn2nox/march-to-enslavement---stephen-gets-an-iphone",
"http://thecolbertreport.cc.com/videos/9p0lhk/frank-sulloway",
"http://thecolbertreport.cc.com/videos/qhp9z3/sign-off---length-of-the-show-contest"
],
"guest": "Frank Sulloway"
},
{
"date": "2007-07-23",
"videos": [
"http://thecolbertreport.cc.com/videos/nc8xh3/intro---7-23-07",
"http://thecolbertreport.cc.com/videos/fkxqbr/stephen-s-fountain-of-youth",
"http://thecolbertreport.cc.com/videos/4rqgp5/the-word---premium-package",
"http://thecolbertreport.cc.com/videos/l0ig1p/colbert-platinum---private-submarines",
"http://thecolbertreport.cc.com/videos/6e6gd1/simon-schama",
"http://thecolbertreport.cc.com/videos/vfxa7p/sign-off---just-about-out-of-time"
],
"guest": "Simon Schama"
},
{
"date": "2007-07-24",
"videos": [
"http://thecolbertreport.cc.com/videos/15l5ov/intro---7-24-07",
"http://thecolbertreport.cc.com/videos/d9v0fp/bush-s-butt",
"http://thecolbertreport.cc.com/videos/nvdygh/the-word---modest-porpoisal",
"http://thecolbertreport.cc.com/videos/e5420t/movies-that-are-destroying-america--chuck-and-larry",
"http://thecolbertreport.cc.com/videos/yqgj2h/anthony-romero",
"http://thecolbertreport.cc.com/videos/alsjeo/joining-the-illuminati"
],
"guest": "Anthony D. Romero"
},
{
"date": "2007-07-25",
"videos": [
"http://thecolbertreport.cc.com/videos/shyero/intro---7-25-07",
"http://thecolbertreport.cc.com/videos/4md3eg/daily-kos",
"http://thecolbertreport.cc.com/videos/ikcdyi/the-word---no-regrets",
"http://thecolbertreport.cc.com/videos/bdjzxb/thompson-campaign",
"http://thecolbertreport.cc.com/videos/bc0mf3/hometown-hero-town---bryce-canyon-city",
"http://thecolbertreport.cc.com/videos/2f2r58/charles-kaiser"
],
"guest": "Charles Kaiser"
},
{
"date": "2007-07-26",
"videos": [
"http://thecolbertreport.cc.com/videos/wth3ve/intro---7-26-07",
"http://thecolbertreport.cc.com/videos/3or3gc/how-did-stephen-break-his-wrist-",
"http://thecolbertreport.cc.com/videos/if6h6s/industrial-hemp---medical-marijuana---aaron-houston",
"http://thecolbertreport.cc.com/videos/8p2na8/advice-to-the-gods---nepalese-pre-teen-goddesses",
"http://thecolbertreport.cc.com/videos/kcb6kk/bob-shrum"
],
"guest": "Robert Shrum"
},
{
"date": "2007-07-30",
"videos": [
"http://thecolbertreport.cc.com/videos/8m5y0f/intro---7-30-07",
"http://thecolbertreport.cc.com/videos/tyo2os/wrist-violence---glorification",
"http://thecolbertreport.cc.com/videos/9e0vz0/pollution-immigration",
"http://thecolbertreport.cc.com/videos/brdooe/the-word---solidarity",
"http://thecolbertreport.cc.com/videos/ii5xvp/threatdown---scottish-surgeons",
"http://thecolbertreport.cc.com/videos/o55kxd/evan-osnos"
],
"guest": "Evan Osnos"
},
{
"date": "2007-07-31",
"videos": [
"http://thecolbertreport.cc.com/videos/01xv20/intro---7-31-07",
"http://thecolbertreport.cc.com/videos/bgyn76/wrist-violence-epidemic",
"http://thecolbertreport.cc.com/videos/aryder/smokin--pole---arc--who-goes-there-",
"http://thecolbertreport.cc.com/videos/tg3umi/the-word---special-prosecutor",
"http://thecolbertreport.cc.com/videos/egvqvt/rupert-murdoch-purchases-the-wall-street-journal",
"http://thecolbertreport.cc.com/videos/i9cr44/sport-report---barry-bonds",
"http://thecolbertreport.cc.com/videos/3tom79/kathleen-kennedy-townsend"
],
"guest": "Kathleen Kennedy Townsend"
},
{
"date": "2007-08-01",
"videos": [
"http://thecolbertreport.cc.com/videos/jtpqex/intro---8-1-07",
"http://thecolbertreport.cc.com/videos/b8kbe8/dr--jerry-vizzone",
"http://thecolbertreport.cc.com/videos/zd2nvn/the-word---college-credit",
"http://thecolbertreport.cc.com/videos/nlqwhc/when-animals-attack-our-morals---hollywood-pigeons",
"http://thecolbertreport.cc.com/videos/agisiu/michael-beschloss",
"http://thecolbertreport.cc.com/videos/a0yv9l/30-minute-anniversary"
],
"guest": "Michael Beschloss"
},
{
"date": "2007-08-02",
"videos": [
"http://thecolbertreport.cc.com/videos/qjky5n/farewell-ingmar-bergman",
"http://thecolbertreport.cc.com/videos/jtpqex/intro---8-1-07",
"http://thecolbertreport.cc.com/videos/b8kbe8/dr--jerry-vizzone",
"http://thecolbertreport.cc.com/videos/zd2nvn/the-word---college-credit",
"http://thecolbertreport.cc.com/videos/nlqwhc/when-animals-attack-our-morals---hollywood-pigeons",
"http://thecolbertreport.cc.com/videos/agisiu/michael-beschloss",
"http://thecolbertreport.cc.com/videos/a0yv9l/30-minute-anniversary"
],
"guest": "Michael J. Behe"
},
{
"date": "2007-08-02",
"videos": [
"http://thecolbertreport.cc.com/videos/tqb1ek/intro---8-2-07",
"http://thecolbertreport.cc.com/videos/4fa4lg/superhighway",
"http://thecolbertreport.cc.com/videos/sg9xg3/rick-macarthur",
"http://thecolbertreport.cc.com/videos/vc3b3c/thighmasters-for-the-troops",
"http://thecolbertreport.cc.com/videos/ptvqa7/sport-report---barry-smash",
"http://thecolbertreport.cc.com/videos/z81ulz/michael-behe"
],
"guest": "Michael J. Behe"
},
{
"date": "2007-08-07",
"videos": [
"http://thecolbertreport.cc.com/videos/7r677j/intro---8-7-07",
"http://thecolbertreport.cc.com/videos/4kw9z4/yearly-kos-convention",
"http://thecolbertreport.cc.com/videos/f3w2rh/the-word---the-dark-side",
"http://thecolbertreport.cc.com/videos/zwnri3/better-know-a-protectorate---american-samoa---eni-faleomavaega",
"http://thecolbertreport.cc.com/videos/d21xmf/ian-bogost",
"http://thecolbertreport.cc.com/videos/kzlukl/sign-off---colbert-commonsensicals"
],
"guest": "Ian Bogost"
},
{
"date": "2007-08-08",
"videos": [
"http://thecolbertreport.cc.com/videos/4f7upv/intro---8-8-07",
"http://thecolbertreport.cc.com/videos/oxms8d/wrist-watch---fighting-back",
"http://thecolbertreport.cc.com/videos/jtqjr6/jim-cramer",
"http://thecolbertreport.cc.com/videos/nveh3o/bears---balls---bootlegging",
"http://thecolbertreport.cc.com/videos/7zavlx/tina-brown"
],
"guest": "Jim Cramer, Tina Brown"
},
{
"date": "2007-08-09",
"videos": [
"http://thecolbertreport.cc.com/videos/hutdl7/intro---8-9-07",
"http://thecolbertreport.cc.com/videos/3abho5/the-word---clarity",
"http://thecolbertreport.cc.com/videos/qp6xha/tip-wag---bloomberg",
"http://thecolbertreport.cc.com/videos/h9y997/judd-apatow",
"http://thecolbertreport.cc.com/videos/161mvg/sign-off---toenails"
],
"guest": "Judd Apatow"
},
{
"date": "2007-08-13",
"videos": [
"http://thecolbertreport.cc.com/videos/1833p0/intro---8-13-07",
"http://thecolbertreport.cc.com/videos/gavjew/rove-resigns",
"http://thecolbertreport.cc.com/videos/qu995y/the-word---white-guy",
"http://thecolbertreport.cc.com/videos/bruhc9/threatdown---bats",
"http://thecolbertreport.cc.com/videos/fk3k31/michael-jacobson",
"http://thecolbertreport.cc.com/videos/dnjitq/sign-off---americone-dream"
],
"guest": "Michael Jacobson"
},
{
"date": "2007-08-14",
"videos": [
"http://thecolbertreport.cc.com/videos/0imzs4/dna--could-it-happen-to-you----jackknife",
"http://thecolbertreport.cc.com/videos/n35y17/jerry-miller",
"http://thecolbertreport.cc.com/videos/5o7ie1/dr--spencer-wells",
"http://thecolbertreport.cc.com/videos/x03vyw/dna--could-it-happen-to-you----incrimination"
],
"guest": "Jerry Miller, Spencer Wells"
},
{
"date": "2007-08-15",
"videos": [
"http://thecolbertreport.cc.com/videos/6o4ihx/intro---8-15-07",
"http://thecolbertreport.cc.com/videos/rv9k9s/jewish-colbert-ancestry",
"http://thecolbertreport.cc.com/videos/3zlayh/markos-moulitsas",
"http://thecolbertreport.cc.com/videos/6mvd9x/monkey-on-the-lam---oliver",
"http://thecolbertreport.cc.com/videos/zp4iw7/the-word---potential",
"http://thecolbertreport.cc.com/videos/734nxn/michael-wallis",
"http://thecolbertreport.cc.com/videos/z4d4y4/sign-off---doctor-s-orders"
],
"guest": "Michael Wallis"
},
{
"date": "2007-08-16",
"videos": [
"http://thecolbertreport.cc.com/videos/ns0g26/intro---8-16-07",
"http://thecolbertreport.cc.com/videos/14jprr/colbert-branson-trainwreck",
"http://thecolbertreport.cc.com/videos/kgguey/mike-huckabee",
"http://thecolbertreport.cc.com/videos/fnrvrc/cheating-death---gene-therapy",
"http://thecolbertreport.cc.com/videos/u8nc37/andrew-keen"
],
"guest": "Andrew Keen"
},
{
"date": "2007-08-20",
"videos": [
"http://thecolbertreport.cc.com/videos/tfnhsy/intro---8-20-07",
"http://thecolbertreport.cc.com/videos/xo98yh/wriststrong-bracelets",
"http://thecolbertreport.cc.com/videos/us6itk/the-word---made-in-iraq",
"http://thecolbertreport.cc.com/videos/9a8i9h/nailed--em---northern-border",
"http://thecolbertreport.cc.com/videos/o9ho2y/nathan-sawaya"
],
"guest": "Nathan Sawaya"
},
{
"date": "2007-08-21",
"videos": [
"http://thecolbertreport.cc.com/videos/2gjr3w/intro---8-21-07",
"http://thecolbertreport.cc.com/videos/bcfeni/smokin--pole---global-warming",
"http://thecolbertreport.cc.com/videos/7gfsui/the-word---self-determination",
"http://thecolbertreport.cc.com/videos/v4twhy/formidable-opponent---terrorism",
"http://thecolbertreport.cc.com/videos/4o129i/michael-shermer"
],
"guest": "Michael Shermer"
},
{
"date": "2007-08-22",
"videos": [
"http://thecolbertreport.cc.com/videos/v8cwuz/intro---8-22-07",
"http://thecolbertreport.cc.com/videos/k7oqos/foreshadowing",
"http://thecolbertreport.cc.com/videos/9snnh5/the-word---november-surprise",
"http://thecolbertreport.cc.com/videos/ymi1da/where-in-the-world-is-matt-lauer-s-wriststrong-bracelet-",
"http://thecolbertreport.cc.com/videos/r18bn4/colbert-platinum---san-tropez",
"http://thecolbertreport.cc.com/videos/xxwsh0/richard-branson",
"http://thecolbertreport.cc.com/videos/eb410v/doused"
],
"guest": "Richard Branson"
},
{
"date": "2007-08-23",
"videos": [
"http://thecolbertreport.cc.com/videos/w3z5w0/intro---8-23-07",
"http://thecolbertreport.cc.com/videos/uc4umy/cheney-s-pre-emptive-strike",
"http://thecolbertreport.cc.com/videos/en1mx1/thomas-ricks",
"http://thecolbertreport.cc.com/videos/xjgukn/fractured-freedom",
"http://thecolbertreport.cc.com/videos/0arcqm/wrist-cast-signatories",
"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://thecolbertreport.cc.com/videos/844a7k/intro---9-10-07",
"http://thecolbertreport.cc.com/videos/vdvpmz/kicking-the-habit",
"http://thecolbertreport.cc.com/videos/p14g3t/the-word---honor-bound",
"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://thecolbertreport.cc.com/videos/hy8je4/intro---9-11-07",
"http://thecolbertreport.cc.com/videos/3l7k3j/general-betray-us",
"http://thecolbertreport.cc.com/videos/5yaj4x/indecision-2008--don-t-f--k-this-up-america---the-kickoff",
"http://thecolbertreport.cc.com/videos/mjzhz2/the-word---southsourcing",
"http://thecolbertreport.cc.com/videos/5z4esb/katie-bruggeman---exclusive",
"http://thecolbertreport.cc.com/videos/o07u14/garrison-keillor"
],
"guest": "Garrison Keillor"
},
{
"date": "2007-09-12",
"videos": [
"http://thecolbertreport.cc.com/videos/h5njj1/intro---9-12-07",
"http://thecolbertreport.cc.com/videos/8lpy3i/1-888-mops-key",
"http://thecolbertreport.cc.com/videos/7hc8lx/the-word---re-run",
"http://thecolbertreport.cc.com/videos/r6x2pm/michael-bloomberg",
"http://thecolbertreport.cc.com/videos/3rano7/tek-jansen---beginning-s-first-dawn--episode-one",
"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://thecolbertreport.cc.com/videos/tduyob/intro---9-13-07",
"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/stephen-for-president---answering-the-call"
],
"guest": "Ed Begley Jr."
},
{
"date": "2007-09-18",
"videos": [
"http://thecolbertreport.cc.com/videos/tr81w4/intro---9-18-07",
"http://thecolbertreport.cc.com/videos/6l9i7j/the-word---let-my-people-go",
"http://thecolbertreport.cc.com/videos/6we8r4/difference-makers---nitro-girl",
"http://thecolbertreport.cc.com/videos/jx6a68/susan-sarandon"
],
"guest": "Susan Sarandon"
},
{
"date": "2007-09-19",
"videos": [
"http://thecolbertreport.cc.com/videos/lv4fuw/intro---9-19-07",
"http://thecolbertreport.cc.com/videos/zeoen2/ed-asner-dials-the-atone-phone",
"http://thecolbertreport.cc.com/videos/0aau1u/the-word---solitarity",
"http://thecolbertreport.cc.com/videos/7ooxuh/colbert-platinum---green-edition",
"http://thecolbertreport.cc.com/videos/nnhbey/naomi-wolf"
],
"guest": "Naomi Wolf"
},
{
"date": "2007-09-20",
"videos": [
"http://thecolbertreport.cc.com/videos/fojlm8/intro---9-20-07",
"http://thecolbertreport.cc.com/videos/0ek76n/rabbi-fish",
"http://thecolbertreport.cc.com/videos/2h18lo/blistering-rebuttal",
"http://thecolbertreport.cc.com/videos/z6i9oa/the-word---market-forces",
"http://thecolbertreport.cc.com/videos/b5qfpk/threatdown---us",
"http://thecolbertreport.cc.com/videos/wthvm9/jeffrey-toobin",
"http://thecolbertreport.cc.com/videos/1pktzf/craziest-f--king-thing-i-ve-ever-heard---mayo-kitchen"
],
"guest": "Jeffrey Toobin"
},
{
"date": "2007-09-24",
"videos": [
"http://thecolbertreport.cc.com/videos/tgxkym/intro---9-24-07",
"http://thecolbertreport.cc.com/videos/kwfydk/the-word---na-na-na-na-na-na",
"http://thecolbertreport.cc.com/videos/zztck4/alpha-dog-of-the-week---honniball",
"http://thecolbertreport.cc.com/videos/l00qbc/the-metric-system",
"http://thecolbertreport.cc.com/videos/pkz7i5/thomas-l--friedman",
"http://thecolbertreport.cc.com/videos/emtni3/sign-off---stephen-accepts-your-apologies"
],
"guest": "Thomas Friedman"
},
{
"date": "2007-09-25",
"videos": [
"http://thecolbertreport.cc.com/videos/yrize5/intro---9-25-07",
"http://thecolbertreport.cc.com/videos/cminr7/no-nuclear-iran",
"http://thecolbertreport.cc.com/videos/2g01er/indecision-2008--don-t-f--k-this-up-america---giuliani",
"http://thecolbertreport.cc.com/videos/bjhu7f/k--david-harrison",
"http://thecolbertreport.cc.com/videos/b5cc0e/tip-wag---muslim-hipsters",
"http://thecolbertreport.cc.com/videos/5ny4ja/john-grisham"
],
"guest": "John Grisham"
},
{
"date": "2007-09-26",
"videos": [
"http://thecolbertreport.cc.com/videos/ups73z/intro---9-26-07",
"http://thecolbertreport.cc.com/videos/rn3hke/forgiving-bennett",
"http://thecolbertreport.cc.com/videos/agyblq/canadian-dollar",
"http://thecolbertreport.cc.com/videos/nj93xu/the-word---a-word-from-our-sponsors",
"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://thecolbertreport.cc.com/videos/i67egh/intro---9-27-07",
"http://thecolbertreport.cc.com/videos/o502gv/king-tut",
"http://thecolbertreport.cc.com/videos/mhmga5/democratic-presidential-debate---the-clintons",
"http://thecolbertreport.cc.com/videos/th2rny/the-word---early-immunization",
"http://thecolbertreport.cc.com/videos/ev9qqd/david-schwartz",
"http://thecolbertreport.cc.com/videos/q0vng8/sign-off---bear-in-the-woods"
],
"guest": "David Schwartz"
},
{
"date": "2007-10-01",
"videos": [
"http://thecolbertreport.cc.com/videos/4vmpg2/intro---10-1-07",
"http://thecolbertreport.cc.com/videos/s3koea/on-notice---dennis-kucinich",
"http://thecolbertreport.cc.com/videos/e5dl9b/the-word---evitable",
"http://thecolbertreport.cc.com/videos/7s7h6l/cheating-death---sleep",
"http://thecolbertreport.cc.com/videos/5wkeol/charlie-savage",
"http://thecolbertreport.cc.com/videos/g86mf6/sign-off---all-night-date"
],
"guest": "Charlie Savage"
},
{
"date": "2007-10-02",
"videos": [
"http://thecolbertreport.cc.com/videos/5ycsxc/intro---10-2-07",
"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/the-word---troops-out-now",
"http://thecolbertreport.cc.com/videos/berne3/nailed--em---cyberrorists",
"http://thecolbertreport.cc.com/videos/non4mf/john-mearsheimer",
"http://thecolbertreport.cc.com/videos/yxngw7/what-number-is-stephen-thinking-of----between-one-and-ten"
],
"guest": "John Mearsheimer"
},
{
"date": "2007-10-03",
"videos": [
"http://thecolbertreport.cc.com/videos/77zwpl/intro---10-3-07",
"http://thecolbertreport.cc.com/videos/rsugzz/krugman-correction",
"http://thecolbertreport.cc.com/videos/ujxs1h/gay-roundup---dan-savage",
"http://thecolbertreport.cc.com/videos/ttvyxm/alpha-dog-of-the-week---president-bush",
"http://thecolbertreport.cc.com/videos/bohex1/monkey-on-the-lam---missouri",
"http://thecolbertreport.cc.com/videos/1scf3a/jim-lovell"
],
"guest": "Jim Lovell"
},
{
"date": "2007-10-04",
"videos": [
"http://thecolbertreport.cc.com/videos/6takag/intro---10-4-07",
"http://thecolbertreport.cc.com/videos/9ie5cp/fred-thompson-s-lackluster-candidacy",
"http://thecolbertreport.cc.com/videos/t9j9vd/the-word---catastrophe",
"http://thecolbertreport.cc.com/videos/ze1fvk/threatdown---science-and-technology-edition",
"http://thecolbertreport.cc.com/videos/i58e8l/john-kao",
"http://thecolbertreport.cc.com/videos/jy5aw2/an--i-am-america--and-so-can-you----success-story"
],
"guest": "John Kao"
},
{
"date": "2007-10-08",
"videos": [
"http://thecolbertreport.cc.com/videos/zjbyqa/intro---10-8-07",
"http://thecolbertreport.cc.com/videos/pw4m4c/doggie-co-author",
"http://thecolbertreport.cc.com/videos/xkdwvy/the-word---medium-matters",
"http://thecolbertreport.cc.com/videos/56gzq7/balls-for-kidz---schip",
"http://thecolbertreport.cc.com/videos/og377e/george-saunders",
"http://thecolbertreport.cc.com/videos/p6057q/sign-off---i-am-america--and-so-can-you---day"
],
"guest": "George Saunders"
},
{
"date": "2007-10-09",
"videos": [
"http://thecolbertreport.cc.com/videos/q3jijk/intro---10-9-07",
"http://thecolbertreport.cc.com/videos/plzp6y/i-am-america-on-sale-now-",
"http://thecolbertreport.cc.com/videos/ubbze1/new-reagan-coin",
"http://thecolbertreport.cc.com/videos/597azm/the-word---mighty-duck",
"http://thecolbertreport.cc.com/videos/1znjlb/obama-s-lapel",
"http://thecolbertreport.cc.com/videos/x1wzb3/the-stephen-colbert-interview",
"http://thecolbertreport.cc.com/videos/r0xdzt/sign-off---lead-free-ink"
],
"guest": "Stephen Colbert"
},
{
"date": "2007-10-10",
"videos": [
"http://thecolbertreport.cc.com/videos/vsm7hv/intro---10-10-07",
"http://thecolbertreport.cc.com/videos/4ht7gm/dead-to-me---pocketmaster",
"http://thecolbertreport.cc.com/videos/79ara8/the-word---americon-dream",
"http://thecolbertreport.cc.com/videos/dzvdm0/tip-wag---bruce-springsteen",
"http://thecolbertreport.cc.com/videos/97z30b/wesley-clark"
],
"guest": "Gen. Wesley Clark"
},
{
"date": "2007-10-11",
"videos": [
"http://thecolbertreport.cc.com/videos/sprkvb/intro---10-11-07",
"http://thecolbertreport.cc.com/videos/a27soa/black-haired-guy-who-isn-t-steve-doocy",
"http://thecolbertreport.cc.com/videos/o6xiyi/frank-gaffney",
"http://thecolbertreport.cc.com/videos/zipx3v/colbert-platinum---kidz-edition",
"http://thecolbertreport.cc.com/videos/zv1po1/chris-jordan"
],
"guest": "Chris Jordan"
},
{
"date": "2007-10-15",
"videos": [
"http://thecolbertreport.cc.com/videos/56sadv/intro---10-15-07",
"http://thecolbertreport.cc.com/videos/9esznw/who-s-honoring-me-now----marie-claire",
"http://thecolbertreport.cc.com/videos/oogvcb/the-word---enviro-medal-disaster",
"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://thecolbertreport.cc.com/videos/6k009y/intro---10-16-07",
"http://thecolbertreport.cc.com/videos/0pl61p/planet-in-peril",
"http://thecolbertreport.cc.com/videos/f97ynd/indecision-2008--don-t-f--k-this-up-america---presidential-bid",
"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://thecolbertreport.cc.com/videos/e6jgx6/intro---10-17-07",
"http://thecolbertreport.cc.com/videos/el4ceo/the-big-news",
"http://thecolbertreport.cc.com/videos/ps9172/hail-to-the-cheese---filing-papers",
"http://thecolbertreport.cc.com/videos/duz61o/threatdown---anniversary",
"http://thecolbertreport.cc.com/videos/dvoers/garry-kasparov",
"http://thecolbertreport.cc.com/videos/e0223g/sign-off---revenge-is-sweet"
],
"guest": "Garry Kasparov"
},
{
"date": "2007-10-18",
"videos": [
"http://thecolbertreport.cc.com/videos/i4a6fg/intro---10-18-07",
"http://thecolbertreport.cc.com/videos/z3kzwl/pumpkin-shortage",
"http://thecolbertreport.cc.com/videos/6o9coa/global-scrunching---anderson-cooper",
"http://thecolbertreport.cc.com/videos/p1wo65/hail-to-the-cheese---campaign-coverage-finance",
"http://thecolbertreport.cc.com/videos/rcmqef/craig-newmark",
"http://thecolbertreport.cc.com/videos/i2rw4t/sign-off---portrait-unveiled"
],
"guest": "Craig Newmark, Anderson Cooper"
},
{
"date": "2007-10-29",
"videos": [
"http://thecolbertreport.cc.com/videos/3xfeo5/intro---10-29-07",
"http://thecolbertreport.cc.com/videos/oqlp6f/the-last-infographic",
"http://thecolbertreport.cc.com/videos/2hfe9b/hail-to-the-cheese---branded-killings",
"http://thecolbertreport.cc.com/videos/wli1tg/the-word---absinthetinence",
"http://thecolbertreport.cc.com/videos/49my1v/tip-wag---sleep-deprivation",
"http://thecolbertreport.cc.com/videos/pmtsjp/richard-berman",
"http://thecolbertreport.cc.com/videos/1yeaa0/sign-off---rocktober"
],
"guest": "Richard Berman"
},
{
"date": "2007-10-30",
"videos": [
"http://thecolbertreport.cc.com/videos/6130g5/intro---10-30-07",
"http://thecolbertreport.cc.com/videos/f3dddn/massie-ritsch",
"http://thecolbertreport.cc.com/videos/rrhz2o/earth-attacks---georgia-drought",
"http://thecolbertreport.cc.com/videos/czdur4/j--craig-venter"
],
"guest": "Massie Ritsch, Craig Venter"
},
{
"date": "2007-10-31",
"videos": [
"http://thecolbertreport.cc.com/videos/fjrl1d/intro---10-31-07",
"http://thecolbertreport.cc.com/videos/iwuly8/hallo-weening",
"http://thecolbertreport.cc.com/videos/lshob0/democra-see--democra-do---elections",
"http://thecolbertreport.cc.com/videos/pcplr6/the-word---job-description",
"http://thecolbertreport.cc.com/videos/hpr411/obama-s-grit-off-challenge",
"http://thecolbertreport.cc.com/videos/s7cadq/monkey-on-the-lam---lobster-edition",
"http://thecolbertreport.cc.com/videos/4uxxf3/lawrence-wilkerson"
],
"guest": "Col. Lawrence Wilkerson"
},
{
"date": "2007-11-01",
"videos": [
"http://thecolbertreport.cc.com/videos/we8h5v/intro---11-1-07",
"http://thecolbertreport.cc.com/videos/dzscg7/hail-to-the-cheese---ballot-issues",
"http://thecolbertreport.cc.com/videos/9d4e78/hail-to-the-cheese---democratic-executive-council",
"http://thecolbertreport.cc.com/videos/tcxqui/walter-kirn",
"http://thecolbertreport.cc.com/videos/zymn63/hail-to-the-cheese---donors-choose"
],
"guest": "Walter Kirn"
}
],
"2008": [
{
"date": "2008-01-07",
"videos": [
"http://thecolbertreport.cc.com/videos/3q3gby/intro---1-7-08",
"http://thecolbertreport.cc.com/videos/cva2to/applause",
"http://thecolbertreport.cc.com/videos/mdmdd0/nothing-in-the-prompters",
"http://thecolbertreport.cc.com/videos/lp7qsd/2008-election",
"http://thecolbertreport.cc.com/videos/ku5oni/the-word--------",
"http://thecolbertreport.cc.com/videos/mbip8q/democratic-change---andrew-sullivan",
"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/bush-absolutely-optimistic",
"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/new-hampshire-wrap-up",
"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/un-american-news---primaries",
"http://thecolbertreport.cc.com/videos/s269t4/norman-ornstein",
"http://thecolbertreport.cc.com/videos/y7lisr/national-treasure-pt--1",
"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/papa-bear-takes-note",
"http://thecolbertreport.cc.com/videos/1vwzy6/around-the-world-in-11-6-seconds---lo-mein",
"http://thecolbertreport.cc.com/videos/7k6fkq/indecision-2008--don-t-f--k-this-up-america---trustworthy-manner",
"http://thecolbertreport.cc.com/videos/dytre7/national-treasure-pt--2",
"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/who-s-riding-my-coattails-now----vince-vaughn",
"http://thecolbertreport.cc.com/videos/hrzpve/peter-hopkins",
"http://thecolbertreport.cc.com/videos/1m3t4h/national-treasure-pt--3",
"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/political-roulette-pt--1",
"http://thecolbertreport.cc.com/videos/v0glj4/back-off-mike-huckabee",
"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/political-roulette-pt--2",
"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/better-know-a-governor---mark-sanford",
"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/sport-report---tom-brady-s-injury",
"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/south-carolina-debate",
"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/gordon-b--hinckley-died",
"http://thecolbertreport.cc.com/videos/07hrs5/marjane-satrapi",
"http://thecolbertreport.cc.com/videos/wrdlsf/south-carolina---what-could-have-been-",
"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/exclusive---better-know-a-district---south-carolina-s-4th---bob-inglis",
"http://thecolbertreport.cc.com/videos/t6sflk/florida-primary",
"http://thecolbertreport.cc.com/videos/vb4t2x/carl-hiaasen",
"http://thecolbertreport.cc.com/videos/n87g1n/better-know-a-district---south-carolina-s-4th---bob-inglis",
"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/ron-paul-sounds-alarm",
"http://thecolbertreport.cc.com/videos/2lwxda/tim-harford",
"http://thecolbertreport.cc.com/videos/0d4uq9/people-who-are-destroying-america---pick-up-trucks",
"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/post-show-ass-kicking"
],
"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/clap-clap-point-point",
"http://thecolbertreport.cc.com/videos/yxx0w5/richard-brookhiser",
"http://thecolbertreport.cc.com/videos/ammxmv/better-know-a-lobby---human-rights-campaign-pt--1",
"http://thecolbertreport.cc.com/videos/nhkpwj/tad-devine"
],
"guest": "Tad Devine"
},
{
"date": "2008-02-07",
"videos": [
"http://thecolbertreport.cc.com/videos/ctzo98/stephen-s-ethnic-minute",
"http://thecolbertreport.cc.com/videos/v43el0/huckabee-s-still-in",
"http://thecolbertreport.cc.com/videos/negp2q/better-know-a-lobby---human-rights-campaign-pt--2",
"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/huckabee-s-obligation",
"http://thecolbertreport.cc.com/videos/6g98j7/eliot-spitzer",
"http://thecolbertreport.cc.com/videos/udbv19/eleanor-holmes-norton",
"http://thecolbertreport.cc.com/videos/ekpicq/lisa-randall"
],
"guest": "Gov. Eliot Spitzer, Eleanor Holmes Norton, Lisa Randall"
},
{
"date": "2008-02-13",
"videos": [
"http://thecolbertreport.cc.com/videos/r9rjo5/intro---2-13-08",
"http://thecolbertreport.cc.com/videos/mvp1nc/the-writers-return-",
"http://thecolbertreport.cc.com/videos/n3dwin/david-gracer",
"http://thecolbertreport.cc.com/videos/aebxex/neil-de-grasse-tyson",
"http://thecolbertreport.cc.com/videos/n39iqt/richard-thompson-ford"
],
"guest": "David Gracer, Richard Thompson Ford"
},
{
"date": "2008-02-14",
"videos": [
"http://thecolbertreport.cc.com/videos/5hf18t/intro---2-14-08",
"http://thecolbertreport.cc.com/videos/qg63hg/who-s-riding-my-coattails-now----oliver-pocher",
"http://thecolbertreport.cc.com/videos/slbgcr/clemens-hearing",
"http://thecolbertreport.cc.com/videos/0i3hg8/john-feinstein",
"http://thecolbertreport.cc.com/videos/dmxs6z/people-who-are-destroying-america---happy-meal",
"http://thecolbertreport.cc.com/videos/hxt6mo/leonard-nimoy"
],
"guest": "John Feinstein, Leonard Nimoy"
},
{
"date": "2008-02-26",
"videos": [
"http://thecolbertreport.cc.com/videos/t6xzxc/intro---2-26-08",
"http://thecolbertreport.cc.com/videos/cexk3g/obama-s-photo",
"http://thecolbertreport.cc.com/videos/x6h69l/the-word---good-bad-journalism",
"http://thecolbertreport.cc.com/videos/4s0owa/henry-louis-gates-jr-"
],
"guest": "Henry Louis Gates Jr."
},
{
"date": "2008-02-27",
"videos": [
"http://thecolbertreport.cc.com/videos/3uzan2/exclusive---guitar-heroes",
"http://thecolbertreport.cc.com/videos/spigs3/intro---2-27-08",
"http://thecolbertreport.cc.com/videos/fb142a/mccain-rally",
"http://thecolbertreport.cc.com/videos/717g03/threatdown---air-colbert",
"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://thecolbertreport.cc.com/videos/80mnx9/intro---2-28-08",
"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/sign-off---shoe-phone"
],
"guest": "Richard Brookhiser, Ingrid Newkirk"
},
{
"date": "2008-03-03",
"videos": [
"http://thecolbertreport.cc.com/videos/laopsy/intro---3-3-08",
"http://thecolbertreport.cc.com/videos/1gyoec/the-coveted-colbert-bump",
"http://thecolbertreport.cc.com/videos/do24ht/das-booty---hitler-s-gold-pt--1",
"http://thecolbertreport.cc.com/videos/dvfqt3/maestro-lorin-maazel",
"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://thecolbertreport.cc.com/videos/1d4djp/intro---3-4-08",
"http://thecolbertreport.cc.com/videos/509s01/william-donohue",
"http://thecolbertreport.cc.com/videos/myyov6/howard-dean",
"http://thecolbertreport.cc.com/videos/wvt9ny/nailed--em---graffiti-punk",
"http://thecolbertreport.cc.com/videos/86yukf/jennifer-8--lee",
"http://thecolbertreport.cc.com/videos/10okbb/to-howard-dean",
"http://thecolbertreport.cc.com/videos/q08fbb/the-word---experience"
],
"guest": "William Donohue, Howard Dean, Jennifer 8. Lee"
},
{
"date": "2008-03-05",
"videos": [
"http://thecolbertreport.cc.com/videos/9o2e4d/intro---3-5-08",
"http://thecolbertreport.cc.com/videos/d60bre/farewell-brett-favre",
"http://thecolbertreport.cc.com/videos/q038rv/hucka-bye",
"http://thecolbertreport.cc.com/videos/6296yb/robert-reich",
"http://thecolbertreport.cc.com/videos/lrlzri/difference-makers---free-implants",
"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://thecolbertreport.cc.com/videos/zoimd4/intro---3-6-08",
"http://thecolbertreport.cc.com/videos/m9ob1y/hot-dog-with-the-president",
"http://thecolbertreport.cc.com/videos/i9idne/the-word---at---treason",
"http://thecolbertreport.cc.com/videos/0ih0ea/cheating-death---surgery",
"http://thecolbertreport.cc.com/videos/cv6bwa/john-legend"
],
"guest": "John Legend"
},
{
"date": "2008-03-10",
"videos": [
"http://thecolbertreport.cc.com/videos/mahtb2/intro---3-10-08",
"http://thecolbertreport.cc.com/videos/3a9bum/whores-",
"http://thecolbertreport.cc.com/videos/8p3t8b/the-word---size-matters",
"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://thecolbertreport.cc.com/videos/3ybl08/intro---3-11-08",
"http://thecolbertreport.cc.com/videos/me89dy/spitzer-greeting-cards",
"http://thecolbertreport.cc.com/videos/twuo43/the-word---mr--right-now",
"http://thecolbertreport.cc.com/videos/f7ltv5/colbert-platinum---liechtenstein",
"http://thecolbertreport.cc.com/videos/gcwzrr/geraldo-rivera",
"http://thecolbertreport.cc.com/videos/8h6jvx/sign-off---show-s-over--america"
],
"guest": "Geraldo Rivera"
},
{
"date": "2008-03-12",
"videos": [
"http://thecolbertreport.cc.com/videos/tvzv05/intro---3-12-08",
"http://thecolbertreport.cc.com/videos/ntzxtt/spitzer-sandwich",
"http://thecolbertreport.cc.com/videos/ippftn/smokin--pole---alaska",
"http://thecolbertreport.cc.com/videos/50a47x/better-know-a-lobby---drug-policy-alliance",
"http://thecolbertreport.cc.com/videos/nouiem/howard-kurtz"
],
"guest": "Howard Kurtz"
},
{
"date": "2008-03-13",
"videos": [
"http://thecolbertreport.cc.com/videos/gpd5cu/intro---3-13-08",
"http://thecolbertreport.cc.com/videos/k8bsjv/airborne-lawsuit",
"http://thecolbertreport.cc.com/videos/d51tqz/democralypse-now---ferraro",
"http://thecolbertreport.cc.com/videos/tvjvip/hussein-ibish",
"http://thecolbertreport.cc.com/videos/oe7yd2/difference-makers---doug-jackson",
"http://thecolbertreport.cc.com/videos/mzut29/sudhir-venkatesh"
],
"guest": "Hussein Ibish, Sudhir Venkatesh"
},
{
"date": "2008-03-17",
"videos": [
"http://thecolbertreport.cc.com/videos/ck2j7u/exclusive---spitzer",
"http://thecolbertreport.cc.com/videos/8zfc9q/intro---3-17-08",
"http://thecolbertreport.cc.com/videos/v28dea/stephen-in-philly",
"http://thecolbertreport.cc.com/videos/rxdrv8/the-word---the-audacity-of-hopelessness",
"http://thecolbertreport.cc.com/videos/tw4jo4/people-who-are-destroying-america---st--patrick-s-day",
"http://thecolbertreport.cc.com/videos/5j8sg4/samantha-power"
],
"guest": "Samantha Power"
},
{
"date": "2008-03-18",
"videos": [
"http://thecolbertreport.cc.com/videos/vgwiie/intro---3-18-08",
"http://thecolbertreport.cc.com/videos/wsz08m/yes-we-can-",
"http://thecolbertreport.cc.com/videos/xtwx8p/spicy-sweet-coverage",
"http://thecolbertreport.cc.com/videos/mogf73/das-booty---hitler-s-gold-pt--2",
"http://thecolbertreport.cc.com/videos/5boih5/carole-king"
],
"guest": "Carole King"
},
{
"date": "2008-03-19",
"videos": [
"http://thecolbertreport.cc.com/videos/hcafrk/intro---3-19-08",
"http://thecolbertreport.cc.com/videos/hrjm1z/patterson-affair",
"http://thecolbertreport.cc.com/videos/scqdwy/the-word---the-gospel-of-john",
"http://thecolbertreport.cc.com/videos/y6aybj/pennsylvania-primary",
"http://thecolbertreport.cc.com/videos/037ygf/tip-wag---afghanistan",
"http://thecolbertreport.cc.com/videos/vk922m/dee-dee-myers"
],
"guest": "Dee Dee Myers"
},
{
"date": "2008-03-20",
"videos": [
"http://thecolbertreport.cc.com/videos/vq76dq/watershift-down--getting-the-sea-monkey-off-america-s-aqua-back",
"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/setting-water-on-fire"
],
"guest": "Dean Kamen"
},
{
"date": "2008-03-31",
"videos": [
"http://thecolbertreport.cc.com/videos/f3rbbv/intro---3-31-08",
"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/tek-jansen---beginning-s-first-dawn--episode-one-revisited",
"http://thecolbertreport.cc.com/videos/3p6caw/michael-reynolds"
],
"guest": "Eric Alterman, Michael Reynolds"
},
{
"date": "2008-04-01",
"videos": [
"http://thecolbertreport.cc.com/videos/ayieu5/intro---4-1-08",
"http://thecolbertreport.cc.com/videos/irlo9m/portrait-update",
"http://thecolbertreport.cc.com/videos/inwuqm/the-word---pick-sicks",
"http://thecolbertreport.cc.com/videos/fpyy9k/bears---balls---rat-rakes",
"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://thecolbertreport.cc.com/videos/46s8py/intro---4-2-08",
"http://thecolbertreport.cc.com/videos/sbidx5/stephen-wins-a-peabody",
"http://thecolbertreport.cc.com/videos/3fc86e/threatdown---nipples",
"http://thecolbertreport.cc.com/videos/n3f5qh/r-e-m-"
],
"guest": "R.E.M."
},
{
"date": "2008-04-03",
"videos": [
"http://thecolbertreport.cc.com/videos/aj43z8/intro---4-3-08",
"http://thecolbertreport.cc.com/videos/tyapiy/peabody-credit",
"http://thecolbertreport.cc.com/videos/xwlefp/the-word---let-the-games-begin",
"http://thecolbertreport.cc.com/videos/gx1oov/tek-jansen---beginning-s-first-dawn--episode-two",
"http://thecolbertreport.cc.com/videos/dm9a7h/clay-shirky",
"http://thecolbertreport.cc.com/videos/jsqez9/tek-jansen---you-are-the-best"
],
"guest": "Clay Shirky"
},
{
"date": "2008-04-07",
"videos": [
"http://thecolbertreport.cc.com/videos/7lye0f/intro---4-7-08",
"http://thecolbertreport.cc.com/videos/we6e20/r-i-p--charlton-heston",
"http://thecolbertreport.cc.com/videos/xh2gv1/trevor-paglen",
"http://thecolbertreport.cc.com/videos/3xlgs3/democralypse-now---3am",
"http://thecolbertreport.cc.com/videos/82gipv/jesse-ventura"
],
"guest": "Trevor Paglen, Jesse Ventura"
},
{
"date": "2008-04-08",
"videos": [
"http://thecolbertreport.cc.com/videos/54jfl6/intro---4-8-08",
"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/wilford-brimley-calls---donation",
"http://thecolbertreport.cc.com/videos/elawer/madeleine-albright"
],
"guest": "Madeleine Albright"
},
{
"date": "2008-04-09",
"videos": [
"http://thecolbertreport.cc.com/videos/bdme3x/intro---4-9-08",
"http://thecolbertreport.cc.com/videos/iekisu/olympic-torch",
"http://thecolbertreport.cc.com/videos/ypse7c/the-word---starter-country",
"http://thecolbertreport.cc.com/videos/jycq7p/cheating-death---sexual-health",
"http://thecolbertreport.cc.com/videos/nlvpn4/jeff-gore"
],
"guest": "Jeff Gore"
},
{
"date": "2008-04-10",
"videos": [
"http://thecolbertreport.cc.com/videos/zsmonm/intro---4-10-08",
"http://thecolbertreport.cc.com/videos/6sdfwa/petraeus-hearings",
"http://thecolbertreport.cc.com/videos/x8pxwi/more-drawings-from-kids",
"http://thecolbertreport.cc.com/videos/z2z65o/the-word---black-and-white",
"http://thecolbertreport.cc.com/videos/v1k50e/tip-wag---rain",
"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/pennsylvania-primary-history",
"http://thecolbertreport.cc.com/videos/1b60fj/chris-matthews"
],
"guest": "Chris Matthews"
},
{
"date": "2008-04-15",
"videos": [
"http://thecolbertreport.cc.com/videos/oj9blc/intro---4-15-08",
"http://thecolbertreport.cc.com/videos/3aqwqx/nice-roomba",
"http://thecolbertreport.cc.com/videos/ad5qga/the-word---tradition",
"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://thecolbertreport.cc.com/videos/h0lfw9/intro---4-16-08",
"http://thecolbertreport.cc.com/videos/pi51oz/jackie-o--amendment",
"http://thecolbertreport.cc.com/videos/9z3000/democralypse-now---the-boss",
"http://thecolbertreport.cc.com/videos/9zm7cy/national-constitution-center",
"http://thecolbertreport.cc.com/videos/51r39w/ed-rendell",
"http://thecolbertreport.cc.com/videos/1bzrgk/benjamin-franklin-s-news"
],
"guest": "Philadelphia Eagles Cheerleaders, Gov. Ed Rendell"
},
{
"date": "2008-04-17",
"videos": [
"http://thecolbertreport.cc.com/videos/ky7oxg/benjamin-franklin-s-latest-invention",
"http://thecolbertreport.cc.com/videos/uzusr0/hillary-clinton-takes-on-technical-difficulties",
"http://thecolbertreport.cc.com/videos/1i62sd/clinton-vs--obama-philadelphia-debate-review",
"http://thecolbertreport.cc.com/videos/ew5t9y/patrick-murphy",
"http://thecolbertreport.cc.com/videos/x3zme5/the-ed-words---valued-voter",
"http://thecolbertreport.cc.com/videos/ol0nn3/on-notice---barack-obama-against-distractions"
],
"guest": "Hillary Clinton, John Edwards, Barack Obama"
},
{
"date": "2008-04-21",
"videos": [
"http://thecolbertreport.cc.com/videos/i6ihlp/intro---4-21-08",
"http://thecolbertreport.cc.com/videos/foffke/philly-loves-colbert-nation",
"http://thecolbertreport.cc.com/videos/5jm58y/global-food-shortage",
"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://thecolbertreport.cc.com/videos/ah79bq/intro---4-22-08",
"http://thecolbertreport.cc.com/videos/tp640v/earth-is-awesome",
"http://thecolbertreport.cc.com/videos/uyxyc7/obama-copycattery",
"http://thecolbertreport.cc.com/videos/a2ha6c/indecision-cheesesteaks",
"http://thecolbertreport.cc.com/videos/0nsiap/better-know-a-district---pennsylvania-s-7th---joe-sestak",
"http://thecolbertreport.cc.com/videos/5427ng/susan-jacoby",
"http://thecolbertreport.cc.com/videos/l34czb/exclusive---better-know-a-district---pennsylvania-s-7th---joe-sestak"
],
"guest": "Susan Jacoby"
},
{
"date": "2008-04-23",
"videos": [
"http://thecolbertreport.cc.com/videos/lxpsri/intro---4-23-08",
"http://thecolbertreport.cc.com/videos/6wperh/rain-rivalry-challenge",
"http://thecolbertreport.cc.com/videos/hpr26d/the-word---iraq-the-vote",
"http://thecolbertreport.cc.com/videos/fqo64s/colbert-platinum---cat-pooped-coffee",
"http://thecolbertreport.cc.com/videos/5azl7m/mitch-albom",
"http://thecolbertreport.cc.com/videos/qdf6zq/the-lost-o-reilly-tapes-pt--1"
],
"guest": "Mitch Albom"
},
{
"date": "2008-04-24",
"videos": [
"http://thecolbertreport.cc.com/videos/6kux9r/intro---4-24-08",
"http://thecolbertreport.cc.com/videos/a1qle2/petraeus--promotion",
"http://thecolbertreport.cc.com/videos/uddwea/threatdown---juicing-bulls",
"http://thecolbertreport.cc.com/videos/e3l9yt/difference-makers---bumbot",
"http://thecolbertreport.cc.com/videos/lr9uai/maria-shriver"
],
"guest": "Maria Shriver"
},
{
"date": "2008-04-28",
"videos": [
"http://thecolbertreport.cc.com/videos/3fwic4/intro---4-28-08",
"http://thecolbertreport.cc.com/videos/244o0l/miley-cyrus-photo-shoot",
"http://thecolbertreport.cc.com/videos/9v4qwg/electability",
"http://thecolbertreport.cc.com/videos/ejbmnx/the-word---kernel-of-truth",
"http://thecolbertreport.cc.com/videos/3osshb/sport-report---timbersports",
"http://thecolbertreport.cc.com/videos/222rjo/feist"
],
"guest": "Feist"
},
{
"date": "2008-04-29",
"videos": [
"http://thecolbertreport.cc.com/videos/a1muh6/intro---4-29-08",
"http://thecolbertreport.cc.com/videos/vc3sa7/obama-breaks-with-wright",
"http://thecolbertreport.cc.com/videos/uk74h6/mccain-s-superstitions",
"http://thecolbertreport.cc.com/videos/ry65tk/the-word---separation-of-church---plate",
"http://thecolbertreport.cc.com/videos/cy9dmw/tip-wag---barbie",
"http://thecolbertreport.cc.com/videos/s3buaq/anne-lamott"
],
"guest": "Anne Lamott"
},
{
"date": "2008-04-30",
"videos": [
"http://thecolbertreport.cc.com/videos/byoxj1/intro---4-30-08",
"http://thecolbertreport.cc.com/videos/xju86c/salinger-watch",
"http://thecolbertreport.cc.com/videos/1rdkem/donna-brazile-on-the-democratic-campaign",
"http://thecolbertreport.cc.com/videos/4ngs9u/better-know-a-protectorate---guam---madeleine-bordallo-update",
"http://thecolbertreport.cc.com/videos/vjk2cd/noah-feldman"
],
"guest": "Donna Brazile, Noah Feldman"
},
{
"date": "2008-05-01",
"videos": [
"http://thecolbertreport.cc.com/videos/1zd3gn/intro---5-01-08",
"http://thecolbertreport.cc.com/videos/clfbo3/jenna-bush-wedding",
"http://thecolbertreport.cc.com/videos/sctmlw/trailers-destroying-america---summer-movie-edition",
"http://thecolbertreport.cc.com/videos/aka0f3/formidable-opponent---electability",
"http://thecolbertreport.cc.com/videos/zck6ux/james-howard-kunstler"
],
"guest": "James Kunstler"
},
{
"date": "2008-05-05",
"videos": [
"http://thecolbertreport.cc.com/videos/nhsr7z/intro---5-05-08",
"http://thecolbertreport.cc.com/videos/wtbn4l/time-s-2008-top-100-most-influential",
"http://thecolbertreport.cc.com/videos/x20ttg/the-word---free-gas-",
"http://thecolbertreport.cc.com/videos/oov14y/speed-racer",
"http://thecolbertreport.cc.com/videos/91hddq/alpha-dog-of-the-week---911-operator",
"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://thecolbertreport.cc.com/videos/e38w0k/intro---5-06-08",
"http://thecolbertreport.cc.com/videos/e3fb1q/sexy-voice-study",
"http://thecolbertreport.cc.com/videos/qy6hoq/the-word---collateral-friendage",
"http://thecolbertreport.cc.com/videos/byyq8n/stephen-s-sound-advice---karl-s-advice",
"http://thecolbertreport.cc.com/videos/y777b4/nathan-gunn"
],
"guest": "Nathan Gunn"
},
{
"date": "2008-05-07",
"videos": [
"http://thecolbertreport.cc.com/videos/fk83lx/intro---5-07-08",
"http://thecolbertreport.cc.com/videos/20qjta/stephen-colbert-s-shockettes",
"http://thecolbertreport.cc.com/videos/su4v1v/terrorist-nelson-mandela",
"http://thecolbertreport.cc.com/videos/07p71k/hasan-elahi",
"http://thecolbertreport.cc.com/videos/bc4u9e/democralypse-now---justin-myers",
"http://thecolbertreport.cc.com/videos/av0o9p/george-johnson"
],
"guest": "Hasan Elahi, George Johnson"
},
{
"date": "2008-05-08",
"videos": [
"http://thecolbertreport.cc.com/videos/ey98z2/exclusive---stephen-vs--rain",
"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/r-i-p--albert-hoffman"
],
"guest": "Arianna Huffington"
},
{
"date": "2008-05-12",
"videos": [
"http://thecolbertreport.cc.com/videos/da4u0g/intro---5-12-08",
"http://thecolbertreport.cc.com/videos/tj7sih/big-russ",
"http://thecolbertreport.cc.com/videos/kdeptj/cold-war-update---russia",
"http://thecolbertreport.cc.com/videos/k7k3ke/threatdown---cute-bears",
"http://thecolbertreport.cc.com/videos/3i279j/dr--mehmet-oz"
],
"guest": "Dr. Mehmet Oz"
},
{
"date": "2008-05-13",
"videos": [
"http://thecolbertreport.cc.com/videos/oycul0/exclusive---better-know-a-lobby---brady-campaign-to-prevent-gun-violence",
"http://thecolbertreport.cc.com/videos/1siped/intro---5-13-08",
"http://thecolbertreport.cc.com/videos/mpq03a/hillary-drop-out",
"http://thecolbertreport.cc.com/videos/qxr59r/bill-o-reilly-inside-edition",
"http://thecolbertreport.cc.com/videos/np2mes/better-know-a-lobby---brady-campaign-to-prevent-gun-violence",
"http://thecolbertreport.cc.com/videos/24b8xh/jennifer-hooper-mccarty"
],
"guest": "Jennifer Hooper McCarty"
},
{
"date": "2008-05-14",
"videos": [
"http://thecolbertreport.cc.com/videos/suewpq/intro---5-14-08",
"http://thecolbertreport.cc.com/videos/fygt2g/edwards-supports-obama",
"http://thecolbertreport.cc.com/videos/ry9ff3/who-s-not-honoring-me-now----science",
"http://thecolbertreport.cc.com/videos/xnkjrq/the-word---declaration-of-warming",
"http://thecolbertreport.cc.com/videos/gxghyw/laura-dern",
"http://thecolbertreport.cc.com/videos/4tldfc/grover-norquist",
"http://thecolbertreport.cc.com/videos/zujfq0/the-show-comes-to-an-end"
],
"guest": "Laura Dern, Grover Norquist"
},
{
"date": "2008-05-15",
"videos": [
"http://thecolbertreport.cc.com/videos/nkmoxa/intro---5-15-08",
"http://thecolbertreport.cc.com/videos/ekfqs4/american-craft-beer-week",
"http://thecolbertreport.cc.com/videos/wy0c00/edwards-endorses-obama",
"http://thecolbertreport.cc.com/videos/scm34l/the-word---jail-sweet-jail",
"http://thecolbertreport.cc.com/videos/ak0o7t/bears---balls---dollar-stores",
"http://thecolbertreport.cc.com/videos/rarvxz/andrei-cherny"
],
"guest": "Andrei Cherny"
},
{
"date": "2008-05-27",
"videos": [
"http://thecolbertreport.cc.com/videos/v79z0o/intro---5-27-08",
"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://thecolbertreport.cc.com/videos/tuxwuw/intro---5-28-08",
"http://thecolbertreport.cc.com/videos/euhkkf/microbe-beat-",
"http://thecolbertreport.cc.com/videos/z1nl4c/the-word---brushback-pitch",
"http://thecolbertreport.cc.com/videos/jhmlmk/cheating-death---liquid-launch",
"http://thecolbertreport.cc.com/videos/ngaz1d/claire-mccaskill"
],
"guest": "Sen. Claire McCaskill"
},
{
"date": "2008-05-29",
"videos": [
"http://thecolbertreport.cc.com/videos/6wfa6q/intro---5-29-08",
"http://thecolbertreport.cc.com/videos/79u1cf/shout-out----broken-space-toilet",
"http://thecolbertreport.cc.com/videos/6735i1/democralypse-now---florida-and-michigan",
"http://thecolbertreport.cc.com/videos/ug78n1/tad-devine",
"http://thecolbertreport.cc.com/videos/lhma93/tip-wag---monetary-discrimination",
"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://thecolbertreport.cc.com/videos/hrlfp0/intro---6-02-08",
"http://thecolbertreport.cc.com/videos/dvmsby/obama-s-church",
"http://thecolbertreport.cc.com/videos/38jpc2/fire-at-universal",
"http://thecolbertreport.cc.com/videos/jlvsj6/the-word---media-culpa",
"http://thecolbertreport.cc.com/videos/8cygn0/colbert-platinum---private-jets",
"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://thecolbertreport.cc.com/videos/4vr7xb/intro---6-03-08",
"http://thecolbertreport.cc.com/videos/o005k6/democratic-primaries-over",
"http://thecolbertreport.cc.com/videos/viwun3/the-word---unhealthy-competition",
"http://thecolbertreport.cc.com/videos/po30h9/stephen-s-sound-advice---summer-jobs",
"http://thecolbertreport.cc.com/videos/xhigi4/george-will"
],
"guest": "George Will"
},
{
"date": "2008-06-04",
"videos": [
"http://thecolbertreport.cc.com/videos/0w2khv/intro---6-04-08",
"http://thecolbertreport.cc.com/videos/hfq15q/john-mccain-s-green-screen-challenge",
"http://thecolbertreport.cc.com/videos/wsbc0i/libertarian-party---bob-barr",
"http://thecolbertreport.cc.com/videos/sn90ui/salman-rushdie",
"http://thecolbertreport.cc.com/videos/uji4o5/the-lost-o-reilly-tapes-pt--2"
],
"guest": "Rep. Bob Barr, Salman Rushdie"
},
{
"date": "2008-06-05",
"videos": [
"http://thecolbertreport.cc.com/videos/yv02dd/intro---6-05-08",
"http://thecolbertreport.cc.com/videos/n90wjr/the-andromeda-strain",
"http://thecolbertreport.cc.com/videos/ugt12v/the-word---oh--the-places-you-ll-stay",
"http://thecolbertreport.cc.com/videos/6nrkel/sport-report---mike-forrester",
"http://thecolbertreport.cc.com/videos/ibt0j9/pat-buchanan"
],
"guest": "Pat Buchanan"
},
{
"date": "2008-06-09",
"videos": [
"http://thecolbertreport.cc.com/videos/qowh4f/intro---6-09-08",
"http://thecolbertreport.cc.com/videos/icuy8o/democralypse-now---hillary-concedes",
"http://thecolbertreport.cc.com/videos/numnri/the-word---if-at-first-you-don-t-secede",
"http://thecolbertreport.cc.com/videos/vlab0d/threatdown---secret-negro-presidents",
"http://thecolbertreport.cc.com/videos/gv27al/philip-weiss"
],
"guest": "Phil Weiss"
},
{
"date": "2008-06-10",
"videos": [
"http://thecolbertreport.cc.com/videos/705tqw/intro---6-10-08",
"http://thecolbertreport.cc.com/videos/cbjixz/new-giant-iphone",
"http://thecolbertreport.cc.com/videos/w5you4/tickling-the-rocks",
"http://thecolbertreport.cc.com/videos/skw5sl/the-elitist-menace-among-us",
"http://thecolbertreport.cc.com/videos/qhpj5f/smokin--pole---canada-s-hockey-theme",
"http://thecolbertreport.cc.com/videos/9bdggo/alan-rabinowitz"
],
"guest": "Alan Rabinowitz"
},
{
"date": "2008-06-11",
"videos": [
"http://thecolbertreport.cc.com/videos/373j1n/intro---6-11-08",
"http://thecolbertreport.cc.com/videos/gbgmuk/israel-s-new-bird",
"http://thecolbertreport.cc.com/videos/twddgu/the-word---u-s--airweighs",
"http://thecolbertreport.cc.com/videos/pp8c40/un-american-news---u-s--election-edition",
"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://thecolbertreport.cc.com/videos/mpfrre/intro---6-12-08",
"http://thecolbertreport.cc.com/videos/nsgvgc/stephen-colbert-s-make-mccain-exciting-challenge-",
"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://thecolbertreport.cc.com/videos/vnwwom/intro---6-16-08",
"http://thecolbertreport.cc.com/videos/6vk2ye/tim-russert-tribute",
"http://thecolbertreport.cc.com/videos/mpqoje/the-word---ploy-cott",
"http://thecolbertreport.cc.com/videos/cqvvlk/the-enemy-within---wizard-teachers",
"http://thecolbertreport.cc.com/videos/8xg385/kenneth-miller"
],
"guest": "Kenneth R. Miller"
},
{
"date": "2008-06-17",
"videos": [
"http://thecolbertreport.cc.com/videos/jfofbj/intro---6-17-08",
"http://thecolbertreport.cc.com/videos/kwlu8o/peabody-award",
"http://thecolbertreport.cc.com/videos/tapfcu/neal-katyal",
"http://thecolbertreport.cc.com/videos/fuhy6f/sport-report---timbersports-championship",
"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://thecolbertreport.cc.com/videos/b2ddmd/intro---6-18-08",
"http://thecolbertreport.cc.com/videos/prx5o1/the-new-smurfs-movie",
"http://thecolbertreport.cc.com/videos/ciovvr/the-word---lexicon-artist",
"http://thecolbertreport.cc.com/videos/vtx5qc/barack-obama-s-church-search---dr--uma-mysorekar",
"http://thecolbertreport.cc.com/videos/ir7gne/junot-diaz"
],
"guest": "Dr. Uma Mysorekar, Junot Diaz"
},
{
"date": "2008-06-19",
"videos": [
"http://thecolbertreport.cc.com/videos/d6b6nb/intro---6-19-08",
"http://thecolbertreport.cc.com/videos/6sj17e/shout-out---peabody-awards",
"http://thecolbertreport.cc.com/videos/mr1053/sean-hannity-loves-america",
"http://thecolbertreport.cc.com/videos/zcd35g/cookie-monster",
"http://thecolbertreport.cc.com/videos/aytt4h/make-mccain-exciting-challenge---the-secret-of-mccain-s-brain",
"http://thecolbertreport.cc.com/videos/m7daav/bishop-n-t--wright",
"http://thecolbertreport.cc.com/videos/der3el/stephen-s-missing-peabody"
],
"guest": "Bishop N.T. Wright"
},
{
"date": "2008-06-23",
"videos": [
"http://thecolbertreport.cc.com/videos/ua8qbe/intro---6-23-08",
"http://thecolbertreport.cc.com/videos/a4nt5i/wriststrong-anniversary",
"http://thecolbertreport.cc.com/videos/kj72hq/the-word---black-and-white",
"http://thecolbertreport.cc.com/videos/vlidof/tip-wag---barack-obama",
"http://thecolbertreport.cc.com/videos/ymze92/barbara-ehrenreich",
"http://thecolbertreport.cc.com/videos/1f40by/sign-off---time-for-stephen-to-watch"
],
"guest": "Barbara Ehrenreich"
},
{
"date": "2008-06-24",
"videos": [
"http://thecolbertreport.cc.com/videos/mhd7wr/intro---6-24-08",
"http://thecolbertreport.cc.com/videos/n11h6w/hollywood-face-violence",
"http://thecolbertreport.cc.com/videos/ov4362/oil-crisis",
"http://thecolbertreport.cc.com/videos/hxtoyj/the-word---bleep",
"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://thecolbertreport.cc.com/videos/mdtg3q/intro---6-25-08",
"http://thecolbertreport.cc.com/videos/q0qc77/paul-goldberger",
"http://thecolbertreport.cc.com/videos/ajsxzq/judge--jury---executioner---whales",
"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://thecolbertreport.cc.com/videos/gvc60t/intro---6-26-08",
"http://thecolbertreport.cc.com/videos/038ej3/stephen-and-sweetness",
"http://thecolbertreport.cc.com/videos/txteih/the-tank-is-half-full---criminals",
"http://thecolbertreport.cc.com/videos/hdan1z/difference-makers---steve-pelkey",
"http://thecolbertreport.cc.com/videos/6vucxh/robert-wexler",
"http://thecolbertreport.cc.com/videos/s7cul5/stephen-packs-for-his-trip"
],
"guest": "Rep. Robert Wexler"
},
{
"date": "2008-07-14",
"videos": [
"http://thecolbertreport.cc.com/videos/a4vl00/intro---7-14-08",
"http://thecolbertreport.cc.com/videos/t1ic5h/belgians-buy-budweiser",
"http://thecolbertreport.cc.com/videos/e8zxmm/the-word---priceless",
"http://thecolbertreport.cc.com/videos/6fnysv/barack-obama-s-church-search---lama-surya-das",
"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://thecolbertreport.cc.com/videos/btd58c/intro---7-15-08",
"http://thecolbertreport.cc.com/videos/iojfbw/the-new-yorker-cover",
"http://thecolbertreport.cc.com/videos/4r3fs4/julia-e--sweig",
"http://thecolbertreport.cc.com/videos/slbivd/difference-makers---donald-trump",
"http://thecolbertreport.cc.com/videos/w3v1ei/jason-riley"
],
"guest": "Julia E. Sweig, Jason Riley"
},
{
"date": "2008-07-16",
"videos": [
"http://thecolbertreport.cc.com/videos/apzepe/intro---7-16-08",
"http://thecolbertreport.cc.com/videos/nxgrjc/rush-is-here",
"http://thecolbertreport.cc.com/videos/u9v0kj/the-word---placebo",
"http://thecolbertreport.cc.com/videos/r6ylvr/alpha-dog-of-the-week---george-w--bush"
],
"guest": "Rush"
},
{
"date": "2008-07-17",
"videos": [
"http://thecolbertreport.cc.com/videos/fv156w/intro---7-17-08",
"http://thecolbertreport.cc.com/videos/hy6e1y/ofec",
"http://thecolbertreport.cc.com/videos/fdazma/tip-wag---9-11-billboard",
"http://thecolbertreport.cc.com/videos/75y9kg/green-screen-challenge---bill-o-reilly-rant",
"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/exclusive---better-know-a-lobby---sierra-club",
"http://thecolbertreport.cc.com/videos/298hev/intro---7-21-08",
"http://thecolbertreport.cc.com/videos/2uxo91/barack-obama-s-elitist-summer-abroad",
"http://thecolbertreport.cc.com/videos/ytt7lh/better-know-a-lobby---sierra-club",
"http://thecolbertreport.cc.com/videos/7zt9o1/jim-webb"
],
"guest": "Sen. Jim Webb"
},
{
"date": "2008-07-22",
"videos": [
"http://thecolbertreport.cc.com/videos/isgn6o/intro---7-22-08",
"http://thecolbertreport.cc.com/videos/5us80y/obama-s-trip",
"http://thecolbertreport.cc.com/videos/twxrmk/the-word---fight-to-the-furnish",
"http://thecolbertreport.cc.com/videos/g536lz/elton-john-s-new-ice-cream",
"http://thecolbertreport.cc.com/videos/dqvjy7/south-carolina-is-so-gay",
"http://thecolbertreport.cc.com/videos/ypbiy1/margaret-spellings"
],
"guest": "Margaret Spellings"
},
{
"date": "2008-07-23",
"videos": [
"http://thecolbertreport.cc.com/videos/ephzov/intro---7-23-08",
"http://thecolbertreport.cc.com/videos/008wql/starbucks-closings",
"http://thecolbertreport.cc.com/videos/ckerul/the-word---join-the-european-union",
"http://thecolbertreport.cc.com/videos/p099m0/colorofchange-org-petition",
"http://thecolbertreport.cc.com/videos/ef4747/nas-pt--1"
],
"guest": "Nas"
},
{
"date": "2008-07-24",
"videos": [
"http://thecolbertreport.cc.com/videos/9e4ipx/intro---7-24-08",
"http://thecolbertreport.cc.com/videos/mzk1jw/john-mccain-s-sausage-party",
"http://thecolbertreport.cc.com/videos/y6db2n/laurie-goodstein",
"http://thecolbertreport.cc.com/videos/oyh9ck/threatdown---greek-courts",
"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://thecolbertreport.cc.com/videos/5mv6ij/intro---7-28-08",
"http://thecolbertreport.cc.com/videos/ahi7x5/obama-returns",
"http://thecolbertreport.cc.com/videos/n5o1z2/heroic-refusal-to-discuss-robert-novak",
"http://thecolbertreport.cc.com/videos/wksh33/trigger-happy---d-c--v--heller",
"http://thecolbertreport.cc.com/videos/2fxv2r/toby-keith"
],
"guest": "Toby Keith"
},
{
"date": "2008-07-29",
"videos": [
"http://thecolbertreport.cc.com/videos/8y4ush/intro---7-29-08",
"http://thecolbertreport.cc.com/videos/ft9iza/mccain-s-mustache",
"http://thecolbertreport.cc.com/videos/je97nz/the-word---honest-belief",
"http://thecolbertreport.cc.com/videos/079fu3/better-know-a-district---new-york-s-14th---carolyn-maloney",
"http://thecolbertreport.cc.com/videos/4pok23/eric-roston"
],
"guest": "Eric Roston"
},
{
"date": "2008-07-30",
"videos": [
"http://thecolbertreport.cc.com/videos/aej937/intro---7-30-08",
"http://thecolbertreport.cc.com/videos/0igq3j/fat-cat",
"http://thecolbertreport.cc.com/videos/z8lld1/the-word---save-ferris",
"http://thecolbertreport.cc.com/videos/77hd54/spiders-for-stephen-",
"http://thecolbertreport.cc.com/videos/9riu8g/canton-apology",
"http://thecolbertreport.cc.com/videos/paplnu/crosby--stills---nash-pt--1"
],
"guest": "Crosby, Stills & Nash"
},
{
"date": "2008-07-31",
"videos": [
"http://thecolbertreport.cc.com/videos/2yeaq8/intro---7-31-08",
"http://thecolbertreport.cc.com/videos/cy7kpu/starbucks-cuts-jobs",
"http://thecolbertreport.cc.com/videos/evgv9c/brendan-koerner",
"http://thecolbertreport.cc.com/videos/3pi9ch/cheating-death---swimming-safety",
"http://thecolbertreport.cc.com/videos/k8sku2/buzz-aldrin",
"http://thecolbertreport.cc.com/videos/xrkpup/thanks-to-the-guests"
],
"guest": "Brendan I. Koerner, Buzz Aldrin"
},
{
"date": "2008-08-04",
"videos": [
"http://thecolbertreport.cc.com/videos/y56p3h/intro---8-4-08",
"http://thecolbertreport.cc.com/videos/j7c1ly/democrats--five-week-recess",
"http://thecolbertreport.cc.com/videos/n4qhgk/the-word---we-the-people",
"http://thecolbertreport.cc.com/videos/gjy6co/ryan-seacrest-s-shark-attack",
"http://thecolbertreport.cc.com/videos/j0iwzv/lucas-conley"
],
"guest": "Lucas Conley, The Apples in Stereo"
},
{
"date": "2008-08-05",
"videos": [
"http://thecolbertreport.cc.com/videos/0b9ndt/intro---8-5-08",
"http://thecolbertreport.cc.com/videos/a60qui/starbucks-promotion",
"http://thecolbertreport.cc.com/videos/ts3set/obama-s-energy-plan---tire-gauges",
"http://thecolbertreport.cc.com/videos/c8orpt/the-word---divided-we-win",
"http://thecolbertreport.cc.com/videos/u7dbu9/canton--kansas-apology",
"http://thecolbertreport.cc.com/videos/sw0u58/david-carr",
"http://thecolbertreport.cc.com/videos/zghj54/obsessive-compulsive-checklist"
],
"guest": "David Carr"
},
{
"date": "2008-08-06",
"videos": [
"http://thecolbertreport.cc.com/videos/j12mau/intro---8-6-08",
"http://thecolbertreport.cc.com/videos/ad4cbz/ignorance-history-month",
"http://thecolbertreport.cc.com/videos/v2zmtk/spida-of-love---jason-bond",
"http://thecolbertreport.cc.com/videos/luli3g/colbert-platinum---the-dribble-down-effect",
"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://thecolbertreport.cc.com/videos/bxoz3a/intro---8-7-08",
"http://thecolbertreport.cc.com/videos/e6qhsv/osama-bin-laden-s-driver-guilty",
"http://thecolbertreport.cc.com/videos/f3opxi/sport-report---devin-gordon",
"http://thecolbertreport.cc.com/videos/6u4m61/tip-wag---exxon-s-record-profits",
"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://thecolbertreport.cc.com/videos/jk0e27/intro---8-11-08",
"http://thecolbertreport.cc.com/videos/riwpa4/esteban-loves-jorge-ramos",
"http://thecolbertreport.cc.com/videos/bfwvvn/the-word---catharsis",
"http://thecolbertreport.cc.com/videos/txv0gu/nailed--em---medical-marijuana",
"http://thecolbertreport.cc.com/videos/8j40t0/jorge-ramos",
"http://thecolbertreport.cc.com/videos/b7houz/stephen-wants-snacks"
],
"guest": "Jorge Ramos"
},
{
"date": "2008-08-12",
"videos": [
"http://thecolbertreport.cc.com/videos/kt49i5/intro---8-12-08",
"http://thecolbertreport.cc.com/videos/zgupdj/unsubstantiated-rumors",
"http://thecolbertreport.cc.com/videos/6d57uu/olympic-opening-ceremony",
"http://thecolbertreport.cc.com/videos/5njkui/joey-cheek",
"http://thecolbertreport.cc.com/videos/jhg2wn/canton--south-dakota-apology",
"http://thecolbertreport.cc.com/videos/bv3152/jane-mayer",
"http://thecolbertreport.cc.com/videos/dwnfyl/reading-the-national-enquirer"
],
"guest": "Joey Cheek, Jane Mayer"
},
{
"date": "2008-08-13",
"videos": [
"http://thecolbertreport.cc.com/videos/o7nbb7/intro---8-13-08",
"http://thecolbertreport.cc.com/videos/zewvls/stephen-s-world-record",
"http://thecolbertreport.cc.com/videos/3ae93q/john-mccain-steals-from-wikipedia",
"http://thecolbertreport.cc.com/videos/htzkd9/the-word---blame-monica-goodling",
"http://thecolbertreport.cc.com/videos/1clyqz/formidable-opponent---offshore-drilling",
"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://thecolbertreport.cc.com/videos/481cqy/intro---8-14-08",
"http://thecolbertreport.cc.com/videos/0gs1a9/jeopardy-shout-out",
"http://thecolbertreport.cc.com/videos/s99fxp/threatdown---killer-iphones",
"http://thecolbertreport.cc.com/videos/9x55ta/the-1952-helsinki-games---the-reindeer-roars",
"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://thecolbertreport.cc.com/videos/r6ivli/intro---8-26-08",
"http://thecolbertreport.cc.com/videos/zpxtn2/burning-man-festival-confusion",
"http://thecolbertreport.cc.com/videos/ez5jp1/michelle-obama-s-speech",
"http://thecolbertreport.cc.com/videos/tojy8p/anniversary-pandering",
"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://thecolbertreport.cc.com/videos/mb4pgm/intro---8-27-08",
"http://thecolbertreport.cc.com/videos/63yvi3/live-from-dynasty",
"http://thecolbertreport.cc.com/videos/xfzios/hillary-clinton-supports-barack-obama",
"http://thecolbertreport.cc.com/videos/m1mag5/repo-man",
"http://thecolbertreport.cc.com/videos/402muh/mike-huckabee",
"http://thecolbertreport.cc.com/videos/llvqjv/stephanie-tubbs-jones-tribute"
],
"guest": "Gov. Mike Huckabee"
},
{
"date": "2008-08-28",
"videos": [
"http://thecolbertreport.cc.com/videos/ua1ppo/intro---8-28-08",
"http://thecolbertreport.cc.com/videos/9lke5e/high-altitude-brownies",
"http://thecolbertreport.cc.com/videos/53s26i/the-word---acid-flashback",
"http://thecolbertreport.cc.com/videos/kmna3f/dnc-formal-roll-call",
"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://thecolbertreport.cc.com/videos/7p5vgn/intro---8-29-08",
"http://thecolbertreport.cc.com/videos/ctsiz5/sarah-palin-for-vp",
"http://thecolbertreport.cc.com/videos/9os3w0/better-know-a-lobby---secular-coalition-for-america",
"http://thecolbertreport.cc.com/videos/rufbl6/john-mcwhorter",
"http://thecolbertreport.cc.com/videos/bzvjxb/revenge-of-the-styrofoam-cups"
],
"guest": "John McWhorter"
},
{
"date": "2008-09-02",
"videos": [
"http://thecolbertreport.cc.com/videos/hp450x/intro---9-2-08",
"http://thecolbertreport.cc.com/videos/8tw46w/stephen-from-four-years-ago",
"http://thecolbertreport.cc.com/videos/rf8uos/the-word---that-s-the-ticket",
"http://thecolbertreport.cc.com/videos/gmnlx9/green-screen-challenge---last-shot",
"http://thecolbertreport.cc.com/videos/f81p33/laura-d-andrea-tyson",
"http://thecolbertreport.cc.com/videos/xhysj6/blowing-your-mind"
],
"guest": "Laura D'Andrea Tyson"
},
{
"date": "2008-09-03",
"videos": [
"http://thecolbertreport.cc.com/videos/gujtwh/intro---9-3-08",
"http://thecolbertreport.cc.com/videos/kepht9/stephen-is-in-new-orleans",
"http://thecolbertreport.cc.com/videos/sbatmc/rnc-tuesday",
"http://thecolbertreport.cc.com/videos/awnw4i/susan-eisenhower-endorses-obama",
"http://thecolbertreport.cc.com/videos/4cdiam/john-mccain--her-story",
"http://thecolbertreport.cc.com/videos/x8u7qp/doris-kearns-goodwin",
"http://thecolbertreport.cc.com/videos/rk1eeg/who-wants-beads-"
],
"guest": "Doris Kearns Goodwin"
},
{
"date": "2008-09-04",
"videos": [
"http://thecolbertreport.cc.com/videos/nvj1zq/intro---9-4-08",
"http://thecolbertreport.cc.com/videos/1cwp12/stuck-in-atlanta-airport",
"http://thecolbertreport.cc.com/videos/kyo8u3/adam-brickley",
"http://thecolbertreport.cc.com/videos/c6ux4z/tip-wag---rnc-edition",
"http://thecolbertreport.cc.com/videos/yywrwl/ron-paul",
"http://thecolbertreport.cc.com/videos/kwoupb/flight-out-of-atlanta"
],
"guest": "Adam Brickley, Ron Paul"
},
{
"date": "2008-09-05",
"videos": [
"http://thecolbertreport.cc.com/videos/pg1oxm/intro---9-5-08",
"http://thecolbertreport.cc.com/videos/2rjlbj/stephen-missed-the-convention",
"http://thecolbertreport.cc.com/videos/njb4bu/green-screen-challenge---john-mccain-s-acceptance-speech",
"http://thecolbertreport.cc.com/videos/zk7gig/better-know-a-district---georgia-s-8th---lynn-westmoreland-update",
"http://thecolbertreport.cc.com/videos/xeizbt/david-paterson",
"http://thecolbertreport.cc.com/videos/u3k61y/green-screen-challenge---go-nuts"
],
"guest": "Gov. David Paterson"
},
{
"date": "2008-09-15",
"videos": [
"http://thecolbertreport.cc.com/videos/jshk87/exclusive---charlene--i-m-right-behind-you----rock-band-2",
"http://thecolbertreport.cc.com/videos/jfwpwo/intro---9-15-08",
"http://thecolbertreport.cc.com/videos/7yzozt/colbert-shopping-network",
"http://thecolbertreport.cc.com/videos/f9h01l/the-word---how-dare-you-",
"http://thecolbertreport.cc.com/videos/r0u91k/colbert-platinum---supermodel-statue",
"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://thecolbertreport.cc.com/videos/urn1ti/intro---9-16-08",
"http://thecolbertreport.cc.com/videos/k0bsca/financial-advice-from-gorlock",
"http://thecolbertreport.cc.com/videos/mkpl4k/tyson-slocum",
"http://thecolbertreport.cc.com/videos/75xh2f/threatdown---icebergs-",
"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://thecolbertreport.cc.com/videos/4l5nqm/intro---9-17-08",
"http://thecolbertreport.cc.com/videos/y012iz/mccain-attacks-obama",
"http://thecolbertreport.cc.com/videos/kyb0cu/the-word---powerless",
"http://thecolbertreport.cc.com/videos/n6eo9j/country-first",
"http://thecolbertreport.cc.com/videos/uwjjvf/bob-lutz",
"http://thecolbertreport.cc.com/videos/3odd8c/stephen---the-colberts--music-video"
],
"guest": "Bob Lutz"
},
{
"date": "2008-09-18",
"videos": [
"http://thecolbertreport.cc.com/videos/crbm2j/intro---9-18-08",
"http://thecolbertreport.cc.com/videos/1jklj8/stephen-wants-an-emmy",
"http://thecolbertreport.cc.com/videos/j1rb59/smokin--pole---american-arctic-expert",
"http://thecolbertreport.cc.com/videos/jgr23t/richard-garriott-takes-stephen-to-space",
"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://thecolbertreport.cc.com/videos/s3o9jz/intro---9-23-08",
"http://thecolbertreport.cc.com/videos/ikji5j/stephen-loses-to-don-rickles",
"http://thecolbertreport.cc.com/videos/vj8wko/the-word---ohmygodsocietyiscollapsing---",
"http://thecolbertreport.cc.com/videos/bna75w/peter-grosz-insults",
"http://thecolbertreport.cc.com/videos/iscpss/john-mccain-s-theme-song",
"http://thecolbertreport.cc.com/videos/8uwmb0/jackson-browne"
],
"guest": "Jackson Browne"
},
{
"date": "2008-09-24",
"videos": [
"http://thecolbertreport.cc.com/videos/5k16zp/intro---9-24-08",
"http://thecolbertreport.cc.com/videos/zxun4o/stephen-suspends-the-show",
"http://thecolbertreport.cc.com/videos/y03i0s/joe-nocera",
"http://thecolbertreport.cc.com/videos/ug1eaa/alpha-dog-of-the-week---bill-bennett",
"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://thecolbertreport.cc.com/videos/c2lklm/intro---9-25-08",
"http://thecolbertreport.cc.com/videos/n6lmpg/stephen-settles-the-debate---fdr-vs--tr",
"http://thecolbertreport.cc.com/videos/k6o1ga/now-s-presidential-endorsement---kim-gandy",
"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://thecolbertreport.cc.com/videos/1c54hn/intro---9-29-08",
"http://thecolbertreport.cc.com/videos/05f4cg/the-first-debate-winner",
"http://thecolbertreport.cc.com/videos/bweuwc/the-word---ye-of-little-faith",
"http://thecolbertreport.cc.com/videos/cgij7r/cheating-death---car-bacteria",
"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://thecolbertreport.cc.com/videos/y8hkhe/intro---9-30-08",
"http://thecolbertreport.cc.com/videos/9st6mt/partisanship-kills-the-bailout",
"http://thecolbertreport.cc.com/videos/f9oh9q/prescott-oil-loves-the-earth",
"http://thecolbertreport.cc.com/videos/d0zdru/tip-wag---wall-street-jagoffs",
"http://thecolbertreport.cc.com/videos/j67wur/out-of-time"
],
"guest": "James Taylor"
},
{
"date": "2008-10-01",
"videos": [
"http://thecolbertreport.cc.com/videos/t7tnvd/exclusive---nas-plays-rock-band",
"http://thecolbertreport.cc.com/videos/y8hkhe/intro---9-30-08",
"http://thecolbertreport.cc.com/videos/9st6mt/partisanship-kills-the-bailout",
"http://thecolbertreport.cc.com/videos/f9oh9q/prescott-oil-loves-the-earth",
"http://thecolbertreport.cc.com/videos/d0zdru/tip-wag---wall-street-jagoffs",
"http://thecolbertreport.cc.com/videos/j67wur/out-of-time"
],
"guest": "Dave Levin"
},
{
"date": "2008-10-01",
"videos": [
"http://thecolbertreport.cc.com/videos/eqbu4l/intro---10-01-08",
"http://thecolbertreport.cc.com/videos/ovyu4c/campbell-s-soup-stock",
"http://thecolbertreport.cc.com/videos/bhfa94/the-word---future-perfect",
"http://thecolbertreport.cc.com/videos/86s1x0/colbert-teen-talk---voter-abstinence",
"http://thecolbertreport.cc.com/videos/1v6olb/dave-levin",
"http://thecolbertreport.cc.com/videos/e5ngk1/you-snooze--you-lose"
],
"guest": "Dave Levin"
},
{
"date": "2008-10-02",
"videos": [
"http://thecolbertreport.cc.com/videos/zc7pti/intro---10-02-08",
"http://thecolbertreport.cc.com/videos/jwi5c6/stephen-shoots-an-audience-member",
"http://thecolbertreport.cc.com/videos/nkfn9g/shakespearean-candidates---stephen-greenblatt",
"http://thecolbertreport.cc.com/videos/9cm5sl/formidable-opponent---business-syphilis",
"http://thecolbertreport.cc.com/videos/kvfh5w/naomi-klein",
"http://thecolbertreport.cc.com/videos/xsttzx/that-s-all-she-wrote"
],
"guest": "Stephen Greenblatt, Naomi Klein"
},
{
"date": "2008-10-06",
"videos": [
"http://thecolbertreport.cc.com/videos/xxiviw/intro---10-6-08",
"http://thecolbertreport.cc.com/videos/1hb3kb/oj-simpson-guilty",
"http://thecolbertreport.cc.com/videos/qlbk95/the-word---maverick-without-a-cause",
"http://thecolbertreport.cc.com/videos/qnwvgs/un-american-news---financial-edition",
"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://thecolbertreport.cc.com/videos/lr7n1e/intro---10-7-08",
"http://thecolbertreport.cc.com/videos/ehcjcu/stephen-s-town-hall",
"http://thecolbertreport.cc.com/videos/yulr8u/threatdown---zombies",
"http://thecolbertreport.cc.com/videos/e56sfz/the-red-lending-menace",
"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://thecolbertreport.cc.com/videos/wnllod/intro---10-08-08",
"http://thecolbertreport.cc.com/videos/rb63v8/town-hall-fashion-apology",
"http://thecolbertreport.cc.com/videos/pmvhoi/the-second-presidential-debate",
"http://thecolbertreport.cc.com/videos/r8hb9t/atone-phone---gilbert-gottfried",
"http://thecolbertreport.cc.com/videos/7943ea/joe-scarborough",
"http://thecolbertreport.cc.com/videos/02dsh7/stephen-s-post-show-routine"
],
"guest": "Joe Scarborough"
},
{
"date": "2008-10-09",
"videos": [
"http://thecolbertreport.cc.com/videos/cbxmlr/intro---10-09-08",
"http://thecolbertreport.cc.com/videos/l3uq93/dismayed-stockbroker-photos",
"http://thecolbertreport.cc.com/videos/pqsng6/campaign-personal-attacks---david-gergen",
"http://thecolbertreport.cc.com/videos/f6283x/who-s-not-honoring-me-now----nepal",
"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://thecolbertreport.cc.com/videos/5c0f2m/intro---10-13-08",
"http://thecolbertreport.cc.com/videos/fnytnd/mccain-crossword-clue",
"http://thecolbertreport.cc.com/videos/1jl5yn/the-computer-menace---bethany-mclean",
"http://thecolbertreport.cc.com/videos/1goeih/bears---balls---salt-based-economy",
"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://thecolbertreport.cc.com/videos/n5hrc3/intro---10-14-08",
"http://thecolbertreport.cc.com/videos/7pd7zc/paul-krugman-s-nobel-prize",
"http://thecolbertreport.cc.com/videos/r0q5ve/the-word---p-o-w-",
"http://thecolbertreport.cc.com/videos/pfbd0x/tip-wag---palin-s-newsweek-cover",
"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://thecolbertreport.cc.com/videos/zwbmit/intro---10-15-08",
"http://thecolbertreport.cc.com/videos/9308mk/kfc-snacker",
"http://thecolbertreport.cc.com/videos/l7yb6p/the-word---freaky-three-way-calling",
"http://thecolbertreport.cc.com/videos/4e7lhp/sport-report---lame-sports-edition",
"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://thecolbertreport.cc.com/videos/wiiett/intro---10-16-08",
"http://thecolbertreport.cc.com/videos/clx1g3/the-final-debate",
"http://thecolbertreport.cc.com/videos/irar1b/portrait-accepted---brent-glass",
"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://thecolbertreport.cc.com/videos/icr62o/intro---10-20-08",
"http://thecolbertreport.cc.com/videos/hztig3/colin-powell-endorses-barack-obama",
"http://thecolbertreport.cc.com/videos/m2bwgq/fareed-zakaria",
"http://thecolbertreport.cc.com/videos/f1sjmz/colbert-aluminum---paris",
"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://thecolbertreport.cc.com/videos/ipzwmk/intro---10-21-08",
"http://thecolbertreport.cc.com/videos/1q0lgd/stephen-jr--campaigns-for-mccain",
"http://thecolbertreport.cc.com/videos/6mt8jf/the-word---fantasyland",
"http://thecolbertreport.cc.com/videos/yf6nbq/battle-of-the-gods",
"http://thecolbertreport.cc.com/videos/ajdj8y/atone-phone---the-pony-down",
"http://thecolbertreport.cc.com/videos/2f3tuj/michael-farris",
"http://thecolbertreport.cc.com/videos/gsnyc0/another-one-tomorrow"
],
"guest": "Michael Farris"
},
{
"date": "2008-10-22",
"videos": [
"http://thecolbertreport.cc.com/videos/zfo3j9/intro---10-22-08",
"http://thecolbertreport.cc.com/videos/bnfehb/mccain-loves-the-middle-class",
"http://thecolbertreport.cc.com/videos/2fhvot/too-much-political-knowledge",
"http://thecolbertreport.cc.com/videos/l9sa9k/movies-that-are-destroying-america---quantum-of-solace",
"http://thecolbertreport.cc.com/videos/bfif72/david-frum",
"http://thecolbertreport.cc.com/videos/zijniy/thanks-to-cedric-the-entertainer"
],
"guest": "David Frum"
},
{
"date": "2008-10-23",
"videos": [
"http://thecolbertreport.cc.com/videos/4fsdf9/intro---10-23-08",
"http://thecolbertreport.cc.com/videos/mxdemq/the-palins-in-people-magazine",
"http://thecolbertreport.cc.com/videos/9r8mtw/threatdown---who-s-nailin--paylin",
"http://thecolbertreport.cc.com/videos/d9d59e/difference-makers---the-national-hummer-club",
"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://thecolbertreport.cc.com/videos/59kvnn/intro---10-27-08",
"http://thecolbertreport.cc.com/videos/o5x5iu/mccain-guarantees-victory",
"http://thecolbertreport.cc.com/videos/05r6nq/the-word---it-s-alive-",
"http://thecolbertreport.cc.com/videos/7g8kx1/alpha-dog-of-the-week---mark-ciptak",
"http://thecolbertreport.cc.com/videos/fnuvdv/yo-yo-ma"
],
"guest": "Yo-Yo Ma"
},
{
"date": "2008-10-28",
"videos": [
"http://thecolbertreport.cc.com/videos/ghj64m/intro---10-28-08",
"http://thecolbertreport.cc.com/videos/xk09yu/ted-stevens-is-found-guilty",
"http://thecolbertreport.cc.com/videos/7j217q/obama-the-socialist",
"http://thecolbertreport.cc.com/videos/bxzmkn/socialist-candidate-for-president---brian-moore",
"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://thecolbertreport.cc.com/videos/ix1wn7/intro---10-29-08",
"http://thecolbertreport.cc.com/videos/ks5pt8/john-mccain-s-big-prank",
"http://thecolbertreport.cc.com/videos/7qwbk4/the-word---i-endorse-barack-obama",
"http://thecolbertreport.cc.com/videos/k5qv33/was-it-really-that-bad----the-great-depression",
"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://thecolbertreport.cc.com/videos/9sqk1r/intro---10-30-08",
"http://thecolbertreport.cc.com/videos/b7m8ic/obama-infomercial",
"http://thecolbertreport.cc.com/videos/7mbhhk/tip-wag---apple-computers",
"http://thecolbertreport.cc.com/videos/tiopht/the-dacolbert-code---the-election",
"http://thecolbertreport.cc.com/videos/ugfx1s/wilco-interview"
],
"guest": "Wilco"
},
{
"date": "2008-11-03",
"videos": [
"http://thecolbertreport.cc.com/videos/gc439u/intro---11-03-08",
"http://thecolbertreport.cc.com/videos/jtvn9v/2008-campaign-winners-and-losers",
"http://thecolbertreport.cc.com/videos/q31c3b/charlie-cook",
"http://thecolbertreport.cc.com/videos/syw57q/how-to-be-a-maverick",
"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://thecolbertreport.cc.com/videos/deihkn/intro---11-05-08",
"http://thecolbertreport.cc.com/videos/ek3v6r/president-obama",
"http://thecolbertreport.cc.com/videos/p698of/the-word---change",
"http://thecolbertreport.cc.com/videos/b3gurg/threatdown---black-presidents",
"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://thecolbertreport.cc.com/videos/jvmllx/intro---11-06-08",
"http://thecolbertreport.cc.com/videos/8cjwkf/obama-s-spider-battle",
"http://thecolbertreport.cc.com/videos/91wunt/un-american-news---obama-edition",
"http://thecolbertreport.cc.com/videos/aedolr/fallback-position---peter-earnest-pt--1",
"http://thecolbertreport.cc.com/videos/tp44lf/rachel-maddow"
],
"guest": "Rachel Maddow"
},
{
"date": "2008-11-11",
"videos": [
"http://thecolbertreport.cc.com/videos/3vbqce/intro---11-11-08",
"http://thecolbertreport.cc.com/videos/t0o0ln/the-obamas-meet-the-bushes",
"http://thecolbertreport.cc.com/videos/cf9i7o/proposition-8-protests---dan-savage",
"http://thecolbertreport.cc.com/videos/a4htau/fallback-position---peter-earnest-pt--2",
"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://thecolbertreport.cc.com/videos/jxnavl/intro---11-12-08",
"http://thecolbertreport.cc.com/videos/hs06sa/formula-4ou1",
"http://thecolbertreport.cc.com/videos/jdc5wl/the-word---pity-party",
"http://thecolbertreport.cc.com/videos/vq5z69/cheating-death---women-s-health",
"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://thecolbertreport.cc.com/videos/iy78xf/intro---11-13-08",
"http://thecolbertreport.cc.com/videos/ws4itq/imaginary-gay-black-warfare",
"http://thecolbertreport.cc.com/videos/54gy81/tip-wag---marvel-comics",
"http://thecolbertreport.cc.com/videos/9so57k/rahm-emanuel-s-finger",
"http://thecolbertreport.cc.com/videos/84locu/stephen-moore",
"http://thecolbertreport.cc.com/videos/kwiam8/obama-spider-man-comic-bribe"
],
"guest": "Stephen Moore"
},
{
"date": "2008-11-17",
"videos": [
"http://thecolbertreport.cc.com/videos/edyiaw/intro---11-17-08",
"http://thecolbertreport.cc.com/videos/vfh1d7/stephen-s-gma-appearance",
"http://thecolbertreport.cc.com/videos/tyr5yf/barack-obama-is-hiring",
"http://thecolbertreport.cc.com/videos/xubttj/obama-s-cabinet---tom-brokaw",
"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://thecolbertreport.cc.com/videos/cpar3w/intro---11-18-08",
"http://thecolbertreport.cc.com/videos/gpyfhe/joe-lieberman-learns-his-fate",
"http://thecolbertreport.cc.com/videos/tda4m3/the-word---love-lost",
"http://thecolbertreport.cc.com/videos/rfqomg/stephen-s-vetting-process---cliff-sloan-pt--1"
],
"guest": "Paul Simon"
},
{
"date": "2008-11-19",
"videos": [
"http://thecolbertreport.cc.com/videos/a4gbi9/intro---11-19-08",
"http://thecolbertreport.cc.com/videos/3ebcnc/the-word---mad-men",
"http://thecolbertreport.cc.com/videos/hjm6c3/stephen-s-vetting-process---cliff-sloan-pt--2",
"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://thecolbertreport.cc.com/videos/cbvik4/intro---11-20-08",
"http://thecolbertreport.cc.com/videos/ag7dg1/racism-is-over---cory-booker",
"http://thecolbertreport.cc.com/videos/2frm4q/metunes---chinese-democracy",
"http://thecolbertreport.cc.com/videos/c48nk9/thomas-friedman",
"http://thecolbertreport.cc.com/videos/bd8wju/christmas-special-dvd-warning"
],
"guest": "Cory Booker, Thomas L. Friedman"
},
{
"date": "2008-12-01",
"videos": [
"http://thecolbertreport.cc.com/videos/rpma6e/intro---12-01-08",
"http://thecolbertreport.cc.com/videos/tq2nxp/operation-humble-kanye",
"http://thecolbertreport.cc.com/videos/qarmhd/war-in-afghanistan",
"http://thecolbertreport.cc.com/videos/rven6i/khaled-hosseini",
"http://thecolbertreport.cc.com/videos/36dgrv/tip-wag---all-wag-christmas-edition",
"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://thecolbertreport.cc.com/videos/cj7hhg/intro---12-02-08",
"http://thecolbertreport.cc.com/videos/qvwoip/operation-humble-kanye---buy-stephen-s-album",
"http://thecolbertreport.cc.com/videos/ztjt9g/the-word---a-man-named-plaxico",
"http://thecolbertreport.cc.com/videos/fic3d1/colbert-platinum---christmas-edition",
"http://thecolbertreport.cc.com/videos/bshkcz/jeffrey-goldberg",
"http://thecolbertreport.cc.com/videos/utntlq/buy-stephen-s-boots-on-ebay"
],
"guest": "Jeffrey Goldberg"
},
{
"date": "2008-12-03",
"videos": [
"http://thecolbertreport.cc.com/videos/il4wbl/intro---12-03-08",
"http://thecolbertreport.cc.com/videos/owefww/nasa-spider-escapes",
"http://thecolbertreport.cc.com/videos/z33t4w/the-word---barack-handed-compliment",
"http://thecolbertreport.cc.com/videos/mcfi82/nailed--em---radical-knitting",
"http://thecolbertreport.cc.com/videos/2karre/barbara-walters",
"http://thecolbertreport.cc.com/videos/r6ufyo/the-end--not-the-beginning"
],
"guest": "Barbara Walters"
},
{
"date": "2008-12-04",
"videos": [
"http://thecolbertreport.cc.com/videos/d118oe/intro---12-04-08",
"http://thecolbertreport.cc.com/videos/2fjry6/operation-humble-kanye---stephen-beats-kanye",
"http://thecolbertreport.cc.com/videos/2d2zn0/pakistani-threat---bob-graham",
"http://thecolbertreport.cc.com/videos/d5jif7/movies-that-are-destroying-america---holiday-movie-edition",
"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://thecolbertreport.cc.com/videos/7u2bhk/intro---12-08-08",
"http://thecolbertreport.cc.com/videos/ao9vg7/bush-kisses-streisand",
"http://thecolbertreport.cc.com/videos/gctknh/the-word---season-of-giving",
"http://thecolbertreport.cc.com/videos/6153k5/barry---the-stump",
"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://thecolbertreport.cc.com/videos/4g9cia/intro---12-09-08",
"http://thecolbertreport.cc.com/videos/onbk9a/rod-blagojevich-is-arrested",
"http://thecolbertreport.cc.com/videos/600m6s/nixmas-tree-trimming---kevin-bacon",
"http://thecolbertreport.cc.com/videos/yflimf/tek-jansen---beginning-s-first-dawn--episode-two-revisited",
"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://thecolbertreport.cc.com/videos/u8ghsg/intro---12-10-08",
"http://thecolbertreport.cc.com/videos/f9io4y/rod-blagojevich-s-birthday",
"http://thecolbertreport.cc.com/videos/imth2d/threatdown---happiness",
"http://thecolbertreport.cc.com/videos/jnn2lb/on-notice---forgiveness",
"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://thecolbertreport.cc.com/videos/y3mqae/intro---12-11-08",
"http://thecolbertreport.cc.com/videos/djirpd/michael-phelps",
"http://thecolbertreport.cc.com/videos/j11gba/stephen-eats-ghost-ribs",
"http://thecolbertreport.cc.com/videos/zc9rq9/the-ghost-of-stage-manager-bobby",
"http://thecolbertreport.cc.com/videos/1756ia/the-word---the-unbearable-lightness-of-supreme-being"
],
"guest": "Michael Phelps"
}
],
"2009": [
{
"date": "2009-01-05",
"videos": [
"http://thecolbertreport.cc.com/videos/9k2tbm/intro---1-05-09",
"http://thecolbertreport.cc.com/videos/za98w3/colbert-and-colmes---roland-burris-appointment",
"http://thecolbertreport.cc.com/videos/hq4p9o/tek-jansen---beginning-s-first-dawn--episode-three",
"http://thecolbertreport.cc.com/videos/nrlhy0/john-king",
"http://thecolbertreport.cc.com/videos/5hoaoz/colbert-and-colmes---colmes-gets-fired"
],
"guest": "Riley Crane"
},
{
"date": "2009-01-06",
"videos": [
"http://thecolbertreport.cc.com/videos/sn2rhf/ponzi-schemes",
"http://thecolbertreport.cc.com/videos/k6j6as/hiding-gold---david-leonhardt",
"http://thecolbertreport.cc.com/videos/4zhwch/better-know-a-district---utah-s-3rd---jason-chaffetz",
"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://thecolbertreport.cc.com/videos/z8rm3b/intro---01-07-09",
"http://thecolbertreport.cc.com/videos/92yx1q/che-stadium",
"http://thecolbertreport.cc.com/videos/d1e1eu/dr--gupta-s-penis-pyramid",
"http://thecolbertreport.cc.com/videos/nqulkz/the-word---statute-of-liberty",
"http://thecolbertreport.cc.com/videos/amgd80/tip-wag---cocaine-honey",
"http://thecolbertreport.cc.com/videos/yau33c/benicio-del-toro"
],
"guest": "James Fowler"
},
{
"date": "2009-01-08",
"videos": [
"http://thecolbertreport.cc.com/videos/88kvmz/intro---01-08-09",
"http://thecolbertreport.cc.com/videos/wcgnr1/new-york-times-abandons-dignity",
"http://thecolbertreport.cc.com/videos/926dzf/yahweh-or-no-way---roland-burris",
"http://thecolbertreport.cc.com/videos/fk4a9c/leg-wrestling-rematch",
"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://thecolbertreport.cc.com/videos/kni4vi/intro---01-12-09",
"http://thecolbertreport.cc.com/videos/9c4f03/bush-s-last-press-conference",
"http://thecolbertreport.cc.com/videos/bwmns5/the-word---sweet-smell-of-success",
"http://thecolbertreport.cc.com/videos/0o1xwh/stephen-jr--on-christmas-eve",
"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://thecolbertreport.cc.com/videos/32ytiz/intro---01-13-09",
"http://thecolbertreport.cc.com/videos/fmzudp/bush-presidency-aged-us",
"http://thecolbertreport.cc.com/videos/9et79a/cold-war-update---cuba",
"http://thecolbertreport.cc.com/videos/m3x3ok/on-notice---limey-squirrel-eaters",
"http://thecolbertreport.cc.com/videos/k1og3a/niall-ferguson",
"http://thecolbertreport.cc.com/videos/5px40o/that-s-all-the-time-we-have"
],
"guest": "Niall Ferguson"
},
{
"date": "2009-01-14",
"videos": [
"http://thecolbertreport.cc.com/videos/oyml2f/intro---01-14-09",
"http://thecolbertreport.cc.com/videos/34mj4v/the-last-bush-effigy",
"http://thecolbertreport.cc.com/videos/y0f472/p-k--winsome---obama-collectibles",
"http://thecolbertreport.cc.com/videos/ur3zl1/little-victories---america-s-galaxy-is-big",
"http://thecolbertreport.cc.com/videos/gizrjk/alan-khazei",
"http://thecolbertreport.cc.com/videos/9hlcm3/commemorative-plates"
],
"guest": "Alan Khazei"
},
{
"date": "2009-01-15",
"videos": [
"http://thecolbertreport.cc.com/videos/q7vz1i/intro---01-15-09",
"http://thecolbertreport.cc.com/videos/95lbi6/bush-and-the-press",
"http://thecolbertreport.cc.com/videos/sy3mow/bush-s-romance-with-the-media---david-gregory",
"http://thecolbertreport.cc.com/videos/7iuuwa/tip-wag---monkey-on-the-lam",
"http://thecolbertreport.cc.com/videos/ux2atw/shepard-fairey",
"http://thecolbertreport.cc.com/videos/wfge8o/spay-and-neuter-your-pets"
],
"guest": "David Gregory, Shepard Fairey"
},
{
"date": "2009-01-19",
"videos": [
"http://thecolbertreport.cc.com/videos/r1uwlh/intro---01-19-09",
"http://thecolbertreport.cc.com/videos/ul1a7j/mlk-day-mascot",
"http://thecolbertreport.cc.com/videos/lypf68/the-word---sacrifice",
"http://thecolbertreport.cc.com/videos/ydvpvb/frank-rich",
"http://thecolbertreport.cc.com/videos/52s3oy/boiling-frog-metaphor"
],
"guest": "Frank Rich"
},
{
"date": "2009-01-20",
"videos": [
"http://thecolbertreport.cc.com/videos/ymrs37/stephen-s-inauguration-breakdown",
"http://thecolbertreport.cc.com/videos/301bds/p-k--winsome---inauguration-merchandise",
"http://thecolbertreport.cc.com/videos/9hjhcy/stephen-s-sound-advice---how-to-be-like-lincoln",
"http://thecolbertreport.cc.com/videos/mmoodw/jabari-asim",
"http://thecolbertreport.cc.com/videos/kai9la/stephen-realizes-he-s-black"
],
"guest": "Jabari Asim"
},
{
"date": "2009-01-21",
"videos": [
"http://thecolbertreport.cc.com/videos/dl8i2q/intro---01-21-09",
"http://thecolbertreport.cc.com/videos/l2d6st/president-yo-yo-ma",
"http://thecolbertreport.cc.com/videos/axsw46/election-2012---chuck-todd",
"http://thecolbertreport.cc.com/videos/xkmfex/stephen-s-remix-challenge",
"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://thecolbertreport.cc.com/videos/0zgr4t/intro---01-22-09",
"http://thecolbertreport.cc.com/videos/t6meak/near-president-obama",
"http://thecolbertreport.cc.com/videos/mtzrkq/un-american-news---president-obama-edition",
"http://thecolbertreport.cc.com/videos/689o7m/better-know-a-lobby---naacp",
"http://thecolbertreport.cc.com/videos/8awmoy/jon-meacham",
"http://thecolbertreport.cc.com/videos/ili9if/refreshing-sierra-mist"
],
"guest": "Jon Meacham"
},
{
"date": "2009-01-26",
"videos": [
"http://thecolbertreport.cc.com/videos/7nxt06/intro---01-26-09",
"http://thecolbertreport.cc.com/videos/4oz085/stephen-s-secret-prison",
"http://thecolbertreport.cc.com/videos/cw8n8j/obama-s-new-science-policy---chris-mooney",
"http://thecolbertreport.cc.com/videos/yxtpn8/tip-wag---john-yarmuth-s-holiday-card",
"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://thecolbertreport.cc.com/videos/rwx1ie/intro---01-27-09",
"http://thecolbertreport.cc.com/videos/8ws8hw/al-arabiya-kidnaps-obama",
"http://thecolbertreport.cc.com/videos/ei15xx/cheating-death---lung-health",
"http://thecolbertreport.cc.com/videos/yzw1s5/bill-o-reilly-doesn-t-report-rumors",
"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/exclusive---better-know-a-beatle---paul-mccartney",
"http://thecolbertreport.cc.com/videos/qfnuqn/intro---01-28-09",
"http://thecolbertreport.cc.com/videos/4c854b/countdown-to-atomic-disaster---the-wing-ageddon",
"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://thecolbertreport.cc.com/videos/s0jwx0/intro---01-29-09",
"http://thecolbertreport.cc.com/videos/7k3noc/rod-blagojevich-is-impeached",
"http://thecolbertreport.cc.com/videos/05hiht/the-word---the-audacity-of-nope",
"http://thecolbertreport.cc.com/videos/ra6q6v/sport-report---chicken-wing-spokesman-richard-lobb",
"http://thecolbertreport.cc.com/videos/n7s40p/john-podesta",
"http://thecolbertreport.cc.com/videos/t92qhf/goodnight-illinois-gov--patrick-quinn"
],
"guest": "John Podesta"
},
{
"date": "2009-02-02",
"videos": [
"http://thecolbertreport.cc.com/videos/2e9hx6/intro---02-02-09",
"http://thecolbertreport.cc.com/videos/qx0vt7/the-lilly-ledbetter-fair-pay-act",
"http://thecolbertreport.cc.com/videos/3n4xx4/it-could-be-worse---iceland",
"http://thecolbertreport.cc.com/videos/9kc6le/nailed--em---amtrak-photographer",
"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://thecolbertreport.cc.com/videos/5d9tuo/intro---02-03-09",
"http://thecolbertreport.cc.com/videos/cfzmri/tom-daschle-steps-down",
"http://thecolbertreport.cc.com/videos/b8o45v/the-word---army-of-one",
"http://thecolbertreport.cc.com/videos/eo7n2c/colbert-platinum---ass-covering-edition",
"http://thecolbertreport.cc.com/videos/lr21yl/henry-louis-gates--jr-",
"http://thecolbertreport.cc.com/videos/fz6ra7/all-the-show-we-have-time-for"
],
"guest": "Henry Louis Gates Jr."
},
{
"date": "2009-02-04",
"videos": [
"http://thecolbertreport.cc.com/videos/hm493e/intro---02-04-09",
"http://thecolbertreport.cc.com/videos/7z1jvo/stephen-verbally-thrashes-steve-martin",
"http://thecolbertreport.cc.com/videos/1t7nor/yahweh-or-no-way---the-super-bowl",
"http://thecolbertreport.cc.com/videos/vtzs6d/who-s-not-honoring-me-now----the-newberry-awards",
"http://thecolbertreport.cc.com/videos/7z3biy/tell-your-friends"
],
"guest": "Steve Martin"
},
{
"date": "2009-02-05",
"videos": [
"http://thecolbertreport.cc.com/videos/oqo6m1/intro---02-05-09",
"http://thecolbertreport.cc.com/videos/hkvbbb/stelephant-colbert-the-elephant-seal",
"http://thecolbertreport.cc.com/videos/7v0jg2/economic-stimulus-debate",
"http://thecolbertreport.cc.com/videos/9xbuuq/economic-stimulus-bill---james-surowiecki",
"http://thecolbertreport.cc.com/videos/e378n6/alpha-dog-of-the-week---boy-scouts-of-america",
"http://thecolbertreport.cc.com/videos/avti1a/jonah-lehrer",
"http://thecolbertreport.cc.com/videos/qj4lmo/keep-your-friends-close"
],
"guest": "James Surowiecki, Jonah Lehrer"
},
{
"date": "2009-02-09",
"videos": [
"http://thecolbertreport.cc.com/videos/vp4fvu/intro---02-09-09",
"http://thecolbertreport.cc.com/videos/it28fw/the-new-word-czar",
"http://thecolbertreport.cc.com/videos/13lrs0/threatdown---gay-divorce",
"http://thecolbertreport.cc.com/videos/hr5hvl/al-gore-steals-stephen-s-grammy"
],
"guest": "TV on the Radio"
},
{
"date": "2009-02-10",
"videos": [
"http://thecolbertreport.cc.com/videos/fv48bo/intro---02-10-09",
"http://thecolbertreport.cc.com/videos/mj9pcq/the-visa-black-card",
"http://thecolbertreport.cc.com/videos/l6kty8/the-word---loyal-opposition",
"http://thecolbertreport.cc.com/videos/nj38bb/shout-out---honey--counterterrorism---an-old-guard-flag",
"http://thecolbertreport.cc.com/videos/9w33a7/robert-ballard",
"http://thecolbertreport.cc.com/videos/gissod/you-look-like-stephen"
],
"guest": "Robert Ballard"
},
{
"date": "2009-02-11",
"videos": [
"http://thecolbertreport.cc.com/videos/smxfup/intro---02-11-09",
"http://thecolbertreport.cc.com/videos/l5ealo/westminster-dog-show-snub---formula-40-woof",
"http://thecolbertreport.cc.com/videos/jxgbb9/dc-voting-rights-act---eleanor-holmes-norton",
"http://thecolbertreport.cc.com/videos/wfrwar/truth-from-the-gut",
"http://thecolbertreport.cc.com/videos/42vhyq/steven-pinker",
"http://thecolbertreport.cc.com/videos/tpb22v/good-night----except-for-the-west-coast"
],
"guest": "Eleanor Holmes Norton, Steven Pinker"
},
{
"date": "2009-02-12",
"videos": [
"http://thecolbertreport.cc.com/videos/m1tx5d/exclusive---stephen-s-sexiest-moments",
"http://thecolbertreport.cc.com/videos/f0688o/obama-poster-debate---david-ross-and-ed-colbert",
"http://thecolbertreport.cc.com/videos/vgbtpp/the-dacolbert-code---oscar-predictions",
"http://thecolbertreport.cc.com/videos/tbf4y6/adam-gopnik",
"http://thecolbertreport.cc.com/videos/okmu84/goodbye--conan-o-brien"
],
"guest": "David Ross, Ed Colbert, Adam Gopnik"
},
{
"date": "2009-02-23",
"videos": [
"http://thecolbertreport.cc.com/videos/9ynh43/intro---02-23-09",
"http://thecolbertreport.cc.com/videos/xlgfrl/stephen-s-prayer-day",
"http://thecolbertreport.cc.com/videos/legx6j/stephen-s-moral-dimension",
"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/mardi-gras-celebrations",
"http://thecolbertreport.cc.com/videos/9jcm4g/1997-flashback",
"http://thecolbertreport.cc.com/videos/pljjhc/nailed--em---buffet-crime",
"http://thecolbertreport.cc.com/videos/n75sz3/cliff-sloan",
"http://thecolbertreport.cc.com/videos/yg82dj/happy-mardi-gras",
"http://thecolbertreport.cc.com/videos/823sva/turning-to-religion---jim-martin",
"http://thecolbertreport.cc.com/videos/gks8m8/breaded-fish-sticks"
],
"guest": "Cliff Sloan"
},
{
"date": "2009-02-25",
"videos": [
"http://thecolbertreport.cc.com/videos/4v3vka/intro---02-25-09",
"http://thecolbertreport.cc.com/videos/fbot0q/obama-s-congressional-address---jindal-s-response",
"http://thecolbertreport.cc.com/videos/o1f5mr/tip-wag---gorilla-crabs-and-gandhi-s-shoes",
"http://thecolbertreport.cc.com/videos/jyyb0h/john-fetterman",
"http://thecolbertreport.cc.com/videos/10ufmk/bears---balls---company-bailouts"
],
"guest": "John Fetterman"
},
{
"date": "2009-02-26",
"videos": [
"http://thecolbertreport.cc.com/videos/lvfhs2/intro---02-26-09",
"http://thecolbertreport.cc.com/videos/1q3zjs/claire-mccaskill-s-twittering",
"http://thecolbertreport.cc.com/videos/5j9jjo/conservative-rap-battle---stephen-challenges-michael-steele",
"http://thecolbertreport.cc.com/videos/831wm1/kris-kristofferson",
"http://thecolbertreport.cc.com/videos/lh0vwj/the-word---ablacknophobia",
"http://thecolbertreport.cc.com/videos/um02qq/analog-tv"
],
"guest": "Kris Kristofferson"
},
{
"date": "2009-03-02",
"videos": [
"http://thecolbertreport.cc.com/videos/tfciz3/conservative-rap-battle---michael-steele-gets-served",
"http://thecolbertreport.cc.com/videos/xtntgt/snow-in-the-studio",
"http://thecolbertreport.cc.com/videos/52t6yh/p-k--winsome---defective-obama-collectibles",
"http://thecolbertreport.cc.com/videos/j78ngs/david-byrne"
],
"guest": "David Byrne"
},
{
"date": "2009-03-03",
"videos": [
"http://thecolbertreport.cc.com/videos/qs5iv1/beer-pong-herpes-outbreak",
"http://thecolbertreport.cc.com/videos/0c92nb/guns-for-roses",
"http://thecolbertreport.cc.com/videos/l9p0ah/space-module--colbert---name-nasa-s-node-3-after-stephen",
"http://thecolbertreport.cc.com/videos/oayyzq/mark-bittman",
"http://thecolbertreport.cc.com/videos/tfciz3/conservative-rap-battle---michael-steele-gets-served"
],
"guest": "Mark Bittman"
},
{
"date": "2009-03-04",
"videos": [
"http://thecolbertreport.cc.com/videos/n8kt9r/intro---03-04-09",
"http://thecolbertreport.cc.com/videos/kob10w/space-module--colbert---scientology-s-new-galactic-overlord",
"http://thecolbertreport.cc.com/videos/9opkqc/doom-bunker---jack-jacobs-and-stephen-moore",
"http://thecolbertreport.cc.com/videos/sx98t6/carl-wilson",
"http://thecolbertreport.cc.com/videos/239tij/goodnight",
"http://thecolbertreport.cc.com/videos/1kkbbd/intro---03-03-09",
"http://thecolbertreport.cc.com/videos/00d1sm/the-word---share-the-wealth",
"http://thecolbertreport.cc.com/videos/nhjls5/the-murderer-was-derek"
],
"guest": "Carl Wilson"
},
{
"date": "2009-03-05",
"videos": [
"http://thecolbertreport.cc.com/videos/ej854l/intro---03-05-09",
"http://thecolbertreport.cc.com/videos/w194ds/obama-s-swing-set",
"http://thecolbertreport.cc.com/videos/a7l1re/tip-wag---rush-limbaugh",
"http://thecolbertreport.cc.com/videos/n8dlml/steven-johnson",
"http://thecolbertreport.cc.com/videos/nfx4fy/leave-you-wanting-more",
"http://thecolbertreport.cc.com/videos/1y41q9/doom-bunker---glenn-beck-s--war-room-"
],
"guest": "Steven Johnson"
},
{
"date": "2009-03-09",
"videos": [
"http://thecolbertreport.cc.com/videos/itgd4m/intro---03-09-09",
"http://thecolbertreport.cc.com/videos/4bvnlr/new-baby-abraham-carter-grosz",
"http://thecolbertreport.cc.com/videos/z9c9ak/better-know-a-district---wyoming-s-at-large---cynthia-lummis",
"http://thecolbertreport.cc.com/videos/54ad8f/lisa-hannigan"
],
"guest": "Lisa Hannigan"
},
{
"date": "2009-03-10",
"videos": [
"http://thecolbertreport.cc.com/videos/1h7cfe/intro---03-10-09",
"http://thecolbertreport.cc.com/videos/i1w6au/conservative-rap-battle---droppin--science-on-michael-steele",
"http://thecolbertreport.cc.com/videos/858jnr/coffee-induced-hallucinations",
"http://thecolbertreport.cc.com/videos/ogsw1c/jay-keasling",
"http://thecolbertreport.cc.com/videos/ovf9hb/sick-three-way",
"http://thecolbertreport.cc.com/videos/mtwuig/exclusive---better-know-a-district---wyoming-s-at-large---cynthia-lummis",
"http://thecolbertreport.cc.com/videos/psylhz/the-word---locked-and-loathed",
"http://thecolbertreport.cc.com/videos/dw94ms/sleep-tight--abraham"
],
"guest": "William Gerstenmaier, Dr. Jay Keasling"
},
{
"date": "2009-03-11",
"videos": [
"http://thecolbertreport.cc.com/videos/sa3out/intro---03-11-09",
"http://thecolbertreport.cc.com/videos/4sbc36/earmarks-abuse-ends-tomorrow",
"http://thecolbertreport.cc.com/videos/7bt4s0/cheating-death---legal--sweat---pre-natal-health",
"http://thecolbertreport.cc.com/videos/rovggj/howard-fineman",
"http://thecolbertreport.cc.com/videos/vpswgr/stephen-s-encore",
"http://thecolbertreport.cc.com/videos/m6st31/space-module--colbert---william-gerstenmaier"
],
"guest": "Howard Fineman"
},
{
"date": "2009-03-12",
"videos": [
"http://thecolbertreport.cc.com/videos/xum4x8/intro---03-12-09",
"http://thecolbertreport.cc.com/videos/uvfw3m/mahmoud-s-non-consensual-endorsement-deal",
"http://thecolbertreport.cc.com/videos/p4j2xc/craziest-f--king-thing-i-ve-ever-heard---barreleye-fish",
"http://thecolbertreport.cc.com/videos/8nmnda/peter-singer",
"http://thecolbertreport.cc.com/videos/8tqo3i/goodnight",
"http://thecolbertreport.cc.com/videos/xjpl01/the-word---rand-illusion"
],
"guest": "Simon Johnson, Peter Singer"
},
{
"date": "2009-03-16",
"videos": [
"http://thecolbertreport.cc.com/videos/8zwa7x/intro---03-16-09",
"http://thecolbertreport.cc.com/videos/yz9sik/stephen-s-angry-mob-will-crush-aig",
"http://thecolbertreport.cc.com/videos/pe3tou/better-know-a-governor---mark-sanford-update",
"http://thecolbertreport.cc.com/videos/ck0fd5/neil-gaiman",
"http://thecolbertreport.cc.com/videos/qxrsxr/stephen-wants-to-hug-you"
],
"guest": "Jonathan Chait, Neil Gaiman"
},
{
"date": "2009-03-17",
"videos": [
"http://thecolbertreport.cc.com/videos/ogmrdd/intro---03-17-09",
"http://thecolbertreport.cc.com/videos/v1zxe6/shout-out---the-colbert-report-overseas",
"http://thecolbertreport.cc.com/videos/bsv6p7/world-of-nahlej---shmeat",
"http://thecolbertreport.cc.com/videos/7byrkj/david-grann",
"http://thecolbertreport.cc.com/videos/zrpt32/persian-gulf-countdown-clock",
"http://thecolbertreport.cc.com/videos/59sfdt/the-new-deal---jonathan-chait"
],
"guest": "David Grann"
},
{
"date": "2009-03-18",
"videos": [
"http://thecolbertreport.cc.com/videos/u70zrc/intro---03-18-09",
"http://thecolbertreport.cc.com/videos/an5849/predator-x-discovery",
"http://thecolbertreport.cc.com/videos/fnlgez/tip-wag---mississippi--talk-shows---syfy",
"http://thecolbertreport.cc.com/videos/5hu17z/juan-cole",
"http://thecolbertreport.cc.com/videos/bokh2r/sam-s-club-time",
"http://thecolbertreport.cc.com/videos/3i8x9a/colbert-aluminum---cigar-nubs--faux-poor---blixseth"
],
"guest": "Juan Cole"
},
{
"date": "2009-03-19",
"videos": [
"http://thecolbertreport.cc.com/videos/ntnm0v/intro---03-19-09",
"http://thecolbertreport.cc.com/videos/tkjk8k/bill-posey-alligator-rumors",
"http://thecolbertreport.cc.com/videos/oi2fxr/when-animals-attack-our-morals---chimps--lizards---spiders",
"http://thecolbertreport.cc.com/videos/m9oys8/john-mccardell",
"http://thecolbertreport.cc.com/videos/f189zq/space-module--colbert---vote-now",
"http://thecolbertreport.cc.com/videos/wa8cs2/the-word---keeping-our-heads"
],
"guest": "John McCardell"
},
{
"date": "2009-03-30",
"videos": [
"http://thecolbertreport.cc.com/videos/hta8xf/intro---03-30-09",
"http://thecolbertreport.cc.com/videos/04agpr/violence-in-mexico",
"http://thecolbertreport.cc.com/videos/ttpqpq/me-time---emily-yoffe-on-narcissistic-personality-disorder",
"http://thecolbertreport.cc.com/videos/y6yflv/space-module--colbert---democracy-in-orbit",
"http://thecolbertreport.cc.com/videos/yz8bqz/derrick-pitts"
],
"guest": "Derrick Pitts"
},
{
"date": "2009-03-31",
"videos": [
"http://thecolbertreport.cc.com/videos/prw3dp/intro---03-31-09",
"http://thecolbertreport.cc.com/videos/ga9h1c/obama-s-epic-dog-quest",
"http://thecolbertreport.cc.com/videos/19bdth/better-know-a-lobby---newspaper-association-of-america",
"http://thecolbertreport.cc.com/videos/fkt6tu/david-plotz",
"http://thecolbertreport.cc.com/videos/ch71k9/sudoku-answers",
"http://thecolbertreport.cc.com/videos/7l6w83/me-time---american-narcissism",
"http://thecolbertreport.cc.com/videos/k0knxh/30-minute-applause"
],
"guest": "David Plotz"
},
{
"date": "2009-04-01",
"videos": [
"http://thecolbertreport.cc.com/videos/du0pk9/intro---04-01-09",
"http://thecolbertreport.cc.com/videos/1o1nya/french-worker-protests",
"http://thecolbertreport.cc.com/videos/5t3340/cheating-death---sperm-sale---colonoscopies",
"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://thecolbertreport.cc.com/videos/scsjxw/intro---04-02-09",
"http://thecolbertreport.cc.com/videos/78s5oz/cheney-s-secret-assassination-squad",
"http://thecolbertreport.cc.com/videos/mkb4ls/merriam-webster-s-word-s-worth",
"http://thecolbertreport.cc.com/videos/4qhn4o/biz-stone",
"http://thecolbertreport.cc.com/videos/5uxqom/let-your-gps-be-your-guide",
"http://thecolbertreport.cc.com/videos/idkq46/the-word---fine-line"
],
"guest": "Biz Stone"
},
{
"date": "2009-04-06",
"videos": [
"http://thecolbertreport.cc.com/videos/d5ju1a/colbert-s-easter-parade",
"http://thecolbertreport.cc.com/videos/v1ybgk/intro---04-06-09",
"http://thecolbertreport.cc.com/videos/f3bajc/body-loss",
"http://thecolbertreport.cc.com/videos/y3ocaq/space-module--colbert---urine-recycling-room",
"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://thecolbertreport.cc.com/videos/168lgg/intro---04-07-09",
"http://thecolbertreport.cc.com/videos/9kk3jy/queen-noor-s-royal-treatment",
"http://thecolbertreport.cc.com/videos/6uykwu/better-know-a-district---new-york-s-25th---dan-maffei",
"http://thecolbertreport.cc.com/videos/31tszu/queen-noor",
"http://thecolbertreport.cc.com/videos/pqumra/hiccup-free",
"http://thecolbertreport.cc.com/videos/njp3xz/un-american-news---rest-of-the-world",
"http://thecolbertreport.cc.com/videos/u5yf3y/obama-s-european-trip---tom-brokaw"
],
"guest": "Queen Noor"
},
{
"date": "2009-04-08",
"videos": [
"http://thecolbertreport.cc.com/videos/f1gjz4/intro---04-08-09",
"http://thecolbertreport.cc.com/videos/lyeuyj/birkat-hachama---stephen-frees-his-jews",
"http://thecolbertreport.cc.com/videos/10cwvc/alpha-dog-of-the-week---ted-stevens",
"http://thecolbertreport.cc.com/videos/eknw52/phil-bronstein",
"http://thecolbertreport.cc.com/videos/jmb43t/electronic-edition",
"http://thecolbertreport.cc.com/videos/7jw15b/the-word---morally-bankrupt"
],
"guest": "Phil Bronstein"
},
{
"date": "2009-04-09",
"videos": [
"http://thecolbertreport.cc.com/videos/ly7fhn/workers--comp-temptation",
"http://thecolbertreport.cc.com/videos/1adwqk/threatdown---robert-gates--dog-seders---obama",
"http://thecolbertreport.cc.com/videos/lywaay/bart-ehrman",
"http://thecolbertreport.cc.com/videos/vd2m1k/stephen-s-severed-head",
"http://thecolbertreport.cc.com/videos/4wgqsm/where-and-when-is-stephen-going-to-the-persian-gulf----bahrain"
],
"guest": "Bart Ehrman"
},
{
"date": "2009-04-14",
"videos": [
"http://thecolbertreport.cc.com/videos/uvnlz3/intro---04-14-09",
"http://thecolbertreport.cc.com/videos/1tgxfo/clarence-thomas--new-job",
"http://thecolbertreport.cc.com/videos/bz4xly/space-module--colbert---sunita-williams",
"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://thecolbertreport.cc.com/videos/2t8bkw/intro---04-15-09",
"http://thecolbertreport.cc.com/videos/whfbdu/obama-denies-habeas-corpus",
"http://thecolbertreport.cc.com/videos/xkxq0s/better-know-a-district---illinois--18th---aaron-schock",
"http://thecolbertreport.cc.com/videos/0ca7u5/jim-lehrer",
"http://thecolbertreport.cc.com/videos/g6fu2q/homework-assignment",
"http://thecolbertreport.cc.com/videos/5rzknc/the-word---have-your-cake-and-eat-it--too"
],
"guest": "Jim Lehrer"
},
{
"date": "2009-04-16",
"videos": [
"http://thecolbertreport.cc.com/videos/t8chps/intro---04-16-09",
"http://thecolbertreport.cc.com/videos/abfalc/teabagging-protests",
"http://thecolbertreport.cc.com/videos/npq9t7/indian-elections---kanishk-tharoor",
"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://thecolbertreport.cc.com/videos/b06wzj/intro---04-20-09",
"http://thecolbertreport.cc.com/videos/3g58oe/castro-death-wish-list",
"http://thecolbertreport.cc.com/videos/pzg5id/maersk-alabama---ken-quinn",
"http://thecolbertreport.cc.com/videos/b1hfbd/tip-wag---texas-secession---maca",
"http://thecolbertreport.cc.com/videos/qi09sh/joe-arpaio"
],
"guest": "Ken Quinn, Sheriff Joe Arpaio"
},
{
"date": "2009-04-21",
"videos": [
"http://thecolbertreport.cc.com/videos/fll3xv/intro---04-21-09",
"http://thecolbertreport.cc.com/videos/mnalwu/george-will-s-demon-denim",
"http://thecolbertreport.cc.com/videos/hezs49/who-s-riding-my-coattails-now----blown-away-by-the-usa",
"http://thecolbertreport.cc.com/videos/7lqvgy/mike-krzyzewski",
"http://thecolbertreport.cc.com/videos/4dj3xs/special-dvd-commentary",
"http://thecolbertreport.cc.com/videos/g9ilpe/anger-s-aweigh",
"http://thecolbertreport.cc.com/videos/h6pabb/stephen-s-only-regrets"
],
"guest": "Coach Mike Kryzewski"
},
{
"date": "2009-04-22",
"videos": [
"http://thecolbertreport.cc.com/videos/licvuz/intro---04-22-09",
"http://thecolbertreport.cc.com/videos/g6q0sp/-the-price-is-right--goes-green",
"http://thecolbertreport.cc.com/videos/7ax5b6/where-and-when-is-stephen-going-to-the-persian-gulf----qatar",
"http://thecolbertreport.cc.com/videos/ui31iq/ira-glass",
"http://thecolbertreport.cc.com/videos/77b5v5/never-go-to-bed-angry",
"http://thecolbertreport.cc.com/videos/zbqudz/the-word---stressed-position"
],
"guest": "Ira Glass"
},
{
"date": "2009-04-23",
"videos": [
"http://thecolbertreport.cc.com/videos/gj1jdr/intro---04-23-09",
"http://thecolbertreport.cc.com/videos/16z7m7/america-does-not-swear-on-camera",
"http://thecolbertreport.cc.com/videos/dbshcz/illegitimate-grandson-of-an-alligator",
"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://thecolbertreport.cc.com/videos/ak2bbq/intro---04-27-09",
"http://thecolbertreport.cc.com/videos/u3yqqg/days-of-swine-and-doses",
"http://thecolbertreport.cc.com/videos/ioe7hh/craziest-f--king-thing-i-ve-ever-heard---fir-tree-lung",
"http://thecolbertreport.cc.com/videos/6ywn6l/a-rare-correction---stephen-eats-an-ewok",
"http://thecolbertreport.cc.com/videos/jlx2r1/the-decemberists"
],
"guest": "The Decemberists"
},
{
"date": "2009-04-28",
"videos": [
"http://thecolbertreport.cc.com/videos/5phyy1/intro---04-28-09",
"http://thecolbertreport.cc.com/videos/pwdiki/arlen-specter-contracts-donkey-flu",
"http://thecolbertreport.cc.com/videos/14mfow/foreign-reporting---richard-engel",
"http://thecolbertreport.cc.com/videos/u40xb8/daniel-gross",
"http://thecolbertreport.cc.com/videos/l8q5cp/shout-out---kids-edition"
],
"guest": "Richard Engel, Daniel Gross"
},
{
"date": "2009-04-29",
"videos": [
"http://thecolbertreport.cc.com/videos/we8zzj/intro---04-29-09",
"http://thecolbertreport.cc.com/videos/0gktuh/ahmadinejad-steals-obama-s-slogan",
"http://thecolbertreport.cc.com/videos/ou4xko/enemy-swine--a-pigcalypse-now",
"http://thecolbertreport.cc.com/videos/i5hw2i/david-kessler",
"http://thecolbertreport.cc.com/videos/seesef/feet-teeth",
"http://thecolbertreport.cc.com/videos/5kllsr/where-and-when-is-stephen-going-to-the-persian-gulf----correspondents",
"http://thecolbertreport.cc.com/videos/ewzt0z/no-animals-were-harmed"
],
"guest": "David Kessler"
},
{
"date": "2009-04-30",
"videos": [
"http://thecolbertreport.cc.com/videos/4ncl78/intro---04-30-09",
"http://thecolbertreport.cc.com/videos/hr47fj/president-obama---the-first-14-mondays",
"http://thecolbertreport.cc.com/videos/zhiu9l/ethan-nadelmann",
"http://thecolbertreport.cc.com/videos/1e83az/the-after-show",
"http://thecolbertreport.cc.com/videos/dnh80p/i-s-on-edjukashun---textbooks--americorps---strip-search"
],
"guest": "Jonathan Alter, Ethan Nadelman"
},
{
"date": "2009-05-04",
"videos": [
"http://thecolbertreport.cc.com/videos/ithaxo/code-word---empathy",
"http://thecolbertreport.cc.com/videos/e4d421/the-prescott-group-bailout",
"http://thecolbertreport.cc.com/videos/57pcxy/j-j--abrams",
"http://thecolbertreport.cc.com/videos/3q06z6/sign-off---colbert-nation-home"
],
"guest": "J.J. Abrams"
},
{
"date": "2009-05-05",
"videos": [
"http://thecolbertreport.cc.com/videos/1yb1cp/intro---05-05-09",
"http://thecolbertreport.cc.com/videos/daeu0o/cinco-de-mayo-precautions",
"http://thecolbertreport.cc.com/videos/73g8ui/the-word---captain-kangaroo-court",
"http://thecolbertreport.cc.com/videos/sye42t/paul-rieckhoff",
"http://thecolbertreport.cc.com/videos/xul98m/sign-off---iteam",
"http://thecolbertreport.cc.com/videos/0a05it/movies-that-are-destroying-america---summer-movie-edition"
],
"guest": "Cliff Sloan, Paul Rieckhoff"
},
{
"date": "2009-05-06",
"videos": [
"http://thecolbertreport.cc.com/videos/4aqttz/intro---05-06-09",
"http://thecolbertreport.cc.com/videos/k97z53/colbert-branson-duel",
"http://thecolbertreport.cc.com/videos/4h8qcx/where-and-when-is-stephen-going-to-the-persian-gulf----saudi-arabia",
"http://thecolbertreport.cc.com/videos/q7lfqg/laurie-garrett",
"http://thecolbertreport.cc.com/videos/2y8ihh/hug-your-television",
"http://thecolbertreport.cc.com/videos/mekuw6/picking-a-new-supreme-court-justice---cliff-sloan"
],
"guest": "Laurie Garrett"
},
{
"date": "2009-05-07",
"videos": [
"http://thecolbertreport.cc.com/videos/nqr22g/intro---05-07-09",
"http://thecolbertreport.cc.com/videos/40ivqy/sean-hannity-s-liberty-tree",
"http://thecolbertreport.cc.com/videos/ednx54/smokin--pole---the-fight-for-arctic-riches--inuit-nation",
"http://thecolbertreport.cc.com/videos/as8qiu/mitchell-joachim",
"http://thecolbertreport.cc.com/videos/4bas9p/spay-and-neuter-your-pets",
"http://thecolbertreport.cc.com/videos/686y3f/tip-wag---forced-smoking---grizzly-best-man"
],
"guest": "Mitchell Joachim"
},
{
"date": "2009-05-11",
"videos": [
"http://thecolbertreport.cc.com/videos/imn21t/intro---05-11-09",
"http://thecolbertreport.cc.com/videos/cctfpl/stephen-s-fancy-feast",
"http://thecolbertreport.cc.com/videos/bwc8x1/credit-card-industry-regulation---tamara-draut",
"http://thecolbertreport.cc.com/videos/cguksk/alpha-dog-of-the-week---erik-slye",
"http://thecolbertreport.cc.com/videos/3ttm11/jeff-daniels"
],
"guest": "Tamara Draut"
},
{
"date": "2009-05-12",
"videos": [
"http://thecolbertreport.cc.com/videos/wr98c1/intro---05-12-09",
"http://thecolbertreport.cc.com/videos/zy5zj6/howard-s-end",
"http://thecolbertreport.cc.com/videos/n89zl7/cuba-us-trade-relations---julia-sweig",
"http://thecolbertreport.cc.com/videos/hs7gtm/stephen-s-sound-advice---how-to-re-brand-the-gop",
"http://thecolbertreport.cc.com/videos/a0bgn9/ron-howard",
"http://thecolbertreport.cc.com/videos/6fx090/credit-check",
"http://thecolbertreport.cc.com/videos/lzvish/sign-off---unicorn-dealership"
],
"guest": "Ron Howard"
},
{
"date": "2009-05-13",
"videos": [
"http://thecolbertreport.cc.com/videos/yvcq61/intro---05-13-09",
"http://thecolbertreport.cc.com/videos/g3716f/robert-gibbs-hates-ringing-cell-phones",
"http://thecolbertreport.cc.com/videos/hp9jyy/colbert-platinum----1-000-dishes",
"http://thecolbertreport.cc.com/videos/eon7i2/michael-pollan",
"http://thecolbertreport.cc.com/videos/0it13s/stephen-colbert-is-awesome",
"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://thecolbertreport.cc.com/videos/ph1m2t/intro---05-14-09",
"http://thecolbertreport.cc.com/videos/priitm/caveman-porn-stash",
"http://thecolbertreport.cc.com/videos/phfour/donorschoose-org-donations",
"http://thecolbertreport.cc.com/videos/m82ydm/yusuf",
"http://thecolbertreport.cc.com/videos/vyychn/stephen-s-coke-party-protest"
],
"guest": "Yusuf"
},
{
"date": "2009-05-18",
"videos": [
"http://thecolbertreport.cc.com/videos/hopfi8/intro---05-18-09",
"http://thecolbertreport.cc.com/videos/gc17yz/welcome-to-the-real-world--obama",
"http://thecolbertreport.cc.com/videos/oh4xki/threatdown---charity--casual-jesus---robot-teachers",
"http://thecolbertreport.cc.com/videos/phv8h6/meghan-mccain",
"http://thecolbertreport.cc.com/videos/h4dfgj/sign-off---internal-clock"
],
"guest": "Meghan McCain"
},
{
"date": "2009-05-19",
"videos": [
"http://thecolbertreport.cc.com/videos/k69zx1/intro---05-19-09",
"http://thecolbertreport.cc.com/videos/um8x6x/rumsfeld-s-cover-letter-bible-quotes",
"http://thecolbertreport.cc.com/videos/9w54d6/difference-makers---stephen-keith",
"http://thecolbertreport.cc.com/videos/tn9xuo/walter-kirn",
"http://thecolbertreport.cc.com/videos/l2dw5z/stephen-s-show",
"http://thecolbertreport.cc.com/videos/y5v5ns/the-word---tough-cell"
],
"guest": "Walter Kirn"
},
{
"date": "2009-05-20",
"videos": [
"http://thecolbertreport.cc.com/videos/zq89uw/intro---05-20-09",
"http://thecolbertreport.cc.com/videos/b9eth2/extra--extra--bleed-all-about-it-",
"http://thecolbertreport.cc.com/videos/e5f1sd/donorschoose-org-classroom-projects",
"http://thecolbertreport.cc.com/videos/u2rpts/seth-shostak",
"http://thecolbertreport.cc.com/videos/m63aac/goodnight",
"http://thecolbertreport.cc.com/videos/i401ml/the-word---i-know-you-are-but-what-am-i-"
],
"guest": "Seth Shostak"
},
{
"date": "2009-05-21",
"videos": [
"http://thecolbertreport.cc.com/videos/sll291/intro---05-21-09",
"http://thecolbertreport.cc.com/videos/hck7te/47-million-year-old-fossil",
"http://thecolbertreport.cc.com/videos/4kzrbn/formidable-opponent---pragmatism-or-idealism",
"http://thecolbertreport.cc.com/videos/ait1y2/green-day",
"http://thecolbertreport.cc.com/videos/iuaf6k/she-said--cia-said---bob-graham"
],
"guest": "Green Day"
},
{
"date": "2009-06-01",
"videos": [
"http://thecolbertreport.cc.com/videos/kbuqbk/intro---06-01-09",
"http://thecolbertreport.cc.com/videos/ckumab/guns-in-national-parks",
"http://thecolbertreport.cc.com/videos/ezeifx/sonia-sotomayor-s-nomination---jeffrey-toobin",
"http://thecolbertreport.cc.com/videos/2p70rc/where-and-when-is-stephen-going-to-the-persian-gulf----united-arab-emirates",
"http://thecolbertreport.cc.com/videos/4suoo4/byron-dorgan"
],
"guest": "Jeffrey Toobin, Sen. Byron Dorgan"
},
{
"date": "2009-06-02",
"videos": [
"http://thecolbertreport.cc.com/videos/poyt56/intro---06-02-09",
"http://thecolbertreport.cc.com/videos/xahwo7/saudi-arabia-press-restrictions",
"http://thecolbertreport.cc.com/videos/m4ur7f/jim-moran-vs--viagra",
"http://thecolbertreport.cc.com/videos/bpwglm/katty-kay",
"http://thecolbertreport.cc.com/videos/860dm5/best-audience-of-the-night",
"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://thecolbertreport.cc.com/videos/lte593/intro---06-03-09",
"http://thecolbertreport.cc.com/videos/1azzsn/we-have-a-death-star-",
"http://thecolbertreport.cc.com/videos/in49m6/tip-wag---4th-of-july--craig-t--nelson---gm",
"http://thecolbertreport.cc.com/videos/ughago/eric-schlosser",
"http://thecolbertreport.cc.com/videos/fw7nrm/sign-off----the-hollow-men-",
"http://thecolbertreport.cc.com/videos/rfeepg/cheating-death---cheerios--soda-paralysis---oprah-s-crazy-talk"
],
"guest": "Eric Schlosser"
},
{
"date": "2009-06-04",
"videos": [
"http://thecolbertreport.cc.com/videos/rpkl6b/intro---06-04-09",
"http://thecolbertreport.cc.com/videos/oqx005/wikipedia-bans-scientologists",
"http://thecolbertreport.cc.com/videos/anuhnx/craziest-f--king-thing-i-ve-ever-heard---external-lungs",
"http://thecolbertreport.cc.com/videos/obi6e0/dag-soderberg",
"http://thecolbertreport.cc.com/videos/u226dl/the-word---i-do--you-don-t"
],
"guest": "Dag Soderberg, David Byrne"
},
{
"date": "2009-06-08",
"videos": [
"http://thecolbertreport.cc.com/videos/gbu94e/operation-iraqi-stephen---mysterious-trip",
"http://thecolbertreport.cc.com/videos/wy7a2l/operation-iraqi-stephen---john-mccain",
"http://thecolbertreport.cc.com/videos/n4g2vg/stephen-strong---army-of-me---basic-training-pt--1",
"http://thecolbertreport.cc.com/videos/c4z5y3/obama-orders-stephen-s-haircut---ray-odierno",
"http://thecolbertreport.cc.com/videos/m6uaot/sign-off---new-haircut"
],
"guest": "Stephen broadcasts from Iraq, Gen. Ray Odierno"
},
{
"date": "2009-06-09",
"videos": [
"http://thecolbertreport.cc.com/videos/xuowp6/operation-iraqi-stephen---s-h-",
"http://thecolbertreport.cc.com/videos/nlvzz2/operation-iraqi-stephen---bill-clinton---amp-energy",
"http://thecolbertreport.cc.com/videos/8querl/formidable-opponent---don-t-ask--don-t-tell",
"http://thecolbertreport.cc.com/videos/xjmvnq/tareq-salha---robin-balcom",
"http://thecolbertreport.cc.com/videos/bdo17v/sign-off---hi--stephen-s-mom",
"http://thecolbertreport.cc.com/videos/clgan9/the-word---why-are-you-here-"
],
"guest": "Stephen broadcasts from Iraq (1)"
},
{
"date": "2009-06-10",
"videos": [
"http://thecolbertreport.cc.com/videos/3avxyi/operation-iraqi-stephen---stephen-s-spider-hole",
"http://thecolbertreport.cc.com/videos/cyrxgp/admiral-crunch",
"http://thecolbertreport.cc.com/videos/xfobul/lt--gen--charles-h--jacoby-jr-",
"http://thecolbertreport.cc.com/videos/jk0yi6/sign-off---head-rub",
"http://thecolbertreport.cc.com/videos/nlng6v/operation-iraqi-stephen---tom-hanks-care-package",
"http://thecolbertreport.cc.com/videos/xbtx2g/stephen-strong---army-of-me---basic-training-pt--2"
],
"guest": "Stephen broadcasts from Iraq (2)"
},
{
"date": "2009-06-11",
"videos": [
"http://thecolbertreport.cc.com/videos/x1yyko/stephen-gets-his-hair-cut",
"http://thecolbertreport.cc.com/videos/ithwrz/operation-iraqi-stephen---golf-club---george-w--bush-s-greeting",
"http://thecolbertreport.cc.com/videos/9p7eto/operation-iraqi-stephen---fallback-position---air-force-thunderbirds",
"http://thecolbertreport.cc.com/videos/hqcfyh/operation-iraqi-stephen---frank-a--grippe",
"http://thecolbertreport.cc.com/videos/aa7w7z/operation-iraqi-stephen---sign-off---honey--i-m-coming-home",
"http://thecolbertreport.cc.com/videos/74tfzb/better-know-a-cradle-of-civilization---barham-saleh"
],
"guest": "Stephen broadcasts from Iraq (3)"
},
{
"date": "2009-06-15",
"videos": [
"http://thecolbertreport.cc.com/videos/7zoy4v/intro---06-15-09",
"http://thecolbertreport.cc.com/videos/ycfoc7/warm-memories-of-iraq",
"http://thecolbertreport.cc.com/videos/cgcvlh/car-shout---gm---chrysler",
"http://thecolbertreport.cc.com/videos/px4jql/austan-goolsbee",
"http://thecolbertreport.cc.com/videos/22hank/sign-off---driving-for-the-last-10-minutes"
],
"guest": "Austan Goolsbee"
},
{
"date": "2009-06-16",
"videos": [
"http://thecolbertreport.cc.com/videos/6kwzzi/intro---06-16-09",
"http://thecolbertreport.cc.com/videos/e51xox/croatia-s-biggest-jeans-world-record",
"http://thecolbertreport.cc.com/videos/86p43v/teh-runoff---karim-sadjadpour",
"http://thecolbertreport.cc.com/videos/guirtz/balls-for-kidz---carnivals-encore",
"http://thecolbertreport.cc.com/videos/8g3agb/jim-rogers",
"http://thecolbertreport.cc.com/videos/1bur1p/stephen-s-sound-advice---how-to-be-a-totalitarian-nutjob"
],
"guest": "Karim Sadjadpour, Jim Rogers"
},
{
"date": "2009-06-17",
"videos": [
"http://thecolbertreport.cc.com/videos/vz7xis/intro---06-17-09",
"http://thecolbertreport.cc.com/videos/y8n8bj/stephen-s-positive-obama-coverage",
"http://thecolbertreport.cc.com/videos/v8qfms/the-word---bohemian-grove",
"http://thecolbertreport.cc.com/videos/fgc5qj/alpha-dog-of-the-week---silvio-berlusconi",
"http://thecolbertreport.cc.com/videos/6wqhd0/joshua-micah-marshall",
"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://thecolbertreport.cc.com/videos/ewcaj5/intro---06-18-09",
"http://thecolbertreport.cc.com/videos/0qwej8/murder-in-the-white-house---jeff-goldblum",
"http://thecolbertreport.cc.com/videos/nmpsnk/bears---balls---tobacco--project-natal---graveyard-bids",
"http://thecolbertreport.cc.com/videos/e8rev9/paul-muldoon",
"http://thecolbertreport.cc.com/videos/dvld1q/sign-off---law---order-preview",
"http://thecolbertreport.cc.com/videos/e8h8e5/murder-in-the-white-house---fly-widow-interview",
"http://thecolbertreport.cc.com/videos/e72lp2/sign-off---aloha--idaho"
],
"guest": "Paul Muldoon"
},
{
"date": "2009-06-22",
"videos": [
"http://thecolbertreport.cc.com/videos/je4uya/intro---06-22-09",
"http://thecolbertreport.cc.com/videos/91fk6r/zicam-recall",
"http://thecolbertreport.cc.com/videos/h9527k/the-enemy-within---cane-fu",
"http://thecolbertreport.cc.com/videos/he9dc0/simon-schama",
"http://thecolbertreport.cc.com/videos/k4vrsb/sign-off---stephen-suffers--too"
],
"guest": "Simon Schama"
},
{
"date": "2009-06-23",
"videos": [
"http://thecolbertreport.cc.com/videos/wovkbp/barack-obama-s-response-to-iran",
"http://thecolbertreport.cc.com/videos/yaknra/america-s-health-plan-demic",
"http://thecolbertreport.cc.com/videos/xc1sqp/governor-alert---the-search-for-mark-sanford",
"http://thecolbertreport.cc.com/videos/fmv6yq/david-kilcullen",
"http://thecolbertreport.cc.com/videos/i99yp3/the-smell-of-freedom---jeff-goldblum"
],
"guest": "Howard Dean, David Kilcullen"
},
{
"date": "2009-06-24",
"videos": [
"http://thecolbertreport.cc.com/videos/rhiizu/intro---06-24-09",
"http://thecolbertreport.cc.com/videos/5xejpe/mark-sanford-does-something-interesting",
"http://thecolbertreport.cc.com/videos/neths8/matthew-crawford",
"http://thecolbertreport.cc.com/videos/i50dum/sign-off---random-gps-coordinate-lottery",
"http://thecolbertreport.cc.com/videos/jkobj5/america-s-health-plan-demic---howard-dean",
"http://thecolbertreport.cc.com/videos/411cqv/sign-off---goodnight"
],
"guest": "Matthew Crawford"
},
{
"date": "2009-06-25",
"videos": [
"http://thecolbertreport.cc.com/videos/j1tx3a/intro---06-25-09",
"http://thecolbertreport.cc.com/videos/g71yl5/gay-demon-on-the-loose",
"http://thecolbertreport.cc.com/videos/5gki1y/commonsense-health-care-reform-infomercial",
"http://thecolbertreport.cc.com/videos/ohjhjq/jim-fouratt",
"http://thecolbertreport.cc.com/videos/l3h2eg/sign-off---one-breath",
"http://thecolbertreport.cc.com/videos/nw0bxn/sport-report---soccer--tennis---brett-favre"
],
"guest": "Jim Fouratt"
},
{
"date": "2009-06-29",
"videos": [
"http://thecolbertreport.cc.com/videos/ehxpq9/jeff-goldblum-will-be-missed",
"http://thecolbertreport.cc.com/videos/di8fs8/michael-jackson-s-media-attention",
"http://thecolbertreport.cc.com/videos/8ouc6a/the-word---noncensus",
"http://thecolbertreport.cc.com/videos/4zr9io/neil-degrasse-tyson"
],
"guest": "Neil DeGrasse Tyson"
},
{
"date": "2009-06-30",
"videos": [
"http://thecolbertreport.cc.com/videos/klvpw6/intro---06-30-09",
"http://thecolbertreport.cc.com/videos/hy9hl7/al-franken-finally-declared-senator",
"http://thecolbertreport.cc.com/videos/hzd5cg/4th-of-july-under-attack",
"http://thecolbertreport.cc.com/videos/jzev8y/is-it-time-to-care-about-soccer-",
"http://thecolbertreport.cc.com/videos/knfvfz/is-it-time-to-care-about-soccer----alexi-lalas",
"http://thecolbertreport.cc.com/videos/8x5ezx/kevin-mattson",
"http://thecolbertreport.cc.com/videos/ehxpq9/jeff-goldblum-will-be-missed"
],
"guest": "Alexi Lalas, Kevin Mattson"
},
{
"date": "2009-07-01",
"videos": [
"http://thecolbertreport.cc.com/videos/umpd2x/intro---07-01-09",
"http://thecolbertreport.cc.com/videos/opbzv4/the-second-coming-of-ronald-reagan",
"http://thecolbertreport.cc.com/videos/6wo5t4/the-clinton-curse",
"http://thecolbertreport.cc.com/videos/heqh3g/judge--jury---executioner---firefighters--gold-waste---strip-search",
"http://thecolbertreport.cc.com/videos/r9zau8/nicholas-kristof",
"http://thecolbertreport.cc.com/videos/sldptb/sign-off---farewell--david-souter"
],
"guest": "Nicholas Kristof"
},
{
"date": "2009-07-02",
"videos": [
"http://thecolbertreport.cc.com/videos/f4016f/intro---07-02-09",
"http://thecolbertreport.cc.com/videos/mc9la4/cnn-finds-bubbles-the-chimp",
"http://thecolbertreport.cc.com/videos/n31uuy/re-report---lost-treasures-of-babylon",
"http://thecolbertreport.cc.com/videos/v5trw8/ed-viesturs",
"http://thecolbertreport.cc.com/videos/zc3q4z/sign-off---see-you-at-the-bar",
"http://thecolbertreport.cc.com/videos/sedae1/tip-wag---cynthia-davis---fox-news",
"http://thecolbertreport.cc.com/videos/wyj1b1/sign-off---get-your-illegal-fireworks"
],
"guest": "Ed Viesturs"
},
{
"date": "2009-07-13",
"videos": [
"http://thecolbertreport.cc.com/videos/4zm73s/intro---07-13-09",
"http://thecolbertreport.cc.com/videos/m8x1rr/va-backlog---paul-rieckhoff",
"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://thecolbertreport.cc.com/videos/w7y41r/intro---07-14-09",
"http://thecolbertreport.cc.com/videos/17wwbv/raise-high-the-rage-beams",
"http://thecolbertreport.cc.com/videos/o7y2te/leymah-gbowee",
"http://thecolbertreport.cc.com/videos/9nhp7n/sign-off---the-pitcher-in-the-oat",
"http://thecolbertreport.cc.com/videos/55a0ws/remembering-remembering-michael-jackson",
"http://thecolbertreport.cc.com/videos/bfjyjy/stephen-s-sound-advice---how-to-bork-a-nominee"
],
"guest": "Leymah Gbowee"
},
{
"date": "2009-07-15",
"videos": [
"http://thecolbertreport.cc.com/videos/38zw9a/intro---07-15-09",
"http://thecolbertreport.cc.com/videos/7avxb3/stephen-wants-to-be-the-worst-person-in-the-world",
"http://thecolbertreport.cc.com/videos/yhsbjx/difference-makers---doug-jackson",
"http://thecolbertreport.cc.com/videos/jkayfy/douglas-rushkoff",
"http://thecolbertreport.cc.com/videos/1ikoxj/sign-off---no-man-is-a-failure",
"http://thecolbertreport.cc.com/videos/9vyt62/senator-wences-questions-sonia-sotomayor",
"http://thecolbertreport.cc.com/videos/jb4xw4/the-word---guns--credit--and-corn"
],
"guest": "Douglas Rushkoff"
},
{
"date": "2009-07-16",
"videos": [
"http://thecolbertreport.cc.com/videos/n291gl/intro---07-16-09",
"http://thecolbertreport.cc.com/videos/7pmbq4/the-memy-awards",
"http://thecolbertreport.cc.com/videos/3ahlmo/cheating-death---diabetes-dogs--chocolate-milk---swearing-in-pain",
"http://thecolbertreport.cc.com/videos/7hp904/edmund-andrews",
"http://thecolbertreport.cc.com/videos/1wc2dn/sign-off---stephen-wins",
"http://thecolbertreport.cc.com/videos/cqz0pq/tip-wag---assassination-squads--biblical-history---gay-penguins"
],
"guest": "Edmund Andrews"
},
{
"date": "2009-07-20",
"videos": [
"http://thecolbertreport.cc.com/videos/z5a6bx/walter-cronkite-remembered",
"http://thecolbertreport.cc.com/videos/0a6zq6/reverse-racism",
"http://thecolbertreport.cc.com/videos/wqv2b7/sport-report---jessica-simpson--olympic-brothel---bud-light",
"http://thecolbertreport.cc.com/videos/bowvin/bob-park",
"http://thecolbertreport.cc.com/videos/x2ppm1/sign-off---goodnight"
],
"guest": "Geoffrey Canada, Bob Park"
},
{
"date": "2009-07-21",
"videos": [
"http://thecolbertreport.cc.com/videos/78h601/intro---07-21-09",
"http://thecolbertreport.cc.com/videos/1egi6s/40th-anniversary-of-the-moon-landing",
"http://thecolbertreport.cc.com/videos/puckfx/better-know-a-lobby---acorn",
"http://thecolbertreport.cc.com/videos/gwtxoo/aaron-carroll",
"http://thecolbertreport.cc.com/videos/o84f1o/sign-off---stephen-s-chip",
"http://thecolbertreport.cc.com/videos/hmh0yy/reverse-racism---geoffrey-canada"
],
"guest": "Dr. Aaron Carroll"
},
{
"date": "2009-07-22",
"videos": [
"http://thecolbertreport.cc.com/videos/j9y28p/intro---07-22-09",
"http://thecolbertreport.cc.com/videos/43yfk6/the-longest-solar-eclipse-of-the-century",
"http://thecolbertreport.cc.com/videos/8st941/sniper-trifle---matthew-waxman",
"http://thecolbertreport.cc.com/videos/gda2z2/pope-wrist-watch",
"http://thecolbertreport.cc.com/videos/hlljrv/chris-anderson",
"http://thecolbertreport.cc.com/videos/tzs7et/the-word---a-perfect-world"
],
"guest": "Matthew Waxman, Chris Anderson"
},
{
"date": "2009-07-23",
"videos": [
"http://thecolbertreport.cc.com/videos/abmeny/health-care-reform-is-the-matrix",
"http://thecolbertreport.cc.com/videos/al2ar6/health-care-hell-scare---die-agnosis--mur-dr",
"http://thecolbertreport.cc.com/videos/lb7ei8/sign-off---tivo",
"http://thecolbertreport.cc.com/videos/l3lw8t/sniper-trifle",
"http://thecolbertreport.cc.com/videos/1y6s8z/sign-off---goodnight"
],
"guest": "Zev Chafets"
},
{
"date": "2009-07-27",
"videos": [
"http://thecolbertreport.cc.com/videos/g64g5i/intro---07-27-09",
"http://thecolbertreport.cc.com/videos/bx3wyo/sarah-palin-will-be-missed",
"http://thecolbertreport.cc.com/videos/5mjokj/nailed--em---library-crime",
"http://thecolbertreport.cc.com/videos/c4hocz/movits-"
],
"guest": "Movits"
},
{
"date": "2009-07-28",
"videos": [
"http://thecolbertreport.cc.com/videos/nwsa83/president-obama-s-teachable-moment",
"http://thecolbertreport.cc.com/videos/574gc1/womb-raiders---the-fight-for-the-truth-behind-obama-s-birth",
"http://thecolbertreport.cc.com/videos/wg36jw/arianna-huffington",
"http://thecolbertreport.cc.com/videos/aayh4c/sign-off---devil-s-tricks",
"http://thecolbertreport.cc.com/videos/g64g5i/intro---07-27-09"
],
"guest": "Arianna Huffington"
},
{
"date": "2009-07-29",
"videos": [
"http://thecolbertreport.cc.com/videos/n0hvmj/intro---07-29-09",
"http://thecolbertreport.cc.com/videos/em0er2/frank-the-roommate",
"http://thecolbertreport.cc.com/videos/hw67wd/sport-report---tour-de-france---robotic-baseball",
"http://thecolbertreport.cc.com/videos/2dvjk4/kevin-baker",
"http://thecolbertreport.cc.com/videos/h00qyf/sign-off---watch-without-blinking",
"http://thecolbertreport.cc.com/videos/zafhtu/womb-raiders---orly-taitz"
],
"guest": "Kevin Baker"
},
{
"date": "2009-07-30",
"videos": [
"http://thecolbertreport.cc.com/videos/jdw6pa/intro---07-30-09",
"http://thecolbertreport.cc.com/videos/uq6k19/white-house-beer-summit",
"http://thecolbertreport.cc.com/videos/fmie7p/tip-wag---man-words---movits-",
"http://thecolbertreport.cc.com/videos/g75n20/kathryn-bigelow",
"http://thecolbertreport.cc.com/videos/2mqpw1/sign-off---taco-bell-spokesdog",
"http://thecolbertreport.cc.com/videos/10c870/the-word---he-who-smelt-it--dealt-it"
],
"guest": "Kathryn Bigelow"
},
{
"date": "2009-08-03",
"videos": [
"http://thecolbertreport.cc.com/videos/6tkw9s/intro---08-03-09",
"http://thecolbertreport.cc.com/videos/g2s68c/dominic-philip-s-book-habit",
"http://thecolbertreport.cc.com/videos/kc14p7/nailed--em---war-on-birth-control",
"http://thecolbertreport.cc.com/videos/yre45i/tony-zinni",
"http://thecolbertreport.cc.com/videos/vv0gs6/sign-off---goodnight"
],
"guest": "Gen. Tony Zinni"
},
{
"date": "2009-08-04",
"videos": [
"http://thecolbertreport.cc.com/videos/2qha08/merry-barackmas",
"http://thecolbertreport.cc.com/videos/wyon84/the-word---hippie-replacement",
"http://thecolbertreport.cc.com/videos/m1d4yt/kurt-andersen",
"http://thecolbertreport.cc.com/videos/e8glog/sign-off---love-makes-the-world-go-round",
"http://thecolbertreport.cc.com/videos/lqp674/bears---balls---how-to-pay-for-health-care"
],
"guest": "Kurt Andersen"
},
{
"date": "2009-08-05",
"videos": [
"http://thecolbertreport.cc.com/videos/dozbxd/bill-clinton-s-personal-appearance",
"http://thecolbertreport.cc.com/videos/pedumk/2010-midterms---joe-sestak",
"http://thecolbertreport.cc.com/videos/8s2cpt/kris-kobach",
"http://thecolbertreport.cc.com/videos/5f7tro/sign-off---goodnight",
"http://thecolbertreport.cc.com/videos/7wxgsg/colbert-bump-cocktail---david-wondrich"
],
"guest": "Kris Kobach"
},
{
"date": "2009-08-06",
"videos": [
"http://thecolbertreport.cc.com/videos/vesroc/intro---08-06-09",
"http://thecolbertreport.cc.com/videos/7qrkub/back-to-school-with-jeremih",
"http://thecolbertreport.cc.com/videos/04qijm/movies-that-are-destroying-america---summer",
"http://thecolbertreport.cc.com/videos/zar0yt/meryl-streep",
"http://thecolbertreport.cc.com/videos/diktol/sign-off---goodnight",
"http://thecolbertreport.cc.com/videos/updeyd/human-week"
],
"guest": "Meryl Streep"
},
{
"date": "2009-08-10",
"videos": [
"http://thecolbertreport.cc.com/videos/gaywhl/intro---08-10-09",
"http://thecolbertreport.cc.com/videos/0aiuqk/death-panels",
"http://thecolbertreport.cc.com/videos/1d8uxl/better-know-a-district---maine-s-1st---chellie-pingree",
"http://thecolbertreport.cc.com/videos/klodac/barbara-boxer",
"http://thecolbertreport.cc.com/videos/9r0u01/sign-off---encore"
],
"guest": "Sen. Barbara Boxer"
},
{
"date": "2009-08-11",
"videos": [
"http://thecolbertreport.cc.com/videos/1qhrzu/intro---08-11-09",
"http://thecolbertreport.cc.com/videos/tq0ixs/stephen-s-driving-tips-via-twitter-service",
"http://thecolbertreport.cc.com/videos/kc7xgf/alpha-dog-of-the-week---betty-lichtenstein",
"http://thecolbertreport.cc.com/videos/0ivmu5/jonathan-cohn",
"http://thecolbertreport.cc.com/videos/9pu9xl/sign-off---prevent-forest-fires",
"http://thecolbertreport.cc.com/videos/dra60l/cold-war-update---cuba---topless-putin"
],
"guest": "Jonathan Cohn"
},
{
"date": "2009-08-12",
"videos": [
"http://thecolbertreport.cc.com/videos/9g2evg/intro---08-12-09",
"http://thecolbertreport.cc.com/videos/cypmfk/americans-sacrifice-their-ipods",
"http://thecolbertreport.cc.com/videos/5esjcx/formidable-opponent---health-care---burger-king",
"http://thecolbertreport.cc.com/videos/53n2qf/mark-johnson",
"http://thecolbertreport.cc.com/videos/j153gh/yes-we-afghan---james-carville"
],
"guest": "Mark Johnson"
},
{
"date": "2009-08-13",
"videos": [
"http://thecolbertreport.cc.com/videos/3rk7mk/intro---08-13-09",
"http://thecolbertreport.cc.com/videos/d9wypw/sheila-jackson-lee-takes-a-phone-call",
"http://thecolbertreport.cc.com/videos/1fblyv/cheating-death---blue-m-ms--vitamin-d---hormones",
"http://thecolbertreport.cc.com/videos/pfw8xc/mark-devlin",
"http://thecolbertreport.cc.com/videos/xagarl/sign-off---stephen-s-online-information",
"http://thecolbertreport.cc.com/videos/8bsp4q/who-s-not-honoring-me-now----obama--nra---teen-choice-awards"
],
"guest": "Mark Devlin"
},
{
"date": "2009-08-17",
"videos": [
"http://thecolbertreport.cc.com/videos/eu8yuk/intro---08-17-09",
"http://thecolbertreport.cc.com/videos/54nh4d/obama-publishes-health-care-op-ed",
"http://thecolbertreport.cc.com/videos/xe1vuk/even-better-er-know-a-district---colorado-s-2nd---jared-polis",
"http://thecolbertreport.cc.com/videos/p4m942/bill-mckibben",
"http://thecolbertreport.cc.com/videos/rasuqa/sign-off---goodnight"
],
"guest": "Bill McKibben"
},
{
"date": "2009-08-18",
"videos": [
"http://thecolbertreport.cc.com/videos/wagj66/intro---08-18-09",
"http://thecolbertreport.cc.com/videos/wu0pjh/hamid-karzai-endorsement",
"http://thecolbertreport.cc.com/videos/z3d9c9/tip-wag---german-campaign--russian-dogs---flying-rabbis",
"http://thecolbertreport.cc.com/videos/xjhfzn/robert-wright",
"http://thecolbertreport.cc.com/videos/nw5bk3/sign-off--shofar",
"http://thecolbertreport.cc.com/videos/79rlpw/the-word---must-be-tv"
],
"guest": "Robert Wright"
},
{
"date": "2009-08-19",
"videos": [
"http://thecolbertreport.cc.com/videos/eu5hos/barney-frank-refuses-to-talk-to-a-dining-room-table",
"http://thecolbertreport.cc.com/videos/f6lol5/sugar-shortage---marion-nestle",
"http://thecolbertreport.cc.com/videos/ckefur/ang-lee",
"http://thecolbertreport.cc.com/videos/qwyqmu/sign-off---goodnight",
"http://thecolbertreport.cc.com/videos/jrwpha/the-word---arch-enemies"
],
"guest": "Ang Lee"
},
{
"date": "2009-08-20",
"videos": [
"http://thecolbertreport.cc.com/videos/om1fcy/intro---08-20-09",
"http://thecolbertreport.cc.com/videos/bgxuqk/france-bans-elephants",
"http://thecolbertreport.cc.com/videos/ho2y6d/stephen-s-sound-advice---how-to-make-babies",
"http://thecolbertreport.cc.com/videos/3muzmh/chris-matthews",
"http://thecolbertreport.cc.com/videos/gv0u6s/sign-off---vacation-begins",
"http://thecolbertreport.cc.com/videos/k1zrq2/colbert-platinum---urbane-nomads--gigayacht---michael-jackson-diamond"
],
"guest": "Chris Matthews"
},
{
"date": "2009-09-14",
"videos": [
"http://thecolbertreport.cc.com/videos/dq2vzv/intro---09-14-09",
"http://thecolbertreport.cc.com/videos/npiiku/conservatives-are-back",
"http://thecolbertreport.cc.com/videos/ehltxr/kanye-west-interrupts-taylor-swift-at-the-vmas",
"http://thecolbertreport.cc.com/videos/ljbubg/cory-booker",
"http://thecolbertreport.cc.com/videos/4kq9de/sign-off---goodnight"
],
"guest": "Cory Booker"
},
{
"date": "2009-09-15",
"videos": [
"http://thecolbertreport.cc.com/videos/drgqxg/world-record-for-mexican-insults",
"http://thecolbertreport.cc.com/videos/c9v1s6/the-word---let-freedom-ka-ching",
"http://thecolbertreport.cc.com/videos/qm9oq3/christiane-amanpour",
"http://thecolbertreport.cc.com/videos/tcjp92/stephen-loses-world-record-to-lou-dobbs",
"http://thecolbertreport.cc.com/videos/hen1ip/better-know-a-lobby---health-care-for-america-now"
],
"guest": "Christiane Amanpour"
},
{
"date": "2009-09-16",
"videos": [
"http://thecolbertreport.cc.com/videos/ch7xyz/intro---09-16-09",
"http://thecolbertreport.cc.com/videos/dp3jiw/body-worlds-plans-cadaver-sex-exhibit",
"http://thecolbertreport.cc.com/videos/p1ugzo/figgy-moonpowder",
"http://thecolbertreport.cc.com/videos/1642tt/wayne-coyne",
"http://thecolbertreport.cc.com/videos/pafbhp/citizens-united-v--federal-election-commission---jeffrey-toobin"
],
"guest": "The Flaming Lips"
},
{
"date": "2009-09-17",
"videos": [
"http://thecolbertreport.cc.com/videos/oclyoo/goat-lab",
"http://thecolbertreport.cc.com/videos/5psdx6/goat-lab---jon-ronson",
"http://thecolbertreport.cc.com/videos/3zmd8j/frank-bruni",
"http://thecolbertreport.cc.com/videos/xl4dp2/i-s-on-edjukashun---muslim-textbooks---tony-danza"
],
"guest": "Frank Bruni"
},
{
"date": "2009-09-22",
"videos": [
"http://thecolbertreport.cc.com/videos/fscepw/intro---09-22-09",
"http://thecolbertreport.cc.com/videos/brwe58/atone-phone---emmy-awards",
"http://thecolbertreport.cc.com/videos/h3pbsv/atone-phone---jon-stewart-calls-to-apologize",
"http://thecolbertreport.cc.com/videos/oqiy0y/shai-agassi",
"http://thecolbertreport.cc.com/videos/zxvw0a/sign-off---shofar-goodnight"
],
"guest": "Shai Agassi"
},
{
"date": "2009-09-23",
"videos": [
"http://thecolbertreport.cc.com/videos/epco4o/lunatic-dictator-accommodations",
"http://thecolbertreport.cc.com/videos/xtts8p/capitalism-s-enemy---michael-moore",
"http://thecolbertreport.cc.com/videos/hwx2pv/aj-jacobs",
"http://thecolbertreport.cc.com/videos/8ch7no/sign-off---thank-you-for-joining-us",
"http://thecolbertreport.cc.com/videos/npdo9z/tip-wag---guns-on-amtrak--fake-lesbians---battleship-audition"
],
"guest": "Michael Moore, A.J. Jacobs"
},
{
"date": "2009-09-24",
"videos": [
"http://thecolbertreport.cc.com/videos/92d7p3/intro---09-24-09",
"http://thecolbertreport.cc.com/videos/srdbkv/atone-phone---larry-king-calls",
"http://thecolbertreport.cc.com/videos/f4xrhk/easter-under-attack---peeps-display",
"http://thecolbertreport.cc.com/videos/xqer72/ken-burns",
"http://thecolbertreport.cc.com/videos/cqqzqe/sign-off---automated-desk",
"http://thecolbertreport.cc.com/videos/rh4p4f/tom-delay-dances-with-the-stars"
],
"guest": "Ken Burns"
},
{
"date": "2009-09-28",
"videos": [
"http://thecolbertreport.cc.com/videos/ph4cw3/atone-phone---last-day-of-apologies",
"http://thecolbertreport.cc.com/videos/89wc6t/do--dump-or-marry",
"http://thecolbertreport.cc.com/videos/r9at2m/sheryl-wudunn",
"http://thecolbertreport.cc.com/videos/wsefin/sign-off---goodnight--conan"
],
"guest": "Sheryl WuDunn"
},
{
"date": "2009-09-29",
"videos": [
"http://thecolbertreport.cc.com/videos/8qd7gf/intro---09-29-09",
"http://thecolbertreport.cc.com/videos/4bcajc/spider-pope",
"http://thecolbertreport.cc.com/videos/22jcm5/cheating-death---snus---placebo-effect",
"http://thecolbertreport.cc.com/videos/03ei16/matt-latimer",
"http://thecolbertreport.cc.com/videos/7bmnxg/sign-off---richard-dawkins-will-be-here-tomorrow",
"http://thecolbertreport.cc.com/videos/ph4cw3/atone-phone---last-day-of-apologies"
],
"guest": "Matt Latimer"
},
{
"date": "2009-09-30",
"videos": [
"http://thecolbertreport.cc.com/videos/6bhu7e/intro---09-30-09",
"http://thecolbertreport.cc.com/videos/rrbojv/send-your-medical-bills-to-max-baucus",
"http://thecolbertreport.cc.com/videos/m2yjay/a-pace-odyssey",
"http://thecolbertreport.cc.com/videos/jhrv69/richard-dawkins",
"http://thecolbertreport.cc.com/videos/t5u4g8/sign-off---goodnight--grammy",
"http://thecolbertreport.cc.com/videos/kf4xf5/the-word---out-of-the-closet"
],
"guest": "Richard Dawkins"
},
{
"date": "2009-10-01",
"videos": [
"http://thecolbertreport.cc.com/videos/wlav1v/najibullah-zazi-threatens-beauty-supplies",
"http://thecolbertreport.cc.com/videos/6dv0jz/2016-olympics-in-chicago---george-wendt",
"http://thecolbertreport.cc.com/videos/zxuz0a/francis-collins",
"http://thecolbertreport.cc.com/videos/q9o9qv/sign-off---new-slang",
"http://thecolbertreport.cc.com/videos/91s6ka/threatdown---environmentalists--kang-lee---mountain-pine-beetles"
],
"guest": "George Wendt, Dr. Francis Collins"
},
{
"date": "2009-10-05",
"videos": [
"http://thecolbertreport.cc.com/videos/733czp/intro---10-05-09",
"http://thecolbertreport.cc.com/videos/7yi77e/americans-for-prosperity-cheer-chicago-s-failure",
"http://thecolbertreport.cc.com/videos/k8e7bl/eating-the-distance---the-brad-sciullo-story-pt--2",
"http://thecolbertreport.cc.com/videos/wfl2if/arne-duncan",
"http://thecolbertreport.cc.com/videos/d1uxmt/sign-off---goodnight"
],
"guest": "Arne Duncan"
},
{
"date": "2009-10-06",
"videos": [
"http://thecolbertreport.cc.com/videos/lomf6q/new-swine-flu-vaccine-drops",
"http://thecolbertreport.cc.com/videos/7060r2/the-road-ahead-in-afghanistan---lara-logan",
"http://thecolbertreport.cc.com/videos/yz886x/john-darnielle",
"http://thecolbertreport.cc.com/videos/58l1kv/the-word---learning-is-fundamental"
],
"guest": "Lara Logan, the Mountain Goats"
},
{
"date": "2009-10-07",
"videos": [
"http://thecolbertreport.cc.com/videos/kt8d60/intro---10-07-09",
"http://thecolbertreport.cc.com/videos/p6tyac/human-sacrifice-channel",
"http://thecolbertreport.cc.com/videos/i1e7h0/craziest-f--king-thing-i-ve-ever-heard---eye-tooth",
"http://thecolbertreport.cc.com/videos/59gyno/alison-gopnik",
"http://thecolbertreport.cc.com/videos/9ergzb/sign-off---jasper-t--jowls",
"http://thecolbertreport.cc.com/videos/qm22ls/formula-401--a-star-is-born"
],
"guest": "Alison Gopnik"
},
{
"date": "2009-10-08",
"videos": [
"http://thecolbertreport.cc.com/videos/ac6rq4/intro---10-08-09",
"http://thecolbertreport.cc.com/videos/u1v1j7/kevin-the-iranian-intern",
"http://thecolbertreport.cc.com/videos/jigfye/sport-report---rush-limbaugh---ted-williams--frozen-head",
"http://thecolbertreport.cc.com/videos/ih4ouf/colin-beavan",
"http://thecolbertreport.cc.com/videos/7t5ve1/sign-off---buddy-system",
"http://thecolbertreport.cc.com/videos/81wvda/tip-wag---conservapedia--louvre---honda-unicycle"
],
"guest": "Colin Beavan"
},
{
"date": "2009-10-12",
"videos": [
"http://thecolbertreport.cc.com/videos/6s4gb6/intro---10-12-09",
"http://thecolbertreport.cc.com/videos/xiuiwd/happy-columbus-day",
"http://thecolbertreport.cc.com/videos/vnmcv0/fallback-position---james-blake",
"http://thecolbertreport.cc.com/videos/2ko3eq/sanjay-gupta",
"http://thecolbertreport.cc.com/videos/izp5gd/sign-off---thanks-to-the-guests"
],
"guest": "Shashi Tharoor, Dr. Sanjay Gupta"
},
{
"date": "2009-10-13",
"videos": [
"http://thecolbertreport.cc.com/videos/g87deh/intro---10-13-09",
"http://thecolbertreport.cc.com/videos/4cco61/jermaine-maine-tweets-miley-cyrus-facts",
"http://thecolbertreport.cc.com/videos/7jpek6/the-born-supremacy---david-javerbaum",
"http://thecolbertreport.cc.com/videos/s52xb5/sylvia-earle",
"http://thecolbertreport.cc.com/videos/obxlza/sign-off---gmail",
"http://thecolbertreport.cc.com/videos/l4n6tb/war-of-peace---shashi-tharoor"
],
"guest": "David Javerbaum, Sylvia Earle"
},
{
"date": "2009-10-14",
"videos": [
"http://thecolbertreport.cc.com/videos/g6skj6/pat-roberts-warns-against-health-care-box-canyon",
"http://thecolbertreport.cc.com/videos/3copn0/the-obesity-epidemic---amy-farrell",
"http://thecolbertreport.cc.com/videos/ljym9p/the-rza",
"http://thecolbertreport.cc.com/videos/wijvgm/sign-off---should-have-put-a-ring-on-it",
"http://thecolbertreport.cc.com/videos/m5y3ox/the-word---symbol-minded"
],
"guest": "Amy Farrell, The RZA"
},
{
"date": "2009-10-15",
"videos": [
"http://thecolbertreport.cc.com/videos/0bzt4y/intro---10-15-09",
"http://thecolbertreport.cc.com/videos/0a133r/the-money-shot",
"http://thecolbertreport.cc.com/videos/8xmsj4/the-mayo-lution-will-not-be-televised",
"http://thecolbertreport.cc.com/videos/7s45sd/jerry-mitchell",
"http://thecolbertreport.cc.com/videos/sgqznj/sign-off---stephen-unveils-a-new-portrait",
"http://thecolbertreport.cc.com/videos/ubn9ao/yahweh-or-no-way---legislation-prayers---fake-shroud-of-turin"
],
"guest": "Jerry Mitchell"
},
{
"date": "2009-10-26",
"videos": [
"http://thecolbertreport.cc.com/videos/4srpg9/george-will-s-long-tie",
"http://thecolbertreport.cc.com/videos/gy6tin/the-word---don-t-ask-don-t-tell",
"http://thecolbertreport.cc.com/videos/xhz2mw/cornel-west",
"http://thecolbertreport.cc.com/videos/2onypd/sign-off---don-t-move"
],
"guest": "Cornel West"
},
{
"date": "2009-10-27",
"videos": [
"http://thecolbertreport.cc.com/videos/l98jof/intro---10-27-09",
"http://thecolbertreport.cc.com/videos/3f3ssx/george-w--bush-s-motivational-speech",
"http://thecolbertreport.cc.com/videos/wtcyjy/colbert-platinum---harvard-billionaires---red-diamond-suv",
"http://thecolbertreport.cc.com/videos/8c9hx0/gail-collins",
"http://thecolbertreport.cc.com/videos/plvf84/sign-off---goodnight-",
"http://thecolbertreport.cc.com/videos/liq1p2/job-recommendation-from-stephen-colbert",
"http://thecolbertreport.cc.com/videos/dtlk2w/stephen-s-sound-advice---how-to-get-a-job"
],
"guest": "Randall Balmer, Gail Collins"
},
{
"date": "2009-10-28",
"videos": [
"http://thecolbertreport.cc.com/videos/zspzvk/intro---10-28-09",
"http://thecolbertreport.cc.com/videos/qvcosm/joe-lieberman-is-a-true-independent",
"http://thecolbertreport.cc.com/videos/1r96o8/big-bang-theory",
"http://thecolbertreport.cc.com/videos/3r9su2/brian-cox",
"http://thecolbertreport.cc.com/videos/bzrvnc/sign-off---future-stephen",
"http://thecolbertreport.cc.com/videos/1va17m/holy-water-under-the-bridge---randall-balmer"
],
"guest": "Brian Cox"
},
{
"date": "2009-10-29",
"videos": [
"http://thecolbertreport.cc.com/videos/bbj9sz/intro---10-29-09",
"http://thecolbertreport.cc.com/videos/yl6xd1/usa-today-slams-dirigibles",
"http://thecolbertreport.cc.com/videos/al6ssq/threatdown---halloween-edition",
"http://thecolbertreport.cc.com/videos/ku01px/bill-simmons",
"http://thecolbertreport.cc.com/videos/xalyef/sign-off---thanks-to-bill-simmons---rosanne-cash",
"http://thecolbertreport.cc.com/videos/w56skk/the-word---you-genics"
],
"guest": "Rosanne Cash, Bill Simmons"
},
{
"date": "2009-11-02",
"videos": [
"http://thecolbertreport.cc.com/videos/vfdy5q/intro---11-02-09",
"http://thecolbertreport.cc.com/videos/uke17x/used-karzai",
"http://thecolbertreport.cc.com/videos/uxgb9s/alpha-dog-of-the-week---arnold-schwarzenegger",
"http://thecolbertreport.cc.com/videos/t62cji/nicholas-thompson",
"http://thecolbertreport.cc.com/videos/7g9pgn/sign-off---donate-to-the-u-s--speedskating-team"
],
"guest": "Nicholas Thompson"
},
{
"date": "2009-11-03",
"videos": [
"http://thecolbertreport.cc.com/videos/hlio3b/intro---11-03-09",
"http://thecolbertreport.cc.com/videos/zbi6j6/canadian-hackers-sabotage-colbert-nation",
"http://thecolbertreport.cc.com/videos/olb2ep/nailed--em---mormon-church-trespassing",
"http://thecolbertreport.cc.com/videos/qdk21v/andrew-sullivan",
"http://thecolbertreport.cc.com/videos/sqdke8/sign-off---they-call-me-mister-fry",
"http://thecolbertreport.cc.com/videos/b7il1x/sport-report---nyc-marathon---olympic-speedskating"
],
"guest": "Andrew Sullivan"
},
{
"date": "2009-11-04",
"videos": [
"http://thecolbertreport.cc.com/videos/wm06ja/intro---11-04-09",
"http://thecolbertreport.cc.com/videos/hzm3ur/-09-off-year-semi-presidential-electferendum",
"http://thecolbertreport.cc.com/videos/src597/formidable-opponent---global-warming-with-al-gore",
"http://thecolbertreport.cc.com/videos/lkkq9m/harold-evans",
"http://thecolbertreport.cc.com/videos/64ucdo/sign-off---poison-gas",
"http://thecolbertreport.cc.com/videos/ol1mvi/the-word---the-green-mile"
],
"guest": "Harold Evans"
},
{
"date": "2009-11-05",
"videos": [
"http://thecolbertreport.cc.com/videos/ymrkt5/intro---11-05-09",
"http://thecolbertreport.cc.com/videos/i7dq6q/guy-fawkers",
"http://thecolbertreport.cc.com/videos/6vac7m/cheating-death---swine-flu-scam-detector---vaxaconda",
"http://thecolbertreport.cc.com/videos/cj1lqu/william-bratton",
"http://thecolbertreport.cc.com/videos/6e51a0/sign-off---donate-to-u-s--speedskating",
"http://thecolbertreport.cc.com/videos/hnu3dh/tip-wag---rush-limbaugh---us-weekly"
],
"guest": "Joey Cheek, Chief William Bratton"
},
{
"date": "2009-11-09",
"videos": [
"http://thecolbertreport.cc.com/videos/p4del4/intro---11-09-09",
"http://thecolbertreport.cc.com/videos/zhrahz/trouble--coverage",
"http://thecolbertreport.cc.com/videos/uaeaom/u-s--speedskating-team-takes-gold",
"http://thecolbertreport.cc.com/videos/62flai/thomas-campbell",
"http://thecolbertreport.cc.com/videos/5hgk8f/sign-off---goodnight"
],
"guest": "Thomas Campbell"
},
{
"date": "2009-11-10",
"videos": [
"http://thecolbertreport.cc.com/videos/nwm4io/intro---11-10-09",
"http://thecolbertreport.cc.com/videos/bpec5m/barney-frank-is-not-a-great-outdoorsman",
"http://thecolbertreport.cc.com/videos/476wty/maria-shriver",
"http://thecolbertreport.cc.com/videos/rl73xb/sign-off---you-can-t-take-it-with-you",
"http://thecolbertreport.cc.com/videos/ocuoqq/exclusive---better-know-a-district---delaware-s-at-large---mike-castle",
"http://thecolbertreport.cc.com/videos/i4pgl0/better-know-a-district---delaware-s-at-large---mike-castle"
],
"guest": "Maria Shriver"
},
{
"date": "2009-11-11",
"videos": [
"http://thecolbertreport.cc.com/videos/8m4icj/intro---11-11-09",
"http://thecolbertreport.cc.com/videos/d3hhgz/goldman-sachs-does-god-s-work",
"http://thecolbertreport.cc.com/videos/1al5v4/tip-wag---san-francisco-chronicle---george-clinton",
"http://thecolbertreport.cc.com/videos/p4wqld/christopher-caldwell",
"http://thecolbertreport.cc.com/videos/xp7fig/sign-off---stephen-s-fight-with-christopher-caldwell",
"http://thecolbertreport.cc.com/videos/2vmljd/iraniversary---karim-sadjadpour"
],
"guest": "Christopher Caldwell"
},
{
"date": "2009-11-12",
"videos": [
"http://thecolbertreport.cc.com/videos/lbfhkm/intro---11-12-09",
"http://thecolbertreport.cc.com/videos/cnw6wz/miracle-whip-buys-ad-space",
"http://thecolbertreport.cc.com/videos/ips2v8/the-word---the-money-shot",
"http://thecolbertreport.cc.com/videos/2k90o4/sport-report---cricket-scandal---letter-writing-campaign",
"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://thecolbertreport.cc.com/videos/t5pqdy/intro---11-16-09",
"http://thecolbertreport.cc.com/videos/8ggl86/obama-bows-to-japanese-emperor",
"http://thecolbertreport.cc.com/videos/xgze85/alpha-dog-of-the-week---joe-perry",
"http://thecolbertreport.cc.com/videos/6einjp/paul-goldberger",
"http://thecolbertreport.cc.com/videos/i42i9t/sign-off---good-morning--burma"
],
"guest": "Paul Goldberger"
},
{
"date": "2009-11-17",
"videos": [
"http://thecolbertreport.cc.com/videos/im99fb/intro---11-17-09",
"http://thecolbertreport.cc.com/videos/z1cr8v/kid-gloves---marc-kielburger",
"http://thecolbertreport.cc.com/videos/ij8d04/malcolm-gladwell",
"http://thecolbertreport.cc.com/videos/w71om6/sign-off---goodnight",
"http://thecolbertreport.cc.com/videos/mwjf6e/the-word---skeletons-in-the-closet"
],
"guest": "Malcolm Gladwell"
},
{
"date": "2009-11-18",
"videos": [
"http://thecolbertreport.cc.com/videos/24jack/intro---11-18-09",
"http://thecolbertreport.cc.com/videos/odu5xx/eggo-waffles-shortage-alert",
"http://thecolbertreport.cc.com/videos/cuhtda/threatdown---quetzalcoatl--santa-claus---canadian-groin-kickers",
"http://thecolbertreport.cc.com/videos/ah5dzo/norah-jones",
"http://thecolbertreport.cc.com/videos/1vm4fs/exclusive---better-know-a-district---california-s-12th---jackie-speier-pt--1",
"http://thecolbertreport.cc.com/videos/udd9qu/exclusive---better-know-a-district---california-s-12th---jackie-speier-pt--2",
"http://thecolbertreport.cc.com/videos/p8c7xo/better-know-a-district---california-s-12th---jackie-speier"
],
"guest": "Norah Jones"
},
{
"date": "2009-11-19",
"videos": [
"http://thecolbertreport.cc.com/videos/6iz54h/stephen-shakes-his-moneymaker",
"http://thecolbertreport.cc.com/videos/4tmz49/celebrating-the-ak-47---john-pike",
"http://thecolbertreport.cc.com/videos/zy3jiq/sign-off---thanks--elvis-costello",
"http://thecolbertreport.cc.com/videos/tf53hs/the-word---grand-old-pity-party"
],
"guest": "John Pike, Elvis Costello"
},
{
"date": "2009-11-30",
"videos": [
"http://thecolbertreport.cc.com/videos/x90ton/intro---11-30-09",
"http://thecolbertreport.cc.com/videos/qljewq/amateur-hour-at-the-white-house",
"http://thecolbertreport.cc.com/videos/ahhfo9/better-know-a-lobby---ploughshares-fund",
"http://thecolbertreport.cc.com/videos/ec0x55/cevin-soling",
"http://thecolbertreport.cc.com/videos/53k9co/sign-off---goodnight"
],
"guest": "Dan Esty, Cevin Soling"
},
{
"date": "2009-12-01",
"videos": [
"http://thecolbertreport.cc.com/videos/jvjn7h/intro---12-01-09",
"http://thecolbertreport.cc.com/videos/fj2x2m/u-s--army-chain-of-command",
"http://thecolbertreport.cc.com/videos/zwjey6/gold--frankincense-and-mars---guy-consolmagno",
"http://thecolbertreport.cc.com/videos/s6mur0/sherman-alexie",
"http://thecolbertreport.cc.com/videos/km8wtf/sign-off---goodnight",
"http://thecolbertreport.cc.com/videos/bohr52/something-is-melting-in-denmark---dan-esty"
],
"guest": "Guy Consolmagno, Sherman Alexie"
},
{
"date": "2009-12-02",
"videos": [
"http://thecolbertreport.cc.com/videos/lstmf1/intro---12-02-09",
"http://thecolbertreport.cc.com/videos/yvq647/deployment-figures",
"http://thecolbertreport.cc.com/videos/et6ksb/craig-watkins",
"http://thecolbertreport.cc.com/videos/cyylc0/sign-off---goodnight",
"http://thecolbertreport.cc.com/videos/ndi826/better-know-a-made-up-district---connecticut-s-42nd"
],
"guest": "Craig Watkins"
},
{
"date": "2009-12-03",
"videos": [
"http://thecolbertreport.cc.com/videos/qrqaja/formidable-opponent---gary-the-tennis-coach",
"http://thecolbertreport.cc.com/videos/q8vv0p/intro---12-03-09",
"http://thecolbertreport.cc.com/videos/knxrx6/tiger-s-tale",
"http://thecolbertreport.cc.com/videos/hw80nv/skate-expectations---skeleton-team-tryouts---zach-lund",
"http://thecolbertreport.cc.com/videos/heye88/janet-napolitano",
"http://thecolbertreport.cc.com/videos/dy9y1l/sign-off---welcome-sean-julien",
"http://thecolbertreport.cc.com/videos/qx8k9b/cheating-death---r-j--reynolds--genzyme---bionic-bottom"
],
"guest": "Sec. Janet Napolitano"
},
{
"date": "2009-12-07",
"videos": [
"http://thecolbertreport.cc.com/videos/opl0gz/intro---12-07-09",
"http://thecolbertreport.cc.com/videos/l9wksx/who-s-attacking-me-now----g--edward-deseve",
"http://thecolbertreport.cc.com/videos/t0b3f4/craziest-f--king-thing-i-ve-ever-heard---tongue-eating-parasite",
"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://thecolbertreport.cc.com/videos/7a6f7k/intro---12-08-09",
"http://thecolbertreport.cc.com/videos/0y3uce/how-far-good-parents-will-go",
"http://thecolbertreport.cc.com/videos/gcu1ou/fed-s-dead---bernie-sanders",
"http://thecolbertreport.cc.com/videos/9o2lyz/andy-schlafly",
"http://thecolbertreport.cc.com/videos/2v1vhb/sign-off---goodnight",
"http://thecolbertreport.cc.com/videos/w4zn3p/tip-wag---jonas-brothers--fox-news---japanese-burger-king"
],
"guest": "Sen. Bernie Sanders, Andy Schlafly"
},
{
"date": "2009-12-09",
"videos": [
"http://thecolbertreport.cc.com/videos/fdjwxb/intro---12-09-09",
"http://thecolbertreport.cc.com/videos/ckek7p/monkey-threatdown---holes---banana-too-high",
"http://thecolbertreport.cc.com/videos/h3kb0s/the-blitzkrieg-on-grinchitude---hallmark---krampus",
"http://thecolbertreport.cc.com/videos/is6uvv/matt-taibbi",
"http://thecolbertreport.cc.com/videos/mlp3y1/sign-off---goodnight-with-krampus",
"http://thecolbertreport.cc.com/videos/2l8p98/fed-s-dead"
],
"guest": "Matt Taibbi"
},
{
"date": "2009-12-10",
"videos": [
"http://thecolbertreport.cc.com/videos/03g0d5/obama-s-nobel-prize-speech---afghandyland",
"http://thecolbertreport.cc.com/videos/zivscx/skate-expectations---bobsled-team-tryouts",
"http://thecolbertreport.cc.com/videos/hjnxot/lara-logan",
"http://thecolbertreport.cc.com/videos/y74r8f/sign-off---goodnight",
"http://thecolbertreport.cc.com/videos/2jc7dn/the-word---grand-old-purity"
],
"guest": "Lara Logan"
},
{
"date": "2009-12-14",
"videos": [
"http://thecolbertreport.cc.com/videos/efg3d5/intro---12-14-09",
"http://thecolbertreport.cc.com/videos/9wxgc9/president-obama---the-colbert-interview",
"http://thecolbertreport.cc.com/videos/t1tsns/stephen-challenges-shani-davis---katherine-reutter",
"http://thecolbertreport.cc.com/videos/vt4qtf/snoop-dogg"
],
"guest": "Katherine Reutter, Snoop Dogg"
},
{
"date": "2009-12-15",
"videos": [
"http://thecolbertreport.cc.com/videos/x6ydfv/intro---12-15-09",
"http://thecolbertreport.cc.com/videos/3plx6x/for-he-s-a-jowly-good-fellow",
"http://thecolbertreport.cc.com/videos/10vyk2/the-blitzkrieg-on-grinchitude---treesus---christ-mas-tree",
"http://thecolbertreport.cc.com/videos/i16cci/alicia-keys",
"http://thecolbertreport.cc.com/videos/qn15hk/stephen-challenges-shani-davis",
"http://thecolbertreport.cc.com/videos/u5g55p/exclusive---extended-interview-with-barack-obama"
],
"guest": "Alicia Keys"
},
{
"date": "2009-12-16",
"videos": [
"http://thecolbertreport.cc.com/videos/ozgmuy/accenture-drops-tiger-woods",
"http://thecolbertreport.cc.com/videos/4jdam2/the-word---spyvate-sector",
"http://thecolbertreport.cc.com/videos/bjlb37/tom-brokaw",
"http://thecolbertreport.cc.com/videos/q9eqq1/sign-off---goodbye--2009",
"http://thecolbertreport.cc.com/videos/ufq6qh/prescott-financial---gold--women---sheep"
],
"guest": "Tom Brokaw"
}
],
"2010": [
{
"date": "2010-01-04",
"videos": [
"http://thecolbertreport.cc.com/videos/a6c63f/intro---goodbye--old-set",
"http://thecolbertreport.cc.com/videos/qr3067/high-definition-upgrade",
"http://thecolbertreport.cc.com/videos/ca8z2z/genitalia-bomb-threat",
"http://thecolbertreport.cc.com/videos/hospuh/skate-expectations---curling-team-tryouts",
"http://thecolbertreport.cc.com/videos/bqki32/skate-expectations---curling-team-tryouts---colbert-vs--shuster",
"http://thecolbertreport.cc.com/videos/ytow3n/sign-off---thanks-for-the-new-set"
],
"guest": "Erick Erickson"
},
{
"date": "2010-01-05",
"videos": [
"http://thecolbertreport.cc.com/videos/l0fai0/intro---01-05-10",
"http://thecolbertreport.cc.com/videos/qomtkk/high-definition-advertising",
"http://thecolbertreport.cc.com/videos/ywy8j4/night-of-terror---the-crapification-of-the-american-pant-scape",
"http://thecolbertreport.cc.com/videos/s2n141/the-word---ideal-or-no-deal",
"http://thecolbertreport.cc.com/videos/t3fpvm/better-know-an-enemy---yemen",
"http://thecolbertreport.cc.com/videos/r8x6ag/riley-crane",
"http://thecolbertreport.cc.com/videos/doe1xo/sign-off---stephen-draws-woodstock"
],
"guest": "Riley Crane"
},
{
"date": "2010-01-06",
"videos": [
"http://thecolbertreport.cc.com/videos/rewr4u/intro---01-06-10",
"http://thecolbertreport.cc.com/videos/u584e6/a-message-to-standard-definition-cable-providers",
"http://thecolbertreport.cc.com/videos/g2gimh/drag-me-to-health---ezra-klein---linda-douglass",
"http://thecolbertreport.cc.com/videos/h3mxst/alpha-dog-of-the-week---domino-s-pizza",
"http://thecolbertreport.cc.com/videos/4cd9bx/charles-moore",
"http://thecolbertreport.cc.com/videos/elm4s5/sign-off---not-stephen-s-show"
],
"guest": "Capt. Charles Moore"
},
{
"date": "2010-01-07",
"videos": [
"http://thecolbertreport.cc.com/videos/uo3v4r/intro---01-07-10",
"http://thecolbertreport.cc.com/videos/f2zb2u/failure-to-connect-the-dots",
"http://thecolbertreport.cc.com/videos/z3kdhi/fatal-subtraction---barry-scheck",
"http://thecolbertreport.cc.com/videos/wi0ong/tip-wag---burj-dubai--avatar---transgender-appointees",
"http://thecolbertreport.cc.com/videos/c3suh9/james-fowler",
"http://thecolbertreport.cc.com/videos/tso1cs/sign-off---goodnight"
],
"guest": "Barry Scheck, James Fowler"
},
{
"date": "2010-01-11",
"videos": [
"http://thecolbertreport.cc.com/videos/xptxw6/harry-reid-s-racial-praise",
"http://thecolbertreport.cc.com/videos/3s1wqs/move-your-money---eugene-jarecki",
"http://thecolbertreport.cc.com/videos/y47i8f/colbert-platinum---estate-tax---skull-ballot-box",
"http://thecolbertreport.cc.com/videos/4q61kj/morgan-freeman",
"http://thecolbertreport.cc.com/videos/8e60wq/sign-off---stephen-will-be-right-back"
],
"guest": "Eugene Jarecki, Morgan Freeman"
},
{
"date": "2010-01-12",
"videos": [
"http://thecolbertreport.cc.com/videos/qjn9bh/intro---01-12-10",
"http://thecolbertreport.cc.com/videos/7qig8p/roxxxy-the-sex-robot",
"http://thecolbertreport.cc.com/videos/8ln9tv/cheating-death---alzheimer-s--jet-lag---female-libido",
"http://thecolbertreport.cc.com/videos/7jfkm7/raj-patel"
],
"guest": "Raj Patel"
},
{
"date": "2010-01-13",
"videos": [
"http://thecolbertreport.cc.com/videos/w3lt72/intro---01-13-10",
"http://thecolbertreport.cc.com/videos/34mknq/game-change-gossip",
"http://thecolbertreport.cc.com/videos/kwpeqs/sport-report---gilbert-arenas---mark-mcgwire",
"http://thecolbertreport.cc.com/videos/t39jgx/movies-that-are-destroying-america---avatar-edition",
"http://thecolbertreport.cc.com/videos/1xyrig/john-heilemann",
"http://thecolbertreport.cc.com/videos/erf677/sign-off---mark-mcgwire-action-figure"
],
"guest": "John Heilemann"
},
{
"date": "2010-01-14",
"videos": [
"http://thecolbertreport.cc.com/videos/t151qr/intro---01-14-10",
"http://thecolbertreport.cc.com/videos/dbcboq/watercressgate",
"http://thecolbertreport.cc.com/videos/et1vio/the-word---honor-bound",
"http://thecolbertreport.cc.com/videos/7owg19/haiti-disaster-relief-donations---kathleen-sebelius",
"http://thecolbertreport.cc.com/videos/gqd029/kathleen-sebelius",
"http://thecolbertreport.cc.com/videos/afqd2o/sign-off---text-for-haiti-disaster-relief"
],
"guest": "Kathleen Sebelius"
},
{
"date": "2010-01-18",
"videos": [
"http://thecolbertreport.cc.com/videos/i2h2wa/intro---01-18-10",
"http://thecolbertreport.cc.com/videos/uqolbx/massachusetts-special-election",
"http://thecolbertreport.cc.com/videos/6s93dq/coal-comfort---margaret-palmer",
"http://thecolbertreport.cc.com/videos/2kgg0x/own-a-piece-of-histor-me---original-interview-table",
"http://thecolbertreport.cc.com/videos/r6fzoi/emily-pilloton",
"http://thecolbertreport.cc.com/videos/47fs6h/sign-off---home-barbershop-quartet-game"
],
"guest": "Dr. Margaret Palmer, Emily Pilloton"
},
{
"date": "2010-01-19",
"videos": [
"http://thecolbertreport.cc.com/videos/w2qqgl/intro---01-19-10",
"http://thecolbertreport.cc.com/videos/9t5rlw/onward-christian-soldiers",
"http://thecolbertreport.cc.com/videos/eseeb0/skate-expectations---speedskating-team-training",
"http://thecolbertreport.cc.com/videos/nw0obk/skate-expectations---speedskating-team-training---tucker-fredricks",
"http://thecolbertreport.cc.com/videos/wljw31/stephen-bosworth",
"http://thecolbertreport.cc.com/videos/5zz1m5/sign-off---teleprompter-in-italics"
],
"guest": "Amb. Stephen Bosworth"
},
{
"date": "2010-01-20",
"videos": [
"http://thecolbertreport.cc.com/videos/oarl2s/intro---01-20-10",
"http://thecolbertreport.cc.com/videos/9fshqm/boston-dream-guy",
"http://thecolbertreport.cc.com/videos/h7cxuq/skate-expectations---speedskating-race",
"http://thecolbertreport.cc.com/videos/r0fs08/skate-expectations---speedskating-team-training---colbert-vs--davis",
"http://thecolbertreport.cc.com/videos/9qoq3s/dick-ebersol",
"http://thecolbertreport.cc.com/videos/ekjbd1/sign-off---original-interview-table-auction"
],
"guest": "Dick Ebersol"
},
{
"date": "2010-01-21",
"videos": [
"http://thecolbertreport.cc.com/videos/dhnvbi/intro---01-21-10",
"http://thecolbertreport.cc.com/videos/a891l1/own-a-piece-of-histor-me---legendary-interview-table",
"http://thecolbertreport.cc.com/videos/3t1wu4/taliban-public-relations",
"http://thecolbertreport.cc.com/videos/61faxb/the-word---two-faced",
"http://thecolbertreport.cc.com/videos/fqdy69/threatdown---airport-security-edition",
"http://thecolbertreport.cc.com/videos/nchr4z/john-farmer",
"http://thecolbertreport.cc.com/videos/ngpu7c/sign-off---raise-money-for-haiti-relief"
],
"guest": "John Farmer"
},
{
"date": "2010-01-25",
"videos": [
"http://thecolbertreport.cc.com/videos/ucog8c/intro---01-25-10",
"http://thecolbertreport.cc.com/videos/2i26ye/obama-gets-called-for-jury-duty",
"http://thecolbertreport.cc.com/videos/iyaiyz/the-word---manifest-density",
"http://thecolbertreport.cc.com/videos/fgn6yx/alpha-dog-of-the-week---harold-ford-jr-",
"http://thecolbertreport.cc.com/videos/y99wku/kati-marton",
"http://thecolbertreport.cc.com/videos/6u56ui/sign-off---50th-anniversary-of-bubble-wrap"
],
"guest": "Kati Marton"
},
{
"date": "2010-01-26",
"videos": [
"http://thecolbertreport.cc.com/videos/8ukd1u/andre-bauer-is-not-against-animals",
"http://thecolbertreport.cc.com/videos/1qu3mj/democrats-must-fight-back---paul-begala",
"http://thecolbertreport.cc.com/videos/4cv6sy/tip-wag---creigh-deeds---scarebear-trail-companion",
"http://thecolbertreport.cc.com/videos/t59ksv/mika-brzezinski",
"http://thecolbertreport.cc.com/videos/oz7mss/own-a-piece-of-histor-me---original-c-shaped-anchor-desk"
],
"guest": "Paul Begala, Mika Brzezinski"
},
{
"date": "2010-01-27",
"videos": [
"http://thecolbertreport.cc.com/videos/5wqyfx/intro---01-27-10",
"http://thecolbertreport.cc.com/videos/69904a/hamid-karzai-s-fashionable-hat",
"http://thecolbertreport.cc.com/videos/99bavp/the-word---prece-don-t",
"http://thecolbertreport.cc.com/videos/9hb7jh/fox-news-puts-james-o-keefe-into-context",
"http://thecolbertreport.cc.com/videos/suw63r/arthur-benjamin",
"http://thecolbertreport.cc.com/videos/iljqkj/sign-off---give-stephen-an-ipad"
],
"guest": "Arthur Benjamin"
},
{
"date": "2010-01-28",
"videos": [
"http://thecolbertreport.cc.com/videos/pg6y12/stephen-s-state-of-the-union-speech",
"http://thecolbertreport.cc.com/videos/lnaqfo/david-gergen",
"http://thecolbertreport.cc.com/videos/jsxv0a/sport-report---all-white-basketball---jana-rawlinson",
"http://thecolbertreport.cc.com/videos/xebsoq/sign-off---bid-on-stephen-s-c-shaped-desk"
],
"guest": "David Gergen"
},
{
"date": "2010-02-01",
"videos": [
"http://thecolbertreport.cc.com/videos/pg94s5/the-word---siren-song",
"http://thecolbertreport.cc.com/videos/2n1vl2/sport-report---nicole-detling-miller---jessica-smith",
"http://thecolbertreport.cc.com/videos/k0hjb1/harold-ford-jr-",
"http://thecolbertreport.cc.com/videos/biwfer/sign-off---u-s-a-"
],
"guest": "Nicole Detling Miller, Jessica Smith, Harold Ford Jr."
},
{
"date": "2010-02-02",
"videos": [
"http://thecolbertreport.cc.com/videos/u6k7x8/intro---02-02-10",
"http://thecolbertreport.cc.com/videos/idx9j1/the-word---cognoscor-ergo-sum",
"http://thecolbertreport.cc.com/videos/2ffk5q/bananafish-tale---henry-allen",
"http://thecolbertreport.cc.com/videos/0xtws0/eliot-spitzer",
"http://thecolbertreport.cc.com/videos/wfnsyt/sign-off---kentucky-fried-regret"
],
"guest": "Eliot Spitzer"
},
{
"date": "2010-02-03",
"videos": [
"http://thecolbertreport.cc.com/videos/pmvmz3/intro---02-03-10",
"http://thecolbertreport.cc.com/videos/4nj8ql/be-almost-all-that-you-can-be",
"http://thecolbertreport.cc.com/videos/5iocp5/job-man-caravan",
"http://thecolbertreport.cc.com/videos/sysu7h/job-man-caravan---peter-cove",
"http://thecolbertreport.cc.com/videos/t6rlnb/john-durant",
"http://thecolbertreport.cc.com/videos/s0494z/sign-off---office-pool"
],
"guest": "Peter Cove, John Durant"
},
{
"date": "2010-02-04",
"videos": [
"http://thecolbertreport.cc.com/videos/zn4dgm/intro---02-04-10",
"http://thecolbertreport.cc.com/videos/qkvdcs/hermaphrodites-can-t-be-gay",
"http://thecolbertreport.cc.com/videos/qqtebr/tip-wag---waterboarding---canada-s-history",
"http://thecolbertreport.cc.com/videos/6a6j6j/formidable-opponent---khalid-sheikh-mohammed-s-trial",
"http://thecolbertreport.cc.com/videos/sm98y8/henry-louis-gates--jr-",
"http://thecolbertreport.cc.com/videos/bsgq92/own-a-piece-of-histor-me---fireplace-portrait"
],
"guest": "Henry Louis Gates"
},
{
"date": "2010-02-08",
"videos": [
"http://thecolbertreport.cc.com/videos/ek3awf/exclusive---skate-expectations---bobsled-team-tryouts-pt--1",
"http://thecolbertreport.cc.com/videos/52kgrq/office-super-bowl-ad-pool",
"http://thecolbertreport.cc.com/videos/2idiz7/the-word---faux--n--tell",
"http://thecolbertreport.cc.com/videos/mtoffp/sarah-palin-uses-a-hand-o-prompter",
"http://thecolbertreport.cc.com/videos/xdafq2/jonathan-safran-foer",
"http://thecolbertreport.cc.com/videos/r5okcx/sign-off---goodnight"
],
"guest": "Jonathan Safran Foer"
},
{
"date": "2010-02-09",
"videos": [
"http://thecolbertreport.cc.com/videos/msydxm/exclusive---skate-expectations---bobsled-team-tryouts-pt--2",
"http://thecolbertreport.cc.com/videos/s5t5z4/celebrate-black-history-month-with-heineken",
"http://thecolbertreport.cc.com/videos/nwoc1b/corporate-free-speech---chris-dodd",
"http://thecolbertreport.cc.com/videos/884juj/alpha-dog-of-the-week---markus-bestin",
"http://thecolbertreport.cc.com/videos/uao9dj/george-stephanopoulos",
"http://thecolbertreport.cc.com/videos/zcybb6/sign-off---it-s-lonely-at-the-top"
],
"guest": "George Stephanopoulos"
},
{
"date": "2010-02-10",
"videos": [
"http://thecolbertreport.cc.com/videos/ka4dxt/exclusive---skate-expectations---bobsled-team-tryouts-pt--3",
"http://thecolbertreport.cc.com/videos/l0cv8x/intro---02-10-10",
"http://thecolbertreport.cc.com/videos/br6hwk/we-re-off-to-see-the-blizzard",
"http://thecolbertreport.cc.com/videos/cu5mso/better-know-a-district---illinois--5th",
"http://thecolbertreport.cc.com/videos/3752v8/better-know-a-district---illinois--5th---mike-quigley",
"http://thecolbertreport.cc.com/videos/34z9mm/claire-danes",
"http://thecolbertreport.cc.com/videos/f2whru/sign-off---goodnight"
],
"guest": "Claire Danes"
},
{
"date": "2010-02-11",
"videos": [
"http://thecolbertreport.cc.com/videos/eyfb9f/exclusive---skate-expectations---curling-team-tryouts-pt--1",
"http://thecolbertreport.cc.com/videos/65cpdn/iran-begins-enriching-uranian",
"http://thecolbertreport.cc.com/videos/n5w4fs/the-word---political-suicide",
"http://thecolbertreport.cc.com/videos/li6roe/sport-report---global-snow-drive---al-michaels",
"http://thecolbertreport.cc.com/videos/s9qfmt/david-ross",
"http://thecolbertreport.cc.com/videos/qbth0f/sign-off---see-you-in-vancouver"
],
"guest": "Al Michaels, David Ross"
},
{
"date": "2010-02-22",
"videos": [
"http://thecolbertreport.cc.com/videos/jvyagn/exclusive---skate-expectations---speedskating-team-training-pt--1",
"http://thecolbertreport.cc.com/videos/rbcb67/intro---02-22-10",
"http://thecolbertreport.cc.com/videos/racwcb/vancouverage-2010---ed-colbert",
"http://thecolbertreport.cc.com/videos/tzovg4/better-know-a-riding---vancouver-s-south",
"http://thecolbertreport.cc.com/videos/5l4d9t/better-know-a-riding---vancouver-s-south---ujjal-dosanjh",
"http://thecolbertreport.cc.com/videos/gg3l88/shaun-white",
"http://thecolbertreport.cc.com/videos/iohppn/sign-off---you-are-not-americans"
],
"guest": "Shaun White"
},
{
"date": "2010-02-23",
"videos": [
"http://thecolbertreport.cc.com/videos/iar6l3/exclusive---skate-expectations---speedskating-team-training-pt--2",
"http://thecolbertreport.cc.com/videos/us6yyq/america-s-olympic-wins---lindsey-vonn",
"http://thecolbertreport.cc.com/videos/1ftd3s/olympic-international-houses",
"http://thecolbertreport.cc.com/videos/yd5amw/bob-costas",
"http://thecolbertreport.cc.com/videos/4vx1ll/sign-off---bob-costas-rides-the-moose"
],
"guest": "Lindsey Vonn, Bob Costas"
},
{
"date": "2010-02-24",
"videos": [
"http://thecolbertreport.cc.com/videos/j11loy/exclusive---better-know-a-riding---vancouver-s-south---ujjal-dosanjh-pt--1",
"http://thecolbertreport.cc.com/videos/eom1sq/exclusive---better-know-a-riding---vancouver-s-south---ujjal-dosanjh-pt--2",
"http://thecolbertreport.cc.com/videos/8olwnj/exclusive---better-know-a-riding---vancouver-s-south---ujjal-dosanjh-pt--3",
"http://thecolbertreport.cc.com/videos/l0ax8q/exclusive---skate-expectations---speedskating-team-training-pt--3",
"http://thecolbertreport.cc.com/videos/php8ta/cold-war-update---olympic-edition",
"http://thecolbertreport.cc.com/videos/mrk7jd/freud-rage---the-iceman-counseleth",
"http://thecolbertreport.cc.com/videos/7u3h32/ryan-st--onge---jeret-peterson",
"http://thecolbertreport.cc.com/videos/ampazf/sign-off---as-they-say-in-canada"
],
"guest": "Scott Hamilton, Jeret Peterson, Ryan St. Onge"
},
{
"date": "2010-02-25",
"videos": [
"http://thecolbertreport.cc.com/videos/i93x4n/exclusive---skate-expectations---speedskating-team-training-pt--4",
"http://thecolbertreport.cc.com/videos/e7hgxz/intro---02-25-10",
"http://thecolbertreport.cc.com/videos/jy3odd/stephen-distracts-bob-costas",
"http://thecolbertreport.cc.com/videos/zoz0j2/freud-rage---the-iceman-counseleth---shani-davis",
"http://thecolbertreport.cc.com/videos/iactcg/off-notice---canadian-iceholes",
"http://thecolbertreport.cc.com/videos/j2htnd/seth-wescott",
"http://thecolbertreport.cc.com/videos/2pub5y/sign-off---thank-you--everyone"
],
"guest": "Shani Davis, Seth Wescott"
},
{
"date": "2010-03-01",
"videos": [
"http://thecolbertreport.cc.com/videos/r61kzy/intro---stephen-wins-the-olympics",
"http://thecolbertreport.cc.com/videos/z9bfu8/president-obama-mentions-stephen",
"http://thecolbertreport.cc.com/videos/4nmlgo/health-care-marriage-counseling",
"http://thecolbertreport.cc.com/videos/6qwf52/olympics-wrap-up---michael-buble",
"http://thecolbertreport.cc.com/videos/ncbadn/don-cheadle",
"http://thecolbertreport.cc.com/videos/zbx22j/sign-off---goodnight"
],
"guest": "Don Cheadle"
},
{
"date": "2010-03-02",
"videos": [
"http://thecolbertreport.cc.com/videos/mevtpj/intro---03-02-10",
"http://thecolbertreport.cc.com/videos/wa48j7/president-obama-s-first-physical",
"http://thecolbertreport.cc.com/videos/u1ymnx/the-word---kid-owe",
"http://thecolbertreport.cc.com/videos/odsatp/colbert-platinum---necker-nymph---lexus-lfa",
"http://thecolbertreport.cc.com/videos/cc44qu/david-brooks",
"http://thecolbertreport.cc.com/videos/ci6g0d/sign-off---goose-that-lays-the-golden-egg"
],
"guest": "David Brooks"
},
{
"date": "2010-03-03",
"videos": [
"http://thecolbertreport.cc.com/videos/srp7ci/jim-bunning-ends-filibuster",
"http://thecolbertreport.cc.com/videos/37u7lc/greece-s-economic-downfall---scheherazade-rehman",
"http://thecolbertreport.cc.com/videos/elhxu1/tip-wag---american-academy-of-pediatrics---starbucks",
"http://thecolbertreport.cc.com/videos/m631tw/garry-wills",
"http://thecolbertreport.cc.com/videos/d3nhmb/sign-off---goodnight"
],
"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/tip-wag---james-o-keefe---sean-hannity",
"http://thecolbertreport.cc.com/videos/vy9si5/barry-schwartz",
"http://thecolbertreport.cc.com/videos/r3uuup/sign-off---see-you-later--alligator"
],
"guest": "Barry Schwartz"
},
{
"date": "2010-03-08",
"videos": [
"http://thecolbertreport.cc.com/videos/1919hp/exclusive---olympic-international-houses-pt--2",
"http://thecolbertreport.cc.com/videos/zqfavl/action-center---health-care-bill---ezra-klein",
"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/sign-off---one-thought",
"http://thecolbertreport.cc.com/videos/xdowah/exclusive---olympic-international-houses-pt--1"
],
"guest": "Tom Hanks"
},
{
"date": "2010-03-09",
"videos": [
"http://thecolbertreport.cc.com/videos/6zrwd6/consumer-alert---pringles",
"http://thecolbertreport.cc.com/videos/rokdab/the-word---define---conquer",
"http://thecolbertreport.cc.com/videos/b670fj/tip-wag---joe-lieberman--the-pope---sharks",
"http://thecolbertreport.cc.com/videos/evq830/annie-leonard",
"http://thecolbertreport.cc.com/videos/887xl8/sign-off---goodnight"
],
"guest": "Annie Leonard"
},
{
"date": "2010-03-10",
"videos": [
"http://thecolbertreport.cc.com/videos/rj79bv/intro---03-10-10",
"http://thecolbertreport.cc.com/videos/ij37tl/non-sexual-groping",
"http://thecolbertreport.cc.com/videos/94dkr8/health-care-vote-information-nerve-center---charlie-cook",
"http://thecolbertreport.cc.com/videos/9m4kr7/survival-seed-bank",
"http://thecolbertreport.cc.com/videos/ski7ov/sean-carroll",
"http://thecolbertreport.cc.com/videos/4k81na/sign-off---the-colbert-repoll"
],
"guest": "Sean Carroll"
},
{
"date": "2010-03-11",
"videos": [
"http://thecolbertreport.cc.com/videos/nce2ba/karl-rove-s-new-book",
"http://thecolbertreport.cc.com/videos/8tmwv8/the-colbert-repoll---scott-rasmussen",
"http://thecolbertreport.cc.com/videos/8r95fc/monkey-on-the-lam---florida",
"http://thecolbertreport.cc.com/videos/c8f0b1/david-aaronovitch",
"http://thecolbertreport.cc.com/videos/96nihd/sign-off---thanks--karl-rove"
],
"guest": "David Aaronovitch"
},
{
"date": "2010-03-15",
"videos": [
"http://thecolbertreport.cc.com/videos/mz0yt2/intro---03-15-10",
"http://thecolbertreport.cc.com/videos/hut7vd/daylight-savings-time",
"http://thecolbertreport.cc.com/videos/cfbe28/the-word---afghanistan",
"http://thecolbertreport.cc.com/videos/402t35/i-can-t-believe-it-s-not-buddha---raj-patel",
"http://thecolbertreport.cc.com/videos/rf3mus/robert-baer",
"http://thecolbertreport.cc.com/videos/mdf427/sign-off---goodnight-with-balloon"
],
"guest": "Robert Baer"
},
{
"date": "2010-03-16",
"videos": [
"http://thecolbertreport.cc.com/videos/fmjopd/intro---03-16-10",
"http://thecolbertreport.cc.com/videos/jz5m0e/barack-joe-bama",
"http://thecolbertreport.cc.com/videos/wuyjzf/i-s-on-edjukashun---texas-school-board",
"http://thecolbertreport.cc.com/videos/wl96gx/thought-for-food---donna-simpson--le-whif---cat-litter",
"http://thecolbertreport.cc.com/videos/4h8104/rebecca-skloot",
"http://thecolbertreport.cc.com/videos/r6jed2/sign-off---remember-to-wear-green"
],
"guest": "Rebecca Skloot"
},
{
"date": "2010-03-17",
"videos": [
"http://thecolbertreport.cc.com/videos/86ybsq/ireland-s-shamrock-shortage",
"http://thecolbertreport.cc.com/videos/wpflq2/sport-report---vasectomies--chess-boxing---golf",
"http://thecolbertreport.cc.com/videos/m84hav/united-states-census-2010",
"http://thecolbertreport.cc.com/videos/wqbtkw/nell-irvin-painter",
"http://thecolbertreport.cc.com/videos/vvqhqa/sign-off---goodnight"
],
"guest": "Nell Irvin Painter"
},
{
"date": "2010-03-18",
"videos": [
"http://thecolbertreport.cc.com/videos/9cthmz/middle-eastern-dogs",
"http://thecolbertreport.cc.com/videos/oymi80/glenn-beck-attacks-social-justice---james-martin",
"http://thecolbertreport.cc.com/videos/70uuap/cheating-death---clenched-fingers---pill-reminder",
"http://thecolbertreport.cc.com/videos/42czdy/mary-matalin",
"http://thecolbertreport.cc.com/videos/xqfew6/sign-off---goodnight"
],
"guest": "Mary Matalin"
},
{
"date": "2010-03-29",
"videos": [
"http://thecolbertreport.cc.com/videos/uolmzb/passover-dinner-with-elijah",
"http://thecolbertreport.cc.com/videos/ua8bnx/geriatric-breeding-program",
"http://thecolbertreport.cc.com/videos/ixrazk/the-word---napoleon-blown-apart",
"http://thecolbertreport.cc.com/videos/m8ik8j/passover-commercialism",
"http://thecolbertreport.cc.com/videos/yksbdg/claire-mccaskill",
"http://thecolbertreport.cc.com/videos/s0mkwg/sign-off---friedrich-schiller"
],
"guest": "Sen. Claire McCaskill"
},
{
"date": "2010-03-30",
"videos": [
"http://thecolbertreport.cc.com/videos/13gooh/intro---03-30-10",
"http://thecolbertreport.cc.com/videos/fbk80n/ricky-martin-is-gay",
"http://thecolbertreport.cc.com/videos/fvq7gv/the-word---forgive-and-forget",
"http://thecolbertreport.cc.com/videos/dx0lyr/thought-for-food---corn-diapers--fatty-foods---jamie-oliver",
"http://thecolbertreport.cc.com/videos/51a308/simon-johnson",
"http://thecolbertreport.cc.com/videos/c9ef0m/sign-off---pringles---whipped-cream"
],
"guest": "Simon Johnson"
},
{
"date": "2010-03-31",
"videos": [
"http://thecolbertreport.cc.com/videos/xyd8rc/intro---03-31-10",
"http://thecolbertreport.cc.com/videos/phkk0m/who-s-not-honoring-me-now----peabody-awards",
"http://thecolbertreport.cc.com/videos/mnvsrm/tip-wag---hutaree-militia---abc",
"http://thecolbertreport.cc.com/videos/p9l3um/easter-under-attack---peeps-display-update",
"http://thecolbertreport.cc.com/videos/wj35p0/craig-mullaney",
"http://thecolbertreport.cc.com/videos/bnjl9e/sign-off---finger-pointing-award"
],
"guest": "Craig Mullaney"
},
{
"date": "2010-04-01",
"videos": [
"http://thecolbertreport.cc.com/videos/cej48a/intro---04-01-10",
"http://thecolbertreport.cc.com/videos/iymjih/stephen-gets-a-free-ipad",
"http://thecolbertreport.cc.com/videos/2nbqob/elephant-graveyard---david-frum",
"http://thecolbertreport.cc.com/videos/d9x5mh/jell-o-tampering",
"http://thecolbertreport.cc.com/videos/3z9wwh/judith-shulevitz",
"http://thecolbertreport.cc.com/videos/vjehbr/sign-off---goodnight-with-an-ipad"
],
"guest": "David Frum, Judith Shulevitz"
},
{
"date": "2010-04-05",
"videos": [
"http://thecolbertreport.cc.com/videos/5ehjj8/intro---04-05-10",
"http://thecolbertreport.cc.com/videos/9ef1ri/stephen-converts-to-3d",
"http://thecolbertreport.cc.com/videos/xo27p1/the-word---bait-and-snitch",
"http://thecolbertreport.cc.com/videos/rp7kua/threatdown---fox--the-obamas---time-traveling-brandy-thieves",
"http://thecolbertreport.cc.com/videos/672vju/dean-kamen",
"http://thecolbertreport.cc.com/videos/zv5abl/sign-off---goodnight-in-3d"
],
"guest": "Dean Kamen"
},
{
"date": "2010-04-06",
"videos": [
"http://thecolbertreport.cc.com/videos/l4nkoq/science-catfight---joe-bastardi-vs--brenda-ekwurzel",
"http://thecolbertreport.cc.com/videos/506dri/scrabble-allows-proper-names",
"http://thecolbertreport.cc.com/videos/hovkbz/al-sharpton",
"http://thecolbertreport.cc.com/videos/z3ifg9/sign-off---goodnight"
],
"guest": "Joe Bastardi, Brenda Ekwurzel, Rev. Al Sharpton"
},
{
"date": "2010-04-07",
"videos": [
"http://thecolbertreport.cc.com/videos/b1trvk/tiki-barber-cheats-on-his-wife",
"http://thecolbertreport.cc.com/videos/ov8dk6/tip-wag---hello-kitty-wine---pig-s-blood-filters",
"http://thecolbertreport.cc.com/videos/ds7vyt/nailed--em---fentimans-victorian-lemonade",
"http://thecolbertreport.cc.com/videos/23bsc5/david-simon",
"http://thecolbertreport.cc.com/videos/c3sk5b/sign-off---hello-kitty-wine---cigarettes"
],
"guest": "David Simon"
},
{
"date": "2010-04-08",
"videos": [
"http://thecolbertreport.cc.com/videos/x3hnt4/intro---04-08-10",
"http://thecolbertreport.cc.com/videos/p89oku/tiger-s-nike-commercial",
"http://thecolbertreport.cc.com/videos/06i9x0/the-word---affirmative-inaction",
"http://thecolbertreport.cc.com/videos/as4xr9/the-final-final-frontier",
"http://thecolbertreport.cc.com/videos/kkc8ee/neil-degrasse-tyson",
"http://thecolbertreport.cc.com/videos/54hsqy/sign-off---no-man-is-a-failure"
],
"guest": "Neil DeGrasse Tyson"
},
{
"date": "2010-04-12",
"videos": [
"http://thecolbertreport.cc.com/videos/5mdm7i/exclusive---julian-assange-extended-interview",
"http://thecolbertreport.cc.com/videos/vxvlp9/unpaid-internship-crackdown",
"http://thecolbertreport.cc.com/videos/ag970g/justice-stevens-replacement---jeffrey-toobin",
"http://thecolbertreport.cc.com/videos/3a0o7p/wikileaks-military-video",
"http://thecolbertreport.cc.com/videos/q1yz2t/julian-assange",
"http://thecolbertreport.cc.com/videos/abcefn/sign-off---goodnight"
],
"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/the-word---the-lost-cause",
"http://thecolbertreport.cc.com/videos/l0qwni/thought-for-food---mentally-ill-advertisers---german-cupcakes",
"http://thecolbertreport.cc.com/videos/aab36z/jon-mooallem",
"http://thecolbertreport.cc.com/videos/qrdpob/sign-off---cupcake-chicken-sandwich"
],
"guest": "Jon Mooallem"
},
{
"date": "2010-04-14",
"videos": [
"http://thecolbertreport.cc.com/videos/i50gi7/president-obama-bows-again",
"http://thecolbertreport.cc.com/videos/xhpjb5/sunday-morning-fact-checking---jake-tapper---bill-adair",
"http://thecolbertreport.cc.com/videos/f941v8/ryanair-charges-for-toilets",
"http://thecolbertreport.cc.com/videos/ohefue/david-shields",
"http://thecolbertreport.cc.com/videos/igm53s/sign-off---china-s-central-finance-ministry"
],
"guest": "David Shields"
},
{
"date": "2010-04-15",
"videos": [
"http://thecolbertreport.cc.com/videos/eskkbc/intro---04-15-10",
"http://thecolbertreport.cc.com/videos/1fannu/stephen-saves-the-space-program",
"http://thecolbertreport.cc.com/videos/1ymc3v/tip-wag---forbes---hipsters",
"http://thecolbertreport.cc.com/videos/5gztgb/formula-01-liquid-genetic-material",
"http://thecolbertreport.cc.com/videos/q2q4mc/aimee-mullins",
"http://thecolbertreport.cc.com/videos/t03669/sign-off---tax-deadline"
],
"guest": "Aimee Mullins"
},
{
"date": "2010-04-19",
"videos": [
"http://thecolbertreport.cc.com/videos/o36u2p/marilyn-monroe-s-x-rays",
"http://thecolbertreport.cc.com/videos/55ox6j/goldman-sachs--fraud-case---andrew-ross-sorkin",
"http://thecolbertreport.cc.com/videos/cyx4fw/volcano-eyjafjallajokull",
"http://thecolbertreport.cc.com/videos/ca04kl/george-will",
"http://thecolbertreport.cc.com/videos/8di6ao/sign-off---too-big-to-fail"
],
"guest": "Andrew Ross Sorkin, George Will"
},
{
"date": "2010-04-20",
"videos": [
"http://thecolbertreport.cc.com/videos/5kfqlg/intro---04-20-10",
"http://thecolbertreport.cc.com/videos/q0xdhc/robotic-voice-simulator---foreign-accent-syndrome",
"http://thecolbertreport.cc.com/videos/f5imzl/p-k--winsome---tea-party-consulting",
"http://thecolbertreport.cc.com/videos/2o8c1s/stephen-refuses-to-celebrate-4-20",
"http://thecolbertreport.cc.com/videos/n3iff5/jeffrey-katzenberg",
"http://thecolbertreport.cc.com/videos/kuy0dk/sign-off---as-they-say-in-japan"
],
"guest": "Jeffrey Katzenberg"
},
{
"date": "2010-04-21",
"videos": [
"http://thecolbertreport.cc.com/videos/6z2omj/the-new--100-bill",
"http://thecolbertreport.cc.com/videos/2nsr1s/the-word---no-problemo",
"http://thecolbertreport.cc.com/videos/mqfg58/nailed--em---drive-through-rapping",
"http://thecolbertreport.cc.com/videos/0teg38/craig-robinson",
"http://thecolbertreport.cc.com/videos/2tayao/sign-off---donate-to-john-legend-s-charity"
],
"guest": "Craig Robinson"
},
{
"date": "2010-04-22",
"videos": [
"http://thecolbertreport.cc.com/videos/62j0m5/newspapers-celebrate-earth-day",
"http://thecolbertreport.cc.com/videos/tqucn8/the-word---straight-to-video",
"http://thecolbertreport.cc.com/videos/g660yb/bonus-word---defamation-of-independents",
"http://thecolbertreport.cc.com/videos/0le7r3/gorillaz",
"http://thecolbertreport.cc.com/videos/s79r6n/sign-off---this-is-a-fun-job"
],
"guest": "Gorillaz"
},
{
"date": "2010-04-26",
"videos": [
"http://thecolbertreport.cc.com/videos/i6lszt/intro---04-26-10",
"http://thecolbertreport.cc.com/videos/exfe65/boobquake-day-causes-earthquake",
"http://thecolbertreport.cc.com/videos/ddudkb/the-word---docu-drama",
"http://thecolbertreport.cc.com/videos/4qgs1h/indecision-2010---midterm-elections---sue-lowden",
"http://thecolbertreport.cc.com/videos/j7hi89/sharon-jones"
],
"guest": "Sharon Jones and the Dap-Kings"
},
{
"date": "2010-04-27",
"videos": [
"http://thecolbertreport.cc.com/videos/5m4fi7/intro---04-27-10",
"http://thecolbertreport.cc.com/videos/7b23mk/the-real-lloyd-blankfein",
"http://thecolbertreport.cc.com/videos/ais5bh/stephen-hawking-is-such-an-a-hole---encountering-aliens",
"http://thecolbertreport.cc.com/videos/rjye16/conn-iggulden",
"http://thecolbertreport.cc.com/videos/68bzkf/sign-off---six-flags-discount-tickets"
],
"guest": "Conn Iggulden"
},
{
"date": "2010-04-28",
"videos": [
"http://thecolbertreport.cc.com/videos/g493lv/intro---04-28-10",
"http://thecolbertreport.cc.com/videos/uzkxfc/gulf-of-mexico-oil-spill",
"http://thecolbertreport.cc.com/videos/tzdwrb/cheating-death---tobacco-mints--breast-milk---hallucinogens",
"http://thecolbertreport.cc.com/videos/ke79c8/difference-makers---robert-ekas",
"http://thecolbertreport.cc.com/videos/pj9ppq/gregg-easterbrook",
"http://thecolbertreport.cc.com/videos/1tu0hz/sign-off---chief-wandering-meadow-s-headdress"
],
"guest": "Gregg Easterbrook"
},
{
"date": "2010-04-29",
"videos": [
"http://thecolbertreport.cc.com/videos/qu7aln/intro---rube-goldberg-machine",
"http://thecolbertreport.cc.com/videos/dima6g/wind-farm---oil-spill",
"http://thecolbertreport.cc.com/videos/u1djps/california-s-proposition-14---abel-maldonado",
"http://thecolbertreport.cc.com/videos/yqd68y/tip-wag---scientists---kfc",
"http://thecolbertreport.cc.com/videos/byd88g/ok-go"
],
"guest": "Abel Maldonado, OK Go"
},
{
"date": "2010-05-03",
"videos": [
"http://thecolbertreport.cc.com/videos/caaib9/times-square-terrorism",
"http://thecolbertreport.cc.com/videos/i2zwg4/fda-salt-regulation---lori-roman---michael-jacobson",
"http://thecolbertreport.cc.com/videos/bfve2i/bp-s-undersea-dome",
"http://thecolbertreport.cc.com/videos/6yc052/elizabeth-warren",
"http://thecolbertreport.cc.com/videos/jj9r4k/sign-off---lady-liberty-souvenirs"
],
"guest": "Elizabeth Warren"
},
{
"date": "2010-05-04",
"videos": [
"http://thecolbertreport.cc.com/videos/dula0l/intro---05-04-10",
"http://thecolbertreport.cc.com/videos/zfi7tc/boom--doesn-t-go-the-dynamite",
"http://thecolbertreport.cc.com/videos/dvwpph/the-word---flight-risk",
"http://thecolbertreport.cc.com/videos/xyjhb7/stephen-hawking-is-such-an-a-hole---time-travel",
"http://thecolbertreport.cc.com/videos/j2pf36/mark-moffett",
"http://thecolbertreport.cc.com/videos/d97fmn/sign-off---michael-j--fox-gets-locked-in"
],
"guest": "Michael J. Fox, Mark W. Moffett"
},
{
"date": "2010-05-05",
"videos": [
"http://thecolbertreport.cc.com/videos/nlh1ly/intro---05-05-10",
"http://thecolbertreport.cc.com/videos/2nfnz7/nashville-flood-wakeboarder",
"http://thecolbertreport.cc.com/videos/bw8v97/the-enemy-within---backyard-clothesline",
"http://thecolbertreport.cc.com/videos/2p2tqn/alpha-dog-of-the-week---george-rekers",
"http://thecolbertreport.cc.com/videos/pnjs6i/dave-isay",
"http://thecolbertreport.cc.com/videos/xufsxi/sign-off---dancing-with-julian"
],
"guest": "David Isay"
},
{
"date": "2010-05-06",
"videos": [
"http://thecolbertreport.cc.com/videos/pvx1hb/white-people-prayer-gap",
"http://thecolbertreport.cc.com/videos/97ikxz/british-election-couverage---andrew-sullivan",
"http://thecolbertreport.cc.com/videos/8a0q0r/movies-that-are-destroying-america---2010-summer-movie-edition",
"http://thecolbertreport.cc.com/videos/xo7hie/stewart-brand",
"http://thecolbertreport.cc.com/videos/0txjlv/sign-off---the-usa-today"
],
"guest": "Stewart Brand"
},
{
"date": "2010-05-10",
"videos": [
"http://thecolbertreport.cc.com/videos/8bpcly/intro---05-10-10",
"http://thecolbertreport.cc.com/videos/0m67h9/house-returns-the-favor",
"http://thecolbertreport.cc.com/videos/pxkemd/greece-wither-soon---scheherazade-rehman",
"http://thecolbertreport.cc.com/videos/oejc0z/oil-containment-solution-randomizer",
"http://thecolbertreport.cc.com/videos/6ikft9/gary-johnson",
"http://thecolbertreport.cc.com/videos/xeq5yb/sign-off---goodnight"
],
"guest": "Gov. Gary Johnson"
},
{
"date": "2010-05-11",
"videos": [
"http://thecolbertreport.cc.com/videos/n8gkaf/intro---05-11-10",
"http://thecolbertreport.cc.com/videos/pcdm2a/consumer-alert---best-friends-charm-bracelets",
"http://thecolbertreport.cc.com/videos/1227nt/kagan-worship---dahlia-lithwick",
"http://thecolbertreport.cc.com/videos/rp68kf/australian-sperm-shortage",
"http://thecolbertreport.cc.com/videos/d04me7/hampton-sides",
"http://thecolbertreport.cc.com/videos/qv4b2o/sign-off---wriststrong-arm"
],
"guest": "Hampton Sides"
},
{
"date": "2010-05-12",
"videos": [
"http://thecolbertreport.cc.com/videos/nyl5ye/intro---05-12-10",
"http://thecolbertreport.cc.com/videos/rxu3ed/controlled-burn-of-a-natural-gas",
"http://thecolbertreport.cc.com/videos/zf5e7d/threatdown---military-food-police--jazz-robots---pretty-girls",
"http://thecolbertreport.cc.com/videos/0mg8t8/stephen-s-sound-advice---how-to-ace-the-sats",
"http://thecolbertreport.cc.com/videos/jynvz7/deepak-chopra",
"http://thecolbertreport.cc.com/videos/0mpxm3/sign-off---fire-extinguisher-shooting"
],
"guest": "Deepak Chopra"
},
{
"date": "2010-05-13",
"videos": [
"http://thecolbertreport.cc.com/videos/uic1xz/intro---05-13-10",
"http://thecolbertreport.cc.com/videos/mp7sng/confirming-elena",
"http://thecolbertreport.cc.com/videos/o1qad4/the-hold-steady",
"http://thecolbertreport.cc.com/videos/ugcamu/sign-off---time-traveling-brandy-thief"
],
"guest": "The Hold Steady"
},
{
"date": "2010-06-01",
"videos": [
"http://thecolbertreport.cc.com/videos/1heoo5/intro---6-1-10",
"http://thecolbertreport.cc.com/videos/395e6g/vodka-eyeballing",
"http://thecolbertreport.cc.com/videos/6f9c47/up-brit-creek",
"http://thecolbertreport.cc.com/videos/p943d0/failure-to-launch---atlantis-crew",
"http://thecolbertreport.cc.com/videos/ngl48j/ayaan-hirsi-ali",
"http://thecolbertreport.cc.com/videos/jygylj/sign-off---water-eyeballing"
],
"guest": "Ayaan Hirsi Ali"
},
{
"date": "2010-06-02",
"videos": [
"http://thecolbertreport.cc.com/videos/6707v3/intro---6-2-10",
"http://thecolbertreport.cc.com/videos/gqwbeo/japan-s-special-election---kazuo-myazaki",
"http://thecolbertreport.cc.com/videos/qrxaw1/tip-wag---foxconn--charles-taylor---naomi-campbell",
"http://thecolbertreport.cc.com/videos/4dk71f/craziest-f--ing-thing-i-ve-ever-heard---gored-bullfighter",
"http://thecolbertreport.cc.com/videos/dvcqzb/lisa-miller",
"http://thecolbertreport.cc.com/videos/a4ztpz/sign-off---parting-gifts-for-kazuo-myazaki"
],
"guest": "Lisa Miller"
},
{
"date": "2010-06-03",
"videos": [
"http://thecolbertreport.cc.com/videos/d81bvl/intro---6-3-10",
"http://thecolbertreport.cc.com/videos/iy7vo7/crude---unusual",
"http://thecolbertreport.cc.com/videos/44gj25/who-s-watching-the-watchdog----liam-mccormack",
"http://thecolbertreport.cc.com/videos/p34tly/who-s-riding-my-coattails-now----ipad-suit-pocket",
"http://thecolbertreport.cc.com/videos/fo5d9i/vampire-weekend"
],
"guest": "Vampire Weekend"
},
{
"date": "2010-06-07",
"videos": [
"http://thecolbertreport.cc.com/videos/r4arov/intro---6-7-10",
"http://thecolbertreport.cc.com/videos/y0xgng/charity-begins-at-11-30",
"http://thecolbertreport.cc.com/videos/lc7nxu/oil-s-well-that-never-ends",
"http://thecolbertreport.cc.com/videos/c2l6b4/oil-spill-rage---james-carville",
"http://thecolbertreport.cc.com/videos/30w6f5/jonathan-alter",
"http://thecolbertreport.cc.com/videos/ow5rnp/sign-off---gulf-of-america-fund"
],
"guest": "James Carville, Jonathan Alter"
},
{
"date": "2010-06-08",
"videos": [
"http://thecolbertreport.cc.com/videos/uj5obr/obama-s-whoomp--there-it-is-controversy",
"http://thecolbertreport.cc.com/videos/yj9oop/the-word---p-r--mageddon",
"http://thecolbertreport.cc.com/videos/n3e887/mark-frauenfelder",
"http://thecolbertreport.cc.com/videos/r1zjxy/sign-off---the-most-useless-machine"
],
"guest": "Mark Frauenfelder"
},
{
"date": "2010-06-09",
"videos": [
"http://thecolbertreport.cc.com/videos/ou7te0/helen-thomas-s-reputation",
"http://thecolbertreport.cc.com/videos/0eesk5/formidable-opponent---michael-oren",
"http://thecolbertreport.cc.com/videos/41cjs4/shout-out---7th-eaccs",
"http://thecolbertreport.cc.com/videos/12z179/sam-nunn",
"http://thecolbertreport.cc.com/videos/hv8uj4/sign-off---50-hamburgers"
],
"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/sport-report---soccer-debate---marc-fisher---mark-starr",
"http://thecolbertreport.cc.com/videos/9rht3y/simulated-mars-mission",
"http://thecolbertreport.cc.com/videos/19ikyl/alan-bean",
"http://thecolbertreport.cc.com/videos/gewg17/sign-off---chocolate-syrup"
],
"guest": "Alan Bean"
},
{
"date": "2010-06-14",
"videos": [
"http://thecolbertreport.cc.com/videos/7xsbh3/intro---6-14-10",
"http://thecolbertreport.cc.com/videos/vlk9h9/america-s-strained-relationship-with-england",
"http://thecolbertreport.cc.com/videos/xhnftx/smokin--pole---the-quest-for-arctic-riches--canada---china",
"http://thecolbertreport.cc.com/videos/b6bfik/who-s-not-honoring-me-now----tonys---mtv-movie-awards",
"http://thecolbertreport.cc.com/videos/bd9ero/stephen-prothero",
"http://thecolbertreport.cc.com/videos/t2lbqh/sign-off---the-new-oxford-american-dictionary"
],
"guest": "Stephen Prothero"
},
{
"date": "2010-06-15",
"videos": [
"http://thecolbertreport.cc.com/videos/ue0g9m/intro---6-15-10",
"http://thecolbertreport.cc.com/videos/w6pwpk/testoster-ruin---hanna-rosin",
"http://thecolbertreport.cc.com/videos/o42e2u/tip-wag---marshall-islands---disney-world-fate",
"http://thecolbertreport.cc.com/videos/zkoqn2/carl-safina",
"http://thecolbertreport.cc.com/videos/vr28jt/sign-off---hot-boxers"
],
"guest": "Dr. Carl Safina"
},
{
"date": "2010-06-16",
"videos": [
"http://thecolbertreport.cc.com/videos/vtw6mw/intro---6-16-10",
"http://thecolbertreport.cc.com/videos/atwjd4/obama-s-bp-oil-spill-speech",
"http://thecolbertreport.cc.com/videos/fq1qpx/the-word----tay-the-cour-e",
"http://thecolbertreport.cc.com/videos/0occfp/brevity-is-the-soul-of-twit",
"http://thecolbertreport.cc.com/videos/ak28k2/devo"
],
"guest": "Devo"
},
{
"date": "2010-06-17",
"videos": [
"http://thecolbertreport.cc.com/videos/zp0vlt/exclusive---who-s-watching-the-watchdog-pt--1",
"http://thecolbertreport.cc.com/videos/mgk9uw/exclusive---who-s-watching-the-watchdog-pt--2",
"http://thecolbertreport.cc.com/videos/lmlfss/obama-s-simplified-bp-oil-spill-speech",
"http://thecolbertreport.cc.com/videos/r0x7kl/south-carolina-s-4th-district-primary---bob-inglis",
"http://thecolbertreport.cc.com/videos/pw3z5k/colbert-platinum---summer-travel-edition",
"http://thecolbertreport.cc.com/videos/psfs9q/david-mamet",
"http://thecolbertreport.cc.com/videos/t0bf7h/sign-off---retweet-for-the-gulf-of-america-fund"
],
"guest": "David Mamet"
},
{
"date": "2010-06-21",
"videos": [
"http://thecolbertreport.cc.com/videos/3xh3zp/us-ties-with-slovenia",
"http://thecolbertreport.cc.com/videos/tsbncg/fallback-position---astronaut-pt--1",
"http://thecolbertreport.cc.com/videos/lw3o9e/joe-barton-s-misconstrued-misconstruction",
"http://thecolbertreport.cc.com/videos/6rxgjl/wes-moore",
"http://thecolbertreport.cc.com/videos/xr56ob/sign-off---spare-cursed-monkey-s-paw"
],
"guest": "Wes Moore"
},
{
"date": "2010-06-22",
"videos": [
"http://thecolbertreport.cc.com/videos/f7v2qo/who-s-riding-my-coattails-now----ipad-suit-pocket",
"http://thecolbertreport.cc.com/videos/mt3j86/stanley-mcchrystal-talks-to-rolling-stone",
"http://thecolbertreport.cc.com/videos/dry79y/fallback-position---astronaut-pt--2",
"http://thecolbertreport.cc.com/videos/eyzb5g/usa-board-of-ophthalmological-freedom",
"http://thecolbertreport.cc.com/videos/ej23e4/gloria-steinem",
"http://thecolbertreport.cc.com/videos/jewfph/sign-off---goodnight"
],
"guest": "Gloria Steinem"
},
{
"date": "2010-06-23",
"videos": [
"http://thecolbertreport.cc.com/videos/h4yffi/intro---6-23-10",
"http://thecolbertreport.cc.com/videos/wcoc11/us-defeats-algeria",
"http://thecolbertreport.cc.com/videos/licobk/yahweh-or-no-way---the-blues-brothers---glenn-beck",
"http://thecolbertreport.cc.com/videos/3dk57p/prophet-glenn-beck---father-guido-sarducci",
"http://thecolbertreport.cc.com/videos/quds8l/tim-westergren",
"http://thecolbertreport.cc.com/videos/p3f9t8/sign-off---tomorrow-s-fallback-position"
],
"guest": "Tim Westergren"
},
{
"date": "2010-06-24",
"videos": [
"http://thecolbertreport.cc.com/videos/k3vali/intro---6-24-10",
"http://thecolbertreport.cc.com/videos/i8ohf4/put-the-cursed-monkey-paw-down",
"http://thecolbertreport.cc.com/videos/5m2oyq/the-word---weapon-of-mass-construction",
"http://thecolbertreport.cc.com/videos/6ppo8y/fallback-position---astronaut-pt--3",
"http://thecolbertreport.cc.com/videos/3td47y/michael-specter",
"http://thecolbertreport.cc.com/videos/86kjse/sign-off---general-s-cap"
],
"guest": "Michael Specter"
},
{
"date": "2010-06-28",
"videos": [
"http://thecolbertreport.cc.com/videos/cchudg/robert-c--byrd-dies-at-92",
"http://thecolbertreport.cc.com/videos/t7kbm8/rolling-stone-article-on-mcchrystal---michael-hastings",
"http://thecolbertreport.cc.com/videos/nxs1np/doomsday-bunkers",
"http://thecolbertreport.cc.com/videos/kpz62f/john-waters",
"http://thecolbertreport.cc.com/videos/q1un38/sign-off---goodnight"
],
"guest": "Michael Hastings, John Waters"
},
{
"date": "2010-06-29",
"videos": [
"http://thecolbertreport.cc.com/videos/8w7w4q/intro---6-29-10",
"http://thecolbertreport.cc.com/videos/5i29xg/supreme-court-justice-sweetness",
"http://thecolbertreport.cc.com/videos/gxmj8l/basketcase---stephie-s-knicks-hoop-de-doo-pt--1",
"http://thecolbertreport.cc.com/videos/cxtlq7/lube-job",
"http://thecolbertreport.cc.com/videos/t7eba8/julian-castro",
"http://thecolbertreport.cc.com/videos/6s4ag9/sign-off---sweetness"
],
"guest": "Mayor Julian Castro"
},
{
"date": "2010-06-30",
"videos": [
"http://thecolbertreport.cc.com/videos/4nay3b/mysteries-of-the-ancient-unknown---king-tut-s-penis-pt--1",
"http://thecolbertreport.cc.com/videos/200t0y/cold-war-update---north-korea---russian-spies",
"http://thecolbertreport.cc.com/videos/85xlkw/nicholas-carr",
"http://thecolbertreport.cc.com/videos/zz75v5/sign-off---goodnight"
],
"guest": "Nicholas Carr"
},
{
"date": "2010-07-01",
"videos": [
"http://thecolbertreport.cc.com/videos/qkh2oy/intro---7-1-10",
"http://thecolbertreport.cc.com/videos/p1rz8m/al-qaeda-starts-inspire-magazine",
"http://thecolbertreport.cc.com/videos/ytd0xh/threatdown---dawn--actual-food---texas-gop",
"http://thecolbertreport.cc.com/videos/zgf08n/tangelo-american-john-boehner",
"http://thecolbertreport.cc.com/videos/7p27ga/manny-howard",
"http://thecolbertreport.cc.com/videos/lruog2/sign-off---obsessive-compulsive-disorder"
],
"guest": "Manny Howard"
},
{
"date": "2010-07-05",
"videos": [
"http://thecolbertreport.cc.com/videos/88l8y3/stephen-is-sick",
"http://thecolbertreport.cc.com/videos/yw04k6/electronic-frontier-foundation---cindy-cohn",
"http://thecolbertreport.cc.com/videos/2vgxvc/unemployment-benefits---paul-krugman",
"http://thecolbertreport.cc.com/videos/tod2oy/michio-kaku",
"http://thecolbertreport.cc.com/videos/59nr33/sign-off---the-hot-zone"
],
"guest": "Paul Krugman, Dr. Michio Kaku"
},
{
"date": "2010-07-06",
"videos": [
"http://thecolbertreport.cc.com/videos/jogb92/intro---7-6-10",
"http://thecolbertreport.cc.com/videos/vh6d9y/latest-soap-opera-news",
"http://thecolbertreport.cc.com/videos/v4t63q/the-word---the-white-stuff",
"http://thecolbertreport.cc.com/videos/52xc1z/i-s-on-edjukashun---loyola--texas-textbooks---wal-mart",
"http://thecolbertreport.cc.com/videos/44dhom/garret-keizer",
"http://thecolbertreport.cc.com/videos/p9lstk/sign-off---goodnight"
],
"guest": "Garret Keizer"
},
{
"date": "2010-07-07",
"videos": [
"http://thecolbertreport.cc.com/videos/yx0x8s/the-carell-corral",
"http://thecolbertreport.cc.com/videos/u8pmv7/the-economist-photoshops-obama-s-picture",
"http://thecolbertreport.cc.com/videos/2vaaww/thought-for-food---kentucky-tuna---grilled-cheese-burger-melt",
"http://thecolbertreport.cc.com/videos/7ctnwz/formula-401--beauty-from-my-beast",
"http://thecolbertreport.cc.com/videos/s7mibo/steve-carell",
"http://thecolbertreport.cc.com/videos/ytvd7r/sign-off---2010-sexy-spermatozoa-calendar"
],
"guest": "Steve Carell"
},
{
"date": "2010-07-08",
"videos": [
"http://thecolbertreport.cc.com/videos/381yrb/intro---7-8-10",
"http://thecolbertreport.cc.com/videos/x5lln0/modest-con-2010",
"http://thecolbertreport.cc.com/videos/zjdl0i/automatics-for-the-people---ilya-shapiro---jackie-hilly",
"http://thecolbertreport.cc.com/videos/eieifn/emergency-thought-for-food---candwich-setback",
"http://thecolbertreport.cc.com/videos/nlmfgk/arturo-rodriguez",
"http://thecolbertreport.cc.com/videos/oc0gsm/sign-off---go-get-a-tan"
],
"guest": "Arturo Rodriguez"
},
{
"date": "2010-07-26",
"videos": [
"http://thecolbertreport.cc.com/videos/xsaeav/intro---7-26-10",
"http://thecolbertreport.cc.com/videos/snrn4u/stephen-s-eco-vacation",
"http://thecolbertreport.cc.com/videos/qqashr/racial-pro-firing",
"http://thecolbertreport.cc.com/videos/1axxh8/nailed--em---polka-piracy",
"http://thecolbertreport.cc.com/videos/u5kfga/hephzibah-anderson",
"http://thecolbertreport.cc.com/videos/rcl3ml/sign-off---bud-light-lime"
],
"guest": "Hephzibah Anderson"
},
{
"date": "2010-07-27",
"videos": [
"http://thecolbertreport.cc.com/videos/aiaw4g/intro---7-27-10",
"http://thecolbertreport.cc.com/videos/56iw57/bp-s-live-hayward-cam",
"http://thecolbertreport.cc.com/videos/m571z2/that-s-the-way-i-leak-it---tom-blanton",
"http://thecolbertreport.cc.com/videos/431v9v/tip-wag---baby-gap--dick-cheney---plants",
"http://thecolbertreport.cc.com/videos/2afxlp/kevin-kline",
"http://thecolbertreport.cc.com/videos/y6qd20/sign-off---goodnight"
],
"guest": "Thomas S. Blanton, Kevin Kline"
},
{
"date": "2010-07-28",
"videos": [
"http://thecolbertreport.cc.com/videos/it4pai/obama-blows-off-the-boy-scouts",
"http://thecolbertreport.cc.com/videos/ce9wme/the-word---ownership-society",
"http://thecolbertreport.cc.com/videos/k9y4mw/republican-gubernatorial-primary-battle-watch--010---tennessee",
"http://thecolbertreport.cc.com/videos/hjiro1/elon-musk",
"http://thecolbertreport.cc.com/videos/fl5n9q/sign-off---bit-of-advice"
],
"guest": "Elon Musk"
},
{
"date": "2010-07-29",
"videos": [
"http://thecolbertreport.cc.com/videos/cjuayn/intro---7-29-10",
"http://thecolbertreport.cc.com/videos/dzk032/the-oil-is-missing",
"http://thecolbertreport.cc.com/videos/i9hga3/thought-for-food---cereal--foot-long-cheeseburger---ecobot-iii",
"http://thecolbertreport.cc.com/videos/jt67k1/apology-box",
"http://thecolbertreport.cc.com/videos/sdjfj9/andy-cohen",
"http://thecolbertreport.cc.com/videos/6hqby7/sign-off---cocktails"
],
"guest": "Andy Cohen"
},
{
"date": "2010-08-02",
"videos": [
"http://thecolbertreport.cc.com/videos/07zpy3/intro---8-2-10",
"http://thecolbertreport.cc.com/videos/o9k8cr/stephen-might-be-gay",
"http://thecolbertreport.cc.com/videos/wx3505/sport-report---london-olympics---illegal-bullfighting",
"http://thecolbertreport.cc.com/videos/3dwyx0/alpha-dog-of-the-week---david-h--brooks",
"http://thecolbertreport.cc.com/videos/ln5q1u/jimmy-cliff"
],
"guest": "Jimmy Cliff"
},
{
"date": "2010-08-03",
"videos": [
"http://thecolbertreport.cc.com/videos/s8t2k9/brett-favre-retires-again",
"http://thecolbertreport.cc.com/videos/noj1lw/consumer-protection-agency---barney-frank",
"http://thecolbertreport.cc.com/videos/jrpte4/republican-gubernatorial-primary-battle-watch--010---basil-marceaux-com",
"http://thecolbertreport.cc.com/videos/a5r0r5/laura-ingraham",
"http://thecolbertreport.cc.com/videos/9838f3/sign-off---credit-card-agreement"
],
"guest": "Laura Ingraham"
},
{
"date": "2010-08-04",
"videos": [
"http://thecolbertreport.cc.com/videos/eirad0/basil-marceaux-com---obama-s-birthday",
"http://thecolbertreport.cc.com/videos/4mbc26/p-k--winsome---black-viewer-ratings",
"http://thecolbertreport.cc.com/videos/vhx4eu/threat-standdown---monkey-terrorism",
"http://thecolbertreport.cc.com/videos/t5nlmh/michael-posner",
"http://thecolbertreport.cc.com/videos/gc9gia/sign-off---nielsen-mandela"
],
"guest": "Michael Posner"
},
{
"date": "2010-08-05",
"videos": [
"http://thecolbertreport.cc.com/videos/tsl05q/intro---8-5-10",
"http://thecolbertreport.cc.com/videos/1qu0ts/how-to-ruin-same-sex-marriages",
"http://thecolbertreport.cc.com/videos/gw1rft/pope-s-baseball-cap---catholictv",
"http://thecolbertreport.cc.com/videos/bdzvwl/savion-glover",
"http://thecolbertreport.cc.com/videos/our78a/sign-off---tap-dancing"
],
"guest": "Savion Glover"
},
{
"date": "2010-08-10",
"videos": [
"http://thecolbertreport.cc.com/videos/cfbxpk/intro---8-10-10",
"http://thecolbertreport.cc.com/videos/40r2zf/honoring-martin-luther-king",
"http://thecolbertreport.cc.com/videos/jbgt2s/citizenship-down---akhil-amar",
"http://thecolbertreport.cc.com/videos/v2az23/alpha-dog-of-the-week---steven-slater",
"http://thecolbertreport.cc.com/videos/uhmewn/dylan-ratigan",
"http://thecolbertreport.cc.com/videos/p3wgd1/sign-off---goodnight"
],
"guest": "Dylan Ratigan"
},
{
"date": "2010-08-11",
"videos": [
"http://thecolbertreport.cc.com/videos/jwpn0p/moral-compass-5000-action-center",
"http://thecolbertreport.cc.com/videos/tpcehb/david-finkel",
"http://thecolbertreport.cc.com/videos/j0nge7/sign-off---goodnight"
],
"guest": "David Finkel"
},
{
"date": "2010-08-12",
"videos": [
"http://thecolbertreport.cc.com/videos/ibivj9/intro---8-12-10",
"http://thecolbertreport.cc.com/videos/t6cmn9/happy-ramadan",
"http://thecolbertreport.cc.com/videos/tavgu2/the-word---weapon-of-mass-construction",
"http://thecolbertreport.cc.com/videos/obv2rl/senior-moment",
"http://thecolbertreport.cc.com/videos/lx17lm/chuck-close",
"http://thecolbertreport.cc.com/videos/h6dwnn/sign-off---chuck-close-books"
],
"guest": "Chuck Close"
},
{
"date": "2010-08-16",
"videos": [
"http://thecolbertreport.cc.com/videos/q61axv/growing-intelligence-community---richard-clarke",
"http://thecolbertreport.cc.com/videos/yh08ag/invasion-of-the-country-snatchers",
"http://thecolbertreport.cc.com/videos/gr3fyt/john-fetterman",
"http://thecolbertreport.cc.com/videos/6ksdhb/sign-off---starbucks-latte"
],
"guest": "Richard Clarke, John Fetterman"
},
{
"date": "2010-08-17",
"videos": [
"http://thecolbertreport.cc.com/videos/dlrtyi/intro---8-17-10",
"http://thecolbertreport.cc.com/videos/c3sn86/newsweek-ranks-the-world-s-best-countries",
"http://thecolbertreport.cc.com/videos/2hdefm/better-know-a-lobby---american-meat-institute",
"http://thecolbertreport.cc.com/videos/tno3pg/fox-news-and-republican-party-make-it-official",
"http://thecolbertreport.cc.com/videos/2kzgs4/barry-levine",
"http://thecolbertreport.cc.com/videos/xsqp9j/sign-off---newsweek"
],
"guest": "Barry Levine"
},
{
"date": "2010-08-18",
"videos": [
"http://thecolbertreport.cc.com/videos/vby4js/intro---8-18-10",
"http://thecolbertreport.cc.com/videos/50c2du/brett-favre-returns-to-football",
"http://thecolbertreport.cc.com/videos/08wn77/the-word---borderline-personality",
"http://thecolbertreport.cc.com/videos/l06vi1/don-t-shoot-the-schlessinger",
"http://thecolbertreport.cc.com/videos/389e2m/thomas-french",
"http://thecolbertreport.cc.com/videos/b2scuj/sign-off---sharpened-broom-handle"
],
"guest": "Thomas French"
},
{
"date": "2010-08-19",
"videos": [
"http://thecolbertreport.cc.com/videos/x0zwn9/intro---8-19-10",
"http://thecolbertreport.cc.com/videos/m4f5im/the-word---what-if-you-threw-a-peace-and-nobody-came-",
"http://thecolbertreport.cc.com/videos/2rjk08/all-s-well-that-ends-oil-well---michael-blum",
"http://thecolbertreport.cc.com/videos/c2uztk/jon-krakauer",
"http://thecolbertreport.cc.com/videos/g9w04r/sign-off---goodnight"
],
"guest": "Jon Krakauer"
},
{
"date": "2010-08-23",
"videos": [
"http://thecolbertreport.cc.com/videos/zn0m8s/stephen-wins-an-emmy",
"http://thecolbertreport.cc.com/videos/xa3l6x/the-word---losing-his-religion",
"http://thecolbertreport.cc.com/videos/8vazj8/aqua-threatdown---oyster-sluts--japanese-hackers---israeli-regulators",
"http://thecolbertreport.cc.com/videos/jjg6uf/leslie-kean",
"http://thecolbertreport.cc.com/videos/gbrydj/sign-off---balloon"
],
"guest": "Leslie Kean"
},
{
"date": "2010-08-24",
"videos": [
"http://thecolbertreport.cc.com/videos/8v2r6r/intro---8-24-10",
"http://thecolbertreport.cc.com/videos/ay7pky/terror-bunker-5200",
"http://thecolbertreport.cc.com/videos/rxmuip/the-word---control-self-delete",
"http://thecolbertreport.cc.com/videos/7azwuj/mahmoody-blues",
"http://thecolbertreport.cc.com/videos/vly30s/jeffrey-goldberg",
"http://thecolbertreport.cc.com/videos/p0468k/sign-off---sanitized-goodnight"
],
"guest": "Jeffrey Goldberg"
},
{
"date": "2010-08-25",
"videos": [
"http://thecolbertreport.cc.com/videos/ckwof5/john-mccain-s-victorious-defeat",
"http://thecolbertreport.cc.com/videos/bn16zn/stephen-colbert-university---andrew-hacker",
"http://thecolbertreport.cc.com/videos/nmp9j3/mysteries-of-the-ancient-unknown---king-tut-s-penis-pt--2",
"http://thecolbertreport.cc.com/videos/boejnl/heidi-cullen",
"http://thecolbertreport.cc.com/videos/8mv6il/sign-off---calculator"
],
"guest": "Andrew Hacker, Heidi Cullen"
},
{
"date": "2010-08-26",
"videos": [
"http://thecolbertreport.cc.com/videos/8g8jfw/intro---8-26-10",
"http://thecolbertreport.cc.com/videos/cg8fb2/fox-news-job-opening",
"http://thecolbertreport.cc.com/videos/3k8c17/glenn-livid",
"http://thecolbertreport.cc.com/videos/ozbh2e/you-mosque-be-kidding",
"http://thecolbertreport.cc.com/videos/idhto6/richard-engel",
"http://thecolbertreport.cc.com/videos/054o86/sign-off---speaking-fee"
],
"guest": "Richard Engel"
},
{
"date": "2010-09-07",
"videos": [
"http://thecolbertreport.cc.com/videos/99y0f6/intro---9-7-10",
"http://thecolbertreport.cc.com/videos/xvxdbg/geese-witherspoon",
"http://thecolbertreport.cc.com/videos/os39h8/better-know-a-district---delaware-s-at-large---mike-castle-update",
"http://thecolbertreport.cc.com/videos/ylp5nt/anthony-romero",
"http://thecolbertreport.cc.com/videos/olfody/sign-off---welcome-home-show"
],
"guest": "Anthony Romero"
},
{
"date": "2010-09-08",
"videos": [
"http://thecolbertreport.cc.com/videos/ynyu8x/intro---9-8-10",
"http://thecolbertreport.cc.com/videos/kmgrcb/been-there--won-that---joe-biden---yogi-berra",
"http://thecolbertreport.cc.com/videos/l21o2y/been-there--won-that---ray-odierno",
"http://thecolbertreport.cc.com/videos/dp7uzb/joe-biden",
"http://thecolbertreport.cc.com/videos/r1r2jw/sign-off---thanks-to-the-returning-troops"
],
"guest": "Vice President Joe Biden, Gen. Raymond Odierno"
},
{
"date": "2010-09-09",
"videos": [
"http://thecolbertreport.cc.com/videos/txd70l/been-there--won-that---jim-webb",
"http://thecolbertreport.cc.com/videos/tvmzxz/been-there--won-that---david-petraeus",
"http://thecolbertreport.cc.com/videos/9543jt/brent-cummings---josh-bleill"
],
"guest": "Sen. Jim Webb, Lt. Col. Brent Cummings, John Legend"
},
{
"date": "2010-09-13",
"videos": [
"http://thecolbertreport.cc.com/videos/4q0lgz/intro---9-13-10",
"http://thecolbertreport.cc.com/videos/1x4nj0/microwave-programming",
"http://thecolbertreport.cc.com/videos/wzt5ev/bears---balls---american-apparel---chocolatey",
"http://thecolbertreport.cc.com/videos/nwwxfb/stop-sending-live-animals",
"http://thecolbertreport.cc.com/videos/hr5uxa/lisa-birnbach",
"http://thecolbertreport.cc.com/videos/w7kfgs/sign-off---goodnight"
],
"guest": "Lisa Birnbach"
},
{
"date": "2010-09-14",
"videos": [
"http://thecolbertreport.cc.com/videos/zipkzm/intro---9-14-10",
"http://thecolbertreport.cc.com/videos/pet2x5/peta-criticizes-joe-biden",
"http://thecolbertreport.cc.com/videos/7cbxuw/the-word---mutually-assured-coercion",
"http://thecolbertreport.cc.com/videos/oh49ge/luther-campbell-opposes-ground-zero-mosque",
"http://thecolbertreport.cc.com/videos/yevohc/sean-wilentz",
"http://thecolbertreport.cc.com/videos/fugenz/sign-off---goodnight"
],
"guest": "Sean Wilentz"
},
{
"date": "2010-09-15",
"videos": [
"http://thecolbertreport.cc.com/videos/0hpaxs/intro---9-15-10",
"http://thecolbertreport.cc.com/videos/f8g0cq/libertea",
"http://thecolbertreport.cc.com/videos/7v15m5/atone-phone---joan-rivers-calls",
"http://thecolbertreport.cc.com/videos/n9nk9d/saul-griffith",
"http://thecolbertreport.cc.com/videos/mjozqh/sign-off---world-changing-announcement"
],
"guest": "Saul Griffith"
},
{
"date": "2010-09-16",
"videos": [
"http://thecolbertreport.cc.com/videos/uj8r4c/march-to-keep-fear-alive-announcement",
"http://thecolbertreport.cc.com/videos/5klha6/threatdown---bedbugs---environmentalists---jerome-goddard",
"http://thecolbertreport.cc.com/videos/pck634/lawrence-o-donnell",
"http://thecolbertreport.cc.com/videos/h5yz8n/sign-off---march-to-keep-fear-alive"
],
"guest": "Lawrence O'Donnell"
},
{
"date": "2010-09-20",
"videos": [
"http://thecolbertreport.cc.com/videos/cahpkw/intro---9-20-10",
"http://thecolbertreport.cc.com/videos/1fmwjo/christine-o-donnell-witch-test",
"http://thecolbertreport.cc.com/videos/diatjd/tip-wag---chilean-miners--portland-press-herald---isa-blyth",
"http://thecolbertreport.cc.com/videos/a4y4ey/march-to-keep-fear-alive-media-coverage",
"http://thecolbertreport.cc.com/videos/b65ofd/pavement"
],
"guest": "Pavement"
},
{
"date": "2010-09-21",
"videos": [
"http://thecolbertreport.cc.com/videos/yi7cbo/intro---9-21-10",
"http://thecolbertreport.cc.com/videos/t99up5/in-poor-taste---mark-shriver",
"http://thecolbertreport.cc.com/videos/2vrsvg/colbertslist",
"http://thecolbertreport.cc.com/videos/tnb3an/eric-schmidt",
"http://thecolbertreport.cc.com/videos/kecowj/sign-off---sign-up-for-the-march-to-keep-fear-alive"
],
"guest": "Eric Schmidt"
},
{
"date": "2010-09-22",
"videos": [
"http://thecolbertreport.cc.com/videos/q8xj8c/intro---9-22-10",
"http://thecolbertreport.cc.com/videos/gcap67/the-christine-o-donnell-clip-predictor-3000",
"http://thecolbertreport.cc.com/videos/xq0472/the-word---the-more-you-no",
"http://thecolbertreport.cc.com/videos/xr7q4y/fallback-position---migrant-worker-pt--1",
"http://thecolbertreport.cc.com/videos/kgnwdf/guillermo-del-toro",
"http://thecolbertreport.cc.com/videos/lnpblj/sign-off---stephen-won-t-forgive-you"
],
"guest": "Guillermo Del Toro"
},
{
"date": "2010-09-23",
"videos": [
"http://thecolbertreport.cc.com/videos/e9ulyf/intro---9-23-10",
"http://thecolbertreport.cc.com/videos/puxqvp/fallback-position---migrant-worker-pt--2",
"http://thecolbertreport.cc.com/videos/imp10g/sanchez-bump",
"http://thecolbertreport.cc.com/videos/937jzh/oscar-goodman",
"http://thecolbertreport.cc.com/videos/hitep1/sign-off---american-history-lesson"
],
"guest": "Oscar Goodman"
},
{
"date": "2010-09-27",
"videos": [
"http://thecolbertreport.cc.com/videos/esvw5v/intro---9-27-10",
"http://thecolbertreport.cc.com/videos/aychpz/corn-packer-apology",
"http://thecolbertreport.cc.com/videos/nc19il/the-delawert-report",
"http://thecolbertreport.cc.com/videos/pcae92/the-word---army-of-mum",
"http://thecolbertreport.cc.com/videos/kby55r/yahweh-or-no-way---ihop---antonio-federici-ad",
"http://thecolbertreport.cc.com/videos/y2afey/ken-burns",
"http://thecolbertreport.cc.com/videos/g2pys1/sign-off---goodnight"
],
"guest": "Ken Burns"
},
{
"date": "2010-09-28",
"videos": [
"http://thecolbertreport.cc.com/videos/s437p7/intro---9-28-10",
"http://thecolbertreport.cc.com/videos/gspyir/left-behind---paul-begala",
"http://thecolbertreport.cc.com/videos/57ib6e/terror-a-new-one",
"http://thecolbertreport.cc.com/videos/ut4vp1/ross-douthat",
"http://thecolbertreport.cc.com/videos/0pm7c2/sign-off---democratic-grave"
],
"guest": "Paul Begala, Ross Douthat"
},
{
"date": "2010-09-29",
"videos": [
"http://thecolbertreport.cc.com/videos/umvy3w/march-to-keep-fear-alive-insanity-bus",
"http://thecolbertreport.cc.com/videos/kup6co/the-word---original-spin",
"http://thecolbertreport.cc.com/videos/z1c69t/threatdown---record-breaking-gays--koalas---purell",
"http://thecolbertreport.cc.com/videos/q56zhc/steven-rattner",
"http://thecolbertreport.cc.com/videos/kn5pkq/sign-off---sign-up-for-the-march-to-keep-fear-alive"
],
"guest": "Steve Rattner"
},
{
"date": "2010-09-30",
"videos": [
"http://thecolbertreport.cc.com/videos/umgd4n/intro---9-30-10",
"http://thecolbertreport.cc.com/videos/xic7q8/president-obama-endorses-the-rally-to-restore-sanity",
"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/sign-off---march-to-keep-fear-alive-costumes"
],
"guest": "Aaron Sorkin"
},
{
"date": "2010-10-04",
"videos": [
"http://thecolbertreport.cc.com/videos/vwiap8/intro---10-4-10",
"http://thecolbertreport.cc.com/videos/h7fctl/we-world-war-won-it",
"http://thecolbertreport.cc.com/videos/k8t4ao/the-word---it-s-a-small-minded-world",
"http://thecolbertreport.cc.com/videos/nbdcz5/tip-wag---tea-party-coloring-book---calm-legislation",
"http://thecolbertreport.cc.com/videos/pl2b2g/eugene-robinson",
"http://thecolbertreport.cc.com/videos/3w0ogs/sign-off---matching-donor"
],
"guest": "Eugene Robinson"
},
{
"date": "2010-10-05",
"videos": [
"http://thecolbertreport.cc.com/videos/72j4yn/intro---10-5-10",
"http://thecolbertreport.cc.com/videos/9xty22/american-sexual-habits",
"http://thecolbertreport.cc.com/videos/0xyglo/gang-busters---john-burnett",
"http://thecolbertreport.cc.com/videos/e4gleb/langur-monkey-security",
"http://thecolbertreport.cc.com/videos/98qo87/leon-botstein",
"http://thecolbertreport.cc.com/videos/gi2fk6/sign-off---goodnight"
],
"guest": "Leon Botstein"
},
{
"date": "2010-10-06",
"videos": [
"http://thecolbertreport.cc.com/videos/pg4r1d/intro---10-6-10",
"http://thecolbertreport.cc.com/videos/gu3bg9/tiny-triumphs---environmentalist-ear-pollution",
"http://thecolbertreport.cc.com/videos/rex0nc/rawesome-foods-raid",
"http://thecolbertreport.cc.com/videos/6krvaq/mavis-staples---jeff-tweedy",
"http://thecolbertreport.cc.com/videos/01gaiu/sign-off---you-are-not-alone"
],
"guest": "Mavis Staples & Jeff Tweedy"
},
{
"date": "2010-10-07",
"videos": [
"http://thecolbertreport.cc.com/videos/sy1j26/indecision-2010---revenge-of-the-fallen---fearstock-com",
"http://thecolbertreport.cc.com/videos/5qjigz/proposition-19---joseph-califano---gary-johnson",
"http://thecolbertreport.cc.com/videos/rzuziw/donorschoose-org-fear-drawings",
"http://thecolbertreport.cc.com/videos/077dy4/davis-guggenheim",
"http://thecolbertreport.cc.com/videos/th4oe4/sign-off---don-t-go-to-donorschoose-com"
],
"guest": "Davis Guggenheim"
},
{
"date": "2010-10-11",
"videos": [
"http://thecolbertreport.cc.com/videos/mnxgqn/intro---10-11-10",
"http://thecolbertreport.cc.com/videos/2buyr8/rich-iott-wears-a-nazi-uniform",
"http://thecolbertreport.cc.com/videos/f1n1ah/threatdown---muslim-edition",
"http://thecolbertreport.cc.com/videos/6x3w7h/formula-4-your-eyes-only",
"http://thecolbertreport.cc.com/videos/l23gil/robert-reich",
"http://thecolbertreport.cc.com/videos/6314hj/sign-off---stephen-needs-a-place-to-hold-his-march"
],
"guest": "Robert Reich"
},
{
"date": "2010-10-12",
"videos": [
"http://thecolbertreport.cc.com/videos/ksbkyk/intro---10-12-10",
"http://thecolbertreport.cc.com/videos/que3dz/101-year-old-woman-becomes-a-u-s--citizen",
"http://thecolbertreport.cc.com/videos/xpawsw/tip-wag---peabody-public-schools--andy-rooney---ground-zero-mosque-design",
"http://thecolbertreport.cc.com/videos/o656bc/merch-to-keep-fear-alive",
"http://thecolbertreport.cc.com/videos/bncunr/brendan-steinhauser",
"http://thecolbertreport.cc.com/videos/4i1iy2/sign-off---apple-filled-with-razor-blades"
],
"guest": "Brendan Steinhauser"
},
{
"date": "2010-10-13",
"videos": [
"http://thecolbertreport.cc.com/videos/nkf1gw/intro---10-13-10",
"http://thecolbertreport.cc.com/videos/40azz5/america-helps-rescue-chilean-miners",
"http://thecolbertreport.cc.com/videos/fg5dcw/sport-report---steroids--commonwealth-games---brett-favre-s-sexting",
"http://thecolbertreport.cc.com/videos/nq3g54/tax-shelter-skelter",
"http://thecolbertreport.cc.com/videos/ip94pd/austan-goolsbee",
"http://thecolbertreport.cc.com/videos/7n0fzv/sign-off---tic-tac-toe-with-austan-goolsbee"
],
"guest": "Austan Goolsbee"
},
{
"date": "2010-10-14",
"videos": [
"http://thecolbertreport.cc.com/videos/ke3ug4/transitive-property-of-christine-o-donnell",
"http://thecolbertreport.cc.com/videos/jvi6id/people-who-are-destroying-america---landscaping-goats",
"http://thecolbertreport.cc.com/videos/8kgt7i/rally-to-restore-sanity-and-or-fear-chinatown-bus-tickets",
"http://thecolbertreport.cc.com/videos/wc2nwv/bill-bryson",
"http://thecolbertreport.cc.com/videos/ns0u0b/sign-off---oprah-is-wonderful"
],
"guest": "Bill Bryson"
},
{
"date": "2010-10-25",
"videos": [
"http://thecolbertreport.cc.com/videos/ou6z90/indecision-2010---revenge-of-the-fallen---sean-bielat---ken-buck",
"http://thecolbertreport.cc.com/videos/t96zw6/the-word---midterm-erection",
"http://thecolbertreport.cc.com/videos/r3cpem/who-s-honoring-me-now----colbert-nation-five-years-of-excellence-award",
"http://thecolbertreport.cc.com/videos/tx8w6w/nicholas-negroponte",
"http://thecolbertreport.cc.com/videos/hjbcjo/sign-off---fifth-anniversary-portrait"
],
"guest": "Nicholas Negroponte"
},
{
"date": "2010-10-26",
"videos": [
"http://thecolbertreport.cc.com/videos/vtn4dg/intro---10-26-10",
"http://thecolbertreport.cc.com/videos/upm6ow/stephen-appears-in-the-new-york-times-crossword-puzzle",
"http://thecolbertreport.cc.com/videos/rh943m/the-word---invisible-inc-",
"http://thecolbertreport.cc.com/videos/57deny/food-insurance-insurance",
"http://thecolbertreport.cc.com/videos/9dol4n/garry-wills",
"http://thecolbertreport.cc.com/videos/ifnetg/sign-off---stream-elvis-costello-s-national-ransom"
],
"guest": "Gary Wills"
},
{
"date": "2010-10-27",
"videos": [
"http://thecolbertreport.cc.com/videos/qjfe6u/exclusive---have-you-seen-the-ghost-of-jon-",
"http://thecolbertreport.cc.com/videos/iyha0d/intro---10-27-10",
"http://thecolbertreport.cc.com/videos/a393lf/rand-paul-supporter-stomps-on-liberal-activist-s-head",
"http://thecolbertreport.cc.com/videos/ah47vl/indecision-2010---revenge-of-the-fallen---tom-perriello",
"http://thecolbertreport.cc.com/videos/k3z37d/snooki-halloween-costume---spooky-rally-song",
"http://thecolbertreport.cc.com/videos/tmruw9/apolo-ohno",
"http://thecolbertreport.cc.com/videos/g0i5r2/sign-off---2010-election-map-from-denny-s"
],
"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/sign-off---see-you-at-the-rally"
],
"guest": "Maira Kalman"
},
{
"date": "2010-11-01",
"videos": [
"http://thecolbertreport.cc.com/videos/4or1uk/intro---11-1-10",
"http://thecolbertreport.cc.com/videos/pjth2k/a-fond-look-back-at-the-rally",
"http://thecolbertreport.cc.com/videos/6y87u2/midterm-senate-races---nevada--alaska---delaware",
"http://thecolbertreport.cc.com/videos/ghbjcp/hispanic-and-gay-voters-should-stay-at-home",
"http://thecolbertreport.cc.com/videos/r4udbe/jonathan-alter",
"http://thecolbertreport.cc.com/videos/h06l8n/sign-off---don-t-forget-to-vote"
],
"guest": "Jonathan Alter"
},
{
"date": "2010-11-02",
"videos": [
"http://thecolbertreport.cc.com/videos/q6wjad/indecision-2010---intro---11-2-10",
"http://thecolbertreport.cc.com/videos/5y5ul8/indecision-2010---gop-takes-house",
"http://thecolbertreport.cc.com/videos/yubkdk/indecision-2010---david-frum",
"http://thecolbertreport.cc.com/videos/ii11zs/indecision-2010---katrina-vanden-heuvel",
"http://thecolbertreport.cc.com/videos/fpxe9g/indecision-2010---sign-off---election-to-end-all-elections"
],
"guest": "Katrina vanden Heuvel, David Frum"
},
{
"date": "2010-11-03",
"videos": [
"http://thecolbertreport.cc.com/videos/npkdbl/intro---11-3-10",
"http://thecolbertreport.cc.com/videos/dnol9b/we-hardly-better-knew-ye",
"http://thecolbertreport.cc.com/videos/tsa7r8/stephen-colbert-gives-you-props",
"http://thecolbertreport.cc.com/videos/g1n60y/doris-kearns-goodwin",
"http://thecolbertreport.cc.com/videos/0ciqy7/sign-off---smiley-face-balloon"
],
"guest": "Doris Kearns Goodwin"
},
{
"date": "2010-11-04",
"videos": [
"http://thecolbertreport.cc.com/videos/ze4pgk/intro---11-4-10",
"http://thecolbertreport.cc.com/videos/jssup2/spider-man-is-alaska-s-write-in-candidate",
"http://thecolbertreport.cc.com/videos/59l5bf/tip-wag---tsa--bert---dogs",
"http://thecolbertreport.cc.com/videos/px319n/elvis-costello"
],
"guest": "Elvis Costello"
},
{
"date": "2010-11-08",
"videos": [
"http://thecolbertreport.cc.com/videos/bf24qu/one-hour-in-the-future",
"http://thecolbertreport.cc.com/videos/odml1w/the-word---nothingness",
"http://thecolbertreport.cc.com/videos/450kbl/president-obama-s-expensive-trip-to-india",
"http://thecolbertreport.cc.com/videos/itfuo6/reza-aslan",
"http://thecolbertreport.cc.com/videos/flh0gj/sign-off---battleship"
],
"guest": "Reza Aslan"
},
{
"date": "2010-11-09",
"videos": [
"http://thecolbertreport.cc.com/videos/ndicnt/decision-points",
"http://thecolbertreport.cc.com/videos/t6dluv/house-oversight-committee-hearings---abbe-lowell",
"http://thecolbertreport.cc.com/videos/2tsnui/craziest-f--king-thing-i-ve-ever-heard---crab-vending-machines",
"http://thecolbertreport.cc.com/videos/thu56b/cee-lo-green"
],
"guest": "Cee-Lo Green"
},
{
"date": "2010-11-10",
"videos": [
"http://thecolbertreport.cc.com/videos/r8nn6k/michelle-obama-s-embarrassing-handshake",
"http://thecolbertreport.cc.com/videos/h0bv7g/america-s-job-loss---beri-fox",
"http://thecolbertreport.cc.com/videos/qra7vl/statue-of-jesus",
"http://thecolbertreport.cc.com/videos/0cxark/martha-stewart",
"http://thecolbertreport.cc.com/videos/gd9t0s/sign-off---saltine-hors-d-oeuvres"
],
"guest": "Martha Stewart"
},
{
"date": "2010-11-11",
"videos": [
"http://thecolbertreport.cc.com/videos/vavqn0/colbert-platinum---kanye-west---million-dollar-advent-calendar-segment",
"http://thecolbertreport.cc.com/videos/6py8bn/intro---11-11-10",
"http://thecolbertreport.cc.com/videos/6obewf/stephen-absorbs-gene-shalit-s-opinions",
"http://thecolbertreport.cc.com/videos/pigos8/colbert-platinum---kanye-west---million-dollar-advent-calendar",
"http://thecolbertreport.cc.com/videos/8zchd5/stephen-trademarks-dated-catchphrases",
"http://thecolbertreport.cc.com/videos/opi39p/quincy-jones",
"http://thecolbertreport.cc.com/videos/dlv5sb/sign-off---if-it-walks-like-a-duck"
],
"guest": "Quincy Jones"
},
{
"date": "2010-11-15",
"videos": [
"http://thecolbertreport.cc.com/videos/zwpnzb/finding-mr--goodwrench",
"http://thecolbertreport.cc.com/videos/dzeed3/tsa-full-body-scanners---jeffrey-goldberg",
"http://thecolbertreport.cc.com/videos/yi115x/garfield-and-president-obama-s-veterans-day-controversies",
"http://thecolbertreport.cc.com/videos/zgerlg/david-stern",
"http://thecolbertreport.cc.com/videos/f5nt0v/sign-off---garfield-loves-veterans"
],
"guest": "David Stern"
},
{
"date": "2010-11-16",
"videos": [
"http://thecolbertreport.cc.com/videos/a6jx8i/intro---11-16-10",
"http://thecolbertreport.cc.com/videos/r1nlt4/prince-william-proposes-to-kate-middleton",
"http://thecolbertreport.cc.com/videos/6x0tmp/thought-for-food---c-zurrrre--medal-of-hunger-winner---cheesercize",
"http://thecolbertreport.cc.com/videos/5n8eoi/stephen-colbert-s-report",
"http://thecolbertreport.cc.com/videos/brwtip/john-legend"
],
"guest": "John Legend"
},
{
"date": "2010-11-17",
"videos": [
"http://thecolbertreport.cc.com/videos/13lnab/intro---11-17-10",
"http://thecolbertreport.cc.com/videos/bzhpi2/charlie-rangel--you-got-mailed",
"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/synchronize-watches-to-colbert-time"
],
"guest": "Ian Frazier"
},
{
"date": "2010-11-18",
"videos": [
"http://thecolbertreport.cc.com/videos/rip59b/stephen-pardons-joseph-gobbles",
"http://thecolbertreport.cc.com/videos/6dqu0c/tip-wag---pope-benedict-xvi--trick-play---joseph-gobbles",
"http://thecolbertreport.cc.com/videos/fbks4j/joseph-gobbles-shoots-jay-the-intern",
"http://thecolbertreport.cc.com/videos/9ldbp0/salvatore-giunta",
"http://thecolbertreport.cc.com/videos/92wwov/sign-off---happy-thanksgiving"
],
"guest": "Staff Sgt. Salvatore Giunta"
},
{
"date": "2010-11-29",
"videos": [
"http://thecolbertreport.cc.com/videos/fyh8jk/intro---11-29-10",
"http://thecolbertreport.cc.com/videos/5liwl3/black-friday-interpretation",
"http://thecolbertreport.cc.com/videos/qhebrf/better-business-hero",
"http://thecolbertreport.cc.com/videos/1fhpey/dan-savage",
"http://thecolbertreport.cc.com/videos/nilxac/sign-off---goodnight"
],
"guest": "Dan Savage"
},
{
"date": "2010-11-30",
"videos": [
"http://thecolbertreport.cc.com/videos/0th7i0/god-drops-steve-johnson-s-football-pass",
"http://thecolbertreport.cc.com/videos/rd3bzl/wikileaks-document-dump---james-rubin",
"http://thecolbertreport.cc.com/videos/t2kayc/soap-opera-product-placement",
"http://thecolbertreport.cc.com/videos/5qjkay/tom-vilsack",
"http://thecolbertreport.cc.com/videos/ovt98b/sign-off---chex-mix-product-placement"
],
"guest": "Tom Vilsack"
},
{
"date": "2010-12-01",
"videos": [
"http://thecolbertreport.cc.com/videos/373wri/return-of-the-estate-tax",
"http://thecolbertreport.cc.com/videos/hml13u/lame-duck-congress---jake-tapper",
"http://thecolbertreport.cc.com/videos/df8z4y/cheating-death---calming-meat-goggles---the-ithrone",
"http://thecolbertreport.cc.com/videos/hbifbv/michelle-rhee",
"http://thecolbertreport.cc.com/videos/5oq9dq/sign-off---up-on-the-lingo"
],
"guest": "Michelle Rhee"
},
{
"date": "2010-12-02",
"videos": [
"http://thecolbertreport.cc.com/videos/d067b7/intro---12-2-10",
"http://thecolbertreport.cc.com/videos/y4fa8v/john-thune-looks-presidential",
"http://thecolbertreport.cc.com/videos/vaqkqk/the-word---the-great-white-wail",
"http://thecolbertreport.cc.com/videos/efh5u1/the-blitzkrieg-on-grinchitude---atheist-billboard---capitol-christmas-tree",
"http://thecolbertreport.cc.com/videos/trmu6j/david-stockman",
"http://thecolbertreport.cc.com/videos/v9n94y/sign-off---chinese-finger-trap"
],
"guest": "David Stockman"
},
{
"date": "2010-12-06",
"videos": [
"http://thecolbertreport.cc.com/videos/exzvsm/cosmo-is-available-in-mongolia",
"http://thecolbertreport.cc.com/videos/bwubcy/the-word---unrequited-gov",
"http://thecolbertreport.cc.com/videos/eoidl7/mysteries-of-the-ancient-unknown---the-pursuit-of-the-pharaoh-s-phallus-pt--1",
"http://thecolbertreport.cc.com/videos/wdodc8/garry-trudeau",
"http://thecolbertreport.cc.com/videos/gktluk/sign-off---goodnight"
],
"guest": "Garry Trudeau"
},
{
"date": "2010-12-07",
"videos": [
"http://thecolbertreport.cc.com/videos/ishllr/extension-of-the-bush-tax-cuts",
"http://thecolbertreport.cc.com/videos/n0u86v/mysteries-of-the-ancient-unknown---the-pursuit-of-the-pharaoh-s-phallus-pt--2",
"http://thecolbertreport.cc.com/videos/ya6qw9/poll-to-repeal-don-t-ask--don-t-tell",
"http://thecolbertreport.cc.com/videos/gf8r28/david-eisenhower---julie-nixon-eisenhower",
"http://thecolbertreport.cc.com/videos/99syt9/sign-off---goodnight"
],
"guest": "Julie Nixon Eisenhower & David Eisenhower"
},
{
"date": "2010-12-08",
"videos": [
"http://thecolbertreport.cc.com/videos/f6likw/exclusive---steve-martin-extended-segment",
"http://thecolbertreport.cc.com/videos/kml8x8/tip-wag---art-edition---brent-glass",
"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/sign-off---steve-martin-mask"
],
"guest": "Steve Martin"
},
{
"date": "2010-12-09",
"videos": [
"http://thecolbertreport.cc.com/videos/znivka/israel-shark-conspiracy",
"http://thecolbertreport.cc.com/videos/fi19uy/international-manhunt-for-julian-assange---daniel-ellsberg",
"http://thecolbertreport.cc.com/videos/fk2pnu/art-stephen-up-challenge---william-wegman",
"http://thecolbertreport.cc.com/videos/1akto9/julie-taymor",
"http://thecolbertreport.cc.com/videos/hcd55s/sign-off---christmas-party"
],
"guest": "Julie Taymor"
},
{
"date": "2010-12-13",
"videos": [
"http://thecolbertreport.cc.com/videos/f2kl6o/intro---12-13-10",
"http://thecolbertreport.cc.com/videos/eolk50/found-goldman-sachs-mastercard",
"http://thecolbertreport.cc.com/videos/c1yv8b/the-word---swift-payment",
"http://thecolbertreport.cc.com/videos/btsd4o/blitzkrieg-on-grinchitude---gretchen-carlson---christian-nation-christ-mas-tree",
"http://thecolbertreport.cc.com/videos/rufuhr/patti-smith",
"http://thecolbertreport.cc.com/videos/t0590z/sign-off---remembering-richard-holbrooke"
],
"guest": "Patti Smith"
},
{
"date": "2010-12-14",
"videos": [
"http://thecolbertreport.cc.com/videos/ycermm/goldman-sachs-lawyers-want-buckley-t--ratchford-s-card-back",
"http://thecolbertreport.cc.com/videos/rsdutw/prop-8-challenge---david-boies",
"http://thecolbertreport.cc.com/videos/4tx5ks/stephen-wins-twitter---biz-stone",
"http://thecolbertreport.cc.com/videos/ouqrnm/stephen-sondheim",
"http://thecolbertreport.cc.com/videos/ajg2h0/sign-off---closing-credits"
],
"guest": "David Boies, Stephen Sondheim"
},
{
"date": "2010-12-15",
"videos": [
"http://thecolbertreport.cc.com/videos/9gi4ae/intro---12-15-10",
"http://thecolbertreport.cc.com/videos/67nfxh/scanner-defying-pancakes",
"http://thecolbertreport.cc.com/videos/fv3gl9/world-war-3-0---omar-wasow",
"http://thecolbertreport.cc.com/videos/rr8wvk/tiny-triumphs---lethal-drug-shortage",
"http://thecolbertreport.cc.com/videos/e05lny/laird-hamilton",
"http://thecolbertreport.cc.com/videos/nv267b/sign-off---winter-fashion-tip"
],
"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/jesus-is-a-liberal-democrat",
"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://thecolbertreport.cc.com/videos/a5rzlq/intro---1-3-11",
"http://thecolbertreport.cc.com/videos/pgayak/snowpocalypse-2010",
"http://thecolbertreport.cc.com/videos/7b084t/tip-wag---susan-g--komen-foundation---spider-man-musical",
"http://thecolbertreport.cc.com/videos/44ybv8/the-enemy-within---caboodle-ranch",
"http://thecolbertreport.cc.com/videos/vopb2f/ed-rendell",
"http://thecolbertreport.cc.com/videos/bvg4tu/sign-off---home-improvement-tip"
],
"guest": "Sen. Bernie Sanders"
},
{
"date": "2011-01-04",
"videos": [
"http://thecolbertreport.cc.com/videos/40y983/intro---1-4-11",
"http://thecolbertreport.cc.com/videos/tq4xo3/native-american-overlords",
"http://thecolbertreport.cc.com/videos/kafccc/gold-faithful",
"http://thecolbertreport.cc.com/videos/0ds0c9/gold-faithful---ron-paul---david-leonhardt",
"http://thecolbertreport.cc.com/videos/leatvt/geoffrey-canada",
"http://thecolbertreport.cc.com/videos/h983ts/sign-off---12-dutchmen-answer"
],
"guest": "John Heilemann"
},
{
"date": "2011-01-05",
"videos": [
"http://thecolbertreport.cc.com/videos/upvgg0/intro---1-5-11",
"http://thecolbertreport.cc.com/videos/ttqn4k/huckleberry-finn-censorship",
"http://thecolbertreport.cc.com/videos/4c01zx/what-s-a-reince-priebus-",
"http://thecolbertreport.cc.com/videos/d2586v/yellowline-international--inc-",
"http://thecolbertreport.cc.com/videos/1yfs5a/atul-gawande",
"http://thecolbertreport.cc.com/videos/ta25ww/sign-off---dark-side-of-the-moon"
],
"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/john-boehner-s-large-gavel",
"http://thecolbertreport.cc.com/videos/t27er5/cheating-death---placebo-effect--immortality---wild-lynx",
"http://thecolbertreport.cc.com/videos/n6wqjn/bill-o-reilly-proves-god-s-existence---neil-degrasse-tyson",
"http://thecolbertreport.cc.com/videos/i48v1q/ronald-depinho",
"http://thecolbertreport.cc.com/videos/x8bqqt/sign-off---boris-the-lynx"
],
"guest": "Dr. Ronald DePinho"
},
{
"date": "2011-01-10",
"videos": [
"http://thecolbertreport.cc.com/videos/qi5a0o/intro---1-10-11",
"http://thecolbertreport.cc.com/videos/xl3r2n/pundits-lay-blame-for-senseless-arizona-attack",
"http://thecolbertreport.cc.com/videos/6s01yh/bull-sessions",
"http://thecolbertreport.cc.com/videos/cng4n9/difference-makers---galactic-edition-pt--1",
"http://thecolbertreport.cc.com/videos/oelxfx/difference-makers---galactic-edition-pt--2",
"http://thecolbertreport.cc.com/videos/gk32r8/fen-montaigne",
"http://thecolbertreport.cc.com/videos/oslcyl/sign-off---goodnight"
],
"guest": "Fen Montaigne"
},
{
"date": "2011-01-11",
"videos": [
"http://thecolbertreport.cc.com/videos/97pzie/intro---1-11-11",
"http://thecolbertreport.cc.com/videos/q63emf/snowstorm-preparation",
"http://thecolbertreport.cc.com/videos/rbg8gh/metunes---grammy-vote---dan-auerbach--patrick-carney---ezra-koenig",
"http://thecolbertreport.cc.com/videos/oqami3/lithuania-perfume",
"http://thecolbertreport.cc.com/videos/mqh8rb/chris-hughes",
"http://thecolbertreport.cc.com/videos/8re8oa/sign-off---pringles"
],
"guest": "Chris Hughes"
},
{
"date": "2011-01-12",
"videos": [
"http://thecolbertreport.cc.com/videos/1aza8n/50-cent-makes-money-on-twitter",
"http://thecolbertreport.cc.com/videos/b4mxvn/the-word---life--liberty-and-the-pursuit-of-angriness",
"http://thecolbertreport.cc.com/videos/56kjjw/bernard-henri-levy-pt--1",
"http://thecolbertreport.cc.com/videos/cmxyxs/bernard-henri-levy-pt--2",
"http://thecolbertreport.cc.com/videos/splrfl/sign-off---goodnight"
],
"guest": "Bernard-Henri Levy"
},
{
"date": "2011-01-13",
"videos": [
"http://thecolbertreport.cc.com/videos/h5qwzv/hitler-s-inspiring-tucson-memorial-speech",
"http://thecolbertreport.cc.com/videos/nhx7bu/thought-for-food---fruit-pouch--doritos-ad---super-big-gulp",
"http://thecolbertreport.cc.com/videos/wdqdqn/israeli-vulture-spy",
"http://thecolbertreport.cc.com/videos/xczq8w/kevin-spacey",
"http://thecolbertreport.cc.com/videos/iyyhr8/sign-off---new-york-post"
],
"guest": "Kevin Spacey"
},
{
"date": "2011-01-17",
"videos": [
"http://thecolbertreport.cc.com/videos/iuhos5/intro---1-17-11",
"http://thecolbertreport.cc.com/videos/ztaz7m/martin-luther-king-jr--day-sales",
"http://thecolbertreport.cc.com/videos/9ycstf/the-word---run-for-your-life",
"http://thecolbertreport.cc.com/videos/ib4cpu/art-stephen-up-challenge---wade-hampton",
"http://thecolbertreport.cc.com/videos/kd5rmr/sherry-turkle",
"http://thecolbertreport.cc.com/videos/tj76rr/sign-off---new-york-post"
],
"guest": "Sherry Turkle"
},
{
"date": "2011-01-18",
"videos": [
"http://thecolbertreport.cc.com/videos/fi5nk7/intro---1-18-11",
"http://thecolbertreport.cc.com/videos/y6lk8z/mika-brzezinski-experiences-palin-fatigue",
"http://thecolbertreport.cc.com/videos/1zj4bl/the-word---disintegration",
"http://thecolbertreport.cc.com/videos/l4vdiw/coma-cozy",
"http://thecolbertreport.cc.com/videos/zeukt7/cornel-west",
"http://thecolbertreport.cc.com/videos/njlf77/sign-off---coma-cozy"
],
"guest": "Cornel West"
},
{
"date": "2011-01-19",
"videos": [
"http://thecolbertreport.cc.com/videos/4e1xmn/intro---1-19-11",
"http://thecolbertreport.cc.com/videos/0s8rfq/black-tie-dinner-for-hu-jintao",
"http://thecolbertreport.cc.com/videos/nujiex/tip-wag---four-loko---horoscopes",
"http://thecolbertreport.cc.com/videos/vb8d7c/shout-out---preston-pysh",
"http://thecolbertreport.cc.com/videos/czmy3b/ron-reagan",
"http://thecolbertreport.cc.com/videos/0ycmn7/sign-off---i-eat-america--and-so-can-you---recall"
],
"guest": "Ron Reagan Jr."
},
{
"date": "2011-01-20",
"videos": [
"http://thecolbertreport.cc.com/videos/091ydv/rush-limbaugh-speaks-chinese",
"http://thecolbertreport.cc.com/videos/bq6mnl/state-budget-shortfalls---christine-todd-whitman",
"http://thecolbertreport.cc.com/videos/c8u4qm/50th-anniversary-of-jfk-s-inaugural-address",
"http://thecolbertreport.cc.com/videos/6pfgfg/chris-matthews",
"http://thecolbertreport.cc.com/videos/jjup5d/sign-off---donald-pellview"
],
"guest": "Chris Matthews"
},
{
"date": "2011-01-24",
"videos": [
"http://thecolbertreport.cc.com/videos/z2h5xs/intro---1-24-11",
"http://thecolbertreport.cc.com/videos/ry0uh0/stephen-rejects-keith-olbermann-s-power",
"http://thecolbertreport.cc.com/videos/e7bfej/the-word---coverage-of-denial",
"http://thecolbertreport.cc.com/videos/mjnoqk/art-stephen-up-challenge---banksy",
"http://thecolbertreport.cc.com/videos/rsyf0v/charlie-rose",
"http://thecolbertreport.cc.com/videos/v0sh08/sign-off---keith-olbermug"
],
"guest": "Charlie Rose"
},
{
"date": "2011-01-25",
"videos": [
"http://thecolbertreport.cc.com/videos/1mhey7/intro---1-25-11",
"http://thecolbertreport.cc.com/videos/d21szi/the--battle-hymn-of-the-tiger-mother--controversy",
"http://thecolbertreport.cc.com/videos/5198pt/threatdown---radical-muslim-snacks--flying-robot-drones---coked-up-vacuums",
"http://thecolbertreport.cc.com/videos/ooebba/nazi-ometer",
"http://thecolbertreport.cc.com/videos/2lr90o/amy-chua",
"http://thecolbertreport.cc.com/videos/71c1bx/sign-off---stephen-welcomes-cody-price"
],
"guest": "Amy Chua"
},
{
"date": "2011-01-26",
"videos": [
"http://thecolbertreport.cc.com/videos/99necf/anonymous-insider-author-speculation",
"http://thecolbertreport.cc.com/videos/d2sy94/obama-s-state-of-the-union-address---michael-waldman",
"http://thecolbertreport.cc.com/videos/za0351/mr--smith-goes-to-the-state-legislature--then-later-possibly-washington---curtis-oda",
"http://thecolbertreport.cc.com/videos/wja66h/christine-yvette-lewis",
"http://thecolbertreport.cc.com/videos/7znx6n/sign-off---man-handler---fork-phone"
],
"guest": "Michael Waldman, Christine Yvette Lewis"
},
{
"date": "2011-01-27",
"videos": [
"http://thecolbertreport.cc.com/videos/fllqqg/intro---1-27-11",
"http://thecolbertreport.cc.com/videos/959fok/candyquake",
"http://thecolbertreport.cc.com/videos/bhf8jv/time-traveling-porn---daryl-bem",
"http://thecolbertreport.cc.com/videos/uffqf8/gordita-supreme-court",
"http://thecolbertreport.cc.com/videos/zgxlja/brian-greene",
"http://thecolbertreport.cc.com/videos/nkbrns/sign-off---goodnight"
],
"guest": "Dr. Daryl Bem, Brian Greene"
},
{
"date": "2011-01-31",
"videos": [
"http://thecolbertreport.cc.com/videos/2wwddt/intro---1-31-11",
"http://thecolbertreport.cc.com/videos/uv1y3k/mubarak--mu-problems",
"http://thecolbertreport.cc.com/videos/w70tw3/mubarak--mu-problems---samer-shehata",
"http://thecolbertreport.cc.com/videos/35ink0/paul-offit",
"http://thecolbertreport.cc.com/videos/ccilnn/sign-off---kim-jong-bear"
],
"guest": "Samer Shehata, Dr. Paul Offit"
},
{
"date": "2011-02-01",
"videos": [
"http://thecolbertreport.cc.com/videos/wk9d57/hosni-mubarak-will-not-run-again",
"http://thecolbertreport.cc.com/videos/ie8q6j/thought-for-food---nestle-corporation",
"http://thecolbertreport.cc.com/videos/2ucxw7/thought-for-food---wyngz---wal-mart",
"http://thecolbertreport.cc.com/videos/odeko3/wal-mart-collaborates-with-obama-administration---leslie-dach",
"http://thecolbertreport.cc.com/videos/4shxg7/michael-lewis",
"http://thecolbertreport.cc.com/videos/s7oggh/sign-off---digiorno-pizza---boneless-wyngz"
],
"guest": "Leslie Dach, Michael Lewis"
},
{
"date": "2011-02-02",
"videos": [
"http://thecolbertreport.cc.com/videos/zdhdko/intro---2-2-11",
"http://thecolbertreport.cc.com/videos/ct2jwf/bing-gets-served",
"http://thecolbertreport.cc.com/videos/a4bw27/cairo-turns-into-the-jersey-shore",
"http://thecolbertreport.cc.com/videos/q27618/crisis-in-egypt",
"http://thecolbertreport.cc.com/videos/yjimo0/tip-wag---british-superman---big-flats-beer",
"http://thecolbertreport.cc.com/videos/dme3nu/sean-dorrance-kelly",
"http://thecolbertreport.cc.com/videos/n2upjg/sign-off---christiane-aman-purr---big-flats-beer"
],
"guest": "Sean Kelly"
},
{
"date": "2011-02-03",
"videos": [
"http://thecolbertreport.cc.com/videos/nn8o94/intro---2-3-11",
"http://thecolbertreport.cc.com/videos/lo20rh/crisis-in-egypt---anderson-cooper---bill-o-reilly",
"http://thecolbertreport.cc.com/videos/vuogyk/sport-report---super-bowl-edition",
"http://thecolbertreport.cc.com/videos/91t3tp/affirmative-reaction",
"http://thecolbertreport.cc.com/videos/i5rwqs/jane-mcgonigal",
"http://thecolbertreport.cc.com/videos/hffd6m/sign-off---newest-member-of-the-colbert-nation"
],
"guest": "Jane McGonigal"
},
{
"date": "2011-02-14",
"videos": [
"http://thecolbertreport.cc.com/videos/kruhy0/intro---2-14-11",
"http://thecolbertreport.cc.com/videos/4drnjr/mysteries-of-the-ancient-unknown---egyptian-coincidence",
"http://thecolbertreport.cc.com/videos/gv0hvh/the-enemy-within---toddler-edition",
"http://thecolbertreport.cc.com/videos/qtecuk/james-murphy-of-lcd-soundsystem",
"http://thecolbertreport.cc.com/videos/4qawhf/sign-off---scoops-of-americone-dream"
],
"guest": "LCD Soundsystem"
},
{
"date": "2011-02-15",
"videos": [
"http://thecolbertreport.cc.com/videos/ynf8rd/intro---2-15-11",
"http://thecolbertreport.cc.com/videos/sjuyr9/italian-bunga-bunga-parties---egyptian-democracy",
"http://thecolbertreport.cc.com/videos/ara6q6/egyptian-democracy---christiane-amanpour",
"http://thecolbertreport.cc.com/videos/n9a7wj/mr--smith-goes-to-the-state-legislature--then-later-possibly-washington---ron-gould",
"http://thecolbertreport.cc.com/videos/uobmig/david-albright",
"http://thecolbertreport.cc.com/videos/95itm9/sign-off---christiane-aman-purr-s-safari-suit"
],
"guest": "Christiane Amanpour, David Albright"
},
{
"date": "2011-02-16",
"videos": [
"http://thecolbertreport.cc.com/videos/bbqm6g/intro---2-16-11",
"http://thecolbertreport.cc.com/videos/bojft9/republican-voters-doubt-obama-s-american-citizenship",
"http://thecolbertreport.cc.com/videos/uk8a3q/tip-wag---colbuffington-re-post--repo-games---whale-fail",
"http://thecolbertreport.cc.com/videos/8r9j45/murdoch-he-wrote",
"http://thecolbertreport.cc.com/videos/re8ih2/eric-foner",
"http://thecolbertreport.cc.com/videos/i84xxd/sign-off---general-butterbean"
],
"guest": "Eric Foner"
},
{
"date": "2011-02-17",
"videos": [
"http://thecolbertreport.cc.com/videos/62enfw/the-huffington-post-posts-about-the-colbuffington-re-post",
"http://thecolbertreport.cc.com/videos/yjsn8n/clarence-thomas-s-financial-disclosure-controversy",
"http://thecolbertreport.cc.com/videos/tvwda6/project-magazine-cover-boy",
"http://thecolbertreport.cc.com/videos/sjlg3t/jeffrey-leonard",
"http://thecolbertreport.cc.com/videos/m0qkxm/sign-off---project-magazine-cover"
],
"guest": "Jeffrey Leonard"
},
{
"date": "2011-02-21",
"videos": [
"http://thecolbertreport.cc.com/videos/86hqgf/turmoil-in-the-middle-east---turmoil-in-the-middle-west",
"http://thecolbertreport.cc.com/videos/lp0v0e/cheating-death---ablibalify---bing-bongavax",
"http://thecolbertreport.cc.com/videos/fwkicl/rick-santorum-internet-search",
"http://thecolbertreport.cc.com/videos/8du0y6/eugene-jarecki",
"http://thecolbertreport.cc.com/videos/58iq33/sign-off---goodnight"
],
"guest": "Eugene Jarecki"
},
{
"date": "2011-02-22",
"videos": [
"http://thecolbertreport.cc.com/videos/bqnw4a/intro---2-22-11",
"http://thecolbertreport.cc.com/videos/bm2a1j/a-less-perfect-union",
"http://thecolbertreport.cc.com/videos/usnwve/a-less-perfect-union---randi-weingarten",
"http://thecolbertreport.cc.com/videos/f6avpd/wisco-inferno---jon-erpenbach",
"http://thecolbertreport.cc.com/videos/p92sec/bing-west",
"http://thecolbertreport.cc.com/videos/2kp9tj/sign-off---democrat-call"
],
"guest": "Randi Weingarten, Bing West"
},
{
"date": "2011-02-23",
"videos": [
"http://thecolbertreport.cc.com/videos/pd1kio/intro---2-23-11",
"http://thecolbertreport.cc.com/videos/883h13/usa-today-infographic-sells-out",
"http://thecolbertreport.cc.com/videos/fn2n7y/bust-in-show",
"http://thecolbertreport.cc.com/videos/tnaq8e/nailed--em---mark-burdett",
"http://thecolbertreport.cc.com/videos/iap6wk/stephanie-coontz",
"http://thecolbertreport.cc.com/videos/uyxtz0/sign-off---rebroadcasts"
],
"guest": "Stephanie Coontz"
},
{
"date": "2011-02-24",
"videos": [
"http://thecolbertreport.cc.com/videos/7a9kp1/era-of-american-dental-exceptionalism-is-over",
"http://thecolbertreport.cc.com/videos/xjtazd/corporate-hacker-tries-to-take-down-wikileaks",
"http://thecolbertreport.cc.com/videos/8jruu4/corporate-hacker-tries-to-take-down-wikileaks---glenn-greenwald",
"http://thecolbertreport.cc.com/videos/tyiacl/republicans-flirt-with-presidential-candidacy",
"http://thecolbertreport.cc.com/videos/hxtqey/mike-huckabee",
"http://thecolbertreport.cc.com/videos/6ahql2/sign-off---elephant-beat"
],
"guest": "Glenn Greenwald, Mike Huckabee"
},
{
"date": "2011-02-28",
"videos": [
"http://thecolbertreport.cc.com/videos/8jxxuv/intro---2-28-11",
"http://thecolbertreport.cc.com/videos/8fpe6c/anonymous-hacks-the-colbert-report",
"http://thecolbertreport.cc.com/videos/ohhby5/tip-wag---joe-reed---levi-s-ex-girlfriend-jeans",
"http://thecolbertreport.cc.com/videos/lrah7j/art-stephen-up-challenge---phillips-de-pury-auction",
"http://thecolbertreport.cc.com/videos/4oq5za/michael-scheuer",
"http://thecolbertreport.cc.com/videos/qg45nm/sign-off---tomorrow-s-goodnight-preview"
],
"guest": "Michael Scheuer"
},
{
"date": "2011-03-01",
"videos": [
"http://thecolbertreport.cc.com/videos/dbc523/intro---3-1-11",
"http://thecolbertreport.cc.com/videos/hl74h7/muammar-al-gaddafi-competes-with-charlie-sheen",
"http://thecolbertreport.cc.com/videos/ce6ez1/the-word---new-country-for-old-men",
"http://thecolbertreport.cc.com/videos/6zdcls/senior-moment---geriatric-porn",
"http://thecolbertreport.cc.com/videos/zxzpiz/evan-osnos",
"http://thecolbertreport.cc.com/videos/b6gm2j/sign-off---welcome-zachary-paul-dahm"
],
"guest": "Evan Osnos"
},
{
"date": "2011-03-02",
"videos": [
"http://thecolbertreport.cc.com/videos/44fqvj/intro---3-2-11",
"http://thecolbertreport.cc.com/videos/jh2tli/wisconsin-prank-call-bill",
"http://thecolbertreport.cc.com/videos/i9x3xr/the-word---economic-boom",
"http://thecolbertreport.cc.com/videos/uz0ktw/eulogy-spot",
"http://thecolbertreport.cc.com/videos/7lrvtf/harry-connick-jr-",
"http://thecolbertreport.cc.com/videos/ninj2e/sign-off---demise-of-the-white-pages"
],
"guest": "Harry Connick Jr."
},
{
"date": "2011-03-03",
"videos": [
"http://thecolbertreport.cc.com/videos/nb3zpi/fox-news-suspends-contributors",
"http://thecolbertreport.cc.com/videos/7vwzpc/ice-cream-fight-with-jimmy-fallon",
"http://thecolbertreport.cc.com/videos/4oi0dh/ice-cream-hallucination-with-jimmy-fallon",
"http://thecolbertreport.cc.com/videos/zxu7kb/mark-moffett",
"http://thecolbertreport.cc.com/videos/2x8ter/sign-off---late-night-snack"
],
"guest": "Mark W. Moffett"
},
{
"date": "2011-03-07",
"videos": [
"http://thecolbertreport.cc.com/videos/432mwn/intro---3-7-11",
"http://thecolbertreport.cc.com/videos/dmu7rh/stephen-wants-an-ipad-2",
"http://thecolbertreport.cc.com/videos/zql2lp/on-notice---mike-huckabee",
"http://thecolbertreport.cc.com/videos/mrhaui/america-s-next-gop-model",
"http://thecolbertreport.cc.com/videos/ux0w7b/joshua-foer",
"http://thecolbertreport.cc.com/videos/un3kdu/art-stephen-up-challenge---bid-on-stephen-s-portrait"
],
"guest": "Joshua Foer"
},
{
"date": "2011-03-08",
"videos": [
"http://thecolbertreport.cc.com/videos/2s9pic/happy-mardi-gras---international-women-s-day",
"http://thecolbertreport.cc.com/videos/29cv4a/light-bulb-ban",
"http://thecolbertreport.cc.com/videos/yuo5to/light-bulb-ban---dale-bryk",
"http://thecolbertreport.cc.com/videos/2nv2ie/charlie-sheen---fake-rahm-emanuel-on-twitter",
"http://thecolbertreport.cc.com/videos/dqh7vp/dan-sinker",
"http://thecolbertreport.cc.com/videos/wjd0wx/sign-off---welcome-zoe-simone-sanchez"
],
"guest": "Dan Sinker"
},
{
"date": "2011-03-09",
"videos": [
"http://thecolbertreport.cc.com/videos/oivxm4/intro---3-9-11",
"http://thecolbertreport.cc.com/videos/durtx6/stephen-gives-up-catholicism-for-lent",
"http://thecolbertreport.cc.com/videos/c3zm6w/bench-press",
"http://thecolbertreport.cc.com/videos/qi1r7y/bench-press---anthony-weiner",
"http://thecolbertreport.cc.com/videos/mbmsxi/david-brooks",
"http://thecolbertreport.cc.com/videos/bh348l/sign-off---jewish-stephen"
],
"guest": "David Brooks"
},
{
"date": "2011-03-10",
"videos": [
"http://thecolbertreport.cc.com/videos/au4itm/intro---3-10-11",
"http://thecolbertreport.cc.com/videos/w8nzdj/newt-gingrich-wants-to-screw-america",
"http://thecolbertreport.cc.com/videos/hagj8b/colbert-pac-ad",
"http://thecolbertreport.cc.com/videos/k698u1/peter-king-understands-violent-radicalism",
"http://thecolbertreport.cc.com/videos/84jg83/reza-aslan",
"http://thecolbertreport.cc.com/videos/x9iaae/sign-off---enjoy-the-moment"
],
"guest": "Reza Aslan"
},
{
"date": "2011-03-21",
"videos": [
"http://thecolbertreport.cc.com/videos/tkzzdn/intro---3-21-11",
"http://thecolbertreport.cc.com/videos/btot11/crisis-in-the-middle-everywhere---japan---libya",
"http://thecolbertreport.cc.com/videos/kvj8rv/raging-art-on---art-1",
"http://thecolbertreport.cc.com/videos/9m4lpg/sign-off---dueling-banjos"
],
"guest": "Steve Martin and the Steep Canyon Rangers"
},
{
"date": "2011-03-22",
"videos": [
"http://thecolbertreport.cc.com/videos/67fxmc/intro---3-22-11",
"http://thecolbertreport.cc.com/videos/4k1vs5/californians-respond-to-japanese-disaster",
"http://thecolbertreport.cc.com/videos/tadiop/raging-art-on---art-2",
"http://thecolbertreport.cc.com/videos/7fv2d8/crisis-in-the-middle-everywhere---cnn-and-fox-news-fight-in-libya",
"http://thecolbertreport.cc.com/videos/iky4d9/ayman-mohyeldin",
"http://thecolbertreport.cc.com/videos/f8fwxt/sign-off---goodnight"
],
"guest": "Ayman Mohyeldin"
},
{
"date": "2011-03-23",
"videos": [
"http://thecolbertreport.cc.com/videos/m2qxvd/top-news-stories-all-at-once",
"http://thecolbertreport.cc.com/videos/3rhe0w/raging-art-on---art-3",
"http://thecolbertreport.cc.com/videos/3ccbj2/the-word---over-reactor",
"http://thecolbertreport.cc.com/videos/wd1pjd/nathan-myhrvold",
"http://thecolbertreport.cc.com/videos/l5f2yi/sign-off---pistachio-ice-cream"
],
"guest": "Nathan Myhrvold"
},
{
"date": "2011-03-24",
"videos": [
"http://thecolbertreport.cc.com/videos/awwa6r/intro---3-24-11",
"http://thecolbertreport.cc.com/videos/o0idw2/bears---balls---misery-edition",
"http://thecolbertreport.cc.com/videos/pst3ox/eat--pray-to-eat---laurie-garrett",
"http://thecolbertreport.cc.com/videos/strtop/channeled-rage",
"http://thecolbertreport.cc.com/videos/rfce7l/jody-williams",
"http://thecolbertreport.cc.com/videos/3z7nhm/sign-off---john-oliver-s-new-york-stand-up-show"
],
"guest": "Jody Williams"
},
{
"date": "2011-03-28",
"videos": [
"http://thecolbertreport.cc.com/videos/2u3wdk/intro---3-28-11",
"http://thecolbertreport.cc.com/videos/vou6it/shout-out-to-cece-lederer",
"http://thecolbertreport.cc.com/videos/xeu06g/chaos-in-chaonada",
"http://thecolbertreport.cc.com/videos/s3xgtv/tip-wag---cigarette-tax--abortion-waiting-period---bargain-travelers",
"http://thecolbertreport.cc.com/videos/c06ht5/maine-squeeze",
"http://thecolbertreport.cc.com/videos/2p412b/michael-moore",
"http://thecolbertreport.cc.com/videos/lplrhl/sign-off---movits--streams--out-of-my-head-"
],
"guest": "Michael Moore"
},
{
"date": "2011-03-29",
"videos": [
"http://thecolbertreport.cc.com/videos/xysvku/intro---3-29-11",
"http://thecolbertreport.cc.com/videos/wtajtw/turd-sandwich-in-libya",
"http://thecolbertreport.cc.com/videos/fkwv1e/yahweh-or-no-way---christianity-is-fattening",
"http://thecolbertreport.cc.com/videos/oa9b4m/stephen-s-next-religion---stephen-prothero",
"http://thecolbertreport.cc.com/videos/730dpm/jimmy-fallon-promises-a-performance-by-stephen",
"http://thecolbertreport.cc.com/videos/7m3guo/anthony-fauci",
"http://thecolbertreport.cc.com/videos/ms1yr8/sign-off---do-not-help-jimmy-fallon"
],
"guest": "Dr. Anthony Fauci"
},
{
"date": "2011-03-30",
"videos": [
"http://thecolbertreport.cc.com/videos/6nwkpk/exclusive---reporter-gets-nailed-by-san-francisco-cop",
"http://thecolbertreport.cc.com/videos/xysvku/intro---3-29-11",
"http://thecolbertreport.cc.com/videos/wtajtw/turd-sandwich-in-libya",
"http://thecolbertreport.cc.com/videos/fkwv1e/yahweh-or-no-way---christianity-is-fattening",
"http://thecolbertreport.cc.com/videos/oa9b4m/stephen-s-next-religion---stephen-prothero",
"http://thecolbertreport.cc.com/videos/730dpm/jimmy-fallon-promises-a-performance-by-stephen",
"http://thecolbertreport.cc.com/videos/7m3guo/anthony-fauci",
"http://thecolbertreport.cc.com/videos/ms1yr8/sign-off---do-not-help-jimmy-fallon"
],
"guest": "Tim Shriver"
},
{
"date": "2011-03-30",
"videos": [
"http://thecolbertreport.cc.com/videos/zxtidm/james-o-keefe-asks-for-donations",
"http://thecolbertreport.cc.com/videos/8stgre/colbert-pac",
"http://thecolbertreport.cc.com/videos/dtl1ew/colbert-pac---trevor-potter",
"http://thecolbertreport.cc.com/videos/i3lpcq/stephen-practices-rebecca-black-s--friday-",
"http://thecolbertreport.cc.com/videos/wug1p5/tim-shriver",
"http://thecolbertreport.cc.com/videos/dwx5m0/sign-off---goodnight"
],
"guest": "Tim Shriver"
},
{
"date": "2011-03-31",
"videos": [
"http://thecolbertreport.cc.com/videos/a6ko78/intro---3-31-11",
"http://thecolbertreport.cc.com/videos/oth30j/congressional-budget-menorah",
"http://thecolbertreport.cc.com/videos/j56fvd/madison-as-hell",
"http://thecolbertreport.cc.com/videos/o6su04/piers-gibbon",
"http://thecolbertreport.cc.com/videos/gq7wfn/sign-off---congressional-budget-menorah-fire"
],
"guest": "Piers Gibbon"
},
{
"date": "2011-04-04",
"videos": [
"http://thecolbertreport.cc.com/videos/nknyci/government-shutdown-menorah",
"http://thecolbertreport.cc.com/videos/8fsxhp/stephen-shows-off-the-ipad-2",
"http://thecolbertreport.cc.com/videos/953smc/the-word---that-new-smell-smell",
"http://thecolbertreport.cc.com/videos/zr09m5/the-glennpocalypse",
"http://thecolbertreport.cc.com/videos/j7j5ds/andrew-chaikin",
"http://thecolbertreport.cc.com/videos/9h7n61/sign-off---inescapables"
],
"guest": "Andrew Chaikin"
},
{
"date": "2011-04-05",
"videos": [
"http://thecolbertreport.cc.com/videos/x139me/tim-pawlenty-appeals-to-youth-vote",
"http://thecolbertreport.cc.com/videos/dq1pyh/renaissance-nemesis---frank-jameso",
"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/sign-off---frank-jameso"
],
"guest": "James Franco"
},
{
"date": "2011-04-06",
"videos": [
"http://thecolbertreport.cc.com/videos/1fi1u8/wisconsin-supreme-court-race",
"http://thecolbertreport.cc.com/videos/vu85n8/my-fair-colbert---hugo-vickers-pt--1",
"http://thecolbertreport.cc.com/videos/53yz6p/wd-40-1",
"http://thecolbertreport.cc.com/videos/q5s3lh/sir-david-tang",
"http://thecolbertreport.cc.com/videos/oqhpiw/sign-off---wd-40-1-cleaner"
],
"guest": "Sir David Tang"
},
{
"date": "2011-04-07",
"videos": [
"http://thecolbertreport.cc.com/videos/x9mvny/exclusive---my-fair-colbert---charming-prince-philip",
"http://thecolbertreport.cc.com/videos/ruv6gp/exclusive---my-fair-colbert---ghost-of-an-irishman",
"http://thecolbertreport.cc.com/videos/k0xu9f/intro---4-7-11",
"http://thecolbertreport.cc.com/videos/a3oo5c/the-koran-s-best-day-ever",
"http://thecolbertreport.cc.com/videos/uepxed/my-fair-colbert---hugo-vickers-pt--2",
"http://thecolbertreport.cc.com/videos/4zz0jd/my-fair-colbert---hugo-vickers-pt--3",
"http://thecolbertreport.cc.com/videos/hv2afg/jeff-greenfield",
"http://thecolbertreport.cc.com/videos/b9aslx/sign-off---goodnight"
],
"guest": "Jeff Greenfield"
},
{
"date": "2011-04-11",
"videos": [
"http://thecolbertreport.cc.com/videos/5p5wwd/countdown-to-government-shutdown",
"http://thecolbertreport.cc.com/videos/wueypc/pap-smears-at-walgreens",
"http://thecolbertreport.cc.com/videos/5o6455/thought-for-food---chocolate-air--denny-s---bacon-cologne",
"http://thecolbertreport.cc.com/videos/5ej465/jamie-hyneman---adam-savage",
"http://thecolbertreport.cc.com/videos/sse1uc/sign-off---champagne-flute-of-lead-paint"
],
"guest": "Jamie Hyneman & Adam Savage"
},
{
"date": "2011-04-12",
"videos": [
"http://thecolbertreport.cc.com/videos/hvb9sp/intro---4-12-11",
"http://thecolbertreport.cc.com/videos/ez4az7/jon-kyl-tweets-not-intended-to-be-factual-statements",
"http://thecolbertreport.cc.com/videos/xcin15/mitt-happens",
"http://thecolbertreport.cc.com/videos/l039ce/mitt-happens---rick-brookhiser",
"http://thecolbertreport.cc.com/videos/pqpkrr/threat-level--rainbow",
"http://thecolbertreport.cc.com/videos/2gpjkk/ray-kurzweil",
"http://thecolbertreport.cc.com/videos/ry2cgl/sign-off---goodnight"
],
"guest": "Ray Kurzweil"
},
{
"date": "2011-04-13",
"videos": [
"http://thecolbertreport.cc.com/videos/tjsqfs/tim-pawlenty-declares-candidacy-before-he-s-ready",
"http://thecolbertreport.cc.com/videos/ha4gop/the-word---buy-and-cellulite",
"http://thecolbertreport.cc.com/videos/jc9fbz/the-enemy-within---unicyclists",
"http://thecolbertreport.cc.com/videos/nm38xu/morgan-spurlock",
"http://thecolbertreport.cc.com/videos/l1ikyh/sign-off---doritos-suit"
],
"guest": "Morgan Spurlock"
},
{
"date": "2011-04-14",
"videos": [
"http://thecolbertreport.cc.com/videos/fziyvf/obama-needs-charts-and-graphs",
"http://thecolbertreport.cc.com/videos/pfzzi1/viacom-ruins-stephen-s-pac-dream",
"http://thecolbertreport.cc.com/videos/yzb7q2/colbert-super-pac---trevor-potter",
"http://thecolbertreport.cc.com/videos/k099cq/easter-under-attack---egg-edition",
"http://thecolbertreport.cc.com/videos/iybrlk/caroline-kennedy",
"http://thecolbertreport.cc.com/videos/rjwyn0/sign-off---ipad"
],
"guest": "Caroline Kennedy"
},
{
"date": "2011-04-25",
"videos": [
"http://thecolbertreport.cc.com/videos/00rg0h/catholic-bender",
"http://thecolbertreport.cc.com/videos/tml3zz/obama-s-tax-return---road-to-the-trump-house",
"http://thecolbertreport.cc.com/videos/e943tp/cheating-death---vaxa-international--lap-band-surgery---restless-leg-syndrome",
"http://thecolbertreport.cc.com/videos/nxhrou/ron-paul",
"http://thecolbertreport.cc.com/videos/8813vl/sign-off---vacsa-not-masturbating"
],
"guest": "Rep. Ron Paul"
},
{
"date": "2011-04-26",
"videos": [
"http://thecolbertreport.cc.com/videos/hl20qf/intro---4-26-11",
"http://thecolbertreport.cc.com/videos/zv4zje/mitt-romney-s--peacetime--gaffe",
"http://thecolbertreport.cc.com/videos/rmltni/charles-manson-believes-in-global-warming",
"http://thecolbertreport.cc.com/videos/i3gdyb/a-c--grayling",
"http://thecolbertreport.cc.com/videos/qxdqyc/sign-off---taser"
],
"guest": "A.C. Grayling"
},
{
"date": "2011-04-27",
"videos": [
"http://thecolbertreport.cc.com/videos/d9mieg/intro---4-27-11",
"http://thecolbertreport.cc.com/videos/cnt2qq/america-needs-to-see-obama-s-report-cards",
"http://thecolbertreport.cc.com/videos/vog079/tip-wag---faa--casio-watches---postal-service",
"http://thecolbertreport.cc.com/videos/qu6i2l/anderson-cooper-goes-on-the-absurd-u-chart",
"http://thecolbertreport.cc.com/videos/okt7ac/ice-t",
"http://thecolbertreport.cc.com/videos/bi5bau/sign-off---goodnight-in-spanish"
],
"guest": "Ice-T"
},
{
"date": "2011-04-28",
"videos": [
"http://thecolbertreport.cc.com/videos/xcnvxf/intro---4-28-11",
"http://thecolbertreport.cc.com/videos/6ei496/stephen-waits-for-his-royal-wedding-invitation-in-london",
"http://thecolbertreport.cc.com/videos/8ureil/progressives-united---russ-feingold",
"http://thecolbertreport.cc.com/videos/dfmioz/homeland-security-eliminates-color-coded-terror-alert-system",
"http://thecolbertreport.cc.com/videos/r7zj9a/wade-graham",
"http://thecolbertreport.cc.com/videos/tsom8o/sign-off---off-to-the-royal-wedding"
],
"guest": "Wade Graham"
},
{
"date": "2011-05-02",
"videos": [
"http://thecolbertreport.cc.com/videos/792my5/intro---5-2-11",
"http://thecolbertreport.cc.com/videos/6kw3l1/long-awaited--we-got-bin-laden--party",
"http://thecolbertreport.cc.com/videos/501cxj/carefree-pre-9-11-world",
"http://thecolbertreport.cc.com/videos/w147rj/relations-with-pakistan---richard-haass",
"http://thecolbertreport.cc.com/videos/x03tm5/francis-fukuyama",
"http://thecolbertreport.cc.com/videos/s3o1z2/sign-off---obama-s-timer-runs-out"
],
"guest": "Francis Fukuyama"
},
{
"date": "2011-05-03",
"videos": [
"http://thecolbertreport.cc.com/videos/v58m27/intro---5-3-11",
"http://thecolbertreport.cc.com/videos/h9f07a/osama-bin-laden-is-still-dead",
"http://thecolbertreport.cc.com/videos/5n9zp7/obama-takes-credit-for-bin-laden-s-assassination",
"http://thecolbertreport.cc.com/videos/h1wdo9/journalistic-grintegrity",
"http://thecolbertreport.cc.com/videos/u2r1n6/rex-ryan",
"http://thecolbertreport.cc.com/videos/ukrfvl/sign-off---special-kiss"
],
"guest": "Rex Ryan"
},
{
"date": "2011-05-04",
"videos": [
"http://thecolbertreport.cc.com/videos/edkk4q/intro---5-4-11",
"http://thecolbertreport.cc.com/videos/ndiuxr/terrorists--they-re-just-like-us-",
"http://thecolbertreport.cc.com/videos/kbkvj6/stephen-searches-for-shared-bathroom-key",
"http://thecolbertreport.cc.com/videos/kt1w5q/movies-that-are-destroying-america---saving-america-edition",
"http://thecolbertreport.cc.com/videos/50b5cb/amy-farrell",
"http://thecolbertreport.cc.com/videos/jcmie8/sign-off---goodnight"
],
"guest": "Amy Farrell"
},
{
"date": "2011-05-05",
"videos": [
"http://thecolbertreport.cc.com/videos/lbrn85/stephen-confesses-to-a-distracted-media",
"http://thecolbertreport.cc.com/videos/avpz0y/threatdown---superman--madden-nfl-12----glee-",
"http://thecolbertreport.cc.com/videos/g2bhyr/inaugural-republican-presidential-debate---donald-trump-s-wisdom",
"http://thecolbertreport.cc.com/videos/4neb1g/bill-james",
"http://thecolbertreport.cc.com/videos/k2or8w/sign-off---dennis-kucinich-heat-vision"
],
"guest": "Bill James"
},
{
"date": "2011-05-09",
"videos": [
"http://thecolbertreport.cc.com/videos/dkbe7y/intro---5-9-11",
"http://thecolbertreport.cc.com/videos/6rdbxz/hasidic-newspaper-removes-hillary-clinton",
"http://thecolbertreport.cc.com/videos/mqyr6k/herman-cain-wins-the-first-republican-presidential-debate",
"http://thecolbertreport.cc.com/videos/38grqn/the-word---autocratic-for-the-people",
"http://thecolbertreport.cc.com/videos/d8bi6b/lupe-fiasco",
"http://thecolbertreport.cc.com/videos/vonv0r/sign-off---lupe-fiasco-s--lasers-"
],
"guest": "Lupe Fiasco"
},
{
"date": "2011-05-10",
"videos": [
"http://thecolbertreport.cc.com/videos/r02fac/newt-gingrich---donald-trump-announce-future-announcements",
"http://thecolbertreport.cc.com/videos/w3lgcs/yahweh-or-no-way---thor---apocalypse-billboard",
"http://thecolbertreport.cc.com/videos/zu0ju2/difference-makers---donald-trump",
"http://thecolbertreport.cc.com/videos/i4gyok/geoffrey-rush",
"http://thecolbertreport.cc.com/videos/wmfolw/sign-off---a-rare-correction"
],
"guest": "Geoffrey Rush"
},
{
"date": "2011-05-11",
"videos": [
"http://thecolbertreport.cc.com/videos/g0js2x/intro---5-11-11",
"http://thecolbertreport.cc.com/videos/txo75b/herman-cain-claims-the-colbert-bump",
"http://thecolbertreport.cc.com/videos/1ssaiz/corp-constituency",
"http://thecolbertreport.cc.com/videos/nfv0i1/corp-constituency---trevor-potter",
"http://thecolbertreport.cc.com/videos/rqvi06/award-to-the-wise",
"http://thecolbertreport.cc.com/videos/sjt27k/eric-greitens",
"http://thecolbertreport.cc.com/videos/q3siyv/sign-off---press-hat"
],
"guest": "Eric Greitens"
},
{
"date": "2011-05-12",
"videos": [
"http://thecolbertreport.cc.com/videos/mp7mrs/intro---5-12-11",
"http://thecolbertreport.cc.com/videos/zz94qv/obama-s-latino-panderfest",
"http://thecolbertreport.cc.com/videos/vkp4tr/terror--a-new-one",
"http://thecolbertreport.cc.com/videos/9o0mt6/terror--a-new-one---lawrence-wright",
"http://thecolbertreport.cc.com/videos/dqvz13/if-at-first-you-don-t-secede",
"http://thecolbertreport.cc.com/videos/yx5grt/john-bradshaw",
"http://thecolbertreport.cc.com/videos/sw8fy6/sign-off---stephen-s-super-pac-needs-support"
],
"guest": "John Bradshaw"
},
{
"date": "2011-05-16",
"videos": [
"http://thecolbertreport.cc.com/videos/9xaxr4/mike-huckabee---donald-trump-drop-out",
"http://thecolbertreport.cc.com/videos/duon08/fig-newton-gingrich-2012",
"http://thecolbertreport.cc.com/videos/epwg6t/stephen-files-super-pac-request",
"http://thecolbertreport.cc.com/videos/g3ep11/alison-klayman",
"http://thecolbertreport.cc.com/videos/4r7evh/sign-off---goodnight"
],
"guest": "Alison Klayman"
},
{
"date": "2011-05-17",
"videos": [
"http://thecolbertreport.cc.com/videos/ip5tv7/intro---5-17-11",
"http://thecolbertreport.cc.com/videos/1ugsri/world-s-oldest-panda-dies",
"http://thecolbertreport.cc.com/videos/l4p5dq/the-word---enhanced-rejustification",
"http://thecolbertreport.cc.com/videos/pg06l0/arnold-schwarzenegger-s-sex-scandal",
"http://thecolbertreport.cc.com/videos/58filp/amy-kremer",
"http://thecolbertreport.cc.com/videos/no1rv9/sign-off---goodnight"
],
"guest": "Amy Kremer"
},
{
"date": "2011-05-18",
"videos": [
"http://thecolbertreport.cc.com/videos/faf2no/exclusive---austan-goolsbee-extended-interview-pt--1",
"http://thecolbertreport.cc.com/videos/6pf58s/exclusive---austan-goolsbee-extended-interview-pt--2",
"http://thecolbertreport.cc.com/videos/bdi4g4/exclusive---austan-goolsbee-extended-interview-pt--3",
"http://thecolbertreport.cc.com/videos/6khcvr/intro---5-18-11",
"http://thecolbertreport.cc.com/videos/55ye8a/osama-bin-laden-s-replacement",
"http://thecolbertreport.cc.com/videos/tohq6g/tip-wag---ohio-legislature---facebook",
"http://thecolbertreport.cc.com/videos/2cxcrh/breaking-newt",
"http://thecolbertreport.cc.com/videos/vvu071/austan-goolsbee",
"http://thecolbertreport.cc.com/videos/sklv51/sign-off---long-austan-goolsbee-interview"
],
"guest": "Austan Goolsbee"
},
{
"date": "2011-05-19",
"videos": [
"http://thecolbertreport.cc.com/videos/7qmvog/john-lithgow-performs-gingrich-press-release",
"http://thecolbertreport.cc.com/videos/pb82sf/better-know-a-district---illinois--18th---aaron-schock-update",
"http://thecolbertreport.cc.com/videos/3gd1zf/clergy-matic-ecclesi-action-center-3-16",
"http://thecolbertreport.cc.com/videos/5ec3r8/kareem-abdul-jabbar",
"http://thecolbertreport.cc.com/videos/p12tcc/sign-off---history-of-life-on-earth"
],
"guest": "Kareem Abdul-Jabbar"
},
{
"date": "2011-05-31",
"videos": [
"http://thecolbertreport.cc.com/videos/gn9ut5/intro---5-31-11",
"http://thecolbertreport.cc.com/videos/xxn340/charleston-to-bermuda-yacht-race",
"http://thecolbertreport.cc.com/videos/fgthom/sarah-palin-s-bus-tour",
"http://thecolbertreport.cc.com/videos/bmwaxh/fec-questions---trevor-potter",
"http://thecolbertreport.cc.com/videos/7bl2ga/invisible-judgment",
"http://thecolbertreport.cc.com/videos/ox3on4/james-stewart",
"http://thecolbertreport.cc.com/videos/vn091b/sign-off---goodnight"
],
"guest": "James B. Stewart"
},
{
"date": "2011-06-01",
"videos": [
"http://thecolbertreport.cc.com/videos/nos79v/intro---6-1-11",
"http://thecolbertreport.cc.com/videos/mqb30h/sarah-palin-visits-the-times-square-applebee-s",
"http://thecolbertreport.cc.com/videos/ul70kx/meat-tweet",
"http://thecolbertreport.cc.com/videos/jph6sv/harmful-cell-phones",
"http://thecolbertreport.cc.com/videos/beqc1p/who-s-riding-my-coattails-now----jimmy-fallon",
"http://thecolbertreport.cc.com/videos/5a4ke7/robert-f--kennedy-jr-",
"http://thecolbertreport.cc.com/videos/3enqpr/sign-off---iphone"
],
"guest": "Robert Kennedy Jr."
},
{
"date": "2011-06-02",
"videos": [
"http://thecolbertreport.cc.com/videos/7o4l3r/intro---6-2-11",
"http://thecolbertreport.cc.com/videos/rqi6dy/dancing-on-the-ceiling",
"http://thecolbertreport.cc.com/videos/1db84y/anthony-weiner-addresses-twitter-scandal",
"http://thecolbertreport.cc.com/videos/qhexu1/tip-wag---osama-bin-laden---hugh-hefner",
"http://thecolbertreport.cc.com/videos/8t7m7k/salman-khan",
"http://thecolbertreport.cc.com/videos/rqa2ar/sign-off---goodnight"
],
"guest": "Salman Khan"
},
{
"date": "2011-06-06",
"videos": [
"http://thecolbertreport.cc.com/videos/bwqzbu/anthony-weiner-s-emergency-press-conference",
"http://thecolbertreport.cc.com/videos/uvi91o/paul-revere-s-famous-ride",
"http://thecolbertreport.cc.com/videos/x424g2/stephen-s-twitter-scandal",
"http://thecolbertreport.cc.com/videos/qyadrw/obama-administration-replaces-food-pyramid",
"http://thecolbertreport.cc.com/videos/fdolcv/werner-herzog",
"http://thecolbertreport.cc.com/videos/ed6qec/stephen-s-midnight-ride"
],
"guest": "Werner Herzog"
},
{
"date": "2011-06-07",
"videos": [
"http://thecolbertreport.cc.com/videos/suzxde/scott-pelley-s-first-cbs-broadcast",
"http://thecolbertreport.cc.com/videos/1w9fvc/the-word---hear-no-evil",
"http://thecolbertreport.cc.com/videos/fvvawg/sugar-ray-leonard",
"http://thecolbertreport.cc.com/videos/b4ot0e/apologies-to-shimshamistan"
],
"guest": "Sugar Ray Leonard"
},
{
"date": "2011-06-08",
"videos": [
"http://thecolbertreport.cc.com/videos/fq1085/herman-cain-wants-small-bills",
"http://thecolbertreport.cc.com/videos/bmggoz/better-know-a-district---california-s-10th---john-garamendi",
"http://thecolbertreport.cc.com/videos/ycdgvg/weiner-captures-manscaping-vote",
"http://thecolbertreport.cc.com/videos/yvz8wj/bre-pettis",
"http://thecolbertreport.cc.com/videos/ao2r17/sign-off---makerbot-head"
],
"guest": "Bre Pettis"
},
{
"date": "2011-06-09",
"videos": [
"http://thecolbertreport.cc.com/videos/tz9edm/shaquille-o-neal-retires",
"http://thecolbertreport.cc.com/videos/umrvml/mitt-romney-leads-in-fox-news-poll",
"http://thecolbertreport.cc.com/videos/qgxogp/the-word---the-business-end",
"http://thecolbertreport.cc.com/videos/oneftb/andrew-breitbart-reveals-weiner-photo",
"http://thecolbertreport.cc.com/videos/5f3kap/tom-ridge",
"http://thecolbertreport.cc.com/videos/vvj5q2/sign-off---goodnight"
],
"guest": "Tom Ridge"
},
{
"date": "2011-06-13",
"videos": [
"http://thecolbertreport.cc.com/videos/0zzkov/anthony-weiner-gym-photos",
"http://thecolbertreport.cc.com/videos/vgcql3/sport-report---miami-heat--fifa---freestyle-canoe-dancing",
"http://thecolbertreport.cc.com/videos/vyyl7z/henry-kissinger-pt--1",
"http://thecolbertreport.cc.com/videos/2j87li/henry-kissinger-pt--2",
"http://thecolbertreport.cc.com/videos/w5b5l1/sign-off---goodnight"
],
"guest": "Henry Kissinger"
},
{
"date": "2011-06-14",
"videos": [
"http://thecolbertreport.cc.com/videos/lokk6e/intro---6-14-11",
"http://thecolbertreport.cc.com/videos/egh1n7/elephants-in-the-room",
"http://thecolbertreport.cc.com/videos/ykt712/close-sesame",
"http://thecolbertreport.cc.com/videos/s6kp16/janny-scott",
"http://thecolbertreport.cc.com/videos/j0gylk/sign-off---marshmallows"
],
"guest": "Janny Scott"
},
{
"date": "2011-06-15",
"videos": [
"http://thecolbertreport.cc.com/videos/d8iaxd/intro---6-15-11",
"http://thecolbertreport.cc.com/videos/zj00ia/iran-bans-necklaces-and-shorts",
"http://thecolbertreport.cc.com/videos/xbt4w9/kindergarten-gop",
"http://thecolbertreport.cc.com/videos/ynp682/the-word---shock-the-vote",
"http://thecolbertreport.cc.com/videos/46tlsv/senior-moment---pot-smoking-seniors",
"http://thecolbertreport.cc.com/videos/5h6ee5/keith-olbermann",
"http://thecolbertreport.cc.com/videos/5rh3rg/sign-off---stephen-wears-shorts"
],
"guest": "Keith Olbermann"
},
{
"date": "2011-06-20",
"videos": [
"http://thecolbertreport.cc.com/videos/2374v3/intro---6-20-11",
"http://thecolbertreport.cc.com/videos/q7b70y/stephest-colbchella--011---rock-you-like-a-thirst-icane",
"http://thecolbertreport.cc.com/videos/y7lr8u/threatdown---moo-shu-man-milk--centenarians---robo-slackers",
"http://thecolbertreport.cc.com/videos/gds7n9/justin-vernon",
"http://thecolbertreport.cc.com/videos/su735n/sign-off---bon-iver-bonus-song"
],
"guest": "Bon Iver"
},
{
"date": "2011-06-21",
"videos": [
"http://thecolbertreport.cc.com/videos/3o3le7/generic-republican-presidential-nominee",
"http://thecolbertreport.cc.com/videos/ct0au7/stephest-colbchella--011---stephen-revives-his-music-career",
"http://thecolbertreport.cc.com/videos/v43nph/2011--a-rock-odyssey-featuring-jack-white-pt--1",
"http://thecolbertreport.cc.com/videos/7e8ifi/florence-welch",
"http://thecolbertreport.cc.com/videos/ei7r0b/sign-off---talib-kweli-tomorrow"
],
"guest": "Florence and the Machine"
},
{
"date": "2011-06-22",
"videos": [
"http://thecolbertreport.cc.com/videos/f5h9ob/george-w--bush-helps-break-a-world-record",
"http://thecolbertreport.cc.com/videos/ozlnky/2011--a-rock-odyssey-featuring-jack-white-pt--2",
"http://thecolbertreport.cc.com/videos/u3bmmq/the-word---the-defining-moment",
"http://thecolbertreport.cc.com/videos/c7shlp/talib-kweli"
],
"guest": "Talib Kweli"
},
{
"date": "2011-06-23",
"videos": [
"http://thecolbertreport.cc.com/videos/ihqt34/exclusive---2011--a-rock-odyssey-featuring-jack-white---catholic-throwdown",
"http://thecolbertreport.cc.com/videos/zbc2ok/stephest-colbchella--011---stephen-announces-his-hit-song",
"http://thecolbertreport.cc.com/videos/1if3ir/nation-building-in-america",
"http://thecolbertreport.cc.com/videos/4evhq9/2011--a-rock-odyssey-featuring-jack-white-pt--3",
"http://thecolbertreport.cc.com/videos/39or3g/jack-white"
],
"guest": "The Black Belles"
},
{
"date": "2011-06-27",
"videos": [
"http://thecolbertreport.cc.com/videos/8tiso3/intro---6-27-11",
"http://thecolbertreport.cc.com/videos/zz1v27/tip-wag---scented-razors---rick-scott-s-approval-rating",
"http://thecolbertreport.cc.com/videos/7e3kfb/stephen---jonathan-alter-at-gaillard-auditorium",
"http://thecolbertreport.cc.com/videos/npgonl/good-point-other-point---ted-nugent-vs--millennials",
"http://thecolbertreport.cc.com/videos/89vjk7/grover-norquist",
"http://thecolbertreport.cc.com/videos/fe2wnr/sign-off---scented-box-cutter"
],
"guest": "Grover Norquist"
},
{
"date": "2011-06-28",
"videos": [
"http://thecolbertreport.cc.com/videos/gs5b2y/intro---6-28-11",
"http://thecolbertreport.cc.com/videos/im5by3/michele-bachmann-compares-herself-to-john-wayne",
"http://thecolbertreport.cc.com/videos/b2dez1/the-word---too-big-to-nail",
"http://thecolbertreport.cc.com/videos/eztgrx/advertising-to-monkeys",
"http://thecolbertreport.cc.com/videos/jfztdi/alexandra-pelosi",
"http://thecolbertreport.cc.com/videos/1it2j9/sign-off---teleprompter-eulogy"
],
"guest": "Alexandra Pelosi"
},
{
"date": "2011-06-29",
"videos": [
"http://thecolbertreport.cc.com/videos/e7dlbc/intro---6-29-11",
"http://thecolbertreport.cc.com/videos/s3xttd/4th-of-july-under-attack---fireworks-cancelled",
"http://thecolbertreport.cc.com/videos/7gul1z/colbert-super-pac---irresponsible-advertising",
"http://thecolbertreport.cc.com/videos/kco7lo/colbert-super-pac---trevor-potter-preps-stephen-for-his-fec-hearing",
"http://thecolbertreport.cc.com/videos/o7wrgl/hometown-hero-town---lexington--ky",
"http://thecolbertreport.cc.com/videos/zc23xv/gary-sinise",
"http://thecolbertreport.cc.com/videos/80a7v2/sign-off---see-you-at-the-fec"
],
"guest": "Gary Sinise"
},
{
"date": "2011-06-30",
"videos": [
"http://thecolbertreport.cc.com/videos/3yk8uf/intro---6-30-11",
"http://thecolbertreport.cc.com/videos/gffis7/colbert-super-pac---i-can-haz-super-pac-",
"http://thecolbertreport.cc.com/videos/uf525x/colbert-super-pac---stephen-addresses-colbert-super-nation",
"http://thecolbertreport.cc.com/videos/owodco/formidable-opponent---pakistan",
"http://thecolbertreport.cc.com/videos/807lhi/timothy-garton-ash",
"http://thecolbertreport.cc.com/videos/b2dqnd/sign-off---super-pac-donations"
],
"guest": "Timothy Garton Ash"
},
{
"date": "2011-07-11",
"videos": [
"http://thecolbertreport.cc.com/videos/t8xnmj/intro---7-11-11",
"http://thecolbertreport.cc.com/videos/sgqex9/colbert-super-pac---pushing-the-limits",
"http://thecolbertreport.cc.com/videos/m3svek/anti-frack-attacks",
"http://thecolbertreport.cc.com/videos/2h3oe2/tip-wag---conservative-john-lennon---unfunny-germany",
"http://thecolbertreport.cc.com/videos/z2r2b0/michael-shermer",
"http://thecolbertreport.cc.com/videos/g47pr3/sign-off---super-pac-fundraising-goal"
],
"guest": "Michael Shermer"
},
{
"date": "2011-07-12",
"videos": [
"http://thecolbertreport.cc.com/videos/20gpt7/herman-cain-train",
"http://thecolbertreport.cc.com/videos/7aive1/the-family-leader-s-controversial-pledge",
"http://thecolbertreport.cc.com/videos/7sobpk/heterosexual-accountability-buddy",
"http://thecolbertreport.cc.com/videos/vw4tol/dan-savage",
"http://thecolbertreport.cc.com/videos/nkuukl/sign-off---fixing-the-boiler"
],
"guest": "Dan Savage"
},
{
"date": "2011-07-13",
"videos": [
"http://thecolbertreport.cc.com/videos/smsyco/intro---7-13-11",
"http://thecolbertreport.cc.com/videos/70lgql/flagworth-2012",
"http://thecolbertreport.cc.com/videos/7gb5kn/republicans-choose-none-of-the-above",
"http://thecolbertreport.cc.com/videos/palj9t/obama-calls-the-republican-bluff",
"http://thecolbertreport.cc.com/videos/5ulzg5/david-mccullough",
"http://thecolbertreport.cc.com/videos/7xngpa/sign-off---pen-toss"
],
"guest": "David McCullough"
},
{
"date": "2011-07-14",
"videos": [
"http://thecolbertreport.cc.com/videos/h2i0g7/intro---7-14-11",
"http://thecolbertreport.cc.com/videos/8oisqi/carmageddon",
"http://thecolbertreport.cc.com/videos/uqj8qb/may-the-best-stephen-colbert-win",
"http://thecolbertreport.cc.com/videos/a29405/murdoch-s-media-empire-might-go-down-the-toilet",
"http://thecolbertreport.cc.com/videos/1o1flh/improvised-expressive-devices",
"http://thecolbertreport.cc.com/videos/82ovjs/jose-antonio-vargas",
"http://thecolbertreport.cc.com/videos/9nwz4n/sign-off---goodnight"
],
"guest": "Jose Antonio Vargas"
},
{
"date": "2011-07-18",
"videos": [
"http://thecolbertreport.cc.com/videos/ureory/intro---7-18-11",
"http://thecolbertreport.cc.com/videos/ybue54/epic-blockbuster",
"http://thecolbertreport.cc.com/videos/7t9e81/colbert-super-pac---cash-crawl",
"http://thecolbertreport.cc.com/videos/73lwqj/colbert-super-pac---campaign-finance",
"http://thecolbertreport.cc.com/videos/9q309t/blood-in-the-water---rupert-murdoch-s-news-of-the-world-scandal",
"http://thecolbertreport.cc.com/videos/36812w/john-prendergast",
"http://thecolbertreport.cc.com/videos/d8rt51/sign-off---prerecorded-episodes"
],
"guest": "John Prendergast"
},
{
"date": "2011-07-19",
"videos": [
"http://thecolbertreport.cc.com/videos/bcunwj/newt-s-white-whale",
"http://thecolbertreport.cc.com/videos/nhl043/god-calls-rick-perry",
"http://thecolbertreport.cc.com/videos/6cdpui/debt-ceiling-deadline-conspiracy",
"http://thecolbertreport.cc.com/videos/maophz/david-carr",
"http://thecolbertreport.cc.com/videos/50pek1/sign-off---goodnight"
],
"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/congressional-partisan-rancor",
"http://thecolbertreport.cc.com/videos/2p2ijk/michael-sandel",
"http://thecolbertreport.cc.com/videos/tia7kd/sign-off---reading"
],
"guest": "Michael Sandel"
},
{
"date": "2011-07-21",
"videos": [
"http://thecolbertreport.cc.com/videos/egjics/intro---7-21-11",
"http://thecolbertreport.cc.com/videos/l3rcr1/death-of-america-s-space-program",
"http://thecolbertreport.cc.com/videos/vntv81/i-s-on-edjukashun---gay-history---disney-english",
"http://thecolbertreport.cc.com/videos/6yym31/nbc--no-butt-coverage",
"http://thecolbertreport.cc.com/videos/9catel/david-eagleman",
"http://thecolbertreport.cc.com/videos/nn8qoh/sign-off---space-robot"
],
"guest": "David Eagleman"
},
{
"date": "2011-07-25",
"videos": [
"http://thecolbertreport.cc.com/videos/l0wxhe/y2-gay",
"http://thecolbertreport.cc.com/videos/fbd6kf/norwegian-muslish-gunman-s-islam-esque-atrocity",
"http://thecolbertreport.cc.com/videos/wznkdz/vaginal-puppeteering-vs--d--k-scrub",
"http://thecolbertreport.cc.com/videos/z4gfkc/brian-cox",
"http://thecolbertreport.cc.com/videos/9q5n38/sign-off---the-thinker"
],
"guest": "Brian Cox"
},
{
"date": "2011-07-26",
"videos": [
"http://thecolbertreport.cc.com/videos/bzl0xh/intro---7-26-11",
"http://thecolbertreport.cc.com/videos/umjv5s/herman-cain-cancels-on-stephen",
"http://thecolbertreport.cc.com/videos/zq2rpw/-poor--in-america",
"http://thecolbertreport.cc.com/videos/j2gcnk/-poor--in-america---peter-edelman",
"http://thecolbertreport.cc.com/videos/a4awyb/america-s-bucket-list",
"http://thecolbertreport.cc.com/videos/azl59v/brooke-gladstone",
"http://thecolbertreport.cc.com/videos/ly4qfz/sign-off---america-s-bucket-list"
],
"guest": "Brooke Gladstone"
},
{
"date": "2011-07-27",
"videos": [
"http://thecolbertreport.cc.com/videos/zq1omv/nissan-s--leaf-wave--deadline",
"http://thecolbertreport.cc.com/videos/x50fvb/difference-makers---patrick-rodgers",
"http://thecolbertreport.cc.com/videos/3o44r7/helium-runs-out",
"http://thecolbertreport.cc.com/videos/omkngv/missy-cummings",
"http://thecolbertreport.cc.com/videos/y4zc9o/sign-off---surveillance-drone-crash"
],
"guest": "Mary \"Missy\" Cummings"
},
{
"date": "2011-07-28",
"videos": [
"http://thecolbertreport.cc.com/videos/8c1oeo/the-republican-ring-of-power",
"http://thecolbertreport.cc.com/videos/yzmsiz/colbert-super-pac---for-the-children",
"http://thecolbertreport.cc.com/videos/e4r2vc/colbert-super-pac---matthew-dowd---ham-rove",
"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/sign-off---cone-of-silence"
],
"guest": "Buddy Roemer"
},
{
"date": "2011-08-01",
"videos": [
"http://thecolbertreport.cc.com/videos/aqw9op/intro---8-1-11",
"http://thecolbertreport.cc.com/videos/lrz1ud/-three-billy-goats-gruff--budget-negotiations",
"http://thecolbertreport.cc.com/videos/mgkqu6/the-word---with-great-power-comes-no-responsibility",
"http://thecolbertreport.cc.com/videos/6v3oa3/from-ashes-to-bullets",
"http://thecolbertreport.cc.com/videos/mqbxt0/tony-hsieh",
"http://thecolbertreport.cc.com/videos/sqd53z/sign-off---sneakers"
],
"guest": "Tony Hsieh"
},
{
"date": "2011-08-02",
"videos": [
"http://thecolbertreport.cc.com/videos/xaqx6o/intro---8-2-11",
"http://thecolbertreport.cc.com/videos/j862uf/newt-gingrich-s-twitter-scandal",
"http://thecolbertreport.cc.com/videos/pzfcj1/america-s-credit-grating",
"http://thecolbertreport.cc.com/videos/y1xqdj/america-s-credit-grating---david-leonhardt",
"http://thecolbertreport.cc.com/videos/gg2p1r/baby-teeth-economy",
"http://thecolbertreport.cc.com/videos/id20x6/al-hunt",
"http://thecolbertreport.cc.com/videos/h26uru/sign-off---goodnight"
],
"guest": "Al Hunt"
},
{
"date": "2011-08-03",
"videos": [
"http://thecolbertreport.cc.com/videos/br7gdf/intro---8-3-11",
"http://thecolbertreport.cc.com/videos/3i1326/multiracial-spider-man",
"http://thecolbertreport.cc.com/videos/f3w320/threatdown---fake-states--sharia-weather---monopoly",
"http://thecolbertreport.cc.com/videos/cvc16w/women-s-health-nazi-plan",
"http://thecolbertreport.cc.com/videos/6x0m3y/robert-wittman",
"http://thecolbertreport.cc.com/videos/utsxoh/sign-off---official-flag-updater"
],
"guest": "Robert Wittman"
},
{
"date": "2011-08-04",
"videos": [
"http://thecolbertreport.cc.com/videos/t3bxny/intro---8-4-11",
"http://thecolbertreport.cc.com/videos/8tx5s2/barack-obama-s-50th-birthday",
"http://thecolbertreport.cc.com/videos/7ahjkr/colbert-super-pac---the-heroes-respond",
"http://thecolbertreport.cc.com/videos/ma6ejy/wisconsin-s-recall-election---americans-for-prosperity-s-absentee-ballot-typos",
"http://thecolbertreport.cc.com/videos/8q9pe2/sport-report---baseball-s-lowest-records---mlb-s-twitter-feed",
"http://thecolbertreport.cc.com/videos/d8704f/anthony-bourdain",
"http://thecolbertreport.cc.com/videos/afj5qe/sign-off---goodnight"
],
"guest": "Anthony Bourdain"
},
{
"date": "2011-08-08",
"videos": [
"http://thecolbertreport.cc.com/videos/smerqo/america-s-credit-downgrade",
"http://thecolbertreport.cc.com/videos/y7x3es/colbert-super-pac---rick-perry-for-president",
"http://thecolbertreport.cc.com/videos/lu1v74/doomsday-bargain-bunkers",
"http://thecolbertreport.cc.com/videos/wkairk/nassir-ghaemi",
"http://thecolbertreport.cc.com/videos/4zkkn5/sign-off---stephen-sniffs-a-marker"
],
"guest": "Nassir Ghaemi"
},
{
"date": "2011-08-09",
"videos": [
"http://thecolbertreport.cc.com/videos/tufpnm/intro---8-9-11",
"http://thecolbertreport.cc.com/videos/pxptx8/heatsteria",
"http://thecolbertreport.cc.com/videos/rtqznl/the-word---head-in-the-cloud",
"http://thecolbertreport.cc.com/videos/gj6vb5/ric-ocasek"
],
"guest": "The Cars"
},
{
"date": "2011-08-10",
"videos": [
"http://thecolbertreport.cc.com/videos/mjvryb/intro---8-10-11",
"http://thecolbertreport.cc.com/videos/1jlwac/hooker-drawer-market",
"http://thecolbertreport.cc.com/videos/cw4el2/yahweh-or-no-way---mormons---god-s-poll-numbers",
"http://thecolbertreport.cc.com/videos/uulxb3/god-s-job-performance---jim-martin",
"http://thecolbertreport.cc.com/videos/15zleh/colbert-super-pac---campaign-donation-addiction",
"http://thecolbertreport.cc.com/videos/zxka8u/elliot-ackerman",
"http://thecolbertreport.cc.com/videos/mvgmwy/sign-off---e-mailing-colbert-nation"
],
"guest": "Elliott Ackerman"
},
{
"date": "2011-08-11",
"videos": [
"http://thecolbertreport.cc.com/videos/pi19ix/super-pac-ad---behind-the-green-corn",
"http://thecolbertreport.cc.com/videos/x1aodj/super-pac-ad---episode-iv--a-new-hope",
"http://thecolbertreport.cc.com/videos/etbj36/romney-2012----corporations-are-people-",
"http://thecolbertreport.cc.com/videos/90ptp7/colbert-super-pac---rick-parry-with-an--a--for-america",
"http://thecolbertreport.cc.com/videos/swbu9s/colbert-super-pac---confused-by-rick-parry-with-an--a--for-america",
"http://thecolbertreport.cc.com/videos/yu257u/gloria-steinem",
"http://thecolbertreport.cc.com/videos/7x3ryp/sign-off---stephen-s-emmy-award"
],
"guest": "Gloria Steinem"
},
{
"date": "2011-08-15",
"videos": [
"http://thecolbertreport.cc.com/videos/40fotx/exclusive---susan-rice-extended-interview-pt--1",
"http://thecolbertreport.cc.com/videos/vvlrva/exclusive---susan-rice-extended-interview-pt--2",
"http://thecolbertreport.cc.com/videos/lqjncy/susan-rice-extended-interview-pt--3",
"http://thecolbertreport.cc.com/videos/0yyo1z/colbert-super-pac---stephen-apologizes-to-woi-in-des-moines",
"http://thecolbertreport.cc.com/videos/dzchwi/colbert-super-pac---iowa-straw-poll-results",
"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/sign-off---full-susan-rice-interview-online"
],
"guest": "Amb. Susan Rice"
},
{
"date": "2011-08-16",
"videos": [
"http://thecolbertreport.cc.com/videos/i0nwuy/exclusive---space-shuttle-atlantis-crew---extended-interview-pt--1",
"http://thecolbertreport.cc.com/videos/8gjrx4/exclusive---space-shuttle-atlantis-crew---extended-interview-pt--2",
"http://thecolbertreport.cc.com/videos/rmrfc3/the-etymology-of--obamacare-",
"http://thecolbertreport.cc.com/videos/cjfda6/colbert-super-pac---persuadulux-6000",
"http://thecolbertreport.cc.com/videos/m00z1i/colbert-super-pac---frank-luntz-commits-to-the-pac",
"http://thecolbertreport.cc.com/videos/a8v2gy/nasa-s-greatest-moments-montage",
"http://thecolbertreport.cc.com/videos/nnfhdg/chris-ferguson--doug-hurley--rex-walheim---sandy-magnus",
"http://thecolbertreport.cc.com/videos/h83o7v/sign-off---stephen-s-launch-pad-nut"
],
"guest": "STS-135 astronauts"
},
{
"date": "2011-08-17",
"videos": [
"http://thecolbertreport.cc.com/videos/brmz0s/exclusive---jeff-bridges-for-summer-s-eve",
"http://thecolbertreport.cc.com/videos/1cvtnm/intro---8-17-11",
"http://thecolbertreport.cc.com/videos/yk47i3/colbert-super-pac---rick-perry-s-treasurer",
"http://thecolbertreport.cc.com/videos/uiim37/tip-wag---evangelical-scientists---rick-santorum",
"http://thecolbertreport.cc.com/videos/4km5oi/jeff-bridges",
"http://thecolbertreport.cc.com/videos/1bb0sg/sign-off---jeff-bridges--album-cover"
],
"guest": "Jeff Bridges"
},
{
"date": "2011-08-18",
"videos": [
"http://thecolbertreport.cc.com/videos/237rh7/intro---8-18-11",
"http://thecolbertreport.cc.com/videos/oqd808/russia-s-james-bonds-vs--america-s-barack-obama",
"http://thecolbertreport.cc.com/videos/j31bbb/colbert-super-pac---parry-with-an-a-gate----day-6---we-may-have-did-it-",
"http://thecolbertreport.cc.com/videos/94c0x7/colbert-super-pac---parry-with-an-a-gate----day-6---woi-in-des-moines-reports",
"http://thecolbertreport.cc.com/videos/ger41z/anderson-cooper-s-kryptonite",
"http://thecolbertreport.cc.com/videos/1yhudu/kevin-mitnick",
"http://thecolbertreport.cc.com/videos/5r0lwc/sign-off---woi-in-des-moines"
],
"guest": "Kevin Mitnick"
},
{
"date": "2011-09-06",
"videos": [
"http://thecolbertreport.cc.com/videos/s3kv9p/michele-bachmann-s-natural-disaster-metaphor",
"http://thecolbertreport.cc.com/videos/fk34r7/the-word---happy-endings",
"http://thecolbertreport.cc.com/videos/ovw3t4/cheating-death---placebocisers---vaxamalgam",
"http://thecolbertreport.cc.com/videos/1cua0e/tim-pawlenty",
"http://thecolbertreport.cc.com/videos/d2roue/sign-off---placebocisers"
],
"guest": "Gov. Tim Pawlenty"
},
{
"date": "2011-09-07",
"videos": [
"http://thecolbertreport.cc.com/videos/1iqy2m/intro---9-7-11",
"http://thecolbertreport.cc.com/videos/nw0vtw/this-weak-in-national-secowardty",
"http://thecolbertreport.cc.com/videos/dhg1or/martin-luther-king-jr--memorial-paraphrase",
"http://thecolbertreport.cc.com/videos/796niz/parry-with-an-a-gate----day-26---update",
"http://thecolbertreport.cc.com/videos/h8ndj7/robin-wright",
"http://thecolbertreport.cc.com/videos/we0bnb/sign-off---stephen-uses-his-ipad"
],
"guest": "Robin B. Wright"
},
{
"date": "2011-09-08",
"videos": [
"http://thecolbertreport.cc.com/videos/6ut02o/republican-presidential-debate-media-coverage",
"http://thecolbertreport.cc.com/videos/0yghln/rick-perry-presents",
"http://thecolbertreport.cc.com/videos/pf00vn/barack-obama-s-jobs-speech",
"http://thecolbertreport.cc.com/videos/5x0a3c/tom-brokaw",
"http://thecolbertreport.cc.com/videos/lwsx3m/sign-off---old-milwaukee-beer"
],
"guest": "Tom Brokaw"
},
{
"date": "2011-09-12",
"videos": [
"http://thecolbertreport.cc.com/videos/3ooncl/tea-party-face-off-preview",
"http://thecolbertreport.cc.com/videos/4ig8mh/stephen-reports-on-an-old-fashioned-hero",
"http://thecolbertreport.cc.com/videos/eicjwv/shopping-griefportunities",
"http://thecolbertreport.cc.com/videos/sxy47f/diane-sawyer",
"http://thecolbertreport.cc.com/videos/g2jfq9/sign-off---stephen-s-mug"
],
"guest": "Diane Sawyer"
},
{
"date": "2011-09-13",
"videos": [
"http://thecolbertreport.cc.com/videos/bgo24q/intro---9-13-11",
"http://thecolbertreport.cc.com/videos/6jpgl3/cnn-tea-party-republican-debate",
"http://thecolbertreport.cc.com/videos/swyrcg/barack-obama-s-american-jobs-act",
"http://thecolbertreport.cc.com/videos/q1hw3n/barack-obama-s-american-jobs-act---paul-krugman",
"http://thecolbertreport.cc.com/videos/t7gpb8/ron-paul-2012",
"http://thecolbertreport.cc.com/videos/2cr39e/al-gore",
"http://thecolbertreport.cc.com/videos/e1gewo/sign-off----stephen-colbert-"
],
"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/return-to-sender---phil-rubio",
"http://thecolbertreport.cc.com/videos/gz48mn/rick-perry-s-hpv-vaccine-mandate",
"http://thecolbertreport.cc.com/videos/dx27ks/michael-moore",
"http://thecolbertreport.cc.com/videos/3rxw2x/sign-off---goodnight"
],
"guest": "Michael Moore"
},
{
"date": "2011-09-15",
"videos": [
"http://thecolbertreport.cc.com/videos/jgxmci/intro---9-15-11",
"http://thecolbertreport.cc.com/videos/rte3k7/take-a-billion--leave-a-billion",
"http://thecolbertreport.cc.com/videos/15vhbi/the-other-american-jobs-act",
"http://thecolbertreport.cc.com/videos/rje3k2/jimmy-fallon---stephen-reminisce",
"http://thecolbertreport.cc.com/videos/h90n13/fema-s-waffle-house-index",
"http://thecolbertreport.cc.com/videos/b406bd/david-copperfield",
"http://thecolbertreport.cc.com/videos/7m5lpn/sign-off---stephen-s-magic-trick"
],
"guest": "David Copperfield"
},
{
"date": "2011-09-20",
"videos": [
"http://thecolbertreport.cc.com/videos/tpoc1g/the-63rd-emmy-awards",
"http://thecolbertreport.cc.com/videos/whouap/barack-obama-unveils-the--buffett-rule-",
"http://thecolbertreport.cc.com/videos/pyq49u/the-word---death-and-taxes",
"http://thecolbertreport.cc.com/videos/3q875w/the-gayest-penetration",
"http://thecolbertreport.cc.com/videos/xnvm51/jeffrey-kluger",
"http://thecolbertreport.cc.com/videos/t0vjb4/sign-off---colbert-nation-s-newest-members"
],
"guest": "Jeffrey Kluger"
},
{
"date": "2011-09-21",
"videos": [
"http://thecolbertreport.cc.com/videos/hc8ova/intro---9-21-11",
"http://thecolbertreport.cc.com/videos/negwpt/coming-soon---hour-long-radiohead-special",
"http://thecolbertreport.cc.com/videos/kyxdz3/european-union-collapse---war-fueled-recovery",
"http://thecolbertreport.cc.com/videos/t51ow7/european-union-collapse---war-fueled-recovery---chrystia-freeland",
"http://thecolbertreport.cc.com/videos/wvyk91/wall-street-under-siege",
"http://thecolbertreport.cc.com/videos/z0celp/daniel-yergin",
"http://thecolbertreport.cc.com/videos/y9o1cm/sign-off---cigar"
],
"guest": "Daniel Yergin"
},
{
"date": "2011-09-22",
"videos": [
"http://thecolbertreport.cc.com/videos/9dc7h4/defunct-satellite-hurtles-toward-earth",
"http://thecolbertreport.cc.com/videos/szcqls/tip-wag---marine-corps---department-of-homeland-security",
"http://thecolbertreport.cc.com/videos/6uyhy5/obama-s-u-n--gaffes---rick-perry-s-support-for-israel",
"http://thecolbertreport.cc.com/videos/ncny69/jeremy-ben-ami",
"http://thecolbertreport.cc.com/videos/akoxfi/sign-off---the-beloved-dog-lives-on"
],
"guest": "Jeremy Ben-Ami"
},
{
"date": "2011-09-26",
"videos": [
"http://thecolbertreport.cc.com/videos/1w32i4/intro---9-26-11",
"http://thecolbertreport.cc.com/videos/p9c0ds/dr-pepper-presents-stephen-colbert-s-rocktember-with-radiohead",
"http://thecolbertreport.cc.com/videos/u4qbft/the-word---i-think--therefore-i-brand",
"http://thecolbertreport.cc.com/videos/grlcgn/radiohead",
"http://thecolbertreport.cc.com/videos/xqeu3w/ignoring-global-warming",
"http://thecolbertreport.cc.com/videos/wwvu7o/ignoring-global-warming---thom-yorke---ed-o-brien"
],
"guest": "Radiohead"
},
{
"date": "2011-09-27",
"videos": [
"http://thecolbertreport.cc.com/videos/9qb4vy/stephen---melinda-gates-foundation---donorschoose-org",
"http://thecolbertreport.cc.com/videos/tsm4sg/rick-perry-s-debate-gaffe---arizona-s-primary-date",
"http://thecolbertreport.cc.com/videos/5mvmay/sport-report---nascar-s-green-initiatives---nfl-pat-downs",
"http://thecolbertreport.cc.com/videos/ptxagr/melinda-gates",
"http://thecolbertreport.cc.com/videos/zlthc8/sign-off---beer-from-the-beerkenstocks"
],
"guest": "Melinda Gates"
},
{
"date": "2011-09-28",
"videos": [
"http://thecolbertreport.cc.com/videos/3qibl4/intro---9-28-11",
"http://thecolbertreport.cc.com/videos/udzuyb/george-clooney-s-villa-parties",
"http://thecolbertreport.cc.com/videos/tbuq71/the-word---labor-chains",
"http://thecolbertreport.cc.com/videos/3qmkez/atone-phone---john-lithgow-calls",
"http://thecolbertreport.cc.com/videos/ndmtp9/ken-burns",
"http://thecolbertreport.cc.com/videos/osmia6/sign-off---reading---shofar-playing"
],
"guest": "Ken Burns"
},
{
"date": "2011-09-29",
"videos": [
"http://thecolbertreport.cc.com/videos/0agwtq/mark-cuban-dances",
"http://thecolbertreport.cc.com/videos/ivvzeu/colbert-super-pac---ham-rove-s-secrets",
"http://thecolbertreport.cc.com/videos/3yzu4u/colbert-super-pac---trevor-potter---stephen-s-shell-corporation",
"http://thecolbertreport.cc.com/videos/ujyuht/colbert-super-pac-shh----the-donating-game",
"http://thecolbertreport.cc.com/videos/qiwg3k/mark-cuban",
"http://thecolbertreport.cc.com/videos/8ekdsc/sign-off---last-heroe--crawl"
],
"guest": "Mark Cuban"
},
{
"date": "2011-10-03",
"videos": [
"http://thecolbertreport.cc.com/videos/fehwjq/rick-perry-s-questionably-named-hunting-camp",
"http://thecolbertreport.cc.com/videos/m272fc/supreme-courting-season",
"http://thecolbertreport.cc.com/videos/v2njjc/supreme-courting-season---jeffrey-toobin",
"http://thecolbertreport.cc.com/videos/25ffk2/threatdown---bears-in-rehab--bear-terminators---sanctimonious-enviro-bears",
"http://thecolbertreport.cc.com/videos/wmazj5/jerome-groopman",
"http://thecolbertreport.cc.com/videos/kp6658/sign-off---stephen-s-water-bottle"
],
"guest": "Jerome Groopman"
},
{
"date": "2011-10-04",
"videos": [
"http://thecolbertreport.cc.com/videos/wy82eg/intro---10-4-11",
"http://thecolbertreport.cc.com/videos/3wq74s/chris-christie-2012",
"http://thecolbertreport.cc.com/videos/3dpzet/chris-christie-2012---rick-davis",
"http://thecolbertreport.cc.com/videos/cwuy2m/bocephus-s-eternal-question",
"http://thecolbertreport.cc.com/videos/xhc68w/john-lithgow",
"http://thecolbertreport.cc.com/videos/n16lxn/sign-off---formula-401-rumors"
],
"guest": "John Lithgow"
},
{
"date": "2011-10-05",
"videos": [
"http://thecolbertreport.cc.com/videos/0vn7mh/intro---10-5-11",
"http://thecolbertreport.cc.com/videos/xnxfq5/herman-cain-2012",
"http://thecolbertreport.cc.com/videos/dbbjic/herman-cain-2012---gay-choice",
"http://thecolbertreport.cc.com/videos/6kkk93/tip-wag---mexico-city-marriage-licenses---modern-warfare-3-s-xp-promotion",
"http://thecolbertreport.cc.com/videos/ifegp7/talib-kweli---yasiin-bey--a-k-a--mos-def-",
"http://thecolbertreport.cc.com/videos/7edjef/sign-off---iphone-goodnight"
],
"guest": "Mos Def & Talib Kweli"
},
{
"date": "2011-10-06",
"videos": [
"http://thecolbertreport.cc.com/videos/0qyxlz/colbert-super-pac-ad---foul-balls",
"http://thecolbertreport.cc.com/videos/fri8e1/intro---10-6-11",
"http://thecolbertreport.cc.com/videos/z103m6/sarah-palin-s-sad-news",
"http://thecolbertreport.cc.com/videos/yarfv2/colbert-super-pac-shh----apology-to-ham-rove",
"http://thecolbertreport.cc.com/videos/fottda/tribute-to-steve-jobs",
"http://thecolbertreport.cc.com/videos/98xl59/jason-amerine",
"http://thecolbertreport.cc.com/videos/oy1k9u/sign-off---goodnight"
],
"guest": "Jason Amerine"
},
{
"date": "2011-10-17",
"videos": [
"http://thecolbertreport.cc.com/videos/nng5h7/exclusive---harry-belafonte-extended-interview",
"http://thecolbertreport.cc.com/videos/gj3y6l/occupy-wall-street-spreads",
"http://thecolbertreport.cc.com/videos/z27tp0/the-word---look-out-for-the-little-guy",
"http://thecolbertreport.cc.com/videos/6vl2zq/sport-report---nba-lockout---colbert-super-pac-ad",
"http://thecolbertreport.cc.com/videos/01fxlb/harry-belafonte",
"http://thecolbertreport.cc.com/videos/s0qu24/sign-off---goodnight"
],
"guest": "Harry Belafonte"
},
{
"date": "2011-10-18",
"videos": [
"http://thecolbertreport.cc.com/videos/h40j2n/talking-iphone-4s",
"http://thecolbertreport.cc.com/videos/ta7e7u/herman-cain-s-electrified-fence",
"http://thecolbertreport.cc.com/videos/cbwqbb/thought-for-food---school-potato-guidelines---fast-food-stamps",
"http://thecolbertreport.cc.com/videos/3h8h2l/steven-pinker",
"http://thecolbertreport.cc.com/videos/9c1bsf/sign-off---sixth-anniversary-portrait"
],
"guest": "Steven Pinker"
},
{
"date": "2011-10-19",
"videos": [
"http://thecolbertreport.cc.com/videos/iirczx/intro---10-19-11",
"http://thecolbertreport.cc.com/videos/gghhza/herman-cain-canes-the-unemployed",
"http://thecolbertreport.cc.com/videos/ubi151/job-killing-epa",
"http://thecolbertreport.cc.com/videos/zi48pt/job-killing-epa---carol-browner",
"http://thecolbertreport.cc.com/videos/f49qpp/rush-limbaugh-s-l-r-a--research",
"http://thecolbertreport.cc.com/videos/fztuzs/ali-soufan",
"http://thecolbertreport.cc.com/videos/kodm5a/sign-off---laptop-music"
],
"guest": "Ali Soufan"
},
{
"date": "2011-10-20",
"videos": [
"http://thecolbertreport.cc.com/videos/n73wq4/intro---10-20-11",
"http://thecolbertreport.cc.com/videos/5p2a33/goodbye--muammar-al-gaddafi",
"http://thecolbertreport.cc.com/videos/5xgc3k/tip-wag---tea-party-nation-pledge---spirit-airlines--ad-revenue",
"http://thecolbertreport.cc.com/videos/ql433h/bill-o-reilly-s--pinheads---patriots-",
"http://thecolbertreport.cc.com/videos/qw2pao/chris-martin"
],
"guest": "Coldplay"
},
{
"date": "2011-10-24",
"videos": [
"http://thecolbertreport.cc.com/videos/x027jm/exclusive---colbert-super-pac---frank-luntz---stephen-knows-his-classic-rock",
"http://thecolbertreport.cc.com/videos/f8t1zf/america-s-top-mormons---jon-huntsman",
"http://thecolbertreport.cc.com/videos/45wqla/colbert-super-pac----corporations-are-people-",
"http://thecolbertreport.cc.com/videos/6s8sdq/colbert-super-pac----corporations-are-people----frank-luntz",
"http://thecolbertreport.cc.com/videos/5jjhhv/colbert-super-pac----corporations-are-people----frank-luntz-s-focus-group",
"http://thecolbertreport.cc.com/videos/541ucf/jon-huntsman",
"http://thecolbertreport.cc.com/videos/53t2yg/sign-off---goodnight"
],
"guest": "Jon Huntsman"
},
{
"date": "2011-10-25",
"videos": [
"http://thecolbertreport.cc.com/videos/s25oo4/intro---10-25-11",
"http://thecolbertreport.cc.com/videos/darfes/steve-jobs--biography",
"http://thecolbertreport.cc.com/videos/3uz7qn/herman-cain-s-campaign-ad",
"http://thecolbertreport.cc.com/videos/n2dzu0/flogging-the-americone-dream",
"http://thecolbertreport.cc.com/videos/wsqtx0/susan-saladoff",
"http://thecolbertreport.cc.com/videos/89ebii/sign-off---enjoying-americone-dream"
],
"guest": "Susan Saladoff"
},
{
"date": "2011-10-26",
"videos": [
"http://thecolbertreport.cc.com/videos/lj5z4k/colbert-super-pac-ad---ball-gag",
"http://thecolbertreport.cc.com/videos/xlwljf/exclusive---hey--remember-this--alabama-",
"http://thecolbertreport.cc.com/videos/fa0w0c/intro---10-26-11",
"http://thecolbertreport.cc.com/videos/zwe40u/whales-aren-t-people",
"http://thecolbertreport.cc.com/videos/7rtf6k/alabama-s-migrant-workers",
"http://thecolbertreport.cc.com/videos/dcq3ky/war-on-halloween---costume-swapping---jesus-ween",
"http://thecolbertreport.cc.com/videos/sqeewv/taylor-branch",
"http://thecolbertreport.cc.com/videos/6twlww/sign-off---don-t-buy-these-books"
],
"guest": "Taylor Branch"
},
{
"date": "2011-10-27",
"videos": [
"http://thecolbertreport.cc.com/videos/hfaq0j/intro---10-27-11",
"http://thecolbertreport.cc.com/videos/gmesd4/shockupy-wall-street-fad",
"http://thecolbertreport.cc.com/videos/xhn542/sport-report---nfl-fines---colbert-super-pac-s-second-nba-lockout-ad",
"http://thecolbertreport.cc.com/videos/s2ax4o/toby-keith"
],
"guest": "Toby Keith"
},
{
"date": "2011-10-31",
"videos": [
"http://thecolbertreport.cc.com/videos/l7lj84/sexy-costume-discrimination",
"http://thecolbertreport.cc.com/videos/0svkvx/colbert-super-pac---occupy-wall-street-co-optportunity",
"http://thecolbertreport.cc.com/videos/d4hmi3/colbert-super-pac---stephen-colbert-occupies-occupy-wall-street-pt--1",
"http://thecolbertreport.cc.com/videos/4tqlz9/tip-wag---gun-freedom---healthcare-bartering",
"http://thecolbertreport.cc.com/videos/n0jrmj/neil-macgregor",
"http://thecolbertreport.cc.com/videos/tyvfoe/sign-off---goodnight"
],
"guest": "Neil MacGregor"
},
{
"date": "2011-11-01",
"videos": [
"http://thecolbertreport.cc.com/videos/9346zn/intro---11-1-11",
"http://thecolbertreport.cc.com/videos/ysh9bq/herman-cain-under-attack",
"http://thecolbertreport.cc.com/videos/hqjgoz/colbert-super-pac---stephen-colbert-occupies-occupy-wall-street-pt--2",
"http://thecolbertreport.cc.com/videos/yo2avl/yo-yo-ma--stuart-duncan--edgar-meyer---chris-thile",
"http://thecolbertreport.cc.com/videos/pez22q/sign-off---goodnight"
],
"guest": "Yo-Yo Ma"
},
{
"date": "2011-11-02",
"videos": [
"http://thecolbertreport.cc.com/videos/394xx1/intro---11-2-11",
"http://thecolbertreport.cc.com/videos/n3ifbc/herman-cain-s-international-affairs",
"http://thecolbertreport.cc.com/videos/icx1x6/the-word---bite-the-hand-that-feeds-you",
"http://thecolbertreport.cc.com/videos/6dlo6v/muffingate",
"http://thecolbertreport.cc.com/videos/6jv4ha/michael-pollan",
"http://thecolbertreport.cc.com/videos/c8yk04/sign-off---white-castle---beer"
],
"guest": "Michael Pollan"
},
{
"date": "2011-11-03",
"videos": [
"http://thecolbertreport.cc.com/videos/db8sp6/intro---11-3-11",
"http://thecolbertreport.cc.com/videos/tvwydl/ghost-sex",
"http://thecolbertreport.cc.com/videos/gxg7x0/european-investment-prospectus",
"http://thecolbertreport.cc.com/videos/2nhcbh/colbert-super-pac---herman-cain-s-fundraising---rush-limbaugh-s-stereotypes",
"http://thecolbertreport.cc.com/videos/rwwdgv/nathan-wolfe",
"http://thecolbertreport.cc.com/videos/g7b66l/sign-off---purell"
],
"guest": "Nathan Wolfe"
},
{
"date": "2011-11-07",
"videos": [
"http://thecolbertreport.cc.com/videos/px6doe/colbert-super-pac---issue-ads",
"http://thecolbertreport.cc.com/videos/otywae/colbert-super-pac---issue-ads---trevor-potter",
"http://thecolbertreport.cc.com/videos/6nuhjw/blood-in-the-water---larry-taylor-s-anti-semitic-slur",
"http://thecolbertreport.cc.com/videos/xisem8/niall-ferguson",
"http://thecolbertreport.cc.com/videos/e9gc1y/sign-off---goodnight"
],
"guest": "Niall Ferguson"
},
{
"date": "2011-11-08",
"videos": [
"http://thecolbertreport.cc.com/videos/m4n0nh/herman-cain-won-t-be-stopped",
"http://thecolbertreport.cc.com/videos/yk540u/colbert-platinum---wealth-under-siege",
"http://thecolbertreport.cc.com/videos/3krrxg/the-blitzkrieg-on-grinchitude---fired-santa-claus---colbert-super-pac-christmas",
"http://thecolbertreport.cc.com/videos/s4sqap/seth-meyers",
"http://thecolbertreport.cc.com/videos/fz9les/sign-off---custom-escape-yacht"
],
"guest": "Seth Meyers"
},
{
"date": "2011-11-09",
"videos": [
"http://thecolbertreport.cc.com/videos/qc00ca/intro---11-9-11",
"http://thecolbertreport.cc.com/videos/gs7ppt/herman-cain-s-democrat-conspiracy",
"http://thecolbertreport.cc.com/videos/e94bhi/the-word---bully-pulpit",
"http://thecolbertreport.cc.com/videos/v1f4n3/americone-dream-of-the-future",
"http://thecolbertreport.cc.com/videos/3k5pcf/james-martin",
"http://thecolbertreport.cc.com/videos/9mrd4k/sign-off---feeding-jimmy-fallon-s-portrait"
],
"guest": "Father Jim Martin"
},
{
"date": "2011-11-10",
"videos": [
"http://thecolbertreport.cc.com/videos/qfc9xd/shock---aussie",
"http://thecolbertreport.cc.com/videos/pg0q9t/rick-perry-s-sorry--oops",
"http://thecolbertreport.cc.com/videos/g1tcu5/occupy-u-c--berkeley",
"http://thecolbertreport.cc.com/videos/4vt0hx/brian-eno"
],
"guest": "Brian Eno"
},
{
"date": "2011-11-14",
"videos": [
"http://thecolbertreport.cc.com/videos/ufww4s/intro---11-14-11",
"http://thecolbertreport.cc.com/videos/3zodum/cbs-snubs-michele-bachmann",
"http://thecolbertreport.cc.com/videos/5vb30b/keystone-xl-oil-pipeline---bill-mckibben",
"http://thecolbertreport.cc.com/videos/hu2y6t/vodka-tampons",
"http://thecolbertreport.cc.com/videos/uoo5c0/thomas-thwaites",
"http://thecolbertreport.cc.com/videos/9x16t1/sign-off---leaf-blower"
],
"guest": "Thomas Thwaites"
},
{
"date": "2011-11-15",
"videos": [
"http://thecolbertreport.cc.com/videos/c73ioe/occupy-wall-street-decamped",
"http://thecolbertreport.cc.com/videos/qzjgvi/difference-makers---jimmy-justice",
"http://thecolbertreport.cc.com/videos/ufsd5o/bears---balls---celebrity-relics---gooooooold-",
"http://thecolbertreport.cc.com/videos/f1tu06/elijah-wood",
"http://thecolbertreport.cc.com/videos/0vuu1j/sign-off---one-ring"
],
"guest": "Elijah Wood"
},
{
"date": "2011-11-16",
"videos": [
"http://thecolbertreport.cc.com/videos/znljdd/intro---11-16-11",
"http://thecolbertreport.cc.com/videos/ukaw6z/newt-gingrich-s-greek-cruise",
"http://thecolbertreport.cc.com/videos/6dwdiy/tip-wag---pin-ups-for-ron-paul--movie-torture-tactics---offensive-merchandise",
"http://thecolbertreport.cc.com/videos/z9qeks/elderly-occupier-pepper-sprayed",
"http://thecolbertreport.cc.com/videos/94gywl/chris-matthews",
"http://thecolbertreport.cc.com/videos/aekw8v/colbert-report-bedtime-stories---dragon---wizard"
],
"guest": "Chris Matthews"
},
{
"date": "2011-11-17",
"videos": [
"http://thecolbertreport.cc.com/videos/hnwps8/intro---11-17-11",
"http://thecolbertreport.cc.com/videos/41apq9/people-magazine-s-sexiest-man-alive-2011",
"http://thecolbertreport.cc.com/videos/wdsxo5/the-word---the-1-",
"http://thecolbertreport.cc.com/videos/h76098/thought-for-food---pushy-pops",
"http://thecolbertreport.cc.com/videos/y88hzi/susan-orlean",
"http://thecolbertreport.cc.com/videos/8d1q2a/sign-off---shout-out-to-the-black-belles"
],
"guest": "Susan Orlean"
},
{
"date": "2011-11-28",
"videos": [
"http://thecolbertreport.cc.com/videos/no4xhk/intro---11-28-11",
"http://thecolbertreport.cc.com/videos/58ikdq/violent-black-friday",
"http://thecolbertreport.cc.com/videos/h84vbf/tip-wag---barack-obama-s-omission--mitt-romney-s-ad---lululemon-s-tagline",
"http://thecolbertreport.cc.com/videos/qggo98/stephen-colbert-s-mereporters",
"http://thecolbertreport.cc.com/videos/ut1g77/siddhartha-mukherjee",
"http://thecolbertreport.cc.com/videos/np8x21/sign-off---macbook"
],
"guest": "Siddhartha Mukherjee"
},
{
"date": "2011-11-29",
"videos": [
"http://thecolbertreport.cc.com/videos/92ekqe/intro---11-29-11",
"http://thecolbertreport.cc.com/videos/fafzt9/he-said--she-said--she-said--she-said--she-said--she-was-paid-not-to-say",
"http://thecolbertreport.cc.com/videos/r8p3nn/yahweh-or-no-way---altered-catholic-mass--papal-seat-belt---offensive-vodka-ad",
"http://thecolbertreport.cc.com/videos/4dohxr/tinariwen-with-kyp-malone---tunde-adebimpe",
"http://thecolbertreport.cc.com/videos/9nbfru/sign-off---tinariwen--album"
],
"guest": "Tinariwen"
},
{
"date": "2011-11-30",
"videos": [
"http://thecolbertreport.cc.com/videos/fc3loc/newt-gingrich-denies-lobbying",
"http://thecolbertreport.cc.com/videos/akure9/barney-frank-s-retirement",
"http://thecolbertreport.cc.com/videos/d0x6zg/better-know-a-district---massachusetts--4th---barney-frank-update",
"http://thecolbertreport.cc.com/videos/j1oeb0/conservative-siri",
"http://thecolbertreport.cc.com/videos/okgz78/stephen-sondheim",
"http://thecolbertreport.cc.com/videos/ga76kd/sign-off---goodnight"
],
"guest": "Stephen Sondheim"
},
{
"date": "2011-12-01",
"videos": [
"http://thecolbertreport.cc.com/videos/eclhxy/in-herman-cain-s-defense",
"http://thecolbertreport.cc.com/videos/70sj7m/stop-online-piracy-act",
"http://thecolbertreport.cc.com/videos/nmrgz9/stop-online-piracy-act---danny-goldberg---jonathan-zittrain",
"http://thecolbertreport.cc.com/videos/pzi69s/mitt-romney-gets-testy",
"http://thecolbertreport.cc.com/videos/pmypbg/richard-branson",
"http://thecolbertreport.cc.com/videos/rhwqc7/sign-off---fire-extinguishing-powder"
],
"guest": "Richard Branson"
},
{
"date": "2011-12-05",
"videos": [
"http://thecolbertreport.cc.com/videos/yy5x27/2011-kennedy-center-honors",
"http://thecolbertreport.cc.com/videos/xn3r3g/mysteries-of-the-ancient-unknown---2012-end-of-times",
"http://thecolbertreport.cc.com/videos/f2zdhx/herman-cain-drops-out",
"http://thecolbertreport.cc.com/videos/dt8216/jimmie-johnson",
"http://thecolbertreport.cc.com/videos/0ewfq6/sign-off---slow-motion-race-replay"
],
"guest": "Jimmie Johnson"
},
{
"date": "2011-12-06",
"videos": [
"http://thecolbertreport.cc.com/videos/1o3huj/american-drone-in-iran",
"http://thecolbertreport.cc.com/videos/fcu2h2/donald-s-trumptacular---stephen-s-south-carolina-serious--classy-republican-debate",
"http://thecolbertreport.cc.com/videos/dphj6u/the-black-keys",
"http://thecolbertreport.cc.com/videos/4t05a5/sign-off---glenn-eichler-s-graphic-novel"
],
"guest": "The Black Keys"
},
{
"date": "2011-12-07",
"videos": [
"http://thecolbertreport.cc.com/videos/5kfnqe/stephen-colbert-s-south-carolina-serious--classy-republican-debate---save-the-date",
"http://thecolbertreport.cc.com/videos/h7qfup/colbert-super-pac---stephen-s-south-carolina-referendum",
"http://thecolbertreport.cc.com/videos/6dds1t/colbert-super-pac---stephen-s-south-carolina-referendum---dick-harpootlian",
"http://thecolbertreport.cc.com/videos/c66w64/jon-huntsman-sr--s-ad-buy",
"http://thecolbertreport.cc.com/videos/pueyvf/david-hallberg"
],
"guest": "David Hallberg"
},
{
"date": "2011-12-08",
"videos": [
"http://thecolbertreport.cc.com/videos/08g4y6/intro---12-8-11",
"http://thecolbertreport.cc.com/videos/sd4lua/michigan-s-snow-cone-machines",
"http://thecolbertreport.cc.com/videos/lbdchz/cheating-death---chicken-pox-lollipops---fecal-transplants",
"http://thecolbertreport.cc.com/videos/3d10i3/rick-perry-s-pro-christmas-ad",
"http://thecolbertreport.cc.com/videos/ovws10/jack-abramoff",
"http://thecolbertreport.cc.com/videos/gt2hau/sign-off---goodnight"
],
"guest": "Jack Abramoff"
},
{
"date": "2011-12-12",
"videos": [
"http://thecolbertreport.cc.com/videos/iu3gnx/intro---12-12-11",
"http://thecolbertreport.cc.com/videos/52a05g/christmas-cram",
"http://thecolbertreport.cc.com/videos/zuufyt/tip-wag---liberal-dictionary---newt-gingrich-alert",
"http://thecolbertreport.cc.com/videos/qv9fb0/norway-s-butter-shortage",
"http://thecolbertreport.cc.com/videos/kx2u80/samuel-l--jackson",
"http://thecolbertreport.cc.com/videos/v6sdfa/sign-off---merry-christmas"
],
"guest": "Samuel L. Jackson"
},
{
"date": "2011-12-13",
"videos": [
"http://thecolbertreport.cc.com/videos/rwb03h/intro---12-13-11",
"http://thecolbertreport.cc.com/videos/7zgxss/trump-s-cancellation---stephen-s-south-carolina-serious--classy-re-announcement",
"http://thecolbertreport.cc.com/videos/frhjj0/the-word---let-them-buy-cake",
"http://thecolbertreport.cc.com/videos/flxy99/anderson-cooper-s-phallus-party-accusation",
"http://thecolbertreport.cc.com/videos/sn7cpj/mark-whitaker",
"http://thecolbertreport.cc.com/videos/eswjdg/sign-off---goodnight"
],
"guest": "Mark Whitaker"
},
{
"date": "2011-12-14",
"videos": [
"http://thecolbertreport.cc.com/videos/18wgz1/stephen-colbert-s-south-carolina-serious--classy-debate---nat-geo-wild-s-response",
"http://thecolbertreport.cc.com/videos/khf3hx/christine-o-donnell-s-endorsement",
"http://thecolbertreport.cc.com/videos/vg9vdy/stephen-colbert-s-big-gay-roundup---military-bestiality---homosexual-penguins",
"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/stephen-colbert-s-south-carolina-serious--classy-republican-debate---network-battle",
"http://thecolbertreport.cc.com/videos/dwccb9/the-blitzkrieg-on-grinchitude---department-store-cutbacks---gun-filled-christmas",
"http://thecolbertreport.cc.com/videos/9ugow2/fox-news--mitt-romney-photo-flub",
"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/iowa-caucus---caucus-goer-s-choice",
"http://thecolbertreport.cc.com/videos/5mqn59/iowa-caucus---megyn-shelly-s-prediction",
"http://thecolbertreport.cc.com/videos/qx2w8n/kim-jong-il---in-memoriam",
"http://thecolbertreport.cc.com/videos/ioguwl/bernie-sanders",
"http://thecolbertreport.cc.com/videos/4ob0g2/sign-off---megyn-shelly"
],
"guest": "Sen. Bernie Sanders"
},
{
"date": "2012-01-04",
"videos": [
"http://thecolbertreport.cc.com/videos/s8am6m/iowa-caucus---mitt-romney-s-victory-speech---rick-santorum-s-coup",
"http://thecolbertreport.cc.com/videos/m762nz/iowa-caucus---not-mitt-romney-s-super-pac",
"http://thecolbertreport.cc.com/videos/x195wh/iowa-caucus---cable-news-coverage",
"http://thecolbertreport.cc.com/videos/61k2nf/iowa-caucus---woi-in-des-moines-reports",
"http://thecolbertreport.cc.com/videos/1ja4vs/john-heilemann",
"http://thecolbertreport.cc.com/videos/xyq4st/sign-off---erin-burnett-pong"
],
"guest": "John Heilemann"
},
{
"date": "2012-01-05",
"videos": [
"http://thecolbertreport.cc.com/videos/8t37qs/intro---1-5-12",
"http://thecolbertreport.cc.com/videos/js72my/fun-rick-santorum",
"http://thecolbertreport.cc.com/videos/5xw4yi/the-word---catch-2012",
"http://thecolbertreport.cc.com/videos/sjbolu/god-s-message-to-pat-robertson",
"http://thecolbertreport.cc.com/videos/lgtesz/steve-case",
"http://thecolbertreport.cc.com/videos/o6dbzj/sign-off---mayan-headwear---sacrificial-chicken"
],
"guest": "Steve Case"
},
{
"date": "2012-01-09",
"videos": [
"http://thecolbertreport.cc.com/videos/y3wl1i/intro---1-9-12",
"http://thecolbertreport.cc.com/videos/3m6txc/new-hampshire-gop-debates",
"http://thecolbertreport.cc.com/videos/l08ywe/new-hampshire-gop-debates---moderate-extremes",
"http://thecolbertreport.cc.com/videos/75c0w9/rick-santorum-on-gay-parents---bla-people",
"http://thecolbertreport.cc.com/videos/e3zsob/melissa-harris-perry",
"http://thecolbertreport.cc.com/videos/j2sskk/sign-off---jack-daniels"
],
"guest": "Neil Shubin"
},
{
"date": "2012-01-10",
"videos": [
"http://thecolbertreport.cc.com/videos/9llvcg/new-hampshire-primary---mitt-romney-s-gaffe",
"http://thecolbertreport.cc.com/videos/m98f4t/tip-wag---irresponsible-dead-people---insensitive-papa-john-s",
"http://thecolbertreport.cc.com/videos/wwvi39/malice-in-blunderland",
"http://thecolbertreport.cc.com/videos/fqk2fh/bill-moyers",
"http://thecolbertreport.cc.com/videos/wdmkv8/sign-off---turntable"
],
"guest": "Ben Gibbard"
},
{
"date": "2012-01-11",
"videos": [
"http://thecolbertreport.cc.com/videos/bxzp6z/intro---1-11-12",
"http://thecolbertreport.cc.com/videos/f8j0ng/commitment-to-mitt-romney",
"http://thecolbertreport.cc.com/videos/7t7ct3/south-carolina-s-fresh-face",
"http://thecolbertreport.cc.com/videos/73ux63/stephen-colbert-s-end-of-the-world-of-the-week---phobos-grunt",
"http://thecolbertreport.cc.com/videos/wx04iy/george-stephanopoulos",
"http://thecolbertreport.cc.com/videos/vjhrm3/sign-off---decision-of-a-lifetime"
],
"guest": "George Stephanopoulos"
},
{
"date": "2012-01-12",
"videos": [
"http://thecolbertreport.cc.com/videos/hrwtsb/colbert-super-pac---coordination-problem",
"http://thecolbertreport.cc.com/videos/av6bvx/colbert-super-pac---coordination-resolution-with-jon-stewart",
"http://thecolbertreport.cc.com/videos/5otlsk/mike-d-s-hip-hop-semantics",
"http://thecolbertreport.cc.com/videos/ui35sv/mike-allen",
"http://thecolbertreport.cc.com/videos/mnp9up/sign-off---ipad-ebook"
],
"guest": "Mike Allen"
},
{
"date": "2012-01-16",
"videos": [
"http://thecolbertreport.cc.com/videos/dyktip/colbert-super-pac-ad---not-abel",
"http://thecolbertreport.cc.com/videos/lec1ln/intro---1-16-12",
"http://thecolbertreport.cc.com/videos/ke9tkw/jon-huntsman-out--rick-santorum-in",
"http://thecolbertreport.cc.com/videos/buf78z/colbert-super-pac---mitt-romney-attack-ad",
"http://thecolbertreport.cc.com/videos/uh4wcy/the-word---raise-cain",
"http://thecolbertreport.cc.com/videos/cgtb89/scott-douglas",
"http://thecolbertreport.cc.com/videos/td091t/sign-off----this-is-herman-cain--"
],
"guest": "Rev. Scott Douglas"
},
{
"date": "2012-01-17",
"videos": [
"http://thecolbertreport.cc.com/videos/knvkbe/colbert-super-pac-ad---double-negative",
"http://thecolbertreport.cc.com/videos/fe4nep/intro---1-17-12",
"http://thecolbertreport.cc.com/videos/ufvy9m/colbert-super-pac---gop-attack-ads---herman-cain-ad",
"http://thecolbertreport.cc.com/videos/qil57h/yahweh-or-no-way---online-christian-dating---seven-days-of-sex",
"http://thecolbertreport.cc.com/videos/0alvjc/jennifer-granholm",
"http://thecolbertreport.cc.com/videos/mbnjnn/sign-off---vote-for-herman-cain"
],
"guest": "Jennifer Granholm"
},
{
"date": "2012-01-18",
"videos": [
"http://thecolbertreport.cc.com/videos/bpbhtr/colbert-super-pac-ad---modern-stage-combat",
"http://thecolbertreport.cc.com/videos/2f7upq/intro---1-18-12",
"http://thecolbertreport.cc.com/videos/q6xocp/newt-gingrich-s-performance---mitt-romney-s-tax-returns",
"http://thecolbertreport.cc.com/videos/fx3xum/stephen-s-approval-rating",
"http://thecolbertreport.cc.com/videos/zvmmfs/colbert-super-pac---civility-ad---stephen-s-south-carolina-rally",
"http://thecolbertreport.cc.com/videos/orzoc4/sopa---pipa",
"http://thecolbertreport.cc.com/videos/i8qam3/david-frum",
"http://thecolbertreport.cc.com/videos/3mfkme/sign-off---south-carolina-rally-with-herman-cain"
],
"guest": "David Frum"
},
{
"date": "2012-01-19",
"videos": [
"http://thecolbertreport.cc.com/videos/pebyno/troubled-gop-waters---stephen-under-attack",
"http://thecolbertreport.cc.com/videos/7qvxgu/colbert-super-pac---john-paul-stevens",
"http://thecolbertreport.cc.com/videos/k3pbui/carrie-rebora-barratt",
"http://thecolbertreport.cc.com/videos/nno4x3/sign-off---flight-to-charleston--sc"
],
"guest": "Carrie Rebora Barratt"
},
{
"date": "2012-01-23",
"videos": [
"http://thecolbertreport.cc.com/videos/kachyg/intro---1-23-12",
"http://thecolbertreport.cc.com/videos/iql42n/newt-gingrich-s-south-carolina-kill",
"http://thecolbertreport.cc.com/videos/50z46i/herman-cain-s-bittersweet-south-carolina-victory",
"http://thecolbertreport.cc.com/videos/e3y9nd/rock-me-like-a-herman-cain-south-cain-olina-primary-rally---cain-elot-revisited",
"http://thecolbertreport.cc.com/videos/vim94y/bruce-bueno-de-mesquita",
"http://thecolbertreport.cc.com/videos/gu52h0/sign-off---sniffing-a-marker"
],
"guest": "Bruce Bueno De Mesquita"
},
{
"date": "2012-01-24",
"videos": [
"http://thecolbertreport.cc.com/videos/n2rnnr/exclusive---rock-me-like-a-herman-cain-south-cain-olina-primary-rally-pt--1",
"http://thecolbertreport.cc.com/videos/jc76hc/exclusive---rock-me-like-a-herman-cain-south-cain-olina-primary-rally-pt--2",
"http://thecolbertreport.cc.com/videos/jog4lt/intro---1-24-12",
"http://thecolbertreport.cc.com/videos/q3ro37/colbert-super-pac---hostage-crisis---day-2",
"http://thecolbertreport.cc.com/videos/zop8mz/18th-gop-debate",
"http://thecolbertreport.cc.com/videos/gzi3ec/grim-colberty-tales-with-maurice-sendak-pt--1",
"http://thecolbertreport.cc.com/videos/kg7hw1/rick-santorum-s-senior-pandering",
"http://thecolbertreport.cc.com/videos/381zai/andrew-sullivan",
"http://thecolbertreport.cc.com/videos/14903e/sign-off---reading--bumble-ardy-"
],
"guest": "Andrew Sullivan"
},
{
"date": "2012-01-25",
"videos": [
"http://thecolbertreport.cc.com/videos/9f0foj/2012-state-of-the-union-address---gop-rebuttals",
"http://thecolbertreport.cc.com/videos/2uwi0i/grim-colberty-tales-with-maurice-sendak-pt--2",
"http://thecolbertreport.cc.com/videos/3un4zv/un-american-news---china-edition",
"http://thecolbertreport.cc.com/videos/kwuhk6/terry-gross",
"http://thecolbertreport.cc.com/videos/r2j6o1/sign-off---colonel-tuxedo-s-cat-food"
],
"guest": "Terry Gross"
},
{
"date": "2012-01-26",
"videos": [
"http://thecolbertreport.cc.com/videos/05qh1w/colbert-super-pac---hostage-crisis---day-4",
"http://thecolbertreport.cc.com/videos/5gcr8j/mitt-romney---newt-gingrich-in-florida",
"http://thecolbertreport.cc.com/videos/pudtpb/sean-hannity-s--the-great-american-panel-",
"http://thecolbertreport.cc.com/videos/y191mp/the-great-available-panel",
"http://thecolbertreport.cc.com/videos/sg6jkh/drew-barrymore",
"http://thecolbertreport.cc.com/videos/kk56ka/sign-off---football-throwing"
],
"guest": "Drew Barrymore"
},
{
"date": "2012-01-30",
"videos": [
"http://thecolbertreport.cc.com/videos/rcm539/colbert-super-pac---the-great-chase",
"http://thecolbertreport.cc.com/videos/1ws9v2/colbert-super-pac---return-of-the-pac",
"http://thecolbertreport.cc.com/videos/n3pkmh/threatdown---barack-obama--fundamentalist-flippers---coked-up-diplomats",
"http://thecolbertreport.cc.com/videos/tlfrhi/gop---the-hispanic-vote",
"http://thecolbertreport.cc.com/videos/amck6x/laurence-tribe",
"http://thecolbertreport.cc.com/videos/v9f5m2/sign-off---shouting-goodnight"
],
"guest": "Laurence H. Tribe"
},
{
"date": "2012-01-31",
"videos": [
"http://thecolbertreport.cc.com/videos/62pas5/intro---1-31-12",
"http://thecolbertreport.cc.com/videos/f44hch/newt-gingrich-s-supporters",
"http://thecolbertreport.cc.com/videos/udnnzi/the-word---american-history-x-d",
"http://thecolbertreport.cc.com/videos/qs311n/bjork",
"http://thecolbertreport.cc.com/videos/u7u9lh/sign-off----biophilia-"
],
"guest": "Bjork"
},
{
"date": "2012-02-01",
"videos": [
"http://thecolbertreport.cc.com/videos/yk5cpe/intro---2-1-12",
"http://thecolbertreport.cc.com/videos/o3p6c2/black-history-celebration-moment",
"http://thecolbertreport.cc.com/videos/3nohh2/mitt-romney-s-florida-victory",
"http://thecolbertreport.cc.com/videos/uswa0x/colbert-super-pac---americone-dream-super-pack",
"http://thecolbertreport.cc.com/videos/kqctrf/ameena-matthews",
"http://thecolbertreport.cc.com/videos/5m98im/sign-off---americone-dream-super-pack"
],
"guest": "Ameena Matthews"
},
{
"date": "2012-02-02",
"videos": [
"http://thecolbertreport.cc.com/videos/4dia59/intro---2-2-12",
"http://thecolbertreport.cc.com/videos/uu5zmj/the-meaning-of-groundhog-day",
"http://thecolbertreport.cc.com/videos/bwbr2v/america-s-biggest-super-pac-donors",
"http://thecolbertreport.cc.com/videos/lh3kq3/colbert-super-pac---thank-you",
"http://thecolbertreport.cc.com/videos/04ottd/survivor-sues-newt-gingrich---dave-bickler",
"http://thecolbertreport.cc.com/videos/a7r0zs/christiane-amanpour",
"http://thecolbertreport.cc.com/videos/uzu0lz/sign-off---goodnight"
],
"guest": "Christiane Amanpour"
},
{
"date": "2012-02-13",
"videos": [
"http://thecolbertreport.cc.com/videos/hhq4en/intro---2-13-12",
"http://thecolbertreport.cc.com/videos/2kynbu/linsanity-",
"http://thecolbertreport.cc.com/videos/hgxqxc/people-who-are-destroying-america---sawstop",
"http://thecolbertreport.cc.com/videos/ju995r/stephen-colbert-s-free-americone-dream-day",
"http://thecolbertreport.cc.com/videos/eks7za/bill-mckibben",
"http://thecolbertreport.cc.com/videos/k6qadu/sign-off---colbert-nation-newborn"
],
"guest": "Bill McKibben"
},
{
"date": "2012-02-14",
"videos": [
"http://thecolbertreport.cc.com/videos/u5h2yo/intro---2-14-12",
"http://thecolbertreport.cc.com/videos/3rk6lv/westminster-kennel-club-dog-show-2012",
"http://thecolbertreport.cc.com/videos/jx9ojl/contraception-crusade",
"http://thecolbertreport.cc.com/videos/lyzukj/tip-wag---gay-building-marriage---transportation-safety-board-cell-phone-ban",
"http://thecolbertreport.cc.com/videos/ej01p5/william-broad",
"http://thecolbertreport.cc.com/videos/mhuyjx/sign-off---stephen-s-friend-lou-dog"
],
"guest": "William Broad"
},
{
"date": "2012-02-20",
"videos": [
"http://thecolbertreport.cc.com/videos/f1ta15/intro---2-20-12",
"http://thecolbertreport.cc.com/videos/7ghzcu/mitt-romney---donald-trump-in-michigan",
"http://thecolbertreport.cc.com/videos/lydem1/rick-santorum-s-energy-war-alarm",
"http://thecolbertreport.cc.com/videos/tqad40/ann-patchett",
"http://thecolbertreport.cc.com/videos/qgsly5/sign-off---caught-looking"
],
"guest": "Ann Patchett"
},
{
"date": "2012-02-21",
"videos": [
"http://thecolbertreport.cc.com/videos/vdtnp9/intro---2-21-12",
"http://thecolbertreport.cc.com/videos/dgnc7d/douchebag-showdown",
"http://thecolbertreport.cc.com/videos/mnahgd/colbert-super-pac---nancy-pelosi-s-ad---barack-obama-s-super-pac",
"http://thecolbertreport.cc.com/videos/s0vtdx/robert-kagan",
"http://thecolbertreport.cc.com/videos/x36uyb/sign-off---dark-lord-of-the-sith"
],
"guest": "Robert Kagan"
},
{
"date": "2012-02-22",
"videos": [
"http://thecolbertreport.cc.com/videos/n05gam/intro---2-22-12",
"http://thecolbertreport.cc.com/videos/krghr1/stephen-s-lenten-sacrifice",
"http://thecolbertreport.cc.com/videos/dv9iqc/the-word---surrender-to-a-buyer-power",
"http://thecolbertreport.cc.com/videos/w2qw1t/better-know-a-district---california-s-8th",
"http://thecolbertreport.cc.com/videos/d6raxz/nancy-pelosi",
"http://thecolbertreport.cc.com/videos/9mdx7s/sign-off---conquistador-sacrifice"
],
"guest": "Rep. Nancy Pelosi"
},
{
"date": "2012-02-23",
"videos": [
"http://thecolbertreport.cc.com/videos/g3b2me/arizona-gop-debate",
"http://thecolbertreport.cc.com/videos/6wnf2j/posthumous-mormon-baptism",
"http://thecolbertreport.cc.com/videos/zzgfft/wheat-thins-sponsortunity",
"http://thecolbertreport.cc.com/videos/jshg47/placido-domingo"
],
"guest": "Placido Domingo"
},
{
"date": "2012-02-27",
"videos": [
"http://thecolbertreport.cc.com/videos/6llqzw/mitt-romney-s---rick-santorum-s-michigan-campaigns",
"http://thecolbertreport.cc.com/videos/45yrtw/peggielene-bartels",
"http://thecolbertreport.cc.com/videos/xr2dmf/sign-off---goodnight"
],
"guest": "Peggielene Bartels"
},
{
"date": "2012-02-28",
"videos": [
"http://thecolbertreport.cc.com/videos/l484x8/intro---2-28-12",
"http://thecolbertreport.cc.com/videos/b44eo3/the-colbert-report-s-1000th-show",
"http://thecolbertreport.cc.com/videos/hsyhov/rising-oil-prices---john-kilduff",
"http://thecolbertreport.cc.com/videos/gqa08a/mr--smith-goes-to-the-state-legislature--then-later-possibly-washington---bob-morris---kyle-jones",
"http://thecolbertreport.cc.com/videos/0xatad/ross-eisenbrey",
"http://thecolbertreport.cc.com/videos/8ebxgr/stephen-s-1000th-ticket"
],
"guest": "Ross Eisenbrey"
},
{
"date": "2012-02-29",
"videos": [
"http://thecolbertreport.cc.com/videos/ueosv6/intro---2-29-12",
"http://thecolbertreport.cc.com/videos/y0ejfo/countdown-to-loving-mitt",
"http://thecolbertreport.cc.com/videos/3dllp7/the-word---change-we-can-believe-in",
"http://thecolbertreport.cc.com/videos/3adb3i/tip-wag---kansas--male-birth-control-pill---new-york-s-babyccino",
"http://thecolbertreport.cc.com/videos/puth71/william-shatner",
"http://thecolbertreport.cc.com/videos/dhcxcx/sign-off---goodnight"
],
"guest": "William Shatner"
},
{
"date": "2012-03-01",
"videos": [
"http://thecolbertreport.cc.com/videos/ueosv6/intro---2-29-12",
"http://thecolbertreport.cc.com/videos/y0ejfo/countdown-to-loving-mitt",
"http://thecolbertreport.cc.com/videos/3dllp7/the-word---change-we-can-believe-in",
"http://thecolbertreport.cc.com/videos/3adb3i/tip-wag---kansas--male-birth-control-pill---new-york-s-babyccino",
"http://thecolbertreport.cc.com/videos/puth71/william-shatner",
"http://thecolbertreport.cc.com/videos/dhcxcx/sign-off---goodnight"
],
"guest": "Claire Danes"
},
{
"date": "2012-03-01",
"videos": [
"http://thecolbertreport.cc.com/videos/eolisf/countdown-to-loving-mitt---jeb-bush",
"http://thecolbertreport.cc.com/videos/bf1ekb/people-who-are-destroying-america---teachers",
"http://thecolbertreport.cc.com/videos/ncu1ti/mysteries-of-the-ancient-unknown---yo-mama-jokes",
"http://thecolbertreport.cc.com/videos/tw0ear/claire-danes",
"http://thecolbertreport.cc.com/videos/4gz8ak/sign-off---jeb-bush-s-portrait"
],
"guest": "Claire Danes"
},
{
"date": "2012-03-05",
"videos": [
"http://thecolbertreport.cc.com/videos/xceapv/countdown-to-loving-mitt---super-tuesday",
"http://thecolbertreport.cc.com/videos/29dn96/rush-limbaugh-apologizes-to-sandra-fluke",
"http://thecolbertreport.cc.com/videos/pww7ru/sport-report---pete-weber--danica-patrick---the-new-orleans-saints",
"http://thecolbertreport.cc.com/videos/nwk5lf/audra-mcdonald"
],
"guest": "Audra McDonald"
},
{
"date": "2012-03-06",
"videos": [
"http://thecolbertreport.cc.com/videos/4yvx5w/super-tuesday-party--putin-s-win---india-s-state-assembly",
"http://thecolbertreport.cc.com/videos/nzr8wl/the-word---due-or-die",
"http://thecolbertreport.cc.com/videos/rxyz0z/thought-for-food---responsible-snacking---second-breakfast",
"http://thecolbertreport.cc.com/videos/h24vfx/jonathan-safran-foer",
"http://thecolbertreport.cc.com/videos/em4ksp/sign-off---good-catch"
],
"guest": "Jonathan Safran Foer"
},
{
"date": "2012-03-07",
"videos": [
"http://thecolbertreport.cc.com/videos/i93vkc/intro---3-7-12",
"http://thecolbertreport.cc.com/videos/3df60s/higgs-boson-humor",
"http://thecolbertreport.cc.com/videos/y5rjly/countdown-to-loving-mitt---super-tuesday-results",
"http://thecolbertreport.cc.com/videos/7v4ikl/cyber-republican-convention",
"http://thecolbertreport.cc.com/videos/ciyqhs/iranian-irony-threat",
"http://thecolbertreport.cc.com/videos/060vqq/willem-dafoe",
"http://thecolbertreport.cc.com/videos/c0qp1t/sign-off---goodnight"
],
"guest": "Willem Dafoe"
},
{
"date": "2012-03-08",
"videos": [
"http://thecolbertreport.cc.com/videos/3nl0qx/eric-bolling-s-secret-gas-prices-plan",
"http://thecolbertreport.cc.com/videos/fig5ri/herman-cain-s-avant-garde-pac-ad"
],
"guest": "Don Fleming, Elvis Costello, Emmylou Harris"
},
{
"date": "2012-03-12",
"videos": [
"http://thecolbertreport.cc.com/videos/c4fdt8/daylight-savings-socialism",
"http://thecolbertreport.cc.com/videos/2v3qmo/republicans--southern-strategy",
"http://thecolbertreport.cc.com/videos/lo9wk9/republicans--southern-strategy---dave--mudcat--saunders",
"http://thecolbertreport.cc.com/videos/16w3vh/cheating-death---bacon-cure-for-nosebleeds---sound-wave-sterility",
"http://thecolbertreport.cc.com/videos/nmtsxp/katherine-boo",
"http://thecolbertreport.cc.com/videos/owkzk2/sign-off---goodnight-with-a-smile"
],
"guest": "Katherine Boo"
},
{
"date": "2012-03-13",
"videos": [
"http://thecolbertreport.cc.com/videos/bz7jdm/who-s-not-honoring-me-now----seattle-s-pop-conference",
"http://thecolbertreport.cc.com/videos/qn0q26/threatdown---stoned-pat-robertson--muslim-american-reality-tv---pampered-bears",
"http://thecolbertreport.cc.com/videos/h98570/republican-southern-primary---simplified-speeches",
"http://thecolbertreport.cc.com/videos/msz5qh/andrew-bird"
],
"guest": "Andrew Bird"
},
{
"date": "2012-03-14",
"videos": [
"http://thecolbertreport.cc.com/videos/m77cwc/greg-smith-s-goldman-sachs-op-ed",
"http://thecolbertreport.cc.com/videos/rwxeui/republican-southern-primary---rick-santorum-against-teleprompters",
"http://thecolbertreport.cc.com/videos/yeczkv/republican-southern-primary---kermit-the-frog",
"http://thecolbertreport.cc.com/videos/7n8gsd/monkey-on-the-lam---alabama",
"http://thecolbertreport.cc.com/videos/zkum1o/mark-mckinnon",
"http://thecolbertreport.cc.com/videos/d8t6uu/sign-off---goodnight"
],
"guest": "Mark McKinnon"
},
{
"date": "2012-03-15",
"videos": [
"http://thecolbertreport.cc.com/videos/eq8308/airport-security-for-senior-citizens",
"http://thecolbertreport.cc.com/videos/zjy3q9/rush-limbaugh-loses-more-sponsors",
"http://thecolbertreport.cc.com/videos/krx9gw/rick-santorum-visits-puerto-rico-and-speaks-from-his-heart",
"http://thecolbertreport.cc.com/videos/vh5p5b/ireland-s-imported-sperm---ethnically-accurate-headgear",
"http://thecolbertreport.cc.com/videos/8o29gb/dexter-filkins",
"http://thecolbertreport.cc.com/videos/e66q9g/sign-off---goodnight"
],
"guest": "Dexter Filkins"
},
{
"date": "2012-03-26",
"videos": [
"http://thecolbertreport.cc.com/videos/no5p1a/exclusive---david-page-extended-interview",
"http://thecolbertreport.cc.com/videos/a8lnqt/intro---3-26-12",
"http://thecolbertreport.cc.com/videos/3ejcul/stephen-s-spring-break",
"http://thecolbertreport.cc.com/videos/008ndt/the-word---dressed-to-kill",
"http://thecolbertreport.cc.com/videos/7faawr/mitt-romney-etch-a-sketch-comparison",
"http://thecolbertreport.cc.com/videos/rc1xqe/david-page",
"http://thecolbertreport.cc.com/videos/20xgt7/sign-off---goodnight"
],
"guest": "Dr. David Page"
},
{
"date": "2012-03-27",
"videos": [
"http://thecolbertreport.cc.com/videos/rk3w4e/intro---3-27-12",
"http://thecolbertreport.cc.com/videos/cua8o6/barack-obama-gun-control-conspiracy",
"http://thecolbertreport.cc.com/videos/ykhpki/tip-wag---anti-prejudice-drug---dick-cheney-s-heart",
"http://thecolbertreport.cc.com/videos/53yh09/thought-for-food---tacocopter",
"http://thecolbertreport.cc.com/videos/ghn5jt/charles-murray",
"http://thecolbertreport.cc.com/videos/y9plha/sign-off---goodnight"
],
"guest": "Charles Murray"
},
{
"date": "2012-03-28",
"videos": [
"http://thecolbertreport.cc.com/videos/lg7nrp/the-supreme-court-weighs-in-on-obamacare",
"http://thecolbertreport.cc.com/videos/svf90k/the-supreme-court-weighs-in-on-obamacare---emily-bazelon",
"http://thecolbertreport.cc.com/videos/tnvz1z/the-conservative-teen",
"http://thecolbertreport.cc.com/videos/bmkpwj/mark-ruffalo",
"http://thecolbertreport.cc.com/videos/jjebsm/sign-off---goodnight-snack"
],
"guest": "Mark Ruffalo"
},
{
"date": "2012-03-29",
"videos": [
"http://thecolbertreport.cc.com/videos/7erwuh/stephen-offers-colbert-super-pac-super-fun-pack",
"http://thecolbertreport.cc.com/videos/9bgxui/intro---3-29-12",
"http://thecolbertreport.cc.com/videos/nuvo4m/the-mega-millions-lottery",
"http://thecolbertreport.cc.com/videos/7qagdx/colbert-super-pac---texan-supporters---super-fun-pack",
"http://thecolbertreport.cc.com/videos/2m6prp/mitt-romney-tells-a-funny-story",
"http://thecolbertreport.cc.com/videos/7dpy0t/peter-beinart",
"http://thecolbertreport.cc.com/videos/r5oifs/sign-off---colbert-super-pac-super-fun-pack"
],
"guest": "Peter Beinart"
},
{
"date": "2012-04-02",
"videos": [
"http://thecolbertreport.cc.com/videos/8f8tya/intro---4-2-12",
"http://thecolbertreport.cc.com/videos/1nq1ce/colbert-super-pac---super-fun-pack-treasure-hunt",
"http://thecolbertreport.cc.com/videos/1bsxs9/the-beefstate-governors",
"http://thecolbertreport.cc.com/videos/fmif88/yahweh-or-no-way---christian-card-counters--pope-benedict-on-marxism---pope-cologne",
"http://thecolbertreport.cc.com/videos/5yl006/gary-johnson",
"http://thecolbertreport.cc.com/videos/77h3h1/sign-off---goodnight"
],
"guest": "Gov. Gary Johnson"
},
{
"date": "2012-04-03",
"videos": [
"http://thecolbertreport.cc.com/videos/33j3ar/lftb-colbology",
"http://thecolbertreport.cc.com/videos/z52jo4/colbert-super-pac---super-fun-pack-not-legal-advice---certificate-of-presidenthood",
"http://thecolbertreport.cc.com/videos/v3p6ss/colbert-super-pac-shh----501c4-disclosure",
"http://thecolbertreport.cc.com/videos/ag45p1/colbert-super-pac-shh----501c4-disclosure---trevor-potter",
"http://thecolbertreport.cc.com/videos/y4berw/rick-santorum-speaks-from-his-heart---california-colleges",
"http://thecolbertreport.cc.com/videos/1b9vpb/nikki-haley",
"http://thecolbertreport.cc.com/videos/asl5su/sign-off---helmeted-ham-rove"
],
"guest": "Gov. Nikki Haley"
},
{
"date": "2012-04-04",
"videos": [
"http://thecolbertreport.cc.com/videos/2ihe55/intro---4-4-12",
"http://thecolbertreport.cc.com/videos/6y1ct4/peabody-award-for-colbert-super-pac",
"http://thecolbertreport.cc.com/videos/4io3p9/settling-for-mitt-romney",
"http://thecolbertreport.cc.com/videos/x8e4ps/colbert-super-pac---republicans---the-latino-vote",
"http://thecolbertreport.cc.com/videos/6ml3sk/wilford-brimley-calls---quaker-oats-makeover",
"http://thecolbertreport.cc.com/videos/plj4a3/robert-ballard",
"http://thecolbertreport.cc.com/videos/qyyf0b/sign-off---second-peabody-award"
],
"guest": "Robert D. Ballard"
},
{
"date": "2012-04-05",
"videos": [
"http://thecolbertreport.cc.com/videos/om9vmg/bad-news-about-good-unemployment-news",
"http://thecolbertreport.cc.com/videos/lnmh56/colbert-s-very-wanted---manatee-mailbox",
"http://thecolbertreport.cc.com/videos/0u9fik/dirt-bike-badass-in-the-lincoln-tunnel",
"http://thecolbertreport.cc.com/videos/ji5xxu/anne-rice",
"http://thecolbertreport.cc.com/videos/si0xcn/sign-off---lincoln-tunnel"
],
"guest": "Anne Rice"
},
{
"date": "2012-04-09",
"videos": [
"http://thecolbertreport.cc.com/videos/8ziziz/easter-under-attack---bunny-vs--bilby",
"http://thecolbertreport.cc.com/videos/oyaen8/searching-for-mr--right---mitt-romney---iowa-s-steve-king",
"http://thecolbertreport.cc.com/videos/csp74m/stephen-colbert-s-shame-spiral---senior-citizen-gymnasts",
"http://thecolbertreport.cc.com/videos/kruk2j/bob-lutz",
"http://thecolbertreport.cc.com/videos/9wc34u/sign-off---remembering-mike-wallace"
],
"guest": "Bob Lutz"
},
{
"date": "2012-04-10",
"videos": [
"http://thecolbertreport.cc.com/videos/2n6qw1/intro---4-10-12",
"http://thecolbertreport.cc.com/videos/82ub2z/rick-santorum-leaves-presidential-race",
"http://thecolbertreport.cc.com/videos/qu7492/i-got-the-tweets-like-grassley",
"http://thecolbertreport.cc.com/videos/3la5nh/tip-wag---coal-industry-crackdown---box-spring-bunker",
"http://thecolbertreport.cc.com/videos/mfxyfn/stephen-colbert-s-lady-heroes---glen-grothman",
"http://thecolbertreport.cc.com/videos/o4ah40/richard-hersh",
"http://thecolbertreport.cc.com/videos/es5mrc/sign-off---goodnight"
],
"guest": "Richard Hersh"
},
{
"date": "2012-04-11",
"videos": [
"http://thecolbertreport.cc.com/videos/3ygjj0/amped-up-for-michelle-obama",
"http://thecolbertreport.cc.com/videos/bc3gqm/the-word---whuh-how-",
"http://thecolbertreport.cc.com/videos/ingur1/employing-a-veteran---sergeant-bryan-escobedo",
"http://thecolbertreport.cc.com/videos/f8r4k5/michelle-obama-pt--1",
"http://thecolbertreport.cc.com/videos/v3wlgc/michelle-obama-pt--2",
"http://thecolbertreport.cc.com/videos/u0cci1/sign-off---goodnight"
],
"guest": "Michelle Obama"
},
{
"date": "2012-04-12",
"videos": [
"http://thecolbertreport.cc.com/videos/pzrkzg/intro---4-12-12",
"http://thecolbertreport.cc.com/videos/m5gmsh/the-other-war-on-women",
"http://thecolbertreport.cc.com/videos/v73czf/stephen-colbert-s-end-of-the-world-of-the-week---survivalist-singles---tsunami-food",
"http://thecolbertreport.cc.com/videos/s55d89/cold-war-update---alleged-congressional-communists",
"http://thecolbertreport.cc.com/videos/x9epzo/james-cameron",
"http://thecolbertreport.cc.com/videos/avonwu/sign-off---goodnight"
],
"guest": "James Cameron"
},
{
"date": "2012-04-16",
"videos": [
"http://thecolbertreport.cc.com/videos/z2fjas/a-beautiful-war-for-women-segment",
"http://thecolbertreport.cc.com/videos/2ixpov/secret-service-sex-scandal",
"http://thecolbertreport.cc.com/videos/ilt6wv/a-beautiful-war-for-women",
"http://thecolbertreport.cc.com/videos/44j8wl/newt-gingrich---gun-rights",
"http://thecolbertreport.cc.com/videos/ru5vnr/bonnie-raitt"
],
"guest": "Bonnie Raitt"
},
{
"date": "2012-04-17",
"videos": [
"http://thecolbertreport.cc.com/videos/wpng4g/intro---4-17-12",
"http://thecolbertreport.cc.com/videos/gxlf9b/mitt-romney-s-dinner-table-pranks",
"http://thecolbertreport.cc.com/videos/sfsf06/thought-for-food---bug-food-coloring--hot-dog-stuffed-crust---drugged-poultry",
"http://thecolbertreport.cc.com/videos/vklngm/gsa-spending-scandal",
"http://thecolbertreport.cc.com/videos/6fhp9q/jonah-lehrer",
"http://thecolbertreport.cc.com/videos/culsks/sign-off---goodnight"
],
"guest": "Jonah Lehrer"
},
{
"date": "2012-04-18",
"videos": [
"http://thecolbertreport.cc.com/videos/q3i7x8/intro---4-18-12",
"http://thecolbertreport.cc.com/videos/ddq41n/searching-for-mr--right---mitt-romney---ohio-s-rob-portman",
"http://thecolbertreport.cc.com/videos/er0kn7/the-word---gateway-hug",
"http://thecolbertreport.cc.com/videos/vw1qdm/stephen-colbert-s-end-of-the-world-of-the-week---doomsday-preppers",
"http://thecolbertreport.cc.com/videos/xzzk73/arianna-huffington",
"http://thecolbertreport.cc.com/videos/tttdob/sign-off---goodnight-kiss"
],
"guest": "Arianna Huffington"
},
{
"date": "2012-04-19",
"videos": [
"http://thecolbertreport.cc.com/videos/hrfl05/intro---4-19-12",
"http://thecolbertreport.cc.com/videos/a9n2pr/stephen-s-4-20-message",
"http://thecolbertreport.cc.com/videos/zdgaqc/alpha-dog-of-the-week---cory-booker",
"http://thecolbertreport.cc.com/videos/nb2ksl/the-enemy-within---bologna-border-bust",
"http://thecolbertreport.cc.com/videos/uio9bo/time-s-2012-top-100-most-influential",
"http://thecolbertreport.cc.com/videos/h2p67e/tavis-smiley---cornel-west",
"http://thecolbertreport.cc.com/videos/g291q8/sign-off---time-s-top-100"
],
"guest": "Tavis Smiley & Cornel West"
},
{
"date": "2012-04-23",
"videos": [
"http://thecolbertreport.cc.com/videos/4wypj5/intro---4-23-12",
"http://thecolbertreport.cc.com/videos/m8blpo/steve-doocy-s-silver-spoon-subtext-reporting",
"http://thecolbertreport.cc.com/videos/2gwl1y/tip-wag--pheromone-parties---arizona-s--pre-life--laws",
"http://thecolbertreport.cc.com/videos/v2y3wl/mitt-romney-s-picnic-gaffe",
"http://thecolbertreport.cc.com/videos/14wyxm/don-mcleroy",
"http://thecolbertreport.cc.com/videos/l9d2q6/sign-off---goodnight"
],
"guest": "Don McLeroy"
},
{
"date": "2012-04-24",
"videos": [
"http://thecolbertreport.cc.com/videos/ly3so2/super-tuesday-ii--election-boogaloo---death-match-in-hellaware",
"http://thecolbertreport.cc.com/videos/xmivrq/-i-am-a-pole--and-so-can-you---",
"http://thecolbertreport.cc.com/videos/i4eh7r/canada-s-currency-coup",
"http://thecolbertreport.cc.com/videos/ycnifi/magnus-carlsen",
"http://thecolbertreport.cc.com/videos/cfkek7/sign-off---ipad"
],
"guest": "Magnus Carlsen"
},
{
"date": "2012-04-25",
"videos": [
"http://thecolbertreport.cc.com/videos/et0kro/intro---4-25-12",
"http://thecolbertreport.cc.com/videos/or4jr5/nasa-retires-discovery---drops-spacebook",
"http://thecolbertreport.cc.com/videos/6xkuod/the-word---united-we-can-t-stand-them",
"http://thecolbertreport.cc.com/videos/gi36k3/cheating-death---crash-diet-feeding-tubes---scrotum-gel-injections",
"http://thecolbertreport.cc.com/videos/88pieq/michael-sandel",
"http://thecolbertreport.cc.com/videos/wduflz/sign-off---goodnight"
],
"guest": "Michael Sandel"
},
{
"date": "2012-04-26",
"videos": [
"http://thecolbertreport.cc.com/videos/xrzvpm/intro---4-26-12",
"http://thecolbertreport.cc.com/videos/9rs6oa/barack-obama-s-slow-jam-backlash",
"http://thecolbertreport.cc.com/videos/2w9amu/colbert-super-pac---super-fun-pack-1st-treasure-hunt-clue",
"http://thecolbertreport.cc.com/videos/1ytfce/jack-white",
"http://thecolbertreport.cc.com/videos/kymj2z/sign-off---montclair-film-festival"
],
"guest": "Jack White"
},
{
"date": "2012-04-30",
"videos": [
"http://thecolbertreport.cc.com/videos/l8r5un/intro---4-30-12",
"http://thecolbertreport.cc.com/videos/u2x3gk/delicate-advice-for-chen-guangcheng",
"http://thecolbertreport.cc.com/videos/g6gv3q/the-word---don-t-ask--don-t-show---tell",
"http://thecolbertreport.cc.com/videos/z2rpip/concealing-weapons-in-style",
"http://thecolbertreport.cc.com/videos/csg3jo/diane-keaton",
"http://thecolbertreport.cc.com/videos/tly3vi/sign-off---stephen-s-fashionable-firearm"
],
"guest": "Diane Keaton"
},
{
"date": "2012-05-01",
"videos": [
"http://thecolbertreport.cc.com/videos/8gt820/intro---5-1-12",
"http://thecolbertreport.cc.com/videos/pktymf/barack-obama---the-anniversary-of-bin-laden-s-assassination",
"http://thecolbertreport.cc.com/videos/0zj7f4/paul-ryan-s-christian-budget-cuts",
"http://thecolbertreport.cc.com/videos/7af7jl/paul-ryan-s-christian-budget-cuts---thomas-reese",
"http://thecolbertreport.cc.com/videos/cpb2np/carne-ross",
"http://thecolbertreport.cc.com/videos/a9ioqx/sign-off---goodnight"
],
"guest": "Carne Ross"
},
{
"date": "2012-05-02",
"videos": [
"http://thecolbertreport.cc.com/videos/jciyto/intro---5-2-12",
"http://thecolbertreport.cc.com/videos/n232ru/richard-branson-shaped-ice-cubes",
"http://thecolbertreport.cc.com/videos/goj2h9/the-word---debt-panels",
"http://thecolbertreport.cc.com/videos/sv3iag/kermit-the-frog-s-german-tv-offense---hans-beinholtz",
"http://thecolbertreport.cc.com/videos/luw0ia/jonathan-haidt",
"http://thecolbertreport.cc.com/videos/k7vmo6/sign-off---stephen-colbert-s-6000k-norway-norwalkathon"
],
"guest": "Jonathan Haidt"
},
{
"date": "2012-05-03",
"videos": [
"http://thecolbertreport.cc.com/videos/msaxn6/newt-gingrich---mitt-romney-alliance-analogies",
"http://thecolbertreport.cc.com/videos/eki0dc/colbert-super-pac---in-search-of-mr--larose",
"http://thecolbertreport.cc.com/videos/2v2ixr/who-s-honoring-me-now----national-space-society---buzz-aldrin",
"http://thecolbertreport.cc.com/videos/z3ac6o/lena-dunham",
"http://thecolbertreport.cc.com/videos/1iw8uv/sign-off---2012-space-pioneer-award-for-mass-media"
],
"guest": "Lena Dunham"
},
{
"date": "2012-05-07",
"videos": [
"http://thecolbertreport.cc.com/videos/1jhhu2/uncensored---maurice-sendak-tribute----i-am-a-pole--and-so-can-you----release",
"http://thecolbertreport.cc.com/videos/feswk7/intro---5-7-12",
"http://thecolbertreport.cc.com/videos/d6nh6o/hand-disinfectant-drunk-teens",
"http://thecolbertreport.cc.com/videos/d69ur0/joe-biden-s-same-sex-marriage-gaffe",
"http://thecolbertreport.cc.com/videos/fplvtb/-pussy-hound--with-eric-mccormack",
"http://thecolbertreport.cc.com/videos/jrnml0/threatdown---newscasting-bears",
"http://thecolbertreport.cc.com/videos/u65qci/andy-cohen",
"http://thecolbertreport.cc.com/videos/xh5269/sign-off---sound-effects-box"
],
"guest": "Andy Cohen"
},
{
"date": "2012-05-08",
"videos": [
"http://thecolbertreport.cc.com/videos/p05t1b/colbert-super-pac-shh----corporate-campaign-players---super-secret--spooky-pacs-",
"http://thecolbertreport.cc.com/videos/b2tfg8/anonymous-attack-ads---claire-mccaskill",
"http://thecolbertreport.cc.com/videos/ad10bn/michelle-alexander",
"http://thecolbertreport.cc.com/videos/dsprai/sign-off----i-am-a-pole--and-so-can-you---"
],
"guest": "Michelle Alexander"
},
{
"date": "2012-05-09",
"videos": [
"http://thecolbertreport.cc.com/videos/v1k3ci/mexico-s-debate-playmate",
"http://thecolbertreport.cc.com/videos/b6tiga/barack-obama-vs--north-carolina-on-gay-marriage",
"http://thecolbertreport.cc.com/videos/t3omhb/jon-mcnaughton-s--nation-under-socialism--artwork",
"http://thecolbertreport.cc.com/videos/o2c49w/anna-wintour",
"http://thecolbertreport.cc.com/videos/bogip6/sign-off----i-am-a-pole--and-so-can-you----audiobook"
],
"guest": "Anna Wintour"
},
{
"date": "2012-05-10",
"videos": [
"http://thecolbertreport.cc.com/videos/6cwgo2/intro---5-10-12",
"http://thecolbertreport.cc.com/videos/7lnqh4/mother-s-day-shout-out",
"http://thecolbertreport.cc.com/videos/n27g4x/barack-obama-s-gay-blasphemy",
"http://thecolbertreport.cc.com/videos/b9m4e5/threatdown---interdimensional-black-people--gay-strokes---manipulative-sicko-monkeys",
"http://thecolbertreport.cc.com/videos/ytlc6i/wisconsin-s-fake-democrats",
"http://thecolbertreport.cc.com/videos/v6gyoh/francis-collins",
"http://thecolbertreport.cc.com/videos/vbl44w/sign-off---two-weeks-off---dry-roasted-peanuts"
],
"guest": "Dr. Francis Collins"
},
{
"date": "2012-05-29",
"videos": [
"http://thecolbertreport.cc.com/videos/hx8ph7/intro---5-29-12",
"http://thecolbertreport.cc.com/videos/cpgg7x/who-s-honoring-me-now----peabody-awards---maxim-s-hot-100",
"http://thecolbertreport.cc.com/videos/oo0mhd/donald-trump-s-creative-truth---mitt-romney-s-poll-numbers",
"http://thecolbertreport.cc.com/videos/cw4fxf/un-american-news---egypt-s-presidential-elections",
"http://thecolbertreport.cc.com/videos/32y78g/charlize-theron",
"http://thecolbertreport.cc.com/videos/gr0i67/sign-off---goodnight"
],
"guest": "Charlize Theron"
},
{
"date": "2012-05-30",
"videos": [
"http://thecolbertreport.cc.com/videos/u7h1f8/intro---5-30-12",
"http://thecolbertreport.cc.com/videos/kydmtj/mexico-s-drug---potato-chip-wars",
"http://thecolbertreport.cc.com/videos/s73hgy/robert-mugabe-s-u-n--tourism-tribute",
"http://thecolbertreport.cc.com/videos/dfm2k1/alan-alda",
"http://thecolbertreport.cc.com/videos/b6lw83/sign-off---stephen-s-matchbox"
],
"guest": "Alan Alda"
},
{
"date": "2012-05-31",
"videos": [
"http://thecolbertreport.cc.com/videos/y3bfh6/buy-best-selling--i-am-a-pole--and-so-can-you---",
"http://thecolbertreport.cc.com/videos/sib2qy/barack-obama-s-righteous-drone-strikes",
"http://thecolbertreport.cc.com/videos/s3t2y6/the-word---two-birds-with-one-drone",
"http://thecolbertreport.cc.com/videos/pufh72/michael-bloomberg-s-super-sized-soda-scheme",
"http://thecolbertreport.cc.com/videos/pz3adl/jack-hitt",
"http://thecolbertreport.cc.com/videos/e9e1b2/sign-off---welcome-baby-gwinn-"
],
"guest": "Jack Hitt"
},
{
"date": "2012-06-04",
"videos": [
"http://thecolbertreport.cc.com/videos/nhsal8/juvenile-speeches-from-congress---president-sparkle-talk",
"http://thecolbertreport.cc.com/videos/w6itwj/the-word---sink-or-swim",
"http://thecolbertreport.cc.com/videos/r7x6me/better-know-a-district---represent-o-map-6000---georgia-s-5th",
"http://thecolbertreport.cc.com/videos/cx6fmy/john-lewis",
"http://thecolbertreport.cc.com/videos/5u46bt/sign-off---goodnight"
],
"guest": "Rep. John Lewis"
},
{
"date": "2012-06-05",
"videos": [
"http://thecolbertreport.cc.com/videos/lg5ugg/intro---6-5-12",
"http://thecolbertreport.cc.com/videos/xt64qc/cdc-zombie-apocalypse-statement",
"http://thecolbertreport.cc.com/videos/w4utag/tip-wag---japanese-diet-goggles--u-s--sperm-exports---taxidermied-toys",
"http://thecolbertreport.cc.com/videos/kkce78/self-marriage-problems",
"http://thecolbertreport.cc.com/videos/90ifev/jill-biden",
"http://thecolbertreport.cc.com/videos/hhgz9k/sign-off---goodnight"
],
"guest": "Jill Biden"
},
{
"date": "2012-06-06",
"videos": [
"http://thecolbertreport.cc.com/videos/ta5d10/transit-of-venus---mars-reality-show-pitch",
"http://thecolbertreport.cc.com/videos/y1zpiy/wisconsin-s-recall-results",
"http://thecolbertreport.cc.com/videos/0vve8r/difference-makers---larry-johnson",
"http://thecolbertreport.cc.com/videos/pqv8yf/neil-patrick-harris",
"http://thecolbertreport.cc.com/videos/1n5kn0/sign-off---ray-bradbury-tribute"
],
"guest": "Neil Patrick Harris"
},
{
"date": "2012-06-07",
"videos": [
"http://thecolbertreport.cc.com/videos/2l9h7f/intro---6-7-12",
"http://thecolbertreport.cc.com/videos/n107py/corruption-on-pakistan-s--sesame-street-",
"http://thecolbertreport.cc.com/videos/5zzgas/the-new-york-times--hit-job-on-mitt-romney",
"http://thecolbertreport.cc.com/videos/mlqu18/a-teacup-pig---partisan-politics",
"http://thecolbertreport.cc.com/videos/gfpnqx/regina-spektor",
"http://thecolbertreport.cc.com/videos/8x9qre/colbert-super-pac---super-fun-pack-treasure-hunt-clue"
],
"guest": "Regina Spektor"
},
{
"date": "2012-06-11",
"videos": [
"http://thecolbertreport.cc.com/videos/8zxgdh/neil-degrasse-tyson-on--prometheus--gaffe",
"http://thecolbertreport.cc.com/videos/4dkvt6/radical-feminist-nuns",
"http://thecolbertreport.cc.com/videos/u1f5qa/radical-feminist-nuns---simone-campbell",
"http://thecolbertreport.cc.com/videos/beuiqq/-banana-bunker--tutorial",
"http://thecolbertreport.cc.com/videos/0lbz7s/martin-sheen",
"http://thecolbertreport.cc.com/videos/h1jqol/sign-off---wooden-ruler"
],
"guest": "Martin Sheen"
},
{
"date": "2012-06-12",
"videos": [
"http://thecolbertreport.cc.com/videos/syl8av/intro---6-12-12",
"http://thecolbertreport.cc.com/videos/4p817x/mitt-romney-s-blue-collar-equestrian-pastime",
"http://thecolbertreport.cc.com/videos/nu56lh/barack-obama-s-anti-terror-leaks",
"http://thecolbertreport.cc.com/videos/dfjz7v/barack-obama-s-jobs-gaffe---mitt-romney-s-courageous-comeback",
"http://thecolbertreport.cc.com/videos/e4m68b/operation-artificial-swedener",
"http://thecolbertreport.cc.com/videos/eici19/will-allen",
"http://thecolbertreport.cc.com/videos/uaovz2/sign-off---stephen-s-equestrian-display"
],
"guest": "Will Allen"
},
{
"date": "2012-06-13",
"videos": [
"http://thecolbertreport.cc.com/videos/f93cwg/high-wire-walk-over-niagara-falls",
"http://thecolbertreport.cc.com/videos/e61ypw/the-word---free-lunch",
"http://thecolbertreport.cc.com/videos/clm6h7/the-enemy-within---apes-armed-with-ipads",
"http://thecolbertreport.cc.com/videos/0nbwzv/gregg-allman",
"http://thecolbertreport.cc.com/videos/0bcb4l/sign-off---goodnight"
],
"guest": "Gregg Allman"
},
{
"date": "2012-06-14",
"videos": [
"http://thecolbertreport.cc.com/videos/wdhef3/marijuana-legalization-as-election-hot-button-issue",
"http://thecolbertreport.cc.com/videos/zy2va1/super-pac-super-cash---24-hour-political-ad-channels",
"http://thecolbertreport.cc.com/videos/a5uuwa/cheating-death---penis-curvature-cures---single-women-sleep-aids",
"http://thecolbertreport.cc.com/videos/jylspq/steve-coll",
"http://thecolbertreport.cc.com/videos/nw9c2r/sign-off---bon-voyage--peter-gwinn"
],
"guest": "Steve Coll"
},
{
"date": "2012-06-18",
"videos": [
"http://thecolbertreport.cc.com/videos/34ngb2/intro---6-18-12",
"http://thecolbertreport.cc.com/videos/c3nu3d/barack-obama-s-immigration-policy-change",
"http://thecolbertreport.cc.com/videos/z9bjae/press-interruption-at-barack-obama-s-immigration-address",
"http://thecolbertreport.cc.com/videos/f3coxy/operation-artificial-swedener---sweden-s-response",
"http://thecolbertreport.cc.com/videos/x4uwku/paul-krugman",
"http://thecolbertreport.cc.com/videos/fdw0ht/sign-off---goodnight"
],
"guest": "Paul Krugman"
},
{
"date": "2012-06-19",
"videos": [
"http://thecolbertreport.cc.com/videos/0r91gj/john-kerry-as-mitt-romney-in-debate-prep",
"http://thecolbertreport.cc.com/videos/zxypkl/mitt-romney-s-champion-horse---dressage-tribute",
"http://thecolbertreport.cc.com/videos/ugscr4/unscooped-dog-poop-crimes",
"http://thecolbertreport.cc.com/videos/xdevam/olivia-wilde",
"http://thecolbertreport.cc.com/videos/kada0a/sign-off---stephen-s-dressage-dance"
],
"guest": "Olivia Wilde"
},
{
"date": "2012-06-20",
"videos": [
"http://thecolbertreport.cc.com/videos/6q5qvo/intro---6-20-12",
"http://thecolbertreport.cc.com/videos/w6vibi/asian-immigration-threat",
"http://thecolbertreport.cc.com/videos/95tn0n/unraveling-the-operation-fast---furious-scandal",
"http://thecolbertreport.cc.com/videos/b65og2/joe-the-plumber-s-controversial-gun-control-ad",
"http://thecolbertreport.cc.com/videos/4h0l60/thought-for-food---doritos-tacos---flavorlopes",
"http://thecolbertreport.cc.com/videos/lwb6am/daniel-klaidman",
"http://thecolbertreport.cc.com/videos/31ptzz/sign-off---goodnight"
],
"guest": "Daniel Klaidman"
},
{
"date": "2012-06-21",
"videos": [
"http://thecolbertreport.cc.com/videos/7r29kf/egypt-s-presidential-election---hosni-mubarak-s-health",
"http://thecolbertreport.cc.com/videos/zdprqc/threatdown---sicko-penguins--stoner-babies---terrorist-furniture",
"http://thecolbertreport.cc.com/videos/5yjil8/operation-artificial-swedener---c-mon-sweden--take-a-chance-on-stephen",
"http://thecolbertreport.cc.com/videos/e6ik9l/lawrence-krauss",
"http://thecolbertreport.cc.com/videos/e8ivor/sign-off----a-universe-from-nothing-"
],
"guest": "Lawrence Krauss"
},
{
"date": "2012-06-25",
"videos": [
"http://thecolbertreport.cc.com/videos/ylc1ta/intro---6-25-12",
"http://thecolbertreport.cc.com/videos/cbsvdk/colbert-news-alert---obamacare-supreme-court-ruling",
"http://thecolbertreport.cc.com/videos/wn3vzl/colbert-news-alert---obamacare-supreme-court-ruling---richard-mourdock-s-responses",
"http://thecolbertreport.cc.com/videos/1nhpf3/the-word---silver-maligning",
"http://thecolbertreport.cc.com/videos/0u5f3i/i-s-on-edjukashun---study-drugs",
"http://thecolbertreport.cc.com/videos/2q2di6/frank-deford",
"http://thecolbertreport.cc.com/videos/wri423/sign-off---five-finger-fillet"
],
"guest": "Frank Deford"
},
{
"date": "2012-06-26",
"videos": [
"http://thecolbertreport.cc.com/videos/ifbnsf/intro---6-26-12",
"http://thecolbertreport.cc.com/videos/8wlx7c/supreme-court-ruling-on-arizona-immigration-policy",
"http://thecolbertreport.cc.com/videos/06bwvh/tip-wag---pixar-s-gay-agenda--america-s-obesity---adidas-shackle-sneakers",
"http://thecolbertreport.cc.com/videos/ohfzqq/dish-network-s-autohop-service",
"http://thecolbertreport.cc.com/videos/r8iy26/richard-ford",
"http://thecolbertreport.cc.com/videos/ybvbi1/sign-off---goodnight"
],
"guest": "Richard Ford"
},
{
"date": "2012-06-27",
"videos": [
"http://thecolbertreport.cc.com/videos/g8onr9/colbert-super-pac-treasure-hunt-solution",
"http://thecolbertreport.cc.com/videos/gl54n8/mitt-romney-s-victory-retreat---democrats--convention-deficit",
"http://thecolbertreport.cc.com/videos/t2x64z/national-geographic-poll-on-alien-invasion-management",
"http://thecolbertreport.cc.com/videos/td6pu4/blood-in-the-water---mike-turzai-s-voter-id-remarks",
"http://thecolbertreport.cc.com/videos/5em8r3/rainbow-stuffed-gay-pride-oreo",
"http://thecolbertreport.cc.com/videos/aj465n/melinda-gates",
"http://thecolbertreport.cc.com/videos/bxvxkj/sign-off---oreo-cookie-plate"
],
"guest": "Melinda Gates"
},
{
"date": "2012-06-28",
"videos": [
"http://thecolbertreport.cc.com/videos/coii6k/cable-news-gaffe-on-obamacare-supreme-court-ruling",
"http://thecolbertreport.cc.com/videos/p7wwtp/john-roberts--obamacare-swing-vote",
"http://thecolbertreport.cc.com/videos/n5b9bc/obamacare---the-broccoli-argument",
"http://thecolbertreport.cc.com/videos/xqmuun/obamacare---the-broccoli-argument---emily-bazelon",
"http://thecolbertreport.cc.com/videos/843q05/aaron-sorkin",
"http://thecolbertreport.cc.com/videos/hdpyh9/colbert-super-pac---super-fun-pack-treasure-finder"
],
"guest": "Aaron Sorkin"
},
{
"date": "2012-07-16",
"videos": [
"http://thecolbertreport.cc.com/videos/rkamql/intro---7-16-12",
"http://thecolbertreport.cc.com/videos/nw0ci8/tomkat-s-divorce---anderson-cooper-s-sexual-orientation",
"http://thecolbertreport.cc.com/videos/xmrkal/mitt-romney-s-retroactive-retirement-from-bain-capital",
"http://thecolbertreport.cc.com/videos/hs3epw/thought-for-food---caffeine-edition---funeral-home-starbucks---car-coffee-makers",
"http://thecolbertreport.cc.com/videos/gxb8p4/anne-marie-slaughter",
"http://thecolbertreport.cc.com/videos/nj5kky/sign-off---smiles-or-whatever"
],
"guest": "Anne-Marie Slaughter"
},
{
"date": "2012-07-17",
"videos": [
"http://thecolbertreport.cc.com/videos/5r1yvx/nevada-s--none-of-the-above--is-fearsome-foe-for-gop",
"http://thecolbertreport.cc.com/videos/577ry9/the-word---on-the-straight---narrow-minded",
"http://thecolbertreport.cc.com/videos/xrrg9u/who-s-honoring-me-now----philadelphia-s-rosenbach-museum-and-library",
"http://thecolbertreport.cc.com/videos/8qe1km/nas"
],
"guest": "Nas"
},
{
"date": "2012-07-18",
"videos": [
"http://thecolbertreport.cc.com/videos/xiottz/intro---7-18-12",
"http://thecolbertreport.cc.com/videos/jhpgom/-struggling--waiters---waitresses-at-mitt-romney-s-fundraiser",
"http://thecolbertreport.cc.com/videos/40x15i/tip-wag---christian-tablet-computer---rock-paper-scissors-robot",
"http://thecolbertreport.cc.com/videos/5qgquz/stephen-colbert-s-metunes---def-leppard-s--forgeries--of-old-hits",
"http://thecolbertreport.cc.com/videos/67w2nh/annise-parker",
"http://thecolbertreport.cc.com/videos/2wz88p/sign-off---goodnight"
],
"guest": "Mayor Annise D. Parker"
},
{
"date": "2012-07-19",
"videos": [
"http://thecolbertreport.cc.com/videos/h8wtk8/fred-willard-arrested-for-lewd-conduct",
"http://thecolbertreport.cc.com/videos/64cfhk/libor-interest-rate-scandal",
"http://thecolbertreport.cc.com/videos/7dpxne/libor-interest-rate-scandal---dave-leonhardt",
"http://thecolbertreport.cc.com/videos/uknspr/canada-s-economic-growth-despite-melting-currency",
"http://thecolbertreport.cc.com/videos/xfd2bp/lisa-jackson",
"http://thecolbertreport.cc.com/videos/iw4bs9/sign-off---goodnight"
],
"guest": "Lisa Jackson"
},
{
"date": "2012-07-23",
"videos": [
"http://thecolbertreport.cc.com/videos/imdi3o/intro---7-23-12",
"http://thecolbertreport.cc.com/videos/0xmom4/interview-no-show--mike-tyson",
"http://thecolbertreport.cc.com/videos/v7f1z0/shepard-smith-s-personal-reporting-style",
"http://thecolbertreport.cc.com/videos/p2oill/partisan-speculation-over-colorado-shooter",
"http://thecolbertreport.cc.com/videos/3cxwny/vikram-gandhi",
"http://thecolbertreport.cc.com/videos/rwkf73/sign-off---goodnight"
],
"guest": "Vikram Gandhi"
},
{
"date": "2012-07-24",
"videos": [
"http://thecolbertreport.cc.com/videos/knsr5h/intro---7-24-12",
"http://thecolbertreport.cc.com/videos/h74nmb/hamster-study-links-late-night-tv-with-depression",
"http://thecolbertreport.cc.com/videos/zxif76/u-s--agriculture---drought-disaster",
"http://thecolbertreport.cc.com/videos/x2crx4/u-s--agriculture---drought-disaster---bruce-babcock",
"http://thecolbertreport.cc.com/videos/bov9or/james-fallows",
"http://thecolbertreport.cc.com/videos/lpy9h0/sign-off---goodnight"
],
"guest": "James Fallows"
},
{
"date": "2012-07-25",
"videos": [
"http://thecolbertreport.cc.com/videos/0mcg76/mitt-romney-s-anglo-saxon-connection",
"http://thecolbertreport.cc.com/videos/w5w9pn/mitt-romney-vs--barack-obama-on-small-business-owners",
"http://thecolbertreport.cc.com/videos/x14yw9/the-word---1-man-show",
"http://thecolbertreport.cc.com/videos/f7r40e/bibles-swapped-for--fifty-shades-of-grey-",
"http://thecolbertreport.cc.com/videos/4414pc/dan-gross",
"http://thecolbertreport.cc.com/videos/e1brl1/sign-off---goodnight"
],
"guest": "Dan Gross"
},
{
"date": "2012-07-26",
"videos": [
"http://thecolbertreport.cc.com/videos/vqlxb2/intro---7-26-12",
"http://thecolbertreport.cc.com/videos/4fk2ow/sport-report---stephen-colbefrajilympic-expealacoverage-",
"http://thecolbertreport.cc.com/videos/kycpil/mitt-romney-s-london-olympics-blunder",
"http://thecolbertreport.cc.com/videos/lra5ae/chick-fil-a-s-anti-gay-marriage-announcement",
"http://thecolbertreport.cc.com/videos/4nngh8/peter-westmacott",
"http://thecolbertreport.cc.com/videos/ccwpvt/sign-off---colbert-nation-twins"
],
"guest": "Amb. Peter Westmacott"
},
{
"date": "2012-07-30",
"videos": [
"http://thecolbertreport.cc.com/videos/70ka18/mitt-romney-s-disinterest-in-dressage",
"http://thecolbertreport.cc.com/videos/lav3uh/stephen-s-dressage-training-pt--1",
"http://thecolbertreport.cc.com/videos/zdpacy/tony-robbins--signature-firewalk",
"http://thecolbertreport.cc.com/videos/554xm8/joan-rivers",
"http://thecolbertreport.cc.com/videos/d69lls/sign-off----i-hate-everyone----starting-with-me-"
],
"guest": "Joan Rivers"
},
{
"date": "2012-07-31",
"videos": [
"http://thecolbertreport.cc.com/videos/d1pkf4/intro---7-31-12",
"http://thecolbertreport.cc.com/videos/sbevip/rick-gorka-s-press-outburst-in-poland",
"http://thecolbertreport.cc.com/videos/8qmv9k/rafalca-s-impact-on-mitt-romney-s-vp-pick",
"http://thecolbertreport.cc.com/videos/f5vsty/stephen-s-dressage-training-pt--2",
"http://thecolbertreport.cc.com/videos/lfsrga/stephest-colbchella--012---rocktaugustfest",
"http://thecolbertreport.cc.com/videos/p9ejfs/jeff-koons",
"http://thecolbertreport.cc.com/videos/e0ikf9/sign-off---goodnight"
],
"guest": "Jeff Koons"
},
{
"date": "2012-08-01",
"videos": [
"http://thecolbertreport.cc.com/videos/fjidln/obama-administration-s-birth-control-mandate",
"http://thecolbertreport.cc.com/videos/llkyw5/the--fiscal-cliff--conundrum---grover-norquist-s-tax-pledge",
"http://thecolbertreport.cc.com/videos/u1lf6f/sport-report---stephen-colbefrajilympic-expealacoverage----gymnastics---swimming",
"http://thecolbertreport.cc.com/videos/gayfdj/john-grunsfeld",
"http://thecolbertreport.cc.com/videos/gwa2y4/sign-off---totem"
],
"guest": "John Grunsfeld"
},
{
"date": "2012-08-02",
"videos": [
"http://thecolbertreport.cc.com/videos/x1we2u/exclusive---better-know-a-district---missouri-s-3rd-or-1st---russ-carnahan",
"http://thecolbertreport.cc.com/videos/3wx6bt/rafalca-s-first-day-of-dressage",
"http://thecolbertreport.cc.com/videos/ql0bqa/nancy-pelosi-s-bkad-pact---the-disclose-act-filibuster",
"http://thecolbertreport.cc.com/videos/tdj576/better-know-a-district---missouri-s-3rd-or-1st---russ-carnahan",
"http://thecolbertreport.cc.com/videos/t85slm/thought-for-food---usda-meatless-mondays---plant-communication-research",
"http://thecolbertreport.cc.com/videos/fyzakp/chris-hayes",
"http://thecolbertreport.cc.com/videos/m1idm3/sign-off---carrot-nibble"
],
"guest": "Chris Hayes"
},
{
"date": "2012-08-06",
"videos": [
"http://thecolbertreport.cc.com/videos/kz6vda/intro---8-6-12",
"http://thecolbertreport.cc.com/videos/h9qt0r/mars-rover-landing",
"http://thecolbertreport.cc.com/videos/w2s6c0/chick-fil-a-appreciation-day",
"http://thecolbertreport.cc.com/videos/x7yc4w/pete-seeger",
"http://thecolbertreport.cc.com/videos/aj407y/sign-off----pete-seeger--in-his-own-words-"
],
"guest": "Pete Seeger"
},
{
"date": "2012-08-07",
"videos": [
"http://thecolbertreport.cc.com/videos/1vt8t5/sport-report---stephen-colbefrajilympic-expealacoverage----soft-anti-americanism",
"http://thecolbertreport.cc.com/videos/k4260i/mitt-romney-s-protective-press-pool---running-mate-clues",
"http://thecolbertreport.cc.com/videos/q82dz5/steve-king-s-dogfighting-defense",
"http://thecolbertreport.cc.com/videos/nlroaz/mark-shriver",
"http://thecolbertreport.cc.com/videos/jx7y7x/sign-off---goodnight"
],
"guest": "Mark Shriver"
},
{
"date": "2012-08-08",
"videos": [
"http://thecolbertreport.cc.com/videos/23mkh8/intro---8-8-12",
"http://thecolbertreport.cc.com/videos/4fqxvr/obamacare---pizza-costs",
"http://thecolbertreport.cc.com/videos/h3tu8s/cheating-death---sensor-enabled-pills---facelift-bungee-cords",
"http://thecolbertreport.cc.com/videos/zgmish/liza-mundy",
"http://thecolbertreport.cc.com/videos/d5p8ok/sign-off---vacsa-strap"
],
"guest": "Liza Mundy"
},
{
"date": "2012-08-09",
"videos": [
"http://thecolbertreport.cc.com/videos/8gpwtc/anti-muslim-attack-on-hillary-clinton-aide",
"http://thecolbertreport.cc.com/videos/sr618c/better-know-a-district---minnesota-s-5th---keith-ellison",
"http://thecolbertreport.cc.com/videos/zzeqj6/who-s-honoring-me-now----psychonomic-bulletin---review",
"http://thecolbertreport.cc.com/videos/i891sf/woody-harrelson",
"http://thecolbertreport.cc.com/videos/nynu71/sign-off---goodnight"
],
"guest": "Woody Harrelson"
},
{
"date": "2012-08-13",
"videos": [
"http://thecolbertreport.cc.com/videos/d4650t/stephest-colbchella--012---welcome-to-rocktaugustfest",
"http://thecolbertreport.cc.com/videos/6jv3cb/mitt-romney-s-bold-running-mate-pick",
"http://thecolbertreport.cc.com/videos/wk9zh3/stephest-colbchella--012---fun-",
"http://thecolbertreport.cc.com/videos/r9jxwl/sign-off---stephest-colbchella--012---t-mobile-goodnight"
],
"guest": "Fun."
},
{
"date": "2012-08-14",
"videos": [
"http://thecolbertreport.cc.com/videos/9sxdgp/stephest-colbchella--012---rocktaugustfest-night-two",
"http://thecolbertreport.cc.com/videos/ovgwtm/mitt-romney-s---paul-ryan-s-foreign-policy-credentials",
"http://thecolbertreport.cc.com/videos/ajslu2/-stars-earn-stripes--reality-series",
"http://thecolbertreport.cc.com/videos/4uk1xx/stephest-colbchella--012---grizzly-bear",
"http://thecolbertreport.cc.com/videos/1eoihc/sign-off---stephest-colbchella--012---t-mobile-goodnight-auditions"
],
"guest": "Grizzly Bear"
},
{
"date": "2012-08-15",
"videos": [
"http://thecolbertreport.cc.com/videos/jus7dh/exclusive---stephest-colbchella--012---concert-setup-timelapse",
"http://thecolbertreport.cc.com/videos/lkqb8i/stephest-colbchella--012---rocktaugustfest-night-three",
"http://thecolbertreport.cc.com/videos/iwgkv9/fierce-five-interns",
"http://thecolbertreport.cc.com/videos/tzk5xz/stephest-colbchella--012---intrepid-sea--air---space-museum",
"http://thecolbertreport.cc.com/videos/buxzdm/stephest-colbchella--012---santigold",
"http://thecolbertreport.cc.com/videos/891lvk/sign-off---stephest-colbchella--012---t-mobile-goodnight-with-grandmaster-flash"
],
"guest": "The U.S. Women's Olympic Gymnastics team, Santigold"
},
{
"date": "2012-08-16",
"videos": [
"http://thecolbertreport.cc.com/videos/bx6qnh/stephest-colbchella--012---rocktaugustfest-night-four",
"http://thecolbertreport.cc.com/videos/tgqk3o/mitt-romney---paul-ryan---the-dynam-ish-duo",
"http://thecolbertreport.cc.com/videos/ymbqe6/17th-amendment-under-attack",
"http://thecolbertreport.cc.com/videos/x5cie8/stephest-colbchella--012---wayne-coyne",
"http://thecolbertreport.cc.com/videos/ez1hov/sign-off---stephest-colbchella--012---t-mobile-goodnight-in-a-bubble"
],
"guest": "The Flaming Lips"
},
{
"date": "2012-08-28",
"videos": [
"http://thecolbertreport.cc.com/videos/z0q2d6/hurricane-isaac-at-gop-convention",
"http://thecolbertreport.cc.com/videos/2a1lg4/colbert-super-pac---hurricane-isaac---stephen-s-money-convention",
"http://thecolbertreport.cc.com/videos/kcyg86/todd-akin-s-abortion-gaffe",
"http://thecolbertreport.cc.com/videos/2f1kwv/andrew-sullivan",
"http://thecolbertreport.cc.com/videos/qomrph/sign-off---goodnight"
],
"guest": "Andrew Sullivan"
},
{
"date": "2012-08-29",
"videos": [
"http://thecolbertreport.cc.com/videos/ane28t/america-strikes-back---episode-ii---return-of-the-america-strikes-back--again",
"http://thecolbertreport.cc.com/videos/std0vn/the-mitt-romney-story",
"http://thecolbertreport.cc.com/videos/3teieb/the-mitt-romney-story---ann-romney-s-gop-convention-speech",
"http://thecolbertreport.cc.com/videos/w1ej3a/mitt-romney-s-role-model",
"http://thecolbertreport.cc.com/videos/n7yuw7/ayn-rand---paul-ryan",
"http://thecolbertreport.cc.com/videos/v0fegj/jennifer-burns",
"http://thecolbertreport.cc.com/videos/gxzmx3/sign-off---goodnight"
],
"guest": "Jennifer Burns"
},
{
"date": "2012-08-30",
"videos": [
"http://thecolbertreport.cc.com/videos/0pjdyn/america-strikes-back---episode-iii---the-phantom-money",
"http://thecolbertreport.cc.com/videos/7543m5/the-gop-convention---mitt-romney-s-minority-appeal",
"http://thecolbertreport.cc.com/videos/vo7txi/paul-ryan-s-misleading-gop-convention-speech",
"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/sign-off---goodnight"
],
"guest": "Jon Huntsman"
},
{
"date": "2012-08-31",
"videos": [
"http://thecolbertreport.cc.com/videos/x9yoif/america-strikes-back---episode-iv---a-new-ish-hope",
"http://thecolbertreport.cc.com/videos/9czru3/mitt-romney-s--solid--gop-convention-speech",
"http://thecolbertreport.cc.com/videos/spqhue/the-gop-convention-s-mystery-speaker",
"http://thecolbertreport.cc.com/videos/qrijg7/the-gop-convention-s-mystery-speaker---clint-eastwood-s-chair",
"http://thecolbertreport.cc.com/videos/cx5s7v/neil-armstrong-tribute",
"http://thecolbertreport.cc.com/videos/n0qmbf/james-carville",
"http://thecolbertreport.cc.com/videos/2cv31s/sign-off---goodnight"
],
"guest": "James Carville"
},
{
"date": "2012-09-04",
"videos": [
"http://thecolbertreport.cc.com/videos/r83jxh/exclusive---better-know-a-district---new-york-s-9th---yvette-clarke",
"http://thecolbertreport.cc.com/videos/mxucyy/the-2012-people-s-party-congress-of-charlotte",
"http://thecolbertreport.cc.com/videos/bg56qn/better-know-a-district---new-york-s-9th---yvette-clarke",
"http://thecolbertreport.cc.com/videos/cy97ce/paul-ryan-s-marathon-time-gaffe",
"http://thecolbertreport.cc.com/videos/stj7xj/reihan-salam",
"http://thecolbertreport.cc.com/videos/awwi1z/sign-off---goodnight"
],
"guest": "Reihan Salam"
},
{
"date": "2012-09-05",
"videos": [
"http://thecolbertreport.cc.com/videos/4axjsp/the-2012-people-s-party-congress-of-charlotte---sound-system",
"http://thecolbertreport.cc.com/videos/lnxbm7/the-2012-people-s-party-congress-of-charlotte---michelle-obama---tammy-duckworth",
"http://thecolbertreport.cc.com/videos/zp0jy0/the-2012-people-s-party-congress-of-charlotte---michelle-obama-s-speech-tweets",
"http://thecolbertreport.cc.com/videos/75ubcv/sport-report---nfl-referee-lockout",
"http://thecolbertreport.cc.com/videos/fjhhan/michael-grunwald",
"http://thecolbertreport.cc.com/videos/05j0ux/sign-off---goodnight"
],
"guest": "Michael Grunwald"
},
{
"date": "2012-09-06",
"videos": [
"http://thecolbertreport.cc.com/videos/vf84g8/the-2012-people-s-party-congress-of-charlotte---avoiding-water-gate--day-1",
"http://thecolbertreport.cc.com/videos/qfodha/the-2012-people-s-party-congress-of-charlotte---bill-clinton---hill-poll",
"http://thecolbertreport.cc.com/videos/p7kw6y/the-2012-people-s-party-congress-of-charlotte---god---jerusalem",
"http://thecolbertreport.cc.com/videos/epwrup/bill-richardson",
"http://thecolbertreport.cc.com/videos/8ivg8l/sign-off---taco-plate"
],
"guest": "Bill Richardson"
},
{
"date": "2012-09-07",
"videos": [
"http://thecolbertreport.cc.com/videos/9wdqkq/the-2012-people-s-party-congress-of-charlotte---youth-vote",
"http://thecolbertreport.cc.com/videos/cr72mv/the-2012-people-s-party-congress-of-charlotte---tom-brokaw---barack-obama",
"http://thecolbertreport.cc.com/videos/l9ys9b/rnc-convention-vs--dnc-convention",
"http://thecolbertreport.cc.com/videos/6oqr0u/the-2012-people-s-party-congress-of-charlotte---colbert-bump",
"http://thecolbertreport.cc.com/videos/oq50sl/ed-rendell",
"http://thecolbertreport.cc.com/videos/fbd0do/sign-off---goodnight"
],
"guest": "Ed Rendell"
},
{
"date": "2012-09-17",
"videos": [
"http://thecolbertreport.cc.com/videos/ohliey/intro---9-17-12",
"http://thecolbertreport.cc.com/videos/q2ib3a/values-voter-summit-gaffe",
"http://thecolbertreport.cc.com/videos/kelspo/mitt-romney-s-libya-comments",
"http://thecolbertreport.cc.com/videos/liknzb/atone-phone---ira-glass-calls",
"http://thecolbertreport.cc.com/videos/454q6n/drew-faust",
"http://thecolbertreport.cc.com/videos/lh4d2v/sign-off---shofar"
],
"guest": "Drew Faust"
},
{
"date": "2012-09-18",
"videos": [
"http://thecolbertreport.cc.com/videos/v7w7w3/intro---9-18-12",
"http://thecolbertreport.cc.com/videos/53lqfp/logo-makeover-for-usa-today",
"http://thecolbertreport.cc.com/videos/dsvsbf/mitt-romney-s-secret-video",
"http://thecolbertreport.cc.com/videos/m021ol/tip-wag---apple-samsung-lawsuit---tabloid-clash",
"http://thecolbertreport.cc.com/videos/ni1t1w/jeffrey-toobin",
"http://thecolbertreport.cc.com/videos/qteu69/sign-off---shrimp-toss"
],
"guest": "Jeffrey Toobin"
},
{
"date": "2012-09-19",
"videos": [
"http://thecolbertreport.cc.com/videos/8pu5um/intro---9-19-12",
"http://thecolbertreport.cc.com/videos/yf80jg/mitt-romney-s---barack-obama-s-secret-videos",
"http://thecolbertreport.cc.com/videos/rdsd7t/the-word---ask-not",
"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/vladimir-putin-s-crane-flight",
"http://thecolbertreport.cc.com/videos/asy3gz/mitt-romney-s-hispanic-outreach",
"http://thecolbertreport.cc.com/videos/3f13ot/mitt-romney-s-hispanic-outreach---esteban-colberto",
"http://thecolbertreport.cc.com/videos/2ufg9n/alpha-dog-of-the-week---cecilia-gimenez",
"http://thecolbertreport.cc.com/videos/nxad9d/errol-morris",
"http://thecolbertreport.cc.com/videos/sbgok9/sign-off---ask-o-matic"
],
"guest": "Errol Morris"
},
{
"date": "2012-09-25",
"videos": [
"http://thecolbertreport.cc.com/videos/kke43t/intro---9-25-12",
"http://thecolbertreport.cc.com/videos/ahsdxc/mitt-romney-s-airplane-window-gaffe",
"http://thecolbertreport.cc.com/videos/495xja/national-journal-poll",
"http://thecolbertreport.cc.com/videos/9vebvz/-rolling-calamity--campaign----america-again--preview",
"http://thecolbertreport.cc.com/videos/vk8jsq/sport-report---nfl-referee-lockout---replacement-refs---ratings",
"http://thecolbertreport.cc.com/videos/1my2a8/claressa-shields",
"http://thecolbertreport.cc.com/videos/n6n3t7/sign-off----america-again-"
],
"guest": "Claressa Shields"
},
{
"date": "2012-09-26",
"videos": [
"http://thecolbertreport.cc.com/videos/dfrukr/intro---9-26-12",
"http://thecolbertreport.cc.com/videos/diooyo/yom-kippur---aporkalypse",
"http://thecolbertreport.cc.com/videos/pnhcq0/obama-s-ottoman-empire",
"http://thecolbertreport.cc.com/videos/kzi40s/40-days-to-save-america",
"http://thecolbertreport.cc.com/videos/lsl385/jim-holt",
"http://thecolbertreport.cc.com/videos/jwctvx/sign-off---turkish-delight"
],
"guest": "Jim Holt"
},
{
"date": "2012-09-27",
"videos": [
"http://thecolbertreport.cc.com/videos/373l0t/-america-again--re-becoming-the-greatness-we-never-weren-t-",
"http://thecolbertreport.cc.com/videos/s9359o/mitt-romney-s-sliding-poll-numbers",
"http://thecolbertreport.cc.com/videos/zpnkfm/-skewed--presidential-polls",
"http://thecolbertreport.cc.com/videos/7tmsil/vince-gilligan-pt--1",
"http://thecolbertreport.cc.com/videos/e6j3e4/vince-gilligan-pt--2",
"http://thecolbertreport.cc.com/videos/xrnkns/sign-off----america-again-"
],
"guest": "Vince Gilligan"
},
{
"date": "2012-10-01",
"videos": [
"http://thecolbertreport.cc.com/videos/21ytsa/mitt-romney-s-tax-plan-math",
"http://thecolbertreport.cc.com/videos/v5694x/the-word---supply-chained",
"http://thecolbertreport.cc.com/videos/h64sbo/mahmoud-ahmadinejad-s-un-entourage",
"http://thecolbertreport.cc.com/videos/k9q5kh/ben-folds-five"
],
"guest": "Ben Folds Five"
},
{
"date": "2012-10-02",
"videos": [
"http://thecolbertreport.cc.com/videos/5ujlwr/intro---10-2-12",
"http://thecolbertreport.cc.com/videos/yeek7a/-america-again--release",
"http://thecolbertreport.cc.com/videos/cy7c9f/pulpit-freedom-sunday",
"http://thecolbertreport.cc.com/videos/x5r0se/pulpit-freedom-sunday---jim-garlow",
"http://thecolbertreport.cc.com/videos/oe7wh2/debate-hype---mitt-s-strategy",
"http://thecolbertreport.cc.com/videos/78yg26/jorge-ramos",
"http://thecolbertreport.cc.com/videos/dictxb/sign-off----america-again--release"
],
"guest": "Jorge Ramos"
},
{
"date": "2012-10-03",
"videos": [
"http://thecolbertreport.cc.com/videos/ef28hc/intro---10-3-12",
"http://thecolbertreport.cc.com/videos/05md2w/presidential-debates---mitt-romney-s-re-introduction",
"http://thecolbertreport.cc.com/videos/2cmp66/george-will-s-political-post-racial-journalism",
"http://thecolbertreport.cc.com/videos/idoutl/cheating-death---low-t",
"http://thecolbertreport.cc.com/videos/nw3yhm/kenny-rogers",
"http://thecolbertreport.cc.com/videos/rt3hz7/sign-off---banana-phone"
],
"guest": "Kenny Rogers"
},
{
"date": "2012-10-04",
"videos": [
"http://thecolbertreport.cc.com/videos/5uncqq/obama-s-debate-apathy---pbs",
"http://thecolbertreport.cc.com/videos/cl08kb/chris-matthews-s-impotent-rage",
"http://thecolbertreport.cc.com/videos/inrj8y/mitt-s-socialist-rhetoric---body-language",
"http://thecolbertreport.cc.com/videos/mw7xqx/mitt-s--etch-a-sketch--behavior",
"http://thecolbertreport.cc.com/videos/nvjrik/voter-fraud-alert---halloween---pennsylvania",
"http://thecolbertreport.cc.com/videos/fkt99i/george-church",
"http://thecolbertreport.cc.com/videos/8vqy9e/sign-off---rabbit-food"
],
"guest": "Dr. George Church"
},
{
"date": "2012-10-08",
"videos": [
"http://thecolbertreport.cc.com/videos/ohtrd9/intro---10-8-12",
"http://thecolbertreport.cc.com/videos/53brnc/unemployment-below-eight-percent",
"http://thecolbertreport.cc.com/videos/uey9b0/the-word---it-s-not-easy-having-green",
"http://thecolbertreport.cc.com/videos/s8mn29/koch-brothers---orc-senate-candidate",
"http://thecolbertreport.cc.com/videos/43khod/mark-kelly",
"http://thecolbertreport.cc.com/videos/sq2eio/sign-off---welcome-baby-brumm-"
],
"guest": "Mark Kelly"
},
{
"date": "2012-10-09",
"videos": [
"http://thecolbertreport.cc.com/videos/htdpl2/intro---10-9-12",
"http://thecolbertreport.cc.com/videos/69kfag/president-obama-s-obsessiveness-plea",
"http://thecolbertreport.cc.com/videos/0g0ihq/smokin--pole---the-quest-for-arctic-riches---china---russia",
"http://thecolbertreport.cc.com/videos/fu9mpp/mitt-romney-s-vague--long-winded-foreign-threats",
"http://thecolbertreport.cc.com/videos/fgftvy/morrissey"
],
"guest": "Morrissey"
},
{
"date": "2012-10-10",
"videos": [
"http://thecolbertreport.cc.com/videos/4jb3d3/intro---10-10-12",
"http://thecolbertreport.cc.com/videos/ejqp1v/beverage-based-polling---pizza-toppings-town-hall",
"http://thecolbertreport.cc.com/videos/jur0u9/the-word---meducation",
"http://thecolbertreport.cc.com/videos/t1y0rc/threatdown---apple-fan-bears--drunk-cars---bears",
"http://thecolbertreport.cc.com/videos/plccwf/naomi-wolf",
"http://thecolbertreport.cc.com/videos/od1her/sign-off----vagina--a-new-biography-"
],
"guest": "Naomi Wolf"
},
{
"date": "2012-10-11",
"videos": [
"http://thecolbertreport.cc.com/videos/6smkkc/intro---10-11-12",
"http://thecolbertreport.cc.com/videos/kiyawb/the-vice-presidential-debate",
"http://thecolbertreport.cc.com/videos/s190yi/this-changes-everything---obama-s-martian-gayness",
"http://thecolbertreport.cc.com/videos/2ksunf/formidable-opponent---mitt-romney",
"http://thecolbertreport.cc.com/videos/xhdwfk/chrystia-freeland",
"http://thecolbertreport.cc.com/videos/zr1go5/sign-off---goodnight"
],
"guest": "Chrystia Freeland"
},
{
"date": "2012-10-15",
"videos": [
"http://thecolbertreport.cc.com/videos/fuzsdf/intro---10-15-12",
"http://thecolbertreport.cc.com/videos/0bmyur/supersonic-space-jump",
"http://thecolbertreport.cc.com/videos/iudpa7/tip-wag---norway---american-family-association",
"http://thecolbertreport.cc.com/videos/0q2emr/monkey-on-the-lam---florida---monkey-on-the-gram",
"http://thecolbertreport.cc.com/videos/zj6xib/evan-thomas",
"http://thecolbertreport.cc.com/videos/n0kt18/sign-off---goodnight"
],
"guest": "Evan Thomas"
},
{
"date": "2012-10-16",
"videos": [
"http://thecolbertreport.cc.com/videos/keo9r0/the-wealth-edge----cool--debate-technology",
"http://thecolbertreport.cc.com/videos/4aqbh6/affirmative-action-supreme-court-case",
"http://thecolbertreport.cc.com/videos/y46z6y/affirmative-action-supreme-court-case---emily-bazelon",
"http://thecolbertreport.cc.com/videos/4uld4g/paul-ryan-s-phony-campaign-photo",
"http://thecolbertreport.cc.com/videos/4c7frp/cory-booker",
"http://thecolbertreport.cc.com/videos/juen77/sign-off---iphone"
],
"guest": "Cory Booker"
},
{
"date": "2012-10-17",
"videos": [
"http://thecolbertreport.cc.com/videos/wd584x/second-presidential-debate-showdown",
"http://thecolbertreport.cc.com/videos/rjvmac/libya-gate-scandal",
"http://thecolbertreport.cc.com/videos/j531em/stupid-town-hall-topics",
"http://thecolbertreport.cc.com/videos/jr7tf6/mitt-s-greatest-debate-triumph",
"http://thecolbertreport.cc.com/videos/hhxtxg/alpha-dog-of-the-week---scott-desjarlais",
"http://thecolbertreport.cc.com/videos/f4jil4/tyler-perry",
"http://thecolbertreport.cc.com/videos/namywp/sign-off---loose-teeth"
],
"guest": "Tyler Perry"
},
{
"date": "2012-10-18",
"videos": [
"http://thecolbertreport.cc.com/videos/1dfeya/celebrity-campaign-endorsements",
"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/special-report---a-shucking-disaster---nightmare-at-the-mitchell-corn-palace",
"http://thecolbertreport.cc.com/videos/t8vgd4/the-killers",
"http://thecolbertreport.cc.com/videos/ieuitc/sign-off----battle-born-"
],
"guest": "The Killers"
},
{
"date": "2012-10-22",
"videos": [
"http://thecolbertreport.cc.com/videos/0t7wmw/virginia-s-voter-fraud-fighter",
"http://thecolbertreport.cc.com/videos/jhyr4v/ceo-blackmail---fec-consent",
"http://thecolbertreport.cc.com/videos/t1yx0h/governor-magorium-s-ganja-emporium",
"http://thecolbertreport.cc.com/videos/8uddyg/donald-sadoway",
"http://thecolbertreport.cc.com/videos/czceut/sign-off---goodnight"
],
"guest": "Donald Sadoway"
},
{
"date": "2012-10-23",
"videos": [
"http://thecolbertreport.cc.com/videos/nept6x/stephen-colbert-s-debate-2012-coverage",
"http://thecolbertreport.cc.com/videos/wowfoq/elusive--mysterious--undecided-voters",
"http://thecolbertreport.cc.com/videos/twexhe/lance-armstrong-s-doping-scandal",
"http://thecolbertreport.cc.com/videos/hrawp4/john-grisham",
"http://thecolbertreport.cc.com/videos/rxk7z1/sign-off---manischewitz"
],
"guest": "John Grisham"
},
{
"date": "2012-10-24",
"videos": [
"http://thecolbertreport.cc.com/videos/3gbfdl/intro---10-24-12",
"http://thecolbertreport.cc.com/videos/ifrr4g/donald-trump-s-october-surprise",
"http://thecolbertreport.cc.com/videos/n9028e/nonstop-libya-gate-questions",
"http://thecolbertreport.cc.com/videos/gzidte/richard-mourdock-s-rape-comment",
"http://thecolbertreport.cc.com/videos/swkt4w/anthony-everitt",
"http://thecolbertreport.cc.com/videos/ug2zqb/sign-off---gop-rape-mention-tally"
],
"guest": "Anthony Everitt"
},
{
"date": "2012-10-25",
"videos": [
"http://thecolbertreport.cc.com/videos/7k4pkh/intro---10-25-12",
"http://thecolbertreport.cc.com/videos/a0h9on/voting---hormones",
"http://thecolbertreport.cc.com/videos/zu00re/stephen-ghoulbert-s-spooky-time-halloween-fun-guide---tom-hanks",
"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/sign-off---murderer-skull-model"
],
"guest": "Gov. Mitch Daniels"
},
{
"date": "2012-10-31",
"videos": [
"http://thecolbertreport.cc.com/videos/rky5ab/hurricane-sandy-s-aftermath",
"http://thecolbertreport.cc.com/videos/ey2jqz/hurricane-sandy---election-day",
"http://thecolbertreport.cc.com/videos/lk60fg/flamboyant-sandy---federal-relief-debate",
"http://thecolbertreport.cc.com/videos/5vx4ad/donald-trump-s-october-surprise-extension",
"http://thecolbertreport.cc.com/videos/x89ju7/lilly-ledbetter",
"http://thecolbertreport.cc.com/videos/jqfgo3/sign-off---american-red-cross---hurricane-sandy"
],
"guest": "Lilly Ledbetter"
},
{
"date": "2012-11-01",
"videos": [
"http://thecolbertreport.cc.com/videos/hk2ox4/intro---11-1-12",
"http://thecolbertreport.cc.com/videos/mtuxrh/hurricane-sandy-traffic-ordeal",
"http://thecolbertreport.cc.com/videos/pdmw4z/tip-wag---constant-documentation---billy-graham",
"http://thecolbertreport.cc.com/videos/rmzkbz/david-byrne---st--vincent",
"http://thecolbertreport.cc.com/videos/w4v4gd/sign-off---american-red-cross---hurricane-sandy"
],
"guest": "David Byrne & St. Vincent"
},
{
"date": "2012-11-05",
"videos": [
"http://thecolbertreport.cc.com/videos/mm7c7b/colbert-super-pac---severe-candidate-warning",
"http://thecolbertreport.cc.com/videos/h3qcht/shame-based-campaigning",
"http://thecolbertreport.cc.com/videos/ga4hky/shame-based-campaigning---sasha-issenberg",
"http://thecolbertreport.cc.com/videos/ef460s/-razor-tight--presidential-election",
"http://thecolbertreport.cc.com/videos/tl7vb4/nate-silver",
"http://thecolbertreport.cc.com/videos/i1cdch/sign-off---go-vote-"
],
"guest": "Nate Silver"
},
{
"date": "2012-11-06",
"videos": [
"http://thecolbertreport.cc.com/videos/2wfr8k/the-colbert-report-election-2012---who-will-replace-obama---012",
"http://thecolbertreport.cc.com/videos/ydqq2x/the-colbert-report-election-2012---too-close-to-call",
"http://thecolbertreport.cc.com/videos/b9hvj6/andrew-sullivan",
"http://thecolbertreport.cc.com/videos/vghwne/senate-races---state-referenda",
"http://thecolbertreport.cc.com/videos/cao81i/sign-off---election-reflections"
],
"guest": "Andrew Sullivan"
},
{
"date": "2012-11-07",
"videos": [
"http://thecolbertreport.cc.com/videos/d96ihg/intro---11-7-12",
"http://thecolbertreport.cc.com/videos/zviz5s/four-more-years-of-hopey-change",
"http://thecolbertreport.cc.com/videos/hbkurh/nontraditional-non-white-america",
"http://thecolbertreport.cc.com/videos/btqtta/polling-irregularities---vote-by-phone-scam",
"http://thecolbertreport.cc.com/videos/wjevw3/wind-power-s-health-hazards",
"http://thecolbertreport.cc.com/videos/xs8d72/doris-kearns-goodwin",
"http://thecolbertreport.cc.com/videos/6iwo2a/sign-off---solace-in-a-bottle"
],
"guest": "Doris Kearns Goodwin"
},
{
"date": "2012-11-08",
"videos": [
"http://thecolbertreport.cc.com/videos/lttdhm/intro---11-8-12",
"http://thecolbertreport.cc.com/videos/op51y2/nor-easter---mitt-romney",
"http://thecolbertreport.cc.com/videos/ryj0jw/difference-makers---stephen-dick-jr-",
"http://thecolbertreport.cc.com/videos/25lwb9/the-plight-of-platonic-relationships",
"http://thecolbertreport.cc.com/videos/doygtf/rachel-maddow",
"http://thecolbertreport.cc.com/videos/jzxfgf/sign-off---goodnight"
],
"guest": "Rachel Maddow"
},
{
"date": "2012-11-12",
"videos": [
"http://thecolbertreport.cc.com/videos/3szdub/david-petraeus-s--all-in--affair",
"http://thecolbertreport.cc.com/videos/kj1cs9/colbert-super-pac-shh----karl-rove---jon-stewart",
"http://thecolbertreport.cc.com/videos/66y7dx/colbert-super-pac-shh----secret-second-501c4---trevor-potter",
"http://thecolbertreport.cc.com/videos/tl4uce/blitzkrieg-on-grinchitude---santa-s-pipe",
"http://thecolbertreport.cc.com/videos/6vpcf3/ken-burns",
"http://thecolbertreport.cc.com/videos/3w1i4s/sign-off---goodbye-colbert-super-pac"
],
"guest": "Ken Burns"
},
{
"date": "2012-11-13",
"videos": [
"http://thecolbertreport.cc.com/videos/i9yvhl/intro---11-13-12",
"http://thecolbertreport.cc.com/videos/uml8yd/2072--race-to-the-white-orb",
"http://thecolbertreport.cc.com/videos/s5vmrx/tip-wag---pranab-mukherjee--brazilian-scientists--sonia-sotomayor",
"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/sign-off---goodnight"
],
"guest": "Newt Gingrich"
},
{
"date": "2012-11-14",
"videos": [
"http://thecolbertreport.cc.com/videos/e0pxrk/intro---11-14-12",
"http://thecolbertreport.cc.com/videos/3zu15f/who-s-attacking-me-now----canadian-broadcasting-corporation",
"http://thecolbertreport.cc.com/videos/kvs6wn/high-frequency-trading",
"http://thecolbertreport.cc.com/videos/ba8i6j/high-frequency-trading---christopher-steiner",
"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/sign-off---goodnight"
],
"guest": "Tony Kushner"
},
{
"date": "2012-11-15",
"videos": [
"http://thecolbertreport.cc.com/videos/cazbp6/intro---11-15-12",
"http://thecolbertreport.cc.com/videos/regxdh/millennial-generation-soup-campaign",
"http://thecolbertreport.cc.com/videos/jy83mg/general-s-hospital",
"http://thecolbertreport.cc.com/videos/xve006/cheating-death---flu-fighting-meth",
"http://thecolbertreport.cc.com/videos/we1zlp/chris-stringer",
"http://thecolbertreport.cc.com/videos/f23a7f/sign-off---the-colbert-report-s-seventh-anniversary"
],
"guest": "Chris Stringer"
},
{
"date": "2012-11-26",
"videos": [
"http://thecolbertreport.cc.com/videos/9ex0kp/intro---11-26-12",
"http://thecolbertreport.cc.com/videos/i4lmrj/stephen-s-thanksgiving---holy-black-friday",
"http://thecolbertreport.cc.com/videos/242ato/judge--jury---executioner---copyright-law",
"http://thecolbertreport.cc.com/videos/ob3lcn/blitzkrieg-on-grinchitude---pope-benedict-xvi",
"http://thecolbertreport.cc.com/videos/std5aq/jake-tapper",
"http://thecolbertreport.cc.com/videos/o2lec3/sign-off---goodnight"
],
"guest": "Jake Tapper"
},
{
"date": "2012-11-27",
"videos": [
"http://thecolbertreport.cc.com/videos/oh9w4r/canada-s-grinch",
"http://thecolbertreport.cc.com/videos/7imsna/the-fiscal-cliff-compromise",
"http://thecolbertreport.cc.com/videos/72sdt0/the-fiscal-cliff-compromise---reihan-salam",
"http://thecolbertreport.cc.com/videos/1fuekz/dolly-parton",
"http://thecolbertreport.cc.com/videos/nqrlrq/sign-off---country-chords"
],
"guest": "Dolly Parton"
},
{
"date": "2012-11-28",
"videos": [
"http://thecolbertreport.cc.com/videos/ui3lan/intro---11-28-12",
"http://thecolbertreport.cc.com/videos/omvkv3/record-powerball-jackpot",
"http://thecolbertreport.cc.com/videos/tnr1l8/the-word---sisters-are-doing-it-to-themselves",
"http://thecolbertreport.cc.com/videos/xpxkwl/filibuster-reform",
"http://thecolbertreport.cc.com/videos/qc393o/frank-oz",
"http://thecolbertreport.cc.com/videos/b9jkcc/sign-off---stephen-s-muppet"
],
"guest": "Frank Oz"
},
{
"date": "2012-11-29",
"videos": [
"http://thecolbertreport.cc.com/videos/gnb0gv/intro---11-29-12",
"http://thecolbertreport.cc.com/videos/cehmsr/moon-shattering-news",
"http://thecolbertreport.cc.com/videos/9o0ttj/tip-wag---gay-rights-pioneers---gun-dorms",
"http://thecolbertreport.cc.com/videos/dgy710/top-10-of-2012---operation-killing--killing-kennedy-",
"http://thecolbertreport.cc.com/videos/qyxymb/sean-carroll",
"http://thecolbertreport.cc.com/videos/z8pd91/sign-off---acceptance-speech"
],
"guest": "Sean Carroll"
},
{
"date": "2012-12-03",
"videos": [
"http://thecolbertreport.cc.com/videos/c2msxt/the-pundit--or-colbert-and-back-again",
"http://thecolbertreport.cc.com/videos/i94qww/the-pundit--or-colbert-and-back-again---hobbit-week-lineup",
"http://thecolbertreport.cc.com/videos/zkpe65/the-word---base-instincts",
"http://thecolbertreport.cc.com/videos/47ssk7/senior-moment---granny-pods",
"http://thecolbertreport.cc.com/videos/zm84yu/ian-mckellen",
"http://thecolbertreport.cc.com/videos/u8z3mx/sign-off---the-pundit--or-colbert-and-back-again---sting"
],
"guest": "Ian McKellen"
},
{
"date": "2012-12-04",
"videos": [
"http://thecolbertreport.cc.com/videos/ri5csw/the-pundit--or-colbert-and-back-again---hobbit-week-night-two",
"http://thecolbertreport.cc.com/videos/q3aiti/low-t---low-o",
"http://thecolbertreport.cc.com/videos/n7lg1x/kate-the-great-s-morning-sickness",
"http://thecolbertreport.cc.com/videos/v8syf8/martin-freeman",
"http://thecolbertreport.cc.com/videos/rmahy7/sign-off---the-pundit--or-colbert-and-back-again---rivendell"
],
"guest": "Martin Freeman"
},
{
"date": "2012-12-05",
"videos": [
"http://thecolbertreport.cc.com/videos/qtkdcn/the-pundit--or-colbert-and-back-again---hobbit-week-night-three",
"http://thecolbertreport.cc.com/videos/6x66a7/the-word---hire-learning",
"http://thecolbertreport.cc.com/videos/9j5qtc/politicos---paranoid-fantasies",
"http://thecolbertreport.cc.com/videos/m8dp2f/andy-serkis",
"http://thecolbertreport.cc.com/videos/msip4s/sign-off---the-pundit--or-colbert-and-back-again---one-ring"
],
"guest": "Peter Jackson"
},
{
"date": "2012-12-06",
"videos": [
"http://thecolbertreport.cc.com/videos/teluzg/the-pundit--or-colbert-and-back-again---hobbit-week-night-four",
"http://thecolbertreport.cc.com/videos/hhe4hg/jim-demint-s-resignation",
"http://thecolbertreport.cc.com/videos/d0n0vz/stephen-colbert--wax-on---wax-off-at-madame-tussauds-pt--1",
"http://thecolbertreport.cc.com/videos/1voj50/stephen-colbert--wax-on---wax-off-at-madame-tussauds-pt--2",
"http://thecolbertreport.cc.com/videos/0tvck8/peter-jackson",
"http://thecolbertreport.cc.com/videos/fbqohj/sign-off---the-pundit--or-colbert-and-back-again---hobbit-week-concludes"
],
"guest": "Andy Serkis"
},
{
"date": "2012-12-10",
"videos": [
"http://thecolbertreport.cc.com/videos/0cfmll/stephen-for-u-s--senate",
"http://thecolbertreport.cc.com/videos/8skoq2/fox-news-s-secret-presidential-recruit",
"http://thecolbertreport.cc.com/videos/gdygvq/diana-krall"
],
"guest": "Diana Krall, Elvis Costello"
},
{
"date": "2012-12-11",
"videos": [
"http://thecolbertreport.cc.com/videos/t45azb/intro---12-11-12",
"http://thecolbertreport.cc.com/videos/69xjmc/fiscal-cliff-negotiations",
"http://thecolbertreport.cc.com/videos/iwvp9d/threatdown---commie-unicorns---foreman-barbie",
"http://thecolbertreport.cc.com/videos/8is78z/ex-gay-therapy-debate",
"http://thecolbertreport.cc.com/videos/m3omdi/malcolm-gladwell"
],
"guest": "Malcolm Gladwell, Audra McDonald"
},
{
"date": "2012-12-12",
"videos": [
"http://thecolbertreport.cc.com/videos/hoair6/success-for-operation-killing--killing-kennedy-",
"http://thecolbertreport.cc.com/videos/8aazot/stephen-s-appointment-with-destiny---jeff-bingaman",
"http://thecolbertreport.cc.com/videos/yr83zl/ground-zero-mosque-erade",
"http://thecolbertreport.cc.com/videos/38iv8s/mandy-patinkin"
],
"guest": "Mandy Patinkin, Michael Stipe"
},
{
"date": "2012-12-13",
"videos": [
"http://thecolbertreport.cc.com/videos/ao4d2q/hurricane-sandy-mega-concert",
"http://thecolbertreport.cc.com/videos/dseos2/uncensored----breaking-abbey-",
"http://thecolbertreport.cc.com/videos/clpvpj/colbert-super-pac---the-ham-rove-memorial-fund",
"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://thecolbertreport.cc.com/videos/bgkrwx/intro---1-7-13",
"http://thecolbertreport.cc.com/videos/83h5da/stephen-s-holiday-break",
"http://thecolbertreport.cc.com/videos/9nmhtf/fiscal-cliff-deal---disincentives",
"http://thecolbertreport.cc.com/videos/wq7dip/the-platinum-debt-ceiling-solution",
"http://thecolbertreport.cc.com/videos/b1uvtc/blood-in-the-water---bill-o-reilly-s-racial-insensitivity",
"http://thecolbertreport.cc.com/videos/ayoamg/jimmy-wales",
"http://thecolbertreport.cc.com/videos/a1dzb3/sign-off---goodnight"
],
"guest": "Jimmy Wales"
},
{
"date": "2013-01-08",
"videos": [
"http://thecolbertreport.cc.com/videos/fuxwr9/intro---1-8-13",
"http://thecolbertreport.cc.com/videos/gdcdgs/postage-price-hike",
"http://thecolbertreport.cc.com/videos/vcqeg7/cheating-death---rage---blood-transfusions",
"http://thecolbertreport.cc.com/videos/ps8djx/bin-laden-film-controversy",
"http://thecolbertreport.cc.com/videos/kq9pp2/chris-kluwe",
"http://thecolbertreport.cc.com/videos/gcv2eh/sign-off---vacsa-tern"
],
"guest": "Chris Kluwe"
},
{
"date": "2013-01-09",
"videos": [
"http://thecolbertreport.cc.com/videos/kg1znk/intro---1-9-13",
"http://thecolbertreport.cc.com/videos/ip7ql9/idaho-s-walled---armed-community",
"http://thecolbertreport.cc.com/videos/tzcfhr/gun-control-backlash",
"http://thecolbertreport.cc.com/videos/52uula/thought-for-food---wheat-addictions",
"http://thecolbertreport.cc.com/videos/ysa6lr/neil-shubin",
"http://thecolbertreport.cc.com/videos/5majke/sign-off---mcgnaw-the-gluten-free-beaver"
],
"guest": "Neil Shubin"
},
{
"date": "2013-01-10",
"videos": [
"http://thecolbertreport.cc.com/videos/uej3ac/roadside-sofa-boning",
"http://thecolbertreport.cc.com/videos/5n5w35/obama-s-failed-second-term",
"http://thecolbertreport.cc.com/videos/35sqrd/tip-wag---hapifork---kevin-garnett",
"http://thecolbertreport.cc.com/videos/ro7hjf/benjamin-gibbard"
],
"guest": "Ben Gibbard"
},
{
"date": "2013-01-14",
"videos": [
"http://thecolbertreport.cc.com/videos/y2ynrh/stephen-colbert-s-double-barrel-blam-o-rama---silver-bullets---video-games",
"http://thecolbertreport.cc.com/videos/8zsm19/stephen-colbert-s-double-barrel-blam-o-rama---piers-morgan---james-yeager",
"http://thecolbertreport.cc.com/videos/zftq7q/stephen-colbert-s-double-barrel-blam-o-rama---guns-as-civil-rights-victims",
"http://thecolbertreport.cc.com/videos/4lcqtx/vitaminwater-advertising-lawsuit",
"http://thecolbertreport.cc.com/videos/bainem/piers-morgan",
"http://thecolbertreport.cc.com/videos/hoc2kn/sign-off---pocketbook-constitution"
],
"guest": "Piers Morgan"
},
{
"date": "2013-01-15",
"videos": [
"http://thecolbertreport.cc.com/videos/t6cye7/intro---1-15-13",
"http://thecolbertreport.cc.com/videos/p5ll7c/lance-armstrong-s-interview-with-oprah",
"http://thecolbertreport.cc.com/videos/uuduw3/monkey-on-the-lam---macaque-attack---1-381-days-of-simian-terror-in-tampa",
"http://thecolbertreport.cc.com/videos/r78s3t/catacoffin-catacombo-sound-system",
"http://thecolbertreport.cc.com/videos/an9lge/jared-diamond",
"http://thecolbertreport.cc.com/videos/usj2pz/sign-off---goodnight"
],
"guest": "Jared Diamond"
},
{
"date": "2013-01-16",
"videos": [
"http://thecolbertreport.cc.com/videos/j56lbb/intro---1-16-13",
"http://thecolbertreport.cc.com/videos/s9aj13/healthy-fake-smiles",
"http://thecolbertreport.cc.com/videos/uhkynp/hsbc-laundering-charges",
"http://thecolbertreport.cc.com/videos/hbxrk6/hsbc-laundering-charges---matt-taibbi",
"http://thecolbertreport.cc.com/videos/62nu7n/pat-robertson-s-romance-advice",
"http://thecolbertreport.cc.com/videos/m7jh2f/tom-brokaw",
"http://thecolbertreport.cc.com/videos/ib0ftp/sign-off---goodnight"
],
"guest": "Tom Brokaw"
},
{
"date": "2013-01-17",
"videos": [
"http://thecolbertreport.cc.com/videos/r3kb1q/exclusive---colbert-wax-on---wax-off-at-madame-tussauds--outtakes",
"http://thecolbertreport.cc.com/videos/qqx0s8/corporate-scamwich",
"http://thecolbertreport.cc.com/videos/df7rup/obama-s-gun-grab",
"http://thecolbertreport.cc.com/videos/w73nzv/the-word---united-we-standoff",
"http://thecolbertreport.cc.com/videos/g1jrq5/porn-names---porn-lawsuits",
"http://thecolbertreport.cc.com/videos/vem33s/akhil-reed-amar",
"http://thecolbertreport.cc.com/videos/jawwj8/sign-off---goodnight"
],
"guest": "Akhil Reed Amar"
},
{
"date": "2013-01-21",
"videos": [
"http://thecolbertreport.cc.com/videos/zzot6e/intro---1-21-13",
"http://thecolbertreport.cc.com/videos/xjexam/obama-s-second-inauguration",
"http://thecolbertreport.cc.com/videos/li25sm/stephen-s-re-inauguration",
"http://thecolbertreport.cc.com/videos/djvjxw/threatdown---flu--kate-middleton--vomiting-robots--superintelligent-gonorrhea--bears",
"http://thecolbertreport.cc.com/videos/o7bw1e/ta-nehisi-coates",
"http://thecolbertreport.cc.com/videos/9hwods/sign-off---hotel-bibles"
],
"guest": "Ta-Nehisi Coates"
},
{
"date": "2013-01-22",
"videos": [
"http://thecolbertreport.cc.com/videos/u2sxvp/exclusive---kathryn-bigelow-extended-interview",
"http://thecolbertreport.cc.com/videos/4h7ltu/obama-s-inauguration---class-warfare",
"http://thecolbertreport.cc.com/videos/0f673t/the-word---win--lose--or-redraw",
"http://thecolbertreport.cc.com/videos/tccphp/dustin-hoffman-s-bad-news",
"http://thecolbertreport.cc.com/videos/rn0fho/kathryn-bigelow",
"http://thecolbertreport.cc.com/videos/msaso2/sign-off----zero-dark-thirty-----quartet-"
],
"guest": "Kathryn Bigelow"
},
{
"date": "2013-01-23",
"videos": [
"http://thecolbertreport.cc.com/videos/3reklz/beyonce-s-lip-gate",
"http://thecolbertreport.cc.com/videos/vw3zie/tip-wag---montpelier-school-district--theatlasphere-com---florida-officials",
"http://thecolbertreport.cc.com/videos/f3o0qj/alpha-dog-of-the-week---virginia-state-senate-republicans",
"http://thecolbertreport.cc.com/videos/202a1c/sally-field",
"http://thecolbertreport.cc.com/videos/hd80sm/sign-off---goodnight"
],
"guest": "Sally Field"
},
{
"date": "2013-01-24",
"videos": [
"http://thecolbertreport.cc.com/videos/xaaxud/france---the-mali-conflict",
"http://thecolbertreport.cc.com/videos/i1sdq5/france---the-mali-conflict---edward-berenson",
"http://thecolbertreport.cc.com/videos/vgqq4z/benghazi-attack-hearing",
"http://thecolbertreport.cc.com/videos/ktiaje/tavi-gevinson",
"http://thecolbertreport.cc.com/videos/scixor/sign-off---stephen-s-makeover"
],
"guest": "Tavi Gevinson"
},
{
"date": "2013-01-28",
"videos": [
"http://thecolbertreport.cc.com/videos/q1iuxz/intro---1-28-13",
"http://thecolbertreport.cc.com/videos/27at9z/rapiscan-scanners",
"http://thecolbertreport.cc.com/videos/mm5bdz/the-word---the-new-abnormal",
"http://thecolbertreport.cc.com/videos/0q31iw/the-axis-of-evil-of-the-week---north-korea",
"http://thecolbertreport.cc.com/videos/qdf7ec/michael-shellenberger",
"http://thecolbertreport.cc.com/videos/tquuvs/sign-off---goodnight"
],
"guest": "Michael Shellenberger"
},
{
"date": "2013-01-29",
"videos": [
"http://thecolbertreport.cc.com/videos/4ax2hi/intro---1-29-13",
"http://thecolbertreport.cc.com/videos/81oaln/iran-s-space-monkey---america-s-ape-moratorium",
"http://thecolbertreport.cc.com/videos/k95k9v/gun-control---state-sovereignty",
"http://thecolbertreport.cc.com/videos/7c8y4f/gun-control---state-sovereignty---cliff-sloan",
"http://thecolbertreport.cc.com/videos/gfoq4g/guantanamo-bay-office-closure",
"http://thecolbertreport.cc.com/videos/jtkgrc/george-saunders",
"http://thecolbertreport.cc.com/videos/jzuerq/sign-off----tenth-of-december-"
],
"guest": "George Saunders"
},
{
"date": "2013-01-30",
"videos": [
"http://thecolbertreport.cc.com/videos/omljip/intro---1-30-13",
"http://thecolbertreport.cc.com/videos/drdd3e/coming-out-benefits---gay-rights",
"http://thecolbertreport.cc.com/videos/qnfsur/the-word---it-gets-worse",
"http://thecolbertreport.cc.com/videos/i6hr57/non-racist-kkk",
"http://thecolbertreport.cc.com/videos/kiwt0s/bill-gates",
"http://thecolbertreport.cc.com/videos/4wroqd/sign-off---goodnight"
],
"guest": "Bill Gates"
},
{
"date": "2013-01-31",
"videos": [
"http://thecolbertreport.cc.com/videos/101faw/sport-report---ads-for-ads---deer-antler-spray",
"http://thecolbertreport.cc.com/videos/odn1pg/sport-report---gatorade-chemicals---chicken-wing-shortage",
"http://thecolbertreport.cc.com/videos/7wymxs/craziest-f--king-thing-i-ve-ever-heard---crows-using-tools",
"http://thecolbertreport.cc.com/videos/v42kz3/matthew-guerrieri",
"http://thecolbertreport.cc.com/videos/o489no/sign-off---welcome-baby-sanchez-"
],
"guest": "Matthew Guerrieri"
},
{
"date": "2013-02-04",
"videos": [
"http://thecolbertreport.cc.com/videos/iyrevo/intro---2-4-13",
"http://thecolbertreport.cc.com/videos/kb76z3/super-bowl-xlvii",
"http://thecolbertreport.cc.com/videos/vow0uy/bipartisan-immigration-reform",
"http://thecolbertreport.cc.com/videos/ur7z4s/skeet-shooting-skeptics",
"http://thecolbertreport.cc.com/videos/qxsatq/sonia-sotomayor",
"http://thecolbertreport.cc.com/videos/cmttl3/sign-off---second-amendment"
],
"guest": "Justice Sonia Sotomayor"
},
{
"date": "2013-02-05",
"videos": [
"http://thecolbertreport.cc.com/videos/2316uc/intro---2-5-13",
"http://thecolbertreport.cc.com/videos/e96s3c/royal-remains",
"http://thecolbertreport.cc.com/videos/t6wn9f/tip-wag---drunk-donating----the-job--reality-show",
"http://thecolbertreport.cc.com/videos/a1z0cu/california-s-heroic-hitchhiker",
"http://thecolbertreport.cc.com/videos/dyxduh/julie-andrews",
"http://thecolbertreport.cc.com/videos/y7gdjs/sign-off---final-rose"
],
"guest": "Julie Andrews"
},
{
"date": "2013-02-06",
"videos": [
"http://thecolbertreport.cc.com/videos/ae7fmq/intro---2-6-13",
"http://thecolbertreport.cc.com/videos/33sahu/the-penny-pinch",
"http://thecolbertreport.cc.com/videos/r6xbr9/stephen-s-sister-for-congress",
"http://thecolbertreport.cc.com/videos/07240r/scientology-church-violence",
"http://thecolbertreport.cc.com/videos/acokbc/lawrence-wright",
"http://thecolbertreport.cc.com/videos/kt2abh/sign-off---watermelon-warning"
],
"guest": "Lawrence Wright"
},
{
"date": "2013-02-07",
"videos": [
"http://thecolbertreport.cc.com/videos/14j8d1/intro---2-7-13",
"http://thecolbertreport.cc.com/videos/k4xzoo/winter-storm-nemo",
"http://thecolbertreport.cc.com/videos/xknwhm/mr--smith-goes-to-the-state-legislature---stacey-campfield",
"http://thecolbertreport.cc.com/videos/044mxj/-bang-with-friends--app",
"http://thecolbertreport.cc.com/videos/eqsq39/benh-zeitlin",
"http://thecolbertreport.cc.com/videos/xarh0o/sign-off---goodnight"
],
"guest": "Behn Zeitlin"
},
{
"date": "2013-02-11",
"videos": [
"http://thecolbertreport.cc.com/videos/xstxbo/bush-family-email-hack",
"http://thecolbertreport.cc.com/videos/s7p70k/pope-s-resignation---papal-speculatron-7500",
"http://thecolbertreport.cc.com/videos/v1p2wr/pope-s-resignation---papal-speculatron-7500---james-martin",
"http://thecolbertreport.cc.com/videos/he6l0j/garry-wills",
"http://thecolbertreport.cc.com/videos/38op41/sign-off----why-priests--"
],
"guest": "Garry Wills"
},
{
"date": "2013-02-12",
"videos": [
"http://thecolbertreport.cc.com/videos/hbhjqi/intro---2-12-13",
"http://thecolbertreport.cc.com/videos/hwigu9/rnc-autopsy",
"http://thecolbertreport.cc.com/videos/6t4bfw/conservative-victory-project",
"http://thecolbertreport.cc.com/videos/b91wqa/arizona-s-gun-posse",
"http://thecolbertreport.cc.com/videos/87jshg/roger-hodge",
"http://thecolbertreport.cc.com/videos/4j42vn/sign-off---goodnight"
],
"guest": "Roger Hodge"
},
{
"date": "2013-02-13",
"videos": [
"http://thecolbertreport.cc.com/videos/r8y2v4/obama-s-state-of-the-union",
"http://thecolbertreport.cc.com/videos/7g4eal/state-of-the-rubio",
"http://thecolbertreport.cc.com/videos/89tt3v/spanish-state-of-the-rubio",
"http://thecolbertreport.cc.com/videos/wrywsk/dave-grohl",
"http://thecolbertreport.cc.com/videos/rsui4q/sign-off---dry-mouth"
],
"guest": "Dave Grohl"
},
{
"date": "2013-02-14",
"videos": [
"http://thecolbertreport.cc.com/videos/8k6qf1/st--valentine-s-day",
"http://thecolbertreport.cc.com/videos/bg5se9/standard---poor-s-ratings-lawsuit",
"http://thecolbertreport.cc.com/videos/a7o9iy/standard---poor-s-ratings-lawsuit---david-leonhardt",
"http://thecolbertreport.cc.com/videos/gha2xx/nailed--em---richard-eggers",
"http://thecolbertreport.cc.com/videos/jipac1/gavin-newsom",
"http://thecolbertreport.cc.com/videos/tl6blx/sign-off----here-s-the-deal-"
],
"guest": "Gavin Newsom"
},
{
"date": "2013-02-19",
"videos": [
"http://thecolbertreport.cc.com/videos/mk66vx/russian-meteor-strike",
"http://thecolbertreport.cc.com/videos/18bt84/colbert-platinum---huayra-sports-car--phil-mickelson---belle-isle",
"http://thecolbertreport.cc.com/videos/nzi8fo/obama-s-secretive-golf-outing",
"http://thecolbertreport.cc.com/videos/qsppoj/emily-bazelon",
"http://thecolbertreport.cc.com/videos/rivg1z/sign-off---goodnight"
],
"guest": "Emily Bazelon"
},
{
"date": "2013-02-20",
"videos": [
"http://thecolbertreport.cc.com/videos/tq706t/u-k--horse-meat-scandal",
"http://thecolbertreport.cc.com/videos/76hws3/sport-report---international-soccer-corruption",
"http://thecolbertreport.cc.com/videos/t95tyj/sport-report---international-soccer-corruption---alexi-lalas",
"http://thecolbertreport.cc.com/videos/oy70q1/norway-s--national-firewood-night-",
"http://thecolbertreport.cc.com/videos/d68kfy/david-goldhill",
"http://thecolbertreport.cc.com/videos/4869v6/sign-off---goodnight"
],
"guest": "David Goldhill"
},
{
"date": "2013-02-21",
"videos": [
"http://thecolbertreport.cc.com/videos/5dzdoq/-friends-of-hamas--rumor",
"http://thecolbertreport.cc.com/videos/0x6brn/geo-group-stadium",
"http://thecolbertreport.cc.com/videos/yhhjej/corporate-twitter-hacks",
"http://thecolbertreport.cc.com/videos/ef8eii/lil-buck"
],
"guest": "Lil Buck"
},
{
"date": "2013-02-25",
"videos": [
"http://thecolbertreport.cc.com/videos/dysmy8/intro---2-25-13",
"http://thecolbertreport.cc.com/videos/n5lz93/the-word---silent-but-deadly",
"http://thecolbertreport.cc.com/videos/ub1skg/popewatch-2013---vatican-sex-parties",
"http://thecolbertreport.cc.com/videos/ovpx97/simon-garfield",
"http://thecolbertreport.cc.com/videos/7ucjsc/sign-off---goodnight"
],
"guest": "Simon Garfield"
},
{
"date": "2013-02-26",
"videos": [
"http://thecolbertreport.cc.com/videos/8vjzyf/intro---2-26-13",
"http://thecolbertreport.cc.com/videos/gy9em4/popewatch-indeschism-2013---one-pope-over-the-line",
"http://thecolbertreport.cc.com/videos/f5k4cb/battleground-texas---jeremy-bird",
"http://thecolbertreport.cc.com/videos/xdriyp/drone-ducking-tips",
"http://thecolbertreport.cc.com/videos/wr3lk3/michio-kaku",
"http://thecolbertreport.cc.com/videos/i7sahj/sign-off---goodnight"
],
"guest": "Dr. Michio Kaku"
},
{
"date": "2013-02-27",
"videos": [
"http://thecolbertreport.cc.com/videos/6637zm/intro---2-27-13",
"http://thecolbertreport.cc.com/videos/8okga0/halls-mentho-lyptus-cough-drops",
"http://thecolbertreport.cc.com/videos/9mtjmn/khalid-sheikh-mohammed-s-trial-at-gitmo",
"http://thecolbertreport.cc.com/videos/9mvj8u/khalid-sheikh-mohammed-s-trial-at-gitmo---neal-katyal",
"http://thecolbertreport.cc.com/videos/r7gapm/john-kerry-s-dumb-talk",
"http://thecolbertreport.cc.com/videos/cxjhmj/paola-antonelli",
"http://thecolbertreport.cc.com/videos/7trotu/sign-off---halls-mentho-lyptus"
],
"guest": "Paola Antonelli"
},
{
"date": "2013-02-28",
"videos": [
"http://thecolbertreport.cc.com/videos/hmyuom/intro---2-28-13",
"http://thecolbertreport.cc.com/videos/1epo24/colbert-report-consumer-alert---demonic-goodwill-items",
"http://thecolbertreport.cc.com/videos/d7le3o/pope-tbd---souvenir-sales",
"http://thecolbertreport.cc.com/videos/tnbuj0/budget-sequestration",
"http://thecolbertreport.cc.com/videos/66dbox/jon-favreau",
"http://thecolbertreport.cc.com/videos/o5hoan/sign-off---goodnight"
],
"guest": "Obama speechwriter Jon Favreau"
},
{
"date": "2013-03-04",
"videos": [
"http://thecolbertreport.cc.com/videos/ouzof3/sequestration---obama-s-sci-fi-flub",
"http://thecolbertreport.cc.com/videos/xlk2nw/the-enemy-within---dr--skylar-bayer",
"http://thecolbertreport.cc.com/videos/4v9opj/texas-gun-training-bill---free-shotgun-experiment",
"http://thecolbertreport.cc.com/videos/ala255/kirk-bloodsworth",
"http://thecolbertreport.cc.com/videos/7xfdsz/sign-off---goodnight"
],
"guest": "Kirk Bloodsworth"
},
{
"date": "2013-03-05",
"videos": [
"http://thecolbertreport.cc.com/videos/johtnl/intro---3-5-13",
"http://thecolbertreport.cc.com/videos/d8ua02/hugo-chavez---jon-stewart-announcements",
"http://thecolbertreport.cc.com/videos/yesa8j/obama-s-israel-trip",
"http://thecolbertreport.cc.com/videos/xeotb9/obama-s-israel-trip---michael-oren",
"http://thecolbertreport.cc.com/videos/r5gahs/dennis-tito-s-mars-flyby-mission",
"http://thecolbertreport.cc.com/videos/23396i/james-franco",
"http://thecolbertreport.cc.com/videos/ki0n4m/sign-off---goodnight"
],
"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/voting-rights-act---julian-bond",
"http://thecolbertreport.cc.com/videos/3ddous/thought-for-food---bloomberg---the-nacho-bliss-point",
"http://thecolbertreport.cc.com/videos/25fidf/brendan-o-connell",
"http://thecolbertreport.cc.com/videos/76de2t/sign-off---tostitos-scoops"
],
"guest": "Brendan O'Connell"
},
{
"date": "2013-03-07",
"videos": [
"http://thecolbertreport.cc.com/videos/7nblia/rand-paul-s-filibuster",
"http://thecolbertreport.cc.com/videos/aq09bw/north-korea-s-armistice-breach----we-are-the-world--propaganda-video",
"http://thecolbertreport.cc.com/videos/rz6ppl/the-bachelor",
"http://thecolbertreport.cc.com/videos/uldxcb/john-sexton",
"http://thecolbertreport.cc.com/videos/mhruf7/sign-off---land-of-romance"
],
"guest": "John Sexton"
},
{
"date": "2013-03-25",
"videos": [
"http://thecolbertreport.cc.com/videos/6zcxhr/election-of-pope-francis",
"http://thecolbertreport.cc.com/videos/t23n7e/history-channel-s--the-bible-",
"http://thecolbertreport.cc.com/videos/7cya4y/colbert-super-pac---ham-rove-memorial-conference-room",
"http://thecolbertreport.cc.com/videos/bwz16t/junot-diaz",
"http://thecolbertreport.cc.com/videos/vwhyh8/sign-off----the-bible-"
],
"guest": "Junot Diaz"
},
{
"date": "2013-03-26",
"videos": [
"http://thecolbertreport.cc.com/videos/ftxoqq/gop-growth---opportunity-project",
"http://thecolbertreport.cc.com/videos/k5798h/the-word---narcicitizenship",
"http://thecolbertreport.cc.com/videos/rj8f1x/stephen-colbert-is-watching-your-kids---whale-bone-porn",
"http://thecolbertreport.cc.com/videos/udr4lu/eric-topol",
"http://thecolbertreport.cc.com/videos/755nas/sign-off---medical-smartphone"
],
"guest": "Dr. Eric Topol"
},
{
"date": "2013-03-27",
"videos": [
"http://thecolbertreport.cc.com/videos/lapsll/intro---3-27-13",
"http://thecolbertreport.cc.com/videos/8f2crl/bill-o-reilly-on-gay-marriage",
"http://thecolbertreport.cc.com/videos/jk0icd/facebook--like--button-science",
"http://thecolbertreport.cc.com/videos/gd7ki7/sharia-mops",
"http://thecolbertreport.cc.com/videos/0i05bg/carl-edgar-blake-ii",
"http://thecolbertreport.cc.com/videos/8g5b2m/sign-off---hamlet"
],
"guest": "Carl Edgar Blake II"
},
{
"date": "2013-03-28",
"videos": [
"http://thecolbertreport.cc.com/videos/mmwqg6/supreme-court-hearings-on-gay-marriage",
"http://thecolbertreport.cc.com/videos/o26xyc/supreme-court-hearings-on-gay-marriage---emily-bazelon-pt--1",
"http://thecolbertreport.cc.com/videos/qbupod/supreme-court-hearings-on-gay-marriage---emily-bazelon-pt--2",
"http://thecolbertreport.cc.com/videos/sliefv/robert-lustig",
"http://thecolbertreport.cc.com/videos/qlgxw8/sign-off---goodnight"
],
"guest": "Dr. Robert Lustig"
},
{
"date": "2013-04-01",
"videos": [
"http://thecolbertreport.cc.com/videos/j7yyx1/intro---4-1-13",
"http://thecolbertreport.cc.com/videos/mbhysf/easter-under-attack---pope-edition",
"http://thecolbertreport.cc.com/videos/egcbz2/health-care-lottery",
"http://thecolbertreport.cc.com/videos/g3wft7/utah-s-earth-day-celebration",
"http://thecolbertreport.cc.com/videos/rmu5w0/sigourney-weaver",
"http://thecolbertreport.cc.com/videos/lt4lab/sign-off---welcome-baby-nurick-"
],
"guest": "Sigourney Weaver"
},
{
"date": "2013-04-02",
"videos": [
"http://thecolbertreport.cc.com/videos/dgrhqs/gay-marriage-fraud",
"http://thecolbertreport.cc.com/videos/sq7yjh/we-are-at-war---north-korea",
"http://thecolbertreport.cc.com/videos/0pozxj/we-are-at-war---north-korea---victor-cha",
"http://thecolbertreport.cc.com/videos/w7owfy/florida-s-bong-bill",
"http://thecolbertreport.cc.com/videos/7qy183/jim-mcgreevey",
"http://thecolbertreport.cc.com/videos/1qietk/sign-off---goodnight"
],
"guest": "Jim McGreevey"
},
{
"date": "2013-04-03",
"videos": [
"http://thecolbertreport.cc.com/videos/3ci6sy/-morning-joe--vs--the-colbert-report",
"http://thecolbertreport.cc.com/videos/54w6pz/gun-control---barn-orgies",
"http://thecolbertreport.cc.com/videos/heku72/rnc-young-voters-survey",
"http://thecolbertreport.cc.com/videos/tnl1m7/a-c--grayling",
"http://thecolbertreport.cc.com/videos/kfs88u/sign-off---campaign-poster"
],
"guest": "A.C. Grayling"
},
{
"date": "2013-04-04",
"videos": [
"http://thecolbertreport.cc.com/videos/6sjovw/intro---4-4-13",
"http://thecolbertreport.cc.com/videos/2h8ym1/pegasus-pipeline-spill",
"http://thecolbertreport.cc.com/videos/0tmqs0/koko---jeremy-irons-on-gay-marriage",
"http://thecolbertreport.cc.com/videos/97bihb/obama-s-brain-initiative",
"http://thecolbertreport.cc.com/videos/wb31l0/francis-collins",
"http://thecolbertreport.cc.com/videos/jpb3iv/sign-off---eeg-cap"
],
"guest": "Dr. Francis Collins"
},
{
"date": "2013-04-08",
"videos": [
"http://thecolbertreport.cc.com/videos/2htlq3/colbert-galactic-initiative",
"http://thecolbertreport.cc.com/videos/z4m9xu/colbert-galactic-initiative---bill-clinton-pt--1",
"http://thecolbertreport.cc.com/videos/y3hr34/colbert-galactic-initiative---bill-clinton-pt--2",
"http://thecolbertreport.cc.com/videos/hmills/colbert-galactic-initiative---bill-clinton-pt--3",
"http://thecolbertreport.cc.com/videos/jmsckt/sign-off---colbert-galactic-initiative"
],
"guest": "Bill Clinton"
},
{
"date": "2013-04-09",
"videos": [
"http://thecolbertreport.cc.com/videos/dzx936/intro---4-9-13",
"http://thecolbertreport.cc.com/videos/9a1zbe/prez-billy-jeff-clinton",
"http://thecolbertreport.cc.com/videos/k04x7j/clinton-global-initiative-university-exchange-fair",
"http://thecolbertreport.cc.com/videos/yq6m6x/exxon-s-disaster-relief",
"http://thecolbertreport.cc.com/videos/qa420d/charlie-leduff",
"http://thecolbertreport.cc.com/videos/jti3ea/sign-off---potato-clock"
],
"guest": "Charlie LeDuff"
},
{
"date": "2013-04-10",
"videos": [
"http://thecolbertreport.cc.com/videos/r4g4o0/navy-laser-technology",
"http://thecolbertreport.cc.com/videos/b0yf3a/tip-wag---gun-edition---united-nations--senate-republicans---video-games",
"http://thecolbertreport.cc.com/videos/xr32ry/anthony-weiner-s-comeback",
"http://thecolbertreport.cc.com/videos/mvszff/shane-smith",
"http://thecolbertreport.cc.com/videos/fhj67z/sign-off---laser-tag"
],
"guest": "Shane Smith"
},
{
"date": "2013-04-11",
"videos": [
"http://thecolbertreport.cc.com/videos/ycrshs/nasa-lasso",
"http://thecolbertreport.cc.com/videos/2ixasd/america-s-pot-astrophe",
"http://thecolbertreport.cc.com/videos/t10bgi/america-s-pot-astrophe---nick-gillespie",
"http://thecolbertreport.cc.com/videos/82a7wi/times-square-mascots-ban",
"http://thecolbertreport.cc.com/videos/oiajpp/cass-sunstein",
"http://thecolbertreport.cc.com/videos/5r04eq/sign-off---goodnight"
],
"guest": "Cass Sunstein"
},
{
"date": "2013-04-16",
"videos": [
"http://thecolbertreport.cc.com/videos/ifpmy1/intro---4-16-13",
"http://thecolbertreport.cc.com/videos/s94ied/tip-wag---brood-ii-cicadas--sexcereal---gop-internet-memes",
"http://thecolbertreport.cc.com/videos/h77c6i/rollie-eggmaster",
"http://thecolbertreport.cc.com/videos/c5i1jr/caroline-kennedy",
"http://thecolbertreport.cc.com/videos/yygt35/sign-off---goodnight"
],
"guest": "Caroline Kennedy"
},
{
"date": "2013-04-17",
"videos": [
"http://thecolbertreport.cc.com/videos/yfwqpo/ricin-letters---boston-bombing-suspects",
"http://thecolbertreport.cc.com/videos/b1ekda/bitcoin-plunge",
"http://thecolbertreport.cc.com/videos/rxy9ze/bitcoin-plunge---adam-davidson",
"http://thecolbertreport.cc.com/videos/2sml1x/-accidental-racist--song",
"http://thecolbertreport.cc.com/videos/n7jblw/alan-cumming",
"http://thecolbertreport.cc.com/videos/4y7jmv/sign-off---goodnight"
],
"guest": "Alan Cumming"
},
{
"date": "2013-04-18",
"videos": [
"http://thecolbertreport.cc.com/videos/jr70gq/boston-marathon--bag-men-",
"http://thecolbertreport.cc.com/videos/de4kxw/the-bucket-maiden-voyage",
"http://thecolbertreport.cc.com/videos/x7fhfp/gun-control-block",
"http://thecolbertreport.cc.com/videos/tvksjy/richard-engel",
"http://thecolbertreport.cc.com/videos/17gkl6/sign-off---the-bucket"
],
"guest": "Richard Engel"
},
{
"date": "2013-04-22",
"videos": [
"http://thecolbertreport.cc.com/videos/nc9lav/intro---4-22-13",
"http://thecolbertreport.cc.com/videos/vlo1dt/boston-bombers",
"http://thecolbertreport.cc.com/videos/pd1fay/toronto-terror-plot",
"http://thecolbertreport.cc.com/videos/06tavh/tiny-triumphs---infrastructure---river-pollution",
"http://thecolbertreport.cc.com/videos/hkxcsa/george-w--bush-presidential-library",
"http://thecolbertreport.cc.com/videos/d8p3y1/michael-pollan",
"http://thecolbertreport.cc.com/videos/34u7cu/sign-off---goodnight"
],
"guest": "Michael Pollan"
},
{
"date": "2013-04-23",
"videos": [
"http://thecolbertreport.cc.com/videos/12jjaw/scoobygate",
"http://thecolbertreport.cc.com/videos/dcyvro/austerity-s-spreadsheet-error",
"http://thecolbertreport.cc.com/videos/kbgnf0/austerity-s-spreadsheet-error---thomas-herndon",
"http://thecolbertreport.cc.com/videos/54pqtc/eric-schmidt",
"http://thecolbertreport.cc.com/videos/uwzpai/sign-off---goodnight"
],
"guest": "Eric Schmidt"
},
{
"date": "2013-04-24",
"videos": [
"http://thecolbertreport.cc.com/videos/kwa0vp/ap-twitter-hack",
"http://thecolbertreport.cc.com/videos/tk4his/bill-clinton-s-twitter-lessons",
"http://thecolbertreport.cc.com/videos/r1hl69/tiny-triumphs---nasa-s-giant-penis-doodle",
"http://thecolbertreport.cc.com/videos/zi0nnq/danica-patrick",
"http://thecolbertreport.cc.com/videos/zwp3mi/sign-off---goodnight"
],
"guest": "Danica Patrick"
},
{
"date": "2013-04-25",
"videos": [
"http://thecolbertreport.cc.com/videos/md1l1j/exclusive---better-know-a-district---pennsylvania-s-17th---matt-cartwright",
"http://thecolbertreport.cc.com/videos/1waayt/colbert-s-book-club",
"http://thecolbertreport.cc.com/videos/zfq57f/better-know-a-district---pennsylvania-s-17th---matt-cartwright",
"http://thecolbertreport.cc.com/videos/ypl8dh/miranda-rights-for-boston-bomber",
"http://thecolbertreport.cc.com/videos/9j0img/gene-robinson",
"http://thecolbertreport.cc.com/videos/vqrjkz/sign-off---welcome-baby-matheson-"
],
"guest": "Bishop Gene Robinson"
},
{
"date": "2013-04-29",
"videos": [
"http://thecolbertreport.cc.com/videos/lceacn/intro---4-29-13",
"http://thecolbertreport.cc.com/videos/s55dpi/stephen-s-worst-sports-nightmare",
"http://thecolbertreport.cc.com/videos/q8gaki/the-final-days-of-straight-america",
"http://thecolbertreport.cc.com/videos/su6rj1/the-word---we-shall-undermine",
"http://thecolbertreport.cc.com/videos/u2ew19/yelp-prison-reviews",
"http://thecolbertreport.cc.com/videos/8ewxg4/iggy-pop"
],
"guest": "Iggy & the Stooges"
},
{
"date": "2013-04-30",
"videos": [
"http://thecolbertreport.cc.com/videos/9ab72e/intro---4-30-13",
"http://thecolbertreport.cc.com/videos/6brvhc/forced-tank-spending",
"http://thecolbertreport.cc.com/videos/yxooec/the-word---medical-leave",
"http://thecolbertreport.cc.com/videos/4iphqy/thought-for-food---spreadable-sharia---buddy-cup",
"http://thecolbertreport.cc.com/videos/z5q514/evan-spiegel---bobby-murphy",
"http://thecolbertreport.cc.com/videos/i4mbhv/sign-off---snapchat"
],
"guest": "Evan Spiegel & Bobby Murphy"
},
{
"date": "2013-05-01",
"videos": [
"http://thecolbertreport.cc.com/videos/82vhzw/over-the-counter-plan-b",
"http://thecolbertreport.cc.com/videos/7a77hc/background-check-backlash",
"http://thecolbertreport.cc.com/videos/rf6pzs/the-word---n-r-a--vana",
"http://thecolbertreport.cc.com/videos/cm8gvz/macklemore---ryan-lewis",
"http://thecolbertreport.cc.com/videos/sq79ll/sign-off----the-heist-"
],
"guest": "Macklemore & Ryan Lewis"
},
{
"date": "2013-05-02",
"videos": [
"http://thecolbertreport.cc.com/videos/tqo262/intro---5-2-13",
"http://thecolbertreport.cc.com/videos/7emy7s/boston-bomber-accomplices",
"http://thecolbertreport.cc.com/videos/2k1660/gitmo-hunger-strike",
"http://thecolbertreport.cc.com/videos/is0h3a/gitmo-hunger-strike---charles-swift",
"http://thecolbertreport.cc.com/videos/nhiiwp/movies-that-are-destroying-america---summer-movie-edition----man-of-steel-----iron-man-3-",
"http://thecolbertreport.cc.com/videos/mqwnf6/ben-kingsley",
"http://thecolbertreport.cc.com/videos/t46my4/sign-off---montclair-film-festival"
],
"guest": "Ben Kingsley"
},
{
"date": "2013-05-06",
"videos": [
"http://thecolbertreport.cc.com/videos/1mqcyb/intro---5-6-13",
"http://thecolbertreport.cc.com/videos/tnugl6/colbert-s-book-club----the-great-gatsby-",
"http://thecolbertreport.cc.com/videos/rxk0vp/stephen-colbert-s-bats--t-serious---bullet-conspiracy-theory",
"http://thecolbertreport.cc.com/videos/ltsnqq/tip-wag---catholic-diocese-of-brooklyn---stoner-dogs",
"http://thecolbertreport.cc.com/videos/wm2xsq/robert-caro",
"http://thecolbertreport.cc.com/videos/479h8q/sign-off---south-carolina-special-election"
],
"guest": "Robert Caro"
},
{
"date": "2013-05-07",
"videos": [
"http://thecolbertreport.cc.com/videos/bpnvtc/breaking-news---benghazi-whistleblowers",
"http://thecolbertreport.cc.com/videos/wwbl80/better-know-a-district---maryland-s-4th---donna-edwards",
"http://thecolbertreport.cc.com/videos/p3cofn/promposals",
"http://thecolbertreport.cc.com/videos/eyzxx1/douglas-rushkoff",
"http://thecolbertreport.cc.com/videos/ampziq/sign-off---goodnight"
],
"guest": "Douglas Rushkoff"
},
{
"date": "2013-05-08",
"videos": [
"http://thecolbertreport.cc.com/videos/mpvlti/intro---5-8-13",
"http://thecolbertreport.cc.com/videos/fyx23e/south-carolina-election-results",
"http://thecolbertreport.cc.com/videos/m0huaq/spiteful-partisanship",
"http://thecolbertreport.cc.com/videos/gbxmpo/going-diaperless",
"http://thecolbertreport.cc.com/videos/xg0uqu/richard-besser",
"http://thecolbertreport.cc.com/videos/in85s8/sign-off---helium-voice"
],
"guest": "Dr. Richard Besser"
},
{
"date": "2013-05-09",
"videos": [
"http://thecolbertreport.cc.com/videos/t96yfm/colbert-s-book-club----the-great-gatsby-",
"http://thecolbertreport.cc.com/videos/1i7t2j/colbert-s-book-club---learning--the-great-gatsby-",
"http://thecolbertreport.cc.com/videos/4apw9e/colbert-s-book-club---jennifer-egan----the-great-gatsby-",
"http://thecolbertreport.cc.com/videos/tetoi9/baz-luhrmann",
"http://thecolbertreport.cc.com/videos/uuyuly/sign-off----the-great-gatsby-"
],
"guest": "Jennifer Egan, Baz Luhrmann"
},
{
"date": "2013-05-13",
"videos": [
"http://thecolbertreport.cc.com/videos/hdvhlq/benghazi-attacks-talking-points",
"http://thecolbertreport.cc.com/videos/gxwgja/colbert-super-pac-shh----irs-special-scrutiny",
"http://thecolbertreport.cc.com/videos/jgqf2m/threatdown---planet-gay--world-wide-wood---junkie-bears",
"http://thecolbertreport.cc.com/videos/l06a4l/jessica-buchanan---erik-landemalm",
"http://thecolbertreport.cc.com/videos/ny9pcg/sign-off---goodnight"
],
"guest": "Jessica Buchanan & Erik Landemalm"
},
{
"date": "2013-05-14",
"videos": [
"http://thecolbertreport.cc.com/videos/g6ij84/intro---5-14-13",
"http://thecolbertreport.cc.com/videos/1nghxb/obamacare-repeal-vote",
"http://thecolbertreport.cc.com/videos/0jjvya/heritage-foundation-s-immigration-study",
"http://thecolbertreport.cc.com/videos/h5zenk/who-s-not-honoring-me-now----maxim",
"http://thecolbertreport.cc.com/videos/tq7jny/dan-brown",
"http://thecolbertreport.cc.com/videos/ftry54/sign-off---maxim-s-hot-100"
],
"guest": "Dan Brown"
},
{
"date": "2013-05-15",
"videos": [
"http://thecolbertreport.cc.com/videos/c91oeg/bug-protein",
"http://thecolbertreport.cc.com/videos/qxjgw6/better-know-a-district---wisconsin-s-4th---gwen-moore-pt--1",
"http://thecolbertreport.cc.com/videos/ft1gyx/better-know-a-district---wisconsin-s-4th---gwen-moore-pt--2",
"http://thecolbertreport.cc.com/videos/xjltw5/cyndi-lauper",
"http://thecolbertreport.cc.com/videos/f06og4/sign-off---kinky-boots"
],
"guest": "Cyndi Lauper"
},
{
"date": "2013-05-16",
"videos": [
"http://thecolbertreport.cc.com/videos/ru2qad/intro---5-16-13",
"http://thecolbertreport.cc.com/videos/vshddv/asparagusgate",
"http://thecolbertreport.cc.com/videos/x9725b/tip-wag---wind-turbines---china",
"http://thecolbertreport.cc.com/videos/6685w4/3d-printed-guns",
"http://thecolbertreport.cc.com/videos/7xqphc/daniel-lieberman",
"http://thecolbertreport.cc.com/videos/yktive/sign-off---barefoot-shoes"
],
"guest": "Dr. Daniel Lieberman"
},
{
"date": "2013-05-20",
"videos": [
"http://thecolbertreport.cc.com/videos/iqqmsb/mazda-scandal-booth---benghazi",
"http://thecolbertreport.cc.com/videos/xwopvb/mazda-scandal-booth---the-irs",
"http://thecolbertreport.cc.com/videos/5qyy0w/mazda-scandal-booth---the-irs---trevor-potter",
"http://thecolbertreport.cc.com/videos/irj43w/david-sassoon",
"http://thecolbertreport.cc.com/videos/m9mkd8/sign-off---mazda-scandal-booth"
],
"guest": "David Sassoon"
},
{
"date": "2013-05-21",
"videos": [
"http://thecolbertreport.cc.com/videos/wp98kg/intro---5-21-13",
"http://thecolbertreport.cc.com/videos/7fm2v2/irish-potato-famine-pathogen",
"http://thecolbertreport.cc.com/videos/pbfcaq/cheating-death---sun-exposure---marijuana",
"http://thecolbertreport.cc.com/videos/3jp6f3/census-bureau-harassment",
"http://thecolbertreport.cc.com/videos/cqajs7/noah-feldman",
"http://thecolbertreport.cc.com/videos/2jhy5w/sign-off---goodnight"
],
"guest": "Noah Feldman"
},
{
"date": "2013-05-22",
"videos": [
"http://thecolbertreport.cc.com/videos/c02847/intro---5-22-13",
"http://thecolbertreport.cc.com/videos/24adff/irs-tea-party-scandal",
"http://thecolbertreport.cc.com/videos/icnp2y/tip-wag---senators-mitch-and-chong---resourceful-rich-folk",
"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/aumf-repeal---andrew-bacevich",
"http://thecolbertreport.cc.com/videos/0bv6m0/redemption-for-all",
"http://thecolbertreport.cc.com/videos/ur1l6x/c-j--chivers",
"http://thecolbertreport.cc.com/videos/ahpe36/sign-off---goodnight"
],
"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/better-know-a-district---wisconsin-s-2nd---mark-pocan",
"http://thecolbertreport.cc.com/videos/s86l5y/trackingpoint-rifle",
"http://thecolbertreport.cc.com/videos/4fwbkt/john-dingell",
"http://thecolbertreport.cc.com/videos/yrhc20/sign-off---goodnight"
],
"guest": "Rep. John Dingell"
},
{
"date": "2013-06-04",
"videos": [
"http://thecolbertreport.cc.com/videos/fivedj/michele-bachmann-s-last-term",
"http://thecolbertreport.cc.com/videos/x7wc5a/tip-wag---google-glass---the-lone-ranger----3d-printed-food",
"http://thecolbertreport.cc.com/videos/u1fvmr/irs-political-targeting---line-dancing-scandals",
"http://thecolbertreport.cc.com/videos/tz8gve/alex-gibney",
"http://thecolbertreport.cc.com/videos/fbuavt/sign-off---goodnight"
],
"guest": "Alex Gibney"
},
{
"date": "2013-06-05",
"videos": [
"http://thecolbertreport.cc.com/videos/2ntvt9/intro---6-5-13",
"http://thecolbertreport.cc.com/videos/eogja8/commando-of-steel",
"http://thecolbertreport.cc.com/videos/fva65v/monsanto-s-modified-wheat",
"http://thecolbertreport.cc.com/videos/ibdfsk/monsanto-s-modified-wheat---laurie-garrett",
"http://thecolbertreport.cc.com/videos/bqahez/photojournalists-vs--iphones",
"http://thecolbertreport.cc.com/videos/wqd06c/jonathan-alter",
"http://thecolbertreport.cc.com/videos/el0t4o/sign-off---amber-waves-of-frankengrain"
],
"guest": "Jonathan Alter"
},
{
"date": "2013-06-06",
"videos": [
"http://thecolbertreport.cc.com/videos/onw7lq/nsa-phone-surveillance",
"http://thecolbertreport.cc.com/videos/hbmw2f/colbert-classic---spy-training-with-peter-earnest",
"http://thecolbertreport.cc.com/videos/zhz7uc/john-mellencamp--stephen-king---t-bone-burnett---pt--1",
"http://thecolbertreport.cc.com/videos/lcf7d3/john-mellencamp--stephen-king---t-bone-burnett---pt--2",
"http://thecolbertreport.cc.com/videos/46x6yt/sign-off---nose-tap"
],
"guest": "Stephen King, John Mellencamp, T Bone Burnett"
},
{
"date": "2013-06-10",
"videos": [
"http://thecolbertreport.cc.com/videos/oc2w3x/edward-snowden-s-nsa-leaks",
"http://thecolbertreport.cc.com/videos/bkbpaj/the-imploding-muslim-country-of-the-week---turkey",
"http://thecolbertreport.cc.com/videos/rnftw3/the-imploding-muslim-country-of-the-week---turkey---omer-taspinar",
"http://thecolbertreport.cc.com/videos/147u1d/cold-war-update---nuclear-launch-careers",
"http://thecolbertreport.cc.com/videos/vii2l9/dan-savage",
"http://thecolbertreport.cc.com/videos/kmqz9h/sign-off---the-imploding-muslim-country-of-the-week-booth"
],
"guest": "Dan Savage"
},
{
"date": "2013-06-11",
"videos": [
"http://thecolbertreport.cc.com/videos/ctjh9s/intro---6-11-13",
"http://thecolbertreport.cc.com/videos/1mm086/prism-surveillance-program",
"http://thecolbertreport.cc.com/videos/jejy0d/prism-surveillance-program---jeffrey-rosen",
"http://thecolbertreport.cc.com/videos/sa86i9/chewbacca-s-tsa-encounter",
"http://thecolbertreport.cc.com/videos/s2d0lp/daniel-bergner",
"http://thecolbertreport.cc.com/videos/x7nfzj/sign-off---goodnight"
],
"guest": "Daniel Bergner"
},
{
"date": "2013-06-12",
"videos": [
"http://thecolbertreport.cc.com/videos/jdqve3/stephen-colbert-s-tribute-to-having-paul-mccartney-on-his-show",
"http://thecolbertreport.cc.com/videos/eweibb/nsa-scandal-developments",
"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/remembering-lorna-colbert",
"http://thecolbertreport.cc.com/videos/jm7bya/cap-n-crunch-scandal",
"http://thecolbertreport.cc.com/videos/rtfkei/tip-wag---wall-street---north-carolina",
"http://thecolbertreport.cc.com/videos/vztqfg/the-postal-service",
"http://thecolbertreport.cc.com/videos/7vr4pz/sign-off---stage-fall"
],
"guest": "The Postal Service"
},
{
"date": "2013-06-20",
"videos": [
"http://thecolbertreport.cc.com/videos/616g0e/intro---6-20-13",
"http://thecolbertreport.cc.com/videos/v8ee5f/iran-s-presidential-election",
"http://thecolbertreport.cc.com/videos/k3dodo/steve-king-on-chicken-cages",
"http://thecolbertreport.cc.com/videos/7udg5z/nestle-s-natural-resource",
"http://thecolbertreport.cc.com/videos/0mw5zk/joss-whedon",
"http://thecolbertreport.cc.com/videos/ooshhr/sign-off---paper-towel-tube-cage"
],
"guest": "Joss Whedon"
},
{
"date": "2013-06-24",
"videos": [
"http://thecolbertreport.cc.com/videos/6gyv8z/the-irs---darrell-issa-s-gut",
"http://thecolbertreport.cc.com/videos/oztyjs/the-word---truthinews",
"http://thecolbertreport.cc.com/videos/93t9s1/tiny-triumphs---laser-klan",
"http://thecolbertreport.cc.com/videos/dzzcx7/andrew-solomon",
"http://thecolbertreport.cc.com/videos/h7v6sr/sign-off---goodnight"
],
"guest": "Andrew Solomon"
},
{
"date": "2013-06-25",
"videos": [
"http://thecolbertreport.cc.com/videos/g5p8y4/intro---6-25-13",
"http://thecolbertreport.cc.com/videos/348hon/scotus-on-the-voting-rights-act",
"http://thecolbertreport.cc.com/videos/ysuxww/brazil-s-political-protests",
"http://thecolbertreport.cc.com/videos/3gv8et/brazil-s-political-protests---larry-rohter",
"http://thecolbertreport.cc.com/videos/mnxaxk/george-zimmerman-s-murder-trial",
"http://thecolbertreport.cc.com/videos/ip1pn0/peniel-joseph",
"http://thecolbertreport.cc.com/videos/b4zgvh/sign-off---goodnight"
],
"guest": "Peniel Joseph"
},
{
"date": "2013-06-26",
"videos": [
"http://thecolbertreport.cc.com/videos/m2xuu4/intro---6-26-13",
"http://thecolbertreport.cc.com/videos/nzd784/the-supreme-court-rules-on-doma",
"http://thecolbertreport.cc.com/videos/um981i/the-end-of-the-voting-rights-act",
"http://thecolbertreport.cc.com/videos/btpztg/the-voting-rights-act---gay-marriage---emily-bazelon",
"http://thecolbertreport.cc.com/videos/3ca2a0/bill-moyers",
"http://thecolbertreport.cc.com/videos/09w1k9/sign-off---goodnight"
],
"guest": "Bill Moyers"
},
{
"date": "2013-06-27",
"videos": [
"http://thecolbertreport.cc.com/videos/9lyyd3/4th-of-july-under-attack",
"http://thecolbertreport.cc.com/videos/3wbx1d/stephen-colbert-s-big-gay-roundup",
"http://thecolbertreport.cc.com/videos/ncxmfs/-gang-of-eight--immigration-reform-bill",
"http://thecolbertreport.cc.com/videos/0gj3ie/chuck-schumer",
"http://thecolbertreport.cc.com/videos/6kec7y/sign-off---goodnight"
],
"guest": "Sen. Chuck Schumer"
},
{
"date": "2013-07-15",
"videos": [
"http://thecolbertreport.cc.com/videos/6jl3zv/stephen-s-vacation",
"http://thecolbertreport.cc.com/videos/0gzuno/george-zimmerman-verdict",
"http://thecolbertreport.cc.com/videos/9nhthn/people-who-are-destroying-america---lynn-harrell",
"http://thecolbertreport.cc.com/videos/6dlnrd/ktvu-tv-on-asiana-airlines-crash",
"http://thecolbertreport.cc.com/videos/vwtsg0/jeremy-scahill",
"http://thecolbertreport.cc.com/videos/88fai0/sign-off---goodnight"
],
"guest": "Jeremy Scahill"
},
{
"date": "2013-07-16",
"videos": [
"http://thecolbertreport.cc.com/videos/2ymeh3/intro---7-16-13",
"http://thecolbertreport.cc.com/videos/rr5gb5/royal-baby-bump",
"http://thecolbertreport.cc.com/videos/dd82ys/tip-wag---non-rioting-black-people---fox-news",
"http://thecolbertreport.cc.com/videos/e8110o/npr-on-multitasking",
"http://thecolbertreport.cc.com/videos/e5obyh/david-karp",
"http://thecolbertreport.cc.com/videos/0mvlz8/sign-off---macbox"
],
"guest": "David Karp"
},
{
"date": "2013-07-17",
"videos": [
"http://thecolbertreport.cc.com/videos/84x6wp/rolling-stone-s-boston-bomber-cover",
"http://thecolbertreport.cc.com/videos/eiwwmp/dysfunctional-house-republicans---immigration-reform",
"http://thecolbertreport.cc.com/videos/dii80x/food-stamp-funding",
"http://thecolbertreport.cc.com/videos/279goq/jerry-seinfeld-pt--1",
"http://thecolbertreport.cc.com/videos/pw17w7/jerry-seinfeld-pt--2",
"http://thecolbertreport.cc.com/videos/qfpfy4/sign-off---paper-fan"
],
"guest": "Jerry Seinfeld"
},
{
"date": "2013-07-18",
"videos": [
"http://thecolbertreport.cc.com/videos/r4piw8/edward-snowden-s-asylum-option",
"http://thecolbertreport.cc.com/videos/2m27vd/political-sex-scandals---new-york-city-elections",
"http://thecolbertreport.cc.com/videos/dpebt7/political-sex-scandals---new-york-city-elections---eliot-spitzer",
"http://thecolbertreport.cc.com/videos/m8rn8j/breaking-news-on-college-sex",
"http://thecolbertreport.cc.com/videos/y56hes/jeff-bridges",
"http://thecolbertreport.cc.com/videos/fiop8t/sign-off----operation-javelin-"
],
"guest": "Jeff Bridges"
},
{
"date": "2013-07-22",
"videos": [
"http://thecolbertreport.cc.com/videos/20zlbx/britain-s-royal-baby",
"http://thecolbertreport.cc.com/videos/d0bn33/geraldo-rivera-s-tribute-to-helen-thomas",
"http://thecolbertreport.cc.com/videos/8fg72p/minimum-wage---mcdonald-s-spending-journal",
"http://thecolbertreport.cc.com/videos/0p9n45/neil-degrasse-tyson-s-alien-theory",
"http://thecolbertreport.cc.com/videos/3azmuc/kjerstin-gruys",
"http://thecolbertreport.cc.com/videos/mritg0/sign-off---linguini-worm"
],
"guest": "Kjerstin Gruys"
},
{
"date": "2013-07-23",
"videos": [
"http://thecolbertreport.cc.com/videos/y6fmk6/royal-afterbirth--013-",
"http://thecolbertreport.cc.com/videos/adczam/george-zimmerman---racial-tensions",
"http://thecolbertreport.cc.com/videos/3vijkd/the-word---color-bind",
"http://thecolbertreport.cc.com/videos/vbghld/domino-s-pizza-drone",
"http://thecolbertreport.cc.com/videos/5tqazj/kenneth-goldsmith",
"http://thecolbertreport.cc.com/videos/fvgc0u/sign-off---goodnight"
],
"guest": "Kenneth Goldsmith"
},
{
"date": "2013-07-24",
"videos": [
"http://thecolbertreport.cc.com/videos/508jwm/royal-baby-fever",
"http://thecolbertreport.cc.com/videos/eodctw/anthony-weiner-s-penis",
"http://thecolbertreport.cc.com/videos/4sgopv/carlos-danger--secret-mayor",
"http://thecolbertreport.cc.com/videos/bf89i9/kanye-west-s-clothing-line",
"http://thecolbertreport.cc.com/videos/zwqhae/anant-agarwal",
"http://thecolbertreport.cc.com/videos/gbago4/sign-off---goodnight"
],
"guest": "Anant Agarwal"
},
{
"date": "2013-07-25",
"videos": [
"http://thecolbertreport.cc.com/videos/l1dtzt/london-s-fake-town-crier",
"http://thecolbertreport.cc.com/videos/lyjdmu/detroit-s-bankruptcy",
"http://thecolbertreport.cc.com/videos/h9c7gh/detroit-s-bankruptcy---stephen-henderson",
"http://thecolbertreport.cc.com/videos/8chokd/steve-king-s-immigrant-analogy",
"http://thecolbertreport.cc.com/videos/263vwc/olympia-snowe",
"http://thecolbertreport.cc.com/videos/kx84kd/sign-off---hand-bell"
],
"guest": "Olympia Snowe"
},
{
"date": "2013-07-29",
"videos": [
"http://thecolbertreport.cc.com/videos/uw17hh/intro---7-29-13",
"http://thecolbertreport.cc.com/videos/n0w3zw/obamacare-cards",
"http://thecolbertreport.cc.com/videos/pna3x8/tip-wag---steve-stockman--david-cameron---north-carolina-legislature",
"http://thecolbertreport.cc.com/videos/2i98l3/the-lumineers",
"http://thecolbertreport.cc.com/videos/1i7dzf/sign-off---tambourine"
],
"guest": "The Lumineers"
},
{
"date": "2013-07-30",
"videos": [
"http://thecolbertreport.cc.com/videos/trrcbd/intro---7-30-13",
"http://thecolbertreport.cc.com/videos/mulhwo/smokin--pole---the-quest-for-arctic-riches--north-pole-lake",
"http://thecolbertreport.cc.com/videos/gr77sg/senator-gridlock",
"http://thecolbertreport.cc.com/videos/hrha3p/the-word---secrets---laws",
"http://thecolbertreport.cc.com/videos/jah6al/ted-cruz-s-humble-portrait",
"http://thecolbertreport.cc.com/videos/bhod50/atul-gawande",
"http://thecolbertreport.cc.com/videos/c1f9z7/sign-off---sleigh-bells"
],
"guest": "Atul Gawande"
},
{
"date": "2013-07-31",
"videos": [
"http://thecolbertreport.cc.com/videos/4dtx20/intro---7-31-13",
"http://thecolbertreport.cc.com/videos/6p4joy/bradley-manning-verdict",
"http://thecolbertreport.cc.com/videos/hcbpix/lunch-or-campaign-2016-",
"http://thecolbertreport.cc.com/videos/21zxm1/chris-christie-vs--rand-paul",
"http://thecolbertreport.cc.com/videos/zyu4c8/stephen-colbert-s-super-coin-toss",
"http://thecolbertreport.cc.com/videos/ngxjwr/emily-matchar",
"http://thecolbertreport.cc.com/videos/f1q01l/sign-off---game-over"
],
"guest": "Emily Matchar"
},
{
"date": "2013-08-01",
"videos": [
"http://thecolbertreport.cc.com/videos/s9hzk7/intro---8-1-13",
"http://thecolbertreport.cc.com/videos/09hbf0/edward-snowden-s-asylum",
"http://thecolbertreport.cc.com/videos/o0rsdt/oppressed-white-male-alert---bob-filner",
"http://thecolbertreport.cc.com/videos/y8ilbl/grab-ask-5800",
"http://thecolbertreport.cc.com/videos/opj4x1/threatdown---global-erotic-extremism--mini-muslims---stripper-bears",
"http://thecolbertreport.cc.com/videos/gyog46/bryan-cranston",
"http://thecolbertreport.cc.com/videos/qv7up3/sign-off---goodnight"
],
"guest": "Bryan Cranston"
},
{
"date": "2013-08-05",
"videos": [
"http://thecolbertreport.cc.com/videos/n525ux/global-terror-warning",
"http://thecolbertreport.cc.com/videos/1y9s5s/sport-report---a-rod-s-drug-scandal---combat-juggling",
"http://thecolbertreport.cc.com/videos/91y2gj/hugh-laurie",
"http://thecolbertreport.cc.com/videos/g0yu17/broadcast-networks-want-more-indecency",
"http://thecolbertreport.cc.com/videos/n9o8qy/sign-off---glossary-of-terms"
],
"guest": "Hugh Laurie"
},
{
"date": "2013-08-06",
"videos": [
"http://thecolbertreport.cc.com/videos/4ybtps/stephest-colbchella--013---the-song-of-the-summer-of-the-century",
"http://thecolbertreport.cc.com/videos/s9j4ux/stephest-colbchella--013---special-guest-stephen-colbert-"
],
"guest": "Robin Thicke"
},
{
"date": "2013-08-07",
"videos": [
"http://thecolbertreport.cc.com/videos/0t0r8t/stephest-colbchella--013---disco-decepticons",
"http://thecolbertreport.cc.com/videos/je51p5/rich-white-guys-agreeing-with-each-other-alert---neil-cavuto",
"http://thecolbertreport.cc.com/videos/m9o287/fast-food-workers-strike---mary-kay-henry",
"http://thecolbertreport.cc.com/videos/b0jyca/sec-vs--fabulous-fab",
"http://thecolbertreport.cc.com/videos/rrfnhj/ashton-kutcher",
"http://thecolbertreport.cc.com/videos/iqw6df/sign-off---goodnight"
],
"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/hollywood-heroes---matt-damon",
"http://thecolbertreport.cc.com/videos/qqmmcz/the-ronald-wilson-reagan-economic-breathing-zone",
"http://thecolbertreport.cc.com/videos/6duz1s/colum-mccann",
"http://thecolbertreport.cc.com/videos/fama3f/sign-off----fifty-shades-of-grey-"
],
"guest": "Colum McCann"
},
{
"date": "2013-08-12",
"videos": [
"http://thecolbertreport.cc.com/videos/m7rv7i/badonkadonk-journalism",
"http://thecolbertreport.cc.com/videos/qokabz/better-know-a-district---new-jersey-s-12th",
"http://thecolbertreport.cc.com/videos/vni3w0/better-know-a-district---new-jersey-s-12th---rush-holt",
"http://thecolbertreport.cc.com/videos/swss3n/innocent-tourist-mistake",
"http://thecolbertreport.cc.com/videos/lixrq0/sheldon-whitehouse",
"http://thecolbertreport.cc.com/videos/ck9vu0/sign-off---goodnight"
],
"guest": "Sen. Sheldon Whitehouse"
},
{
"date": "2013-08-13",
"videos": [
"http://thecolbertreport.cc.com/videos/jtshn3/stop-and-frisk---mandatory-minimums",
"http://thecolbertreport.cc.com/videos/o5aiwi/tsa-expansion-program",
"http://thecolbertreport.cc.com/videos/miwb3z/tsa-expansion-program---steven-pinker",
"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/sign-off----the-better-angels-of-our-nature-"
],
"guest": "Rep. John Lewis"
},
{
"date": "2013-08-14",
"videos": [
"http://thecolbertreport.cc.com/videos/als8jg/intro---8-14-13",
"http://thecolbertreport.cc.com/videos/wjgfbx/sochi-2014-winter-olympics",
"http://thecolbertreport.cc.com/videos/y58ew9/people-who-are-destroying-america---johnny-cummings",
"http://thecolbertreport.cc.com/videos/oafmw7/big-mother-government",
"http://thecolbertreport.cc.com/videos/wc12me/kevin-spacey",
"http://thecolbertreport.cc.com/videos/o1qztj/sign-off---goodnight"
],
"guest": "Kevin Spacey"
},
{
"date": "2013-08-15",
"videos": [
"http://thecolbertreport.cc.com/videos/fwx35y/obama-rodeo-clown",
"http://thecolbertreport.cc.com/videos/0bdl0z/golden-age-of-flammability",
"http://thecolbertreport.cc.com/videos/r9ju4t/the-word---gag-gift",
"http://thecolbertreport.cc.com/videos/jngkv0/nsa-press-conference-on-domestic-spying",
"http://thecolbertreport.cc.com/videos/8ax5jq/richard-brodhead",
"http://thecolbertreport.cc.com/videos/42qo92/sign-off---second-installment-of-colbert-s-book-club"
],
"guest": "Richard Brodhead"
},
{
"date": "2013-09-03",
"videos": [
"http://thecolbertreport.cc.com/videos/pkboc3/exclusive---better-know-a-district---michigan-s-5th---dan-kildee",
"http://thecolbertreport.cc.com/videos/pnf1sx/intro---9-3-13",
"http://thecolbertreport.cc.com/videos/tx5zzr/stephen-s-science-project---chemical-weapons-in-syria",
"http://thecolbertreport.cc.com/videos/dhyi3l/better-know-a-district---michigan-s-5th---dan-kildee",
"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/sign-off---welcome-baby-rosta-"
],
"guest": "Timothy Cardinal Dolan"
},
{
"date": "2013-09-04",
"videos": [
"http://thecolbertreport.cc.com/videos/4obytf/intro---9-4-13",
"http://thecolbertreport.cc.com/videos/020ri3/cris-ish-in-syri-eh",
"http://thecolbertreport.cc.com/videos/jtjmpo/cris-ish-in-syri-eh---steve-coll",
"http://thecolbertreport.cc.com/videos/hrfvxe/perfect-polly",
"http://thecolbertreport.cc.com/videos/q9zsg7/gary-england",
"http://thecolbertreport.cc.com/videos/jnebqk/sign-off---goodnight"
],
"guest": "Gary England"
},
{
"date": "2013-09-05",
"videos": [
"http://thecolbertreport.cc.com/videos/fzzhny/intro---9-5-13",
"http://thecolbertreport.cc.com/videos/cgxdol/smile-file---ariel-castro---the-eric-bolling-sunshine-express",
"http://thecolbertreport.cc.com/videos/cn86ce/kitten-subway-crisis---the-new-york-city-mayoral-race",
"http://thecolbertreport.cc.com/videos/l0disu/colbert-s-book-club---the-couch-bunker",
"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/syrian-conflict-action-plan",
"http://thecolbertreport.cc.com/videos/jvhzt0/ronald-reagan-on-the-syrian-conflict",
"http://thecolbertreport.cc.com/videos/a4utu0/tip-wag---iowa--bigger-pants---recent-articles",
"http://thecolbertreport.cc.com/videos/f9cuxl/billie-jean-king",
"http://thecolbertreport.cc.com/videos/2dw2cm/sign-off---spider-reagan"
],
"guest": "Billie Jean King"
},
{
"date": "2013-09-10",
"videos": [
"http://thecolbertreport.cc.com/videos/o8sjcq/colbert-s-book-club---j-d--salinger",
"http://thecolbertreport.cc.com/videos/49qji6/colbert-s-book-club---better-know-a-salinger",
"http://thecolbertreport.cc.com/videos/ueo7a2/colbert-s-book-club---tobias-wolff----the-catcher-in-the-rye-",
"http://thecolbertreport.cc.com/videos/f2a6ao/colbert-s-book-club---shane-salerno-on-j-d--salinger",
"http://thecolbertreport.cc.com/videos/2p7nwl/sign-off---colbert-s-book-club---j-d--salinger-s-glass-family"
],
"guest": "Shane Salerno"
},
{
"date": "2013-09-11",
"videos": [
"http://thecolbertreport.cc.com/videos/lop9g2/new-york-city-mayoral-primary",
"http://thecolbertreport.cc.com/videos/pymjnx/america-s-got-serious-reservations-about-this---syria",
"http://thecolbertreport.cc.com/videos/cta0kn/america-s-got-serious-reservations-about-this---syria---rand-paul",
"http://thecolbertreport.cc.com/videos/w9ejb1/barack-obama-s-footgate---secret-muslim-code",
"http://thecolbertreport.cc.com/videos/p83qs9/sheryl-crow"
],
"guest": "Sheryl Crow"
},
{
"date": "2013-09-12",
"videos": [
"http://thecolbertreport.cc.com/videos/r3zogj/vladimir-putin-s-op-ed-photos",
"http://thecolbertreport.cc.com/videos/bujbay/better-know-a-district---washington-s-7th---jim-mcdermott",
"http://thecolbertreport.cc.com/videos/7z7vfu/vladimir-putin-s-op-ed-on-u-s--intervention-in-syria",
"http://thecolbertreport.cc.com/videos/cm16zd/philip-mudd",
"http://thecolbertreport.cc.com/videos/4lw1cp/sign-off---goodnight"
],
"guest": "Philip Mudd"
},
{
"date": "2013-09-16",
"videos": [
"http://thecolbertreport.cc.com/videos/weeyn5/intro---9-16-13",
"http://thecolbertreport.cc.com/videos/2lxvvp/lehman-brothers-anniversary---economic-recovery",
"http://thecolbertreport.cc.com/videos/ggices/the-word---the-guilted-age",
"http://thecolbertreport.cc.com/videos/vui8um/miss-america-2013",
"http://thecolbertreport.cc.com/videos/v77k60/andrew-bacevich",
"http://thecolbertreport.cc.com/videos/c31p0i/sign-off---financial-crisis-anniversary-cake"
],
"guest": "Andrew Bacevich"
},
{
"date": "2013-09-17",
"videos": [
"http://thecolbertreport.cc.com/videos/qkhrkt/intro---9-17-13",
"http://thecolbertreport.cc.com/videos/hwlkz5/the-people-s-republic-of-obamastan---forbes-400-losers",
"http://thecolbertreport.cc.com/videos/cgb0cw/colbert-platinum---luxury-ice---hot-dic-tip",
"http://thecolbertreport.cc.com/videos/rkpujl/soul-rending-cheerios-ad",
"http://thecolbertreport.cc.com/videos/2dwhox/arne-duncan",
"http://thecolbertreport.cc.com/videos/ukxkfk/sign-off---goodnight"
],
"guest": "Arne Duncan"
},
{
"date": "2013-09-18",
"videos": [
"http://thecolbertreport.cc.com/videos/g7l8kk/syria-conflict---end-times-prophecy",
"http://thecolbertreport.cc.com/videos/8pp3si/united-nations-on-syria-conflict---andrew-sullivan",
"http://thecolbertreport.cc.com/videos/v0wk5h/navy-yard-shooting---gun-violence-causes",
"http://thecolbertreport.cc.com/videos/ft7l84/nicholson-baker",
"http://thecolbertreport.cc.com/videos/lpg81o/sign-off----damascus-countdown-"
],
"guest": "Nicholson Baker"
},
{
"date": "2013-09-19",
"videos": [
"http://thecolbertreport.cc.com/videos/1j1cxh/michelle-obama-s-h2o-campaign",
"http://thecolbertreport.cc.com/videos/4iux0d/obamacare-government-shutdown",
"http://thecolbertreport.cc.com/videos/6nrq55/obamacare-navigators",
"http://thecolbertreport.cc.com/videos/7qwiwv/tip-wag---hammunition---george-clooney",
"http://thecolbertreport.cc.com/videos/x5xw6g/jack-johnson"
],
"guest": "Jack Johnson"
},
{
"date": "2013-09-24",
"videos": [
"http://thecolbertreport.cc.com/videos/ecu59e/stephen-s-emmy-awards",
"http://thecolbertreport.cc.com/videos/nsfkr7/on-notice---pope-francis",
"http://thecolbertreport.cc.com/videos/vb7ms1/on-notice---pope-francis---jim-martin",
"http://thecolbertreport.cc.com/videos/7xtam8/metallica",
"http://thecolbertreport.cc.com/videos/g9dzis/sign-off---emmy-exhibition"
],
"guest": "Metallica"
},
{
"date": "2013-09-25",
"videos": [
"http://thecolbertreport.cc.com/videos/8fmvel/censorship-for-youtube-comments",
"http://thecolbertreport.cc.com/videos/lsiidb/sport-report---cranium-coddlers---san-francisco-street-chess---floyd-mayweather",
"http://thecolbertreport.cc.com/videos/ks6rd5/ted-cruz-s-obamacare--filibuster-",
"http://thecolbertreport.cc.com/videos/urqr8j/joseph-gordon-levitt",
"http://thecolbertreport.cc.com/videos/93nnw6/sign-off---ring-announcer"
],
"guest": "Joseph Gordon-Levitt"
},
{
"date": "2013-09-26",
"videos": [
"http://thecolbertreport.cc.com/videos/itk7kp/americone-dream-product-placement",
"http://thecolbertreport.cc.com/videos/u1mo7v/chris-fischer",
"http://thecolbertreport.cc.com/videos/lo2m3c/intro---9-26-13",
"http://thecolbertreport.cc.com/videos/153u0a/sign-off---goodnight",
"http://thecolbertreport.cc.com/videos/87ddew/time-travel-adventures-with-conservatives"
],
"guest": "Chris Fischer"
},
{
"date": "2013-09-30",
"videos": [
"http://thecolbertreport.cc.com/videos/mp715j/rockin--government-shutdown-eve",
"http://thecolbertreport.cc.com/videos/pbvraa/tip-wag---butterball--ashley-merryman---science",
"http://thecolbertreport.cc.com/videos/wzj7bh/vince-gilligan-pt--1",
"http://thecolbertreport.cc.com/videos/xid9jc/vince-gilligan-pt--2"
],
"guest": "Vince Gilligan"
},
{
"date": "2013-10-01",
"videos": [
"http://thecolbertreport.cc.com/videos/99odk6/federal-government-shutdown",
"http://thecolbertreport.cc.com/videos/cn352h/affordable-care-act---obama-s-computerized-america",
"http://thecolbertreport.cc.com/videos/1ntmd2/adorable-care-act---generation-opportunity",
"http://thecolbertreport.cc.com/videos/gfz4h7/national-hispanic-heritage-month",
"http://thecolbertreport.cc.com/videos/obk0r1/daniel-radcliffe",
"http://thecolbertreport.cc.com/videos/7ni2qs/sign-off---goodnight"
],
"guest": "Daniel Radcliffe"
},
{
"date": "2013-10-02",
"videos": [
"http://thecolbertreport.cc.com/videos/aykl9k/intro---10-2-13",
"http://thecolbertreport.cc.com/videos/qx1ar9/1995-shutdown-survival-bunker",
"http://thecolbertreport.cc.com/videos/qz6a9i/government--slimdown----potus-meeting",
"http://thecolbertreport.cc.com/videos/xjdheq/blood-in-the-water---bill-o-reilly-s--killing-jesus-",
"http://thecolbertreport.cc.com/videos/5ynb8q/chris-matthews",
"http://thecolbertreport.cc.com/videos/mvs3wz/sign-off---shutdown-survival-bunker"
],
"guest": "Chris Matthews"
},
{
"date": "2013-10-03",
"videos": [
"http://thecolbertreport.cc.com/videos/7l0bys/government-shutdown-day-three",
"http://thecolbertreport.cc.com/videos/amjasd/the-2013-government-shutdown-wedding-of-the-century-pt--1",
"http://thecolbertreport.cc.com/videos/qt2vrd/david-finkel",
"http://thecolbertreport.cc.com/videos/6as11u/sign-off---audra-mcdonald-s-availability"
],
"guest": "David Finkel"
},
{
"date": "2013-10-07",
"videos": [
"http://thecolbertreport.cc.com/videos/iyj9i2/government-shutdown-s-one-week-anniversary",
"http://thecolbertreport.cc.com/videos/f9ohl9/bond-v--united-states",
"http://thecolbertreport.cc.com/videos/rodf66/mccutcheon-v--fec---emily-bazelon",
"http://thecolbertreport.cc.com/videos/d10tae/banksy-s-new-york-reign-of-terror",
"http://thecolbertreport.cc.com/videos/feyjl3/james-spithill",
"http://thecolbertreport.cc.com/videos/m7oe3o/sign-off----not-a-game--game"
],
"guest": "James Spithill"
},
{
"date": "2013-10-08",
"videos": [
"http://thecolbertreport.cc.com/videos/phldtj/intro---10-8-13",
"http://thecolbertreport.cc.com/videos/u5kkik/debt-ceiling-deadline",
"http://thecolbertreport.cc.com/videos/2b5rst/pro-pot-laws---pointers",
"http://thecolbertreport.cc.com/videos/049124/thanksgiving-under-attack---hanukkah",
"http://thecolbertreport.cc.com/videos/llhqmr/paul-giamatti",
"http://thecolbertreport.cc.com/videos/tuzaza/sign-off----tj---dave-"
],
"guest": "Paul Giamatti"
},
{
"date": "2013-10-09",
"videos": [
"http://thecolbertreport.cc.com/videos/pjgp86/intro---10-9-13",
"http://thecolbertreport.cc.com/videos/ssksja/ride-for-the-constitution",
"http://thecolbertreport.cc.com/videos/h502rh/twitter-s-ipo",
"http://thecolbertreport.cc.com/videos/k9g3h2/tom-emmer-s-controversial-ad",
"http://thecolbertreport.cc.com/videos/ldxsu2/tom-hanks",
"http://thecolbertreport.cc.com/videos/uevql0/sign-off---goodnight"
],
"guest": "Tom Hanks"
},
{
"date": "2013-10-10",
"videos": [
"http://thecolbertreport.cc.com/videos/xqbppa/government-shutdown-day-10---shep-smith-s-input",
"http://thecolbertreport.cc.com/videos/bzo5fv/because-shep---fox-news-deck",
"http://thecolbertreport.cc.com/videos/rt3php/because-shep---fox-news-deck---colbert-info-news-veranda",
"http://thecolbertreport.cc.com/videos/r2mded/hanksy-s-grizzly-art",
"http://thecolbertreport.cc.com/videos/twnvtr/reed-albergotti---vanessa-o-connell",
"http://thecolbertreport.cc.com/videos/gn1hnb/sign-off---goodnight"
],
"guest": "Reed Albergotti & Vanessa O'Connell"
},
{
"date": "2013-10-21",
"videos": [
"http://thecolbertreport.cc.com/videos/zabrcj/end-of-the-government-shutdown",
"http://thecolbertreport.cc.com/videos/fs5lvs/tip-wag---new-jersey--robo-teachers---amazon-erotica",
"http://thecolbertreport.cc.com/videos/xmc07q/the-reflektors",
"http://thecolbertreport.cc.com/videos/z30io4/sign-off----midnight"
],
"guest": "The Reflektors"
},
{
"date": "2013-10-22",
"videos": [
"http://thecolbertreport.cc.com/videos/0nhfjd/intro---10-22-13",
"http://thecolbertreport.cc.com/videos/tpp3c7/the-in-box---lions-vs--tigers",
"http://thecolbertreport.cc.com/videos/w4k85n/thought-for-food---kfc-s-go-cup---powerful-yogurt",
"http://thecolbertreport.cc.com/videos/wv85sy/the-neiman-marcus-christmas-book",
"http://thecolbertreport.cc.com/videos/413dai/a--scott-berg",
"http://thecolbertreport.cc.com/videos/j9enbw/sign-off----the-heart-of-giving-"
],
"guest": "A. Scott Berg"
},
{
"date": "2013-10-23",
"videos": [
"http://thecolbertreport.cc.com/videos/pfan07/obamacare-website-gate",
"http://thecolbertreport.cc.com/videos/51c17c/i-tried-to-sign-up-for-obamacare---health-care-house-of-horrors",
"http://thecolbertreport.cc.com/videos/w07qf1/i-tried-to-sign-up-for-obamacare---health-care-navigators",
"http://thecolbertreport.cc.com/videos/j95qfd/judy-woodruff---gwen-ifill",
"http://thecolbertreport.cc.com/videos/rtpako/sign-off---goodnight"
],
"guest": "Gwen Ifill, Judy Woodruff"
},
{
"date": "2013-10-24",
"videos": [
"http://thecolbertreport.cc.com/videos/3cv3ae/intro---10-24-13",
"http://thecolbertreport.cc.com/videos/8rabqj/girly-hats-for-the-marines",
"http://thecolbertreport.cc.com/videos/6zcsyl/the-word---philantrophy",
"http://thecolbertreport.cc.com/videos/60wsnw/craziest-f--king-thing-i-ve-ever-heard---tomtatoes",
"http://thecolbertreport.cc.com/videos/9ak9w5/stephen-fry",
"http://thecolbertreport.cc.com/videos/9py49q/sign-off---goodnight"
],
"guest": "Stephen Fry"
},
{
"date": "2013-10-28",
"videos": [
"http://thecolbertreport.cc.com/videos/xfzjxy/healthcare-gov-s-missing-woman",
"http://thecolbertreport.cc.com/videos/0m56pa/germany-s-nsa-outrage",
"http://thecolbertreport.cc.com/videos/7egvpg/germany-s-nsa-outrage---mark-mazzetti",
"http://thecolbertreport.cc.com/videos/boarwv/lifetime-of-furfillment",
"http://thecolbertreport.cc.com/videos/kz8x10/orlando-bloom",
"http://thecolbertreport.cc.com/videos/fl658q/sign-off---goodnight"
],
"guest": "Orlando Bloom"
},
{
"date": "2013-10-29",
"videos": [
"http://thecolbertreport.cc.com/videos/dhae0b/intro---10-29-13",
"http://thecolbertreport.cc.com/videos/qingaf/the-word---on-your-feet",
"http://thecolbertreport.cc.com/videos/yxqllm/rand-paul-s-plagiarism-problem",
"http://thecolbertreport.cc.com/videos/j9efvm/billy-collins",
"http://thecolbertreport.cc.com/videos/fnaadw/sign-off----aimless-love-"
],
"guest": "Billy Collins"
},
{
"date": "2013-10-30",
"videos": [
"http://thecolbertreport.cc.com/videos/wibml9/intro---10-30-13",
"http://thecolbertreport.cc.com/videos/me8aye/the-gop-s-self-disapproval",
"http://thecolbertreport.cc.com/videos/jns4fj/threatdown---divorce--undocumented-network-jumpers---global-warming",
"http://thecolbertreport.cc.com/videos/ammjdj/shepard-smith-s-digital-dependency",
"http://thecolbertreport.cc.com/videos/7frodo/jack-andraka",
"http://thecolbertreport.cc.com/videos/s14fzp/sign-off---goodnight"
],
"guest": "Jack Andraka"
},
{
"date": "2013-10-31",
"videos": [
"http://thecolbertreport.cc.com/videos/vr2jg3/intro---10-31-13",
"http://thecolbertreport.cc.com/videos/8q3ppm/war-on-halloween---matt-lauer-s-costume",
"http://thecolbertreport.cc.com/videos/2krnuz/blood-in-the-water---jim-wheeler-s-hypothetical-slavery-vote",
"http://thecolbertreport.cc.com/videos/mzqttu/the-word---see-no-evil",
"http://thecolbertreport.cc.com/videos/owduja/zach-sims",
"http://thecolbertreport.cc.com/videos/53uet6/sign-off---the-glenlivet"
],
"guest": "Zach Sims"
},
{
"date": "2013-11-04",
"videos": [
"http://thecolbertreport.cc.com/videos/hfr88n/intro---11-4-13",
"http://thecolbertreport.cc.com/videos/v68n7l/obamacare-s-gender-blind-premiums",
"http://thecolbertreport.cc.com/videos/oi11jp/the-word---inc--god-we-trust",
"http://thecolbertreport.cc.com/videos/29w6fx/-realhumanpraise-for-fox-news",
"http://thecolbertreport.cc.com/videos/z1sht0/david-folkenflik",
"http://thecolbertreport.cc.com/videos/vl9eiz/sign-off---goodnight"
],
"guest": "David Folkenflik"
},
{
"date": "2013-11-05",
"videos": [
"http://thecolbertreport.cc.com/videos/owoy1b/exclusive---julius-erving-extended-interview",
"http://thecolbertreport.cc.com/videos/7bd2cq/rob-ford-s-crack-scandal",
"http://thecolbertreport.cc.com/videos/s5iv9f/difference-makers---tim-morrison-and-meagan-brame",
"http://thecolbertreport.cc.com/videos/6abc8c/gay-sex-in-the-insect-world",
"http://thecolbertreport.cc.com/videos/9v56tr/julius-erving",
"http://thecolbertreport.cc.com/videos/du2t8n/sign-off---crack-pipe"
],
"guest": "Julius Erving"
},
{
"date": "2013-11-06",
"videos": [
"http://thecolbertreport.cc.com/videos/rpo0ya/ms--marvel-s-reboot",
"http://thecolbertreport.cc.com/videos/el55uc/tip-wag---toys--r--us--shroom-tombs---john-pike",
"http://thecolbertreport.cc.com/videos/hdhamk/washington-state-s-gmo-labeling-initiative",
"http://thecolbertreport.cc.com/videos/7nyym9/brian-lehrer",
"http://thecolbertreport.cc.com/videos/snu1i2/sign-off---welcome-baby-fischel-"
],
"guest": "Brian Lehrer"
},
{
"date": "2013-11-07",
"videos": [
"http://thecolbertreport.cc.com/videos/d61yyh/employment-non-discrimination-act",
"http://thecolbertreport.cc.com/videos/4cx9x8/sport-report---washington-redskins-name-controversy---miami-dolphins-bullying-allegations",
"http://thecolbertreport.cc.com/videos/7cyanz/who-might-be-honoring-me-next----people-s-choice-awards",
"http://thecolbertreport.cc.com/videos/80epmw/daniel-lieberman",
"http://thecolbertreport.cc.com/videos/tx4mq5/sign-off---people-s-choice-awards"
],
"guest": "Daniel Lieberman"
},
{
"date": "2013-11-11",
"videos": [
"http://thecolbertreport.cc.com/videos/84rhzu/-60-minutes--benghazi-controversy",
"http://thecolbertreport.cc.com/videos/uwudem/-60-minutes--benghazi-controversy---poncho-denews--bogus-bombshell",
"http://thecolbertreport.cc.com/videos/bd4gnc/chris-christie-s-sunday-media-blitz",
"http://thecolbertreport.cc.com/videos/2lqizl/peter-baker",
"http://thecolbertreport.cc.com/videos/kglpif/sign-off---goodnight"
],
"guest": "Peter Baker"
},
{
"date": "2013-11-12",
"videos": [
"http://thecolbertreport.cc.com/videos/iitiue/intro---11-12-13",
"http://thecolbertreport.cc.com/videos/pqrcpb/obamacare-enrollment-troubles",
"http://thecolbertreport.cc.com/videos/s7e3qv/iran-nuke-negotiations---french-resistance",
"http://thecolbertreport.cc.com/videos/0qvety/iran-nuke-negotiations---trita-parsi",
"http://thecolbertreport.cc.com/videos/9s2qhn/shantytown-glamour-camping",
"http://thecolbertreport.cc.com/videos/91wur1/david-christian",
"http://thecolbertreport.cc.com/videos/61ms6y/sign-off----a-single-roll-of-the-dice-"
],
"guest": "David Christian"
},
{
"date": "2013-11-13",
"videos": [
"http://thecolbertreport.cc.com/videos/1p3who/u-s--drone-controversy",
"http://thecolbertreport.cc.com/videos/h4v9zq/difference-makers---philip-steel",
"http://thecolbertreport.cc.com/videos/w8qzgv/blood-in-the-water---richard-cohen-s-conventional-wisdom",
"http://thecolbertreport.cc.com/videos/sn95d6/blind-boys-of-alabama---jimmy-carter"
],
"guest": "Blind Boys of Alabama"
},
{
"date": "2013-11-14",
"videos": [
"http://thecolbertreport.cc.com/videos/2o6sb0/philippines-typhoon-relief",
"http://thecolbertreport.cc.com/videos/8olyhc/rob-ford-s-defiance",
"http://thecolbertreport.cc.com/videos/wrbvsm/alexis-ohanian",
"http://thecolbertreport.cc.com/videos/nmbdiq/sign-off---kitten-cuddle"
],
"guest": "Alexis Ohanian"
},
{
"date": "2013-11-18",
"videos": [
"http://thecolbertreport.cc.com/videos/yv49an/intro---11-18-13",
"http://thecolbertreport.cc.com/videos/m7v6ee/philippines-relief-from-the-colbert-nation",
"http://thecolbertreport.cc.com/videos/suwtn9/obamacare-backlash---pundit-hyperbole",
"http://thecolbertreport.cc.com/videos/gnc6o8/obamacare-backlash---conservative-victory-lap",
"http://thecolbertreport.cc.com/videos/12pe6a/alpha-dog-of-the-week---chip-wilson",
"http://thecolbertreport.cc.com/videos/cdeggb/steve-mcqueen",
"http://thecolbertreport.cc.com/videos/5ow82m/sign-off---goodnight"
],
"guest": "Steve McQueen"
},
{
"date": "2013-11-19",
"videos": [
"http://thecolbertreport.cc.com/videos/kzu5qm/walmart-s-employee-food-drive",
"http://thecolbertreport.cc.com/videos/fkmwr4/america-s-wealth-divide",
"http://thecolbertreport.cc.com/videos/nj0wp7/america-s-wealth-divide---robert-reich",
"http://thecolbertreport.cc.com/videos/ppx1hm/slate-s--minutes-to-read--feature",
"http://thecolbertreport.cc.com/videos/g1usdl/rick-santorum",
"http://thecolbertreport.cc.com/videos/jnk6o6/sign-off---sweater-vest"
],
"guest": "Rick Santorum"
},
{
"date": "2013-11-20",
"videos": [
"http://thecolbertreport.cc.com/videos/kv4dxf/intro---11-20-13",
"http://thecolbertreport.cc.com/videos/xxqfor/trey-radel-s-cocaine-arrest",
"http://thecolbertreport.cc.com/videos/s2213y/tip-wag---hopped-up-pops--starbucks---american-consumers",
"http://thecolbertreport.cc.com/videos/aiu6v1/sport-report---russia-s-anti-gay-winter-games",
"http://thecolbertreport.cc.com/videos/bjap7z/m-i-a-"
],
"guest": "M.I.A."
},
{
"date": "2013-11-21",
"videos": [
"http://thecolbertreport.cc.com/videos/bz75lg/intro---11-21-13",
"http://thecolbertreport.cc.com/videos/16t3na/nuclear-option-in-the-senate",
"http://thecolbertreport.cc.com/videos/ynxkze/mary-fallin-and-same-sex-benefits",
"http://thecolbertreport.cc.com/videos/pqqitw/guess-who-s-coming-to-thanksgiving-dinner-",
"http://thecolbertreport.cc.com/videos/5idfv3/j-j--abrams",
"http://thecolbertreport.cc.com/videos/1xi9cj/sign-off----s-"
],
"guest": "J.J. Abrams"
},
{
"date": "2013-12-02",
"videos": [
"http://thecolbertreport.cc.com/videos/a8rc4x/intro---12-2-13",
"http://thecolbertreport.cc.com/videos/eax2go/healthcare-gov-revamp---presidential-turkey-pardon",
"http://thecolbertreport.cc.com/videos/32fik6/amazon-s-delivery-drones",
"http://thecolbertreport.cc.com/videos/kzzho9/blitzkrieg-on-grinchitude---bullet-catching-christmas-tree",
"http://thecolbertreport.cc.com/videos/tllp9w/daniel-goleman",
"http://thecolbertreport.cc.com/videos/4pjxs1/sign-off---eighth-anniversary-portrait"
],
"guest": "Daniel Goleman"
},
{
"date": "2013-12-03",
"videos": [
"http://thecolbertreport.cc.com/videos/810uks/intro---12-3-13",
"http://thecolbertreport.cc.com/videos/6yqi5n/the-pope-s-secret-life",
"http://thecolbertreport.cc.com/videos/ojh0t8/thought-for-food---ban-on-trans-fats---mcdonald-s-mcrib-mystery",
"http://thecolbertreport.cc.com/videos/fepuu2/the-double-robotics-office-robot",
"http://thecolbertreport.cc.com/videos/g14s8s/ed-stone",
"http://thecolbertreport.cc.com/videos/jkirej/sign-off---honoring-ed-stone"
],
"guest": "Ed Stone"
},
{
"date": "2013-12-04",
"videos": [
"http://thecolbertreport.cc.com/videos/xzvt8w/do-nothing-congress",
"http://thecolbertreport.cc.com/videos/vjdf7c/tip-wag---campaign-for-cursive---the-rnc",
"http://thecolbertreport.cc.com/videos/y2lfd6/colbert-platinum---freedom-ship",
"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://thecolbertreport.cc.com/videos/evhpy0/intro---12-5-13",
"http://thecolbertreport.cc.com/videos/r2orue/the-in-box---flight-vs--invisibility",
"http://thecolbertreport.cc.com/videos/t96lm4/legal-weed-in-colorado",
"http://thecolbertreport.cc.com/videos/q1iez3/legal-weed-in-colorado---ricardo-baca",
"http://thecolbertreport.cc.com/videos/zy6hlf/the-gop-s-lady-troubles",
"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/remembering-nelson-mandela",
"http://thecolbertreport.cc.com/videos/w58dfp/the-case-against-charity---bill-o-reilly---john-stossel",
"http://thecolbertreport.cc.com/videos/5y4hrs/the-case-against-charity---homeless-for-the-holidays",
"http://thecolbertreport.cc.com/videos/76e84o/stephen-s-grammy-nomination",
"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://thecolbertreport.cc.com/videos/my8zmp/intro---12-10-13",
"http://thecolbertreport.cc.com/videos/7yd7o2/walmart-s-job-acceptance-rate",
"http://thecolbertreport.cc.com/videos/z9zxq1/the-word---channel-serfing",
"http://thecolbertreport.cc.com/videos/kaj6y2/blitzkrieg-on-grinchitude---early-christmas-in-venezuela",
"http://thecolbertreport.cc.com/videos/pt29fq/alex-blumberg",
"http://thecolbertreport.cc.com/videos/99z3wt/sign-off---farewell-to-frank-lesser"
],
"guest": "Alex Blumberg"
},
{
"date": "2013-12-11",
"videos": [
"http://thecolbertreport.cc.com/videos/zye2nw/blitzkrieg-on-grinchitude---festivus-pole-in-the-florida-capitol",
"http://thecolbertreport.cc.com/videos/2vwk2a/obama-s-handshake-controversy",
"http://thecolbertreport.cc.com/videos/ayrep6/sign-language-scandal-at-mandela-s-memorial",
"http://thecolbertreport.cc.com/videos/jna07l/mike-huckabee-s--12-days-of-obamacare-",
"http://thecolbertreport.cc.com/videos/ld1i97/elizabeth-gilbert",
"http://thecolbertreport.cc.com/videos/nxssxf/sign-off---goodnight"
],
"guest": "Elizabeth Gilbert"
},
{
"date": "2013-12-12",
"videos": [
"http://thecolbertreport.cc.com/videos/juqc9w/bipartisan-budget-agreement",
"http://thecolbertreport.cc.com/videos/ygi28a/cheating-death---sleep-health---cosmetic-surgery",
"http://thecolbertreport.cc.com/videos/btidng/megyn-kelly-on-santa-s-skin-color",
"http://thecolbertreport.cc.com/videos/gv6c5c/george-packer",
"http://thecolbertreport.cc.com/videos/o3drqn/sign-off---goodnight"
],
"guest": "George Packer"
},
{
"date": "2013-12-16",
"videos": [
"http://thecolbertreport.cc.com/videos/tch93k/intro---12-16-13",
"http://thecolbertreport.cc.com/videos/t0srep/google-s-robot-acquisition",
"http://thecolbertreport.cc.com/videos/4q1rc7/nsa-video-game-surveillance",
"http://thecolbertreport.cc.com/videos/qepegb/stephen-s-grammy-nomination---billy-crystal",
"http://thecolbertreport.cc.com/videos/1wx2c5/jonah-peretti"
],
"guest": "Jonah Peretti, Gregg Allman, the National"
},
{
"date": "2013-12-17",
"videos": [
"http://thecolbertreport.cc.com/videos/ufkb4r/intro---12-17-13",
"http://thecolbertreport.cc.com/videos/hdex9j/anti-nsa-ruling---edward-snowden-s-asylum-bid",
"http://thecolbertreport.cc.com/videos/v7f6xw/tip-wag---all-china-edition",
"http://thecolbertreport.cc.com/videos/18yj36/-ted-cruz-to-the-future-",
"http://thecolbertreport.cc.com/videos/0hlwua/garry-trudeau"
],
"guest": "Garry Trudeau, Cyndi Lauper, Alan Cumming"
},
{
"date": "2013-12-18",
"videos": [
"http://thecolbertreport.cc.com/videos/uqgbw6/intro---12-18-13",
"http://thecolbertreport.cc.com/videos/w20rkq/rethinking-customer-satisfaction",
"http://thecolbertreport.cc.com/videos/hqucv3/santa-claus-ethnicity-debate",
"http://thecolbertreport.cc.com/videos/7ick9v/santa-claus-ethnicity-debate---hans-beinholtz",
"http://thecolbertreport.cc.com/videos/vv4aaz/keanu-reeves",
"http://thecolbertreport.cc.com/videos/52csyt/sign-off---goodnight"
],
"guest": "Keanu Reeves, Aaron Neville"
},
{
"date": "2013-12-19",
"videos": [
"http://thecolbertreport.cc.com/videos/rdc6qs/jamie-dimon-s-christmas-card",
"http://thecolbertreport.cc.com/videos/p9rfx1/fox-news-s--12-scams-of-christmas-",
"http://thecolbertreport.cc.com/videos/na7pll/phil-robertson-s--duck-dynasty--suspension",
"http://thecolbertreport.cc.com/videos/3q7h60/ben-stiller"
],
"guest": "Ben Stiller, the Blind Boys of Alabama"
}
],
"2014": [
{
"date": "2014-01-06",
"videos": [
"http://thecolbertreport.cc.com/videos/qaqhv8/intro---1-6-14",
"http://thecolbertreport.cc.com/videos/vobbe1/polar-vortex",
"http://thecolbertreport.cc.com/videos/3goywo/tip-wag---fda--toy-manufacturers---logo-party",
"http://thecolbertreport.cc.com/videos/hyg1jb/recreational-pot-sales-in-colorado",
"http://thecolbertreport.cc.com/videos/5qceid/ken-roth",
"http://thecolbertreport.cc.com/videos/f9w0xq/sign-off---polar-vortex"
],
"guest": "Kenneth Roth"
},
{
"date": "2014-01-07",
"videos": [
"http://thecolbertreport.cc.com/videos/4uqurx/donald-trump-and-fox---friends-vs--global-warming",
"http://thecolbertreport.cc.com/videos/s9iccj/income-inequality-debate",
"http://thecolbertreport.cc.com/videos/v3sijl/income-inequality-debate---jim-martin",
"http://thecolbertreport.cc.com/videos/b9gbou/time-travel-research-in-cyberspace",
"http://thecolbertreport.cc.com/videos/bz0qvj/john-seigenthaler",
"http://thecolbertreport.cc.com/videos/a4c8i8/sign-off----a-big-heart-open-to-god-"
],
"guest": "John Seigenthaler"
},
{
"date": "2014-01-08",
"videos": [
"http://thecolbertreport.cc.com/videos/1vojc6/intro---1-8-14",
"http://thecolbertreport.cc.com/videos/2zkpvh/chris-christie---the-george-washington-bridge-scandal",
"http://thecolbertreport.cc.com/videos/bkjqeq/cheating-death---robo-sperm---health-roulette",
"http://thecolbertreport.cc.com/videos/ct0fks/the-polar-vortex---fruit-tools",
"http://thecolbertreport.cc.com/videos/i292oo/ishmael-beah",
"http://thecolbertreport.cc.com/videos/srasr6/sign-off---cold-weather-fruit-hammer"
],
"guest": "Ishmael Beah"
},
{
"date": "2014-01-09",
"videos": [
"http://thecolbertreport.cc.com/videos/3nlrc7/new-jersey-bridge-scandal---damning-emails",
"http://thecolbertreport.cc.com/videos/ez26gi/new-jersey-bridge-scandal---chris-christie-s-someone-else-a-culpa",
"http://thecolbertreport.cc.com/videos/gvlcow/robert-gates-s--duty-",
"http://thecolbertreport.cc.com/videos/cjww9c/jeff-skoll",
"http://thecolbertreport.cc.com/videos/zmnwvz/sign-off---people-s-choice-award"
],
"guest": "Jeff Skoll"
},
{
"date": "2014-01-13",
"videos": [
"http://thecolbertreport.cc.com/videos/qh2gll/intro---1-13-14",
"http://thecolbertreport.cc.com/videos/nmeif6/water-crisis-in-west-virginia",
"http://thecolbertreport.cc.com/videos/l6fcm2/the-word---never-ender-s-game",
"http://thecolbertreport.cc.com/videos/ekq6m6/mirriad---retroactive-product-placement",
"http://thecolbertreport.cc.com/videos/zf2igg/sign-off---back-scratch"
],
"guest": "David Fanning"
},
{
"date": "2014-01-14",
"videos": [
"http://thecolbertreport.cc.com/videos/e0ksix/sport-report---baseball",
"http://thecolbertreport.cc.com/videos/8aoa48/sport-report---winter-sports",
"http://thecolbertreport.cc.com/videos/4lplhb/sport-report---billie-jean-king",
"http://thecolbertreport.cc.com/videos/1urzjl/deborah-solomon",
"http://thecolbertreport.cc.com/videos/b5df4x/sign-off---goodnight"
],
"guest": "Deborah Solomon"
},
{
"date": "2014-01-15",
"videos": [
"http://thecolbertreport.cc.com/videos/daejaf/ad-for-america",
"http://thecolbertreport.cc.com/videos/bxdt1w/sport-report---uneducated-college-athletes---peyton-manning-s-sponsor-shout-out",
"http://thecolbertreport.cc.com/videos/rbh95h/alpha-dog-of-the-week---francois-hollande",
"http://thecolbertreport.cc.com/videos/tkqmyv/gabriel-sherman",
"http://thecolbertreport.cc.com/videos/efgh7j/sign-off---goodnight"
],
"guest": "Gabriel Sherman"
},
{
"date": "2014-01-16",
"videos": [
"http://thecolbertreport.cc.com/videos/pqopug/nsa-software-implants",
"http://thecolbertreport.cc.com/videos/6omuyc/colbert-platinum---diamond-pacifiers---financial-domination",
"http://thecolbertreport.cc.com/videos/d589xx/stephen-s-grammy-nomination---carol-burnett",
"http://thecolbertreport.cc.com/videos/4g3c4f/naquasia-legrand",
"http://thecolbertreport.cc.com/videos/h6vhef/sign-off---colbert-s-book-club"
],
"guest": "Naquasia LeGrand"
},
{
"date": "2014-01-20",
"videos": [
"http://thecolbertreport.cc.com/videos/2jaqbf/intro---1-20-13",
"http://thecolbertreport.cc.com/videos/6qy0qw/peyton-manning-s--omaha--chant---marijuana-s-effects-on-football",
"http://thecolbertreport.cc.com/videos/bg48ms/the-word---thrift-justice",
"http://thecolbertreport.cc.com/videos/1ah0qw/pope-francis-s-breastfeeding-support---affordable-sainthood",
"http://thecolbertreport.cc.com/videos/szyyzo/scott-stossel",
"http://thecolbertreport.cc.com/videos/3kds6e/sign-off---colbert-s-book-club-reminder"
],
"guest": "Scott Stossel"
},
{
"date": "2014-01-21",
"videos": [
"http://thecolbertreport.cc.com/videos/6g3tkl/sign-off---colbert-s-book-club---ernest-hemingway-s--a-farewell-to-arms-",
"http://thecolbertreport.cc.com/videos/27el91/colbert-s-book-club---mariel-hemingway-on-ernest-hemingway",
"http://thecolbertreport.cc.com/videos/c8gx08/colbert-s-book-club---michael-chabon----a-farewell-to-arms-",
"http://thecolbertreport.cc.com/videos/2tt8np/colbert-s-book-club---better-know-a-hemingway",
"http://thecolbertreport.cc.com/videos/8vzg0l/colbert-s-book-club---ernest-hemingway"
],
"guest": "Michael Chabon, Mariel Hemingway"
},
{
"date": "2014-01-22",
"videos": [
"http://thecolbertreport.cc.com/videos/o2dl8a/intro---1-22-14",
"http://thecolbertreport.cc.com/videos/id8eug/mystery-doughnut-on-mars",
"http://thecolbertreport.cc.com/videos/db8f37/tip-wag---air-force--dr--keith-ablow---westminster-dog-show",
"http://thecolbertreport.cc.com/videos/wjov9z/tikker-death-watch",
"http://thecolbertreport.cc.com/videos/y85ykp/charles-duhigg",
"http://thecolbertreport.cc.com/videos/ihby00/sign-off---mutt"
],
"guest": "Charles Duhigg"
},
{
"date": "2014-01-23",
"videos": [
"http://thecolbertreport.cc.com/videos/ay6diu/riots-in-the-ukraine",
"http://thecolbertreport.cc.com/videos/nnj3ic/end-of-net-neutrality",
"http://thecolbertreport.cc.com/videos/qatuhg/end-of-net-neutrality---tim-wu",
"http://thecolbertreport.cc.com/videos/0i8pwp/china-s-colbert-report-rip-off",
"http://thecolbertreport.cc.com/videos/fykny6/patricia-churchland",
"http://thecolbertreport.cc.com/videos/5axbrg/sign-off---goodnight"
],
"guest": "Patricia Churchland"
},
{
"date": "2014-01-27",
"videos": [
"http://thecolbertreport.cc.com/videos/qs3r6w/logo-restrictions-for-the-super-bowl",
"http://thecolbertreport.cc.com/videos/51gnff/richard-sherman-s-rant-fallout",
"http://thecolbertreport.cc.com/videos/mk6zsq/nate-silver",
"http://thecolbertreport.cc.com/videos/c58bm1/sign-off---grammy-award"
],
"guest": "Nate Silver"
},
{
"date": "2014-01-28",
"videos": [
"http://thecolbertreport.cc.com/videos/gzw6pe/superb-owl-xlviii---nfl-extra-point-debate",
"http://thecolbertreport.cc.com/videos/g3ng7g/fallback-position---championship-nfl-quarterback",
"http://thecolbertreport.cc.com/videos/y1y1q6/spotted-owls-vs--barred-owls---david-yarnold",
"http://thecolbertreport.cc.com/videos/wx55bg/justin-tuck",
"http://thecolbertreport.cc.com/videos/q6n89x/sign-off---tootsie-pop"
],
"guest": "Justin Tuck"
},
{
"date": "2014-01-29",
"videos": [
"http://thecolbertreport.cc.com/videos/79qyj3/superb-owl-xlviii---football-christmas",
"http://thecolbertreport.cc.com/videos/pzw1hz/fallback-position---championship-nfl-quarterback-pt--2",
"http://thecolbertreport.cc.com/videos/0czypw/distractions---reactions-at-the-state-of-the-union",
"http://thecolbertreport.cc.com/videos/6h1tef/cris-carter"
],
"guest": "Cris Carter"
},
{
"date": "2014-01-30",
"videos": [
"http://thecolbertreport.cc.com/videos/vp5oqx/superb-owl-xlviii---football-health-concerns",
"http://thecolbertreport.cc.com/videos/8z0t1l/superb-owl-xlviii---football-health-concerns---steve-fainaru---mark-fainaru-wada",
"http://thecolbertreport.cc.com/videos/b88aif/big-game-debate-with-ed-murray-and-michael-hancock",
"http://thecolbertreport.cc.com/videos/7aqq1s/drew-brees",
"http://thecolbertreport.cc.com/videos/yucj0t/sign-off---football-toss"
],
"guest": "Drew Brees"
},
{
"date": "2014-02-03",
"videos": [
"http://thecolbertreport.cc.com/videos/kmzt7v/coca-cola-s-diverse--america-the-beautiful--ad",
"http://thecolbertreport.cc.com/videos/65qhlv/tip-wag---litigious-cheerleaders--pope-francis---china",
"http://thecolbertreport.cc.com/videos/nezg8b/j-k--rowling-s-ron-and-hermione-bombshell",
"http://thecolbertreport.cc.com/videos/nocpjv/jennifer-senior",
"http://thecolbertreport.cc.com/videos/msb2vl/sign-off---goodnight"
],
"guest": "Jennifer Senior"
},
{
"date": "2014-02-04",
"videos": [
"http://thecolbertreport.cc.com/videos/m0k7nu/black-history-of-children-s-dental-health-month---chris-christie-s-bridge-scandal-connection",
"http://thecolbertreport.cc.com/videos/81q2jm/chris-christie-vs--david-wildstein-on-the-new-jersey-bridge-scandal",
"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/sign-off---pussy-riot----bringing-human-rights-back-home-"
],
"guest": "Pussy Riot"
},
{
"date": "2014-02-05",
"videos": [
"http://thecolbertreport.cc.com/videos/nn8d7g/intro---2-5-14",
"http://thecolbertreport.cc.com/videos/w3uorg/obamacare-jobs-debate",
"http://thecolbertreport.cc.com/videos/djw49l/america-s-wealthy-under-siege---mort-zuckerman",
"http://thecolbertreport.cc.com/videos/cjdkxj/lake-street-dive",
"http://thecolbertreport.cc.com/videos/6itibl/sign-off---goodnight"
],
"guest": "Lake Street Dive"
},
{
"date": "2014-02-06",
"videos": [
"http://thecolbertreport.cc.com/videos/tzqa3o/obama---the-keystone-xl-pipeline",
"http://thecolbertreport.cc.com/videos/e3q55j/sochi-olympics-cry-athlon",
"http://thecolbertreport.cc.com/videos/yzcp46/tip-wag---tsa-peeping-toms--domino-s-pizza-artists---federal-judges",
"http://thecolbertreport.cc.com/videos/ze9n7p/paul-krugman",
"http://thecolbertreport.cc.com/videos/1ur5x9/sign-off---welcome-baby-eli-"
],
"guest": "Paul Krugman"
},
{
"date": "2014-02-10",
"videos": [
"http://thecolbertreport.cc.com/videos/alv9kr/rocky-start-at-the-sochi-olympics",
"http://thecolbertreport.cc.com/videos/155uge/sport-report---from-russia-with-love--but-no-gay-stuff-",
"http://thecolbertreport.cc.com/videos/s385jl/taliban-dognappers",
"http://thecolbertreport.cc.com/videos/hmu6hf/patrick-kennedy",
"http://thecolbertreport.cc.com/videos/bl6jzi/sign-off---buddy-cole"
],
"guest": "Patrick Kennedy"
},
{
"date": "2014-02-11",
"videos": [
"http://thecolbertreport.cc.com/videos/zddxmq/intro---2-11-14",
"http://thecolbertreport.cc.com/videos/yesavg/blade-in-the-usa",
"http://thecolbertreport.cc.com/videos/ow2caa/sport-report---from-russia-with-love--but-no-gay-stuff----u-s--speedskating-team",
"http://thecolbertreport.cc.com/videos/cxui4b/sport-report---michael-sam-s-coming-out",
"http://thecolbertreport.cc.com/videos/8yt2ar/charlie-crist",
"http://thecolbertreport.cc.com/videos/v6h2iw/sign-off---goodnight"
],
"guest": "Charlie Crist"
},
{
"date": "2014-02-12",
"videos": [
"http://thecolbertreport.cc.com/videos/mke8f4/white-house-state-dinner",
"http://thecolbertreport.cc.com/videos/ngjlqq/bill-o-reilly-s-interview-of-the-decade",
"http://thecolbertreport.cc.com/videos/f7yt2f/because-shep---white-house-menu-report",
"http://thecolbertreport.cc.com/videos/zqevr4/godfrey-reggio",
"http://thecolbertreport.cc.com/videos/wd8rlk/sign-off---au-revoir"
],
"guest": "Godfrey Reggio"
},
{
"date": "2014-02-18",
"videos": [
"http://thecolbertreport.cc.com/videos/cb08sc/intro---2-18-14",
"http://thecolbertreport.cc.com/videos/esabem/jimmy-fallon-s--tonight-show--debut",
"http://thecolbertreport.cc.com/videos/icw75d/transgender-awareness",
"http://thecolbertreport.cc.com/videos/px4k4w/transgender-awareness---janet-mock",
"http://thecolbertreport.cc.com/videos/fpn2d7/brian-greene",
"http://thecolbertreport.cc.com/videos/7cxypm/sign-off---goodnight"
],
"guest": "Brian Greene"
},
{
"date": "2014-02-19",
"videos": [
"http://thecolbertreport.cc.com/videos/8ht320/intro---2-19-14",
"http://thecolbertreport.cc.com/videos/z8viri/sport-report---from-russia-with-love--but-no-gay-stuff----buddy-cole-in-sochi",
"http://thecolbertreport.cc.com/videos/k0fmq0/victory-and-vigilance-at-the-sochi-games",
"http://thecolbertreport.cc.com/videos/pdgpm2/smile-file---al-qaeda-bomb-blunder",
"http://thecolbertreport.cc.com/videos/80x11s/alexander-payne",
"http://thecolbertreport.cc.com/videos/r3yso9/sign-off---goodnight"
],
"guest": "Alexander Payne"
},
{
"date": "2014-02-20",
"videos": [
"http://thecolbertreport.cc.com/videos/gtx5i8/auction-for-bill-o-reilly-s-stolen-microwave",
"http://thecolbertreport.cc.com/videos/7alqr9/sochi-olympics-2014---bode-miller",
"http://thecolbertreport.cc.com/videos/i1pl20/stanley-mcchrystal",
"http://thecolbertreport.cc.com/videos/3j3ziw/sign-off---microwave-auction---stanley-mcchrystal"
],
"guest": "Gen. Stanley McChrystal"
},
{
"date": "2014-02-24",
"videos": [
"http://thecolbertreport.cc.com/videos/1x3cmv/intro---2-24-14",
"http://thecolbertreport.cc.com/videos/dxcy1y/blade-in-the-usa---dutch-coach-s-anti-america-rant",
"http://thecolbertreport.cc.com/videos/y1wxc3/crisis-in-ukraine",
"http://thecolbertreport.cc.com/videos/8067fc/crisis-in-ukraine---gideon-rose",
"http://thecolbertreport.cc.com/videos/2y58gs/darlene-love",
"http://thecolbertreport.cc.com/videos/illjzj/sign-off---remembering-harold-ramis"
],
"guest": "Darlene Love"
},
{
"date": "2014-02-25",
"videos": [
"http://thecolbertreport.cc.com/videos/blcgek/the-huffington-post-on-the-past-lives-of-children",
"http://thecolbertreport.cc.com/videos/uov6m4/outrage-over-military-budget-cuts",
"http://thecolbertreport.cc.com/videos/y2j7vo/the-word---jobsolete",
"http://thecolbertreport.cc.com/videos/yw875l/consumers-for-paper-options",
"http://thecolbertreport.cc.com/videos/w2zhlc/st--vincent"
],
"guest": "St. Vincent"
},
{
"date": "2014-02-26",
"videos": [
"http://thecolbertreport.cc.com/videos/7vvoyf/michelle-obama-vs--child-obesity",
"http://thecolbertreport.cc.com/videos/gs9vcz/colbert-s-very-wanted---who-took-gumby-",
"http://thecolbertreport.cc.com/videos/y307f3/fox-news-on-hillary-clinton-s-age",
"http://thecolbertreport.cc.com/videos/tb28zm/meryl-davis---charlie-white",
"http://thecolbertreport.cc.com/videos/3w27qv/sign-off---chair-twirl"
],
"guest": "Meryl Davis & Charlie White"
},
{
"date": "2014-02-27",
"videos": [
"http://thecolbertreport.cc.com/videos/11tivg/intro---2-27-14",
"http://thecolbertreport.cc.com/videos/28qta1/defeat-for-arizona-s-anti-gay-legislation",
"http://thecolbertreport.cc.com/videos/p8fj8f/black-history-month---stereotypes---racial-identity",
"http://thecolbertreport.cc.com/videos/300ry4/black-history-month---laser-klan",
"http://thecolbertreport.cc.com/videos/8ijgcp/jeff-goldblum",
"http://thecolbertreport.cc.com/videos/axkpkj/sign-off---wedding-cake"
],
"guest": "Jeff Goldblum"
},
{
"date": "2014-03-03",
"videos": [
"http://thecolbertreport.cc.com/videos/hbrhpe/magical-evening-at-the-2014-academy-awards",
"http://thecolbertreport.cc.com/videos/q8u939/phony-obamacare-horror-stories",
"http://thecolbertreport.cc.com/videos/8jpus1/phony-obamacare-horror-stories---patrick-stewart",
"http://thecolbertreport.cc.com/videos/ysbw7d/sports-illustrated-barbie",
"http://thecolbertreport.cc.com/videos/wwqhgn/caitlin-flanagan",
"http://thecolbertreport.cc.com/videos/z2x5tb/sign-off----waiting-for-godot-"
],
"guest": "Caitlin Flanagan"
},
{
"date": "2014-03-04",
"videos": [
"http://thecolbertreport.cc.com/videos/y4s2js/intro---3-4-14",
"http://thecolbertreport.cc.com/videos/avavv1/better-know-a-geopolitical-flashpoint---crimean-peninsula",
"http://thecolbertreport.cc.com/videos/r79jgq/cold-war-update---obama-s-ukraine-response",
"http://thecolbertreport.cc.com/videos/dpc49v/arizona-s-religious-freedom-bill---self-professed-gays",
"http://thecolbertreport.cc.com/videos/bjwnn1/jaron-lanier",
"http://thecolbertreport.cc.com/videos/38n33x/sign-off---shoe-answering-machine"
],
"guest": "Jaron Lanier"
},
{
"date": "2014-03-05",
"videos": [
"http://thecolbertreport.cc.com/videos/a2cnjz/intro---3-5-14",
"http://thecolbertreport.cc.com/videos/chbquj/bill-o-reilly-on-the-downside-of-a-woman-president",
"http://thecolbertreport.cc.com/videos/ak3veo/tip-wag---chevron---fda",
"http://thecolbertreport.cc.com/videos/ppqf1u/headline-news-rebrand",
"http://thecolbertreport.cc.com/videos/0exuju/beau-willimon",
"http://thecolbertreport.cc.com/videos/gexopu/sign-off---goodnight"
],
"guest": "Beau Willimon"
},
{
"date": "2014-03-06",
"videos": [
"http://thecolbertreport.cc.com/videos/mmf7np/intro---3-6-14",
"http://thecolbertreport.cc.com/videos/te4fyy/legal-upskirting-in-massachusetts",
"http://thecolbertreport.cc.com/videos/awc6am/women-s-history-month---impossible-body-standards---appetizing-beauty-products",
"http://thecolbertreport.cc.com/videos/3si7rs/warner-music-s--happy-birthday--copyright",
"http://thecolbertreport.cc.com/videos/f3jjle/theaster-gates",
"http://thecolbertreport.cc.com/videos/g6qd4x/sign-off---liberty-bell"
],
"guest": "Theaster Gates"
},
{
"date": "2014-03-10",
"videos": [
"http://thecolbertreport.cc.com/videos/ag9578/intro---3-10-14",
"http://thecolbertreport.cc.com/videos/a6f94j/cross-controversy-at-9-11-museum",
"http://thecolbertreport.cc.com/videos/bn0fy6/the-word---pew--pew--pew-",
"http://thecolbertreport.cc.com/videos/gh6urb/neil-degrasse-tyson-pt--1",
"http://thecolbertreport.cc.com/videos/42g6iq/neil-degrasse-tyson-pt--2",
"http://thecolbertreport.cc.com/videos/1bou2c/sign-off---goodnight"
],
"guest": "Neil DeGrasse Tyson"
},
{
"date": "2014-03-11",
"videos": [
"http://thecolbertreport.cc.com/videos/g08oh5/intro---3-11-14",
"http://thecolbertreport.cc.com/videos/usi00y/fan-magazine-for-pope-francis",
"http://thecolbertreport.cc.com/videos/pis5qm/the-huffington-post-s-anal-sex-bombshell",
"http://thecolbertreport.cc.com/videos/pvjhwj/the-huffington-post-s-anal-sex-bombshell---randy-ferrar",
"http://thecolbertreport.cc.com/videos/qacc88/tip-wag---u-s--department-of-justice---wall-street",
"http://thecolbertreport.cc.com/videos/nba46a/ronan-farrow",
"http://thecolbertreport.cc.com/videos/hncfzx/sign-off---pope-centerfold"
],
"guest": "Ronan Farrow"
},
{
"date": "2014-03-12",
"videos": [
"http://thecolbertreport.cc.com/videos/ut2zdq/president-obama-on--between-two-ferns-",
"http://thecolbertreport.cc.com/videos/h6q3h4/vladimir-putin-s-propaganda-machine---russia-today",
"http://thecolbertreport.cc.com/videos/i7q6ld/vladimir-putin-s-propaganda-machine---russia-today---liz-wahl",
"http://thecolbertreport.cc.com/videos/wp6hv1/nsa-s--ask-zelda--advice-column",
"http://thecolbertreport.cc.com/videos/2qsrw5/maria-shriver",
"http://thecolbertreport.cc.com/videos/i6cs26/sign-off---goodnight"
],
"guest": "Maria Shriver"
},
{
"date": "2014-03-13",
"videos": [
"http://thecolbertreport.cc.com/videos/5js43m/colorado-s-booming-marijuana-industry",
"http://thecolbertreport.cc.com/videos/a1ejoq/bears---balls---ganjapreneurs",
"http://thecolbertreport.cc.com/videos/xkuwmd/obama-s-overtime-pay-expansion",
"http://thecolbertreport.cc.com/videos/k9goh1/simon-schama",
"http://thecolbertreport.cc.com/videos/tl1mce/sign-off---goodnight"
],
"guest": "Simon Schama"
},
{
"date": "2014-03-24",
"videos": [
"http://thecolbertreport.cc.com/videos/hjb6kt/back-from-spring-break",
"http://thecolbertreport.cc.com/videos/imczen/better-know-a-district---north-carolina-s-1st---g-k--butterfield",
"http://thecolbertreport.cc.com/videos/8cy48v/malaysia-airlines--missing-plane",
"http://thecolbertreport.cc.com/videos/g4poyv/bryan-cranston",
"http://thecolbertreport.cc.com/videos/a2iw3f/sign-off---goodnight"
],
"guest": "Bryan Cranston"
},
{
"date": "2014-03-25",
"videos": [
"http://thecolbertreport.cc.com/videos/9n1euv/hugely-historic-night-with-jimmy-carter",
"http://thecolbertreport.cc.com/videos/0k0w7y/president-jimmy-carter---the-colbert-interviews",
"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/sign-off---goodnight--carter-library"
],
"guest": "Jimmy Carter"
},
{
"date": "2014-03-26",
"videos": [
"http://thecolbertreport.cc.com/videos/1zhwtt/drunk-secret-service-agents-in-amsterdam",
"http://thecolbertreport.cc.com/videos/b6cwb3/sport-report---professional-soccer-toddler--golf-innovations---washington-redskins-charm-offensive",
"http://thecolbertreport.cc.com/videos/q8pyub/bright-prospects-for-the-gop-in-2016",
"http://thecolbertreport.cc.com/videos/mcpvbd/errol-morris",
"http://thecolbertreport.cc.com/videos/ycwnol/sign-off---goodnight"
],
"guest": "Errol Morris"
},
{
"date": "2014-03-27",
"videos": [
"http://thecolbertreport.cc.com/videos/qforig/intro---3-27-14",
"http://thecolbertreport.cc.com/videos/uqmqua/ukraine-s-dolphin-army",
"http://thecolbertreport.cc.com/videos/cabdj6/morning-news-for-millennials",
"http://thecolbertreport.cc.com/videos/srj2lz/hawaii-s-prostitution-exemption-for-cops",
"http://thecolbertreport.cc.com/videos/77oyfl/darren-aronofsky",
"http://thecolbertreport.cc.com/videos/tyuheg/sign-off---playdate-with-charlie-rose"
],
"guest": "Darren Aronofsky"
},
{
"date": "2014-03-31",
"videos": [
"http://thecolbertreport.cc.com/videos/lumbga/intro---3-31-14",
"http://thecolbertreport.cc.com/videos/3yhe9h/emoji-ethnicity",
"http://thecolbertreport.cc.com/videos/1zkr18/who-s-attacking-me-now-----cancelcolbert",
"http://thecolbertreport.cc.com/videos/35dcpo/stephen-s--cancelcolbert-mea-culpa",
"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/sign-off---bud-light-lime",
"http://thecolbertreport.cc.com/videos/p65waq/3-31-14-in--60-seconds"
],
"guest": "Biz Stone"
},
{
"date": "2014-04-01",
"videos": [
"http://thecolbertreport.cc.com/videos/3ljnpx/obamacare-victory-lap",
"http://thecolbertreport.cc.com/videos/cviqog/union-push-for-college-athletes",
"http://thecolbertreport.cc.com/videos/64v4nu/union-push-for-college-athletes---ramogi-huma",
"http://thecolbertreport.cc.com/videos/784uo8/john-malkovich",
"http://thecolbertreport.cc.com/videos/rc1p9n/sign-off---goodnight",
"http://thecolbertreport.cc.com/videos/c9xd2d/4-1-14-in--60-seconds"
],
"guest": "John Malkovich"
},
{
"date": "2014-04-02",
"videos": [
"http://thecolbertreport.cc.com/videos/zxr7i2/u-n--climate-change-report",
"http://thecolbertreport.cc.com/videos/o639ag/the-word---silent-but-deadly",
"http://thecolbertreport.cc.com/videos/1ypxfz/silicon-valley-s-cosmetic-surgery-boom",
"http://thecolbertreport.cc.com/videos/pnhs3f/dan-harris",
"http://thecolbertreport.cc.com/videos/wrxyua/sign-off---comedy-central-app"
],
"guest": "Dan Harris"
},
{
"date": "2014-04-03",
"videos": [
"http://thecolbertreport.cc.com/videos/kas793/holy-grail-discovery",
"http://thecolbertreport.cc.com/videos/n79fg2/supreme-court-ruling-on-aggregate-campaign-funding",
"http://thecolbertreport.cc.com/videos/n6lhb9/supreme-court-ruling-on-aggregate-campaign-funding---emily-bazelon",
"http://thecolbertreport.cc.com/videos/4vb00q/bill-o-reilly-s-defense-of-inequality",
"http://thecolbertreport.cc.com/videos/fgsnrb/mark-mazzetti",
"http://thecolbertreport.cc.com/videos/255jt7/sign-off---coffee-break"
],
"guest": "Mark Mazzetti"
},
{
"date": "2014-04-07",
"videos": [
"http://thecolbertreport.cc.com/videos/lz94c9/jeb-bush-on-illegal-immigrants",
"http://thecolbertreport.cc.com/videos/jjifoz/tip-wag---new-york-times--alaska-board-of-game---mazda",
"http://thecolbertreport.cc.com/videos/jvziju/matt-bevin-s-cockfighting-controversy",
"http://thecolbertreport.cc.com/videos/xj9d66/edward-frenkel",
"http://thecolbertreport.cc.com/videos/2dvxf1/sign-off---newspaper"
],
"guest": "Edward Frenkel"
},
{
"date": "2014-04-08",
"videos": [
"http://thecolbertreport.cc.com/videos/m6pj8n/intro---4-8-14",
"http://thecolbertreport.cc.com/videos/wpor0d/america-s-uninformed-opinion-on-ukraine",
"http://thecolbertreport.cc.com/videos/ncl2k5/cia-interrogation-report",
"http://thecolbertreport.cc.com/videos/nemi1a/common-core-confusion",
"http://thecolbertreport.cc.com/videos/uyjkgv/jane-goodall",
"http://thecolbertreport.cc.com/videos/2v7871/sign-off---cheers"
],
"guest": "Jane Goodall"
},
{
"date": "2014-04-09",
"videos": [
"http://thecolbertreport.cc.com/videos/53uymc/intro---4-9-14",
"http://thecolbertreport.cc.com/videos/o3rniz/heartbleed-internet-bug",
"http://thecolbertreport.cc.com/videos/8a5aao/brendan-eich-s-forced-resignation",
"http://thecolbertreport.cc.com/videos/3pg0sn/brendan-eich-s-forced-resignation---andrew-sullivan",
"http://thecolbertreport.cc.com/videos/l9zuu1/obama-s-equal-pay-orders",
"http://thecolbertreport.cc.com/videos/wr794b/sheryl-sandberg",
"http://thecolbertreport.cc.com/videos/mroadr/sign-off---goodnight"
],
"guest": "Sheryl Sandberg"
},
{
"date": "2014-04-10",
"videos": [
"http://thecolbertreport.cc.com/videos/k436zi/david-letterman-s-retirement",
"http://thecolbertreport.cc.com/videos/kv1taq/cheating-death---depression-edition",
"http://thecolbertreport.cc.com/videos/3a9611/bill-o-reilly-on-america-s--grievance-industry-",
"http://thecolbertreport.cc.com/videos/yi8cxa/sting"
],
"guest": "Sting"
},
{
"date": "2014-04-21",
"videos": [
"http://thecolbertreport.cc.com/videos/1tyawq/intro---4-21-14",
"http://thecolbertreport.cc.com/videos/0w61r2/al-qaeda-s-overly-public-pep-rally",
"http://thecolbertreport.cc.com/videos/055g6r/hillary-clinton-s-grandmother-status",
"http://thecolbertreport.cc.com/videos/7d5y74/stephen-colbert-s-bats--t-serious---hillary-clinton-shoe-spiracy-theory",
"http://thecolbertreport.cc.com/videos/hls49q/extreme-measures-for-boosting-church-attendance",
"http://thecolbertreport.cc.com/videos/p5o99a/ken-burns",
"http://thecolbertreport.cc.com/videos/v2nud8/sign-off---goodnight"
],
"guest": "Ken Burns"
},
{
"date": "2014-04-22",
"videos": [
"http://thecolbertreport.cc.com/videos/t2msi7/intro---4-22-14",
"http://thecolbertreport.cc.com/videos/1j1m90/postage-stamp-for-harvey-milk",
"http://thecolbertreport.cc.com/videos/0bsy88/better-know-a-district---california-s-29th",
"http://thecolbertreport.cc.com/videos/kg42wy/bad-news-for-ethanol-on-earth-day",
"http://thecolbertreport.cc.com/videos/yeczpa/george-will",
"http://thecolbertreport.cc.com/videos/0b7ymc/sign-off---goodnight"
],
"guest": "George Will"
},
{
"date": "2014-04-23",
"videos": [
"http://thecolbertreport.cc.com/videos/vnbuc3/intro---4-23-14",
"http://thecolbertreport.cc.com/videos/8l716g/canada-s-booming-middle-class",
"http://thecolbertreport.cc.com/videos/tn3469/sport-report---snacks-for-students---cockfighting",
"http://thecolbertreport.cc.com/videos/lz21l6/america-s-lime-crisis",
"http://thecolbertreport.cc.com/videos/g5cgj8/john-calipari",
"http://thecolbertreport.cc.com/videos/6glbo4/sign-off---goodnight"
],
"guest": "John Calipari"
},
{
"date": "2014-04-24",
"videos": [
"http://thecolbertreport.cc.com/videos/2c27q9/supreme-court-affirmative-action-ruling",
"http://thecolbertreport.cc.com/videos/ehanpl/the-ballad-of-cliven-bundy",
"http://thecolbertreport.cc.com/videos/5mf7zk/phyllis-schlafly-vs--equal-pay-for-women",
"http://thecolbertreport.cc.com/videos/ufdzm1/george-saunders",
"http://thecolbertreport.cc.com/videos/vtuwb7/sign-off---country-boy"
],
"guest": "George Saunders"
},
{
"date": "2014-04-28",
"videos": [
"http://thecolbertreport.cc.com/videos/6fq0xa/popechella",
"http://thecolbertreport.cc.com/videos/yhq2cw/preventable-diseases-on-the-rise",
"http://thecolbertreport.cc.com/videos/svsc0q/preventable-diseases-on-the-rise---paul-offit",
"http://thecolbertreport.cc.com/videos/5my1ja/outrage-over-obama-s-bowing",
"http://thecolbertreport.cc.com/videos/i1lidr/michael-mcfaul",
"http://thecolbertreport.cc.com/videos/gu3d7a/sign-off----deadly-choices-"
],
"guest": "Michael McFaul"
},
{
"date": "2014-04-29",
"videos": [
"http://thecolbertreport.cc.com/videos/cxn6h3/intro---4-29-14",
"http://thecolbertreport.cc.com/videos/jfz395/donald-sterling-s-racist-comments",
"http://thecolbertreport.cc.com/videos/td7npw/tip-wag---j-j--abrams---u-s--congress",
"http://thecolbertreport.cc.com/videos/8pyjlg/clemency-push-for-drug-convicts",
"http://thecolbertreport.cc.com/videos/eyae6k/robert-rodriguez",
"http://thecolbertreport.cc.com/videos/11mf9t/sign-off---goodnight"
],
"guest": "Robert Rodriguez"
},
{
"date": "2014-04-30",
"videos": [
"http://thecolbertreport.cc.com/videos/kdwdgq/intro---4-30-14",
"http://thecolbertreport.cc.com/videos/6lmqu6/president-assad-s-reelection-bid",
"http://thecolbertreport.cc.com/videos/so1kau/republican-advantage-in-the-2014-midterms",
"http://thecolbertreport.cc.com/videos/2nuw76/republican-advantage-in-the-2014-midterms---clay-aiken",
"http://thecolbertreport.cc.com/videos/tfpj0x/america-s-first-lesbian-throuple",
"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/-watters--world----tad-s-turf",
"http://thecolbertreport.cc.com/videos/zbjl95/cnn-s-endless-wait-for-flight-370-news",
"http://thecolbertreport.cc.com/videos/hji3d3/saul-williams",
"http://thecolbertreport.cc.com/videos/ie7s2m/saul-williams----amethyst-rocks-"
],
"guest": "Saul Williams"
},
{
"date": "2014-05-05",
"videos": [
"http://thecolbertreport.cc.com/videos/unhuhc/intro---5-5-14",
"http://thecolbertreport.cc.com/videos/oxvwlw/nancy-pelosi-s-cinco-de-mayo-celebration",
"http://thecolbertreport.cc.com/videos/0hu2aq/better-know-a-district---virginia-s-3rd",
"http://thecolbertreport.cc.com/videos/fo52kn/kareem-abdul-jabbar-on-racism-and-ghosts",
"http://thecolbertreport.cc.com/videos/c0s4ec/edward-o--wilson",
"http://thecolbertreport.cc.com/videos/4tegd5/sign-off---goodnight"
],
"guest": "Edward O. Wilson"
},
{
"date": "2014-05-06",
"videos": [
"http://thecolbertreport.cc.com/videos/pnqv06/intro---5-6-14",
"http://thecolbertreport.cc.com/videos/khlwzq/rand-paul-s-derby-date-with-rupert-murdoch",
"http://thecolbertreport.cc.com/videos/s4me1v/nra-annual-meeting---guns-everywhere-in-georgia",
"http://thecolbertreport.cc.com/videos/zekn1k/satanic-monument-for-the-oklahoma-state-house",
"http://thecolbertreport.cc.com/videos/iihdkg/bette-midler",
"http://thecolbertreport.cc.com/videos/n572qd/sign-off---nightcap"
],
"guest": "Bette Midler"
},
{
"date": "2014-05-07",
"videos": [
"http://thecolbertreport.cc.com/videos/1ztozi/intro---5-7-14",
"http://thecolbertreport.cc.com/videos/p4t1a2/vibrant-constipation-pill",
"http://thecolbertreport.cc.com/videos/ywt77c/tip-wag---herald-embroidery--bug-scientists---dana-perino",
"http://thecolbertreport.cc.com/videos/2u61x6/ukraine-in-the-membrane",
"http://thecolbertreport.cc.com/videos/uz2nio/david-remnick",
"http://thecolbertreport.cc.com/videos/q5zpsy/sign-off---goodnight"
],
"guest": "David Remnick"
},
{
"date": "2014-05-08",
"videos": [
"http://thecolbertreport.cc.com/videos/84cvwk/exclusive---better-know-a-challenger---florida-s-3rd---jake-rush",
"http://thecolbertreport.cc.com/videos/1u7a5d/vampire-for-congress-in-florida",
"http://thecolbertreport.cc.com/videos/vkcose/better-know-a-challenger---florida-s-3rd---jake-rush",
"http://thecolbertreport.cc.com/videos/8jno3s/stu-varney-among-the-common-people",
"http://thecolbertreport.cc.com/videos/m2n3c9/ellen-page",
"http://thecolbertreport.cc.com/videos/u05pdf/sign-off---spinning-top"
],
"guest": "Ellen Page"
},
{
"date": "2014-05-12",
"videos": [
"http://thecolbertreport.cc.com/videos/nnz78u/michael-sam-s-nfl-draft-kiss",
"http://thecolbertreport.cc.com/videos/g2hf60/stephen-colbert-s-bats--t-serious---monica-lewinsky-s-conveniently-timed-essay",
"http://thecolbertreport.cc.com/videos/2j80wh/glenn-greenwald-pt--1",
"http://thecolbertreport.cc.com/videos/31s76v/glenn-greenwald-pt--2",
"http://thecolbertreport.cc.com/videos/xovmc1/sign-off---penalty-whistle"
],
"guest": "Glenn Greenwald"
},
{
"date": "2014-05-13",
"videos": [
"http://thecolbertreport.cc.com/videos/wn13ym/pope-francis-s-crusade-against-capitalism",
"http://thecolbertreport.cc.com/videos/vmje6p/-bringbackourgirls",
"http://thecolbertreport.cc.com/videos/2rgt3x/-bringbackourgirls---rosemary-nyirumbe",
"http://thecolbertreport.cc.com/videos/jrmo9v/koch-brothers-vs--the-columbus-zoo",
"http://thecolbertreport.cc.com/videos/s46r2u/the-black-keys",
"http://thecolbertreport.cc.com/videos/7bxzr7/sign-off---sisters-united-bags"
],
"guest": "The Black Keys"
},
{
"date": "2014-05-14",
"videos": [
"http://thecolbertreport.cc.com/videos/mwq7dh/intro---5-14-14",
"http://thecolbertreport.cc.com/videos/5ob1j2/pope-francis-on-baptizing-martians",
"http://thecolbertreport.cc.com/videos/k6jlhl/the-word---f--k-it",
"http://thecolbertreport.cc.com/videos/4a4ahs/amazon-s-audacious-photography-patent",
"http://thecolbertreport.cc.com/videos/hffa7o/keri-russell",
"http://thecolbertreport.cc.com/videos/2b3fgm/sign-off---goodnight"
],
"guest": "Keri Russell"
},
{
"date": "2014-05-15",
"videos": [
"http://thecolbertreport.cc.com/videos/bvzi2n/vladimir-putin-s-space-station-ban",
"http://thecolbertreport.cc.com/videos/pb1byh/karl-rove-on-hillary-clinton-s-health",
"http://thecolbertreport.cc.com/videos/o2wt62/morality-lessons-for-robots",
"http://thecolbertreport.cc.com/videos/lmgmhg/thomas-friedman",
"http://thecolbertreport.cc.com/videos/z8ndeb/sign-off---mirror"
],
"guest": "Thomas Friedman"
},
{
"date": "2014-05-19",
"videos": [
"http://thecolbertreport.cc.com/videos/r5l7zc/intro---5-19-14",
"http://thecolbertreport.cc.com/videos/el90zp/co-ed-lab-rats",
"http://thecolbertreport.cc.com/videos/7oum5k/elizabeth-warren-vs--wall-street",
"http://thecolbertreport.cc.com/videos/7sujj3/colbert-report-consumer-alert---jerky-blaster",
"http://thecolbertreport.cc.com/videos/79q9bs/elizabeth-warren",
"http://thecolbertreport.cc.com/videos/igbz3e/sign-off---goodnight"
],
"guest": "Elizabeth Warren"
},
{
"date": "2014-05-20",
"videos": [
"http://thecolbertreport.cc.com/videos/oimxrw/china-s-cyber-spies",
"http://thecolbertreport.cc.com/videos/zfayee/the-gop-s-gloves-off-approach-to-hillary-clinton",
"http://thecolbertreport.cc.com/videos/dbim9j/google-and-the-right-to-be-forgotten",
"http://thecolbertreport.cc.com/videos/zopbx2/matthew-weiner",
"http://thecolbertreport.cc.com/videos/g4ax73/sign-off---goodbye-kiss"
],
"guest": "Matt Weiner"
},
{
"date": "2014-05-21",
"videos": [
"http://thecolbertreport.cc.com/videos/6uijkp/tea-party-defeat-in-the-gop-primaries",
"http://thecolbertreport.cc.com/videos/sk5fyk/idaho-s-bizarre-gubernatorial-debate",
"http://thecolbertreport.cc.com/videos/zn3est/mers-virus-in-america",
"http://thecolbertreport.cc.com/videos/xnk3xl/patrick-stewart",
"http://thecolbertreport.cc.com/videos/8pgnos/sign-off---goodnight"
],
"guest": "Patrick Stewart"
},
{
"date": "2014-05-22",
"videos": [
"http://thecolbertreport.cc.com/videos/7q56w3/intro---5-22-14",
"http://thecolbertreport.cc.com/videos/ouzxbu/va-hospital-outrage",
"http://thecolbertreport.cc.com/videos/s6rmi7/va-hospital-outrage---paul-rieckhoff",
"http://thecolbertreport.cc.com/videos/74fcac/marco-rubio-s-hazy-marijuana-history",
"http://thecolbertreport.cc.com/videos/b40eb0/ray-mabus",
"http://thecolbertreport.cc.com/videos/764wvl/sign-off---goodnight-and-good-week"
],
"guest": "Ray Mabus"
},
{
"date": "2014-06-02",
"videos": [
"http://thecolbertreport.cc.com/videos/xtbsgf/obama-s-prisoner-exchange-with-the-taliban",
"http://thecolbertreport.cc.com/videos/i8fthl/difference-makers---doug-varrieur",
"http://thecolbertreport.cc.com/videos/oq97o4/thomas-piketty-vs--billionaire-heroes",
"http://thecolbertreport.cc.com/videos/e301vf/thomas-piketty",
"http://thecolbertreport.cc.com/videos/lyrlrc/sign-off---goatee"
],
"guest": "Thomas Piketty"
},
{
"date": "2014-06-03",
"videos": [
"http://thecolbertreport.cc.com/videos/o4pou7/intro---6-3-14",
"http://thecolbertreport.cc.com/videos/u6nqsd/open-carry-backlash",
"http://thecolbertreport.cc.com/videos/57iigb/obama-s-global-warming-initiative",
"http://thecolbertreport.cc.com/videos/ifxi76/obama-s-global-warming-initiative---dan-esty",
"http://thecolbertreport.cc.com/videos/vf38fj/medicare-coverage-for-sex-change-surgery",
"http://thecolbertreport.cc.com/videos/ttwu42/morgan-freeman",
"http://thecolbertreport.cc.com/videos/qmezm2/sign-off---goodnight"
],
"guest": "Morgan Freeman"
},
{
"date": "2014-06-04",
"videos": [
"http://thecolbertreport.cc.com/videos/yuxdmx/the-perils-of-girly-hurricanes",
"http://thecolbertreport.cc.com/videos/ukf9gv/amazon-vs--hachette",
"http://thecolbertreport.cc.com/videos/t1nxwu/amazon-vs--hachette---sherman-alexie",
"http://thecolbertreport.cc.com/videos/w5wvxu/the-colbert-report-s-unintended-educational-value",
"http://thecolbertreport.cc.com/videos/olnbg3/jonah-hill",
"http://thecolbertreport.cc.com/videos/k89vi0/sign-off----california-"
],
"guest": "Jonah Hill"
},
{
"date": "2014-06-05",
"videos": [
"http://thecolbertreport.cc.com/videos/7fyrr9/intro---6-5-14",
"http://thecolbertreport.cc.com/videos/hfogr3/bergdghazi",
"http://thecolbertreport.cc.com/videos/2408x6/sport-report---mushroom-sports-drink--nfl-pill-pushers---rio-de-janeiro-s-olympic-problems",
"http://thecolbertreport.cc.com/videos/q8dzb2/the-drudge-report-on-hillary-clinton-s--walker-",
"http://thecolbertreport.cc.com/videos/muek3m/chrissie-hynde"
],
"guest": "Chrissie Hynde"
},
{
"date": "2014-06-09",
"videos": [
"http://thecolbertreport.cc.com/videos/tpxhoo/scott-fistler-s--cesar-chavez--strategy",
"http://thecolbertreport.cc.com/videos/7uozsl/fox-news-s-war-on-bowe-bergdahl",
"http://thecolbertreport.cc.com/videos/uyh5xo/craziest-f--king-thing-i-ve-ever-heard---vincent-van-gogh-s-reanimated-ear",
"http://thecolbertreport.cc.com/videos/allxmi/esther-perel",
"http://thecolbertreport.cc.com/videos/x78nyg/sign-off---goodnight"
],
"guest": "Esther Perel"
},
{
"date": "2014-06-10",
"videos": [
"http://thecolbertreport.cc.com/videos/gdbreq/turing-test-breakthrough",
"http://thecolbertreport.cc.com/videos/p8wqsa/the-enemy-within---bina-the-activist-android",
"http://thecolbertreport.cc.com/videos/n30nzb/sport-report---swimming-pools-for-football-fans---governors--hockey-wager",
"http://thecolbertreport.cc.com/videos/2lc1uv/john-waters",
"http://thecolbertreport.cc.com/videos/dxz774/sign-off---goodnight"
],
"guest": "John Waters"
},
{
"date": "2014-06-11",
"videos": [
"http://thecolbertreport.cc.com/videos/s8uwwo/intro---6-11-14",
"http://thecolbertreport.cc.com/videos/1d3kl4/eric-cantor-s-shocking-defeat",
"http://thecolbertreport.cc.com/videos/m87g43/the-word---debt-or-prison",
"http://thecolbertreport.cc.com/videos/2kgoki/rob-rhinehart",
"http://thecolbertreport.cc.com/videos/6v0f1z/sign-off---spiked-drink"
],
"guest": "Rob Rhinehart"
},
{
"date": "2014-06-12",
"videos": [
"http://thecolbertreport.cc.com/videos/iywdca/amazon-s-scorched-earth-tactics-and-edan-lepucki-s--california-",
"http://thecolbertreport.cc.com/videos/4n51kp/tip-wag---ted-cruz---led-zeppelin",
"http://thecolbertreport.cc.com/videos/0z44gm/sport-report---team-usa-vs--the-group-of-death---hans-beinholtz-on-the-world-cup",
"http://thecolbertreport.cc.com/videos/sqbqhw/james-webb",
"http://thecolbertreport.cc.com/videos/pjws58/sign-off---necktie"
],
"guest": "James Webb"
},
{
"date": "2014-06-16",
"videos": [
"http://thecolbertreport.cc.com/videos/6mpwy3/isis-militants-in-iraq",
"http://thecolbertreport.cc.com/videos/wlnavl/isis-militants-in-iraq---ben-van-heuvelen",
"http://thecolbertreport.cc.com/videos/eozrlj/racial-perceptions-and-economic-stress",
"http://thecolbertreport.cc.com/videos/n3etz1/ta-nehisi-coates",
"http://thecolbertreport.cc.com/videos/200z2y/sign-off---hand-mirror"
],
"guest": "Ta-Nehisi Coates"
},
{
"date": "2014-06-17",
"videos": [
"http://thecolbertreport.cc.com/videos/ddo89r/world-cup-victory-for-team-usa",
"http://thecolbertreport.cc.com/videos/xoa360/the-word---a-darker-shade-of-pale",
"http://thecolbertreport.cc.com/videos/qpaogb/majority-support-for-same-sex-marriage",
"http://thecolbertreport.cc.com/videos/8buw4s/david-boies---theodore-b--olson",
"http://thecolbertreport.cc.com/videos/4gkwgg/sign-off---foam-finger"
],
"guest": "David Boies & Theodore B. Olson"
},
{
"date": "2014-06-18",
"videos": [
"http://thecolbertreport.cc.com/videos/exebzv/intro---6-18-14",
"http://thecolbertreport.cc.com/videos/hgs925/arrest-of-benghazi-terror-mastermind",
"http://thecolbertreport.cc.com/videos/a1yfmv/hillary-clinton-vs--the-rnc-squirrel",
"http://thecolbertreport.cc.com/videos/qj2x93/thad-cochran-on-doing-indecent-things-with-animals",
"http://thecolbertreport.cc.com/videos/3ul9zn/katty-kay---claire-shipman",
"http://thecolbertreport.cc.com/videos/och071/sign-off---goodnight"
],
"guest": "Katty Kay & Claire Shipman"
},
{
"date": "2014-06-19",
"videos": [
"http://thecolbertreport.cc.com/videos/gt99v3/the-iraq-pack",
"http://thecolbertreport.cc.com/videos/445utq/thought-for-food---domino-s-smart-slice---doritos-jacked",
"http://thecolbertreport.cc.com/videos/cbr3yz/-yo--smartphone-app",
"http://thecolbertreport.cc.com/videos/3abzv4/jay-carney",
"http://thecolbertreport.cc.com/videos/h0b8ou/sign-off---goodnight"
],
"guest": "Jay Carney"
},
{
"date": "2014-06-23",
"videos": [
"http://thecolbertreport.cc.com/videos/7bqhfd/team-usa-s-tragic-tie-with-portugal",
"http://thecolbertreport.cc.com/videos/k8orr2/obama-s-response-to-isis-in-iraq---mark-mazzetti",
"http://thecolbertreport.cc.com/videos/72elnv/jeremy-meeks-s-handsome-mug-shot",
"http://thecolbertreport.cc.com/videos/07oysy/john-green",
"http://thecolbertreport.cc.com/videos/mwnvtk/sign-off---goodnight"
],
"guest": "John Green"
},
{
"date": "2014-06-24",
"videos": [
"http://thecolbertreport.cc.com/videos/tmjbzp/intro---6-24-14",
"http://thecolbertreport.cc.com/videos/ee0zj7/isis-invades-hashtagistan",
"http://thecolbertreport.cc.com/videos/bveu0w/tip-wag---fda---ben---jerry-s",
"http://thecolbertreport.cc.com/videos/bu43e8/new-york-s-ban-on-tiger-selfies",
"http://thecolbertreport.cc.com/videos/bo739z/edie-falco",
"http://thecolbertreport.cc.com/videos/hgf6rh/sign-off---goodnight"
],
"guest": "Edie Falco"
},
{
"date": "2014-06-25",
"videos": [
"http://thecolbertreport.cc.com/videos/rpnj8s/obama-s-chipotle-blunder",
"http://thecolbertreport.cc.com/videos/glsyx9/stephen-colbert-s-bats--t-serious---child-immigrant-intrigue",
"http://thecolbertreport.cc.com/videos/nx3ix1/stephen-colbert-s-bats--t-serious---child-immigrant-intrigue---john-burnett",
"http://thecolbertreport.cc.com/videos/rki77c/primary-victory-for-thad-cochran",
"http://thecolbertreport.cc.com/videos/rn2gd8/eleanor-holmes-norton",
"http://thecolbertreport.cc.com/videos/q6den3/sign-off---goodnight"
],
"guest": "Rep. Eleanor Holmes Norton"
},
{
"date": "2014-06-26",
"videos": [
"http://thecolbertreport.cc.com/videos/suqg0f/stephen-colbert-s-bats--t-serious---the-vast-government-soccer-conspiracy",
"http://thecolbertreport.cc.com/videos/autzis/tip-wag---north-carolina-state-legislature---cereal-manufacturers",
"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/sign-off---so-long-for-two-weeks"
],
"guest": "Paul Rudd"
},
{
"date": "2014-07-14",
"videos": [
"http://thecolbertreport.cc.com/videos/fy2b19/intro---7-14-14",
"http://thecolbertreport.cc.com/videos/9cspva/world-cup-recap",
"http://thecolbertreport.cc.com/videos/mlyvqh/thank-you--racism---boehner-v--obama",
"http://thecolbertreport.cc.com/videos/xivy3m/hobby-lobby-case",
"http://thecolbertreport.cc.com/videos/9nzwjt/vessyl-digital-cup",
"http://thecolbertreport.cc.com/videos/6cvwe6/jad-abumrad---robert-krulwich",
"http://thecolbertreport.cc.com/videos/rpfaco/sign-off---goodnight"
],
"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/threatdown---all-bear-edition",
"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/sign-off---goodnight"
],
"guest": "Vint Cerf"
},
{
"date": "2014-07-16",
"videos": [
"http://thecolbertreport.cc.com/videos/anklfa/intro---7-16-14",
"http://thecolbertreport.cc.com/videos/53n0nf/conservative-contempt-for-bill-de-blasio",
"http://thecolbertreport.cc.com/videos/cbs1n7/rick-perry-s-makeover---uncensored",
"http://thecolbertreport.cc.com/videos/1flr4c/filling-captain-america-s-shoes---joe-quesada",
"http://thecolbertreport.cc.com/videos/ypm476/bill-de-blasio",
"http://thecolbertreport.cc.com/videos/slmbh6/sign-off----captain-america-"
],
"guest": "Mayor Bill de Blasio"
},
{
"date": "2014-07-17",
"videos": [
"http://thecolbertreport.cc.com/videos/ket4ms/malaysia-airlines-crash---hamas-israel-violence",
"http://thecolbertreport.cc.com/videos/z3gi0q/questionable-compassion-for-child-immigrants",
"http://thecolbertreport.cc.com/videos/bfvmgh/coal-rolling",
"http://thecolbertreport.cc.com/videos/70ezhu/steven-m--wise",
"http://thecolbertreport.cc.com/videos/n00bpi/sign-off---soot-blast"
],
"guest": "Steven Wise"
},
{
"date": "2014-07-21",
"videos": [
"http://thecolbertreport.cc.com/videos/qimhj6/intro---7-21-14",
"http://thecolbertreport.cc.com/videos/n71mkf/world-news-wrap-up",
"http://thecolbertreport.cc.com/videos/8e5dyu/colbert-nation-vs--amazon---edan-lepucki",
"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/sign-off----sweetness--9-"
],
"guest": "Rep. Nancy Pelosi"
},
{
"date": "2014-07-22",
"videos": [
"http://thecolbertreport.cc.com/videos/a6s2qu/rep--steve-pearce-s-fact-finding-mission-in-central-america",
"http://thecolbertreport.cc.com/videos/d24npe/rising-calls-for-obama-s-impeachment",
"http://thecolbertreport.cc.com/videos/stx9ln/rising-calls-for-obama-s-impeachment---p-k--winsome",
"http://thecolbertreport.cc.com/videos/qf023x/rory-mcilroy-and-caroline-wozniacki-s-post-breakup-triumph",
"http://thecolbertreport.cc.com/videos/1872w0/julia-ioffe",
"http://thecolbertreport.cc.com/videos/rxjlpc/sign-off---p-k--winsome"
],
"guest": "Julia Ioffe"
},
{
"date": "2014-07-23",
"videos": [
"http://thecolbertreport.cc.com/videos/74ly7x/housing-crisis-for-child-immigrants",
"http://thecolbertreport.cc.com/videos/w0dhco/six-californias",
"http://thecolbertreport.cc.com/videos/rmgh1u/six-californias---tim-draper",
"http://thecolbertreport.cc.com/videos/qb2d4f/lowe-s-vs--veterans-affairs",
"http://thecolbertreport.cc.com/videos/a368r9/mary-mazzio---oscar-vazquez",
"http://thecolbertreport.cc.com/videos/8nsg9g/sign-off---goodnight"
],
"guest": "Mary Mazzio, Oscar Vazquez"
},
{
"date": "2014-07-24",
"videos": [
"http://thecolbertreport.cc.com/videos/9bfzta/darth-vader-for-president",
"http://thecolbertreport.cc.com/videos/br4k5m/tip-wag----true-blood----washington--d-c---court-of-appeals",
"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/exclusive---elon-musk-discusses-mars",
"http://thecolbertreport.cc.com/videos/9pmgk5/sign-off---goodnight"
],
"guest": "Elon Musk"
},
{
"date": "2014-07-28",
"videos": [
"http://thecolbertreport.cc.com/videos/99fqm5/magical-afternoon-at-comic-con",
"http://thecolbertreport.cc.com/videos/yxerhp/the-word---see-no-equal",
"http://thecolbertreport.cc.com/videos/c8gyzb/-kim-kardashian--hollywood--game",
"http://thecolbertreport.cc.com/videos/me3jxh/beck"
],
"guest": "Beck"
},
{
"date": "2014-07-29",
"videos": [
"http://thecolbertreport.cc.com/videos/go3xsz/stephen-colbert-s-i-need-a-drink",
"http://thecolbertreport.cc.com/videos/zo7j8y/the-sarah-palin-channel",
"http://thecolbertreport.cc.com/videos/oeurov/jon-batiste-and-stay-human",
"http://thecolbertreport.cc.com/videos/84mh53/sign-off---jon-batiste-and-stay-human"
],
"guest": "Jon Batiste & Stay Human"
},
{
"date": "2014-07-30",
"videos": [
"http://thecolbertreport.cc.com/videos/vy7myr/orlando-bloom-s-altercation-with-justin-bieber",
"http://thecolbertreport.cc.com/videos/mfm78m/corporate-inversions",
"http://thecolbertreport.cc.com/videos/gv7xvj/corporate-inversions---allan-sloan",
"http://thecolbertreport.cc.com/videos/psbsuw/naked-tv",
"http://thecolbertreport.cc.com/videos/lb70bp/james-franco",
"http://thecolbertreport.cc.com/videos/n2673s/sign-off---goodnight"
],
"guest": "James Franco"
},
{
"date": "2014-07-31",
"videos": [
"http://thecolbertreport.cc.com/videos/dwf82q/women-on-american-currency",
"http://thecolbertreport.cc.com/videos/cruj3s/the-conflict-over-covering-the-conflict-in-gaza",
"http://thecolbertreport.cc.com/videos/m4juon/tip-wag---beelzebub---nasa",
"http://thecolbertreport.cc.com/videos/2mpwlv/campbell-brown",
"http://thecolbertreport.cc.com/videos/26ag1q/sign-off---monitoring-system"
],
"guest": "Campbell Brown"
},
{
"date": "2014-08-04",
"videos": [
"http://thecolbertreport.cc.com/videos/zcyj0l/40th-anniversary-of-nixon-s-resignation",
"http://thecolbertreport.cc.com/videos/9hxmyy/a-nation-betrayed---a-fond-look-back---74",
"http://thecolbertreport.cc.com/videos/c505xx/pat-buchanan",
"http://thecolbertreport.cc.com/videos/ecplh0/john-w--dean",
"http://thecolbertreport.cc.com/videos/jg7vda/sign-off---retrospectacular",
"http://thecolbertreport.cc.com/videos/2kctj0/exclusive---pat-buchanan"
],
"guest": "Pat Buchanan, John W. Dean"
},
{
"date": "2014-08-05",
"videos": [
"http://thecolbertreport.cc.com/videos/eu8j9u/open-carry-trailblazers",
"http://thecolbertreport.cc.com/videos/imtefo/-hard-choices----hillary-clinton",
"http://thecolbertreport.cc.com/videos/8tvtmw/language-lessons-from-america-s-senior-citizens",
"http://thecolbertreport.cc.com/videos/wb06vr/james-cameron",
"http://thecolbertreport.cc.com/videos/tovjr3/sign-off---goodnight"
],
"guest": "James Cameron"
},
{
"date": "2014-08-06",
"videos": [
"http://thecolbertreport.cc.com/videos/v652g6/smile-file---kim-jong-un-at-the-lube-factory",
"http://thecolbertreport.cc.com/videos/mrntln/rand-paul-s-hasty-exit",
"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://thecolbertreport.cc.com/videos/2mrfmc/intro---8-7-14",
"http://thecolbertreport.cc.com/videos/bmd26v/vladimir-putin-s-food-sanctions",
"http://thecolbertreport.cc.com/videos/nm2atj/ebola-panic",
"http://thecolbertreport.cc.com/videos/7a9ir7/the-in-box---blt-vs--club",
"http://thecolbertreport.cc.com/videos/ddvyto/brian-chesky",
"http://thecolbertreport.cc.com/videos/dc3x0v/sign-off---bourbon-and-chicken"
],
"guest": "Brian Chesky"
},
{
"date": "2014-08-26",
"videos": [
"http://thecolbertreport.cc.com/videos/xfa2tc/intro---8-26-14",
"http://thecolbertreport.cc.com/videos/pupsy6/better-know-a-district---ohio-s-11th---marcia-fudge-pt--1",
"http://thecolbertreport.cc.com/videos/llmmz6/better-know-a-district---ohio-s-11th---marcia-fudge-pt--2",
"http://thecolbertreport.cc.com/videos/crpfrn/jeff-bridges---lois-lowry",
"http://thecolbertreport.cc.com/videos/30umwt/sign-off---goodnight"
],
"guest": "Jeff Bridges, Lois Lowry"
},
{
"date": "2014-08-27",
"videos": [
"http://thecolbertreport.cc.com/videos/12kfzg/intro---8-27-14",
"http://thecolbertreport.cc.com/videos/4komvc/outrage-in-ferguson",
"http://thecolbertreport.cc.com/videos/h1itnw/outrage-in-ferguson---a-national-conversation-on-race",
"http://thecolbertreport.cc.com/videos/8ye61k/scrabble-s-updated-dictionary",
"http://thecolbertreport.cc.com/videos/v6x4qn/michael-sheen",
"http://thecolbertreport.cc.com/videos/4g1qgo/sign-off---welcome-baby-eva-"
],
"guest": "Michael Sheen"
},
{
"date": "2014-08-28",
"videos": [
"http://thecolbertreport.cc.com/videos/2x4lop/isis-panic",
"http://thecolbertreport.cc.com/videos/yr7egy/isis-panic---announcing-reagan-s-return",
"http://thecolbertreport.cc.com/videos/bac98y/vapshot-alcohol-vaporizer",
"http://thecolbertreport.cc.com/videos/vmcz6o/jr",
"http://thecolbertreport.cc.com/videos/q6o47f/sign-off---goodnight"
],
"guest": "JR"
},
{
"date": "2014-09-02",
"videos": [
"http://thecolbertreport.cc.com/videos/7ohwx8/celebrity-nude-photo-scandal",
"http://thecolbertreport.cc.com/videos/kc4ojp/police-militarization-in-america",
"http://thecolbertreport.cc.com/videos/ukyqb3/police-militarization-in-america---norm-stamper",
"http://thecolbertreport.cc.com/videos/xuzel5/good-news-for-sleep-deprived-teens",
"http://thecolbertreport.cc.com/videos/sximkb/mandy-patinkin",
"http://thecolbertreport.cc.com/videos/hpkdp0/sign-off---goodnight"
],
"guest": "Mandy Patinkin"
},
{
"date": "2014-09-03",
"videos": [
"http://thecolbertreport.cc.com/videos/mrdb7o/intro---9-3-14",
"http://thecolbertreport.cc.com/videos/v7c4zm/obama-s-isis-strategy",
"http://thecolbertreport.cc.com/videos/2ccwew/obama-s-isis-strategy---frank-underwood",
"http://thecolbertreport.cc.com/videos/r6svso/coach-class-conflicts",
"http://thecolbertreport.cc.com/videos/ewijdy/randall-munroe",
"http://thecolbertreport.cc.com/videos/cs2fnl/sign-off---goodnight"
],
"guest": "Randall Munroe"
},
{
"date": "2014-09-04",
"videos": [
"http://thecolbertreport.cc.com/videos/30z1ut/intro---9-4-14",
"http://thecolbertreport.cc.com/videos/lo5wee/gays-in-the-st--patrick-s-day-parade",
"http://thecolbertreport.cc.com/videos/zq72u5/the-midterm-round-up",
"http://thecolbertreport.cc.com/videos/g7yyhh/al-qaeda-s-indian-franchise",
"http://thecolbertreport.cc.com/videos/s4ds82/doris-kearns-goodwin",
"http://thecolbertreport.cc.com/videos/fj6l1s/sign-off---ship-christening"
],
"guest": "Doris Kearns Goodwin"
},
{
"date": "2014-09-08",
"videos": [
"http://thecolbertreport.cc.com/videos/g9wav3/intro---9-8-14",
"http://thecolbertreport.cc.com/videos/dzxra6/william-and-kate-s-royal-pregnancy",
"http://thecolbertreport.cc.com/videos/3160bg/waiting-forever-for-immigration-reform",
"http://thecolbertreport.cc.com/videos/jz3rdd/pavlok-fitness-band",
"http://thecolbertreport.cc.com/videos/23mu4v/john-lithgow",
"http://thecolbertreport.cc.com/videos/a0x0bs/sign-off---goodnight"
],
"guest": "John Lithgow"
},
{
"date": "2014-09-09",
"videos": [
"http://thecolbertreport.cc.com/videos/j5s4z1/apple-unveils-its-smartwatch",
"http://thecolbertreport.cc.com/videos/s6gte9/the-midterm-round-up---the-gop-s-lady-problems",
"http://thecolbertreport.cc.com/videos/hkfm7z/hometown-hero-town---detroit",
"http://thecolbertreport.cc.com/videos/e4y7wx/jason-segel",
"http://thecolbertreport.cc.com/videos/93zpki/sign-off---jason-segel-s-latest-award"
],
"guest": "Jason Segel"
},
{
"date": "2014-09-10",
"videos": [
"http://thecolbertreport.cc.com/videos/u5vu07/intro---9-10-14",
"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/tip-wag---nasa---trump-entertainment-resorts",
"http://thecolbertreport.cc.com/videos/wn86jw/the-buypartisan-app",
"http://thecolbertreport.cc.com/videos/hyx04c/henry-kissinger",
"http://thecolbertreport.cc.com/videos/bipiaj/sign-off---goodnight"
],
"guest": "Henry Kissinger"
},
{
"date": "2014-09-11",
"videos": [
"http://thecolbertreport.cc.com/videos/oeusg2/this-country-is-at-war-",
"http://thecolbertreport.cc.com/videos/li99ni/republicans--predictions-of-the-iraq-crisis",
"http://thecolbertreport.cc.com/videos/wna0mw/global-warming-threatens-bird-species",
"http://thecolbertreport.cc.com/videos/ndpng7/lonn-taylor",
"http://thecolbertreport.cc.com/videos/cl9arb/sign-off---jim-cornelison-sings-the-national-anthem"
],
"guest": "Lonn Taylor"
},
{
"date": "2014-09-15",
"videos": [
"http://thecolbertreport.cc.com/videos/848h60/the-next-miss-america",
"http://thecolbertreport.cc.com/videos/lmtq66/the-vote-for-scottish-independence",
"http://thecolbertreport.cc.com/videos/exs7p5/the-vote-for-scottish-independence---matt-wells",
"http://thecolbertreport.cc.com/videos/0txz3z/think-tank-corruption",
"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://thecolbertreport.cc.com/videos/60e467/intro---9-16-14",
"http://thecolbertreport.cc.com/videos/0agoip/the-kinda-sorta-war-and-the-u-s--s-mysterious-allies",
"http://thecolbertreport.cc.com/videos/mzktzw/wall-street-meddles-with-restaurant-chain",
"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/undercover-at-comic-con---prince-hawkcat",
"http://thecolbertreport.cc.com/videos/d791f1/undercover-at-comic-con---stephen-s-movie-pitches",
"http://thecolbertreport.cc.com/videos/xq6f9b/military-vehicles-for-public-schools",
"http://thecolbertreport.cc.com/videos/arckqm/viggo-mortensen",
"http://thecolbertreport.cc.com/videos/bfflr6/sign-off---aragorn"
],
"guest": "Viggo Mortensen"
},
{
"date": "2014-09-18",
"videos": [
"http://thecolbertreport.cc.com/videos/hn1ueg/checky",
"http://thecolbertreport.cc.com/videos/yupbhd/no-boots-on-the-ground-in-iraq",
"http://thecolbertreport.cc.com/videos/wjga35/sean-hannity-s-defense-of-adrian-peterson",
"http://thecolbertreport.cc.com/videos/rd6gao/terry-gilliam",
"http://thecolbertreport.cc.com/videos/148dzu/sign-off---stuffed-elephant"
],
"guest": "Terry Gilliam"
},
{
"date": "2014-09-22",
"videos": [
"http://thecolbertreport.cc.com/videos/uc4f7i/awol-afghan-soldiers",
"http://thecolbertreport.cc.com/videos/01cyc2/tip-wag---climate-change-marchers---senators-on-reality-tv",
"http://thecolbertreport.cc.com/videos/x58aop/charles-krauthammer-on-obama-s-mental-state",
"http://thecolbertreport.cc.com/videos/jq352p/tweedy"
],
"guest": "Tweedy"
},
{
"date": "2014-09-23",
"videos": [
"http://thecolbertreport.cc.com/videos/j6xqew/u-s--airstrikes-in-syria",
"http://thecolbertreport.cc.com/videos/ybvlae/better-know-a-district---california-s-2nd---jared-huffman",
"http://thecolbertreport.cc.com/videos/b5ni29/the-russians-buy-pbr",
"http://thecolbertreport.cc.com/videos/k5a58t/naomi-klein",
"http://thecolbertreport.cc.com/videos/ksh5pr/sign-off---pbr"
],
"guest": "Naomi Klein"
},
{
"date": "2014-09-24",
"videos": [
"http://thecolbertreport.cc.com/videos/5mneco/atone-phone---jeff-tweedy-calls",
"http://thecolbertreport.cc.com/videos/tw7sr5/obama-s-coffee-cup-salute"
],
"guest": "Bill Cosby"
},
{
"date": "2014-09-25",
"videos": [
"http://thecolbertreport.cc.com/videos/p49ls4/the-suspicious-death-of-staten-island-chuck",
"http://thecolbertreport.cc.com/videos/0hjuki/intro---9-25-14",
"http://thecolbertreport.cc.com/videos/tjmnw0/eric-holder-s-resignation",
"http://thecolbertreport.cc.com/videos/7dpl33/bill-o-reilly-s-elite-strike-force",
"http://thecolbertreport.cc.com/videos/0w775u/smile-file---the-u-a-e--s-first-female-fighter-pilot-vs---the-five----uncensored",
"http://thecolbertreport.cc.com/videos/g36k7p/walter-mischel",
"http://thecolbertreport.cc.com/videos/fhpqlq/sign-off---marshmallows"
],
"guest": "Walter Mischel"
},
{
"date": "2014-09-29",
"videos": [
"http://thecolbertreport.cc.com/videos/6ythcp/obama-s-rip-off-of-bush",
"http://thecolbertreport.cc.com/videos/eecxwy/hillary-clinton-and-the-grandmother-of-all-scandals",
"http://thecolbertreport.cc.com/videos/6w3vad/kim-jong-un-s-massive-cheese-consumption",
"http://thecolbertreport.cc.com/videos/ojmtk8/jamie-oliver",
"http://thecolbertreport.cc.com/videos/z231mw/sign-off---cake-and-cheese"
],
"guest": "Jamie Oliver"
},
{
"date": "2014-09-30",
"videos": [
"http://thecolbertreport.cc.com/videos/6k6hq3/muslims-in-the-end-zone",
"http://thecolbertreport.cc.com/videos/h1yge9/highlights-of-the-values-voter-summit",
"http://thecolbertreport.cc.com/videos/8x6lww/the-benefits-of-pessimism---hans-beinholtz",
"http://thecolbertreport.cc.com/videos/qofokt/jeffrey-tambor",
"http://thecolbertreport.cc.com/videos/pnsz05/sign-off---goodnight"
],
"guest": "Jeffrey Tambor"
},
{
"date": "2014-10-01",
"videos": [
"http://thecolbertreport.cc.com/videos/v6tds1/protests-in-hong-kong",
"http://thecolbertreport.cc.com/videos/v51zzo/protests-in-hong-kong---louisa-lim",
"http://thecolbertreport.cc.com/videos/zzbhqi/bill-o-reilly-takes-offense",
"http://thecolbertreport.cc.com/videos/oviilh/mike-mullen",
"http://thecolbertreport.cc.com/videos/5tiz1y/sign-off---goodnight",
"http://thecolbertreport.cc.com/videos/8f6kuv/exclusive---mike-mullen-extended-interview"
],
"guest": "Adm. Mike Mullen"
},
{
"date": "2014-10-02",
"videos": [
"http://thecolbertreport.cc.com/videos/jyghug/intro---10-2-14",
"http://thecolbertreport.cc.com/videos/x6d5sz/deathpocalypse-now---ebola-in-america---50-states-of-grave",
"http://thecolbertreport.cc.com/videos/hhhqqd/deathpocalypse-now---ebola-in-america---kent-sepkowitz",
"http://thecolbertreport.cc.com/videos/e72awe/solitocity",
"http://thecolbertreport.cc.com/videos/ye2fnr/lynn-sherr",
"http://thecolbertreport.cc.com/videos/7nl6i5/sign-off---hand-sanitizer"
],
"guest": "Lynn Sherr"
},
{
"date": "2014-10-06",
"videos": [
"http://thecolbertreport.cc.com/videos/g5stw6/intro---10-6-14",
"http://thecolbertreport.cc.com/videos/heaxbs/victory-for-gay-marriage---the-rise-of-amicus-briefs",
"http://thecolbertreport.cc.com/videos/ssmvma/victory-for-gay-marriage---the-rise-of-amicus-briefs---allison-orr-larsen",
"http://thecolbertreport.cc.com/videos/ayvbym/a-rare-correction---no-ebola-outbreak-in-the-u-s-",
"http://thecolbertreport.cc.com/videos/fcax26/james-m--mcpherson",
"http://thecolbertreport.cc.com/videos/bfwqfb/sign-off---goodnight"
],
"guest": "James McPherson"
},
{
"date": "2014-10-07",
"videos": [
"http://thecolbertreport.cc.com/videos/hhqgbw/ebolapalooza",
"http://thecolbertreport.cc.com/videos/nx3ewk/better-know-a-district---illinois-s-8th---tammy-duckworth",
"http://thecolbertreport.cc.com/videos/q2857u/cheating-death---pandemic-health",
"http://thecolbertreport.cc.com/videos/7swpxt/leon-wieseltier",
"http://thecolbertreport.cc.com/videos/rete59/sign-off---cigarette"
],
"guest": "Leon Wieseltier"
},
{
"date": "2014-10-08",
"videos": [
"http://thecolbertreport.cc.com/videos/e50viy/intro---10-8-14",
"http://thecolbertreport.cc.com/videos/khi8w0/john-boehner-vs--america-s-anti-gay-marriage-crusaders",
"http://thecolbertreport.cc.com/videos/m899eo/naming-the-war-against-isis",
"http://thecolbertreport.cc.com/videos/hzou6l/carol-burnett",
"http://thecolbertreport.cc.com/videos/hcc5br/sign-off---ear-tug"
],
"guest": "Carol Burnett"
},
{
"date": "2014-10-09",
"videos": [
"http://thecolbertreport.cc.com/videos/blfnlw/exclusive---robert-plant----little-maggie-",
"http://thecolbertreport.cc.com/videos/jdri4u/robert-plant----rainbow-",
"http://thecolbertreport.cc.com/videos/tyc0sx/intro---10-9-14",
"http://thecolbertreport.cc.com/videos/0gscic/columbus-day-under-attack",
"http://thecolbertreport.cc.com/videos/hpfwm4/raining-vs--sprinkling",
"http://thecolbertreport.cc.com/videos/xfjyum/republicans-are-people--too",
"http://thecolbertreport.cc.com/videos/jfanx7/robert-plant",
"http://thecolbertreport.cc.com/videos/o2y6sr/sign-off----lullaby-and----the-ceaseless-roar-"
],
"guest": "Robert Plant"
},
{
"date": "2014-10-13",
"videos": [
"http://thecolbertreport.cc.com/videos/fhnqjo/midterms--014---detour-to-gridlock---an-exciting-thing-that-i-am-totally-interested-in",
"http://thecolbertreport.cc.com/videos/8zip3j/intro---10-13-14",
"http://thecolbertreport.cc.com/videos/sx2hh2/32-episodes-left-for-the-report",
"http://thecolbertreport.cc.com/videos/fp4xfy/walter-isaacson",
"http://thecolbertreport.cc.com/videos/f4t3xr/sign-off---quality-time-with-americone-dream",
"http://thecolbertreport.cc.com/videos/bxbwj4/midterms--014---detour-to-gridlock---dennis-daugaard"
],
"guest": "Walter Isaacson"
},
{
"date": "2014-10-14",
"videos": [
"http://thecolbertreport.cc.com/videos/zg3zai/neil-young----who-s-gonna-stand-up---and-save-the-earth--",
"http://thecolbertreport.cc.com/videos/wcjcgn/a-week-of-victories-for-gay-rights",
"http://thecolbertreport.cc.com/videos/akzlpt/say-yes-to-rick-scott",
"http://thecolbertreport.cc.com/videos/namhpu/neil-young",
"http://thecolbertreport.cc.com/videos/veswmj/sign-off----special-deluxe-"
],
"guest": "Neil Young"
},
{
"date": "2014-10-15",
"videos": [
"http://thecolbertreport.cc.com/videos/qw8rwv/who-s-attacking-me-now----larry-page",
"http://thecolbertreport.cc.com/videos/q2u206/tip-wag---barack-obama---stan-lee",
"http://thecolbertreport.cc.com/videos/xv3cdl/sean-hannity-s-question-of-the-day",
"http://thecolbertreport.cc.com/videos/18x57e/justin-simien",
"http://thecolbertreport.cc.com/videos/4tsbtt/sign-off---goodnight"
],
"guest": "Justin Simien"
},
{
"date": "2014-10-16",
"videos": [
"http://thecolbertreport.cc.com/videos/uebndp/abandoned-wmds-in-iraq",
"http://thecolbertreport.cc.com/videos/aywapn/abandoned-wmds-in-iraq---c-j--chivers",
"http://thecolbertreport.cc.com/videos/3o1uzs/rick-scott-and-charlie-crist-s-bizarre-debate",
"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://thecolbertreport.cc.com/videos/e27u8w/intro---10-27-14",
"http://thecolbertreport.cc.com/videos/8hjpi2/ebola-in-new-york",
"http://thecolbertreport.cc.com/videos/whfeyg/louie-gohmert-on-gays-in-the-military",
"http://thecolbertreport.cc.com/videos/jjpinj/meredith-vieira",
"http://thecolbertreport.cc.com/videos/a0zbrf/sign-off---sundae"
],
"guest": "Meredith Vieira"
},
{
"date": "2014-10-28",
"videos": [
"http://thecolbertreport.cc.com/videos/xxvx4u/war-on-halloween---flaming-bags-of-government",
"http://thecolbertreport.cc.com/videos/jxddq4/the-nra-vs--pennsylvania-s-pet-eating-ban",
"http://thecolbertreport.cc.com/videos/6cj1fk/tom-corbett-s-photoshopped-diversity",
"http://thecolbertreport.cc.com/videos/nzy3nz/sport-report---fall-experimental-football-league",
"http://thecolbertreport.cc.com/videos/c7wjzg/michael-lewis",
"http://thecolbertreport.cc.com/videos/64x2gg/sign-off---goodnight"
],
"guest": "Michael Lewis"
},
{
"date": "2014-10-29",
"videos": [
"http://thecolbertreport.cc.com/videos/ladjef/gamergate",
"http://thecolbertreport.cc.com/videos/wr7hqq/gamergate---anita-sarkeesian",
"http://thecolbertreport.cc.com/videos/ll1e16/heroism-in-canada",
"http://thecolbertreport.cc.com/videos/1h66nr/jill-lepore",
"http://thecolbertreport.cc.com/videos/1fc6m9/sign-off---microphone"
],
"guest": "Jill Lepore"
},
{
"date": "2014-10-30",
"videos": [
"http://thecolbertreport.cc.com/videos/qvw67z/intro---10-30-14",
"http://thecolbertreport.cc.com/videos/hxvn8w/-america-again--in-paperback",
"http://thecolbertreport.cc.com/videos/365nm9/america-s-midterm-indifference---george-takei",
"http://thecolbertreport.cc.com/videos/cykxut/the-perils-of-anchor-zygotes",
"http://thecolbertreport.cc.com/videos/tqbn3t/david-miliband",
"http://thecolbertreport.cc.com/videos/4rgfpm/sign-off---goodnight"
],
"guest": "David Miliband"
},
{
"date": "2014-11-03",
"videos": [
"http://thecolbertreport.cc.com/videos/cvjwus/intro---11-3-14",
"http://thecolbertreport.cc.com/videos/p6uab8/midterms--014---detour-to-gridlock---midterm-flyer-of-shame",
"http://thecolbertreport.cc.com/videos/qmg04s/tip-wag---nazi-dairy-products--tim-cook---prostate-health-researchers",
"http://thecolbertreport.cc.com/videos/rw2v1b/stephen-colbert-s-enchanted-princess-pixie-wedding-cake",
"http://thecolbertreport.cc.com/videos/lffyr9/chuck-todd",
"http://thecolbertreport.cc.com/videos/xrfsl8/sign-off---goodnight"
],
"guest": "Chuck Todd"
},
{
"date": "2014-11-04",
"videos": [
"http://thecolbertreport.cc.com/videos/1g0aji/midterms--014---detour-to-gridlock---live-coverage",
"http://thecolbertreport.cc.com/videos/cmr0z4/midterms--014---detour-to-gridlock---mountains-of-midterm-madness",
"http://thecolbertreport.cc.com/videos/w3muth/midterms--014---detour-to-gridlock---social-tracker-8700",
"http://thecolbertreport.cc.com/videos/ekj19q/andrew-sullivan",
"http://thecolbertreport.cc.com/videos/ckxbqk/sign-off---stephen-s-last-election-special"
],
"guest": "Andrew Sullivan"
},
{
"date": "2014-11-05",
"videos": [
"http://thecolbertreport.cc.com/videos/c5okdm/intro---11-5-14",
"http://thecolbertreport.cc.com/videos/ywqnjy/the-republicans-win-everything",
"http://thecolbertreport.cc.com/videos/wq84nn/better-know-a-district---california-s-13th---barbara-lee",
"http://thecolbertreport.cc.com/videos/7feu8t/legalized-marijuana-in-washington--d-c-",
"http://thecolbertreport.cc.com/videos/w2qs7x/kirsten-gillibrand",
"http://thecolbertreport.cc.com/videos/tno5bj/sign-off---goodnight"
],
"guest": "Sen. Kirsten Gillibrand"
},
{
"date": "2014-11-06",
"videos": [
"http://thecolbertreport.cc.com/videos/kk2x1a/intro---11-6-14",
"http://thecolbertreport.cc.com/videos/rtdlsr/busted-for-feeding-the-homeless",
"http://thecolbertreport.cc.com/videos/3rw0tz/cheating-death---aging---women-s-health",
"http://thecolbertreport.cc.com/videos/sc6mpp/the-republicans--inspiring-climate-change-message",
"http://thecolbertreport.cc.com/videos/v06v9z/steven-johnson",
"http://thecolbertreport.cc.com/videos/yzaj23/sign-off---goodnight"
],
"guest": "Steven Johnson"
},
{
"date": "2014-11-10",
"videos": [
"http://thecolbertreport.cc.com/videos/erbk9q/intro---11-10-14",
"http://thecolbertreport.cc.com/videos/xnwueh/big-news-from-the-hermit-kingdom",
"http://thecolbertreport.cc.com/videos/avadrz/the-word---it-s-a-trap-",
"http://thecolbertreport.cc.com/videos/87vgoo/adventures-in-snackology",
"http://thecolbertreport.cc.com/videos/sbmlul/andy-cohen",
"http://thecolbertreport.cc.com/videos/7uog9s/sign-off---goodnight"
],
"guest": "Andy Cohen"
},
{
"date": "2014-11-11",
"videos": [
"http://thecolbertreport.cc.com/videos/mnkz05/intro---11-11-14",
"http://thecolbertreport.cc.com/videos/wht7i8/uncertain-death-for-isis-s-leader",
"http://thecolbertreport.cc.com/videos/thgfth/blowback-from-obama-s-visit-to-china",
"http://thecolbertreport.cc.com/videos/uqricc/tip-wag---breitbart",
"http://thecolbertreport.cc.com/videos/41fe1h/diane-von-furstenberg",
"http://thecolbertreport.cc.com/videos/ncl44x/sign-off---cheerful-reflection"
],
"guest": "Diane Von Furstenberg"
},
{
"date": "2014-11-12",
"videos": [
"http://thecolbertreport.cc.com/videos/80wk4b/intro---11-12-14",
"http://thecolbertreport.cc.com/videos/a1b4ph/new-york-city-s-rat-deficiency",
"http://thecolbertreport.cc.com/videos/rn92gg/stephen-colbert-s-auto-robotic-fixation",
"http://thecolbertreport.cc.com/videos/hhmb28/mr--smith-goes-to-the-state-legislature--then-later-possibly-washington---gordon-klingenschmitt",
"http://thecolbertreport.cc.com/videos/6wtwlg/terence-tao",
"http://thecolbertreport.cc.com/videos/a1eex6/sign-off---red-wine"
],
"guest": "Terence Tao"
},
{
"date": "2014-11-13",
"videos": [
"http://thecolbertreport.cc.com/videos/jtbvle/reforming-health-care-reform",
"http://thecolbertreport.cc.com/videos/fe3wjm/reforming-health-care-reform---emily-bazelon",
"http://thecolbertreport.cc.com/videos/cvq86c/gay-marriage-victory-in-south-carolina",
"http://thecolbertreport.cc.com/videos/3pu1ey/jennifer-lawrence",
"http://thecolbertreport.cc.com/videos/9aqahd/sign-off---goodnight"
],
"guest": "Jennifer Lawrence"
},
{
"date": "2014-11-17",
"videos": [
"http://thecolbertreport.cc.com/videos/qed7bp/bono-s-missing-luggage",
"http://thecolbertreport.cc.com/videos/9dr12d/survival-tips-from--good-morning-america-",
"http://thecolbertreport.cc.com/videos/7vjzxb/bernie-sanders-pt--1",
"http://thecolbertreport.cc.com/videos/67tlr7/bernie-sanders-pt--2",
"http://thecolbertreport.cc.com/videos/uqho5w/sign-off---goodnight"
],
"guest": "Sen. Bernie Sanders"
},
{
"date": "2014-11-18",
"videos": [
"http://thecolbertreport.cc.com/videos/fys4c2/intro---11-18-14",
"http://thecolbertreport.cc.com/videos/ib2b3k/polar-plunge",
"http://thecolbertreport.cc.com/videos/iw2iwg/obama-s-immigration-plan---esteban-colberto",
"http://thecolbertreport.cc.com/videos/bbfckz/tip-wag---salvage-stores---maine",
"http://thecolbertreport.cc.com/videos/o8su6y/eva-longoria",
"http://thecolbertreport.cc.com/videos/vu8jpe/sign-off---goodnight"
],
"guest": "Eva Longoria"
},
{
"date": "2014-11-19",
"videos": [
"http://thecolbertreport.cc.com/videos/7mkltp/simulated-school-attack-in-florida",
"http://thecolbertreport.cc.com/videos/dvppp6/difference-makers---the-free-keene-squad",
"http://thecolbertreport.cc.com/videos/sdqbxm/black-friday-sale",
"http://thecolbertreport.cc.com/videos/9yc4ry/toni-morrison",
"http://thecolbertreport.cc.com/videos/y4ygag/sign-off---goodnight"
],
"guest": "Toni Morrison"
},
{
"date": "2014-11-20",
"videos": [
"http://thecolbertreport.cc.com/videos/01iemp/obama-s-executive-amnesty",
"http://thecolbertreport.cc.com/videos/fie7ef/threatdown---declining-standards-of-sexiness--people-who-eat-chocolate---invaders-of-the-new-world",
"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/sign-off---goodnight"
],
"guest": "Jon Stewart"
},
{
"date": "2014-12-01",
"videos": [
"http://thecolbertreport.cc.com/videos/wmtufg/intro---12-1-14",
"http://thecolbertreport.cc.com/videos/umsrnb/lightsaber-controversy",
"http://thecolbertreport.cc.com/videos/wud7e1/ferguson-fallout-and-the-st--louis-rams",
"http://thecolbertreport.cc.com/videos/d6xq50/jihadis-of-the-high-seas",
"http://thecolbertreport.cc.com/videos/3h1qqa/john-mccain",
"http://thecolbertreport.cc.com/videos/dnrg1a/sign-off---goodnight"
],
"guest": "Sen. John McCain"
},
{
"date": "2014-12-02",
"videos": [
"http://thecolbertreport.cc.com/videos/v8mtsf/intro---12-2-14",
"http://thecolbertreport.cc.com/videos/hyqrm1/announcing-the-mr--colbert-goes-to-washington-special",
"http://thecolbertreport.cc.com/videos/ethq4d/the-word---crook-and-ladder",
"http://thecolbertreport.cc.com/videos/lje2l4/blitzkrieg-on-grinchitude---mistletoe-drones",
"http://thecolbertreport.cc.com/videos/z0hz76/tony-bennett-and-lady-gaga"
],
"guest": "Tony Bennett & Lady Gaga"
},
{
"date": "2014-12-03",
"videos": [
"http://thecolbertreport.cc.com/videos/c9s1cs/intro---12-3-14",
"http://thecolbertreport.cc.com/videos/nxwili/the-no-social-security-for-nazis-act",
"http://thecolbertreport.cc.com/videos/ziipwv/thought-for-food---fairlife-milk---pizza-hut-s-subconscious-menu",
"http://thecolbertreport.cc.com/videos/fpdlpw/surprise-visit-from-amy-sedaris",
"http://thecolbertreport.cc.com/videos/4r9o52/christopher-nolan",
"http://thecolbertreport.cc.com/videos/nwo3n2/sign-off---goodnight"
],
"guest": "Christopher Nolan"
},
{
"date": "2014-12-04",
"videos": [
"http://thecolbertreport.cc.com/videos/ik935r/president-barack-obama-to-appear-on-the-report",
"http://thecolbertreport.cc.com/videos/d5k5nz/outrage-over-eric-garner-decision",
"http://thecolbertreport.cc.com/videos/pxune6/obama-s-bold-and-beautiful-ambassador-pick",
"http://thecolbertreport.cc.com/videos/nucbbu/paul-farmer",
"http://thecolbertreport.cc.com/videos/82d47r/sign-off---grimmy"
],
"guest": "Dr. Paul Farmer"
},
{
"date": "2014-12-08",
"videos": [
"http://thecolbertreport.cc.com/videos/u8bqev/mr--colbert-goes-to-washington",
"http://thecolbertreport.cc.com/videos/cnlqbr/better-know-a-america---the-fightin--us",
"http://thecolbertreport.cc.com/videos/88p9oh/the-word---president-barack-obama---to-health-in-a-handbasket",
"http://thecolbertreport.cc.com/videos/i14vel/president-barack-obama-pt--1",
"http://thecolbertreport.cc.com/videos/mpmtan/president-barack-obama-pt--2",
"http://thecolbertreport.cc.com/videos/3mcn6y/sign-off---see-ya",
"http://thecolbertreport.cc.com/videos/4mkbqz/exclusive---president-barack-obama-extended-interview"
],
"guest": "President Barack Obama"
},
{
"date": "2014-12-09",
"videos": [
"http://thecolbertreport.cc.com/videos/tgnj0t/-eaten-alive--outrage",
"http://thecolbertreport.cc.com/videos/vd3icz/better-know-a-district---georgia-s-1st---reuniting-with-rep--jack-kingston",
"http://thecolbertreport.cc.com/videos/pz35hw/who-s-honoring-me-now----entertainment-weekly",
"http://thecolbertreport.cc.com/videos/2kz4pi/james-corden",
"http://thecolbertreport.cc.com/videos/0frj3t/sign-off---sting"
],
"guest": "James Corden"
},
{
"date": "2014-12-10",
"videos": [
"http://thecolbertreport.cc.com/videos/kquici/cia-torture-report",
"http://thecolbertreport.cc.com/videos/rlpjf5/cia-torture-report---pundits-defend-america",
"http://thecolbertreport.cc.com/videos/z4grj8/cia-torture-report---tom-blanton",
"http://thecolbertreport.cc.com/videos/8i6klx/sarah-koenig",
"http://thecolbertreport.cc.com/videos/im3k81/sign-off---headphones"
],
"guest": "Sarah Koenig"
},
{
"date": "2014-12-11",
"videos": [
"http://thecolbertreport.cc.com/videos/anckrc/scott-walker-s-hanukkah-gaffe",
"http://thecolbertreport.cc.com/videos/399enl/yahweh-or-no-way---epic-casting-controversy",
"http://thecolbertreport.cc.com/videos/p9nk9d/announcing-the-colbert-report-raffle",
"http://thecolbertreport.cc.com/videos/509747/smaug",
"http://thecolbertreport.cc.com/videos/mfxigz/sign-off---aftermath-of-smaug"
],
"guest": "\"The Hobbit: Battle of the Five Armies\" special"
},
{
"date": "2014-12-15",
"videos": [
"http://thecolbertreport.cc.com/videos/bt8vk8/intro---12-15-14",
"http://thecolbertreport.cc.com/videos/lwna3x/michele-bachmann-s-extreme-holiday-cheer",
"http://thecolbertreport.cc.com/videos/0frisd/formidable-opponent---torture-report",
"http://thecolbertreport.cc.com/videos/9xetgg/kim-jong-un-s-exclusive-name---sony-s-hack-attack",
"http://thecolbertreport.cc.com/videos/j9u5in/seth-rogen",
"http://thecolbertreport.cc.com/videos/bhrczk/sign-off---goodnight"
],
"guest": "Seth Rogen"
},
{
"date": "2014-12-16",
"videos": [
"http://thecolbertreport.cc.com/videos/arfo3o/jeb-bush-s-presidential-ambitions",
"http://thecolbertreport.cc.com/videos/tnwzte/oil-war---jason-bordoff",
"http://thecolbertreport.cc.com/videos/vd8ci4/colbert-platinum---holiday-gift-edition",
"http://thecolbertreport.cc.com/videos/w5h8eb/kendrick-lamar",
"http://thecolbertreport.cc.com/videos/pjrqsj/kendrick-lamar---debut-of-untitled-track"
],
"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
| traltixx/pycolbert | pycolbert.py | Python | gpl-2.0 | 853,594 |
<?php
/**
* youtubegallery Joomla! 2.5 Native Component
* @version 3.5.3
* @author DesignCompass corp< <[email protected]>
* @link http://www.joomlaboat.com
* @GNU General Public License
**/
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->getVideoListTableRow($listid))
echo '<p>No video found</p>';
if(!$misc->getThemeTableRow($themeid))
echo '<p>No theme found</p>';
$firstvideo='';
$youtubegallerycode='';
$total_number_of_rows=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->getVideoList_FromCache_From_Table($videoid_new,$total_number_of_rows);
if($videoid=='')
{
if($misc->theme_row->playvideo==1 and $videoid_new!='')
$videoid=$videoid_new;
}
$renderer= new YouTubeGalleryRenderer;
$gallerymodule=$renderer->render(
$videolist,
$misc->videolist_row,
$misc->theme_row,
$total_number_of_rows,
$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>';
?>
| sekret47/konstantin | modules/mod_youtubegallery/mod_youtubegallery.php | PHP | gpl-2.0 | 2,624 |
<?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);
} | invifire/ci | wp-content/themes/flipbook/includes/mail.php | PHP | gpl-2.0 | 688 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.commons.io.monitor;
import java.io.File;
import java.io.Serializable;
/**
* {@link FileEntry} represents the state of a file or directory, capturing
* the following {@link File} attributes at a point in time.
* <ul>
* <li>File Name (see {@link File#getName()})</li>
* <li>Exists - whether the file exists or not (see {@link File#exists()})</li>
* <li>Directory - whether the file is a directory or not (see {@link File#isDirectory()})</li>
* <li>Last Modified Date/Time (see {@link File#lastModified()})</li>
* <li>Length (see {@link File#length()}) - directories treated as zero</li>
* <li>Children - contents of a directory (see {@link File#listFiles(java.io.FileFilter)})</li>
* </ul>
* <p>
* <h3>Custom Implementations</h3>
* If the state of additional {@link File} attributes is required then create a custom
* {@link FileEntry} with properties for those attributes. Override the
* {@link #newChildInstance(File)} to return a new instance of the appropriate type.
* You may also want to override the {@link #refresh(File)} method.
* @see FileAlterationObserver
* @since 2.0
*/
public class FileEntry implements Serializable {
static final FileEntry[] EMPTY_ENTRIES = new FileEntry[0];
private final FileEntry parent;
private FileEntry[] children;
private final File file;
private String name;
private boolean exists;
private boolean directory;
private long lastModified;
private long length;
/**
* Construct a new monitor for a specified {@link File}.
*
* @param file The file being monitored
*/
public FileEntry(File file) {
this((FileEntry)null, file);
}
/**
* Construct a new monitor for a specified {@link File}.
*
* @param parent The parent
* @param file The file being monitored
*/
public FileEntry(FileEntry parent, File file) {
if (file == null) {
throw new IllegalArgumentException("File is missing");
}
this.file = file;
this.parent = parent;
this.name = file.getName();
}
/**
* Refresh the attributes from the {@link File}, indicating
* whether the file has changed.
* <p>
* This implementation refreshes the <code>name</code>, <code>exists</code>,
* <code>directory</code>, <code>lastModified</code> and <code>length</code>
* properties.
* <p>
* The <code>exists</code>, <code>directory</code>, <code>lastModified</code>
* and <code>length</code> properties are compared for changes
*
* @param file the file instance to compare to
* @return <code>true</code> if the file has changed, otherwise <code>false</code>
*/
public boolean refresh(File file) {
// cache original values
boolean origExists = exists;
long origLastModified = lastModified;
boolean origDirectory = directory;
long origLength = length;
// refresh the values
name = file.getName();
exists = file.exists();
directory = exists ? file.isDirectory() : false;
lastModified = exists ? file.lastModified() : 0;
length = exists && !directory ? file.length() : 0;
// Return if there are changes
return exists != origExists ||
lastModified != origLastModified ||
directory != origDirectory ||
length != origLength;
}
/**
* Create a new child instance.
* <p>
* Custom implementations should override this method to return
* a new instance of the appropriate type.
*
* @param file The child file
* @return a new child instance
*/
public FileEntry newChildInstance(File file) {
return new FileEntry(this, file);
}
/**
* Return the parent entry.
*
* @return the parent entry
*/
public FileEntry getParent() {
return parent;
}
/**
* Return the level
*
* @return the level
*/
public int getLevel() {
return parent == null ? 0 : parent.getLevel() + 1;
}
/**
* Return the directory's files.
*
* @return This directory's files or an empty
* array if the file is not a directory or the
* directory is empty
*/
public FileEntry[] getChildren() {
return children != null ? children : EMPTY_ENTRIES;
}
/**
* Set the directory's files.
*
* @param children This directory's files, may be null
*/
public void setChildren(FileEntry[] children) {
this.children = children;
}
/**
* Return the file being monitored.
*
* @return the file being monitored
*/
public File getFile() {
return file;
}
/**
* Return the file name.
*
* @return the file name
*/
public String getName() {
return name;
}
/**
* Set the file name.
*
* @param name the file name
*/
public void setName(String name) {
this.name = name;
}
/**
* Return the last modified time from the last time it
* was checked.
*
* @return the last modified time
*/
public long getLastModified() {
return lastModified;
}
/**
* Return the last modified time from the last time it
* was checked.
*
* @param lastModified The last modified time
*/
public void setLastModified(long lastModified) {
this.lastModified = lastModified;
}
/**
* Return the length.
*
* @return the length
*/
public long getLength() {
return length;
}
/**
* Set the length.
*
* @param length the length
*/
public void setLength(long length) {
this.length = length;
}
/**
* Indicate whether the file existed the last time it
* was checked.
*
* @return whether the file existed
*/
public boolean isExists() {
return exists;
}
/**
* Set whether the file existed the last time it
* was checked.
*
* @param exists whether the file exists or not
*/
public void setExists(boolean exists) {
this.exists = exists;
}
/**
* Indicate whether the file is a directory or not.
*
* @return whether the file is a directory or not
*/
public boolean isDirectory() {
return directory;
}
/**
* Set whether the file is a directory or not.
*
* @param directory whether the file is a directory or not
*/
public void setDirectory(boolean directory) {
this.directory = directory;
}
}
| BIORIMP/biorimp | BIO-RIMP/test_data/code/cio/src/main/java/org/apache/commons/io/monitor/FileEntry.java | Java | gpl-2.0 | 7,542 |
<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://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
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: <a rel="next" accesskey="n" href="acronym.html#acronym">acronym</a>,
Previous: <a rel="previous" accesskey="p" href="cite.html#cite">cite</a>,
Up: <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="index-Abbreviations_002c-tagging-431"></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="Not-Ending-a-Sentence.html#Not-Ending-a-Sentence">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="index-g_t_003cabbr_003e-tag-432"></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><abbr></code> tag is
used; in Docbook, the <code><abbrev></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>
| OS2World/APP-WORDPROC-GNU_texinfo | OS2tree/usr/share/doc/texinfo-4.8/texinfo.html/abbr.html | HTML | gpl-2.0 | 4,261 |
/* $Id: http_client.h 3227 2010-06-29 13:43:05Z ming $ */
/*
* Copyright (C) 2008-2010 Teluu Inc. (http://www.teluu.com)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __PJLIB_UTIL_HTTP_CLIENT_H__
#define __PJLIB_UTIL_HTTP_CLIENT_H__
/**
* @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 #pj_http_headers_add_elmt() 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 #pj_http_req_param_default().
*/
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 PJ_HTTP_DEFAULT_TIMEOUT.
*/
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 pj_http_req_callback
{
/**
* 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);
} pj_http_req_callback;
/**
* Initialize the http request parameters with the default values.
*
* @param param The parameter to be initialized.
*/
PJ_DECL(void) pj_http_req_param_default(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) pj_http_headers_add_elmt(pj_http_headers *headers,
pj_str_t *name,
pj_str_t *val);
/**
* The same as #pj_http_headers_add_elmt() 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) pj_http_headers_add_elmt2(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) pj_http_req_parse_url(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 pj_http_req_callback *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) pj_http_req_set_timeout(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) pj_http_req_is_running(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 *) pj_http_req_get_user_data(pj_http_req *http_req);
/**
* @}
*/
PJ_END_DECL
#endif /* __PJLIB_UTIL_HTTP_CLIENT_H__ */
| kaaustubh/pjsip | pjlib-util/include/pjlib-util/http_client.h | C | gpl-2.0 | 12,852 |
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;
}
}
}
}
}
| brodock/sunuo | scripts/legacy/Items/Skill Items/Tailor Items/Dyetubs/StatuetteDyeTub.cs | C# | gpl-2.0 | 1,609 |
/*
* ISDB subtitle decoding
* Copyright (c) 2013 0p1pp1
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* FFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#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 ISDBSUB_MGMNT_TIMEOUT (180 * 1000)
#define ISDBSUB_NO_DGID -1
#define ISDBSUB_MAX_LANG 2 /* ARIB TR-B14/B15 */
#define IS_HORIZONTAL_LAYOUT(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] =
{
//0-7
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),
//64
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,
ISDBSUB_TMD_REALTIME,
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; // G0
s->gr = 2; // G2
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 (IS_HORIZONTAL_LAYOUT(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 (IS_HORIZONTAL_LAYOUT(ctx->current_state.layout_state.format))
av_strlcatf(effect, sizeof(effect), "Scroll up;;;");
else
av_strlcatf(effect, sizeof(effect), "Banner;;;;"); // LtoR
} else if ((IS_HORIZONTAL_LAYOUT(l->format) &&
l->scroll.direction == SCROLL_DIR_COLUMN) ||
(!IS_HORIZONTAL_LAYOUT(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",
IS_HORIZONTAL_LAYOUT(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" :
(IS_HORIZONTAL_LAYOUT(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, treat_fontname_as_pattern\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 (IS_HORIZONTAL_LAYOUT(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 (IS_HORIZONTAL_LAYOUT(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 (IS_HORIZONTAL_LAYOUT(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 (IS_HORIZONTAL_LAYOUT(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: // CS
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 (IS_HORIZONTAL_LAYOUT(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",
/* 91 */
"\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",
/* 91 */
"\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 && IS_HORIZONTAL_LAYOUT(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 (IS_HORIZONTAL_LAYOUT(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 (IS_HORIZONTAL_LAYOUT(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 (IS_HORIZONTAL_LAYOUT(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 (IS_HORIZONTAL_LAYOUT(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 > ISDBSUB_MGMNT_TIMEOUT) {
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;
}
| 0p1pp1/mplayer | sub/isdbsubdec.c | C | gpl-2.0 | 81,372 |
/*
* BSD compression module
*
* Patched version for ISDN syncPPP written 1997/1998 by Michael Hipp
* The whole module is now SKB based.
*
*/
/*
* Update: The Berkeley copyright was changed, and the change
* is retroactive to all "true" BSD software (ie everything
* from UCB as opposed to other peoples code that just carried
* the same license). The new copyright doesn't clash with the
* GPL, so the module-only restriction has been removed..
*/
/*
* Original copyright notice:
*
* Copyright (c) 1985, 1986 The Regents of the University of California.
* All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* James A. Woods, derived from original work by Spencer Thomas
* and Joseph Orost.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#include <linux/module.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/fcntl.h>
#include <linux/interrupt.h>
#include <linux/ptrace.h>
#include <linux/ioport.h>
#include <linux/in.h>
#include <linux/slab.h>
#include <linux/tty.h>
#include <linux/errno.h>
#include <linux/string.h> /* used in new tty drivers */
#include <linux/signal.h> /* used in new tty drivers */
#include <linux/bitops.h>
#include <asm/byteorder.h>
#include <asm/types.h>
#include <linux/if.h>
#include <linux/if_ether.h>
#include <linux/netdevice.h>
#include <linux/skbuff.h>
#include <linux/inet.h>
#include <linux/ioctl.h>
#include <linux/vmalloc.h>
#include <linux/ppp_defs.h>
#include <linux/isdn.h>
#include <linux/isdn_ppp.h>
#include <linux/ip.h>
#include <linux/tcp.h>
#include <linux/if_arp.h>
#include <linux/ppp-comp.h>
#include "isdn_ppp.h"
MODULE_DESCRIPTION("ISDN4Linux: BSD Compression for PPP over ISDN");
MODULE_LICENSE("Dual BSD/GPL");
#define BSD_VERSION(x) ((x) >> 5)
#define BSD_NBITS(x) ((x) & 0x1F)
#define BSD_CURRENT_VERSION 1
#define DEBUG 1
/*
* A dictionary for doing BSD compress.
*/
struct bsd_dict {
u32 fcode;
u16 codem1; /* output of hash table -1 */
u16 cptr; /* map code to hash table entry */
};
struct bsd_db {
int totlen; /* length of this structure */
unsigned int hsize; /* size of the hash table */
unsigned char hshift; /* used in hash function */
unsigned char n_bits; /* current bits/code */
unsigned char maxbits; /* maximum bits/code */
unsigned char debug; /* non-zero if debug desired */
unsigned char unit; /* ppp unit number */
u16 seqno; /* sequence # of next packet */
unsigned int mru; /* size of receive (decompress) bufr */
unsigned int maxmaxcode; /* largest valid code */
unsigned int max_ent; /* largest code in use */
unsigned int in_count; /* uncompressed bytes, aged */
unsigned int bytes_out; /* compressed bytes, aged */
unsigned int ratio; /* recent compression ratio */
unsigned int checkpoint; /* when to next check the ratio */
unsigned int clear_count; /* times dictionary cleared */
unsigned int incomp_count; /* incompressible packets */
unsigned int incomp_bytes; /* incompressible bytes */
unsigned int uncomp_count; /* uncompressed packets */
unsigned int uncomp_bytes; /* uncompressed bytes */
unsigned int comp_count; /* compressed packets */
unsigned int comp_bytes; /* compressed bytes */
unsigned short *lens; /* array of lengths of codes */
struct bsd_dict *dict; /* dictionary */
int xmit;
};
#define BSD_OVHD 2 /* BSD compress overhead/packet */
#define MIN_BSD_BITS 9
#define BSD_INIT_BITS MIN_BSD_BITS
#define MAX_BSD_BITS 15
/*
* the next two codes should not be changed lightly, as they must not
* lie within the contiguous general code space.
*/
#define CLEAR 256 /* table clear output code */
#define FIRST 257 /* first free entry */
#define LAST 255
#define MAXCODE(b) ((1 << (b)) - 1)
#define BADCODEM1 MAXCODE(MAX_BSD_BITS)
#define BSD_HASH(prefix, suffix, hshift) ((((unsigned long)(suffix)) << (hshift)) \
^ (unsigned long)(prefix))
#define BSD_KEY(prefix, suffix) ((((unsigned long)(suffix)) << 16) \
+ (unsigned long)(prefix))
#define CHECK_GAP 10000 /* Ratio check interval */
#define RATIO_SCALE_LOG 8
#define RATIO_SCALE (1 << RATIO_SCALE_LOG)
#define RATIO_MAX (0x7fffffff >> RATIO_SCALE_LOG)
/*
* clear the dictionary
*/
static void bsd_clear(struct bsd_db *db)
{
db->clear_count++;
db->max_ent = FIRST - 1;
db->n_bits = BSD_INIT_BITS;
db->bytes_out = 0;
db->in_count = 0;
db->incomp_count = 0;
db->ratio = 0;
db->checkpoint = CHECK_GAP;
}
/*
* If the dictionary is full, then see if it is time to reset it.
*
* Compute the compression ratio using fixed-point arithmetic
* with 8 fractional bits.
*
* Since we have an infinite stream instead of a single file,
* watch only the local compression ratio.
*
* Since both peers must reset the dictionary at the same time even in
* the absence of CLEAR codes (while packets are incompressible), they
* must compute the same ratio.
*/
static int bsd_check(struct bsd_db *db) /* 1=output CLEAR */
{
unsigned int new_ratio;
if (db->in_count >= db->checkpoint)
{
/* age the ratio by limiting the size of the counts */
if (db->in_count >= RATIO_MAX || db->bytes_out >= RATIO_MAX)
{
db->in_count -= (db->in_count >> 2);
db->bytes_out -= (db->bytes_out >> 2);
}
db->checkpoint = db->in_count + CHECK_GAP;
if (db->max_ent >= db->maxmaxcode)
{
/* Reset the dictionary only if the ratio is worse,
* or if it looks as if it has been poisoned
* by incompressible data.
*
* This does not overflow, because
* db->in_count <= RATIO_MAX.
*/
new_ratio = db->in_count << RATIO_SCALE_LOG;
if (db->bytes_out != 0)
{
new_ratio /= db->bytes_out;
}
if (new_ratio < db->ratio || new_ratio < 1 * RATIO_SCALE)
{
bsd_clear(db);
return 1;
}
db->ratio = new_ratio;
}
}
return 0;
}
/*
* Return statistics.
*/
static void bsd_stats(void *state, struct compstat *stats)
{
struct bsd_db *db = (struct bsd_db *) state;
stats->unc_bytes = db->uncomp_bytes;
stats->unc_packets = db->uncomp_count;
stats->comp_bytes = db->comp_bytes;
stats->comp_packets = db->comp_count;
stats->inc_bytes = db->incomp_bytes;
stats->inc_packets = db->incomp_count;
stats->in_count = db->in_count;
stats->bytes_out = db->bytes_out;
}
/*
* Reset state, as on a CCP ResetReq.
*/
static void bsd_reset(void *state, unsigned char code, unsigned char id,
unsigned char *data, unsigned len,
struct isdn_ppp_resetparams *rsparm)
{
struct bsd_db *db = (struct bsd_db *) state;
bsd_clear(db);
db->seqno = 0;
db->clear_count = 0;
}
/*
* Release the compression structure
*/
static void bsd_free(void *state)
{
struct bsd_db *db = (struct bsd_db *) state;
if (db) {
/*
* Release the dictionary
*/
vfree(db->dict);
db->dict = NULL;
/*
* Release the string buffer
*/
vfree(db->lens);
db->lens = NULL;
/*
* Finally release the structure itself.
*/
kfree(db);
}
}
/*
* Allocate space for a (de) compressor.
*/
static void *bsd_alloc(struct isdn_ppp_comp_data *data)
{
int bits;
unsigned int hsize, hshift, maxmaxcode;
struct bsd_db *db;
int decomp;
static unsigned int htab[][2] = {
{ 5003 , 4 } , { 5003 , 4 } , { 5003 , 4 } , { 5003 , 4 } ,
{ 9001 , 5 } , { 18013 , 6 } , { 35023 , 7 } , { 69001 , 8 }
};
if (data->optlen != 1 || data->num != CI_BSD_COMPRESS
|| BSD_VERSION(data->options[0]) != BSD_CURRENT_VERSION)
return NULL;
bits = BSD_NBITS(data->options[0]);
if (bits < 9 || bits > 15)
return NULL;
hsize = htab[bits - 9][0];
hshift = htab[bits - 9][1];
/*
* Allocate the main control structure for this instance.
*/
maxmaxcode = MAXCODE(bits);
db = kzalloc(sizeof(struct bsd_db), GFP_KERNEL);
if (!db)
return NULL;
db->xmit = data->flags & IPPP_COMP_FLAG_XMIT;
decomp = db->xmit ? 0 : 1;
/*
* Allocate space for the dictionary. This may be more than one page in
* length.
*/
db->dict = vmalloc(hsize * sizeof(struct bsd_dict));
if (!db->dict) {
bsd_free(db);
return NULL;
}
/*
* If this is the compression buffer then there is no length data.
* For decompression, the length information is needed as well.
*/
if (!decomp)
db->lens = NULL;
else {
db->lens = vmalloc((maxmaxcode + 1) * sizeof(db->lens[0]));
if (!db->lens) {
bsd_free(db);
return (NULL);
}
}
/*
* Initialize the data information for the compression code
*/
db->totlen = sizeof(struct bsd_db) + (sizeof(struct bsd_dict) * hsize);
db->hsize = hsize;
db->hshift = hshift;
db->maxmaxcode = maxmaxcode;
db->maxbits = bits;
return (void *)db;
}
/*
* Initialize the database.
*/
static int bsd_init(void *state, struct isdn_ppp_comp_data *data, int unit, int debug)
{
struct bsd_db *db = state;
int indx;
int decomp;
if (!state || !data) {
printk(KERN_ERR "isdn_bsd_init: [%d] ERR, state %lx data %lx\n", unit, (long)state, (long)data);
return 0;
}
decomp = db->xmit ? 0 : 1;
if (data->optlen != 1 || data->num != CI_BSD_COMPRESS
|| (BSD_VERSION(data->options[0]) != BSD_CURRENT_VERSION)
|| (BSD_NBITS(data->options[0]) != db->maxbits)
|| (decomp && db->lens == NULL)) {
printk(KERN_ERR "isdn_bsd: %d %d %d %d %lx\n", data->optlen, data->num, data->options[0], decomp, (unsigned long)db->lens);
return 0;
}
if (decomp)
for (indx = LAST; indx >= 0; indx--)
db->lens[indx] = 1;
indx = db->hsize;
while (indx-- != 0) {
db->dict[indx].codem1 = BADCODEM1;
db->dict[indx].cptr = 0;
}
db->unit = unit;
db->mru = 0;
db->debug = 1;
bsd_reset(db, 0, 0, NULL, 0, NULL);
return 1;
}
/*
* Obtain pointers to the various structures in the compression tables
*/
#define dict_ptrx(p, idx) &(p->dict[idx])
#define lens_ptrx(p, idx) &(p->lens[idx])
#ifdef DEBUG
static unsigned short *lens_ptr(struct bsd_db *db, int idx)
{
if ((unsigned int) idx > (unsigned int) db->maxmaxcode) {
printk(KERN_DEBUG "<9>ppp: lens_ptr(%d) > max\n", idx);
idx = 0;
}
return lens_ptrx(db, idx);
}
static struct bsd_dict *dict_ptr(struct bsd_db *db, int idx)
{
if ((unsigned int) idx >= (unsigned int) db->hsize) {
printk(KERN_DEBUG "<9>ppp: dict_ptr(%d) > max\n", idx);
idx = 0;
}
return dict_ptrx(db, idx);
}
#else
#define lens_ptr(db, idx) lens_ptrx(db, idx)
#define dict_ptr(db, idx) dict_ptrx(db, idx)
#endif
/*
* compress a packet
*/
static int bsd_compress(void *state, struct sk_buff *skb_in, struct sk_buff *skb_out, int proto)
{
struct bsd_db *db;
int hshift;
unsigned int max_ent;
unsigned int n_bits;
unsigned int bitno;
unsigned long accm;
int ent;
unsigned long fcode;
struct bsd_dict *dictp;
unsigned char c;
int hval, disp, ilen, mxcode;
unsigned char *rptr = skb_in->data;
int isize = skb_in->len;
#define OUTPUT(ent) \
{ \
bitno -= n_bits; \
accm |= ((ent) << bitno); \
do { \
if (skb_out && skb_tailroom(skb_out) > 0) \
*(skb_put(skb_out, 1)) = (unsigned char)(accm >> 24); \
accm <<= 8; \
bitno += 8; \
} while (bitno <= 24); \
}
/*
* If the protocol is not in the range we're interested in,
* just return without compressing the packet. If it is,
* the protocol becomes the first byte to compress.
*/
printk(KERN_DEBUG "bsd_compress called with %x\n", proto);
ent = proto;
if (proto < 0x21 || proto > 0xf9 || !(proto & 0x1))
return 0;
db = (struct bsd_db *) state;
hshift = db->hshift;
max_ent = db->max_ent;
n_bits = db->n_bits;
bitno = 32;
accm = 0;
mxcode = MAXCODE(n_bits);
/* This is the PPP header information */
if (skb_out && skb_tailroom(skb_out) >= 2) {
char *v = skb_put(skb_out, 2);
/* we only push our own data on the header,
AC,PC and protos is pushed by caller */
v[0] = db->seqno >> 8;
v[1] = db->seqno;
}
ilen = ++isize; /* This is off by one, but that is what is in draft! */
while (--ilen > 0) {
c = *rptr++;
fcode = BSD_KEY(ent, c);
hval = BSD_HASH(ent, c, hshift);
dictp = dict_ptr(db, hval);
/* Validate and then check the entry. */
if (dictp->codem1 >= max_ent)
goto nomatch;
if (dictp->fcode == fcode) {
ent = dictp->codem1 + 1;
continue; /* found (prefix,suffix) */
}
/* continue probing until a match or invalid entry */
disp = (hval == 0) ? 1 : hval;
do {
hval += disp;
if (hval >= db->hsize)
hval -= db->hsize;
dictp = dict_ptr(db, hval);
if (dictp->codem1 >= max_ent)
goto nomatch;
} while (dictp->fcode != fcode);
ent = dictp->codem1 + 1; /* finally found (prefix,suffix) */
continue;
nomatch:
OUTPUT(ent); /* output the prefix */
/* code -> hashtable */
if (max_ent < db->maxmaxcode) {
struct bsd_dict *dictp2;
struct bsd_dict *dictp3;
int indx;
/* expand code size if needed */
if (max_ent >= mxcode) {
db->n_bits = ++n_bits;
mxcode = MAXCODE(n_bits);
}
/*
* Invalidate old hash table entry using
* this code, and then take it over.
*/
dictp2 = dict_ptr(db, max_ent + 1);
indx = dictp2->cptr;
dictp3 = dict_ptr(db, indx);
if (dictp3->codem1 == max_ent)
dictp3->codem1 = BADCODEM1;
dictp2->cptr = hval;
dictp->codem1 = max_ent;
dictp->fcode = fcode;
db->max_ent = ++max_ent;
if (db->lens) {
unsigned short *len1 = lens_ptr(db, max_ent);
unsigned short *len2 = lens_ptr(db, ent);
*len1 = *len2 + 1;
}
}
ent = c;
}
OUTPUT(ent); /* output the last code */
if (skb_out)
db->bytes_out += skb_out->len; /* Do not count bytes from here */
db->uncomp_bytes += isize;
db->in_count += isize;
++db->uncomp_count;
++db->seqno;
if (bitno < 32)
++db->bytes_out; /* must be set before calling bsd_check */
/*
* Generate the clear command if needed
*/
if (bsd_check(db))
OUTPUT(CLEAR);
/*
* Pad dribble bits of last code with ones.
* Do not emit a completely useless byte of ones.
*/
if (bitno < 32 && skb_out && skb_tailroom(skb_out) > 0)
*(skb_put(skb_out, 1)) = (unsigned char)((accm | (0xff << (bitno - 8))) >> 24);
/*
* Increase code size if we would have without the packet
* boundary because the decompressor will do so.
*/
if (max_ent >= mxcode && max_ent < db->maxmaxcode)
db->n_bits++;
/* If output length is too large then this is an incompressible frame. */
if (!skb_out || (skb_out && skb_out->len >= skb_in->len)) {
++db->incomp_count;
db->incomp_bytes += isize;
return 0;
}
/* Count the number of compressed frames */
++db->comp_count;
db->comp_bytes += skb_out->len;
return skb_out->len;
#undef OUTPUT
}
/*
* Update the "BSD Compress" dictionary on the receiver for
* incompressible data by pretending to compress the incoming data.
*/
static void bsd_incomp(void *state, struct sk_buff *skb_in, int proto)
{
bsd_compress(state, skb_in, NULL, proto);
}
/*
* Decompress "BSD Compress".
*/
static int bsd_decompress(void *state, struct sk_buff *skb_in, struct sk_buff *skb_out,
struct isdn_ppp_resetparams *rsparm)
{
struct bsd_db *db;
unsigned int max_ent;
unsigned long accm;
unsigned int bitno; /* 1st valid bit in accm */
unsigned int n_bits;
unsigned int tgtbitno; /* bitno when we have a code */
struct bsd_dict *dictp;
int seq;
unsigned int incode;
unsigned int oldcode;
unsigned int finchar;
unsigned char *p, *ibuf;
int ilen;
int codelen;
int extra;
db = (struct bsd_db *) state;
max_ent = db->max_ent;
accm = 0;
bitno = 32; /* 1st valid bit in accm */
n_bits = db->n_bits;
tgtbitno = 32 - n_bits; /* bitno when we have a code */
printk(KERN_DEBUG "bsd_decompress called\n");
if (!skb_in || !skb_out) {
printk(KERN_ERR "bsd_decompress called with NULL parameter\n");
return DECOMP_ERROR;
}
/*
* Get the sequence number.
*/
if ((p = skb_pull(skb_in, 2)) == NULL) {
return DECOMP_ERROR;
}
p -= 2;
seq = (p[0] << 8) + p[1];
ilen = skb_in->len;
ibuf = skb_in->data;
/*
* Check the sequence number and give up if it differs from
* the value we're expecting.
*/
if (seq != db->seqno) {
if (db->debug) {
printk(KERN_DEBUG "bsd_decomp%d: bad sequence # %d, expected %d\n",
db->unit, seq, db->seqno - 1);
}
return DECOMP_ERROR;
}
++db->seqno;
db->bytes_out += ilen;
if (skb_tailroom(skb_out) > 0)
*(skb_put(skb_out, 1)) = 0;
else
return DECOMP_ERR_NOMEM;
oldcode = CLEAR;
/*
* Keep the checkpoint correctly so that incompressible packets
* clear the dictionary at the proper times.
*/
for (;;) {
if (ilen-- <= 0) {
db->in_count += (skb_out->len - 1); /* don't count the header */
break;
}
/*
* Accumulate bytes until we have a complete code.
* Then get the next code, relying on the 32-bit,
* unsigned accm to mask the result.
*/
bitno -= 8;
accm |= *ibuf++ << bitno;
if (tgtbitno < bitno)
continue;
incode = accm >> tgtbitno;
accm <<= n_bits;
bitno += n_bits;
/*
* The dictionary must only be cleared at the end of a packet.
*/
if (incode == CLEAR) {
if (ilen > 0) {
if (db->debug)
printk(KERN_DEBUG "bsd_decomp%d: bad CLEAR\n", db->unit);
return DECOMP_FATALERROR; /* probably a bug */
}
bsd_clear(db);
break;
}
if ((incode > max_ent + 2) || (incode > db->maxmaxcode)
|| (incode > max_ent && oldcode == CLEAR)) {
if (db->debug) {
printk(KERN_DEBUG "bsd_decomp%d: bad code 0x%x oldcode=0x%x ",
db->unit, incode, oldcode);
printk(KERN_DEBUG "max_ent=0x%x skb->Len=%d seqno=%d\n",
max_ent, skb_out->len, db->seqno);
}
return DECOMP_FATALERROR; /* probably a bug */
}
/* Special case for KwKwK string. */
if (incode > max_ent) {
finchar = oldcode;
extra = 1;
} else {
finchar = incode;
extra = 0;
}
codelen = *(lens_ptr(db, finchar));
if (skb_tailroom(skb_out) < codelen + extra) {
if (db->debug) {
printk(KERN_DEBUG "bsd_decomp%d: ran out of mru\n", db->unit);
#ifdef DEBUG
printk(KERN_DEBUG " len=%d, finchar=0x%x, codelen=%d,skblen=%d\n",
ilen, finchar, codelen, skb_out->len);
#endif
}
return DECOMP_FATALERROR;
}
/*
* Decode this code and install it in the decompressed buffer.
*/
p = skb_put(skb_out, codelen);
p += codelen;
while (finchar > LAST) {
struct bsd_dict *dictp2 = dict_ptr(db, finchar);
dictp = dict_ptr(db, dictp2->cptr);
#ifdef DEBUG
if (--codelen <= 0 || dictp->codem1 != finchar - 1) {
if (codelen <= 0) {
printk(KERN_ERR "bsd_decomp%d: fell off end of chain ", db->unit);
printk(KERN_ERR "0x%x at 0x%x by 0x%x, max_ent=0x%x\n", incode, finchar, dictp2->cptr, max_ent);
} else {
if (dictp->codem1 != finchar - 1) {
printk(KERN_ERR "bsd_decomp%d: bad code chain 0x%x finchar=0x%x ", db->unit, incode, finchar);
printk(KERN_ERR "oldcode=0x%x cptr=0x%x codem1=0x%x\n", oldcode, dictp2->cptr, dictp->codem1);
}
}
return DECOMP_FATALERROR;
}
#endif
{
u32 fcode = dictp->fcode;
*--p = (fcode >> 16) & 0xff;
finchar = fcode & 0xffff;
}
}
*--p = finchar;
#ifdef DEBUG
if (--codelen != 0)
printk(KERN_ERR "bsd_decomp%d: short by %d after code 0x%x, max_ent=0x%x\n", db->unit, codelen, incode, max_ent);
#endif
if (extra) /* the KwKwK case again */
*(skb_put(skb_out, 1)) = finchar;
/*
* If not first code in a packet, and
* if not out of code space, then allocate a new code.
*
* Keep the hash table correct so it can be used
* with uncompressed packets.
*/
if (oldcode != CLEAR && max_ent < db->maxmaxcode) {
struct bsd_dict *dictp2, *dictp3;
u16 *lens1, *lens2;
unsigned long fcode;
int hval, disp, indx;
fcode = BSD_KEY(oldcode, finchar);
hval = BSD_HASH(oldcode, finchar, db->hshift);
dictp = dict_ptr(db, hval);
/* look for a free hash table entry */
if (dictp->codem1 < max_ent) {
disp = (hval == 0) ? 1 : hval;
do {
hval += disp;
if (hval >= db->hsize)
hval -= db->hsize;
dictp = dict_ptr(db, hval);
} while (dictp->codem1 < max_ent);
}
/*
* Invalidate previous hash table entry
* assigned this code, and then take it over
*/
dictp2 = dict_ptr(db, max_ent + 1);
indx = dictp2->cptr;
dictp3 = dict_ptr(db, indx);
if (dictp3->codem1 == max_ent)
dictp3->codem1 = BADCODEM1;
dictp2->cptr = hval;
dictp->codem1 = max_ent;
dictp->fcode = fcode;
db->max_ent = ++max_ent;
/* Update the length of this string. */
lens1 = lens_ptr(db, max_ent);
lens2 = lens_ptr(db, oldcode);
*lens1 = *lens2 + 1;
/* Expand code size if needed. */
if (max_ent >= MAXCODE(n_bits) && max_ent < db->maxmaxcode) {
db->n_bits = ++n_bits;
tgtbitno = 32-n_bits;
}
}
oldcode = incode;
}
++db->comp_count;
++db->uncomp_count;
db->comp_bytes += skb_in->len - BSD_OVHD;
db->uncomp_bytes += skb_out->len;
if (bsd_check(db)) {
if (db->debug)
printk(KERN_DEBUG "bsd_decomp%d: peer should have cleared dictionary on %d\n",
db->unit, db->seqno - 1);
}
return skb_out->len;
}
/*************************************************************
* Table of addresses for the BSD compression module
*************************************************************/
static struct isdn_ppp_compressor ippp_bsd_compress = {
.owner = THIS_MODULE,
.num = CI_BSD_COMPRESS,
.alloc = bsd_alloc,
.free = bsd_free,
.init = bsd_init,
.reset = bsd_reset,
.compress = bsd_compress,
.decompress = bsd_decompress,
.incomp = bsd_incomp,
.stat = bsd_stats,
};
/*************************************************************
* Module support routines
*************************************************************/
static int __init isdn_bsdcomp_init(void)
{
int answer = isdn_ppp_register_compressor(&ippp_bsd_compress);
if (answer == 0)
printk(KERN_INFO "PPP BSD Compression module registered\n");
return answer;
}
static void __exit isdn_bsdcomp_exit(void)
{
isdn_ppp_unregister_compressor(&ippp_bsd_compress);
}
module_init(isdn_bsdcomp_init);
module_exit(isdn_bsdcomp_exit);
| Jackeagle/android_kernel_sony_c2305 | drivers/isdn/i4l/isdn_bsdcomp.c | C | gpl-2.0 | 24,813 |
<?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() {
/**
* there are problems when mocking SimpleXMLELement
*
* @link https://github.com/sebastianbergmann/phpunit-mock-objects/issues/141
*/
$sxml = new SimpleXMLElement( '<root/>' );
$iterator_mock = $this->mock_builder->iterator_simple_xml_item_wrapper();
$parser_mock = $this->mock_builder->service_term_parser_interface();
$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()
);
}
}
| inpsyde/wpml2mlp | tests/phpunit/Unit/Import/Iterator/TermIteratorTest.php | PHP | gpl-2.0 | 1,034 |
// Copyright (c) 2016- PPSSPP Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, version 2.0 or later versions.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License 2.0 for more details.
// A copy of the GPL 2.0 should have been included with the program.
// If not, see http://www.gnu.org/licenses/
// Official git repository and contact information can be found at
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
#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() {
DestroyDeviceObjects();
}
void Vulkan2D::Shutdown() {
DestroyDeviceObjects();
}
void Vulkan2D::DestroyDeviceObjects() {
for (int i = 0; i < vulkan_->GetInflightFrames(); i++) {
if (frameData_[i].descPool != VK_NULL_HANDLE) {
vulkan_->Delete().QueueDeleteDescriptorPool(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 (descriptorSetLayout_ != VK_NULL_HANDLE) {
vkDestroyDescriptorSetLayout(device, descriptorSetLayout_, nullptr);
descriptorSetLayout_ = VK_NULL_HANDLE;
}
if (pipelineLayout_ != VK_NULL_HANDLE) {
vkDestroyPipelineLayout(device, pipelineLayout_, nullptr);
pipelineLayout_ = VK_NULL_HANDLE;
}
// pipelineBasicTex_ and pipelineBasicTex_ come from vulkan2D_.
if (pipelineCache_ != VK_NULL_HANDLE) {
vulkan_->Delete().QueueDeletePipelineCache(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.
VkDescriptorSetLayoutBinding bindings[2] = {};
bindings[0].descriptorCount = 1;
bindings[0].descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER;
bindings[0].stageFlags = VK_SHADER_STAGE_FRAGMENT_BIT;
bindings[0].binding = 0;
bindings[1].descriptorCount = 1;
bindings[1].descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER;
bindings[1].stageFlags = VK_SHADER_STAGE_FRAGMENT_BIT;
bindings[1].binding = 1;
VkDevice device = vulkan_->GetDevice();
VkDescriptorSetLayoutCreateInfo dsl = { VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO };
dsl.bindingCount = 2;
dsl.pBindings = bindings;
VkResult res = vkCreateDescriptorSetLayout(device, &dsl, nullptr, &descriptorSetLayout_);
assert(VK_SUCCESS == res);
VkDescriptorPoolSize dpTypes[1];
dpTypes[0].descriptorCount = 3000;
dpTypes[0].type = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER;
VkDescriptorPoolCreateInfo dp = { VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO };
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 = vkCreateDescriptorPool(vulkan_->GetDevice(), &dp, nullptr, &frameData_[i].descPool);
assert(VK_SUCCESS == res);
}
VkPushConstantRange push = {};
push.offset = 0;
push.size = 16;
push.stageFlags = VK_SHADER_STAGE_FRAGMENT_BIT;
VkPipelineLayoutCreateInfo pl = { VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO };
pl.pPushConstantRanges = &push;
pl.pushConstantRangeCount = 1;
pl.setLayoutCount = 1;
pl.pSetLayouts = &descriptorSetLayout_;
pl.flags = 0;
res = vkCreatePipelineLayout(device, &pl, nullptr, &pipelineLayout_);
assert(VK_SUCCESS == res);
}
void Vulkan2D::DeviceLost() {
DestroyDeviceObjects();
}
void Vulkan2D::DeviceRestore(VulkanContext *vulkan) {
vulkan_ = vulkan;
InitDeviceObjects();
}
void Vulkan2D::BeginFrame() {
int curFrame = vulkan_->GetCurFrame();
FrameData &frame = frameData_[curFrame];
frame.descSets.clear();
vkResetDescriptorPool(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;
VkDescriptorSetAllocateInfo descAlloc = { VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO };
descAlloc.pSetLayouts = &descriptorSetLayout_;
descAlloc.descriptorPool = frame->descPool;
descAlloc.descriptorSetCount = 1;
VkResult result = vkAllocateDescriptorSets(vulkan_->GetDevice(), &descAlloc, &desc);
assert(result == VK_SUCCESS);
// We just don't write to the slots we don't care about.
VkWriteDescriptorSet writes[2];
memset(writes, 0, sizeof(writes));
// Main and sub textures
int n = 0;
VkDescriptorImageInfo image1 = {};
VkDescriptorImageInfo image2 = {};
if (tex1) {
// TODO: Also support LAYOUT_GENERAL to be able to texture from framebuffers without transitioning them?
image1.imageLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;
image1.imageView = tex1;
image1.sampler = sampler1;
writes[n].sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET;
writes[n].dstBinding = 0;
writes[n].pImageInfo = &image1;
writes[n].descriptorCount = 1;
writes[n].descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER;
writes[n].dstSet = desc;
n++;
}
if (tex2) {
// TODO: Also support LAYOUT_GENERAL to be able to texture from framebuffers without transitioning them?
image2.imageLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;
image2.imageView = tex2;
image2.sampler = sampler2;
writes[n].sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET;
writes[n].dstBinding = 1;
writes[n].pImageInfo = &image2;
writes[n].descriptorCount = 1;
writes[n].descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER;
writes[n].dstSet = desc;
n++;
}
vkUpdateDescriptorSets(vulkan_->GetDevice(), n, writes, 0, nullptr);
frame->descSets[key] = desc;
return desc;
}
VkPipeline Vulkan2D::GetPipeline(VkRenderPass rp, VkShaderModule vs, VkShaderModule fs, bool readVertices, VK2DDepthStencilMode 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;
}
VkPipelineColorBlendAttachmentState blend0 = {};
blend0.blendEnable = false;
blend0.colorWriteMask = depthStencilMode == VK2DDepthStencilMode::STENCIL_REPLACE_ALWAYS ? VK_COLOR_COMPONENT_A_BIT : 0xF;
VkPipelineColorBlendStateCreateInfo cbs = { VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO };
cbs.pAttachments = &blend0;
cbs.attachmentCount = 1;
cbs.logicOpEnable = false;
VkPipelineDepthStencilStateCreateInfo dss = { VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO };
dss.depthBoundsTestEnable = false;
dss.depthTestEnable = false;
dss.stencilTestEnable = false;
switch (depthStencilMode) {
case VK2DDepthStencilMode::NONE:
break;
case VK2DDepthStencilMode::STENCIL_REPLACE_ALWAYS:
dss.stencilTestEnable = true;
dss.front.reference = 0xFF;
dss.front.compareMask = 0xFF;
dss.front.compareOp = VK_COMPARE_OP_ALWAYS;
dss.front.depthFailOp = VK_STENCIL_OP_REPLACE;
dss.front.failOp = VK_STENCIL_OP_REPLACE;
dss.front.passOp = VK_STENCIL_OP_REPLACE;
dss.back = dss.front;
break;
}
VkDynamicState dynamicStates[5];
int numDyn = 0;
dynamicStates[numDyn++] = VK_DYNAMIC_STATE_SCISSOR;
dynamicStates[numDyn++] = VK_DYNAMIC_STATE_VIEWPORT;
if (depthStencilMode == VK2DDepthStencilMode::STENCIL_REPLACE_ALWAYS) {
dynamicStates[numDyn++] = VK_DYNAMIC_STATE_STENCIL_WRITE_MASK;
dynamicStates[numDyn++] = VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK;
dynamicStates[numDyn++] = VK_DYNAMIC_STATE_STENCIL_REFERENCE;
}
VkPipelineDynamicStateCreateInfo ds = { VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO };
ds.pDynamicStates = dynamicStates;
ds.dynamicStateCount = numDyn;
VkPipelineRasterizationStateCreateInfo rs = { VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO };
rs.lineWidth = 1.0f;
VkPipelineMultisampleStateCreateInfo ms = { VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO };
ms.rasterizationSamples = VK_SAMPLE_COUNT_1_BIT;
VkPipelineShaderStageCreateInfo ss[2] = {};
ss[0].sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO;
ss[0].stage = VK_SHADER_STAGE_VERTEX_BIT;
ss[0].module = vs;
ss[0].pName = "main";
ss[0].flags = 0;
ss[1].sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO;
ss[1].stage = VK_SHADER_STAGE_FRAGMENT_BIT;
ss[1].module = fs;
ss[1].pName = "main";
ss[1].flags = 0;
VkPipelineInputAssemblyStateCreateInfo inputAssembly = { VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO };
inputAssembly.flags = 0;
inputAssembly.topology = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP;
inputAssembly.primitiveRestartEnable = true;
VkVertexInputAttributeDescription attrs[2];
int attributeCount = 2;
attrs[0].binding = 0;
attrs[0].format = VK_FORMAT_R32G32B32_SFLOAT;
attrs[0].location = 0;
attrs[0].offset = 0;
attrs[1].binding = 0;
attrs[1].format = VK_FORMAT_R32G32_SFLOAT;
attrs[1].location = 1;
attrs[1].offset = 12;
int vertexStride = 12 + 8;
VkVertexInputBindingDescription ibd = {};
ibd.binding = 0;
ibd.inputRate = VK_VERTEX_INPUT_RATE_VERTEX;
ibd.stride = vertexStride;
VkPipelineVertexInputStateCreateInfo vis = { VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO };
vis.vertexBindingDescriptionCount = readVertices ? 1 : 0;
vis.pVertexBindingDescriptions = readVertices ? &ibd : nullptr;
vis.vertexAttributeDescriptionCount = readVertices ? attributeCount : 0;
vis.pVertexAttributeDescriptions = readVertices ? attrs : nullptr;
VkPipelineViewportStateCreateInfo views = { VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO };
views.viewportCount = 1;
views.scissorCount = 1;
views.pViewports = nullptr; // dynamic
views.pScissors = nullptr; // dynamic
VkGraphicsPipelineCreateInfo pipe = { VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO };
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 = vkCreateGraphicsPipelines(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, VkShaderStageFlagBits 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);
OutputDebugStringUTF8("Messages:\n");
OutputDebugStringUTF8(error->c_str());
return VK_NULL_HANDLE;
} else {
VkShaderModule module;
if (vulkan->CreateShaderModule(spirv, &module)) {
return module;
} else {
return VK_NULL_HANDLE;
}
}
}
| Orphis/ppsspp | GPU/Vulkan/VulkanUtil.cpp | C++ | gpl-2.0 | 12,334 |
'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);
}
}); | wangguodong577/qqj-backend | admin/src/main/webapp/app/org/customer-list.js | JavaScript | gpl-2.0 | 1,606 |
.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;
}
| pedectrian/vital-currency-rates | moexrate/style.css | CSS | gpl-2.0 | 368 |
#!/bin/bash
for f in sml/*.sml; do { time ../bin/yasmin $f ; } 2>&1 | tee logs/$f.txt ; done
exit
| mwcoomber/Yasmin | examples/run_tests.sh | Shell | gpl-2.0 | 100 |
#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;
}
| Akagi201/akcode | c/ctest/test_lseek/lseek.c | C | gpl-2.0 | 773 |
<?php
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly.
/**
* Add meta boxes to selected post types
*/
function bpg_add_meta_box() {
$post_types = bpg_allowed_post_types();
if ( ! $post_types )
return;
foreach ( $post_types as $post_type => $status ) {
add_meta_box( 'bpg', apply_filters( 'bpg_meta_box_title', __( 'Photo Gallery', 'better-photo-gallery' ) ), 'bpg_metabox', $post_type, apply_filters( 'bpg_meta_box_context', 'normal' ), apply_filters( 'bpg_meta_box_priority', 'low' ) );
}
}
add_action( 'add_meta_boxes', 'bpg_add_meta_box' );
/**
* Render gallery metabox
*/
function bpg_metabox() {
global $post;
?>
<div id="gallery_images_container">
<ul class="gallery_images">
<?php
$image_gallery = get_post_meta( $post->ID, '_bpg', true );
$attachments = array_filter( explode( ',', $image_gallery ) );
if ( $attachments )
foreach ( $attachments as $attachment_id ) {
echo '<li class="image attachment details" data-attachment_id="' . $attachment_id . '"><div class="attachment-preview"><div class="thumbnail">
' . wp_get_attachment_image( $attachment_id, 'thumbnail' ) . '</div>
<a href="#" class="delete check" title="' . __( 'Remove image', 'better-photo-gallery' ) . '"><div class="media-modal-icon"></div></a>
</div></li>';
} ?>
</ul>
<input type="hidden" id="image_gallery" name="image_gallery" value="<?php echo esc_attr( $image_gallery ); ?>" />
<?php wp_nonce_field( 'bpg', 'bpg' ); ?>
</div>
<p class="add_gallery_images hide-if-no-js">
<a href="#"><?php _e( 'Add images to the gallery', 'better-photo-gallery' ); ?></a>
</p>
<?php
// options don't exist yet, set to checked by default
if ( ! get_post_meta( get_the_ID(), '_bpg_link_images', true ) )
$checked = ' checked="checked"';
else
$checked = bpg_has_linked_images() ? checked( get_post_meta( get_the_ID(), '_bpg_link_images', true ), 'on', false ) : '';
?>
<p>
<label for="bpg_link_images">
<input type="checkbox" id="bpg_link_images" value="on" name="bpg_link_images"<?php echo $checked; ?> /> <?php _e( 'Link images to larger sizes', 'better-photo-gallery' )?>
</label>
</p>
<?php
/**
* JavaScript Gallery
*/
?>
<script type="text/javascript">
jQuery(document).ready(function($){
// Uploading files
var image_gallery_frame;
var $image_gallery_ids = $('#image_gallery');
var $gallery_images = $('#gallery_images_container ul.gallery_images');
jQuery('.add_gallery_images').on( 'click', 'a', function( event ) {
var $el = $(this);
var attachment_ids = $image_gallery_ids.val();
event.preventDefault();
// If the media frame already exists, reopen it.
if ( image_gallery_frame ) {
image_gallery_frame.open();
return;
}
// Create the media frame.
image_gallery_frame = wp.media.frames.downloadable_file = wp.media({
// Set the title of the modal.
title: '<?php _e( 'Add Images to Gallery', 'better-photo-gallery' ); ?>',
button: {
text: '<?php _e( 'Add to gallery', 'better-photo-gallery' ); ?>',
},
multiple: true
});
// When an image is selected, run a callback.
image_gallery_frame.on( 'select', function() {
var selection = image_gallery_frame.state().get('selection');
selection.map( function( attachment ) {
attachment = attachment.toJSON();
if ( attachment.id ) {
attachment_ids = attachment_ids ? attachment_ids + "," + attachment.id : attachment.id;
$gallery_images.append('\
<li class="image attachment details" data-attachment_id="' + attachment.id + '">\
<div class="attachment-preview">\
<div class="thumbnail">\
<img src="' + attachment.url + '" />\
</div>\
<a href="#" class="delete check" title="<?php _e( 'Remove image', 'better-photo-gallery' ); ?>"><div class="media-modal-icon"></div></a>\
</div>\
</li>');
}
} );
$image_gallery_ids.val( attachment_ids );
});
// Finally, open the modal.
image_gallery_frame.open();
});
// Image ordering
$gallery_images.sortable({
items: 'li.image',
cursor: 'move',
scrollSensitivity:40,
forcePlaceholderSize: true,
forceHelperSize: false,
helper: 'clone',
opacity: 0.65,
placeholder: 'eig-metabox-sortable-placeholder',
start:function(event,ui){
ui.item.css('background-color','#f6f6f6');
},
stop:function(event,ui){
ui.item.removeAttr('style');
},
update: function(event, ui) {
var attachment_ids = '';
$('#gallery_images_container ul li.image').css('cursor','default').each(function() {
var attachment_id = jQuery(this).attr( 'data-attachment_id' );
attachment_ids = attachment_ids + attachment_id + ',';
});
$image_gallery_ids.val( attachment_ids );
}
});
// Remove images
$('#gallery_images_container').on( 'click', 'a.delete', function() {
$(this).closest('li.image').remove();
var attachment_ids = '';
$('#gallery_images_container ul li.image').css('cursor','default').each(function() {
var attachment_id = jQuery(this).attr( 'data-attachment_id' );
attachment_ids = attachment_ids + attachment_id + ',';
});
$image_gallery_ids.val( attachment_ids );
return false;
} );
});
</script>
<?php
}
/**
* Save function
*/
function bpg_save_post( $post_id ) {
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )
return;
$post_types = bpg_allowed_post_types();
// check user permissions
if ( isset( $_POST[ 'post_type' ] ) && !array_key_exists( $_POST[ 'post_type' ], $post_types ) ) {
if ( !current_user_can( 'edit_page', $post_id ) )
return;
}
else {
if ( !current_user_can( 'edit_post', $post_id ) )
return;
}
if ( ! isset( $_POST[ 'bpg' ] ) || ! wp_verify_nonce( $_POST[ 'bpg' ], 'bpg' ) )
return;
if ( isset( $_POST[ 'image_gallery' ] ) && !empty( $_POST[ 'image_gallery' ] ) ) {
$attachment_ids = sanitize_text_field( $_POST['image_gallery'] );
// turn comma separated values into array
$attachment_ids = explode( ',', $attachment_ids );
// clean the array
$attachment_ids = array_filter( $attachment_ids );
// return back to comma separated list with no trailing comma. This is common when deleting the images
$attachment_ids = implode( ',', $attachment_ids );
update_post_meta( $post_id, '_bpg', $attachment_ids );
} else {
delete_post_meta( $post_id, '_bpg' );
}
// link to larger images
if ( isset( $_POST[ 'bpg_link_images' ] ) )
update_post_meta( $post_id, '_bpg_link_images', $_POST[ 'bpg_link_images' ] );
else
update_post_meta( $post_id, '_bpg_link_images', 'off' );
do_action( 'bpg_save_post', $post_id );
}
add_action( 'save_post', 'bpg_save_post' ); | stevendejongnl/WordPress-Better-Photo-Gallery-Plugin | includes/metabox.php | PHP | gpl-2.0 | 7,550 |
# 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
PubkeyAuthentication yes
PermitRootLogin no (before activing this, verify if the user access works)
RSAAuthentication no
UsePAM no
KerberosAuthentication no
GSSAPIAuthentication no
PasswordAuthentication no
ChallengeResponseAuthentication 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
mysql_secure_installation
nano /etc/mysql/mariadb.cnf
```
[client-server]
port=mariadbport
[mysqld]
character_set_server=latin1
sql_mode=STRICT_ALL_TABLES
default-storage-engine=InnoDB
default_tmp_storage_engine=InnoDB
enforce_storage_engine=InnoDB
datadir=/var/lib/mysql/
temp-pool
loose-innodb_file_per_table
innodb_buffer_pool_instances=2
innodb_buffer_pool_size=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.%'
```
| Nick689/CustomPOS | Install server.md | Markdown | gpl-2.0 | 7,409 |
#!/usr/bin/env lua
-- -*-lua-*-
--
-- $Id: pm_led.lua $
--
-- Author: Markus Stenberg <markus [email protected]>
--
-- Copyright (c) 2013 cisco Systems, Inc.
--
-- 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:have_pd_prefix_in_skv()
-- this is a hack; but it can remain a hack too..
self:d('have_pd_prefix_in_skv')
-- 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:have_pd_prefix_in_skv()
self:set_state('pd', found)
local found = self:have_global_ipv6()
self:set_state('global', found)
end
| fingon/hnet-core | pm_led.lua | Lua | gpl-2.0 | 2,583 |
# -*- 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 clean_setup_provider(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, clean_setup_provider, 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['ext_management_systems']
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['ext_management_systems']
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 test_raw_metric_vm_cpu(metrics_collection, appliance, provider):
vm_name = provider.data['cap_and_util']['capandu_vm']
if provider.category == "infra":
query = query_metric_db(appliance, provider, 'cpu_usagemhz_rate_average',
vm_name)
average_rate = attrgetter('cpu_usagemhz_rate_average')
elif provider.category == "cloud":
query = query_metric_db(appliance, provider, 'cpu_usage_rate_average',
vm_name)
average_rate = attrgetter('cpu_usage_rate_average')
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 test_raw_metric_vm_memory(metrics_collection, appliance, provider):
vm_name = provider.data['cap_and_util']['capandu_vm']
if provider.type == 'azure':
query = query_metric_db(appliance, provider, 'mem_usage_absolute_average',
vm_name)
average_rate = attrgetter('mem_usage_absolute_average')
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 test_raw_metric_vm_network(metrics_collection, appliance, provider):
vm_name = provider.data['cap_and_util']['capandu_vm']
query = query_metric_db(appliance, provider, 'net_usage_rate_average',
vm_name)
for record in query:
if record.net_usage_rate_average is not None:
assert record.net_usage_rate_average > 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 test_raw_metric_vm_disk(metrics_collection, appliance, provider):
vm_name = provider.data['cap_and_util']['capandu_vm']
query = query_metric_db(appliance, provider, 'disk_usage_rate_average',
vm_name)
for record in query:
if record.disk_usage_rate_average is not None:
assert record.disk_usage_rate_average > 0, 'Zero VM Disk IO'
break
@pytest.mark.rhv2
@pytest.mark.uncollectif(
lambda provider: provider.one_of(CloudProvider))
def test_raw_metric_host_cpu(metrics_collection, appliance, provider):
host_name = get_host_name(provider)
query = query_metric_db(appliance, provider, 'cpu_usagemhz_rate_average',
host_name)
for record in query:
if record.cpu_usagemhz_rate_average is not None:
assert record.cpu_usagemhz_rate_average > 0, 'Zero Host CPU Usage'
break
@pytest.mark.rhv2
@pytest.mark.uncollectif(
lambda provider: provider.one_of(CloudProvider))
def test_raw_metric_host_memory(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 test_raw_metric_host_network(metrics_collection, appliance, provider):
host_name = get_host_name(provider)
query = query_metric_db(appliance, provider, 'net_usage_rate_average',
host_name)
for record in query:
if record.net_usage_rate_average is not None:
assert record.net_usage_rate_average > 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 test_raw_metric_host_disk(metrics_collection, appliance, provider):
host_name = get_host_name(provider)
query = query_metric_db(appliance, provider, 'disk_usage_rate_average',
host_name)
for record in query:
if record.disk_usage_rate_average is not None:
assert record.disk_usage_rate_average > 0, 'Zero Host Disk IO'
break
| anurag03/integration_tests | cfme/tests/candu/test_utilization_metrics.py | Python | gpl-2.0 | 8,879 |
#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; }
/************ bootstrap navigation -->
/*
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; }
/******** dropdown ****************/
#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; }
/************** start footer **************/
#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; }
#bottom_footer_address img {
float: left; }
#bottom_footer_address_1 {
padding-top: 20px; }
/********* media query *********/
@media all and (max-width: 990px) {
#bottom_footer_address img {
display: none; } }
@media all and (max-width: 768px) {
#nav-1 > li {
margin-left: 10px; } }
/********* social media *******/
#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; }
/********** footer **************/
#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; }
/**************** gallery **************/
#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 *********************/
.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:-webkit-linear-gradient(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;
}
#copyright {
line-height: 30px;
color:#fff;
font-size:14px;
}
b {
color:#c24818;
text-shadow:0 0 1px rgba(0,0,0,0.5);
} | namwoody/saazindia | wp-content/themes/saaz/css/style.css | CSS | gpl-2.0 | 6,749 |
/* _______ __ __ __ ______ __ __ _______ __ __
* / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\
* / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / /
* / / /__ / / // / // / // / / / ___ / // ___ / // /| ' / /
* / /_// /\ / /_// / // / // /_/_ / / // / // /\_/ / // / | / /
* /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ /
* \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/
*
* Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson
*
*
* Per Larsson a.k.a finalman
* Olof Naessén a.k.a jansem/yakslem
*
* Visit: http://guichan.sourceforge.net
*
* License: (BSD)
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name of Guichan nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef GCN_CONTRIB_ALLEGROTRUETYPEFONT_HPP
#define GCN_CONTRIB_ALLEGROTRUETYPEFONT_HPP
#include "guichan/font.hpp"
#include "guichan/platform.hpp"
namespace gcn
{
namespace contrib
{
struct GLYPH_FACE;
struct GLYPH_REND;
struct GLYPH_KEEP;
class Graphics;
/**
* True type font support using Allegro and GlyphKeeper.
*
* Note: GlyphKeeper must be compiled for allegro (define
* GLYPH_TARGET=GLYPH_TARGET_ALLEGRO) and must be
* initialized before using this class.
*
* There's only basic functionality implemented here, so
* you can add more and advanced functionality by deriving
* from this class.
*
* @author Tobias Scheuer.
*/
class GCN_EXTENSION_DECLSPEC AllegroGlyphKeeperFont : public Font
{
public:
/**
* Constructor.
*
* @param filename the filename of the True Type Font.
* @param size the size the font should be in.
*/
AllegroGlyphKeeperFont(const std::string& filename, int size);
/**
* Constructor.
*
* @param filename the filename of the True Type Font.
* @param width the width the font should be in.
* @param height the height the font should be in.
*/
AllegroGlyphKeeperFont(const std::string& filename, int width, int height);
/**
* Destructor.
*/
~AllegroGlyphKeeperFont();
// Inherited from Font
virtual int getWidth(const std::string& text) const;
virtual int getHeight() const;
virtual void drawString(Graphics* graphics, const std::string& text, int x, int y);
protected:
void load(const std::string& filename, int w, int h);
GLYPH_FACE* mFace;
GLYPH_REND* mRend;
GLYPH_KEEP* mKeeper;
};
}
}
#endif
| mekolat/elektrogamesvn | libraries/include/guichan/contrib/allegro/allegroglyphkeeperfont.hpp | C++ | gpl-2.0 | 4,411 |
/*
* resolve.c - resolve names and tags into specific devices
*
* Copyright (C) 2001, 2003 Theodore Ts'o.
* Copyright (C) 2001 Andreas Dilger
*
* %Begin-Header%
* This file may be redistributed under the terms of the
* GNU Lesser General Public License.
* %End-Header%
*/
#include <stdio.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <stdlib.h>
#include <fcntl.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include "blkidP.h"
#include "probe.h"
/*
* Find a tagname (e.g. LABEL or UUID) on a specific device.
*/
char *blkid_get_tag_value(blkid_cache cache, const char *tagname,
const char *devname)
{
blkid_tag found;
blkid_dev dev;
blkid_cache c = cache;
char *ret = NULL;
DBG(DEBUG_RESOLVE, printf("looking for %s on %s\n", tagname, devname));
if (!devname)
return NULL;
if (!cache) {
if (blkid_get_cache(&c, NULL) < 0)
return NULL;
}
if ((dev = blkid_get_dev(c, devname, BLKID_DEV_NORMAL)) &&
(found = blkid_find_tag_dev(dev, tagname)))
ret = blkid_strdup(found->bit_val);
if (!cache)
blkid_put_cache(c);
return ret;
}
/*
* Locate a device name from a token (NAME=value string), or (name, value)
* pair. In the case of a token, value is ignored. If the "token" is not
* of the form "NAME=value" and there is no value given, then it is assumed
* to be the actual devname and a copy is returned.
*/
char *blkid_get_devname(blkid_cache cache, const char *token,
const char *value)
{
blkid_dev dev;
blkid_cache c = cache;
char *t = 0, *v = 0;
char *ret = NULL;
if (!token)
return NULL;
if (!cache) {
if (blkid_get_cache(&c, NULL) < 0)
return NULL;
}
DBG(DEBUG_RESOLVE,
printf("looking for %s%s%s %s\n", token, value ? "=" : "",
value ? value : "", cache ? "in cache" : "from disk"));
if (!value) {
if (!strchr(token, '='))
return blkid_strdup(token);
blkid_parse_tag_string(token, &t, &v);
if (!t || !v)
goto errout;
token = t;
value = v;
}
dev = blkid_find_dev_with_tag(c, token, value);
if (!dev)
goto errout;
ret = blkid_strdup(blkid_dev_devname(dev));
errout:
if (t)
free(t);
if (v)
free(v);
if (!cache) {
blkid_put_cache(c);
}
return (ret);
}
#ifdef TEST_PROGRAM
int main(int argc, char **argv)
{
char *value;
blkid_cache cache;
blkid_debug_mask = DEBUG_ALL;
if (argc != 2 && argc != 3) {
fprintf(stderr, "Usage:\t%s tagname=value\n"
"\t%s tagname devname\n"
"Find which device holds a given token or\n"
"Find what the value of a tag is in a device\n",
argv[0], argv[0]);
exit(1);
}
if (blkid_get_cache(&cache, bb_dev_null) < 0) {
fprintf(stderr, "Couldn't get blkid cache\n");
exit(1);
}
if (argv[2]) {
value = blkid_get_tag_value(cache, argv[1], argv[2]);
printf("%s has tag %s=%s\n", argv[2], argv[1],
value ? value : "<missing>");
} else {
value = blkid_get_devname(cache, argv[1], NULL);
printf("%s has tag %s\n", value ? value : "<none>", argv[1]);
}
blkid_put_cache(cache);
return value ? 0 : 1;
}
#endif
| jgunthorpe/busybox | e2fsprogs/blkid/resolve.c | C | gpl-2.0 | 3,032 |
(function() {
tinymce.PluginManager.requireLangPack('kotofey_shortcodes');
tinymce.create('tinymce.plugins.kotofey_shortcodes', {
init : function(ed, url) {
ed.addCommand('mcekotofey_shortcodes', 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 : 'mcekotofey_shortcodes',
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);
})();
| nizaranand/New-Life-Office | dev/wp-content/themes/teardrop/extends/wysiwyg/editor.js | JavaScript | gpl-2.0 | 1,181 |
/*
* libata-scsi.c - helper library for ATA
*
* Maintained by: Jeff Garzik <[email protected]>
* Please ALWAYS copy [email protected]
* on emails.
*
* Copyright 2003-2004 Red Hat, Inc. All rights reserved.
* Copyright 2003-2004 Jeff Garzik
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* 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,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
*
*
* libata documentation is available via 'make {ps|pdf}docs',
* as Documentation/DocBook/libata.*
*
* Hardware documentation available from
* - http://www.t10.org/
* - http://www.t13.org/
*
*/
#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 RW_RECOVERY_MPAGE_LEN 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 def_rw_recovery_mpage[RW_RECOVERY_MPAGE_LEN] = {
RW_RECOVERY_MPAGE,
RW_RECOVERY_MPAGE_LEN - 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 scsi_transport_template ata_scsi_transport_template = {
.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(link_power_management_policy, S_IRUGO | S_IWUSR,
ata_scsi_lpm_show, ata_scsi_lpm_put);
EXPORT_SYMBOL_GPL(dev_attr_link_power_management_policy);
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 & ATA_PFLAG_EH_IN_PROGRESS &&
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;
ata_port_schedule_eh(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:
spin_unlock_irqrestore(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(dev_attr_unload_heads);
static void ata_scsi_set_sense(struct scsi_cmnd *cmd, u8 sk, u8 asc, u8 ascq)
{
cmd->result = (DRIVER_SENSE << 24) | SAM_STAT_CHECK_CONDITION;
scsi_build_sense_buffer(0, cmd->sense_buffer, sk, asc, ascq);
}
static ssize_t
ata_scsi_em_message_store(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
ata_scsi_em_message_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);
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,
ata_scsi_em_message_show, ata_scsi_em_message_store);
EXPORT_SYMBOL_GPL(dev_attr_em_message);
static ssize_t
ata_scsi_em_message_type_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);
return snprintf(buf, 23, "%d\n", ap->em_message_type);
}
DEVICE_ATTR(em_message_type, S_IRUGO,
ata_scsi_em_message_type_show, NULL);
EXPORT_SYMBOL_GPL(dev_attr_em_message_type);
static ssize_t
ata_scsi_activity_show(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 & ATA_FLAG_SW_ACTIVITY))
return ap->ops->sw_activity_show(atadev, buf);
return -EINVAL;
}
static ssize_t
ata_scsi_activity_store(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 & ATA_FLAG_SW_ACTIVITY)) {
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, ata_scsi_activity_show,
ata_scsi_activity_store);
EXPORT_SYMBOL_GPL(dev_attr_sw_activity);
struct device_attribute *ata_common_sdev_attrs[] = {
&dev_attr_unload_heads,
NULL
};
EXPORT_SYMBOL_GPL(ata_common_sdev_attrs);
static void ata_scsi_invalid_field(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;
}
/**
* ata_scsi_unlock_native_capacity - 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 ata_scsi_unlock_native_capacity(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 |= ATA_DFLAG_UNLOCK_HPA;
dev->link->eh_info.action |= ATA_EH_RESET;
ata_port_schedule_eh(ap);
}
spin_unlock_irqrestore(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(SCSI_SENSE_BUFFERSIZE, 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 scsi_ioctl_send_command() 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 & SAM_STAT_CHECK_CONDITION) {
struct scsi_sense_hdr sshdr;
scsi_normalize_sense(sensebuf, SCSI_SENSE_BUFFERSIZE,
&sshdr);
if (sshdr.sense_key == 0 &&
sshdr.asc == 0 && sshdr.ascq == 0)
cmd_result &= ~SAM_STAT_CHECK_CONDITION;
}
/* 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(SCSI_SENSE_BUFFERSIZE, 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 scsi_ioctl_send_command() 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 & SAM_STAT_CHECK_CONDITION) {
struct scsi_sense_hdr sshdr;
scsi_normalize_sense(sensebuf, SCSI_SENSE_BUFFERSIZE,
&sshdr);
if (sshdr.sense_key == 0 &&
sshdr.asc == 0 && sshdr.ascq == 0)
cmd_result &= ~SAM_STAT_CHECK_CONDITION;
}
/* 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);
spin_unlock_irqrestore(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 & ATA_PFLAG_PIO32CHANGE) {
if (val)
ap->pflags |= ATA_PFLAG_PIO32;
else
ap->pflags &= ~ATA_PFLAG_PIO32;
} else {
if (val != ata_ioc32(ap))
rc = -EINVAL;
}
spin_unlock_irqrestore(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 ata_qc_set_pc_nbytes(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;
}
/*
* ata_gen_passthru_sense - 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 ata_gen_passthru_sense(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, SCSI_SENSE_BUFFERSIZE);
cmd->result = (DRIVER_SENSE << 24) | SAM_STAT_CHECK_CONDITION;
/*
* 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, SCSI_SENSE_BUFFERSIZE);
cmd->result = (DRIVER_SENSE << 24) | SAM_STAT_CHECK_CONDITION;
/* 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 ata_scsi_sdev_config(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 */
blk_queue_max_hw_sectors(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 */
blk_queue_update_dma_pad(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);
blk_queue_update_dma_alignment(sdev->request_queue,
sdev->sector_size - 1);
if (dev->flags & ATA_DFLAG_AN)
set_bit(SDEV_EVT_MEDIA_CHANGE, 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);
scsi_adjust_queue_depth(sdev, MSG_SIMPLE_TAG, depth);
}
return 0;
}
/**
* ata_scsi_slave_config - 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 ata_scsi_slave_config(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;
ata_scsi_sdev_config(sdev);
if (dev)
rc = ata_scsi_dev_config(sdev, dev);
return rc;
}
/**
* ata_scsi_slave_destroy - 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 ata_scsi_slave_destroy(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;
ata_port_schedule_eh(ap);
}
spin_unlock_irqrestore(ap->lock, flags);
kfree(q->dma_drain_buffer);
q->dma_drain_buffer = NULL;
q->dma_drain_size = 0;
}
/**
* ata_scsi_change_queue_depth - 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 ata_scsi_change_queue_depth(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;
}
spin_unlock_irqrestore(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;
scsi_adjust_queue_depth(sdev, MSG_SIMPLE_TAG, queue_depth);
return queue_depth;
}
/**
* ata_scsi_start_stop_xlat - Translate SCSI START STOP UNIT command
* @qc: Storage for translated ATA taskfile
*
* Sets up an ATA taskfile to issue STANDBY (to stop) or READ VERIFY
* (to start). Perhaps these commands should be preceded by
* CHECK POWER MODE to see what power mode the device is already in.
* [See SAT revision 5 at www.t10.org]
*
* LOCKING:
* spin_lock_irqsave(host lock)
*
* RETURNS:
* Zero on success, non-zero on error.
*/
static unsigned int ata_scsi_start_stop_xlat(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 & ATA_FLAG_NO_POWEROFF_SPINDOWN) &&
system_state == SYSTEM_POWER_OFF)
goto skip;
if ((qc->ap->flags & ATA_FLAG_NO_HIBERNATE_SPINDOWN) &&
system_entering_hibernation())
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;
}
/**
* ata_scsi_verify_xlat - 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 ata_scsi_verify_xlat(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 ata_scsi_qc_complete(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)) {
ata_gen_passthru_sense(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, SCSI_ML_QUEUE_DEVICE_BUSY 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 = ata_scsi_qc_complete;
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 SCSI_MLQUEUE_DEVICE_BUSY;
else
return SCSI_MLQUEUE_HOST_BUSY;
}
/**
* 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);
spin_unlock_irqrestore(&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 sat_model_serial_desc_len = 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] = sat_model_serial_desc_len;
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 (ata_id_has_large_logical_sectors(args->id))
min_io_sectors = ata_id_logical_per_physical_sectors(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 = ata_id_rotation_rate(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 (ata_id_wcache_enabled(id))
buf[2] |= (1 << 2); /* write cache enable */
if (!ata_id_rahead_enabled(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);
}
/**
* ata_msense_rw_recovery - 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 ata_msense_rw_recovery(u8 *buf)
{
memcpy(buf, def_rw_recovery_mpage, sizeof(def_rw_recovery_mpage));
return sizeof(def_rw_recovery_mpage);
}
/*
* We can turn this into a real blacklist if it's needed, for now just
* blacklist any Maxtor BANC1G10 revision firmware
*/
static int ata_dev_supports_fua(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 */
}
/**
* ata_scsiop_mode_sense - 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 ata_scsiop_mode_sense(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 += ata_msense_rw_recovery(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 += ata_msense_rw_recovery(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 (ata_dev_supports_fua(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 (ata_id_has_zero_after_trim(args->id))
rbuf[14] |= 0x40; /* TPRZ */
}
}
return 0;
}
/**
* ata_scsiop_report_luns - 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 ata_scsiop_report_luns(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 atapi_sense_complete(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
*/
ata_gen_passthru_sense(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, SCSI_SENSE_BUFFERSIZE);
#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, SCSI_SENSE_BUFFERSIZE);
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] = SCSI_SENSE_BUFFERSIZE;
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 = SCSI_SENSE_BUFFERSIZE;
qc->tf.lbah = 0;
}
qc->nbytes = SCSI_SENSE_BUFFERSIZE;
qc->complete_fn = atapi_sense_complete;
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 & ATA_QCFLAG_SENSE_VALID))) {
if (!(qc->flags & ATA_QCFLAG_SENSE_VALID)) {
/* 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
*/
ata_gen_passthru_sense(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] == ALLOW_MEDIUM_REMOVAL && qc->dev->sdev)
qc->dev->sdev->locked = 0;
qc->scsicmd->result = SAM_STAT_CHECK_CONDITION;
qc->scsidone(cmd);
ata_qc_free(qc);
return;
}
/* successful completion or old EH failure path */
if (unlikely(err_mask & AC_ERR_DEV)) {
cmd->result = SAM_STAT_CHECK_CONDITION;
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
*/
ata_gen_passthru_sense(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;
ata_qc_set_pc_nbytes(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 < ata_link_max_devices(&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 ATA_CMD_READ_LONG_ONCE:
case ATA_CMD_WRITE_LONG:
case ATA_CMD_WRITE_LONG_ONCE:
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 |= ATA_QCFLAG_RESULT_TF | ATA_QCFLAG_QUIET;
/*
* Set transfer length.
*
* TODO: find out if we need to do more here to
* cover scatter/gather case.
*/
ata_qc_set_pc_nbytes(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 == ATA_CMD_SET_FEATURES &&
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 ata_scsi_write_same_xlat(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 = ata_set_lba_range_entries(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;
ata_qc_set_pc_nbytes(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 ata_scsi_write_same_xlat;
case SYNCHRONIZE_CACHE:
if (ata_try_flush_cache(dev))
return ata_scsi_flush_xlat;
break;
case VERIFY:
case VERIFY_16:
return ata_scsi_verify_xlat;
case ATA_12:
case ATA_16:
return ata_scsi_pass_thru;
case START_STOP:
return ata_scsi_start_stop_xlat;
}
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:
ata_scsi_invalid_field(cmd, done);
break;
case INQUIRY:
if (scsicmd[1] & 2) /* is CmdDt set? */
ata_scsi_invalid_field(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:
ata_scsi_invalid_field(cmd, done);
break;
}
break;
case MODE_SENSE:
case MODE_SENSE_10:
ata_scsi_rbuf_fill(&args, ata_scsiop_mode_sense);
break;
case MODE_SELECT: /* unconditionally return */
case MODE_SELECT_10: /* bad-field-in-cdb */
ata_scsi_invalid_field(cmd, done);
break;
case READ_CAPACITY:
ata_scsi_rbuf_fill(&args, ata_scsiop_read_cap);
break;
case SERVICE_ACTION_IN:
if ((scsicmd[1] & 0x1f) == SAI_READ_CAPACITY_16)
ata_scsi_rbuf_fill(&args, ata_scsiop_read_cap);
else
ata_scsi_invalid_field(cmd, done);
break;
case REPORT_LUNS:
ata_scsi_rbuf_fill(&args, ata_scsiop_report_luns);
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
ata_scsi_invalid_field(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 = &ata_scsi_transport_template;
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,
round_jiffies_relative(HZ));
}
/**
* ata_scsi_offline_dev - 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 ata_scsi_offline_dev(struct ata_device *dev)
{
if (dev->sdev) {
scsi_device_set_state(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 ata_scsi_offline_dev()
* regardless it wins or loses the race
* against this function.
*/
scsi_device_set_state(sdev, SDEV_OFFLINE);
} else {
WARN_ON(1);
sdev = NULL;
}
}
spin_unlock_irqrestore(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 ata_scsi_handle_link_detach(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;
spin_unlock_irqrestore(ap->lock, flags);
ata_scsi_remove_dev(dev);
}
}
/**
* ata_scsi_media_change_notify - 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 ata_scsi_media_change_notify(struct ata_device *dev)
{
if (dev->sdev)
sdev_evt_send_simple(dev->sdev, SDEV_EVT_MEDIA_CHANGE,
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.
*/
ata_scsi_handle_link_detach(&ap->link);
if (ap->pmp_link)
for (i = 0; i < SATA_PMP_MAX_PORTS; i++)
ata_scsi_handle_link_detach(&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) {
ata_port_schedule_eh(ap);
spin_unlock_irqrestore(ap->lock, flags);
ata_port_wait_eh(ap);
} else
spin_unlock_irqrestore(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;
spin_unlock_irqrestore(ap->lock, flags);
scsi_rescan_device(&(sdev->sdev_gendev));
scsi_device_put(sdev);
spin_lock_irqsave(ap->lock, flags);
}
}
spin_unlock_irqrestore(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);
/**
* ata_sas_port_destroy - Destroy a SATA port allocated by ata_sas_port_alloc
* @ap: SATA port to destroy
*
*/
void ata_sas_port_destroy(struct ata_port *ap)
{
if (ap->ops->port_stop)
ap->ops->port_stop(ap);
kfree(ap);
}
EXPORT_SYMBOL_GPL(ata_sas_port_destroy);
/**
* ata_sas_slave_configure - Default slave_config routine for libata devices
* @sdev: SCSI device to configure
* @ap: ATA port to which SCSI device is attached
*
* RETURNS:
* Zero.
*/
int ata_sas_slave_configure(struct scsi_device *sdev, struct ata_port *ap)
{
ata_scsi_sdev_config(sdev);
ata_scsi_dev_config(sdev, ap->link.device);
return 0;
}
EXPORT_SYMBOL_GPL(ata_sas_slave_configure);
/**
* 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);
| Rashed97/android_kernel_sony_marvell | drivers/ata/libata-scsi.c | C | gpl-2.0 | 100,260 |
/* gameplaySP
*
* Copyright (C) 2006 Exophase <[email protected]>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#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 *current_screen_texture = (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 render_scanline_conditional_tile(u32 start, u32 end, u16 *scanline,
u32 enable_flags, u32 dispcnt, u32 bldcnt, tile_layer_render_struct
*layer_renderers);
void render_scanline_conditional_bitmap(u32 start, u32 end, u16 *scanline,
u32 enable_flags, u32 dispcnt, u32 bldcnt, bitmap_layer_render_struct
*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 tile_lookup_palette_full(palette, source) \
current_pixel = palette[source]; \
convert_palette(current_pixel) \
#define tile_lookup_palette(palette, source) \
current_pixel = palette[source]; \
#define tile_expand_base_normal(index) \
tile_lookup_palette(palette, current_pixel); \
dest_ptr[index] = current_pixel \
#define tile_expand_transparent_normal(index) \
tile_expand_base_normal(index) \
#define tile_expand_copy(index) \
dest_ptr[index] = copy_ptr[index] \
#define advance_dest_ptr_base(delta) \
dest_ptr += delta \
#define advance_dest_ptr_transparent(delta) \
advance_dest_ptr_base(delta) \
#define advance_dest_ptr_copy(delta) \
advance_dest_ptr_base(delta); \
copy_ptr += delta \
#define color_combine_mask_a(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) \
(color_combine_mask_a(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 tile_expand_base_alpha(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 tile_expand_transparent_alpha(index) \
dest_ptr[index] = (dest_ptr[index] << 16) | current_pixel | pixel_combine \
// OBJ should only shift if the top isn't already OBJ
#define tile_expand_transparent_alpha_obj(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 tile_expand_base_color16(index) \
dest_ptr[index] = current_pixel | pixel_combine \
#define tile_expand_transparent_color16(index) \
tile_expand_base_color16(index) \
#define tile_expand_base_color32(index) \
tile_expand_base_color16(index) \
#define tile_expand_transparent_color32(index) \
tile_expand_base_color16(index) \
// Operations for isolation 8bpp pixels within 32bpp pixel blocks.
#define tile_8bpp_pixel_op_mask(op_param) \
current_pixel = current_pixels & 0xFF \
#define tile_8bpp_pixel_op_shift_mask(shift) \
current_pixel = (current_pixels >> shift) & 0xFF \
#define tile_8bpp_pixel_op_shift(shift) \
current_pixel = current_pixels >> shift \
#define tile_8bpp_pixel_op_none(shift) \
// Base should always draw raw in 8bpp mode; color 0 will be drawn where
// color 0 is.
#define tile_8bpp_draw_base_normal(index) \
tile_expand_base_normal(index) \
#define tile_8bpp_draw_base_alpha(index) \
if(current_pixel) \
{ \
tile_expand_base_alpha(index); \
} \
else \
{ \
tile_expand_base_bg(index); \
} \
#define tile_8bpp_draw_base_color16(index) \
tile_8bpp_draw_base_alpha(index) \
#define tile_8bpp_draw_base_color32(index) \
tile_8bpp_draw_base_alpha(index) \
#define tile_8bpp_draw_base(index, op, op_param, alpha_op) \
tile_8bpp_pixel_op_##op(op_param); \
tile_8bpp_draw_base_##alpha_op(index) \
// Transparent (layered) writes should only replace what is there if the
// pixel is not transparent (zero)
#define tile_8bpp_draw_transparent(index, op, op_param, alpha_op) \
tile_8bpp_pixel_op_##op(op_param); \
if(current_pixel) \
{ \
tile_expand_transparent_##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 tile_8bpp_draw_four_noflip(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 tile_8bpp_draw_four_flip(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 tile_8bpp_draw_four_base(index, alpha_op, flip_op) \
tile_8bpp_draw_four_##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 tile_8bpp_draw_four_transparent(index, alpha_op, flip_op) \
if(current_pixels != 0) \
{ \
tile_8bpp_draw_four_##flip_op(index, transparent, alpha_op); \
} \
#define tile_8bpp_draw_four_copy(index, alpha_op, flip_op) \
if(current_pixels != 0) \
{ \
tile_8bpp_draw_four_##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 partial_tile_right_noflip_8bpp(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)); \
tile_8bpp_draw_four_##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 partial_tile_mid_noflip_8bpp(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 partial_tile_left_noflip_8bpp(combine_op, alpha_op) \
if(partial_tile_run >= 4) \
{ \
current_pixels = *((u32 *)tile_ptr); \
tile_8bpp_draw_four_##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); \
tile_8bpp_draw_four_##combine_op(0, alpha_op, noflip); \
current_pixels = *((u32 *)(tile_ptr + 4)); \
tile_8bpp_draw_four_##combine_op(4, alpha_op, noflip) \
// Like the above versions but draws flipped tiles.
#define partial_tile_flip_8bpp(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 partial_tile_right_flip_8bpp(combine_op, alpha_op) \
if(partial_tile_offset >= 4) \
{ \
current_pixels = *((u32 *)tile_ptr) << ((partial_tile_offset - 4) * 8); \
partial_tile_flip_8bpp(combine_op, alpha_op); \
} \
else \
{ \
partial_tile_run -= 4; \
current_pixels = *((u32 *)(tile_ptr + 4)) << \
((partial_tile_offset - 4) * 8); \
partial_tile_flip_8bpp(combine_op, alpha_op); \
current_pixels = *((u32 *)tile_ptr); \
tile_8bpp_draw_four_##combine_op(0, alpha_op, flip); \
advance_dest_ptr_##combine_op(4); \
} \
#define partial_tile_mid_flip_8bpp(combine_op, alpha_op) \
if(partial_tile_offset >= 4) \
{ \
current_pixels = *((u32 *)tile_ptr) << ((partial_tile_offset - 4) * 8); \
partial_tile_flip_8bpp(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; \
partial_tile_flip_8bpp(combine_op, alpha_op); \
partial_tile_run = old_run - partial_tile_run; \
current_pixels = *((u32 *)(tile_ptr)); \
partial_tile_flip_8bpp(combine_op, alpha_op); \
} \
else \
{ \
partial_tile_flip_8bpp(combine_op, alpha_op); \
} \
} \
#define partial_tile_left_flip_8bpp(combine_op, alpha_op) \
if(partial_tile_run >= 4) \
{ \
current_pixels = *((u32 *)(tile_ptr + 4)); \
tile_8bpp_draw_four_##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)); \
partial_tile_flip_8bpp(combine_op, alpha_op) \
#define tile_flip_8bpp(combine_op, alpha_op) \
current_pixels = *((u32 *)(tile_ptr + 4)); \
tile_8bpp_draw_four_##combine_op(0, alpha_op, flip); \
current_pixels = *((u32 *)tile_ptr); \
tile_8bpp_draw_four_##combine_op(4, alpha_op, flip) \
// Operations for isolating 4bpp tiles in a 32bit block
#define tile_4bpp_pixel_op_mask(op_param) \
current_pixel = current_pixels & 0x0F \
#define tile_4bpp_pixel_op_shift_mask(shift) \
current_pixel = (current_pixels >> shift) & 0x0F \
#define tile_4bpp_pixel_op_shift(shift) \
current_pixel = current_pixels >> shift \
#define tile_4bpp_pixel_op_none(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 tile_4bpp_draw_base_normal(index) \
if(current_pixel) \
{ \
current_pixel |= current_palette; \
tile_expand_base_normal(index); \
} \
else \
{ \
tile_expand_base_normal(index); \
} \
#define tile_4bpp_draw_base_alpha(index) \
if(current_pixel) \
{ \
current_pixel |= current_palette; \
tile_expand_base_alpha(index); \
} \
else \
{ \
tile_expand_base_bg(index); \
} \
#define tile_4bpp_draw_base_color16(index) \
tile_4bpp_draw_base_alpha(index) \
#define tile_4bpp_draw_base_color32(index) \
tile_4bpp_draw_base_alpha(index) \
#define tile_4bpp_draw_base(index, op, op_param, alpha_op) \
tile_4bpp_pixel_op_##op(op_param); \
tile_4bpp_draw_base_##alpha_op(index) \
// Draws a single 4bpp pixel as layered, if not transparent.
#define tile_4bpp_draw_transparent(index, op, op_param, alpha_op) \
tile_4bpp_pixel_op_##op(op_param); \
if(current_pixel) \
{ \
current_pixel |= current_palette; \
tile_expand_transparent_##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 tile_4bpp_draw_eight_base_zero(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 tile_4bpp_draw_eight_base_zero_alpha() \
tile_4bpp_draw_eight_base_zero(bg_combine) \
#define tile_4bpp_draw_eight_base_zero_color16() \
tile_4bpp_draw_eight_base_zero_alpha() \
#define tile_4bpp_draw_eight_base_zero_color32() \
tile_4bpp_draw_eight_base_zero_alpha() \
// Draws eight background pixels for the normal renderer, just a bunch of
// zeros.
#define tile_4bpp_draw_eight_base_zero_normal() \
current_pixel = palette[0]; \
tile_4bpp_draw_eight_base_zero(current_pixel) \
// Draws eight 4bpp pixels.
#define tile_4bpp_draw_eight_noflip(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 tile_4bpp_draw_eight_flip(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 tile_4bpp_draw_eight_base(alpha_op, flip_op) \
if(current_pixels != 0) \
{ \
tile_4bpp_draw_eight_##flip_op(base, alpha_op); \
} \
else \
{ \
tile_4bpp_draw_eight_base_zero_##alpha_op(); \
} \
// Draws eight 4bpp pixels in transparent (layered) mode, checks if all are
// zero and if so draws nothing.
#define tile_4bpp_draw_eight_transparent(alpha_op, flip_op) \
if(current_pixels != 0) \
{ \
tile_4bpp_draw_eight_##flip_op(transparent, alpha_op); \
} \
#define tile_4bpp_draw_eight_copy(alpha_op, flip_op) \
if(current_pixels != 0) \
{ \
tile_4bpp_draw_eight_##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 partial_tile_right_noflip_4bpp(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 partial_tile_mid_noflip_4bpp(combine_op, alpha_op) \
partial_tile_right_noflip_4bpp(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 partial_tile_left_noflip_4bpp(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); \
tile_4bpp_draw_eight_##combine_op(alpha_op, noflip) \
// Like the above, but draws flipped tiles.
#define partial_tile_flip_4bpp(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 partial_tile_right_flip_4bpp(combine_op, alpha_op) \
current_pixels = *((u32 *)tile_ptr) << (partial_tile_offset * 4); \
partial_tile_flip_4bpp(combine_op, alpha_op) \
#define partial_tile_mid_flip_4bpp(combine_op, alpha_op) \
partial_tile_right_flip_4bpp(combine_op, alpha_op) \
#define partial_tile_left_flip_4bpp(combine_op, alpha_op) \
current_pixels = *((u32 *)tile_ptr); \
partial_tile_flip_4bpp(combine_op, alpha_op) \
#define tile_flip_4bpp(combine_op, alpha_op) \
current_pixels = *((u32 *)tile_ptr); \
tile_4bpp_draw_eight_##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 partial_tile_right_map(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 partial_tile_mid_map(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 partial_tile_left_map(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 obj_advance_noflip_4bpp() \
tile_ptr += 32 \
// Advances a non-flipped 8bpp obj to the next tile.
#define obj_advance_noflip_8bpp() \
tile_ptr += 64 \
// Advances a flipped 4bpp obj to the next tile.
#define obj_advance_flip_4bpp() \
tile_ptr -= 32 \
// Advances a flipped 8bpp obj to the next tile.
#define obj_advance_flip_8bpp() \
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 partial_tile_right_obj(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 partial_tile_mid_obj(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 partial_tile_left_obj(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 tile_extra_variables_8bpp() \
#define tile_extra_variables_4bpp() \
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 vertical_pixel_offset = (vertical_offset % 8) * \
tile_width_##color_depth; \
u32 vertical_pixel_flip = \
((tile_size_##color_depth - tile_width_##color_depth) - \
vertical_pixel_offset) - vertical_pixel_offset; \
tile_extra_variables_##color_depth(); \
u8 *tile_base = vram + (((bg_control >> 2) & 0x03) * (1024 * 16)) + \
vertical_pixel_offset; \
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; \
partial_tile_mid_map(combine_op, color_depth, alpha_op); \
return; \
} \
else \
{ \
end -= partial_tile_run; \
partial_tile_right_map(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) \
{ \
partial_tile_left_map(combine_op, color_depth, alpha_op); \
} \
} \
else \
{ \
if(partial_tile_offset) \
{ \
partial_tile_run = 8 - partial_tile_offset; \
partial_tile_right_map(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) \
{ \
partial_tile_left_map(combine_op, color_depth, alpha_op); \
} \
} \
} \
#define render_scanline_dest_normal u16
#define render_scanline_dest_alpha u32
#define render_scanline_dest_alpha_obj u32
#define render_scanline_dest_color16 u16
#define render_scanline_dest_color32 u32
#define render_scanline_dest_partial_alpha u32
#define render_scanline_dest_copy_tile u16
#define render_scanline_dest_copy_bitmap 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 render_scanline_skip_alpha(bg_type, combine_op) \
if((pixel_combine & 0x00000200) == 0) \
{ \
render_scanline_##bg_type##_##combine_op##_color32(layer, \
start, end, scanline); \
return; \
} \
#define render_scanline_extra_variables_base_normal(bg_type) \
#define render_scanline_extra_variables_transparent_normal(bg_type) \
#define render_scanline_extra_variables_base_alpha(bg_type) \
u32 bg_combine = color_combine_mask(5); \
u32 pixel_combine = color_combine_mask(layer) | (bg_combine << 16); \
render_scanline_skip_alpha(bg_type, base) \
#define render_scanline_extra_variables_base_color() \
u32 bg_combine = color_combine_mask(5); \
u32 pixel_combine = color_combine_mask(layer) \
#define render_scanline_extra_variables_transparent_alpha(bg_type) \
u32 pixel_combine = color_combine_mask(layer); \
render_scanline_skip_alpha(bg_type, transparent) \
#define render_scanline_extra_variables_transparent_color() \
u32 pixel_combine = color_combine_mask(layer) \
#define render_scanline_extra_variables_base_color16(bg_type) \
render_scanline_extra_variables_base_color() \
#define render_scanline_extra_variables_transparent_color16(bg_type) \
render_scanline_extra_variables_transparent_color() \
#define render_scanline_extra_variables_base_color32(bg_type) \
render_scanline_extra_variables_base_color() \
#define render_scanline_extra_variables_transparent_color32(bg_type) \
render_scanline_extra_variables_transparent_color() \
// Map widths and heights
u32 map_widths[] = { 256, 512, 256, 512 };
u32 map_heights[] = { 256, 256, 512, 512 };
// Build text scanline rendering functions.
#define render_scanline_text_builder(combine_op, alpha_op) \
void render_scanline_text_##combine_op##_##alpha_op(u32 layer, \
u32 start, u32 end, void *scanline) \
{ \
render_scanline_extra_variables_##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 = palette_ram_converted; \
u32 i; \
render_scanline_dest_##alpha_op *dest_ptr = \
((render_scanline_dest_##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); \
} \
} \
render_scanline_text_builder(base, normal);
render_scanline_text_builder(transparent, normal);
render_scanline_text_builder(base, color16);
render_scanline_text_builder(transparent, color16);
render_scanline_text_builder(base, color32);
render_scanline_text_builder(transparent, color32);
render_scanline_text_builder(base, alpha);
render_scanline_text_builder(transparent, alpha);
s32 affine_reference_x[2];
s32 affine_reference_y[2];
#define affine_render_bg_pixel_normal() \
current_pixel = palette_ram_converted[0] \
#define affine_render_bg_pixel_alpha() \
current_pixel = bg_combine \
#define affine_render_bg_pixel_color16() \
affine_render_bg_pixel_alpha() \
#define affine_render_bg_pixel_color32() \
affine_render_bg_pixel_alpha() \
#define affine_render_bg_pixel_base(alpha_op) \
affine_render_bg_pixel_##alpha_op() \
#define affine_render_bg_pixel_transparent(alpha_op) \
#define affine_render_bg_pixel_copy(alpha_op) \
#define affine_render_bg_base(alpha_op) \
dest_ptr[0] = current_pixel
#define affine_render_bg_transparent(alpha_op) \
#define affine_render_bg_copy(alpha_op) \
#define affine_render_bg_remainder_base(alpha_op) \
affine_render_bg_pixel_##alpha_op(); \
for(; i < end; i++) \
{ \
affine_render_bg_base(alpha_op); \
advance_dest_ptr_base(1); \
} \
#define affine_render_bg_remainder_transparent(alpha_op) \
#define affine_render_bg_remainder_copy(alpha_op) \
#define affine_render_next(combine_op) \
source_x += dx; \
source_y += dy; \
advance_dest_ptr_##combine_op(1) \
#define affine_render_scale_offset() \
tile_base += ((pixel_y % 8) * 8); \
map_base += (pixel_y / 8) << map_pitch \
#define affine_render_scale_pixel(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; \
affine_render_bg_pixel_##combine_op(alpha_op); \
if((u32)pixel_y < (u32)width_height) \
{ \
affine_render_scale_offset(); \
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; \
\
affine_render_scale_pixel(combine_op, alpha_op); \
} \
} \
affine_render_bg_remainder_##combine_op(alpha_op); \
} \
#define affine_render_scale_wrap(combine_op, alpha_op) \
{ \
u32 wrap_mask = width_height - 1; \
pixel_y = (source_y >> 8) & wrap_mask; \
if((u32)pixel_y < (u32)width_height) \
{ \
affine_render_scale_offset(); \
for(i = 0; i < end; i++) \
{ \
pixel_x = (source_x >> 8) & wrap_mask; \
affine_render_scale_pixel(combine_op, alpha_op); \
} \
} \
} \
#define affine_render_rotate_pixel(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 affine_render_rotate(combine_op, alpha_op) \
{ \
affine_render_bg_pixel_##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)) \
{ \
affine_render_bg_remainder_##combine_op(alpha_op); \
break; \
} \
\
affine_render_rotate_pixel(combine_op, alpha_op); \
} \
} \
#define affine_render_rotate_wrap(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; \
\
affine_render_rotate_pixel(combine_op, alpha_op); \
} \
} \
// Build affine background renderers.
#define render_scanline_affine_builder(combine_op, alpha_op) \
void render_scanline_affine_##combine_op##_##alpha_op(u32 layer, \
u32 start, u32 end, void *scanline) \
{ \
render_scanline_extra_variables_##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 = palette_ram_converted; \
u32 map_offset, last_map_offset = (u32)-1; \
u32 i; \
render_scanline_dest_##alpha_op *dest_ptr = \
((render_scanline_dest_##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: \
affine_render_rotate(combine_op, alpha_op); \
break; \
\
case 0x02: \
affine_render_scale_wrap(combine_op, alpha_op); \
break; \
\
case 0x03: \
affine_render_rotate_wrap(combine_op, alpha_op); \
break; \
} \
} \
render_scanline_affine_builder(base, normal);
render_scanline_affine_builder(transparent, normal);
render_scanline_affine_builder(base, color16);
render_scanline_affine_builder(transparent, color16);
render_scanline_affine_builder(base, color32);
render_scanline_affine_builder(transparent, color32);
render_scanline_affine_builder(base, alpha);
render_scanline_affine_builder(transparent, alpha);
#define bitmap_render_pixel_mode3(alpha_op) \
convert_palette(current_pixel); \
*dest_ptr = current_pixel \
#define bitmap_render_pixel_mode4(alpha_op) \
tile_expand_base_##alpha_op(0) \
#define bitmap_render_pixel_mode5(alpha_op) \
bitmap_render_pixel_mode3(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; \
bitmap_render_pixel_##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]; \
bitmap_render_pixel_##type(alpha_op); \
\
source_x += dx; \
dest_ptr++; \
} \
} \
} \
} \
#define bitmap_render_rotate(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)]; \
bitmap_render_pixel_##type(alpha_op); \
\
source_x += dx; \
source_y += dy; \
dest_ptr++; \
} \
#define render_scanline_vram_setup_mode3() \
u16 *src_ptr = (u16 *)vram \
#define render_scanline_vram_setup_mode4() \
u16 *palette = palette_ram_converted; \
u8 *src_ptr; \
if(io_registers[REG_DISPCNT] & 0x10) \
src_ptr = vram + 0xA000; \
else \
src_ptr = vram \
#define render_scanline_vram_setup_mode5() \
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 render_scanline_bitmap_builder(type, alpha_op, width, height) \
void render_scanline_bitmap_##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; \
\
render_scanline_dest_##alpha_op *dest_ptr = \
((render_scanline_dest_##alpha_op *)scanline) + start; \
render_scanline_vram_setup_##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 \
{ \
bitmap_render_rotate(type, alpha_op, width, height); \
} \
} \
render_scanline_bitmap_builder(mode3, normal, 240, 160);
render_scanline_bitmap_builder(mode4, normal, 240, 160);
render_scanline_bitmap_builder(mode5, normal, 160, 128);
// Fill in the renderers for a layer based on the mode type,
#define tile_layer_render_functions(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##_transparent_color16, \
render_scanline_##type##_base_color32, \
render_scanline_##type##_transparent_color32 \
} \
// Use if a layer is unsupported for that mode.
#define tile_layer_render_null() \
{ \
NULL, NULL, NULL, NULL \
} \
#define bitmap_layer_render_functions(type) \
{ \
render_scanline_bitmap_##type##_normal \
} \
// Structs containing functions to render the layers for each mode, for
// each render type.
tile_layer_render_struct tile_mode_renderers[3][4] =
{
{
tile_layer_render_functions(text), tile_layer_render_functions(text),
tile_layer_render_functions(text), tile_layer_render_functions(text)
},
{
tile_layer_render_functions(text), tile_layer_render_functions(text),
tile_layer_render_functions(affine), tile_layer_render_functions(text)
},
{
tile_layer_render_functions(text), tile_layer_render_functions(text),
tile_layer_render_functions(affine), tile_layer_render_functions(affine)
}
};
bitmap_layer_render_struct bitmap_mode_renderers[3] =
{
bitmap_layer_render_functions(mode3),
bitmap_layer_render_functions(mode4),
bitmap_layer_render_functions(mode5)
};
#define render_scanline_layer_functions_tile() \
tile_layer_render_struct *layer_renderers = \
tile_mode_renderers[dispcnt & 0x07] \
#define render_scanline_layer_functions_bitmap() \
bitmap_layer_render_struct *layer_renderers = \
bitmap_mode_renderers + ((dispcnt & 0x07) - 3) \
// Adjust a flipped obj's starting position
#define obj_tile_offset_noflip(color_depth) \
#define obj_tile_offset_flip(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 obj_tile_right_offset_noflip(color_depth) \
tile_ptr += (partial_tile_offset / 8) * tile_size_##color_depth \
#define obj_tile_right_offset_flip(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 obj_get_palette_4bpp() \
current_palette = (obj_attribute_2 >> 8) & 0xF0 \
#define obj_get_palette_8bpp() \
// 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; \
obj_tile_right_offset_##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; \
partial_tile_mid_obj(combine_op, color_depth, alpha_op, \
flip_op); \
} \
continue; \
} \
else \
{ \
pixel_run -= partial_tile_run; \
partial_tile_right_obj(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) \
{ \
partial_tile_left_obj(combine_op, color_depth, alpha_op, \
flip_op); \
} \
} \
else \
{ \
partial_tile_offset = start - obj_x; \
obj_tile_right_offset_##flip_op(color_depth); \
partial_tile_offset %= 8; \
if(partial_tile_offset) \
{ \
partial_tile_run = 8 - partial_tile_offset; \
partial_tile_right_obj(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) \
{ \
partial_tile_left_obj(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 obj_render_scale_pixel_4bpp(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 obj_render_scale_pixel_8bpp(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; \
obj_render_scale_pixel_##color_depth(combine_op, alpha_op); \
\
source_x += dx; \
advance_dest_ptr_##combine_op(1); \
} \
} \
} \
#define obj_rotate_offset_1D(color_depth) \
obj_tile_pitch = (max_x / 8) * tile_size_##color_depth \
#define obj_rotate_offset_2D(color_depth) \
obj_tile_pitch = 1024 \
#define obj_render_rotate_pixel_4bpp(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 obj_render_rotate_pixel_8bpp(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); \
obj_render_rotate_pixel_##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 render_scanline_obj_extra_variables_normal(map_space) \
#define render_scanline_obj_extra_variables_color() \
u32 dest; \
u32 pixel_combine = color_combine_mask(4) | (1 << 8) \
#define render_scanline_obj_extra_variables_alpha_obj(map_space) \
render_scanline_obj_extra_variables_color(); \
if((pixel_combine & 0x00000200) == 0) \
{ \
render_scanline_obj_color32_##map_space(priority, start, end, scanline); \
return; \
} \
#define render_scanline_obj_extra_variables_color16(map_space) \
render_scanline_obj_extra_variables_color() \
#define render_scanline_obj_extra_variables_color32(map_space) \
render_scanline_obj_extra_variables_color() \
#define render_scanline_obj_extra_variables_partial_alpha(map_space) \
render_scanline_obj_extra_variables_color(); \
u32 base_pixel_combine = pixel_combine \
#define render_scanline_obj_extra_variables_copy(type) \
u32 bldcnt = io_registers[REG_BLDCNT]; \
u32 dispcnt = io_registers[REG_DISPCNT]; \
u32 obj_enable = io_registers[REG_WINOUT] >> 8; \
render_scanline_layer_functions_##type(); \
u32 copy_start, copy_end; \
u16 copy_buffer[240]; \
u16 *copy_ptr \
#define render_scanline_obj_extra_variables_copy_tile(map_space) \
render_scanline_obj_extra_variables_copy(tile) \
#define render_scanline_obj_extra_variables_copy_bitmap(map_space) \
render_scanline_obj_extra_variables_copy(bitmap) \
#define render_scanline_obj_main(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 render_scanline_obj_no_partial_alpha(combine_op, alpha_op, map_space) \
render_scanline_obj_main(combine_op, alpha_op, map_space) \
#define render_scanline_obj_partial_alpha(combine_op, alpha_op, map_space) \
if((obj_attribute_0 >> 10) & 0x03) \
{ \
pixel_combine = 0x00000300; \
render_scanline_obj_main(combine_op, alpha_obj, map_space); \
} \
else \
{ \
pixel_combine = base_pixel_combine; \
render_scanline_obj_main(combine_op, color32, map_space); \
} \
#define render_scanline_obj_prologue_transparent(alpha_op) \
#define render_scanline_obj_prologue_copy_body(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)) \
{ \
render_scanline_conditional_##type(copy_start, copy_end, copy_buffer, \
obj_enable, dispcnt, bldcnt, layer_renderers); \
copy_ptr = copy_buffer + copy_start; \
} \
else \
{ \
continue; \
} \
#define render_scanline_obj_prologue_copy_tile() \
render_scanline_obj_prologue_copy_body(tile) \
#define render_scanline_obj_prologue_copy_bitmap() \
render_scanline_obj_prologue_copy_body(bitmap) \
#define render_scanline_obj_prologue_copy(alpha_op) \
render_scanline_obj_prologue_##alpha_op() \
#define render_scanline_obj_builder(combine_op, alpha_op, map_space, \
partial_alpha_op) \
void render_scanline_obj_##alpha_op##_##map_space(u32 priority, \
u32 start, u32 end, render_scanline_dest_##alpha_op *scanline) \
{ \
render_scanline_obj_extra_variables_##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 = palette_ram_converted + 256; \
render_scanline_dest_##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]; \
\
render_scanline_obj_prologue_##combine_op(alpha_op); \
\
obj_y = obj_attribute_0 & 0xFF; \
\
if(obj_y > 160) \
obj_y -= 256; \
\
obj_height = obj_height_table[obj_size]; \
render_scanline_obj_##partial_alpha_op(combine_op, alpha_op, map_space); \
} \
} \
render_scanline_obj_builder(transparent, normal, 1D, no_partial_alpha);
render_scanline_obj_builder(transparent, normal, 2D, no_partial_alpha);
render_scanline_obj_builder(transparent, color16, 1D, no_partial_alpha);
render_scanline_obj_builder(transparent, color16, 2D, no_partial_alpha);
render_scanline_obj_builder(transparent, color32, 1D, no_partial_alpha);
render_scanline_obj_builder(transparent, color32, 2D, no_partial_alpha);
render_scanline_obj_builder(transparent, alpha_obj, 1D, no_partial_alpha);
render_scanline_obj_builder(transparent, alpha_obj, 2D, no_partial_alpha);
render_scanline_obj_builder(transparent, partial_alpha, 1D, partial_alpha);
render_scanline_obj_builder(transparent, partial_alpha, 2D, partial_alpha);
render_scanline_obj_builder(copy, copy_tile, 1D, no_partial_alpha);
render_scanline_obj_builder(copy, copy_tile, 2D, no_partial_alpha);
render_scanline_obj_builder(copy, copy_bitmap, 1D, no_partial_alpha);
render_scanline_obj_builder(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 = palette_ram_converted + 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 fill_line_color_normal() \
color = palette_ram_converted[color] \
#define fill_line_color_alpha() \
#define fill_line_color_color16() \
#define fill_line_color_color32() \
#define fill_line_builder(type) \
void fill_line_##type(u16 color, render_scanline_dest_##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 = palette_ram_converted[(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 blend_saturate_pixel() \
pixel_bottom = palette_ram_converted[(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 effect_condition_alpha \
((pixel_pair & 0x04000200) == 0x04000200) \
#define effect_condition_fade(pixel_source) \
((pixel_source & 0x00000200) == 0x00000200) \
#define expand_pixel_no_dest(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 = palette_ram_converted[pixel_source & 0x1FF]; \
expand_pixel_no_dest(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 = \
palette_ram_converted[pixel_source & 0x1FF]; \
} \
\
screen_src_ptr++; \
screen_dest_ptr++; \
} \
#define expand_loop_partial_alpha(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(effect_condition_fade(pixel_pair)) \
{ \
if(effect_condition_alpha) \
{ \
expand_pixel(alpha_expand, pixel_pair); \
} \
else \
{ \
expand_pixel(expand_type, pixel_pair); \
} \
} \
else \
{ \
*screen_dest_ptr = \
palette_ram_converted[pixel_pair & 0x1FF]; \
} \
\
screen_src_ptr++; \
screen_dest_ptr++; \
} \
#define expand_partial_alpha(expand_type) \
if((blend_a + blend_b) > 16) \
{ \
expand_loop_partial_alpha(blend_saturate, expand_type); \
} \
else \
{ \
expand_loop_partial_alpha(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, effect_condition_alpha, pixel_pair);
}
else
{
expand_loop(blend, effect_condition_alpha, 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, effect_condition_fade(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, effect_condition_fade(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 expand_darken_partial_alpha(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;
expand_partial_alpha(darken);
}
void expand_brighten_partial_alpha(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;
expand_partial_alpha(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) \
render_scanline_obj_##type##_1D(current_layer, _start, _end, dest); \
else \
render_scanline_obj_##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 render_condition_alpha \
(((io_registers[REG_BLDALPHA] & 0x1F1F) != 0x001F) && \
((io_registers[REG_BLDCNT] & 0x3F) != 0) && \
((io_registers[REG_BLDCNT] & 0x3F00) != 0)) \
#define render_condition_fade \
(((io_registers[REG_BLDY] & 0x1F) != 0) && \
((io_registers[REG_BLDCNT] & 0x3F) != 0)) \
#define render_layers_color_effect(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); \
expand_brighten_partial_alpha(screen_buffer, scanline, \
_start, _end); \
return; \
} \
break; \
} \
\
/* Fade to black */ \
case 0x03: \
{ \
if(fade_condition) \
{ \
renderer(color32, partial_alpha, screen_buffer); \
expand_darken_partial_alpha(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 = palette_ram_converted[0]; \
switch((bldcnt >> 6) & 0x03) \
{ \
/* Fade to white */ \
case 0x02: \
{ \
if(color_combine_mask_a(5)) \
{ \
u32 blend = io_registers[REG_BLDY] & 0x1F; \
u32 upper; \
\
if(blend > 16) \
blend = 16; \
\
upper = ((0x07E0F81F * blend) >> 4) & 0x07E0F81F; \
blend = 16 - blend; \
\
expand_pixel_no_dest(brighten, pixel_top); \
} \
break; \
} \
\
/* Fade to black */ \
case 0x03: \
{ \
if(color_combine_mask_a(5)) \
{ \
s32 blend = 16 - (io_registers[REG_BLDY] & 0x1F); \
\
if(blend < 0) \
blend = 0; \
\
expand_pixel_no_dest(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 render_scanline_tile(u16 *scanline, u32 dispcnt)
{
u32 current_layer;
u32 layer_order_pos;
u32 bldcnt = io_registers[REG_BLDCNT];
render_scanline_layer_functions_tile();
render_layers_color_effect(render_layers, layer_count,
render_condition_alpha, render_condition_fade, 0, 240);
}
void render_scanline_bitmap(u16 *scanline, u32 dispcnt)
{
u32 bldcnt = io_registers[REG_BLDCNT];
render_scanline_layer_functions_bitmap();
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 render_layers_conditional(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 render_scanline_conditional_tile(u32 start, u32 end, u16 *scanline,
u32 enable_flags, u32 dispcnt, u32 bldcnt, tile_layer_render_struct
*layer_renderers)
{
u32 current_layer;
u32 layer_order_pos = 0;
render_layers_color_effect(render_layers_conditional,
(layer_count && (enable_flags & 0x1F)),
((enable_flags & 0x20) && render_condition_alpha),
((enable_flags & 0x20) && render_condition_fade), 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 render_scanline_conditional_bitmap(u32 start, u32 end, u16 *scanline,
u32 enable_flags, u32 dispcnt, u32 bldcnt, bitmap_layer_render_struct
*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 render_window_segment(type, start, end, window_type) \
if(start != end) \
{ \
render_scanline_conditional_##type(start, end, scanline, \
window_##window_type##_enable, dispcnt, bldcnt, layer_renderers); \
} \
#define render_window_segment_unequal(type, start, end, window_type) \
render_scanline_conditional_##type(start, end, scanline, \
window_##window_type##_enable, dispcnt, bldcnt, layer_renderers) \
#define render_window_segment_clip(type, clip_start, clip_end, start, end, \
window_type) \
{ \
if(start != end) \
{ \
if(start < clip_start) \
{ \
if(end > clip_start) \
{ \
if(end > clip_end) \
{ \
render_window_segment_unequal(type, clip_start, clip_end, \
window_type); \
} \
else \
{ \
render_window_segment_unequal(type, clip_start, end, window_type); \
} \
} \
} \
else \
\
if(end > clip_end) \
{ \
if(start < clip_end) \
render_window_segment_unequal(type, start, clip_end, window_type); \
} \
else \
{ \
render_window_segment_unequal(type, start, end, window_type); \
} \
} \
} \
#define render_window_clip_1(type, start, end) \
if(window_1_x1 != 240) \
{ \
if(window_1_x1 > window_1_x2) \
{ \
render_window_segment_clip(type, start, end, 0, window_1_x2, 1); \
render_window_segment_clip(type, start, end, window_1_x2, window_1_x1, \
out); \
render_window_segment_clip(type, start, end, window_1_x1, 240, 1); \
} \
else \
{ \
render_window_segment_clip(type, start, end, 0, window_1_x1, out); \
render_window_segment_clip(type, start, end, window_1_x1, window_1_x2, \
1); \
render_window_segment_clip(type, start, end, window_1_x2, 240, out); \
} \
} \
else \
{ \
render_window_segment(type, start, end, out); \
} \
#define render_window_clip_obj(type, start, end); \
render_window_segment(type, start, end, out); \
if(dispcnt & 0x40) \
render_scanline_obj_copy_##type##_1D(4, start, end, scanline); \
else \
render_scanline_obj_copy_##type##_2D(4, start, end, scanline) \
#define render_window_segment_clip_obj(type, clip_start, clip_end, start, \
end) \
{ \
if(start != end) \
{ \
if(start < clip_start) \
{ \
if(end > clip_start) \
{ \
if(end > clip_end) \
{ \
render_window_clip_obj(type, clip_start, clip_end); \
} \
else \
{ \
render_window_clip_obj(type, clip_start, end); \
} \
} \
} \
else \
\
if(end > clip_end) \
{ \
if(start < clip_end) \
{ \
render_window_clip_obj(type, start, clip_end); \
} \
} \
else \
{ \
render_window_clip_obj(type, start, end); \
} \
} \
} \
#define render_window_clip_1_obj(type, start, end) \
if(window_1_x1 != 240) \
{ \
if(window_1_x1 > window_1_x2) \
{ \
render_window_segment_clip(type, start, end, 0, window_1_x2, 1); \
render_window_segment_clip_obj(type, start, end, window_1_x2, \
window_1_x1); \
render_window_segment_clip(type, start, end, window_1_x1, 240, 1); \
} \
else \
{ \
render_window_segment_clip_obj(type, start, end, 0, window_1_x1); \
render_window_segment_clip(type, start, end, window_1_x1, window_1_x2, \
1); \
render_window_segment_clip_obj(type, start, end, window_1_x2, 240); \
} \
} \
else \
{ \
render_window_clip_obj(type, start, end); \
} \
#define render_window_single(type, window_number) \
u32 winin = io_registers[REG_WININ]; \
window_coords(window_number); \
if(window_##window_number##_x1 > window_##window_number##_x2) \
{ \
render_window_segment(type, 0, window_##window_number##_x2, \
window_number); \
render_window_segment(type, window_##window_number##_x2, \
window_##window_number##_x1, out); \
render_window_segment(type, window_##window_number##_x1, 240, \
window_number); \
} \
else \
{ \
render_window_segment(type, 0, window_##window_number##_x1, out); \
render_window_segment(type, window_##window_number##_x1, \
window_##window_number##_x2, window_number); \
render_window_segment(type, window_##window_number##_x2, 240, out); \
} \
#define render_window_multi(type, front, back) \
if(window_##front##_x1 > window_##front##_x2) \
{ \
render_window_segment(type, 0, window_##front##_x2, front); \
render_window_clip_##back(type, window_##front##_x2, \
window_##front##_x1); \
render_window_segment(type, window_##front##_x1, 240, front); \
} \
else \
{ \
render_window_clip_##back(type, 0, window_##front##_x1); \
render_window_segment(type, window_##front##_x1, window_##front##_x2, \
front); \
render_window_clip_##back(type, window_##front##_x2, 240); \
} \
#define render_scanline_window_builder(type) \
void render_scanline_window_##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; \
\
render_scanline_layer_functions_##type(); \
\
switch(dispcnt >> 13) \
{ \
/* Just window 0 */ \
case 0x01: \
{ \
render_window_single(type, 0); \
break; \
} \
\
/* Just window 1 */ \
case 0x02: \
{ \
render_window_single(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; \
render_window_clip_obj(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; \
} \
} \
} \
render_scanline_window_builder(tile);
render_scanline_window_builder(bitmap);
u32 active_layers[6] = { 0x1F, 0x17, 0x1C, 0x14, 0x14, 0x14 };
u32 small_resolution_width = 240;
u32 small_resolution_height = 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)
{
render_scanline_window_tile(screen_offset, dispcnt);
}
else
{
render_scanline_tile(screen_offset, dispcnt);
}
}
else
{
if(dispcnt >> 13)
render_scanline_window_bitmap(screen_offset, dispcnt);
else
render_scanline_bitmap(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;
sceKernelDcacheWritebackAll();
// 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 integer_scale_copy_2() \
current_scanline_ptr[x2] = current_pixel; \
current_scanline_ptr[x2 - 1] = current_pixel; \
x2 -= 2 \
#define integer_scale_copy_3() \
current_scanline_ptr[x2] = current_pixel; \
current_scanline_ptr[x2 - 1] = current_pixel; \
current_scanline_ptr[x2 - 2] = current_pixel; \
x2 -= 3 \
#define integer_scale_copy_4() \
current_scanline_ptr[x2] = current_pixel; \
current_scanline_ptr[x2 - 1] = current_pixel; \
current_scanline_ptr[x2 - 2] = current_pixel; \
current_scanline_ptr[x2 - 3] = current_pixel; \
x2 -= 4 \
#define integer_scale_horizontal(scale_factor) \
for(y = 0; y < 160; y++) \
{ \
for(x = 239, x2 = (240 * video_scale) - 1; x >= 0; x--) \
{ \
current_pixel = current_scanline_ptr[x]; \
integer_scale_copy_##scale_factor(); \
current_scanline_ptr[x2] = current_scanline_ptr[x]; \
current_scanline_ptr[x2 - 1] = current_scanline_ptr[x]; \
current_scanline_ptr[x2 - 2] = current_scanline_ptr[x]; \
} \
current_scanline_ptr += pitch; \
} \
void flip_screen()
{
if((video_scale != 1) && (current_scale != unscaled))
{
s32 x, y;
s32 x2, y2;
u16 *screen_ptr = get_screen_pixels();
u16 *current_scanline_ptr = screen_ptr;
u32 pitch = get_screen_pitch();
u16 current_pixel;
u32 i;
switch(video_scale)
{
case 2:
integer_scale_horizontal(2);
break;
case 3:
integer_scale_horizontal(3);
break;
default:
case 4:
integer_scale_horizontal(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);
sceDisplayWaitVblankStart();
sceDisplaySetFrameBuf((void*)psp_gu_vram_base, PSP_LINE_SIZE,
PSP_DISPLAY_PIXEL_FORMAT_565, PSP_DISPLAY_SETBUF_NEXTFRAME);
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);
sceDisplayWaitVblankStart();
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 | SDL_INIT_NOPARACHUTE);
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 video_resolution_large()
{
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 video_resolution_small()
{
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 video_resolution_large()
{
if(current_scale != unscaled)
{
current_scale = unscaled;
screen = SDL_SetVideoMode(480, 272, 16, 0);
resolution_width = 480;
resolution_height = 272;
}
}
void video_resolution_small()
{
if(current_scale != screen_scale)
{
current_scale = screen_scale;
screen = SDL_SetVideoMode(small_resolution_width * video_scale,
small_resolution_height * video_scale, 16, 0);
resolution_width = small_resolution_width;
resolution_height = small_resolution_height;
}
}
void set_gba_resolution(video_scale_type scale)
{
if(screen_scale != scale)
{
screen_scale = scale;
switch(scale)
{
case unscaled:
case scaled_aspect:
case fullscreen:
small_resolution_width = 240 * video_scale;
small_resolution_height = 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 video_savestate_builder(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); \
} \
video_savestate_builder(read);
video_savestate_builder(write_mem);
| BASLQC/gPSP | video.c | C | gpl-2.0 | 204,850 |
#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 IRQ_TYPE_EDGE_FALLING
#define __IRQT_RISEDGE IRQ_TYPE_EDGE_RISING
#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
| crzyruski/OpenX2-kernel-original | arch/arm/include/asm/irq.h | C | gpl-2.0 | 934 |
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
}
| wbhqf3/test | Learning/app/src/main/java/com/lj/learning/dao/Sheet.java | Java | gpl-2.0 | 1,601 |
Beans - Atom Snippet Plugin
====================
This package adds support for Beans related snippets in the Atom editor.
* [Issues](https://github.com/ThemeButler/beans-snippets-for-atom/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>beans_remove_attribute( '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:** beans_remove_attribute
**Output:**
<pre>beans_remove_attribute( 'markup_id', 'attribute_type', 'attribute' );</pre>
#### Examples:
<pre>beans_remove_attribute( '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>beans_remove_attribute( 'beans_primary_nav', 'class' );</pre>
This example removes the entire class=" " attribute, along with any assigned classes.
**Original:**
<pre><nav class="tm-nav uk-float-right"></pre>
**Remove attribute value:**
<pre><nav class="tm-nav"></pre>
**Remove attribute:**
<pre><nav></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:** beans_replace_attribute
**Output:**
<pre>beans_replace_attribute( 'markup_id', 'attribute_type', 'old_attribute', 'new_attribute' );</pre>
#### Examples:
**Original:**
<pre><nav class="tm-nav uk-float-right"></pre>
**Replace attribute value:**
<pre>beans_replace_attribute( 'beans_primary_nav', 'class', 'uk-float-right', 'uk-float-left' );</pre>
<pre><nav class="uk-left"></pre>
<h2 id="add-attribute">Modify Action</h2>
Modify the placement of elements controlled by Beans.
**Shortcut:** _beans-modify-action_
<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:** _beans-enqueue-uikit_
<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:** _beans-dequeue-uikit_
<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:** _beans-register-widgetarea_
<h2 id="output-widgetarea">Output Widget Area</h2>
Output a widget-area in your theme, using any of Beans dynamic placement hooks.
**Shortcut:** _beans-output-widgetarea_
<h2 id="new-widgetarea">Register & Output Widget Area</h2>
Register a new widget-area and output it using any of Beans dynamic placement hooks.
**Shortcut:** _beans-new-widgetarea_
<h2 id="adjust-grid">Adjust Grid</h2>
Modify Beans default layout grid (ie, the sidebars and content) width and placement.
**Shortcut:** _beans-new-widgetarea_
| ThemeButler/beans-snippets-for-atom | README.md | Markdown | gpl-2.0 | 4,759 |
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef NET_HTTP_HTTP_AUTH_HANDLER_FACTORY_H_
#define NET_HTTP_HTTP_AUTH_HANDLER_FACTORY_H_
#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/url_security_manager.h"
class GURL;
namespace net {
class BoundNetLog;
class HostResolver;
class HttpAuthHandler;
class HttpAuthHandlerRegistryFactory;
class NET_EXPORT HttpAuthHandlerFactory {
public:
enum CreateReason {
CREATE_CHALLENGE,
CREATE_PREEMPTIVE,
};
HttpAuthHandlerFactory() : url_security_manager_(NULL) {}
virtual ~HttpAuthHandlerFactory() {}
void set_url_security_manager(URLSecurityManager* url_security_manager) {
url_security_manager_ = url_security_manager;
}
URLSecurityManager* url_security_manager() {
return url_security_manager_;
}
virtual int CreateAuthHandler(HttpAuth::ChallengeTokenizer* challenge,
HttpAuth::Target target,
const GURL& origin,
CreateReason create_reason,
int digest_nonce_count,
const BoundNetLog& net_log,
scoped_ptr<HttpAuthHandler>* handler) = 0;
int CreateAuthHandlerFromString(const std::string& challenge,
HttpAuth::Target target,
const GURL& origin,
const BoundNetLog& net_log,
scoped_ptr<HttpAuthHandler>* handler);
int CreatePreemptiveAuthHandlerFromString(
const std::string& challenge,
HttpAuth::Target target,
const GURL& origin,
int digest_nonce_count,
const BoundNetLog& net_log,
scoped_ptr<HttpAuthHandler>* handler);
static HttpAuthHandlerRegistryFactory* CreateDefault(HostResolver* resolver);
private:
URLSecurityManager* url_security_manager_;
DISALLOW_COPY_AND_ASSIGN(HttpAuthHandlerFactory);
};
class NET_EXPORT HttpAuthHandlerRegistryFactory
: public HttpAuthHandlerFactory {
public:
HttpAuthHandlerRegistryFactory();
virtual ~HttpAuthHandlerRegistryFactory();
void SetURLSecurityManager(const std::string& scheme,
URLSecurityManager* url_security_manager);
void RegisterSchemeFactory(const std::string& scheme,
HttpAuthHandlerFactory* factory);
HttpAuthHandlerFactory* GetSchemeFactory(const std::string& scheme) const;
static HttpAuthHandlerRegistryFactory* Create(
const std::vector<std::string>& supported_schemes,
URLSecurityManager* security_manager,
HostResolver* host_resolver,
const std::string& gssapi_library_name,
bool negotiate_disable_cname_lookup,
bool negotiate_enable_port);
virtual int CreateAuthHandler(HttpAuth::ChallengeTokenizer* 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, HttpAuthHandlerFactory*> FactoryMap;
FactoryMap factory_map_;
DISALLOW_COPY_AND_ASSIGN(HttpAuthHandlerRegistryFactory);
};
}
#endif
| qtekfun/htcDesire820Kernel | external/chromium/net/http/http_auth_handler_factory.h | C | gpl-2.0 | 3,917 |
object-diff
===========
A tool for comparing java objects
| mosscode/object-diff | README.md | Markdown | gpl-2.0 | 59 |
/* Copyright (c) 2009-2012, Code Aurora Forum. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/
#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(CONFIG_MDP_RUNTIME_BANDWIDTH)
extern u64 mdp_max_bw;
#define MDP4_BW_AB_FACTOR (115) /* 1.15 */
#define MDP4_BW_IB_FACTOR (125) /* 1.25 */
#define MDP_BUS_SCALE_AB_STEP (0x4000000)
#endif
#define MDP4_OVERLAYPROC0_BASE 0x10000
#define MDP4_OVERLAYPROC1_BASE 0x18000
#define MDP4_OVERLAYPROC2_BASE 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 csc_cfg_backup_matrix;
#endif
#if defined(CONFIG_MDP_RUNTIME_BANDWIDTH)
#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, /* 0 */
DTV_INTF = LCDC_RGB_INTF, /* 0 */
MDDI_LCDC_INTF, /* 1 */
MDDI_INTF, /* 2 */
EBI2_INTF, /* 3 */
TV_INTF = EBI2_INTF, /* 3 */
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 MDP4_3D_SIDE_BY_SIDE 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 MDP4_PANEL_DSI_VIDEO BIT(4)
#define MDP4_PANEL_DSI_CMD BIT(5)
#define MDP4_PANEL_WRITEBACK BIT(6)
enum {
OVERLAY_MODE_NONE,
OVERLAY_MODE_BLT
};
enum {
OVERLAY_REFRESH_ON_DEMAND,
OVERLAY_REFRESH_VSYNC,
OVERLAY_REFRESH_VSYNC_HALF,
OVERLAY_REFRESH_VSYNC_QUARTER
};
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 INTR_PRIMARY_INTF_UDERRUN BIT(8)
#define INTR_EXTERNAL_VSYNC BIT(9)
#define INTR_EXTERNAL_INTF_UDERRUN BIT(10)
#define INTR_PRIMARY_RDPTR BIT(11) /* read pointer */
#define INTR_OVERLAY2_DONE BIT(30)
#ifdef CONFIG_FB_MSM_OVERLAY
#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 {
OVERLAY_PLANE_INTERLEAVED,
OVERLAY_PLANE_PLANAR,
OVERLAY_PLANE_PSEUDO_PLANAR
};
enum {
MDP4_MIXER_STAGE_UNUNSED, /* pipe not used */
MDP4_MIXER_STAGE_BASE,
MDP4_MIXER_STAGE0, /* zorder 0 */
MDP4_MIXER_STAGE1, /* zorder 1 */
MDP4_MIXER_STAGE2, /* zorder 2 */
MDP4_MIXER_STAGE3, /* zorder 3 */
MDP4_MIXER_STAGE_MAX
};
enum {
MDP4_FRAME_FORMAT_LINEAR,
MDP4_FRAME_FORMAT_ARGB_TILE,
MDP4_FRAME_FORMAT_VIDEO_SUPERTILE
};
enum {
MDP4_CHROMA_RGB,
MDP4_CHROMA_H2V1,
MDP4_CHROMA_H1V2,
MDP4_CHROMA_420
};
#define CSC_MAX_BLOCKS 6
#define MDP4_BLEND_BG_TRANSP_EN BIT(9)
#define MDP4_BLEND_FG_TRANSP_EN BIT(8)
#define MDP4_BLEND_BG_MOD_ALPHA BIT(7)
#define MDP4_BLEND_BG_INV_ALPHA BIT(6)
#define MDP4_BLEND_BG_ALPHA_FG_CONST (0 << 4)
#define MDP4_BLEND_BG_ALPHA_BG_CONST (1 << 4)
#define MDP4_BLEND_BG_ALPHA_FG_PIXEL (2 << 4)
#define MDP4_BLEND_BG_ALPHA_BG_PIXEL (3 << 4)
#define MDP4_BLEND_FG_MOD_ALPHA BIT(3)
#define MDP4_BLEND_FG_INV_ALPHA BIT(2)
#define MDP4_BLEND_FG_ALPHA_FG_CONST (0 << 0)
#define MDP4_BLEND_FG_ALPHA_BG_CONST (1 << 0)
#define MDP4_BLEND_FG_ALPHA_FG_PIXEL (2 << 0)
#define MDP4_BLEND_FG_ALPHA_BG_PIXEL (3 << 0)
#define MDP4_FORMAT_SOLID_FILL BIT(22)
#define MDP4_FORMAT_UNPACK_ALIGN_MSB BIT(18)
#define MDP4_FORMAT_UNPACK_TIGHT BIT(17)
#define MDP4_FORMAT_90_ROTATED BIT(12)
#define MDP4_FORMAT_ALPHA_ENABLE BIT(8)
#define MDP4_OP_DEINT_ODD_REF 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 MDP4_OP_DST_DATA_YCBCR BIT(10)
#define MDP4_OP_SRC_DATA_YCBCR BIT(9)
#define MDP4_OP_SCALEY_FIR (0 << 4)
#define MDP4_OP_SCALEY_MN_PHASE (1 << 4)
#define MDP4_OP_SCALEY_PIXEL_RPT (2 << 4)
#define MDP4_OP_SCALEX_FIR (0 << 2)
#define MDP4_OP_SCALEX_MN_PHASE (1 << 2)
#define MDP4_OP_SCALEX_PIXEL_RPT (2 << 2)
#define MDP4_OP_SCALE_RGB_ENHANCED (1 << 4)
#define MDP4_OP_SCALE_RGB_PIXEL_RPT (0 << 3)
#define MDP4_OP_SCALE_RGB_BILINEAR (1 << 3)
#define MDP4_OP_SCALE_ALPHA_PIXEL_RPT (0 << 2)
#define MDP4_OP_SCALE_ALPHA_BILINEAR (1 << 2)
#define MDP4_OP_SCALEY_EN BIT(1)
#define MDP4_OP_SCALEX_EN BIT(0)
#define MDP4_REV40_UP_SCALING_MAX (8)
#define MDP4_REV41_OR_LATER_UP_SCALING_MAX (20)
#define MDP4_PIPE_PER_MIXER 2
#define MDP4_MAX_PLANE 4
#define VSYNC_PERIOD 16
#if defined(CONFIG_MDP_RUNTIME_BANDWIDTH)
#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 mdp4_iommu_pipe_info {
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(CONFIG_MDP_RUNTIME_BANDWIDTH)
uint64 bw_ab_quota;
uint64 bw_ib_quota;
#else
uint32 req_bw;
#endif
uint32 luma_align_size;
struct mdp_overlay_pp_params pp_cfg;
struct mdp_overlay req_data;
struct completion comp;
struct completion dmas_comp;
struct mdp4_iommu_pipe_info iommu;
/* [START] force FLIP_MODE for INVERSE PANEL - [email protected] */
#if defined(CONFIG_MACH_LGE_FX3_VZW) || defined(CONFIG_MACH_LGE_FX3Q_TMUS)
uint32 ext_flag;
struct msm_fb_data_type *mfd;
#endif
/* [END] force FLIP_MODE for INVERSE PANEL - [email protected] */
};
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 *mdp4_overlay_ndx2pipe(int ndx);
void mdp4_sw_reset(unsigned long bits);
void mdp4_display_intf_sel(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 mdp4_disable_clk_irq(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, MDP_BLOCK_POWER_STATE 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 mdp4_overlay_cfg_init(void);
void mdp4_hw_init(void);
void mdp4_isr_read(int);
void mdp4_clear_lcdc(void);
void mdp4_mixer_blend_init(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 mdp4_overlay_format_to_pipe(uint32 format, struct mdp4_overlay_pipe *pipe);
uint32 mdp4_overlay_format(struct mdp4_overlay_pipe *pipe);
uint32 mdp4_overlay_unpack_pattern(struct mdp4_overlay_pipe *pipe);
uint32 mdp4_overlay_op_mode(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 mdp4_overlay_dtv_start(void);
void mdp4_overlay_dtv_ov_done_push(struct msm_fb_data_type *mfd,
struct mdp4_overlay_pipe *pipe);
void mdp4_overlay_dtv_wait_for_ov(struct msm_fb_data_type *mfd,
struct mdp4_overlay_pipe *pipe);
int mdp4_overlay_dtv_set(struct msm_fb_data_type *mfd,
struct mdp4_overlay_pipe *pipe);
int mdp4_overlay_dtv_unset(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 mdp4_overlay_dtv_start(void)
{
/* empty */
}
static inline void mdp4_overlay_dtv_ov_done_push(struct msm_fb_data_type *mfd,
struct mdp4_overlay_pipe *pipe)
{
/* empty */
}
static inline void mdp4_overlay_dtv_wait_for_ov(struct msm_fb_data_type *mfd,
struct mdp4_overlay_pipe *pipe)
{
/* empty */
}
static inline int mdp4_overlay_dtv_set(struct msm_fb_data_type *mfd,
struct mdp4_overlay_pipe *pipe)
{
return 0;
}
static inline int mdp4_overlay_dtv_unset(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 mdp4_dtv_overlay_blt_start(struct msm_fb_data_type *mfd)
{
return;
}
static inline void mdp4_dtv_overlay_blt_stop(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 mdp4_dtv_set_black_screen(void);
int mdp4_overlay_dtv_set(struct msm_fb_data_type *mfd,
struct mdp4_overlay_pipe *pipe);
int mdp4_overlay_dtv_unset(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 mdp4_dsi_video_fxn_register(cmd_fxn_t fxn);
void mdp4_dsi_video_overlay(struct msm_fb_data_type *mfd);
void mdp4_lcdc_vsync_ctrl(struct fb_info *info, int enable);
void mdp4_overlay0_done_dsi_video(int cndx);
void mdp4_overlay0_done_dsi_cmd(int cndx);
void mdp4_primary_rdptr(void);
void mdp4_dsi_cmd_overlay(struct msm_fb_data_type *mfd);
int mdp4_lcdc_pipe_commit(int cndx, int wait);
int mdp4_dtv_pipe_commit(int cndx, int wait);
int mdp4_dsi_cmd_update_cnt(int cndx);
void mdp4_dsi_rdptr_init(int cndx);
void mdp4_dsi_vsync_init(int cndx);
void mdp4_lcdc_vsync_init(int cndx);
void mdp4_dtv_vsync_init(int cndx);
ssize_t mdp4_dsi_cmd_show_event(struct device *dev,
struct device_attribute *attr, char *buf);
ssize_t mdp4_dsi_video_show_event(struct device *dev,
struct device_attribute *attr, char *buf);
ssize_t mdp4_lcdc_show_event(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 mdp4_overlay_dsi_state_set(int state);
int mdp4_overlay_dsi_state_get(void);
void mdp4_overlay_rgb_setup(struct mdp4_overlay_pipe *pipe);
void mdp4_overlay_reg_flush(struct mdp4_overlay_pipe *pipe, int all);
void mdp4_mixer_blend_setup(int mixer);
void mdp4_mixer_blend_cfg(int);
struct mdp4_overlay_pipe *mdp4_overlay_stage_pipe(int mixer, int stage);
void mdp4_mixer_stage_up(struct mdp4_overlay_pipe *pipe, int commit);
void mdp4_mixer_stage_down(struct mdp4_overlay_pipe *pipe, int commit);
void mdp4_mixer_pipe_cleanup(int mixer);
int mdp4_mixer_stage_can_run(struct mdp4_overlay_pipe *pipe);
void mdp4_overlayproc_cfg(struct mdp4_overlay_pipe *pipe);
void mdp4_mddi_overlay(struct msm_fb_data_type *mfd);
int mdp4_overlay_format2type(uint32 format);
int mdp4_overlay_format2pipe(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 mdp4_overlay_wait4vsync(struct fb_info *info, long long *vtime);
int mdp4_overlay_vsync_ctrl(struct fb_info *info, int enable);
int mdp4_overlay_unset(struct fb_info *info, int ndx);
int mdp4_overlay_unset_mixer(int mixer);
int mdp4_overlay_play_wait(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 *mdp4_overlay_pipe_alloc(int ptype, int mixer);
void mdp4_overlay_dma_commit(int mixer);
void mdp4_overlay_vsync_commit(struct mdp4_overlay_pipe *pipe);
void mdp4_mixer_stage_commit(int mixer);
void mdp4_dsi_cmd_do_update(int cndx, struct mdp4_overlay_pipe *pipe);
void mdp4_lcdc_pipe_queue(int cndx, struct mdp4_overlay_pipe *pipe);
void mdp4_dtv_pipe_queue(int cndx, struct mdp4_overlay_pipe *pipe);
void mdp4_overlay_pipe_free(struct mdp4_overlay_pipe *pipe);
void mdp4_overlay_dmap_cfg(struct msm_fb_data_type *mfd, int lcdc);
void mdp4_overlay_dmap_xy(struct mdp4_overlay_pipe *pipe);
void mdp4_overlay_dmae_cfg(struct msm_fb_data_type *mfd, int atv);
void mdp4_overlay_dmae_xy(struct mdp4_overlay_pipe *pipe);
int mdp4_overlay_pipe_staged(struct mdp4_overlay_pipe *pipe);
void mdp4_lcdc_primary_vsyn(void);
void mdp4_overlay0_done_lcdc(int cndx);
void mdp4_overlay0_done_mddi(struct mdp_dma_data *dma);
void mdp4_dma_p_done_mddi(struct mdp_dma_data *dma);
void mdp4_dmap_done_dsi_cmd(int cndx);
void mdp4_dmap_done_dsi_video(int cndx);
void mdp4_dmap_done_lcdc(int cndx);
void mdp4_overlay1_done_dtv(void);
void mdp4_overlay1_done_atv(void);
void mdp4_primary_vsync_lcdc(void);
void mdp4_external_vsync_dtv(void);
void mdp4_lcdc_wait4vsync(int cndx, long long *vtime);
void mdp4_overlay_lcdc_vsync_push(struct msm_fb_data_type *mfd,
struct mdp4_overlay_pipe *pipe);
void mdp4_mddi_overlay_dmas_restore(void);
#ifndef CONFIG_FB_MSM_MIPI_DSI
void mdp4_mddi_dma_busy_wait(struct msm_fb_data_type *mfd);
void mdp4_mddi_overlay_restore(void);
#else
static inline void mdp4_mddi_kickoff_video(struct msm_fb_data_type *mfd,
struct mdp4_overlay_pipe *pipe)
{
/* empty */
}
static inline void mdp4_mddi_dma_busy_wait(struct msm_fb_data_type *mfd)
{
/* empty */
}
static inline void mdp4_mddi_blt_dmap_busy_wait(struct msm_fb_data_type *mfd)
{
/* empty */
}
static inline void mdp4_mddi_overlay_restore(void)
{
/* empty */
}
static inline void mdp4_mddi_overlay_blt_start(struct msm_fb_data_type *mfd)
{
/*empty*/
}
static inline void mdp4_mddi_overlay_blt_stop(struct msm_fb_data_type *mfd)
{
/*empty*/
}
static inline void mdp4_mddi_overlay_blt_offset(struct msm_fb_data_type *mfd,
struct msmfb_overlay_blt *req)
{
/* empty */
}
static inline void mdp4_mddi_overlay_blt(struct msm_fb_data_type *mfd,
struct msmfb_overlay_blt *req)
{
/* empty*/
}
#endif
void mdp4_mddi_overlay_kickoff(struct msm_fb_data_type *mfd,
struct mdp4_overlay_pipe *pipe);
void mdp4_rgb_igc_lut_setup(int num);
void mdp4_vg_igc_lut_setup(int num);
void mdp4_mixer_gc_lut_setup(int mixer_num);
void mdp4_fetch_cfg(uint32 clk);
uint32 mdp4_rgb_igc_lut_cvt(uint32 ndx);
void mdp4_vg_qseed_init(int);
int mdp4_overlay_blt(struct fb_info *info, struct msmfb_overlay_blt *req);
#ifdef CONFIG_FB_MSM_MIPI_DSI
void mdp4_dsi_cmd_blt_start(struct msm_fb_data_type *mfd);
void mdp4_dsi_cmd_blt_stop(struct msm_fb_data_type *mfd);
void mdp4_dsi_video_blt_start(struct msm_fb_data_type *mfd);
void mdp4_dsi_video_blt_stop(struct msm_fb_data_type *mfd);
void mdp4_dsi_cmd_overlay_blt(struct msm_fb_data_type *mfd,
struct msmfb_overlay_blt *req);
void mdp4_dsi_video_overlay_blt(struct msm_fb_data_type *mfd,
struct msmfb_overlay_blt *req);
void mdp4_dsi_video_base_swap(int cndx, struct mdp4_overlay_pipe *pipe);
#ifdef CONFIG_FB_MSM_MDP40
static inline void mdp3_dsi_cmd_dma_busy_wait(struct msm_fb_data_type *mfd)
{
/* empty */
}
#endif
#else /* CONFIG_FB_MSM_MIPI_DSI */
int mdp4_mddi_overlay_blt_offset(struct msm_fb_data_type *mfd,
struct msmfb_overlay_blt *req);
void mdp4_mddi_overlay_blt(struct msm_fb_data_type *mfd,
struct msmfb_overlay_blt *req);
int mdp4_mddi_overlay_blt_start(struct msm_fb_data_type *mfd);
int mdp4_mddi_overlay_blt_stop(struct msm_fb_data_type *mfd);
void mdp4_mddi_blt_dmap_busy_wait(struct msm_fb_data_type *mfd);
static inline int mdp4_dsi_overlay_blt_start(struct msm_fb_data_type *mfd)
{
return -ENODEV;
}
static inline int mdp4_dsi_overlay_blt_stop(struct msm_fb_data_type *mfd)
{
return -ENODEV;
}
static inline void mdp4_dsi_video_blt_start(struct msm_fb_data_type *mfd)
{
}
static inline void mdp4_dsi_video_blt_stop(struct msm_fb_data_type *mfd)
{
}
static inline void mdp4_dsi_overlay_blt(
struct msm_fb_data_type *mfd, struct msmfb_overlay_blt *req)
{
}
static inline int mdp4_dsi_overlay_blt_offset(
struct msm_fb_data_type *mfd, struct msmfb_overlay_blt *req)
{
return -ENODEV;
}
static inline void mdp4_dsi_video_overlay_blt(
struct msm_fb_data_type *mfd, struct msmfb_overlay_blt *req)
{
}
static inline void mdp4_dsi_cmd_overlay_blt(
struct msm_fb_data_type *mfd, struct msmfb_overlay_blt *req)
{
}
static inline void mdp4_dsi_video_base_swap(int cndx,
struct mdp4_overlay_pipe *pipe)
{
/* empty */
}
static inline void mdp4_dsi_cmd_blt_start(struct msm_fb_data_type *mfd)
{
}
static inline void mdp4_dsi_cmd_blt_stop(struct msm_fb_data_type *mfd)
{
}
#endif /* CONFIG_FB_MSM_MIPI_DSI */
void mdp4_lcdc_overlay_blt(struct msm_fb_data_type *mfd,
struct msmfb_overlay_blt *req);
int mdp4_lcdc_overlay_blt_offset(struct msm_fb_data_type *mfd,
struct msmfb_overlay_blt *req);
void mdp4_lcdc_overlay_blt_start(struct msm_fb_data_type *mfd);
void mdp4_lcdc_overlay_blt_stop(struct msm_fb_data_type *mfd);
void mdp4_dtv_overlay_blt_start(struct msm_fb_data_type *mfd);
void mdp4_dtv_overlay_blt_stop(struct msm_fb_data_type *mfd);
void mdp4_overlay_panel_mode(int mixer_num, uint32 mode);
void mdp4_overlay_panel_mode_unset(int mixer_num, uint32 mode);
int mdp4_overlay_mixer_play(int mixer_num);
uint32 mdp4_overlay_panel_list(void);
void mdp4_lcdc_overlay_kickoff(struct msm_fb_data_type *mfd,
struct mdp4_overlay_pipe *pipe);
void mdp4_mddi_kickoff_video(struct msm_fb_data_type *mfd,
struct mdp4_overlay_pipe *pipe);
void mdp4_mddi_read_ptr_intr(void);
void mdp4_dsi_cmd_dma_busy_check(void);
#ifdef CONFIG_FB_MSM_MIPI_DSI
void mdp_dsi_cmd_overlay_suspend(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 mdp4_primary_vsync_dsi_video(void);
void mdp4_dsi_cmd_base_swap(int cndx, struct mdp4_overlay_pipe *pipe);
void mdp4_dsi_cmd_wait4vsync(int cndx, long long *vtime);
void mdp4_dsi_video_wait4vsync(int cndx, long long *vtime);
void mdp4_dsi_cmd_pipe_queue(int cndx, struct mdp4_overlay_pipe *pipe);
void mdp4_dsi_video_pipe_queue(int cndx, struct mdp4_overlay_pipe *pipe);
int mdp4_dsi_video_pipe_commit(int cndx, int wait);
int mdp4_dsi_cmd_pipe_commit(int cndx, int wait);
void mdp4_dsi_cmd_vsync_ctrl(struct fb_info *info, int enable);
void mdp4_dsi_video_vsync_ctrl(struct fb_info *info, int enable);
#ifdef CONFIG_FB_MSM_MDP303
static inline void mdp4_dsi_cmd_del_timer(void)
{
/* empty */
}
#else /* CONFIG_FB_MSM_MIPI_DSI */
void mdp4_dsi_cmd_del_timer(void);
#endif
#else /* CONFIG_FB_MSM_MIPI_DSI */
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 mdp4_primary_vsync_dsi_video(void)
{
}
static inline void mdp4_dsi_cmd_base_swap(int cndx,
struct mdp4_overlay_pipe *pipe)
{
}
static inline void mdp4_dsi_cmd_wait4vsync(int cndx, long long *vtime)
{
}
static inline void mdp4_dsi_video_wait4vsync(int cndx, long long *vtime)
{
}
static inline void mdp4_dsi_cmd_pipe_queue(int cndx,
struct mdp4_overlay_pipe *pipe)
{
}
static inline void mdp4_dsi_video_pipe_queue(int cndx,
struct mdp4_overlay_pipe *pipe)
{
}
static inline int mdp4_dsi_video_pipe_commit(int cndx, int wait)
{
return 0;
}
static inline int mdp4_dsi_cmd_pipe_commit(int cndx, int wait)
{
return 0;
}
static inline void mdp4_dsi_cmd_vsync_ctrl(struct fb_info *info,
int enable)
{
}
static inline void mdp4_dsi_video_vsync_ctrl(struct fb_info *info,
int enable)
{
}
static inline void mdp4_overlay_dsi_video_start(void)
{
/* empty */
}
#ifdef CONFIG_FB_MSM_MDP40
static inline void mdp_dsi_cmd_overlay_suspend(struct msm_fb_data_type *mfd)
{
/* empty */
}
#endif
#endif /* CONFIG_FB_MSM_MIPI_DSI */
void mdp4_dsi_cmd_kickoff_ui(struct msm_fb_data_type *mfd,
struct mdp4_overlay_pipe *pipe);
void mdp4_dsi_cmd_kickoff_video(struct msm_fb_data_type *mfd,
struct mdp4_overlay_pipe *pipe);
void mdp4_dsi_cmd_overlay_kickoff(struct msm_fb_data_type *mfd,
struct mdp4_overlay_pipe *pipe);
void mdp4_overlay_panel_3d(int mixer_num, uint32 panel_3d);
int mdp4_overlay_3d_sbys(struct fb_info *info, struct msmfb_overlay_3d *req);
void mdp4_dsi_cmd_3d_sbys(struct msm_fb_data_type *mfd,
struct msmfb_overlay_3d *r3d);
void mdp4_dsi_video_3d_sbys(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 mdp4_mddi_overlay_cursor(struct fb_info *info, struct fb_cursor *cursor);
int mdp_ppp_blit(struct fb_info *info, struct mdp_blit_req *req);
void mdp4_overlay_resource_release(void);
uint32_t mdp4_ss_table_value(int8_t param, int8_t index);
void mdp4_overlay_borderfill_stage_down(struct mdp4_overlay_pipe *pipe);
#ifdef CONFIG_FB_MSM_MDP303
static inline int mdp4_overlay_borderfill_supported(void)
{
return 0;
}
#else
int mdp4_overlay_borderfill_supported(void);
#endif
int mdp4_overlay_writeback_on(struct platform_device *pdev);
int mdp4_overlay_writeback_off(struct platform_device *pdev);
void mdp4_writeback_overlay(struct msm_fb_data_type *mfd);
void mdp4_overlay2_done_wfd(struct mdp_dma_data *dma);
int mdp4_writeback_start(struct fb_info *info);
int mdp4_writeback_stop(struct fb_info *info);
int mdp4_writeback_dequeue_buffer(struct fb_info *info,
struct msmfb_data *data);
int mdp4_writeback_queue_buffer(struct fb_info *info,
struct msmfb_data *data);
void mdp4_writeback_dma_stop(struct msm_fb_data_type *mfd);
int mdp4_writeback_init(struct fb_info *info);
int mdp4_writeback_terminate(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 mdp4_qseed_access_cfg(struct mdp_qseed_cfg *cfg, uint32_t base);
u32 mdp4_allocate_writeback_buf(struct msm_fb_data_type *mfd, u32 mix_num);
void mdp4_init_writeback_buf(struct msm_fb_data_type *mfd, u32 mix_num);
void mdp4_free_writeback_buf(struct msm_fb_data_type *mfd, u32 mix_num);
int mdp4_igc_lut_config(struct mdp_igc_lut_data *cfg);
void mdp4_overlay_iommu_pipe_free(int ndx, int all);
void mdp4_overlay_iommu_free_list(int mixer, struct ion_handle *ihdl);
void mdp4_overlay_iommu_unmap_freelist(int mixer);
void mdp4_overlay_iommu_vsync_cnt(void);
void mdp4_iommu_unmap(struct mdp4_overlay_pipe *pipe);
void mdp4_iommu_attach(void);
int mdp4_v4l2_overlay_set(struct fb_info *info, struct mdp_overlay *req,
struct mdp4_overlay_pipe **ppipe);
void mdp4_v4l2_overlay_clear(struct mdp4_overlay_pipe *pipe);
int mdp4_v4l2_overlay_play(struct fb_info *info, struct mdp4_overlay_pipe *pipe,
unsigned long srcp0_addr, unsigned long srcp1_addr,
unsigned long srcp2_addr);
#if defined(CONFIG_MDP_RUNTIME_BANDWIDTH)
int mdp4_overlay_mdp_pipe_req(struct mdp4_overlay_pipe *pipe,
struct msm_fb_data_type *mfd);
int mdp4_calc_blt_mdp_bw(struct msm_fb_data_type *mfd,
struct mdp4_overlay_pipe *pipe);
#else
int mdp4_overlay_mdp_pipe_req(struct mdp4_overlay_pipe *pipe,
struct msm_fb_data_type *mfd);
#endif
int mdp4_overlay_mdp_perf_req(struct msm_fb_data_type *mfd,
struct mdp4_overlay_pipe *plist);
void mdp4_overlay_mdp_perf_upd(struct msm_fb_data_type *mfd, int flag);
int mdp4_update_base_blend(struct msm_fb_data_type *mfd,
struct mdp_blend_cfg *mdp_blend_cfg);
u32 mdp4_get_mixer_num(u32 panel_type);
#ifndef CONFIG_FB_MSM_WRITEBACK_MSM_PANEL
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 mdp4_wfd_pipe_commit(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 mdp4_wfd_pipe_commit(struct msm_fb_data_type *mfd, int cndx, int wait);
#endif
#endif /* MDP_H */
| xdajog/kernel_fx3q_aosp | drivers/video/msm/mdp4.h | C | gpl-2.0 | 31,096 |
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 %GOPHER_PLUS_ITEM_TYPES
);
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//g;
}
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
# _clean_period_termination()
#
# 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 _clean_period_termination
{
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 $GOPHER_PLUS_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?//;
}
}
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 <[email protected]>"). 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
| gitpan/Net-Gopher-0 | lib/Net/Gopher/Response.pm | Perl | gpl-2.0 | 33,624 |
<?php
/**
* This houses all the code to integrate with X
*/
class Cornerstone_Integration_X_Theme {
/**
* 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( 'cornerstone_load_preview', array( $this, 'load_preview' ) );
add_filter( 'cornerstone_config_common_default-settings', array( $this, 'addDefaultSettings' ) );
// Don't enqueue native styles
add_filter( 'cornerstone_enqueue_styles', '__return_false' );
add_filter( 'cornerstone_inline_styles', '__return_false' );
// Don't load the Customizer
add_filter( 'cornerstone_use_customizer', '__return_false' );
// Enable X specific settings pane items
add_filter( 'x_settings_pane', '__return_true' );
// Declare support for page builder features
add_filter( 'cornerstone_looks_like_support', '__return_true' );
// Shortcode generator tweaks
add_action('cornerstone_generator_preview_before', array( $this, 'shortcodeGeneratorPreviewBefore' ), -9999 );
add_filter('cornerstone_generator_map', array( $this, 'shortcodeGeneratorDemoURL' ) );
// Alias legacy shortcode names.
add_action('cornerstone_shortcodes_loaded', array( $this, 'aliasShortcodes' ) );
add_filter('cornerstone_scrolltop_selector', array( $this, 'scrollTopSelector' ) );
add_filter('cs_recent_posts_post_types', array( $this, 'recentPostTypes' ) );
// Use Audio and Video shortcodes for X native players.
add_filter( 'wp_audio_shortcode_library', 'x_wp_native_audio_shortcode_library' );
add_filter( 'wp_audio_shortcode', 'x_wp_native_audio_shortcode' );
add_filter( 'wp_audio_shortcode_class', 'x_wp_native_audio_shortcode_class' );
add_filter( 'wp_video_shortcode_library', 'x_wp_native_video_shortcode_library' );
add_filter( 'wp_video_shortcode', 'x_wp_native_video_shortcode' );
add_filter( 'wp_video_shortcode_class', 'x_wp_native_video_shortcode_class' );
}
public function init() {
// Add Logic for additional contact methods if not overridden in a child theme
if ( ! function_exists( 'x_modify_contact_methods' ) )
add_filter( 'user_contactmethods', array( $this, 'modifyContactMethods' ) );
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['enable_legacy_font_classes'] ) && $settings['enable_legacy_font_classes'] ) {
add_filter( 'cornerstone_legacy_font_classes', '__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( 'pricing_table_column', 'x_pricing_table_column', 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 modifyContactMethods( $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 shortcodeGeneratorPreviewBefore() {
remove_all_actions( 'cornerstone_generator_preview_before' );
$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'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 shortcodeGeneratorDemoURL( $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['enable_legacy_font_classes'] = 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( 'cornerstone_options_mb_validation', array( CS()->component( 'Admin' ), 'renderValidationMB' ) );
add_action( 'cornerstone_options_mb_settings', array( $this, 'legacyFontClasses' ) );
add_action( 'cornerstone_options_mb_validation', array( $this, 'renderValidationMB' ) );
add_filter( 'cornerstone_config_admin_info-items', array( $this, 'removeInfoItems' ) );
}
/**
*
*/
public function legacyFontClasses() {
?>
<tr>
<th>
<label for="cornerstone-fields-enable_legacy_font_classes">
<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( 'enable_legacy_font_classes', 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 x_addons_get_link_product_validation(); ?>">Validate</a></p>
<?php endif;
}
public function removeInfoItems( $info_items ) {
unset( $info_items['api-key'] );
unset( $info_items['design-options'] );
$info_items['enable-legacy-font-classes' ] = 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( 'X_VIDEO_LOCK_VERSION' ) )
remove_action( 'wp_footer', 'x_video_lock_output' );
}
}
// Native shortcode alterations.
// =============================================================================
// [audio]
// =============================================================================
//
// 1. Library.
// 2. Output.
// 3. Class.
//
function x_wp_native_audio_shortcode_library() { // 1
wp_enqueue_script( 'mediaelement' );
return false;
}
function x_wp_native_audio_shortcode( $html ) { // 2
return '<div class="x-audio player" data-x-element="x_mejs">' . $html . '</div>';
}
function x_wp_native_audio_shortcode_class() { // 3
return 'x-mejs x-wp-audio-shortcode advanced-controls';
}
// [video]
// =============================================================================
//
// 1. Library.
// 2. Output.
// 3. Class.
//
function x_wp_native_video_shortcode_library() { // 1
wp_enqueue_script( 'mediaelement' );
return false;
}
function x_wp_native_video_shortcode( $output ) { // 2
return '<div class="x-video player" data-x-element="x_mejs">' . preg_replace('/<div(.*?)>/', '<div class="x-video-inner">', $output ) . '</div>';
}
function x_wp_native_video_shortcode_class() { // 3
return 'x-mejs x-wp-video-shortcode advanced-controls';
}
| elinberg/ericlinberg | wp-content/plugins/cornerstone/includes/integrations/x-theme.php | PHP | gpl-2.0 | 12,573 |
/*
* $Id: hppcl.h,v 1.5 2008-07-27 03:22:41 haley Exp $
*/
/************************************************************************
* *
* Copyright (C) 2000 *
* University Corporation for Atmospheric Research *
* All Rights Reserved *
* *
* The use of this Software is governed by a License Agreement. *
* *
************************************************************************/
#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_ */
| likev/ncl | ncl_ncarg_src/ncarview/src/lib/libncarg_ras/hppcl.h | C | gpl-2.0 | 1,449 |
/* $Id$ */
/** @file
*
* VBox frontends: Qt GUI ("VirtualBox"):
* The main() function
*/
/*
* Copyright (C) 2006-2009 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* you can redistribute it and/or modify it under the terms of the GNU
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
#ifdef VBOX_WITH_PRECOMPILED_HEADERS
#include "precomp.h"
#ifdef Q_WS_MAC
# include "UICocoaApplication.h"
#endif /* Q_WS_MAC */
#else /* !VBOX_WITH_PRECOMPILED_HEADERS */
#include "VBoxGlobal.h"
#include "UIMessageCenter.h"
#include "UISelectorWindow.h"
#include "VBoxUtils.h"
#ifdef Q_WS_MAC
# include "UICocoaApplication.h"
#endif
#ifdef Q_WS_X11
#include <QFontDatabase>
#include <iprt/env.h>
#endif
#include <QCleanlooksStyle>
#include <QPlastiqueStyle>
#include <QMessageBox>
#include <QLocale>
#include <QTranslator>
#ifdef Q_WS_X11
# include <X11/Xlib.h>
#endif
#include <iprt/buildconfig.h>
#include <iprt/err.h>
#include <iprt/initterm.h>
#include <iprt/process.h>
#include <iprt/stream.h>
#include <VBox/err.h>
#include <VBox/version.h>
#endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
#ifdef VBOX_WITH_HARDENING
# include <VBox/sup.h>
#endif
#ifdef RT_OS_LINUX
# include <unistd.h>
#endif
#include <cstdio>
/* XXX Temporarily. Don't rely on the user to hack the Makefile himself! */
QString g_QStrHintLinuxNoMemory = QApplication::tr(
"This error means that the kernel driver was either not able to "
"allocate enough memory or that some mapping operation failed."
);
QString g_QStrHintLinuxNoDriver = QApplication::tr(
"The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or "
"there is a permission problem with /dev/vboxdrv. Please reinstall the kernel "
"module by executing<br/><br/>"
" <font color=blue>'/etc/init.d/vboxdrv setup'</font><br/><br/>"
"as root. If it is available in your distribution, you should install the "
"DKMS package first. This package keeps track of Linux kernel changes and "
"recompiles the vboxdrv kernel module if necessary."
);
QString g_QStrHintOtherWrongDriverVersion = QApplication::tr(
"The VirtualBox kernel modules do not match this version of "
"VirtualBox. The installation of VirtualBox was apparently not "
"successful. Please try completely uninstalling and reinstalling "
"VirtualBox."
);
QString g_QStrHintLinuxWrongDriverVersion = QApplication::tr(
"The VirtualBox kernel modules do not match this version of "
"VirtualBox. The installation of VirtualBox was apparently not "
"successful. Executing<br/><br/>"
" <font color=blue>'/etc/init.d/vboxdrv setup'</font><br/><br/>"
"may correct this. Make sure that you do not mix the "
"OSE version and the PUEL version of VirtualBox."
);
QString g_QStrHintOtherNoDriver = QApplication::tr(
"Make sure the kernel module has been loaded successfully."
);
/* I hope this isn't (C), (TM) or (R) Microsoft support ;-) */
QString g_QStrHintReinstall = QApplication::tr(
"Please try reinstalling VirtualBox."
);
#if defined(DEBUG) && defined(Q_WS_X11) && defined(RT_OS_LINUX)
#include <signal.h>
#include <execinfo.h>
/* get REG_EIP from ucontext.h */
#ifndef __USE_GNU
#define __USE_GNU
#endif
#include <ucontext.h>
#ifdef RT_ARCH_AMD64
# define REG_PC REG_RIP
#else
# define REG_PC REG_EIP
#endif
/**
* the signal handler that prints out a backtrace of the call stack.
* the code is taken from http://www.linuxjournal.com/article/6391.
*/
void bt_sighandler (int sig, siginfo_t *info, void *secret) {
void *trace[16];
char **messages = (char **)NULL;
int i, trace_size = 0;
ucontext_t *uc = (ucontext_t *)secret;
/* Do something useful with siginfo_t */
if (sig == SIGSEGV)
Log (("GUI: Got signal %d, faulty address is %p, from %p\n",
sig, info->si_addr, uc->uc_mcontext.gregs[REG_PC]));
else
Log (("GUI: Got signal %d\n", sig));
trace_size = backtrace (trace, 16);
/* overwrite sigaction with caller's address */
trace[1] = (void *) uc->uc_mcontext.gregs [REG_PC];
messages = backtrace_symbols (trace, trace_size);
/* skip first stack frame (points here) */
Log (("GUI: [bt] Execution path:\n"));
for (i = 1; i < trace_size; ++i)
Log (("GUI: [bt] %s\n", messages[i]));
exit (0);
}
#endif /* DEBUG && X11 && LINUX*/
#if defined(RT_OS_DARWIN)
# include <dlfcn.h>
# include <sys/mman.h>
# include <iprt/asm.h>
# include <iprt/system.h>
/** Really ugly hack to shut up a silly check in AppKit. */
static void ShutUpAppKit(void)
{
/* Check for Snow Leopard or higher */
char szInfo[64];
int rc = RTSystemQueryOSInfo (RTSYSOSINFO_RELEASE, szInfo, sizeof(szInfo));
if ( RT_SUCCESS (rc)
&& szInfo[0] == '1') /* higher than 1x.x.x */
{
/*
* Find issetguid() and make it always return 0 by modifying the code.
*/
void *addr = dlsym(RTLD_DEFAULT, "issetugid");
int rc = mprotect((void *)((uintptr_t)addr & ~(uintptr_t)0xfff), 0x2000, PROT_WRITE|PROT_READ|PROT_EXEC);
if (!rc)
ASMAtomicWriteU32((volatile uint32_t *)addr, 0xccc3c031); /* xor eax, eax; ret; int3 */
}
}
#endif /* DARWIN */
static void QtMessageOutput (QtMsgType type, const char *msg)
{
#ifndef Q_WS_X11
NOREF(msg);
#endif
switch (type)
{
case QtDebugMsg:
Log (("Qt DEBUG: %s\n", msg));
break;
case QtWarningMsg:
Log (("Qt WARNING: %s\n", msg));
#ifdef Q_WS_X11
/* Needed for instance for the message ``cannot connect to X server'' */
RTStrmPrintf(g_pStdErr, "Qt WARNING: %s\n", msg);
#endif
break;
case QtCriticalMsg:
Log (("Qt CRITICAL: %s\n", msg));
#ifdef Q_WS_X11
/* Needed for instance for the message ``cannot connect to X server'' */
RTStrmPrintf(g_pStdErr, "Qt CRITICAL: %s\n", msg);
#endif
break;
case QtFatalMsg:
Log (("Qt FATAL: %s\n", msg));
#ifdef Q_WS_X11
RTStrmPrintf(g_pStdErr, "Qt FATAL: %s\n", msg);
#endif
}
}
/**
* Show all available command line parameters.
*/
static void showHelp()
{
QString mode = "", dflt = "";
#ifdef VBOX_GUI_USE_SDL
mode += "sdl";
#endif
#ifdef VBOX_GUI_USE_QIMAGE
if (!mode.isEmpty())
mode += "|";
mode += "image";
#endif
#ifdef VBOX_GUI_USE_DDRAW
if (!mode.isEmpty())
mode += "|";
mode += "ddraw";
#endif
#ifdef VBOX_GUI_USE_QUARTZ2D
if (!mode.isEmpty())
mode += "|";
mode += "quartz2d";
#endif
#if defined (Q_WS_MAC) && defined (VBOX_GUI_USE_QUARTZ2D)
dflt = "quartz2d";
#elif (defined (Q_WS_WIN32) || defined (Q_WS_PM)) && defined (VBOX_GUI_USE_QIMAGE)
dflt = "image";
#elif defined (Q_WS_X11) && defined (VBOX_GUI_USE_SDL)
dflt = "sdl";
#else
dflt = "image";
#endif
RTPrintf(VBOX_PRODUCT " Manager %s\n"
"(C) 2005-" VBOX_C_YEAR " " VBOX_VENDOR "\n"
"All rights reserved.\n"
"\n"
"Usage:\n"
" --startvm <vmname|UUID> start a VM by specifying its UUID or name\n"
" --seamless switch to seamless mode during startup\n"
" --fullscreen switch to fullscreen mode during startup\n"
" --rmode %-18s select different render mode (default is %s)\n"
" --no-startvm-errormsgbox do not show a message box for VM start errors\n"
# ifdef VBOX_GUI_WITH_PIDFILE
" --pidfile <file> create a pidfile file when a VM is up and running\n"
# endif
# ifdef VBOX_WITH_DEBUGGER_GUI
" --dbg enable the GUI debug menu\n"
" --debug like --dbg and show debug windows at VM startup\n"
" --debug-command-line like --dbg and show command line window at VM startup\n"
" --debug-statistics like --dbg and show statistics window at VM startup\n"
" --no-debug disable the GUI debug menu and debug windows\n"
" --start-paused start the VM in the paused state\n"
" --start-running start the VM running (for overriding --debug*)\n"
"\n"
# endif
"Expert options:\n"
" --disable-patm disable code patching (ignored by AMD-V/VT-x)\n"
" --disable-csam disable code scanning (ignored by AMD-V/VT-x)\n"
" --recompile-supervisor recompiled execution of supervisor code (*)\n"
" --recompile-user recompiled execution of user code (*)\n"
" --recompile-all recompiled execution of all code, with disabled\n"
" code patching and scanning\n"
" (*) For AMD-V/VT-x setups the effect is --recompile-all.\n"
"\n"
# ifdef VBOX_WITH_DEBUGGER_GUI
"The following environment (and extra data) variables are evaluated:\n"
" VBOX_GUI_DBG_ENABLED (GUI/Dbg/Enabled)\n"
" enable the GUI debug menu if set\n"
" VBOX_GUI_DBG_AUTO_SHOW (GUI/Dbg/AutoShow)\n"
" show debug windows at VM startup\n"
" VBOX_GUI_NO_DEBUGGER disable the GUI debug menu and debug windows\n"
# endif
"\n",
RTBldCfgVersion(),
mode.toLatin1().constData(),
dflt.toLatin1().constData());
/** @todo Show this as a dialog on windows. */
}
extern "C" DECLEXPORT(int) TrustedMain (int argc, char **argv, char ** /*envp*/)
{
LogFlowFuncEnter();
# if defined(RT_OS_DARWIN)
ShutUpAppKit();
# endif
for (int i=0; i<argc; i++)
if ( !strcmp(argv[i], "-h")
|| !strcmp(argv[i], "-?")
|| !strcmp(argv[i], "-help")
|| !strcmp(argv[i], "--help"))
{
showHelp();
return 0;
}
#if defined(DEBUG) && defined(Q_WS_X11) && defined(RT_OS_LINUX)
/* install our signal handler to backtrace the call stack */
struct sigaction sa;
sa.sa_sigaction = bt_sighandler;
sigemptyset (&sa.sa_mask);
sa.sa_flags = SA_RESTART | SA_SIGINFO;
sigaction (SIGSEGV, &sa, NULL);
sigaction (SIGBUS, &sa, NULL);
sigaction (SIGUSR1, &sa, NULL);
#endif
#ifdef QT_MAC_USE_COCOA
/* Instantiate our NSApplication derivative before QApplication
* forces NSApplication to be instantiated. */
UICocoaApplication::instance();
#endif
qInstallMsgHandler (QtMessageOutput);
int rc = 1; /* failure */
/* scope the QApplication variable */
{
#ifdef Q_WS_X11
/* Qt has a complex algorithm for selecting the right visual which
* doesn't always seem to work. So we naively choose a visual - the
* default one - ourselves and pass that to Qt. This means that we
* also have to open the display ourselves.
* We check the Qt parameter list and handle Qt's -display argument
* ourselves, since we open the display connection. We also check the
* to see if the user has passed Qt's -visual parameter, and if so we
* assume that the user wants Qt to handle visual selection after all,
* and don't supply a visual. */
char *pszDisplay = NULL;
bool useDefaultVisual = true;
for (int i = 0; i < argc; ++i)
{
if (!::strcmp(argv[i], "-display") && (i + 1 < argc))
/* What if it isn't? Rely on QApplication to complain? */
{
pszDisplay = argv[i + 1];
++i;
}
else if (!::strcmp(argv[i], "-visual"))
useDefaultVisual = false;
}
Display *pDisplay = XOpenDisplay(pszDisplay);
if (!pDisplay)
{
RTPrintf(pszDisplay ? "Failed to open the X11 display \"%s\"!\n"
: "Failed to open the X11 display!\n",
pszDisplay);
return 0;
}
Visual *pVisual = useDefaultVisual
? DefaultVisual(pDisplay, DefaultScreen(pDisplay))
: NULL;
/* Now create the application object */
QApplication a (pDisplay, argc, argv, (Qt::HANDLE) pVisual);
#else /* Q_WS_X11 */
QApplication a (argc, argv);
#endif /* Q_WS_X11 */
/* Qt4.3 version has the QProcess bug which freezing the application
* for 30 seconds. This bug is internally used at initialization of
* Cleanlooks style. So we have to change this style to another one.
* See http://trolltech.com/developer/task-tracker/index_html?id=179200&method=entry
* for details. */
if (VBoxGlobal::qtRTVersionString().startsWith ("4.3") &&
qobject_cast <QCleanlooksStyle*> (QApplication::style()))
QApplication::setStyle (new QPlastiqueStyle);
#ifdef Q_OS_SOLARIS
/* Use plastique look 'n feel for Solaris instead of the default motif (Qt 4.7.x) */
QApplication::setStyle (new QPlastiqueStyle);
#endif
#ifdef Q_WS_X11
/* This patch is not used for now on Solaris & OpenSolaris because
* there is no anti-aliasing enabled by default, Qt4 to be rebuilt. */
#ifndef Q_OS_SOLARIS
/* Cause Qt4 has the conflict with fontconfig application as a result
* sometimes substituting some fonts with non scaleable-anti-aliased
* bitmap font we are reseting substitutes for the current application
* font family if it is non scaleable-anti-aliased. */
QFontDatabase fontDataBase;
QString currentFamily (QApplication::font().family());
bool isCurrentScaleable = fontDataBase.isScalable (currentFamily);
/*
LogFlowFunc (("Font: Current family is '%s'. It is %s.\n",
currentFamily.toLatin1().constData(),
isCurrentScaleable ? "scalable" : "not scalable"));
QStringList subFamilies (QFont::substitutes (currentFamily));
foreach (QString sub, subFamilies)
{
bool isSubScalable = fontDataBase.isScalable (sub);
LogFlowFunc (("Font: Substitute family is '%s'. It is %s.\n",
sub.toLatin1().constData(),
isSubScalable ? "scalable" : "not scalable"));
}
*/
QString subFamily (QFont::substitute (currentFamily));
bool isSubScaleable = fontDataBase.isScalable (subFamily);
if (isCurrentScaleable && !isSubScaleable)
QFont::removeSubstitution (currentFamily);
#endif /* Q_OS_SOLARIS */
#endif
#ifdef Q_WS_WIN
/* Drag in the sound drivers and DLLs early to get rid of the delay taking
* place when the main menu bar (or any action from that menu bar) is
* activated for the first time. This delay is especially annoying if it
* happens when the VM is executing in real mode (which gives 100% CPU
* load and slows down the load process that happens on the main GUI
* thread to several seconds). */
PlaySound (NULL, NULL, 0);
#endif
#ifdef Q_WS_MAC
::darwinDisableIconsInMenus();
#endif /* Q_WS_MAC */
#ifdef Q_WS_X11
/* version check (major.minor are sensitive, fix number is ignored) */
if (VBoxGlobal::qtRTVersion() < (VBoxGlobal::qtCTVersion() & 0xFFFF00))
{
QString msg =
QApplication::tr ("Executable <b>%1</b> requires Qt %2.x, found Qt %3.")
.arg (qAppName())
.arg (VBoxGlobal::qtCTVersionString().section ('.', 0, 1))
.arg (VBoxGlobal::qtRTVersionString());
QMessageBox::critical (
0, QApplication::tr ("Incompatible Qt Library Error"),
msg, QMessageBox::Abort, 0);
qFatal ("%s", msg.toAscii().constData());
}
#endif
/* load a translation based on the current locale */
VBoxGlobal::loadLanguage();
do
{
if (!vboxGlobal().isValid())
break;
if (vboxGlobal().processArgs())
return 0;
msgCenter().checkForMountedWrongUSB();
VBoxGlobalSettings settings = vboxGlobal().settings();
/* Process known keys */
bool noSelector = settings.isFeatureActive ("noSelector");
if (vboxGlobal().isVMConsoleProcess())
{
#ifdef VBOX_GUI_WITH_SYSTRAY
if (vboxGlobal().trayIconInstall())
{
/* Nothing to do here yet. */
}
#endif
if (vboxGlobal().startMachine (vboxGlobal().managedVMUuid()))
{
vboxGlobal().setMainWindow (vboxGlobal().vmWindow());
rc = a.exec();
}
}
else if (noSelector)
{
msgCenter().cannotRunInSelectorMode();
}
else
{
#ifdef VBOX_BLEEDING_EDGE
msgCenter().showBEBWarning();
#else
# ifndef DEBUG
/* Check for BETA version */
QString vboxVersion (vboxGlobal().virtualBox().GetVersion());
if (vboxVersion.contains ("BETA"))
{
/* Allow to prevent this message */
QString str = vboxGlobal().virtualBox().
GetExtraData(GUI_PreventBetaWarning);
if (str != vboxVersion)
msgCenter().showBETAWarning();
}
# endif
#endif
vboxGlobal().setMainWindow (&vboxGlobal().selectorWnd());
#ifdef VBOX_GUI_WITH_SYSTRAY
if (vboxGlobal().trayIconInstall())
{
/* Nothing to do here yet. */
}
if (false == vboxGlobal().isTrayMenu())
{
#endif
vboxGlobal().selectorWnd().show();
#ifdef VBOX_WITH_REGISTRATION_REQUEST
vboxGlobal().showRegistrationDialog (false /* aForce */);
#endif
#ifdef VBOX_GUI_WITH_SYSTRAY
}
do
{
#endif
rc = a.exec();
#ifdef VBOX_GUI_WITH_SYSTRAY
} while (vboxGlobal().isTrayMenu());
#endif
}
}
while (0);
}
LogFlowFunc (("rc=%d\n", rc));
LogFlowFuncLeave();
return rc;
}
#ifndef VBOX_WITH_HARDENING
int main (int argc, char **argv, char **envp)
{
/* Initialize VBox Runtime. Initialize the SUPLib as well only if we
* are really about to start a VM. Don't do this if we are only starting
* the selector window. */
bool fInitSUPLib = false;
for (int i = 1; i < argc; i++)
{
/* NOTE: the check here must match the corresponding check for the
* options to start a VM in hardenedmain.cpp and VBoxGlobal.cpp exactly,
* otherwise there will be weird error messages. */
if ( !::strcmp(argv[i], "--startvm")
|| !::strcmp(argv[i], "-startvm"))
{
fInitSUPLib = true;
break;
}
}
int rc = RTR3InitExe(argc, &argv, fInitSUPLib ? RTR3INIT_FLAGS_SUPLIB : 0);
if (RT_FAILURE(rc))
{
QApplication a (argc, &argv[0]);
#ifdef Q_OS_SOLARIS
/* Use plastique look 'n feel for Solaris instead of the default motif (Qt 4.7.x) */
QApplication::setStyle (new QPlastiqueStyle);
#endif
QString msgTitle = QApplication::tr ("VirtualBox - Runtime Error");
QString msgText = "<html>";
switch (rc)
{
case VERR_VM_DRIVER_NOT_INSTALLED:
case VERR_VM_DRIVER_LOAD_ERROR:
msgText += QApplication::tr (
"<b>Cannot access the kernel driver!</b><br/><br/>");
# ifdef RT_OS_LINUX
msgText += g_QStrHintLinuxNoDriver;
# else
msgText += g_QStrHintOtherNoDriver;
# endif
break;
# ifdef RT_OS_LINUX
case VERR_NO_MEMORY:
msgText += g_QStrHintLinuxNoMemory;
break;
# endif
case VERR_VM_DRIVER_NOT_ACCESSIBLE:
msgText += QApplication::tr ("Kernel driver not accessible");
break;
case VERR_VM_DRIVER_VERSION_MISMATCH:
# ifdef RT_OS_LINUX
msgText += g_QStrHintLinuxWrongDriverVersion;
# else
msgText += g_QStrHintOtherWrongDriverVersion;
# endif
break;
default:
msgText += QApplication::tr (
"Unknown error %2 during initialization of the Runtime"
).arg (rc);
break;
}
msgText += "</html>";
QMessageBox::critical (
0, /* parent */
msgTitle,
msgText,
QMessageBox::Abort, /* button0 */
0); /* button1 */
return 1;
}
return TrustedMain (argc, argv, envp);
}
#else /* VBOX_WITH_HARDENING */
/**
* Hardened main failed, report the error without any unnecessary fuzz.
*
* @remarks Do not call IPRT here unless really required, it might not be
* initialized.
*/
extern "C" DECLEXPORT(void) TrustedError (const char *pszWhere, SUPINITOP enmWhat, int rc, const char *pszMsgFmt, va_list va)
{
# if defined(RT_OS_DARWIN)
ShutUpAppKit();
# endif
/*
* Init the Qt application object. This is a bit hackish as we
* don't have the argument vector handy.
*/
int argc = 0;
char *argv[2] = { NULL, NULL };
QApplication a (argc, &argv[0]);
/*
* Compose and show the error message.
*/
QString msgTitle = QApplication::tr ("VirtualBox - Error In %1").arg (pszWhere);
char msgBuf[1024];
vsprintf (msgBuf, pszMsgFmt, va);
QString msgText = QApplication::tr (
"<html><b>%1 (rc=%2)</b><br/><br/>").arg (msgBuf).arg (rc);
switch (enmWhat)
{
case kSupInitOp_Driver:
# ifdef RT_OS_LINUX
msgText += g_QStrHintLinuxNoDriver;
# else
msgText += g_QStrHintOtherNoDriver;
# endif
break;
# ifdef RT_OS_LINUX
case kSupInitOp_IPRT:
if (rc == VERR_NO_MEMORY)
msgText += g_QStrHintLinuxNoMemory;
else
# endif
if (rc == VERR_VM_DRIVER_VERSION_MISMATCH)
# ifdef RT_OS_LINUX
msgText += g_QStrHintLinuxWrongDriverVersion;
# else
msgText += g_QStrHintOtherWrongDriverVersion;
# endif
else
msgText += g_QStrHintReinstall;
break;
case kSupInitOp_Integrity:
case kSupInitOp_RootCheck:
msgText += g_QStrHintReinstall;
break;
default:
/* no hints here */
break;
}
msgText += "</html>";
# ifdef RT_OS_LINUX
sleep(2);
# endif
QMessageBox::critical (
0, /* parent */
msgTitle, /* title */
msgText, /* text */
QMessageBox::Abort, /* button0 */
0); /* button1 */
qFatal ("%s", msgText.toAscii().constData());
}
#endif /* VBOX_WITH_HARDENING */
| dezelin/virtualbox | src/VBox/Frontends/VirtualBox/src/main.cpp | C++ | gpl-2.0 | 23,802 |
<?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::_('COM_JOOBB_BOARDLEGEND'); ?></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> | srajib/share2learn | components/com_joobb/assets/templates/joobb/joobb_boardfooter.php | PHP | gpl-2.0 | 945 |
<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
> -- Audio Specification Structure</DT
><DT
><A
HREF="sdlopenaudio.html"
>SDL_OpenAudio</A
> -- Opens the audio device with the desired parameters.</DT
><DT
><A
HREF="sdlpauseaudio.html"
>SDL_PauseAudio</A
> -- Pauses and unpauses the audio callback processing</DT
><DT
><A
HREF="sdlgetaudiostatus.html"
>SDL_GetAudioStatus</A
> -- Get the current audio state</DT
><DT
><A
HREF="sdlloadwav.html"
>SDL_LoadWAV</A
> -- Load a WAVE file</DT
><DT
><A
HREF="sdlfreewav.html"
>SDL_FreeWAV</A
> -- Frees previously opened WAV data</DT
><DT
><A
HREF="sdlaudiocvt.html"
>SDL_AudioCVT</A
> -- Audio Conversion Structure</DT
><DT
><A
HREF="sdlbuildaudiocvt.html"
>SDL_BuildAudioCVT</A
> -- Initializes a SDL_AudioCVT structure for conversion</DT
><DT
><A
HREF="sdlconvertaudio.html"
>SDL_ConvertAudio</A
> -- Convert audio data to a desired audio format.</DT
><DT
><A
HREF="sdlmixaudio.html"
>SDL_MixAudio</A
> -- Mix audio data</DT
><DT
><A
HREF="sdllockaudio.html"
>SDL_LockAudio</A
> -- Lock out the callback function</DT
><DT
><A
HREF="sdlunlockaudio.html"
>SDL_UnlockAudio</A
> -- Unlock the callback function</DT
><DT
><A
HREF="sdlcloseaudio.html"
>SDL_CloseAudio</A
> -- 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
> | xzwang/fem | SDL-1.2.15/docs/html/audio.html | HTML | gpl-2.0 | 4,283 |
<nav>
<ul>
<li><a href="">Usuaris</a></li>
</ul>
</nav> | jaumesalatantinya/ng2admin | src/app/navbar/navbar-component.html | HTML | gpl-2.0 | 59 |
/* -*- c++ -*- ----------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
http://lammps.sandia.gov, Sandia National Laboratories
Steve Plimpton, [email protected]
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
certain rights in this software. This software is distributed under
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
#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
/* ERROR/WARNING messages:
E: Invalid pair style
The choice of pair style is unknown.
E: Invalid bond style
The choice of bond style is unknown.
E: Invalid angle style
The choice of angle style is unknown.
E: Invalid dihedral style
The choice of dihedral style is unknown.
E: Invalid improper style
The choice of improper style is unknown.
E: Invalid kspace style
The choice of kspace style is unknown.
E: Illegal ... command
Self-explanatory. Check the input script syntax and compare to the
documentation for the command. You can use -echo screen as a
command-line option when running LAMMPS to see the offending line.
E: Numeric index is out of bounds
A command with an argument that specifies an integer or range of
integers is using a value that is less than 1 or greater than the
maximum allowed limit.
*/
| anshumang/lammps-analytics | src/force.h | C | gpl-2.0 | 5,306 |
public class ValueGenerator {
}
| DB-SE/isp2014.marcus.kamieth | Algorithms_DataStructures_AspectJ/src/base/ValueGenerator.java | Java | gpl-2.0 | 35 |
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.DefaultComboBoxModel;
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)");
setDefaultCloseOperation(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 DefaultComboBoxModel(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/1374533657__settings.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);
}
}
| anugrahbsoe/RemasterKit | app.remasterkit/src/remasterkit/Menu_Utama.java | Java | gpl-2.0 | 6,973 |
/*
* Copyright (c) 2002-2003, Intel Corporation. All rights reserved.
* Created by: rusty.lynch REMOVE-THIS AT intel DOT com
* This file is licensed under the GPL license. For the full content
* of this license, see the COPYING file at the top level of this
* source tree.
Test case for assertion #4 of the sigaction system call that shows
that attempting to add SIGSTOP to the signal mask of SIGSEGV will
not result in sigaction returning -1
*/
#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;
}
| rogerq/ltp-ddt | testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-90.c | C | gpl-2.0 | 900 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2016-2017 University of Dundee & Open Microscopy Environment.
# All Rights Reserved.
# Use is subject to license terms supplied in LICENSE.txt
#
import requests
from Parse_OMERO_Properties 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)
| jburel/openmicroscopy | examples/Training/python/Json_Api/Login.py | Python | gpl-2.0 | 3,163 |
CREATE FUNCTION [dbo].[GetContributionsDetails]
(
@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.ContributionOptionsId, CASE WHEN sp.MaritalStatusId = 20 THEN 2 ELSE 1 END) = 2
AND ISNULL(p.ContributionOptionsId, CASE WHEN p.MaritalStatusId = 20 THEN 2 ELSE 1 END) = 2
THEN sp.PeopleId
ELSE c.PeopleId
END AS CreditGiverId,
CASE WHEN ISNULL(sp.ContributionOptionsId, CASE WHEN sp.MaritalStatusId = 20 THEN 2 ELSE 1 END) = 1
OR ISNULL(p.ContributionOptionsId, 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
| bvcms/bvcms | SqlScripts/BuildDb/Creating_dbo_GetContributionsDetails.sql | SQL | gpl-2.0 | 2,575 |
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("controllpanel-button");
super.getElement().setAttribute("title", desc);
this.setWidth("39px");
this.setHeight("39px");
}
public ControlPanelButton(String desc, String styleClass) {
this(desc);
this.addStyleName("controllbutton-" + styleClass);
}
}
| patrickbr/ferryleaks | src/com/algebraweb/editor/client/ControlPanelButton.java | Java | gpl-2.0 | 573 |
<?php
/**
* Intreface DAO
*
* @author: http://phpdao.com
* @date: 2013-11-06 23:13
*/
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);
}
?> | Digznav/DMG | files/old-projects/MIP/MIPhtml/FTU/class/dao/AccesoDAO.class.php | PHP | gpl-2.0 | 1,080 |
#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
'''
***BEGIN DESCRIPTION***
Type: Search - Description: Searches for any available data on a target against the Abuse.ch Malware Bazaar database.
***END DESCRIPTION***
'''
def POE(POE):
if (POE.logging == True):
LOG = logger()
newlogentry = ''
reputation_dump = ''
reputation_output_data = ''
malwarebazaar = ''
if (POE.logging == True):
newlogentry = 'Module: malware_bazaar_search'
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
| slaughterjames/static | modules/malware_bazaar_search.py | Python | gpl-2.0 | 5,588 |
<!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>
| creary/company | document/前端/Positioning_navigation/example.html | HTML | gpl-2.0 | 5,594 |
/*
* linux/kernel/exit.c
*
* Copyright (C) 1991, 1992 Linus Torvalds
*/
#include <linux/mm.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/capability.h>
#include <linux/completion.h>
#include <linux/personality.h>
#include <linux/tty.h>
#include <linux/iocontext.h>
#include <linux/key.h>
#include <linux/security.h>
#include <linux/cpu.h>
#include <linux/acct.h>
#include <linux/tsacct_kern.h>
#include <linux/file.h>
#include <linux/fdtable.h>
#include <linux/freezer.h>
#include <linux/binfmts.h>
#include <linux/nsproxy.h>
#include <linux/pid_namespace.h>
#include <linux/ptrace.h>
#include <linux/profile.h>
#include <linux/mount.h>
#include <linux/proc_fs.h>
#include <linux/kthread.h>
#include <linux/mempolicy.h>
#include <linux/taskstats_kern.h>
#include <linux/delayacct.h>
#include <linux/cgroup.h>
#include <linux/syscalls.h>
#include <linux/signal.h>
#include <linux/posix-timers.h>
#include <linux/cn_proc.h>
#include <linux/mutex.h>
#include <linux/futex.h>
#include <linux/pipe_fs_i.h>
#include <linux/audit.h> /* for audit_free() */
#include <linux/resource.h>
#include <linux/blkdev.h>
#include <linux/task_io_accounting_ops.h>
#include <linux/tracehook.h>
#include <linux/fs_struct.h>
#include <linux/init_task.h>
#include <linux/perf_event.h>
#include <trace/events/sched.h>
#include <linux/hw_breakpoint.h>
#include <linux/oom.h>
#include <linux/writeback.h>
#include <linux/shm.h>
#include <asm/uaccess.h>
#include <asm/unistd.h>
#include <asm/pgtable.h>
#include <asm/mmu_context.h>
#include <litmus/litmus.h>
extern void exit_od_table(struct task_struct *t);
static void exit_mm(struct task_struct * tsk);
static void __unhash_process(struct task_struct *p, bool group_dead)
{
nr_threads--;
detach_pid(p, PIDTYPE_PID);
if (group_dead) {
detach_pid(p, PIDTYPE_PGID);
detach_pid(p, PIDTYPE_SID);
list_del_rcu(&p->tasks);
list_del_init(&p->sibling);
__this_cpu_dec(process_counts);
}
list_del_rcu(&p->thread_group);
}
/*
* This function expects the tasklist_lock write-locked.
*/
static void __exit_signal(struct task_struct *tsk)
{
struct signal_struct *sig = tsk->signal;
bool group_dead = thread_group_leader(tsk);
struct sighand_struct *sighand;
struct tty_struct *uninitialized_var(tty);
cputime_t utime, stime;
sighand = rcu_dereference_check(tsk->sighand,
lockdep_tasklist_lock_is_held());
spin_lock(&sighand->siglock);
posix_cpu_timers_exit(tsk);
if (group_dead) {
posix_cpu_timers_exit_group(tsk);
tty = sig->tty;
sig->tty = NULL;
} else {
/*
* This can only happen if the caller is de_thread().
* FIXME: this is the temporary hack, we should teach
* posix-cpu-timers to handle this case correctly.
*/
if (unlikely(has_group_leader_pid(tsk)))
posix_cpu_timers_exit_group(tsk);
/*
* If there is any task waiting for the group exit
* then notify it:
*/
if (sig->notify_count > 0 && !--sig->notify_count)
wake_up_process(sig->group_exit_task);
if (tsk == sig->curr_target)
sig->curr_target = next_thread(tsk);
/*
* Accumulate here the counters for all threads but the
* group leader as they die, so they can be added into
* the process-wide totals when those are taken.
* The group leader stays around as a zombie as long
* as there are other threads. When it gets reaped,
* the exit.c code will add its counts into these totals.
* We won't ever get here for the group leader, since it
* will have been the last reference on the signal_struct.
*/
task_cputime(tsk, &utime, &stime);
sig->utime += utime;
sig->stime += stime;
sig->gtime += task_gtime(tsk);
sig->min_flt += tsk->min_flt;
sig->maj_flt += tsk->maj_flt;
sig->nvcsw += tsk->nvcsw;
sig->nivcsw += tsk->nivcsw;
sig->inblock += task_io_get_inblock(tsk);
sig->oublock += task_io_get_oublock(tsk);
task_io_accounting_add(&sig->ioac, &tsk->ioac);
sig->sum_sched_runtime += tsk->se.sum_exec_runtime;
}
sig->nr_threads--;
__unhash_process(tsk, group_dead);
/*
* Do this under ->siglock, we can race with another thread
* doing sigqueue_free() if we have SIGQUEUE_PREALLOC signals.
*/
flush_sigqueue(&tsk->pending);
tsk->sighand = NULL;
spin_unlock(&sighand->siglock);
__cleanup_sighand(sighand);
clear_tsk_thread_flag(tsk,TIF_SIGPENDING);
if (group_dead) {
flush_sigqueue(&sig->shared_pending);
tty_kref_put(tty);
}
}
static void delayed_put_task_struct(struct rcu_head *rhp)
{
struct task_struct *tsk = container_of(rhp, struct task_struct, rcu);
perf_event_delayed_put(tsk);
trace_sched_process_free(tsk);
put_task_struct(tsk);
}
void release_task(struct task_struct * p)
{
struct task_struct *leader;
int zap_leader;
repeat:
/* don't need to get the RCU readlock here - the process is dead and
* can't be modifying its own credentials. But shut RCU-lockdep up */
rcu_read_lock();
atomic_dec(&__task_cred(p)->user->processes);
rcu_read_unlock();
proc_flush_task(p);
write_lock_irq(&tasklist_lock);
ptrace_release_task(p);
__exit_signal(p);
/*
* If we are the last non-leader member of the thread
* group, and the leader is zombie, then notify the
* group leader's parent process. (if it wants notification.)
*/
zap_leader = 0;
leader = p->group_leader;
if (leader != p && thread_group_empty(leader) && leader->exit_state == EXIT_ZOMBIE) {
/*
* If we were the last child thread and the leader has
* exited already, and the leader's parent ignores SIGCHLD,
* then we are the one who should release the leader.
*/
zap_leader = do_notify_parent(leader, leader->exit_signal);
if (zap_leader)
leader->exit_state = EXIT_DEAD;
}
write_unlock_irq(&tasklist_lock);
release_thread(p);
call_rcu(&p->rcu, delayed_put_task_struct);
p = leader;
if (unlikely(zap_leader))
goto repeat;
}
/*
* This checks not only the pgrp, but falls back on the pid if no
* satisfactory pgrp is found. I dunno - gdb doesn't work correctly
* without this...
*
* The caller must hold rcu lock or the tasklist lock.
*/
struct pid *session_of_pgrp(struct pid *pgrp)
{
struct task_struct *p;
struct pid *sid = NULL;
p = pid_task(pgrp, PIDTYPE_PGID);
if (p == NULL)
p = pid_task(pgrp, PIDTYPE_PID);
if (p != NULL)
sid = task_session(p);
return sid;
}
/*
* Determine if a process group is "orphaned", according to the POSIX
* definition in 2.2.2.52. Orphaned process groups are not to be affected
* by terminal-generated stop signals. Newly orphaned process groups are
* to receive a SIGHUP and a SIGCONT.
*
* "I ask you, have you ever known what it is to be an orphan?"
*/
static int will_become_orphaned_pgrp(struct pid *pgrp, struct task_struct *ignored_task)
{
struct task_struct *p;
do_each_pid_task(pgrp, PIDTYPE_PGID, p) {
if ((p == ignored_task) ||
(p->exit_state && thread_group_empty(p)) ||
is_global_init(p->real_parent))
continue;
if (task_pgrp(p->real_parent) != pgrp &&
task_session(p->real_parent) == task_session(p))
return 0;
} while_each_pid_task(pgrp, PIDTYPE_PGID, p);
return 1;
}
int is_current_pgrp_orphaned(void)
{
int retval;
read_lock(&tasklist_lock);
retval = will_become_orphaned_pgrp(task_pgrp(current), NULL);
read_unlock(&tasklist_lock);
return retval;
}
static bool has_stopped_jobs(struct pid *pgrp)
{
struct task_struct *p;
do_each_pid_task(pgrp, PIDTYPE_PGID, p) {
if (p->signal->flags & SIGNAL_STOP_STOPPED)
return true;
} while_each_pid_task(pgrp, PIDTYPE_PGID, p);
return false;
}
/*
* Check to see if any process groups have become orphaned as
* a result of our exiting, and if they have any stopped jobs,
* send them a SIGHUP and then a SIGCONT. (POSIX 3.2.2.2)
*/
static void
kill_orphaned_pgrp(struct task_struct *tsk, struct task_struct *parent)
{
struct pid *pgrp = task_pgrp(tsk);
struct task_struct *ignored_task = tsk;
if (!parent)
/* exit: our father is in a different pgrp than
* we are and we were the only connection outside.
*/
parent = tsk->real_parent;
else
/* reparent: our child is in a different pgrp than
* we are, and it was the only connection outside.
*/
ignored_task = NULL;
if (task_pgrp(parent) != pgrp &&
task_session(parent) == task_session(tsk) &&
will_become_orphaned_pgrp(pgrp, ignored_task) &&
has_stopped_jobs(pgrp)) {
__kill_pgrp_info(SIGHUP, SEND_SIG_PRIV, pgrp);
__kill_pgrp_info(SIGCONT, SEND_SIG_PRIV, pgrp);
}
}
void __set_special_pids(struct pid *pid)
{
struct task_struct *curr = current->group_leader;
if (task_session(curr) != pid)
change_pid(curr, PIDTYPE_SID, pid);
if (task_pgrp(curr) != pid)
change_pid(curr, PIDTYPE_PGID, pid);
}
/*
* Let kernel threads use this to say that they allow a certain signal.
* Must not be used if kthread was cloned with CLONE_SIGHAND.
*/
int allow_signal(int sig)
{
if (!valid_signal(sig) || sig < 1)
return -EINVAL;
spin_lock_irq(¤t->sighand->siglock);
/* This is only needed for daemonize()'ed kthreads */
sigdelset(¤t->blocked, sig);
/*
* Kernel threads handle their own signals. Let the signal code
* know it'll be handled, so that they don't get converted to
* SIGKILL or just silently dropped.
*/
current->sighand->action[(sig)-1].sa.sa_handler = (void __user *)2;
recalc_sigpending();
spin_unlock_irq(¤t->sighand->siglock);
return 0;
}
EXPORT_SYMBOL(allow_signal);
int disallow_signal(int sig)
{
if (!valid_signal(sig) || sig < 1)
return -EINVAL;
spin_lock_irq(¤t->sighand->siglock);
current->sighand->action[(sig)-1].sa.sa_handler = SIG_IGN;
recalc_sigpending();
spin_unlock_irq(¤t->sighand->siglock);
return 0;
}
EXPORT_SYMBOL(disallow_signal);
#ifdef CONFIG_MM_OWNER
/*
* A task is exiting. If it owned this mm, find a new owner for the mm.
*/
void mm_update_next_owner(struct mm_struct *mm)
{
struct task_struct *c, *g, *p = current;
retry:
/*
* If the exiting or execing task is not the owner, it's
* someone else's problem.
*/
if (mm->owner != p)
return;
/*
* The current owner is exiting/execing and there are no other
* candidates. Do not leave the mm pointing to a possibly
* freed task structure.
*/
if (atomic_read(&mm->mm_users) <= 1) {
mm->owner = NULL;
return;
}
read_lock(&tasklist_lock);
/*
* Search in the children
*/
list_for_each_entry(c, &p->children, sibling) {
if (c->mm == mm)
goto assign_new_owner;
}
/*
* Search in the siblings
*/
list_for_each_entry(c, &p->real_parent->children, sibling) {
if (c->mm == mm)
goto assign_new_owner;
}
/*
* Search through everything else. We should not get
* here often
*/
do_each_thread(g, c) {
if (c->mm == mm)
goto assign_new_owner;
} while_each_thread(g, c);
read_unlock(&tasklist_lock);
/*
* We found no owner yet mm_users > 1: this implies that we are
* most likely racing with swapoff (try_to_unuse()) or /proc or
* ptrace or page migration (get_task_mm()). Mark owner as NULL.
*/
mm->owner = NULL;
return;
assign_new_owner:
BUG_ON(c == p);
get_task_struct(c);
/*
* The task_lock protects c->mm from changing.
* We always want mm->owner->mm == mm
*/
task_lock(c);
/*
* Delay read_unlock() till we have the task_lock()
* to ensure that c does not slip away underneath us
*/
read_unlock(&tasklist_lock);
if (c->mm != mm) {
task_unlock(c);
put_task_struct(c);
goto retry;
}
mm->owner = c;
task_unlock(c);
put_task_struct(c);
}
#endif /* CONFIG_MM_OWNER */
/*
* Turn us into a lazy TLB process if we
* aren't already..
*/
static void exit_mm(struct task_struct * tsk)
{
struct mm_struct *mm = tsk->mm;
struct core_state *core_state;
mm_release(tsk, mm);
if (!mm)
return;
sync_mm_rss(mm);
/*
* Serialize with any possible pending coredump.
* We must hold mmap_sem around checking core_state
* and clearing tsk->mm. The core-inducing thread
* will increment ->nr_threads for each thread in the
* group with ->mm != NULL.
*/
down_read(&mm->mmap_sem);
core_state = mm->core_state;
if (core_state) {
struct core_thread self;
up_read(&mm->mmap_sem);
self.task = tsk;
self.next = xchg(&core_state->dumper.next, &self);
/*
* Implies mb(), the result of xchg() must be visible
* to core_state->dumper.
*/
if (atomic_dec_and_test(&core_state->nr_threads))
complete(&core_state->startup);
for (;;) {
set_task_state(tsk, TASK_UNINTERRUPTIBLE);
if (!self.task) /* see coredump_finish() */
break;
freezable_schedule();
}
__set_task_state(tsk, TASK_RUNNING);
down_read(&mm->mmap_sem);
}
atomic_inc(&mm->mm_count);
BUG_ON(mm != tsk->active_mm);
/* more a memory barrier than a real lock */
task_lock(tsk);
tsk->mm = NULL;
up_read(&mm->mmap_sem);
enter_lazy_tlb(mm, current);
task_unlock(tsk);
mm_update_next_owner(mm);
mmput(mm);
}
/*
* When we die, we re-parent all our children, and try to:
* 1. give them to another thread in our thread group, if such a member exists
* 2. give it to the first ancestor process which prctl'd itself as a
* child_subreaper for its children (like a service manager)
* 3. give it to the init process (PID 1) in our pid namespace
*/
static struct task_struct *find_new_reaper(struct task_struct *father)
__releases(&tasklist_lock)
__acquires(&tasklist_lock)
{
struct pid_namespace *pid_ns = task_active_pid_ns(father);
struct task_struct *thread;
thread = father;
while_each_thread(father, thread) {
if (thread->flags & PF_EXITING)
continue;
if (unlikely(pid_ns->child_reaper == father))
pid_ns->child_reaper = thread;
return thread;
}
if (unlikely(pid_ns->child_reaper == father)) {
write_unlock_irq(&tasklist_lock);
if (unlikely(pid_ns == &init_pid_ns)) {
panic("Attempted to kill init! exitcode=0x%08x\n",
father->signal->group_exit_code ?:
father->exit_code);
}
zap_pid_ns_processes(pid_ns);
write_lock_irq(&tasklist_lock);
} else if (father->signal->has_child_subreaper) {
struct task_struct *reaper;
/*
* Find the first ancestor marked as child_subreaper.
* Note that the code below checks same_thread_group(reaper,
* pid_ns->child_reaper). This is what we need to DTRT in a
* PID namespace. However we still need the check above, see
* http://marc.info/?l=linux-kernel&m=131385460420380
*/
for (reaper = father->real_parent;
reaper != &init_task;
reaper = reaper->real_parent) {
if (same_thread_group(reaper, pid_ns->child_reaper))
break;
if (!reaper->signal->is_child_subreaper)
continue;
thread = reaper;
do {
if (!(thread->flags & PF_EXITING))
return reaper;
} while_each_thread(reaper, thread);
}
}
return pid_ns->child_reaper;
}
/*
* Any that need to be release_task'd are put on the @dead list.
*/
static void reparent_leader(struct task_struct *father, struct task_struct *p,
struct list_head *dead)
{
list_move_tail(&p->sibling, &p->real_parent->children);
/*
* If this is a threaded reparent there is no need to
* notify anyone anything has happened.
*/
if (same_thread_group(p->real_parent, father))
return;
/*
* We don't want people slaying init.
*
* Note: we do this even if it is EXIT_DEAD, wait_task_zombie()
* can change ->exit_state to EXIT_ZOMBIE. If this is the final
* state, do_notify_parent() was already called and ->exit_signal
* doesn't matter.
*/
p->exit_signal = SIGCHLD;
if (p->exit_state == EXIT_DEAD)
return;
/* If it has exited notify the new parent about this child's death. */
if (!p->ptrace &&
p->exit_state == EXIT_ZOMBIE && thread_group_empty(p)) {
if (do_notify_parent(p, p->exit_signal)) {
p->exit_state = EXIT_DEAD;
list_move_tail(&p->sibling, dead);
}
}
kill_orphaned_pgrp(p, father);
}
static void forget_original_parent(struct task_struct *father)
{
struct task_struct *p, *n, *reaper;
LIST_HEAD(dead_children);
write_lock_irq(&tasklist_lock);
/*
* Note that exit_ptrace() and find_new_reaper() might
* drop tasklist_lock and reacquire it.
*/
exit_ptrace(father);
reaper = find_new_reaper(father);
list_for_each_entry_safe(p, n, &father->children, sibling) {
struct task_struct *t = p;
do {
t->real_parent = reaper;
if (t->parent == father) {
BUG_ON(t->ptrace);
t->parent = t->real_parent;
}
if (t->pdeath_signal)
group_send_sig_info(t->pdeath_signal,
SEND_SIG_NOINFO, t);
} while_each_thread(p, t);
reparent_leader(father, p, &dead_children);
}
write_unlock_irq(&tasklist_lock);
BUG_ON(!list_empty(&father->children));
list_for_each_entry_safe(p, n, &dead_children, sibling) {
list_del_init(&p->sibling);
release_task(p);
}
}
/*
* Send signals to all our closest relatives so that they know
* to properly mourn us..
*/
static void exit_notify(struct task_struct *tsk, int group_dead)
{
bool autoreap;
/*
* This does two things:
*
* A. Make init inherit all the child processes
* B. Check to see if any process groups have become orphaned
* as a result of our exiting, and if they have any stopped
* jobs, send them a SIGHUP and then a SIGCONT. (POSIX 3.2.2.2)
*/
forget_original_parent(tsk);
write_lock_irq(&tasklist_lock);
if (group_dead)
kill_orphaned_pgrp(tsk->group_leader, NULL);
if (unlikely(tsk->ptrace)) {
int sig = thread_group_leader(tsk) &&
thread_group_empty(tsk) &&
!ptrace_reparented(tsk) ?
tsk->exit_signal : SIGCHLD;
autoreap = do_notify_parent(tsk, sig);
} else if (thread_group_leader(tsk)) {
autoreap = thread_group_empty(tsk) &&
do_notify_parent(tsk, tsk->exit_signal);
} else {
autoreap = true;
}
tsk->exit_state = autoreap ? EXIT_DEAD : EXIT_ZOMBIE;
/* mt-exec, de_thread() is waiting for group leader */
if (unlikely(tsk->signal->notify_count < 0))
wake_up_process(tsk->signal->group_exit_task);
write_unlock_irq(&tasklist_lock);
/* If the process is dead, release it - nobody will wait for it */
if (autoreap)
release_task(tsk);
}
#ifdef CONFIG_DEBUG_STACK_USAGE
static void check_stack_usage(void)
{
static DEFINE_SPINLOCK(low_water_lock);
static int lowest_to_date = THREAD_SIZE;
unsigned long free;
free = stack_not_used(current);
if (free >= lowest_to_date)
return;
spin_lock(&low_water_lock);
if (free < lowest_to_date) {
printk(KERN_WARNING "%s (%d) used greatest stack depth: "
"%lu bytes left\n",
current->comm, task_pid_nr(current), free);
lowest_to_date = free;
}
spin_unlock(&low_water_lock);
}
#else
static inline void check_stack_usage(void) {}
#endif
void do_exit(long code)
{
struct task_struct *tsk = current;
int group_dead;
profile_task_exit(tsk);
WARN_ON(blk_needs_flush_plug(tsk));
if (unlikely(in_interrupt()))
panic("Aiee, killing interrupt handler!");
if (unlikely(!tsk->pid))
panic("Attempted to kill the idle task!");
if (unlikely(is_realtime(tsk))) {
/* We would like the task to be polite
* and transition out of RT mode first.
* Let's give it a little help.
*/
litmus_do_exit(tsk);
BUG_ON(is_realtime(tsk));
}
/*
* If do_exit is called because this processes oopsed, it's possible
* that get_fs() was left as KERNEL_DS, so reset it to USER_DS before
* continuing. Amongst other possible reasons, this is to prevent
* mm_release()->clear_child_tid() from writing to a user-controlled
* kernel address.
*/
set_fs(USER_DS);
ptrace_event(PTRACE_EVENT_EXIT, code);
validate_creds_for_do_exit(tsk);
/*
* We're taking recursive faults here in do_exit. Safest is to just
* leave this task alone and wait for reboot.
*/
if (unlikely(tsk->flags & PF_EXITING)) {
printk(KERN_ALERT
"Fixing recursive fault but reboot is needed!\n");
/*
* We can do this unlocked here. The futex code uses
* this flag just to verify whether the pi state
* cleanup has been done or not. In the worst case it
* loops once more. We pretend that the cleanup was
* done as there is no way to return. Either the
* OWNER_DIED bit is set by now or we push the blocked
* task into the wait for ever nirwana as well.
*/
tsk->flags |= PF_EXITPIDONE;
set_current_state(TASK_UNINTERRUPTIBLE);
schedule();
}
exit_signals(tsk); /* sets PF_EXITING */
/*
* tsk->flags are checked in the futex code to protect against
* an exiting task cleaning up the robust pi futexes.
*/
smp_mb();
raw_spin_unlock_wait(&tsk->pi_lock);
if (unlikely(in_atomic()))
printk(KERN_INFO "note: %s[%d] exited with preempt_count %d\n",
current->comm, task_pid_nr(current),
preempt_count());
acct_update_integrals(tsk);
/* sync mm's RSS info before statistics gathering */
if (tsk->mm)
sync_mm_rss(tsk->mm);
group_dead = atomic_dec_and_test(&tsk->signal->live);
if (group_dead) {
hrtimer_cancel(&tsk->signal->real_timer);
exit_itimers(tsk->signal);
if (tsk->mm)
setmax_mm_hiwater_rss(&tsk->signal->maxrss, tsk->mm);
}
acct_collect(code, group_dead);
if (group_dead)
tty_audit_exit();
audit_free(tsk);
exit_od_table(tsk);
tsk->exit_code = code;
taskstats_exit(tsk, group_dead);
exit_mm(tsk);
if (group_dead)
acct_process();
trace_sched_process_exit(tsk);
exit_sem(tsk);
exit_shm(tsk);
exit_files(tsk);
exit_fs(tsk);
if (group_dead)
disassociate_ctty(1);
exit_task_namespaces(tsk);
exit_task_work(tsk);
check_stack_usage();
exit_thread();
/*
* Flush inherited counters to the parent - before the parent
* gets woken up by child-exit notifications.
*
* because of cgroup mode, must be called before cgroup_exit()
*/
perf_event_exit_task(tsk);
cgroup_exit(tsk, 1);
module_put(task_thread_info(tsk)->exec_domain->module);
proc_exit_connector(tsk);
/*
* FIXME: do that only when needed, using sched_exit tracepoint
*/
ptrace_put_breakpoints(tsk);
exit_notify(tsk, group_dead);
#ifdef CONFIG_NUMA
task_lock(tsk);
mpol_put(tsk->mempolicy);
tsk->mempolicy = NULL;
task_unlock(tsk);
#endif
#ifdef CONFIG_FUTEX
if (unlikely(current->pi_state_cache))
kfree(current->pi_state_cache);
#endif
/*
* Make sure we are holding no locks:
*/
debug_check_no_locks_held(tsk);
/*
* We can do this unlocked here. The futex code uses this flag
* just to verify whether the pi state cleanup has been done
* or not. In the worst case it loops once more.
*/
tsk->flags |= PF_EXITPIDONE;
if (tsk->io_context)
exit_io_context(tsk);
if (tsk->splice_pipe)
free_pipe_info(tsk->splice_pipe);
if (tsk->task_frag.page)
put_page(tsk->task_frag.page);
validate_creds_for_do_exit(tsk);
preempt_disable();
if (tsk->nr_dirtied)
__this_cpu_add(dirty_throttle_leaks, tsk->nr_dirtied);
exit_rcu();
/*
* The setting of TASK_RUNNING by try_to_wake_up() may be delayed
* when the following two conditions become true.
* - There is race condition of mmap_sem (It is acquired by
* exit_mm()), and
* - SMI occurs before setting TASK_RUNINNG.
* (or hypervisor of virtual machine switches to other guest)
* As a result, we may become TASK_RUNNING after becoming TASK_DEAD
*
* To avoid it, we have to wait for releasing tsk->pi_lock which
* is held by try_to_wake_up()
*/
smp_mb();
raw_spin_unlock_wait(&tsk->pi_lock);
/* causes final put_task_struct in finish_task_switch(). */
tsk->state = TASK_DEAD;
tsk->flags |= PF_NOFREEZE; /* tell freezer to ignore us */
schedule();
BUG();
/* Avoid "noreturn function does return". */
for (;;)
cpu_relax(); /* For when BUG is null */
}
EXPORT_SYMBOL_GPL(do_exit);
void complete_and_exit(struct completion *comp, long code)
{
if (comp)
complete(comp);
do_exit(code);
}
EXPORT_SYMBOL(complete_and_exit);
SYSCALL_DEFINE1(exit, int, error_code)
{
do_exit((error_code&0xff)<<8);
}
/*
* Take down every thread in the group. This is called by fatal signals
* as well as by sys_exit_group (below).
*/
void
do_group_exit(int exit_code)
{
struct signal_struct *sig = current->signal;
BUG_ON(exit_code & 0x80); /* core dumps don't get here */
if (signal_group_exit(sig))
exit_code = sig->group_exit_code;
else if (!thread_group_empty(current)) {
struct sighand_struct *const sighand = current->sighand;
spin_lock_irq(&sighand->siglock);
if (signal_group_exit(sig))
/* Another thread got here before we took the lock. */
exit_code = sig->group_exit_code;
else {
sig->group_exit_code = exit_code;
sig->flags = SIGNAL_GROUP_EXIT;
zap_other_threads(current);
}
spin_unlock_irq(&sighand->siglock);
}
do_exit(exit_code);
/* NOTREACHED */
}
/*
* this kills every thread in the thread group. Note that any externally
* wait4()-ing process will get the correct exit code - even if this
* thread is not the thread group leader.
*/
SYSCALL_DEFINE1(exit_group, int, error_code)
{
do_group_exit((error_code & 0xff) << 8);
/* NOTREACHED */
return 0;
}
struct wait_opts {
enum pid_type wo_type;
int wo_flags;
struct pid *wo_pid;
struct siginfo __user *wo_info;
int __user *wo_stat;
struct rusage __user *wo_rusage;
wait_queue_t child_wait;
int notask_error;
};
static inline
struct pid *task_pid_type(struct task_struct *task, enum pid_type type)
{
if (type != PIDTYPE_PID)
task = task->group_leader;
return task->pids[type].pid;
}
static int eligible_pid(struct wait_opts *wo, struct task_struct *p)
{
return wo->wo_type == PIDTYPE_MAX ||
task_pid_type(p, wo->wo_type) == wo->wo_pid;
}
static int eligible_child(struct wait_opts *wo, struct task_struct *p)
{
if (!eligible_pid(wo, p))
return 0;
/* Wait for all children (clone and not) if __WALL is set;
* otherwise, wait for clone children *only* if __WCLONE is
* set; otherwise, wait for non-clone children *only*. (Note:
* A "clone" child here is one that reports to its parent
* using a signal other than SIGCHLD.) */
if (((p->exit_signal != SIGCHLD) ^ !!(wo->wo_flags & __WCLONE))
&& !(wo->wo_flags & __WALL))
return 0;
return 1;
}
static int wait_noreap_copyout(struct wait_opts *wo, struct task_struct *p,
pid_t pid, uid_t uid, int why, int status)
{
struct siginfo __user *infop;
int retval = wo->wo_rusage
? getrusage(p, RUSAGE_BOTH, wo->wo_rusage) : 0;
put_task_struct(p);
infop = wo->wo_info;
if (infop) {
if (!retval)
retval = put_user(SIGCHLD, &infop->si_signo);
if (!retval)
retval = put_user(0, &infop->si_errno);
if (!retval)
retval = put_user((short)why, &infop->si_code);
if (!retval)
retval = put_user(pid, &infop->si_pid);
if (!retval)
retval = put_user(uid, &infop->si_uid);
if (!retval)
retval = put_user(status, &infop->si_status);
}
if (!retval)
retval = pid;
return retval;
}
/*
* Handle sys_wait4 work for one task in state EXIT_ZOMBIE. We hold
* read_lock(&tasklist_lock) on entry. If we return zero, we still hold
* the lock and this task is uninteresting. If we return nonzero, we have
* released the lock and the system call should return.
*/
static int wait_task_zombie(struct wait_opts *wo, struct task_struct *p)
{
unsigned long state;
int retval, status, traced;
pid_t pid = task_pid_vnr(p);
uid_t uid = from_kuid_munged(current_user_ns(), task_uid(p));
struct siginfo __user *infop;
if (!likely(wo->wo_flags & WEXITED))
return 0;
if (unlikely(wo->wo_flags & WNOWAIT)) {
int exit_code = p->exit_code;
int why;
get_task_struct(p);
read_unlock(&tasklist_lock);
if ((exit_code & 0x7f) == 0) {
why = CLD_EXITED;
status = exit_code >> 8;
} else {
why = (exit_code & 0x80) ? CLD_DUMPED : CLD_KILLED;
status = exit_code & 0x7f;
}
return wait_noreap_copyout(wo, p, pid, uid, why, status);
}
/*
* Try to move the task's state to DEAD
* only one thread is allowed to do this:
*/
state = xchg(&p->exit_state, EXIT_DEAD);
if (state != EXIT_ZOMBIE) {
BUG_ON(state != EXIT_DEAD);
return 0;
}
traced = ptrace_reparented(p);
/*
* It can be ptraced but not reparented, check
* thread_group_leader() to filter out sub-threads.
*/
if (likely(!traced) && thread_group_leader(p)) {
struct signal_struct *psig;
struct signal_struct *sig;
unsigned long maxrss;
cputime_t tgutime, tgstime;
/*
* The resource counters for the group leader are in its
* own task_struct. Those for dead threads in the group
* are in its signal_struct, as are those for the child
* processes it has previously reaped. All these
* accumulate in the parent's signal_struct c* fields.
*
* We don't bother to take a lock here to protect these
* p->signal fields, because they are only touched by
* __exit_signal, which runs with tasklist_lock
* write-locked anyway, and so is excluded here. We do
* need to protect the access to parent->signal fields,
* as other threads in the parent group can be right
* here reaping other children at the same time.
*
* We use thread_group_cputime_adjusted() to get times for the thread
* group, which consolidates times for all threads in the
* group including the group leader.
*/
thread_group_cputime_adjusted(p, &tgutime, &tgstime);
spin_lock_irq(&p->real_parent->sighand->siglock);
psig = p->real_parent->signal;
sig = p->signal;
psig->cutime += tgutime + sig->cutime;
psig->cstime += tgstime + sig->cstime;
psig->cgtime += task_gtime(p) + sig->gtime + sig->cgtime;
psig->cmin_flt +=
p->min_flt + sig->min_flt + sig->cmin_flt;
psig->cmaj_flt +=
p->maj_flt + sig->maj_flt + sig->cmaj_flt;
psig->cnvcsw +=
p->nvcsw + sig->nvcsw + sig->cnvcsw;
psig->cnivcsw +=
p->nivcsw + sig->nivcsw + sig->cnivcsw;
psig->cinblock +=
task_io_get_inblock(p) +
sig->inblock + sig->cinblock;
psig->coublock +=
task_io_get_oublock(p) +
sig->oublock + sig->coublock;
maxrss = max(sig->maxrss, sig->cmaxrss);
if (psig->cmaxrss < maxrss)
psig->cmaxrss = maxrss;
task_io_accounting_add(&psig->ioac, &p->ioac);
task_io_accounting_add(&psig->ioac, &sig->ioac);
spin_unlock_irq(&p->real_parent->sighand->siglock);
}
/*
* Now we are sure this task is interesting, and no other
* thread can reap it because we set its state to EXIT_DEAD.
*/
read_unlock(&tasklist_lock);
retval = wo->wo_rusage
? getrusage(p, RUSAGE_BOTH, wo->wo_rusage) : 0;
status = (p->signal->flags & SIGNAL_GROUP_EXIT)
? p->signal->group_exit_code : p->exit_code;
if (!retval && wo->wo_stat)
retval = put_user(status, wo->wo_stat);
infop = wo->wo_info;
if (!retval && infop)
retval = put_user(SIGCHLD, &infop->si_signo);
if (!retval && infop)
retval = put_user(0, &infop->si_errno);
if (!retval && infop) {
int why;
if ((status & 0x7f) == 0) {
why = CLD_EXITED;
status >>= 8;
} else {
why = (status & 0x80) ? CLD_DUMPED : CLD_KILLED;
status &= 0x7f;
}
retval = put_user((short)why, &infop->si_code);
if (!retval)
retval = put_user(status, &infop->si_status);
}
if (!retval && infop)
retval = put_user(pid, &infop->si_pid);
if (!retval && infop)
retval = put_user(uid, &infop->si_uid);
if (!retval)
retval = pid;
if (traced) {
write_lock_irq(&tasklist_lock);
/* We dropped tasklist, ptracer could die and untrace */
ptrace_unlink(p);
/*
* If this is not a sub-thread, notify the parent.
* If parent wants a zombie, don't release it now.
*/
if (thread_group_leader(p) &&
!do_notify_parent(p, p->exit_signal)) {
p->exit_state = EXIT_ZOMBIE;
p = NULL;
}
write_unlock_irq(&tasklist_lock);
}
if (p != NULL)
release_task(p);
return retval;
}
static int *task_stopped_code(struct task_struct *p, bool ptrace)
{
if (ptrace) {
if (task_is_stopped_or_traced(p) &&
!(p->jobctl & JOBCTL_LISTENING))
return &p->exit_code;
} else {
if (p->signal->flags & SIGNAL_STOP_STOPPED)
return &p->signal->group_exit_code;
}
return NULL;
}
/**
* wait_task_stopped - Wait for %TASK_STOPPED or %TASK_TRACED
* @wo: wait options
* @ptrace: is the wait for ptrace
* @p: task to wait for
*
* Handle sys_wait4() work for %p in state %TASK_STOPPED or %TASK_TRACED.
*
* CONTEXT:
* read_lock(&tasklist_lock), which is released if return value is
* non-zero. Also, grabs and releases @p->sighand->siglock.
*
* RETURNS:
* 0 if wait condition didn't exist and search for other wait conditions
* should continue. Non-zero return, -errno on failure and @p's pid on
* success, implies that tasklist_lock is released and wait condition
* search should terminate.
*/
static int wait_task_stopped(struct wait_opts *wo,
int ptrace, struct task_struct *p)
{
struct siginfo __user *infop;
int retval, exit_code, *p_code, why;
uid_t uid = 0; /* unneeded, required by compiler */
pid_t pid;
/*
* Traditionally we see ptrace'd stopped tasks regardless of options.
*/
if (!ptrace && !(wo->wo_flags & WUNTRACED))
return 0;
if (!task_stopped_code(p, ptrace))
return 0;
exit_code = 0;
spin_lock_irq(&p->sighand->siglock);
p_code = task_stopped_code(p, ptrace);
if (unlikely(!p_code))
goto unlock_sig;
exit_code = *p_code;
if (!exit_code)
goto unlock_sig;
if (!unlikely(wo->wo_flags & WNOWAIT))
*p_code = 0;
uid = from_kuid_munged(current_user_ns(), task_uid(p));
unlock_sig:
spin_unlock_irq(&p->sighand->siglock);
if (!exit_code)
return 0;
/*
* Now we are pretty sure this task is interesting.
* Make sure it doesn't get reaped out from under us while we
* give up the lock and then examine it below. We don't want to
* keep holding onto the tasklist_lock while we call getrusage and
* possibly take page faults for user memory.
*/
get_task_struct(p);
pid = task_pid_vnr(p);
why = ptrace ? CLD_TRAPPED : CLD_STOPPED;
read_unlock(&tasklist_lock);
if (unlikely(wo->wo_flags & WNOWAIT))
return wait_noreap_copyout(wo, p, pid, uid, why, exit_code);
retval = wo->wo_rusage
? getrusage(p, RUSAGE_BOTH, wo->wo_rusage) : 0;
if (!retval && wo->wo_stat)
retval = put_user((exit_code << 8) | 0x7f, wo->wo_stat);
infop = wo->wo_info;
if (!retval && infop)
retval = put_user(SIGCHLD, &infop->si_signo);
if (!retval && infop)
retval = put_user(0, &infop->si_errno);
if (!retval && infop)
retval = put_user((short)why, &infop->si_code);
if (!retval && infop)
retval = put_user(exit_code, &infop->si_status);
if (!retval && infop)
retval = put_user(pid, &infop->si_pid);
if (!retval && infop)
retval = put_user(uid, &infop->si_uid);
if (!retval)
retval = pid;
put_task_struct(p);
BUG_ON(!retval);
return retval;
}
/*
* Handle do_wait work for one task in a live, non-stopped state.
* read_lock(&tasklist_lock) on entry. If we return zero, we still hold
* the lock and this task is uninteresting. If we return nonzero, we have
* released the lock and the system call should return.
*/
static int wait_task_continued(struct wait_opts *wo, struct task_struct *p)
{
int retval;
pid_t pid;
uid_t uid;
if (!unlikely(wo->wo_flags & WCONTINUED))
return 0;
if (!(p->signal->flags & SIGNAL_STOP_CONTINUED))
return 0;
spin_lock_irq(&p->sighand->siglock);
/* Re-check with the lock held. */
if (!(p->signal->flags & SIGNAL_STOP_CONTINUED)) {
spin_unlock_irq(&p->sighand->siglock);
return 0;
}
if (!unlikely(wo->wo_flags & WNOWAIT))
p->signal->flags &= ~SIGNAL_STOP_CONTINUED;
uid = from_kuid_munged(current_user_ns(), task_uid(p));
spin_unlock_irq(&p->sighand->siglock);
pid = task_pid_vnr(p);
get_task_struct(p);
read_unlock(&tasklist_lock);
if (!wo->wo_info) {
retval = wo->wo_rusage
? getrusage(p, RUSAGE_BOTH, wo->wo_rusage) : 0;
put_task_struct(p);
if (!retval && wo->wo_stat)
retval = put_user(0xffff, wo->wo_stat);
if (!retval)
retval = pid;
} else {
retval = wait_noreap_copyout(wo, p, pid, uid,
CLD_CONTINUED, SIGCONT);
BUG_ON(retval == 0);
}
return retval;
}
/*
* Consider @p for a wait by @parent.
*
* -ECHILD should be in ->notask_error before the first call.
* Returns nonzero for a final return, when we have unlocked tasklist_lock.
* Returns zero if the search for a child should continue;
* then ->notask_error is 0 if @p is an eligible child,
* or another error from security_task_wait(), or still -ECHILD.
*/
static int wait_consider_task(struct wait_opts *wo, int ptrace,
struct task_struct *p)
{
int ret = eligible_child(wo, p);
if (!ret)
return ret;
ret = security_task_wait(p);
if (unlikely(ret < 0)) {
/*
* If we have not yet seen any eligible child,
* then let this error code replace -ECHILD.
* A permission error will give the user a clue
* to look for security policy problems, rather
* than for mysterious wait bugs.
*/
if (wo->notask_error)
wo->notask_error = ret;
return 0;
}
/* dead body doesn't have much to contribute */
if (unlikely(p->exit_state == EXIT_DEAD)) {
/*
* But do not ignore this task until the tracer does
* wait_task_zombie()->do_notify_parent().
*/
if (likely(!ptrace) && unlikely(ptrace_reparented(p)))
wo->notask_error = 0;
return 0;
}
/* slay zombie? */
if (p->exit_state == EXIT_ZOMBIE) {
/*
* A zombie ptracee is only visible to its ptracer.
* Notification and reaping will be cascaded to the real
* parent when the ptracer detaches.
*/
if (likely(!ptrace) && unlikely(p->ptrace)) {
/* it will become visible, clear notask_error */
wo->notask_error = 0;
return 0;
}
/* we don't reap group leaders with subthreads */
if (!delay_group_leader(p))
return wait_task_zombie(wo, p);
/*
* Allow access to stopped/continued state via zombie by
* falling through. Clearing of notask_error is complex.
*
* When !@ptrace:
*
* If WEXITED is set, notask_error should naturally be
* cleared. If not, subset of WSTOPPED|WCONTINUED is set,
* so, if there are live subthreads, there are events to
* wait for. If all subthreads are dead, it's still safe
* to clear - this function will be called again in finite
* amount time once all the subthreads are released and
* will then return without clearing.
*
* When @ptrace:
*
* Stopped state is per-task and thus can't change once the
* target task dies. Only continued and exited can happen.
* Clear notask_error if WCONTINUED | WEXITED.
*/
if (likely(!ptrace) || (wo->wo_flags & (WCONTINUED | WEXITED)))
wo->notask_error = 0;
} else {
/*
* If @p is ptraced by a task in its real parent's group,
* hide group stop/continued state when looking at @p as
* the real parent; otherwise, a single stop can be
* reported twice as group and ptrace stops.
*
* If a ptracer wants to distinguish the two events for its
* own children, it should create a separate process which
* takes the role of real parent.
*/
if (likely(!ptrace) && p->ptrace && !ptrace_reparented(p))
return 0;
/*
* @p is alive and it's gonna stop, continue or exit, so
* there always is something to wait for.
*/
wo->notask_error = 0;
}
/*
* Wait for stopped. Depending on @ptrace, different stopped state
* is used and the two don't interact with each other.
*/
ret = wait_task_stopped(wo, ptrace, p);
if (ret)
return ret;
/*
* Wait for continued. There's only one continued state and the
* ptracer can consume it which can confuse the real parent. Don't
* use WCONTINUED from ptracer. You don't need or want it.
*/
return wait_task_continued(wo, p);
}
/*
* Do the work of do_wait() for one thread in the group, @tsk.
*
* -ECHILD should be in ->notask_error before the first call.
* Returns nonzero for a final return, when we have unlocked tasklist_lock.
* Returns zero if the search for a child should continue; then
* ->notask_error is 0 if there were any eligible children,
* or another error from security_task_wait(), or still -ECHILD.
*/
static int do_wait_thread(struct wait_opts *wo, struct task_struct *tsk)
{
struct task_struct *p;
list_for_each_entry(p, &tsk->children, sibling) {
int ret = wait_consider_task(wo, 0, p);
if (ret)
return ret;
}
return 0;
}
static int ptrace_do_wait(struct wait_opts *wo, struct task_struct *tsk)
{
struct task_struct *p;
list_for_each_entry(p, &tsk->ptraced, ptrace_entry) {
int ret = wait_consider_task(wo, 1, p);
if (ret)
return ret;
}
return 0;
}
static int child_wait_callback(wait_queue_t *wait, unsigned mode,
int sync, void *key)
{
struct wait_opts *wo = container_of(wait, struct wait_opts,
child_wait);
struct task_struct *p = key;
if (!eligible_pid(wo, p))
return 0;
if ((wo->wo_flags & __WNOTHREAD) && wait->private != p->parent)
return 0;
return default_wake_function(wait, mode, sync, key);
}
void __wake_up_parent(struct task_struct *p, struct task_struct *parent)
{
__wake_up_sync_key(&parent->signal->wait_chldexit,
TASK_INTERRUPTIBLE, 1, p);
}
static long do_wait(struct wait_opts *wo)
{
struct task_struct *tsk;
int retval;
trace_sched_process_wait(wo->wo_pid);
init_waitqueue_func_entry(&wo->child_wait, child_wait_callback);
wo->child_wait.private = current;
add_wait_queue(¤t->signal->wait_chldexit, &wo->child_wait);
repeat:
/*
* If there is nothing that can match our critiera just get out.
* We will clear ->notask_error to zero if we see any child that
* might later match our criteria, even if we are not able to reap
* it yet.
*/
wo->notask_error = -ECHILD;
if ((wo->wo_type < PIDTYPE_MAX) &&
(!wo->wo_pid || hlist_empty(&wo->wo_pid->tasks[wo->wo_type])))
goto notask;
set_current_state(TASK_INTERRUPTIBLE);
read_lock(&tasklist_lock);
tsk = current;
do {
retval = do_wait_thread(wo, tsk);
if (retval)
goto end;
retval = ptrace_do_wait(wo, tsk);
if (retval)
goto end;
if (wo->wo_flags & __WNOTHREAD)
break;
} while_each_thread(current, tsk);
read_unlock(&tasklist_lock);
notask:
retval = wo->notask_error;
if (!retval && !(wo->wo_flags & WNOHANG)) {
retval = -ERESTARTSYS;
if (!signal_pending(current)) {
schedule();
goto repeat;
}
}
end:
__set_current_state(TASK_RUNNING);
remove_wait_queue(¤t->signal->wait_chldexit, &wo->child_wait);
return retval;
}
SYSCALL_DEFINE5(waitid, int, which, pid_t, upid, struct siginfo __user *,
infop, int, options, struct rusage __user *, ru)
{
struct wait_opts wo;
struct pid *pid = NULL;
enum pid_type type;
long ret;
if (options & ~(WNOHANG|WNOWAIT|WEXITED|WSTOPPED|WCONTINUED))
return -EINVAL;
if (!(options & (WEXITED|WSTOPPED|WCONTINUED)))
return -EINVAL;
switch (which) {
case P_ALL:
type = PIDTYPE_MAX;
break;
case P_PID:
type = PIDTYPE_PID;
if (upid <= 0)
return -EINVAL;
break;
case P_PGID:
type = PIDTYPE_PGID;
if (upid <= 0)
return -EINVAL;
break;
default:
return -EINVAL;
}
if (type < PIDTYPE_MAX)
pid = find_get_pid(upid);
wo.wo_type = type;
wo.wo_pid = pid;
wo.wo_flags = options;
wo.wo_info = infop;
wo.wo_stat = NULL;
wo.wo_rusage = ru;
ret = do_wait(&wo);
if (ret > 0) {
ret = 0;
} else if (infop) {
/*
* For a WNOHANG return, clear out all the fields
* we would set so the user can easily tell the
* difference.
*/
if (!ret)
ret = put_user(0, &infop->si_signo);
if (!ret)
ret = put_user(0, &infop->si_errno);
if (!ret)
ret = put_user(0, &infop->si_code);
if (!ret)
ret = put_user(0, &infop->si_pid);
if (!ret)
ret = put_user(0, &infop->si_uid);
if (!ret)
ret = put_user(0, &infop->si_status);
}
put_pid(pid);
return ret;
}
SYSCALL_DEFINE4(wait4, pid_t, upid, int __user *, stat_addr,
int, options, struct rusage __user *, ru)
{
struct wait_opts wo;
struct pid *pid = NULL;
enum pid_type type;
long ret;
if (options & ~(WNOHANG|WUNTRACED|WCONTINUED|
__WNOTHREAD|__WCLONE|__WALL))
return -EINVAL;
if (upid == -1)
type = PIDTYPE_MAX;
else if (upid < 0) {
type = PIDTYPE_PGID;
pid = find_get_pid(-upid);
} else if (upid == 0) {
type = PIDTYPE_PGID;
pid = get_task_pid(current, PIDTYPE_PGID);
} else /* upid > 0 */ {
type = PIDTYPE_PID;
pid = find_get_pid(upid);
}
wo.wo_type = type;
wo.wo_pid = pid;
wo.wo_flags = options | WEXITED;
wo.wo_info = NULL;
wo.wo_stat = stat_addr;
wo.wo_rusage = ru;
ret = do_wait(&wo);
put_pid(pid);
return ret;
}
#ifdef __ARCH_WANT_SYS_WAITPID
/*
* sys_waitpid() remains for compatibility. waitpid() should be
* implemented by calling sys_wait4() from libc.a.
*/
SYSCALL_DEFINE3(waitpid, pid_t, pid, int __user *, stat_addr, int, options)
{
return sys_wait4(pid, stat_addr, options, NULL);
}
#endif
| PennPanda/litmus-rt | kernel/exit.c | C | gpl-2.0 | 44,381 |
// QueenMaxima, a chess playing program.
// Copyright (C) 1996-2013 Erik van het Hof and Hermen Reitsma
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// 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 inspect_move_legality_b (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 inspect_move_legality_w (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) // returns "white move is legal in node"
{
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) // returns "black move is legal in node"
{
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;
}
| hof/queenmaxima | src/legality.cpp | C++ | gpl-2.0 | 14,849 |
<?php
/*
* Comments cell type.
* Displays form and coments
*
*/
if( !function_exists('register_comments_cell_init') )
{
function register_comments_cell_init() {
if ( function_exists('register_dd_layout_cell_type') ) {
register_dd_layout_cell_type ( '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' => DDL_ICONS_SVG_REL_PATH.'layouts-comments-cell.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'),
'dialog-template-callback' => 'comments_cell_dialog_template_callback',
'cell-content-callback' => 'comments_cell_content_callback',
'cell-template-callback' => 'comments_cell_template_callback',
'has_settings' => true,
'cell-class' => '',
'preview-image-url' => DDL_ICONS_PNG_REL_PATH . 'comments_expand-image.png',
'allow-multiple' => false,
'register-scripts' => array(
array( 'ddl-comments-cell-script', WPDDL_GUI_RELPATH . 'editor/js/ddl-comments-cell-script.js', array( 'jquery' ), WPDDL_VERSION, true ),
),
'translatable_fields' => array(
'title_one_comment' => array('title' => 'One comment text', 'type' => 'LINE'),
'title_multi_comments' => 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'),
'comments_closed_text' => 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( 'wp_ajax_ddl_load_comments_page_content', 'ddl_load_comments_page_content' );
add_action( 'wp_ajax_nopriv_ddl_load_comments_page_content', 'ddl_load_comments_page_content' );
}
}
add_action( 'init', 'register_comments_cell_init' );
function comments_cell_dialog_template_callback() {
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="title_one_comment_message"></div>
</p>
<p>
<label for="<?php the_ddl_name_attr('title_multi_comments'); ?>"><?php _e( 'For two or more', 'ddl-layouts' ) ?>:</label>
<input type="text" name="<?php the_ddl_name_attr('title_multi_comments'); ?>" id="<?php the_ddl_name_attr('title_multi_comments'); ?>" value="<?php _e( '%COUNT% thoughts on %TITLE%', 'ddl-layouts' ) ?>">
<div id="title_multi_comments_message"></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('comments_closed_text'); ?>"><?php _e( 'Comments closed text', 'ddl-layouts' ) ?>:</label>
<input type="text" name="<?php the_ddl_name_attr('comments_closed_text'); ?>" id="<?php the_ddl_name_attr('comments_closed_text'); ?>" value="<?php _e( 'Comments are closed', 'ddl-layouts' ) ?>">
<div id="comments_closed_text_message"></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="password_text_message"></div>
</p>
</div>
<div class="ddl-form">
<div class="ddl-form-item">
<br />
<?php ddl_add_help_link_to_dialog(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 comments_cell_template_callback() {
ob_start();
?>
<div class="cell-content">
<p class="cell-name">{{ name }} – <?php _e('Comment Cell', 'ddl-layouts'); ?></p>
<div class="cell-preview">
<div class="ddl-comments-preview">
<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 ddl_add_previous_comments_link_data(){
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 ddl_add_next_comments_link_data(){
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 ddl_load_comments_page_content(){
$nonce = $_POST["wpnonce"];
if (! wp_verify_nonce( $nonce, 'ddl_comments_listing_page' ) ) {
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 = ddl_load_comments_array();
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->set_up_cell_fields_by_id( $cell_id, $layout_id );
$post = get_post($post_id); // Get post
setup_postdata( $post ); // load global $post
}
$comments_list = ddl_render_comments_list( $comments, $post, $load_page);
echo $comments_list;
die();
}
// Callback function for display the cell in the front end.
function comments_cell_content_callback() {
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('ddl-comment-cell-front-end');
$wpddlayout->localize_script('ddl-comment-cell-front-end', 'DDL_Comments_cell', array(
'ajaxurl' => admin_url( 'admin-ajax.php' ),
'security' => wp_create_nonce( 'ddl_comments_listing_page' ),
'layout_name' => $wpddlayout->get_rendered_layout_id(),
'cell_id' => get_ddl_field('unique_id')
));
$comments = ddl_load_comments_array();
$overridden_cpage = false;
if ( '' == get_query_var('cpage') && get_option('page_comments') ) {
set_query_var( 'cpage', 'newest' == get_option('default_comments_page') ? get_comment_pages_count() : 1 );
$overridden_cpage = true;
}
$load_page = '';
if ( isset($_GET['cpage']) ){
$load_page = $_GET['cpage'];
}
$comments_list = ddl_render_comments_list( $comments, $post, $load_page);
return $comments_list;
}
//Get comments array for current post
function ddl_load_comments_array(){
global $wpddlayout, $wp_query, $withcomments, $post, $wpdb, $id, $comment, $user_login, $user_ID, $user_identity, $overridden_cpage;
$commenter = wp_get_current_commenter();
$comment_author = $commenter['comment_author'];
$comment_author_email = $commenter['comment_author_email'];
$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 comment_author_email = %s AND comment_approved = '0' ) ) ORDER BY comment_date_gmt", $post->ID, wp_specialchars_decode($comment_author,ENT_QUOTES), $comment_author_email));
}
$wp_query->comments = apply_filters( 'comments_array', $comments, $post->ID );
$comments = &$wp_query->comments;
$wp_query->comment_count = count($wp_query->comments);
update_comment_cache($wp_query->comments);
return $comments;
}
//Generate comments listing
function ddl_render_comments_list($comments, $post, $load_page=''){
ob_start();
?>
<div id="comments">
<?php if ( post_password_required($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('title_multi_comments'));
printf( _n( $one_comment_text, $two_comments_text, $num_comments ),
number_format_i18n( $num_comments ), '<span>' . $post->post_title . '</span>' );
?>
</h2>
<?php if ( get_comment_pages_count($comments) > 1 && get_option( 'page_comments' ) ):?>
<?php
add_filter('previous_comments_link_attributes','ddl_add_previous_comments_link_data');
add_filter('next_comments_link_attributes','ddl_add_next_comments_link_data');
?>
<nav id="comment-nav-above">
<div class="nav-previous js-ddl-previous-link"><?php previous_comments_link( 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('ddl_comment_cell_style', '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 ( get_comment_pages_count($comments) > 1 && get_option( 'page_comments' ) ):
$comments_defaults['per_page'] = get_option('comments_per_page');
if ( empty($load_page) ){
if ('newest' == get_option('default_comments_page')){
$comments_defaults['page'] = get_comment_pages_count($comments);
}else{
$comments_defaults['page'] = 1;
}
}else{
//Current page
$comments_defaults['page'] = $load_page;
}
endif;
$before_comments_list = '<ul class="commentlist">';
$after_comments_list = '</ul>';
if ( $comments_defaults['style'] == 'ol' ){
$before_comments_list = '<ol class="commentlist">';
$after_comments_list = '</ol>';
}
if ( $comments_defaults['style'] == 'div' ){
$before_comments_list = '<div class="commentlist">';
$after_comments_list = '</div>';
}
echo '<div id="comments-listing">';
echo $before_comments_list;
//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('comments_closed_text'); ?></p>
<?php endif;?>
</div>
<?php
return ob_get_clean();
}
} | juliusmiranda/wordpress | wp-content/plugins/layouts/classes/cell_types/wpddl.cell_comments.class.php | PHP | gpl-2.0 | 15,614 |
<?
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"] );
}
// * //
}
?> | jetwhiz/jackelo | jackelow.gjye.com/api/category/category-id.php | PHP | gpl-2.0 | 1,147 |
<?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();
/**
* Definizione variabile HTML per la preparazione della stringa
* che contiene la documentazione di questa funzionalità
*/
$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->moduleCommonFormHelp(__('google+ recommendations','szgoogleadmin'),NULL,NULL,false,$HTML,basename(__FILE__)); | mathewhtc/cats | wp-content/plugins/sz-google/admin/help/en/sz-google-help-plus-recommendations.php | PHP | gpl-2.0 | 2,411 |
/**
* 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)readAttributesFromReader:(xmlTextReader *)reader; // 0xde81
@end
| kokoabim/iOSOpenDev-Framework-Header-Files | iWorkImport.framework/Headers/GQDRStrokePattern.h | C | gpl-2.0 | 568 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta name="DC.type" http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<head>R%egrave%glement (CE) n o %nbsp%48/2006 de la Commission du 12 janvier 2006 fixant les restitutions applicables %agrave% l'exportation des c%eacute%r%eacute%ales, des farines et des gruaux et semoules de froment ou de seigle</head>
<div type="body">
<p>Règlement (CE) no 48/2006 de la Commission</p>
<p>du 12 janvier 2006</p>
<p>fixant les restitutions applicables à l'exportation des céréales, des farines et des gruaux et semoules de froment ou de seigle</p>
<p>LA COMMISSION DES COMMUNAUTÉS EUROPÉENNES,</p>
<p>vu le traité instituant la Communauté européenne,</p>
<p>vu le règlement (CE) no 1784/2003 du Conseil du 29 septembre 2003 portant organisation commune des marchés dans le secteur des céréales [1], et notamment son article 13, paragraphe 3,</p>
<p>considérant ce qui suit:</p>
<p>(1) Aux termes de l'article 13 du règlement (CE) no 1784/2003, la différence entre les cours ou les prix des produits visés à l'article 1er dudit règlement et les prix de ces produits dans la Communauté peut être couverte par une restitution à l'exportation.</p>
<p>(2) Les restitutions doivent être fixées en prenant en considération les éléments visés à l'article 1er du règlement (CE) no 1501/95 de la Commission du 29 juin 1995 établissant certaines modalités d'application du règlement (CEE) no 1766/92 du Conseil en ce qui concerne l'octroi des restitutions à l'exportation ainsi que les mesures à prendre, en cas de perturbation, dans le secteur des céréales [2].</p>
<p>(3) En ce qui concerne les farines, les gruaux et les semoules de froment ou de seigle, la restitution applicable à ces produits doit être calculée en tenant compte de la quantité de céréales nécessaire à la fabrication des produits considérés. Ces quantités ont été fixées dans le règlement (CE) no 1501/95.</p>
<p>(4) La situation du marché mondial ou les exigences spécifiques de certains marchés peuvent rendre nécessaire la différenciation de la restitution pour certains produits, suivant leur destination.</p>
<p>(5) La restitution doit être fixée une fois par mois. Elle peut être modifiée dans l'intervalle.</p>
<p>(6) L'application de ces modalités à la situation actuelle des marchés dans le secteur des céréales, et notamment aux cours ou prix de ces produits dans la Communauté et sur le marché mondial, conduit à fixer la restitution aux montants repris en annexe.</p>
<p>(7) Les mesures prévues au présent règlement sont conformes à l'avis du comité de gestion des céréales,</p>
<p>A ARRÊTÉ LE PRÉSENT RÈGLEMENT:</p>
<p>Article premier</p>
<p>Les restitutions à l'exportation, en l'état, des produits visés à l'article 1er, points a), b) et c), du règlement (CE) no 1784/2003, à l'exception du malt, sont fixées aux montants repris en annexe.</p>
<p>Article 2</p>
<p>Le présent règlement entre en vigueur le 13 janvier 2006.</p>
<p>Le présent règlement est obligatoire dans tous ses éléments et directement applicable dans tout État membre.</p>
</div>
<div type="signature">
<p>Fait à Bruxelles, le 12 janvier 2006.</p>
<p>Par la Commission</p>
<p>Mariann Fischer Boel</p>
<p>Membre de la Commission</p>
<p>[1] JO L 270 du 21.10.2003, p. 78. Règlement modifié par le règlement (CE) no 1154/2005 de la Commission (JO L 187 du 19.7.2005, p. 11).</p>
<p>[2] JO L 147 du 30.6.1995, p. 7. Règlement modifié en dernier lieu par le règlement (CE) no 777/2004 (JO L 123 du 27.4.2004, p. 50).</p>
<p>--------------------------------------------------</p>
</div>
<div type="annex">
<p>ANNEXE</p>
<p>du règlement de la Commission du 12 janvier 2006 fixant les restitutions applicables à l'exportation des céréales, des farines et des gruaux et semoules de froment ou de seigle</p>
<p>NB: Les codes des produits ainsi que les codes des destinations série "A" sont définis au règlement (CEE) no 3846/87 de la Commission (JO L 366 du 24.12.1987, p. 1), modifié.</p>
<p>C01 : Tous pays tiers à l'exclusion de l'Albanie, de la Bulgarie, de la Roumanie, de la Croatie, de la Bosnie-et-Herzégovine, de la Serbie-et-Monténégro, de l'ancienne République yougoslave de Macédoine, du Liechtenstein et de la Suisse.</p>
<p>Code des produits | Destination | Unité de mesure | Montant des restitutions |</p>
<p>1001 10 00 9200 | — | EUR/t | — |</p>
<p>1001 10 00 9400 | A00 | EUR/t | 0 |</p>
<p>1001 90 91 9000 | — | EUR/t | — |</p>
<p>1001 90 99 9000 | A00 | EUR/t | 0 |</p>
<p>1002 00 00 9000 | A00 | EUR/t | 0 |</p>
<p>1003 00 10 9000 | — | EUR/t | — |</p>
<p>1003 00 90 9000 | A00 | EUR/t | 0 |</p>
<p>1004 00 00 9200 | — | EUR/t | — |</p>
<p>1004 00 00 9400 | A00 | EUR/t | 0 |</p>
<p>1005 10 90 9000 | — | EUR/t | — |</p>
<p>1005 90 00 9000 | A00 | EUR/t | 0 |</p>
<p>1007 00 90 9000 | — | EUR/t | — |</p>
<p>1008 20 00 9000 | — | EUR/t | — |</p>
<p>1101 00 11 9000 | — | EUR/t | — |</p>
<p>1101 00 15 9100 | C01 | EUR/t | 12,33 |</p>
<p>1101 00 15 9130 | C01 | EUR/t | 11,52 |</p>
<p>1101 00 15 9150 | C01 | EUR/t | 10,62 |</p>
<p>1101 00 15 9170 | C01 | EUR/t | 9,81 |</p>
<p>1101 00 15 9180 | C01 | EUR/t | 9,18 |</p>
<p>1101 00 15 9190 | — | EUR/t | — |</p>
<p>1101 00 90 9000 | — | EUR/t | — |</p>
<p>1102 10 00 9500 | A00 | EUR/t | 0 |</p>
<p>1102 10 00 9700 | A00 | EUR/t | 0 |</p>
<p>1102 10 00 9900 | — | EUR/t | — |</p>
<p>1103 11 10 9200 | A00 | EUR/t | 0 |</p>
<p>1103 11 10 9400 | A00 | EUR/t | 0 |</p>
<p>1103 11 10 9900 | — | EUR/t | — |</p>
<p>1103 11 90 9200 | A00 | EUR/t | 0 |</p>
<p>1103 11 90 9800 | — | EUR/t | — |</p>
<p>--------------------------------------------------</p>
</div>
</body>
</html>
| varh1i/language_detection | src/main/resources/naacl2010-langid/EuroGOV/trn0596.html | HTML | gpl-2.0 | 6,386 |
/*
* Copyright (C) 2005-2012 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#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 WorldPersistentState;
class DungeonPersistentState;
class BattleGroundPersistentState;
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 LevelRequirementVsMode
{
LEVELREQUIREMENT_HEROIC = 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 MessageDistBroadcast(Player*, WorldPacket*, float dist, bool to_self, bool own_team_only = false);
void MessageDistBroadcast(WorldObject*, WorldPacket*, float dist);
float GetVisibilityDistance() const { return m_VisibleDistance; }
// function for setting up visibility distance for maps on per-type/per-Id basis
virtual void InitVisibilityDistance();
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, TypeContainerVisitor<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)->setUnloadExplicitLock(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 RemoveAllObjectsInRemoveList();
bool CreatureRespawnRelocation(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 IsRaidOrHeroicDungeon() const { return IsRaid() || GetDifficulty() > DUNGEON_DIFFICULTY_NORMAL; }
bool IsBattleGround() const { return i_mapEntry && i_mapEntry->IsBattleGround(); }
bool IsBattleArena() const { return i_mapEntry && i_mapEntry->IsBattleArena(); }
bool IsBattleGroundOrArena() const { return i_mapEntry && i_mapEntry->IsBattleGroundOrArena(); }
// can't be NULL for loaded map
MapPersistentState* GetPersistentState() const { return m_persistentState; }
void AddObjectToRemoveList(WorldObject* obj);
void UpdateObjectVisibility(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 GetPlayersCountExceptGMs() const;
bool ActiveObjectsNearGrid(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 TypeUnorderedMapContainer<AllMapStoredObjectTypes, ObjectGuid> MapStoredObjectTypesContainer;
MapStoredObjectTypesContainer& GetObjectsStore() { return m_objectsStore; }
void AddUpdateObject(Object* obj)
{
i_objectsToClientUpdate.insert(obj);
}
void RemoveUpdateObject(Object* obj)
{
i_objectsToClientUpdate.erase(obj);
}
// DynObjects currently
uint32 GenerateLocalLowGuid(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 PlayDirectSoundToMap(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 InsertGameObjectModel(const GameObjectModel& mdl);
void RemoveGameObjectModel(const GameObjectModel& mdl);
bool ContainsGameObjectModel(const GameObjectModel& mdl) const;
// Get Holder for Creature Linking
CreatureLinkingHolder* GetCreatureLinkingHolder() { return &m_creatureLinkingHolder; }
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 SendRemoveTransports(Player* player);
bool CreatureCellRelocation(Creature* creature, Cell new_cell);
bool loaded(const GridPair&) const;
void EnsureGridCreated(const GridPair&);
bool EnsureGridLoaded(Cell const&);
void EnsureGridLoadedAtEnter(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 isGridObjectDataLoaded(uint32 x, uint32 y) const { return getNGrid(x, y)->isGridObjectDataLoaded(); }
void setGridObjectDataLoaded(bool pLoaded, uint32 x, uint32 y) { getNGrid(x, y)->setGridObjectDataLoaded(pLoaded); }
void setNGrid(NGridType* grid, uint32 x, uint32 y);
void ScriptsProcess();
void SendObjectUpdates();
std::set<Object*> i_objectsToClientUpdate;
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 m_activeNonPlayersIter;
MapStoredObjectTypesContainer 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<TOTAL_NUMBER_OF_CELLS_PER_MAP* TOTAL_NUMBER_OF_CELLS_PER_MAP> 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<HIGHGUID_DYNAMICOBJECT> 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
CreatureLinkingHolder m_creatureLinkingHolder;
// 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
WorldPersistentState* 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
DungeonPersistentState* GetPersistanceState() const;
virtual void InitVisibilityDistance() 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 InitVisibilityDistance() override;
BattleGround* GetBG() { return m_bg; }
void SetBG(BattleGround* bg) { m_bg = bg; }
// can't be NULL for loaded map
BattleGroundPersistentState* GetPersistanceState() const;
private:
BattleGround* m_bg;
};
template<class T, class CONTAINER>
inline void
Map::Visit(const Cell& cell, TypeContainerVisitor<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
| blueboy/gmguy | src/game/Map.h | C | gpl-2.0 | 17,335 |
# BurnMan - a lower mantle toolkit
# Copyright (C) 2012-2014, Myhill, R., Heister, T., Unterborn, C., Rose, I. and Cottaar, S.
# Released under GPL v2 or later.
# This is a standalone program that converts a tabulated version of the Stixrude and Lithgow-Bertelloni data format into the standard burnman format (printed to stdout)
import sys
def read_dataset(datafile):
f=open(datafile,'r')
ds=[]
for line in f:
ds.append(line.decode('utf-8').split())
return ds
ds=read_dataset('HHPH2013_endmembers.dat')
print '# BurnMan - a lower mantle toolkit'
print '# Copyright (C) 2012, 2013, Heister, T., Unterborn, C., Rose, I. and Cottaar, S.'
print '# Released under GPL v2 or later.'
print ''
print '"""'
print 'HHPH_2013'
print 'Minerals from Holland et al 2013 and references therein'
print 'The values in this document are all in S.I. units,'
print 'unlike those in the original paper'
print 'File autogenerated using HHPHdata_to_burnman.py'
print '"""'
print ''
print 'from burnman.mineral import Mineral'
print 'from burnman.solidsolution import SolidSolution'
print 'from burnman.solutionmodel import *'
print 'from burnman.processchemistry import read_masses, dictionarize_formula, formula_mass'
print ''
print 'atomic_masses=read_masses()'
print ''
print '"""'
print 'ENDMEMBERS'
print '"""'
print ''
param_scales = [ -1., -1., #not nubmers, so we won't scale
1.e3, 1.e3, #kJ -> J
1.0, # J/K/mol
1.e-5, # kJ/kbar/mol -> m^3/mol
1.e3, 1.e-2, 1.e3, 1.e3, # kJ -> J and table conversion for b
1.e-5, # table conversion
1.e8, # kbar -> Pa
1.0, # no scale for K'0
1.e-8] #GPa -> Pa # no scale for eta_s
formula='0'
for idx, m in enumerate(ds):
if idx == 0:
param_names=m
else:
print 'class', m[0].lower(), '(Mineral):'
print ' def __init__(self):'
print ''.join([' formula=\'',m[1],'\''])
print ' formula = dictionarize_formula(formula)'
print ' self.params = {'
print ''.join([' \'name\': \'', m[0], '\','])
print ' \'formula\': formula,'
print ' \'equation_of_state\': \'hp_tmt\','
for pid, param in enumerate(m):
if pid > 1 and pid != 3 and pid<6:
print ' \''+param_names[pid]+'\':', float(param)*param_scales[pid], ','
print ' \'Cp\':', [round(float(m[i])*param_scales[i],10) for i in [6, 7, 8, 9]], ','
for pid, param in enumerate(m):
if pid > 9:
print ' \''+param_names[pid]+'\':', float(param)*param_scales[pid], ','
print ' \'n\': sum(formula.values()),'
print ' \'molar_mass\': formula_mass(formula, atomic_masses)}'
print ''
print ' self.uncertainties = {'
print ' \''+param_names[3]+'\':', float(m[3])*param_scales[3], '}'
print ' Mineral.__init__(self)'
print ''
| QuLogic/burnman | burnman/data/input_raw_endmember_datasets/HHPH2013data_to_burnman.py | Python | gpl-2.0 | 3,130 |
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;
| IMA-WorldHealth/bhima | server/lib/template/helpers/logic.js | JavaScript | gpl-2.0 | 1,228 |
<?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\ContextAwareInterface;
use Drupal\views\Plugin\views\query\Sql;
use Drupal\views\Plugin\Core\Entity\View;
use Drupal\views\ViewStorageInterface;
/**
* Stores UI related temporary settings.
*/
class ViewUI implements ViewStorageInterface {
/**
* 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\ViewStorageInterface $storage
* The View storage object to wrap.
*/
public function __construct(ViewStorageInterface $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 getDefaultAJAXMessage() {
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, views_ui_standard_submit 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('views_ui_form_button_was_clicked'), element_info_property($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']['#default_value'] === 'defaults');
$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 buildDisplaysReorderForm($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('views-remove-checkbox')),
'#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, 'views_ui_reorder_displays_form');
$form['buttons']['submit']['#submit'] = array(array($this, 'submitDisplaysReorderForm'));
return $form;
}
/**
* Submit handler for rearranging display form
*/
public function submitDisplaysReorderForm($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.performance_statistics');
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.
views_ui_contextual_links_suppress_push();
$preview = $this->executable->preview($display_id, $args);
views_ui_contextual_links_suppress_pop();
// 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 call_user_func_array(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\TranslatableInterface::getTranslation().
*/
public function getTranslation($langcode, $strict = TRUE) {
return $this->__call(__FUNCTION__, func_get_args());
}
/**
* Implements \Drupal\Core\TypedData\TranslatableInterface::getTranslationLanguages().
*/
public function getTranslationLanguages($include_default = TRUE) {
return $this->__call(__FUNCTION__, func_get_args());
}
/**
* Implements \Drupal\Core\TypedData\TranslatableInterface::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\ComplexDataInterface::isEmpty)().
*/
public function isEmpty() {
return $this->__call(__FUNCTION__, func_get_args());
}
/**
* Implements \Drupal\Core\TypedData\ComplexDataInterface::getPropertyValues().
*/
public function getPropertyValues() {
return $this->__call(__FUNCTION__, func_get_args());
}
/**
* Implements \Drupal\Core\TypedData\ComplexDataInterface::getPropertyDefinitions().
*/
public function getPropertyDefinitions() {
return $this->__call(__FUNCTION__, func_get_args());
}
/**
* Implements \Drupal\Core\TypedData\ComplexDataInterface::getPropertyDefinition().
*/
public function getPropertyDefinition($name) {
return $this->__call(__FUNCTION__, func_get_args());
}
/**
* Implements \Drupal\Core\TypedData\ComplexDataInterface::setPropertyValues().
*/
public function setPropertyValues($values) {
return $this->__call(__FUNCTION__, func_get_args());
}
/**
* Implements \Drupal\Core\TypedData\ComplexDataInterface::getProperties().
*/
public function getProperties($include_computed = FALSE) {
return $this->__call(__FUNCTION__, func_get_args());
}
/**
* Implements \Drupal\views\ViewStorageInterface::enable().
*/
public function enable() {
return $this->__call(__FUNCTION__, func_get_args());
}
/**
* Implements \Drupal\views\ViewStorageInterface::disable().
*/
public function disable() {
return $this->__call(__FUNCTION__, func_get_args());
}
/**
* Implements \Drupal\views\ViewStorageInterface::isEnabled().
*/
public function isEnabled() {
return $this->__call(__FUNCTION__, func_get_args());
}
/**
* Implements \Drupal\Core\Config\Entity\ConfigEntityInterface::getOriginalID().
*/
public function getOriginalID() {
return $this->__call(__FUNCTION__, func_get_args());
}
/**
* Implements \Drupal\Core\Config\Entity\ConfigEntityInterface::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\ContextAwareInterface::getName().
*/
public function getName() {
return $this->__call(__FUNCTION__, func_get_args());
}
/**
* Implements \Drupal\Core\TypedData\ContextAwareInterface::getRoot().
*/
public function getRoot() {
return $this->__call(__FUNCTION__, func_get_args());
}
/**
* Implements \Drupal\Core\TypedData\ContextAwareInterface::getPropertyPath().
*/
public function getPropertyPath() {
return $this->__call(__FUNCTION__, func_get_args());
}
/**
* Implements \Drupal\Core\TypedData\ContextAwareInterface::getParent().
*/
public function getParent() {
return $this->__call(__FUNCTION__, func_get_args());
}
/**
* Implements \Drupal\Core\TypedData\ContextAwareInterface::setContext().
*/
public function setContext($name = NULL, ContextAwareInterface $parent = NULL) {
return $this->__call(__FUNCTION__, func_get_args());
}
}
| adirkuhn/expressoDrupal | core/modules/views/views_ui/lib/Drupal/views_ui/ViewUI.php | PHP | gpl-2.0 | 38,054 |
#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 SOFTIRQ_DISABLE_OFFSET (2 * SOFTIRQ_OFFSET)
#ifndef PREEMPT_ACTIVE
#define PREEMPT_ACTIVE_BITS 1
#define PREEMPT_ACTIVE_SHIFT (NMI_SHIFT + NMI_BITS)
#define PREEMPT_ACTIVE (__IRQ_MASK(PREEMPT_ACTIVE_BITS) << PREEMPT_ACTIVE_SHIFT)
#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(CONFIG_PREEMPT_COUNT)
# define PREEMPT_CHECK_OFFSET 1
#else
# define PREEMPT_CHECK_OFFSET 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 in_atomic_preempt_off() \
((preempt_count() & ~PREEMPT_ACTIVE) != PREEMPT_CHECK_OFFSET)
#ifdef CONFIG_PREEMPT_COUNT
# 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(CONFIG_VIRT_CPU_ACCOUNTING) && !defined(CONFIG_IRQ_TIME_ACCOUNTING)
static inline void account_system_vtime(struct task_struct *tsk)
{
}
#else
extern void account_system_vtime(struct task_struct *tsk);
#endif
#if defined(CONFIG_TINY_RCU) || defined(CONFIG_TINY_PREEMPT_RCU)
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 { \
account_system_vtime(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(); \
account_system_vtime(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 */
| mostafa-z/Gabriel_MM | include/linux/hardirq.h | C | gpl-2.0 | 5,699 |
<?php
/**
* @version 2.3, Creation Date : March-24-2011
* @name impressionclicks.php
* @location /components/com_contushdvideosahre/views/impressionclicks/tmpl/impressionclicks.php
* @package Joomla 1.6
* @subpackage contushdvideoshare
* @author Contus Support - http://www.contussupport.com
* @copyright Copyright (C) 2011 Contus Support
* @license GNU/GPL http://www.gnu.org/copyleft/gpl.html
* @link http://www.hdvideoshare.net
*/
/*
* Description : front page video search page layout
*/
?> | dherrerav/Azteca-Sonora | components/com_contushdvideoshare/views/impressionclicks/tmpl/impressionclicks.php | PHP | gpl-2.0 | 553 |
//=============================================================================
//
// m25pxx.c
//
// SPI flash driver for Numonyx M25Pxx devices and compatibles.
//
//=============================================================================
// ####ECOSGPLCOPYRIGHTBEGIN####
// -------------------------------------------
// This file is part of eCos, the Embedded Configurable Operating System.
// Copyright (C) 2008, 2009 Free Software Foundation, Inc.
//
// eCos is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free
// 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
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
// for more details.
//
// You should have received a copy of the GNU General Public License
// 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
// the GNU General Public License. However the source code for this file
// must still be made available in accordance with section (3) of the GNU
// General Public License v2.
//
// This exception does not invalidate any other reasons why a work based
// on this file might be covered by the GNU General Public License.
// -------------------------------------------
// ####ECOSGPLCOPYRIGHTEND####
//=============================================================================
//#####DESCRIPTIONBEGIN####
//
// Author(s): Chris Holgate
// Date: 2008-12-22
// Purpose: Numonyx M25Pxx SPI flash driver implementation
//
//####DESCRIPTIONEND####
//
//=============================================================================
#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/devs_flash_spi_m25pxx.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_ * CYGNUM_HAL_RTC_DENOMINATOR) / (CYGNUM_HAL_RTC_NUMERATOR / 1000)))
#else
#define M25PXX_DELAY_MS(_msdelay_) CYGACC_CALL_IF_DELAY_US (_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 m25pxx_supported_devices [] = {
{ // 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 m25pxx_to_local_addr
(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.
cyg_spi_transaction_begin (spi_device);
cyg_spi_transaction_transfer (spi_device, M25PXX_POLLED, 4, tx_buf, NULL, false);
cyg_spi_transaction_transfer (spi_device, M25PXX_POLLED, wbuf_len, wbuf, NULL, false);
cyg_spi_transaction_end (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.
cyg_spi_transaction_begin (spi_device);
cyg_spi_transaction_transfer (spi_device, M25PXX_POLLED, 5, tx_buf, NULL, false);
cyg_spi_transaction_transfer (spi_device, M25PXX_POLLED, rbuf_len, NULL, rbuf, false);
cyg_spi_transaction_end (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*) m25pxx_supported_devices;
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.
((cyg_flash_block_info_t*) dev->block_info)->block_size =
M25PXX_PAGE_SIZE * (size_t) dev_params->sector_size;
((cyg_flash_block_info_t*) 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 (m25pxx_to_local_addr (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 (!m25pxx_to_local_addr (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 = (CYGNUM_DEVS_FLASH_SPI_M25PXX_READ_BLOCK_SIZE == 0) ?
0xFFFFFFFF : CYGNUM_DEVS_FLASH_SPI_M25PXX_READ_BLOCK_SIZE;
// Fix up the block address and fill the read buffer.
if (m25pxx_to_local_addr (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 (
cyg_devs_flash_spi_m25pxx_funs, // Exported name of function pointers.
m25pxx_init, // Flash initialisation.
cyg_flash_devfn_query_nop, // Query operations not supported.
m25pxx_erase_block, // Sector erase.
m25pxx_program, // Program multiple pages.
m25pxx_read, // Read arbitrary amount of data.
cyg_flash_devfn_lock_nop, // Locking not supported (no per-sector locks).
cyg_flash_devfn_unlock_nop
);
//=============================================================================
| reille/proj_ecos | src/ecos/packages/devs/flash/spi/m25pxx/current/src/m25pxx.c | C | gpl-2.0 | 17,781 |
<?php
/**
* TOP API: taobao.shop.remainshowcase.get request
*
* @author auto create
* @since 1.0, 2012-03-21 12:35:10
*/
class ShopRemainshowcaseGetRequest
{
private $apiParas = array();
public function getApiMethodName()
{
return "taobao.shop.remainshowcase.get";
}
public function getApiParas()
{
return $this->apiParas;
}
public function check()
{
}
}
| gxk9933/guoxk-blog | html/test_taobaoke/sdk/top/request/ShopRemainshowcaseGetRequest.php | PHP | gpl-2.0 | 386 |
/*
* Core definitions and data structures shareable across OS platforms.
*
* Copyright (c) 1994-2002 Justin T. Gibbs.
* Copyright (c) 2000-2002 Adaptec Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions, and the following disclaimer,
* without modification.
* 2. Redistributions in binary form must reproduce at minimum a disclaimer
* substantially similar to the "NO WARRANTY" disclaimer below
* ("Disclaimer") and any redistribution must be conditioned upon
* including a substantially similar Disclaimer requirement for further
* binary redistribution.
* 3. Neither the names of the above-listed copyright holders nor the names
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* Alternatively, this software may be distributed under the terms of the
* GNU General Public License ("GPL") version 2 as published by the Free
* Software Foundation.
*
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES.
*
* $Id: //depot/aic7xxx/aic7xxx/aic79xx.h#109 $
*
* $FreeBSD$
*/
#ifndef _AIC79XX_H_
#define _AIC79XX_H_
/* Register Definitions */
#include "aic79xx_reg.h"
/************************* Forward Declarations *******************************/
struct ahd_platform_data;
struct scb_platform_data;
/****************************** Useful Macros *********************************/
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
#define ALL_CHANNELS '\0'
#define ALL_TARGETS_MASK 0xFFFF
#define INITIATOR_WILDCARD (~0)
#define SCB_LIST_NULL 0xFF00
#define SCB_LIST_NULL_LE (ahd_htole16(SCB_LIST_NULL))
#define QOUTFIFO_ENTRY_VALID 0x80
#define SCBID_IS_NULL(scbid) (((scbid) & 0xFF00 ) == SCB_LIST_NULL)
#define SCSIID_TARGET(ahd, scsiid) \
(((scsiid) & TID) >> TID_SHIFT)
#define SCSIID_OUR_ID(scsiid) \
((scsiid) & OID)
#define SCSIID_CHANNEL(ahd, scsiid) ('A')
#define SCB_IS_SCSIBUS_B(ahd, scb) (0)
#define SCB_GET_OUR_ID(scb) \
SCSIID_OUR_ID((scb)->hscb->scsiid)
#define SCB_GET_TARGET(ahd, scb) \
SCSIID_TARGET((ahd), (scb)->hscb->scsiid)
#define SCB_GET_CHANNEL(ahd, scb) \
SCSIID_CHANNEL(ahd, (scb)->hscb->scsiid)
#define SCB_GET_LUN(scb) \
((scb)->hscb->lun)
#define SCB_GET_TARGET_OFFSET(ahd, scb) \
SCB_GET_TARGET(ahd, scb)
#define SCB_GET_TARGET_MASK(ahd, scb) \
(0x01 << (SCB_GET_TARGET_OFFSET(ahd, scb)))
#ifdef AHD_DEBUG
#define SCB_IS_SILENT(scb) \
((ahd_debug & AHD_SHOW_MASKED_ERRORS) == 0 \
&& (((scb)->flags & SCB_SILENT) != 0))
#else
#define SCB_IS_SILENT(scb) \
(((scb)->flags & SCB_SILENT) != 0)
#endif
/*
* TCLs have the following format: TTTTLLLLLLLL
*/
#define TCL_TARGET_OFFSET(tcl) \
((((tcl) >> 4) & TID) >> 4)
#define TCL_LUN(tcl) \
(tcl & (AHD_NUM_LUNS - 1))
#define BUILD_TCL(scsiid, lun) \
((lun) | (((scsiid) & TID) << 4))
#define BUILD_TCL_RAW(target, channel, lun) \
((lun) | ((target) << 8))
#define SCB_GET_TAG(scb) \
ahd_le16toh(scb->hscb->tag)
#ifndef AHD_TARGET_MODE
#undef AHD_TMODE_ENABLE
#define AHD_TMODE_ENABLE 0
#endif
#define AHD_BUILD_COL_IDX(target, lun) \
(((lun) << 4) | target)
#define AHD_GET_SCB_COL_IDX(ahd, scb) \
((SCB_GET_LUN(scb) << 4) | SCB_GET_TARGET(ahd, scb))
#define AHD_SET_SCB_COL_IDX(scb, col_idx) \
do { \
(scb)->hscb->scsiid = ((col_idx) << TID_SHIFT) & TID; \
(scb)->hscb->lun = ((col_idx) >> 4) & (AHD_NUM_LUNS_NONPKT-1); \
} while (0)
#define AHD_COPY_SCB_COL_IDX(dst, src) \
do { \
dst->hscb->scsiid = src->hscb->scsiid; \
dst->hscb->lun = src->hscb->lun; \
} while (0)
#define AHD_NEVER_COL_IDX 0xFFFF
/**************************** Driver Constants ********************************/
/*
* The maximum number of supported targets.
*/
#define AHD_NUM_TARGETS 16
/*
* The maximum number of supported luns.
* The identify message only supports 64 luns in non-packetized transfers.
* You can have 2^64 luns when information unit transfers are enabled,
* but until we see a need to support that many, we support 256.
*/
#define AHD_NUM_LUNS_NONPKT 64
#define AHD_NUM_LUNS 256
/*
* The maximum transfer per S/G segment.
*/
#define AHD_MAXTRANSFER_SIZE 0x00ffffff /* limited by 24bit counter */
/*
* The maximum amount of SCB storage in hardware on a controller.
* This value represents an upper bound. Due to software design,
* we may not be able to use this number.
*/
#define AHD_SCB_MAX 512
/*
* The maximum number of concurrent transactions supported per driver instance.
* Sequencer Control Blocks (SCBs) store per-transaction information.
*/
#define AHD_MAX_QUEUE AHD_SCB_MAX
/*
* Define the size of our QIN and QOUT FIFOs. They must be a power of 2
* in size and accommodate as many transactions as can be queued concurrently.
*/
#define AHD_QIN_SIZE AHD_MAX_QUEUE
#define AHD_QOUT_SIZE AHD_MAX_QUEUE
#define AHD_QIN_WRAP(x) ((x) & (AHD_QIN_SIZE-1))
/*
* The maximum amount of SCB storage we allocate in host memory.
*/
#define AHD_SCB_MAX_ALLOC AHD_MAX_QUEUE
/*
* Ring Buffer of incoming target commands.
* We allocate 256 to simplify the logic in the sequencer
* by using the natural wrap point of an 8bit counter.
*/
#define AHD_TMODE_CMDS 256
/* Reset line assertion time in us */
#define AHD_BUSRESET_DELAY 25
/******************* Chip Characteristics/Operating Settings *****************/
/*
* Chip Type
* The chip order is from least sophisticated to most sophisticated.
*/
typedef enum {
AHD_NONE = 0x0000,
AHD_CHIPID_MASK = 0x00FF,
AHD_AIC7901 = 0x0001,
AHD_AIC7902 = 0x0002,
AHD_AIC7901A = 0x0003,
AHD_PCI = 0x0100, /* Bus type PCI */
AHD_PCIX = 0x0200, /* Bus type PCIX */
AHD_BUS_MASK = 0x0F00
} ahd_chip;
/*
* Features available in each chip type.
*/
typedef enum {
AHD_FENONE = 0x00000,
AHD_WIDE = 0x00001,/* Wide Channel */
AHD_AIC79XXB_SLOWCRC = 0x00002,/* SLOWCRC bit should be set */
AHD_MULTI_FUNC = 0x00100,/* Multi-Function/Channel Device */
AHD_TARGETMODE = 0x01000,/* Has tested target mode support */
AHD_MULTIROLE = 0x02000,/* Space for two roles at a time */
AHD_RTI = 0x04000,/* Retained Training Support */
AHD_NEW_IOCELL_OPTS = 0x08000,/* More Signal knobs in the IOCELL */
AHD_NEW_DFCNTRL_OPTS = 0x10000,/* SCSIENWRDIS bit */
AHD_FAST_CDB_DELIVERY = 0x20000,/* CDB acks released to Output Sync */
AHD_REMOVABLE = 0x00000,/* Hot-Swap supported - None so far*/
AHD_AIC7901_FE = AHD_FENONE,
AHD_AIC7901A_FE = AHD_FENONE,
AHD_AIC7902_FE = AHD_MULTI_FUNC
} ahd_feature;
/*
* Bugs in the silicon that we work around in software.
*/
typedef enum {
AHD_BUGNONE = 0x0000,
/*
* Rev A hardware fails to update LAST/CURR/NEXTSCB
* correctly in certain packetized selection cases.
*/
AHD_SENT_SCB_UPDATE_BUG = 0x0001,
/* The wrong SCB is accessed to check the abort pending bit. */
AHD_ABORT_LQI_BUG = 0x0002,
/* Packetized bitbucket crosses packet boundaries. */
AHD_PKT_BITBUCKET_BUG = 0x0004,
/* The selection timer runs twice as long as its setting. */
AHD_LONG_SETIMO_BUG = 0x0008,
/* The Non-LQ CRC error status is delayed until phase change. */
AHD_NLQICRC_DELAYED_BUG = 0x0010,
/* The chip must be reset for all outgoing bus resets. */
AHD_SCSIRST_BUG = 0x0020,
/* Some PCIX fields must be saved and restored across chip reset. */
AHD_PCIX_CHIPRST_BUG = 0x0040,
/* MMAPIO is not functional in PCI-X mode. */
AHD_PCIX_MMAPIO_BUG = 0x0080,
/* Reads to SCBRAM fail to reset the discard timer. */
AHD_PCIX_SCBRAM_RD_BUG = 0x0100,
/* Bug workarounds that can be disabled on non-PCIX busses. */
AHD_PCIX_BUG_MASK = AHD_PCIX_CHIPRST_BUG
| AHD_PCIX_MMAPIO_BUG
| AHD_PCIX_SCBRAM_RD_BUG,
/*
* LQOSTOP0 status set even for forced selections with ATN
* to perform non-packetized message delivery.
*/
AHD_LQO_ATNO_BUG = 0x0200,
/* FIFO auto-flush does not always trigger. */
AHD_AUTOFLUSH_BUG = 0x0400,
/* The CLRLQO registers are not self-clearing. */
AHD_CLRLQO_AUTOCLR_BUG = 0x0800,
/* The PACKETIZED status bit refers to the previous connection. */
AHD_PKTIZED_STATUS_BUG = 0x1000,
/* "Short Luns" are not placed into outgoing LQ packets correctly. */
AHD_PKT_LUN_BUG = 0x2000,
/*
* Only the FIFO allocated to the non-packetized connection may
* be in use during a non-packetzied connection.
*/
AHD_NONPACKFIFO_BUG = 0x4000,
/*
* Writing to a DFF SCBPTR register may fail if concurent with
* a hardware write to the other DFF SCBPTR register. This is
* not currently a concern in our sequencer since all chips with
* this bug have the AHD_NONPACKFIFO_BUG and all writes of concern
* occur in non-packetized connections.
*/
AHD_MDFF_WSCBPTR_BUG = 0x8000,
/* SGHADDR updates are slow. */
AHD_REG_SLOW_SETTLE_BUG = 0x10000,
/*
* Changing the MODE_PTR coincident with an interrupt that
* switches to a different mode will cause the interrupt to
* be in the mode written outside of interrupt context.
*/
AHD_SET_MODE_BUG = 0x20000,
/* Non-packetized busfree revision does not work. */
AHD_BUSFREEREV_BUG = 0x40000,
/*
* Paced transfers are indicated with a non-standard PPR
* option bit in the neg table, 160MHz is indicated by
* sync factor 0x7, and the offset if off by a factor of 2.
*/
AHD_PACED_NEGTABLE_BUG = 0x80000,
/* LQOOVERRUN false positives. */
AHD_LQOOVERRUN_BUG = 0x100000,
/*
* Controller write to INTSTAT will lose to a host
* write to CLRINT.
*/
AHD_INTCOLLISION_BUG = 0x200000,
/*
* The GEM318 violates the SCSI spec by not waiting
* the mandated bus settle delay between phase changes
* in some situations. Some aic79xx chip revs. are more
* strict in this regard and will treat REQ assertions
* that fall within the bus settle delay window as
* glitches. This flag tells the firmware to tolerate
* early REQ assertions.
*/
AHD_EARLY_REQ_BUG = 0x400000,
/*
* The LED does not stay on long enough in packetized modes.
*/
AHD_FAINT_LED_BUG = 0x800000
} ahd_bug;
/*
* Configuration specific settings.
* The driver determines these settings by probing the
* chip/controller's configuration.
*/
typedef enum {
AHD_FNONE = 0x00000,
AHD_BOOT_CHANNEL = 0x00001,/* We were set as the boot channel. */
AHD_USEDEFAULTS = 0x00004,/*
* For cards without an seeprom
* or a BIOS to initialize the chip's
* SRAM, we use the default target
* settings.
*/
AHD_SEQUENCER_DEBUG = 0x00008,
AHD_RESET_BUS_A = 0x00010,
AHD_EXTENDED_TRANS_A = 0x00020,
AHD_TERM_ENB_A = 0x00040,
AHD_SPCHK_ENB_A = 0x00080,
AHD_STPWLEVEL_A = 0x00100,
AHD_INITIATORROLE = 0x00200,/*
* Allow initiator operations on
* this controller.
*/
AHD_TARGETROLE = 0x00400,/*
* Allow target operations on this
* controller.
*/
AHD_RESOURCE_SHORTAGE = 0x00800,
AHD_TQINFIFO_BLOCKED = 0x01000,/* Blocked waiting for ATIOs */
AHD_INT50_SPEEDFLEX = 0x02000,/*
* Internal 50pin connector
* sits behind an aic3860
*/
AHD_BIOS_ENABLED = 0x04000,
AHD_ALL_INTERRUPTS = 0x08000,
AHD_39BIT_ADDRESSING = 0x10000,/* Use 39 bit addressing scheme. */
AHD_64BIT_ADDRESSING = 0x20000,/* Use 64 bit addressing scheme. */
AHD_CURRENT_SENSING = 0x40000,
AHD_SCB_CONFIG_USED = 0x80000,/* No SEEPROM but SCB had info. */
AHD_HP_BOARD = 0x100000,
AHD_BUS_RESET_ACTIVE = 0x200000,
AHD_UPDATE_PEND_CMDS = 0x400000,
AHD_RUNNING_QOUTFIFO = 0x800000,
AHD_HAD_FIRST_SEL = 0x1000000
} ahd_flag;
/************************* Hardware SCB Definition ***************************/
/*
* The driver keeps up to MAX_SCB scb structures per card in memory. The SCB
* consists of a "hardware SCB" mirroring the fields available on the card
* and additional information the kernel stores for each transaction.
*
* To minimize space utilization, a portion of the hardware scb stores
* different data during different portions of a SCSI transaction.
* As initialized by the host driver for the initiator role, this area
* contains the SCSI cdb (or a pointer to the cdb) to be executed. After
* the cdb has been presented to the target, this area serves to store
* residual transfer information and the SCSI status byte.
* For the target role, the contents of this area do not change, but
* still serve a different purpose than for the initiator role. See
* struct target_data for details.
*/
/*
* Status information embedded in the shared poriton of
* an SCB after passing the cdb to the target. The kernel
* driver will only read this data for transactions that
* complete abnormally.
*/
struct initiator_status {
uint32_t residual_datacnt; /* Residual in the current S/G seg */
uint32_t residual_sgptr; /* The next S/G for this transfer */
uint8_t scsi_status; /* Standard SCSI status byte */
};
struct target_status {
uint32_t residual_datacnt; /* Residual in the current S/G seg */
uint32_t residual_sgptr; /* The next S/G for this transfer */
uint8_t scsi_status; /* SCSI status to give to initiator */
uint8_t target_phases; /* Bitmap of phases to execute */
uint8_t data_phase; /* Data-In or Data-Out */
uint8_t initiator_tag; /* Initiator's transaction tag */
};
/*
* Initiator mode SCB shared data area.
* If the embedded CDB is 12 bytes or less, we embed
* the sense buffer address in the SCB. This allows
* us to retrieve sense information without interrupting
* the host in packetized mode.
*/
typedef uint32_t sense_addr_t;
#define MAX_CDB_LEN 16
#define MAX_CDB_LEN_WITH_SENSE_ADDR (MAX_CDB_LEN - sizeof(sense_addr_t))
union initiator_data {
struct {
uint64_t cdbptr;
uint8_t cdblen;
} cdb_from_host;
uint8_t cdb[MAX_CDB_LEN];
struct {
uint8_t cdb[MAX_CDB_LEN_WITH_SENSE_ADDR];
sense_addr_t sense_addr;
} cdb_plus_saddr;
};
/*
* Target mode version of the shared data SCB segment.
*/
struct target_data {
uint32_t spare[2];
uint8_t scsi_status; /* SCSI status to give to initiator */
uint8_t target_phases; /* Bitmap of phases to execute */
uint8_t data_phase; /* Data-In or Data-Out */
uint8_t initiator_tag; /* Initiator's transaction tag */
};
struct hardware_scb {
/*0*/ union {
union initiator_data idata;
struct target_data tdata;
struct initiator_status istatus;
struct target_status tstatus;
} shared_data;
/*
* A word about residuals.
* The scb is presented to the sequencer with the dataptr and datacnt
* fields initialized to the contents of the first S/G element to
* transfer. The sgptr field is initialized to the bus address for
* the S/G element that follows the first in the in core S/G array
* or'ed with the SG_FULL_RESID flag. Sgptr may point to an invalid
* S/G entry for this transfer (single S/G element transfer with the
* first elements address and length preloaded in the dataptr/datacnt
* fields). If no transfer is to occur, sgptr is set to SG_LIST_NULL.
* The SG_FULL_RESID flag ensures that the residual will be correctly
* noted even if no data transfers occur. Once the data phase is entered,
* the residual sgptr and datacnt are loaded from the sgptr and the
* datacnt fields. After each S/G element's dataptr and length are
* loaded into the hardware, the residual sgptr is advanced. After
* each S/G element is expired, its datacnt field is checked to see
* if the LAST_SEG flag is set. If so, SG_LIST_NULL is set in the
* residual sg ptr and the transfer is considered complete. If the
* sequencer determines that there is a residual in the tranfer, or
* there is non-zero status, it will set the SG_STATUS_VALID flag in
* sgptr and dma the scb back into host memory. To sumarize:
*
* Sequencer:
* o A residual has occurred if SG_FULL_RESID is set in sgptr,
* or residual_sgptr does not have SG_LIST_NULL set.
*
* o We are transfering the last segment if residual_datacnt has
* the SG_LAST_SEG flag set.
*
* Host:
* o A residual can only have occurred if a completed scb has the
* SG_STATUS_VALID flag set. Inspection of the SCSI status field,
* the residual_datacnt, and the residual_sgptr field will tell
* for sure.
*
* o residual_sgptr and sgptr refer to the "next" sg entry
* and so may point beyond the last valid sg entry for the
* transfer.
*/
#define SG_PTR_MASK 0xFFFFFFF8
/*16*/ uint16_t tag; /* Reused by Sequencer. */
/*18*/ uint8_t control; /* See SCB_CONTROL in aic79xx.reg for details */
/*19*/ uint8_t scsiid; /*
* Selection out Id
* Our Id (bits 0-3) Their ID (bits 4-7)
*/
/*20*/ uint8_t lun;
/*21*/ uint8_t task_attribute;
/*22*/ uint8_t cdb_len;
/*23*/ uint8_t task_management;
/*24*/ uint64_t dataptr;
/*32*/ uint32_t datacnt; /* Byte 3 is spare. */
/*36*/ uint32_t sgptr;
/*40*/ uint32_t hscb_busaddr;
/*44*/ uint32_t next_hscb_busaddr;
/********** Long lun field only downloaded for full 8 byte lun support ********/
/*48*/ uint8_t pkt_long_lun[8];
/******* Fields below are not Downloaded (Sequencer may use for scratch) ******/
/*56*/ uint8_t spare[8];
};
/************************ Kernel SCB Definitions ******************************/
/*
* Some fields of the SCB are OS dependent. Here we collect the
* definitions for elements that all OS platforms need to include
* in there SCB definition.
*/
/*
* Definition of a scatter/gather element as transfered to the controller.
* The aic7xxx chips only support a 24bit length. We use the top byte of
* the length to store additional address bits and a flag to indicate
* that a given segment terminates the transfer. This gives us an
* addressable range of 512GB on machines with 64bit PCI or with chips
* that can support dual address cycles on 32bit PCI busses.
*/
struct ahd_dma_seg {
uint32_t addr;
uint32_t len;
#define AHD_DMA_LAST_SEG 0x80000000
#define AHD_SG_HIGH_ADDR_MASK 0x7F000000
#define AHD_SG_LEN_MASK 0x00FFFFFF
};
struct ahd_dma64_seg {
uint64_t addr;
uint32_t len;
uint32_t pad;
};
struct map_node {
bus_dmamap_t dmamap;
dma_addr_t physaddr;
uint8_t *vaddr;
SLIST_ENTRY(map_node) links;
};
/*
* The current state of this SCB.
*/
typedef enum {
SCB_FLAG_NONE = 0x00000,
SCB_TRANSMISSION_ERROR = 0x00001,/*
* We detected a parity or CRC
* error that has effected the
* payload of the command. This
* flag is checked when normal
* status is returned to catch
* the case of a target not
* responding to our attempt
* to report the error.
*/
SCB_OTHERTCL_TIMEOUT = 0x00002,/*
* Another device was active
* during the first timeout for
* this SCB so we gave ourselves
* an additional timeout period
* in case it was hogging the
* bus.
*/
SCB_DEVICE_RESET = 0x00004,
SCB_SENSE = 0x00008,
SCB_CDB32_PTR = 0x00010,
SCB_RECOVERY_SCB = 0x00020,
SCB_AUTO_NEGOTIATE = 0x00040,/* Negotiate to achieve goal. */
SCB_NEGOTIATE = 0x00080,/* Negotiation forced for command. */
SCB_ABORT = 0x00100,
SCB_ACTIVE = 0x00200,
SCB_TARGET_IMMEDIATE = 0x00400,
SCB_PACKETIZED = 0x00800,
SCB_EXPECT_PPR_BUSFREE = 0x01000,
SCB_PKT_SENSE = 0x02000,
SCB_EXTERNAL_RESET = 0x04000,/* Device was reset externally */
SCB_ON_COL_LIST = 0x08000,
SCB_SILENT = 0x10000 /*
* Be quiet about transmission type
* errors. They are expected and we
* don't want to upset the user. This
* flag is typically used during DV.
*/
} scb_flag;
struct scb {
struct hardware_scb *hscb;
union {
SLIST_ENTRY(scb) sle;
LIST_ENTRY(scb) le;
TAILQ_ENTRY(scb) tqe;
} links;
union {
SLIST_ENTRY(scb) sle;
LIST_ENTRY(scb) le;
TAILQ_ENTRY(scb) tqe;
} links2;
#define pending_links links2.le
#define collision_links links2.le
struct scb *col_scb;
ahd_io_ctx_t io_ctx;
struct ahd_softc *ahd_softc;
scb_flag flags;
#ifndef __linux__
bus_dmamap_t dmamap;
#endif
struct scb_platform_data *platform_data;
struct map_node *hscb_map;
struct map_node *sg_map;
struct map_node *sense_map;
void *sg_list;
uint8_t *sense_data;
dma_addr_t sg_list_busaddr;
dma_addr_t sense_busaddr;
u_int sg_count;/* How full ahd_dma_seg is */
#define AHD_MAX_LQ_CRC_ERRORS 5
u_int crc_retry_count;
};
TAILQ_HEAD(scb_tailq, scb);
LIST_HEAD(scb_list, scb);
struct scb_data {
/*
* TAILQ of lists of free SCBs grouped by device
* collision domains.
*/
struct scb_tailq free_scbs;
/*
* Per-device lists of SCBs whose tag ID would collide
* with an already active tag on the device.
*/
struct scb_list free_scb_lists[AHD_NUM_TARGETS * AHD_NUM_LUNS_NONPKT];
/*
* SCBs that will not collide with any active device.
*/
struct scb_list any_dev_free_scb_list;
/*
* Mapping from tag to SCB.
*/
struct scb *scbindex[AHD_SCB_MAX];
/*
* "Bus" addresses of our data structures.
*/
bus_dma_tag_t hscb_dmat; /* dmat for our hardware SCB array */
bus_dma_tag_t sg_dmat; /* dmat for our sg segments */
bus_dma_tag_t sense_dmat; /* dmat for our sense buffers */
SLIST_HEAD(, map_node) hscb_maps;
SLIST_HEAD(, map_node) sg_maps;
SLIST_HEAD(, map_node) sense_maps;
int scbs_left; /* unallocated scbs in head map_node */
int sgs_left; /* unallocated sgs in head map_node */
int sense_left; /* unallocated sense in head map_node */
uint16_t numscbs;
uint16_t maxhscbs; /* Number of SCBs on the card */
uint8_t init_level; /*
* How far we've initialized
* this structure.
*/
};
/************************ Target Mode Definitions *****************************/
/*
* Connection desciptor for select-in requests in target mode.
*/
struct target_cmd {
uint8_t scsiid; /* Our ID and the initiator's ID */
uint8_t identify; /* Identify message */
uint8_t bytes[22]; /*
* Bytes contains any additional message
* bytes terminated by 0xFF. The remainder
* is the cdb to execute.
*/
uint8_t cmd_valid; /*
* When a command is complete, the firmware
* will set cmd_valid to all bits set.
* After the host has seen the command,
* the bits are cleared. This allows us
* to just peek at host memory to determine
* if more work is complete. cmd_valid is on
* an 8 byte boundary to simplify setting
* it on aic7880 hardware which only has
* limited direct access to the DMA FIFO.
*/
uint8_t pad[7];
};
/*
* Number of events we can buffer up if we run out
* of immediate notify ccbs.
*/
#define AHD_TMODE_EVENT_BUFFER_SIZE 8
struct ahd_tmode_event {
uint8_t initiator_id;
uint8_t event_type; /* MSG type or EVENT_TYPE_BUS_RESET */
#define EVENT_TYPE_BUS_RESET 0xFF
uint8_t event_arg;
};
/*
* Per enabled lun target mode state.
* As this state is directly influenced by the host OS'es target mode
* environment, we let the OS module define it. Forward declare the
* structure here so we can store arrays of them, etc. in OS neutral
* data structures.
*/
#ifdef AHD_TARGET_MODE
struct ahd_tmode_lstate {
struct cam_path *path;
struct ccb_hdr_slist accept_tios;
struct ccb_hdr_slist immed_notifies;
struct ahd_tmode_event event_buffer[AHD_TMODE_EVENT_BUFFER_SIZE];
uint8_t event_r_idx;
uint8_t event_w_idx;
};
#else
struct ahd_tmode_lstate;
#endif
/******************** Transfer Negotiation Datastructures *********************/
#define AHD_TRANS_CUR 0x01 /* Modify current neogtiation status */
#define AHD_TRANS_ACTIVE 0x03 /* Assume this target is on the bus */
#define AHD_TRANS_GOAL 0x04 /* Modify negotiation goal */
#define AHD_TRANS_USER 0x08 /* Modify user negotiation settings */
#define AHD_PERIOD_10MHz 0x19
#define AHD_WIDTH_UNKNOWN 0xFF
#define AHD_PERIOD_UNKNOWN 0xFF
#define AHD_OFFSET_UNKNOWN 0xFF
#define AHD_PPR_OPTS_UNKNOWN 0xFF
/*
* Transfer Negotiation Information.
*/
struct ahd_transinfo {
uint8_t protocol_version; /* SCSI Revision level */
uint8_t transport_version; /* SPI Revision level */
uint8_t width; /* Bus width */
uint8_t period; /* Sync rate factor */
uint8_t offset; /* Sync offset */
uint8_t ppr_options; /* Parallel Protocol Request options */
};
/*
* Per-initiator current, goal and user transfer negotiation information. */
struct ahd_initiator_tinfo {
struct ahd_transinfo curr;
struct ahd_transinfo goal;
struct ahd_transinfo user;
};
/*
* Per enabled target ID state.
* Pointers to lun target state as well as sync/wide negotiation information
* for each initiator<->target mapping. For the initiator role we pretend
* that we are the target and the targets are the initiators since the
* negotiation is the same regardless of role.
*/
struct ahd_tmode_tstate {
struct ahd_tmode_lstate* enabled_luns[AHD_NUM_LUNS];
struct ahd_initiator_tinfo transinfo[AHD_NUM_TARGETS];
/*
* Per initiator state bitmasks.
*/
uint16_t auto_negotiate;/* Auto Negotiation Required */
uint16_t discenable; /* Disconnection allowed */
uint16_t tagenable; /* Tagged Queuing allowed */
};
/*
* Points of interest along the negotiated transfer scale.
*/
#define AHD_SYNCRATE_160 0x8
#define AHD_SYNCRATE_PACED 0x8
#define AHD_SYNCRATE_DT 0x9
#define AHD_SYNCRATE_ULTRA2 0xa
#define AHD_SYNCRATE_ULTRA 0xc
#define AHD_SYNCRATE_FAST 0x19
#define AHD_SYNCRATE_MIN_DT AHD_SYNCRATE_FAST
#define AHD_SYNCRATE_SYNC 0x32
#define AHD_SYNCRATE_MIN 0x60
#define AHD_SYNCRATE_ASYNC 0xFF
#define AHD_SYNCRATE_MAX AHD_SYNCRATE_160
/* Safe and valid period for async negotiations. */
#define AHD_ASYNC_XFER_PERIOD 0x44
/*
* In RevA, the synctable uses a 120MHz rate for the period
* factor 8 and 160MHz for the period factor 7. The 120MHz
* rate never made it into the official SCSI spec, so we must
* compensate when setting the negotiation table for Rev A
* parts.
*/
#define AHD_SYNCRATE_REVA_120 0x8
#define AHD_SYNCRATE_REVA_160 0x7
/***************************** Lookup Tables **********************************/
/*
* Phase -> name and message out response
* to parity errors in each phase table.
*/
struct ahd_phase_table_entry {
uint8_t phase;
uint8_t mesg_out; /* Message response to parity errors */
const char *phasemsg;
};
/************************** Serial EEPROM Format ******************************/
struct seeprom_config {
/*
* Per SCSI ID Configuration Flags
*/
uint16_t device_flags[16]; /* words 0-15 */
#define CFXFER 0x003F /* synchronous transfer rate */
#define CFXFER_ASYNC 0x3F
#define CFQAS 0x0040 /* Negotiate QAS */
#define CFPACKETIZED 0x0080 /* Negotiate Packetized Transfers */
#define CFSTART 0x0100 /* send start unit SCSI command */
#define CFINCBIOS 0x0200 /* include in BIOS scan */
#define CFDISC 0x0400 /* enable disconnection */
#define CFMULTILUNDEV 0x0800 /* Probe multiple luns in BIOS scan */
#define CFWIDEB 0x1000 /* wide bus device */
#define CFHOSTMANAGED 0x8000 /* Managed by a RAID controller */
/*
* BIOS Control Bits
*/
uint16_t bios_control; /* word 16 */
#define CFSUPREM 0x0001 /* support all removeable drives */
#define CFSUPREMB 0x0002 /* support removeable boot drives */
#define CFBIOSSTATE 0x000C /* BIOS Action State */
#define CFBS_DISABLED 0x00
#define CFBS_ENABLED 0x04
#define CFBS_DISABLED_SCAN 0x08
#define CFENABLEDV 0x0010 /* Perform Domain Validation */
#define CFCTRL_A 0x0020 /* BIOS displays Ctrl-A message */
#define CFSPARITY 0x0040 /* SCSI parity */
#define CFEXTEND 0x0080 /* extended translation enabled */
#define CFBOOTCD 0x0100 /* Support Bootable CD-ROM */
#define CFMSG_LEVEL 0x0600 /* BIOS Message Level */
#define CFMSG_VERBOSE 0x0000
#define CFMSG_SILENT 0x0200
#define CFMSG_DIAG 0x0400
#define CFRESETB 0x0800 /* reset SCSI bus at boot */
/* UNUSED 0xf000 */
/*
* Host Adapter Control Bits
*/
uint16_t adapter_control; /* word 17 */
#define CFAUTOTERM 0x0001 /* Perform Auto termination */
#define CFSTERM 0x0002 /* SCSI low byte termination */
#define CFWSTERM 0x0004 /* SCSI high byte termination */
#define CFSEAUTOTERM 0x0008 /* Ultra2 Perform secondary Auto Term*/
#define CFSELOWTERM 0x0010 /* Ultra2 secondary low term */
#define CFSEHIGHTERM 0x0020 /* Ultra2 secondary high term */
#define CFSTPWLEVEL 0x0040 /* Termination level control */
#define CFBIOSAUTOTERM 0x0080 /* Perform Auto termination */
#define CFTERM_MENU 0x0100 /* BIOS displays termination menu */
#define CFCLUSTERENB 0x8000 /* Cluster Enable */
/*
* Bus Release Time, Host Adapter ID
*/
uint16_t brtime_id; /* word 18 */
#define CFSCSIID 0x000f /* host adapter SCSI ID */
/* UNUSED 0x00f0 */
#define CFBRTIME 0xff00 /* bus release time/PCI Latency Time */
/*
* Maximum targets
*/
uint16_t max_targets; /* word 19 */
#define CFMAXTARG 0x00ff /* maximum targets */
#define CFBOOTLUN 0x0f00 /* Lun to boot from */
#define CFBOOTID 0xf000 /* Target to boot from */
uint16_t res_1[10]; /* words 20-29 */
uint16_t signature; /* BIOS Signature */
#define CFSIGNATURE 0x400
uint16_t checksum; /* word 31 */
};
/*
* Vital Product Data used during POST and by the BIOS.
*/
struct vpd_config {
uint8_t bios_flags;
#define VPDMASTERBIOS 0x0001
#define VPDBOOTHOST 0x0002
uint8_t reserved_1[21];
uint8_t resource_type;
uint8_t resource_len[2];
uint8_t resource_data[8];
uint8_t vpd_tag;
uint16_t vpd_len;
uint8_t vpd_keyword[2];
uint8_t length;
uint8_t revision;
uint8_t device_flags;
uint8_t termnation_menus[2];
uint8_t fifo_threshold;
uint8_t end_tag;
uint8_t vpd_checksum;
uint16_t default_target_flags;
uint16_t default_bios_flags;
uint16_t default_ctrl_flags;
uint8_t default_irq;
uint8_t pci_lattime;
uint8_t max_target;
uint8_t boot_lun;
uint16_t signature;
uint8_t reserved_2;
uint8_t checksum;
uint8_t reserved_3[4];
};
/****************************** Flexport Logic ********************************/
#define FLXADDR_TERMCTL 0x0
#define FLX_TERMCTL_ENSECHIGH 0x8
#define FLX_TERMCTL_ENSECLOW 0x4
#define FLX_TERMCTL_ENPRIHIGH 0x2
#define FLX_TERMCTL_ENPRILOW 0x1
#define FLXADDR_ROMSTAT_CURSENSECTL 0x1
#define FLX_ROMSTAT_SEECFG 0xF0
#define FLX_ROMSTAT_EECFG 0x0F
#define FLX_ROMSTAT_SEE_93C66 0x00
#define FLX_ROMSTAT_SEE_NONE 0xF0
#define FLX_ROMSTAT_EE_512x8 0x0
#define FLX_ROMSTAT_EE_1MBx8 0x1
#define FLX_ROMSTAT_EE_2MBx8 0x2
#define FLX_ROMSTAT_EE_4MBx8 0x3
#define FLX_ROMSTAT_EE_16MBx8 0x4
#define CURSENSE_ENB 0x1
#define FLXADDR_FLEXSTAT 0x2
#define FLX_FSTAT_BUSY 0x1
#define FLXADDR_CURRENT_STAT 0x4
#define FLX_CSTAT_SEC_HIGH 0xC0
#define FLX_CSTAT_SEC_LOW 0x30
#define FLX_CSTAT_PRI_HIGH 0x0C
#define FLX_CSTAT_PRI_LOW 0x03
#define FLX_CSTAT_MASK 0x03
#define FLX_CSTAT_SHIFT 2
#define FLX_CSTAT_OKAY 0x0
#define FLX_CSTAT_OVER 0x1
#define FLX_CSTAT_UNDER 0x2
#define FLX_CSTAT_INVALID 0x3
int ahd_read_seeprom(struct ahd_softc *ahd, uint16_t *buf,
u_int start_addr, u_int count, int bstream);
int ahd_write_seeprom(struct ahd_softc *ahd, uint16_t *buf,
u_int start_addr, u_int count);
int ahd_verify_cksum(struct seeprom_config *sc);
int ahd_acquire_seeprom(struct ahd_softc *ahd);
void ahd_release_seeprom(struct ahd_softc *ahd);
/**************************** Message Buffer *********************************/
typedef enum {
MSG_FLAG_NONE = 0x00,
MSG_FLAG_EXPECT_PPR_BUSFREE = 0x01,
MSG_FLAG_IU_REQ_CHANGED = 0x02,
MSG_FLAG_EXPECT_IDE_BUSFREE = 0x04,
MSG_FLAG_EXPECT_QASREJ_BUSFREE = 0x08,
MSG_FLAG_PACKETIZED = 0x10
} ahd_msg_flags;
typedef enum {
MSG_TYPE_NONE = 0x00,
MSG_TYPE_INITIATOR_MSGOUT = 0x01,
MSG_TYPE_INITIATOR_MSGIN = 0x02,
MSG_TYPE_TARGET_MSGOUT = 0x03,
MSG_TYPE_TARGET_MSGIN = 0x04
} ahd_msg_type;
typedef enum {
MSGLOOP_IN_PROG,
MSGLOOP_MSGCOMPLETE,
MSGLOOP_TERMINATED
} msg_loop_stat;
/*********************** Software Configuration Structure *********************/
struct ahd_suspend_channel_state {
uint8_t scsiseq;
uint8_t sxfrctl0;
uint8_t sxfrctl1;
uint8_t simode0;
uint8_t simode1;
uint8_t seltimer;
uint8_t seqctl;
};
struct ahd_suspend_pci_state {
uint32_t devconfig;
uint8_t command;
uint8_t csize_lattime;
};
struct ahd_suspend_state {
struct ahd_suspend_channel_state channel[2];
struct ahd_suspend_pci_state pci_state;
uint8_t optionmode;
uint8_t dscommand0;
uint8_t dspcistatus;
/* hsmailbox */
uint8_t crccontrol1;
uint8_t scbbaddr;
/* Host and sequencer SCB counts */
uint8_t dff_thrsh;
uint8_t *scratch_ram;
uint8_t *btt;
};
typedef void (*ahd_bus_intr_t)(struct ahd_softc *);
typedef enum {
AHD_MODE_DFF0,
AHD_MODE_DFF1,
AHD_MODE_CCHAN,
AHD_MODE_SCSI,
AHD_MODE_CFG,
AHD_MODE_UNKNOWN
} ahd_mode;
#define AHD_MK_MSK(x) (0x01 << (x))
#define AHD_MODE_DFF0_MSK AHD_MK_MSK(AHD_MODE_DFF0)
#define AHD_MODE_DFF1_MSK AHD_MK_MSK(AHD_MODE_DFF1)
#define AHD_MODE_CCHAN_MSK AHD_MK_MSK(AHD_MODE_CCHAN)
#define AHD_MODE_SCSI_MSK AHD_MK_MSK(AHD_MODE_SCSI)
#define AHD_MODE_CFG_MSK AHD_MK_MSK(AHD_MODE_CFG)
#define AHD_MODE_UNKNOWN_MSK AHD_MK_MSK(AHD_MODE_UNKNOWN)
#define AHD_MODE_ANY_MSK (~0)
typedef uint8_t ahd_mode_state;
typedef void ahd_callback_t (void *);
struct ahd_completion
{
uint16_t tag;
uint8_t sg_status;
uint8_t valid_tag;
};
struct ahd_softc {
bus_space_tag_t tags[2];
bus_space_handle_t bshs[2];
#ifndef __linux__
bus_dma_tag_t buffer_dmat; /* dmat for buffer I/O */
#endif
struct scb_data scb_data;
struct hardware_scb *next_queued_hscb;
struct map_node *next_queued_hscb_map;
/*
* SCBs that have been sent to the controller
*/
LIST_HEAD(, scb) pending_scbs;
/*
* Current register window mode information.
*/
ahd_mode dst_mode;
ahd_mode src_mode;
/*
* Saved register window mode information
* used for restore on next unpause.
*/
ahd_mode saved_dst_mode;
ahd_mode saved_src_mode;
/*
* Platform specific data.
*/
struct ahd_platform_data *platform_data;
/*
* Platform specific device information.
*/
ahd_dev_softc_t dev_softc;
/*
* Bus specific device information.
*/
ahd_bus_intr_t bus_intr;
/*
* Target mode related state kept on a per enabled lun basis.
* Targets that are not enabled will have null entries.
* As an initiator, we keep one target entry for our initiator
* ID to store our sync/wide transfer settings.
*/
struct ahd_tmode_tstate *enabled_targets[AHD_NUM_TARGETS];
/*
* The black hole device responsible for handling requests for
* disabled luns on enabled targets.
*/
struct ahd_tmode_lstate *black_hole;
/*
* Device instance currently on the bus awaiting a continue TIO
* for a command that was not given the disconnect priveledge.
*/
struct ahd_tmode_lstate *pending_device;
/*
* Timer handles for timer driven callbacks.
*/
ahd_timer_t reset_timer;
ahd_timer_t stat_timer;
/*
* Statistics.
*/
#define AHD_STAT_UPDATE_US 250000 /* 250ms */
#define AHD_STAT_BUCKETS 4
u_int cmdcmplt_bucket;
uint32_t cmdcmplt_counts[AHD_STAT_BUCKETS];
uint32_t cmdcmplt_total;
/*
* Card characteristics
*/
ahd_chip chip;
ahd_feature features;
ahd_bug bugs;
ahd_flag flags;
struct seeprom_config *seep_config;
/* Command Queues */
struct ahd_completion *qoutfifo;
uint16_t qoutfifonext;
uint16_t qoutfifonext_valid_tag;
uint16_t qinfifonext;
uint16_t qinfifo[AHD_SCB_MAX];
/*
* Our qfreeze count. The sequencer compares
* this value with its own counter to determine
* whether to allow selections to occur.
*/
uint16_t qfreeze_cnt;
/* Values to store in the SEQCTL register for pause and unpause */
uint8_t unpause;
uint8_t pause;
/* Critical Section Data */
struct cs *critical_sections;
u_int num_critical_sections;
/* Buffer for handling packetized bitbucket. */
uint8_t *overrun_buf;
/* Links for chaining softcs */
TAILQ_ENTRY(ahd_softc) links;
/* Channel Names ('A', 'B', etc.) */
char channel;
/* Initiator Bus ID */
uint8_t our_id;
/*
* Target incoming command FIFO.
*/
struct target_cmd *targetcmds;
uint8_t tqinfifonext;
/*
* Cached verson of the hs_mailbox so we can avoid
* pausing the sequencer during mailbox updates.
*/
uint8_t hs_mailbox;
/*
* Incoming and outgoing message handling.
*/
uint8_t send_msg_perror;
ahd_msg_flags msg_flags;
ahd_msg_type msg_type;
uint8_t msgout_buf[12];/* Message we are sending */
uint8_t msgin_buf[12];/* Message we are receiving */
u_int msgout_len; /* Length of message to send */
u_int msgout_index; /* Current index in msgout */
u_int msgin_index; /* Current index in msgin */
/*
* Mapping information for data structures shared
* between the sequencer and kernel.
*/
bus_dma_tag_t parent_dmat;
bus_dma_tag_t shared_data_dmat;
struct map_node shared_data_map;
/* Information saved through suspend/resume cycles */
struct ahd_suspend_state suspend_state;
/* Number of enabled target mode device on this card */
u_int enabled_luns;
/* Initialization level of this data structure */
u_int init_level;
/* PCI cacheline size. */
u_int pci_cachesize;
/* IO Cell Parameters */
uint8_t iocell_opts[AHD_NUM_PER_DEV_ANNEXCOLS];
u_int stack_size;
uint16_t *saved_stack;
/* Per-Unit descriptive information */
const char *description;
const char *bus_description;
char *name;
int unit;
/* Selection Timer settings */
int seltime;
/*
* Interrupt coalescing settings.
*/
#define AHD_INT_COALESCING_TIMER_DEFAULT 250 /*us*/
#define AHD_INT_COALESCING_MAXCMDS_DEFAULT 10
#define AHD_INT_COALESCING_MAXCMDS_MAX 127
#define AHD_INT_COALESCING_MINCMDS_DEFAULT 5
#define AHD_INT_COALESCING_MINCMDS_MAX 127
#define AHD_INT_COALESCING_THRESHOLD_DEFAULT 2000
#define AHD_INT_COALESCING_STOP_THRESHOLD_DEFAULT 1000
u_int int_coalescing_timer;
u_int int_coalescing_maxcmds;
u_int int_coalescing_mincmds;
u_int int_coalescing_threshold;
u_int int_coalescing_stop_threshold;
uint16_t user_discenable;/* Disconnection allowed */
uint16_t user_tagenable;/* Tagged Queuing allowed */
};
/*************************** IO Cell Configuration ****************************/
#define AHD_PRECOMP_SLEW_INDEX \
(AHD_ANNEXCOL_PRECOMP_SLEW - AHD_ANNEXCOL_PER_DEV0)
#define AHD_AMPLITUDE_INDEX \
(AHD_ANNEXCOL_AMPLITUDE - AHD_ANNEXCOL_PER_DEV0)
#define AHD_SET_SLEWRATE(ahd, new_slew) \
do { \
(ahd)->iocell_opts[AHD_PRECOMP_SLEW_INDEX] &= ~AHD_SLEWRATE_MASK; \
(ahd)->iocell_opts[AHD_PRECOMP_SLEW_INDEX] |= \
(((new_slew) << AHD_SLEWRATE_SHIFT) & AHD_SLEWRATE_MASK); \
} while (0)
#define AHD_SET_PRECOMP(ahd, new_pcomp) \
do { \
(ahd)->iocell_opts[AHD_PRECOMP_SLEW_INDEX] &= ~AHD_PRECOMP_MASK; \
(ahd)->iocell_opts[AHD_PRECOMP_SLEW_INDEX] |= \
(((new_pcomp) << AHD_PRECOMP_SHIFT) & AHD_PRECOMP_MASK); \
} while (0)
#define AHD_SET_AMPLITUDE(ahd, new_amp) \
do { \
(ahd)->iocell_opts[AHD_AMPLITUDE_INDEX] &= ~AHD_AMPLITUDE_MASK; \
(ahd)->iocell_opts[AHD_AMPLITUDE_INDEX] |= \
(((new_amp) << AHD_AMPLITUDE_SHIFT) & AHD_AMPLITUDE_MASK); \
} while (0)
/************************ Active Device Information ***************************/
typedef enum {
ROLE_UNKNOWN,
ROLE_INITIATOR,
ROLE_TARGET
} role_t;
struct ahd_devinfo {
int our_scsiid;
int target_offset;
uint16_t target_mask;
u_int target;
u_int lun;
char channel;
role_t role; /*
* Only guaranteed to be correct if not
* in the busfree state.
*/
};
/****************************** PCI Structures ********************************/
#define AHD_PCI_IOADDR0 PCIR_BAR(0) /* I/O BAR*/
#define AHD_PCI_MEMADDR PCIR_BAR(1) /* Memory BAR */
#define AHD_PCI_IOADDR1 PCIR_BAR(3) /* Second I/O BAR */
typedef int (ahd_device_setup_t)(struct ahd_softc *);
struct ahd_pci_identity {
uint64_t full_id;
uint64_t id_mask;
const char *name;
ahd_device_setup_t *setup;
};
/***************************** VL/EISA Declarations ***************************/
struct aic7770_identity {
uint32_t full_id;
uint32_t id_mask;
const char *name;
ahd_device_setup_t *setup;
};
extern struct aic7770_identity aic7770_ident_table [];
extern const int ahd_num_aic7770_devs;
#define AHD_EISA_SLOT_OFFSET 0xc00
#define AHD_EISA_IOSIZE 0x100
/*************************** Function Declarations ****************************/
/******************************************************************************/
/***************************** PCI Front End *********************************/
const struct ahd_pci_identity *ahd_find_pci_device(ahd_dev_softc_t);
int ahd_pci_config(struct ahd_softc *,
const struct ahd_pci_identity *);
int ahd_pci_test_register_access(struct ahd_softc *);
#ifdef CONFIG_PM
void ahd_pci_suspend(struct ahd_softc *);
void ahd_pci_resume(struct ahd_softc *);
#endif
/************************** SCB and SCB queue management **********************/
void ahd_qinfifo_requeue_tail(struct ahd_softc *ahd,
struct scb *scb);
/****************************** Initialization ********************************/
struct ahd_softc *ahd_alloc(void *platform_arg, char *name);
int ahd_softc_init(struct ahd_softc *);
void ahd_controller_info(struct ahd_softc *ahd, char *buf);
int ahd_init(struct ahd_softc *ahd);
#ifdef CONFIG_PM
int ahd_suspend(struct ahd_softc *ahd);
void ahd_resume(struct ahd_softc *ahd);
#endif
int ahd_default_config(struct ahd_softc *ahd);
int ahd_parse_vpddata(struct ahd_softc *ahd,
struct vpd_config *vpd);
int ahd_parse_cfgdata(struct ahd_softc *ahd,
struct seeprom_config *sc);
void ahd_intr_enable(struct ahd_softc *ahd, int enable);
void ahd_pause_and_flushwork(struct ahd_softc *ahd);
void ahd_set_unit(struct ahd_softc *, int);
void ahd_set_name(struct ahd_softc *, char *);
struct scb *ahd_get_scb(struct ahd_softc *ahd, u_int col_idx);
void ahd_free_scb(struct ahd_softc *ahd, struct scb *scb);
void ahd_free(struct ahd_softc *ahd);
int ahd_reset(struct ahd_softc *ahd, int reinit);
int ahd_write_flexport(struct ahd_softc *ahd,
u_int addr, u_int value);
int ahd_read_flexport(struct ahd_softc *ahd, u_int addr,
uint8_t *value);
/***************************** Error Recovery *********************************/
typedef enum {
SEARCH_COMPLETE,
SEARCH_COUNT,
SEARCH_REMOVE,
SEARCH_PRINT
} ahd_search_action;
int ahd_search_qinfifo(struct ahd_softc *ahd, int target,
char channel, int lun, u_int tag,
role_t role, uint32_t status,
ahd_search_action action);
int ahd_search_disc_list(struct ahd_softc *ahd, int target,
char channel, int lun, u_int tag,
int stop_on_first, int remove,
int save_state);
int ahd_reset_channel(struct ahd_softc *ahd, char channel,
int initiate_reset);
/*************************** Utility Functions ********************************/
void ahd_compile_devinfo(struct ahd_devinfo *devinfo,
u_int our_id, u_int target,
u_int lun, char channel,
role_t role);
/************************** Transfer Negotiation ******************************/
void ahd_find_syncrate(struct ahd_softc *ahd, u_int *period,
u_int *ppr_options, u_int maxsync);
/*
* Negotiation types. These are used to qualify if we should renegotiate
* even if our goal and current transport parameters are identical.
*/
typedef enum {
AHD_NEG_TO_GOAL, /* Renegotiate only if goal and curr differ. */
AHD_NEG_IF_NON_ASYNC, /* Renegotiate so long as goal is non-async. */
AHD_NEG_ALWAYS /* Renegotiat even if goal is async. */
} ahd_neg_type;
int ahd_update_neg_request(struct ahd_softc*,
struct ahd_devinfo*,
struct ahd_tmode_tstate*,
struct ahd_initiator_tinfo*,
ahd_neg_type);
void ahd_set_width(struct ahd_softc *ahd,
struct ahd_devinfo *devinfo,
u_int width, u_int type, int paused);
void ahd_set_syncrate(struct ahd_softc *ahd,
struct ahd_devinfo *devinfo,
u_int period, u_int offset,
u_int ppr_options,
u_int type, int paused);
typedef enum {
AHD_QUEUE_NONE,
AHD_QUEUE_BASIC,
AHD_QUEUE_TAGGED
} ahd_queue_alg;
/**************************** Target Mode *************************************/
#ifdef AHD_TARGET_MODE
void ahd_send_lstate_events(struct ahd_softc *,
struct ahd_tmode_lstate *);
void ahd_handle_en_lun(struct ahd_softc *ahd,
struct cam_sim *sim, union ccb *ccb);
cam_status ahd_find_tmode_devs(struct ahd_softc *ahd,
struct cam_sim *sim, union ccb *ccb,
struct ahd_tmode_tstate **tstate,
struct ahd_tmode_lstate **lstate,
int notfound_failure);
#ifndef AHD_TMODE_ENABLE
#define AHD_TMODE_ENABLE 0
#endif
#endif
/******************************* Debug ***************************************/
#ifdef AHD_DEBUG
extern uint32_t ahd_debug;
#define AHD_SHOW_MISC 0x00001
#define AHD_SHOW_SENSE 0x00002
#define AHD_SHOW_RECOVERY 0x00004
#define AHD_DUMP_SEEPROM 0x00008
#define AHD_SHOW_TERMCTL 0x00010
#define AHD_SHOW_MEMORY 0x00020
#define AHD_SHOW_MESSAGES 0x00040
#define AHD_SHOW_MODEPTR 0x00080
#define AHD_SHOW_SELTO 0x00100
#define AHD_SHOW_FIFOS 0x00200
#define AHD_SHOW_QFULL 0x00400
#define AHD_SHOW_DV 0x00800
#define AHD_SHOW_MASKED_ERRORS 0x01000
#define AHD_SHOW_QUEUE 0x02000
#define AHD_SHOW_TQIN 0x04000
#define AHD_SHOW_SG 0x08000
#define AHD_SHOW_INT_COALESCING 0x10000
#define AHD_DEBUG_SEQUENCER 0x20000
#endif
void ahd_print_devinfo(struct ahd_softc *ahd,
struct ahd_devinfo *devinfo);
void ahd_dump_card_state(struct ahd_softc *ahd);
int ahd_print_register(const ahd_reg_parse_entry_t *table,
u_int num_entries,
const char *name,
u_int address,
u_int value,
u_int *cur_column,
u_int wrap_point);
#endif /* _AIC79XX_H_ */
| skywalker01/Samsung-Galaxy-S-Plus | drivers/scsi/aic7xxx/aic79xx.h | C | gpl-2.0 | 46,794 |
/*
* Timeval.cc -- time arithmetic
*
* (c) 2003 Dr. Andreas Mueller, Beratung und Entwicklung
*
* $Id: Timeval.cc,v 1.7 2009/01/10 19:00:25 afm Exp $
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif /* HAVE_CONFIG_H */
#include <Timeval.h>
#ifdef HAVE_MATH_H
#include <math.h>
#endif /* HAVE_MATH_H */
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif /* HAVE_UNISTD_H */
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif /* HAVE_SYS_TYPES_H */
#include <mdebug.h>
namespace meteo {
Timeval::Timeval(void) {
t.tv_sec = t.tv_usec = 0;
}
Timeval::Timeval(struct timeval tv) {
t.tv_sec = tv.tv_sec;
t.tv_usec = tv.tv_usec;
}
Timeval::Timeval(double r) {
t.tv_sec = (int)r;
t.tv_usec = (int)(1000000. * (r - t.tv_sec));
}
Timeval::Timeval(int l) {
t.tv_sec = l; t.tv_usec = 0;
}
void Timeval::now(void) {
gettimeofday(&t, NULL);
}
time_t Timeval::getTimekey(void) const {
time_t result = t.tv_sec;
result -= (result % 60);
return result;
}
void Timeval::wait(void) {
struct timeval local;
local = t;
if (0 != select(0, NULL, NULL, NULL, &local)) {
mdebug(LOG_DEBUG, MDEBUG_LOG, MDEBUG_ERRNO,
"select problem in drain");
}
}
double Timeval::getValue(void) const {
return t.tv_sec + t.tv_usec/1000000.;
}
Timeval& Timeval::operator+=(double b) {
t.tv_sec += (int)b;
t.tv_usec += (int)(1000000 * (b - (int)b));
if (t.tv_usec >= 1000000) {
t.tv_usec -= 1000000;
t.tv_sec++;
}
return *this;
}
Timeval& Timeval::operator+=(int b) {
t.tv_sec += b;
return *this;
}
Timeval operator+(const Timeval& a, const Timeval& b) {
struct timeval tv;
tv.tv_sec = a.t.tv_sec + b.t.tv_sec;
tv.tv_usec = a.t.tv_usec + b.t.tv_usec;
if (tv.tv_usec >= 1000000) {
tv.tv_sec++;
tv.tv_usec -= 1000000;
}
return Timeval(tv);
}
Timeval operator+(const Timeval& a, const double b) {
return Timeval(a.getValue() + b);
}
Timeval operator+(const Timeval& a, const int b) {
struct timeval tv;
tv.tv_sec = a.t.tv_sec + b; tv.tv_usec = a.t.tv_usec;
return Timeval(tv);
}
Timeval operator-(const Timeval& a, const Timeval& b) {
return Timeval(a.getValue() - b.getValue());
}
} /* namespace meteo */
| martinluther/meteo | lib/Timeval.cc | C++ | gpl-2.0 | 2,129 |
using Rocket.API;
using Rocket.API.Extensions;
using Rocket.Core.Logging;
using Rocket.Unturned.Chat;
using Rocket.Unturned.Commands;
using Rocket.Unturned.Player;
using System;
using System.Collections.Generic;
using UnityEngine;
namespace coolpuppy24.rpevents
{
public class ArrestFinishCommand : IRocketCommand
{
public static Main Instance;
public List<string> Aliases
{
get
{
return new List<string>() { };
}
}
public AllowedCaller AllowedCaller
{
get
{
return AllowedCaller.Player;
}
}
public string Help
{
get
{
return "Finishes arrest on a player";
}
}
public string Name
{
get
{
return "arrestfinish";
}
}
public List<string> Permissions
{
get
{
return new List<string>() { "rpevents.arrest" };
}
}
public string Syntax
{
get
{
return "<playername>";
}
}
public void Execute(IRocketPlayer caller, string[] command)
{
UnturnedPlayer player = command.GetUnturnedPlayerParameter(0);
if (player == null) UnturnedChat.Say(caller, Main.Instance.Translate("player_not_found"));
if (caller is ConsolePlayer)
{
Rocket.Core.Logging.Logger.Log("This command cannot be called from the console!");
return;
}
else
{
UnturnedChat.Say("[RPEvents]: " + Main.Instance.Translate("command_arrestfinish", caller.DisplayName), UnturnedChat.GetColorFromName(Main.Instance.Configuration.Instance.FinishColor, Color.red));
return;
}
}
}
}
| Coolpuppy24/RPEvents | Commands/ArrestFinishCommand.cs | C# | gpl-2.0 | 1,996 |
///////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/custombgwin.h
// Purpose: wxMSW implementation of wxCustomBackgroundWindow
// Author: Vadim Zeitlin
// Created: 2011-10-10
// RCS-ID: $Id: custombgwin.h 69378 2011-10-11 17:07:43Z VZ $
// Copyright: (c) 2011 Vadim Zeitlin <[email protected]>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_CUSTOMBGWIN_H_
#define _WX_MSW_CUSTOMBGWIN_H_
#include "wx/bitmap.h"
#include "wx/brush.h"
// ----------------------------------------------------------------------------
// wxCustomBackgroundWindow
// ----------------------------------------------------------------------------
template <class W>
class wxCustomBackgroundWindow : public W,
public wxCustomBackgroundWindowBase
{
public:
typedef W BaseWindowClass;
wxCustomBackgroundWindow() { m_backgroundBrush = NULL; }
virtual ~wxCustomBackgroundWindow() { delete m_backgroundBrush; }
protected:
virtual void DoSetBackgroundBitmap(const wxBitmap& bmp)
{
delete m_backgroundBrush;
m_backgroundBrush = bmp.IsOk() ? new wxBrush(bmp) : NULL;
// Our transparent children should use our background if we have it,
// otherwise try to restore m_inheritBgCol to some reasonable value: true
// if we also have non-default background colour or false otherwise.
BaseWindowClass::m_inheritBgCol = bmp.IsOk()
|| BaseWindowClass::UseBgCol();
}
virtual WXHBRUSH MSWGetCustomBgBrush()
{
if ( m_backgroundBrush )
return (WXHBRUSH)m_backgroundBrush->GetResourceHandle();
return BaseWindowClass::MSWGetCustomBgBrush();
}
wxBrush *m_backgroundBrush;
wxDECLARE_NO_COPY_TEMPLATE_CLASS(wxCustomBackgroundWindow, W);
};
#endif // _WX_MSW_CUSTOMBGWIN_H_
| nattthebear/dolphin-avsync | Externals/wxWidgets3/include/wx/msw/custombgwin.h | C | gpl-2.0 | 1,987 |
package com.omnicrola.panoptes.ui.autocomplete;
import static org.easymock.EasyMock.expect;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import java.util.Arrays;
import java.util.List;
import org.junit.Test;
import com.omnicrola.panoptes.control.DataController;
import com.omnicrola.panoptes.control.IControlObserver;
import com.omnicrola.panoptes.control.TimeblockSet;
import com.omnicrola.panoptes.data.IReadTimeblock;
import com.omnicrola.panoptes.data.TimeData;
import com.omnicrola.testing.util.EnhancedTestCase;
public class CardNumberProviderTest extends EnhancedTestCase {
private DataController mockController;
private String expectedNumber1;
private String expectedNumber2;
private String expectedNumber3;
@Test
public void testImplementsInterfaces() throws Exception {
assertImplementsInterface(IOptionProvider.class, CardNumberProvider.class);
assertImplementsInterface(IControlObserver.class, CardNumberProvider.class);
}
@Test
public void testConstructorParams() throws Exception {
DataController mockController = useMock(DataController.class);
startReplay();
CardNumberProvider cardNumberProvider = new CardNumberProvider(mockController);
assertConstructionParamSame("dataController", mockController, cardNumberProvider);
}
@Test
public void testDataChanged_UpdatesOptionList() throws Exception {
setupMockTimeblockSet();
startReplay();
CardNumberProvider cardNumberProvider = new CardNumberProvider(this.mockController);
assertEquals(0, cardNumberProvider.getOptionsList().size());
cardNumberProvider.dataChanged();
List<Object> optionsList = cardNumberProvider.getOptionsList();
assertEquals(3, optionsList.size());
assertTrue(optionsList.contains(this.expectedNumber1));
assertTrue(optionsList.contains(this.expectedNumber2));
assertTrue(optionsList.contains(this.expectedNumber3));
}
@Test
public void testTimeblockSetChanged_UpdatesOptionList() throws Exception {
TimeblockSet mockTimeblockSet = useMock(TimeblockSet.class);
setupMockTimeblockSet();
startReplay();
CardNumberProvider cardNumberProvider = new CardNumberProvider(this.mockController);
assertEquals(0, cardNumberProvider.getOptionsList().size());
cardNumberProvider.timeblockSetChanged(mockTimeblockSet);
List<Object> optionsList = cardNumberProvider.getOptionsList();
assertEquals(3, optionsList.size());
assertTrue(optionsList.contains(this.expectedNumber1));
assertTrue(optionsList.contains(this.expectedNumber2));
assertTrue(optionsList.contains(this.expectedNumber3));
}
public void setupMockTimeblockSet() {
TimeblockSet mockTimeblockSet = useMock(TimeblockSet.class);
this.expectedNumber1 = "cardnumber";
this.expectedNumber2 = "a different number";
this.expectedNumber3 = "duplicate";
IReadTimeblock mockTimeblock1 = createMockBlockWithCardNumber(this.expectedNumber1);
IReadTimeblock mockTimeblock2 = createMockBlockWithCardNumber(this.expectedNumber2);
IReadTimeblock mockTimeblock3 = createMockBlockWithCardNumber(this.expectedNumber3);
IReadTimeblock mockTimeblock4 = createMockBlockWithCardNumber(this.expectedNumber3);
List<IReadTimeblock> timblocks = Arrays.asList(mockTimeblock1, mockTimeblock2, mockTimeblock3, mockTimeblock4);
expect(mockTimeblockSet.getBlockSet()).andReturn(timblocks);
this.mockController = useMock(DataController.class);
expect(this.mockController.getAllTimeblocks()).andReturn(mockTimeblockSet);
}
private IReadTimeblock createMockBlockWithCardNumber(String expectedNumber) {
IReadTimeblock mockTimeblock = useMock(IReadTimeblock.class);
TimeData mockData = useMock(TimeData.class);
expect(mockTimeblock.getTimeData()).andReturn(mockData);
expect(mockData.getCard()).andReturn(expectedNumber);
return mockTimeblock;
}
}
| Omnicrola/Panoptes | Panoptes.Test/src/com/omnicrola/panoptes/ui/autocomplete/CardNumberProviderTest.java | Java | gpl-2.0 | 3,813 |
<?php
namespace ApacheSolrForTypo3\Solr\IndexQueue;
/***************************************************************
* Copyright notice
*
* (c) 2010-2015 Ingo Renner <[email protected]>
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
* A copy is found in the textfile GPL.txt and important notices to the license
* from the author is found in LICENSE.txt distributed with these scripts.
*
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
* IndexQueuePageIndexerDocumentsModifier interface, allows to modify documents
* before adding them to the Solr index in the index queue page indexer.
*
* @author Ingo Renner <[email protected]>
*/
interface PageIndexerDocumentsModifier
{
/**
* Modifies the given documents
*
* @param Item $item The currently being indexed item.
* @param int $language The language uid of the documents
* @param array $documents An array of documents to be indexed
* @return array An array of modified documents
*/
public function modifyDocuments(Item $item, $language, array $documents);
}
| arnoschoon/ext-solr | Classes/IndexQueue/PageIndexerDocumentsModifier.php | PHP | gpl-2.0 | 1,793 |
<?php
$xml = simplexml_load_file("http://animacionugm.blogspot.com/feeds/posts/default");
$json = json_encode($xml);
echo "<pre>";
echo $json;
echo "</pre>";
?> | acalvoa/EOLLICE | xml.php | PHP | gpl-2.0 | 165 |
<?php
/**
* @package syscart
* libraries/platform/language.php
*
* @autor majeed mohammadian
*/
defined('syscart') or die('access denied...!');
class platformLanguage
{
private $language = 'persian';
private $code = 'fa-IR';
private $direction = 'rtl';
private $id = null;
public function set($language = 'persian', $code = 'fa-IR', $direction = 'rtl')
{
$this->language = $language;
$this->code = $code;
$this->direction = $direction;
}
public function getLanguage()
{
return $this->language;
}
public function getCode()
{
return $this->code;
}
public function getID()
{
if(!isset( $this->id )) {
global $sysDbo;
$sql = "SELECT id
FROM #__language
WHERE code = :code";
$sql = platformQuery::refactor($sql);
$query = $sysDbo->prepare($sql);
$query->bindParam(':code', $this->code, PDO::PARAM_INT);
$query->execute();
$result = $query->fetch(\PDO::FETCH_ASSOC);
$this->id = $result['id'];
}
return $this->id;
}
public function getDirection()
{
return $this->direction;
}
public function generate($data = '')
{
global $sysDbo, $sysLang;
$regex = "/\\{\\{t:(\\S+)\\}\\}/";
preg_match_all($regex, $data, $matches);
$languageGroups = [];
foreach( $matches[1] as $textLang ) {
$partLang = explode('.', $textLang);
if( !in_array($partLang[0], $languageGroups, true) ) {
array_push($languageGroups, "'".$partLang[0]."'");
}
}
if($languageGroups) {
$sql = "SELECT groups, meta, value
FROM #__language_code
WHERE languageId = :langID
AND groups IN (".implode(',', $languageGroups).")
AND state = '1'";
$sql = platformQuery::refactor($sql);
$query = $sysDbo->prepare($sql);
$query->bindValue(':langID', $sysLang->getID(), PDO::PARAM_INT);
$query->execute();
$result = $query->fetchAll(\PDO::FETCH_ASSOC);
$langKey = $langValue = [];
foreach( $result as $langData ) {
$langKey[] = '{{t:'.$langData[ 'groups' ].'.'.$langData[ 'meta' ].'}}';
$langValue[] = $langData[ 'value' ];
}
return str_replace($langKey, $langValue, $data);
} else {
return $data;
}
}
} | syscart/syscart | libraries/platform/language.php | PHP | gpl-2.0 | 2,177 |
#ifndef PLAYER_H
#define PLAYER_H
#include "Vector2d.h"
#include "Polygon.h"
#include "CollisionController.h"
#include <vector>
const float WALKING_ACCEL = 0.5;
const float MAX_WALKING_SPEED = 11.0;
const float FALLING_ACCEL = 1.2;
const float MAX_FALLING_SPEED = 20.0;
const float JUMPING_SPEED = -25.0;
class Player {
public:
Player(Vector2d, std::vector<Polygon*>*);
~Player();
void control();
void update();
void render();
bool verticalCollision(const Polygon&);
bool horizontalCollision(const Polygon&);
void setPosition(const Vector2d);
void setVelocity(const Vector2d);
void setAcceleration(const Vector2d);
Vector2d getPosition() const;
Vector2d getVelocity() const;
Vector2d getAcceleration() const;
private:
bool grounded;
bool groundedLatch;
bool jumping;
//Position and derivatives for movement.
Vector2d m_Position;
Vector2d m_Velocity;
Vector2d m_Acceleration;
//Polygon for rendering.
Polygon m_Polygon;
std::vector<Polygon*> *m_Platforms;
void enableGrounded();
};
#endif
| Slabity/Senior-Project-2013 | src/Player.h | C | gpl-2.0 | 1,098 |
<?php
/**
* TOP API: taobao.wlb.inventory.detail.get request
*
* @author auto create
* @since 1.0, 2012-11-01 12:40:06
*/
class WlbInventoryDetailGetRequest
{
/**
* 库存类型列表,值包括:
VENDIBLE--可销售库存
FREEZE--冻结库存
ONWAY--在途库存
DEFECT--残次品库存
ENGINE_DAMAGE--机损
BOX_DAMAGE--箱损
EXPIRATION--过保
**/
private $inventoryTypeList;
/**
* 商品ID
**/
private $itemId;
/**
* 仓库编码
**/
private $storeCode;
private $apiParas = array();
public function setInventoryTypeList($inventoryTypeList)
{
$this->inventoryTypeList = $inventoryTypeList;
$this->apiParas["inventory_type_list"] = $inventoryTypeList;
}
public function getInventoryTypeList()
{
return $this->inventoryTypeList;
}
public function setItemId($itemId)
{
$this->itemId = $itemId;
$this->apiParas["item_id"] = $itemId;
}
public function getItemId()
{
return $this->itemId;
}
public function setStoreCode($storeCode)
{
$this->storeCode = $storeCode;
$this->apiParas["store_code"] = $storeCode;
}
public function getStoreCode()
{
return $this->storeCode;
}
public function getApiMethodName()
{
return "taobao.wlb.inventory.detail.get";
}
public function getApiParas()
{
return $this->apiParas;
}
public function check()
{
RequestCheckUtil::checkMaxListSize($this->inventoryTypeList,20,"inventoryTypeList");
RequestCheckUtil::checkNotNull($this->itemId,"itemId");
}
public function putOtherTextParam($key, $value) {
$this->apiParas[$key] = $value;
$this->$key = $value;
}
}
| Jeepal/iLogin | API/taobao/top/request/WlbInventoryDetailGetRequest.php | PHP | gpl-2.0 | 1,597 |
<?php
if(!class_exists('WP_List_Table')){
require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
}
class EasySocialMetricsLiteResultTable extends WP_List_Table {
public $total_results = array();
public $top_content = array();
/** ************************************************************************
* REQUIRED. Set up a constructor that references the parent constructor. We
* use the parent reference to set some default configs.
***************************************************************************/
function __construct(){
global $status, $page;
//Set parent defaults
parent::__construct( array(
'singular' => 'post', //singular name of the listed records
'plural' => 'posts', //plural name of the listed records
'ajax' => false //does this table support ajax?
) );
$this->services = array(
'facebook' => 'Facebook',
'twitter' => 'Twitter',
'googleplus' => 'Google Plus',
'linkedin' => 'LinkedIn',
'pinterest' => 'Pinterest',
'diggs' => 'Digg.com',
'delicious' => 'Delicious',
'facebook_comments' => 'Facebook Comments',
'stumbleupon'=> 'Stumble Upon'
);
}
/** ************************************************************************
* Recommended. This method is called when the parent class can't find a method
* specifically build for a given column. Generally, it's recommended to include
* one method for each column you want to render, keeping your package class
* neat and organized. For example, if the class needs to process a column
* named 'title', it would first see if a method named $this->column_title()
* exists - if it does, that method will be used. If it doesn't, this one will
* be used. Generally, you should try to use custom column methods as much as
* possible.
*
* Since we have defined a column_title() method later on, this method doesn't
* need to concern itself with any column with a name of 'title'. Instead, it
* needs to handle everything else.
*
* For more detailed insight into how columns are handled, take a look at
* WP_List_Table::single_row_columns()
*
* @param array $item A singular item (one full row's worth of data)
* @param array $column_name The name/slug of the column to be processed
* @return string Text or HTML to be placed inside the column <td>
**************************************************************************/
function column_default($item, $column_name){
switch($column_name){
case 'total':
return number_format(intval($item['esml_socialcount_total']));
case 'comment_count':
return number_format(intval($item[$column_name]));
case 'facebook':
case 'twitter':
case 'googleplus':
case 'pinterest':
case 'linkedin':
case 'stumbleupon':
case 'facebook_comments':
return number_format(intval($item['esml_socialcount_'.$column_name]));
default:
return print_r($item,true); //Show the whole array for troubleshooting purposes
}
}
/** ************************************************************************
* Recommended. This is a custom column method and is responsible for what
* is rendered in any column with a name/slug of 'title'. Every time the class
* needs to render a column, it first looks for a method named
* column_{$column_title} - if it exists, that method is run. If it doesn't
* exist, column_default() is called instead.
*
* This example also illustrates how to implement rollover actions. Actions
* should be an associative array formatted as 'slug'=>'link html' - and you
* will need to generate the URLs yourself. You could even ensure the links
*
*
* @see WP_List_Table::::single_row_columns()
* @param array $item A singular item (one full row's worth of data)
* @return string Text to be placed inside the column <td> (movie title only)
**************************************************************************/
function column_post_title($item){
//Build row actions
$actions = array(
'edit' => sprintf('<a href="post.php?post=%s&action=edit">Edit Post</a>',$item['ID'],'edit',$item['ID']),
'update' => '<a href="'.add_query_arg( 'esml_sync_now', $item['ID']).'">Update Stats</a>',
'info' => sprintf('Updated %s',EasySocialMetricsLite::timeago($item['esml_socialcount_LAST_UPDATED']))
);
//Return the title contents
return sprintf('%1$s <span style="color:silver">(id:%2$s)</span>%3$s',
/*$1%s*/ $item['post_title'],
/*$2%s*/ $item['ID'],
/*$3%s*/ $this->row_actions($actions)
);
}
/** ************************************************************************
* REQUIRED! This method dictates the table's columns and titles. This should
* return an array where the key is the column slug (and class) and the value
* is the column's title text. If you need a checkbox for bulk actions, refer
* to the $columns array below.
*
* The 'cb' column is treated differently than the rest. If including a checkbox
* column in your table you must create a column_cb() method. If you don't need
* bulk actions or checkboxes, simply leave the 'cb' entry out of your array.
*
* @see WP_List_Table::::single_row_columns()
* @return array An associative array containing column information: 'slugs'=>'Visible Titles'
**************************************************************************/
function get_columns(){
$columns = array(
'post_title' => 'Title',
'total' => 'Total',
'facebook' => 'Facebook',
'twitter' => 'Twitter',
'googleplus' => 'Google+',
'linkedin' => 'LinkedIn',
'pinterest' => 'Pinterest',
'stumbleupon' => 'StumbleUpon',
'comment_count' => 'Post Comments',
'facebook_comments' => 'Facebook Comments'
);
return $columns;
}
/** ************************************************************************
* Optional. If you want one or more columns to be sortable (ASC/DESC toggle),
* you will need to register it here. This should return an array where the
* key is the column that needs to be sortable, and the value is db column to
* sort by. Often, the key and value will be the same, but this is not always
* the case (as the value is a column name from the database, not the list table).
*
* This method merely defines which columns should be sortable and makes them
* clickable - it does not handle the actual sorting. You still need to detect
* the ORDERBY and ORDER querystring variables within prepare_items() and sort
* your data accordingly (usually by modifying your query).
*
* @return array An associative array containing all the columns that should be sortable: 'slugs'=>array('data_values',bool)
**************************************************************************/
function get_sortable_columns() {
$sortable_columns = array(
'post_title' => array('post_title',false), //true means it's already sorted
'total' => array('total',false),
'facebook' => array('facebook',false),
'twitter' => array('twitter',false),
'googleplus' => array('googleplus',false),
'linkedin' => array('linkedin',false),
'pinterest' => array('pinterest',false),
'stumbleupon' => array('stumbleupon',false),
'comment_count' => array('comment_count',false),
'facebook_comments' => array('facebook_comments',false)
);
return $sortable_columns;
}
/** ************************************************************************
* Optional. If you need to include bulk actions in your list table, this is
* the place to define them. Bulk actions are an associative array in the format
* 'slug'=>'Visible Title'
*
* If this method returns an empty value, no bulk action will be rendered. If
* you specify any bulk actions, the bulk actions box will be rendered with
* the table automatically on display().
*
* Also note that list tables are not automatically wrapped in <form> elements,
* so you will need to create those manually in order for bulk actions to function.
*
* @return array An associative array containing all the bulk actions: 'slugs'=>'Visible Titles'
**************************************************************************/
function get_bulk_actions() {
$actions = array(
//'delete' => 'Delete'
);
return $actions;
}
/** ************************************************************************
* Optional. You can handle your bulk actions anywhere or anyhow you prefer.
* For this example package, we will handle it in the class to keep things
* clean and organized.
*
* @see $this->prepare_items()
**************************************************************************/
function process_bulk_action() {
//Detect when a bulk action is being triggered...
if( 'delete'===$this->current_action() ) {
wp_die('Items deleted (or they would be if we had items to delete)!');
}
}
/** ************************************************************************
* REQUIRED! This is where you prepare your data for display. This method will
* usually be used to query the database, sort and filter the data, and generally
* get it ready to be displayed. At a minimum, we should set $this->items and
* $this->set_pagination_args(), although the following properties and methods
* are frequently interacted with here...
*
* @global WPDB $wpdb
* @uses $this->_column_headers
* @uses $this->items
* @uses $this->get_columns()
* @uses $this->get_sortable_columns()
* @uses $this->get_pagenum()
* @uses $this->set_pagination_args()
**************************************************************************/
function prepare_items() {
global $wpdb; //This is used only if making any database queries
/**
* First, lets decide how many records per page to show
*/
$per_page = 20;
/**
* REQUIRED. Now we need to define our column headers. This includes a complete
* array of columns to be displayed (slugs & titles), a list of columns
* to keep hidden, and a list of columns that are sortable. Each of these
* can be defined in another method (as we've done here) before being
* used to build the value for our _column_headers property.
*/
$columns = $this->get_columns();
$hidden = array();
$sortable = $this->get_sortable_columns();
/**
* REQUIRED. Finally, we build an array to be used by the class for column
* headers. The $this->_column_headers property takes an array which contains
* 3 other arrays. One for all columns, one for hidden columns, and one
* for sortable columns.
*/
$this->_column_headers = array($columns, $hidden, $sortable);
/**
* Optional. You can handle your bulk actions however you see fit. In this
* case, we'll handle them within our package just to keep things clean.
*/
$this->process_bulk_action();
/**
* Instead of querying a database, we're going to fetch the example data
* property we created for use in this plugin. This makes this example
* package slightly different than one you might build on your own. In
* this example, we'll be using array manipulation to sort and paginate
* our data. In a real-world implementation, you will probably want to
* use sort and pagination data to build a custom query instead, as you'll
* be able to use your precisely-queried data immediately.
*/
$data = $this->generate_data();
//print_r($data);
/**
* This checks for sorting input and sorts the data in our array accordingly.
*
* In a real-world situation involving a database, you would probably want
* to handle sorting by passing the 'orderby' and 'order' values directly
* to a custom query. The returned data will be pre-sorted, and this array
* sorting technique would be unnecessary.
*/
function usort_reorder($a,$b){
$orderby = (!empty($_REQUEST['orderby'])) ? $_REQUEST['orderby'] : 'total'; //If no sort, default to title
$order = (!empty($_REQUEST['order'])) ? $_REQUEST['order'] : 'desc'; //If no order, default to asc
if ($orderby == 'total') { $orderby = 'esml_socialcount_total'; }
switch ($orderby) {
case 'facebook':
case 'twitter':
case 'googleplus':
case 'pinterest':
case 'linkedin':
case 'stumbleupon':
case 'facebook_comments':
$orderby = 'esml_socialcount_'.$orderby;
}
if ($orderby == "post_title") {
$result = strcmp($a[$orderby], $b[$orderby]);
} //Determine sort order
else {
if (intval($a[$orderby]) < intval($b[$orderby])) {
$result = -1;
}
else if (intval($a[$orderby]) > intval($b[$orderby])) {
$result = 1;
}
else {
$result = 0;
}
}
return ($order==='asc') ? $result : -$result; //Send final sort direction to usort
}
usort($data, 'usort_reorder');
/***********************************************************************
* ---------------------------------------------------------------------
* vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
*
* In a real-world situation, this is where you would place your query.
*
* For information on making queries in WordPress, see this Codex entry:
* http://codex.wordpress.org/Class_Reference/wpdb
*
* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* ---------------------------------------------------------------------
**********************************************************************/
/**
* REQUIRED for pagination. Let's figure out what page the user is currently
* looking at. We'll need this later, so you should always include it in
* your own package classes.
*/
$current_page = $this->get_pagenum();
/**
* REQUIRED for pagination. Let's check how many items are in our data array.
* In real-world use, this would be the total number of items in your database,
* without filtering. We'll need this later, so you should always include it
* in your own package classes.
*/
$total_items = count($data);
/**
* The WP_List_Table class does not handle pagination for us, so we need
* to ensure that the data is trimmed to only the current page. We can use
* array_slice() to
*/
$data = array_slice($data,(($current_page-1)*$per_page),$per_page);
/**
* REQUIRED. Now we can add our *sorted* data to the items property, where
* it can be used by the rest of the class.
*/
$this->items = $data;
/**
* REQUIRED. We also have to register our pagination options & calculations.
*/
$this->set_pagination_args( array(
'total_items' => $total_items, //WE have to calculate the total number of items
'per_page' => $per_page, //WE have to determine how many items to show on a page
'total_pages' => ceil($total_items/$per_page) //WE have to calculate the total number of pages
) );
}
function generate_data() {
global $wpdb; //This is used only if making any database queries
$per_page = 10;
$this->process_bulk_action();
// Get custom post types to display in our report.
$post_types = $this->get_post_types();
//print "post types = ";
$limit = 30;
add_filter( 'posts_where', array($this, 'date_range_filter') );
$querydata = new WP_Query(array(
'posts_per_page'=> -1,
'post_status' => 'publish',
'post_type' => $post_types
));
remove_filter( 'posts_where', array($this, 'date_range_filter') );
$data=array();
// foreach ($querydata as $querydatum ) {
if ( $querydata->have_posts() ) : while ( $querydata->have_posts() ) : $querydata->the_post();
global $post;
$item['ID'] = $post->ID;
$item['post_title'] = $post->post_title;
$item['post_date'] = $post->post_date;
$item['comment_count'] = $post->comment_count;
$item['esml_socialcount_total'] = (get_post_meta($post->ID, "esml_socialcount_TOTAL", true)) ? get_post_meta($post->ID, "esml_socialcount_TOTAL", true) : 0;
$item['esml_socialcount_LAST_UPDATED'] = get_post_meta($post->ID, "esml_socialcount_LAST_UPDATED", true);
$item['permalink'] = get_permalink($post->ID);
if (!isset($this->total_results['esml_socialcount_total'])) { $this->total_results['esml_socialcount_total'] = 0; }
$this->total_results['esml_socialcount_total'] = $this->total_results['esml_socialcount_total'] + $item['esml_socialcount_total'];
foreach ($this->services as $slug => $name) {
$item['esml_socialcount_'.$slug] = get_post_meta($post->ID, "esml_socialcount_$slug", true);
if (!isset($this->total_results['esml_socialcount_'.$slug])) {
$this->total_results['esml_socialcount_'.$slug] = 0;
}
$this->total_results['esml_socialcount_'.$slug] = $this->total_results['esml_socialcount_'.$slug] + $item['esml_socialcount_'.$slug];
if (!isset($this->top_content['esml_socialcount_'.$slug ])) {
$blank = array("title" => "", "permalink" => "", "value" => "0");
$this->top_content['esml_socialcount_'.$slug ] = $blank;
}
if ($item['esml_socialcount_'.$slug] > $this->top_content['esml_socialcount_'.$slug ]["value"]) {
$this->top_content['esml_socialcount_'.$slug ]["value"] = $item['esml_socialcount_'.$slug];
$this->top_content['esml_socialcount_'.$slug ]["title"] = $item['post_title'] = $post->post_title;
$this->top_content['esml_socialcount_'.$slug ]["permalink"] = $item['permalink'];
}
}
array_push($data, $item);
endwhile;
endif;
return $data;
}
public function get_post_types() {
$types_to_track = array();
$pts = get_post_types ( array ('public' => true, 'show_ui' => true, '_builtin' => true ) );
$cpts = get_post_types ( array ('public' => true, 'show_ui' => true, '_builtin' => false ) );
$options = $this->options;
if (is_array($options)) {
if (!isset($options['esml_monitor_types'])) {
$options['esml_monitor_types'] = array();
}
}
if (is_array ( $options ) && isset ( $options ['esml_monitor_types'] ) && is_array ( $options ['esml_monitor_types'] )) {
global $wp_post_types;
// classical post type listing
foreach ( $pts as $pt ) {
$selected = in_array ( $pt, $options ['esml_monitor_types'] ) ? '1' : '0';
if ($selected == '1') {
$types_to_track[] = $pt;
}
}
// custom post types listing
if (is_array ( $cpts ) && ! empty ( $cpts )) {
foreach ( $cpts as $cpt ) {
$selected = in_array ( $cpt, $options ['esml_monitor_types'] ) ? '1' : '0';
if ($selected == '1') {
$types_to_track[] = $cpt;
}
$selected = in_array ( $cpt, $options ['esml_monitor_types'] ) ? 'checked="checked"' : '';
}
}
}
return $types_to_track;
}
function extra_tablenav( $which ) {
if ( $which == "top" ){
//The code that goes before the table is here
$range = (isset($_GET['range'])) ? $_GET['range'] : 0;
?>
<label for="range">Show only:</label>
<select name="range">
<option value="1"<?php if ($range == 1) echo 'selected="selected"'; ?>>Items published within 1 Month</option>
<option value="3"<?php if ($range == 3) echo 'selected="selected"'; ?>>Items published within 3 Months</option>
<option value="6"<?php if ($range == 6) echo 'selected="selected"'; ?>>Items published within 6 Months</option>
<option value="12"<?php if ($range == 12) echo 'selected="selected"'; ?>>Items published within 12 Months</option>
<option value="0"<?php if ($range == 0) echo 'selected="selected"'; ?>>Items published anytime</option>
</select>
<?php do_action( 'esml_dashboard_query_options' ); // Allows developers to add additional sort options ?>
<input type="submit" name="filter" id="submit_filter" class="button" value="Filter">
<a href="<?php echo admin_url('admin.php?page=easy-social-metrics-lite&esml_sync_all=true'); ?>" class="button">Update all posts</a>
<?php
}
if ( $which == "bottom" ){
//The code that goes after the table is there
}
}
function date_range_filter( $where = '' ) {
$range = (isset($_GET['range'])) ? $_GET['range'] : '0';
if ($range <= 0) return $where;
$range_bottom = " AND post_date >= '".date("Y-m-d", strtotime('-'.$range.' month') );
$range_top = "' AND post_date <= '".date("Y-m-d")."'";
$where .= $range_bottom . $range_top;
return $where;
}
public function output_total_results() {
echo '<table border="0" cellpadding="3" cellspacing="0" width="100%">';
echo '<col width="30%"/>';
echo '<col width="30%"/>';
echo '<col width="40%"/>';
echo '<tr>';
echo '<td><strong>Total Social Shares:</strong></td>';
echo '<td align="right"><strong>'.number_format($this->total_results['esml_socialcount_total']).'</strong></td>';
echo '<td> </td>';
echo '</tr>';
$total = $this->total_results['esml_socialcount_total'];
$parse_list = array("facebook" => "Facebook", "twitter" => "Twitter", "googleplus" => "Google+", "pinterest" => "Pinterest", "linkedin" => "LinkedIn", "stumbleupon" => "StumbleUpon");
foreach ($parse_list as $singleValueCode => $singleValue) {
$single_value = $this->total_results['esml_socialcount_'.$singleValueCode];
if ($total != 0) {
$display_percent = number_format($single_value * 100 / $total, 2);
$percent = number_format($single_value * 100 / $total);
}
else {
$display_percent = "0.00";
$percent = "0";
}
if (intval($percent) == 0 && intval($single_value) != 0) { $percent = 1; }
echo '<tr>';
echo '<td>'.$singleValue.' <span style="background-color: #2980b9; padding: 2px 5px; color: #fff; font-size: 10px; border-radius: 3px;">'.$display_percent.' %</span></td>';
echo '<td align="right"><strong>'.number_format($single_value).'</strong></td>';
echo '<td><div style="background-color: #2980b9; display: block; height: 24px; width:'.$percent.'%;"> </div></td>';
echo '</tr>';
}
echo '</table>';
}
public function output_total_content() {
echo '<table border="0" cellpadding="5" cellspacing="0" width="100%">';
echo '<col width="20%"/>';
echo '<col width="20%"/>';
echo '<col width="60%"/>';
$parse_list = array("facebook" => "Facebook", "twitter" => "Twitter", "googleplus" => "Google+", "pinterest" => "Pinterest", "linkedin" => "LinkedIn", "stumbleupon" => "StumbleUpon");
foreach ($parse_list as $singleValueCode => $singleValue) {
$single_value = $this->top_content['esml_socialcount_'.$singleValueCode]['value'];
$title = $this->top_content['esml_socialcount_'.$singleValueCode]['title'];
$permalink = $this->top_content['esml_socialcount_'.$singleValueCode]['permalink'];
echo '<tr>';
echo '<td>'.$singleValue.'</td>';
echo '<td align="right"><strong>'.number_format($single_value).'</strong></td>';
echo '<td><a href="'.$permalink.'" target="_blank">'.$title.'</a></td>';
echo '</tr>';
}
echo '</table>';
}
}
function esml_render_dashboard_view($options){
//Create an instance of our package class...
$testListTable = new EasySocialMetricsLiteResultTable();
$testListTable->options = $options;
//Fetch, prepare, sort, and filter our data...
$testListTable->prepare_items();
?>
<style type="text/css">
.column-post_title { width: 30%; }
.column-total { font-weight: bold; }
</style>
<div class="wrap">
<h2>Easy Social Metrics Lite Dashboard</h2>
<div style="clear:both;"></div>
<div class="welcome-panel">
<div class="welcome-panel-content">
<div class="welcome-panel-column-container">
<div class="welcome-panel-column" style="width: 49%;">
<h4>Social Networks Presentation</h4>
<?php $testListTable->output_total_results(); ?>
</div>
<div class="welcome-panel-column" style="width: 49%;">
<h4>Top Shared Content by Social Network</h4>
<?php $testListTable->output_total_content();?>
</div>
</div>
</div>
</div>
<?php EasySocialMetricsUpdater::printQueueLength(); ?>
<form id="easy-social-metrics-lite" method="get" action="admin.php?page=easy-social-metrics-lite">
<!-- For plugins, we also need to ensure that the form posts back to our current page -->
<input type="hidden" name="page" value="<?php echo $_REQUEST['page'] ?>" />
<input type="hidden" name="orderby" value="<?php echo (!empty($_REQUEST['orderby'])) ? $_REQUEST['orderby'] : 'total'; ?>" />
<input type="hidden" name="order" value="<?php echo (!empty($_REQUEST['order'])) ? $_REQUEST['order'] : 'DESC'; ?>" />
<?php $testListTable->display() ?>
</form>
</div>
<?php
} | rvfeed/rfeed | wp-content/plugins/easy-social-share-buttons/lib/modules/easy-social-metrics-lite/esml-render-results.php | PHP | gpl-2.0 | 27,672 |
<form>
<i class="glyphicon glyphicon-search"></i>
<input type="text" name="q">
<button type="submit" class="hidden">{{ trans('labels.search') }}</button>
</form> | manishkiozen/Cms | resources/views/widgets/toolbar/search.blade.php | PHP | gpl-2.0 | 173 |
<?php
/**
* @file
* Contains Drupal\views\Plugin\views\display\DisplayPluginBase.
*/
namespace Drupal\views\Plugin\views\display;
use Drupal\views\Plugin\views\area\AreaPluginBase;
use Drupal\views\ViewExecutable;
use \Drupal\views\Plugin\views\PluginBase;
use Drupal\views\Views;
/**
* @defgroup views_display_plugins Views display plugins
* @{
* Display plugins control how Views interact with the rest of Drupal.
*
* They can handle creating Views from a Drupal page hook; they can
* handle creating Views from a Drupal block hook. They can also
* handle creating Views from an external module source.
*/
/**
* The default display plugin handler. Display plugins handle options and
* basic mechanisms for different output methods.
*/
abstract class DisplayPluginBase extends PluginBase {
/**
* The top object of a view.
*
* @var Drupal\views\ViewExecutable
*/
var $view = NULL;
var $handlers = array();
/**
* An array of instantiated plugins used in this display.
*
* @var array
*/
protected $plugins = array();
/**
* Stores all available display extenders.
*/
var $extender = array();
/**
* Overrides Drupal\views\Plugin\Plugin::$usesOptions.
*/
protected $usesOptions = TRUE;
/**
* Stores the rendered output of the display.
*
* @see View::render
* @var string
*/
public $output = NULL;
/**
* Whether the display allows the use of AJAX or not.
*
* @var bool
*/
protected $usesAJAX = TRUE;
/**
* Whether the display allows the use of a pager or not.
*
* @var bool
*/
protected $usesPager = TRUE;
/**
* Whether the display allows the use of a 'more' link or not.
*
* @var bool
*/
protected $usesMore = TRUE;
/**
* Whether the display allows attachments.
*
* @var bool
* TRUE if the display can use attachments, or FALSE otherwise.
*/
protected $usesAttachments = FALSE;
/**
* Whether the display allows area plugins.
*
* @var bool
*/
protected $usesAreas = TRUE;
public function initDisplay(ViewExecutable $view, array &$display, array &$options = NULL) {
$this->setOptionDefaults($this->options, $this->defineOptions());
$this->view = $view;
$this->display = &$display;
// Load extenders as soon as possible.
$this->extender = array();
$extenders = views_get_enabled_display_extenders();
if (!empty($extenders)) {
$manager = Views::pluginManager('display_extender');
foreach ($extenders as $extender) {
$plugin = $manager->createInstance($extender);
if ($plugin) {
$plugin->init($this->view, $this);
$this->extender[$extender] = $plugin;
}
}
}
// Track changes that the user should know about.
$changed = FALSE;
// Make some modifications:
if (!isset($options) && isset($display['display_options'])) {
$options = $display['display_options'];
}
if ($this->isDefaultDisplay() && isset($options['defaults'])) {
unset($options['defaults']);
}
// Cache for unpackOptions, but not if we are in the ui.
static $unpack_options = array();
if (empty($view->editing)) {
$cid = 'unpackOptions:' . hash('sha256', serialize(array($this->options, $options)));
if (empty($unpack_options[$cid])) {
$cache = views_cache_get($cid, TRUE);
if (!empty($cache->data)) {
$this->options = $cache->data;
}
else {
$this->unpackOptions($this->options, $options);
views_cache_set($cid, $this->options, TRUE);
}
$unpack_options[$cid] = $this->options;
}
else {
$this->options = $unpack_options[$cid];
}
}
else {
$this->unpackOptions($this->options, $options);
}
// Convert the field_language and field_language_add_to_query settings.
$field_language = $this->getOption('field_language');
$field_language_add_to_query = $this->getOption('field_language_add_to_query');
if (isset($field_langcode)) {
$this->setOption('field_langcode', $field_language);
$this->setOption('field_langcode_add_to_query', $field_language_add_to_query);
$changed = TRUE;
}
// Mark the view as changed so the user has a chance to save it.
if ($changed) {
$this->view->changed = TRUE;
}
}
public function destroy() {
parent::destroy();
foreach ($this->handlers as $type => $handlers) {
foreach ($handlers as $id => $handler) {
if (is_object($handler)) {
$this->handlers[$type][$id]->destroy();
}
}
}
if (isset($this->default_display)) {
unset($this->default_display);
}
foreach ($this->extender as $extender) {
$extender->destroy();
}
}
/**
* Determine if this display is the 'default' display which contains
* fallback settings
*/
public function isDefaultDisplay() { return FALSE; }
/**
* Determine if this display uses exposed filters, so the view
* will know whether or not to build them.
*/
public function usesExposed() {
if (!isset($this->has_exposed)) {
foreach ($this->handlers as $type => $value) {
foreach ($this->view->$type as $id => $handler) {
if ($handler->canExpose() && $handler->isExposed()) {
// one is all we need; if we find it, return true.
$this->has_exposed = TRUE;
return TRUE;
}
}
}
$pager = $this->getPlugin('pager');
if (isset($pager) && $pager->uses_exposed()) {
$this->has_exposed = TRUE;
return TRUE;
}
$this->has_exposed = FALSE;
}
return $this->has_exposed;
}
/**
* Determine if this display should display the exposed
* filters widgets, so the view will know whether or not
* to render them.
*
* Regardless of what this function
* returns, exposed filters will not be used nor
* displayed unless usesExposed() returns TRUE.
*/
public function displaysExposed() {
return TRUE;
}
/**
* Whether the display allows the use of AJAX or not.
*
* @return bool
*/
public function usesAJAX() {
return $this->usesAJAX;
}
/**
* Whether the display is actually using AJAX or not.
*
* @return bool
*/
public function ajaxEnabled() {
if ($this->usesAJAX()) {
return $this->getOption('use_ajax');
}
return FALSE;
}
/**
* Whether the display is enabled.
*
* @return bool
* Returns TRUE if the display is marked as enabled, else FALSE.
*/
public function isEnabled() {
return (bool) $this->getOption('enabled');
}
/**
* Whether the display allows the use of a pager or not.
*
* @return bool
*/
public function usesPager() {
return $this->usesPager;
}
/**
* Whether the display is using a pager or not.
*
* @return bool
*/
public function isPagerEnabled() {
if ($this->usesPager()) {
$pager = $this->getPlugin('pager');
if ($pager) {
return $pager->use_pager();
}
}
return FALSE;
}
/**
* Whether the display allows the use of a 'more' link or not.
*
* @return bool
*/
public function usesMore() {
return $this->usesMore;
}
/**
* Whether the display is using the 'more' link or not.
*
* @return bool
*/
public function isMoreEnabled() {
if ($this->usesMore()) {
return $this->getOption('use_more');
}
return FALSE;
}
/**
* Does the display have groupby enabled?
*/
public function useGroupBy() {
return $this->getOption('group_by');
}
/**
* Should the enabled display more link be shown when no more items?
*/
public function useMoreAlways() {
if ($this->usesMore()) {
return $this->getOption('useMoreAlways');
}
return FALSE;
}
/**
* Does the display have custom link text?
*/
public function useMoreText() {
if ($this->usesMore()) {
return $this->getOption('useMoreText');
}
return FALSE;
}
/**
* Determines whether this display can use attachments.
*
* @return bool
*/
public function acceptAttachments() {
// To be able to accept attachments this display have to be able to use
// attachments but at the same time, you cannot attach a display to itself.
if (!$this->usesAttachments() || ($this->definition['id'] == $this->view->current_display)) {
return FALSE;
}
if (!empty($this->view->argument) && $this->getOption('hide_attachment_summary')) {
foreach ($this->view->argument as $argument_id => $argument) {
if ($argument->needsStylePlugin() && empty($argument->argument_validated)) {
return FALSE;
}
}
}
return TRUE;
}
/**
* Returns whether the display can use attachments.
*
* @return bool
*/
public function usesAttachments() {
return $this->usesAttachments;
}
/**
* Returns whether the display can use areas.
*
* @return bool
* TRUE if the display can use areas, or FALSE otherwise.
*/
public function usesAreas() {
return $this->usesAreas;
}
/**
* Allow displays to attach to other views.
*/
public function attachTo(ViewExecutable $view, $display_id) { }
/**
* Static member function to list which sections are defaultable
* and what items each section contains.
*/
public function defaultableSections($section = NULL) {
$sections = array(
'access' => array('access'),
'cache' => array('cache'),
'title' => array('title'),
'css_class' => array('css_class'),
'use_ajax' => array('use_ajax'),
'hide_attachment_summary' => array('hide_attachment_summary'),
'show_admin_links' => array('show_admin_links'),
'group_by' => array('group_by'),
'query' => array('query'),
'use_more' => array('use_more', 'use_more_always', 'use_more_text'),
'use_more_always' => array('use_more', 'use_more_always', 'use_more_text'),
'use_more_text' => array('use_more', 'use_more_always', 'use_more_text'),
'link_display' => array('link_display', 'link_url'),
// Force these to cascade properly.
'style' => array('style', 'row'),
'row' => array('style', 'row'),
'pager' => array('pager', 'pager_options'),
'pager_options' => array('pager', 'pager_options'),
'exposed_form' => array('exposed_form', 'exposed_form_options'),
'exposed_form_options' => array('exposed_form', 'exposed_form_options'),
// These guys are special
'header' => array('header'),
'footer' => array('footer'),
'empty' => array('empty'),
'relationships' => array('relationships'),
'fields' => array('fields'),
'sorts' => array('sorts'),
'arguments' => array('arguments'),
'filters' => array('filters', 'filter_groups'),
'filter_groups' => array('filters', 'filter_groups'),
);
// If the display cannot use a pager, then we cannot default it.
if (!$this->usesPager()) {
unset($sections['pager']);
unset($sections['items_per_page']);
}
foreach ($this->extender as $extender) {
$extender->defaultableSections($sections, $section);
}
if ($section) {
if (!empty($sections[$section])) {
return $sections[$section];
}
}
else {
return $sections;
}
}
protected function defineOptions() {
$options = array(
'defaults' => array(
'default' => array(
'access' => TRUE,
'cache' => TRUE,
'query' => TRUE,
'title' => TRUE,
'css_class' => TRUE,
'display_description' => FALSE,
'use_ajax' => TRUE,
'hide_attachment_summary' => TRUE,
'show_admin_links' => TRUE,
'pager' => TRUE,
'use_more' => TRUE,
'use_more_always' => TRUE,
'use_more_text' => TRUE,
'exposed_form' => TRUE,
'link_display' => TRUE,
'link_url' => '',
'group_by' => TRUE,
'style' => TRUE,
'row' => TRUE,
'header' => TRUE,
'footer' => TRUE,
'empty' => TRUE,
'relationships' => TRUE,
'fields' => TRUE,
'sorts' => TRUE,
'arguments' => TRUE,
'filters' => TRUE,
'filter_groups' => TRUE,
),
),
'title' => array(
'default' => '',
'translatable' => TRUE,
),
'enabled' => array(
'default' => TRUE,
'translatable' => FALSE,
'bool' => TRUE,
),
'display_comment' => array(
'default' => '',
),
'css_class' => array(
'default' => '',
'translatable' => FALSE,
),
'display_description' => array(
'default' => '',
'translatable' => TRUE,
),
'use_ajax' => array(
'default' => FALSE,
'bool' => TRUE,
),
'hide_attachment_summary' => array(
'default' => FALSE,
'bool' => TRUE,
),
'show_admin_links' => array(
'default' => TRUE,
'bool' => TRUE,
),
'use_more' => array(
'default' => FALSE,
'bool' => TRUE,
),
'use_more_always' => array(
'default' => FALSE,
'bool' => TRUE,
),
'use_more_text' => array(
'default' => 'more',
'translatable' => TRUE,
),
'link_display' => array(
'default' => '',
),
'link_url' => array(
'default' => '',
),
'group_by' => array(
'default' => FALSE,
'bool' => TRUE,
),
'field_langcode' => array(
'default' => '***CURRENT_LANGUAGE***',
),
'field_langcode_add_to_query' => array(
'default' => TRUE,
'bool' => TRUE,
),
// These types are all plugins that can have individual settings
// and therefore need special handling.
'access' => array(
'contains' => array(
'type' => array('default' => 'none'),
'options' => array('default' => array()),
),
),
'cache' => array(
'contains' => array(
'type' => array('default' => 'none'),
'options' => array('default' => array()),
),
),
'query' => array(
'contains' => array(
'type' => array('default' => 'views_query'),
'options' => array('default' => array()),
),
),
'exposed_form' => array(
'contains' => array(
'type' => array('default' => 'basic'),
'options' => array('default' => array()),
),
),
'pager' => array(
'contains' => array(
'type' => array('default' => 'mini'),
'options' => array('default' => array()),
),
),
'style' => array(
'contains' => array(
'type' => array('default' => 'default'),
'options' => array('default' => array()),
),
),
'row' => array(
'contains' => array(
'type' => array('default' => 'fields'),
'options' => array('default' => array()),
),
),
'exposed_block' => array(
'default' => FALSE,
),
'header' => array(
'default' => array(),
),
'footer' => array(
'default' => array(),
),
'empty' => array(
'default' => array(),
),
// We want these to export last.
// These are the 5 handler types.
'relationships' => array(
'default' => array(),
),
'fields' => array(
'default' => array(),
),
'sorts' => array(
'default' => array(),
),
'arguments' => array(
'default' => array(),
),
'filter_groups' => array(
'contains' => array(
'operator' => array('default' => 'AND'),
'groups' => array('default' => array(1 => 'AND')),
),
),
'filters' => array(
'default' => array(),
),
);
if (!$this->usesPager()) {
$options['defaults']['default']['use_pager'] = FALSE;
$options['defaults']['default']['items_per_page'] = FALSE;
$options['defaults']['default']['offset'] = FALSE;
$options['defaults']['default']['pager'] = FALSE;
$options['pager']['contains']['type']['default'] = 'some';
}
if ($this->isDefaultDisplay()) {
unset($options['defaults']);
}
foreach ($this->extender as $extender) {
$extender->defineOptionsAlter($options);
}
return $options;
}
/**
* Check to see if the display has a 'path' field.
*
* This is a pure function and not just a setting on the definition
* because some displays (such as a panel pane) may have a path based
* upon configuration.
*
* By default, displays do not have a path.
*/
public function hasPath() { return FALSE; }
/**
* Check to see if the display has some need to link to another display.
*
* For the most part, displays without a path will use a link display. However,
* sometimes displays that have a path might also need to link to another display.
* This is true for feeds.
*/
public function usesLinkDisplay() { return !$this->hasPath(); }
/**
* Check to see if the display can put the exposed formin a block.
*
* By default, displays that do not have a path cannot disconnect
* the exposed form and put it in a block, because the form has no
* place to go and Views really wants the forms to go to a specific
* page.
*/
public function usesExposedFormInBlock() { return $this->hasPath(); }
/**
* Find out all displays which are attached to this display.
*
* The method is just using the pure storage object to avoid loading of the
* sub displays which would kill lazy loading.
*/
public function getAttachedDisplays() {
$current_display_id = $this->display['id'];
$attached_displays = array();
// Go through all displays and search displays which link to this one.
foreach ($this->view->storage->get('display') as $display_id => $display) {
if (isset($display['display_options']['displays'])) {
$displays = $display['display_options']['displays'];
if (isset($displays[$current_display_id])) {
$attached_displays[] = $display_id;
}
}
}
return $attached_displays;
}
/**
* Check to see which display to use when creating links within
* a view using this display.
*/
public function getLinkDisplay() {
$display_id = $this->getOption('link_display');
// If unknown, pick the first one.
if (empty($display_id) || !$this->view->displayHandlers->has($display_id)) {
foreach ($this->view->displayHandlers as $display_id => $display) {
if (!empty($display) && $display->hasPath()) {
return $display_id;
}
}
}
else {
return $display_id;
}
// fall-through returns NULL
}
/**
* Return the base path to use for this display.
*
* This can be overridden for displays that do strange things
* with the path.
*/
public function getPath() {
if ($this->hasPath()) {
return $this->getOption('path');
}
$display_id = $this->getLinkDisplay();
if ($display_id && $this->view->displayHandlers->has($display_id) && is_object($this->view->displayHandlers->get($display_id))) {
return $this->view->displayHandlers->get($display_id)->getPath();
}
}
public function getUrl() {
return $this->view->getUrl();
}
/**
* Check to see if the display needs a breadcrumb
*
* By default, displays do not need breadcrumbs
*/
public function usesBreadcrumb() { return FALSE; }
/**
* Determine if a given option is set to use the default display or the
* current display
*
* @return
* TRUE for the default display
*/
public function isDefaulted($option) {
return !$this->isDefaultDisplay() && !empty($this->default_display) && !empty($this->options['defaults'][$option]);
}
/**
* Intelligently get an option either from this display or from the
* default display, if directed to do so.
*/
public function getOption($option) {
if ($this->isDefaulted($option)) {
return $this->default_display->getOption($option);
}
if (array_key_exists($option, $this->options)) {
return $this->options[$option];
}
}
/**
* Determine if the display's style uses fields.
*
* @return bool
*/
public function usesFields() {
return $this->getPlugin('style')->usesFields();
}
/**
* Get the instance of a plugin, for example style or row.
*
* @param string $type
* The type of the plugin.
*
* @return \Drupal\views\Plugin\views\PluginBase
*/
public function getPlugin($type) {
// Look up the plugin name to use for this instance.
$options = $this->getOption($type);
$name = $options['type'];
// Query plugins allow specifying a specific query class per base table.
if ($type == 'query') {
$views_data = Views::viewsData()->get($this->view->storage->get('base_table'));
$name = isset($views_data['table']['base']['query_id']) ? $views_data['table']['base']['query_id'] : 'views_query';
}
// Plugin instances are stored on the display for re-use.
if (!isset($this->plugins[$type][$name])) {
$plugin = Views::pluginManager($type)->createInstance($name);
// Initialize the plugin.
$plugin->init($this->view, $this, $options['options']);
$this->plugins[$type][$name] = $plugin;
}
return $this->plugins[$type][$name];
}
/**
* Get the handler object for a single handler.
*/
public function &getHandler($type, $id) {
if (!isset($this->handlers[$type])) {
$this->getHandlers($type);
}
if (isset($this->handlers[$type][$id])) {
return $this->handlers[$type][$id];
}
// So we can return a reference.
$null = NULL;
return $null;
}
/**
* Get a full array of handlers for $type. This caches them.
*/
public function getHandlers($type) {
if (!isset($this->handlers[$type])) {
$this->handlers[$type] = array();
$types = ViewExecutable::viewsHandlerTypes();
$plural = $types[$type]['plural'];
foreach ($this->getOption($plural) as $id => $info) {
// If this is during form submission and there are temporary options
// which can only appear if the view is in the edit cache, use those
// options instead. This is used for AJAX multi-step stuff.
if (isset($_POST['form_id']) && isset($this->view->temporary_options[$type][$id])) {
$info = $this->view->temporary_options[$type][$id];
}
if ($info['id'] != $id) {
$info['id'] = $id;
}
// If aggregation is on, the group type might override the actual
// handler that is in use. This piece of code checks that and,
// if necessary, sets the override handler.
$override = NULL;
if ($this->useGroupBy() && !empty($info['group_type'])) {
if (empty($this->view->query)) {
$this->view->initQuery();
}
$aggregate = $this->view->query->get_aggregation_info();
if (!empty($aggregate[$info['group_type']]['handler'][$type])) {
$override = $aggregate[$info['group_type']]['handler'][$type];
}
}
if (!empty($types[$type]['type'])) {
$handler_type = $types[$type]['type'];
}
else {
$handler_type = $type;
}
if ($handler = views_get_handler($info, $handler_type, $override)) {
// Special override for area types so they know where they come from.
if ($handler instanceof AreaPluginBase) {
$handler->areaType = $type;
}
$handler->init($this->view, $this, $info);
$this->handlers[$type][$id] = &$handler;
}
// Prevent reference problems.
unset($handler);
}
}
return $this->handlers[$type];
}
/**
* Retrieves a list of fields for the current display.
*
* This also takes into account any associated relationships, if they exist.
*
* @param bool $groupable_only
* (optional) TRUE to only return an array of field labels from handlers
* that support the use_string_group_by method, defaults to FALSE.
*
* @return array
* An array of applicable field options, keyed by ID.
*/
public function getFieldLabels($groupable_only = FALSE) {
$options = array();
foreach ($this->getHandlers('relationship') as $relationship => $handler) {
$relationships[$relationship] = $handler->adminLabel();
}
foreach ($this->getHandlers('field') as $id => $handler) {
if ($groupable_only && !$handler->use_string_group_by()) {
// Continue to next handler if it's not groupable.
continue;
}
if ($label = $handler->label()) {
$options[$id] = $label;
}
else {
$options[$id] = $handler->adminLabel();
}
if (!empty($handler->options['relationship']) && !empty($relationships[$handler->options['relationship']])) {
$options[$id] = '(' . $relationships[$handler->options['relationship']] . ') ' . $options[$id];
}
}
return $options;
}
/**
* Intelligently set an option either from this display or from the
* default display, if directed to do so.
*/
public function setOption($option, $value) {
if ($this->isDefaulted($option)) {
return $this->default_display->setOption($option, $value);
}
// Set this in two places: On the handler where we'll notice it
// but also on the display object so it gets saved. This should
// only be a temporary fix.
$this->display['display_options'][$option] = $value;
return $this->options[$option] = $value;
}
/**
* Set an option and force it to be an override.
*/
public function overrideOption($option, $value) {
$this->setOverride($option, FALSE);
$this->setOption($option, $value);
}
/**
* Because forms may be split up into sections, this provides
* an easy URL to exactly the right section. Don't override this.
*/
public function optionLink($text, $section, $class = '', $title = '') {
if (!empty($class)) {
$text = '<span>' . $text . '</span>';
}
if (!trim($text)) {
$text = t('Broken field');
}
if (empty($title)) {
$title = $text;
}
return l($text, 'admin/structure/views/nojs/display/' . $this->view->storage->id() . '/' . $this->display['id'] . '/' . $section, array('attributes' => array('class' => 'views-ajax-link ' . $class, 'title' => $title, 'id' => drupal_html_id('views-' . $this->display['id'] . '-' . $section)), 'html' => TRUE));
}
/**
* Returns to tokens for arguments.
*
* This function is similar to views_handler_field::get_render_tokens()
* but without fields tokens.
*/
public function getArgumentsTokens() {
$tokens = array();
if (!empty($this->view->build_info['substitutions'])) {
$tokens = $this->view->build_info['substitutions'];
}
$count = 0;
foreach ($this->view->display_handler->getHandlers('argument') as $arg => $handler) {
$token = '%' . ++$count;
if (!isset($tokens[$token])) {
$tokens[$token] = '';
}
// Use strip tags as there should never be HTML in the path.
// However, we need to preserve special characters like " that
// were removed by check_plain().
$tokens['!' . $count] = isset($this->view->args[$count - 1]) ? strip_tags(decode_entities($this->view->args[$count - 1])) : '';
}
return $tokens;
}
/**
* Provide the default summary for options in the views UI.
*
* This output is returned as an array.
*/
public function optionsSummary(&$categories, &$options) {
$categories = array(
'title' => array(
'title' => t('Title'),
'column' => 'first',
),
'format' => array(
'title' => t('Format'),
'column' => 'first',
),
'filters' => array(
'title' => t('Filters'),
'column' => 'first',
),
'fields' => array(
'title' => t('Fields'),
'column' => 'first',
),
'pager' => array(
'title' => t('Pager'),
'column' => 'second',
),
'exposed' => array(
'title' => t('Exposed form'),
'column' => 'third',
'build' => array(
'#weight' => 1,
),
),
'access' => array(
'title' => '',
'column' => 'second',
'build' => array(
'#weight' => -5,
),
),
'other' => array(
'title' => t('Other'),
'column' => 'third',
'build' => array(
'#weight' => 2,
),
),
);
if ($this->display['id'] != 'default') {
$options['display_id'] = array(
'category' => 'other',
'title' => t('Machine Name'),
'value' => !empty($this->display['new_id']) ? check_plain($this->display['new_id']) : check_plain($this->display['id']),
'desc' => t('Change the machine name of this display.'),
);
}
$display_comment = check_plain(drupal_substr($this->getOption('display_comment'), 0, 10));
$options['display_comment'] = array(
'category' => 'other',
'title' => t('Administrative comment'),
'value' => !empty($display_comment) ? $display_comment : t('None'),
'desc' => t('Comment or document this display.'),
);
$title = strip_tags($this->getOption('title'));
if (!$title) {
$title = t('None');
}
$options['title'] = array(
'category' => 'title',
'title' => t('Title'),
'value' => $title,
'desc' => t('Change the title that this display will use.'),
);
$style_plugin_instance = $this->getPlugin('style');
$style_summary = empty($style_plugin_instance->definition['title']) ? t('Missing style plugin') : $style_plugin_instance->summaryTitle();
$style_title = empty($style_plugin_instance->definition['title']) ? t('Missing style plugin') : $style_plugin_instance->pluginTitle();
$style = '';
$options['style'] = array(
'category' => 'format',
'title' => t('Format'),
'value' => $style_title,
'setting' => $style_summary,
'desc' => t('Change the way content is formatted.'),
);
// This adds a 'Settings' link to the style_options setting if the style has options.
if ($style_plugin_instance->usesOptions()) {
$options['style']['links']['style_options'] = t('Change settings for this format');
}
if ($style_plugin_instance->usesRowPlugin()) {
$row_plugin_instance = $this->getPlugin('row');
$row_summary = empty($row_plugin_instance->definition['title']) ? t('Missing style plugin') : $row_plugin_instance->summaryTitle();
$row_title = empty($row_plugin_instance->definition['title']) ? t('Missing style plugin') : $row_plugin_instance->pluginTitle();
$options['row'] = array(
'category' => 'format',
'title' => t('Show'),
'value' => $row_title,
'setting' => $row_summary,
'desc' => t('Change the way each row in the view is styled.'),
);
// This adds a 'Settings' link to the row_options setting if the row style has options.
if ($row_plugin_instance->usesOptions()) {
$options['row']['links']['row_options'] = t('Change settings for this style');
}
}
if ($this->usesAJAX()) {
$options['use_ajax'] = array(
'category' => 'other',
'title' => t('Use AJAX'),
'value' => $this->getOption('use_ajax') ? t('Yes') : t('No'),
'desc' => t('Change whether or not this display will use AJAX.'),
);
}
if ($this->usesAttachments()) {
$options['hide_attachment_summary'] = array(
'category' => 'other',
'title' => t('Hide attachments in summary'),
'value' => $this->getOption('hide_attachment_summary') ? t('Yes') : t('No'),
'desc' => t('Change whether or not to display attachments when displaying a contextual filter summary.'),
);
}
if (!isset($this->definition['contextual links locations']) || !empty($this->definition['contextual links locations'])) {
$options['show_admin_links'] = array(
'category' => 'other',
'title' => t('Contextual links'),
'value' => $this->getOption('show_admin_links') ? t('Shown') : t('Hidden'),
'desc' => t('Change whether or not to display contextual links for this view.'),
);
}
$pager_plugin = $this->getPlugin('pager');
if (!$pager_plugin) {
// default to the no pager plugin.
$pager_plugin = Views::pluginManager('pager')->createInstance('none');
}
$pager_str = $pager_plugin->summaryTitle();
$options['pager'] = array(
'category' => 'pager',
'title' => t('Use pager'),
'value' => $pager_plugin->pluginTitle(),
'setting' => $pager_str,
'desc' => t("Change this display's pager setting."),
);
// If pagers aren't allowed, change the text of the item:
if (!$this->usesPager()) {
$options['pager']['title'] = t('Items to display');
}
if ($pager_plugin->usesOptions()) {
$options['pager']['links']['pager_options'] = t('Change settings for this pager type.');
}
if ($this->usesMore()) {
$options['use_more'] = array(
'category' => 'pager',
'title' => t('More link'),
'value' => $this->getOption('use_more') ? t('Yes') : t('No'),
'desc' => t('Specify whether this display will provide a "more" link.'),
);
}
$this->view->initQuery();
if ($this->view->query->get_aggregation_info()) {
$options['group_by'] = array(
'category' => 'other',
'title' => t('Use aggregation'),
'value' => $this->getOption('group_by') ? t('Yes') : t('No'),
'desc' => t('Allow grouping and aggregation (calculation) of fields.'),
);
}
$options['query'] = array(
'category' => 'other',
'title' => t('Query settings'),
'value' => t('Settings'),
'desc' => t('Allow to set some advanced settings for the query plugin'),
);
$languages = array(
'***CURRENT_LANGUAGE***' => t("Current user's language"),
'***DEFAULT_LANGUAGE***' => t("Default site language"),
LANGUAGE_NOT_SPECIFIED => t('Language neutral'),
);
if (\Drupal::moduleHandler()->moduleExists('language')) {
$languages = array_merge($languages, language_list());
}
$options['field_langcode'] = array(
'category' => 'other',
'title' => t('Field Language'),
'value' => $languages[$this->getOption('field_langcode')],
'desc' => t('All fields which support translations will be displayed in the selected language.'),
);
$access_plugin = $this->getPlugin('access');
if (!$access_plugin) {
// default to the no access control plugin.
$access_plugin = Views::pluginManager('access')->createInstance('none');
}
$access_str = $access_plugin->summaryTitle();
$options['access'] = array(
'category' => 'access',
'title' => t('Access'),
'value' => $access_plugin->pluginTitle(),
'setting' => $access_str,
'desc' => t('Specify access control type for this display.'),
);
if ($access_plugin->usesOptions()) {
$options['access']['links']['access_options'] = t('Change settings for this access type.');
}
$cache_plugin = $this->getPlugin('cache');
if (!$cache_plugin) {
// default to the no cache control plugin.
$cache_plugin = Views::pluginManager('cache')->createInstance('none');
}
$cache_str = $cache_plugin->summaryTitle();
$options['cache'] = array(
'category' => 'other',
'title' => t('Caching'),
'value' => $cache_plugin->pluginTitle(),
'setting' => $cache_str,
'desc' => t('Specify caching type for this display.'),
);
if ($cache_plugin->usesOptions()) {
$options['cache']['links']['cache_options'] = t('Change settings for this caching type.');
}
if ($access_plugin->usesOptions()) {
$options['access']['links']['access_options'] = t('Change settings for this access type.');
}
if ($this->usesLinkDisplay()) {
$display_id = $this->getLinkDisplay();
$displays = $this->view->storage->get('display');
$link_display = empty($displays[$display_id]) ? t('None') : check_plain($displays[$display_id]['display_title']);
$link_display = $this->getOption('link_display') == 'custom_url' ? t('Custom URL') : $link_display;
$options['link_display'] = array(
'category' => 'other',
'title' => t('Link display'),
'value' => $link_display,
'desc' => t('Specify which display or custom url this display will link to.'),
);
}
if ($this->usesExposedFormInBlock()) {
$options['exposed_block'] = array(
'category' => 'exposed',
'title' => t('Exposed form in block'),
'value' => $this->getOption('exposed_block') ? t('Yes') : t('No'),
'desc' => t('Allow the exposed form to appear in a block instead of the view.'),
);
}
$exposed_form_plugin = $this->getPlugin('exposed_form');
if (!$exposed_form_plugin) {
// default to the no cache control plugin.
$exposed_form_plugin = Views::pluginManager('exposed_form')->createInstance('basic');
}
$exposed_form_str = $exposed_form_plugin->summaryTitle();
$options['exposed_form'] = array(
'category' => 'exposed',
'title' => t('Exposed form style'),
'value' => $exposed_form_plugin->pluginTitle(),
'setting' => $exposed_form_str,
'desc' => t('Select the kind of exposed filter to use.'),
);
if ($exposed_form_plugin->usesOptions()) {
$options['exposed_form']['links']['exposed_form_options'] = t('Exposed form settings for this exposed form style.');
}
$css_class = check_plain(trim($this->getOption('css_class')));
if (!$css_class) {
$css_class = t('None');
}
$options['css_class'] = array(
'category' => 'other',
'title' => t('CSS class'),
'value' => $css_class,
'desc' => t('Change the CSS class name(s) that will be added to this display.'),
);
$options['analyze-theme'] = array(
'category' => 'other',
'title' => t('Output'),
'value' => t('Templates'),
'desc' => t('Get information on how to theme this display'),
);
foreach ($this->extender as $extender) {
$extender->optionsSummary($categories, $options);
}
}
/**
* Provide the default form for setting options.
*/
public function buildOptionsForm(&$form, &$form_state) {
parent::buildOptionsForm($form, $form_state);
if ($this->defaultableSections($form_state['section'])) {
views_ui_standard_display_dropdown($form, $form_state, $form_state['section']);
}
$form['#title'] = check_plain($this->display['display_title']) . ': ';
// Set the 'section' to hilite on the form.
// If it's the item we're looking at is pulling from the default display,
// reflect that. Don't use is_defaulted since we want it to show up even
// on the default display.
if (!empty($this->options['defaults'][$form_state['section']])) {
$form['#section'] = 'default-' . $form_state['section'];
}
else {
$form['#section'] = $this->display['id'] . '-' . $form_state['section'];
}
switch ($form_state['section']) {
case 'display_id':
$form['#title'] .= t('The machine name of this display');
$form['display_id'] = array(
'#type' => 'textfield',
'#title' => t('Machine name of the display'),
'#default_value' => !empty($this->display['new_id']) ? $this->display['new_id'] : $this->display['id'],
'#required' => TRUE,
'#size' => 64,
);
break;
case 'display_title':
$form['#title'] .= t('The name and the description of this display');
$form['display_title'] = array(
'#title' => t('Administrative name'),
'#type' => 'textfield',
'#default_value' => $this->display['display_title'],
);
$form['display_description'] = array(
'#title' => t('Administrative description'),
'#type' => 'textfield',
'#default_value' => $this->getOption('display_description'),
);
break;
case 'display_comment':
$form['#title'] .= t('Administrative comment');
$form['display_comment'] = array(
'#type' => 'textarea',
'#title' => t('Administrative comment'),
'#description' => t('This description will only be seen within the administrative interface and can be used to document this display.'),
'#default_value' => $this->getOption('display_comment'),
);
break;
case 'title':
$form['#title'] .= t('The title of this view');
$form['title'] = array(
'#type' => 'textfield',
'#description' => t('This title will be displayed with the view, wherever titles are normally displayed; i.e, as the page title, block title, etc.'),
'#default_value' => $this->getOption('title'),
);
break;
case 'css_class':
$form['#title'] .= t('CSS class');
$form['css_class'] = array(
'#type' => 'textfield',
'#title' => t('CSS class name(s)'),
'#description' => t('Multiples classes should be separated by spaces.'),
'#default_value' => $this->getOption('css_class'),
);
break;
case 'use_ajax':
$form['#title'] .= t('Use AJAX when available to load this view');
$form['use_ajax'] = array(
'#description' => t('When viewing a view, things like paging, table sorting, and exposed filters will not trigger a page refresh.'),
'#type' => 'checkbox',
'#title' => t('Use AJAX'),
'#default_value' => $this->getOption('use_ajax') ? 1 : 0,
);
break;
case 'hide_attachment_summary':
$form['#title'] .= t('Hide attachments when displaying a contextual filter summary');
$form['hide_attachment_summary'] = array(
'#type' => 'checkbox',
'#title' => t('Hide attachments in summary'),
'#default_value' => $this->getOption('hide_attachment_summary') ? 1 : 0,
);
break;
case 'show_admin_links':
$form['#title'] .= t('Show contextual links on this view.');
$form['show_admin_links'] = array(
'#type' => 'checkbox',
'#title' => t('Show contextual links'),
'#default_value' => $this->getOption('show_admin_links'),
);
break;
case 'use_more':
$form['#title'] .= t('Add a more link to the bottom of the display.');
$form['use_more'] = array(
'#type' => 'checkbox',
'#title' => t('Create more link'),
'#description' => t("This will add a more link to the bottom of this view, which will link to the page view. If you have more than one page view, the link will point to the display specified in 'Link display' section under advanced. You can override the url at the link display setting."),
'#default_value' => $this->getOption('use_more'),
);
$form['use_more_always'] = array(
'#type' => 'checkbox',
'#title' => t("Display 'more' link only if there is more content"),
'#description' => t("Leave this unchecked to display the 'more' link even if there are no more items to display."),
'#default_value' => !$this->getOption('use_more_always'),
'#states' => array(
'visible' => array(
':input[name="use_more"]' => array('checked' => TRUE),
),
),
);
$form['use_more_text'] = array(
'#type' => 'textfield',
'#title' => t('More link text'),
'#description' => t("The text to display for the more link."),
'#default_value' => $this->getOption('useMoreText'),
'#states' => array(
'visible' => array(
':input[name="use_more"]' => array('checked' => TRUE),
),
),
);
break;
case 'group_by':
$form['#title'] .= t('Allow grouping and aggregation (calculation) of fields.');
$form['group_by'] = array(
'#type' => 'checkbox',
'#title' => t('Aggregate'),
'#description' => t('If enabled, some fields may become unavailable. All fields that are selected for grouping will be collapsed to one record per distinct value. Other fields which are selected for aggregation will have the function run on them. For example, you can group nodes on title and count the number of nids in order to get a list of duplicate titles.'),
'#default_value' => $this->getOption('group_by'),
);
break;
case 'access':
$form['#title'] .= t('Access restrictions');
$form['access'] = array(
'#prefix' => '<div class="clearfix">',
'#suffix' => '</div>',
'#tree' => TRUE,
);
$access = $this->getOption('access');
$form['access']['type'] = array(
'#type' => 'radios',
'#options' => views_fetch_plugin_names('access', $this->getType(), array($this->view->storage->get('base_table'))),
'#default_value' => $access['type'],
);
$access_plugin = $this->getPlugin('access');
if ($access_plugin->usesOptions()) {
$form['markup'] = array(
'#prefix' => '<div class="form-item description">',
'#markup' => t('You may also adjust the !settings for the currently selected access restriction.', array('!settings' => $this->optionLink(t('settings'), 'access_options'))),
'#suffix' => '</div>',
);
}
break;
case 'access_options':
$plugin = $this->getPlugin('access');
$form['#title'] .= t('Access options');
if ($plugin) {
$form['access_options'] = array(
'#tree' => TRUE,
);
$plugin->buildOptionsForm($form['access_options'], $form_state);
}
break;
case 'cache':
$form['#title'] .= t('Caching');
$form['cache'] = array(
'#prefix' => '<div class="clearfix">',
'#suffix' => '</div>',
'#tree' => TRUE,
);
$cache = $this->getOption('cache');
$form['cache']['type'] = array(
'#type' => 'radios',
'#options' => views_fetch_plugin_names('cache', $this->getType(), array($this->view->storage->get('base_table'))),
'#default_value' => $cache['type'],
);
$cache_plugin = $this->getPlugin('cache');
if ($cache_plugin->usesOptions()) {
$form['markup'] = array(
'#prefix' => '<div class="form-item description">',
'#suffix' => '</div>',
'#markup' => t('You may also adjust the !settings for the currently selected cache mechanism.', array('!settings' => $this->optionLink(t('settings'), 'cache_options'))),
);
}
break;
case 'cache_options':
$plugin = $this->getPlugin('cache');
$form['#title'] .= t('Caching options');
if ($plugin) {
$form['cache_options'] = array(
'#tree' => TRUE,
);
$plugin->buildOptionsForm($form['cache_options'], $form_state);
}
break;
case 'query':
$query_options = $this->getOption('query');
$plugin_name = $query_options['type'];
$form['#title'] .= t('Query options');
$this->view->initQuery();
if ($this->view->query) {
$form['query'] = array(
'#tree' => TRUE,
'type' => array(
'#type' => 'value',
'#value' => $plugin_name,
),
'options' => array(
'#tree' => TRUE,
),
);
$this->view->query->buildOptionsForm($form['query']['options'], $form_state);
}
break;
case 'field_language':
$form['#title'] .= t('Field Language');
$entities = entity_get_info();
$entity_tables = array();
$has_translation_handlers = FALSE;
foreach ($entities as $type => $entity_info) {
$entity_tables[] = $entity_info['base_table'];
if (!empty($entity_info['translation'])) {
$has_translation_handlers = TRUE;
}
}
// Doesn't make sense to show a field setting here if we aren't querying
// an entity base table. Also, we make sure that there's at least one
// entity type with a translation handler attached.
if (in_array($this->view->storage->get('base_table'), $entity_tables) && $has_translation_handlers) {
$languages = array(
'***CURRENT_LANGUAGE***' => t("Current user's language"),
'***DEFAULT_LANGUAGE***' => t("Default site language"),
LANGUAGE_NOT_SPECIFIED => t('Language neutral'),
);
$languages = array_merge($languages, views_language_list());
$form['field_langcode'] = array(
'#type' => 'select',
'#title' => t('Field Language'),
'#description' => t('All fields which support translations will be displayed in the selected language.'),
'#options' => $languages,
'#default_value' => $this->getOption('field_langcode'),
);
$form['field_langcode_add_to_query'] = array(
'#type' => 'checkbox',
'#title' => t('When needed, add the field language condition to the query'),
'#default_value' => $this->getOption('field_langcode_add_to_query'),
);
}
else {
$form['field_language']['#markup'] = t("You don't have translatable entity types.");
}
break;
case 'style':
$form['#title'] .= t('How should this view be styled');
$style_plugin = $this->getPlugin('style');
$form['style'] = array(
'#type' => 'radios',
'#options' => views_fetch_plugin_names('style', $this->getType(), array($this->view->storage->get('base_table'))),
'#default_value' => $style_plugin->definition['id'],
'#description' => t('If the style you choose has settings, be sure to click the settings button that will appear next to it in the View summary.'),
);
if ($style_plugin->usesOptions()) {
$form['markup'] = array(
'#prefix' => '<div class="form-item description">',
'#suffix' => '</div>',
'#markup' => t('You may also adjust the !settings for the currently selected style.', array('!settings' => $this->optionLink(t('settings'), 'style_options'))),
);
}
break;
case 'style_options':
$form['#title'] .= t('Style options');
$style = TRUE;
$style_plugin = $this->getOption('style');
$name = $style_plugin['type'];
case 'row_options':
if (!isset($name)) {
$row_plugin = $this->getOption('row');
$name = $row_plugin['type'];
}
// if row, $style will be empty.
if (empty($style)) {
$form['#title'] .= t('Row style options');
}
$plugin = $this->getPlugin(empty($style) ? 'row' : 'style', $name);
if ($plugin) {
$form[$form_state['section']] = array(
'#tree' => TRUE,
);
$plugin->buildOptionsForm($form[$form_state['section']], $form_state);
}
break;
case 'row':
$form['#title'] .= t('How should each row in this view be styled');
$row_plugin_instance = $this->getPlugin('row');
$form['row'] = array(
'#type' => 'radios',
'#options' => views_fetch_plugin_names('row', $this->getType(), array($this->view->storage->get('base_table'))),
'#default_value' => $row_plugin_instance->definition['id'],
);
if ($row_plugin_instance->usesOptions()) {
$form['markup'] = array(
'#prefix' => '<div class="form-item description">',
'#suffix' => '</div>',
'#markup' => t('You may also adjust the !settings for the currently selected row style.', array('!settings' => $this->optionLink(t('settings'), 'row_options'))),
);
}
break;
case 'link_display':
$form['#title'] .= t('Which display to use for path');
foreach ($this->view->storage->get('display') as $display_id => $display) {
if ($this->view->displayHandlers->get($display_id)->hasPath()) {
$options[$display_id] = $display['display_title'];
}
}
$options['custom_url'] = t('Custom URL');
if (count($options)) {
$form['link_display'] = array(
'#type' => 'radios',
'#options' => $options,
'#description' => t("Which display to use to get this display's path for things like summary links, rss feed links, more links, etc."),
'#default_value' => $this->getOption('link_display'),
);
}
$options = array();
$count = 0; // This lets us prepare the key as we want it printed.
foreach ($this->view->display_handler->getHandlers('argument') as $arg => $handler) {
$options[t('Arguments')]['%' . ++$count] = t('@argument title', array('@argument' => $handler->adminLabel()));
$options[t('Arguments')]['!' . $count] = t('@argument input', array('@argument' => $handler->adminLabel()));
}
// Default text.
// We have some options, so make a list.
$output = '';
if (!empty($options)) {
$output = t('<p>The following tokens are available for this link.</p>');
foreach (array_keys($options) as $type) {
if (!empty($options[$type])) {
$items = array();
foreach ($options[$type] as $key => $value) {
$items[] = $key . ' == ' . $value;
}
$output .= theme('item_list',
array(
'items' => $items,
'type' => $type
));
}
}
}
$form['link_url'] = array(
'#type' => 'textfield',
'#title' => t('Custom URL'),
'#default_value' => $this->getOption('link_url'),
'#description' => t('A Drupal path or external URL the more link will point to. Note that this will override the link display setting above.') . $output,
'#states' => array(
'visible' => array(
':input[name="link_display"]' => array('value' => 'custom_url'),
),
),
);
break;
case 'analyze-theme':
$form['#title'] .= t('Theming information');
if ($theme = drupal_container()->get('request')->request->get('theme')) {
$this->theme = $theme;
}
elseif (empty($this->theme)) {
$this->theme = config('system.theme')->get('default');
}
if (isset($GLOBALS['theme']) && $GLOBALS['theme'] == $this->theme) {
$this->theme_registry = theme_get_registry();
$theme_engine = $GLOBALS['theme_engine'];
}
else {
$themes = list_themes();
$theme = $themes[$this->theme];
// Find all our ancestor themes and put them in an array.
$base_theme = array();
$ancestor = $this->theme;
while ($ancestor && isset($themes[$ancestor]->base_theme)) {
$ancestor = $themes[$ancestor]->base_theme;
$base_theme[] = $themes[$ancestor];
}
// The base themes should be initialized in the right order.
$base_theme = array_reverse($base_theme);
// This code is copied directly from _drupal_theme_initialize()
$theme_engine = NULL;
// Initialize the theme.
if (isset($theme->engine)) {
// Include the engine.
include_once DRUPAL_ROOT . '/' . $theme->owner;
$theme_engine = $theme->engine;
if (function_exists($theme_engine . '_init')) {
foreach ($base_theme as $base) {
call_user_func($theme_engine . '_init', $base);
}
call_user_func($theme_engine . '_init', $theme);
}
}
else {
// include non-engine theme files
foreach ($base_theme as $base) {
// Include the theme file or the engine.
if (!empty($base->owner)) {
include_once DRUPAL_ROOT . '/' . $base->owner;
}
}
// and our theme gets one too.
if (!empty($theme->owner)) {
include_once DRUPAL_ROOT . '/' . $theme->owner;
}
}
$this->theme_registry = _theme_load_registry($theme, $base_theme, $theme_engine);
}
// If there's a theme engine involved, we also need to know its extension
// so we can give the proper filename.
$this->theme_extension = '.tpl.php';
if (isset($theme_engine)) {
$extension_function = $theme_engine . '_extension';
if (function_exists($extension_function)) {
$this->theme_extension = $extension_function();
}
}
$funcs = array();
// Get theme functions for the display. Note that some displays may
// not have themes. The 'feed' display, for example, completely
// delegates to the style.
if (!empty($this->definition['theme'])) {
$funcs[] = $this->optionLink(t('Display output'), 'analyze-theme-display') . ': ' . $this->formatThemes($this->themeFunctions());
}
$plugin = $this->getPlugin('style');
if ($plugin) {
$funcs[] = $this->optionLink(t('Style output'), 'analyze-theme-style') . ': ' . $this->formatThemes($plugin->themeFunctions());
if ($plugin->usesRowPlugin()) {
$row_plugin = $this->getPlugin('row');
if ($row_plugin) {
$funcs[] = $this->optionLink(t('Row style output'), 'analyze-theme-row') . ': ' . $this->formatThemes($row_plugin->themeFunctions());
}
}
if ($plugin->usesFields()) {
foreach ($this->getHandlers('field') as $id => $handler) {
$funcs[] = $this->optionLink(t('Field @field (ID: @id)', array('@field' => $handler->adminLabel(), '@id' => $id)), 'analyze-theme-field') . ': ' . $this->formatThemes($handler->themeFunctions());
}
}
}
$form['important'] = array(
'#markup' => '<div class="form-item description"><p>' . t('This section lists all possible templates for the display plugin and for the style plugins, ordered roughly from the least specific to the most specific. The active template for each plugin -- which is the most specific template found on the system -- is highlighted in bold.') . '</p></div>',
);
if (isset($this->view->display_handler->new_id)) {
$form['important']['new_id'] = array(
'#prefix' => '<div class="description">',
'#suffix' => '</div>',
'#value' => t("<strong>Important!</strong> You have changed the display's machine name. Anything that attached to this display specifically, such as theming, may stop working until it is updated. To see theme suggestions for it, you need to save the view."),
);
}
foreach (list_themes() as $key => $theme) {
if (!empty($theme->info['hidden'])) {
continue;
}
$options[$key] = $theme->info['name'];
}
$form['box'] = array(
'#prefix' => '<div class="container-inline">',
'#suffix' => '</div>',
);
$form['box']['theme'] = array(
'#type' => 'select',
'#options' => $options,
'#default_value' => $this->theme,
);
$form['box']['change'] = array(
'#type' => 'submit',
'#value' => t('Change theme'),
'#submit' => array(array($this, 'changeThemeForm')),
);
$form['analysis'] = array(
'#markup' => '<div class="form-item">' . theme('item_list', array('items' => $funcs)) . '</div>',
);
$form['rescan_button'] = array(
'#prefix' => '<div class="form-item">',
'#suffix' => '</div>',
);
$form['rescan_button']['button'] = array(
'#type' => 'submit',
'#value' => t('Rescan template files'),
'#submit' => array(array($this, 'rescanThemes')),
);
$form['rescan_button']['markup'] = array(
'#markup' => '<div class="description">' . t("<strong>Important!</strong> When adding, removing, or renaming template files, it is necessary to make Drupal aware of the changes by making it rescan the files on your system. By clicking this button you clear Drupal's theme registry and thereby trigger this rescanning process. The highlighted templates above will then reflect the new state of your system.") . '</div>',
);
$form_state['ok_button'] = TRUE;
break;
case 'analyze-theme-display':
$form['#title'] .= t('Theming information (display)');
$output = '<p>' . t('Back to !info.', array('!info' => $this->optionLink(t('theming information'), 'analyze-theme'))) . '</p>';
if (empty($this->definition['theme'])) {
$output .= t('This display has no theming information');
}
else {
$output .= '<p>' . t('This is the default theme template used for this display.') . '</p>';
$output .= '<pre>' . check_plain(file_get_contents('./' . $this->definition['theme_path'] . '/' . strtr($this->definition['theme'], '_', '-') . '.tpl.php')) . '</pre>';
}
$form['analysis'] = array(
'#markup' => '<div class="form-item">' . $output . '</div>',
);
$form_state['ok_button'] = TRUE;
break;
case 'analyze-theme-style':
$form['#title'] .= t('Theming information (style)');
$output = '<p>' . t('Back to !info.', array('!info' => $this->optionLink(t('theming information'), 'analyze-theme'))) . '</p>';
$plugin = $this->getPlugin('style');
if (empty($plugin->definition['theme'])) {
$output .= t('This display has no style theming information');
}
else {
$output .= '<p>' . t('This is the default theme template used for this style.') . '</p>';
$output .= '<pre>' . check_plain(file_get_contents('./' . $plugin->definition['theme_path'] . '/' . strtr($plugin->definition['theme'], '_', '-') . '.tpl.php')) . '</pre>';
}
$form['analysis'] = array(
'#markup' => '<div class="form-item">' . $output . '</div>',
);
$form_state['ok_button'] = TRUE;
break;
case 'analyze-theme-row':
$form['#title'] .= t('Theming information (row style)');
$output = '<p>' . t('Back to !info.', array('!info' => $this->optionLink(t('theming information'), 'analyze-theme'))) . '</p>';
$plugin = $this->getPlugin('row');
if (empty($plugin->definition['theme'])) {
$output .= t('This display has no row style theming information');
}
else {
$output .= '<p>' . t('This is the default theme template used for this row style.') . '</p>';
$output .= '<pre>' . check_plain(file_get_contents('./' . $plugin->definition['theme_path'] . '/' . strtr($plugin->definition['theme'], '_', '-') . '.tpl.php')) . '</pre>';
}
$form['analysis'] = array(
'#markup' => '<div class="form-item">' . $output . '</div>',
);
$form_state['ok_button'] = TRUE;
break;
case 'analyze-theme-field':
$form['#title'] .= t('Theming information (row style)');
$output = '<p>' . t('Back to !info.', array('!info' => $this->optionLink(t('theming information'), 'analyze-theme'))) . '</p>';
$output .= '<p>' . t('This is the default theme template used for this row style.') . '</p>';
// Field templates aren't registered the normal way...and they're always
// this one, anyhow.
$output .= '<pre>' . check_plain(file_get_contents(drupal_get_path('module', 'views') . '/templates/views-view-field.tpl.php')) . '</pre>';
$form['analysis'] = array(
'#markup' => '<div class="form-item">' . $output . '</div>',
);
$form_state['ok_button'] = TRUE;
break;
case 'exposed_block':
$form['#title'] .= t('Put the exposed form in a block');
$form['description'] = array(
'#markup' => '<div class="description form-item">' . t('If set, any exposed widgets will not appear with this view. Instead, a block will be made available to the Drupal block administration system, and the exposed form will appear there. Note that this block must be enabled manually, Views will not enable it for you.') . '</div>',
);
$form['exposed_block'] = array(
'#type' => 'radios',
'#options' => array(1 => t('Yes'), 0 => t('No')),
'#default_value' => $this->getOption('exposed_block') ? 1 : 0,
);
break;
case 'exposed_form':
$form['#title'] .= t('Exposed Form');
$form['exposed_form'] = array(
'#prefix' => '<div class="clearfix">',
'#suffix' => '</div>',
'#tree' => TRUE,
);
$exposed_form = $this->getOption('exposed_form');
$form['exposed_form']['type'] = array(
'#type' => 'radios',
'#options' => views_fetch_plugin_names('exposed_form', $this->getType(), array($this->view->storage->get('base_table'))),
'#default_value' => $exposed_form['type'],
);
$exposed_form_plugin = $this->getPlugin('exposed_form');
if ($exposed_form_plugin->usesOptions()) {
$form['markup'] = array(
'#prefix' => '<div class="form-item description">',
'#suffix' => '</div>',
'#markup' => t('You may also adjust the !settings for the currently selected style.', array('!settings' => $this->optionLink(t('settings'), 'exposed_form_options'))),
);
}
break;
case 'exposed_form_options':
$plugin = $this->getPlugin('exposed_form');
$form['#title'] .= t('Exposed form options');
if ($plugin) {
$form['exposed_form_options'] = array(
'#tree' => TRUE,
);
$plugin->buildOptionsForm($form['exposed_form_options'], $form_state);
}
break;
case 'pager':
$form['#title'] .= t('Select which pager, if any, to use for this view');
$form['pager'] = array(
'#prefix' => '<div class="clearfix">',
'#suffix' => '</div>',
'#tree' => TRUE,
);
$pager = $this->getOption('pager');
$form['pager']['type'] = array(
'#type' => 'radios',
'#options' => views_fetch_plugin_names('pager', !$this->usesPager() ? 'basic' : NULL, array($this->view->storage->get('base_table'))),
'#default_value' => $pager['type'],
);
$pager_plugin = $this->getPlugin('pager');
if ($pager_plugin->usesOptions()) {
$form['markup'] = array(
'#prefix' => '<div class="form-item description">',
'#suffix' => '</div>',
'#markup' => t('You may also adjust the !settings for the currently selected pager.', array('!settings' => $this->optionLink(t('settings'), 'pager_options'))),
);
}
break;
case 'pager_options':
$plugin = $this->getPlugin('pager');
$form['#title'] .= t('Pager options');
if ($plugin) {
$form['pager_options'] = array(
'#tree' => TRUE,
);
$plugin->buildOptionsForm($form['pager_options'], $form_state);
}
break;
}
foreach ($this->extender as $extender) {
$extender->buildOptionsForm($form, $form_state);
}
}
/**
* Submit hook to clear Drupal's theme registry (thereby triggering
* a templates rescan).
*/
public function rescanThemes($form, &$form_state) {
drupal_theme_rebuild();
// The 'Theme: Information' page is about to be shown again. That page
// analyzes the output of theme_get_registry(). However, this latter
// function uses an internal cache (which was initialized before we
// called drupal_theme_rebuild()) so it won't reflect the
// current state of our theme registry. The only way to clear that cache
// is to re-initialize the theme system:
unset($GLOBALS['theme']);
drupal_theme_initialize();
$form_state['rerender'] = TRUE;
$form_state['rebuild'] = TRUE;
}
/**
* Displays the Change Theme form.
*/
public function changeThemeForm($form, &$form_state) {
// This is just a temporary variable.
$form_state['view']->theme = $form_state['values']['theme'];
$form_state['view']->cacheSet();
$form_state['rerender'] = TRUE;
$form_state['rebuild'] = TRUE;
}
/**
* Format a list of theme templates for output by the theme info helper.
*/
protected function formatThemes($themes) {
$registry = $this->theme_registry;
$extension = $this->theme_extension;
$output = '';
$picked = FALSE;
foreach ($themes as $theme) {
$template = strtr($theme, '_', '-') . $extension;
if (!$picked && !empty($registry[$theme])) {
$template_path = isset($registry[$theme]['path']) ? $registry[$theme]['path'] . '/' : './';
if (file_exists($template_path . $template)) {
$hint = t('File found in folder @template-path', array('@template-path' => $template_path));
$template = '<strong title="'. $hint .'">' . $template . '</strong>';
}
else {
$template = '<strong class="error">' . $template . ' ' . t('(File not found, in folder @template-path)', array('@template-path' => $template_path)) . '</strong>';
}
$picked = TRUE;
}
$fixed[] = $template;
}
return theme('item_list', array('items' => array_reverse($fixed)));
}
/**
* Validate the options form.
*/
public function validateOptionsForm(&$form, &$form_state) {
switch ($form_state['section']) {
case 'display_title':
if (empty($form_state['values']['display_title'])) {
form_error($form['display_title'], t('Display title may not be empty.'));
}
break;
case 'css_class':
$css_class = $form_state['values']['css_class'];
if (preg_match('/[^a-zA-Z0-9-_ ]/', $css_class)) {
form_error($form['css_class'], t('CSS classes must be alphanumeric or dashes only.'));
}
break;
case 'display_id':
if ($form_state['values']['display_id']) {
if (preg_match('/[^a-z0-9_]/', $form_state['values']['display_id'])) {
form_error($form['display_id'], t('Display name must be letters, numbers, or underscores only.'));
}
foreach ($this->view->display as $id => $display) {
if ($id != $this->view->current_display && ($form_state['values']['display_id'] == $id || (isset($display->new_id) && $form_state['values']['display_id'] == $display->new_id))) {
form_error($form['display_id'], t('Display id should be unique.'));
}
}
}
break;
case 'query':
if ($this->view->query) {
$this->view->query->validateOptionsForm($form['query'], $form_state);
}
break;
}
// Validate plugin options. Every section with "_options" in it, belongs to
// a plugin type, like "style_options".
if (strpos($form_state['section'], '_options') !== FALSE) {
$plugin_type = str_replace('_options', '', $form_state['section']);
// Load the plugin and let it handle the validation.
if ($plugin = $this->getPlugin($plugin_type)) {
$plugin->validateOptionsForm($form[$form_state['section']], $form_state);
}
}
foreach ($this->extender as $extender) {
$extender->validateOptionsForm($form, $form_state);
}
}
/**
* Perform any necessary changes to the form values prior to storage.
* There is no need for this function to actually store the data.
*/
public function submitOptionsForm(&$form, &$form_state) {
// Not sure I like this being here, but it seems (?) like a logical place.
$cache_plugin = $this->getPlugin('cache');
if ($cache_plugin) {
$cache_plugin->cache_flush();
}
$section = $form_state['section'];
switch ($section) {
case 'display_id':
if (isset($form_state['values']['display_id'])) {
$this->display['new_id'] = $form_state['values']['display_id'];
}
break;
case 'display_title':
$this->display['display_title'] = $form_state['values']['display_title'];
$this->setOption('display_description', $form_state['values']['display_description']);
break;
case 'access':
$access = $this->getOption('access');
if ($access['type'] != $form_state['values']['access']['type']) {
$plugin = Views::pluginManager('access')->createInstance($form_state['values']['access']['type']);
if ($plugin) {
$access = array('type' => $form_state['values']['access']['type']);
$this->setOption('access', $access);
if ($plugin->usesOptions()) {
$form_state['view']->addFormToStack('display', $this->display['id'], 'access_options');
}
}
}
break;
case 'access_options':
$plugin = $this->getPlugin('access');
if ($plugin) {
$access = $this->getOption('access');
$plugin->submitOptionsForm($form['access_options'], $form_state);
$access['options'] = $form_state['values'][$section];
$this->setOption('access', $access);
}
break;
case 'cache':
$cache = $this->getOption('cache');
if ($cache['type'] != $form_state['values']['cache']['type']) {
$plugin = Views::pluginManager('cache')->createInstance($form_state['values']['cache']['type']);
if ($plugin) {
$cache = array('type' => $form_state['values']['cache']['type']);
$this->setOption('cache', $cache);
if ($plugin->usesOptions()) {
$form_state['view']->addFormToStack('display', $this->display['id'], 'cache_options');
}
}
}
break;
case 'cache_options':
$plugin = $this->getPlugin('cache');
if ($plugin) {
$cache = $this->getOption('cache');
$plugin->submitOptionsForm($form['cache_options'], $form_state);
$cache['options'] = $form_state['values'][$section];
$this->setOption('cache', $cache);
}
break;
case 'query':
$plugin = $this->getPlugin('query');
if ($plugin) {
$plugin->submitOptionsForm($form['query']['options'], $form_state);
$this->setOption('query', $form_state['values'][$section]);
}
break;
case 'link_display':
$this->setOption('link_url', $form_state['values']['link_url']);
case 'title':
case 'css_class':
case 'display_comment':
$this->setOption($section, $form_state['values'][$section]);
break;
case 'field_language':
$this->setOption('field_langcode', $form_state['values']['field_langcode']);
$this->setOption('field_langcode_add_to_query', $form_state['values']['field_langcode_add_to_query']);
break;
case 'use_ajax':
case 'hide_attachment_summary':
case 'show_admin_links':
$this->setOption($section, (bool) $form_state['values'][$section]);
break;
case 'use_more':
$this->setOption($section, intval($form_state['values'][$section]));
$this->setOption('use_more_always', !intval($form_state['values']['use_more_always']));
$this->setOption('use_more_text', $form_state['values']['use_more_text']);
case 'distinct':
$this->setOption($section, $form_state['values'][$section]);
break;
case 'group_by':
$this->setOption($section, $form_state['values'][$section]);
break;
case 'row':
// This if prevents resetting options to default if they don't change
// the plugin.
$row = $this->getOption('row');
if ($row['type'] != $form_state['values'][$section]) {
$plugin = Views::pluginManager('row')->createInstance($form_state['values'][$section]);
if ($plugin) {
$row = array('type' => $form_state['values'][$section]);
$this->setOption($section, $row);
// send ajax form to options page if we use it.
if ($plugin->usesOptions()) {
$form_state['view']->addFormToStack('display', $this->display['id'], 'row_options');
}
}
}
break;
case 'style':
// This if prevents resetting options to default if they don't change
// the plugin.
$style = $this->getOption('style');
if ($style['type'] != $form_state['values'][$section]) {
$plugin = views::pluginManager('style')->createInstance($form_state['values'][$section]);
if ($plugin) {
$row = array('type' => $form_state['values'][$section]);
$this->setOption($section, $row);
// send ajax form to options page if we use it.
if ($plugin->usesOptions()) {
$form_state['view']->addFormToStack('display', $this->display['id'], 'style_options');
}
}
}
break;
case 'style_options':
$plugin = $this->getPlugin('style');
if ($plugin) {
$style = $this->getOption('style');
$plugin->submitOptionsForm($form['style_options'], $form_state);
$style['options'] = $form_state['values'][$section];
$this->setOption('style', $style);
}
break;
case 'row_options':
$plugin = $this->getPlugin('row');
if ($plugin) {
$row = $this->getOption('row');
$plugin->submitOptionsForm($form['row_options'], $form_state);
$row['options'] = $form_state['values'][$section];
$this->setOption('row', $row);
}
break;
case 'exposed_block':
$this->setOption($section, (bool) $form_state['values'][$section]);
break;
case 'exposed_form':
$exposed_form = $this->getOption('exposed_form');
if ($exposed_form['type'] != $form_state['values']['exposed_form']['type']) {
$plugin = Views::pluginManager('exposed_form')->createInstance($form_state['values']['exposed_form']['type']);
if ($plugin) {
$exposed_form = array('type' => $form_state['values']['exposed_form']['type'], 'options' => array());
$this->setOption('exposed_form', $exposed_form);
if ($plugin->usesOptions()) {
$form_state['view']->addFormToStack('display', $this->display['id'], 'exposed_form_options');
}
}
}
break;
case 'exposed_form_options':
$plugin = $this->getPlugin('exposed_form');
if ($plugin) {
$exposed_form = $this->getOption('exposed_form');
$plugin->submitOptionsForm($form['exposed_form_options'], $form_state);
$exposed_form['options'] = $form_state['values'][$section];
$this->setOption('exposed_form', $exposed_form);
}
break;
case 'pager':
$pager = $this->getOption('pager');
if ($pager['type'] != $form_state['values']['pager']['type']) {
$plugin = Views::pluginManager('pager')->createInstance($form_state['values']['pager']['type']);
if ($plugin) {
// Because pagers have very similar options, let's allow pagers to
// try to carry the options over.
$plugin->init($this->view, $this, $pager['options']);
$pager = array('type' => $form_state['values']['pager']['type'], 'options' => $plugin->options);
$this->setOption('pager', $pager);
if ($plugin->usesOptions()) {
$form_state['view']->addFormToStack('display', $this->display['id'], 'pager_options');
}
}
}
break;
case 'pager_options':
$plugin = $this->getPlugin('pager');
if ($plugin) {
$pager = $this->getOption('pager');
$plugin->submitOptionsForm($form['pager_options'], $form_state);
$pager['options'] = $form_state['values'][$section];
$this->setOption('pager', $pager);
}
break;
}
foreach ($this->extender as $extender) {
$extender->submitOptionsForm($form, $form_state);
}
}
/**
* If override/revert was clicked, perform the proper toggle.
*/
public function optionsOverride($form, &$form_state) {
$this->setOverride($form_state['section']);
}
/**
* Flip the override setting for the given section.
*
* @param string $section
* Which option should be marked as overridden, for example "filters".
* @param bool $new_state
* Select the new state of the option.
* - TRUE: Revert to default.
* - FALSE: Mark it as overridden.
*/
public function setOverride($section, $new_state = NULL) {
$options = $this->defaultableSections($section);
if (!$options) {
return;
}
if (!isset($new_state)) {
$new_state = empty($this->options['defaults'][$section]);
}
// For each option that is part of this group, fix our settings.
foreach ($options as $option) {
if ($new_state) {
// Revert to defaults.
unset($this->options[$option]);
unset($this->display['display_options'][$option]);
}
else {
// copy existing values into our display.
$this->options[$option] = $this->getOption($option);
$this->display['display_options'][$option] = $this->options[$option];
}
$this->options['defaults'][$option] = $new_state;
$this->display['display_options']['defaults'][$option] = $new_state;
}
}
/**
* Inject anything into the query that the display handler needs.
*/
public function query() {
foreach ($this->extender as $extender) {
$extender->query();
}
}
/**
* Not all display plugins will support filtering
*
* @todo this doesn't seems to be used
*/
public function renderFilters() { }
/**
* Not all display plugins will suppert pager rendering.
*/
public function renderPager() {
return TRUE;
}
/**
* Render the 'more' link
*/
public function renderMoreLink() {
if ($this->usesMore() && ($this->useMoreAlways() || (!empty($this->view->pager) && $this->view->pager->has_more_records()))) {
$path = $this->getPath();
if ($this->getOption('link_display') == 'custom_url' && $override_path = $this->getOption('link_url')) {
$tokens = $this->getArgumentsTokens();
$path = strtr($override_path, $tokens);
}
if ($path) {
if (empty($override_path)) {
$path = $this->view->getUrl(NULL, $path);
}
$url_options = array();
if (!empty($this->view->exposed_raw_input)) {
$url_options['query'] = $this->view->exposed_raw_input;
}
$theme = views_theme_functions('views_more', $this->view, $this->view->display_handler->display);
$path = check_url(url($path, $url_options));
return theme($theme, array('more_url' => $path, 'link_text' => check_plain($this->useMoreText()), 'view' => $this->view));
}
}
}
/**
* If this display creates a page with a menu item, implement it here.
*
* @param array $callbacks
* An array of already existing menu items provided by drupal.
*
* @return array
* The menu router items registers for this display.
*
* @see hook_menu()
*/
public function executeHookMenu($callbacks) {
return array();
}
/**
* Render this display.
*/
public function render() {
$element = array(
'#theme' => $this->themeFunctions(),
'#view' => $this->view,
);
$element['#attached'] = &$this->view->element['#attached'];
return $element;
}
/**
* Render one of the available areas.
*
* @param string $area
* Identifier of the specific area to render.
* @param bool $empty
* (optional) Indicator whether or not the view result is empty. Defaults to
* FALSE
*
* @return array
* A render array for the given area.
*/
public function renderArea($area, $empty = FALSE) {
$return = array();
foreach ($this->getHandlers($area) as $key => $area_handler) {
$return[$key] = $area_handler->render($empty);
}
return $return;
}
/**
* Determine if the user has access to this display of the view.
*/
public function access($account = NULL) {
if (!isset($account)) {
global $user;
$account = $user;
}
// Full override.
if (user_access('access all views', $account)) {
return TRUE;
}
$plugin = $this->getPlugin('access');
if ($plugin) {
return $plugin->access($account);
}
// fallback to all access if no plugin.
return TRUE;
}
/**
* Set up any variables on the view prior to execution. These are separated
* from execute because they are extremely common and unlikely to be
* overridden on an individual display.
*/
public function preExecute() {
$this->view->setAjaxEnabled($this->ajaxEnabled());
if ($this->usesMore() && !$this->useMoreAlways()) {
$this->view->get_total_rows = TRUE;
}
$this->view->initHandlers();
if ($this->usesExposed()) {
$exposed_form = $this->getPlugin('exposed_form');
$exposed_form->pre_execute();
}
foreach ($this->extender as $extender) {
$extender->pre_execute();
}
$this->view->setShowAdminLinks($this->getOption('show_admin_links'));
}
/**
* When used externally, this is how a view gets run and returns
* data in the format required.
*
* The base class cannot be executed.
*/
public function execute() { }
/**
* Fully render the display for the purposes of a live preview or
* some other AJAXy reason.
*/
function preview() {
return $this->view->render();
}
/**
* Returns the display type that this display requires.
*
* This can be used for filtering views plugins. E.g. if a plugin category of
* 'foo' is specified, only plugins with no 'types' declared or 'types'
* containing 'foo'. If you have a type of bar, this plugin will not be used.
* This is applicable for style, row, access, cache, and exposed_form plugins.
*
* @return string
* The required display type. Defaults to 'normal'.
*
* @see views_fetch_plugin_names()
*/
protected function getType() {
return 'normal';
}
/**
* Make sure the display and all associated handlers are valid.
*
* @return
* Empty array if the display is valid; an array of error strings if it is not.
*/
public function validate() {
$errors = array();
// Make sure displays that use fields HAVE fields.
if ($this->usesFields()) {
$fields = FALSE;
foreach ($this->getHandlers('field') as $field) {
if (empty($field->options['exclude'])) {
$fields = TRUE;
}
}
if (!$fields) {
$errors[] = t('Display "@display" uses fields but there are none defined for it or all are excluded.', array('@display' => $this->display['display_title']));
}
}
if ($this->hasPath() && !$this->getOption('path')) {
$errors[] = t('Display "@display" uses a path but the path is undefined.', array('@display' => $this->display['display_title']));
}
// Validate style plugin
$style = $this->getPlugin('style');
if (empty($style)) {
$errors[] = t('Display "@display" has an invalid style plugin.', array('@display' => $this->display['display_title']));
}
else {
$result = $style->validate();
if (!empty($result) && is_array($result)) {
$errors = array_merge($errors, $result);
}
}
// Validate query plugin.
$query = $this->getPlugin('query');
$result = $query->validate();
if (!empty($result) && is_array($result)) {
$errors = array_merge($errors, $result);
}
// Validate handlers
foreach (ViewExecutable::viewsHandlerTypes() as $type => $info) {
foreach ($this->getHandlers($type) as $handler) {
$result = $handler->validate();
if (!empty($result) && is_array($result)) {
$errors = array_merge($errors, $result);
}
}
}
return $errors;
}
/**
* Reacts on deleting a display.
*/
public function remove() {
}
/**
* Check if the provided identifier is unique.
*
* @param string $id
* The id of the handler which is checked.
* @param string $identifier
* The actual get identifier configured in the exposed settings.
*
* @return bool
* Returns whether the identifier is unique on all handlers.
*
*/
public function isIdentifierUnique($id, $identifier) {
foreach (ViewExecutable::viewsHandlerTypes() as $type => $info) {
foreach ($this->getHandlers($type) as $key => $handler) {
if ($handler->canExpose() && $handler->isExposed()) {
if ($handler->isAGroup()) {
if ($id != $key && $identifier == $handler->options['group_info']['identifier']) {
return FALSE;
}
}
else {
if ($id != $key && $identifier == $handler->options['expose']['identifier']) {
return FALSE;
}
}
}
}
}
return TRUE;
}
/**
* Provide the block system with any exposed widget blocks for this display.
*/
public function getSpecialBlocks() {
$blocks = array();
if ($this->usesExposedFormInBlock()) {
$delta = '-exp-' . $this->view->storage->id() . '-' . $this->display['id'];
$desc = t('Exposed form: @view-@display_id', array('@view' => $this->view->storage->id(), '@display_id' => $this->display['id']));
$blocks[$delta] = array(
'info' => $desc,
'cache' => DRUPAL_NO_CACHE,
);
}
return $blocks;
}
/**
* Render the exposed form as block.
*
* @return string|NULL
* The rendered exposed form as string or NULL otherwise.
*/
public function viewExposedFormBlocks() {
// avoid interfering with the admin forms.
if (arg(0) == 'admin' && arg(1) == 'structure' && arg(2) == 'views') {
return;
}
$this->view->initHandlers();
if ($this->usesExposed() && $this->getOption('exposed_block')) {
$exposed_form = $this->getPlugin('exposed_form');
return $exposed_form->render_exposed_form(TRUE);
}
}
/**
* Provide some helpful text for the arguments.
* The result should contain of an array with
* - filter value present: The title of the fieldset in the argument
* where you can configure what should be done with a given argument.
* - filter value not present: The tiel of the fieldset in the argument
* where you can configure what should be done if the argument does not
* exist.
* - description: A description about how arguments comes to the display.
* For example blocks don't get it from url.
*/
public function getArgumentText() {
return array(
'filter value not present' => t('When the filter value is <em>NOT</em> available'),
'filter value present' => t('When the filter value <em>IS</em> available or a default is provided'),
'description' => t("This display does not have a source for contextual filters, so no contextual filter value will be available unless you select 'Provide default'."),
);
}
/**
* Provide some helpful text for pagers.
*
* The result should contain of an array within
* - items per page title
*/
public function getPagerText() {
return array(
'items per page title' => t('Items to display'),
'items per page description' => t('Enter 0 for no limit.')
);
}
}
/**
* @}
*/
| eugenesia/eugenesia.co.uk | core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php | PHP | gpl-2.0 | 93,395 |
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>basic_datagram_socket::cancel (2 of 2 overloads)</title>
<link rel="stylesheet" href="../../../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
<link rel="start" href="../../../../boost_asio.html" title="Boost.Asio">
<link rel="up" href="../cancel.html" title="basic_datagram_socket::cancel">
<link rel="prev" href="overload1.html" title="basic_datagram_socket::cancel (1 of 2 overloads)">
<link rel="next" href="../close.html" title="basic_datagram_socket::close">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="overload1.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../cancel.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../boost_asio.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../close.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h5 class="title">
<a name="boost_asio.reference.basic_datagram_socket.cancel.overload2"></a><a class="link" href="overload2.html" title="basic_datagram_socket::cancel (2 of 2 overloads)">
basic_datagram_socket::cancel (2 of 2 overloads)</a>
</h5></div></div></div>
<p>
<span class="emphasis"><em>Inherited from basic_socket.</em></span>
</p>
<p>
Cancel all asynchronous operations associated with the socket.
</p>
<pre class="programlisting"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="identifier">cancel</span><span class="special">(</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&</span> <span class="identifier">ec</span><span class="special">);</span>
</pre>
<p>
This function causes all outstanding asynchronous connect, send and receive
operations to finish immediately, and the handlers for cancelled operations
will be passed the boost::asio::error::operation_aborted error.
</p>
<a name="boost_asio.reference.basic_datagram_socket.cancel.overload2.parameters"></a><h6>
<a name="id2900664"></a>
<a class="link" href="overload2.html#boost_asio.reference.basic_datagram_socket.cancel.overload2.parameters">Parameters</a>
</h6>
<div class="variablelist">
<p class="title"><b></b></p>
<dl>
<dt><span class="term">ec</span></dt>
<dd><p>
Set to indicate what error occurred, if any.
</p></dd>
</dl>
</div>
<a name="boost_asio.reference.basic_datagram_socket.cancel.overload2.remarks"></a><h6>
<a name="id2900705"></a>
<a class="link" href="overload2.html#boost_asio.reference.basic_datagram_socket.cancel.overload2.remarks">Remarks</a>
</h6>
<p>
Calls to cancel() will always fail with boost::asio::error::operation_not_supported
when run on Windows XP, Windows Server 2003, and earlier versions of
Windows, unless BOOST_ASIO_ENABLE_CANCELIO is defined. However, the CancelIo
function has two issues that should be considered before enabling its
use:
</p>
<div class="itemizedlist"><ul type="disc">
<li>
It will only cancel asynchronous operations that were initiated in
the current thread.
</li>
<li>
It can appear to complete without error, but the request to cancel
the unfinished operations may be silently ignored by the operating
system. Whether it works or not seems to depend on the drivers that
are installed.
</li>
</ul></div>
<p>
For portable cancellation, consider using one of the following alternatives:
</p>
<div class="itemizedlist"><ul type="disc">
<li>
Disable asio's I/O completion port backend by defining BOOST_ASIO_DISABLE_IOCP.
</li>
<li>
Use the close() function to simultaneously cancel the outstanding operations
and close the socket.
</li>
</ul></div>
<p>
When running on Windows Vista, Windows Server 2008, and later, the CancelIoEx
function is always used. This function does not have the problems described
above.
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003 - 2008 Christopher M. Kohlhoff<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="overload1.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../cancel.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../boost_asio.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../close.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>
| scs/uclinux | lib/boost/boost_1_38_0/doc/html/boost_asio/reference/basic_datagram_socket/cancel/overload2.html | HTML | gpl-2.0 | 6,346 |
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
<title>PHPXRef 0.7.1 : Unnamed Project : Function Reference: create_relations()</title>
<link rel="stylesheet" href="../sample.css" type="text/css">
<link rel="stylesheet" href="../sample-print.css" type="text/css" media="print">
<style id="hilight" type="text/css"></style>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
</head>
<body bgcolor="#ffffff" text="#000000" link="#801800" vlink="#300540" alink="#ffffff">
<table class="pagetitle" width="100%">
<tr>
<td valign="top" class="pagetitle">
[ <a href="../index.html">Index</a> ]
</td>
<td align="right" class="pagetitle">
<h2 style="margin-bottom: 0px">PHP Cross Reference of Unnamed Project</h2>
</td>
</tr>
</table>
<!-- Generated by PHPXref 0.7.1 at Sat Nov 21 22:13:19 2015 -->
<!-- PHPXref (c) 2000-2010 Gareth Watts - [email protected] -->
<!-- http://phpxref.sourceforge.net/ -->
<script src="../phpxref.js" type="text/javascript"></script>
<script language="JavaScript" type="text/javascript">
<!--
ext='.html';
relbase='../';
subdir='_functions';
filename='index.html';
cookiekey='phpxref';
handleNavFrame(relbase, subdir, filename);
logFunction('create_relations');
// -->
</script>
<script language="JavaScript" type="text/javascript">
if (gwGetCookie('xrefnav')=='off')
document.write('<p class="navlinks">[ <a href="javascript:navOn()">Show Explorer<\/a> ]<\/p>');
else
document.write('<p class="navlinks">[ <a href="javascript:navOff()">Hide Explorer<\/a> ]<\/p>');
</script>
<noscript>
<p class="navlinks">
[ <a href="../nav.html" target="_top">Show Explorer</a> ]
[ <a href="index.html" target="_top">Hide Navbar</a> ]
</p>
</noscript>
[<a href="../index.html">Top level directory</a>]<br>
<script language="JavaScript" type="text/javascript">
<!--
document.writeln('<table align="right" class="searchbox-link"><tr><td><a class="searchbox-link" href="javascript:void(0)" onMouseOver="showSearchBox()">Search</a><br>');
document.writeln('<table border="0" cellspacing="0" cellpadding="0" class="searchbox" id="searchbox">');
document.writeln('<tr><td class="searchbox-title">');
document.writeln('<a class="searchbox-title" href="javascript:showSearchPopup()">Search History +</a>');
document.writeln('<\/td><\/tr>');
document.writeln('<tr><td class="searchbox-body" id="searchbox-body">');
document.writeln('<form name="search" style="margin:0px; padding:0px" onSubmit=\'return jump()\'>');
document.writeln('<a class="searchbox-body" href="../_classes/index.html">Class<\/a>: ');
document.writeln('<input type="text" size=10 value="" name="classname"><br>');
document.writeln('<a id="funcsearchlink" class="searchbox-body" href="../_functions/index.html">Function<\/a>: ');
document.writeln('<input type="text" size=10 value="" name="funcname"><br>');
document.writeln('<a class="searchbox-body" href="../_variables/index.html">Variable<\/a>: ');
document.writeln('<input type="text" size=10 value="" name="varname"><br>');
document.writeln('<a class="searchbox-body" href="../_constants/index.html">Constant<\/a>: ');
document.writeln('<input type="text" size=10 value="" name="constname"><br>');
document.writeln('<a class="searchbox-body" href="../_tables/index.html">Table<\/a>: ');
document.writeln('<input type="text" size=10 value="" name="tablename"><br>');
document.writeln('<input type="submit" class="searchbox-button" value="Search">');
document.writeln('<\/form>');
document.writeln('<\/td><\/tr><\/table>');
document.writeln('<\/td><\/tr><\/table>');
// -->
</script>
<div id="search-popup" class="searchpopup"><p id="searchpopup-title" class="searchpopup-title">title</p><div id="searchpopup-body" class="searchpopup-body">Body</div><p class="searchpopup-close"><a href="javascript:gwCloseActive()">[close]</a></p></div>
<h3>Function and Method Cross Reference</h3>
<h2><a href="index.html#create_relations">create_relations()</a></h2>
<b>Defined at:</b><ul>
<li><a href="../install/_functions_install.php.html#create_relations">/install/_functions_install.php</a> -> <a onClick="logFunction('create_relations', '/install/_functions_install.php.source.html#l781')" href="../install/_functions_install.php.source.html#l781"> line 781</a></li>
</ul>
<b>No references found.</b><br><br>
</ul>
<!-- A link to the phpxref site in your customized footer file is appreciated ;-) -->
<br><hr>
<table width="100%">
<tr><td>Generated: Sat Nov 21 22:13:19 2015</td>
<td align="right"><i>Cross-referenced by <a href="http://phpxref.sourceforge.net/">PHPXref 0.7.1</a></i></td>
</tr>
</table>
</body></html>
| mgsolipa/b2evolution_phpxref | _functions/create_relations.html | HTML | gpl-2.0 | 4,719 |
<?php
namespace Nutri\IngredientBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
use Nutri\IngredientBundle\Entity\Ingredient;
use Nutri\IngredientBundle\Form\IngredientType;
/**
* Ingredient controller.
*
* @Route("/ingredient")
*/
class IngredientController extends Controller
{
/** ************************************************************************
* Display the Ingredient's homepage.
* @Route("/{currentPageNumber}", requirements={"currentPageNumber" = "\d+"}, defaults={"currentPageNumber" = 1})
**************************************************************************/
public function homeAction($currentPageNumber)
{
$maxIngredients = 20;
$ingredientsCount = $this->getDoctrine()
->getRepository('NutriIngredientBundle:Ingredient')
->countTotal();
$pagination = array(
'page' => $currentPageNumber,
'route' => 'nutri_ingredient_ingredient_home',
'pages_count' => ceil($ingredientsCount / $maxIngredients),
'route_params' => array()
);
$ingredients = $this->getDoctrine()->getRepository('NutriIngredientBundle:Ingredient')
->getList($currentPageNumber, $maxIngredients);
return $this->render('NutriIngredientBundle:Ingredient:home.html.twig', array(
'ingredients' => $ingredients,
'pagination' => $pagination
));
}
/** ************************************************************************
* Create a new Ingredient according to the information given in the form.
* @Route("/add")
**************************************************************************/
public function addAction()
{
$ingredient = new Ingredient();
$form = $this->createForm(new IngredientType(), $ingredient);
// ------------- Request Management ------------------------------------
$request = $this->get('request');
if ($request->getMethod() == 'POST') {
$form->bind($request);// Link Request and Form
if ($form->isValid()) {
$em = $this->getDoctrine()->getManager();
$em->persist($ingredient);
$em->flush();
return $this->redirect($this->generateUrl('nutri_ingredient_ingredient_see', array('ingredient_id' => $ingredient->getId())));
}
}
return $this->render('NutriIngredientBundle:Ingredient:add.html.twig', array(
'form' => $form->createView(),
));
}
/** ************************************************************************
* Display a Ingredient
* @param Ingredient $ingredient
* @ParamConverter("ingredient", options={"mapping": {"ingredient_id": "id"}})
* @Route("/see/{ingredient_id}", requirements={"ingredient_id" = "\d+"})
**************************************************************************/
public function seeAction(Ingredient $ingredient)
{
return $this->render('NutriIngredientBundle:Ingredient:see.html.twig', array(
'ingredient' => $ingredient,
));
}
/** ************************************************************************
* Modify a Ingredient according to the information given in the form.
*
* @param Ingredient $ingredient
* @ParamConverter("ingredient", options={"mapping": {"ingredient_id": "id"}})
* @Route("/modify/{ingredient_id}", requirements={"ingredient_id" = "\d+"})
**************************************************************************/
public function modifyAction(Ingredient $ingredient)
{
$form = $this->createForm(new IngredientType($ingredient), $ingredient);
// ------------- Request Management ------------------------------------
$request = $this->get('request');
if ($request->getMethod() == 'POST') {
$form->bind($request); // Link Request and Form
if ($form->isValid()) {
$em = $this->getDoctrine()->getManager();
$em->persist($ingredient);
$em->flush();
return $this->redirect($this->generateUrl('nutri_ingredient_ingredient_see', array('ingredient_id' => $ingredient->getId())));
}
}
return $this->render('NutriIngredientBundle:Ingredient:modify.html.twig', array(
'ingredient' => $ingredient,
'form' => $form->createView(),
));
}
/** ************************************************************************
* Delete a Ingredient.
*
* @param Ingredient $ingredient
* @ParamConverter("ingredient", options={"mapping": {"ingredient_id": "id"}})
* @Route("/delete/{ingredient_id}", requirements={"ingredient_id" = "\d+"})
**************************************************************************/
public function deleteAction(Ingredient $ingredient)
{
$request = $this->get('request');
if ($request->getMethod() == 'POST') {
$em = $this->getDoctrine()->getManager();
$em->remove($ingredient);
$em->flush();
return $this->redirect($this->generateUrl(/* Redirect to some page */));
}
else{
throw new \Symfony\Component\Security\Core\Exception\AccessDeniedException;
}
}
/** ************************************************************************
* Ajax function.
*
* @Route("/search")
* @Method({"POST","GET"})
**************************************************************************/
public function searchAction()
{
$name = $this->get('request')->request->get('name');
$nameStringArray = explode(' ',$name);
$searchInCiqual = ($this->get('request')->request->get('ciqual') === 'true');
$searchInOpenFoodFact = ($this->get('request')->request->get('openfoodfact') === 'true');
$em = $this->getDoctrine()->getManager();
$qb = $em->createQueryBuilder();
$qb->select('i');
$qb->from("NutriIngredientBundle:Ingredient",'i');
foreach($nameStringArray as $key=>$nameString) {
$qb->andWhere($qb->expr()->like('i.name', ':nameSearched_'.$key));
$qb->setParameter(':nameSearched_'.$key, '%'.$nameString.'%');
}
if(!$searchInCiqual) {
$qb->andWhere($qb->expr()->isNull('i.ciqualcode'));
}
if(!$searchInOpenFoodFact) {
$qb->andWhere($qb->expr()->isNull('i.barcode'));
}
$qb->orderBy('i.name');
$ingredientArray = $qb->getQuery()->getResult(\Doctrine\ORM\Query::HYDRATE_ARRAY);
return $this->render('NutriIngredientBundle:Ingredient:searchResultDisplay.html.twig', array(
'ingredients' => $ingredientArray,
));
}
}
| blacksad12/oliorga | src/Nutri/IngredientBundle/Controller/IngredientController.php | PHP | gpl-2.0 | 7,210 |
class Java::Util::ArrayList < Array
overload_protected {
include Java::Util::JavaList
}
class Iterator
def initialize(array, from_index = 0, to_index = nil)
@array = array
@index = from_index
@to_index = to_index || @array.size
end
def has_next
@index < @to_index
end
def next_
entry = @array[@index]
@index += 1
entry
end
def remove
@index -= 1
@to_index -= 1
@array.delete_at @index
end
end
class SubList
def initialize(parent_list, from_index, to_index)
@parent_list = parent_list
@from_index = from_index
@to_index = to_index
end
def size
@to_index - @from_index
end
def iterator
Iterator.new @parent_list, @from_index, @to_index
end
end
def initialize(data = nil)
case data
when nil
# do nothing
when Array
self.concat data
when Integer
# initial capacity, ignored
else
raise ArgumentError
end
end
alias_method :add, :<<
alias_method :get, :[]
alias_method :contains, :include?
alias_method :is_empty, :empty?
def add(a1, a2 = nil)
if a2
self.insert a1, a2
else
self << a1
end
end
def remove(o)
if o.is_a? Integer
delete_at o
else
delete o
end
end
def index_of(e)
index(e) || -1
end
def to_a
self
end
def to_array(target_array = nil)
target_array ||= Array.typed(Object).new
if target_array.size <= self.size
target_array.replace self
else
target_array[0, self.size] = self
target_array[self.size] = nil
end
target_array
end
def iterator
Iterator.new self
end
def sub_list(from_index, to_index)
SubList.new self, from_index, to_index
end
def remove_all(list)
delete_if { |item| list.include? item }
end
end
| neelance/jre4ruby | jre4ruby/rep/java/util/ArrayList.rb | Ruby | gpl-2.0 | 1,889 |
<?php
function ___main___()
{
$descriptor = json_decode(file_get_contents(dirname(dirname(dirname(dirname(dirname($_SERVER['SCRIPT_FILENAME']))))) . '/program.json'), true);
$versions = json_decode(file_get_contents(dirname(dirname(dirname(dirname(dirname(__FILE__))))) . '/workspace/packages/test/etc/versions.json'), true);
$urls = json_decode(file_get_contents(dirname(dirname(dirname(dirname(dirname(__FILE__))))) . '/workspace/packages/test/etc/urls.json'), true);
$url = str_replace('%%VERSION%%', $versions['ZendFramework'][$descriptor['implements']['github.com/firephp/firephp/workspace/packages/test/0.1']['dependencies']['ZendFramework']], $urls['ZendFramework']);
$path = dirname(dirname(dirname(dirname(dirname(__FILE__))))) . '/workspace/.pinf-packages/downloads/packages/' . substr($url, strpos($url, '/') + 2) . "~pkg/library";
set_include_path('.' . PATH_SEPARATOR . $path);
date_default_timezone_set('America/Vancouver');
}
___main___();
// @see http://framework.zend.com/manual/1.11/en/learning.autoloading.usage.html
require_once 'Zend/Loader/Autoloader.php';
Zend_Loader_Autoloader::getInstance();
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Wildfire
* @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
/* NOTE: You must have Zend Framework in your include path! */
/*
* Add our Firebug Log Writer to the registry
*/
require_once 'Zend/Registry.php';
require_once 'Zend/Log.php';
require_once 'Zend/Log/Writer/Firebug.php';
$writer = new Zend_Log_Writer_Firebug();
$writer->setPriorityStyle(8, 'TABLE');
$writer->setPriorityStyle(9, 'TRACE');
$logger = new Zend_Log($writer);
$logger->addPriority('TABLE', 8);
$logger->addPriority('TRACE', 9);
Zend_Registry::set('logger',$logger);
/*
* Add our Firebug DB Profiler to the registry
*/
require_once 'Zend/Db.php';
require_once 'Zend/Db/Profiler/Firebug.php';
$profiler = new Zend_Db_Profiler_Firebug('All DB Queries');
$db = Zend_Db::factory('PDO_SQLITE',
array('dbname' => ':memory:',
'profiler' => $profiler));
$db->getProfiler()->setEnabled(true);
Zend_Registry::set('db',$db);
/*
* Run the front controller
*/
require_once 'Zend/Controller/Front.php';
Zend_Controller_Front::run(dirname(dirname(__FILE__)).'/application/controllers');
| kennaisom/mk9 | firephp-master/tests/zendframework/demo/public/index.php | PHP | gpl-2.0 | 2,893 |
<div id="page-wrapper" >
<div id="page-inner">
<!-- Row de Titulos -->
<div class="row">
<div class="col-lg-6">
<div class="input-group">
<input type="text" class="form-control" placeholder="Buscar por Palabras Clave">
<span class="input-group-btn">
<button class="btn btn-default glyphicon glyphicon-search" type="button"></button>
</span>
</div>
</div>
<br />
<hr />
<!-- paginacion de videos -->
<div class="col-md-12">
<?php
if ($material){
echo $material;
}
else {
echo 'No Hay Nada Que Mostrar';
}
?>
</div>
<br />
<div align='center' class="col-sm-6 col-md-12">
<?=$pagination?>
</div>
<!-- END paginacion de videos -->
<!-- /. row -->
</div>
<!-- /. PAGE INNER -->
</div> | vanichel/Biblioteca-Virtual | application/views/wrapper/view_categoria_material.php | PHP | gpl-2.0 | 865 |
using NPOI.HSSF.UserModel;
using NPOI.HSSF.Util;
using NPOI.SS.UserModel;
using NPOI.XSSF.UserModel;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Web;
namespace NoRain.Toolkits
{
public class XMLOutputTool
{
private static Type[] _valueTypes = new[] { typeof(bool),typeof(byte),typeof(sbyte),typeof(char) ,typeof(decimal),
typeof(double),typeof(float),typeof(int),typeof(uint),typeof(long),typeof(ulong),typeof(object),typeof(short),typeof(ushort),typeof(string)};
private static Type[] _numTypes = new[] {typeof(byte),typeof(sbyte) ,typeof(decimal),
typeof(double),typeof(float),typeof(int),typeof(uint),typeof(long),typeof(ulong),typeof(short),typeof(ushort)};
/// <summary>
/// 导出数据为Excel文件
/// </summary>
/// <param name="items">数据源</param>
public static void HandleItems<T>(IEnumerable<T> items, string tabelName) where T : class
{
var response = HttpContext.Current.Response;
string filename = "test.xlsx";
response.Clear();
response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
response.AddHeader("Content-Disposition", string.Format("attachment;filename={0}", filename));
XSSFWorkbook workbook = new XSSFWorkbook();
ISheet sheet1 = workbook.CreateSheet("Sheet1");
if (items == null || items.Count() == 0)
{
response.Write("无相关记录");
response.Flush();
response.End();
}
var item = items.ToList()[0];
Type t = item.GetType();
var fields = t.GetFields();
var properties = t.GetProperties();
ICellStyle style = workbook.CreateCellStyle();
style.Alignment = HorizontalAlignment.Center;
IFont font = workbook.CreateFont();
font.FontHeightInPoints = 12;
font.FontHeight = 20;
font.Boldweight = 600;
style.SetFont(font);
//标题行
var titleCell = sheet1.CreateRow(0).CreateCell(0);
titleCell.SetCellValue(tabelName ?? "统计报表");
titleCell.CellStyle = style;
//合并首行标题
sheet1.AddMergedRegion(new NPOI.SS.Util.CellRangeAddress(0, 0, 0, fields.Length + properties.Length - 1));
//列名
var headRow = sheet1.CreateRow(1);
foreach (var f in fields)
{
var cell = headRow.CreateCell(fields.ToList().IndexOf(f));
cell.SetCellValue(f.Name);
}
foreach (var f in properties)
{
var cell = headRow.CreateCell(properties.ToList().IndexOf(f));
cell.SetCellValue(f.Name);
}
foreach (var obj in items)
{
var itemRow = sheet1.CreateRow(2 + items.ToList().IndexOf(obj));
foreach (var f in fields)
{ //判断单元格类型
var cellType = CellType.Blank;
//数字
if (_numTypes.Contains(f.FieldType)) cellType = CellType.Numeric;
var itemCell = itemRow.CreateCell(fields.ToList().IndexOf(f), cellType);
if (_valueTypes.Contains(f.FieldType)) itemCell.SetCellValue(f.GetValue(obj).ToString());
else if (f.GetType() == typeof(DateTime) || f.GetType() == typeof(DateTime?)) itemCell.SetCellValue(f.GetValue(obj).ToString());
}
foreach (var f in properties)
{
//判断单元格类型
var cellType = CellType.Blank;
//数字
if (_numTypes.Contains(f.PropertyType)) cellType = CellType.Numeric;
////日期
//else if (f.GetType() == typeof(DateTime) || f.GetType() == typeof(DateTime?)) cellType=CellType.d;
var itemCell = itemRow.CreateCell(fields.Length + properties.ToList().IndexOf(f), cellType);
if (_valueTypes.Contains(f.PropertyType)) itemCell.SetCellValue(f.GetValue(obj, null).ToString());
else if (f.GetType() == typeof(DateTime) || f.GetType() == typeof(DateTime?)) itemCell.SetCellValue(f.GetValue(obj, null).ToString());
}
}
using (var f = File.Create(@"d:\test.xlsx"))
{
workbook.Write(f);
}
response.WriteFile(@"d:\test.xlsx");
//http://social.msdn.microsoft.com/Forums/en-US/3a7bdd79-f926-4a5e-bcb0-ef81b6c09dcf/responseoutputstreamwrite-writes-all-but-insetrs-a-char-every-64k?forum=ncl
//workbook.Write(Response.OutputStream); cannot be used
//root cause: Response.OutputStream will insert unnecessary byte into the response bytes.
response.Flush();
response.End();
}
/// <summary>
/// 导出数据为Excel文件
/// </summary>
/// <param name="items">数据源</param>
/// <param name="nameFields">列对应的名称</param>
public static void HandleItems(IEnumerable<dynamic> items, Dictionary<string, string> nameFields)
{
}
}
}
| DonnotRain/NoRainWeb | Code/NoRain.Toolkits/Export/XMLOutputTool.cs | C# | gpl-2.0 | 5,480 |
#region License
// Copyright (c) 2007 James Newton-King
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use,
// copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following
// conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
using System;
using System.Reflection;
using HazTech.Json.Utilities;
using System.Globalization;
namespace HazTech.Json.Serialization
{
/// <summary>
/// Get and set values for a <see cref="MemberInfo"/> using reflection.
/// </summary>
public class ReflectionValueProvider : IValueProvider
{
private readonly MemberInfo _memberInfo;
/// <summary>
/// Initializes a new instance of the <see cref="ReflectionValueProvider"/> class.
/// </summary>
/// <param name="memberInfo">The member info.</param>
public ReflectionValueProvider(MemberInfo memberInfo)
{
ValidationUtils.ArgumentNotNull(memberInfo, "memberInfo");
_memberInfo = memberInfo;
}
/// <summary>
/// Sets the value.
/// </summary>
/// <param name="target">The target to set the value on.</param>
/// <param name="value">The value to set on the target.</param>
public void SetValue(object target, object value)
{
try
{
ReflectionUtils.SetMemberValue(_memberInfo, target, value);
}
catch (Exception ex)
{
throw new JsonSerializationException("Error setting value to '{0}' on '{1}'.".FormatWith(CultureInfo.InvariantCulture, _memberInfo.Name, target.GetType()), ex);
}
}
/// <summary>
/// Gets the value.
/// </summary>
/// <param name="target">The target to get the value from.</param>
/// <returns>The value.</returns>
public object GetValue(object target)
{
try
{
return ReflectionUtils.GetMemberValue(_memberInfo, target);
}
catch (Exception ex)
{
throw new JsonSerializationException("Error getting value from '{0}' on '{1}'.".FormatWith(CultureInfo.InvariantCulture, _memberInfo.Name, target.GetType()), ex);
}
}
}
} | marhazk/HazTechClass | AeraClass/Newtonsoft.Json/Serialization/ReflectionValueProvider.cs | C# | gpl-2.0 | 3,187 |
// **********************************************************************
//
// Copyright (c) 2003-2014 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
#include <Ice/Ice.h>
#include <ThroughputI.h>
using namespace std;
class ThroughputServer : public Ice::Application
{
public:
virtual int run(int, char*[]);
};
int
main(int argc, char* argv[])
{
ThroughputServer app;
return app.main(argc, argv, "config.server");
}
int
ThroughputServer::run(int argc, char*[])
{
if(argc > 1)
{
cerr << appName() << ": too many arguments" << endl;
return EXIT_FAILURE;
}
Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("Throughput");
Demo::ThroughputPtr servant = new ThroughputI;
adapter->add(servant, communicator()->stringToIdentity("throughput"));
adapter->activate();
communicator()->waitForShutdown();
return EXIT_SUCCESS;
}
| dayongxie/zeroc-ice-androidndk | cpp/demo/Ice/throughput/Server.cpp | C++ | gpl-2.0 | 1,094 |
# This file shows how to program a computer to calculate
# logarithms and powers, without a calculator.
# The benefit of this method is that it does not
# require any multiplications. It can be implemented
# entirely with shift and additions. Therefore, it
# is well suited for a FPGA.
# TODO: Change the logarithms, so they are base 2 instead of base 20
# TODO: Change all floating point numbers to fixed point numbers.
# Use Newton's method to calculate square roots.
def msqrt(x)
res = 1.0;
begin
delta = (x/res - res)*0.5;
res += delta;
max_err = res * Float::EPSILON;
end while delta > max_err or delta < -max_err;
return res;
end
# This is the method used to calculate the below table of logarithms.
def make_log_2_5()
pow = 1.0;
pow_2 = (Float::DIG+1)/0.301
pow_2.to_i.times do
$log_2_5 << Math.log10(1.0+pow)
pow *= 0.5
end
end
# This table contains log_10(2), log_10(1.5), log_10(1.25), log_10(1.125), etc.
$log_2_5 = [
0.3010299956639812,
0.17609125905568124,
0.09691001300805642,
0.05115252244738129,
0.026328938722349145,
0.013363961557981502,
0.006733382658968403,
0.003379740651380597,
0.0016931580194449753,
0.0008474041359855164,
0.00042390875196115195,
0.00021200609740185334,
0.00010601598536797005,
5.30112276402169e-05,
2.6506422657881923e-05,
1.3253413550725743e-05,
6.626757332351867e-06,
3.3133913056160403e-06,
1.6566988126921545e-06,
8.283501963201243e-07,
4.141752956539506e-07,
2.0708769720049452e-07,
1.0354386094363294e-07,
5.1771933557663626e-08,
2.5885967550293695e-08,
1.2942983968012329e-08,
6.471492032222536e-09,
3.2357460281653614e-09,
1.6178730170962039e-09,
8.089365093014828e-10,
4.044682548390866e-10,
2.022341274666296e-10,
1.0111706374508637e-10,
5.055853187548608e-11,
2.5279265938478767e-11,
1.2639632969423313e-11,
6.3198164847576394e-12,
3.1599082423903154e-12,
1.5799541211980316e-12,
7.899770605997343e-13,
3.9498853030004676e-13,
1.9749426515006829e-13,
9.874713257504538e-14,
4.937356628752549e-14,
2.468678314376345e-14,
1.23433915718819e-14,
6.171695785940993e-15,
3.0858478929705076e-15,
1.5429239464852566e-15,
7.71461973242629e-16,
3.857309866213147e-16,
1.9286549331065737e-16,
9.64327466553287e-17
]
def pow_10(x)
res = 1.0
while x >= $log_2_5[0]
res *= 2.0
x -= $log_2_5[0]
end
while x < 0
res *= 0.5
x += $log_2_5[0]
end
# Now x is between 0 and log(2)
fact = 1.0
$log_2_5.each {|val|
if (x >= val)
res *= (1 + fact)
x -= val
end
fact *= 0.5
}
return res;
end
def log_10(x)
if x <= 0
return Float::NAN
end
# Now x is positive
#
res = 0.0
while x >= 2.0
x *= 0.5
res += $log_2_5[0]
end
while x < 1.0
x *= 2.0
res -= $log_2_5[0]
end
# Now x is between 1 and 2
fact = 1.0
temp = 1.0
$log_2_5.each {|delt|
temp2 = temp * (1 + fact)
if x >= temp2
temp = temp2
res += delt
end
fact *= 0.5
}
return res
end
def test_func(xmin, xmax, xstep, f1, f2)
puts "Testing in the range #{xmin} to #{xmax} in steps of #{xstep}"
max_diff = 0.0
max_x = 0.0
(0..((xmax-xmin)/xstep).to_i).each {|i|
x = i*xstep + xmin;
app = method(f1).call(x)
re = method(f2).call(x)
diff = (app - re)/re
if diff < 0
diff = -diff
end
if diff > max_diff
max_x = x
max_diff = diff
end
}
return max_x, max_diff
end
def pow_10_math(x)
return 10.0**x
end
def test_pow_10
puts "Testing pow_10"
max_x, max_diff = test_func(-5.0, 5.0, 0.001, :pow_10, :pow_10_math)
puts "#{max_x}, #{max_diff}"
end
def log_10_math(x)
return Math::log10(x)
end
def test_log_10
puts "Testing log_10"
max_x, max_diff = test_func(0.10, 100.0, 0.01, :log_10, :log_10_math)
puts "#{max_x}, #{max_diff}"
end
test_pow_10
test_log_10
| MJoergen/ruby | math/math_comp.rb | Ruby | gpl-2.0 | 4,061 |
#include "locked_queue.h" | antivo/Cluster-Manager | Cluster Manager/locked/locked_queue.cpp | C++ | gpl-2.0 | 25 |
<?php
// Just some basics.
$per_page_limit = 20;
// get all forms
$forms = Caldera_Forms::get_forms();
$forms = apply_filters( 'caldera_forms_admin_forms', $forms );
$style_includes = get_option( '_caldera_forms_styleincludes' );
if(empty($style_includes)){
$style_includes = array(
'alert' => true,
'form' => true,
'grid' => true,
);
update_option( '_caldera_forms_styleincludes', $style_includes);
}
// load fields
//$field_types = apply_filters( 'caldera_forms_get_field_types', array() );
// create user modal buttons
$modal_new_form = __('Create Form', 'caldera-forms').'|{"data-action" : "create_form", "data-active-class": "disabled", "data-load-class": "disabled", "data-callback": "new_form_redirect", "data-before" : "serialize_modal_form", "data-modal-autoclose" : "new_form" }';
?><div class="caldera-editor-header">
<ul class="caldera-editor-header-nav">
<li class="caldera-editor-logo">
<span class="dashicons-cf-logo"></span>
<?php _e('Caldera Forms', 'caldera-forms'); ?>
</li>
<li class="caldera-forms-version">
v<?php echo CFCORE_VER; ?>
</li>
<li class="caldera-forms-toolbar-item">
<a class="button ajax-trigger" data-request="start_new_form" data-modal-buttons='<?php echo $modal_new_form; ?>' data-modal-width="600" data-modal-height="400" data-load-class="none" data-modal="new_form" data-modal-title="<?php echo __('Create New Form', 'caldera-forms'); ?>" data-template="#new-form-tmpl"><?php echo __('New Form', 'caldera-forms'); ?></a>
</li>
<li class="caldera-forms-toolbar-item">
<a class="button ajax-trigger" data-request="start_new_form" data-modal-width="400" data-modal-height="192" data-modal-element="div" data-load-class="none" data-modal="new_form" data-template="#import-form-tmpl" data-modal-title="<?php echo __('Import Form', 'caldera-forms'); ?>" ><?php echo __('Import', 'caldera-forms'); ?></a>
</li>
<li class="caldera-forms-toolbar-item">
</li>
<li class="caldera-forms-headtext">
<?php echo __('Front-end Style Includes', 'caldera-forms'); ?>
</li>
<li class="caldera-forms-toolbar-item">
<div class="toggle_option_preview">
<button type="button" title="<?php echo __('Includes Bootstrap 3 styles on the frontend for form alert notices', 'caldera-forms'); ?>" data-action="save_cf_setting" data-active-class="none" data-set="alert" data-callback="update_setting_toggle" class="ajax-trigger setting_toggle_alert button <?php if(!empty($style_includes['alert'])){ ?>button-primary<?php } ?>"><?php echo __('Alert' , 'caldera-forms'); ?></button>
<button type="button" title="<?php echo __('Includes Bootstrap 3 styles on the frontend for form fields and buttons', 'caldera-forms'); ?>" data-action="save_cf_setting" data-active-class="none" data-set="form" data-callback="update_setting_toggle" class="ajax-trigger setting_toggle_form button <?php if(!empty($style_includes['form'])){ ?>button-primary<?php } ?>"><?php echo __('Form' , 'caldera-forms'); ?></button>
<button type="button" title="<?php echo __('Includes Bootstrap 3 styles on the frontend for form grid layouts', 'caldera-forms'); ?>" data-action="save_cf_setting" data-active-class="none" data-set="grid" data-callback="update_setting_toggle" class="ajax-trigger setting_toggle_grid button <?php if(!empty($style_includes['grid'])){ ?>button-primary<?php } ?>"><?php echo __('Grid' , 'caldera-forms'); ?></button>
</div>
</li>
<li class="caldera-forms-toolbar-item">
</li>
</ul>
</div>
<div class="form-admin-page-wrap">
<div class="form-panel-wrap">
<?php if(!empty($forms)){ ?>
<table class="widefat fixed">
<thead>
<tr>
<th><?php _e('Form', 'caldera-forms'); ?></th>
<th style="width:5em; text-align:center;"><?php _e('Entries', 'caldera-forms'); ?></th>
</tr>
</thead>
<tbody>
<?php
global $wpdb;
$class = "alternate";
foreach($forms as $form_id=>$form){
if( !empty( $form['hidden'] ) ){
continue;
}
if(!empty($form['db_support'])){
$total = $wpdb->get_var($wpdb->prepare("SELECT COUNT(`id`) AS `total` FROM `" . $wpdb->prefix . "cf_form_entries` WHERE `form_id` = %s && `status` = 'active';", $form_id));
}else{
$total = __('Disabled', 'caldera-forms');
}
?>
<tr id="form_row_<?php echo $form_id; ?>" class="<?php echo $class; ?> form_entry_row">
<td class="<?php if( !empty( $form['form_draft'] ) ) { echo 'draft-form'; }else{ echo 'active-form'; } ?>">
<?php echo $form['name']; ?>
<?php if( !empty( $form['debug_mailer'] ) ) { ?>
<span style="color: rgb(207, 0, 0);" class="description"><?php _e('Mailer Debug enabled.', 'caldera-forms') ;?></span>
<?php } ?>
<div class="row-actions">
<?php if( empty( $form['_external_form'] ) ){ ?><span class="edit"><a class="form-control" href="admin.php?page=caldera-forms&edit=<?php echo $form_id; ?>"><?php echo __('Edit'); ?></a> | </span>
<span class="edit"><a class="form-control ajax-trigger" href="#entres"
data-load-element="#form_row_<?php echo $form_id; ?>"
data-action="toggle_form_state"
data-active-element="#form_row_<?php echo $form_id; ?>"
data-callback="set_form_state"
data-form="<?php echo $form_id; ?>"
><?php if( !empty( $form['form_draft'] ) ) { echo __('Activate', 'caldera-forms'); }else{ echo __('Deactivate', 'caldera-forms'); } ?></a> | </span><?php } ?>
<?php if(!empty($form['db_support'])){ ?><span class="edit"><a class="form-control form-entry-trigger ajax-trigger" href="#entres"
data-action="browse_entries"
data-target="#form-entries-viewer"
data-form="<?php echo $form_id; ?>"
data-template="#forms-list-alt-tmpl"
data-active-element="#form_row_<?php echo $form_id; ?>"
data-load-class="spinner"
data-active-class="highlight"
data-group="entry_nav"
data-callback="setup_pagination"
data-status="active"
data-page="1"
><?php echo __('Entries', 'caldera-forms'); ?></a> | </span><?php } ?>
<?php if( empty( $form['_external_form'] ) ){ ?><span class="export"><a class="form-control" href="admin.php?page=caldera-forms&export-form=<?php echo $form_id; ?>&cal_del=<?php echo wp_create_nonce( 'cf_del_frm' ); ?>"><?php echo __('Export', 'caldera-forms'); ?></a> | </span><?php } ?>
<span><a class="ajax-trigger" href="#clone" data-request="start_new_form" data-modal-buttons='<?php echo $modal_new_form; ?>' data-clone="<?php echo $form_id; ?>" data-modal-width="600" data-modal-height="400" data-load-class="none" data-modal="new_form" data-modal-title="<?php echo __('Clone Form', 'caldera-forms'); ?>" data-template="#new-form-tmpl"><?php echo __('Clone', 'caldera-forms'); ?></a><?php if( empty( $form['_external_form'] ) ){ ?> | </span>
<span class="trash form-delete"><a class="form-control" data-confirm="<?php echo __('This will delete this form permanently. Continue?', 'caldera-forms'); ?>" href="admin.php?page=caldera-forms&delete=<?php echo $form_id; ?>&cal_del=<?php echo wp_create_nonce( 'cf_del_frm' ); ?>"><?php echo __('Delete'); ?></a></span><?php } ?>
</div>
</td>
<td style="width:4em; text-align:center;" class="entry_count_<?php echo $form_id; ?>"><?php echo $total; ?></td>
</tr>
<?php
if($class == 'alternate'){
$class = '';
}else{
$class = "alternate";
}
}
?></tbody>
</table>
<?php }else{ ?>
<p><?php echo __('You don\'t have any forms.', 'caldera-forms'); ?></p>
<?php } ?>
</div>
<div class="form-entries-wrap">
<?php include CFCORE_PATH . 'ui/entries_toolbar.php'; ?>
<div id="form-entries-viewer"></div>
</div>
</div>
<?php
do_action('caldera_forms_admin_templates');
?>
<script type="text/javascript">
function set_form_state( obj ){
if( true === obj.data.success ){
var row = jQuery('#form_row_' + obj.data.data.ID + '>td');
row.first().attr('class', obj.data.data.state );
obj.params.trigger.text( obj.data.data.label );
}
}
function new_form_redirect(obj){
if(typeof obj.data === 'string'){
window.location = 'admin.php?page=caldera-forms&edit=' + obj.data;
}else{
alert(obj.data.error);
}
}
// profile form saver
function serialize_modal_form(el){
var clicked = jQuery(el),
data = jQuery('#new_form_baldrickModal'),
name = data.find('.new-form-name');
//verify name is set
if(name.val().length < 1){
alert("<?php echo __('An form name is required', 'caldera-forms'); ?>");
name.focus().addClass('has-error');
return false;
}
clicked.data('data', data.serialize());
return true;
}
function update_setting_toggle(obj){
for( var k in obj.data){
if(obj.data[k] === true){
jQuery('.setting_toggle_' + k).addClass('button-primary');
}else{
jQuery('.setting_toggle_' + k).removeClass('button-primary');
}
}
//for()
}
function extend_fail_notice(el){
jQuery("#extend_cf_baldrickModalBody").html('<div class="alert error"><p><?php echo __('Looks like something is not working. Please try again a little later or post to the <a href="http://wordpress.org/support/plugin/caldera-forms" target="_blank">support forum</a>.', 'caldera-forms'); ?></p></div>');
}
function start_new_form(obj){
if( obj.trigger.data('clone') ){
return {clone: obj.trigger.data('clone') };
}
return {};
}
</script>
<?php
include CFCORE_PATH . 'ui/entry_navigation.php';
do_action('caldera_forms_admin_footer');
?>
| janmolemans/wordpressdrugs | wp-content/plugins/caldera-forms/ui/admin.php | PHP | gpl-2.0 | 9,468 |
<?php
/**
* The Header for our theme.
*
* Displays all of the <head> section and everything up till <main id="main">
*
* @package GeneratePress
*/
?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<?php if ( ! function_exists( '_wp_render_title_tag' ) ) : ?>
<title><?php wp_title( '|', true, 'right' ); ?></title>
<?php endif; ?>
<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<?php wp_head(); ?>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
</head>
<body <?php generate_body_schema();?> <?php body_class(); ?>>
<?php do_action( 'generate_before_header' ); ?>
<a class="screen-reader-text skip-link" href="#content" title="<?php esc_attr_e( 'Skip to content', 'generate' ); ?>"><?php _e( 'Skip to content', 'generate' ); ?></a>
<header itemtype="http://schema.org/WPHeader" itemscope="itemscope" id="masthead" <?php generate_header_class(); ?>>
<div <?php generate_inside_header_class(); ?>>
<?php do_action( 'generate_before_header_content'); ?>
<?php generate_header_items(); ?>
<?php do_action( 'generate_after_header_content'); ?>
</div><!-- .inside-header -->
</header><!-- #masthead -->
<?php do_action( 'generate_after_header' ); ?>
<div id="page" class="hfeed site grid-container container grid-parent">
<div id="content" class="site-content">
<?php do_action('generate_inside_container'); ?> | geraldpasion/gsm | wp-content/themes/generatepress/header.php | PHP | gpl-2.0 | 1,701 |
# See bottom of file for license and copyright information
package Foswiki::Configure::Checkers::Cache::DependencyFilter;
use strict;
use warnings;
use Foswiki::Configure::Checker ();
our @ISA = ('Foswiki::Configure::Checker');
sub check {
my $this = shift;
my $e = $this->showExpandedValue( $Foswiki::cfg{Cache}{DependencyFilter} );
return $e unless $Foswiki::cfg{Cache}{Enabled};
return $e . $this->checkRE('{Cache}{DependencyFilter}');
}
1;
__END__
Foswiki - The Free and Open Source Wiki, http://foswiki.org/
Copyright (C) 2008-2010 Foswiki Contributors. Foswiki Contributors
are listed in the AUTHORS file in the root of this distribution.
NOTE: Please extend that file, not this notice.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version. For
more details read LICENSE in the root of this distribution.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
As per the GPL, removal of this notice is prohibited.
| csirac2/core | lib/Foswiki/Configure/Checkers/Cache/DependencyFilter.pm | Perl | gpl-2.0 | 1,257 |
//
// NXTableView.h
// GestureOnTableViewCell
//
// Created by CornerZhang on 14-9-15.
// Copyright (c) 2014年 NeXtreme.com. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface NXTableView : UITableView <UITableViewDataSource, UITableViewDelegate>
@end
| CornerZhang/Learning_iOS | Interface/GestureOnTableViewCell/GestureOnTableViewCell/NXTableView.h | C | gpl-2.0 | 268 |
<?php
declare(strict_types=1);
class CommentListTest extends ShimmiePHPUnitTestCase
{
public function setUp(): void
{
global $config;
parent::setUp();
$config->set_int("comment_limit", 100);
$this->log_out();
}
public function tearDown(): void
{
global $config;
$config->set_int("comment_limit", 10);
parent::tearDown();
}
public function testCommentsPage()
{
global $user;
$this->log_in_as_user();
$image_id = $this->post_image("tests/pbx_screenshot.jpg", "pbx");
# a good comment
send_event(new CommentPostingEvent($image_id, $user, "Test Comment ASDFASDF"));
$this->get_page("post/view/$image_id");
$this->assert_text("ASDFASDF");
# dupe
try {
send_event(new CommentPostingEvent($image_id, $user, "Test Comment ASDFASDF"));
} catch (CommentPostingException $e) {
$this->assertStringContainsString("try and be more original", $e->getMessage());
}
# empty comment
try {
send_event(new CommentPostingEvent($image_id, $user, ""));
} catch (CommentPostingException $e) {
$this->assertStringContainsString("Comments need text", $e->getMessage());
}
# whitespace is still empty...
try {
send_event(new CommentPostingEvent($image_id, $user, " \t\r\n"));
} catch (CommentPostingException $e) {
$this->assertStringContainsString("Comments need text", $e->getMessage());
}
# repetitive (aka. gzip gives >= 10x improvement)
try {
send_event(new CommentPostingEvent($image_id, $user, str_repeat("U", 5000)));
} catch (CommentPostingException $e) {
$this->assertStringContainsString("Comment too repetitive", $e->getMessage());
}
# test UTF8
send_event(new CommentPostingEvent($image_id, $user, "Test Comment むちむち"));
$this->get_page("post/view/$image_id");
$this->assert_text("むちむち");
# test that search by comment metadata works
// $this->get_page("post/list/commented_by=test/1");
// $this->assert_title("Image $image_id: pbx");
// $this->get_page("post/list/comments=2/1");
// $this->assert_title("Image $image_id: pbx");
$this->log_out();
$this->get_page('comment/list');
$this->assert_title('Comments');
$this->assert_text('ASDFASDF');
$this->get_page('comment/list/2');
$this->assert_title('Comments');
$this->log_in_as_admin();
$this->delete_image($image_id);
$this->log_out();
$this->get_page('comment/list');
$this->assert_title('Comments');
$this->assert_no_text('ASDFASDF');
}
public function testSingleDel()
{
global $database, $user;
$this->log_in_as_admin();
$image_id = $this->post_image("tests/pbx_screenshot.jpg", "pbx");
# make a comment
send_event(new CommentPostingEvent($image_id, $user, "Test Comment ASDFASDF"));
$this->get_page("post/view/$image_id");
$this->assert_text("ASDFASDF");
# delete a comment
$comment_id = (int)$database->get_one("SELECT id FROM comments");
send_event(new CommentDeletionEvent($comment_id));
$this->get_page("post/view/$image_id");
$this->assert_no_text("ASDFASDF");
}
}
| shish/shimmie2 | ext/comment/test.php | PHP | gpl-2.0 | 3,501 |
#ifndef VALUESCOPE_H_
#define VALUESCOPE_H_
#include <map>
#include <memory>
#include <string>
#include <vector>
#include "ValueEntry.h"
#include "types/Type.h"
namespace semantic_analyzer {
class ValueScope {
public:
bool insertSymbol(std::string name, const type::Type& type, translation_unit::Context context);
void insertFunctionArgument(std::string name, const type::Type& type, translation_unit::Context context);
ValueEntry createTemporarySymbol(type::Type type);
bool isSymbolDefined(std::string symbolName) const;
ValueEntry lookup(std::string name) const;
std::map<std::string, ValueEntry> getSymbols() const;
std::vector<ValueEntry> getArguments() const;
private:
std::vector<ValueEntry> arguments;
std::map<std::string, ValueEntry> localSymbols;
};
} // namespace semantic_analyzer
#endif // VALUESCOPE_H_
| rieske/trans | src/semantic_analyzer/ValueScope.h | C | gpl-2.0 | 862 |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.