This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# i3 config file (v4) | |
# | |
# Please see http://i3wm.org/docs/userguide.html for a complete reference! | |
# | |
# This config file uses keycodes (bindsym) and was written for the QWERTY | |
# layout. | |
# | |
# To get a config file with the same key positions, but for your current | |
# layout, use the i3-config-wizard |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
# Redirects 'make' output to file to be used in a more easier way by vim's QuickFix | |
function compile { | |
if [ $# -ne 0 ]; | |
then | |
shift | |
make $@ 2>&1 | tee /tmp/compile-log | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--3. Să se creeze un trigger care să permită ca numai salariaţii având codul job-ului AD_PRES sau | |
--AD_VP să poată câştiga mai mult de 15000. | |
--Obs: Trigger-ul se declanşează de un număr de ori = nr de înregistrări inserate sau al căror câmp | |
--salary este modificat (deci are legătură cu datele din tabel) => este un trigger la nivel de linie. | |
create or replace trigger salary_limit | |
before insert or update on emp | |
for each row | |
begin | |
if :new.job_id != 'AD_PRES' and :new.job_id != 'AD_VP' then | |
if :new.salary > 15000 then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) Sa se scrie o procedura care sa intoarca angajatii (cod, nume, job_id) | |
care au avut cele mai multe joburi. | |
Apelati aceasta procedura. | |
2) Sa se scrie o functie care primeste ca argument un cod de manager si | |
intoarce numarul subalternilor acestuia. | |
Apelati functia (in 2 moduri). | |
3) Sa se scrie o procedura care primeste ca argument un cod de angajat si intoarce, folosind acelasi parametru, codul angajatului care a fost angajat dupa acesta (se presupune ca este unic). | |
Tratati erorile care pot sa apara. Apelati procedura. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 1. Să se creeze o procedură stocată care măreşte salariile angajaţilor care nu au comision şi au | |
-- media mai mică decât cea a departamentului în care lucrează cu o valoare transmisă ca | |
-- parametru. | |
create or replace procedure inc_salary (val number) as | |
cursor v_cursor is | |
select department_id, avg(salary) avg_sal | |
from employees | |
group by department_id | |
order by 2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 1. | |
set serveroutput on; | |
declare | |
cursor c_dept is | |
select department_name, avg(salary) sal | |
from departments join employees using(department_id) | |
group by department_name; | |
begin | |
for i in c_dept loop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PROG = main | |
OBJ = $(PROG).o | |
FLAGS = -Wall -lglut -lGL -lGLU | |
all : $(PROG) | |
$(PROG) : $(OBJ) | |
gcc $(OBJ) $(FLAGS) -o $(PROG) | |
%.o : %.c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mod! EXCUARBORI{ ** exercitii cu arbori oarecare | |
extending (NAT) | |
[Nat < Lista , Arbore < Listarb] | |
op nil : -> Arbore ** arborele vid | |
op _{_} : Nat Listarb -> Arbore {prec 20} ** radacina si lista subarborilor | |
op frunza : -> Listarb ** lista de arbori vida | |
op _,_ : Listarb Listarb -> Listarb {assoc id: frunza prec 30} |