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
#include <stdio.h> | |
#include <string.h> | |
#include <sys/types.h> | |
#include <dirent.h> | |
#include <unistd.h> | |
#include <errno.h> | |
#include <stdlib.h> | |
#include <time.h> | |
#include <sys/stat.h> |
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
ClearAll[shead]; | |
SetAttributes[shead, HoldAllComplete]; | |
shead[f_Symbol[___]] := HoldComplete[f]; | |
shead[f_[___]] := shead[f]; | |
shead[f_ /; AtomQ[Unevaluated[f]]] := Head[f]; | |
(* TODO:This is a bit too simplisitc,since some pattern symbols might \ | |
be localized by inner rules inside expr,and should not be \ | |
counted.We might miss some extra dependencies this way *) |
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
BeginPackage["Unflatten`"] | |
Unflatten::usage = "Unflatten[h[elems], posints, heads] creates a nested structure by wrapping | |
the elements in positions intervals posints in heads heads"; | |
UnflattenNested::usage = "UnflattenNested[expr, {startposlist, endposlist}, head] wraps elements | |
of expr at positions starting at startposlist_i and ending at endposlist_i in head head"; | |
Begin["`Private`"] |
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
BeginPackage["OO`"] | |
new | |
EndPackage[] | |
BeginPackage["OO`Core`", "RuleBasedFunction`"] | |
TypeQ; | |
ObjectQ; |
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
BeginPackage["RuleBasedFunction`"] | |
RuleBasedFunction::usage = "RuleBasedFunction[defs, attrs] constructs a pure function based on definitions given by rules"; | |
Fn::usage = "Fn is a symbol used to denote a function in definitions used in RuleBasedFunction"; | |
Begin["`Private`"] | |
SetAttributes[CleanUp, HoldAll] | |
CleanUp[expr_, cleanup_] := |
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
BeginPackage["HTMLParser`"] | |
ParseHTML::usage = "ParseHTML[s] parses a string of HTML code"; | |
HTMLContainer::usage = "HTMLContainer[tag] is an inert container for the contents of html tag"; | |
Begin["`Private`"] | |
listSplit[x_List,lengthlist_List,headlist_List]:= |
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
BeginPackage["ReferenceTracker`"] | |
TrackReferences; | |
Begin["`Private`"] | |
Clear[$globalProperties]; | |
$globalProperties = { | |
OwnValues, | |
DownValues, |
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
BeginPackage["FrozenCode`"] | |
FrozenCodeEvaluate::usage = "FrozenCodeEvaluate[Hold[code], {heads}] evaluates the code | |
in the 'frozen' mode, where only specific heads are allowed to evaluate"; | |
Begin["`Private`"] | |
ClearAll[symbolToHideQ] | |
SetAttributes[symbolToHideQ, HoldFirst]; | |
symbolToHideQ[s_Symbol, expandedSymbs_] :=! MemberQ[expandedSymbs, Unevaluated[s]]; |
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
ClearAll[symbolRules]; | |
symbolRules[syms_List]:= | |
Join @@ Map[ | |
Function[s, symbolRules @ Unevaluated @ s, HoldFirst], | |
Unevaluated @ syms | |
] | |
symbolRules[sym_String]:= | |
ToExpression[sym, InputForm, Function[s,symbolRules @ Unevaluated @ s, HoldFirst]]; | |
symbolRules[s_Symbol]:= Join[OwnValues[s],DownValues[s], UpValues[s], SubValues[s]]; | |
symbolRules[]:= symbolRules @ Names["Global`*"]; |
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
$sqlKeywords = { | |
"ABSOLUTE","ACTION","ADD","AFTER","ALL","ALLOCATE","ALTER","AND","ANY","ARE","ARRAY","AS", | |
"ASC","ASENSITIVE","ASSERTION","ASYMMETRIC","AT","ATOMIC","AUTHORIZATION","AVG","BEFORE", | |
"BEGIN","BETWEEN","BIGINT","BINARY","BIT","BIT_LENGTH","BLOB","BOOLEAN","BOTH","BREADTH", | |
"BY","CALL","CALLED","CASCADE","CASCADED","CASE","CAST","CATALOG","CHAR","CHARACTER", | |
"CHARACTER_LENGTH","CHAR_LENGTH","CHECK","CLOB","CLOSE","COALESCE","COLLATE","COLLATION", | |
"COLUMN","COMMIT","CONDITION","CONNECT","CONNECTION","CONSTRAINT","CONSTRAINTS","CONSTRUCTOR", | |
"CONTAINS","CONTINUE","CONVERT","CORRESPONDING","COUNT","CREATE","CROSS","CUBE","CURRENT", | |
"CURRENT_DATE","CURRENT_DEFAULT_TRANSFORM_GROUP","CURRENT_PATH","CURRENT_ROLE","CURRENT_TIME", | |
"CURRENT_TIMESTAMP","CURRENT_TRANSFORM_GROUP_FOR_TYPE","CURRENT_USER","CURSOR","CYCLE","DATA", |