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
<script setup> | |
import useLocalStorage from './useLocalStorage' | |
const publicKey = useLocalStorage('solana-wallet-public-key') | |
</script> | |
<template> | |
<div> | |
<input type="text" v-model="publicKey"> | |
<div v-text="publicKey"></div> | |
</div> |
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 unittest | |
def bobble_sort(values): | |
""" | |
Sorting list algorithm type of BobbleSort. | |
Time O(n**2 - n) | |
Space O(n + 3) | |
:author sham vinicius fiorin | |
:param values: List of comparable objects |
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 Mapper: | |
def convertValue(self, data, obj): | |
""" | |
Mapper from dict to class, covering it's chieldrens but the key on dict must be mapping the chield with . | |
Exemple: data = { | |
"x": 0, | |
"y": 1, | |
"chield.a": "Sham Vinicius", | |
"chield.b": "Fiorin", | |
"chield.layer.c": "xxx", |
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> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>Add React in One Minute</title> | |
</head> | |
<body> | |
<h2>Add React in One Minute</h2> | |
<p>This page demonstrates using React with no build tooling.</p> |
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 com.google.common.base.Defaults; | |
import com.google.common.collect.Sets; | |
import javax.annotation.Nonnull; | |
import java.beans.BeanInfo; | |
import java.beans.Introspector; | |
import java.beans.PropertyDescriptor; | |
import java.lang.reflect.InvocationTargetException; | |
import java.lang.reflect.Method; | |
import java.util.Set; |
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 java.text.DecimalFormat; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.List; | |
import java.util.function.DoubleFunction; | |
import javafx.application.Application; | |
import javafx.beans.property.SimpleIntegerProperty; | |
import javafx.geometry.Pos; | |
import javafx.scene.Scene; | |
import javafx.scene.chart.CategoryAxis; |
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
const functions = require('firebase-functions'); | |
const gcs = require('@google-cloud/storage')(); | |
const sharp = require('sharp') | |
const _ = require('lodash'); | |
const path = require('path'); | |
const os = require('os'); | |
exports.generateThumbnail = functions.storage.object('uploads/{imageId}').onChange(event => { | |
const object = event.data; // The Storage object. |
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
Oficina MongoDB e Python - FISL | |
Resumo https://university.mongodb.com/courses/M220P/about | |
Install python 3.x (provavelmente vc já tem, 3.7 no mínimo) | |
https://www.python.org/downloads/ | |
para testar python -V | |
Install mongoDB última versão (mínimo 4.x) | |
https://www.mongodb.org/downloads | |
criar diretório \data\db com as permissões necessárias para testar bin\mongod (servidor) |
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 pymongo | |
import sys | |
def main(): | |
connection = pymongo.MongoClient("mongodb://localhost") | |
db = connection.m101 | |
people = db.people | |
person = {'name': 'Barack Obama', 'role':'President', | |
'address':{'address1':'The White House', | |
'street': '1600 Pensylvania Avenue', |
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
from datetime import datetime | |
from pymongo import MongoClient | |
connection = MongoClient("mongodb://localhost") | |
db = connection.test | |
post = {"title": "My Blog Post", | |
"content": "Here's my blog post.", | |
"date": datetime.utcnow()} |
NewerOlder