Menu
  • HOME
  • TAGS

Saved sublime, and now I can't connect to localhost:3000 on OS X 10.9.5

syntax-error,ruby-on-rails-4.2

It looks like your missing the initial declaration of the routes file. See example below. You are getting this error because at the bottom of the file there is and end and it does not know what your trying to end. Rails.application.routes.draw do #Routes Go Here end Hope this helps....

PHP Session Errors and Warnings [duplicate]

php,session,syntax-error,warnings

The problem is that you are sending the DOCTYPE on the first line, before the session starts. <!DOCTYPE html> <?php include('session.php'); ?> <?php include('dbcon.php'); ?> <html lang="en"> Change to <?php include('session.php'); ?> <!DOCTYPE html> <?php include('dbcon.php'); ?> <html lang="en"> Make sure the include is the first line...

python postgresql insert error while adding SEQUENCE for auto increment

python,postgresql,insert,syntax-error,sequence

Still not sure where the (705, 705, 705, 705, 705) tuple is coming from... the cache-related code is not in the main body of code... However, a couple of things... createTables is never called. (filename1) is not a valid argument to execute. That's not a tuple. For single-item tuples, you...

SyntaxError: invalid flag after regular expression and white screen

javascript,html,arrays,regex,syntax-error

You have broken HTML and invalid Javascript. <script language="JavaScript"> For your DOCTYPE of html, there is no need to specify any attributes to a <script> tag except src, and that is only needed if you are loading an external script file. And there is no attribute language. You likely meant...

Syntax Error for variable name [closed]

python,syntax-error

