Search Results

Search found 11178 results on 448 pages for 'syntax checking'.

Page 60/448 | < Previous Page | 56 57 58 59 60 61 62 63 64 65 66 67  | Next Page >

  • T-SQL Syntax Issue Else if style logic

    - by Yoda
    Hi guys, two questions today, I'm a busy bee and luckily I have an awesome community at my disposal! My issue here is this: I have a field i need to update based on existing field data. If Gender = F then foo = 1 If Gender = M then foo = 2 If Gender = Male then foo = 2 If Gender = Female then foo = 1 If Gender is not above then foo = 3 Here is what I have: update EmailAddresses set Priority1 = '1' where GENDER__C = 'Female' update EmailAddresses set Priority1 = '2' where GENDER__C = 'Male' update EmailAddresses set Priority1 = '1' where GENDER__C = 'F' update EmailAddresses set Priority1 = '2' where GENDER__C = 'M' update EmailAddresses set Priority1 = '3' where GENDER__C not in (select 'Female', 'Male', 'F', 'M') Any help much appreciated! And its Friday!! Whoo hoo

    Read the article

  • C# string syntax error

    - by Mesa
    I'm reading in data from a file and trying to write only the word immediately before 'back' in red text. For some reason it is displaying the word and then the word again backwords. Please help. Thank you. private void Form1_Load(object sender, EventArgs e) { Regex r = new Regex(" "); StreamReader sr = new StreamReader("KeyLogger.txt"); string[] tokens = r.Split(sr.ReadToEnd()); int index = 0; for(int i = 0; i <= tokens.Length; i++) { if (tokens[i].Equals("back")) { //richTextBox1.Text+="TRUE"; richTextBox1.SelectionColor = Color.Red; string myText; if (tokens[i - 1].Equals("back")) myText = ""; else myText = tokens[i - 1]; richTextBox1.SelectedText = myText; richTextBox1.Text += myText; } else { //richTextBox1.Text += "NOOOO"; } //index++; //richTextBox1.Text += index; } }

    Read the article

  • Initialisation of Objects Syntax question

    - by Brock Woolf
    When I initialise a struct in C (Node is the struct): struct Node { /* Non-Relevant code */ }; This works: Node *rootNode = new Node(); but so does this: Node *rootNode = new Node; Is there a difference, and what is the difference between using () or not using the brackets? Just off memory, I think the same applies above for C++ object initialisations. What is happening here?

    Read the article

  • Have trouble when using heredoc syntax in PHP

    - by wamp
    <?php $output = <<< END <table style="display: table;" class="listview rowstyle-rowhighlight" id="resourcegrid"> <thead> <tr> <th width="70"></th> <th style="-moz-user-select: none;" class="sortable fd-column-0"><a class="fdTableSortTrigger" href="#">Name</a></th> <th style="-moz-user-select: none;" class="sortable fd-column-1"><a class="fdTableSortTrigger" href="#">Contributor</a></th> <th style="-moz-user-select: none;" class="sortable fd-column-3"><a class="fdTableSortTrigger" href="#">Modified</a></th> </tr> </thead><tbody> END; echo $output; When I run it reports : Parse error: parse error on line 2 But I don't see anything abnormal.

    Read the article

  • Pascal's repeat... until vs. C's do... while

    - by Bob
    In C there is a do while loop and pascal's (almost) equivalent is the repeat until loop, but there is a small difference between the two, while both structures will iterate at least once and check whether they need to do the loop again only in the end, in pascal you write the condition that need to met to terminate the loop (REPEAT UNTIL something) in C you write the condition that need to be met to continue the loop (DO WHILE something). Is there a reason why there is this difference or is it just an arbitrary decision?

    Read the article

  • Syntax for combining joins in mysql

    - by UltraVi01
    I seem to remember reading somewhere that there is a way to combine LEFT JOIN statements into a more simple query. I have the following query and was hoping someone could kindly take a look at it. SET @userId = 8; SELECT ug.user_id, COUNT(DISTINCT goal_id) as matches FROM user_goal ug, user u, profile p LEFT JOIN user_block ub ON @userId = ub.blocked_id LEFT JOIN user_block ub2 ON @userId = ub2.blocker_id LEFT JOIN user_user uu ON @userId = uu.user_id LEFT JOIN friend_request fr ON @userId = fr.user_id WHERE ug.user_id = u.id AND u.profile_id = p.id AND (ub.blocker_id IS NULL OR ub.blocker_id != ug.user_id) AND (ub2.blocked_id IS NULL OR ub2.blocked_id != ug.user_id) AND (uu.user_friends_id IS NULL OR uu.user_friends_id != ug.user_id) AND (fr.to_user_id IS NULL OR (fr.to_user_id != ug.user_id)) AND ug.user_id!=@userId AND p.suggestible AND goal_id IN (SELECT iug.goal_id FROM user_goal iug WHERE user_id=@userId) GROUP BY user_id ORDER BY matches DESC LIMIT 4

    Read the article

  • distributing R package with optional S4 syntax sugar

    - by mariotomo
    I've written a small package for logging, I'm distributing it through r-forge, recently I received some very interesting feedback on how to make it easier to use, but this functionality is based on stuff (setRefClass) that was added to R in 2.12. I'd like to keep distributing the package also for R-2.9, so I'm looking for a way to include or exclude the S4 syntactical sugar automatically, and include it when the library is loaded on a R = 2.12 system. one other option I see, that is to write a small S4 package that needs 2.12, imports the simpler logging package and exports the syntactically sugared interface... I don't like it too much, as I'd need to choose a different name for the S4 package.

    Read the article

  • undefined C/C++ symbol as operator

    - by uray
    I notice that the character/symbol '`' and '@' is not used as an operator in C/C++, does anyone know the reason or historically why its so? if its really not used, is it safe to define those symbols as another operator/statement using #define?

    Read the article

  • SQL IN Statement using like syntax?

    - by StackUnderflow
    I would like to do something like this i.e., use wild card characters in the in clause: SELECT * FROM mytable WHERE keywords IN ('%test%', '%testing%') This is not supported in MS SQL.... Is there some other way to achieve it... Looking for something other than: SELECT * FROM mytable WHERE keywords like '%test%' or keywords like '%testing%' or.....

    Read the article

  • How does extern work in c++?

    - by symfony
    This is from the <iostream>: namespace std { extern istream cin; ///< Linked to standard input extern ostream cout; ... It seems by using extern the data types defined in other namespaces will just be available?

    Read the article

  • syntax for binding multiple variables within text

    - by danke
    When binding multiple variables value1 value2 value3 in the same text field, do I do this: text="{some text value1 other text value2 and other text value3}" or text="some text {value1} other text {value2} and other text {value3}" I noticed both work, but which is the right way to do it and will work all the time.

    Read the article

  • Comment out a python code block

    - by gbarry
    Is there any mechanism to comment out large blocks of Python code? Right now the only ways I can see of commenting out code are to either start every line with a #, or to enclose the code in """ (triple quotes), except that actually makes it show up in various doc tools. Edit--After reading the answers (and referring to the "duplicate"), I have concluded the correct answer is "No". One person said so, and the rest lectured us about editors. Not a bad thing, but I feel it's important to put the answer at the top.

    Read the article

  • Mixture of php shorttags

    - by drpcken
    I'm taking over a codeigniter project and notice the original dev uses a mixture of short tag and php tags in the views. For example: <div id="content"> <?=show_header()?> <ul id="products"> <?php if (count($products) > 0) : ?> <?php foreach($products as $product) : ?> ... </div> Is this bad practice to inherit? I think it is already causing me problems in my dev environment.

    Read the article

  • Why does Javascript's OR return a value other than true/false?

    - by Fletcher Moore
    I saw this construction in order to get the browser viewport width: function () { return window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth; } I understand the browser quirks involved. What I don't understand is why || returns the value. So I tried this alert(undefined || 0 || 3); and sure enough, it alerts 3. I find this bizarre, because I expect true or false. Could anyone explain what's going on?

    Read the article

  • Mysql syntax using IN help!

    - by Axel
    Hi, i have a pictures table : pictures(articleid,pictureurl) And an articles table : articles(id,title,category) So, briefly, every article has a picture, and i link pictures with article using articleid column. now i want to select 5 pictures of articles in politic category. i think that can be done using IN but i can't figure out how to do it. Note: Please only one query, because i can do it by selecting articles firstly then getting the pictures. Thanks

    Read the article

  • TextMate: Conditional formatting?

    - by Nebs
    I want to be able to color lines differently based on the starting character. eg.: - This is line 1 - This is line 2 x This is line 3 - This is line 4 x This is line 5 So lines 1,2,4 (starting with '-') should be blue while lines 3,5 (starting with 'x') should be red. Is this possible? How would you do it? Thanks.

    Read the article

  • Need help for this syntax: "#define LEDs (char *) 0x0003010"

    - by Noge
    I'm doing programming of a softcore processor, Nios II from Altera, below is the code in one of the tutorial, I manage to get the code working by testing it on the hardware (DE2 board), however, I could not understand the code. #define Switches (volatile char *) 0x0003000 #define LEDs (char *) 0x0003010 void main() { while (1) *LEDs = *Switches; } What I know about #define is that, it is either used to define a constant, or a macro, but why in the above code, there are casting like, (char *) 0x0003010, in #define? why the 2 constants, Switches and LEDs act like a variable instead of a constant? Thanks in advance !

    Read the article

  • Why do I get a "warning: no newline at end of file" ?

    - by user198729
    The file is a helloworld.cpp: #include <iostream> using namespace std; int main() { if(true) cout << "!!!Hello World!!!" << endl; // prints !!!Hello World!!! return 0; } But when I build it,get a warning: g++ -Wall -O2 -c -o hw.o hw.cpp hw.cpp:8:2: warning: no newline at end of file g++ -o myprog hw.o If I add a newline at the end,the warning will go. Why is that newline at end of file recommended in a cpp source file?

    Read the article

  • JQuery Syntax Problem?

    - by Michael Smith
    I am using JQuery to insert divs into a page but i cant seem to get the quotation marks correctly setup. For example the code below works fine: var newDiv_1 = '<div id="event_1"><b>Hello World 01</b></div>'; $('#mon_Events').append(newDiv_1); But when i try to use variable in place of the normal text, i doesnt seem to work: var eventname = 1; var newDiv_1 = '<div id="event_' . eventName . '"><b>Hello World 01</b></div>'; $('#mon_Events').append(newDiv_1); How do i use variable inside this statement?

    Read the article

< Previous Page | 56 57 58 59 60 61 62 63 64 65 66 67  | Next Page >