text stringlengths 27 775k |
|---|
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe 'booting' do
it 'can boot gisAssembly' do
expect(Robots::DorRepo::GisAssembly.is_a? Module).to be_truthy
end
it 'can boot gisDelivery' do
expect(Robots::DorRepo::GisDelivery.is_a? Module).to be_truthy
end
it 'can boot gisDiscovery'... |
import jwt
from django.conf import settings
from rest_framework import authentication, exceptions
from questioner.apps.user.models import User
class JWTAuthentication(authentication.BaseAuthentication):
"""
This class handles authentication of the user.
"""
def authenticate(self, request):
""... |
# frozen_string_literal: true
require 'spec_helper'
describe 'Seller Dashboard', type: :feature do
include Warden::Test::Helpers
context 'when logged as seller user' do
let(:user) { create(:seller_user, seller: seller) }
before do
login_as user
end
context 'when the seller is in pending' ... |
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE MultiParamTypeClasses #-}
-- |
module VK.API.Routable where
import Control.Monad.IO.Class (MonadIO)
import Network.API.Builder
import Network.API.Builder.Queryable
class (Queryable q, Receivable a) => Routable q a | q -> a ... |
# `{% hook %}` タグ
このタグは、テンプレート内でプラグインやモジュールに追加の HTML を返すか、利用可能なテンプレート変数を変更する機会を与えます。
```twig
{# Give plugins a chance to make changes here #}
{% hook 'my-custom-hook-name' %}
```
プラグインやモジュールが `{% hook %}` タグで作動できる詳細については、[テンプレートフック](../../extend/template-hooks.md)を参照してください。
|
fn part1(l: &str, len: usize) -> usize {
let mut r = aoc::Rope::new(len);
for pos in aoc::uints::<usize>(l) {
r.twist(pos);
}
r.product()
}
#[test]
fn part1_works() {
assert_eq!(part1("3,4,1,5", 5), 12);
}
fn part2(l: &str) -> String {
let r = aoc::Rope::new_twisted(256, l);
r.dens... |
# Playing with Firefox background scripts
1. about:debugging - load temporary addon
2. click "debug"
3. click "console"
4. disable most things apart from logging
5. have fun
# Playing with content scripts
1. about:debugging
2. dunno the rest
# Experimental WebExtension API addons
1. complicated, but Colin ... |
package ezstack
import (
"github.com/function61/hautomo/pkg/ezstack/zcl/cluster"
"github.com/function61/hautomo/pkg/ezstack/zigbee"
)
/* TODO: has source NwkAddr confused with destination NwkAddr
// "Zigbee has support for binding which makes it possible that devices can directly control each
// other without the i... |
import { LatinWordTokenizer } from './latin-word-tokenizer';
describe('LatinWordTokenizer', () => {
it('empty string', () => {
const tokenizer = new LatinWordTokenizer();
expect(tokenizer.tokenize('')).toEqual([]);
});
it('whitespace-only string', () => {
const tokenizer = new LatinWordTokenizer();
... |
CREATE TABLE IF NOT EXISTS tasks (
id SERIAL PRIMARY KEY,
name VARCHAR(250),
description VARCHAR(500),
create_date TIMESTAMP
);
CREATE TABLE IF NOT EXISTS comments (
id serial PRIMARY KEY,
task_id INT NOT NULL REFERENCES tasks(id),
comment text
);
|
import { Listenable } from '../api';
export interface Listener<T> {
(prop: Listenable<T>, oldVal: T | undefined, newVal: T): void;
}
|
package inject.log4j.redis.rest.utils;
public interface TimeProvider {
long currentTimeMillis();
}
|
using System.Collections.Generic;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
namespace src.Controllers
{
[ApiController]
[Route("api/[controller]")]
public class FibonacciController : ControllerBase
{
private readonly ILogger<FibonacciController> _logger;
publ... |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MineCase.Protocol.Handshaking;
namespace MineCase.Client.Network.Handshaking
{
public interface IHandshakingPacketGenerator
{
Task Handshake(uint protocolVersion, string serverAddr... |
module Day19 where
import Advent.Intcode
import Advent.Input
import qualified Data.List as L
import qualified Data.Set as S
isPulled program x y = o == 1
where
Halt [o] = run program [x,y]
closestSquare program x y =
case (isP (x,y), isP (x+99,y-99)) of
(False, _) -> go (x+1) y
(True, False) -> go x... |
import logging
import unittest
import collections
from yarabuilder.yararule import (
YaraRule,
YaraCondition,
YaraTags,
YaraImports,
YaraString,
YaraStrings,
YaraMeta,
YaraMetaEntry,
YaraComment,
YaraCommentEnabledClass,
)
class TestYaraComment(unittest.TestCase):
def setU... |
package io.kanro.idea.plugin.protobuf.lang.psi.primitive.structure
interface ProtobufMultiNameDefinition : ProtobufDefinition {
fun names(): Set<String>
}
|
require_relative "helper"
require "goofy/safe/csrf"
require "goofy/test"
def assert_no_raise
yield
success
end
class UnsafeRequest < RuntimeError; end
scope do
setup do
Goofy.reset!
Goofy.use(Rack::Session::Cookie, secret: "_this_must_be_secret")
Goofy.plugin(Goofy::Safe::CSRF)
end
test "safe... |
MRuby::Gem::Specification.new('mruby-mwaf') do |spec|
spec.author = "Julien Boulnois"
spec.version = "0.1.0"
spec.license = "MIT"
spec.add_dependency "mruby-erb", :github => 'fukaoi/mruby-erb'
spec.add_dependency "mruby-sqlite", :github => 'asfluido/mruby-sqlite'
end
|
module Langusta
class DetectorFactory
include Inspector
attr_reader :word_lang_prob_map, :lang_list
def initialize
@word_lang_prob_map = {}
@lang_list = []
end
# Adds a new language profile to this factory.
# @param [LangProfile] language profile to be added.
# @param [Fixnu... |
// Copyright (c) 2021 The vulkano developers
// Licensed under the Apache License, Version 2.0
// <LICENSE-APACHE or
// https://www.apache.org/licenses/LICENSE-2.0> or the MIT
// license <LICENSE-MIT or https://opensource.org/licenses/MIT>,
// at your option. All files in the project carrying such
// notice may not be ... |
package com.heapdump.analysis;
import java.util.ArrayList;
import java.util.List;
public class OutOFMemoryHeapDump {
public static void main(String[] args) {
List<ObjectForLeak> leak = new ArrayList<>();
while(true) {
leak.add(new ObjectForLeak());
}
}
}
|
;;; Copyright (c) 2011-2012, James M. Lawrence. 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
;;; notic... |
# ADN.EntityFrameworkCore
# Content
- [EntityFrameworkCoreUtils](#T:ADN.EntityFrameworkCore.EntityFrameworkCoreUtils)
- [InsertOrUpdate`<T>(context, model)](#EntityFrameworkCoreUtils.InsertOrUpdate`<T>(context,model))
<a name='T:ADN.EntityFrameworkCore.EntityFrameworkCoreUtils'></a>
## EntityFrameworkCoreUtils
... |
using System;
using System.Collections.Generic;
namespace NetConf.StaticLocalFunctions
{
public class StaticLocalFunction
{
public static void Demo()
{
foreach (var i in IterateFromTo(1,10))
Console.WriteLine(i);
}
private static IEnumerable<int> It... |
#!/usr/bin/env bash
updatedb
XDEBUG_PATH=$(locate xdebug.so)
sed -i "s%EXTENSION_LOCATION%${XDEBUG_PATH}%g" /usr/local/etc/php/conf.d/xdebug.ini |
package com.example.pavneet_singh.room_demo_kotin_mvvm_dagger.di.activities
import dagger.Module
/**
* Created by Pavneet_Singh on 2020-01-31.
*/
/**
* Add dependencies for AddNoteActivity, if required
*/
@Module
abstract class AddNoteActivityModule |
#!/bin/bash
# SPDX-FileCopyrightText: 2020 Intel Corporation
#
# SPDX-License-Identifier: MIT
COMPONENTS=$(echo "$1" | sed "s/,/ /g")
sudo apt-get install -y "$COMPONENTS"
sudo apt-get clean
|
/*
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
* under one or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information regarding copyright
* ownership. Camunda licenses this file to you under the Apache License,
* Version 2.0; y... |
/*
* Copyright 2013 Valery Lobachev
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed... |
<?php
namespace Tagcade\Repository\Core;
use Doctrine\Common\Persistence\ObjectRepository;
use Tagcade\Model\Core\DisplayWhiteListInterface;
use Tagcade\Model\Core\LibraryAdTagInterface;
use Tagcade\Model\Core\LibraryExpressionInterface;
interface WhiteListExpressionRepositoryInterface extends ObjectRepository
{
... |
<?php
/*
-------------------------------------------------------------------------
GDPR Records of Processing Activities plugin for GLPI
Copyright (C) 2020 by Yild.
https://github.com/yild/gdprropa
-------------------------------------------------------------------------
LICENSE
This file is part of GDPR Reco... |
package render
import (
"image"
"image/draw"
"time"
"github.com/oakmound/oak/v4/event"
"github.com/oakmound/oak/v4/render/mod"
"github.com/oakmound/oak/v4/timing"
)
// A Sequence is a series of modifiables drawn as an animation. It is more
// primitive than animation, but less efficient.
type Sequence struct {... |
#!/bin/bash
# Install DST version 26
cd /plato-wp36-v2/docker_containers/worker_dst_v26/private_code
mkdir -p asalto26.5
cd asalto26.5
tar xvfz ../asalto26.5.tar.gz
cd /plato-wp36-v2/docker_containers/worker_dst_v26/private_code
mkdir -p asalto27
cd asalto27
tar xvfz ../asalto27.tar.gz
cd /plato-wp36-v2/docker_conta... |
<?php
session_start();
include_once(dirname(__FILE__).DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'Library.utility.php');
// Include files
Library::using(Library::CORLY_SERVICE_FACTORY, ['FactoryService.class.php']);
/**
* PluginManagementController short summary.
*
* PluginManagementController description.
*
... |
import { ArgumentMetadata, BadRequestException, Injectable } from "@nestjs/common";
import { plainToInstance } from "class-transformer";
import { GetUsersDto } from "../dto/get-users.dto";
import { AdminGetUsersValidation } from "./admin-get-users.validation";
@Injectable()
export class AdminDeleteUsersValidation exte... |
/*
* MIT License
*
* Copyright (c) 2017 KSat e.V. and AerospaceResearch
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
* associated documentation files (the "Software"), to deal in the Software without restriction, including
* without limitation the rights t... |
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package edu.rhhs.frc.commands;
import edu.rhhs.frc.subsystems.PneumaticSubsystem;
import edu.rhhs.frc.subsystems.Winch;
/**
*
* @au... |
package com.parseus.codecinfo.fragments
import android.annotation.SuppressLint
import android.app.Dialog
import android.content.Intent
import android.os.Bundle
import android.view.*
import android.widget.TextView
import androidx.appcompat.widget.Toolbar
import androidx.core.app.ShareCompat
import androidx.core.view.Vi... |
package thesis.data.repositories;
import java.util.HashMap;
import java.util.List;
import java.util.stream.Collectors;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import thesis.data.entities.Question;
import thesis.data.entities.QuestionTermFrequency;
import thesis.data.entiti... |
package org.bitlap.zim.domain
import org.bitlap.zim.configuration.SystemConstant
/**
* 结果集
*
* @param code 状态,0表示成功,其他表示失败
* @param msg 额外信息
* @since 2021年12月25日
* @author 梦境迷离
*/
class ResultSet[T](
val data: T,
val code: Int = SystemConstant.SUCCESS,
val msg: String = SystemConstant.SUCCESS_MESSAGE
)
... |
namespace DarwinClient.SchemaV16
{
public partial class Pport
{
public Message Message { get; set; }
}
} |
MODULE m_vvacxc
! ********************************************************************
! calculates 2-dim star function coefficients of exchange-correlation*
! potential in the vacuum regions and adds them to the corresponding*
! coeffs of the coulomb potential c.l.fu, r.podloucky ... |
import React from 'react';
import PropTypes from 'prop-types';
import { request } from '../../../globalLib';
import {
Dialog,
Button,
Form,
Grid,
Input,
Pagination,
Table,
ConfigProvider,
} from '@alifd/next';
const FormItem = Form.Item;
const { Row, Col } = Grid;
const { Column } = Table;
@ConfigPro... |
package utils.connection
import common.CommonParams
import org.apache.hadoop.conf.Configuration
import org.apache.hadoop.hbase.client._
import org.apache.hadoop.hbase.{HBaseConfiguration, HColumnDescriptor, HTableDescriptor, TableName}
/**
* @author YKL on 2018/3/27.
* @version 1.0
* 说明:
*/
object HBaseUtil {... |
identities = (2..99).flat_map { |x| ((x > 9 ? 123 : 1234)..(10000 / x)).map { |y| { x: x, y: y, p: x * y } } }
pandigital_identities = identities.select { |i| [i[:x], i[:y], i[:p]].join.split('').sort.join == '123456789' }
unique_pandigital_identities = pandigital_identities.uniq { |i| i[:p] }
puts unique_pandigital... |
(in-package :cl-user)
(defpackage :mof-browser
(:nicknames :mofb)
(:use :cl :closer-mop :pod-utils :cl-who :hunchentoot :mofi)
(:shadowing-import-from :closer-mop #:standard-class #:ensure-generic-function
#:defgeneric #:standard-generic-function #:defclass #:defmethod)
(:export #:*application-url-key-f... |
// Long-term
#![allow(dead_code)]
#![allow(unused_variables)]
#![allow(unused_macros)]
#![allow(unused_braces)]
#![allow(non_upper_case_globals)]
// Short-term allows
/* */
#![allow(unused_imports)]
#![allow(unused_mut)]
/* */
extern crate alloc;
#[cfg(not(debug_assertions))]
macro_rules! panic {
( $( $arg:tt )+ ... |
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Session;
class LoginUserController extends Controller
{
public function index()
{
return view('login.index');
}
public function put()
{
Session::put('login', 'Selamat anda berhasil l... |
<<<<<<< HEAD
# cs3240-labdmo
=======
# cs3240-labdem
>>>>>>> refs/remotes/origin/master
|
qemu-system-i386 -serial mon:stdio -hdb fs.img xv6.img -smp 1 -m 512
|
/*******************************************************************************
* Copyright 2008-2012 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is... |
The "Python-Deprecated" project has moved since November 2017 to https://github.com/tantale/deprecated
|
program primo;
var n,i,cont:longint;
begin
read(n);
cont:=0;
i:=2;
while i<=n-1 do
begin
if(n mod i = 0) then
cont:=cont+1;
i:=i+1;
end;
if cont = 0 then
writeln('SIM')
else
writeln('NAO');
end.
|
<?php
declare(strict_types=1);
namespace App\Method;
/**
* @author Dean Blackborough <dean@g3d-development.com>
* @copyright Dean Blackborough 2018-2021
* @license https://github.com/costs-to-expect/api/blob/master/LICENSE
*/
class GetRequest extends Method
{
protected bool $pagination;
protected array $p... |
package runtime
// Object represents minimal object that could be operated in runtime with only Kind being mandatory characteristic
type Object interface {
GetKind() Kind
}
// Storable represents runtime object that could be stored in database and having two additional mandatory characteristics:
// Name and Namespac... |
#ifndef _ISSHE_SOCKS_PROTOCOL_H_
#define _ISSHE_SOCKS_PROTOCOL_H_
// 标准
#include <stdint.h>
// 第三方
#include <event2/event.h>
#include <event2/listener.h>
#define ISSHE_SOCKS_FLAG_TO_USER 1
#define ISSHE_SOCKS_FLAG_FROM_USER 2
#define ISSHE_SOCKS_FLAG_CONFIG 4
#define ISSHE_SOCKS_OPT_... |
#!/bin/sh
set -e
cd /var/app
if [ -n "$KUZZLE_PLUGINS" ]; then
enable_plugins="--enable-plugins $KUZZLE_PLUGINS"
fi
exec ./bin/start-kuzzle-server "$@" $enable_plugins
|
export default [
{
code: 100,
key: 'CONTINUE',
message: 'Continue',
category: 'INFORMATIONAL'
},
{
code: 101,
key: 'SWITCHING_PROTOCOLS',
message: 'Switching Protocols',
category: 'INFORMATIONAL'
},
{
code: 102,
key: 'PROCESSING',
message: 'Processing',
category... |
package pod
import (
"reflect"
"testing"
saasv1alpha1 "github.com/3scale/saas-operator/api/v1alpha1"
secretsmanagerv1alpha1 "github.com/3scale/saas-operator/pkg/apis/secrets-manager/v1alpha1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/utils/pointer"
)
func TestGenerateSecretDefinitionFn(t *testing.T... |
<?php
namespace App\Http\Requests\Recursos_Humanos;
use Illuminate\Foundation\Http\FormRequest;
class PermisoEmpleadoRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
... |
<?php
function Phuby($object, $lookup_class = true) {
if ($lookup_class && is_string($object) && class_exists($object))
return Phuby\Module::const_get($object);
if (Phuby\Enumerable::numeric($object))
return Phuby\Ary::__new($object);
if (is_array($object))
return Phuby\Hash::__ne... |
const emitter = require('emitter-io')
const client = emitter.connect({ host: '127.0.0.1', port: 8083, secure: false })
client.on('message', message => {
console.log({
channel: message.channel,
body: String(JSON.parse(message.binary))
})
})
client.subscribe({
key: process.env.EMITTER_CHANNE... |
-module(ws_handler).
-export([init/2,
websocket_init/1,
websocket_handle/2,
websocket_info/2
]).
init(Req, _) ->
Room = cowboy_req:binding(room, Req),
{cowboy_websocket, Req, #{room => Room}}.
websocket_init(State) ->
Room = maps:get(room, State),
syn:join(Room, self()),
... |
namespace BluetoothXPlatformChat.Common.Model
{
public class Message
{
public bool IsToShowDevices { get; set; }
public Message(bool isToShowDevices)
{
this.IsToShowDevices = isToShowDevices;
}
}
}
|
#what is the 10001st prime number?
#set-up
primes = []
p = 2
#Setting up the loop
while not len(primes) == 10001:
num_prime = True
#Eleminate any even candidate primes
if p > 3 and p % 2 == 0:
p += 1
continue
#Check if the candidate is divisible by any odd numbers
for x i... |
import { map2Maybe, mapMaybe, Maybe } from "./Maybe"
export type Tuple<A, B> = [A, B]
export function tuple<A,B>(a: A, b: B): [A,B] { return [a,b] }
export function mapFirst<A,B,C>(tup: [A,B], f: (a: A) => C): [C,B] { return applyTuple([f, x => x], tup) }
export function mapSecond<A,B,C>(tup: [A,B], f: (b: B) => C): ... |
<#
.SYNOPSIS
Automated unit test for DSC_SqlDatabaseUser DSC resource.
#>
Import-Module -Name (Join-Path -Path $PSScriptRoot -ChildPath '..\TestHelpers\CommonTestHelper.psm1')
if (-not (Test-BuildCategory -Type 'Unit'))
{
return
}
$script:dscModuleName = 'SqlServerDsc'
$script:dscResou... |
namespace Spotopedia.Web.Controllers
{
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Spotopedia.Data.Models;
using Spotopedia.Services.Data;
using Spotopedia.Web.ViewModels.SpotVotes;
... |
package com.hasbihal.extension
import android.content.Context
import android.view.View
import android.view.inputmethod.InputMethodManager
import com.google.android.material.snackbar.Snackbar
fun View.showKeyboard(){
val inputManager = context.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
... |
class AccountsController < ApplicationController
skip_before_filter :find_account
skip_before_filter :verify_authenticity_token
before_filter :clear_flash
skip_before_filter :login_required, :only => [:new, :create]
before_filter :ensure_no_accounts, :only => [:new, :create]
layout 'login', :only => [... |
# Lint as: python3
# Copyright 2020 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... |
# ============================================================================
# TypeFX - Typewriter effect text printer
# PowerShell script function
# Copyright (C) 2020 by Ralf Kilian
# Distributed under the MIT License (https://opensource.org/licenses/MIT)
#
# GitHub: https://github.com/urbanware-org/typefx
# GitLab... |
#!/bin/bash
npm audit | grep -i "^# run" | cut -d " " -f "3-8"
|
import React from 'react'
import { Graph, Node, Color } from '@antv/x6'
import { ReactShape } from '@antv/x6-react-shape'
// 使用教程:https://x6.antv.vision/zh/docs/tutorial/advanced/react#%E6%B8%B2%E6%9F%93-react-%E8%8A%82%E7%82%B9
class MyComponent extends React.Component<{
node?: ReactShape
text: string
}> {
sho... |
import 'bytes_encoder.dart';
import 'int_encoder.dart';
import 'list_encoder.dart';
import 'map_encoder.dart';
import 'option_encoder.dart';
import 'pair_encoder.dart';
import 'string_encoder.dart';
import 'timestamp_encoder.dart';
import 'unit_encoder.dart';
/// A class that converts Dart type object to Micheline
///... |
namespace Bearded.Graphics.Pipelines.Context
{
sealed class BlendModeChange<TState> : ContextChange<TState, BlendMode>
{
public BlendModeChange(BlendMode newValue) : base(newValue)
{
}
protected override BlendMode GetCurrent() => GLState.BlendMode;
protected override vo... |
#!/bin/sh
VERSION=elasticsearch-2.3.3
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
if [ ! -f $DIR/$VERSION/bin/elasticsearch ]; then
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/$VERSION.tar.gz -O $DIR/$VERSION.tar.gz
tar -xf $DIR/$VERSION.tar.gz -C $DIR
cd $VERSION
sud... |
module DocgenSpec where
import Pact.Docgen
import Test.Hspec
spec :: Spec
spec = runIO funDocs
|
package com.test.shoppingapp
import com.test.networkmodule.DataProvider
import com.test.shoppingapp.di.DaggerShoppingComponent
import com.test.shoppingapp.di.applyAutoInjector
import dagger.Lazy
import dagger.android.DaggerApplication
import javax.inject.Inject
class ShoppingApplication : DaggerApplication() {
... |
package com.fabiantarrach.breakinout.util.engine
import com.fabiantarrach.breakinout.util.GdxArray
class SystemDatabase {
private val systems = GdxArray<LogicSystem>()
fun addSystem(system: LogicSystem) {
systems.add(system)
}
fun each(action: (LogicSystem) -> Unit) =
systems.forEach(action)
operator fun... |
require 'typesafe_enum'
module OpenActive
module Enums
module Schema
# A list of possible statuses for the legal force of a legislation.
class LegalForceStatus < TypesafeEnum::Base
new :NotInForce, "https://schema.org/NotInForce"
new :PartiallyInForce, "https://schema.org/PartiallyInF... |
# fb-image-downloader
Downloads a batch of images from Facebook given a list of their FB Urls
## Instructions
### 1. Clone and setup project
```bash
git clone https://github.com/dkundel/fb-image-downloader.git
cd fb-image-downloader
yarn # or npm install
```
### 2. Create a file (e.g. `download.txt`) with all the F... |
package main;
import java.io.IOException;
import java.time.LocalTime;
import java.util.Objects;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import org.slf4j.Logger;
import org.slf4j.LoggerFacto... |
package br.com.everis.sovamu.feature.updateuser.ui
import android.content.Context
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import br.com.everis.sovamu.R.*
import br.com.everis.sovamu.feature.updateuser.model.UpdateUser
import br.com.everis.sovamu.feature.updateuser.usecase.UpdateUse... |
<?php
declare(strict_types=1);
namespace ShlinkioTest\Shlink\Importer\Sources\Csv;
use PHPUnit\Framework\TestCase;
use Shlinkio\Shlink\Importer\Sources\Csv\InvalidPathException;
use function sprintf;
class InvalidPathExceptionTest extends TestCase
{
/** @test */
public function pathNotProvidedCreatesExcept... |
import webpack from 'webpack';
import WebpackDevServer from 'webpack-dev-server';
import run from './run';
import runServer from './runServer';
import webpackConfig from './webpack.config';
import clean from './clean';
import copy from './copy';
import webpackMiddleware from 'webpack-middleware'
import webpackdevMidd... |
<?php
namespace Yaroslavche\UnCefact\CommonCode\SpaceAndTime;
use Yaroslavche\UnCefact\CommonCode\AbstractCommonCode;
class AngleMinute extends AbstractCommonCode
{
const GROUP_NUMBER = 1;
const SECTOR = 'Space and Time';
const GROUP_ID = 6;
const QUANTITY = 'angle (plane)';
const LEVEL = '1';
... |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright © 2011 Marcos Talau
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation;
*
* This program is distri... |
package io.nacular.doodle
import io.nacular.doodle.scheduler.Scheduler
import io.nacular.doodle.scheduler.Task
import io.nacular.measured.units.Measure
import io.nacular.measured.units.Time
import io.nacular.measured.units.Time.Companion.milliseconds
import io.nacular.measured.units.times
class ManualScheduler: Sched... |
<?php
namespace GeneralServicer\Service\Factory;
use Zend\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface;
use GeneralServicer\Service\DateCalculationService;
/**
*
* @author swoopfx
*
*/
class DateCalculationServiceFactory implements FactoryInterface
{
... |
-- create a database
-- create hbtn_0c_0 database if not exists
CREATE DATABASE IF NOT EXISTS hbtn_0c_0;
|
package com.example.a301pro;
import android.widget.EditText;
import androidx.annotation.NonNull;
import androidx.test.espresso.contrib.DrawerActions;
import androidx.test.rule.ActivityTestRule;
import com.example.a301pro.View.ViewUserProfile;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.... |
#
# @lc app=leetcode id=223 lang=python3
#
# [223] Rectangle Area
#
# @lc code=start
class Solution:
def computeArea(self, A: int, B: int, C: int, D: int, E: int, F: int, G: int, H: int) -> int:
overlap = max(min(C, G) - max(A, E), 0) * max(min(D, H) - max(B, F), 0)
total = (A - C) * (B - D) + (E... |
/**
* last :: m a -> Maybe a
*/
declare function last(a: object, b: object): object;
declare function last(a: object): (b: object) => object;
export default last;
|
module BasicObjectSpecs
class SingletonMethod
def self.singleton_method_added name
ScratchPad.record [:singleton_method_added, name]
end
def self.singleton_method_to_alias
end
end
end
|
// This is a personal academic project. Dear PVS-Studio, please check it.
// PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
// This is a personal academic project. Dear PVS-Studio, please check it.
// PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <processApi... |
import '@testing-library/jest-dom';
import '@testing-library/jest-dom/extend-expect';
// @ts-ignore
global.loader = {
enqueue: jest.fn(),
};
window.scrollTo = () => {};
/**
* This resolves the `parentStyleSheet` undefined warning due to `JSS`.
* @see https://stackoverflow.com/a/66903658/2791678
*/
window.CSSSty... |
import type { RayPointerSource, RayPointerDriver } from '@rafern/canvas-ui';
import type { Group, XRInputSource, WebXRManager } from 'three';
import { PointerHint } from '@rafern/canvas-ui';
export interface XRControllerSourceState {
source: XRInputSource | null;
pointer: number;
}
export declare class XRContro... |
package msgbs
type Message interface{}
type MessageBus interface {
Publish(Event, Message) error
Subscribe(Event)
Unsubscribe(Event)
Receive() interface{}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.