text stringlengths 27 775k |
|---|
#!/usr/bin/env ruby
# Script to import tumblr posts into local markdown posts ready to be consumed by Jekyll.
# Inspired by New Bamboo's post http://blog.new-bamboo.co.uk/2009/2/20/migrating-from-mephisto-to-jekyll
# Supports post types: regular, quote, link, photo, video and audio
# Saves local copies of images
requ... |
import Product from "./Product";
/**
* Represents a shopping cart where shoppers can add/remove items from cart, and get a list of all products in cart.
*
* @author Okiki Ojo
* @date April 5, 2022
*/
export class ShoppingCart {
private products = new Set<Product>();
constructor() { }
public getProdu... |
import { LightProbeHelper as O3JS_LightProbeHelper } from 'three/examples/jsm/helpers/LightProbeHelper';
import { PositionalAudioHelper as O3JS_PositionalAudioHelper } from 'three/examples/jsm/helpers/PositionalAudioHelper';
import { RectAreaLightHelper as O3JS_RectAreaLightHelper } from 'three/examples/jsm/helpers/Rec... |
package questao3;
public class Quadrado {
double lado = 0.0;
// Construtor
public Quadrado(double lado) {
this.lado = lado;
}
// Calculo da área
public double area(double lado) {
return lado*2;
}
// Calculo do périmetro
public double perimetro(double lado) {
return lado*4;
}
}
|
1 10 35 150 163 164 181 186
2 22 55 86 99 128 129 170 172 175
3 49 72 77 78 92 106 139 151 174
4 17 21 51 114 140
5 18 32 43 55 144 159 172 188
6 49 72 104 115 139 154 178 185 192
7 20 52 54 82 101 124 136 169 196
8 12 84 87 123 146 150 152 153 169
9 73 110 121 143 148 166 193 197
10 79 81 94 163 165 186
11 28 46 59 84... |
package ba.sake.client.views.utils
import ba.sake.hepek.bootstrap3.BootstrapBundle
import ba.sake.hepek.bootstrap3.component.BootstrapFormComponents
import ba.sake.scalajs_router.Router
import ba.sake.stone.RouteImpl
object Imports {
val Bundle = locally {
val bundle = BootstrapBundle()
val newForm = bundl... |
--dimcustomers
--concat function
--case when for gender
--alias and join for customer address data
SELECT
[CustomerKey]
,a.[GeographyKey]
--,[CustomerAlternateKey]
--,[Title]
,[FirstName] as FirstName
--,[MiddleName]
,[LastName] as LastName
,concat(firstname, ' ', las... |
# Backprop-in-Numpy
Backpropagation algorithm implemented in pure Python + NumPy
For source code, have a look at .py files.
The notebook file contains example datasets and results. |
///
/// [Author] Alex (https://github.com/AlexV525)
/// [Date] 2020/8/19 10:34
///
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
typedef CNP<T extends ChangeNotifier?> = ChangeNotifierProvider<T>;
extension BuildContextExtension on BuildContext {
MediaQueryData get mediaQuery => M... |
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.PooledObjects;
using Pchp.CodeAnalysis.Semantics;
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Pchp.CodeAnalysis.Sym... |
# Call Log Prediction
## Best Model
__________
### 1-Randome forest
- Base model average CV score __0.646__
- Random search best model score __0.716__
`{'n_estimators': 2400,
'min_samples_split': 5,
'min_samples_leaf': 4,
'max_features': 'auto',
'max_depth': 10,
'bootstrap': True}`
- applying pca minimum 0.95 t... |
require File.expand_path('../../../spec_helper', __FILE__)
describe "Fixnum#|" do
it "returns self bitwise OR other" do
(1 | 0).should == 1
(5 | 4).should == 5
(5 | 6).should == 7
(248 | 4096).should == 4344
(0xffff | bignum_value + 0xf0f0).should == 0x8000_0000_0000_ffff
end
it "returns sel... |
<?php
namespace app\index\command;
use taskphp\Utils;
/**
* 测试任务
*/
class Demo{
/**
* demo任务入口
*/
public static function run(){
Utils::log('demo1任务运行成功');
//可以调用thinkphp内的json函数
//Utils::log(json(['message'=>'hello taskphp']));
}
} |
package lang.taxi.generators.java
import com.google.common.annotations.VisibleForTesting
import lang.taxi.TaxiDocument
import lang.taxi.annotations.DataType
import lang.taxi.annotations.Service
import lang.taxi.generators.SchemaWriter
import lang.taxi.types.Type
class TaxiGenerator(val typeMapper: TypeMapper = Defaul... |
module Shoppe
class SubscriberTransaction < ActiveRecord::Base
TYPES = ['invoice']
belongs_to :subscriber
end
end
|
module HealthSeven::V2_7
class Nds < ::HealthSeven::Segment
# Notification Reference Number
attribute :notification_reference_number, Nm, position: "NDS.1", require: true
# Notification Date/Time
attribute :notification_date_time, Dtm, position: "NDS.2", require: true
# Notification Alert Severity
attribute... |
package main
import (
"context"
"fmt"
"github.com/zeebe-io/zeebe/clients/go/pkg/pb"
"github.com/zeebe-io/zeebe/clients/go/pkg/zbc"
"os"
)
const ZeebeAddr = "0.0.0.0:26500"
/*
Sample application that connects to a cluster on Camunda Cloud, or a locally deployed cluster.
When connecting to a cluster in Camunda C... |
using System;
using System.Threading;
namespace CodingPractice
{
public static class DuplicatesInArray
{
public static void run()
{
int[] arr = {1, 3, 2, 5, 2, 1, 2, 2};
int arr_size = arr.Length;
printRepeating(arr, arr_size);
Thread.Sleep(1000);
}
private static void printRepeating(int[] arr,... |
//
// UIColor+WYHex.h
// WYSDKDemo
//
// Created by yons on 2019/4/24.
// Copyright © 2019年 yons. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UIColor (WYHex)
/**
* 获取颜色 含有alpha
*
* @param color 6位16进制字符串
* @param alpha 透明度
*
* @return 颜色
*/
+ (UIColor *)wy_colorWithHexString:(NSString *... |
configuration MSFT_xIisLogging_Rollover
{
Import-DscResource -ModuleName xWebAdministration
xIisLogging Logging
{
LogPath = 'C:\IISLogFiles'
Logflags = @('Date','Time','ClientIP','UserName','ServerIP')
LoglocalTimeRollover = $true
LogPeriod = 'Hourly'
LogFormat = 'W3... |
{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Hasura.RQL.Instances where
import Hasura.Prelude
import qualified Data.Aeson as J
import qualified Data.HashMap.Strict as M
import qualified Data.HashSet as S
import qualified Data.URL.Template ... |
"""
Base class for the Optimization Strategy.
The Optimization Strategy schedules which type of optimization is done in which order.
"""
import abc
from pyhybro import Problem
from pyhybro.OptimizationResult import OptimizationResult, ReferenceSet
from pyhybro.optimizer_base import OptimizerBase
class OptimizationMa... |
class Clown:
"""An illustration of a class statement. This class is not useful.
>>> Clown.nose
'big and red'
>>> Clown.dance()
'No thanks'
"""
nose = 'big and red'
def dance():
return 'No thanks'
class Account:
"""An account has a balance and a holder.
All accounts sha... |
import React, { useState } from 'react';
import cloneDeep from 'lodash/cloneDeep';
import * as yup from 'yup';
import { AnyObject } from 'yup/lib/types';
import Form from './Form';
import { IFieldAndLayoutProps, IFormSubmitReturnedType, IUseFormReturnedType } from './types';
import { yupResolver, FieldError } from './... |
# coding: utf-8
#
import json
import logging
import pprint
from typing import Any
logger = logging.getLogger("uiautomator2")
class Settings(object):
def __init__(self, d):
self._d = d
self._defaults = {
"wait_timeout": 20.0,
"xpath_debug": False,
"operation_d... |
# frozen_string_literal: true
require 'spec_helper'
describe CloudPayments do
describe '#config=' do
specify{ expect{ CloudPayments.config = 'config' }.to change{ CloudPayments.config }.to('config') }
end
it 'supports global configuration' do
CloudPayments.config.secret_key = "OLD_KEY"
CloudPayment... |
package com.interrupt.dungeoneer.statuseffects;
import com.interrupt.dungeoneer.entities.Actor;
import com.interrupt.managers.StringManager;
public class LevitateEffect extends StatusEffect {
public LevitateEffect() {
this(1800);
}
boolean ownerWasFloating = false;
public LevitateEffect(int time) {
this.nam... |
require 'acceptance/acceptance_helper'
feature 'Delete answer', '
Only the owner can remove the answer
' do
given(:user) { create(:user) }
given(:another_user) { create(:user) }
given(:question) { create(:question, user: user) }
given!(:answer) { create(:answer, question: question, user: user) }
scenario... |
# NLP example
## Required
- Python 3.7.1 (Anaconda Distribution recommended)
- NLTK
- BeautifulSoup
- html5lib
- matplotlib
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using KnowYourLimits.Strategies.LeakyBucket;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.HttpsPolicy;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extension... |
import 'date_month.dart';
///
/// 日模型 <br/>
///
/// Create by JsonYe<597232387@qq.com> on 2019/12
///
class DateDay extends DateMonth {
late int _day;
int get day => _day;
DateDay(int year, int month, [int day = 1])
: this.dateTime(DateTime(year, month, day));
DateDay.dateTime(DateTime time) : super.da... |
import csv
import io
import rospy
import svmutil
from babyrobot.emorec import config as emorec_config
from babyrobot.lib import utils as br_utils
def load_libsvm_model(model_file, scale_file=None, classes_file=None):
model = svmutil.svm_load_model(model_file)
classes = (parse_classes(classes_file)
... |
/**
* iconfont 仓库地址
* https://www.iconfont.cn/manage/index?manage_type=myprojects&projectId=1049577
*
*/
import React from 'react';
type IProps = {
name: string;
className?: string;
onClick?(e: any): void;
};
const CustomIcon = (props: IProps) => {
const { name, onClick, className } = props;
return (
<svg cl... |
/* Internal function declarations for Espressif SDK libphy functions.
These are internal-facing declarations, it is not recommended to include these headers in your program.
(look at the headers in include/espressif/ instead and use these whenever possible.)
Copyright (C) 2015 Espressif Systems. Derived from... |
# An Iterative Method for Structured Matrix Completion
This is the code associated with the paper: "An Adaptation for Iterative Structured Matrix Completion"
By Henry Adams, Lara Kassab, and Deanna Needell.
In the implementation of our code, we use parts of the code corresponding to the paper
"Iterative reweighted al... |
module Adomachi
class Base
BASE_URL = 'http://www.tv-tokyo.co.jp/adomachi/backnumber'
end
end
|
package com.tz.util;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
/**
* Created by Administrator on 2018/1/3 0003.
*/
public class DateUtil {
public static void main(String[] args) {
for(;;){
Date d = new Date();
System.out.println(d.... |
require 'hash_control/model'
describe HashControl::Model do
before :all do
class Comment
include ::HashControl::Model
require_key :author, :body, :date
permit_key :image
end
class Something
include ::HashControl::Model
require_key :id
permit_all_keys
end
# Th... |
import { TagSumEntity } from './../../../entity/TagSumEntity';
import { AppContext } from '../../../app/context';
import { InputType, Field } from "type-graphql";
import { Connection } from 'typeorm';
import { getPayloadUserId } from '../../../functional/token/tokenservice';
import { _unfollowTag } from './followTag';
... |
# Some Technical Notes
This is my small note of what I have done in the development.
## Loop condition at the bottom of loop
Loop condition was moved to the bottom of the loop.
For example, here is the `sum` function.
```c
int sum(int n)
{
int r = 0;
for (int i = 1; i <= n; ++i) {
r +=... |
const colors = {
lightgray: '#f6f6f0',
};
export const colorNames = {
emptyStateBackground: colors.lightgray,
};
|
#
# Distributed under the OSI-approved Apache License, Version 2.0. See
# accompanying file Copyright.txt for details.
#
# TestNullEngine.py
#
#
# Created on: Apr 11th, 2019
# Author: William F Godoy godoywf@ornl.gov
#
from mpi4py import MPI
import numpy as np
import adios2
# MPI
comm = MPI.COMM_WORLD
rank = c... |
UPDATE `UserEntity`
SET `userLastName` = ?
WHERE `UserEntity`.`userFirstName` = ?
{Params: [Doe, John]} |
package app.cash.backfila.service.runner
import app.cash.backfila.service.persistence.DbBackfillRun
import javax.inject.Inject
import misk.hibernate.Id
import org.slf4j.MDC
import wisp.logging.getLogger
interface BackfillRunnerLoggingSetupProvider {
fun <T> withLogging(backfillName: String, backfillId: Id<DbBackfil... |
<?php
namespace Squire\Models;
use Squire\Model;
class Country extends Model
{
public static $schema = [
'id' => 'string',
'calling_code' => 'string',
'capital_city' => 'string',
'code_2' => 'string',
'code_3' => 'string',
'continent_id' => 'string',
'curre... |
package utils
import game.state.dune_map._
import game.state.sector._
import game.state.regions.duneTerritoriesBySector
object TerritorySectors {
lazy val sectorsOnTerritory: Map[Territory, Set[Sector]] = {
getTerritoryToSector(duneTerritoriesBySector)
}
def aSectorOnTerritory(territory: Territory): Secto... |
#include <map>
#include <iostream>
#include <cstdlib>
#include <string>
#include <regex>
#include <fstream>
#include <vector>
#include <filesystem>
using namespace std;
map<string, string> paths{};
vector<string> tokens;
bool findbyregex(string line = "") {
if (line != "") {
try {
auto rxnorma... |
class PlanController < ApplicationController
def new
end
def index
if params[:plan_id]
@plan = ApRubySdk::Plan.retrieve(params[:plan_id])
end
end
def create
plan = ApRubySdk::Plan.create(
{
'interval' => 1,
'period' => ApRubySdk::Period::DAY,
'am... |
import cv2
import numpy as np
import numba as nb
import pandas as pd
from os.path import join, isdir, isfile
from os import makedirs
def plot_skeleton(ax, skel,
rcolor='orange', lcolor='green', alpha=1):
"""
:param ax:
:param skel:
:param rcolor:
:param lcolor:
:param alpha:
... |
import {CliCommandResult, CommandFunctionInput} from '../commands/cli-command';
/** This is for testing purposes only. */
export async function getAllCommandOutput(
commandImplementation: (inputs: CommandFunctionInput) => Promise<CliCommandResult>,
inputs: CommandFunctionInput,
): Promise<{stderr: string; stdo... |
-module(sipclient).
-export([dial/2]).
dial(Number, Dest) ->
{ok, Socket} = gen_udp:open(0),
Body = sdp:print(Dest),
From = "\"9532\" <sip:9532@nada.kth.se>",
To = "sip:" ++ Number ++ "@kth.se",
{Megasec, Sec, Microsec} = now(),
CallID = "2b6fb0320-" ++
integer_to_list(Megasec) ++ "-" ++
inte... |
#include <gl_sdl/common.hpp>
namespace gl_sdl
{
Result<GlSdl, std::string>
GlSdl::make_default(common::Logger& logger, char const* name, bool const fullscreen,
int const width, int const height)
{
SDLContext context = TRY_MOVEOUT(SDLGlobalContext::create(logger));
SDLWindow window = TRY_MOVE... |
/*
* Copyright (c) 2016. All rights reserved.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS".
* IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES.
*
* Author: Florin Bogdan Balint... |
'use strict';
var Logger = require('app/common/logger');
var Message = Backbone.Model.extend({
initialize: function() {
// Logger.module("UI").log("initialize a Message model");
},
defaults: {
fromId: "<id>",
toId: "<id>",
body: "<body>",
timestamp: "<timestamp>"
}
});
// Expose the class either via C... |
/* Picasso - a vector graphics library
*
* Copyright (C) 2015 Zhang Ji Peng
* Contact: onecoolx@gmail.com
*/
#ifndef _FAST_COPY_H_
#define _FAST_COPY_H_
#if ENABLE(FAST_COPY) && !CPU(ARM)
#if (CPU(X86) || CPU(X86_64)) && defined(__SSE2__)
#include "fastcopy_sse.h"
#define fastcopy(d, s, n) fastcopy_sse2_32((ui... |
#!/bin/bash
### STATICS ##########################################
NC='\033[0m'
RED="\033[0;31m"
GREEN="\033[0;32m"
YELLOW="\033[0;33m"
CYAN="\033[0;36m"
WORKTREE="github.com/zekroTJA/vplan2019"
TARGETDIR="./release"
OSES=(
# "darwin"
# "linux"
"windows"
)
ARCHS=(
"386 amd64"
# "386 amd6... |
# frozen_string_literal: true
require 'spec_helper'
require 'benchmark'
module Orbacle
RSpec.describe ConstantsTree, performance: true do
describe "performance" do
specify "#find_by_const_ref 1" do
tree = ConstantsTree.new
const = nil
1000.times do |i|
1000.times do |j|
... |
/**
* @license Apache-2.0
*
* Copyright (c) 2018 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... |
var expect = require('chai').expect
var path = require('path')
var server = require('../provider')
PactProvider({consumer: 'Projects Consumer', provider: 'Projects Provider'}, function () {
before(function (done) {
server.listen(8180, done)
})
var pactOpts = {
providerBaseUrl: 'http://localhost:8180',
... |
module Linearly
module Errors
# {StateNotReturned} is an error that is getting thrown when one of {Step}s
# in the {Flow} does not return an instance of +Statefully::State+.
# @api public
class StateNotReturned < RuntimeError
# Value that caused the error
#
# @return [Object]
#... |
import system from '@/config/defaultSettings'
let formatParams = obj => {
let s = []
for(let k of Object.keys(obj)){
s.push(`${k}=${encodeURIComponent(obj[k])}`)
}
return s.join('&')
}
const CAMERA_API = {}
//接口根地址
CAMERA_API.baseUrl = 'https://open.ys7.com/api/lapp/'
//目前实现的接口地址列表
CAMERA_API.urls = {
ge... |
import 'package:flare_flutter/flare_actor.dart';
import 'package:flutter/material.dart';
import 'package:ginkgo_mobile/src/utils/assets.dart';
import 'package:ginkgo_mobile/src/widgets/widgets.dart';
import 'package:base/base.dart';
class NotFoundWidget extends StatelessWidget {
final String message;
final Widget ... |
<?php
namespace CountryCity\Templates;
use CountryCity\API\Location;
/** @var Location $Location */
$Location = new Location('data/geo.json');
/** @var $data */
echo $Location->getAllCities($data['countryName']);
|
define(
[
"require",
"dojo/_base/declare",
"dojo/_base/lang",
"dojo/_base/window",
"dojo/_base/xhr",
"dojo/json",
"dojo/topic",
"./util/value",
"dojox/uuid/generateRandomUuid",
"dojo/Deferred"
],
function(
require,
declare,
lang,
window,
request,
js... |
module Trucker
def self.migrate(name, options={})
# Grab custom entity label if present
label = options.delete(:label) if options[:label]
unless options[:helper]
# Grab model to migrate
model = name.to_s.classify
# Wipe out existing records
model.constantize.delete_all
... |
/*!
Encoding formats used for Documents, Entries, and Queries.
The formats are all similar, and both Documents and Entries start with a
compression marker to indicate what compression was used, if any.
# Compression Marker
This is a single byte at the start of a Document or Entry indicating the
compression algori... |
RSpec.describe AutoReleaseNote do
it "has a version number" do
expect(AutoReleaseNote::VERSION).not_to be nil
end
context '.execute' do
subject do
AutoReleaseNote.execute(username: username)
end
before do
mock = double
allow(AutoReleaseNote::GitLog).to receive(:new).and_return(m... |
-- |
-- Module: Optics.Setter
-- Description: Applies an update to all contained values.
--
-- A @'Setter' S T A B@ has the ability to lift a function of type
-- @A -> B@ 'over' a function of type @S -> T@, applying the function
-- to update all the @A@s contained in @S@. This can be used to 'set'
-- all the @A@s to a... |
module Main where
import Control.Applicative
import Data.Attoparsec.Text (parseOnly)
import qualified Data.Char as Char
import Data.HashMap.Strict (HashMap)
import qualified Data.HashMap.Strict as HashMap
import Data.Ini (Ini (..), keyValueParser, parseI... |
# BMI-prediction-from-Human-Photograph

[](https://opensource.org/licenses/MIT)
## Requirements
```
Python >= 3.6, Keras, TensorFlow
```
## Jupyter Notebook
- For all the details, take... |
---
layout: default
categories: adventure
date: 2015-09-02 11:18:30
caption_header: Bat-dam
caption:
photo: 2015-09-02-20150902_105852.jpg
---
|
module SitemapBoiler
class URLComposer
def self.compose(*args)
args.select { |a| a && a != '' }.join('/')
end
end
end
|
<?php namespace console\commands;
use think\console\command\Command;
use think\console\Input;
use think\console\Output;
class BaseCommand extends Command
{
/**
* BaseCommand constructor.
* @param null|string $commandName
*/
public function __construct($commandName)
{
parent::__const... |
package handler
import (
"errors"
"fmt"
"github.com/s8sg/goflow/core/runtime"
"github.com/s8sg/goflow/core/sdk/executor"
)
func PartialExecuteFlowHandler(response *runtime.Response, request *runtime.Request, ex executor.Executor) error {
var stateOption executor.ExecutionStateOption
if request.RequestID == ""... |
/** @jsx jsx */
import { jsx, Styled, Flex, Container } from "theme-ui"
import { Separator } from "../ui-components"
import FeatureCard from "./FeatureCard"
import { graphql } from "gatsby"
export const fragment = graphql`
fragment featuresBlockFragment on WPGraphQL_Page_Flexlayouts_FlexibleLayouts_FeaturesBlock {
... |
#!/bin/bash
target=$1
if [[ -z $target ]]; then
target=/usr/local/bin
fi
if [[ ! -d $target ]]; then
echo "Folder $target does not exist"
exit 1
fi
url=`curl -s https://pypi.org/pypi/pickley/json | grep -Eo '"download_url":"([^"]+)"' | cut -d'"' -f4`
echo curl -sLo $target/pickley $url
|
<?php
namespace Dniccum\CustomEmailSender\Http\Controllers;
trait ApiController
{
protected $apiRoute;
/**
* @var string
*/
protected $key;
/**
* NebulaSenderController constructor.
*/
public function __construct()
{
$this->apiRoute = env('NEBULA_SENDER_API_ROUT... |
Write-Host "No alias for me plz!"
Clear-Host
Invoke-Expression "Clear-Host"
Clear-History |
/*
* "Copyright (c) 2010-2011 The Regents of the University of Michigan.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the ab... |
<?php
/** @var \Illuminate\Database\Eloquent\Factory $factory */
use App\Model;
use App\Event;
use Faker\Generator as Faker;
use Carbon\Carbon;
use Illuminate\Support\Facades\Config;
$factory->define(Event::class, function (Faker $faker) {
$classification = ['Seminar', 'Workshop'];
return [
'name' =>... |
namespace SFA.DAS.RoatpGateway.Domain
{
public class CriminalComplianceCheckDetails
{
public string PageId { get; set; }
public string QuestionId { get; set; }
public string Answer { get; set; }
public string FurtherQuestionId { get; set; }
public string FurtherAnswer { ... |
import * as mongoose from 'mongoose';
const messageSchema = new mongoose.Schema({
receiver: {type: String, trim: true, 'default':''}, // 받은 사람
sender: {type: String, trim: true, 'default':''}, // 보낸 사람
created_at: {type: Date, index: {unique: false}, 'default': Date.now},
read_at: {type: Da... |
use crate::CookTrait;
#[derive(Clone)]
pub struct GuangDongCook {}
impl CookTrait for GuangDongCook {
fn do_cooking(&self) {
println!("Guang Dong Cook");
}
}
|
// Prezence - Copyright 2019 The Innovation Group
// @author Kenneth Reilly <kenneth@innovationgroup.tech>
import 'package:flutter/material.dart';
class NavRoute {
const NavRoute({ this.name, this.widget, this.icon });
final String name;
final Image icon;
final Widget widget;
} |
package api
// EntityTable contains the most basic table functions
type EntityTable interface {
GetTableName() string
GetDBName() string
GetTable() interface{}
GetSession() interface{}
}
// EntityCreator contains a function to create new instances in the table
type EntityCreator interface {
Insert(data interface... |
; A145005: Values of n at which the number of roots of the function x+n*sin(x) increases.
; Submitted by Christian Krause
; 0,5,11,18,24,30,37,43,49,55,62,68,74,81,87,93
mul $0,6
mov $1,$0
add $0,5
div $0,20
trn $1,1
add $1,$0
mov $0,$1
|
<?php
namespace PicoFeed\Parser;
use SimpleXMLElement;
/**
* Interface ParserInterface
*
* @package PicoFeed\Parser
* @author Frederic Guillot
*/
interface ParserInterface
{
/**
* Find the feed url.
*
* @param SimpleXMLElement $xml Feed xml
* @param Feed $feed Feed object
*/
... |
export declare const breakpoints: {
xsMax: number;
sMax: number;
mMax: number;
lMax: number;
xlMax: number;
};
//# sourceMappingURL=breakpoints.d.ts.map |
package io.github.infeez.kotlinmockserver.dsl.http
import io.github.infeez.kotlinmockserver.dsl.http.context.MockContext
import io.github.infeez.kotlinmockserver.mock.Mock
/**
* Create list of mocks.
*
* This method helps to create a list of mocks easily.
* Also next you need to add this list to a MockServer!
*
... |
/**
* Created by zhaowei on 2018/8/2.
*/
import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root',
})
export class SessionService {
private timeRegx = /(([0-9]+)(s|m|h|d|w))/g;
private getTime(v, type) {
if (type === 's') {
return v * 1000;
} else if (type ... |
import { store } from '@/store';
import { Authenticator } from '@/views/sign-in/lib/authenticator/index';
import { loadGapiInsideDOM } from 'gapi-script';
// @ts-ignore
let { gapi } = window;
class GoogleAuth extends Authenticator {
static async signOut() {
try {
await GoogleAuth.loadGapi();
... |
# spaces
_Flexbox Grid Monorepo_
</br>
</br>
#### See individual packages for readme</br>
[React Styled Components](https://github.com/whilejoe/spaces/tree/master/packages/spaces-styled)</br>
[SCSS](https://github.com/whilejoe/spaces/tree/master/packages/spaces-scss)
|
require 'spec_helper'
describe "routing to interstate_lines" do
before :all do
@line = Factory(:interstate_line).to_param
@state = Factory(:state).to_param
end
it "should expose a list of the current game's interstate lines" do
{:get => "/interstate-lines"
}.should route_to(:action => "index",... |
#!/bin/sh
DIRNAME=`dirname "$0"`
# Setup APP_HOME
APP_HOME=`cd "$DIRNAME/.." >/dev/null; pwd`
# Read an optional running configuration file
if [ "x$RUN_CONF" = "x" ]; then
RUN_CONF="$DIRNAME/run.conf"
fi
if [ -r "$RUN_CONF" ]; then
. "$RUN_CONF"
fi
# Setup the JVM
if [ "x$JAVA" = "x" ]; then
if [ "x$JAV... |
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: SRequestUserInfo.proto
#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
#include "SRequestUserInfo.pb.h"
#include <algorithm>
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/once.h>
#include <google/protobuf/io/coded... |
---
title: 'React[003]样式'
date: '2020-01-29T18:44:00+08:00'
tags:
- React
- js
categories:
- web
---
```
npm i classnames -S
npm i styled-components -S
npm install -S prop-types
```
<!--more-->
src/index.js
```js
import React, { Component } from 'react';
import { render } from 'react-dom'
import c... |
#!/bin/bash
./generate-md.sh
cd $(dirname "$0")
echo "Building html output..."
bundle exec middleman build --clean || exit 1
echo "Deploying using now.sh..."
# Because we are deploying to /docs/broker/api, we need that to be our path for zeit - it doesn't strip pathnames
rm -rf now
mkdir now
mkdir now/docs
mkdir n... |
const path = require('path')
const minimist = require('minimist')
const jetpack = require('fs-jetpack')
const Runner = require('./runner')
var options = options_()
var root = root_(options)
inform(options)
let runner = new Runner()
if (options.clean) runner.clean(root)
if (options.compile) runner.compile(root)
if... |
process.env.LOG_LEVEL = "trace";
import { app, bind, dispose } from "@rotorsoft/eventually";
import { Calculator } from "../calculator.aggregate";
import { Commands } from "../calculator.commands";
import { Events } from "../calculator.events";
import * as schemas from "../calculator.schemas";
import { Chance } from "... |
# Docker container for markdownlint
## Using the docker image
To check a single file:
docker run --rm -v ${PWD}:/data mivok/markdownlint myfile.md
Or, to check all files in a directory:
docker run --rm -v ${PWD}:/data mivok/markdownlint .
## Building from a docker file
The following will tag and upload a... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.