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 static int WORK_HOURS_PER_DAY = 8; | |
private static int WORK_DAYS_PER_WEEK = 5; | |
public static int calculatePayforWeek(int payPerHour){ | |
int s = payPerHour*WORK_HOURS_PER_DAY*WORK_DAYS_PER_WEEK; | |
return s; | |
} |
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
public static int calculatePayforWeek(int payPerHour){ | |
int s = payPerHour*5*8; | |
return s; | |
} |
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
public static void copyNumbers(int a1[], int a2[]) { | |
for (int i = 0; i < a1.length; i++) { | |
a2[i] = a1[i]; | |
} | |
} |
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
public static void copyNumbers(int source[], int destination[]) { | |
for (int i = 0; i < source.length; i++) { | |
destination[i] = source[i]; | |
} | |
} |
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
public List<Integer> getEvenNumbers(List<Integer> theList) { | |
List<Integer> list1 = new ArrayList<Integer>(); | |
for (Integer i : theList) | |
if (i%2 == 0) | |
list1.add(i); | |
return list1; | |
} |
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
public List<Integer> getThem(List<Integer> theList) { | |
List<Integer> list1 = new ArrayList<Integer>(); | |
for (Integer i : theList) | |
if (i%2 == 0) | |
list1.add(i); | |
return list1; | |
} |
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
public void removeMovie(final int id) { | |
Observable.fromCallable(new Func0<Integer>() { | |
@Override | |
public Integer call() { | |
return database.delete(MyDatabaseHelper.TABLE_FAVORITES, MyDatabaseHelper.COLUMN_ID + " = " + id, null); | |
} | |
}).subscribeOn(Schedulers.io()) | |
.observeOn(Schedulers.io()) | |
.subscribe(new Action1<Integer>() { | |
@Override |
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
android { | |
//..... | |
} | |
// map for the version code that gives each ABI a value. make sure to list all ABIs mentioned in splits block, an keep the order. | |
ext.versionCodes = ['armeabi': 3, 'armeabi-v7a': 4, 'arm64-v8a': 5, mips: 6, 'x86': 7, 'x86_64': 8] | |
import com.android.build.OutputFile | |
// For each APK output variant, override versionCode with a combination of | |
// ABI APK value * 1000 + defaultConfig.versionCode | |
android.applicationVariants.all { variant -> |
NewerOlder