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
def splitparts(string_seq, parts): | |
""" | |
Args: | |
string_seq(str): sequências em string, como "ARARA", "VOO", "AVES". | |
parts(int): critério para quebrar a sequência em string | |
Returns: | |
Retorna a lista dividida de acordo com o critério parts, veja | |
exemplos: | |
1) splitparts("ARARA", 2) -> ["AR", "AR", "A"] |
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
""" | |
HOW TO USE => | |
1. DOWNLOAD FIREFOX DRIVE: GECKODRIVER | |
2. INSTALL SELENIUM AND WATCHDOG LIBS | |
3. USE PYTHON3 | |
4. SPECIFY MAIN HTML FILE FOR RELOAD WHENEVER THE PATH CHANGES | |
5. SPECIFY THE PATH OF YOUR PROJECT | |
ENJOY |
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
class Singleton { | |
static Singleton _instance = Singleton.internal(); | |
Singleton.internal(); | |
factory Singleton(){ | |
return _instance; | |
} | |
static get instance => _instance; |
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
<!DOCTYPE html> | |
<html lang="pt-br"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>TicTacToe</title> | |
<style> | |
body { | |
margin: 0; |
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
<!DOCTYPE html> | |
<html lang="pt-br"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>LOGIN FORMS WITH FLEXBOX</title> | |
<style> | |
body { | |
height: 100vh; | |
margin: 0; |
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
sealed class Either<L, R> { | |
inline fun <B> fold(onLeft: (L) -> B, onRight: (R) -> B): B = when (this) { | |
is Left -> onLeft(this.value) | |
is Right -> onRight(this.value) | |
} | |
operator fun not() = fold(::id, ::id) | |
} | |
class Left<L, R>(val value: L) : Either<L, R>() |
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
#!/bin/bash | |
############################################################### | |
# Script Name : ktexec # | |
# Description : Compile and optionally executes Kotlin File # | |
# Args : KOTLIN-FILE [-x] # | |
# Author : José Almir # | |
# Email : jrcodev@gmail.com # | |
############################################################### |
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
// TypeScript Fast Crash Course Annotations | |
// Type inference | |
const car = { | |
brand: 'BMW', | |
engine: '3.4', | |
run: () => { | |
console.log(`Running ${car.brand}`); | |
} | |
}; |
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
import 'dart:math'; | |
import 'dart:typed_data'; | |
import 'package:flutter/material.dart'; | |
const amp = 20.0; | |
const freq = 1 / 150; | |
final mirrorX = Float64List.fromList([ | |
1, 0, 0, 0, |
OlderNewer