conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Use @autoclosure for the right operand.\n" }, { "from": "human", "value": "// Copyright (c) 2015 Rob Rix. All rights reserved.\n\n// MARK: - Optional conjunction\n\n/// Returns a tuple of two `Optional` values, or `nil` if either or both are `nil`.\npublic func &&&...
swift
chosen
[ { "from": "system", "value": "Remove the default value for the index parameter in `fold`.\n" }, { "from": "human", "value": "// Copyright © 2015 Rob Rix. All rights reserved.\n\npublic enum Telescope {\n\tindirect case Recursive(Telescope)\n\tindirect case Argument(Term, Telescope)\n\tcase End\...
swift
chosen
[ { "from": "system", "value": "Add flag to show view controller\n" }, { "from": "human", "value": "//\n// SearchedMangaCollectionViewModel.swift\n// Yomu\n//\n// Created by Sendy Halim on 7/29/16.\n// Copyright © 2016 Sendy Halim. All rights reserved.\n//\n\nimport RxCocoa\nimport RxMoya\nimp...
swift
chosen
[ { "from": "system", "value": "Update for new versions of XCGLogger and le_ios\n" }, { "from": "human", "value": "//\n// XCGLogger+Logentries.swift\n//\n// Created by Brian Batchelder on 1/7/16.\n// Copyright © 2016 Brian's Brain. All rights reserved.\n//\n\nimport XCGLogger\nimport le\n\nexte...
swift
chosen
[ { "from": "system", "value": "Set identifier on constraint if needed\n" }, { "from": "human", "value": "import UIKit\n\npublic extension UIView {\n \n public func updateLayoutTo(_ layoutClosure: (UIViewLayout) -> ()) {\n let layout = UIViewLayout(view: self)\n layoutClosure(l...
swift
chosen
[ { "from": "system", "value": "Add RtL language support for iOS 8 fallback\n" }, { "from": "human", "value": "//\n// LocalizationUtils.swift\n// Pageboy\n//\n// Created by Merrick Sapsford on 18/06/2017.\n// Copyright © 2017 Merrick Sapsford. All rights reserved.\n//\n\nimport UIKit\n\nextens...
swift
chosen
[ { "from": "system", "value": "Rollback UITextField clear button content mode\n" }, { "from": "human", "value": "//\n// Created by Tom Baranes on 18/01/2017.\n// Copyright © 2017 Tom Baranes. All rights reserved.\n//\n\nimport UIKit\n\n// MARK: - Clear button\n\nextension UITextField {\n\n p...
swift
chosen
[ { "from": "system", "value": "Refactor URLPredicate tests and fix typo\n" }, { "from": "human", "value": "import XCTest\nimport Peppermint\n\nclass URLPredicateTests: XCTestCase {\n\n var predicate: URLPredicate!\n\n override func setUp() {\n super.setUp()\n predicate = URLPr...
swift
chosen
[ { "from": "system", "value": "Add BiSON and exclude info.plist\n" }, { "from": "human", "value": "// swift-tools-version:5.3\nimport PackageDescription\n\nlet package = Package(\n name: \"SmartDeviceLink\",\n defaultLocalization: \"en\",\n platforms: [\n .iOS(.v10)\n ],\n p...
swift
chosen
[ { "from": "system", "value": "Clean up and add convenience initializers\n" }, { "from": "human", "value": "//\n// COBBeacon.swift\n// CallOfBeacons\n//\n// Created by Stanisław Chmiela on 02.06.2016.\n// Copyright © 2016 Stanisław Chmiela, Rafał Żelazko. All rights reserved.\n//\n\nimport Fo...
swift
chosen
[ { "from": "system", "value": "Include vertical insets for indicator view\n\nAccount for the top and bottom insets when setting the frame for the\nindicator view. This allows you to offset the indicator view from the\nbottom of the menu.\n" }, { "from": "human", "value": "import UIKit\n\nopen cla...
swift
chosen
[ { "from": "system", "value": "Add stop on first error when enumerate dictionary\n" }, { "from": "human", "value": "import Foundation\n\nextension Dictionary {\n \n func enumerateKeysAndObjects(\n options opts: NSEnumerationOptions = [],\n using block: (Any, Any, UnsafeMutable...
swift
chosen
[ { "from": "system", "value": "Make UIStoryboard.main return an optional instead of fatalError\n" }, { "from": "human", "value": "//\n// Created by Tom Baranes on 23/06/16.\n// Copyright © 2016 Tom Baranes. All rights reserved.\n//\n\nimport UIKit\n\npublic extension UIStoryboard {\n\n publi...
swift
chosen
[ { "from": "system", "value": "Format multiple minutes using relative formatter\n" }, { "from": "human", "value": "//\n// RelativeTimeFormatterTests.swift\n// Peekazoo\n//\n// Created by Thomas Sherwood on 23/05/2017.\n// Copyright © 2017 Peekazoo. All rights reserved.\n//\n\nimport Peekazoo\...
swift
chosen
[ { "from": "system", "value": "Call willMove before removing from parent vc\n" }, { "from": "human", "value": "import UIKit\n\nextension UIViewController {\n // Adds a peekable view controller on top of another view controller. Since the view controller is the one we want to show when the user...
swift
chosen
[ { "from": "system", "value": "Test: Add a todo about a regression introduced by generic mismatch diagnostic\n" }, { "from": "human", "value": "// RUN: %target-swift-frontend -typecheck -verify %S/Inputs/keypath.swift -primary-file %s\n\nstruct S {\n let i: Int\n\n init() {\n let _: Writable...
swift
chosen
[ { "from": "system", "value": "Correct availability for opaque type execution test.\n\nOpaque types require the next Swift runtime.\n" }, { "from": "human", "value": "// RUN: %target-run-simple-swift | %FileCheck %s\n// REQUIRES: executable_test\n\nprotocol P {\n associatedtype AT\n func foo() ...
swift
chosen
[ { "from": "system", "value": "Fix build on Swift 5\n" }, { "from": "human", "value": "//\n// NSRunLoop+Utils.swift\n//\n// This source file is part of the Telegram Bot SDK for Swift (unofficial).\n//\n// Copyright (c) 2015 - 2016 Andrey Fidrya and the project authors\n// Licensed under Apache Li...
swift
chosen
[ { "from": "system", "value": "Add tests for mappable extension\n" }, { "from": "human", "value": "@testable import Brick\nimport Quick\nimport Nimble\nimport Fakery\n\nclass ExtensionsSpec: QuickSpec {\n\n override func spec() {\n describe(\"Array+Brick\") {\n var items = [ViewModel]()\...
swift
chosen
[ { "from": "system", "value": "Use Bocho method to get normalized file path\n" }, { "from": "human", "value": "/*\n Copyright 2017 Ryuichi Laboratories and the Yanagiba project contributors\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file exc...
swift
chosen
[ { "from": "system", "value": "Customize navigation bar button font\n" }, { "from": "human", "value": "//\n// AppDelegate.swift\n// SwiftGoal\n//\n// Created by Martin Richter on 10/05/15.\n// Copyright (c) 2015 Martin Richter. All rights reserved.\n//\n\nimport UIKit\n\n@UIApplicationMain\nc...
swift
chosen
[ { "from": "system", "value": "Add header and cell to protocol\n" }, { "from": "human", "value": "import Foundation\n\nprotocol MProfileEditItemProtocol\n{\n \n}\n" }, { "from": "gpt", "value": "import Foundation\n\nprotocol MProfileEditItemProtocol\n{\n var header:MProfileEditI...
swift
chosen
[ { "from": "system", "value": "Add function to differentiate between test run and normal run of the app\n" }, { "from": "human", "value": "import UIKit\n\n@UIApplicationMain\nclass AppDelegate: UIResponder, UIApplicationDelegate {\n\n var window: UIWindow?\n}" }, { "from": "gpt", "...
swift
chosen
[ { "from": "system", "value": "Use bundleIdentifier to generate unique broadcast ID\n" }, { "from": "human", "value": "//\n// SignalBroadcasting.swift\n// Beacon\n//\n// Created by Zhu Shengqi on 14/06/2017.\n// Copyright © 2017 zetasq. All rights reserved.\n//\n\nimport Foundation\n\npublic ...
swift
chosen
[ { "from": "system", "value": "Remove NSAttributedString height(considering) extention method\n" }, { "from": "human", "value": "/*\n MIT License\n\n Copyright (c) 2017-2018 MessageKit\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associat...
swift
chosen
[ { "from": "system", "value": "Drop expected-* annotations from test; it's too messy to -verify. NFC\n\nSwift SVN r22411\n" }, { "from": "human", "value": "// Distributed under the terms of the MIT license\n// Test case submitted to project by https://github.com/practicalswift (practicalswift)\n/...
swift
chosen
[ { "from": "system", "value": "Move image loading logic to UIImageView extension\n" }, { "from": "human", "value": "import UIKit\nimport AvitoDesignKit\n\nclass PhotoCollectionViewCell: UICollectionViewCell {\n \n var image: ImageSource? {\n didSet {\n updateImage()\n ...
swift
chosen
[ { "from": "system", "value": "Clear out timer on sleep\n" }, { "from": "human", "value": "import Cocoa\n\n@NSApplicationMain\nclass AppDelegate: NSObject, NSApplicationDelegate {\n @IBOutlet weak var statusItem: StatusItem!\n\n var timerStart: NSDate!\n\n // Redraw button every minute\n...
swift
chosen
[ { "from": "system", "value": "Test `Double` with epsilon. Add a test case.\n" }, { "from": "human", "value": "//\n// PercentUtilsTest.swift\n// Reactant\n//\n// Created by Filip Dolnik on 18.10.16.\n// Copyright © 2016 Brightify. All rights reserved.\n//\n\nimport Quick\nimport Nimble\nimpor...
swift
chosen
[ { "from": "system", "value": "Add required platforms to the Swift package description\n" }, { "from": "human", "value": "// swift-tools-version:5.0\nimport PackageDescription\n\nlet package = Package(\n name: \"Bond\",\n products: [\n .library(name: \"Bond\", targets: [\"Bond\"])\n ...
swift
chosen
[ { "from": "system", "value": "Print message when token is being revoked\n" }, { "from": "human", "value": "//\n// BackendAuth.swift\n// TOZ_iOS\n//\n// Copyright © 2017 intive. All rights reserved.\n//\n\nimport Foundation\n\nfinal class BackendAuth {\n\n private let key = \"BackendAuthToke...
swift
chosen
[ { "from": "system", "value": "Set json init with string public\n" }, { "from": "human", "value": "//\n// JSON+String.swift\n// \n//\n// Created by Vladislav Fitc on 13.03.2020.\n//\n\nimport Foundation\n\nextension JSON {\n \n init(jsonString: String) throws {\n let data = jsonString.dat...
swift
chosen
[ { "from": "system", "value": "Fix build in Swift 5.1\n" }, { "from": "human", "value": "//\n// Locale+LanguageRegion.swift\n// FFFoundation\n//\n// Created by Florian Friedrich on 29/03/16.\n// Copyright © 2016 Florian Friedrich. All rights reserved.\n//\n// Licensed under the Apache Licens...
swift
chosen
[ { "from": "system", "value": "Add default localization to fix SPM support\n" }, { "from": "human", "value": "// swift-tools-version:5.3\nimport PackageDescription\n\nlet package = Package(\n name: \"Verso\",\n platforms: [\n .iOS(.v9),\n ],\n products: [\n .library(\n ...
swift
chosen
[ { "from": "system", "value": "Fix benchmarking version for swift build\n" }, { "from": "human", "value": "// swift-tools-version:4.0\nimport PackageDescription\n\nlet package = Package(\n name: \"Attabench\",\n products: [\n .library(name: \"BenchmarkModel\", targets: [\"BenchmarkMo...
swift
chosen
[ { "from": "system", "value": "Move Quick dependency to tests\n" }, { "from": "human", "value": "// swift-tools-version:3.1\n\nimport PackageDescription\n\nlet package = Package(\n name: \"Butler\",\n targets: [],\n dependencies: [\n .Package(url: \"https://github.com/Quick/Quick....
swift
chosen
[ { "from": "system", "value": "Make subscribe handler argument anonymous\n" }, { "from": "human", "value": "import Foundation\n\npublic struct SubscriptionOptions: OptionSetType {\n public let rawValue: Int\n public init(rawValue: Int) { self.rawValue = rawValue }\n\n public static let N...
swift
chosen
[ { "from": "system", "value": "Fix order of config loading\n" }, { "from": "human", "value": "import Foundation\nimport Kitura\nimport Configuration\n\npublic class GeneratedApplication {\n public let router: Router\n private let manager: ConfigurationManager\n private let factory: Adapt...
swift
chosen
[ { "from": "system", "value": "Add search to contracted factory\n" }, { "from": "human", "value": "import Foundation\n\nextension MCreateMapStatusContracted\n{\n //MARK: internal\n \n static func factoryMenuItems() -> [MCreateMapMenuProtocol]\n {\n let itemExpand:MCreateMapMenu...
swift
chosen
[ { "from": "system", "value": "Add formerly-crashing test case from rdar://problem/19840527.\n\nSwift SVN r29980\n" }, { "from": "human", "value": "// RUN: %target-parse-verify-swift\n\nprotocol SomeProtocol {\n\ttypealias T\n}\n\nextension SomeProtocol where T == Optional<T> { } // expected-erro...
swift
chosen
[ { "from": "system", "value": "Integrate launchAtLogin function into setter\n" }, { "from": "human", "value": "//\n// LoginItemController.swift\n// Barista\n//\n// Created by Franz Greiling on 19.11.14.\n// Copyright (c) 2014 Franz Greiling. All rights reserved.\n//\n\nimport Foundation\nimpo...
swift
chosen
[ { "from": "system", "value": "Add precedence group to operator.\n" }, { "from": "human", "value": "//\n// JSONOperators.swift\n// InstaCollage\n//\n// Created by Optimus Prime on 28.02.17.\n// Copyright © 2017 Tren Lab. All rights reserved.\n//\n\nimport Foundation\n\n// MARK: - Operators\n\...
swift
chosen
[ { "from": "system", "value": "[RxSwift] Fix bug for xcodebuild with Reactive?\n" }, { "from": "human", "value": "//\n// RxPermission.swift\n//\n// Copyright (c) 2016 Sunshinejr <thesunshinejr@gmail.com>\n// \n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of ...
swift
chosen
[ { "from": "system", "value": "Make HTTPStatus conform to ResponseEncodable\n\nDone so statuses can be returned on their own.\r\n\r\nExample:\r\n```\r\n versionOneGroup.delete(\"park\") { (req) in\r\n return req.withConnection(to: .sqlite) { (db) in\r\n return db.query(Parki...
swift
chosen
[ { "from": "system", "value": "Allow call nodes for binary operations and conditions\n" }, { "from": "human", "value": "//\n// ASTNode+Validation.swift\n// Lioness\n//\n// Created by Louis D'hauwe on 17/11/2016.\n// Copyright © 2016 Silver Fox. All rights reserved.\n//\n\nimport Foundation\n\...
swift
chosen
[ { "from": "system", "value": "Annotate a crash test that does not crash anymore\n\nSwift SVN r25348\n" }, { "from": "human", "value": "// RUN: not --crash %target-swift-frontend %s -parse\n// XFAIL: asan\n\n// Distributed under the terms of the MIT license\n// Test case submitted to project by h...
swift
chosen
[ { "from": "system", "value": "Disable Hero animations for iOS 13\n" }, { "from": "human", "value": "//\n// NavigationController.swift\n// SwiftHub\n//\n// Created by Khoren Markosyan on 1/4/17.\n// Copyright © 2017 Khoren Markosyan. All rights reserved.\n//\n\nimport UIKit\n\nclass Navigatio...
swift
chosen
[ { "from": "system", "value": "Add additional property support to UILabel\n" }, { "from": "human", "value": "import UIKit\nimport RxSwift\n\npublic extension Sugar where HostType: UILabel {\n\t\n\t/**\n\tRxSugar wrapper for text property.\n\t*/\n\tpublic var text: AnyObserver<String> { return val...
swift
chosen
[ { "from": "system", "value": "Remove now redundant shuffle where clause\n" }, { "from": "human", "value": "//\n// MutableCollection_Shuffle.swift\n// Created by Nate Cook on 2016-12-13.\n// Copyright © 2016 Nate Cook. All rights reserved.\n//\n// Link: http://stackoverflow.com/questions/2402...
swift
chosen
[ { "from": "system", "value": "Remove unnecessary queue from repository\n\n" }, { "from": "human", "value": "//\n// UsersRepository.swift\n// RandomUser\n//\n// Created by Antonio Calvo on 30/06/2017.\n// Copyright © 2017 Random User Inc. All rights reserved.\n//\n\nimport Foundation\nimport ...
swift
chosen
[ { "from": "system", "value": "Add missing import required to use a conformance\n\nA new compiler check reports a missing import for a conformance\nimplicitly imported:\n\n```\nSources/_TestSupport/Error.swift:21:13: error: cannot use conformance of\n'Float' to 'Real' here; 'RealModule' was not imported by t...
swift
chosen
[ { "from": "system", "value": "Add @objc attributes to the configurations properties\n" }, { "from": "human", "value": "//\n// OpalImagePickerConfiguration.swift\n// OpalImagePicker\n//\n// Created by Kristos Katsanevas on 8/9/17.\n// Copyright © 2017 Opal Orange LLC. All rights reserved.\n//...
swift
chosen
[ { "from": "system", "value": "[build-wrangler] Unblock CI by disabling a test that is waiting on an automerger.\n" }, { "from": "human", "value": "// RUN: %empty-directory(%t)\n// RUN: %target-build-swift -Xfrontend -enable-experimental-concurrency -g %s -emit-ir -parse-as-library -module-name m...
swift
chosen
[ { "from": "system", "value": "Remove masonry from Welcome animation vc.\n" }, { "from": "human", "value": "\nclass WMFWelcomeAnimationViewController: UIViewController {\n var welcomePageType:WMFWelcomePageType = .intro\n fileprivate var hasAlreadyAnimated = false\n\n fileprivate lazy va...
swift
chosen
[ { "from": "system", "value": "Use correct line indicator display mode\n" }, { "from": "human", "value": "//\n// LineBarIndicator.swift\n// Tabman\n//\n// Created by Merrick Sapsford on 07/06/2018.\n// Copyright © 2018 UI At Six. All rights reserved.\n//\n\nimport UIKit\n\ninternal final clas...
swift
chosen
[ { "from": "system", "value": "Change the accessor methods to NSUserDefaults from class method to instance method\n" }, { "from": "human", "value": "//\n// TypedDefaults.swift\n// TypedDefaults\n//\n// Created by Kazunobu Tasaka on 3/15/16.\n// Copyright © 2016 Kazunobu Tasaka. All rights res...
swift
chosen
[ { "from": "system", "value": "Revise architecture to prepare for delegation pattern\n" }, { "from": "human", "value": "//\n// UsbongTreeViewer.swift\n// UsbongFramework\n//\n// Created by Chris Amanse on 10/24/15.\n// Copyright © 2015 Usbong Social Systems, Inc. All rights reserved.\n//\n\ni...
swift
chosen
[ { "from": "system", "value": "Remove un-used internal name from observeNotification method.\n" }, { "from": "human", "value": "//\n// NotificationObservable.swift\n// ESNotification\n//\n// Created by Tomohiro Kumagai on H27/11/22.\n// Copyright © 平成27年 EasyStyle G.K. All rights reserved.\n/...
swift
chosen
[ { "from": "system", "value": "Add animation option to animate rootViewController in UIWindow\n" }, { "from": "human", "value": "//\n// UIWindow+RootViewController.swift\n// Swiftilities\n//\n// Created by Nicholas Bonatsakis on 2/5/16.\n// Copyright © 2016 Raizlabs. All rights reserved.\n//\...
swift
chosen
[ { "from": "system", "value": "Add .xfail for platforms without Objc runtime (FreeBSD and Linux)\n" }, { "from": "human", "value": "// RUN: %target-run-simple-swift\n// REQUIRES: executable_test\n\nimport StdlibUnittest\n\n// Also import modules which are used by StdlibUnittest internally. This\n...
swift
chosen
[ { "from": "system", "value": "Add a simple UI test that items are loaded\n" }, { "from": "human", "value": "//\n// FlingChallengeUITests.swift\n// FlingChallengeUITests\n//\n// Created by Alexander Kolov on 5/8/16.\n// Copyright © 2016 Alexander Kolov. All rights reserved.\n//\n\nimport XCTe...
swift
chosen
[ { "from": "system", "value": "Stop setting websocket connection as authenticated on LoginRequest callback because it doesn't authenticate the websocket connection\n" }, { "from": "human", "value": "//\n// AuthClient.swift\n// Rocket.Chat\n//\n// Created by Matheus Cardoso on 5/5/18.\n// Copy...
swift
chosen
[ { "from": "system", "value": "Adjust anchorPoint so rotation is more natural\n" }, { "from": "human", "value": "//\n// CircleViewController.swift\n// RotatingDials\n//\n// Created by Ben Chatelain on 6/19/15.\n// Copyright (c) 2015 Ben Chatelain. All rights reserved.\n//\n\nimport CoreGraphi...
swift
chosen
[ { "from": "system", "value": "Allow configuration of recording settings\n" }, { "from": "human", "value": "import AVFoundation\n\npublic class Recording {\n var recorder: AVAudioRecorder!\n var player: AVAudioPlayer!\n var session: AVAudioSession!\n var delegate: AVAudioRecorderDeleg...
swift
chosen
[ { "from": "system", "value": "Rename segue API calls for better Swift 3 feel\n" }, { "from": "human", "value": "/*\n | _ ____ ____ _\n | ⎛ |‾| ⚈ |-| ⚈ |‾| ⎞\n | ⎝ | ‾‾‾‾| |‾‾‾‾ | ⎠\n | ‾ ‾ ‾\n */\n\nimport UIKit\n\npublic protocol SegueHandling {\n associatedtype Seg...
swift
chosen
[ { "from": "system", "value": "Fix UIView Rotation Degrees TODO\n\nCompleted UIView rotation degrees TODO.\n" }, { "from": "human", "value": "//\n// LayerView.swift\n// BFWControls\n//\n// Created by Tom Brodhurst-Hill on 9/01/2016.\n// Copyright © 2016 BareFeetWare.\n// Free to use at your ...
swift
chosen
[ { "from": "system", "value": "Set the title to the ContactsVC\n" }, { "from": "human", "value": "//\n// ContactsViewController.swift\n// V\n//\n// Created by Dulio Denis on 7/5/16.\n// Copyright © 2016 Dulio Denis. All rights reserved.\n//\n\nimport UIKit\nimport CoreData\nimport Contacts\ni...
swift
chosen
[ { "from": "system", "value": "[cxx-interop] Enable a test on Windows\n\nThe `Cxx` module is present on all platforms, so we can enable at least the typechecker test unconditionally." }, { "from": "human", "value": "// RUN: %target-typecheck-verify-swift -I %S/Inputs -enable-experimental-cxx-inte...
swift
chosen
[ { "from": "system", "value": "Add user to dummy comments\n" }, { "from": "human", "value": "import Foundation\nimport Wall\nimport Faker\n\nclass DetailViewController: WallController {\n\n let faker = Faker()\n\n override func viewDidLoad() {\n super.viewDidLoad()\n\n title = post!.text\...
swift
chosen
[ { "from": "system", "value": "Make the test more robust so that it passes with stronger optimizations\nin the new LLVM\n\nSwift SVN r29693\n" }, { "from": "human", "value": "// RUN: %target-swift-frontend -Ounchecked %s -emit-ir | FileCheck %s\n\n// REQUIRES: CPU=x86_64\n\n// We were missing tar...
swift
chosen
[ { "from": "system", "value": "Disable timing-sensitive test that's periodically failing in CI, rdar://38378503.\n" }, { "from": "human", "value": "// RUN: %target-typecheck-verify-swift -solver-expression-time-threshold=1\n// REQUIRES: tools-release,no_asserts\n\n// expected-no-diagnostics\n\nle...
swift
chosen
[ { "from": "system", "value": "Fix the width of the indicator so that it would stop reflowing the cell when changed to star\n" }, { "from": "human", "value": "//\n// TimelineItemStatusView.swift\n// NetNewsWire\n//\n// Created by Maurice Parker on 7/1/20.\n// Copyright © 2020 Ranchero Softwar...
swift
chosen
[ { "from": "system", "value": "Bring app to foreground when showing preferences\n" }, { "from": "human", "value": "//\n// PreferencesWindow.swift\n// WeatherBar\n//\n// Created by Brad Greenlee on 3/20/15.\n// Copyright (c) 2015 Etsy. All rights reserved.\n//\n\nimport Cocoa\n\nprotocol Prefe...
swift
chosen
[ { "from": "system", "value": "Allow to modify build settings" }, { "from": "human", "value": "//\n// PBXBuildStyle.swift\n// XcodeProjKit\n//\n// Created by phimage on 30/07/2017.\n// Copyright © 2017 phimage (Eric Marchand). All rights reserved.\n//\n\nimport Foundation\n\npublic class PBXB...
swift
chosen
[ { "from": "system", "value": "Add an optional extra param to allow passing data from layout to mount\n" }, { "from": "human", "value": "//\n// Layout.swift\n// components-swift\n//\n// Created by Oliver Rickard on 10/9/17.\n// Copyright © 2017 Oliver Rickard. All rights reserved.\n//\n\nimpo...
swift
chosen
[ { "from": "system", "value": "Change how next unread image is scaled up\n" }, { "from": "human", "value": "//\n// TimeilneToolbarModifier.swift\n// NetNewsWire\n//\n// Created by Maurice Parker on 7/5/20.\n// Copyright © 2020 Ranchero Software. All rights reserved.\n//\n\nimport Foundation\n...
swift
chosen
[ { "from": "system", "value": "Update reference type association with the brand new swift 4 sintax" }, { "from": "human", "value": "//\n// FirebaseStorable.swift\n// FirebaseCommunity\n//\n// Created by David Sanford on 15/08/17.\n//\n\nimport Foundation\nimport FirebaseCommunity\n\npublic pro...
swift
chosen
[ { "from": "system", "value": "Fix issue when composed cache receive value was called twice\n" }, { "from": "human", "value": "import Combine\nimport Foundation\n\nextension CacheLevel {\n /**\n Composes two cache levels\n\n - parameter cache: The second cache level\n\n - returns: A new ca...
swift
chosen
[ { "from": "system", "value": "Update the version number printed by `-v`.\n" }, { "from": "human", "value": "//===----------------------------------------------------------------------===//\n//\n// This source file is part of the Swift.org open source project\n//\n// Copyright (c) 2014 - 2020 App...
swift
chosen
[ { "from": "system", "value": "Add latitude and longitude to location\n" }, { "from": "human", "value": "import Foundation\n\nclass FDatabaseCountriesItemUser:FDatabaseProtocol\n{\n var identifier:String?\n var parent:FDatabaseProtocol?\n \n init(\n parent:FDatabaseProtocol,\n ...
swift
chosen
[ { "from": "system", "value": "Migrate typealias to associatedtype due to typealias deprecation\n" }, { "from": "human", "value": "//\n// Paging.swift\n// GeneratedResults\n//\n// Created by Marcin Krzyzanowski on 22/06/15.\n// Copyright (c) 2015 Marcin Krzyżanowski. All rights reserved.\n//\...
swift
chosen
[ { "from": "system", "value": "Fix type checker performance test to compile successfully.\n\nAt some point this test case was updated such that it no longer\ncompiled successfully. The originally reported test case did compile\nsuccessfully, just slowly.\n" }, { "from": "human", "value": "// RUN:...
swift
chosen
[ { "from": "system", "value": "Make this test case compile again\n" }, { "from": "human", "value": "// main.swift\n//\n// This source file is part of the Swift.org open source project\n//\n// Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors\n// Licensed under Apache License v2.0...
swift
chosen
[ { "from": "system", "value": "Use Locale in clock item\n\n" }, { "from": "human", "value": "//\n// SClockItem.swift\n// Pock\n//\n// Created by Pierluigi Galdi on 23/02/2019.\n// Copyright © 2019 Pierluigi Galdi. All rights reserved.\n//\n\nimport Foundation\n\nclass SClockItem: StatusItem {...
swift
chosen
[ { "from": "system", "value": "Fix PiP state when presenting a call screen\n\n" }, { "from": "human", "value": "// \n// Copyright 2020 New Vector Ltd\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// ...
swift
chosen
[ { "from": "system", "value": "Fix collection view controller's NSInvalidArgumentException on a nil layout parameter\n" }, { "from": "human", "value": "//\n// SwiftSampleCollectionViewController.swift\n// HTKDynamicResizingCellDemo\n//\n// Created by Ben on 04/12/2014.\n// Copyright (c) 2014 ...
swift
chosen
[ { "from": "system", "value": "Fix cell reusing/image loading bug\n" }, { "from": "human", "value": "//\n// Created by Alexander Tkachenko on 9/9/17.\n//\n\nimport UIKit\n\nfinal class ImageLoadableView: UIView, ImageLoadable {\n @IBOutlet var imageView: UIImageView!\n @IBOutlet var placeho...
swift
chosen
[ { "from": "system", "value": "Create test for share to appear\n" }, { "from": "human", "value": "import XCTest\n\nclass TVHomeActionsShare:XCTestCase\n{\n override func setUp()\n {\n super.setUp()\n continueAfterFailure = false\n XCUIApplication().launch()\n }\n}\n"...
swift
chosen
[ { "from": "system", "value": "[tsan] Change Swift TSan test to use pthreads rather than GCD.\n\nThere is no need to tie the test to the GCD API.\n" }, { "from": "human", "value": "// main.swift\n//\n// This source file is part of the Swift.org open source project\n//\n// Copyright (c) 2014 - 201...
swift
chosen
[ { "from": "system", "value": "Fix a memory leak issue\n" }, { "from": "human", "value": "import UIKit\n\n\n/// Converts a generic element to `NSAttributedString`. Should only be used if a specific converter is not found.\n///\nclass GenericElementConverter: ElementConverter {\n \n let ser...
swift
chosen
[ { "from": "system", "value": "Add propositional equality to the directory.\n" }, { "from": "human", "value": "// Copyright © 2015 Rob Rix. All rights reserved.\n\nextension Module {\n\tpublic static let modules: [String:Module] = Dictionary([\n\t\tunit,\n\t\tboolean,\n\t\tlist,\n\t\tnatural,\n\...
swift
chosen
[ { "from": "system", "value": "Fix parsing of push payloads\n\nI made the (incorrect) assumption that we were using the string version\nof the 'alert' key for the push payload. Turns out, we're using the\ndictionary version. This fixes the dictionary lookup so that we get the\nright information to display to...
swift
chosen
[ { "from": "system", "value": "Update a diagnostic string in a -verify test\n\nThe old diagnostic was misleading; the closure really does take\none argument, but we're _returning_ a value that doesn't match\nthe contextual return type. And the suggestion to wrap the\nargument in parens makes no sense either....
swift
chosen
[ { "from": "system", "value": "Adjust top gradient stops to better match mock.\n" }, { "from": "human", "value": "import Foundation\nimport QuartzCore\n\nextension UINavigationBar {\n \n func wmf_applyGalleryTopGradientBackground() {\n if (!CGRectIsNull(bounds)){\n if (CGR...
swift
chosen
[ { "from": "system", "value": "Stop assuming return values always exist for some private APIs\n" }, { "from": "human", "value": "//\n// NSScreen+Amethyst.swift\n// Amethyst\n//\n// Created by Ian Ynda-Hummel on 5/8/16.\n// Copyright © 2016 Ian Ynda-Hummel. All rights reserved.\n//\n\nimport A...
swift
chosen
[ { "from": "system", "value": "Add velocities from drum hits\n" }, { "from": "human", "value": "\nenum Velocity: Equatable {\n case Default\n case PPP\n case PP\n case P\n case MP\n case MF\n case F\n case FF\n case FFF\n case Number(Int)\n\n var numerical: Int {\...
swift
chosen
[ { "from": "system", "value": "SEL-1261: Add extension without new parameter\n" }, { "from": "human", "value": "import UIKit\n\nprotocol CameraAssembly: class {\n func module(initialActiveCameraType: CameraType, overridenTheme: PaparazzoUITheme?) -> (UIView, CameraModuleInput)\n}\n\nprotocol C...
swift
chosen
[ { "from": "system", "value": "Bring test coverage to 100%\n" }, { "from": "human", "value": "//\n// RxTests.swift\n// ReSwiftRx\n//\n// Created by Charlotte Tortorella on 25/11/16.\n// Copyright © 2016 Benjamin Encz. All rights reserved.\n//\n\n@testable import ReSwiftRx\nimport XCTest\n\ncl...
swift
chosen
[ { "from": "system", "value": "Stop publishing to the audio stream when the socket is disposed and when the stream is disposed.\n" }, { "from": "human", "value": "import AudioToolbox\nimport Foundation\nimport Sockets\nimport Streams\n\npublic extension Socket\n{\n\tpublic func createAudioStream(...
swift
chosen
[ { "from": "system", "value": "Add helper method to detect if video is a WP shortcode.\n" }, { "from": "human", "value": "import Foundation\nimport Aztec\n\n\n// MARK: - VideoAttachment\n//\nextension VideoAttachment {\n\n @objc var videoPressID: String? {\n get {\n return ex...
swift
chosen