Skip to content

Commit

Permalink
AndreaMariaDB_Initial_Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrea MariaDB authored Jun 12, 2021
1 parent e9db3d2 commit 5fbc5fc
Show file tree
Hide file tree
Showing 94 changed files with 780 additions and 0 deletions.
3 changes: 3 additions & 0 deletions database.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"records": {}
}
4 changes: 4 additions & 0 deletions desktop.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[ViewState]
Mode=
Vid=
FolderType=Generic
17 changes: 17 additions & 0 deletions meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[
{
"fileName": "sharedarraybuffer-bytelength.js",
"title": "JavaScript: SharedArrayBuffer.byteLength",
"type": "js"
},
{
"fileName": "sharedarraybuffer-constructor.js",
"title": "JavaScript: SharedArrayBuffer Constructor",
"type": "js"
},
{
"fileName": "sharedarraybuffer-slice.js",
"title": "JavaScript: SharedArrayBuffer.slice()",
"type": "js"
}
]
6 changes: 6 additions & 0 deletions string-charat.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
var sentence = 'The quick brown fox jumps over the lazy dog.';

var index = 4;

console.log('The character at index ' + index + ' is ' + sentence.charAt(index));
// expected output: "The character at index 4 is q"
6 changes: 6 additions & 0 deletions string-charcodeat.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
var sentence = 'The quick brown fox jumps over the lazy dog.';

var index = 4;

console.log('The character code ' + sentence.charCodeAt(index) + ' is equal to ' + sentence.charAt(index));
// expected output: "The character code 113 is equal to q"
4 changes: 4 additions & 0 deletions string-codepointat.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
var icons = '☃★♲';

console.log(icons.codePointAt(1));
// expected output: "9733"
8 changes: 8 additions & 0 deletions string-concat.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
var str1 = 'Hello';
var str2 = 'World';

console.log(str1.concat(' ', str2));
// expected output: "Hello World"

console.log(str2.concat(', ', str1));
// expected output: "World, Hello"
9 changes: 9 additions & 0 deletions string-endswith.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const str1 = 'Cats are the best!';

console.log(str1.endsWith('best', 17));
// expected output: true

const str2 = 'Is this a question';

console.log(str2.endsWith('?'));
// expected output: false
2 changes: 2 additions & 0 deletions string-fromcharcode.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
console.log(String.fromCharCode(189, 43, 190, 61));
// expected output: "½+¾="
2 changes: 2 additions & 0 deletions string-fromcodepoint.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
console.log(String.fromCodePoint(65, 90, 48));
// expected output: "AZ0"
6 changes: 6 additions & 0 deletions string-includes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
var sentence = 'The quick brown fox jumps over the lazy dog.';

var word = 'fox';

console.log(`The word "${word}" ${sentence.includes(word)? 'is' : 'is not'} in the sentence`);
// expected output: "The word "fox" is in the sentence"
10 changes: 10 additions & 0 deletions string-indexof.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
var paragraph = 'The quick brown fox jumps over the lazy dog. If the dog barked, was it really lazy?';

var searchTerm = 'dog';
var indexOfFirst = paragraph.indexOf(searchTerm);

console.log('The index of the first "' + searchTerm + '" from the beginning is ' + indexOfFirst);
// expected output: "The index of the first "dog" from the beginning is 40"

console.log('The index of the 2nd "' + searchTerm + '" is ' + paragraph.indexOf(searchTerm, (indexOfFirst + 1)));
// expected output: "The index of the 2nd "dog" is 52"
12 changes: 12 additions & 0 deletions string-iterator.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const str = 'The quick red fox jumped over the lazy dog\'s back.';

let iterator = str[Symbol.iterator]();
let theChar = iterator.next();

while(!theChar.done && theChar.value !== ' ') {
console.log(theChar.value);
theChar = iterator.next();
// expected output: "T"
// "h"
// "e"
}
6 changes: 6 additions & 0 deletions string-lastindexof.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
var paragraph = 'The quick brown fox jumps over the lazy dog. If the dog barked, was it really lazy?';

var searchTerm = 'dog';

