Skip to content

Instantly share code, notes, and snippets.

View thinkphp's full-sized avatar
💭
If I have seen further it is only by standing on the shoulders of giants. Newton

Adrian Statescu thinkphp

💭
If I have seen further it is only by standing on the shoulders of giants. Newton
View GitHub Profile
@thinkphp
thinkphp / callback.js
Created September 12, 2026 08:29
callback spre finalul fisierului
/*
Introducere in HTTP methods: GET, POST, PUT, DELETE
aceste 4 metode fac parte din protocolul HTTP si formeaza baza pentru comunicarea client/Server in API-uri REST
Fiecare metoda exprima o intentie diferita asupra unei resurse
GET ----> CITIRE
/*
Introducere in HTTP methods: GET, POST, PUT, DELETE
aceste 4 metode fac parte din protocolul HTTP si formeaza baza pentru comunicarea client/Server in API-uri REST
Fiecare metoda exprima o intentie diferita asupra unei resurse
GET ----> CITIRE
@thinkphp
thinkphp / question.js
Created September 12, 2026 07:54
question.js
var num = 10
var num = 11
console.log(num)
const obj = {1: 'a', 2: 'b', 3: 'c'}
const set = new Set( [1, 2, 3, 4, 5] )
@thinkphp
thinkphp / LocalStorage.JS
Created September 12, 2026 07:39
LocalStorage
const sum = eval('10*10+1')
console.log(sum)
sessionStorage.setItem("code", 123)
/*
A. forever, datele nu se pierd FALSE
B. cand user inchide tab-ul TRUE correct answer
@thinkphp
thinkphp / Bubbling.html
Created September 12, 2026 07:17
Phases Event Bubbling
<div onclick="console.log('div')">
<p onclick="console.log('p')">
click me
</p>
</div>
@thinkphp
thinkphp / main.java
Created September 6, 2026 20:37
main.java
import java.util.ArrayList;
import java.util.List;
import java.util.Date;
import java.util.Iterator;
import java.util.NoSuchElementException;
import java.util.Random;
import java.util.HashSet;
import java.util.Set;
@thinkphp
thinkphp / gist:cefb686302c4f316191e760da0ec3511
Created September 5, 2026 10:29
Style.css Galerie Node
body {
font-family: Arial;
text-align: center;
}
.gallery {
display: flex;
flex-wrap: wrap;
@thinkphp
thinkphp / gist:27680130b5a9382834fce4569fc1c84e
Created September 5, 2026 10:28
server galerie cu documentatie
const http = require('http')
const fs = require('fs')
const path = require('path')
const port = 3000
function serveFile(res, filePath, contentType) {
fs.readFile(filePath, (err, data) => {
<html>
<head>
<script>
function calculateFactorial() {
const number = document.getElementById("number").value;
@thinkphp
thinkphp / gist:b80a6f8327a329cbf51018416fb3a791
Created September 5, 2026 08:57
server express pentru Factorial
const express = require('express')
const path = require('path')
const app = express()
const PORT = 3000;
//functie pentru a calcula factorialul
function factorial(num) {