- Instalaciones:
yarn add --dev jest babel-jest @babel/preset-env @babel/preset-react
yarn add --dev @testing-library/react @types/jest jest-environment-jsdom
- Opcional: Si usamos Fetch API en el proyecto:
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import os | |
import zipfile | |
''' | |
this script is ment to turn .zip files downloaded from mangakatana.com to a serie | |
of .cbz files. The .zip files contain usually 10 chapters of a same manga stored as | |
a serie of folders. | |
''' |
<?php | |
// Connect to the MySQL database. | |
$dsn = "mysql:host=localhost;port=3306;dbname=myapp;user=root;charset=utf8mb4"; | |
// Tip: This should be wrapped in a try-catch. We'll learn how, soon. | |
$pdo = new PDO($dsn); | |
$statement = $pdo->prepare("select * from posts where id = 1"); | |
$statement->execute(); |
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Demo</title> | |
</head> | |
<body> | |
<?php | |
$books = [ |
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Demo</title> | |
</head> | |
<body> | |
<?php | |
$movies = [ |
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Demo</title> | |
</head> | |
<body> | |
<h1> | |
<?= 'Hello World' ?> | |
</h1> |
import { createSlice } from '@reduxjs/toolkit'; | |
export const templateSlice = createSlice({ | |
name: 'name', | |
initialState: { | |
counter: 10 | |
}, | |
reducers: { | |
increment: (state, /* action */ ) => { | |
//! https://react-redux.js.org/tutorials/quick-start |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Title</title> | |
<link href="https://fonts.googleapis.com/css2?family=Raleway" rel="stylesheet"> | |
<link rel="stylesheet" href="../static/css/styles.css"> | |
</head> | |
<body> | |
<div class="wrapper"> |