Best iOS and Android libraries every mobile developer should know

opensource-300x173

iOS

AFNetwork (network)

UALogger (logging)

JSONModel (model object mapping, from json to class)

JsonDB (json DB store, query and manipulation)

Fabric (Crashlytics, collect crash report)

DFImageManger (image preheating, caching and loading)

DeepLinkKit (deep link)

HCSStarRatingView (star rating)

CleverTap (data collection, analysis, push notification)

UICKeyChainStore (resolve keychain pain)

Google-Mobile-Ads (ads)

FBAudiceNetwork (ads)

Toast (android toast like view)

SVProgressHUD (progress hud)

UITextField+Shake (UITextField category with shake effect)

NSString-Email (NSString category to check string is email or not)

Xcode’s memory debugging facilities: Visual Memory Debugger, Zombies Instrument, Address Sanitizer, Thread Sanitizer and malloc diagnostics

AppCode (much better than Xcode in coding)

 

Android

Glide (image loading, caching)

Genymotion Android Emulator (much faster than Android Studio Emulator)

 

Donate $5 to me for a coffee with PayPal and read more professional and interesting technical blog articles about web and mobile development. Feel free to visit my web app, WhizWallet, to apply for credit, store or gift cards, DealsPlus to browse daily deals and store coupons to save money, BlackFriday.fm to check latest news, ads and sales in BlackFriday shopping season.

Follow me @Yaoli0615 at Twitter to get latest tech updates.

 

 

Advertisements
Posted in CS Research&Application, iOS, Uncategorized | Tagged , , | Leave a comment

Best Practice for Coding

wpid-Programming-Wallpaper-3

1. Annotation always write before the code

2. Remove the console.log message and the redundant code once done.

3. For Javascript, prefer console.debug() when you have to have temporary logging in the code.

4. killall python

5. If need more data export and import, install MongoDB locally is better than using mLab.

 

To be continue …

Donate $5 to me for a coffee with PayPal and read more professional and interesting technical blog articles about web and mobile development. Feel free to visit my web app, WhizWallet, to apply for credit, store or gift cards, DealsPlus to browse daily deals and store coupons to save money.

Follow me @Yaoli0615 at Twitter to get latest tech updates.

Posted in CS Research&Application, Intern&Job, IT, Uncategorized | Tagged , , | Leave a comment

Web Basics

447567-the-best-web-hosting-services-for-2014
1. authentication: who you are
authorization: what you can do

cookie: more physical

session: context (teaching – learning, lecturing)
session cookie (bank login)
persistent cookie (remember me option)
token – certificate

2. multi-thread

context thread
thread pool
blocking I/O
single thread
non-blocking I/O (then go to end of queue)
3. Semantic Versioning
breaking . feature . fix (1.3.1)
~ (tilde): update to the latest fix version
^ (caret): update to the latest feature and fix versions
4. Socket vs Port
A socket represents a single connection between two network applications.
A port represents an endpoint or “channel” for network communications.
5. NoSQL is not schema free, but dynamic schema (implicit structure/schema, row and column, match to code expectation)

6. Reactive Programming

a sequence of data stream
cancellable (subscription)
used in both frontend and backend, stream data is like audio, video, stock ticket info, twitter tweets, IoT data, etc.
Pull vs Push
Pull: consumer, function, iterators, active
Push: producer, Promises, Observables, passive
Observable: play from beginning for every subscriber
Subject: on live, no replay
7. SQL vs NoSQL
MySQL (Netflix user info, movie info, payment)
need transaction (transfer money), strong consistency (no same name in system), well structured
MongoDB (Comments)
more flexible, frequent write
S3 (movie data)
huge size, no need mutation
replica (whole data)
shard (partial data)

 

8. Apache Benchmark (A/B test)
ab -c 100 -n 1000 https://www.google.com/
9. Code Editor
Brackets (friendly to front end development)
10. ECMAScript 6 equivalents in ES5 (link)
11. Regular Expression
online tool: RegExr
12. 在 2016 年学 JavaScript 是一种什么样的体验?(link)

Donate $5 to me for a coffee with PayPal and read more professional and interesting technical blog articles about web and mobile development. Feel free to visit my web app, WhizWallet, to apply for credit, store or gift cards, DealsPlus to browse daily deals and store coupons to save money.Follow me @Yaoli0615 at Twitter to get latest tech updates.

Posted in CS Research&Application, IT, Uncategorized | Tagged , | Leave a comment

How the Web Works

447567-the-best-web-hosting-services-for-2014How the Web Works: A Primer for Newcomers to Web Development (or anyone, really)

