FStream 1.4.9

Posted onby admin

Fstream: input & output Function Overloading Functors (Function Objects) I - Introduction Functors (Function Objects) II - Converting function to functor Functors (Function Objects) - General Git and GitHub Express. GTest (Google Unit Test) with Visual Studio 2012 Inheritance & Virtual Inheritance (multiple inheritance). FStream Mac 1.4.9 Ascolta le radio di tutto il mondo dal tuo computer Mac, grazie a FStream. Scarica FStream gratis, un sintonizzatore radio che funziona con Internet. Error: ENOTEMPTY, rmdir. GitHub Gist: instantly share code, notes, and snippets.

4 applications in this hubLast updated: Apr 16th 2014, 06:46 GMT

An internet radio is an audio service broadcasted via the web which, because of its online transmission method, is commonly referred as a webcast.

Web radio implies a continuous stream of audio content that user will not be able to replay or pause.
At most, one may use an audio recorder or a function in the audio player, if one exists, to record the audio content for later playback.
As opposed to traditional radios, users may be able to listen to an online radio regardless of their location.
Similar to classic radio stations, Internet radios also cover a wide range of interests: music radios, talk radios, sports radios, news radios, etc.

filed under:play, radio, player, webcast, listen, station

tell us how to improve this hubsuggest a new hub


Pianopub 1.5.7

Free Pandora radio player for the Mac

StarPlayr 3.1.1

New Breed of Sirius Player for the Mac

RED player 1.0.2

Now you can listen your favorite alternative radio stations online

FStream 1.4.9

A lightweight and unobtrusive application specially made to help you listen to Internet radio and ...

Standard Template Library (STL) III - Iterators - 2020

bogotobogo.com site search:

Iterators are used to step through the elements of collections of objects.

The major advantage of iterators is that they offer common interfaces for any container type. Understanding iterators is probably the key to understand the STL. Just as templates make algorithm independent of the type of data stored, iterators make the algorithms independent of the type of container used. They are, therefore, an essential component of the STL generic approach.

Algorithms should be independent of the data structure of the container itself as well as data type stored in the container. Templates provide a generic representation for the data type stored in a container. The iterators provide a generic representation of the process of moving through the values in a container.

