content
stringlengths
263
5.24M
pred_label
stringclasses
1 value
pred_score_pos
float64
0.6
1
package com.apress.springrecipes.sequence; import javax.inject.Inject; public class SequenceGenerator { @Inject @DatePrefixAnnotation private PrefixGenerator prefixGenerator; private String suffix; private int initial; private int counter; public SequenceGenerator() { } public Se...
__label__POS
0.945762
package com.bookstore; import com.bookstore.ds1.BookService; import com.bookstore.ds2.AuthorService; 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.989445
const os = require('os'); const fs = require("fs"); const _path = require("path"); const process = require("process"); const JSONbig = require("json-bigint")({ storeAsString: false }); const KeysVars = new Set(["key", "value"]); const KeysSite = new Set(["path", "$id", "name", "enabled", "logging", "timeout", "framewo...
__label__POS
0.773214
namespace GetInjectedThreads.Enums { // https://docs.microsoft.com/en-us/windows/win32/api/winnt/ne-winnt-token_information_class enum TOKEN_INFORMATION_CLASS { TokenUser = 1, TokenGroups, TokenPrivileges, TokenOwner, TokenPrimaryGroup, TokenDefaultDacl, ...
__label__POS
0.652238
namespace GetInjectedThreads.Enums { public enum PRIVILEGE_CONSTANT { SeCreateTokenPrivilege = 1, SeAssignPrimaryTokenPrivilege, SeLockMemoryPrivilege, SeIncreaseQuotaPrivilege, SeUnsolicitedInputPrivilege, SeMachineAccountPrivilege, SeTcbPrivilege, ...
__label__POS
0.956307
package com.apress.springrecipes.shop; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import com.apress.springrecipes.shop.config.ShopConfiguration; public class Main { public static void main(String[] args) throws Excepti...
__label__POS
0.990664
using GetInjectedThreads.Enums; using System; namespace GetInjectedThreads.Structs { // MEMORY_BASIC_INFORMATION struct required for VirtualQueryEx - to read state and type fields // https://docs.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-memory_basic_information public struct MEMORY_BASIC_INF...
__label__POS
0.690812
package com.apress.springrecipes.shop; import java.io.BufferedWriter; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStreamWriter; import java.util.Date; public class Cashier { private String fileName; private String path; private BufferedWriter wri...
__label__POS
0.698967
package ltns.deviceinfolib; import android.content.Context; import android.support.annotation.NonNull; import com.yanzhenjie.permission.AndPermission; import com.yanzhenjie.permission.PermissionListener; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; import ltns.d...
__label__POS
0.860792
package ltns.deviceinfolib.listener; import ltns.deviceinfolib.DeviceInfoManager; import ltns.deviceinfolib.collector.base.BaseDeviceInfoCollector; /** * @date 创建时间:2018/1/1 * @author appzy * @Description 采集监听 * @version */ public interface DeviceInfoCollectListener { /** * manager启动收集 */ void...
__label__POS
0.999582
package ltns.deviceinfolib.collector; import android.content.Context; import android.view.KeyCharacterMap; import android.view.KeyEvent; import android.view.ViewConfiguration; import ltns.deviceinfolib.collector.base.BaseDeviceInfoCollector; /** * @date 创建时间:2018/1/8 * @author appzy * @Description Ui信息 * @versio...
__label__POS
0.999572
package ltns.deviceinfolib.collector; import android.content.Context; import android.os.Build; import android.util.DisplayMetrics; import android.view.Display; import android.view.WindowManager; import ltns.deviceinfolib.collector.base.BaseDeviceInfoCollector; /** * @date 创建时间:2018/1/8 * @author appzy * @Descript...
__label__POS
0.971475
package ltns.deviceinfolib.collector; import android.content.Context; import android.nfc.NfcAdapter; import android.nfc.NfcManager; import ltns.deviceinfolib.collector.base.BaseDeviceInfoCollector; /** * @date 创建时间:2018/1/8 * @author appzy * @Description NFC信息 * @version */ public class NfcInfoCollector extend...
__label__POS
0.998355
package ltns.deviceinfolib.collector; import android.Manifest; import android.annotation.SuppressLint; import android.app.ActivityManager; import android.content.Context; import android.os.Environment; import android.os.StatFs; import android.text.format.Formatter; import java.io.BufferedReader; import java.io.File; ...
__label__POS
0.734969
package com.apress.springrecipes.shop.config; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import com.apress.springrecipes.shop.Battery; import com.apress.springrecipes.shop.Cashier; import...
__label__POS
0.900522
package ltns.deviceinfolib.collector; import android.Manifest; import android.content.Context; import android.net.wifi.WifiInfo; import android.net.wifi.WifiManager; import android.os.Build; import android.telephony.TelephonyManager; import com.google.gson.annotations.SerializedName; import java.lang.reflect.Invocat...
__label__POS
0.956141
package ltns.deviceinfolib.collector; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.util.Log; import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException; import java.io.InputStreamReader; imp...
__label__POS
0.959286
package ltns.deviceinfolib.collector; import android.content.Context; import android.hardware.Sensor; import android.hardware.SensorManager; import java.util.ArrayList; import java.util.List; import ltns.deviceinfolib.collector.base.BaseDeviceInfoCollector; /** * @date 创建时间:2018/1/8 * @author appzy * @Descriptio...
__label__POS
0.995689
package ltns.deviceinfolib.collector; import android.content.Context; import android.os.Build; import java.io.BufferedReader; import java.io.File; import java.io.FileFilter; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.io.Inpu...
__label__POS
0.874264
package ltns.deviceinfolib.collector; import android.Manifest; import android.content.Context; import android.hardware.Camera; import com.google.gson.annotations.SerializedName; import java.util.ArrayList; import java.util.List; import ltns.deviceinfolib.collector.base.BaseDeviceInfoCollector; /** * @date 创建时间:20...
__label__POS
0.908166
package ltns.deviceinfolib.collector; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import ltns.deviceinfolib.collector.base.BaseDeviceInfoCollector; /** * @date 创建时间:2018/1/8 * @author appzy * @Description 电池信息 * @ve...
__label__POS
0.930756
package ltns.deviceinfolib.collector.base; import android.content.Context; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import java.util.HashMap; import ltns.deviceinfolib.api.Constant; import ltns.deviceinfolib.listener.CollectorStateObserver; import ltns.deviceinfolib.utils.PermissionsCheckUti...
__label__POS
0.958205
package com.apress.springrecipes.sequence; import org.springframework.beans.factory.annotation.Autowired; public class SequenceGenerator { private PrefixGenerator prefixGenerator; private String suffix; private int initial; private int counter; public SequenceGenerator() { } public Seque...
__label__POS
0.876576
package com.bookstore; import java.util.List; import com.bookstore.service.BookstoreService; import org.springframework.boot.ApplicationRunner; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.Bean; imp...
__label__POS
0.727185
/******************************************************************************* * Copyright (c) 2005, 2007 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, an...
__label__POS
0.603564
<!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.apress.springrecipes.sequence; import org.springframework.beans.factory.annotation.Autowired; public class SequenceGenerator { @Autowired private PrefixGenerator prefixGenerator; private String suffix; private int initial; private int counter; public SequenceGenerator() { } ...
__label__POS
0.894021
using Polly.Telemetry; namespace Polly.Utils.Pipeline; internal static class PipelineComponentFactory { public static PipelineComponent FromPipeline(ResiliencePipeline pipeline) => new ExternalComponent(pipeline.Component); public static PipelineComponent FromPipeline<T>(ResiliencePipeline<T> pipeline) => n...
__label__POS
0.996371
package com.bookstore; import java.util.List; import com.bookstore.service.BookstoreService; import org.springframework.boot.ApplicationRunner; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.Bean; imp...
__label__POS
0.921158
<a id="0x1_optional_aggregator"></a> # Module `0x1::optional_aggregator` This module provides an interface to aggregate integers either via aggregator (parallelizable) or via normal integers. - [Struct `Integer`](#0x1_optional_aggregator_Integer) - [Struct `OptionalAggregator`](#0x1_optional_aggregator_OptionalA...
__label__POS
0.647521
/** * Helper class to generate role strings for `Permission`. */ export class Role { /** * Grants access to anyone. * * This includes authenticated and unauthenticated users. * * @returns {string} */ public static any(): string { return 'any' } /** * Gran...
__label__POS
0.912114
package com.apress.springrecipes.shop; import org.springframework.context.annotation.AnnotationConfigApplicationContext; public class Main { public static void main(String[] args) throws Exception { AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(); context.g...
__label__POS
0.996419
package com.apress.springrecipes.shop; import java.io.BufferedWriter; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStreamWriter; import java.util.Date; import org.springframework.beans.factory.BeanNameAware; public class Cashier implements BeanNameAware { ...
__label__POS
0.641627
<a id="0x1_gas_schedule"></a> # Module `0x1::gas_schedule` This module defines structs and methods to initialize the gas schedule, which dictates how much it costs to execute Move on the network. - [Struct `GasEntry`](#0x1_gas_schedule_GasEntry) - [Resource `GasSchedule`](#0x1_gas_schedule_GasSchedule) - [Resou...
__label__POS
0.795312
package com.appzung.codepush.react; import java.io.IOException; import java.net.InetAddress; import java.net.Socket; import java.net.UnknownHostException; import java.security.KeyManagementException; import java.security.NoSuchAlgorithmException; import javax.net.ssl.SSLContext; import javax.net.ssl.SSLSocket; import...
__label__POS
0.983053
package com.appzung.codepush.react; public class CodePushConstants { public static final String ASSETS_BUNDLE_PREFIX = "assets://"; public static final String BINARY_MODIFIED_TIME_KEY = "binaryModifiedTime"; public static final String CODE_PUSH_FOLDER_PREFIX = "CodePush"; public static final String COD...
__label__POS
1.00001
#include "splitparstr.hpp" void removePars(std::string &s) { unsigned int ns = 0; while ((s.length() >=ns*2)&&(s[ns]=='(')&&(s[s.length()-1-ns] == ')')) ns++; int ins = 0; int minIns = 0; for (unsigned int i=ns; i<s.length()-ns*2; i++) { if (s[i] == '(') ins ++; if (s[i] == ')') ...
__label__POS
0.960142
package com.bookstore; import com.bookstore.entity.Book; import com.bookstore.service.BookstoreService; import org.springframework.boot.ApplicationRunner; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotatio...
__label__POS
0.916839
package com.bookstore.service; import com.bookstore.entity.Book; import org.springframework.stereotype.Service; import com.bookstore.repository.BookRepository; import org.springframework.data.domain.Example; import org.springframework.data.domain.ExampleMatcher; @Service public class BookstoreService { private f...
__label__POS
0.954676
package com.appzung.codepush.react; import java.io.BufferedInputStream; import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; import java.util.zip.ZipEntry; import ja...
__label__POS
0.837866
package com.apradanas.simplelinkabletext; import android.content.Context; import android.text.Editable; import android.text.TextWatcher; import android.text.method.LinkMovementMethod; import android.util.AttributeSet; import android.widget.EditText; import java.util.ArrayList; import java.util.List; /** * Created b...
__label__POS
0.898579
package com.apradanas.simplelinkabletext; import android.support.annotation.NonNull; import android.text.Spanned; import android.text.TextPaint; import android.text.style.ClickableSpan; import android.view.View; import android.widget.TextView; import com.apradanas.simplelinkabletext.util.Range; /** * Created by @ap...
__label__POS
0.960054
package com.apradanas.simplelinkabletext; import android.text.Spannable; import android.text.SpannableString; import android.text.Spanned; import android.text.style.ClickableSpan; import android.text.style.StyleSpan; import com.apradanas.simplelinkabletext.util.Range; import java.util.ArrayList; import java.util.Lis...
__label__POS
0.769549
package com.apradanas.simplelinkabletext; import android.content.Context; import android.text.method.LinkMovementMethod; import android.util.AttributeSet; import android.widget.TextView; import java.util.ArrayList; import java.util.List; /** * Created by @apradanas */ public class LinkableTextView extends TextView...
__label__POS
0.907558
<a id="0x1_genesis"></a> # Module `0x1::genesis` - [Struct `AccountMap`](#0x1_genesis_AccountMap) - [Struct `EmployeeAccountMap`](#0x1_genesis_EmployeeAccountMap) - [Struct `ValidatorConfiguration`](#0x1_genesis_ValidatorConfiguration) - [Struct `ValidatorConfigurationWithCommission`](#0x1_genesis_ValidatorCon...
__label__POS
0.667721
package com.apradanas.simplelinkabletextsample; import android.graphics.Color; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.text.Editable; import android.view.View; import android.widget.Button; import android.widget.TextView; import android.widget.Toast; import com.aprada...
__label__POS
0.74518
import Foundation fileprivate let DEFAULT_MIME_TYPE = "application/octet-stream" fileprivate let mimeTypes = [ "md": "text/markdown", "html": "text/html", "htm": "text/html", "shtml": "text/html", "css": "text/css", "xml": "text/xml", "gif": "image/gif", "jpeg": "image/jpeg", "jpg"...
__label__POS
0.715934
using System.Collections.Generic; namespace WorkingWithVisualStudio.Models { public class SimpleRepository { private static SimpleRepository sharedRepository = new SimpleRepository(); private Dictionary<string, Product> products = new Dictionary<string, Product>(); public stat...
__label__POS
0.933872
package com.bookstore; import com.bookstore.entity.Author; import com.bookstore.service.BookstoreService; import org.springframework.boot.ApplicationRunner; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotat...
__label__POS
0.969297
package com.apress.springrecipes.shop; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import com.apress.springrecipes.shop.config.ShopConfiguration; public class Main { public static void main(String[] args) throws Excepti...
__label__POS
0.994886
<html> <head><title>PyDev References</title> <link rel="stylesheet" href="../../../PRODUCT_PLUGIN/book.css" type="text/css"/> <link rel="stylesheet" href="PLUGINS_ROOT/PRODUCT_PLUGIN/book.css" /> </head> <body> <h2>Where to find info about PyDev</h2> <ul> <li> To access the <strong>PyDev homepage</stro...
__label__POS
0.995541
<?php namespace {{ spec.title | caseUcfirst }}; class Query implements \JsonSerializable { protected string $method; protected ?string $attribute; protected ?array $values; public function __construct(string $method, ?string $attribute = null, $values = null) { $this->method = $method; ...
__label__POS
0.999903
package com.bookstore; import com.bookstore.dto.AuthorDto; import java.util.List; import com.bookstore.service.BookstoreService; import org.springframework.boot.ApplicationRunner; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springfr...
__label__POS
0.923357
<?php namespace {{ spec.title | caseUcfirst }}; /** * Helper class to generate role strings for Permission. */ class Role { /** * Grants access to anyone. * * This includes authenticated and unauthenticated users. * * @return string */ public static function any(): string ...
__label__POS
0.98492
<?php namespace {{ spec.title | caseUcfirst }}; class InputFile { private ?string $data; private ?string $mimeType; private ?string $filename; private ?string $path; public function __construct(){} public function getData(): ?string { return $this->data; } public function...
__label__POS
0.785384
package com.apress.springrecipes.shop; import java.util.Properties; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; import org.spr...
__label__POS
0.729152
--- title: "重要节点指标" --- import {Callout, Steps} from 'nextra/components'; # 重要节点指标 当你访问节点检查服务端口(详见[节点检查服务](node-inspection-service.mdx))时,你将会发现你的节点报告了大量的指标数据和计数信息。大部分的这些数据和信息对于开发区块链及排查一些隐晦的问题特别有用。因此,我们建议节点运维人员不必过多关注所有指标,仅需专注于以下几个关键指标: <Callout type="info"> **指标不稳定(Metric instability)**<br /> 随着 Aptos 持续推进区块链软件的开发,将...
__label__POS
0.792939
package com.bookstore; import com.bookstore.entity.Book; import com.bookstore.naturalid.NaturalRepositoryImpl; import org.springframework.boot.ApplicationRunner; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.an...
__label__POS
0.93587
package com.bookstore.service; import com.bookstore.entity.Book; import com.bookstore.repository.BookRepository; import java.util.Optional; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @Service public class BookstoreService { private final BookRe...
__label__POS
0.646727
package com.apress.springrecipes.executors; import javax.annotation.PostConstruct; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.core.task.SimpleAsyncTaskExecutor; import org.springframework.c...
__label__POS
0.677796
package com.apress.springrecipes.sequence; import org.springframework.beans.factory.annotation.Autowired; public class SequenceGenerator { @Autowired private PrefixGenerator prefixGenerator; private String suffix; private int initial; private int counter; public SequenceGenerator() { } ...
__label__POS
0.894021
package com.bookstore.repository.impl; import java.io.Serializable; import java.util.List; import java.util.Objects; import javax.persistence.EntityManager; import javax.persistence.TypedQuery; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.spri...
__label__POS
0.645586
package com.bookstore; import com.bookstore.service.ShoppingCartService; import com.bookstore.entity.ShoppingCart; import org.springframework.boot.ApplicationRunner; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.contex...
__label__POS
0.984966
package com.apress.springrecipes.shop; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import com.apress.springrecipes.shop.config.ShopConfiguration; public class Main { public static void main(String[] args) throws Except...
__label__POS
0.994886
package com.bookstore.service; import com.bookstore.entity.Book; import com.bookstore.repository.BookRepository; import java.util.List; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @Service public class BookstoreService { private final BookReposi...
__label__POS
0.600408
package com.bookstore; import com.bookstore.service.BookstoreService; import org.springframework.boot.ApplicationRunner; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.Bean; @SpringBootApplication pu...
__label__POS
0.997397
/** * Helper class to generate role strings for `Permission`. */ export class Role { /** * Grants access to anyone. * * This includes authenticated and unauthenticated users. * * @returns {string} */ public static any(): string { return 'any' } /** * Gran...
__label__POS
0.912114
import { aptos } from "@aptos-labs/aptos-protos"; import { DataSource } from "typeorm"; /** * The result of processing a chunk of transactions. This is lets the prcoessor tell * the worker what range of transactions it processed. */ export type ProcessingResult = { startVersion: bigint; endVersion: bigint; }; ...
__label__POS
0.616406
package com.apress.springrecipes.shop; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import com.apress.springrecipes.shop.config.ShopConfiguration; public class Main { public static void main(String[] args) throws Except...
__label__POS
0.994886
package com.python.pydev.ui.search; /******************************************************************************* * Copyright (c) 2000, 2006 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * wh...
__label__POS
1.00001
package com.apress.springrecipes.shop.config; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.context.annot...
__label__POS
0.642575
import Foundation enum QueryValue: Codable { case string(String) case int(Int) case double(Double) case bool(Bool) case query(Query) case array([QueryValue]) // for nested arrays init(from decoder: Decoder) throws { let container = try decoder.singleValueContainer() if l...
__label__POS
0.886766
<?php use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\Exception; $staticFolder = dirname(__FILE__) . '/../static'; /** * Returns the contents of a file in the static folder * @param string $fileName * @return string Contents of static/{$fileName} */ function get_static_file(string $fileName): string {...
__label__POS
0.692951
package com.apress.springrecipes.calculator; import org.springframework.context.ApplicationContext; import org.springframework.context.support.GenericXmlApplicationContext; public class Main { public static void main(String[] args) { ApplicationContext context = new GenericXmlApplicatio...
__label__POS
0.999794
--- title: "Upgrade Nodes" description: "Keep your validator and VFN up-to-date with simple upgrades and VFN failover techniques to minimize downtime during software updates." sidebar: label: "Upgrade" --- import { Aside } from '@astrojs/starlight/components'; This section contains tutorials for upgrading your vali...
__label__POS
0.743523
package com.apress.springrecipes.calculator; import org.aspectj.lang.annotation.After; import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.DeclareParents; import org.springframework.stereotype.Component; @Aspect @Component public class CalculatorIntroduction { @DeclareParents( ...
__label__POS
0.912275
package com.bookstore; import com.bookstore.entity.Author; import com.bookstore.service.BookstoreService; import org.springframework.boot.ApplicationRunner; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotat...
__label__POS
0.98873
package com.apress.springrecipes.calculator; import org.springframework.context.ApplicationContext; import org.springframework.context.support.GenericXmlApplicationContext; public class Main { public static void main(String[] args) { ApplicationContext context = new GenericXmlApplicatio...
__label__POS
0.999962
package com.bookstore; import com.bookstore.service.BookstoreService; import org.springframework.boot.ApplicationRunner; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.Bean; @SpringBootApplication pu...
__label__POS
0.996614
package com.apress.springrecipes.shop; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import com.apress.springrecipes.shop.config.ShopConfiguration; public class Main { public static void main(String[] args) throws Except...
__label__POS
0.994886
package com.apress.springrecipes.shop.config; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import com.apress.springrecipes.shop.Battery; import com.apress.springrecipes.shop.Disc; import co...
__label__POS
0.873434
package com.bookstore; import com.bookstore.service.BookstoreService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.ApplicationRunner; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.spri...
__label__POS
0.94186
#!/usr/bin/env python3 """ Most years have 365 days. However, the time required for the Earth to orbit the Sun is actually slightly more than that. As a result, an extra day, February 29, is included in some years to correct for this difference. Such years are referred to as leap years. The rules for determining ...
__label__POS
0.620813
package.path = "../utils/?.lua;" .. package.path require "dfs" local Set = require "set" function dominators(graph) print("Computing dominators") local traversal = dfs_reverse_postorder(graph) -- Initialization for i, name in ipairs(traversal) do local node = graph[name] if i == 1 the...
__label__POS
0.853351
package.path = "../utils/?.lua;" .. package.path local Set = require "set" function invert(graph) local inv = {} for name, node in pairs(graph) do if name == "entry" then name = "exit" elseif name == "exit" then name = "entry" end inv[name] = {succ = node.pred, pred = node.succ} en...
__label__POS
0.885717
import java.util.InputMismatchException; import java.util.Scanner; public class RunApp { public static void main(String[] args) { int number = 1; int count = 1; Scanner sc = new Scanner(System.in); while (true) { try { System.out.print("Enter a number: ")...
__label__POS
0.996162
import java.util.Scanner; public class TestDoor { public static void main(String[] args) { Scanner sc = new Scanner(System.in); DoorWithCodeLock door = new DoorWithCodeLock(); while (true) { int choice = getNumber(sc); switch (choice) { case 1: ...
__label__POS
0.773779
package.path = "../utils/?.lua;" .. package.path local loop = require "loop" local fun = require "fun" local concat = table.concat local getlocal = debug.getlocal local IterationVector = {} -- Metatable for iteration and dependence distance vectors local obj_mt obj_mt = { __index = IterationVector, -- Subt...
__label__POS
0.710201
#include <assert.h> #include <stdio.h> #include <stdlib.h> extern int fib(int n); extern int pow(int b, int e); extern int fastpow(int b, int e); extern int sum(int n); extern int fastsum(int n); extern int search(int *numbers, int lo, int hi, int x); extern void sort(int *numbers, int n); int fib_(int n) { retur...
__label__POS
0.992974
package net.esaps; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JTextField; import java.awt.GridLayout; public class GraphicalCalculator { private JFrame frame = new JFrame("Calculator"); private JTextField textField = new JTextField(); private JButton Clear = new JButton("Cl...
__label__POS
0.997888
local fun = {} function fun.map(f, t) local tt = {} for _, v in ipairs(t) do table.insert(tt, (f(v))) end return tt end function fun.map2(f, s, t) local tt = {} for i = 1, math.min(#s, #t) do table.insert(tt, (f(s[i], t[i]))) end return tt end function fun.filter(p, t)...
__label__POS
0.999642
local Set = {} local function from_list(lst) local set = {} for _, v in ipairs(lst) do set[v] = true end return set end local function to_list(set) local lst = {} for k, _ in pairs(set) do lst[#lst+1] = k end return lst end local function to_string(set) return "{" ...
__label__POS
0.996538
package net.esaps; public class TrafficSimulator { private static int westQueue = 0; private static int southQueue = 0; private WestArrivalThread westArrivalThread = new WestArrivalThread(); private SouthArrivalThread southArrivalThread = new SouthArrivalThread(); public TrafficSimulator() { ...
__label__POS
0.962847
package.path = "../utils/?.lua;" .. package.path local fun = require "fun" local map = fun.map local concat = table.concat local unpack = unpack or table.unpack local function sum(t) return fun.fold(fun["+"], 0, t) end local function min(t) assert(#t > 0) return math.min(unpack(t)) end local function m...
__label__POS
0.79473
package net.esaps; import java.util.Scanner; public class RunApp { public static void main(String[] args) throws Exception { Scanner scanner = new Scanner(System.in); int a = 0; int b = 0; char operation = ' '; while (true) { try { System.out.pr...
__label__POS
0.942264
import Foundation fileprivate let DEFAULT_MIME_TYPE = "application/octet-stream" fileprivate let mimeTypes = [ "md": "text/markdown", "html": "text/html", "htm": "text/html", "shtml": "text/html", "css": "text/css", "xml": "text/xml", "gif": "image/gif", "jpeg": "image/jpeg", "jpg"...
__label__POS
0.715934
package com.bookstore; import com.bookstore.service.BookstoreService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.ApplicationRunner; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.spri...
__label__POS
0.993835
package com.apress.springrecipes.shop; import org.springframework.context.ApplicationContext; import org.springframework.context.support.GenericXmlApplicationContext; public class Main { public static void main(String[] args) throws Exception { ApplicationContext context = new GenericXmlA...
__label__POS
0.994008
package com.apress.springrecipes.shop; import java.io.BufferedWriter; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStreamWriter; import java.util.Date; public class Cashier { private String fileName; private String path; private BufferedWriter w...
__label__POS
0.698967
package com.apress.springrecipes.shop; import org.springframework.beans.BeansException; import org.springframework.beans.factory.config.BeanPostProcessor; import org.springframework.stereotype.Component; @Component public class ProductCheckBeanPostProcessor implements BeanPostProcessor { public Object postProce...
__label__POS
0.991951