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
extension UIView { | |
func addDashedBorder() { | |
let color = UIColor.black.cgColor | |
let shapeLayer:CAShapeLayer = CAShapeLayer() | |
let frameSize = self.frame.size | |
let shapeRect = CGRect(x: 0, y: 0, width: frameSize.width, height: frameSize.height) | |
shapeLayer.bounds = shapeRect | |
shapeLayer.position = CGPoint(x: frameSize.width/2, y: frameSize.height/2) |
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
struct HashTable<Key: Hashable, Value> { | |
private typealias Element = (key: Key, value: Value) | |
private typealias List = LinkedList<Element> | |
private var table: [List] | |
init(size: Int) { | |
table = Array<List>() | |
for _ in 0..<size { |
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 newItemText = UITextField() | |
let alert = UIAlertController(title: "Add a new Todoey Item", message: "", preferredStyle: .alert) | |
let action = UIAlertAction(title: "Add Item", style: .default) { (action) in | |
// what's going to happen when the add button is pressed | |
let newTodoItem = TodoListItem(context: self.context) | |
newTodoItem.title = newItemText.text! | |
newTodoItem.isChecked = false | |
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
//MARK: - TableView Delegate Methods | |
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { | |
return todoListCategoryArray.count | |
} | |
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { | |
let cell = tableView.dequeueReusableCell(withIdentifier: "CategoryCell", for: indexPath) | |
let item = todoListCategoryArray[indexPath.row] | |
cell.textLabel?.text = item.name |
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 MyComponent extends React.Component { | |
constructor(props) { | |
// set the default internal state | |
this.state = { | |
clicks: 0 | |
}; | |
} | |
componentDidMount() { |
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 React from 'react'; | |
import { StyleSheet, Image, Text, View } from 'react-native'; | |
export default class VendorListItem extends React.Component { | |
constructor(props) { | |
super(props); | |
this.content = { | |
title: this.props.title, | |
description: this.props.description, | |
distance: this.props.distance, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="pin-entry--content"> | |
<div class="row" style="text-align: center"> | |
<div class="col col-10 col-offset-15" style="border-bottom: 1px solid black"> | |
{{pinCtrl.passcode.substring(0, 1)}} | |
</div> | |
<div class="col col-10 col-offset-10" style="border-bottom: 1px solid black"> | |
{{pinCtrl.passcode.substring(1, 2)}} | |
</div> | |
<div class="col col-10 col-offset-10" style="border-bottom: 1px solid black"> | |
{{pinCtrl.passcode.substring(2, 3)}} |
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
/* | |
* @ngdoc directive | |
* @name autoFocus | |
* @restrict A | |
* | |
* @example | |
* <form-input-text-area | |
* data-message="Enter Button Message Here" | |
* data-ng-class="{isClosed: !formInputTextCtrl.isEdit, isOpen: formInputTextCtrl.isEdit}" | |
* data-auto-focus="boolean expression"> |
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
echo ('<div class="biowrapper"> | |
<div class="row bio ' . slugify( get_field("doctor_name")) . '"> | |
<div class="medium-4 columns"> | |
<img src=" ' . the_sub_field("image") . ' ">'); |
NewerOlder