Skip to content

Instantly share code, notes, and snippets.


Simon Sotak the21st

View GitHub Profile

Keybase proof

I hereby claim:

  • I am the21st on github.
  • I am the21st ( on keybase.
  • I have a public key ASCY7UJXScQxlcLCjWfj0bzeNSc2MLwv1ncc0C6jOJYeHQo

To claim this, I am signing this object:

the21st / cmyk.scala
Last active Jun 28, 2016
failing twelvemonkeys cmyk image load
View cmyk.scala
import java.awt.color.ColorSpace
import javax.imageio.{ImageIO, ImageReadParam, ImageTypeSpecifier}
import scala.collection.JavaConverters._
val file = new File("cmyk.jpg")
val iis = new FileImageInputStream(file)
val jpegReaders = ImageIO.getImageReaders(iis).asScala.toVector
View StreamExample.scala
lazy val oddNumbers: Stream[Int] = 1 #:: + 2)
View EnglishPluralizationService.cs
private string InternalPluralize(string word)
if (this._userDictionary.ExistsInFirst(word))
return this._userDictionary.GetSecondValue(word);
if (this.IsNoOpWord(word))
return word;
string prefixWord;
string suffixWord = this.GetSuffixWord(word, out prefixWord);
if (this.IsNoOpWord(suffixWord) || this.IsUninflective(suffixWord) || (this._knownPluralWords.Contains(suffixWord.ToLowerInvariant()) || this.IsPlural(suffixWord)) || this._irregularPluralsPluralizationService.ExistsInFirst(suffixWord))
return prefixWord + suffixWord;