Skip to content

Instantly share code, notes, and snippets.

@sfdesigner
sfdesigner / Main.java
Created August 22, 2019 11:26
Quiz 22
public class Main {
public static void main(String[] args) {
int[][] numbers = {{1,2,3},{4,5,6}};
// A
for (int[] row : numbers) {
for (int n : row) {
System.out.print(n);
@sfdesigner
sfdesigner / Program.cs
Last active August 10, 2016 16:10
C# + Trace to Output Panel
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Diagnostics;
namespace OutputToConsole
{
class Program
@sfdesigner
sfdesigner / __styles.css
Last active August 3, 2016 17:30
Simple boilerplate for CreateJS using CDN
/* Universal style sheet */
body {
font-family: "Segoe UI", "San Francisco", "Verdana", "Helvetica", sans-serif;
}
h1 {
font-size: 2em;
color: #18D;
border-bottom: 1px solid #18D;
}
@sfdesigner
sfdesigner / Program.cs
Created August 1, 2016 18:48
Examples of the new C# 6 string interpolation feature with $
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TextInterpolation
{
class Program
{
@sfdesigner
sfdesigner / MainPage.xaml
Created July 23, 2016 00:06
Copy and Paste from Clipboard in C# for Universal Windows App
<Page
x:Class="ClipboardSandbox.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:ClipboardSandbox"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" Padding="20">
@sfdesigner
sfdesigner / index.html
Created April 3, 2012 07:09
EaselJS 0.4 Boilerplate
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
<title>Test Game</title>
<script type="text/javascript" src="js/easel.js"></script>
<script type="text/javascript" src="js/shapeData.js"></script>
<script type="text/javascript" src="js/game.js"></script>
<link rel="stylesheet" type="text/css" href="">
</head>
@sfdesigner
sfdesigner / removeChildLoader.as
Created August 22, 2011 21:05
Removing children Loader instances from inside a MovieClip
/*
- A MovieClip is instantiated on the stage. In this example it is called removeMe
- A Loader class is created that loads a resource. The Loader class instance is added to the display stack within the removeMe MovieClip instance
- Another MovieClip is instantiated on the stage. This example names it clickMe. This MovieClip has an event listener attached to it listening for MouseEvent.CLICK, which then executes a callback function removeLoader()
- The removeLoader() event callback removes the Loader class instance from the display stack within the removeMe MovieClip instance
/*
import flash.display.Loader;
import flash.net.URLRequest;
import flash.events.MouseEvent;