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
| function animate(element, options) { | |
| "use strict"; | |
| /* | |
| * Options: | |
| * style - a numerical style property to animate | |
| * property - a numerical property to animate | |
| * endValue - the value to animate to | |
| * unit - (optional) the value's units; defaults to "" | |
| * duration - (optional) how long, in milliseconds, for the animation to complete; defaults to 400 |
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
| var Waiter = (function () { | |
| "use strict"; | |
| var F, func, handleDone, slice; | |
| F = function () { return undefined; }; | |
| func = function () { | |
| var me, resolveArgs, done, waiters; |
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
| CREATE OR REPLACE FUNCTION strip_all_triggers() RETURNS text AS $$ DECLARE | |
| triggNameRecord RECORD; | |
| triggTableRecord RECORD; | |
| BEGIN | |
| FOR triggNameRecord IN select distinct(trigger_name) from information_schema.triggers where trigger_schema = 'public' LOOP | |
| FOR triggTableRecord IN SELECT distinct(event_object_table) from information_schema.triggers where trigger_name = triggNameRecord.trigger_name LOOP | |
| RAISE NOTICE 'Dropping trigger: % on table: %', triggNameRecord.trigger_name, triggTableRecord.event_object_table; | |
| EXECUTE 'DROP TRIGGER ' || triggNameRecord.trigger_name || ' ON ' || triggTableRecord.event_object_table || ';'; | |
| END LOOP; | |
| END LOOP; |
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
| create or replace view showfunctions as | |
| select | |
| l.lanname, | |
| t.typname || ' = ' || n.nspname || '.' || | |
| p.proname || '(' || pg_catalog.oidvectortypes(p.proargtypes) || ')' | |
| as function_definition, | |
| (select case when lanname <> 'c' | |
| then '\n\n'||prosrc ||'\n\n' | |
| else '\n'||prosrc ||'.so\n\n' | |
| end) as source |
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
| var openWindow = function (url, name, width, height, options) { | |
| "use strict"; | |
| var finalOptions, opts, winTop, winLeft, finalTop, finalLeft, winHeight, winWidth; | |
| finalOptions = []; | |
| if (!options) { | |
| options = ""; | |
| } |
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
| function isOdd(num) { | |
| return !!(num & 1); | |
| } |
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
| var Subscriber = (function () { | |
| "use strict"; | |
| var F, allSubscribers, SubClass, PublicClass, handleOn, slice, ret; | |
| F = function () { return undefined; }; | |
| allSubscribers = {}; | |
| SubClass = function (opts) { | |
| var me, events; |
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
| var Classes = (function () { | |
| "use strict"; | |
| var E, trim, containsClass, addClass, removeClass, toggleClass; | |
| E = document.createElement("div"); | |
| if (E.classList && !E.hasOwnProperty("classList")) { | |
| containsClass = function (el, cls) { | |
| return el.classList.contains(cls); |
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
| var Slice = (function () { | |
| "use strict"; | |
| var func; | |
| func = function (arr, start, howMany) { | |
| var stop, newArr, i, j, cur; | |
| start = +start || 0; | |
| howMany = +howMany || Infinity; |
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
| var Each = (function () { | |
| "use strict"; | |
| var O, toString, is, ret; | |
| O = {}; | |
| toString = O.toString; | |
| is = function (o, t) { | |
| return (toString.call(o) === "[object " + t + "]"); | |
| }; |
NewerOlder