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
/*
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>
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;
@thinkphp
thinkphp / Slideshow JavaSCript + HTML + CSS .html
Created August 29, 2026 09:02
Slideshow JavaSCript + HTML + CSS
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>SlideShow in Action</title>
<style>
* {box-sizing: border-box;}
@thinkphp
thinkphp / Javascript Question.js
Created August 29, 2026 08:06
Question Interview Javascript
function sayHello() {
console.log( name );
//console.log( age );
var name = 'John'; //hoisted
//let age = 20;
}
import java.util.HashSet;
import java.util.Set;
//Custom Exception
//In this java program demonstrates how to create and use custom unchecked exception called ValidationException
//This program performs validation for email addresses and word counts and handles invalid inputs using try-catch blocks
/*
try {
public boolean remove(T item) {
Nod<T> curent = primul;
Nod<T> anterior = null;
while (curent != null) {
if (curent.data == item) {
if (anterior == null) {
primul = curent.urmator;
} else {
anterior.urmator = curent.urmator;
}