syntax-error

Parse error: syntax error, unexpected '*' [duplicate]

若如初见. 提交于 2019-12-25 19:06:44
问题 This question already has answers here : PHP parse/syntax errors; and how to solve them (17 answers) Closed 4 years ago . My code: <?php function ci($principle, $rate, $time) { $ci = ($principle * (( (1 + $rate / 100) ** $time) - 1)); echo $ci; } ?> <?php echo ci(10,10,10); ?> And when I am running it, it gives the following error Parse error: syntax error, unexpected '*' in D:\Xampp\htdocs\php\functions.php on line 4 Please tell me what's the error in line 4 ( $ci = ($principle * (((1+$rate

#1064 error with INSERT INTO

房东的猫 提交于 2019-12-25 18:54:36
问题 I have a PHP script produced by using Export in phpMyAdmin. When trying to Import elsewhere from that script I got all sort of errors. Thanks to this site I managed to modify it to this one and get further before an error crops up but I can't find help for this one. Original export -- phpMyAdmin SQL Dump -- version 4.2.5 -- http://www.phpmyadmin.net -- -- Host: localhost:3306 -- Generation Time: Feb 23, 2015 at 05:23 PM -- Server version: 5.0.95-log -- PHP Version: 5.5.14 SET SQL_MODE = "NO

#1064 error with INSERT INTO

北慕城南 提交于 2019-12-25 18:54:09
问题 I have a PHP script produced by using Export in phpMyAdmin. When trying to Import elsewhere from that script I got all sort of errors. Thanks to this site I managed to modify it to this one and get further before an error crops up but I can't find help for this one. Original export -- phpMyAdmin SQL Dump -- version 4.2.5 -- http://www.phpmyadmin.net -- -- Host: localhost:3306 -- Generation Time: Feb 23, 2015 at 05:23 PM -- Server version: 5.0.95-log -- PHP Version: 5.5.14 SET SQL_MODE = "NO

Error: expected class,delegate,enum,interface or struct

百般思念 提交于 2019-12-25 18:23:17
问题 I get the following error on the code below: expected class,delegate,enum,interface or struct. This happens when hovering on GH_ObjectResponse , what am I doing wrong? public class SettingsComponentAttributes : GH_ComponentAttributes { public SettingsComponentAttributes(IGH_Component SettingsComponent) : base(SettingsComponent) {} } public override GH_ObjectResponse RespondToMouseDoubleClick( GH_Canvas sender, GH_CanvasMouseEvent e) { ((SettingsComponent)Owner).ShowSettingsGui(); return GH

Java: difference between “CustomClass1” and “CustomClass1.class”?

吃可爱长大的小学妹 提交于 2019-12-25 18:21:31
问题 This question is in continuation with Java: Using Classes as a value in hashmap. What is the difference between following two approaches?: 1) String name = ( ( CustomClass1 )obj1 ).getName(); and 2) String name = ( ( mapQuery2ResponseType.get("string1") )obj1 ).getName(); where, mapQuery2ResponseType.get("string1") return value of type Class<?> First approach works perfectly but in second approach it's giving an error saying Syntax error on token "obj1", delete this token . How can I modify

Create empty list names using a loop [duplicate]

混江龙づ霸主 提交于 2019-12-25 18:12:02
问题 This question already has answers here : How do I create a variable number of variables? (14 answers) Closed 2 years ago . Beginner's question. I want to create several empty lists and name them. Currently I am doing it the foolproof but cumbersome way, size_list=[] type_list=[] floor_list=[] I am trying to do it less cumbersome, for item in ['size', 'type']: item+'_list'=[] however, this results in the following error, item+'_list'=[] ^ SyntaxError: can't assign to operator Can this be fixed

Error installing python packages on Fedora

杀马特。学长 韩版系。学妹 提交于 2019-12-25 17:01:53
问题 I'm exploring options for vulnerability testing of my sites. Wapiti runs nicely on my local VM, so I want to set it up on a live server to decrease runtime. But this is my first time trying to install a python package on this server and I'm having some trouble. I suspect there is a python configuration error or something similar because I'm seeing errors event when I don't attempt to install the package. What's going on here? I have root access so (per this post: Proper permissions for python

MySQL Trigger: Prevent Insert by IF statement

≡放荡痞女 提交于 2019-12-25 07:59:12
问题 I try to write my first trigger for a MySQL Database. It should prevent an insert (and later also updates) on " course_student " in context of the current time and the given timestamps in " capacity ", but i'm still getting a syntax error. DELIMITER $$ CREATE TRIGGER checkSubscribeTimeCourse BEFORE INSERT ON course_student REFERENCING NEW AS new FOR EACH ROW BEGIN IF (SELECT COUNT(*) FROM capacity c, course_capacity cc WHERE c.cid = cc.cid AND cc.cid = new.cid AND (c.end >= CURRENT_TIMESTAMP

python SyntaxError: unexpected EOF while parsing

痞子三分冷 提交于 2019-12-25 07:48:35
问题 So I have this code m, b = eval(input()) the aim is to have a whole bunch of comma separated values inputted and then have python unpack the tuple into the variables but when i run i get this error x, y = eval(input()) File "<string>", line 1 1,2 ^ SyntaxError: unexpected EOF while parsing what did i do wrong? im using python 3 回答1: You should not use eval for things like this. It will be impossible to write it in a way such that the user can't break it (by mistake or on purpose). Do

Syntax Error with MySQL Query

淺唱寂寞╮ 提交于 2019-12-25 07:06:12
问题 I am getting the following error and I have spent hours looking at it and cannot figure out why! ERROR: 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 'primary='doej2', secondary='1' WHERE id='2'' at line 1 Here is my code: <?php if (isset($_POST[Edit])){ $id = $_POST['id']; $primary = $_POST['primary']; $secondary = $_POST['secondary']; $query = mysql_query("UPDATE eventcal SET primary='$primary',