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 <QApplication> | |
#include <QDebug> | |
#include <QSystemTrayIcon> | |
#include <QMenu> | |
#include <QAction> | |
#include <QIcon> | |
#include <QThread> | |
#include <QObject> | |
#include <QFile> | |
#include <QIODevice> |
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 <QCoreApplication> | |
#include <QUdpSocket> | |
#include <QObject> | |
int main(int argc, char *argv[]) | |
{ | |
QCoreApplication a(argc, argv); | |
QUdpSocket _s; | |
_s.bind( QHostAddress::LocalHost, 9000 ); |
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 <QObject> | |
#include <QCoreApplication> | |
#include <QUdpSocket> | |
#include <QTimer> | |
int main( int argc, char *argv[] ) | |
{ | |
QCoreApplication app( argc, argv ); | |
QUdpSocket _s; |
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
# Print progress on same line | |
(1..10).each do |i| | |
print "\rDownloaded: #{i} of 10" | |
sleep 1 | |
end | |
puts | |
puts 'Rest of the logs here...' |
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 <iomanip> | |
#include <cstdlib> | |
#include <string> | |
#include <vector> | |
#include <array> | |
#include <utility> | |
#include <algorithm> | |
#include <unordered_map> |
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
// https://stackoverflow.com/a/55297349/7670262 | |
#include <QDebug> | |
#include <QJsonDocument> | |
#include <QJsonObject> | |
#include <QJsonArray> | |
int main() | |
{ | |
const auto data = R"({ "Name": "45", "Path": "C:\file.json" })"; |
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
// https://stackoverflow.com/a/51742823/7670262 | |
#include <QProcess> | |
int main() | |
{ | |
QProcess process; | |
process.setProgram( "cmd.exe" ); | |
process.setArguments( { "/C", R"(E:\deleteme.bat)" } ); | |
process.setWorkingDirectory( R"(E:\)" ); |
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
// https://stackoverflow.com/a/55187379/7670262 | |
#include <QDebug> | |
#include <QMap> | |
#include <QMapIterator> | |
#include <QString> | |
int main() | |
{ | |
using InnerMap = QMap<int, QString>; |
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
// https://stackoverflow.com/a/44558860/7670262 | |
/* | |
Directory structure: | |
C:\Test | |
-- A | |
---- a.txt | |
-- B | |
---- b.tx |
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
// https://stackoverflow.com/a/51889159/7670262 | |
#include <iterator> | |
#include <iostream> | |
struct data | |
{ | |
data() = default; | |
int num1 = 0; | |
int num2 = 0; |
OlderNewer