Skip to content

Instantly share code, notes, and snippets.

View ufebri's full-sized avatar
🏠
Working from home

Uray Febri ufebri

🏠
Working from home
View GitHub Profile
public class PiramidCounter {
public static void main(String[] args) {
showPiramidCounter(5);
}
private static void showPiramidCounter(int n) {
int counter = 1;
for (int i = 1; i <= n; ++i) {
public class PiramidCounter {
public static void main(String[] args) {
showPiramidCounter(10);
}
private static void showPiramidCounter(int n) {
for (int i = 1; i <= n; ++i) {
for (int o = 1; o <= i; ++o) {
@ufebri
ufebri / Lazy Load.html
Last active June 14, 2019 13:20
Lazy Load For Blogger, full tutorial check on https://dbedboy.blogspot.com
<script type='text/javascript'>
//<![CDATA[
!function(t,e){"object"==typeof exports?module.exports=e(t):"function"==typeof define&&define.amd?define([],e(t)):t.LazyLoad=e(t)}("undefined"!=typeof global?global:this.window||this.global,function(t){"use strict";const e={src:"data-src",srcset:"data-srcset",selector:".lazyload"},r=function(){let t={},e=!1,s=0,o=arguments.length;"[object Boolean]"===Object.prototype.toString.call(arguments[0])&&(e=arguments[0],s++);let n=function(s){for(let o in s)Object.prototype.hasOwnProperty.call(s,o)&&(e&&"[object Object]"===Object.prototype.toString.call(s[o])?t[o]=r(!0,t[o],s[o]):t[o]=s[o])};for(;s<o;s++){n(arguments[s])}return t};function s(t,s){this.settings=r(e,s||{}),this.images=t||document.querySelectorAll(this.settings.selector),this.observer=null,this.init()}if(s.prototype={init:function(){if(!t.IntersectionObserver)return void this.loadImages();let e=this;this.observer=new IntersectionObserver(function(t){t.forEach(function(t){if(t.intersectionRatio>0){e.observer.uno