nvm install x.xx.x --reinstall-packages-from=y.y.y
x.xx.x stands for the new version
y.y.y stands for the old version
npm i -g npm
| package com.example.simpletablayout; | |
| import android.os.Bundle; | |
| import android.support.annotation.Nullable; | |
| import android.support.design.widget.TabLayout; | |
| import android.support.v4.app.Fragment; | |
| import android.support.v4.app.FragmentManager; | |
| import android.support.v4.app.FragmentPagerAdapter; | |
| import android.support.v4.view.ViewPager; | |
| import android.support.v7.app.AppCompatActivity; |
| package com.udacity.popularmovies; | |
| import android.content.res.Resources; | |
| import android.support.v7.app.AppCompatActivity; | |
| import android.os.Bundle; | |
| import android.util.Log; | |
| import java.util.Locale; | |
| public class MainActivity extends AppCompatActivity { |
| package com.udacity.popularmovies; | |
| import android.content.res.Resources; | |
| import android.support.v7.app.AppCompatActivity; | |
| import android.os.Bundle; | |
| import android.util.DisplayMetrics; | |
| import android.util.Log; | |
| import java.util.Locale; |
| package com.udacity.myapplication; | |
| import android.support.v7.app.AppCompatActivity; | |
| import android.os.Bundle; | |
| import android.view.View; | |
| import android.widget.Button; | |
| import android.widget.Toast; | |
| public class ReuseOfToastObjectActivity extends AppCompatActivity { |
| package com.udacity.myapplicationtest; | |
| import android.support.v7.app.AppCompatActivity; | |
| import android.os.Bundle; | |
| import android.util.Log; | |
| /** | |
| * Official documentation: | |
| * https://developer.android.com/reference/android/app/Activity | |
| */ |
| -- TIME STAMP SAMPLE FOR NEW ROWS and UPDATE A EXISTING ROW | |
| create table table_name ( | |
| id int unsigned not null auto_increment, | |
| column_abc varchar(255) not null, | |
| column_created timestamp not null default current_timestamp, | |
| column_updated timestamp not null default current_timestamp on update current_timestamp, | |
| primary key (id) | |
| ); |
| // Get unix current DATETIME | |
| long epoch = System.currentTimeMillis()/1000; | |
| Log.v(">>EPOCH NOW DATE>>>", String.valueOf(epoch)); |
| /** | |
| * When a item list is clicked the news item will be shown on the device browser. | |
| * | |
| * @param url is Web Url of the news item. | |
| */ | |
| private void openWebPage(String url) { | |
| Uri uriWebPage = Uri.parse(url); | |
| Intent intent = new Intent(Intent.ACTION_VIEW, uriWebPage); | |
| if (intent.resolveActivity(getPackageManager()) != null) { | |
| startActivity(intent); |