Jump to content
Acasa Staff Calendar Download Member Shop TeamSpeak 3 Banlist

TS.NEWMOON.RO

Principalul loc de intalnire unde s-au dezvoltat competitiile, serverele si clanurile o sa ramana mereu un reper pentru viitorii gameri din Romania.

Click

Serverele Publice

Alatura-te celor care se distreaza impreuna prin intermediul serverelor pentru a duce gaming-ul la un alt nivel.

Click

Moon Guardian

Robotelul care iti asigura linistea pe TeamSpeak si pe forum este unul dintre principalele proiecte dezvoltate pe aceasta comunitate.

AEN Hosting

Servicii de gazduire jocuri / VPS / Web space. Foloseste codul "NEWMOON" pentru a reduce costurile produselor.

Click
Servere promovate
ts.newmoon.ro
online
fury.newmoon.ro
online
diamond.newmoon.ro
online

Bine ai venit pe Comunitatea NEWMOON !

Bun venit la noi! Daca doresti sa vezi tot ce se afla pe forumul nostru te incurajam sa iti creezi un account pentru a intra in familia noastra.

Ce poti face pe aceasta comunitate :

  • citesti toate topicurile noastre
  • posteaza sau lasa un replay la toate topicurile
  • intra in echipa Administrativa
  • trimite mesaje private tuturor
  • leaga noi prietenii cu membrii comunitatii
  • participa la concursurile noastre

 

Te asteptam pe serverul de TeamSpeak TS.NEWMOON.RO unde te vei distra cu siguranta.

Daca ai nevoie de orice tip de ajutor, suntem la dispozitia ta.

 

hWkoInj3.png

 

Echipa NEWMOON.


Search the Community

Showing results for tags 'javascript'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Administrație & Dezvoltare
    • Zonă Administrativă
    • Zona Utilizatorilor
    • Cerere DNS / Afilieri
    • Asistență Servere
    • NEWMOON - JOIN US ON GAMETRACKER!
  • Servere de Voce
  • Serverele Comunității
    • Discord : NewMoon Community
    • FiveM
    • Counter Strike 1.6
    • Counter-Strike:Global Offensive
    • Minecraft
  • War & Mix Counter Strike 1.6
    • MiX-AREA 5vs5
  • Design & Grafica NewMoon
    • Graphics Area
  • World of Hacks
    • MultiPlayer Game Hacks & Cheats
  • Proiecte Comunitare
    • Concursuri Comunitare
    • League of Legends
    • File Management
  • International Forum
    • Servers Management
    • Virtual Shop
    • Gaming Talk
  • Resurse / IT / Jocuri / Tutoriale
    • Resurse Gaming
    • Tutoriale Web
  • General
    • Discuții Tematice & Socializare
    • Multimedia & Tehnologie
    • Reporteri
    • Magazin virtual
  • Arhiva NewMoon
    • Arhiva
  • MOSNEGII.NEWMOON.RO's Anunturi

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Facebook


Location:


