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
var jsonObject = xml2Json(responseBody); | |
var channel = jsonObject.rss.channel; | |
var template = ` | |
<ul> | |
{{#each response}} | |
<li> | |
<a href="{{link}}">{{title}}</a> | |
<sub>{{pubDate}}</sub> | |
</li> | |
{{/each}} |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<array/> | |
</plist> |
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
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { | |
// CONFIGURE PUSH NOTIFICATION | |
let authOptions : UNAuthorizationOptions = [.alert, .badge, .sound] | |
UNUserNotificationCenter.current().requestAuthorization( | |
options: authOptions, | |
completionHandler: {_,_ in }) | |
UNUserNotificationCenter.current().delegate = self | |
application.registerForRemoteNotifications() // here your alert with Permission will appear |
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
'use strict'; | |
const functions = require('firebase-functions'); | |
const gcs = require('@google-cloud/storage')(); | |
const admin = require('firebase-admin'); | |
admin.initializeApp(functions.config().firebase); | |
// on file upload to google cloud storage | |
exports.fileUploaded = functions.storage.object().onChange(event => { |
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 UIKit | |
import PlaygroundSupport | |
let containerView = UIView(frame: CGRect(x: 0, y: 0, width: 375, height: 667)) | |
containerView.backgroundColor = UIColor.white | |
PlaygroundPage.current.liveView = containerView | |
let square = UIView(frame: CGRect(x: 100, y: 100, width: 100, height: 100)) | |
square.backgroundColor = UIColor.gray | |
containerView.addSubview(square) |
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 android.support.annotation.LayoutRes; | |
import android.support.v7.widget.RecyclerView; | |
import android.util.Log; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import com.google.firebase.database.ChildEventListener; | |
import com.google.firebase.database.DataSnapshot; | |
import com.google.firebase.database.DatabaseError; |