On This Page Features Sensors Uses What You'll Get What You'll Need Expansion Options Pricing |
Trilobot Research Robot
JavaScript Tutorial
Browser and Document Objects
This chapter marks the first of nine tutorial chapters tailored to Web
authors who have at least basic grounding in HTML concepts.
This chapter marks the first of nine tutorial chapters tailored to Web
authors who have at least basic grounding in HTML concepts.
12 Technical Indicators that Really Work
TECHNICAL INDICATORS
Technical indicators have become more important than Fundamentals. With the proper use of technical indicators investors are able to determine what stocks to buy or sell and when. The most important aspect of technical indicators are the PARAMETERS.
Technical indicators have become more important than Fundamentals. With the proper use of technical indicators investors are able to determine what stocks to buy or sell and when. The most important aspect of technical indicators are the PARAMETERS.
C++ Templates: The Complete Guide The Basics Expression Templates
Expression Templates
In this chapter we explore a template programming technique
called expression templates. It was originally
invented in support of numeric array classes, and that is also the context in
which we introduce it here.
C++ Templates: The Complete Guide The Basics
Metaprograms
Metaprogramming consists of
"programming a program." In other words, we lay out code that the programming
system executes to generate new code that implements the functionality we really
want. Usually the term metaprogramming implies a
reflexive attribute: The metaprogramming component is part of the program for
which it generates a bit of code/program.
C++ Templates: The Complete GuideTemplates and Inheritance
Templates and Inheritance
A priori, there might be no reason to think that templates and
inheritance interact in interesting ways. If anything, we know from Chapter 9 that deriving from
dependent base classes forces us to deal carefully with unqualified names.
However, it turns out that some interesting techniques make use of so-called
parameterized inheritance. In this chapter we
describe a few of these techniques.
C++ Templates: The Complete Guide Traits and Policy Classes
Traits and Policy Classes
Traits and Policy Classes
Templates enable us to parameterize classes and functions for
various types. It could be tempting to introduce as many template parameters as
possible to enable the customization of every aspect of a type or algorithm. In
this way, our "templatized" components could be instantiated to meet the exact
needs of client code.
C++ Templates: The Complete Guide Class Templates
Class Templates
Templates and Design
Programs are generally constructed using designs that map relatively well on the mechanisms offered by a chosen programming language. Because templates are a whole new language mechanism, it is not surprising to find that they call for new design elements. We explore these elements in this part of the book.
C++ Templates: The Complete Guide The Basics
C++ Templates: The Complete Guide
|
java script
Introduction to JavaScript
Like many technologies that have enjoyed success and sticking power, JavaScript has taken
on new purpose and relevance since its creation many years ago. It ’ s no longer correct to say that
JavaScript is just a scripting language or even just for the web.
Like many technologies that have enjoyed success and sticking power, JavaScript has taken
on new purpose and relevance since its creation many years ago. It ’ s no longer correct to say that
JavaScript is just a scripting language or even just for the web.
Opengl in VC++
Using OpenGL in Visual C++
Series Overview
With the release of NT 3.5, OpenGL became a part of the Windows operating system. Now with support
for OpenGL in Windows 95 and Windows 98 and low priced graphics accelerators becoming readily
available even on low end machines, the prospects of using OpenGL on any Windows machine is
becoming more attractive every day. If you are interested in creating quality 2-D or 3-D graphics in
Windows, or if you already know another variant of GL, keep reading. This tutorial will show you how to
use OpenGL and some of its basic commands.
Series Overview
With the release of NT 3.5, OpenGL became a part of the Windows operating system. Now with support
for OpenGL in Windows 95 and Windows 98 and low priced graphics accelerators becoming readily
available even on low end machines, the prospects of using OpenGL on any Windows machine is
becoming more attractive every day. If you are interested in creating quality 2-D or 3-D graphics in
Windows, or if you already know another variant of GL, keep reading. This tutorial will show you how to
use OpenGL and some of its basic commands.
Miscellaneous Functions
Miscellaneous Functions
Overview
The standard function library defines several utility functions. They include various conversions, variable-length argument processing, sorting and searching, and random number generation. Many of the functions covered here require the use of the C header <stdlib.h> or its C++ equivalent <cstdlib>. This chapter will use the C header name, but references to <stdlib.h> also apply to <cstdlib>.
The .NET Managed Extensions to C++
The .NET Managed Extensions to C++
Overview
Microsoft’s .NET Framework defines an environment that supports the development and execution of highly distributed, component-based applications. It enables differing computer languages to work together and provides for security, program portability, and a common programming model for the Windows platform. Although the .NET Framework is a relatively recent addition to computing, it is an environment in which many C++ programmers will likely be working in the near future.
Library Features Added by C99
Library Features Added by C99
The C99 Standard added features to the C library two ways. First, it added functions to headers previously defined by C89. For example, significant additions were made to the mathematics library supported by the <math.h> header. These additional functions were covered in the preceding chapters. Second, new categories of functions, ranging from support for complex arithmetic to type-generic macros, were created, along with new headers to support them. These new library elements are described in this chapter. Keep in mind that none of the features described here are supported by C++.
The C++ String, Exception, Complex, and Pair Classes
The C++ String, Exception, Complex, and Pair Classes
The C++ String, Exception, Complex, and Pair Classes
In addition to the iostream library and the STL, the C++ standard library defines several other classes. While many of these are special-purpose classes, which are not discussed in this book, four are widely used, supporting strings, exceptions, complex arithmetic, and pairs of values. They are described here.
The C++ Standard Template
The C++ Standard Template
Library
A significant subset of the C++ class library is formed by the standard template library, or STL. The STL provides general-purpose templatized classes and functions that implement many popular and commonly used algorithms and data structures. For example, it includes support for vectors, lists, queues, and stacks. It also defines various routines that access them. Because the STL is constructed from template classes, the algorithms and data structures can be applied to nearly any type of data.
The version of the STL described here is the one specified by ANSI/ISO C++ Standard. Older compilers may present a slightly different version of the STL.
The ANSI/ISO Standard C++ I/O Classes
The ANSI/ISO Standard C++ I/O Classes
C++ I/O Classes
As explained in Chapter 14, there are two versions of C++’s iostream library: the old style defined by early versions of C++, and the modern approach as defined by the ANSI/ISO Standard for C++ (Standard C++). The old-style library was described in the preceding section. The Standard C++ iostream library is described here.
The Old-Style C++ I/O System
The Old-Style C++ I/O System
Overview
Because C++ includes the entire C library, it supports the use of C’s I/O system. However, C++ also defines its own class-based, object-oriented I/O system, which is referred to as the iostream library. When writing C++ programs, you will usually want to use the iostream library rather than C-based I/O.
The Wide-Character Functions
The Wide-Character Functions
Overview
In 1995, a number of wide-character functions were added to the C89 standard, and were later incorporated into C99 and C++. The wide-character functions operate on characters of type wchar,,t, which are 16 bits. For the most part, these functions parallel their char equivalents. For example, the function iswspace( ) is the wide-character version of ispasse. In general, the wide-character functions use the same names as their char equivalents, except that a “w” is added.
c/c++ The C Mathematical Functions
c/c++ The C Mathematical Functions
Overview
C and C++ define a rich and varied set of mathematical functions. Originally, both C and C++ supported the same set of 22 math functions. However, as C++ matured, it added to these original functions. Then, C99 greatly increased the size of the C math library. The net result of these changes is that today, the C and C++ math libraries have diverged. For this reason, the C math functions (including those added by C99) are described here. Chapter 9 describes the C++ math functions. Keep in mind that the original, core set of C math functions is still fully supported by all versions of C and C++.
The C++ Mathematical Functions
The C++ Mathematical Functions
Overview
As explained in Chapter 8, both C and C++ originally supported the same set of 22 math functions. However, as C++ matured, it added overloaded versions of these original functions. Then, C99 greatly increased the size of the C math library in ways that C++ does not support. The net result of these changes is that today, the C and C++ math libraries have diverged, although both still support the original core set of math functions. Because of the differences between C and C++ in this area, the C math functions (including those added by C99) are described in Chapter 8. This chapter describes the math functions defined by C++.
In C++, the math functions require the header <cmath>. In addition to declaring the math functions, this header defines the macro called HUGE_VAL. The macros EDOM and ERANGE are also used by the math functions. These macros are defined in the header <cerrno>. If an argument to a math function is not in the domain for which it is defined, an implementation-defined value is returned, and the built-in global integer variable errno is set equal to EDOM. If a routine produces a result that is too large to be represented, an overflow occurs. This causes the routine to return HUGE_VAL, and errno is set to ERANGE, indicating a range error. If an underflow happens, the function returns zero and sets errno to ERANGE.
C++ supports the original math functions defined by C89. However, in C89, these functions operate only on floating-point values of type double. To these functions, C++ adds overloaded versions that explicitly accommodate values of type float and long double. The operation of the functions is otherwise unchanged.
All angles are in radians.
c/c++ Time, Date, and Localization Functions
Time, Date, and Localization Functions
Overview
The C/C++ standard library defines several functions that deal with the date and time. It also defines functions that handle the geopolitical information associated with a program. These functions are described here.
In C, the time and date functions require the header <time.h>. For C++, the header is <ctime>. For ease of discussion, this chapter will use the C header name, but references to <time.h> also apply to <ctime>.
In <time.h> are defined three time-related types: clock_t, time_t, and tm. The types clock_t and time_t are capable of representing the system time and date as some sort of integer. This is called the calendar time. The structure type tm holds the date and time broken down into its elements. The tm structure contains the following members:
The Dynamic Allocation Functions
The Dynamic Allocation Functions
Overview
This chapter describes the C/C++ dynamic allocation functions. At their core are malloc( ) and free( ). Each time malloc( ) is called, a portion of the remaining free memory is allocated. Each time free( ) is called, memory is returned to the system. The region of free memory from which memory is allocated is called the heap. For a C program, the prototypes for the dynamic allocation functions are in <stdlib.h>. For C++, the header is <cstdlib>. For ease of discussion, this chapter will use the C header name, but references to <stdlib.h> also apply to <cstdlib>.
c++ Operators
Operators
C/C++ has the following seven arithmetic operators:
Operator | Action |
---|---|
– | Subtraction, unary minus |
+ | Addition |
* | Multiplication |
/ | Division |
% | Modulus |
– – | Decrement |
+ + | Increment |
The +, –, *, and / operators work in the expected fashion. The % operator returns the remainder of an integer division. The increment and decrement operators increase or decrease the operand by one.
These operators have the following order of precedence:
c++ The String and Character Functions
The String and Character Functions
Overview
The C/C++ function library has a rich and varied set of string- and character-handling functions. The string functions operate on null-terminated arrays of characters. In C, the string functions require the header <string.h> and the character functions use <ctype.h>. In C++, the string and character function headers are <cstring> and <cctype>, respectively. For ease of discussion, this chapter will use the C header names.
c++ The Standard C I/O Functions
The Standard C I/O Functions
Overview
This chapter describes the standard C I/O functions. It includes the functions defined by C89 and those added by C99. The functions defined by C89 are also supported by C++, and there is no fundamental reason that you cannot use them in a C++ program when you deem it appropriate.
In C, the header associated with the I/O functions is <stdio.h>. In C++, this header is called <cstdio>. For ease of discussion, this chapter will use the C header name, but references to <stdio.h> also apply to <cstdio>.
Subscribe to:
Posts (Atom)