# Not tested yet!
# This algorithm uses vector rotation.
# I will soon do a project explaining!- crie um arquivo map[k] com 4 pontos de uma reta
- declare uma var size do fractal a ser desenhado
- declare uma var k = 1, i = 0
- enquanto i < size
| package main | |
| import ( | |
| "fmt" | |
| "regexp" | |
| "strings" | |
| ) | |
| func invert(str string) string { | |
| result := "" |
| #!/bin/python3 | |
| import math | |
| import os | |
| import random | |
| import re | |
| import sys | |
| def findNextDivByFive(number): | |
| count = 0 |
| fun uncompressLz4File(path: String): ByteArray { | |
| var f: File = File(path) | |
| val megabytes = 1024 * 1024; | |
| val inputStream = ByteArrayInputStream(f.readBytes()) | |
| var lz4In: LZ4FrameInputStream = LZ4FrameInputStream(inputStream) | |
| var frameIndex: Int = 0 | |
| var decompressed: ByteArray = ByteArray( megabytes * 50) // should be greater than file descompressed size | |
| var filled: Int = 0; | |
| while (true) { |
| package main | |
| import ( | |
| "bytes" | |
| "encoding/binary" | |
| "io" | |
| "io/ioutil" | |
| "log" | |
| "os" |
| function randomString(range: number) { | |
| let str = ''; | |
| for(let index=0; index <= range; index++) { | |
| str += Math.random().toString(36).replace(/\./g,''); | |
| } | |
| return str; | |
| } |
| class ICorporationGovernanceRepo(Protocol): | |
| def persist(self, dto: CreateCorporationGovernanceDto) -> CorporationGovernance: | |
| ... | |
| def update( | |
| self, id_: int, dto: UpdateCorporationGovernanceDto | |
| ) -> Optional[CorporationGovernance]: | |
| ... | |
| # TODO: This should be fetch_by_corporation |
| const getDate = (): string => { | |
| const now = new Date(); | |
| const day = now.getDate(); | |
| const month = `0${now.getMonth() + 1}`.slice(-2); | |
| const year = now.getFullYear(); | |
| return `${day}-${month}-${year}`; | |
| }; |
| const net = require('net'); | |
| const client = new net.Socket(); | |
| client.connect(80, 'zrp-challenge-socket.herokuapp.com', () => { | |
| console.log('Connected...'); | |
| }); | |
| client.on('ocurrence', (data) => console.log('Received: ' + data)); |
| const [pathname, setPathname] = useState(history.location.pathname); | |
| useEffect(() => { | |
| history.listen((location) => { | |
| setPathname(location.pathname); | |
| }); | |
| }, []); |
# Not tested yet!
# This algorithm uses vector rotation.
# I will soon do a project explaining!