https://medium.freecodecamp.org/how-the-web-works-a-primer-for-newcomers-to-web-development-or-anyone-really-b4584e63585c

How the Web Works Part II: Client-Server Model & the Structure of a Web Application

https://medium.freecodecamp.org/how-the-web-works-part-ii-client-server-model-the-structure-of-a-web-application-735b4b6d76e3

How the Web Works Part III: HTTP & REST

https://medium.freecodecamp.org/how-the-web-works-part-iii-http-rest-e61bc50fa0a

 

A Beginner-Friendly Introduction to Containers, VMs and Docker

https://medium.freecodecamp.org/a-beginner-friendly-introduction-to-containers-vms-and-docker-79a9e3e119b

Linux namespace and control group.

 

Donate $5 to me for a coffee with PayPal and read more professional and interesting technical blog articles about web and mobile development. Feel free to visit my web app, WhizWallet, to apply for credit, store or gift cards, DealsPlus to browse daily deals and store coupons to save money.

Follow me @Yaoli0615 at Twitter to get latest tech updates.

Posted in CS Research&Application, Uncategorized | Tagged , , , | Leave a comment

Advanced Algorithm Research Notes

daie-algorithms

1. KMP

Problem: find a substring in a string

brute force: start from every position in str1 and compare with str2, time is O(n*m).

optimization idea: position 1 and position 2 comparison is independent.

prefix without last one and prefix without first one in str2.

application: check tree T1 in T2, serialize and find substring.

2. Manacher

problem:longest palindrome substring (最长回文子串)in O(n)

idea:最右回文覆盖(边界),回文中心,过程绑定在某些不回退的变量

explanation:

“abc121def” => “#a#b#c#1#2#1#d#e#f”

3. 完美洗牌算法

4. 矩阵快速幂

1) 严格固定(状态转移方程)

2) F(k) = F(1) * |k * k| ^ (n -k)

application: Fibonacci Series

idea: brute force solution => optimized solution (Recursion => Memorized Search => DP

1) 试法(recursion)

2)确定维数(参数个数)process(array, index, aim) => dp[index][aim]

3)初始状态(不依赖任何其他位置)

4)结果位置

5)任意点的依赖位置

5. 蓄水池算法

6. BFPRT

Problem: find nth smallest element in an array.

Solution idea: not randomly pick the initial value.

 

Donate $5 to me for a coffee with PayPal and read more professional and interesting technical blog articles about web and mobile development. Feel free to visit my web app, WhizWallet, to apply for credit, store or gift cards, DealsPlus to browse daily deals and store coupons to save money.
Follow me @Yaoli0615 at Twitter to get latest tech updates.

 

Resources:

Core Java Volume I–Fundamentals (10th Edition) (Core Series)

Core Java, Volume II–Advanced Features (10th Edition) (Core Series)

Test-Driven Java Development

Java Concurrency in Practice

Java: An Introduction to Problem Solving and Programming (7th Edition)

Java 9 for Programmers (Deitel Developer Series)

Java SE8 for the Really Impatient: A Short Course on the Basics (Java Series)

Core Java for the Impatient

Java: The Beginners Guide for every non-programmer which will attend you trough your learning process

Java Deep Learning Essentials

Machine Learning in Java

Learning Reactive Programming With Java 8

Java 9 Programming By Example

Thinking in Java (4th Edition)

The Java EE Architect’s Handbook, Second Edition: How to be a successful application architect for Java EE applications

Java Artificial Intelligence: Made Easy, w/ Java Programming

Posted in CS Research&Application, Uncategorized | Tagged | Leave a comment

Javascript Learning Notes

asyncawait

1. Javascript Engine is synchronous

2. Browser and NodeJS are asynchronous, main thread in NodeJS is a single thread.

3. AngularJS: two way data binding

4. Callback
Execute and obey after master/boss give an order (Callback functions define the order that different actions occur, callback provides a level of control so you can determine the custom order)

5. Promise
Resolve “callback hell”, make it more clear and understandable.
(A promises holds the place of a value that does not exist yet, but will certainly exist in future)
Promises are a great way of giving clarity to consecutive asynchronous functions and clarifying inputs and outputs)

The key to promises is the concept of unfilled, filled or rejected. Once you create a sequence of these promises, you have a clear flow of inputs and outputs, and clear code for others to read. You can use 3 different states to track the progress of the entire chain of promises. The style is synchronous (sequential), even though the actual execution is asynchronous.

6. Promise All vs Race

Promise.all leads to a success when all conditions are met, or results in failure when one of the conditions fails (without waiting for the others).

Promise.race sets the program pending the outcome of the first condition tested in a list. Depending on whether the result is a success or a failure, promise.race is a success or a failure, without awaiting the result of other conditions.

