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
function Calculate_Size return Natural; | |
-- illegal because call to Calculate_Size is non-static | |
Size : constant := Calculate_Size; | |
-- requires Size to be a static constant. | |
type Some_Type is mod 2 ** Size; |
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
with Ada.Text_IO; | |
with Ada.Numerics.Discrete_Random; | |
procedure Test is | |
subtype Random_Range is Integer range -10 .. 10; | |
package Random_X is new Ada.Numerics.Discrete_Random(Random_Range); | |
use Random_X; | |
Gen : Generator; | |
begin | |
loop |
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
import win32api, win32con | |
import os, os.path | |
import struct | |
import math | |
def checkPath(path, mode): | |
if not os.path.exists(path) or not os.path.isfile(path): | |
raise ValueError("{0} does not exist or isn't a file.".format(path)) | |
if not os.access(path, mode): | |
raise ValueError("Insufficient permissions: {0}".format(path)) |
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
Paket Eigenheim ist | |
Sorte Geschirr ist Stapel (Positiver Bereich <>) von Teller; | |
Paket Tellerhaufen ist neuer Haufen mit (Gegenstand => Teller); | |
Aufgabe Küche_Machen ist | |
Einsprungspunkt Dreckiges_Geschirr_Kommt (Dreckiges_Geschirr : Geschirr); | |
Ende von Küche_Machen; | |
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
package Foo is | |
type A is abstract tagged null record; | |
-- some functionality A provides | |
procedure Bar (Object : A); | |
-- some part of this functionality that depends | |
-- on the specific child-classes of A | |
-- this function should not be visible to other | |
-- packages, but it has to be visible to packages |
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
<?php | |
$arr = array(); | |
$arr[0] = "hurr"; | |
$arr[2] = "warbl"; | |
$arr[1] = "durr"; | |
foreach($arr as $item) { | |
echo $item; | |
} | |
?> |
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
with Ada.Containers.Hashed_Maps; | |
with Interfaces.C; | |
package Example is | |
type UInt is new Interfaces.C.unsigned; | |
type Whatever is new Integer; | |
function Hash (Key : UInt) return Ada.Containers.Hash_Type; | |
package My_Maps is new Ada.Containers.Hashed_Maps ( |
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
generic | |
-- defines maximum depth of tree | |
type Node_Level is <>; | |
package Tree is | |
-- it's a binary tree. for now. | |
type Tree_Direction is (Left, Right); | |
type Direction_Array is array (Node_Level range <>) of Tree_Direction; |
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
class A { | |
void method(A someObj) { | |
// .. do something here | |
} | |
} | |
class B extends A { | |
// .. declare something here | |
} |
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
FILE "siedler2.iso" BINARY | |
TRACK 01 MODE1/2048 | |
INDEX 01 00:00:00 | |
FILE "track02.ogg" MP3 | |
TRACK 02 AUDIO | |
PREGAP 00:02:00 | |
INDEX 01 00:00:00 | |
FILE "track03.ogg" MP3 | |
TRACK 03 AUDIO | |
INDEX 01 00:00:00 |