- Python 3
 - Pip 3
 
$ brew install python3| <!-- START OF USER'S CODE --> | |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width"> | |
| <title>JS Bin</title> | |
| </head> | |
| <body> | |
| fetch('http://www.mocky.io/v2/5b6137303000007f006a4018').then(function(response) { | |
| return response.json(); | |
| }).then(function(data) { | |
| console.log(data); | |
| }).catch(function(err) { | |
| console.log(err.stack); | |
| }); | 
| #!/usr/bin/python | |
| # The urlparse module provides functions for breaking URLs down into their | |
| # component parts, as defined by the relevant RFCs. | |
| from urlparse import urlparse | |
| # PARSING | |
| parsed = urlparse('http://user:pass@NetLoc:80/path;parameters?query=argument#fragment') | 
| from flask import Response, jsonify | |
| import json | |
| from flask_restful import Resource | |
| class Api(Resource): | |
| def post(self): | |
| response = Response( | |
| response=json.dumps(dict(error='err')), | 
| .filter('paginate', function() { | |
| return function(arr, page, END, START, WINDOW) { | |
| if (typeof(START)==='undefined') START = 0; | |
| if (typeof(WINDOW)==='undefined') WINDOW = 5; | |
| var start = Math.floor(page - WINDOW/2); | |
| var end = Math.floor(page + WINDOW/2); | |
| if (start >= START && end <= END) { | 
| START, END, WINDOW = 0, 15, 5 | |
| def pages(page): | |
| start = page - WINDOW/2 | |
| end = page + WINDOW/2 | |
| if start >= START and end <= END: | |
| return range(start, end+1) | |
| if start <= START: | 
| <html><head> | |
| <script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script> | |
| <script type="text/javascript"> | |
| jQuery(function ($) { | |
| // code1 | |
| var start = +new Date(); | |
| var html = ''; | |
| for (var i = 0; i < 1000; i++) { | |
| $('#container1').append('<input name="text' + i + '"' + ' value="' + i + '" />'); | 
| <html> | |
| <head> | |
| <script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script> | |
| </head> | |
| <body> | |
| <span id="spanId" style="float:left;"> Guest </span>  | |
| <input type="text" id="inputField" style="display:none;"> | |
| <input type="submit" value="Edit" name="editButton" id="editButton" onclick="editIt();" /> | |
| <input type="submit" value="Save" id="saveButton" style="display:none;" onclick="saveIt(this);"> | |
| <input type="submit" value="Cancel" id="cancelButton" style="display:none;" onclick="$('#saveButton').hide();$('#editButton').show(); $(this).hide();$('#inputField').hide(); $('#spanId').show();"> | 
| <?php | |
| $year = '2014'; | |
| $start = date("$year-01-01"); | |
| $end = date("$year-12-t"); | |
| $week = array(); | |
| $month = array(); | |
| $i = 0; | |
| print_r("Calendar: $year\n\n"); |