Skip to content

Instantly share code, notes, and snippets.

@thompsongl
thompsongl / enum.table.plugin.jsx
Created November 20, 2017 16:11
Customizing swagger-ui via plugins
import React from 'react';
import PropTypes from 'prop-types';
class EnumTable extends React.Component {
render() {
const {propVal} = this.props;
return (
<table className="c-codeTable">
<thead>
<tr><th>Code</th><th>Value</th><th>Description</th></tr>
@artemnovichkov
artemnovichkov / UITableView+Dequeue.swift
Created December 9, 2016 08:21
UItableView dequeueing with Swift magic
import UIKit
extension UITableView {
func dequeueReusableCell<T: UITableViewCell>() -> T {
return dequeueReusableCell(withIdentifier: NSStringFromClass(T.self)) as! T
}
}
//using: let cell: ExampleTableViewCell = tableView.dequeueReusableCell()
@davegurnell
davegurnell / error-handling-in-scala.md
Created September 5, 2014 10:25
Error handling in Scala

Error Handling in Scala

Scala does not have checked exceptions like Java, so you can't do soemthing like this to force a programmer to deal with an exception:

public void stringToInt(String str) throws NumberFormatException {
  Integer.parseInt(str)
}