What do you want to save?
Add Code snippet
New code examples
-
Swift 2021-08-31 20:02:01
how to get the path of selected PDF/doc from file manager in ios swift programmatically
// Get the document directory url let documentsUrl = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first! do { // Get the directory contents urls (including subfolders urls) let directoryContents = try FileManager.defaul... Add solution -
TypeScript 2021-08-31 13:32:01
input adresse ville automatique
"use strict"; // This example requires the Drawing library. Include the libraries=drawing // parameter when you first load the API. For example: // <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBIwzALxUPNbatRBj3Xi1Uhp0f... Add solution -
Python 2021-08-31 12:07:02
rename row pandas
# if the row value in column 'is_blue' is 1 # Change the row value to 'Yes' # otherwise change it to 'No' df['is_blue'] = df['is_blue'].apply(lambda x: 'Yes' if (x == 1) else 'No') # You can also use mapping to accomplish the same result # Warning: M... Add solution -
Javascript 2021-08-30 20:55:01
javascript code to loop through array
var data = [1, 2, 3, 4, 5, 6]; // traditional for loop for(let i=0; i<=data.length; i++) { console.log(data[i]) // 1 2 3 4 5 6 } // using for...of for(let i of data) { console.log(i) // 1 2 3 4 5 6 } // using for...in for(let i in data) { con... Add solution -
Javascript 2021-08-30 03:06:01
array peremutation js recursion
const permutations = arr => { if (arr.length <= 2) return arr.length === 2 ? [arr, [arr[1], arr[0]]] : arr; return arr.reduce( (acc, item, i) => acc.concat( permutations([...arr.slice(0, i), ...arr.slice(i + 1)]).map(val =&g... Add solution -
Other 2021-08-29 22:55:01
google place api online example
// This example displays an address form, using the autocomplete feature // of the Google Places API to help users fill in the information. function fillInAddress() { // Get the place details from the autocomplete object. var place = autocomplete.get... Add solution -
Other 2021-08-29 21:56:02
how to decode jwt token client side
let b64DecodeUnicode = str => decodeURIComponent( Array.prototype.map.call(atob(str), c => '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2) ).join('')) let parseJwt = token => JSON.parse( b64DecodeUnicode( token.... Add solution
Best helpers
Ranking is empty