The popular open-source contract for web professionals by Stuff & Nonsense
- Originally published: 23rd December 2008
- Revised date: March 15th 2016
- Original post
{ | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "node", | |
"request": "launch", | |
"name": "Debug Nest Framework", |
function largestMultipleOfThree(digits: number[]): string { | |
// Digits sorted in ascending order | |
const digitsAsc = [...digits].sort((a, b) => a - b); | |
// Sorting the digits in descending order 9,8,7... | |
const digitsDesc = [...digits].sort((a, b) => b - a); // [8,7,6,1,0] | |
let sum = digits.reduce((prev, curr) => prev + curr, 0); | |
let remainder = sum % 3; | |
let result = digitsDesc; |
/** This component is now maintained via the [quasar-helpers repo](https://github.com/AllanJeremy/quasar-helpers) */ | |
import { createUploaderComponent } from "quasar"; | |
import { computed, ref, watch } from "vue"; | |
// Firebase stuff | |
import { | |
getDownloadURL, | |
ref as firebaseRef, | |
uploadBytesResumable, | |
} from "@firebase/storage"; |
/** Get a link with query params from the current url preserved | |
* @param {String} redirectLink The link to append params to | |
* @param {Object} $route The VueJS route object. Should contain a `query` object | |
* @return {String} The redirect link with url params from the current page appended | |
*/ | |
const getLinkWithQueryParams = (redirectLink, $route) => { | |
const { query } = $route | |
// Return the link as is if no query params were found | |
if (!Object.keys(query).length) { |
/** Get an API response | |
* @param {String} message Message to return as part of the response | |
* @param {Object} data An object representing data returned as part of the API response. Default: `null` | |
* @param {Number} statusCode HTTP status code to be returned with this response. Default: `200` | |
* @return {Object} An API response object | |
*/ | |
const getResponse = (ok, message, data = null, statusCode = 200) => { | |
let response = { | |
ok, | |
message, |
-- | |
-- Table structure for table `currency` | |
-- | |
CREATE TABLE IF NOT EXISTS `currency` ( | |
`iso` char(3) CHARACTER SET utf8 NOT NULL DEFAULT '', | |
`name` varchar(200) COLLATE utf8_unicode_ci NOT NULL, | |
PRIMARY KEY (`iso`), | |
UNIQUE KEY `name` (`name`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
//need to figure way of fixing timeout in loop | |
function AnimateIcon(iconList,elementId,timeInSeconds) | |
{ | |
timeInSeconds*=1000;//Convert the timeIn seconds to milliseconds | |
var element = document.getElementById(elementId);//Get the element | |
var totalAnimationTime = 0; | |
var i = 0; | |
element.innerHTML= iconList[i]; |
CREATE TABLE IF NOT EXISTS `country` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, | |
`iso` char(2) NOT NULL, | |
`name` varchar(80) NOT NULL, | |
`nicename` varchar(80) NOT NULL, | |
`iso3` char(3) DEFAULT NULL, | |
`numcode` smallint(6) DEFAULT NULL, | |
`phonecode` int(5) NOT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |