Questions tagged as 'sintaxe'

2
answers

What is the purpose of: (colon) in PHP?

I have this question that is leaving me with fleas behind the ear. I do not understand, not at all. What does the sign for : have two points. Can anyone explain me? Example: if ( have_posts() ) : while ( have_posts() ) : the...
asked by 20.06.2017 / 22:01
2
answers

What are the for loop syntaxes in java?

Hello Everyone programming in Java should already be tired of using for looping, which almost always has a syntax similar to this: for (int x = 0; x < y; x++) { ... } I was analyzing some codes and came across a different s...
asked by 31.03.2014 / 04:42
2
answers

What is the purpose of empty command blocks or which do not belong to any command?

A command block is made up of two or more commands in {...//Comandos} keys, I can use them for the following situations I already know: In an if: if(codicao){...//Comandos} . In a for: for(inicializacao; condicao; incremento)...
asked by 22.01.2016 / 02:37
1
answer

Difficulty in Syntax

I would like you to explain this function to me, I do not understand this syntax: double sum_arithmetic(double x0, double r, int n) { return n == 0 ? 0 : x0 + sum_arithmetic(x0 + r, r, n-1); }     
asked by 29.09.2014 / 00:52
3
answers

Include / Require 'file.php' or Include / Require ('file.php')

I know PHP allows the inclusion of files in both modes, but I would like to know the correct way to use these functions, or if both modes are correct.     
asked by 11.04.2014 / 19:25
3
answers

What are these attributes in the properties?

What are the names of these "Attributes" and what are they used for? Examples: in a class declaration: [ComVisibleAttribute(true)] public sealed class SerializableAttribute : Attribute in a property declaration: [XmlElement] public...
asked by 23.12.2014 / 10:55
3
answers

What is the difference between function () {} and () = {}? Why does not $ http.get work?

When I use $http.get('/products').then((response) => { this.products = response.data; this.allProducts = response.data; }); The page loads with the products in Google Chrome, but when I use $http.get('/products').then(function(...
asked by 29.07.2016 / 16:36
4
answers

Difference between syntax for declaring a function

this response, I realized different forms of call a function using the jQuery. The first form would be this: $('#dois').on("click", testar); function testar() { console.log('Teste Dois'); } And the second one is this: $('#um').o...
asked by 17.11.2016 / 14:00
1
answer

What is the purpose of an empty parenthesis in a Lambda declaration?

I created an example of a Lambda declaration with no arguments, however, I am in doubt about omission of the empty parenthesis () in the declaration. See the example: class Program { public delegate void MyDelegate(); static...
asked by 23.06.2016 / 00:34
4
answers

How do I assign a value to an enum with binary notation?

To work with hexadecimal numbers, just add 0x in front of the number, like this: var numeroHexa = 0xff1120; The same goes for octal numbers, adding 0 : var numeroOct = 037; But how do you declare binary numbers? var nume...
asked by 23.04.2014 / 15:53