Skip to content

Instantly share code, notes, and snippets.

View ProfAndreaPollini's full-sized avatar
🎯
Focusing

Andrea Pollini ProfAndreaPollini

🎯
Focusing
View GitHub Profile
@ProfAndreaPollini
ProfAndreaPollini / sqlite.js
Created March 23, 2020 11:51
accesso a un DB sqlite da node.js
var sqlite3 = require("sqlite3").verbose();
var db = new sqlite3.Database("database.db");
db.serialize(function() {
db.run("CREATE TABLE IF NOT EXISTS utenti (nome VARCHAR)");
const stmt = db.prepare("INSERT INTO utenti VALUES (?)");
for (var i = 0; i < 10; i++) {
stmt.run("utente " + i);
}
stmt.finalize();
// Dungeon.cpp : Questo file contiene la funzione 'main', in cui inizia e termina l'esecuzione del programma.
//
#include <iostream>
#include <vector>
#include <windows.h>
using System.Collections;
using System.Collections.Generic;
using System.Drawing;
using UnityEngine;
using UnityEngine.Tilemaps;
public class Minimap : MonoBehaviour
{
enum CellKind { Empty, Room,Wall,Door };
public int mapSize=20;
@ProfAndreaPollini
ProfAndreaPollini / index.html
Last active October 26, 2020 17:51
generative squares
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="https://cdn.jsdelivr.net/npm/p5@1.1.9/lib/p5.js"></script>
<script src="https://unpkg.com/js-quadtree"></script>
</head>
<body>
console.log("it works");
let data = [];
let authors = [];
/*
fetch("https://type.fit/api/quotes")
.then(r => r.json())
.then(body => {
console.log(body)
data = body;
@ProfAndreaPollini
ProfAndreaPollini / applicazioni-react-js-con-vscode.md
Last active November 24, 2020 09:46
creare applicazioni react.js con visual studio code
@ProfAndreaPollini
ProfAndreaPollini / index.js
Created January 18, 2021 08:50
materiale lezione 18 1 2021
const express = require("express")
const app = express()
// elenco di tutti i dischi: GET /vinyls
app.get("/vinyls", (req, res) => {
res.send([
{
titolo: "disco 1",
autore: 1
@ProfAndreaPollini
ProfAndreaPollini / ROADMAP.md
Last active October 16, 2021 07:54
todolist-js: vanilla javascript project

ROADMAP

Il progetto consiste nella realizzazione di una webapp che implenta una todolist.

Ogni elemento della todolist sarà composto da:

  • cosa da fare (str)
  • categoria (str)
  • isDone? (bool)
@ProfAndreaPollini
ProfAndreaPollini / ROADMAP.md
Created October 19, 2021 14:20
TODO LIST | JAVASCRIPT VANILLA

JAVASCRIPT TODO LIST

strumenti

User story

  • come utente voglio visualizzare le note
  • come utente voglio aggiungere una nuova nota