Skip to content

Instantly share code, notes, and snippets.

View clc80's full-sized avatar

Claudia Maciel clc80

View GitHub Profile
@clc80
clc80 / NameTableViewController2.swift
Last active January 30, 2020 03:37
This is the function that makes data passing possible
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
//1. Make sure you are using the correct segue
if segue.identifier == "ShowNameSegue" {
//2. Get the instance of your detail view from the segue's destination
//3. Get the index path for the row that the user tapped
if let detailViewController = segue.destination as? NameDetailViewController,
let indexPath = tableView.indexPathForSelectedRow {
//4. Initialize the word with indexPath
@clc80
clc80 / NameDetailViewController.swift
Created January 30, 2020 03:03
Code for NameDetailViewController
import UIKit
class NameDetailViewController: UIViewController {
var name: String?
@IBOutlet var NameLabel: UILabel!
override func viewDidLoad() {
super.viewDidLoad()
@clc80
clc80 / NameTableViewController.swift
Last active January 30, 2020 02:53
UINameTableViewController
import UIKit
var names = ["Harry Potter", "Hermoine Granger", "Ron Weasley", "Albus Dumbledore", "Draco Malfoy"]
class NameTableViewController: UITableViewController {
override func viewDidLoad() {
super.viewDidLoad()
}
FTypeError: Cannot read property 'title' of null
at Topic.findOne.then (/Users/clmaciel/bloc/bloccit/spec/integration/topics_spec.js:215:20)
at tryCatcher (/Users/clmaciel/bloc/bloccit/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/Users/clmaciel/bloc/bloccit/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/Users/clmaciel/bloc/bloccit/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/Users/clmaciel/bloc/bloccit/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/Users/clmaciel/bloc/bloccit/node_modules/bluebird/js/release/promise.js:693:18)
at Async._drainQueue (/Users/clmaciel/bloc/bloccit/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/Users/clmaciel/bloc/bloccit/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues (/Users/clmaciel/bloc/bloccit/node_modules/bluebird/js/release/async.js:17:1
App.defaultProps = {
instructors: [
{
id: 0,
name: "Michael",
avatar:
"https://www.rithmschool.com/content/react_fundamentals/michael.jpg",
hobby: "hiking"
},
{
class Person extends React.Component {
render() {
var age = this.props.age;
var message = "";
if (age >= 21 ){
message = "Have a Drink!"
} else {
message = "You must be 21"
}
@clc80
clc80 / app.js
Last active August 8, 2018 21:34
React Course Second Course JSX and Babel
class App extends React.Component {
render() {
return (
<div>
<h1>Hello JSX and the World!</h1>
</div>
);
}
}
@clc80
clc80 / app.js
Last active August 8, 2018 21:35
React Course First Course JSX Introduction
class App extends React.Component {
render() {
return (
<div>
<h1>Here is my first React App!</h1>
</div>
);
}
}
id | title | author
------+------------------------------------------+---------------------
1259 | Eloquent Ruby | Russell A. Olson
1593 | JavaScript: The Good Parts | Douglas Crockford
8982 | Designing Object-Oriented Software | Rebecca Wirfs-Brock
7265 | Practical Object-Oriented Design in Ruby | Sandi Metz
id | title | author
------+------------------------------------------+---------------------
1259 | Eloquent Ruby | Russell A. Olson
1593 | JavaScript: The Good Parts | Douglas Crockford
8982 | Designing Object-Oriented Software | Rebecca Wirfs-Brock
7265 | Practical Object-Oriented Design in Ruby | Sandi Metz