console.log('The index of the first "' + searchTerm + '" from the end is ' + paragraph.lastIndexOf(searchTerm));
// expected output: "The index of the first "dog" from the end is 52"
4 changes: 4 additions & 0 deletions string-length.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
var str = 'Life, the universe and everything. Answer:';

console.log(str + ' ' + str.length);
// expected output: "Life, the universe and everything. Answer: 42"
7 changes: 7 additions & 0 deletions string-localecompare.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
var a = 'réservé'; // with accents, lowercase
var b = 'RESERVE'; // no accents, uppercase

console.log(a.localeCompare(b));
// expected output: 1
console.log(a.localeCompare(b, 'en', {sensitivity: 'base'}));
// expected output: 0
6 changes: 6 additions & 0 deletions string-match.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
var paragraph = 'The quick brown fox jumps over the lazy dog. It barked.';
var regex = /[A-Z]/g;
var found = paragraph.match(regex);

console.log(found);
// expected output: Array ["T", "I"]
10 changes: 10 additions & 0 deletions string-matchall.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
let regexp = /t(e)(st(\d?))/g;
let str = 'test1test2';

let array = [...str.matchAll(regexp)];

console.log(array[0]);
// expected output: Array ["test1", "e", "st1", "1"]

console.log(array[1]);
// expected output: Array ["test2", "e", "st2", "2"]
15 changes: 15 additions & 0 deletions string-normalize.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
var first = '\u212B'; // "Å"
var second = '\u0041\u030A'; // "Å"

console.log(first + ' and ' + second + ' are' +
((first === second)? '': ' not') + ' the same.');
// expected output: "Å and Å are not the same."

console.log(first + ' and ' + second + ' can' +
((first.normalize('NFC') === second.normalize('NFC'))? '': ' not') + ' be normalized');
// expected output: "Å and Å can be normalized"

var oldWord = 'mañana';
var newWord = oldWord.normalize('NFD');
console.log('The word did ' + ((oldWord != newWord)? '' : 'not ') + 'change.');
// expected output: "The word did change."
9 changes: 9 additions & 0 deletions string-padend.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const str1 = 'Breaded Mushrooms';

console.log(str1.padEnd(25, '.'));
// expected output: "Breaded Mushrooms........"

const str2 = '200';

console.log(str2.padEnd(5));
// expected output: "200 "
11 changes: 11 additions & 0 deletions string-padstart.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const str1 = '5';

console.log(str1.padStart(2, '0'));
// expected output: "05"

const fullNumber = '2034399002125581';
const last4Digits = fullNumber.slice(-4);
const maskedNumber = last4Digits.padStart(fullNumber.length, '*');

console.log(maskedNumber);
// expected output: "************5581"
6 changes: 6 additions & 0 deletions string-raw.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Create a variable that uses a Windows
// path without escaping the backslashes:
const filePath = String.raw`C:\Development\profile\aboutme.html`;

console.log('The file was uploaded from: ' + filePath);
// expected output: "The file was uploaded from: C:\Development\profile\aboutme.html"
5 changes: 5 additions & 0 deletions string-repeat.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions string-replace.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
var p = 'The quick brown fox jumps over the lazy dog. If the dog reacted, was it really lazy?';

var regex = /dog/gi;

console.log(p.replace(regex, 'ferret'));
// expected output: "The quick brown fox jumps over the lazy ferret. If the ferret reacted, was it really lazy?"

console.log(p.replace('dog', 'monkey'));
// expected output: "The quick brown fox jumps over the lazy monkey. If the dog reacted, was it really lazy?"
10 changes: 10 additions & 0 deletions string-search.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
var paragraph = 'The quick brown fox jumps over the lazy dog. If the dog barked, was it really lazy?';

// any character that is not a word character or whitespace
var regex = /[^\w\s]/g;

console.log(paragraph.search(regex));
// expected output: 43

console.log(paragraph[paragraph.search(regex)]);
// expected output: "."
13 changes: 13 additions & 0 deletions string-slice.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
var str = 'The quick brown fox jumps over the lazy dog.';

console.log(str.slice(31));
// expected output: "the lazy dog."

console.log(str.slice(4, 19));
// expected output: "quick brown fox"

