Skip to content

Instantly share code, notes, and snippets.

Avatar

William Dias wdiasvargas

View GitHub Profile
@wdiasvargas
wdiasvargas / notes.md
Created Oct 4, 2021 — forked from routeback/notes.md
SEC487 Notes
View notes.md
View script_instalacao.txt
#INSTALE O CHOCOLATEY https://chocolatey.org/install
#Copie e cole o codigo a baixo
#nem todos os programas estao disponiveis pra instalacao por esse script, verificar
choco install ganttproject astah mysql xampp-80 netbeans androidstudio visualstudio2019community mysql.installer visualparadigm-ce postgresql pgadmin4 netfx-4.8 jdk8 jdk11 sublimetext2 vscode codeblocks python3 pycharm-community sqlitestudio -y
View XML-YTS.xml
<?xml version="1.0" encoding="UTF-8"?>
<root meta="{&quot;server_time&quot;:1583534351,&quot;server_timezone&quot;:&quot;CET&quot;,&quot;api_version&quot;:2,&quot;execution_time&quot;:&quot;0.01 ms&quot;}">
<data>
<limit>20</limit>
<movie_count>15406</movie_count>
<movies>
<element>
<background_image>https://yts.mx/assets/images/movies/captain_sabertooth_and_the_magic_diamond_2019/background.jpg</background_image>
<background_image_original>https://yts.mx/assets/images/movies/captain_sabertooth_and_the_magic_diamond_2019/background.jpg</background_image_original>
<date_uploaded>2020-03-06 20:54:56</date_uploaded>
View correspondencia-tipo-map.js
const map = (fn, [x, ...xs]) => (
(x === undefined && xs.length ==0)? []
:[f(x),...map(f,xs)]
);
View teste.json
{
"array": [
1,
2,
3
],
"boolean": true,
"null": null,
"number": 123,
"object": {
View fn_recursive.js
const mapper =(fn, [head, ...tail]) => ( head === undefined && tail.length < 1 ? [] : [fn(head), ...mapper(fn, tail)] );
const filterr = (pred, [head, ...tail]) => head === undefined ? [] : (pred(head) ? [head, ...filterr(pred, tail)] : [...filterr(pred, tail)]);
const reducer = (fn, acc, [head, ...tail]) => head === undefined ? acc : reducer(fn, fn(acc, head), tail);
View 18gew02
<style>
body {
margin: 0;
}
.container {
display: grid;
grid-template-rows: 1fr 5fr 1fr;
grid-template-columns: 2fr 5fr 3fr;
grid-template-areas: "header header header" "nav main aside" "footer footer footer";
View browser-sync.txt
browser-sync start --server --files "css/*.css, *.html"
View 2_dimensional_array_map.js
//Você poderia usar uma array de arrays, que possui o nome de cada donut associado à sua posição na caixa.
//Aqui está um exemplo:
var donutBox = [
["glazed", "chocolate glazed", "cinnamon"],
["powdered", "sprinkled", "glazed cruller"],
["chocolate cruller", "Boston creme", "creme de leche"]
];
//Se você quisesse fazer um loop sobre a caixa de donut e exibir cada donut (juntamente à sua posição na caixa), iniciaria escrevendo um loop de repetição for para fazer o loop em cada linha da caixa de donuts:
View 1.2.js
var feira = "Fui no mercado comprar: caqui, limao, pera, morango, abacaxi.";
var comeco = feira.indexOf(':');
var final = feira.indexOf('.', comeco+1);
var lista = feira.substring(comeco+1, final);
console.log(lista)