const newItem = {..........}
const res = await fetch("http://localhost:8000/addTask", {
method: "POST",
body: JSON.stringify(newItem),
headers: {
"Content-Type": "application/json", // poner siempre content-type que fastapi te dice no sino, jajaj no sino
},
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 os | |
| import json | |
| import base64 | |
| # pip install pywin32 | |
| from win32 import win32crypt | |
| # pip install pycryptodome | |
| from Crypto.Cipher import AES | |
| import sqlite3 |
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
| fn main() { | |
| let vec = vec!["hola", "miau", "etesech", "elpepe", "ticua"]; | |
| let search = "ticua"; | |
| let idx = binary_search(vec.clone(), search); | |
| assert_eq!(search, vec[idx as usize]); | |
| } | |
| /// If the value is found the `index` is returned. Otherwise `-1` is returned. | |
| /// | |
| /// Example: |
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
| <script lang="ts"> | |
| import { currentUser, sp } from '$lib/supabase'; | |
| import { goto } from '$app/navigation'; | |
| let userInfo = { username: 'ticua07', email: 'ticua@ticua.ar', password: '123456789' }; | |
| let errorMessage = ''; | |
| let passwordInputType = 'password'; | |
| let inputField: HTMLInputElement; | |
| const logIn = async () => { |
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
| :set number | |
| :set relativenumber | |
| :set autoindent | |
| :set nowrap | |
| :set tabstop=2 | |
| :set shiftwidth=2 | |
| :set smarttab | |
| :set softtabstop=2 | |
| :set mouse=a | |
| :set updatetime=300 |
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
| @EventHandler | |
| private void PlayerDeathEvent(PlayerDeathEvent event) { | |
| // og chest has to look at left | |
| System.out.println(event.getEntity().getName()); | |
| Block firstBlock = event.getEntity().getLocation().getBlock(); | |
| firstBlock.setType(Material.CHEST); | |
| Chest firstChest = (Chest) firstBlock.getBlockData(); | |
| firstChest.setType(Chest.Type.LEFT); | |
| firstBlock.setBlockData(firstChest, false); |