Posts by Felipe Santos • 96 points
10 posts
-
2
votes0
answers298
viewsQ: Validating a nested and conditionally optional Yup scheme
I am facing a problem when trying to validate a scheme nested with Yup (). My scenario is that I have the following payload (which may not always contain maxAge and maxAge, but at least one of…
-
0
votes1
answer80
viewsQ: Testing a cron-job with JEST
I have a javascript class that contains a function which initializes a cron job. To perform cron-job I used the Node-Cron library. But I can’t find a way to test the class and function. The…
-
0
votes1
answer31
viewsA: How do I updateItem an element nested in Dynamodb?
const { DocumentClient } = require('aws-sdk/clients/dynamodb'); const documentClient = new DocumentClient({ region: 'us-east-1', }); try { let add_year= '2020' …
-
1
votes2
answers362
viewsA: Is it possible to block access to a middleware route?
You can do something like const middleware = (req, res, next) => { try { // validaçao return next(); } catch (err) { return res.status(401).json({ error: 'Auth'}); } } //Rotas app.get("/",…
-
0
votes1
answer28
viewsQ: Read a JS export
How can I read an export, this giving me the following message: Uncaught Referenceerror: Timecontroller is not defined in the HTML this: <script…
javascriptasked Felipe Santos 96 -
0
votes1
answer41
viewsQ: Title on the back button
import React, { Component } from 'react'; import api from '../service/api'; import {View ,Text, StyleSheet, Image, FlatList, Dialog} from 'react-native'; import Cabecalho from…
-
1
votes1
answer331
viewsQ: React Native request the api via navigation response
Main.js import React, { Component } from 'react'; import api from '../service/api'; import { View, Text, FlatList, TouchableOpacity, StyleSheet } from 'react-native'; export default class Main…
-
1
votes1
answer648
viewsQ: Which diagram best describes a Nosql bank?
When using SQL database, there are different ways to show the system flow. In the database you can use an ER to show its attributes. And for its operation a UML Class Diagram is used. How best to…
-
1
votes1
answer72
viewsQ: How do I create a CSV in C by incrementing the first number?
I ran that csv: 1;0 2;0 2;0 2;0 2;1 2;2 2;2 2;2 2;2 2;3 ... How to get from this file the first number of each line to increment it? And there’s like the first line not to be skipped? int…
casked Felipe Santos 96 -
0
votes1
answer793
viewsQ: How to check whether the list is empty or with an element in C
typedef struct { int tamanho; nodo *inicio; } lista; typedef struct { lista **vet; int tamTabHash; int colisoes; } tabHash; tabHash…