Skip to content

Instantly share code, notes, and snippets.

main.swift:55:7: error: ambiguous reference to member 'init'
self.init(x)
^~~~
Swift.Array<Element>:49:12: note: found this candidate
public init<S>(_ s: S) where S : Sequence, S.Iterator.Element == Element
^
Swift.RangeReplaceableCollection:22:24: note: found this candidate
public convenience init<S>(_ elements: S) where S : Sequence, S.Iterator.Element == Self.Iterator.Element
@oleander
oleander / Makefile
Created April 6, 2017 12:26
How to use the Swift Package Manager and CocoaPods within the same XCode application
APP="MyApp"
CONSTRUCT=xcodebuild -workspace $(APP).xcworkspace -scheme $(APP) clean
install_deps:
pod install
create_config:
swift package fetch
swift package generate-xcodeproj
wipe:
rm -rf .build $(APP).xcodeproj $(APP).xcworkspace Package.pins Pods Podfile.lock
  • Ta med
    • Tävling
      • Simning
        • Våtdräkt
        • Simglasögon
      • Cykel
        • Vattenflaskor
        • Kolsyrepatroner
        • Kolsyrepump
  • Cykelskor
  • Google Maps
  • Sverigekarta
  • Cykling
    • 1102km
      • 276km
        • Umeå -> Sundsvall, 276km
      • 289km
        • Sundsvall -> Bollnäs, 169km
        • Bollnäs -> Falun, 120km
  • 184km
Handler/Comment.hs:25:29:
Couldn't match type `Text' with `Entity Post'
Expected type: Field (HandlerT App IO) (Entity Post)
Actual type: Field (HandlerT App IO) Text
In the first argument of `areq', namely `textField'
In the second argument of `(<$>)', namely
`areq textField "Post" (Just post)'
In the second argument of `(<*>)', namely
`(entityKey <$> areq textField "Post" (Just post))'
Handler/Comment.hs:25:29:
Couldn't match type `Text' with `Entity Post'
Expected type: Field (HandlerT App IO) (Entity Post)
Actual type: Field (HandlerT App IO) Text
In the first argument of `areq', namely `textField'
In the second argument of `(<$>)', namely
`areq textField "Post" (Just post)'
In the second argument of `(<*>)', namely
`(entityKey <$> areq textField "Post" (Just post))'
require "pp"
a = "A\s+(.+?)"
b = "[\n]+B\s+(.+?)"
c = "[\n]+C\s+(.+?)"
d = "[\n]+D\s+((?=E)[^E]+|[^\n]+)"
e = "[(?=[\n]+E\s+)[\n]+E\s+(.+?)\n]?"
pp File.read("ord.txt").scan(/(^\d{1,2})\.\s+(.+?(?=A\s+))#{a}#{b}#{c}#{d}#{e}/m).to_a
ActionView::MissingTemplate: Missing template mobile/toplists/index, mobile/application/index, application/index with {:locale=>[:sv, :en], :formats=>[:html], :handlers=>[:erb, :builder, :raw, :ruby, :slim, :coffee, :arb, :haml, :rabl]}. Searched in: * "/opt/www/radiofy.se/releases/20140604094919/app/views" * "/opt/www/radiofy.se/shared/bundle/ruby/2.0.0/gems/twitter-bootstrap-rails-2.2.8/app/views" * "/opt/www/radiofy.se/shared/bundle/ruby/2.0.0/bundler/gems/active_admin-bca806aa816c/app/views" * "/opt/www/radiofy.se/shared/bundle/ruby/2.0.0/gems/devise-3.2.4/app/views" * "/opt/www/radiofy.se/shared/bundle/ruby/2.0.0/gems/bootstrap-kaminari-views-0.0.3/app/views" * "/opt/www/radiofy.se/shared/bundle/ruby/2.0.0/bundler/gems/kaminari-30215b19f1c5/app/views"
SELECT AVG(i.total), MAX(i.total)
FROM(
SELECT COALESCE(SUM(a.count) + SUM(b.count), 0) as total
FROM users
LEFT JOIN (
SELECT
COUNT(*) as count,
user_id
FROM "quick_answers"
GROUP BY user_id