Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma
You can get the list of supported formats with:
ffmpeg -formats
You can get the list of installed codecs with:
import com.android.build.gradle.api.ApplicationVariant | |
import com.android.build.gradle.api.BaseVariantOutput | |
import com.android.build.gradle.internal.api.BaseVariantOutputImpl | |
android { | |
//... | |
applicationVariants.all(ApplicationVariantAction()) | |
} |
Param( | |
$filePath, | |
[switch]$reverse = $false | |
) | |
## Usage | |
# | |
# From binary to UTF8 base-64 file with "b64" extension: | |
# .\convert_binary_file_to_base64.ps1 path\to\file.bin | |
# |
/* Copyright 2020 Seanghay Yath (@seanghay) | |
SPDX-License-Identifier: Apache-2.0 */ | |
sealed class ResultOf<out T> { | |
data class Success<out R>(val value: R): ResultOf<R>() | |
data class Failure( | |
val message: String?, | |
val throwable: Throwable? | |
): ResultOf<Nothing>() | |
} |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Mobile HLS video</title> | |
</head> | |
<body> | |
<h1>Mobile HLS video</h1> |
import android.content.Context; | |
import android.content.pm.PackageInfo; | |
import android.content.pm.PackageManager; | |
import android.content.pm.PackageManager.NameNotFoundException; | |
import android.content.pm.Signature; | |
public class TamperCheck { | |
//we store the hash of the signture for a little more protection | |
private static final String APP_SIGNATURE = "1038C0E34658923C4192E61B16846"; |
jQuery's $.getScript
function is a quick and easy way to include external JavaScript files into a website. However, its default implimentation will not cache the script file for the client.
The following information describes how you can itilize cached versions of $.getScript
TL;DR* Here's what the license entails:
1. Anyone can copy, modify and distribute this software.
2. You have to include the license and copyright notice with each and every distribution.
3. You can use this software privately.
4. You can use this software for commercial purposes.
5. If you dare build your business solely from this code, you risk open-sourcing the whole code base.
/** | |
* Attempts to start an activity to handle the given intent, excluding activities of this app. | |
* <ul> | |
* <li>If the user has set a default activity (which does not belong in this app's package), it is opened without prompt.</li> | |
* <li>Otherwise, an intent chooser is displayed that excludes activities of this app's package.</li> | |
* </ul> | |
* | |
* @param context context | |
* @param intent intent to open | |
* @param chooserTitle the title that will be displayed for the intent chooser in case one needs to be displayed. |
/* | |
@author longcat (Pichaya Morimoto) | |
This code snippet can be used to resolve BOT (Bank Of Thailand) mobile security requirement "insecure background" | |
without hurting user experience in mobile app. | |
Briefly, when the app is pushed into background mode (user presses the Home button) | |
Android phone will create screenshot of the current Activity for displaying it in recent apps menu | |
The recent's app screenshots will be stored at: |