做项目经常会遇到图片列表展示,图片一般是用户从后台上传的,上传的图片尺寸千差万别。如果前端不控制图片大小,整个排版就会很乱,如果给定长宽,图片又会变形,用背景图片来处理有特别麻烦。这个问题一直苦恼了我好久,最近终于找到解决办法了。 css有一个object-fit属性,用来指定替换元素的内容应该如何 ...
分类:
Web程序 时间:
2019-10-13 00:33:16
阅读次数:
869
extra_files: a list of files the reloader should watch additionally to the modules. For example configuration files. ———————————————— 版权声明:本文为CSDN博主「小 ...
分类:
其他好文 时间:
2019-10-12 18:59:24
阅读次数:
101
Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n). Example: Note: If there i ...
一、学习算法 “学习”:对于某类任务T和性能度量P,一个计算机程序被认为可以从经验E中学习是指,通过经验E改进后,它在任务T上由性能度量P衡量的性能有所提升。 1、任务T:通常定义为机器学习系统应该如何处理样本。 →样本(Example):我们从某些希望机器学习系统处理的对象或事件中收集到的已经量化 ...
分类:
其他好文 时间:
2019-10-12 10:52:55
阅读次数:
153
DHCP服务脚本在运行脚本之前需要配置GNS3,可以看我之前的博客有详细教程#!/bin/bashyuminstalldhcp-y//安装DHCP服务yuminstallexpect-y//安装expect工具/usr/bin/expect<<-EOFspawncp/usr/share/doc/dhcp-4.2.5/dhcpd.conf.example/etc/dhcp/dhcpd.c
分类:
系统相关 时间:
2019-10-12 09:22:36
阅读次数:
112
题目 You are given a list of numbers, and a target number k. Return whether or not there are two numbers in the list that add up to k. Example: Given [4 ...
分类:
其他好文 时间:
2019-10-12 01:10:23
阅读次数:
109
全局安装 hexosudo npm install -g hexo初始化新建文件夹,进行初始化,并在本地安装必要组件。 hexo initnpm install生成如下目录: . ├── _config.yml ├── node_modules/ ├── package.json ├── scaff... ...
分类:
其他好文 时间:
2019-10-11 23:21:46
阅读次数:
133
打开一个目录,读取它的内容,然后关闭: <?php$dir = "/images/";// Open a directory, and read its contentsif (is_dir($dir)){if ($dh = opendir($dir)){while (($file = readdi ...
分类:
Web程序 时间:
2019-10-11 12:06:35
阅读次数:
101
一键刷入简单DHCP服务本次脚本配置:所属服务器静态IP地址为:192.168.100.100(只有此点需要自定义)#!/bin/bash#一键自动DHCPyuminstalldhcp-ywangka="/etc/sysconfig/network-scripts/ifcfg-ens33"#配置文件位置sed-i-e‘/BOOTPROTO/s/dhcp/static/g‘-e‘/ONBOOT/aI
分类:
系统相关 时间:
2019-10-10 22:53:05
阅读次数:
124
题目: Summation Write a program that finds the summation of every number from 1 to num. The number will always be a positive integer greater than 0. For ...
分类:
其他好文 时间:
2019-10-10 22:14:24
阅读次数:
80