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
if (isBurning) { | |
worldObj.setBlockWithNotify(xCoord, yCoord, zCoord, Blocks.tarKilnActive.id) | |
} else { | |
worldObj.setBlockWithNotify(xCoord, yCoord, zCoord, Blocks.tarKiln.id) | |
} |
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 Test | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var planets = new[] {"Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune"}; |
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
let internal unorderedOptList (ps : Parser<'a, 'u> list) = | |
fun (stream : CharStream<'u>) -> | |
let keys = [ 0 .. (ps |> List.length) - 1 ] | |
let parsers = ref (ps |> List.zip keys |> Map.ofList) | |
let results = keys |> List.map (fun key -> (key, ref (Reply(None)))) |> Map.ofList | |
let mutable continueLooping = true | |
let runParser (key : int) (value : Parser<'a, 'u>) = | |
let state = stream.State | |
let result : Reply<'a> = (value stream) |
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
macro_rules! query( | |
(from $v:ident in $c:ident $(where $mw:expr)* select $ms:expr) => | |
($c.filter_mapped(|&$v| if(true $(&& $mw)*) { Some($ms) } else { None })) | |
) | |
fn main() | |
{ | |
let nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; | |
let result1 = query!(from x in nums select x * 2); | |
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
struct Blorp | |
{ | |
bar: ~int | |
} | |
impl Blorp | |
{ | |
fn wrap(value: ~int) -> Blorp | |
{ | |
Blorp { bar: value } |
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
extern "C" fn foo() | |
{ | |
println("Hello, world!"); | |
} | |
struct Bar | |
{ | |
Foo: extern "C" fn() | |
} |
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; | |
using System.Linq; | |
using System.Math; | |
public class Point(double x, double y) | |
{ | |
public double X { get; } = x; | |
public double Y { get; } = y; | |
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
Imports AW | |
Module Bot | |
' Variable to hold a reference to the bot instance. | |
Dim _instance As Instance | |
' Variable to hold a reference to avatar add handler. | |
Dim _avatarAddHandler As InstanceEventHandler | |
Sub Main() |
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
var xs = from y in ys | |
where y % 2 == 0 | |
let x = y * 2 + 1 | |
select y; | |
var someResult = builder.AppendLine("Hello, world!") | |
.AppendLine("This is a test!"); |
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
var xs = from y in ys | |
where y % 2 == 0 | |
let x = y * 2 + 1 | |
select y; | |
var someResult = builder.AppendLine("Hello, world!") | |
.AppendLine("This is a test!"); |
OlderNewer