Nous utilisons les cookies sur ce site web. En savoir plus sur notre politique de vie privée. Pour les désactiver, configurez votre navigateur correctement. En poursuivant votre navigation sur ce site, vous acceptez l’utilisation de cookies.
With the new HTML5 features, modify the form so that:
- The formula input field has an autocomplete option with the following options: "sin", "cos", "tan" and "cot".
- The iterations input field is a slider with possible values from 1 to 10.
- The precision input field is a number picker with possible values from 1 to 100, where 50 is the default value.
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Advanced form</title> </head> <body> <form> Formula: <input name="formula"><br /> Iterations: <input name="iterations"><br /> Precision: <input name="precision"><br /> </form> </body> </html>*
2. DEMO PHP QUESTION (expected time 4 min.)
Implement the unique_names function. When passed two arrays of names, it will return an array containing the names that appear in either or both arrays. The returned array should have no duplicates. <?php function unique_names(array $array1, array $array2) : array { return []; } $names = unique_names(['Ava', 'Emma', 'Olivia'], ['Olivia', 'Sophia', 'Emma']); echo join(', ', $names); // should print Emma, Olivia, Ava, Sophia*
3. DEMO SQL QUESTION (expected time 4 min.)
The following data definition defines an organization's employee hierarchy. An employee is a manager if any other employee has their managerId set to this employee's id. That means John is a manager if at least one other employee has their managerId set to John's id. TABLE employees id INTEGER NOT NULL PRIMARY KEY managerId INTEGER REFERENCES employees(id) name VARCHAR(30) NOT NULL Write a query that selects the names of employees who are not managers.*