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 init, { | |
LogLevel, | |
Mm2MainErr, | |
Mm2RpcErr, | |
mm2_main, | |
mm2_main_status, | |
mm2_rpc, | |
mm2_version, | |
} from "./src/mm2/mm2lib.js"; |
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> | |
#include <vector> | |
#include <string> | |
#include <unistd.h> | |
using namespace std; | |
const string CSI{"\x1b["}; | |
const string CYAN{CSI + "36m"}; | |
const string RED{CSI + "31m"}; |
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
; Swaps buttons for Mac keyboards | |
; Disable with Ctrl+F6 when you use a Windows keyboard. | |
; Option<->Command (Alt<->Win) | |
; RCommand<->RAlt (RWin<->RAlt) | |
; ROption<->RCtrl (RAlt<->RCtrl) | |
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
; #Warn ; Enable warnings to assist with detecting common errors. | |
#InstallKeybdHook |
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 <SFML/Network.hpp> | |
#include <iostream> | |
#include <chrono> | |
#include <future> | |
#include <cstring> | |
int main() { | |
// Parameters | |
const auto ip = "111.111.111.111"; | |
const auto port = 7777; |
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> | |
#include <vector> | |
#include <fstream> | |
int main() { | |
std::ifstream file("data.txt"); | |
if(!file) { | |
std::cerr << "Failed to open the file"; | |
return 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
import io | |
import picamera | |
import logging | |
import socketserver | |
from threading import Condition | |
from http import server | |
PAGE="""\ | |
<html> | |
<head> |
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 <opencv2/opencv.hpp> | |
#include <iostream> | |
const int IMG_COUNT = 50; | |
const std::string file_prefix = "Dataset/"; | |
const std::string file_folder[2] = {"Color/", "Texture/"}; | |
const std::string file_suffix = ".jpg"; | |
typedef std::vector<int> HIST; | |
typedef std::pair<int, double> DIST; |
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> | |
#include <vector> | |
#include <ctime> | |
#include <queue> | |
#include <stack> | |
#include <memory> | |
int MAX_GENERATION = 10000; | |
int POPULATION_SIZE; | |
int TARGET_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
#include <stdio.h> | |
#include <stdlib.h> | |
char cap(char c) { | |
if(c >= 'a' && c <= 'z') c -= 32; | |
return c; | |
} | |
void addToSet(char* set, int* len, char c) { | |
int i = 0; |
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 java.text.DecimalFormat; | |
import java.text.NumberFormat; | |
// Solution for the question here -> http://imgur.com/a/r7n0z | |
public class Demo { | |
public static void main(String[] args) { | |
NumberFormat formatter = new DecimalFormat("#0.00000"); | |
final double T = 70; | |
final double L = 1; |
NewerOlder