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 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?

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 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

Saturday, July 30, 2016

how to set up FTP account on Windows server?

how to set up FTP account on Windows server?

  1. Configure FTP Server in Windows Server 2012
  2. Installing and enabling IIS and FTP on Windows Server 2008 R2
  3. How to disable FTP access on Windows Server 2008?
  4. Deploying Windows Firewall Settings With Group Policy
  5. Enable or Disable Anonymous Authentication
  6. Creating and Configuring FTP Sites in Windows Server 2003
  7. 10 Steps to a Secure FTP Server
  8. FTP Server with User Isolation on Windows Server 2012 R2
  9. Create an IIS 7.5 FTP site (Windows Server 2008 R2)
  10. How to manually add an FTP account
  11. FTP restrict user access to a specific folder
  12. Changing the home folder for ftp user in windows server 2008 R2
  13. How to setup FTP Server
  14. How to Configure FTP User Isolation in IIS 7.5 on Windows 2008 Server R2
  15. How to : Add Windows 2008 firewall rule to allow active FTP client
  16. Configuring FTP Firewall Settings in IIS 7
  17. How to Configure Windows Firewall for a Passive Mode FTP Server
  18. Windows Server 2008 R2 Configuring the firewall for an FTP Server
  19. Install, Set Up & Access an FTP on Windows 2008 Server

how to backup MS SQL server database

Application Icon configurations

Application Icon configurations

  1. Use icons in your application

Saturday, June 18, 2016

C Graphics library

C Graphics library

  1. Using the WinBGIm Graphics Library with Visual Studio 2005/2008
  2. this is the only demo that works for Visual Studio 2008. just follow the instructions from the website. I have some questions: where are these .obj files are configured other than in the .vcproj file? this configuration needs future understanding.

    I find the linker configuration in Visual C++ 2008:

    project property==>configuration properties==>linker==>commandline: copy the following command into additional options section

    gdi32.lib comdlg32.lib uuid.lib oleaut32.lib ole32.lib user32.lib obj/bgiout.obj obj/dibutil.obj obj/drawing.obj obj/file.obj obj/misc.obj obj/mouse.obj obj/palette.obj obj/text.obj obj/winbgi.obj obj/winthread.obj

  3. VC2008, how to turn CLR flag off for individual files in C++/CLI project
  4. Performance of pure native C++ class in a managed C++/CLI DLL comp VC.NET
  5. graphics.h
  6. functions of graphics.h
  7. Borland Graphics Interface (BGI) for Windows
  8. Borland BGI Graphics emulation for the MingW (GCC port) Compiler
  9. How to setup winBGIm library in codeblock
  10. Fastest method for pixel plot in windows form application using c sharp sample example
  11. graphics.h
  12. How I can get and use the header file in my C++ program?
  13. Cannot open include file: 'graphics.h': No such file or directory
  14. Borland Graphics Interface and are usually available for 16 bit DOS applications
  15. Arc function in c
  16. Using the WinBGI Graphics Package
  17. this is a good demo to try. understand the details. create a VC++ project and play around with it.

  18. Graphics in C Language
  19. good article to show graphics in C.

  20. 256-Color VGA Programming in C
  21. 256-Color VGA Programming in C
  22. Simple C++ Graphics Library
  23. How I can get and use the header file in my C++ program?
  24. Setting up SDL in Visual Studio.NET 2005/2008 Express
  25. C++ Graphics Library in Visual Studio and Eclipse
  26. C/C++ Graphics Tutorial 1 | Downloading graphics.h header file for Code Blocks
  27. Borland BGI Graphics emulation for the MingW (GCC port) Compiler
  28. Download the WinBGIm 6.0 library for MingW 5.x.x and follow the instruction from youtube video. need to remove few lines graphics.h file and configure the lib and include directory.


C Graphics library

C Graphics library

  1. Using the WinBGIm Graphics Library with Visual Studio 2005/2008
  2. this is the only demo that works for Visual Studio 2008. just follow the instructions from the website. I have some questions: where are these .obj files are configured other than in the .vcproj file? this configuration needs future understanding.

    I find the linker configuration in Visual C++ 2008:

    project property==>configuration properties==>linker==>commandline: copy the following command into additional options section

    gdi32.lib comdlg32.lib uuid.lib oleaut32.lib ole32.lib user32.lib obj/bgiout.obj obj/dibutil.obj obj/drawing.obj obj/file.obj obj/misc.obj obj/mouse.obj obj/palette.obj obj/text.obj obj/winbgi.obj obj/winthread.obj

    we can not turn off compiler /clr option. otherwise it will fail to compile.

  3. VC2008, how to turn CLR flag off for individual files in C++/CLI project
  4. Performance of pure native C++ class in a managed C++/CLI DLL comp VC.NET
  5. graphics.h
  6. functions of graphics.h
  7. Borland Graphics Interface (BGI) for Windows
  8. Borland BGI Graphics emulation for the MingW (GCC port) Compiler
  9. How to setup winBGIm library in codeblock
  10. Fastest method for pixel plot in windows form application using c sharp sample example
  11. graphics.h
  12. How I can get and use the header file in my C++ program?
  13. Cannot open include file: 'graphics.h': No such file or directory
  14. Borland Graphics Interface and are usually available for 16 bit DOS applications
  15. Arc function in c
  16. Using the WinBGI Graphics Package
  17. this is a good demo to try. understand the details. create a VC++ project and play around with it.

  18. Graphics in C Language
  19. good article to show graphics in C.

  20. 256-Color VGA Programming in C
  21. 256-Color VGA Programming in C
  22. Simple C++ Graphics Library
  23. How I can get and use the header file in my C++ program?
  24. Setting up SDL in Visual Studio.NET 2005/2008 Express
  25. C++ Graphics Library in Visual Studio and Eclipse
  26. C/C++ Graphics Tutorial 1 | Downloading graphics.h header file for Code Blocks
  27. Borland BGI Graphics emulation for the MingW (GCC port) Compiler
  28. Download the WinBGIm 6.0 library for MingW 5.x.x and follow the instruction from youtube video. need to remove few lines graphics.h file and configure the lib and include directory.