Search Results

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

Page 36/268 | < Previous Page | 32 33 34 35 36 37 38 39 40 41 42 43  | Next Page >

  • MySQL multi CREATE TABLE syntax help?

    - by rlb.usa
    Hi guys, I'm trying to write a MySQL script that creates several tables. I have: CREATE TABLE `DataBase1`.`tbl_this`( ... ); CREATE TABLE `DataBase1`.`tbl_that`( ... ); ... (14 more) ... BUT, only the first CREATE TABLE statement is executed. I get no syntax errors. Erm, am I missing the MSSQL equivalent of GO ? What am I doing wrong here; how do I get this baby to run all the tables?

    Read the article

  • New line or Carraige Return syntax problems

    - by Smoka
    Im pretty new to coding, heres my problem. Results->Text = "G55 > Y" + System::Convert::ToString(destY); "Results" is a System.Windows.Forms.Textbox "multiline btw", or so says VS. That line works fine, but i need a "new line or CR" at the end, so that i can repeat that line with different Literals and a different var in ToString. For days now ive tried different syntax's ive read about, and i cant get it to take any of them. Or even a complete different way to input text into Results-Text that would allow for tidy multiline use. Sidenote: since im using -Text and System::Convert::ToString in VC, would this code be considered just c++ or .net or CLI? to tighten my searches.

    Read the article

  • Ajax get throws a syntax error when ip is given instead of localhost

    - by Aruna
    Hi , i am working on cakephp. I have developed an application where i have used localhost in all ajax post and get.. like var ht = $.ajax({ type: "GET", url: "http://localhost/FormBuilder/index.php/forms/getInvitees/<?php echo $emailid;?>", async: false }).responseText; var myObject = eval('(' + ht + ')'); this thing works only when i put localhost . But when i change that to my Ip like http://111.11.11.11/FormBuilder/index.php/forms/getInvitees/", then i am getting a syntax error () in the line var myObject = eval('(' + ht + ')'); WHy it happens ?? Please give valuable suggestions in solving this.. Thank you

    Read the article

  • simple putStrLn in Haskell/Yampa with arrows syntax

    - by sisif
    i'm using Haskell with the Yampa FRP library which uses the arrows language extension. how can i do a simple putStrLn in a SF? mySF = proc x -> do y <- identity -< x*x putStrLn "Hello World!" ++ show y returnA -< y the arrow syntax complains about the expression not bein an arrow (of course), but even with arrows i get no output output <- identity -< putStrLn "Hello World!"

    Read the article

  • SQL Syntax Error 1064

    - by 01010011
    Hi, I keep getting the following error message ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right systax to use near ''isbn10','isbn13','title','edition','author_f_name','author_m_name','author_l_na' at line 1 when trying to populate my MySQL database from the command line with the following command: source C:\myFilePath\myFileName.sql Here is an excerpt from my mysqldump (showing the table structure for book). Where did I go wrong? Any assistance will be appreciated: -- -- Table structure for table book DROP TABLE IF EXISTS book; /*!40101 SET @saved_cs_client = @@character_set_client /; /!40101 SET character_set_client = utf8 */; CREATE TABLE book ( book_id int(11) NOT NULL AUTO_INCREMENT, isbn10 char(20) DEFAULT NULL, isbn13 char(20) DEFAULT NULL, title char(20) DEFAULT NULL, edition char(20) DEFAULT NULL, author_f_name char(20) DEFAULT NULL, author_m_name char(20) DEFAULT NULL, author_l_name char(20) DEFAULT NULL, cond enum('as new','very good','good','fair','poor') DEFAULT NULL, price decimal(8,2) DEFAULT NULL, genre char(20) DEFAULT NULL, PRIMARY KEY (book_id) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table book

    Read the article

  • Java - Syntax Question: What is <? super T>

    - by aloh
    I'm having trouble understanding the following syntax: public class SortedList< T extends Comparable< ? super T> > extends LinkedList< T > I see that class SortedList extends LinkedList. I just don't know what T extends Comparable< ? super T> means. My understanding of it so far is that type T must be a type that implements Comparable...but what is "< ? super T "?

    Read the article

  • c, pass awk syntax as argument to execl

    - by Skuja
    I want to run following command in c to read systems cpu and memory usage: ps aux|awk 'NR > 0 { cpu +=$3; ram+=$4 }; END {print cpu,ram}' I am trying to pass it to execl command and after that read its output: execl("/bin/ps", "/bin/ps", "aux|awk", "'NR > 0 { cpu +=$3; ram+=$4 }; END {print cpu,ram}'",(char *) 0); but in terminal i am getting following error: ERROR: Unsupported option (BSD syntax) I would like to know how to properly pass awk as argument to execl?

    Read the article

  • Correct syntax of a HTTP 100 Continue response

    - by PartlyCloudy
    For me, one of the weakest points of the HTTP 1.1 RFC and the various implementations around is how to deal with 100 Continue headers. I searched on the web for a while and had a look at different implementations. However, there is one thing I'm not sure of. what is the correct syntax of a 100 Continue message? Several sources claim, that this must be a single response line without any further header lines. However, I can't find that in the RFC 2616 reflected. So what is right? HTTP/1.1 100 Continue or HTTP/1.1 100 Continue [Additional Headers…] ?

    Read the article

  • C++ -- return x,y; The point?

    - by Earlz
    Hello, I have been programming in C and C++ for a few years and now I'm taking a college course in it and our book had a function like this int foo(){ int x=0; int y=20; return x,y; //y is always returned } I have never seen such syntax. In fact, I never see the , operator used outside of parameter lists. If y is always returned though, then what is the point? Is there a case where a return statement would need to be created like this? (Also, I tagged C as well because it applies to both, though my book specifically is C++)

    Read the article

  • c++: strange syntax in what() method of std::exception

    - by Patrick Oscity
    When i am inheriting from std::exception in order to define my own exception type, i need to override the what() method, which has the following signature: virtual const char* what() const throw(); This definitely looks strange to me, like if there were two method names in the signature. Is this some very specific syntax, like with pure virtual methods, e.g.: virtual int method() const = 0; or is this a feature, that could somehow be used in another context, too? And if so, for what could it be used?

    Read the article

  • jquery animate() problem (syntax ?)

    - by meo
    $('#somediv').stop(false, true).animate({marginLeft: '-=' + e.width() + 'px'}, options.speed, function(){ options.onNewSlide() }) e.with() returns 640 opctions.speed contains 800 options.onNewSlide() contains a a custom callback function It works fine in firefox. But i debugged it with jquery.lint because it was throwing some random error in IE. lint tells me: When I called animate(...) with your args, an error was thrown! TypeError: c.speed is not a function { message="c.speed is not a function", more...} You passed: [Object { marginLeft="-=640px"}, 800, function()] and it indicates me the line i have posted. I have checked the jquery doc, but my syntax seams ok. Do you know what i am doing wrong? PS: i use jquery 1.4.2 from the google API you can see the error here: http://meodai.ch/slider/ (i know the code is under construction, but still)

    Read the article

  • Call methods on native Javascript types without wrapping with ()

    - by Anurag
    In Javascript, we can call methods on string literals directly without enclosing it within round brackets. But not for other types such as numbers, or functions. It is a syntax error, but is there a reason as to why the Javascript lexer needs these other types to be enclosed in round brackets? For example, if we extend Number, String, and Function with an alert method and try calling this method on the literals, it's a SyntaxError for Number and Function, while it works for a String. function alertValue() { alert(this); } Number.prototype.alert = alertValue; String.prototype.alert = alertValue; Function.prototype.alert = alertValue; We can call alert directly on a string object: "someStringLiteral".alert() // alerts someStringLiteral but it's a SyntaxError on numbers, and functions. 7.alert(); function() {}.alert(); To work with these types, we have to enclose it within brackets: (7).alert(); // alerts "7" (function() {}).alert(); // alerts "function() {}"

    Read the article

  • Safely dereferencing FirstOrDefault call in Linq c#

    - by samy
    For brevity's sake in my code, i'd like to be able to do the following: having a collection, find the first element matching a lambda expression; if it exists, return the value of a property or function. If it doesn't exist, return null. var stuff = {"I", "am", "many", "strings", "obviously"}; var UpperValueOfAString = stuff.FirstOrDefault(s => s.contains("bvi")).ToUpper(); // would return "OBVIOUSLY" var UpperValueOfAStringWannabe = stuff.FirstOrDefault(s => s.contains("unknown token")).ToUpper(); // would return null Is it possible with some linq-syntax-fu or do i have to check explicitly for the return value before proceeding?

    Read the article

  • "Automatic" class proxy in C++

    - by PierreBdR
    I need to allow the user to change members of two data structures of the same type at the same time. For example: struct Foo { int a, b; } Foo a1 = {1,2}, a2 = {3,4}; dual(a1,a2)->a = 5; // Now a1 = {5,2} and a2 = {5,2} I have a class that works and that change first a1 and then copy a1 into a2. This is fine as long as: the class copied is small the user doesn't mind about everything being copied, not only the part modified. Is there a way to obtain this behavior: dual(a1,a2)->a = 5; // Now a1 = {5,2} and a2 = {5,4} I am opened to alternative syntax, but they should stay simple, and I would like to avoid things like: set_members(a1, a2, &Foo::a, 5); members(a1, a2, &Foo::a) = 5; or anything involving specifying explictely &Foo::

    Read the article

  • Simple Javascript question

    - by Rachel
    I have products : offer_id in javascript and am getting value of offer_id dynamically. Let say I get products : 12345 but now instead of that I want it to be as products : ;12345, than how can this be achieved in javascript. I have tried : products : ';'.offer_id products : ';'."offer_id" products : ';'.'offer_id' products : ";".offer_id But all of my above trials have failed and am getting syntax error for each one of those. I am newbie to Javascript and so would really appreciate any inputs.

    Read the article

  • Access outer class from inner class: Why is it done this way?

    - by Vuntic
    So most of us know how to access an outer class from an inner class. Searches with those words give oodles of answered questions on that topic. But what I want to know is why the syntax is the way it is. Example: public class A { private class B { public void c() {A.this.d();} } public void d() {System.out.println("You've called d()! Go, you!");} } Why is it A.this.d()? It looks like this is a static field of class A, but... * am confused * Forgive me if this is a repeat; like I said, searches with those words give how-answers.

    Read the article

  • Ternary Operators in JavaScript Without an "Else"

    - by Oscar Godson
    I've been using them forever, and I love them. To me they see cleaner and i can scan faster, but ever since I've been using them i've always had to put null in the else conditions that don't have anything. Is there anyway around it? E.g. condition ? x=true : null ; basically, is there a way to do: condition ? x=true; Now it shows up as a syntax error...

    Read the article

  • why am i getting an error SyntaxError : invalid syntax for this code

    - by eragon1189
    This is a code in python which calculates f (x) =? ((-1)*x)/(x*x+n*n) n from 1 to infinite.... correct to 0.0001, for the range 1 < x < 100 in steps of 0.1.But i am getting an syntax error,as i am new to programming in python... from scipy import * from matplotlib.pyplot import * x=arange(0.1,100,0.1) f=zeros(len(x)) s=-1 for n in range (1,10000): t=s*x/(x*x+n*n) f +=t s =-s if max(abs(t))< 1e-4 break for xx in c_[x,f]: print "%f %f" % (xx[0],xx[1])

    Read the article

  • C++ operator[] syntax.

    - by Lanissum
    Just a quick syntax question. I'm writing a map class (for school). If I define the following operator overload: template<typename Key, typename Val> class Map {... Val* operator[](Key k); What happens when a user writes: Map<int,int> myMap; map[10] = 3; Doing something like that will only overwrite a temporary copy of the [null] pointer at Key k. Is it even possible to do: map[10] = 3; printf("%i\n", map[10]); with the same operator overload?

    Read the article

  • JQuery code does not work not understanding the markup

    - by Andrae Browne
    I am trying to make a simple animation using JQuery. I have tried adding the script externally(external file) and internally(within script tags). I have testing if the page is recognizing the script using the alert function, but the script is not executing. I am thinking that is has something to do with the syntax. $("#container5").hover(function() { //hover in $(#container5).animate({ height: "250", width: "250", left: "-=50", top: "-=50", }, "fast"); }, function() { //hover out $(#container5).animate({ height: "200", width: "200", left: "+=50", top: "+=50", }, "fast"); } })(jQuery);

    Read the article

  • Why is Python 3.1 throwing a SyntaxError when printing after loop?

    - by bubersson
    Hi, I'm trying to run this snippet in Python 3.1 console and I'm getting SyntaxError: >>> while True: ... a=5 ... if a<6: ... break ... print("hello") File "<stdin>", line 5 print("hello") ^ SyntaxError: invalid syntax >>> (This is just shortened code to make a point.) Am I missing something? Is there some other Magic I don't know about? Thanks for your help (since this is my first StackOverflow question and I'm not a native English speaker)

    Read the article

  • Why is Python 3.1 throwing a SyntaxError when printing after loop? [resolved]

    - by bubersson
    Hi, I'm trying to run this snippet in Python 3.1 console and I'm getting SyntaxError: >>> while True: ... a=5 ... if a<6: ... break ... print("hello") File "<stdin>", line 5 print("hello") ^ SyntaxError: invalid syntax >>> (This is just shortened code to make a point.) Am I missing something? Is there some other Magic I don't know about? Thanks for your help (since this is my first StackOverflow question and I'm not a native English speaker)

    Read the article

  • Use of 'standalone parentheses'

    - by zaf
    I just answered a question where I advised removing parentheses around a statement and was asked why, to which I had no answer when I realised that it caused no errors/warnings. I could only cite bad practice. But maybe I'm the one missing something... I did my own tests: (print('!')); // Outputs '!' ((print('!!'))); // Outputs '!!' (1); // No output (qwerty); // No output (1==2); // No output (1=2); // Syntax error // etc... Can someone shed some light on whats going on and of what use are 'standalone parentheses'?

    Read the article

  • correct mysql syntax error

    - by user2981651
    please could someone tell me the problem with this syntax because mysql 5.5.32 keeps tell me about an error CREATE TABLE `clients` ( `ID` tinyint(11) NOT NULL auto_increment, `title` varchar(10) NOT NULL default '', `firstName` varchar(30) NOT NULL default '', `lastName` varchar(30) NOT NULL default '', `address1` varchar(100) NOT NULL default '', `address2` varchar(100) NOT NULL default '', `town` varchar(100) NOT NULL default '', `province` varchar(100) NOT NULL default '', `country` varchar(40) NOT NULL default '', `postCode` varchar(20) NOT NULL default '', `telephone` varchar(20) NOT NULL default '', `email` varchar(100) NOT NULL default '', `cardNo` varchar(16) NOT NULL default '0000-00-00', `expiryDate` date NOT NULL default '0000-00-00', PRIMARY KEY (`ID`) ) TYPE=MyISAM COMMENT='customer table' AUTO_INCREMENT=1 ;

    Read the article

  • How do I add color syntax highlighting to GNU emacs?

    - by Alex Reynolds
    I have two versions of emacs available to me on a locked workstation: $ /usr/local/bin/emacs --version GNU Emacs 22.3.1 $ /usr/bin/emacs --version GNU Emacs 21.4.1 In both cases, my terminal type is xterm when I run either version of emacs. When I run the v21 version of emacs, I get syntax coloring for Perl, HTML, and other modes. When I run the v22 version, I do not get syntax coloring. I would like to migrate from the v21 version because the combination of v21 emacs, GNOME Terminal and GNU Screen is eating Ctrl-arrow key chords, which prevents me from moving quickly between words. (OS X Terminal and GNU Screen do not have this issue.) The v22 version allows use of Ctrl-arrow key combinations with GNOME Terminal and GNU Screen. How do I fix the v22 version (or ask my sys admin to fix) so that it once again highlights syntax and allows me to use Ctrl-arrow key combinations?

    Read the article

< Previous Page | 32 33 34 35 36 37 38 39 40 41 42 43  | Next Page >