text stringlengths 27 775k |
|---|
"""
`session_info`
"""
function session_info(filepath::String)
sessionREGEX = match(r"[a-zA-Z]{2}\d+_\d{6}[a-z]{1}",filepath); #the result is a regex object with several info
if isempty(sessionREGEX.match)
sessionREGEX = match(r"[a-zA-Z]{1}\d+_\d{6}",filepath);
if isempty(sessionREGEX.match)
... |
require 'spec_helper'
RSpec.describe Event, type: :model do
let(:featured_event) {FactoryBot.create(:featured_event)}
let(:non_featured_event) {FactoryBot.create(:non_featured_event)}
context "Publishable" do
it "should toggle featured" do
expect(non_featured_event.mark_as_featured).to be_truthy
... |
{-|
Module : KMonad.Core.Button
Description : The pure types and utilities for Button data.
Copyright : (c) David Janssen, 2019
License : MIT
Maintainer : janssen.dhj@gmail.com
Stability : experimental
Portability : non-portable (MPTC with FD, FFI to Linux-only c-code)
'Button's function as event-handl... |
<?php /**PATH C:\Soft\OpenServer\domains\MirVseh\resources\views/layouts/menu.blade.php ENDPATH**/ ?> |
require 'yaml'
require './Test'
def mkdir(*args)
args.each do |arg|
Dir.exist?(arg) || Dir.mkdir(arg)
end
end
def main
if ARGV.size != 3
puts "Use: #{$0} <cmd> <repetitions> <output_name>"
exit false
else
cmd = ARGV[0]
repetitions = ARGV[1]
output_name = ARGV[2]
end
output_dir = "... |
/******************************************************************************
* Copyright (C) 2014-2020 Zhifeng Gong <gozfree@163.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software... |
```tsx
import { Component, h } from '@stencil/core';
import { actionSheetController } from '@ionic/core';
@Component({
tag: 'action-sheet-example',
styleUrl: 'action-sheet-example.css'
})
export class ActionSheetExample {
async presentActionSheet() {
const actionSheet = await actionSheetController.create({
... |
# -*- encoding : utf-8 -*-
Rails.application.config.middleware.use OmniAuth::Builder do
provider :google_oauth2, AppConfig.google_apps.client_id, AppConfig.google_apps.secret,
{
scope: 'userinfo.email,userinfo.profile',
approval_prompt: "auto",
access_type: "online",
hd: AppConfig.google_a... |
public CodeableReference(CodeableConcept cc) {
super();
setConcept(cc);
}
public CodeableReference(Reference ref) {
super();
setReference(ref);
} |
using FluentAssertions;
using FluentValidation.TestHelper;
using GetIntoTeachingApi.Models;
using GetIntoTeachingApi.Models.Crm;
using GetIntoTeachingApi.Models.Crm.Validators;
using GetIntoTeachingApi.Services;
using Moq;
using System;
using System.Collections.Generic;
using System.Linq;
using Xunit;
namespace GetIn... |
using System;
using Xunit;
namespace Librame.Extensions.Tests
{
public class GuidExtensionsTests
{
[Fact]
public void AsShortStringTest()
{
var g = Guid.NewGuid();
Assert.NotEmpty(g.AsShortString());
}
[Fact]
public void CombIdTest()
... |
use std::result;
use std::error;
use std::fmt;
#[derive(Debug)]
pub enum Error {
// The buffer is too small. The first field is the needed number of bytes in the buffer,
// the second field is the available amount of bytes in the buffer.
BufferTooSmall(usize, usize),
Encoding(Box<error::Error>),
D... |
export enum TokenType {
Number = "Number",
Identifier = "Identifier",
Add = "+",
Subtract = "-",
Multiply = "*",
Divide = "/",
Exponentiate = "^",
Absolute = "Absolute",
LeftParentheses = "LeftParentheses",
RightParentheses = "RightParentheses",
Whitespace = "Whitespace",
} |
# Title
Intro
## Chapter 1
Intro
### Subsection 1.1
#### Subsection 1.1.1
##### Subsection 1.1.1.1
###### Lowest level
Text
##### Next subsection 1.1.1.2
More text
|
package execute
import (
"context"
"math"
"testing"
"github.com/influxdata/flux"
"github.com/influxdata/flux/plan"
planspec "github.com/influxdata/flux/plan/plantest/spec"
"go.uber.org/zap/zaptest"
)
func TestExecuteOptions(t *testing.T) {
type runWith struct {
concurrencyQuota int
memoryBytesQuota int64... |
## Todo
* Pass to `ocrmypdf` for OCR text
* Support custom page width
* Optionally download page images without creating PDF
* Improve image URL extraction
* Rewrite in Python (?)
|
package com.larryhsiao.clotho.storage
import com.larryhsiao.clotho.database.SingleConn
import com.larryhsiao.clotho.database.sqlite.MemorySQLiteConn
import org.junit.jupiter.api.Assertions
import org.junit.jupiter.api.Test
import java.lang.Exception
/**
* Test for [DbCeres]
*/
class DbCeresTest {
/**
* Che... |
import torch
import torch.optim as optim
import time
import argparse
from dataset import CamLocDataset
from network import Network
import util
parser = argparse.ArgumentParser(
description='Train scene coordinate regression using target scene coordinates.',
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
... |
import test from 'ava'
test('optional chain function call', (t) => {
const obj = {
a: {
b: {
c: function () {
return this.foo
},
foo: 2,
},
foo: 1,
},
}
t.is(obj?.a?.b?.c(), 2)
})
|
#!/usr/bin/perl
use lib "../../mecab-perl-0.996/src/.libs";
use lib $ENV{PWD} . "/blib/lib";
use lib $ENV{PWD} . "/blib/arch";
use MeCab;
use Getopt::Std;
getopts("hf:u:i:");
if ($opt_h){
print <<EOF;
usage: perl search.pl [-h] [-d db] [-q query] [-n n]
-h : show this message
-d : database
-q : query
-u :... |
import { Readable, Writable } from 'stream';
import { EventEmitter } from 'events';
export class FfmpegCommand extends EventEmitter {
inputSrc: string | Readable;
outputDst: string | Writable;
input(source: string | Readable): this {
this.inputSrc = source;
return this;
}
inputFormat(format: string... |
-- Name: FindTagsInQuery
-- Schema: posda_queries
-- Columns: ['tag']
-- Args: ['name']
-- Tags: ['meta', 'test', 'hello', 'query_tags']
-- Description: Find all queries matching tag
select
tag from (
select name, unnest(tags) as tag
from queries) as foo
where
name = ? |
const { promisify } = require('util');
const redisClient = require('../../loaders/redisClient');
const setAsync = promisify(redisClient.set).bind(redisClient);
const getAsync = promisify(redisClient.get).bind(redisClient);
const delAsync = promisify(redisClient.del).bind(redisClient);
const mgetAsync = promisify(redis... |
using System.Collections.Generic;
using System.Linq;
using Newtonsoft.Json;
using Vostok.Airlock.Logging;
namespace Vostok.Frontier.Dto
{
public class StackFrame
{
[JsonProperty("functionName")]
public string FunctionName { get; set; }
[JsonProperty("fileName")]
public string ... |
class SamlAuthenticationsController < ApplicationController
skip_before_action :verify_authenticity_token
def create
user = User.from_saml_omniauth(request.env['omniauth.auth'])
if user
session[:user_id] = user.id
session[:auth_type] = "saml"
redirect_to admin_auctions_needs_attention_pat... |
import { Component, OnDestroy, OnInit } from '@angular/core';
import { Validators } from '@angular/forms';
import { MatDialog } from '@angular/material/dialog';
import {
Friend,
FriendQuery,
FriendService,
GameServer,
GameServerQuery,
GameServerService,
Group,
GroupInvitation,
GroupInvitationQuery,
... |
---
title: "My idiotic post"
date: 2020-07-05
---
What a jerky site is this GitHub.
|
<?php
namespace Kaitai\Struct\Tests;
class DefaultEndianExprExceptionTest extends TestCase {
/**
* @expectedException \RuntimeException
* @expectedExceptionMessage Unable to decide on endianness
*/
public function testDefaultEndianExprException() {
DefaultEndianExprException::fromFile(se... |
<?php
// Generated by ZF2's ./bin/classmap_generator.php
return array(
'Cliente\Module' => __DIR__ . '/Module.php',
'Cliente\Controller\IndexController' => __DIR__ . '/src/Cliente/Controller/IndexController.php',
// 'Cliente\Framework\TestCase' => __DIR__ . '/tests/ZendSkeletonM... |
module PerimeterOfSquaresInRectangle where
-- | Get the sum of perimeters of fibonacci squares (5 kyu)
-- | Link: https://biturl.io/FibRect
-- | My original solution (using only ord)
perimeter :: Integer -> Integer
perimeter n = 4 * sum (take (1 + fromInteger n) fibs)
where
fibs = 1 : 1 : zipWith (+) fibs (tail fi... |
#!./perl
BEGIN {
chdir 't' if -d 't';
@INC = '../lib';
require './test.pl';
}
plan (109);
sub expected {
my($object, $package, $type) = @_;
print "# $object $package $type\n";
is(ref($object), $package);
my $r = qr/^\Q$package\E=(\w+)\(0x([0-9a-f]+)\)$/;
like("$object", $r);
if ("... |
library belatuk_json_serializer.reflection;
import 'dart:mirrors';
import '../belatuk_json_serializer.dart';
const Symbol hashCodeSymbol = #hashCode;
const Symbol runtimeTypeSymbol = #runtimeType;
typedef Serializer = dynamic Function(dynamic value);
typedef Deserializer = dynamic Function(dynamic value, {Type? outp... |
// Licensed to Finnovation Labs Limited under one or more agreements.
// Finnovation Labs Limited licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Security.Cryptography.X509Certificates;
using FinnovationLabs.OpenBanking.Libr... |
---
title: "Virtual Prototyping"
linkTitle: "Virtual Prototyping"
date: 2017-01-05
weight: 4
description: >
Simulation is necessary for building robots
---
|
/*
* 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, software
* dis... |
/*
* UserNew Messages
*
* This contains all the text for the UserNew component.
*/
import { defineMessages } from 'react-intl';
export default defineMessages({
header: {
id: 'app.containers.UserNew.header',
defaultMessage: 'This is UserNew container !',
},
dialogButtons: {
yesButtonLabel: 'Guarda... |
<?php
namespace App\Http\Controllers;
use File;
use App\Pages;
use App\Document;
use App\User;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
class DocumentsController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
... |
using Esquio.Model;
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
namespace System
{
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
public static class StringExtensions
{
public static JsonSerializerOptions _serializ... |
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.ApplicationParts;
using Microsoft.AspNetCore.Mvc.Controllers;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Signum.Engine;
using Signum.Engine.Dynamic;
using Signum.Entities.Dynamic;
using Signum.Utilities;
using System;
... |
//! Hopefully some helpful functions and other stuff for making
//! [`sysctl(2)`](https://man.openbsd.org/sysctl.2) calls on OpenBSD.
//!
//!```text
//! _____
//! \- -/ ________
//! \_/ \ / \
//! | O O | < sysctl! )
//! |_ < ) 3 ) \________/
//! / \ ... |
module Plover where
import Dictionary
import Keys
import Sounds
import Steno.Alphabet
import Stroke
import qualified Keys.Left as L
import qualified Keys.Right as R
plover =
[Entry "{*+}" [stk Hash]
,Entry "{*($c)}" [stk R.D <> stk R.Z <> stk Hash]
-- ,Entry "" [stk R.Z <> stk Hash]
,Entry "{^}{-|}" [k <> p <... |
<?php
namespace App\myClasses;
use App\myClasses\JunkBlock;
class JunkFunction{
private $startLine;
private $endLine;
private $blocks;
private $blockCount;
private $linesIndicies;
private $numberOfLines;
private $blocksRanges;
public function __construct(){
$this->blocks = array();
$this->blockCount = 0;
$this->nu... |
export default {
text: {
color: '#FFFFFF',
fontSize: 20,
fontFamily: 'Microsoft yahei',
fontWeight: 500,
},
rollingInterval: 3,
width: 320,
height: 50,
left: 500,
top: 500
} |
namespace DesignPatterns.Adapter
{
public class ExecuteAdapter
{
public static void Execute()
{
var targetLog = new TransactionService(new Logger());
targetLog.ExecuteTransaction();
var adapteeLog = new TransactionService(new LogAdapter(new LogNetMasterServi... |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using DG.Tweening;
using System;
using System.Xml.Linq;
namespace LWFrameworkStep {
public class StepControl_Animator : StepControl_Base
{
private Animator animator;
private string oldAnimName;
private float ... |
package errfmt
import (
"context"
"fmt"
"net/http"
"runtime"
"strings"
"testing"
"github.com/stretchr/testify/assert"
)
func TestEchoTrans(t *testing.T) {
msg := EchoTrans(context.Background(), "zh", "foo")
assert.Equal(t, msg, "foo")
}
func TestErrorGen(t *testing.T) {
errNotFound := Register(http.Status... |
module.exports = {
sort: "asc", // 排序
titleMode: "default", // 标题模式
titleMap: {}, // 标题映射
nav: false, // 导航栏
sidebarDepth: 1, // 标题深度
collapsable: false, // 折叠
collapseList: [], // 折叠列表
uncollapseList: [], // 不折叠列表
} |
package recharts.shape.curve
external interface Point {
var x: Number
var y: Number
}
|
import css from "./App.module.less"
import React, { useEffect, useState } from "react"
import { AppContext, IImageData } from "../../index"
import JSZip from "jszip"
import { saveAs } from "file-saver"
import { div2Canvas } from "../../helpers/helpers"
import Loader from "../loader/Loader"
import { Stack } from "@cher-... |
using System;
using System.Collections.Generic;
namespace Wanderer.Compilation
{
public abstract class BaseExpression
{
public string Expression {get;set;}
public string OperandA {get; protected set; }
public double? ConstA {get; protected set;}
public string Compara... |
export function parseDomain(ensName : string) : string [] {
return ensName.split(/\.(.*)/).slice(0, 2);
}
export const ensNameElementRegex = /^[a-z0-9](\-*[a-z0-9]+)*$/;
export const isValidEnsNameElement = (ensNameElement: string) => {
return ensNameElementRegex.test(ensNameElement);
};
|
<?php
namespace App\Repositories\Contracts;
// holds all the methods that get implemented in the repository
interface IDesign
{
public function applyTags($id, array $data);
public function addComment($designId, array $data);
} |
package mounter
import (
"fmt"
"os"
"github.com/yandex-cloud/k8s-csi-s3/pkg/s3"
)
const (
geesefsCmd = "geesefs"
)
// Implements Mounter
type geesefsMounter struct {
meta *s3.FSMeta
endpoint string
region string
accessKeyID string
secretAccessKey string
}
func newGeeseFSM... |
#
# Copyright (C) 1998, 1999 Ken MacLeod
# XML::Grove::PerlSAX is free software; you can redistribute it and/or
# modify it under the same terms as Perl itself.
#
# $Id: PerlSAX.pm,v 1.3 1999/08/17 15:01:28 kmacleod Exp $
#
use strict;
package XML::Grove::PerlSAX;
use UNIVERSAL;
use Data::Grove::Visitor;
sub new {
... |
using System;
using System.Windows.Input;
using MvvmCross.Core.Navigation;
using MvxSamples.Validation.Core.Common;
using MvvmValidation;
using MvvmCross.Core.ViewModels;
using MvvmCross.Platform;
using MvxSamples.Validation.Core.Services;
namespace MvxSamples.Validation.Core.ViewModels
{
public class SigninViewMo... |
require "test_helper"
class UserMailerTest < ActionMailer::TestCase
include UserTestHelper
def setup
@user = User.create( valid_user )
@user.activation_token = User.new_token
end
def test_account_activation
mail = UserMailer.account_activation(@user)
assert_equal "Account activation", mail.su... |
require 'raml/method'
describe Raml::Method do
describe '.new' do
subject { Raml::Method.new('delete') }
its(:method) { should == 'delete' }
end
describe '#title' do
let(:documentation) { Raml::Documentation.new }
before { documentation.title = 'the title' }
subject { documentation.title }
... |
import json
import os
import sys
mergename = sys.argv[1]
folder_name = 'results/' + mergename
testbed = False
fragments = sorted(os.listdir(folder_name))
# for fragment in fragments:
# fragname = fragment.split('.')[0]
# print("Analyzing the following files: ")
# print("Folder name: " + fragment)
# ... |
@file:JsModule("@chakra-ui/styled-system/dist/esm/config/color")
package com.github.mpetuska.khakra.styledSystem.config
import com.github.mpetuska.khakra.styledSystem.core.Parser
import react.RProps
public external interface ColorProps : RProps {
/**
* The CSS `color` property
*/
public var textColor: dyna... |
If enough interest:
- DESCRIBE_COMMANDLINE('name','string') would be trivial to add so that --usage has optional descriptions
- other command-line syntax (like DOS uses, perhaps?)
- as long as the prototype has () in the values, allow them to be implied on input for complex values
- allow subscript on keywords, li... |
use crate::{Expression, TranscendentalExpression};
impl Expression {
pub fn pow(self, exponent: Expression) -> Self {
if let Expression::Constant(exponent) = exponent {
if exponent == 0.0 {
return Expression::Constant(1.0);
}
if exponent == 1.0 {
... |
<?php
namespace Pushword\Core\Service;
use Vich\UploaderBundle\Mapping\PropertyMapping;
//implements NamerInterface, ConfigurableInterface
final class VichUploadPropertyNamer extends \Vich\UploaderBundle\Naming\PropertyNamer
{
public function name($object, PropertyMapping $mapping): string
{
return s... |
<?php
namespace Rake;
interface HttpExceptionInterface
{
public function getHttpCode();
} |
import isString from "lodash/fp/isString";
import get from "lodash/fp/get";
import times from "lodash/fp/times";
import cloneDeep from "lodash/fp/cloneDeep";
import isInteger from "lodash/fp/isInteger";
import {
paginatedPath,
getPreviousItem,
getNextItem,
calculateSkip,
} from "./utils";
import type { PathPr... |
# Super Cute Dogs
This is a Test-Project for using Vue / Webpack / HTML / CSS etc.
To see the site live visit [https://super-cute-dog.herokuapp.com/](https://super-cute-dog.herokuapp.com)
Images come from [here](https://dog.ceo/dog-api/).
## Run
Run dev-server:
`yarn dev`
Create build:
`yarn build`
|
using System;
using System.Text;
using System.Threading.Tasks;
using Microsoft.ServiceBus.Messaging;
namespace EventHubSender
{
class Program
{
static string eventHubName = "{YOUR_EVENT_HUB_NAME}";
static string connectionString = "{YOUR_SENDER_CONNECTION_STRING}";
static void Main(string[] args)
... |
package Perl6Org::Binaries;
use 5.026;
use Mojo::Base -base;
use Mojo::Collection qw/c/;
use File::Glob qw/bsd_glob/;
use File::Spec::Functions qw/catfile/;
use Mojo::File qw/path/;
use Perl6Org::Binaries::Bin;
use Perl6Org::Binaries::Ver;
has 'binaries_dir';
sub all {
my ($self, $product, $platform_filter) = @... |
package org.hedbor.evan.dndgen.ui
import org.hedbor.evan.dndgen.ui.builder.CharacterBuilderWizard
import tornadofx.App
import tornadofx.launch
fun main(args: Array<String>) = launch<DndGenApp>(args)
class DndGenApp : App(CharacterBuilderWizard::class) |
#!/bin/bash
raml2html iataaa.raml > index.html
if [ $? -eq 0 ]; then
nohup xdg-open index.html >/dev/null 2>&1
fi |
{-# LANGUAGE CPP, ForeignFunctionInterface #-}
module Hopfield.Images.ConvertImage (
loadPicture
, CBinaryPattern (..)
) where
import Data.Word
import Foreign.C
import Foreign.Ptr
import Foreign.Storable
import Foreign.Marshal.Array
#include "Images/convertImage.h"
-- From: http://www.haskell.org/haskellwiki/FFI_... |
// Copyright 2021 SMS
// License(Apache-2.0)
#include "Window.h"
#include "Image.h"
#include <cassert>
#include <glad/glad.h>
#include <GLFW/glfw3.h>
namespace fs = std::filesystem;
Window::Window(const std::string& title, Vector2i size, bool fullscreen)
{
auto monitor = glfwGetPrimaryMonitor();
cons... |
# -*- encoding: utf-8 -*-
require File.expand_path('../../../../spec_helper', __FILE__)
require File.expand_path('../fixtures/common', __FILE__)
describe "Rubinius::Mirror::String#byte_index with Fixnum" do
it "returns 0 for index 0 of an empty String" do
string_mirror("").byte_index(0).should == 0
end
it "... |
package typingsSlinky.babylonjs.legacyMod
import org.scalablytyped.runtime.StObject
import scala.scalajs.js
import scala.scalajs.js.`|`
import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, JSBracketAccess}
@JSImport("babylonjs/Legacy/legacy", "Size")
@js.native
class Size protected ()
exte... |
---
layout: index
title: Mathematics
subject: Mathematics
category: index
chapter: 0
section: 0.0
tag: empty
icon: widgets
--- |
Rails.application.routes.draw do
mount Occson::Rails::Engine => "/occson-rails"
end
|
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\Message;
class PageController extends Controller
{
//
/*public function messageSave(Request $request)
{
dd("check");
$message = new Message;
$message->name = $request->get('name');
... |
package com.example.pathplantool.Helpers
fun makeAPFPathArray(previousArray: FloatArray, coordinateX: Float, coordinateY: Float): FloatArray {
val newArray = previousArray.copyOf(previousArray.size + 2)
/*if (newArray.size == 4){
newArray[0]=coordinateX
newArray[1]=coordinateY
newArray... |
package com.demo.api.transfer.store;
import java.util.Objects;
import java.util.Optional;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.TimeUnit;
public class EventStore<T> {
private final BlockingQueue<T> eventSource;
public EventStore(BlockingQueue<T> eventSource) {
this.ev... |
; ModuleID = 'llvm-link'
source_filename = "llvm-link"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct._IO_FILE = type { i32, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, %struct._IO_marker*, %struct._IO_FILE*, i32, i3... |
class Retries{
int x = 10; // Global Variable
int y = 20; // Global Variable
void sum(){
int x = 50; // Local
x = x + y;
print(x);
}
void multiply(){
x = x * y;
print(x);
}
} |
class AddNombreEstablecimientoToProviderProfile < ActiveRecord::Migration
def up
# otherwise new not-null fields will complain
say_with_time "WARNING: wiping all provider items, provider clients and provider profiles" do
ProviderItem.unscoped.destroy_all
ProviderClient.unscoped.destroy_all
P... |
package com.alexanderstrada.replica.space2d
object Calc {
def clamp(d: Double, min: Double, max: Double) = Math.max(min, Math.min(d, max))
def square(d: Double) = d * d
def distance(origin: Vector2d, target: Vector2d) =
Math.sqrt((target - origin).map(square).sum)
}
|
import {
Body,
Controller,
Get,
Post,
Request,
UseGuards,
} from '@nestjs/common';
import { UserService } from './user.service';
import { LocalAuthGuard } from '../../guards';
import { AuthTokenDto, RegisterUserDTO } from '../../dtos';
@Controller('user')
export class UserController {
constructor(privat... |
from rb.complexity.complexity_index import ComplexityIndex
from rb.complexity.syntax.dep_enum import DepEnum
from rb.core.lang import Lang
from rb.core.text_element import TextElement
from rb.complexity.index_category import IndexCategory
from rb.complexity.measure_function import MeasureFunction
from rb.core.text_elem... |
//! This is an ffi wrapper around rftrace-frontend, enabling calling it from c code
//! You can find a usage example in the [repository](https://github.com/tlambertz/rftrace/examples/c)
//! A lot of documentation can be found in the parent workspaces [readme](https://github.com/tlambertz/rftrace).
use rftrace_frontend... |
#pragma once
#include <limits>
#include <iomanip>
#include <iostream>
#include <But/assert.hpp>
#include <But/Log/Backend/FieldInfo.hpp>
#include <But/Log/Backend/NonPrintableTrimmer.hpp>
#include <But/Log/Field/FormattedString.hpp>
namespace But
{
namespace Log
{
namespace Destination
{
namespace detail
{
struct Str... |
---
title: Publications
layout: page
---
<script type="text/javascript">
function toggle_visibility(id) {
var elem = document.getElementById(id);
if(elem.style.display == 'block') {
elem.style.display = 'none';
} else {
collapse_all();
elem.style.display = 'block';
}
}
function collapse_all() {
var elems = d... |
package io.cloudsoft.mapr;
import brooklyn.enricher.basic.SensorPropagatingEnricher;
import brooklyn.entity.Entity;
import brooklyn.entity.basic.AbstractEntity;
import brooklyn.entity.basic.BasicConfigurableEntityFactory;
import brooklyn.entity.group.Cluster;
import brooklyn.entity.group.DynamicCluster;
import brookly... |
/**
* Function with invalid function definition order due to charge
* @bg empty
* @acl *
* user_username faas_tester deny
* user_username faas_tester2 deny
* user_username faas_tester3 deny
* @param {string} test
* @charge 10
* @returns {string}
*/
module.exports = (test, callback) => {
return callback(null, '... |
package com.mdreamfever.fstar.controller
import com.mdreamfever.fstar.config.FStarEncrypt
import com.mdreamfever.fstar.model.*
import com.mdreamfever.fstar.repository.ChangelogRepository
import com.mdreamfever.fstar.repository.FStarUserRepository
import com.mdreamfever.fstar.repository.ScoreRepository
import io.swagge... |
import React, { useEffect } from "react"
import styled from "styled-components"
import { Button, Grid, TextField } from "@material-ui/core"
import { useAuth, useDatabase } from "hooks"
import { Content } from "ui"
function Dashboard() {
// const { login } = useAuth()
const { schedules, fetchSchedules } = useDatabas... |
package com.risk.riskmanage.engine.model.response.param;
import lombok.Data;
import java.util.List;
@Data
public class RuleOutputResponse {
/**
* 规则的统计信息
*/
private List<NodeStrategyOutputResponse> statisticsOutputList;
/**
* 规则信息
*/
private List<RuleInfoOutputResponse> ruleInfo... |
import 'dart:collection';
import 'package:at_utils/at_logger.dart';
var logger = AtSignLogger('RegexUtil');
Iterable<RegExpMatch> getMatches(RegExp regex, String command) {
var matches = regex.allMatches(command);
return matches;
}
HashMap<String, String> processMatches(Iterable<RegExpMatch> matches) {
var par... |
"""
API for god gear ordering site
Created on 14/06/2021 (dd/mm/yyyy)
"""
from flask import Flask, request
from flask_sqlalchemy import SQLAlchemy
from random import randint
from json import load
from time import strftime, sleep
with open("json_files/config.json") as config_file:
config_dict: dict = load(config_f... |
# Inhibitors types
For inhibitors you can choose different types :
- `MESSAGE_COMMAND` : Inhibitors for commands message.
- `APPLICATION_COMMAND` : Inhibitors for application commands (slash-commands or context-menus).
- `BUTTON` : Inhibitors for buttons.
- `SELECT_MENU` : Inhibitors for select-menus.
- `ALL` : I... |
import {Apollo} from 'apollo-angular';
import {Component} from '@angular/core';
import {FormControl, FormGroup} from '@angular/forms';
import {Router} from '@angular/router';
import {ifValid, NaturalAlertService, validateAllFormControls} from '@ecodev/natural';
import {UserService} from '../../../admin/users/services/u... |
"""Merge vector of UnitRanges into Vector of UnitRanges that do not overlap."""
function merge(ranges::Vector{UnitRange{Integer}})
# prevent unwanted mutation
ranges = copy(ranges)
# Skip if there's nothing to merge
length(ranges) <= 1 && (return ranges)
merged_ranges = Vector{UnitRange{Integer}}(... |
/*
Copyright © Bryan Apellanes 2015
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Xml.Serialization;
using Newtonsoft.Json;
using YamlDotNet.Serialization;
namespace Bam.Net.Data.Schema
{
public class SchemaManagerResult
{
publ... |
SUBROUTINE CNTAB1(NN,NI,NJ,CHISQ,DF,PROB,CRAMRV,CCC)
PARAMETER (MAXI=100,MAXJ=100,TINY=1.E-30)
DIMENSION NN(NI,NJ),SUMI(MAXI),SUMJ(MAXJ)
SUM=0
NNI=NI
NNJ=NJ
DO 12 I=1,NI
SUMI(I)=0.
DO 11 J=1,NJ
SUMI(I)=SUMI(I)+NN(I,J)
SUM=SUM+NN(I,J)
11 ... |
// Copyright 2015 Yahoo Inc.
// Licensed under the terms of the Apache version 2.0 license. See LICENSE file for terms.
package tbin
import (
"io/ioutil"
"testing"
)
func TestTBinMarshalEncodeForceReflect(test *testing.T) {
data := polyline()
enc := NewEncoder(nil)
enc.EncodeReflect(data)
err := enc.Error()
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.