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
// 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. |
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
# -*- coding: iso-8859-15 -*- | |
""" | |
Behavior Tree Example | |
""" | |
class WorldStatus(object): | |
def __init__(self): | |
self.aperta = False # Porta aperta? | |
self.step = 3 # Distanza dalla porta |
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
#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 |
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
#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 | |
****************************************************************************/ |
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
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); |
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
-- Set the background color. | |
pal(0,140,1) | |
function _update60() | |
cls() | |
--Two iterations | |
-- 0: Splashes | |
-- 1: Rain | |
for j=0,1 do |