New API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Accordion Test</title> | |
<style type="text/css"> | |
html, body { | |
margin: 0; | |
padding: 0; | |
} | |
body { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#My solutions to challenges from CoderByte.com. Their Python interpreter is buggy. | |
#1 Using the Python language, have the function FirstReverse(str) take the str parameter being passed and return the string in reversed order. | |
def FirstReverse(str): | |
print str[::-1] | |
#2 Using the Python language, have the function FirstFactorial(num) take the num parameter being passed and return the factorial of it (ie. if num = 4, return (4 * 3 * 2 * 1)). For the test cases, the range will be between 1 and 18. | |
def FirstFactorial(num): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
class EmbeddedGist extends Component { | |
constructor(props) { | |
super(props); | |
this.gist = props.gist; | |
this.file = props.file; | |
this.stylesheetAdded = false; | |
this.state = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(navigator.appVersion.indexOf("Windows ")!=-1){ | |
os = getWindowsOS(); | |
}else{ | |
os = navigator.platform; | |
} | |
function getWindowsOS(){ | |
// http://msdn.microsoft.com/en-us/library/ms537503(v=vs.85).aspx#PltToken | |
if(navigator.appVersion.indexOf("Windows NT 10.")!=-1){ | |
return 'Windows 10'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var linkEl = document.head.querySelector('link[href*="/styles/index.css"]'); | |
var cssLoaded = Boolean(linkEl.sheet); | |
linkEl.addEventListener('load', function () { | |
cssLoaded = true; | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Versions: marked v0.6.2, prismjs v1.15.0 | |
let marked = require('marked'); | |
let prism = require('prismjs'); | |
let loadLanguages = require('prismjs/components/'); | |
loadLanguages(['javascript', 'jsx', 'css', 'markup', 'bash', 'json']); | |
marked.setOptions({ | |
highlight: function(code, lang) { |