Expected Result | [HTML][htmlformat] *1 | [Unity3D Rich Text][u3dformat] | [BBCode][bbcode] *1 | [Markdown][markdown] *1 | [Plurk Formatting Syntax][plurkformat] | [Minecraft][mcformat] |
---|---|---|---|---|---|---|
Bold | <strong>Bold</strong> <b>Bold</b> |
<b>Bold</b> |
[b]Bold[/b] |
**Bold** __Bold__ |
**Bold** |
§lBold |
Italic | <em>Italic</em> <i>Italic</i> |
<i>Italic</i> |
[i]Italic[/i] |
*Italic* _Italic_ |
*Italic* |
§oItalic |
Underline | <u>Underline</u> |
N/A | [u]Underline[/u] |
N/A *2 | _Underline_ |
§nunderline |
<del>Censored</del> <s>Censored</s> |
N/A | [s]Censored[/s] |
~~Censored~~ |
--Censored-- |
§mCensored |
|
Big | <font size="5">Big</font> <big>Big</big> |
<size=24>Big</size> *3 |
[size=24]Big[/size] |
N/A *2 | N/A | N/A |
Small | `<font size= |
This file contains 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
// Similar to eval(), but it is safe to be called in strict mode and will | |
// run the code asynchronously (Nothing will be returned). | |
// Available only in HTML5 DOM. | |
function runScript(script) { | |
if(!script) return; | |
// Create a temporary blob that contains the script string and | |
// add a script tag at the end of the document to contain that blob. | |
var blob = new Blob([script.toString()], { type: 'text/javascript' }); | |
var url = URL.createObjectURL(blob); |
This file contains 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
@echo off | |
echo "Self Expanding" | |
type %~f0 >> %~f0 | |
rem The empty line at the end is important, or it will not works |
This file contains 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
using System; | |
using System.IO; | |
using System.Diagnostics; | |
using System.Reflection; | |
namespace SelfDestruct { | |
public class SelfDestructor { | |
const string batScript = "@echo off\r\n" + | |
":trydelete\r\n" + | |
"echo \"%~f1\">\"%~f1\"\r\n" + |
This file contains 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
using System; | |
using System.IO; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Globalization; | |
using System.Text; | |
using Microsoft.Xna.Framework; | |
using Microsoft.Xna.Framework.Audio; | |
using Microsoft.Xna.Framework.Graphics; |
This file contains 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
public static class MoserDeBruijn { | |
private const int MaxValue = int.MaxValue; | |
public static int Lookup(int x, int y) { | |
if(x < 0 || y < 0) return 0; | |
int result = 0; | |
for(int mask = 1, offset = 0; (x >= mask || y >= mask) && mask < MaxValue; mask <<= 1) | |
result |= (x & mask) << offset++ | (y & mask) << offset; | |
return result; | |
} |
This file contains 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
// Click-to-Gacha easter egg module for web pages | |
// (C) Jeremy Lam 2017. | |
// Require RandomJs and FingerPrintJs2 module in order to work | |
// You can change the behaviour in 'setTitle' and 'notify' function. | |
(function (root, factory) { | |
if(typeof define === 'function' && define.amd) | |
define(['random', 'fingerprintjs2'], factory); | |
else if(typeof module === 'object' && module.exports) | |
factory(require('random-js'), require('fingerprintjs2')); |
This file contains 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(root, factory) { | |
if(typeof define === 'function' && define.amd) { | |
// AMD. Register as an anonymous module. | |
define(['exports'], function(exports) { | |
factory((root.chocomilk = exports), b); | |
}); | |
} else if(typeof exports === 'object' && typeof exports.nodeName !== 'string') { | |
// CommonJS | |
factory(exports); | |
} else { |
This file contains 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
// Add support for promises with Node Sync. | |
// https://github.com/ybogdanov/node-sync | |
(function() { | |
'use strict'; | |
const { Fibers, Future } = module.exports = require('sync'); | |
const slice = Function.prototype.call.bind(Array.prototype.slice); | |
if(typeof Promise !== 'undefined') { | |
// Pause execution and wait until the promise fufilled. | |
Promise.prototype.sync = function() { |
This file contains 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
using UnityEngine; | |
[ExecuteInEditMode, RequireComponent(typeof(Camera))] | |
public class ScreenFork: MonoBehaviour { | |
public RenderTexture copyTo; | |
private void OnRenderImage(RenderTexture src, RenderTexture dest) { | |
Graphics.Blit(src, dest); | |
if(copyTo != null) |