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
// binding for displaying money values | |
ko.bindingHandlers.numericText = { | |
update: function (element, valueAccessor, allBindingsAccessor) { | |
var value = ko.utils.unwrapObservable(valueAccessor()); | |
var precision = ko.utils.unwrapObservable(allBindingsAccessor().precision) || | |
ko.bindingHandlers.numericText.defaultPrecision; | |
if (value === undefined || value === null) { | |
return; | |
} | |
var formattedValue = Number(value).toFixed(precision); |
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
SELECT * | |
FROM sys.indexes | |
WHERE | |
--name='YourIndexName' AND | |
object_id = OBJECT_ID('<SCHEMA>.<TABLE>') |
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(){ | |
var toMoney = function(num){ | |
if(num === null || num === undefined){ | |
return 0; | |
} | |
// Use this if your number is a string: | |
// return '$' + (Number(num).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,') ); | |
return '$' + (num.toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$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
function Encode(str) { | |
// Rreplace every letter in the string with the letter following it | |
// by first getting the charCode number of the letter, adding 1 to it, then | |
// converting this new charCode number to a letter using the fromCharCode function | |
// we also check to see if the character is z and if so we simply convert the z to an a | |
var codedString = str.replace(/[a-z]/gi, | |
function(char) { | |
return (char === 'z' || char === 'Z') ? 'a' : String.fromCharCode(char.charCodeAt() + 1); | |
}); |
-
Find the Discord channel in which you would like to send commits and other updates
-
In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe!
While the following structure is not an absolute requirement or enforced by the tools, it is a recommendation based on what the JavaScript and in particular Node community at large have been following by convention.
Beyond a suggested structure, no tooling recommendations, or sub-module structure is outlined here.
lib/
is intended for code that can run as-issrc/
is intended for code that needs to be manipulated before it can be used
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
0.990455599104 | |
0.990131006372 | |
0.988156953132 | |
0.986346333872 | |
0.980186977796 | |
0.979454414848 | |
0.97899422699 | |
0.978388958838 | |
0.978292975683 | |
0.978014174891 |
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 go() { | |
var userId = prompt('Username?', 'Guest'); | |
checkIfUserExists(userId); | |
} | |
var USERS_LOCATION = 'https://SampleChat.firebaseIO-demo.com/users'; | |
function userExistsCallback(userId, exists) { | |
if (exists) { | |
alert('user ' + userId + ' exists!'); |
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
/*Setup WOW.js | |
1 | |
Link to the CSS animation library | |
Link to Animate.css | |
(You can link to another CSS animation library by changing WOW.js settings) | |
<link rel="stylesheet" href="css/animate.css"> |