/*
Made by [egy.js](https://www.instagram.com/egy.js/);
*/
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
| /* | |
| * Copyright (c) 2018 Nam Nguyen, nam@ene.im | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
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
| override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View { | |
| binding = DataBindingUtil.inflate(inflater, R.layout.your_fragment, container, false) | |
| binding.homeAction.setOnClickListener { select(R.id.home_action) } | |
| binding.likesAction.setOnClickListener { select(R.id.likes_action) } | |
| binding.searchAction.setOnClickListener { select(R.id.search_action) } | |
| binding.profileAction.setOnClickListener { select(R.id.profile_action) } | |
| return binding.root | |
| } | |
| fun select(id: Int) { |
Pure CSS "carousel"(heavy emphasis on the quotes there)
Leveraging use of how elements behave in the DOM in combination with features of CSS makes implementing a pure CSS "carousel" relatively trivial.
Read more in a blog post here Enjoy!
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
| ffmpeg -i 'input' -vf scale=720:-1 -c:v libx264 -crf 18 -preset veryslow -c:a copy 'output' |
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
| /** | |
| * Given a Flow A, returns a [Flow] that emits a pair of the latest value emitted by A (as the | |
| * second value of the pair), and the previous value emitted before (as the first value of the | |
| * pair). | |
| * | |
| * Example | |
| * ``` | |
| * val originalFlow = flowOf(1, 2, 3, 4) | |
| * originalFlow.flowWithPrevious().collect { (l, r) -> | |
| * println("Left: $l, Right: $r") |
This script attaches a stopwatch into the toolbar of Leetcode's problem page.
The feature is simple:
- Start/Stop the stopwatch
- Auto start after 2 mins remaining on the problem
- Restore unstopped stopwatch for the next visit on the problem
Use this script with any browser extension allowing attaching JS to the page. (I use User JavaScript and CSS)
OlderNewer
