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 / introducere.cpp
Created September 20, 2026 08:32
introducere.cpp
///OOP
#include <iostream>
#include <string>
using namespace std;
int main(int argc, char const *argv[])
{
int a;
@thinkphp
thinkphp / algoritmi.txt
Created September 20, 2026 07:26
algoritmi.txt
Ce este un algoritm?
--------------------
....1,2,3,4,5,6,7,8 Multime
Notiunea de algoritm este primara, nu se defineste, intocmai ca si notiunea de multime din matematica. Cu toate acestea, ca si multimea, algoritmul poate fi descris. In esenta este vorba de o succesiune de etape (instructiuni) care se pot aplica mecanic in vederea obtinerii unui rezultat.
- date de intrare INPUT a,b,c,d
a + b = R
a / b = R2
a * b = R3
@thinkphp
thinkphp / bind-call.js
Created September 19, 2026 07:17
bind-call-theory
const person = {name: "John"}
function sayHello( age ) {
return `${this.name} is ${age}`
}
console.log(sayHello.call(person,20))
@thinkphp
thinkphp / main.c
Created September 18, 2026 08:08
intro-lang-c.c
#include <stdio.h> //include declaratii din biblioteca stdio printf
#include <stdbool.h>
//stdio = standard input/output
int main() {
int age;
char name[ 20 ];
bool ok = true; //false sau true //open/close
@thinkphp
thinkphp / algo.txt
Created September 18, 2026 08:07
intro - algorithms
DSA Data Structures and Algorithms
----------------------------------
Liceu
-----
Ce este un algoritm?
Caracteristici...
@thinkphp
thinkphp / framework.md
Last active September 15, 2026 05:27
testing framework

Custom Lightweight Java Testing Framework

A lightweight, dependency-free unit testing framework built from scratch in core Java. This project demonstrates custom assertion mechanisms (including assertThrows), execution time benchmarking at the millisecond level, exception handling validation, and clean architectural separation of concerns.

Key Features

  • Zero External Dependencies: Built entirely using native Java standard libraries.
  • Core Assertions: Includes assertEquals, assertTrue, assertFalse, assertNull, and assertNotNull.
  • Exception Validation (assertThrows): Features a custom @FunctionalInterface (Executable) to power assertThrows for verifying expected exceptions thrown by invalid operations.
  • Execution Benchmarking: Measures the execution duration of each individual assertion/test and calculates total suite runtimes using high-precision System.nanoTime().
@thinkphp
thinkphp / Main.java
Created September 13, 2026 19:29
Main.java
import java.util.ArrayList;
import java.util.List;
import java.util.Iterator;
import java.util.NoSuchElementException;
import java.util.Random;
import java.util.HashSet;
import java.util.Set;
import java.util.Date;
import java.util.Calendar;
@thinkphp
thinkphp / script.js
Created September 12, 2026 10:18
script.js GET POST PUT DELETE
document.addEventListener('DOMContentLoaded', () => {
const taskList = document.getElementById('task-list');
const newTaskInput = document.getElementById('new-task');
const addTaskButton = document.getElementById('add-task');
// Incarca task-urile de pe server (echivalentul loadTasks() din varianta cu localStorage)
async function loadTasks() {
const res = await fetch('/api/tasks');
const tasks = await res.json();
taskList.innerHTML = '';
@thinkphp
thinkphp / to Do List complet.html
Created September 12, 2026 09:10
To Do List Complete localStorage
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>To-Do List</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f0f4f8;
@thinkphp
thinkphp / todolist-localstorage.html
Created September 12, 2026 08:54
ToDoList cu localStorage integrat
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>To-Do List</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f0f4f8;