content
stringlengths
263
5.24M
pred_label
stringclasses
1 value
pred_score_pos
float64
0.6
1
namespace GetInjectedThreads.Enums { // https://docs.microsoft.com/en-us/windows/win32/api/winnt/ne-winnt-token_information_class enum TOKEN_INFORMATION_CLASS { TokenUser = 1, TokenGroups, TokenPrivileges, TokenOwner, TokenPrimaryGroup, TokenDefaultDacl, ...
__label__POS
0.652238
namespace GetInjectedThreads.Enums { public enum PRIVILEGE_CONSTANT { SeCreateTokenPrivilege = 1, SeAssignPrimaryTokenPrivilege, SeLockMemoryPrivilege, SeIncreaseQuotaPrivilege, SeUnsolicitedInputPrivilege, SeMachineAccountPrivilege, SeTcbPrivilege, ...
__label__POS
0.956307
using GetInjectedThreads.Enums; using System; namespace GetInjectedThreads.Structs { // MEMORY_BASIC_INFORMATION struct required for VirtualQueryEx - to read state and type fields // https://docs.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-memory_basic_information public struct MEMORY_BASIC_INF...
__label__POS
0.690812
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
const os = require('os'); const fs = require("fs"); const _path = require("path"); const process = require("process"); const JSONbig = require("json-bigint")({ storeAsString: false }); const KeysVars = new Set(["key", "value"]); const KeysSite = new Set(["path", "$id", "name", "enabled", "logging", "timeout", "framewo...
__label__POS
0.773214
package com.appzung.codepush.react; import java.io.IOException; import java.net.InetAddress; import java.net.Socket; import java.net.UnknownHostException; import java.security.KeyManagementException; import java.security.NoSuchAlgorithmException; import javax.net.ssl.SSLContext; import javax.net.ssl.SSLSocket; import...
__label__POS
0.983053
package com.appzung.codepush.react; public class CodePushConstants { public static final String ASSETS_BUNDLE_PREFIX = "assets://"; public static final String BINARY_MODIFIED_TIME_KEY = "binaryModifiedTime"; public static final String CODE_PUSH_FOLDER_PREFIX = "CodePush"; public static final String COD...
__label__POS
1.00001
package com.appzung.codepush.react; import java.io.BufferedInputStream; import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; import java.util.zip.ZipEntry; import ja...
__label__POS
0.837866
/** * Helper class to generate role strings for `Permission`. */ export class Role { /** * Grants access to anyone. * * This includes authenticated and unauthenticated users. * * @returns {string} */ public static any(): string { return 'any' } /** * Gran...
__label__POS
0.912114
<?php namespace {{ spec.title | caseUcfirst }}; class Query implements \JsonSerializable { protected string $method; protected ?string $attribute; protected ?array $values; public function __construct(string $method, ?string $attribute = null, $values = null) { $this->method = $method; ...
__label__POS
0.999903
<?php namespace {{ spec.title | caseUcfirst }}; /** * 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 ...
__label__POS
0.98492
<?php namespace {{ spec.title | caseUcfirst }}; 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...
__label__POS
0.785384
package com.apradanas.simplelinkabletext; import android.content.Context; import android.text.Editable; import android.text.TextWatcher; import android.text.method.LinkMovementMethod; import android.util.AttributeSet; import android.widget.EditText; import java.util.ArrayList; import java.util.List; /** * Created b...
__label__POS
0.898579
package com.apradanas.simplelinkabletext; import android.support.annotation.NonNull; import android.text.Spanned; import android.text.TextPaint; import android.text.style.ClickableSpan; import android.view.View; import android.widget.TextView; import com.apradanas.simplelinkabletext.util.Range; /** * Created by @ap...
__label__POS
0.960054
package com.apradanas.simplelinkabletext; import android.text.Spannable; import android.text.SpannableString; import android.text.Spanned; import android.text.style.ClickableSpan; import android.text.style.StyleSpan; import com.apradanas.simplelinkabletext.util.Range; import java.util.ArrayList; import java.util.Lis...
__label__POS
0.769549
package com.apradanas.simplelinkabletext; import android.content.Context; import android.text.method.LinkMovementMethod; import android.util.AttributeSet; import android.widget.TextView; import java.util.ArrayList; import java.util.List; /** * Created by @apradanas */ public class LinkableTextView extends TextView...
__label__POS
0.907558
package com.apradanas.simplelinkabletextsample; import android.graphics.Color; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.text.Editable; import android.view.View; import android.widget.Button; import android.widget.TextView; import android.widget.Toast; import com.aprada...
__label__POS
0.74518
/** * Helper class to generate role strings for `Permission`. */ export class Role { /** * Grants access to anyone. * * This includes authenticated and unauthenticated users. * * @returns {string} */ public static any(): string { return 'any' } /** * Gran...
__label__POS
0.912114
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
import Foundation fileprivate let DEFAULT_MIME_TYPE = "application/octet-stream" fileprivate let mimeTypes = [ "md": "text/markdown", "html": "text/html", "htm": "text/html", "shtml": "text/html", "css": "text/css", "xml": "text/xml", "gif": "image/gif", "jpeg": "image/jpeg", "jpg"...
__label__POS
0.715934
using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text.Json; using System.Text.Json.Serialization; namespace {{ spec.title | caseUcfirst }} { public class Query { [JsonPropertyName("method")] public string Method { get; set; } = string.Empty; ...
__label__POS
0.633557
using System; using System.Collections; using System.Collections.Generic; using System.Text.Json; namespace {{ spec.title | caseUcfirst }}.Extensions { public static class Extensions { public static string ToJson(this Dictionary<string, object?> dict) { return JsonSerializer.Serial...
__label__POS
0.610599
using System; using System.Collections.Generic; using System.Text.Json; using System.Text.Json.Serialization; namespace {{ spec.title | caseUcfirst }}.Converters { public class ObjectToInferredTypesConverter : JsonConverter<object> { public override object Read(ref Utf8JsonReader reader, Type typeToCon...
__label__POS
0.959022
/** * Helper class to generate role strings for `Permission`. */ export class Role { /** * Grants access to anyone. * * This includes authenticated and unauthenticated users. * * @returns {string} */ public static any(): string { return 'any' } /** * Gran...
__label__POS
0.912114
require 'json' module {{spec.title | caseUcfirst}} class Query def initialize(method, attribute = nil, values = nil) @method = method @attribute = attribute if values != nil if values.is_a?(Array) @values = values else...
__label__POS
0.999578
<?php namespace Appwrite\Spec; use Exception; use ArrayObject; abstract class Spec extends ArrayObject { private const SET_TYPE_ASSIGN = 'assign'; private const SET_TYPE_PREPEND = 'prepend'; private const SET_TYPE_APPEND = 'append'; /** * Spec constructor. * @param string $input ...
__label__POS
0.99352
<?php namespace Appwrite\SDK; use Exception; use Appwrite\Spec\Spec; use Throwable; use Twig\Environment; use Twig\Error\LoaderError; use Twig\Error\RuntimeError; use Twig\Error\SyntaxError; use Twig\Extension\DebugExtension; use Twig\Loader\FilesystemLoader; use Twig\TemplateWrapper; use Twig\TwigFilter; use Matthia...
__label__POS
0.83693
<?php namespace Appwrite\SDK; abstract class Language { public const TYPE_INTEGER = 'integer'; public const TYPE_NUMBER = 'number'; public const TYPE_STRING = 'string'; public const TYPE_BOOLEAN = 'boolean'; public const TYPE_ARRAY = 'array'; public const TYPE_OBJECT = 'object'; public con...
__label__POS
0.997991
<?php namespace Appwrite\SDK\Language; use Appwrite\SDK\Language; use Twig\TwigFilter; abstract class JS extends Language { protected $params = [ 'npmPackage' => 'packageName', 'bowerPackage' => 'packageName', ]; /** * @param string $name * @return $this */ public func...
__label__POS
0.67346
package.path = "../utils/?.lua;" .. package.path require "dfs" local Set = require "set" function dominators(graph) print("Computing dominators") local traversal = dfs_reverse_postorder(graph) -- Initialization for i, name in ipairs(traversal) do local node = graph[name] if i == 1 the...
__label__POS
0.853351
package.path = "../utils/?.lua;" .. package.path local Set = require "set" function invert(graph) local inv = {} for name, node in pairs(graph) do if name == "entry" then name = "exit" elseif name == "exit" then name = "entry" end inv[name] = {succ = node.pred, pred = node.succ} en...
__label__POS
0.885717
package.path = "../utils/?.lua;" .. package.path local loop = require "loop" local fun = require "fun" local concat = table.concat local getlocal = debug.getlocal local IterationVector = {} -- Metatable for iteration and dependence distance vectors local obj_mt obj_mt = { __index = IterationVector, -- Subt...
__label__POS
0.710201
export function abbreviateNumber(num: number, decimals: number = 1): string { if (isNaN(num)) return String(num); if (num >= 1_000_000_000) { const result = num / 1_000_000_000; return result.toFixed(result % 1 !== 0 ? decimals : 0) + 'B'; } else if (num >= 1_000_000) { const result ...
__label__POS
0.909935
#include <assert.h> #include <stdio.h> #include <stdlib.h> extern int fib(int n); extern int pow(int b, int e); extern int fastpow(int b, int e); extern int sum(int n); extern int fastsum(int n); extern int search(int *numbers, int lo, int hi, int x); extern void sort(int *numbers, int n); int fib_(int n) { retur...
__label__POS
0.992974
local fun = {} function fun.map(f, t) local tt = {} for _, v in ipairs(t) do table.insert(tt, (f(v))) end return tt end function fun.map2(f, s, t) local tt = {} for i = 1, math.min(#s, #t) do table.insert(tt, (f(s[i], t[i]))) end return tt end function fun.filter(p, t)...
__label__POS
0.999642
local Set = {} local function from_list(lst) local set = {} for _, v in ipairs(lst) do set[v] = true end return set end local function to_list(set) local lst = {} for k, _ in pairs(set) do lst[#lst+1] = k end return lst end local function to_string(set) return "{" ...
__label__POS
0.996538
package.path = "../utils/?.lua;" .. package.path local fun = require "fun" local map = fun.map local concat = table.concat local unpack = unpack or table.unpack local function sum(t) return fun.fold(fun["+"], 0, t) end local function min(t) assert(#t > 0) return math.min(unpack(t)) end local function m...
__label__POS
0.79473
#include <assert.h> #include <stdio.h> #include <stdlib.h> #include "omp.h" #ifndef min #define min(a, b) ((a) < (b) ? (a) : (b)) #endif static int *A; static int *B; static int *C; struct omp_data { int n; }; void main_omp_fn_0(void *omp_data) { int n = ((struct omp_data *)omp_data)->n; int from, to; ...
__label__POS
0.801498
[B1] test03(x): i := 0 goto L1 [B2] L1: if i < 10 goto L2 else goto L3 [B3] L2: x := 2 * i i := i + 1 goto L1 [B4] L3: return -------------------------------------------------------------------------------- [B1] test03(x): i := 0 goto L1(i) [B2] L1(i): if i < 10 goto L2(i) else...
__label__POS
0.834883
[B1] test07(p): x := 0 i := 1 goto L1 [B2] L1: if p > 10 goto L2 else goto L3 [B3] L2: j := i i := i + 1 i := j x := x + j goto L1 [B4] L3: return x -------------------------------------------------------------------------------- [B1] test07(p): x := 0 i := 1 goto L...
__label__POS
0.920638
[B1] test09(z): x := 1 y := 2 if x > z goto L1 else goto L2 [B2] L1: a := x + 1 goto L4 [B3] L2: a := y goto L4 [B5] L4: if a > 4 goto L5 else goto L6 [B6] L5: a := a + z goto L4 [B7] L6: b := a * a return b ---------------------------------------------------------------...
__label__POS
0.693681
[B1] test01(a, b): if a > b goto L4 else goto L5 [B2] L4: if a < 100 goto L1 else goto L2 [B3] L1: return a [B5] L2: c := b + 1 return b [B7] L5: c := b + 1 return c -------------------------------------------------------------------------------- [B1] test01(a, b): if a > b goto L4(a, ...
__label__POS
0.948933
[B1] test08(flag): x := 4 y := 0 if y != 0 goto L1 else goto L2 [B2] L1: x := 3 goto L2 [B3] L2: if flag == 0 goto L3 else goto L4 [B4] L3: z := 10 goto L4 [B5] L4: z := x + 5 return z -------------------------------------------------------------------------------- [B1] test08(...
__label__POS
0.783165
[B1] fib(n): t0 := 0 t1 := 1 if n < 2 goto L1 else goto L2 [B2] L1: return n [B3] L2: i := 2 goto L3 [B4] L3: if i <= n goto L4 else goto L5 [B5] L4: t2 := t0 + t1 t0 := t1 t1 := t2 i := i + 1 goto L3 [B6] L5: return t1 -----------------------------------------------...
__label__POS
0.968538
[B1] sort(A, n): i := 0 goto L6 [B2] L6: $9 := n - 1 if i < $9 goto L7 else goto L8 [B3] L7: min := i j := i + 1 goto L3 [B4] L3: if j < n goto L4 else goto L5 [B5] L4: $1 := j * 4 t0 := *(A + $1) $2 := min * 4 t1 := *(A + $2) if t0 < t1 goto L1 else goto L2 [B6] L1: ...
__label__POS
0.952804
[B1] test05(): x := 65535 if x < 2 goto L1 else goto L2 [B2] L1: y := 5 + x goto L3 [B3] L2: y := x - 42 goto L3 [B4] L3: z := y * y return z -------------------------------------------------------------------------------- [B1] test05(): x := 65535 if x < 2 goto L1(x, y) else g...
__label__POS
0.687155
[B1] fastsum(n): s := 0 i := 1 goto L1 [B2] L1: if i <= n goto L2 else goto L3 [B3] L2: i := i + 1 goto L1 [B4] L3: t0 := n + 1 t1 := n * t0 t2 := t1 / 2 s := t2 return s -------------------------------------------------------------------------------- [B1] fastsum(n): s...
__label__POS
0.990853
[B1] search(A, lo, hi, x): goto L6 [B2] L6: $2 := hi - lo if $2 >= 1 goto L7 else goto L8 [B3] L7: t0 := hi - lo t1 := t0 / 2 t2 := lo + t1 $1 := t2 * 4 t3 := *(A + $1) if t3 == x goto L1 else goto L2 [B4] L1: return t2 [B5] L2: if t3 < x goto L3 else goto L4 [B6] L3: lo ...
__label__POS
0.94222
[B1] test10(A): $1 := 1 *A := $1 $2 := 2 *(A + 4) := $2 $3 := 3 *(A + 8) := $3 n := 1 a := *A $4 := n * 4 b := *(A + $4) $5 := n - 1 $6 := $5 * 4 c := *(A + $6) $7 := n + 1 $8 := $7 * 4 $9 := 4 *(A + $8) := $9 x := *A y := *(A + 4) z := *(A...
__label__POS
0.994105
[B1] test04(A, N): i := 1 j := 0 goto L1 [B2] L1: if i < N goto L2 else goto L3 [B3] L2: $1 := i - 1 $2 := $1 * 4 $3 := i + 1 *(A + $2) := $3 $4 := j * 4 $5 := i - 1 *(A + $4) := $5 i := i + 1 goto L1 [B4] L3: return ----------------------------------------------...
__label__POS
0.982756
[B1] sum(n): s := 0 i := 1 goto L1 [B2] L1: if i <= n goto L2 else goto L3 [B3] L2: s := s + i i := i + 1 goto L1 [B4] L3: return s -------------------------------------------------------------------------------- [B1] sum(n): s := 0 i := 1 goto L1(i, n, s) [B2] L1(i, n, s):...
__label__POS
0.979454
export function getFrameworkIcon(framework: string) { switch (true) { case framework.toLocaleLowerCase().includes('sveltekit'): return 'svelte'; case framework.toLocaleLowerCase().includes('nuxt'): return 'nuxt'; case framework.toLocaleLowerCase().includes('vue'): ...
__label__POS
0.956174
[B1] fib(n): t0 := 0 t1 := 1 if n < 2 goto L1 else goto L2 [B2] L1: return n [B3] L2: i := 2 if i <= 2 goto L4 else goto L5 [B5] L4: return n [B7] L5: i := 2 goto L6 [B8] L6: if i <= n goto L7 else goto L8 [B9] L7: t2 := t0 + t1 t0 := t1 t1 := t2 i := i + 3262 ...
__label__POS
0.959616
[B1] test01(a, b): if a > b goto L3 else goto L4 [B2] L3: if a < 100 goto L1 else goto L5 [B3] L1: return b [B5] L4: c := b + 1 return c [B6] L5: return -------------------------------------------------------------------------------- [B1] test01(a, b): if a > b goto L3(a, b) else goto L4(a...
__label__POS
0.849112
[B1] test06(p): x := 1 goto L3 [B2] L3: if p > 10 goto L2 else goto L5 [B5] L2: x := 2 goto L3 [B6] L5: return x -------------------------------------------------------------------------------- [B1] test06(p): x := 1 goto L3(p, x) [B2] L3(p, x): if p > 10 goto L2(p, x) else goto L5...
__label__POS
0.667267
digraph CFG { B1 [shape=record label="{B1|sort(A, n):\li := 0\lgoto L6\l}"]; B2 [shape=record label="{B2|L6:\l$9 := n - 1\lif i \< $9 goto L7 else goto L8\l}"]; B3 [shape=record label="{B3|L7:\lmin := i\lj := i + 1\lgoto L3\l}"]; B4 [shape=record label="{B4|L3:\lif j \< n goto L4 else goto L5\l}"]; ...
__label__POS
0.767359
package.path = "../../utils/?.lua;" .. package.path local fun = require "fun" local parse = require "parse" local literal = parse.literal local number = parse.number local variable = parse.variable --+----------------+ --| Constant terms | --+----------------+ local ConstantTerm = {} function ConstantTerm.eval(a, ...
__label__POS
0.977503
package.path = "../../utils/?.lua;" .. package.path local Set = require "set" local fun = require "fun" local unpack = unpack or table.unpack local Dependence = {} function Dependence.analyze(a, b) assert(#a.subscripts == #b.subscripts) local subscripts = fun.map2(fun.pair, a.subscripts, b.subscripts) ...
__label__POS
0.957316
package.path = "../../utils/?.lua;" .. package.path local fun = require "fun" local parse = require "parse" local literal = parse.literal local number = parse.number local variable = parse.variable local StridedRange = require "strided_range" --+-------------+ --| Loop bounds | --+-------------+ local LoopBounds =...
__label__POS
0.819541
/***************************************************//** * @file FeatureFamilies.h * @date March 2017 * @author Ocean Optics, Inc. * * This provides a way to get references to different kinds * of features (e.g. spectrometer, TEC) generically. * * LICENSE: * * SeaBreeze Copyright (C) 2017, Ocean Optics...
__label__POS
0.943468
<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * --> <!-- * * * * * * * * * * * The content below * * * * * * * * * * * --> <!-- * * * * * * * * * * is only a placeholder * * * * * * * * * * --> <!-- * * * * * * * * * * and can be replaced. * * * * * * * * * * --> <!-- * * * * * * * * * * * * * * * *...
__label__POS
0.654748
class FindProducts attr_reader :products def initialize(products = initial_scope) @products = products end def call(params = {}) scoped = products scoped = filter_by_category_id(scoped, params[:category_id]) scoped = filter_by_min_price(scoped, params[:min_price]) scoped = filter_by_max_pr...
__label__POS
0.993938
class ProductsController < ApplicationController skip_before_action :protect_pages, only: [:index, :show] def index @categories = Category.order(name: :asc).load_async @pagy, @products = pagy_countless(FindProducts.new.call(product_params_index).load_async, items: 12) end def show product end ...
__label__POS
0.999082
import { words, allowed } from './words.server'; export class Game { /** * Create a game object from the player's cookie, or initialise a new game * @param {string | undefined} serialized */ constructor(serialized = undefined) { if (serialized) { const [index, guesses, answers] = serialized.split('-'); ...
__label__POS
0.625432
<!DOCTYPE html> <!-- To change the theme, change the class on the html tag below to one of: - theme-auto: Automatically switches based on user's system preferences - theme-light: Forces light theme - theme-dark: Forces dark theme --> <html class="theme-auto" lang="en"> <!-- Update`class="theme-auto" with you...
__label__POS
0.698751
var JSDOM = require("jsdom").JSDOM; var window = new JSDOM('<!doctype html><html><body></body></html>').window; var document = window.document; global["document"] = document; global["window"] = window; // we don't really need this for these tests. window.requestAnimationFrame = function() {}; global["navigator"] = { u...
__label__POS
0.836323
<!doctype html> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1"> <head> <link rel="stylesheet" href="../build/tenuki.css"></link> <script src="../build/tenuki.js"></script> <link rel="stylesheet" href="example.css"></link> <script src="example-controls...
__label__POS
0.796544
<!doctype html> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1"> <head> <link rel="stylesheet" href="../build/tenuki.css"></link> <script src="../build/tenuki.js"></script> <link rel="stylesheet" href="example.css"></link> <script src="example-controls...
__label__POS
0.688019
const EyePoint = function(boardState, intersection) { this.boardState = boardState; this.intersection = intersection; Object.freeze(this); }; EyePoint.prototype = { diagonals: function() { const diagonals = []; let possibleX = []; let possibleY = []; if (this.intersection.x > 0) { poss...
__label__POS
0.654335
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/bakers.R \docType{data} \name{bakers} \alias{bakers} \title{Bakers} \format{ A data frame with 120 rows representing individual bakers and 24 variables: \describe{ \item{series}{An integer denoting UK series (\code{1}-\code{10}).} \item{baker...
__label__POS
0.94971
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/episodes.R \docType{data} \name{episodes} \alias{episodes} \title{Episodes} \format{ A data frame with 94 rows representing individual episodes per series and 10 variables: \describe{ \item{series}{An integer denoting UK series (\code{1}-\cod...
__label__POS
0.933206
#' Episodes #' #' Each episodes' statistics. This dataset is made by collapsing #' \code{\link{challenges}} by `series` and `episode`. #' #' @format A data frame with 94 rows representing individual episodes per series #' and 10 variables: #' \describe{ #' \item{series}{An integer denoting UK series (`1`-`10`).} #'...
__label__POS
0.969636
#' Bakers #' #' Information about each baker and their performance during the series they #' appeared on. #' #' @format A data frame with 120 rows representing individual bakers and 24 #' variables: #' \describe{ #' \item{series}{An integer denoting UK series (`1`-`10`).} #' \item{baker_full}{A character string g...
__label__POS
0.964601
import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import org.apache.hadoop.fs.Path; import org.apache.hadoop.io.LongWritable; import org.apache.hadoop.io.Text; import org.apache.hadoop.mapreduce.Job; import org.apache.hadoop.mapreduce.Mapper; import org.apache.hadoop.mapreduce.Reducer;...
__label__POS
0.770864
import java.util.ArrayList; import java.util.HashMap; /** * */ /** * @author SayanM * */ public final class WordCounterBDAS extends RootBDAS{ @Override HashMap<String, ArrayList<String>> mapper_task(String line) { // TODO Auto-generated method stub String[] words = line.split(" "); HashMap<String, Ar...
__label__POS
0.99995
RSpec.describe "Post updating" do describe "the 'update: now' header" do it "sets the Updated header value to the current time" do with_file_contents(testing_dir("_posts/2000-12-20-test--published-post"), "title: Some post title\nCreated: 2000-12-20T14:15:16Z\nupdate: now\n\nchanges made") do expect...
__label__POS
0.746211
RSpec.describe "Archives" do before { generate_site } describe "Main archive page" do subject { Nokogiri::HTML.parse(File.read(testing_dir("_site/archive.html"))) } it "includes one year for each year with a published post" do expect(subject.search(".year-date").map(&:text)).to eq([ "2400 (p...
__label__POS
0.870661
module Serif class Generator attr_reader :site def initialize(site) @site = site end def default_layout Liquid::Template.parse(File.read(site.source_path("_layouts/default.html"))) end def generate! Dir.chdir(site.source_directory) do FileUtils.rm_rf("tmp/_site") ...
__label__POS
0.78456
require "time" require "redhead" module Serif class ContentFile attr_reader :path, :site def self.all(site, dirname, klass) Dir[site.source_path(dirname, "*")].select do |f| File.file?(f) end.map do |f| File.expand_path(f) end.map do |f| klass.new(site, f) end...
__label__POS
0.833971
package com.example.android.architecture.blueprints.todoapp.test.chapter13 import android.Manifest import android.support.test.rule.ActivityTestRule import android.support.test.rule.GrantPermissionRule import android.support.test.runner.AndroidJUnit4 import com.example.android.architecture.blueprints.todoapp.tasks.Tas...
__label__POS
0.621645
package com.example.android.architecture.blueprints.todoapp.test.chapter13 import android.support.test.InstrumentationRegistry import android.support.test.uiautomator.UiDevice /** * Class that keeps Monkey tests logic and main actions. */ object Monkey { private val uiDevice = UiDevice.getInstance(Instrumentat...
__label__POS
0.667643
package com.example.android.architecture.blueprints.todoapp.test.chapter13 import android.support.test.InstrumentationRegistry import android.support.test.uiautomator.UiDevice import java.util.* /** * Calculates screen dimensions, navigation, status and action bars dimensions. * Generates random coordinates for mon...
__label__POS
0.835185
package com.example.android.architecture.blueprints.todoapp.test.chapter11.tests import com.example.android.architecture.blueprints.todoapp.test.BaseTest import com.example.android.architecture.blueprints.todoapp.test.chapter11.screens.ToDoListScreen import com.example.android.architecture.blueprints.todoapp.test.chap...
__label__POS
0.860913
package com.example.android.architecture.blueprints.todoapp.test.chapter11.tests import com.example.android.architecture.blueprints.todoapp.test.BaseTest import com.example.android.architecture.blueprints.todoapp.test.chapter11.screens.ToDoListScreen import com.example.android.architecture.blueprints.todoapp.test.chap...
__label__POS
0.804022
package com.example.android.architecture.blueprints.todoapp.test.chapter15.drawablematchers import android.graphics.drawable.Drawable import android.support.test.InstrumentationRegistry import android.support.test.espresso.Espresso.onView import android.support.test.espresso.assertion.ViewAssertions.matches import and...
__label__POS
0.893444
package com.example.android.architecture.blueprints.todoapp.test.chapter2.screenshotwatcher; import android.graphics.Bitmap; import android.support.test.runner.screenshot.ScreenCapture; import android.support.test.runner.screenshot.Screenshot; import org.junit.rules.TestWatcher; import org.junit.runner.Description; ...
__label__POS
0.617646
package com.example.android.architecture.blueprints.todoapp.test.chapter2.custommatchers; import android.graphics.Color; import com.example.android.architecture.blueprints.todoapp.R; import com.example.android.architecture.blueprints.todoapp.test.BaseTest; import org.junit.Test; import static android.support.test.e...
__label__POS
0.740088
package com.example.android.architecture.blueprints.todoapp.test.chapter2.custommatchers; import android.support.test.espresso.matcher.BoundedMatcher; import android.view.View; import android.widget.EditText; import android.widget.LinearLayout; import android.widget.TextView; import com.example.android.architecture.b...
__label__POS
0.993223
package com.example.android.architecture.blueprints.todoapp.test.chapter2.custommatchers; import android.support.test.espresso.intent.Checks; import android.support.test.espresso.matcher.BoundedMatcher; import android.support.v7.widget.RecyclerView; import android.widget.TextView; import com.example.android.architect...
__label__POS
0.97045
package com.example.android.architecture.blueprints.todoapp.test.chapter2.customswipe; import android.os.SystemClock; import android.support.test.espresso.UiController; import android.support.test.espresso.action.MotionEvents; import android.support.test.espresso.action.Swiper; import android.util.Log; import android....
__label__POS
0.745751
package com.example.android.architecture.blueprints.todoapp.test.chapter2.customactions; import android.support.test.espresso.ViewAction; import android.support.test.espresso.action.CoordinatesProvider; import android.support.test.espresso.action.GeneralLocation; import android.support.test.espresso.action.GeneralSwip...
__label__POS
0.84587
IDENTIFICATION DIVISION. PROGRAM-ID. Listing5-10. AUTHOR. Michael Coughlan. DATA DIVISION. WORKING-STORAGE SECTION. 01 PlayerGuess-A PIC 9 VALUE 1. 88 Rock-A VALUE 1. 88 Paper-A VALUE 2. 88 Scissors-A VALUE 3. 01 PlayerGuess-B PIC 9 VALUE 2. 88 Rock-B VALUE 1. 88 Paper-B ...
__label__POS
0.797689
IDENTIFICATION DIVISION. PROGRAM-ID. Listing15-6. AUTHOR. Michael Coughlan. DATA DIVISION. WORKING-STORAGE SECTION. 01 DateStr PIC X(15). 01 DateRec. 02 DayStr PIC XX. 02 MonthStr PIC XX. 02 YearStr PIC X(4). PROCEDURE DIVISION. Begin. *>Unstring example 2 MOVE "19-08-2012" TO DateStr. ...
__label__POS
0.628373
// Program 3.4a Converting uppercase to lowercase #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> int main(void) { char letter = 0; // Stores a character printf("Enter an uppercase letter:"); // Prompt for input scanf("%c", &letter); // Read a character /...
__label__POS
0.918959
// Program 12.1 Writing a file a character at a time #define __STDC_WANT_LIB_EXT1__ 1 #include <stdio.h> #include <string.h> #include <stdlib.h> #define LENGTH 81 // Maximum input length int main(void) { char mystr[LENGTH]; // Input string int mychar = 0; /...
__label__POS
0.880255
// Program 11.7 Sorting integers using a binary tree #define __STDC_WANT_LIB_EXT1__ 1 #include <stdio.h> #include <stdlib.h> #include <ctype.h> typedef struct Node Node; // Defines a node in a binary tree sotring integers struct Node { long item; // The data item ...
__label__POS
0.942743
// Program 6.5 Comparing strings #define __STDC_WANT_LIB_EXT1__ 1 // Make optional versions of functions available #include <stdio.h> #include <string.h> #define MAX_LENGTH 21 // Maximum char array length int main(void) { char word1[MAX_LENGTH]; ...
__label__POS
0.918546
// Program 14.1 Classifying wide characters #define __STDC_WANT_LIB_EXT1__ 1 #include <stdio.h> #include <wchar.h> #include <wctype.h> int main(void) { wchar_t ch = 0; // Stores a character fwprintf_s(stdout, L"Enter a character: "); fwscanf_s(stdin, L" %lc", &ch, sizeof(ch)...
__label__POS
0.890428
// Program 13.1 Debugging using preprocessing directives #define __STDC_WANT_LIB_EXT1__ 1 #include <stdio.h> #include <stdlib.h> #include <time.h> // Macro to generate pseudo-random number from 0 to NumValues */ #define random(NumValues) ((int)(((double)(rand())*(NumValues))/(RAND_MAX + 1.0))) #define iterations 6 #d...
__label__POS
0.851222
// Program 9.1 Pointing to functions #include <stdio.h> // Function prototypes int sum(int, int); int product(int, int); int difference(int, int); int main(void) { int a = 10; // Initial value for a int b = 5; // Initial value for b int result = 0; ...
__label__POS
0.990675