Day: November 11, 2015

imagesLoaded-检测图片是否正确加载的js插件

简要教程 imagesLoaded是一款用于检测页面中的图片是否被加载的js插件。imagesLoaded是非常有用的插件,当你的页面中某幅图片没有被加载时,默认会显示一个红叉或图片alt文本,imagesLoaded可以将未加载的图片替换为你设置的图片。 安装 你可以通过Bower或npm来安装giantess分类过滤和排序插件。 bower install imagesloaded npm install imagesloaded 或者直接使用下载包中的imagesloaded.pkgd.js文件及压缩版的imagesloaded.pkgd.min.js。在页面中将它引入即可。 <script src="/… Read More

sed 执行错误:sed: 1: “…”: Invalid command code f

运行 grep -l \'texttofind\' * | xargs sed -i 's/toreplace/replacewith/g' Im getting this error when I run the above command in the terminal. sed: 1: "forkliftDailyChecklistW ...": invalid command code f 解决: I figured out what was wrong. I needed to add '' after the -i and before the 's/../../': grep -l \'texttofind\' * | xargs sed -i '' 's/toreplace/replacewi…