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
| static T Parse<T>(string value) | |
| where T : struct | |
| { | |
| var type = typeof(T); | |
| if (!type.IsEnum) | |
| throw new ArgumentException("T is not an enum"); | |
| var enumValue = Enum.Parse(type, value); | |
| return (T)enumValue; | |
| } |
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
| package com.cmosis.iconlib; | |
| import java.awt.Graphics; | |
| import java.awt.image.BufferedImage; | |
| import java.io.BufferedReader; | |
| import java.io.IOException; | |
| import java.io.InputStream; | |
| import java.io.InputStreamReader; | |
| import java.util.ArrayList; | |
| import java.util.HashMap; |
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; | |
| class ConvertBytes | |
| { | |
| public static void Convert08to08(byte[] src, int srcOff, short[] dst, int dstOff, int dstLen) | |
| { | |
| ValidateRange(src, srcOff, dst, dstOff, dstLen, 8); | |
| int n = dstLen / 4; | |
| for (int i = 0; i < n; i++) |
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.Collections.Generic; | |
| using System.Diagnostics; | |
| using System.IO; | |
| using System.Linq; | |
| namespace Util | |
| { | |
| public struct Position | |
| { |
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
| public sealed class UnionFind<T> | |
| { | |
| private sealed class Link<TLink> | |
| { | |
| public TLink parent; | |
| public int rank = 0; | |
| public Link(TLink parent) | |
| { | |
| this.parent = parent; |
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
| <?php | |
| // Startup database | |
| require_once 'Vacature/Autoloader.php'; | |
| Vacature_Autoloader::getInstance(); | |
| $mssqlconfig = Vacature_Config::get("db.mssql"); | |
| $db = Zend_Db::factory($mssqlconfig); | |
| if (isset($_SESSION['profiler'])) | |
| $db->getProfiler()->setEnabled(true); | |
| // Set encoding |
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
| { ----------------- SubRip 1.17 source ------------------- | |
| Copyright (C) 2002 Brain | |
| www.subrip.fr.st | |
| submagic@netcourrier.com | |
| See Unit01.pas for licence information. | |
| } | |
| unit Unit10; |
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
| <?php | |
| class EAN13render | |
| { | |
| // These are the different barcode patterns for each digit (7 bit each). | |
| // '1' represents a black line, '0' represents white (no line). | |
| static $Rcodes = array('1110010', '1100110', '1101100', '1000010', '1011100', | |
| '1001110', '1010000', '1000100', '1001000', '1110100'); | |
| // The EAN13 defines three groups of bit patterns. |
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
| import java.util.Iterator; | |
| import java.util.NoSuchElementException; | |
| public class IteratorWithCurrent<E> implements Iterator<E> | |
| { | |
| private final Iterator<E> it; | |
| private E current; | |
| public IteratorWithCurrent(Iterable<E> iterable) { | |
| it = iterable.iterator(); |
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
| package com.cmosis.test; | |
| import java.util.Comparator; | |
| public class NaturalOrderComparator implements Comparator<String> | |
| { | |
| static char charAt(String s, int i) | |
| { | |
| if (i >= s.length()) | |
| return 0; |