// Unit testing with junit
testImplementation 'junit:junit:4.13.2'
// Core library
androidTestImplementation 'androidx.test:core:1.3.0'
// AndroidJUnitRunner and JUnit Rules,Runner
View resize.kt
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
private fun makeViewFullWidth(view: View) { | |
val point = Point() | |
// point will be populated with screen width and height | |
activity?.windowManager?.defaultDisplay?.getSize(point) | |
val param = view.layoutParams | |
param.width = point.x | |
param.height = point.y | |
view.layoutParams = param | |
} |
View lib.md
View convert text into image.sh
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
for i in `seq 1001`; | |
do | |
text2image --text $i.gt.txt --outputbase /home/owner/Downloads/output/im$i --xsize 680 --ysize 200 --fonts_dir /usr/share/fonts/truetype/Amiri/ --font 'Amiri' --margin 0 --ptsize 30 --degrade_image --char_spacing 1; | |
done | |
View Helper.kt
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.inova.algym.utils | |
import android.Manifest | |
import android.content.Context | |
import android.content.pm.PackageManager | |
import android.location.Location | |
import android.location.LocationListener | |
import android.location.LocationManager | |
import android.os.Bundle | |
import androidx.core.content.ContextCompat |
View tokens
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
void main() { | |
RegExp exp = new RegExp(r"[a-zA-Z]+"); | |
String str = "Parse my string"; | |
print('${getByToken(str, '[a-zA-Z]+')}'); | |
} | |
List<String> getByToken(var str , var token){ | |
RegExp exp = new RegExp("${token}"); | |
print('${exp.pattern}'); | |
Iterable<RegExpMatch> matches = exp.allMatches(str); |
View server code
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.example.firstapp; | |
import androidx.appcompat.app.AppCompatActivity; | |
import android.app.Activity; | |
import android.content.ComponentName; | |
import android.content.Intent; | |
import android.content.pm.PackageManager; | |
import android.os.Bundle; | |
import android.util.Log; |
View utils
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
implementation 'com.google.code.gson:gson:2.8.5' | |
implementation 'com.jakewharton:butterknife:10.1.0' | |
annotationProcessor "com.jakewharton:butterknife-compiler:10.1.0" | |
implementation "com.balsikandar.android:crashreporter:1.0.9" | |
implementation 'com.squareup.retrofit2:retrofit:2.3.0' | |
implementation 'com.squareup.retrofit2:converter-gson:2.3.0' |
View 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
import java.util.Scanner; | |
public class Try { | |
public static void main(String[] args) { | |
Scanner in=new Scanner(System.in); | |
int n=in.nextInt(); | |
Scanner S=new Scanner(System.in); | |
String []s=new String[30]; | |
for (int i = 0; i < n; i++) { | |
s[i]=S.nextLine(); | |
} |