This file contains hidden or 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
version: '3.3' | |
services: | |
db: | |
image: mongo:latest | |
container_name: mongo | |
expose: | |
- "27017" | |
chat: | |
image: rocket.chat:latest | |
container_name: rocket |
This file contains hidden or 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
#!/usr/bin/python3 | |
from http.server import HTTPServer, SimpleHTTPRequestHandler | |
import socket | |
import ssl | |
import socketserver | |
listen_addr = 'test.de' | |
listen_port = 4443 | |
server_cert = './ssl/server-crt.pem' |
This file contains hidden or 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
# Amend manifest to tell Windows that the application is DPI aware (needed for Windows 8.1 and up) | |
IF (MSVC) | |
IF (CMAKE_MAJOR_VERSION LESS 3) | |
MESSAGE(WARNING "CMake version 3.0 or newer is required use build variable TARGET_FILE") | |
ELSE() | |
ADD_CUSTOM_COMMAND( | |
TARGET ${TARGET_TARGETNAME} | |
POST_BUILD | |
COMMAND "mt.exe" -manifest \"${CMAKE_CURRENT_SOURCE_DIR}\\dpiawarescaleing.manifest\" -inputresource:\"$<TARGET_FILE:${TARGET_TARGETNAME}>\"\;\#1 -outputresource:\"$<TARGET_FILE:${TARGET_TARGETNAME}>\"\;\#1 | |
COMMENT "Adding display aware manifest..." |
This file contains hidden or 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 <iostream> | |
#include <memory> | |
void classic_cpp() | |
{ | |
std::cout << "***Classic C++***" << std::endl; | |
/*Classic C++*/ | |
int *x = new int(10); | |
std::cout << "value of x: " << *x << " ---- address of x: " << x << std::endl; | |
*x = 100; |
This file contains hidden or 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 <iostream> | |
#include <string> //usiamo std::string | |
#include <cctype> //usato per std::isalnum | |
#include <algorithm> //usato per std::transform ed std::erase | |
using namespace std; | |
//la chiave di default | |
int key{3}; |
This file contains hidden or 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 <iostream> | |
#include <vector> | |
int main() | |
{ | |
std::vector<int> int_array; //array of integers, empty | |
std::vector<double> double_array_1; //array of doubles, empty | |
std::vector<double> double_array_2(10); //array of doubles, containing 10 elements initialized with 0.0 | |
std::vector<double> double_array_3(10, 2.5f);//array of doubles, containing 10 elements initialized with 2.5 | |
std::vector<double> double_array_4 {1.0, 2.0, 3.0, 4.0, 5.0}; //array initialized with some values |
This file contains hidden or 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
#Enables C++11 features | |
IF(CMAKE_COMPILER_IS_GNUCXX) | |
SET(CMAKE_CXX_FLAGS "-std=gnu++11") | |
ENDIF() | |
SET(CMAKE_COLOR_MAKEFILE ON) |
This file contains hidden or 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
/* | |
Author: Michele Adduci <[email protected]> | |
*/ | |
#include <iostream> | |
#include <cmath> | |
int main() | |
{ | |
std::cout << "The result of 3*3 is " << 3*3 << std::endl; | |
int var_a = 3*3; |
This file contains hidden or 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 <iostream> | |
int main() | |
{ | |
std::cout << "Hello world - DemoApp 1" << std::endl; | |
return 0; | |
} |
This file contains hidden or 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
cmake_minimum_required(VERSION 2.8.11) | |
set(APPLICATION_NAME "${PROJECT_PREFIX_NAME}_demoapp_one") | |
project(${APPLICATION_NAME} CXX) | |
#Suppressing CMAKE 3.0 warnings | |
if(POLICY CMP0043) | |
cmake_policy(SET CMP0043 OLD) | |
endif() |