This file contains hidden or 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
| <!DOCTYPE html> | |
| <html lang="ja-JP"> | |
| <head> | |
| <title>From</title> | |
| <meta charset="UTF-8"> | |
| </head> | |
| <body onload="document.getElementById('closed-flg').checked = true;"> | |
| <input type="checkbox" id="closed-flg"/> | |
| <a href="#" onclick="window.open('popup.html', 'popup'); document.getElementById('closed-flg').checked = false; ">popup</a> | |
| <a href="#" id="link-to" onclick="window.location.href='to.html' + (document.getElementById('closed-flg') ? '' : '?popup');">To</a> |
This file contains hidden or 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
| #!/bin/bash | |
| MINE="@" | |
| BOOM="X" | |
| BLANK=" " | |
| NEW="." | |
| MARK="M" | |
| OPEN_FLAG=1 | |
| MARK_FLAG=2 |
This file contains hidden or 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
| #!/bin/sh | |
| HIT="X" | |
| BLANK="." | |
| function printBanner() | |
| { | |
| echo "****************************" | |
| echo "* PLANE *" | |
| echo "****************************" |
This file contains hidden or 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
| #!/bin/sh | |
| # 猜数字游戏Shell版程序 | |
| function generateGoal() | |
| { # 生成被猜数字 | |
| # 准备一个包含0-9的池 | |
| local pool=($(seq 0 9)) | |
| for i in $(seq 0 3) | |
| do |
This file contains hidden or 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.Collections.Generic; | |
| using System.Linq; | |
| using System.Web; | |
| using System.Text; | |
| namespace CIS_StdWebServices.Utils | |
| { | |
| public class JsonUtilities | |
| { |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame | |
| Remove this if you use the .htaccess --> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> | |
| <title>memory</title> | |
| <meta name="description" content="A memory game." /> | |
| <meta name="author" content="Programus" /> |
This file contains hidden or 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
| * + table { | |
| border-style:solid; | |
| border-width:1px; | |
| border-color:#e7e3e7; | |
| } | |
| * + table th, * + table td { | |
| border-style:dashed; | |
| border-width:1px; | |
| border-color:#e7e3e7; |
This file contains hidden or 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
| import java.lang.ref.WeakReference; | |
| /** | |
| * Class to research strings. | |
| * constant string like "AAA" won't be reclaimed while instance created by new will. | |
| * when you new a String by a constant string, there will be two memory field stored the same value. | |
| * so initialize a String by constant String is recommended. | |
| * @author Programus | |
| */ | |
| public class NewOrNot { |
This file contains hidden or 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
| import java.util.Calendar; | |
| /** | |
| * This is a class to prove that merge strings by StringBuffer is quite quicker than String. | |
| * | |
| * @author Programus | |
| * | |
| */ | |
| public class StringMerger { | |
| /** |
This file contains hidden or 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
| import java.util.Random; | |
| public class StringBufferVsStringBuilder { | |
| public static int demo(final Object stringJoiner, final int testCount) throws InterruptedException { | |
| ThreadGroup group = new ThreadGroup(stringJoiner.getClass().getName() + "@" + stringJoiner.hashCode()); | |
| final Random rand = new Random(); | |
| Runnable listAppender = new Runnable() { | |
| public void run() { | |
| try { |