FAQ Database Discussion Community


Unexpected Symbol in As Formula, Can't Find

r,string,text,syntax-error,formula
I've been using as.formula for setting up a glm, and I can't figure out where the unexpected symbol is. Part of the problem is that the character vector I'm converting is so long. It's about 700 words with + inserted in between in order to turn it into a formula....

Access database syntax error in update into statement

c#,database,ms-access,syntax-error,insert-update
First of all I know password is a reserved type of Access Database. But I have read a post that you can put [password] like that and it will work. But its not working. I have tried many ways and still, I hope that some one will help. OleDbCommand cmd...

Time's Tables Quiz (Error)

c,if-statement,syntax-error,expression
HELP NEEDED :D So trying to embark on making a time's tables quiz for my brother.Very new to coding so trying to do it as simple as possible but really stuck. Any help would be awesome Basically I keep getting this error [ In function 'main': Line 17: error: expected...

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

python,tkinter,attributes,syntax-error,trackback
from tkinter import * def Exit(): print() def newClassResults(): #assigns variable to an input so it can be reffered to later amount = int(input("How many people would you like to add? ")) #starts for loop for counter in range(amount): #assigns inputto a variable called 'newName' newName = input("\nEnter the new...

Plone - Syntax Error when doing hello world tutorial

syntax-error,plone
I am following this "hello world" tutorial on plone.org But I stuck in one moment due to error: [email protected]:~/Plone/python_dev/env-27# cd hello_world [email protected]:~/Plone/python_dev/env-27/hello_world# ../bin/python bootstrap.py Traceback (most recent call last): File "bootstrap.py", line 70, in <module> exec urllib2.urlopen(setup_url).read() in ez File "<string>", line 1 <!DOCTYPE html> ^ SyntaxError: invalid syntax I...

Getting error: class, interface, or enum expected… everything seems to be declared properly not sure why it's happening

