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
open System | |
open System.Windows | |
open System.Windows.Controls | |
open System.Windows.Shapes | |
open System.Windows.Media | |
let move sh x y = | |
Canvas.SetLeft(sh, x) | |
Canvas.SetTop(sh, 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
/// Pit jQuery API - Experimental version, modifies Pit AST to generate proper jQuery output | |
document.GetElementById("check") | |
|> jQuery.ofEl | |
|> jQuery.attr3 ([|"src","/images/hat.gif";"title","jQuery";"alt","jQuery logo"|]) | |
|> jQuery.css3 ("background","red") | |
|> jQuery.ignore |
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
namespace GLCameraRipple | |
open System | |
open System.Drawing | |
open System.Runtime.InteropServices | |
//open MonoTouch.CoreFoundation | |
open Microsoft.FSharp.NativeInterop | |
type RippleModel(screenSize : Size, meshFactor: int, touchRadius: int, textureSize: Size) = | |
do Console.WriteLine ("New RippleModel"); | |
let poolWidth = screenSize.Width / meshFactor |
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
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
Title="MainWindow" Height="350" Width="525"> | |
<Grid Name="MainGrid"> | |
<StackPanel Name="StackPanel1"> | |
<Button Name="Button1">First Button</Button> | |
<Button Name="Button2">Second Button</Button> | |
</StackPanel> | |
</Grid> | |
</Window> |
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
open System | |
open System.Windows | |
open System.Windows.Controls | |
open FSharpx | |
type MainWindow = XAML<"Window.xaml"> | |
let loadWindow() = | |
let window = MainWindow() | |
window.Button1.Click.Add(fun _ -> |
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
from glfwpy.glfw import (AUTO_POLL_EVENTS, OPENED, OPENGL_CORE_PROFILE, | |
OPENGL_FORWARD_COMPAT, OPENGL_PROFILE, OPENGL_VERSION_MAJOR, | |
OPENGL_VERSION_MINOR, WINDOW, | |
Enable, GetWindowParam, Init, OpenWindow, OpenWindowHint, | |
SetKeyCallback, SetWindowTitle, SwapBuffers, Terminate) | |
import numpy as np | |
from OpenGL.arrays import ArrayDatatype | |
from OpenGL.GL import (GL_ARRAY_BUFFER, GL_COLOR_BUFFER_BIT, | |
GL_COMPILE_STATUS, GL_FALSE, GL_FLOAT, GL_FRAGMENT_SHADER, | |
GL_LINK_STATUS, GL_RENDERER, GL_SHADING_LANGUAGE_VERSION, |
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
namespace Assembly_FSharp_vs | |
open UnityEditor | |
open UnityEngine | |
type public SomeTool() = | |
inherit UnityEditor.EditorWindow() | |
// | |
[<MenuItem("MySelection/Print Selection")>] | |
static member ShowWindow() = UnityEditor.EditorWindow.GetWindow(typeof<SomeTool>) |
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
// This F# dojo is directly inspired by the | |
// Digit Recognizer competition from Kaggle.com: | |
// http://www.kaggle.com/c/digit-recognizer | |
// The datasets below are simply shorter versions of | |
// the training dataset from Kaggle. | |
// The goal of the dojo will be to | |
// create a classifier that uses training data | |
// to recognize hand-written digits, and | |
// evaluate the quality of our classifier |
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
module test | |
(* | |
#r "Microsoft.Solver.Foundation.dll";; | |
#load "test.fs";; | |
test.computeProblem;; | |
*) | |
open Microsoft.SolverFoundation.Common | |
open Microsoft.SolverFoundation.Services |
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
-- basic implementation of a vector type | |
-- modeled after the Vec type from Courseras "Coding the Matrix" class | |
-- | implementation of a sparse-vector representation based on the | |
-- Courseras "Coding the Matrix" MOOC class | |
-- this is in no way optimized and is just indended for learning | |
module Vec where | |
-- *** I worked with these imports ... you might want others (or not) |
OlderNewer