Alien-CodePress
view release on metacpan or search on metacpan
cp/codepress/index.html view on Meta::CPAN
<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
cp/codepress/languages/csharp.js view on Meta::CPAN
/*
* CodePress regular expressions for C# syntax highlighting
* By Edwin de Jonge
*/
Language.syntax = [ // C#
{ input : /\"(.*?)(\"|<br>|<\/P>)/g, output : '<s>"$1$2</s>' }, // strings double quote
{ input : /\'(.?)(\'|<br>|<\/P>)/g, output : '<s>\'$1$2</s>' }, // strings single quote
{ input : /\b(abstract|as|base|break|case|catch|checked|continue|default|delegate|do|else|event|explicit|extern|false|finally|fixed|for|foreach|get|goto|if|implicit|in|interface|internal|is|lock|namespace|new|null|object|operator|out|override|params...
{ input : /\b(bool|byte|char|class|double|float|int|interface|long|string|struct|void)\b/g, output : '<a>$1</a>' }, // types
{ input : /([^:]|^)\/\/(.*?)(<br|<\/P)/g, output : '$1<i>//$2</i>$3' }, // comments //
{ input : /\/\*(.*?)\*\//g, output : '<i>/*$1*/</i>' } // comments /* */
];
Language.snippets = [];
Language.complete = [ // Auto complete only for 1 character
{input : '\'',output : '\'$0\'' },
{input : '"', output : '"$0"' },
cp/codepress/languages/generic.js view on Meta::CPAN
/*
* CodePress regular expressions for generic syntax highlighting
*/
// generic languages
Language.syntax = [
{ input : /\"(.*?)(\"|<br>|<\/P>)/g, output : '<s>"$1$2</s>' }, // strings double quote
{ input : /\'(.*?)(\'|<br>|<\/P>)/g, output : '<s>\'$1$2</s>' }, // strings single quote
{ input : /\b(abstract|continue|for|new|switch|default|goto|boolean|do|if|private|this|break|double|protected|throw|byte|else|import|public|throws|case|return|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|const|floa...
{ input : /([\(\){}])/g, output : '<em>$1</em>' }, // special chars;
{ input : /([^:]|^)\/\/(.*?)(<br|<\/P)/g, output : '$1<i>//$2</i>$3' }, // comments //
{ input : /\/\*(.*?)\*\//g, output : '<i>/*$1*/</i>' } // comments /* */
]
Language.snippets = []
Language.complete = [
{ input : '\'', output : '\'$0\'' },
{ input : '"', output : '"$0"' },
cp/codepress/languages/java.js view on Meta::CPAN
/*
* CodePress regular expressions for Java syntax highlighting
*/
// Java
Language.syntax = [
{ input : /\"(.*?)(\"|<br>|<\/P>)/g, output : '<s>"$1$2</s>'}, // strings double quote
{ input : /\'(.*?)(\'|<br>|<\/P>)/g, output : '<s>\'$1$2</s>'}, // strings single quote
{ input : /\b(abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|t...
{ input : /([^:]|^)\/\/(.*?)(<br|<\/P)/g, output : '$1<i>//$2</i>$3'}, // comments //
{ input : /\/\*(.*?)\*\//g, output : '<i>/*$1*/</i>' }// comments /* */
]
Language.snippets = []
Language.complete = [
{ input : '\'',output : '\'$0\'' },
{ input : '"', output : '"$0"' },
{ input : '(', output : '\($0\)' },
cp/codepress/languages/php.js view on Meta::CPAN
Language.syntax = [
{ input : /(<[^!\?]*?>)/g, output : '<b>$1</b>' }, // all tags
{ input : /(<style.*?>)(.*?)(<\/style>)/g, output : '<em>$1</em><em>$2</em><em>$3</em>' }, // style tags
{ input : /(<script.*?>)(.*?)(<\/script>)/g, output : '<ins>$1</ins><ins>$2</ins><ins>$3</ins>' }, // script tags
{ input : /\"(.*?)(\"|<br>|<\/P>)/g, output : '<s>"$1$2</s>' }, // strings double quote
{ input : /\'(.*?)(\'|<br>|<\/P>)/g, output : '<s>\'$1$2</s>'}, // strings single quote
{ input : /(<\?)/g, output : '<strong>$1' }, // <?.*
{ input : /(\?>)/g, output : '$1</strong>' }, // .*?>
{ input : /(<\?php|<\?=|<\?|\?>)/g, output : '<cite>$1</cite>' }, // php tags
{ input : /(\$[\w\.]*)/g, output : '<a>$1</a>' }, // vars
{ input : /\b(false|true|and|or|xor|__FILE__|exception|__LINE__|array|as|break|case|class|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|for|foreach|function|globa...
{ input : /([^:])\/\/(.*?)(<br|<\/P)/g, output : '$1<i>//$2</i>$3' }, // php comments //
{ input : /([^:])#(.*?)(<br|<\/P)/g, output : '$1<i>#$2</i>$3' }, // php comments #
{ input : /\/\*(.*?)\*\//g, output : '<i>/*$1*/</i>' }, // php comments /* */
{ input : /(<!--.*?-->.)/g, output : '<big>$1</big>' } // html comments
]
Language.snippets = [
{ input : 'if', output : 'if($0){\n\t\n}' },
{ input : 'ifelse', output : 'if($0){\n\t\n}\nelse{\n\t\n}' },
{ input : 'else', output : '}\nelse {\n\t' },
cp/codepress/license.txt view on Meta::CPAN
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
( run in 0.430 second using v1.01-cache-2.11-cpan-64827b87656 )