answer
stringlengths
15
1.25M
<!DOCTYPE html> <html lang="en-us"> <head> <link href="http://gmpg.org/xfn/11" rel="profile"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <!-- Enable responsiveness on mobile devices--> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1"> <title> Posts Tagged &ldquo;systemjs&rdquo; &middot; Mike Loll </title> <!-- CSS --> <link rel="stylesheet" href="/public/css/poole.css"> <link rel="stylesheet" href="/public/css/syntax.css"> <link rel="stylesheet" href="/public/css/lanyon.css"> <link rel="stylesheet" href="/public/css/mikeloll.css"> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Serif:400,400italic,700%7CPT+Sans:400"> <!-- Icons --> <link rel="<API key>" sizes="144x144" href="/public/<API key>.png"> <link rel="shortcut icon" href="/public/favicon.ico"> <!-- RSS --> <link rel="alternate" type="application/rss+xml" title="RSS" href="/atom.xml"> </head> <body> <!-- Target for toggling the sidebar `.sidebar-checkbox` is for regular styles, `#sidebar-checkbox` for behavior. --> <input type="checkbox" class="sidebar-checkbox" id="sidebar-checkbox"> <!-- Toggleable sidebar --> <div class="sidebar" id="sidebar"> <div class="sidebar-item"> <p></p> </div> <nav class="sidebar-nav"> <a class="sidebar-nav-item" href="/">Home</a> <a class="sidebar-nav-item" href="/about/">About</a> <a class="sidebar-nav-item" href="/archive/">Archive</a> </nav> <div class="sidebar-item"> <p> &copy; 2015. All rights reserved. </p> </div> </div> <!-- Wrap is the content to shift when toggling the sidebar. We wrap the content to avoid any CSS collisions with our real content. <div class="wrap"> <div class="masthead"> <div class="container"> <h3 class="masthead-title"> <a href="/" title="Home">Mike Loll</a> <small>A collection of random tech related things.</small> </h3> </div> </div> <div class="container content"> <h2 class="post_title">Posts Tagged &ldquo;systemjs&rdquo;</h2> 01/02/14<a class="<API key>" href='/2014/01/02/introducing-lanyon/'>Introducing Lanyon</a> <p class="summary"></p> <a class="tag_list_link" href="/tag/angular2">angular2</a>&nbsp;&nbsp;<a class="tag_list_link" href="/tag/typescript">typescript</a>&nbsp;&nbsp;<a class="tag_list_link" href="/tag/systemjs">systemjs</a>&nbsp;&nbsp; </ul> </div> </div> <label for="sidebar-checkbox" class="sidebar-toggle"></label> <script> (function(document) { var toggle = document.querySelector('.sidebar-toggle'); var sidebar = document.querySelector('#sidebar'); var checkbox = document.querySelector('#sidebar-checkbox'); document.addEventListener('click', function(e) { var target = e.target; if(!checkbox.checked || sidebar.contains(target) || (target === checkbox || target === toggle)) return; checkbox.checked = false; }, false); })(document); </script> <script> (function(i,s,o,g,r,a,m){i['<API key>']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.<API key>(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script',' ga('create', 'UA-70120850-1', 'auto'); ga('send', 'pageview'); </script> </body> </html>
class <API key> < Sinatra::Base require 'bundler' Bundler.require end
// JSON Object of all of the icons and their tags export default { apple : { name : 'apple', color: '#be0000', image : 'apple67.svg', tags: ['apple', 'fruit', 'food'], categories: ['food', 'supermarket'] }, bread : { name : 'bread', color: '#c26b24', image : 'bread14.svg', tags: ['bread', 'food', 'wheat', 'bake'], categories: ['food', 'supermarket'] }, broccoli : { name : 'broccoli', color: '#16a900', image : 'broccoli.svg', tags: ['broccoli', 'food', 'vegetable'], categories: ['food', 'supermarket'] }, cheese : { name : 'cheese', color: '#ffe625', image : 'cheese7.svg', tags: ['cheese', 'food', 'dairy'], categories: ['food', 'supermarket'] }, shopping : { name : 'shopping', color: '#f32393', image : 'shopping225.svg', tags: ['shopping', 'bag'], categories: ['shopping', 'supermarket'] }, cart : { name : 'cart', color: '#9ba990', image : 'supermarket1.svg', tags: ['cart', 'shopping'], categories: ['shopping', 'supermarket'] }, fish : { name : 'fish', color: '#6d7ca9', image : 'fish52.svg', tags: ['fish', 'food'], categories: ['fish', 'supermarket'] }, giftbox : { name : 'giftbox', color: '#f32393', image : 'giftbox56.svg', tags: ['giftbox', 'gift', 'present'], categories: ['gift', 'shopping', 'supermarket'] } };
#!/bin/bash # bash strict mode set -euo pipefail IFS=$'\n\t' USAGE="Usage:\n Requires AWS CLI tools and credentials configured.\n ./tool.sh install mySourceDirectory\n ./tool.sh create mySourceDirectory <API key> myIAMRoleARN\n ./tool.sh update mySourceDirectory <API key>\n ./tool.sh invoke <API key>\n " REGION="eu-west-1" PROFILE="heap" # Install pip requirements for a Python lambda function <API key> { FUNCTION_DIRECTORY=$2 cd $FUNCTION_DIRECTORY pip install -r requirements.txt -t . } # Creates a new lambda function function create { FUNCTION_DIRECTORY=$2 FUNCTION_ARN_NAME=$3 ROLE_ARN=$4 mkdir -p build cd $FUNCTION_DIRECTORY zip -FSr ../build/$FUNCTION_DIRECTORY.zip . cd .. aws lambda create-function\ --function-name $FUNCTION_ARN_NAME\ --runtime python2.7\ --role $4\ --handler main.lambda_handler\ --timeout 15\ --memory-size 128\ --zip-file fileb://build/$FUNCTION_DIRECTORY.zip } # Packages and uploads the source code of a AWS Lambda function and deploys it live. function <API key> { FUNCTION_DIRECTORY=$2 FUNCTION_ARN_NAME=$3 mkdir -p build cd $FUNCTION_DIRECTORY zip -FSr ../build/$FUNCTION_DIRECTORY.zip . cd .. aws lambda <API key> --profile $PROFILE --region $REGION --function-name $FUNCTION_ARN_NAME --zip-file fileb://build/$FUNCTION_DIRECTORY.zip } # Invokes an AWS Lambda function and outputs its result function invoke { FUNCTION_ARN_NAME=$2 aws lambda invoke --profile $PROFILE --region $REGION --function-name $FUNCTION_ARN_NAME /dev/stdout } function help_and_exit { echo -e $USAGE exit 1 } # Subcommand handling if [ $# -lt 1 ] then help_and_exit fi case "$1" in install) if (( $# == 2 )); then <API key> "$@" else help_and_exit fi ;; create) if (( $# == 4 )); then create "$@" else help_and_exit fi ;; update) if (( $# == 3 )); then <API key> "$@" else help_and_exit fi ;; invoke) if (( $# == 2 )); then invoke "$@" else help_and_exit fi ;; *) echo "Error: No such subcommand" help_and_exit esac
package sudoku import "fmt" const ( n = 3 N = 3 * 3 ) var ( resolved bool ) func solveSudoku(board [][]byte) [][]byte { // box size 3 row := make([][]int, N) columns := make([][]int, N) box := make([][]int, N) res := make([][]byte, N) for i := 0; i < N; i++ { row[i] = make([]int, N+1) columns[i] = make([]int, N+1) box[i] = make([]int, N+1) res[i] = make([]byte, N) copy(res[i], board[i]) } for i := 0; i < N; i++ { for j := 0; j < N; j++ { if board[i][j] != '.' { placeNumberAtPos(res, i, j, int(board[i][j]-'0'), row, columns, box) } } } fmt.Printf("row: %v\n, column: %v\n, box: %v\n", row, columns, box) permute(res, 0, 0, row, columns, box) return res } func placeNumberAtPos(board [][]byte, i, j, num int, row, columns, box [][]int) { boxIdx := (i/n)*n + j/n (row)[i][num]++ (columns)[j][num]++ (box)[boxIdx][num]++ (board)[i][j] = byte('0' + num) } func removeNumberAtPos(board [][]byte, i, j, num int, row, columns, box [][]int) { boxIdx := (i/n)*n + j/n row[i][num]++ columns[j][num]++ box[boxIdx][num]++ board[i][j] = '.' } func isValidPosForNum(i, j, num int, row, columns, box [][]int) bool { boxIdx := (i/n)*n + j/n return row[i][num]+columns[j][num]+box[boxIdx][num] == 0 } func permute(board [][]byte, i, j int, row, column, box [][]int) { if board[i][j] == '.' { for k := 1; k <= N; k++ { if isValidPosForNum(i, j, k, row, column, box) { placeNumberAtPos(board, i, j, k, row, column, box) fmt.Printf("place k:%d at row: %d and col:%d, row[i][k]= %d, col[j][k] = %d and box[boxidx][k] = %d\n", k, i, j, row[i][k], column[j][k], box[(i/n)*n+j/n][k]) placeNext(board, i, j, row, column, box) fmt.Printf("place next then k:%d at row: %d and col:%d, row[i][k]= %d, col[j][k] = %d and box[boxidx][k] = %d\n", k, i, j, row[i][k], column[j][k], box[(i/n)*n+j/n][k]) if !resolved { removeNumberAtPos(board, i, j, k, row, column, box) } } } } else { placeNext(board, i, j, row, column, box) } } func placeNext(board [][]byte, i, j int, row, column, box [][]int) { if i == N-1 && j == N-1 { resolved = true } fmt.Printf("board: %v\n, row: %v \n, column: %v\n, box: %v\n", board, row, column, box) if j == N-1 { fmt.Println("next row") permute(board, i+1, 0, row, column, box) } else { fmt.Println("next column") permute(board, i, j+1, row, column, box) } } func solveSudoku2(board [][]byte) [][]byte { if len(board) == 0 { return board } solve(board) return board } func solve(board [][]byte) bool { var c byte for i := 0; i < len(board); i++ { for j := 0; j < len(board[0]); j++ { if board[i][j] == '.' { for c = '1'; c <= '9'; c++ { if isValid(board, i, j, c) { board[i][j] = c if solve(board) { return true } else { board[i][j] = '.' } } } return false } } } return true } func isValid(board [][]byte, row int, col int, c byte) bool { for i := 0; i < 9; i++ { if board[i][col] != '.' && board[i][col] == c { return false } if board[row][i] != '.' && board[row][i] == c { return false } if board[3*(row/3)+i/3][3*(col/3)+i%3] != '.' && board[3*(row/3)+i/3][3*(col/3)+i%3] == c { return false } } return true }
<div> The version string to use when patching assembly version files. </div>
return function(parameters) return { position = parameters.position or {x = 0, y = 0, z = 0}, scale = parameters.scale or {x = 0, y = 0}, anchors = parameters.anchors or {up = 1, left = 1, right = 1, down = 1}, offset = parameters.offset or {up = 0, left = 0, right = 0, down = 0}, useTween = parameters.useTween or true, velocity = parameters.velocity or 5 } end
#include "Fractal.h" Color::Color() : r(0.0), g(0.0), b(0.0) {} Color::Color(double rin, double gin, double bin) : r(rin), g(gin), b(bin) {} Fractal::Fractal(int width, int height) : width_(width), height_(height), center_x_(0.0), center_y_(0.0), max_distance_sqr_(4.0), max_iteration_(32) { pixel_size_ = 4.0 / width_; } Fractal::~Fractal() {} void Fractal::Initialize() { RecalcMins(); CreateColors(); CalculateEscapeTime(); } void Fractal::CreateColors() { int i; double r, g, b; colors_.resize(max_iteration_ + 1); for (i = 0; i < max_iteration_; i++) { r = 1.0 * i / (double) max_iteration_; g = 0.5 * i / (double) max_iteration_; b = 1.0 * i / (double) max_iteration_; colors_[i] = Color(r, g, b); } colors_[max_iteration_] = Color(0.0, 0.0, 0.0); } void Fractal::CalculateEscapeTime() { int i, j; double x, y, xmin, ymin; xmin = center_x_ - pixel_size_ * (width_ / 2.0 - 0.5); ymin = center_y_ - pixel_size_ * (height_ / 2.0 - 0.5); escape_times_.resize(height_); for (j = 0; j < height_; j++) { escape_times_[j].resize(width_); for (i = 0; i < width_; i++) { x = xmin + i * pixel_size_; y = ymin + j * pixel_size_; escape_times_[j][i] = EscapeOne(x, y); } } } void Fractal::Draw() { int x, y, iter; for (y = 0; y < height_; y++) { for (x = 0; x < width_; x++) { iter = escape_times_[y][x]; glColor3d(colors_[iter].r, colors_[iter].g, colors_[iter].b); glBegin(GL_POINTS); glVertex2d(x, y); glEnd(); } } } void Fractal::Center(double x, double y) { RecalcCenter(x, y); RecalcMins(); CalculateEscapeTime(); } void Fractal::ZoomIn(double x, double y) { RecalcCenter(x, y); pixel_size_ /= 2.0; RecalcMins(); CalculateEscapeTime(); } void Fractal::ZoomOut(double x, double y) { RecalcCenter(x, y); pixel_size_ *= 2.0; RecalcMins(); CalculateEscapeTime(); } void Fractal::RecalcCenter(double x, double y) { center_x_ = min_x_ + pixel_size_ * x; center_y_ = min_y_ + pixel_size_ * y; } void Fractal::RecalcMins() { min_x_ = center_x_ - pixel_size_ * (width_ / 2.0 - 0.5); min_y_ = center_y_ - pixel_size_ * (height_ / 2.0 - 0.5); }
using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.IO; using Mechanical3.Core; namespace Mechanical3.IO.FileSystems { / NOTE: For still more speed, you could ditch abstract file systems, file paths and streams alltogether, and just use byte arrays directly. / Obviously this is a compromize between performance and ease of use. <summary> Provides performant, semi thread-safe access to an in-memory copy of the contants of an <see cref="IFileSystemReader"/>. Access to <see cref="IFileSystemReader"/> members is thread-safe. <see cref="Stream"/> instances returned are NOT thread-safe, and they must not be used after they are closed or disposed (one of which should happen exactly one time). </summary> public class <API key> : IFileSystemReader { #region <API key> <summary> Provides thread-safe, read-only access to the wrapped byte array. </summary> private class <API key> : Stream { / NOTE: the default asynchronous implementations call their synchronous versions. / NOTE: we don't use Store*, to save a few allocations #region ObjectPool internal static class ObjectPool { private static readonly ConcurrentBag<<API key>> Pool = new ConcurrentBag<<API key>>(); internal static <API key> Get( byte[] data ) { <API key> stream; if( !Pool.TryTake(out stream) ) stream = new <API key>(); stream.OnInitialize(data); return stream; } internal static void Put( <API key> stream ) { Pool.Add(stream); } internal static void Clear() { <API key> stream; while( true ) { if( Pool.TryTake(out stream) ) GC.SuppressFinalize(stream); else break; // pool is empty } } } #endregion #region Private Fields private byte[] array; private int position; // NOTE: (position == length) == EOF private bool isOpen; #endregion #region Constructor private <API key>() : base() { } #endregion #region Private Methods private void OnInitialize( byte[] data ) { this.array = data; this.position = 0; this.isOpen = true; } private void OnClose() { this.isOpen = false; this.array = null; this.position = -1; } private void ThrowIfClosed() { if( !this.isOpen ) throw new <API key>(message: "The stream was already closed!", innerException: null); } #endregion #region Stream protected override void Dispose( bool disposing ) { this.OnClose(); ObjectPool.Put(this); if( !disposing ) { // called from finalizer GC.<API key>(this); } } public override bool CanRead { get { this.ThrowIfClosed(); return true; } } public override bool CanSeek { get { this.ThrowIfClosed(); return true; } } public override bool CanTimeout { get { this.ThrowIfClosed(); return false; } } public override bool CanWrite { get { this.ThrowIfClosed(); return false; } } public override long Length { get { this.ThrowIfClosed(); return this.array.Length; } } public override long Position { get { this.ThrowIfClosed(); return this.position; } set { this.ThrowIfClosed(); if( value < 0 || this.array.Length < value ) throw new <API key>(); this.position = (int)value; } } public override long Seek( long offset, SeekOrigin origin ) { this.ThrowIfClosed(); int newPosition; switch( origin ) { case SeekOrigin.Begin: newPosition = (int)offset; break; case SeekOrigin.Current: newPosition = this.position + (int)offset; break; case SeekOrigin.End: newPosition = this.array.Length + (int)offset; break; default: throw new ArgumentException("Invalid SeekOrigin!"); } if( newPosition < 0 || newPosition > this.array.Length ) throw new <API key>(); this.position = newPosition; return this.position; } public override int ReadByte() { this.ThrowIfClosed(); if( this.position == this.array.Length ) { // end of stream return -1; } else { return this.array[this.position++]; } } public override int Read( byte[] buffer, int offset, int bytesToRead ) { this.ThrowIfClosed(); int bytesLeft = this.array.Length - this.position; if( bytesLeft < bytesToRead ) bytesToRead = bytesLeft; if( bytesToRead == 0 ) return 0; Buffer.BlockCopy(src: this.array, srcOffset: this.position, dst: buffer, dstOffset: offset, count: bytesToRead); this.position += bytesToRead; return bytesToRead; } public override void Flush() { throw new <API key>(); } public override void SetLength( long value ) { throw new <API key>(); } public override void WriteByte( byte value ) { throw new <API key>(); } public override void Write( byte[] buffer, int offset, int count ) { throw new <API key>(); } #endregion } #endregion #region Private Fields /* From MSDN: * A Dictionary can support multiple readers concurrently, as long as the collection is not modified. * Even so, enumerating through a collection is intrinsically not a thread-safe procedure. In the * rare case where an enumeration contends with write accesses, the collection must be locked during * the entire enumeration. To allow the collection to be accessed by multiple threads for reading * and writing, you must implement your own synchronization. * * ... (or there is also <API key>) */ / NOTE: since after they are filled, the dictionaries won't be modified, we are fine. private readonly FilePath[] rootFolderEntries; private readonly Dictionary<FilePath, FilePath[]> <API key>; private readonly Dictionary<FilePath, byte[]> fileContents; private readonly Dictionary<FilePath, string> hostPaths; private readonly string rootHostPath; #endregion #region Constructors <summary> Copies the current contents of the specified <see cref="IFileSystemReader"/> into a new <see cref="<API key>"/> instance. </summary> <param name="readerToCopy">The abstract file system to copy the current contents of, into memory.</param> <returns>A new <see cref="<API key>"/> instance.</returns> public static <API key> CopyFrom( IFileSystemReader readerToCopy ) { return new <API key>(readerToCopy); } <summary> Initializes a new instance of the <see cref="<API key>"/> class. </summary> <param name="readerToCopy">The abstract file system to copy the current contents of, into memory.</param> private <API key>( IFileSystemReader readerToCopy ) { this.rootFolderEntries = readerToCopy.GetPaths(); this.<API key> = new Dictionary<FilePath, FilePath[]>(); this.fileContents = new Dictionary<FilePath, byte[]>(); if( readerToCopy.SupportsToHostPath ) { this.hostPaths = new Dictionary<FilePath, string>(); this.rootHostPath = readerToCopy.ToHostPath(null); } using( var tmpStream = new MemoryStream() ) { foreach( var e in this.rootFolderEntries ) this.AddRecursively(e, readerToCopy, tmpStream); } } #endregion #region Private Methods private void AddRecursively( FilePath entry, IFileSystemReader readerToCopy, MemoryStream tmpStream ) { if( entry.IsDirectory ) { var subEntries = readerToCopy.GetPaths(entry); this.<API key>.Add(entry, subEntries); foreach( var e in subEntries ) this.AddRecursively(e, readerToCopy, tmpStream); } else { this.fileContents.Add(entry, ReadFileContents(entry, readerToCopy, tmpStream)); } if( this.SupportsToHostPath ) this.hostPaths.Add(entry, readerToCopy.ToHostPath(entry)); } private static byte[] ReadFileContents( FilePath filePath, IFileSystemReader readerToCopy, MemoryStream tmpStream ) { tmpStream.SetLength(0); long? fileSize = null; if( readerToCopy.SupportsGetFileSize ) { fileSize = readerToCopy.GetFileSize(filePath); ThrowIfFileTooBig(filePath, fileSize.Value); } using( var stream = readerToCopy.ReadFile(filePath) ) { if( !fileSize.HasValue && stream.CanSeek ) { fileSize = stream.Length; ThrowIfFileTooBig(filePath, fileSize.Value); } stream.CopyTo(tmpStream); if( !fileSize.HasValue ) ThrowIfFileTooBig(filePath, tmpStream.Length); return tmpStream.ToArray(); } } private static void ThrowIfFileTooBig( FilePath filePath, long fileSize ) { if( fileSize > int.MaxValue ) // that's the largest our stream implementation can support throw new Exception("One of the files is too large!").Store(nameof(filePath), filePath).Store(nameof(fileSize), fileSize); } #endregion #region IFileSystemBase <summary> Gets a value indicating whether the ToHostPath method is supported. </summary> <value><c>true</c> if the method is supported; otherwise, <c>false</c>.</value> public bool SupportsToHostPath { get { return this.hostPaths.NotNullReference(); } } <summary> Gets the string the underlying system uses to represent the specified file or directory. </summary> <param name="path">The path to the file or directory.</param> <returns>The string the underlying system uses to represent the specified <paramref name="path"/>.</returns> public string ToHostPath( FilePath path ) { if( !this.SupportsToHostPath ) throw new <API key>().StoreFileLine(); if( path.NullReference() ) return this.rootHostPath; string result; if( this.hostPaths.TryGetValue(path, out result) ) return result; else throw new <API key>("The specified file or directory was not found!").Store(nameof(path), path); } #endregion #region IFileSystemReader <summary> Gets the paths to the direct children of the specified directory. Subdirectories are not searched. </summary> <param name="directoryPath">The path specifying the directory to list the direct children of; or <c>null</c> to specify the root of this file system.</param> <returns>The paths of the files and directories found.</returns> public FilePath[] GetPaths( FilePath directoryPath = null ) { if( directoryPath.NotNullReference() && !directoryPath.IsDirectory ) throw new ArgumentException("Argument is not a directory!").Store(nameof(directoryPath), directoryPath); FilePath[] paths; if( directoryPath.NullReference() ) { paths = this.rootFolderEntries; } else { if( !this.<API key>.TryGetValue(directoryPath, out paths) ) throw new <API key>("The specified file or directory was not found!").Store(nameof(directoryPath), directoryPath); } // NOTE: Unfortunately we need to make a copy, since arrays are writable. // TODO: return ImmutableArray from GetPaths. var copy = new FilePath[paths.Length]; Array.Copy(sourceArray: paths, destinationArray: copy, length: paths.Length); return copy; } <summary> Opens the specified file for reading. </summary> <param name="filePath">The path specifying the file to open.</param> <returns>A <see cref="Stream"/> representing the file opened.</returns> public Stream ReadFile( FilePath filePath ) { if( filePath.NullReference() || filePath.IsDirectory ) throw new ArgumentException("Argument is not a file!").Store(nameof(filePath), filePath); byte[] bytes; if( !this.fileContents.TryGetValue(filePath, out bytes) ) throw new <API key>("The specified file or directory was not found!").Store(nameof(filePath), filePath); return <API key>.ObjectPool.Get(bytes); } <summary> Gets a value indicating whether the GetFileSize method is supported. </summary> <value><c>true</c> if the method is supported; otherwise, <c>false</c>.</value> public bool SupportsGetFileSize { get { return true; } } <summary> Gets the size, in bytes, of the specified file. </summary> <param name="filePath">The file to get the size of.</param> <returns>The size of the specified file in bytes.</returns> public long GetFileSize( FilePath filePath ) { if( filePath.NullReference() || filePath.IsDirectory ) throw new ArgumentException("Argument is not a file!").Store(nameof(filePath), filePath); byte[] bytes; if( !this.fileContents.TryGetValue(filePath, out bytes) ) throw new <API key>("The specified file or directory was not found!").Store(nameof(filePath), filePath); return bytes.Length; } #endregion } }
FROM ubuntu:14.04 MAINTAINER Johannes Wettinger, http://github.com/jojow ENV ENGINE_BRANCH maven ENV ENGINE_REV HEAD ENV MAVEN_VERSION 3.3.9 ENV MAVEN_URL http://archive.apache.org/dist/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz ENV HOME /root WORKDIR ${HOME} ENV DEBIAN_FRONTEND noninteractive ENV PATH ${PATH}:/opt/apache-maven-${MAVEN_VERSION}/bin/ # Replace /dev/random by /dev/urandom to avoid blocking RUN rm /dev/random && ln -s /dev/urandom /dev/random # Install dependencies RUN apt-get update -y && \ apt-get install -y curl wget git openjdk-7-jdk && \ apt-get clean -y RUN wget ${MAVEN_URL} && \ tar -zxf apache-maven-${MAVEN_VERSION}-bin.tar.gz && \ cp -R apache-maven-${MAVEN_VERSION} /opt ENV DOCKER_BUCKET get.docker.com ENV DOCKER_VERSION 1.12.0 ENV DOCKER_SHA256 <SHA256-like> ENV <API key> 1.8.0 RUN set -x && \ curl -fSL "https://${DOCKER_BUCKET}/builds/Linux/x86_64/docker-${DOCKER_VERSION}.tgz" -o docker.tgz && \ echo "${DOCKER_SHA256} *docker.tgz" | sha256sum -c - && \ tar -xzvf docker.tgz && \
<h1> FOOTBALL </h1> </body> Since the beginning of school we have been analyzing our opponents data for our football team. Since I do not obtain any mathematical skills, it was a challenge. All I could and did offer to the table was what appeared the most important out of the data. Such as, certain number of times a certain play/form was used and the probability of the plays they would execute. My process is shown below. <img src="power cat - Google Docs.mhtml"
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>java</title> <meta name="author" content=""> <!-- Le HTML5 shim, for IE6-8 support of HTML elements --> <!--[if lt IE 9]> <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> <![endif] <!-- Le styles --> <link href="https://cdn.jsdelivr.net/npm/bootstrap/dist/css/bootstrap.min.css" type="text/css" rel="stylesheet" media="all"> <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script> <script src="/assets/twitter/javascripts/qrcode.js"></script> <!-- Le fav and touch icons --> <!-- Update these with your own images <link rel="shortcut icon" href="images/favicon.ico"> <link rel="apple-touch-icon" href="images/apple-touch-icon.png"> <link rel="apple-touch-icon" sizes="72x72" href="images/<API key>.png"> <link rel="apple-touch-icon" sizes="114x114" href="images/<API key>.png"> </head> <body> <nav class="navbar navbar-expand-lg navbar-light bg-light"> <a class="navbar-brand" href="/"></a> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#<API key>" aria-controls="<API key>" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <div class="collapse navbar-collapse" id="<API key>"> <ul class="navbar-nav mr-auto"> <li class="nav-item"> <a class="nav-link" href="/archive"></a> </li> <li class="nav-item"> <a class="nav-link" href="/tags"></a> </li> <li class="nav-item"> <a class="nav-link" href="/categories"></a> </li> <li class="nav-item"> <a class="nav-link" href="/pages"></a> </li> <li class="nav-item"> <a class="nav-link" href="/about"></a> </li> </ul> </div> </nav> <div class="container"> <div class="page-header"> <h1>java </h1> </div> <div class="row"> <div class="span8"> <p></p> <hr> <div class="pagination"> <ul> <ul> <li class="prev"><a href="/2012/291.html" title="2">&larr; Previous</a></li> <li><a href="/archive">Archive</a></li> <li class="next"><a href="/2012/289.html" title="">Next &rarr;</a></li> </ul> </ul> </div> <hr> </div> <div class="span4"> <h4>Published</h4> <div class="date"><span>2012-09-12 02:56:35</span></div> <br> <h4>Share to Weixin</h4> <div id="share-qrcode"></div> <script type="text/javascript"> new QRCode(document.getElementById("share-qrcode"), { text:document.URL, width:128, height:128 }); </script> <br> <h4>Categories</h4> <ul class="tag_box"> <li> <a href="/categories/#%E5%BC%80%E5%8F%91%E6%8A%80%E6%9C%AF%E7%B1%BB--%E8%B0%8B%E7%94%9F%E7%AF%87-ref">-- <span>51</span></a> </li> </ul> <br> <h4>Tags</h4> <ul class="tag_box"> </ul> </div> </div> <footer> <p>&copy; 2016 with help from <a href="http://github.com/wendal/gor" target="_blank" title="Gor -- Fast Blog">Gor</a> and <a href="http://twitter.github.com/bootstrap/" target="_blank">Twitter Bootstrap</a> and Idea from <a href="http://ruhoh.com" target="_blank" title="The Definitive Technical Blogging Framework">ruhoh</a> <a href="http: </p> </footer> </div> <!-- /container --> </body> </html>
<!doctype html> <! Minimal Mistakes Jekyll Theme 4.13.0 by Michael Rose Copyright 2013-2018 Michael Rose - mademistakes.com | @mmistakes Free for personal and commercial use under the MIT license https: <html lang="en" class="no-js"> <head> <meta charset="utf-8"> <!-- begin _includes/seo.html --><title>Swift - Preslav Rachev</title> <meta name="description" content="Finding beauty in everyday things."> <meta property="og:type" content="website"> <meta property="og:locale" content="en_US"> <meta property="og:site_name" content="Preslav Rachev"> <meta property="og:title" content="Swift"> <meta property="og:url" content="https://preslav.me/tags/swift/"> <link rel="canonical" href="https://preslav.me/tags/swift/"> <script type="application/ld+json"> { "@context": "http://schema.org", "@type": "Person", "name": "Your Name", "url": "https://preslav.me", "sameAs": null } </script> <!-- end _includes/seo.html --> <link href="/feed.xml" type="application/atom+xml" rel="alternate" title="Preslav Rachev Feed"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <script> document.documentElement.className = document.documentElement.className.replace(/\bno-js\b/g, '') + ' js '; </script> <!-- For all browsers --> <link rel="stylesheet" href="/assets/css/main.css"> <!--[if lte IE 9]> <style> /* old IE unsupported flexbox fixes */ .greedy-nav .site-title { padding-right: 3em; } .greedy-nav button { position: absolute; top: 0; right: 0; height: 100%; } </style> <![endif] <link href="https://fonts.googleapis.com/css?family=PT+Sans+Narrow:400,700|PT+Serif:400,700,400italic" rel="stylesheet" type="text/css"> <link href="https://micro.blog/preslavrachev" rel="me" /> </head> <body class="<API key>"> <!--[if lt IE 9]> <div class="notice--danger align-center" style="margin: 0;">You are using an <strong>outdated</strong> browser. Please <a href="https://browsehappy.com/">upgrade your browser</a> to improve your experience.</div> <![endif] <div class="masthead"> <div class="<API key>"> <div class="masthead__menu"> <nav id="site-nav" class="greedy-nav"> <a class="site-title" href="/">Preslav Rachev</a> <ul class="visible-links"><li class="masthead__menu-item"> <a href="/about-me" >About</a> </li><li class="masthead__menu-item"> <a href="/micro" >Microblog</a> </li><li class="masthead__menu-item"> <a href="/archive" >Archive</a> </li><li class="masthead__menu-item"> <a href="/contact" >Contact</a> </li></ul> <button class="search__toggle" type="button"> <svg class="icon" width="16" height="16" xmlns="http: <path d="M15.5,13.12L13.19,10.8a1.69,1.69,0,0,0-1.28-.55l-0.06-.06A6.5,6.5,0,0,0,5.77,0,6.5,6.5,0,0,0,2.46,11.59a6.47,6.47,0,0,0,7.74.26l0.05,0.05a1.65,1.65,0,0,0,.5,1.24l2.38,2.38A1.68,1.68,0,0,0,15.5,13.12ZM6.4,2A4.41,4.41,0,1,1,2,6.4,4.43,4.43,0,0,1,6.4,2Z" transform="translate(-.01)"></path> </svg> </button> <button class="greedy-nav__toggle hidden" type="button"> <span class="visually-hidden">Toggle menu</span> <div class="navicon"></div> </button> <ul class="hidden-links hidden"></ul> </nav> </div> </div> </div> <div class="initial-content"> <div id="main" role="main"> <div class="archive"> <h1 class="page__title">Swift</h1> <div class="list__item"> <article class="archive__item" itemscope itemtype="http://schema.org/CreativeWork"> <h2 class="archive__item-title" itemprop="headline"> <a href="/2018/07/20/<API key>/" rel="permalink">Don’t Throw React Native Away Just Yet </a> </h2> <p class="page__meta"><i class="far fa-clock" aria-hidden="true"></i> 6 minute read </p> <p class="<API key>" itemprop="description">The main reason why mobile developers get enticed by the cross-platform development capabilities of frameworks like React Native, is, of course, the ability to share code across platforms. A smaller, but no less important reason is the ability to build, debug, and refactor faster. Last but not least, such solutions often help broaden up the variety of tools, beyond the ones dictated by the platform vendor. </p> </article> </div> <div class="list__item"> <article class="archive__item" itemscope itemtype="http://schema.org/CreativeWork"> <h2 class="archive__item-title" itemprop="headline"> <a href="/2018/06/17/<API key>/" rel="permalink">Embracing the Future </a> </h2> <p class="page__meta"><i class="far fa-clock" aria-hidden="true"></i> 5 minute read </p> <p class="<API key>" itemprop="description">Dominik Wagner (a.k.a. @monkeydom) published an article a few days ago, called On my misalignment with Apple’s love affair with Swift. </p> </article> </div> </div> </div> </div> <div class="search-content"> <div class="<API key>"><input type="text" id="search" class="search-input" tabindex="-1" placeholder="Enter your search term..." /> <div id="results" class="results"></div></div> </div> <div class="page__footer"> <footer> <script type="text/javascript"> var clicky_custom = clicky_custom || {}; clicky_custom.cookies_disable = 1; </script> <script src="//static.getclicky.com/js" type="text/javascript"></script> <script type="text/javascript">try { clicky.init(101131786); } catch (e) { }</script> <noscript><p><img alt="Clicky" width="1" height="1" src="//in.getclicky.com/101131786ns.gif" /></p></noscript> <script type="text/javascript"> // This should effectively disable all cookies being set on this site // It is a bit of a crude measure, but I think it is necessary, having in mind how many seemingly innoncent // 3rd-party scripts and embeds bring in tracking cookies with themselves if (!document.__defineGetter__) { Object.defineProperty(document, 'cookie', { get: function () { return '' }, set: function () { return true }, }); } else { document.__defineGetter__("cookie", function () { return ''; }); document.__defineSetter__("cookie", function () { }); } </script> <div class="page__footer-follow"> <ul class="social-icons"> <li><strong>Follow:</strong></li> <li><a href="/feed.xml"><i class="fas fa-fw fa-rss-square" aria-hidden="true"></i> Feed</a></li> </ul> </div> <div class="<API key>">&copy; 2019 Your Name. Powered by <a href="https: </footer> </div> <script src="/assets/js/main.min.js"></script> <script src="https://use.fontawesome.com/releases/v5.3.1/js/all.js"></script> <script src="/assets/js/lunr/lunr.min.js"></script> <script src="/assets/js/lunr/lunr-store.js"></script> <script src="/assets/js/lunr/lunr-en.js"></script> </body> </html>
title: "Tagging and Sample Data" Use the [`Appsignal.Transaction.set_sample_data`](https://hexdocs.pm/appsignal/Appsignal.Transaction.html#set_sample_data/2) function to supply extra context on errors and performance issues. This can help to add information that is not already part of the request, session or environment parameters. elixir Appsignal.Transaction.set_sample_data("tags", %{locale: "en"}) !> **Warning**: Do not use tagging to send personal data such as names or email addresses to AppSignal. If you want to identify a person, consider using a user ID, hash or pseudonymized identifier instead. You can use [link templates](/application/link-templates.html) to link them to your own system. ## Tags Using tags you can easily add more information to errors and performance issues tracked by AppSignal. There are a few limitations on tagging though. - The tag key must be a `String` or `Atom`. - The tagged value must be a `String`, `Atom` or `Integer`. Tags that do not meet these limitations are dropped without warning. `set_sample_data` can be called multiple times, but only the last value will be retained: elixir Appsignal.Transaction.set_sample_data("tags", %{locale: "en"}) Appsignal.Transaction.set_sample_data("tags", %{user: "bob"}) Appsignal.Transaction.set_sample_data("tags", %{locale: "de"}) will result in the following data: elixir %{ locale: "de" } Link templates Tags can also be used to create link templates. Read more about link templates in our [link templates guide](/application/link-templates.html). ## Sample Data Besides tags you can add more metadata to a transaction (or override default metadata from integrations such as Phoenix), below is a list of valid keys that can be given to `set_sample_data` and the format of the value. `session_data` Filled with session/cookie data by default, but can be overridden with the following call: Appsignal.Transaction.set_sample_data("session_data", %{_csrf_token: "Z11CWRVG+I2egpmiZzuIx/qbFb/60FZssui5eGA8a3g="}) This key accepts nested objects that will be rendered as JSON on a Incident Sample page for both Exception and Performance samples. ![session_data](/assets/images/screenshots/sample_data/session_data.png) `params` Filled with framework (such as Phoenix) parameters by default, but can be overridden or filled with the following call: Appsignal.Transaction.set_sample_data("params", %{action: "show", controller: "homepage"}) This key accepts nested objects and will show up as follows on a Incident Sample page for both Exception and Performance samples, formatted as JSON. ![params](/assets/images/screenshots/sample_data/params.png) `environment` Environment variables from a request/background job, filled by the Phoenix integration, but can be filled/overriden with the following call: Appsignal.Transaction.set_sample_data("environment", %{CONTENT_LENGTH: "0"}) This call only accepts a one-level key/value object, nested values will be ignored. This will result the following block on a Incident Sample page for both Exception and Performance samples. ![environment](/assets/images/screenshots/sample_data/environment.png) `custom_data` Custom data is not set by default, but can be used to add additional debugging data to solve a performance issue or exception. Appsignal.Transaction.set_sample_data("custom_data", %{foo: "bar"}) This key accepts nested objects and will result in the following block on a Incident Sample page for both Exception and Performance samples formatted as JSON. ![custom_data](/assets/images/screenshots/sample_data/custom_data.png)
package com.microsoft.azure.management.network.v2020_04_01; import com.fasterxml.jackson.annotation.JsonProperty; /** * Contains SKU in an ExpressRouteCircuit. */ public class <API key> { /** * The name of the SKU. */ @JsonProperty(value = "name") private String name; /** * The tier of the SKU. Possible values include: 'Standard', 'Premium', * 'Basic', 'Local'. */ @JsonProperty(value = "tier") private <API key> tier; /** * The family of the SKU. Possible values include: 'UnlimitedData', * 'MeteredData'. */ @JsonProperty(value = "family") private <API key> family; /** * Get the name of the SKU. * * @return the name value */ public String name() { return this.name; } /** * Set the name of the SKU. * * @param name the name value to set * @return the <API key> object itself. */ public <API key> withName(String name) { this.name = name; return this; } /** * Get the tier of the SKU. Possible values include: 'Standard', 'Premium', 'Basic', 'Local'. * * @return the tier value */ public <API key> tier() { return this.tier; } /** * Set the tier of the SKU. Possible values include: 'Standard', 'Premium', 'Basic', 'Local'. * * @param tier the tier value to set * @return the <API key> object itself. */ public <API key> withTier(<API key> tier) { this.tier = tier; return this; } /** * Get the family of the SKU. Possible values include: 'UnlimitedData', 'MeteredData'. * * @return the family value */ public <API key> family() { return this.family; } /** * Set the family of the SKU. Possible values include: 'UnlimitedData', 'MeteredData'. * * @param family the family value to set * @return the <API key> object itself. */ public <API key> withFamily(<API key> family) { this.family = family; return this; } }
class JudgePolicy < ApplicationPolicy def create_scores? record.competition.unlocked? && (user_match? || director?(record.event) || super_admin?) end def view_scores? (user_match? || director?(record.event) || super_admin?) end def index? director?(record.event) || super_admin? end def toggle_status? director?(record.event) || super_admin? end def create? update? end def update? record.scores.count.zero? && record.competition.unlocked? && (director?(record.event) || super_admin?) end def destroy? update? end def can_judge? record.competition.unlocked? && (user_match? || director?(record.event) || super_admin?) end private def user_match? record.user == user end class Scope < Scope def resolve scope.none end end end
const path = require('path'); const webpack = require('webpack'); const webpackMerge = require('webpack-merge'); const commonConfig = require('./webpack.common.config.js'); module.exports = function () { return webpackMerge(commonConfig, { watch: true, devtool: '<API key>', // plugins: [ // new webpack.optimize.CommonsChunkPlugin({ // name: "common", devServer: { contentBase: __dirname + "/public/", port: 8080, watchContentBase: true } }) };
<!DOCTYPE html> <html xmlns:msxsl="urn:<API key>:xslt"> <head> <meta content="en-us" http-equiv="Content-Language" /> <meta content="text/html; charset=utf-16" http-equiv="Content-Type" /> <title _locid="<API key>">.NET Portability Report</title> <style> /* Body style, for the entire document */ body { background: #F3F3F4; color: #1E1E1F; font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; padding: 0; margin: 0; } /* Header1 style, used for the main title */ h1 { padding: 10px 0px 10px 10px; font-size: 21pt; background-color: #E2E2E2; border-bottom: 1px #C1C1C2 solid; color: #201F20; margin: 0; font-weight: normal; } /* Header2 style, used for "Overview" and other sections */ h2 { font-size: 18pt; font-weight: normal; padding: 15px 0 5px 0; margin: 0; } /* Header3 style, used for sub-sections, such as project name */ h3 { font-weight: normal; font-size: 15pt; margin: 0; padding: 15px 0 5px 0; background-color: transparent; } h4 { font-weight: normal; font-size: 12pt; margin: 0; padding: 0 0 0 0; background-color: transparent; } /* Color all hyperlinks one color */ a { color: #1382CE; } /* Paragraph text (for longer informational messages) */ p { font-size: 10pt; } /* Table styles */ table { border-spacing: 0 0; border-collapse: collapse; font-size: 10pt; } table th { background: #E7E7E8; text-align: left; text-decoration: none; font-weight: normal; padding: 3px 6px 3px 6px; } table td { vertical-align: top; padding: 3px 6px 5px 5px; margin: 0px; border: 1px solid #E7E7E8; background: #F7F7F8; } .NoBreakingChanges { color: darkgreen; font-weight:bold; } .FewBreakingChanges { color: orange; font-weight:bold; } .ManyBreakingChanges { color: red; font-weight:bold; } .BreakDetails { margin-left: 30px; } .CompatMessage { font-style: italic; font-size: 10pt; } .GoodMessage { color: darkgreen; } /* Local link is a style for hyperlinks that link to file:/// content, there are lots so color them as 'normal' text until the user mouse overs */ .localLink { color: #1E1E1F; background: #EEEEED; text-decoration: none; } .localLink:hover { color: #1382CE; background: #FFFF99; text-decoration: none; } /* Center text, used in the over views cells that contain message level counts */ .textCentered { text-align: center; } /* The message cells in message tables should take up all avaliable space */ .messageCell { width: 100%; } /* Padding around the content after the h1 */ #content { padding: 0px 12px 12px 12px; } /* The overview table expands to width, with a max width of 97% */ #overview table { width: auto; max-width: 75%; } /* The messages tables are always 97% width */ #messages table { width: 97%; } /* All Icons */ .IconSuccessEncoded, .IconInfoEncoded, .IconWarningEncoded, .IconErrorEncoded { min-width: 18px; min-height: 18px; background-repeat: no-repeat; background-position: center; } /* Success icon encoded */ .IconSuccessEncoded { /* Note: Do not delete the comment below. It is used to verify the correctness of the encoded image resource below before the product is released */ background-image: url(data:image/png;base64,<API key>/9hAAABPElEQVR4Xp1Tv0vDUBi8FqeA4NpBcBLcWnQSApncOnTo4FSnjP0DsnXpH5CxiwbHDg4Zuj4oOEXiJgiC4FDcCkLWmIMc1Pfw+<API key>/H5+sHpZwYfxyRjTs+<API key>/13u3Fjrs/EdhsdDFHGB/<API key>+m3tVe/t97D52CB/ziG0nIgD/<API key>/<API key>/<API key>+zk7s8czeges//s5C5+CwqrR4/gw+AAAAABJRU5ErkJggg==); } /* Information icon encoded */ .IconInfoEncoded { /* Note: Do not delete the comment below. It is used to verify the correctness of the encoded image resource below before the product is released */ background-image: url(data:image/png;base64,<API key>/<API key>+QvdsXa/QHBbcXC7W0CamWTQnclFutceIQJwwaWNLlwm5k5d94M76mmaeCrrmsLYOocY12FcxZFUeozCqKqqgYA8uevv1H6VuPxcwlfk5N92KHBxfFeCSAxxswlYAW/Xr989x/<API key>/HF1RsMXq+<API key>/<API key>+<API key>/<API key>=); } /* Warning icon encoded */ .IconWarningEncoded { /* Note: Do not delete the comment below. It is used to verify the correctness of the encoded image resource below before the product is released */ background-image: url(data:image/png;base64,<API key>/9hAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAx0lEQVR4XpWSMQ7CMAxFf4xAyBMLCxMrO8dhaBcuwdCJS3RJBw7SA/<API key>+wVDSyyzFoJjfz9NB+pAF+<API key>/<API key>/eW1KvFeH4e8khT6+gm5B+t3juyDt7n0jpe+CANTd+oTUjN/U3yVaABnSUjFz/<API key>==); } /* Error icon encoded */ .IconErrorEncoded { /* Note: Do not delete the comment below. It is used to verify the correctness of the encoded image resource below before the product is released */ background-image: url(data:image/png;base64,<API key>/<API key>/AxEQQT8HF/3G/oGGnEUGuoNnd6qoZuqltyKEsyzVJq5I6rnUp6SjGeGhESikzzlc1eL7opfuVbrqbU1Zw9NCgtQMaZpY0eNnaaL2fHusvTK5vKu7sjSS1Y4y3QUA6K3e3Mau5UFDyMP7tYF9o8cAHZv68vipoIJg971PZIZ5HiwdvYGGvFVFHmGmZ2MxwmQYPXubPl9Up0tfoMQGetXd6mRbvhBw+boZ6WF7Mbv1+<API key>/<API key>/<API key>=); } </style> </head> <body> <h1 _locid="PortabilityReport">.NET Portability Report</h1> <div id="content"> <div id="submissionId" style="font-size:8pt;"> <p> <i> Submission Id&nbsp; <API key> </i> </p> </div> <h2 _locid="SummaryTitle"> <a name="Portability Summary"></a>Portability Summary </h2> <div id="summary"> <table> <tbody> <tr> <th>Assembly</th> <th>ASP.NET 5,Version=v1.0</th> <th>Windows,Version=v8.1</th> <th>.NET Framework,Version=v4.6</th> <th>Windows Phone,Version=v8.1</th> </tr> <tr> <td><strong><a href="#Bytescout.BarCode.WPF">Bytescout.BarCode.WPF</a></strong></td> <td class="text-center">59.96 %</td> <td class="text-center">55.97 %</td> <td class="text-center">100.00 %</td> <td class="text-center">55.97 %</td> </tr> </tbody> </table> </div> <div id="details"> <a name="Bytescout.BarCode.WPF"><h3>Bytescout.BarCode.WPF</h3></a> <table> <tbody> <tr> <th>Target type</th> <th>ASP.NET 5,Version=v1.0</th> <th>Windows,Version=v8.1</th> <th>.NET Framework,Version=v4.6</th> <th>Windows Phone,Version=v8.1</th> <th>Recommended changes</th> </tr> <tr> <td>System.AppDomain</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td>Remove usage</td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Collections.Hashtable</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.ComponentModel.BrowsableAttribute</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td>Remove usage. This is a deprecated attribute from Windows Forms for design-time property window support</td> </tr> <tr> <td style="padding-left:2em">#ctor(System.Boolean)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td>Remove usage. This is a deprecated attribute from Winforms for design-time property window support</td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.ComponentModel.CategoryAttribute</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">#ctor(System.String)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.ComponentModel.<API key></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">#ctor(System.String)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.ComponentModel.DesignerProperties</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">GetIsInDesignMode(System.Windows.DependencyObject)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.ComponentModel.<API key></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">#ctor(System.Boolean)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.ComponentModel.Win32Exception</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Configuration.<API key></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">#ctor</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Configuration.SettingsBase</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">Synchronized(System.Configuration.SettingsBase)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Diagnostics.StackFrame</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td>Consider removing dependency on this API.</td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Diagnostics.StackTrace</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td>Currently there is no workaround, but we are working on it. Please check back.</td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Drawing.Bitmap</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">#ctor(System.Drawing.Image)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">#ctor(System.Int32,System.Int32)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">GetHbitmap</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Drawing.Brush</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Drawing.Color</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">FromArgb(System.Int32,System.Int32,System.Int32,System.Int32)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_A</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_B</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Beige</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_G</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_R</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">op_Inequality(System.Drawing.Color,System.Drawing.Color)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Drawing.Drawing2D.SmoothingMode</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Drawing.Font</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">#ctor(System.String,System.Single,System.Drawing.GraphicsUnit)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_FontFamily</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Size</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Style</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Drawing.FontFamily</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Name</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Drawing.FontStyle</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Drawing.Graphics</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">FillRectangle(System.Drawing.Brush,System.Int32,System.Int32,System.Int32,System.Int32)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">FromImage(System.Drawing.Image)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Drawing.GraphicsUnit</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Drawing.Image</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">Dispose</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Height</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Width</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">Save(System.IO.Stream,System.Drawing.Imaging.ImageFormat)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Drawing.Imaging.ImageFormat</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Bmp</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Emf</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Exif</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Gif</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Icon</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Jpeg</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_MemoryBmp</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Png</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Tiff</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Wmf</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Drawing.Point</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">#ctor(System.Int32,System.Int32)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Drawing.Size</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">Empty</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">#ctor(System.Int32,System.Int32)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Height</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Width</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">set_Height(System.Int32)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">set_Width(System.Int32)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Drawing.SizeF</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Drawing.SolidBrush</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">#ctor(System.Drawing.Color)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Drawing.Text.TextRenderingHint</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Reflection.Assembly</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td>typeof(CurrentType).GetTypeInfo().Assembly</td> </tr> <tr> <td style="padding-left:2em"><API key></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td>typeof(CurrentType).GetTypeInfo().Assembly</td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Reflection.Binder</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td>Use an overload that does not take a Binder.</td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Reflection.BindingFlags</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Reflection.Emit.AssemblyBuilder</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Reflection.Emit.<API key></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Reflection.Emit.ILGenerator</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Reflection.Emit.Label</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Reflection.Emit.LocalBuilder</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Reflection.Emit.MethodBuilder</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Reflection.Emit.ModuleBuilder</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Reflection.Emit.ParameterBuilder</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Reflection.Emit.TypeBuilder</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Reflection.<API key></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Reflection.ParameterModifier</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td>Use an overload that does not take a ParameterModifier array.</td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Runtime.CompilerServices.<API key></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">#ctor</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Security.Cryptography.CryptoStream</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Security.Cryptography.CryptoStreamMode</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Security.Cryptography.<API key></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Security.Cryptography.ICryptoTransform</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Security.Cryptography.SymmetricAlgorithm</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.String</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">Intern(System.String)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Type</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td>.GetTypeInfo().Assembly</td> </tr> <tr> <td style="padding-left:2em">get_Assembly</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td>.GetTypeInfo().Assembly</td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Windows.Application</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Current</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_MainWindow</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Windows.Controls.Canvas</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">#ctor</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Windows.DependencyObject</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Windows.DependencyProperty</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">OverrideMetadata(System.Type,System.Windows.PropertyMetadata)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">Register(System.String,System.Type,System.Type,System.Windows.PropertyMetadata)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Windows.FontStretch</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">op_Equality(System.Windows.FontStretch,System.Windows.FontStretch)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Windows.FontStretches</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Condensed</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Expanded</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_ExtraCondensed</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_ExtraExpanded</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Medium</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Normal</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_SemiCondensed</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_SemiExpanded</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_UltraCondensed</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_UltraExpanded</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Windows.FontStyle</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Windows.FontStyles</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Italic</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Normal</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Windows.FontWeight</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Windows.FontWeights</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Black</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Bold</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_DemiBold</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_ExtraBlack</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_ExtraBold</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_ExtraLight</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Heavy</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Light</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Medium</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Normal</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Thin</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Windows.FrameworkElement</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em"><API key></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">OnRenderSizeChanged(System.Windows.SizeChangedInfo)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Windows.<API key></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">#ctor(System.Object)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Windows.Freezable</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">Freeze</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Windows.Int32Rect</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">#ctor(System.Int32,System.Int32,System.Int32,System.Int32)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Windows.Interop.Imaging</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em"><API key>(System.IntPtr,System.IntPtr,System.Windows.Int32Rect,System.Windows.Media.Imaging.BitmapSizeOptions)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Windows.Media.Color</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">FromArgb(System.Byte,System.Byte,System.Byte,System.Byte)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_A</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_B</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_G</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_R</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Windows.Media.CompositionTarget</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em"><API key></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Windows.Media.DrawingContext</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">DrawImage(System.Windows.Media.ImageSource,System.Windows.Rect)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Windows.Media.FontFamily</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">#ctor(System.String)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Source</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Windows.Media.ImageSource</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Windows.Media.Imaging.BitmapCacheOption</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Windows.Media.Imaging.BitmapCreateOptions</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Windows.Media.Imaging.BitmapDecoder</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">Create(System.IO.Stream,System.Windows.Media.Imaging.BitmapCreateOptions,System.Windows.Media.Imaging.BitmapCacheOption)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Frames</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Windows.Media.Imaging.BitmapFrame</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Windows.Media.Imaging.BitmapSizeOptions</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">FromWidthAndHeight(System.Int32,System.Int32)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Windows.Media.Imaging.BitmapSource</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Windows.Media.Imaging.WriteableBitmap</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">#ctor(System.Windows.Media.Imaging.BitmapSource)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Windows.Media.Matrix</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_M11</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_M22</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Windows.Media.Visual</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Windows.PresentationSource</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">FromVisual(System.Windows.Media.Visual)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em"><API key></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Windows.PropertyMetadata</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">#ctor(System.Object)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Windows.Rect</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">#ctor(System.Double,System.Double,System.Double,System.Double)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Windows.<API key></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Windows.Size</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Empty</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Height</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Width</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">op_Equality(System.Windows.Size,System.Windows.Size)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">op_Inequality(System.Windows.Size,System.Windows.Size)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">set_Height(System.Double)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">set_Width(System.Double)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Windows.SizeChangedInfo</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Windows.ThemeInfoAttribute</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">#ctor(System.Windows.<API key>,System.Windows.<API key>)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Windows.UIElement</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_RenderSize</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">InvalidateVisual</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Windows.Window</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> </tbody> </table> <p> <a href="#Portability Summary">Back to Summary</a> </p> </div> </div> </body> </html>
layout: page title: "James Kates" comments: true description: "blanks" keywords: "James Kates,CU,Boulder" <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> <script src="https://dl.dropboxusercontent.com/s/pc42nxpaw1ea4o9/highcharts.js?dl=0"></script> <!-- <script src="../assets/js/highcharts.js"></script> --> <style type="text/css">@font-face { font-family: "Bebas Neue"; src: url(https: } h1.Bebas { font-family: "Bebas Neue", Verdana, Tahoma; } </style> </head> # TEACHING INFORMATION **College**: College of Arts and Sciences **Classes taught**: SLHS 5674, SLHS 6000 # SLHS 5674: Signals and Systems in Audiology **Terms taught**: Fall 2008, Fall 2010, Fall 2012, Fall 2014 **Instructor rating**: 4.16 **Standard deviation in instructor rating**: 0.69 **Average grade** (4.0 scale): 3.48 **Standard deviation in grades** (4.0 scale): 0.1 **Average workload** (raw): 2.94 **Standard deviation in workload** (raw): 0.29 # SLHS 6000: TPC-DIGTL SIGNL PRCESSNG **Terms taught**: Spring 2009 **Instructor rating**: 4.71 **Standard deviation in instructor rating**: 0.0 **Average grade** (4.0 scale): 3.48 **Standard deviation in grades** (4.0 scale): 0.0 **Average workload** (raw): 2.17 **Standard deviation in workload** (raw): 0.0
const Nodelist = artifacts.require("./Nodelist.sol"); const BiathlonNode = artifacts.require("./BiathlonNode.sol"); const SecondNode = artifacts.require("./SecondNode.sol"); const BiathlonToken = artifacts.require("./BiathlonToken.sol"); const Ownable = artifacts.require('../contracts/ownership/Ownable.sol'); // const MintableToken = artifacts.require('MintableToken.sol'); const SecondBiathlonToken = artifacts.require("./SecondBiathlonToken.sol"); let nl; let bn; let bt; let sn; let st; contract('BiathlonToken', function(accounts) { beforeEach(async function() { bn = await BiathlonNode.deployed(); nl = await Nodelist.deployed(); bt = await BiathlonToken.deployed(); st = await SecondBiathlonToken.deployed(); sn = await SecondNode.deployed(); }); it('should have an owner', async function() { let owner = await bt.owner(); assert.isTrue(owner !== 0); }); it('should belong to the correct node', async function() { let node = await bt.node_address(); let bna = await bn.address; assert.equal(node, bna, "Token was not initialised to correct node"); }); it('should have a storage contract that is separate', async function() { let storage_address = await bt.storage_address(); assert.notEqual(storage_address, bt.address); }); it("should be able to register itself with the Node list of tokens", async function() { let registration = await bt.register_with_node(); let node_token_count = await bn.count_tokens(); assert.equal(node_token_count, 1, "Node array of tokens doesn't have deployed BiathlonToken"); }); it('should mint a given amount of tokens to a given address', async function() { const result = await bt.mint(accounts[0], 100, { from: accounts[0] }); assert.equal(result.logs[0].event, 'Mint'); assert.equal(result.logs[0].args.to.valueOf(), accounts[0]); assert.equal(result.logs[0].args.amount.valueOf(), 100); assert.equal(result.logs[1].event, 'Transfer'); assert.equal(result.logs[1].args.from.valueOf(), 0x0); let balance0 = await bt.balanceOf(accounts[0]); assert(balance0 == 100); let totalSupply = await bt.totalSupply(); assert.equal(totalSupply, 100); }) it('should allow owner to mint 50 to account #2', async function() { let result = await bt.mint(accounts[2], 50); assert.equal(result.logs[0].event, 'Mint'); assert.equal(result.logs[0].args.to.valueOf(), accounts[2]); assert.equal(result.logs[0].args.amount.valueOf(), 50); assert.equal(result.logs[1].event, 'Transfer'); assert.equal(result.logs[1].args.from.valueOf(), 0x0); let new_balance = await bt.balanceOf(accounts[2]); assert.equal(new_balance, 50, 'Owner could not mint 50 to account }); it('should have account #2 on registry after first token minting', async function() { let check_user = await nl.users(accounts[2]); assert.equal(check_user, bn.address); }); it('should spend 25 of the tokens minted to account #2', async function() { let result = await bt.spend(accounts[2], 25); assert.equal(result.logs[0].event, 'Burn'); let new_balance = await bt.balanceOf(accounts[2]); assert.equal(new_balance, 25); }); it('should have total supply changed by these minting and spending operations', async function() { let result = await bt.totalSupply(); assert.equal(result, 125); }); it('should not allow non-onwers to spend', async function() { try { let spendtask = await bt.spend(accounts[0], 1, {from: accounts[2]}) } catch (error) { const invalidJump = error.message.search('invalid opcode') >= 0; assert(invalidJump, "Expected throw, got '" + error + "' instead"); return; } assert.fail("Expected to reject spending from non-owner"); }); it('should not allow non-owners to mint', async function() { try { let minttask = await bt.mint(accounts[2], 50, {from: accounts[1]}); } catch (error) { const invalidJump = error.message.search('invalid opcode') >= 0; assert(invalidJump, "Expected throw, got '" + error + "' instead"); return; } assert.fail("Expected to reject minting from non-owner"); }); it('should not be able to spend more than it has', async function() { try { let spendtask = await bt.spend(accounts[2], 66) } catch (error) { const invalidJump = error.message.search('invalid opcode') >= 0; assert(invalidJump, "Expected throw, got '" + error + "' instead"); return; } assert.fail("Expected to reject spending more than limit"); }); it('second deployed token should belong to the correct node', async function() { let node = await st.node_address(); let bna = await bn.address; assert.equal(node, bna, "Token was not initialised to correct node"); }); it('second token should be able to upgrade the token with the node', async function() { let name = await st.name(); const upgraded = await bn.upgrade_token(bt.address, st.address, name); assert.equal(upgraded.logs[0].event, 'UpgradeToken'); let count_of_tokens = await bn.count_tokens(); assert.equal(count_of_tokens, 1, 'Should only be one token in tokenlist still'); }); it('should deactivate original token after upgrade', async function () { let tia = await bn.tokens.call(bt.address); assert.isNotTrue(tia[1]); let newtoken = await bn.tokens.call(st.address); assert.isTrue(newtoken[1]); }); it('should carry over the previous balances since storage contract is fixed', async function() { let get_balance = await st.balanceOf(accounts[2]); assert.equal(get_balance, 25); }); it('should not allow the deactivated contract to mint', async function() { try { let newmint = await bt.mint(accounts[2], 10); } catch(error) { const invalidJump = error.message.search('invalid opcode') >= 0; assert(invalidJump, "Expected throw, got '" + error + "' instead"); return; } assert.fail("Expected to reject spending more than limit"); }); it('should allow minting more tokens to accounts', async function() { let newmint = await st.mint(accounts[2], 3); let getbalance = await st.balanceOf(accounts[2]); let totalsupply = await st.totalSupply(); assert.equal(totalsupply, 128); assert.equal(getbalance, 28); }); it('should be able to transfer as contract owner from one account to another', async function() { let thetransfer = await st.biathlon_transfer(accounts[2], accounts[3], 2); let getbalance2 = await st.balanceOf(accounts[2]); let getbalance3 = await st.balanceOf(accounts[3]); assert.equal(getbalance2, 26); assert.equal(getbalance3, 2); }); it('should not be able to transfer as non-owner from one account to another', async function() { try { let thetransfer = await st.biathlon_transfer(accounts[3], accounts[4], 1, {from: accounts[1]}); } catch(error) { const invalidJump = error.message.search('invalid opcode') >= 0; assert(invalidJump, "Expected throw, got '" + error + "' instead"); return; } assert.fail("Expected to reject transfering from non-owner"); }) });
package classfile import "encoding/binary" type ClassReader struct { data []byte } func (self *ClassReader) readUint8() uint8 { val := self.data[0] self.data = self.data[1:] return val } func (self *ClassReader) readUint16() uint16 { val := binary.BigEndian.Uint16(self.data) self.data = self.data[2:] return val } func (self *ClassReader) readUint32() uint32 { val := binary.BigEndian.Uint32(self.data) self.data = self.data[4:] return val } func (self *ClassReader) readUint64() uint64 { val := binary.BigEndian.Uint64(self.data) self.data = self.data[8:] return val } func (self *ClassReader) readUint16s() []uint16 { n := self.readUint16() s := make([]uint16, n) for i := range s { s[i] = self.readUint16() } return s } func (self *ClassReader) readBytes(n uint32) []byte { bytes := self.data[:n] self.data = self.data[n:] return bytes }
import java.io.FileWriter; import java.io.IOException; import java.io.PrintWriter; import java.util.HashMap; import java.util.LinkedList; //this code contains the output assembly code that the program outputs. //will have at least three functions: //add(string, string, string, string) <- adds an assembly code line //optimise(int) <- optimises the output code, wherever possible //write(string) <- writes the code to the desired filename public class ASMCode { LinkedList<String> lines = new LinkedList<String>(); LinkedList<String> data = new LinkedList<String>(); HashMap<String, String> stringMap = new HashMap<String, String>(); LinkedList<lineWrapper> functionLines = new LinkedList<lineWrapper>(); boolean hasFCall; private interface lineWrapper { String compile(int stacksize, boolean funcCall); } private class stdLineWrapper implements lineWrapper { private String line; @Override public String compile(int stacksize, boolean funcCall) { return line; } public stdLineWrapper(String s) { line = s; } } private class <API key> implements lineWrapper { @Override public String compile(int stacksize, boolean funcCall) { StringBuilder s = new StringBuilder(); if(stacksize != 0) { s.append("\tmov\tsp, fp"); s.append(System.getProperty("line.separator"));//system independent newline s.append("\tpop\tfp"); s.append(System.getProperty("line.separator")); } if(hasFCall) { s.append("\tpop\tra"); s.append(System.getProperty("line.separator")); } s.append("\tjmpr\tra"); return s.toString(); } } public void add(String inst, String reg1, String reg2, String reg3) { if(deadCode) return; String newInst = "\t"+inst; if(reg1 != null) { newInst = newInst + "\t" + reg1; if(reg2 != null) { newInst = newInst + ", " + reg2; if(reg3 != null) { newInst = newInst + ", " + reg3; } } } functionLines.addLast(new stdLineWrapper(newInst)); } public void add(String inst, String reg1, String reg2) { add(inst, reg1, reg2, null); } public void add(String inst, String reg1) { add(inst, reg1, null, null); } public void add(String inst) { add(inst, null, null, null); } int labIndex = 0; public String addString(String s) { //makes sure we don't have duplicate strings in memory if(stringMap.containsKey(s)) return stringMap.get(s); //generate a label String label = "string" + labIndex++; data.addLast(label+":"); data.addLast("#string " +s); stringMap.put(s, label); return label; } public void addGlobal(String data, String label) { //generate a label this.data.addLast(label+":"); this.data.addLast(data); } public void put(String s) { if(!deadCode) functionLines.addLast(new stdLineWrapper(s)); } private String fname; public void beginFunction(String name) { functionLines = new LinkedList<lineWrapper>(); fname = name; hasFCall = false; } public void endFunction(int varCount) { lines.addLast("#global " + fname); lines.addLast(fname+":"); if(hasFCall) { lines.addLast("\tpush\tra"); } if(varCount != 0) { lines.addLast("\tpush\tfp"); lines.addLast("\tmov\tfp, sp"); lines.addLast("\taddi\tsp, sp, " + varCount); } for(lineWrapper w : functionLines) { lines.addLast(w.compile(varCount, hasFCall)); } } public void setHasFCall() { if(deadCode) return; hasFCall = true; } public void functionReturn() { if(deadCode) return; functionLines.addLast(new <API key>()); } public void write(String filename) { //System.out.println(".text"); //for(String s : lines) { // System.out.println(s); //System.out.println(".data"); //for(String s : data) { // System.out.println(s); System.out.println("Compilation successful!"); System.out.println("Writing..."); try { PrintWriter out = new PrintWriter(new FileWriter(filename+".asm")); out.println(".text"); for(String s : lines) { out.println(s); } out.println(".data"); for(String s : data) { out.println(s); } out.close(); } catch(IOException e) { System.out.println("Writing failed"); return; } System.out.println("Program created!"); } boolean deadCode; public void deadCode(boolean codeIsDead) { deadCode = codeIsDead; } }
import { Component, OnInit, Input, EventEmitter, Output } from '@angular/core'; import { Filter, FilterType } from 'lib/filter'; @Component({ selector: 'iw-filter-input', templateUrl: './filter-input.component.html', styleUrls: ['./filter-input.component.css'] }) export class <API key> implements OnInit { @Input() filter: Filter; @Output() change = new EventEmitter<Filter>(); constructor() { } ngOnInit() { } get FilterType() { return FilterType; } applyFilter(filter: Filter, value: string) { filter.value = value; this.change.emit(filter); } itemsForField(filter: Filter) { if (filter.options) { return filter.options; } // put to initialization // if (!this.rows) { return []; } // const items = []; // this.rows.forEach((r) => { // if (items.indexOf(r[filter.key]) < 0) { // items.push(r[filter.key]); // return items; } }
var express = require('express'); var bodyParser = require('body-parser'); var fs = require('fs') var app = express(); var lostStolen = require('<API key>'); var MasterCardAPI = lostStolen.MasterCardAPI; var dummyData = []; var dummyDataFiles = ['www/data/menu.json', 'www/data/account-number.json']; dummyDataFiles.forEach(function(file) { fs.readFile(file, 'utf8', function(err, data) { if (err) { return console.log(err); } dummyData[file] = JSON.parse(data); }); }); var config = { p12file: process.env.KEY_FILE || null, p12pwd: process.env.KEY_FILE_PWD || 'keystorepassword', p12alias: process.env.KEY_FILE_ALIAS || 'keyalias', apiKey: process.env.API_KEY || null, sandbox: process.env.SANDBOX || 'true', } var useDummyData = null == config.p12file; if (useDummyData) { console.log('p12 file info missing, using dummy data') } else { console.log('has p12 file info, using MasterCardAPI') var authentication = new MasterCardAPI.OAuth(config.apiKey, config.p12file, config.p12alias, config.p12pwd); MasterCardAPI.init({ sandbox: 'true' === config.sandbox, authentication: authentication }); } app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: true })); app.use(express.static('www')); app.post('/menu', function(req, res) { res.json(dummyData[dummyDataFiles[0]]); }); app.post('/orders', function(req, res) { res.json({}); }); app.post('/confirm', function(req, res) { res.json({}); }); app.post('/checkAccountNumber', function(req, res) { if (useDummyData) { if (null == dummyData[dummyDataFiles[1]][req.body.accountNumber]) { res.json(dummyData[dummyDataFiles[1]].default); } else { res.json(dummyData[dummyDataFiles[1]][req.body.accountNumber]); } } else { var requestData = { "AccountInquiry": { "AccountNumber": req.body.accountNumber } }; lostStolen.AccountInquiry.update(requestData, function(error, data) { if (error) { res.json({ "type": "APIError", "message": "Error executing API call", "status": 400, "data": { "Errors": { "Error": { "Source": "Unknown", "ReasonCode": "UNKNOWN", "Description": "Unknown error", "Recoverable": "false" } } } }); } else { res.json(data); } }); } }); app.listen(3000, function() { console.log('Example app listening on port 3000!'); });
var express = require('express'); var router = express.Router(); /* GET home page. */ router.get('/', function(req, res, next) { res.render('index', { title: 'Express' }); }); router.get('/about', function(req, res, next) { res.render('about', { title: 'About' }); }); module.exports = router;
# Stomp example ## How to use Using `create-next-app` Execute [`create-next-app`](https://github.com/zeit/next.js/tree/canary/packages/create-next-app) with [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/) or [npx](https://github.com/zkat/npx#readme) to bootstrap the example: bash npx create-next-app --example with-stomp with-stomp-app yarn create next-app --example with-stomp with-stomp-app Download manually Download the example: bash curl https://codeload.github.com/zeit/next.js/tar.gz/canary | tar -xz --strip=2 next.js-canary/examples/with-stomp cd with-stomp Install it and run: bash npm install STOMP_SERVER=wss://some.stomp.server npm run dev yarn STOMP_SERVER=wss://some.stomp.server yarn dev You'll need to provide the STOMP url of your server in `STOMP_SERVER` > If you're on Windows you may want to use [cross-env](https: ## The idea behind the example This example show how to use [STOMP](http://stomp.github.io/) inside a Next.js application. STOMP is a simple text-orientated messaging protocol. It defines an interoperable wire format so that any of the available STOMP clients can communicate with any STOMP message broker. Read more about [STOMP](http://jmesnil.net/stomp-websocket/doc/) protocol.
// <auto-generated /> namespace Surplus.Migrations { using System.CodeDom.Compiler; using System.Data.Entity.Migrations; using System.Data.Entity.Migrations.Infrastructure; using System.Resources; [GeneratedCode("EntityFramework.Migrations", "6.1.3-40302")] public sealed partial class EstValueMaxMin : IMigrationMetadata { private readonly ResourceManager Resources = new ResourceManager(typeof(EstValueMaxMin)); string IMigrationMetadata.Id { get { return "<API key>"; } } string IMigrationMetadata.Source { get { return null; } } string IMigrationMetadata.Target { get { return Resources.GetString("Target"); } } } }
''' salt.utils ~~~~~~~ ''' class lazy_property(object): def __init__(self, fget): self.fget = fget self.func_name = fget.__name__ def __get__(self, obj, cls): if obj is None: return None value = self.fget(obj) setattr(obj, self.func_name, value) return value
#import <Foundation/Foundation.h> #import <SystemConfiguration/SystemConfiguration.h> typedef enum { NotReachable = 0, ReachableViaWiFi, ReachableViaWWAN } NetworkStatus; #define <API key> @"<API key>" @interface Reachability: NSObject { BOOL localWiFiRef; <API key> reachabilityRef; } //<API key>- Use to check the reachability of a particular host name. + (Reachability*) <API key>: (NSString*) hostName; //<API key>- Use to check the reachability of a particular IP address. + (Reachability*) <API key>: (const struct sockaddr_in*) hostAddress; //<API key>- checks whether the default route is available. // Should be used by applications that do not connect to a particular host + (Reachability*) <API key>; //<API key>- checks whether a local wifi connection is available. + (Reachability*) <API key>; //Start listening for reachability notifications on the current run loop - (BOOL) startNotifier; - (void) stopNotifier; - (NetworkStatus) <API key>; //WWAN may be available, but not active until a connection has been established. //WiFi may require a connection for VPN on Demand. - (BOOL) connectionRequired; @end
require File.expand_path('../boot', __FILE__) require 'rails/all' # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. Bundler.require(*Rails.groups) module FlashFinalProject class Application < Rails::Application
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Leap; namespace LeapMIDI { class LeapStuff { private Controller controller = new Controller(); public float posX { get; private set; } public float posY { get; private set; } public float posZ { get; private set; } public float velX { get; private set; } public float velY { get; private set; } public float velZ { get; private set; } public float pinch { get; private set; } public string info { get; private set; } public LeapStuff() { //controller.EnableGesture(Gesture.GestureType.; controller.SetPolicy(Controller.PolicyFlag.<API key>); } internal void Update() { Frame frame = controller.Frame(); info = "Connected: " + controller.IsConnected + "\n" + "Frame ID: " + frame.Id + "\n" + "Hands: " + frame.Hands.Count + "\n" + "Fingers: " + frame.Fingers.Count + "\n\n"; if (frame.Hands.Count == 1) { info += "Hand #1 Position X:" + frame.Hands[0].PalmPosition.x + "\n"; info += "Hand #1 Position Y:" + frame.Hands[0].PalmPosition.y + "\n"; info += "Hand #1 Position Z:" + frame.Hands[0].PalmPosition.z + "\n\n"; info += "Hand #1 Velocity X:" + frame.Hands[0].PalmVelocity.x + "\n"; info += "Hand #1 Velocity Y:" + frame.Hands[0].PalmVelocity.y + "\n"; info += "Hand #1 Velocity Z:" + frame.Hands[0].PalmVelocity.z + "\n"; info += "Hand #1 Pinch:" + frame.Hands[0].PinchStrength + "\n"; posX = frame.Hands[0].PalmPosition.x; posY = frame.Hands[0].PalmPosition.y; posZ = frame.Hands[0].PalmPosition.z; velX = frame.Hands[0].PalmVelocity.x; velY = frame.Hands[0].PalmVelocity.y; velZ = frame.Hands[0].PalmVelocity.z; pinch = frame.Hands[0].PinchStrength; } else { velX = 0; velY = 0; velZ = 0; pinch = 0; } } } }
// pytorch_inference #include "../include/layers.hpp" #include "utils.hpp" int main(){ std::vector<pytorch::tensor> tests = test_setup({1, 1, 1}, {2, 2, 2}, {45, 45, 45}, {50, 50, 50}, {1}, {2}, {45}, {50}, {"test_prod1.dat", "test_prod2.dat", "test_prod3.dat"}, "test_prod"); // tests has {input1, input2, input3, pytorch_output} pytorch::Product p(pytorch::k, 3); af::timer::start(); pytorch::tensor prod; for (int j = 49; j >= 0; j prod = p({tests[0], tests[1], tests[2]})[0]; prod.eval(); } af::sync(); std::cout << "arrayfire forward took (s): " << af::timer::stop()/50 << "(avg)" << std::endl; assert(almost_equal(prod, tests[3])); }
package com.github.weeniearms.graffiti; import com.github.weeniearms.graffiti.config.CacheConfiguration; import com.github.weeniearms.graffiti.generator.GraphGenerator; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.cache.annotation.Cacheable; import org.springframework.stereotype.Service; import java.io.IOException; import java.util.Arrays; @Service public class GraphService { private final GraphGenerator[] generators; @Autowired public GraphService(GraphGenerator[] generators) { this.generators = generators; } @Cacheable(CacheConfiguration.GRAPH) public byte[] generateGraph(String source, GraphGenerator.OutputFormat format) throws IOException { GraphGenerator generator = Arrays.stream(generators) .filter(g -> g.isSourceSupported(source)) .findFirst() .orElseThrow(() -> new <API key>("No matching generator found for source")); return generator.generateGraph(source, format); } }
//this source code was auto-generated by tolua#, do not modify it using System; using LuaInterface; public class <API key> { public static void Register(LuaState L) { L.BeginClass(typeof(UnityEngine.SkinnedMeshRenderer), typeof(UnityEngine.Renderer)); L.RegFunction("BakeMesh", BakeMesh); L.RegFunction("GetBlendShapeWeight", GetBlendShapeWeight); L.RegFunction("SetBlendShapeWeight", SetBlendShapeWeight); L.RegFunction("New", <API key>); L.RegFunction("__eq", op_Equality); L.RegFunction("__tostring", ToLua.op_ToString); L.RegVar("bones", get_bones, set_bones); L.RegVar("rootBone", get_rootBone, set_rootBone); L.RegVar("quality", get_quality, set_quality); L.RegVar("sharedMesh", get_sharedMesh, set_sharedMesh); L.RegVar("updateWhenOffscreen", <API key>, <API key>); L.RegVar("<API key>", <API key>, <API key>); L.RegVar("localBounds", get_localBounds, set_localBounds); L.EndClass(); } [<API key>(typeof(LuaCSFunction))] static int <API key>(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 0) { UnityEngine.SkinnedMeshRenderer obj = new UnityEngine.SkinnedMeshRenderer(); ToLua.Push(L, obj); return 1; } else { return LuaDLL.luaL_throw(L, "invalid arguments to ctor method: UnityEngine.SkinnedMeshRenderer.New"); } } catch(Exception e) { return LuaDLL.toluaL_exception(L, e); } } [<API key>(typeof(LuaCSFunction))] static int BakeMesh(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); UnityEngine.SkinnedMeshRenderer obj = (UnityEngine.SkinnedMeshRenderer)ToLua.CheckObject(L, 1, typeof(UnityEngine.SkinnedMeshRenderer)); UnityEngine.Mesh arg0 = (UnityEngine.Mesh)ToLua.CheckUnityObject(L, 2, typeof(UnityEngine.Mesh)); obj.BakeMesh(arg0); return 0; } catch(Exception e) { return LuaDLL.toluaL_exception(L, e); } } [<API key>(typeof(LuaCSFunction))] static int GetBlendShapeWeight(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); UnityEngine.SkinnedMeshRenderer obj = (UnityEngine.SkinnedMeshRenderer)ToLua.CheckObject(L, 1, typeof(UnityEngine.SkinnedMeshRenderer)); int arg0 = (int)LuaDLL.luaL_checknumber(L, 2); float o = obj.GetBlendShapeWeight(arg0); LuaDLL.lua_pushnumber(L, o); return 1; } catch(Exception e) { return LuaDLL.toluaL_exception(L, e); } } [<API key>(typeof(LuaCSFunction))] static int SetBlendShapeWeight(IntPtr L) { try { ToLua.CheckArgsCount(L, 3); UnityEngine.SkinnedMeshRenderer obj = (UnityEngine.SkinnedMeshRenderer)ToLua.CheckObject(L, 1, typeof(UnityEngine.SkinnedMeshRenderer)); int arg0 = (int)LuaDLL.luaL_checknumber(L, 2); float arg1 = (float)LuaDLL.luaL_checknumber(L, 3); obj.SetBlendShapeWeight(arg0, arg1); return 0; } catch(Exception e) { return LuaDLL.toluaL_exception(L, e); } } [<API key>(typeof(LuaCSFunction))] static int op_Equality(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); UnityEngine.Object arg0 = (UnityEngine.Object)ToLua.ToObject(L, 1); UnityEngine.Object arg1 = (UnityEngine.Object)ToLua.ToObject(L, 2); bool o = arg0 == arg1; LuaDLL.lua_pushboolean(L, o); return 1; } catch(Exception e) { return LuaDLL.toluaL_exception(L, e); } } [<API key>(typeof(LuaCSFunction))] static int get_bones(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UnityEngine.SkinnedMeshRenderer obj = (UnityEngine.SkinnedMeshRenderer)o; UnityEngine.Transform[] ret = obj.bones; ToLua.Push(L, ret); return 1; } catch(Exception e) { return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index bones on a nil value" : e.Message); } } [<API key>(typeof(LuaCSFunction))] static int get_rootBone(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UnityEngine.SkinnedMeshRenderer obj = (UnityEngine.SkinnedMeshRenderer)o; UnityEngine.Transform ret = obj.rootBone; ToLua.Push(L, ret); return 1; } catch(Exception e) { return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index rootBone on a nil value" : e.Message); } } [<API key>(typeof(LuaCSFunction))] static int get_quality(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UnityEngine.SkinnedMeshRenderer obj = (UnityEngine.SkinnedMeshRenderer)o; UnityEngine.SkinQuality ret = obj.quality; ToLua.Push(L, ret); return 1; } catch(Exception e) { return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index quality on a nil value" : e.Message); } } [<API key>(typeof(LuaCSFunction))] static int get_sharedMesh(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UnityEngine.SkinnedMeshRenderer obj = (UnityEngine.SkinnedMeshRenderer)o; UnityEngine.Mesh ret = obj.sharedMesh; ToLua.Push(L, ret); return 1; } catch(Exception e) { return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index sharedMesh on a nil value" : e.Message); } } [<API key>(typeof(LuaCSFunction))] static int <API key>(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UnityEngine.SkinnedMeshRenderer obj = (UnityEngine.SkinnedMeshRenderer)o; bool ret = obj.updateWhenOffscreen; LuaDLL.lua_pushboolean(L, ret); return 1; } catch(Exception e) { return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index updateWhenOffscreen on a nil value" : e.Message); } } [<API key>(typeof(LuaCSFunction))] static int <API key>(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UnityEngine.SkinnedMeshRenderer obj = (UnityEngine.SkinnedMeshRenderer)o; bool ret = obj.<API key>; LuaDLL.lua_pushboolean(L, ret); return 1; } catch(Exception e) { return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index <API key> on a nil value" : e.Message); } } [<API key>(typeof(LuaCSFunction))] static int get_localBounds(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UnityEngine.SkinnedMeshRenderer obj = (UnityEngine.SkinnedMeshRenderer)o; UnityEngine.Bounds ret = obj.localBounds; ToLua.Push(L, ret); return 1; } catch(Exception e) { return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index localBounds on a nil value" : e.Message); } } [<API key>(typeof(LuaCSFunction))] static int set_bones(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UnityEngine.SkinnedMeshRenderer obj = (UnityEngine.SkinnedMeshRenderer)o; UnityEngine.Transform[] arg0 = ToLua.CheckObjectArray<UnityEngine.Transform>(L, 2); obj.bones = arg0; return 0; } catch(Exception e) { return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index bones on a nil value" : e.Message); } } [<API key>(typeof(LuaCSFunction))] static int set_rootBone(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UnityEngine.SkinnedMeshRenderer obj = (UnityEngine.SkinnedMeshRenderer)o; UnityEngine.Transform arg0 = (UnityEngine.Transform)ToLua.CheckUnityObject(L, 2, typeof(UnityEngine.Transform)); obj.rootBone = arg0; return 0; } catch(Exception e) { return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index rootBone on a nil value" : e.Message); } } [<API key>(typeof(LuaCSFunction))] static int set_quality(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UnityEngine.SkinnedMeshRenderer obj = (UnityEngine.SkinnedMeshRenderer)o; UnityEngine.SkinQuality arg0 = (UnityEngine.SkinQuality)ToLua.CheckObject(L, 2, typeof(UnityEngine.SkinQuality)); obj.quality = arg0; return 0; } catch(Exception e) { return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index quality on a nil value" : e.Message); } } [<API key>(typeof(LuaCSFunction))] static int set_sharedMesh(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UnityEngine.SkinnedMeshRenderer obj = (UnityEngine.SkinnedMeshRenderer)o; UnityEngine.Mesh arg0 = (UnityEngine.Mesh)ToLua.CheckUnityObject(L, 2, typeof(UnityEngine.Mesh)); obj.sharedMesh = arg0; return 0; } catch(Exception e) { return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index sharedMesh on a nil value" : e.Message); } } [<API key>(typeof(LuaCSFunction))] static int <API key>(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UnityEngine.SkinnedMeshRenderer obj = (UnityEngine.SkinnedMeshRenderer)o; bool arg0 = LuaDLL.luaL_checkboolean(L, 2); obj.updateWhenOffscreen = arg0; return 0; } catch(Exception e) { return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index updateWhenOffscreen on a nil value" : e.Message); } } [<API key>(typeof(LuaCSFunction))] static int <API key>(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UnityEngine.SkinnedMeshRenderer obj = (UnityEngine.SkinnedMeshRenderer)o; bool arg0 = LuaDLL.luaL_checkboolean(L, 2); obj.<API key> = arg0; return 0; } catch(Exception e) { return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index <API key> on a nil value" : e.Message); } } [<API key>(typeof(LuaCSFunction))] static int set_localBounds(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UnityEngine.SkinnedMeshRenderer obj = (UnityEngine.SkinnedMeshRenderer)o; UnityEngine.Bounds arg0 = ToLua.ToBounds(L, 2); obj.localBounds = arg0; return 0; } catch(Exception e) { return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index localBounds on a nil value" : e.Message); } } }
<?php namespace nCore\Core\Router\Exception; use nCore\Core\Exception\DefaultException; /** * Class RouterException * @package nCore\Core\Router\Exception */ class RouterException extends DefaultException { /** * @inheritdoc */ public function dispatchException() { $this->httpCode = 500; } }
<?php namespace App\Test\Fixture; use Cake\TestSuite\Fixture\TestFixture; /** * ParametersFixture * */ class ParametersFixture extends TestFixture { /** * Fields * * @var array */ // @<API key> public $fields = [ 'id' => ['type' => 'integer', 'length' => 11, 'unsigned' => false, 'null' => false, 'default' => null, 'comment' => '', 'autoIncrement' => true, 'precision' => null], 'name' => ['type' => 'string', 'length' => 50, 'null' => false, 'default' => null, 'collate' => 'latin1_spanish_ci', 'comment' => '', 'precision' => null, 'fixed' => null], 'value' => ['type' => 'text', 'length' => null, 'null' => false, 'default' => null, 'collate' => 'latin1_spanish_ci', 'comment' => '', 'precision' => null], '_constraints' => [ 'primary' => ['type' => 'primary', 'columns' => ['id'], 'length' => []], ], '_options' => [ 'engine' => 'InnoDB', 'collation' => 'latin1_spanish_ci' ], ]; // @<API key> /** * Records * * @var array */ public $records = [ [ 'id' => 1, 'name' => 'Lorem ipsum dolor sit amet', 'value' => 'Lorem ipsum dolor sit amet, aliquet feugiat. Convallis morbi fringilla gravida, phasellus feugiat dapibus velit nunc, pulvinar eget sollicitudin venenatis cum nullam, vivamus ut a sed, mollitia lectus. Nulla vestibulum massa neque ut et, id hendrerit sit, feugiat in taciti enim proin nibh, tempor dignissim, rhoncus duis vestibulum nunc mattis convallis.' ], ]; }
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> </meta> <meta content="width=device-width, initial-scale=1" name="viewport"> </meta> <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet"> </link> <link href="../../resources/stof-style.css" rel="stylesheet"> </link> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"> </script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"> </script> <script src="../../resources/search.js"> </script> <script src="../../resources/analytics.js"> </script> </head> <body> <nav class="navbar navbar-default"> <div class="container-fluid"> <div class="navbar-header"> <button aria-expanded="false" class="navbar-toggle collapsed" data-target="#<API key>" data-toggle="collapse" type="button"> <span class="sr-only"> Toggle navigation </span> <span class="icon-bar"> </span> <span class="icon-bar"> </span> <span class="icon-bar"> </span> </button> <a class="navbar-brand" href="../../index.html"> Bob Dylan Lyrics </a> </div> <div aria-expanded="false" class="navbar-collapse collapse" id="<API key>" style="height: 1px"> <ul class="nav navbar-nav"> <li> <a href="../../<API key>/downloads.html"> Downloads </a> </li> <li> <a href="../../songs/song_index/song_index.html"> All Songs </a> </li> <li> <a href="../../albums/album_index/album_index.html"> All Albums </a> </li> <li class="dropdown"> <a aria-expanded="false" aria-haspopup="true" class="dropdown-toggle" data-toggle="dropdown" href="#" role="button"> 1960s <span class="caret"> </span> </a> <ul class="dropdown-menu"> <li> <a class="album" href="../../albums/bob_dylan.html"> Bob Dylan (1962) </a> </li> <li> <a class="album" href="../../albums/<API key>.html"> The Freewheelin' Bob Dylan (1963) </a> </li> <li> <a class="album" href="../../albums/<API key>.html"> The Times They Are A-Changin' (1964) </a> </li> <li> <a class="album" href="../../albums/<API key>.html"> Another Side of Bob Dylan (1964) </a> </li> <li> <a class="album" href="../../albums/<API key>.html"> Bringing It All Back Home (1965) </a> </li> <li> <a class="album" href="../../albums/<API key>.html"> Highway 61 Revisited (1965) </a> </li> <li> <a class="album" href="../../albums/blonde_on_blonde.html"> Blonde on Blonde (1966)) </a> </li> <li> <a class="album" href="../../albums/<API key>.html"> Bob Dylan's Greatest Hits (1967) </a> </li> <li> <a class="album" href="../../albums/john_wesley_harding.html"> John Wesley Harding (1967) </a> </li> <li> <a class="album" href="../../albums/nashville_skyline.html"> Nashville Skyline (1969) </a> </li> </ul> </li> <li class="dropdown"> <a aria-expanded="false" aria-haspopup="true" class="dropdown-toggle" data-toggle="dropdown" href="#" role="button"> 1970s <span class="caret"> </span> </a> <ul class="dropdown-menu"> <li> <a class="album" href="../../albums/self_portrait.html"> Self Portrait (1970) </a> </li> <li> <a class="album" href="../../albums/new_morning.html"> New Morning (1970) </a> </li> <li> <a class="album" href="../../albums/<API key>.html"> Bob Dylan's Greatest Hits, Vol. II (1971) </a> </li> <li> <a class="album" href="../../albums/<API key>.html"> Pat Garrett &amp; Billy the Kid (1973) </a> </li> <li> <a class="album" href="../../albums/dylan.html"> Dylan (1973) </a> </li> <li> <a class="album" href="../../albums/planet_waves.html"> Planet Waves (1974) </a> </li> <li> <a class="album" href="../../albums/before_the_flood.html"> Before the Flood (1974) </a> </li> <li> <a class="album" href="../../albums/blood_on_the_tracks.html"> Blood on the Tracks (1975) </a> </li> <li> <a class="album" href="../../albums/the_basement_tapes.html"> The Basement Tapes (1975) </a> </li> <li> <a class="album" href="../../albums/desire.html"> Desire (1976) </a> </li> <li> <a class="album" href="../../albums/hard_rain.html"> Hard Rain (1976) </a> </li> <li> <a class="album" href="../../albums/street_legal.html"> Street-Legal (1978) </a> </li> <li> <a class="album" href="../../albums/<API key>.html"> Bob Dylan at Budokan (1979) </a> </li> <li> <a class="album" href="../../albums/slow_train_coming.html"> Slow Train Coming (1979) </a> </li> </ul> </li> <li class="dropdown"> <a aria-expanded="false" aria-haspopup="true" class="dropdown-toggle" data-toggle="dropdown" href="#" role="button"> 1980s <span class="caret"> </span> </a> <ul class="dropdown-menu"> <li> <a class="album" href="../../albums/saved.html"> Saved (1980) </a> </li> <li> <a class="album" href="../../albums/shot_of_love.html"> Shot of Love (1981) </a> </li> <li> <a class="album" href="../../albums/infidels.html"> Infidels (1983) </a> </li> <li> <a class="album" href="../../albums/real_live_1.html"> Real Live (1984) </a> </li> <li> <a class="album" href="../../albums/empire_burlesque.html"> Empire Burlesque (1985) </a> </li> <li> <a class="album" href="../../albums/biograph.html"> Biograph (1985) </a> </li> <li> <a class="album" href="../../albums/knocked_out_loaded.html"> Knocked Out Loaded (1986) </a> </li> <li> <a class="album" href="../../albums/down_in_the_groove.html"> Down in the Groove (1988) </a> </li> <li> <a class="album" href="../../albums/dylan_and_the_dead.html"> Dylan &amp; the Dead (1989) </a> </li> <li> <a class="album" href="../../albums/oh_mercy.html"> Oh Mercy (1989) </a> </li> </ul> </li> <li class="dropdown"> <a aria-expanded="false" aria-haspopup="true" class="dropdown-toggle" data-toggle="dropdown" href="#" role="button"> 1990s <span class="caret"> </span> </a> <ul class="dropdown-menu"> <li> <a class="album" href="../../albums/under_the_red_sky.html"> Under the Red Sky (1990) </a> </li> <li> <a class="album" href="../../albums/<API key>.html"> The Bootleg Series Volumes 1-3 (Rare &amp; Unreleased) 1961-1991 (1991) </a> </li> <li> <a class="album" href="../../albums/<API key>.html"> Good As I Been to You (1992) </a> </li> <li> <a class="album" href="../../albums/world_gone_wrong.html"> World Gone Wrong (1993) </a> </li> <li> <a class="album" href="../../albums/<API key>.html"> Bob Dylan's Greatest Hits Volume 3 (1994) </a> </li> <li> <a class="album" href="../../albums/mtv_unplugged.html"> MTV Unplugged (1995) </a> </li> <li> <a class="album" href="../../albums/time_out_of_mind.html"> Time Out of Mind (1997) </a> </li> <li> <a class="album" href="../../albums/<API key>.html"> The Bootleg Series Vol. 4: Bob Dylan Live 1966, The "Royal Albert Hall" Concert (1998) </a> </li> </ul> </li> <li class="dropdown"> <a aria-expanded="false" aria-haspopup="true" class="dropdown-toggle" data-toggle="dropdown" href="#" role="button"> 2000s <span class="caret"> </span> </a> <ul class="dropdown-menu"> <li> <a class="album" href="../../albums/<API key>.html"> The Essential Bob Dylan (2000) </a> </li> <li> <a class="album" href="../../albums/love_and_theft.html"> Love and Theft (2001) </a> </li> <li> <a class="album" href="../../albums/<API key>.html"> The Bootleg Series Vol. 5: Bob Dylan Live 1975, The Rolling Thunder Revue (2002) </a> </li> <li> <a class="album" href="../../albums/<API key>.html"> The Bootleg Series Vol. 6: Bob Dylan Live 1964, Concert at Philharmonic Hall (2004) </a> </li> <li> <a class="album" href="../../albums/<API key>.html"> The Best of Bob Dylan (2005) </a> </li> <li> <a class="album" href="../../albums/modern_times.html"> Modern Times (2006) </a> </li> <li> <a class="album" href="../../albums/<API key>.html"> Together through Life (2009) </a> </li> </ul> </li> <li class="dropdown"> <a aria-expanded="false" aria-haspopup="true" class="dropdown-toggle" data-toggle="dropdown" href="#" role="button"> 2010s <span class="caret"> </span> </a> <ul class="dropdown-menu"> <li> <a class="album" href="../../albums/tempest.html"> Tempest (2012) </a> </li> </ul> </li> </ul> <div class="col-md-3" style="border:0px solid;width:30%;height:auto;"> <gcse:search> <form class="navbar-form navbar-right" role="search"> </form> </gcse:search> </div> </div> </div> </nav> <div class="container"> <div class="row"> <div class="col-md-12"> <h1> Lay Lady Lay </h1> </div> </div> <div class="row"> <div class="col-md-12"> <p> <div> Lay<a href="#1"><sup>1</sup></a>, lady, lay, lay across my big brass bed, </div> <div> Lay, lady, lay, lay across my big brass bed. </div> <div> Whatever colors you have in your mind, </div> <div> I'll show them to you and you'll see them shine. </div> </p> <p> <div> Lay, lady, lay, lay across my big brass bed, </div> <div> Forget this dance, let's go upstairs. </div> <div> Let's take a chance – who really cares? </div> <div> Why don't you know you got nothing to prove? </div> <div> It's all in your eyes and the way that you move. </div> </p> <p> <div> Forget this dance, let's go upstairs. </div> <div> Why wait any longer for no need to complain?<a href="#2"><sup>2</sup></a> </div> <div> You can have love, but you might lose it. </div> <div> Why run any longer when you're running in vain? </div> <div> You can have the truth, but you got to choose it. </div> </p> <p> <div> Stay, lady, stay, stay with your man awhile, </div> <div> Till the break of day let me see you make him smile. </div> <div> I long to see you in the morning light, </div> <div> I long to hold you in the night – </div> <div> Stay, lady, stay, stay with your man awhile. </div> </p> <p> <div> Lay, lady, lay, lay across my big brass bed. </div> </p> <p> <div> <a name="1"> <sup> 1 </sup> </a> <small> The correct verb to use would technically be "lie" (she lies, she lay, she has lain), not "lay", which is the transitive form of "lie". However, the distinction between the two forms has been increasingly disappearing in English due at least partially to the fact that the base form of the verb <i>lay</i> looks and sounds exactly the same as the simple past form of <i>lay</i>. But just because the use of <i>lay</i> in this song is technically incorrect doesn't mean that it was not intentional: it would not sound right to hear "lie, lady, lie, lie across my big brass bed" (because of the assonance) and, besides, this is how real people talk every day and there's nothing wrong with it. </small> </div> <div> <a name="2"> <sup> 2 </sup> </a> <small> Here it's almost as though Dylan begins to sing the line from the original album version, "Why wait any longer for the world to begin?", before improvising about halfway through, which might explain why the line sounds sort of meaningless and inane. </small> </div> </p> </div> </div> </div> </body> </html>
mod message_set; use std; use std::fmt; use linked_hash_map::{Iter, LinkedHashMap}; use uuid::Uuid; pub mod message; #[derive(Debug, PartialEq)] pub struct Message { properties: Map, body: Option<Value>, } impl Message { pub fn new() -> MessageBuilder { MessageBuilder::new() } pub fn with_property<K, V>(key: K, value: V) -> MessageBuilder where K: Into<String>, V: Into<Value>, { MessageBuilder::new().with_property(key.into(), value.into()) } pub fn with_body<V>(value: V) -> MessageBuilder where V: Into<Value>, { MessageBuilder::new().with_body(value.into()) } pub fn properties(&self) -> &Map { &self.properties } pub fn body(&self) -> Option<&Value> { match self.body { Some(ref value) => Some(value), None => None, } } } pub struct MessageBuilder { map: LinkedHashMap<String, Value>, body: Option<Value>, } impl MessageBuilder { pub fn new() -> MessageBuilder { MessageBuilder { map: LinkedHashMap::new(), body: None, } } pub fn with_property<K, V>(mut self, key: K, value: V) -> MessageBuilder where K: Into<String>, V: Into<Value>, { self.map.insert(key.into(), value.into()); self } pub fn with_body<V>(mut self, value: V) -> MessageBuilder where V: Into<Value>, { self.body = Some(value.into()); self } pub fn build(self) -> Message { Message { properties: Map { map: self.map }, body: self.body, } } } #[derive(PartialEq, Clone)] pub struct Map { map: LinkedHashMap<String, Value>, } impl Map { pub fn new() -> MapBuilder { MapBuilder { map: LinkedHashMap::new(), } } pub fn get(&self, key: &str) -> Option<&Value> { self.map.get(key) } pub fn iter(&self) -> Iter<String, Value> { self.map.iter() } pub fn len(&self) -> usize { self.map.len() } } impl fmt::Debug for Map { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { self.map.fmt(f) } } pub struct MapBuilder { map: LinkedHashMap<String, Value>, } impl MapBuilder { pub fn insert<K, V>(mut self, key: K, value: V) -> MapBuilder where K: Into<String>, V: Into<Value>, { self.map.insert(key.into(), value.into()); self } pub fn build(self) -> Map { Map { map: self.map } } } #[derive(Clone, PartialEq)] pub struct List { list: Vec<Value>, } impl List { pub fn new() -> ListBuilder { ListBuilder { list: Vec::new() } } pub fn iter(&self) -> std::slice::Iter<Value> { self.list.iter() } pub fn len(&self) -> usize { self.list.len() } } impl std::ops::Index<usize> for List { type Output = Value; fn index(&self, index: usize) -> &Self::Output { &self.list[index] } } impl fmt::Debug for List { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { self.list.fmt(f) } } pub struct ListBuilder { list: Vec<Value>, } impl ListBuilder { pub fn append<V>(mut self, value: V) -> ListBuilder where V: Into<Value>, { self.list.push(value.into()); self } pub fn build(self) -> List { List { list: self.list } } } #[derive(Debug, PartialEq, Clone)] pub enum Value { Null, String(String), Int64(i64), Int32(i32), Float32(f32), Float64(f64), Boolean(bool), Bytes(Vec<u8>), List(List), Map(Map), Uuid(Uuid), } impl From<String> for Value { fn from(value: String) -> Self { Value::String(value) } } impl<'a> From<&'a str> for Value { fn from(value: &'a str) -> Self { Value::String(value.to_string()) } } impl From<i64> for Value { fn from(value: i64) -> Self { Value::Int64(value) } } impl From<i32> for Value { fn from(value: i32) -> Self { Value::Int32(value) } } impl From<f64> for Value { fn from(value: f64) -> Self { Value::Float64(value) } } impl From<bool> for Value { fn from(value: bool) -> Self { Value::Boolean(value) } } impl From<Vec<u8>> for Value { fn from(value: Vec<u8>) -> Self { Value::Bytes(value) } } impl From<List> for Value { fn from(value: List) -> Self { Value::List(value) } } impl From<Map> for Value { fn from(value: Map) -> Self { Value::Map(value) } } impl From<Uuid> for Value { fn from(value: Uuid) -> Self { Value::Uuid(value) } } pub trait MessageVisitor { type Output; fn visit_message(&self, value: &Message, buffer: &mut Self::Output); fn visit_map(&self, value: &Map, buffer: &mut Self::Output); fn visit_list(&self, value: &List, buffer: &mut Self::Output); fn visit_value(&self, value: &Value, buffer: &mut Self::Output); fn visit_bytes(&self, value: &Vec<u8>, buffer: &mut Self::Output); fn visit_int32(&self, value: i32, buffer: &mut Self::Output); fn visit_int64(&self, value: i64, buffer: &mut Self::Output); fn visit_float32(&self, value: f32, buffer: &mut Self::Output); fn visit_float64(&self, value: f64, buffer: &mut Self::Output); fn visit_boolean(&self, _value: bool, _buffer: &mut Self::Output); fn visit_string(&self, _value: &String, _buffer: &mut Self::Output); fn visit_uuid(&self, value: &Uuid, buffer: &mut Self::Output); fn visit_null(&self, _buffer: &mut Self::Output); } pub struct <API key> {} impl MessageVisitor for <API key> { type Output = usize; fn visit_message(&self, message: &Message, buffer: &mut Self::Output) { *buffer += 4; for (key, value) in message.properties().iter() { self.visit_string(key, buffer); self.visit_value(value, buffer); } if let Some(value) = message.body() { self.visit_value(value, buffer); } } fn visit_map(&self, map: &Map, buffer: &mut Self::Output) { *buffer += map.len(); for (key, value) in map.iter() { self.visit_string(key, buffer); self.visit_value(value, buffer); } } fn visit_list(&self, list: &List, buffer: &mut Self::Output) { *buffer += list.len(); for value in list.iter() { self.visit_value(value, buffer); } } fn visit_value(&self, value: &Value, buffer: &mut Self::Output) { *buffer += 1; match value { &Value::Null => self.visit_null(buffer), &Value::String(ref value) => { self.visit_string(value, buffer); } &Value::Int32(value) => { self.visit_int32(value, buffer); } &Value::Int64(value) => { self.visit_int64(value, buffer); } &Value::Float32(value) => { self.visit_float32(value, buffer); } &Value::Float64(value) => { self.visit_float64(value, buffer); } &Value::Boolean(value) => { self.visit_boolean(value, buffer); } &Value::Bytes(ref value) => { self.visit_bytes(value, buffer); } &Value::Map(ref value) => { self.visit_map(value, buffer); } &Value::List(ref value) => { self.visit_list(value, buffer); } &Value::Uuid(ref value) => { self.visit_uuid(value, buffer); } } } fn visit_bytes(&self, value: &Vec<u8>, buffer: &mut Self::Output) { *buffer += 4 + value.len() } fn visit_int32(&self, _value: i32, buffer: &mut Self::Output) { *buffer += 4; } fn visit_int64(&self, _value: i64, buffer: &mut Self::Output) { *buffer += 8; } fn visit_float32(&self, _value: f32, buffer: &mut Self::Output) { *buffer += 4; } fn visit_float64(&self, _value: f64, buffer: &mut Self::Output) { *buffer += 8; } fn visit_boolean(&self, _value: bool, buffer: &mut Self::Output) { *buffer += 1; } fn visit_string(&self, value: &String, buffer: &mut Self::Output) { *buffer += 4 + value.len() } fn visit_uuid(&self, _value: &Uuid, buffer: &mut Self::Output) { *buffer += 16 } fn visit_null(&self, _buffer: &mut Self::Output) {} } #[cfg(test)] mod tests { use super::*; #[test] fn it_works() { let message = Message::new() .with_body("Hello") .with_property( "vehicles", List::new().append("Aprilia").append("Infiniti").build(), ) .with_property( "address", Map::new() .insert("street", "400 Beale ST") .insert("city", "San Francisco") .insert("state", "CA") .insert("zip", "94105") .build(), ) .build(); println!("message = {:?}", message); let message = Message::new() .with_body("Wicked!!") .with_property("Hello", "World!") .with_property("age", 42) .with_property("weight", 175.5) .with_property("address", "400 Beale ST APT 1403") .with_property("city", "San Francisco") .with_property("state", "CA") .with_property("zip", "94105") .with_property("married", false) .build(); println!("message = {:?}", &message); } #[test] fn get_property_value() { let m = Message::with_property("msg", "World!").build(); assert_eq!(m.properties().get("msg"), Some(&Value::from("World!"))); assert_eq!(m.properties().get("missing"), None); if let Some(&Value::String(ref value)) = m.properties().get("msg") { println!("value = {:?}", value); } assert_eq!(m.body(), None); } #[test] fn map_as_body() { let m = Message::with_body( Map::new() .insert("fname", "Jimmie") .insert("lname", "Fulton") .build(), ).build(); println!("message = {:?}", &m); match m.body() { Some(&Value::Map(ref map)) => { assert_eq!(map.get("fname"), Some(&Value::from("Jimmie"))); assert_eq!(map.get("lname"), Some(&Value::from("Fulton"))); } _ => panic!("Map expected!"), } } #[test] fn list_index() { let l = List::new() .append("one") .append("two") .append("three") .build(); assert_eq!(l[0], Value::from("one")); } #[test] fn map_iterator() { let map = Map::new() .insert("key1", "value1") .insert("key2", "value2") .build(); let mut counter = 0; for (_key, _value) in map.iter() { counter += 1; } assert_eq!(counter, 2); eprintln!("message = {:?}", map); } #[test] pub fn examples() {} #[test] fn <API key>() { let calculator = <API key> {}; let message = Message::with_body("Hello").build(); let mut size = 0; calculator.visit_message(&message, &mut size); assert_eq!(size, 14); } #[test] fn <API key>() { let calculator = <API key> {}; let message = example(); let mut size = 0; calculator.visit_message(&message, &mut size); eprintln!("size = {:?}", size); } fn example() -> Message { Message::new() .with_property("fname", "Jimmie") .with_property("lname", "Fulton") .with_property("age", 42) .with_property("temp", 98.6) .with_property( "vehicles", List::new().append("Aprilia").append("Infiniti").build(), ) .with_property( "siblings", Map::new() .insert("brothers", List::new().append("Jason").build()) .insert( "sisters", List::new().append("Laura").append("Sariah").build(), ) .build(), ) .build() } }
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Typeset.Domain.Configuration { public interface <API key> { IConfiguration Read(string path); } }
'use strict'; // Projects controller angular.module('about').controller('AboutUsController', ['$scope', '$stateParams', '$state', '$location', 'Authentication', function($scope, $stateParams, $state, $location, Authentication) { $scope.authentication = Authentication; } ]);
<?php /** * AbstractField class file */ namespace Graviton\DocumentBundle\DependencyInjection\Compiler\Utils; class AbstractField { /** * @var string */ private $fieldName; /** * @var string */ private $exposedName; /** * @var bool */ private $readOnly; /** * @var bool */ private $required; /** * @var bool */ private $searchable; /** * @var bool */ private $<API key>; /** * Constructor * * @param string $fieldName Field name * @param string $exposedName Exposed name * @param bool $readOnly Read only * @param bool $required Is required * @param bool $searchable Is searchable * @param bool $<API key> Is an exception to record origin */ public function __construct( $fieldName, $exposedName, $readOnly, $required, $searchable, $<API key> ) { $this->fieldName = $fieldName; $this->exposedName = $exposedName; $this->readOnly = $readOnly; $this->required = $required; $this->searchable = $searchable; $this-><API key> = $<API key>; } /** * Get field name * * @return string */ public function getFieldName() { return $this->fieldName; } /** * Get exposed name * * @return string */ public function getExposedName() { return $this->exposedName; } /** * Is read only * * @return bool */ public function isReadOnly() { return $this->readOnly; } /** * Is required * * @return bool */ public function isRequired() { return $this->required; } /** * Is searchable * * @return boolean */ public function isSearchable() { return $this->searchable; } /** * @param boolean $searchable Is searchable * * @return void */ public function setSearchable($searchable) { $this->searchable = $searchable; } /** * get <API key> * * @return boolean <API key> */ public function <API key>() { return $this-><API key>; } /** * set <API key> * * @param boolean $<API key> <API key> * * @return void */ public function <API key>($<API key>) { $this-><API key> = $<API key>; } }
-- MySQL dump 10.13 Distrib 5.5.49, for debian-linux-gnu (x86_64) -- Host: localhost Database: warmup -- Server version 5.5.49-0ubuntu0.14.04.1 /*!40101 SET @<API key>=@@<API key> */; /*!40101 SET @<API key>=@@<API key> */; /*!40101 SET @<API key>=@@<API key> */; /*!40101 SET NAMES utf8 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @<API key>=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='<API key>' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -- Table structure for table `add_member` DROP TABLE IF EXISTS `add_member`; /*!40101 SET @saved_cs_client = @@<API key> */; /*!40101 SET <API key> = utf8 */; CREATE TABLE `add_member` ( `POWON_id` int(11) NOT NULL, `group_id` int(11) NOT NULL, PRIMARY KEY (`POWON_id`,`group_id`), KEY `group_id_idx` (`group_id`), CONSTRAINT `group_id` FOREIGN KEY (`group_id`) REFERENCES `group` (`group_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `POWON_id` FOREIGN KEY (`POWON_id`) REFERENCES `member` (`POWON_id`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET <API key> = @saved_cs_client */; -- Dumping data for table `add_member` LOCK TABLES `add_member` WRITE; /*!40000 ALTER TABLE `add_member` DISABLE KEYS */; /*!40000 ALTER TABLE `add_member` ENABLE KEYS */; UNLOCK TABLES; -- Table structure for table `group` DROP TABLE IF EXISTS `group`; /*!40101 SET @saved_cs_client = @@<API key> */; /*!40101 SET <API key> = utf8 */; CREATE TABLE `group` ( `group_id` int(11) NOT NULL AUTO_INCREMENT, `group_name` varchar(45) NOT NULL, `POWON_id` int(11) NOT NULL, PRIMARY KEY (`group_id`) ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1; /*!40101 SET <API key> = @saved_cs_client */; -- Dumping data for table `group` LOCK TABLES `group` WRITE; /*!40000 ALTER TABLE `group` DISABLE KEYS */; /*!40000 ALTER TABLE `group` ENABLE KEYS */; UNLOCK TABLES; -- Table structure for table `interest` DROP TABLE IF EXISTS `interest`; /*!40101 SET @saved_cs_client = @@<API key> */; /*!40101 SET <API key> = utf8 */; CREATE TABLE `interest` ( `interest_id` int(11) NOT NULL AUTO_INCREMENT, `interest_name` varchar(45) NOT NULL, PRIMARY KEY (`interest_id`) ) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1; /*!40101 SET <API key> = @saved_cs_client */; -- Dumping data for table `interest` LOCK TABLES `interest` WRITE; /*!40000 ALTER TABLE `interest` DISABLE KEYS */; /*!40000 ALTER TABLE `interest` ENABLE KEYS */; UNLOCK TABLES; -- Table structure for table `member` DROP TABLE IF EXISTS `member`; /*!40101 SET @saved_cs_client = @@<API key> */; /*!40101 SET <API key> = utf8 */; CREATE TABLE `member` ( `POWON_id` int(11) NOT NULL AUTO_INCREMENT, `firstname` varchar(45) COLLATE utf8_unicode_ci NOT NULL, `lastname` varchar(45) COLLATE utf8_unicode_ci NOT NULL, `password` varchar(45) COLLATE utf8_unicode_ci NOT NULL, `user_name` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL, `address` varchar(45) COLLATE utf8_unicode_ci NOT NULL, `dob` year(4) NOT NULL, `city` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL, `email` varchar(30) COLLATE utf8_unicode_ci NOT NULL, `member_status` tinyint(1) DEFAULT '0', `fee_membership` tinyint(1) DEFAULT '0', PRIMARY KEY (`POWON_id`) ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET <API key> = @saved_cs_client */; -- Dumping data for table `member` LOCK TABLES `member` WRITE; /*!40000 ALTER TABLE `member` DISABLE KEYS */; /*!40000 ALTER TABLE `member` ENABLE KEYS */; UNLOCK TABLES; -- Table structure for table `member_interest` DROP TABLE IF EXISTS `member_interest`; /*!40101 SET @saved_cs_client = @@<API key> */; /*!40101 SET <API key> = utf8 */; CREATE TABLE `member_interest` ( `POWON_id` int(11) NOT NULL, `interest_id` int(11) NOT NULL, PRIMARY KEY (`POWON_id`,`interest_id`), KEY `interest_id_idx` (`interest_id`), CONSTRAINT `<API key>` FOREIGN KEY (`POWON_id`) REFERENCES `member` (`POWON_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `<API key>` FOREIGN KEY (`interest_id`) REFERENCES `interest` (`interest_id`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET <API key> = @saved_cs_client */; -- Dumping data for table `member_interest` LOCK TABLES `member_interest` WRITE; /*!40000 ALTER TABLE `member_interest` DISABLE KEYS */; /*!40000 ALTER TABLE `member_interest` ENABLE KEYS */; UNLOCK TABLES; -- Table structure for table `name` DROP TABLE IF EXISTS `name`; /*!40101 SET @saved_cs_client = @@<API key> */; /*!40101 SET <API key> = utf8 */; CREATE TABLE `name` ( `id` int(6) unsigned NOT NULL AUTO_INCREMENT, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET <API key> = @saved_cs_client */; -- Dumping data for table `name` LOCK TABLES `name` WRITE; /*!40000 ALTER TABLE `name` DISABLE KEYS */; /*!40000 ALTER TABLE `name` ENABLE KEYS */; UNLOCK TABLES; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@<API key> */; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40101 SET <API key>=@<API key> */; /*!40101 SET <API key>=@<API key> */; /*!40101 SET <API key>=@<API key> */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -- Dump completed on 2016-07-13 22:32:20
<?php namespace Abe\FileUploadBundle\Controller; use Symfony\Component\HttpFoundation\Request; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Sensio\Bundle\<API key>\Configuration\Method; use Sensio\Bundle\<API key>\Configuration\Route; use Sensio\Bundle\<API key>\Configuration\Template; use Abe\FileUploadBundle\Entity\Document; use Abe\FileUploadBundle\Form\DocumentType; /** * user2 controller. * * @Route("/main/upload") */ class UploadController extends Controller { /** * creates the form to uplaod a file with the Documetn entity entities. * * @Route("/new", name="main_upload_file") * @Method("GET") * @Template() */ public function uploadAction() { $entity = new Document(); $form = $this->createUploadForm($entity); return array( 'entity' => $entity, 'form' => $form->createView(), ); } /** * @Template() * @Route("/", name="main_upload") * @Method("POST") */ public function uploadFileAction(Request $request) { return $this->redirect($this->generateUrl('homepage')); $document = new Document(); $form = $this->createUploadForm($document); $form->handleRequest($request); $test = $form->getErrors(); // $form->bindRequest($this->getRequest()); if ($form->isSubmitted()) { $fileinfomation = $form->getData(); exit(\Doctrine\Common\Util\Debug::dump($test)); $em = $this->getDoctrine()->getEntityManager(); $document->upload(); $em->persist($document); $em->flush(); return $this->redirect($this->generateUrl('homepage')); } return array( 'form' => $form->createView(), 'entity' =>$document, ); } /** * Creates a form to create a Document entity. * * @param Document $entity The entity * * @return \Symfony\Component\Form\Form The form */ private function createUploadForm(Document $entity) { $form = $this->createForm(new DocumentType(), $entity, array( 'action' => $this->generateUrl('document_create'), 'method' => 'POST', )); $form->add('submit', 'button', array('label' => 'Upload')); return $form; } public function upload() { // the file property can be empty if the field is not required if (null === $this->getFile()) { return; } // use the original file name here but you should // sanitize it at least to avoid any security issues // move takes the target directory and then the // target filename to move to $this->getFile()->move( $this->getUploadRootDir(), $this->getFile()-><API key>() ); // set the path property to the filename where you've saved the file $this->path = $this->getFile()-><API key>(); // clean up the file property as you won't need it anymore $this->file = null; } /** * @Template() * @Route("/", name="main_uploadfile") * @Method("POST") */ public function uploadFileAction2(Request $request) { $document = new Document(); $test = $form->getErrors(); if(2) { $fileinfomation = $form->getData(); $em = $this->getDoctrine()->getEntityManager(); $document->upload(); $em->persist($document); $em->flush(); return $this->redirect($this->generateUrl('homepage')); } } }
<!DOCTYPE html PUBLIC "- <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title></title> <link rel="stylesheet" type="text/css" href="http://db.cec.gov.tw/votehist.css"> <script type="text/javascript"> function AddToFaves_hp() { var is_4up = parseInt(navigator.appVersion); var is_mac = navigator.userAgent.toLowerCase().indexOf("mac")!=-1; var is_ie = navigator.userAgent.toLowerCase().indexOf("msie")!=-1; var thePage = location.href; if (thePage.lastIndexOf(' thePage = thePage.substring(0,thePage.lastIndexOf(' if (is_ie && is_4up && !is_mac) window.external.AddFavorite(thePage,document.title); else if (is_ie || document.images) booker_hp = window.open(thePage,'booker_','menubar,width=325,height=100,left=140,top=60'); //booker_hp.focus(); } </script> </head> <body class="frame"> <!DOCTYPE html PUBLIC "- <div style="width: 100%; height: 56px; margin: 0px 0px 0px 0px; border-style: solid; border-width: 0px 0px 1px 0px; border-color: black;"> <div style="float: left;"> <img src="http://db.cec.gov.tw/images/main_title.gif" /> </div> <div style="width: 100%; height: 48px;"> <div style="text-align: center;"> <img src="http://db.cec.gov.tw/images/small_ghost.gif" /> <span style="height: 30px; font-size: 20px;"> <a href="http: style="text-decoration: none;"></a> </span> </div> </div> <div style="width: 100%; height: 8px; background-color: #fde501;"> </div> </div> <!DOCTYPE html PUBLIC "- <div style="width: 100%; height: 29px; background-image: url('http://db.cec.gov.tw/images/tab_background.gif'); background-repeat: repeat-x;"> <div style="text-align: center;"> <a href="histMain.jsp"><img border="0" src="http://db.cec.gov.tw/images/tab_01.gif" /></a> <a href="histCand.jsp"><img border="0" src="http://db.cec.gov.tw/images/tab_02.gif" /></a> <!-- <a href=""><img border="0" src="images/tab_03.gif" /></a> --> <!-- <a href=""><img border="0" src="images/tab_04.gif" /></a> --> <a href="histQuery.jsp?voteCode=20120101T1A2&amp;qryType=ctks&amp;prvCode=05&amp;cityCode=000&amp;areaCode=06&amp;deptCode=032&amp;liCode=0587 <a href="mailto:info@cec.gov.tw;ytlin@cec.gov.tw"><img border="0" src="http://db.cec.gov.tw/images/tab_06.gif" /></a> </div> </div> <div style="width: 100%; height: 22px; background-image: url('http://db.cec.gov.tw/images/tab_separator.gif'); background-repeat: repeat-x;"> </div> <div class="query"> <!DOCTYPE html PUBLIC "- <!DOCTYPE html PUBLIC "- <div class="titlebox"> <div class="title"> <div class="head"> 08 &nbsp;</div> <div class="date">1010114</div> <div class="separator"></div> </div> </div> <!DOCTYPE html PUBLIC "- <link rel="stylesheet" type="text/css" href="http://db.cec.gov.tw/qryCtks.css" /> <table class="ctks" width="950" height="22" border=1 cellpadding="0" cellspacing="0" > <tr class="title"> <td nowrap align="center"></td> <td nowrap align="center"></td> <td nowrap align="center"></td> <td nowrap align="center"></td> <td nowrap align="center"></td> </tr> <tr class="data"> <td nowrap rowspan=2 align=center>061156</td> <td nowrap align="center"></td> <td nowrap align="center">1</td> <td nowrap align="right">301</td> <td nowrap align="right"> 40.95%</td> </tr> <tr class="data"> <td nowrap align="center"></td> <td nowrap align="center">2</td> <td nowrap align="right">434</td> <td nowrap align="right"> 59.04%</td> </tr> <tr class="data"> <td nowrap rowspan=2 align=center>061157</td> <td nowrap align="center"></td> <td nowrap align="center">1</td> <td nowrap align="right">277</td> <td nowrap align="right"> 36.83%</td> </tr> <tr class="data"> <td nowrap align="center"></td> <td nowrap align="center">2</td> <td nowrap align="right">475</td> <td nowrap align="right"> 63.16%</td> </tr> </table> <!DOCTYPE html PUBLIC "- <div style="width: 100%; height: 20px; margin: 30px 0px 0px 0px; text-align: center; "> <span> <img src="http://db.cec.gov.tw/images/leave_arrow_left.gif" /> </span> <span style="margin: 0px 10px 0px 10px; "> <a style="text-decoration: none; font-size: 15px; " href="histPrint"></a> </span> <span> <img src="http://db.cec.gov.tw/images/leave_arrow_right.gif" /> </span> <span style="margin-right: 100px;">&nbsp;</span> <span> <img src="http://db.cec.gov.tw/images/leave_arrow_left.gif" /> </span> <span style="margin: 0px 10px 0px 10px; "> <a style="text-decoration: none; font-size: 15px; " href="histMain.jsp"></a> </span> <span> <img src="http://db.cec.gov.tw/images/leave_arrow_right.gif" /> </span> </div> </div> </body> </html>
import { Dimensions, PixelRatio } from 'react-native'; const Utils = { ratio: PixelRatio.get(), pixel: 1 / PixelRatio.get(), size: { width: Dimensions.get('window').width, height: Dimensions.get('window').height, }, post(url, data, callback) { const fetchOptions = { method: 'POST', headers: { Accept: 'application/json', 'Content-Type': 'application/json', }, body: JSON.stringify(data), }; fetch(url, fetchOptions) .then(response => { response.json(); }) .then(responseData => { callback(responseData); }); }, }; export default Utils;
<!doctype html> <html lang="en" xmlns="http: <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <title>Photo - A History of UCSF</title> <link href='https://fonts.googleapis.com/css?family=Gilda+Display%7CPT+Sans+Narrow:300' rel='stylesheet' type='text/css'> <link href="ucsf_history.css" rel="stylesheet" type="text/css" media="all" /> {% include google_analytics.html %} </head> <body> <div id="mainbody"> {% include ucsf_banner.html %} <div class="banner"><h1><a href="/">A History of UCSF</a></h1></div> <div id="insidebody"> <div id="photocopy"> <div id="photocopy_text"><h2 class="title"><span class="title-primary">Photos</span></h2><br /> <div id="subhead">Robert A. “Bob” Derzon </div> <br /> <img src="images/pictures/derzon.jpg"/><br/> <br/><br/> </div> </div> <div id="sidebar"> <div id="sidenav_inside">{% include search_include.html %}<br /> <div id="sidenavtype"> <a href="story.html" class="sidenavtype"><strong>THE STORY</strong></a><br/> <br/> <a href="special_topics.html" class="sidenavtype"><strong>SPECIAL TOPICS</strong></a><br/><br/> <a href="people.html" class="sidenavtype"><strong>PEOPLE</strong></a><br/> <br/> <div id="<API key>"><strong><a href="photos.html" class="<API key>">PHOTOS</a></strong></div> <br/> <a href="buildings.html" class="sidenavtype"><strong>BUILDINGS</strong></a><br/> <br/> <a href="index.html" class="sidenavtype"><strong>HOME</strong></a><br/> </div> </div> </div> </div> {% include footer.html %} </div> {% include bottom_js.html %} </body> </html>
using Humanizer.Localisation; using Xunit; using Xunit.Extensions; namespace Humanizer.Tests.Localisation.ptBR { public class DateHumanizeTests : AmbientCulture { public DateHumanizeTests() : base("pt-BR") { } [Theory] [InlineData(-2, "2 segundos atrás")] [InlineData(-1, "um segundo atrás")] public void SecondsAgo(int seconds, string expected) { DateHumanize.Verify(expected, seconds, TimeUnit.Second, Tense.Past); } [Theory] [InlineData(1, "em um segundo")] [InlineData(2, "em 2 segundos")] public void SecondsFromNow(int seconds, string expected) { DateHumanize.Verify(expected, seconds, TimeUnit.Second, Tense.Future); } [Theory] [InlineData(-2, "2 minutos atrás")] [InlineData(-1, "um minuto atrás")] public void MinutesAgo(int minutes, string expected) { DateHumanize.Verify(expected, minutes, TimeUnit.Minute, Tense.Past); } [Theory] [InlineData(1, "em um minuto")] [InlineData(2, "em 2 minutos")] public void MinutesFromNow(int minutes, string expected) { DateHumanize.Verify(expected, minutes, TimeUnit.Minute, Tense.Future); } [Theory] [InlineData(-2, "2 horas atrás")] [InlineData(-1, "uma hora atrás")] public void HoursAgo(int hours, string expected) { DateHumanize.Verify(expected, hours, TimeUnit.Hour, Tense.Past); } [Theory] [InlineData(1, "em uma hora")] [InlineData(2, "em 2 horas")] public void HoursFromNow(int hours, string expected) { DateHumanize.Verify(expected, hours, TimeUnit.Hour, Tense.Future); } [Theory] [InlineData(-2, "2 dias atrás")] [InlineData(-1, "ontem")] public void DaysAgo(int days, string expected) { DateHumanize.Verify(expected, days, TimeUnit.Day, Tense.Past); } [Theory] [InlineData(1, "amanhã")] [InlineData(2, "em 2 dias")] public void DaysFromNow(int days, string expected) { DateHumanize.Verify(expected, days, TimeUnit.Day, Tense.Future); } [Theory] [InlineData(-2, "2 meses atrás")] [InlineData(-1, "um mês atrás")] public void MonthsAgo(int months, string expected) { DateHumanize.Verify(expected, months, TimeUnit.Month, Tense.Past); } [Theory] [InlineData(1, "em um mês")] [InlineData(2, "em 2 meses")] public void MonthsFromNow(int months, string expected) { DateHumanize.Verify(expected, months, TimeUnit.Month, Tense.Future); } [Theory] [InlineData(-2, "2 anos atrás")] [InlineData(-1, "um ano atrás")] public void YearsAgo(int years, string expected) { DateHumanize.Verify(expected, years, TimeUnit.Year, Tense.Past); } [Theory] [InlineData(1, "em um ano")] [InlineData(2, "em 2 anos")] public void YearsFromNow(int years, string expected) { DateHumanize.Verify(expected, years, TimeUnit.Year, Tense.Future); } [Fact] public void Now() { DateHumanize.Verify("agora", 0, TimeUnit.Day, Tense.Future); } } }
package com.github.aselab.activerecord import scala.language.experimental.macros import scala.reflect.macros._ trait Deprecations { def <API key>[A](c: Context)(a: c.Expr[A]): c.Expr[A] = { import c.universe._ c.error(c.enclosingPosition, "dsl#inTransaction is deprecated. use <API key>#inTransaction instead.") reify(a.splice) } }
<div class="form main-form" ng-controller="AuthCtrl" ng-class="($state.is('auth.register')) ? 'register-form' : ''"> <div class="row login-form__left" ui-view></div> </div>
"""This module contains examples of the op() function where: op(f,x) returns a stream where x is a stream, and f is an operator on lists, i.e., f is a function from a list to a list. These lists are of lists of arbitrary objects other than streams and agents. Function f must be stateless, i.e., for any lists u, v: f(u.extend(v)) = f(u).extend(f(v)) (Stateful functions are given in OpStateful.py with examples in ExamplesOpWithState.py.) Let f be a stateless operator on lists and let x be a stream. If at some point, the value of stream x is a list u then at that point, the value of stream op(f,x) is the list f(u). If at a later point, the value of stream x is the list: u.extend(v) then, at that point the value of stream op(f,x) is f(u).extend(f(v)). As a specific example, consider the following f(): def f(lst): return [w * w for w in lst] If at some point in time, the value of x is [3, 7], then at that point the value of op(f,x) is f([3, 7]) or [9, 49]. If at a later point, the value of x is [3, 7, 0, 11, 5] then the value of op(f,x) at that point is f([3, 7, 0, 11, 5]) or [9, 49, 0, 121, 25]. """ if __name__ == '__main__': if __package__ is None: import sys from os import path sys.path.append( path.dirname( path.dirname( path.abspath(__file__) ) ) ) from Agent import * from ListOperators import * from PrintFunctions import <API key> def example_1(): print "example_1" print "op(f, x): f is a function from a list to a list" print "x is a stream \n" # FUNCTIONS FROM LIST TO LIST # This example uses the following list operators: # functions from a list to a list. # f, g, h, r # Example A: function using list comprehension def f(lst): return [w*w for w in lst] # Example B: function using filter threshold = 6 def predicate(w): return w > threshold def g(lst): return filter(predicate, lst) # Example C: function using map # Raise each element of the list to the n-th power. n = 3 def power(w): return w**n def h(lst): return map(power, lst) # Example D: function using another list comprehension # Discard any element of x that is not a # multiple of a parameter n, and divide the # elements that are multiples of n by n. n = 3 def r(lst): result = [] for w in lst: if w%n == 0: result.append(w/n) return result # EXAMPLES OF OPERATIONS ON STREAMS # The input stream for these examples x = Stream('x') print 'x is the input stream.' print 'a is a stream consisting of the squares of the input' print 'b is the stream consisting of values that exceed 6' print 'c is the stream consisting of the third powers of the input' print 'd is the stream consisting of values that are multiples of 3 divided by 3' print 'newa is the same as a. It is defined in a more succinct fashion.' print 'newb has squares that exceed 6.' print '' # The output streams a, b, c, d obtained by # applying the list operators f, g, h, r to # stream x. a = op(f, x) b = op(g, x) c = op(h, x) d = op(r, x) # You can also define a function only on streams. # You can do this using functools in Python or # by simple encapsulation as shown below. def F(x): return op(f,x) def G(x): return op(g,x) newa = F(x) newb = G(F(x)) # The advantage is that F is a function only # of streams. So, function composition looks cleaner # as in G(F(x)) # Name the output streams to label the output # so that reading the output is easier. a.set_name('a') newa.set_name('newa') b.set_name('b') newb.set_name('newb') c.set_name('c') d.set_name('d') # At this point x is the empty stream: # its value is [] x.extend([3, 7]) # Now the value of x is [3, 7] print "FIRST STEP" <API key>([x, a, b, c, d, newa, newb]) print "" x.extend([0, 11, 15]) # Now the value of x is [3, 7, 0, 11, 15] print "SECOND STEP" <API key>([x, a, b, c, d, newa, newb]) def main(): example_1() if __name__ == '__main__': main()
<?php namespace Black\Bundle\MenuBundle\Model; interface MenuInterface { /** * @return mixed */ public function getId(); /** * @return mixed */ public function getName(); /** * @return mixed */ public function getSlug(); /** * @return mixed */ public function getDescription(); /** * @return mixed */ public function getItems(); }
{% extends 'base.html' %} {% load staticfiles %} {% block content %} <div class="container"> <div class="row"> <div class="col-lg-9"> <div class="post-header"> <h2>{{page.page_title}}</h2> </div> {% if page.image %} <div class="video-wrapper"> <img class="img-responsive" src="/static/media/{{page.image}}" alt="{{page.title}}"> </div> {% endif %} <div class="page-body"> {{page.body|safe}} </div> <div class="page-share"> <a href="https: <a href="https: <a href="https://twitter.com/Eleni_Zouliami" target="_blank"><span class="share-box"><i class="fa fa-twitter"></i></span></a> </div> </div> <div class="col-lg-3 custom-sidebar"> {% if page.image %} <div class="col-md-6"> <div class="video-wrapper"> <img src="/media/{{page.image}}" alt="{{page.title}}"> </div> </div> {% endif %} {% include "sidebar.html" %} </div> </div> </div> {% endblock content %}
#ifndef <API key> #define <API key> #include <String.h> #include <vector> namespace FeedKit { class Channel; class Content; class Enclosure; class Feed; class Item; extern const char *ServerSignature; typedef std::vector<BString> uuid_list_t; typedef std::vector<Content *> content_list_t; typedef std::vector<Channel *> channel_list_t; typedef std::vector<Enclosure *> enclosure_list_t; typedef std::vector<Feed *> feed_list_t; typedef std::vector<Item *> item_list_t; namespace FromServer { enum msg_what { SettingsUpdated = 'rfsu', // Settings have been updated }; }; namespace ErrorCode { enum code { UnableToParseFeed = 'ecpf', // Unable to parse the Feed InvalidItem = 'ecii', // Invalid Item InvalidEnclosure = 'ecie', // Invalid Enclosure <API key> = 'ecip', // Invalid Enclosure path <API key> = 'ecsd', // Unable to start downloading the Enclosure }; }; // The Settings namespace details things relating to settings and settings templates namespace Settings { enum display_type { Unset = ' ', // Unset - don't use, used internally Hidden = 'hide', // A setting not controlled by the user RadioButton = 'rabu', // Radio buttons CheckBox = 'chkb', // Check boxes MenuSingle = 'mens', // Single-select menu MenuMulti = 'menm', // Multiple-select menu TextSingle = 'txts', // Single line text control TextMulti = 'txtm', // Multi line text control TextPassword = 'txtp', // Single line, hidden input, text control FilePickerSingle = 'fpks', // File Picker - single file FilePickerMulti = 'fpkm', // File Picker - multiple file <API key> = 'dpks', // Directory Picker - single <API key> = 'dpkm', // Directory picker - multiple }; // These are some common types of applications. The Type param of FeedListener is free // form but you should use one of these constants, if possible, to ensure consistency namespace AppTypes { extern const char *SettingClient; // Something which allows user interaction extern const char *SettingServer; // The server extern const char *SettingUtil; // Interacts with the FeedKit but not the // user extern const char *SettingParser; // An addon for parsing data into FeedKit // objects extern const char *SettingFeed; // Settings specific to a feed }; namespace Icon { enum Location { Contents = 'cnts', // Icon comes from the contents of the file TrackerIcon = 'trki', // Use the Tracker icon }; }; }; }; #endif
<?php namespace Arvici\Exception; class <API key> extends ArviciException { /** * <API key> constructor. * @param string $message * @param int $code * @param \Exception $previous */ public function __construct($message, $code = 0, \Exception $previous = null) { parent::__construct($message, $code, $previous); } public function __toString() { return __CLASS__ . ": [{$this->code}]: {$this->message}\n"; } }
#include <stdio.h> struct Employee { unsigned int id; char name[256]; char gender; float salary; }; void addEmployee(FILE *f) { struct Employee emp; printf("Adding a new employee, please type his id \n"); int id; scanf("%d", &id); if (id > 0) { while (1) { //search if id already in use struct Employee tmp; fread(&tmp, sizeof(struct Employee), 1, f); if (feof(f) != 0) { //end of file emp.id = id; break; } if (id == tmp.id) { printf("Id already in use, id must be unique \n"); return; } else { emp.id = id; } } } else { printf("Id must be greater than 0 \n"); return; } printf("Please type his name \n"); scanf("%s", &emp.name); printf("Please type his gender (m or f) \n"); scanf(" %c", &emp.gender); if ((emp.gender != 'm') && (emp.gender != 'f')) { printf("Gender should be 'm' or 'f'"); return; } printf("Please type his salary \n"); scanf("%f", &emp.salary); fwrite(&emp, sizeof(struct Employee), 1, f); } void removeEmployee(FILE *f) { printf("Removing employee, please type his id \n"); int id; scanf("%d)", &id); while (1) { struct Employee tmp; fread(&tmp, sizeof(struct Employee), 1, f); if (feof(f) != 0) { printf("Employee not found"); return; } if (id == tmp.id) { fseek(f, -sizeof(struct Employee), SEEK_CUR); tmp.id = 0; fwrite(&tmp, sizeof(struct Employee), 1, f); printf("Sucess \n"); return; } } } void <API key>(FILE *f) { printf("Calculating the avarage salary by gender \n"); int maleNumber = 0; int femaleNumber = 0; float sumMale = 0; float sumFemale = 0; while (1) { struct Employee tmp; fread(&tmp, sizeof(struct Employee), 1, f); if (feof(f) != 0) break; if (tmp.id == 0) continue; if (tmp.gender == 'm') { maleNumber++; sumMale += tmp.salary; } else { femaleNumber++; sumFemale += tmp.salary; } } printf("Avarage male salary: %f \n", sumMale/maleNumber); printf("Avarage female salary: %f \n", sumFemale/femaleNumber); } void exportTextFile(FILE *f) { char path[256]; printf("Please type the name of the file to store the data \n"); scanf("%s)", &path); FILE *final; if ((final = fopen(path, "w")) == NULL) { printf("Error opening/creating the file"); } else { while (1) { struct Employee tmp; fread(&tmp, sizeof(struct Employee), 1, f); if (feof(f) != 0) break; if (tmp.id != 0) { fprintf(final, "ID: %d \n", tmp.id); fprintf(final, "Name: %s \n", tmp.name); fprintf(final, "Gender: %c \n", tmp.gender); fprintf(final, "Salary: %f \n", tmp.salary); } } } fclose(final); } void compactData(FILE *f, char fileName[]) { FILE *copy; if ((copy = fopen("copy", "wb")) == NULL) { printf("Error creating the copy file"); } else { while (1) { struct Employee tmp; fread(&tmp, sizeof(struct Employee), 1, f); if (feof(f) != 0) break; if (tmp.id != 0) { fwrite(&tmp, sizeof(struct Employee), 1, copy); } } fclose(copy); remove(fileName); rename("copy", fileName); } printf("Database compacted"); } int main(int argc, char *argv[]) { if (argc == 3) { int option = atoi(argv[2]); FILE *f; f = fopen(argv[1], "ab+"); fclose(f); switch(option) { case 1: if ((f = fopen(argv[1], "ab+")) == NULL) { printf("Error opening/creating the file"); } else { addEmployee(f); fclose(f); } break; case 2: if ((f = fopen(argv[1], "rb+")) == NULL) { printf("Error opening/creating the file"); } else { removeEmployee(f); fclose(f); } break; case 3: if ((f = fopen(argv[1], "rb")) == NULL) { printf("Error opening/creating the file"); } else { <API key>(f); fclose(f); } break; case 4: if ((f = fopen(argv[1], "rb")) == NULL) { printf("Error opening/creating the file"); } else { exportTextFile(f); fclose(f); } break; case 5: if ((f = fopen(argv[1], "rb")) == NULL) { printf("Error opening/creating the file"); } else { compactData(f, argv[1]); fclose(f); } break; } } else { printf("Need to provide two arguments, the first one is the binary file and second is the option. \n"); printf("1 - Add employee \n"); printf("2 - Remove employee \n"); printf("3 - Calculate avarage salary by gender \n"); printf("4 - Export data to a text file \n"); printf("5 - Compact data \n"); } return 0; }
layout: post date: 2016-05-17 title: "WEDDING DRESSES Jersey Cap Sleeve Bridal Dress JB98629" category: WEDDING DRESSES tags: [WEDDING DRESSES] WEDDING DRESSES Jersey Cap Sleeve Bridal Dress JB98629 Just **$279.99** <a href="https: <!-- break --><a href="https: <a href="https: <a href="https: <a href="https: Buy it: [https:
#!/usr/bin/env node // cli.js const { start, crawl } = require("../lib/crawler"); const argv = require("yargs") .option("lang", { describe: "Language to be used to scrape trand pages. Not used in crawl command." }) .default("lang", "EN") .option("dir", { describe: "Path to the directory to store database files" }) .demandOption(["dir"]) .command("*", "Start crawling", () => {}, (argv) => { start(argv.lang, argv.dir); }) .command("crawl", "Crawl comments form a video", () => {}, (argv) => { crawl(argv.dir).catch((err) => { console.error(err); }); }) .help("h") .alias("h", "help") .argv;
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using CollegeFbsRankings.Domain.Games; using CollegeFbsRankings.Domain.Rankings; using CollegeFbsRankings.Domain.Teams; namespace CollegeFbsRankings.Domain.Validations { public class ValidationService { public Validation<GameId> <API key><TRankingValue>( IEnumerable<CompletedGame> games, Ranking<TeamId, TRankingValue> performance) where TRankingValue : IRankingValue { return new Validation<GameId>(games.Select(game => { var winningTeamData = performance[game.WinningTeamId]; var losingTeamData = performance[game.LosingTeamId]; foreach (var values in winningTeamData.Values.Zip(losingTeamData.Values, Tuple.Create)) { if (values.Item1 > values.Item2) return new KeyValuePair<GameId, eValidationResult>(game.Id, eValidationResult.Correct); if (values.Item1 < values.Item2) return new KeyValuePair<GameId, eValidationResult>(game.Id, eValidationResult.Incorrect); } return new KeyValuePair<GameId, eValidationResult>(game.Id, eValidationResult.Skipped); })); } } }
using Droog.Calculon.Backstage; using NUnit.Framework; namespace Droog.Calculon.Tests { [TestFixture] public class BuilderTests { public interface IFoo { } public class Foo : AActor, IFoo { } [Test] public void Can_create_class() { var builder = new ActorBuilder(); var foo = builder.GetBuilder<Foo>()(); Assert.IsNotNull(foo); Assert.IsInstanceOfType(typeof(Foo),foo); } [Test] public void <API key>() { var builder = new ActorBuilder(); var foo = builder.GetBuilder<IFoo>()(); Assert.IsNotNull(foo); Assert.IsInstanceOfType(typeof(Foo), foo); } } }
<div class="container" > <div class="row page-title"> <div class="col-xs-12 text-center"> <span>Consultation</span> </div> </div> </div> <script type="text/javascript"> $(document).ready(function() { var table = $('#table'); // Table bordered $('#table-bordered').change(function() { var value = $( this ).val(); table.removeClass('table-bordered').addClass(value); }); // Table striped $('#table-striped').change(function() { var value = $( this ).val(); table.removeClass('table-striped').addClass(value); }); // Table hover $('#table-hover').change(function() { var value = $( this ).val(); table.removeClass('table-hover').addClass(value); }); // Table color $('#table-color').change(function() { var value = $(this).val(); table.removeClass(/^table-mc-/).addClass(value); }); }); // by Nikita Vasilyev (function(removeClass) { jQuery.fn.removeClass = function( value ) { if ( value && typeof value.test === "function" ) { for ( var i = 0, l = this.length; i < l; i++ ) { var elem = this[i]; if ( elem.nodeType === 1 && elem.className ) { var classNames = elem.className.split( /\s+/ ); for ( var n = classNames.length; n if ( value.test(classNames[n]) ) { classNames.splice(n, 1); } } elem.className = jQuery.trim( classNames.join(" ") ); } } } else { removeClass.call(this, value); } return this; } })(jQuery.fn.removeClass); </script> <style media="screen"> .table { width: 100%; max-width: 100%; margin-bottom: 2rem; background-color: #fff; } .table > thead > tr, .table > tbody > tr, .table > tfoot > tr { -webkit-transition: all 0.3s ease; -o-transition: all 0.3s ease; transition: all 0.3s ease; } .table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td { text-align: left; padding: 1.6rem; vertical-align: top; border-top: 0; -webkit-transition: all 0.3s ease; -o-transition: all 0.3s ease; transition: all 0.3s ease; } .table > thead > tr > th { font-weight: 400; color: #757575; vertical-align: bottom; border-bottom: 1px solid rgba(0, 0, 0, 0.12); } .table > caption + thead > tr:first-child > th, .table > colgroup + thead > tr:first-child > th, .table > thead:first-child > tr:first-child > th, .table > caption + thead > tr:first-child > td, .table > colgroup + thead > tr:first-child > td, .table > thead:first-child > tr:first-child > td { border-top: 0; } .table > tbody + tbody { border-top: 1px solid rgba(0, 0, 0, 0.12); } .table .table { background-color: #fff; } .table .no-border { border: 0; } .table-condensed > thead > tr > th, .table-condensed > tbody > tr > th, .table-condensed > tfoot > tr > th, .table-condensed > thead > tr > td, .table-condensed > tbody > tr > td, .table-condensed > tfoot > tr > td { padding: 0.8rem; } .table-bordered { border: 0; } .table-bordered > thead > tr > th, .table-bordered > tbody > tr > th, .table-bordered > tfoot > tr > th, .table-bordered > thead > tr > td, .table-bordered > tbody > tr > td, .table-bordered > tfoot > tr > td { border: 0; border-bottom: 1px solid #e0e0e0; } .table-bordered > thead > tr > th, .table-bordered > thead > tr > td { border-bottom-width: 2px; } .table-striped > tbody > tr:nth-child(odd) > td, .table-striped > tbody > tr:nth-child(odd) > th { background-color: #f5f5f5; } .table-hover > tbody > tr:hover > td, .table-hover > tbody > tr:hover > th { background-color: rgba(0, 0, 0, 0.12); } @media screen and (max-width: 768px) { .<API key> > .table { margin-bottom: 0; background-color: transparent; } .<API key> > .table > thead, .<API key> > .table > tfoot { display: none; } .<API key> > .table > tbody { display: block; } .<API key> > .table > tbody > tr { display: block; border: 1px solid #e0e0e0; border-radius: 2px; margin-bottom: 1.6rem; } .<API key> > .table > tbody > tr > td { background-color: #fff; display: block; vertical-align: middle; text-align: right; } .<API key> > .table > tbody > tr > td[data-title]:before { content: attr(data-title); float: left; font-size: inherit; font-weight: 400; color: #757575; } .<API key>.shadow-z-1 { -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none; } .<API key>.shadow-z-1 > .table > tbody > tr { border: none; -webkit-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.12), 0 1px 2px 0 rgba(0, 0, 0, 0.24); -moz-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.12), 0 1px 2px 0 rgba(0, 0, 0, 0.24); box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.12), 0 1px 2px 0 rgba(0, 0, 0, 0.24); } .<API key> > .table-bordered { border: 0; } .<API key> > .table-bordered > tbody > tr > td { border: 0; border-bottom: 1px solid #e0e0e0; } .<API key> > .table-bordered > tbody > tr > td:last-child { border-bottom: 0; } .<API key> > .table-striped > tbody > tr > td, .<API key> > .table-striped > tbody > tr:nth-child(odd) { background-color: #fff; } .<API key> > .table-striped > tbody > tr > td:nth-child(odd) { background-color: #f5f5f5; } .<API key> > .table-hover > tbody > tr:hover > td, .<API key> > .table-hover > tbody > tr:hover { background-color: #fff; } .<API key> > .table-hover > tbody > tr > td:hover { background-color: rgba(0, 0, 0, 0.12); } } .table-striped.table-mc-red > tbody > tr:nth-child(odd) > td, .table-striped.table-mc-red > tbody > tr:nth-child(odd) > th { background-color: #fde0dc; } .table-hover.table-mc-red > tbody > tr:hover > td, .table-hover.table-mc-red > tbody > tr:hover > th { background-color: #f9bdbb; } @media screen and (max-width: 767px) { .<API key> .table-striped.table-mc-red > tbody > tr > td, .<API key> .table-striped.table-mc-red > tbody > tr:nth-child(odd) { background-color: #fff; } .<API key> .table-striped.table-mc-red > tbody > tr > td:nth-child(odd) { background-color: #fde0dc; } .<API key> .table-hover.table-mc-red > tbody > tr:hover > td, .<API key> .table-hover.table-mc-red > tbody > tr:hover { background-color: #fff; } .<API key> .table-hover.table-mc-red > tbody > tr > td:hover { background-color: #f9bdbb; } } .table-striped.table-mc-pink > tbody > tr:nth-child(odd) > td, .table-striped.table-mc-pink > tbody > tr:nth-child(odd) > th { background-color: #fce4ec; } .table-hover.table-mc-pink > tbody > tr:hover > td, .table-hover.table-mc-pink > tbody > tr:hover > th { background-color: #f8bbd0; } @media screen and (max-width: 767px) { .<API key> .table-striped.table-mc-pink > tbody > tr > td, .<API key> .table-striped.table-mc-pink > tbody > tr:nth-child(odd) { background-color: #fff; } .<API key> .table-striped.table-mc-pink > tbody > tr > td:nth-child(odd) { background-color: #fce4ec; } .<API key> .table-hover.table-mc-pink > tbody > tr:hover > td, .<API key> .table-hover.table-mc-pink > tbody > tr:hover { background-color: #fff; } .<API key> .table-hover.table-mc-pink > tbody > tr > td:hover { background-color: #f8bbd0; } } .table-striped.table-mc-purple > tbody > tr:nth-child(odd) > td, .table-striped.table-mc-purple > tbody > tr:nth-child(odd) > th { background-color: #f3e5f5; } .table-hover.table-mc-purple > tbody > tr:hover > td, .table-hover.table-mc-purple > tbody > tr:hover > th { background-color: #e1bee7; } @media screen and (max-width: 767px) { .<API key> .table-striped.table-mc-purple > tbody > tr > td, .<API key> .table-striped.table-mc-purple > tbody > tr:nth-child(odd) { background-color: #fff; } .<API key> .table-striped.table-mc-purple > tbody > tr > td:nth-child(odd) { background-color: #f3e5f5; } .<API key> .table-hover.table-mc-purple > tbody > tr:hover > td, .<API key> .table-hover.table-mc-purple > tbody > tr:hover { background-color: #fff; } .<API key> .table-hover.table-mc-purple > tbody > tr > td:hover { background-color: #e1bee7; } } .table-striped.<API key> > tbody > tr:nth-child(odd) > td, .table-striped.<API key> > tbody > tr:nth-child(odd) > th { background-color: #ede7f6; } .table-hover.<API key> > tbody > tr:hover > td, .table-hover.<API key> > tbody > tr:hover > th { background-color: #d1c4e9; } @media screen and (max-width: 767px) { .<API key> .table-striped.<API key> > tbody > tr > td, .<API key> .table-striped.<API key> > tbody > tr:nth-child(odd) { background-color: #fff; } .<API key> .table-striped.<API key> > tbody > tr > td:nth-child(odd) { background-color: #ede7f6; } .<API key> .table-hover.<API key> > tbody > tr:hover > td, .<API key> .table-hover.<API key> > tbody > tr:hover { background-color: #fff; } .<API key> .table-hover.<API key> > tbody > tr > td:hover { background-color: #d1c4e9; } } .table-striped.table-mc-indigo > tbody > tr:nth-child(odd) > td, .table-striped.table-mc-indigo > tbody > tr:nth-child(odd) > th { background-color: #e8eaf6; } .table-hover.table-mc-indigo > tbody > tr:hover > td, .table-hover.table-mc-indigo > tbody > tr:hover > th { background-color: #c5cae9; } @media screen and (max-width: 767px) { .<API key> .table-striped.table-mc-indigo > tbody > tr > td, .<API key> .table-striped.table-mc-indigo > tbody > tr:nth-child(odd) { background-color: #fff; } .<API key> .table-striped.table-mc-indigo > tbody > tr > td:nth-child(odd) { background-color: #e8eaf6; } .<API key> .table-hover.table-mc-indigo > tbody > tr:hover > td, .<API key> .table-hover.table-mc-indigo > tbody > tr:hover { background-color: #fff; } .<API key> .table-hover.table-mc-indigo > tbody > tr > td:hover { background-color: #c5cae9; } } .table-striped.table-mc-blue > tbody > tr:nth-child(odd) > td, .table-striped.table-mc-blue > tbody > tr:nth-child(odd) > th { background-color: #e7e9fd; } .table-hover.table-mc-blue > tbody > tr:hover > td, .table-hover.table-mc-blue > tbody > tr:hover > th { background-color: #d0d9ff; } @media screen and (max-width: 767px) { .<API key> .table-striped.table-mc-blue > tbody > tr > td, .<API key> .table-striped.table-mc-blue > tbody > tr:nth-child(odd) { background-color: #fff; } .<API key> .table-striped.table-mc-blue > tbody > tr > td:nth-child(odd) { background-color: #e7e9fd; } .<API key> .table-hover.table-mc-blue > tbody > tr:hover > td, .<API key> .table-hover.table-mc-blue > tbody > tr:hover { background-color: #fff; } .<API key> .table-hover.table-mc-blue > tbody > tr > td:hover { background-color: #d0d9ff; } } .table-striped.table-mc-light-blue > tbody > tr:nth-child(odd) > td, .table-striped.table-mc-light-blue > tbody > tr:nth-child(odd) > th { background-color: #e1f5fe; } .table-hover.table-mc-light-blue > tbody > tr:hover > td, .table-hover.table-mc-light-blue > tbody > tr:hover > th { background-color: #b3e5fc; } @media screen and (max-width: 767px) { .<API key> .table-striped.table-mc-light-blue > tbody > tr > td, .<API key> .table-striped.table-mc-light-blue > tbody > tr:nth-child(odd) { background-color: #fff; } .<API key> .table-striped.table-mc-light-blue > tbody > tr > td:nth-child(odd) { background-color: #e1f5fe; } .<API key> .table-hover.table-mc-light-blue > tbody > tr:hover > td, .<API key> .table-hover.table-mc-light-blue > tbody > tr:hover { background-color: #fff; } .<API key> .table-hover.table-mc-light-blue > tbody > tr > td:hover { background-color: #b3e5fc; } } .table-striped.table-mc-cyan > tbody > tr:nth-child(odd) > td, .table-striped.table-mc-cyan > tbody > tr:nth-child(odd) > th { background-color: #e0f7fa; } .table-hover.table-mc-cyan > tbody > tr:hover > td, .table-hover.table-mc-cyan > tbody > tr:hover > th { background-color: #b2ebf2; } @media screen and (max-width: 767px) { .<API key> .table-striped.table-mc-cyan > tbody > tr > td, .<API key> .table-striped.table-mc-cyan > tbody > tr:nth-child(odd) { background-color: #fff; } .<API key> .table-striped.table-mc-cyan > tbody > tr > td:nth-child(odd) { background-color: #e0f7fa; } .<API key> .table-hover.table-mc-cyan > tbody > tr:hover > td, .<API key> .table-hover.table-mc-cyan > tbody > tr:hover { background-color: #fff; } .<API key> .table-hover.table-mc-cyan > tbody > tr > td:hover { background-color: #b2ebf2; } } .table-striped.table-mc-teal > tbody > tr:nth-child(odd) > td, .table-striped.table-mc-teal > tbody > tr:nth-child(odd) > th { background-color: #e0f2f1; } .table-hover.table-mc-teal > tbody > tr:hover > td, .table-hover.table-mc-teal > tbody > tr:hover > th { background-color: #b2dfdb; } @media screen and (max-width: 767px) { .<API key> .table-striped.table-mc-teal > tbody > tr > td, .<API key> .table-striped.table-mc-teal > tbody > tr:nth-child(odd) { background-color: #fff; } .<API key> .table-striped.table-mc-teal > tbody > tr > td:nth-child(odd) { background-color: #e0f2f1; } .<API key> .table-hover.table-mc-teal > tbody > tr:hover > td, .<API key> .table-hover.table-mc-teal > tbody > tr:hover { background-color: #fff; } .<API key> .table-hover.table-mc-teal > tbody > tr > td:hover { background-color: #b2dfdb; } } .table-striped.table-mc-green > tbody > tr:nth-child(odd) > td, .table-striped.table-mc-green > tbody > tr:nth-child(odd) > th { background-color: #d0f8ce; } .table-hover.table-mc-green > tbody > tr:hover > td, .table-hover.table-mc-green > tbody > tr:hover > th { background-color: #a3e9a4; } @media screen and (max-width: 767px) { .<API key> .table-striped.table-mc-green > tbody > tr > td, .<API key> .table-striped.table-mc-green > tbody > tr:nth-child(odd) { background-color: #fff; } .<API key> .table-striped.table-mc-green > tbody > tr > td:nth-child(odd) { background-color: #d0f8ce; } .<API key> .table-hover.table-mc-green > tbody > tr:hover > td, .<API key> .table-hover.table-mc-green > tbody > tr:hover { background-color: #fff; } .<API key> .table-hover.table-mc-green > tbody > tr > td:hover { background-color: #a3e9a4; } } .table-striped.<API key> > tbody > tr:nth-child(odd) > td, .table-striped.<API key> > tbody > tr:nth-child(odd) > th { background-color: #f1f8e9; } .table-hover.<API key> > tbody > tr:hover > td, .table-hover.<API key> > tbody > tr:hover > th { background-color: #dcedc8; } @media screen and (max-width: 767px) { .<API key> .table-striped.<API key> > tbody > tr > td, .<API key> .table-striped.<API key> > tbody > tr:nth-child(odd) { background-color: #fff; } .<API key> .table-striped.<API key> > tbody > tr > td:nth-child(odd) { background-color: #f1f8e9; } .<API key> .table-hover.<API key> > tbody > tr:hover > td, .<API key> .table-hover.<API key> > tbody > tr:hover { background-color: #fff; } .<API key> .table-hover.<API key> > tbody > tr > td:hover { background-color: #dcedc8; } } .table-striped.table-mc-lime > tbody > tr:nth-child(odd) > td, .table-striped.table-mc-lime > tbody > tr:nth-child(odd) > th { background-color: #f9fbe7; } .table-hover.table-mc-lime > tbody > tr:hover > td, .table-hover.table-mc-lime > tbody > tr:hover > th { background-color: #f0f4c3; } @media screen and (max-width: 767px) { .<API key> .table-striped.table-mc-lime > tbody > tr > td, .<API key> .table-striped.table-mc-lime > tbody > tr:nth-child(odd) { background-color: #fff; } .<API key> .table-striped.table-mc-lime > tbody > tr > td:nth-child(odd) { background-color: #f9fbe7; } .<API key> .table-hover.table-mc-lime > tbody > tr:hover > td, .<API key> .table-hover.table-mc-lime > tbody > tr:hover { background-color: #fff; } .<API key> .table-hover.table-mc-lime > tbody > tr > td:hover { background-color: #f0f4c3; } } .table-striped.table-mc-yellow > tbody > tr:nth-child(odd) > td, .table-striped.table-mc-yellow > tbody > tr:nth-child(odd) > th { background-color: #fffde7; } .table-hover.table-mc-yellow > tbody > tr:hover > td, .table-hover.table-mc-yellow > tbody > tr:hover > th { background-color: #fff9c4; } @media screen and (max-width: 767px) { .<API key> .table-striped.table-mc-yellow > tbody > tr > td, .<API key> .table-striped.table-mc-yellow > tbody > tr:nth-child(odd) { background-color: #fff; } .<API key> .table-striped.table-mc-yellow > tbody > tr > td:nth-child(odd) { background-color: #fffde7; } .<API key> .table-hover.table-mc-yellow > tbody > tr:hover > td, .<API key> .table-hover.table-mc-yellow > tbody > tr:hover { background-color: #fff; } .<API key> .table-hover.table-mc-yellow > tbody > tr > td:hover { background-color: #fff9c4; } } .table-striped.table-mc-amber > tbody > tr:nth-child(odd) > td, .table-striped.table-mc-amber > tbody > tr:nth-child(odd) > th { background-color: #fff8e1; } .table-hover.table-mc-amber > tbody > tr:hover > td, .table-hover.table-mc-amber > tbody > tr:hover > th { background-color: #ffecb3; } @media screen and (max-width: 767px) { .<API key> .table-striped.table-mc-amber > tbody > tr > td, .<API key> .table-striped.table-mc-amber > tbody > tr:nth-child(odd) { background-color: #fff; } .<API key> .table-striped.table-mc-amber > tbody > tr > td:nth-child(odd) { background-color: #fff8e1; } .<API key> .table-hover.table-mc-amber > tbody > tr:hover > td, .<API key> .table-hover.table-mc-amber > tbody > tr:hover { background-color: #fff; } .<API key> .table-hover.table-mc-amber > tbody > tr > td:hover { background-color: #ffecb3; } } .table-striped.table-mc-orange > tbody > tr:nth-child(odd) > td, .table-striped.table-mc-orange > tbody > tr:nth-child(odd) > th { background-color: #fff3e0; } .table-hover.table-mc-orange > tbody > tr:hover > td, .table-hover.table-mc-orange > tbody > tr:hover > th { background-color: #ffe0b2; } @media screen and (max-width: 767px) { .<API key> .table-striped.table-mc-orange > tbody > tr > td, .<API key> .table-striped.table-mc-orange > tbody > tr:nth-child(odd) { background-color: #fff; } .<API key> .table-striped.table-mc-orange > tbody > tr > td:nth-child(odd) { background-color: #fff3e0; } .<API key> .table-hover.table-mc-orange > tbody > tr:hover > td, .<API key> .table-hover.table-mc-orange > tbody > tr:hover { background-color: #fff; } .<API key> .table-hover.table-mc-orange > tbody > tr > td:hover { background-color: #ffe0b2; } } .table-striped.<API key> > tbody > tr:nth-child(odd) > td, .table-striped.<API key> > tbody > tr:nth-child(odd) > th { background-color: #fbe9e7; } .table-hover.<API key> > tbody > tr:hover > td, .table-hover.<API key> > tbody > tr:hover > th { background-color: #ffccbc; } @media screen and (max-width: 767px) { .<API key> .table-striped.<API key> > tbody > tr > td, .<API key> .table-striped.<API key> > tbody > tr:nth-child(odd) { background-color: #fff; } .<API key> .table-striped.<API key> > tbody > tr > td:nth-child(odd) { background-color: #fbe9e7; } .<API key> .table-hover.<API key> > tbody > tr:hover > td, .<API key> .table-hover.<API key> > tbody > tr:hover { background-color: #fff; } .<API key> .table-hover.<API key> > tbody > tr > td:hover { background-color: #ffccbc; } } .new{ color: #49c4d5; background-color: white; border: 1px solid #49c4d5; font-weight: 400; margin-left: 10px; } .page-link{ color: rgb(157, 157, 157) !important; font-size: 10px; } </style> <div class="container" ng-controller="consultation" ng-init="uid='<?=$uid?>';init()"> <div class="row" style="max-width:1000px; margin:auto; margin-bottom:70px;"> <div class="col-xs-12 "> <table id="table" class="table table-hover table-mc-light-blue" > <thead> <tr> <th class="hidden-xs">Num</th> <th>Title</th> <th class="hidden-xs">Author</th> <th>Date</th> </tr> </thead> <tbody> <tr ng-repeat="i in consultList" ng-click="openConsult(i)" style="color:#9d9d9d"> <td data-title="Number" style="width:50px;" class="hidden-xs">{{$index+(start)+1}}</td> <td data-title="Title" style="color:#525252">{{i.TITLE}} ({{i.count}}) <div class="label label-default new" ng-show="i.TIME|new">new</div></td> <td data-title="Author" class="hidden-xs" style="width:150px;"> {{i.AUTHOR}} </td> <td data-title="Date" style="width:150px;"> {{i.TIME|Cdate}} </td> </tr> </tbody> </table> </div> <div class="col-xs-12" style="text-align:center"> <ul class="pagination"> <!-- <li class="page-item"> <a class="page-link" href="#" aria-label="Previous"> <span aria-hidden="true">&laquo;</span> <span class="sr-only">Previous</span> </a> </li> <li class="page-item" ng-repeat="i in consultRange"> <a class="page-link" ng-click="goConsult(i)">{{i}}</a> </li> <!-- <li class="page-item"> <a class="page-link" href="#" aria-label="Next"> <span aria-hidden="true">&raquo;</span> <span class="sr-only">Next</span> </a> </li> </ul> </div> <div class="col-xs-12"> <div onclick="$('#write_new').modal('show')" class="pull-right banner-button" >WRITE </div> </div> </div> <div class="modal fade" id="write_new" tabindex="-1" role="dialog" aria-labelledby="" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-body" style="padding:0"> <div class="row" > <div class="col-xs-12"> <div class="well" ng-init="consult={}" style="margin-bottom:0;"> <!-- <div class="text-center page-title"> <span >Consultation</span> </div> <div class="form-group has-feedback-none <API key>"> <input type="text" class="placeholder form-control no-border" placeholder="Name" ng-model="consult.author" /> </div> <div class="form-group has-feedback-none <API key>"> <input type="text" class="placeholder form-control no-border" placeholder="Title" ng-model="consult.title" /> </div> <div class="form-group has-feedback-none <API key>"> <input type="password" class=" placeholder form-control no-border" placeholder="Password" ng-model="consult.password"/> </div> <div class="form-group has-feedback-none <API key>"> <textarea style="resize:none;border:none;"class="placeholder form-control" rows="5" style="border:none; box-shadow:none;" placeholder="Message" ng-model="consult.body" ></textarea> </div> <div class="btn btnForm btn-block" ng-click="consultForm(consult)">SEND</div> </div> </div> </div> </div> </div> </div> </div> </div>
const AppError = require('../../../lib/errors/app') const assert = require('assert') function doSomethingBad () { throw new AppError('app error message') } it('Error details', function () { try { doSomethingBad() } catch (err) { assert.strictEqual( err.name, 'AppError', "Name property set to error's name" ) assert( err instanceof AppError, 'Is an instance of its class' ) assert( err instanceof Error, 'Is instance of built-in Error' ) assert( require('util').isError(err), 'Should be recognized by Node.js util#isError' ) assert( err.stack, 'Should have recorded a stack' ) assert.strictEqual( err.toString(), 'AppError: app error message', 'toString should return the default error message formatting' ) assert.strictEqual( err.stack.split('\n')[0], 'AppError: app error message', 'Stack should start with the default error message formatting' ) assert.strictEqual( err.stack.split('\n')[1].indexOf('doSomethingBad'), 7, 'The first stack frame should be the function where the error was thrown' ) } })
require 'spec_helper' describe Blogitr::Document do def parse text, filter=:html @doc = Blogitr::Document.new :text => text, :filter => filter end def should_parse_as headers, body, extended=nil @doc.headers.should == headers @doc.body.should == body @doc.extended.should == extended end it "should raise an error if an unknown fitler is specified" do lambda do parse "foo *bar* \"baz\"", :unknown end.should raise_error(Blogitr::UnknownFilterError) end it "should parse documents with a YAML header" do parse <<EOD title: My Doc subtitle: An Essay foo bar EOD should_parse_as({ 'title' => "My Doc", 'subtitle' => 'An Essay' }, "foo\n\nbar\n") end it "should parse documents without a YAML header" do parse "foo\nbar\nbaz" should_parse_as({}, "foo\nbar\nbaz") end it "should parse documents with a YAML header but no body" do parse "title: My Doc" should_parse_as({ 'title' => "My Doc" }, '') end it "should separate extended content from the main body" do parse <<EOD foo <!--more bar EOD should_parse_as({}, "foo", "bar\n") end it "should expand macros" do input = "title: Foo\n\n<macro:example foo=\"bar\">baz</macro:example>" parse input should_parse_as({'title' => "Foo"}, "Options: {\"foo\"=>\"bar\"}\nBody: baz") end it "should provide access to raw body and extended content" do parse "*foo*\n<!--more-->\n_bar_", :textile @doc.raw_body.should == "*foo*" @doc.raw_extended.should == "_bar_" end describe "with a :textile filter" do it "should filter content" do parse "foo *bar*\n<!--more-->\n\"baz\"", :textile should_parse_as({}, "<p>foo <strong>bar</strong></p>", "<p>&#8220;baz&#8221;</p>") end it "should protect expanded macros from filtering" do text = "\n<macro:example>*foo*</macro:example>" parse text, :textile should_parse_as({}, "Options: {}\nBody: *foo*") end end describe "with a :markdown filter" do it "should filter content" do parse "foo *bar* \"baz\"", :markdown should_parse_as({}, "<p>foo <em>bar</em> &ldquo;baz&rdquo;</p>\n") end it "should protect expanded macros from filtering" do text = "\n<macro:example>*foo*</macro:example>" parse text, :markdown should_parse_as({}, "<div class=\"raw\">Options: {}\nBody: *foo*</div>\n\n") end end describe "#to_s" do def should_serialize_as headers, body, extended, serialized opts = { :headers => headers, :raw_body => body, :raw_extended => extended, :filter => :html } Blogitr::Document.new(opts).to_s.should == serialized end it "should serialize documents with headers" do should_serialize_as({'title' => 'Foo'}, "_Bar_.", nil, "title: Foo\n\n_Bar_.") end it "should serialize documents without headers" do should_serialize_as({}, "_Bar_.", nil, "\n_Bar_.") end it "should serialize extended content using \\<!--more should_serialize_as({}, "Bar.", "_Baz_.", "\nBar.\n<!--more-->\n_Baz_.") end end end
<?php namespace Grupo3TallerUNLP\ConfiguracionBundle\Tests\Controller; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; class <API key> extends WebTestCase { /* public function <API key>() { // Create a new client to browse the application $client = static::createClient(); // Create a new entry in the database $crawler = $client->request('GET', '/configuracion/'); $this->assertEquals(200, $client->getResponse()->getStatusCode(), "Unexpected HTTP status code for GET /configuracion/"); $crawler = $client->click($crawler->selectLink('Create a new entry')->link()); // Fill in the form and submit it $form = $crawler->selectButton('Create')->form(array( '<API key>[field_name]' => 'Test', // ... other fields to fill )); $client->submit($form); $crawler = $client->followRedirect(); // Check data in the show view $this->assertGreaterThan(0, $crawler->filter('td:contains("Test")')->count(), 'Missing element td:contains("Test")'); // Edit the entity $crawler = $client->click($crawler->selectLink('Edit')->link()); $form = $crawler->selectButton('Update')->form(array( '<API key>[field_name]' => 'Foo', // ... other fields to fill )); $client->submit($form); $crawler = $client->followRedirect(); // Check the element contains an attribute with value equals "Foo" $this->assertGreaterThan(0, $crawler->filter('[value="Foo"]')->count(), 'Missing element [value="Foo"]'); // Delete the entity $client->submit($crawler->selectButton('Delete')->form()); $crawler = $client->followRedirect(); // Check the entity has been delete on the list $this->assertNotRegExp('/Foo/', $client->getResponse()->getContent()); } */ }
## iScript : > *[L]* *[W]* *[LW]* linux, windows, linuxwindows > ***windowsbabun (https: - *[L]* [xiami.py](#xiami.py) - (xiami.com) - *[L]* [pan.baidu.com.py](#pan.baidu.com.py) - - *[L]* [bt.py](#bt.py) - magnet torrent .. - *[L]* [115.py](#115.py) - 115 - *[L]* [yunpan.360.cn.py](#yunpan.360.cn.py) - 360 - *[L]* [music.baidu.com.py](#music.baidu.com.py) - (music.baidu.com) - *[L]* [music.163.com.py](#music.163.com.py) - (music.163.com) - *[L]* [flvxz_cl.py](#flvxz_cl.py) - flvxz.com client - - *[L]* [tumblr.py](#tumblr.py) - tumblr.com - *[L]* [unzip.py](#unzip.py) - linuxunzip - *[L]* [ed2k_search.py](#ed2k_search.py) - donkey4u.com emule - *[L]* [91porn.py](#91porn.py) - 91porn - *[L]* [<API key>.user.js]( - <a name="xiami.py"></a> xiami.py - (xiami.com) 1. wget python2-requests (https://github.com/kennethreitz/requests) python2-mutagen (https://code.google.com/p/mutagen/) mpv (http://mpv.io) 2. xm login **** xm logintaobao **cookiescookies** **vip** MP3id3 tags cookies ~/.Xiami.cookies : > 1Enter2Enter : g login login username login username password gt logintaobao logintaobao username logintaobao username password signout d download url1 url2 .. p play url1 url2 .. s save url1 url2 .. : -p, --play play with mpv -d, --undescription disk -f num, --from_ num num -t TAGS, --tags TAGS tags,, eg: -t piano,cello,guitar -n, --undownload ,MP3id3 tags 3. \# xm xiami.py (alias xm='python2 /path/to/xiami.py') xm g xm login xm login username xm login username password xm signout xm d http: xm d http: xm d http: # , Top 20 , radio xm d http: # , , radio xm d http: xm d http: # genre, radio xm d http: xm d http: : # url xm p url : xm s http: xm s -t 'tag1,tag 2,tag 3' http: xm s http: xm s http: 4. : > http://kanoha.org/2011/08/30/<API key>/ > http: > https://gist.github.com/lepture/1014329 > : https://github.com/ly0/xiami-tools <a name="pan.baidu.com.py"></a> pan.baidu.com.py - 1. wget, aria2 python2-requests (https://github.com/kennethreitz/requests) requests-toolbelt (https://github.com/sigmavirus24/requests-toolbelt) mpv (http://mpv.io) mplayer # linuxmpvwmvmplayer 2. bp login **** wget, -a numaria2 -R / c () 2T cookies ~/.bp.cookies ~/.bp.pickle : > 1Enter2Enter <a name="cmd"></a> : **!! ** g login login username login username password userdelete ud userchange uc user p play url1 url2 .. path1 path2 .. u upload localpath remotepath s save url remotepath [-s secret] d download url1 url2 .. path1 path2 .. (cwd) d download url1 url2 .. path1 path2 .. -R (cwd) # d /path/to/download -R *download* (cwd) # d /path/to/download/ -R *download* (cwd) md mkdir path1 path2 .. rn rename path new_path rm remove path1 path2 .. mv move path1 path2 .. /path/to/directory cp copy path /path/to/directory_or_file cp copy path1 path2 .. /path/to/directory rnr rnre foo bar dir1 dir2 .. -I re1 re2 .. rmr rmre dir1 dir2 .. -E re1 re2 .. mvr mvre dir1 dir2 .. /path/to/dir -H head1 head2 .. cpr cpre dir1 dir2 .. /path/to/dir -T tail1 tail2 .. # rmr, mvr, cpr -t, -I, -E, -H, -T # -I, -E, -H, -T -t f -t d # rnr foo bar regex # -y, --yes # rmr / -I '.*' -y # bt.pybase64 rnr /path/to/decode1 /path/to/decode2 .. -t f,bd64 f find keyword1 keyword2 .. [directory] ff keyword1 keyword2 .. [directory] ft keyword1 keyword2 .. [directory] by time ftt keyword1 keyword2 .. [directory] by time fs keyword1 keyword2 .. [directory] by size fss keyword1 keyword2 .. [directory] by size fn keyword1 keyword2 .. [directory] by name fnn keyword1 keyword2 .. [directory] by name f 'ice and fire' /doc -R # -t all f keyword1 keyword2 .. [directory] -t all -R f keyword1 keyword2 .. [directory] -t f,all -R # directory / # -H, -T, -I, -E # -I, -E, -H, -T , f keyword1 keyword2 ... [directory] -H head -T tail -I "re(gul.*) ex(p|g)ress$" f keyword1 keyword2 ... [directory] -H head -T tail -E "re(gul.*) ex(p|g)ress$" # ( donwload, play, rnre, rm, mv) f keyword1 keyword2 .. [directory] \| d -R ftt keyword1 keyword2 .. [directory] \| p -R (by time ) f keyword1 keyword2 .. [directory] \| rnr foo bar -R rename by regex f keyword1 keyword2 .. [directory] \| rm -R -T tail f keyword1 keyword2 .. [directory] \| mv /path/to -R l path1 path2 .. ls by name ll path1 path2 .. ls by name ln path1 path2 .. ls by name lnn path1 path2 .. ls by name lt path1 path2 .. ls by time ltt path1 path2 .. ls by time ls path1 path2 .. ls by size lss path1 path2 .. ls by size l /doc/books /videos l path1 path2 .. -t f ls files l path1 path2 .. -t d ls directorys # -H, -T, -I, -E # -I, -E, -H, -T , l path1 path2 .. -H head -T tail -I "^re(gul.*) ex(p|g)ress$" l path1 path2 .. -H head -T tail -E "^re(gul.*) ex(p|g)ress$" # size, md5 l path1 path2 .. -v l path1 path2 -t e,d l path1 path2 -t ne,d du path1 path2 .. *()* du path1 path2 .. -R *()* # l path1 path2 .. -t du [-R] du /doc /videos -R a add http https ftp ed2k .. remotepath a add magnet .. remotepath [-t {m,i,d,p}] a add remote_torrent .. [-t {m,i,d,p}] # torrent j job jd jobdump jc jobclear taskid1 taskid2 .. jca jobclearall : -a num, --aria2c num aria2c: eg: -a 10 -p, --play play with mpv -y, --yes yes # rmre, mvre, cpre, -q, --quiet -v, --view view detail eg: a magnet /path -v d -p url1 url2 .. -v l path1 path2 .. -v # size, md5 -s SECRET, --secret SECRET -f number, --from_ number (download, play)eg: p /video -f 42 -t ext, --type_ ext , “,” eg: l -t f l -t d l -t du l -t e,d f -t all a -t m,d,p,a u -t r # rapidupload u -t e # (md5) u -t r,e -l amount, --limit amount eg: -l 100k -m {o,c}, --uploadmode {o,c} : o -R, --recursive , download, play, ls, find, rmre, rnre, rmre, cpre -H HEADS, --head HEADS eg: -H Headishere -T TAILS, --tail TAILS eg: -T Tailishere -I INCLUDES, --include INCLUDES , eg: -I "*.mp3" -E EXCLUDES, --exclude EXCLUDES , eg: -E "*.html" -c {on, off}, --ls_color {on, off} ls on # -t, -H, -T, -I, -E download, play, ls, find, rnre, rmre, cpre, mvre 3. \# bp pan.baidu.com.py (alias bp='python2 /path/to/pan.badiu.com.py') : bp g bp login bp login username bp login username password # bp login : bp ud : bp uc : bp user : bp d http://pan.baidu.com/disk/home bp d /path/to/filename1 /path/to/filename2 .. bp d -R http://pan.baidu.com/disk/home bp d -R /path/to/directory1 /path/to/directory2 .. # .mp3 bp d -R /path/to/directory1 /path/to/directory2 .. -T .mp3 bp d /path/to/directory1 /path/to/directory2 .. bp d http://pan.baidu.com/s/1o6psfnxx .. bp d http://pan.baidu.com/share/link?shareid=1622654699&uk=1026372002&fid=2112674284 .. bp d http://pan.baidu.com/s/1i3FVlw5 -s vuej # aria2 bp d http://pan.baidu.com/s/1i3FVlw5 -s vuej -a 5 bp d /movie/her.mkv -a 4 bp d url -s [secret] -a 10 : bp p /movie/her.mkv bp p http://pan.baidu.com/s/xxxxxxxxx -s [secret] bp p /movie -R # /movie : bp a http://mirrors.kernel.org/archlinux/iso/latest/archlinux-2014.06.01-dual.iso /path/to/save bp a https://github.com/PeterDing/iScript/archive/master.zip /path/to/save bp a ftp://ftp.netscape.com/testfile /path/to/save bp a 'magnet:?xt=urn:btih:<SHA1-like>' /path/to/save -v -t a bp a 'ed2k://|file|[]PDF.rar|547821118|<API key>|/' /path/to/save bp a /path/to/a.torrent .. -v -t m,i # torrent/path/to ↓ torrent magnet -t m # (), : mkv, avi ..etc -t i # , : jpg, png ..etc -t d # , : pdf, doc, docx, epub, mobi ..etc -t p # , : rar, zip ..etc -t a m, i, d, p, a (,), : -t m,i,d -t d,p -t i,p remotepath / bp a 'magnet:?xt=urn:btih:<SHA1-like>' /path/to/save -v -t p,d bp a /download/a.torrent -v -t m,i,d # torrent/download : bp j bp j 3482938 8302833 bp jd bp jc taskid1 taskid2 .. bp jc 1208382 58239221 .. bp jca : bp u ~/Documents/reading/\ by\ .mobi /doc -m o # -m o --> # -m c --> () """ 120 """
export default { cache: function (state, payload) { state.apiCache[payload.api_url] = payload.api_response; }, addConfiguredType: function (state, type) { state.configuredTypes.push(type); }, <API key>: function (state, index) { state.configuredTypes.splice(index, 1); }, <API key>: function (state, type) { for (var i = 0, len = state.configuredTypes.length; i < len; i++) { if (state.configuredTypes[i].name === type.name) { state.configuredTypes.splice(i, 1); state.configuredTypes.push(type); // Avoid too keep looping over a spliced array return; } } }, <API key>: function (state, types) { state.baseTypes = types; }, <API key>: function (state, types) { state.configuredTypes = types; } };
- EventUtil - EventTarget - dragdrop ** absolute relative**mousemoveleft top mousedown/mouseup
.PHONY: build clean build: .obj/<API key> clean: rm -rf .obj .obj/%: %.cpp @mkdir -p .obj ${CXX} -std=c++0x $^ -o $@ -I ../..
package com.korpisystems.SimpleANN import org.scalatest.FunSuite class ANNTest extends FunSuite { test("ANN learns non-linear XOR properly") { val inputs: ExpectedValues = List( List(1, 1) , List(0, 1) , List(1, 0) , List(0, 0) ) val expected_out: ExpectedValues = List( List(0) , List(1) , List(1) , List(0) ) val ann = new ANN(List(2, 4, 1), 1.0) ann.train(inputs, expected_out, iter=5000) val xor_1_1 = ann.getOutput(inputs(0))(0) assert(xor_1_1 < 0.04) val xor_0_1 = ann.getOutput(inputs(1))(0) assert(xor_0_1 > 0.96) val xor_1_0 = ann.getOutput(inputs(2))(0) assert(xor_1_0 > 0.96) val xor_0_0 = ann.getOutput(inputs(3))(0) assert(xor_0_0 < 0.04) } test("ANN learns XOR with multiple hidden layers") { val inputs: ExpectedValues = List( List(1, 1) , List(0, 1) , List(1, 0) , List(0, 0) ) val expected_out: ExpectedValues = List( List(0) , List(1) , List(1) , List(0) ) val ann = new ANN(List(2, 4, 3, 1), 1.0) ann.train(inputs, expected_out, iter=5000) val xor_1_1 = ann.getOutput(inputs(0))(0) assert(xor_1_1 < 0.04) val xor_0_1 = ann.getOutput(inputs(1))(0) assert(xor_0_1 > 0.96) val xor_1_0 = ann.getOutput(inputs(2))(0) assert(xor_1_0 > 0.96) val xor_0_0 = ann.getOutput(inputs(3))(0) assert(xor_0_0 < 0.04) } test("ANN learns first input is output") { val inputs: ExpectedValues = List( List(1, 1) , List(0, 1) , List(1, 0) , List(0, 0) ) val expected_out: ExpectedValues = List( List(1) , List(0) , List(1) , List(0) ) val ann = new ANN(List(2, 4, 1), 1.0) ann.train(inputs, expected_out, iter=5000) val first_1_1 = ann.getOutput(inputs(0))(0) assert(first_1_1 > 0.96) val first_0_1 = ann.getOutput(inputs(1))(0) assert(first_0_1 < 0.04) val first_1_0 = ann.getOutput(inputs(2))(0) assert(first_1_0 > 0.96) val first_0_0 = ann.getOutput(inputs(3))(0) assert(first_0_0 < 0.04) } test("ANN learns second input is output") { val inputs: ExpectedValues = List( List(1, 1) , List(0, 1) , List(1, 0) , List(0, 0) ) val expected_out: ExpectedValues = List( List(1) , List(1) , List(0) , List(0) ) val ann = new ANN(List(2, 4, 1), 1.0) ann.train(inputs, expected_out, iter=5000) val first_1_1 = ann.getOutput(inputs(0))(0) assert(first_1_1 > 0.96) val first_0_1 = ann.getOutput(inputs(1))(0) assert(first_0_1 > 0.96) val first_1_0 = ann.getOutput(inputs(2))(0) assert(first_1_0 < 0.04) val first_0_0 = ann.getOutput(inputs(3))(0) assert(first_0_0 < 0.04) } test("<API key> thrown properly") { val inputs: ExpectedValues = List( List(1, 1) , List(0, 1) , List(1, 0) , List(0, 0) ) val expected_out: ExpectedValues = List( List(1) , List(0) , List(1) ) val ann = new ANN(List(2, 4, 1), 1.0) intercept[Exceptions.<API key>] { ann.train(inputs, expected_out, iter=5000) } } }
// This file is required by karma.conf.js and loads recursively all the .spec and framework files import 'zone.js/testing'; import { getTestBed } from '@angular/core/testing'; import { <API key>, <API key> } from '@angular/<API key>/testing'; declare const require: any; // First, initialize the Angular testing environment. getTestBed().initTestEnvironment( <API key>, <API key>() ); // Then we find all the tests. const context = require.context('./', true, /\.spec\.ts$/); // And load the modules. context.keys().map(context);
/* @author Axel Anceau - 2014 Package api contains general tools */ package api import ( "fmt" "github.com/revel/revel" "runtime/debug" ) /* PanicFilter renders a panic as JSON @see revel/panic.go */ func PanicFilter(c *revel.Controller, fc []revel.Filter) { defer func() { if err := recover(); err != nil && err != "HttpException" { error := revel.NewErrorFromPanic(err) if error == nil { revel.ERROR.Print(err, "\n", string(debug.Stack())) c.Response.Out.WriteHeader(500) c.Response.Out.Write(debug.Stack()) return } revel.ERROR.Print(err, "\n", error.Stack) c.Result = HttpException(c, 500, fmt.Sprint(err)) } }() fc[0](c, fc[1:]) }
<!DOCTYPE html> <html xmlns="http: <head> <title>Tree View</title> <link href="01.tree-view.css" rel="stylesheet" /> </head> <body> <nav> <ul class="first"> <li> <a href="#">List Item</a> <ul> <li> <a href="#">Sublist item</a> </li> <li> <a href="#">Sublist item</a> </li> <li> <a href="#">Sublist item</a> </li> <li> <a href="#">Sublist item</a> </li> </ul> </li> <li> <a href="#">List Item</a> <ul> <li> <a href="#">Sublist item</a> </li> <li> <a href="#">Sublist item</a> </li> </ul> </li> <li> <a href="#">List Item</a> <ul> <li> <a href="#">Sublist item</a> </li> <li> <a href="#">Sublist item</a> </li> <li> <a href="#">Sublist item</a> </li> </ul> </li> <li> <a href="#">List Item</a> <ul> <li> <a href="#">Sublist item</a> </li> </ul> </li> </ul> </nav> </body> </html>
layout: post author: nurahill title: "Nura's Clicky turtle excercise" Here is my code for option 1: <iframe src="https://trinket.io/embed/python/3c8744a1ac" width="100%" height="600" frameborder="0" marginwidth="0" marginheight="0" allowfullscreen></iframe> On option one, as usual, it took me a bit to come up with an idea of a program for this one. I ended up deciding to draw a ground and sky. on lines 38-46 i created my clicky funtion. I made it so if tinas y coordinate of the place you click on is greater than -152 it would draw a star (on the sky), and if it was less than it would draw a flower (on the ground). My helper functions are the star and flower. Here is my code for option 2: <iframe src="https://trinket.io/embed/python/b8a6b80918" width="100%" height="600" frameborder="0" marginwidth="0" marginheight="0" allowfullscreen></iframe> I wasnt able to get to do a whole lot with option two. I bascially was just able to make it work, as it took me sometime to get it working properly. I created the list of colors so by clicking on shift, the turle color would change to different colors. Below is where i was able to use randint to make it choose a random color. where it says [randint(0,len(color)-1)] it means that I want it to pick a random color (randint) from 0 to the length of color, -1 (-1 makes sure that it never picks a color out of range) # Define a function to change the color def color_change(): tina.color(colors[randint(0,len(colors)-1)]) I feel like this excersice was a good foundation to build on futher in the future. Its pretty cool to able to manipulate the turtle with the keyboard and make it draw things. I particularly like that penup and pendown part that i created (wich you can turn on or off by clicking 'u') becaue that gave me the ability to draw things (like a square, triabgle, etc.). Th e penup/pendown was my something creative!
<?php namespace SCL\ZF2\Currency\Form\Fieldset; use Zend\Form\Fieldset; class TaxedPrice extends Fieldset { const AMOUNT_LABEL = 'Amount'; const TAX_LABEL = 'Tax'; public function init() { $this->add([ 'name' => 'amount', 'type' => 'text', 'options' => [ 'label' => self::AMOUNT_LABEL, ] ]); $this->add([ 'name' => 'tax', 'type' => 'text', 'options' => [ 'label' => self::TAX_LABEL, ] ]); } }
var indexController = require('./controllers/cIndex'); var usuarioController = require('./controllers/cUsuario'); var clientesController = require('./controllers/cCliente'); var adminController = require('./controllers/cAdmin'); var umedController = require('./controllers/cUmed'); var matepController = require('./controllers/cMatep'); var empleController = require('./controllers/cEmple'); var accesosController = require('./controllers/cAccesos'); var cargoController = require('./controllers/cCargos'); var reactoController = require('./controllers/cReacto'); var lineasController = require('./controllers/cLineas'); var prodController = require('./controllers/cProd'); var envasesController = require('./controllers/cEnvases'); var tanquesController = require('./controllers/cTanques'); var ubicaController = require('./controllers/cUbica'); var recetaController = require('./controllers/cReceta'); var remitosController = require('./controllers/cRemitos'); var progController = require('./controllers/cProgramacion'); var <API key> = require('./controllers/cFormEnReactor'); var labController = require('./controllers/cLab'); var formController = require('./controllers/cFormulados'); var mEventos = require('./models/mEventos'); var consuController = require('./controllers/cConsumibles'); var <API key> = require('./controllers/cProduccion'); var <API key> = require('./controllers/cFraccionado'); var <API key> = require('./controllers/cAprobacion'); var navesController = require('./controllers/cNaves'); var mapaController = require('./controllers/cMapa'); function logout (req, res) { fecha = new Date(); day = fecha.getDate(); month = fecha.getMonth(); if (day<10) day = "0" + day; if (month<10) month = "0" + month; fecha = fecha.getFullYear() + "/"+month+"/"+day+" "+fecha.getHours()+":"+fecha.getMinutes() mEventos.add(req.session.user.unica, fecha, "Logout", "", function(){ }); req.session = null; return res.redirect('/'); } // Verifica que este logueado function auth (req, res, next) { if (req.session.auth) { return next(); } else { console.log("dentro del else del auth ") return res.redirect('/') } } module.exports = function(app) { app.get('/', adminController.getLogin); app.get('/login', adminController.getLogin) app.post('/login', adminController.postLogin); app.get('/logout', logout); app.get('/inicio', auth, indexController.getInicio); app.get('/error', indexController.getError); //ayuda app.get('/ayuda', indexController.getAyuda); app.get('/ayudaver/:id', indexController.AyudaVer); //novedades app.get('/listanovedades', indexController.getNovedades); //usuarios app.get('/usuarioslista', auth, usuarioController.getUsuarios); app.get('/usuariosalta', auth, usuarioController.getUsuariosAlta); app.post('/usuariosalta', auth, usuarioController.putUsuario); app.get('/usuariosmodificar/:id', auth, usuarioController.getUsuarioModificar); app.post('/usuariosmodificar', auth, usuarioController.<API key>); app.get('/usuariosborrar/:id', auth, usuarioController.getDelUsuario); //configurar accesos app.get('/accesoslista/:id', auth, accesosController.getAccesos); app.post('/accesoslista', auth, accesosController.postAccesos); //clientes app.get('/clienteslista', auth, clientesController.getClientes); app.get('/clientesalta', auth, clientesController.getClientesAlta); app.post('/clientesalta', auth, clientesController.putCliente); app.get('/clientesmodificar/:id', auth, clientesController.getClienteModificar); app.post('/clientesmodificar', auth, clientesController.<API key>); app.get('/clientesborrar/:id', auth, clientesController.getDelCliente); app.get('/:cliente/materiasprimas', auth, clientesController.getMatep); //unidades de medida "umed" app.get('/umedlista', auth, umedController.getAllUmed); app.get('/umedalta', auth, umedController.getAlta); app.post('/umedalta', auth, umedController.postAlta); app.get('/umedmodificar/:id', auth, umedController.getModificar); app.post('/umedactualizar', auth, umedController.postModificar); app.get('/umedborrar/:id', auth, umedController.getDelUmed); //materias primas por cliente app.get('/mateplista/:cdcliente', auth, matepController.<API key>); app.get('/matepalta/:cdcliente', auth, matepController.getAlta); app.post('/matepalta', auth, matepController.postAlta); app.get('/matepmodificar/:id', auth, matepController.getModificar); app.post('/matepmodificar', auth, matepController.postModificar); app.get('/matepborrar/:id', auth, matepController.getDelMatep); //cantidad maxima en tanque por matep app.get('/formenreactor/:id', auth, <API key>.getFormEnReactor); app.get('/formenreactoralta/:idform', auth, <API key>.getAlta); app.post('/formenreactoralta', auth, <API key>.postAlta); app.get('/<API key>/:id', auth, <API key>.getModificar); app.post('/<API key>', auth, <API key>.postModificar); app.get('/formenreactorborrar/:id', auth, <API key>.del); //producto por clientereactor app.get('/prodlista/:cdcliente', auth, prodController.<API key>); app.get('/prodalta/:cdcliente', auth, prodController.getAlta); app.post('/prodalta', auth, prodController.postAlta); app.get('/prodmodificar/:id', auth, prodController.getModificar); app.post('/prodmodificar', auth, prodController.postModificar); app.get('/prodborrar/:id', auth, prodController.getDelProd); app.get('/:idprod/ablote', auth, prodController.getAbLote); //empleados app.get('/emplelista', auth, empleController.getEmpleados); app.get('/emplealta', auth, empleController.getAlta); app.post('/emplealta', auth, empleController.postAlta); app.get('/emplemodificar/:codigo', auth, empleController.getModificar); app.post('/emplemodificar', auth, empleController.postModificar); app.get('/empleborrar/:codigo', auth, empleController.getDelEmple); //cargos de empleados app.get('/cargoslista', auth, cargoController.getAllCargos); app.get('/cargosalta', auth, cargoController.getAlta); app.post('/cargosalta', auth, cargoController.postAlta); app.get('/cargosmodificar/:id', auth, cargoController.getModificar); app.post('/cargosmodificar', auth, cargoController.postModificar); app.get('/cargosborrar/:id', auth, cargoController.getDelCargo); //reactores app.get('/reactolista', auth, reactoController.getAll); app.get('/reactoalta', auth, reactoController.getAlta); app.post('/reactoalta', auth, reactoController.postAlta); app.get('/reactomodificar/:id', auth, reactoController.getModificar); app.post('/reactomodificar', auth, reactoController.postModificar); app.get('/reactoborrar/:id', auth, reactoController.getDel); //lineas app.get('/lineaslista', auth, lineasController.getAll); app.get('/lineasalta', auth, lineasController.getAlta); app.post('/lineasalta', auth, lineasController.postAlta); app.get('/lineasmodificar/:id', auth, lineasController.getModificar); app.post('/lineasmodificar', auth, lineasController.postModificar); app.get('/lineasborrar/:id', auth, lineasController.getDel); //envases app.get('/envaseslista', auth, envasesController.getAll); app.get('/envasesalta', auth, envasesController.getAlta); app.post('/envasesalta', auth, envasesController.postAlta); app.get('/envasesmodificar/:id', auth, envasesController.getModificar); app.post('/envasesmodificar', auth, envasesController.postModificar); app.get('/envasesborrar/:id', auth, envasesController.getDel); app.get('/capacidadenvase/:id', auth, envasesController.getCapacidad); //tanques app.get('/tanqueslista', auth, tanquesController.getAll); app.get('/tanquesalta', auth, tanquesController.getAlta); app.post('/tanquesalta', auth, tanquesController.postAlta); app.get('/tanquesmodificar/:id', auth, tanquesController.getModificar); app.post('/tanquesmodificar', auth, tanquesController.postModificar); app.get('/tanquesborrar/:id', auth, tanquesController.getDel); //ubicaciones "ubica" app.get('/ubicalista', auth, ubicaController.getAll); app.get('/ubicaalta', auth, ubicaController.getAlta); app.post('/ubicaalta', auth, ubicaController.postAlta); app.get('/ubicamodificar/:id', auth, ubicaController.getModificar); app.post('/ubicamodificar', auth, ubicaController.postModificar); app.get('/ubicaborrar/:id', auth, ubicaController.getDel); //recetas app.get('/recetalista/:id', auth, recetaController.<API key>); app.get('/recetaalta/:id', auth, recetaController.getAlta); app.post('/recetaalta', auth, recetaController.postAlta); app.get('/recetaborrar/:id', auth, recetaController.getDel); app.get('/recetamodificar/:id', auth, recetaController.getModificar); app.post('/recetamodificar', auth, recetaController.postModificar); //remitos app.get('/remitoslista', auth, remitosController.getAll); app.get('/remitosalta', auth, remitosController.getAlta); app.post('/remitosalta', auth, remitosController.postAlta); app.get('/remitosmodificar/:id', auth, remitosController.getModificar); app.post('/remitosmodificar', auth, remitosController.postModificar); app.get('/remitosborrar/:id', auth, remitosController.getDel); app.get('/buscarremito/:finicio/:ffin', auth, remitosController.getRemitos); //programacion app.get('/prog1lista', auth, progController.getAll); app.get('/prog1alta', auth, progController.getAlta); app.post('/prog1alta', auth, progController.postAlta); app.get('/prog2lista', auth, progController.getLista); app.get('/prog1alta2/:idprog', auth, progController.getAlta2); app.post('/prog1alta2', auth, progController.postAlta2); app.get('/prog1/:lote/:anio/:clienteid/:prodid', auth, progController.getCodigo); app.get('/prog1borrar/:id', auth, progController.getDel); app.get('/refrescaremito/:idcliente/:idmatep', auth, progController.getRemitos); app.get('/traerpa/:idform', auth, progController.getPA); app.get('/<API key>/:fecha', auth, progController.getProgramaciones); app.get('/<API key>/:id', auth, progController.getDelProgram); //laboratorio app.get('/lab/:idremito', auth, labController.getLab); app.post('/lab', auth, labController.postLab); //formulados app.get('/formuladoalta/:cdcliente', auth, formController.getAlta); app.post('/formuladoalta', auth, formController.postAlta); app.get('/formuladolista/:cdcliente', auth, formController.<API key>); app.get('/formuladomodificar/:id', auth, formController.getModificar); app.post('/formuladomodificar', auth, formController.postModificar); app.get('/formuladoborrar/:id', auth, formController.getDelFormulado); app.get('/:id/formulados', auth, formController.getForms); app.get('/:idform/ablotee', auth, formController.getAbLote); //consumibles app.get('/consumibleslista/:idprod', auth, consuController.getAll); app.get('/consumiblesalta/:idprod', auth, consuController.getAlta); app.post('/consumiblesalta', auth, consuController.postAlta); app.get('/consumiblesborrar/:id', auth, consuController.getDel); //produccion app.get('/produccionlista', auth, <API key>.getLista); app.get('/<API key>/:fi/:ff', auth, <API key>.getProgramaciones); app.get('/produccionver/:id', auth, <API key>.getVerFormulado); app.post('/produccionver', auth, <API key>.postDatosFormulado); app.get('/produccionimprimir/:id', auth, <API key>.getImprimir); //borrar //fraccionado app.get('/fraccionadolista', auth, <API key>.getLista); app.get('/fraccionadoalta/:id', auth, <API key>.getAlta); app.post('/fraccionadoalta', auth, <API key>.postAlta); app.get('/<API key>/:id', auth, <API key>.getModificar); app.post('/<API key>', auth, <API key>.postModificar); //borrar? //aprobacion app.get('/aprobacionlista', auth, <API key>.getLista); app.get('/aprobacionver/:id', auth, <API key>.getVer); app.post('/aprobacionver', auth, <API key>.postVer); app.get('/aprobacionimprimir/:id', auth, <API key>.getImprimir); //naves app.get('/naveslista', auth, navesController.getLista); //mapa app.get('/mapaver', auth, mapaController.getMapa); };
<?php namespace AppBundle\Behat; use Sylius\Bundle\ResourceBundle\Behat\DefaultContext; class BrowserContext extends DefaultContext { /** * @Given estoy autenticado como :username con :password */ public function iAmAuthenticated($username, $password) { $this->getSession()->visit($this->generateUrl('<API key>', [], true)); $this->fillField('_username', $username); $this->fillField('_password', $password); $this->pressButton('_submit'); } /** * @Then /^presiono "([^"]*)" con clase "([^"]*)"$/ * * @param string $text * @param string $class */ public function <API key>($text, $class) { $link = $this->getSession()->getPage()->find(
## Close What is the value of the first triangle number to have over five hundred divisors? print max([len(m) for m in map(lambda k: [n for n in range(1,(k+1)) if k%n == 0], [sum(range(n)) for n in range(1,1000)])])
from errors import * from manager import SchemaManager
<?php namespace Syrma\WebContainer; interface ServerInterface { /** * Start the server. * * @param <API key> $context * @param <API key> $requestHandler */ public function start(<API key> $context, <API key> $requestHandler); /** * Stop the server. */ public function stop(); /** * The server is avaiable. * * Here check requirements * * @return bool */ public static function isAvaiable(); }
# Architecture When you are developing a new feature that requires architectural design, or if you are changing the fundamental design of an existing feature, make sure it is discussed with one of the Frontend Architecture Experts. A Frontend Architect is an expert who makes high-level Frontend design decisions and decides on technical standards, including coding standards and frameworks. Architectural decisions should be accessible to everyone, so please document them in the relevant Merge Request discussion or by updating our documentation when appropriate. You can find the Frontend Architecture experts on the [team page](https://about.gitlab.com/team). ## Examples You can find documentation about the desired architecture for a new feature built with Vue.js [here](vue.md).
module Mailchimp class API include HTTParty format :plain default_timeout 30 attr_accessor :api_key, :timeout, :throws_exceptions def initialize(api_key = nil, extra_params = {}) @api_key = api_key || ENV['MAILCHIMP_API_KEY'] || self.class.api_key @default_params = {:apikey => @api_key}.merge(extra_params) @throws_exceptions = false end def api_key=(value) @api_key = value @default_params = @default_params.merge({:apikey => @api_key}) end def base_api_url "https://#{dc_from_api_key}api.mailchimp.com/1.3/?method=" end def valid_api_key?(*args) "Everything's Chimpy!" == call("ping") end protected def call(method, params = {}) api_url = base_api_url + method params = @default_params.merge(params) timeout = params.delete(:timeout) || @timeout response = self.class.post(api_url, :body => CGI::escape(params.to_json), :timeout => timeout) begin response = JSON.parse(response.body) rescue response = JSON.parse('['+response.body+']').first end if @throws_exceptions && response.is_a?(Hash) && response["error"] raise "Error from MailChimp API: #{response["error"]} (code #{response["code"]})" end response end def method_missing(method, *args) method = method.to_s.gsub(/\/(.?)/) { "::#{$1.upcase}" }.gsub(/(?:^|_)(.)/) { $1.upcase } #Thanks for the gsub, Rails method = method[0].chr.downcase + method[1..-1].gsub(/aim$/i, 'AIM') call(method, *args) end class << self attr_accessor :api_key def method_missing(sym, *args, &block) new(self.api_key).send(sym, *args, &block) end end def dc_from_api_key (@api_key.nil? || @api_key.length == 0 || @api_key !~ /-/) ? '' : "#{@api_key.split("-").last}." end end end
Ti=Ownership sec=All {<API key>} furnished to {_the_Consultant} by {_the_Client} is the sole and exclusive property of {_the_Client} or its suppliers or customers. =[G/Z/ol/0]
#include <stdlib.h> #include <stdio.h> #include <string.h> #include <math.h> #include "Arduino.h" #include "Print.h" // Public Methods ////////////////////////////////////////////////////////////// /* default implementation: may be overridden */ size_t Print::write(const uint8_t *buffer, size_t size) { size_t n = 0; while (size n += write(*buffer++); } return n; } size_t Print::print(const __FlashStringHelper *ifsh) { return print(reinterpret_cast<const char *>(ifsh)); } size_t Print::print(const String &s) { return write(s.c_str(), s.length()); } size_t Print::print(const char str[]) { return write(str); } size_t Print::print(char c) { return write(c); } size_t Print::print(unsigned char b, int base) { return print((unsigned long) b, base); } size_t Print::print(int n, int base) { return print((long) n, base); } size_t Print::print(unsigned int n, int base) { return print((unsigned long) n, base); } size_t Print::print(long n, int base) { if (base == 0) { return write(n); } else if (base == 10) { if (n < 0) { int t = print('-'); n = -n; return printNumber(n, 10) + t; } return printNumber(n, 10); } else { return printNumber(n, base); } } size_t Print::print(unsigned long n, int base) { if (base == 0) return write(n); else return printNumber(n, base); } size_t Print::print(double n, int digits) { return printFloat(n, digits); } size_t Print::println(const __FlashStringHelper *ifsh) { size_t n = print(ifsh); n += println(); return n; } size_t Print::print(const Printable& x) { return x.printTo(*this); } size_t Print::println(void) { size_t n = print('\r'); n += print('\n'); return n; } size_t Print::println(const String &s) { size_t n = print(s); n += println(); return n; } size_t Print::println(const char c[]) { size_t n = print(c); n += println(); return n; } size_t Print::println(char c) { size_t n = print(c); n += println(); return n; } size_t Print::println(unsigned char b, int base) { size_t n = print(b, base); n += println(); return n; } size_t Print::println(int num, int base) { size_t n = print(num, base); n += println(); return n; } size_t Print::println(unsigned int num, int base) { size_t n = print(num, base); n += println(); return n; } size_t Print::println(long num, int base) { size_t n = print(num, base); n += println(); return n; } size_t Print::println(unsigned long num, int base) { size_t n = print(num, base); n += println(); return n; } size_t Print::println(double num, int digits) { size_t n = print(num, digits); n += println(); return n; } size_t Print::println(const Printable& x) { size_t n = print(x); n += println(); return n; } #include <stdarg.h> size_t Print::printf(const char *fmt, ...) { va_list args; char buf[256] = {0}; va_start(args, fmt); vsprintf(buf, fmt, args); va_end(args); return write(buf, strlen(buf)); } // Private Methods ///////////////////////////////////////////////////////////// size_t Print::printNumber(unsigned long n, uint8_t base) { char buf[8 * sizeof(long) + 1]; // Assumes 8-bit chars plus zero byte. char *str = &buf[sizeof(buf) - 1]; *str = '\0'; // prevent crash if called with base == 1 if (base < 2) base = 10; do { unsigned long m = n; n /= base; char c = m - base * n; *--str = c < 10 ? c + '0' : c + 'A' - 10; } while(n); return write(str); } size_t Print::printFloat(double number, uint8_t digits) { size_t n = 0; if (isnan(number)) return print("nan"); if (isinf(number)) return print("inf"); if (number > 4294967040.0) return print ("ovf"); // constant determined empirically if (number <-4294967040.0) return print ("ovf"); // constant determined empirically // Handle negative numbers if (number < 0.0) { n += print('-'); number = -number; } // Round correctly so that print(1.999, 2) prints as "2.00" double rounding = 0.5; for (uint8_t i=0; i<digits; ++i) rounding /= 10.0; number += rounding; // Extract the integer part of the number and print it unsigned long int_part = (unsigned long)number; double remainder = number - (double)int_part; n += print(int_part); // Print the decimal point, but only if there are digits beyond if (digits > 0) { n += print("."); } // Extract digits from the remainder one at a time while (digits { remainder *= 10.0; int toPrint = int(remainder); n += print(toPrint); remainder -= toPrint; } return n; }
import { Injectable } from '@angular/core'; class MyEvent{ private context:Object; private cbs: Function[] = []; constructor(context: Object){ this.context = context; } public addListener(cb: Function){ this.cbs.push(cb); } public removeListener(cb: Function){ let i = this.cbs.indexOf(cb); if (i >-1) { this.cbs.splice(i, 1); } } public removeAllListeners(){ this.cbs=[]; } public trigger(...args){ this.cbs.forEach(cb => cb.apply(this.context, args)) }; } class EventContainer{ private events: MyEvent[]= []; public createEvent(context:Object):MyEvent{ let myEvent = new MyEvent(context); this.events.push(myEvent); return myEvent; } public removeEvent(myEvent:MyEvent):void{ let i = this.events.indexOf(myEvent); if (i >-1) { this.events.splice(i, 1); } }; public trigger(...args):void{ this.events.forEach(event => event.trigger(args)); }; } class LoginEvent extends EventContainer{} class LogoutEvent extends EventContainer{} @Injectable() export class EventsService { private _loginEvent:LoginEvent; private _logoutEvent:LogoutEvent; constructor() {} get loginEvent():LoginEvent{ if(!this._loginEvent) { this._loginEvent = new LoginEvent(); } return this._loginEvent; } get logoutEvent():LogoutEvent{ if(!this._logoutEvent) { this._logoutEvent = new LogoutEvent(); } return this._logoutEvent; } }
import random from datetime import datetime from multiprocessing import Pool import numpy as np from scipy.optimize import minimize def worker_func(args): self = args[0] m = args[1] k = args[2] r = args[3] return (self.eval_func(m, k, r) - self.eval_func(m, k, self.rt) - self.temporal_diff_sum(m, k)) ** 2 def <API key>(args): """ The derivative of the optimized function with respect to the ith component of the vector r """ self = args[0] r = args[1] i = args[2] result = 0 M = len(self.data) for m in range(M): Nm = self.data[m].shape[0] - 1 for k in range(Nm + 1): result += ((self.eval_func(m, k, r) - self.eval_func(m, k, self.rt) - self.temporal_diff_sum(m, k)) * 2 * self.eval_func_der(m, k, r, i)) return result def worker_func_der(args): self = args[0] m = args[1] k = args[2] r = args[3] i = args[4] return ((self.eval_func(m, k, r) - self.eval_func(m, k, self.rt) - self.temporal_diff_sum(m, k)) * 2 * self.eval_func_der(m, k, r, i)) class Agent: num_features = 22 def __init__(self): self.lf = 0.2 # Learning factor lambda self.data = [] # The features' values for all the games self.rewards = [] # Reward values for moving from 1 state to the next self.rt = np.array([]) self.max_iter = 50 def set_learning_factor(self, learning_factor): assert(learning_factor >= 0 and learning_factor <= 1) self.lf = learning_factor def set_rt(self, rt): assert(len(rt) == self.num_features) self.rt = rt def set_iter(self, max_iter): self.max_iter = max_iter def set_data(self, data): self.data = [] self.rewards = [] for game in data: game = np.vstack((game, np.zeros(self.num_features + 1))) self.data.append(game[:, :-1]) self.rewards.append(game[:, -1:]) def eval_func(self, m, k, r): """ The evaluation function value for the set of weights (vector) r at the mth game and kth board state """ return np.dot(r, self.data[m][k]) def eval_func_der(self, m, k, r, i): """ Find the derivative of the evaluation function with respect to the ith component of the vector r """ return self.data[m][k][i] def get_reward(self, m, s): """ Get reward for moving from state s to state (s + 1) """ return self.rewards[m][s + 1][0] def temporal_diff(self, m, s): """ The temporal diffence value for state s to state (s+1) in the mth game """ return (self.get_reward(m, s) + self.eval_func(m, s + 1, self.rt) - self.eval_func(m, s, self.rt)) def temporal_diff_sum(self, m, k): Nm = self.data[m].shape[0] - 1 result = 0 for s in range(k, Nm): result += self.lf**(s - k) * self.temporal_diff(m, s) return result def optimized_func(self, r): result = 0 M = len(self.data) pool = Pool(processes=4) for m in range(M): Nm = self.data[m].shape[0] - 1 k_args = range(Nm + 1) self_args = [self] * len(k_args) m_args = [m] * len(k_args) r_args = [r] * len(k_args) result += sum(pool.map(worker_func, zip(self_args, m_args, k_args, r_args))) return result def <API key>(self, r, i): """ The derivative of the optimized function with respect to the ith component of the vector r """ result = 0 M = len(self.data) for m in range(M): Nm = self.data[m].shape[0] - 1 for k in range(Nm + 1): result += ((self.eval_func(m, k, r) - self.eval_func(m, k, self.rt) - self.temporal_diff_sum(m, k)) * 2 * self.eval_func_der(m, k, r, i)) return result def optimized_func_der(self, r): p = Pool(processes=4) self_args = [self] * len(r) i_args = range(len(r)) r_args = [r] * len(r) return np.array(p.map(<API key>, zip(self_args, r_args, i_args))) def callback(self, r): print("Iteration %d completed at %s" % (self.cur_iter, datetime.now().strftime("%d/%m/%Y %H:%M:%S"))) self.cur_iter += 1 def compute_next_rt(self): print("Start computing at %s" % (datetime.now().strftime("%d/%m/%Y %H:%M:%S"))) self.cur_iter = 1 r0 = np.array([random.randint(-10, 10) for i in range(self.num_features)]) res = minimize(self.optimized_func, r0, method='BFGS', jac=self.optimized_func_der, options={'maxiter': self.max_iter, 'disp': True}, callback=self.callback) return res.x
RSpec.describe Porch::ProcStepDecorator do describe ".decorates?" do it "returns true if the step is a proc" do expect(described_class).to be_decorates Proc.new {} end it "returns true if the step is a lambda" do expect(described_class).to be_decorates lambda {} end it "returns false if the step is a class" do expect(described_class).to_not be_decorates Object end end describe "#execute" do let(:context) { Hash.new } let(:organizer) { double(:organizer) } let(:step) { Proc.new {} } subject { described_class.new step, organizer } it "calls the proc with the context" do expect(step).to receive(:call).with(context) subject.execute context end end end
<?php declare(strict_types=1); namespace Symplify\MultiCodingStandard\Tests\PhpCsFixer\Factory; use PhpCsFixer\Fixer\FixerInterface; use PHPUnit\Framework\TestCase; use Symplify\MultiCodingStandard\PhpCsFixer\Factory\FixerFactory; final class FixerFactoryTest extends TestCase { /** * @var FixerFactory */ private $fixerFactory; protected function setUp() { $this->fixerFactory = new FixerFactory(); } /** * @dataProvider provideCreateData */ public function <API key>( array $fixerLevels, array $fixers, array $excludedFixers, int $expectedFixerCount ) { $fixers = $this->fixerFactory-><API key>($fixerLevels, $fixers, $excludedFixers); $this->assertCount($expectedFixerCount, $fixers); if (count($fixers)) { $fixer = $fixers[0]; $this->assertInstanceOf(FixerInterface::class, $fixer); } } public function provideCreateData() : array { return [ [[], [], [], 0], [[], ['<API key>'], [], 1], [['psr1'], [], [], 2], [['psr2'], [], [], 24], [['psr2'], [], ['visibility'], 24], [['psr1', 'psr2'], [], [], 26], [['psr1', 'psr2'], [], ['visibility'], 26], ]; } }
# -*- coding: utf-8 -*- # Dependencies import uuid from api import app from hashlib import sha1 from flask import request from flask import jsonify as JSON from api.models.user import User from cors import cors @app.route('/signup', methods=['POST']) @cors(origin='*', methods=['POST']) def signup(): # Create new user new_user = User() new_user.name = request.form['name'] new_user.email = request.form['email'] new_user.password = sha1(request.form['password']).hexdigest() new_user.token = str(uuid.uuid4()) new_user.save() return JSON(message='User created successfully') @app.route('/signin', methods=['POST']) @cors(origin='*', methods=['POST']) def signin(): # Retorna a user data user_info = User.objects(email=request.form['email'], password=sha1( request.form['password']).hexdigest()) if user_info.count(): return JSON(token=user_info.get().token, roles=user_info.get().roles) else: return JSON(message='User not found')
'use strict'; const buildType = process.config.target_defaults.<API key>; const assert = require('assert'); if (process.argv[2] === 'fatal') { const binding = require(process.argv[3]); binding.error.throwFatalError(); return; } test(`./build/${buildType}/binding.node`); test(`./build/${buildType}/binding_noexcept.node`); function test(bindingPath) { const binding = require(bindingPath); assert.throws(() => binding.error.throwApiError('test'), function(err) { return err instanceof Error && err.message.includes('Invalid'); }); assert.throws(() => binding.error.throwJSError('test'), function(err) { return err instanceof Error && err.message === 'test'; }); assert.throws(() => binding.error.throwTypeError('test'), function(err) { return err instanceof TypeError && err.message === 'test'; }); assert.throws(() => binding.error.throwRangeError('test'), function(err) { return err instanceof RangeError && err.message === 'test'; }); assert.throws( () => binding.error.doNotCatch( () => { throw new TypeError('test'); }), function(err) { return err instanceof TypeError && err.message === 'test' && !err.caught; }); assert.throws( () => binding.error.<API key>( () => { throw new TypeError('test'); }), function(err) { return err instanceof TypeError && err.message === 'test' && err.caught; }); const err = binding.error.catchError( () => { throw new TypeError('test'); }); assert(err instanceof TypeError); assert.strictEqual(err.message, 'test'); const msg = binding.error.catchErrorMessage( () => { throw new TypeError('test'); }); assert.strictEqual(msg, 'test'); assert.throws(() => binding.error.<API key>('test'), function(err) { return err instanceof Error && err.message === 'test'; }); assert.throws(() => binding.error.<API key>('test'), function(err) { return err instanceof Error && err.message === 'test' && err.caught; }); const p = require('./napi_child').spawnSync( process.execPath, [ __filename, 'fatal', bindingPath ]); assert.ifError(p.error); assert.ok(p.stderr.toString().includes( 'FATAL ERROR: Error::ThrowFatalError This is a fatal error')); }
using System.Web; using System.Web.Optimization; namespace WebAPI.Boilerplate.Api { public class BundleConfig { public static void RegisterBundles(BundleCollection bundles) { bundles.Add(new ScriptBundle("~/bundles/jquery").Include( "~/Scripts/jquery-{version}.js")); // Use the development version of Modernizr to develop with and learn from. Then, when you're bundles.Add(new ScriptBundle("~/bundles/modernizr").Include( "~/Scripts/modernizr-*")); bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include( "~/Scripts/bootstrap.js", "~/Scripts/respond.js")); bundles.Add(new StyleBundle("~/Content/css").Include( "~/Content/bootstrap.css", "~/Content/site.css")); } } }
// YYBaseLib.h // YYBaseLib #import <UIKit/UIKit.h> #import "AppConfig.h" #import "BaseViewController.h" #import "CommonTool.h" #import "DataVerify.h" #import "FSMediaPicker.h" #import "MBProgressHUD+<API key>.h" #import "EnumModel.h" #import "UsersModel.h" #import "NSDataAdditions.h" #import "NSDate_Extensions.h" #import "<API key>.h" #import "NSObject_Extensions.h" #import "NSString_Extensions.h" #import "UIImageExtentions.h" #import "UILabel_Extensions.h" #import "PopupBaseView.h" #import "SDCycleScrollView.h" #import "UIButton+FillColor.h" #import "UIColor_Extensions.h" #import "UIImage+UIImage.h" #import "UIImage+UIImageScale.h" #import "UITableView+<API key>.h" #import "UITextView+Placeholder.h" #import "UIView+extensions.h" #import "UIView+Masonry.h" #import "AuthService.h" #import "AppManager.h" #import "ApiService.h" #import "GTMBase64.h" #import "GTMDefines.h" #import "ConsultGradeModel.h" #import "CategoryModel.h" #import "CityModel.h" #import "MenuModel.h" //! Project version number for YYBaseLib. FOUNDATION_EXPORT double <API key>; //! Project version string for YYBaseLib. FOUNDATION_EXPORT const unsigned char <API key>[]; // In this header, you should import all the public headers of your framework using statements like #import <YYBaseLib/PublicHeader.h>
<table id="member_table" class="mainTable padTable" style="width:100%;" cellspacing="0" cellpadding="0" border="0"> <thead> <tr> <th style="width:3%;" ><?=$lang_id?></th> <th style="width:22%;"><?=$lang_name?></th> <th style="width:15%;"><?=$lang_total_friends?></th> <th style="width:15%;"><?=$<API key>?></th> <th style="width:15%;"><?=$<API key>?></th> <th style="width:15%;"><?=$<API key>?></th> <th style="width:15%;"><?=$<API key>?></th> </tr> </thead> <tbody> <tr class="odd"> <td><?=$member['member_id']?></td> <td><?=$member['screen_name']?></td> <td><?=$member['total_friends']?></td> <td><?=$member['<API key>']?></td> <td><?=$member['<API key>']?></td> <td><?=$member['<API key>']?></td> <td><?=$member['<API key>']?></td> </tr> </tbody> </table> <?php if ( count( $friends ) == 0 ) : ?> <p><span class="notice"><?=$member['screen_name']?><?=$<API key>?></span></p> <?php else: ?> <form action="<?=$form_uri?>" method="post" id="delete_friend_form"> <input type="hidden" name="XID" value="<?=$XID_SECURE_HASH?>" /> <input type="hidden" name="member_id" value="<?=$member['member_id']?>" /> <table class="mainTable padTable magicCheckboxTable" style="width:100%;" cellspacing="0" cellpadding="0" border="0"> <thead> <tr> <th style="width:3%;">&nbsp;</th> <th style="width:7%;"> <input class="checkbox" type="checkbox" name="<API key>" value="" />&nbsp;<?=$lang_delete?> </th> <th style="width:30%;"><?=$lang_name?></th> <th style="width:20%;"><?=$lang_date?></th> <th style="width:15%;"><?=$lang_reciprocal?></th> <th style="width:15%;"><?=$lang_blocked?></th> <th style="width:10%;"><?=$lang_total_friends?></th> </tr> </thead> <tbody> <?php foreach ( $friends as $key => $val ) : $key = $key + 1 + $row_count; $switch = $this->cycle('odd', 'even'); ?> <tr class="<?=$switch?>"> <td><?=$key?></td> <td> <input class="checkbox" type="checkbox" name="toggle[]" value="<?=$val['entry_id']?>" id="delete_box_<?=$key?>" /> </td> <td> <a href="<?=$val['friend_uri']?>" title="<?=$<API key>?><?=$val['screen_name']?>"> <?=$val['screen_name']; ?></a> </td> <td><?=$val['date']?></td> <td><?=$val['reciprocal']?></td> <td><?=$val['block']?></td> <td><?=$val['total_friends']?></td> </tr> <?php endforeach; ?> <?php $switch = $this->cycle('odd', 'even'); ?> <tr class="<?=$switch?>"> <td>&nbsp;</td> <td colspan="6"> <input class="checkbox" type="checkbox" name="<API key>" value="" />&nbsp;<strong><?=$lang_delete?></strong> </td> </tr> <?php if ( $paginate !== '' ) : ?> <?php $switch = $this->cycle('odd', 'even'); ?> <tr class="<?=$switch?>"> <td colspan="7"> <?=$paginate?> </td> </tr> <?php endif; ?> </tbody> </table> <p><input type="submit" class="submit" value="<?=$lang_delete?>" /></p> </form> <?php endif; ?>
package redes3.proyecto.nagiosalert; import android.app.Activity; import android.content.Context; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.widget.ImageView; import android.widget.TextView; public class InfoServiceActivity extends Activity { String nombre; int status; String duracion; String revision; String info; ImageView image ; TextView tvNombre ; TextView tvStatus ; TextView tvDuracion ; TextView tvRevision ; TextView tvInfo ; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.<API key>); nombre = new String(); status = 0 ; duracion = new String(); revision = new String(); info = new String(); image = (ImageView) findViewById(R.id.image); tvNombre = (TextView)this.findViewById(R.id.tvNombreServicio); tvStatus = (TextView)this.findViewById(R.id.status); tvDuracion = (TextView)this.findViewById(R.id.duracion); tvRevision = (TextView)this.findViewById(R.id.revision); tvInfo = (TextView)this.findViewById(R.id.info); Bundle extras = getIntent().getExtras(); nombre = extras.getString("nombre"); status = extras.getInt("status"); duracion = extras.getString("duracion"); revision = extras.getString("revision"); info = extras.getString("info"); tvNombre.setText(nombre); tvDuracion.setText("Duracion : \n"+duracion); tvRevision.setText("Revision : \n"+revision); tvInfo.setText("Descripción : \n"+info); if(status== 0){ tvStatus.setText("Estado : \nOk"); image.setImageResource(R.drawable.fine); }else if(status== 1){ tvStatus.setText("Estado : \nFail"); image.setImageResource(R.drawable.fail); }if(status== 2){ tvStatus.setText("Estado : \nWarning"); image.setImageResource(R.drawable.warning); }if(status== 3){ tvStatus.setText("Estado : \nUnknown"); image.setImageResource(R.drawable.unknown); } } }
#include "MultiSelection.h" #include "ofxCogEngine.h" #include "EnumConverter.h" #include "Node.h" namespace Cog { void MultiSelection::Load(Setting& setting) { string group = setting.GetItemVal("selection_group"); if (group.empty()) CogLogError("MultiSelection", "Error while loading MultiSelection behavior: expected parameter selection_group"); this->selectionGroup = StrId(group); // load all attributes string defaultImg = setting.GetItemVal("default_img"); string selectedImg = setting.GetItemVal("selected_img"); if (!defaultImg.empty() && !selectedImg.empty()) { this->defaultImg = CogGet2DImage(defaultImg); this->selectedImg = CogGet2DImage(selectedImg); } else { string defaultColorStr = setting.GetItemVal("default_color"); string selectedColorStr = setting.GetItemVal("selected_color"); if (!defaultColorStr.empty() && !selectedColorStr.empty()) { this->defaultColor = EnumConverter::StrToColor(defaultColorStr); this->selectedColor = EnumConverter::StrToColor(selectedColorStr); } } } void MultiSelection::OnInit() { <API key>(<API key>, ACT_STATE_CHANGED); } void MultiSelection::OnStart() { CheckState(); owner->SetGroup(selectionGroup); } void MultiSelection::OnMessage(Msg& msg) { if (msg.HasAction(<API key>) && msg.GetContextNode()->IsInGroup(selectionGroup)) { // check if the object has been clicked (user could hit a different area and release touch over the button) auto evt = msg.GetDataPtr<InputEvent>(); if (evt->input->handlerNodeId == msg.GetContextNode()->GetId()) { ProcessHit(msg, false); } } else if (msg.HasAction(ACT_STATE_CHANGED) && msg.GetContextNode()->IsInGroup(selectionGroup)) { ProcessHit(msg, true); // set directly, because STATE_CHANGED event has been already invoked } } void MultiSelection::ProcessHit(Msg& msg, bool setDirectly) { if (msg.GetContextNode()->GetId() == owner->GetId()) { // selected actual node if (!owner->HasState(selectedState)) { if (setDirectly) owner->GetStates().SetState(selectedState); else owner->SetState(selectedState); SendMessage(ACT_OBJECT_SELECTED); CheckState(); } else { CheckState(); } } else { if (owner->HasState(selectedState)) { if (setDirectly) owner->GetStates().ResetState(selectedState); else owner->ResetState(selectedState); CheckState(); } } } void MultiSelection::CheckState() { if (owner->HasState(selectedState)) { if (selectedImg) { owner->GetMesh<Image>()->SetImage(selectedImg); } else { owner->GetMesh()->SetColor(selectedColor); } } else if (!owner->HasState(selectedState)) { if (defaultImg) { owner->GetMesh<Image>()->SetImage(defaultImg); } else { owner->GetMesh()->SetColor(defaultColor); } } } }// namespace
// of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // copies or substantial portions of the Software. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. package io.github.jonestimd.finance.file; import java.util.Collection; import java.util.Comparator; import java.util.List; import java.util.Objects; import java.util.function.Predicate; import java.util.stream.Collectors; import io.github.jonestimd.finance.domain.transaction.Transaction; import io.github.jonestimd.finance.swing.transaction.<API key>; import static io.github.jonestimd.util.JavaPredicates.*; public class Reconciler { private final <API key> tableModel; private final List<Transaction> uncleared; public Reconciler(<API key> tableModel) { this.tableModel = tableModel; this.uncleared = tableModel.getBeans().stream() .filter(not(Transaction::isCleared)).filter(not(Transaction::isNew)) .collect(Collectors.toList()); } public void reconcile(Collection<Transaction> transactions) { transactions.forEach(this::reconcile); } private void reconcile(Transaction transaction) { Transaction toClear = select(transaction); if (toClear.isNew()) { toClear.setCleared(true); tableModel.queueAdd(tableModel.getBeanCount()-1, toClear); } else { tableModel.setValueAt(true, tableModel.rowIndexOf(toClear), tableModel.getClearedColumn()); } } private Transaction select(Transaction transaction) { return uncleared.stream().filter(sameProperties(transaction)).min(nearestDate(transaction)).orElse(transaction); } private Predicate<Transaction> sameProperties(Transaction transaction) { return t2 -> transaction.getAmount().compareTo(t2.getAmount()) == 0 && transaction.getAssetQuantity().compareTo(t2.getAssetQuantity()) == 0 && Objects.equals(transaction.getPayee(), t2.getPayee()) && Objects.equals(transaction.getSecurity(), t2.getSecurity()); } private Comparator<Transaction> nearestDate(Transaction transaction) { return Comparator.comparingInt(t -> transaction.getDate().compareTo(t.getDate())); } }
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; class <API key> extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('events', function (Blueprint $table) { $table->string('template')->default('show'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('events', function ($table) { $table->dropColumn('template'); }); } }
package plugin_test import ( "path/filepath" "code.cloudfoundry.org/cli/utils/testhelpers/pluginbuilder" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "testing" ) func TestPlugin(t *testing.T) { RegisterFailHandler(Fail) pluginbuilder.BuildTestBinary(filepath.Join("..", "fixtures", "plugins"), "test_1") RunSpecs(t, "Plugin Suite") }
var express = require('express'), compression = require('compression'), path = require('path'), favicon = require('serve-favicon'), logger = require('morgan'), cookieParser = require('cookie-parser'), bodyParser = require('body-parser'), session = require('express-session'), session = require('express-session'), flash = require('connect-flash'), moment = require('moment'), mongoose = require('mongoose'), MongoStore = require('connect-mongo')(session), Pclog = require('./models/pclog.js'), configDB = require('./config/database.js'); mongoose.Promise = global.Promise = require('bluebird'); mongoose.connect(configDB.uri); var routes = require('./routes/index'), reports = require('./routes/reports'), statistics = require('./routes/statistics'), charts = require('./routes/charts'), logs = require('./routes/logs'), organization = require('./routes/organization'), users = require('./routes/users'); var app = express(); //var rootFolder = __dirname; // view engine setup app.set('views', path.join(__dirname, 'views')); app.set('view engine', 'jade'); app.use(compression()); // uncomment after placing your favicon in /public app.use(favicon(path.join(__dirname, 'public', 'favicon.ico'))); app.use(logger('dev')); app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: false })); app.use(cookieParser()); app.use(session({ <API key>, resave: true, rolling: true, saveUninitialized: false, cookie: {secure: false, maxAge: 900000}, store: new MongoStore({ url: configDB.uri }) })); app.use(flash()); app.use(express.static(path.join(__dirname, 'public'))); app.use('/', function(req,res,next){ app.locals.currentUrl = req.path; app.locals.moment = moment; res.locals.messages = require('express-messages')(req, res); if(req.session & req.session.user){ app.locals.user = req.session.user; } console.log(app.locals.user); next(); }); app.use('/', routes); app.use('/reports', reports); app.use('/statistics', statistics); app.use('/charts', charts); app.use('/logs', logs); app.use('/organization', organization); app.use('/users', users); // catch 404 and forward to error handler app.use(function(req, res, next) { var err = new Error('Page Not Found.'); err.status = 404; next(err); }); // error handlers // development error handler // will print stacktrace // app.use(function(err, req, res, next) { // res.status(err.status || 500); // res.render('error', { // message: err.message, // error: err // production error handler // no stacktraces leaked to user app.use(function(err, req, res, next) { if(err.status){ res.status(err.status); }else{ err.status = 500; err.message = "Internal Server Error." res.status(500); } res.render('404', {error: err}); }); module.exports = app;
/** * CircularLinkedList implementation * @author Tyler Smith * @version 1.0 */ public class CircularLinkedList<T> implements LinkedListInterface<T> { private Node<T> head = null, tail = head; private int size = 0; @Override public void addAtIndex(int index, T data) { if (index < 0 || index > this.size()) { throw new <API key>(); } if (index == 0) { this.addToFront(data); } else if (index == this.size()) { this.addToBack(data); } else { Node<T> current = head; if (index == 1) { current.setNext(new Node<T>(data, current.getNext())); } else { for (int i = 0; i < index - 1; i++) { current = current.getNext(); } Node<T> temp = current; current = new Node<T>(data, temp); } size++; } } @Override public T get(int index) { if (index < 0 || index >= size) { throw new <API key>(); } Node<T> current = head; for (int i = 0; i < index; i++) { current = current.getNext(); } return current.getData(); } @Override public T removeAtIndex(int index) { if (index < 0 || index >= this.size()) { throw new <API key>(); } if (index == 0) { T data = head.getData(); head = head.getNext(); tail.setNext(head); size return data; } else { Node<T> before = tail; Node<T> current = head; for (int i = 0; i < index; i++) { before = current; current = current.getNext(); } T data = current.getData(); before.setNext(current.getNext()); size return data; } } @Override public void addToFront(T t) { if (this.isEmpty()) { head = new Node<T>(t, tail); tail = head; tail.setNext(head); size++; return; } Node<T> node = new Node<T>(t, head); head = node; tail.setNext(head); size++; } @Override public void addToBack(T t) { if (this.isEmpty()) { tail = new Node<T>(t); head = tail; tail.setNext(head); head.setNext(tail); size++; } else { Node<T> temp = tail; tail = new Node<T>(t, head); temp.setNext(tail); size++; } } @Override public T removeFromFront() { if (this.isEmpty()) { return null; } Node<T> ret = head; head = head.getNext(); tail.setNext(head); size return ret.getData(); } @Override public T removeFromBack() { if (this.isEmpty()) { return null; } Node<T> iterate = head; while (iterate.getNext() != tail) { iterate = iterate.getNext(); } iterate.setNext(head); Node<T> ret = tail; tail = iterate; size return ret.getData(); } @SuppressWarnings("unchecked") @Override public T[] toList() { Object[] list = new Object[this.size()]; int i = 0; Node<T> current = head; while (i < this.size()) { list[i] = current.getData(); current = current.getNext(); i++; } return ((T[]) list); } @Override public boolean isEmpty() { return (this.size() == 0); } @Override public int size() { return size; } @Override public void clear() { head = null; tail = null; size = 0; } /** * Reference to the head node of the linked list. * Normally, you would not do this, but we need it * for grading your work. * * @return Node representing the head of the linked list */ public Node<T> getHead() { return head; } /** * Reference to the tail node of the linked list. * Normally, you would not do this, but we need it * for grading your work. * * @return Node representing the tail of the linked list */ public Node<T> getTail() { return tail; } /** * This method is for your testing purposes. * You may choose to implement it if you wish. */ @Override public String toString() { return ""; } }
import { Component, OnInit } from '@angular/core'; // import { TreeModule, TreeNode } from "primeng/primeng"; import { BlogPostService } from '../shared/blog-post.service'; import { BlogPostDetails } from '../shared/blog-post.model'; @Component({ selector: 'ejc-blog-archive', templateUrl: './blog-archive.component.html', styleUrls: ['./blog-archive.component.scss'] }) export class <API key> implements OnInit { constructor( // private postService: BlogPostService ) { } ngOnInit() { } // // it would be best if the data in the blog post details file was already organized into tree nodes // private buildTreeNodes(): TreeNode[] {} }
require 'active_record' module ActiveRecord class Migration def <API key>(direction) if defined? self.class::DATABASE_NAME ActiveRecord::Base.<API key>(self.class::DATABASE_NAME.to_sym) <API key>(direction) ActiveRecord::Base.<API key>(Rails.env.to_sym) else <API key>(direction) end end alias_method_chain :migrate, :multidb end end