Skip to content

Instantly share code, notes, and snippets.

View whoo24's full-sized avatar

Wooyeong Choe whoo24

  • Oslo, Norway
View GitHub Profile
-- Set the background color.
pal(0,140,1)
function _update60()
cls()
--Two iterations
-- 0: Splashes
-- 1: Rain
for j=0,1 do
@DanielSWolf
DanielSWolf / Program.cs
Last active June 13, 2024 17:26
Console progress bar. Code is under the MIT License: http://opensource.org/licenses/MIT
using System;
using System.Threading;
static class Program {
static void Main() {
Console.Write("Performing some task... ");
using (var progress = new ProgressBar()) {
for (int i = 0; i <= 100; i++) {
progress.Report((double) i / 100);
@ujentus
ujentus / MPMCQueue.cpp
Created November 9, 2012 07:03
MPMC Wait-free Queue for C++, Windows
#pragma once
/****************************************************************************
* Wait-Free MPMC Queue
* Minimum requirement: Windows XP or Windows Server 2003
* Author: @sm9kr
* License type: GPL v3
* Drawback: Fixed size, __int64 overflow-able
****************************************************************************/
@ujentus
ujentus / WaitFreeQueue.cpp
Created November 7, 2012 08:48
MPSC Wait-free Queue for C++, Windows
#pragma once
/****************************************************************************
* Wait-Free MPSC Queue
* Minimum requirement: Windows XP or Windows Server 2003
* Author: @sm9kr
* License type: GPL v3
* References
** [1] http://groups.google.ru/group/comp.programming.threads/browse_frm/thread/33f79c75146582f3
** [2] http://www.boost.org/doc/libs/1_35_0/doc/html/intrusive/intrusive_vs_nontrusive.html
@THeK3nger
THeK3nger / bhtree_example.py
Last active May 10, 2020 15:38
Behavior Tree Example
# -*- coding: iso-8859-15 -*-
"""
Behavior Tree Example
"""
class WorldStatus(object):
def __init__(self):
self.aperta = False # Porta aperta?
self.step = 3 # Distanza dalla porta
@leandrosilva
leandrosilva / Client.cs
Created October 31, 2010 02:54
Asynchronous Client/Server Socket Example with C# (from MSDN library)
// Asynchronous Client Socket Example
// http://msdn.microsoft.com/en-us/library/bew39x2a.aspx
using System;
using System.Net;
using System.Net.Sockets;
using System.Threading;
using System.Text;
// State object for receiving data from remote device.