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'; | |
const Square = () => { | |
const sqStyle = { | |
"border": "1px solid black", | |
"color": "#a9a9a9" | |
} | |
return ( | |
<div className='sq-container' style={sqStyle}> |
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, { Component } from 'react'; | |
import './Square2.css'; | |
class Square extends Component { | |
render () { | |
return ( | |
<div className='sq2-container'> | |
<h1 className='sq2-title'>Even better title</h1> | |
<p className='sq-content'>Much improved content</p> | |
</div> |
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' | |
// ES6 JS object | |
const containerStyle = { | |
'position': 'relative', | |
'height': '20px', | |
'width': '350px', | |
'border-radius': '350px', | |
'border': '1px solid #333' | |
}; |
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
extension ShopsViewController: UITableViewDelegate { | |
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { | |
let selectedShop = fetchedResultsController.object(at: indexPath) | |
let st = UIStoryboardname: "Main", bundle: Bundle.main) | |
let vc = st.instantiateViewController(withIdentifier: "EmployeeViewController") as! EmployeeViewController | |
vc.shop = selectedShop | |
self.navigationController?.pushViewController(vc, animated: true) | |
} |
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
<script> | |
// app ID | |
var intercomSettings = { | |
app_id: "r0j5pbsv" | |
}; | |
// Verifies and cleans all GTM variables | |
function pushGTMVariablesToIntercom(gtmKey, gtmValue) { | |
if(gtmValue != null && gtmValue != "" && gtmValue != "undefined") { | |
if(typeof gtmValue == "string") { |
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 | |
public class LRUCache<KeyType: Hashable> { | |
private let maxSize: Int | |
private var cache: [KeyType: Any] = [:] | |
private var priority: LinkedList<KeyType> = LinkedList<KeyType>() | |
private var key2node: [KeyType: LinkedList<KeyType>.LinkedListNode<KeyType>] = [:] | |
public init(_ maxSize: Int) { | |
self.maxSize = maxSize |
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
public func get<T>(key: String, defaultValue: T) -> Any { | |
let group = DispatchGroup() | |
var allocations = [JSON]() | |
var value = [JSON]() | |
if (futureAllocations == nil) { return defaultValue } | |
// This needs to be a blocking operation | |
let _ = self.futureAllocations?.done { (jsonArray) in | |
allocations = jsonArray |
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
module.exports = function() { | |
var authenticated = window.localStorage.getItem('auth_token'); | |
if (authenticated){ | |
evolv.context.update({'auth':'true'}) | |
} else { | |
evolv.context.update({'auth':'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
module.exports = function() { | |
var url = window.location.href; | |
var nodes = document.querySelectorAll('[href^="tel"]'); | |
var callBtns = Array.prototype.slice.call(nodes); | |
callBtns.forEach(function(btn) { | |
btn.addEventListener('click', function() { | |
evolv.client.emit('tap_to_call.clicked'); | |
}) | |
}) |
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
module.exports = function () { | |
var Evolv=function(t){"use strict";var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,i)};function i(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}var n=function(){function t(t){void 0===t&&(t=5e3),this.maxWaitTime=t,this.queue=[],this.interval=50,this.activeCandidateEvents={confirmed:{},contaminated:{}},this.contaminations={},this.waitForAnalytics(),this.waitForEvolv(this.configureListeners.bind(this))}return t.prototype.configureListeners=function(){var t=this;window.evolv.client.on("confirmed",(function(e){t.sendMetricsForActiveCandidates(e)})),window.evolv.client.on("contaminated",(function(e){t.sendMetricsForActiveCandidates(e)})),window.evolv.client.on("event.emitted",(function(e,i){t.sendMetrics(i,{uid:window.evolv.context.uid})}))},t.prototype.sendMetricsForActiveCandidates=f |
OlderNewer