<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Lotp&#39;s Blog</title>
		<link>https://blog.lotp.xyz/</link>
		<description>Recent content on Lotp&#39;s Blog</description>
		<generator>Hugo</generator>
		<language>en</language>
		
		
		
		
			<lastBuildDate>Fri, 01 Jan 2021 20:00:00 +0000</lastBuildDate>
		
			<atom:link href="https://blog.lotp.xyz/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>An Articulation of the O(KN) Solution to &#39;Leetcode 887: Super Egg Drop&#39;</title>
				<link>https://blog.lotp.xyz/posts/leetcode-887-super-egg-drop/</link>
				<pubDate>Fri, 01 Jan 2021 20:00:00 +0000</pubDate>
				<guid>https://blog.lotp.xyz/posts/leetcode-887-super-egg-drop/</guid>
				<description>&lt;p&gt;&lt;img src=&#34;https://blog.lotp.xyz/images/2020/superEggDrop/cover.png&#34; alt=&#34;Super Egg Drop&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://leetcode.com/problems/super-egg-drop/&#34;&gt;&amp;lsquo;Super Egg Drop&amp;rsquo;&lt;/a&gt; is a very classic &lt;strong&gt;DP&lt;/strong&gt; problem. Good articles explaining the O(KN*N) and the O(KN*logN) solutions can be easily found from the internet. Better than that, there is a solution of O(KN). However, there isn&amp;rsquo;t much about the O(KN) solution and the rare posts about it aren&amp;rsquo;t very clear. The article you are reading now is an endeavor to fill this gap.&lt;/p&gt;&#xA;&lt;h1 id=&#34;check-out-the-problem&#34;&gt;Check Out The Problem&lt;/h1&gt;&#xA;&lt;p&gt;You are given &lt;code&gt;K&lt;/code&gt; eggs, and you have access to a building with &lt;code&gt;N&lt;/code&gt; floors from 1 to &lt;code&gt;N&lt;/code&gt;&lt;/p&gt;</description>
			</item>
			<item>
				<title>[LeetCode 233, AC] Number of Digit One Done With DP</title>
				<link>https://blog.lotp.xyz/posts/leetcode-233-number-of-digit-one/</link>
				<pubDate>Mon, 25 May 2020 19:39:16 +0000</pubDate>
				<guid>https://blog.lotp.xyz/posts/leetcode-233-number-of-digit-one/</guid>
				<description>&lt;pre&gt;&lt;code&gt;Given an integer n, count the total number of digit 1 appearing in all non-negative integers less than or equal to n.&#xA;&#xA;Example:&#xA;&#xA;Input: 13&#xA;Output: 6 &#xA;Explanation: Digit 1 occurred in the following numbers: 1, 10, 11, 12, 13.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s try to solve &lt;a href=&#34;https://leetcode.com/problems/number-of-digit-one/&#34;&gt;this problem&lt;/a&gt; by dividing it into smaller quizzes:&lt;/p&gt;&#xA;&lt;p&gt;For example, to caculate the result for 2954:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;count(2954)=count(2000)+count(954)&lt;/li&gt;&#xA;&lt;li&gt;count(954)=count(900)+count(54)&lt;/li&gt;&#xA;&lt;li&gt;count(54)=count(50)+count(4)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Now we got the conclusion that &lt;code&gt;count(2954)=count(2000)+count(900)+count(50)+count(4)&lt;/code&gt;, which is leading us to the question of how to get &lt;code&gt;count(i*10^j)&lt;/code&gt;&lt;/p&gt;</description>
			</item>
			<item>
				<title>Reading Notes: How Google Works</title>
				<link>https://blog.lotp.xyz/posts/reading-notes-how-google-works/</link>
				<pubDate>Fri, 17 Jan 2020 20:30:00 +0000</pubDate>
				<guid>https://blog.lotp.xyz/posts/reading-notes-how-google-works/</guid>
				<description>&lt;h2 id=&#34;definitions&#34;&gt;Definitions&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Technical insights&lt;/p&gt;&#xA;&lt;p&gt;A technical insight is a new way of applying technology or design that either drives down the cost or increases the functions and usability of the product by a significant factor.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;What is a good product&lt;/p&gt;&#xA;&lt;p&gt;The best products are still the ones that are based on technical insights, those unique ideas that apply one or more technologies in a new way to solve big problems.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;A Successful Product Is The One Fails To Fail&lt;/p&gt;</description>
			</item>
			<item>
				<title>Reading Notes: The Checklist Manifesto</title>
				<link>https://blog.lotp.xyz/posts/reading-notes-the-checklist-manifesto/</link>
				<pubDate>Sun, 20 Jan 2019 16:30:00 +0000</pubDate>
				<guid>https://blog.lotp.xyz/posts/reading-notes-the-checklist-manifesto/</guid>
				<description>&lt;p&gt;&lt;a href=&#34;https://www.amazon.com/Checklist-Manifesto-How-Things-Right/dp/0312430000&#34;&gt;The Checklist Manifesto&lt;/a&gt; is a book from &lt;a href=&#34;https://en.wikipedia.org/wiki/Atul_Gawande&#34;&gt;Atul Gawande&lt;/a&gt;. I learned the following three points from this book.&lt;/p&gt;&#xA;&lt;h4 id=&#34;all-tasks-can-be-divided-into-3-groups&#34;&gt;All Tasks Can Be Divided into 3 Groups&lt;/h4&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;simple ones:&lt;/p&gt;&#xA;&lt;p&gt;Simple problems are ones like baking a cake from a mix. There is a recipe. Sometimes there are a few basic techniques to learn. But once these are mastered, following the recipe brings a high likelihood of success.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;complicated ones:&lt;/p&gt;&#xA;&lt;p&gt;Ones like launcing a rocket. They can sometimes be broken down into a series of simple problems. Once you learn how to send a rocket to the moon, you can repeat the process with other rockets and perfect it.&lt;/p&gt;</description>
			</item>
			<item>
				<title>A Simple but Effective Learning Algorithm: MS Syntax</title>
				<link>https://blog.lotp.xyz/posts/a-simple-but-effective-spaced-repitition-algorithm-ms/</link>
				<pubDate>Sun, 12 Aug 2018 08:56:00 +0000</pubDate>
				<guid>https://blog.lotp.xyz/posts/a-simple-but-effective-spaced-repitition-algorithm-ms/</guid>
				<description>&lt;p&gt;&lt;img src=&#34;https://blog.lotp.xyz/images/2018/08/learnFast.jpg&#34; alt=&#34;Sample Image Added via Markdown&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Personally I have been using spaced repetition algorithm in my study for many years. There are many different kinds of this algorithm and the one I have used is invented by BlueRaja called &lt;a href=&#34;http://www.blueraja.com/blog/477/a-better-spaced-repetition-learning-algorithm-sm2&#34;&gt;SM2+&lt;/a&gt;. Based on this algorithm I have written a lib called &lt;a href=&#34;https://github.com/lo-tp/sm2-plus&#34;&gt;sm2-plus&lt;/a&gt; and I liked it a lot. However, SM2+ has its own problem.&lt;/p&gt;&#xA;&lt;p&gt;In this post I will show you what problems SM2+ algorithm has and provide a new algorithm named Memory Scheduler that I find quite helpful in my learning.&lt;/p&gt;</description>
			</item>
			<item>
				<title>My First Try at TDD: How I Test Asynchronous Code in Mocha With async/await Syntax</title>
				<link>https://blog.lotp.xyz/posts/my-first-try-at-tdd-how-i-test-asynchronous-code-in-mocha-with-async-await-syntax/</link>
				<pubDate>Thu, 05 Jan 2017 13:56:47 +0000</pubDate>
				<guid>https://blog.lotp.xyz/posts/my-first-try-at-tdd-how-i-test-asynchronous-code-in-mocha-with-async-await-syntax/</guid>
				<description>&lt;p&gt;Every body knows that writing unit test is very important during programming.&#xA;However, it is not an easy job, especially when it comes to &lt;code&gt;asynchronous code&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Initially, callback has to be used to test &lt;code&gt;asynchronous code&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;describe&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;User Profile&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#66d9ef&#34;&gt;function&lt;/span&gt;(){&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#a6e22e&#34;&gt;it&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;can get user profile&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#66d9ef&#34;&gt;function&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;done&lt;/span&gt;){&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#a6e22e&#34;&gt;getProfile&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;bulkan&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#66d9ef&#34;&gt;function&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;err&lt;/span&gt;, &lt;span style=&#34;color:#a6e22e&#34;&gt;result&lt;/span&gt;){&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#66d9ef&#34;&gt;if&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;err&lt;/span&gt;) {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#a6e22e&#34;&gt;done&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;err&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#a6e22e&#34;&gt;assert&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;equal&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;result&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;userName&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;bulkan&amp;#39;&lt;/span&gt;);&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#a6e22e&#34;&gt;done&lt;/span&gt;();&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    });&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  });&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;});&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This kind of test could easily turned out to be a [callback hell][ch] when the logic become complex.&#xA;Thank god, with the advent of &lt;code&gt;promise&lt;/code&gt;, testing &lt;code&gt;asynchronous code&lt;/code&gt; is not that much depressing now.&lt;/p&gt;</description>
			</item>
			<item>
				<title>[LeetCode 417, AC] Pacific Atlantic Water Flow</title>
				<link>https://blog.lotp.xyz/posts/leetcode-417-ac-pacific-atlantic-water-flow/</link>
				<pubDate>Tue, 13 Dec 2016 14:22:33 +0000</pubDate>
				<guid>https://blog.lotp.xyz/posts/leetcode-417-ac-pacific-atlantic-water-flow/</guid>
				<description>&lt;p&gt;Given an m x n matrix of non-negative integers representing the height of each unit cell in a continent, the &amp;ldquo;Pacific ocean&amp;rdquo; touches the left and top edges of the matrix and the &amp;ldquo;Atlantic ocean&amp;rdquo; touches the right and bottom edges.&lt;/p&gt;&#xA;&lt;p&gt;Water can only flow in four directions (up, down, left, or right) from a cell to another one with height equal or lower.&lt;/p&gt;&#xA;&lt;p&gt;Find the list of grid coordinates where water can flow to both the Pacific and Atlantic ocean.&lt;/p&gt;</description>
			</item>
			<item>
				<title>[LeetCode 455, AC] Assign Cookies</title>
				<link>https://blog.lotp.xyz/posts/leetcode-455-ac-assign-cookies/</link>
				<pubDate>Sat, 10 Dec 2016 01:49:42 +0000</pubDate>
				<guid>https://blog.lotp.xyz/posts/leetcode-455-ac-assign-cookies/</guid>
				<description>&lt;p&gt;Assume you are an awesome parent and want to give your children some cookies. But, you should give each child at most one cookie. Each child i has a greed factor gi, which is the minimum size of a cookie that the child will be content with; and each cookie j has a size sj. If sj &amp;gt;= gi, we can assign the cookie j to the child i, and the child i will be content. Your goal is to maximize the number of your content children and output the maximum number.&lt;/p&gt;</description>
			</item>
			<item>
				<title>How to Use Postmessage to Communicate with iframe in React</title>
				<link>https://blog.lotp.xyz/posts/how-to-use-postmessage-to-communicate-with-iframe-in-react/</link>
				<pubDate>Thu, 01 Dec 2016 06:57:44 +0000</pubDate>
				<guid>https://blog.lotp.xyz/posts/how-to-use-postmessage-to-communicate-with-iframe-in-react/</guid>
				<description>&lt;p&gt;We all know that we should avert the use of iframe, but sometimes, we have no choice but to use it.&#xA;This article is about how to use postmessage to communicate with an iframe using React.&#xA;Assumptions were made that you know what is postmessage and how to use it, so if you are not familiar with it, read this this &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage&#34;&gt;introduction to postmessage&lt;/a&gt; before moving on.&#xA;At first I want you to know as we need to run js on websites within and outside the child iframe so this method can only be used when you have administration privilege on both sides.&lt;/p&gt;</description>
			</item>
			<item>
				<title>[LeetCode 126, TLE] Word Ladder II</title>
				<link>https://blog.lotp.xyz/posts/leetcode-126-word-ladder-ii/</link>
				<pubDate>Sat, 26 Nov 2016 09:39:16 +0000</pubDate>
				<guid>https://blog.lotp.xyz/posts/leetcode-126-word-ladder-ii/</guid>
				<description>&lt;p&gt;If you come here for a solution to the problem, you are in a wrong place.&#xA;Because &lt;strong&gt;my code for this quiz wasn&amp;rsquo;t accepted yet&lt;/strong&gt; and the purpose of this post is to make a summary about what I have learnt about BFS from doing this exercise.&#xA;I will share my code at the end of this post and any ideas on where my code is wrong would be greatly appreciated.&lt;/p&gt;</description>
			</item>
			<item>
				<title>How-to-Write-Your-Redux-Action-in-a-More-Concise-Style</title>
				<link>https://blog.lotp.xyz/posts/how-to-write-your-redux-action-in-a-more-concise-style/</link>
				<pubDate>Sun, 06 Nov 2016 06:26:22 +0000</pubDate>
				<guid>https://blog.lotp.xyz/posts/how-to-write-your-redux-action-in-a-more-concise-style/</guid>
				<description>&lt;p&gt;Let&amp;rsquo;s say you are working on a project about article writing and now you are about to write actions to create and update articles.&#xA;To create an article, you would need an action creator like this.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-js&#34; data-lang=&#34;js&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;export&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;const&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;createArticle&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;title&lt;/span&gt; =&amp;gt; {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;return&lt;/span&gt; {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#a6e22e&#34;&gt;type&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;ARTICLE&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#a6e22e&#34;&gt;operation&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;CREATE&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#a6e22e&#34;&gt;title&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;When it comes to article updating, you need another action creator.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-js&#34; data-lang=&#34;js&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;export&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;const&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;updateArticle&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; ( &lt;span style=&#34;color:#a6e22e&#34;&gt;newTitle&lt;/span&gt;, &lt;span style=&#34;color:#a6e22e&#34;&gt;title&lt;/span&gt;) =&amp;gt; {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;return&lt;/span&gt; {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#a6e22e&#34;&gt;type&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;ARTICLE&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#a6e22e&#34;&gt;operation&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;UPDATE&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#a6e22e&#34;&gt;title&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#a6e22e&#34;&gt;newTitle&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;These two functions looks like each other very much.&#xA;Tasks like these are tedious and you may wonder if there is a way to get rid of these repetitive jobs.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Drag Gestures Inside Mobile Browsers Implemented Purely by CSS and JS</title>
				<link>https://blog.lotp.xyz/posts/drag-gestures-inside-mobile-browsers-purely-in-css-and-js/</link>
				<pubDate>Wed, 07 Sep 2016 04:46:00 +0000</pubDate>
				<guid>https://blog.lotp.xyz/posts/drag-gestures-inside-mobile-browsers-purely-in-css-and-js/</guid>
				<description>&lt;p&gt;&lt;img src=&#34;https://blog.lotp.xyz/images/swipteToDelete.gif&#34; alt=&#34;Swipe To Delete&#34;&gt;&#xA;Drag gesture, like the image above, is a very good interaction model for touch devices.&#xA;This article is about the implementation of drag gesture on mobile browsers.&lt;/p&gt;&#xA;&lt;p&gt;I use react to simplify the code. However you can accomplish it without any framework.&lt;/p&gt;&#xA;&lt;p&gt;The basic idea is to make a scrollable widget comprised by two component.&#xA;The first component is always visible while the second one(named &lt;strong&gt;drag-btn&lt;/strong&gt; in this article) can only be seen after scrolling.&lt;/p&gt;</description>
			</item>
			<item>
				<title>A Painless Way to Clone an Existing Linux OS to Another Disk</title>
				<link>https://blog.lotp.xyz/posts/clone-an-existing-linux-os-to-another-disk-without-pain/</link>
				<pubDate>Mon, 29 Aug 2016 09:08:11 +0000</pubDate>
				<guid>https://blog.lotp.xyz/posts/clone-an-existing-linux-os-to-another-disk-without-pain/</guid>
				<description>&lt;p&gt;We all know that installing operation system is a toil.&#xA;&lt;strong&gt;So let&amp;rsquo;s say no to restinalling OS.&lt;/strong&gt;&#xA;Recently, I bought a larger SSD and intended to use it to replace the older one.&#xA;In order to circumvent all the dull jobs I have to do with the reinstalling thing, I decided to clone the existing Ubuntu Mate 14.04 from my older SSD to the newly bought one.&#xA;Luckily I succeeded.&lt;/p&gt;</description>
			</item>
			<item>
				<title>How to Customize Password Resetting Page in Meteor</title>
				<link>https://blog.lotp.xyz/posts/how-to-customize-password-resetting-page-in-meteor/</link>
				<pubDate>Mon, 29 Aug 2016 07:24:48 +0000</pubDate>
				<guid>https://blog.lotp.xyz/posts/how-to-customize-password-resetting-page-in-meteor/</guid>
				<description>&lt;p&gt;Meteor Already has a built-in password reset mechanism.&#xA;Normally, you would use it with the &lt;code&gt;accounts-ui&lt;/code&gt; package.&#xA;But things become tricky when you want to customize the password resetting page.&#xA;In this article, I will walk you through on how to implement your own password resetting page in Meteor.&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
