This file contains hidden or 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
connect(discoveryAgent, | |
static_cast<void(QBluetoothDeviceDiscoveryAgent::*)(QBluetoothDeviceDiscoveryAgent::Error)>(&QBluetoothDeviceDiscoveryAgent::error), | |
this, &BlufiDeviceScanner::handleError); |
This file contains hidden or 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
connect(source, &Source::Mysignal,destination,&Destination::slot); |
This file contains hidden or 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
cmake_minimum_required(VERSION 3.30) | |
project(bleservice) | |
set(CMAKE_AUTOMOC ON) |
This file contains hidden or 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
REM open cmd with SHIFT+F10 | |
start ms-cxh:localonly |
This file contains hidden or 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 "ws2tcpip.h" | |
int main() { | |
addrinfo hints = {}, *res; | |
hints.ai_family = AF_INET; | |
int status = getaddrinfo("test.mosquitto.org", nullptr, &hints, &res); | |
if (status != 0) { | |
std::cerr << "getaddrinfo failed: " << gai_strerror(status) << std::endl; | |
} else { |
This file contains hidden or 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/sh | |
#Author: Gabriel Espinoza<virtuosonic at github> | |
#Desc: execute comand until it runs successfully(returning 0) | |
#Date: 23-Oct-2024 | |
usage() | |
{ | |
echo "usage: retryfailed <command> [arg1 [arg2...]]" | |
} |
This file contains hidden or 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
/*************************************** | |
Author: Gabriel Espinoza | |
Desc: They say lock-based concurrency is slow | |
let's test how slow is slow | |
***************************************/ | |
#include <iostream> | |
#include <mutex> | |
#include <functional> | |
#include <chrono> |
This file contains hidden or 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; | |
struct S { | |
S() {cout << "S::S() " << id << "\n";} | |
S(const S&) {cout << "S::S(const S&) " << id << "\n";} | |
S(S&&) {cout << "S::S(const S&&) " << id << "\n";} | |
S& operator=(const S& other) { cout << "S::operator=(const S& other) " << id << "\n";return *this;} |
This file contains hidden or 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 | |
#Author: Gabriel Espinoza <virtuosonic @ github> | |
#Date: 2023-12-26 | |
#Desc: prints what libraries are linked to executables on $testdir | |
testdir=/usr/bin | |
for program in `ls $testdir` |
This file contains hidden or 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 <algorithm> | |
#include <array> | |
class User { | |
protected: | |
static int* data; | |
static int* auxData1; | |
static int* auxData2; | |
int tamannoAD1; |
NewerOlder