| layout | default |
|---|---|
| author | mattmc3 |
| title | Modern SQL Style Guide |
| revision | 2019-01-17 |
| version | 1.0.1 |
| description | A guide to writing clean, clear, and consistent SQL. |
This file contains hidden or 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
| local batch = {} | |
| local holes_err = "bad argument #%s to function '%s' (this list doesn't support holes)" | |
| local refill = function (t, ...) | |
| local newn = select('#', ...) | |
| local length = math.max(newn, (t.n or #t)) | |
| for i = 1, length do | |
| t[i] = select(i, ...) |
This file contains hidden or 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
| # Copyright 2017 Josef N Patoprsty | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy | |
| # of this software and associated documentation files (the "Software"), to deal | |
| # in the Software without restriction, including without limitation the rights | |
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| # copies of the Software, and to permit persons to whom the Software is | |
| # furnished to do so, subject to the following conditions: | |
| # | |
| # The above copyright notice and this permission notice shall be included in all |
This file contains hidden or 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
| -- | |
| -- OCR all documents added to a folder | |
| -- | |
| on adding folder items to this_folder after receiving added_items | |
| try | |
| repeat with i from 1 to number of items in added_items | |
| set this_item to item i of added_items | |
| set appName to my getAppName() | |
| tell application appName | |
| activate |
This file contains hidden or 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
| import socket | |
| import struct | |
| import json | |
| def unpack_varint(s): | |
| d = 0 | |
| for i in range(5): | |
| b = ord(s.recv(1)) | |
| d |= (b & 0x7F) << 7*i | |
| if not b & 0x80: |
