This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -ex | |
apt install -y libwebp-dev libopenjp2-7-dev librsvg2-dev libx265-dev libde265-dev automake | |
mkdir ~/build | |
cd ~/build | |
git clone --branch v1.6.2 https://github.com/strukturag/libheif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Criando um script .sh para executar todos os comandos: | |
#root@servidor:~# vi script.sh | |
#root@servidor:~# chmod +x script.sh | |
#root@servidor:~# ./script.sh | |
apt-get update | |
apt-get -y install autoconf automake build-essential git-core libass-dev libgpac-dev libsdl1.2-dev libtheora-dev libtool libvdpau-dev libvorbis-dev libx11-dev libxext-dev libxfixes-dev pkg-config texi2html zlib1g-dev libmp3lame-dev nasm gcc yasm && true | |
mkdir ~/ffmpeg_sources | |
cd ~/ffmpeg_sources | |
git clone --depth 1 https://github.com/mstorsjo/fdk-aac.git |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<li> | |
<span class="text-muted mr-1">{{ item.id }}.</span> {{ item.title }} | |
<slot name="after" :item="item" /> | |
</li> | |
</template> | |
<script> | |
export default { | |
props: [ 'item' ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div> | |
<flat-pickr v-model="date" :config="configs.selectToday"></flat-pickr> | |
</div> | |
</template> | |
<script> | |
import flatPickr from 'vue-flatpickr-component' | |
import SelectTodayPlugin from '../todayselect' | |
import ConfirmDatePlugin from 'flatpickr/dist/plugins/confirmDate/confirmDate' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="http:res.wx.qq.com/open/js/jweixin-1.2.0.js"></script> | |
<%= wechat_config_js debug: false, api: %w(closeWindow) -%> | |
<style> | |
.disappear { | |
display: none; | |
} | |
</style> | |
<% unless @user.errors.empty? %> | |
<div id="error_dialog"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### 修改config/application.rb | |
require 'rails/all' | |
# add these line for log4r | |
require 'log4r' | |
require 'log4r/yamlconfigurator' | |
require 'log4r/outputter/datefileoutputter' | |
Bundler.require(:default, Rails.env) if defined?(Bundler) | |
module Zurich | |
class Application < Rails::Application |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'benchmark' | |
def binary_search(arr, element) | |
b = arr.sort | |
if b.include?(element) | |
return b.bsearch_index {|x| x >= element} | |
end | |
end | |
arr1 = Array.new(10){rand(100)} |