content
stringlengths
263
5.24M
pred_label
stringclasses
1 value
pred_score_pos
float64
0.6
1
package edu.brown.benchmark.articles; public abstract class ArticlesConstants { // ---------------------------------------------------------------- // STORED PROCEDURE EXECUTION FREQUENCIES (0-100) // ---------------------------------------------------------------- public static final int FREQUENCY_G...
__label__POS
0.999999
package edu.brown.benchmark.articles; import org.voltdb.VoltProcedure; import edu.brown.benchmark.AbstractProjectBuilder; import edu.brown.api.BenchmarkComponent; import edu.brown.benchmark.articles.procedures.*; public class ArticlesProjectBuilder extends AbstractProjectBuilder{ // REQUIRED: Retrieved via ...
__label__POS
0.987261
package edu.brown.benchmark.tpce; import edu.brown.benchmark.tpce.generators.CESUTInterface; import edu.brown.benchmark.tpce.generators.TBrokerVolumeTxnInput; import edu.brown.benchmark.tpce.generators.TCustomerPositionTxnInput; import edu.brown.benchmark.tpce.generators.TMarketWatchTxnInput; import edu.brown.benchmar...
__label__POS
0.999906
/** * */ package edu.brown.benchmark.tpce; import org.voltdb.catalog.Database; import edu.brown.statistics.AbstractTableStatisticsGenerator; import edu.brown.utils.ProjectType; /** * TPC-E Intial Table Sizes<br/> * Benchmark Specification 2.6.1 * * @author pavlo */ public class TPCETableStatisticsGenerator ...
__label__POS
0.995785
/*************************************************************************** * Copyright (C) 2009 by H-Store Project * * Brown University * * Massachusetts Institute of Technology * * Yale Uni...
__label__POS
0.997918
/*************************************************************************** * Copyright (C) 2011 by H-Store Project * * Brown University * * Massachusetts Institute of Technology * * Yale Uni...
__label__POS
0.979878
/* EMS - REST API This section will provide necessary information about the `CoinAPI EMS REST API` protocol. This API is also available in the Postman application: <a href=\"https://postman.coinapi.io/\" target=\"_blank\">https://postman.coinapi.io/</a> Implemented Standards: * [HTTP1.0](https://datatracker....
__label__POS
0.643706
package edu.brown.benchmark.example; import org.voltdb.VoltProcedure; import edu.brown.benchmark.AbstractProjectBuilder; import edu.brown.api.BenchmarkComponent; import edu.brown.benchmark.example.procedures.GetData; public class ExampleProjectBuilder extends AbstractProjectBuilder { // REQUIRED: Retrieved via ...
__label__POS
0.980275
package edu.brown.benchmark.wikipedia; import org.voltdb.VoltTable; import org.voltdb.VoltType; public abstract class WikipediaConstants { /** * The percentage of page updates that are made by anonymous users [0%-100%] */ public static final int ANONYMOUS_PAGE_UPDATE_PROB = 26; /** *...
__label__POS
0.999829
package edu.brown.benchmark.tm1; import org.voltdb.catalog.Database; import edu.brown.statistics.AbstractTableStatisticsGenerator; import edu.brown.utils.ProjectType; /** * TM1 Initial Table Sizes * * @author pavlo */ public class TM1TableStatisticsGenerator extends AbstractTableStatisticsGenerator { /** ...
__label__POS
0.999896
package edu.brown.benchmark.tm1; public abstract class TM1Constants { // ---------------------------------------------------------------- // STORED PROCEDURE EXECUTION FREQUENCIES (0-100) // ---------------------------------------------------------------- public static final int FREQUENCY_DELETE_CALL_...
__label__POS
0.999995
package edu.brown.benchmark.tm1; import java.util.Random; import edu.brown.rand.RandomDistribution.Zipf; public abstract class TM1Util { public static final Random rand = new Random(); public static Zipf zipf = null; public static final double zipf_sigma = 1.001d; public static int isActive() { ...
__label__POS
0.989816
package edu.brown.benchmark.users; import java.util.Random; import edu.brown.rand.RandomDistribution.Zipf; public abstract class UsersUtil { public static final Random rand = new Random(); public static Zipf zipf = null; public static final double zipf_sigma = 1.001d; public static int isActive() {...
__label__POS
0.989884
package edu.brown.benchmark.users; import java.io.IOException; import java.util.Random; import org.apache.log4j.Logger; import org.voltdb.client.Client; import org.voltdb.client.ClientResponse; import org.voltdb.client.NoConnectionsException; import org.voltdb.client.ProcedureCallback; import edu.brown.api.BenchmarkC...
__label__POS
0.651912
package edu.brown.benchmark.users; import org.voltdb.VoltProcedure; import edu.brown.benchmark.AbstractProjectBuilder; import edu.brown.api.BenchmarkComponent; import edu.brown.benchmark.users.procedures.GetUsers; public class UsersProjectBuilder extends AbstractProjectBuilder{ // REQUIRED: Retrieved via refle...
__label__POS
0.994088
package edu.brown.benchmark.users; import java.util.HashMap; import org.apache.log4j.Logger; import org.voltdb.VoltTable; import org.voltdb.catalog.Database; import org.voltdb.catalog.Table; import edu.brown.api.BenchmarkComponent; import edu.brown.api.Loader; import edu.brown.catalog.CatalogUtil; public class Users...
__label__POS
0.737739
/** * EMS - REST API * This section will provide necessary information about the `CoinAPI EMS REST API` protocol. This API is also available in the Postman application: <a href=\"https://postman.coinapi.io/\" target=\"_blank\">https://postman.coinapi.io/</a> Implemented Standards: * [HTTP1.0](https://datatr...
__label__POS
0.709968
/** * EMS - REST API * This section will provide necessary information about the `CoinAPI EMS REST API` protocol. This API is also available in the Postman application: <a href=\"https://postman.coinapi.io/\" target=\"_blank\">https://postman.coinapi.io/</a> Implemented Standards: * [HTTP1.0](https://datatr...
__label__POS
0.743751
package edu.brown.benchmark.ycsb.distributions; import java.util.Random; public class ZipFianDistribution { private Random rnd = new Random(System.currentTimeMillis()); private int size; private double skew; private double bottom = 0; public ZipFianDistribution(int size, double skew) { t...
__label__POS
0.928047
package edu.brown.benchmark.tpce.generators; import java.util.Date; import java.text.SimpleDateFormat; import edu.brown.benchmark.tpce.TPCEConstants.DriverType; import edu.brown.benchmark.tpce.TPCEConstants; public abstract class BaseLogger { private String prefix; private BaseLogFormatter logFormatter; ...
__label__POS
0.999836
package edu.brown.benchmark.tpce.generators; import java.util.ArrayList; import java.util.Date; import org.voltdb.types.*; public class TMarketWatchTxnInput { public TMarketWatchTxnInput(){ industry_name = new String(); start_day = new TimestampType(); } public ArrayList<Object>I...
__label__POS
0.980398
package edu.brown.benchmark.tpce.generators; public abstract class ParametersWithDefaults { public ParametersWithDefaults() {} public void initialize(){ initializeDefaults(); setToDefaults(); } public void setToDefaults(){ checkDefaults(); } public abstract void init...
__label__POS
0.88965
package edu.brown.benchmark.tpce.generators; import java.util.Date; import edu.brown.benchmark.tpce.util.EGenDate; public class MEE { private DriverMEESettings driverMEESettings; private MEESUTInterface sut; private BaseLogger logger; private MEEPriceBoard priceBoard; private MEETi...
__label__POS
0.737976
package edu.brown.benchmark.tpce.generators; import java.util.ArrayList; import java.util.Date; import java.util.GregorianCalendar; import org.voltdb.types.TimestampType; import edu.brown.benchmark.tpce.TPCEConstants; public class TTradeUpdateTxnInput { public TTradeUpdateTxnInput(){ trade_id = new...
__label__POS
0.93719
package edu.brown.benchmark.tpce.generators; public abstract class BaseLogFormatter { public abstract String getLogOutput(BrokerVolumeSettings parms ); public abstract String getLogOutput(CustomerPositionSettings parms ); public abstract String getLogOutput(MarketWatchSettings parms ); public abstract...
__label__POS
0.989245
package edu.brown.benchmark.tpce.generators; import java.util.ArrayList; public class TTradeOrderTxnInput { public TTradeOrderTxnInput(){ co_name = new String(); exec_f_name = new String(); exec_l_name = new String(); exec_tax_id = new String(); issue = new String(); ...
__label__POS
0.876865
package edu.brown.benchmark.tpce.generators; import java.util.ArrayList; public class TCustomerPositionTxnInput { public TCustomerPositionTxnInput(){ tax_id = new String(); } public ArrayList<Object>InputParameters(){ ArrayList<Object> para = new ArrayList<Object>(); para....
__label__POS
0.997069
package edu.brown.benchmark.tpce.generators; import edu.brown.benchmark.tpce.util.EGenRandom; public class CETxnMixGenerator { public CETxnMixGenerator( TDriverCETxnSettings driverCETxnSettings, BaseLogger logger ){ this.driverCETxnSettings = driverCETxnSettings; rnd = new EGenRandom(EGenRandom.R...
__label__POS
0.978089
package edu.brown.benchmark.tpce.generators; public class EGenVersion { public static int iEGenMajorVersion = 1; // major revision number public static int iEGenMinorVersion = 3; // minor revision number public static int iEGenRevisionNumber = 0; // third-tier revision number pub...
__label__POS
0.99917
package edu.brown.benchmark.tpce.generators; public class DataMaintenanceCallback extends DMSUTInterface{ public DataMaintenanceCallback(TDataMaintenanceTxnInput dmTxnInput, TTradeCleanupTxnInput tcTxnInput){ dataMaintenanceTxnInput = dmTxnInput; tradeCleanupTxnInput = tcTxnInput; } ...
__label__POS
0.995376
package edu.brown.benchmark.tpce.generators; import java.util.ArrayList; import java.util.Date; import java.util.GregorianCalendar; import edu.brown.benchmark.tpce.TPCEConstants; import org.voltdb.types.*; public class TTradeLookupTxnInput { public TTradeLookupTxnInput(){ trade_id = new long [TPCEConstan...
__label__POS
0.943477
package edu.brown.benchmark.tpce.generators; class CheckException extends Exception{ private static final long serialVersionUID = 1L; private Throwable myThrow; public CheckException(){ super(); } public CheckException(String name, Throwable myThrow){ super(name,...
__label__POS
0.999539
package edu.brown.benchmark.tpce.generators; import java.util.ArrayList; public class TDataMaintenanceTxnInput { private long acct_id; private long c_id; private long co_id; private int day_of_month; private int vol_incr; private String symbol; private String table_name; p...
__label__POS
0.957135
package edu.brown.benchmark.tpce.generators; import java.util.Date; import edu.brown.benchmark.tpce.generators.TradeGenerator.TradeType; import edu.brown.benchmark.tpce.util.EGenDate; import edu.brown.benchmark.tpce.util.EGenMoney; public class MEEPriceBoard { public MEEPriceBoard( int tradingTimeSoFar, Date bas...
__label__POS
0.83484
package edu.brown.benchmark.tpce.generators; import java.util.GregorianCalendar; public class WheelTime { private TWheelConfig wheelConfig; private int cycles; private int index; public WheelTime( TWheelConfig pWheelConfig ){ wheelConfig = pWheelConfi...
__label__POS
0.871824
package edu.brown.benchmark.tpce.generators; import edu.brown.benchmark.tpce.*; public class TDriverCETxnSettings { public BrokerVolumeSettings BV_settings; public CustomerPositionSettings CP_settings; public MarketWatchSettings MW_settings; public SecurityDetailSettings SD_setting...
__label__POS
0.944747
package edu.brown.benchmark.tpce.generators; import java.util.ArrayList; import java.util.Date; import org.voltdb.types.*; public class TSecurityDetailTxnInput { public TSecurityDetailTxnInput(){ symbol = new String(); start_day = new TimestampType(); } public ArrayList<Object>InputParame...
__label__POS
0.986528
package edu.brown.benchmark.tpce.generators; public class TxnHarnessStructs { public static final int iFinYears = 5; public static final int iFinQtrPerYear = 4; public static final int iMaxDailyHistory = 10; public static final int iMaxNews = 10; public static final int min_broker_list_len = 20;...
__label__POS
0.999993
package edu.brown.benchmark.tpce.generators; public abstract class ParametersWithoutDefaults { public ParametersWithoutDefaults(){} public abstract void checkValid(); public abstract void checkCompliant(); public abstract boolean isValid(); public abstract boolean isCompliant(); publ...
__label__POS
0.92228
package edu.brown.benchmark.seats.util; import org.voltdb.VoltType; import edu.brown.benchmark.seats.SEATSConstants; /** * When a customer looks for an open seat, they will then attempt to book that seat in * a new reservation. Some of them will want to change their seats. This data structure * represents a custo...
__label__POS
0.723565
package edu.brown.benchmark.seats.procedures; import org.voltdb.SQLStmt; import org.voltdb.VoltProcedure; import org.voltdb.VoltTable; import edu.brown.benchmark.seats.SEATSConstants; public class LoadConfig extends VoltProcedure { // ----------------------------------------------------------------- // STAT...
__label__POS
0.862505
package edu.brown.benchmark.seats.procedures; import java.util.HashMap; import java.util.Map.Entry; import org.voltdb.ProcInfo; import org.voltdb.SQLStmt; import org.voltdb.VoltProcedure; import org.voltdb.VoltTable; import org.voltdb.VoltType; import edu.brown.benchmark.seats.SEATSConstants; @ProcInfo( singleP...
__label__POS
0.884635
package edu.brown.benchmark.wikipedia.util; import java.util.Arrays; import java.util.Random; /** * Fast Random Text Generator * @author pavlo */ public abstract class TextGenerator { private static final int CHAR_START = 32; // [space] private static final int CHAR_STOP = 126; // [~] private sta...
__label__POS
0.77729
/******************************************************************************* * oltpbenchmark.com * * Project Info: http://oltpbenchmark.com * Project Members: Carlo Curino <carlo.curino@gmail.com> * Evan Jones <ej@evanjones.ca> * DIFALLAH Djellel Eddine <djelleleddine.d...
__label__POS
0.676359
package edu.brown.benchmark.wikipedia.procedures; import org.voltdb.SQLStmt; import org.voltdb.VoltProcedure; import org.voltdb.VoltTable; import org.voltdb.types.TimestampType; import edu.brown.benchmark.wikipedia.WikipediaConstants; /** * Bulk update the revision counters for users/pages * @author xin * @author...
__label__POS
0.954007
package edu.brown.benchmark.wikipedia.procedures; import java.util.HashMap; import java.util.Map.Entry; import org.voltdb.ProcInfo; import org.voltdb.SQLStmt; import org.voltdb.VoltProcedure; import org.voltdb.VoltTable; import org.voltdb.VoltType; @ProcInfo( singlePartition = false ) public class GetTableCounts...
__label__POS
0.929513
package edu.brown.benchmark.wikipedia.data; import edu.brown.statistics.ObjectHistogram; public abstract class PageHistograms { /** * The length of the PAGE_TITLE column */ public static final ObjectHistogram<Integer> TITLE_LENGTH = new ObjectHistogram<Integer>() { { this.put(1,...
__label__POS
0.801493
note description: "Summary description for {JSON_BASIC_REFLECTOR_DESERIALIZER}." date: "$Date$" revision: "$Revision$" class JSON_BASIC_REFLECTOR_DESERIALIZER inherit JSON_DESERIALIZER redefine reset end JSON_TYPE_UTILITIES_EXT feature -- Conversion from_json (a_json: detachable JSON_VALUE; ctx: JSON...
__label__POS
0.625568
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging;...
__label__POS
0.686423
public class OAS { private static final String HEADER_CONTENT_TYPE = 'Content-Type'; private static final String HEADER_ACCEPT = 'Accept'; private static final String HEADER_ACCEPT_DELIMITER = ','; private static final Map<String, String> DELIMITERS = new Map<String, String> { 'csv' => ',', ...
__label__POS
0.807744
/* Copyright (c) 2001-2009, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list...
__label__POS
0.998046
--[[ EMS - REST API This section will provide necessary information about the `CoinAPI EMS REST API` protocol. This API is also available in the Postman application: <a href=\"https://postman.coinapi.io/\" target=\"_blank\">https://postman.coinapi.io/</a> Implemented Standards: * [HTTP1.0](https://datatr...
__label__POS
0.703116
package converter import ( "errors" "fmt" "image" "image/color" "image/gif" _ "image/jpeg" "image/png" "strings" _ "image/png" "os" "sync" "time" "golang.org/x/image/draw" "golang.org/x/image/font" "golang.org/x/image/font/basicfont" "golang.org/x/image/math/fixed" "golang.org/x/term" ) var RevRamp ...
__label__POS
0.869365
package converter import ( "fmt" "math" "strings" "time" ) func rosePineGradient(scale float32) Rgb { if scale < 0.5 { t := scale / 0.5 return lerpColor(Rgb{156,207,216,255}, Rgb{163,190,140,255}, t) } else { t := (scale-0.5)/0.5 return lerpColor(Rgb{163,190,140,255}, Rgb{2...
__label__POS
0.86117
/* Copyright (c) 2001-2009, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list...
__label__POS
0.634139
using Com.Ctrip.Framework.Apollo; using Com.Ctrip.Framework.Apollo.ConfigAdapter; using Com.Ctrip.Framework.Apollo.Enums; using Moq; using Xunit; namespace Apollo.Tests; public class ConfigAdapterTest { [Fact] public void JsonTest() { var json = @"{""a"":3, ""b"":{""c"":[4]}}"; var data ...
__label__POS
0.763566
using Com.Ctrip.Framework.Apollo.Foundation; using Xunit; namespace Apollo.Tests; public class NetworkInterfaceManagerTests { [Theory] [InlineData(new[] { "127.0.0.1" }, new[] { "127.0.0.1/8" }, "127.0.0.1")] [InlineData(new[] { "127.255.255.1" }, new[] { "127.0.0.1/8" }, "127.255.255.1")] [InlineDat...
__label__POS
0.886702
using Com.Ctrip.Framework.Apollo; using Com.Ctrip.Framework.Apollo.ConfigAdapter; using Xunit; namespace Apollo.ConfigurationManager.Tests; public class PropertyPlaceholderHelperTest { [Fact] public void ResolvePlaceholders_ResolvesNullAndEmpty() { // Arrange var text = "foo=${foo??a},bar...
__label__POS
0.793457
using Com.Ctrip.Framework.Apollo.OpenApi; using Microsoft.Extensions.DependencyInjection.Extensions; using Microsoft.Extensions.Options; // ReSharper disable once CheckNamespace namespace Microsoft.Extensions.DependencyInjection; public static class ServiceCollectionExtensions { public static IServiceCollection ...
__label__POS
0.972866
using Com.Ctrip.Framework.Apollo.Util; using System.Configuration; namespace Com.Ctrip.Framework.Apollo; public class AppSettingsSectionBuilder : ApolloConfigurationBuilder { private string? _keyPrefix; public override void Initialize(string name, NameValueCollection config) { base.Initialize(na...
__label__POS
0.835953
using System.Configuration; namespace Com.Ctrip.Framework.Apollo; public class ConnectionStringsSectionBuilder : ApolloConfigurationBuilder { private string? _keyPrefix; private string? _defaultProviderName; public override void Initialize(string name, NameValueCollection config) { base.Ini...
__label__POS
0.653648
using Com.Ctrip.Framework.Apollo; using Microsoft.Extensions.Configuration; #if NETCOREAPP using IHostBuilder = Microsoft.AspNetCore.Hosting.IWebHostBuilder; namespace Microsoft.AspNetCore.Hosting; public static class WebHostingBuilderExtensions #else namespace Microsoft.Extensions.Hosting; public static class Hos...
__label__POS
0.923191
namespace Com.Ctrip.Framework.Apollo.Util; internal static class ExceptionUtil { public static string GetDetailMessage(this Exception? ex) { if (ex == null || string.IsNullOrEmpty(ex.Message)) { return string.Empty; } var builder = new StringBuilder(ex.Message); ...
__label__POS
0.987683
using Com.Ctrip.Framework.Apollo; using Com.Ctrip.Framework.Apollo.ConfigAdapter; using Com.Ctrip.Framework.Apollo.Enums; using Microsoft.Extensions.Configuration; using System; using System.Configuration; using System.Web; namespace Apollo.AspNet.Demo; public class Global : HttpApplication { public static IConf...
__label__POS
0.949001
using Apollo.AspNet.Demo; using Microsoft.Owin; using Owin; using System; using System.Configuration; using System.Threading.Tasks; [assembly: OwinStartup(typeof(Startup))] namespace Apollo.AspNet.Demo; public class Startup { public void Configuration(IAppBuilder app) { app.Run(context => { ...
__label__POS
0.621186
/* Copyright (c) 2001-2009, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list...
__label__POS
0.984002
/* Copyright (c) 2001-2009, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list...
__label__POS
0.934926
/* Copyright (c) 2001-2009, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list...
__label__POS
0.943091
// // AUTO-GENERATED FILE, DO NOT MODIFY! // // @dart=2.12 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars library openapi.api; import 'dart:async'; import 'da...
__label__POS
0.984118
/* Copyright (c) 2001-2009, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list...
__label__POS
0.7308
# Purpose 演示[Spring Cloud Gateway](https://cloud.spring.io/spring-cloud-static/spring-cloud-gateway/2.0.3.RELEASE/single/spring-cloud-gateway.html)如何通过Apollo配置中心实现动态路由 # Instructions 1. 在Apollo配置中心创建AppId为`spring-cloud-Gateway`的项目 2. 在默认的`application`下做如下配置(可以通过文本模式直接复制、粘贴下面的内容): ```properties server.port =...
__label__POS
0.634266
# Instructions 1. 在Apollo配置中心创建AppId为`spring-mvc-logger`的项目 2. 在默认的`application`下做如下配置(可以通过文本模式直接复制、粘贴下面的内容): ``` apollo.setting.app.name = spring-mvc-logger ``` 3. 在项目中的LoggerStartupListener监听器中设置需要动态更新的值`appname`,并且在logback.xml中引用`${appname}` 4. 用tomcat启动`spring-mvc-logger`项目 5. 可以看到打印日志: ``` [a...
__label__POS
0.757041
# Purpose Netflix开源的一系列组件(Zuul, Hystrix, Eureka, Ribbon)的配置管理使用的是自家的[Archaius](https://github.com/Netflix/archaius),遗憾的是Netflix没有开源Archaius的服务端,现在可以使用Apollo作为Archaius的服务端使用。 - Apollo可以为Netflix微服务全家桶提供集中化的配置管理 - Archaius可以做为Apollo Client的另一种选择 # Instructions 1. 在Apollo配置中心创建AppId为`netflix-archaius`的项目 2. 在默认的`applic...
__label__POS
0.84782
# Purpose 演示[Spring Cloud Zuul](https://cloud.spring.io/spring-cloud-netflix/single/spring-cloud-netflix.html#netflix-zuul-reverse-proxy)如何通过Apollo配置中心实现动态路由 # Instructions 1. 在Apollo配置中心创建AppId为`spring-cloud-zuul`的项目 2. 在默认的`application`下做如下配置(可以通过文本模式直接复制、粘贴下面的内容): ```properties server.port = 9090 zuu...
__label__POS
0.897026
# Purpose 演示如何通过java agent技术无缝集成Apollo配置中心,典型使用场如: 1. 有些配置已经打到jar包里了,而源码不方便修改 2. 不想改动项目代码直接集成Apollo PS: 通过java agent的偷懒方式有缺陷,很难使用到配置变更动态生效功能,这里只是提供场景实例思路,最好还是按照官方wiki的方式正确接入,也非常简单 # Instructions 1. 在Apollo配置中心创建AppId为`spring-boot-agent`的项目 2. 在默认的`application`下做如下配置(可以通过文本模式直接复制、粘贴下面的内容): ```properties tes...
__label__POS
0.996423
# Purpose 演示[Spring Boot默认的HikariCP DataSource](https://github.com/brettwooldridge/HikariCP)如何通过Apollo配置中心实现动态切换数据源(其它类型的DataSource也是类似的,可以依样画葫芦) # Instructions 1. 创建test1数据库,导入test1.sql 2. 创建test2数据库,导入test2.sql 3. 在Apollo配置中心创建AppId为`dynamic-datasource`的项目 2. 在默认的`application`下做如下配置(按照实际的数据库连接信息填写): ```proper...
__label__POS
0.985256
package com.ctrip.framework.apollo.use.cases.netflix.archaius; import com.netflix.config.DynamicBooleanProperty; import com.netflix.config.DynamicPropertyFactory; import java.time.LocalDateTime; public class Application { private static final String ARCHAIUS_ADD_ITIONAL_URLS = "archaius.configurationSource.additio...
__label__POS
0.999148
package com.ctrip.framework.apollo.use.cases.spring.boot.starter.dubbo.consumer; import com.alibaba.dubbo.config.annotation.Reference; import com.ctrip.framework.apollo.use.cases.spring.boot.starter.dubbo.api.DemoService; import java.io.BufferedReader; import java.io.InputStreamReader; import java.nio.charset.Standard...
__label__POS
0.853605
package com.ctrip.framework.apollo.use.cases.spring.boot.logger; import com.ctrip.framework.apollo.Config; import com.ctrip.framework.apollo.model.ConfigChangeEvent; import com.ctrip.framework.apollo.spring.annotation.ApolloConfig; import com.ctrip.framework.apollo.spring.annotation.ApolloConfigChangeListener; import ...
__label__POS
0.97387
package com.ctrip.framework.apollo.use.cases.spring.boot.encrypt; import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; import java.util.concurrent.TimeUnit; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.CommandLineRunner; import org.springframework.boot.S...
__label__POS
0.99039
package com.ctrip.framework.apollo.use.cases.spring.boot.encrypt; import com.ctrip.framework.apollo.core.utils.StringUtils; import org.jasypt.intf.cli.JasyptPBEStringEncryptionCLI; import java.io.ByteArrayOutputStream; import java.io.PrintStream; import java.util.HashMap; import java.util.Map; import java.util.regex....
__label__POS
0.998862
package com.ctrip.framework.apollo.use.cases.dynamic.datasource; import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; import com.ctrip.framework.apollo.use.cases.dynamic.datasource.repository.UserRepository; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; import org.spri...
__label__POS
0.987097
package com.ctrip.framework.apollo.use.cases.dynamic.datasource.ds; import java.io.PrintWriter; import java.sql.Connection; import java.sql.SQLException; import java.sql.SQLFeatureNotSupportedException; import java.util.concurrent.atomic.AtomicReference; import javax.sql.DataSource; /** * A sample refreshable data s...
__label__POS
0.775376
package com.ctrip.framework.apollo.use.cases.dubbo.client; import com.ctrip.framework.apollo.core.ConfigConsts; import com.ctrip.framework.apollo.use.cases.dubbo.api.DemoService; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.nio.charset.StandardCharsets; impor...
__label__POS
0.984809
<?php /** * Configuration * PHP version 7.4 * * @category Class * @package OpenAPI\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech */ /** * EMS - REST API * * This section will provide necessary information about the `CoinAPI EMS REST API` protocol. This API is also ava...
__label__POS
0.635592
<?php /** * ModelInterface * * PHP version 7.4 * * @category Class * @package OpenAPI\Client\Model * @author OpenAPI Generator team * @link https://openapi-generator.tech */ /** * EMS - REST API * * This section will provide necessary information about the `CoinAPI EMS REST API` protocol. This API i...
__label__POS
0.775099
<?php /** * Fills * * PHP version 7.4 * * @category Class * @package OpenAPI\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech */ /** * EMS - REST API * * This section will provide necessary information about the `CoinAPI EMS REST API` protocol. This API is also availabl...
__label__POS
0.6278
/* * Copyright 2022 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to i...
__label__POS
0.997083
package org.voltdb.regressionsuites; import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Random; import org.junit.Test; import org.voltdb.BackendTarget; import org.voltdb.VoltTable; import org.voltdb.benchmark.tpcc.TPCCConstan...
__label__POS
0.679192
package org.voltdb.regressionsuites; import java.io.IOException; import java.util.HashMap; import java.util.Map; import java.util.Random; import org.voltdb.CatalogContext; import org.voltdb.SysProcSelector; import org.voltdb.VoltSystemProcedure; import org.voltdb.VoltTable; import org.voltdb.VoltType; import org.volt...
__label__POS
0.748195
/* * Copyright 2022 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to i...
__label__POS
0.98342
package org.voltdb.planner; import junit.framework.TestCase; import org.junit.Test; import org.voltdb.expressions.AbstractExpression; import org.voltdb.expressions.NullValueExpression; import org.voltdb.planner.PlanColumn.SortOrder; import org.voltdb.planner.PlanColumn.Storage; import edu.brown.expressions.Expressio...
__label__POS
0.870351
/* * Copyright 2022 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to i...
__label__POS
0.635583
package org.voltdb.utils; import java.util.Iterator; import java.util.Random; import org.voltdb.VoltTable; import org.voltdb.VoltTableRow; import org.voltdb.VoltType; import edu.brown.statistics.Histogram; import edu.brown.statistics.ObjectHistogram; import edu.brown.utils.CollectionUtil; import junit.framework.Tes...
__label__POS
0.716985
package org.voltdb.utils; import java.util.Random; import org.junit.Test; import org.voltdb.VoltTable; import org.voltdb.VoltType; import org.voltdb.types.SortDirectionType; import junit.framework.TestCase; /** * @author pavlo */ public class TestVoltTableUtil extends TestCase { static final VoltTable.Column...
__label__POS
0.868598
package org.voltdb.compiler; import org.junit.Test; import org.voltdb.catalog.Procedure; import org.voltdb.catalog.Statement; import org.voltdb.plannodes.AbstractPlanNode; import edu.brown.BaseTestCase; import edu.brown.benchmark.mapreduce.procedures.MockMapReduce; import edu.brown.optimizer.BasePlanOptimizerTestCase...
__label__POS
0.912981
#include <map> #include <cstdlib> #include <glib-object.h> #include <json-glib/json-glib.h> #include "Helpers.h" #include "Fills.h" using namespace std; using namespace Tizen::ArtikCloud; Fills::Fills() { //__init(); } Fills::~Fills() { //__cleanup(); } void Fills::__init() { //time = null; //price = double(0...
__label__POS
0.728208
#include <map> #include <cstdlib> #include <glib-object.h> #include <json-glib/json-glib.h> #include "Helpers.h" #include "Position_data_inner.h" using namespace std; using namespace Tizen::ArtikCloud; Position_data_inner::Position_data_inner() { //__init(); } Position_data_inner::~Position_data_inner() { //__cl...
__label__POS
0.725713
#include <map> #include <cstdlib> #include <glib-object.h> #include <json-glib/json-glib.h> #include "Helpers.h" #include "OrderExecutionReport.h" using namespace std; using namespace Tizen::ArtikCloud; OrderExecutionReport::OrderExecutionReport() { //__init(); } OrderExecutionReport::~OrderExecutionReport() { /...
__label__POS
0.622758
# Crypto [basics] Cryptography ## Description > Can you make it through all of the encodings? Attached is a file `binary.txt`. In there there is binary code (the beginning of the file looks like this): ``` 01010101 01101000 00101101 01101111 01101000 00101100 00100000 01101100 01101111 01101111 01101011 01110011 00...
__label__POS
0.658387