⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 test.html

📁 自动加亮代码/xml等文档
💻 HTML
📖 第 1 页 / 共 2 页
字号:
/** * Mother class of all character objects of the world (PC, NPC...)&lt;BR&gt;&lt;BR&gt; * */public abstract class L2Character extends L2Object{  protected static final Logger _log = Logger.getLogger(L2Character.class.getName());  public static final Short ABNORMAL_EFFECT_BLEEDING = 0x0001; // not sure  public static final Short ABNORMAL_EFFECT_POISON = 0x0002;  public void detachAI() {    _ai = null;    //jbf = null;    if (1 > 5) {      return;    }  }  public void moveTo(int x, int y, int z) {    moveTo(x, y, z, 0);  }  /** Task of AI notification */  @SuppressWarnings( { "nls", "unqualified-field-access", "boxing" })  public class NotifyAITask implements Runnable {    private final CtrlEvent _evt;    public void run() {      try {        getAI().notifyEvent(_evt, null, null);      } catch (Throwable t) {        _log.warning("Exception " + t);        t.printStackTrace();      }    }  }}</code></pre>  <tr>    <th>C++    <td><pre><code>#include &lt;iostream&gt;int main(int argc, char *argv[]) {  /* An annoying "Hello World" example */  for (unsigned i = 0; i &lt; 0xFFFF; i++)    cout &lt;&lt; "Hello, World!" &lt;&lt; endl;  char c = '\n'; // just a test  map &lt;string, vector&lt;string&gt; &gt; m;  m["key"] = "\\\\"; // yaeh, I know it's an error}</code></pre>  <tr>    <th>C#    <td><pre><code>using System;public class Program{    /// &lt;summary&gt;The entry point to the program.&lt;/summary&gt;    /// &lt;remarks&gt;    /// Using the Visual Studio style, the tags in this comment    /// should be grey, but this text should be green.    /// This comment should be green on the inside:    /// &lt;!-- I'm green! --&gt;    /// &lt;/remarks&gt;    public static int Main(string[] args)    {        Console.WriteLine("Hello, World!");        string s = @"This""string""spansmultiplelines!";        return 0;    }}</code></pre>  <tr>    <th>RenderMan RSL    <td><pre><code>#define TEST_DEFINE 3.14/*	plastic surface shader * * 	Pixie is: * 	(c) Copyright 1999-2003 Okan Arikan. All rights reserved. */surface plastic (float Ka = 1, Kd = 0.5, Ks = 0.5, roughness = 0.1;                 color specularcolor = 1;) {	normal Nf = faceforward (normalize(N),I);	Ci = Cs * (Ka*ambient() + Kd*diffuse(Nf)) + specularcolor * Ks *       specular(Nf,-normalize(I),roughness);	Oi = Os;	Ci *= Oi;}</code></pre>  <tr>    <th>RenderMan RIB    <td><pre><code>FrameBegin 0Display "Scene" "framebuffer" "rgb"Option "searchpath" "shader" "+&:/home/kew"Option "trace" "int maxdepth" [4]Attribute "visibility" "trace" [1]Attribute "irradiance" "maxerror" [0.1]Attribute "visibility" "transmission" "opaque"Format 640 480 1.0ShadingRate 2PixelFilter "catmull-rom" 1 1PixelSamples 4 4Projection "perspective" "fov" 49.5502811377Scale 1 1 -1WorldBeginReadArchive "Lamp.002_Light/instance.rib"Surface "plastic"ReadArchive "Cube.004_Mesh/instance.rib"# ReadArchive "Sphere.010_Mesh/instance.rib"# ReadArchive "Sphere.009_Mesh/instance.rib"ReadArchive "Sphere.006_Mesh/instance.rib"WorldEndFrameEnd</code></pre>  <tr>    <th>MEL (Maya Embedded Language)    <td><pre><code class="mel">proc string[] getSelectedLights(){  string $selectedLights[];  string $select[] = `ls -sl -dag -leaf`;  for ( $shape in $select )  {    // Determine if this is a light.    //    string $class[] = getClassification( `nodeType $shape` );    if ( ( `size $class` ) > 0 &amp;&amp; ( "light" == $class[0] ) )    {      $selectedLights[ `size $selectedLights` ] = $shape;    }  }  // Result is an array of all lights included in  // current selection list.  return $selectedLights;}</code></pre>  <tr>    <th>SQL    <td><pre><code>BEGIN;CREATE TABLE "cicero_topic" (    "id" serial NOT NULL PRIMARY KEY,    "forum_id" integer NOT NULL,    "subject" varchar(255) NOT NULL,    "created" timestamp with time zone NOT NULL);ALTER TABLE "cicero_topic"ADD CONSTRAINT forum_id_refs_id_4be56999FOREIGN KEY ("forum_id")REFERENCES "cicero_forum" ("id")DEFERRABLE INITIALLY DEFERRED;-- Initialsinsert into "cicero_forum"  ("slug", "name", "group", "ordering")values  ('test', 'Forum for te''sting', 'Test', 0);-- Testselect count(*) from cicero_forum;COMMIT;</code></pre>  <tr>    <th>SmallTalk    <td><pre><code>Object>>method: num    "comment 123"    | var1 var2 |    (1 to: num) do: [:i | |var| ^i].    Klass with: var1.    Klass new.    arr := #('123' 123.345 #hello Transcript var $@).    arr := #().    var2 = arr at: 3.    ^ self abcheapExample    "HeapTest new heapExample"    "Multiline    decription"    | n rnd array time sorted |    n := 5000.    "# of elements to sort"    rnd := Random new.    array := (1 to: n)                collect: [:i | rnd next].    "First, the heap version"    time := Time                millisecondsToRun: [sorted := Heap withAll: array.    1        to: n        do: [:i |            sorted removeFirst.            sorted add: rnd next]].    Transcript cr; show: 'Time for Heap: ' , time printString , ' msecs'.    "The quicksort version"    time := Time                millisecondsToRun: [sorted := SortedCollection withAll: array.    1        to: n        do: [:i |            sorted removeFirst.            sorted add: rnd next]].    Transcript cr; show: 'Time for SortedCollection: ' , time printString , ' msecs'</code></pre>  <tr>    <th>Lisp    <th><pre><code>(defun prompt-for-cd ()   (prompt-read "Title" 1.53 1 2/4 1.7 1.7e0 2.9E-4 +42 -7 #b001 #b001/100 #o777 #O777 #xabc55 #c(0 -5.6))   (prompt-read "Artist" &amp;rest)   (or (parse-integer (prompt-read "Rating") :junk-allowed t) 0)  (if x (format t "yes") (format t "no" nil) ;and here comment  )  ;; second line comment  '(+ 1 2)  (defvar *lines*)                ; list of all lines  (position-if-not #'sys::whitespacep line :start beg))  (quote (privet 1 2 3))  '(hello world)  (* 5 7)  (1 2 34 5)  (:use "aaaa")  (let ((x 10) (y 20))    (print (+ x y))  )</code></pre>  <tr>    <th>Ini file    <td><pre><code>;Settings relating to the location and loading of the database[Database]ProfileDir=.ShowProfileMgr=smartDefaultProfile=TrueAutoCreate = no[AutoExec]Use="prompt"Glob=autoexec_*.iniAskAboutIgnoredPlugins=0</code></pre>  <tr>    <th>Diff    <td><pre><code>Index: languages/ini.js===================================================================--- languages/ini.js    (revision 199)+++ languages/ini.js    (revision 200)@@ -1,8 +1,7 @@ hljs.LANGUAGES.ini = {   case_insensitive: true,-  defaultMode:-  {+  defaultMode: {     contains: ['comment', 'title', 'setting'],     illegal: '[^\\s]'   },*** /path/to/original timestamp--- /path/to/new      timestamp****************** 1,3 ****--- 1,9 ----+ This is an important+ notice! It should+ therefore be located at+ the beginning of this+ document!! compress the size of the! changes.  It is important to spell</code></pre>  <tr>    <th>DOS batch files    <td><pre><code>cd \copy a bping 192.168.0.1@rem ping 192.168.0.1net stop sharedaccessdel %tmp% /f /s /qdel %temp% /f /s /qipconfig /flushdnstaskkill /F /IM JAVA.EXE /Tcd Photoshop/Adobe Photoshop CS3/AMT/if exist application.sif (    ren application.sif _application.sif) else (    ren _application.sif application.sif)taskkill /F /IM proquota.exe /Tsfc /SCANNOWset path = testxcopy %1\*.* %2</code></pre>  <tr>    <th>Bash    <td><pre><code>#!/bin/bash###### BEGIN CONFIGACCEPTED_HOSTS="/root/.hag_accepted.conf"BE_VERBOSE=false###### END CONFIGif [ "$UID" -ne 0 ]then echo "Superuser rights is required" exit 2figenApacheConf(){ if [[ "$2" = "www" ]] then  full_domain=$1 else  full_domain=$2.$1 fi host_root="${APACHE_HOME_DIR}$1/$2" echo -e "# Host $1/$2 :"}</code></pre>  <tr>    <th>Axapta    <td><pre><code>class ExchRateLoadBatch extends RunBaseBatch {  ExchRateLoad rbc;  container currencies;  boolean actual;  boolean overwrite;  date beg;  date end;  #define.CurrentVersion(5)  #localmacro.CurrentList    currencies,    actual,    beg,    end  #endmacro}public boolean unpack(container packedClass) {  container       base;  boolean         ret;  Integer         version    = runbase::getVersion(packedClass);  switch (version) {    case #CurrentVersion:      [version, #CurrentList] = packedClass;      return true;    default:      return false;  }  return ret;}</code></pre>  <tr>    <th>1小    <td><pre><code class="1c">#袝褋谢懈 袣谢懈械薪褌 孝芯谐写邪袩械褉械屑 小懈屑胁芯谢褜薪褘泄袣芯写袣邪褌邪谢芯谐邪 = "谢褟-谢褟-谢褟"; //泻芯屑屑械薪褌邪褉懈泄肖褍薪泻褑懈褟 小芯芯斜褖懈褌褜(袟薪邪褔 孝械泻褋褌小芯芯斜褖械薪懈褟, 孝械泻褋褌小芯芯斜褖械薪懈褟2) 协泻褋锌芯褉褌 //泻芯屑屑械薪褌邪褉懈泄 泻 褎褍薪泻褑懈懈  x=孝械泻褋褌小芯芯斜褖械薪懈褟+孝械泻褋褌小芯芯斜褖械薪懈褟2+"  |褋褌褉芯泻邪1  |褋褌褉芯泻邪2  |褋褌褉芯泻邪3";袣芯薪械褑肖褍薪泻褑懈懈#袣芯薪械褑袝褋谢懈// 袩褉芯褑械写褍褉邪 袩褉懈袧邪褔邪谢械袪邪斜芯褌褘小懈褋褌械屑褘//袩褉芯褑械写褍褉邪 袩褉懈袧邪褔邪谢械袪邪斜芯褌褘小懈褋褌械屑褘()  袨斜褉邪斜芯褌泻懈.袩芯屑芯褖薪懈泻.袩芯谢褍褔懈褌褜肖芯褉屑褍("肖芯褉屑邪").袨褌泻褉褘褌褜();袣芯薪械褑袩褉芯褑械写褍褉褘</code></pre></table><h2>Special tests</h2><table>  <tr>    <th>Explicit Python highlighting    <td><pre><code class="python">for x in [1, 2, 3]:  count(x)</code></pre>  <tr>    <th>Disabled highlighting    <td><pre><code class="no-highlight">&lt;div id="contents"&gt;  &lt;p&gt;Hello, World!&lt;/div&gt;</code></pre>  <tr>    <th>Custom markup is left intact    <td><pre><code>&lt;div id="contents"&gt;  &lt;p&gt;<b><i>Hello, World!</i></b>&lt;/div&gt;</code></pre></table>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -