added from java-adornments.txt:
977078
public PropertyComponent getProperty(String code) {
    for (PropertyComponent pd : getProperty()) {
      if (pd.getCode().equalsIgnoreCase(code))
        return pd;
    }
    return null;
  }
506440
public final void mFUNCT() throws RecognitionException {
        try {
            int _type = FUNCT;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // C:\\Project\\Obdalib\\obdalib-parent\\obdalib-core\\src\\main\\java\\it\\unibz\\inf\\obda\\gui\\swing\\utils\\MappingFilter.g:122:6: ( ( 'F' | 'f' ) ( 'U' | 'u' ) ( 'N' | 'n' ) ( 'C' | 'c' ) ( 'T' | 't' ) )
            // C:\\Project\\Obdalib\\obdalib-parent\\obdalib-core\\src\\main\\java\\it\\unibz\\inf\\obda\\gui\\swing\\utils\\MappingFilter.g:122:8: ( 'F' | 'f' ) ( 'U' | 'u' ) ( 'N' | 'n' ) ( 'C' | 'c' ) ( 'T' | 't' )
            {
            if ( input.LA(1)=='F'||input.LA(1)=='f' ) {
                input.consume();
            }
            else {
                MismatchedSetException mse = new MismatchedSetException(null,input);
                recover(mse);
                throw mse;
            }


            if ( input.LA(1)=='U'||input.LA(1)=='u' ) {
                input.consume();
            }
            else {
                MismatchedSetException mse = new MismatchedSetException(null,input);
                recover(mse);
                throw mse;
            }


            if ( input.LA(1)=='N'||input.LA(1)=='n' ) {
                input.consume();
            }
            else {
                MismatchedSetException mse = new MismatchedSetException(null,input);
                recover(mse);
                throw mse;
            }


            if ( input.LA(1)=='C'||input.LA(1)=='c' ) {
                input.consume();
            }
            else {
                MismatchedSetException mse = new MismatchedSetException(null,input);
                recover(mse);
                throw mse;
            }


            if ( input.LA(1)=='T'||input.LA(1)=='t' ) {
                input.consume();
            }
            else {
                MismatchedSetException mse = new MismatchedSetException(null,input);
                recover(mse);
                throw mse;
            }


            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        	// do for sure before leaving
        }
    }
717077
function addFavicons() {
  var stream = new Transform({objectMode: true, highWaterMark: 2});

  var hosts = {};
  var downloads = [];
  stream._transform = function (page, _, callback) {
    stream.push(page);
    var host = url.parse(page.url).host;
    if (!hosts[host]) {
      downloads.push(hosts[host] = download(url.resolve(page.url, '/favicon.ico')).then(function (result) {
        if (result.statusCode === 200 &&
            !(result.headers['content-type'] &&
              result.headers['content-type'].indexOf('html') !== -1)) {
          stream.push(result);
        }
      }, function () {
        //ignore errors downloading favicons
      }));
    }
    callback(null);
  };
  stream._flush = function (callback) {
    Promise.all(downloads).done(function () {
      callback();
    }, function (err) {
      stream.emit('error', err);
      callback();
    });
  };
  
  return stream;
}
34976
protected void addDecoration (JDecoration decoration) {
		if (m_jDecorations == null) {
			m_jDecorations = new Vector();
		}
		if (!m_jDecorations.contains(decoration)) {
			decoration.setStaffLine(getStaffLine());
			m_jDecorations.add(decoration);
		}
	}
1257038
public static void main(String[] args) throws Exception {
		String dowloadFolder = "images/";
		String urlsFile = "urls.txt";
		int numUrls = 1000;
		int urlsToSkip = 0;
		downloadFromUrlsFile(dowloadFolder, urlsFile, numUrls, urlsToSkip);
	}
771302
public static void addImportStylePatterns(Map<String, Object> patterns,
                                              String str) {
        if ( str == null || "".equals( str.trim() ) ) {
            return;
        }

        String[] items = str.split( " " );
        for (String item : items) {
            String qualifiedNamespace = item.substring(0,
                    item.lastIndexOf('.')).trim();
            String name = item.substring(item.lastIndexOf('.') + 1).trim();
            Object object = patterns.get(qualifiedNamespace);
            if (object == null) {
                if (STAR.equals(name)) {
                    patterns.put(qualifiedNamespace,
                            STAR);
                } else {
                    // create a new list and add it
                    List<String> list = new ArrayList<String>();
                    list.add(name);
                    patterns.put(qualifiedNamespace, list);
                }
            } else if (name.equals(STAR)) {
                // if its a STAR now add it anyway, we don't care if it was a STAR or a List before
                patterns.put(qualifiedNamespace, STAR);
            } else {
                // its a list so add it if it doesn't already exist
                List list = (List) object;
                if (!list.contains(name)) {
                    list.add(name);
                }
            }
        }
    }
434133
private void addApiDocRoots(String packageListUrl) {
	BufferedReader br = null;
	packageListUrl = fixApiDocRoot(packageListUrl);
	try {
	    URL url = new URL(packageListUrl + "/package-list");
	    br = new BufferedReader(new InputStreamReader(url.openStream()));
	    String line;
	    while((line = br.readLine()) != null) {
		line = line + ".";
		Pattern pattern = Pattern.compile(line.replace(".", "\\.") + "[^\\.]*");
		apiDocMap.put(pattern, packageListUrl);
	    }
	} catch(IOException e) {
	    System.err.println("Errors happened while accessing the package-list file at "
		    + packageListUrl);
	} finally {
	    if(br != null)
		try {
		    br.close();
		} catch (IOException e) {}
	}
	
    }
242375
function() {
    this.uuid = undefined;
    this.icon = undefined;
    this.customIcon = undefined;
    this.fgColor = undefined;
    this.bgColor = undefined;
    this.overrideUrl = undefined;
    this.tags = [];
    this.times = new KdbxTimes();
    this.fields = {};
    this.binaries = {};
    this.autoType = {
        enabled: true, obfuscation: undefined, defaultSequence: undefined, items: []
    };
    this.history = [];
    this.parentGroup = undefined;
    this.customData = undefined;
    this._editState = undefined;
    Object.preventExtensions(this);
}
1279117
static private Module addFilesInDir(File dir, int rootPrefix, File root,
                                        Set<String> suffixes, boolean allow_javas,
                                        List<String> excludeFiles, List<String> includeFiles, boolean all,
                                        Map<String,Source> foundFiles,
                                        Map<String,Module> foundModules,
                                        Module currentModule,
                                        boolean inGensrc,
                                        boolean inLinksrc)
        throws ProblemException
    {
        for (File f : dir.listFiles()) {
            if (f.isFile()) {
                boolean should_add =
                    (excludeFiles == null || excludeFiles.isEmpty() || !hasFileMatch(f.getPath(), excludeFiles))
                    && (includeFiles == null || includeFiles.isEmpty() || hasFileMatch(f.getPath(), includeFiles));

                if (should_add) {
                    if (!allow_javas && f.getName().endsWith(".java")) {
                        throw new ProblemException("No .java files are allowed in the source root "+dir.getPath()+
                                                   ", please remove "+f.getName());
                    }
                    // Extract the file name relative the root.
                    String fn = f.getPath().substring(rootPrefix);
                    // Extract the package name.
                    int sp = fn.lastIndexOf(File.separatorChar);
                    String pkg = "";
                    if (sp != -1) {
                        pkg = fn.substring(0,sp).replace(File.separatorChar,'.');
                    }
                    // Is this a module-info.java file?
                    if (fn.endsWith("module-info.java")) {
                        // Aha! We have recursed into a module!
                        if (!currentModule.name().equals("")) {
                            throw new ProblemException("You have an extra module-info.java inside a module! Please remove "+fn);
                        }
                        String module_name = fn.substring(0,fn.length()-16);
                        currentModule = new Module(module_name, f.getPath());
                        foundModules.put(module_name, currentModule);
                    }
                    // Extract the suffix.
                    int dp = fn.lastIndexOf(".");
                    String suffix = "";
                    if (dp > 0) {
                        suffix = fn.substring(dp);
                    }
                    // Should the file be added?
                    if (all || suffixes.contains(suffix)) {
                        Source of = foundFiles.get(f.getPath());
                        if (of != null) {
                            throw new ProblemException("You have already added the file "+fn+" from "+of.file().getPath());
                        }
                        of = currentModule.lookupSource(f.getPath());
                        if (of != null) {
                            // Oups, the source is already added, could be ok, could be not, lets check.
                            if (inLinksrc) {
                                // So we are collecting sources for linking only.
                                if (of.isLinkedOnly()) {
                                    // Ouch, this one is also for linking only. Bad.
                                    throw new ProblemException("You have already added the link only file "+fn+" from "+of.file().getPath());
                                }
                                // Ok, the existing source is to be compiled. Thus this link only is redundant
                                // since all compiled are also linked to. Continue to the next source.
                                // But we need to add the source, so that it will be visible to linking,
                                // if not the multi core compile will fail because a JavaCompiler cannot
                                // find the necessary dependencies for its part of the source.
                                foundFiles.put(f.getPath(), of);
                                continue;
                            } else {
                                // We are looking for sources to compile, if we find an existing to be compiled
                                // source with the same name, it is an internal error, since we must
                                // find the sources to be compiled before we find the sources to be linked to.
                                throw new ProblemException("Internal error: Double add of file "+fn+" from "+of.file().getPath());
                            }
                        }
                        Source s = new Source(currentModule, f.getPath(), f, root);
                        if (inGensrc) s.markAsGenerated();
                        if (inLinksrc) {
                            s.markAsLinkedOnly();
                        }
                        pkg = currentModule.name()+":"+pkg;
                        foundFiles.put(f.getPath(), s);
                        currentModule.addSource(pkg, s);
                    }
                }
            }
        }
        return currentModule;
    }
64440
private void setAddInfoMaps() {

        m_addInfoEditable = new TreeMap<String, Object>();
        m_addInfoReadOnly = new TreeMap<String, Object>();
        Iterator<Entry<String, Object>> itEntries = m_user.getAdditionalInfo().entrySet().iterator();
        while (itEntries.hasNext()) {
            Entry<String, Object> entry = itEntries.next();
            String key = entry.getKey().toString();
            if ((entry.getValue() == null) || CmsStringUtil.isEmptyOrWhitespaceOnly(entry.getValue().toString())) {
                // skip empty entries
                continue;
            }
            if (!entry.getValue().getClass().equals(String.class)) {
                // only show type different to string
                key += "@" + entry.getValue().getClass().getName();
            }
            if (CmsDataTypeUtil.isParseable(entry.getValue().getClass())) {
                m_addInfoEditable.put(key, entry.getValue());
            } else {
                String value = entry.getValue().toString();
                if (value.length() > (75 - key.length())) {
                    if ((75 - key.length()) > 5) {
                        value = value.substring(0, (75 - key.length())) + " ...";
                    } else {
                        value = "...";
                    }
                }
                m_addInfoReadOnly.put(key, value);
            }
        }
    }
668330
function appendText(str, isPlainText) {
		let i = newTokens.length - 1,
			last = newTokens[i]

		if (isPlainText) {
			if (lastTextWasPlain && lastPlainTextWasSpaced) {
				// Remove preceding spaces, since the last plain text
				// ended in spaces
				str = str.trimLeft()
			}

			str = str.replace(/(\s)\s+/g, '$1')
			lastPlainTextWasSpaced = /^\s$/.test(str.substr(-1))
		}
		lastTextWasPlain = isPlainText

		if (typeof last === 'string') {
			newTokens[i] += str
		} else {
			newTokens.push(str)
		}
	}
684653
async function main(inputFile, outputFile) {
  const Canvas = require('canvas');
  outputFile = outputFile || 'out.png';
  const faces = await detectFaces(inputFile);
  console.log('Highlighting...');
  await highlightFaces(inputFile, faces, outputFile, Canvas);
  console.log('Finished!');
}
1152290
private void installClientDecorations(JRootPane root) {
        installBorder(root);
        if (root.getParent() instanceof JFrame || root.getParent() instanceof JDialog) {
            if (PlatformUtils.isMac()) {
                makeFrameBackgroundTransparent(root);
            } else {
                shapeWindow(root);
            }
        }

        JComponent titlePane = createTitlePane(root);

        setTitlePane(root, titlePane);
        installWindowListeners(root, root.getParent());
        installLayout(root);
        if (window != null) {
            root.revalidate();
            root.repaint();
        }
    }
576337
public void decorate(Object element, IDecoration decoration)
	{
		int adornmentFlags = computeAdornmentFlags(element);
		if (adornmentFlags == ERRORTICK_ERROR)
		{
			decoration.addOverlay(VdmPluginImages.DESC_OVR_ERROR);
		} else if (adornmentFlags == ERRORTICK_WARNING)
		{
			decoration.addOverlay(VdmPluginImages.DESC_OVR_WARNING);
		}
	}
826278
private static void printUsage() {
		FeatureTiles featureTiles = new DefaultFeatureTiles(null);
		System.out.println();
		System.out.println("USAGE");
		System.out.println();
		System.out
				.println("\t["
						+ ARGUMENT_PREFIX
						+ ARGUMENT_MAX_FEATURES_PER_TILE
						+ " max_features_per_tile] ["
						+ ARGUMENT_PREFIX
						+ ARGUMENT_COMPRESS_FORMAT
						+ " compress_format] ["
						+ ARGUMENT_PREFIX
						+ ARGUMENT_COMPRESS_QUALITY
						+ " compress_quality] ["
						+ ARGUMENT_PREFIX
						+ ARGUMENT_GOOGLE_TILES
						+ "] ["
						+ ARGUMENT_PREFIX
						+ ARGUMENT_BOUNDING_BOX
						+ " minLon,minLat,maxLon,maxLat] ["
						+ ARGUMENT_PREFIX
						+ ARGUMENT_EPSG
						+ " epsg] ["
						+ ARGUMENT_PREFIX
						+ ARGUMENT_TILE_WIDTH
						+ " width] ["
						+ ARGUMENT_PREFIX
						+ ARGUMENT_TILE_HEIGHT
						+ " height] ["
						+ ARGUMENT_PREFIX
						+ ARGUMENT_TILE_SCALE
						+ " scale] ["
						+ ARGUMENT_PREFIX
						+ ARGUMENT_POINT_RADIUS
						+ " radius] ["
						+ ARGUMENT_PREFIX
						+ ARGUMENT_POINT_COLOR
						+ " color] ["
						+ ARGUMENT_PREFIX
						+ ARGUMENT_POINT_ICON
						+ " image_file] ["
						+ ARGUMENT_PREFIX
						+ ARGUMENT_ICON_WIDTH
						+ " width] ["
						+ ARGUMENT_PREFIX
						+ ARGUMENT_ICON_HEIGHT
						+ " height] ["
						+ ARGUMENT_PREFIX
						+ ARGUMENT_POINT_CENTER_ICON
						+ "] ["
						+ ARGUMENT_PREFIX
						+ ARGUMENT_LINE_STROKE_WIDTH
						+ " stroke_width] ["
						+ ARGUMENT_PREFIX
						+ ARGUMENT_LINE_COLOR
						+ " color] ["
						+ ARGUMENT_PREFIX
						+ ARGUMENT_POLYGON_STROKE_WIDTH
						+ " stroke_width] ["
						+ ARGUMENT_PREFIX
						+ ARGUMENT_POLYGON_COLOR
						+ " color] ["
						+ ARGUMENT_PREFIX
						+ ARGUMENT_FILL_POLYGON
						+ "] ["
						+ ARGUMENT_PREFIX
						+ ARGUMENT_POLYGON_FILL_COLOR
						+ " color] ["
						+ ARGUMENT_PREFIX
						+ ARGUMENT_SIMPLIFY_GEOMETRIES
						+ " true|false] ["
						+ ARGUMENT_PREFIX
						+ ARGUMENT_IGNORE_GEOPACKAGE_STYLES
						+ " true|false] feature_geopackage_file feature_table tile_geopackage_file tile_table min_zoom max_zoom");
		System.out.println();
		System.out.println("DESCRIPTION");
		System.out.println();
		System.out
				.println("\tGenerates tiles from a GeoPackage feature table into a tile table");
		System.out.println();
		System.out.println("ARGUMENTS");
		System.out.println();
		System.out.println("\t" + ARGUMENT_PREFIX
				+ ARGUMENT_MAX_FEATURES_PER_TILE + " max_features_per_tile");
		System.out
				.println("\t\tMax features to generate into a tile before generating a numbered feature count tile (default is "
						+ DEFAULT_MAX_FEATURES_PER_TILE
						+ ", use -1 for no max)");
		System.out.println();
		System.out.println("\t" + ARGUMENT_PREFIX + ARGUMENT_COMPRESS_FORMAT
				+ " compress_format");
		System.out
				.println("\t\tTile compression image format: png, jpg, jpeg (default is no compression, native format)");
		System.out.println();
		System.out.println("\t" + ARGUMENT_PREFIX + ARGUMENT_COMPRESS_QUALITY
				+ " compress_quality");
		System.out
				.println("\t\tTile compression image quality between 0.0 and 1.0 (not valid for png, default is 1.0)");
		System.out.println();
		System.out.println("\t" + ARGUMENT_PREFIX + ARGUMENT_GOOGLE_TILES);
		System.out
				.println("\t\tGenerate tiles in Google tile format (default is GeoPackage format with minimum bounds)");
		System.out.println();
		System.out.println("\t" + ARGUMENT_PREFIX + ARGUMENT_BOUNDING_BOX
				+ " minLon,minLat,maxLon,maxLat");
		System.out
				.println("\t\tOnly tiles overlapping the bounding box are requested (default is the world)");
		System.out.println();
		System.out.println("\t" + ARGUMENT_PREFIX + ARGUMENT_EPSG + " epsg");
		System.out
				.println("\t\tEPSG number of the provided bounding box (default is 4326, WGS 84)");
		System.out.println();
		System.out.println("\t" + ARGUMENT_PREFIX + ARGUMENT_TILE_WIDTH
				+ " width");
		System.out
				.println("\t\tWidth used when creating each tile (default is "
						+ featureTiles.getTileWidth() + ")");
		System.out.println();
		System.out.println("\t" + ARGUMENT_PREFIX + ARGUMENT_TILE_HEIGHT
				+ " height");
		System.out
				.println("\t\tHeight used when creating each tile (default is "
						+ featureTiles.getTileHeight() + ")");
		System.out.println();
		System.out.println("\t" + ARGUMENT_PREFIX + ARGUMENT_TILE_SCALE
				+ " scale");
		System.out
				.println("\t\tScale factor used when creating each tile (default is "
						+ featureTiles.getScale() + ")");
		System.out.println();
		System.out.println("\t" + ARGUMENT_PREFIX + ARGUMENT_POINT_RADIUS
				+ " radius");
		System.out
				.println("\t\tFloating point circle radius used when drawing points (default is "
						+ featureTiles.getPointRadius() + ")");
		System.out.println();
		System.out.println("\t" + ARGUMENT_PREFIX + ARGUMENT_POINT_COLOR
				+ " color");
		System.out
				.println("\t\tColor used when drawing points formatted as one of: [ name | r,g,b | r,g,b,a ] (default is "
						+ colorString(featureTiles.getPointColor()) + ")");
		System.out.println();
		System.out.println("\t" + ARGUMENT_PREFIX + ARGUMENT_POINT_ICON
				+ " image_file");
		System.out
				.println("\t\tImage file containing image to use when drawing points in place of a drawn circle");
		System.out.println();
		System.out.println("\t" + ARGUMENT_PREFIX + ARGUMENT_ICON_WIDTH
				+ " width");
		System.out
				.println("\t\tPoint icon display width (default is actual icon width)");
		System.out.println();
		System.out.println("\t" + ARGUMENT_PREFIX + ARGUMENT_ICON_HEIGHT
				+ " height");
		System.out
				.println("\t\tPoint icon display height (default is actual icon height)");
		System.out.println();
		System.out.println("\t" + ARGUMENT_PREFIX + ARGUMENT_POINT_CENTER_ICON);
		System.out
				.println("\t\tDraw point icons by centering the icon image to the location (default is pinning to bottom center)");
		System.out.println();
		System.out.println("\t" + ARGUMENT_PREFIX + ARGUMENT_LINE_STROKE_WIDTH
				+ " stroke_width");
		System.out
				.println("\t\tFloating point stroke width when drawing lines (default is "
						+ featureTiles.getLineStrokeWidth() + ")");
		System.out.println();
		System.out.println("\t" + ARGUMENT_PREFIX + ARGUMENT_LINE_COLOR
				+ " color");
		System.out
				.println("\t\tColor used when drawing lines formatted as one of: [ name | r,g,b | r,g,b,a ] (default is "
						+ colorString(featureTiles.getLineColor()) + ")");
		System.out.println();
		System.out.println("\t" + ARGUMENT_PREFIX
				+ ARGUMENT_POLYGON_STROKE_WIDTH + " stroke_width");
		System.out
				.println("\t\tFloating point stroke width when drawing polygons (default is "
						+ featureTiles.getPolygonStrokeWidth() + ")");
		System.out.println();
		System.out.println("\t" + ARGUMENT_PREFIX + ARGUMENT_POLYGON_COLOR
				+ " color");
		System.out
				.println("\t\tColor used when drawing polygons formatted as one of: [ name | r,g,b | r,g,b,a ] (default is "
						+ colorString(featureTiles.getPolygonColor()) + ")");
		System.out.println();
		System.out.println("\t" + ARGUMENT_PREFIX + ARGUMENT_FILL_POLYGON);
		System.out.println("\t\tFill polygons with color (default is "
				+ featureTiles.isFillPolygon() + ")");
		System.out.println();
		System.out.println("\t" + ARGUMENT_PREFIX + ARGUMENT_POLYGON_FILL_COLOR
				+ " color");
		System.out
				.println("\t\tColor used when filling polygons formatted as one of: [ name | r,g,b | r,g,b,a ] (default is "
						+ colorString(featureTiles.getPolygonFillColor()) + ")");
		System.out.println();
		System.out.println("\t" + ARGUMENT_PREFIX
				+ ARGUMENT_SIMPLIFY_GEOMETRIES + " true|false");
		System.out
				.println("\t\tFlag indicating whether geometries should be simplified with a similar curve with fewer points before drawn (default is true)");
		System.out.println();
		System.out.println("\t" + ARGUMENT_PREFIX
				+ ARGUMENT_IGNORE_GEOPACKAGE_STYLES + " true|false");
		System.out
				.println("\t\tFlag indicating whether styles saved within the GeoPackage should be ignored (default is false)");
		System.out.println();
		System.out.println("\tfeature_geopackage_file");
		System.out
				.println("\t\tpath to the GeoPackage file containing the feature table to generate tiles from");
		System.out.println();
		System.out.println("\tfeature_table");
		System.out
				.println("\t\tfeature table name within the GeoPackage file to generate tiles from");
		System.out.println();
		System.out.println("\ttile_geopackage_file");
		System.out
				.println("\t\tpath to the GeoPackage file to create with tiles, or existing file to update");
		System.out.println();
		System.out.println("\ttile_table");
		System.out
				.println("\t\ttile table name within the GeoPackage file to create or update");
		System.out.println();
		System.out.println("\tmin_zoom");
		System.out.println("\t\tMinimum zoom level to request tiles for");
		System.out.println();
		System.out.println("\tmax_zoom");
		System.out.println("\t\tMaximum zoom level to request tiles for");
		System.out.println();
	}
541395
private void loadStandardHtmlColors() {

		if (standardHtmlColorNames==null) {
			standardHtmlColorNames = new Hashtable<String,Color>();
			addStandardHtmlColor( "AliceBlue" 	, new Color(0xF0F8FF));
			addStandardHtmlColor( "AntiqueWhite" 	, new Color(0xFAEBD7));
			addStandardHtmlColor( "Aqua" 	, new Color(0x00FFFF));
			addStandardHtmlColor( "Aquamarine" 	, new Color(0x7FFFD4));
			addStandardHtmlColor( "Azure" 	, new Color(0xF0FFFF));
			addStandardHtmlColor( "Beige" 	, new Color(0xF5F5DC));
			addStandardHtmlColor( "Bisque" 	, new Color(0xFFE4C4));
			addStandardHtmlColor( "Black" 	, new Color(0x000000));
			addStandardHtmlColor( "BlanchedAlmond" 	, new Color(0xFFEBCD));
			addStandardHtmlColor( "Blue" 	, new Color(0x0000FF));
			addStandardHtmlColor( "BlueViolet" 	, new Color(0x8A2BE2));
			addStandardHtmlColor( "Brown" 	, new Color(0xA52A2A));
			addStandardHtmlColor( "BurlyWood" 	, new Color(0xDEB887));
			addStandardHtmlColor( "CadetBlue" 	, new Color(0x5F9EA0));
			addStandardHtmlColor( "Chartreuse" 	, new Color(0x7FFF00));
			addStandardHtmlColor( "Chocolate" 	, new Color(0xD2691E));
			addStandardHtmlColor( "Coral" 	, new Color(0xFF7F50));
			addStandardHtmlColor( "CornflowerBlue" 	, new Color(0x6495ED));
			addStandardHtmlColor( "Cornsilk" 	, new Color(0xFFF8DC));
			addStandardHtmlColor( "Crimson" 	, new Color(0xDC143C));
			addStandardHtmlColor( "Cyan" 	, new Color(0x00FFFF));
			addStandardHtmlColor( "DarkBlue" 	, new Color(0x00008B));
			addStandardHtmlColor( "DarkCyan" 	, new Color(0x008B8B));
			addStandardHtmlColor( "DarkGoldenRod" 	, new Color(0xB8860B));
			addStandardHtmlColor( "DarkGray" 	, new Color(0xA9A9A9));
			addStandardHtmlColor( "DarkGreen" 	, new Color(0x006400));
			addStandardHtmlColor( "DarkKhaki" 	, new Color(0xBDB76B));
			addStandardHtmlColor( "DarkMagenta" 	, new Color(0x8B008B));
			addStandardHtmlColor( "DarkOliveGreen" 	, new Color(0x556B2F));
			addStandardHtmlColor( "DarkOrange" 	, new Color(0xFF8C00));
			addStandardHtmlColor( "DarkOrchid" 	, new Color(0x9932CC));
			addStandardHtmlColor( "DarkRed" 	, new Color(0x8B0000));
			addStandardHtmlColor( "DarkSalmon" 	, new Color(0xE9967A));
			addStandardHtmlColor( "DarkSeaGreen" 	, new Color(0x8FBC8F));
			addStandardHtmlColor( "DarkSlateBlue" 	, new Color(0x483D8B));
			addStandardHtmlColor( "DarkSlateGray" 	, new Color(0x2F4F4F));
			addStandardHtmlColor( "DarkTurquoise" 	, new Color(0x00CED1));
			addStandardHtmlColor( "DarkViolet" 	, new Color(0x9400D3));
			addStandardHtmlColor( "DeepPink" 	, new Color(0xFF1493));
			addStandardHtmlColor( "DeepSkyBlue" 	, new Color(0x00BFFF));
			addStandardHtmlColor( "DimGray" 	, new Color(0x696969));
			addStandardHtmlColor( "DodgerBlue" 	, new Color(0x1E90FF));
			addStandardHtmlColor( "FireBrick" 	, new Color(0xB22222));
			addStandardHtmlColor( "FloralWhite" 	, new Color(0xFFFAF0));
			addStandardHtmlColor( "ForestGreen" 	, new Color(0x228B22));
			addStandardHtmlColor( "Fuchsia" 	, new Color(0xFF00FF));
			addStandardHtmlColor( "Gainsboro" 	, new Color(0xDCDCDC));
			addStandardHtmlColor( "GhostWhite" 	, new Color(0xF8F8FF));
			addStandardHtmlColor( "Gold" 	, new Color(0xFFD700));
			addStandardHtmlColor( "GoldenRod" 	, new Color(0xDAA520));
			addStandardHtmlColor( "Gray" 	, new Color(0x808080));
			addStandardHtmlColor( "Green" 	, new Color(0x008000));
			addStandardHtmlColor( "GreenYellow" 	, new Color(0xADFF2F));
			addStandardHtmlColor( "HoneyDew" 	, new Color(0xF0FFF0));
			addStandardHtmlColor( "HotPink" 	, new Color(0xFF69B4));
			addStandardHtmlColor( "IndianRed " 	, new Color(0xCD5C5C));
			addStandardHtmlColor( "Indigo " 	, new Color(0x4B0082));
			addStandardHtmlColor( "Ivory" 	, new Color(0xFFFFF0));
			addStandardHtmlColor( "Khaki" 	, new Color(0xF0E68C));
			addStandardHtmlColor( "Lavender" 	, new Color(0xE6E6FA));
			addStandardHtmlColor( "LavenderBlush" 	, new Color(0xFFF0F5));
			addStandardHtmlColor( "LawnGreen" 	, new Color(0x7CFC00));
			addStandardHtmlColor( "LemonChiffon" 	, new Color(0xFFFACD));
			addStandardHtmlColor( "LightBlue" 	, new Color(0xADD8E6));
			addStandardHtmlColor( "LightCoral" 	, new Color(0xF08080));
			addStandardHtmlColor( "LightCyan" 	, new Color(0xE0FFFF));
			addStandardHtmlColor( "LightGoldenRodYellow" 	, new Color(0xFAFAD2));
			addStandardHtmlColor( "LightGray" 	, new Color(0xD3D3D3));
			addStandardHtmlColor( "LightGreen" 	, new Color(0x90EE90));
			addStandardHtmlColor( "LightPink" 	, new Color(0xFFB6C1));
			addStandardHtmlColor( "LightSalmon" 	, new Color(0xFFA07A));
			addStandardHtmlColor( "LightSeaGreen" 	, new Color(0x20B2AA));
			addStandardHtmlColor( "LightSkyBlue" 	, new Color(0x87CEFA));
			addStandardHtmlColor( "LightSlateGray" 	, new Color(0x778899));
			addStandardHtmlColor( "LightSteelBlue" 	, new Color(0xB0C4DE));
			addStandardHtmlColor( "LightYellow" 	, new Color(0xFFFFE0));
			addStandardHtmlColor( "Lime" 	, new Color(0x00FF00));
			addStandardHtmlColor( "LimeGreen" 	, new Color(0x32CD32));
			addStandardHtmlColor( "Linen" 	, new Color(0xFAF0E6));
			addStandardHtmlColor( "Magenta" 	, new Color(0xFF00FF));
			addStandardHtmlColor( "Maroon" 	, new Color(0x800000));
			addStandardHtmlColor( "MediumAquaMarine" 	, new Color(0x66CDAA));
			addStandardHtmlColor( "MediumBlue" 	, new Color(0x0000CD));
			addStandardHtmlColor( "MediumOrchid" 	, new Color(0xBA55D3));
			addStandardHtmlColor( "MediumPurple" 	, new Color(0x9370DB));
			addStandardHtmlColor( "MediumSeaGreen" 	, new Color(0x3CB371));
			addStandardHtmlColor( "MediumSlateBlue" 	, new Color(0x7B68EE));
			addStandardHtmlColor( "MediumSpringGreen" 	, new Color(0x00FA9A));
			addStandardHtmlColor( "MediumTurquoise" 	, new Color(0x48D1CC));
			addStandardHtmlColor( "MediumVioletRed" 	, new Color(0xC71585));
			addStandardHtmlColor( "MidnightBlue" 	, new Color(0x191970));
			addStandardHtmlColor( "MintCream" 	, new Color(0xF5FFFA));
			addStandardHtmlColor( "MistyRose" 	, new Color(0xFFE4E1));
			addStandardHtmlColor( "Moccasin" 	, new Color(0xFFE4B5));
			addStandardHtmlColor( "NavajoWhite" 	, new Color(0xFFDEAD));
			addStandardHtmlColor( "Navy" 	, new Color(0x000080));
			addStandardHtmlColor( "OldLace" 	, new Color(0xFDF5E6));
			addStandardHtmlColor( "Olive" 	, new Color(0x808000));
			addStandardHtmlColor( "OliveDrab" 	, new Color(0x6B8E23));
			addStandardHtmlColor( "Orange" 	, new Color(0xFFA500));
			addStandardHtmlColor( "OrangeRed" 	, new Color(0xFF4500));
			addStandardHtmlColor( "Orchid" 	, new Color(0xDA70D6));
			addStandardHtmlColor( "PaleGoldenRod" 	, new Color(0xEEE8AA));
			addStandardHtmlColor( "PaleGreen" 	, new Color(0x98FB98));
			addStandardHtmlColor( "PaleTurquoise" 	, new Color(0xAFEEEE));
			addStandardHtmlColor( "PaleVioletRed" 	, new Color(0xDB7093));
			addStandardHtmlColor( "PapayaWhip" 	, new Color(0xFFEFD5));
			addStandardHtmlColor( "PeachPuff" 	, new Color(0xFFDAB9));
			addStandardHtmlColor( "Peru" 	, new Color(0xCD853F));
			addStandardHtmlColor( "Pink" 	, new Color(0xFFC0CB));
			addStandardHtmlColor( "Plum" 	, new Color(0xDDA0DD));
			addStandardHtmlColor( "PowderBlue" 	, new Color(0xB0E0E6));
			addStandardHtmlColor( "Purple" 	, new Color(0x800080));
			addStandardHtmlColor( "RebeccaPurple" 	, new Color(0x663399));
			addStandardHtmlColor( "Red" 	, new Color(0xFF0000));
			addStandardHtmlColor( "RosyBrown" 	, new Color(0xBC8F8F));
			addStandardHtmlColor( "RoyalBlue" 	, new Color(0x4169E1));
			addStandardHtmlColor( "SaddleBrown" 	, new Color(0x8B4513));
			addStandardHtmlColor( "Salmon" 	, new Color(0xFA8072));
			addStandardHtmlColor( "SandyBrown" 	, new Color(0xF4A460));
			addStandardHtmlColor( "SeaGreen" 	, new Color(0x2E8B57));
			addStandardHtmlColor( "SeaShell" 	, new Color(0xFFF5EE));
			addStandardHtmlColor( "Sienna" 	, new Color(0xA0522D));
			addStandardHtmlColor( "Silver" 	, new Color(0xC0C0C0));
			addStandardHtmlColor( "SkyBlue" 	, new Color(0x87CEEB));
			addStandardHtmlColor( "SlateBlue" 	, new Color(0x6A5ACD));
			addStandardHtmlColor( "SlateGray" 	, new Color(0x708090));
			addStandardHtmlColor( "Snow" 	, new Color(0xFFFAFA));
			addStandardHtmlColor( "SpringGreen" 	, new Color(0x00FF7F));
			addStandardHtmlColor( "SteelBlue" 	, new Color(0x4682B4));
			addStandardHtmlColor( "Tan" 	, new Color(0xD2B48C));
			addStandardHtmlColor( "Teal" 	, new Color(0x008080));
			addStandardHtmlColor( "Thistle" 	, new Color(0xD8BFD8));
			addStandardHtmlColor( "Tomato" 	, new Color(0xFF6347));
			addStandardHtmlColor( "Turquoise" 	, new Color(0x40E0D0));
			addStandardHtmlColor( "Violet" 	, new Color(0xEE82EE));
			addStandardHtmlColor( "Wheat" 	, new Color(0xF5DEB3));
			addStandardHtmlColor( "White" 	, new Color(0xFFFFFF));
			addStandardHtmlColor( "WhiteSmoke" 	, new Color(0xF5F5F5));
			addStandardHtmlColor( "Yellow" 	, new Color(0xFFFF00));
			addStandardHtmlColor( "YellowGreen" 	, new Color(0x9ACD32));
			log.debug("Standard HTML color names loaded.");
		}
	}
944062
public static void main(String[] args) throws IOException {
		String s = doc(svg(
				160,
				200,
				rect(0, 0, 160, 200, "fill:red;")
						+ svg(10,
								10,
								100,
								100,
								rect(0, 0, 100, 100,
										"fill:orange; stroke:rgb(0,0,0);"))
						+ line(20, 20, 100, 100,
								"stroke:black; stroke-width:2px;")
						+ line(20, 100, 100, 20,
								"stroke:black; stroke-width:2px;")
						+ text(10,
								140,
								"font-family:verdana; font-size:20px; font-weight:bold;",
								"Hello world")));

		File file = new File("demo.svg");
		FileWriter w = null;
		try {
		    w = new FileWriter(file);
	        w.write(s);
		} finally {
		    if (w != null) {
		        w.close();
		    }
		}
		System.out.println(String.format("File written: %s",
				file.getAbsolutePath()));

		// optionally view the just created file
		if (args.length > 0 && args[0].equals("-view")) {
			if (!viewSVG(file)) {
				System.err.println("'-view' not supported on this platform");
			}
		}
	}