content
stringlengths
263
5.24M
pred_label
stringclasses
1 value
pred_score_pos
float64
0.6
1
"use strict"; var product_model_1 = require("./product.model"); var datasource_model_1 = require("./datasource.model"); var Model = (function () { function Model() { var _this = this; this.locator = function (p, id) { return p.id == id; }; this.dataSource = new datasource_model_1.SimpleDataS...
__label__POS
0.869977
import { NgModule } from "@angular/core"; import { BrowserModule } from "@angular/platform-browser"; import { FormsModule } from "@angular/forms"; import { ModelModule } from "../model/model.module"; import { TableComponent } from "./table.component"; import { FormComponent } from "./form.component"; import { SharedSta...
__label__POS
0.658084
package com.practicalddd.cargotracker.trackingms.interfaces.events; import com.practicalddd.cargotracker.shareddomain.events.CargoHandledEvent; import com.practicalddd.cargotracker.shareddomain.events.CargoHandledEventData; import com.practicalddd.cargotracker.trackingms.application.internal.commandservices.AssignTrac...
__label__POS
0.813473
import { Injectable } from "@angular/core"; import { Product } from "./product.model"; import { StaticDataSource } from "./static.datasource"; @Injectable() export class Model { private products: Product[]; private locator = (p: Product, id: number) => p.id == id; constructor(private dataSource: StaticDat...
__label__POS
0.877568
package com.practicalddd.cargotracker.trackingms.interfaces.events; import com.practicalddd.cargotracker.shareddomain.events.CargoRoutedEvent; import com.practicalddd.cargotracker.trackingms.application.internal.commandservices.AssignTrackingIdCommandService; import com.practicalddd.cargotracker.trackingms.interfaces....
__label__POS
0.898826
package com.practicalddd.cargotracker.trackingms.interfaces.events.transform; import com.practicalddd.cargotracker.shareddomain.events.CargoHandledEvent; import com.practicalddd.cargotracker.shareddomain.events.CargoHandledEventData; import com.practicalddd.cargotracker.shareddomain.events.CargoRoutedEvent; import com...
__label__POS
0.999805
package com.practicalddd.cargotracker.trackingms.domain.model.commands; import java.util.Date; /** * Add Tracking Event Command */ public class AddTrackingEventCommand { private String bookingId; private Date eventTime; private String eventType; private String location; private String voyageNumb...
__label__POS
0.781419
package com.practicalddd.cargotracker.trackingms.domain.model.valueobjects; import javax.persistence.*; import java.util.Date; /** * Tracking Event Details */ @Entity @Table(name="tracking_handling_events") public class TrackingEvent { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Lon...
__label__POS
0.969248
package com.practicalddd.cargotracker.trackingms.infrastructure.repositories.jpa; import com.practicalddd.cargotracker.trackingms.domain.model.aggregates.TrackingActivity; import com.practicalddd.cargotracker.trackingms.domain.model.aggregates.TrackingNumber; import com.practicalddd.cargotracker.trackingms.domain.mod...
__label__POS
0.656449
package com.practicalddd.cargotracker.shareddomain.events; import java.util.Date; /** * Event Data for the Cargo Handled Event */ public class CargoHandledEventData { private String bookingId; private String handlingType; private Date handlingCompletionTime; private String handlingLocation; pri...
__label__POS
0.911651
import { Component, Output, EventEmitter, ViewEncapsulation, Inject, SkipSelf } from "@angular/core"; import { Product } from "../model/product.model"; import { ProductFormGroup } from "../model/form.model"; import { Model } from "../model/repository.model"; import { VALUE_SERVICE } from "../common/valueDispla...
__label__POS
0.665287
protocol StockServer { func getStockLevel(product:String, callback: (String, Int) -> Void); func setStockLevel(product:String, stockLevel:Int); } class StockServerFactory { class func getStockServer() -> StockServer { return server; } private class var server:StockServer { ...
__label__POS
0.96094
import UIKit; class CellFormatter { var nextLink:CellFormatter?; func formatCell(cell: ProductTableCell) { nextLink?.formatCell(cell); } class func createChain() -> CellFormatter { let formatter = ChessFormatter(); formatter.nextLink = WatersportsFormatter(); f...
__label__POS
0.826874
import Foundation @objc protocol Suspension { var suspensionType:SuspensionOption { get }; class func getInstance() -> Suspension; } class RoadSuspension : Suspension { var suspensionType = SuspensionOption.STANDARD; private init() {}; class func getInstance() -> Suspension { ...
__label__POS
0.724987
angular.module("customFilters", []) .filter("unique", function () { return function (data, propertyName) { if (angular.isArray(data) && angular.isString(propertyName)) { var results = []; var keys = {}; for (var i = 0; i < data.length; i++) { var val = dat...
__label__POS
0.958884
import { NgModule } from "@angular/core"; import { PaAddTaxPipe } from "./addTax.pipe"; import { PaAttrDirective } from "./attr.directive"; import { PaCategoryFilterPipe } from "./categoryFilter.pipe"; import { PaCellColor } from "./cellColor.directive"; import { PaCellColorSwitcher } from "./cellColorSwitcher.directi...
__label__POS
0.672202
angular.module("sportsStore") .constant("productListActiveClass", "btn-primary") .constant("productListPageCount", 3) .controller("productListCtrl", function ($scope, $filter, productListActiveClass, productListPageCount) { var selectedCategory = null; $scope.selectedPage = 1; ...
__label__POS
0.735002
package com.practicalddd.cargotracker.routingms.application.internal.queryservices; import com.practicalddd.cargotracker.routingms.domain.model.aggregates.Voyage; import com.practicalddd.cargotracker.routingms.domain.model.entities.CarrierMovement; import com.practicalddd.cargotracker.routingms.infrastructure.reposit...
__label__POS
0.884514
import { Injectable } from "@angular/core"; import { Product } from "./product.model"; import { SimpleDataSource } from "./datasource.model"; @Injectable() export class Model { //private dataSource: SimpleDataSource; private products: Product[]; private locator = (p: Product, id: number) => p.id == id; ...
__label__POS
0.855074
package com.practicalddd.cargotracker.routingms.interfaces.rest; import com.practicalddd.cargotracker.routingms.application.internal.queryservices.CargoRoutingQueryService; import com.practicalddd.cargotracker.routingms.domain.model.aggregates.Voyage; import com.practicalddd.cargotracker.routingms.domain.model.entiti...
__label__POS
0.926779
"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Refl...
__label__POS
0.631411
package com.practicalddd.cargotracker.routingms.infrastructure.repositories.jpa; import com.practicalddd.cargotracker.routingms.domain.model.aggregates.Voyage; import javax.enterprise.context.ApplicationScoped; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import java.util.Lis...
__label__POS
0.995258
import { NgModule } from "@angular/core"; import { BrowserModule } from "@angular/platform-browser"; import { FormsModule } from "@angular/forms"; import { ModelModule } from "../model/model.module"; import { TableComponent } from "./table.component"; import { FormComponent } from "./form.component"; import { SharedSt...
__label__POS
0.621364
using System; using System.Collections.Generic; using PartyInvites.Controllers; using PartyInvites.Models; using Xunit; using Microsoft.AspNetCore.Mvc; using System.Linq; namespace Tests { public class HomeControllerTests { [Fact] public void ListActionFiltersNonAttendees() { //Arrange...
__label__POS
0.920307
package com.practicalddd.cargotracker.rabbitmqadaptor; import com.rabbitmq.client.ConnectionFactory; import javax.inject.Inject; import javax.inject.Singleton; @Singleton public class ConnectionConfigurator { @Inject ConnectionFactory connectionFactory; /** * Configures the connection factory su...
__label__POS
0.843572
using System; using Microsoft.AspNetCore.Mvc; using PartyInvites.Models; using System.Linq; namespace PartyInvites.Controllers { public class HomeController : Controller { private IRepository repository; public HomeController(IRepository repo) => this.repository = repo; ...
__label__POS
0.973568
import { Product } from "./product.model"; import { SimpleDataSource } from "./datasource.model"; export class Model { private dataSource: SimpleDataSource; private products: Product[]; private locator = (p: Product, id: number) => p.id == id; constructor() { this.dataSource = new SimpleDataSo...
__label__POS
0.891078
package com.practicalddd.cargotracker.rabbitmqadaptor; import com.rabbitmq.client.Connection; /** * A connection listener is used by a connection factory * to notify clients about a change in connection state. * * @author christian.bick * */ public interface ConnectionListener { /** * Called whe...
__label__POS
0.648904
<!DOCTYPE html> <html> <head> <title>Example 10.3: Layer Manager</title> <link rel ="icon" type ="image/x-icon" href="./assets/favicon.png"> <!-- the following says there are javascript source code contained in the external source files --> <!-- external librar...
__label__POS
0.931516
package com.practicalddd.cargotracker.rabbitmqadaptor.consumer; /** * A consumer configuration holds parameters to be set before enabling a consumer to * consume messages from the message broker. * * @author christian.bick * @author uwe.janner * @author soner.dastan * */ public class ConsumerConfiguration {...
__label__POS
0.871197
import { Product } from "./product.model"; import { SimpleDataSource } from "./datasource.model"; export class Model { private dataSource: SimpleDataSource; private products: Product[]; private locator = (p: Product, id: number) => p.id == id; constructor() { this.dataSource = new SimpleDataSo...
__label__POS
0.891078
angular.module("exampleApp") .filter("labelCase", function () { return function (value, reverse) { if (angular.isString(value)) { var intermediate = reverse ? value.toUpperCase() : value.toLowerCase(); return (reverse ? intermediate[0].toLowerCase() : ...
__label__POS
0.983316
package com.practicalddd.cargotracker.rabbitmqadaptor.publisher; import com.practicalddd.cargotracker.rabbitmqadaptor.Message; import com.rabbitmq.client.Channel; import com.rabbitmq.client.ConnectionFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.IOException; import java.util.List; ...
__label__POS
0.816164
angular.module("exampleApp") .filter("labelCase", function () { return function (value, reverse) { if (angular.isString(value)) { var intermediate = reverse ? value.toUpperCase() : value.toLowerCase(); return (reverse ? intermediate[0].toLowerCase() : ...
__label__POS
0.983221
package com.practicalddd.cargotracker.rabbitmqadaptor.publisher; import com.practicalddd.cargotracker.rabbitmqadaptor.Message; import com.rabbitmq.client.Channel; import com.rabbitmq.client.ConnectionFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.IOException; import java.util.List; ...
__label__POS
0.968731
package com.practicalddd.cargotracker.rabbitmqadaptor.publisher; import com.practicalddd.cargotracker.rabbitmqadaptor.Message; import com.rabbitmq.client.ConnectionFactory; import java.io.IOException; import java.sql.Time; import java.util.List; import java.util.concurrent.TimeoutException; /** * Publishes messages...
__label__POS
0.783767
import { NgModule } from "@angular/core"; import { BrowserModule } from "@angular/platform-browser"; import { FormsModule } from "@angular/forms"; import { ModelModule } from "../model/model.module"; import { TableComponent } from "./table.component"; import { FormComponent } from "./form.component"; import { SharedSta...
__label__POS
0.658084
import { Injectable } from "@angular/core"; import { Product } from "./product.model"; import { StaticDataSource } from "./static.datasource"; @Injectable() export class Model { private products: Product[]; private locator = (p: Product, id: number) => p.id == id; constructor(private dataSource: StaticDat...
__label__POS
0.877568
import { NgModule } from "@angular/core"; import { BrowserModule } from "@angular/platform-browser"; import { FormsModule } from "@angular/forms"; import { ModelModule } from "../model/model.module"; import { TableComponent } from "./table.component"; import { FormComponent } from "./form.component"; import { SharedSta...
__label__POS
0.658084
import Foundation func == (lhs:Person, rhs:Person) -> Bool { return lhs.name == rhs.name && lhs.city == rhs.city; } class Person : Equatable, Printable { var name:String; var city:String; init(_ name:String, _ city:String) { self.name = name; self.city = city; } var d...
__label__POS
0.714934
import { Product } from "./product.model"; import { SimpleDataSource } from "./datasource.model"; export class Model { private dataSource: SimpleDataSource; private products: Product[]; private locator = (p: Product, id: number) => p.id == id; constructor() { this.dataSource = new SimpleDataSo...
__label__POS
0.90246
class ControllerBase { private let repository:Repository; private let nextController:ControllerBase?; init(repo:Repository, nextController:ControllerBase?) { self.repository = repo; self.nextController = nextController; } func handleCommand(command:Command, data:[String]) -...
__label__POS
0.675526
import Foundation final class NetworkPool { private let connectionCount = 3; private var connections = [NetworkConnection](); private var semaphore:dispatch_semaphore_t; private var queue:dispatch_queue_t; private init() { for _ in 0 ..< connectionCount { connections.append...
__label__POS
0.692408
angular.module("sportsStore") .constant("productListActiveClass", "btn-primary") .constant("productListPageCount", 3) .controller("productListCtrl", function ($scope, $filter, productListActiveClass, productListPageCount, cart) { var selectedCategory = null; $scope.selectedPage = 1...
__label__POS
0.706295
protocol StockServer { func getStockLevel(product:String, callback: (String, Int) -> Void); func setStockLevel(product:String, stockLevel:Int); } class StockServerFactory { class func getStockServer() -> StockServer { return server; } private class var server:StockServer { ...
__label__POS
0.96094
import UIKit; class CellFormatter { var nextLink:CellFormatter?; func formatCell(cell: ProductTableCell) { nextLink?.formatCell(cell); } class func createChain() -> CellFormatter { let formatter = ChessFormatter(); formatter.nextLink = WatersportsFormatter(); f...
__label__POS
0.826874
(in-package :progalgs) ;; code protoypes (defstruct lf-queue (head (error "No HEAD.") :type cons) (tail (error "No TAIL.") :type cons)) (defconstant +dummy+ '.dummy.) (defun lf-enqueue (value queue) (let ((new (cons value nil))) (loop (when (eq nil (sb-ext:compare-and-swap (cdr (...
__label__POS
0.957864
(in-package :progalgs) (defun naive-fib (i) (check-type i (integer 0)) (if (< i 2) 1 (+ (naive-fib (- i 1)) (naive-fib (- i 2))))) (let ((fib (rtl:vec 1 1))) ; our table will be an adjustable vector (defun fib (i) (when (< (length fib) i) (vector-push-extend (fib (- i 1)) fib)) (+ ...
__label__POS
0.684244
(in-package :progalgs) (defstruct node id edges) (defstruct edge src dst label) (defstruct (graph (:conc-name nil) (:print-object pprint-graph)) (nodes (make-hash-table))) ; mapping of node ids to nodes (defun pprint-graph (graph stream) (let ((ids (sort (rtl:keys (nodes graph)) '<))) (format stream "...
__label__POS
0.622782
(in-package :progalgs) (defparameter *b64-dict* (coerce (append (loop :for ch :from (char-code #\A) :to (char-code #\Z) :collect (code-char ch)) (loop :for ch :from (char-code #\a) :to (char-code #\z) :collect (code-char ch)) (loop :...
__label__POS
0.838735
protocol CarPart { var name:String { get }; var price:Float { get }; func addPart(part:CarPart) -> Void; func removePart(part:CarPart) -> Void; } class Part : CarPart { let name:String; let price:Float; init(name:String, price:Float) { self.name = name; self.price = p...
__label__POS
0.608404
<!DOCTYPE html> <html> <head> <title>Example 10.2: Parallax Objects</title> <link rel ="icon" type ="image/x-icon" href="./assets/favicon.png"> <!-- the following says there are javascript source code contained in the external source files --> <!-- external lib...
__label__POS
0.928519
// // VisualisationHelper.swift // Player // // Created by Boris Bondarenko on 7/28/17. // Copyright © 2017 Applikey Solutions. All rights reserved. // import Foundation import AudioKit import AudioKitUI class VisualisationHelper { private let avgFilterDepth = 8 private let waveScale: Float = 1.9 ...
__label__POS
0.734718
class NewCoDirectoryAdapter : EmployeeDataSource { private let directory:NewCoDirectory; init() { directory = NewCoDirectory(); } var employees:[Employee] { return map(directory.getStaff().values, { sv -> Employee in return Employee(name: sv.getName(), title: sv.get...
__label__POS
0.772788
import Foundation class DataSourceBase : EmployeeDataSource { var employees = [Employee](); func searchByName(name: String) -> [Employee] { return search({e -> Bool in return e.name.rangeOfString(name) != nil; }); } func searchByTitle(title: String) -> [Employee] {...
__label__POS
0.97975
import { NgModule } from "@angular/core"; import { BrowserModule } from "@angular/platform-browser"; import { FormsModule } from "@angular/forms"; import { ModelModule } from "../model/model.module"; import { TableComponent } from "./table.component"; import { FormComponent } from "./form.component"; import { Subject }...
__label__POS
0.719651
import { NgModule } from "@angular/core"; import { BrowserModule } from "@angular/platform-browser"; import { FormsModule } from "@angular/forms"; import { ModelModule } from "../model/model.module"; import { TableComponent } from "./table.component"; import { FormComponent } from "./form.component"; import { Subject }...
__label__POS
0.719651
### Examples It's our goal to create a wide variety of example of how Tether can be used. Here's what we have so far, please send a PR with any examples you might create. #### Beginner - [simple](../../examples/simple): A simple example to get you started - [out-of-bounds](../../examples/out-of-bounds): How to hide...
__label__POS
0.941365
import { NgModule } from "@angular/core"; import { BrowserModule } from "@angular/platform-browser"; import { FormsModule } from "@angular/forms"; import { ModelModule } from "../model/model.module"; import { TableComponent } from "./table.component"; import { FormComponent } from "./form.component"; import { Subject }...
__label__POS
0.719651
import { Injectable } from "@angular/core"; import { ActivatedRouteSnapshot, RouterStateSnapshot, Router } from "@angular/router"; import { Observable } from "rxjs/Observable"; import { Subject } from "rxjs/Subject"; import { MessageService } from "../messages/message.service"; import { Message } from "../mess...
__label__POS
0.791134
protocol StockServer { func getStockLevel(product:String, callback: (String, Int) -> Void); func setStockLevel(product:String, stockLevel:Int); } class StockServerFactory { class func getStockServer() -> StockServer { return server; } private class var server:StockServer { ...
__label__POS
0.96094
import { Injectable } from "@angular/core"; import { ActivatedRouteSnapshot, RouterStateSnapshot, Router } from "@angular/router"; import { Observable, Subject } from "rxjs"; import { MessageService } from "../messages/message.service"; import { Message } from "../messages/message.model"; import { FormComponen...
__label__POS
0.833622
package com.applikeysolutions.cosmocalendar; import android.os.AsyncTask; import com.applikeysolutions.cosmocalendar.adapter.MonthAdapter; import com.applikeysolutions.cosmocalendar.model.Month; import com.applikeysolutions.cosmocalendar.settings.SettingsManager; import com.applikeysolutions.cosmocalendar.utils.Calen...
__label__POS
0.976414
import { NgModule } from "@angular/core"; import { BrowserModule } from "@angular/platform-browser"; import { FormsModule } from "@angular/forms"; import { ModelModule } from "../model/model.module"; import { TableComponent } from "./table.component"; import { FormComponent } from "./form.component"; import { Subject }...
__label__POS
0.711094
package com.applikeysolutions.cosmocalendar.settings; import android.support.v7.widget.LinearLayoutManager; import com.applikeysolutions.cosmocalendar.settings.appearance.AppearanceInterface; import com.applikeysolutions.cosmocalendar.settings.appearance.AppearanceModel; import com.applikeysolutions.cosmocalendar.set...
__label__POS
0.82192
import { NgModule } from "@angular/core"; import { BrowserModule } from "@angular/platform-browser"; import { FormsModule } from "@angular/forms"; import { ModelModule } from "../model/model.module"; import { TableComponent } from "./table.component"; import { FormComponent } from "./form.component"; import { Subject ...
__label__POS
0.673125
package com.applikeysolutions.cosmocalendar.utils; import android.content.Context; import android.content.res.Resources; import android.graphics.BitmapFactory; import android.view.WindowManager; import com.applikeysolutions.cosmocalendar.settings.SettingsManager; import com.applikeysolutions.cosmocalendar.model.Day; ...
__label__POS
0.973178
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="chrome=1"> <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> <script type="text/javascript" src="//use.typekit.net/jbn8qxr.js"></script> <scri...
__label__POS
0.977552
package com.applikeysolutions.cosmocalendar.utils; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import com.applikeysolutions.cosmocalendar.model.Day; import java.util.Calendar; import java.util.Date; public class DateUtils { public static Calendar getCalendar(Date date...
__label__POS
0.958894
angular.module("exampleApp") .filter("labelCase", function () { return function (value, reverse) { if (angular.isString(value)) { var intermediate = reverse ? value.toUpperCase() : value.toLowerCase(); return (reverse ? intermediate[0].toLowerCase() : ...
__label__POS
0.983316
package com.applikeysolutions.cosmocalendar.model; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Calendar; import java.util.List; import java.util.Locale; public class Month { private List<Day> days; private Day firstDay; public Month(Day firstDay, List<Day> days) { ...
__label__POS
0.83781
package com.applikeysolutions.cosmocalendar.selection; import android.support.annotation.NonNull; import android.support.v4.util.Pair; import com.applikeysolutions.cosmocalendar.model.Day; import com.applikeysolutions.cosmocalendar.utils.DateUtils; public class RangeSelectionManager extends BaseSelectionManager { ...
__label__POS
0.728289
package com.applikeysolutions.cosmocalendar.selection; import android.support.annotation.NonNull; import com.applikeysolutions.cosmocalendar.model.Day; import com.applikeysolutions.cosmocalendar.selection.criteria.BaseCriteria; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import ...
__label__POS
0.724298
package com.applikeysolutions.cosmocalendar.selection; import com.applikeysolutions.cosmocalendar.model.Day; import com.applikeysolutions.cosmocalendar.selection.criteria.BaseCriteria; import java.util.ArrayList; import java.util.List; public abstract class BaseCriteriaSelectionManager extends BaseSelectionManager {...
__label__POS
0.957536
package com.applikeysolutions.cosmocalendar.settings.lists; import java.util.Set; import java.util.TreeSet; public class DisabledDaysCriteria { private DisabledDaysCriteriaType criteriaType = DisabledDaysCriteriaType.DAYS_OF_MONTH; private Set<Integer> days; private static final int MAX_DAYS_COUNT_IN_MO...
__label__POS
0.821672
package com.applikeysolutions.cosmocalendar.settings.appearance; public class AppearanceModel implements AppearanceInterface { //Background color of whole calendar private int calendarBackgroundColor; //Text color of month title private int monthTextColor; //Text color of day that month doesn't ...
__label__POS
0.721663
package com.applikeysolutions.cosmocalendar.settings.lists.connected_days; import java.util.Set; public class ConnectedDays { private Set<Long> days; private int textColor; private int selectedTextColor; private int disabledTextColor; public ConnectedDays(Set<Long> days, int textColor, int sele...
__label__POS
0.809865
package com.applikeysolutions.cosmocalendar.settings.lists.connected_days; import com.applikeysolutions.cosmocalendar.model.Day; import com.applikeysolutions.cosmocalendar.utils.DateUtils; import java.util.ArrayList; import java.util.Calendar; import java.util.List; public class ConnectedDaysManager { private s...
__label__POS
0.979484
package com.applikeysolutions.cosmocalendar.view.delegate; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.applikeysolutions.customizablecalendar.R; import com.applikeysolutions.cosmocalendar.adapter.DaysAdapter; import com.applikeysolutions.cosmocalendar.adapte...
__label__POS
0.822974
import { Injectable } from "@angular/core"; import { ActivatedRouteSnapshot, RouterStateSnapshot, Router } from "@angular/router"; import { Observable, Subject } from "rxjs"; import { MessageService } from "../messages/message.service"; import { Message } from "../messages/message.model"; import { FormComponen...
__label__POS
0.833622
import { NgModule } from "@angular/core"; import { BrowserModule } from "@angular/platform-browser"; import { FormsModule } from "@angular/forms"; import { ModelModule } from "../model/model.module"; import { TableComponent } from "./table.component"; import { FormComponent } from "./form.component"; import { Subject }...
__label__POS
0.711094
import { Injectable } from "@angular/core"; import { Product } from "./product.model"; import { StaticDataSource } from "./static.datasource"; @Injectable() export class Model { private products: Product[]; private locator = (p: Product, id: number) => p.id == id; constructor(private dataSource: StaticDat...
__label__POS
0.877568
package environment import ( "bufio" "github.com/Appliscale/cloud-security-audit/configuration" "github.com/Appliscale/perun/helpers" "github.com/aws/aws-sdk-go/aws/endpoints" "os" "strconv" "strings" ) var Regions = getAllRegions() func CheckAWSConfigFiles(config *configuration.Config) bool { homeDir, pathE...
__label__POS
0.850096
package report import ( "bytes" "sort" "strings" "github.com/aws/aws-sdk-go/service/ec2" ) type SortableTags struct { Tags map[string]string Keys []string } func NewSortableTags() *SortableTags { return &SortableTags{Tags: make(map[string]string)} } func (st *SortableTags) Add(tags []*ec2.Tag) { for _, ta...
__label__POS
0.657831
package report import ( "strings" "testing" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" "github.com/stretchr/testify/assert" ) func TestIfTagsAreSortedCorrectly(t *testing.T) { st := NewSortableTags() ec2Tags := []*ec2.Tag{ { Key: aws.String("BBBB"), Value: aws.String("S...
__label__POS
0.723755
package report import ( "sort" "strings" "testing" "github.com/Appliscale/cloud-security-audit/resource" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" "github.com/stretchr/testify/assert" ) func TestEC2Report_IfVolumeEncryptedWithDefaultKMSLineHasSuffixDKMS(t *testing.T) { kmsKeyA...
__label__POS
0.90174
package report import ( "fmt" "github.com/Appliscale/cloud-security-audit/configuration" "github.com/Appliscale/cloud-security-audit/resource" "github.com/aws/aws-sdk-go/service/iam" "strings" ) type IAMReport struct { UserName string Groups string InlinePolicies int } func NewIAMReport(u iam.U...
__label__POS
0.726979
package resource import ( "fmt" "testing" "github.com/Appliscale/cloud-security-audit/configuration" "github.com/Appliscale/cloud-security-audit/csasession" "github.com/Appliscale/cloud-security-audit/csasession/clientfactory/mocks" "github.com/aws/aws-sdk-go/service/s3" "github.com/stretchr/testify/assert" ) ...
__label__POS
0.660424
import { NgModule } from "@angular/core"; import { BrowserModule } from "@angular/platform-browser"; import { FormsModule } from "@angular/forms"; import { ModelModule } from "../model/model.module"; import { TableComponent } from "./table.component"; import { FormComponent } from "./form.component"; import { SharedSta...
__label__POS
0.658084
package resource import ( "testing" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/kms" "github.com/stretchr/testify/assert" ) func TestKMSKeysloadValuesToMapSetCustomToTrueWhenAliasAWSIsNotPresent(t *testing.T) { prefix := "arn:aws:kms:us-east-1:123456789101:" aliasName := "alias/some-alia...
__label__POS
0.97388
import { Injectable } from "@angular/core"; import { Product } from "./product.model"; import { StaticDataSource } from "./static.datasource"; @Injectable() export class Model { private products: Product[]; private locator = (p: Product, id: number) => p.id == id; constructor(private dataSource: StaticDat...
__label__POS
0.877568
import { Injectable } from "@angular/core"; import { Product } from "./product.model"; import { StaticDataSource } from "./static.datasource"; @Injectable() export class Model { private products: Product[]; private locator = (p: Product, id: number) => p.id == id; constructor(private dataSource: StaticDa...
__label__POS
0.861969
package mocks import ( "github.com/Appliscale/cloud-security-audit/csasession" "github.com/Appliscale/cloud-security-audit/csasession/clientfactory" "github.com/golang/mock/gomock" "testing" ) type ClientFactoryMock struct { mockCtrl *gomock.Controller kmsClient *MockKmsClient ec2Client *MockEC2Client s3Clie...
__label__POS
0.986054
<!DOCTYPE html> <html> <head> <title>Example 10.1: Tiled Objects</title> <link rel ="icon" type ="image/x-icon" href="./assets/favicon.png"> <!-- the following says there are javascript source code contained in the external source files --> <!-- external librar...
__label__POS
0.923992
protocol StockServer { func getStockLevel(product:String, callback: (String, Int) -> Void); func setStockLevel(product:String, stockLevel:Int); } class StockServerFactory { class func getStockServer() -> StockServer { return server; } private class var server:StockServer { ...
__label__POS
0.96094
import UIKit; class CellFormatter { var nextLink:CellFormatter?; func formatCell(cell: ProductTableCell) { nextLink?.formatCell(cell); } class func createChain() -> CellFormatter { let formatter = ChessFormatter(); formatter.nextLink = WatersportsFormatter(); f...
__label__POS
0.826874
<!--The content below is only a placeholder and can be replaced.--> <div style="text-align:center"> <h1> Welcome to {{title}}! </h1> <img width="300" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgM...
__label__POS
0.724884
import { NgModule } from "@angular/core"; import { BrowserModule } from "@angular/platform-browser"; import { FormsModule } from "@angular/forms"; import { ModelModule } from "../model/model.module"; import { TableComponent } from "./table.component"; import { FormComponent } from "./form.component"; import { SharedSta...
__label__POS
0.653085
# Code for chapter 03 - Semantic Errors import random XMAX, YMAX = 19, 16 def create_grid_string(dots, xsize, ysize): """ Creates a grid of size (xx, yy) with the given positions of dots. """ grid = "" for y in range(ysize): for x in range(xsize): grid += "." if (x, y) i...
__label__POS
0.767739
import { Product } from "./product.model"; import { SimpleDataSource } from "./datasource.model"; export class Model { private dataSource: SimpleDataSource; private products: Product[]; private locator = (p: Product, id: number) => p.id == id; constructor() { this.dataSource = new SimpleDataSo...
__label__POS
0.90246