text stringlengths 27 775k |
|---|
using Autodesk.DesignScript.Runtime;
namespace Camber.Civil.Styles.Labels.ProfileView
{
[IsVisibleInDynamoLibrary(false)]
public enum ProfileViewLabelStyles
{
//DefaultLabelStyle,
DepthLabelStyles,
StationElevationLabelStyles
}
}
|
package cn.hfbin.auth.provider.token;
import cn.hfbin.common.core.constant.GrantTypeConstant;
import cn.hfbin.common.core.jwt.model.AuthUserInfo;
import cn.hfbin.ucpm.params.LoginParams;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
/**
* @Author: huangfubin
* @Description: 账号、验... |
import { Color } from "@tangle-frost/iota-core/dist/data/color";
/**
* Options for Png renderer.
*/
export declare class PngRendererOptions {
/**
* The foreground colour.
*/
foreground?: Color;
/**
* The background colour.
*/
background?: Color;
/**
* The css... |
package com.alamkanak.weekview
import android.content.Context
import android.os.Handler
import android.os.Looper
import androidx.annotation.WorkerThread
import java.util.concurrent.Executor
import java.util.concurrent.Executors
class MainExecutor : Executor {
private val handler = Handler(Looper.getMainLooper())
... |
using NFugue.Parsing;
namespace NFugue.Temporal
{
public interface ITemporalEvent
{
void Execute(Parser parser);
}
}
|
export OS="linux"
export ARCH="amd64"
export ARCH_ALT="x86_64"
export WORKFOLDER="$HOME/workfolder"
export DOTFILES="$HOME/.dotfiles"
export PATH=$PATH:/usr/local/bin
export PATH=$PATH:/usr/local/go/bin
#export GOPATH="$(go env GOPATH)"
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
export DISTRO_VERSION=$(l... |
const { prepare, hydrateStrings } = require('./clean')
const createElement = require('./element')
function hydrateCDATA(CDATA, text) {
return text.replace(/_CDATA\$(?<index>\d+)/g, (_, index) => {
return `${CDATA[index]}`
})
}
function parseXML(data) {
const tag = /(?<balise><[^>]+>)(?<text>[^<]*)... |
// Copyright 2015-2019 Hans Dembinski
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt
// or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_HISTOGRAM_DETAIL_RELAXED_EQUAL_HPP
#define BOOST_HISTOGRAM_DETAIL_RELAXED_EQUAL_HPP
#include <boos... |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace Sociatis.Extensions
{
public static class DropdownListExtensions
{
public static List<SelectListItem> Choose(this List<SelectListItem> list, int item)
{
var copyList... |
/* Code Pulse: a real-time code coverage tool, for more information, see <http://code-pulse.com/>
*
* Copyright (C) 2014-2017 Code Dx, Inc. <https://codedx.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 ... |
using System;
using System.Collections.Generic;
using System.Linq;
namespace E01.DistanceBetweenVerticles
{
internal class Program
{
private static Dictionary<int, List<int>> Graph;
private static Dictionary<int, bool> Visited;
private static Dictionary<int, int> Parent;
stati... |
package com.lasta.api.sample.model.form
import com.lasta.api.sample.constant.GreetingPhase
import java.io.Serializable
import javax.validation.constraints.NotNull
class GreetingForm : Serializable {
companion object {
private const val serialVersionUID: Long = 1L
}
@NotNull
lateinit var phase... |
using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
namespace Store.Infra.MongoDB.DataModels;
public class EvaluationData
{
public ObjectId Id { get; set; }
[BsonRepresentation(BsonType.ObjectId)]
public string? StoreId { get; set; }
public int Stars { get; set; }
public strin... |
import os
from pathlib import Path
import pytest
README = Path(__file__).parent.parent / "README.md"
SAMPLE = Path(__file__).parent / "data" / "example5dOMX.dv"
@pytest.mark.skipif(os.name == "nt", reason="paths annoying on windows")
def test_readme():
code = README.read_text().split("```python")[1].split("```"... |
#include "event_Event.h"
namespace event {
const EventAction& Event::getAction() const {
return dynamic_cast<const EventAction&>(*this);
}
const EventState& Event::getState() const {
return dynamic_cast<const EventState&>(*this);
}
const EventRange& Event::getRange() const {
return dynamic_cast<c... |
MIME_ENCODED = /=\?([a-z\-0-9]*)\?[QB]\?([a-zA-Z0-9+\/=\_\-]+)\?=/i
IMAP_EMAIL_ENVELOPE_FORMAT = /([a-zA-Z\-\.\_]*@[a-zA-Z\-\.\_]*)/
IMAP_EMAIL_ENVELOPE_FORMAT2 = /(.*)<([a-zA-Z\-\.\_]*@[a-zA-Z\-\.\_]*)>/
require 'iconv'
def valid_email?(email)
email.size < 100 && email =~ /.@.+\../ && email.count('@') == 1
end
de... |
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter_demos/widget/my_home_page.dart';
import 'package:flutter_demos/widget/category_page.dart';
class TestApp extends StatefulWidget {
@override
_TestAppState createState() => _TestAppState();
}
class _TestAppStat... |
-- 89 - Status do Contrato
INSERT
INTO tab_atributos (cod_atributos, dsc_descricao, sgl_chave)
SELECT 89,'Status do Contrato','status-do-contrato'
WHERE 89 NOT IN (SELECT cod_atributos FROM tab_atributos);
-- 89 - Status do Contrato - (1-Em elaboração)
INSERT
INTO tab_atributos_valores (cod_atributos... |
# typed: true
class Users::PublicLinksController < ApplicationController
skip_before_action :require_login
def index
# User.includes(:public_links).find(params[:id]) does not seem to hit the custom
# find method from Sluggable for some reason
@user = User.find(params[:user_id])
return not_found if @... |
from setuptools import setup
setup(
name = 'nem',
packages = ['nem'], # this must be the same as the name above
version = '0.0.5',
description = 'Access library for AEMO / NEM goverement data',
author = 'Michael Wheeler',
author_email = 'michael@michael-wheeler.org',
url = 'https://github.com/theskorm/nem... |
require 'homeslice_core'
require 'geometry'
describe Homeslice do
it "should generate identical hashes" do
edge_a = Geometry::Edge.new(Geometry::Point[0, 0, 0], Geometry::Point[1, 1, 1])
edge_b = Geometry::Edge.new(Geometry::Point[0, 0, 0], Geometry::Point[1, 1, 1])
expect(edge_a.hash == edge_b.hash... |
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\TinTuc;
use App\TheLoai;
use App\LoaiTin;
class TinTucController extends Controller
{
public function getdanhsach()
{
$tintuc = TinTuc::paginate(20);
return view('admin.TinTuc.hienthi',['tintuc'=>$tintuc]);
}
publi... |
#include "../include/work_queue.h"
#include "../include/types.h"
#include <string.h>
#include <chrono>
#include <cassert>
WorkQueue::WorkQueue(size_t q_len, size_t max_elm_size) : len(q_len), max_elm_size(max_elm_size) {
non_block = false;
// place all nodes of linked list in the producer queue and reserve
// ... |
package com.alg.pointers;
/**
* Given an array of integers, find two numbers such that they add up to a specific target number.
*
* The function twoSum should return indices of the two numbers such that they add up to the target, where index1 must
* be less than index2. Please note that your returned answers... |
import styled from '@xstyled/styled-components'
export const Input = styled.input`
appearance: none;
background-color: control-background;
border-radius: control;
border-style: solid;
border-width: control;
border-color: control-border;
line-height: control;
padding: 1 2;
color: control-on;
transit... |
# 민주주의 서울 오픈 소스
## 프로젝트 빌드
자바 및 maven 환경이 설치되어 있어야 합니다.
```
mvn package
```
빌드 시 target폴더에 war 파일이 생성됩니다.
## docker 실행 방법
1. 프로젝트 빌드를 한다.
2. 생성된 war 파일을 ROOT.war 파일로 이름을 변경한다.
3. docker/webapps 경로에 복사한다.
4. docker 경로로 이동 후 `docker-compose up`
|
package com.tommasoberlose.darkmode.receivers
import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import android.util.Log
import com.tommasoberlose.darkmode.global.Actions
import com.tommasoberlose.darkmode.global.Preferences
import com.tommasoberlose.darkmode.helpers.... |
json.(achievement, :id, :name, :description, :points, :order, :patch)
json.owned owned.fetch(achievement.id.to_s, '0%')
json.icon image_url("achievements/#{achievement.icon_id}.png", skip_pipeline: true)
category = achievement.category
json.category do
json.(category, :id, :name)
end
json.type do
json.(category.... |
export const fetchProductList = (...args) => ({ type: 'product/list', args });
export const fetchProductListError = (...args) => ({ type: 'product/list_error', args });
|
#pragma once
#include "CoreMinimal.h"
#include "XPSettings.generated.h"
USTRUCT()
struct FXPSettings {
GENERATED_BODY()
public:
UPROPERTY(EditAnywhere)
float XP_PerGold;
UPROPERTY(EditAnywhere)
float XP_PerKill;
UPROPERTY(EditAnywhere)
float XP_OnSurvivedLevel;
FSD_API FX... |
package io.horizontalsystems.bitcoincore.network.messages
import io.horizontalsystems.bitcoincore.io.BitcoinInputMarkable
import io.horizontalsystems.bitcoincore.io.BitcoinOutput
class PongMessage(val nonce: Long) : IMessage {
override fun toString(): String {
return "PongMessage(nonce=$nonce)"
}
}
c... |
import 'package:unleash/src/features.dart';
import 'package:unleash/src/toggle_backup/toggle_backup.dart';
ToggleBackup create(String backupFilePath) => NoOpToggleBackup();
class NoOpToggleBackup implements ToggleBackup {
@override
Future<Features?> load() async => null;
@override
Future<void> save(Features ... |
---
layout: article
title: "「设计模式」 装饰者模式"
date: 2019-01-07 8:06:40 +0800
key: decorator-20190107
aside:
toc: true
category: [software, software, design_pattern]
---
背景:不必改变原类文件和使用继承的情况下,动态的扩展一个对象的的功能。
方案:利用子对象,委派
定义:
角色:
油漆工(decorator)是用来刷油漆的
被修饰者decoratee是被刷油漆的对象
实现:“实现被装饰者类---定义被装饰者对象----使用被装饰者对象产生装饰者对象”(有... |
import 'package:get/get.dart';
import 'package:santaclothes/data/repository/notification_repository.dart';
import 'package:santaclothes/presentation/notification/notification_controller.dart';
class NotificationBinding extends Bindings {
@override
void dependencies() {
Get.put(NotificationController(Notificati... |
import { code, Example, md, Props } from '@uidu/docs';
import React from 'react';
export default md`
### Checkbox
<p class="lead">A checkbox element primarily for use in forms.</p>
The Checkbox export provides for controlled & uncontrolled usage and includes the label, input & icon.
${code`import Checkbox, {... |
using System;
namespace CgiResourceUpload.Models
{
internal class ValidationCheck
{
public Func<bool> Validate { get; }
public string FailMessage { get; }
public ValidationCheck(Func<bool> validate, string failMessage)
{
Validate = validate;
FailMessage... |
#!/bin/bash
set -v
pushd $PWD
# Install the dev dependencies for building Qpid proton system library.
sudo apt-get install -y gcc cmake cmake-curses-gui uuid-dev
sudo apt-get install -y libssl-dev
sudo apt-get install -y libsasl2-2 libsasl2-dev
# Get the latest Qpid Proton source
cd $HOME/build
git clone --branch 0.3... |
package dev.helight.hopper.data
import dev.helight.hopper.*
import dev.helight.hopper.ecs.data.ArchetypeSnapshot
import dev.helight.hopper.ecs.data.EntitySnapshot
import java.util.*
import java.util.concurrent.locks.ReentrantReadWriteLock
data class Archetype(
val group: ComponentGroup
) {
var ids: MutableLis... |
using System;
using UnityEngine;
namespace UGF.DebugTools.Runtime.UI.Scopes
{
public readonly struct DebugUIEnabledScope : IDisposable
{
private readonly bool m_enabled;
public DebugUIEnabledScope(bool enabled)
{
m_enabled = GUI.enabled;
GUI.enabled = enabled;... |
# backup files from a docker volume into /tmp/backup.tar.gz
function docker-volume-backup-compressed() {
docker run --rm -v /tmp:/backup -v $1:/mount debian:jessie tar -czvf /backup/backup.tar.gz "${@:2}"
}
# restore files from /tmp/backup.tar.gz into a docker volume
function docker-volume-restore-compressed() {
d... |
%%%-------------------------------------------------------------------
%%% @author Aaron Lelevier
%%% @doc
%%% @end
%%% Created : 08. May 2021 8:14 AM
%%%-------------------------------------------------------------------
-module(bytes_util).
-author("Aaron Lelevier").
-vsn(1.0).
-export([
reverse_bytes/1,
term_to_... |
package io.algostack.risk.engine;
import java.util.concurrent.Callable;
import java.util.concurrent.Future;
public interface TaskExecutor {
<T> Future<T> execute(Callable<T> task);
}
|
/* eslint-disable jest/expect-expect */
import OnlineParser from '../onlineParser';
import {
getUtils,
performForEachType,
expectVarsDef,
expectArgs,
expectDirective,
} from './OnlineParserUtils';
describe('onlineParser', () => {
describe('.startState', () => {
it('initializes state correctly', () => {... |
using System.Security.Cryptography;
using System.Text;
namespace Midgard.Utilities
{
public class Passwords
{
private static string Md5(string str)
{
using var md5 = MD5.Create();
var result = "";
var buffer = md5.ComputeHash(Encoding.UTF8.GetBytes(str));
... |
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
namespace Orleans.MultiClient.DependencyInjection
{
public interface IMultiClientBuilder
{
IServiceCollection Services { get; }
Action<IClientBuilder> OrleansConfigure { get; set; }
ILis... |
'use strict';
var http = require('http');
var app = require('./app');
http.createServer(app).listen(app.get('port'), function() {
console.log('Express server listening on port ' + app.get('port') + ' in ' + app.get('env') + ' environment');
});
|
'use strict';
import { Connection } from 'mysql';
/**
* Establishes a connection to the DB.
*/
export function connect(connection: Connection): Promise<void> {
return(new Promise((resolve, reject) => {
connection.connect((error) => {
if (error !== null && error !== undefined) { return(reject(error)); }
... |
import Towers from "./towers.js";
const LOADED_TOWERS: Map<number, Towers[]> = new Map();
const utf8Decoder = new TextDecoder('utf-8');
export async function randomOfSize(size: number): Promise<Towers> {
await loadTowers(size);
const towers = LOADED_TOWERS.get(size)!;
const t = towers[Math.floor(Math.random() ... |
// Library
import { construct } from './codes.ts'
import { ANSIStyle, style } from './styles.ts'
import { ANSIColor, color, bgOffset } from './colors.ts'
/**
* Mixes several ANSI styles and colors together
* @param s The style to apply to the text
* @param c The color to apply to the text
* @param bg The color to... |
package de.htwg.se.empire.controller.impl
import de.htwg.se.empire.controller.ReinforcementController
import de.htwg.se.empire.model.Grid
import de.htwg.se.empire.model.player.Player
import org.apache.logging.log4j.{ LogManager, Logger }
class DefaultReinforcementController extends ReinforcementController {
val LO... |
mod envelope;
mod mtype;
mod confirm;
pub use {
envelope::*,
mtype::*,
confirm::*,
};
use crate::player;
use crate::map;
|
//===- Error.cpp - system_error extensions for llvm-readobj -----*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
package de.faweizz.poc.util
import kotlinx.serialization.Serializable
@Serializable
data class PendingTransformationStep(
val id: String,
val step: TransformationStepData
)
|
/*
* Copyright 2014-present Open Networking Foundation
*
* 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... |
# frozen_string_literal: true
json.array! @attachments, :partial => 'attachments/attachment', :as => :attachment
|
#!/usr/bin/env python
# coding=utf-8
import argparse
parser = argparse.ArgumentParser('demo')
parser.add_argument('--model_path', type=str, default='/home', required=True,
help='the path of checkpoint file')
parser.add_argument('--model_name', type=str, default='yolov3',
choices... |
name "cacerts"
default_version "2016-04-20"
source url: "https://curl.haxx.se/ca/cacert-#{version}.pem"
version "2016-04-20" do
source md5: "782dcde8f5d53b1b9e888fdf113c42b9"
end
version "2016.01.20" do
source md5: "06629db7f712ff3a75630eccaecc1fe4"
source url: "https://curl.haxx.se/ca/cacert-2016-01-20.pem"
... |
import 'dart:io';
import 'package:git/git.dart';
import 'package:path/path.dart' as p;
import 'package:process_run/shell.dart';
/// Push a git branch to a remote (pushes `gh-pages` by default).
Future<void> publish({
String directory = 'build',
String branch = 'gh-pages',
String message = 'Updates',
String re... |
import {
BTC_POOL_NAME,
ChainId,
GW_V1_1_GAS,
POOLS_MAP,
PoolName,
TRANSACTION_TYPES,
Token,
isLegacySwapABIPool,
} from "../constants"
import { enqueuePromiseToast, enqueueToast } from "../components/Toastify"
import { formatDeadlineToNumber, getContract } from "../utils"
import {
useAllContracts,
... |
#!/bin/bash
set -e
set -o pipefail
# install.sh
# This script installs my basic setup for a debian laptop
export DEBIAN_FRONTEND=noninteractive
# Choose a user account to use for this installation
get_user() {
if [ -z "${TARGET_USER-}" ]; then
mapfile -t options < <(find /home/* -maxdepth 0 -printf "%f\\n" -type ... |
require 'spec_helper'
describe Webhook::EventReceiver do
let(:user) { FactoryGirl.create(:user) }
let(:record_source) { user }
let(:event) { Webhook::EventRegister.new(record_source).event }
subject { described_class.new(request_params) }
let(:params) { subject.params... |
module TeachersPet
class Cli
option :organization, required: true
option :repository, required: true
option :public, type: :boolean, default: false, desc: "Make the repositories public"
students_option
common_options
desc 'create_repos', "Create assignment repositories for students."
def... |
<?php
//error_reporting( E_ALL & ~E_DEPRECATED & ~E_NOTICE );
$link = mysqli_connect("localhost","root","","test");
if(!$link)
{
die('oops connection problem ! --> '.mysqli_connect_error());
}
?> |
#pragma once
#include <d2d1.h>
#include <d2d1_1.h>
#include <dwrite.h>
#include <wrl.h>
#include <vector>
#include <string>
#include "gap.h"
using namespace std;
using namespace D2D1;
using namespace Microsoft::WRL;
#define WHEEL_SCROLL_UP 120
#define WHEEL_SCROLL_DOWN 65416
#define ADDITIONAL_TOP_SCROLLING_OFFS... |
use field_bit::FieldBit;
use rensa_tracker::RensaTracker;
use score;
pub struct RensaCoefTracker {
pub num_erased: [usize; 20],
pub long_bonus_coef: [usize; 20],
pub color_bonus_coef: [usize; 20],
}
impl RensaCoefTracker {
pub fn new() -> RensaCoefTracker {
RensaCoefTracker {
num_e... |
(defn expr1 []
"return value of expr1.")
(defn expr2 []
(println "Not Short-circuit evaluation.")
"return value of expr2.")
(println (or (expr1) (expr2)))
|
package de.htwg.se.model.handcomponent
import de.htwg.se.model.cardcomponent.CardInterface
import de.htwg.se.model.cardcomponent.cardbaseimlp.Card
trait HandInterface {
def toString: String
def handValue(): Int
def getCard(idx: Int): CardInterface
def getAllCards: Vector[CardInterface]
def removeAtIdx[T](i... |
---
title: Sheepdog
is_name: false
---
Sheepdog (Trials & Training)
|
<?php
/*
* PhpFlatFileMarkdownWebsite - a simple preprocessor for markdown-based websites
*
* (c) 2011 Dmitriy Kubyshkin <dmitriy@kubyshkin.ru>
* https://github.com/grassator/php-flatfile-markdown-website
*/
/**
* This class handles all request processing.
* @package PhpFlatFileMarkdownWebsite
* @author ... |
package study.daydayup.wolf.dts.sink;
import lombok.NonNull;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import study.daydayup.wolf.dts.transformation.Statistics;
import study.daydayup.wolf.dts.sour... |
use crate::opencl::*;
use ndarray::prelude::*;
#[cfg(test)]
use ndarray_rand::rand_distr::Uniform;
#[cfg(test)]
use ndarray_rand::RandomExt;
use std::time::{Instant,Duration};
use ocl::Error;
#[test]
#[serial]
fn vec_squared() -> Result<(), Error> {
let backend = CLBackEnd::new("GeForce")?;
let (n, m) = (1... |
package com.vegesoft.efficientspending.account.domain
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.DisplayName
import org.junit.jupiter.api.Test
import java.util.*
internal class AccountTest {
@Test
@DisplayName("Should create account with CREATED status and 0 balance")
... |
package com.liang.phonecontactlist;
import java.io.IOException;
import java.io.InputStream;
import java.text.Collator;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.json.JSONException;
import an... |
Dungeon Treasure Hunt
=====================
Play current version: http://ripexz.github.io/dungeon-treasure-hunt/
A HTML5/JavaScript bomberman-like game. Initially created during a 7 hour gamejam.
Original version from the gamejam can be played here: http://www.ripexz.com/gamejam/1/pj/
Known Bugs:
-------------------... |
### opengl_3D_gasket
Opengl을 사용한 3차원 Gasket구현 glew와 glfw shader를 사용하였습니다.
면마다의 다른 색상도 구현하였습니다.
3D gasket을 통한 키보드,마우스interface 또한 구현하였습니다.
## 사용법
- Q/q 키를 누르면 프로그램 종료
- 숫자 1, 2, 3, 4 키를 눌렀을 때, 각 4면을 칠하는 색상이 바뀜
- 마우스 왼쪽 클릭 시 숫자 1, 2, 3, 4에 부여되었던 색상 조합이 순차적으로 변경됨
: 1 -> 2 -> 3 -> 3 -> 4 -> 1 ->...
- U/u 키를 누... |
# Instructions
[How to use this repository](../../README.md)
# Description
Installs the PSWindowsUpdate module, then runs the following cmdlets:
* Get-WULastResults
* Get-WURebootStatus
# Author
Colby Bouma
Jeremy Gruttner |
#!/bin/bash
LAST_MODIFIED_CONFIG=$(grep -s -e '.*' .last_modified_config)
CURRENT_MODIFIED_CONFIG=$(date -r .config +%s)
DIFF=$(echo "$LAST_MODIFIED_CONFIG - $CURRENT_MODIFIED_CONFIG" | bc)
if [ "$DIFF" -lt "0" ]; then
echo "$CURRENT_MODIFIED_CONFIG" > .last_modified_config
gcc rotina_principal.c -o rotina_pri... |
using Newtonsoft.Json.Linq;
namespace NeuralNetworks.Units {
public abstract class Unit {
public string id { get; set; }
public double value { get; set; }
public double derivative { get; set; }
public abstract void count();
public abstract void countDerivativesOfInputUnits();
public virtual void countDerivati... |
/*
* This is free and unencumbered software released into the public domain, following <https://unlicense.org>
*/
package com.pullvert.kotysa.android
import android.content.ContentValues
import android.database.sqlite.SQLiteDatabase
import android.database.sqlite.SQLiteOpenHelper
import com.pullvert.kotysa.*
import... |
/**
* Constructor params for {@link MediaCatalog} class.
*/
export interface MediaCatalogCtor {
/**
* The path to the downloaded Media Catalog.
*/
path: string
/**
* The Meps Language Id of this publication.
*/
languageId: number
}
interface CatalogSchemaVersionRow {
type: 'catalogSchemaVersion... |
pub use fugue_bv as bv;
#[cfg(feature = "db")]
pub use fugue_db as db;
#[cfg(feature = "fp")]
pub use fugue_fp as fp;
pub use fugue_ir as ir;
pub use fugue_arch as arch;
pub use fugue_bytes as bytes;
|
/*
* Copyright 2020 47 Degrees, LLC. <http://www.47deg.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 ... |
# (C) Datadog, Inc. 2018
# All rights reserved
# Licensed under Simplified BSD License (see LICENSE)
import os
from datadog_checks.utils.common import get_docker_hostname
HERE = os.path.dirname(os.path.abspath(__file__))
FIXTURES = os.path.join(HERE, 'fixtures')
ROOT = os.path.dirname(os.path.dirname(HERE))
CHECK_N... |
"""
Pathfinding.position_delta(pathfinder::AStar{D}, from::NTuple{Int,D}, to::NTuple{Int,D})
Returns the absolute difference in coordinates between `from` and `to` taking into account
periodicity of `pathfinder`.
"""
position_delta(pathfinder::GridPathfinder{D,true}, from::Dims{D}, to::Dims{D}) where {D} =
min.... |
/*
Theming JS for CoWhere
© 2020 Johannes Kreutz. Alle Rechte vorbehalten.
*/
import my from './my.js';
import statusbar from './statusbar.js';
let theming = {
isDarkMode: function() {
return new Promise(function(resolve) {
NativeStorage.getItem("darkModePreference", function(result) {
if (resu... |
#include <stdlib.h>
#include <string.h>
#include "map.h"
#define map_index(map, hash) (unsigned int)(hash % map->_len)
#define map_error(map) (map->_c)
#define map_free_entry(k,v,entry) {if (k) k((entry)->key); if (v) v((entry)->value);}
typedef struct _map_entry
{
unsigned int hash; /*key的hash值*/
... |
package com.cektrend.cekinhome.di
import android.content.Context
import androidx.room.Room
import com.cektrend.cekinhome.data.db.AppDatabase
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.android.qualifiers.ApplicationContext
import dagger.hilt.components.SingletonComponent... |
#!/bin/bash
wget -O pretrained_models.tar.gz http://cvsp.cs.ntua.gr/research/stavis/data/pretrained_models.tar.gz
tar -xzf pretrained_models.tar.gz
rm pretrained_models.tar.gz
mv pretrained_models/* .
rm -rf pretrained_models/ |
package singularity.measure
import java.text.SimpleDateFormat
/**
* Time measurement utilities
*/
object TimeTools {
type Nanosecond = Long
def nanoToMillisString(nanosecond: Nanosecond): String = {
val millis = (nanosecond /1e9).toInt
if(millis>0){
val ms = nanosecond/1e6 - millis * 1000
... |
void main() {
int a = 20;
int b = 5;
int c = 7;
bool proposicao1 = a > b;
bool proposicao2 = b < c;
//saída
print('$a > $b && $b < $c - Resposta: ${proposicao1 && proposicao2}');
print('$a > $b || $b > $c - Resposta: ${proposicao1 || proposicao2}');
//verificando o falso
bool proposicao3 = a < b... |
// Task Class: Represents a to-do
export default class Task {
constructor(description, completed, index) {
this.description = description;
this.completed = completed;
this.index = index;
}
task2string() {
const srt = `Index: ${this.index} - Description: ${this.description} - Completed: ${this.com... |
<?php
namespace app\components;
use Yii;
use yii\base\Component;
use yii\base\InvalidCallException;
class Github extends Component
{
/**
* @return \Github\Client
*/
public function client()
{
if (Yii::$app->user->isGuest) {
// TODO auto-relogin
throw new InvalidCallException('Can not create github cl... |
use std::collections::BTreeMap;
fn calculate_population(initial_population: &BTreeMap<i32, u128>, days: u32) -> u128 {
(0..days)
.fold(initial_population.clone(), |acc, _| {
let mut new_generation: BTreeMap<_, _> = acc
.into_iter()
.filter(|&(a, _)| a >= 0)
... |
#!/usr/bin/env bash
#Makes entry script executable, renames it, copies Configs to /tmp, and copies all py scripts to
#/usr/local/bin (which should already be on user PATH).
chmod 777 tesla.py
cp Configurations.properties /tmp/
cp *.py /usr/local/bin
cd /usr/local/bin
mv tesla.py tesla |
using System;
using System.Threading;
using System.Threading.Tasks;
using ComposableAsync.Resilient.ExceptionFilter;
namespace ComposableAsync.Resilient.Retry
{
internal sealed class RetryDispatcher : IBasicDispatcher
{
private readonly int _MaxRetry;
private readonly IExceptionFilter _Excepti... |
(ns agentcity.schemas.gender
(:require [schema.core :as sc]
[agentcity.utilities.string_util :as str]))
(defn valid-name? [name]
(str/non-blank-with-max-length? 10 name))
(sc/defschema Gender
{:Id (sc/Int)
:Name (sc/constrained sc/Str valid-name?)}) |
package com.javatests;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
class VowelsTest
{
@Test
public void testCase1() {
assertEquals(5, Vowels.getCount("abracadabra"));
}
@Test
public void testCase2() {
assertEquals(8, Vowels.getCount("jfdkslajkajki jk i jfdkofjdkofjds... |
var class_my_homie_device =
[
[ "addNode", "class_my_homie_device.html#addfbcc04b7bb91a6a19ed4f8756e621a", null ],
[ "getDef", "class_my_homie_device.html#ad49c3d32b890ce2d9443afe1ceb87a85", null ],
[ "getNode", "class_my_homie_device.html#a8ada4f85c0007406cd7d73125d35f8ca", null ],
[ "getNode", "class_... |
{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}
module EncodeJsonLaws
( encodeJsonLaws
) where
import qualified Data.Aeson as Aeson
import Linnet.ContentT... |
+++
title = "All Desktop Resources"
draft = false
desktop_resource_list = true
[menu]
[menu.desktop]
title = "All Resources (Single Page)"
identifier = "desktop/resources/index.md All Resources"
parent = "desktop/resources"
weight = 10
+++
{{< desktop_resource_yaml_all >}}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.