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 numChecker = (num, min, max) => (num < min ? min : num > max ? max : num); | |
const rgb2hsv = (r, g, b) => { | |
let rabs, gabs, babs, rr, gg, bb, h, s, v, diff, diffc, percentRoundFn; | |
rabs = r / 255; | |
gabs = g / 255; | |
babs = b / 255; | |
(v = Math.max(rabs, gabs, babs)), (diff = v - Math.min(rabs, gabs, babs)); | |
diffc = (c) => (v - c) / 6 / diff + 1 / 2; | |
percentRoundFn = (num) => Math.round(num * 100) / 100; |
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
javascript: (function() { | |
var styleEl = document.getElementById('css-layout-hack'); | |
if (styleEl) { | |
styleEl.remove(); | |
return; | |
} | |
styleEl = document.createElement('style'); | |
styleEl.id = 'css-layout-hack'; | |
styleEl.innerHTML = '* { background:#000!important;color:#0f0!important;outline:solid #f00 1px!important; background-color: rgba(255,0,0,.2) !important; }\ | |
* * { background-color: rgba(0,255,0,.2) !important; }\ |
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
global class PagingSortingController { | |
@AuraEnabled global static Account[] getAccounts() { | |
return [SELECT Name, Industry, AnnualRevenue FROM Account LIMIT 1000]; | |
} | |
} |
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
global class PagingSortingController { | |
@AuraEnabled global static Account[] getAccounts() { | |
return [SELECT Name, Industry, AnnualRevenue FROM Account LIMIT 1000]; | |
} | |
} |
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
require 'pry' | |
#require 'awesome_print' | |
# Write your code here! | |
def game_hash | |
game_hash = { | |
:home => { | |
:team_name => "Brooklyn Nets", | |
:colors => ["Black", "White"], |
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
require 'pry' | |
class PalindromeFinder | |
def initialize(string) | |
# code here | |
@string = string | |
end | |
def get_longest_palindrome | |
if @string.length >= 1 |