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
// This source code written by Roland Ihasz | |
#include<iostream> | |
using namespace std; | |
bool evenOrOdd(int integer) | |
{ | |
if (integer % 2==0) | |
return true; | |
else | |
return false; |
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
// This source code written by Roland Ihasz | |
#include <iostream> | |
#include <vector> | |
#include <fstream> | |
#include <limits.h> | |
using namespace std; | |
int main() |
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
// This source code written by Roland Ihasz | |
#include <iostream> | |
#include <vector> | |
#include <cstdlib> | |
#include <ctime> | |
using namespace std; | |
int randint(int min, int max){ | |
srand(static_cast<unsigned int>(time(0))); | |
return (min < max) ? ((rand() % ((max+1)-min)) + min) : |
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
// This source code written by Roland Ihasz | |
#include <iostream> | |
#include <vector> | |
using namespace std; | |
int main() | |
{ | |
int n; | |
vector <int> factorial; |
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
// This source code written by Roland Ihasz | |
#include <iostream> | |
#include "boost/date_time/gregorian/gregorian.hpp" | |
using namespace std; | |
int main() | |
{ | |
using namespace boost::gregorian; |
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
// This source code written by Roland Ihasz | |
#include <iostream> | |
#include <string> | |
using namespace std; | |
class Animals { //base class | |
private: | |
string name; | |
int lifespan; |
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
// This source code written by Roland Ihasz | |
#include <iostream> | |
using namespace std; | |
// base class | |
class GPSCoordinates { | |
protected: | |
double latitude, longitude; | |
string name; | |
public: |
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
// This source code written by Roland Ihasz | |
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
int* MyPointer = nullptr; // new pointer declared | |
MyPointer = new int[3]; // memory dynamically allocated | |
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
// This source code written by Roland Ihasz | |
#include <iostream> | |
#include <vector> | |
#include <iomanip> // std::setprecision | |
using namespace std; | |
int main() | |
{ | |
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
import os | |
def getcurrentloc(fileName): | |
isfile = os.path.isfile(fileName) | |
notfound = (str(fileName) + " does not exist") | |
if isfile: # if (True) file exist return the path | |
return os.path.abspath(fileName) | |
else: | |
print notfound |
OlderNewer