<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>CSS Grid Layout</title>
<style>
body {
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
| import glob, shutil, os | |
| from IPython import embed | |
| def final_destination(file_ext): | |
| EXTENSIONS = [ | |
| 'txt', 'pdf', 'zip', 'gz', 'pkg', 'bz2', 'dmg','csv', 'doc', | |
| 'docx', 'pls', 'mp3', 'mp4', 'mov','html', 'htm', 'torrent', | |
| 'iso', 'gem','erb', 'xlsx', 'rtf', 'xml', 'xps', 'gif', 'odt', | |
| 'ai', 'eps', 'js', 'py', 'rb', 'css', 'scss', 'png', 'jpg', | |
| 'epub', 'ind', "psd", 'jpeg', 'tiff', 'mpa', 'wav', 'wma', 'midi', |
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 firstRecurringChar(array) { | |
| let box = {}; | |
| for(let i=0; i < array.length; i++) { | |
| box[array[i]] = [array[i], 0]; | |
| } | |
| for(let j = 0; j < array.length; j++) { | |
| box[array[j]][1]++; | |
| if (box[array[j]][1] == 2) { | |
| return box[array[j]][0] |
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
| class Node { | |
| constructor(value) { | |
| this.value = value; | |
| this.next = null; | |
| } | |
| } | |
| class LinkedList { | |
| constructor(value) { | |
| this.head = { |
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
| $ git remote rm origin | |
| $ git remote add origin [email protected]:aplikacjainfo/proj1.git | |
| $ git config master.remote origin | |
| $ git config master.merge refs/heads/master |
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
| def collatz(num) | |
| sequence_item = [] | |
| sequences = [] | |
| num.downto(1) do |n| | |
| sequence_item.push(n) unless sequence_item[0] == n | |
| while (n != 1) do | |
| value = n.even? ? n = (n / 2) : n = (n * 3) + 1 | |
| sequence_item.push(value) | |
| end | |
| sequences.push(sequence_item) |
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
| def fibonacci(num) | |
| previously_calculated = 1 | |
| current_value = 2 | |
| num.times do | |
| save_value = current_value | |
| p current_value = previously_calculated + save_value | |
| previously_calculated = save_value | |
| end | |
| end |
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
| def uuid | |
| characters = ("a".."f").to_a.concat((1..9).to_a) | |
| uuid = "" | |
| sequence = [8, 4, 4, 8, 12] | |
| sequence.each do |i| | |
| i.times { uuid += characters.sample.to_s } | |
| uuid += "-" unless i == 12 | |
| end | |
| uuid |
NewerOlder