Questions tagged as 'syntax-error'

1
answer

Uncaught SyntaxError: Unexpected token this

When this code is run together it gives this error, but if it is formatted with line breaks it runs normally, how to fix? Error:    Uncaught SyntaxError: Unexpected token this Code in question: var Recorder = function(source){ this.c...
asked by 13.07.2015 / 23:29
1
answer

Prevent or remedy?

Lately I've been too worried about preventing code errors. However I had this doubt:    Is it better to check (prevent) or remedy (Ensure existence)? Let's say you have: $var = array( 'name' => 'Guilherme', 'lastName' => '...
asked by 03.02.2016 / 12:10
1
answer

How to use 'while' in an 'isNaN ()'?

I am doing a test of "questionnaire" and to work the user has to enter only numbers, if not type, an error message will be issued for it to repeat the process. I was able to resolve this with the following: if (isNaN(variavel1)) { Varia...
asked by 11.09.2016 / 02:18
2
answers

Search in Width - error: 'str_no' undeclared (first use in this function)

I have the following code in C , for a search in width: #include <stdio.h> #include <stdlib.h> #include <conio.h> //Variáveis globais int id = 0; int proximo = 0; //Função de Busca em Largura int buscaLargura(int *gra...
asked by 21.06.2016 / 01:08
3
answers

Error: "You have an error in your SQL syntax" [closed]

I'm getting the following error when time to perform a query to insert data into a table in the database:    You have an error in your SQL syntax; VALUES ('Refined Sugar', '2', '') 'at line 1 My code: <html> <head>...
asked by 06.03.2014 / 01:48
1
answer

PHP Error - Try_Catch [closed]

   Parse error: syntax error, unexpected 'catch' (T_CATCH), expecting end of file in C: \ xampp \ htdocs \ validar_cad_user \ face.php on line 65 My Project is there if anyone can help, Thanks! try { // Returns a 'Face...
asked by 06.02.2018 / 12:56
0
answers

Error in Script with PHP 7.1 [closed]

I have a problem with a module that used to work correctly in PHP version 5.6. After upgrading PHP from server to 7.1 it crashed due to some functions that were previously present in PHP 5.6 and no longer exist from version 7.1. When I try...
asked by 01.07.2018 / 02:35
0
answers

TypeError: not all arguments converted during string formatting - Python 3.6 - Power account [closed]

I am a beginner in the area and during the programming studies in Python I got caught up in this exercise, the purpose being to appear on the user screen how much it should pay for kwh used, depending on whether it is for trade, industry or resi...
asked by 30.12.2017 / 00:17
2
answers

Jquery does not execute because of syntax

I looked at my syntax and at first it's true: $(document).ready(function(){ $('input[placeholder], textarea[placeholder]').focus(function(){ if($(this).val()==$(this).attr('placeholder')) $(this).val(''); }).blur(function...
asked by 13.04.2015 / 09:43
1
answer

NameError: name [name] is not defined

I need to do a Python programming to know the CG percentage in a DNA strand ... maior = 0 dnaMaior = "" while True: dna = input("Digite uma sequencia de DNA: ") if dna == "Z" or dna == "z": break else: tam = len(dn...
asked by 05.10.2016 / 00:31