Skip to content

Instantly share code, notes, and snippets.

View DreamerDeLy's full-sized avatar
🔵
///

Dreamer DreamerDeLy

🔵
///
View GitHub Profile
@DreamerDeLy
DreamerDeLy / _task_8.cpp
Last active March 21, 2020 11:07
Task 8 [C++]
#include <iostream>
#include <cstdlib>
#include <string>
#include <Windows.h>
using namespace std;
// Array size
const int r = 10;
const int c = 10;
@DreamerDeLy
DreamerDeLy / _task_8.cs
Last active March 21, 2020 11:30
Task 8 [C#]
using System;
namespace Task_8
{
class Program
{
// Array size
const int r = 10;
const int c = 10;
@DreamerDeLy
DreamerDeLy / SetTime.ino
Created February 18, 2019 16:35
Configuring RTC time from Serial Port
void setTime() {
// January 21, 2014 at 3am you would call:
// rtc.adjust(DateTime(2014, 1, 21, 3, 0, 0));
DateTime now = rtc.now();
int newYear;
int newMonth;
int newDay;
int newHour;
int newMinute;
@DreamerDeLy
DreamerDeLy / _task_12.cs
Last active April 11, 2020 13:16
Task 12 [C#]
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
namespace Task12
{
class Program
{
static void Main(string[] args)
@DreamerDeLy
DreamerDeLy / _task_13.cs
Last active April 12, 2020 09:04
Task 13 [C#]
using System;
namespace Task13
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Введiть строку");
string str = Console.ReadLine();
@DreamerDeLy
DreamerDeLy / _task_14.cs
Created April 13, 2020 15:45
Task 14 [C#]
using System;
using System.Collections.Generic;
namespace Task14
{
class Program
{
static void Main(string[] args)
{
DateTime date_now = DateTime.Now;
@DreamerDeLy
DreamerDeLy / _task_15.cs
Last active April 16, 2020 13:10
Task 15 [C#]
using System;
namespace Task15
{
class Program
{
static string alph = "АБВГҐДЕЄЖЗИІЇЙКЛМНОПРСТУФХЦЧШЩЬЮЯ";
static void Main(string[] args)
{
@DreamerDeLy
DreamerDeLy / _task_16.cs
Created April 19, 2020 15:14
Task 16 [C#]
using System;
namespace Task16
{
class Program
{
static string alph = "АБВГҐДЕЄЖЗИІЇЙКЛМНОПРСТУФХЦЧШЩЬЮЯ";
static void Main(string[] args)
{
@DreamerDeLy
DreamerDeLy / _task_17.cs
Last active April 25, 2020 18:43
Task 17 [C#]
using System;
using System.Text;
namespace Task17
{
class Program
{
static string alph = "АБВГҐДЕЄЖЗИІЇЙКЛМНОПРСТУФХЦЧШЩЬЮЯ";
static void Main(string[] args)
@DreamerDeLy
DreamerDeLy / StringToDateTime.ino
Created February 18, 2022 13:45
Parse ISO8601 like datetime string [Arduino]
// Data string
String time_string = "2021-12-12 18:55:54";
// Parsing
int year = time_string.substring(0, 4).toInt();
int month = time_string.substring(5, 7).toInt();
int day = time_string.substring(8, 10).toInt();
int hour = time_string.substring(11, 13).toInt();
int minute = time_string.substring(14, 16).toInt();
int second = time_string.substring(17, 19).toInt();