Most voted "syntax" questions
Syntax is the set of rules that defines how the different symbols of a language (natural or programming) can combine validly.
Learn more…268 questions
Sort by count of
-
1
votes1
answer79
views -
1
votes1
answer400
viewsCout string c++
I have a function Show() which traverses a list and should display it on the screen, but I cannot concatenate the value of a list with a string. Follows code: #include "pch.h" #include…
-
1
votes0
answers41
viewsPython syntax {%-- %}
Good evening, I’m doing the tutorial of Django’s documentation and I came across this code: {% if latest_question_list %} <ul> {% for question in latest_question_list %} <li><a…
-
1
votes1
answer45
viewsSyntax inside a struct that looks like a function
I was analyzing a code in C++ and came across the following structure: struct ligacao { int v_; int w_; int ComEXp; ligacao(int v, int w, int ComEXp1) : v_(v), w_(w), ComEXp(ComEXp1) {} // Minha…
-
1
votes1
answer85
viewsWhy do space aliases only work with backticks?
I have a view where all its columns have been dubbed to make it more readable: +----------------+---------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra |…
-
1
votes1
answer56
viewsWhat is the purpose of the symbol "&" in the declaration of an object?
I noticed that some statements of variables/objects are used * for the statement (thus generating a pointer), but in some cases has the statement using &. const MyClass & my_class =…
-
1
votes1
answer57
viewsI’m not able to create array with keys in Java
I am studying the Java language and to practice I am creating a simple login program. I have a class called Database that should save an array with the information (name and password) of the users.…
-
1
votes2
answers56
viewsHow to decrease decimal numbers
How to decrease the decimal numbers of this division table ? I was thinking of putting a tofixed(), but I’m having a hard time finding a correct syntax to fit this code. how can I fix this, someone…
-
1
votes1
answer168
viewsError adding foreign key, how to proceed?
I am trying to reference the column id of a table in another table in my database, but I am told an error that is not very specific. The engine being used is Innodb and the database is in Mysql. It…
-
1
votes1
answer105
viewsFor in the C language
I studied the iterative artifice for and thought the same applied to the following example: for(i = 0; i < 7; i++){Código} However, when studying the pointer part with vectors, I came across the…
-
1
votes1
answer71
viewsHow to add a value key to a dictionary?
I want to add terms to an organized dictionary-like glossary, requested by an activity, but I’m getting an error message that I can’t identify why. glossario = { 'concatenar': 'Concatenar é a junção…
-
1
votes1
answer97
viewsWhat is Ienumerable.Getenumerator in C#?
I was reading this documentation and I came across the following piece of code within a class that implements IEnumerable: // Implementation for the GetEnumerator method. IEnumerator…
-
0
votes1
answer83
viewsSyntax Highlighting no textview Android
Do you know any library or method to display source code (Syntax Highlighting) in textview? I need to do this for hundreds of codes (average of about 400), just for reading. Something similar to the…
-
0
votes2
answers333
viewsMaking multiple SQL inserts, multiple Inserts
Good evening to all, once again I live my Alans heel with the blessed sql... I want to insert data in two tables... client table and address. I take the sql below, fill the variables and run the sql…
-
0
votes1
answer69
viewsHas Meteor syntax changed from version 0.8 to version 1.0?
Among the many changes in the Meteor Framework from version 0.8 to version 1.0, I know that it no longer uses Meteorite, and that the template engine has changed from Handlebars to Blaze. But the…
-
0
votes2
answers12708
viewsConcatenate String in Firebird
How to concatenate String in Firebird? I’m trying like this: select ("00"||"01") AS TESTE from tabela I’ve tried parentheses, no parentheses, column name, no column name... it just won’t... is…
-
0
votes1
answer368
viewsError: expected { when creating a class
I wrote the code below, but it’s giving me the error expected { after the declaration of my class public class book(string title, string text){ string _title = title; string _text = text; void…
-
0
votes0
answers36
viewsLocation in php not working
Guys, I was watching a video lesson here very simple, prof put a code in php in html, I put exactly what it is because and it’s not working at all, I’ve tested in other browsers and tbm didn’t work,…
-
0
votes0
answers64
viewsSyntax error in GLPK
set linhas; set colunas; param c{j in colunas}; param A{i in linhas,j in colunas}; param b{i in linhas}; var x{j in colunas}>=0; minimize FO: sum{j in colunas} c[j]*x[j]; s.t. R{i in…
-
0
votes3
answers1764
viewsPHP + Mysql - Quote syntax error in String
"Obs: when the string has no simple quotes, it works perfectly, my problem is when it has simple quotes" example with single quotes: $name = "Michael"; $store = "Mike's Store"; "INSERT INTO…
-
0
votes1
answer95
viewsRewrite code using the Try-with-Resources resource
My problem is to rewrite a code using the Try-with-Resources feature, as I’m new in the world of programming I’m not being able to learn how to do this, which is becoming something exciting, because…
-
0
votes2
answers136
viewsHelp me with the error "Undefined index: referrer in "
I have a mistake and I’m trying to correct but I can’t, can anyone help me? Thank you. The mistake is: Notice: Undefined index: referrer in C: xampp htdocs brpg register_content.php on line 71 the…
-
0
votes1
answer116
viewsMeaning of this syntax
I need to continue a job that is partially ready. However I did not find on the internet files that described or taught this in an understandable way. What is the meaning of this syntax ? Ide:…
-
0
votes1
answer74
viewsIs this valid (x = (*mat)+;)?
(x = (*mat)++;) If it is valid, explain to me why and how it will work.
-
0
votes1
answer58
viewsDifference in whether or not to use the term Function
I’m starting the study with Vue.js and I came across a situation within one of the options and I imagine it serves other options that is the use of the term Function, for example: var vm = new Vue({…
-
0
votes2
answers773
viewsJavascript escaping backslash as I do so this does not occur!
Good morning guys, I’m in trouble I wanted a little help from you. Something is causing the content passed in the function to escape the control bar , I need them not escape because this function…
-
0
votes1
answer658
viewsPass parameter in FILTER of a Javascript array
I need to pass a parameter to an external function I want to create for a filter array, but do not know how to do. Example: This code already works: const myArray = [ { "name": "nome1" }, { "name":…
-
0
votes1
answer103
viewsdo I get exited with non-zero status in that pq code?
#include<stdio.h> int main(){ int i,jog,rod,placar[500],ponto=0,p,maxPonto=0,vencedor=0,rodCopia; scanf("%d %d",&jog,&rod); rodCopia = rod; …
-
0
votes2
answers194
viewsDifferent errors in C code on different compilers
In the following code below there is an error that the Lccx86 compiler for Windows claims to exist, but I copied the codes from a C class I am watching. Class link, for those interested In the C…
-
0
votes0
answers66
viewsSyntax error in Informix database query
I made a prototype of a database informix in the Access to optimize the construction of my queries. I use with the Mysql and through some adaptations in the syntax I get a good. But in the…
-
0
votes1
answer1234
viewsPHP - Parse error: syntax error, Unexpected 'endif' (T_ENDIF)
I’m having this error in the code in functions.php line 2883, below: ?> <!DOCTYPE html> <!-- Ticket #11289, IE bug fix: always pad the error page with enough characters such that it is…
-
0
votes1
answer112
views -
0
votes0
answers425
views"Uncaught Syntaxerror: Unexpected token <" with vuejs
I am getting this error on multiple files. Uncaught Syntaxerror: Unexpected token < The Debugger says it is . js file, but sends me to html files and shows the error right in the first line of…
-
0
votes1
answer68
viewsClass recognition problem in Eclipse
There’s a problem in my project that’s supposed to be the main class .…
-
0
votes2
answers151
viewsHow is the Generics syntax in C# compared to Java?
I am a Java developer studying C# and came across the following difference between the two languages: https://nerdparadise.com/programming/csharpforjavadevs Generics Generics are Much Less fiddly in…
-
0
votes1
answer84
viewsProcedures MYSQL - Pass parameters or not
I created a procedure to make the following process: If you do not enter the required parameter, you will bring the complete list of what I want (in this case a list of students etc). If you type,…
-
0
votes1
answer450
viewsVisualg syntax error (English)
When placing the code this way and entering this data "Faults = 0 Proofs = 5, 9, 7.2 Job = 10.5 Age = 15 Result = Failed", the same as the error when compiling, displays syntax error in "Result…
-
0
votes1
answer75
viewsExpected operando in for loop shell script
I am creating a function in shell script that says if the number is prime or not, but I am getting a syntax error in for loop that the function has and I could not find how to fix. # ... 9 ehPrimo()…
-
0
votes1
answer103
viewsWhy in Python are there functions where the parameter should be placed between parentheses and others should be placed with a dot and the function name?
There are functions that should be written as for example sorted(variavel) and others are written as variavel.sort() I know the differences between the two functions above, I just used to exemplify.…
-
0
votes0
answers549
viewsPostgresql - sql:4862: ERROR: syntax error at or near "textGrande"
Good night, you guys. I am trying to import to my Postgres database an sql from an external database and am suffering the following error: .sql:4862: ERROR: syntax error at or near "textoGrande" The…
-
0
votes1
answer37
viewsINCORRECT SYNTAX Visualg
I need to make a code to calculate the ideal weight of men and women, but the teacher said I need to do only using IF-SO, and leave the SENAO out, hence all made that I run this program the first…
-
-1
votes2
answers548
viewsHow to generate error in logerror.txt file?
I am trying to generate errors in the file logerro.txt, but I don’t know how to do it. I used the syntax error function: try{ }else(PDOException $e){ echo'Sistema indisponível'; LogErros($e); I used…
-
-1
votes1
answer123
viewsMysql syntax error
I am making a form to insert data in my database but the function that does this is returning me a syntax error that I cannot find. Function function insereProduto($conexao, $nome, $descricao,…
-
-1
votes5
answers2297
viewsStore IF output in a variable to use later
This code is in error when I call the variable $os: $os = (if($status_os_cliente == "A"){ echo "SIM"; } else{ echo "NÃO"; });
-
-1
votes1
answer58
viewsQuery using WHERE
I need to make a query in a table called controls: I have the spine CH which is the workload in minutes and I have the column SETOR which are the sectors that have participated in some training. I…
-
-1
votes2
answers100
viewsProblems in creating class and method
I have the following code: public class String verifyWord(String wordChosen, Scanner reader){ //linha 1 boolean answeredCorrectly = false; int tries = 1; String wordChosen = random.nextInt(); String…
-
-1
votes1
answer40
viewsProblem with syntax
I’m having trouble in the line that is marked below, I did everything and could not solve. Could someone help me? <?php $conexao = mysqli_connect("localhost", "root", "", "banco") or…
-
-1
votes1
answer247
viewsParse error problem: syntax error, Unexpected 'var' (T_VAR),
I’m getting the following error message I’ve done several searches yet n managed to understand what’s wrong. **A PHP Error was encountered Severity: Parsing Error Message: syntax error, unexpected…
syntaxasked 5 years, 10 months ago Rodrigo Vicente 1 -
-1
votes3
answers1053
viewsProblems in Try (Python)
When I use Try and put 3 operations, if the first one goes wrong it already goes pro except. Is there any way to "improve" this by making it jump to the next action? Can’t make a code where there’s…
-
-1
votes2
answers166
viewsQuery return comparison with "N" status
I need help for comparison in "if" c# of a datatable database return. Below the code snippet: public class ArcerarDto { public DataTable SelectArcerarContract() { ArcerarDal arcerarObj = new…