first commit

This commit is contained in:
Jose Caban
2025-06-07 11:34:38 -04:00
commit 0eb2d7c07d
4708 changed files with 1500614 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
For the series: 1 2 3 4 5 6 7 8 9 10 where N = 10
The sum = (N * N + N) / 2 = 55
The product = N! = 3628800

View File

@@ -0,0 +1,8 @@
For the vector:
1 1 2 3 5 8 13 21 34 55
The differences between adjacent elements are:
1 0 1 1 2 3 5 8 13 21
The products of adjacent elements are:
1 1 2 6 15 40 104 273 714 1870

View File

@@ -0,0 +1,6 @@
For the list: 3 4 5 6 7 8
When the iterator is initialized to l.begin (),
it points to 3
After advance (itr, 4), the iterator points to 7

View File

@@ -0,0 +1,4 @@
X::X (12345)
b destroyed
12345
X::~X [12345]

View File

@@ -0,0 +1,3 @@
Container contents: 0 1 2 2 2 2 3 4 6 7
The number 3 was found
The number 11 was NOT found

View File

@@ -0,0 +1 @@
3 3 3

View File

@@ -0,0 +1,4 @@
4....:....3....:....2....:....1....:....0
b = 5: 0000000000000000000000000000000000000101
b = ~b: 1111111111111111111111111111111111111010
b <<= 38: 1000000000000000000000000000000000000000

View File

@@ -0,0 +1,14 @@
Before:
<EFBFBD> <20> <20> a <20> <20> <20> <20> <20>
.................
.................
After in:
<EFBFBD> <20> <20> a <20> <20> <20> <20> <20>
.................
<EFBFBD> I I a <20> U <20> <20> o
After out:
<EFBFBD> I I <20> <20> U <20> <20> <20>
.................
<EFBFBD> I I a <20> U <20> <20> o

View File

@@ -0,0 +1,6 @@
String 1 : blue
String 2 : blues
Strings "blue" and "blue" should compare equal : equal
Strings "blue" and "blues" should compare NOT equal : not equal
Normalized hash value for "blue" : 431029
Normalized hash value for "blues" : 6896579

View File

@@ -0,0 +1 @@
a = (0.000001,-0.000287), b = (58.219883,69.735392)

View File

@@ -0,0 +1,4 @@
1 2 3 4
1 2 3 4
1 2 3 4
1 2 3 4

View File

@@ -0,0 +1,4 @@
sequence: { 1 2 3 4 5 5 7 8 9 10 }
number of fives: 2
number of sixes: 0
number of values less than 8: 7

View File

@@ -0,0 +1,4 @@
1
0
P
BLUES POWER

View File

@@ -0,0 +1,5 @@
ace of spades
king of spades
queen of spades
jack of spades
ten of spades

View File

@@ -0,0 +1,4 @@
For the vector: 3 4 5 6 7 8
When the iterator is initialized to point to 6
The distance between the beginning and 6 is 3

View File

@@ -0,0 +1 @@
{ 1 2 3 4 } == { 1 2 4 3 } --> false

View File

@@ -0,0 +1,4 @@
The equal range for 3 is: (3 , 4)
The equal range for 2 is: (2 , 3)

View File

@@ -0,0 +1 @@
Caught an exception: std::cin: stream object has set ios::eofbit

View File

@@ -0,0 +1,89 @@
/***************************************************************************
*
* filebuf.cpp - basic_filebuf example
*
* $Id: filebuf.cpp 550991 2007-06-26 23:58:07Z sebor $
*
***************************************************************************
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
* implied. See the License for the specific language governing
* permissions and limitations under the License.
*
* Copyright 1994-2006 Rogue Wave Software.
*
**************************************************************************/
#include <fstream> // for filebuf, ifstream, istream
#include <iostream> // for cout, endl
#include <cstdio> // for tmpnam(), remove()
#include <examples.h>
int main ()
{
#ifndef _RWSTD_NO_EXT_FILEBUF
// use an extension of this implementation: NULL file name argument
// creates a temporary file; closing the file stream object or its
// associated filebuf removes the temporary file
const char* const fname = 0;
#else // if defined (_RWSTD_NO_EXT_FILEBUF)
char fnamebuf [L_tmpnam];
// create a temporary filename
const char* const fname = std::tmpnam (fnamebuf);
if (!fname)
return 1;
#endif // _RWSTD_NO_EXT_FILEBUF
// create a filebuf object for reading and writing of a temporary file
std::filebuf outbuf;
outbuf.open (fname, std::ios::in | std::ios::out | std::ios::trunc);
// set the internal character buffer size
// buffer will be allocated internally and deallocated in object dtor
outbuf.pubsetbuf (0, 256);
// associate the filebuf object with an iostream object
std::iostream out (&outbuf);
// open this source code file and output it to the temporary file
out << std::ifstream (__FILE__).rdbuf ();
// seek to the beginning of the stream
out.seekp (0);
// output the contents of the `out' object to standard output
std::cout << out.rdbuf ();
// close the filebuf object before removing the underlying file
outbuf.close ();
if (fname) {
// remove the temporary file if it has a name
// otherwise, if fname is NULL, the temporary file will
// have already been automatically removed by the call
// to close() above
std::remove (fname);
}
return 0;
}

