Download CMake from: https://cmake.org/download/
wget https://cmake.org/files/v3.12/cmake-3.12.3.tar.gz
tar zxvf cmake-3.*
from PIL import Image | |
def webp_to_png(input_path, output_path, size=None): | |
# 打开webp文件 | |
img = Image.open(input_path) | |
if size is None: | |
pass | |
# 重新调整图片的大小 |
var mediaJSON = { "categories" : [ { "name" : "Movies", | |
"videos" : [ | |
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org", | |
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ], | |
"subtitle" : "By Blender Foundation", | |
"thumb" : "images/BigBuckBunny.jpg", | |
"title" : "Big Buck Bunny" | |
}, | |
{ "description" : "The first Blender Open Movie from 2006", | |
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ], |
wget https://cmake.org/files/v3.12/cmake-3.12.3.tar.gz
tar zxvf cmake-3.*
cd /opt | |
wget http://apache-mirror.rbc.ru/pub/apache/kafka/0.10.1.0/kafka_2.11-0.10.1.0.tgz | |
tar xvzf kafka_2.11-0.10.1.0.tgz | |
ln -s kafka_2.11-0.10.1.0/ kafka | |
vi /etc/systemd/system/kafka-zookeeper.service | |
[Unit] | |
Description=Apache Zookeeper server (Kafka) | |
Documentation=http://zookeeper.apache.org |
#include <unistd.h> | |
#include <stdio.h> | |
void print_tty(char *name,FILE *f){ | |
printf("%s (fileno %d): ",name,fileno(f)); | |
if(isatty(fileno(f))) | |
printf("TTY %s\n",ttyname(fileno(f))); | |
else | |
printf("not a TTY\n"); | |
} |
upstream gitlab { | |
server 172.17.42.1:10080 fail_timeout=0; | |
} | |
# let gitlab deal with the redirection | |
server { | |
listen 80; | |
server_name git.example.com; | |
server_tokens off; | |
root /dev/null; |
using System; | |
using System.Collections.Generic; | |
using RoundRobin; | |
public class MyClass | |
{ | |
public static void RunSnippet() | |
{ | |
List<Node> servers = new List<Node>(); | |
servers.Add(new Node("serv","urlA",1)); |
import java.util.Arrays; | |
import java.util.concurrent.locks.Lock; | |
import java.util.concurrent.locks.ReentrantLock; | |
import java.util.concurrent.locks.ReentrantReadWriteLock; | |
public class Node { | |
static final int MIN_ELEMENTS = 30, MAX_ELEMENTS = 2 * MIN_ELEMENTS; | |
private int[] data; | |
private int len; |
using System; | |
using System.Collections.Generic; | |
using System.Data; | |
using System.Linq; | |
using System.Text; | |
using System.Transactions; | |
using Oracle.ManagedDataAccess.Client; | |
namespace OrclTransaction | |
{ |
var gulp = require('gulp'); | |
var concat = require('gulp-concat'); | |
var uglify = require('gulp-uglify'); | |
var jshint = require('gulp-jshint'); | |
var notify = require('gulp-notify'); | |
var rename = require('gulp-rename'); | |
var sass = require('gulp-ruby-sass'); | |
var autoprefixer = require('gulp-autoprefixer'); | |
var minifycss = require('gulp-minify-css'); |