7. Javascript uses dictionary-like structure for property insert and access, it takes O(n) time.

Nodejs is built on Chrome V8 engine. (use the code)

 

8. IO
File Read/Write
Database
Network

 

9. Git

https://www.atlassian.com/git/tutorials/learn-git-with-bitbucket-cloud

merge: keep 2 branches, merge changes in feature branch to master branch, no message overridden
rebase: keep a linear structure, based on master branch, have a clean commit history but override commit message

10. At sign (@) before package name in npm package.json (refer link)

This is a new feature of NPM called ‘scoped packages’. They effectively allow NPM packages to be namespaced – any package that starts with @angular/ will get grouped into a @angular folder in your node_modules.

The reason that scoped packages don’t show up in public search is because a lot of them are private packages created by organizations using NPM’s paid services, and they’re not comfortable opening the search up until they can be totally certain they’re not going to make anything public that shouldn’t be public – from a legal perspective, this is pretty understandable.

For more information, see the npm docs, or the angular docs

 

Reference:
https://medium.freecodecamp.org/javascript-callbacks-explained-using-minions-da272f4d9bcd

https://medium.freecodecamp.org/javascript-promises-explained-by-gambling-at-a-casino-28ad4c5b2573

https://www.xul.fr/javascript/promise-all-race.php

https://blog.thoughtram.io/angular/2016/10/13/two-way-data-binding-in-angular-2.html

Learn How To Debug JavaScript with Chrome DevTools

How to get the most out of the JavaScript console

JavaScript ES6+: var, let, or const?

https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/

Donate $5 to me for a coffee with PayPal and read more professional and interesting technical blog articles about web and mobile development. Feel free to visit my web app, WhizWallet, to apply for credit, store or gift cards, DealsPlus to browse daily deals and store coupons to save money.

Follow me @Yaoli0615 at Twitter to get latest tech updates.

Posted in CS Research&Application, Uncategorized | Tagged , , , | Leave a comment

Install common libs in Ubuntu

ruiiq

I host a Ubuntu (14.04) image in MacOS VirtualBox and there are some tips to install commonly used libraries:

1. open Chrome in ubuntu hosted in mac VirtualBox
Error: NSS_VersionCheck(“3.26”) failed.
Solution:
(sudo apt-get --only-upgrade install libnss3)

Tips: download chrome from google chrome home page

2. Install NodeJS

sudo apt-get update

curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash –

sudo apt-get install -y nodejs

3. Install Nodemon

sudo npm install -g nodemon

4. Install git

sudo apt-get install git

5. Install angular/cli

sudo npm install -g @angular/cli

6. Install Redis

wget http://download.redis.io/releases/redis-3.2.6.tar.gz

tar xzf redis-3.2.6.tar.gz

cd redis-3.2.6

make

sudo make install

cd utils

sudo ./install_server.sh

 

service redis_6379 status/restart/start/stop

 

7. Install pip

(sudo apt-get update)

sudo apt install python-pip

sudo pip install Flask

8 . Install Docker

curl -fsSL https://get.docker.com/ | sh

Setup docker permission:

sudo usermod -aG docker $(whoami)

(you need to logout and login again after set permission)

To start docker when the system boots: sudo systemctl enable docker

sudo systemctl enable docker

https://askubuntu.com/questions/304860/what-is-the-systemctl-equivalent

sudo update-rc.d docker defaults

9. Install Nginx

sudo apt-get update

sudo apt-get install nginx
verify nginx installed

(For ubuntu 16.04)

Add following two lines into /etc/apt/sources.list

deb http://nginx.org/packages/ubuntu/ xenial nginx

deb-src http://nginx.org/packages/ubuntu/ xenial nginx

Then run:

sudo apt-get update

sudo apt-get install nginx

Error:
GPG error: http://nginx.org xenial InRelease: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY XXXXXXXXXXXX2
Refer:
Solution:
sudo apt-key adv –keyserver keyserver.ubuntu.com –recv-keys [PUBLIC_KEY]
10. Visual Studio Code
11. Speed up Ubuntu in VirtualBox
12. Angular/cli
ng serve
(ctrl + shift + c to exit)

 

Donate $5 to me for a coffee with PayPal and read more professional and interesting technical blog articles about web and mobile development. Feel free to visit my web app, WhizWallet, to apply for credit, store or gift cards, DealsPlus to browse daily deals and store coupons to save money.
Follow me @Yaoli0615 at Twitter to get latest tech updates.

 

Posted in CS Research&Application, Uncategorized | Tagged , | Leave a comment