A Pen by Albino Tonnina on CodePen.
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(..., package.seeall) | |
| local GameRand = require "GameRand" | |
| -- create a GameRand object | |
| gr1=GameRand() | |
| -- seed with "test" | |
| gr1:seed('test') | |
| local physics = require("physics") | |
| physics.start() | |
| physics.setGravity( 0, 70 ) |
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 Data = { | |
| has: function (key) { | |
| return localStorage.getItem(key) !== null; | |
| }, | |
| get: function (key) { | |
| return Data.has(key) ? JSON.parse(localStorage.getItem(key)) : undefined; | |
| }, | |
| set: function (key, val) { | |
| localStorage.setItem(key, JSON.stringify(val)); | |
| }, |
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
| {"Default":{"name":"Default","sets":{"469eb8921edf75ed3360d5838f9585c0d7a82109":{"name":"Outline","string":"| ~ | (vFl)\n| ~ | (hFl)","id":"469eb8921edf75ed3360d5838f9585c0d7a82109"},"84676cd434499994ef5176c93d970e83079cbc6c":{"name":"Two column grid","string":"| ~ | ~ | (vFl)","id":"84676cd434499994ef5176c93d970e83079cbc6c"},"d521212626e4f9f144821a52dcdaf3e1f6c8cffd":{"name":"Three column grid","string":"| ~ | ~ | ~ | (vFl)","id":"d521212626e4f9f144821a52dcdaf3e1f6c8cffd"},"c9d432ed7d0ada04c98151ae5ba2b59d4d618c00":{"name":"Bootstrap 3","string":"$v = | ~ | 7.5px | 7.5px |\n$vC = | ~ |\n| $v*11 | $vC | ( vlp, | ~ )\n$h = | ~ |\n| $h | ( hlp, | ~ )","id":"c9d432ed7d0ada04c98151ae5ba2b59d4d618c00"}}}} |
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
| // ---- | |
| // Sass (v3.4.21) | |
| // Compass (v1.0.3) | |
| // ---- | |
| @mixin get-icon($icon-name) { | |
| font-style: normal; | |
| font-weight: normal; | |
| font-variant: normal; |
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
| let ultimatePrime = number => { | |
| let sqrt = (Math.floor(Math.sqrt(number))); | |
| for (let i = 2 ; i <= number/2; i++){ | |
| if(number % i === 0) { | |
| return 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
| 'use strict'; | |
| function reverseWords(str) { | |
| var reversedString = [], | |
| wordLen = 0; | |
| for (var i = str.length - 1; i >= 0; i--) { | |
| if (str[i] == ' ' || i === 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
| function fibonacci(n){ | |
| if(n<=1) | |
| return n; | |
| else | |
| return fibonacci(n-1) + fibonacci (n-2); | |
| } | |
| console.log(fibonacci(12)) |
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
| // display prime numbers up to n. | |
| 'use strict'; | |
| var isPrime = function isPrime(number) { | |
| if (number < 2) return false; | |
| var sqrt = Math.floor(Math.sqrt(number)); | |
| for (var i = 2; i <= sqrt; i++) { |
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 {Parser, ProcessNodeDefinitions} from 'html-to-react'; | |
| function Icon(props) { | |
| const {name, size, color} = props; | |
| //https://webpack.js.org/guides/dependency-management/#require-with-expression | |
| const rawSvgContent = require(`../../icons/svg/${glyph}.svg`); |
OlderNewer