O GoConqr está de visual novo! Conte para nós o que você achou.

Flashcards

W2: basic technologies: git/html/json

Emma Tysk Webdev Inglês 41 flashcards

W2: basic technologies: git/html/json

Flashcards do conjunto (41)

  1. 1What is an API?An API is a specification of possible interactions with a software component
    It defines the rules that programmers must follow in order to interact with and access the features or data of an operating system, application, or other service
  2. 2REST APIA REST API defines a set of functions which developers can perform requests and receive responses via HTTP protocol such as GET and POST.
  3. 3Rest is stateless, what does that mean?Systems that follow the REST paradigm are stateless, meaning that the server does not need to know anything about what state the client is in and vice versa. In this way, both the server and the client can understand any message received, even without seeing previous messages.
  4. 4Why do we modularise code?Making each module easier to understand, test and refactor independently of others
    module.exports = { key: value };
    const library = require('./library.js');
  5. 5What is JSON?JSON stands for JavaScript Object Notation
    JSON is a lightweight format for storing and transporting data
    JSON is often used when data is sent from a server to a web page
  6. 6LET vs VARVariables declared with let inside a block scope are only accessible inside that scope, making let the ideal solution to the for loop index variable scope problem
  7. 7What is the DOM?The DOM is an object-based representation of the source HTML document
    It allows a language (JavaScript) to manipulate, structure, and style your website. .
  8. 8Change the HTML content of a element with id="demo":document.getElementById("demo").innerHTML = "Paragraph changed!";
  9. 9Add a red color to an element:document.getElementById("myH1").style.color = "red";
  10. 10querySelectorAll()returns a static (not live) NodeList representing a list of the document's elements that match the specified group of selectors.
  11. 11Get the element with id="myDIV", then get all elements inside div with class="example"var x = document.getElementById("myDIV").querySelectorAll(".example");
  12. 12Add a to the domvar myDiv = document.createElement("div"); document.body.append(myDiv);
    myDiv.innerHTML = `
    Here is a paragraph
    `;
  13. 13Hej Change the font size and colorconst para = document.getElementById('text');
    para.style.fontSize = '10px';
    para.style.color = '#00FF00';
  14. 14remove style attribute from id elementconst para = document.getElementById('text');
    para.removeAttribute('style');
  15. 15Throw a type error JS if input is not a numberconst findSum = function (n1, n2) {
    if (isNaN(n1) || isNaN(n2)) {
    throw new TypeError('findSum() expects numbers.');
    }
    return n1 + n2;
    };
  16. 16Why do we use git?Compare files
    identify differences
    merge changes
    revert to previous state
  17. 17add files with to staging areagit add *.
  18. 18add all files to staging areagit add -A
  19. 19move head to a certain commit idgit checkout
  20. 20what does HEAD mean in git?HEAD is a reference to the last commit in the currently check-out branch.
  21. 21revert to a commitgit revert –-no-commit ..HEAD
  22. 22compare with last commitgit diff
  23. 23How can you display: name age car using JS and JSON?var myObj, x;
    myObj = {"name":"John", "age":30, "car":null};
    for (x in myObj) {
    document.getElementById("demo").innerHTML += x + "
    ";
    }
  24. 24What is the three stages of a file in git?committed, modified, and staged
  25. 25What does "commited" mean in git? (when it comes to files)Committed means that the data is safely stored in your local database
  26. 26What does "staged" mean in git? (when it comes to files)Staged means that you have marked a modified file in its current version to go into your next commit snapshot.
  27. 27draw the three sections of a git projectdraw the three sections of a git project
  28. 28what does git 'add' do?The git add command adds a change in the working directory to the staging area. It tells Git that you want to include updates to a particular file in the next commit.
  29. 29git statusThe git status command displays the state of the working directory and the staging area. It lets you see which changes have been staged, which haven’t, and which files aren’t being tracked by Git.
  30. 30how can you use "splice" to remove an item in an array?var myFish = ['angel', 'clown', 'drum', 'mandarin', 'sturgeon'];
    var removed = myFish.splice(3, 1);
    // removed is ["mandarin"]
    // myFish is ["angel", "clown", "drum", "sturgeon"]
  31. 31How can you access a submitted value in this form? First name:function getFormValue() {
    let value = document.getElementById("formname").elements['firstname'].value
    }
  32. 32What does REST stand for?representational state transfer
  33. 33What does REST do?REST is an architectural style used in the development of Web services.
    Representational state transfer (REST) is a architectural style for stateless client-server communications that is typically implemented using the HTTP protocol. REST itself is not a protocol – it is simply a set of conventions that strive to create simplicity and consistency in resource naming across different web-based applications or APIs.
  34. 34Rest is stateless, what does that mean?Systems that follow the REST paradigm are stateless, meaning that the server does not need to know anything about what state the client is in and vice versa. In this way, both the server and the client can understand any message received, even without seeing previous messages
  35. 35How to include js in html filein the tag
    (if html and js in the same folder)
  36. 36What does a REST client request typically consist of?an HTTP verb, which defines what kind of operation to perform
    a path to a resource
    an optional message body containing data
  37. 37What is a RESTful system?RESTful systems are characterized by how they are stateless and separate the concerns of client and server.
  38. 38What does Representational state transfer mean?It means when a RESTful API is called, the server will transfer to the client a representation of the state of the requested resource.
    For example, when a developer calls Instagram API to fetch a specific user (the resource), the API will return the state of that user, including their name, the number of posts that user posted on Instagram so far, how many followers they have, and more.
  39. 39What is the definition of a RESTful service?A service which is built on the REST architecture is called a RESTful service
  40. 40What is a REST api?A RESTful API is an application program interface (API) that uses HTTP requests to GET, PUT, POST and DELETE data.
    Its based on the architectural principle REST.
  41. 41What is HTTP?HTTP is the protocol used to transfer data over the web. The protocol is the set of rules that conducts the client/server interaction between your web browser and the destination web page

Informações

Descrição
Webdev FlashCards sobre W2: basic technologies: git/html/json, criado por Emma Tysk em 12-06-2019.
Criado por
Emma Tysk
Visualizações
2
Avaliação

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?