Skip to content

Instantly share code, notes, and snippets.

@PathogenDavid
PathogenDavid / main.cpp
Created July 13, 2014 02:36
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"); }
@aaangeletakis
aaangeletakis / How-To-Install-SDL-On-Ubuntu.md
Last active October 16, 2024 19:16
How do I install SDL on ubuntu?

What you need to do to install SDL is:

#install sdl2
sudo apt install libsdl2-dev libsdl2-2.0-0 -y;

#install sdl image  - if you want to display images
sudo apt install libjpeg-dev libwebp-dev libtiff5-dev libsdl2-image-dev libsdl2-image-2.0-0 -y;

#install sdl mixer  - if you want sound
@wynand1004
wynand1004 / RPS_ASCII_Art.py
Created October 15, 2017 04:05
Rock, Paper, Scissors ASCII Art
# Rock Paper Scissors ASCII Art
# Rock
print("""
_______
---' ____)
(_____)
(_____)
(____)
---.__(___)
@mastrobirraio
mastrobirraio / README-Template.md
Created June 21, 2019 09:20 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@igabice
igabice / password_textfield_example.dart
Created January 8, 2020 09:50
Flutter TextField with password input type and an icon to toggle visibility
bool _showPassword = false;
Widget _buildPasswordTextField() {
return TextField(
obscureText: !this._showPassword,
decoration: InputDecoration(
labelText: 'password',
prefixIcon: Icon(Icons.security),
suffixIcon: IconButton(
icon: Icon(
// Single Linked List
struct node
{
int data;
struct node *next;
}
// Double linked list
struct Node
{
int data;
@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;
@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;
@dileepadev
dileepadev / .gitignore
Last active December 30, 2023 22:37
.gitignore for Flutter projects
### ------------------------- Flutter.gitignore ------------------------ ###
# Miscellaneous
*.class
#*.lock
*.log
*.pyc
*.swp
.DS_Store
.atom/