You have a bracket mismatch on the previous line, due to which Python continues parsing into the next line, and hence throws the error in the next line. To correct this, use: tests = average(student("tests")) * .6 Instead of: tests = average(student(("tests")) * .6 ...

Learn Python the Hard Way Ex26: Not Getting Expected Result

python,python-2.7,syntax-error

Your sorted method isn't correct. In python, somelist.sort() sorts the list in place and returns None, so you end up erasing your list. You can either do words = sorted(words) or just words.sort() but doing words = words.sort() ends up setting words to None. Also, your split words is most...

PHP Error in Contact Form? [duplicate]

php,forms,syntax-error

The name attribute of your input fields are what is used for the index of the $_POST array in PHP. You did not set the name attributes in your HTML code. For this reason, e.g. $_POST['name'] cannot be resolved, which causes the message. To fix this, actually fill in the...

Code academy error (confused) ^^

javascript,syntax-error

Because else if should be before else, like this: var compare = function(choice1,choice2){ if(choice1===choice2){ return("The result is a tie!"); }else if(choice1==="rock"){ if(choice2==="scissors"){ return("rock wins"); }else if(choice1==="paper"){ if(choice2==="rock"){ return("paper wins"); } } else{ return("paper wins"); } } ...

Plone - Syntax Error when doing hello world tutorial

syntax-error,plone

It seems your bootstrap.py is outdated and tries to access a URL that does not exist any longer. You can update your bootstrap like this: $ rm bootstrap.py $ wget http://downloads.buildout.org/1/bootstrap.py $ python2.7 bootstrap.py $ bin/buildout ...

SQL node.js Syntax error on what seems to be a valid query?

javascript,sql,node.js,syntax-error

This function will generate SQL code which is missing quotes around the datetime variable, resulting in invalid SQL code. function sendShipPosition(position) { var input = ''; if (position.moving === true) { var currentdate = new Date(); var datetime = currentdate.getFullYear() + "-" + (currentdate.getMonth()+1) + "-" + currentdate.getDate() + "...

Python Syntax error: blank space

python,syntax-error

import re from collections import Counter from prettytable import PrettyTable words = re.findall('\w+',open('MusicTaste2.csv').read().lower()) for label, data in ('Word', words): pt = PrettyTable(field_names=[label, 'Count']) c = Counter(words) [pt.add_row(kv) for kv in c.most_common()[:100]] print (pt) First problem is indent your code properly Second problem is missing of : in the follwing line...

Contradictory Error Messages - Operator Overloading <<

c++,operator-overloading,syntax-error,friend

When you declare the function inside the class as a friend, it is a member of the enclosing namespace and not of the class itself. So you need to define it as std::ostream& game::operator<<( std::ostream& o, const Engine& engine ) { ... } ...

c++ interfaces error; identifier “class” is undefined

c++,oop,interface,syntax-error

You are not allowed to use qualified names in class member declarations. I.e. when declaring the constructor of class Human inside class Human, you are not allowed to call it Human::Human(). It should be just Human(). The same applies to all other methods. Trying to declare method int IPc::Attack()...

Array types are now written with the brackets around the element type

ios,xcode,swift,syntax-error

It looks like Fix-it blew it. Swift uses brackets around the type. The correct version is this: var tasks = [task]() This is the shorthand notation; there is a longer version: var tasks = Array<task>() but the shorthand version is preferred....

Syntax error when moving Wordpress Site

php,sql,wordpress,wordpress-plugin,syntax-error

You cant just move a wordpress site by copy and pasting. Also exporting and importing Database will cause errors like this. Use all in one migration plugin. First install a wordpress site in your live server then export a backup from your dev server with the plugin and import same...

Uncaught SyntaxError: Unexpected end of input line 1

javascript,jquery,syntax,syntax-error

The line number of the error is wrong. The problem is at the end, you never close the function you're passing into ready or the call to it. Add }); at the end. If that's missing only because you quoted a ...snippet of the beginning of the code... ...then the...

How to create stored procedure in mysql workbench?

mysql,stored-procedures,syntax-error,declare

You must define IN for the parameters. DELIMITER $$ CREATE PROCEDURE spInsertEmployee ( IN Employee_Name nvarchar(20), IN Employee_Surname nvarchar(20), IN Department_Name nvarchar(20) ) BEGIN declare Department_Id INT; select Id into Department_Id from tblDepartment WHERE tblDepartment.Department_Name=Department_Name; insert into tblVeri(Employee_Name,Employee_Surname,Department_Id) VALUES(Employee_Name,Employee_Surname,Department_Id); END; ...

cannot invoke get int on the array type comparable[ ]

java,arraylist,duplicates,syntax-error

Arrays don't have the get(int) method. Instead, they use the [int] syntax: if (data[i].equals(data[j])) { return true; } ...

syntax error : missing ')' before 'constant'

c,compiler-errors,macros,syntax-error,c-preprocessor

#define is a preprocessor MACRO which acts as a textual replacement in the preprocesssing stage. In your case, with a MACRO like #define N 10 and then with a function like void displayMatrix(int *arr,int M, int N); it turns out to be void displayMatrix(int *arr,int M, int 10); //note the...

Unknown compiling error java

java,compilation,syntax-error

The less than and greater than operators in Java (and frankly, in most programming languages) are <= and >=, respectively, not =< and => like your code currently has. Additionally, you cannot apply to comparison operators to a single variable/value - you'd need to have two separate conditions with a...

Notice: Undefined index: $error in C:\wamp\www\btb_sandbox\upload_2.php on line 35 [duplicate]

php,syntax-error,constants

You made a mistake apparently. In the doc (http://php.net/manual/en/features.file-upload.errors.php), you'll find : UPLOAD_ERR_INI_SIZE and you did specify in your script : UPLOAD_ERR_INT_SIZE That's why the script tells you this constant does not exist :)...

Using Order By in IN condition

sql,oracle,syntax-error

Consider the condition x in (select something from somewhere). It returns true if x is equal to any of the somethings returned from the query - regardless of whether it's the first, second, last, or anything in the middle. The order that the somethings are returned is inconsequential. Adding an...

Compiler error “name in formal parameter list illegal”

c,header,syntax-error,missing-data

Change: typedef struct Portion{ char *pName; float pPrice; float pQuantity; Portion *next; }Portion; to: typedef struct Portion{ char *pName; float pPrice; float pQuantity; struct Portion *next; // <<< }Portion; Also note that you shouldn't cast the result of malloc in C, so change e.g. Portion *newPortion = (Portion*)malloc(sizeof(Portion)); to: Portion...

SQL Server syntax error when joining CTEs

sql,sql-server,select,join,syntax-error

You're missing a comma between the two CTEs. Also, drop the alias - you don't need them when defining a CTE: ;WITH q1 AS ( select * from ReservationList WHERE [Market Segment Code] <> 'COMP' AND NOT ([Status] = 'CANCELED' OR [Status] = 'NOSHOW' OR [Status] = 'WAITLIST') AND NOT...

PL/SQL: ORA-00936: missing expression :: Where Am I going wrong in the code?

oracle,syntax-error

ORA-06550: line 3, column 22: PL/SQL: ORA-00936: missing expression Oracle is clearly telling you where the error is. You just need to look at the error details, specially the line number. Line 3 will take you to SELECT count(*) INTO EXISTS. Column 22 will take you to EXISTS. It...

rake db:seed yields syntax error, unexpected '\n', expecting => [closed]

ruby-on-rails,ruby,terminal,syntax-error,rake

You have a typo on line 16th: Location.create(area: 'College Ave', should be Location.create(area: 'College Ave') ...

Checking, if optional parameter is provided in Dart

syntax,dart,syntax-error,questionmark

The feature existed at some point in Dart's development, but it was removed again because it caused more complication than it removed, without solving the problem that actually needed solving - forwarding of default parameters. If you have a function foo([x = 42]) and you want a function to...

Error in SQL Syntax related to 'RANDOM ACCESS MEMORY'

mysql,mysqli,syntax-error

When you insert parameters into a query string, you have to make sure that any characters in the inserted data are properly encoded so that they don't interfere with characters that have special meaning to the query language, such as the single quotes used to denote string literals. You typically...

how to write delegate with 2 parameters

c#,delegates,syntax-error

In order for the compiler to know if the , belongs to the constructor call or to the method signature of the delegate, you should add parenthesis around the delegate signature: var addCar = new Action<string, decimal>((number, test) => { } ); Now it reads the delegate as (number, test)...

Display only future database records with MySQL

php,mysql,sql,datetime,syntax-error

As I said, I see no reason to use YEARWEEK function. You need start date set to today which is CURDATE() and plus 2 weeks period which is DATE_ADD(CURDATE(), INTERVAL 2 WEEK) and then we just check if starttime between those 2 dates. SELECT id, date_format(starttime, '%d-%m-%Y %H:%i') AS formatted_start,...

syntax error on #pragma kernal Main

unity3d,syntax-error,shader,compute-shader

"kernel", not "kernal". See: Unity Compute Shaders [email protected] -> RWTexture2D will be your next compile error. Followed by "Reult" -> "Result", and then "id,xy" -> "id.xy"....

How to select all records where Timestamp date > or < other Timestamps?

mysql,sql,syntax-error

The SQL syntax used to retrieve rows from a table is select, not get: SLEECT * FROM items WHERE pubDate < ? ...

When inverting Vector3 value compiler complains about Syntax

c#,vector,syntax-error,expected-exception

You're using object initializer syntax. The compiler is correct. You would place a comma there, instead of the semicolon, if you were to initialize more than one property. The comma is also legal even after the last property being initialized, but a semicolon is not legal. So either of the...

EXPLAIN in postgresql not working

sql,postgresql,syntax,syntax-error,explain

It should not work - DDL statements has no plan - so EXPLAIN has nothing to show.

PHP redirection not working on login page

php,session,header,syntax-error,session-variables

The error message shows exactly the problem: at the given line of the given php file, output has been produced already. After starting output, you cannot set headers any more because they have to be set before any document data. In order to solve the problem, check what output is...

Uncaught SyntaxError: Unexpected token < in HTML - can't solve

html,console,syntax-error,token

You need to set the type of <script> correctly: <script id="custom-reports-table" type="text/x-handlebars-template"> If you're telling the browser to evaluate HTML as Javascript, of course you'll get syntax errors from the Javascript interpreter....

Trying to Figure out why I get a Print Syntax Error at Line 12

python,python-2.7,printing,syntax-error

You have unbalanced parentheses on the previous line: min = int(raw_input("Input the next number of minutes (0 to exit): ") ...

Why does this MySQL query spill over to the next line

mysql,sql-update,syntax-error,sql-injection

MySQL allows writing a literal ' within a string literal quoted with ' by two consecutive '': There are several ways to include quote characters within a string: A “'” inside a string quoted with “'” may be written as “''”. […] So the '' immediately after the opening '...

SQL trimming syntax error

mysql,sql,syntax-error,trim

Remove the extra semicolon. SELECT site_name FROM example_tbl WHERE active = 1 AND site_code IN (SELECT TRIM(LEADING '/var/www/html/' FROM site_path) FROM example_tbl); ...

Syntax error (missing operator) in query expression 'Runner Name'

vb.net,syntax-error

You'll probably find the syntax select runner name is being treated as the shorthand form of select runner as name which would make the following as rather problematic. Even if they're not being interpreted that way, standard SQL will treat Runner and Name as two distinct tokens unless you tell...

Why does adding parentheses in if condition results in compile error?

syntax,go,syntax-error

The answer is not simply "because Go doesn't need parentheses"; see that the following example is a valid Go syntax: j := 9 if (j > 0) { fmt.Println(j) } Go Spec: If statements: IfStmt = "if" [ SimpleStmt ";" ] Expression Block [ "else" ( IfStmt | Block )...

Parse error: syntax error, unexpected '=>' (T_DOUBLE_ARROW) at line 3 [closed]

php,syntax,syntax-error

The condition should be like below -- => is solely for associating keys & values within arrays if(strlen(trim($_POST[$fieldname])) >= $maxlength){ ...

Why does a module level return statement work in Node.js?

javascript,node.js,return,syntax-error,node-modules

TL;DR The modules are wrapped by Node.js within a function, like this: (function (exports, require, module, __filename, __dirname) { // our actual module code }); So the above shown code is actually executed by Node.js, like this (function (exports, require, module, __filename, __dirname) { console.log("Trying to reach"); return; console.log("dead code");...

Cannot reference a field before it is defined, but only if you don't qualify it [duplicate]

java,initialization,syntax-error

As with so many of these questions, it's because the JLS says so. 8.3.2.3 Restrictions on the use of Fields during Initialization The declaration of a member needs to appear textually before it is used only if the member is an instance (respectively static) field of a class or interface...

Python Unexpected character

python,syntax-error

\ is an escape character, it tells Python that the next character may need to be ignored. In Python code, outside string literals, it is used to create logical line continuations: foo = 'This is a longer string ' \ 'wrapped across more than one line' Using it in the...

Syntax Error on using DECLARE and prepared statement inside CREATE PROCEDURE

mysql,stored-procedures,syntax-error,prepared-statement

The reason is A statement prepared in stored program context cannot refer to stored procedure or function parameters or local variables because they go out of scope when the program ends and would be unavailable were the statement to be executed later outside the program. As a workaround, refer instead...

Bash Script: syntax error near unexpected token `else'

bash,syntax-error

The error is here: if [ "$PREVIP" == "$EXIP"]:then ^^ you need to add spaces around [ and ] and finally use semicolon: if [ "$PREVIP" == "$EXIP" ]; then ^^^ More generally, you can always use a tool called Shellcheck to check if your script has these common errors....

Syntax errors when right shift operator is used as a template parameter

c++,templates,syntax-error

Simply adding parentheses around &TestStruct::operator>> will force MSVC to parse it correctly. This code compiles with MSVC 19.00.23008.0 : template <class T, void(T::*)(int)> struct TemplateMagic {}; struct TestStruct { void operator>> (int) {} }; int main() { TemplateMagic<TestStruct, (&TestStruct::operator>>) >* ptr; } The "trick" of adding parentheses will work in...

JavaScript Syntax Error or More?

javascript,syntax-error,feedback

This line: if (userReady = "yes" || "Yes") { does not do what you expect it to. First, you cannot use = to compare values (it means assignment in Javascript). So you can use ===. Second, the || joins two independent conditions, not values. So you can write: if (userReady...

What is wrong with this INSERT MAX+1 query?

mysql,insert,syntax-error

Your syntax is invalid, use INSERT INTO ... SELECT and remove the values part like this: INSERT INTO invoices(invuid, linenumber) SELECT ?, max(linenumber)+1 FROM invoices WHERE invuid=? ...

near “when”: syntax error in VHDL

syntax-error,vhdl,tri-state-logic

Two things. There is no is needed after process. And more importantly, when can't be used like that. You can do what you want to concurrently: TriOut <= A when S = '1' and T = '0' else B when S = '0' and T = '1' else ... or...

Bison:syntax error at the end of parsing

syntax-error,bison

Your scanner pretty well guarantees that two newline characters will be sent at the end of the input: one from the newline present in the input, and another one as a result of your trapping <<EOF>>. However, your grammar doesn't appear to accept unexpected newlines, so the second newline will...

Inner Query For Oracle is not working?

sql,oracle,syntax-error,nested-queries

Altering the posting layout for clarity reveals that this line is the immediate problem: ORDER BY dat DESC ) table2 tb2 You need one alias, not two. So it should be ORDER BY dat DESC ) table2 You also need to put an alias on the outer nested query: (select...

Syntax Error JSON file read with AJAX

ajax,json,syntax-error

You are missing a { in the below line success: function (data) Make it success: function (data) { Edit You are having parsing the data incorrectly , do it as below $.ajax({ url: "test.html", dataType: 'json', mimeType: "application/json", success: function (data) { var item = []; $.each(data, function (key, val){...

Unable to UPDATE row, only INSERT to my MySQL table. Syntax Error “WHERE ID =0”

php,mysql,syntax-error

Your update query has an extra , comma before where "UPDATE minty_config SET name='%s', value='%s', WHERE ID=%d" ^^^ It should be "UPDATE minty_config SET name='%s', value='%s' WHERE ID=%d" ^^ I've just removed that extra comma. This'll work for you....

Access database syntax error in update into statement

c#,database,ms-access,syntax-error,insert-update

I believe you have an extra comma right before your where clause and an extra quote before the ID. Also, always use parameters, to avoid Sql Injection attacks: conn.Open(); cmd.CommandText = "update [Employe] set [UserName] [email protected], [Password] [email protected], [Authorization] [email protected] where [Id] = @id"; cmd.Connection = conn; cmd.Parameters.AddRange(new OleDbParameter[] {...

Python AttributeError: I don't know why this is not working [closed]

python,tkinter,attributes,syntax-error,trackback

Spelling? Try subMenu.add_separator().

Unable to start activity Error: NullPointerException in onCreate

java,android,nullpointerexception,syntax-error

-First of All you have to check whether you are getting Json response properly or not and then check if response is right then you are storing in proper object or not i.e:- shop_title is not null check here. -Let me know if issue exist more Thanks...

App crashes with java.lang.RuntimeException: Unable to start activity ComponentInfo error

java,android,xml,syntax-error,logcat

Remove this line: navDrawerItems.add(new NavDrawerItem(navMenuTitles[10], navMenuIcons.getResourceId(10, -1))); And consider replacing that block of near-identical calls with a for loop: for (int i = 0; i < 10; ++i) { navDrawerItems.add(new NavDrawerItem(navMenuTitles[i], navMenuIcons.getResourceId(i, -1))); } ...

Using to_json gives me illegal character

ruby-on-rails,json,syntax-error,illegal-characters,to-json

If this is in a .erb file you can do the following: var home = <%= @home.to_json %>; Otherwise (haml or something else) you could use the parseJSON method from jQuery in combination with Ruby's string interpolation: var home = $.parseJSON("#{@home.to_json}"); More information about the parseJSON method can be found...

syntax error can't pinpoint the bug in javascript

javascript,syntax-error

0.34 >= computerChoice < 0.67 is not valid in JavaScript. Use something like computerChoice >= 0.34 && computerChoice < 0.67 instead. the last block of else [else (0.67 >= computerChoice <= 1)...] should be else if. So your corrected code should be like this: alert ("CAN YOU BEAT VALERIE...

Python: Getting Syntax Error while using Argument of an Exception [duplicate]

python,exception,python-3.x,exception-handling,syntax-error

It seems like you're using python 3.x. Use following syntax (using as): except ValueError as Argument: Reference: try statement - Python 3 documentation...

Visual Basic Input Error Messages [closed]

visual-studio,error-handling,syntax-error,basic

On Error Resume Next For x = 0 to 2000 err.raise x If not err.description = "Unknown runtime error" then wscript.echo err.number & " " & err.description End If err.clear Next Help has a full list of runtime and syntax errors. Above vbs prints out all runtime errors....

Error: Expected expression, got end of script

javascript,php,onclick,syntax-error

That makes no sense. You are assigning a URL to a onclick, that is wrong. If you want to go to a page, you need to set the window location or wrap the button in an anchor. onclick="window.location.href='http://www.example.com';" Using inline events is bad practice....

Parentheses in string of javascript function call

javascript,jquery,syntax-error,parentheses

The parenthesis aren't the problem, it's the lack of quotes inside the function. formResults += "<a onclick='openForm(\'" + this.displayText + "," + this.ID + "\');'>" + this.displayText + "</a>"; This below snippet (from yours) `openForm(Example Form...`) Will throw an error because it's looking for variables Example and so on, quote...

Include, Require a syntax error file

php,include,syntax-error,require

If you really wanted this type of functionality. You could try using nikics php parser to see if you can successfully parse the file or not. $code = file_get_contents('yourFile.php'); $parser = new PhpParser\Parser(new PhpParser\Lexer\Emulative); try { $stmts = $parser->parse($code); // $stmts is an array of statement nodes // file can...

Stored Procedure for insert

sql-server,stored-procedures,datatable,syntax-error,sql-insert

You need the form of insert that takes a select rather than a values: insert into theTable (col1, col2, ...) select col1, col2, ... from ... where... All the features of a select are available (column aliases, grouping, joins, sub queries, ...)....

Getting “Incorrect syntax near”-error with SqlDataReader

c#,syntax-error,sqldatareader

There is an error in your SQL statement. You should change string query = "SELECT * FROM dbo.ispiti WHERE [email protected], [email protected], [email protected]"; to string query = "SELECT * FROM dbo.ispiti WHERE [email protected] AND [email protected] AND [email protected]"; ...

error CS1729: The type `ARSoft.Tools.Net.Dns.DnsServer' does not contain a constructor that takes `4' arguments

c#,github,visual-studio-2013,dns,syntax-error

The code here looks like the DnsServer takes those 4 arguments. Are you sure you have the correct binaries? How did you install? If you are using the codeplex version then it doesn't look like it take a ProcessQuery parameter....

Why does 00.0 cause a syntax error?

javascript,numbers,syntax-error

The expressions 0.0 and 00.0 are parsed differently. 0.0 is parsed as a numeric literal 1 00.0 is parsed as: 00 – octal numeric literal 2 . – property accessor 0 – identifier name Your code throws syntax error because 0 is not a valid JavaScript identifier. The following example...

Syntax error: Invalid table specification

java,sql,sql-server,syntax-error

Couldn't find a query that works on multiple tables, so I queried the data in each table and saved it to my local server and the used the query above and it worked fine.

The equivalent C code of a valid C++ code with a While loop does not compile

c++,c,while-loop,syntax-error

In C++, a condition is tested for before each iteration of a while loop. Verbatim from the C++ reference: condition - any expression which is contextually convertible to bool or a declaration of a single variable with a brace-or-equals initializer. This expression is evaluated before each iteration, and if it...

Update Statement with Inline SQL

sql,sql-server,sql-server-2008,syntax-error

You should escape your interpolated varchar variable @vector with single quotes and use insert instead of update statement: set @sql = 'insert into #Test ' + 'values (coalesce(''' + @vector + ''', ''''))' SQLFiddle...

Javascript Error: SyntaxError: missing ; before statement

javascript,syntax-error,mysql-connector

in Javascript you don't declare variables using type, but using var: var conn = null, stmt = null, rset = null; ...

I got an SQL error, trying to insert a form to the database

php,mysql,syntax-error,sql-insert,mysql-error-1064

You cannot have a dash (-) in your column identifier unless you wrap it in ticks. Otherwise it is seen as a subtraction operator: INSERT INTO submittedforms (firstname, lastname, email, `youtube-v`, `youtube-c`, `portfolio-link`, `picture-link` It is best practice to not use dashes in your identifiers. You should use an underscore(_)...

Time's Tables Quiz (Error)

c,if-statement,syntax-error,expression

Your code has various syntax errors (If instead of if, semicolon after if-condition). Additionally, your code has a logical problem where you read an int and then compare against a string. This version works and is properly indented: #include <stdio.h> int main (){ int answers_eight[] = {8,16,24,32,40,48,56,64,72,80,88,96}; int answer ;...

Unexpected Symbol in As Formula, Can't Find

r,string,text,syntax-error,formula

The <text>:2:10080 is giving you the location of the error. 2nd line, 10080th character. Consider: parse(text="1 + 1 + 2\n a - 3 b") # Error in parse(text = "1 + 1 + 2\n a - 3 b") : # <text>:2:8: unexpected symbol Here, the error is with b, which...

Syntax error on return

python,return,syntax-error

You are missing a closing parenthesis on the preceding line: result = factorial(n) / (factorial(k)*factorial(n-k) # ^ ^ ^ ^ ^? # 1 2 2 2 21 ...

How to properly use autoincrement

sql,syntax-error,h2

Original answer: Could you create the table like this instead? Note the use of IDENTITY... create table if not exists account( userAccID IDENTITY, userAccName VARCHAR(20) NOT NULL, userIP VARCHAR(16) NOT NULL DEFAULT '-1', userEmail VARCHAR(64) NOT NULL DEFAULT '-1', userPasswd VARCHAR(64) NOT NULL DEFAULT '-1', userPremium INT NOT NULL DEFAULT...

Correct source code, but I got parse error: syntax error, unexpected '}' [duplicate]

php,apache,xampp,syntax-error

This is likely because short_open_tag is disabled when you test locally. This setting controls whether or not <? ?> among other tags are interpreted as PHP during parsing. The result is that this block: <? $fields = array("email", "pass"); for ($i=0 ; $i<count($fields) ; $i++) { if ($form->Error($fields[$i]) != "")...

subtracting from multiple variables at a time

python,variables,syntax-error

Just move them to two separate lines if minutes >= 60: hours += 1 minutes -= 60 From PEP 8 Compound statements (multiple statements on the same line) are generally discouraged. For the sake of completeness, I will tell you that you can add ; to terminate a statement, so...

Perl “use: command not found” when run from bash script

linux,bash,perl,syntax-error,use

As has been told in the comments, your script for some reason is getting executed via shell. You can study why it is so and fix it. Or you can work around using the following trick: #!/usr/bin/perl eval 'exec /usr/bin/perl "$0" "[email protected]"' if 0; # not running under some shell...

Generics error syntax Java 1.7 on generics function

java,generics,compiler-errors,syntax-error

It's required by the Java Language Specification. MethodInvocation: MethodName ( [ArgumentList] ) TypeName . [TypeArguments] Identifier ( [ArgumentList] ) ExpressionName . [TypeArguments] Identifier ( [ArgumentList] ) Primary . [TypeArguments] Identifier ( [ArgumentList] ) super . [TypeArguments] Identifier ( [ArgumentList] ) TypeName . super . [TypeArguments] Identifier ( [ArgumentList] ) The...

Escape single quotes in JDBC (getting error: You have an error in your SQL syntax …)

java,mysql,jdbc,syntax-error,quotes

To use prepared statements correctly, you need to use parameter placeholders (?) and set the values on the statement. This will automatically give you protection against SQL injection. You need to change your code to: String sql = "INSERT INTO posts VALUES (?, ?)"; try (PreparedStatement statement = conn.prepareStatement(sql)) {...

Parse error: syntax error, unexpected '<' PHP [duplicate]

php,syntax-error

echo '<a href="?page_id=26" class="get_quote">get quote</a>'; ...

IDLE returning syntax errors for no reason that I can discern

python-3.x,syntax-error

After removing those (error) markers, there are two actual syntax errors in your script: Missing closing parens ) in for var in range(length(list2): Assignment = instead of equality check == in if count = length(list2): Apart from that, there are some other issues, but those are not syntax errors: Should...

comment lines with syntax error

eclipse,syntax-error,keyboard-shortcuts

There is no one short cut to do what you require, but you could use a combination. Windows Short Cuts Go to the next error: Ctrl + . Go to the previous error: Ctrl + , Then Comment that error: Ctrl + / Extra If you really wanted you could...

Android Sqlite Syntax error new “foo”

android,sqlite,login,syntax-error

Replace this code: String selectQuery = "SELECT id FROM " + TABLE_USER + " WHERE " + KEY_EMAIL + " & " + KEY_PASSWORD+ " =?" + email + password; Log.e(LOG, selectQuery); Cursor c = db.rawQuery(selectQuery, null); By this one: String[] columns = {KEY_ID}; String where = KEY_EMAIL+"=? AND "...

Strange Syntax Error MySQL Error when using PHP [closed]

php,mysql,syntax-error

You're using + to concatenate strings, that doesn't work in PHP. You have to use .. There is probably some strange arithmatic going on that produces 103.5, like 2.5 + "," + 100. Where "," is converted to int(1) or something....

Sending data to rails controller without saving in database

ruby-on-rails,ajax,syntax-error

The syntax error is in the url param of the Ajax method. You are missing closing ")".

Getting error “Incorrect syntax near '-' ” while executing Stored Procedure

sql-server,stored-procedures,syntax-error

When handling dates in this way you will need to encapsulate them in quotation marks! It's failing to identify the type of data that you have and believes that you are sending a string.

Syntax error ( missing operator ) in query expression of

sql,syntax-error,ms-access-2010

Problem is that your table names include space and so query parser/engine taking it as two different literal names. You should escape them using []. Also, notice that I have used table alias (am,cp,ae) for ease of reading. Your query should look like SELECT am.* FROM [Archivo Maestro] am INNER...

python if statement inside for syntax error

python,if-statement,syntax-error

if statement is indented inwards in for loop. And also = means assignment use == instead for item in data_indices: flag= search_object(item,data,obj_value_min,obj_value_max) if flag == True: #here indent this if one step back file_writer.write('frame0: ' + str(item[0]+1)+' ' + str(item[1]+1) + '\n') ##He ...

Cant find mySQL request error

mysql,sql,syntax-error

group is a reserved keyword in MySQL and needs to be escaped by backticks. SELECT * FROM diploms LEFT JOIN student ON diploms.student_id = student.student_id LEFT JOIN `group` ON student.group_id = `group`.group_id LEFT JOIN speciality ON `group`.speciality_id = speciality.speciality_id ORDER BY CASE WHEN speciality.name IS NULL THEN 1 ELSE 0...

VBA Run-time error 3075

access-vba,syntax-error,runtime-error

Most probably the error is because of spacing issue in your query. You need a space as shown below & " FROM tbl_Contacts " _ ^---- Here Otherwise, your query string looks like SELECT TOP 1 tbl_Contacts.ID, tbl_Contacts.idSite, tbl_Contacts.role, tbl_Contacts.name, tbl_Contacts.email, tbl_Contacts.phone, tbl_Contacts.involvement, tbl_Contacts.TakenFROM tbl_Contacts ^-- ERROR Here ...

How to print a string followed by the result of a function in Python

python,syntax-error

Use the format() string method: print "Your total trip cost is: {}".format(trip_cost(city, days, spending_money)) ...

expected specifier-qualifier-list in C

c,compiler-errors,syntax-error

The compiler doesn't know that che is a type.Include the appropriate header file. OR As you know,The compiler parses the file from top to bottom.Make sure a type is defined BEFORE using it into another....

Unexpected Token ILLEGAL on Javascript For Loop

javascript,html,css,for-loop,syntax-error

You really have an illegal character after the last curly brace, see what i got copy-pasting that code on jsfiddle, notice the red dot. button[i].innerHTML = i; }​* Open that file with another editor, e.g. vim an check for weird characters with :set list....