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 { formatEther } from 'viem' | |
export const formatBalance = ( | |
balance = 0, | |
maxDecimalDigits, | |
noFormat = false, | |
) => { | |
const balanceString = noFormat ? balance.toString() : formatEther(balance) | |
if (balanceString.includes('.')) { |
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 a = [1, 3, 5, 7]; | |
var it = a[Symbol.iterator](); | |
it.next().value; // 1 | |
it.next().value; // 3 | |
it.next().value; // 5 |
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 fibonacci = (function () { | |
var cache = {}; | |
return function(n) { | |
// Base case | |
if(n==0 || n == 1) | |
return n; | |
// Recurse only if necessary |
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
ng build --prod --output-path docs --base-href |
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
Filter | |
app.filter('unsafe', function($sce) { return $sce.trustAsHtml; }); | |
Usage | |
<ANY ng-bind-html="value | unsafe"></ANY> |
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 height = document.getElementsByClassName('job'); | |
var maxH = 0; | |
var arr = []; | |
var max; | |
for(var j=0; j<height.length; j++){ | |
maxH = Math.max(maxH, height[j].clientHeight); | |
arr.push(height[j].clientHeight); | |
max = Math.max(...arr); | |
} | |
console.log('arr ', arr); |
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
background: linear-gradient(to right, rgba(0,0,0,.6), rgba(0,0,0,.6)), url(https://i.stack.imgur.com/tgLtG.jpg); |
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
<div class="accordion"> | |
<div class="accordion-item"> | |
<div class="accordion-item-title">We build your dream</div> | |
<div class="accordion-item-content">Content text</div> | |
</div> | |
<div class="accordion-item"> | |
<div class="accordion-item-title">Connecting people</div> | |
<div class="accordion-item-content">Content text</div> | |
</div> | |
<div class="accordion-item"> |
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
.owl-carousel{ | |
margin-top: 30px; | |
} | |
.owl-controls { | |
text-align: center; | |
margin-top: -40px; | |
height: 40px; | |
background-color: rgba(103, 103, 103, 0.65); | |
line-height: 58px; | |
position: relative; |
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
*{ | |
box-sizing: border-box; | |
-moz-box-sizing: border-box; /*Firefox 1-3*/ | |
-webkit-box-sizing: border-box; /* Safari */ | |
} | |
div{ | |
box-sizing: border-box; | |
-moz-box-sizing: border-box; /*Firefox 1-3*/ | |
-webkit-box-sizing: border-box; /* Safari */ | |
} |
NewerOlder