View File

@@ -0,0 +1,4 @@
9 9 9 9
7 7 7 4
11 11 11 11 11
5 5 5

View File

@@ -0,0 +1 @@
3 3 2 2

View File

@@ -0,0 +1,3 @@
For the sequences { 0 1 6 5 3 2 2 6 5 7 } and { 6 5 }
both versions of find_first_of point to: 6
both versions of find_end point to: 6

View File

@@ -0,0 +1,2 @@
For the vectors { 0 1 2 2 3 4 2 2 6 7 } and { 6 4 }
both versions of find_first_of point to: 4

View File

@@ -0,0 +1,7 @@
hex 1234: 0x1234
hex 2345: 0x2345
dec 3456: 3456
oct 4567: 4567
hex 5678: 0x5678
hex 6789: 0x6789
hex 789a: 0x789a

View File

@@ -0,0 +1,5 @@
2
4
6
8
10

View File

@@ -0,0 +1,12 @@
Deutsch:
Dieses ist die Geschichte eines Mannes.
Francais:
C'est l'histoire d'un homme.
English:
This is the story of a man.
Dieses ist die Geschichte eines Mannes.
This is the story of a man.
C'est l'histoire d'un homme.

View File

@@ -0,0 +1,5 @@
The following numbers:
1 2 3 4 5 6 7
Have the factorials:
1 2 6 24 120 720 5040

View File

@@ -0,0 +1,4 @@
2 4 8 16
2 4 8 4
2 4 8 16 32
2 4 8

View File

@@ -0,0 +1,24 @@
original valarray vi
[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]
vi[gslice(0,{3,3,3},{9,3,1})]
[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]
vi[gslice(9,{3,3},{3,1})]
[9,10,11,12,13,14,15,16,17]
vi[gslice(3,{3,3},{9,1})]
[3,4,5,12,13,14,21,22,23]
vi[gslice(1,{3,3},{3,9})]
[1,10,19,4,13,22,7,16,25]
vi[gslice(0,{3,3},{3,10})]
[0,10,20,3,13,23,6,16,26]

View File

@@ -0,0 +1,15 @@
original valarray vi:
[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]
vi[gslice(0,[4,2],[4,6])]
[0,6,4,10,8,14,12,18]
vi[gslice(2,[4,2],[4,6])]
[2,8,6,12,10,16,14,20]
vi[gslice(0,[4,2],[4,8])] *= vi[gslice(2,[4,2],[4,6])]
[0,1,2,3,24,5,48,7,80,9,120,11,168,13,224,15,16,17,360,19,20,21]

View File

@@ -0,0 +1,2 @@
std::has_facet<std::ctype<char> >(std::cout.getloc ()) = true
std::has_facet<MyFacet>(std::cout.getloc ()) = false

View File

@@ -0,0 +1,8 @@
4 2 3 1
4 3 2 1
3 2 1 4
3 1 2 4
4 3 1 2
4 3 2 1
1 2 3 4
1 2 3 4

View File

@@ -0,0 +1,24 @@
Le
minot
passait
la
piece
a
frotter.
Le
minot
passait
la
piece
a
frotter.
Le minot passait la piece a frotter.
0xa
012
10
10
10
10

View File

@@ -0,0 +1,4 @@
The set: 1 2 3 4 5 6 7 8 9 10
INCLUDES 3 5 7 8 , and
DOES NOT INCLUDE 2 4 6 8 10 12

View File

