Skip to content

Instantly share code, notes, and snippets.

package com.willowtreeapps.demo;
import android.app.Activity;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.Window;
import android.webkit.WebView;
import android.webkit.WebViewClient;
public class MainActivity extends Activity {
@MinChanSike
MinChanSike / introrx.md
Created January 19, 2016 10:44 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
<canvas></canvas>
<canvas></canvas>
@MinChanSike
MinChanSike / README.md
Created February 2, 2018 07:39 — forked from lopspower/README.md
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

All hex value from 100% to 0% alpha:

@MinChanSike
MinChanSike / code.cs
Last active June 22, 2018 06:38
ASP.Net WebApi Custom Route
//Web Api Config
private void ConfigureWebApi(IAppBuilder app) {
var config = new HttpConfiguration();
config.MapHttpAttributeRoutes();
config.Routes.MapHttpRoute(
name: "DefaultApi",
routeTemplate: "api/{controller}/{id}",
defaults: new { id = RouteParameter.Optional }
);
config.UserCoreServices();
@MinChanSike
MinChanSike / PhonecallReceiver.java
Last active March 12, 2020 05:30 — forked from ftvs/PhonecallReceiver.java
Detecting an incoming call coming to an Android device
//Detecting an incoming call coming to an Android device
//Remember to set the appropriate permissions in AndroidManifest.xml as suggested in the Stackoverflow link.
//Usage example in comments. Source: http://stackoverflow.com/a/15564021/264619
//Explanation: http://gabesechansoftware.com/is-the-phone-ringing/#more-8
package com.gabesechan.android.reusable.receivers;
import java.util.Date;
import android.content.BroadcastReceiver;
import android.content.Context;
@MinChanSike
MinChanSike / order.cs
Created August 1, 2018 10:40
Ordering item by order pattern
var orderPattern = new int[] { 1, 4, 5, 3, 2 };
var myObject = Enumerable.Range(1, 5).Select(i => new
{
Id = i,
Value = $"Value-{i}"
});
myObject.Dump("My Original Object");
var orderedObj = myObject.OrderBy(data => Array.IndexOf(orderPattern, data.Id)).Select(data => data).ToArray();
orderedObj.Dump("Ordered Object");
@MinChanSike
MinChanSike / main.js
Created September 5, 2018 09:49 — forked from verekia/main.js
var MyMath = (function(){
// Put your private variables and functions here
return { // Here are the public methods
add:function(a, b){
return a + b;
}
};
})();

HTML5 Editable Table

Create and edit an HTML5 table without the use of a library. Uses HTML5's contenteditable and minimal JavaScript.

A Pen by MinChanSike on CodePen.

License.

Enterprise: NJVYC-BMHX2-G77MM-4XJMR-6Q8QF
Professional: KBJFW-NXHK6-W4WJM-CRMQB-G3CDH
Keys are generic ones. These are the same from MSDN account.
Product Key : -6Q8QF
Validity : Valid
Product ID : 00369-90000-00000-AA703
Advanced ID : XXXXX-03699-000-000000-00-1032-9200.0000-0672017