content stringlengths 263 5.24M | pred_label stringclasses 1
value | pred_score_pos float64 0.6 1 |
|---|---|---|
package com.apssouza.iot.common;
import org.apache.spark.SparkConf;
import java.util.Properties;
public class ProcessorUtils {
public static SparkConf getSparkConf(Properties prop, String appName) {
var sparkConf = new SparkConf()
.setAppName(appName)
.setMaster(prop.get... | __label__POS | 1.000008 |
package com.apssouza.iot.common;
/**
* Class to calculate the distance between to locations on earth using coordinates (latitude and longitude).
* This class uses "haversine" formula to calculate the great-circle distance between two points on earth.
* http://www.movable-type.co.uk/scripts/latlong.html
*
* @au... | __label__POS | 0.971858 |
package com.apress.springrecipes.bank.web;
import static org.junit.Assert.assertEquals;
import org.mockito.Mockito;
import org.springframework.ui.ModelMap;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import com.apress.springrecipes.bank.AccountService;
public class DepositControl... | __label__POS | 0.840592 |
package com.apssouza.configuration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.ClassPathResource;
import org.springframework.security.oauth2.provider.token.TokenStore;
import org.springframework.security.oauth2.pro... | __label__POS | 0.897474 |
package com.apssouza.eventsourcing.aggregates;
import com.apssouza.eventsourcing.commands.EmailCreateCommand;
import com.apssouza.eventsourcing.commands.EmailDeleteCommand;
import com.apssouza.eventsourcing.commands.EmailSendCommand;
import com.apssouza.eventsourcing.entities.Email;
import com.apssouza.infra.AppEvent;... | __label__POS | 0.762958 |
package com.apssouza.eventsourcing;
import java.time.Instant;
import java.util.UUID;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableAp... | __label__POS | 0.99292 |
<!doctype html>
<title>CodeMirror: Dart mode</title>
<meta charset="utf-8"/>
<link rel=stylesheet href="../../doc/docs.css">
<link rel="stylesheet" href="../../lib/codemirror.css">
<script src="../../lib/codemirror.js"></script>
<script src="../clike/clike.js"></script>
<script src="dart.js"></script>
<style>.CodeMirr... | __label__POS | 0.620117 |
package com.apssouza.eventsourcing.queries;
import com.apssouza.eventsourcing.entities.Email;
import com.apssouza.eventsourcing.events.EmailCreatedEvent;
import com.apssouza.eventsourcing.events.EmailDeletedEvent;
import com.apssouza.mailservice.repository.EmailRepository;
import java.util.List;
import org.springframe... | __label__POS | 0.716682 |
package com.apssouza.iot.ml;
import com.apssouza.iot.common.PropertyFileReader;
import org.apache.spark.SparkConf;
import org.apache.spark.ml.linalg.Vectors;
import org.apache.spark.ml.regression.LinearRegressionModel;
import org.apache.spark.sql.SparkSession;
import java.util.Properties;
public class SpeedPredicti... | __label__POS | 0.912006 |
package com.apssouza.iot.common.dto;
import java.io.Serializable;
import java.util.Date;
/**
* Measurement entity
*
* @author apssouza22
*/
public class Measurement implements Serializable {
private Coordinate coordinate;
private Coordinate roundedCoordinate;
private Date timestamp;
public Mea... | __label__POS | 0.973538 |
package com.apssouza.iot.common.dto;
import java.io.Serializable;
/**
* Key class for calculation
*
* @author abaghel
*/
public class AggregateKey implements Serializable {
private String routeId;
private String vehicleType;
public AggregateKey(String routeId, String vehicleType) {
super();
... | __label__POS | 0.99497 |
package com.apssouza.iot.common.dto;
import java.io.Serializable;
/**
* Coordinate data transfer object
*
* @author apssouza22
*/
public class Coordinate implements Serializable {
private double latitude;
private double longitude;
public Coordinate(double latitude, double longitude) {
this.... | __label__POS | 0.99706 |
package com.apssouza.iot.common.entity;
import java.io.Serializable;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
/**
* Class to represent total_tarffic db table
*
*
*/
public class TotalTrafficData implements Serializable{
private String routeId;
private String vehicleType;
priv... | __label__POS | 0.600423 |
package com.apress.springrecipes.bank;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
public class InMemoryAccountDao implements AccountDao {
private Map<String, Account> accounts;
public InMemoryAccountDao() {
accounts = Collections.synchronizedMap(new HashMap<String,... | __label__POS | 0.654529 |
package com.apress.springrecipes.bank;
import java.util.Objects;
public class Account {
private final String accountNo;
private double balance;
/**
* Default constructor because JPA demands it.
*/
private Account() {
this(null, 0.0d);
}
public Account(String accountNo, dou... | __label__POS | 0.944079 |
package com.bookstore.service;
import java.util.ArrayList;
import java.util.List;
import com.bookstore.entity.Author;
import com.bookstore.entity.Book;
import com.bookstore.repository.AuthorRepository;
import com.bookstore.repository.BookRepository;
import org.springframework.stereotype.Service;
import org.springframe... | __label__POS | 0.675872 |
#import "EXPDoubleTuple.h"
@implementation EXPDoubleTuple
@synthesize values = _values, size = _size;
- (id)initWithDoubleValues:(double *)values size:(size_t)size {
if ((self = [super init])) {
self.values = malloc(sizeof(double) * size);
memcpy(self.values, values, sizeof(double) * size);
... | __label__POS | 0.817524 |
#import "EXPFloatTuple.h"
@implementation EXPFloatTuple
@synthesize values = _values, size = _size;
- (id)initWithFloatValues:(float *)values size:(size_t)size {
if ((self = [super init])) {
self.values = malloc(sizeof(float) * size);
memcpy(self.values, values, sizeof(float) * size);
sel... | __label__POS | 0.815938 |
package com.apssouza.mytrade.common.appconfig;
import org.cfg4j.provider.ConfigurationProvider;
import org.cfg4j.provider.ConfigurationProviderBuilder;
import org.cfg4j.source.ConfigurationSource;
import org.cfg4j.source.classpath.ClasspathConfigurationSource;
import org.cfg4j.source.compose.MergeConfigurationSource;... | __label__POS | 0.827253 |
package com.apssouza.mytrade.common.time;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.ZoneId;
import java.time.ZoneOffset;
import java.time.format.DateTimeFormatter;
import java.time.temporal.ChronoUnit;
/**
* Date time helper
*/
public class DateTimeHelp... | __label__POS | 0.978405 |
package com.apssouza.mytrade.common.time;
/**
*
*/
public class Interval {
private final long years;
private final long months;
private final long weeks;
private final long days;
private final long hours;
private final long minutes;
private final long seconds;
private final long mill... | __label__POS | 0.996764 |
package com.apssouza.mytrade.common.time;
import java.time.DayOfWeek;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.util.TimeZone;
public class MarketTimeHelper {
private static final LocalTime OPEN_WEEEK_MONDAY = LocalTime.of(6, 0);
private static fina... | __label__POS | 0.999181 |
package com.apssouza.monitors;
import com.apssouza.events.TodoServiceMethodInvokedEvent;
import java.util.List;
import java.util.LongSummaryStatistics;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.stream.Collectors;
import javax.annotation.PostConstruct;
import org.springframework.stereotype.Comp... | __label__POS | 0.952561 |
package com.apssouza.mytrade.common.time;
import java.time.LocalDate;
import java.util.Calendar;
import java.util.Date;
/**
* A day helper
*/
public class DayHelper {
public static boolean isWeekend(LocalDate date) {
Date dtDate = DateTimeConverter.getDateFromLocalDate(date);
Calendar c1 = Cal... | __label__POS | 0.994562 |
package com.apssouza.mytrade.common.time;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.temporal.ChronoUnit;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
public class DateRangeHelper {
public static List<LocalDate> getDatesBetween(Lo... | __label__POS | 0.972473 |
package com.apssouza.mytrade.common.file;
import java.io.IOException;
import java.io.Writer;
import java.util.List;
public class CSVHelper {
private static final char DEFAULT_SEPARATOR = ',';
public static void writeLine(Writer w, List<String> values) {
writeLine(w, values, DEFAULT_SEPARATOR, ' ');... | __label__POS | 0.987699 |
package com.apssouza.mytrade.common.file;
import java.io.Closeable;
import java.io.File;
import java.io.IOException;
import java.util.logging.Logger;
/**
* A helper for working with files
*/
public class FileDiskHelper {
private static final Logger LOG = Logger.getLogger(FileDiskHelper.class.getSimpleName());... | __label__POS | 0.988115 |
package com.apress.springrecipes.bank;
import static org.junit.Assert.assertEquals;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
impo... | __label__POS | 0.777946 |
package com.apssouza.mytrade.common.file;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
public c... | __label__POS | 0.927859 |
package com.apress.springrecipes.bank;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import org.junit.Before;
import org.junit.Test;
public class InMemoryAccountDaoTests {
private static final String EXISTING_ACCOUNT_NO = "123... | __label__POS | 0.745315 |
package com.apssouza.entities;
import java.util.Objects;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
/**
* To Do's Attachment entity
*
* @author apssouza
*/
@Entity
public class Attachment {
@Id
@GeneratedValue... | __label__POS | 0.9115 |
package com.apress.springrecipes.bank.web;
import static org.junit.Assert.assertEquals;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mockito;
import org.springframework.ui.ModelMap;
import com.apress.springrecipes.bank.AccountService;
public class DepositControllerTests {
private static f... | __label__POS | 0.938043 |
using System.Security.Cryptography;
using System.Text;
namespace Apptality.CloudMapEcsPrometheusDiscovery.Extensions;
public static class HashingExtensions
{
/// <summary>
/// Based on the provided values, computes a SHA256 hash.
/// If the collection is null or empty, returns "empty"
/// </summary>
... | __label__POS | 0.907632 |
<?php
/**
* PHPExcel
*
* Copyright (c) 2006 - 2014 PHPExcel
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later ve... | __label__POS | 0.677424 |
package com.apssouza.helpers;
import org.springframework.context.ApplicationContextAware;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;
/**
*
* @author apssouza
*/
/**
* Helper class which is able to autowire a specified class. It holds a static
* referen... | __label__POS | 0.99591 |
package com.apssouza.mytrade.feed.domain.price;
import com.apssouza.mytrade.feed.api.PriceDto;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.Optional;
import java.util.Random;
import java.util.stream.Collec... | __label__POS | 0.984522 |
package com.apssouza.configuration;
import org.springframework.context.annotation.Configuration;
import org.springframework.messaging.simp.config.MessageBrokerRegistry;
import org.springframework.web.socket.config.annotation.AbstractWebSocketMessageBrokerConfigurer;
import org.springframework.web.socket.config.annotat... | __label__POS | 0.966661 |
<?php
/**
* PHPExcel
*
* Copyright (c) 2006 - 2014 PHPExcel
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later ve... | __label__POS | 0.829028 |
package com.apress.springrecipes.bank;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
public class InMemoryAccountDao implements AccountDao {
private Map<String, Account> accounts;
public InMemoryAccountDao() {
accounts = Collections.synchronizedMap(new HashMap<String,... | __label__POS | 0.654529 |
package com.apssouza.mytrade.feed.domain.price;
import com.apssouza.mytrade.common.time.DateTimeConverter;
import com.apssouza.mytrade.feed.api.PriceDto;
import java.sql.*;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
public class SqlPriceDao implements PriceDao {
private f... | __label__POS | 0.897615 |
//AppTapp Installer Writer by lex
#include <libxml/parser.h>
#include <libxml/xmlmemory.h>
#include <libxml/xmlwriter.h>
#include <string.h>
#include <stdio.h>
xmlTextWriterPtr writer;
char bundleIdentifier[1024];
char name[1024];
char version[1024];
char size[1024];
char location[1024];
char url[1024];
char time[1024... | __label__POS | 0.672075 |
package com.apress.springrecipes.bank;
import java.util.Objects;
public class Account {
private final String accountNo;
private double balance;
/**
* Default constructor because JPA demands it.
*/
private Account() {
this(null, 0.0d);
}
public Account(String accountNo, dou... | __label__POS | 0.944079 |
package com.apssouza.mytrade.feed.domain.signal;
import com.apssouza.mytrade.common.time.DateTimeConverter;
import com.apssouza.mytrade.feed.api.SignalDto;
import java.sql.*;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
public class SqlSignalDao implements SignalDao {
priva... | __label__POS | 0.67754 |
package com.apssouza.mytrade.feed.domain.signal;
import com.apssouza.mytrade.feed.api.SignalDto;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import java.util.stream.Collectors;
public class MemorySignalDao implements SignalDao {
private final List<S... | __label__POS | 0.99518 |
// ##################################################
// This is currently not used - WIP
// ##################################################
import { FrameService } from '../layer/frames.js';
import { Frame } from '../frame/frame.js';
import { fps } from '../constants.js';
/**
* Class that handles animation logic... | __label__POS | 0.987236 |
package com.apssouza.integrations.socket;
import com.apssouza.annotations.ChangeEvent;
import com.apssouza.entities.ToDo;
import com.apssouza.events.TodoChangedEvent;
import com.apssouza.pojos.SocketOutputMessage;
import java.text.SimpleDateFormat;
import java.util.Date;
import javax.websocket.EncodeException;
import... | __label__POS | 0.66327 |
/**
* AudioCutter provides audio cutting functionality
*/
export class AudioCutter {
/**
* Removes an audio interval from the provided AudioBuffer
* @param {AudioBuffer} audioBuffer - The original audio buffer
* @param {AudioContext} audioContext - Audio context for creating new buffer
* @param {number... | __label__POS | 0.62665 |
import { NestedTreeControl } from '@angular/cdk/tree';
import { Component, Input, OnInit } from '@angular/core';
import { FolderNode, NftDirectory } from '../../../shared/models/NFTModels';
interface BigDir {
name: string;
children?: BigDir[]
path?: string;
}
@Component({
selector: 'app-file-viewer',
templ... | __label__POS | 0.606119 |
package com.bookstore;
import com.bookstore.entity.BookReview;
import static com.bookstore.entity.ReviewStatus.CHECK;
import com.bookstore.service.BookstoreService;
import java.util.logging.Logger;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication;
import org.springfr... | __label__POS | 0.940526 |
<?php
/**
* PHPExcel
*
* Copyright (c) 2006 - 2014 PHPExcel
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later ve... | __label__POS | 0.662087 |
package com.apssouza.mytrade.trading.domain.forex.portfolio;
import com.apssouza.mytrade.feed.api.PriceDto;
import com.apssouza.mytrade.trading.domain.forex.common.TradingParams;
import com.apssouza.mytrade.trading.domain.forex.feed.PriceBuilder;
import com.apssouza.mytrade.trading.domain.forex.common.events.PriceChan... | __label__POS | 0.752521 |
#import <GraphicsServices/GraphicsServices.h>
#import <UIKit/UIKit.h>
#import <UIKit/UIApplication.h>
#import <UIKit/CDStructures.h>
#import <UIKit/UIHardware.h>
#import <UIKit/UIKeyboard.h>
#import <UIKit/UINavigationBar.h>
#import <UIKit/UINavigationItem.h>
#import <UIKit/UISegmentedControl.h>
#import <UIKit/UIAnimat... | __label__POS | 0.717894 |
package com.apress.springrecipes.bank;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import org.junit.Before;
import org.junit.Test;
public class InMemoryAccountDaoTests {
private static final String EXISTING_ACCOUNT_NO = "123... | __label__POS | 0.745315 |
import { LayerReorderHandler } from './layer-reorder-handler.js';
/**
* Handles layer dragging and scrubbing in the timeline
*/
export class DragLayerHandler {
/**
* @param {Timeline} timeline - The timeline instance
*/
constructor(timeline) {
this.dragging = null;
this.time = timeline.time;
t... | __label__POS | 0.703378 |
import Foundation
/// A Nimble matcher that succeeds when the actual value is greater than the expected value.
public func beGreaterThan<T: Comparable>(_ expectedValue: T?) -> NonNilMatcherFunc<T> {
return NonNilMatcherFunc { actualExpression, failureMessage in
failureMessage.postfixMessage = "be greater ... | __label__POS | 0.641693 |
### 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 { TimelineLayerFactory } from './timeline-layer-factory.js';
/**
* Class responsible for managing timeline layer rendering using the new TimelineLayer system
*/
export class TimelineLayerRender {
#layerRenderers;
/**
* @param {CanvasRenderingContext2D} ctx - The canvas context to render on
* @param... | __label__POS | 0.969673 |
package com.apress.springrecipes.bank.web;
import static org.junit.Assert.assertEquals;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mockito;
import org.springframework.ui.ModelMap;
import com.apress.springrecipes.bank.AccountService;
public class DepositControllerTests {
private static f... | __label__POS | 0.938043 |
package com.apssouza.mytrade.trading.api;
import java.time.format.DateTimeFormatter;
import java.util.HashMap;
import java.util.Map;
public record TransactionDto(com.apssouza.mytrade.trading.domain.forex.orderbook.TransactionDto event
) {
public Map<String, String> getTransactionTable() {
var table = new ... | __label__POS | 0.99647 |
/**
* Class representing timeline time markers
* Handles rendering of time markers on the timeline
*/
export class TimeMarker {
/**
* Create a new TimeMarker instance
* @param {Object} config - Configuration object
* @param {number} config.height - Height for the time markers at the top
* @param {numbe... | __label__POS | 0.842267 |
package com.apress.springrecipes.bank;
import org.springframework.jdbc.core.support.JdbcDaoSupport;
public class JdbcAccountDao extends JdbcDaoSupport implements AccountDao {
public void createAccount(Account account) {
String sql = "INSERT INTO ACCOUNT (ACCOUNT_NO, BALANCE) VALUES (?, ?)";
getJd... | __label__POS | 0.620758 |
package com.apssouza.mytrade.trading.domain.forex.orderbook;
import com.apssouza.mytrade.trading.domain.forex.order.OrderDto;
import com.apssouza.mytrade.trading.domain.forex.portfolio.FilledOrderDto;
import com.apssouza.mytrade.trading.domain.forex.portfolio.PositionDto;
import java.time.LocalDateTime;
import java.u... | __label__POS | 0.78374 |
import {fps} from '../constants.js';
import {FrameAdjustHandler} from './frame-adjust.js';
import {Frame} from './frame.js';
export class FrameService {
/**
* @type {Array<Frame>}
* @description Array of Frame objects containing x, y, scale, rotation, anchor, and frame properties
*/
frames = [];
totalTi... | __label__POS | 0.833041 |
package com.apress.springrecipes.bank;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
public class InMemoryAccountDao implements AccountDao {
private Map<String, Account> accounts;
public InMemoryAccountDao() {
accounts = Collections.synchronizedMap(new HashMap<String,... | __label__POS | 0.654529 |
// ASCollectionView. Created by Apptek Studios 2019
import Foundation
import UIKit
extension UICollectionView
{
var allSections: Range<Int>?
{
let sectionCount = dataSource?.numberOfSections?(in: self) ?? 1
guard sectionCount > 0 else { return nil }
return (0 ..< sectionCount)
}
func allIndexPaths(inSectio... | __label__POS | 0.891243 |
package com.apress.springrecipes.bank;
import java.util.Objects;
public class Account {
private final String accountNo;
private double balance;
/**
* Default constructor because JPA demands it.
*/
private Account() {
this(null, 0.0d);
}
public Account(String accountNo, dou... | __label__POS | 0.944079 |
package com.apssouza.mytrade.trading.domain.forex.brokerintegration;
import com.apssouza.mytrade.trading.domain.forex.order.OrderDto;
import com.apssouza.mytrade.trading.domain.forex.portfolio.FilledOrderDto;
import java.util.Map;
class MultiPositionPerCPairHandler {
private final Map<String, FilledOrderDto> pos... | __label__POS | 0.815423 |
import { exportToJson } from './utils.js';
export class StudioControls {
/**
* @param {VideoStudio} studio
*/
constructor(studio) {
this.studio = studio;
}
init() {
window.addEventListener('drop', this.#onFileDrop.bind(this));
window.addEventListener('keydown', this.#onKeydown.bind(this));... | __label__POS | 0.724551 |
package com.apress.springrecipes.bank.config;
import javax.sql.DataSource;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
import org.spr... | __label__POS | 0.68374 |
package com.apssouza.mytrade.trading.domain.forex.brokerintegration;
import com.apssouza.mytrade.feed.api.PriceDto;
import com.apssouza.mytrade.trading.domain.forex.order.OrderDto;
import com.apssouza.mytrade.trading.domain.forex.riskmanagement.stopordercreation.StopOrderDto;
import java.util.*;
class StopOrderPrice... | __label__POS | 0.999585 |
package com.apssouza.mytrade.trading.domain.forex.brokerintegration;
import com.apssouza.mytrade.feed.api.PriceDto;
import com.apssouza.mytrade.trading.domain.forex.order.OrderDto;
import com.apssouza.mytrade.trading.domain.forex.riskmanagement.stopordercreation.StopOrderDto;
import com.apssouza.mytrade.trading.domain... | __label__POS | 0.690357 |
package com.apssouza.mytrade.trading.domain.forex.brokerintegration;
import com.apssouza.mytrade.feed.api.PriceDto;
import com.apssouza.mytrade.trading.domain.forex.order.OrderDto;
import com.apssouza.mytrade.trading.domain.forex.riskmanagement.stopordercreation.StopOrderDto;
import com.apssouza.mytrade.trading.domain... | __label__POS | 0.881424 |
package com.apssouza.mytrade.trading.domain.forex.brokerintegration;
import com.apssouza.mytrade.feed.api.PriceDto;
import com.apssouza.mytrade.trading.domain.forex.order.OrderDto;
import com.apssouza.mytrade.trading.domain.forex.riskmanagement.stopordercreation.StopOrderDto;
import com.apssouza.mytrade.trading.domain... | __label__POS | 0.934051 |
package com.apssouza.mytrade.trading.domain.forex.common;
import com.apssouza.mytrade.trading.domain.forex.order.OrderDto;
import com.apssouza.mytrade.trading.domain.forex.portfolio.PositionDto;
import com.apssouza.mytrade.common.time.DayHelper;
import java.time.LocalDateTime;
public class TradingHelper {
publi... | __label__POS | 1.000006 |
package com.bookstore;
import com.bookstore.ds1.AuthorService;
import com.bookstore.ds2.BookService;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.B... | __label__POS | 0.991726 |
package com.apssouza.mytrade.trading.domain.forex.common;
import java.time.LocalTime;
import java.util.HashMap;
import java.util.Map;
public class TradingParams {
public static String brokerHost;
public static String brokerPort;
public static String brokerClientId;
public static LocalTime tradingStart... | __label__POS | 1.000005 |
package com.apssouza.mytrade.trading.domain.forex.common;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.EnumSet;
import java.util.Set;
public enum Symbol {
// Major 3
USDJPY(Currency.USD, Currency.JPY, 0.01, 2),
EURJPY(Currency.EUR, Currency.JPY, 0.01, 2),
EURUSD(Curre... | __label__POS | 0.888675 |
package com.apress.springrecipes.bank;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import org.junit.Before;
import org.junit.Test;
public class InMemoryAccountDaoTests {
private static final String EXISTING_ACCOUNT_NO = "123... | __label__POS | 0.745315 |
package com.apssouza.mytrade.trading.domain.forex.common;
import com.apssouza.mytrade.trading.domain.forex.order.OrderDto;
import com.apssouza.mytrade.trading.domain.forex.riskmanagement.stopordercreation.StopOrderDto;
import com.apssouza.mytrade.trading.domain.forex.portfolio.FilledOrderDto;
import com.apssouza.mytra... | __label__POS | 0.914996 |
package com.apssouza.mytrade.trading.domain.forex.common;
public enum Currency {
XAU(java.util.Currency.getInstance("XAU")),
XAG(java.util.Currency.getInstance("XAG")),
EUR(java.util.Currency.getInstance("EUR")),
GBP(java.util.Currency.getInstance("GBP")),
AUD(java.util.Currency.getInstance("AUD... | __label__POS | 0.733496 |
package com.apress.springrecipes.bank.web;
import static org.junit.Assert.assertEquals;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mockito;
import org.springframework.ui.ModelMap;
import com.apress.springrecipes.bank.AccountService;
public class DepositControllerTests {
private static f... | __label__POS | 0.938043 |
package com.apssouza.mytrade.trading.domain.forex.order;
import com.apssouza.mytrade.trading.domain.forex.brokerintegration.BrokerIntegrationService;
import com.apssouza.mytrade.trading.domain.forex.common.observerinfra.EventNotifier;
import com.apssouza.mytrade.trading.domain.forex.common.observerinfra.Observer;
impo... | __label__POS | 0.999551 |
// ASCollectionView. Created by Apptek Studios 2019
import Foundation
struct ASIndexedDictionary<Key: Hashable, Value>: BidirectionalCollection
{
private var dictionary: [Key: Int] = [:]
private var array: [Value] = []
mutating func append(_ item: (key: Key, value: Value))
{
if let index = dictionary[item.key]... | __label__POS | 0.945128 |
package com.apssouza.mytrade.trading.domain.forex.order;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicInteger;
class MemoryOrderDao implements OrderDao {
private static Map<Integer, OrderDto> ORDERS = new ConcurrentHashMap<>();
private static Ato... | __label__POS | 0.996949 |
package com.apssouza.mytrade.trading.domain.forex.order;
import java.time.LocalDateTime;
public record OrderDto(
String symbol,
OrderAction action,
int quantity,
OrderOrigin origin,
LocalDateTime time,
String identifier,
OrderStatus status,
int id
) {
... | __label__POS | 0.81721 |
import Foundation
/// A Nimble matcher that succeeds when the actual value is less than
/// or equal to the expected value.
public func beLessThanOrEqualTo<T: Comparable>(_ expectedValue: T?) -> NonNilMatcherFunc<T> {
return NonNilMatcherFunc { actualExpression, failureMessage in
failureMessage.postfixMess... | __label__POS | 0.67079 |
// ASCollectionView. Created by Apptek Studios 2019
import Foundation
public final class ASPriorityCache<Key: Hashable, Value>
{
var maxSize: Int? = 50
private var nodes: [Key: Node] = [:]
private var head: Node?
private var tail: Node?
private class Node
{
var key: Key
var value: Value
var next: Node?
... | __label__POS | 0.976155 |
import Foundation
/// A Nimble matcher that succeeds when the actual value is less than the expected value.
public func beLessThan<T: Comparable>(_ expectedValue: T?) -> NonNilMatcherFunc<T> {
return NonNilMatcherFunc { actualExpression, failureMessage in
failureMessage.postfixMessage = "be less than <\(st... | __label__POS | 0.652344 |
// ASCollectionView. Created by Apptek Studios 2019
import Foundation
import SwiftUI
@available(iOS 13.0, *)
@resultBuilder
public struct ViewArrayBuilder
{
public enum Wrapper
{
case empty
case view(AnyView)
case group([Wrapper])
init<Content: View>(_ view: Content)
{
self = .view(AnyView(view))
}
... | __label__POS | 0.877017 |
package com.apress.springrecipes.bank;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
public class InMemoryAccountDao implements AccountDao {
private Map<String, Account> accounts;
public InMemoryAccountDao() {
accounts = Collections.synchronizedMap(new HashMap<String,... | __label__POS | 0.654529 |
// ASCollectionView. Created by Apptek Studios 2019
import Foundation
import SwiftUI
@available(iOS 13.0, *)
public protocol Nestable
{
associatedtype T
func asArray() -> [T]
}
@available(iOS 13.0, *)
extension ASSection: Nestable
{
public func asArray() -> [ASSection]
{
[self]
}
}
@available(iOS 13.0, *)
ex... | __label__POS | 0.954007 |
package com.apssouza.mytrade.trading.domain.forex.portfolio;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.function.Function;
import java.util.stream.Collectors;
class PositionCollection {
private Map<String, PositionDto> positions = new ConcurrentHa... | __label__POS | 0.656817 |
package com.apress.springrecipes.bank;
import java.util.Objects;
public class Account {
private final String accountNo;
private double balance;
/**
* Default constructor because JPA demands it.
*/
private Account() {
this(null, 0.0d);
}
public Account(String accountNo, dou... | __label__POS | 0.944079 |
package com.apssouza.mytrade.trading.domain.forex.portfolio;
import com.apssouza.mytrade.trading.domain.forex.brokerintegration.BrokerIntegrationService;
import com.apssouza.mytrade.trading.domain.forex.common.observerinfra.Observer;
import com.apssouza.mytrade.trading.domain.forex.order.OrderService;
import com.apsso... | __label__POS | 0.990044 |
package com.apress.springrecipes.bank.config;
import javax.sql.DataSource;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
import org.spr... | __label__POS | 0.609587 |
package com.apssouza.mytrade.trading.domain.forex.riskmanagement;
import com.apssouza.mytrade.common.time.MarketTimeHelper;
import com.apssouza.mytrade.feed.api.SignalDto;
import com.apssouza.mytrade.trading.domain.forex.common.TradingParams;
import com.apssouza.mytrade.trading.domain.forex.common.events.Event;
import... | __label__POS | 0.646577 |
package com.apptentive.android.sdk.serialization;
import org.junit.Before;
import org.junit.Test;
import java.io.DataInput;
import java.io.DataOutput;
import java.io.File;
import java.io.IOException;
import static org.junit.Assert.assertEquals;
public class ObjectSerializationTest {
private File file;
@Before
... | __label__POS | 0.980648 |
package com.bookstore;
import com.bookstore.entity.Author;
import com.bookstore.entity.Book;
import com.bookstore.service.BookstoreService;
import java.util.List;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBo... | __label__POS | 0.8142 |
package com.apssouza.mytrade.trading.domain.forex.riskmanagement;
import com.apssouza.mytrade.common.time.MarketTimeHelper;
import com.apssouza.mytrade.feed.api.SignalDto;
import com.apssouza.mytrade.trading.domain.forex.order.OrderDto;
import com.apssouza.mytrade.trading.domain.forex.portfolio.PositionDto;
import ja... | __label__POS | 0.914783 |
package com.apress.springrecipes.bank.web;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class IBANValidationResult {
private boolean valid;
private List<String> messages = new ArrayList<>();
private String iban;
private Map<String, String>... | __label__POS | 0.880251 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.