@@ -0,0 +1,11 @@
original valarray vi
[0,1,2,3,4,5,6,7,8,9]
vi[0,2,3,4,7,8]
[0,2,3,4,7,8]
vi[0,2,3,4,7,8] += vi[0,2,3,4,7,8]
[0,1,4,6,8,5,6,14,16,9]

View File

@@ -0,0 +1,3 @@
For the sets of numbers: { -2 -3 -2 } and { 6 -3 -2 }
The inner product is: 1
The wacky result is: 8

View File

@@ -0,0 +1,11 @@
Start with a deque:
3 4 7 8
Use an insert_iterator:
3 4 5 6 7 8
Use a front_inserter:
1 1 1 1 3 4 5 6 7 8
Use a back_inserter:
1 1 1 1 3 4 5 6 7 8 1 1 1 1

View File

@@ -0,0 +1,8 @@
UCS-2: U+61 ==> UTF-8: "a"
UCS-2: U+61 U+62 U+63 ==> UTF-8: "abc"
UCS-2: U+391 ==> UTF-8: "\xce\x91"
UCS-2: U+391 U+392 ==> UTF-8: "\xce\x91\xce\x92"
UCS-2: U+391 U+392 U+393 ==> UTF-8: "\xce\x91\xce\x92\xce\x93"
UCS-2: U+f20 ==> UTF-8: "\xe0\xbc\xa0"
UCS-2: U+f21 U+f20 ==> UTF-8: "\xe0\xbc\xa1\xe0\xbc\xa0"
UCS-2: U+f22 U+f21 U+f20 ==> UTF-8: "\xe0\xbc\xa2\xe0\xbc\xa1\xe0\xbc\xa0"

View File

@@ -0,0 +1 @@
Alphanumeric ASCII characters: 0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z

View File

@@ -0,0 +1,12 @@
He lifted his head and pondered.
3.14159
3
He lifted his head and pondered.
3.14159
He lifted his head and pondered.
3.14159
replace the int

View File

@@ -0,0 +1,3 @@
Ceci est un simple exemple pour demontrer le
fonctionnement de istreambuf_iterator.

View File

@@ -0,0 +1,18 @@
Il
avait
l'air
heureux.
Il
avait
l'air
heureux.
Il avait l'air heureux.
0xa
012
10
10
10
10

View File

@@ -0,0 +1,4 @@
Ce n'est pas l'homme qui prend la mer, c'est la mer qui prend l'homme.
Ce n'est pas l'homme qui prend la mer,
c'est la mer qui prend l'homme.

View File

@@ -0,0 +1 @@
false true

View File

@@ -0,0 +1,65 @@
struct std::numeric_limits<int> {
static const bool is_specialized = true;
static int min () = -2147483648;
static int max () = 2147483647;
static const int digits = 31;
static const int digits10 = 9;
static const bool is_signed = true;
static const bool is_integer = true;
static const bool is_exact = true;
static const int radix = 2;
static int epsilon () = 0;
static int round_error () = 0;
static const int min_exponent = 0;
static const int min_exponent10 = 0;
static const int max_exponent = 0;
static const int max_exponent10 = 0;
static const bool has_infinity = false;
static const bool has_quiet_NaN = false;
static const bool has_signaling_NaN = false;
static const std::float_denorm_style has_denorm = std::denorm_absent;
static const bool has_denorm_loss = false;
static int infinity () = 0;
static int quiet_NaN () = 0;
static int signaling_NaN () = 0;
static int denorm_min () = 0;
static const bool is_iec559 = false;
static const bool is_bounded = true;
static const bool is_modulo = true;
static const bool traps = true;
static const bool tinyness_before = false;
static const int round_style = 0;
};
struct std::numeric_limits<double> {
static const bool is_specialized = true;
static double min () = 2.22507e-308;
static double max () = 1.79769e+308;
static const int digits = 53;
static const int digits10 = 15;
static const bool is_signed = true;
static const bool is_integer = false;
static const bool is_exact = false;
static const int radix = 2;
static double epsilon () = 2.22045e-16;
static int round_error () = 0.5;
static const int min_exponent = -1021;
static const int min_exponent10 = -307;
static const int max_exponent = 1024;
static const int max_exponent10 = 308;
static const bool has_infinity = true;
static const bool has_quiet_NaN = true;
static const bool has_signaling_NaN = true;
static const std::float_denorm_style has_denorm = std::denorm_present;
static const bool has_denorm_loss = false;
static double infinity () = inf;
static double quiet_NaN () = nan;
static double signaling_NaN () = nan;
static double denorm_min () = 4.94066e-324;
static const bool is_iec559 = true;
static const bool is_bounded = true;
static const bool is_modulo = false;
static const bool traps = false;
static const bool tinyness_before = false;
static const int round_style = 1;
};

