What do you want to save?
Add Code snippet
New code examples
-
C# 2022-01-26 12:21:19
load information with txt file to uwp c#
private async Task AddTextToFile(String textToSave) { var appFolder = Windows.Storage.ApplicationData.Current.LocalFolder; var file = await appFolder.CreateFileAsync("exposure.txt", Windows.Storage.CreationCollisionOption.OpenIf... Add solution -
C# 2022-01-26 08:40:54
how to calculate ratio in c#
public string GetRatio(int a, int b) { var gcd = GCD(a, b); return string.Format("{0}:{1}", a / gcd, b / gcd); } public int GCD(int a, int b) { return b == 0 ? Math.Abs(a) : GCD(b, a % b); } // Tomas Pajonk's Answer: public int GCD_(int a,... Add solution -
Kotlin 2022-01-23 09:50:20
how to limit decimal in double kotlin
val number:Double = 0.0449999 val number3digits:Double = String.format("%.3f", number).toDouble() val number2digits:Double = String.format("%.2f", number3digits).toDouble() val solution:Double = String.format("%.1f", number2d... Add solution -
C# 2021-11-21 08:16:25
Remover usuário de Grupo AD c#
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Data;using System.Collections;using System.DirectoryServices;using System.IO; namespace ADUsersFromGroup{ class Program { static ArrayList _userNa... Add solution -
Other 2021-11-21 06:52:16
send message to azure service bus queue with postman
using System; using System.Globalization; using System.Security.Cryptography; using System.Text; using System.Web; class MainClass { static readonly string queueOrTopicUrl = "TODO"; // Format: "https://<service bus namespac... Add solution -
C# 2021-11-20 11:31:11
How to center text in console application
//copy this into your IDE //write your own text instead of "Custom Text" and run string textToEnter = "Custom Text"; Console.WriteLine(String.Format("{0," + ((Console.WindowWidth / 2) + (textToEnter.Length / 2... Add solution -
Python 2021-11-17 19:48:20
python to lua converter
I wound up figuring it out on my own after some hardcore trial and error. The function rgb2short should have been: function rgb2short(rgb) -- Find closest xterm-256 approximation to the given RGB value _create_dicts() rgb = _strip_hash(rg... Add solution -
Java 2021-11-16 15:34:25
calculate distance from source to destination in android
//import this import com.google.maps.android.SphericalUtil; public class Detailed extends AppCompatActivity { //define object for storing latitude and longitude coordinates LatLng YourLocationData; LatLng DestinationData; Double Distance; @Override ... Add solution