Examples for me since i can't seem to remember how the basics work!
- Here's an example of
WhenAny
with multiple parameters in the Windows Play application
/*! | |
* Amplify Store - Persistent Client-Side Storage 1.1.0 | |
* | |
* Copyright 2011 appendTo LLC. (http://appendto.com/team) | |
* Dual licensed under the MIT or GPL licenses. | |
* http://appendto.com/open-source-licenses | |
* | |
* http://amplifyjs.com | |
*/ | |
(function( amplify, undefined ) { |
<html> | |
<head> | |
<style type="text/css"> | |
.chart rect { | |
stroke: white; | |
fill: steelblue; | |
} | |
.line { | |
fill: none; |
Imports Nancy | |
Imports Nancy.Authentication.Forms.ModuleExtensions | |
Imports Nancy.Extensions | |
Imports Nancy.Security | |
Imports System.Dynamic | |
''' <summary> | |
''' Handles all security related requests | |
''' </summary> | |
Public Class Login |
Examples for me since i can't seem to remember how the basics work!
WhenAny
with multiple parameters in the Windows Play applicationusing System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
namespace RestSharpLearning | |
{ | |
public class Metadata | |
{ | |
public string result_type { get; set; } |
#! ruby | |
if ARGV.length == 1 | |
if File.exists?(ARGV[0]) | |
file = File.open(ARGV[0], "r") | |
puts "File name: #{ARGV[0]}" | |
count = 1 | |
file.each do |line| | |
line_count = line.split("\t").count |
#! ruby | |
# | |
# Gets the unique OPC methods from the OPC analyzer trace log of all the methods TopView Configurator and Engine uses | |
# Assumes that it has been given a valid file name | |
if ARGV.length == 1 and File.exists?(ARGV[0]) | |
input = File.open(ARGV.first, "r").read | |
# Build up a unique array of OPC methods | |
opc_methods = [] |
#! ruby | |
# This will generate a negative number set that i can use for testing my compression analysis | |
# | |
# Example: | |
# NegNumSet numberOfPoints [max] [freq] | |
# | |
# Arguments (all are optional so far): | |
# 1: numberOfPoints - the number of points to generate | |
# 2: Max - the maximum distance from zero that the data point values can have |
class Chop | |
def chop(target, values) | |
size = values.size | |
if size == 0 | |
-1 | |
elsif size == 1 | |
(values[0] == target ? 0 : -1) | |
else | |
if target < values[size/2] |