java,syntax-error
import java.util.Random; /** Generate 10 random integers in the range 0..99. */ public final class RandomInteger { public static final void main(String... aArgs){ System.out.println("Generating random number"); //note a single Random object is reused here Random randomGenerator = new Random(); int randomInt = randomGenerator.nextInt(1000000); int randomInt2 = randomGenerator.nextInt(1000000); System.out.println("generated " +...

Python Syntax error: blank space

python,syntax-error
I am new to python, this code is meant to print out the top 100 frequent words in file MusicTaste.csv and print it in a table. I've solved past syntax error, but have never seen this error before. Please see code below import re from collections import Counter from prettytable...

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

c++,oop,interface,syntax-error
Using: VS2010 : New Project -> Windows32 Console App -> Empty Project Language: C++ Problem: I'm attempting a simple interface test with two classes that implement the interface through the 1 virtual method. I also attempt to use constructors within those two classes to set default values. The main problem...

Syntax Error JSON file read with AJAX

ajax,json,syntax-error
I am getting a syntax error for the square bracket '[' from my JSON file. Given below is the JSON. [ { "Product Name":"CPE 10281", "Application":"Tyres", "Weight":150, "Cost to Produce":5000, "Grade":"A", "Cost to Sell":40000, "Strength":100 }, { "Product Name":"CPE 10282", "Application":"computers", "Weight":250, "Cost to Produce":4000, "Grade":"H", "Cost to Sell":25000, "Strength":90...

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

php,mysql,syntax-error
I'm having a few issues as I'm new to MySQL and a PHP novice. On submissions of my form if I use the INSERT command it works fine. If I change the command to UPDATE, it can't find the 'ID' to update. I've replaced the WHERE ID with the exact...

EXPLAIN in postgresql not working

sql,postgresql,syntax,syntax-error,explain
I have the following SQL code but it's not working, it says syntax error: EXPLAIN DROP TABLE cool_table Does anyone know why? Edit: I wrote this because I was taught to always use EXPLAIN before running a query on the database to avoid running a task that's too much for...

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
I'm trying to compile a code taken from github. My understanding of Visual Studio or C# is pretty basic. Can anybody please help me with the error? Github source: github.com/slothbag/NxtHypeDns Source file link: github.com/slothbag/NxtHypeDns/blob/master/NxtHypeDns/Program.cs Error screenshot: http://i.imgur.com/KE8En7s.jpg Thanks...

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

java,initialization,syntax-error
This question already has an answer here: Illegal forward Reference java issue 4 answers I found happening with the following code made my jaw drop: public class MCVE { { // instance initializer System.out.println(test); // cannot reference a field before it is defined System.out.println(this.test); } private final String test...

Syntax Error on using DECLARE and prepared statement inside CREATE PROCEDURE

mysql,stored-procedures,syntax-error,prepared-statement
I am trying to work with MySQL prepared statements inside of a stored procedure. I have been trying to debug this CREATE code for a couple of hours, now frustrated. DELIMITER // DROP PROCEDURE IF EXISTS doSomething// CREATE PROCEDURE doSomething(IN tblname CHAR(32)) BEGIN DECLARE str1 TEXT DEFAULT ''; SET str1...

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

python,exception,python-3.x,exception-handling,syntax-error
This question already has an answer here: In Python, what's the difference between 'except Exception as e' and 'except Exception, e' [duplicate] 3 answers I want to use Argument of an Exception to show additional information while an error occur in my code. Here is my code. ArgumentOfAnException.py from...

cannot invoke get int on the array type comparable[ ]

java,arraylist,duplicates,syntax-error
I'm writing a method for finding whether an array has duplicates. I ran into some problem with the equals method, error at the bold line. Any adjustments I can make? Here's some of my partial code: public boolean duplicate(){ for (int i=0; i<data.length; i++){ for (int j=i+1; j<data.length; j++){ **if...

Android Sqlite Syntax error new “foo”

android,sqlite,login,syntax-error
I have checked stackoverflow for this but i still haven't found an answer that worked for me. I trying to create a user login via sqlite and i keep getting this error from the logcat, 03-11 16:19:57.767: E/com.asmaushaheedah.database.DatabaseHelper(25118): SELECT id FROM user WHERE email & password [email protected] hello 03-11 16:19:57.767:...

VBA Run-time error 3075

access-vba,syntax-error,runtime-error
I'm trying to write an SQL query in VBA but it's not working. Not sure why, its a simple SELECT query. Below is my SQL query: strSQLPharmContact = "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.Taken" _ & "FROM tbl_Contacts " _ & "WHERE (((tbl_Contacts.role)= 'Pharmacist') AND...

Stored Procedure for insert

sql-server,stored-procedures,datatable,syntax-error,sql-insert
I am taking a datatable as parameter in my stored procedure and I am trying to insert a few of its column in one of the database tables but I don't know the correct syntax. This is what I have tried ALTER PROCEDURE [dbo].[spInsertInvoice] @tblInvoice [TypeExcel] READONLY AS BEGIN SET...

Syntax error when moving Wordpress Site

php,sql,wordpress,wordpress-plugin,syntax-error
I recently tried to migrate a Wordpress site from a development server over to a live server. I moved all the contents of the site, imported the database and connected the database via the wp-config file. Unfortunately however I am getting the error... Parse error: syntax error, unexpected 'if' (T_IF)...

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

linux,bash,perl,syntax-error,use
I have a Perl script Info.perl which starts like this #!/usr/bin/perl #!/usr/bin/bash use List::Util qw( min max ); use List::MoreUtils qw{ all any }; use Cwd; use Data::Dumper qw(Dumper); use Env qw(INFODIR CONFDIR PROCDIR); And when I run it from the terminal it gives no problem and works as expected....

python postgresql insert error while adding SEQUENCE for auto increment

python,postgresql,insert,syntax-error,sequence
Below is mainly everything that is dependent authorname="samuel" bugid=1222 filename="mila.txt" conn = None; cursor = None; conn = pg8000.connect(database="postgres", user="postgres", password="root", host="localhost") cursor = conn.cursor() def createTables(): cursor.execute("CREATE SEQUENCE FILE_id_seq") cursor.execute("CREATE TABLE FileTable(ID INT UNIQUE NOT NULL DEFAULT NEXTVAL('FILE_id_seq'), filename varchar(250) NOT null UNIQUE )") cursor.execute("CREATE SEQUENCE Author_id_seq") conn.commit() return...

Bison:syntax error at the end of parsing

syntax-error,bison
Hello this is my bison grammar file for a mini-programming language: %{ #include <stdlib.h> #include <stdio.h> #include <math.h> #include "projectbison.tab.h" void yyerror(char const *); extern FILE *yyin; extern FILE *yyout; extern int yylval; extern int yyparse(void); extern int n; int errNum = 0; int forNum = 0; %} %left PLUS...

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

python,syntax-error
I have a function trip_cost which calculates the total cost of a vacation. If I want to print the result of the function I can do so without problem like so: print trip_cost(city, days, spending_money) However if I try to code a more presentable, user-friendly version using a string I...

Display only future database records with MySQL

php,mysql,sql,datetime,syntax-error
I am trying to display only records two weeks in advance from the current date onwards. starttime is stored as a datetime data type in the database. I have this, SELECT id, date_format(starttime, '%d-%m-%Y %H:%i') AS formatted_start, date_format(starttime, '%Y-%m-%d') AS formatted_date, date_format(endtime, ' %H:%i') AS formatted_end FROM timedates WHERE user_id...

Unknown compiling error java

java,compilation,syntax-error
I have been going through some online exercises in Java, and I can't figure out why this tid-bit of code won't compile. I am forgetting something obvious I know it. import java.util.Scanner; class age { public static void main (String[] args) { Scanner keyboard = new Scanner (System.in); int age;...

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

php,apache,xampp,syntax-error
This question already has an answer here: PHP Parse/Syntax Errors; and How to solve them? 10 answers Now I am trying to set up a local mirror of a website. I have whole database and source code of this website. The website runs smoothly in the server, but when...

SQL Server syntax error when joining CTEs

sql,sql-server,select,join,syntax-error
I am using SQL Server 2014 and I am having trouble with my SQL query below. It seems that there is a syntax error somewhere but I just can't find it. I am joining two select queries from two separate views, namely ReservationList and ARACCOUNT. USE MyDatabase ;WITH q1 AS...

how to write delegate with 2 parameters

c#,delegates,syntax-error
This should be a simple question with hopefully a simple answer. I am trying to write a delegate that takes 2 parameters but the compiler does not accepts it. When I use one parameter it works, example : var addCar = new Action<string>(number => { } ); but when I...

PHP redirection not working on login page

php,session,header,syntax-error,session-variables
I have created a login.php page and used php code to check the credentials from database. If the entered credentials are incorrect it shows the error (thats perfect). But if the entered credentials are correct, it do not redirect to the index.php page. Kindly check the php code of login.php:...

SQL trimming syntax error

mysql,sql,syntax-error,trim
I've just finished 'SAM's Teach Yourself SQL in 24 Hours' book, and I've been given the task of listing which of our active site's "site_code" match their respective "site_path"s with the prefix '/var/www/html' removed. I've been stuck for the past hour or so trying to figure out what I'm doing...

python if statement inside for syntax error

python,if-statement,syntax-error
I wrote some code but I can't get why the pyscripter is telling a syntax error in the if statement: #search for 9 elements file_writer = open('C:\\PythonProject2\\commands_NUM.txt','w') for item in data_indices: flag= search_object(item,data,obj_value_min,obj_value_max) if flag = True:###ERROR file_writer.write('frame0: ' + str(item[0]+1)+' ' + str(item[1]+1) + '\n') ##Here is the syntax...

Parentheses in string of javascript function call

javascript,jquery,syntax-error,parentheses
I have a loop that creates links with a javascript function call in the onClick events and uses the text returned from a database as one of the parameters. My issues I am having is that sometimes this text being returned has parenthesis in them which is causing a syntax...

Syntax error: Invalid table specification

java,sql,sql-server,syntax-error
While retrieving data from Sage 50 i get this error. I googled it but I can't find anything. Logically I thought that my table names where wrong in my SQL query but I think they are not. I can't see the database because it's an external program. The error is:...

subtracting from multiple variables at a time

python,variables,syntax-error
So recently I've ben interested in learning python, and I got the "Think python" last Christmas. Unfortunately I haven't had the time to really get into it because of my exams. Even though I the book was written for python 2 I decided to use python 3.4.3 anyway. This does...

expected specifier-qualifier-list in C

c,compiler-errors,syntax-error
When I tried to compile the below code I get the above error mentioned, I don't know the cause of it and how to rectify it.Please explain me what is my mistake and suggest me a way to rectify it. #include<stdio.h> #include<stdlib.h> int main() { FILE *f1,*f2; int i,j,k; int...

Android SQLiteDatabase Insert Syntax Error

syntax-error,android-sqlite,sql-insert
I've searched around and found people with similar issues, yet not quite the same. I'm receiving an SQLite syntax error, but I cannot locate the bad syntax. Please help! I created an SQLite Database in DatabaseAdapter.java, seen here: static class DatabaseHelper extends SQLiteOpenHelper{ private static final String DATABASE_NAME = "mealdatabase";...

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

html,console,syntax-error,token
Can anyone help me find this unexpected token? I've been looking at this code for a while so maybe i need a fresh pair of eyes to solve this. see HTML code below: <div class="list-view hide"> <table class="custom-reports-table"> <script id="custom-reports-table" type="text/javascript"> <tbody> {{#each listItem}} <tr class="row" id="{{itemId}}"> <td class="select-container"> <div...

Update Statement with Inline SQL

sql,sql-server,sql-server-2008,syntax-error
This syntax keeps giving me an invalid column. All I want to do is insert the value into the table. How should I change my syntax to make it possible? This is the error presented. Msg 207, Level 16, State 1, Line 1 Invalid column name 'Alpha12'. Code: Declare @vector...

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

php,syntax-error
This question already has an answer here: Reference - What does this error mean in PHP? 28 answers I have this code: <p class="test"> <?php $button_value = get_field('button_name'); echo $button_value; if($button_value==1) { <a href="?page_id=26" class="get_quote">get quote</a> } ?> </p> This is the error: Parse error: syntax error, unexpected '<'...

near “when”: syntax error in VHDL

syntax-error,vhdl,tri-state-logic
I'm trying to write some code to simulate a circuit with two tri-state buffers and a pull-up resistor in VHDL. Below is my code: library ieee; use ieee.std_logic_1164.all; entity PullUpResistor is port ( A, S, B, T : IN std_logic; -- select one of these four inputs TriOut : OUT...

Compiler error “name in formal parameter list illegal”

c,header,syntax-error,missing-data
I am writing a program in C, and I have some errors which I don't understand. Here is my main: #include "res.h" #include <stdio.h> #include <conio.h> int main(){ Kitchen List; char *name = "Productname"; float price = 5.6, qwan = 4; List.head = NULL; CreateProduct(name, price, qwan, &List); getch(); return...

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

php,mysql,syntax-error,sql-insert,mysql-error-1064
I have no idea of what i am doing wrong. I'm trying to insert a form, to my table. Insert failed: (1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-v, youtube-c, portfolio-link,...

syntax error : missing ')' before 'constant'

c,compiler-errors,macros,syntax-error,c-preprocessor
I have some syntax problems that I don't know how to fix. I'm trying to build some functions to matrix, can someone help me resolve those problems? 1>c:\documents and settings\one\my documents\visual studio 2010\projects\hw3\hw3\q2.c(11): error C2143: syntax error : missing ')' before 'constant' 1>c:\documents and settings\one\my documents\visual studio 2010\projects\hw3\hw3\q2.c(11): error C2143:...

Unable to start activity Error: NullPointerException in onCreate

java,android,nullpointerexception,syntax-error
when I click on product ListView to see product datail have error! NullPointerException FragmentAllShop.java onClick listview item will go to detail page @Override public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) { int detailshop_id = model.getShop_id(); String shopID = String.valueOf(detailshop_id); Toast.makeText(FragmentAllShopping.this.getActivity(), "Select shopping_id: "+detailshop_id, Toast.LENGTH_SHORT).show(); Intent shopDetail =...

Syntax Error for variable name [closed]

python,syntax-error
I'm getting an unexpected syntax error total = homework + quizzes + tests ^ SyntaxError: invalid syntax I have absolutely no idea why that line is in error. Furthermore, and I'm very curious about this, my text editor (Sublime 2) leaves variable names unchanged in color, however when I type...

PHP Session Errors and Warnings [duplicate]

php,session,syntax-error,warnings
This question already has an answer here: How to fix “Headers already sent” error in PHP 12 answers I am trying to check whether a user is logged in or not on the index.php page. If user is not logged in I want to redirect the user to login.php...

syntax error can't pinpoint the bug in javascript

javascript,syntax-error
I continue to receive a syntax error and can't figure out why, please help. alert ("CAN YOU BEAT VALERIE AT ROCK PAPER SCISSORS?"); var userChoise = prompt ("Rock, Paper, Scissors"); var computerChoice = Math.random(); if (computerChoice < 0.34) { computerChoice = "rock"; } else if (0.34 >= computerChoice < 0.67)...

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

c++,c,while-loop,syntax-error
The following code containing a while loop compiles in C++. #include <iostream> using namespace std; int main() { while (int i = 5) { break; } return 0; } However, the following equivalent C code results in an error if compiled in C: #include <stdio.h> int main() { while (int...

Using to_json gives me illegal character

ruby-on-rails,json,syntax-error,illegal-characters,to-json
I passed a ruby variable to javascript using the to_json method, but the console returns me an error saying "SyntaxError: illegal character" for the following line: var home = #{@home.to_json}; Does anyone knows whats wrong?...

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

java,mysql,jdbc,syntax-error,quotes
I'm trying to insert data into mysql using jdbc. I have something like this: Connection conn = DriverManager.getConnection(urlDB, userDB, passwordDB); String postTitle = "Post title"; String postContent = "A Linux's distributions"; String sql = "INSERT INTO posts VALUES ( '"+postTitle+"', '"+postContent+"')"; PreparedStatement statement = conn.prepareStatement(sql); statement.executeUpdate(); conn.close(); But I'm getting...

Using Order By in IN condition

sql,oracle,syntax-error
Let's say we have this silly query: Select * From Emp Where Id In (Select Id From Emp) Let's do a small modification inside IN condition by adding an Order By clause. Select * From Mail Where Id In (Select Id From Mail Order By Id) Then we are getting...

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

syntax,go,syntax-error
The following Go code runs OK: package main import "fmt" func main() { if j := 9; j > 0 { fmt.Println(j) } } But after adding parentheses in condition: package main import "fmt" func main() { if (j := 9; j > 0) { fmt.Println(j) } } There is...

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

oracle,syntax-error
I need to add a new record in my database or update it if it is already present. I have used the IF else clause. I have a SQL query for my oracle database as below : DECLARE EXISTS number; BEGIN SELECT count(*) INTO EXISTS FROM reports WHERE report_id=27; IF(EXISTS...

Why does 00.0 cause a syntax error?

javascript,numbers,syntax-error
This is weird. This is what happens at the JavaScript console in Chrome (version 42.0.2311.135, 64-bit). > 0 < 0 > 00 < 0 > 0.0 < 0 > 00.0 X Uncaught > SyntaxError: Unexpected number Firefox 37.0.2 does the same, although its error message is: SyntaxError: missing ; before...

Code academy error (confused) ^^

javascript,syntax-error
I would like to know why this code gives the message: SyntaxError: unexpected token else. 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{ return("paper wins"); }else if(choice1==="paper"){ if(choice2==="rock"){ return("paper wins"); } } } };...

Visual Basic Input Error Messages [closed]

visual-studio,error-handling,syntax-error,basic
I'm currently working on a project and I need some example VB input error messages. It has been a long time since I have dealt with VB and I was wondering if anyone would mind sending some screenshots of input error messages? Such as and arithmatic overflow error message. Cheers...

Syntax error ( missing operator ) in query expression of

sql,syntax-error,ms-access-2010
I have a table in Access 2010 and I want to make a kind INNER JOIN query from several tables I do is the following: SELECT * FROM (Archivo Maestro INNER JOIN Concepto Presupuestal ON Archivo Maestro.ID Concepto Presupuestal = Concepto Presupuestal.ID Concepto Presupuestal) INNER JOIN asunto_estrategico ON Archivo Maestro.ID...

comment lines with syntax error

eclipse,syntax-error,keyboard-shortcuts
I am using Eclipse Java EE IDE for WebDevelopers in Version Luna (4.4.2). Is there any way to comment lines with syntax error via shortcut automatically? I mean not just CTRL + / on every line (with syntax errors) manually. ...

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

c++,templates,syntax-error
If I take the address of a right shift operator and pass it as a template parameter, the right shift symbol is being misread as the end of the template parameter list, and the resulting confusion is causing multiple errors. template <class T, void(T::*)(int)> struct TemplateMagic {}; struct TestStruct {...

syntax error on #pragma kernal Main

unity3d,syntax-error,shader,compute-shader
I have the following shader: #pragma kernal Main [email protected]<float4>Reult; [numthreads(8,8,1)] void Main (uint3 id:SV_DispatchThreadID) { Result[id,xy]=float4(id.x & id.y, (id.x & 15)/15.0, (id.y & 15)/15.0, 0.0); } in unity. However this creates the error "Shader error in ":Parse error: syntax error at line 1" //that is #pragma kernal Main I have...

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

vb.net,syntax-error
Every time i run my program it keeps popping up with - Syntax error (missing operator) in query expression 'Runner Name'. 'Runner name' is a field name within my database. And the line with da.Fill(dt) gets highlighted. Can someone please help. I'm desperate Public Class AddNewRace Dim cnn As New...

What is wrong with this INSERT MAX+1 query?

mysql,insert,syntax-error
I'm having problem with this query: INSERT INTO invoices(invuid, linenumber) VALUES (?, SELECT(SELECT max(linenumber)+1 FROM invoices WHERE invuid=?)) It keeps saying: "General error: 1093 You can't specify target table 'invoices' for update"...

Uncaught SyntaxError: Unexpected end of input line 1

javascript,jquery,syntax,syntax-error
Hi there I am trying to figure out what is going wrong. I am getting the error Uncaught SyntaxError: Unexpected end of input in line 1 which is var itemList = new Array(); A snippet of the code is included var itemList = new Array(); $( document ).ready(function(){ var $newItem...

Include, Require a syntax error file

php,include,syntax-error,require
I would like to ask can I require/include a file that has syntax errors and if I cant, the require/include returns a value so that I know that the required/included file has syntax errors and cannot be required/included ? file.php has syntax error include('file.php') if (not file.php included because of...

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

php,syntax-error,constants
This question already has an answer here: Reference - What does this error mean in PHP? 28 answers I'm having this kind of Error stated below, I don't understand completely about it. If I press upload button without selecting files! Notice: Undefined index: $error in C:\wamp\www\btb_sandbox\upload_2.php on line 35...

Unexpected Token ILLEGAL on Javascript For Loop

javascript,html,css,for-loop,syntax-error
I'm attempting to write a simple randomizer that will randomly set group's background position individually. HTML: <div class="button"></div> <div class="button"></div> <div class="button"></div> <div class="button"></div> <div class="button"></div> <div class="button"></div> <div class="button"></div> <div class="button"></div> <div class="button"></div> <div class="button"></div> CSS: .button{ width: 100px; height:...

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

php,syntax,syntax-error
I'm new to php. Got this from a tutorial; for some reason it sends me an error $fields_with_lengths = array('menu' => 30); foreach ($fields_with_lengths as $fieldname => $maxlength){ if(strlen(trim($_POST[$fieldname])) => $maxlength){ } } ...

Generics error syntax Java 1.7 on generics function

java,generics,compiler-errors,syntax-error
Using Java 1.7 compiler, it is interesting to note that the syntax accepted to call generic functions is very particular. It forces you to use this to refer to the generic function. For example for a function defined as: private <T> Object genericFunction(T t){ //function code } When referring to...

Contradictory Error Messages - Operator Overloading <<

c++,operator-overloading,syntax-error,friend
Problem Depending on how I write a function in my class, I get one of 2 contadictory error messages when trying to overload the << operator as a friend of my class. The error messages are as follows: // With two arguments (engine.cpp) error: 'std::ostream& game::GameEngine::operator<<( std::ostream&, const Engine& )'...

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

python,python-2.7,printing,syntax-error
This is some really basic code I have to complete for a programming class of mine I'm stuck here I get a print syntax error although I'm about 99% sure the format to print something in python 2.7.9 is print "text here". Please help google searches currently to no avail...

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

sql-server,stored-procedures,syntax-error
I have successfully created a stored procedure using two input parameters and two output parameters. when I executed this procedure, I'm getting an error Incorrect syntax near '-' near the first parameter. ALTER PROCEDURE [dbo].[Agent_interactions_report] ( @StartDate date, @EndDate date, @ERRORCODE AS INT OUTPUT, @ERRORDESCRIPTION AS VARCHAR(4000) OUTPUT ) AS...

Why does this MySQL query spill over to the next line

mysql,sql-update,syntax-error,sql-injection
The input would come in from a web form, and I am attempting an SQL injection via the form. In the password field, I attempt to put a single quote just to see what sort of error is invoked at the back end. I run this same query manually at...

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

syntax-error,ruby-on-rails-4.2
I'm new to programming and I have this problem that I can't find an answer for - I've saved an update in sublime and haven't been able to connect to http://localhost:3000 (on OS X 10.9.5) I keep getting a syntax error when I try to restart the server or migrate...

Cant find mySQL request error

mysql,sql,syntax-error
Rediculous but I cant find error in this request 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 END), speciality.name ASC But SQL...

Strange Syntax Error MySQL Error when using PHP [closed]

php,mysql,syntax-error
I've got an syntax error near line 1 somewhere in this code: //... $nr = 126; $expl = "'test'"; $da = "'2003-12-01'"; $tax = 2.5; $cost = 100; //Here is the error $sql = "INSERT INTO tbl (type, nr, explan, date, tax, cost) VALUES('Example'," + $nr + ",'"+ $expl +...

Checking, if optional parameter is provided in Dart

syntax,dart,syntax-error,questionmark
I'm new to Dart and just learning the basics. The Dart-Homepage shows following: It turns out that Dart does indeed have a way to ask if an optional parameter was provided when the method was called. Just use the question mark parameter syntax. Here is an example: void alignDingleArm(num axis,...

Error in SQL Syntax related to 'RANDOM ACCESS MEMORY'

mysql,mysqli,syntax-error
I've been trying to insert data into a database using this code, but an error came out like this: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'RANDOM ACCESS MEMORY' -RAM-','DDR1 RAM')' at...

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

ios,xcode,swift,syntax-error
Here's my code (TaskManager.swift): import UIKit var taskMgr: TaskManager = TaskManager () struct task { var name = "untitled" var desc = "none" } class TaskManager: NSObject { var tasks = task[]() func addTask (name: String, desc: String) { tasks.append (task (name: name, desc: desc)) } } then I got...

JavaScript Syntax Error or More?

javascript,syntax-error,feedback
I am an extremely new (read as three hours old) amateur with JavaScript so I have an extremely low level question. However I thought it would offer a great chance to explore this stackoverflow community. I have run through approx 50% of the CodeAcademy JavaScript intro and just finished the...

Getting “Incorrect syntax near”-error with SqlDataReader

c#,syntax-error,sqldatareader
I'm getting error and I don't know what's wrong with the code, so If anyone can help me I would be grateful. Error: Incorrect syntax near ','. and the highlighted line is rdr = cmd.ExecuteReader(); Code: cn.Open(); string query = "SELECT * FROM dbo.ispiti WHERE [email protected], [email protected], [email protected]"; SqlCommand cmd...

Learn Python the Hard Way Ex26: Not Getting Expected Result

python,python-2.7,syntax-error
def break_words(stuff): """This function will break up words for us.""" words = stuff.split(' ') return words def sort_words(words): """Sorts the words.""" return words.sort() def print_first_word(words): """Prints the first word after popping it off.""" word = words.pop(0) print word def print_last_word(words): """Prints the last word after popping it off.""" word...

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

ruby-on-rails,ruby,terminal,syntax-error,rake
When I enter rake db:seed in terminal, I receive: SyntaxError: /Users/-/src/-/db/seeds.rb:17: syntax error, unexpected '\n', expecting => Tasks: TOP => db:seed ...where db/seeds.rb has: Category.create(kind: 'Food/Drink') #line 9, everything above is commented out Category.create(kind: 'Entertainment') Category.create(kind: 'Organization') Category.create(kind: 'Business') Category.create(kind: 'Collegiate') Location.create(area: 'Downtown NB') Location.create(area: 'College Ave', Location.create(area: 'Cook/Douglass') #line...

Syntax error on return

python,return,syntax-error
There's the following code I'm trying to get running that returns a syntax error on line 10's "return". I also tried removing that part (making the code of course not working) and it returned an error on the print shortly after, so I'm mostly sure there's a problem there that...

PHP Error in Contact Form? [duplicate]

php,forms,syntax-error
This question already has an answer here: PHP: “Notice: Undefined variable” and “Notice: Undefined index” 11 answers I am trying to create a contact form that sends an email to my email account(Google). I found a nice tutorial, copied the code and replaced some of it with what I...

When inverting Vector3 value compiler complains about Syntax

c#,vector,syntax-error,expected-exception
Today im struggling with vectors, and im having problems with this. I have to invert the Y vector value but everytime i compile , Compiler complains about: Syntax error ',' expected vector = new Vector3((float) ((-256 + ((iD & 7) * 0x40)) + 0x20), (float) ((-512 + ((iD / 8)...

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

mysql,sql,syntax-error
Compare Timestamp pubDate = rs.getTimestamp("pubDate"); with all other Timestamps in table by this query: get * from items where pubDate<? Throws the error: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'get...

Bash Script: syntax error near unexpected token `else'

bash,syntax-error
I'm trying to create simple script to check whether my external ip address has changed. However, I keep getting the following error: syntax error near unexpected token `else' This is my code: #!/bin/bash DESTDIR=exip.txt PREVIP=$(<$DESTDIR) EXIP=$(dig +short myip.opendns.com @resolver1.opendns.com) echo "External ip checker schript V1.0" echo echo echo "Previous ip:...

SyntaxError: invalid flag after regular expression and white screen

javascript,html,arrays,regex,syntax-error
I can't figure out why my page will not work. It just gives me a white screen when I try to load it. Is there a code I am missing? I don't know if my spaces matter either. Here is my code: <!DOCTYPE html> <html> <head><body> <title>Initializing an Array</title> <style...

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

javascript,node.js,return,syntax-error,node-modules
When I was answering another question I came across a Node.js module with a top-level return statement. For example: console.log("Trying to reach"); return; console.log("dead code"); This works without any errors and prints: Trying to reach in the standard output but not "dead code" - the return actually ceased execution. But...

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

java,android,xml,syntax-error,logcat
My app has worked before but now the app won't boot up correctly. When the App does boot up to homebck.xml (which I will include the source code below) it automatically crashes and in a Toast it says the crash_toast_text in the strings.xml. Also it is not just a Toast...

How to create stored procedure in mysql workbench?

mysql,stored-procedures,syntax-error,declare
I know Microsoft sql server and I think this codes doesn't contain an error. But Mysql thow an exeption which I Couldn't undestant. Is anybody can explain it for me and please,give me mysql function,view,stored procedure examples website name CREATE PROCEDURE spInsertEmployee ( Employee_Name nvarchar(20), Employee_Surname nvarchar(20), Department_Name nvarchar(20) )...

Error: Expected expression, got end of script

javascript,php,onclick,syntax-error
When clicking on the "Print Ticket" button Javascript is throwing an syntax error in firebug indicating "Expected expression, got end of script" However this is a straight forward bit of php/javascript code so i'm at a loss for the syntax problem. This button is not addressed by any Jquery function...

Inner Query For Oracle is not working?

sql,oracle,syntax-error,nested-queries
I have 2 tables table1 and table2. I want fetch data from two tables. the query is SELECT tb2.tdn ,tb2.nrn ,tb2.id ,tb2.dat ,tb2.mcheck ,tb2.info ,tb2.edrf , (SELECT count(*) from table1 tb1 where tb1.id = 'ftam' and tb1.tdn = tb2.tdn and (tb1.display = 'Y' OR tb1.display = 'y') ) as history...

Python Unexpected character

python,syntax-error
Hey I'm getting this unexpected character after line error for this if statement if (StartSquare % 10 != 0 and StartSquare % 10 != 9 and StartSquare \ 10 != 0 and StartSquare \ 10 != 9 and FinishSquare % 10 != 0 and FinishSquare % 10 != 9 and...

Sending data to rails controller without saving in database

ruby-on-rails,ajax,syntax-error
1) I need to get data from the user and process it in one of my controller's function without saving the data from my user in my db. I have this code in my view: <script type="text/javascript"> $(document).ready(function(){ $("#AEI_submit").on('click', function(event) { var aei_login = $("#AEI_login").val(); var aei_password = $("#AEI_mdp").val(); $.ajax({...

Javascript Error: SyntaxError: missing ; before statement

javascript,syntax-error,mysql-connector
I have the following code snippet. I have tried all the possible things mentioned on StackExchange but am unable to spot the error in my code. <%@page contentType="text/html"%> <%@page pageEncoding="UTF-8"%> <%@ page import="java.sql.*" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta charset="utf-8" /> <title>Twitter Mapper</title> <link...

IDLE returning syntax errors for no reason that I can discern

python-3.x,syntax-error
# Function starts_with() - Finds if list 1 starts with list 2 : ) def starts_with(list1, list2): count = 0 if length (list1) >= length(list2):(error) for var in range(length(list2):(error) if var == list2[var]: (error) count(error) += 1 else: return false if count = length(list2): return true else: return false This...

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

javascript,sql,node.js,syntax-error
I'm running an update on a table to set a position. I've extracted the query and manually run it on my database and works fine but when passed through connection.query() it seems to think there's a syntax error in my node.js console. function sendShipPosition(position) { var input = ''; if...

How to properly use autoincrement

sql,syntax-error,h2
I am trying to create a database of accounts that automatically increase by 1 after every new insertion, but when I try to insert something into the table it throws this error. org.h2.jdbc.JdbcSQLException: Syntax error in SQL statement "INSERT INTO ACCOUNT (USERACCNAME=[*]'admin',USERIP='lol', USEREMAIL='somehing', USERPASSWD='74123', USERPREMIUM='-1', CHAR1='1', CHAR2='-1', CHAR3='-1', CHAR4='-1') ";...