content stringlengths 263 5.24M | pred_label stringclasses 1
value | pred_score_pos float64 0.6 1 |
|---|---|---|
package edu.stanford.math.plex4.example_tests;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import edu.stanford.math.plex4.api.Plex4;
import edu.stanford.math.plex4.examples.PointCloudExamples;
import edu.stanford.math.plex4.homology.barcodes.BarcodeCollection;
import edu.stanford.math.plex... | __label__POS | 0.710124 |
package com.apress.springrecipes.board;
import java.sql.PreparedStatement;
import java.util.List;
import javax.sql.DataSource;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.support.GeneratedKeyHolder;
import org.springfr... | __label__POS | 0.87436 |
package edu.stanford.math.plex4.example_tests;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import edu.stanford.math.plex4.examples.PointCloudExamples;
import edu.stanford.math.plex4.homology.barcodes.BarcodeCol... | __label__POS | 0.991605 |
**[How To Use JPA `JOINED` Inheritance Strategy And Strategy Design Pattern](https://github.com/AnghelLeonard/Hibernate-SpringBoot/tree/master/HibernateSpringBootJoinedAndStrategy)**
**Description:** This application is an example of using JPA `JOINED` inheritance strategy and [Strategy](https://sourcemaking.com/desi... | __label__POS | 0.788866 |
package com.github.appreciated.apexcharts.config.grid.builder;
import com.github.appreciated.apexcharts.config.grid.Padding;
public class PaddingBuilder {
private Double top;
private Double right;
private Double bottom;
private Double left;
private PaddingBuilder() {
}
public static Padd... | __label__POS | 0.953127 |
package com.github.appreciated.apexcharts.config.locale.builder;
import com.github.appreciated.apexcharts.config.locale.Toolbar;
public class ToolbarBuilder {
private String exportToSVG;
private String exportToPNG;
private String exportToCSV;
private String menu;
private String selection;
priv... | __label__POS | 0.624997 |
package edu.stanford.math.plex4.example_tests;
import java.util.Iterator;
import org.junit.Test;
import edu.stanford.math.plex4.api.Plex4;
import edu.stanford.math.plex4.homology.barcodes.BarcodeCollection;
import edu.stanford.math.plex4.homology.chain_basis.Simplex;
import edu.stanford.math.plex4.homology.interface... | __label__POS | 0.732456 |
package com.apress.springrecipes.board.web;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurit... | __label__POS | 0.60412 |
package com.github.appreciated.apexcharts.config.locale.builder;
import com.github.appreciated.apexcharts.config.locale.Options;
import com.github.appreciated.apexcharts.config.locale.Toolbar;
import java.util.List;
public class OptionsBuilder {
private List<String> months;
private List<String> shortMonths;
... | __label__POS | 0.797981 |
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Routing;
using System;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc.Internal;
using Microsoft.Extensions.DependencyInjection;
namespace UrlsAndRoutes.Infrastructure {
public class LegacyRoute : IRoute... | __label__POS | 0.889607 |
// <copyright file="MetricsTextSyntax.cs" company="App Metrics Contributors">
// Copyright (c) App Metrics Contributors. All rights reserved.
// </copyright>
using System;
using System.Collections.Generic;
using System.Globalization;
namespace App.Metrics.Formatters.Ascii.Internal
{
internal static class Metrics... | __label__POS | 0.698022 |
package edu.stanford.math.plex4.example_tests;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import edu.stanford.math.plex4.api.Plex4;
import edu.stanford.math.plex4.examples.PointCloudExamples;
import edu.stanford.math.plex4.homology.barcodes.BarcodeCollection;
import edu.stanford.math.plex... | __label__POS | 0.92355 |
**[How To Use JPA `GenerationType.AUTO` And UUID Identifiers](https://github.com/AnghelLeonard/Hibernate-SpringBoot/tree/master/HibernateSpringBootAutoUUID)**
<b><a href="https://persistencelayer.wixsite.com/springboot-hibernate/post/the-best-way-to-use-jpa-generationtype-auto-and-uuid-identifiers">If you prefer to re... | __label__POS | 0.846472 |
package edu.stanford.math.plex4.homology;
import static org.junit.Assert.assertTrue;
import java.util.ArrayList;
import java.util.List;
import edu.stanford.math.plex4.homology.barcodes.AnnotatedBarcodeCollection;
import edu.stanford.math.plex4.homology.barcodes.BarcodeCollection;
import edu.stanford.math.plex4.homol... | __label__POS | 0.67442 |
package com.github.appreciated.apexcharts.config.tooltip.builder;
import com.github.appreciated.apexcharts.config.tooltip.Fixed;
public class FixedBuilder {
private Boolean enabled;
private String position;
private Double offsetX;
private Double offsetY;
private FixedBuilder() {
}
public... | __label__POS | 0.86688 |
package edu.stanford.math.plex4.homology;
import static org.junit.Assert.assertTrue;
import edu.stanford.math.plex4.api.FilteredStreamInterface;
import edu.stanford.math.plex4.homology.chain_basis.Simplex;
import edu.stanford.math.plex4.metric.landmark.LandmarkSelector;
import edu.stanford.math.plex4.streams.interfac... | __label__POS | 0.967356 |
package com.github.appreciated.apexcharts.config.datalables.builder;
import com.github.appreciated.apexcharts.config.datalables.DropShadow;
public class DropShadowBuilder {
private Boolean enable;
private Double top;
private Double left;
private Double blur;
private Double opacity;
private Dr... | __label__POS | 0.884885 |
package edu.stanford.math.plex4.bottleneck;
import static org.junit.Assert.assertTrue;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
public class FordFulkersonTest {
@Before
public void setUp() throws Exception {
}
@After
public void tearDown() throws Exception {
}
//@Test
public... | __label__POS | 0.976127 |
**[How To Use Spring Projections(DTOs) And Inclusive Full Joins (MySQL)](https://github.com/AnghelLeonard/Hibernate-SpringBoot/tree/master/HibernateSpringBootDtoViaFullJoinsMySQL)**
 {
}
publ... | __label__POS | 0.952265 |
using System;
using System.Collections.Generic;
using System.Text;
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;
using System.Windows.Shapes;
namespace Controls
... | __label__POS | 0.63436 |
package edu.stanford.math.plex4.unit_tests;
import java.util.ArrayList;
import java.util.List;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import edu.stanford.math.plex4.examples.PointCloudExamples;
import edu.stanford.math.plex4.homology.StreamTester;
import edu.stanford.math.plex4.metri... | __label__POS | 0.968292 |
using GLib;
namespace Version {
private int compare_version (string a, string b) {
var pa = a.split("."), pb = b.split(".");
for(int i = 0; i < int.max(pa.length, pb.length); i++) {
if(i == pa.length || int.parse(pa[i]) < int.parse(pb[i])) {
return -1;
}
... | __label__POS | 0.767966 |
package edu.stanford.math.plex4.unit_tests;
import static org.junit.Assert.assertTrue;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import edu.stanford.math.plex4.autogen.homology.ObjectAbsoluteHomology;
import edu.stanford.math.plex4.autogen.homology.ObjectRelativeHomology;
import edu.sta... | __label__POS | 0.675577 |
**[Spring Boot Caching Kickoff](https://github.com/AnghelLeonard/Hibernate-SpringBoot/tree/master/HibernateSpringBootSpringCacheEhCacheKickoff)**
**Description:** This is a SpringBoot application representing a kickoff application for Spring Boot caching and `EhCache`.
**Key points:**
- setup `EhCache`
- rely on Spri... | __label__POS | 0.851758 |
//Code from elementaryOS Switchboard plugin
//https://github.com/elementary/switchboard-plug-keyboard/blob/master/src/Shortcuts/Shortcut.vala
namespace Ui
{
// stores a shortcut, converts to gsettings format and readable format
// and checks for validity
public class Shortcut : GLib.Object
{
private Gdk.Modifier... | __label__POS | 0.910996 |
package edu.stanford.math.plex4.unit_tests;
import java.util.ArrayList;
import java.util.List;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import edu.stanford.math.plex4.api.FilteredStreamInterface;
import edu.stanford.math.plex4.api.PersistenceAlgorithmInterface;
import edu.stanford.math... | __label__POS | 0.809044 |
package com.apress.springrecipes.board;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
@Component
class TodoInitializer {
private final TodoRepository todoRepository;
TodoInitializer(TodoRepository todoRepository) {
this.todoRepository = todoRepository;
... | __label__POS | 0.849815 |
package com.apress.springrecipes.board;
import java.sql.PreparedStatement;
import java.util.List;
import javax.sql.DataSource;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.support.GeneratedKeyHolder;
import org.springfr... | __label__POS | 0.87436 |
/* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* aapt tool from the resource data it found. It
* should not be modified by hand.
*/
package com.aprilbrother.aprilbeacondemo;
public final class R {
public static final class attr {
}
public static final class... | __label__POS | 1.00001 |
using ApprovalTests.Approvers;
using ApprovalTests.Html;
using ApprovalTests.Namers;
using ApprovalTests.Reporters;
using ApprovalTests.Writers;
using ApprovalTests.Xml;
using ApprovalUtilities.CallStack;
using ApprovalUtilities.Persistence;
namespace ApprovalTests;
public class Approvals
{
static readonly Thread... | __label__POS | 0.859436 |
**[The Best Way To Clone Entities](https://github.com/AnghelLeonard/Hibernate-SpringBoot/tree/master/HibernateSpringBootCloneEntity)**
**Description:** This application is an example of cloning entities. The best way to achieve this goal relies on copy-constructors. This way we can control what we copy. Here we use a... | __label__POS | 0.896405 |
**[How To Fetch Certain Subclass From An `SINGLE_TABLE` Inheritance Hierarchy](https://github.com/AnghelLeonard/Hibernate-SpringBoot/tree/master/HibernateSpringBootSpecificSubclassFromInheritance)**
**Description:** This application is a sample of fetching a certain subclass from a `SINGLE_TABLE` inheritance hierarchy... | __label__POS | 0.819057 |
package com.apress.springrecipes.board;
import javax.annotation.PostConstruct;
import org.springframework.stereotype.Component;
@Component
class TodoInitializer {
private final TodoRepository todoRepository;
TodoInitializer(TodoRepository todoRepository) {
this.todoRepository = todoRepository;
... | __label__POS | 0.932216 |
**[`JOIN` VS. `JOIN FETCH`](https://github.com/AnghelLeonard/Hibernate-SpringBoot/tree/master/HibernateSpringBootJoinVSJoinFetch)**
**See also:**
- [How To Avoid LazyInitializationException Via JOIN FETCH](https://github.com/AnghelLeonard/Hibernate-SpringBoot/tree/master/HibernateSpringBootJoinFetch)
- [LEFT JOIN FETC... | __label__POS | 0.608837 |
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Controls;
using System.Windows;
using StoreDatabase;
using System.Reflection;
namespace DataBinding
{
public class ProductByCategoryStyleSelector : StyleSelector
{
public override Style SelectStyle(object item, Depe... | __label__POS | 0.638646 |
using System;
using System.Collections.Generic;
using System.Text;
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;
using System.Windows.Shapes;
using StoreDatabase;... | __label__POS | 0.881812 |
package com.apress.springrecipes.board;
import java.sql.PreparedStatement;
import java.util.List;
import javax.sql.DataSource;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.support.GeneratedKeyHolder;
import org.springfr... | __label__POS | 0.87436 |
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Controls;
using System.Windows;
using System.Reflection;
using StoreDatabase;
namespace DataBinding
{
public class SingleCriteriaHighlightTemplateSelector : DataTemplateSelector
{
public DataTemplate DefaultTemplate... | __label__POS | 0.871979 |
**[How To Use Spring Projections(DTO) And Right Joins](https://github.com/AnghelLeonard/Hibernate-SpringBoot/tree/master/HibernateSpringBootDtoViaRightJoins)**

**Description:** This... | __label__POS | 0.705313 |
package com.aprilbrother.aprilbeacondemo;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.animation.AlphaAnimation;
import android.widget.ImageView;
import android.widget.LinearLayout;
public class NotifyInContentActivity e... | __label__POS | 0.643924 |
package com.example;
import android.app.Application;
import com.facebook.react.ReactApplication;
import com.criticalblue.reactnative.CertPinnerPackage;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;
import com.facebook.soloader.SoLo... | __label__POS | 0.950983 |
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Media.Imaging;
using System.IO;
using System.Windows.Data;
using System.Windows.Media;
namespace DataBinding
{
public class PriceToBackgroundConverter : IValueConverter
{
public decimal MinimumPriceToHighlight
... | __label__POS | 0.820129 |
[TestFixture]
[UseReporter(typeof(DiffReporter))]
public class LockDownTests
{
public string Echo(params int[] i) =>
i.ToReadableString();
[Test]
public void TestLockDown()
{
int[] n = [1, 2];
CombinationApprovals.VerifyAllCombinations((a, b, c, d, e, f, g, h, i) => Echo(a, b, ... | __label__POS | 0.998131 |
[TestFixture]
public class FileApproverTests
{
[Test]
public void TestFailureDueToMissingApproval() =>
AssertApprover("a.txt", "non_existing_file.txt", false);
[Test]
public void TestFailureDueToMismatch() =>
AssertApprover("a.txt", "b.txt", false);
[Test]
public void TestSucc... | __label__POS | 0.663914 |
using ApprovalTests.Namers;
namespace ApprovalTests.Reporters;
public class MachineSpecificReporter : IEnvironmentAwareReporter
{
public static readonly MachineSpecificReporter INSTANCE = new();
public bool IsWorkingInThisEnvironment(string forFile)
{
var info = ApprovalsFilename.Parse(forFile);
... | __label__POS | 0.667577 |
package com.apress.prospring6.fifteen.boot;
import org.hibernate.boot.model.naming.Identifier;
import org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl;
import org.hibernate.engine.jdbc.env.spi.JdbcEnvironment;
import org.springframework.context.annotation.Bean;
import org.springframework.context.anno... | __label__POS | 0.725685 |
namespace ApprovalTests.Reporters;
[AttributeUsage(AttributeTargets.All)]
public class UseReporterAttribute : Attribute
{
public UseReporterAttribute(Type reporter) =>
Reporter = LoadReporter(reporter);
public UseReporterAttribute(params Type[] reporters) =>
Reporter = new MultiReporter(report... | __label__POS | 0.997169 |
**[How To Map To JDBC’s `LOB` Locators `Clob` And `Blob`](https://github.com/AnghelLeonard/Hibernate-SpringBoot/tree/master/HibernateSpringBootMappingLobToClobAndBlob)**
**Description:** This application is an example of mapping to JDBC's `LOB` locators `Clob` and `Blob`.
**Key points:**
- this takes advantage of JD... | __label__POS | 0.892619 |
namespace ApprovalTests.TheoryTests;
public static class ThreadSafetyTheory
{
public static void VerifyNoRaceConditions<T>(int times, Func<T> caseGenerator, Func<T, string> caseString, Func<T, object> possibleRaceConditionFunction, Func<T, object> knownGoodFunction)
{
var n1 = new ConcurrentBag<string... | __label__POS | 0.855413 |
namespace ApprovalTests.Set;
public static class SetApprovals
{
static IEnumerable<T> GetSorted<T>(IEnumerable<T> enumerable) where T:IComparable<T> =>
enumerable.OrderBy(e => e);
public static void VerifySet<T>(IEnumerable<T> enumerable, Func<T, string> formatter) where T : IComparable<T> =>
... | __label__POS | 0.996588 |
using System;
using System.Collections.Generic;
using System.Text;
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;
using System.Windows.Shapes;
namespace DataBindi... | __label__POS | 0.785493 |
#import <Kiwi/Kiwi.h>
#import "AMAECommerceSerializer.h"
#import "AMAECommerce+Internal.h"
#import "Ecommerce.pb-c.h"
#import "AMAStringEventValue.h"
#import "AMABinaryEventValue.h"
#import "AMARevenueInfoModelSerializer.h"
#import "AMARevenueInfoModel.h"
#import <AppMetricaProtobufUtils/AppMetricaProtobufUtils.h>
SP... | __label__POS | 0.750208 |
**[How To Simulate `OptimisticLockException` Shaped Via `@Version`](https://github.com/AnghelLeonard/Hibernate-SpringBoot/tree/master/HibernateSpringBootSimulateVersionedOptimisticLocking)**
**Note:** Optimistic locking via `@Version` works for detached entities as well.
**Description:** This is a Spring Boot applica... | __label__POS | 0.66215 |
using System.Net.Mail;
using ApprovalTests.Writers;
namespace ApprovalTests.Email;
public static class EmailApprovals
{
public static void Verify(MailMessage email) =>
VerifyScrubbed(email, ScrubBoundaries);
public static void VerifyScrubbed(MailMessage email, Func<string, string> scrubber)
{
... | __label__POS | 0.969596 |
namespace ApprovalTests.Approvers;
public class FileApprover(IApprovalWriter writer, IApprovalNamer namer, bool normalizeLineEndingsForTextFiles = false)
: IApprovalApprover
{
public readonly IApprovalNamer namer = namer;
public readonly bool normalizeLineEndingsForTextFiles = normalizeLineEndingsForTextFi... | __label__POS | 0.650777 |
// <copyright file="IMetricContextRegistry.cs" company="App Metrics Contributors">
// Copyright (c) App Metrics Contributors. All rights reserved.
// </copyright>
using System;
using App.Metrics.Apdex;
using App.Metrics.BucketHistogram;
using App.Metrics.BucketTimer;
using App.Metrics.Counter;
using App.Metrics.Gauge... | __label__POS | 0.754559 |
package com.apress.springrecipes.bookshop.config;
import javax.sql.DataSource;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
import org.springframework.jdbc.datasource.DriverMana... | __label__POS | 0.677564 |
// <copyright file="IMetricsRegistry.cs" company="App Metrics Contributors">
// Copyright (c) App Metrics Contributors. All rights reserved.
// </copyright>
using System;
using App.Metrics.Apdex;
using App.Metrics.BucketHistogram;
using App.Metrics.BucketTimer;
using App.Metrics.Counter;
using App.Metrics.Filters;
us... | __label__POS | 0.695989 |
package org.lambda.query;
import com.spun.util.ObjectUtils;
import com.spun.util.StringUtils;
import org.approvaltests.Approvals;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.lambda.utils.Range;
import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.List;
... | __label__POS | 0.710295 |
package org.lambda.query;
import com.spun.util.DateUtils;
import org.approvaltests.Approvals;
import org.approvaltests.utils.WithTimeZone;
import org.junit.jupiter.api.Test;
import org.lambda.query.OrderBy.Order;
import java.sql.Timestamp;
import java.util.List;
public class OrderByTest
{
@Test
public void testI... | __label__POS | 0.95541 |
package org.lambda.utils;
import com.spun.util.NumberUtils;
import com.spun.util.ThreadUtils;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;
import java.util.concurrent.TimeUnit;
import static org.junit.jupiter.api.Assertions.assertEquals;
public class OnceTest
{
public static int[] glob... | __label__POS | 0.904138 |
package com.apress.springrecipes.bookshop.config;
import javax.sql.DataSource;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.jdbc.datasource.DriverManagerDataSource;
import com.apress.springrecipes.bookshop.BookShop;
import... | __label__POS | 0.938946 |
package org.lambda.utils;
import org.approvaltests.Approvals;
import org.junit.jupiter.api.Test;
import org.lambda.functions.Function0;
public class MutableTest
{
@Test
public void exampleOfSingleElementArray()
{
// begin-snippet: single_element_array
final int[] i = {1};
Function0<Integer> counter ... | __label__POS | 0.695424 |
namespace ApprovalTests.Utilities;
public static class StackTraceScrubber
{
public static string ScrubAnonymousIds(string source)
{
var regex = new Regex(@"\w+__\w+");
return regex.Replace(source, string.Empty);
}
public static string ScrubLineNumbers(string source)
{
var r... | __label__POS | 0.998738 |
package org.lambda.functions;
import org.approvaltests.Approvals;
import org.lambda.utils.Range;
import org.approvaltests.reporters.UseReporter;
import org.approvaltests.reporters.windows.TortoiseTextDiffReporter;
import org.junit.jupiter.api.Test;
import org.lambda.query.Query;
import java.util.Arrays;
import java.u... | __label__POS | 0.977443 |
namespace ApprovalTests.Namers;
public static class ApprovalResults
{
public static IDisposable UniqueForDotNetVersion() =>
NamerFactory.AsEnvironmentSpecificTest(GetDotNetVersion());
public static string GetDotNetVersion() => "Net_v" + Environment.Version;
#if !NETFRAMEWORK
public static IDi... | __label__POS | 0.873339 |
import 'package:approval_tests/approval_tests.dart';
import 'package:test/test.dart';
void main() {
group('Fizz Buzz', () {
test("verify combinations", () {
Approvals.verifyAll(
[3, 5, 15],
options: Options(
namer: Namer(
useSubfolder: true,
),
repo... | __label__POS | 0.999224 |
// <copyright file="MetricsFormatterCollection.cs" company="App Metrics Contributors">
// Copyright (c) App Metrics Contributors. All rights reserved.
// </copyright>
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
namespace App.Metrics.Formatters
{
public class MetricsForma... | __label__POS | 0.899232 |
package com.spun.util;
import org.approvaltests.Approvals;
import org.junit.jupiter.api.Test;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
import static org.junit.jupiter.api.Assertions.assertEquals;
public class ArrayU... | __label__POS | 0.989856 |
package com.apress.springrecipes.bookshop;
import org.springframework.jdbc.core.support.JdbcDaoSupport;
import org.springframework.transaction.TransactionStatus;
import org.springframework.transaction.support.TransactionCallbackWithoutResult;
import org.springframework.transaction.support.TransactionTemplate;
public... | __label__POS | 0.608417 |
// <copyright file="EnvFormatterCollection.cs" company="App Metrics Contributors">
// Copyright (c) App Metrics Contributors. All rights reserved.
// </copyright>
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
namespace App.Metrics.Formatters
{
public class EnvFormatterColl... | __label__POS | 0.90292 |
**[How To Execute SQL Functions In `WHERE` Part Of JPQL Query And JPA 2.1](https://github.com/AnghelLeonard/Hibernate-SpringBoot/tree/master/HibernateSpringBootJpqlFunctionsParams)**
Note: Using SQL functions in `SELECT` part (not in `WHERE` part) of the query can be done as [here](https://github.com/AnghelLeonard/Hib... | __label__POS | 0.750655 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
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;
using System.Windows.Shapes;
... | __label__POS | 0.989685 |
require 'approvals/rspec'
shared_context 'verify examples' do
specify "a string" do
verify do
"We have, I fear, confused power with greatness."
end
end
specify "an array" do
verify do
array = [
"abc",
123,
:zomg_fooooood,
%w(cheese burger ribs steak bacon)... | __label__POS | 0.882332 |
package com.spun.util;
import org.approvaltests.utils.WithTimeZone;
import org.junit.jupiter.api.Test;
import java.sql.Timestamp;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.time.Month;
import java.time.ZoneOffset;
import java.util.Calendar;
import j... | __label__POS | 0.814499 |
using ApprovalUtilities.CallStack;
namespace ApprovalTests.ExceptionalExceptions;
public class Exceptional : Exception
{
public static T Create<T>(string formattableMessage, params object[] messageParameters)
where T : Exception =>
Create<T>(null, formattableMessage, messageParameters);
publi... | __label__POS | 0.747691 |
package com.apress.springrecipes.bookshop.config;
import javax.sql.DataSource;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
import org.springframework.jdbc.datasource.DriverMana... | __label__POS | 0.774118 |
// <copyright file="MetricsReporterCollection.cs" company="App Metrics Contributors">
// Copyright (c) App Metrics Contributors. All rights reserved.
// </copyright>
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using App.Metrics.Reporting;
namespace App.Metrics.Formatters
{
... | __label__POS | 0.839674 |
package com.spun.util;
import org.junit.jupiter.api.Test;
import java.util.ArrayList;
public class GenericTest
{
@SuppressWarnings({"unchecked", "rawtypes"})
@Test
public void test()
{
ArrayList<Integer> ints = new ArrayList<Integer>();
ints.add(1);
ArrayList<Number> nums = new ArrayList<Number>(... | __label__POS | 0.994799 |
// <copyright file="MetricsFormatterReadonlyCollectionExtensions.cs" company="App Metrics Contributors">
// Copyright (c) App Metrics Contributors. All rights reserved.
// </copyright>
using System;
using System.Collections.Generic;
using System.Linq;
namespace App.Metrics.Formatters
{
public static class Metric... | __label__POS | 0.977374 |
module Approvals
module Reporters
module Launcher
REPORTERS = [:opendiff, :diffmerge, :vimdiff, :tortoisediff, :filelauncher]
module_function
def memoized(instance_variable)
unless self.instance_variable_get(instance_variable)
value = yield
self.instance_variable_se... | __label__POS | 0.920429 |
package com.spun.util;
import org.junit.jupiter.api.Test;
import org.lambda.functions.Functions;
import org.lambda.query.Queryable;
import java.io.File;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Date;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.j... | __label__POS | 0.671728 |
namespace ApprovalTests.Core.Exceptions;
public class ApprovalException(string received, string approved) : Exception
{
public string Received { get; } = received;
public string Approved { get; } = approved;
protected bool Equals(ApprovalException other) => string.Equals(Approved, other.Approved) && stri... | __label__POS | 0.946437 |
package com.spun.util;
import org.junit.jupiter.api.Test;
import java.io.File;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.A... | __label__POS | 0.961146 |
using System.Net;
using ApprovalUtilities.Persistence;
namespace ApprovalTests.WebApi.MicrosoftHttpClient;
public abstract class RestQuery<T> : IExecutableQuery, ILoader<T>
{
public abstract string GetQuery();
public abstract string GetBaseAddress();
public string ExecuteQuery(string query)
{
... | __label__POS | 0.791532 |
package com.spun.util;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
public class SearchingFileFilterTest
{
@Test
public void testStar() throws ... | __label__POS | 0.99719 |
#pragma once
#include <string>
#include <vector>
namespace ApprovalTests
{
class HelpMessages
{
public:
static std::string getMisconfiguredBuildHelp(const std::string& fileName);
static std::string getMisconfiguredMainHelp();
static std::string getUnconfiguredRootDirectory();
... | __label__POS | 0.912975 |
package com.spun.util;
import org.junit.jupiter.api.Test;
import org.lambda.query.OrderBy;
import java.util.ArrayList;
import java.util.Arrays;
import static org.junit.jupiter.api.Assertions.assertEquals;
public class OrderByTest
{
@Test
public void test()
{
assertUseCase(new String[]{"Bob", "Alice", "Cha... | __label__POS | 0.924261 |
package com.apress.springrecipes.bookshop.config;
import javax.sql.DataSource;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
import org.springframework.jdbc.datasource.DriverMana... | __label__POS | 0.856495 |
package com.spun.util.date;
import com.spun.util.DateUtils;
import org.approvaltests.Approvals;
import org.approvaltests.utils.WithTimeZone;
import org.junit.jupiter.api.Test;
import org.lambda.query.Query;
import java.sql.Timestamp;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar... | __label__POS | 0.788449 |
<?php
ob_start("ob_gzhandler");
header('Content-Type: text/javascript; charset=UTF-8');
include('../ac.fry.data.calendar.js');
include('../ac.fry.ui.support.js');
include('../ac.fry.ui.form.js');
include('../widget/ac.menu.js');
include('../widget/ac.searchbox.js');
include('../widget/ac.window.js');
inclu... | __label__POS | 0.802014 |
**[How To Use Spring Projections(DTO) And Exclusive Right Joins](https://github.com/AnghelLeonard/Hibernate-SpringBoot/tree/master/HibernateSpringBootDtoViaRightExcludingJoins)**

{
SQLQuery query = new SQLQuery();
query.addS... | __label__POS | 0.997105 |
using System.Runtime.CompilerServices;
namespace ApprovalUtilities.Reflection;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Reflection;
public static class ReflectionUtilities
{
const BindingFlags NonPublicInstance = BindingFlags.NonPublic | Binding... | __label__POS | 0.829881 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.