text
stringlengths
27
775k
# A sample frontend app built on top of Ruby and Sinatra. It returns HTML. require 'sinatra' require 'open-uri' if ARGV.length != 3 raise 'Expected exactly three arguments: SERVER_PORT SERVER_TEXT BACKEND_URL' end server_port = ARGV[0] server_text = ARGV[1] backend_url = ARGV[2] set :port, server_port set :bind, ...
<?php namespace App\Http\Controllers\Admin\Auth; use Illuminate\Http\Request; use App\Http\Requests; use App\Http\Requests\Admin\RegistrationCMSUsers; use App\Http\Controllers\Controller; class IndexController extends Controller { /* * Display login form to admin */ public function login() { ...
from json.decoder import JSONDecodeError import os from mstrio.utils.helper import exception_handler def print_url(response, *args, **kwargs): """Response hook to print url for debugging.""" print(response.url) def save_response(response, *args, **kwargs): """Response hook to save REST API responses to...
import 'dart:async'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; typedef void UnityWidgetCreatedCallback(UnityWidgetController controller); class UnityWidgetController { final _UnityWidgetState _unityWidgetState; final MethodChannel ch...
# -*- coding: utf-8 -*- import logging import os import sys import fnmatch import weakref from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.Qt import QTabWidget, QTextEdit from PyQt5.QtCore import QIODevice, qWarning, QTextStream from pineboolib.fllegacy import FLFormSearchDB as FLFormSearchDB_legacy from pinebo...
from gzip import GzipFile from bz2 import decompress as bz2_decompress from tempfile import NamedTemporaryFile from json import dumps import shutil from os import mkdir, unlink, path from os.path import isdir, isfile, join from Bio import Entrez, SeqIO Entrez.email = 'npusarla@ucsd.edu' import argparse import re from...
package com.fuhj.itower.model; import java.util.Date; import java.util.List; import com.fuhj.itower.dao.Criteria; public class GElecInfoCriteria extends Criteria { public GElecInfoCriteria andGelecInfoIdIsNull() { addCriterion("gelec_info_id is null"); return this; } pub...
import React, { Component, PropTypes } from 'react'; import { Route, Switch } from 'react-router-dom'; import { Layout, Menu, Breadcrumb } from 'antd'; import PostsPage from '../../pages/Posts'; import LoginPage from '../../pages/Login'; import NavBar from '../NavBar'; import './style.css'; const { Content, Footer ...
SELECT DISTINCT k.*, harga.min as hargamin, harga.max as hargamax, count(kk.id) as jumlahkamar, foto.nama FROM public.kosan as k, public.kamar_kosan as kk, (select max(harga) as max, min(harga) as min, idkosan from public.kamar_kosan group by idkosan) as harga, (select max(foto.nama) as nama...
## Overview [Bug Report/Feature Request/Ask] Text here. ## Environment - OS: Ubuntu 18.04 - Python version: 3.7.3 --- (for bug report) ### Expected Behavior Text here. ### Actual Behavior Text here. ### Detail Text here. --- (for feature request) ### Feature Detail Text here. ### Motivation and Reason ...
# frozen_string_literal: true require "json" require "uri" module Miteru class Feeds class Ayashige < Feed HOST = "ayashige.herokuapp.com" URL = "https://#{HOST}" def urls url = url_for("/feed") res = JSON.parse(get(url)) domains = res.map { |item| item["domain"] } ...
import 'package:equatable/equatable.dart'; import 'package:meta/meta.dart'; class MessageFile extends Equatable { final int index; final String filename; final int size; const MessageFile({ @required this.index, @required this.filename, @required this.size, }); @override List<Object> get pr...
import { Controller, Body, Post, Get, Param, Delete, Put, UsePipes, ValidationPipe } from "@nestjs/common"; import { ItempedidoService } from "./itempedido.service"; @Controller('/item') export class ItemPedidoController { constructor(private itemService: ItempedidoService ) { } @Get() showAll...
package hello.world.angelkitchen.view.bottom_menu.bookmark import android.content.Intent import androidx.fragment.app.activityViewModels import androidx.recyclerview.widget.DividerItemDecoration import androidx.recyclerview.widget.ItemTouchHelper import androidx.recyclerview.widget.LinearLayoutManager import androidx....
___x_cmd_scala_unpack(){ ___x_cmd_pkg_install___unzip "$name" "$version" "$osarch" } ___x_cmd_scala_unpack
package ru.ifmo.genetics.tools.microassembly; import ru.ifmo.genetics.utils.FileUtils; import ru.ifmo.genetics.utils.tool.ExecutionFailedException; import ru.ifmo.genetics.utils.tool.Parameter; import ru.ifmo.genetics.utils.tool.Tool; import ru.ifmo.genetics.utils.tool.inputParameterBuilder.FileMVParameterBuilder; imp...
# Authentication-UI - RELEASE NOTES ## Version 1.0.0 - 18th April 2020 This is our most major release, which introduces the following features: -------------Ignore anything below here: AUtogenerated by (ReadMe Master templates)[] ## Version 1.1.9 (27th December 2017) A minor release, which fixed the fol...
#this is the unittest for the function "win_query" #Input: #gamefield in current situation: Player 1(1) Player 2 (2) # |1|0|2| # |1|2|0| # |2|1|0| #Expected output: # "Player 2 is the winner! Game over! New game : 1, End game: 2, Current score: 3, highest winstreak: 4 utest_win_query: #Step 1: load the field ...
use crate::files::cursor::SeekMethod; use crate::files::filename; use crate::files::handle::{FileHandle, Handle}; use crate::filesystems; use crate::pipes; use super::current_process; use syscall::files::{DirEntryInfo, DirEntryType}; use syscall::result::SystemError; pub fn open_path(path_str: &'static str) -> Result<...
.code get_peb PROC mov rax, GS:[60h] ret get_peb ENDP END
git clone $1 $2 cd $2 # Install/update composer dependecies composer install --no-interaction --prefer-dist --optimize-autoloader --no-dev cp .env.example .env # config setting to production usage sed -i "" 's/APP_ENV=local/APP_ENV=production/g' .env sed -i "" 's/APP_DEBUG=true/APP_DEBUG=false/g' .env sed -i "" 's/...
package ITS::WICS::XML2XLIFF::ITSProcessor; use strict; use warnings; # VERSION # ABSTRACT: Process and convert XML and XLIFF ITS (internal use only). use ITS qw(its_ns); use ITS::DOM::Element qw(new_element); use Exporter::Easy ( OK => [qw( its_requires_inline convert_atts lo...
using System; using System.Collections.Generic; using System.Threading.Tasks; using Str.Wallpaper.Domain.Contracts; namespace Str.Wallpaper.Domain.Models { public sealed class DomainUser { #region Private Fields private readonly IUserSettingsRepository userRepository; private readonly IUserSession...
package com.github.skyfe79.android.helloandroidrck.action import com.github.skyfe79.android.reactcomponentkit.redux.Action data class ClickButtonAction(val message: String): Action
require 'spec_helper' require 'fakefs/spec_helpers' module LicenseFinder describe Nuget do it_behaves_like "a PackageManager" describe "#assemblies" do include FakeFS::SpecHelpers before do FileUtils.mkdir_p "app/packages" FileUtils.mkdir_p "app/Assembly1/" FileUtils.mk...
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # 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 applic...
import { Injectable } from '@angular/core'; import { HttpClient, HttpResponse } from '@angular/common/http'; import { Observable } from 'rxjs'; import { SERVER_API_URL } from 'app/app.constants'; import { map } from 'rxjs/operators'; @Injectable({ providedIn: 'root' }) export class LoginOAuth2Service { constructor(p...
--- kernelspec: display_name: Python 3 language: python name: python3 --- ```{code-cell} ipython3 cat = 42 ```
<?php /** * DotBoost Technologies Inc. * DotKernel Application Framework * * @category DotKernel * @copyright Copyright (c) 2009-2015 DotBoost Technologies Inc. (http://www.dotboost.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * @version $Id: User.php 981 2...
#!/bin/sh find . -name 'Icon?' -type f -delete
describe("Scanner", function() { var Scanner; beforeEach(function() { scanner = new Scanner(); }); });
import { EnteDto } from "../../modello-dto/iscritto-dto/ente-dto"; export class Ente extends EnteDto{ constructor(identificativo: string, email: string, password: string, sede: string, annoDiFondazione: Date){ super(identificativo, email, password, sede, annoDiFondazione); } }
## SortingNetworks ### Target frameworks * [net6.0](net6.0/SortingNetworks.md) * [net5.0](net5.0/SortingNetworks.md) * [netcoreapp3.1](netcoreapp3.1/SortingNetworks.md) * [netstandard2.1](netstandard2.1/SortingNetworks.md) * [netstandard1.3](netstandard1.3/SortingNetworks.md)
import deepEqual from 'deep-equal'; import clonedeep from 'lodash.clonedeep'; import {Callback} from 'reactive-properties'; import {providers} from 'ethers'; import {BalanceChecker, TokenDetailsWithBalance, Nullable, ensureNotNullish, ETHER_NATIVE_TOKEN, ProviderService, isAddressIncludedInLog} from '@unilogin/commons'...
module params !DEFAULT VALUES--------------------------------------------------------------- !Iterations to run integer :: NSTEPS=10000 integer :: ISTEPS=2000 integer :: VSTEPS=50 !Resolution integer :: NX = 64 integer :: NY = 64 integer :: NZ = 64 double precision :: DSPACE = 0.2d0, DTSIZE = 0.01d...
# frozen_string_literal: true require "spec_helper" # This is a very thin test, since most of the functionality is tested # in the controller test. Here we just want to make sure that the CSS # class appears, for the UJS magic to kick in. describe "thread views" do context "for a signed in user" do include_con...
import 'toast.dart'; class ToastManager { factory ToastManager() => _instance; ToastManager._(); static late final ToastManager _instance = ToastManager._(); final Set<ToastFuture> toastSet = <ToastFuture>{}; void dismissAll({bool showAnim = false}) { toastSet.toList().forEach((ToastFuture v) { ...
/* * Copyright (c) 2018-2019 The University of Sheffield. * * This file is part of gatelib-interaction * (see https://github.com/GateNLP/gatelib-interaction). * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by *...
// Copyright 2017 TODO Group. All rights reserved. // SPDX-License-Identifier: Apache-2.0 const logSymbols = require('log-symbols') class SymbolFormatter { format (result) { return `${logSymbols[result.getStatus()]} ${result.rule.id}: ${result.message}` } } module.exports = new SymbolFormatter()
## Summary Generates hash for JSON objects. ## Usage // If you're not on babel use: // require('babel/polyfill') npm install json-hash var assert = require('assert') var hash = require('json-hash') // hash.digest(any, options?) assert.equal(hash.digest({foo:1,bar:1}), hash.digest({bar:...
/* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ import { i18n } from '@kbn/i18n'; import { table } from '../../functions/comm...
<?php namespace app\components\helpers; class StringHelper extends \yii\helpers\StringHelper { public static function truncateByWord($string, $length, $suffix = '...', $encoding = 'UTF-8') { if (mb_strlen($string, $encoding) <= $length) { return $string; } $tmp = mb_subst...
export const PRIMARY_COLOR = '#1890ff' export const SUCCESS_COLOR = '#52c41a' export const WARNING_COLOR = '#faad14' export const DANGER_COLOR = '#ff4d4f' export const PRIMARY_BORDER_COLOR = '#40a9ff' export const SUCCESS_BORDER_COLOR = '#73d13d' export const WARNING_BORDER_COLOR = '#ffc53d' export const DANGER_BORDER_...
# hcl-sdk-button <!-- Auto Generated Below --> ## Properties | Property | Attribute | Description | Type | Default | | -------------- | --------------- | ----------- | --------- | ----------- | | `class` | `class` | | `string` | `undefined` | | `disabled` | `di...
/** * @jsx React.DOM */ var HELLO_COMPONENT = "\ /** @jsx React.DOM */\n\ var HelloMessage = React.createClass({\n\ render: function() {\n\ return <div>Hello {this.props.name}</div>;\n\ }\n\ });\n\ \n\ React.renderComponent(<HelloMessage name=\"John\" />, mountNode);\ "; var transformer = function(code) { ...
use super::Redirects; use crate::job::SharedJobs; use crate::parse::{Arg as ParseArg, Command as ParseCmd, SpecialStr}; use std::process::{Child, Command, Stdio}; #[derive(Debug, Clone, PartialEq, Eq)] pub struct External { pub name: SpecialStr, pub args: Args, pub reds: Redirects, pub pipe: Option<B...
//===-- go-llvm-tree-integrity.cpp - tree integrity utils impl ------------===// // // Copyright 2018 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // //===---------------------------------------------------------------------...
module RequestHelpers def response_body JSON(response.body) end def auth_headers(user) session = user.sessions.create! token = JwtEncoder.encode(uuid: session.uuid) { 'Authorization' => "Bearer #{token}" } end end
--- layout: post title: Emacs 实践 date: 2019-03-29 08:00:00 +0800 categories: 七说八道 tag: 工具 --- ### 多行操作 - 删除行前的空格或者其他字符 ``` - C-space 标记起始点(左上角) - 移动到要删除的最后一行的字符后一个字符保证要删除区域在高亮部分 - C-x r c ``` - 在行前插入字符 ``` - C-space - 选择 - C-x r t - 输入需要的字符 ``` ### 矩阵操作命令 ``` - C-space set-mark-command 标记矩形区块的一个角(光标标记其相对的角)。 - C-...
#!/bin/bash echo "Fully automated installation" if [[ -d data_l1 || -d data_l2 ]] ; then read -p "This will wipe data L1 & L2 data directories. Are you sure? (y/n) " -n 1 -r echo echo $REPLY if [[ $REPLY =~ ^[Yy]$ ]]; then ./clean.sh else echo "aborting" exit 1 fi fi ....
/** * @fileoverview This file is generated by the Angular 2 template compiler. * Do not edit. * @suppress {suspiciousCode,uselessCode,missingProperties} */ /* tslint:disable */ import * as import0 from './item'; import * as import1 from '@angular/core/src/change_detection/change_detection'; import * as import2 fr...
export class UsuarioDto { nome: string; login: string; senha: string; }
package edit import ( "github.com/getclasslabs/go-tools/pkg/tracer" "github.com/getclasslabs/user/internal/domains" "github.com/getclasslabs/user/internal/service/userService" ) type Edit struct { userService.Profile Twitter string `json:"twitter,omitempty"` Facebook string `json:"facebook,omitempty"` I...
import React from 'react' import ButtonStyles from "./ButtonStyle.module.css"; export default (props) => ( <div className={ButtonStyles.buttonContainer}> <a className={ButtonStyles.button} href={props.to}> {props.children}</a> </div> )
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Fostor.Ginkgo.Users.Dto; namespace Fostor.Ginkgo.Web.Views.Shared.Components.UserSelector { public class UserSelectorViewModel { public List<UserDto> Users { get; set; } public string TagNam...
package snabbdom.modules import scala.scalajs.js import scala.scalajs.js.annotation.JSImport import scala.scalajs.js.annotation.JSImport.Default @JSImport("snabbdom/modules/class", Default) @js.native object `class` extends js.Object @JSImport("snabbdom/modules/attributes", Default) @js.native object attributes exte...
DROP DATABASE `agenda`; CREATE DATABASE `agenda`; USE agenda; CREATE TABLE `persona` ( `idPersona` int(11) NOT NULL AUTO_INCREMENT, `nombre` varchar(45) NOT NULL, `telefono` varchar(20) NOT NULL, `email` varchar(20), `cumpleaños` varchar(20), `nombreLocalidad` int(11) NOT NULL, `nombreCategoria...
# coding: utf-8 require 'thor' require 'hiyoko/scraper' require 'hiyoko/db' require 'hiyoko/lessons' require 'hiyoko/proj-generator' require 'hiyoko/viewer' require 'pp' module Hiyoko class CLI < Thor desc "prepare", "setup lessons" def prepare() if DB.prepare() != nil then url = "https://sit...
using Jasper; using Jasper.Persistence.Postgresql; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Hosting; namespace Ponger { internal class JasperConfig : JasperOptions { public JasperConfig() { // Listen for incoming messages using the // lightwe...
Abbe.t abbe.t Abbé.t abbé.t Abbess.t abbess.t Abbot.t abbot.t accompanist.t accountant.t administrator.t admiral.t adviser.t advisor.t agent.t aide.t Ambassador.t ambassador.t analyst.t arbitrator.t Archbishop.t archbishop.t archdeacon.t architect.t archivist.t assessor.t asshole.t assistant.t associate.t attorney.t au...
import ExpressionReference from './ExpressionReference' import ExpressionReferenceComponent from './ExpressionReferenceComponent' import DropExpressionReference from './DropExpressionReference' export default { name: 'expression-reference', configure: function(config) { config.addNode(ExpressionReference) ...
/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. 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 a...
#!/bin/bash echo "Breaking OPA Gatekeeper.." echo "Changing the failurePolicy to Fail..." kubectl get ValidatingWebhookConfiguration gatekeeper-validating-webhook-configuration -o yaml | sed 's/failurePolicy.*/failurePolicy: Fail/g' | kubectl apply -f - echo "Scaling deployments to zero..." kubectl -n gatekeeper-sys...
package com.github.jhanne82.documenttree.utils; import com.github.jhanne82.documenttree.simulation.documenttree.retrieval.EulerianDistance; import org.junit.Test; import static junit.framework.TestCase.assertEquals; public class EulerianDistanceTest { Double[] documentVector = {0.1, 0.2, 0.3, 0.4, null}; ...
-- @testpoint: truncate table drop table if exists alter_table_tb08; create table alter_table_tb08 ( c1 int, c2 bigint, c3 varchar(20) ); insert into alter_table_tb08 values('11',null,'sss'); insert into alter_table_tb08 values('21','','sss'); insert into alter_table_tb08 values('31',66,''); insert into alter_table_tb0...
package com.johnowl.rules import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Test class VariablesParserTest { private val parser = VariablesParser() @Test fun `should add Int as Number`() { val variables = parser.parse(mapOf("number" to 100)) assertEquals(...
// Copyright (c) Simon Fraser University. All rights reserved. // Licensed under the MIT license. // // Authors: // George He <georgeh@sfu.ca> // Duo Lu <luduol@sfu.ca> // Tianzheng Wang <tzwang@sfu.ca> #pragma once #include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <sys/types.h> #include <bits/hash_b...
require 'minitest/autorun' require 'prawn/qrcode' require 'prawn/document' class TestQrcodeInContext < Minitest::Test def test_render_with_margin context = Prawn::Document.new assert(context.print_qr_code('HELOWORLD', margin: 0)) end def test_render_with_alignment context = Prawn::Document.new left...
--- layout: post title: Aula 05 #image: /img/hello_world.jpeg --- # Escalares (Tipos e operações) & # Vetores (Arrays e Hashes) ## Apresentação [Escalares](/introprog2021/pdf/aula05a.pdf) [Vetores](/introprog2021/pdf/aula05b.pdf) ## Material para aula Arquivo em formato fasta: [dmel-gene-r5.45.fasta](/introprog2...
import jseu from 'js-encoding-utils'; import {getTestEnv} from './prepare'; import {HashTypes} from '../src/params'; const env = getTestEnv(); const pbkdf = env.library; const envName = env.envName; const hashes: Array<HashTypes> = ['SHA-256', 'SHA-384', 'SHA-512', 'SHA-1', 'MD5', 'SHA3-512', 'SHA3-384', 'SHA3-256', ...
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt) // This code is distributed under the GNU LGPL (for details please see \doc\license.txt) using System; using System.Windows.Controls; using System.Windows.Input; using ICSharpCode.Core; namespace ICSharpCode.SharpD...
# frozen_string_literal: true require 'spec_helper' describe 'acts_as_removable' do class MyModel < ActiveRecord::Base acts_as_removable attr_accessor :callback_before_remove, :callback_after_remove, :callback_before_unremove, :callback_after_unremove before_remove do |r| r.callback_before_remove ...
package zachinio.choreographer.animation import android.animation.Animator import android.view.View import io.reactivex.Completable import java.lang.ref.WeakReference class ScaleAnimation( view: View, private val xScale: Float, private val yScale: Float, private val duration: Long ) : Animation() { ...
using System; using System.Collections; using System.Collections.Generic; namespace SimpleContainer { internal sealed class DependencyDictionary : IEnumerable<DependencyLink> { private readonly Dictionary<Type, DependencyLink> links = new Dictionary<Type, DependencyLink>(); public D...
// run-pass // To avoid having to `or` gate `_` as an expr. #![feature(generic_arg_infer)] fn foo() -> [u8; 3] { let x: [u8; _] = [0; _]; x } fn main() { assert_eq!([0; _], foo()); }
import HostedFieldType from '../hosted-field-type'; export default interface HostedInputValues { [HostedFieldType.CardCode]?: string; [HostedFieldType.CardCodeVerification]?: string; [HostedFieldType.CardExpiry]?: string; [HostedFieldType.CardName]?: string; [HostedFieldType.CardNumber]?: string; ...
package com.yhy.mybatis.mapper.teacher; import com.yhy.mybatis.bean.Teacher; public interface TeacherMapper { //获取指定老师,及老师下的所有学生 public Teacher getTeacher(int id); public Teacher getTeacher2(int id); }
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> <title>Fastcoo</title> <meta name="description" content="A responsive bootstrap 4 admin dashboard template by hencework" /> ...
module Gitlab module Metrics # Class that sends certain metrics to InfluxDB at a specific interval. # # This class is used to gather statistics that can't be directly associated # with a transaction such as system memory usage, garbage collection # statistics, etc. class Sampler # interv...
package uk.nhsbsa.services.pages; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.FindBy; import org.openqa.selenium.support.PageFactory; public class PartnerPage extends BasePage{ @FindBy(id = "label-no") private final WebElement noPartnerRadioB...
package entity // Pagination is default struct response for pagination configuration type Pagination struct { Template string Page int NextPage int PrevPage int Rows int TotalPage int // ListPage contain list number page ["1","2","3"] ListPage []int }
require "release_manager/version" require "release_manager/module_deployer" require "release_manager/release" require "release_manager/changelog" require 'release_manager/logger' require 'release_manager/workflow_action' require 'release_manager/sandbox' class String def colorize(color_code) "\e[#{color_code}m#{...
require 'hacker_news_notifier/version' require 'hacker_news_notifier/title_checker' require 'hacker_news_notifier/ping' module HackerNewsNotifier class Notifier def check(title) title_checker = TitleChecker.new ping = Ping.new ping.ping if title_checker.title_exists(title, 10) end end end...
set -e set_tuna_conda() { conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/ conda config ...
using System; using System.Collections.Generic; using System.Text.Json.Serialization; namespace GameBox.Admin.UI.Model { public class OrderListModel { [JsonPropertyName("username")] public string Username { get; set; } [JsonPropertyName("timeStamp")] public DateTime TimeStamp {...
import requests def get_current_region(): """ works only from ec2 machine :return: """ r = requests.get("http://169.254.169.254/latest/dynamic/instance-identity/document") response_json = r.json() return response_json.get("region")
 using System.ComponentModel.DataAnnotations.Schema; namespace Ccr.Data.EntityFramework.Core { public abstract class HasStaticStore<TEntity, TStaticEntityStore> : IHaveStaticStore where TStaticEntityStore : StaticEntityStore<TEntity> where TEntity : class { [NotMapped] public virtual bool Is...
package demo.movie.app.repo import demo.movie.app.model.dto.CastMemberDto import demo.movie.app.model.dto.Credits import demo.movie.app.model.dto.CrewMemberDto import demo.movie.app.model.dto.Genre import demo.movie.app.model.dto.tv.TvDetailDto import demo.movie.app.model.dto.tv.TvPreviewDto import demo.movie.app.mode...
# frozen_string_literal: true require 'dry/monads' require 'dry/monads/do' module FinancialAssistance module Operations module Application class RequestDetermination send(:include, Dry::Monads[:result, :do]) include Acapi::Notifiers require 'securerandom' FAA_SCHEMA_FILE_P...
package com.ruoyi.code.controller; import com.ruoyi.code.domain.Rfe; import com.ruoyi.code.service.IRfeService; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.page.TableDataInfo; import com.ruo...
using Model; namespace Service { public class PaymentService : IPaymentService { public PaymentResult RemitPayment(decimal due, decimal payment) { PaymentResult result = new PaymentResult(); if (!ValidatePayment(payment)) { result.PaymentStat...
use warnings; use strict; package BTDT::Notification::Purchase; use base qw/BTDT::Notification/; =head1 NAME BTDT::Notification::Purchase =head1 ARGUMENTS C<purchase> =cut __PACKAGE__->mk_accessors(qw/purchase/); =head2 setup Sets up the email. =cut sub setup { my $self = shift; $self->SUPER::setup(@...
const Discord = require("discord.js"); const config = require("../config.json"); module.exports.run = async (bot, message) => { let HelpEmbed = new Discord.RichEmbed() .setColor("RANDOM") .setTitle(`${bot.user.username}'s Help Menu`) .setDescription(``) .setFooter(`Requested by ${message.author.ta...
package org.edx.mobile.model.api import com.google.gson.annotations.SerializedName data class CourseComponentStatusResponse( @SerializedName("last_visited_module_id") var lastVisitedModuleId: String? = null, @SerializedName("last_visited_module_path") var lastVisitedModulePaths: ArrayL...
using System; using System.Collections.Generic; using System.Text; using System.IO; using System.Collections; using System.Drawing; using MainKykc; namespace MainKykc { class DirectoryCrawler { private string path; protected const string FILE_FILTER = "*.lnk"; protected ArrayList foundFiles; public ArrayLi...
package com.android.aman.newsapp import android.content.Intent import android.os.Bundle import android.os.Handler import android.view.WindowManager import android.view.animation.Animation import android.view.animation.AnimationUtils import android.widget.ImageView import androidx.appcompat.app.AppCompatActivity import...
#include "../src/log_rotate.h" #include <stdbool.h> #include <stdlib.h> #define DIR "." static bool exists(const char* const fname) { FILE* file; if ((file = fopen(fname, "r")) != NULL) { fclose(file); return true; } return false; } static bool TEST_FileOpenValidDIR(void) { bo...
# Copyright 2017 Google Inc. All Rights Reserved. # # 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 ag...
<?php namespace falkirks\chestrefill\dispatcher; use falkirks\chestrefill\Chest; use falkirks\chestrefill\ChestRefill; interface RefillDispatcher{ public function __construct(ChestRefill $chestRefill, array $args); public function attach(Chest $chest); public function detach(Chest $chest); public fun...
package com.burrowsapps.example.gif.ui.giflist import android.content.Context import android.view.ViewGroup import androidx.constraintlayout.widget.ConstraintLayout import androidx.test.ext.junit.runners.AndroidJUnit4 import com.burrowsapps.example.gif.data.ImageService import com.google.common.truth.Truth.assertThat ...