This file contains hidden or 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
| window.webviewbridge = new (function(gameId, appName, appVersion, viewUrl, viewHash, viewVersion, sessionStart, idfa, deviceId, gamerId) { | |
| var mock = { | |
| __initialized: false, | |
| "com.unity3d.ads.api.Sdk": { | |
| loadComplete: function() { | |
| var configUrl = "https://config.unityads.unity3d.com/webview/2.0.5/release/config.json" | |
| return [gameId, false, appName, appVersion, 2005, "2.0.5", false, configUrl, viewUrl, viewHash, viewVersion, sessionStart, false] | |
| }, | |
| initComplete: function() { | |
| mock.__initialized = true |
This file contains hidden or 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
| /* | |
| Constraints | |
| * 1 <= n <= 2*10^5 | |
| * 1 <= d <= n | |
| * 0 <= expenditure[i] <= 200 | |
| */ | |
| def activityNotifications(expenditure: Array[Int], d: Int): Int = { | |
| if (expenditure.size <= d) | |
| 0 |
This file contains hidden or 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
| // Could be any other storage like FireBase, also could be some in-memory storage | |
| // but will have to make some retries more often if state is lost | |
| import { createClient } from 'redis' | |
| class RedisConnection { | |
| #client = null | |
| async client() { | |
| if (this.#client != null) | |
| return this.#client |
OlderNewer