Alien-CodePress

 view release on metacpan or  search on metacpan

cp/codepress/index.html  view on Meta::CPAN

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html>
<head>
	<title>CodePress - Real Time Syntax Highlighting Editor written in JavaScript</title>

	<style>
	body {color:#000;background-color:white;font:15px georgia, "Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif; letter-spacing:0.01em;margin:15px;}
	p {margin:0 0 15px 0;}
	a,a:visited {color:#7f0055;}
	select {background:#ffffe1;}
	button {margin-top:5px;}
	button.actions {width:171px;font-family:arial;}
	h1 {color:#7f0055;margin:0;padding:0;font-size:42px;font-weight:normal;}
	h1 a {text-decoration:none;}
	h2 {margin:0;}
	h2 a {text-decoration:none;font-weight:normal;font-size:22px;color:black !important;}
	h3 {font-size:20px;font-weight:normal;padding:0;margin:25px 0 5px 0;color:#7f0055;font-weight:bold;border-bottom:2px dotted #d8d8d8;}
	h4 {font-size:18px;font-weight:normal;z-index:0;}	
	code {color:#0080c0;font-size:13px;font-weight:bold;}
	ol, ul {padding:5px 0 5px 25px;margin:0;}
	ol li, ul li {margin:8px 0 8px 0;}
	
	#logo {text-align:center;background-color:#d6d6d6;padding:10px;-moz-border-radius:5px;border:1px solid silver;}
	#container {width:700px;margin:20px auto;padding:25px;border:3px solid #d9d9d9;-moz-border-radius:10px;background:#f8f8f8;}
	#languages {margin:5px 0;}
	
	#menu {width:100%;background:#7f0055;-moz-border-radius:4px;}
	#menu a {font:bold 17px georgia;color:white;padding:4px;display:block;border-left:1px solid white;text-align:center;text-decoration:none;}
	#menu a:hover {background:#b9669e;} 

	.hidden-code {display:none;}
	.copycode {border:1px dotted gray;padding:10px;background:white;font-family:monospace;color:gray}
	</style>

</head>

<body>
<div id="container">

<div id="logo">
	<h1><a href="http://codepress.org/">CodePress</a></h1>
	<h2><a href="http://codepress.org/">Online Real Time Syntax Highlighting Editor</a></h2>
</div>

<br />

<table cellpadding="0" cellspacing="0" id="menu">
<tr>
	<td>
		<a href="http://www.codepress.org/index.php">Home/Download</a>
	</td>
	<td>
		<a href="http://www.codepress.org/install.php">&nbsp;&nbsp;Install&nbsp;&nbsp;</a>
	</td>
	<td>
		<a href="http://www.codepress.org/to-do.php">&nbsp;&nbsp;To-do&nbsp;&nbsp;</a>
	</td>
	<td>
		<a href="http://www.codepress.org/about.php" id="about">&nbsp;&nbsp;About&nbsp;&nbsp;</a>
	</td>
</tr>
</table>

<h4>
	CodePress is web-based source code editor with syntax highlighting written in JavaScript that colors text in real time while it's being typed in the browser.
</h4>
	
<p>
	Go to <strong><a href="http://codepress.org/">http://codepress.org/</a></strong> for updates.
</p>

cp/codepress/index.html  view on Meta::CPAN

#include
IsNumber(15)
@Macro
;comment
$var = "string"
</textarea>

<textarea id="cp-java" class="hidden-code">
import java.io.FileFilter;
import java.io.IOException;
import java.io.PrintWriter;

/**
 * Project ECCO - File manager class
 * @author Fernando M.A.d.S.
 */
public class FileManager extends HttpServlet {

	private static final long serialVersionUID = 1L;
	private static String login = "feanndor"; // session var should come here
	private static String usersPath = System.getProperty("user.dir")+File.separator+"htdocs"+File.separator+"ecco"+File.separator+"users"+File.separator;
	private static File dir = new File(usersPath+login+File.separator);
	static boolean existDirectories = false;
	static int isDirectory = 0;

	public FileFilter filterFiles(File dir) {
		return (new FileFilter() {
			public boolean accept(File pathname) {
				return !(pathname.isDirectory());
			}
		});
	}
}
</textarea>

<textarea id="cp-perl" class="hidden-code">
#!/usr/bin/perl      
# The first line of the script envokes Perl 

# Scalar variables
$var1 = "Hello World";   
$var2 = 14.6;

# Array variables
@arr1 = ("zero","one","two","three","four");

# Hash variable, or associative array
%hash1 = ("one","Monday","two", "Tuesday","three", "Wednesday","four","Thursday");

# Some simple printing
print $var1; 

# Subroutine
sub test() {
	print "ok";
}
</textarea>

<textarea id="cp-sql" class="hidden-code">
--
-- simple select example
-- 
SELECT * FROM books
	WHERE price > 100.00 and price < 150.00
	ORDER BY title

SELECT books.title, count(*) AS Authors
	FROM books
	JOIN book_authors 
		ON books.book_number = book_authors.book_number
	GROUP BY books.title

-- insert, update and delete examples
	
INSERT INTO my_table (field1, field2, field3) VALUES ('test', 'N', NULL);

BEGIN WORK;
	UPDATE inventory SET quantity = quantity - 3 WHERE item = 'pants';
COMMIT;
</textarea>

<textarea id="cp-html" class="hidden-code">
<html>
<head>
	<title>CodePress - Online Real Time Syntax Highlighting Editor</title>

	<style type="text/css">
	@import url(styles.css);	
	</style>
	<script type="text/javascript">
	function getCode() {
		alert(textWithoutHighlighting);
	}
	</script>
</head>
<body>
<div id="logo">
	<h1><a href="http://codepress.org/">CodePress</a></h1>
	<h2>Online Real Time Syntax Highlighting Editor</h2>
	<img src="testimage.gif" />
</div>
<div id="languages">
	<em>choose language:</em> 
	<button onclick="edit('codepress.php',this)" id="default">PHP</button> 
	<button onclick="edit('FileManager.java',this)">Java</button> 
</div>
</body>
</html>
</textarea>

<textarea id="cp-css" class="hidden-code">
/* CSS comment */

body {
	color:#000;
	background-color:white;
	font:15px Georgia, "Lucida Grande", Arial, sans-serif; 
	letter-spacing:0.01em;
	margin:15px;
}

p { 
	margin:0 0 15px 0; 
}

a,a:visited {
	color:#7f0055;
}

select {
	background:#ffffe1;
}

h1 {
	color:#7f0055;
	margin:0;
	padding:0;
	font-size:42px;
}
</textarea>


<script src="codepress.js" type="text/javascript"></script>
</body>
</html>



( run in 0.658 second using v1.01-cache-2.11-cpan-796a6f069b2 )