content stringlengths 263 5.24M | pred_label stringclasses 1
value | pred_score_pos float64 0.6 1 |
|---|---|---|
#include "mhook/mhook.h"
#include "term-index/term-index.h"
#include "proximity.h"
#define INIT_ARR(_name) \
{sizeof(_name) / sizeof(position_t), _name, 0}
position_t test1()
{
position_t arr1[] = {5, 8, 10, 19};
position_t arr2[] = {1, 4, 9};
position_t arr3[] = {2, 3, 6, 7, 11, 15};
prox_input_t input[3] = {
... | __label__POS | 0.693227 |
<?php
function adpIncludeDynamicCss($location='header'){
$dirPath = get_stylesheet_directory().'/'.APP_DIRECTORY.'/css/';
$dirUri = get_stylesheet_directory_uri().'/'.APP_DIRECTORY.'/css/';
if(file_exists($dirPath)){
chdir($dirPath);
$cssFiles = glob('*.css');
if($cssFiles){
foreach($cssFiles as $cssFi... | __label__POS | 0.975664 |
package com.ds.avare.place;
import android.os.AsyncTask;
import com.ds.avare.StorageService;
import com.ds.avare.content.LocationContentProviderHelper;
import com.ds.avare.utils.Helper;
/**
* Created by zkhan on 1/18/17.
*/
public class GpsDestination extends Destination {
public GpsDestination(String name)... | __label__POS | 0.726932 |
<?php
/**
* A CMB2 object instance registry for storing every CMB2 instance.
*
* @category WordPress_Plugin
* @package CMB2
* @author CMB2 team
* @license GPL-2.0+
* @link https://cmb2.io
*/
class CMB2_Boxes {
/**
* Array of all metabox objects.
*
* @since 2.0.0
* @var array
*/
protec... | __label__POS | 0.747865 |
import re
def replace_dollar_tex(s):
l = len(s)
i, j, stack = 0, 0, 0
new_txt = ''
while i < l:
if s[i] == "\\" and (i + 1) < l:
if s[i + 1] == '$':
# skip if it is escaped dollar
new_txt += '$'
i += 1
elif stack == 0:
# otherwise just copy it
new_txt += s[i]
elif s[i] == '$':
if s... | __label__POS | 0.987645 |
var quiz_list = [
{ /* 0 */
"Q": "Find all solutions for [imath]1 = (1+x+\\frac 1 2 x^2)e^{-x}[/imath].",
"hints": [
"Okay, find all solutions for ...",
"Wait, what is this? It looks terrible!",
"Honestly, I hate my math homework.",
"Hmmm... Can I <a href=\"#\">find the answer</a> on the Internet?"
]... | __label__POS | 0.967016 |
/*
Copyright (c) 2012, Apps4Av Inc. (apps4av.com)
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions an... | __label__POS | 0.630051 |
package com.ds.avare.utils;
import androidx.exifinterface.media.ExifInterface;
import java.io.FileInputStream;
/**
* Created by zkhan on 3/14/17.
*/
public class PngCommentReader {
public static float[] readPlate(String fileName) {
ExifInterface exif;
try {
exif = new ExifInterf... | __label__POS | 0.977479 |
package com.ds.avare.utils;
import net.sf.jweather.metar.Metar;
import net.sf.jweather.metar.MetarParser;
import net.sf.jweather.metar.SkyCondition;
import java.util.ArrayList;
/**
* Created by zkhan on 12/12/15.
*/
public class MetarFlightCategory {
public static String getFlightCategory(String stationId, S... | __label__POS | 0.930382 |
package com.ds.avare.utils;
import com.ds.avare.weather.WindsAloft;
import java.util.Locale;
/**
* @author pasniak
*/
public class WindsAloftHelper {
/**
* Wind decoder: public interface
* @param wa
* @param upToAltitude
* @return HTML fragment with a table containing decoded Winds Aloft ... | __label__POS | 0.951953 |
package
{
import flash.display.Sprite;
import flash.net.URLLoader;
import flash.net.URLRequest;
import flash.net.URLRequestHeader;
import flash.net.URLRequestMethod;
public class csrf extends Sprite
{
public function csrf()
{
super();
var member1:Object = null;
var myJson:String = ... | __label__POS | 0.934866 |
var router = require('express').Router()
var vulnDict = require('../config/vulns')
var authHandler = require('../core/authHandler')
module.exports = function (passport) {
router.get('/', authHandler.isAuthenticated, function (req, res) {
res.redirect('/learn')
})
router.get('/login', authHandler.isNotAuthenticat... | __label__POS | 0.989324 |
var router = require('express').Router()
var appHandler = require('../core/appHandler')
var authHandler = require('../core/authHandler')
module.exports = function () {
router.get('/', authHandler.isAuthenticated, function (req, res) {
res.redirect('/learn')
})
router.get('/usersearch', authHandler... | __label__POS | 0.996402 |
var db = require('../models')
var bCrypt = require('bcrypt')
const exec = require('child_process').exec;
var mathjs = require('mathjs')
var libxmljs = require("libxmljs");
var serialize = require("node-serialize")
const Op = db.Sequelize.Op
module.exports.userSearch = function (req, res) {
var query = "SELECT name,id... | __label__POS | 0.745181 |
var db = require('../models')
var bCrypt = require('bcrypt')
var md5 = require('md5')
module.exports.isAuthenticated = function (req, res, next) {
if (req.isAuthenticated()) {
req.flash('authenticated', true)
return next();
}
res.redirect('/login');
}
module.exports.isNotAuthenticated = function (req, res, nex... | __label__POS | 0.66303 |
/*
Copyright (c) 2012, Apps4Av Inc. (apps4av.com)
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions an... | __label__POS | 0.785463 |
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expa... | __label__POS | 0.614817 |
<%@ taglib prefix="s" uri="/struts-tags" %>
<div class='list-group'>
<a href='<s:url action="a1_injection"/>' class='list-group-item'>
<i class='fa fa-angle-double-right'></i> A1: Injection
</a>
<a href='<s:url action="a2_broken_auth"/>' class='list-group-item'>
<i class='fa fa-angle-double-... | __label__POS | 0.777017 |
package com.ds.avare.weather;
import net.sf.jweather.metar.Metar;
import net.sf.jweather.metar.MetarParser;
import net.sf.jweather.metar.SkyCondition;
import java.util.ArrayList;
/**
* Created by zkhan on 12/12/15.
*/
public class MetarFlightCategory {
public static String getFlightCategory(String stationId,... | __label__POS | 0.930731 |
/***
* Excerpted from "OpenGL ES for Android",
* published by The Pragmatic Bookshelf.
* Copyrights apply to this code. It may not be used to create training material,
* courses, books, articles, and the like. Contact us if you are in doubt.
* We make no guarantees that this code is fit for any purpose.
* Visit... | __label__POS | 0.701377 |
/***
* Excerpted from "OpenGL ES for Android",
* published by The Pragmatic Bookshelf.
* Copyrights apply to this code. It may not be used to create training material,
* courses, books, articles, and the like. Contact us if you are in doubt.
* We make no guarantees that this code is fit for any purpose.
* Visit... | __label__POS | 0.633868 |
<?php
/**
* CMB taxonomy_select_hierarchical field type
*
* @since 2.6.1
*
* @category WordPress_Plugin
* @package CMB2
* @author CMB2 team
* @license GPL-2.0+
* @link https://cmb2.io
*/
class CMB2_Type_Taxonomy_Select_Hierarchical extends CMB2_Type_Taxonomy_Select {
/**
* Parent term ID whe... | __label__POS | 0.658208 |
package com.sromku.polygon;
/**
* Line is defined by starting point and ending point on 2D dimension.<br>
*
* @author Roman Kushnarenko (sromku@gmail.com)
*/
public class Line
{
private final Point _start;
private final Point _end;
private float _a = Float.NaN;
private float _b = Float.NaN;
private boolean _... | __label__POS | 0.769778 |
package com.sromku.polygon;
import java.util.ArrayList;
import java.util.List;
/**
* The 2D polygon. <br>
*
* @see {@link Builder}
* @author Roman Kushnarenko (sromku@gmail.com)
*/
public class Polygon
{
private final BoundingBox _boundingBox;
private final List<Line> _sides;
private Polygon(List<Line> side... | __label__POS | 0.69842 |
/*
jWeather(TM) is a Java library for parsing raw weather data
Copyright (C) 2004 David Castro
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your op... | __label__POS | 0.987325 |
/*
* Copied from Avare code
* To make exe, use gcj --main=Cycle Cycle.java -o Cycle
*/
import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.TimeZone;
public class Cycle {
/*
*
*/
private static final int getFirstDate(int year) {
// Date for first cycle every ... | __label__POS | 0.8206 |
function ls(a){ var x={}; for(i in *a){ try{ x[i] = (*a)[i]; } catch(e){} } return x; }
NSLog_ = dlsym(RTLD_DEFAULT, "NSLog")
NSLog = function() { var types = 'v', args = [], count = arguments.length; for (var i = 0; i != count; ++i) { types += '@'; args.push(arguments[i]); } new Functor(NSLog_, types).apply(null, arg... | __label__POS | 0.637884 |
package helper
import (
"fmt"
gosundheit "github.com/AppsFlyer/go-sundheit"
)
type CheckWaiter struct {
completedChan chan string
}
func NewCheckWaiter() *CheckWaiter {
return &CheckWaiter{
completedChan: make(chan string),
}
}
func (c *CheckWaiter) OnCheckRegistered(_ string, _ gosundheit.Result) {}
func ... | __label__POS | 0.893809 |
(ns mate-clj.core)
(def ^:private ^:const arrow-str "=>")
(defn- println-macro [threaded result]
`(println (quote ~threaded) ~arrow-str ~result))
(defmacro d->
[x & forms]
(loop [x x, forms forms, macro-expansion (list)]
(if forms
(let [form (first forms)
threaded (if (seq? form)
... | __label__POS | 0.786614 |
import React, { Component } from 'react';
import theme from './_DropdownAutosuggest.scss';
import Autosuggest from 'react-autosuggest';
import PropTypes from 'prop-types';
const countriesList = [
{name: 'United States', code: 'US'},
{name: 'Afghanistan', code: 'AF'},
{name: 'Åland Islands', code: 'AX'},
{name:... | __label__POS | 0.749873 |
package com.appsecco.vyapi.misc;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import com.appsecco.vyapi.contacts.Contact;
public class ContactDBHandler extends SQLiteOpenHelper {
private static fin... | __label__POS | 0.986059 |
package com.appsecco.vyapi.contacts;
import android.app.Application;
import androidx.annotation.NonNull;
import androidx.lifecycle.AndroidViewModel;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import java.util.List;
public class ContactViewModel extends AndroidViewModel {
priv... | __label__POS | 0.629 |
package com.appsecco.vyapi.contacts;
import android.content.Context;
import android.os.AsyncTask;
import androidx.annotation.NonNull;
import androidx.room.Database;
import androidx.room.Room;
import androidx.room.RoomDatabase;
import androidx.sqlite.db.SupportSQLiteDatabase;
@Database(entities = {Contact.class}, ver... | __label__POS | 0.933473 |
package com.appsecco.vyapi.contacts;
import android.app.Application;
import android.os.AsyncTask;
import androidx.lifecycle.LiveData;
import java.util.List;
public class ContactRepository {
private ContactDAO contactDAO;
private LiveData<List<Contact>> allContacts;
private Contact singleContact;
p... | __label__POS | 0.851083 |
package com.appsecco.vyapi.provider;
import android.content.ContentProvider;
import android.content.ContentValues;
import android.content.UriMatcher;
import android.database.Cursor;
import android.net.Uri;
public class CaptureImageFileProvider extends ContentProvider {
private static final String AUTHORITY = "co... | __label__POS | 0.815707 |
package com.appsecco.vyapi.provider;
import android.content.ContentProvider;
import android.content.ContentValues;
import android.content.UriMatcher;
import android.database.Cursor;
import android.database.sqlite.SQLiteQueryBuilder;
import android.net.Uri;
import com.appsecco.vyapi.misc.ContactDBHandler;
public clas... | __label__POS | 0.884449 |
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.ComponentModel;
using System.Diagnostics;
using System.Text;
using System.Windows.Forms;
using Be.HexEditor.Properties;
namespace Be.HexEditor
{
public partial class RecentFileHandler : Component
{
publi... | __label__POS | 0.637442 |
using System;
using System.Collections.Generic;
using System.Text;
using System.Globalization;
namespace Be.HexEditor
{
static class Util
{
public static string GetDisplayBytes(long size)
{
const long multi = 1024;
long kb = multi;
long mb = kb*multi;
... | __label__POS | 0.609024 |
using System;
using System.Windows.Forms;
using System.Threading;
using System.Globalization;
using Be.HexEditor.Properties;
namespace Be.HexEditor
{
class Program
{
public const string SOFTWARENAME = "Be.HexEditor";
public static FormHexEditor FormHexEditor;
[STAThread()]
sta... | __label__POS | 0.989088 |
library appsflyer_sdk;
import 'dart:convert';
import 'dart:core';
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:json_annotation/json_annotation.dart';
import 'src/callbacks.dart';
part 'src/appsflyer_constants.dart';
part 'src/appsflyer_invite_lin... | __label__POS | 0.999593 |
package pronto;
import clojure.lang.*;
import java.util.*;
/**
* Code taken from Clojure, see https://github.com/clojure/clojure/blob/b1b88dd25373a86e41310a525a21b497799dbbf2/src/jvm/clojure/lang/APersistentMap.java
*/
public class PersistentMapHelpers {
public static String toString(IPersistentMap map) {
... | __label__POS | 0.899851 |
package pronto;
import clojure.lang.RT;
import clojure.lang.*;
import com.google.protobuf.LazyStringArrayList;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
public class ProntoVector extends APersistentVector implements IObj, IEditableCollection, IReduce,... | __label__POS | 0.924651 |
package pronto;
import clojure.lang.ArityException;
import clojure.lang.Compiler;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
public class Utils {
public interface PairXf {
Object transformKey(Object key);
Object transformVal(Object val);
}
public static Ob... | __label__POS | 0.995876 |
<?php
/**
* \AppserverIo\Appserver\Core\ServerNodeConfiguration
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
*
* PHP version 5
*
* @author Johann Zelger... | __label__POS | 0.892598 |
package com.appsflyer.onelink.appsflyeronelinkbasicapp;
import android.os.Bundle;
import com.appsflyer.adrevenue.AppsFlyerAdRevenue;
import com.appsflyer.adrevenue.adnetworks.AppsFlyerAdNetworkEventType;
import com.appsflyer.adrevenue.adnetworks.generic.MediationNetwork;
import com.appsflyer.adrevenue.adnetworks.gene... | __label__POS | 0.96207 |
package com.appsflyer.onelink.appsflyeronelinkbasicapp;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import androidx.appcompat.app.AppCompatActivity;
import static com.appsflyer.onelink.appsflyeronelinkbasicapp.AppsflyerBasicApp.LOG_TAG;
public class Mai... | __label__POS | 0.683082 |
package com.appsflyer.onelink.appsflyeronelinkbasicapp;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.text.method.ScrollingMovementMethod;
import android.widget.TextView;
import java.util.Map;
import java.util.SortedSet;
import java.util.TreeSet;
public class ConversionDat... | __label__POS | 0.910264 |
<?php
/**
* \AppserverIo\Appserver\PersistenceContainer\CalendarTimerBuilder
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
*
* PHP version 5
*
* @author T... | __label__POS | 0.620146 |
<?php
/**
* \AppserverIo\Appserver\PersistenceContainer\TimerBuilder
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
*
* PHP version 5
*
* @author Tim Wagne... | __label__POS | 0.905027 |
package com.appsflyer.appsflyersdk;
public final class AppsFlyerConstants {
final static String PLUGIN_VERSION = "6.17.5";
final static String AF_APP_INVITE_ONE_LINK = "appInviteOneLink";
final static String AF_HOST_PREFIX = "hostPrefix";
final static String AF_HOST_NAME = "hostName";
final static ... | __label__POS | 0.877256 |
#nullable enable
using System.Collections;
using System.Collections.Generic;
using System;
using UnityEngine;
[System.Serializable]
public class InAppPurchaseValidationResult : EventArgs
{
public bool success;
public ProductPurchase? productPurchase;
public ValidationFailureData? failureData;
public s... | __label__POS | 0.999479 |
using System;
using System.Collections.Generic;
namespace AppsFlyerSDK
{
public enum AFSDKValidateAndLogStatus
{
AFSDKValidateAndLogStatusSuccess,
AFSDKValidateAndLogStatusFailure,
AFSDKValidateAndLogStatusError
}
/// <summary>
//
/// </summary>
public class AFSDK... | __label__POS | 0.782049 |
package com.appsflyer.reactnative;
/**
* Created by maxim on 11/17/16.
*/
public class RNAppsFlyerConstants {
final static String PLUGIN_VERSION = "6.17.5";
final static String NO_DEVKEY_FOUND = "No 'devKey' found or its empty";
final static String UNKNOWN_ERROR = "AF Unknown Error";
final static S... | __label__POS | 0.847763 |
defmodule AppsignalTest.Utils do
require ExUnit.Assertions
# Remove loaded from the app so the module is recompiled when called. Do this
# if the module is already loaded before the test env, such as in `mix.exs`.
def purge(mod) do
:code.purge(mod)
:code.delete(mod)
end
def with_frozen_environment... | __label__POS | 0.890555 |
package com.appsflyer.unity;
import android.util.Log;
import com.appsflyer.api.InAppPurchaseEvent;
import com.appsflyer.api.SubscriptionPurchaseEvent;
import com.appsflyer.api.PurchaseClient;
import com.appsflyer.api.Store;
import com.appsflyer.internal.models.InAppPurchaseValidationResult;
import com.appsflyer.intern... | __label__POS | 0.7739 |
package com.appsflyer.unity;
import android.annotation.SuppressLint;
import android.os.Build;
import android.util.Log;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
import com.appsflyer.api.InAppPurchaseEvent;
import com.appsflyer.api.PurchaseClient;... | __label__POS | 0.835188 |
<?php
/**
* \AppserverIo\Appserver\Core\Utilities\Runlevels
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
*
* PHP version 5
*
* @author Tim Wagner <tw@ap... | __label__POS | 0.780024 |
defmodule Appsignal.Test.Nif do
use Appsignal.Test.Wrapper
alias Appsignal.Nif
def create_root_span(namespace) do
add(:create_root_span, {namespace})
Nif.create_root_span(namespace)
end
def create_root_span_with_timestamp(namespace, sec, nsec) do
add(:create_root_span_with_timestamp, {namespace,... | __label__POS | 0.757162 |
defmodule Appsignal.NifBehaviour do
@moduledoc false
@callback loaded?() :: boolean()
@callback running_in_container?() :: boolean()
end
defmodule Appsignal.Nif do
@behaviour Appsignal.NifBehaviour
@moduledoc false
@on_load :init
def init do
path = :filename.join(:code.priv_dir(:appsignal), ~c"apps... | __label__POS | 0.984233 |
defmodule Appsignal.Ecto do
require Logger
@tracer Application.compile_env(:appsignal, :appsignal_tracer, Appsignal.Tracer)
@span Application.compile_env(:appsignal, :appsignal_span, Appsignal.Span)
import Appsignal.Utils, only: [module_name: 1]
@doc """
Attaches `Appsignal.Ecto` to the Ecto telemetry cha... | __label__POS | 0.777636 |
defmodule Appsignal.Test.Span do
@moduledoc false
use Appsignal.Test.Wrapper
alias Appsignal.Span
def create_root(namespace, pid) do
add(:create_root, {namespace, pid})
Span.create_root(namespace, pid)
end
def add_error(span, exception, stacktrace) do
add(:add_error, {span, exception, stacktra... | __label__POS | 0.748927 |
defmodule Appsignal.Error.Backend do
@moduledoc false
require Logger
@tracer Application.compile_env(:appsignal, :appsignal_tracer, Appsignal.Tracer)
@span Application.compile_env(:appsignal, :appsignal_span, Appsignal.Span)
@behaviour :gen_event
def init(opts), do: {:ok, opts}
def attach do
case... | __label__POS | 0.961992 |
describe Appsignal::GarbageCollection do
describe ".profiler" do
before do
# Unset the internal memoized variable to avoid state leaking
described_class.clear_profiler!
end
context "when GC instrumentation is disabled" do
it "returns the NilProfiler" do
expect(described_class.pr... | __label__POS | 0.64729 |
<?php
/**
* \AppserverIo\Appserver\Core\Api\Node\ConnectionHandlersNodeTrait
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
*
* PHP version 5
*
* @author ... | __label__POS | 0.718558 |
<?php
/**
* \AppserverIo\Appserver\Core\Api\Node\ParamsNodeTrait
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
*
* PHP version 5
*
* @author Bernhard Wic... | __label__POS | 0.771774 |
<?php
/**
* \AppserverIo\Appserver\Core\Api\Node\SecurityConstraintNodeInterface
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
*
* PHP version 5
*
* @author... | __label__POS | 0.650316 |
<?php
/**
* AppserverIo\Appserver\Core\Api\Node\AccessesNodeTrait
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
*
* PHP version 5
*
* @author Johann Zelg... | __label__POS | 0.633421 |
class MockPresentHook < Appsignal::Hooks::Hook
def dependencies_present?
true
end
def install
MockPresentHook.call_something
end
def self.call_something
end
end
class MockNotPresentHook < Appsignal::Hooks::Hook
def dependencies_present?
false
end
def install
MockNotPresentHook.call... | __label__POS | 0.655923 |
if DependencyHelper.grape_present?
require "appsignal/rack/grape_middleware"
describe Appsignal::Rack::GrapeMiddleware do
let(:app) do
Class.new(::Grape::API) do
format :json
post :ping do
{ :message => "Hello world!" }
end
end
end
let(:api_endpoint) { app.... | __label__POS | 0.722327 |
require "rake"
describe Appsignal::Hooks::RakeHook do
let(:helper) { Appsignal::Integrations::RakeIntegrationHelper }
let(:task) { Rake::Task.new("task:name", Rake::Application.new) }
let(:arguments) { Rake::TaskArguments.new(["foo"], ["bar"]) }
let(:options) { {} }
before do
start_agent(:options => opti... | __label__POS | 0.651965 |
<?php
/**
* AppserverIo\Appserver\Core\Api\Node\AnalyticsNodeTrait
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
*
* PHP version 5
*
* @author Bernhard W... | __label__POS | 0.794137 |
describe Appsignal::Hooks::ActionMailerHook do
if DependencyHelper.action_mailer_present? &&
DependencyHelper.rails_version >= Gem::Version.new("4.0.0")
context "with ActionMailer" do
require "action_mailer"
class UserMailer < ActionMailer::Base
default :from => "test@example.com"
... | __label__POS | 0.762194 |
describe Appsignal::Utils::IntegrationLogger do
let(:formatter) { nil }
let(:logger) do
Appsignal::Utils::IntegrationMemoryLogger.new.tap do |l|
l.formatter = formatter if formatter
end
end
describe "#add" do
it "adds a log message with the severity" do
logger.add(:DEBUG, "debug message... | __label__POS | 0.778627 |
box::use(
config,
glue[glue],
logger[
log_info, log_debug, log_error, log_warn, log_threshold, log_layout,
layout_glue_colors
],
)
box::use(
api/handlers/insert,
api/handlers/read_data,
api/logic/setup[data_storage],
)
# Setup
# logger
log_threshold(config$get("log_level"))
log_layout(layout_gl... | __label__POS | 0.678717 |
<?php
/**
* \AppserverIo\Appserver\Core\Api\Node\RewriteMapsNodeTrait
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
*
* PHP version 5
*
* @author Johann ... | __label__POS | 0.678705 |
<?php
/**
* \AppserverIo\Appserver\Core\Api\Node\WebResourceCollectionNodeInterface
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
*
* PHP version 5
*
* @aut... | __label__POS | 0.940771 |
describe("extract_package_name", {
it("returns the package name intact when using only the package name", {
expect_equal(extract_package_name("shiny"), "shiny")
})
it("returns the package name intact when using the package name and version", {
expect_equal(extract_package_name("shiny@1.6.0"), "shiny")
... | __label__POS | 0.879148 |
<?php
/**
* \AppserverIo\Appserver\Core\Api\Node\VirtualHostNodeInterface
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
*
* PHP version 5
*
* @author Tim... | __label__POS | 0.997962 |
<?php
/**
* AppserverIo\Appserver\Core\Api\Node\ConnectorsNodeTrait
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
*
* PHP version 5
*
* @author Bernhard ... | __label__POS | 0.728149 |
<?php
/**
* \AppserverIo\Appserver\Core\Api\Node\ServerNodeInterface
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
*
* PHP version 5
*
* @author Tim Wagn... | __label__POS | 0.995801 |
<?php
/**
* \AppserverIo\Appserver\Core\Api\Node\ManagerNodeInterface
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
*
* PHP version 5
*
* @author Tim Wag... | __label__POS | 0.781834 |
<?php
/**
* \AppserverIo\Appserver\Core\Api\Node\EnvironmentVariablesNodeTrait
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
*
* PHP version 5
*
* @author ... | __label__POS | 0.846746 |
module DependencyHelper
module_function
def macos?
RbConfig::CONFIG["host_os"].include?("darwin")
end
def ruby_version
Gem::Version.new(RUBY_VERSION)
end
def ruby_3_1_or_newer?
ruby_version >= Gem::Version.new("3.1.0")
end
def ruby_3_2_or_newer?
ruby_version >= Gem::Version.new("3.2.... | __label__POS | 0.999957 |
<?php
/**
* \AppserverIo\Appserver\Core\Api\Node\CertificatesNodeTrait
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
*
* PHP version 5
*
* @author Johann... | __label__POS | 0.733939 |
<?php
/**
* AppserverIo\Appserver\Core\Api\Node\AuthenticationsNodeTrait
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
*
* PHP version 5
*
* @author Bern... | __label__POS | 0.875214 |
<?php
/**
* \AppserverIo\Appserver\Core\Api\Node\LocationsNodeTrait
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
*
* PHP version 5
*
* @author Tim Wagne... | __label__POS | 0.657769 |
<?php
/**
* \AppserverIo\Appserver\Core\Api\Node\WebAppNodeInterface
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
*
* PHP version 5
*
* @author Tim Wagn... | __label__POS | 0.964407 |
<?php
/**
* \AppserverIo\Appserver\Core\Api\Node\DatasourcesNode
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
*
* PHP version 5
*
* @author Tim Wagner <... | __label__POS | 0.772313 |
# frozen_string_literal: true
module Appsignal
# @!visibility private
module Loaders
class << self
def loaders
@loaders ||= {}
end
def instances
@instances ||= {}
end
def register(name, klass)
loaders[name.to_sym] = klass
end
def registered?(... | __label__POS | 0.672583 |
# frozen_string_literal: true
module Appsignal
class Hooks
# @!visibility private
class SidekiqHook < Appsignal::Hooks::Hook
register :sidekiq
def self.version_5_1_or_higher?
@version_5_1_or_higher ||=
if dependencies_present?
Gem::Version.new(::Sidekiq::VERSION) >=... | __label__POS | 0.987887 |
<?php
/**
* \AppserverIo\Appserver\ServletEngine\Security\Mapping
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
*
* PHP version 5
*
* @author Tim Wagner ... | __label__POS | 0.625548 |
# frozen_string_literal: true
module Appsignal
class CLI
class Diagnose
class Utils
def self.username_for_uid(uid)
passwd_struct = Etc.getpwuid(uid)
return unless passwd_struct
passwd_struct.name
rescue ArgumentError # rubocop:disable Lint/SuppressedException
... | __label__POS | 0.782615 |
<container threadType="AppserverIo\Appserver\Core\Mock\MockContainerThread" type="AppserverIo\Appserver\Core\Mock\MockContainer">
<description><![CDATA[This is an example of a servlet container that uses a socket for sending and receiving HTML requests/responses. This solution can be used for running a web server.]]><... | __label__POS | 0.822752 |
var greyStyles = [
{
featureType: "all",
stylers: [
{saturation: '-55'},
{hue: '#555ff00'},
{gamma: '0.90'},
]
},
{
featureType: 'road.highway',
rules: [
{hue: -80},
{saturation: -40},
{lightness: 8.8}
]
}
];
var map;
var city = new google.maps.LatLng(32.08781,34.7821... | __label__POS | 0.692236 |
if(typeof Object.create!=="function"){
Object.create=function(o){
function F(){
};
F.prototype=o;
return new F();
};
}
var ua={toString:function(){
return navigator.userAgent;
},test:function(s){
return this.toString().toLowerCase().indexOf(s.toLowerCase())>-1;
}};
ua.version=(ua.toString().toLowerCase().match(/[\s\S]+... | __label__POS | 0.999868 |
import 'dart:io' show HttpClient, HttpOverrides, SecurityContext;
import 'dart:math' show Random;
import 'package:appspector/src/http/client.dart';
class AppSpectorHttpOverrides extends HttpOverrides {
final Random _random = new Random();
@override
HttpClient createHttpClient(SecurityContext? context) {
re... | __label__POS | 0.775747 |
package com.appspector.flutter;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import io.flutter.embedding.engine.plugins.FlutterPlugin;
import io.flutter.plugin.common.PluginRegistry.Registrar;
import static com.appspector.flutter.MainAppSpectorHandler.internalRegister;
/**
* AppSpectorPl... | __label__POS | 0.937379 |
package com.appspector.flutter.screenshot;
import com.appspector.flutter.RequestSender;
import com.appspector.sdk.monitors.screenshot.ScreenshotCallback;
import com.appspector.sdk.monitors.screenshot.ScreenshotFactory;
import java.util.HashMap;
public class FlutterScreenshotFactory implements ScreenshotFactory {
... | __label__POS | 0.961189 |
<div class="sidebar-collapse">
<ul class="nav" id="side-menu">
<li class="nav-header">
<div class="dropdown profile-element"> <span>
<img alt="image" class="img-circle" src="img/profile_small.jpg" />
</span>
<a data-toggle="dropdown" class="dro... | __label__POS | 0.997581 |
<?php
class Encryption {
var $skey = "UNCESystem2015Wr_Receipt"; // This is the Salt
public function safe_b64encode($string) {
$data = base64_encode($string);
$data = str_replace(array('+', '/', '='), array('-', '_', ''), $data);
return $data;
return $string;
}
publi... | __label__POS | 0.966128 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.