#/usr/local/bin/perl -w
use strict;
#############################################################
# #
# #
# #
# NOAH SUSSMAN #
# #
# clean up word #
# #
# Created 5/16/01 at 02:33 PM #
# #
# Clean up Word documents that have been translated to HTML #
# #
# #
#############################################################
@ARGV[0] = "Macintosh HD:NOAH:2001:05-MAY 2001:3-May 15-21:3-Revisions to Corp Site:large number of Word docs:1.2 Services.html" ;
$^I=".bk";
undef $/ ; # slurp the whole file into $_
while (<>) {
s{<(?!/?(a|b|img|center|p|ul|ol|li|table|td|tr|html|body|head|title))\s*[^>]*>\s*}{}gi; # Destroy all tags except A, B, IMG, CENTER, P, UL, OL, LI, TABLE, TD, TR, HTML, BODY, HEAD and TITLE
s{<(\w+)>(.*?)<([^$1])>(.*?)<(/$1)>(.*?)<(/$2)>}{<$3>$2<$1>$4<$5>$6<$7>}gi; # Fix mis-nested tags, if any.
print $_ ;
}
@ECHO OFF
REM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
REM
REM FILENAME : DOSMODE.BAT
REM
REM DESCRIPTION : Change console mode to display as in old DOS Mode
REM
REM AUTHOR : Napoleon Arouldas S. (princeofcode@gmail.com)
REM
REM WEB : http://neps.in
REM
REM DATE WRITTEN : Sunday, October 07, 2007 6:10:58 PM
REM
REM COMMENTS/REMARKS : Use it, when you would like to have a big pretty looking fonts for your
REM cmd shell in windows. Works with windows XP
REM
REM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
MODE CON LINES=25 COLS=80
<%
' Copyright (c) 2008, reusablecode.blogspot.com; some rights reserved.
'
' This work is licensed under the Creative Commons Attribution License. To view
' a copy of this license, visit http://creativecommons.org/licenses/by/3.0/ or
' send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California
' 94305, USA.
Const M_PI = 3.14159265358979323846
' Unnormalized sinc function.
function sinc(x)
sinc = sin(x) / x
end function
' Normalized sinc function.
' REQUIRES: constant M_PI
function nsinc(x)
sinc = sin(M_PI * x) / (M_PI * x)
end function
%>