content
stringlengths
263
5.24M
pred_label
stringclasses
1 value
pred_score_pos
float64
0.6
1
"use strict"; function Vector2(x, y) { this.x = typeof x !== 'undefined' ? x : 0; this.y = typeof y !== 'undefined' ? y : 0; } Object.defineProperty(Vector2, "zero", { get: function () { return new Vector2(); } }); Object.defineProperty(Vector2.prototype, "isZero", { ...
__label__POS
0.896437
"use strict"; function handleTouchStart(evt) { evt.preventDefault(); var touches = evt.changedTouches; for (var i = 0; i < touches.length; i++) { Touch._touches.push(touches[i]); Touch._touchPresses.push(true); } } function handleTouchMove(evt) { evt.preventDefault(); var touch...
__label__POS
0.798199
"use strict"; GameObjectList.prototype = Object.create(GameObject.prototype); function GameObjectList(layer, id) { GameObject.call(this, layer, id); this._gameObjects = []; } Object.defineProperty(GameObjectList.prototype, "length", { get: function () { return this._gameObjects.length; } });...
__label__POS
0.936535
"use strict"; function Vector2(x, y) { this.x = typeof x !== 'undefined' ? x : 0; this.y = typeof y !== 'undefined' ? y : 0; } Object.defineProperty(Vector2, "zero", { get: function () { return new Vector2(); } }); Object.defineProperty(Vector2.prototype, "isZero", { ...
__label__POS
0.896437
"use strict"; function PairList(nrPairs, layer, id) { powerupjs.SpriteGameObject.call(this, sprites.frame_goal, layer, id); this._pairs = []; for (var i = 0; i < nrPairs; i++) this._pairs.push(7); this._pairSprite = new powerupjs.SpriteGameObject(sprites.penguin_pairs); this._pairSprite.par...
__label__POS
0.64986
"use strict"; function PlayingState() { powerupjs.IGameLoopObject.call(this); this.currentLevelIndex = -1; this.levels = []; this.loadLevelsStatus(); this.loadLevels(); } PlayingState.prototype = Object.create(powerupjs.IGameLoopObject.prototype); Object.defineProperty(PlayingState.prototype, "...
__label__POS
0.808165
"use strict"; function TitleMenuState(layer) { powerupjs.GameObjectList.call(this, layer); var background = new powerupjs.SpriteGameObject(sprites.background_title, ID.layer_background); this.add(background); this.playButton = new powerupjs.Button(sprites.button_play, ID.layer_overlays); this.pla...
__label__POS
0.769826
"use strict"; function OptionsMenuState(layer) { powerupjs.GameObjectList.call(this, layer); var background = new powerupjs.SpriteGameObject(sprites.background_options, ID.layer_background); this.add(background); var onOffLabel = new powerupjs.Label("Arial", "60px", ID.layer_overlays); onOffLabel...
__label__POS
0.796358
"use strict"; function handleTouchStart(evt) { evt.preventDefault(); var touches = evt.changedTouches; for (var i = 0; i < touches.length; i++) { Touch._touches.push(touches[i]); Touch._touchPresses.push(true); } } function handleTouchMove(evt) { evt.preventDefault(); var touch...
__label__POS
0.626629
"use strict"; GameObjectList.prototype = Object.create(GameObject.prototype); function GameObjectList(layer, id) { GameObject.call(this, layer, id); this._gameObjects = []; } Object.defineProperty(GameObjectList.prototype, "length", { get: function () { return this._gameObjects.length; } });...
__label__POS
0.918857
"use strict"; function PenguinPairsGameWorld(layer, id) { GameObjectList.call(this, layer, id); var background = new SpriteGameObject(sprites.background_options, ID.layer_background); this.add(background); var onOffLabel = new Label("Arial", "60px", ID.layer_overlays); onOffLabel.text = "Hints"; ...
__label__POS
0.796162
"use strict"; function Vector2(x, y) { this.x = typeof x !== 'undefined' ? x : 0; this.y = typeof y !== 'undefined' ? y : 0; } Object.defineProperty(Vector2, "zero", { get: function () { return new Vector2(); } }); Object.defineProperty(Vector2.prototype, "isZero", { ...
__label__POS
0.901745
"use strict"; function PainterGameWorld() { this.cannon = new Cannon(); this.ball = new Ball(); this.can1 = new PaintCan(450); this.can2 = new PaintCan(575); this.can3 = new PaintCan(700); } PainterGameWorld.prototype.handleInput = function (delta) { this.ball.handleInput(delta); this.can...
__label__POS
0.935202
"use strict"; function Vector2(x, y) { this.x = typeof x !== 'undefined' ? x : 0; this.y = typeof y !== 'undefined' ? y : 0; } Object.defineProperty(Vector2, "zero", { get: function () { return new Vector2(); } }); Object.defineProperty(Vector2.prototype, "isZero", { ...
__label__POS
0.896437
"use strict"; var powerupjs = (function (powerupjs) { GameObjectList.prototype = Object.create(powerupjs.GameObject.prototype); function GameObjectList(layer, id) { powerupjs.GameObject.call(this, layer, id); this._gameObjects = []; } Object.defineProperty(GameObjectList.prototype, ...
__label__POS
0.830564
"use strict"; var powerupjs = (function (powerupjs) { function Vector2(x, y) { this.x = typeof x !== 'undefined' ? x : 0; this.y = typeof y !== 'undefined' ? y : 0; } Object.defineProperty(Vector2, "zero", { get: function () { return new powerupjs.Vecto...
__label__POS
0.827285
"use strict"; function PainterGameWorld() { this.cannon = new Cannon(); this.ball = new Ball(); this.can1 = new PaintCan(450); this.can2 = new PaintCan(575); this.can3 = new PaintCan(700); } PainterGameWorld.prototype.handleInput = function (delta) { this.ball.handleInput(delta); this.can...
__label__POS
0.732574
"use strict"; function PainterGameWorld() { this.cannon = new Cannon(); this.ball = new Ball(); this.can1 = new PaintCan(450); this.can2 = new PaintCan(575); this.can3 = new PaintCan(700); } PainterGameWorld.prototype.handleInput = function (delta) { this.ball.handleInput(delta); this.can...
__label__POS
0.732574
"use strict"; function Vector2(x, y) { this.x = typeof x !== 'undefined' ? x : 0; this.y = typeof y !== 'undefined' ? y : 0; } Vector2.prototype.addTo = function (v) { if (v.constructor === Vector2) { this.x += v.x; this.y += v.y; } else if (v.constructor === Number) { this...
__label__POS
0.956278
"use strict"; function GameStateManager_Singleton() { this._gameStates = []; this._currentGameState = null; } GameStateManager_Singleton.prototype.add = function (gamestate) { this._gameStates.push(gamestate); this._currentGameState = gamestate; return this._gameStates.length - 1; }; GameStateMan...
__label__POS
0.978519
"use strict"; function handleTouchStart(evt) { evt.preventDefault(); var touches = evt.changedTouches; for (var i = 0; i < touches.length; i++) { Touch._touches.push(touches[i]); Touch._touchPresses.push(true); } } function handleTouchMove(evt) { evt.preventDefault(); var touch...
__label__POS
0.626629
"use strict"; GameObjectList.prototype = Object.create(GameObject.prototype); function GameObjectList(layer, id) { GameObject.call(this, layer, id); this._gameObjects = []; } Object.defineProperty(GameObjectList.prototype, "length", { get: function () { return this._gameObjects.length; } });...
__label__POS
0.918857
"use strict"; function PlayingState() { IGameLoopObject.call(this); this.currentLevelIndex = -1; this.levels = []; this.loadLevelsStatus(); this.loadLevels(); } PlayingState.prototype = Object.create(IGameLoopObject.prototype); Object.defineProperty(PlayingState.prototype, "currentLevel", { ...
__label__POS
0.811941
"use strict"; function TitleMenuState(layer) { GameObjectList.call(this, layer); var background = new SpriteGameObject(sprites.background_title, ID.layer_background); this.add(background); this.playButton = new Button(sprites.button_play, ID.layer_overlays); this.playButton.position = new Vector2...
__label__POS
0.79567
"use strict"; function OptionsMenuState(layer) { GameObjectList.call(this, layer); var background = new SpriteGameObject(sprites.background_options, ID.layer_background); this.add(background); var onOffLabel = new Label("Arial", "60px", ID.layer_overlays); onOffLabel.text = "Hints"; onOffLabe...
__label__POS
0.81686
"use strict"; function Vector2(x, y) { this.x = typeof x !== 'undefined' ? x : 0; this.y = typeof y !== 'undefined' ? y : 0; } Object.defineProperty(Vector2, "zero", { get: function () { return new Vector2(); } }); Object.defineProperty(Vector2.prototype, "isZero", { ...
__label__POS
0.901745
package chapter4; public class Individual { /** * In this case, the chromosome is an array of integers rather than a string. */ private int[] chromosome; private double fitness = -1; /** * Initializes individual with specific chromosome * * @param chromosome * The chromosome to give ind...
__label__POS
0.972341
package chapter4; /** * A simple abstraction of a city. This class maintains Cartesian coordinates * and also knows the Pythagorean theorem. * * @author bkanber * */ public class City { private int x; private int y; /** * Initalize a city * * @param x * X position of city * @param y ...
__label__POS
0.998991
package chapter4; import java.util.Arrays; import java.util.Comparator; import java.util.Random; public class Population { private Individual population[]; private double populationFitness = -1; /** * Initializes blank population of individuals * * @param populationSize * The size of the popula...
__label__POS
0.811864
package chapter4; /** * The main Evaluation class for the TSP. It's pretty simple -- given an * Individual (ie, a chromosome) and a list of canonical cities, calculate the * total distance required to travel to the cities in the specified order. The * result returned by getDistance() is used by GeneticAlgorithm.ca...
__label__POS
0.988374
package chapter4; import java.util.Arrays; public class GeneticAlgorithm { private int populationSize; private double mutationRate; private double crossoverRate; private int elitismCount; protected int tournamentSize; public GeneticAlgorithm(int populationSize, double mutationRate, double crossove...
__label__POS
0.701841
package chapter4; /** * Main, executive class for the Traveling Salesman Problem. * * We don't have a real list of cities, so we randomly generate a number of them * on a 100x100 map. * * The TSP requires that each city is visited once and only once, so we have to * be careful when initializing a random Indiv...
__label__POS
0.715013
package chapter2; /** * An "Individual" represents a single candidate solution. The core piece of * information about an individual is its "chromosome", which is an encoding of * a possible solution to the problem at hand. A chromosome can be a string, an * array, a list, etc -- in this class, the chromosome is an...
__label__POS
0.918495
package chapter2; /** * This is our main class used to run the genetic algorithm. * * This case is one of the simplest problems we can solve: the objective is to * end up with an individual whose chromosome is all ones. * * The simplicity of this problem makes the GeneticAlgorithm class' * "calcFitness" metho...
__label__POS
0.9438
package chapter2; import java.util.Arrays; import java.util.Comparator; import java.util.Random; /** * A population is an abstraction of a collection of individuals. The population * class is generally used to perform group-level operations on its individuals, * such as finding the strongest individuals, collecti...
__label__POS
0.871856
package chapter5; import java.util.Arrays; import java.util.Comparator; import java.util.Random; public class Population { private Individual population[]; private double populationFitness = -1; /** * Initializes blank population of individuals * * @param populationSize * The size of the popula...
__label__POS
0.655669
package chapter5; /** * A simple class abstraction -- basically a container for class, group, module, professor, timeslot, and room IDs */ public class Class { private final int classId; private final int groupId; private final int moduleId; private int professorId; private int timeslotId; pr...
__label__POS
0.99961
package chapter5; /** * Simple course module abstraction, which defines the Professors teaching the module. */ public class Module { private final int moduleId; private final String moduleCode; private final String module; private final int professorIds[]; /** * Initialize new Module ...
__label__POS
0.998726
package chapter3; /** * An "Individual" represents a single candidate solution. The core piece of * information about an individual is its "chromosome", which is an encoding of * a possible solution to the problem at hand. A chromosome can be a string, an * array, a list, etc -- in this class, the chromosome is an...
__label__POS
0.918598
package chapter3; /** * The main executive class for the Robot Controller problem in chapter 3. * * We'll create a maze by hand, and feed it to the GeneticAlgorithm's * `evalPopulation` method, which is then responsible for scoring an abstract * robot with sensors against the maze. * * @author bkanber * */ ...
__label__POS
0.92825
package chapter3; import java.util.Arrays; import java.util.Comparator; import java.util.Random; /** * A population is an abstraction of a collection of individuals. The population * class is generally used to perform group-level operations on its individuals, * such as finding the strongest individuals, collecti...
__label__POS
0.871875
package chapter3; import java.util.ArrayList; /** * This class abstracts a maze through which a robot will have to navigate. The * maze is represented as a 2d array of integers, with different environment * types represented by integers as follows: * * 0 = Empty * 1 = Wall * 2 = Starting position * 3 = Ro...
__label__POS
0.993737
package chapter3; import java.util.ArrayList; /** * A robot abstraction. Give it a maze and an instruction set, and it will * attempt to navigate to the finish. * * @author bkanber * */ public class Robot { private enum Direction {NORTH, EAST, SOUTH, WEST}; private int xPosition; private int yPosi...
__label__POS
0.716499
function linearSearch(array, n) { for (var i = 0; i < array.length; i++) { if (array[i] == n) { return true; } } return false; } console.log(linearSearch([1,2,3,4], 4)); console.log(linearSearch([1,2,3,4], 5)); function binarySearch(array, n) { var lowIndex = 0, hi...
__label__POS
0.998385
var array1 = [1,2,3,4]; array1 = [1,2,3,4]; array1.push(5); // array1 = [1,2,3,4,5] array1.push(7); // array1 = [1,2,3,4,5,7] array1.push(2); // array1 = [1,2,3,4,5,7,2] console.log(array1); array1 = [1,2,3,4]; array1.pop(); //returns 4, array1 = [1,2,3] array1.pop(); //returns 3, array1 = [1,2] array1 = [1,2,3,...
__label__POS
0.799666
0.1 + 0.2 === 0.3; 5/4; // 1.25 Math.floor(0.9); // 0 Math.floor(1.1); // 1 Math.round(0.49); // 0 Math.round(0.5); // 1 Math.round(2.9); // 3 Math.ceil(0.1); // 1 Math.ceil(0.9); // 1 Math.ceil(21); // 21 Math.ceil(21.01); // 22 function numberEquals(x, y) { return Math.abs(x - y) < Number.EPSILON; } 0.1 + 0...
__label__POS
0.97484
function Stack(array) { this.array = []; if (array) this.array = array; } Stack.prototype.getBuffer = function() { return this.array.slice(); } Stack.prototype.isEmpty = function() { return this.array.length == 0; } //instance of the stack class var stack1 = new Stack(); console.log(stack1); // {arr...
__label__POS
0.967785
function TrieNode() { this.children = {}; // table this.endOfWord = false; } function Trie() { this.root = new TrieNode(); } Trie.prototype.insert = function(word) { var current = this.root; for (var i = 0; i < word.length; i++) { var ch = word.charAt(i); var node = current.childr...
__label__POS
0.919179
# Errata for *Book Title* *** ### page 22 On **page 22** **Before**: ```latex $(-1)^{\text{sign}} \times 2^{e-127} \times \left(1 + \sum_{i=1}^{23} b_{52-i} 2^{-i} \right)$ ``` **Corrected** ```latex $(-1)^{\text{sign}} \times 2^{e-1023} \times \left(1 + \sum_{i=1}^{52} b_{52-i} 2^{-i} \right)$ ``` *** ### page...
__label__POS
0.820684
function SinglyLinkedListNode(data) { this.data = data; this.next = null; } function SinglyLinkedList() { this.head = null; this.size = 0; } SinglyLinkedList.prototype.isEmpty = function() { return this.size == 0; } SinglyLinkedList.prototype.insert = function(value) { if (this.head === null)...
__label__POS
0.677519
var exampleSet = new Set(); exampleSet.add(1); // exampleSet: Set(1) {1} exampleSet.add(1); // exampleSet: Set(1) {1} exampleSet.add(2); // exampleSet: Set(2) {1, 2} exampleSet var exampleSet = new Set(); exampleSet.add(1); // exampleSet: Set {1} exampleSet.delete(1); // true exampleSet.add(2); // exampleSet: Set {1,...
__label__POS
0.992143
localStorage.setItem("testKey", "testValue"); location = location; // refreshes the page //----------------------------------- localStorage.getItem("testKey"); // prints "testValue" // Start of: Linear Probing ----------------------------------- function HashTable(size) { this.size = size; this.keys = this.i...
__label__POS
0.65885
function countDownToZero(n) { // base case. Stop at 0 if (n <= -1) { return; // stop the function } else { console.log(n); countDownToZero(n - 1); // count down 1 } } countDownToZero(12); function getNthFibo(n) { if (n <= 1) return n; var sum = 0, last = 1, ...
__label__POS
0.98146
function bubbleSort(array) { for (var i = 0, arrayLength = array.length; i < arrayLength; i++) { for (var j = 0; j <= i; j++) { if (array[j] > array[j+1]) { swap(array, i, j); } } } return array; } function swap(array, index1, index2) { var temp =...
__label__POS
0.902294
var cache = {}; function fiboBest(n) { if (n <= 1) return n; if (cache[n]) return cache[n]; return (cache[n] = fiboBest(n - 1) + fiboBest(n - 2)); } fiboBest(10); // 55 function waysToCoverSteps(step) { if (step < 0) return 0; if (step == 0) return 1; return waysToCoverSteps(step - 1) + waysTo...
__label__POS
0.978576
function BinaryTree() { this._root = null; } BinaryTree.prototype.traverseInOrder = function() { traverseInOrderHelper(this._root); function traverseInOrderHelper(node) { if (!node) return; traverseInOrderHelper(node.left); console.log(node.value); traverseInOrd...
__label__POS
0.818559
'dog'.charAt(1); // 'o' 'Youtube'.substring(1,2); // 'o' 'Youtube'.substring(3,7); // 'tube' 'Youtube'.substring(1); // returns 'outube' var a = 'a'; var b = 'b'; console.log(a < b); // prints 'true' var a = 'add'; var b = 'b'; console.log(a < b); // prints 'true' var a = 'add'; var b = 'ab'; console.log(a < b);...
__label__POS
0.844466
function BitwiseAdd(a, b) { while (b != 0) { var carry = (a & b); a = a ^ b; b = carry << 1; } return a; } console.log(BitwiseAdd(4, 5)); // 9 function BitwiseNegate(a) { return BitwiseAdd(~a, 1); } console.log(BitwiseNegate(9)); // -9 // negation with itself gives back origi...
__label__POS
0.981868
// // MVVM_MyToDosTests.swift // MVVM_MyToDosTests // // Created by Raúl Ferrer on 12/6/22. // import XCTest class MVVM_MyToDosTests: XCTestCase { override func setUpWithError() throws { // Put setup code here. This method is called before the invocation of each test method in the class. } ov...
__label__POS
0.782426
// // HomeCoordinator.swift // MVVM-C_MyToDos // // Created by Raúl Ferrer on 26/7/22. // import UIKit protocol HomeCoordinatorProtocol { func showSelectedList(_ list: TasksListModel) func gotoAddList() } class HomeCoordinator: Coordinator, HomeCoordinatorProtocol { var navigationController: UINa...
__label__POS
0.657389
// // MVVM_MyToDosTests.swift // MVVM_MyToDosTests // // Created by Raúl Ferrer on 12/6/22. // import XCTest class MVVM_MyToDosTests: XCTestCase { override func setUpWithError() throws { // Put setup code here. This method is called before the invocation of each test method in the class. } ov...
__label__POS
0.782426
// // AddTaskViewTests.swift // MVVM_MyToDosTests // // Created by Raúl Ferrer on 17/7/22. // import XCTest @testable import MVVM_MyToDos class AddTaskViewTests: XCTestCase { var sut: AddTaskView! var taskList = TasksListModel(id: "12345-67890", title: "Test List", ...
__label__POS
0.667356
// // TaskListViewControllerTests.swift // MVVM_MyToDosTests // // Created by Raúl Ferrer on 16/7/22. // import XCTest @testable import MVVM_MyToDos class TaskListViewControllerTests: XCTestCase { var sut: TaskListViewController! var navigationController: MockNavigationController! let list = TasksList...
__label__POS
0.871942
// // AddListViewTests.swift // MVVM_MyToDosTests // // Created by Raúl Ferrer on 16/7/22. // import XCTest @testable import MVVM_MyToDos class AddListViewTests: XCTestCase { var sut: AddListView! let tasksListService = TasksListService(coreDataManager: InMemoryCoreDataManager.shared) overr...
__label__POS
0.641452
// // HomeViewControllerTests.swift // MVVM_MyToDosTests // // Created by Raúl Ferrer on 16/7/22. // import XCTest @testable import MVVM_MyToDos class HomeViewControllerTest: XCTestCase { var sut: HomeViewController! var navigationController: MockNavigationController! override func setUpWith...
__label__POS
0.810352
// // AddListInteractorTests.swift // VIP_MyToDos // @testable import VIP_MyToDos import XCTest final class AddListInteractorTest: XCTestCase { private var sut: AddListInteractor! private var presenter: AddListPresenterMock! private var mockTaskListService: MockTaskListService! override fu...
__label__POS
0.612342
// // MVVM_MyToDosTests.swift // MVVM_MyToDosTests // // Created by Raúl Ferrer on 12/6/22. // import XCTest class MVVM_MyToDosTests: XCTestCase { override func setUpWithError() throws { // Put setup code here. This method is called before the invocation of each test method in the class. } ov...
__label__POS
0.782426
// // AddListPresenterTest.swift // VIP_MyToDos // @testable import VIP_MyToDos import XCTest final class AddListPresenterTest: XCTestCase { private var sut: AddListPresenter! private var viewController: MockAddListViewController! private var router: MockAddListRouter! override func setUpW...
__label__POS
0.610316
// // TaskServiceTest.swift // VIP_MyToDosTests // // Created by Raúl Ferrer on 14/9/22. // import XCTest import CoreData @testable import VIP_MyToDos class TaskServiceTest: XCTestCase { var sut: TaskServiceProtocol! var taskListService: TasksListServiceProtocol! var list: TasksListModel! var...
__label__POS
0.614154
// // TasksListServiceTest.swift // VIP_MyToDosTests // // Created by Raúl Ferrer on 14/9/22. // import XCTest import CoreData @testable import VIP_MyToDos class TasksListServiceTest: XCTestCase { var sut: TasksListServiceProtocol! var list: TasksListModel! override func setUpWithError() thr...
__label__POS
0.91355
// // AddTaskScenePresenterTests.swift // VIP_MyToDos // import XCTest @testable import VIP_MyToDos final class AddTaskPresenterTests: XCTestCase { private var sut: AddTaskPresenter! private var viewController: MockAddTaskViewController! private var router: MockAddTaskRouter! override func...
__label__POS
0.611498
// // AddTaskInteractorTest.swift // VIP_MyToDos // import XCTest @testable import VIP_MyToDos final class AddTaskInteractorTest: XCTestCase { private var sut: AddTaskInteractor! private var presenter: MockAddTaskPresenter! var mockTaskService: MockTaskService! var taskList = TasksListMode...
__label__POS
0.685161
{"cells":[{"cell_type":"markdown","id":"c23b4dd1","metadata":{"id":"c23b4dd1"},"source":["<div>\n"," <h1>Large Language Models Projects</a></h1>\n"," <h3>Apply and Implement Strategies for Large Language Models</h3>\n"," <h2>6.1-Creating a NL2SQL Superprompt for OpenAI.</h2>\n"," <h3></h3>\n","</div>\n","\n...
__label__POS
0.840844
// // AddListInteractor.swift // VIP_MyToDos // import Foundation protocol AddListInteractorOutput: AnyObject { func navigateBack() } typealias AddListInteractorInput = AddListViewControllerOutput final class AddListInteractor { var presenter: AddListPresenterInput? private let tasksListService: ...
__label__POS
0.656775
// // HomePresenter.swift // VIP_MyToDos // import UIKit typealias HomePresenterInput = HomeInteractorOutput typealias HomePresenterOutput = HomeViewControllerInput final class HomePresenter { weak var viewController: HomePresenterOutput? } extension HomePresenter: HomePresenterInput { func presentTa...
__label__POS
0.609215
// // TaskServiceTest.swift // MVC-MyToDosTests // // Created by Raúl Ferrer on 8/5/22. // import XCTest import CoreData @testable import MVC_MyToDos class TaskServiceTest: XCTestCase { var sut: TaskServiceProtocol! var taskListService: TasksListServiceProtocol! var list: TasksListModel! var ...
__label__POS
0.61717
// // TaskServiceTest.swift // MVC-MyToDosTests // // Created by Raúl Ferrer on 8/5/22. // import XCTest import CoreData @testable import MVC_MyToDos class TasksListServiceTest: XCTestCase { var sut: TasksListServiceProtocol! var list: TasksListModel! override func setUpWithError() throws { ...
__label__POS
0.91415
// // AddListViewControllerTest.swift // MVC-MyToDosTests // // Created by Raúl Ferrer on 15/5/22. // import XCTest @testable import MVC_MyToDos class AddListViewControllerTest: XCTestCase { var sut: AddListViewController! var navigationController: MockNavigationController! var tasksListService: ...
__label__POS
0.742074
// // AddTaskViewControllerTest.swift // MVC-MyToDosTests // // Created by Raúl Ferrer on 15/5/22. // import XCTest @testable import MVC_MyToDos class AddTaskViewControllerTest: XCTestCase { var sut: AddTaskViewController! var taskService: MockTaskService! var navigationController: MockNavig...
__label__POS
0.731325
// // HomeViewControllerTest.swift // MVC-MyToDosTests // // Created by Raúl Ferrer on 15/5/22. // import XCTest @testable import MVC_MyToDos class HomeViewControllerTest: XCTestCase { var sut: HomeViewController! var navigationController: MockNavigationController! var tasksListService: MockTaskL...
__label__POS
0.749017
#import "Tire.h" @implementation Tire @synthesize pressure; @synthesize treadDepth; - (id) init { if (self = [self initWithPressure: 34 treadDepth: 20]) { } return (self); } // init - (id) copyWithZone: (NSZone *) zone { Tire *tireCopy; tireCopy = [[[self class] allocWithZone:...
__label__POS
0.693726
#import "Tire.h" @implementation Tire @synthesize pressure; @synthesize treadDepth; - (id) init { if (self = [self initWithPressure: 34 treadDepth: 20]) { } return (self); } // init - (id) copyWithZone: (NSZone *) zone { Tire *tireCopy; tireCopy = [[[self class] allocWithZone:...
__label__POS
0.693726
#import "Tire.h" @implementation Tire @synthesize pressure; @synthesize treadDepth; - (id) init { if (self = [self initWithPressure: 34 treadDepth: 20]) { } return (self); } // init - (id) initWithPressure: (float) p { if (self = [self initWithPressure: p ...
__label__POS
0.803896
#import "Tire.h" @implementation Tire @synthesize pressure; @synthesize treadDepth; - (id) init { if (self = [self initWithPressure: 34 treadDepth: 20]) { } return (self); } // init - (id) initWithPressure: (float) p { if (self = [self initWithPressure: p ...
__label__POS
0.803896
// // TaskListPresenterTest.swift // MVP_MyToDosTests // // Created by Raúl Ferrer on 31/5/22. // import XCTest @testable import MVP_MyToDos class TaskListPresenterTest: XCTestCase { var sut: TasksListPresenter! var task: TaskModel! var taskList: TasksListModel! override func setUpWithEr...
__label__POS
0.7047
// // TaskListServiceTest.swift // MVP_MyToDosTests // // Created by Raúl Ferrer on 31/5/22. // import XCTest import CoreData @testable import MVP_MyToDos class TasksListServiceTest: XCTestCase { var sut: TasksListServiceProtocol! var list: TasksListModel! override func setUpWithError() thro...
__label__POS
0.915602
// // HomePresenterTest.swift // MVP_MyToDosTests // // Created by Raúl Ferrer on 31/5/22. // import XCTest @testable import MVP_MyToDos class HomePresenterTest: XCTestCase { var sut: HomePresenter! let taskList = TasksListModel(id: "12345-67890", title: "Test List",...
__label__POS
0.86115
// // TaskServiceTest.swift // MVP_MyToDosTests // // Created by Raúl Ferrer on 31/5/22. // import XCTest import CoreData @testable import MVP_MyToDos class TaskServiceTest: XCTestCase { var sut: TaskServiceProtocol! var taskListService: TasksListServiceProtocol! var list: TasksListModel! var...
__label__POS
0.618441
#import "Tire.h" @implementation Tire @synthesize pressure; @synthesize treadDepth; - (id) init { if (self = [self initWithPressure: 34 treadDepth: 20]) { } return (self); } // init - (id) copyWithZone: (NSZone *) zone { Tire *tireCopy; tireCopy = [[[self class] allocWithZone:...
__label__POS
0.693726
// // AddTaskPresenterTest.swift // MVP_MyToDosTests // // Created by Raúl Ferrer on 31/5/22. // import XCTest @testable import MVP_MyToDos class AddTaskPresenterTest: XCTestCase { var sut: AddTaskPresenter! override func setUpWithError() throws { let taskList = TasksListModel(id: "12345-678...
__label__POS
0.863395
#import <Foundation/Foundation.h> @interface RetainTracker : NSObject @end // RetainTracker @implementation RetainTracker - (id) init { if (self = [super init]) { NSLog (@"init: Retain count of %d.", [self retainCount]); } return (self); } // init - (void) dealloc { NSLog (@"dealloc called. Bye Bye...
__label__POS
0.851841
// // HomeViewControllerTest.swift // MVP_MyToDosTests // // Created by Raúl Ferrer on 1/6/22. // import XCTest @testable import MVP_MyToDos class HomeViewControllerTest: XCTestCase { var sut: HomeViewController! var navigationController: MockNavigationController! override func setUpWithError() ...
__label__POS
0.814988
#import <Foundation/Foundation.h> @interface RetainTracker : NSObject @end // RetainTracker @implementation RetainTracker - (id) init { if (self = [super init]) { NSLog (@"init: Retain count of %d.", [self retainCount]); } return (self); } // init - (void) dealloc { NSLog (@"dealloc called. Bye Bye...
__label__POS
0.809918
// // HomePresenter.swift // MVP_MyToDos // // Created by Raúl Ferrer on 10/5/22. // import Foundation class HomePresenter { private weak var homeView: HomeViewDelegate? private var tasksListService: TasksListServiceProtocol! private var lists: [TasksListModel] = [TasksListModel]() ...
__label__POS
0.844808
// // AddTaskPresenter.swift // MVP_MyToDos // // Created by Raúl Ferrer on 10/5/22. // import Foundation class AddTaskPresenter { private var addTaskView: AddTaskViewDelegate? private var tasksListModel: TasksListModel! private var taskService: TaskServiceProtocol! private(set) var task: Task...
__label__POS
0.719957
// // TasksListPresenter.swift // MVP_MyToDos // // Created by Raúl Ferrer on 10/5/22. // import Foundation class TasksListPresenter { private weak var taskListView: TaskListViewDelegate? private var tasksListModel: TasksListModel! private var taskService: TaskServiceProtocol! private var task...
__label__POS
0.602288
// // MVVM_MyToDosTests.swift // MVVM_MyToDosTests // // Created by Raúl Ferrer on 12/6/22. // import XCTest class MVVM_MyToDosTests: XCTestCase { override func setUpWithError() throws { // Put setup code here. This method is called before the invocation of each test method in the class. } ov...
__label__POS
0.782426
// // TaskServiceTest.swift // VIPER_MyToDosTests // // Created by Raúl Ferrer on 14/9/22. // import XCTest import CoreData @testable import VIPER_MyToDos class TaskServiceTest: XCTestCase { var sut: TaskServiceProtocol! var taskListService: TasksListServiceProtocol! var list: TasksListModel! ...
__label__POS
0.617435
// // TasksListServiceTest.swift // VIPER_MyToDosTests // // Created by Raúl Ferrer on 14/9/22. // import XCTest import CoreData @testable import VIPER_MyToDos class TasksListServiceTest: XCTestCase { var sut: TasksListServiceProtocol! var list: TasksListModel! override func setUpWithError()...
__label__POS
0.915178
#include <time.h> #include <stdio.h> #include <stdlib.h> #define SIZE 1024*512*16 int binarySearch(int *array, size_t number_of_elements, int key) { size_t low = 0, high = number_of_elements-1, mid; while(low <= high) { mid = (low + high)/2; #ifdef DO_PREFETCH // low path __builtin_pre...
__label__POS
0.955346