console.log(str.slice(-4));
// expected output: "dog."

console.log(str.slice(-9, -5));
// expected output: "lazy"
13 changes: 13 additions & 0 deletions string-split.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
var str = 'The quick brown fox jumps over the lazy dog.';

var words = str.split(' ');
console.log(words[3]);
// expected output: "fox"

var chars = str.split('');
console.log(chars[8]);
// expected output: "k"

var strCopy = str.split();
console.log(strCopy);
// expected output: Array ["The quick brown fox jumps over the lazy dog."]
7 changes: 7 additions & 0 deletions string-startswith.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const str1 = 'Saturday night plans';

console.log(str1.startsWith('Sat'));
// expected output: true

console.log(str1.startsWith('Sat', 3));
// expected output: false
7 changes: 7 additions & 0 deletions string-substr.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
var str = 'Mozilla';

console.log(str.substr(1, 2));
// expected output: "oz"

console.log(str.substr(2));
// expected output: "zilla"
7 changes: 7 additions & 0 deletions string-substring.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
var str = 'Mozilla';

console.log(str.substring(1, 3));
// expected output: "oz"

console.log(str.substring(2));
// expected output: "zilla"
7 changes: 7 additions & 0 deletions string-tolocalelowercase.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
var dotted = 'İstanbul';

console.log('EN-US: ' + dotted.toLocaleLowerCase('en-US'));
// expected output: "i̇stanbul"

console.log('TR: ' + dotted.toLocaleLowerCase('tr'));
// expected output: "istanbul"
7 changes: 7 additions & 0 deletions string-tolocaleuppercase.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
var city = 'istanbul';

console.log(city.toLocaleUpperCase('en-US'));
// expected output: "ISTANBUL"

console.log(city.toLocaleUpperCase('TR'));
// expected output: "İSTANBUL"
4 changes: 4 additions & 0 deletions string-tolowercase.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
var sentence = 'The quick brown fox jumps over the lazy dog.';

console.log(sentence.toLowerCase());
// expected output: "the quick brown fox jumps over the lazy dog."
7 changes: 7 additions & 0 deletions string-tostring.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
var stringObj = new String("foo");

console.log(stringObj);
// expected output: String { "foo" }

console.log(stringObj.toString());
// expected output: "foo"
4 changes: 4 additions & 0 deletions string-touppercase.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
var sentence = 'The quick brown fox jumps over the lazy dog.';

console.log(sentence.toUpperCase());
// expected output: "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG."
7 changes: 7 additions & 0 deletions string-trim.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
var greeting = ' Hello world! ';

console.log(greeting);
// expected output: " Hello world! ";

console.log(greeting.trim());
// expected output: "Hello world!";
7 changes: 7 additions & 0 deletions string-trimend.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
var greeting = ' Hello world! ';

console.log(greeting);
// expected output: " Hello world! ";

console.log(greeting.trimEnd());
// expected output: " Hello world!";
7 changes: 7 additions & 0 deletions string-trimstart.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
var greeting = ' Hello world! ';

console.log(greeting);
// expected output: " Hello world! ";

console.log(greeting.trimStart());
// expected output: "Hello world! ";
7 changes: 7 additions & 0 deletions string-valueof.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
var stringObj = new String("foo");

console.log(stringObj);
// expected output: String { "foo" }

console.log(stringObj.valueOf());
// expected output: "foo"
12 changes: 12 additions & 0 deletions symbol-constructor.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const symbol1 = Symbol();
const symbol2 = Symbol(42);
const symbol3 = Symbol('foo');

console.log(typeof symbol1);
// expected output: "symbol"

console.log(symbol3.toString());
// expected output: "Symbol(foo)"

console.log(Symbol('foo') === Symbol('foo'));
// expected output: false
10 changes: 10 additions & 0 deletions symbol-for.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
console.log(Symbol.for('bar') === Symbol.for('bar'));
// expected output: true

console.log(Symbol('bar') === Symbol('bar'));
// expected output: false

const symbol1 = Symbol.for('foo');

console.log(symbol1.toString());
// expected output: "Symbol(foo)"
Loading

0 comments on commit 5fbc5fc

Please sign in to comment.