node.js – result {formatter: [Function: formatter]Error: [] }

// admin.js


const {check, validationResult} = require (& # 39; express-validator & # 39;
module.exports = (app) => {

app.get (& # 39; / formulario_inclusao_noticia & # 39 ;, (req, res) => {
res.render (& # 39; admin / form_add_noticia & # 39 ;, {validacao: {}, noticia: {}});
});

app.post (& # 39; / noticias / salvar & # 39 ;, [
 
    check('titulo','Título é obrigatório').not().isEmpty(),
    check('resumo','Resumo é obrigatório').not().isEmpty(),
    check('resumo','Resumo tem que ter entre 10 a 100 caracteres').isLength({ min: 10, max: 100 }),
    check('autor','Autor tem que ter entre 10 a 100 caracteres').isLength({ min: 10, max: 100 }),
    check('autor','Autor é obrigatório').not().isEmpty(),
    check('data_noticia','Data é obrigatório').not().isEmpty(),
    check('noticia','Data é obrigatório').isEmpty()
  ], (req, res) => {
let noticia = req.body

const errors = validationResult (req);

console.log (error);

if (error) {
res.render (& # 39; admin / form_add_noticia & # 39 ;, {validacao: errors, noticia: noticia});
return
}
console.log (validacao);
let conn = app.config.dbConnection ();
let noticiasModel = new app.app.models.NoticiasDAO (conn)

noticiasModel.salvarNoticia (noticia, (error, result) => {
res.redirect (& # 39; / noticias & # 39;
})
})
}

Javascript – Spotify API: this.state.data.map is not a function

I'm trying to pass the API data to a child component, but I always issue this error message when I type the singer's name into the input because I want to retrieve any typed letter, not after the name has been completed.

The data is coming console.log I could see that they are all there, so I think it's really a problem in .map

import React, {Component} from & # 39; react & # 39 ;;
import ItemPage from & # 39; ./apiUnica & # 39 ;;
Querystring from & # 39; querystring & # 39; import;

Class API extends component {
Constructor (props) {
great (props);
this.state = {data: [], isLoaded: false, display name: & # 39;;}
}

componentDidMount () {
const accessToken = window.location.search.slice (14);
fetch (& # 39; https: //api.spotify.com/v1/me&#39 ;, {headers: {& # 39; Authorization & # 39 ;: & # 39; Bearer & # 39; + accessToken}})
.then (response => response.json ())
.then (data => this.setState ({Display name: data.display_name, isLoaded: true}))
}

async updateResult () {
const artist = document.getElementById ("Singer"). value;
const accessToken = window.location.search.slice (14);
wait for the call (& # 39; https: //api.spotify.com/v1/search? & # 39; + querystring.stringify ()
{q: artist,
Type: "Artist",
Limit: & # 39; 5 & # 39;
}),
{headers: {& # 39; Authorization & # 39 ;: & # 39; Bearer & # 39; + accessToken}})
.then (response => response.json ())
.then (data => this.setState ({
Date: data.artists
}))
if (this.state.data) {
console.log (this.state.data)
}
}

render () {
to return
        
{! this.state.isLoaded?

load

:

Welcome {this.state.display_name}

} {! this.state.data? & # 39; missing data & # 39 ;: this.state.data.map (item => )}
); }

google sheets – Help with a Vlookup function to return multiple mismatched results

I am trying to execute the following code to return all the matches of column A from column C in a series of rows. In this situation, cell A1 is included in some iterations of column C, but these are not exact matches. I want a match for this cell https://i.postimg.cc/FzHBMnVc/KENKD00319-03-KDLP0808-WHITE-3235.jpg because KDLP0808 is included in the URL.

I use the code below to do this

= IFERROR (INDEX (C: C, SMALL (IF ("*" & A1 & "*" = C: C, ROW (C: C) - MIN (ROW (C: C)) + 1, ""), COLUMN () -4)), "") 

Enter image description here

How do I calculate / draw divergence with the Div function?

I want to record a divergence of an electric field, but I could not figure out how to use the Div function.

For example, a vector $ v = 2xy ^ 3z ^ 4 has {x} + 3x ^ 2y ^ 2z ^ 4 has {y} + 4x ^ 2y ^ 3z ^ 3 has {z} $I calculate its divergence with the following syntax:

f[x_,y_,z_]: = Div[{2x*y^3z^4,3x^2y^2z^4,4x^2y^3z^3},{x,y,z}]
f[x,y,z]= 12 x ^ 2 y ^ 3 z ^ 2 + 6 x ^ 2 y z ^ 4 + 2 y ^ 3 z ^ 4

it can be seen that the result of f[x,y,z] it's right.
However, if I enter a specific coordinate value, such as {1,1,1}, the output is not what I want:

div[{2, 3, 4},{1, 1, 1}]

it seems that tungsten calculates the value of $ v $ first and then the divergence of $ v $ at point {1,1,1}.

How can I change the value of
$ nabla_ {1,1,1} cdot v $?

Thanks and best regards!

responsive webdesign – Css Calc () function CPU or GPU?

I wonder if the CSS Calc ()
The function is calculated or executed on the CPU or GPU
I played around with some styles and found that I create some elements
With vh, vw, vmin and vmax the size of a window is more jumpy than with
Calculate (12 Vmax + 50 pixels). GPU animations seem to run faster,
So I'm wondering who handles the calculations.
Does anyone know an article or does it have a reference to it?
How can I not find one?

8 – Can a function be executed on a user object in Twig?

You can use hook_entity_load to add fields to the user object as follows:

Function mymodule_entity_load ($ entity, $ type)
{
if ($ type == & # 39; user & # 39;
{
foreach ($ entity as $ e) {
$ e-> myField = & # 39; hello & # 39 ;;
}
}
}

Then I can do that in the branch:

{{}} User.myField

That's useful, but it would be great if I could do that:

{{user.getActivity ()}}

Or more precisely:

members

    {% for activity in user.getActivity ()%}
  • {{}} Activity.time
  • {% endfor%}

Is there a way to add a "function" this way?

Javascript – problem getting the results of a function with loop

I practice JS, do tests and have the following code. It is about doing Calculation of the tips to be paid after the total amount of the account.

I think so two identical objects (var John and var mark), each with a Set of "accounts" and a Condition of "percentages" to pay according to the price of the "account".

var john = {
full name: & # 39; John Smith & # 39 ;,
Bills: [124, 48, 268, 180, 42].
tipsCalc: function () {
this.tips = [];
this.finalValues ​​= [];

for (if i = 0; i <this.bills.length; i ++) {


// Determine percentage based on typing rules
Var percentage;


if (this.bills[i] < 50) {
        percentage = .2;

      } else if (this.bills[i] >= 50 && this.bills[i] <200) {
Percentage = 0.15;

} else {
Percentage = 0.1;

}

// Add results to the corresponding arrays

this.tips[i] = this.bills[i] * Percentage;
this.finalValues[i] = this.bills[i] + this.bills[i] * Percentage;
}
}
}


john.tipsCalc ();
console.log (& # 39; John's family tips & # 39; + john.tips);
console.log (& # 39; Johns Family BILLS & # 39; + john.bills);
console.log (& # 39; to pay John's family finale & # 39; + john.finalValues);

console.log (& # 39; ------------------------------------------ --- ------ & # 39;);

var mark = {
fullName: & # 39; Mark Miller & # 39 ;,
Bills: [77, 475, 110, 45].
tipsCalc: function () {

this.tips = [];
this.finalValues ​​= [];

for (if i = 0; i <this.bills.length; i ++) {
// Determine percentage based on typing rules
Var percentage;

if (this.bills[i] < 100) {
				percentage = .2;

			} else if (this.bills[i] >= 100 && this.bills[i] <300) {
Percentage = 0.1;
} else {
Percentage = 0.25;
}

// Add results to the corresponding arrays

this.tips[i] = this.bills[i] * Percentage;
this.finalValues[i] = this.bills[i] + this.bills[i] * Percentage;
}
}
}


mark.tipsCalc ();
console.log (& # 39; Marks Family TIPS & # 39; + mark.tips);
console.log (& # 39; Mark  's Family BILLS & # 39; + mark.bills);
console.log (& # 39; Marks Family Final to pay & # 39; + mark.finalValues);

Then I made one Function for calculating the sum and the Average tips for both "objects", The fact is that the result of the first "average (john)" is correct and the second "average (grade)" is not, since I add the previous one with it.

var sum = 0;
var averageTips;

Functional Average (Family) {

for (if i = 0; i <family.tips.length; i ++) {

sum + = family.tips[i];
}

return averageTips = sum / (family.tips.length);
}

console.log (& # 39; ------------------------------------------ --- ------ & # 39;);

Average (John);
console.log (& # 39; Johns Family Sum TIPS = & # 39; + sum);
console.log (& # 39; Johns Family Average TIPS = & # 39; + averageTips);

console.log (& # 39; ------------------------------------------ --- ------ & # 39;);

Average (grade);
console.log (& # 39; Marks Family Sum TIPS = & # 39; + sum);
console.log (& # 39; Marks Family Average TIPS = & # 39; + averageTips);

I can not find the way to get the last result (the average) right. Can someone tell me why?

CometVPS.com – 65% OFF from $ 3.50 / month. – IPv6 IP included with FREE DDoS Defense ™ – NY., IL., CO. Function

Hello Proxies-freeeers!

New this year, we offer the opportunity to come up 65% discount from a VPS server with us for Life (monthly, quarterly and yearly plans)! Just use the code (65forMe) to claim your discount on the order.

ONLY OPENVZ PLANE!

We accept Paypal, Bitcoin and all major credit cards!

https://cometvps.com/

;) With each server a free 2 Gbit / s DDoS protection (https://ddos-defense.com) is provided! IPv6 is available on all packages. We own and operate all our hardware and network devices!

Do you need cPanel? We can provide that as well, just select it at check-out and other add-ons!

Some of the applicable packages are listed below:

1 vCPU
1 GB RAM
1 GB vSWAP
100GB of RAID 10 storage
1TB bandwidth
1 Gbps uplink
1 IPv4
SolusVM
Coupon: 65forMe
3.50 USD / month
ORDER HERE:
https://clients.cometvps.com/cart.php?a=add&pid=225

2 vCPU
2 GB RAM
2 GB vSWAP
200 GB of RAID 10 storage space
2 TB bandwidth
1 Gbps uplink
1 IPv4
SolusVM
Coupon: 65forMe
7.00 USD / month
ORDER HERE:
https://clients.cometvps.com/cart.php?a=add&pid=224

3 vCPU
3 GB RAM
3 GB vSWAP
300 GB of RAID 10 storage space
3 TB bandwidth
1 Gbps uplink
1 IPv4
SolusVM
Coupon: 65forMe
$ 10.50 / month
ORDER HERE:
https://clients.cometvps.com/cart.php?a=add&pid=226

4 vCPU
4 GB RAM
4 GB vSWAP
400 GB of RAID 10 storage space
4 TB bandwidth
1 Gbps uplink
1 IPv4
SolusVM
Coupon: 65forMe
14.00 USD / month
ORDER HERE:
https://clients.cometvps.com/cart.php?a=add&pid=227

5 vCPU
5 GB RAM
5 GB vSWAP
500 GB of RAID 10 storage space
5 TB bandwidth
1 Gbps uplink
1 IPv4
SolusVM
Coupon: 65forMe
17.50 USD / month
ORDER HERE:
https://clients.cometvps.com/cart.php?a=add&pid=228


6 vCPU
6 GB RAM
6 GB vSWAP
600 GB of RAID 10 storage space
6 TB bandwidth

1 Gbps uplink
1 IPv4
SolusVM
Coupon: 65forMe
21.00 USD / month
ORDER HERE:
https://clients.cometvps.com/cart.php?a=add&pid=229

7 vCPU
7 GB RAM
7 GB vSWAP
700 GB of RAID 10 storage space
7 TB bandwidth

1 Gbps uplink
1 IPv4
SolusVM
Coupon: 65forMe
24.50 USD / month
ORDER HERE:
https://clients.cometvps.com/cart.php?a=add&pid=230

Here you can test our networks for locations:

Chicaco, IL: http://lg.chi1.cometvps.com/
Buffalo, NY: http://lg.buf1.cometvps.com/

Host node specifications:

Intel Xeon E3
32 GB RAM
4 x 2 TB SATA
HW RAID-10
1 Gbps uplink

Dual Intel Xeons
64 72 128 256 GB RAM
4/8 x 2 TB SATA
HW RAID-10
2 x 1 Gbps uplink

Terms of Use / Legal Notices: https://www.cometvps.com/tosaup.php

CometVPS is a trademark of Nexeon Technologies, Inc. a TX. Registered company that has been in business for more than ten years. Nexeon hosts thousands of servers at its Chicago, New York, Denver and Dallas locations, with each service providing a local DDoS mitigation.

SQL Server Mssql query problem. The column & # 39; & # 39; is invalid in the selection list because it is neither contained in an aggregate function nor in the GROUP BY clause

There is a problem that I experienced in Mssql. (but I do not have this problem in MySQL.) You know two different engines. But I could not find a solution.
Do you think I can fix this error?


My question is

CHOOSE
COUNT (*) as stok_adet, s. *, M. *, D. *
FROM stok as s
CROSS JOIN mermer_cins as m
JOIN stok_durum as d ON s.stok_durum_id = d.stok_durum_id
WO m.mermer_cins_id = & # 39; 5 & # 39; AND s.blok_no = & # 39; M6320 & # 39;
GROUP BY s.bundle_no, s.boy, s.yukseklik, s.hatali
ORDER BY s.blok_no ASC, s.bundle_no ASC, s.stok_tarih DESC " 

And the reason for the error I get in mssql

The column & # 39; stok.stok_id & # 39; is invalid in the selection list because it is neither contained in an aggregate function nor in the GROUP BY clause.


This is the design of my tables in Mssql.

Table mermer_cins => https://pasteboard.co/IofwCGc.jpg
stok table => https://pasteboard.co/Iofx1QV.jpg
stok_durum table => https://pasteboard.co/IofxfJg.jpg

Here is the screenshot link of my running query in MySQL. => https://pasteboard.co/Iof1DVa.png