One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
| /** | |
| * Copyright 2019 Google LLC. | |
| * SPDX-License-Identifier: Apache-2.0 | |
| */ | |
| function getEnvironment() { | |
| var environment = { | |
| spreadsheetID: "<REPLACE WITH YOUR SPREADSHEET ID>", | |
| firebaseUrl: "<REPLACE WITH YOUR REALTIME DB URL>" | |
| }; |
| class FetchDataFromRSSFeed extends Component { | |
| constructor() { | |
| super(); | |
| this.state = { | |
| recentBlogPost: { | |
| name: '', | |
| url: '' | |
| } | |
| } | |
| } |
| // Create a reference to Firebase Storage | |
| this.driverProfilePictureRef = firebase.storage().ref('/driverProfilePicture/'); | |
| // Upload the picture to Firebase Storage | |
| const uploadPicture = this.driverProfilePictureRef.child("driver's id") | |
| .child('profilePicture.png').putString(pictureInBase64StringHere, 'base64', {contentType: 'image/png'}); | |
| // After the picture successfully uploads, you'll want to add that picture's url to the drivers node | |
| uploadPicture.then( profilePicture => { |
| extension UITextField { | |
| func underlined(){ | |
| let border = CALayer() | |
| let width = CGFloat(1.0) | |
| border.borderColor = UIColor.lightGrayColor().CGColor | |
| border.frame = CGRect(x: 0, y: self.frame.size.height - width, width: self.frame.size.width, height: self.frame.size.height) | |
| border.borderWidth = width | |
| self.layer.addSublayer(border) | |
| self.layer.masksToBounds = true |
| /* | |
| ##Device = Desktops | |
| ##Screen = 1281px to higher resolution desktops | |
| */ | |
| @media (min-width: 1281px) { | |
| /* CSS */ | |
| // via: Learn Raw React — no JSX, no Flux, no ES6, no Webpack… | |
| // http://jamesknelson.com/learn-raw-react-no-jsx-flux-es6-webpack | |
| var contacts = [ | |
| {key: 1, name: "James Nelson", email: "[email protected]"}, | |
| {key: 2, name: "Bob"} | |
| ] | |
| var listElements = contacts | |
| .filter(function(contact) { return contact.email; }) |
| @implementation UIImage (scale) | |
| /** | |
| * Scales an image to fit within a bounds with a size governed by | |
| * the passed size. Also keeps the aspect ratio. | |
| * | |
| * Switch MIN to MAX for aspect fill instead of fit. | |
| * | |
| * @param newSize the size of the bounds the image must fit within. | |
| * @return a new scaled image. |