Questions tagged as 'sintaxe'

2
answers

Mysql, doubt about variables

Mysql allows you to use various types of syntax in the declaration of variables eg: declare i int unsigned default 0; set @str = "select "; Do you have any advantage in using one type or another, or some disadvantage or even some recommenda...
asked by 12.06.2015 / 21:07
1
answer

Incorrect usage of UNION and LIMIT

I want my query to return only the first record of the first table (if there is data in it), because the second table does not have repeated data. But it returns me this error:    Error Code: 1221. Incorrect usage of UNION and LIMIT My...
asked by 22.11.2018 / 15:50
1
answer

Why can I invoke functions without parentheses in VB.NET?

In C #, this code does not compile: public static string Teste(){ string val = ""; return val.Trim; } Because the Teste function requires a return of type string , and Trim is a MethodGroup . That makes per...
asked by 21.07.2017 / 14:47
2
answers

What is the difference between the data types enum, struct and union in C?

I'm reading the GNU C manual and I'm in the Data Types section and I notice a certain similarity between% types of%,% with%, and% with%. Is the syntax the same, or is there something that differs between them? In which cases should I use which...
asked by 27.06.2016 / 19:59
2
answers

How to make NetBeans recognize the syntax of the ES2015?

Using NetBeans with ES2015 ? I've done some testing with version 8.0.1 and 8.0.2 of NetBeans, but it does not recognize the new syntax: let , const , etc.     
asked by 29.07.2016 / 23:54
1
answer

What are the advantages of using currying in a function? [duplicate]

I understand that, roughly simplifying, using currying is breaking a function that gets multiple arguments into smaller functions that take only parts of the original function's arguments. Consider the code below as an example: window.on...
asked by 28.08.2017 / 21:57
1
answer

Syntax ': value' in the array

I've seen this syntax in laravel, in the 'resources / lang' area, where authentication messages are pre-configured. And I came across the following code: <?php return [ 'throttle' => 'Too many login attempts. Please try again in :se...
asked by 20.03.2018 / 18:54
1
answer

Can I place two conditions / increments within the same loop?

I basically want to do this for (j = parametro, int k=0; j < parametro + 3, k<3; j++, k++) { previsoes[i] += valores[j] * pesos[k] ; }     
asked by 14.11.2017 / 16:34
3
answers

Logical operator || in C # does not work [closed]

I'm trying to do an exercise where in a range of 0-30 I want to know which numbers are divisible by 3 or 4. Working with a if for each situation works. But if I try to use the logical operator || does not work. It is part of the co...
asked by 19.04.2017 / 17:27
2
answers

Performance in Java repetition loops

What a difference of performance between the three types of ties highlighted below. List<Foo> list = new ArrayList<Foo>(); for (int i = 0; i < list.size(); i++) { //CODE } for (Foo foo : list) { //CODE } Iterator<F...
asked by 31.03.2014 / 16:28