content stringlengths 263 5.24M | pred_label stringclasses 1
value | pred_score_pos float64 0.6 1 |
|---|---|---|
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.606965 |
package com.bookstore.service;
import com.bookstore.repository.BookRepository;
import java.util.List;
import org.springframework.stereotype.Service;
import com.bookstore.repository.FormatRepository;
import com.bookstore.projection.BookTitleAndFormatType;
@Service
public class BookstoreService {
private final For... | __label__POS | 0.982219 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_111) on Tue Jan 10 20:29:27 CET 2017 -->
<title>All Classes (retro-jus 0.6.9 API)</title>
<meta name="date" content="2017-01-10">
<link rel="st... | __label__POS | 0.890575 |
package com.apress.springrecipes.post.config;
import javax.jms.ConnectionFactory;
import javax.jms.Queue;
import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.command.ActiveMQQueue;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configurat... | __label__POS | 0.88682 |
package com.bookstore;
import com.bookstore.service.BookstoreService;
import com.bookstore.visitor.BookCoverVisitor;
import com.bookstore.visitor.BookFixHiperlinksVisitor;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure... | __label__POS | 0.993068 |
package com.bookstore.service;
import com.bookstore.visitor.Visitor;
import com.bookstore.entity.Author;
import com.bookstore.entity.Book;
import com.bookstore.entity.Ebook;
import com.bookstore.entity.Paperback;
import com.bookstore.repository.AuthorRepository;
import org.springframework.stereotype.Service;
@Service... | __label__POS | 0.639979 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_111) on Tue Jan 10 20:29:27 CET 2017 -->
<title>All Classes (retro-jus 0.6.9 API)</title>
<meta name="date" content="2017-01-10">
<link rel="st... | __label__POS | 0.873028 |
package com.apress.springrecipes.post;
import javax.jms.JMSException;
import javax.jms.MapMessage;
import javax.jms.Message;
import javax.jms.Session;
import org.springframework.jms.support.converter.MessageConversionException;
import org.springframework.jms.support.converter.MessageConverter;
public class MailMessa... | __label__POS | 0.841674 |
package com.apress.springrecipes.post.config;
import javax.jms.ConnectionFactory;
import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.jms.pool.PooledConnectionFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import o... | __label__POS | 0.853655 |
package com.apress.springrecipes.post.config;
import java.util.HashMap;
import java.util.Map;
import org.apache.kafka.clients.producer.ProducerConfig;
import org.apache.kafka.common.serialization.IntegerSerializer;
import org.apache.kafka.common.serialization.StringSerializer;
import org.springframework.context.annot... | __label__POS | 0.622428 |
package com.bookstore.dto;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
public class AuthorDto implements Serializable {
private static final long serialVersionUID = 1L;
private Long authorId;
private String name;
private int age;
private List<BookDto> books =... | __label__POS | 0.62856 |
package com.apress.springrecipes.post;
import javax.jms.JMSException;
import javax.jms.MapMessage;
import javax.jms.Message;
import javax.jms.Session;
import org.springframework.jms.support.converter.MessageConversionException;
import org.springframework.jms.support.converter.MessageConverter;
public class MailMessa... | __label__POS | 0.841674 |
/**
* Bootstrap Table Chinese translation
* Author: Zhixin Wen<wenzhixin2010@gmail.com>
*/
$.fn.bootstrapTable.locales['zh-CN'] = {
formatShowSearch: function formatShowSearch() {
return '隐藏/显示搜索';
},
formatPageGo: function formatPageGo() {
return '跳转';
},
formatCopyRows: function formatCopyRows() ... | __label__POS | 0.636102 |
package com.bookstore.transformer;
import com.bookstore.dto.AuthorDto;
import com.bookstore.dto.BookDto;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.hibernate.transform.ResultTransformer;
public class AuthorBookTransformer implements ResultTransformer ... | __label__POS | 0.978888 |
# Polly Samples
This repository contains a solution with basic examples demonstrating the creation and utilization of Polly strategies.
- [`Intro`](./Intro) - This section serves as an introduction to Polly. It demonstrates how to use `ResiliencePipelineBuilder` to create a `ResiliencePipeline`, which can be used to ... | __label__POS | 0.711516 |
package com.bookstore.dao;
import com.bookstore.dto.AuthorDto;
import com.bookstore.transformer.AuthorBookTransformer;
import java.util.List;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;
import org.springframework.stereotype.Repository;
import org... | __label__POS | 0.909445 |
package com.apress.springrecipes.post;
import javax.jms.JMSException;
import javax.jms.MapMessage;
import javax.jms.Message;
import javax.jms.Session;
import org.springframework.jms.support.converter.MessageConversionException;
import org.springframework.jms.support.converter.MessageConverter;
public class MailMessa... | __label__POS | 0.841674 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_111) on Tue Jan 10 20:28:36 CET 2017 -->
<title>io.apptik.comm.jus (jus-java 0.6.9 API)</title>
<meta name="date" content="2017-01-10">
<link r... | __label__POS | 0.953056 |
### 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 |
module("sphinxsearch", package.seeall)
_VERSION = '0.10'
local class = sphinxsearch
local mt = { __index = class }
local mysql = require("resty.mysql")
function new(self)
local sphinx, err = mysql:new()
if not sphinx then
return nil, err
end
return setmetatable({ sphinx = sphinx }, mt)
end
... | __label__POS | 0.881549 |
#!/usr/bin/env lua
-- -*- lua -*-
-- copyright: 2012 Appwill Inc.
-- author : ldmiao
--
module("awutils", package.seeall)
local JSON = require("cjson")
local Redis = require("resty.redis")
local Bit = require("bit")
local table_insert = table.insert
local table_concat = table.concat
loca... | __label__POS | 0.991091 |
package com.apress.springrecipes.post.config;
import javax.jms.ConnectionFactory;
import javax.jms.Queue;
import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.command.ActiveMQQueue;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configurat... | __label__POS | 0.886438 |
<header class="resource-header">
<div class="layout-container">
<div class="resource-title">
<i class="resource-icon resource-org"></i>
<h1>{{billingDetail.organization.name}} Billing</h1>
</div>
<ul class="resource-metadata">
<li class="resource-metadata-item">
<h5 class="resou... | __label__POS | 0.742442 |
local utils = require("mch.util")
module('mch.console', package.seeall)
local table_insert = table.insert
function getMembers(t, o)
local tp
for i, j in pairs(o) do
if type(i) == 'string' then
if type(j) == 'function' then
tp = true
else
tp = false
end
t[i] = tp
en... | __label__POS | 0.806895 |
package com.apress.springrecipes.post;
import javax.jms.JMSException;
import javax.jms.MapMessage;
import javax.jms.Message;
import javax.jms.Session;
import org.springframework.jms.support.converter.MessageConversionException;
import org.springframework.jms.support.converter.MessageConverter;
public class MailMessa... | __label__POS | 0.841674 |
package com.bookstore.service;
import com.bookstore.entity.Author;
import com.bookstore.repository.AuthorRepository;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
@Service
public class Inse... | __label__POS | 0.694463 |
package com.apress.springrecipes.post.config;
import javax.jms.ConnectionFactory;
import org.apache.activemq.ActiveMQConnectionFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.jms.connection.JmsTransactionManager;
impo... | __label__POS | 0.648708 |
package io.apptik.rhub.example;
import org.reactivestreams.Publisher;
import io.apptik.rhub.DefaultReactorHub;
import io.apptik.rhub.DefaultRxJava1Hub;
import io.apptik.rhub.DefaultRxJava2ObsHub;
import io.apptik.rhub.RSHub;
import io.apptik.rhub.RxJava1Hub;
import io.apptik.rhub.RxJava2ObsHub;
import io.apptik.rhub... | __label__POS | 0.853174 |
package com.apress.springrecipes.post.config;
import javax.jms.ConnectionFactory;
import org.apache.activemq.ActiveMQConnectionFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.jms.core.JmsTemplate;
import com.apress.s... | __label__POS | 0.981848 |
<header class="resource-header">
<div class="layout-container">
<div class="resource-title">
<i class="resource-icon resource-db"></i>
<h1>
{{model.handle}}
{{#if model.initializeFrom}}
<span class="resource-affix">
{{#if model.supportsReplication}}replicates{{/i... | __label__POS | 0.623868 |
using System.Runtime.CompilerServices;
namespace Polly.Core.Benchmarks;
public class GenericOverheadBenchmark
{
private readonly GenericStrategy<string> _generic;
private readonly NonGenericStrategy _nonGeneric;
public GenericOverheadBenchmark()
{
_generic = new GenericStrategy<string>();
... | __label__POS | 0.868053 |
<footer class="footer-container">
<div class="row footer">
<div class="columns medium-10 small-only-text-center">
<ul>
<li><a href="/about/">About</a></li>
<li><a href="/pricing/">Pricing</a></li>
<li><a href="/docs/">Do... | __label__POS | 0.903663 |
<ul>
<li>
<h4>Guides</h4>
<ul>
<li><a href="/docs/">Welcome to AppVeyor</a></li>
<li><a href="/docs/getting-started-with-appveyor-for-linux">Getting started for Linux</a></li>
</ul>
</li>
<li>
<h4>Reference</h4>
<ul>
<li><a href="... | __label__POS | 0.999287 |
package com.apress.springrecipes.post.config;
import org.springframework.amqp.rabbit.connection.CachingConnectionFactory;
import org.springframework.amqp.rabbit.connection.ConnectionFactory;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.amqp.support.converter.Jackson2JsonMessag... | __label__POS | 0.955153 |
package com.bookstore.service;
import com.bookstore.entity.Author;
import com.bookstore.repository.AuthorRepository;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
@Service
public class Inse... | __label__POS | 0.966316 |
namespace Polly.Benchmarks;
[Config(typeof(PollyConfig))]
public class Retry
{
private static readonly Policy SyncPolicy = Policy.Handle<InvalidOperationException>().Retry();
private static readonly AsyncPolicy AsyncPolicy = Policy.Handle<InvalidOperationException>().RetryAsync();
[Benchmark]
public ... | __label__POS | 0.813328 |
<!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 io.apptik.roxy;
import reactor.core.publisher.EmitterProcessor;
import reactor.core.publisher.ReplayProcessor;
import reactor.core.publisher.TopicProcessor;
import reactor.core.publisher.WorkQueueProcessor;
import static io.apptik.roxy.Roxy.TePolicy.PASS;
import static io.apptik.roxy.Roxy.TePolicy.WRAP;
/**... | __label__POS | 0.977663 |
namespace Polly.Benchmarks;
[Config(typeof(PollyConfig))]
public class PolicyWrap
{
private static readonly Policy SyncPolicy = Policy.Wrap(
Policy.Handle<InvalidOperationException>().Retry(),
Policy.Handle<InvalidOperationException>().CircuitBreaker(2, TimeSpan.FromMinutes(1)),
Policy.Tim... | __label__POS | 0.620832 |
package io.apptik.roxy;
import com.jakewharton.rxrelay.BehaviorRelay;
import com.jakewharton.rxrelay.PublishRelay;
import com.jakewharton.rxrelay.ReplayRelay;
import rx.subjects.BehaviorSubject;
import rx.subjects.PublishSubject;
import rx.subjects.ReplaySubject;
/**
* Helper Roxy factories for common proxies based... | __label__POS | 0.9946 |
package com.apress.springrecipes.post.config;
import javax.jms.ConnectionFactory;
import org.apache.activemq.ActiveMQConnectionFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.jms.core.JmsTemplate;
import com.apress.s... | __label__POS | 0.983015 |
package io.apptik.roxy;
import java.io.Serializable;
/**
* Reactive Proxy - a dynamic multi-receiver and multi-producer.
*
* @param <P> the type of Upstream source that the Proxy accepts and merged output the Proxy returns
*/
public interface Roxy<P> {
/**
* Subscribes Proxy to event provider.
* @... | __label__POS | 0.819072 |
package com.bookstore.service;
import com.bookstore.entity.Author;
import com.bookstore.repository.AuthorRepository;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
@Service
public class Inse... | __label__POS | 0.947794 |
package io.apptik.roxy;
import io.reactivex.processors.BehaviorProcessor;
import io.reactivex.processors.PublishProcessor;
import io.reactivex.processors.ReplayProcessor;
import io.reactivex.subjects.BehaviorSubject;
import io.reactivex.subjects.PublishSubject;
import io.reactivex.subjects.ReplaySubject;
/**
* Help... | __label__POS | 0.989661 |
package com.apress.springrecipes.post;
import javax.jms.JMSException;
import javax.jms.MapMessage;
import javax.jms.Message;
import javax.jms.Session;
import org.springframework.jms.support.converter.MessageConversionException;
import org.springframework.jms.support.converter.MessageConverter;
public class MailMessa... | __label__POS | 0.841674 |
package com.apress.springrecipes.post.config;
import javax.jms.ConnectionFactory;
import org.apache.activemq.ActiveMQConnectionFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.jms.core.JmsTemplate;
import com.apress.s... | __label__POS | 0.926547 |
namespace Polly.Core.Tests;
public class ResiliencePropertiesTests
{
[Fact]
public void TryGetValue_Ok()
{
var key = new ResiliencePropertyKey<long>("dummy");
var props = new ResilienceProperties();
props.Set(key, 12345);
props.TryGetValue(key, out var val).ShouldBe(true);... | __label__POS | 0.977275 |
package com.apress.springrecipes.post;
import javax.jms.JMSException;
import javax.jms.MapMessage;
import javax.jms.Message;
import javax.jms.Session;
import org.springframework.jms.support.converter.MessageConversionException;
import org.springframework.jms.support.converter.MessageConverter;
public class MailMessa... | __label__POS | 0.841674 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_111) on Tue Jan 10 20:28:35 CET 2017 -->
<title>TokenRequest (jus-java 0.6.9 API)</title>
<meta name="date" content="2017-01-10">
<link rel="st... | __label__POS | 0.938048 |
package com.apress.springrecipes.post.config;
import javax.jms.ConnectionFactory;
import org.apache.activemq.ActiveMQConnectionFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.jms.listener.SimpleMessageListenerContaine... | __label__POS | 0.688087 |
# **Re-nest (To Donate Reusable Items)**
### **GitHub Handles of Team Members:**
- `harshbisht27`
### **Project Title:**
- **Re-nest**
### **Project Description:**
- Re-nest provides a convenient way for individuals to donate reusable items like clothes, toys, and furniture directly from their doorstep. Partnering ... | __label__POS | 0.651761 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_111) on Tue Jan 10 20:28:35 CET 2017 -->
<title>StringRequest (jus-java 0.6.9 API)</title>
<meta name="date" content="2017-01-10">
<link rel="s... | __label__POS | 0.939276 |
package com.bookstore.service;
import com.bookstore.entity.Author;
import com.bookstore.repository.AuthorRepository;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
@Service
public class Inse... | __label__POS | 0.966316 |
<?php
namespace Aptoma\Twig\Node;
/**
* Represents a markdown node.
*
* It parses content as Markdown.
*
* @author Gunnar Lium <gunnar@aptoma.com>
* @author Joris Berthelot <joris@berthelot.tel>
*/
class MarkdownNode extends \Twig\Node\Node
{
public function __construct(\Twig\Node\Node $body, $lineno, $tag... | __label__POS | 0.984784 |
<?php
namespace Aptoma\Twig\Extension;
use Aptoma\Twig\TokenParser\MarkdownTokenParser;
/**
* MarkdownExtension provides support for Markdown.
*
* @author Gunnar Lium <gunnar@aptoma.com>
* @author Joris Berthelot <joris@berthelot.tel>
*/
class MarkdownExtension extends \Twig\Extension\AbstractExtension implemen... | __label__POS | 0.917156 |
<?php
namespace Aptoma\Twig\TokenParser;
use Aptoma\Twig\Node\MarkdownNode;
/**
* @author Gunnar Lium <gunnar@aptoma.com>
* @author Joris Berthelot <joris@berthelot.tel>
*/
class MarkdownTokenParser extends \Twig\TokenParser\AbstractTokenParser
{
/**
* {@inheritdoc}
*/
public function parse(\Twi... | __label__POS | 0.997408 |
<?php
namespace Aptoma\Twig\Extension\MarkdownEngine;
use Aptoma\Twig\Extension\MarkdownEngineInterface;
use League\CommonMark\CommonMarkConverter;
/**
* PHPLeagueCommonMarkEngine.php
*
* Maps League\CommonMark\CommonMarkConverter to Aptoma\Twig Markdown Extension
*
* @author Casey McLaughlin <caseyamcl@gmail.c... | __label__POS | 0.979238 |
<?php
namespace Aptoma\Twig\Extension\MarkdownEngine;
use Aptoma\Twig\Extension\MarkdownEngineInterface;
use Parsedown;
/**
* ParsedownEngine.php
*
* Maps erusev/parsedown to Aptoma\Twig Markdown Extension
*
* @author Sébastien Lourseau <https://github.com/SebLours>
*/
class ParsedownEngine implements Markdown... | __label__POS | 0.853203 |
<?php
namespace Aptoma\Twig\Extension;
use Aptoma\Twig\Extension\MarkdownEngine\MichelfMarkdownEngine;
use PHPUnit\Framework\TestCase;
/**
* @author Gunnar Liun <gunnar@aptoma.com>
*/
class MarkdownExtensionTest extends TestCase
{
/**
* @dataProvider getParseMarkdownTests
*/
public function testP... | __label__POS | 0.959784 |
using System.Diagnostics.Metrics;
using Microsoft.Extensions.Logging;
using NSubstitute;
using Polly.Telemetry;
namespace Polly.TestUtils;
#pragma warning disable CA1031 // Do not catch general exception types
public static class TestUtilities
{
public static Task AssertWithTimeoutAsync(Func<Task> assertion) => ... | __label__POS | 0.731744 |
using System.Linq;
using SportsStore.Models;
using Xunit;
namespace SportsStore.Tests {
public class CartTests {
[Fact]
public void Can_Add_New_Lines() {
// Arrange - create some test products
Product p1 = new Product { ProductID = 1, Name = "P1" };
Product p... | __label__POS | 0.638653 |
package com.apress.springrecipes.post;
import javax.jms.JMSException;
import javax.jms.MapMessage;
import javax.jms.Message;
import javax.jms.Session;
import org.springframework.jms.support.converter.MessageConversionException;
import org.springframework.jms.support.converter.MessageConverter;
public class MailMessa... | __label__POS | 0.841674 |
namespace Polly.TestUtils;
public static class OutcomeExtensions
{
public static ValueTask<bool> ResultPredicateAsync<TResult>(this Outcome<object> outcome, TResult result) => new(outcome.ResultPredicate(result));
public static ValueTask<bool> ResultPredicateAsync<TResult>(this Outcome<object> outcome, Predic... | __label__POS | 0.996793 |
package com.apress.springrecipes.post.config;
import javax.jms.ConnectionFactory;
import org.apache.activemq.ActiveMQConnectionFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.jms.core.JmsTemplate;
import com.apress.s... | __label__POS | 0.923856 |
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Routing;
using Microsoft.AspNetCore.Razor.TagHelpers;
using Moq;
using SportsStore.Infrastructure;
using SportsStore.Models.ViewModels;
using Xunit;
namespace SportsStore.Tests {
public ... | __label__POS | 0.898823 |
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.994983 |
using Microsoft.AspNetCore.Mvc;
using Moq;
using SportsStore.Controllers;
using SportsStore.Models;
using Xunit;
namespace SportsStore.Tests {
public class OrderControllerTests {
[Fact]
public void Cannot_Checkout_Empty_Cart() {
// Arrange - create a mock repository
Mock<... | __label__POS | 0.610877 |
package com.bookstore.service;
import com.bookstore.repository.AuthorRepository;
import com.bookstore.entity.Author;
import com.bookstore.entity.Book;
import java.util.List;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@Service
public class BookstoreS... | __label__POS | 0.850958 |
package com.apress.springrecipes.post.config;
import javax.jms.ConnectionFactory;
import javax.jms.Queue;
import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.command.ActiveMQQueue;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configurat... | __label__POS | 0.890107 |
package com.bookstore.entity;
import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
@Entity
public class Book extends BaseEntity<String> implements Serializable {
private static final long serialV... | __label__POS | 0.658829 |
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.Routing;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
using Microsoft.AspNetCore.Razor.TagHelpers;
using SportsStore.Models.ViewModels;
using System.Collections.Generic;
namespace SportsStore.Infrastructure {
... | __label__POS | 0.670637 |
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 org.springframework.stereotype.Service;
@Service
public class BookstoreService {
private final AuthorRep... | __label__POS | 0.940474 |
namespace Polly.Specs;
public class ISyncPolicyExtensionsSpecs
{
[Fact]
public void Converting_a_nongeneric_ISyncPolicy_to_generic_should_return_a_generic_ISyncPolicyTResult()
{
ISyncPolicy nonGenericPolicy = Policy.Timeout(10);
var genericPolicy = nonGenericPolicy.AsPolicy<ResultClass>();... | __label__POS | 0.705403 |
namespace Polly.Specs;
public class IAsyncPolicyExtensionsSpecs
{
[Fact]
public void Converting_a_nongeneric_IAsyncPolicy_to_generic_should_return_a_generic_IAsyncPolicyTResult()
{
IAsyncPolicy nonGenericPolicy = Policy.TimeoutAsync(10);
var genericPolicy = nonGenericPolicy.AsAsyncPolicy<R... | __label__POS | 0.666511 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_111) on Tue Jan 10 20:28:36 CET 2017 -->
<title>io.apptik.comm.jus.http (jus-java 0.6.9 API)</title>
<meta name="date" content="2017-01-10">
<l... | __label__POS | 0.755498 |
package com.apress.springrecipes.post.config;
import javax.jms.ConnectionFactory;
import org.apache.activemq.ActiveMQConnectionFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.jms.connection.JmsTransactionManager;
impo... | __label__POS | 0.827982 |
using System.Collections.Generic;
using System.Linq;
namespace SportsStore.Models {
public class EFProductRepository : IProductRepository {
private ApplicationDbContext context;
public EFProductRepository(ApplicationDbContext ctx) {
context = ctx;
}
public IQueryable... | __label__POS | 0.857337 |
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.Logging;
using Polly.Registry;
namespace Polly.Extensions.Tests.Issues;
public partial class IssuesTests
{
[Fact]
public void OverrideLoggerFactory_ByExplicitConfigureTelemetr... | __label__POS | 0.645911 |
using Microsoft.AspNetCore.Mvc;
using SportsStore.Models;
using System.Linq;
using Microsoft.AspNetCore.Authorization;
namespace SportsStore.Controllers {
public class OrderController : Controller {
private IOrderRepository repository;
private Cart cart;
public OrderController(IOrderRepo... | __label__POS | 0.890067 |
using System.Linq;
using Microsoft.AspNetCore.Mvc;
using SportsStore.Models;
using SportsStore.Models.ViewModels;
namespace SportsStore.Controllers {
public class CartController : Controller {
private IProductRepository repository;
private Cart cart;
public CartController(IProductReposit... | __label__POS | 0.7421 |
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 |
using Polly.Utils;
namespace Polly.Core.Tests.Utils;
public class ObjectPoolTests
{
[Fact]
public void GetAnd_ReturnObject_SameInstance()
{
// Arrange
var pool = new ObjectPool<object>(() => new object(), _ => true);
var obj1 = pool.Get();
pool.Return(obj1);
// Ac... | __label__POS | 0.786772 |
using System.Diagnostics.CodeAnalysis;
using Polly.Registry;
namespace Polly.Core.Tests.Registry;
public class ResiliencePipelineProviderTests
{
[Fact]
public void Get_DoesNotExist_Throws()
{
var exception = Should.Throw<KeyNotFoundException>(() => new Provider().GetPipeline("not-exists"));
... | __label__POS | 0.674763 |
import getFormatTypeFromFormatString from './getFormatTypeFromFormatString';
describe('getFormatTypeFromFormatString', () => {
describe('exact matches', () => {
const exactMatchCases = [
{ testTitle: 'should return "calendarFormat" for MM/dd/yyyy', input: 'MM/dd/yyyy', output: 'calendarFormat' },
{ t... | __label__POS | 0.966423 |
namespace Polly.Core.Tests.Registry;
public record StrategyId(Type Type, string BuilderName, string InstanceName = "")
{
public static readonly ResiliencePropertyKey<StrategyId> ResilienceKey = new("Polly.StrategyId");
public static StrategyId Create<T>(string builderName, string instanceName = "")
=>... | __label__POS | 0.972189 |
package com.bookstore.transformer;
import com.bookstore.dto.AuthorDto;
import com.bookstore.dto.BookDto;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.hibernate.transform.ResultTransformer;
public class AuthorBookTransformer implements ResultTransformer ... | __label__POS | 0.978328 |
/*
* Copyright (C) 2006, 2007 Dennis Hunziker, Ueli Kistler
* Copyright (C) 2007 Reto Schuettel, Robin Stocker
*/
package org.python.pydev.refactoring.tests.visitors;
import java.io.File;
import junit.framework.Test;
import org.python.pydev.refactoring.tests.core.AbstractIOTestSuite;
import org.python.pydev.r... | __label__POS | 0.718143 |
package com.bookstore.dao;
import com.bookstore.dto.AuthorDto;
import com.bookstore.transformer.AuthorBookTransformer;
import java.util.List;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;
import org.springframework.stereotype.Repository;
import org... | __label__POS | 0.909445 |
using Microsoft.Extensions.Time.Testing;
using Polly.Retry;
namespace Polly.Core.Tests.Issues;
public partial class IssuesTests
{
[Fact(Timeout = 30_000)]
public async Task InfiniteRetry_Delay_Does_Not_Overflow_2163()
{
// Arrange
int attempts = 0;
int succeedAfter = 2049;
... | __label__POS | 0.676488 |
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.991674 |
/*
* Copyright (C) 2006, 2007 Dennis Hunziker, Ueli Kistler
* Copyright (C) 2007 Reto Schuettel, Robin Stocker
*/
package org.python.pydev.refactoring.tests.core;
import java.io.File;
import java.io.FilenameFilter;
import junit.framework.TestSuite;
/**
* @author Dennis Hunziker, Ueli Kistler
*/
public abstr... | __label__POS | 0.604962 |
public struct Lexer {
public let templateString: String
public init(templateString: String) {
self.templateString = templateString
}
func createToken(string:String) -> Token {
func strip() -> String {
let start = string.index(string.startIndex, offsetBy: 2)
let end = string.index(string.en... | __label__POS | 0.977392 |
export const elementsHaveChanged = (newElements, oldElements) => {
if (newElements.length !== oldElements.length) {
return true;
}
for (let i = 0; i < newElements.length; i++) {
if (newElements[i] !== oldElements[i]) {
return true;
}
}
return false;
};
export const getElementToFocusOnIndex ... | __label__POS | 0.991848 |
/*
* Copyright (C) 2006, 2007 Dennis Hunziker, Ueli Kistler
*/
package org.python.pydev.refactoring.tests.codegenerator.generateproperties;
import java.util.ArrayList;
import org.python.pydev.refactoring.ast.adapters.offsetstrategy.IOffsetStrategy;
public class MockupGeneratePropertiesConfig {
private int... | __label__POS | 0.930998 |
using Polly;
using Polly.CircuitBreaker;
namespace Polly.Core.Tests.CircuitBreaker;
public class BreakDurationGeneratorArgumentsTests
{
[Fact]
public void Constructor_Old_Ok()
{
double expectedFailureRate = 0.5;
int failureCount = 10;
var context = new ResilienceContext();
... | __label__POS | 0.957569 |
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.950647 |
using Polly.CircuitBreaker;
namespace Polly.Core.Tests.CircuitBreaker;
public class CircuitBreakerStateProviderTests
{
[Fact]
public void Ctor_Ok()
{
var provider = new CircuitBreakerStateProvider();
provider.IsInitialized.ShouldBeFalse();
}
[Fact]
public void NotInitialized_... | __label__POS | 0.8137 |
using System.ComponentModel.DataAnnotations;
using Polly.Simmy;
using Polly.Utils;
namespace Polly.Core.Tests.Simmy;
public class ChaosStrategyOptionsTests
{
[Fact]
public void Ctor_Ok()
{
var sut = new TestChaosStrategyOptions();
sut.Randomizer.ShouldNotBeNull();
sut.Enabled.Sho... | __label__POS | 0.756324 |
To use Appwrite with React, follow these steps:
1. **Set Up Your Environment:**
- Ensure you have a recent version of [Node.js](https://nodejs.org/en/download/) installed.
- Have a basic understanding of React and Next.js.
2. **Create a React Project:**
- You can create a new React project using Vite with th... | __label__POS | 0.913705 |
I don't have the specific details for the PHP SDK, but I can provide you with the general endpoints available for the Avatars API in Appwrite. The Avatars API typically includes the following endpoints:
1. **GET /avatars/credit-card**: Generate a credit card icon.
2. **GET /avatars/favicon**: Fetch a website's favicon... | __label__POS | 0.64359 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.