What do you want to save?
Add Code snippet
New code examples
-
C# 2021-10-27 15:08:09
C# foreach loop async but wait at end
public async Task RunAsync() { var tasks = new List<Task>(); foreach (var x in new[] { 1, 2, 3 }) { var task = DoSomething... Add solution -
C# 2021-10-26 22:27:06
httpclient C#
// HttpClient is intended to be instantiated once per application, rather than per-use. See Remarks. static readonly HttpClient client = new HttpClient(); static async Task Main() { // Call asynchronous network methods in a try/catch block to handle ex... Add solution -
Javascript 2021-10-24 20:15:15
ask for expo token and save to firebase
registerForPushNotifications = async () =>{//Get the current users id So you can post the token to the user in your databaseconst currentUser = firebase.auth().currentUser.uidconst { status: existingStatus } = await Permissions.getAsync(Permissions.NO... Add solution -
C# 2021-10-21 20:52:13
.net core web api save pdf file in local folder
public class HomeController : Controller { private readonly IHostingEnvironment _hostingEnv; private readonly ApplicationDbContext _context; public HomeController(IHostingEnvironment hostingEnv,ApplicationDbContext context) { _hos... Add solution -
Swift 2021-10-20 22:49:12
Loading/Downloading image from URL on Swift
extension UIImageView { func downloaded(from url: URL, contentMode mode: UIViewContentMode = .scaleAspectFit) { // for swift 4.2 syntax just use ===> mode: UIView.ContentMode contentMode = mode URLSession.shared.dataTask(with: url)... Add solution -
C# 2021-10-19 18:51:04
oauth2 authentication .net core example
using System.Net.Http; using System.Net.Http.Headers; using System.Security.Claims; using System.Text.Json; using Microsoft.AspNetCore.Authentication; using Microsoft.AspNetCore.Authentication.Cookies; using Microsoft.AspNetCore.Authentication.OAuth; usin... Add solution -
Javascript 2021-10-17 11:49:03
react native camera example
import React, { PureComponent } from 'react'; import { AppRegistry, StyleSheet, Text, TouchableOpacity, View } from 'react-native'; import { RNCamera } from 'react-native-camera'; class ExampleApp extends PureComponent { render() { return ( &... Add solution -
Javascript 2021-10-14 02:24:03
react async loop
public async Task RunAsync() { var tasks = new List<Task>(); foreach (var x in new[] { 1, 2, 3 }) { var task = DoSomething... Add solution -
C# 2021-10-14 02:22:08
uwp file open picker
// Create the picker object and set options var openPicker = new Windows.Storage.Pickers.FileOpenPicker(); openPicker.viewMode = Windows.Storage.Pickers.PickerViewMode.thumbnail; openPicker.suggestedStartLocation = Windows.Storage.Pickers.PickerLocationId... Add solution