Search Results

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

Page 199/448 | < Previous Page | 195 196 197 198 199 200 201 202 203 204 205 206  | Next Page >

  • Preprocessor #if directive

    - by Caslav
    I am writing a big code and I don't want it all to be in my main.c so I wrote a .inc file that has IF-ELSE statement with function and I was wondering can it be written like this: #if var==1 process(int a) { printf("Result is: %d",2*a); } #else process(int a) { printf("Result is: %d",10*a); } #endif I tried to compile it but it gives me errors or in best case it just goes on the first function process without checking the var variable (it is set to 0).

    Read the article

  • Can you use constant variables in javascript?

    - by chobo2
    Hi I am using visual studios 2010 and created a javascript file(jscript.js) and I saw on one page saying you can make constant variables in javascript like: const x = 20; bu to on another page I read it says you can't. So I am confused now what is it now? Also in Visual studios when I write "const" it underlines it in the javascript file and goes syntax error.

    Read the article

  • How to check restricted access pages for broken links?

    - by kumarsfriends
    Hi All, I was googling for tools for checking broken links in a remote web page. The w3c validator seemed a good one. But I am still unsure as how to check for pages which are restricted, i.e. the pages which I can only access by logging in to the site. Can we do that using the w3c validator? If not than is there any other tool for the same?

    Read the article

  • What's the error in my MySQL statement?

    - by Jim
    The following SQL statement has a syntax error according to phpMyAdmin, but I can't spot what it is. Any ideas? CREATE TABLE allocations( `student_uid` INT unsigned NOT NULL DEFAULT 0, `active` INT unsigned NOT NULL DEFAULT 1, `name` VARCHAR( 255 ) NOT NULL DEFAULT '', `internal_id` VARCHAR( 255 ) DEFAULT '', `tutor_uid` INT NOT NULL DEFAULT 0, `allocater_uid` INT unsigned NOT NULL DEFAULT 0, `time_created` INT NOT NULL DEFAULT 0, `remote_time` FLOAT NOT NULL DEFAULT 0, `next_lesson` VARCHAR NOT NULL DEFAULT -1, PRIMARY KEY ( student_uid ) );

    Read the article

  • How do I use multiple precisions in prinft()?

    - by Tommy
    Looking at the information under the heading "Precision can be omitted or be any of:". The example: printf("%.*s", 3, "abcdef"); works, outputting:abc (truncating the rest of the string.) Now, I would like to have a string with multiple parameters formatted (truncated): printf("%.*s", "%.*s", 3, 3, "abcdef", "xyz123"); but the program crashes. What is the correct syntax? Thank You.

    Read the article

  • In Java, is there a way to write a string literal without having to escape quotes?

    - by Matthew
    Say you have a String literal with a lot of quotation marks inside it. You could escape them all, but it's a pain, and difficult to read. In some languages, you can just do this: foo = '"Hello, World"'; In Java, however, '' is used for chars, so you can't use it for Strings this way. Some languages have syntax to work around this. For example, in python, you can do this: """A pretty "convenient" string""" Does Java have anything similar?

    Read the article

  • C/C++ definitions of functions

    - by Vit
    Yesterday, I have been watching discussion here, about compilers and linkers. It was about C library function definitions. I have never thought of that, so it inspired me to do some searching, but I cannot find exactly what I want. I wonder, what is the smallest syntax you need to add into your source code to enable just printf() function. I mean the function declaration from stdio.h you need.

    Read the article

  • Repository Pattern : Add Item

    - by No Body
    Just need to clarify this one, If I have the below interface public interface IRepository<T> { T Add(T entity); } when implementing it, does checking for duplication if entity is already existing before persist it is still a job of the Repository, or it should handle some where else?

    Read the article

  • How to check font-size in IE6+

    - by kumarsfriends
    Hi All, I am wondering is there any way we can test the font size/color of a webpage in IE6+. I think it is not possible by checking the css class, as some other style may overwrite the styles of the class which has been assinged to that text. Actually I want to know the browser assigned font-size to the text of the page, as we can do it in firebug on firefox. Any help would be appreciated.

    Read the article

  • Source Code Browser

    - by James Fielding
    Hello I'm looking for a piece of relatively simple software to browse large C++ project. What I would like is something that is somewhere between a simple text editor and a full-blown IDE like Eclipse. I would like syntax highlighting, a way to see all classes/methods defined in a file, a way to find where a particular method is called from and where a variable is declared/defined. Any ideas? Thank you!

    Read the article

  • Can IF be used to start a MySQL query?

    - by Littledot
    Hi there, I have a query that looks like this: mysql_query("IF EXISTS(SELECT * FROM predict WHERE uid=$i AND bid=$j) THEN UPDATE predict SET predict_tfidf=$predict_tfidf WHERE uid=$i AND bid=$j ELSE INSERT INTO predict (uid, bid, predict_tfidf) VALUES('$i','$j','$predict_tfidf') END IF")or die(mysql_error()); But it dies and mysql tells me to check the syntax near IF EXISTS(....) Can we not use an IF statement to start a mysql query? Thank you in advance.

    Read the article

  • Is there anyway to "probe" a method in common lisp

    - by Michael Minerva
    My application allows the user to create their own methods indirectly and I later need to refer to these methods. I am wondering if there is a way (for error checking purposes) to test if a method exists without trying to execute it. If I just try and call the method and it doesn't exist this will crash my application.

    Read the article

  • Concatenate a table name from a variable in a FROM clause

    - by idieeasy
    I'm trying to use a dynamically generated fully-qualified table name in sql server 2008. For example, this does not work: select max([id]) from @dbName+N'.[T1]' This will give an error like: Msg 102, Level 15, State 1, Line 73 Incorrect syntax near '+'. I know that something like this works: declare @qualifiedTable varchar(200) = @dbName+N'.[T1]' select max([id]) from @qualifiedTable But I have to do this LOTS of times so I would really like to do it in line. Is it possible?

    Read the article

  • accessing variables declared outside the asp code

    - by sushant
    <script ID="clientEventHandlersVBS" LANGUAGE="vbscript"> s=pass() y=s </script> <% session("password")=y Response.write(session("password")) Response.write(y) %> i have this code. but nothing is getting stored inside the session variable neither anything is getting printed. cant i access the variables declared outside the asp code or is their any syntax mistake. any help is really appreciated

    Read the article

  • Insert or update when product is present using mysql

    - by Aryan
    main_product table productid outward shopid 333 2 44//present 343 4 44//present 353 5 44//present 363 1 44//present 373 2 44//not present min_product table productid outward shopid 333 1 44 343 1 44 353 1 44 363 1 44 SELECT DISTINCT (A.productid),A.outward, B.productid,B.outward FROM main_product A INNER JOIN min_product B on B.productid=A.product_id where A.shopid='44' and B.shopid='44' my question how can i INSERT OR UPDATE in one query using mysql by checking if it is present or not if present update else insert something like this? INSERT INTO mytable (key, value) VALUES ($newkey, $newvalue) ON DUPLICATE KEY UPDATE SET value = $newvalue

    Read the article

  • How do I combine two rows of same part, but add quantities?

    - by Tom
    I have table "PICKITEM" PARTID QTY A 1 A 3 B 11 C 8 D 5 D 3 I need a select statement that will return one line for like PARTIDs and add the qty field to together, yet also return the rest of the lines in the table as is PARTID QTY A 4 B 11 C 8 D 8 Probably a newb question, but I am new to SQL syntax and queries. Any help in getting me on the right path would be appreciated!

    Read the article

  • preg_match_all with surrounding data

    - by user323304
    Hey. I have a large amount of log data that I need to get some relevant information out of. The syntax is: WORD1 some text KEYWORD some text WORD2 WORD1 some text KEYWORD some text WORD2 WORD1 some text KEYWORD some text WORD2 WORD1 some text KEYWORD some text WORD2 Would it be possible to use regex to get a certain block out of it - so that when I queried some keyword it would return WORD1 some text THIS_KEYWORD some text WORD2 PS: There could be multiple instances of one keyword, it should return all of the blocks (preg_match_all, PREG_SET_ORDER?).

    Read the article

< Previous Page | 195 196 197 198 199 200 201 202 203 204 205 206  | Next Page >