This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Role Attributes | |
role="region" // Defines a distinct section of the page that users might want to navigate to | |
role="list" // Tells screen readers this is a list container | |
role="listitem" // Tells screen readers this is an item within a list | |
role="group" // Groups related form elements together | |
role="status" // Announces changes to screen readers without interrupting | |
role="img" // Indicates that an element represents an image | |
// Labelling and Description Attributes | |
aria-label="Add book form" // Provides a name for the element when visible text isn't present |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.CodeDom.Compiler; | |
using System.Collections.Generic; | |
using System.Collections; | |
using System.ComponentModel; | |
using System.Diagnostics.CodeAnalysis; | |
using System.Globalization; | |
using System.IO; | |
using System.Linq; | |
using System.Reflection; | |
using System.Runtime.Serialization; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"categories": [{ | |
"category": { | |
"name": "Actor in a Leading Role", | |
"nominees": [{ | |
"person": "Riz Ahmed", | |
"movie": "Sound of Metal" | |
}, | |
{ | |
"person": "Chadwick Boseman", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
01100110 01101001 01101110 01100100 00100000 01100001 00100000 01101000 01101111 01100010 01100010 01111001 00100000 01100110 01101111 01110010 00100000 01100111 01101111 01100100 00100111 01110011 00100000 01110011 01100001 01101011 01100101 00100000 01100110 01101001 01101110 01100100 00100000 01100001 00100000 01101000 01101111 01100010 01100010 01111001 00100000 01100110 01101111 01110010 00100000 01100111 01101111 01100100 00100111 01110011 00100000 01110011 01100001 01101011 01100101 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TrieNode { | |
parent: TrieNode | null; | |
children: any = {} | |
key: string | null; | |
isTerminating = false | |
constructor(key: string | null, parent: TrieNode | null) { | |
this.key = key; | |
this.parent = parent | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
class ViewController: UIViewController { | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
// Do any additional setup after loading the view, typically from a nib. | |
let draw = DrawView(frame: self.view.bounds) | |
view.addSubview(draw) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for xvalue in stride(from: x, through: width, by: step) { | |
for yvalue in stride(from: y, through: height, by: step) { | |
drawLine(x: xvalue,y: yvalue, width: step, height: step) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var step = 20; | |
for(var x = 0; x < size; x += step) { | |
for(var y = 0; y < size; y+= step) { | |
draw(x, y, step, step); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func drawLine(x:Int, y:Int, width:Int, height:Int) { | |
let leftToRight:Bool = Bool.random() | |
let path = UIBezierPath() | |
if(leftToRight) { | |
path.move(to: CGPoint(x: x, y: y)) | |
path.addLine(to: CGPoint(x: x + width, y: y + height)) | |
} else { | |
path.move(to: CGPoint(x: x + width, y: y)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DrawView: UIView { | |
override init(frame: CGRect) { | |
super.init(frame: frame) | |
} | |
required init?(coder aDecoder: NSCoder) { | |
fatalError("init(coder:) has not been implemented") | |
} | |
override func draw( _ rect: CGRect) { |
NewerOlder