-i - ignore errors
-c - continue
-t - use video title as file name
--extract-audio - extract audio track
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Windows.Forms; | |
| using System.Runtime.InteropServices; | |
| using System.Drawing; | |
| using System.Threading; | |
| using Timer = System.Windows.Forms.Timer; | |
| using System.IO; |
| using System.Collections.Generic; | |
| using System.Linq; | |
| public static class ExtFibIteration | |
| { | |
| private static int __fib_step(int current, ref int last) | |
| { | |
| int result = current + last; | |
| last = current; | |
| return result; |
| class PngIconConverter | |
| { | |
| /* input image with width = height is suggested to get the best result */ | |
| /* png support in icon was introduced in Windows Vista */ | |
| public static bool Convert(System.IO.Stream input_stream, System.IO.Stream output_stream, int size, bool keep_aspect_ratio = false) | |
| { | |
| System.Drawing.Bitmap input_bit = (System.Drawing.Bitmap)System.Drawing.Bitmap.FromStream(input_stream); | |
| if (input_bit != null) | |
| { | |
| int width, height; |
| // Photoshop Script for Optimizing Images for the Web - Saves images as optimized jpeg | |
| // Written by: Livingston Samuel | |
| // Version 1.0.0 | |
| // Required Adobe Photoshop CS 2 and above | |
| //Enable double clicking on Mac Finder & Windows Explorer | |
| #target Photoshop | |
| //Bring app to front | |
| app.bringToFront() |
| public void copyFileOrDir(String path) { | |
| AssetManager assetManager = this.getAssets(); | |
| String assets[] = null; | |
| try { | |
| assets = assetManager.list(path); | |
| if (assets.length == 0) { | |
| copyFile(path); | |
| } else { | |
| String fullPath = "/data/data/" + this.getPackageName() + "/" + path; | |
| File dir = new File(fullPath); |
This is a simple MarkupExtension for Xamarin.Forms that imitates an if-else-statement. It was inspired by Thomas Levesque on https://stackoverflow.com/a/841894/6884587
Usage:
You can also add a StringFormat:
| <?php | |
| function convertGeoToPixel($lat, $lon){ | |
| $mapWidth = 400; | |
| $mapHeight = 260; | |
| $mapLonLeft = -180; | |
| $mapLonRight = 180; | |
| $mapLonDelta = $mapLonRight - $mapLonLeft; |