-
Notifications
You must be signed in to change notification settings - Fork 0
/
partybird-05.nb
256 lines (245 loc) · 11.4 KB
/
partybird-05.nb
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
(* Content-type: application/vnd.wolfram.mathematica *)
(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)
(* CreatedBy='Mathematica 11.2' *)
(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[ 158, 7]
NotebookDataLength[ 11500, 246]
NotebookOptionsPosition[ 10978, 229]
NotebookOutlinePosition[ 11326, 244]
CellTagsIndexPosition[ 11283, 241]
WindowFrame->Normal*)
(* Beginning of Notebook Content *)
Notebook[{
Cell[BoxData[
RowBox[{
RowBox[{"PutABirdOnIt", "[", "expr_", "]"}], ":=",
RowBox[{"DynamicModule", "[",
RowBox[{
RowBox[{"{",
RowBox[{"bird", ",", "birds", ",", "obj"}], "}"}], ",",
RowBox[{"Dynamic", "[",
RowBox[{
RowBox[{"Labeled", "[",
RowBox[{"expr", ",",
RowBox[{"Part", "[",
RowBox[{"birds", ",",
RowBox[{"1", "+", "bird"}]}], "]"}], ",", "Top"}], "]"}], ",",
RowBox[{"Initialization", "\[RuleDelayed]",
RowBox[{"(",
RowBox[{
RowBox[{"bird", "=", "0"}], ";", "\[IndentingNewLine]",
RowBox[{"birds", "=",
RowBox[{
"Import", "[",
"\"\<https://rocketchat.wolfram.com/emoji-custom/PartyBird.gif\>\"\
", "]"}]}], ";", "\[IndentingNewLine]",
RowBox[{"obj", "=",
RowBox[{"SessionSubmit", "[",
RowBox[{"ScheduledTask", "[",
RowBox[{
RowBox[{"bird", "=",
RowBox[{"Mod", "[",
RowBox[{
RowBox[{"bird", "+", "1"}], ",",
RowBox[{"Length", "[", "birds", "]"}]}], "]"}]}], ",",
"0.05"}], "]"}], "]"}]}], ";"}], ")"}]}], ",",
RowBox[{"Deinitialization", "\[RuleDelayed]",
RowBox[{"TaskRemove", "[", "obj", "]"}]}]}], "]"}]}], "]"}]}]], "Input",
CellChangeTimes->{{3.7203552379335155`*^9,
3.720355237934514*^9}},ExpressionUUID->"86d20b64-9ec4-4924-b1a4-\
43ccd3b5910d"],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{"PutABirdOnIt", "[", "1234", "]"}]], "Input",
CellChangeTimes->{{3.7203552401485157`*^9,
3.720355244139518*^9}},ExpressionUUID->"bf66258c-a8d3-4981-b661-\
570a8dec0ad2"],
Cell[BoxData[
DynamicModuleBox[{$CellContext`bird$$ = 0, $CellContext`birds$$ = {
Image[CompressedData["
1:eJzdls9KAkEcx2fXNevmsaUgpEuFULmoUV00CCUz0CIsL0qb1MFAhSh6AQ8+
jMd8BfM9fItvM8rYMqw6+89Dh6+4O8POZ76/7/yJ1d9KzyohpL1Of0q190yr
VfsoR+nDXbP90miaT/lmx2yYrZN6iL7UqXapNCoA/07j8Rhcnd6r7f9VcrBx
QykyE3vefiAznlVwiAzzxPoFycHHYfNHr2cr1sb7BeEP+6YWDiGbzSJXvEBs
bweqRrAViYCoBGpYgRJVkD5L4qZ0jaNUHAp9v7YRBlsyuq77wsT9UDcJqtUq
hj9DDAYDGAljMg5TZH9ak/R5Cv1+H6PRCKZpztq73a4vLDwfzPvvSgWnhoHb
+zISyUOoytQP1ofJ/HxE/PgAhWIBuatL6qWGfCXjqydM8/LBc8pFvv76+5kb
nsNFWRVZuI9ie9CeyLJ49cYtC/dSXONuWWQ5+Fh8vxU9sbK4rZNTFusZYJcv
Lywy+6vdPmvH78UXca93yiP2d5sXu9rIsFhzY5dtpyzzzj5ZlmXrTJZhUVb5
fGXr5bY+4n1k2V3ADZMsi/Xc81IHr77I3o28ahmLk73MD1/mZdeakSD9sPoy
mbNEXlclkeMX8XIhHQ==
"], "Byte", ColorSpace -> "RGB", Interleaving -> True],
Image[CompressedData["
1:eJzFl19LwlAYxs/mDC+9iGgQiATVxSLS0iAIsigjE1IrKG+UVtSFgQpR9AUW
9FUCb/0K5nVfwW/xdM7ixGFsc5tndPFsc+dw3t+e9z1/zLafancqIaSXopda
63m/22291NP0x0Wn93DfMW9POn3z3uzutBP0pU61TKVRAQityWSC/scjEgXi
KtYWZdwoHExeHFysT9wcYryla/r627LFn9k9bn/EvIgMXorLHzYei68lEyiV
SihXD5Bdy2AxPQdVIyAKgZpUoKQVFHe3cd6oYCNnQFHJbzstS13XpTBxP1IG
QbPZxOhrhOFwiHwub8dhKhxu2r4ZWysYDAYYj8cwTfOv3bKsmVnEGmHef75f
0m9eR+OqjrPjPTuOUVy1OZjM1xssZOZRqVZQPj2iXmpQMnJy5WRxqwvOwSX2
5bUso46dY4dlkVXH0zxxspA34srC+8lg8ZvDrJ0zePkiI09B1hMxjl9/WSx+
axpnYXfx+T98EWszyHyL0xfnHuTXPkvtiueCaTzi/ujlS1QWcT4H2QuD+BY1
R04Wrqg8Udc7MTfOM0pUrijeyMzNLN6ErdW46iZOP8J4E/b8KMMbLxbG4bV+
x+WNV56C/MeQLTeWHweCV/c=
"], "Byte", ColorSpace -> "RGB", Interleaving -> True],
Image[Comp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qpIZRZhX9k4uzyFaRrQMkzJnMSd8SugDPvtt5zn
qDzE4rczlFGZRa6nHEdhEZ8lQSx+vvjVR90pcY+DisL4omJOIkuQL+KZRZag
ujh9kecUlPOomQmTF9F/UapZiGcai8wTlCtVLNPmRL3C8NK7RVwsYRX1fzzM
Ls2LSWSRFYWH5joLD82J7lfNJL8PhvHF71wqWGbhCfO8U50jt+cklnlKZvkF
ClgL5A==
"], "Byte", ColorSpace -> "RGB", Interleaving -> True],
Image[CompressedData["
1:eJztlk9LAkEYxmfWXegSeLKCIKRLhFAqrkZekogyK1iLIL1obVIHAzX6Q1+h
r9HdSwe/gvk9/BZPO8LEMK3rtLvuqcOzsOO7vL953nfeMdl8sG41Qkh3wXlY
jae9TqfxUo07Lxft7l2rbd8ctXt2y+4UmjFnccXRuiPdEYB//VHj8Rhcvfd7
iO9Rc6xeEcTM3+JcUTCwXDwv4xElM0XlxfMnporHzMMf0Q8vhih4GIduxFAq
lWDVrpHcWIOmExiLSyCUQDMoaJwiv5vDmXWCbTMFqhHQGAEbDYlEIhQeti+2
P22ZoF6vY/g1xGAwQDaTneRhMvfTE9/yRRP9fh+j0Qi2bf/8XiznArOItWG9
Un78QCZXwPllFdmdLVCqTfxgMUz2aw2p9CYqpxUcHh/AMHTQtXBqxT2Z1ie8
lzkLE19ziwnaJ7POjczi1uOcJ4g38h5VWMib+zdBvRFnmioLn3tucWzdrzeq
c43lmFYfmdkvC6+Rly9ijBd7WDXy8kW+h6ZxB/VF5RzJPLNi/Hoza77IuVTv
KD/+iHezSi4VyTVVZZJZwuQRmVR8Emsk/28Kg03kmTV75H6ZB4/YR141U+nd
sHhEj9x4RJYo5XbuvwH30By7
"], "Byte", ColorSpace -> "RGB", Interleaving -> True],
Image[CompressedData["
1:eJztlk9Kw0AYxWeSFLrsSggIRcSNFvwTbC26sQuhUCtUulALUmksdVGhLYji
BbroATyB6257hdp7dOMZnpnAp0NM6jRpKoKLl5CZkO83b95MZu3mvnKrMca6
SedSqT8cd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o581fOTSrZVRP
0hi9G53yhI7JajGryUqtsLkZ179mNZm9B9j/Sk5j1JdvGWJyAw==
"], "Byte", ColorSpace -> "RGB", Interleaving -> True],
Image[CompressedData["
1:eJztlsFKAkEcxme1laCLEAlbgkgUHYpIaQ3s0hZhaEZaBOVFaZMKDFSIeoHw
0CN0CXwAr9IbmO/hO3T4mhEmpmHT3XWtQx4+wZ0d/7/5/t9/12jpLnflI4TU
pulHrni/U60WH/JB+uW0UrsuV8zLg0rdLJvVrZKfXtSoFqmmqABMNNG/Va/X
g5X+gqH+fAO/Tr4pfE5+hYnXsKrPJF8fF4/sA6uN2w9LiVxe88gcPzHIYvey
fV6zcC+WZiIwDAOp7C6iKxHMq3NYUEMgCoFPVaAEFSSSmzjKHWI9tgrFRxAK
0XX6qNc0bSQuMR/srC/6EwqFAjrvHbTbbcRj8X4dJn1vo+9DYltHq9VCt9uF
aZpf641GYyQW3hsxH2/GKz3zGk7O8jhOpvt1mB/sXibz8QLh5Vlkshmk0vtQ
AwE0m01PPRmWVc7CJM/VKBlme/nvDcson2mZxat5suqNG1/EeXLDY7c3VvMr
+8LX+PPYrSdOWcQ+iXu5R05ZZE/s9IizcB75HG4yI+aVM9hlEWt6wWKVV7Hv
TlissmSXZVBeOY8TLjdZsfPek1mccNntj9v3r8znhS9W/4vGpUEsnxQKXJ0=
"], "Byte", ColorSpace -> "RGB", Interleaving -> True],
Image[CompressedData["
1:eJztlk9LAkEYxif/QMUSHWLBCkyCiiiJJLOiIKtDYUVaBOklaZMKDFSKomsH
D32Ejn4Aj0nfwPwefounnY2RcdqVHdc/Fw/PLrMzO+9vn/ed2QmkH+O3LkJI
fli/xK+fd3O565fEuN64yObvMlnt5jBb0DJaLpJ26w99umZ1eXQBGGigvqpe
r4NXv+IXPu4xfUXgDv+Jtql6wcQYWOxWokzd5KDzs1jUDyo8fDWJ96kb/vBe
eEbciEajODjaQ2DBj0mvginvGIhL7x/V+2cINnbWcBo/xuZ2BKqqwufzgW5v
9N4pDvrNn+E0UqkUqj9VVCoVhFZDRhxD6pAxZjE4h3K5jFqtBk3TGv3FYtER
C8sLn4/v6BOCK8s4v0zgbGvfiLO0Pt+oXe01CdU/gdhJDMlkEoqioFQqdcwT
sS548WuIia/jTtSNmSdWLOSd/GNhdeyUxa4nrXxhfU54ZDi6ySKuG7ssdCzj
IG/N39Hu3ifuZ3ZYRG/4d1nNyLKInsiy8OLflWURa4SxyOTJjEN2LVnVSLs8
4ng7LOJ/12x+2VxZ8bViEf+7VnPx3sj6ZCc/4hnE7ryyTK08MTsLteu90/yI
eemFrNbyL6DiH8M=
"], "Byte", ColorSpace -> "RGB", Interleaving -> True],
Image[CompressedData["
1:eJztls1KAlEYhsc/+nEjEsFUYBJERUQoDYUQZBQYZmS0KTdKk6RkoELUHbjw
Elp6AW6lOzDvw7t4O0c5cTo605yZUTctXnV0ON/jc775ZqKFl+yjV1GU2jx5
yeZfT6rV/NtNiBzcVmpPxYr+kKrU9aJePSz4yJcqyQaJnwTAf6aUfr8PMbNm
qTdLM2FhNX2aYphJc7H11+5+16XHKJdHvmeuJsHB16KfWSiHGN6P2xw8g3/B
h2QyibOLU0S3IlgJBLBKonjJOYsKPCEPjo4PcJW9xL62i3A4DFVVQccKfXfC
QV1TDvafPzQNuVwO3a8uOp0O4rH4oA7N3PaQd2dvE+12G71eD7qu//zeaDQc
sTAn/B58Ei+JWAzPhOk6kRjU8a8Pe4RGf7/HcmQJ6Uwaqcw5gsEgWq2W6xxG
/cE4WNieutHHjMWoP0UWep7IgmbTcR/LODHzQln4688OC1tLhmWcF+bULot4
DVthYbNmxIswb+w6+WuembkRndphEd1aZRHnv+hUlsWoX6164WuKa8iwjJuv
Yi/IsBg5c6NXZdzYvU/y91+zenwfy3jiZ48ZC78vMmvLMjEWKz7surfKbbQ/
4vOhkz5wukfjnhGnEZHlG9PV3tI=
"], "Byte", ColorSpace -> "RGB", Interleaving ->
True]}, $CellContext`obj$$ = TaskObject[
Association[
"TaskUUID" -> "81588dfd-7a12-414f-a1ca-fc139c95427e", "TaskEnvironment" ->
"Session", "TaskType" -> "Scheduled", "EvaluationExpression" :>
HoldForm[$CellContext`bird$$ = Mod[$CellContext`bird$$ + 1,
Length[$CellContext`birds$$]]], "Schedule" ->
Association[
"Repeated" -> True, "TotalRunCount" -> DirectedInfinity[1],
"RunInterval" -> 0.05], HandlerFunctions -> Association[],
HandlerFunctionsKeys -> {
"Task", "TaskUUID", "TaskType", "TaskStatus", "TaskEnvironment",
"HandlerFunctions", "HandlerFunctionsKeys", "EventName",
"EvaluationExpression", "EvaluationResult", "Schedule", "RunInterval",
"PreviousRunCount", "RemainingRunCount", "TotalRunCount",
"MessageOutput", "PrintOutput"}]]},
DynamicBox[ToBoxes[
Labeled[1234,
Part[$CellContext`birds$$, 1 + $CellContext`bird$$], Top], StandardForm],
Deinitialization:>TaskRemove[$CellContext`obj$$],
ImageSizeCache->{35., {3., 42.}},
Initialization:>($CellContext`bird$$ = 0; $CellContext`birds$$ =
Import["https://rocketchat.wolfram.com/emoji-custom/PartyBird.gif"]; \
$CellContext`obj$$ = SessionSubmit[
ScheduledTask[$CellContext`bird$$ = Mod[$CellContext`bird$$ + 1,
Length[$CellContext`birds$$]], 0.05]]; Null)],
DynamicModuleValues:>{}]], "Output",
CellChangeTimes->{
3.7203552446725187`*^9},ExpressionUUID->"de0e70ff-0991-46cb-8264-\
80d263e132e8"]
}, Open ]]
},
WindowSize->{759, 813},
WindowMargins->{{Automatic, 572}, {74, Automatic}},
FrontEndVersion->"11.2 for Microsoft Windows (64-bit) (September 10, 2017)",
StyleDefinitions->"Default.nb"
]
(* End of Notebook Content *)
(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{}
*)
(*CellTagsIndex
CellTagsIndex->{}
*)
(*NotebookFileOutline
Notebook[{
Cell[558, 20, 1465, 37, 105, "Input",ExpressionUUID->"86d20b64-9ec4-4924-b1a4-43ccd3b5910d"],
Cell[CellGroupData[{
Cell[2048, 61, 196, 4, 28, "Input",ExpressionUUID->"bf66258c-a8d3-4981-b661-570a8dec0ad2"],
Cell[2247, 67, 8715, 159, 63, "Output",ExpressionUUID->"de0e70ff-0991-46cb-8264-80d263e132e8"]
}, Open ]]
}
]
*)
(* End of internal cache information *)