This file contains 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
1. Async task is a helper class used for doing background work in separate thread and post the result back to the UI thread . | |
2. It has 3 generics as input, params, progress,result | |
3. 4 methods onPreExecute(), doInBackground(),onProgressUpdate(),onPostExecute() | |
4. UI thread should start execute method. | |
5. Async task can be cancelled at any point of time. onCancelled () will be called if its cancelled. And we can check isCancelled and exit the doInbackground method() | |
6. This is not used for very long running operations. | |
7. It can be used for short background operations typpically for few seconds. | |
study about |
This file contains 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
1. activity is a screen displayed to the user with the user interface controls | |
2. an application will consist many activity but atleast one will be main to start with | |
3. it has following life cycle | |
oncreate -> onstart/onrestarted -> onresume -> onpause -> onstop -> ondestroy | |
for more questions explain on life cycle and back stack | |
oncreate | |
-is called when the activity is creataed |
This file contains 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
1. it is used for background proces such as downloading a file. | |
2. it does not need user interface | |
3. for writing a service we need to extend the base service class provided by android | |
it is two kind: | |
1. service started | |
2. service bound | |
lifeCycle: | |
start service : |
This file contains 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
Intent | |
- is a messaging object with in the app components | |
- used to invoke any component from any other app components | |
- can carry small amount of information along with that for the invoking component to act upon it | |
type: | |
Expicit - when the optional argument which is qualified class name is given to an intent, it becomes the explicit intent | |
Implicit - when the action, data and mime type, category is given the android OS searches all the other apps intent filters for the given action, data and mime type , category to match the intent to invoke. if there are many options are available then the chooser is given to the user to select the appropriate one. | |
This file contains 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
Let’s see how to install PostgreSQL 9.3 Server and PGAdmin3 on a clean Ubuntu OS in detail! | |
Install dependency | |
Open Terminal and execute the following commands: | |
sudo apt-get update | |
sudo apt-get -y install python-software-properties | |
Add PostgreSQL 9.3 repository | |
Before installing PostgreSQL 9.3, we have to add the PostgreSQL repository where the packages are located. |
This file contains 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
sudo -u postgres psql | |
ALTER USER postgres PASSWORD 'newPassword' |
This file contains 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
<link rel="import" href="../core-item/core-item.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; | |
width: 100%; | |
height: 100%; |
This file contains 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
ps aux | grep sublime | awk '{ print $2 }' |
This file contains 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
heroku config:set REDIS_PROVIDER=REDISTOGO_URL | |
Sidekiq will automatically use it. | |
Also create a config/initializers/redis.rb and put the below content | |
if ENV["REDISCLOUD_URL"] | |
$redis = Redis.new(:url => ENV["REDISCLOUD_URL"]) | |
end |
This file contains 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
{{$guid}} | |
the above variable will generate UUID in Postman Rest Client | |
Sample request is below | |
======================== | |
{ | |
"user":{ | |
"id":"{{$guid}}" | |
} | |
OlderNewer