Search Results

Search found 6696 results on 268 pages for 'syntax highlighting'.

Page 74/268 | < Previous Page | 70 71 72 73 74 75 76 77 78 79 80 81  | Next Page >

  • Formatting Dates in Rails 3.0

    - by Neil Middleton
    I'm trying to format a date in Rails 3 using the new syntax as described in the code: http://github.com/rails/rails/blob/master/activesupport/lib/active_support/core_ext/date/conversions.rb by using the following syntax in an initialiser: Date::DATE_FORMATS[:my_format] = '%m %d %Y' I am then referencing dates in my view like so: comment.created_at.to_formatted_s(:my_format) However, I'm just getting the default formatting - what could be wrong?

    Read the article

  • Can I use cstdio in a C program?

    - by Tommy
    Can I use cstdio in a C program? I get a ton of errors in cstdio when I add the #include <cstdio> to the C program. c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\cstdio(17) : error C2143: syntax error : missing '{' before ':' c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\cstdio(17) : error C2059: syntax error : ':' Thanks EDIT - I would like to use snprintf, which is why I am trying to include this.

    Read the article

  • innerJoin query show error

    - by Chithri Ajay
    just i print the two table data so i am using inner join SELECT sd.GameName FROM LottoryTickets AS sd JOIN group AS p ON sd.Group = p.groupname WHERE p.groupname = 11 now i get #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 'group AS p ON sd.Group = p.groupname WHERE p.groupname = 11 LIMIT 0, 30' at line 3 this response please guide me thanks for advance.

    Read the article

  • update mysql db through form in php

    - by DAFFODIL
    I am getting this 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 ' address='xxxxx', city='sssssssss', pincode='333333333', state='Assam', count' at line 1 Thanks in advance. http://dpaste.com/hold/181959/

    Read the article

  • I got an error when implementing tde in sql2008

    - by mahima
    while using USE mssqltips_tde; CREATE DATABASE ENCRYPTION KEY with ALGORITHM = AES_256 ENCRYPTION BY SERVER CERTIFICATE TDECert GO getting error Msg 156, Level 15, State 1, Line 2 Incorrect syntax near the keyword 'KEY'. Msg 319, Level 15, State 1, Line 3 Incorrect syntax near the keyword 'with'. If this statement is a common table expression or an xmlnamespaces clause, the previous statement must be terminated with a semicolon. please help in resolving the same as i need to implement Encryption on my DB

    Read the article

  • How can i get the seed value of an identity column in MySql

    - by mmcdonald
    To get the seed and step values of an identity column in sql server i can use this syntax SELECT ColumnName = name, Seed = seed_value, Step = increment_value FROM sys.identity_columns So far in MySql i have found that if i use this syntax SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE auto_increment IS NOT NULL I can at least find out which columns are an identity... The question being how can i get the SEED and STEP values of the identity column from the MySQL Schema.

    Read the article

  • Order by Domain Extension Name using CodeIgniter Active Record Class

    - by allan
    $extension = “SUBSTRING_INDEX(domain_name, ‘.’, -1)”; $this->db->order_by($extension, “asc”); It says: 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 ‘asc LIMIT 50’ at line 44 But its working when I didn’t used the $this-db-order_by Active Record Class such as this one: $this-db-query(“SELECT * FROM domain ORDER BY SUBSTRING_INDEX(domain_name, ‘.’, -1)”); Anyone please help me. Thanks.

    Read the article

  • i tried to implement tde in sql2008...n got the error below.....plz help me to resolve...

    - by mahima
    while using USE mssqltips_tde; CREATE DATABASE ENCRYPTION KEY with ALGORITHM = AES_256 ENCRYPTION BY SERVER CERTIFICATE TDECert GO getting error Msg 156, Level 15, State 1, Line 2 Incorrect syntax near the keyword 'KEY'. Msg 319, Level 15, State 1, Line 3 Incorrect syntax near the keyword 'with'. If this statement is a common table expression or an xmlnamespaces clause, the previous statement must be terminated with a semicolon. please help in resolving the same as i need to implement Encryption on my DB

    Read the article

  • Executing Multiple Lines in Python

    - by metashockwave
    When Python is first installed, the default setting executes users' code input line-by-line. But sometimes I need to write programs that executes multiple lines at once. Is there a setting in Python where I can change the code execution to one block at once? Thanks if (n/2) * 2 == n:; print 'Even'; else: print 'Odd' SyntaxError: invalid syntax When I tried to run the above code, I got an invalid syntax error on ELSE

    Read the article

  • CSS: content:"\00a0"

    - by SteD
    Today I came across a new CSS syntax that I have never seen before content:"\00a0"; Checking it on w3schools, it explains: Definition and Usage The content property is used with the :before and :after pseudo-elements, to insert generated content. My question is, can you point out to me in real world example, how do we use this 'content' syntax? And what does the \00a0 mean in this case?

    Read the article

  • SubSonic 3 LeftOuterJoin

    - by michaelpearce
    I have read in this forum that left outer join syntax is not supported by subsonic in an answer to a question on the topic by "Apocatastasis". I have the same issue in that when I create a query using the .LeftOuterJoin the resulting sql has an inner join rather than a left outer join. Can someone please confirm that LeftOuterJoin is indeed not supported and, if that is the case, why is it included in the active record syntax? Thanks Michael

    Read the article

  • How to write a Python 2.6+ script that does gracefully fail with older pyhton?

    - by Sorin Sbarnea
    I'm using the new print from Python 3.x and I observed that the following code does not compile due to the end=' '. from __future__ import print_function import sys if sys.hexversion < 0x02060000: raise Exception("py too old") ... print("x",end=" ") # fails to compile with py24 How can I continue using the new syntax but make the script fails nicely? Is it mandatory to call another script and use only safe syntax in this one?

    Read the article

  • Search by Letters using LINQ

    - by Biswo
    hi i m using Linq & C# and i want to filter my data as this syntax in Sql Syntax in sql is I hav one table name Customer in which name is field 'Select name from customer where name like 'C%'' can u help to solve this code in Linq

    Read the article

  • jquery-like HTML parsing in Python?

    - by Roy Tang
    Is there any Python library that allows me to parse an HTML document similar to what jQuery does? i.e. I'd like to be able to use CSS selector syntax to grab an arbitrary set of nodes from the document, read their content/attributes, etc. The only Python HTML parsing lib I've used before was BeautifulSoup, and even though it's fine I keep thinking it would be faster to do my parsing if I had jQuery syntax available. :D

    Read the article

  • make VIEW of SHOW TABLE query

    - by cneeds
    Is there a way to make a VIEW of this SHOW TABLE query? SHOW FULL TABLES FROM `db_name` WHERE `Table_type` = "Base table" When I save this as a view (using phpMyAdmin) I get #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 'SHOW FULL TABLES FROM `db_name` WHERE `Table_type` = "Base table"' at line 4 when phpMyAdmin tries to execute this CREATE ALGORITHM = UNDEFINED VIEW `Tables` AS SHOW FULL TABLES FROM `db_name` WHERE `Table_type` = "Base table"

    Read the article

  • Simple question about operator ||

    - by Tristan
    HEllo, i try to do that in FlashBuilder (FlexProject) protected function btn_detail_view_clickHandler(event:MouseEvent):void { CurrentState="Statistiques" || "PartMarche"; } But it's not working, i guess this is not the right syntax but what's the right syntax ? Thanks

    Read the article

  • Help with SQL query in C#

    - by DanSogaard
    I'm trying to rename the columns. The syntax should be the column name between double quotes incase of two words, like this: SELECT p_Name "Product Name" from items So I'm trying to do it in C# code like this: string sqlqry1 = "SELECT p_Name \"Prodcut Name\" from items"; But I get an error: Syntax error (missing operator) in query expression 'p_Name "Prodcut Name"'. It seems am having somthing wrong with the quotes, but I can't figure out.

    Read the article

  • MySQL : Insert Exactly Same Data Multiple Rows Without PHP Loop

    - by Robert Hanson
    I need to insert same data to my MySQL table without having PHP loop. The reason why I'm doing this is that because I have a column with Auto_Increment feature and that column associates with other table. So, I just need to insert some exactly same data and it's multiple rows (dynamic) but by using single INSERT syntax below : INSERT INTO outbox_multipart (TextDecoded) VALUES ('$SMSMessage') how to have this single INSERT syntax, but produce n number of rows?

    Read the article

  • Java to C++ converter/tool

    - by n00ki3
    Hi I always asked myself if it would be possible to make a Java2C++ Converter. Maybe a Tool that converts the Java Syntax to the C++ Syntax.. i am aware that the languages differ .. but simple things like loops where the semantic matches 1 on 1 .. is there such a tool . or is it possible to make one ?

    Read the article

  • Postgresql - Edit function signature

    - by drave
    POSTGRESQL 8.4.3 - i created a function with this signature CREATE OR REPLACE FUNCTION logcountforlasthour() RETURNS SETOF record AS realised i wanted to change it to this CREATE OR REPLACE FUNCTION logcountforlasthour() RETURNS TABLE(ip bigint, count bigint) record AS but when i apply that change in the query tool it isnt accepted or rather it is accepted, there is no syntax error, but the text of the function has not been changed. even if i run "DROP FUNCTION logcountforlasthour()" between edits the old syntax comes back if i edit the body of the function, thats fine, it changes but not the signature is there something i'm missing thanks

    Read the article

  • mysql import script by query instead of bash

    - by vick
    I have a file called script.sql how can I run that file using q mysql query? global $sql; $res = $sql->query("\. /script.sql")or die(mysql_error()); gives: #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 '\. /script.sql' at line 1

    Read the article

  • exeuting command in background

    - by tazim
    Hi, Trying to execute shell command in background using pythons commands module >>>import commands >>>output = commands.getstatusoutput("find / > tmp.txt &") sh: Syntax error: ";" unexpected Can anyone explain what is wrong with the syntax ? How should it be executed then ? Tazim.

    Read the article

  • How does CSS 3 border-image work exactly?

    - by Tower
    Hi, I have an image of 4x4 in size and I want to use it all around a DIV's border. The following: -moz-border-image: url("../images/window/side.png") 4 4 4 4 / 4px 4px 4px 4px repeat repeat will place left and right borders, but not bottom and top. What's wrong with it? I think I have misunderstood the syntax and if that is so, how does this syntax really work?

    Read the article

< Previous Page | 70 71 72 73 74 75 76 77 78 79 80 81  | Next Page >