Showing posts with label webpage. Show all posts
Showing posts with label webpage. Show all posts

Aug 8, 2012

How to disallow robots on your webpage


1) make "robots.txt" file in a folder that you want to disallow to collect information.
2) in the txt file,
        user-agent:googlebot
        disallow:All


http://www.robotstxt.org/robotstxt.html

Mar 17, 2012

Java Applets in HTML5

Java Applets in HTML5

1. Creating the Sample Applet

Create Sample.jar from Sample.java, like so:
::] javac -version
javac 1.6.0_21

::] javac Sample.java

::] jar cvf Sample.jar *.class



2. Code to Add Sample Applet to HTML Page

OLD WAY: Java applet in HTML 4.01

<applet code="Sample" archive="Sample.jar" height="300" width="550">
  Applet failed to run.  No Java plug-in was found.
</applet>

NEW WAY: Java Applet in HTML5 (uses object tag)

<object type="application/x-java-applet" height="300" width="550">
  <param name="code" value="Sample" />
  <param name="archive" value="Sample.jar" />
  Applet failed to run.  No Java plug-in was found.
</object>



3. A Better Way

pack200 jar Compression

There is a way to GREATLY reduce the save of the downloaded jar file;
that way is to use pack200 ( pack200 and Compression ).

Creating the Compressed jar File and Sample.jar.pack.gz
::] pack200 -r Sample.jar

::] pack200 Sample.jar.pack.gz Sample.jar

Why Use pack200 and How to Use It in An Applet

NOTE: The command: pack200 -r Sample.jar,
repacks the Sample.jar file
(This produces a slightly smaller jar file. (deflated about 1%))

NOTE: The command: pack200 Sample.jar.pack.gz Sample.jar,
produces a compressed jar file named Sample.jar.pack.gz
(Size of Sample.jar.pack.gz is much smaller (deflated about 70% from original Sample.jar))

When the following line is added to the Java applet:
<param name="java_arguments" value="-Djnlp.packEnabled=true"/>
the Java plug-in will automatically download and try using the compressed jar file (Sample.jar.pack.gz).
If the browser is unable to use the compressed jar file, the uncompressed jar file (Sample.jar) will be downloaded.

Finally, the Best Way to Add A Java Applet to An HTML5 Document



4. BEST WAY: Java Applet in HTML5 (using pack200 jar compression)

<object type="application/x-java-applet" height="300" width="550">
  <param name="code" value="Sample" />
  <param name="archive" value="Sample.jar" />
  <param name="java_arguments" value="-Djnlp.packEnabled=true"/>
  Applet failed to run.  No Java plug-in was found.
</object>


https://eyeasme.com/Shayne/HTML5_APPLETS/

Apr 30, 2011

Text Editor - NotePad++

A very nice text editor program which is free of charge.... NotePad++
http://notepad-plus-plus.org/
A similar program is Acroedit:  http://www.acrosoft.pe.kr/board/ae_intro

HTML or webpage editor :  http://www.kompozer.net/



Tips:

1. vertical block
Pressing Shift + Alt, drag what to be blocked using key-cursor or mouse.

2. when Korean characters are not properly visible,
Setting --> Style configurator
        Language -->  Global Style,   Style --> Global override
        Font Style  -->  Korean font (e.g., 바탕체)
        Check at "Enable global font"