This file contains hidden or 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
| /* | |
| OOP | |
| - incapsulare | |
| Ascunderea datelor interne si controlul accesului la ele prin metode publice. | |
| Campurile: #id, #color, #x, #y, #borderWidth # visibile sunt declarate cu #, adica sunt private, | |
| nu pot fi accesate direct din afara clasei. Shape.#x ar da eroare |
This file contains hidden or 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
| /* | |
| OOP | |
| - incapsulare | |
| Ascunderea datelor interne si controlul accesului la ele prin metode publice. | |
| Campurile: #id, #color, #x, #y, #borderWidth # visibile sunt declarate cu #, adica sunt private, | |
| nu pot fi accesate direct din afara clasei. Shape.#x ar da eroare |
This file contains hidden or 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 '2' Number('2') | |
| function sum(a, b) { | |
| return a + b;//+ operatorul concateneaza | |
| //dubla semnificatie: prima semnificatie adunare in sens matematic, a doua semnificatie concateneaza doua string-uri | |
| } | |
| //*,/,- transforma in Number | |
| //coercion |
This file contains hidden or 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
| const http = require('http'); | |
| const fs = require('fs'); | |
| const url = require('url'); | |
| //factorial(3) = 1 * 2 * 3 = 6 | |
| function factorial( num ) { | |
| if(num < 0) return "Nu se poate calcula factorialul pentru numere negative!"; | |
| let result = 1; |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html lang="ro"> | |
| <head> | |
| <title>Calcul Factorial</title> | |
| <script> | |
| </script> | |
| </head> | |
| <body> |
This file contains hidden or 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
| const http = require('http'); | |
| const fs = require('fs'); | |
| const url = require('url'); | |
| //factorial(3) = 1 * 2 * 3 = 6 | |
| function factorial( num ) { | |
| if(num < 0) return "Nu se poate calcula factorialul pentru numere negative!"; | |
| let result = 1; |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <title>SlideShow in Action</title> | |
| <style> | |
| * {box-sizing: border-box;} |
This file contains hidden or 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
| function sayHello() { | |
| console.log( name ); | |
| //console.log( age ); | |
| var name = 'John'; //hoisted | |
| //let age = 20; | |
| } |
This file contains hidden or 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
| import java.util.HashSet; | |
| import java.util.Set; | |
| //Custom Exception | |
| //In this java program demonstrates how to create and use custom unchecked exception called ValidationException | |
| //This program performs validation for email addresses and word counts and handles invalid inputs using try-catch blocks | |
| /* | |
| try { |
This file contains hidden or 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
| public boolean remove(T item) { | |
| Nod<T> curent = primul; | |
| Nod<T> anterior = null; | |
| while (curent != null) { | |
| if (curent.data == item) { | |
| if (anterior == null) { | |
| primul = curent.urmator; | |
| } else { | |
| anterior.urmator = curent.urmator; | |
| } |