View File

@@ -0,0 +1,5 @@
cat bear antelope
cougar bear antelope
zebra cougar bear ocelot antelope rat
antelope bear cougar ocelot rat zebra
ocelot rat zebra

View File

@@ -0,0 +1,4 @@
<EFBFBD> <20> j<>lly time w<>s h<>d by <20>ll
A jolly time was had by all
elk bison antelope
antelope bison elk

View File

@@ -0,0 +1,15 @@
April has 30 days
August has 31 days
December has 31 days
Febuary has 28 days
January has 31 days
July has 31 days
June has 30 days
March has 31 days
May has 31 days
November has 30 days
October has 31 days
September has 30 days
June has 30 days

View File

@@ -0,0 +1,15 @@
original valarray<int> vi
[0,1,2,3,4,5,6,7,8,9]
original valarray<bool> mask
[1,0,1,1,1,0,0,1,1,0]
vi[mask]
[0,2,3,4,7,8]
vi[mask] += vi[mask]
[0,1,4,6,8,5,6,14,16,9]

View File

@@ -0,0 +1 @@
10 20 20 20

View File

@@ -0,0 +1 @@
64 32 1 3

View File

@@ -0,0 +1,8 @@
UCS-2 (1): U+61 ==> UTF-8: \x61"
UCS-2 (3): U+61 U+62 U+63 ==> UTF-8: \x61\x62\x63"
UCS-2 (1): U+391 ==> UTF-8: \xce\x91"
UCS-2 (2): U+391 U+392 ==> UTF-8: \xce\x91\xce\x92"
UCS-2 (3): U+391 U+392 U+393 ==> UTF-8: \xce\x91\xce\x92\xce\x93"
UCS-2 (1): U+966 ==> UTF-8: \xe0\xa5\xa6"
UCS-2 (2): U+967 U+966 ==> UTF-8: \xe0\xa5\xa7\xe0\xa5\xa6"
UCS-2 (3): U+968 U+967 U+966 ==> UTF-8: \xe0\xa5\xa8\xe0\xa5\xa7\xe0\xa5\xa6"

View File

@@ -0,0 +1,21 @@
City Type Population (millions)
----------- ----------- ---------------------
Calcutta Megapolis 12.0
Tokyo Megapolis 26.8
Delhi Megapolis 10.0
Bombay Megapolis 15.0
Cairo Metropolis 12.0
New York Metropolis 7.5
Los Angeles Metropolis 3.7
Jakarta Metropolis 8.2
After sorting...
Tokyo Megapolis 26.8
Bombay Megapolis 15.0
Calcutta Megapolis 12.0
Cairo Metropolis 12.0
Delhi Megapolis 10.0
Jakarta Metropolis 8.2
New York Metropolis 7.5
Los Angeles Metropolis 3.7

View File

@@ -0,0 +1,2 @@
3 4 11 14 67
1 2 4 5 6

View File

@@ -0,0 +1,8 @@
1 2 3 4
1 2 3 4
1 1 2 2 3 3 4 4
1 1 2 2 3 3 4 4
11 12 13 14 15 16 17 18
11 12 13 14 15 16 17 18
1 1 2 2 3 3 4 4
1 1 2 2 3 3 4 4

View File

@@ -0,0 +1,4 @@
Hello
Goodbye
Message Not Found
Cedar, Hemlock, and Noble Fir

View File

@@ -0,0 +1,2 @@
2, 3
3, 2

View File

@@ -0,0 +1 @@
$1,234.6789 --> "123467" --> 123467

View File

@@ -0,0 +1,7 @@
Punctuator C++ C99
Decimal point = '.' "."
Thousands separator = ',' ""
Currency symbol = "" ""
Negative Sign = "" ""
Positive Sign = "" ""
Digits after decimal = 0 CHAR_MAX

View File

@@ -0,0 +1,2 @@
10002 --> 10002
10002 --> 10002

View File

@@ -0,0 +1,20 @@
All months of the year
Febuary has 28 days
April has 30 days
June has 30 days
September has 30 days
November has 30 days
January has 31 days
March has 31 days
May has 31 days
July has 31 days
August has 31 days
October has 31 days
December has 31 days
Months with 30 days
April
June
September
November

