text
stringlengths
27
775k
# インストール方法 1. gitをインストール (<https://git-scm.com/downloads>) 1. npmをインストール (<https://nodejs.org/ja/>) 1. npmを以下の手順で [npm v6.0.0](https://nodejs.org/ja/) 以上にアップデート ```sh ## for macOS and Linux sudo npm i -g npm ## for Windows npm i -g npm ``` 1. リポジトリのインストール ```sh git clone https://github...
#pragma once #include <depthos/stdtypes.h> #include <depthos/paging.h> void __pgm_set_bme(uint32_t idx,bool busy); void __pgm_set_rpg_addr(uint32_t addr,bool busy); void __pgm_set_rpg_desc(page_t *pg,bool busy); uint8_t __pgm_get_bme(uint32_t idx); uint8_t __pgm_get_rpg_addr(uint32_t addr); uint8_t __pgm_get_rpg_de...
package challenges /** * http://adventofcode.com/2016/day/6 */ object Day6SignalsAndNoise { case class Group(char: Char, size: Int) private val orderMin = new Ordering[Group] { def compare(self: Group, that: Group): Int = that.size compare self.size match { case 0 => self.char compare that....
#!/bin/bash set -e cd sample vagrant up vagrant ssh cd -
export function height(ele: HTMLElement | SVGElement, win?: Window): number { const winInUse = win ? win : window; const valStr = winInUse.getComputedStyle(ele).getPropertyValue('height'); return parseFloat(valStr); } export function setHeight(ele: HTMLElement, val: number): void { ele.style.height = `${val}p...
package com.kaspersky.kaspresso.sample_kautomator.scroll import android.os.Bundle import android.widget.TextView import androidx.appcompat.app.AppCompatActivity import com.kaspersky.kaspresso.sample_kautomator.R import com.kaspersky.kaspresso.sample_kautomator.model.SimpleModel import kotlinx.android.synthetic.main.ac...
import React from 'react'; import { withStyles } from '@material-ui/core/styles'; import Grid from '@material-ui/core/Grid'; import Typography from '@material-ui/core/Typography'; import { withPrefix } from 'gatsby-link'; const styles = (theme) => ({ container: { [theme.breakpoints.down('sm')]: { padding: theme....
using System; using System.Collections.Generic; using System.Threading.Tasks; using R5T.Endalia; using R5T.T0064; namespace R5T.Epidarus { [ServiceDefinitionMarker] public interface IEndpointFactory : IServiceDefinition { Task<List<IEndpoint>> GetEndpointsAsync(IEnumerable<EndpointIdentity> end...
# frozen_string_literal: true namespace :convert_img do desc 'Decode base64 img and save in files' task convert_img: :environment do Company::Knowledge.all.each do |k| doc = Nokogiri::HTML(k.answer.to_s) divs = doc.css('.trix-content>div') divs.each_with_index do |div, index| div.css(...
<?php namespace App\Models; class Setting extends Model { protected $fillable = ['name', 'value', 'type', 'description']; protected $primaryKey = 'name'; public $incrementing = false; public function scopeSystem($query) { return $query->where('system', 1); } public function scope...
#!/bin/bash #check for locked files lock_files=( /var/lib/dpkg/lock /var/lib/apt/lists/lock /var/lib/dpkg/lock-frontend /var/cache/apt/archives/lock /var/lib/apt/daily_lock ) for file in "${lock_files[@]}"; do while fuser "$file" >/dev/null 2>&1; do echo "Waiting for lock $file to be av...
package crypto import ( cfdgo "github.com/p2pderivatives/cfd-go" ) // go generate comment //go:generate -command mkdir mock //go:generate mockgen -source crypto.go -destination mock/crypto.go -package mock //go:generate goimports -w mock/crypto.go // ------------------------------------- // API struct // ----------...
require 'test_helper' class Docp::TableHeaderTest < Minitest::Test def setup src = <<-EOS <html> <body> <table> <tr><td>user_name</td><td>user_id</td></tr> <tr><td>user1</td><td><td>1</td></tr> </table> </body> <html> EOS @test_doc = Nokogiri::H...
#!/bin/bash set -e source /docker-entrypoint-utils.sh set_debug SOURCE=$1; shift SHA_SUM=$1; shift if [ -f "${SHA_SUM}" ]; then sha_check="sha256sum -c ${SHA_SUM}" else sha_check="echo ${SHA_SUM} | sha256sum -c" fi name=$(basename $SOURCE) cd /tmp wget -nv "$SOURCE" eval "${sha_check}" cd ${ARCHIVA_SOURCE...
import { addTwoNumbers, getList } from "../../src/problems/2-add-two-numbers"; test(` Input: (2 -> 4 -> 3) + (5 -> 6 -> 4) Output: 7 -> 0 -> 8 Explanation: 342 + 465 = 807. `, () => { const a = getList([2, 4, 3]); const b = getList([5, 6, 4]); const c = getList([7, 0, 8]); expect(addTwoNumbers(a, b)).toStric...
import React from 'react'; import { Field, FieldProps, Form, FormProps } from 'react-final-form'; import createFocusDecorator from 'final-form-focus'; import { Text } from '@semcore/typography'; import { Box, Flex } from '@semcore/flex-box'; import Modal from '@semcore/modal'; import Input from '@semcore/input'; import...
package actionerror import "fmt" // RevisionAmbiguousError is returned when multiple revisions with the same // version are returned type RevisionAmbiguousError struct { Version int } func (e RevisionAmbiguousError) Error() string { return fmt.Sprintf("More than one revision '%d' found", e.Version) }
/* * @ClassName: BoostCollection * @Description: * @Author: Ravitn * @Date: 2021-03-08 10:06 */
// Copyright 2019 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. use failure::{bail, Error, ResultExt}; use fidl_fuchsia_omaha_client::{ OmahaClientConfigurationRequest, OmahaClientConfigurationRequestStream, }; use ...
# Powerplant Security System Api ## Quick Start ```bash # Install Express dependencies npm install # Run Server npm run server ``` ## Endpoints ### Clock-ins (Unsupported) Get All Clock-ins: (GET) - Local env: http://localhost:5000/api/v1/clocks/clockins - Prod env: https://powerplant-securit...
using System; using Highcharts4Net.Library.Options; namespace Highcharts4Net.Library { public delegate void SerieColumnrangeSettings(SeriesColumnrange s); public sealed class ColumnrangeChartSettings : BaseChartSettings<SeriesColumnrange> { public void AddSeries(SerieColumnrangeSettings s){ AddSerie...
``` <template> <q-calendar v-model="selectedDate" :column-header-before="true" :column-header-after="true" view="day" locale="en-us" style="height: 400px;" > <template #columnHeaderBefore="day"> <div class="q-ma-xs"> columnHeaderBefore slot </div> </template> ...
-module(shopping_cart_test). -include_lib("eunit/include/eunit.hrl"). shopping_cart_add_item_test() -> {ok, Pid} = shopping_cart:start_link(), Orange = {orange, 3}, % tuple with name and price Ans = shopping_cart:put_item(Pid, Orange), ?assertEqual(Ans, [{orange, 3}]). shopping_cart_calculate_cost_te...
<?php /** * This file is part of UiKit. * * Copyright (c) Róbert Kelčák (https://kelcak.com/) * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ declare(strict_types=1); namespace RobiNN\UiKit\Components; class Carousel extends Com...
## Origin [exploit-db](https://www.exploit-db.com/exploits/39161) ## Modifications - added argument parsing ## Build ``` make venv ```
#!/usr/bin/env bash python3 wrapper.py --module VexRiscv src/vexriscv-verilog/VexRiscv.v >src/vexriscv-verilog_wrap.v #python3 wrapper.py "src/picorv32/picosoc/picosoc.v" >src/picosoc_wrap.v python3 wrapper.py "src/picosoc_def.v" >src/picosoc_wrap.v #python3 wrapper.py "src/picorv32/picorv32.v" >src/picorv32_wrap.v p...
package dataTypes; import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; import java.util.stream.IntStream; public class Matrix extends Vector<DoubleVector> { private final List<Integer> vectorsDimensions; public Matrix() { super(); vectorsDimensions = null;...
using Newtonsoft.Json.Linq; using NUnit.Framework; using System; using System.Collections.Generic; using System.Net.WebSockets; using System.Text; using System.Threading; using System.Threading.Tasks; namespace Unium.Helpers { public class WebsocketHelper : IDisposable { private int mNextI...
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /* global vi, VI, Class */ (function (vi, VI) { function Timer(a, b) { this.Events(); this._delay = a > 0 ? a.toFloat() : 1; ...
# frozen_string_literal: true require 'test_helper' class HealthCardTest < ActiveSupport::TestCase setup do @jws = load_json_fixture('example-jws') @card = HealthCards::HealthCard.new(@jws) end test 'json' do credential = JSON.parse(@card.to_json) vc = credential['verifiableCredential'][0] ...
#!/bin/bash set -eo pipefail # Make 'conda' command available to shell environment source /opt/conda/etc/profile.d/conda.sh # Activate CORE3D environment conda activate core3d # Set up X virtual framebuffer (Xvfb) to support running VTK with OSMesa # Note: requires mesalib variant of vtk package Xvfb :1 -screen 0 10...
/* * Copyright 2015 Midokura SARL * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed t...
module Faker module Name extend ModuleUtils extend self def name case rand(10) when 0 then "#{prefix} #{first_name} #{last_name}" when 1 then "#{first_name} #{last_name} #{suffix}" else "#{first_name} #{last_name}" end end def first_name FIRST_NAMES.ran...
<%# .Synopsis Gets the current system date (no time component). .Parameter Server The server to get the system date for. -%> <%- switch -regex ($Server) { 'ORA.*' { -%> SYSDATE<% -%> <%- } 'SS\d\d.*' { -%> CAST(SYSDATETIME() AS date)<% -%> <%- } default { Write-Error "Serve...
/***************************************************************************** DistApf.h Author: Laurent de Soras, 2019 Effect based on this idea: Jussi Pekonen, Coefficient-modulated first-order allpass filter as distortion effect, Proceedings of the 11th International Conference on Digital Audio Eff...
export const responseToJSON = (res: Response) => { if (!res.ok) { throw res; } return res.json(); }; export const responseToText = (res: Response) => { if (!res.ok) { throw res; } return res.text(); }; export const logError = (err: Response) => { if (err.text) { err.text().then((text: string...
chmod 644 *.html *.php chmod 711 css fonts/ images/ js/ talks/ papers/ chmod 644 css/* fonts/* images/* js/* talks/* papers/*
<?php namespace red\projectBundle; use Symfony\Component\HttpKernel\Bundle\Bundle; class redprojectBundle extends Bundle { }
<?php defined('BASEPATH') OR exit('No direct script access allowed'); class Currency extends CI_Controller { function __construct() { parent::__construct(); $this->load->helper( array('url','html','date') ); $this->load->database(); $this->load->model('currency_model'); } public function index() { ...
import * as THREE from 'three'; import { ICharacterAI } from '../../interfaces/ICharacterAI'; import { Character } from '../Character'; export class RandomBehaviour implements ICharacterAI { public character: Character; private randomFrequency: number; constructor(randomFrequency: number = 100) { this.randomFre...
from django.conf.urls import url, include from django.urls import reverse_lazy from django.contrib.auth.views import login, logout from users.views import CreateUser, UpdateUser, ProfileUser from users.forms import AuthForm urlpatterns = [ url(r'^registration', CreateUser.as_view(), name='create-user'), ...
class NotificationMailer < ApplicationMailer def notification_email(notification) @user = notification.user @content = notification.message @title = notification.message @url = @user.admin? ? notification.admin_path : notification.path mail(to: @user.email, subject: @title) end end
package org.apache.spark.sql import org.apache.spark.sql.execution.datasources.jdbc.{ JDBCOptions, JDBCRelation } import org.json4s.jackson.JsonMethods.parse import org.json4s.JsonAST.{JField, _} import java.util.Properties import scala.collection.JavaConverters.asScalaSetConverter class JDBCLineageJson extends ...
package org.batfish.datamodel.vendor_family.f5_bigip; import static com.google.common.base.MoreObjects.firstNonNull; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableMap; import java.io.Serializable; import java.util.M...
import React from 'react'; import { X as Close } from 'react-feather'; import IconButton from './IconButton'; interface ICloseButtonProps { onClick: () => void; } const CloseButton: React.FC<ICloseButtonProps> = ({ onClick }) => { return ( <IconButton onClick={onClick}> <Close /> </IconButton> ); ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Dec 29 14:37:11 2020 @author: rohithbhandaru """ import os import logging from flask import Flask from flask_mail import Mail from pymongo import MongoClient from flask_moment import Moment from flask_compress import Compress from flask_login import L...
--- name: "Maxime Thoonsen" bio: "CTO" company: "Theodo" twitter: "https://twitter.com/maxthoon" picture: "../images/orgs/maxime.jpeg" ---
package singularity.visual import javax.swing.JFrame import org.apache.commons.math3.fitting.PolynomialCurveFitter import singularity.MultiStateRepresentation.individualToPattern import singularity.StandardSystem.GraphValue import singularity._ import scala.util.Random /** Restores an input pattern from serializati...
///@file basic_anixt.hpp /** * Copyright (c) 2020 Sri Lakshmi Kanthan P * * This software is released under the MIT License. * https://opensource.org/licenses/MIT */ #ifndef BASIC_ANIXT_HEADER #define BASIC_ANIXT_HEADER #include "anixt_config.hpp" #include "filesystem" #include "ostream" #include "sstream" #d...
ccc ccc program called from MATLAB to generate gamma ccc values for a section of hydrographic data ccc parameter (nz=6000) implicit double precision (a-h,o-z) dimension s(nz),t(nz),p(nz),gamma(nz),dg_lo(nz),dg_hi(nz) ccc ccc i/o files ccc open(10,file='glabel_matlab.in',status='old') open(11,file='glabel_...
# frozen_string_literal: true require 'rails_helper' RSpec.describe CatImageService do it 'fetches an image of a cat', :vcr do expect(CatImageService.get_image).to match(/https:\/\/cdn2.thecatapi.com\/images\/.*/) end end
import scala.sys.process._ name := "spray-jwt" organization := "com.github.janjaali" version := "1.0.0" licenses := Seq("MIT License" -> url("https://opensource.org/licenses/MIT")) homepage := Some(url("https://github.com/janjaali/spray-jwt")) scmInfo := Some( ScmInfo( url("https://github.com/janjaali/spray...
module Matrix ( Matrix , cols , column , flatten , fromList , fromString , reshape , row , rows , shape , transpose ) where import qualified Data.Vector as V import qualified Data.List.Split as Split data Matrix a = Matrix { vect :: V.Vector a ,...
package com.epiphany.callshow.function.wallpaper import android.app.ActivityManager import android.content.BroadcastReceiver import android.content.Context import android.content.Intent import android.content.IntentFilter import android.net.Uri import android.opengl.GLSurfaceView import android.service.wallpaper.Wallp...
description = "Module responsible for the processing of LaTeX." dependencies { implementation("org.scilab.forge:jlatexmath:1.0.7") }
/* * Copyright 2014 by the Metanome project * * 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 o...
package controllers import ( "errors" "fmt" "hssh/config" "hssh/messages" "hssh/models" "hssh/providers" "os" "path/filepath" "regexp" "strings" "sync" "github.com/spf13/viper" ) func getProjectIDAndPath(providerConnectionString string) (string, string, error) { rgx := regexp.MustCompile("^.*:/(.*)@(.*)...
class BasePlayerException(Exception): pass class LoginFailure(BasePlayerException): def __str__(self): return 'Credentials weren\'t accepted.' class PlayerExitException(BasePlayerException): pass class StoredTrackError(BasePlayerException): def __str__(self): return 'Track does not...
function focused() { Array.from(document.querySelectorAll('input')) .forEach(el => { el.addEventListener('focus', changeClass); }); function changeClass() { Array.from(document.querySelectorAll('body div div')).forEach(element => { element.className = ''; ...
/****************************************************************************** This source file is part of the Delaunay project. Copyright T.J. Corona This source code is released under the New BSD License, (the "License"). Unless required by applicable law or agreed to in writing, software distributed u...
window.addEventListener('load', function () { $.get( "../common_assets/php/LoginCheck.php", function(data) { if (data != "accept") location.replace(data); }); })
/* * Copyright 2020 Amazon.com, Inc. or its affiliates. * 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...
--- title: describe layout: command version: 0.60.0 usage: | Describe the value(s) piped in. --- # `{{ $frontmatter.title }}` <div style='white-space: pre-wrap;'>{{ $frontmatter.usage }}</div> ## Signature ```> describe ``` ## Examples Describe the type of a string ```shell > 'hello' | describe ```
import torch.nn as nn class LOLResultModel(nn.Module): def __init__(self, in_feature): super().__init__() self.layers = nn.Sequential( nn.Linear(in_feature, 128), nn.BatchNorm1d(128), nn.Linear(128, 128), nn.ReLU(), nn.Linear(128, 64), ...
/* * StoryModeScoreData.h * Bumble Tales * * Created by Robert Shoemate on 6/27/09. * Copyright 2009 Conjured Realms LLC. All rights reserved. * */ class StoryModeScoreData { public: StoryModeScoreData(); virtual StoryModeScoreData(); int resourceCount[6]; int largestChain; void ResetScore() { fo...
import 'package:extended_image/extended_image.dart'; import 'package:flutter/material.dart'; import 'package:github/github.dart'; import 'package:overview/src/github/github_service.dart'; import 'package:overview/src/injectable/injectable.dart'; import 'package:styleguide/styleguide.dart'; class ProfileCard extends St...
import 'package:shared_preferences/shared_preferences.dart'; import 'package:localstorage/localstorage.dart'; class LocalDataHelper { static final LocalStorage localStorage = new LocalStorage("ones-app-data"); static Future<bool> ready() async { return await localStorage.ready; } static put(String key, v...
///<reference types="jasmine"/> // tslint:disable import * as _ from "underscore"; import { repeat, createSequence, retryAction, retry } from "./retry"; import { createDeferred } from "../deferred" import { sleep } from "../sleep"; let invokeCount = 0; function failFirst(): Promise<boolean> { const result = createDe...
# frozen_string_literal: true module ActionDispatch # This middleware is added to the stack when `config.force_ssl = true`, and is passed # the options set in `config.ssl_options`. It does three jobs to enforce secure HTTP # requests: # # 1. TLS redirect: Permanently redirects http:// requests to https:// ...
# Tools' dotfiles ## shells - `python shells/aliases/generate_aliases.py` to generate the shell aliases for zsh and fish - No shell framework, all manual config, custom prompt ### zsh - `zshenv` goes to `$HOME/.zshenv` - `zshrc` goes to `$HOME/.config/zsh/.zshrc` - `git submodule update --init --recursive` to pull th...
# Test for regression issues with repo and workdir format from # repository format version v1. testdir="`pwd`" tar xzf $BOARTESTHOME/regression-v1.tar.gz || exit 1 REPO=$testdir/regression-v1/TESTREPO cd regression-v1/workdir # Relocate the workdir pointer to the repo. Also, since the test data # contains a half-fin...
package com.bjp.helloworld.rabbitmq.javaclient.tut2; import com.bjp.helloworld.rabbitmq.Constants; import com.rabbitmq.client.BuiltinExchangeType; import com.rabbitmq.client.Channel; import com.rabbitmq.client.Connection; import com.rabbitmq.client.ConnectionFactory; public class Productor { public static void m...
export default function (){ return [ { title : 'Javascript: The Good Parts' , pages : 101 }, { title : 'Harry Potter' , pages : 101 }, { title : 'The DARK TOWER' , pages : 11 }, { title : 'Rijon the reason' , pages : 10 } ] }
#!/usr/bin/env sh if [ "${VIKINGR_TOKEN_FILE}" != "" ]; then export VIKINGR_TOKEN=$(cat "${VIKINGR_TOKEN_FILE}") fi /usr/bin/vikingr $@
# Deprecated standards ## 基本情况 * Check: deprecated-standards * Severity: Informational * Confidence: High ## 描述 Detect the usage of deprecated standards. ## 利用案例 ```solidity contract ContractWithDeprecatedReferences { // Deprecated: Change block.blockhash() -> blockhash() bytes32 globalBlockHash = block.bloc...
mackerel-plugin-aws-ses ================================= AWS SES custom metrics plugin for mackerel.io agent. ## Synopsis ```shell mackerel-plugin-aws-ses -region=<SES Region> [-access-key-id=<id>] [-secret-access-key=<key>] [-tempfile=<tempfile>] ``` * You may omit region parameter if you're running this plugin on...
<?php namespace Serwer\Sms\SerwerSMS; class Premium { public function __construct($master) { $this->master = $master; } /** * List of received SMS Premium * * @return array * @option array "items" * @option int "id" * @option string "to_number" Premium number * @o...
//! Generated efm32 device index file pub mod efm32gg; pub mod efm32jg1b; pub mod efm32pg1b;
/* Copyright 2018 Schibsted Products & Technology AS. Licensed under the terms of the MIT license. * See LICENSE.md in the project root. */ 'use strict'; import { assert, isNonEmptyString, isUrl, isStr } from './validate'; import { urlMapper } from './url'; import { ENDPOINTS } from './config'; import JSONPClient f...
import { connect } from 'react-redux'; import { createStructuredSelector } from 'reselect'; import { AppScreen, getAppScreen } from './redux/slices/uiSlice'; import { Game, Menu, EndOverlay } from './components'; import { AppContainer } from './style'; interface StateProps { screen: AppScreen; } const App: React....
package org.smartregister.repository; import android.content.ContentValues; import net.sqlcipher.Cursor; import net.sqlcipher.database.SQLiteDatabase; import org.smartregister.client.utils.contract.ClientFormContract; import org.smartregister.domain.ClientForm; import java.text.ParseException; import java.text.Simp...
<p align="center"> <img width="65%" src="assets/img/404.png" alt="404"> </p>
RSpec.describe Ubw::Util do describe 'Ubw::Util#snakify' do it 'converts a string to snake_case' do expect(Ubw::Util.snakify('costCode')).to eq('cost_code') expect(Ubw::Util.snakify('cost_code')).to eq('cost_code') expect(Ubw::Util.snakify('subCostCode')).to eq('sub_cost_code') expect(Ub...
//////////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2018, the Perspective Authors. // // This file is part of the Perspective library, distributed under the terms // of the Apache License 2.0. The full license can be found in the LICENSE // file. use crate::js::perspec...
<?php namespace App\Http\Controllers\Auth; use App\Http\Controllers\Controller; use App\Models\buku; use App\Models\member; use App\Models\transaksi; use App\Models\User; use Carbon\Carbon; use Illuminate\Http\Request; class RegisterController extends Controller { public function table() { return vie...
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using Microsoft.Diagnostics.Monitoring.EventPipe; using Microsoft.Diagnostics.Monitoring.EventPipe.Triggers; using ...
import Criterion.Main import qualified Data.Map as M import qualified Data.Set as S bumpIt (i, v) = (i + 1, v + 1) m :: M.Map Int Int m = M.fromList $ take 10000 stream where stream = iterate bumpIt (0, 0) s :: S.Set Int s = S.fromList $ take 10000 stream where stream = iterate (+1)...
#include<iostream> using namespace std; int main(){ ios::sync_with_stdio(false); int t; cin>>t; while(t--){ int n; int even=0,odd=0; string s; cin>>n>>s; int a[n]; for(int i=0;i<n;i++){ cin>>a[i]; } cout<<"Dum"<<endl; } }
class DateFieldInput < SimpleForm::Inputs::StringInput # Normalizes to localized date def date_value value = object.send(attribute_name) return nil unless value.present? value = Date.parse(value) if value.is_a? String I18n.localize(value) end def input input_html_options[:type] = 'text' ...
// ----------------------------------------------------------------------- // <copyright file="OutSideProxy.cs" company="MagicKitchen"> // Copyright (c) MagicKitchen. All rights reserved. // </copyright> // ----------------------------------------------------------------------- namespace MagicKitchen.SplitterSprite4....
/* eslint-disable prefer-rest-params, prefer-spread */ import { AnyFunction } from '../types' /** * 绑定事件函数。 * * @public * @param type 事件类型 * @param callback 事件回调 * @param options 事件选项 * @returns 返回事件解绑函数 */ export type BindEventFunction<T> = < // prettier-ignore E extends // window T extends typeof...
require 'spec_helper' describe Spree::OrderContents do let(:order) { Spree::Order.create } subject { described_class.new(order) } context "#add" do let(:variant) { create(:variant) } it 'should add line item if one does not exist' do line_item = subject.add(variant, 1) line_item.quantity.sh...
# Em::Smtp EM-SMTP is a very simple asynchronous delivery implementation for ActionMailer that wraps EventMachine's SMTP Client. It's extreme lightweight, and suitable for sites that don't need heavy mail delivery and don't want to run another separate process. ## Installation Add this line to your application's Ge...
CREATE DATABASE fintechhack; USE fintechhack; CREATE TABLE groups ( group_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(100), university VARCHAR(255), members TINYINT(1), idea_title VARCHAR(255), idea_description TEXT, terms_accept TINYINT(1), update_at TIMESTAMP ); CREATE TABLE members ( member_...
<?php if (!function_exists('getHotelID')) { /** * Get the Site Name of the Site/Client append URI and Value * * * @return string */ function getHotelID() { $client_id = app('request')->has('client_id') ? app('request')->get('client_id') : null; $client_secret = app...
class SlackSmartBot # help: ---------------------------------------------- # help: `stop using rules from CHANNEL` # help: `stop using CHANNEL` # help: it will stop using the rules from the specified channel. # help: <https://github.com/MarioRuiz/slack-smart-bot#using-rules-from-other-channels|more info...
package com.projectseoul.stockmarkettest.models import com.projectseoul.stockmarkettest.utils.Const import com.squareup.moshi.Json import com.squareup.moshi.JsonClass /** * Created by KING JINHO on 9/16/2021 */ data class Grain( val date: String ) { lateinit var cornPrice: String lateinit var wheatPrice...
/* * 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 ...
/** * Copyright (c) 2015 Intel Corporation  * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * *       http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicabl...
package com.tencent.devops.turbo.dao.repository import com.tencent.devops.turbo.model.TTurboPlanEntity import org.springframework.data.domain.Page import org.springframework.data.domain.Pageable import org.springframework.data.mongodb.repository.MongoRepository import org.springframework.stereotype.Repository @Suppre...