This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "cust_std_lib_facilities.h" | |
#include <iostream> | |
#include <chrono> | |
#include <stdexcept> | |
#include <random> | |
#include <string> | |
int randint(int min, int max) | |
{ | |
using namespace std; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var map, infoWindow; | |
function initMap() { | |
map = new google.maps.Map(document.getElementById('map'), { | |
center: { lat: -34.397, lng: 150.644 }, | |
zoom: 6 | |
}); | |
infoWindow = new google.maps.InfoWindow; | |
if (navigator.geolocation) { | |
navigator.geolocation.getCurrentPosition(function (position) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifdef _WIN32 | |
#pragma once | |
#endif | |
#ifndef LIST_H_ | |
#define LIST_H_ | |
#include <iterator> | |
#include <stdexcept> | |
template<typename Elem> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Osman Zakir | |
// 11 / 10 / 2017 | |
// Bjarne Stroustrup: Programming: Principles and Practice Using C++ 2nd Edition | |
// Chapter 20 "Find highest element" example code (with templated high() function) | |
// This program has a serious bug that I have to find and fix. | |
#include "../../cust_std_lib_facilities.h" | |
#include <algorithm> | |
#include <iostream> | |
#include <fstream> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <algorithm> | |
#include <iostream> | |
#include <vector> | |
#include <list> | |
#include "Document.h" | |
std::istream &operator>>(std::istream &is, Document &d) | |
{ | |
char ch = ' '; | |
for ( ; is.get(ch);) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <vld.h> | |
#include "../../cust_std_lib_facilities.h" | |
int main() | |
{ | |
vector<int> v1; | |
try | |
{ | |
for (int num; std::cin >> num;) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Osman Zakir | |
// 12 / 8 / 2017 | |
// Bjarne Stroustrup: Programming: Principles and Practice Using C++ 2nd Edition | |
// Chapter 21 std::unordered_map "Try this" | |
// Exercise Specifications: | |
/** | |
* Write a small program using #include<unordered_map> . If that doesn’t | |
* work, unordered_map wasn’t shipped with your C++ implementation. If | |
* your C++ implementation doesn’t provide unordered_map , you have to | |
* download one of the available implementations (e.g., see www.boost.org). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "Item.h" | |
#include <string> | |
#include <cctype> | |
#include <iostream> | |
#include <algorithm> | |
#include "../../cust_std_lib_facilities.h" | |
Item::Item(const std::string &name, const int iid, const double value) | |
: m_name{ name }, m_iid{ iid }, m_value{ value } | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Osman Zakir | |
// 12 / 18 / 2017 | |
// Bjarne Stroustrup: Programming: Principles and Practice Using C++ 2nd Edition | |
// Chapter 21 Drill "More vector use" | |
// Drill Specifications: | |
/** | |
* 1. Read some floating-point values (at least 16 values) from a file into a | |
* vector<double> called vd . | |
* 2. Output vd to cout . | |
* 3. Make a vector vi of type vector<int> with the same number of elements |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en-us"> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width, | |
height=device-height, initial-scale=1.0" /> | |
<meta name="author" content="Osman Zakir" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
<link rel="stylesheet" type="text/css" |
OlderNewer