View File

@@ -0,0 +1,6 @@
0 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9
5 6 7 8 9 10 11 12 13 14
Union:
0 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 11 12 13 14
Intersection:
5 6 7 8 9

View File

@@ -0,0 +1,8 @@
true
false
false
true
true
false
false
true

View File

@@ -0,0 +1,6 @@
The unsorted values are:
37, 12, 2, -5, 14, 1, 0, -1, 14, 32,
The sorted values are:
-5, -1, 0, 1, 2, 12, 14, 14, 32, 37,

View File

@@ -0,0 +1,3 @@
1
2422235
32324342.989080

View File

@@ -0,0 +1,6 @@
numeric formatting
.................3
DEADBEEF
+ 3;141593
+3:141:59:2;653590
+3;14159265359e+06

View File

@@ -0,0 +1,5 @@
German locale
Decimal point = ,
Thousands separator = .
True name = true
False name = false

View File

@@ -0,0 +1,11 @@
int16_t min = -32768 0100000 0x8000
int16_t max = +32767 077777 0x7fff
uint16_t max = 65535 0177777 0xffff
int32_t min = -2147483648 020000000000 0x80000000
int32_t max = +2147483647 017777777777 0x7fffffff
uint32_t max = 4294967295 037777777777 0xffffffff
int64_t min = -9223372036854775808 01000000000000000000000 0x8000000000000000
int64_t max = +9223372036854775807 0777777777777777777777 0x7fffffffffffffff
uint64_t max = 18446744073709551615 01777777777777777777777 0xffffffffffffffff
----------
******3.14

View File

@@ -0,0 +1,2 @@
@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~

View File

@@ -0,0 +1,7 @@
For the vector: 17 3 5 -4 1 12 -10 -1 14 7 -6 8 15 -11 2 -2 18 4 -3 0
A partial_sort of seven elements gives:
-11 -10 -6 -4 -3 -2 -1 17 14 12 7 8 15 5 3 2 18 4 1 0
A partial_sort_copy of the last ten elements gives:
0 1 2 3 4 5 7 8 15 18

View File

@@ -0,0 +1,8 @@
For the series:
1 2 3 4 5 6 7 8 9 10
The partial sums:
1 3 6 10 15 21 28 36 45 55 should each equal (N*N + N)/2
The partial products:
1 2 6 24 120 720 5040 40320 362880 3628800 should each equal N!

View File

@@ -0,0 +1,3 @@
Unpartitioned values: 1 2 3 4 5 6 7 8 9 10
Partitioned values: 10 2 8 4 6 5 7 3 9 1
Stable partitioned values: 2 4 6 8 10 1 3 5 7 9

View File

@@ -0,0 +1,10 @@
Example 1:
Original values: 0 0 0 0 1 0 0 0 0 0
Previous permutation: 0 0 0 0 0 1 0 0 0 0
Next Permutation: 0 0 0 1 0 0 0 0 0 0
Example 2:
Original values: a b c d e f g h j i
Previous Permutation: a b c d e f g h i j
Next Permutation: a b c d e f g i h j

View File

@@ -0,0 +1,5 @@
The following numbers:
1 2 3 4 5 6 7
Have the factorials:
1 2 6 24 120 720 5040

View File

@@ -0,0 +1,42 @@
2
1
a
aa
aaa
aaaa
aaaaa
aaaaaa
aaaaaaa
aaaaaaaa
aaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaa
aaaaaaaa
aaaaaaa
aaaaaa
aaaaa
aaaa
aaa
aa
a
a
a
a
a
a
a
a
a
a
a
a
aa
aaa
aaaa
aaaaa
aaaaaa
aaaaaaa
aaaaaaaa
aaaaaaaaa
aaaaaaaaaa

View File

@@ -0,0 +1,22 @@
1
2
a
a
a
a
a
a
a
a
a
a
a
aa
aaa
aaaa
aaaaa
aaaaaa
aaaaaaa
aaaaaaaa
aaaaaaaaa
aaaaaaaaaa

View File

@@ -0,0 +1,5 @@
Elements before random_shuffle:
1 2 3 4 5 6 7 8 9 10
Elements after random_shuffle:
9 8 7 6 2 3 1 4 5 10

View File

@@ -0,0 +1,8 @@
1 2 3 4 5 6 7 8 9 10
1 2 3 4 5 6 8 9 10
1 2 3 4
1 2 4

