Skip to content

Instantly share code, notes, and snippets.

View thinkphp's full-sized avatar

Adrian Statescu thinkphp

View GitHub Profile
@thinkphp
thinkphp / responsive-hamburger.html
Created September 13, 2024 14:54
Response Hamburger
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Responsive Hamburger Menu</title>
<style>
body {
margin: 0;
padding: 0;
@thinkphp
thinkphp / sentiment.py
Created August 27, 2024 14:05
textblob sentiment
import tkinter as tk
from tkinter import ttk
from textblob import TextBlob
def analyze_sentiment():
"""Analyzes the sentiment of the input text and updates the UI."""
text = text_entry.get("1.0", "end-1c")
if not text.strip():
sentiment_label.config(text="Please enter some text!", foreground="red")
@thinkphp
thinkphp / hamburger.html
Created August 21, 2024 17:27
responsive design
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Responsive Hamburger Menu</title>
<style>
body {
margin: 0;
<!DOCTYPE html>
<head>
<title>HTML Layout</title>
<style>
* {
box-sizing: border-box;
}
body {
Un element HTML este definit printr-un:
START TAG - content - END TAG
start content end tag
<h1 attributes> my first heading </h1>
<p> my first p </p>
$\int{f(x) g'(x) \ dx} = fg - \int{ g(x) f'(x) \ dx}$
$\int{cos^2x \ dx} = \int{cos \ x \ cos \ x \ dx} = \int{cos \ x \ (sin \ x)' \ dx} = cos \ x \ sin \ x - \int{sin \ x \ (cos \ x)' \ dx} = cos \ x \ sin \ x - \int{sin \ x \ sin \ x \ dx} = cos \ x \ sin \ x - \int{sin^2 \ x \ dx} = sin\ x \ cos \ x + \int{sin^2 \ x \ dx} = sin\ x \ cos \ x + \int{ (1 - cos^2 \ x) \ x \ dx} = sin\ x \ cos \ x + \int{ 1 \ dx} - \int{ cos^2 \ x \ dx} = sin\ x \ cos \ x + x - \int{ cos^2 \ x \ dx} => \int \cos ^2x\,dx=\frac{x+\sin x\cos x}{2}+C. $
def hexaGCD( x, y, z):
def pow2(a,b):
p = 1
for i in range(1,b+1):
p = p * a
return p
@thinkphp
thinkphp / pointerToFn.c
Last active February 23, 2023 08:05
Heap, malloc, algorithm sorting, free, pointers to functions
#include <stdio.h>
#include <malloc.h>
#define fin "algsort.in"
typedef int (*ptr2)(const int a,const int b);
typedef void (*ptr1)(int*, int, ptr2);
int comp(int a, int b) {
#
# Square Root Babylonian Method
# @Adrian Statescu
#
def sqrt_babylonian(n):
x = n
y = 1.0
eps = 0.000001
while x - y > eps:
x = (x + y) / 2
#
# Square Root Babylonian Method
# @Adrian Statescu
#
def sqrt_babylonian(n)
x = n
y = 1.0
e = 0.000001
while x - y > e
x = (x + y) / 2