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
| initscript { | |
| // Enter a local Maven server URL. | |
| // Hardcode or get from system property. | |
| val localMavenUrl = "" | |
| // This affects the repositories configuration | |
| // in the buildscript block of the top-level build.gradle(.kts). | |
| gradle.rootProject { | |
| buildscript { | |
| repositories { |
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
| import YourMPPFramework | |
| import RxSwift | |
| class KtError: Error { | |
| let error: KotlinThrowable | |
| init(_ error: KotlinThrowable) { | |
| self.error = error | |
| } | |
| } |
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
| Pod::Spec.new do |s| | |
| s.name = 'TemplateProject' | |
| s.version = 'VERSION' | |
| s.authors = { | |
| 'name1' => 'email1', | |
| 'name2' => 'email2' | |
| } | |
| s.license = 'Proprietary' | |
| s.homepage = 'https://github.com/Ekahau/TemplateProject' | |
| s.summary = 'Project description may appear here' |
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
| // This script is for avoiding NDK build issue on old AGP. | |
| gradle.beforeProject { | |
| Properties properties = new Properties() | |
| properties.load(rootProject.file("local.properties").newDataInputStream()) | |
| def ndkPath = properties.getProperty("ndk.dir", null) | |
| if (ndkPath == null) { | |
| println("ndk.dir should be set in local.properties.") | |
| return | |
| } | |
| def arm64Path = ndkPath + File.separator + 'toolchains' + File.separator + 'aarch64-linux-android-4.9' |
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
| ext { | |
| buildTime = System.currentTimeMillis() | |
| } | |
| static def getCopyApkTaskName(def variant) { | |
| return "copy${variant.name.capitalize()}Apk" | |
| } | |
| static def getCopyBundleTaskName(def variant) { | |
| return "copy${variant.name.capitalize()}Bundle" |
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 static String getSpaces(int count) { | |
| StringBuilder spaces = new StringBuilder(); | |
| for (int i = 0; i < count; i++) { | |
| spaces.append(" "); | |
| } | |
| return spaces.toString(); | |
| } | |
| public static View findRootView(View view) { | |
| ViewParent viewParent = view.getParent(); |
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
| void sortList(@SuppressWarnings("SameParameterValue") final boolean isAsc, List<String> contentItems) { | |
| Collections.sort(contentItems, new Comparator<String>() { | |
| @Override | |
| public int compare(String str1, String str2) { | |
| if (str1 == null || str2 == null) { | |
| return 0; | |
| } | |
| //noinspection StringEquality | |
| if (str1 == str2) { | |
| return 0; |
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
| def deleteBuildDir(def variant) { | |
| delete variant.packageApplicationProvider.get().outputDirectory | |
| } | |
| def setBuildTime() { | |
| project.ext.set("buildTime", System.currentTimeMillis()) | |
| } | |
| def getBuildTime() { | |
| def date = new Date(project.ext.buildTime) |
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 RemoveSpecificElementFromListTest { | |
| private static final String DEL = "r"; | |
| private static final int EXPECTED_SIZE = 7; | |
| private List<String> stringList; | |
| @Before | |
| public void setup() { | |
| stringList = new ArrayList<>(Arrays.asList("A", "r", "r", "a", "y", "l", "i", "s", "t")); | |
| } |
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
| See my DASH-IF presentation from October, 2014: | |
| https://s3.amazonaws.com/misc.meltymedia/dash-if-reveal/index.html#/ | |
| 1. encode multiple bitrates with keyframe alignment: | |
| ffmpeg -i ~/Movies/5D2_Portrait.MOV -s 1280x720 -c:v libx264 -b:v 1450k -bf 2 \ | |
| -g 90 -sc_threshold 0 -c:a aac -strict experimental -b:a 96k -ar 32000 out.mp4 | |
| My input was 30 fps = 3000 ms. If it were 29.97, then a GOP size of 90 frames will yield a base segment | |
| size of 3003 milliseconds. You can make the segment size some multiple of this, e.g.: 6006, 9009, 12012. |
NewerOlder