2010-04-12 09:23:46 +02:00
|
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
|
|
|
|
"http://www.w3.org/TR/html4/strict.dtd">
|
|
|
|
|
|
|
|
|
|
<html lang="en">
|
|
|
|
|
<head>
|
2010-09-30 12:35:57 +02:00
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
|
|
|
<title>Editor</title>
|
|
|
|
|
<meta name="author" content="Fabian Jakobs">
|
|
|
|
|
|
|
|
|
|
<style type="text/css" media="screen">
|
|
|
|
|
|
|
|
|
|
html {
|
|
|
|
|
height: 100%;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
body {
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
margin: 0;
|
|
|
|
|
padding: 0;
|
|
|
|
|
height: 100%;
|
|
|
|
|
width: 100%;
|
2010-12-15 14:12:04 +01:00
|
|
|
font-family: Arial, Helvetica, sans-serif, Tahoma, Verdana, sans-serif;
|
2010-09-30 12:35:57 +02:00
|
|
|
font-size: 12px;
|
|
|
|
|
background: rgb(14, 98, 165);
|
|
|
|
|
color: white;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#editor {
|
|
|
|
|
top: 55px;
|
|
|
|
|
left: 0px;
|
|
|
|
|
background: white;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#controls {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 55px;
|
|
|
|
|
}
|
2010-04-12 09:23:46 +02:00
|
|
|
|
2010-10-08 13:34:03 +02:00
|
|
|
#jump {
|
|
|
|
|
position: absolute;
|
|
|
|
|
width: 10px;
|
|
|
|
|
height: 10px;
|
|
|
|
|
border: 1px solid red;
|
|
|
|
|
z-index: 10000;
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
|
|
|
|
|
2010-12-23 15:30:55 +00:00
|
|
|
#cockpitInput {
|
2010-12-08 13:13:33 +00:00
|
|
|
position: absolute;
|
|
|
|
|
width: 100%;
|
|
|
|
|
bottom: 0;
|
2010-12-23 15:30:55 +00:00
|
|
|
|
|
|
|
|
border: none; outline: none;
|
|
|
|
|
font-family: consolas, courier, monospace;
|
|
|
|
|
font-size: 120%;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#cockpitOutput {
|
|
|
|
|
padding: 10px;
|
|
|
|
|
margin: 0 15px;
|
|
|
|
|
border: 1px solid #AAA;
|
|
|
|
|
-moz-border-radius-topleft: 10px;
|
|
|
|
|
-moz-border-radius-topright: 10px;
|
|
|
|
|
border-top-left-radius: 4px; border-top-right-radius: 4px;
|
|
|
|
|
background: #DDD; color: #000;
|
2010-12-08 13:13:33 +00:00
|
|
|
}
|
2010-09-30 12:35:57 +02:00
|
|
|
</style>
|
2010-04-12 09:23:46 +02:00
|
|
|
</head>
|
|
|
|
|
<body>
|
2010-10-08 13:34:03 +02:00
|
|
|
<div id="jump"></div>
|
2010-04-12 09:23:46 +02:00
|
|
|
|
2010-04-14 15:50:34 +02:00
|
|
|
<table id="controls">
|
2010-04-15 17:09:11 +02:00
|
|
|
<tr>
|
2010-04-20 14:38:01 +02:00
|
|
|
<td>
|
|
|
|
|
<label for="doc">Document:</label>
|
|
|
|
|
<select id="doc" size="1">
|
|
|
|
|
<option value="js">JS Document</option>
|
|
|
|
|
<option value="html">HTML Document</option>
|
|
|
|
|
<option value="css">CSS Document</option>
|
2010-12-10 17:26:14 +01:00
|
|
|
<option value="python">Python Document</option>
|
2010-12-16 20:36:47 +01:00
|
|
|
<option value="php">PHP Document</option>
|
2010-04-20 14:38:01 +02:00
|
|
|
</select>
|
|
|
|
|
</td>
|
2010-09-30 12:35:57 +02:00
|
|
|
<td>
|
2010-04-15 17:09:11 +02:00
|
|
|
<label for="mode">Mode:</label>
|
|
|
|
|
<select id="mode" size="1">
|
|
|
|
|
<option value="text">Plain Text</option>
|
|
|
|
|
<option value="javascript">JavaScript</option>
|
2010-04-16 15:35:58 +02:00
|
|
|
<option value="xml">XML</option>
|
|
|
|
|
<option value="html">HTML</option>
|
2010-04-16 17:22:22 +02:00
|
|
|
<option value="css">CSS</option>
|
2010-12-10 17:26:14 +01:00
|
|
|
<option value="python">Python</option>
|
2010-12-16 20:36:47 +01:00
|
|
|
<option value="php">PHP</option>
|
2010-04-15 17:09:11 +02:00
|
|
|
</select>
|
|
|
|
|
</td>
|
2010-09-30 12:35:57 +02:00
|
|
|
<td>
|
|
|
|
|
<label for="theme">Theme:</label>
|
|
|
|
|
<select id="theme" size="1">
|
2010-11-05 09:45:01 +01:00
|
|
|
<option value="ace/theme/textmate">TextMate</option>
|
|
|
|
|
<option value="ace/theme/eclipse">Eclipse</option>
|
|
|
|
|
<option value="ace/theme/dawn">Dawn</option>
|
|
|
|
|
<option value="ace/theme/idle_fingers">idleFingers</option>
|
2010-12-16 21:02:23 +01:00
|
|
|
<option value="ace/theme/pastel_on_dark">Pastel on dark</option>
|
2010-11-05 09:45:01 +01:00
|
|
|
<option value="ace/theme/twilight">Twilight</option>
|
2010-09-30 12:35:57 +02:00
|
|
|
</select>
|
|
|
|
|
</td>
|
2010-04-15 17:09:11 +02:00
|
|
|
<td>
|
|
|
|
|
<label for="select_style">Full line selections</label>
|
|
|
|
|
<input type="checkbox" name="select_style" id="select_style" checked>
|
|
|
|
|
</td>
|
2010-04-16 11:14:12 +02:00
|
|
|
<td>
|
|
|
|
|
<label for="highlight_active">Highlight active line</label>
|
|
|
|
|
<input type="checkbox" name="highlight_active" id="highlight_active" checked>
|
|
|
|
|
</td>
|
2011-01-10 11:18:57 +01:00
|
|
|
<td>
|
|
|
|
|
<label for="show_hidden">Show invisibles</label>
|
|
|
|
|
<input type="checkbox" name="show_hidden" id="show_hidden">
|
|
|
|
|
</td>
|
2010-04-20 17:08:00 +02:00
|
|
|
<td align="right">
|
2010-11-15 13:05:01 +00:00
|
|
|
<img src="demo/logo.png">
|
2010-04-20 17:08:00 +02:00
|
|
|
</td>
|
2010-04-15 17:09:11 +02:00
|
|
|
</tr>
|
2010-04-14 15:50:34 +02:00
|
|
|
</table>
|
|
|
|
|
|
2010-04-20 17:08:00 +02:00
|
|
|
<div id="editor">
|
2010-04-12 09:23:46 +02:00
|
|
|
</div>
|
|
|
|
|
|
2010-04-20 14:38:01 +02:00
|
|
|
<script type="text/editor" id="jstext">function foo(items) {
|
2010-09-30 12:35:57 +02:00
|
|
|
for (var i=0; i<items.length; i++) {
|
2010-11-05 10:50:19 +01:00
|
|
|
alert(items[i] + "juhu");
|
2010-09-30 12:35:57 +02:00
|
|
|
}
|
2010-05-05 10:50:38 +02:00
|
|
|
}</script>
|
2010-04-20 14:38:01 +02:00
|
|
|
|
|
|
|
|
<script type="text/editor" id="csstext">.text-layer {
|
|
|
|
|
font-family: Monaco, "Courier New", monospace;
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
cursor: text;
|
2010-12-10 17:26:14 +01:00
|
|
|
}</script>
|
2010-04-20 14:38:01 +02:00
|
|
|
|
|
|
|
|
<script type="text/editor" id="htmltext"><html>
|
|
|
|
|
<head>
|
2010-04-20 15:30:30 +02:00
|
|
|
|
|
|
|
|
<style type="text/css">
|
|
|
|
|
.text-layer {
|
|
|
|
|
font-family: Monaco, "Courier New", monospace;
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
cursor: text;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
|
2010-12-10 17:11:43 +01:00
|
|
|
</head>
|
|
|
|
|
<body>
|
|
|
|
|
<h1 style="color:red">Juhu Kinners</h1>
|
|
|
|
|
</body>
|
2010-12-10 17:26:14 +01:00
|
|
|
</html></script>
|
2010-12-10 17:11:43 +01:00
|
|
|
|
2010-12-10 17:26:14 +01:00
|
|
|
<script type="text/editor" id="pythontext">#!/usr/local/bin/python
|
|
|
|
|
|
|
|
|
|
import string, sys
|
2010-12-10 17:11:43 +01:00
|
|
|
|
2010-12-10 17:26:14 +01:00
|
|
|
# If no arguments were given, print a helpful message
|
|
|
|
|
if len(sys.argv)==1:
|
|
|
|
|
print 'Usage: celsius temp1 temp2 ...'
|
|
|
|
|
sys.exit(0)
|
2010-12-10 17:11:43 +01:00
|
|
|
|
2010-12-10 17:26:14 +01:00
|
|
|
# Loop over the arguments
|
|
|
|
|
for i in sys.argv[1:]:
|
|
|
|
|
try:
|
|
|
|
|
fahrenheit=float(string.atoi(i))
|
|
|
|
|
except string.atoi_error:
|
|
|
|
|
print repr(i), "not a numeric value"
|
|
|
|
|
else:
|
|
|
|
|
celsius=(fahrenheit-32)*5.0/9.0
|
2010-12-16 20:36:47 +01:00
|
|
|
print '%i\260F = %i\260C' % (int(fahrenheit), int(celsius+.5))
|
2010-12-10 17:26:14 +01:00
|
|
|
</script>
|
2010-12-08 13:13:33 +00:00
|
|
|
|
2010-12-16 20:36:47 +01:00
|
|
|
<script type="text/editor" id="phptext"><?php
|
|
|
|
|
|
2010-12-17 09:31:42 +01:00
|
|
|
function nfact($n) {
|
|
|
|
|
if ($n == 0) {
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
return $n * nfact($n - 1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
echo "\n\nPlease enter a whole number ... ";
|
|
|
|
|
$num = trim(fgets(STDIN));
|
|
|
|
|
|
|
|
|
|
// ===== PROCESS - Determing the factorial of the input number =====
|
|
|
|
|
$output = "\n\nFactorial " . $num . " = " . nfact($num) . "\n\n";
|
|
|
|
|
echo $output;
|
2010-12-16 20:36:47 +01:00
|
|
|
|
|
|
|
|
?></script>
|
|
|
|
|
|
2010-12-23 15:30:55 +00:00
|
|
|
<input id="cockpitInput" type="text"/>
|
2010-12-08 13:13:33 +00:00
|
|
|
|
2010-12-23 15:30:55 +00:00
|
|
|
<script src="demo/require.js" type="text/javascript" charset="utf-8"></script>
|
|
|
|
|
<script src="demo/boot.js" type="text/javascript"></script>
|
2010-12-15 14:12:04 +01:00
|
|
|
|
2010-04-12 09:23:46 +02:00
|
|
|
</body>
|
2010-12-23 15:30:55 +00:00
|
|
|
</html>
|