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 / navigareDOM.txt
Created August 8, 2026 09:24
navigare DOM si listener
//NAVIGARE in DOM
const element = document.queryElement(".item")
element.parentElement //elementul parinte
element.children ;
element.firstElementChild; primul copil
@thinkphp
thinkphp / foreach-dataset.html
Created August 8, 2026 09:13
ForEach si data-* dataset
<html>
<head>
<title>
Title
</title>
</head>
<body>
@thinkphp
thinkphp / setinterval.html
Created August 8, 2026 08:48
Exemplu setInterval Javascript current time
<html>
<head>
<style>
.clock-container {
background-color: #ccc;
@thinkphp
thinkphp / Change Background.html
Created August 8, 2026 08:33
Change Background
<html>
<div class="container">
<h1>Change Background</h1>
<input type="color" id="colorPicker">
<input type="text">
@thinkphp
thinkphp / CounterApp.html
Created August 8, 2026 08:26
CounterApp HTML CSS Javascript DOM
<html lang="en">
<head>
<title>Counter App</title>
<style>
body {
font-family: Arial;
@thinkphp
thinkphp / Singleton Design Pattern.java
Last active July 6, 2026 15:40
Singleton Design Pattern
//Baza de date ----
class Singleton {
private static Singleton instance; //singura instanta
private Singleton() { //constructor PRIVATE - nu poate fi apelat din afara
System.out.println("Instanta a fost creata!");
}
@thinkphp
thinkphp / Clasa interioara.java
Created July 6, 2026 15:33
Clasa interioara
class Car {
private String model = "TESLA";
class Engine { //clasa interioara
void start() {
System.out.println("MOtorul porneste pentru " + model);
}
@thinkphp
thinkphp / Abstractizare.java
Created July 6, 2026 15:32
Abstractizare java
abstract class Shape {
abstract double calculateArea(); //metoda abstracta, FARA implementare
void display() {
System.out.println("Aria formei este: " + calculateArea());
}
}
@thinkphp
thinkphp / Interface.java
Created July 6, 2026 15:32
Interfata.java
interface Shape {
double calculateArea(); //public
double calculatePerimeter();
}
class Circle implements Shape {
double radius;
@thinkphp
thinkphp / polimorfism.java
Created July 6, 2026 14:48
polimorfism.java
class Shape {
void draw() {
System.out.println("Desenez o forma geometrica");
}
}
//subclasa 1
class Circle extends Shape {
@Override