text stringlengths 27 775k |
|---|
class CreateMubProperties < ActiveRecord::Migration[6.1]
def change
create_table :mub_property_settings do |t|
t.string :display_name, null: false
t.string :resource_type, null: false
t.string :setter_method_name, null: false
t.string :target_column, null: false
t.string :fk_ent... |
# 배열 4. O(n) 정렬
```
1부터100까지의 숫자 중에50개의 랜덤한 숫자가 들어있는 배열이 있다.
*이 배열을O(n)의 시간 복잡도로 정렬하라.
```
### 출제 의도
- 배열의 index를 활용하는지?
**배운점**
- for(int num : numbers){}
- boolean타입의 배열은 디폴트값 false;
### 문제.
#### 1부터100까지의 숫자 중에50개의 랜덤한 숫자가 들어있는 배열이 있다. 이 배열을O(n)의 시간 복잡도로 정렬하라.
### 풀이
1. **배열의 index를 활용한 방법**
```java
... |
// Imorts
const bcrypt = require('bcryptjs')
const jwt = require('jsonwebtoken')
const bodyParser = require('body-parser')
// Init
const router = require('express').Router()
const User = require('../model/User')
const urlencodedParser = bodyParser.urlencoded({ extended: false })
// Validators
const { registerValidatio... |
/*
* mocaccino.js
*
* Copyright (c) 2014 Maximilian Antoni <mail@maxantoni.de>
*
* @license MIT
*/
/*global suite, test*/
'use strict';
suite('fixture', function () {
test('passes', function () {
return;
});
});
|
module.exports = {
sidebar: {
'Developer documentation': [
'getting-started-with-linz',
'linz-defaults',
'models',
'permissions',
'api',
],
'Models': ['list-dsl', 'form-dsl'],
'Features': ['notifications', 'request-namespace... |
declare const enum AppVersion {
CS3 = 8.0,
CS4 = 9.0,
CS5 = 10.0,
CS5_5 = 10.5,
CS6 = 11.0,
CC = 12.0,
CC2014 = 13.0,
CC2015 = 13.5,
CC2015_1 = 13.6,
CC2015_2 = 13.7,
CC2015_3 = 13.8,
CC2017 = 14.0,
CC2017_2 = 14.2,
CC2018 = 15.0,
CC2018_2 = 15.1,
CC2019 = 16.0,
}
declare const enum Com... |
<?php
namespace Carrooi\ImagesManager\Helpers;
use Carrooi\ImagesManager\InvalidImageNameException;
/**
*
* @author David Kudera <kudera.d@gmail.com>
*/
class Validators
{
/**
* @param string $name
* @return bool
*/
public static function isImageFullName($name)
{
return preg_match('/^[a-zA-Z0-9-_]+\.... |
# career
An informational site about getting ready for a job or freelance career with references and exercises
|
class Period
attr_accessor :task, :start, :stop, :notes
def initialize(task, start, stop=nil, notes='')
@task = task
@start = start
@stop = stop
@notes = notes
end
def start
@start.class == Time ? @start : Time.parse(@start)
end
def stop
return nil if @stop.nil?
@stop.class =... |
package com.ethosa.ktc.utils
import android.content.Context
import android.os.Build
import com.ethosa.ktc.Preferences
import com.ethosa.ktc.R
/**
* @param context application context
*/
class AppDynamicTheme(
private val context: Context
) {
companion object {
const val DEFAULT_THEME = R.style.Theme... |
project_path: /web/_project.yaml
book_path: /web/shows/_book.yaml
description: Also webpack + workers, observables, and resize observers.
{# wf_updated_on: 2018-04-05 #}
{# wf_published_on: 2018-03-15 #}
{# wf_podcast_audio: https://storage.googleapis.com/http-203-podcast/episode-15.mp3 #}
{# wf_podcast_duration: 00:5... |
using Libplanet;
using System;
using System.Runtime.Serialization;
namespace LibUnity.Backend.Action.Exceptions
{
[Serializable]
public class InvalidTransferRecipientException : Exception
{
public InvalidTransferRecipientException(
Address sender,
Address recipient)
... |
# Usage
# $ cd scripts/
# $ ruby combine_all_graphql.rb
outfile_name = "upload.graphql"
File.delete(outfile_name) if File.exist?(outfile_name)
Dir["../app/**/*.graphql"].each do |file_name|
file = File.open(file_name)
File.write(outfile_name, file.read + "\n\n", mode: "a")
file.close
end
|
---
layout: post
amendno: 39-5134
cadno: CAD2005-A340-23
title: 燃油渗漏程序
date: 2005-12-30 00:00:00 +0800
effdate: 2005-12-31 00:00:00 +0800
tag: A340
categories: 民航华东地区管理局适航审定处
author: 徐逸乐
---
##适用范围:
适用于AIRBUS A340-200,A340-300,A340-500,和A340-600所有型号和系列号的飞机。
|
<?hh // strict
trait T {
public static function f(): void {}
}
class C {
use T;
public static function g(): void = T::f;
}
function f(): void {
C::f();
}
|
/**
* @file add.cpp
* @author lijianran (lijianran@outlook.com)
* @brief extern 那些事 https://light-city.club/sc/basic_content/extern/
* @version 0.1
* @date 2021-12-17
*
* 编译
* gcc -c add.c
* g++ add.cpp add.o -o main
*/
#include <iostream>
extern "C"
{
#include "add.h"
}
using std::cout;
using std::endl;
... |
class ScreenshotResult < ActiveRecord::Base
validates :image_url, presence: true
validates :thumbnail_image_url, presence: true
validates :data, presence: true
belongs_to :browser
belongs_to :browser_stack_job
end
|
import { TXEventName } from '@augurproject/sdk-lite';
import { AppState } from 'appStore';
import { BUYPARTICIPATIONTOKENS } from 'modules/common/constants';
import {
buyParticipationTokens,
buyParticipationTokensEstimateGas,
} from 'modules/contracts/actions/contractCalls';
import { addUpdatePendingTransaction } f... |
<?php
namespace App\Http\Livewire\Shop;
use Livewire\Component;
class CheckoutComponent extends Component
{
public $fullname, $state, $city, $address, $phone;
public function render()
{
return view('livewire.shop.checkout-component');
}
public function make_order()
{
}
... |
---
layout: post
title: 박혜민
subtitle: 개요
date: '2020-12-26 11:45:51 +0900'
categories: study
tags: githubpage
comments: true
related_posts:
- category/_posts/study/2020-12-26-making-blog-02.md
- category/_posts/study/2020-12-26-making-blog-03.md
published: true
---
# 자기소개
|
<?php
declare(strict_types = 1);
namespace Couscous\CommandRunner;
/**
* Run CLI commands.
*
* @author Carlos Lombarte <lombartec@gmail.com>
*/
class CommandRunner
{
/**
* Run a command.
*
* @param string $command The command to be executed.
*
* @throws CommandException When the comma... |
#!/bin/sh
cd $(dirname $0)
cd ..
wget --quiet -O - "http://www.yrden.de/share/bundler/keks.tar.xz" | tar -xJf -
# if the server is down or the file corrupt, contine install normally
exit 0
|
from xv_leak_tools.factory import Builder
from xv_leak_tools.test_components.network_configuration.network_configuration import NetworkConfiguration
class NetworkConfigurationBuilder(Builder):
@staticmethod
def name():
return 'network_configuration'
def build(self, device, config):
return... |
package com.linkedin.datahub.graphql.types.datajob.mappers;
import com.linkedin.common.AuditStamp;
import com.linkedin.common.GlobalTags;
import com.linkedin.common.TagAssociationArray;
import com.linkedin.common.urn.Urn;
import com.linkedin.data.template.SetMode;
import com.linkedin.datahub.graphql.generated.DataJobU... |
# vagrantfile-centos-docker
Use vagrantfile to build the CentOS Linux environment and docker environment.
## Install Chocolatey
https://marcus116.blogspot.com/2019/02/chocolatey-windows-chocolatey.html
## Install software.
#### Install vagrant
```shell
choco install vagrant -y
```
#### Install virtualbox
```shell
c... |
2020年08月25日21时数据
Status: 200
1.香港发生大劫案
微博热度:2934998
2.北京人艺回应宋丹丹退休
微博热度:1839952
3.欧阳娜娜同款淘宝清单
微博热度:1832286
4.马云捐出6.1亿股蚂蚁股份做公益
微博热度:1810464
5.海底捞排号
微博热度:1790042
6.相聚鹊桥
微博热度:1487833
7.韩国方便面向中国出口最多
微博热度:1286359
8.肖战自拍
微博热度:1283862
9.杜蕾斯文案
微博热度:1089015
10.耿爽在联合国批驳美英涉疆错误言论
微博热度:921198
11.在可可西里失联小伙已离世
微博热... |
package stream
import (
"fmt"
"os"
"sync"
"github.com/turbomaze/alpaca-trade-api-go/alpaca"
"github.com/turbomaze/alpaca-trade-api-go/polygon"
)
var (
once sync.Once
u *Unified
dataStreamName string = "alpaca"
)
func SetDataStream(streamName string) {
switch streamName {
case "alpaca":
case "polygon"... |
// Auto-Generated
package com.github.j5ik2o.reactive.aws.kinesis.model.ops
import software.amazon.awssdk.services.kinesis.model._
final class SubscribeToShardResponseBuilderOps(val self: SubscribeToShardResponse.Builder) extends AnyVal {}
final class SubscribeToShardResponseOps(val self: SubscribeToShardResponse) ex... |
# ExampleSignalStateMachine
## License: MIT License
Simulate a progression of signal aspects and a grade crossing
Examples for
* using functions to abstract behaviors
* using a state machine to sequence behaviors
|
#include <iostream>
using namespace std;
int Factorial(int);
int main() {
int N;
cin >> N;
cout << Factorial(N);
return 0;
}
int Factorial(int input) {
if (input == 0) {
return 1;
}
else {
return input * Factorial(input - 1);
}
} |
# Olá, Mundo!
Primeiro repositorio curso de Git e github criado na aula do curso.
Adicionei essa linha diretamente no site.
|
package edu.berkeley.wtchoi.instrument.DexProcessor.instrument.compiler
import edu.berkeley.wtchoi.instrument.DexProcessor.il._
import edu.berkeley.wtchoi.instrument.DexProcessor.Opcode
import edu.berkeley.wtchoi.instrument.util.Debug
import edu.berkeley.wtchoi.instrument.DexProcessor.instrument._
/**
* Created with... |
package com.bonacode.securehome.domain.feature.favouriteaction.model
import com.bonacode.securehome.domain.feature.action.model.ActionModel
import com.bonacode.securehome.domain.feature.action.model.ActionType
data class FavouriteActionModel(
var id: Long? = null,
override val actionType: ActionType,
over... |
package com.github.prologdb
import io.kotlintest.Tag
object Performance : Tag()
object RequiresSSD: Tag()
object RequiresHDD: Tag() |
class AddTipoPagamentoToPagamentos < ActiveRecord::Migration
def change
add_column :pagamentos, :tipo_pagamento, :string
end
end
|
import React, { Component } from 'react';
import { Transition } from 'react-transition-group';
import { fromTo } from 'gsap';
import cx from 'classnames';
import { withProfile } from 'components/HOC/withProfile';
import { socket } from 'socket/init';
import Styles from './styles.m.css';
@withProfile
export default c... |
#! /bin/bash
# Make $HOME folder structure
mkdir -p $HOME/.config
mkdir -p $HOME/Programming
mkdir -p $HOME/Desktop
mkdir -p $HOME/Music
mkdir -p $HOME/Public
mkdir -p $HOME/Templates
mkdir -p $HOME/Documents
mkdir -p $HOME/Pictures
mkdir -p $HOME/Programming
mkdir -p $HOME/RandomPrograms
mkdir -p $HOME/Screenshots
mk... |
---
layout: post
title: 每日一题 - 162.Find Peak Element
tags:
- leetcode
- 二分查找
- Medium
categories: leetcode
description: LeetCode 162.Find Peak Element
---
# 162.Find Peak Element
https://leetcode.com/problems/find-peak-element/
A peak element is an element that is greater than its neighbors.
Given an input array ... |
package typingsSlinky.sharedb.mod
import org.scalablytyped.runtime.StObject
import scala.scalajs.js
import scala.scalajs.js.`|`
import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, JSBracketAccess}
@JSImport("sharedb", "DB")
@js.native
abstract class DB () extends StObject {
def canPoll... |
import { StepID } from './SøknadStep';
export enum AppRoute {
'INTRO' = '/velkommen',
'SØKNAD' = '/soknad',
'SENDT' = '/sendt',
}
export interface SøknadRoute {
path: AppRoute | string;
step?: StepID;
subStep?: string;
}
|
;; -*- scheme -*-
;; Copyright (c) 2017-2018 chip-remote workers, All rights reserved.
;;
;; Terms for redistribution and use can be found in LICENCE.
(use-modules (test tap)
(test setup)
(chip-remote units))
(init-test-tap!)
(define-unit minute
#:symbol 'min
#:dimension time
#:to (l... |
import express from 'express'
import graphqlHTTP from 'express-graphql'
import { GraphQLSchema } from 'graphql'
import { schema } from './schema'
const app = express()
export interface GraphqlSettingsReturn {
graphiql: boolean;
schema: GraphQLSchema;
}
const graphqlSettings = (): GraphqlSettingsReturn => ({
gr... |
//! [](https://crates.io/crates/duration-macro)
//! [](https://docs.rs/duration-macro)
//!
//! Compile-time duration parsing.
//!
//! ```rust
//! use core::time::Duration;
//! use duration_macro::duration... |
#!/bin/bash
#export http_proxy=http://X.X.X.X:X/
#export https_proxy=$http_proxy
brave &
|
#! /bin/bash
set -eu
DEPLOY_REPO="https://${DEPLOY_BLOG_TOKEN}@github.com/papascott/papascott.github.io"
echo "deploying changes"
if [ -z "$TRAVIS_PULL_REQUEST" ]; then
echo "except don't publish site for pull requests"
exit 0
fi
cd _site
git config --global user.name "Travis CI"
git config --global user.e... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.analytics.purview.scanning;
import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceClient;
import com.azure.core.a... |
int ${python_module_name}_${type_name}_init(
${python_module_name}_${type_name}_t *${python_module_name}_${type_name} );
|
#!/usr/bin/env node
import React from 'react';
import meow from 'meow';
import getStdin from 'get-stdin';
import {render} from 'ink';
import updateNotifier from 'update-notifier';
import {
Main,
getElapsedSeconds,
getElapsedTime,
showVersion
} from 'tomo-cli';
import commands from './commands';
import {... |
# -*- coding: utf-8 -*-
require 'spec_helper'
describe Agharta::Executes::Filter do
before do
@context = DummyRecipe.new
@filter = Agharta::Executes::Filter.new(@context)
end
describe '#track' do
it 'should set it to track gtparameter' do
@filter.track('twitter', 'tumblr')
@filter.param... |
/*
* Copyright {2017} {Aashrey Kamal Sharma}
*
* 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 ... |
;(function($) {
var chat;
var $openChatBtn = $('.open-gitter-chat');
var scriptLoaded = (window.gitter) ? true : false;
var scriptSrc = '//sidecar.gitter.im/dist/sidecar.v1.js';
function loadScript(callback) {
//disable initializing default chat
((window.gitter = {}).chat = {}).options = {
disa... |
const {max} = require('lodash')
const {point, distance} = require('@turf/turf')
function parcelleNotFound(id) {
console.error(`Parcelle ${id} introuvable`)
}
function parcelleWithoutGeometry(id) {
console.error(`Parcelle ${id} sans géométrie`)
}
function computeMaxDistance(ref, ring) {
return max(ring.map(coor... |
subroutine SHExpandLSQ(cilm, d, lat, lon, nmax, lmax, norm, chi2, csphase)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! This subroutine will expand a set of discrete data points into
! spherical harmonics using a least squares inversion. When there are
!... |
import 'dart:async';
import 'dart:convert';
import 'dart:io';
import 'package:common_utils/common_utils.dart';
import 'package:costv_android/bean/get_message_list_bean.dart';
import 'package:costv_android/bean/simple_bean.dart';
import 'package:costv_android/constant.dart';
import 'package:costv_android/event/base/eve... |
using Blazor.FlexGrid.DataSet.Options;
namespace Blazor.FlexGrid.DataSet
{
/// <summary>
/// Represents a collection of Items with lazy loading pagination
/// </summary>
interface ILazyTableDataSet : ITableDataSet
{
ILazyLoadingOptions LazyLoadingOptions { get; set; }
}
}
|
import sys
# Import the LEAP library
sys.path.insert(0, "../lib")
import Leap
# Import the Piano class
import construct_piano
piano = construct_piano.Piano(sys.argv[1], sys.argv[2])
keys = construct_piano.Keys(piano)
# Create the Listener Class
class Listener(Leap.Listener):
# Initializing functions
def on_... |
export { MongoActionReader } from './MongoActionReader';
export { MongoBlock } from './MongoBlock';
|
module TestFileHelpers
def create_files file_array
file_array.each do |f|
FileUtils.mkdir_p File.dirname(f)
FileUtils.touch f
end
end
def fog_file_contents
{ :default => { :aws_access_key_id => "IMANACCESSKEY",
:aws_secret_access_key => "supersekritkey",
... |
use thiserror::Error;
#[derive(Error, Debug)]
pub enum Error {
#[error("io error")]
IoError(#[from] std::io::Error),
#[error("timeout/retry error")]
Timeout,
#[error("crc error expected {}, actual {}", .expected, .actual)]
Crc { expected: u16, actual: u16 },
#[error("ecc error {:?}", .0)]
... |
# api
API client implementation based on [@japan-d2/schema-api-endpoint](https://github.com/japan-d2/js-schema-api-endpoint)
# install
```bash
npm install @japan-d2/api
```
or
```bash
yarn add @japan-d2/api
```
# usage
TODO
# example
TODO
# license
MIT
|
# frozen_string_literal: true
module Multilingual
class HasMultilingual
def initialize(klass, name, options)
@klass = klass
@name = name
@options = options
end
def define
define_getters
define_setter
define_initializer
define_argument_modifier
add_active_r... |
-- SevenAte9
-- http://www.codewars.com/kata/559f44187fa851efad000087
module Codewars.Exercise.SevenAte9 where
sevenAte9 :: String -> String
sevenAte9 [] = []
sevenAte9 ('7':'9':'7':xs) = "7" ++ sevenAte9 ('7':xs)
sevenAte9 (x:xs) = x : sevenAte9 xs
|
import React, { useContext, useEffect } from "react";
import Projects from "../project/Projects.js";
import ProjectContext from "../../context/projects/projectContext";
const Home = () => {
const projectContext = useContext(ProjectContext);
const { getEpisodes } = projectContext;
useEffect(() => {
getEpisode... |
#!/usr/bin/env ruby
require 'color_contrast_calc'
yellow = ColorContrastCalc.color_from('yellow')
orange = ColorContrastCalc.color_from('orange')
report = 'The contrast ratio between %s and %s is %2.4f'
# Find brightness adjusted colors.
a_orange = yellow.find_brightness_threshold(orange, 'A')
a_contrast_ratio = y... |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Nucleo.Models.BindingPanel
{
public class BindingPanelModel
{
public IEnumerable<BindingData> Data
{
get
{
return new BindingData[]
{
new BindingData { Name = "Sidney Crosby", City = "Pittsburgh", ... |
const images = document.querySelectorAll('.image')
images.forEach(image=>{
removePickedClasses()
image.addEventListener('click',()=> {
image.classList.add('picked')
})
})
function removePickedClasses() {
images.forEach(image=> {
image.classList.remove('picked')
})
} |
namespace KJU.Core.CodeGeneration.Templates.Comments
{
using System.Collections.Generic;
using KJU.Core.Intermediate;
public class CommentInstruction : Instruction
{
private readonly string value;
public CommentInstruction(string value)
{
this.value = value;
... |
import * as React from "react";
import { IButtonHandledProps as IBaseButtonHandledProps } from "@microsoft/fast-components-react-base";
import { IManagedClasses, IMSFTButtonClassNameContract } from "@microsoft/fast-components-class-name-contracts-msft";
export enum ButtonAppearance {
justified= "justified",
li... |
class CreateJudges < ActiveRecord::Migration
def change
create_table :judges do |t|
t.string :uri, null: false
t.references :source, null: false
t.string :name, null: false
t.string :name_unprocessed, null: false
t.string :prefix
t.string :first, nu... |
#!/usr/bin/env bash
#
# create-network.sh
#
# Create network example.com for bridge cluster.
#
# See network: docker network ls
# Remove network: docker network rm <network_name>=
cd "$(dirname "$0")"
cd ..
source .env.values
subnet="${NETWORK_CONTAINER}"
network_name="${DOMAIN_CONTAINER}"
gateway="$(echo ${NETWORK_... |
module Analyzers
mattr_reader :definitions
@@definitions = {
snowball_asciifolding_nostop: {
tokenizer: 'standard',
filter: %w(standard asciifolding lowercase snowball),
},
standard_asciifolding_nostop: {
analyzer: 'standard',
tokenizer: 'standard',
filter: %w(st... |
#!/bin/sh
curl -X POST -d 'repo=/foo/bar' -d 'sha=1234567890abc' -d 'key=1234' -d 'ref=/refs/master' 127.0.0.1:4444
|
using ProSeqqoLib.Helper;
using System;
using System.Collections.Generic;
using System.Linq;
namespace ProSeqqoLib.Task.Serialization.Token
{
public class TokenLineDeserializationObject
{
public int LineNumber { get; set; }
public string Line { get; set; }
public bool KeyWord { get; se... |
module ProviderTeardown
def teardown
super
RecordStore::Provider::DynECT.instance_variable_set(:@dns, nil)
RecordStore::Provider::DNSimple.instance_variable_set(:@dns, nil)
RecordStore::Provider::GoogleCloudDNS.instance_variable_set(:@dns, nil)
RecordStore::Provider::OracleCloudDNS.instance_variab... |
import React, { MouseEventHandler, useState } from 'react';
import { connect } from 'react-redux';
import { Modal, Input } from 'antd';
import { SearchOutlined, CloseOutlined } from '@ant-design/icons';
import { isMobile } from 'react-device-detect';
import PlayerStatsTable from './PlayerStatsTable';
import { PlayerBio... |
module TextSearch
class Document
def initialize(vector)
@vector = vector
end
def vector
@vector
end
def to_sql
Array(@vector).map { |vector| vector.to_sql }.join(' || ')
end
def to_s
Array(@vector).map { |vector| vector.to_s }.join(" || ' ' || ")
end
def... |
using System;
namespace Tivo.Connect
{
public interface IMindRpcHeaderInfo
{
string ApplicationName { get; }
Version ApplicationVersion { get; }
}
}
|
using System.Configuration;
using System.Xml;
using System.Xml.Schema;
using System.Xml.Serialization;
namespace Core.Configuration
{
/// <summary>
/// Copy of SerializableConfigurationSection EntLib 4.1
/// </summary>
public class SerializableConfigurationSection : ConfigurationSection, IXmlSerializabl... |
#include <QQuickFramebufferObject>
#include "VideoNode.h"
#include "LightOutputNode.h"
class LightOutputRenderer;
class QQuickLightOutputPreview : public QQuickFramebufferObject
{
Q_OBJECT
Q_PROPERTY(LightOutputNodeSP *videoNode READ videoNode WRITE setVideoNode NOTIFY videoNodeChanged)
public:
QQuickLig... |
package configuration
type PerfizConfig struct {
KarateFeaturesDir string `yaml:"karateFeaturesDir"`
KarateEnv string `yaml:"karateEnv"`
GatlingSimulationsDir string `yaml:"gatlingSimulationsDir"`
GatlingSimulationClass string `yaml:"gatlingSimulationClass"`
}
func GetGatlingSimulationsDir(working... |
<?php
use Illuminate\Database\Seeder;
use Carbon\Carbon;
class MusicSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
DB::table('musics')->insert([
[
'title' => 'Best Of Popular Club Dance House Music R... |
package share
//Direction type will be used in sorting
type Direction int
//Define sorting type
const (
BiDirection Direction = iota
Ascendant
Descendant
)
//Boolean type allows nil value
type Boolean struct {
IsSet bool
Bool bool
}
//DefaultLimit is default value of record per page
const DefaultLimit = 10
|
package fr.openwide.core.infinispan.utils;
import java.util.concurrent.TimeUnit;
import org.infinispan.configuration.cache.CacheMode;
import org.infinispan.configuration.cache.ConfigurationBuilder;
import org.infinispan.configuration.cache.VersioningScheme;
import org.infinispan.transaction.LockingMode;
import org.in... |
package provider
import (
"github.com/hashicorp/terraform/helper/schema"
)
func jobGerritTriggerSkipVoteResource() *schema.Resource {
return &schema.Resource{
Schema: map[string]*schema.Schema{
"on_successful": &schema.Schema{
Type: schema.TypeBool,
Optional: true,
Default: false,
},
"on... |
class PromisingValuableWorker
include Sidekiq::Promise
def perform i
MrDarcy.promise do |p|
p.resolve i * i
end
end
end
|
package controllers
import models.JsonFormats._
import models.Vessel
import play.api.libs.concurrent.Execution.Implicits.defaultContext
import play.api.libs.json.Json
import play.api.mvc.{Action, Controller}
import repositories.{VesselsPersistence, VesselsMongodb}
import scala.concurrent.Future
object Vessels extend... |
# -*- coding: utf-8 -*-
"""
Event repository.
"""
from abc import ABCMeta
from abc import abstractmethod
import datetime
import typing as tp
from uuid import UUID
from app.crud.base import Repository
from app.crud.base import T
from app.models.event import EventCreate
from app.models.event import EventUpdate
class E... |
import {IMetric} from './interfaces/IMetric';
export class VisualizationConfig {
// VISUALIZATION SETTINGS
static EDGE_LENGTH_FACTOR = 2;
static HEIGHT_FACTOR = 0.1;
// static GLOBAL_MAX_GROUND_AREA = 100;
// static GLOBAL_MIN_GROUND_AREA = 1;
// static GLOBAL_MAX_HEIGHT = 100;
// static GLOBAL_MIN_HEIG... |
// Copyright (c) 2016-2021 Association of Universities for Research in Astronomy, Inc. (AURA)
// For license information see LICENSE or https://opensource.org/licenses/BSD-3-Clause
package engage.web.server.http4s
import java.nio.file.{ Path => FilePath }
import cats.effect.std.{ Dispatcher, Queue }
import cats.effec... |
/**
* CS630: Database Management Systems
* Copyright 2014 Pejman Ghorbanzade <pejman@ghorbanzade.com>
* More info: https://github.com/ghorbanzade/beacon
*/
/**
*
*
* @author Pejman Ghorbanzade
*/
class Student {
/**
*
*/
private String name;
private int id;
/**
*
*/
public Student() {
... |
-- | Named channels.
--
-- With named channels we can read and
-- write values to the variables with dynamic names.
-- We can specify the variable with string (Str).
--
-- Csound has an C api wich is ported to many languages.
-- With named channels we can interact with csound
-- that runns a program. We can read and w... |
package goyave
import (
"io/ioutil"
"net/http"
"net/http/httptest"
"testing"
"github.com/System-Glitch/goyave/v2/config"
"github.com/stretchr/testify/suite"
)
type NativeHandlerTestSuite struct {
suite.Suite
}
func (suite *NativeHandlerTestSuite) SetupSuite() {
config.Load()
}
func (suite *NativeHandlerTes... |
package binstmt
import (
"errors"
"fmt"
posit "github.com/shinanca/gonec/pos"
)
// Error provides a convenient interface for handling runtime error.
// It can be Error interface with type cast which can call Pos().
type Error struct {
Message string
Pos posit.Position
}
var (
BreakError = errors.New("... |
package pl.msitko.xml.bench
trait SmallRoundtrip {
def roundtrip(input: String): String
}
object SmallRoundtrip {
def example = {
Example(SomeXml.someXml, SomeXml.someXml)
}
}
|
import 'package:bojana/GeneralWidgets/GWidget.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:flutter/material.dart';
Widget buildLocation() => Column(
children: [
buildLocationText(),
buildDivider(),
],
);
Widget buildLocationText() => Container(
child: Ro... |
/// Stores all variables to translations.
import 'package:easy_localization/easy_localization.dart';
/// List of initals of months.
List<String> months = <String>[
tr('january'),
tr('february'),
tr('march'),
tr('april'),
tr('may'),
tr('june'),
tr('july'),
tr('august'),
tr('september'),
tr('october... |
import {
defineComponent,
PropType,
ref,
Teleport,
VNode,
Transition,
nextTick,
onMounted,
onUpdated,
onBeforeUnmount,
} from 'vue';
import log from '@/utils/log';
import { addEventListener } from '@/utils/dom';
import { cloneElement, mapAnimationToTransitionClassNames } from './utils';
import { Pla... |
package org.cjug.services
import org.cjug.data.Book
import org.cjug.data.BookEntity
import org.jetbrains.exposed.sql.transactions.transaction
class BookService {
fun getAllBooks(): Iterable<Book> = transaction {
BookEntity.all().map(BookEntity::toBook)
}
fun findBook(bookId: Int) = transaction {... |
using Application.Services.Repositories;
using Domain.Entities;
namespace Application.Services.CustomerService;
public class CustomerManager : ICustomerService
{
private readonly ICustomerRepository _customerRepository;
public CustomerManager(ICustomerRepository customerRepository)
{
_customerRe... |
module SUNAT
class Helpers
def self.textify(paymentAmount, lang=:es)
text = I18n.with_locale(lang) {paymentAmount.int_part.to_words}
currency = Currency.new(paymentAmount.currency)
currency_text = currency.plural_name || paymentAmount.currency
"#{text} y #{paymentAmount.cents_part}/100 #{... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.