An iterator is an object that can navigate over elements of STL containers. All iterator represents a certain position in a container. To make it work, iterators have the following basic operations which are exactly the interface of ordinary pointers when they are used to iterator over the elements of an array.

  1. Operator *
    Returns the element of the current position.
  2. Operator ++
    Lets the iterator step forward to the next element. Most iterators also allow backward stepping with operator --.
  3. Operator and !=
    Check whether two iterators represent the same position.
  4. Operator =
    Assigns an iterator (the position of the element to which it refers.

Though pointers also have the same properties listed above, there is a difference between pointer and iterators. The difference is that iterators may be smart pointers which can iterate over more complicated data structures of containers. The internal behavior of iterators depends on the data structure over which they iterate. So, each container type provides its own kind of iterator. In fact, each container class defines its iterator type as a nested class. As a result, iterators share the same interface but have different types.

All container classes provide the same basic member functions that enable them to use iterators to navigate their elements. The most important two functions are:

  1. begin()
    This returns iterator that represents the beginning of the elements in the container. The beginning is the position of the first element.
  2. end()
    This returns an iterator that represents the end of the elements in the container. The end is the position behind the last element. This is also called a past-the-end iterator.

begin() and end() define a half-open range that includes the first element but exclude the last: [begin(),end()). A half-open range has two advantages:

  1. We have a simple end criterion for loops that iterate over the elements: They simply march through until they meet end().
  2. It avoids special handling for empty ranges. For empty ranges, begin is equal to end().

Different algorithms have different requirements for iterators. A find() algorithm needs the ++ operator to be defined so the iterator can step through the container. It does not need write access but it needs read access.

The sort() algorithm, on the other hand, requires random access so that it can swap the two non-adjacent elements.

The STL defines five iterators and describes its algorithms in terms of which kinds of iterator it needs.

  1. Input Iterators
    The term input is used from the viewpoint of a program. In other words, information going from the container to the program is considered input. So, an input iterator is one that a program can use to read values from a container. Dereferencing an input iterator allows us to read a value from a container, but it does not allow us to alter the value. So algorithms that require an input iterator are algorithms that don't modify values of the container elements.

    One-way iterator. It can increment, but it can't back up.

    The data file:


    Note that accumulate() is from <numeric> and the signature is:

    where the value is usually 0 and it gets the accumulated value over the specified range.

  2. Output Iterators
    The term output indicates that the iterator is used for moving information from a program to a container. An output iterator is similar to an input iterator, except that dereferencing is guaranteed to allow a program to modify a value of container element but not to read it.

    Single-pass and write-only iterator.

  3. Forward Iterators
    Forward iterators use only the ++ operators for navigating through a container. So a forward iterator can only go forward through a container one element at a time. Unlike input and output iterators, however, it necessarily goes through a sequence of values in the same order each time we use it.

    Multiple-pass iterator.

    The example below calculates squares for a given vector using ForwardIterator:


  4. Bidirectional Iterators
    A bidirectional iterator has all the features of a forward iterator and adds support for the two decrement operators (prefix and postfix).

    The following code checks if a string is a palindrome. The comparison starts from both ends using bidirectional iterator:


  5. Random Access Iterators
    Some of the algorithms such as sort() and binary search() require the ability to jump directly to an arbitrary element of a container. A canonical algorithm such as the sort() is using RandomAccessIterator:

    This type of iterator has all the features of a bidirectional iterator, plus it adds operations such as pointer addition that support random access and relational operations for those of a bidirectional iterators.

    The code below outputs a random element of a vector using the RandomAccessIterator:


    Note that the ptrdiff_t is the type returned by the pointer subtraction operation between two pointers. THis is a signed integral type.


A const_iterator is equivalent to pointer to a constant. Iterator itself can change its value but not the underlying element. Another type of iterator is an iterator itself is a constant. This is quite useless since it can iterate among the element of the container. On the contrary, normal iterator can do anything: it can change its underlying elements, it can iterate through the elements of the container by changing its value. Below is an example:

Here is an example demonstrate the usage of iterators across several containers.

The output is:

copy() algorithm with ostream_iterator and istream_iterator

STL's copy() function copies elements from a range to a location identified by an iterator:

The copy() function copies the elements in the range [first,last) into the range [result, result + (lat - first)). It returns an iterator pointing one past the last copied-to location, result + (last - first). The result should not be in the range [first, last).In other words, the target can't overlap the source.

The copy() algorithm can copy data from one container to another. For example, it can copy an array into a vector:

The copy() function overwrites existing data in the destination container. So, the container should be large enough to hold the copied elements. As a result, we can't simply use copy() to put data in an empty vector.

In the example, we displayed the elements after we copied the elements. If there is an iterator representing the output stream, we can use it with copy().STL provides us such an iterator with the ostream_iterator template. It is an adapter , which is a class or function that converts an interface to another interface.. The following lines are doing exactly that:

The myOutputIterator iterator now becomes an interface that allows us to use cout for display. The first template argument, int, indicates the data type being sent to the output stream.The second template argument, char, indicates that the output stream uses character type. The cout which is the first constructor argument identifies the output steam being used. The character string argument is a separator to be displayed after each item sent to the output stream.

FStream 1.4.9

We could use the iterator something like this:

It works like:

This ostream_iterator, the line says send 2013 and then a string ' ' to the output stream controlled by cout. With copy(), we can use the iterator like this:

This copies the entire v container to the output stream. In other words, it displays the all the contents of the v:

Actually, we do not need named iterator, myOutputIterator, for our display, and use an anonymous iterator:

Instead of

Xstream 1.4.9 Jar Download

Please enable JavaScript to view the comments powered by Disqus.

Xstream 1.4.9 Download