博文

目前显示的是 十二月, 2015的博文

System.exit()

Exit code is 0 when execution went fine; 1 , -1 , whatever != 0 when some error occurred, you can use different values for different kind of errors. If I'm correct exit codes used to be just positive numbers (I mean in UNIX) and according to range: 1-127 are user defined codes (so generated by calling exit(n) ) 128-255 are codes generated by termination due to different unix signals like SIGSEGV or SIGTERM The following codes are from http://www.opensource.apple.com/source/Libc/Libc-320/include/sysexits.h. Note Ref: http://stackoverflow.com/questions/2434592/difference-in-system-exit0-system-exit-1-system-exit1-in-java sysexits.h    [ plain text ] /* * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source

data-* in HTML5

Example: <article id="tu" data-category="Demo1" data-author="1"> ... </article> 1. In JavaScript :getAttribute() and dataset。   getAttribute     document.getElementById('tu').getAttribute('data-category');   setAttribute     document.getElementById('tu').setAttribute ( 'data-author' , '2' ) ;     var a = document.getElementById('tu');     a.dataset.category = "xxx";     a.setAttribute("data-category", "xxx");    dataset      var article = document.getElementById('tu');      var data = article.dataset;      alert(data.category);      alert(data.author); //1 2. jQuery   $("#tu").data('category');   $("#tu").data("category", "Uncategorized"); 3. CSS  attr    article::before {       content: attr(data-category);    }  article[data-author='1'] {     border-width: 1px;  }

List of Rundll32 commands for Windows 10/8/7

List of Rundll32 commands for Windows 10/8/7 This is from http://www.thewindowsclub.com/rundll32-shortcut-commands-windows  Thanks Anand Khanse aka HappyAndyK is an end-user Windows enthusiast, a Microsoft MVP in Windows, since 2006, and the Admin of TheWindowsClub.com. Please read the entire post & the comments first, create a System Restore Point before making any changes to your system & be careful about any 3rd-party offers while installing freeware. RECOMMENDED: Click here to fix Windows errors and optimize system performance I have compiled a list of Windows Rundll32 commands, which can be used for directly invoking the specified functions or to create shortcuts of those, which you use and require frequently. Rundll32 commands for Windows To Create Desktop Shortcuts : Right click on desktop > New > Shortcut. In the first box of the Create Shortcut Wizard, copy-paste the desired command. Then Click Next. Give the Shortcut a

Return JSON from a JSP

图片
I need using a JSP returns JSON, so wrote the following codes for testing. Fortunately i t works. /*  This file name is json.jsp. It posts itself, then get JSON. */ <%response.setHeader("Cache-Control", "no-cache");%> <%response.setHeader("Pragma", "no-cache");%> <% String t = request.getParameter("t"); if(t==null){ %> <!DOCTYPE html> <% response.setHeader("contentType","text/html;charset=UTF-8"); %> <script type="text/javascript">   var XHR;   function requestJSON(){       if ( window.XMLHttpRequest )          XHR = new XMLHttpRequest();       else if ( window.ActiveXObject ) {          try {             XHR = new ActiveXObject('Msxml2.XMLHTTP');          }          catch(err) {             XHR = new ActiveXObject('Microsoft.XMLHTTP');          }       }       XHR.open( "POST", "json.jsp", true );       XHR.

Using setInfoWindowStyle("MVInfoWindowStyle2",...) in Oracle Mapviewer, setInfoWindowTitle() is invalid.

There is an issue in oraclemaps.js of Oracle Fusion Middleware MapViewer Version 11g ps6 (11.1.1.7.1). When the value of the parameter style is "MVInfoWindowStyle2" in the function MVThemeBasedFOI.setInfoWindowStyle(style, styleParameters), the function MVThemeBasedFOI.setInfoWindowTitle does not work. So must re-write the part of oraclemaps.js, the codes are the following MVThemeBasedFOI.prototype.setInfoWindowTitle = function (x90) {     this._f320 = x90;     MVInfoWindowStyle2.Title=x90; } MVInfoWindowStyle2.addContent = function (x5) {     try{     if(this.Title!=undefined){      x5.childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[1].childNodes[0].childNodes[0].childNodes[0].innerHTML=this.Title;     }     }catch(e){       try{       x5.childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[0].innerHTML=this.Title;       }catch(e){}     }     x5.style.left = MVUtil._f26(55);     x5.style.top

JavaFX

The projects with JavaFX: Groovy FX: groovyfx.org ScalaFX: http://www.scalafx.org/                https://github.com/scalafx  https://github.com/scalafx/scalafx.github.io Visage: https://github.com/visage-lang Note: This tool has been renamed javapackager .exe. The javafxpackager.exe file may be removed in a future release. Please update your scripts to use javapackager . Ref: https://docs.oracle.com/javase/8/docs/technotes/tools/unix/javafxpackager.html Commands You can specify one of the following commands. After the command, specify the options for it. -createbss Converts CSS files into binary form. -createjar Produces a JAR archive according to other parameters. -deploy Assembles the application package for redistribution. By default, the deploy task generates the base application package, but it can also generate a self-contained application package if requested. -makeall Performs compilation, createjar , and deploy steps as one call, with most arguments