[
{
id: 1515665095835,
slots: [
{
id: 1,
name: 'Thuja occidentalis'
},
{
This file contains 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 { useReducer } from 'react' | |
export function updateName(name: string) { | |
return <const>{ | |
type: 'UPDATE_NAME', | |
name | |
} | |
} | |
export function addPoints(points: number) { |
This file contains 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 existsSum(arr, n, lIndex = 0, hIndex = null, iter = 0) { | |
const low = arr[lIndex]; | |
const high = arr[hIndex || arr.length - 1]; | |
const predicate = low + high; | |
if(iter === arr.length - 1 ) return false; | |
if(predicate === n) return true; | |
if(predicate < n) { | |
// increment lower index | |
return existsSum(arr, n, lIndex + 1, hIndex, iter + 1); | |
} else { |
This file contains 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 t = (function () { | |
var _listeners = {}; | |
/** | |
* Compare with a new listener handler | |
* to make sure we are not adding the same handler | |
* @param String EventType | |
* @param Function Callback | |
* @returns Boolean true if exists false if not | |
*/ | |
var _existsHandler = function (eventType, cb) { |
This file contains 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
// Wrap an async function so we catch any errors that might occur | |
const wrapAsync = handler => (req, res) => | |
handler(req, res) | |
.then(result => res.json(result)) | |
.catch(error => res.status(500).json({ error: error.message })) |
This file contains 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 existsSum(arr, n, lIndex = 0, hIndex = null, iter = 0) { | |
const low = arr[lIndex]; | |
const high = arr[hIndex || arr.length - 1]; | |
const predicate = low + high; | |
if (iter === arr.length - 1) return false; | |
if (predicate === n) { | |
return true; | |
} | |
if (predicate < n) { | |
// increment lower index |
This file contains 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 { insert } from './insert'; | |
const input = [ | |
{ | |
priority: 20 | |
} | |
]; | |
test('Should return array with one element when empty', () => { | |
const result = insert([], { priority: 2 }, 'priority'); |
This file contains 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. What is the difference between the '==' operator and the '===' operator | |
2. Explain in your own words what is GIT and how it relates to web development? | |
3. Declare a variable named myFirstVariable and assign it to a string "TheKit Web development Course" | |
4. Write a function called "add" that takes two arguments and returns their sum | |
5. Given an array of numbers [1,2,3,4,5,6], generate a new array with only the even numbers [2, 4, 6] | |
6. What is JSON format? Provide an example | |
7. Using the Javascript DOM API how would you select an element with an id of "container"? | |
8. Name 4 mouse events and their purposes. | |
9. Solve this exercise -> https://codepen.io/jdmartins/pen/EQjOmJ | |
10. Using the browser console how would you write "banana" without inputting an "N"? Hint: Look into NaN and type coercion. |
This file contains 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
<?php | |
$meses = array( | |
1 => 'Janeiro', | |
'Fevereiro', | |
'Março', | |
'Abril', | |
'Maio', | |
'Junho', | |
'Julho', |
Code | Message | Description |
---|---|---|
100 | Continue | The server has received the request headers, and the client should proceed to send the request body |
101 | Switching Protocols | The requester has asked the server to switch protocols |
103 | Checkpoint | Used in the resumable requests proposal to resume aborted PUT or POST requests |
Code | Message | Description |
---|