Skip to content

Instantly share code, notes, and snippets.

View pokk's full-sized avatar
🌀

Jieyi pokk

🌀
View GitHub Profile
@pokk
pokk / README.md
Last active October 24, 2016 03:25
Using build-in camera simplely

Introduction

Here we introduce how to use build-in camera to take a picture in both of Android and iOS devices.

Android

Take a picture.

iOS

@pokk
pokk / README.md
Created October 20, 2016 01:15
Preferences settings in Xcode

Introduction

How to set the convenient preferences in Xcode.

@pokk
pokk / README.md
Last active October 20, 2016 01:20
Three builder method in Kotlin
@pokk
pokk / README.md
Last active November 8, 2016 08:34
Hide soft keyboard when clicking the outside of EditText

Introduction

When touch out of the edit text's range, the soft keyboard will be closed automatically in Android.

@pokk
pokk / README.md
Last active April 5, 2017 02:42
A great variety of timer in Android
@pokk
pokk / README.md
Created October 12, 2016 00:57
Using a heyperlink at TextView in iOS

Introduction

In Xmarin, we basically used c# language to develop an iOS application, we need to use hyperlink in textview.
But if we wanna change to Obj-c code, that's the same grammar.

@pokk
pokk / README.md
Last active October 12, 2016 00:43
Get enum description

Intrduction

Get enum description from enum class, similar get variable name directly.

@pokk
pokk / README.md
Last active March 31, 2017 07:52
Automatically jump to next item

Intrduction

When we click enter key, when can foucs to next item automatically.

Javascript

$('body').on('keydown', 'input, select, textarea', function (e)
{
@pokk
pokk / README.md
Last active March 31, 2017 07:57
Limit the number of lines in Textarea

Introduction

Limit the number of lines in Textarea.

Html

<textarea data-limit-rows="true" cols="60" rows="4"></textarea>
@pokk
pokk / README.md
Last active April 5, 2017 02:12
Eazy way to run once for each cell in a map

Introduction

We use itertools.product lib to run a map instead of double for loop.

Detail

This functions is actually creating a Cartesian product.

Talk is cheap. Show me the code.