text stringlengths 27 775k |
|---|
import styled from "@emotion/styled";
import { Alert } from "@material-ui/lab";
import {
fontBody,
getColors,
getCorners,
getIconSizes,
getSpaces,
} from "../styles";
import { defaultTheme } from "../styles/common/defaultTheme";
const fontBodyXs = fontBody("xs");
export const StyledCallout = styled(Alert)`
... |
// +build windows
package util
import (
"github.com/pkg/errors"
)
// GetRootlessRuntimeDir returns the runtime directory when running as non root
func GetRootlessRuntimeDir() (string, error) {
return "", errors.New("this function is not implemented for windows")
}
// IsCgroup2UnifiedMode returns whether we are ru... |
#include <GMLAST/AST/BreakStatement.hpp>
namespace GMLAST {
void BreakStatement::visit(IVisitor& visitor) const {
visitor.onBreakStatement(*this);
}
} // namespace GMLAST
|
FactoryBot.define do
factory :article_endorsement do
article
user
end
end
|
import { isLeapYear } from "../../../src/time/functions/isLeapYear";
import { Years } from "../../../src/time/types/Years";
describe(isLeapYear.name, () => {
test("returns true for % 400 === 0", () => {
expect(isLeapYear(400 as Years)).toEqual(true);
expect(isLeapYear(800 as Years)).toEqual(true);
expect... |
package io.circe.cats.laws
import io.circe.cats.SemigroupK
import io.circe.cats.kernel.laws.IsEq
/**
* Laws that must be obeyed by any `cats.SemigroupK`.
*/
trait SemigroupKLaws[F[_]] given (F: SemigroupK[F]) {
def semigroupKAssociative[A](a: F[A], b: F[A], c: F[A]): IsEq[F[A]] =
F.combineK(F.combineK(a, b), ... |
#include "precomp.h"
#include "3d/object3d.h"
class cSceneManager {
// List of blops organized by min x position
private:
void addObject(cObject & newObj) {
myObjects.insert(&newObj);
}
void removeObject(cObject& newObj) {
if (myObjects.count(&newObj)) {
myObjects.erase(&newObj);
}
}
void getNearbyObje... |
// Copyright 2020 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:async';
import 'package:fidl_fuchsia_modular/fidl_async.dart' as fidl_modular;
import 'package:fidl_fuchsia_modular_testing/fidl_async.dart' ... |
# Download Stanford CoreNLP libararies.
out_dir=./scripts/data/ace05/common
wget --directory-prefix $out_dir http://nlp.stanford.edu/software/stanford-corenlp-full-2015-04-20.zip
wget --directory-prefix $out_dir http://nlp.stanford.edu/software/stanford-postagger-2015-04-20.zip
for name in stanford-corenlp-full-2015-... |
<?php
namespace App\Containers\Vote\UI\API\Controllers;
use App\Containers\Vote\UI\API\Requests\CreateVoteRequest;
use App\Containers\Vote\UI\API\Requests\DeleteVoteRequest;
use App\Containers\Vote\UI\API\Requests\GetAllVotesRequest;
use App\Containers\Vote\UI\API\Requests\FindVoteByIdRequest;
use App\Containers\Vote... |
package com.soywiz.korio.async
import com.soywiz.kds.iterators.fastForEach
import kotlin.reflect.*
class ObservableProperty<T>(initial: T) {
private var observers = ArrayList<(T) -> Unit>()
private var _value: T = initial
var value: T
get() = _value
set(v) {
update(v)
... |
<?php
/*
* Copyright 2016 Stanislav Nechutný
*
* 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... |
<?php
/**
* Testing the digital envelope cryptographic protocol object.
*/
namespace CryptoManana\Tests\TestSuite\CryptographicProtocol;
use CryptoManana\Tests\TestTypes\AbstractUnitTest;
use CryptoManana\CryptographicProtocol\DigitalEnvelope;
use CryptoManana\AsymmetricEncryption\Rsa1024;
use CryptoManana\Symmetr... |
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\Title as Title;
class ClientController extends Controller
{
public function __construct(Title $titles)
{
$this->titles = $titles->all();
}
public function di()
{
dd($this->titles);
}
public... |
from ..complex import SerialisableObject, EnumContainer
from dataclasses import dataclass, field
@dataclass
class Instrument(SerialisableObject):
_name: str = field(default="Compass", init=False)
instrument: str = ""
def enum_get_name(self) -> str:
return self.instrument
INSTRUMENT_TYPES = enum... |
using System;
using dotenv.net.Utilities;
using Microsoft.Extensions.Logging;
using System.Net;
using System.Net.Mail;
using System.Net.Mime;
using System.Threading;
using System.ComponentModel;
namespace tp1_restaurant.Services
{
public interface IEmailService
{
bool SendEmail(string to, string subje... |
using System;
using System.Collections.Generic;
using System.Text;
namespace SharpGlyph {
public class CFFRange2 {
/// <summary>
/// First glyph in range.
/// </summary>
public ushort first;
/// <summary>
/// Glyphs left in range (excluding first).
/// </summary>
public ushort nLeft;
public stati... |
import React from 'react'
import {number, func} from 'prop-types'
import {Icon} from '@iconify/react'
import locationIcon from '@iconify/icons-mdi/fire-alert'
//eslint-disable-next-line no-unused-vars
const LocationMarker = ({ lat, lng, onClick }) => {
return (
<div className="location__marker" onClick={onClick... |
package commercio
import (
"bytes"
"crypto/aes"
"crypto/cipher"
"crypto/rand"
"crypto/rsa"
"crypto/sha256"
"crypto/x509"
"encoding/base64"
"encoding/json"
"encoding/pem"
"errors"
"fmt"
"io"
"io/ioutil"
"log"
"strconv"
"time"
"crypto"
"github.com/btcsuite/btcd/btcec"
"github.com/btcsuite/btcutil/h... |
---
id: 421
title: Windows Server 2008 and Windows VIsta Service Pack 2 Download
date: 2009-05-29T07:31:00+08:00
author: ShareChiWai
layout: post
categories:
- Microsoft
- Windows
- Windows Server
- 電腦小貼事 Computing Tips and Tricks
---
Windows Server 2008 and Windows Vista Service Pack 2 is now avaliable.
For m... |
import React from 'react'
import { Table } from 'react-bootstrap';
import { useStateValue } from '../services/StateProvider';
import UserRow from './UserRow';
function TableUsersContent() {
const [tableUsersState, setTableUsersState] = useStateValue();
return (
<div className='tableUsersContent'>
... |
using Superpower.Parsers;
using System;
using System.Linq.Expressions;
namespace Superpower.Tests.ArithmeticExpressionScenario
{
class ArithmeticExpressionParser
{
static TokenListParser<ArithmeticExpressionToken, ExpressionType> Operator(ArithmeticExpressionToken op, ExpressionType opType)
{
... |
using Improbable.Gdk.QueryBasedInterest;
using NUnit.Framework;
namespace Improbable.Gdk.EditmodeTests.Utility
{
[TestFixture]
public class InterestQueryTests
{
private static InterestQuery BasicQuery => InterestQuery.Query(Constraint.Component(Position.ComponentId));
[Test]
public... |
#!/bin/sh
set -e
docker pull certbot/certbot:v0.23.0
docker rm -f letsencrypt || true
for DOMAIN in pr0.wibbly-wobbly.de app.pr0gramm.com ; do
docker run --rm --name letsencrypt \
-v "/data/nginx/static:/webroot" \
-v "/data/nginx/ssl:/etc/letsencrypt" \
-v "/var/lib/letsencrypt:/var/lib/letsencrypt" \
... |
# frozen_string_literal: true
class APISubjectRole < ApplicationRecord
belongs_to :api_subject
belongs_to :role
end
|
package com.joaogoes.marvelwiki.characters.data.datasource
import com.joaogoes.marvelwiki.characters.data.response.CharacterApiResponse
import com.joaogoes.marvelwiki.characters.data.service.CharacterApi
import com.joaogoes.marvelwiki.network.Result
import com.joaogoes.marvelwiki.network.ServiceError
import com.joaogo... |
use std::path::{Path, PathBuf};
use std::pin::Pin;
use async_std::stream::Stream;
use async_std::sync::{Arc, Mutex};
use serde::Serialize;
use tide_naive_static_files::StaticRootDir;
pub type IoStream = Pin<Box<dyn Stream<Item = String> + Send + Sync>>;
pub struct AppState {
home_dir: PathBuf,
pub cmd_stdout... |
package com.caco3.elijars.classpath;
import java.net.URL;
import java.net.URLClassLoader;
public class ElijarsClassLoader extends URLClassLoader {
public ElijarsClassLoader(URL[] urls, ClassLoader parent) {
super(urls, parent);
}
}
|
import 'dart:async';
import 'dart:collection';
import 'dart:convert';
import 'package:meta/meta.dart';
import 'package:async/async.dart';
import 'package:time/time.dart';
import 'package:fixnum/fixnum.dart';
import 'package:maxwell_protocol/maxwell_protocol.dart';
import 'package:maxwell_client/maxwell_client.dart';
im... |
# 2019-06-19 v0.2.0
Updated assessment file name and question numbers.
# 2019-06-18 v0.1.0
First release. Committed all code to the repository.
|
def my_handler():
return "Same name as Built in module, but different path"
|
import 'dart:io';
import 'package:dio/dio.dart';
import 'package:healthy/secrets.dart' as secrets;
const _baseUrl = 'https://api.everypixel.com/v1/faces';
final _dio = Dio(BaseOptions(
connectTimeout: 5000,
receiveTimeout: 10000,
headers: {
'Authorization': secrets.everyPixelAuth,
},
receiveDataWhenSt... |
import { css } from '@emotion/core'
export const profile = css`
.profile-info {
max-width: 360px;
padding: 30px;
background: #aacfd0;
border-radius: 4px;
margin: 50px auto;
}
.title {
color: #34495e;
text-transform: lowercase;
font-size: 30px;
text-align: center;
}
.photo-upload {
height: 1... |
#! /bin/bash
PRGNAME="python3"
ARCH_NAME="Python"
### python3 (object-oriented interpreted programming language)
# Язык программирования Python 3
ROOT="/"
source "${ROOT}check_environment.sh" || exit 1
source "${ROOT}unpack_source_archive.sh" "${ARCH_NAME}" || exit 1
TMP_DIR="/tmp/pkg-${PRGNAME}-... |
class Scamp
class Matcher
attr_accessor :conditions, :trigger, :action, :bot, :required_prefix
def initialize(bot, params = {})
params ||= {}
params[:conditions] ||= {}
params.each { |k,v| send("#{k}=", v) }
@bot = bot
end
def attempt(msg)
return false unless co... |
# GAUSS-03561 -- GAUSS-03570<a name="EN-US_TOPIC_0302073051"></a>
GAUSS-03562: "concurrent transaction log activity while database system is shutting down"
SQLSTATE: XX000
Description:Internal system error.
Solution:Contact technical support.
GAUSS-03563: "online backup was canceled, recovery cannot cont... |
#include <iostream>
using namespace std;
class Base {
public:
Base() = default;
virtual ~Base() = default;
public:
void func() { cout << "func()" << endl; }
void func(int) { cout << "func(int)" << endl; }
void func(double) { cout << "func(double)" << endl; ... |
package org.motechproject.hub.mds;
import org.motechproject.mds.annotations.Entity;
import org.motechproject.mds.annotations.Field;
/**
* Stores the content and content type received from the publisher when there is
* an update in a topic.
*/
@Entity
public class HubDistributionContent implements java.io.Serializa... |
from trac.wiki.api import *
from trac.wiki.formatter import *
from trac.wiki.intertrac import *
from trac.wiki.model import *
from trac.wiki.parser import *
|
package pl.polsl.workflow.manager.client.ui.manager.task.post
import android.app.Application
import android.os.Bundle
import androidx.lifecycle.MutableLiveData
import pl.polsl.workflow.manager.client.R
import pl.polsl.workflow.manager.client.model.RepositoryResult
import pl.polsl.workflow.manager.client.model.data.Gro... |
#!/bin/bash
VERSION="1.0"
CODE=(main.lua dial.lua conf.lua hump/vector.lua hump/class.lua)
ASSETS=(click.ogg)
BUILDPATH="build"
if [[ ! -d $BUILDPATH ]]; then
mkdir $BUILDPATH
fi
zip $BUILDPATH/metronome-$VERSION.love ${CODE[@]} ${ASSETS[@]}
|
# Selecionar o nome e o CPF dos clientes que fizeram a sugestão que possui ids 222, 223 e 224.
SELECT c.nome, c.cpf
FROM Sugestao s JOIN Cliente c ON s.id_cliente = c.id_cliente
WHERE s.id_protocolo IN (222, 223, 224);
# Selecionar o nome dos produtos que saíram em uma quantidade igual ou maior que 30 em um só pedido... |
#!/usr/bin/env python
import poco
import sys
import platform
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
requires = ['pyyaml==5.3', 'pyaml==19.12.0', 'svn==1.0.1', 'gitpython==2.1.15', 'docopt==0.6.2',
'docker-compose==1.25.4', 'pygithub==1.45', 'pyth... |
export * from './npm'
export * from './PackageManager'
export * from './PackageManagerCreator'
export * from './PackageManagerName'
export * from './yarn'
|
import torch.nn.functional as F
import torch.nn as nn
import torch as t
class Loss_for_localization(nn.Module):
def __init__(self):
super(Loss_for_localization,self).__init__()
def forward(self,objects,scores,locs,label,gt,obj_coor,no_obj_confi,img_class_weight):
batch_size,hh,ww = objects.siz... |
use criterion::{criterion_group, criterion_main, Criterion};
use futures::{future::FutureExt, stream::StreamExt};
use lair_keystore_api::actor::*;
use lair_keystore_api::*;
use once_cell::sync::Lazy;
static TOKIO: Lazy<tokio::runtime::Runtime> = Lazy::new(|| {
tokio::runtime::Builder::new_multi_thread()
.e... |
// Copyright 2020 Tom Burdick
// See LICENSE-APACHE and LICENSE-MIT for license details.
//! This project provides a register access layer (RAL) for all
//! NXP i.mx rt microcontrollers.
//!
//! When built, you must specify a device feature, such as `imxrt1062`.
//! This will cause all modules in that device's module ... |
<?php
declare(strict_types=1);
namespace App\Application\Reservation;
use App\Application\Reservation\Exception\EventNotFoundException;
use App\Application\Service\MailerServiceInterface;
use App\Model\EventRepositoryInterface;
use App\Model\EventReservation\EventReservation;
use App\Model\EventReservation\Person;
u... |
package utils
// CalcMinInt calc min int from multi nums.
func CalcMinInt(nums ...int) (res int) {
// 此处也可使用堆排序,构建小顶堆,heapify之后直接取最小值.
if len(nums) == 0 {
return 0
}
res = MaxInt
for _, num := range nums {
if num < res {
res = num
}
}
return
}
|
import React, { FC } from "react";
import styles from "./style.module.css";
import { UserType } from "../../../../types/UserType";
import Avatar from "../../../../components/Avatar/Avatar";
import Title from "../../../../components/Title/Title";
interface Props extends Partial<UserType> {
}
const ViewProfile: FC<Pr... |
CREATE VIEW VIEW30 (C1) AS SELECT 1 FROM TABLE333 UNION SELECT 1 FROM TABLE48 UNION SELECT 1 FROM TABLE152
GO |
CREATE TABLE IF NOT EXISTS "applications" (
"job_advert_id" uuid REFERENCES job_adverts("job_advert_id"),
"candidate_id" uuid REFERENCES users("acc_id"),
"application_status" VARCHAR(40) REFERENCES application_statuses("application_status") NOT NULL,
PRIMARY KEY ("job_advert_id", "candidate_id")
); |
import 'package:get_it/get_it.dart';
import 'database/database.dart';
import 'utils/undo_redo.dart';
final locator = GetIt.instance;
void initGetIt() {
locator.registerLazySingleton(() => UndoRedo());
locator.registerSingleton<Database>(Database());
}
|
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
export class SaveTaskRequest {
@ApiPropertyOptional()
id: string;
@ApiPropertyOptional()
task: string;
@ApiPropertyOptional()
isCompleted: boolean;
@ApiPropertyOptional()
userId: string;
}
export default SaveTaskRequest; |
/*
Copyright (C) 2011 by Ivan Safrin
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
to use, copy, modify, merge, publish, distribute, ... |
<?php
use App\Services\Documents\Location;
use Tests\TestCase;
class DocsControllerTest extends TestCase
{
public function __construct($name = null, array $data = [], $dataName = '')
{
parent::__construct($name, $data, $dataName);
$this->createApplication();
}
/**
* @dataProvi... |
package ru.job4j.nonblocking;
import org.junit.Test;
import static org.hamcrest.core.Is.is;
import static org.junit.Assert.*;
/**
* Cache Test.
* @author Vadim Bolokhov
* @version $Id$
* @since 0.1
*/
public class CacheTest {
@Test
public void whenAddModelThenCacheHasSameModel() {
Cache c = new ... |
import { Component, ElementRef, HostListener, Optional } from '@angular/core';
import { FormComponent } from '../form/form.component';
import { Key } from '../models/key';
import { ButtonBaseComponent } from '../base/button-base.component';
@Component({
selector: 'm-submit',
templateUrl: './submit.component.html',... |
package com.tsukiseele.potofu.services.impl
import com.tsukiseele.potofu.mappers.VisitorMapper
import com.tsukiseele.potofu.models.Visitor
import com.tsukiseele.potofu.services.VisitorService
import com.tsukiseele.utils.IpUtil
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.annotation.Autowired... |
package goproxy_client
import (
"fmt"
"io/ioutil"
"net/http"
"github.com/lkzcover/easyaes"
)
func GetRequest(urlReq, queryReq string) ([]byte, error) {
resp, err := http.Get(urlReq + decryptedReq + queryReq)
if err != nil {
return nil, err
}
if resp.StatusCode != http.StatusOK {
return nil, fmt.Errorf(... |
package com.kmmania.runninguserpreferences.utils.units
enum class LengthUnit {
M, YD, KM, MI, CM, IN
} |
# g/re/p
## Regular Expressions
- Characters:
Normal characters that we would like to match
grep "pluto" planets.txt
- Special characters
\ ^ { } ( ) + ? . [ ] | $
grep "\{ \}" language.txt
- OR - alternatives |
grep "cat|dog|lizard" pets.csv
- character classes []
A way to group sets of cha... |
# Return a string representing a certain level of indentation.
#
# This function respects the current tab settings of the user.
#
# = Arguments
#
# [times] The number of times the text following the string returned by this
# function should be indented.
#
# = Output
#
# A string that represents a certain level ... |
module Api
module JsonResume
class ResumesController < ::Api::BaseController
def show
authorize resume
render json: resume, serializer: ResumeSerializer, adapter: :attributes
end
private
def resume
@resume ||= policy_scope(Resume).find(params[:id])
end
e... |
#!/bin/bash
# SET PATHS AND CONFIGURATION
# Path to the cmake executable
cmakeExe=cmake
# Path to the compilers
c_compiler=gcc
cxx_compiler=g++
# Path to Trekker (below is an example)
trekkerSrc=/home/baran/Work/code/trekker/src
trekkerLib=/home/baran/Work/code/trekker/build/Linux/install/lib
# Release or Debug
... |
'use strict';
angular.module('myApp.topics', ['ngRoute'])
.config(['$routeProvider', function($routeProvider) {
$routeProvider.when('/topics/:user', {
templateUrl: 'topics/topics.html',
controller: 'TopicsCtrl'
});
}])
.constant('_', window._)
.controller('TopicsCtrl', ['$scope', '$http', '$routeParam... |
<?php
header('location: '.$_POST["accion"].'&database='.$_POST["database"].'&tabla='.$_POST["tabla"]);
//$var='location: '.$_POST["accion"].'&database='.$_POST["database"].'&tabla='.$_POST["tabla"];
//echo $var."<br>";
//echo "accion: ".$_POST["accion"]."<br>";
//echo "db: ".$_POST["database"]."<br>";
//echo "tabla: ... |
## 0.3.0
- Upgrade `identity`
## 0.2.3
* Allow to use customized email sign in page
## 0.2.2
* Upgrade `identity: ^0.2.2`
## 0.2.0+1
* Add ability to change theme, header's image in `init`
## 0.2.0
* Upgrade `identity: ^0.2.0`
## 0.1.1
* Implicitly use `notify`
## 0.1.0
* Upgrade `sso`, `identity` packages... |
<?php
/*
* This file is part of the Qsnh/meedu.
*
* (c) XiaoTeng <616896861@qq.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace App\Listeners\AdFromEvent;
use App\Events\AdFromEvent;
use Illuminate\Support\Facades\Cache;
use Illu... |
<div class="main">
<div class="container-fluid">
<h3 class="page-title"><br>User</h3>
<div class="row">
<div class="col-md-12">
<div class="text-right" style="padding-bottom:20px">
</div>
<div class="panel">
<div class="panel-body">
<table class="table">
<thead>
<tr>
... |
package com.jdamcd.runlog.android.main
import android.content.Context
import android.content.Intent
import androidx.core.net.toUri
import androidx.lifecycle.LifecycleObserver
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewM... |
namespace Rediska.Commands.Server
{
using System;
using System.Collections.Generic;
using Protocol;
using Protocol.Visitors;
using Utils;
public sealed partial class CommandDescription
{
private readonly IReadOnlyList<DataType> array;
public CommandDescription(... |
import { FileInfo } from './file.info.entity';
export class FileResponse {
message: string;
file: FileInfo;
}
|
; RUN: split-file %s %t
; RUN: opt -module-summary %t/a.ll -o %ta.bc
; RUN: opt -module-summary %t/b.ll -o %tb.bc
;; Test visibility propagation. The prevailing definitions are all from %tb.bc.
; RUN: llvm-lto2 run -save-temps -enable-import-metadata -o %t1.bc %ta.bc %tb.bc \
; RUN: -r=%ta.bc,_var1,l -r=%ta.bc,_var2... |
expt_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
results_dir=${expt_dir}/results
model_config=${expt_dir}/model.jsonnet
if [ -d ${results_dir} ]; then
read -p "remove directory ${results_dir}? [y/n] " yn
case $yn in
[Yy]* ) rm -rf ${results_dir};;
[Nn]* ) ;;
* ) echo ... |
import { Volume } from 'memfs'
import { ResolverFactory } from 'enhanced-resolve'
import MiniprogramResolverPlugin from '../MiniprogramResolverPlugin'
describe('resolver roots', () => {
let resolver: ReturnType<typeof ResolverFactory.createResolver>
beforeEach(() => {
const fileSystem = Volume.fromJSON(
... |
# encoding=utf-8
from django.conf.urls import patterns, url
urlpatterns = patterns(
'goldencage.views',
url(r'^apwcb/(?P<provider>\w+)/$', 'appwall_callback', name='wall_cb'),
url(r'^alipaycb/$', 'alipay_callback', name='alipay_cb'),
url(r'^alipaysign/$', 'alipay_sign', name='alipaysign'),
url(r'... |
import React from 'react';
import { graphql, PageProps } from 'gatsby';
import { PageQuery } from './__generated__/PageQuery';
const Event: React.FC<PageProps<PageQuery>> = ({ data }) => {
const { contentfulPage } = data;
return <h1>{contentfulPage?.title}</h1>;
};
export default Event;
export const query = grap... |
#!/usr/bin/env bash
dotnet build Azure.Functions.Cli.sln
dotnet publish src/Azure.Functions.Cli/Azure.Functions.Cli.csproj --runtime linux-x64 --output /tmp/cli
# FUNC_PATH=/tmp/cli/func dotnet test test/Azure.Functions.Cli.Tests/Azure.Functions.Cli.Tests.csproj
|
# Console.Example.BoxingTypes
Boxing and unboxing of data types
[BenchmarkDotNet](https://benchmarkdotnet.org/)
|
package com.sergiop.aparcamientos
import android.app.Application
import com.google.firebase.FirebaseApp
import dagger.hilt.android.HiltAndroidApp
@HiltAndroidApp
class AplicationAparcamiento : Application() {
override fun onCreate() {
super.onCreate()
FirebaseApp.initializeApp(this)
... |
# k8s-dashboard-screenshot
An abstraction of taking a screenshot of k8s dashboard via puppeteer
## Installation
`$ npm i --save k8s-dashboard-screenshot`
## Examples
[examples](./examples)
## License
k8s-dashboard-screenshot is MIT licensed. |
module RubyJwk
module Authenticate
def authenticate_tenant!
return if RubyJwk.skip_issuers.to_a.include?(jwt_payload['iss'])
JWT.decode(jwt_token, nil, true, { algorithm: 'RS256', jwks: jwk_loader})
rescue JWT::DecodeError => e
render status: 401, json: error_response_template("Authenticati... |
"""Utility functions for plots and animations."""
from contextlib import contextmanager
import numpy as np
import torch
try:
import matplotlib.pyplot as plt
import matplotlib.animation as mpl_animation
except ImportError:
plt = None
mpl_animation = None
@contextmanager
def track_canvas(image_file=N... |
import { Music } from '../../domain/entities/Music'
import { IMusicRepository } from '../../domain/repositories/IMusicRepository'
import {
LoadMusicsParams,
ILoadMusicsUseCase,
} from '../../domain/useCases/ILoadMusicsUseCause'
export class LoadMusicsUseCaseImpl implements ILoadMusicsUseCase {
constructor(privat... |
const log = input => console.log(input);
// Function composition is the process of applying a function to the output of another function.
const g = n => n + 1;
const f = n => n * 2;
const doStuff = x => {
const gOutput = g(x);
const fOutput = f(gOutput);
return fOutput;
};
let result = doStuff(20);
log(result)... |
// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'dart:async';
import 'dart:io' as io;
import 'dart:isolate';
import 'package:analyzer/dart/analy... |
#!/bin/bash
cd hakyll-frontent
rm -rf _site
rm -rf _cache
./.cabal-sandbox/bin/site build
rm -rf /home/greg/octopress/_deploy/desire/*
cd /home/greg/octopress-master
git pull
cd -
cp -R _site/* /home/greg/octopress/_deploy/desire/
cd /home/greg/octopress/_deploy
git add desire
git commit -m "Update desire at $(da... |
/*
* Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free ... |
// Copyright (C) 2011 VeriSign, Inc.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library ... |
using CoCSharp.Logic;
using CoCSharp.Networking;
using System.Net.Sockets;
namespace CoCSharp.Proxy
{
public class CoCRemoteClient
{
public CoCRemoteClient(Socket connection)
{
Connection = connection;
NetworkManager = new ProxyNetworkManager(connection);
}
... |
import Stripe from 'stripe';
function StripeWebhooksMiddleware(stripeApiSecretKey) {
return function (req, res, next) {
if (!stripeApiSecretKey) {
let err = new Error('Stripe API Secret Key not provided.');
err.status = 500;
next(err);
}
if (!req.body ... |
# ASP.NET Core - App Building Workshop
[](https://dev.azure.com/dotnet/AspNetCoreWorkshop/_build/latest?definitionId=71&branchName=master)
[BackEnd Web API](https://aspnetcorew... |
<?php
namespace Orange\Sitemap;
class Index {
/**
* @var \DOMDocument
*/
private $sitemap;
/**
* @var \DOMElement
*/
private $root;
public function __construct(){
$this->sitemap = new \DOMDocument('1.0','UTF-8');
$this->root = $this->sitemap->createElementNS('ht... |
(cl:in-package opencv_apps-msg)
(cl:export '(PT1-VAL
PT1
PT2-VAL
PT2
)) |
! tchdb.f90
!
! Fortran 2008 interface to the hash database API of Tokyo Cabinet.
!
! Author: Philipp Engel
! Licence: ISC
module tchdb
use, intrinsic :: iso_c_binding, only: c_associated, c_double, &
c_f_pointer, c_bool, c_char, c_int, &
... |
import { Component, OnInit, Input } from '@angular/core';
import { Postagem } from '../miniatura/postagem';
import { HttpClient } from '@angular/common/http';
@Component({
selector: 'app-post',
templateUrl: './post.component.html',
styleUrls: ['./post.component.css']
})
export class PostComponent implements OnIn... |
<?php
namespace App\Http\Controllers\Util;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\Http\Controllers\Controller;
use Excel ;
use App\Qrcode ;
use App\Client ;
class ExceltoolController extends Controller
{
//
public function outface()
{
// Client::where('id','>=','0')->delete... |
module Resque
module Failure
# If you use the Resque::Plugins::Lock plugin you're going to want to add
# Locksmith to your failure backend chain. The reason for this is that if
# your job blows up or dies do to a dirty exit; the lock will not be removed.
#
# What this results in is a job that sil... |
/**
* Testing our Dd component
*/
import { mount } from 'enzyme';
import React from 'react';
import BootstrapProvider from '@bootstrap-styled/provider/lib/BootstrapProvider';
import Dd from '../index';
const children = (<h1>Test</h1>);
const renderComponent = (props = {}) => mount(
<Dd {...props} />
);
const re... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.