content stringlengths 263 5.24M | pred_label stringclasses 1
value | pred_score_pos float64 0.6 1 |
|---|---|---|
/// This normally would be deployed to a different address, in a different package,
/// but this keeps it simple for this demo.
module deploy_addr::cheater {
use std::signer;
use deploy_addr::dice_roll;
/// I didn't win, so I'm going to skip paying the fee
const E_LOST: u64 = 1;
/// This is an ex... | __label__POS | 0.753395 |
<?php
namespace Appwrite;
/**
* Helper class to generate role strings for Permission.
*/
class Role
{
/**
* Grants access to anyone.
*
* This includes authenticated and unauthenticated users.
*
* @return string
*/
public static function any(): string
{
return 'any'... | __label__POS | 0.987721 |
<?php
namespace Appwrite;
class InputFile {
private ?string $data;
private ?string $mimeType;
private ?string $filename;
private ?string $path;
public function __construct(){}
public function getData(): ?string
{
return $this->data;
}
public function getPath(): ?string
... | __label__POS | 0.860393 |
package io.apptik.comm.jus;
import org.json.JSONArray;
import org.json.JSONObject;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.RobolectricGradleTestRunner;
import org.robolectric.annotation.Config;
import io.apptik.comm.jus.converter.JSONConverter;
import io.apptik.comm.jus.http.HTT... | __label__POS | 0.776783 |
/**
* Copyright (c) 2005-2013 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Eclipse Public License (EPL).
* Please see the license.txt included with this distribution for details.
* Any modifications to this file must keep this entire header intact.
*/
/*
* Created on 24/07/2005
*/... | __label__POS | 0.907348 |
<?php
namespace Appwrite\Enums;
use JsonSerializable;
class MessagingProviderType implements JsonSerializable
{
private static MessagingProviderType $EMAIL;
private static MessagingProviderType $SMS;
private static MessagingProviderType $PUSH;
private string $value;
private function __construct... | __label__POS | 0.999622 |
<?php
namespace Appwrite\Enums;
use JsonSerializable;
class IndexType implements JsonSerializable
{
private static IndexType $KEY;
private static IndexType $FULLTEXT;
private static IndexType $UNIQUE;
private static IndexType $SPATIAL;
private string $value;
private function __construct(str... | __label__POS | 0.99965 |
<?php
namespace Appwrite\Enums;
use JsonSerializable;
class IndexStatus implements JsonSerializable
{
private static IndexStatus $AVAILABLE;
private static IndexStatus $PROCESSING;
private static IndexStatus $DELETING;
private static IndexStatus $STUCK;
private static IndexStatus $FAILED;
pr... | __label__POS | 0.999828 |
package com.apress.springrecipes.calculator;
import java.util.Arrays;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
@Aspect
@C... | __label__POS | 0.608411 |
<?php
namespace Appwrite\Enums;
use JsonSerializable;
class ExecutionStatus implements JsonSerializable
{
private static ExecutionStatus $WAITING;
private static ExecutionStatus $PROCESSING;
private static ExecutionStatus $COMPLETED;
private static ExecutionStatus $FAILED;
private string $value;... | __label__POS | 0.999737 |
/**
* Copyright (c) 2005-2012 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Eclipse Public License (EPL).
* Please see the license.txt included with this distribution for details.
* Any modifications to this file must keep this entire header intact.
*/
/*
* Created on 24/07/2005
*/... | __label__POS | 0.999096 |
<?php
namespace Appwrite\Enums;
use JsonSerializable;
class AuthenticationFactor implements JsonSerializable
{
private static AuthenticationFactor $EMAIL;
private static AuthenticationFactor $PHONE;
private static AuthenticationFactor $TOTP;
private static AuthenticationFactor $RECOVERYCODE;
pri... | __label__POS | 0.999764 |
<?php
namespace Appwrite\Enums;
use JsonSerializable;
class Runtime implements JsonSerializable
{
private static Runtime $NODE145;
private static Runtime $NODE160;
private static Runtime $NODE180;
private static Runtime $NODE190;
private static Runtime $NODE200;
private static Runtime $NODE21... | __label__POS | 0.999954 |
<?php
namespace Appwrite\Enums;
use JsonSerializable;
class ExecutionTrigger implements JsonSerializable
{
private static ExecutionTrigger $HTTP;
private static ExecutionTrigger $SCHEDULE;
private static ExecutionTrigger $EVENT;
private string $value;
private function __construct(string $value)... | __label__POS | 0.999663 |
<?php
namespace Appwrite\Enums;
use JsonSerializable;
class Compression implements JsonSerializable
{
private static Compression $NONE;
private static Compression $GZIP;
private static Compression $ZSTD;
private string $value;
private function __construct(string $value)
{
$this->val... | __label__POS | 0.999442 |
package com.apress.springrecipes.calculator;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
@Aspect
public class ComplexCachingAspect {
private Map<String, Com... | __label__POS | 0.967834 |
<?php
namespace Appwrite\Enums;
use JsonSerializable;
class MessageStatus implements JsonSerializable
{
private static MessageStatus $DRAFT;
private static MessageStatus $PROCESSING;
private static MessageStatus $SCHEDULED;
private static MessageStatus $SENT;
private static MessageStatus $FAILED;... | __label__POS | 0.999817 |
<?php
namespace Appwrite\Enums;
use JsonSerializable;
class RelationshipType implements JsonSerializable
{
private static RelationshipType $ONETOONE;
private static RelationshipType $MANYTOONE;
private static RelationshipType $MANYTOMANY;
private static RelationshipType $ONETOMANY;
private strin... | __label__POS | 0.999757 |
<?php
namespace Appwrite\Enums;
use JsonSerializable;
class ImageGravity implements JsonSerializable
{
private static ImageGravity $CENTER;
private static ImageGravity $TOPLEFT;
private static ImageGravity $TOP;
private static ImageGravity $TOPRIGHT;
private static ImageGravity $LEFT;
private... | __label__POS | 0.999921 |
<?php
namespace Appwrite\Enums;
use JsonSerializable;
class AttributeStatus implements JsonSerializable
{
private static AttributeStatus $AVAILABLE;
private static AttributeStatus $PROCESSING;
private static AttributeStatus $DELETING;
private static AttributeStatus $STUCK;
private static Attribut... | __label__POS | 0.999836 |
<?php
namespace Appwrite\Enums;
use JsonSerializable;
class ColumnStatus implements JsonSerializable
{
private static ColumnStatus $AVAILABLE;
private static ColumnStatus $PROCESSING;
private static ColumnStatus $DELETING;
private static ColumnStatus $STUCK;
private static ColumnStatus $FAILED;
... | __label__POS | 0.999821 |
package com.apress.springrecipes.sequence;
import java.util.concurrent.atomic.AtomicInteger;
public class SequenceGenerator {
private PrefixGenerator prefixGenerator;
private String suffix;
private int initial;
private final AtomicInteger counter = new AtomicInteger();
public SequenceGenerator() ... | __label__POS | 0.843881 |
<?php
namespace Appwrite\Enums;
use JsonSerializable;
class ExecutionMethod implements JsonSerializable
{
private static ExecutionMethod $GET;
private static ExecutionMethod $POST;
private static ExecutionMethod $PUT;
private static ExecutionMethod $PATCH;
private static ExecutionMethod $DELETE;
... | __label__POS | 0.999902 |
<?php
namespace Appwrite\Enums;
use JsonSerializable;
class CreditCard implements JsonSerializable
{
private static CreditCard $AMERICANEXPRESS;
private static CreditCard $ARGENCARD;
private static CreditCard $CABAL;
private static CreditCard $CENCOSUD;
private static CreditCard $DINERSCLUB;
... | __label__POS | 0.999925 |
<?php
namespace Appwrite\Enums;
use JsonSerializable;
class Name implements JsonSerializable
{
private static Name $V1DATABASE;
private static Name $V1DELETES;
private static Name $V1AUDITS;
private static Name $V1MAILS;
private static Name $V1FUNCTIONS;
private static Name $V1STATSRESOURCES;... | __label__POS | 0.99999 |
<?php
namespace Appwrite\Enums;
use JsonSerializable;
class OAuthProvider implements JsonSerializable
{
private static OAuthProvider $AMAZON;
private static OAuthProvider $APPLE;
private static OAuthProvider $AUTH0;
private static OAuthProvider $AUTHENTIK;
private static OAuthProvider $AUTODESK;
... | __label__POS | 0.999977 |
spec aptos_std::math64 {
spec max(a: u64, b: u64): u64 {
aborts_if false;
ensures a >= b ==> result == a;
ensures a < b ==> result == b;
}
spec min(a: u64, b: u64): u64 {
aborts_if false;
ensures a < b ==> result == a;
ensures a >= b ==> result == b;
}
... | __label__POS | 0.73369 |
<?php
namespace Appwrite\Enums;
use JsonSerializable;
class Flag implements JsonSerializable
{
private static Flag $AFGHANISTAN;
private static Flag $ANGOLA;
private static Flag $ALBANIA;
private static Flag $ANDORRA;
private static Flag $UNITEDARABEMIRATES;
private static Flag $ARGENTINA;
... | __label__POS | 0.999943 |
<?php
namespace Appwrite\Enums;
use JsonSerializable;
class BuildRuntime implements JsonSerializable
{
private static BuildRuntime $NODE145;
private static BuildRuntime $NODE160;
private static BuildRuntime $NODE180;
private static BuildRuntime $NODE190;
private static BuildRuntime $NODE200;
... | __label__POS | 0.99998 |
<?php
namespace Appwrite\Enums;
use JsonSerializable;
class Framework implements JsonSerializable
{
private static Framework $ANALOG;
private static Framework $ANGULAR;
private static Framework $NEXTJS;
private static Framework $REACT;
private static Framework $NUXT;
private static Framework ... | __label__POS | 0.999706 |
<?php
namespace Appwrite\Enums;
use JsonSerializable;
class SmtpEncryption implements JsonSerializable
{
private static SmtpEncryption $NONE;
private static SmtpEncryption $SSL;
private static SmtpEncryption $TLS;
private string $value;
private function __construct(string $value)
{
... | __label__POS | 0.999641 |
<?php
namespace Appwrite\Enums;
use JsonSerializable;
class RelationMutate implements JsonSerializable
{
private static RelationMutate $CASCADE;
private static RelationMutate $RESTRICT;
private static RelationMutate $SETNULL;
private string $value;
private function __construct(string $value)
... | __label__POS | 0.999592 |
<?php
namespace Appwrite\Enums;
use JsonSerializable;
class VCSDeploymentType implements JsonSerializable
{
private static VCSDeploymentType $BRANCH;
private static VCSDeploymentType $COMMIT;
private static VCSDeploymentType $TAG;
private string $value;
private function __construct(string $valu... | __label__POS | 0.999607 |
<?php
namespace Appwrite\Enums;
use JsonSerializable;
class HealthAntivirusStatus implements JsonSerializable
{
private static HealthAntivirusStatus $DISABLED;
private static HealthAntivirusStatus $OFFLINE;
private static HealthAntivirusStatus $ONLINE;
private string $value;
private function __... | __label__POS | 0.999671 |
package com.apress.springrecipes.shop;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.GenericXmlApplicationContext;
public class Main {
public static void main(String[] args) throws Exception {
ApplicationContext context =
new GenericXmlA... | __label__POS | 0.994008 |
<?php
namespace Appwrite\Enums;
use JsonSerializable;
class DeploymentStatus implements JsonSerializable
{
private static DeploymentStatus $WAITING;
private static DeploymentStatus $PROCESSING;
private static DeploymentStatus $BUILDING;
private static DeploymentStatus $READY;
private static Deplo... | __label__POS | 0.999834 |
<?php
namespace Appwrite\Enums;
use JsonSerializable;
class PasswordHash implements JsonSerializable
{
private static PasswordHash $SHA1;
private static PasswordHash $SHA224;
private static PasswordHash $SHA256;
private static PasswordHash $SHA384;
private static PasswordHash $SHA512224;
priv... | __label__POS | 0.999886 |
<?php
namespace Appwrite\Enums;
use JsonSerializable;
class ImageFormat implements JsonSerializable
{
private static ImageFormat $JPG;
private static ImageFormat $JPEG;
private static ImageFormat $PNG;
private static ImageFormat $WEBP;
private static ImageFormat $HEIC;
private static ImageFor... | __label__POS | 0.999817 |
<?php
namespace Appwrite\Enums;
use JsonSerializable;
class Browser implements JsonSerializable
{
private static Browser $AVANTBROWSER;
private static Browser $ANDROIDWEBVIEWBETA;
private static Browser $GOOGLECHROME;
private static Browser $GOOGLECHROMEIOS;
private static Browser $GOOGLECHROMEMO... | __label__POS | 0.999887 |
pragma circom 2.2.2;
/**
* Outputs an array of bits containing the N-bit representation of the input number, with
* the most significant bit first and the least signficant last (opposite of Num2Bits).
*
* This effectively acts as a range check for the input number being in [0, 2^N).
*
* @param N correctness ... | __label__POS | 0.66616 |
<?php
namespace Appwrite\Services;
use Appwrite\AppwriteException;
use Appwrite\Client;
use Appwrite\Service;
use Appwrite\InputFile;
use Appwrite\Enums\RelationshipType;
use Appwrite\Enums\RelationMutate;
use Appwrite\Enums\IndexType;
class TablesDB extends Service
{
public function __construct(Client $client)... | __label__POS | 0.869961 |
spec aptos_std::math128 {
spec max(a: u128, b: u128): u128 {
aborts_if false;
ensures a >= b ==> result == a;
ensures a < b ==> result == b;
}
spec min(a: u128, b: u128): u128 {
aborts_if false;
ensures a < b ==> result == a;
ensures a >= b ==> result == b;
... | __label__POS | 0.927064 |
<?php
namespace Appwrite\Services;
use Appwrite\AppwriteException;
use Appwrite\Client;
use Appwrite\Service;
use Appwrite\InputFile;
use Appwrite\Enums\Name;
class Health extends Service
{
public function __construct(Client $client)
{
parent::__construct($client);
}
/**
* Check the... | __label__POS | 0.721747 |
<?php
namespace Tests\E2E;
use Exception;
class Client
{
const METHOD_GET = 'GET';
const METHOD_POST = 'POST';
const METHOD_PUT = 'PUT';
const METHOD_PATCH = 'PATCH';
const METHOD_DELETE = 'DELETE';
const METHOD_HEAD = 'HEAD';
const METHOD_OPTIONS = 'OPTIONS';
const METHOD_CONNECT = '... | __label__POS | 0.725307 |
<?php
namespace Appwrite\Services;
use Appwrite\AppwriteException;
use Appwrite\Client;
use Appwrite\Service;
use Appwrite\InputFile;
use Appwrite\Enums\Framework;
use Appwrite\Enums\BuildRuntime;
use Appwrite\Enums\Adapter;
use Appwrite\Enums\VCSDeploymentType;
use Appwrite\Enums\DeploymentDownloadType;
class Sites... | __label__POS | 0.660039 |
<?php
namespace Appwrite\Services;
use Appwrite\AppwriteException;
use Appwrite\Client;
use Appwrite\Service;
use Appwrite\InputFile;
class Graphql extends Service
{
public function __construct(Client $client)
{
parent::__construct($client);
}
/**
* Execute a GraphQL mutation.
... | __label__POS | 0.943644 |
/**
* Author: Michael Straka, Alin Tomescu
*/
pragma circom 2.2.2;
include "../packing/ChunksToFieldElems.circom";
include "../packing/AssertIs64BitLimbs.circom";
include "circomlib/circuits/poseidon.circom";
// Hashes multiple 64-bit limbs to a field element using a Poseidon hash.
//
// We hash the length of the ... | __label__POS | 0.64727 |
// Copyright 2013 Square, Inc.
package io.apptik.comm.jus.retro;
import org.junit.Test;
import java.util.Set;
import static org.assertj.core.api.Assertions.assertThat;
public final class RequestFactoryParserTest {
@Test
public void pathParameterParsing() throws Exception {
expectParams("/");
expectParam... | __label__POS | 0.785586 |
spec aptos_std::string_utils {
spec to_string<T>(s: &T): String {
aborts_if false;
ensures result == spec_native_format(s, false, false, true, false);
}
spec to_string_with_canonical_addresses<T>(s: &T): String {
aborts_if false;
ensures result == spec_native_format(s, false... | __label__POS | 0.650086 |
<?php
namespace Appwrite\Services;
use Appwrite\AppwriteException;
use Appwrite\Client;
use Appwrite\Service;
use Appwrite\InputFile;
use Appwrite\Enums\Runtime;
use Appwrite\Enums\VCSDeploymentType;
use Appwrite\Enums\DeploymentDownloadType;
use Appwrite\Enums\ExecutionMethod;
class Functions extends Service
{
... | __label__POS | 0.739018 |
import Foundation
enum QueryValue: Codable {
case string(String)
case int(Int)
case double(Double)
case bool(Bool)
case query(Query)
case array([QueryValue]) // for nested arrays
init(from decoder: Decoder) throws {
let container = try decoder.singleValueContainer()
if l... | __label__POS | 0.886766 |
<?php
namespace Appwrite\Services;
use Appwrite\AppwriteException;
use Appwrite\Client;
use Appwrite\Service;
use Appwrite\InputFile;
class Tokens extends Service
{
public function __construct(Client $client)
{
parent::__construct($client);
}
/**
* List all the tokens created for a ... | __label__POS | 0.831506 |
package com.apress.springrecipes.shop;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.GenericXmlApplicationContext;
public class Main {
public static void main(String[] args) throws Exception {
ApplicationContext context =
new GenericXmlA... | __label__POS | 0.994008 |
package com.apress.springrecipes.shop;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.util.Date;
public class Cashier {
private String fileName;
private String path;
private BufferedWriter w... | __label__POS | 0.698967 |
<?php
namespace Appwrite\Services;
use Appwrite\AppwriteException;
use Appwrite\Client;
use Appwrite\Service;
use Appwrite\InputFile;
class Teams extends Service
{
public function __construct(Client $client)
{
parent::__construct($client);
}
/**
* Get a list of all the teams in whic... | __label__POS | 0.634806 |
<?php
namespace Appwrite\Services;
use Appwrite\AppwriteException;
use Appwrite\Client;
use Appwrite\Service;
use Appwrite\InputFile;
class Locale extends Service
{
public function __construct(Client $client)
{
parent::__construct($client);
}
/**
* Get the current user location base... | __label__POS | 0.673495 |
package com.apress.springrecipes.shop.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import com.apress.springrecipes.shop.AuditCheckBeanPostProcessor;
import com.apress.springrecipes.shop.Battery;
import com.apress.springrecipes.shop.Cashier;
i... | __label__POS | 0.87517 |
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.991905 |
<?php
namespace Tests;
class Go118Test extends Base
{
protected string $sdkName = 'go';
protected string $sdkPlatform = 'server';
protected string $sdkLanguage = 'go';
protected string $version = '0.0.1';
protected string $language = 'go';
protected string $class = 'Appwrite\SDK\Language\Go';... | __label__POS | 0.632571 |
<?php
namespace Tests;
class DotNet90Test extends Base
{
protected string $sdkName = 'dotnet';
protected string $sdkPlatform = 'server';
protected string $sdkLanguage = 'dotnet';
protected string $version = '0.0.1';
protected string $language = 'dotnet';
protected string $class = 'Appwrite\SD... | __label__POS | 0.659414 |
package com.apress.springrecipes.shop;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import com.apress.springrecipes.shop.config.ShopConfiguration;
public class Main {
public static void main(String[] args) throws Excepti... | __label__POS | 0.990664 |
pragma circom 2.2.2;
include "./AssertIsAsciiDigits.circom";
// Given a string of digits in ASCII format, returns the digits represented as a single field element
// Assumes:
// - the number represented by the ASCII `digits` is smaller than the scalar field used by the circuit
// - `digits` contains only ASCII digit ... | __label__POS | 0.800214 |
package com.apress.springrecipes.shop.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import com.apress.springrecipes.shop.Battery;
import com.apress.springrecipes.shop.Cashier;
import... | __label__POS | 0.891661 |
pragma circom 2.2.2;
include "./SingleOneArray.circom";
include "./SingleNegOneArray.circom";
include "../../stdlib/functions/assert_bits_fit_scalar.circom";
include "../../stdlib/functions/min_num_bits.circom";
include "circomlib/circuits/bitify.circom";
include "circomlib/circuits/comparators.circom";
// Outputs ... | __label__POS | 0.778483 |
import java.util.HashMap;
import java.util.Map;
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.JsonNode;
import com.mashape.unirest.http.Unirest;
import com.mashape.unirest.http.exceptions.UnirestException;
import org.json.JSONObject;
public class GenerateUnsplashImage{
private sta... | __label__POS | 0.993757 |
pragma circom 2.2.2;
// File copied from https://github.com/doubleblind-xyz/circom-rsa/blob/master/circuits/bigint_func.circom
function div_ceil(m, n) {
var ret = 0;
if (m % n == 0) {
ret = m \ n;
} else {
ret = m \ n + 1;
}
return ret;
}
function log_ceil(n) {
var n_temp = n;
... | __label__POS | 0.835171 |
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.JsonNode;
import com.mashape.unirest.http.Unirest;
import com.mashape.unirest.http.exceptions.UnirestException;
public class GenerateGiphyGif {
private static String GIPHY_API_KEY;
public static void main(String[] args) {
G... | __label__POS | 0.997281 |
<?php
namespace Tests;
class AppleSwift56Test extends Base
{
protected string $sdkName = 'swift';
protected string $sdkPlatform = 'client';
protected string $sdkLanguage = 'apple';
protected string $version = '0.0.1';
protected string $language = 'apple';
protected string $class = 'Appwrite\S... | __label__POS | 0.845961 |
<?php
namespace Tests;
class DotNet80Test extends Base
{
protected string $sdkName = 'dotnet';
protected string $sdkPlatform = 'server';
protected string $sdkLanguage = 'dotnet';
protected string $version = '0.0.1';
protected string $language = 'dotnet';
protected string $class = 'Appwrite\SD... | __label__POS | 0.660401 |
<?php
namespace Tests;
class Go112Test extends Base
{
protected string $sdkName = 'go';
protected string $sdkPlatform = 'server';
protected string $sdkLanguage = 'go';
protected string $version = '0.0.1';
protected string $language = 'go';
protected string $class = 'Appwrite\SDK\Language\Go';... | __label__POS | 0.630125 |
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;
import com.mashape.unirest.http.exceptions.UnirestException;
import org.json.JSONObject;
public class WelcomeEmail {
private static String YOUR_DOMAIN_NAME;
private static String API_KEY;
public static void main(String... | __label__POS | 0.737371 |
import com.sun.source.tree.ContinueTree;
import io.appwrite.Client;
import io.appwrite.exceptions.AppwriteException;
import io.appwrite.services.Database;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.ContinuationInterceptor;
import kotlin.coroutines.CoroutineContext;
import kotlin.coroutines.EmptyCor... | __label__POS | 0.827855 |
<?php
namespace Tests;
class DotNet60Test extends Base
{
protected string $sdkName = 'dotnet';
protected string $sdkPlatform = 'server';
protected string $sdkLanguage = 'dotnet';
protected string $version = '0.0.1';
protected string $language = 'dotnet';
protected string $class = 'Appwrite\SD... | __label__POS | 0.664861 |
<?php
namespace Tests;
class Swift56Test extends Base
{
protected string $sdkName = 'swift';
protected string $sdkPlatform = 'server';
protected string $sdkLanguage = 'swift';
protected string $version = '0.0.1';
protected string $language = 'swift';
protected string $class = 'Appwrite\SDK\La... | __label__POS | 0.833182 |
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.Message;
import com.twilio.type.PhoneNumber;
import org.json.JSONObject;
public class SendSms {
// Getting the user credentials
public static final String ACCOUNT_SID = Syste... | __label__POS | 0.849633 |
namespace Polly.Utils;
#pragma warning disable CA1716 // Identifiers should not match keywords
internal abstract partial class CancellationTokenSourcePool
{
public static CancellationTokenSourcePool Create(TimeProvider timeProvider)
{
#if NET8_0_OR_GREATER
if (timeProvider == TimeProvider.System)
... | __label__POS | 0.748401 |
package com.apress.springrecipes.sequence;
import java.util.concurrent.atomic.AtomicInteger;
import org.springframework.beans.factory.annotation.Autowired;
public class SequenceGenerator {
@Autowired
private PrefixGenerator[] prefixGenerators;
private String suffix;
private int initial;
private A... | __label__POS | 0.688167 |
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import ja... | __label__POS | 0.649441 |
/**
* Faster quicksort using a stack to eliminate recursion, sorting inplace to reduce memory usage, and using insertion sort for small partition sizes.
*
* Original author unknown.
* I (Ewout Stortenbeker) isolated the fast quicksort code from benchmark (see below), ported to TypeScript and added custom sort funct... | __label__POS | 0.848797 |
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 |
spec aptos_std::big_vector {
// -----------------
// Data invariants
// -----------------
spec BigVector {
invariant bucket_size != 0;
invariant spec_table_len(buckets) == 0 ==> end_index == 0;
invariant end_index == 0 ==> spec_table_len(buckets) == 0;
invariant end_inde... | __label__POS | 0.929096 |
import com.messagebird.exceptions.NotFoundException;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;
import com.messagebird.MessageBirdClient;
import com.messagebird.MessageBirdService;
import com.messagebird.MessageBirdServiceImpl;
import com.... | __label__POS | 0.63084 |
<?php
namespace Utopia\MockServer\Utopia;
use Utopia\Database\Document;
abstract class Model
{
public const TYPE_STRING = 'string';
public const TYPE_INTEGER = 'integer';
public const TYPE_FLOAT = 'double';
public const TYPE_BOOLEAN = 'boolean';
public const TYPE_JSON = 'json';
public const T... | __label__POS | 0.919145 |
import com.messagebird.MessageBirdClient;
import com.messagebird.MessageBirdService;
import com.messagebird.MessageBirdServiceImpl;
import com.messagebird.exceptions.GeneralException;
import com.messagebird.exceptions.UnauthorizedException;
import com.messagebird.objects.MessageResponse;
import org.json.JSONObject;
im... | __label__POS | 0.894371 |
import io.appwrite.Client;
import io.appwrite.exceptions.AppwriteException;
import io.appwrite.services.Database;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.CoroutineContext;
import kotlin.coroutines.EmptyCoroutineContext;
import okhttp3.Response;
import org.jetbrains.annotations.NotNull;
import or... | __label__POS | 0.908424 |
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.JsonNode;
import com.mashape.unirest.http.Unirest;
import com.mashape.unirest.http.exceptions.UnirestException;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.io.IOExce... | __label__POS | 0.682855 |
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.util.function.Consumer;
public class Main {
... | __label__POS | 0.764456 |
import com.amazonaws.auth.BasicAWSCredentials;
import com.amazonaws.services.s3.AmazonS3Client;
import com.amazonaws.services.s3.model.ObjectMetadata;
import com.amazonaws.services.s3.model.PutObjectResult;
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.JsonNode;
import com.mashape.unires... | __label__POS | 0.772471 |
package com.apress.springrecipes.shop;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import com.apress.springrecipes.shop.config.ShopConfiguration;
public class Main {
public static void main(String[] args) throws Excepti... | __label__POS | 0.994886 |
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.ArrayList;
public class GetCo... | __label__POS | 0.97134 |
import com.stripe.Stripe;
import com.stripe.exception.StripeException;
import com.stripe.model.PaymentIntent;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;
public class GetStripePaymentStatus {
public static String fetchEnvironmentVariab... | __label__POS | 0.997695 |
<nav id="nav" class="main-side">
<div class="side-nav">
<div class="side-nav-level-1 is-narrow">
<div class="side-nav-main">
<section class="drop-section">
<button class="open-nav is-not-desktop">OPEN NAV</button>
<ul class="drop-list">
... | __label__POS | 0.95178 |
package com.bookstore.dao;
import java.io.Serializable;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import org.hibernate.Session;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;
@Repository
@Transactional(readO... | __label__POS | 0.949614 |
package query
import (
"encoding/json"
)
func toArray(val interface{}) []interface{} {
switch v := val.(type) {
case nil:
return nil
case []interface{}:
return v
default:
return []interface{}{val}
}
}
type queryOptions struct {
Method string
Attribute *string
Values *[]interface{}
}
func parseQ... | __label__POS | 0.915877 |
/**
* Copyright (c) 2005-2013 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Eclipse Public License (EPL).
* Please see the license.txt included with this distribution for details.
* Any modifications to this file must keep this entire header intact.
*/
package com.python.pydev.analys... | __label__POS | 0.830558 |
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.950352 |
package com.apress.springrecipes.shop;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import com.apress.springrecipes.shop.config.ShopConfiguration;
public class Main {
public static void main(String[] args) throws Excepti... | __label__POS | 0.990664 |
### 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 |
package com.apress.springrecipes.shop.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import com.apress.springrecipes.shop.Battery;
import com.apress.springrecipes.shop.Cashier;
import... | __label__POS | 0.891661 |
<a id="0x1_reconfiguration_with_dkg"></a>
# Module `0x1::reconfiguration_with_dkg`
Reconfiguration with DKG helper functions.
- [Function `try_start`](#0x1_reconfiguration_with_dkg_try_start)
- [Function `finish`](#0x1_reconfiguration_with_dkg_finish)
- [Function `finish_with_dkg_result`](#0x1_reconfiguration_w... | __label__POS | 0.979548 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.