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
def self.process_randoms(text) | |
stack = [] | |
stored_string = "" | |
random_choices = [] | |
scanner = StringScanner.new(text) | |
while match = scanner.scan_until(/[\{\}\|]|\[(one of|or|at random)\]/) | |
stored_string << match.slice(0, match.length - scanner.matched_size) | |
case scanner.matched | |
when "{", "[one of]" |
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
<html><head><title></title></head> | |
<script src="http://code.jquery.com/jquery-latest.min.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function() { | |
function AddField(){ | |
var d_name = $("#d_name").val(); | |
var d_number = $("#d_number").val(); | |
var field = $("#field").val(); |