text stringlengths 27 775k |
|---|
class PersistenceError(Exception):
pass
class RecordNotFoundError(Exception):
pass
|
#!/run/current-system/sw/bin/bash
nix-channel --add https://nixos.org/channels/nixos-21.11 nixos && nixos-rebuild --install-bootloader --upgrade boot
|
export * from './iconimports';
export * from './labicon';
export * from './widgets';
|
__author__ = "Frédéric BISSON"
__copyright__ = "Copyright 2022, Frédéric BISSON"
__credits__ = ["Frédéric BISSON"]
__license__ = "mit"
__maintainer__ = "Frédéric BISSON"
__email__ = "zigazou@protonmail.com"
from ..pdf.PDF import PDF
from ..item.PDFObject import PDFObject
from ..item.PDFDictionary import PDFDictionary
... |
import 'package:flutter/material.dart';
import 'package:form_blog/src/bloc/provider.dart';
import 'package:form_blog/src/models/producto_model.dart';
import 'package:form_blog/src/page/producto_page.dart';
import 'package:form_blog/src/providers/producto_providers.dart';
class HomePage extends StatelessWidget{
stati... |
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Carbon\Carbon;
use App\Lantai;
use App\Building;
use App\Fakultas;
class LantaiController extends Controller
{
public function index(){
$getNextId = Lantai::getNextId();
$getBuildingInfo = Building::all();
$getFakultasInfo = Fakultas... |
# LGAC_SmartT docker image
Based on the [LGAC SmartT](https://github.com/olinek2/LGAC_SmartT) repo.
|
#!/bin/sh
# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
# BEGIN environment bootstrap section
# Do not edit between here and END as this section should stay identical in all scripts
findpath () {
myname=${0}
mypath=${myname%/*}
myname=${myname##*/}... |
// SPDX-License-Identifier: MIT
/*
* Copyright 2019 HabanaLabs, Ltd.
* All Rights Reserved.
*/
#include "hlthunk_tests.h"
#include "ini.h"
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <limits.h>
#include <stdio.h>
#include <errno.h>
#include <unistd.h>
#define RANGE_PARAMS_NUM 7
#define ... |
# generated by 'rake generate'
require 'cocoa/bindings/NSObject'
module Cocoa
class NSURLHandle < Cocoa::NSObject
attach_singular_method :URLHandleClassForURL, :args=>1, :names=>[], :types=>["@"], :retval=>"#"
attach_method :addClient, :args=>1, :names=>[], :types=>["@"], :retval=>"v"
attach_method :avail... |
InvalidCronPatternError = Class.new(ArgumentError)
InvalidMinuteFieldError = Class.new(ArgumentError)
InvalidHourFieldError = Class.new(ArgumentError)
InvalidDayOfMonthFieldError = Class.new(ArgumentError)
InvalidMonthFieldError = Class.new(ArgumentError)
InvalidDayOfWeekFieldError = Class.new(Argu... |
import java.util.*
fun main(args: Array<String>) {
repeat(readLine()!!.toInt()) {
print("Case #${it + 1}: ")
solve()
}
}
val impossible = arrayListOf(Pair(2, 2), Pair(2, 3), Pair(2, 4), Pair(3, 2), Pair(3, 3), Pair(4, 2))
const val RIGHT = 2
const val DOWN = 1
fun solve() {
var (row, col... |
package com.memoeslink.generator.common;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Random;
import java.util.Set;
public class Randomizer {
private Long seed;
private Random r;
private static final HashMa... |
---
title: CentOS
---
# Opvragen CentOS versie
```bash
cat /etc/*elease*
```
# warning: setlocale: LC_CTYPE: cannot change locale (UTF-8)
```bash
export LC_ALL="en_US.UTF-8"
```
# warning: setlocale: LC_CTYPE: cannot change locale (UTF-8)
This can be caused by your SSH client. You can disable the clients request for... |
package com.chess.gameservice.messages.external;
import lombok.*;
import java.util.ArrayList;
import java.util.UUID;
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class StartGameMessage {
UUID gameId;
ArrayList<User> users;
boolean withAi;
}
|
{ **
* Copyright (c) 2010, Zeljko Marjanovic <savethem4ever@gmail.com>
* This code is licensed under MPL 1.1
* For details, see http://www.mozilla.org/MPL/MPL-1.1.html
* }
{ **
* Delphi/Pascal Wrapper around the library "libssh2"
* Base repository:
* https://bitbucket.org/ZeljkoMarjanovic/libs... |
module SignHost
class Checksum
attr_reader :configuration
def initialize(configuration)
@configuration = configuration
end
def create(transaction_id, file_id, status)
create_checksum(transaction_id, file_id, status)
end
private
def create_checksum(transaction_id, file_id, s... |
fpath=( $moddir/functions $fpath )
autoload -U $moddir/functions/*(:t)
setopt nofunctionargzero
###
# Function used to boot PCI-e based NIC cards
function nic_boot() {
}
|
module PolyPaver.Plot
(
initPlot,
addBox,
State,
-- ,
-- waitForClose
)
where
import PolyPaver.APBox
import qualified Numeric.ER.Real.Approx as RA
import Numeric.ER.Real.Base
import Numeric.ER.Real.DefaultRepr
--import Numeric.ER.Misc
import qualified Graphics.UI.Gtk as Gtk
import Graphics.UI.Gtk... |
# frozen_string_literal: true
RSpec.describe BasisTheory::Object do
it 'creates an object from a hash' do
object = described_class.new(foo: 'bar')
expect(object.foo).to eq('bar')
end
it 'creates an object from a nested hash' do
object = described_class.new(foo: { bar: { baz: 'ding' } })
expect... |
function Write-GRKGreet2
{
param ($name)
Write-Host("how are you, " + $name + "?")
}
function Write-GRKBye
{
Write-Host "ok bye!"
}
function Write-GRKGreet
{
param($name)
Write-Host("hello, " + $name + "!")
Write-GRKGreet2 $name
Write-Host "getting ready to say bye..."
Write-GRKBye
}
... |
using DataGenerators
regex_generator(:SCWildcardGen, ".")
@testset "choose(String) using regex containing wilcard" begin
gn = SCWildcardGen()
@testset "emits different ASCII strings that match regex" begin
td = choose(gn)
@test typeof(td) == String
@test ismatch(r"^.$", td)
@mcheck_values_vary... |
using System;
using SharpVk.Spirv;
namespace SharpVk.Shanq
{
[AttributeUsage(AttributeTargets.Field)]
public class BuiltInAttribute
: Attribute
{
public BuiltInAttribute(BuiltIn builtIn)
{
BuiltIn = builtIn;
}
public BuiltIn BuiltIn
{
... |
using NUnit.Framework;
namespace Queue.Test.LinkedListQueue
{
[TestFixture]
public class Clear : Base
{
// Test: Use Clear() to reset an empty queue
// Outcome:
// 1. Count should equal 0
[Test]
public void ClearEmptyQueue()
{
EmptyL... |
/** Set a random style left for an element
*
*/
function setRandomLeft(e){
e.style.position = "absolute";
e.style.left = Math.random() * (window.innerWidth - e.offsetWidth);
}
/** Set a random style top for an element
*
*/
function setRandomTop(e){
e.style.position = "absolute";
e.style.top = Math.random() * (w... |
package mx.itesm.dibujandoapp.view
import android.os.Bundle
import android.view.Menu
import com.google.android.material.navigation.NavigationView
import androidx.navigation.findNavController
import androidx.navigation.ui.AppBarConfiguration
import androidx.navigation.ui.navigateUp
import androidx.navigation.ui.setupAc... |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE TemplateHaskell #-}
module Diagram.GanttChart where
import Control.Lens.TH (makeLenses)
import Parser
import Text.Megaparsec as M
import Text.Megaparsec.Char (char, string)
data GanttChartGraph = GanttChartGraph
{ _ganttChartTi... |
// =================================================================
//
// * WARNING *
//
// This file is generated!
//
// Changes made to this file will be overwritten. If changes are
// required to the generated code, the service_crategen project
// must be updated to g... |
package ru.aydarov.themechanger
import android.os.Parcelable
import kotlinx.android.parcel.Parcelize
@Parcelize
internal data class Coordinates(
val posX: Int,
val posY: Int
) : Parcelable |
import io.gatling.recorder.GatlingRecorder
import io.gatling.recorder.config.RecorderPropertiesBuilder
import scala.Option
object Recorder {
@JvmStatic
fun main(args: Array<String>) {
val props = RecorderPropertiesBuilder()
.simulationsFolder(IDEPathHelper.mavenSourcesDirectory.toString())... |
#ifndef DCB_APP_H__
#define DCB_APP_H__
#include "FreeRTOS.h"
#include <nrfx.h>
#include "DCB_drv.h"
#include "task.h"
#include "nrf.h"
#include "nordic_common.h"
#include "boards.h"
#include "app_timer.h"
#include "app_util.h"
#include "nrf_sdh.h"
#include "nrf_sdh_ble.h"
#include "nrf_log.h"
#include "nrf_log_ctrl.... |
import { DaffCart } from '@daffodil/cart';
import {
DaffAddToCart,
DaffAddToCartSuccess,
} from '@daffodil/cart/state';
import { DaffCartFactory } from '@daffodil/cart/testing';
import {
OpenAddToCartNotification,
CloseAddToCartNotification,
} from '../actions/add-to-cart-notification.actions';
import {
init... |
class Notification < ApplicationRecord
belongs_to :user
belongs_to :access_request, optional: true
belongs_to :change_request, optional: true
belongs_to :incident_report, optional: true
scope :cr, -> { where(:incident_report_id => nil, :access_request_id => nil) }
scope :new_cr, -> {where(:message => 'ne... |
#!/usr/bin/env bash
. "$_scripts_dir/common/common.sh"
_init_script "$0"
. "$_scripts_dir/utils.sh"
. "$_scripts_dir/common/i18n_core.sh"
_init_i18n "$1"
. "$_scripts_dir/i18n.sh"
_command_to_execute=("certbot" "certonly" "--noninteractive")
if ! _output_custom_list_of_certificates _cert_name; then
exit 1
fi
_c... |
using System;
using System.Collections.Generic;
using System.Linq;
class SweetDessert
{
static void Main()
{
var cash = decimal.Parse(Console.ReadLine());
var numberOfGuest = long.Parse(Console.ReadLine());
var bannana = decimal.Parse(Console.ReadLine());
var egg = decimal.Pars... |
package com.example.autogenemojii.adapter
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.ImageView
import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView
import com.example.autogenemojii.R
import com.example.autogenemojii.datacla... |
module AlecSequences.A271471 (a271471) where
import AlecSequences.A271468 (a271468, a271468_list)
import Data.Maybe (fromJust)
import Data.List (find)
a271471 :: Int -> Integer
a271471 n = a271471_list !! (n - 1)
a271471_list = f $ tail a271468_list where
f (a:as) = a : f (filter (\i -> i `mod` a /= 0) as)
|
资源文件拷贝的三种方式
===
- 类加载器(类路径)
- 用`Classloader.getResourceAsStream()`来读取类路径中的资源,然后用`FileOutputStream`写入到自己的应用中(*sdk开发的时候经常用这种方式*)。
- 这种方式**必须**要将数据库`address.db`放到**src**目录下,这样编译后就会直接将`address.db`生成到`bin/classes`目录中,会在类路径下,
所以可以使用`Classloader`进行加载.
```java
InputStream is = getClassLoader().getResou... |
<?php
declare(strict_types=1);
namespace Rooftop\PhpBootstrap\SOLID\OpenClosed\Extra\PHPUnit;
/*
* The PHPUnit testing framework provides a great example of how a class can be open to extension,
* but closed for modification. The PHPUnit_Extensions_Database_TestCase abstract class
* requires that each individual t... |
# coding: utf-8
require_relative 'grid'
require_relative 'memory'
require_relative 'coords'
require_relative 'direction'
class Hexagony
class ProgramError < Exception; end
def self.run(src, debug_level=0, in_str=$stdin, out_str=$stdout, max_ticks=-1)
new(src, debug_level, in_str, out_str, max_ticks)... |
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using Xunit;
namespace System.Net.Sockets.Tests
{
public class LingerStateTest
{
// This is a stand-in for an issue to be filed when this code is merg... |
module Mautic
class Field < Model
def self.endpoint
'fields/contact'
end
def self.add_field(connection, names, opts)
make_field = -> name { Field.new(connection, opts.merge(label: name.to_s, alias: name.to_s)) }
if names.is_a?(Array)
fields = names.map(&make_field)
field... |
import * as vscode from "vscode";
import * as lc from "vscode-languageclient/node";
import { Config } from "./config";
import { log } from "./util";
let client: lc.LanguageClient;
export function activate(context: vscode.ExtensionContext) {
const config = new Config(context);
client = new lc.LanguageClient(
... |
package io.hektor.core;
import io.snice.protocol.Request;
import io.snice.protocol.Response;
import java.util.concurrent.CompletionStage;
public interface TransactionalActor extends Actor {
/**
* The {@link ActorRef#tell(Object)} method, which is the most common way to communicate with an {@link Actor},
... |
package com.example.morro.FastBuyApp.Core;
/**
* This class is being used for %off items, providing adequate personalization for this kind of Items
*/
public class OffItem extends Item {
private int discount;
/** public constructor */
public OffItem(String itemName, String itemBrand, String itemImage, S... |
--- bin/dcm.pl.orig 2018-03-21 18:09:58 UTC
+++ bin/dcm.pl
@@ -1334,8 +1334,10 @@ sub getPage {
initialize();
## Get contents of /etc/onabase, and trim it
-my $onabase = qx(cat /etc/onabase 2>/dev/null);
-$onabase =~ s/\s+$//;
+#my $onabase = qx(cat /etc/onabase 2>/dev/null);
+#$onabase =~ s/\s+$//;
+# This is Fr... |
// <copyright file="IntegrationTelemetryCollector.cs" company="Datadog">
// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License.
// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc.
// </copyright>
using S... |
/* Copyright (c) 2019, aorxsr (aorxsr@163.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 applicabl... |
unless Rails.env.production?
Deface::Override.new(
:virtual_path => 'spree/admin/shared/_header',
:name => 'add_debug_line_if_env_not_production',
:insert_before => '[data-hook="admin_login_navigation_bar"]',
:text => "<h4 style='position: absolute; color:#fff;'>[#{Rails.env}]</h4>"
)
end
Spree::Co... |
package com.smartsheet.api.internal.util;
/*
* #[license]
* Smartsheet Java SDK
* %%
* Copyright (C) 2014 Smartsheet
* %%
* 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
*
* ht... |
/* -----------------------------------------------------------------------------
*
* (c) The GHC Team, 2005
*
* RTS entry points as mandated by the FFI section of the Haskell report
*
* ---------------------------------------------------------------------------*/
#include "PosixSource.h"
#include "HsFFI.h"
#incl... |
# -*- coding: utf-8 -*-
"""This module defines classes for computing DC operating point.
"""
from typing import Dict
import numpy as np
def mos_y_to_ss(sim_data, char_freq, fg, ibias, cfit_method='average'):
# type: (Dict[str, np.ndarray], float, int, np.ndarray, str) -> Dict[str, np.ndarray]
"""Convert tr... |
use gloo::events::EventListener;
use serde::{de::DeserializeOwned, Deserialize, Serialize};
use std::{collections::HashSet, sync::Arc};
use wasm_bindgen::prelude::*;
use wasm_bindgen::JsCast;
use web_sys::MessageEvent;
use super::{
raft::{Peer, Role},
Node,
};
#[derive(Serialize, Deserialize)]
struct MessageW... |
require "./menu"
class Food < Menu
attr_accessor :calorie
# Definisikan method `initialize`
def initialize(name:, price:, calorie:)
self.name = name
self.price = price
self.calorie = calorie
end
def info
return "#{self.name} $#{self.price} (#{self.calorie}kcal)"
end
def calorie_i... |
import _ from "lodash";
import React, {useRef, useLayoutEffect} from "react";
import * as ProbDist from "../ProbDist";
export type GraphDims = {
horizontal: boolean;
labelFontSize: number;
labelHeight: number; // Only used if horizontal is false
labelWidth: number; // Only has minor use unless horizontal is true
... |
# Vangrat & Chef - Infrastructure as a Code
* Presentation [slides](http://kowal.github.io/pres-vagrant-chef-infrastructure/#slide2)
* Developed with [CSSS](http://leaverou.github.io/csss/)
|
#-------Enable, Rename, & Reset Local Administrator Password-------#
####################################################################
#Get Service Tag
$servicetag = (gwmi win32_bios).SerialNumber
#Rename Local Admin Account
$admin=[adsi]"WinNT://./Administrator,user"
$admin.psbase.rename("Ron.Johnson")
#Enables... |
package cn.dlut.util;
import java.util.Comparator;
import cn.dlut.entity.Vnet_request;
public class Vnet_requestComparator implements Comparator<Vnet_request> {
@Override
public int compare(Vnet_request r1,Vnet_request r2)
{
if(r1.getRequest_group().compareTo(r2.getRequest_group())>0)
return 1;
else if(r... |
require "spec_helper"
describe PagSeguro::Authorization::ResponseSerializer do
context "when payment request is created" do
let(:source) { File.read("./spec/fixtures/authorization/find_authorization.xml") }
let(:xml) { Nokogiri::XML(source) }
let(:serializer) { described_class.new(xml.css("authorization"... |
#ifndef __MEMBER_CALLBACKS__
#define __MEMBER_CALLBACKS__
class RbActStatus;
interface MemCallBack
{
virtual bool Call( RbActStatus& State ) = 0;
};
#endif //__MEMBER_CALLBACKS__
|
/**
* Point object
* @author Elihu A. Cruz <elihuacruz@gmail.com>
* @version 0.1.1
*/
class Pointer {
/**
* Initialize enviroment
* @param {Number} x X axis position
* @param {Number} y Y axis position
* @param {Number} size Circle radius
* @param {String} color Main Color
*/
constructor (x =... |
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
namespace Aggregail
{
/// <summary>
/// Base class of an Aggregate Root
/// </summary>
/// <typeparam name="TIdentity">Type of ID for the Aggregate</typeparam>
/// <typeparam name="TAggregate">Type... |
# 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 in writing, software
# d... |
package me.bttb.crs.beans.dm.msrmnts;
import java.io.Serializable;
import java.util.List;
import java.util.stream.Collectors;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ManagedProperty;
import javax.faces.bean.SessionScoped;
... |
import type { NextApiRequest, NextApiResponse } from 'next';
export type HttpMethods = 'GET'|'POST'|'PUT'|'DELETE'|'PATCH'
export type MethodHandler = (req: NextApiRequest, res: NextApiResponse) => void
export type MethodModel = {
[key in HttpMethods]?: MethodHandler
}
const withMethod = (handlers: MethodModel) => ... |
package eWarehouse
import Departamento.Departamento
import EstadoMaquina.EstadoMaquina
class Trabajador (id : Int, name: String, depart: Departamento){
val ID : Int = id
val nombre: String = name
var departamento = depart
}
|
import * as React from 'react';
import { Image, ScrollView, Text, TextInput, TouchableOpacity, View } from 'react-native';
import {
AddFriendsList,
ButtonSizes,
CheckboxButtonWithIcon,
CloseButton,
Header,
MediaHorizontalScroller,
PrimaryButton,
SharePostInput,
} from '../../components';
import { IFriendsSearc... |
import React from 'react';
import ProjectsLink from './ProjectsLink';
const ProjectsDisplay = () => {
return (
<div className="columns projectsPage is-mobile">
<div className="column is-6-mobile is-offset-2-tablet is-4-tablet is-offset-2-desktop is-2-desktop">
<ProjectsLink to="/projects/zer... |
import 'package:xml/xml.dart' as xml;
class StreamInfoParser {
xml.XmlElement _root;
StreamInfoParser(this._root);
int parseItag() => int.tryParse(
_root.attributes.firstWhere((x) => x.name.local == 'id').value);
String parseUrl() => _root.descendants
.firstWhere((x) => x is xml.XmlElement && x.... |
namespace Epinova.ArvatoPaymentGateway
{
internal class ShippingDetailsDto
{
public string ShippingCompany { get; set; }
public string TrackingId { get; set; }
public string Type { get; set; }
}
}
|
#!/usr/bin/env python
# -*- coding:utf-8 -*-
import logging
import json
from Geohash import geohash
from rest_framework import serializers
from .models import *
from accounts.api import UserSerializer
from authtools.models import User
from rest_framework.renderers import JSONRenderer
from rest_framework.parsers imp... |
namespace SqlStreamStore.Streams
{
/// <summary>
/// Stream expected version constants.
/// </summary>
public static class ExpectedVersion
{
/// <summary>
/// Any version.
/// </summary>
public const int Any = -2;
/// <summary>
/// Stream... |
const Image = require("@11ty/eleventy-img");
const basepath = "src/site/img/";
// usage: {% image './src/images/cat.jpg', 'photo of my cat' %}
async function imageShortcode(src, alt = undefined, sizes = "100vw") {
let proc_src = "";
if (alt === undefined) {
console.warn(
`>>> WARNING: Missing \`alt\` on... |
package LaTeX::Table::Types::TypeI;
use strict;
use warnings;
use Moose::Role;
use Template;
our $VERSION = '1.1';
use Carp;
has '_table_obj' => ( is => 'rw', isa => 'LaTeX::Table', required => 1 );
has '_tabular_environment' => ( is => 'ro', required => 1 );
has '_template' => ( is => 'ro', required =>... |
{-# LANGUAGE CPP #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE Tem... |
# frozen_string_literal: true
# Base class for monitoring services
#
# These services integrate with a deployment solution like Prometheus
# to provide additional features for environments.
module Integrations
class BaseMonitoring < Integration
default_value_for :category, 'monitoring'
def self.supported_ev... |
// ==========================================================================
// ISchemaEntity.cs
// Squidex Headless CMS
// ==========================================================================
// Copyright (c) Squidex Group
// All rights reserved.
// =========================================================... |
using System.ComponentModel.DataAnnotations;
namespace Zza.Model
{
public class Product
{
public Product()
{
HasOptions = true;
}
[Key]
public virtual int Id { get; set; }
[Required, MaxLength(20)]
public virtual string Type { get; set; }
... |
import {
Component,
Input,
Output,
TemplateRef,
EventEmitter,
ElementRef,
ViewEncapsulation
} from '@angular/core';
//
// Library
//
import { Library, Guid, Action } from '@lernender/core';
@Component({
moduleId: module.id,
selector: 'ln-card',
templateUrl: 'ln-card.html',
styleUrls: ['ln-card.cs... |
<?php
namespace craft\commerce\paymongo;
class PaymentIntent extends ApiResource
{
const OBJECT_NAME = 'payment_intent';
// use ApiOperations\All;
// use ApiOperations\Create;
// use ApiOperations\Retrieve;
// use ApiOperations\Update;
const STATUS_CANCELED = 'canceled';
const STATU... |
import React from 'react'
import Image from 'next/image'
import img from '../public/test.jpg'
const Page = () => {
return (
<div>
<Image id="invalid-style" src={img} style={{ width: '100%' }} />
</div>
)
}
export default Page
|
<?php declare(strict_types=1);
namespace Test\Unit;
use Laminas\Diactoros\Response\TextResponse;
use Laminas\Diactoros\StreamFactory;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Swoole\Http\RequestCallbackOptions;
use Test\Fixture\NonReadableStream;
use Test\Fixture\Swoole... |
[#]: collector: "lujun9972"
[#]: translator: "mr-ping"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-12125-1.html"
[#]: subject: "Different Ways To Update Linux Kernel For Ubuntu"
[#]: via: "https://www.ostechnix.com/different-ways-to-update-linux-kernel-for-ubuntu/"
[#]: author: "SK ht... |
#pragma once
#include <Register/Utility.hpp>
namespace Kvasir {
//General Purpose Input/Output
namespace FgpiocPdor{ ///<Port Data Output Register
using Addr = Register::Address<0xf80ff080,0x00000000,0x00000000,unsigned>;
///Port Data Output
constexpr Register::FieldLocation<Addr,Registe... |
#!/bin/bash
# NS=sds - set namespace name, default sds
if [ -z "$1" ]
then
echo "$0: you need to specify env: test, dev, stg, prod"
exit 1
fi
if [ -z "$NS" ]
then
NS=sds
fi
change_namespace.sh $1 "$NS"
"${1}h.sh" delete "${NS}-debug"
change_namespace.sh $1 default
|
---
title: "哎哟哟, 甘心套路"
date: 2019-02-01
tags:
- 杂文
---
呵呵哒, 不知道说啥好, 好久没写东东, sp大年三就要办婚礼了bless.
思考, 观点, 碰撞, 颠覆真的少了好多.
新年之际, 大家都在集福, 可是谁不知道, 最后分到的大概就是2-3块~可是我们就是甘心被套路, 因为大家都在玩, 图个开心.
孩子vs成年人的世界难道不是这样吗? 佩奇在家扮演医生, 猪爸爸难道不懂, 却还是卖力的配合她的演出.
成年人看多了套路, 没必要一副桀骜不驯的脸面, 好像自己历经沧桑, 一切剧情都了然的态度面对生活. 反而, 看透不点透, 生活才是有趣.
被看过电影的人剧透... |
package org.javers.core
import org.javers.common.date.DateProvider
import org.javers.common.string.ShaDigest
import org.javers.core.commit.CommitFactory
import org.javers.core.graph.LiveCdoFactory
import org.javers.core.json.JsonConverter
import org.javers.core.json.JsonConverterBuilder
import org.javers.core.metamode... |
use ::std::borrow::Cow;
use ::std::collections::HashMap;
use ::std::fmt::Display;
use ::std::fmt::Formatter;
use ::std::fmt::Result as fResult;
use ::std::str::FromStr;
use ::lazy_static::lazy_static;
lazy_static! {
// Note: keywords must follow the same rules as identifiers, or the lexer will
// not recogniz... |
class String
define_method(:clock_angle) do
time = self.split(":")
hour = time.at(0).to_f
minute = time.at(1).to_f
hourAngle = (hour * 30) + (minute * 0.5)
minuteAngle = minute * 6
resultingAngle = (hourAngle - minuteAngle)
if resultingAngle == 360.00
resultingAn... |
---
uid: System.Drawing.Printing.PaperSize
ms.technology:
- "dotnet-standard"
author: "stevehoag"
ms.author: "shoag"
manager: "wpickett"
---
---
uid: System.Drawing.Printing.PaperSize.PaperName
ms.technology:
- "dotnet-standard"
author: "stevehoag"
ms.author: "shoag"
manager: "wpickett"
---
---
uid: System.Draw... |
//
// Ryu
//
// Copyright (C) 2017 Jeff Panici
// All Rights Reserved.
//
// See the LICENSE file for details about the license covering
// this source code file.
//
#include <fstream>
#include <yaml-cpp/yaml.h>
#include <core/yaml_support.h>
#include <hardware/registry.h>
#include <common/stream_support.h>
#include <... |
package canoe.methods.messages
import canoe.marshalling.codecs._
import canoe.methods.Method
import canoe.models.{ChatId, InputFile}
import io.circe.generic.semiauto.deriveEncoder
import io.circe.{Decoder, Encoder}
/**
* Use this method to delete a message.
*
* A message can only be deleted if it was sent less ... |
// Basic rendering tests (full syntax tested in rimu_test.dart).
import 'package:test/test.dart';
import 'package:rimu/src/options.dart' as options;
import 'package:rimu/src/quotes.dart' as quotes;
import 'package:rimu/src/replacements.dart' as replacements;
import 'package:rimu/src/spans.dart';
void main() {
test(... |
# SSM整合
#### 介绍
SSM整合
#### 软件架构
Spring + Spring mvc + Mybaits
|
"use strict";
const fs = require("fs");
const upath = require("upath");
const sh = require("shelljs");
const libSquoosh = require("@squoosh/lib");
module.exports = function renderAssets() {
const sourcePath = upath.resolve(upath.dirname(__filename), "../src/assets");
const destPath = upath.resolve(upath.dirname(__... |
//+------------------------------------------------------------
//
// Copyright (C) 1998, Microsoft Corporation
//
// File: smtpseo.h
//
// Contents:
// Common types definitions needed across projects for SMTP's seo
// dispatcher
//
// Classes:
//
// Functions:
//
// History:
// jstamerj 980608 12:29... |
using DrWatson
@quickactivate
using ArgParse
using GenerativeAD
import StatsBase: fit!, predict
using StatsBase
using BSON, FileIO
using Flux
using GenerativeModels
using DistributionsAD
using ValueHistories
s = ArgParseSettings()
@add_arg_table! s begin
"modelname"
default = "vae"
arg_type = String
help = "mod... |
from random import randint, sample
from typing import List, Tuple
from wgups.data.distance_table import DistanceTable
from wgups.data.package_table import PackageTable
from wgups.routing.package import Package
from wgups.routing.truck import Truck
from wgups.structures.clock import Clock
from wgups.structures.hash_set... |
/*
* 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 ... |
### Basic Usage
Due to the wide variety of routing strategies within React, the `Chrome` component doesn't
provide any opinionated navigation solutions. The `NavItem` and `SubNavItem` components are
`button` elements that accept all native attributes and events. If you are using a routing
library like [react-router](h... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.