配有英伟达显卡的主机,装完 Ubuntu 16.04 后出现闪屏现象,是由于没有安装显卡驱动。
显卡型号
NVIDIA Corporation GM204 [GeForce GTX 970]
| from __future__ import print_function | |
| import requests | |
| import threading | |
| import sys | |
| def eprint(*args, **kwargs): | |
| print(*args, file=sys.stderr, **kwargs) |
| /* | |
| * Read video frame with FFmpeg and convert to OpenCV image | |
| * | |
| * Copyright (c) 2016 yohhoy | |
| */ | |
| #include <iostream> | |
| #include <vector> | |
| // FFmpeg | |
| extern "C" { | |
| #include <libavformat/avformat.h> |
| import org.apache.spark._ | |
| import org.apache.spark.graphx._ | |
| val triplets = sc.textFile(path).flatMap { line => | |
| if (!line.isEmpty && line(0) != '#') { | |
| val lineArray = line.split("\\s+") | |
| if (lineArray.length < 2) { | |
| None | |
| } else { | |
| val t = new EdgeTriplet[String, String] |
| #!/usr/bin/python | |
| # Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org) | |
| # The author disclaims copyright to this source code. | |
| import sys | |
| import struct | |
| import socket | |
| import time | |
| import select |
| nullness inspection | |
| { | |
| a?.M(); | |
| a.F(); // <= possible NRE | |
| a?.M(a != null); // <= expression always true | |
| } | |
| inspection "Redundant null-propagation" | |
| { | |
| var a = new A(); |
| #!/bin/bash | |
| while read FILENAME; do | |
| LCOV_INPUT_FILES="$LCOV_INPUT_FILES -a \"$FILENAME\"" | |
| done < <( find $1 -name lcov.info ) | |
| eval lcov "${LCOV_INPUT_FILES}" -o $1/$2 |
| -- http://stackoverflow.com/questions/1124603/grouped-limit-in-postgresql-show-the-first-n-rows-for-each-group | |
| -- http://www.postgresql.jp/document/9.2/html/tutorial-window.html | |
| CREATE TABLE empsalary ( | |
| depname varchar(10) not null | |
| , empno integer not null | |
| , salary integer not null | |
| ); | |
| INSERT INTO empsalary (depname, empno, salary) VALUES ('develop', 11, 5200); |
| // | |
| // Regular Expression for URL validation | |
| // | |
| // Author: Diego Perini | |
| // Created: 2010/12/05 | |
| // Updated: 2018/09/12 | |
| // License: MIT | |
| // | |
| // Copyright (c) 2010-2018 Diego Perini (http://www.iport.it) | |
| // |