网页多张图片进行渐进渐出显示 只看代码不看字,先上个效果图:github page 在线预览地址:https://kingroc711.github.io/webpages/dist/网速慢,图片大,打开网页的时候忍忍。github地址:https://github.com/kingroc711/webpages
Opencv将一张图片切成NxN个小块 《OpenCV系列教程》《深度学习-如何提高数据集质量》项目位置:OpenCV-Sample代码位置:45-spiltPictureToNxN.py效果:原图:裁剪后的效果:import cv2 as cvrow = 15column = 15org_img = cv.imread('D:\code\pic.jpg')height, width = org_img.shape[:2]print('height %d widht %d' % (height, width))
Vue javascript error require is not defined Vue项目中出现,require是node环境中的方法,所以需要在在env中声明,有两个位置需要声明.eslintrc.js和package.jsonjavascript error require is not defined "eslintConfig": { "root": true, "env": { "node": true }, ....................module.exports = { "env": {
Vue3加载本地assets图片路径错误 错误的使用方式: const state = reactive({ sliders: [{ img: '@/assets/1.png' }, { img: '@/assets/1.png' }, { img: '@/assets/
如何在Window10环境下编译scrcpy, How to build scrcpy on Window10 安装Minigw安装msys2-x86_64,安装完成后使用pacman包管理工具安装开发包中的必要开发工具:这里面使用的是pacman管理器-S是同步的缩写,可以当作安装命令使用。pacman -S mingw-w64-x86_64-make mingw-w64-x86_64-gcc mingw-w64-x86_64-pkg-config mingw-w64-x86_64-mesonpacman -S make camke automake gcc编译SDL2编译SDL2tar zxfv
Ubuntu打开VirtualBox的VDI(Virtual Disk Image)文件 将vdi文件转成img文件king@king-ThinkCentre-M920s-N000:~/Android$ sudo VBoxManage clonehd --format RAW ./Root.vdi Root.img0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...需要加sudo否则转换不出来,这个活可能是调用了系统的超级用户的权限。查看一下大小:king@king-ThinkCentre-M920s-N000:~
海思Hi35xx交叉编译ffmpeg + fdk aac 我的测试版ffmpeg-3.4.8 + fdk-aac-0.1.6开始使用的是fdk高版本,但发现当时ffmpeg还没有支持,有的数据结构不存在。程序员说话就拿代码说话。fdk-aac交叉编译脚本#!/bin/sh#CFLAGS="-march=armv7-a -O2 -DNDEBUG -fopenmp -pipe"export PATH=$PATH:/opt/hisi-linux-nptl/arm-hisiv100-linux/target/bin/CC=arm-hisiv100nptl-l
Please commit your changes or stash them before you switch branches. king@king-ThinkCentre-M920s-N000:/media/king/59ff73c6-4ba5-4612-bf31-52f3717f705f/works/android_source$ ./repo sync -j16remote: Counting objects: 27201, done ernal/python/cpython2remote: Counting objects: 1 remote: Finding sources: 100%
ffmpeg命令行参数标注输出格式 ffmpeg -f s16le -ar 48000 -ac 1 -i ./AudioFile.lpcm0 -f mp3 ./AudioFile在第二个-f的位置填写,这些参数如果位置发生变化,就有可能出错。并不是所有的格式都支持。需要 ffmpeg -formats带有字母E的.E = Muxing supported的才支持。...
How to update Ubuntu ISO Kernel 如何更新Ubuntu光盘中的kernel 1.提取ISO文件中的filesystem.squashfs文件2.解压压缩文件,删除原始文件,将编译好的kernel拷贝到新文件夹的home目录 sudo unsquashfs ./filesystem.squashfs sudo rm filesystem.squashfs sudo cp your_path/linux-*.deb squashfs-root/home/3.挂载squashfs-rootsudo chroot ./squashfs-root/mount none
Linux gdm gnome获取快捷键映射表, disable key Super 我只找了这两个表,但能解决大部分问题。gsettings list-recursively org.gnome.shell.keybindingsgsettings list-recursively org.gnome.desktop.wm.keybindings然后就是使用 gsettings set 进行设置了。 gsettings set org.gnome.shell.keybindings switch-to-application-5 '[]'gsettings set org.gn
GTK设置背景图片,背景图片平铺显示 gtk set background image scale#include <gtk/gtk.h>int main( int argc, char *argv[]){ GtkWidget *window; GtkWidget *layout; GdkScreen *gdk_screen; GdkPixmap *background; gtk_init(&argc, &argv); gdk_screen = gdk_s
如何以源码方式编译ubuntu的deb包,以gnome-control-center为例 1.下载源码:apt-get source gnome-control-center下载完成后会生成一个源码目录。2.安装依赖: sudo apt build-dep gnome-control-center会自动安装依赖库。3.编译:cd gnome-control-center-3.28.2/debiandebuild -uc -us编译完成后会在gnome-control-center同级目录生成deb包。...
Linux shell run sudo command 使用Linux shell运行sudo命令,获取超级权限。cat sudo.sh echo passwd | sudo -S cat /etc/sudoers需要将密码写在脚本中,这样就可以自动输入密码了。
ubuntu add a new user as sudoer using the command line Ubuntu通过命令行创建一个sudoer用户第一行创建用户:password是用户的密码,两次要一样。name新用户如何称呼,通常写成和NewUserName一样。后面的数字,可以随便填写,我就乱写了一下。(echo 'password'echo 'password'echo 'name'echo '010'echo '138'echo '136'echo '111'echo 'y')|adduser <NewUserName>第二行将用户添加到sudoer中su
设置Ubuntu grub启动指定内核 原文位置:http://www.humans-enabled.com/2014/08/how-to-set-default-grub-kernel-boot.html太长了,简介一下吧。找到你想启动的内核 grep submenu /boot/grub/grub.cfg获得:submenu 'Advanced options for Ubuntu' $menuentry_id_opti...
为curl 、git、go语言、wget、repo设置代理,解决ubuntu 18.04编译chromium os问题 为CURL设置shadow socks代理有两种方法,第一通过声明环境变量:export http_proxy="socks5h://127.0.0.1:1080"export https_proxy="socks5h://127.0.0.1:1080"第二种方法写在curl的配置文件中vi ~/.curlrcproxy = "socks5h://127.0.0.1:1080"...
Tensorflow2.0 GPU版本 启动被卡死的小坑记录Ubuntu 18.04 现象突然心血来潮,要换Tensorflow2.0了本来打算换Python了,但看了看Tensorflow官网上的教程比较不错,又打算继续搞Tensorflow了。遇到一个问题就是已启动Tensorflow 2.0 GPU版本整个电脑被卡死,必须重新启动电脑。我的电脑跑Tensorflow1.4 GPU版本一点问题也没有。CUDA 10.0版本,显卡驱动是410版本。完全符合官方标准:解决方...