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
function Subway() {} | |
/** | |
* 解析XML | |
* line和station对象 | |
* 利用SVG画线和点 | |
*/ | |
var sp = Subway.prototype; | |
/** | |
* 淡出时的透明度 | |
*/ |
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
convert 2.jpg -alpha set -channel RGBA -fuzz 10% -fill "rgb(255,0,0)" -draw "color 180,150 replace" new.png |
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
magick convert ecnu.png -fuzz 60% -transparent white ecnu1.png |
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
toolbox.precache() will add one or more URLs to a cache when the service worker is installed, but it won't take any steps to make sure that those URLs are kept up to date. So, for instance, if you call toolbox.precache(['index.html']), it will add an entry for index.html to your runtime cache when the service worker is installed, but there is nothing that will automatically update that entry when index.html changes. sw-toolbox also does not set up any routes or handlers to serve that cached response by default. It's up to you, as a developer, to set up a route that will match requests for index.html and use an appropriate handler (and hopefully not use cacheFirst, or else index.html will never be updated). | |
In contrast, sw-precache integrates with your build process, and takes care of detecting when any of your local assets, like index.html, have changed. When something does change, it will automatically update the cached entry for you. It will also set up routes with an appropriate handler to match requests |
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
magick convert icon.png -resize 16x16 icon-16.png |
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
static void indexDocs(final IndexWriter writer, Path path) throws IOException | |
{ | |
//Directory? | |
if (Files.isDirectory(path)) | |
{ | |
//Iterate directory | |
Files.walkFileTree(path, new SimpleFileVisitor<Path>() | |
{ | |
@Override | |
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException |
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
String docsPath = "inputFiles"; | |
String indexPath = "indexedFiles"; | |
Path docDir = Paths.get(docsPath); | |
Directory dir = FSDirectory.open(Paths.get(indexPath)); | |
Analyzer analyzer = new StandardAnalyzer(); |
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
magick convert father.jpg -font abc.ttf -pointsize 48 -fill black -annotate +620+145 @demo.txt demo.png |
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
convert photo-removebg.png -background red -alpha remove -alpha off red.png |
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
composite -dissolve 50% -gravity center water.png b-out.jpg bbbb.jpg |
OlderNewer