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

Friday, September 16, 2016

C file I/O functions

C file I/O functions

    logic how to detect end of file:

  1. (stdio.h) library details can be found here::
  2. (math.h)library details can be found here::
  3. (cstring.h library )function memset
  4. function feof():: it contains goood library and function information. good reference
    /* feof example: byte counter */
    #include <stdio.h>
    
    int main ()
    {
      FILE * pFile;
      int n = 0;
      pFile = fopen ("myfile.txt","rb");
      if (pFile==NULL) perror ("Error opening file");
      else
      {
        while (fgetc(pFile) != EOF) {
          ++n;
        }
        if (feof(pFile)) {
          puts ("End-of-File reached.");
          printf ("Total number of bytes read: %d\n", n);
        }
        else puts ("End-of-File was not reached.");
        fclose (pFile);
      }
      return 0;
    }
    
  5. EOF, getc() and feof() in C
    #include <stdio.h>
     
    int main()
    {
      FILE *fp = fopen("test.txt", "r");
      int ch = getc(fp);
      while (ch != EOF) 
      {
        /* display contents of file on screen */
        putchar(ch); 
     
        ch = getc(fp);
      }
       
      if (feof(fp))
         printf("\n End of file reached.");
      else
         printf("\n Something went wrong.");
      fclose(fp);
         
      getchar();
      return 0;
    }
    
  6. Detecting EOF in C
  7. Checking if the file pointer has reached EOF without moving the file pointer?
  8. How to use EOF to run through a text file in C?
  9. End of File (EOF) in C
  10. the following section is about file I/O related functions.

  11. C scanf()
  12. C printf()
  13. C – printf and scanf
  14. C Programming Examples on File Handling
  15. File Handling in C Language:: good examples

    an example to write to a file from std input and display the file::

    #include<stdio.h>
    #include<conio.h>
    main()
    {
     FILE *fp;
     char ch;
     fp = fopen("one.txt", "w");
     printf("Enter data");
     while( (ch = getchar()) != EOF) {
        putc(ch,fp);
     }
     fclose(fp);
     fp = fopen("one.txt", "r");
     
     while( (ch = getc(fp)! = EOF)
        printf("%c",ch);
        
     fclose(fp);
    }
    

    another example::

    /* read and write to file */
    #include<stdio.h>
    #include<conio.h>
    struct emp
    {
       char name[10];
       int age;
    };
    
    void main()
    {
       struct emp e;
       FILE *p,*q;
       p = fopen("one.txt", "a");
       q = fopen("one.txt", "r");
       printf("Enter Name and Age");
       scanf("%s %d", e.name, &e.age);
       fprintf(p,"%s %d", e.name, e.age);
       fclose(p);
       do
       {
          fscanf(q,"%s %d", e.name, e.age);
          printf("%s %d", e.name, e.age);
       }
       while( !feof(q) );
       getch();
    }
    
  16. File Handling in C with Examples (fopen, fread, fwrite, fseek)
  17. File Handling in C Language
  18. Detecting EOF in C
  19. How to use EOF to run through a text file in C?

C file I/O functions

C file I/O functions

    logic how to detect end of file:

  1. (stdio.h) library details can be found here::
  2. (math.h)library details can be found here::
  3. (cstring.h library )function memset
  4. function feof():: it contains goood library and function information. good reference
    /* feof example: byte counter */
    #include <stdio.h>
    
    int main ()
    {
      FILE * pFile;
      int n = 0;
      pFile = fopen ("myfile.txt","rb");
      if (pFile==NULL) perror ("Error opening file");
      else
      {
        while (fgetc(pFile) != EOF) {
          ++n;
        }
        if (feof(pFile)) {
          puts ("End-of-File reached.");
          printf ("Total number of bytes read: %d\n", n);
        }
        else puts ("End-of-File was not reached.");
        fclose (pFile);
      }
      return 0;
    }
    
  5. EOF, getc() and feof() in C
    #include <stdio.h>
     
    int main()
    {
      FILE *fp = fopen("test.txt", "r");
      int ch = getc(fp);
      while (ch != EOF) 
      {
        /* display contents of file on screen */
        putchar(ch); 
     
        ch = getc(fp);
      }
       
      if (feof(fp))
         printf("\n End of file reached.");
      else
         printf("\n Something went wrong.");
      fclose(fp);
         
      getchar();
      return 0;
    }
    
  6. Detecting EOF in C
  7. Checking if the file pointer has reached EOF without moving the file pointer?
  8. How to use EOF to run through a text file in C?
  9. End of File (EOF) in C
  10. the following section is about file I/O related functions.

  11. C scanf()
  12. C printf()
  13. C – printf and scanf
  14. C Programming Examples on File Handling
  15. File Handling in C Language:: good examples

    an example to write to a file from std input and display the file::

    #include<stdio.h>
    #include<conio.h>
    main()
    {
     FILE *fp;
     char ch;
     fp = fopen("one.txt", "w");
     printf("Enter data");
     while( (ch = getchar()) != EOF) {
        putc(ch,fp);
     }
     fclose(fp);
     fp = fopen("one.txt", "r");
     
     while( (ch = getc(fp)! = EOF)
        printf("%c",ch);
        
     fclose(fp);
    }
    

    another example::

    /* read and write to file */
    #include<stdio.h>
    #include<conio.h>
    struct emp
    {
       char name[10];
       int age;
    };
    
    void main()
    {
       struct emp e;
       FILE *p,*q;
       p = fopen("one.txt", "a");
       q = fopen("one.txt", "r");
       printf("Enter Name and Age");
       scanf("%s %d", e.name, &e.age);
       fprintf(p,"%s %d", e.name, e.age);
       fclose(p);
       do
       {
          fscanf(q,"%s %d", e.name, e.age);
          printf("%s %d", e.name, e.age);
       }
       while( !feof(q) );
       getch();
    }
    
  16. File Handling in C with Examples (fopen, fread, fwrite, fseek)
  17. File Handling in C Language
  18. Detecting EOF in C
  19. How to use EOF to run through a text file in C?

JQuery application in ASP.NET and configuration

Saturday, September 10, 2016

Converting C source to C++

convert c project to c++

  1. Refactoring: Convert C to C++

    this is the first paper to review.

  2. Case Study: Converting C Programs to C++
  3. Converting C source to C++
  4. Differences between C and C++
  5. Converting a C or C++ nature for a project
  6. how to convert c to c++ code
  7. C to C++ converter
  8. Compiling C in Visual Studio.NET

    Go to View Menu select Solution Explorer or CTRL+ ALT +L
    Then Select The project that your are developing and right click on that.
    Then select the Properties from the submenu.
    Then select the Configuration properties from the Tree structure. under that select C/C++ then select Advanced. Now in the right side pane change the property Compile As from Compile as C++ Code (/TP) to Compile as C Code (/TC)
    Finally change your file extensions to .c
    Now you configured you Visual Studio to compile C programs


List topics

Saturday, August 27, 2016

how to set up SQL server database mail?

how to set up SQL server database mail?

  1. Setting up Database Mail for SQL 2005
  2. How to Set Up Database Mail for SQL Server Job Failures
  3. How to configure SQL Server Database Mail to send email using your Windows Live Mail Account or your GMail Account
  4. Setup SQL Server Database Mail to use a Gmail, Hotmail, Yahoo or AOL account
  5. SQL Server – Configure Database Mail to Send Email Using Gmail or Live Account
  6. Setting up Database Mail to use Gmail account for Presentations
  7. Configure Database Mail - Send Email From SQL Server Database
  8. SQL Server 2005 Database Mail Setup and Configuration Scripts
  9. Configure Database Mail
  10. Setting up Database Mail in SQL Server 2005
  11. Sending E-mail with Database Mail in SQL Server 2005
  12. SQL SERVER – 2008 – Configure Database Mail – Send Email From SQL Database
  13. How to configure Database Mail in SQL Server 2005 to send mail
  14. Database Mail in SQL Server 2005

how to set up SQL server database mail?

how to set up SQL server database mail?

  1. Setting up Database Mail for SQL 2005
  2. How to Set Up Database Mail for SQL Server Job Failures
  3. How to configure SQL Server Database Mail to send email using your Windows Live Mail Account or your GMail Account
  4. Setup SQL Server Database Mail to use a Gmail, Hotmail, Yahoo or AOL account
  5. SQL Server – Configure Database Mail to Send Email Using Gmail or Live Account
  6. Setting up Database Mail to use Gmail account for Presentations
  7. Configure Database Mail - Send Email From SQL Server Database
  8. SQL Server 2005 Database Mail Setup and Configuration Scripts
  9. Configure Database Mail
  10. Setting up Database Mail in SQL Server 2005
  11. Sending E-mail with Database Mail in SQL Server 2005
  12. SQL SERVER – 2008 – Configure Database Mail – Send Email From SQL Database
  13. How to configure Database Mail in SQL Server 2005 to send mail
  14. Database Mail in SQL Server 2005

Saturday, August 20, 2016

how to back cloud file from Cloud?

how to back cloud file from Cloud?

    However I have two guides that will assist in (a) exporting the image and (b) downloading the image to your local machine. Both guides will be needed

  1. HOWTO: Using the Cloud Images API to export/import images
  2. Use Swiftly to download an exported image
  3. Install the Swiftly client for Cloud Files
  4. RackConnect API 3.0

    How to download saved data from cloud?

    At the top of the main page of your cloud account portal, click on "Storage" and then "Files" from the drop-down menu. This will bring you to the Cloud Files page.

    Files are stored in containers, so most likely your files are under the "z_DO_NOT_DELETE_CloudBackup_v2_0_e68969a4-3390-4df2-8487-72c0881f66b5" container


Saturday, August 6, 2016

SSL certificate process

SSL certificate process.
first step is to copy current SSL certification from your current SSL certificate.
second step is to upload this info(in a text file) your server for further copy & paste into CSR request.

  1. IIS 7: Generate CSRs (Certificate Signing Requests)
  2. Request an SSL certificate