text stringlengths 27 775k |
|---|
package com.yuyakaido.android.cardstackview.sample
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.webkit.WebView
import android.widget.Toast
import androidx.recyclerview.widget.RecyclerView
class CardStackAdapter(
private var htmlList: List<String> = e... |
package com.github.bohnman.squiggly.context.provider;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.ser.PropertyWriter;
import com.github.bohnman.squiggly.context.SquigglyContext;
/**
* Used for supplying a @{@link com... |
# coding=utf-8
import torch
import torch.nn as nn
import cfg
import numpy as np
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
def quad_loss(y_true, y_pred):
if y_true.size(1) == 7:
y_true = y_true.permute(0, 2, 3, 1) # NCHW->NHWC
y_pred = y_pred.permute(0, 2, 3, 1) # NC... |
# Angular and Angular Material Helper for Django
[![Travis]][Travis Link] [![Code Climate]][Code Climate Link] [![Coveralls]][Coveralls Link]
[Travis]: https://travis-ci.org/hiroaki-yamamoto/django-nghelp.svg?branch=master
[Travis Link]: https://travis-ci.org/hiroaki-yamamoto/django-nghelp
[Code Climate]: https://cod... |
<?php
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
use App\Models\App;
use App\Http\Controllers\Controller;
/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you... |
package io.github.jbarr21.runterval.app
import android.app.AlarmManager
import android.app.Application
import android.os.Vibrator
import androidx.core.content.getSystemService
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
@InstallIn(Singleton... |
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
module Mtg.Effects where
import Control.Applicative
import Control.Lens hiding ((...))
import Control.Mo... |
---
title: "OpenSearch 插件列表"
description: 本小节主要介绍 OpenSearch 集成插件列表。
keyword: OpenSearch 插件列表,OpenSearch,搜索引擎,大数据
weight: 05
collapsible: false
draft: false
---
本小节主要介绍 OpenSearch 集成插件列表。
- opensearch-analysis-ik
- analysis-icu
- analysis-kuromoji
- analysis-nori
- analysis-phonetic
- analysis-smartcn
- analysis-stem... |
# megadetector
## Instructions
- For LSF clusters (e.g., Henry2), follow the instructions [here](lsf/README.md).
- For SLURM clusters (e.g., Crane), follow the instructions [here](slurm/README.md).
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 1999-2018 Alibaba Group Holding Ltd.
#
# 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-... |
#include <string>
#include "./07_CircleDeque.h"
#include "./Person.h"
using namespace app;
int main()
{
CircleDeque<Person> deque;
for (size_t i = 0; i < 10; ++i)
{
deque.push_front(make_shared<Person>(i + 1, "Alice" + to_string(i + 1)));
deque.push(make_shared<Person>(i + 100, "Alice" + to... |
package water.webserver;
import org.apache.commons.io.IOUtils;
import water.ExtensionManager;
import water.api.RequestServer;
import water.server.ServletService;
import water.server.ServletUtils;
import water.util.Log;
import water.webserver.iface.*;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.Ht... |
package com.reactnative.googlecast.types;
import androidx.annotation.Nullable;
import com.google.android.gms.cast.MediaStatus;
public class RNGCMediaPlayerIdleReason {
public static int fromJson(final @Nullable String value) {
switch (value) {
case "cancelled":
return MediaStatus.IDLE_REASON_CANCELED... |
/*
*
* Copyright 2012 Samsung Electronics S.LSI Co. LTD
*
* 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 ap... |
require 'active_support'
module VertexClient
module Resource
class Base
def initialize(params)
@payload = payload_type.new(params)
end
def result
@result ||= (response ? formatted_response : fallback_response)
end
def config_key
demodulized_class_name.under... |
package main
import (
"fmt"
"io/ioutil"
"log"
"os"
"strings"
"github.com/confluentinc/confluent-kafka-go/kafka"
yaml "gopkg.in/yaml.v2"
)
const initConfig = `schema.version: "1.0"
# tls.cert.file: my-domain.crt
# tls.key.file: my-domain.key
kafka.to.websocket:
- kafka.consumer.config:
# https://githu... |
# frozen_string_literal: true
require_relative '../test_helper'
SingleCov.covered!
describe SamsonRollbarHook do
let(:deploy) { deploys(:succeeded_test) }
let(:stage) { deploy.stage }
describe :after_deploy do
it "sends notification on after hook" do
stage.rollbar_webhooks.build(webhook_url: 'https:/... |
using NetRt.Assemblies;
using NetRt.Metadata.TableElements;
namespace NetRt.TypeLoad.TypeSystem
{
public class DefinedType : TypeInformation
{
public override int Size { get; }
public override Field[] Fields { get; }
public override MethodDef[] Methods { get; }
public override... |
#!/bin/bash
# thanks to http://blog.gimco.es/2017/05/08/tuenti-challenge-7.html#5-ghost-in-the-http
for range in $(seq 0 13 3445); do
# echo -n "$range"
curl -v -k https://52.49.91.111:8443/ghost -r $range- >> ghost.b64
done
|
<div>
Hi this is:{{$name}}
</div> |
# VSCode Terraform LSP Client
Mostly adapted from [lsp-sample](https://github.com/microsoft/vscode-extension-samples/tree/master/lsp-sample)
Use with [Terraform-LSP](https://github.com/juliosueiras/terraform-lsp)
## To-do
- Getting Started Guide
|
class RenameColumnIsActiveToIsEnabledFromAlerts < ActiveRecord::Migration[5.0]
def change
rename_column :alerts, :is_active, :is_enabled
add_column :alerts, :is_silenced, :boolean
end
end
|
#!/bin/bash
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
src="$DIR/../"
dest=/opt/ort
bin=/usr/local/bin
ort_name=ort
ort_server_name=ort_server
|
library nvm;
import 'dart:convert';
import 'package:flutter/services.dart' show rootBundle;
export 'api.dart';
export 'widgets.dart';
export 'utils.dart';
enum BuildMode { Debug, Product }
class Nvm {
static final Nvm _instance = Nvm();
static Nvm getInstance() => _instance;
BuildMode getBuildMode() => bool.... |
%% Copyright (c) 2016 Peter Morgan <peter.james.morgan@gmail.com>
%%
%% 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... |
import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormGroup, AbstractControl, Validators } from '@angular/forms';
import { AuthenticationService, UserDto, UpdatePasswordDto, UserService } from '../../../../_auth.collection';
import { MatSnackBar } from '@angular/material';
import { Router } from ... |
package com.phoenix.kspt.utils
import android.support.v4.app.FragmentManager
import android.support.v4.app.FragmentStatePagerAdapter
import com.phoenix.kspt.firebase.FirebaseFragment
import com.phoenix.kspt.ovt.theme_one.fragments.NumbersFragment
class ScreenSlidePagerAdapter(manager: FragmentManager) : FragmentState... |
#!/bin/bash
./configure
make -j${CPU_COUNT}
cp b/aodp $PREFIX/bin
|
using UnityEngine;
namespace Asset_Replacer
{
abstract class ReplacementConfiguration
{
public string PartID { get; set; }
}
class TextureConfiguration : ReplacementConfiguration
{
public Texture2D Texture { get; set; }
public WWW www { get; set; }
public bool re... |
package org.evomaster.core.search.service.mutator
import org.evomaster.core.search.EvaluatedIndividual
import org.evomaster.core.search.Individual
import org.evomaster.core.search.gene.Gene
class EmptyStructureMutator : StructureMutator() {
override fun addInitializingActions(individual: EvaluatedIndividual<*>... |
# frozen_string_literal: true
# mixin to automate testing of Rest services per controller test
require 'json_rest_test_cases'
module RestTestCases
extend ActiveSupport::Concern
# types that should be skipped for JSON testing
SKIPPED_JSON = %w[Sample SampleType Strain].freeze
included do
type_name = con... |
<?php (defined('BASEPATH')) OR exit('No direct script access allowed');
class MY_Controller extends MX_Controller
{
protected $aFields = array();
public $activeModule = "";
protected $aVars = array();
protected $oUser;
function __construct()
{
$this->benchmark->mark('execution_time: c... |
<?php
declare(strict_types=1);
namespace Barryosull\Slim;
class UrlService
{
private $contentRepository;
public function __construct()
{
$this->contentRepository = new ContentRepository();
}
/**
* @return string[]
*/
public function getAvailableUrls(): array
{
$... |
use alloc::rc::Rc;
use alloc::{vec, vec::Vec};
use hashbrown::HashMap;
/// The variants to control memory read access from the CPU.
pub enum MemRead {
/// Replaces the value passed from the memory to the CPU.
Replace(u8),
/// Shows the actual value passed from the memory to the CPU.
PassThrough,
}
///... |
require 'rails_helper'
RSpec.describe 'Attachments API' do
let(:user) { create(:user) }
let(:another_user) { create(:user) }
let!(:message) { create(:message, user_id: user.id, from_user_id: another_user.id) }
let!(:attachments) { create_list(:attachment, 20, message: message) }
let(:message_id) { message.id... |
import { Router } from "express";
import { User } from "../../models/user";
import createError from "http-errors";
import * as utils from "./utils";
const router = Router();
router.get("/token", utils.restrictRoute, async (req, res, next) => {
if (!req.user) return next(createError(500, "Something went wrong :/"));
... |
import { NextFunction, Request, Response } from 'express';
import httpStatus from 'http-status';
import jsonwebtoken from 'jsonwebtoken';
export interface IUserRequest extends Request {
user?: any;
email?: any;
}
export default class Authenticate {
public getUser = (token: any): any => {
jsonwebtoken.verify(... |
#THIS SCRIPT IS LICENSED UNDER CC0, IN OTHER WORDS, PUBLIC DOMAIN.
#YOU CAN DO WHATEVER YOU WANT WITH IT. I DON'T CARE, IT'S INCREDIBLY TRIVIAL AND MINIMALIST (AND NOT IMPRESSIVE)
#THAT IT DOESN'T JUSTIFY USING GPL.
#!/bin/sh
echo "The audio file will begin in 10 seconds. Press Ctrl + c to terminate the script."
sl... |
// Copyright (c) 2018 10X Genomics, Inc. All rights reserved.
// compile/check types.
package syntax
// Build type table, starting with builtins. Duplicates allowed.
func (global *Ast) compileTypes() error {
for _, builtinType := range builtinTypes {
global.TypeTable[builtinType.Id] = builtinType
}
for _, userT... |
import { ITheme } from "utils/types";
import { createUseStyles } from "react-jss";
import { lightenDarkenColor } from "utils/colorConverter";
export default createUseStyles((theme: ITheme) => ({
ProgressBar: {
alignItems: "center",
display: "flex",
flexDirection: "column",
justifyContent: "space-betw... |
require 'attr_splitter'
require 'supermodel'
require 'active_support'
require 'action_pack'
require 'action_view'
require 'action_controller'
require 'action_dispatch'
ActionView::Helpers::FormBuilder.send :include, AttrSplitter::FormBuilderAdditions |
import { configure, addDecorator } from '@storybook/vue';
import { jsxDecorator } from 'storybook-addon-jsx';
addDecorator(jsxDecorator);
function loadStories() {
require('../stories/index.js');
// You can require as many stories as you need.
}
configure(loadStories, module);
|
using SharpDX;
using System.Collections.Generic;
public class MixamoPose {
public Dictionary<string, Quaternion> JointRotations {get; }
public Vector3 RootTranslation {get; }
public MixamoPose(Dictionary<string, Quaternion> jointRotations, Vector3 rootTranslation) {
JointRotations = jointRotations;
RootTransla... |
fn main() {
println!("Lets Learn vectors in this ");
let mut names = vec!["Azhar", "Sheetal", "John", "Dimitry"];
println!("Last Name is : {}", names.last().expect("hahah"));
names.iter().for_each(|x| println!("{}", x));
println!("Length is : {}", names.len());
// unsafe {
// names.s... |
# frozen_string_literal: true
class CustomFailureApp < Devise::FailureApp
def respond
http_auth
end
end
|
class ProxyCloud(object):
def __init__(self, ip,port,type='socks5'):
self.ip = ip
self.port = port
self.default = None
self.type = type
def set_default (self,socket):
self.default = socket
def as_dict_proxy(self):
return {'http':f'{self.type}://'+self... |
{-# LANGUAGE StandaloneDeriving, DeriveGeneric, TypeSynonymInstances, FlexibleInstances #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Core.Context(
GameSession
, GameWire
, GameWireI
, GameMonad
, GameActor
, GameContext
, EventManager(..)
, InputEvent(..)
, ClientContext(..)
, newEventManager
... |
/**
* Enigma machine implementation.
*/
@org.springframework.lang.NonNullFields
@org.springframework.lang.NonNullApi
package biz.paluch.enigma4j;
|
namespace Sparrow
{
internal static class DefaultFormat
{
public static readonly string DateTimeOffsetFormatsToWrite = "o";
public static readonly string DateTimeFormatsToWrite = "yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffff";
public static readonly string[] OnlyDateTimeFormat = {
... |
from typing import Tuple
import numpy as np
from jina.drivers.helper import array2pb
from jina.drivers.search import VectorSearchDriver
from jina.executors.indexers import BaseVectorIndexer
from jina.proto import jina_pb2
from tests import JinaTestCase
class MockIndexer(BaseVectorIndexer):
def add(self, keys: '... |
export const LOW = 0;
export const HIGH = 1;
export const INPUT = 0x0;
export const OUTPUT = 0x1;
export const INPUT_PULLUP = 0x2;
export declare function delay(ms: u32): void;
export declare function pinMode(pin: u32, mode: u32): void;
export declare function digitalWrite(pin: u32, value: u32): void;
... |
'use strict';
var w2v = require('word2vec');
w2v.word2phrase(__dirname+'/sentences/sentences.txt', __dirname+ '/output/phrases.txt', {
threshold:100,
debug:2,
minCount: 5,
silent: false
}, function(err, data) {
if(err) {
return console.log(err);
}
w2v.word2vec(__dirname+ '/output/p... |
=head1 LICENSE
See the NOTICE file distributed with this work for additional information
regarding copyright ownership.
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/l... |
package com.scorelab.senz.config
import com.typesafe.config._
// App configuration
object AppConfig {
val environment: String = if (System.getenv("SCALA_ENV") == null) "development" else System.getenv("SCALA_ENV")
val config: Config = ConfigFactory.load()
def apply(): Config = config.getConfig(environment)
}
|
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:flutter/material.dart';
import 'package:lottie/lottie.dart';
import 'package:on_delivery/components/rate_layout.dart';
import 'package:on_delivery/models/rate.dart';
import 'package:on_delivery/utils/SizeConfig.dart';
import 'package:on_delivery/uti... |
"""Simple plot of data."""
from matplotlib import rcParams
rcParams.update(
{
"font.family": "sans-serif",
"font.sans-serif": ["Liberation Sans"],
}
)
from pyiem.plot import figure_axes
# rcParams['font.sans-serif'] = ['Tahoma']
from pyiem.plot.use_agg import plt
DATA = [
0.10443217650431... |
/* This source file is part of the Tomviz project, https://tomviz.org/.
It is released under the 3-Clause BSD License, see "LICENSE". */
#include "MoveActiveObject.h"
#include "ActiveObjects.h"
#include "DataSource.h"
#include "Module.h"
#include "ModuleManager.h"
#include "Pipeline.h"
#include "Utilities.h"
#inc... |
/*
* Copyright (c) 2019, Emil Renner Berthing
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the fol... |
import * as React from "react";
import { Box, BoxProps, Container, Flex } from "@chakra-ui/react";
import { globalHistory } from "@reach/router";
import { motion, TargetAndTransition, Variant } from "framer-motion";
import { Helmet } from "react-helmet";
import Seo from "./Seo";
import Footer from "./Footer";
type An... |
/*
* Copyright (c) 2022, salesforce.com, inc.
* All rights reserved.
* Licensed under the BSD 3-Clause license.
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
// tslint:disable:no-unused-expression
import { expect } from 'chai';
import * as path ... |
module Wizard.Database.DAO.Event.EventDAO where
import Data.String
import Database.PostgreSQL.Simple
import Database.PostgreSQL.Simple.ToField
import Shared.Model.Event.Event
import Wizard.Database.DAO.Common
import Wizard.Database.Mapping.Branch.BranchWithEvents ()
import Wizard.Model.Context.AppContext
import Wizar... |
package goutils
import (
"strings"
"time"
)
const LAYOUT_DDMMYYYY = "02012006"
const LAYOUT_DD_MM_YYYY = "02/01/2006"
const LAYOUT_DD_MM_YYYY_HH_MM_SS = "02/01/2006 15:04:05"
const LAYOUT_YYYY_MM_DD_HH_MM_SS = "2006-01-02 15:04:05"
const LAYOUT_MM_DD_YYYY_HH_MM = "01-02-2006 15:04"
const LAYOUT_YYYYMMDD = "20060102... |
<?php
/* Prototype : bool rsort(array &$array_arg [, int $sort_flags])
* Description: Sort an array in reverse order
* Source code: ext/standard/array.c
*/
/*
* Pass rsort() arrays of boolean values to test behaviour
*/
echo "*** Testing rsort() : variation ***\n";
// bool value array
$bool_values = array (tru... |
module TextMining
class Document
attr_reader :body
attr_reader :numbers
attr_reader :units
attr_reader :dates
attr_reader :num_rgx
attr_reader :unit_rgx
attr_reader :date_rgx
attr_accessor :tr_body
attr_reader :parts
attr_accessor :vector
def initialize body
@body = ... |
namespace CarDealer
{
using System;
using System.IO;
using System.Xml;
using System.Linq;
using System.Text;
using System.Xml.Serialization;
using System.Collections.Generic;
using AutoMapper;
using Data;
using Models;
using CarDealer.Dtos.Import;
using CarDealer.Dtos.... |
module FPL.MaMa
( module FPL.MaMa.ALU
, module FPL.MaMa.Code
, module FPL.MaMa.Heap
, module FPL.MaMa.Instr
, module FPL.MaMa.Interrupts
, module FPL.MaMa.MachineState
, module FPL.MaMa.Monad
, module FPL.MaMa.Options
, module FPL.MaMa.Run
, module FPL.MaMa.SimpleTypes
, module FPL.MaMa.Stack
, ... |
package colormatcher
import (
"fmt"
"testing"
)
func TestMath(t *testing.T) {
c := "#4ab02b"
colors := []string{
"#F7C394",
"#F5A763",
"#F28B30",
"#EF6630",
"#ED462F",
"#DE96C4",
"#CC6AA8",
"#BD428F",
"#A240A6",
"#642E8E",
"#2A2DA0",
"#2578B4",
"#46ABBD",
"#6BC7BE",
"#4DA551",
"#6F... |
---
title: Finite-size effects of Majorana zero mode
summary: finite-size effects of the zero-bias conductance peak in topological superconductors
date: "2021-01-02T00:00:00Z"
tags:
- Superconductivity
- Topology
- Theoretical
reading_time: false # Show estimated reading time?
share: false # Show social shari... |
import React, { useContext } from 'react';
import ContentLoader from 'react-content-loader';
import useTheme from '@Src/hooks/useTheme';
import { Context } from '@Src/context';
import styled from 'styled-components';
const WrapperUI = styled.div`
background-color: ${(p) => p.theme.panelBg};
border-bottom: 1px solid... |
/* ==================================================================
* Eniware Open Source:Nikolai Manchev
* Apache License 2.0
* ==================================================================
*/
package org.eniware.central.user.domain;
import java.util.Map;
import org.eniware.central.domain.Filter;
/**
... |
# Example 22 - Arabic Morse Code (مرحبا World!)
Send Arabic Morse code using the built-in LED in the Arduino.
|
disvm-exec
========================
Represents a command line example of using the DisVM. The resulting executable contains a
debugger with support loading to limbo symbol files (`.sbl`). The `disvm-exe` executable
expects the supplied module to implement the `Exec` contract defined in `limbo/Exec.m`.
Use the `-h` fl... |
import React from "react";
import PropTypes from "prop-types";
class Toggle extends React.Component {
state = {
on: this.props.defaultOn
};
handleToggle = () => {
this.setState({ on: !this.state.on });
};
render() {
return this.props.children({ on: this.state.on, onToggle: this.handleToggle });... |
#! /bin/sh
TAP="${1:-software}"
[ $# -ne 0 ] && shift
BRANCH="${1:-release}"
[ $# -ne 0 ] && shift
TAG="${1:-`./mulle-brew version`}"
[ $# -ne 0 ] && shift
if [ "${MULLE_BOOTSTRAP_NO_COLOR}" != "YES" ]
then
# Escape sequence and resets
C_RESET="\033[0m"
# Useable Foreground colours, for black/white white/b... |
require 'spec_helper'
require 'emony/tag_matching/cache'
describe Emony::TagMatching::Cache do
subject(:cache) { described_class.new(3) }
it "drops old keys" do
cache.set(:a, 1)
cache.set(:b, 2)
cache.set(:c, 3)
expect(cache.get(:a)).to eq 1
expect(cache.get(:b)).to eq 2
expect(cache.get(... |
Jsonix.Binding.Unmarshaller = Jsonix.Class(Jsonix.Binding.Unmarshalls.Element, Jsonix.Binding.Unmarshalls.Element.AsElementRef, {
context : null,
allowTypedObject : true,
allowDom : false,
initialize : function(context) {
Jsonix.Util.Ensure.ensureObject(context);
this.context = context;
},
unmarshalString : f... |
class DoubleList (item)
method head ()
node := item
every (node := node.traverse_backwards ()) # move to start of list
return node
end
method tail ()
node := item
every (node := node.traverse_forwards ()) # move to end of list
return node
end
method insert_at_head (value)
head()... |
package mqs
import (
"encoding/json"
"io/ioutil"
)
type HTTPConfig struct {
Address string `json:"address"`
}
type QueueConfig struct {
Name string `json:"name"`
MaxMessageSize int32 `json:"max_message_size"`
MessageRetentionPeriod int64 `json:"message_retention_period"`
Visibility... |
import customStatusCode from 'src/NonModule/customStatusCode';
import { Body, Controller, Delete, Get, Param, Post } from '@nestjs/common';
import {
classRoom,
addTimeTableRoom,
editClassRoom,
newClassRoom,
deleteTimeTableRoom,
} from 'src/NonModule/interface/classRoom.interface';
import { ClassroomsService ... |
package io.gzet.timeseries.timely
import java.io.PrintStream
import java.net.Socket
import java.nio.charset.StandardCharsets
import io.gzet.timeseries.SimpleConfig
import org.apache.spark.rdd.RDD
import org.apache.spark.streaming.dstream.DStream
import org.apache.spark.{Logging, Partitioner}
object MetricImplicits e... |
<?php
namespace atufkas\ProgressKeeper\Tests;
use atufkas\ProgressKeeper\Changelog;
/**
* Class ChangelogTest
* @package atufkas\ProgressKeeper\Tests
*/
class ChangelogTest extends ChangelogTestCase
{
/**
* @test
*/
public function testCreateChangelog()
{
$changelog = new Changelog(... |
# frozen_string_literal: true
RSpec.describe Dry::Logic::Operations::Check do
include_context "predicates"
describe "#call" do
context "with 1-level nesting" do
subject(:operation) do
described_class.new(Dry::Logic::Rule::Predicate.build(eql?).curry(1), id: :compare, keys: [:num])
end
... |
import { HttpErrorResponse, HttpParams } from '@angular/common/http';
import { Injectable, OnDestroy } from '@angular/core';
import { concat, EMPTY, Observable, throwError, TimeoutError } from 'rxjs';
import { catchError, map, retry, share, timeout } from 'rxjs/operators';
import { SyncTask } from '../types/sync-task.t... |
using Forma1Teams.ApplicationCore.Entities;
using Forma1Teams.UnitTests.Builders;
using Microsoft.AspNetCore.Mvc.Testing;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
using Xunit;
namespace Forma1Teams.FunctionalTests.Web.Pages
{
[Coll... |
package eval
import (
"strings"
"github.com/zzossig/carrot/ast"
"golang.org/x/net/html"
)
func appendNode(src []*html.Node, target *html.Node) []*html.Node {
if !isContain(src, target) {
src = append(src, target)
}
return src
}
func isContain(src []*html.Node, target *html.Node) bool {
for _, item := range... |
require_relative "exchanges/coincheck"
require_relative "exchanges/liquid"
class Broker
def get_order_book(broker)
Object.const_get(broker[:broker]).new.get_order_book(broker)
end
def get_balance(broker)
Object.const_get(broker[:broker]).new.get_balance(broker)
end
def get_order_statu... |
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* 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 ... |
import { Request, Response, NextFunction, RequestHandler } from "express";
export const catchAsync = (handler: RequestHandler) => (
...args: [Request, Response, NextFunction]
) => handler(...args).catch(args[2]);
|
import '_06_Classes.dart';
// Mixins are a way of reusing code in multiple class hierarchies.
class Piloted {
int astronauts = 1;
void describeCrew() {
print('Number of astronauts: $astronauts');
}
}
// To add a mixin’s capabilities to a class, just extend the class with the mixin.
class PilotedCraft extends... |
C Check that j is not privatized in the first loop, but privatized
C in the second one... Here j is imported from the caller. Its
C storage is not compatible with a privatzation.
C See also privatization01, 07, 08, 09 and 10
subroutine privatization10(j)
integer a(10)
do i = 1, 10
... |
import * as path from 'path';
import { EffectFactory, combineRoutes } from '@marblejs/core';
import { readFile } from '@marblejs/core/dist/+internal';
import { map, switchMap } from 'rxjs/operators';
const STATIC_PATH = path.resolve(__dirname, '../../../../assets');
const getFile$ = EffectFactory
.matchPath('/:dir*... |
---
layout: post
title: "test math equation"
---
This article is to test the math expression.
hello, this is a inline equation(`$$ a^2 + b^2 = c^2 $$`): $$ a^2 + b^2 = c^2 $$, end of the equation.
hello, this is a block equation(`\$$ a^2 + b^2 = c^2 $$`): \$$ a^2 + b^2 = c^2 $$, end of the equation.
This is a inline... |
<?php
namespace App\Entity;
use DateTime;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
/**
* @ORM\Entity(repositoryClass="App\Repository\TrickRepository")
*/
class Trick
{
/**
* @ORM\Id(... |
#!/bin/sh
#echo "> npm install"
#npm install
echo "> cleaning"
rm -rf dist
echo "> parcel build"
npx parcel build --no-autoinstall src/index.html
#echo "> making build dir"
#rm -rf build
#mkdir build
#echo "> making sw"
#node sw-build.js
#echo "> building sw"
#npx parcel build build/sw.js
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using Xunit;
namespace System.Linq.Tests
{
public class TakeTests : EnumerableBasedTests
{
[Fact]
public void SourceNonEmptyTakeAllButOne()
{
... |
if (!(Test-Path Variable:PSScriptRoot)) {
$PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent
}
$path = join-path "$env:chobanApps" "{packageExecutable}"
if($myinvocation.expectingInput) { $input | & $path @args } else { & $path @args }
|
import type { Middleware } from 'pinecone-router';
const PineconeRouterMiddleware: Middleware = {
/**
* @property {string} version the version of this middleware.
*/
version: '0.0.0',
/**
* @property {string} name the name of the middleware.
*/
name: 'middleware',
/**
* @property {object} settings the m... |
using Synology.FileStation.Common.Results;
namespace Synology.FileStation.VirtualFolder.Results
{
/// <summary>
/// Virtual folder perm acl result.
/// </summary>
internal class VirtualFolderPermAclResult : TaskVirtualFolderPermAclResult, IVirtualFolderPermAclResult
{
}
} |
'use strict';
const { listDeadLetterSourceQueues } = require('../sqs');
const { toXml, toXmlError } = require('../utils/xml-helper');
module.exports = ({ QueueUrl }, host) => {
try {
return toXml('ListDeadLetterSourceQueuesResponse', {
ListDeadLetterSourceQueuesResult: {
QueueUrl: listDeadLetterSo... |
#!/bin/bash
#Adjust path to match your system using 'whereis carton'
CARTON_EXEC=/usr/bin/carton
EASYPING_PATH=/path/to/EasyPing
cd $EASYPING_PATH
$CARTON_EXEC exec "$EASYPING_PATH/easyping.pl $1 $2" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.