Saturday, October 29, 2016

extends List in C#

C refactoring

C union in C#

C union examples

Friday, October 21, 2016

NSE india market

India has two markets: NSE STOCK MARKET and BSE stock market.

  1. Getbhavcopy

    Getbhavcopy is a FREE data downloader for Indian Stock Exchanges, NSE (National Stock Exchange) and BSE (Bombay Stock Exchange).
    It downloads daily EOD (End Of Day) data as well as historical data (past EOD data) for equities and indices. The data is directly downloaded from NSE and BSE servers and is 100% authentic. The downloaded data can be directly imported into all leading technical analysis software like Metastock and Amibroker.
    Now download data at your will, from NSE and BSE servers directly. Get total control and that too for FREE.

  2. How to Receive NSE Feed Using UDP
  3. NSE EOD data downloader
  4. Security-wise Archives (Equities)
  5. Historical Index Data
  6. Extracting EOD Data from NSE
  7. NSE BSE Data downloader
  8. How to Automatically Download Index Data from NSE – Part One
  9. NSE EOD Data Downloader
  10. NSE EOD Data Downloader
  11. Historical Stock Data

Saturday, October 15, 2016

C program file dependency

C program file dependency

  1. DRW company
  2. Writing Larger Programs
  3. Compiling, linking, Makefile, header files
  4. Walkthrough: Compiling a C Program on the Command Line
  5. visual c++: #include files from other projects in the same solution
  6. Top 10 C++ header file mistakes and how to fix them
  7. Displaying the #include hierarchy for a C++ file in Visual Studio
  8. Multiple source files in C- How exactly do makefiles work?
  9. How should I detect unnecessary #include files in a large C++ project?
  10. Projects in Visual C++ 2010 – Part 2: Project Dependencies
  11. Tool to track #include dependencies [closed]
  12. Why you should care about include dependencies in C/C++ and how to keep them at a minimum
  13. How to: Organize Project Output Files for Builds
  14. C Programming Boot Camp
  15. Fixing header file dependencies
  16. Modules, Separate Compilation, Make Files
  17. Writing Make Files
  18. Chapter 2. Compiling a Program
  19. Makefiles
  20. C++ header dependency tricks
  21. MS Visual C++ #include dependencies

C program file organization and dependency

C program file dependency: how to organize C project in Visual C++ with Visual Studio 2008.

  1. DRW company
  2. Writing Larger Programs
  3. Compiling, linking, Makefile, header files
  4. Walkthrough: Compiling a C Program on the Command Line
  5. visual c++: #include files from other projects in the same solution
  6. Top 10 C++ header file mistakes and how to fix them
  7. Displaying the #include hierarchy for a C++ file in Visual Studio
  8. Multiple source files in C- How exactly do makefiles work?
  9. How should I detect unnecessary #include files in a large C++ project?
  10. Projects in Visual C++ 2010 – Part 2: Project Dependencies
  11. Tool to track #include dependencies [closed]
  12. Why you should care about include dependencies in C/C++ and how to keep them at a minimum
  13. How to: Organize Project Output Files for Builds
  14. C Programming Boot Camp
  15. Fixing header file dependencies
  16. Modules, Separate Compilation, Make Files
  17. Writing Make Files
  18. Chapter 2. Compiling a Program
  19. Makefiles
  20. C++ header dependency tricks
  21. MS Visual C++ #include dependencies

CString in C++

_tmain vs main in C++

C boolean type

C boolean type is not defined in standard C language before C99. the option 3) is my choice.

Option 1

typedef int bool;
#define true 1
#define false 0
Option 2

typedef int bool;
enum { false, true };
Option 3

typedef enum { false, true } bool;
Option 4 (C99)

#include <stdbool.h>
Explanation

Options 1, 2 and 3 will have in practice the same identical behavior. #2 and #3 don't use #defines though, which in my opinion is better.
Option 4 will work only if you use C99 and it's the "standard way" to do it. Choose this if possible.
If you are undecided, go with #3!

  1. Using boolean values in C
  2. Use of bool in C
  3. Boolean Values
  4. True and False in C
  5. 3.3 Boolean Expressions
  6. Boolean type support library

dynamic memory allocation

Friday, October 14, 2016

Saturday, October 1, 2016

C header file

C variable name length limit

Original C dictates that

  • The first 31 chars of an internal (i.e. not an external variable) variable name is significant.
  • The first 6 characters of an function name or external variable is significant
For C99 this is 63 and 61 chars
For C++ (GCC 1024, MS 2048)

another posting says:

  • Microsoft C++: 2048 characters
  • Intel C++: 2048 characters
  • g++: No limit, as answered in this question: is there a length limit on g++ variable names?

another posting says:

    Annex B of the C++ Standard says that an implementation should support identifiers at least 1024 characters long, but this is not mandatory.

The C standard, section 5.2.4.1 says:

  • 63 significant initial characters in an internal identifier or a macro name (each universal character name or extended source character is considered a single character)
  • 31 significant initial characters in an external identifier (each universal character name specifying a short identifier of 0000FFFF or less is considered 6 characters, each universal character name specifying a short identifier of 00010000 or more is considered 10 characters, and each extended source character is considered the same number of characters as the corresponding universal character name, if any)
It also contains a footnote:
Implementations should avoid imposing fixed translation limits whenever possible. So you should check your documentation to see if your compiler supports a greater number of significant characters in identifiers.

  1. Rules For Constructing Variable Name

    Characters Allowed :

    • Underscore(_)
    • Capital Letters ( A – Z )
    • Small Letters ( a – z )
    • Digits ( 0 – 9 )
    • Blanks & Commas are not allowed
    • No Special Symbols other than underscore(_) are allowed
    • First Character should be alphabet or Underscore
    • Variable name Should not be Reserved Word

  2. Naming Rules for Variables

    • Variable names in Visual C++ can range from 1 to 255 characters. To make variable names portable to other environments stay within a 1 to 31 character range.
    • All variable names must begin with a letter of the alphabet or an underscore( _ ). For beginning programmers, it may be easier to begin all variable names with a letter of the alphabet.
    • After the first initial letter, variable names can also contain letters and numbers. No spaces or special characters, however, are allowed.
    • Uppercase characters are distinct from lowercase characters. Using all uppercase letters is used primarily to identify constant variables.
    • You cannot use a C++ keyword (reserved word) as a variable name.

  3. C/C++ – Variable and method name length limit
  4. What is max length for an C/C++ identifier on common (build) systems?
  5. Identifiers (C++)
  6. Max identifier length
  7. Variable Names

    In C the length of a variable name is unlimited (although the first 31 characters must be unique). So variable names like these:
    disk_name total_count last_entry
    are legal.

  8. File Basics, Comments, and Program Headings
  9. Style and Program Organization
  10. Statement Formatting
  11. Statement Details
  12. Preprocessor
  13. Directory Organization and Makefile Style