Skip to content

Instantly share code, notes, and snippets.

@omonimus1
omonimus1 / main.cpp
Created November 28, 2022 14:44 — forked from PathogenDavid/main.cpp
EnumDisplayDevices
#include <Windows.h>
#include <stdio.h>
void PrintDisplayDevice(DISPLAY_DEVICEA* displayDevice, const char* indent = "")
{
printf("%sDeviceName: %s\n", indent, displayDevice->DeviceName);
printf("%sDeviceString: %s\n", indent, displayDevice->DeviceString);
printf("%sStateFlags:", indent);
if (displayDevice->StateFlags & DISPLAY_DEVICE_ACTIVE) { printf(" ACTIVE"); }
if (displayDevice->StateFlags & DISPLAY_DEVICE_MIRRORING_DRIVER) { printf(" MIRRORING_DRIVER"); }
import psycopg2 # python3 -m pip install psycopg2-binary
# Update connection string information
host = ""
dbname = ""
user = ""
password = “”
sslmode = "require"
# Construct connection string
name: Flutter Testing
on:
push:
branches: [ develop, staging, master ]
pull_request:
branches: [ develop, staging, master ]
jobs:
enforce-timeout-minutes:
#!/usr/bin/python3
import schedule
import requests
import os
import smtplib
from email.mime.multipart import MIMEMultipart
from email.message import EmailMessage
from socket import gaierror
## SMTP DETAILS
@omonimus1
omonimus1 / push_tail_single_linked_list.cpp
Last active August 15, 2020 14:29
Having in input a reference to the head of a linked list and value x, store the value x in a new node and set this node as new tails of the linked list
Node push_tail(Node *head, int x)
{
Node *new_tail = new Node(x);
new_tail->next = NULL;
if(head == NULL)
return new_tail;
else
{
Node *current =head;
@omonimus1
omonimus1 / push_head_linked_list.cpp
Created August 15, 2020 14:22
Having the values of a new node, set this new node as head of the linked.
Node* push_in_head(Node *head, int new_value)
{
Node *new_node = new Node(new_value);
if(head == NULL)
return new_node;
else
{
new_node->next= head;
return new_node;
// Single Linked List
struct node
{
int data;
struct node *next;
}
// Double linked list
struct Node
{
int data;