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

📁 1. Tabel: Clienti

Acest tabel stochează informații despre clienți.

Structura coloanelor:

  • ID_Client INT PRIMARY KEY IDENTITY(1,1)

    • Cheia primară a tabelului, crește automat de la 1 în sus.
  • Nume NVARCHAR(100) NOT NULL

@thinkphp
thinkphp / ticket-prices.java
Created May 21, 2025 09:49
Ticket PRices care extinde JFrame si implementeaza ActionListener
import javax.swing.*;//playermp3 cu FX
import java.awt.*;
import java.awt.event.*;
public class TicketPrices extends JFrame implements ActionListener {
private JTextField singlePrice, ticketCount;
@thinkphp
thinkphp / linkedList-example.java
Created May 21, 2025 09:29
Lista simplu inlantuita exemplu
import java.util.LinkedList;
public class ExemplulLinkedList {
public static void main(String[] args) {
//cum se creeaza o structura de date LinkedList
LinkedList<String> listasimpluinlantuita = new LinkedList<>();
//adaugare elemente
@thinkphp
thinkphp / aufgabe3subtasks-a-b-c.java
Created May 21, 2025 09:28
Aufgabe 3 subtask a)
import java.util.*;
public class Video {
private List<String>
scenes = new LinkedList<String>(),
adFree = new LinkedList<String>(),
ads = new LinkedList<String>();
//a) implementam metoda add
@thinkphp
thinkphp / ComplexComparable.java
Created May 21, 2025 08:55
Aufgabe2 subtask c)
/*
point c)
Die Objekte der Klasse Complex sollen zusätzlich paarweise vergleichbar sein:
Implementieren Sie das Interface Comparable. Dabei soll gelten, daß eine komplexe Zahl
x genau dann größer ist als eine komplexe Zahl y, wenn der Betrag von x größer ist als der
Betrag von y
*/
class Complex implements Addition<Complex>, Comparable<Complex> {
/*
z1 = a + bi
z2 = x + yi
z1 + z2 = a + x + i(b + y)
*/
class Complex implements Addition<Complex> {
private double re, im;
//constructorul clasei Complex
@thinkphp
thinkphp / AreaPeri.java
Created May 21, 2025 08:14
Aria si Perimetrul Dreptunghi
public class Rectangle implements Comparable<Rectangle> {
private int length, width;
//contructorul clasei Rectangle
public Rectangle(int length, int width) {
this.length = length;
this.width = width;
}
@thinkphp
thinkphp / README.md
Created May 20, 2025 18:41
Threads BankAccount README.md

Putina teorie despre Fire de Executie Threads

Thread-urile în programare reprezintă unități de execuție care permit unui program să efectueze mai multe sarcini simultan. Iată o explicație concretă a conceptului:

Thread-urile sunt secvențe de instrucțiuni care pot fi executate independent de restul programului, dar în cadrul aceluiași proces. Spre deosebire de procese separate, thread-urile din același proces partajează spațiul de memorie, ceea ce permite o comunicare mai eficientă între ele.

Câteva aspecte importante despre thread-uri:

  • Ele permit programelor să execute mai multe operațiuni în paralel, îmbunătățind performanța, în special pe sisteme cu procesoare multi-core
  • Thread-urile partajează resursele procesului principal (memorie, fișiere deschise), dar au propria stivă de execuție și registri
@thinkphp
thinkphp / RentACar.js
Created May 10, 2025 10:40
RentACar script
<script>
// Car data (in a real app, this would come from a database)
const cars = [
{
id: 1,
name: "Toyota Corolla",
category: "Economy",
image: "/api/placeholder/300/200",
features: {
seats: 5,
@thinkphp
thinkphp / rentaCAR.html
Created May 10, 2025 10:38
Rentacar HTML
<body>
<header>
<div class="container header-content">
<div class="logo">SpeedyRent</div>
<nav>
<ul>
<li><a href="#home">Home</a></li>
<li><a href="#cars">Cars</a></li>
<li><a href="#locations">Locations</a></li>
<li><a href="#about">About</a></li>