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
using System; | |
using System.Linq; | |
using System.Text; | |
using Android.Content; | |
using Android.Content.PM; | |
using Android.Util; | |
using Java.Security; | |
using Java.Util; | |
namespace WhateverNameSpace.Droid.Util |
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
// move to the class global level | |
using Android.Util; | |
using Java.Security; | |
using Java.Util; | |
using System.Text; | |
// move to the class global level | |
private static string HASH_TYPE = "SHA-256"; | |
private static int NUM_HASHED_BYTES = 9; | |
private static int NUM_BASE64_CHAR = 11; |
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
// this goes in your shared .Net Standard project | |
namespace WhateveryourNamespace.SharedProject.Helpers | |
{ | |
/// <summary> | |
/// Simple helper extension to access CrossCurrentActivity | |
/// plugin instance from your .NET Standard project. | |
/// </summary> | |
public static class CrossCurrentActivity | |
{ | |
/// <summary>Current settings to use</summary> |
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
using System; | |
using System.IO; | |
using System.Reflection; | |
namespace WhateverYourNamespace | |
{ | |
public static class JsonFileHelper | |
{ | |
public static string GetJsonFileString() | |
{ |
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
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using Xamarin.Forms; | |
namespace App2 | |
{ |
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 async Task ExecuteGoogleFormsSubmitAsync() | |
{ | |
// Init HttpClient to send the request | |
HttpClient client = new HttpClient(); | |
// Build the Field Ids and Answers dictionary object | |
// (replace with your Google Form Ids and Answers) | |
var bodyValues = new Dictionary<string, string> | |
{ | |
{"entry.1277095329","Orange Snails"}, |
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
// Imports you might need! ;) | |
//using HtmlAgilityPack; | |
//using System; | |
//using System.Collections.Generic; | |
//using System.Linq; | |
//using System.Threading.Tasks; | |
private static async Task<List<string>> ScrapeOffListOfFieldIdsFromGoogleFormsAsync(string yourGoogleFormsUrl) | |
{ | |
HtmlWeb web = new HtmlWeb(); |
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
:: Make sure ffprobe.exe and the video file is in the same folder | |
:: Download ffmpeg: https://www.ffmpeg.org/download.html | |
:: Command Line executable code | |
:: Get video length of a given mp4 file using ffprobe.exe | |
:: 0:01:01.812000 | |
:: HOURS:MM:SS.MICROSECONDS | |
ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 video_file_name.mp4 -sexagesimal | |
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
:: Make sure ffmpeg.exe and the video file is in the same folder | |
:: Download ffmpeg: https://www.ffmpeg.org/download.html | |
:: Command Line executable code | |
:: Split a given mp4 file using ffmpeg.exe | |
:: Method 1: From 00:00:00 To 00:00:15 | |
ffmpeg -i video_file_name.mp4 -ss 00:00:00 -t 00:00:15 -vcodec copy video_file_name_output.mp4 | |
:: Method 1: From 00:00:15 To End |
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
:: Generate a Video Slideshow from images in a folder on Windows | |
:: that's optimized for current system's screen resolution | |
:: Make sure your Images, ffmpeg executables, and this batch file are in the same folder | |
:: The images should be ".jpg" format, or you may change in the script below | |
:: Make sure to download ffmpeg: https://www.ffmpeg.org/download.html | |
:: Command Line executable code | |
:: Begin by getting the framerate. ex: 1/2 | |
:: This determines time span for each image to display | |
:: And load the images in the current directory |
OlderNewer