text stringlengths 27 775k |
|---|
package controllers.application
import actors.PartitionedPortStateActor.{GetStateForDateRange, GetUpdatesSince, PointInTimeQuery}
import akka.pattern.ask
import controllers.Application
import uk.gov.homeoffice.drt.auth.Roles.DesksAndQueuesView
import drt.shared.CrunchApi.{MillisSinceEpoch, PortStateUpdates}
import drt... |
CREATE PROCEDURE dbo.DeletePhoto
@id int
AS
BEGIN
delete
from Photos
where PhotoID=@id
END
|
<?php
namespace DontFindMe;
use RecursiveCallbackFilterIterator as RCFI; // lookup from the last line should not find this
namespace Foo;
use ArrayAccess; // simple bilt in class import
use ArrayObject as AO; // same with rename
use DateTime, DateTimeZone; // multiple import in one line
use Exception as E,
LogicEx... |
module Lib
( printIgnoreFile
, vimify
, appendRules
) where
import Network.HTTP.Client
import Network.HTTP.Client.TLS
import Data.ByteString.Lazy.Char8 (unpack)
import Data.Char (toUpper)
capital :: String -> String
capital (x:xs) = toUpper x : xs
vimify :: String -> String
vimify = appendRules "*.s... |
#
# Copyright 2018 the original author or authors.
#
# 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... |
import 'package:fs_shim/fs_io.dart' as fs;
import 'package:tekartik_io_utils/io_utils_import.dart';
import 'fs/fs_deploy.dart' as fs;
export 'fs/fs_deploy.dart' show FsDeployOptions, fsDeployOptionsNoSymLink;
///
/// Deploy between 2 folders with an option config file
///
/// [settings] can be set (files and exclude... |
import './banner.less'
import { Sidetittel } from 'nav-frontend-typografi'
import React from 'react'
import { tekst } from '../../utils/tekster'
const Banner = () => {
return (
<header className="sidebanner">
<Sidetittel tag="h1" className="sidebanner__tittel">
{tekst('spvedta... |
#include <stdbool.h>
#include <unistd.h>
#include <string.h>
#include <stdio.h>
#include "init_ctx.h"
#include "security.h"
#include "os.h"
#define alignto(p, bits) (((p) >> bits) << bits)
#define aligntonext(p, bits) alignto(((p) + (1 << bits) - 1), bits)
#define MAGIC 0xff1133aa
typedef struct alloc_header ... |
#!/bin/bash
set -e
MONTH=$1
RANDOM="$(openssl rand --hex 4)"
IC_TIMESTAMP="2016${MONTH}01.000000"
export IC_URL="gs://vcm-ml-raw/2020-11-05-GFS-month-start-initial-conditions-year-2016/2016${MONTH}0100"
OUTPUT=gs://vcm-ml-experiments/2021-03-15-nudge-to-obs-GRL-paper-rev1/weather-forecasts/$IC_TIMESTAMP
envsubst < ... |
<?php
declare(strict_types=1);
namespace Database\Factories;
use App\Models\GameHistory;
use App\TicTacToe\Game;
use Exception;
use Faker\Factory as Faker;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;
class GameHistoryFactory extends Factory
{
/**
* The name of the factor... |
package net.petitviolet.generic.diff
object GenericDiffSample {
private case class User(id: Long, name: String, age: Int)
private case class GroupName(value: String)
private case class Group(id: Long, name: GroupName)
def main(args: Array[String]): Unit = {
val userDiff = User(1L, "alice", 20) diff User(... |
set -e
wget -o - https://github.com/libevent/libevent/releases/download/release-2.1.8-stable/libevent-2.1.8-stable.tar.gz
tar xf libevent-2.1.8-stable.tar.gz
cd libevent-2.1.8-stable
./configure --prefix=$THIRDPARTY_BUILD --enable-shared=no --disable-libevent-regress --disable-openssl
make install
|
#!/bin/bash
if [ -e "/etc/os-release" ]; then
DIR="$(dirname "$(readlink -f "$0")")"
else
DIR="$(dirname "$(greadlink -f "$0")")"
fi
cd "$DIR"
cat <<EOT > WhenBuilt.cs
using System;
namespace SpeedyCdn.Server
{
public static class WhenBuilt
{
public static DateTime ItWas = DateTime.Parse("$(... |
# SPADE/GauGAN: Semantic Image Synthesis with Spatially-Adaptive Normalization
###
[Project](https://nvlabs.github.io/SPADE/) |
[Paper](https://arxiv.org/abs/1903.07291) |
[GTC Video (2m)](https://youtu.be/p5U4NgVGAwg) |
[Video (2m)](https://youtu.be/MXWm6w4E5q0) |
[Demo](https://www.nvidia.com/en-us/research/ai-playg... |
class District < ApplicationRecord
belongs_to :state
has_many :lsg_bodies, dependent: :destroy
has_many :facilities, dependent: :destroy
end
|
package de.flapdoodle.io.filetree
import de.flapdoodle.photosync.LastModified
import java.io.IOException
import java.nio.file.FileVisitResult
import java.nio.file.FileVisitor
import java.nio.file.Files
import java.nio.file.Path
import java.nio.file.attribute.BasicFileAttributes
class FileTreeVisitorAdapter(
priva... |
begin work;
UPDATE phylotree
SET newickstring = newickstring || ';'
WHERE newickstring NOT LIKE '%;'
AND newickstring NOT LIKE '% '
AND newickstring IS NOT NULL;
-- results in 3 changes
commit;
|
---
title: Fecha e información del autor
examples:
- title: Ejemplo simple
arguments:
authors:
- samrichard
contributors:
samrichard:
name:
given: Sam
family: Ricardo
work:
company: Google
org: Chrome OS
ti... |
import { watch, WatchSource, onScopeDispose, WatchStopHandle, getCurrentScope } from 'vue'
import { isNullable, Nullable } from '@fssgis/utils'
export function whenTruly<T> (source: WatchSource<Nullable<T>>, callback?: (source: T) => void) : Promise<T> {
let stop : Nullable<WatchStopHandle> = null
if (getCurrentSc... |
DIVIDE:
MOV R4, #'/'
MOV R0, #0h
MOV A, #50h
ADD A, R0
MOV R0, A
MOV A, @R0
ACALL CONTINUECODE
|
use std::path::PathBuf;
use std::str::FromStr;
use anyhow::Result;
use structopt::StructOpt;
#[derive(StructOpt)]
enum Args {
/// Reads or sets phar stub
Stub {
/// Path to the phar file
#[structopt(parse(from_os_str))]
file: PathBuf,
/// If set, the phar stub is changed to th... |
class SomeCallbackClass
def after_destroy(record)
puts "after_destroy announcement callback"
end
end
module Announcements
def self.included(base)
base.class_eval do
before_save { puts "before_save announcement callback" }
after_save :announce_save
around_save lambda { puts "around_save... |
// See LICENSE.SiFive for license details.
package freechips.rocketchip.diplomaticobjectmodel.model
case class OMSpecification(
name: String,
version: String
)
|
using BandedMatrices, LinearAlgebra, FillArrays, Test
import BandedMatrices: _BandedMatrix
using Random
@testset "dot(x, A::BandedMatrix, y)" begin
Random.seed!(0)
@testset "Single, constant diagonal" begin
for (m,n,l) in [(100,15,5),(15,100,-5)]
S = _BandedMatrix(0.1Ones{Int}(1,n), Base.On... |
# -*- sh -*-
# Use emacs keybindings
bindkey -e
# Some systems misses the appropriate /etc/inputrc for this
bindkey "\e[3~" delete-char # Delete
# Replace insert-last-word by a smart version
autoload -Uz smart-insert-last-word
zle -N insert-last-word smart-insert-last-word
zstyle :insert-last-word match '*([[... |
using Flux, CuArrays, Base.Test
info("Testing Flux/CUDNN")
@testset "RNN" begin
@testset for R in [RNN, GRU, LSTM]
rnn = R(10, 5)
curnn = mapleaves(gpu, rnn)
@testset for batch_size in (1, 5)
Flux.reset!(rnn)
Flux.reset!(curnn)
x = batch_size == 1 ?
param(rand(10)) :
pa... |
module Explorer
class RequestStream
attr_reader :request
def initialize(request)
@request = request
end
def readpartial(maxlen, outbuf="")
results = request.body.readpartial(maxlen)
if results.nil?
outbuf.replace ""
raise EOFError.new("End of Stream")
else
... |
//===-- gala/foundation/assert.cc -----------------------*- mode: C++11 -*-===//
//
// _____ _
// | __|___| |___
// | | | .'| | .'|
// |_____|__,|_|__,|
//
// This file is distributed under the... |
class CreatePrismObservations < ActiveRecord::Migration[6.0]
def change
create_table :prism_observations do |t|
t.integer :observation_id
t.integer :participant_id
t.string :household_id
t.string :abdominal_pain
t.integer :abdominal_pain_duration
t.string :admitting_hospital
... |
#!/bin/bash
#
# Copyright (c) 2019-2020 P3TERX <https://p3terx.com>
#
# This is free software, licensed under the MIT License.
# See /LICENSE for more information.
#
# https://github.com/P3TERX/Actions-OpenWrt
# File name: diy-part1.sh
# Description: OpenWrt DIY script part 1 (Before Update feeds)
#
# Uncomment a feed... |
class AssociateUsersWithUploads < ActiveRecord::Migration
def change
change_table :uploads do |table|
table.belongs_to :user
table.string :s3_url
end
end
end
|
// Original file: src/protos/zetasql/parser/ast_enums.proto
export enum SchemaObjectKind {
__SchemaObjectKind__switch_must_have_a_default__ = -1,
kInvalidSchemaObjectKind = 1,
kAggregateFunction = 2,
kConstant = 3,
kDatabase = 4,
kExternalTable = 5,
kFunction = 6,
kIndex = 7,
kMaterializedView = 8,
... |
function Find-WPFControl
{
PARAM($Form,$ControlName)
$Form.FindName("$ControlName")
} |
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var usage = require('./usage.js');
var toolbar = require('./toolbar.js');
var simple = require('./simple.js');
var embeds = require('./embeds.js');
var mentions = require('./mentions.js');
var readOnly = require('./readOnly.js');
exports.... |
/*
* Copyright (c) 2021, The University of California at Berkeley.
*
* 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 cond... |
package rules
import (
"regexp"
"github.com/zricethezav/gitleaks/v8/config"
)
func AWS() *config.Rule {
// define rule
r := config.Rule{
Description: "AWS",
RuleID: "aws-access-token",
Regex: regexp.MustCompile(
"(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}"),
Keywords: []str... |
/**
* 简易版 ioc
*
* @author wujohns
* @date 19/04/25
*/
import 'reflect-metadata'
export class Container {
private insMap
constructor (providers) {
const insMap = {}
const serviceNameList = []
// 初始化 service (单例模式)
for (const provider of providers) {
// 从 metadata 中获取 service 的名称
... |
#include "GammaHandler.hh"
#include <exception>
#include <stdexcept>
#include "TestSpectra.hh"
using namespace std;
double yMax = 1.0; // arbitrary y max, might need to change
double brThresh = 0.1;
const vector<vector<double>>& GammaHandler::sourceLookupTable(
const std::string& source) {
// ener... |
module Linotype
class Move
attr_reader :game, :invalid_reason, :score, :tiles
attr_accessor :player, :previous_tile_values
def initialize(game, player, tiles)
@game = game
self.player = player
@tiles = tiles
set_previous_tile_values
calculate_valid
if valid?
... |
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may... |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Tower : MonoBehaviour {
public GameObject bullet;
public float fireDelay = 1f;
public float bulletForce;
private Creep m_Target;
private float m_FireDelay;
void FaceTarget(Creep creep)
... |
{ $HDR$}
{**********************************************************************}
{ Unit archived using Team Coherence }
{ Team Coherence is Copyright 2002 by Quality Software Components }
{ }
{ For further infor... |
namespace Workflow.Shared
{
public enum ActionTypeEnum
{
View = 0,
Approval = 1,
Delete = 2
}
}
|
part of wdesk.benchmark.dart2js_info.bundle_entity_data;
/// Aggregates all [PackageLibData] instances that share a [PackageLibData.packageName] value into a
/// single entity that represents a standalone top-level dart package found within an instance of [DeferredPartData].
class PackageData extends BundleEntityData ... |
#include "mlperf/inference/runner/loader.h"
#include <iterator>
#include <set>
#include <string>
#include <unordered_set>
#include <utility>
#include <vector>
#include "tensorflow/cc/saved_model/signature_constants.h"
#include "tensorflow/cc/saved_model/tag_constants.h"
#include "tensorflow/core/framework/tensor.h"
#... |
set -xe
. $(dirname "$0")/common.sh
export RUSTFLAGS="-D warnings"
pushd $BINDING_PATH/mmtk
cargo clippy
cargo clippy --release
cargo fmt -- --check
popd
find $BINDING_PATH/openjdk \
$BINDING_PATH/mmtk \
-name '*.hpp' \
-o -name '*.cpp' \
-o -name '*.rs' \
-o -name '*.toml' \
-o -name '*.gm... |
#!/bin/bash
#
# Script to install Sahana on a Debian Wheezy or Jessie box with Cherokee & PostgreSQL
#
# License: MIT
#
# Execute like:
# bash cherokee-postgis-install.sh
#
# =============================================================================
# Configuration
# Stable 2.14.6
WEB2PY_COMMIT=cda35fd
# Which... |
from .base import BaseRankingDataCollector
from ..rankingdata import LFIDFRankingData
from py_pdf_term.candidates import DomainCandidateTermList
from py_pdf_term.analysis import LinguOccurrenceAnalyzer
class LFIDFRankingDataCollector(BaseRankingDataCollector[LFIDFRankingData]):
def __init__(self) -> None:
... |
package com.cc.apptroy.request;
import com.cc.apptroy.NativeFunction;
/**
* Created by CwT on 16/5/15.
*/
public class BackSmaliShow extends CommandHandler {
@Override
public void doAction() {
NativeFunction.getInstance().showDexFile();
}
}
|
# Credit goes to https://bitbucket.org/spookylukey/django-fabfile-starter/src
import os
import datetime as dt
from io import StringIO
import json
import posixpath
import fabric
import requests
from fabsettings import (USER, HOST, DJANGO_APP_NAME,
DJANGO_APPS_DIR, LOGS_ROOT_DIR,
... |
import random
import string
from abc import ABC, abstractmethod
from decimal import Decimal
from typing import List
from django.db import DatabaseError
from boatsandjoy_api.availability.models import Slot
from boatsandjoy_api.core.data_adapters import DjangoDataAdapter
from . import domain, models
from .constants imp... |
package com.ingjuanocampo.enfila.domain.usecases.repository
import com.ingjuanocampo.enfila.domain.entity.Client
import com.ingjuanocampo.enfila.domain.usecases.repository.base.Repository
interface ClientRepository: Repository<List<Client>> {
} |
[expect php]
[file]
<?php
include('Phalanger.inc');
error_reporting (E_ALL);
$a = array(4);
$str = serialize($a);
print('Serialized array: '.$str."\n");
$b = unserialize($str);
print('Unserialized array: ');
__var_dump($b);
print("\n");
$str = serialize(array(4.5));
print('Serialized arra... |
/*! Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. */
export enum TextColor {
/**
* Primary black text color
*/
PRIMARY = 'primary',
/**
* Secondary dark gray text color
*/
SECONDARY = 'secondary',
/**
* Tertiary color for metadata
*/
METADATA =... |
import 'package:logging/logging.dart';
final Logger _log = Logger('AppConfig');
const String twitterConsumerKey =
String.fromEnvironment('twitter_consumer_key');
const String twitterConsumerSecret =
String.fromEnvironment('twitter_consumer_secret');
const String sentryDsn = String.fromEnvironment('sentry_ds... |
'use strict';
const Color = require('hexo-util').Color;
function tagcloudHelper(tags, options) {
if (!options && (!tags || !Object.prototype.hasOwnProperty.call(tags, 'length'))) {
options = tags;
tags = this.site.tags;
}
if (!tags || !tags.length) return '';
options = options || {};
const min = o... |
import 'package:fl_chart/fl_chart.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:star_book/utils/color.dart';
import '../models/mood.dart';
class PieChartWidget extends StatefulWidget {
final String type;
PieChartWidget(this.type);
@override
_PieChartW... |
pub mod my_blurz;
#[cfg(not(target_os="linux"))]
pub mod blurz_cross;
pub mod peripheral;
pub mod central;
pub const ADVERTISING_NAME:&str = "Hive";
pub const SERVICE_ID:u16 = 0x1234;
pub const HIVE_CHAR_ID:u16 = 0x1235;
pub const HIVE_DESC_ID:u16 = 0x1236;
pub const HIVE_PROPS_DESC_ID:u16 = 0x1237;
//todo this need... |
# PyCEDict
A library made for working with [CC-CEDICT](http://cc-cedict.org/wiki/) and
pinyin.
## Installation
pip install pycedict
## Quick Start
Download CC-CEDICT and gunzip it, save as cedict.txt.
$ python
...
>>> import cedict
>>> infile = open('cedict.txt')
>>> for ch, chs, pinyin, de... |
/*
* Copyright (C) Hao Feng
*/
package atiesh.utils
object ComponentLoader {
def createInstanceFor[C](fqcn: String): C = {
val c = Class.forName(fqcn).asInstanceOf[Class[C]]
c.newInstance()
}
def createInstanceFor[C](fqcn: String, args: Seq[(Class[_], AnyRef)]): C = {
val types = args.map(_._1)
... |
use super::{Command, State};
use crate::metainfo::Metainfo;
use crate::peer::{Handshake, Message};
use crate::storage::PieceStore;
use bitvec::BitVec;
use failure::Fail;
use log::{self, debug, error, info, warn};
use std::collections::HashSet;
use std::collections::VecDeque;
use std::io::{self, BufWriter, Write};
use s... |
//Principal de la pila
import java.io.*;
public class Pila
{
public static void main(String args[])
{
int nfilas, opcion;
char ingresecadena[];
System.out.println("\n");
System.out.println("Digite el numero de filas que desea que tenga la pila");
do
{
nfilas=Leer.datoInt();
System.out.p... |
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
#nullable disable
namespace Api.Kefalaio.Model
{
[Table("CASHFLOWPARAMS")]
public partial class Cashflowparam
{
[Ke... |
import atexit
import functools
import shlex
import shutil
import subprocess
import time
from typing import IO, Optional, Union
import redis
def is_redis_available(host: str, port: int = 6379) -> bool:
"""Returns whether a server running on the local host on a particular port is
available.
"""
redis_... |
import java.util.ArrayList;
import java.util.Random;
public class MyMain {
// Shuffles an array, using the perfect shuffle algorithm
public static int[] perfectShuffle(int[] arr) {
ArrayList<Integer> outList = new ArrayList<>();
int[] halfOne = new int[(int) (arr.length / 2)];
int[] ha... |
import {Autowrite, Schedule, ScheduleHandler, ScheduleJob, sendMessage, WorkerMessageType} from "summer-boot";
import BaseService from "../service/BaseService";
@Schedule("30 * * * * *")
export default class LoggerSchedule implements ScheduleHandler{
@Autowrite()
private base:BaseService;
public job: Sch... |
# Inquirer Loop



Inquirer **loop** prompt
---
## Installation
```sh
npm install --save inquirer-loop
```
## Usage
``... |
#ifndef PHYSICS_ANIMATION_HPP
#define PHYSICS_ANIMATION_HPP
#include "animation.hpp"
class PhysicsAnimation : public Animation
{
public:
PhysicsAnimation();
virtual ~PhysicsAnimation();
void AdvanceSingleFrame();
Frame GetCurrentFrame() const;
double GetCurrentTimeInSecon... |
import 'package:adotai/shared/dialogs/back_alert_dialog.dart';
import 'package:flutter/material.dart';
class WillPopHelper {
static Future<bool> onBackPressed(context) {
return showDialog(
context: context,
builder: (context) => BackAlertDialog(
onConfirm: () {
Navig... |
<?php
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use App\Entity\Patient;
class PatientController extends AbstractController
{
/**
* @Route("/patient", name="patient... |
package io.buildo.toctoc
package core
package authentication
import cats.data.EitherT
import cats.Monad
trait AuthenticationDomain[F[_], Credential] {
def authenticate(
c: Credential,
): F[Either[AuthenticationError, (AuthenticationDomain[F, Credential], Subject)]]
def register(
s: Subject,
c: Crede... |
module Wrappers (wrapInBlue, wrapInYellow, wrapInPercent) where
wrapInYellow :: String -> String
wrapInYellow string = "\x001b[33m"++string ++ "\x001b[0m"
wrapInBlue :: String -> String
wrapInBlue string = "\x001b[36m"++string ++ "\x001b[0m"
wrapInPercent :: String -> String
wrapInPercent text = "%" ++ text ++ "%"
|
<?php
namespace Upload\Provider;
use Qiniu\Auth;
use Qiniu\Storage\UploadManager;
use Upload\Provider\ProviderInterface;
use Upload\Helper;
class QiniuProvider implements ProviderInterface {
private $qiniu;
private $bucket;
private $accessKey;
private $secretKey;
private $token;
private $baseurl;
public f... |
package runner
import (
monitoring_check "github.com/bborbe/monitoring/check"
monitoring_node "github.com/bborbe/monitoring/node"
)
type Runner interface {
Run(nodes []monitoring_node.Node) <-chan monitoring_check.CheckResult
}
|
package com.sourceplusplus.marker.jvm
import com.intellij.ide.highlighter.JavaFileType
import com.intellij.openapi.application.ApplicationManager
import com.intellij.openapi.project.Project
import com.intellij.openapi.project.ProjectManager
import com.intellij.openapi.util.Computable
import com.intellij.psi.*
import c... |
var dir_7edf666f34c7cf990289c35a3c3f99b6 =
[
[ "DCEL", "dir_23ef3af3bd4781ad2fa6b0d124526adb.html", "dir_23ef3af3bd4781ad2fa6b0d124526adb" ]
]; |
-- Migrationscripts for ebean unittest
-- apply changes
SET @@system_versioning_alter_history = 1;
-- apply alter tables
CALL usp_ebean_drop_column('migtest_e_basic', 'description_file');
CALL usp_ebean_drop_column('migtest_e_basic', 'old_boolean');
CALL usp_ebean_drop_column('migtest_e_basic', 'old_boolean2');
CALL us... |
from mayan.apps.documents.events import event_document_type_changed
from mayan.apps.documents.tests.base import GenericDocumentTestCase
from .mixins.workflow_template_mixins import WorkflowTemplateTestMixin
class WorkflowInstanceModelTestCase(
WorkflowTemplateTestMixin, GenericDocumentTestCase
):
auto_upload... |
using System.IO;
using FluentAssertions;
using Newtonsoft.Json;
namespace Mandarin.Interfaces.Tests.Converters
{
public static class JsonConverterTestHelper
{
private static readonly JsonSerializer JsonSerializer = JsonSerializer.CreateDefault();
public static void AssertRoundTripOfValue(Json... |
#include "CR2Model.h"
#include "CLauMessage.h"
std::string CR2Model::M2_i_MI = "M2_In_MI";
std::string CR2Model::M2_o_EL = "M2_Out_EL";
CR2Model::CR2Model()
{
SetName("R2 Model");
m_state = STOP;
// Input
AddInPorts(1, M2_i_MI.c_str());
// Output
AddOutPorts(1, M2_o_EL.c_str());
}
CR2Model::~CR2Model()
{... |
import { Meta, moduleMetadata, Story } from '@storybook/angular';
import { notes } from './camel-case.notes';
import { LgCamelCasePipe } from './camel-case.pipe';
// This default export determines where your story goes in the story list
export default {
title: 'Pipes/Camel case',
component: LgCamelCasePipe,
dec... |
export const writeToClipboard = (data: string) => navigator.clipboard.writeText(data);
|
package com.qingshop.mall.modules.system.service.impl;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.apache.commons.lang3.ArrayUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
imp... |
# LSTM
%run test.1.py main --model='LSTMText' --batch-size=512 --model-path='checkpoints/LSTMText_word_0.411994005382' --result-path='/data_ssd/zhihu/result/LSTMText0.4119_word_val.pth' --val=True --zhuge=True
%run test.1.py main --model='LSTMText' --batch-size=256 --type_=char --model-path='checkpoints/LSTMText_c... |
import os
import numpy as np
import pytest
from jina import Document
from jina.clients import Client
from jina.clients.sugary_io import (
_input_files,
_input_lines,
_input_ndarray,
_input_csv,
)
from jina.enums import DataInputType
from jina.excepts import BadClientInput
cur_dir = os.path.dirname(os... |
import Scout from '../dist';
(async () => {
const scout = new Scout('youtube');
const result = await scout.autocomplete();
console.log(result);
})();
|
part of 'album_bloc.dart';
@immutable
abstract class AlbumEvent extends Equatable {
const AlbumEvent();
}
//eventos que serão enviados para a entrada do bloc
class LoadingSucessAlbumEvent extends AlbumEvent {
@override
// TODO: implement props
List<Object> get props => [];
}
class GetAlbumEvent extends Alb... |
#pragma once
#include "WinSetup.h"
#include "EngineCommons.h"
#define c_class SwapChain
class
{
GENERATED_DESC
CHAR_INFO* WriteFrame;
CHAR_INFO* ReadFrame;
float* ZBuffer;
methods(
bool (*DepthTest)(selfptr, unsigned x, unsigned y, float zValue);
void (*ClearFrame)(selfptr, CHAR_INFO color);
void (*Begin... |
#include<bits/stdc++.h>
using namespace std;
#define FZ(n) memset((n),0,sizeof(n))
#define FMO(n) memset((n),-1,sizeof(n))
#define MC(n,m) memcpy((n),(m),sizeof(n))
#define F first
#define S second
#define MP make_pair
#define PB push_back
#define FOR(x,y) for(__typeof(y.begin())x=y.begin();x!=y.end();x++)
#define IOS ... |
import styled from 'styled-components'
const Container = styled.div`
height: 48px;
border-radius: 27px;
display: flex;
background-color: hsl(225, 29%, 56%, 0.05);
/* opacity: 0.5; */
`
const InputStyled = styled.input`
height: 24px;
margin: 10px 28px 14px 0;
border: 0;
padding: 0;
color: #6f7faf;
... |
create table tx(c1 int, c2 int, c3 int);
ALTER TABLE tx SET (append_mode=on,rel_cn_oid=12345);
|
package params
// CustomValidation is an interface used to implements custom validation on
// a structure
type CustomValidation interface {
// IsValid checks if the provided params are valid.
// returns a boolean, the name of the field that failed (if any),
// and the error (if any)
IsValid() (isValid bool, fieldF... |
use crate::tetris;
use crate::drawer;
use crate::screens;
use drawer::Drawer;
use std::time::{Duration};
use screens::{NextScreen};
use crossterm::{
event::{poll, read, Event},
};
pub struct PauseScreen<'a> {
pub settings: &'a tetris::AppSettings,
}
impl screens::LoadScreen for PauseScreen<'_> {
fn load... |
/*
* @param {*} req Express req Object
* @param {*} res Express res Object
*/
const handleEnd = (req, res) => {
res.status(200).send('Start')
}
export default handleEnd; |
#!/bin/bash
PROJECT=$(gcloud config get-value project)
python3 example.py -p $PROJECT -t pubsub-e2e-example -i ../../actions.csv -s pubsub-e2e-example-sub
|
package global
import (
"encoding/json"
"fmt"
"github.com/mocheer/charon/adapter"
)
// AppConfig 应用配置
type AppConfig struct {
// 名称
Name string
// 应用服务信息
DisplayName string
// 是否启用https(前提条件:有申请对应的ssl证书)
IsHTTPS bool
// 监听端口
Port string
// 静态资源服务
Static []StaticConfig
// DSN(Data Source Name)数据源:数据库连接串... |
UPDATE UM_PERMISSION SET UM_RESOURCE_ID = REPLACE(UM_RESOURCE_ID, ':', '-at-') WHERE UM_RESOURCE_ID LIKE '%:%';
UPDATE UM_HYBRID_ROLE SET UM_ROLE_NAME = REPLACE(UM_ROLE_NAME, ':', '-at-') WHERE UM_ROLE_NAME LIKE '%:%';
UPDATE UM_ROLE_PERMISSION SET UM_ROLE_NAME = REPLACE(UM_ROLE_NAME, ':', '-at-') WHERE UM_ROLE_NAME LI... |
<?php
namespace App\Http\Controllers\Admin;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Session;
use App\User;
use App\Setting;
use App\SuccessfullDeposit;
use App\Earning;
use App\Activity;
class AdminController extends Controller
{
public function index()
... |
#!/bin/bash
cat $1 | ./graph && dot -Tsvg tree.dot -o tree.svg
|
// Source : https://leetcode.com/problems/number-of-digit-one/
// Author : Venkata Anil Kumar
/**********************************************************************************
*
* Given an integer n, count the total number of digit 1 appearing in all non-negative
* integers less than or equal to n.
*
* For ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.