[Solved] var functionName = function() {} vs function functionName() {} in JavaScript

The difference is that functionOne is a function expression and so only defined when that line is reached, whereas functionTwo is a function declaration and is defined as soon as its surrounding function or script is executed (due to hoisting). For example, a function expression: // TypeError: functionOne is not a function functionOne(); var functionOne … Read more

[Solved] Got a very strange syntax error in java

With the commented-out code uncommented, you’re trying to declare a constructor directly within a method. You can’t do that in Java. // You can’t do this buttonPlay.addListener(new ClickListener(){ // 1 public void clicked(InputEvent event, float x, float y) { // 2 public GameScreen(Create create) { // 3 this.create = create; // 3 } // 3 … Read more

[Solved] Is my SQL syntax really wrong? [closed]

Try adding white spaces between your query words and make sure you escape the input: $id = mysql_real_escape_string($id); $str = mysql_real_escape_string($str); $name = mysql_real_escape_string($name); $r=mysql_query(“INSERT INTO varta (id,data,name) VALUES (‘$id’,’$str’,’$name’);”); Or better yet – take a look at MySQLi or PDO and use prepared statements. solved Is my SQL syntax really wrong? [closed]

[Solved] PHP error: “syntax error, unexpected T_STRING, expecting ‘)’ [closed]

You have issued an if statement. So Naturally, PHP looks to complete the statement. Hence why your getting the error stating an expected closing bracket. Remove your if statement and your code should look like this: if(OS == “XP”){ header(‘Location: XP.html’); exit(); } PHP error reporting isn’t the best tool in the world. It alerts … Read more

[Solved] Why this is showing a syntax error?

Two things, just at a glance. As Rakesh’s answer states, platform00.upper() = input(“etc”) is not valid syntax, and should replaced with platform00 = input(“etc”).upper(). The way you have it, you’re attempting to set a value to a non-variable, specifically the return value of a function. For a second thing, you have a curly brace in … Read more

[Solved] Java GUI syntax error in SQL statment

Oh my god, thanks @Orel Eraki, of course beside the unbalanced single-quotes you will have to follow proper SQL Insert Syntax and hava a form of ‘INSERT INTO …’, try it like this (see my change dirctly after “values(” as the one of Orel Eraki (no ‘table’ “keyword” after into): Sql_insert=”insert into itemmanag(itemID,purchesPrice,sellPrice,quantity,vendor,unitM )values(‘”+txt_itemID.getText()+”‘,'”+Item_Pprice.getText()+”‘,'”+txt_itemSprice.getText()+”‘,'”+txt_qunti.getText()+”‘,'” +jcombo1+”‘,'”+jcombo2+ … Read more

[Solved] basic python syntax [closed]

A C struct can be packed into flat binary data, which is what Python 2 calls a string. The struct module lets you take a string that represents one of these C structs, and “unpack” it into a Python data structure. To do so you call struct.unpack. You need to specify a format string (as … Read more

[Solved] PHP website debug [duplicate]

First of all, paste your code correctly… You are missing </table> and </form> in the end… Second of all, you were missing a simple apostrophe and a semi-colon in the line $result = mysquli_query($con, ‘select * from account where username=”‘.$username.'” and password=”‘.$password.'”) Also, you should use mysqli_query instead of mysqlui_query… Typo! Your code should be … Read more

[Solved] Parse error: syntax error, unexpected end of file in C:\Program Files\EasyPHP-12.1\www\Sitedeteste\upload.php on line 37 [closed]

Wooble is correct, you are missing a closing bracket on one of your if statements. The following code should do the trick <?php //Funcao que vai abrir o arquivo php que faz conexao com o servidor require_once (“sistemadelogin.php”); $descricao = $_POST[descimagem]; $nomeFOTOG = $_FILES[‘fotoimagem’][‘name’]; $nomeFOTOP = $_FILES[‘miniImagem’][‘name’]; $tmpFOTOG = $_FILES[‘fotoimagem’][‘tmp_name’]; $tmpFOTOP = $_FILES[‘miniImagem’][‘tmp_name’]; $destinoG = … Read more