A Pen by Andrew Mitchell Barfield on CodePen.
Displays image thumbnails in a centered, horizontally flowing gallery.
A Pen by Andrew Mitchell Barfield on CodePen.
A console for the Web written in completely in JavaScript. The console supports Web versions of some Linux commands. This work is based, in part, on earlier work by Eric Bidelman.
A Pen by Andrew Mitchell Barfield on CodePen.
Calculates Pi to 5,000 digits using a Web Worker.
A Pen by Andrew Mitchell Barfield on CodePen.
Generates the Fibonacci Sequence in a Web Worker.
A Pen by Andrew Mitchell Barfield on CodePen.
This file contains 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
cls | |
$N = 5; | |
# -------------------------------------------------------------------------------- | |
# | |
# FUNCTION NAME: GenerateSet | |
# | |
# DESCRIPTION: Generates a set of N random integers between -9 and 9 | |
# | |
# -------------------------------------------------------------------------------- |
This file contains 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; | |
namespace BitTwiddling { | |
class Program { | |
// Compute the minimum of two integers without branching | |
static int Min(int x, int y) { | |
return y + ( ( x - y ) & ( ( x - y ) >> ( sizeof( int ) * 8 - 1 ) ) ); | |
} | |
// Compute the maximum of two integers without branching |
This file contains 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.Collections; | |
namespace BitArrayExample { | |
class Program { | |
static void Main(string[] args) { | |
bool le = BitConverter.IsLittleEndian; | |
if ( le ) { |
This file contains 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; | |
namespace DelegateExample { | |
class Program { | |
// Declares a delegate for the methods | |
public delegate String myMethodDelegate(); | |
// Defines an instance and static method | |
public class myMethodsClass { |
This file contains 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.Collections.Generic; | |
namespace GenericList { | |
class Program { | |
static void Main(string[] args) { | |
// int is the type argument | |
GenericList<int> list = new GenericList<int>(); | |
for ( int x = 0 ; x < 10 ; x++ ) { |
OlderNewer