The current page is here: https://www.daniweb.com/welcome/syntax Sorry, but not sure whether wading through DW's history of BBCode is relevant to anybody. I gave up the will to live after the 100th paragraph of why Markdown and who did what to whom. Urgh. Can't there just be a table? `HTML tag | Markdown | Example` or something similar? Then just a simple, "No HTML tags, BBCode or any other Markdown will be parsed". Sorry if I'm coming across like a grumpy old fart. Maybe it's because I am. :(

Member Avatar
Member Avatar
+1 forum 6

$(document).ready(function () { var a, b, c d = new RegExp("/^[a-z0-9]*$/"), e = true, f = [ "g": false, "h": false, "i": false, "j": false, "k": false ], I changed names of variables for reasons. *Uncaught SyntaxError: Unexpected token :* Line 7. Which is `"g": false,`. Am I missing something?

Member Avatar
Member Avatar
+0 forum 4

Ok, here is what I get when I run the query. 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 newmessage`int(4) unsigned NOT NULL DEFAULT `0`,`companyi' at line 4 Here is what it says is wrong. CREATE TABLE `user` ( `userid` char(50) NOT NULL default '', `password` char(12) NOT NULL default '', `lastlogin` timestamp(14) NOT NULL, `newmessage`int(4) unsigned NOT NULL DEFAULT `0`, `companyid` char(10) default NULL, `departmentid` char(10) default NULL, `status` char(50) default NULL, PRIMARY KEY (`userid`), KEY `loginuser` (`userid`,`lastlogin`) ) ENGINE=MyISAM; …

Member Avatar
Member Avatar
+0 forum 6

Hello again. I have insert title, author and content data into table with admin-are page and now want to create a user-view-page.php that everybody enter into that page and see all posts one after an other, something like this model: first title by first author first content seconr title by second author second content . . last title by last author last content This is my code but it doesn't work: <?php $servername = "localhost"; $dbname = "mydbname"; $dbusername = "mydbusername"; $dbpassword = "mydbpassword"; try { $conn = new PDO("mysql:host=$servername;dbname=$dbname", $dbusername, $dbpassword); $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $sql = "SELECT * FROM Posts …

Member Avatar
Member Avatar
+0 forum 20

Hello: I am getting a parse error while running a file on my server on my home machine: Parse error: syntax error, unexpected end of file I have been researching this for a few hours now but have had no results to overcome this error. In the editor it is indicating the last line, </html>, but I am sure that last line is correct and the error must lie somewhere in the code above that. Any advice or pointers in the right direction would be much appreciated. ` <!-- The tab on top --> <div class="tab"> <ul class="login"> <li class="left">&nbsp;</li> …

Member Avatar
Member Avatar
+0 forum 3

Well, me again! Have an other problem with creating an other table. I want to create a Posts table with this code: <?php $servername = "localhost"; $dbname = "mydbname"; $dbusername = "mydbusername"; $dbpassword = "mydbpassword"; try { $conn = new PDO("mysql:host=$servername;dbname=$dbname", $dbusername, $dbpassword); $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $sql = 'CREATE TABLE Posts( ID INT(128) UNSIGNED AUTO_INCREMENT PRIMARY KEY, Title CHAR(100), Author CHAR(100), Content CHAR(100), )'; $conn->exec($sql); echo "Table Posts created successfully.<br>"; } catch(PDOException $e) { echo $sql . "<br>" . $e->getMessage(); } $conn = null; ?> But when i type the url of that file in the browser, this error appear on …

Member Avatar
Member Avatar
+0 forum 3

Ok so i have been trying and trying to solve this issue, but to no avail. Therefore, i am posting here. Please note that i am a self learner and don't really know things in depth, just trying to learn.. So please be gentle. Here is my aspx code: <div class="gview"> <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CssClass="gview" DataKeyNames="ID" DataSourceID="SqlDataSource1" OnRowCommand="GridView1_RowCommand"> <Columns> <asp:CommandField ShowDeleteButton="True" ShowSelectButton="True" /> <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" ReadOnly="True" SortExpression="ID" /> <asp:BoundField DataField="PName" HeaderText="PName" SortExpression="PName" /> <asp:BoundField DataField="Age" HeaderText="Age" SortExpression="Age" /> <asp:BoundField DataField="ContactNum" HeaderText="ContactNum" SortExpression="ContactNum" /> <asp:BoundField DataField="Gender" HeaderText="Gender" SortExpression="Gender" /> <asp:BoundField DataField="TestName" HeaderText="TestName" SortExpression="TestName" /> <asp:BoundField DataField="ReqDate" HeaderText="ReqDate" SortExpression="ReqDate" …

Member Avatar
Member Avatar
+0 forum 1

Hey all, so i am working on database queries. Add and delete are working fine. I am having trouble with Edit Query. This is what i am getting: Incorrect syntax near 'Name'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Incorrect syntax near 'Name'. Source Error: Line 63: con.Open(); Line 64: SqlDataReader dr; Line 65: dr = cmd.ExecuteReader(); Line 66: con.Close(); Line 67: show(); Stack Trace: [SqlException (0x80131904): Incorrect syntax near 'Name'.] System.Data.SqlClient.SqlConnection.OnError(SqlException exception, …

Member Avatar
Member Avatar
+0 forum 2

So I'm trying to remove 2 brackets from lines I'm reading from a file. For some reason when I run my program the characters in between the delimeters is removed. for example `greetings pe()ple` would end up as `greetings pe` I'm using a char array of delimiters. `char delimiters[] = " ( )";` Why does strtok delete the characters between the parenthesis?

Member Avatar
Member Avatar
+0 forum 2

Hello, I used to use Code::blocks and eclipse for code editing, but started to find them slow. I started searching for lightweight IDE's and found that the prevailing opinion is that if you are looking for lightweight code creation you should use vim/emacs, gcc and the other gnu utilities. I started doing this on my linux box and found it wonderful. Then I sat down in front of my windows computer, installed the [core utils](http://www.gnu.org/software/coreutils/), created a custom cmd with batch and installed vim for windows. My cmd: @echo off rem Set the title title LABinux rem Set the text …

Member Avatar
Member Avatar
+0 forum 3

Hello again I'm working with the Poco internet library trying to understand it but I have come across some syntax that I don't quite understand. This may be a beginner question. Here it is: Poco::AutoPtr<Poco::Notification> pNf (_queue.waitDequeueNotification); I know AutoPtr's contain a count of how many objects reference the object being pointed to; and that only one object can hold ownership over the object. I do not understand what's going on here. Could somebody explain it to me?

Member Avatar
Member Avatar
+0 forum 2

i cannot seem to find the syntax error Parse error: syntax error, unexpected T_VARIABLE on line 24 18 $user = $_REQUEST['username']; 19 $pass = $_REQUEST['password']; 20 21 $user = mysql_real_escape_string($_REQUEST['username']); 22 $pass = mysql_real_escape_string($_REQUEST['password']); 23 24 $query = 'SELECT * FROM user, user WHERE '$user' = username AND '$pass' = password';

Member Avatar
Member Avatar
-1 forum 2

This is really stupid question and i feel ashamed to ask but i kinda have to. So here is the thing, in my college/school we got some sort of homework which isn't a "must do" but i wish to for myself, so thing we need to do is, when i activate undo button, it needs to change back to picture which was there after the new picture was added infinite ammount of times, for example if i change picture five times, it needs to undo the change five times and so on. And sadly i have no idea how to …

Member Avatar
Member Avatar
+0 forum 2

how to fix below error Notice: Error: Table 'oc_product_profile' already exists Error No: Table 'oc_product_profile' already exists CREATE TABLE `oc_product_profile` ( `product_id` int(11) NOT NULL, `profile_id` int(11) NOT NULL, `customer_group_id` int(11) NOT NULL, PRIMARY KEY (`product_id`,`profile_id`,`customer_group_id`) ) ENGINE=MyISAM COLLATE=utf8_general_ci; in /home3/ffashion/public_html/ffashionfox.com/system/database/mysql.php on line 51 and my sql database is: <?php final class DBMySQL { private $link; public function __construct($hostname, $username, $password, $database) { if (!$this->link = mysql_connect($hostname, $username, $password)) { trigger_error('Error: Could not make a database link using ' . $username . '@' . $hostname); } if (!mysql_select_db($database, $this->link)) { trigger_error('Error: Could not connect to database ' . $database); } …

Member Avatar
Member Avatar
+0 forum 3

hi good day, i am having a problem about my program (VB 6.0) i want to save data from my program to the access database (mS Access 2003) the problem is that when i try to run the program, and click the button, theres an error about insert into syntax this syntax is from my friend and it works perfectly for him but i dont know why did this happen to mine heres my code Private Sub registercmd_Click() Set rcdst = New ADODB.Recordset link.Execute "INSERT INTO Accounts(Username, Password, Fname, Lname, Age, Cnumber, Eadd, Add) VALUES ('" & logintxt.Text & "', …

Member Avatar
Member Avatar
+0 forum 3

Hello, I have a quick question about c/c++ syntax. Basically I am wondering when it is allowable to have numbers in identifiers. My compiler happens to allow numbers in: * Function names * Class names * Variable names * Pre-processor names As long as they do not begin with numbers. Is this standard functionality? I just ask because it feels weird to have a function called euler2 (for calculating eulerian numbers of the second kind). Is there any reason I should rename it to eulerTwo? I checked the ISO C specification and it seems to suggest that it should be …

Member Avatar
Member Avatar
+0 forum 3

I am having the website and it's based on the Educational Purposes... I am having the code for different programs and all so etc... So The question is that How can i add the code as syntax highlighter PFA... ![d71ec5623473d0f488c3f95f9bcc962e](/attachments/large/4/d71ec5623473d0f488c3f95f9bcc962e.jpg "d71ec5623473d0f488c3f95f9bcc962e")

Member Avatar
Member Avatar
+0 forum 7

I am new to php and been following various youtube tutorials and boought a few books, I am now however clueless with my latest error and really need some help. This is my error Parse error: syntax error, unexpected T_STRING unexpected '?' in /web/com/138601040918006/main.php on line 17 Please have a look at my code and advise where I am going wrong. I had a feeling is my my files and because the website is uploaded its in a subdirectory but on Xampp its the main one and on localhost. So not sure. Thanks in advance ` <html> <head> <title>Online PHP …

Member Avatar
Member Avatar
+0 forum 2

I have created a table in mysql database table(tblmysq) with id(autoincrement),name(string),branch(string),sex(string),and dat(datetime).The following error occurs when i try to insert a record:check the manual that corresponds to your mysql server version for the right syntax near line 1. My lines of code are : Try conn = New MySqlConnection(conStr) conn.Open() 'Dim sql As String = String.Format("INSERT INTO tblmysq(name,branch,sex,dat) VALUES('{0}','{1}','{2}',{3}, TextBox1.Text , TextBox2.Text,ComboBox1.SelectedItem,DateTimePicker1.Value)") Dim sql As String = "INSERT INTO tblmysq(name,branch,sex,[dat])VALUES ('" & TextBox1.Text & "','" & TextBox2.Text & "','" & ComboBox1.SelectedItem & "'," + Format(DateTimePicker1.Value, "yyyy-MM-dd") + ")" com = New MySqlCommand(sql, conn) If com.ExecuteNonQuery Then MessageBox.Show("Save") Else MessageBox.Show("Operation not …

Member Avatar
Member Avatar
+0 forum 7

Hi, not sure if this the correct thread to post this question. I am working with the eclipse plugin project to creat and editor. And I want to highlish certain words for the editor. I was researching and found have to use syntax coloring. I didnt get a good tutorial on this. can some one give me a link or tutorial that i can follow. appreciate a response thanks

Member Avatar
+0 forum 0

Good Morning All, I need some help and guidance on a project I'm working on, I am having problems with the following code below, I have been trying to figure it out for days and cannot see anything wrong with it, I am getting the following error when processing the form below, and I am lost where to go from here :( `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 ''', stage_two='', stage_two_date='', mig_wiz='', mig_wiz_date='', old_mbox_del='' at line 1` <?php include('config.inc'); $createdby …

Member Avatar
Member Avatar
+0 forum 5

I have built this function which calls a couple other functions to get the oprator and numbers for an arithmetic operation but I get the error `function call: expected a function after the open parenthesis, but received '+`. normaly you invoke addition as (+ 5 6) and multiplication as (\* 4 9) ect. So I thought you could call a function that would get each piece but I cant seem to get it to work. Here is what I have: (define calculate (lambda (x) ((getOperator x) (getOperand1 x) (getOperand2 x)) ) ) Detailed explanations as to the reasons why what …

Member Avatar
Member Avatar
+0 forum 6

hi Iam new for php and trying to learn, i want to know what is this line of code mean : $_PROFILER->mark('afterRoute') : null; $_PROFILER ?? -> ?? what does it used for and what is it mean ? mark()??? : ?? null?? and 'afterRoute' ??? thanks for all ;)

Member Avatar
Member Avatar
+0 forum 2

I have a problem with php. I was trying to change my homepage on theme twentyeleven. Its a beginning of my functions.php script. Syntax error, unexpected T_IF is on line 1. Could you help me to find out whats the problem? <?php/** * Twenty Eleven functions and definitions * * Sets up the theme and provides some helper functions. Some helper functions * are used in the theme as custom template tags. Others are attached to action and * filter hooks in WordPress to change core functionality. * * The first function, twentyeleven_setup(), sets up the theme by registering support …

Member Avatar
Member Avatar
+0 forum 9

is this is the correct way 2 write destructor of copy constructor and parameterised constructor ~a(int x,float y) ~a(a &a1)

Member Avatar
Member Avatar
+0 forum 4

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\registration\r­egistration.php on line 66 i already tried mysqli_error() and does not fix this problem <html> <head> <title>Registration Form</title> </head> <body> <form method='post' action='registration.php'> <table width='400' border='5' align='center'> <tr> <td><h1>Registration Form</h1></td> </tr> <tr> <td>User Name:</td> <td><input type='text' name='name'/></td> </tr> <tr> <td>Password:</td> <td><input type='password' name='pass'/></td> </tr> <tr> <td>Email:</td> <td><input type='text' name='email'/></td> </tr> <tr> <td><input type='submit' name='submit' value='Sign Up'/></td> </tr> </table> </form> </body> </html> <?php mysql_connect("localhost","root",""); mysql_select_db("user_db"); if(isset($_POST['submit'])){ $user_name = $_POST['name']; $user_pass = $_POST['pass']; $user_email = $_POST['email']; if($user_name==''){ echo "<script>alert('Please enter your Username')</script>"; exit(); } if($user_pass==''){ echo "<script>alert('Please enter your password')</script>"; exit(); …

Member Avatar
Member Avatar
+0 forum 20

I've been reading through this introductory book on Python, and I've been following along fairly well. Compared to C++, Python seems to make more sense to me. That is, until I reached a section on Logical Operators. I don't completely understand what I just typed in to IDLE, and the results that were returned. Here's what I read: Python provides three logical operators: and, or, and not. Both and and or use short-circuit logic and return the operand that determined the result—they do not return a Boolean (unless they actually have Boolean operands). Let’s see what this means in practice: …

Member Avatar
Member Avatar
+0 forum 5

Hello, I was doing some research on enumerating the different drives on a system, and I found some code on MSDN. Here is the page: http://msdn.microsoft.com/en-us/library/windows/desktop/aa364975%28v=vs.85%29.aspx The source code looks like this: DWORD dwSize = MAX_PATH; char szLogicalDrives[MAX_PATH] = {0}; DWORD dwResult = GetLogicalDriveStrings(dwSize,szLogicalDrives); if (dwResult > 0 && dwResult <= MAX_PATH) { char* szSingleDrive = szLogicalDrives; while(*szSingleDrive) { printf("Drive: %s\n", szSingleDrive); // get the next drive szSingleDrive += strlen(szSingleDrive) + 1; } } I modified the code to look like this, because I prefer to use ANSI operations: #include <windows.h> #include <stdio.h> using namespace std; int main(){ DWORD dwSize …

Member Avatar
Member Avatar
+0 forum 2

Hello everyone :) I have this lines of codes and i get : > Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in D:\xampp22\htdocs\folder\index.php on line 52 ( 19 in the code below ) <form method="POST" action="index.php"> CODE : <input type="text" placeholder="Type the code" name="searchfor" /> <input type="submit" name="submit" value="Search for the code"> </form> <?php if(isset($_REQUEST['submit'])){ $searchfor = $_REQUEST['searchfor']; $terms = explode(",", $searchfor); // i've deleted this and no-positive results , i was thinking that it gives a false value to the code :-?? $query = "SELECT * FROM edit WHERE id=$searchfor" ; // i've tried also with …

Member Avatar
Member Avatar
+0 forum 7

Okay, I'm pulling my hair out. I'm getting NO error on the following code: Dim cmd As New OleDb.OleDbCommand("CREATE TABLE [" + empTableName + "] ([ID] DOUBLE, " & _ "[LnameFname] TEXT(255), " & _ "[Location] TEXT(255), " & _ "[SalaryOld] DOUBLE, " & _ "[FtePercentage] DOUBLE, " & _ "[EvalScore] DOUBLE, " & _ "[EvalUnitsPerm] DOUBLE, " & _ "[EvalUnitsStipend] DOUBLE, " & _ "[EvalIncreasePerm] DOUBLE, " & _ "[EvalIncreaseStipend] DOUBLE, " & _ "[ExperienceDegreeUnits] DOUBLE, " & _ "[ExperienceDegreeIncrease] DOUBLE, " & _ "[AcademicNeedsUnitsPerm] DOUBLE, " & _ "[AcademicNeedsUnitsStipend] DOUBLE, " & _ "[AcademicNeedsIncreasePerm] DOUBLE, " & _ …

Member Avatar
Member Avatar
+0 forum 2

The End.