text stringlengths 27 775k |
|---|
#r "System.Runtime"
using System;
using System.Net;
using System.Text;
using Newtonsoft.Json;
using Twilio.TwiML;
public static async Task<HttpResponseMessage> Run(HttpRequestMessage req, TraceWriter log)
{
log.Info("C# HTTP trigger function processed a request.");
var data = await req.Content.ReadAsStringAs... |
<?php
/**
* @see https://github.com/dotkernel/dot-queue/ for the canonical source repository
* @copyright Copyright (c) 2017 Apidemia (https://www.apidemia.com)
* @license https://github.com/dotkernel/dot-queue/blob/master/LICENSE.md MIT License
*/
declare(strict_types=1);
namespace Dot\Queue;
use Zend\Stdlib\Ab... |
(ns rate-limit-scheduler.core
(:require [clojure.java.io :as io]
[org.httpkit.server :as server]
[cheshire.core :as cheshire]
[rate-limit-scheduler
[split-queue :as sq]])
(:import [java.lang System Thread Runtime]))
(defn handle-get [channel]
(server/send! channel... |
package cmwell.analytics.util
import akka.actor.ActorSystem
import akka.http.scaladsl.model.HttpMethods.GET
import akka.http.scaladsl.model.{HttpRequest, Uri}
import akka.stream.ActorMaterializer
import com.fasterxml.jackson.databind.JsonNode
import scala.collection.JavaConverters._
import scala.concurrent.ExecutionC... |
// Copyright (c) 2021 Red Hat, Inc.
// Copyright Contributors to the Open Cluster Management project
package transforms
import (
"testing"
)
func TestTransformPolicyReport(t *testing.T) {
var pr PolicyReport
UnmarshalFile("policyreport.json", &pr, t)
node := PolicyReportResourceBuilder(&pr).BuildNode()
// Test... |
<?php
namespace App\Models;
use CodeIgniter\Model;
class Model_cie10 extends Model
{
protected $table = 'hcv_cie10';
protected $primaryKey = 'ID';
protected $allowedFields = ['LETRA', 'CATALOG_KEY', 'NOMBRE', 'CODIGOX', 'LSEX', 'LINF',
'LSUP', 'TRIVIAL', 'ERRADICADO', 'N_INTER', 'NIN', 'NINMTOBS', 'C... |
require "rubygems"
require "json"
require 'restclient'
require 'crack'
require 'io/console'
parse=""
ch=""
done=false
t2 =Thread.new do
loop do
temp=STDIN.getch
if temp=="\n"
done=true
break
end
parse+=temp
end
end
t=Thread.new do
loop do
if done==true
break
end
if p... |
package com.ruoyi.iot.model.ThingsModelItem;
import java.math.BigDecimal;
import java.util.List;
public class ReadOnlyModelOutput extends ThingsModelItemBase
{
private BigDecimal min;
private BigDecimal max;
private BigDecimal step;
private String unit;
private String arrayType;
private String... |
class UserActivator
attr_reader :user, :request, :session, :cookies, :message
def initialize(user, request, session, cookies)
@user = user
@session = session
@cookies = cookies
@request = request
@message = nil
end
def start
end
def finish
@message = activator.activate
end
pr... |
package com.kryszak.gwatlin.api.gamemechanics.model.profession
import com.google.gson.annotations.SerializedName
/**
* Training track type values
*/
enum class TrainingTrackType {
@SerializedName("Trait")
TRAIT,
@SerializedName("Skill")
SKILL
}
|
import * as fs from 'fs';
import * as path from 'path';
import * as rimraf from 'rimraf';
interface Options {
/**
* Current cache directory
* @defaultValue ./
*/
cacheRecordPath?: string;
/**
* cache hash
* @defaultValue node_modules/.cache
*/
cacheHash?: string;
/**
* cache max age
... |
package com.handstandsam.shoppingapp.mockaccount
import android.os.StrictMode
import com.github.tomakehurst.wiremock.WireMockServer
import com.github.tomakehurst.wiremock.client.MappingBuilder
import com.github.tomakehurst.wiremock.client.WireMock
import com.github.tomakehurst.wiremock.core.WireMockConfiguration.wire... |
const path = require('path')
const isEnvProduction = process.env.NODE_ENV === 'production'
const isEnvDevelopment = process.env.NODE_ENV === 'development'
const config = target => ({
mode: isEnvProduction ? 'production' : 'development',
// Stop compilation early in production
bail: isEnvProduction,
entry: ['.... |
{-# LANGUAGE NoImplicitPrelude #-}
module Mismi.ELB (
) where
|
library angular2.src.forms.directives.shared;
import "package:angular2/src/facade/collection.dart"
show ListWrapper, StringMapWrapper;
import "package:angular2/src/facade/lang.dart"
show isBlank, BaseException, looseIdentical;
import "control_container.dart" show ControlContainer;
import "ng_control.dart" show... |
#include "../../include/editor/CEditorActionsManager.h"
#include "../../include/editor/EditorActions.h"
#include "../../include/utils/Utils.h"
#include "../../include/utils/CFileLogger.h"
#include "stringUtils.hpp"
#if TDE2_EDITORS_ENABLED
namespace TDEngine2
{
CEditorActionsManager::CEditorActionsManager():
CBas... |
using Grumpy.DacpacMerge.Core.Interfaces;
namespace Grumpy.DacpacMerge.Core
{
public class PackageFactory : IPackageFactory
{
private readonly IModelFactory _modelFactory;
public PackageFactory(IModelFactory modelFactory)
{
_modelFactory = modelFactory;
}
... |
require "spec_helper"
module Xronor
class DSL
describe Default do
let(:default) do
described_class.new do
prefix "scheduler-"
timezone "Asia/Tokyo"
cron_timezone "UTC"
end
end
describe "#result" do
it "should parse Default DSL" do
... |
import math
import matplotlib.pyplot as plt
import funmath
import itertools
import collections
import numpy as np
from scipy.stats import gamma
def nCr(n,r):
f = math.factorial
return f(n) / f(r) / f(n-r)
def Prob(N,L):
s = range( int((N-L)/2), int((N+L)/2+1), 1) #range doesnt include end point
... |
/*
* (C) ActiveViam 2020
* ALL RIGHTS RESERVED. This material is the CONFIDENTIAL and PROPRIETARY
* property of ActiveViam. Any unauthorized use,
* reproduction or transfer of this material is strictly prohibited
*/
package com.activeviam.mac.statistic.memory;
import com.activeviam.mac.cfg.impl.ManagerDescriptio... |
# Header 1
## Header 2
Show a table
| # | Make | Model | Year |
| --- | --- | --- | --- |
| 1 | Honda | Accord | 2009 |
| 2 | Toyota | Camry | 2012 |
| 3 | Hyundai | Elantra | 2010 |
A bullet list
- One
- Two
- Three
A numbered list
1. foo
2. bar
3. wat
**Bold** ~~strike~~ _woow_
```js
functio... |
import { CommandInteraction, DMChannel, Role } from 'discord.js';
import { NotifyCommand } from '../../../interactions/notify';
import { ArgumentsOf } from '../../../types/ArgumentsOf';
import i18next from 'i18next';
import { replyWithError } from '../../../utils/responses';
import { EMOJI_ID_SHIELD_GREEN_SMALL, LIST_B... |
use 5.006; # our
use strict;
use warnings;
package Git::PurePerl::Walker;
our $VERSION = '0.004002';
# ABSTRACT: Walk over a sequence of commits in a Git::PurePerl repo
# AUTHORITY
use Moose qw( has );
use Path::Tiny qw();
use Module::Runtime qw( );
use Git::PurePerl::Walker::Types qw( GPPW_Repository GPPW_Meth... |
package com.github.damianreeves.ticketbroker.akka.server.web
import akka.http.scaladsl.model.StatusCodes
import akka.http.scaladsl.server.{Directives, Route}
trait SwaggerUISite extends Directives {
val route: Route = (get & pathPrefix("swagger")){
(pathEndOrSingleSlash & redirectToTrailingSlashIfMissing(Status... |
import { useState } from "react";
/**
* A custom hook for storing and handling the state for an array of selected categories
* @param defaultValue An array to be initialized as the default value
*/
const useFilterHook = (defaultValue: string[]) => {
const [selectedCategories, setSelectedCategories] = useState(def... |
# Runtime Concept Idiom example
This project implements the Runtime Concept Idiom, described by Sean Parent in
[this talk](https://www.youtube.com/watch?v=QGcVXgEVMJg), in the context of the
Command design pattern.
## Build
The project was tested with Visual Studio 2022 in Windows, and gcc-9.3 in Linux.
It has no dep... |
package qt
import (
"log"
"os"
"runtime"
"strings"
"sync"
"unsafe"
)
var (
Logger = log.New(os.Stderr, "", log.Ltime)
signals = make(map[unsafe.Pointer]map[string]unsafe.Pointer)
signalsJNI = make(map[string]map[string]unsafe.Pointer)
signalsMutex sync.Mutex
objects = make(map[unsafe.Pointer]... |
# Deserialization Error with MessagePack JavaScript Libraries
https://github.com/msgpack/msgpack-perl/issues/48
|
import { SnapshotOut, types } from 'mobx-state-tree'
import qs from 'qs'
import useSWR from 'swr'
import { ArtistDesc } from '@/models/Platform/Netease'
import { fetcher } from '../fetcher'
export function useArtistDesc(id: string) {
const { data, error } = useSWR<ArtistDescResponseSnapshot>(
`/artist/desc?${q... |
/**
* Tests for the 'view/view.js' file.
*/
// Do not warn if these variables were not defined before.
/* global module, test, equal, ok */
module("view");
test("Test listeners.", function() {
// create an image
var size0 = 4;
var imgSize0 = new dwv.image.Size(size0, size0, 1);
var imgSpacing0 = new ... |
---
title: "Christmas Card Dash: Locate Your Nearest Postbox with Node.js and the
Messages API"
description: So you’ve built a database for this year’s Christmas Card list,
printed the cards with custom xkcd cartoons based on each recipient’s
profession and mail-merged the lot. That’s a boring job automated and t... |
# frozen_string_literal: true
# Copyright 2019 Matthew B. Gray
#
# 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 applica... |
-- Deploy conduit:create-favorites to pg
-- requires: create-articles
-- requires: create-users
BEGIN;
CREATE TABLE IF NOT EXISTS favorites (
user__id INT REFERENCES users(id) ON DELETE CASCADE,
article__id INT REFERENCES articles(id) ON DELETE CASCADE
);
COMMIT;
|
// See LICENSE.Berkeley for license details.
// See LICENSE.SiFive for license details.
package freechips.rocketchip.tile
import Chisel.{defaultCompileOptions => _, _}
import freechips.rocketchip.util.CompileOptions.NotStrictInferReset
import Chisel.ImplicitConversions._
import chisel3.{DontCare, WireInit, withClock,... |
namespace NServiceBus.Hosting.Windows.LoggingHandlers
{
using NServiceBus.Hosting.Profiles;
/// <summary>
/// Handles logging configuration for the <see cref="Integration"/> profile.
/// </summary>
class IntegrationLoggingHandler : IConfigureLoggingForProfile<Integration>
{
pu... |
// Copyright 2020 GC (2012 ETC) Nabute and Nahom. All rights reserved.
// Use of this source code is governed by MIT license, which can be found
// in the LICENSE file.
part of abushakir;
///
/// The Ethiopian calendar is one of the the calendars which uses the solar
/// system to reckon years, months and days, even ... |
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.
// Layers
export * from './layers/Layer.js';
export * from './layers/Marker.js';
export * from './layers/Icon.js';
export * from './layers/AwesomeIcon.js';
export * from './layers/Popup.js';
export * from './layers/R... |
import React from 'react';
import NavbarQuery from '../query/navbarquery';
function Layout(){
return (
<NavbarQuery/>
)
}
export {Layout}; |
#include "fy.h"
#include "typy.h"
#include <assert.h>
y_Class::y_Class(void)
{
RodzajWej = 'B';
RodzajWyj = 'M';
OtherProcess = NULL;
}
void y_Class::LocalDestructor(void)
{
if(NextProcess != NULL)
{
NextProcess->LocalDestructor();
delete NextProcess;
NextProcess = NULL;
}
if(OtherProcess != NULL)
{
O... |
// Copyright (c) 2019, Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
// SPDX-License-Identifier: Apache-2.0
package com.digitalasset.app.bot
import com.daml.ledger.rxjava.components.LedgerViewFlowable
import com.daml.ledger.javaapi.data._
import com.digitalasset.app.LedgerClient
import ... |
namespace DynamicDecorator
{
public class Circle : IShape
{
private float radius;
public Circle(float radius)
{
this.radius = radius;
}
public void Resize(float factor)
{
radius *= factor;
}
public string Display()
{
return $"A circle with radius {radius}";
... |
package middleware
import (
"context"
"net/http"
"strings"
"github.com/dgrijalva/jwt-go"
log "github.com/sirupsen/logrus"
)
const (
// Store this as environment variable in the future
Secret = "the-todanni-secret"
// This isn't used anywhere... yet
Issuer = "todanni-user-servers"
// Encryption cost
Cost =... |
package com.fsh.common.widget.mpchart.render
import com.fsh.common.widget.mpchart.CombinedChartView
import com.github.mikephil.charting.animation.ChartAnimator
import com.github.mikephil.charting.charts.CombinedChart
import com.github.mikephil.charting.renderer.BubbleChartRenderer
import com.github.mikephil.charting.r... |
package de.qhun.declaration_provider.generator.typescript
import de.qhun.declaration_provider.domain.Declaration
import de.qhun.declaration_provider.domain.Documentation
data class NamespacedDeclaration(
override val name: String,
override val score: Int,
override val documentation: Documentation?,
ov... |
import { NgModule } from '@angular/core';
import {
NbActionsModule,
NbButtonModule,
NbCardModule,
NbCheckboxModule,
NbDatepickerModule,
NbIconModule,
NbInputModule,
NbRadioModule,
NbSelectModule,
NbUserModule,
NbSpinnerModule,
NbListModule
} from '@nebular/theme';
import { Th... |
package org.kie.server.services.api;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
... |
{-@ LIQUID "--reflection" @-}
{-@ LIQUID "--ple" @-}
{-@ LIQUID "--fuel=4" @-}
module PleSum where
{-@ reflect sumTo @-}
sumTo :: Int -> Int
sumTo n = if n <= 0 then 0 else n + sumTo (n-1)
{-@ test :: () -> { sumTo 5 == 15 } @-}
test :: () -> ()
test _ = ()
|
-- test connectionproperty() function
-- invalid property name, should return NULL
select connectionproperty('invalid property');
GO
select connectionproperty(NULL);
GO
-- valid supported properties
select connectionproperty('net_transport'),connectionproperty('protocol_type'), connectionproperty('auth_scheme'), conn... |
use super::*;
/// An item
///
/// The name might be a dummy name in case of anonymous items
#[derive(Debug, Clone, Eq, PartialEq, Hash)]
pub struct Item {
pub ident: Ident,
pub vis: Visibility,
pub attrs: Vec<Attribute>,
pub node: ItemKind,
}
#[derive(Debug, Clone, Eq, PartialEq, Hash)]
pub enum ItemK... |
package com.github.ferum_bot.bookreuse.di.components
import com.github.ferum_bot.bookreuse.di.modules.CreatingNewStuffActivityViewModelsModule
import com.github.ferum_bot.bookreuse.di.scopes.ViewModelsScope
import com.github.ferum_bot.bookreuse.ui.activity.CreatingNewStuffActivity
import com.github.ferum_bot.bookreuse... |
<?php
namespace Erfans\MaintenanceBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class ErfansMaintenanceBundle extends Bundle
{
}
|
import {
arrayBufferToBase64,
decryptStringWithPrivateKey,
encryptStringWithPublicKey,
exportPublicKeyAsSpki,
generateKeyPair,
publicKeyToCryptoKey,
} from "ezzy-web-crypto";
import { combineLatest, Observable, of } from "rxjs";
import { catchError, map, switchMap, tap } from "rxjs/operators";
import { ApiS... |
package com.desertkun.brainout.common.msg.server;
import com.desertkun.brainout.data.Map;
public class BlockAddMsg
{
public int x;
public int y;
public int layer;
public String data;
public int d;
public BlockAddMsg() {}
public BlockAddMsg(int x, int y, int layer, String data, String dime... |
require 'rails_helper'
# require 'jwt'
RSpec.describe Api::V1::PostsController, type: :controller do
describe 'any action' do
context 'when user not authorised' do
it 'should return error message' do
request.headers["Authorization"] = nil
resp = post :create
# p resp.body
e... |
// Copyright (C) 2019 European Spallation Source ERIC
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <fmt/format.h>
#include <gdgem/tests/HitGenerator.h>
#include <vector>
#include <cassert>
/// \todo Should not belong to gdgem but to common, reduction?
namespace Gem {
//
void HitGenerator::printHit... |
/*
Copyright 2021 KubeCube 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 applicable law or agreed to in writing, softwar... |
// This file is auto-generated, don't edit it. Thanks.
using System;
using System.Collections.Generic;
using System.IO;
using Tea;
namespace AntChain.SDK.BLOCKCHAIN.Models
{
// 蚂蚁链最新交易信息
public class BlockchainBrowserLatestTransaction : TeaModel {
// create_time
[NameInMap("create_time")]
... |
const path = require('path')
const webpack = require('webpack')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const WebpackMerge = require('webpack-merge')
const webpackConfig = require('./webpack.config')
module.exports = WebpackMerge(webpackConfig, {
devtool: '#source-map',
mode: 'development',
... |
#Subject: Configure Network and restart SQL Server instance
#Author: Harry Archibald
#Date: 27/04/2016
#v1.0 Initial release
param(
[Parameter(Mandatory=$True)]
[string]$HostName,
[Parameter(Mandatory=$True)]
[string]$InstanceName,
[Parameter(Mandatory=$True)]
[string]$Port
)
.\... |
// Copyright 2019 Fullstop000 <fullstop1005@gmail.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 appli... |
package francisco.visintini.mercadolibre.test.search
import android.os.Bundle
import android.view.View
import androidx.fragment.app.Fragment
import androidx.fragment.app.viewModels
import androidx.lifecycle.Observer
import androidx.navigation.fragment.findNavController
import androidx.recyclerview.widget.DividerItemDe... |
import { SiteClient } from 'datocms-client'
export default async function communitiesApi(req, res) {
if (req.method === 'POST') {
const TOKEN = process.env.NEXT_PUBLIC_API_DATOCMS_TOKEN_FULL
const modelId = process.env.NEXT_PUBLIC_API_DATOCMS_MODEL_ID
const client = new SiteClient(TOKEN)
const record... |
# This small script has been created to automate the task of
# changing the parche for the Encrl version.
#
# If the version is something like:
# version.number.parche
#
# For example
# 1.0.3
#
# This script modifies the 'parche' section to `parche=parche+1`
#
# The script works in the file version.txt by default
... |
package org.oppia.app.ongoingtopiclist
import android.content.Context
import android.content.Intent
import android.os.Bundle
import org.oppia.app.activity.InjectableAppCompatActivity
import javax.inject.Inject
/** Activity for ongoing topics. */
class OngoingTopicListActivity : InjectableAppCompatActivity() {
@Inje... |
export default {
EMAIL_IS_ALREADY_IN_USE: 'Bu email adresi zaten kullanılıyor.',
USER_NOT_FOUND: 'Kullanıcı bulunamadı.',
USER_NOT_ACTIVE: 'Kullanıcı deaktif.',
USER_NOT_LOGGED_IN: 'Lütfen giriş yapınız.',
USER_NOT_AUTHORIZED: 'Yetkisiz Kullanıcı',
USER_NOT_FOUND_FOR_THIS_ID: 'Kullanıcı bulunamadı.',
USE... |
// @flow
declare module 'material-ui' {
declare var exports: any;
}
|
/*
* Generated by class-dump 3.3.4 (64 bit).
*
* class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard.
*/
#import <DevToolsCore/PBXReference.h>
@class PBXContainerItemProxy, PBXFileType;
@interface PBXReferenceProxy : PBXReference
{
PBXContainerItemProxy *_remoteRef;
BOOL _... |
---
title: "オリジナルコミック “あぶないネコでんせつ”"
post_id: "2895"
date: "1992-05-01T00:00:00+09:00"
draft: true
tags: []
---
当時自分が描いていた初のストーリー物ギャグ漫画 “あぶないネコでんせつ” の1コマ。
ストーリーものとは名ばかりの、1 ~ 4P 程度の編成の事実上超短編ギャグ漫画だった。
左から、やさぐれ系悪ガキで主人公の “ミー”、主人公の仲間 4 人組の紅一点 “ミュー”、ガキ大将系悪ガキの “ニャン太”、現役殺し屋の “ミャー”。
残念ながら当時描いていたものは見つからず、このイラストは 2000 ~ 2001 年... |
namespace Ae.Freezer.Entities
{
/// <summary>
/// Describes the type of website resource.
/// </summary>
public enum WebsiteResourceType
{
/// <summary>
/// This resource is buffered text (as a string)
/// </summary>
Text,
/// <summary>
/// This resou... |
---
title: 'Random family photos'
default_image: mac-winter-2015.jpg
show_captions: true
---
The photos here are just random photos of my family. Some I have taken and some found on facebook. |
# NGO2.0 MiniProgram
- 🔍 NGO索引+地图
## Screenshots


|
# NJU-Graphics-Homework-2019
## 南京大学 2019年计算机图形学课程 CG2019 大作业
### 支持图元拖曳、定点滚轮旋转和缩放 基于Qt 不涉及opengl
[编译和使用手册.md,点击查看](./171860633_系统使用说明书.md)
### 试用 Emscripten, Qt-5.14.1
* 10M左右的WASM传输,薛定谔秒的加载,刷新之前,这网页是传还是没传过来呢?桌面端firefox(√)、Edge(√)、chrome(√),移动端MIUI自带浏览器(×)
[测试链接](http://Xuguodong1999.github.io/CG2019.html)
* 测试... |
<?php
declare(strict_types = 1);
namespace DemoApiContext\Domain\Workflow\Actor\Observer\Persistence;
use DemoApiContext\Domain\Entity\Actor;
use DemoApiContext\Domain\ValueObject\ActorVO;
use Exception;
use ProjetNormandie\DddProviderBundle\Layer\Domain\Generalisation\Observer\AbstractObserver;
use ProjetNormandie\D... |
package io.aigar.game.serializable
import com.github.jpbetz.subspace.Vector2
/**
* Serializable classes that represent the current state of a game. These are
* the classes that will be sent over the network, so they should follow the
* conventions of the API.
*/
case class Position(
x: Float,
y: Float
)
case... |
interface Digitaljs {
Circuit: any;
Monitor: any;
MonitorView: any;
IOPanelView: any;
transform: any;
engines: any;
}
declare var digitaljs: Digitaljs;
interface Document {
digitaljsInput: string;
simplifyDiagram: boolean;
layoutEngine: string;
simulationEngine: string;
workerURL: any;
}
|
#!/bin/bash
if [[ -n "${EC2_INIT}" && "${EC2_INIT}" == "true" ]]; then
if [[ -d '/user-data' ]]; then
rm /var/www/html/cli/user-data || true
cd /user-data
for k8s_secret in $(ls) ; do
echo "${k8s_secret}=$(cat $k8s_secret)" >> /var/www/html/cli/user-data
done
fi
/usr/local/bin/php -c /usr/lo... |
package com.github.greennick.properties.android
import android.app.Activity
import android.text.Editable
import android.text.TextWatcher
import android.widget.TextView
import com.github.greennick.properties.generic.MutableProperty
import com.github.greennick.properties.generic.Property
import com.github.greennick.prop... |
// Code generated by go-bindata. DO NOT EDIT.
// sources:
// migrations/sql/mysql/.gitkeep
// migrations/sql/mysql/5.sql
// migrations/sql/mysql/6.sql
// migrations/sql/mysql/7.sql
// migrations/sql/mysql/9.sql
// migrations/sql/postgres/.gitkeep
// migrations/sql/postgres/5.sql
// migrations/sql/postgres/6.sql
// migr... |
module Cuttings
class Railtie < Rails::Railtie
rake_tasks do
tasks_path = Rails.root.join('lib', 'seeds', 'tasks', '**', '*.rake')
Dir[tasks_path].each do |file|
load file
end
end
end
end
|
# -*- coding: utf-8 -*-
import numpy as np
from numba import jit
from numpy import fft
from load import *
##### Function to define inverse fft properly, with hermitian symmetries
##### the input will be f(kx,ky,kz), kx, ky and kz; the output will be the FT and
##### the axes x and y
@jit
def fft_fwd3d(fld): #we assu... |
import 'package:equatable/equatable.dart';
import 'package:grin_plus_plus/strings.dart';
class TransportType extends Equatable {
static const TransportType http = TransportType._(kHttpString);
static const TransportType tor = TransportType._(kTorString);
static const TransportType file = TransportType._(kFileStr... |
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/
package org.opensearch.indexmanagement.indexstatemanagement.action
import org.opensearch.common.io.stream.StreamInput
import org.opensearch.common.xcontent.XContentParser
import org.opensearch.common.xcontent.XContentParser.Token
impor... |
package com.github.htdangkhoa.nexterp.data.remote.stockcount.stockcount
import com.google.gson.annotations.SerializedName
data class NewStockCountRequest(
@SerializedName("name")
var name: String,
@SerializedName("location_id")
var location_id: Int,
@SerializedName("tag_ids")
var tag_ids: List... |
import org.gradle.plugin.use.PluginDependenciesSpec
val PluginDependenciesSpec.`openapi-generator-kotlin-jvm` get() = id("com.justai.plugins.internal.openapi") |
package org.seekloud.VideoMeeting.rtpServer.core
import akka.actor.typed.{ActorRef, Behavior}
import akka.actor.typed.scaladsl.{ActorContext, Behaviors, StashBuffer, TimerScheduler}
import org.slf4j.LoggerFactory
import org.seekloud.VideoMeeting.rtpServer.Boot.publishManager
import org.seekloud.VideoMeeting.rtpServer.... |
var express = require('express');
var router = express.Router();
var models = require('../models')
var ObjectId = require('mongodb').ObjectID;
router.get('/', async function(req, res, next) {
res.json({counters: await models.all.Counter.find()});
});
router.patch('/:id', async function(req, res, next) {
console.l... |
## usage
```bash
west build -t guiconfig
west build -b nrf52840_sensortag -- -DCONF_FILE=prj.conf
west build -b nrf52dk_nrf52832 -- -DCONF_FILE=prj.conf
west flash
```
## Documentation
https://www.homesmartmesh.com/docs/microcontrollers/nrf52/thread_sensortag/#tag_battery
|
# GraphQL-Server
Built a simple GraphQL Server and learnt about what it is used for and how to use it.
Node.js/Express CRUD backend using GraphQL and JSON-Server.
## Usage
-Install Dependencies
```bash
$ npm install
```
-Run JSON-Server (Port 3000)
```bash
$ npm run json:server
```
-Run GraphQL Server (Port 4000... |
<?php
$vendorDir = dirname(__DIR__);
return array (
'yiisoft/yii2-swiftmailer' =>
array (
'name' => 'yiisoft/yii2-swiftmailer',
'version' => '2.0.7.0',
'alias' =>
array (
'@yii/swiftmailer' => $vendorDir . '/yiisoft/yii2-swiftmailer',
),
),
'yiisoft/yii2-bootstrap' =>
array (
... |
#!/bin/bash
# start[默认] 启动 , stop 停止
CMD=$1
if [ -z $CMD ]; then
CMD=start
fi
# debug[默认] 前台启动, release 后台启动
MODE=$2
if [ -z $MODE ]; then
MODE=debug
fi
CONFIG=$3
if [ -z $CONFIG ]; then
CONFIG=config.lua
fi
SKYNET_EXTEND=$4
if [ -z $SKYNET_EXTEND ]; then
SKYNET_EXTEND=.
fi
TMP=$PATH
PATH=$TMP
uli... |
RSpec::Matchers.define :match_service_instance do |expected_service_instance|
problems = []
space = expected_service_instance.space
match do |actual_event|
unless actual_event.org_guid == space.organization_guid
problems << "event.org_guid: #{actual_event.org_guid}, service_instance.space.organization_... |
<?php
require "db.php";
session_start();
$action = $_POST["action"];
$session_user = $_SESSION['username'];
if($action == "showcomment"){
$post_query =mysqli_query($conn,"SELECT * From msg");
if($post_query){
while($row=mysqli_fetch_assoc($post_query)){
echo "<li><b>$row[uname]</b> : $row[msg]</li>... |
using Newtonsoft.Json;
namespace TradingApi.ModelObjects.Bitfinex.Json
{
public class BitfinexNewOrderPost : BitfinexPostBase
{
[JsonProperty("symbol")]
public string Symbol { get; set; }
[JsonProperty("amount")]
public string Amount { get; set; }
[JsonProperty("price")]
pu... |
---
company: p-o-ferries-gb
imo: 9169550
layout: ship
name: MS Oceana
outOfScope: false
routes: []
slug: ms-oceana-9169550
tags:
- ship
photo: /img/300px-MV_Oceana_passing_Calshot_Spit_light.JPG
unknownRoutes: true
wikipediaUrl: https://no.wikipedia.org/wiki/MS_%C2%ABOceana%C2%BB
---
|
pub struct Fern{
pub size:f64,
pub growth_rate:f64,
}
impl Fern{
pub fn grow(&mut self){
self.size *= 1.0 + self.growth_rate;
}
}
pub fn run_simulation(fern:&mut Fern,days:usize){
for _ in 0..days{
fern.grow();
}
}
#[cfg(test)]
mod tests {
#[test]
fn fern_simulati... |
# Contributing guidelines
- Open an issue before starting to implement a feature, so that it can be discussed and approved/rejected before you start working on it
- Always allow edits from maintainers on your pull requests
- Keep your code as clean as possible by following these tips:
- a long but descriptive functio... |
require "language_pack"
require "language_pack/rails41"
class LanguagePack::Rails42 < LanguagePack::Rails41
# detects if this is a Rails 4.2 app
# @return [Boolean] true if it's a Rails 4.2 app
def self.use?
rails_version = bundler.gem_version('railties')
return false unless rails_version
is_rails42 ... |
feature 'user can log in' do
let(:registered_user) {create(:user)}
before do
visit root_path
click_on 'Login'
end
describe 'user inputs correct credentials' do
it 'user can successfully log in' do
# login_as(registered_user, scope: :user)
fill_in "Email", with: registered_user.email... |
require 'i18n'
require 'yaml'
I18n.config.available_locales = :en
I18n.default_locale = :en
class CompanyNameNormalizer
COUNTRIES = YAML.load_file(__dir__ + '/countries.yaml').freeze
COUNTRY_SUBS = COUNTRIES.values.map { |c| '(' + c + ')' }
REGION_SUBS = %w[ASIA EUROPE UK].map {... |
// Libs
import { EntityManager } from "typeorm";
// Datasources
import { UserDataSource } from "./user";
export function createDataSources(manager: EntityManager) {
return {
users: new UserDataSource(manager)
}
}
export type DataSources = ReturnType<typeof createDataSources>; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.