You can install the latest python 2 and python 3 by homebrew.
- Python 2 Installation
brew install python
- Python 3 Installation
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent| #include <Wire.h> | |
| #include <WiFi.h> | |
| #include <PubSubClient.h> | |
| #include <Adafruit_TMP006.h> | |
| char ssid[] = "<WiFi SSID>"; | |
| char pass[] = "<WiFi key>"; | |
| int status = WL_IDLE_STATUS; | |
| IPAddress ip; | |
| // MQTTServer to use |
| /** | |
| * IE 5.5+, Firefox, Opera, Chrome, Safari XHR object | |
| * | |
| * @param string url | |
| * @param object callback | |
| * @param mixed data | |
| * @param null x | |
| */ | |
| function ajax(url, callback, data, x) { | |
| try { |
| #!/usr/bin/env bash | |
| echo "--- Good morning, master. Let's get to work. Installing now. ---" | |
| echo "--- Updating packages list ---" | |
| sudo apt-get update | |
| echo "--- MySQL time ---" | |
| sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password root' | |
| sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password root' |
| /* Polyfill indexOf. */ | |
| var indexOf; | |
| if (typeof Array.prototype.indexOf === 'function') { | |
| indexOf = function (haystack, needle) { | |
| return haystack.indexOf(needle); | |
| }; | |
| } else { | |
| indexOf = function (haystack, needle) { | |
| var i = 0, length = haystack.length, idx = -1, found = false; |
| //Demo app to blink the red LED (LED1) on the TI Launchpad | |
| //which is attached to P1.0 | |
| //The green LED(LED2) is connected to P1.6 | |
| #include <msp430g2553.h> | |
| int main(void) { | |
| volatile int i; | |
| // stop watchdog timer |
| // Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc | |
| // jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/ | |
| // author: Pawel Kozlowski | |
| var myApp = angular.module('myApp', []); | |
| //service style, probably the simplest one | |
| myApp.service('helloWorldFromService', function() { | |
| this.sayHello = function() { | |
| return "Hello, World!" |