Skip to content

Instantly share code, notes, and snippets.

View rakib10rr3's full-sized avatar
🏠
Working from home

Rakibul Huda rakib10rr3

🏠
Working from home
View GitHub Profile
#1.1 - You have a table and want to see all of the data in it.
SELECT * FROM EMP;
#1.2 - You have a table and want to see only rows that satisfy a specific condition.
SELECT * FROM EMP WHERE DEPTNO = 10;
#1.3 - You want to return rows that satisfy multiple conditions.
SELECT * FROM EMP WHERE DEPTNO = 10 OR COMM IS NOT NULL OR SAL <= 2000 AND DEPTNO = 20;
SELECT * FROM EMP WHERE (DEPTNO = 10 OR COMM IS NOT NULL OR SAL <= 2000) AND DEPTNO = 20;
#1.1 - You have a table and want to see all of the data in it.
SELECT * FROM EMP;
#1.2 - You have a table and want to see only rows that satisfy a specific condition.
SELECT * FROM EMP WHERE DEPTNO = 10;
#1.3 - You want to return rows that satisfy multiple conditions.
SELECT * FROM EMP WHERE DEPTNO = 10 OR COMM IS NOT NULL OR SAL <= 2000 AND DEPTNO = 20;
SELECT * FROM EMP WHERE (DEPTNO = 10 OR COMM IS NOT NULL OR SAL <= 2000) AND DEPTNO = 20;
@rakib10rr3
rakib10rr3 / (app)build.grade
Created May 13, 2020 08:20
important dependencies for android app level module
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.core:core-ktx:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
@rakib10rr3
rakib10rr3 / build.grade
Created May 13, 2020 08:16
android project level build file for jetpack and other important libraries
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.3.72'
ext.retrofit_version = '2.6.0'
ext.lifecycle_version = "2.2.0"
ext.nav_version = '2.2.0'
ext.moshi_version = "1.9.2"
ext.room_version = "2.2.5"
@rakib10rr3
rakib10rr3 / MiddleDividerItemDecoration.kt
Created April 13, 2020 18:19 — forked from Veeyikpong/MiddleDividerItemDecoration.kt
MiddleDividerItemDecoration, suitable for both LinearLayoutManager and GridLayoutManager.
/*
* Copyright 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
1.Add dependencies
def nav_version = "2.1.0"
implementation "androidx.navigation:navigation-fragment-ktx:$nav_version"
implementation "androidx.navigation:navigation-ui-ktx:$nav_version"
onView(withClassName(Matchers.equalTo(DatePicker::class.java.name))).perform(PickerActions.setDate((1935..2007).random(), (1..12).random(), (1..31).random()))
onView(withId(android.R.id.button1)).perform(click())
class ClickCloseIconAction : ViewAction {
override fun getConstraints(): Matcher<View> {
return ViewMatchers.isAssignableFrom(Chip::class.java)
}
override fun getDescription(): String {
return "click drawable "
}
//This method will work on a checkbox. It will set the state of checkbox either checked or unchecked
private fun setChecked(checked: Boolean): ViewAction {
return object : ViewAction {
override fun getDescription(): String? {
return null
}
override fun getConstraints(): Matcher<View> {
return object : BaseMatcher<View>() {
override fun matches(item: Any): Boolean {