In this article, I will share some of my experience on installing NVIDIA driver and CUDA on Linux OS. Here I mainly use Ubuntu as example. Comments for CentOS/Fedora are also provided as much as I can.
by Bjørn Friese
Beautiful is better than ugly. Explicit is better than implicit.
I frequently deal with collections of things in the programs I write. Collections of droids, jedis, planets, lightsabers, starfighters, etc. When programming in Python, these collections of things are usually represented as lists, sets and dictionaries. Oftentimes, what I want to do with collections is to transform them in various ways. Comprehensions is a powerful syntax for doing just that. I use them extensively, and it's one of the things that keep me coming back to Python. Let me show you a few examples of the incredible usefulness of comprehensions.
Examples here use the default settings, see the VidStab readme on GitHub for more advanced instructions.
Here's an example video I made
brew install ffmpeg --with-libvidstab
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
| "use strict"; | |
| import React from "react"; | |
| import Two from "two"; | |
| class TwoTest extends React.Component { | |
| constructor (props) { | |
| super(props); | |
| this.state = { |
| * { | |
| font-size: 12pt; | |
| font-family: monospace; | |
| font-weight: normal; | |
| font-style: normal; | |
| text-decoration: none; | |
| color: black; | |
| cursor: default; | |
| } |
| function assignEditUrls() { | |
| var form = FormApp.openById('yourFormKey'); | |
| //enter form ID here | |
| var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('yourWorksheetName'); | |
| //Change the sheet name as appropriate | |
| var data = sheet.getDataRange().getValues(); | |
| var urlCol = ; // column number where URL's should be populated; A = 1, B = 2 etc | |
| var responses = form.getResponses(); |
| # first install java8 from http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html | |
| # it's 10x faster then openjdk8 | |
| # download jdk-8u101-linux-arm32-vfp-hflt.tar.gz for C1/XU4 or jdk-8u101-linux-arm64-vfp-hflt.tar.gz for C2 | |
| # sudo tar zxvf jdk-8*.tar.gz -C /opt | |
| # sudo mv sudo mv /opt/jdk1.8.0_* /opt/jdk1.8.0 | |
| # sudo update-alternatives --install /usr/bin/javac javac /opt/jdk1.8.0/bin/javac 1 | |
| # sudo update-alternatives --install /usr/bin/java java /opt/jdk1.8.0/bin/java 1 | |
| # if installed other version of java, you need to configure for using newest by: | |
| # sudo update-alternatives --config javac | |
| # sudo update-alternatives --config java |