This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# This file configures the New Relic Agent. New Relic monitors | |
# Ruby, Java, .NET, PHP, and Python applications with deep visibility and low overhead. | |
# For more information, visit www.newrelic.com. | |
# | |
# Generated March 25, 2014 | |
# | |
# This configuration file is custom generated for Wannafun | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ "id": 1, "title": "title #1", "text": "text #1" }, | |
{ "id": 1, "title": "title #2", "text": "text #2" }, | |
{ "id": 1, "title": "title #3", "text": "text #3" }, | |
{ "id": 1, "title": "title #4", "text": "text #4" }, | |
{ "id": 1, "title": "title #5", "text": "text #5" } | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BinHeap: | |
def __init__(self): | |
self.heapList = [0] | |
self.currentSize = 0 | |
self.swaps = [] | |
def percUp(self,i): | |
while i // 2 > 0: | |
if self.heapList[i] < self.heapList[i // 2]: | |
tmp = self.heapList[i // 2] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
{ "name": "name #1" } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func doit() { | |
let arsen = User(id: "1", name: "Arsen", age: 26) | |
TrackingProvider().track(event: UserEvents.created(user: arsen)) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protocol TrackingEventType { | |
var identifier: String { get } | |
var properties: [String: Any] { get } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum UserEvents { | |
case created(user: User) | |
case openApp | |
case bought(product: Product) | |
case sentMessage | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension UserEvents: TrackingEventType { | |
var identifier: String { | |
switch self { | |
case .created: | |
return "user.created" | |
case .openApp: | |
return "user.open-app" | |
case .bought: | |
return "user.bought" | |
case .sentMessage: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protocol TrackingProviderType { | |
func track(event: TrackingEventType) | |
func associate(with user: User) | |
func disassociateUser() | |
func setup() | |
} |
OlderNewer