This file contains 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
len_NM(L, N, M):- len_NM(L, 0, N, M). | |
lenght([],0). | |
lenght([_|T],R):- lenght(T, R1),R is R1+1. | |
len_NM([], X, N, _):- X >= N. | |
len_NM([A|L], X, N, M):- | |
lenght(A, AL), | |
AL >= M, |
This file contains 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
{ | |
"definitions": { | |
"User": { | |
"properties": { | |
"email": { | |
"description": "email for user", | |
"type": "string" | |
}, | |
"name": { | |
"description": "name for user", |
This file contains 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
# Great way to check disk usage! | |
du -ahd2 | gsort -h |
This file contains 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
#!/usr/bin/env node | |
// Script to update typings to their latest versions. | |
// Note that it should be executed in the folder where typings.json is. | |
const { exec, execSync } = require('child_process'); | |
const path = require('path'); | |
const typings = require(path.join(process.cwd(), 'typings.json')); | |
exec('typings ls', (error, _, stderr) => { | |
if (error) { |
This file contains 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
/** | |
* Checks if a book is read. | |
* @param {string} book - The title of the book. | |
* @returns {boolean} True if the book is read; false otherwise. | |
*/ | |
function isRead(book) { | |
return true; | |
} |
This file contains 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
/** | |
* This is a global variable description. | |
* @type {number} | |
*/ | |
var globalVar = 3; |
This file contains 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
/** | |
* @name virtualGlobalVar | |
* @description This a virtual global variable. | |
* @global | |
* @type {string} | |
*/ |
This file contains 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
/** | |
* This is a global const. | |
* @constant | |
* @default | |
*/ | |
var GLOBAL_CONST = 42; |
This file contains 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
/** | |
* This is a global function | |
* with description on two lines. | |
* @param {number} foo - Function's first parameter called 'foo'. | |
* @param bar Second parameter. Note that the dash before the description is optional. Type is optional as well. | |
* @returns {boolean} Description of the return value. | |
*/ | |
var globalFunc = function (foo, bar) { | |
return true; | |
} |
This file contains 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
/** | |
* This is an ES6 class. | |
*/ | |
class ES6Class { | |
} |
OlderNewer