text stringlengths 27 775k |
|---|
# jQuery Maphilight Rails Gem
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'maphilight-rails'
```
And then execute:
```
$ bundle install
```
## Usage
Add to your app/assets/javascripts/application.js
```
//= require jquery.maphilight
```
Or for the minified version
```
... |
from django.urls import path
from rest_framework import permissions
from drf_yasg import openapi
from drf_yasg.views import get_schema_view
from weatherapi.apps.weather.rest_api.base.views.export_weather_forecasts import (
ExportWeatherForecastsSearchAPIView,
)
from weatherapi.apps.weather.rest_api.base.views.fetc... |
import { TaskUI } from "../../util/task/types";
export const initial = (): TaskUI => ({
text: "Detecting environment..."
});
export const completed = (): TaskUI => ({
text: "Detected environment"
});
|
<?php
/**
* MIT License
*
* Copyright (c) 2020 Wolf Utz<wpu@hotmail.de>
*
* 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 without restriction, including without limitation the rights
... |
require "aws-sdk-s3"
module Brutalismbot
module S3
class Client
attr_reader :prefix, :client
def initialize(bucket:nil, prefix:nil, client:nil)
@client = client || Aws::S3::Client.new
@bucket = bucket || ENV["S3_BUCKET"] || "brutalismbot"
@prefix = prefix || ENV["S3_PREFIX"] ... |
// Copyright ©2020 The go-latex Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package mtex
import (
"math"
"testing"
"github.com/go-latex/latex/internal/fakebackend"
)
func TestParse(t *testing.T) {
const (
dpi = 72
f... |
#!/bin/sh
RUBY="$HOME/.rvm/rubies/ruby-1.9.2-p320/bin/ruby"
export GEM_HOME="$HOME/.rvm/gems/ruby-1.9.2-p320"
export GEM_PATH="$HOME/.rvm/gems/ruby-1.9.2-p320:$HOME/.rvm/gems/ruby-1.9.2-p320@global"
echo "-----------------------------"
cd ~/weekly_report_bot
$RUBY ./time.rb
$RUBY ./send-email.rb
|
# VgApiService @Injectable Service
Service that controls all media objects inside `vg-player` element.
This service is created by the element `vg-player` when it is instantiated. On component initialization, `vg-player` will register all medias inside of it but you can also register elements outside of `vg-player` el... |
# stylegan2-ada-lightning
Simplified pytorch-lightning port of [StyleGAN2-ADA](https://github.com/NVlabs/stylegan2-ada).
Configuration provided with hydra config file `config/stylegan2.yaml`. Once configured, train with:
```bash
python trainer/train_stylegan.py wandb_main=True
```
Configuration can be overriden wi... |
package no.nav.su.se.bakover.database.person
import no.nav.su.se.bakover.common.UUID30
import no.nav.su.se.bakover.database.DbMetrics
import no.nav.su.se.bakover.database.hentListe
import no.nav.su.se.bakover.database.withSession
import no.nav.su.se.bakover.domain.Fnr
import java.util.UUID
import javax.sql.DataSource
... |
#!/bin/sh
export ASSUME_ALWAYS_YES=YES
pkg install virtualbox-ose-additions
pkg install xorg
pkg install kde
sysrc moused_enable=yes dbus_enable=yes hald_enable=yes kdm4_enable=yes |
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using Roslyn.Compilers;
using Roslyn.Compilers.CSharp;
namespace Nake.Magic
{
class FairyDust
{
readonly Compilation compilation;
readonly IDictionary<string, string> sub... |
package surbl
import "testing"
var goodSlice = []string{
"google.com", "amazon.com", "yahoo.com", "gmail.com", "walmart.com",
"stanford.edu", "intel.com", "github.com", "surbl.org", "wikipedia.org",
}
// Example spam websites
// (http://freakipedia.net/index.php5?title=Spam_Site_List)
var spamSlice = []string{
"s... |
require "activerecord_time_scopes/railtie"
module ActiverecordTimeScopes
extend ActiveSupport::Concern
module ClassMethods
def created_before(time)
time = time.created_at if time.is_a?(ActiveRecord::Base)
where('created_at < ?', time)
end
def created_after(time)
time = time.created_... |
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Azure.WebJobs.Host;
using Microsoft.Extensions.Logging;
using Moq;
namespace DarkLoop.Azure.Functions.Authorize.Tests.Mocks
{
class FunctionExecutingContextMock : Mock<FunctionExecutingContext>
{
public FunctionExecutin... |
import mapboxgl from "mapbox-gl";
import { MapLegTypeColor, MapLegTypes, MapLegLineTypeColor, MapTripLegLineTypes } from "../config/map-colors";
import { LegType } from "../trip";
import { TripLegDrawType, TripLegLineType, TripLegPropertiesEnum } from "../types/map-geometry-types";
import { StopPointType } from "../t... |
#include<stdio.h>
#include<string.h>
#include<time.h>
const int MAXL = 2*1024*1024+10;
const int BLOCKSIZE = 20000;
const int MAXBLOCK = MAXL/BLOCKSIZE*2+100;
int min(int a,int b){return a<b?a:b;}
int freelist[MAXBLOCK];
int freepos;
int newnode(){
return freelist[freepos++];
}
void delnode(int t)... |
package net.craftal.web.controller.common
import controllers.AssetsFinder
import javax.inject._
import net.craftal.web.controller.{ActionWithNavigation, NavigationContext}
import net.craftal.web.presenter.common.CommonViewPresenter
import org.webjars.play.WebJarsUtil
import play.api.mvc._
import scala.concurrent.Exec... |
using System.ComponentModel.DataAnnotations;
namespace CoreApi.Models
{
public class ValidateRequest
{
[Required]
public string token { get; set; }
[Required]
public string aplicationId { get; set; }
[Required]
public string endPoint { get; set; }
[Requi... |
var MongoClient = require('mongodb').MongoClient;
var url = "mongodb://localhost:27017/CongressTrackerDB";
module.exports = {
get: function (id, num, callback) {
MongoClient.connect(url, function(err, db) {
if (err) throw err;
db.collection("legislators-sp").find({member_id:id}).toArray(functio... |
/*
* sbt
* Copyright 2011 - 2018, Lightbend, Inc.
* Copyright 2008 - 2010, Mark Harrah
* Licensed under Apache License 2.0 (see LICENSE)
*/
package sbt.internal
import org.specs2.mutable.Specification
class AggregationSpec extends Specification {
val timing = Aggregation.timing(Aggregation.defaultFormat, 0, _... |
package com.islamassem.utils
/*
*
*
public static String formatDate(Date date){
return getDateOnlyFormatter().format(date);
}
public static SimpleDateFormat getDateOnlyFormatter() {
return getDateOnlyFormatter == null
?getDateOnlyFormatter =new SimpleDateFormat("dd MMMM yyyy... |
package JAVA_AM_20220404;
import java.util.Scanner;
public class A2 {
static int[] num;
static boolean[] visited;
static StringBuilder sb = new StringBuilder();
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int M = sc.nextInt();
sc.close();
num = n... |
package util
import "testing"
func TestMax(t *testing.T) {
if Max(-2, 5) != 5 {
t.Error("Invalid result")
}
}
func TestContrain(t *testing.T) {
if Constrain(-3, -1, 3) != -1 {
t.Error("Expected", -1)
}
if Constrain(2, -1, 3) != 2 {
t.Error("Expected", 2)
}
if Constrain(5, -1, 3) != 3 {
t.Error("Expec... |
---
title: We're holding the 2021 Ergo Summit!
date: 2021-01-15T07:28:03.404Z
subtitle: To help spread the word we're giving away 100 ERG for the best tweet
about Ergo Summit. Result on next friday. All the necessary information on the
website
link: https://www.youtube.com/watch?v=zG-rxMCDIa0&ab_channel=ErgoPlatfor... |
import {Person} from './person.model';
import {Agreement, BrokerageAccount, ClientRequest, Passport, Transaction} from '..';
export interface Client extends Person {
passport: Passport;
agreement: Agreement;
requests: ClientRequest[];
transactions: Transaction[];
brokerageAccount: BrokerageAccount;... |
<?php
namespace App\Http\Livewire\Posts;
use App\Models\Like;
use App\Models\Post;
use Livewire\Component;
class IndexPosts extends Component
{
public $posts;
protected $listeners = [
'refresh' => '$refresh'
];
public function mount($posts)
{
$this->posts = $posts;
}
/**
* Add post to favorites.
*/... |
#pragma once
#include <vector>
#include <memory>
#include "helpers.h"
struct ExpressionExecutionEngine;
struct QueryUpdateOperation;
/**
* Represents an executor for an update operation
*/
class UpdateOperationExecutor {
private:
VirtualTable& mTable;
QueryUpdateOperation* mOperation;
std::vector<std::unique_pt... |
package com.jc.api.endpoint
package object flight {
type FlightPlanId = Long
type FlightStepId = Long
type FlightOrderId = Long
}
|
const headerKeys = {
force: 'force',
hostname: 'target-host',
port: 'target-port',
protocol: 'target-proto',
ttl: 'ttl',
wait: 'wait'
}
class Config {
constructor () {
this._header_prefix = 'cp'
}
set headerPrefix (value) {
if (value) {
this._header_prefix = value
}
}
get head... |
#!/bin/bash
cd ../../
docker build -t antaki/cat-mood-producer . |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
namespace ApertureLabs.Selenium.Css
{
/// <summary>
/// Represents a css function.
/// </summary>
public class CssFunction : CssValue
{
#region Constructor
/// <summary>
... |
unit U_FrmDlgIncluirAlterarFatura;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
MaskEdit, Buttons, U_Fatura, U_Utils;
type
{ TFrmDlgIncluirAlterarFatura }
TFrmDlgIncluirAlterarFatura = class(TForm)
btnOk: TSpeedButton;
BtnCancelar: T... |
package bg.coinche.lang;
public enum LANGNAME {
ENGLISH, ARABIC, FRENCH
}
|
# jQuery wrapper for diffDOM
Updates the elements HTML by diffing.
## Dependencies
- [jQuery](https://jquery.com)
```html
<script src="//code.jquery.com/jquery-1.11.3.min.js" type="text/javascript"></script>
```
- [diffDOM](https://github.com/fiduswriter/diffDOM)
```html
<script src="//cdn.jsdelivr.net/diffdom/0... |
from _2017 import d03_spiralmemory
import unittest
class TestSpiralMemory(unittest.TestCase):
def test_coordSequence_distances(self):
coord = d03_spiralmemory.coordSequence()
print(coord)
for i in range(10000):
x, y = next(coord)
dist = d03_spiralmemory.spiralDistan... |
package com.nimbusframework.nimbuslocal.webserver.console
import com.nimbusframework.nimbuslocal.LocalNimbusDeployment
import org.junit.Ignore
import org.junit.Test
class Server {
@Test
fun startServer() {
val localDeployment = LocalNimbusDeployment.getNewInstance(
""
)
... |
---
layout: documentation
title: Window.js | ImageBitmap
constructors:
- ImageBitmap
class-name: ImageBitmap
class-methods:
- decode
object-name: imageBitmap
object-properties:
- height
- width
object-methods:
- encode
---
ImageBitmap
===========
An `ImageBitmap` represents an image texture in GPU memory, t... |
use bracket_algorithm_traits::prelude::Algorithm2D;
use bracket_geometry::prelude::Point;
use num_rational::Rational32;
use std::{collections::HashSet, iter::Map, ops::RangeInclusive};
enum Cardinal {
North,
East,
South,
West,
}
struct Quadrant {
cardinal: Cardinal,
origin: Point,
}
impl Qu... |
/// A Dart SDK to interact with DooZ ooPLA product (IP-BT gateway) and enable control over DooZ mesh n/w.
library dooz_gateway_sdk;
export 'src/constants.dart' show LogLevel;
export 'src/dooz_gateway.dart';
export 'src/exceptions/errors.dart';
export 'src/models/models.dart';
|
import { render } from '@testing-library/svelte';
import Stack from '../../src/layout/Stack/Stack.svelte';
test('stack creation', () => {
const { container, getByText } = render(Stack, { id: 'stack' });
expect(container.querySelector('#stack')).toBeInTheDocument();
});
|
package com.stripe.rainier.ir
trait CompiledFunction {
def numInputs: Int
def numGlobals: Int
def numOutputs: Int
def apply(inputs: Array[Double],
globals: Array[Double],
outputs: Array[Double]): Unit
}
object CompiledFunction {
def apply(inputs: Seq[Parameter],
irs: Seq[... |
//===- PhismTransforms.cc ---------------------------------------*- C++ -*-===//
//
// This file implements the registration interfaces for all Phism passes.
//
//===----------------------------------------------------------------------===//
#include "phism/mlir/Transforms/PhismTransforms.h"
#include "phism/mlir/Trans... |
apt update
apt-get upgrade
apt-get -y install python3
apt-get -y install python-pip python-dev libffi-dev libssl-dev
pip install --yes "pywinrm>=0.3.0"
apt-add-repository --yes --update ppa:ansible/ansible
apt install -y ansible |
import Model from '../models/document';
import FieldModel from './field-model';
export default class FieldModels extends FieldModel {
public arraySymbol: symbol;
public Model: any;
public symbol: any;
constructor (basePath: any, path: any, model: Model, options: any, internal = false) {
super(basePath, path,... |
declare @LabEncounter varchar(50) = (select top 1 Id from lookupitem where Name = 'Lab-encounter')
insert into PatientEncounter
select pmv.PatientId, @LabEncounter, pmv.Id, pmv.start, pmv.start, 205, 0, 1, ord.createdate, null,0
from ord_laborder ord inner join patientmastervisit pmv on ord.PatientMasterVisitId = pmv... |
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\User;
use Exception;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Validator;
use Auth;
use App\Models\Profile;
use App\Models\Contact;
class AuthController extends Controller
{
public function __construct()... |
=head1 LICENSE
Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute
Copyright [2016-2020] EMBL-European Bioinformatics Institute
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obta... |
using System.Collections.Generic;
using FubuCore.Reflection;
namespace FubuMVC.Core.Projections
{
/// <summary>
/// Used internally
/// </summary>
/// <typeparam name="TParent"></typeparam>
/// <typeparam name="T"></typeparam>
public class ExternallyFormattedValueProjector<TParent, T>... |
import { ParamSet } from 'common-sk/modules/query';
import { PageObject } from '../../../infra-sk/modules/page_object/page_object';
import { ParamSetSkPO } from '../../../infra-sk/modules/paramset-sk/paramset-sk_po';
import { QueryDialogSkPO } from '../query-dialog-sk/query-dialog-sk_po';
import { PageObjectElement } f... |
#include "illuminate.hpp"
TEST_CASE(EXPECT_NE_UNLABELED) {
EXPECT_NE_UNLABELED(1,2)
EXPECT_NE_UNLABELED(1,1)
EXPECT_NE_UNLABELED(0,0)
}
|
using BitTools.Core.Model;
using Microsoft.CodeAnalysis;
namespace BitTools.Core.Contracts
{
public interface IBitConfigProvider
{
string GetSolutionFilePath(Workspace workspace);
BitConfig GetConfiguration(Workspace workspace);
string Version { get; set; }
}
}
|
package com.programmerdan.minecraft.simpleadminhacks.hacks.basic;
import com.programmerdan.minecraft.simpleadminhacks.SimpleAdminHacks;
import com.programmerdan.minecraft.simpleadminhacks.framework.BasicHack;
import com.programmerdan.minecraft.simpleadminhacks.framework.BasicHackConfig;
import com.programmerdan.minecr... |
function Component() {
return () => <Counter onClick={value => value + prompt("Increment:")} />;
}
|
#include "Util/Visitor.h"
namespace Util
{
Visitor::~Visitor()
{ }
}
|
/*************************************************************************
* 文件名称 :XlsExport.cs
* 描述说明 :导出EXCEL2003
*
* 创建信息 : create by liuhuisheng.xm@gmail.com on 2012-11-10
* 修订信息 : modify by (person) on (date) for (reason)
*
* 版权信息 : Copyright (c) 2013 厦门纵云信息科技有限公司 www.zoewin.com... |
# About
# Folders
## src/session
Package for handling pseudo authentication, restrict access and maintains list / sate of connected users
## src/schedule
package to provide an easy way to schedule actions (from connectors) throught bot interface :
* dedicated dialog to list / add / remove schedule
* generic functions... |
// 【43】【Cherno C++】【中字】C++的对象生存期(栈作用域生存期)
// 在C++中,我们可以做到在堆中分配对象,同时做到像栈一样
// 在超出作用域后自动删除
// 通过使用标准库中的unique_ptr,一个作用域指针
#include <iostream>
#include <string>
class Entity
{
public:
Entity()
{
std::cout << "Created Entity!" << std::endl;
}
~Entity()
{
std::cout << "Destroyed Entity... |
<x-navbar/>
<div style="margin-top: 30px;">
<section class="main-content columns is-fullheight">
<x-sidebar/>
<x-container/>
</section>
</div>
<x-footer/>
|
-- Up
CREATE TABLE `portfolios` (
id INTEGER PRIMARY KEY AUTOINCREMENT,
username STRING NOT NULL, -- perhaps add an index here as we scale?
ticker STRING NOT NULL,
company STRING NOT NULL,
region STRING NOT NULL,
high NUMERIC NOT NULL,
low NUMERIC NOT NULL,
open NUMERIC NOT NULL,
c... |
const testAccounts = {
"ft": {
"login": "fda_ft@rosauto.ru",
"password": "fdafdafda123",
},
"Stage": {
"login": "fda_stage@rosauto.ru",
"password": "fdafdafda123",
}
};
const String prefix = '/sedd/api';
//user
const String login = '/api/login';
const String getUser = '/api/getUser';
const Str... |
#include "MainWindow.h"
#include <QApplication>
#include <QSettings>
#include <QScreen>
#include <QPushButton>
#include <QMenuBar>
#include <QVBoxLayout>
#include <QSplitter>
#include <QMessageBox>
#include "core/SettingsManager.h"
#include "processes/ProcessesView.h"
#include "utilization/gpu/GPUUtilizationWorker.... |
void draw_comet(float angle)
{
float r, comet_x, comet_y, screen_x, screen_y;
r = hale_bopp_r(angle);
comet_x = r * cosine(angle);
comet_y = r * sine(angle);
screen_y = comet_x_to_screen_y(comet_x);
screen_x = comet_y_to_screen_x(comet_y);
printf("Comet position (%f deg): %.1... |
use crate::{ValidationResult, Validator};
/// A default validator which checks for mismatched quotes and brackets
pub struct DefaultValidator;
impl Validator for DefaultValidator {
fn validate(&self, line: &str) -> ValidationResult {
if line.split('"').count() % 2 == 0 || incomplete_brackets(line) {
... |
import React, { useState } from 'react';
import { DayClickEventHandler, DayPicker } from 'react-day-picker';
export default function App() {
const bookedDays = [new Date(2021, 5, 8), new Date(2021, 5, 9)];
const bookedStyle = { color: 'tomato' };
const handleDayClick: DayClickEventHandler = (day, { booked }) =>... |
// ellipoid pj_set_ell.c
var SIXTH = 0.1666666666666666667;
/* 1/6 */
var RA4 = 0.04722222222222222222;
/* 17/360 */
var RA6 = 0.02215608465608465608;
var EPSLN = 1.0e-10;
var Ellipsoid = require('./constants/Ellipsoid');
exports.eccentricity = function(a, b, rf, R_A) {
var a2 = a * a; // used in geocentric
var b2... |
# Further references
Here, we provide a collection of relevant links provided by our research group:
- The original BigEarthNet (S2) paper {cite:t}`BEN`
- The BigEarthNet-S1 publication + the recommended 19-class nomenclature {cite:t}`BEN19labels`
## Pretrained models
Every repository includes code to re-run the tra... |
// Flutter imports:
import 'package:flutter/material.dart';
// Package imports:
import 'package:responsive_builder/responsive_builder.dart';
// Project imports:
import 'package:logan_boisvert_website/widgets/navigation/navigation_bar_desktop.dart';
import 'package:logan_boisvert_website/widgets/navigation/navigation_... |
package notebook
import akka.actor.{Terminated, _}
import scala.collection.mutable
class Router extends Actor with ActorLogging {
import Router._
private val actors = mutable.Map.empty[Any, ActorRef]
private val keys = mutable.Map.empty[ActorRef, mutable.Set[Any]]
private val negotiator = context.actorOf(... |
#pragma once
#include <memory>
// A class for querying whether certain things should be done, given the
// type of map.
class IMapTypeQuery
{
public:
virtual bool should_update_depth() const = 0;
virtual ~IMapTypeQuery() {};
};
using IMapTypeQueryPtr = std::shared_ptr<IMapTypeQuery>;
|
fn main() {
windows::build!(
Windows::Win32::WindowsAndMessaging::*,
Windows::Win32::KeyboardAndMouseInput::*,
Windows::Win32::MenusAndResources::*,
Windows::Win32::SystemServices::{
GetModuleFileNameW,
LoadLibraryW,
FreeLibrary,
GetPro... |
from django.shortcuts import render
from django.http import JsonResponse
from rest_framework import viewsets
from rest_framework.response import Response
def hello_world(request):
return JsonResponse({"msg": "Hello New World from Server GrandCore.org!"})
class HelloWorldViewSet(viewsets.ModelViewSet):
"""
... |
package com.dat3m.dartagnan.program.memory;
import com.dat3m.dartagnan.expression.ExprInterface;
import com.dat3m.dartagnan.expression.IConst;
import com.dat3m.dartagnan.expression.IExpr;
import com.dat3m.dartagnan.expression.processing.ExpressionVisitor;
import com.dat3m.dartagnan.program.Register;
import com.dat3m.d... |
<?php
declare(strict_types=1);
namespace App\Tests\RelationshipVoter;
use App\RelationshipVoter\AbstractVoter;
use App\RelationshipVoter\UserRole as Voter;
use App\Service\PermissionChecker;
use App\Entity\UserRole;
use Mockery as m;
use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface;
class User... |
/// A quoted datum.
class Quote {
/// Constructs as a quote.
Quote(this.datum);
/// The quoted datum.
dynamic datum;
}
|
/*
* Copyright (c) 2020 Christopher Boustros <github.com/christopher-boustros>
* SPDX-License-Identifier: MIT
*/
// This script is linked to the Frames game object
using UnityEngine;
/*
* The purpose of this class is to set the positions and widths of the frames that surround the game area.
* The purpose of the ... |
package com.kunalapk.smartrecyclerview.listener
import android.view.View
interface OnItemClickListener<T> {
fun onItemClick(view: View?, model : T?)
} |
namespace MdlpApiClient.DataContracts
{
using System.Runtime.Serialization;
/// <summary>
/// Список записей:
/// 8.8.1. Метод фильтрации по субъектам обращения
/// </summary>
/// <typeparam name="T">Тип поля Entries</typeparam>
[DataContract]
public class EntriesFilteredResponse<T>
... |
import { Component, OnInit } from '@angular/core';
import { Item } from '../models/item'
import { MenuService } from '../menu.service';
import { OrderService } from '../order.service';
import { Menu } from '../models/menu';
@Component({
selector: 'app-cart',
templateUrl: './cart.component.html',
styleUrls: ['./... |
import React from 'react'
import { connect } from 'react-redux';
import { updateSignupForm }from '../actions/signupForm.js';
import { signup } from '../actions/currentUsers.js';
import TextField from '@material-ui/core/TextField';
import Fab from '@material-ui/core/Fab';
import CloseIcon from '@material-ui/icons/Close'... |
# Composite Actions in Github
A reusabe action :
# Requires :
1. A `action.yml` file in root of dedicated repo which must be publicly visible.
2. Create a release for that repo with a tag.
3. Use that reponame/releasetag anywhere to invoke reusable composite action.
4. yml must use `uses: "composite"` property.
5. ... |
import { createContext } from 'react';
import { TokenData } from 'util/token';
export type AuthContextData = {
authenticated: boolean;
tokenData?: TokenData;
};
export type AuthContextType = {
authContextData: AuthContextData;
setAuthContextData: (authContextData: AuthContextData) => void;
};
export const Au... |
# frozen_string_literal: true
module SecondLevelCache
module ActiveRecord
module FetchByUniqKey
def fetch_by_uniq_keys(where_values)
cache_key = cache_uniq_key(where_values)
obj_id = SecondLevelCache.cache_store.read(cache_key)
if obj_id
begin
return find(obj_i... |
bull-scraper
============
A NodeJS scraper utility for stock info AmericanBulls.com and CanadianBulls.com
|
const express = require('express');
const mongoose = require('mongoose');
const keys = require('./config/keys');
const bodyParser = require('body-parser');
const userRoutes = require('./routes/users_routes');
const orderRoutes = require('./routes/orders_routes');
//connect to mongoose
mongoose
.connect(keys.mongo... |
#requires -module pivposh
param(
[Parameter(ParameterSetName = "no_apply", Mandatory = $true)]
[switch]$DO_NOT_APPLY,
[Parameter(ParameterSetName = "apply_all", Mandatory = $true)]
[switch]$APPLY_ALL,
[Parameter(ParameterSetName = "applyme",Mandatory = $true)]
[Parameter(ParameterSetName = "... |
<?php
namespace Innocenzi\Vite\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\File;
use Innocenzi\Vite\EntrypointsFinder\EntrypointsFinder;
class ExportConfigurationCommand extends Command
{
public $signature = 'vite:config {--export= : Path to a file to write the configuration into.}';... |
/*
* 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 ... |
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef ASH_FIRST_RUN_DESKTOP_CLEANER_
#define ASH_FIRST_RUN_DESKTOP_CLEANER_
#include <vector>
#include "ash/ash_export.h"
#include "base/macros.h"
#in... |
using Orchard.Environment;
namespace Orchard.Tests.Environment {
public class StubHostEnvironment : HostEnvironment {
public override void RestartAppDomain() {
}
}
}
|
from flask_testing import TestCase
import flickr_photo_wall
class FlickrPhotoWallTestCase(TestCase):
"""Base class for flickr_photo_wall testcases"""
def create_app(self):
"""Create the flask application"""
return flickr_photo_wall.setup_app()[0]
def setUp(self):
"""Additional ge... |
import 'package:flutter/material.dart';
class AnimatedPositionedExample extends StatefulWidget {
static const routeName = '/animated-positioned';
@override
_AnimatedPositionedExampleState createState() =>
_AnimatedPositionedExampleState();
}
class _AnimatedPositionedExampleState extends State<AnimatedPos... |
package edu.ucdenver.ccp.file.conversion.pubannotation;
/*-
* #%L
* Colorado Computational Pharmacology's file conversion
* project
* %%
* Copyright (C) 2019 Regents of the University of Colorado
* %%
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provi... |
namespace ConsoleApplication1
{
public class Plot
{
public PlotOwner Owner;
}
} |
<?php
namespace Storyblok;
use GuzzleHttp\Client as Guzzle;
use GuzzleHttp\RequestOptions;
use GuzzleHttp\Exception\ConnectException;
use GuzzleHttp\Exception\RequestException;
use GuzzleHttp\Handler\CurlHandler;
use GuzzleHttp\HandlerStack;
use GuzzleHttp\Middleware;
/**
* Storyblok Client
*/
class ManagementClient... |
function validate_birth_year(field_value)
birth_year = try
parse(Int32, field_value)
catch e
return false
end
if (birth_year >= 1920 && birth_year <= 2002)
return true
end
false
end
function validate_issue_year(field_value)
issue_year = try
parse(Int32,... |
## List of TODO
Instead of printing TODO messages during compilation, the suggestions
are collected here.
The messages are left in the source code as comments (search for keyword TODO).
highperfkernels.cpp:
* Not using ICC vectorization: need to rewrite in intrincics
* Allow for case where state is not aligned: need... |
using System.Collections.Generic;
namespace Waf.DotNetPad.Applications.Services
{
public interface IEnvironmentService
{
IReadOnlyList<string> FilesToLoad { get; }
}
}
|
/*
* Copyright 2016 Ali.
*
* 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 wri... |
import 'package:flutter/material.dart';
class Leaderboard {
final String title;
final List<LeaderboardEntry> entries;
Leaderboard({@required this.title, @required this.entries});
}
class LeaderboardEntry {
final String name;
final double score;
final double emission;
LeaderboardEntry(
{@required... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.