View File

@@ -0,0 +1,14 @@
Original sequence:
11111 11112 11113 11114 11115 11116 11117 11118 11119 11120 11121 11122 11123 11124 11125 11126 11127 11128 11129 11130 11131 11132 11133 11134 11135 11136 11137 11138 11139 11140 11141 11142 11143 11144 11145 11146 11147 11148 11149 11150 11151 11152 11153 11154 11155 11156 11157 11158 11159 11160 11161 11162 11163 11164 11165 11166 11167 11168 11169 11170 11171 11172 11173 11174 11175 11176 11177 11178 11179 11180 11181 11182 11183 11184 11185 11186 11187 11188 11189 11190 11191 11192 11193 11194 11195 11196 11197 11198 11199 11200 11201 11202 11203 11204 11205 11206 11207 11208 11209 11210
Sequence after replace:
11111 11112 11113 11114 11115 11116 11117 11118 11119 11120 11121 11122 11123 11124 11125 11126 11127 11128 11129 11130 11131 11132 11133 11134 11135 11136 11137 11138 11139 11140 11141 11142 11143 11144 11145 11146 11147 11148 11149 11150 11151 11152 11153 11154 11155 11156 11157 11158 11159 11160 11161 11162 11163 11164 11165 11166 11167 11168 11169 11170 11171 11172 11173 11174 11175 11176 11177 11178 11179 11180 11181 11182 11183 11184 11185 11186 11187 11188 11189 11190 11191 11192 11193 11194 11195 11196 11197 11198 11211 11200 11201 11202 11203 11204 11205 11206 11207 11208 11209 11210
After replace_if:
0 0 11113 0 0 0 11117 0 11119 0 0 0 0 0 0 0 0 0 0 0 11131 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 11149 0 0 0 0 0 0 0 0 0 11159 0 11161 0 0 0 0 0 0 0 0 0 11171 0 11173 0 0 0 11177 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 11197 0 0 0 0 0 0 0 0 0 0 0 0 0
Sequence replace_copy-ed to cout:
1 1 11113 1 1 1 11117 1 11119 1 1 1 1 1 1 1 1 1 1 1 11131 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11149 1 1 1 1 1 1 1 1 1 11159 1 11161 1 1 1 1 1 1 1 1 1 11171 1 11173 1 1 1 11177 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11197 1 1 1 1 1 1 1 1 1 1 1 1 1
Sequence replace_copy_if-ed to cout:
0010001010000000000010000000000000000010000000001010000000001010001000000000000000000010000000000000

View File

@@ -0,0 +1,8 @@
Elements before reverse:
1 2 3 4 5 6 7 8 9 10
Elements after reverse:
10 9 8 7 6 5 4 3 2 1
A reverse_copy to cout:
1 2 3 4 5 6 7 8 9 10

View File

@@ -0,0 +1,5 @@
Traversing vector with iterator:
3 4 7 8
Same vector, same loop, reverse_itertor:
8 7 4 3

View File

@@ -0,0 +1,5 @@
Elements before rotate:
1 2 3 4 5 6 7 8 9 10
Elements after rotate:
5 6 7 8 9 10 1 2 3 4

View File

@@ -0,0 +1,4 @@
The subsequence, substring, was found at the
location identified by a '*'
Here's a string with a *ubstring in it

View File

@@ -0,0 +1,4 @@
The result of:
{1 2 3 4 5 6 7 8 9 10 } - {2 4 6 8 10 12 } =
{1 3 5 7 9 }

View File

@@ -0,0 +1,4 @@
The result of:
{3 5 7 8 } intersection {1 3 5 7 9 11 } =
{3 5 7 }

View File

@@ -0,0 +1,4 @@
The symmetric difference of:
{3 5 7 8 } with {1 3 5 7 9 11 } =
{1 8 9 11 }

View File

@@ -0,0 +1,4 @@
The result of:
{ 3 5 7 8 } union { 2 4 6 8 10 12 } =
{ 2 3 4 5 6 7 8 10 12 }

View File

@@ -0,0 +1,9 @@
0 1 2 3 4 5 6 7 8 9
5 6 7 8 9
6 7 8 9 10 11 12 13
Union:
5 6 7 8 9 10 11 12 13
Intersection:
6 7 8 9

View File

@@ -0,0 +1,4 @@
original valarray vi: [0,1,2,3,4,5,6,7,8,9]
vi [slice (1, 3, 3)]: [1,4,7]
vi [slice (0, 5, 2)]: [0,2,4,6,8]

