- Default behavior for programs is to terminate on an error, or enter the debugger
- Terrible user experience
- Gracefully Handle Errors (retry connections, re-prompt for user input, etc)
- Non Local Control Flow (Display error messages and screens)
/* | |
original [7,4,12,39,6.5,88,78,-3,14.7,3.14,359] | |
pass 1 [-3,7,12,39,6.5,88,78,4,14.7,3.14,359] | |
pass 2 [-3,3.14,12,39,7,88,78,6.5,14.7,4,359] | |
pass 3 [-3,3.14,4,39,12,88,78,7,14.7,6.5,359] | |
We want to sort this array from smallest to largest | |
1. Look at each number in the array | |
2. Look at each number that comes after that number |
/* | |
This code goes in the webpage that is embedded via iframe. | |
Use of JQuery is assumed in this example | |
*/ | |
function postMessage() { | |
var msg = $('body').height(); | |
window.parent.postMessage(msg, '*'); |
A Javascript app is actually a web page
Analyzed Form Validation on http://codepen.io/chdhmphry/pen/IFrva?editors=101
Site for Regular Expressions regex101.com
Wedgies is a platform for real time polls across social channels. You can create a question on Wedgies.com and share it to Facebook or Twitter immediately. You can also use our widget to embed the question on your website or blog and gather responses while creating engagement. We have provided javascript, iframe and WordPress plugin solutions to help you get started.
<script src='https://www.wedgies.com/js/widgets.js'></script>
var url = 'https://api.themoviedb.org/3/movie/'; | |
imdb_id = 'tt0102685'; | |
key = '?api_key=9a2c8fe3fd95dcd12c59204ad2899b9e'; | |
append = '&append_to_response=credits'; | |
$.ajax({ | |
type: 'GET', | |
url: url + imdb_id + key + append, | |
dataType: 'jsonp', | |
success: function(data) { |
##Question
curl -X POST -d @question.json -H "Content-Type:application/json" "http://wedgies-api-production.herokuapp.com/question"
{
var _draw = function() { | |
var angle = 90, | |
total = 0, | |
start = 0, | |
stroke = Raphael.rgb(52,125,168), | |
process = function (j) { | |
if(j == voted){ | |
color = Raphael.rgb(235,194,0); | |
} else { | |
color = Raphael.rgb(200,200,200); |