ansi

Ansi SQL type casting

Is it allowed to cast types in ANSI SQL like in postgres for example: SELECT SUM( CAST(qnty AS int) - CAST(reserve AS int) ) AS sum ... qnty and reserve are character columns. ...

WHERE conditions in subquery while using ANSI joins.

Why doesn't it work? SELECT a.* FROM dual a JOIN (SELECT * FROM dual WHERE 1=1) b ON (1=1); I get "ORA-00900: invalid SQL statement". Is there a way to use WHERE clause inside the subquery? Edit: Version 9.2 SELECT * FROM v$version Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production The following executes j...

Wildcard characters in queries randomly switching between Access * and Ansi %

BACKGROUND: I have an Access 2007 application, with a form which builds a Filter string to pass to a Report, which uses a stored query. In Access Options, I have "SQL Server Compatible Syntax (ANSI 92)" checked for This database, and the Filter string includes a LIKE clause with % wildcard characters. ISSUE: Randomly when I save or...

Unbuffered I/O in ANSI C

For the sake of education, and programming practice, I'd like to write a simple library that can handle raw keyboard input, and output to the terminal in 'real time'. I'd like to stick with ansi C as much as possible, I just have no idea where to start something like this. I've done several google searches, and 99% of the results use l...

Sql Server Management Studio - Programatically Creating Scipts based on DAL; Why use SET ANSI_NULLS ON before each table

I'm looking to generate the SQL scripts for table creation programmatically based on class definitions in my DAL similar to SQL Server Management Studio. So, when I right click on a table in MS SMS, and tell it to script table as > Create to > new query window, it generates some very understandable code. However, I'm not sure why the...

Dynamic memory allocation on stack

I recently tried this experiment in which instead of going for dynamic memory allocation for memory requirements of unknown size, I did a static allocation. When an array a[i] was declared by me, I kept i (size of the array) variable and dependent on the input that the user gives. #include <stdio.h> #include <stdlib.h> #include <stri...

Relation between .NET Encoding and Characterset

What's relation between CharacterSet here: http://msdn.microsoft.com/en-us/library/ms709353%28VS.85%29.aspx and ascii encoding here: http://msdn.microsoft.com/en-us/library/system.text.asciiencoding.getbytes%28VS.71%29.aspx ...

Which most common extensions are there (or used) to ANSI C?

You can put a link to comparison matrix or lists of extensions available to main compilers. If none of this is available, you could write a list of extension you use or like in your favorite compiler. ...

python regex escape characters

Hi. We have: >>> str 'exit\r\ndrwxr-xr-x 2 root root 0 Jan 1 2000 \x1b[1;34mbin\x1b[0m\r\ndrwxr-xr-x 3 root root 0 Jan 1 2000 \x1b[1;34mlib\x1b[0m\r\ndrwxr-xr-x 10 root root 0 Jan 1 1970 \x1b[1;34mlocal\x1b[0m\r\ndrwxr-xr-x 2 root root 0 Jan 1 2000 \x1b[1...

C99: Can I declare variables in the beginning of a block in a 'for'?

Is the following code legal according to C99? ... for(....) { int x = 4; ... } ... You can assume that before line 3 the variable x was never declared. C99 (PDF) Until now I have only found the following, but I dont think that this is enough: A block allows a set of declarations and statements to be grouped into one syntactic unit...

Why does GCC allow use of round() in C++ even with the ansi and pedantic flags?

Is there a good reason why this program compiles under GCC even with the -ansi and -pedantic flags? #include <cmath> int main (int argc, char *argv []) { double x = 0.5; return static_cast<int>(round(x)); } This compiles clean (no warnings, even) with g++ -ansi -pedantic -Wall test.cpp -o test. I see two problems: round...

Looking for a UserControl which supports ANSI escape codes.

I am looking to handle incoming telnet text that has ANSI escape codes. For the bounty I am looking for a full implementation where I can just append text to the end of a buffer. The control should be scrollable, yet still be able to handle appending text, cursor positioning, etc.. while the user is scrolled out of view. For example, ...

Creating files with french characters and encoding.

HI, I am creating a file like so. FileStream temp = File.Create( this.FileName ); Then putting data in the file like so. this.Writer = new StreamWriter( this.Stream ); this.Writer.WriteLine( strMessage ); That code is encapsulated in a class hierarchy but that is the meat and potatoes of it. My problem is this. MSDN says that the ...

Convert Hi-Ansi chars to Ascii equivalent (é -> e) in Delphi(2007)

Is there a routine available in D2007 to convert the characters in the high range of the ANSI table (>127) to their equivalent ones in pure ASCII (<=127) according to a locale (codepage)? I know some chars cannot translate well but most can, esp. in the 192-255 range: À -> A à -> a Ë -> E ë -> e Ç -> C ç -> c – -> - (that can be trickier...

Finding WndProc Address

How can I find the address of a WndProc (of a window of another process). Even if I inject a DLL and try to find it with either GetClassInfoEx() or GetWindowLong() or GetWindowLongPtr() I always get values like 0xffff08ed, which is definitely not an executable address. It is according to MSDN: "... the address of the window procedure, or...

Sending Data at perticular IP in window OS using ANSI C

I want to send data or packets at perticular IP address using ANSI C standard so that my code will be plateform independent, how is it possible in window OS without using window libraries like winsock etc. Kindly give me some guidelines or hints. ...

ANSI C - append chars to get a string

I have the following code in C: char *str = "Hello World"; char *s = malloc(strlen(str)); int i =0; for(;i<strlen(str)-5;i++) { s += *(str+i); } printf(s); It shows nothing. What I want is to get the substring of str stored in s. In Java I would do the following: String str = "Hello World"; ...

Matrix Standard library.

Is there any standard library of Matrix in c. Which I can implement across the platform. If not then kindly tell me OS dependent libraries of Matrix. ...

Resources to Write ANSI C++ Code

The last time I heavily used C++ was years ago, and it was strictly done on the Windows platform. Specifically, I used Microsoft Visual Studio as my IDE and developed some habitual patterns to use Microsoft's C++ version. For example, I used void main() instead of the standard int main(). Now, I am taking a class where it is required ...

extended ascii chars and ansi in the mac osx terminal app

i wanted to create some shellscripts that display pretty ansi colored graphics for osx but unfortunately i find just very little information about that topic. osx seems to use monaco 10 as its default console font. is there some way to find out all displayable characters for this font? osx terminal runs in UTF-8 per default as far as i...