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
| package funsets | |
| import scala.annotation.tailrec | |
| /** | |
| * 2. Purely Functional Sets. | |
| */ | |
| object FunSets { | |
| /** |
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 path from 'path'; | |
| import webpack from 'webpack'; | |
| import AssetsPlugin from 'assets-webpack-plugin'; | |
| import nodeExternals from 'webpack-node-externals'; | |
| import {BundleAnalyzerPlugin} from 'webpack-bundle-analyzer'; | |
| import overrideRules from './lib/overrideRules'; | |
| import pkg from '../package.json'; | |
| const isDebug = !process.argv.includes('--release'); | |
| const isVerbose = process.argv.includes('--verbose'); |
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 serialize from 'serialize-javascript'; | |
| import config from '../config'; | |
| /* eslint-disable react/no-danger */ | |
| const adSenseCode = `(adsbygoogle = window.adsbygoogle || []).push({google_ad_client: "${config.ads.adSenseId}",enable_page_level_ads: true})`; | |
| const analyticsCode = `window.ga=function(){ga.q.push(arguments)};ga.q=[];ga.l=+new Date;ga('create','${config.analytics.googleTrackingId}','auto');ga('send','pageview')`; |
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
| ``` | |
| hKRib2R5hqhkZXRhY2hlZMOpaGFzaF90eXBlCqNrZXnEIwEgBwh1w/hrv2znqVJPeNDfUF748R2z2eWC8Yq+6HHjdlwKp3BheWxvYWTFAvR7ImJvZHkiOnsia2V5Ijp7ImVsZGVzdF9raWQiOiIwMTIwMDcwODc1YzNmODZiYmY2Y2U3YTk1MjRmNzhkMGRmNTA1ZWY4ZjExZGIzZDllNTgyZjE4YWJlZTg3MWUzNzY1YzBhIiwiaG9zdCI6ImtleWJhc2UuaW8iLCJraWQiOiIwMTIwMDcwODc1YzNmODZiYmY2Y2U3YTk1MjRmNzhkMGRmNTA1ZWY4ZjExZGIzZDllNTgyZjE4YWJlZTg3MWUzNzY1YzBhIiwidWlkIjoiNTRjODVlNjZiYTU2OTNlYmM1ZDk2ZTBhMDljZDlhMTkiLCJ1c2VybmFtZSI6Im1hdHRjYXJ0ZXIifSwic2VydmljZSI6eyJuYW1lIjoiZ2l0aHViIiwidXNlcm5hbWUiOiJ0ZWNobm90cm9uaWNveiJ9LCJ0eXBlIjoid2ViX3NlcnZpY2VfYmluZGluZyIsInZlcnNpb24iOjF9LCJjbGllbnQiOnsibmFtZSI6ImtleWJhc2UuaW8gZ28gY2xpZW50IiwidmVyc2lvbiI6IjEuMC4xNiJ9LCJjdGltZSI6MTQ2NzkxMTI4NCwiZXhwaXJlX2luIjo1MDQ1NzYwMDAsIm1lcmtsZV9yb290Ijp7ImN0aW1lIjoxNDY3OTExMjc4LCJoYXNoIjoiNDBhMjRlMzdiZTdkMDg2MjVhYzNiZDhlZjg3OTI3ZjI4MTZmYjlmMjQwMWI0MTU5ZjUyYzIyNzA5YjRmYzQzYjZlNjFhZTI2MmVjNmRmYjc2YTEyOTQxOGMwY2M0N2FkNmZiNDg4NWEwYjZkOWFhNmRiNWRhOTMxNWVhYzRjMzIiLCJzZXFubyI6NTEyNTU2fSwicHJldiI6IjY1ZDg4NmY5YTI5ZDE3NjhlYzc0OGMx |
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
| it.should('allow a uuid to be in segment for multiple buckets', function () { | |
| var uuid = experiments.__util.idGen(), | |
| bucket1 = { | |
| testName: 'bucket collision one', | |
| testType: 'control', | |
| active: true, | |
| diversion: 'cookieMod', | |
| segment: { | |
| low: 0, | |
| high: 1000 |
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 (me *AdjustmentState) AddUnmatchedAdjustmentsDetails(unmatchedAdjustments []Adjustment) error { | |
| /*unmatchedCount := int64(len(unmatchedAdjustments)) | |
| unmatchedSum := float64(0.0) | |
| for _, adjustment := range unmatchedAdjustments { | |
| unmatchedSum -= math.Abs(adjustment.Amount) | |
| } | |
| me.audit.unmatchedAdjustmentInvoiceAmount = number.RoundCurrency(unmatchedSum) | |
| me.audit.unmatchedAdjustmentInvoiceCount = unmatchedCount | |
| return nil*/ |
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
| package main | |
| import ( | |
| "log" | |
| "math" | |
| ) | |
| func Round(val float64, roundOn float64, places int ) (newVal float64) { | |
| var round float64 | |
| pow := math.Pow(10, float64(places)) |
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'; | |
| var uuid = require('node-uuid'), | |
| _ = require('lodash'); | |
| var runCount = 1000000, | |
| time = process.hrtime(), | |
| inc = -1, | |
| resultsArr = [], | |
| uniqueArr = [], | |
| truths = 0, |
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 https = require('https'); | |
| var Notification = require('node-notifier'); | |
| var CronJob = require('cron').CronJob; | |
| var storesUrl = 'https://reserve.cdn-apple.com/GB/en_GB/reserve/iPhone/stores.json'; | |
| var stockUrl = 'https://reserve.cdn-apple.com/GB/en_GB/reserve/iPhone/availability.json'; | |
| var stockLastUpdated; | |
| var stores; |
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 q = require('q'), | |
| http = require('http'), | |
| url = require('url'), | |
| RateLimiter = require('limiter').RateLimiter, | |
| rateCount = 10, | |
| rateTime = 'minute', | |
| limiter = new RateLimiter(rateCount, rateTime); | |
| module.exports = Weather; |