This file contains hidden or 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 Foundation | |
| import UIKit | |
| import Webkit | |
| class BasicChildBrowser:UIViewController, WKNavigationDelegate { | |
| let web = WKWebView() | |
| let toolbar = UIToolbar() | |
| let progressSpinner = UIActivityIndicatorView(activityIndicatorStyle: .White) | |
| let progressBar = UIProgressView(progressViewStyle: .Bar) |
This file contains hidden or 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
| javascript:!function(){!function(){var e=function(e,t,n){var r=n||{},o={},i=function(e){!!o[e.selectorText]==!1%26%26(o[e.selectorText]={});for(var t=e.style.cssText.split(/;(%3F![A-Za-z0-9])/),n=0;n<t.length;n++)if(!!t[n]!=!1){var r=t[n].split(": ");r[0]=r[0].trim(),r[1]=r[1].trim(),o[e.selectorText][r[0]]=r[1]}},a=function(){for(var n=e.innerHeight,o=t.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,function(){return NodeFilter.FILTER_ACCEPT},!0);o.nextNode();){var a=o.currentNode,c=a.getBoundingClientRect();if(c.top<n||r.scanFullPage){var l=e.getMatchedCSSRules(a);if(l)for(var f=0;f<l.length;f++)i(l[f])}}};this.generateCSS=function(){var e="";for(var t in o){e+=t+" { ";for(var n in o[t])e+=n+": "+o[t][n]+"; ";e+="}\n"}return e},a()},t=new e(window,document),n=t.generateCSS();console.log(n)}()}(); |
This file contains hidden or 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
| def foo = null | |
| def bar = [active: false] | |
| def foobar = [active: true] | |
| println "Long hand version" | |
| println "--------" | |
| println "Foo: ${! foo || ! foo.active}" | |
| println "Bar: ${! bar || ! bar.active}" | |
| println "Foobar: ${! foobar || ! foobar.active}" |
This file contains hidden or 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
| def list = [].toList() | |
| println "List: $list" // [] | |
| println "[0]: ${list[0]}" // Null | |
| println ".first(): ${list.first()}" // Throws |
This file contains hidden or 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 PropTypes from 'prop-types'; | |
| import './todoItem.css'; | |
| // Export named class individually for better unit test integration | |
| export class TodoItem extends React.Component { | |
| // No need for a constructor because all it was doing was calling super, so it wasn't actually overriding the parent constructor | |
| // Assign to an arrow function - see https://cdb.reacttraining.com/react-inline-functions-and-performance-bdff784f5578 | |
| removeToDo = () => { |
I hereby claim:
- I am arosenb2 on github.
- I am arosenb2 (https://keybase.io/arosenb2) on keybase.
- I have a public key ASBx3jWXMlQdGq_9ZLI7tao996S-gdZWnEeQuhbbp4Fhdgo
To claim this, I am signing this object:
This file contains hidden or 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
| const actionTypes = { | |
| USER_LOGIN_SUBMIT: 'USER_LOGIN_SUBMIT', | |
| USER_LOGIN_SUCCESS: 'USER_LOGIN_SUCCESS', | |
| USER_LOGIN_FAILURE: 'USER_LOGIN_FAILURE' | |
| }; | |
| const createInitialState = (initialState = {}) => ({ | |
| id: null, | |
| email: null, | |
| isLoading: false, |
This file contains hidden or 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 SwiftUI | |
| struct ContentView: View { | |
| var content: [Offer] | |
| var body: some View { | |
| List(content, rowContent: OfferRow.init) | |
| } | |
| } | |
| struct ContentView_Previews: PreviewProvider { |
This file contains hidden or 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
| defmodule Weather do | |
| @moduledoc """ | |
| deps: [ | |
| {:poison, "~> 4.0"}, | |
| {:httpoison, "~> 1.7"} | |
| ] | |
| """ | |
| @api_key "" # obtain for free at https://openweathermap.org/api | |
| @base_url "https://api.openweathermap.org/data/2.5" |