-
Visual Studio code
https://code.visualstudio.com/Download -
C/C++
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
#define __TEST__ | |
#ifdef __TEST__ | |
#include <sstream> | |
// redirect outputs to another output stream. | |
class redirect_outputs { | |
std::ostream &myStream; | |
std::streambuf *const myBuffer; |
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 <bits/stdc++.h> | |
using namespace std; | |
int x0, start, mv, action, getBall, throwInit, throwBall; | |
char command; | |
void init() | |
{ | |
x0 = 1; |
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 "DHT.h" | |
#include "mbed.h" | |
using namespace std; | |
#define NEED_LIGHT_HOURS 12 | |
#define MINUTE_CYCLE 30 | |
// sensor port | |
DHT dht(PC_13, DHT22); // PC13 = D2 | |
AnalogIn in(PA_5); |
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 pkg_resources | |
from subprocess import call | |
packages = [dist.project_name for dist in pkg_resources.working_set] | |
# print(packages) | |
call("pip install --upgrade " + ' '.join(packages), shell=True) | |
# + " --use-feature=2020-resolver" is not the origin this code |
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
1. Virtual Machine Platform | |
2. Windows Subsystem for Linux |
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
/** | |
* @file template.cpp | |
* @author Staler2019 (github.com) | |
* @brief Competitive code template | |
* @version 2 | |
* @date 2022-06-30 | |
* | |
* @copyright Copyright (c) 2022 | |
*/ |
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 <iostream> | |
using namespace std; | |
int arr[3][3] = {{2, 0, 3}, {1, 8, 4}, {7, 6, 5}}; | |
void printArr() | |
{ | |
for (int j = 0; j < 3; j++) | |
{ | |
cout << "-------" << endl; |
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
#!/bin/bash | |
sudo apt-get update | |
sudo apt-get -y dist-upgrade | |
sudo apt-get clean | |
sudo apt-get -y autoremove |