Skip to content

Instantly share code, notes, and snippets.

@main--
main-- / gist:c8aeafe30170e28d5ec1
Last active August 29, 2015 14:19
ArrayList vs LinkedList
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Threading;
namespace katzenjammer
{
class MainClass
{
public static void Main(string[] args)
<?xml version="1.0" encoding="utf-8"?>
<package >
<metadata>
<id>Ice</id>
<title>Internet Communications Engine</title>
<version>3.5.1.0</version>
<authors>ZeroC</authors>
<owners>ZeroC</owners>
<licenseUrl>https://zeroc.com/licensing.html</licenseUrl>
<projectUrl>https://zeroc.com/icedotnet.html</projectUrl>
@main--
main-- / Eaterator.cs
Created September 8, 2015 00:31
Emulate iterators using async/await
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Eaterator
{
class Program
{
$ cat test1.c
int main() {
return *(int*)0;
}
$ clang -c test1.c -O3 -o test1
test1.c:2:12: warning: indirection of non-volatile null pointer will be deleted, not trap [-Wnull-dereference]
return *(int*)0;
^~~~~~~~
test1.c:2:12: note: consider using __builtin_trap() or qualifying pointer with 'volatile'
1 warning generated.