-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathimage.html
More file actions
108 lines (93 loc) · 3.28 KB
/
image.html
File metadata and controls
108 lines (93 loc) · 3.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<html>
<head>
<link rel="stylesheet" type="text/css"
href="https://fonts.googleapis.com/css?family=Source Code Pro">
<style>
body {
font-family: 'Source Code Pro', serif !important;
font-size: 14px !important;
}
#repl_in {
width: 100% !important;
}
#repl_out {
white-space: pre-wrap !important;
}
.expr {
font-weight: bold !important;
}
</style>
<style>
</style>
<!-- Bootstrap core CSS -->
<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- Bootstrap theme -->
<link href="bootstrap/css/bootstrap-theme.min.css" rel="stylesheet">
<!-- Bootstrap-notify -->
<link href="bootstrap/css/bootstrap-notify.css" rel="stylesheet">
<link href="css/styles.css" rel="stylesheet">
<script src="https://use.fontawesome.com/129aa955e7.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
</head>
<body style="margin-left: 10px;margin-right: 10px;">
<a class="btn btn-default" href="index.html"><i class="fa fa-folder-open fa-lg"></i> Back</a>
<div id="authorize-div" style="display: none">
<span>Authorize access to Drive API</span>
<!--Button for the user to click to initiate auth sequence -->
<i class="fa fa-key fa-lg"></i>
<button id="authorize-button" onclick="handleAuthClick(event)">
Authorize
</button>
</div>
<div id="controls">
<p>
<textarea id="repl_in" type="text" rows="5"></textarea>
</p>
<p>
<a class="btn btn-default"onclick="REPL.parse()" ><i class="fa fa-align-justify fa-lg"></i> Parse</a>
<a class="btn btn-default"onclick="REPL.compile()" ><i class="fa fa-list fa-lg"></i> Compile</a>
<a class="btn btn-default"onclick="REPL.evaluate()" ><i class="fa fa-indent fa-lg"></i> Eval</a>
</p>
</div>
<p id="repl_out"></p>
<script src="parser/parser.js"></script>
<script src="compiler.js"></script>
<script src="repl.js"></script>
<script>
REPL.init(repl_in, repl_out);
</script>
<script>
function HiveEval(context, str) {
return eval(str);
}
function CreateString(str) {
return model.createString(str);
}
function CreateMethod(selector,func,context) {
var method= model.createMap();
method.set('context', context);
method.set('source', func);
method.set("selector", selector);
method.set("value", method);
var valctx = CreateContext(context);
valctx.set('self',method);
var valWithArgs = model.createMap();
valWithArgs.set('context', valctx);
valWithArgs.set('selector', 'valWithArguments:');
valWithArgs.set('source', "(function (args) {var s =context.lookup('self').get(); var func = HiveEval(context,s.get('source'));return func.apply(this,args.asArray());})");
method.set('valueWithArguments:', valWithArgs);
return method;
}
function CreateContext(parent) {
var context = model.createMap();
if(parent!=null) {
context.set('parent',parent);
}
return context;
}
</script>
<script src="https://apis.google.com/js/api.js"></script>
<script src="js/image.js" type="text/javascript"></script>
<script src="https://apis.google.com/js/client.js?onload=checkAuth"></script>
</body>
</html>