Some gems have issues installing on macOS. There is a list of possible solutions.
https://gist.github.com/fernandoaleman/ee3ac6957c2ba4f7d7d33a251d58b191
brew install openssl
var translations: [String: [String:String]] = [ | |
"en": [ | |
"title": "Title English", | |
"content": "Hello World" | |
], | |
"de": [ | |
"title": "Title Deutsch", | |
"content": "Hallo Welt" | |
] |
Some gems have issues installing on macOS. There is a list of possible solutions.
https://gist.github.com/fernandoaleman/ee3ac6957c2ba4f7d7d33a251d58b191
brew install openssl
Some gems have issues installing on macOS. | |
There is a list of possible solutions. | |
### mysql2 | |
https://gist.github.com/fernandoaleman/ee3ac6957c2ba4f7d7d33a251d58b191 | |
``` | |
brew install openssl |
defmodule Solution do | |
#Enter your code here. Read input from STDIN. Print output to STDOUT | |
end | |
array_length = IO.read(:stdio, :line) | |
array = IO.read(:stdio, :line) | |
array_length | |
|> String.trim | |
|> String.to_integer |
[ | |
{ | |
"content": "Your time is limited, so don't waste it living someone else's life.", | |
"author": "Steve Jobs" | |
}, | |
{ | |
"content": "It does not matter how slowly you go, as long as you do not stop.", | |
"author": "Confucius" | |
}, | |
{ |
struct FilmSeries { | |
var title: String | |
var season: Int? | |
var episode: Int? | |
} | |
var series = [ | |
FilmSeries(title: "3-1", season: 3, episode: 1), | |
FilmSeries(title: "3-2", season: 3, episode: 2), | |
FilmSeries(title: "3-3", season: 3, episode: 3), |
import UIKit | |
struct FilmSeries { | |
var title: String | |
var season: Int? | |
var episode: Int? | |
} | |
var series = [ | |
FilmSeries(title: "Pilot", season: 1, episode: 1), |
people = [{name: 'Alice'}, {name: 'Bob'}, {name: 'Bill'}, {name: 'Alex'}, {name: 'John'}]; | |
people.reduce((obj, person) => { | |
const firstLetter = person.name[0].toUpperCase(); | |
return { | |
...obj, | |
[firstLetter]: [...(obj[firstLetter] || []), person] | |
} | |
}, {}); |
// Original article: https://m.pardel.net/tdd-in-xcode-playgrounds-544a95db11e2 | |
import XCTest | |
struct Todo { | |
} | |
class TodoTests: XCTestCase { | |
override func setUp() { |
require 'ostruct' | |
alternatives = [ | |
OpenStruct.new(name: "A1", weight: 1), | |
OpenStruct.new(name: "A2", weight: 1), | |
OpenStruct.new(name: "A3", weight: 1), | |
OpenStruct.new(name: "A4", weight: 1), | |
OpenStruct.new(name: "B1", weight: 1), | |
OpenStruct.new(name: "B2", weight: 1), | |
OpenStruct.new(name: "B3", weight: 1), |