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
<!DOCTYPE html><html><body> | |
An implementation of Heap sort in javascript using an array as an underlying structure.<br/> | |
Implemented to teach myself about heap sort and how it works, rather than a super fast implementation. Inspired by | |
<a href="http://www.algorist.com/">The Algorithm Design Manual</a>. | |
Use the browser console (F12) to see the output. | |
<script> | |
var test_american_history_dates = [1492, 1783, 1776, 1804, 1865, 1945, 1963, 1918, 2001, 1941]; |
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
<svg class="svg" version="1.1" xmlns="http://www.w3.org/2000/svg"></svg> | |
<script> | |
$(".svg").svg(); | |
var svg = $(".svg").svg('get'); | |
var myrect = svg.rect(25, 25, 150, '25%', 10, 10, | |
{fill: 'none', stroke: 'blue', strokeWidth: 3, | |
transform: 'rotate(0, 100, 75)'}); | |
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
<div id="container"></div> | |
<script> | |
var paper = new Raphael(document.getElementById('container'), 500, 400); | |
var rect = paper.rect(10, 20, 300, 200); | |
rect.animate({ | |
x: 100, | |
y: 50 |
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
<svg id="svg" version="1.1" xmlns="http://www.w3.org/2000/svg"></svg> | |
<script> | |
var s = Snap("#svg"); | |
var rect = s.rect(10, 10, 100, 100); | |
rect.animate({ | |
x: 50, | |
y: 50 | |
}, 1000); |
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
<html> | |
<head> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> | |
<script> | |
$(document).ready(function() { | |
var iframe = $('#frame'); | |
$("#frame").ready(function(){ | |
$("#frame").load(function () { | |
data = iframe[0].contentWindow.document.body.innerHTML; | |
if(data == "success"){ |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="//cdn.jsdelivr.net/snap.svg/0.1.0/snap.svg-min.js"></script> | |
<script> | |
var s = Snap("#svg"); | |
var block = s.rect(100, 100, 100, 100, 20, 20); | |
block.attr({ | |
fill: "rgb(236, 240, 241)", |
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 is how I would like to use snap.svg's drag method: | |
var block = s.rect(x, y, 100, 100, 20, 20); | |
block.drag({ | |
ondrag: function(dragContext, event) { | |
// drag method here | |
} | |
onstart: function(dragContext, event) { | |
// drag start 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="//cdn.jsdelivr.net/snap.svg/0.1.0/snap.svg-min.js"></script> | |
<script> | |
var s = Snap("#svg"); | |
var origTransform = {}; | |
var block = s.rect(100, 100, 100, 100, 20, 20); | |
block.attr({ |
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.Text; | |
using System.Threading.Tasks; | |
using System.Net.Http; | |
using System.Net.Http.Headers; | |
namespace Client | |
{ |
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
// Prior to ASP.NET Core, you had access to the AppDomain and all the loaded assemblies. | |
using Microsoft.AspNet.Mvc.Infrastructure; | |
using Microsoft.Extensions.PlatformAbstractions; | |
// Snip... | |
var assemblyProvider = new DefaultAssemblyProvider(PlatformServices.Default.LibraryManager); | |
var resourceControllers = assemblyProvider.CandidateAssemblies |
OlderNewer