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 / 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) {
/*
OOP
- incapsulare
Ascunderea datelor interne si controlul accesului la ele prin metode publice.
Campurile: #id, #color, #x, #y, #borderWidth # visibile sunt declarate cu #, adica sunt private,
nu pot fi accesate direct din afara clasei. Shape.#x ar da eroare
@thinkphp
thinkphp / OOP.js
Created September 5, 2026 08:24
OOP.js
/*
OOP
- incapsulare
Ascunderea datelor interne si controlul accesului la ele prin metode publice.
Campurile: #id, #color, #x, #y, #borderWidth # visibile sunt declarate cu #, adica sunt private,
nu pot fi accesate direct din afara clasei. Shape.#x ar da eroare
@thinkphp
thinkphp / q.js
Created September 5, 2026 08:02
Javascript Questions Interview
// 1 '2' Number('2')
function sum(a, b) {
return a + b;//+ operatorul concateneaza
//dubla semnificatie: prima semnificatie adunare in sens matematic, a doua semnificatie concateneaza doua string-uri
}
//*,/,- transforma in Number
//coercion
@thinkphp
thinkphp / gist:f705085c7ea1b7e38f142960a4356c06
Created August 29, 2026 10:29
Create SErver cu comentarii
const http = require('http');
const fs = require('fs');
const url = require('url');
//factorial(3) = 1 * 2 * 3 = 6
function factorial( num ) {
if(num < 0) return "Nu se poate calcula factorialul pentru numere negative!";
let result = 1;
<!DOCTYPE html>
<html lang="ro">
<head>
<title>Calcul Factorial</title>
<script>
</script>
</head>
<body>