content stringlengths 263 5.24M | pred_label stringclasses 1
value | pred_score_pos float64 0.6 1 |
|---|---|---|
import * as fs from 'fs';
import * as path from 'path';
import * as vscode from 'vscode';
import { recordCompletionItemProvider } from '@appworks/recorder';
import { getFocusCodeInfo } from '../getFocusCodeInfo';
function unique(arr: string[]) {
return Array.from(new Set(arr));
}
function provideCompletionItems(doc... | __label__POS | 0.705085 |
# Accessibility value - Flutter
With Flutter, you can set an accessibility value by using the `value` or `attributedValue` property of [`Semantics`](https://api.flutter.dev/flutter/widgets/Semantics/Semantics.html).
When using the semantically correct element, you usually do not need to modify the accessibility value... | __label__POS | 0.616895 |
# Keyboard order - iOS
On iOS, you can use the [`accessibilityRespondsToUserInteraction`](https://developer.apple.com/documentation/objectivec/nsobject/3043551-accessibilityrespondstouserinter) attribute to optimize keyboard navigation. By setting the property to `false`, the element will be skipped with keyboard navi... | __label__POS | 0.887632 |
# Keyboard order - Android
On Android, you can use several `focus` properties to modify the keyboard focus order.
- [`android:nextFocusForward`](https://developer.android.com/reference/android/view/View#attr_android:nextFocusForward): set the next element to move focus to.
- [`android:nextFocusUp`](https://developer.... | __label__POS | 0.970219 |
<!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_74) on Wed Oct 12 12:22:03 CEST 2016 -->
<title>Index (roxy-rxjava1 API)</title>
<meta name="date" content="2016-10-12">
<link rel="stylesheet"... | __label__POS | 0.63969 |
export class UrlHistory {
public maxLength: number;
private past = [];
private present = undefined;
private future = [];
/**
* create a new UrlHistory
* @param maxLength maximum number of past entries that should be stored (default=50)
*/
constructor(maxLength = 50) {
this.maxLength = maxLe... | __label__POS | 0.976383 |
package io.apptik.comm.jus.perf;
import com.android.volley.toolbox.BasicNetwork;
import org.apache.http.HttpResponse;
import org.apache.http.ProtocolVersion;
import org.apache.http.entity.ByteArrayEntity;
import org.apache.http.message.BasicHttpResponse;
import io.apptik.comm.jus.NetworkResponse;
import io.apptik.c... | __label__POS | 0.678143 |
package io.apptik.comm.jus.perf;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.OutputTimeUnit;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import java.util.concurrent.CountDownLatch;
import java.ut... | __label__POS | 0.902733 |
package io.apptik.comm.jus.perf;
import io.apptik.comm.jus.NetworkResponse;
import io.apptik.comm.jus.Request;
import io.apptik.comm.jus.RequestQueue;
import io.apptik.comm.jus.perf.mock.MockJusHttpStack;
import io.apptik.comm.jus.toolbox.HttpNetwork;
import io.apptik.comm.jus.toolbox.NoCache;
public class JusReques... | __label__POS | 0.710727 |
package io.apptik.comm.jus.perf;
import io.apptik.comm.jus.NetworkResponse;
import io.apptik.comm.jus.Request;
public interface RequestPipeline {
Request<NetworkResponse> addRequest(Request<NetworkResponse> request);
com.android.volley.Request<com.android.volley.NetworkResponse> addRequest
(com... | __label__POS | 0.992891 |
package io.apptik.comm.jus.perf;
import org.openjdk.jmh.annotations.Level;
import org.openjdk.jmh.annotations.Param;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.TearDown;
import java.util.ArrayList;
im... | __label__POS | 0.725739 |
package io.apptik.comm.jus.perf.mock;
import com.android.volley.NetworkResponse;
import com.android.volley.Request;
import com.android.volley.Response;
import com.android.volley.toolbox.HttpHeaderParser;
public class MockVolleyRequest extends Request<com.android.volley.NetworkResponse> {
private com.android.volle... | __label__POS | 0.866405 |
<!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_74) on Wed Oct 12 12:22:04 CEST 2016 -->
<title>Index (roxy-rxjava2 API)</title>
<meta name="date" content="2016-10-12">
<link rel="stylesheet"... | __label__POS | 0.795636 |
import {
CallExpression,
Expression,
isCallExpression,
MemberExpression,
} from '@babel/types';
function getCalleeStack(expression: Expression, calleeStack: string[]): void {
if (expression.type === 'Identifier') {
calleeStack.push(expression.name);
} else if (expression.type === 'MemberExpression') ... | __label__POS | 0.952048 |
package io.apptik.comm.jus.examples.volley;
import android.content.Context;
import com.android.volley.Request;
import com.android.volley.RequestQueue;
import com.android.volley.toolbox.ImageLoader;
import com.android.volley.toolbox.Volley;
public class VolleyHelper {
private static VolleyHelper mInstance;
private ... | __label__POS | 0.981684 |
package io.apptik.comm.jus.examples.volley;
import android.content.Context;
import android.graphics.Bitmap;
import android.support.v4.util.LruCache;
import android.util.DisplayMetrics;
import com.android.volley.toolbox.ImageLoader;
/**
* Created by Vincent on 4/17/2016.
*/
public class LruBitmapCache extends LruCa... | __label__POS | 0.923225 |
export interface IAppType {
type: string;
title: string;
pubType: string;
icon: string;
description: string;
}
export const webAppTypes: IAppType[] = [
{
type: 'web-mpa',
title: 'MPA',
pubType: 'web',
icon: 'https://gw.alicdn.com/tfs/TB1Qx3Feq61gK0jSZFlXXXDKFXa-200-200.svg',
description... | __label__POS | 0.689941 |
package io.apptik.comm.jus.examples;
import java.io.File;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import io.apptik.comm.jus.Jus;
import io.apptik.comm.jus.Request;
import io.apptik.comm.jus.RequestQueue;
import io.apptik.comm.jus.converter.Converters;
import io.apptik.comm.jus.ht... | __label__POS | 0.89575 |
package io.apptik.comm.jus.examples;
import io.apptik.comm.jus.Request;
import io.apptik.comm.jus.RequestListener;
import io.apptik.comm.jus.request.StringRequest;
public class Requests {
private Requests() {
}
// http://validate.jsontest.com/?json={'key':'value'}
// http://echo.jsontest.com/key/v... | __label__POS | 0.999922 |
package io.apptik.comm.jus.examples;
import java.io.File;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import io.apptik.comm.jus.Jus;
import io.apptik.comm.jus.Request;
import io.apptik.comm.jus.RequestQueue;
import io.apptik.comm.jus.converter.Converters;
import io.apptik.comm.jus.ht... | __label__POS | 0.989184 |
package io.apptik.comm.jus.examples;
import java.io.File;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import io.apptik.comm.jus.Jus;
import io.apptik.comm.jus.Request;
import io.apptik.comm.jus.RequestQueue;
import io.apptik.comm.jus.converter.Converters;
import io.apptik.comm.jus.ht... | __label__POS | 0.751044 |
package io.apptik.comm.jus.examples;
import java.io.File;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import io.apptik.comm.jus.Jus;
import io.apptik.comm.jus.Request;
import io.apptik.comm.jus.RequestListener;
import io.apptik.comm.jus.RequestQueue;
import io.apptik.comm.jus.example... | __label__POS | 0.998566 |
package io.apptik.comm.jus.examples;
import java.io.File;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import io.apptik.comm.jus.Jus;
import io.apptik.comm.jus.Request;
import io.apptik.comm.jus.RequestQueue;
import io.apptik.comm.jus.converter.Converters;
import io.apptik.comm.jus.ht... | __label__POS | 0.74797 |
package io.apptik.comm.jus.examples;
import java.io.File;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import io.apptik.comm.jus.Jus;
import io.apptik.comm.jus.RequestQueue;
import io.apptik.comm.jus.converter.BasicConverterFactory;
import io.apptik.comm.jus.retro.RetroProxy;
import ... | __label__POS | 0.997714 |
<!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_74) on Wed Oct 12 12:22:21 CEST 2016 -->
<title>io.apptik.rhub (rxHub API)</title>
<meta name="date" content="2016-10-12">
<link rel="styleshee... | __label__POS | 0.763426 |
<!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>All Classes (jus-java 0.6.9 API)</title>
<meta name="date" content="2017-01-10">
<link rel="sty... | __label__POS | 0.976206 |
<!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>Overview List (jus-java 0.6.9 API)</title>
<meta name="date" content="2017-01-10">
<link rel="s... | __label__POS | 0.619589 |
<!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>All Classes (jus-java 0.6.9 API)</title>
<meta name="date" content="2017-01-10">
<link rel="sty... | __label__POS | 0.959057 |
#include <convert.h>
#include <libyuv.h>
#include <libyuv/convert_from.h>
#include <libyuv/scale.h>
extern "C" {
int __I420ToARGB(const uint8* src_y, int src_stride_y,
const uint8* src_u, int src_stride_u,
const uint8* src_v, int src_stride_v,
uint8* dst_argb, int dst_stride_argb,
int width, int height) {... | __label__POS | 0.99702 |
#ifndef CONVERT_H_
#define CONVERT_H_
#ifdef __cplusplus
extern "C" {
#endif
#include <libyuv/basic_types.h>
enum __FilterMode {
__kFilterNone = 0, // Point sample; Fastest.
__kFilterBilinear = 1, // Faster than box, but lower quality scaling down.
__kFilterBox = 2 // Highest quality.
};
int __I420ToARGB(... | __label__POS | 0.944697 |
package com.ffmpegtest;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Environment;
import android.support.annotation.NonNull;
import android.view.LayoutInflater;
import android.view.Menu;
... | __label__POS | 0.666549 |
package com.ffmpegtest.adapter;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
import com.ffmpegtest.R;
import com.ffmpegtest.adapter.VideoItem;
import java.util.ArrayList;
import java.util.List;
import ... | __label__POS | 0.737517 |
<!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_74) on Wed Oct 12 12:22:21 CEST 2016 -->
<title>io.apptik.roxy (rxHub API)</title>
<meta name="date" content="2016-10-12">
<link rel="styleshee... | __label__POS | 0.756718 |
<!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_74) on Wed Oct 12 12:22:21 CEST 2016 -->
<title>io.apptik.rhub.shield (rxHub API)</title>
<meta name="date" content="2016-10-12">
<link rel="st... | __label__POS | 0.616487 |
<!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:30:17 CET 2017 -->
<title>All Classes (jus-android 0.6.9 API)</title>
<meta name="date" content="2017-01-10">
<link rel="... | __label__POS | 0.918705 |
<!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:30:17 CET 2017 -->
<title>All Classes (jus-android 0.6.9 API)</title>
<meta name="date" content="2017-01-10">
<link rel="... | __label__POS | 0.895099 |
<!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:30:15 CET 2017 -->
<title>All Classes (rx-jus 0.6.9 API)</title>
<meta name="date" content="2017-01-10">
<link rel="style... | __label__POS | 0.701024 |
<!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:30:15 CET 2017 -->
<title>All Classes (rx-jus 0.6.9 API)</title>
<meta name="date" content="2017-01-10">
<link rel="style... | __label__POS | 0.690213 |
<!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:31:02 CET 2017 -->
<title>Index (jus-okhttp3 0.6.9 API)</title>
<meta name="date" content="2017-01-10">
<link rel="styles... | __label__POS | 0.622915 |
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 |
<!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 |
<!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 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 |
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 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 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 |
<!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 |
<!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 |
<!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 |
<!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 |
# http://blogs.technet.com/b/heyscriptingguy/archive/2010/07/07/hey-scripting-guy-how-can-i-change-my-desktop-monitor-resolution-via-windows-powershell.aspx
Function Set-ScreenResolution {
param (
[Parameter(Mandatory=$true,
Position = 0)]
[int]
$Width,
[Parameter(Mandatory=$true,
Position... | __label__POS | 0.658564 |
/*
* Copyright © Appus Studio LLC 2009 - 2015
*/
package com.appus.splash.view;
import android.content.Context;
import android.util.AttributeSet;
import android.widget.ImageView;
/**
* Created by igor.malytsky on 9/10/15.
*/
public class ResizeCallbackImageView extends ImageView {
public interface OnSizeCha... | __label__POS | 0.885449 |
<!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:30:17 CET 2017 -->
<title>io.apptik.comm.jus.util (jus-android 0.6.9 API)</title>
<meta name="date" content="2017-01-10">... | __label__POS | 0.601626 |
//
// Created by Matthew Smith on 10/30/17.
//
#import "MapAnnotation.h"
#import "UIColor+Extensions.h"
#import "MarkerIcon.h"
@implementation MapAnnotation {
}
- (instancetype) initWithDictionary:(NSDictionary *)dictionary {
self = [super init];
if (self) {
self.identifier = dictionary[@"id"];
... | __label__POS | 0.652844 |
RSpec.describe Krane::Report::RiskRule::Query::RuleSelector do
describe '#selectors' do
subject { described_class.new(attrs) }
context 'for resource specific rules' do
context 'with apiGroups specified' do
let(:attrs) do
{
apiGroups: ['g1', 'g2'],
resources... | __label__POS | 0.649272 |
package com.apptreesoftware.mapview
import com.google.android.gms.maps.model.LatLng
open class MapPolygon(val identifier: String, val points: ArrayList<LatLng>, val holes: ArrayList<Hole>, val strokeWidth: Float,
val fillColor: Int, val strokeColor: Int, val jointType: Int) {
companion objec... | __label__POS | 0.916218 |
package com.apptreesoftware.mapview
import android.Manifest
import android.annotation.SuppressLint
import android.content.pm.PackageManager
import android.content.res.AssetFileDescriptor
import android.graphics.Bitmap
import android.graphics.BitmapFactory
import android.os.Bundle
import android.support.v4.app.Activity... | __label__POS | 0.612089 |
package com.apptreesoftware.mapview
import android.graphics.Color
import com.google.android.gms.maps.model.LatLng
open class MapAnnotation(val identifier: String, val title: String, val coordinate: LatLng, val rotation: Double,
val icon: MarkerIcon?, val color: Int, val draggable: Boolean) {
... | __label__POS | 0.946226 |
package com.apptreesoftware.mapview
import android.graphics.Color
import android.util.Log
import com.google.android.gms.maps.model.JointType
import com.google.android.gms.maps.model.LatLng
open class MapPolyline(val identifier: String, val points: ArrayList<LatLng>, val width: Float,
val color:... | __label__POS | 0.973141 |
package kubernetes
import (
"errors"
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/util/intstr"
"github.com/appvia/tako/pkg/tako/config"
)
func LivenessProbeToV1Probe(lp config.LivenessProbe) (*v1.Probe, error) {
lp.SuccessThreshold = config.DefaultProbeSuccessThreshold
return v1probe(lp.Type, lp.ProbeConf... | __label__POS | 0.848513 |
<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 |
<!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>io.apptik.comm.jus.retro.http (retro-jus 0.6.9 API)</title>
<meta name="date" content="2017-01-... | __label__POS | 0.860484 |
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 |
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 |
# 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 |
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 |
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 |
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 |
# **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 |
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 |
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 |
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 |
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 |
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 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 |
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 |
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 |
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 |
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 |
package io.apptik.jus.demoapp;
import android.content.Context;
import java.io.IOException;
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
import io.apptik.comm.jus.AndroidJus;
import io.apptik.comm.jus.Converter;
import io.apptik.comm.jus.JusLog;
import io.apptik.comm.jus.NetworkRequest;
impo... | __label__POS | 0.722903 |
using System.ComponentModel.DataAnnotations;
using Polly.Simmy;
using Polly.Utils;
namespace Polly.Core.Tests.Simmy;
public class ChaosStrategyOptionsTTests
{
[Fact]
public void Ctor_Ok()
{
var sut = new TestChaosStrategyOptions<int>();
sut.Randomizer.ShouldNotBeNull();
sut.Enabl... | __label__POS | 0.76092 |
package io.apptik.jus.demoapp.api;
import io.apptik.comm.jus.Request;
import io.apptik.comm.jus.retro.http.GET;
import io.apptik.comm.jus.retro.http.Headers;
import io.apptik.comm.jus.retro.http.Query;
import io.apptik.comm.jus.retro.http.Tag;
import io.apptik.json.JsonArray;
import io.apptik.json.JsonObject;
//api ... | __label__POS | 0.842663 |
using Polly.Utils.Pipeline;
namespace Polly.Core.Tests.Utils.Pipeline;
public static class DelegatingComponentTests
{
[Fact]
public static async Task ExecuteComponent_ReturnsCorrectResult()
{
await using var component = new CallbackComponent();
var next = new CallbackComponent();
v... | __label__POS | 0.724288 |
using Polly.CircuitBreaker.Health;
namespace Polly.Core.Tests.CircuitBreaker.Health;
public class HealthMetricsTests
{
[InlineData(100, typeof(SingleHealthMetrics))]
[InlineData(199, typeof(SingleHealthMetrics))]
[InlineData(200, typeof(RollingHealthMetrics))]
[InlineData(201, typeof(RollingHealthMetr... | __label__POS | 0.801658 |
using Microsoft.Extensions.Time.Testing;
using Polly.CircuitBreaker.Health;
namespace Polly.Core.Tests.CircuitBreaker.Health;
public class SingleHealthMetricsTests
{
private readonly FakeTimeProvider _timeProvider;
public SingleHealthMetricsTests() => _timeProvider = new FakeTimeProvider();
[Fact]
p... | __label__POS | 0.890078 |
using Polly.Simmy.Utils;
namespace Polly.Core.Tests.Simmy.Utils;
public class GeneratorHelperTests
{
[Fact]
public void CreateGenerator_NoGenerators_Ok()
{
var helper = new GeneratorHelper<int>(_ => 10);
helper.CreateGenerator()(ResilienceContextPool.Shared.Get(TestCancellation.Token)).S... | __label__POS | 0.700737 |
using Polly.Simmy.Fault;
namespace Polly.Core.Tests.Simmy.Fault;
public class FaultGeneratorTests
{
[Fact]
public void AddException_Generic_Ok()
{
var generator = new FaultGenerator();
generator.AddException<InvalidOperationException>();
Generate(generator).ShouldBeOfType<Invali... | __label__POS | 0.967192 |
using System.ComponentModel.DataAnnotations;
using Polly.Simmy;
using Polly.Simmy.Fault;
using Polly.Utils;
namespace Polly.Core.Tests.Simmy.Fault;
public class ChaosFaultStrategyOptionsTests
{
[Fact]
public void Ctor_Ok()
{
var sut = new ChaosFaultStrategyOptions();
sut.Randomizer.Should... | __label__POS | 0.858959 |
using Polly.Simmy;
using Polly.Simmy.Latency;
using Polly.Testing;
namespace Polly.Core.Tests.Simmy.Latency;
public class ChaosLatencyPipelineBuilderExtensionsTests
{
public static IEnumerable<object[]> AddLatency_Ok_Data()
{
var context = ResilienceContextPool.Shared.Get(TestCancellation.Token);
... | __label__POS | 0.765594 |
using System.ComponentModel.DataAnnotations;
using Polly.Simmy;
using Polly.Simmy.Behavior;
using Polly.Utils;
namespace Polly.Core.Tests.Simmy.Behavior;
public class ChaosBehaviorStrategyOptionsTests
{
[Fact]
public void Ctor_Ok()
{
var sut = new ChaosBehaviorStrategyOptions();
sut.Rando... | __label__POS | 0.97493 |
using Polly.Simmy.Outcomes;
namespace Polly.Core.Tests.Simmy.Outcomes;
public class OutcomeGeneratorTests
{
[Fact]
public void AddException_Generic_Ok()
{
var generator = new OutcomeGenerator<string>();
generator.AddException<InvalidOperationException>();
Generate(generator)!.Va... | __label__POS | 0.895607 |
namespace Polly.Specs.Helpers;
public static class ContextualPolicyExtensions
{
public static void RaiseException<TException>(this Policy policy,
int numberOfTimesToRaiseException,
IDictionary<string, object> contextData,
Action<TException, int>? configureException = null)
where TE... | __label__POS | 0.995487 |
namespace Polly.Specs.Helpers;
public static class ContextualPolicyTResultExtensions
{
public static TResult RaiseResultSequence<TResult>(
this Policy<TResult> policy,
IDictionary<string, object> contextData,
params TResult[] resultsToRaise) =>
policy.RaiseResultSequence(contextDat... | __label__POS | 0.76581 |
namespace Polly.Specs.Helpers;
public static class ContextualPolicyExtensionsAsync
{
public static Task RaiseExceptionAsync<TException>(this AsyncPolicy policy, int numberOfTimesToRaiseException, IDictionary<string, object> contextData, Action<TException, int>? configureException = null, CancellationToken cancell... | __label__POS | 0.997203 |
namespace Polly.Specs.Helpers;
public static class PolicyExtensionsAsync
{
public class ExceptionAndOrCancellationScenario
{
public int NumberOfTimesToRaiseException;
public int? AttemptDuringWhichToCancel;
public bool ActionObservesCancellation = true;
}
public static Task ... | __label__POS | 0.850743 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.