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
using Microsoft.Extensions.Hosting; | |
namespace App.HostService | |
{ | |
public class AppHostService : BackgroundService | |
{ | |
IHostApplicationLifetime _lifetime; | |
public AppHostService(IHostApplicationLifetime lifetime) | |
{ | |
_lifetime = lifetime; |
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 "libusb-1.0/libusb.h" | |
#include <stdio.h> | |
#include <iostream> | |
#include <ctime> | |
static const int USB_VID = 0x0547; | |
static const int USB_PID = 0x1002; | |
static const int USB_EP_WRITE = 0x01; | |
static const int USB_EP_READ = 0x81; | |
static int r = 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 logging | |
import http.client | |
import json | |
import sys | |
from datetime import datetime | |
from xml.dom.minidom import parseString | |
import xml.dom.minidom | |
USER_AGENT = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36' |
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 <Windows.h> | |
COORD GetConsoleCursorPosition(HANDLE hConsoleOutput) | |
{ | |
CONSOLE_SCREEN_BUFFER_INFO cbsi; | |
if (GetConsoleScreenBufferInfo(hConsoleOutput, &cbsi)) | |
{ | |
return cbsi.dwCursorPosition; | |
} |
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 logging | |
import http.client | |
import json | |
API_KEY = 'YOUR RAINYUN APIKEY' # Please change this API_KEY to your own APIKEY | |
USER_AGENT = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36' | |
logger = logging.getLogger("check_agent_price") | |
logger.setLevel(logging.INFO) |
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 "DragableTableWidget.h" | |
#include <QDebug> | |
#include <QDropEvent> | |
DragableTableWidget::DragableTableWidget(QWidget* parent) : QTableWidget(parent) | |
{ | |
setDragDropMode(QAbstractItemView::InternalMove); | |
setDropIndicatorShown(true); | |
setSelectionBehavior(QAbstractItemView::SelectRows); | |
} |
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 "ScaleBar.h" | |
ScaleBar::ScaleBar(QCustomPlot *plot) | |
: QObject{plot}, | |
mPlot(plot) | |
{ | |
mScaleBar = new QCPItemLine(mPlot); | |
QPen p(Qt::NoBrush, 1.5F); | |
p.setColor(Qt::red); |