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
module.exports = { | |
toBuddhistYear: (moment, format) => { | |
var christianYear = moment.format('YYYY') | |
var buddhishYear = (parseInt(christianYear) + 543).toString() | |
return moment | |
.format(format.replace('YYYY', buddhishYear).replace('YY', buddhishYear.substring(2, 4))) | |
.replace(christianYear, buddhishYear) | |
} | |
} |
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
SoundPoolManager.getInstance().play(getContext(), R.raw.any_sound); | |
MediaPlayerManager.getInstance().play(getContext(), R.raw.any_sound); |
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
┌─────────────────────┬────────────┬──────────────────────────────────────────┬──────────┬─────────────┬────────────────────────────┬──────────────────────┐ | |
│ MODEL_ID │ MAKE │ MODEL_NAME │ FORM │ RESOLUTION │ OS_VERSION_IDS │ TAGS │ | |
├─────────────────────┼────────────┼──────────────────────────────────────────┼──────────┼─────────────┼────────────────────────────┼──────────────────────┤ | |
│ 1610 │ Vivo │ vivo 1610 │ PHYSICAL │ 1280 x 720 │ 23 │ reduced_stability=23 │ | |
│ AmatiTvEmulator │ Google │ Google TV Amati │ VIRTUAL │ 1080 x 1920 │ 29 │ beta=29 │ | |
│ AndroidTablet270dpi │ Generic │ Generic 720x1600 Android tablet @ 270dpi │ VIRTUAL │ 1600 x 720 │ 30 │ │ | |
│ F01L │ FUJITSU │ F-01L │ PH |
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
PackageManager pm = getPackageManager(); | |
Intent main = new Intent(Intent.ACTION_MAIN, null); | |
main.addCategory(Intent.CATEGORY_LAUNCHER); | |
List<ResolveInfo> packages = pm.queryIntentActivities(main, 0); | |
ArrayList<String> app_name_list = new ArrayList<String>(); | |
ArrayList<String> app_package_list = new ArrayList<String>(); | |
for(ResolveInfo resolve_info : packages) { | |
try { |
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
name: Android CI | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
test: |
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
#!/bin/zsh | |
# Copy artifact from JFrog to another Nexus | |
# | |
# ## Prerequisites: ## | |
# * macOS | |
# * zsh | |
# * jq | |
# * wget | |
# * curl | |
# * JFrog |
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
import android.core.view.AccessibilityDelegateCompat | |
import android.core.view.ViewCompat | |
val button: Button = /* ... */ | |
ViewCompat.setAccessibilityDelegate( | |
button, | |
object : AccessibilityDelegateCompat() { | |
override fun performAccessibilityAction(host: View?, action: Int, args: Bundle?): Boolean { | |
return false |
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
package com.lmwn.poc.dialogwithconfigchanges | |
import androidx.appcompat.app.AppCompatActivity | |
import android.os.Bundle | |
import android.view.LayoutInflater | |
import android.view.View | |
import android.view.ViewGroup | |
import androidx.fragment.app.DialogFragment | |
import com.lmwn.poc.dialogwithconfigchanges.databinding.ActivityMainBinding | |
import com.lmwn.poc.dialogwithconfigchanges.databinding.ViewAwesomeDialogBinding |
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
const axios = require('axios') | |
/* ... */ | |
const params = new URLSearchParams() | |
params.append('name', 'Akexorcist') | |
params.append('age', '28') | |
params.append('position', 'Android Developer') | |
params.append('description', 'birthdate=25-12-1989&favourite=coding%20coding%20and%20coding&company=Nextzy%20Technologies&website=http://www.akexorcist.com/') | |
params.append('awesome', true) |
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
// Image Media Path : /document/image:48645 | |
// Real file Path : /storage/emulated/0/DCIM/Camera/IMG_20140606_123326982.jpg | |
public void onActivityResult(int requestCode, int resultCode, Intent data) { | |
if (requestCode == REQUEST_GALLERY && resultCode == RESULT_OK) { | |
Uri uri = data.getData(); | |
String path = getRealPathFromURI(getApplicationContext(), uri); | |
Log.e("Check", "URI Path : " + uri.getPath()); |
NewerOlder