Skip to content

Instantly share code, notes, and snippets.

View SuprDewd's full-sized avatar

Bjarki Ágúst Guðmundsson SuprDewd

View GitHub Profile
@SuprDewd
SuprDewd / SieveOfEratosthenes.cs
Created May 30, 2011 15:25
Sieve Of Eratosthenes
using System;
using System.Collections.Generic;
using System.Linq;
namespace Primes
{
public static IEnumerable<int> SieveOfEratosthenes(int upperLimit)
{
int sieveBound = (upperLimit - 1) / 2,
upperSqrt = ((int)Math.Sqrt(upperLimit) - 1) / 2;

Keybase proof

I hereby claim:

  • I am SuprDewd on github.
  • I am suprdewd (https://keybase.io/suprdewd) on keybase.
  • I have a public key whose fingerprint is C2B7 124F 1002 CB7E 9EB5 7FD6 4C89 3F0D 004B 3101

To claim this, I am signing this object:

<?php
// Output contents of all css files.
foreach(scandir(dirname(__FILE__)) as $f)
{
if (substr($f, strlen($f) - 4) == '.css' && is_file($f))
{
// do something with css file like:
//echo file_get_contents($f);