This file contains 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
{-# LANGUAGE DeriveDataTypeable, FlexibleContexts, MultiParamTypeClasses, NamedFieldPuns, | |
NoImplicitPrelude, OverloadedStrings, RankNTypes, ScopedTypeVariables, TupleSections, | |
ConstraintKinds, TemplateHaskell, StandaloneDeriving #-} | |
{-# OPTIONS_GHC -funbox-strict-fields -Wall -Werror #-} | |
-- dependencies: hedis retry safe data-default uuid monad-logger basic-prelude lifted-base either | |
-- | Wrapper for hedis to support redis-sentinel. It is | |
-- built-atop of, and re-exports most of, the "Database.Redis" module. | |
-- |
This file contains 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 toggleClass = (id, toggle) => id === toggle ? 'toggle active' : 'toggle inactive'; | |
const Style = ({ activeFontColor, activeBackgroundColor, fontColor }) => ( | |
<style jsx> | |
{` | |
.toggle { | |
width: 50%; | |
height: 50px; | |
border-radius: 100px; | |
line-height: 50px; |
This file contains 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
$("#ajax-action2").click( function() { | |
const AUTH_TOKEN = $("meta[name=csrf-token]").attr("content"); | |
request = $.ajax({ | |
type: "PATCH", | |
url: "/home/no_js_view_action", | |
headers: { | |
'X_CSRF_TOKEN': AUTH_TOKEN, | |
}, | |
dataType: "json", | |
data: { |
This file contains 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
// Arrow function | |
$("#ajax-action2").click(() => { | |
const AUTH_TOKEN = $("meta[name=csrf-token]").attr("content"); | |
// const | |
const request = $.ajax({ | |
type: "PATCH", | |
url: "/home/no_js_view_action", | |
headers: { | |
'X_CSRF_TOKEN': AUTH_TOKEN, |
This file contains 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
takeEven = lambda.select do |x| | |
x if x % 2 == 0 | |
end |
This file contains 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
takeEven = lambda.select do |x| | |
x if x % 2 == 0 | |
end |
This file contains 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
[0,1,2,3,4,5,6,7,8,9].select do |x| | |
x if x%2==0 | |
end |
This file contains 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
// The call with a callback to self | |
try { | |
winfo = windarea.getWindInfo2(LonLat.lat, LonLat.lon, this.time, wante, wpost); | |
//this.drawWind(ctx, p.x, p.y, winfo); | |
var MI = GribMgr.WindAtPointInTime(new Date(this.time*1000),LonLat.lat, LonLat.lon, | |
function(){this.drawWindArea(p, poslimit, windarea, ctx)}) | |
if (MI) | |
{ | |
winfo = new Wind(MI.Speed, MI.Heading); | |
this.drawWind(ctx, p.x, p.y, winfo); |
This file contains 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
- if Rails.env.production? | |
%script | |
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | |
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), | |
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) | |
})(window,document,'script','//www.google-analytics.com/analytics.js','ga'); | |
ga('create', 'UA-15209814-7', 'auto'); | |
ga('send', 'pageview'); | |
%script |
This file contains 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
self.num_reserved = order_data.match(/\"ordered\"\:.*\n/)[0].match(/\d+/)[0] |
NewerOlder