This file contains hidden or 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
| docker run --name test_postgres -e POSTGRES_PASSWORD=123456 -p 5433:5432 -d postgres | |
| # returns container is as a018bf7d5e0a | |
| # We'll be using this container to run psql commands | |
| # docker exec -it a018bf7d5e0a psql | |
| # Dump roles and schema | |
| supabase db dump --db-url "postgresql://[USER]:[PASSWORD]@[HOST]:5432/postgres" -f roles.sql --role-only | |
| supabase db dump --db-url "postgresql://[USER]:[PASSWORD]@[HOST]:5432/postgres" -f schema.sql |
This file contains hidden or 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
| Mac OSX | |
| Open your mac terminal | |
| insert this command | |
| ``` | |
| open -na Google\ Chrome --args --user-data-dir=/tmp/temporary-chrome-profile-dir --disable-web-security --disable-site-isolation-trials | |
| ``` | |
| Windows |
This file contains hidden or 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
| const AWS = require("aws-sdk"); | |
| const documentClient = new AWS.DynamoDB.DocumentClient(); | |
| let itemCount = 0; | |
| var params = { | |
| TableName: 'table_name', | |
| IndexName: 'part-range-index', | |
| KeyConditionExpression: '#t = :hkey', |
This file contains hidden or 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
| <?xml version="1.0" encoding="utf-8"?> | |
| <layout xmlns:android="http://schemas.android.com/apk/res/android" | |
| xmlns:app="http://schemas.android.com/apk/res-auto" | |
| xmlns:tools="http://schemas.android.com/tools"> | |
| <com.google.android.material.appbar.AppBarLayout | |
| android:id="@+id/mainappbar" | |
| android:layout_width="match_parent" | |
| android:layout_height="@dimen/_150dp" |
This file contains hidden or 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
| <?xml version="1.0" encoding="utf-8"?> | |
| <layout xmlns:app="http://schemas.android.com/apk/res-auto" | |
| xmlns:tools="http://schemas.android.com/tools" | |
| xmlns:android="http://schemas.android.com/apk/res/android"> | |
| <data> | |
| </data> | |
| <androidx.coordinatorlayout.widget.CoordinatorLayout |
This file contains hidden or 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
| private void createNotificationChannel() { | |
| // Create the NotificationChannel, but only on API 26+ because | |
| // the NotificationChannel class is new and not in the support library | |
| if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { | |
| CharSequence name = "name_of_channel"; | |
| String description = "description for notification channel"; | |
| int importance = NotificationManager.IMPORTANCE_DEFAULT; | |
| NotificationChannel channel = new NotificationChannel( "channel_id_here" , name, importance); | |
| channel.setDescription(description); | |
| // Register the channel with the system; you can't change the importance |
This file contains hidden or 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
| package com.jwhh.jim.notekeeper; | |
| import android.net.Uri; | |
| import android.provider.BaseColumns; | |
| /** | |
| * Created by Jim. | |
| */ | |
| public final class NoteKeeperProviderContract { | |
| private NoteKeeperProviderContract(){} |
This file contains hidden or 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
| package com.jwhh.jim.notekeeper; | |
| public final class NoteKeepDatabaseContract { | |
| private NoteKeepDatabaseContract(){} | |
| public static final class CourseInfoEntry{ | |
| public static final String TABLE_NAME = "course_info"; | |
| public static final String COLUMN_COURSE_ID = "course_id"; | |
| public static final String COLUMN_COURSE_TITLE = "course_title"; |
This file contains hidden or 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
| public class MainActivity extends AppCompatActivity implements View.OnClickListener { | |
| private ConstraintLayout constraintLayout; | |
| private Button button1; | |
| private Button button2; | |
| @Override | |
| protected void onCreate(Bundle savedInstanceState) { | |
| super.onCreate(savedInstanceState); | |
| setContentView(R.layout.activity_main); |