Interests

  1. Math.random() Math.random() returns a random number between 0 (inclusive), and 1 (exclusive): Example Math.random(); // returns a random number Math.random() always returns a number lower than 1. JavaScript Random Integers Math.random() used with Math.floor() can be used to return random integers. Example Math.floor(Math.random() * 10); // returns a random integer from 0 to 9 Example Math.floor(Math.random() * 11); // returns a random integer from 0 to 10 Example Math.floor(Math.random() * 100); // returns a random integer from 0 to 9
  2. JavaScript Bitwise Operators Operator Name Description & AND Sets each bit to 1 if both bits are 1 | OR Sets each bit to 1 if one of two bits is 1 ^ XOR Sets each bit to 1 if only one of two bits is 1 ~ NOT Inverts all the bits << Zero fill left shift Shifts left by pushing zeros in from the right and let the leftmost bits fall off >> Signed right shift Shifts right by pushing copies of the leftmost bit in from the left, and let the rightmost bits fall off >>> Zero fill right shift Shifts right by pushing
  3. The JavaScript Math object allows you to perform mathematical tasks on numbers. Example Math.PI; // returns 3.141592653589793 Math.round() Math.round(x) returns the value of x rounded to its nearest integer: Example Math.round(4.7); // returns 5 Math.round(4.4); // returns 4 Math.pow() Math.pow(x, y) returns the value of x to the power of y: Example Math.pow(8, 2); // returns 64 Math.sqrt() Math.sqrt(x) returns the square root of x: Example Math.sqrt(64); // returns 8 Math.abs() Math.abs(x) returns the absolute (positive)
  4. A JavaScript Boolean represents one of two values: true or false. Boolean Values Very often, in programming, you will need a data type that can only have one of two values, like YES / NO ON / OFF TRUE / FALSE For this, JavaScript has a Boolean data type. It can only take the values true or false. The Boolean() Function You can use the Boolean() function to find out if an expression (or a variable) is true: Example Boolean(10 > 9) // returns true Or even easier: Example (10 > 9) // also returns true 10 > 9 //
  5. Arrow functions were introduced in ES6. Arrow functions allow us to write shorter function syntax: Before: hello = function() { return "Hello World!"; } With Arrow Function: hello = () => { return "Hello World!"; } It gets shorter! If the function has only one statement, and the statement returns a value, you can remove the brackets and the return keyword: Arrow Functions Return Value by Default: hello = () => "Hello World!"; Note: This works only if the function has only one statement. If you have parameters, you pass them inside the
  6. JavaScript Data Types JavaScript variables can hold many data types: numbers, strings, objects and more: var length = 16; // Number var lastName = "Johnson"; // String var x = {firstName:"John", lastName:"Doe"}; // Object The Concept of Data Types In programming, data types is an important concept. To be able to operate on variables, it is important to know something about the type. Without data types, a computer cannot safely solve this: var x = 16 + "Volvo"; Does it make any sense to add "Volvo" to sixteen?
  7. JavaScript Assignment Operators Assignment operators assign values to JavaScript variables. Operator Example Same As = x = y x = y += x += y x = x + y -= x -= y x = x - y *= x *= y x = x * y /= x /= y x = x / y %= x %= y x = x % y <<= x <<= y x = x << y >>= x >>= y x = x >> y >>>= x >>>= y x = x >>> y &= x &= y x = x & y ^= x ^= y x = x ^ y |= x |= y x = x | y **= x **= y x = x ** y The **= operator is
  8. JavaScript Arithmetic Operators Arithmetic operators perform arithmetic on numbers (literals or variables). Operator Description + Addition - Subtraction * Multiplication ** Exponentiation (ES2016) / Division % Modulus (Remainder) ++ Increment -- Decrement Arithmetic Operations A typical arithmetic operation operates on two numbers. The two numbers can be literals: Example var x = 100 + 50; or variables: Example var x = a + b; or expressions: Example var x = (100 + 50) * a; Operators and Operands The number
  9. JavaScript comments can be used to explain JavaScript code, and to make it more readable. JavaScript comments can also be used to prevent execution, when testing alternative code. Single Line Comments Single line comments start with //. Any text between // and the end of the line will be ignored by JavaScript (will not be executed). This example uses a single-line comment before each code line: Example // Change heading: document.getElementById("myH").innerHTML = "My First Page"; // Change paragraph: document.getElementById("myP").innerHTML = "My first par
  10. JavaScript variables can belong to the local or global scope. Global variables can be made local (private) with closures. Global Variables A function can access all variables defined inside the function, like this: Example function myFunction() { var a = 4; return a * a; } But a function can also access variables defined outside the function, like this: Example var a = 4; function myFunction() { return a * a; } In the last example, a is a global variable. In a web page, global variables belong to the window object. Global variables can
  11. The switch statement is used to perform different actions based on different conditions. The JavaScript Switch Statement Use the switch statement to select one of many code blocks to be executed. Syntax switch(expression) { case x: // code block break; case y: // code block break; default: // code block } This is how it works: The switch expression is evaluated once. The value of the expression is compared with the values of each case. If there is a match, the associated block of code is executed. If there is no match, the
  12. JavaScript variables are containers for storing data values. In this example, x, y, and z, are variables: Example var x = 5; var y = 6; var z = x + y; From the example above, you can expect: x stores the value 5 y stores the value 6 z stores the value 11 Much Like Algebra In this example, price1, price2, and total, are variables: Example var price1 = 5; var price2 = 6; var total = price1 + price2; In programming, just like in algebra, we use variables (like price1) to hold values. In programming, just like in algebra, we use variables in express
  13. Web Worker e un obiect JavaScript care ruleaza in fundal, fara sa afecteze performantele paginii. Codul din worker poate efectua diferite sarcini fara sa interfereze cu pagina din browser. In pagina, un script JS poate face diferite instructiuni: click-uri, selectare, afisare date, etc., in timp ce codul din worker efectueaza alte instructiuni. Creare Web Worker In general, un web worker se creaza intr-un fisier JS separat pe server, de exemplu worker.js. Acest fisier contine codul care ruleaza in fundal. Se poate executa orice cod JS in fisierul worker, cu unele exceptii. Nu se p
  14. getElementsByTagName('tag') este o functie, sau metoda JavaScript care obtine si face referire la toate elementele HTML cu 'tag' specificat ca argument intre paranteze. De exemplu, urmatoarea instructiune face referire la toate tag-urile DIV din documentul HTML. document.getElementsByTagName('div') Aceasta functie returneaza un array (cu index de la 0) cu elementele pe care le-a obtinut. Array-ul returnat poate fi parcus cu instructiunea for(), iar la elementele din el se pot aplica proprietatile si metodele specifice obiectelor HTML in JavaScript. O lista cu acestea gasiti la pa
  15. Codul PHP este executat pe server iar datele de iesire sunt transmise la navigatorul web. Codul JavaScript este executat de browser pe calculatorul utilizatorului, dupa excutia codului de pe server. Combinand aceste doua limbaje de programare web, se pot obtine scripturi JavaScript dinamice, cu rezultate in functie de datele primite si procesate de server. Astfel, aceeasi pagina de site poate contine un cod JavaScript pentru un utilizator si alt cod JS in cazul altui utilizator. - Sunt 2 modalitati de a combina JavaScript cu PHP ca sa se obtina un rezultat dinamic sau personalizat:
  16. Primire date in fisierul worker Terminare Worker Includere scripturi externe in fisier worker Web Worker e un obiect JavaScript care ruleaza in fundal, fara sa afecteze performantele paginii. Codul din worker poate efectua diferite sarcini fara sa interfereze cu pagina din browser. In pagina, un script JS poate face diferite instructiuni: click-uri, selectare, afisare date, etc., in timp ce codul din worker efectueaza alte instructiuni. Creare Web Worker In general, un web worker se creaza intr-un fisier JS separat pe server, de exemplu worker.js. Acest fisier contine codul care
  17. Accesare element din Array Adaugare si Modificare elemente in Array Parcurgere Array Lucru cu elemente din Array Array Multidimensional Definire si Utilizare Array Array este un obiect care poate sa contina mai multe valori intr-o singura variabila. Aceste valori sunt ordonate cu un index numeric incepand de la 0. Un Array se poate crea adaugand valorile intre paranteze patrate, sau cu formula: new Array(). Valorile se pot adauga si dupa definirea array-ului. - Sintaxa cu paranteze patrate: let nume_array =['v1', 'v2', 'v3']; //sau let nume_array =[]; nume_ar
  18. innerHTML getAttribute(attr) si setAttribute(attr, val) parentNode Proprietatea style value ID-ul este un atribut care poate fi adaugat in tag-urile HTML. Prin valoarea data acestui atribut se atribuie un nume unic acelui element. Acest "id" poate fi folosit in stilurile CSS pentru a defini aspectul grafic si aranjarea in pagina a tag-ului respectiv, dar poate fi folosit si in scripturi JavaScript pentru a lucra cu elementele si continutul lor. Cu valoarea id-ului se poate prelua elementul HTML in JavaScript foarte usor, folosind metoda getElementById()cu urmatoarea sintaxa:
  19. JavaScript is a dynamic computer programming language. It is lightweight and most commonly used as a part of web pages, whose implementations allow client-side script to interact with the user and make dynamic pages. It is an interpreted programming language with object-oriented capabilities. JavaScript was first known as LiveScript, but Netscape changed its name to JavaScript, possibly because of the excitement being generated by Java. JavaScript made its first appearance in Netscape 2.0 in 1995 with the name LiveScript. The general-purpose core of the language has been embedded in Netsc
  20. JavaScript functions are defined with the function keyword. You can use a function declaration or a function expression. Function Declarations Earlier in this tutorial, you learned that functions are declared with the following syntax: function functionName(parameters) { // code to be executed } Declared functions are not executed immediately. They are "saved for later use", and will be executed later, when they are invoked (called upon). Example function myFunction(a, b) { return a * b; } Semicolons are used to separate executable JavaScript statements.
  21. Cod: switch(n) { case 1: execute code block 1 break; case 2: execute code block 2 break; default: code to be executed if n is different from case 1 and 2 }
  22. Cod: <html> <body> <script type="text/javascript"> var i=0; for (i=0;i<=5;i++) { document.write("The number is " + i); document.write("<br />"); } </script> </body> </html>
  23. Cod: new Date() // current date and time new Date(milliseconds) //milliseconds since 1970/01/01 new Date(dateString) new Date(year, month, day, hours, minutes, seconds, milliseconds) var today = new Date() var d1 = new Date("October 13, 1975 11:13:00") var d2 = new Date(79,5,24) var d3 = new Date(79,5,24,11,33,0)
  24. Cod: <html> <body> <script type="text/javascript"> var i=0; for (i=0;i<=10;i++) { if (i==3) { break; } document.write("The number is " + i); document.write("<br />"); } </script> </body> </html>
  25. Daca esti webmaster, cateodata vei avea nevoie de rularea unor scripturi php la un anumit interval de timp. Spre exemplu, wordpress este capabil sa ruleze singur un cronjob folosindu-se de utilizatorii care intra pe site, insa este recomandabil sa fie trecut pe cronjobul hostingului. Atunci cand iti cumperi un hosting pentru websiteul tau, vei primi si un cont de cPanel, aflat pe adresa http://website.com/cpanel, unde website.com fiind siteul tau. Cu acesta vei putea schimba fiecare aspect al websiteului tau. De aici va trebui sa retinem calea catre directorul nostru unde serverul n
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.