An example of implementation login dropdown in materializecss with popover by https://github.com/sandywalker/webui-popover
A Pen by Renhard Julindra on CodePen.
An example of implementation login dropdown in materializecss with popover by https://github.com/sandywalker/webui-popover
A Pen by Renhard Julindra on CodePen.
| // convert 0..255 R,G,B values to binary string | |
| RGBToBin = function(r,g,b){ | |
| var bin = r << 16 | g << 8 | b; | |
| return (function(h){ | |
| return new Array(25-h.length).join("0")+h | |
| })(bin.toString(2)) | |
| } | |
| // convert 0..255 R,G,B values to a hexidecimal color string | |
| RGBToHex = function(r,g,b){ |
| // Name of layer to copy | |
| var sourceLayerName = "gray_rectangle" | |
| // Ask user to select a Sketch file: | |
| var openDialog = NSOpenPanel.openPanel() | |
| openDialog.setCanChooseFiles(true) | |
| openDialog.setAllowedFileTypes(["sketch"]) | |
| openDialog.setCanChooseDirectories(false) | |
| openDialog.setAllowsMultipleSelection(false) | |
| openDialog.setCanCreateDirectories(false) |
| """ | |
| Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
| BSD License | |
| """ | |
| import numpy as np | |
| # data I/O | |
| data = open('input.txt', 'r').read() # should be simple plain text file | |
| chars = list(set(data)) | |
| data_size, vocab_size = len(data), len(chars) |
| from numpy import exp, array, random, dot | |
| training_set_inputs = array([[0, 0, 1], [1, 1, 1], [1, 0, 1], [0, 1, 1]]) | |
| training_set_outputs = array([[0, 1, 1, 0]]).T | |
| random.seed(1) | |
| synaptic_weights = 2 * random.random((3, 1)) - 1 | |
| for iteration in xrange(10000): | |
| output = 1 / (1 + exp(-(dot(training_set_inputs, synaptic_weights)))) | |
| synaptic_weights += dot(training_set_inputs.T, (training_set_outputs - output) * output * (1 - output)) | |
| print 1 / (1 + exp(-(dot(array([1, 0, 0]), synaptic_weights)))) |
| var doc = context.document | |
| var selectLayersOfType_inContainer = function(layerType, containerLayer) { | |
| // Filter layers using NSPredicate | |
| var scope = (typeof containerLayer !== 'undefined') ? [containerLayer children] : [[doc currentPage] children], | |
| predicate = NSPredicate.predicateWithFormat("(className == %@)", layerType), | |
| layers = [scope filteredArrayUsingPredicate:predicate]; | |
| // Deselect current selection |
| var writeTextToFile = function(text, filePath) { | |
| var t = [NSString stringWithFormat:@"%@", text], | |
| f = [NSString stringWithFormat:@"%@", filePath]; | |
| return [t writeToFile:f atomically:true encoding:NSUTF8StringEncoding error:nil]; | |
| } | |
| var readTextFromFile = function(filePath) { | |
| var fileManager = [NSFileManager defaultManager]; | |
| if([fileManager fileExistsAtPath:filePath]) { | |
| return [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil]; |
| using System; | |
| using UnityEngine; | |
| [Serializable] | |
| public struct HSBColor | |
| { | |
| public float H; | |
| public float S; | |
| public float B; | |
| public float A; |
The Z shell (zsh) is a Unix shell [...]. Zsh can be thought of as an extended Bourne shell with a large number of improvements, including some features of bash, ksh, and tcsh.
Read more about ZSH at An Introduction to the Z Shell.
Choose one of the following options.
| #!/bin/bash | |
| # For this to work, you need to have ffmpeg | |
| # installed with libvorbis, theora and libvpx ENABLED | |
| # to do that in Homebrew: | |
| # brew reinstall ffmpeg --with-libvpx --with-libvorbis --with-theora | |
| # | |
| # encoding reference: | |
| # https://blog.mediacru.sh/2013/12/23/The-right-way-to-encode-HTML5-video.html |