text stringlengths 27 775k |
|---|
################################################################################
#
# Copyright (c) 2002-2020 Marcus Holland-Moritz. All rights reserved.
# This program is free software; you can redistribute it and/or modify
# it under the same terms as Perl itself.
#
####################################################... |
#!/usr/bin/env bash
# make sure error stop script
set -e
# Save some useful information
REPO=`git config remote.origin.url`
SSH_REPO=${REPO/https:\/\/github.com\//git@github.com:}
HEAD_HASH=`git rev-parse --verify HEAD` # latest commit hash
HEAD_HASH=${HEAD_HASH: -7} # get the last 7 characters of hash
# install sys... |
package data
import (
"bytes"
"fmt"
"testing"
"github.com/akrylysov/pogreb"
"github.com/akrylysov/pogreb/fs"
"github.com/stretchr/testify/assert"
)
var testUser = User{UUID: "uuid11"}
var testAccount1 = Account{
Name: "Test 1",
Currency: "USD",
IncludeInTotal: false,
ShowInList: true,
... |
% Problem Solving with Prolog by John Stobo
% terminating
%query: hidden_flatten(i,o,o).
hidden_flatten([],L,L).
hidden_flatten([[H|T]|L],S,F) :- !, hidden_flatten(L,S,Lf), hidden_flatten([H|T],Lf,F).
hidden_flatten([H|T],S,[H|L]) :- hidden_flatten(T,S,L).
|
#include <cmath>
#include <cstdint>
#include <cstdio>
#ifdef __SSE2__
#include <emmintrin.h>
#elif __ARM_NEON
#include <arm_neon.h>
#endif
#include <random>
#include "halide_blur.h"
#include "halide_blur_classic_auto_schedule.h"
#include "halide_blur_auto_schedule.h"
#include "benchmark_util.h"
#include "halide_bench... |
package com.braunster.chatsdk.activities;
/**
* Created by DELL on 10/21/2017.
*/
import android.os.Handler;
import android.os.SystemClock;
import android.util.Log;
public class RideTimer {
/** Called when the activity is first created. */
private long startTime = 0L;
private Handler myH... |
use std::fmt;
use crc::crc32::Hasher32;
use crc::crc32::Digest;
use crc::crc32::IEEE;
use crc::crc32::CASTAGNOLI;
use crc::crc32::KOOPMAN;
use prelude::*;
use util::fmt_slice2hex;
// -------------------------------------------------------------------------------------------------
#[derive(Debug, Default, Clone, C... |
# Web Components - Master Badge

-----
## Goal
- You have already completed the Apprentice and Journeyman levels of this category, to be sure you are properly prepared to mentor others as a master.
- You have demonstrated t... |
package discord
import (
"context"
"fmt"
"github.com/bwmarrin/discordgo"
"github.com/leighmacdonald/gbans/internal/config"
"github.com/leighmacdonald/gbans/internal/model"
"github.com/leighmacdonald/gbans/pkg/logparse"
"github.com/leighmacdonald/gbans/pkg/util"
"github.com/leighmacdonald/steamid/v2/steamid"
"... |
// © 2022 Adrian Clark
// This file is licensed to you under the MIT license.
namespace Aydsko.iRacingData.Common;
internal class LinkResult
{
[JsonPropertyName("link")]
public string Link { get; set; } = default!;
}
[JsonSerializable(typeof(LinkResult)), JsonSourceGenerationOptions(WriteIndented = true)]
i... |
// Copyright © Amer Koleci and Contributors.
// Licensed under the MIT License (MIT). See LICENSE in the repository root for more information.
#pragma once
#include "Core/RefCount.h"
#include "Graphics/PixelFormat.h"
#include "Math/Color.h"
namespace Alimer
{
/* Constants */
static constexpr uint32_t kMaxFra... |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace PusherServer
{
/// <summary>
/// A Web Hook Event
/// </summary>
public class WebHookEvent
{
}
}
|
import Element from "./Element.js"
export default class Social extends Element{
constructor(title,list){
super()
var t = document.createElement("div");
t.innerHTML = title;
t.style.textAlign= "right";
t.style.fontWeight = "bold";
t.style.paddingTop = "5px"
for (let node of list){
if... |
var searchData=
[
['tsc_5fseed',['tsc_seed',['../d2/dfe/structrng_1_1tsc__seed.html',1,'rng']]]
];
|
@extends('restricted.layout.site')
@section('title', 'Criar Cliente')
@section('content')
<div aria-label="breadcrumb" style="margin:30px;">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{{ route('user.homePanel') }}">Home</a></li>
<li class="breadcrumb-item"><a href="{{ route('customer.all') ... |
"""
Set the contents of variables and registers using raw data
"""
import os, time
import unittest2
import lldb
from lldbtest import *
import lldbutil
@skipUnlessDarwin
class SetDataTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
@dsym_test
def test_set_data_dsym(self):
"""Test sett... |
package db
import (
"database/sql"
"fmt"
"log"
_ "github.com/mattn/go-sqlite3"
)
var (
db *sql.DB
dbPath = "./todo.db"
queries = map[string]string{}
prep = map[string]*sql.Stmt{}
)
func Load() {
var err error
db, err = sql.Open("sqlite3", dbPath)
if err != nil {
log.Fatalf("unable to open db: ... |
package com.github.bordertech.webfriends.api.common.context;
/**
* Element with a custom context (marker interface).
*/
public interface CustomContext extends AllowedContext {
}
|
// Credit:
// https://github.com/davidtheclark/tabbable
const candidateSelector =
'input,select,textarea,a[href],button,[tabindex],' +
'audio[controls],video[controls],' +
'[contenteditable]:not([contenteditable="false"])'
export interface Tabbables {
documentOrder: number
tabIndex: number
node: HTMLElemen... |
---
title: Kubernetes
---
## Installation
1. Digital Ocean cluster, dev mode ($30)
```
brew install kubectl
brew install doctl
```
doctl
2. Helm
```
helm repo add portainer https://portainer.github.io/k8s/
helm repo update
```
Cluster:
```
doctl kubernetes cluster kubeconfig save 85be81c7-5e23-485b-b1fc-... |
"use strict";
var noop = require("../util/noop");
var Environment = require("../environment/Environment");
var CloseableView = {
onClose: noop,
close: function() {
var onCloseError;
this.trigger("close");
onCloseError = ifOnCloseError(this);
this.unbind();
this.rem... |
using System;
public static class PlayAnalyzer
{
public static string AnalyzeOnField(int shirtNum)
{
throw new NotImplementedException($"Please implement the (static) PlayAnalyzer.AnalyzeOnField() method");
}
public static string AnalyzeOffField(object report)
{
throw new NotImplem... |
(include-book "../test-stuff")
(include-book "oslib/argv" :dir :system)
;; See theorem compare-disks-correctness-1 in test-stuff.lisp for a proof of
;; correctness of this procedure.
(b*
(((mv & image-path1 state)
(getenv$ "REF_INPUT" state))
((mv & image-path2 state)
(getenv$ "INPUT" state))
... |
package org.apache.hadoop.hbase.regionserver.index.jobs;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import java.io.IOException;
import java.util.concurrent.atomic.AtomicLong;
public abstract class BasicJob {
protected static final Log LOG = LogFactory.getLog(BasicJob.class... |
CREATE DATABASE test_db OWNER test;
-- CREATE UNIQUE INDEX CONCURRENTLY ON bb_users(email, username, status, user_role, created_at, updated_at); |
#!/bin/bash
# Destroy existing vagrant boxes
cd ub-riemanna
vagrant destroy -f
rm -rf ./.vagrant
cd ../centos-riemannb
vagrant destroy -f
rm -rf ./.vagrant
cd ../ub-riemannmc
vagrant destroy -f
rm -rf ./.vagrant
cd ../ub-graphitea
vagrant destroy -f
rm -rf ./.vagrant
cd ../centos-graphiteb
vagrant destroy -f
rm -rf... |
package com.jintin.dagger
import dagger.Binds
import dagger.Module
@Module
abstract class HoneyLemonadeModule {
// @Provides
// fun provideLemon(water: Water): Lemon {
// return Lyme(water)
// }
@Binds
abstract fun provideLemon(lyme: Lyme): Lemon
} |
# zammad-workers
Zammad workers using Sidekiq to improve on background jobs
Currently it is still in development to target the most busiest job tasks in Zammad, which is Transactions Job.
|
# iwlist
... scan wifi networks
## scan available wifi networks
```shell
sudo iwlist wlan0 scanning | grep ESSID
```
|
import 'dart:ui';
import 'package:flutter/material.dart';
class HelloPage extends StatefulWidget {
@override
_HelloPageState createState() => _HelloPageState();
}
class _HelloPageState extends State<HelloPage> with TickerProviderStateMixin {
AnimationController _animationController;
@override
void initStat... |
package primitives
import (
"math/big"
"testing"
)
func TestBlockHeader_GetHash_Block125552(t *testing.T) {
bh := BlockHeader{
Version: 1,
HashPrevBlock: big.NewInt(0),
HashMerkleRoot: big.NewInt(0),
Time: 1305998791,
Bits: 440_711_666,
Nonce: 2_504_433_986,
}
bh.... |
package practice
/**
First scala code
*/
object PrintFirst10Numbers extends App {
for (i <- 1 to 10) println(i)
} |
# frozen_string_literal: true
module Metar
module Data
class TemperatureAndDewPoint < Metar::Data::Base
def self.parse(raw)
return nil if !raw
m = raw.match(%r{^(M?\d+|XX|//)\/(M?\d+|XX|//)?$})
return nil if !m
temperature = Metar::Data::Temperature.parse(m[1])
dew... |
/**
* Copyright 2017 Matt Acosta
*
* 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 to... |
package org.jetbrains.plugins.scala
package lang
package parser
package parsing
package expressions
import com.intellij.lang.PsiBuilder
import org.jetbrains.plugins.scala.lang.lexer.{ScalaTokenType, ScalaTokenTypes}
import org.jetbrains.plugins.scala.lang.parser.parsing.builder.ScalaPsiBuilder
import org.jetbrains.plu... |
require 'zlib'
module ActiveRecord
module ShardFor
class HashModuloRouter < ConnectionRouter
# @param [String] key sharding key
def route(key)
hash(key) % connection_count
end
private
def hash(v)
Zlib.crc32(v.to_s)
end
end
end
end
|
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.domain;
import java.util.Objects;
public abstract class Entity<T> {
private T id;
protected Entity(T id) {
this.id = id;
}
public T getId() {
return id;
}
public void ide... |
using JetBrains.Annotations;
namespace XyrusWorx.Diagnostics
{
[PublicAPI]
public enum LogVerbosity
{
Debug = -2,
Verbose = -1,
Normal = 0,
WarningsAndErrors = 1,
ErrorsOnly = 2
}
} |
(FITCH-COMBINE-SCORES1
(7 4 (:TYPE-PRESCRIPTION MIN-NIL-INF))
)
(FITCH-COMBINE-SCORES1-CAR
(741 591 (:REWRITE DEFAULT-CAR))
(564 425 (:REWRITE DEFAULT-CDR))
(370 284 (:REWRITE DEFAULT-+-2))
(284 284 (:REWRITE NORMALIZE-TERMS-SUCH-AS-A/A+B-+-B/A+B))
(284 284 (:REWRITE NORMALIZE-ADDENDS))
(284 284 (:REWRITE DEFAU... |
import React from 'react';
import PropTypes from 'prop-types';
import CircularProgress from '@mui/material/CircularProgress';
import { makeStyles } from '@mui/material/styles';
import Typography from '@mui/material/Typography';
const useStyles = makeStyles({
root: {
width: '100%',
textAlign: 'center',
},
}... |
import { notification } from 'antd';
import React, { useEffect } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import { Route, Switch, useRouteMatch } from 'react-router';
import { useInjectReducer, useInjectSaga } from 'utils/redux-injectors';
import CreateForm from './CreateForm';
import Overv... |
#!/usr/bin/env bash
PREFIX=/opt
ENABLE_SERVICE=1
if [ $# -gt 0 ];then
if [ "$(echo $1|cut -d '=' -f1)" = "--prefix" ];then
prefix_tmp="$(echo $1|cut -d '=' -f2)"
if [ "$prefix_tmp" != "" ];then
PREFIX="$prefix_tmp"
fi
fi
fi
cmd () {
echo "$" "$@"
"$@"
ret=$?
if [ $ret -ne 0 ];then
... |
package net.anotheria.moskito.extensions.codebeamer;
import net.anotheria.anoplass.api.APIFactory;
import net.anotheria.anoplass.api.APIFinder;
import net.anotheria.anoprise.metafactory.ServiceFactory;
import net.anotheria.moskito.webui.accumulators.api.AccumulatorAPI;
public class CBAccumulatorApiFactory impl... |
---
title: Calender 日历组件
---
# Calender 日历组件
### 使用方法
<ClientOnly>
<calendar-demo/>
</ClientOnly>
### 示例代码:
```vue
<x-calendar></x-calendar>
```
|
import React from "react";
import fetch from "isomorphic-fetch";
import { withRouter } from "next/router";
import MainLayout from "components/MainLayout";
import BreadcrumbsModule from "components/PrimarySourceSetsComponents/BreadcrumbsModule";
import ImageAndCaption from "components/ExhibitionsComponents/Exhibition/I... |
using System;
namespace Enigma.Reflection.Emit
{
public interface IILCode
{
void Generate(ILExpressed il);
}
public interface IILCodeParameter
{
Type ParameterType { get; }
void Load(ILExpressed il);
void LoadAddress(ILExpressed il);
}
}
|
#
# Copyright (c) 2013-2021 Christian Jaeger, copying@christianjaeger.ch
#
# This is free software, offered under either the same terms as perl 5
# or the terms of the Artistic License version 2 or the terms of the
# MIT License (Expat version). See the file COPYING.md that came
# bundled with this file.
#
=head1 NAME... |
import 'package:cloud_firestore/cloud_firestore.dart';
extension AppFireStore on FirebaseFirestore {
CollectionReference get branch => collection('branch');
CollectionReference get issueCaseCollection => collection('issueCase');
CollectionReference get doctorCollection => collection('doctor');
CollectionRef... |
/* Write a program that reads a string from the console and replaces
all series of consecutive identical letters with a single one.*/
using System;
using System.Text;
namespace _23.SeriesOfLetter
{
class SeriesOfLetter
{
static void Main(string[] args)
{
Console.WriteLine("En... |
module Vmdb::Loggers
class IoLogger < StringIO
def initialize(logger, level = :info, prefix = nil)
@logger = logger
@level = level
@prefix = prefix
super()
end
def write(*args)
args.each do |arg|
@buffer ||= ""
@buffer << arg
dump_buffer if arg.inclu... |
require 'active_record'
module XM
module Models
class Schedule < ActiveRecord::Base
ActiveRecord::Base.establish_connection adapter: 'sqlite3',
database: File.expand_path('../../../schedules/schedules.db', __FILE__)
self.inheritance_column = nil
end
end
end
|
class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController
def cas
auth = request.env["omniauth.auth"]
@user = User.where(email: auth["uid"].downcase).first
if @user.present?
sign_in_and_redirect @user, event: :authentication
else
redirect_to new_user_session_path error... |
class AllLanguages {
static const zh_Hant_HK = 'zh_Hant_HK';
static const zh_MO = 'zh_MO';
static const zh_Hans_MO = 'zh_Hans_MO';
static const zh_Hans = 'zh_Hans';
static const zh_Hant = 'zh_Hant';
static const zh_Hant_TW = 'zh_Hant_TW';
static const zh_Hant_MO = 'zh_Hant_MO';
static const zh_SG = 'zh_... |
import { Payment, PaymentArgs } from 'connext/types'
import { CustodialPaymentsDao } from './CustodialPaymentsDao'
import { PaymentMetaDao } from '../dao/PaymentMetaDao'
import { default as DBEngine, SQL } from '../DBEngine'
import { assert, getTestConfig, getTestRegistry, TestServiceRegistry } from '../testing'
impo... |
import { __decorate } from "tslib";
import { CommonModule } from "@angular/common";
import { NgModule } from "@angular/core";
import { FormsModule, ReactiveFormsModule } from "@angular/forms";
import { RouterModule } from "@angular/router";
import { AppButtonModule } from "src/app/components/button/button.module";
impo... |
use lockbook_core::repo::local_storage;
use test_utils::test_config;
#[test]
fn read() {
let db = &test_config();
let result: Option<Vec<u8>> = local_storage::read(db, "namespace", "key").unwrap();
assert_eq!(result, None);
}
#[test]
fn write_read() {
let db = &test_config();
local_storage::wri... |
---
name: bucket.diskCreateOperationsPerSecond
type: attribute
events:
- CouchbaseBucketSample
---
Number of new items created on disk per second for this bucket. |
/*
* Copyright (C) 2012-2018 Gregory Hedlund
*
* 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 a... |
import { useCallback, useMemo, useState } from "react";
import { useAxiosWithTokenRefresh } from "./auth-api";
import {
OrganizationListenerData,
OrganizationListenerDeleteData,
OrganizationListenerPostData,
OrganizationListenerViewProps,
} from "../../types/organizations";
import { errorHandlerWrapper, resolve... |
use itertools::Itertools;
use serde_scan::scan;
use std::{collections::HashMap, fs};
type Point = (usize, usize);
fn read_input() -> Vec<(Point, Point)> {
let raw_data = fs::read_to_string("inputs/5").unwrap();
raw_data
.lines()
.map(|line| -> (Point, Point) { scan!("{},{} -> {},{}" <- line).u... |
Recreation of the classic game Mastermind.
A user navigates through text-based menus to read instructions, play, and set a difficulty. After setting a difficulty,
the user attempts to guess the pattern that is set randomly by the computer. Feedback is given after each guess.
Upon successfully guessing the pattern, th... |
<?php
declare(strict_types=1);
namespace Onliner\ImgProxy\Options;
final class Extend extends Option
{
/**
* @var bool
*/
private $extend;
/**
* @var Gravity|null $gravity
*/
private $gravity;
public function __construct(bool $extend = true, string $gravity = null)
{
... |
//! This package provides various utility types and function that are too small
//! to live in a separate package.
#[macro_use]
extern crate bitflags;
#[macro_use]
extern crate features;
pub mod byte_slice_fmt;
#[cfg(unix)]
pub mod command;
pub mod deterministic_operations;
pub mod fs;
pub mod ic_features;
pub mod rl... |
// UnicodeFileToHtmlTextConverter exercise:
// write the unit tests for the UnicodeFileToHtmlTextConverter class.
// The UnicodeFileToHtmlTextConverter class is designed to reformat
// a plain text file for display in a browser.
describe('Unicode To Html Converter', function () {
describe('UnicodeFileToHtml... |
package parsers
// Define types of expression tokens.
const (
Unknown = iota
LeftBrace
RightBrace
LeftSquareBrace
RightSquareBrace
Plus
Minus
Star
Slash
Procent
Power
Equal
NotEqual
More
Less
EqualMore
EqualLess
ShiftLeft
ShiftRight
And
Or
Xor
Is
In
NotIn
Element
Null
Not
Like
NotLike
Is... |
using System.Web;
using System.Web.Optimization;
namespace Hack121.Mvc
{
public class BundleConfig
{
// For more information on Bundling, visit http://go.microsoft.com/fwlink/?LinkId=254725
public static void RegisterBundles(BundleCollection bundles)
{
bundles.Add... |
package typingsSlinky.lodash.fpMod
import typingsSlinky.lodash.mod.ValueIterateeCustom
import typingsSlinky.lodash.mod.__
import org.scalablytyped.runtime.StObject
import scala.scalajs.js
import scala.scalajs.js.`|`
import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, JSBracketAccess}
@js.na... |
default_action :create
attribute :name,
[String, Symbol],
required: true
attribute :db_type,
[:mysql, 'mysql', :postgresql, 'postgresql', :mongodb, 'mongodb'],
required: true
attribute :cron_minute,
[String, Integer],
default: lazy { get_default(:cron_minut... |
set linesize 130
set pagesize 1000
SELECT *
FROM TABLE(DBMS_XPLAN.DISPLAY_CURSOR('&sql_id',&child));
|
import Data.List(takeWhile)
primes :: [Integer]
primes = sieve [2..] where
sieve (p:ps) = p:sieve [q | q<-ps, q `mod` p /= 0]
isInt f = floor f == ceiling f
intSqrt :: Integral a => a -> (a, Bool)
intSqrt n = (floor f, isInt f) where
f = sqrt $ fromIntegral n
weirdNs :: [Integer]
weirdNs = helper primes where
... |
package packetdump
import (
"github.com/pion/rtcp"
"github.com/pion/rtp"
)
// RTPFilterCallback can be used to filter RTP packets to dump.
// The callback returns whether or not to print dump the packet's content.
type RTPFilterCallback func(pkt *rtp.Packet) bool
// RTCPFilterCallback can be used to filter RTCP pa... |
/*
* Copyright (C) 2017 The Android Open Source Project
*
* 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 app... |
//
//
//import 'package:date/date.dart';
//import 'package:timezone/standalone.dart';
//import 'package:timeseries/timeseries.dart';
//import 'package:elec/src/time/calendar/calendars/nerc_calendar.dart';
//import 'package:load_viewer/src/lib_data.dart';
//import 'package:load_viewer/lib_shape_analysis.dart';
//import ... |
package io.kommons.designpatterns.cqrs
import io.kommons.designpatterns.cqrs.commands.CommandService
import io.kommons.designpatterns.cqrs.domain.repository.AuthorRepository
import io.kommons.designpatterns.cqrs.domain.repository.BookRepository
import io.kommons.designpatterns.cqrs.queries.QueryService
import io.kommo... |
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Linkedmall\V20180116\Models\ModifyBasicAndBizItemsRequest\itemList;
use AlibabaCloud\Tea\Model;
class skuList extends Model
{
/**
* @var string
*/
public $benefitId;
/**
* @var int
*/
public ... |
# Contribors to oauth2client
## Maintainers
* [Nathaniel Manista](https://github.com/nathanielmanistaatgoogle)
* [Jon Wayne Parrott](https://github.com/jonparrott)
* [Danny Hermes](https://github.com/dhermes)
Previous maintainers:
* [Craig Citro](https://github.com/craigcitro)
* [Joe Gregorio](https://github.com/jc... |
'use strict';
module.exports = (sequelize, DataTypes) => {
var Event = sequelize.define('Event', {
date_start: DataTypes.DATE,
date_end: DataTypes.DATE,
date_create: DataTypes.DATE,
title: DataTypes.TEXT,
content:DataTypes.TEXT,
description:DataTypes.TEXT,
status:DataTypes.TEXT,
url_im... |
# ✅ Quiz M5.03
```{admonition} Question
When fitting a decision tree regressor in scikit-learn, the predicted values at
a leaf corresponds to:
- a) the median of the training samples at this node
- b) the mean of the training samples at this node
- c) the most frequent value of the training samples at this node
```
... |
using System;
using System.Runtime.InteropServices;
using jumpfs.Bookmarking;
namespace jumpfs.EnvironmentAccess
{
public static class ShellGuesser
{
public static ShellType GuessShell(IEnvironment env)
{
//if the user has not specified the shell, try to guess it from environmental... |
import {Middleware} from './middleware'
import {RequestInit} from 'node-fetch'
import {get, set} from './url'
import params from 'jquery-param'
declare module 'node-fetch' {interface RequestInit {query?: string | {[key: string]: string | string[]}}}
export const query: Middleware = (url, init, next) => {
if (init &... |
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#pragma once
#include <AzCore/Module/Module.h>
namespace AzToolsFramework
{
class AzToolsFram... |
/** @module FilterNodeFactory */
import FilterCombinators from './filtercombinators';
import SimpleFilterNode from './simplefilternode';
import CombinedFilterNode from './combinedfilternode';
/**
* FilterNodeFactory is a class containing static helper methods for
* generating FilterNodes.
*/
export default class F... |
using Pliant.Forest;
using Pliant.Tokens;
namespace Pliant.Tree
{
public sealed class TokenTreeNode : ITokenTreeNode
{
public TokenTreeNode(ITokenForestNode innerNode)
{
this.innerNode = innerNode;
}
public int Location => this.innerNode.Location;
public I... |
from pathlib import Path
from django.test import TestCase
from thumbnails import get_thumbnail
import os.path
# Create your tests here.
class MyTests(TestCase):
def test_thumbnail(self):
# path = os.path.abspath('public/media/elmar.jpg')
path = '/Volumes/Work/Projects/ElmarHinzDjango/public/med... |
module.exports = function check(str, bracketsConfig) {
// if ((str.length % 2) !== 0) return false; // test 2/20
// newStrArr.forEach(el => (!bracketsConfig.flat().includes(el)) ? false : true); // test 13/20
const newConfig = bracketsConfig.map(el => el.join('')); ... |
package com.pedrocosta.exchangelog.models;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;
import java.util.Objects;
@Entity
@Table(uniqueConstraints = @UniqueConstraint(
columnNames = {
"base_currency_id",
"quote_currency_id",
"value_date"
})
)
public class Exchange im... |
package com.sitamadex11.CovidHelp.adapter
import android.content.Context
import android.content.Intent
import android.graphics.Color
import android.net.Uri
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.TextView
import android.widget.Toast
import android... |
package com.naram.party_project.chattingModel
data class Message(
var uid: String,
var name: String? = null,
var picture: String? = null,
var message: String,
var timestamp: Any
)
|
# frozen_string_literal: true
require 'renderful/error/base'
require 'renderful/error/entry_not_found_error'
require 'renderful/error/no_component_error'
require 'renderful/cache/base'
require 'renderful/cache/redis'
require 'renderful/cache/null'
require 'renderful/content_entry'
require 'renderful/provider/base'
req... |
//
// Author:
// Aaron Bockover <abock@microsoft.com>
//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
using System.Text;
usin... |
{-
Sumar el triple del primero al segundo
> sumarNumeroAlTriple 3 2
sumarNumeroAlTriple a b = ((+) . (*3)) a b
1) Primero hace (*3) a,
la función (*) sólo toma dos argumentos
uno de los argumentos es "3" porque esta dentro del ()
y el otro argumento es a, y devuelve el product... |
package de.rdnp.preflight.flightplanner;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
i... |
SELECT date_format(sec_to_time(trfh_duree*60),'%Hh%i') AS 'Durée Max',
concat(trfh_tarif,' €') AS 'tarif'
FROM TARIF_HORAIRE |
--
ALTER TABLE `services_package` ADD `all_services` tinyint default 0;
ALTER TABLE `users` MODIFY `comment` text;
--//@UNDO
ALTER TABLE `services_package` DROP `all_services`;
-- |
<?php
namespace App\Http\Controllers;
use App\Category;
use App\ToDoList;
use Illuminate\Http\Request;
use App\Http\Requests;
class ToDoListController extends Controller
{
// Basic Index Page For Showing ToDoList Items
public function index()
{
// $list = ToDoList::find(2);
// $category =... |
from random import randint
num_updates = 0
maximum = randint(1, 100)
print("{}".format(maximum))
for i in range(99):
new_num = randint(1, 100)
if new_num > maximum:
maximum = new_num
num_updates += 1
print("{} (atualizado)".format(new_num))
else:
print("{}".format(new_num))... |
// Copyright 2020 PDFium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include "core/fxcodec/gif/gif_progressive_decoder.h"
#include "core/fxcodec/... |
package org.sxchinacourt.util;
import android.util.Log;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
/**
* Created by 殇冰无恨 on 2018/3/13.
*/
public class TimeUtils {
/**
* 获取当前时间
* @return
*/
public static String getNowT... |
/*
* Copyright 2018 Zhang Di
*
* 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 la... |
<?php
namespace Kartenmacherei\RestFramework\UnitTests\Request;
use Kartenmacherei\RestFramework\Request\Pattern;
use PHPUnit\Framework\TestCase;
/**
* @covers \Kartenmacherei\RestFramework\Request\Pattern
*/
class PatternTest extends TestCase
{
/**
* @dataProvider patternValueProvider
*
* @param... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.