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.ArrayList; | |
| import java.util.List; | |
| import java.util.Date; | |
| import java.util.Iterator; | |
| import java.util.NoSuchElementException; | |
| import java.util.Random; | |
| import java.util.HashSet; | |
| import java.util.Set; |
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
| body { | |
| font-family: Arial; | |
| text-align: center; | |
| } | |
| .gallery { | |
| display: flex; | |
| flex-wrap: wrap; |
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 path = require('path') | |
| const port = 3000 | |
| function serveFile(res, filePath, contentType) { | |
| fs.readFile(filePath, (err, data) => { |
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
| <html> | |
| <head> | |
| <script> | |
| function calculateFactorial() { | |
| const number = document.getElementById("number").value; |
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 express = require('express') | |
| const path = require('path') | |
| const app = express() | |
| const PORT = 3000; | |
| //functie pentru a calcula factorialul | |
| function factorial(num) { |
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> |
NewerOlder