text
stringlengths
27
775k
; ModuleID = '/home/david/src/c-semantics/tests/gcc-torture/packed-1.c' target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" %struct.anon = type <{ i16 }> @x1 =...
using System; using VideoApi.Contract.Requests; using VideoApi.DAL.Commands; using VideoApi.Domain.Enums; using VideoApi.Events.Models; using VideoApi.Extensions; namespace VideoApi.Mappings { public static class EventRequestMapper { public static SaveEventCommand MapEventRequestToEventCommand(Guid con...
cp "$(go env GOROOT)/misc/wasm/wasm_exec.js" docs/wasm_exec.js GOOS=js GOARCH=wasm go build -o docs/adventlang.wasm web/run.go
import { createParamDecorator, ExecutionContext } from '@nestjs/common'; import { Http2ServerRequest } from 'http2'; export const Cookies = createParamDecorator((data: string, context: ExecutionContext) => { const request = context.switchToHttp().getRequest<Http2ServerRequest>(); const cookies = request.headers.co...
using System; using System.Diagnostics; using System.IO; using System.Runtime.Serialization.Formatters.Binary; using System.Xml.Serialization; using DigitalRune.Mathematics.Algebra; using NUnit.Framework; namespace DigitalRune.Geometry.Shapes.Tests { [TestFixture] public class TransformShapeTest { [Test] ...
module Api module V2 class ServiceSerializer < ApiSerializer attributes :id, :name, :type, :logo, :url, :email, :phone, :formatted_phone, :description, :rating, :ratings_count has_many :schedules has_many :accommodations has_many :eligibilities ha...
package org.nac.xpathselector.selector.attributes class KVSelectorAttribute( var key: String = "", var value: String = ""): SelectorAttribute() { companion object { fun Position(pos: Int): KVSelectorAttribute { return KVSelectorAttribute("position()", pos.toString()) } ...
require "dry-monads" require "dry/matcher/result_matcher" RSpec.describe "Dry::Matcher::ResultMatcher" do describe "external matching" do subject(:match) { Dry::Matcher::ResultMatcher.(result) do |m| m.success do |v| "Matched success: #{v}" end m.failure do |v| ...
/***************************************************************************************** * * * OpenSpace * * ...
package com.github.yona168.packs; import monotheistic.mongoose.core.utils.FileUtils; import net.minecraft.server.v1_13_R2.NBTCompressedStreamTools; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.inventory.CraftItemStack; import org.bukkit.inventory.Inventory; import org.bukkit.inventory.InventoryHold...
# coding: utf-8 module Cacofonix; module CodeLists LIST_79 = { "01" => "Color of cover", "02" => "Color of page edge", "03" => "Text font", "04" => "Special cover material", "05" => "DVD region", "06" => "Operating system", "07" => "Other system requirements", "11" => "CPSIA choking h...
# Copyright 2020 Google LLC # # Use of this source code is governed by an MIT-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/MIT. module Google module Cloud module Spanner class Project def create_session instance_id, database_id, labels: nil ...
#Your goal is to create a function that removes the first and last letters of a string. #Strings with two characters or less are considered invalid. #You can choose to have your function return null or simply ignore. string="abcdefg hijk" if(len(string)<2): print(f'El string es invalido, tiene {len(string)} caract...
require("jquery") require("moment") require("fullcalendar") $(document).ready(function(){ var results; let url = 'calendars/get_events' console.log(url) $.ajax({ async: false, url: url, type: 'get', dataType: 'json', data: {}, }) .done ((data) => { console.log(data) results = da...
/* Claims Authorization Policy Langugage SDK ver. 1.0 Copyright (c) Matt Long labskunk@gmail.com All rights reserved. MIT License */ namespace Capl.Authorization { /// <summary> /// Constants used for Access Control /// </summary> public static class AuthorizationConstants { [System.Dia...
package com.easyms.common.ms.error; import lombok.Builder; import lombok.Data; import java.util.ArrayList; import java.util.List; /** * @author yfo. */ @Data @Builder public class ErrorDto { private String url; private Integer code; private String message; private List<ErrorItemDto> errors = new...
import 'dart:async'; // Firebase import 'package:firebase_messaging/firebase_messaging.dart'; import 'package:cloud_firestore/cloud_firestore.dart'; // Util import 'package:src/util.dart'; abstract class BaseUsers { Future<void> create(String uid, String displayName); Future<void> update(String uid); } class U...
using Lib.Mapping.Attributes; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace Lib.Tests { [TestClass] public class TestForRegExAttribute { [TestMethod] public void GetValues_Method() { var x = "30432.Something something something"; var actual ...
package com.example.pavelshilyagov.tryelmish import android.os.Bundle import com.example.pavelshilyagov.tryelmish.main.MainLithoComponent import com.example.pavelshilyagov.tryelmish.main.MainModel import com.example.pavelshilyagov.tryelmish.main.Msg import com.facebook.litho.ComponentContext import com.p69.elma.core....
package com.jaspervanmerle.aoc2021.day class Day12 : Day("5076", "145643") { private data class Node( val id: String, val isSmall: Boolean = id.lowercase() == id, val neighbors: MutableList<Node> = mutableListOf() ) private val caves = getCaves() override fun solvePartOne(): A...
var chalk = require('chalk'), create = require('../lib/client') ; function builder(yargs) {} function handler(argv) { var logger = require('../lib/logger')(argv); var dyn = argv.dyn || create(argv); var fqdn = argv.fqdn, cname = argv.cname; return dyn.session.create() .then(function() { if (argv.replace)...
# frozen_string_literal: true module Blacklight class FacetItemComponent < ::ViewComponent::Base with_collection_parameter :facet_item def initialize(facet_item:, wrapping_element: 'li', suppress_link: false) @facet_item = facet_item @label = facet_item.label @hits = facet_item.hits ...
// -*- Mode: Go; indent-tabs-mode: t -*- /* * Copyright (C) 2018 Canonical Ltd * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 as * published by the Free Software Foundation. * * This program is distributed in the hope tha...
function convertToBinary(binaryNumber){ let reversed = binaryNumber.toString().split("").reverse().join(""); let match = 0; let exponent = 0; for (let obj of reversed) { if(obj == 1){ match += Math.pow(2,exponent) } exponent +=1; } console.log(match); }
# rubocop:disable Lint/UnneededDisable, LineLength, AbcSize, SymbolArray, MethodLength, HashSyntax # Foo module Op5util class NoSuchHostgroupError < StandardError; end class NoSuchHostError < StandardError; end # Foo class Monitor def add_hostgroups(host, hostgroups, no_commit_config) hostgroups.each ...
These are the references for everything having to do with Python compilation. ### DESOSA [High Level Architecture](https://2021.desosa.nl/projects/rustpython/posts/md-architecture/) ### ASDL [The Zephyr Abstract Syntax Description Language by Wang](https://www.cs.princeton.edu/~appel/papers/asdl97.pdf) [Daniel Wa...
require 'network_address_calculator/version' require 'ip' require 'netaddr' module NetworkAddressCalculator def self.next_free_subnets(supernet, subnets, no_of_subnets=1, slash=24) if IP.new(supernet).size < get_host_count_from_slash(slash) raise ArgumentError, "Requested range is bigger than supernet" end ...
require "bookscan_client/version" require "bookscan_client/model" require "uri" require "cgi/util" require "mechanize" require "logger" class BookscanClient module URL ROOT = "https://system.bookscan.co.jp/" LOGIN = "https://system.bookscan.co.jp/login.php" MYPAGE = "https://system.bookscan.co.jp/booksh...
package sorald.processor; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set; import java.util.function.Function; import java.util.stream.Collectors; import javax.xml.XMLConstants; import javax.xml.parsers.DocumentBui...
module ActiveAdmin module Views # Extending ActiveAdminForm Inputs class ActiveAdminForm < FormtasticProxy # rubocop:disable Metrics/MethodLength, Metrics/AbcSize def inputs(*args, &block) form_builder.template.assigns[:has_many_block] = true if block_given? inputs_opts = args.e...
// GENERATED CODE - DO NOT MODIFY BY HAND part of 'product_sku.dart'; // ************************************************************************** // JsonSerializableGenerator // ************************************************************************** ProductSku _$ProductSkuFromJson(Map<String, dynamic> json) => ...
import { Component, OnInit } from '@angular/core'; import { FormBuilder, Validators, FormGroup } from '@angular/forms'; import { InsurancePolicy } from '../shared/models/insurance-policy'; import { InsurancePolicyService } from '../shared/services/insurance-policy.service'; @Component({ selector: 'app-new-policy', ...
PROGRAM TRUTH !---------------------------------------------------------------------- ! 12/1/97 JAMES GROSS ! THIS PROGRAM CALCULATES THE ERRORS FROM A GIVEN SET OF ! TRACK FORECAST MODELS USING DATA FROM THE AALNNYR.DAT AND ! BALNNYR.DAT FILES. IT ALSO YIELDS THE AVERAGE ERRORS COMPARED ! TO ANY OTHER...
package com.intelligentcomments.ui.comments.model.content.text import com.intelligentcomments.core.domain.core.TextContentSegment import com.intelligentcomments.core.settings.RiderIntelligentCommentsSettingsProvider import com.intelligentcomments.ui.comments.model.UiInteractionModelBase import com.intelligentcomments....
CREATE DATABASE XDT0400 CREATE TABLE `XDTA000`.`000PRO` ( `id` BIGINT NOT NULL AUTO_INCREMENT, `descripcion` VARCHAR(100) NOT NULL , `precio` FLOAT(10) NOT NULL , `categoria` VARCHAR(100) NOT NULL , PRIMARY KEY (`id`) ) ENGINE = MyISAM COMMENT = 'Maestro de productos'; CREATE TABLE `XDTA000`.`...
require_relative 'parser_adapter' require_relative 'result_item' module Esaj class QueryPage attr_reader :url def initialize(url) @url = url end def result_set elements.each_with_object([]) do |element, result_set| result_set << result_item_for(element) end end pr...
# SMTP4DEV An abstraction library to access the messages captured by an [SMTP4dev](https://github.com/rnwood/smtp4dev/) instance. ## Installation Install with pip: ``` pip install smtp4dev ``` ## Usage Example usage: ```py from smtp4dev import Smtp4Dev client = Smtp4Dev('http://localhost:8080') messages = clien...
class IssueDecorator < Draper::Decorator delegate_all def content ApplicationController.helpers.simple_format(object.content) end def issue_state I18n.t("aasm_state.issue.issue_state.#{object.issue_state}") end def created_at I18n.l(object.created_at, format: :long) end def updated_at ...
import { isFirefox } from './specHelper' import { getHash, getOrigin, getPathName, getSearch, isValidUrl, normalizeUrl } from './urlPolyfill' import { getLocationOrigin } from './utils' describe('normalize url', () => { it('should add origin to relative path', () => { expect(normalizeUrl('/my/path')).toEqual(`${...
module JS where import Data.List (intercalate) data Expression = NumberLiteral Double | StringLiteral String | BoolLiteral Bool | Variable String | Function [String] [Statement] Expression | FunctionApplication Expression [Expression] | Ternary Expression Expression Expression deriving (Eq, Show) dat...
import AWS from "./aws-cognito.svg"; import FACEBOOK from "./facebook.svg"; import STRIPE from "./stripe.svg"; import TELEGRAM from "./telegram.svg"; import GOOGLE from "./google.svg"; import FBLOGO from "./fbLogo.svg"; import TICK from "./tick.svg"; import LOGO from "./logo.svg"; export const SVG = { AWS, FACEBOOK...
module SocialStream module Population class ActivityObject def initialize(klass, &block) puts "#{ klass.name } population" start_time = Time.now 10.times do author = ::Actor.all.take(10).sample owner = author relation_ids = [Relation::Public.instance.id...
# Non functional requirements - There is currently no connection timeout - Supported browsers: Chromium 90, Chrome 91, Firefox 78
package com.ingloriousmind.android.roompersistencedemo import android.arch.persistence.room.Room import android.os.Bundle import android.support.v7.app.AppCompatActivity import android.support.v7.widget.DefaultItemAnimator import android.support.v7.widget.LinearLayoutManager import android.support.v7.widget.LinearLayo...
#!/bin/bash # 如果時間間隔的“日”超過這個數值,字串會變成紅色 alert_days=90 # =========================================== # 取得最近一次變更密碼時間的timestamp user=$(whoami) update_timestamp=$(dscl . read /Users/"$user" | \ grep -A1 passwordLastSetTime | grep real | \ awk -F'real>|</real' '{print $2}') # 轉換timestamp成可閱讀的格式 format_date=$(date ...
import { getNodeByPath } from '../util/upath_helper'; import { NodeContext } from './node_context'; import { NodeVisitor } from './node_visitor'; import { RangeCache } from './range_cache'; import { RangeMeta } from './range_meta'; import * as logger from 'logez'; /** * Iterate through nodes in a range in the follow...
require "test_helper" module SummaryTest class ValidationTest < Minitest::Test def test_valid_loop_data? skip() end def test_valid_segment_data? skip() end def test_valid_transaction_set_data? skip() end end end
% The "ThreeButtons" Program procedure drawButtonsAndLED % Draws the three boxes. drawbox (50, 275, 175, 375, red) drawbox (50, 150, 175, 250, green) drawbox (50, 25, 175, 125, blue) % Writes the text for button 1. locatexy (110, 325) put "ON" .. % Writes the text for button 2. locat...
# Excessive-Invariance Source code for the paper: **Fundamental Tradeoffs between Invariance and Sensitivity to Adversarial Perturbations**<br> *Florian Tramèr, Jens Behrmann, Nicholas Carlini, Nicolas Papernot and Jörn-Henrik Jacobsen*<br> https://arxiv.org/abs/2002.04599 The `Demo` notebook shows how to load pre-co...
export iauAtoc13 """ Observed place at a groundbased site to to ICRS astrometric RA,Dec. The caller supplies UTC, site coordinates, ambient air conditions and observing wavelength. This function is part of the International Astronomical Union's SOFA (Standards of Fundamental Astronomy) software collection. Status: s...
namespace ChromaListe.Web.Core; public static class CustomKeys { public static string SiteTitle => nameof(SiteTitle); public static string Category => nameof(Category); public static string CategoryPosts => nameof(CategoryPosts); public static string Title => nameof(Title); public static strin...
import { Directive } from '@angular/core'; @Directive({selector: 'ng-template[dtRowDetail]'}) export class DtRowDetailDirective {}
<?php /** * @package Joomla.Platform * @subpackage Form * * @copyright Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE */ defined('JPATH_PLATFORM') or die; jimport('joomla.form.formrule'); /** * Form Rule...
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { defaultModelAssessmentContext, ICausalPolicy, ModelAssessmentContext } from "@responsible-ai/core-ui"; import { localization } from "@responsible-ai/localization"; import { Stack, Text } from "office-ui-fabric-react"; import Reac...
namespace AccountingProject.Common { public static class GlobalConstants { public const string SystemName = "Accounting Software"; public const string AdministratorRoleName = "Administrator"; public const string ChiefAccountantRoleName = "Chief Accountant"; public const strin...
package br.com.woodriver.rpg.application.port.output import br.com.woodriver.rpg.application.domain.Bag interface BagRepositoryPort { fun save(bag: Bag): Bag }
import React from "react"; import Sidebar from "./sidebar"; import Header from "./header"; //import AboutSection from "./about"; import ServicesSections from "./services"; import CalloutSection from "./callout"; //import PortfolioSection from "./portfolio"; import FooterSection from "./footer"; import ScrollToTop from...
package com.attivio.emodules.deletedatafeedfolders; import com.attivio.client.MockSearchClient; import com.attivio.sdk.client.SearchClient; import com.attivio.sdk.commandline.AttivioRunnable; import com.attivio.sdk.search.SearchDocument; import com.attivio.sdk.service.ServiceFactory; import com.attivio.sdk.service.Ser...
class AddLatLngToCamps < ActiveRecord::Migration[5.2] def change add_column :camps, :lat, :decimal, :precision => 15, :scale => 10 add_column :camps, :lng, :decimal, :precision => 15, :scale => 10 end end
#!/usr/bin/env python # coding:utf-8 import sys sys.path.append('../HiMatch') import os from models.structure_model.tree import Tree import json import copy from collections import defaultdict from helper.configure import Configure ROOT_LABEL = 'Root' class DatasetStatistic(object): def __init__(self, config): ...
class SessionsController < ApplicationController def new end def create @user = User.find_by(email: session_params[:email]) if authenticate_user login_user redirect_to user_url(user) else flash[:error] = 'Incorrect email or password, try again.' render 'new' end end ...
package br.com.guiabolso.tracing import br.com.guiabolso.tracing.engine.TracerEngine import java.util.concurrent.Callable import java.util.concurrent.ExecutorService import java.util.concurrent.Future interface Tracer { /** * Defines the operation name. * * @param name operation name. * @sinc...
/* * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. * * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. * * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. * * A copy of the MIT License is included in this file. * * * Terms of the MIT...
using System; using System.Threading; using System.Threading.Tasks; using Addler.Runtime.Foundation.ObjectPooling; using NUnit.Framework; namespace Addler.Tests.Foundation { public class ObjectPoolingTest { [Test] public void WarmupAsync_Success() { var pool = new ObjectPoo...
## Question Given two arrays, write a function to compute their intersection. Example: Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2, 2]. ## Code ```JAVA public class Solution { public int[] intersect(int[] nums1, int[] nums2) { HashMap<Integer,Integer> map = new HashMap<Integer,Integer>(...
## 可用模型简要介绍 ### 1. GPT2 ### 2. Bert Retrieval ### 3. GPT2GAN ### 4. KWGPT2 ### 5. GPT2Retrieval ### 6. When2Talk ### 7. GPT2-MMI ### 8. Seq2Seq ### 9. DialoGPT-English
#include <Poco/Checksum.h> #include <Poco/NumberFormatter.h> #include "util/DataWriter.h" using namespace BeeeOn; using namespace Poco; using namespace std; DataWriter::DataWriter(ostream &output): m_output(output) { } size_t DataWriter::write(DataIterator &iterator) { size_t dataWritten = 0; while (iterator.ha...
package state import ( "path" "path/filepath" "strings" "sync" "github.com/gogo/protobuf/proto" "github.com/ovrclk/akash/types" "github.com/tendermint/iavl" tmdb "github.com/tendermint/tm-db" ) const ( dbCacheSize = 256 dbBackend = tmdb.GoLevelDBBackend ) func LoadDB(pathname string) (DB, error) { if ...
# frozen_string_literal: true RSpec.describe Openapi3Parser::SourceInput::Url do let(:valid_input) { "test: this" } let(:unparsable_input) { "*invalid: yaml" } let(:url) { "https://example.com/openapi.yaml" } before do stub_request(:get, %r{^https://example.com}).to_return(body: valid_input) end desc...
/* Copyright (c) 2018 vesoft inc. All rights reserved. * * This source code is licensed under Apache 2.0 License, * attached with Common Clause Condition 1.0, found in the LICENSES directory. */ #include "kvstore/Part.h" namespace nebula { namespace kvstore { void SimplePart::asyncMultiPut(std::vector<KV> keyVal...
using FluentValidation; using Ticket.Domain.Models; namespace Ticket.Domain.Validators { public class TicketValidator : AbstractValidator<TicketModel> { public TicketValidator() { //Checking Required RuleFor(x => x.Username).NotEmpty().WithMessage("Username is required"...
#!/bin/bash SCRIPT_DIR=$(dirname $(realpath $0)) set -e cd $SCRIPT_DIR/build python3 $SCRIPT_DIR/../time_estimation.py ./app "$@"
import tweepy from textblob import TextBlob # api information not present on purpose # creating four variables that we can use to authenticate twitter consumer_key = consumer_secret = access_token = access_token_secret = # auth with twitter # log-in via code auth = tweepy.OAuthHandler(consumer_key, consumer_secr...
<?php namespace RTippin\Messenger\Jobs; use RTippin\Messenger\Actions\Messages\StoreSystemMessage; use RTippin\Messenger\Events\NewBotEvent; use RTippin\Messenger\Support\MessageTransformer; use Throwable; class BotAddedMessage extends BaseMessengerJob { /** * @var NewBotEvent */ public NewBotEvent...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using GadzhiApplicationCommon.Models.Enums.Printers; namespace GadzhiConverting.Models.Interfaces.Printers { /// <summary> /// Информация о принтере /// </summary> public interface IPrin...
#!/usr/bin/env bash # # Ensures that all of the specified buckets exist, creating all missing buckets. # Exits with 0 (success) when all buckets exist, or when all missing buckets are # successfully created. If any creation fails with a "BucketAlreadyExists" # error, the failure is ignored and creation is considered s...
import datetime from pydantic import BaseModel, constr from common_schemas import Response from typing import List from apps.climsoft.schemas import station_schema, instrument_schema class CreateInstrumentInspection(BaseModel): performedOn: constr(max_length=255) inspectionDatetime: constr(max_length=50) ...
# css-min-height-percentages 0.0.6 Css module of single purpose classes for min height percentages #### Stats 1608 | 400 | 400 ---|---|--- bytes | selectors | declarations ## Installation #### With [npm](https://npmjs.com) ``` npm install --save-dev css-min-height-percentages ``` #### With Git ``` git clone htt...
class Oystercard attr_reader :balance attr_reader :entry_station attr_reader :exit_station attr_reader :journeys MAX_BALANCE = 90 MIN_BALANCE = 1 def initialize @balance = 0 @journeys = [] end def top_up(amount) raise "Max balance of #{MAX_BALANCE} exceeded" if @balance + a...
""" struct ConvexRealSet Convex real set (similar to a line segment). Parameters: lower bound, upper bound: floating point numbers includelower, includeupper: boolean true or false to indicate whether the set has a closed boundary (set to true) or open (set to false). """ mutable struct Conv...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Newtonsoft.Json.Linq; namespace CouchPotato.Odm { internal class EntitiesProcessResultBuilder { private readonly List<EntityInfo> newEntities; private readonly List<EntityInfo> existEnt...
# test-for-matchesselector test page for matchesSelector ## License The MIT license.
package com.github.syari.ss.plugins.mobarena import com.github.syari.spigot.api.event.events import com.github.syari.spigot.api.scheduler.runTaskLater import com.github.syari.ss.plugins.core.code.OnEnable import com.github.syari.ss.plugins.mobarena.Main.Companion.plugin import com.github.syari.ss.plugins.mobarena.lobb...
using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Data; using System.Linq; using System.Text; using System.Windows.Forms; using Infragistics.Win; namespace IGExcel.Controls { public partial class UserAccountControl : UserControl, IUIElementDrawFilter ...
-- Convert schema 'sql/Wallet-Schema-0.09-PostgreSQL.sql' to 'sql/Wallet-Schema-0.10-PostgreSQL.sql':; BEGIN; ALTER TABLE duo DROP CONSTRAINT duo_pkey; ALTER TABLE duo ADD COLUMN du_type character varying(16) NOT NULL; CREATE INDEX duo_idx_du_type_du_name on duo (du_type, du_name); ALTER TABLE duo ADD PRIMARY KEY ...
#ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QMainWindow> #include <vector> #include "sudoku_grid.h" #include "digit_button.h" #include "tool_button.h" #include "timer.h" namespace Ui { class MainWindow; } class MainWindow : public QMainWindow { Q_OBJECT public: explicit MainWindow(QMainWindow *parent = 0)...
package sorting // Time complexity is O(N*N) fun bubbleSort(input: Array<Int>): Array<Int> { println("before sorting") for (i in input.indices) { for (j in input.indices) { if (input[i] < input[j]) { swap(i, j, input) } } } return input } fun sw...
## All Rights Reserved Code without an explicit license is protected by copyright and is by default All Rights Reserved. The person or people who wrote the code are protected as such. Any time you're using software you didn't write, licensing should be considered and abided.
package ch.cern.sparkmeasure import java.net.{URL, URLEncoder, HttpURLConnection} import org.slf4j.LoggerFactory /** * Spark Measure package: proof-of-concept tool for measuring Spark performance metrics * This is based on using Spark Listeners as data source and collecting metrics in a ListBuffer * The list b...
#!/usr/bin/env bash kill -9 `pgrep -f flask` 2>/dev/null ./startup.sh
### Steps to reproduce ### Expected result ### Actual result (include screen grabs where appropriate) ### Environment and GUI version
<?php namespace Tests\Feature; use App\Project; use App\User; use Illuminate\Http\Response; use Tests\TestCase; use Illuminate\Foundation\Testing\WithFaker; use Illuminate\Foundation\Testing\RefreshDatabase; class ManageProjectsTest extends TestCase { use WithFaker, RefreshDatabase; /** @test */ functio...
#!/bin/bash check_docker_status() { printf "wait for %s to fully wake up " $1 until [ $(docker inspect -f {{.State.Running}} $1) == "true" ]; do printf "." sleep 0.1 done printf " it is fully up!\n" } fail() { echo "test failed" echo $1 exit -1 } echo "run seed node" out=$(docker-compose up --no-start see...
using System; using System.Collections.Generic; using System.Linq; using Cloud.Core.Testing; using Cloud.Core.Web.Attributes; using Cloud.Core.Web.Tests.Fakes; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Abstractions; using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.AspNetCore.Mvc.Routing; us...
# frozen_string_literal: true require 'rails_helper' RSpec.describe EducationForm::Process10203Submissions, type: :model, form: :education_benefits do subject { described_class.new } let(:evss_user) { create(:evss_user) } let(:evss_user2) { create(:evss_user, uuid: '87ebe3da-36a3-4c92-9a73-61e9d700f6ea') } l...
namespace BoolConsoleWriter { internal static class Constants { // may be will be used in the future internal const int MaxCount = 6; } }
import {ILoopable} from "./ILoopable"; export class Camera implements ILoopable { private _offsetX: number; private _offsetY: number; private _width: number; private _height: number; private _mouseWorldX: number; private _mouseWorldY: number; private _mouseScreenX: number; private _mous...
using System; using System.Drawing; using System.Threading; using System.Windows.Forms; using dnExplorer.Controls; using dnExplorer.Language; using dnExplorer.Models; using dnlib.DotNet; using ScintillaNET; namespace dnExplorer.Views { public class ObjCodeView : ViewBase<ObjModel> { CodeView view; public ObjCod...
class SetConfigOptions < ActiveRecord::Migration def self.up Spree::Config.set(:default_country_id => 96) Spree::Config.set(:order_from => "web@toycity.ie") Spree::Config.set(:default_locale => "en-IE") Spree::Config.set(:enable_mail_delivery => true) Spree::Config.set(:mail_domain => "10.1.0...
# condition Conditional statements are frequently used in Kubeflow Pipelines, and as such a Tekton Catalog Task for conditions has been provided as a simple way to invoke conditions. This is pending the support for formal Conditions spec in Tekton V1beta1 API, which is being developed according the [design specs in Te...