View File

@@ -0,0 +1,11 @@
original valarray vi
[0,1,2,3,4,5,6,7,8]
vi[slice(0,3,3)]
[0,3,6]
vi[slice(0,3,3)] = vi[slice(1,3,3)] + vi[slice(2,3,3)]
[3,1,2,9,4,5,15,7,8]

View File

@@ -0,0 +1,21 @@
original std::sort std::stable_sort
<-4; > <-8; > <-8; >
<16; > <-7; > <-7; >
<17; > <-6; > <-6; >
<-3;s> <-5; > <-5; >
<14; > <-4; > <-4; >
<-6; > <-3;e> <-3;s>
<-1; > <-3;s> <-3;t>
<-3;t> <-3;l> <-3;a>
<23; > <-3;t> <-3;b>
<-3;a> <-3;b> <-3;l>
<-2; > <-3;a> <-3;e>
<-7; > <-2; > <-2; >
<-3;b> <-1; > <-1; >
<-8; > <11; > <11; >
<11; > <14; > <14; >
<-3;l> <15; > <15; >
<15; > <15; > <15; >
<-5; > <16; > <16; >
<-3;e> <17; > <17; >
<15; > <23; > <23; >

View File

@@ -0,0 +1,22 @@
2
1
a
aa
aaa
aaaa
aaaaa
aaaaaa
aaaaaaa
aaaaaaaa
aaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaa
aaaaaaaa
aaaaaaa
aaaaaa
aaaaa
aaaa
aaa
aa
a

View File

@@ -0,0 +1 @@
Enter a sequence of integers (eof to quit): 1 + 1 + 2 + 3 + 5 + 8 + 13 + 21 + 45 + 66 + 111 + 177 = 453

View File

@@ -0,0 +1,8 @@
Type a string between 5 and 100 characters long.
Changing the third character from a to *
now its: am*naplanacanalpanama
Identifying the middle: am*naplana(the middle is here!)canalpanama
I didn't like the word 'middle', so instead, I'll say:
am*naplana(the center is here!)canalpanama

View File

@@ -0,0 +1,4 @@
Here is the first ouput
L'heure est grave!
Here is the first ouput L'heure est grave!
L'heure est grave!

View File

@@ -0,0 +1,12 @@
Deutsch:
Dieses ist die Geschichte eines Mannes.
Francais:
C'est l'histoire d'un homme.
English:
This is the story of a man.
Dieses ist die Geschichte eines Mannes.
C'est l'histoire d'un homme.
This is the story of a man.

View File

@@ -0,0 +1,15 @@
Full text, 104 characters:
Dieses ist die Geschichte eines Mannes.
C'est l'histoire d'un homme.
This is the story of a man.
Line 1, 42 characters:
Dieses ist die Geschichte eines Mannes.
Line 2, 31 characters:
C'est l'histoire d'un homme.
Line 3, 30 characters:
This is the story of a man.
Line 4, 1 character (no newline):
'\0'
Extracted 104 characters.

View File

@@ -0,0 +1,11 @@
Successfully allocated buffer.
Anticonstitutionnellement is a big word!!!
Le rat des villes et le rat des champs.
#############256
Buffer size is 100
Successfully resized buffer to 200
Anticonstitutionnellement is a big word!!!
Le rat des villes et le rat des champs.
#############256

View File

@@ -0,0 +1,7 @@
For the vector: 6 7 8 9 10 1 2 3 4 5
Swaping the first five elements with the last five gives:
1 2 3 4 5 6 7 8 9 10
Swaping the first and last elements gives:
10 2 3 4 5 6 7 8 9 1

View File

@@ -0,0 +1,34 @@
time_base::dateorder == 2.
Date: Apr 7 1969
Daylight Savings = 0
Day of year = 0
Day of week = 0
Year = 69
Month = 3
Day of month = 7
Hour = 0
Minute = 0
Second = 0
Weekday: Monday
Daylight Savings = 0
Day of year = 0
Day of week = 1
Year = 69
Month = 3
Day of month = 7
Hour = 0
Minute = 0
Second = 0
Time: 06:47:32
Daylight Savings = 0
Day of year = 0
Day of week = 1
Year = 69
Month = 3
Day of month = 7
Hour = 6
Minute = 47
Second = 32

Some files were not shown because too many files have changed in this diff Show More