syntax-error

Syntax Error with Database Login System

六月ゝ 毕业季﹏ 提交于 2019-12-02 07:37:42
Created a website login system but when I run it it keeps coming up with this error to the particular bit of coding below. Can someone PLEASE help me with this Error message on this particular code: System.Data.SqlClient.SqlException: Incorrect syntax near the keyword 'user'. Code: public static User LoginUser(string login, string password) { //Check if user exists string query = string.Format("SELECT COUNT(*) FROM TeesDB.dbo.user WHERE name = '{0}'", login); command.CommandText = query; try { conn.Open(); int amountOfUsers = (int) command.ExecuteScalar(); if(amountOfUsers == 1) { //User

A mystery involving putStrLn

落爺英雄遲暮 提交于 2019-12-02 07:35:11
Why does the piece of code below produce the error parse error on input ‘putStrLn’ ? main = do line <- fmap reverse getLine putStrLn $ "You said " ++ line ++ " backwards!" putStrLn $ "Yes, you said " ++ line ++ " backwards!" <interactive>:11:4: error: parse error on input ‘putStrLn’ Also, why does the following piece of code produce the error parse error on input ‘let’ ? main = do line <- getLine let line' = reverse line putStrLn $ "You said " ++ line' ++ " backwards!" putStrLn $ "Yes, you said " ++ line' ++ " backwards!" <interactive>:31:4: error: parse error on input ‘let’ Both snippets have

“Unfortunately My App has stopped” [closed]

这一生的挚爱 提交于 2019-12-02 07:25:44
i'was create a app for android but there is a error found " Unfortunately My App has stopped " so please help me AndroidManifest .xml <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.techtips" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="17" /> <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <activity android:name="com.techblogon

PLS-00306: wrong number or types of arguments in call to 'OUTPUT_ARRAY'

こ雲淡風輕ζ 提交于 2019-12-02 07:23:58
问题 I'm stuck with this error and really don't know how to fix it. Maybe i'm passing array in improper way? This is main sql file. DECLARE v_array_length NUMBER := &v_array_length; BEGIN DECLARE TYPE number_array_type IS TABLE OF NUMBER(6, 2) INDEX BY BINARY_INTEGER; v_array NUMBER_ARRAY_TYPE; BEGIN --Isvediams IOPACKAGE.OUTPUT_MESSAGE('Original array:'); --Sugeneruoja atsitiktinius array elementus is intervalo [1, 1000] FOR i IN 1..v_array_length LOOP v_array(i) := SYS.DBMS_RANDOM.VALUE(1, 1000)

php parse/syntax error help

南楼画角 提交于 2019-12-02 06:57:56
I keep getting a "Parse error: syntax error, unexpected ':', expecting ')' in /home/jobkill/public_html/process.php on line 8" when processing inputs from a page that redirects here. I dont know what to fix, Here's the code: <? $aff = $_GET['aff'] ; $click_id = $_GET['click_id'] ; $zipcode = @$_GET['zip']; $state = @$_GET['custom_state']; $subid = $_GET['subid'] ; $urls = array( “http://consumerheadlinesdaily.com/debt/direct_2de89f.php? cdb=23&zip=<?print $zipcode?>”, “http://consumerheadlinesdaily.com/debt/direct_2de89f.php? cdb=80&zip=<?print $zipcode?>”, “http://consumerheadlinesdaily.com

PLS-00306: wrong number or types of arguments in call to 'OUTPUT_ARRAY'

人盡茶涼 提交于 2019-12-02 06:24:20
I'm stuck with this error and really don't know how to fix it. Maybe i'm passing array in improper way? This is main sql file. DECLARE v_array_length NUMBER := &v_array_length; BEGIN DECLARE TYPE number_array_type IS TABLE OF NUMBER(6, 2) INDEX BY BINARY_INTEGER; v_array NUMBER_ARRAY_TYPE; BEGIN --Isvediams IOPACKAGE.OUTPUT_MESSAGE('Original array:'); --Sugeneruoja atsitiktinius array elementus is intervalo [1, 1000] FOR i IN 1..v_array_length LOOP v_array(i) := SYS.DBMS_RANDOM.VALUE(1, 1000); END LOOP; IOPACKAGE.OUTPUT_ARRAY(v_array); END; END; This is IOpackage sql file CREATE OR REPLACE

Keep getting error “Can't locate Image/Grab.pm in @INC” after installing the Perl mod

。_饼干妹妹 提交于 2019-12-02 06:05:49
I'm a bit new to programming and I'm having some trouble writing a Perl script that will grab all the images from a webpage and save them in a specified directory. Here's my code: use warnings; use strict; use lib '/home/User1/strawberry/cpan/build'; use Image::Grab; $pic = Image::Grab->new(SEARCH_URL=>'http://www.examplesite.com', REGEXP =>'.*\.gif|.*\.jpg'); my $dir = 'images'; opendir (IMG, ">>$dir") || die "Directory doesn't exist - $!\n"; foreach ($pic) { print IMG "$_\n"; } closedir IMG; This is the error I get when I run the script in PuTTY: Can't locate Image/Grab.pm in @INC (@INC

pip install pydot raises a SyntaxError

巧了我就是萌 提交于 2019-12-02 05:53:33
问题 I'm running pip from the command line, trying to install pydot because Django's django-extensions needs it to generate UML class diagrams When I run the command pip install pydot , it gives me this error: Collecting pydot Using cached pydot-1.0.2.tar.gz Complete output from command python setup.py egg_info: Traceback (most recent call last): File "<string>", line 20, in <module> File "C:\Users\[me]\AppData\Local\Temp\pip-build-uscu27_d\pydot\setup.py ", line 5 except ImportError, excp: ^

Syntax error when defining a function on the Python command line

谁说我不能喝 提交于 2019-12-02 05:33:36
问题 I am trying to define a function on the Python REPL. Every time I try to run the below code, I get a syntax error. Code: def hello(): print ("Hello!") hello() Error: C:\Users\~\Desktop>python Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 16:07:46) [MSC v.1900 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> def hello(): ... print ("Hello!") ... hello() File "<stdin>", line 3 hello() ^ SyntaxError: invalid syntax A possible explanation I've

Strange Python behavior from inappropriate usage of 'is not' comparison?

删除回忆录丶 提交于 2019-12-02 05:29:12
问题 I (incorrectly?) used 'is not' in a comparison and found this curious behavior: >>> a = 256 >>> b = int('256') >>> c = 300 >>> d = int('300') >>> >>> a is not b False >>> c is not d True Obviously I should have used: >>> a != b False >>> c != d False But it worked for a long time due to small-valued test-cases until I happened to use a number of 495. If this is invalid syntax, then why? And shouldn't I at least get a warning? 回答1: "is" is not a check of equality of value, but a check that two