text stringlengths 27 775k |
|---|
module BloodContracts::Core
# Represents failure in Tuple data matching
class TuplePolicyFailure < PolicyFailure
# Hash of attributes (name & type pairs)
#
# @return [Hash<String, Refined>]
#
def attributes
@context[:attributes]
end
# Subset of attributes which are invalid
#
... |
<?php
namespace ServerGrove\KbBundle\Tests\Controller\Admin;
/**
* Class UsersControllerTest
*
* @author Ismael Ambrosi<ismael@servergrove.com>
*/
class UsersControllerTest extends ControllerTestCase
{
public function testIndexAction()
{
$client = $this->getClient();
$crawler = $client->... |
<?php
namespace XOUser\Factory\Authentication\Adapter;
use Zend\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface;
use XOUser\Authentication\Adapter\AuthAdapter;
class AuthAdapterFactory implements FactoryInterface
{
/**
* Create service
*
* @param ServiceLocatorInte... |
<?php
class VoteAPIController extends BaseController {
/**
*
*
* @param VoteLink $vote
* @param VoteLog $log
*/
public function __construct(VoteLink $vote, VoteLog $log)
{
$this->log = $log;
$this->vote = $vote;
$this->beforeFilter('auth');
}
/**
* Show links list
*
* @return Response... |
# Grid
Grid systems are used for creating page layouts through a series of rows and columns that house your content.
```php
use dmgpage\yii2materialize\helpers\Html;
echo Html::beginGridRow();
echo Html::gridCol('This div is 12-columns wide on all screen sizes', ['class' => 's12']);
echo Html::beginGridCol(... |
#!/bin/sh
# Demultiplexer.sh
# Receives data from stdin and separates voice from car data.
# The data is stored into FIFO files.
if [ -e FIFOVoice ]; then
rm FIFOVoice
fi
mknod FIFOVoice p
if [ -e FIFOData ]; then
rm FIFOData
fi
mknod FIFOData p
./Demultiplexer.out
|
package com.codattle.core.model
import com.codattle.annotation.processing.annotation.GenerateDaoModelBuilder
import com.codattle.core.dao.common.DaoModel
import com.codattle.core.dao.common.DaoModelBuilder
import com.codattle.core.dao.common.Id
import com.codattle.core.model.utils.ModelUtils
import com.codattle.core.m... |
import React, { memo } from 'react';
import { Typography, Paper } from '@material-ui/core';
import LocationOnOutlinedIcon from '@material-ui/icons/LocationOnOutlined';
import { WeatherLocation } from 'types/metaWeather';
import useStyles from './styles';
export const LocationItemComponent: React.FC<WeatherLocationProp... |
require 'test_helper'
module Sip
class ControlAccesoOrgsocialesControllerTest < ActionDispatch::IntegrationTest
include Rails.application.routes.url_helpers
include Devise::Test::IntegrationHelpers
setup do
if ENV['CONFIG_HOSTS'] != 'www.example.com'
raise 'CONFIG_HOSTS debe ser www.exam... |
package tail_test
import (
"testing"
"time"
"github.com/pmdcosta/elklogs/internal/tail"
"github.com/stretchr/testify/assert"
)
const pattern = "logstash-[0-9].*"
func TestFilterIndex(t *testing.T) {
var indices = []string{"logstash-2018.11.03", "logstash-2018.10.10", "logstash-2018.10.09", "logstash-2018.10.11... |
module TrailingZeroes where
{-
public int trailingZeroes0(int n) {
int sum=0;
while(n>=5){
sum += n / 5;
n = n / 5; }
return sum; }
-}
trailingZeroes0 :: Int -> Int
trailingZeroes0 n = go 0 n
where
go s n | n >= 5 = go (s + n `div` 5) (n `div` 5)
| otherwise = s
{-
public int t... |
<?php
include 'simplexlsx.class.php';
include('common.php');
include('db.php');
define("TAXIVAXI_NUMBER", "7891022360");
define("TAXIVAXI_EMAIL", "corporate.oe@taxivaxi.com");
$db = mysqli_connect(DB_SERVER,DB_USER,DB_PASSWORD);
mysqli_select_db($db,DB);
function dbConnect()
{
$this->db = mysqli_connect(DB_SERVER,... |
---
title: ์ ๋ํฐ - ์ปดํ์ผ, ๊ฒ์ ์์ ์ ์คํ๋๋ ์ ํธ๋ฆฌ๋ทฐํธ ์ ๋ฆฌ
author: Rito15
date: 2021-03-08 03:03:00 +09:00
categories: [Unity, Unity Editor]
tags: [unity, editor, csharp]
math: true
mermaid: true
---
# ๊ณตํต ํน์ง
---
- ํด๋์ค ๋๋ ๋ฉ์๋ ์๋จ์ ์ ํธ๋ฆฌ๋ทฐํธ๋ฅผ ๋ช
์ํ๋ค.
- ์ปดํฌ๋ํธ๋ก ๋ฃ์ง ์๊ณ , ์คํฌ๋ฆฝํธ๋ก๋ง ์กด์ฌํด๋ ์คํ๋๋ค.
- ์ ์ ํด๋์ค๋ ์์์ ๊ด๊ณ ์์ด ๋์ํ๋ค.
- ๋ฉ์๋ ์ ํธ๋ฆฌ๋ทฐํธ๋ ์ ์ ๋ฉ์๋์๋ง ๋์ํ๋ค.
... |
package main;
import(
"fmt"
)
func main(){
f()
}
func f(){
for i:=0;i<4;i++{
g:=func(i int){fmt.Printf("%d",i)}
g(i)
fmt.Printf(" -g is is of type %T and has value %v\n",g,g)
}
}
|
require 'aruba/spawn_process'
module Aruba
describe SpawnProcess do
let(:process) { SpawnProcess.new('echo "yo"', 0.1, 0.1) }
describe "#stdout" do
before { process.run! }
it "returns the stdout" do
expect(process.stdout).to eq "yo\n"
end
it "returns all the stdout, every ... |
'use strict';
const chai = require('chai');
const sinon = require('sinon');
const hooks = require('../index');
const mocks = require('../mocks/model.mock');
const { expect } = chai;
const { getModel } = mocks;
describe('hooks-promise', () => {
let model;
describe('pre()', () => {
let spyPre1;
... |
class AttributesTableComponent < ViewComponent::Base
def initialize(model, list, custom_values: false)
@attributes = {}
#
# TODO: make this nicer
# Possible solution: we could use decorators instead of this to handle getting stuff from linked items.
# At this point I'm not sure whether we would w... |
/*
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.script.examples.jvm.embeddable.test
import org.jetbrains.kotlin.script.examples.... |
# Overview
Super Source let's you know who's using your software projects. If you have an open source project,
and would like to understand who your users are, you should use Super Source.
## Getting Started
Getting started with Super Source takes just a few minutes. For instructions, read the
[getting started](/doc... |
import { outputFileInformation } from './outputFileInformation'
const outputTextArea = document.querySelector('textarea')
const handleFile = outputFileInformation(outputTextArea)
const fileInput = document.querySelector('input')
fileInput.addEventListener('change', handleFile)
|
package com.yotpo.metorikku.input.kafka
import java.util.Properties
import com.yotpo.metorikku.input.Reader
import com.yotpo.metorikku.instrumentation.KafkaLagWriter
import com.yotpo.metorikku.session.Session.getSparkSession
import org.apache.kafka.clients.consumer.KafkaConsumer
import org.apache.spark.sql.DataFrame
... |
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2")
// https://developer.lightbend.com/docs/paradox/current/
addSbtPlugin("com.lightbend.paradox" % "sbt-paradox" % "0.9.2")
// https://www.scala-sbt.org/sbt-site/getting-started.html
addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.4.1")
// https://github.com/sb... |
#!/usr/bin/env escript
%% -*- erlang -*-
loop(Max, Max) ->
ok;
loop(X, Max) ->
loop(X + 1, Max).
main([]) ->
M = 2000000,
loop(0, M).
|
package net.corda.djvm.analysis
import net.corda.djvm.code.EmitterModule
import net.corda.djvm.code.ruleViolationError
import net.corda.djvm.code.thresholdViolationError
import net.corda.djvm.messages.Severity
import net.corda.djvm.references.ClassModule
import net.corda.djvm.references.Member
import net.corda.djvm.re... |
package torsvc
import (
"fmt"
"net"
)
// RegularNet is an implementation of the Net interface that defines behaviour
// for Regular network connections
type RegularNet struct{}
// Dial on the regular network uses net.Dial
func (r *RegularNet) Dial(network, address string) (net.Conn, error) {
return net.Dial(netwo... |
---
layout: post
title: "Week #5"
date: 2016-10-13 17:47:00
author: Javier Dรญaz, Patricio Merino
categories: progress
---
# Week #5
Semana del 11 al 14 de septiembre.
Se trabajรณ en el blog. No hubo planificaciรณn en Kanban.
|
<?php
if (!defined("MUTTER")) exit("(OoO)");
/*
This is a sample HelloWorld infra(Model).
This infrastructure simply print a "Hello World!" out.
As a scaffold model, just duplicate this file, rename the class name and file name,
and add the stuff you needed like TemplateEngine into this infra, it's done!
D... |
๏ปฟusing System.Collections.Generic;
using Prism.Ioc;
using Prism.IocContainer.Wpf.Tests.Support.Mocks;
using Xunit;
using static Prism.Container.Wpf.Tests.ContainerHelper;
namespace Prism.Container.Wpf.Tests.Ioc
{
public class ContainerExtensionFixture
{
[Fact]
public void ExtensionReturnsTrueIf... |
using NUnit.Framework;
using System;
namespace EgnHelper.Tests
{
[TestFixture]
public class Tests
{
[TestCase("7523169263")]
[TestCase("7552010005")]
[TestCase("6101057509")]
public void IsValid_ShouldReturnTrueForValidEgn(string egn)
{
Console.WriteLine(... |
/*!
* Start Bootstrap - SB Admin v6.0.2 (https://startbootstrap.com/template/sb-admin)
* Copyright 2013-2020 Start Bootstrap
* Licensed under MIT (https://github.com/StartBootstrap/startbootstrap-sb-admin/blob/master/LICENSE)
*/
(function($) {
"use strict";
// Add active state to sidbar nav... |
! MIT License
!
! Copyright (c) 2020 SHEMAT-Suite
!
! 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
! to use, copy, modify, merge,... |
"""
Describes a hydropower unit.
Hydropower is both a purpose and a possible dam output. The optimisation process could ignore the purpose side of
hydropower, and only consider it as a possible (constant) output; but optimising this purpose needs the dedicated
penstock. As a consequence, the
"""
immutable HydropowerUn... |
require 'test_helper'
class Bookafy::Model::CompanyTest < ActiveSupport::TestCase
def test_that_new_company_is_created
company = Bookafy::Model::Company.new(name: 'Smartlist')
assert_not_equal nil, company
assert_equal 'Smartlist', company.name
end
end
|
export enum ApiStatusCodes {
SUCCESS = '0',
ERROR = '1',
WARNING = '2'
}
/** Screen section identifiers */
export enum ScreenAreaID {
CONFIRMATION = 'CONFIRMATION',
QRCODE = 'QR',
NEXT_STEPS = 'NEXT STEPS',
INTERIM = 'INTERIM',
FINAL = 'FINAL'
}
/**
* Structure for confirmation page to display messa... |
<?php
namespace OFFLINE\Mall\Models;
use Illuminate\Support\Collection;
use Model;
use October\Rain\Database\Traits\Encryptable;
use OFFLINE\Mall\Classes\Payments\PaymentGateway;
use Session;
class PaymentGatewaySettings extends Model
{
use Encryptable;
protected $encryptable = [];
public $implement = ... |
# mipstest.asm
# David_Harris@hmc.edu 9 November 2005
#
# Test the MIPS processor.
# add, sub, and, or, slt, addi, lw, sw, beq, j
# If successful, it should write the value 7 to address 84
# Updated by @vsilchuk. Added: new test insructions:
# Assembly Description Address Machine
ma... |
# Author : Jeonghoon.Kang (http://github.com/jeonghoonkang)
# last modification 2021.8.14
# Raspberrypi Buster release support
#sudo apt-get -y install subversion
sudo apt-get -y install htop
sudo apt-get -y install screen
sudo apt-get -y install rsync
sudo apt-get -y install vim
sudo apt-get -y install tree
sudo a... |
enum Role {
ADMIN,
TEACHER,
PARENT,
}
extension RoleExtension on Role {
int get accessLevel => [2, 1, 0][this.index];
} |
//! Test directly invoking event handlers from within other event handlers.
//! This module tests this feature for simple state machines not requiring a
//! state context. See `handler_calls.rs` for more interesting cases.
include!(concat!(env!("OUT_DIR"), "/", "simple_handler_calls.rs"));
#[cfg(test)]
mod tests {
... |
include ::Kit::Doc::Yard::TemplatePluginHelper # rubocop:disable Style/MixinUsage
def init
return if object.docstring.blank? && !object.has_tag?(:api)
sections :index, [:docstring_tags, [:private, :deprecated, :todo, :note], :docstring, [:text]], T('tags')
end
|
module Config.Exception
( trySetIO
) where
import Log
import qualified Data.Aeson as A
import qualified Data.HashMap.Strict as HM
trySetIO :: HasCallStack => IO A.Object -> IO A.Object
trySetIO set = do
logHandle <- Log.new
result <- tryM set
case result of
Right obj -> logDebug logHandle "Success on s... |
CREATE TABLE transfer_meter ( uploaded BIGINT, downloaded BIGINT)
UPDATE files set blockchain_hash = %s WHERE hash IN ({0})
CREATE TABLE blockchain_state ( last_known_block integer)
UPDATE files SET exported_timestamp = NOW WHERE hash IN ({0})
SELECT * FROM transfer_meter);
UPDATE transfer_meter SET downloaded = downl... |
<?php
namespace App\Libraries\Widget;
class Toolbar
{
public static function toolbarTable(array $param)
{
return view('Widget/Toolbar', $param);
}
public static function toolbarTemplate(array $param)
{
return view('Widget/ToolbarTemplate', $param);
}
}
|
using System;
using System.Collections.Generic;
namespace SysMatur.Api.Models
{
public class Post
{
public string Title { get; set; }
public DateTimeOffset Date { get; set; }
public string Body { get; set; }
public Uri? Image { get; set; }
public string Summary { get; se... |
## `zdesk routing attribute create`
/routing/attributes.json
### Synopsis
zdesk routing attribute create [ ... ]
### Description
https://developer.zendesk.com/rest_api/docs/core/skill_based_routing#create-attribute
|
package nl.inl.blacklab.indexers.preprocess;
import java.io.IOException;
import java.io.Reader;
import java.io.Writer;
import java.util.Map;
import org.apache.commons.io.IOUtils;
import nl.inl.blacklab.exceptions.PluginException;
public class TagPluginNoop implements TagPlugin {
@Override
public boolea... |
๏ปฟusing Foundation;
using XPlatformMenus.Core.ViewModels;
using XPlatformMenus.Touch.Panels;
namespace XPlatformMenus.Touch.Views
{
[Register("MainView")]
[PanelPresentation(PanelEnum.Center, PanelHintType.PopToRoot, true)]
public class MainView : BaseViewController<MainViewModel>
{
public overr... |
package com.merxury.blocker.ui.settings
import androidx.annotation.StringRes
import com.merxury.blocker.base.BasePresenter
import com.merxury.blocker.base.BaseView
import kotlinx.coroutines.Job
interface SettingsContract : BaseView<SettingsContract.SettingsPresenter> {
interface SettingsView {
fun showExp... |
class TrackExampleController < ApplicationController
def index
@sky_tracks = SkyTrack.all
@ground_tracks = GroundTrack.all
end
end
|
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\aboutPage;
use App\aboutSecondPart;
class aboutController extends Controller
{
// add new About info
function addAbout()
{
return view('admin.about.about');
}
// insert_about
function insert_about(Request $re... |
// Copyright 2016 Andreas Pannewitz. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
/*
dancefast.go extends the (stolen and extended) list.go
with stuff, which is considered useful and helpful, such as:
- l.DanceFast( d *Dancing )
- e.Dan... |
import React from "react";
import Headroom from "react-headroom";
import { Box, Link as RebassLink, Flex, Image } from "rebass/styled-components";
import styled from "styled-components";
import Link from "./Link";
import { useHelmetQuery } from "../queries/useHelmetQuery";
import { useSiteQuery } from "../queries/useSi... |
package util
import org.jetbrains.kannotator.index.ClassSource
import org.objectweb.asm.ClassReader
import org.jetbrains.kannotator.declarations.*
import java.io.IOException
import java.io.InputStream
fun ClassesFromClassPath(vararg classNames: String): ClassSource = ClassesFromClassPath(classNames.toList())
fun Clas... |
//! REPL for arithmetic expressions.
use rustyline::{error::ReadlineError, Editor};
use std::io;
use arithmetic_eval::arith::OrdArithmetic;
use arithmetic_eval::Environment;
use arithmetic_typing::TypeEnvironment;
use crate::{
common::{Env, ParseAndEvalResult},
library::ReplLiteral,
};
pub fn repl<T: ReplL... |
---
title: Getting Started
tags:
- linux
- hpc
---
# Getting Started
Welcome to the Stanford Research Computing Center Documentation Portal!
We are grateful for your patience as these docs are under development.
First, you should take a look over our general pages to discuss the following:
- [Software](/docs/sof... |
package info.covid.data.utils
object Const {
val statesCodes = HashMap<String, String>().apply {
put("Chandigarh", "CH")
put("Delhi", "DL")
put("Himachal Pradesh", "HP")
put("Haryana", "HR")
put("Jammu and Kashmir", "JK")
put("Andhra Pradesh", "AP")
put("Kera... |
package com.example.service;
import com.example.dao.GestorDAO;
import com.example.model.Gestor;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class GestorService {
private final GestorDAO gestorDao;
@Autow... |
/*
* FutzGlut.cpp
*
* Created on: Nov 3, 2010
* Author: ziba
*/
#if FUTZ_PLATFORM_GLUT
#ifdef _WIN32
#include <Windows.h>
#endif
#ifdef OSX
#include <OpenGL/gl.h>
#include <OpenGL/glu.h>
#include <GLUT/glut.h>
#else
#include <GL/gl.h>
#include <GL/glu.h>
#ifdef _WIN32
#include <glut.h>
#else
#include <GL/gl... |
<?php
header('Content-type: application/json');
echo \Alcatraz\Kernel\Layout::getContent(); ?> |
<?php
/**
* ๅผนๅบไฟกๆฏๆ็คบๆก
* @param [type] $msg ่ฆๅจ็ฝ้กตไธๆพ็คบ็ๆ็คบไฟกๆฏ
* @param string $type success / danger
* @return void
*/
function alert($msg, $type='success'){
session()->flash($type, $msg);
}
|
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
module SimpTT.Error where
import Language.SimplePi.Types (Position)
import Text.PrettyPrint.Leijen.Text
data TTError ctx e
= Varia... |
import com.threatstack.docs.SourceDocsPlugin
enablePlugins(SourceDocsPlugin)
lazy val root = project.in(file("."))
.settings(version := "0.1", scalaVersion := "2.12.4")
lazy val check = TaskKey[Unit]("check")
check := {
val expected = IO.readLines(file("expect.md"))
val actual = IO.readLines(crossTarget.valu... |
const path = require("path");
const router = require("express").Router();
const storeFrontRoutes = require("./storeFront");
const userRoutes = require("./user");
const storeRoutes = require("./store");
const productRoutes = require("./product");
const cartRoutes = require("./cart");
const imageRoutes = require("./cloud... |
<?php namespace bookclub;
/*
* Class provides access to joined groups and group users tables.
*
* @author Jon Wolfe <jonnj@connectberlin.de>
* @package bookclub
* @subpackage database
* @license https://opensource.org/licenses/MIT MIT
*/
/**
* Access to the joined logs, members and users tables.
*/... |
import Storage from './Storage'
const session = new Storage(window.sessionStorage)
export default session
export const {
getItem: loadFromSessionStorage,
setItem: saveToSessionStorage,
removeItem: removeFromSessionStorage,
} = session
|
if [[ "$TRAVIS_JOB_TO_DO" == "RUNTESTS" ]]
then
./ci/travis/runtests.sh
else
./ci/travis/snapshots.sh
fi
|
<?php
/**
* Auto generated from KeyValueStorage.proto
*
* Diadoc.Api.Proto.KeyValueStorage package
*/
namespace Diadoc\Api\Proto\KeyValueStorage {
/**
* KeyValueStorageApiGetResponse message
*/
class KeyValueStorageApiGetResponse extends \ProtobufMessage
{
/* Field index constants */
const ENTRIES = 1;
... |
import os
import json
import random
import numpy as np
import tensorflow as tf
import src.core.constants as constants
import src.retina_net.anchor_generator.box_utils as box_utils
import src.retina_net.datasets.dataset_utils as dataset_utils
from src.core.abstract_classes.dataset_handler import DatasetHandler
from s... |
<?php
/**
* This file is part of Berlioz framework.
*
* @license https://opensource.org/licenses/MIT MIT License
* @copyright 2020 Ronan GIRON
* @author Ronan GIRON <https://github.com/ElGigi>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this ... |
##############################################################################################
# UpdateGlobalConfigurationFromXmlSecrets.ps1
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the Apache License.
# Operations :
#
<#
.SYNOPSIS
Update GlobalConfigurations.xml
.PARAMETER
... |
# SoulmangaAdmin
Soul Manga Admin
# Docker
- ๆๅปบ้ๅ
```
docker build -t soulmangaadmin .
```
- ่ฟ่กๅฎนๅจ
```
# simply run the container instance & bind the port
docker run --name vapor-server -p 8080:8080 soulmangaadmin
# run the instance, bind the port, see logs remove after exit (CTRL+C)
docker run --rm -p 8080:8080 -i... |
import ViewerContext from 'common/components/ViewerContext';
import gql from 'graphql-tag';
import React, { useContext } from 'react';
import { Mutation } from 'react-apollo';
import { Logout as LogoutData } from './__generated__/Logout';
import LogoutLogic from './LogoutLogic';
const LOGOUT = gql`
mutation Logout {... |
//
// Created by Andrey Tabakov on 08/10/2018.
//
#include "Stack.h"
Stack::~Stack() = default; |
๏ปฟusing System;
namespace Akiba.Core.Exceptions
{
[Serializable]
class BootstrapException : Exception
{
private string BootstrapError;
public override string Message
{
get
{
return BootstrapError;
}
}
public Bootst... |
import vtkActor from 'vtk.js/Sources/Rendering/Core/Actor';
/**
*
*/
interface IAxesActorInitialValues {}
export interface vtkAxesActor extends vtkActor {
/**
*
*/
getConfig(): object;
/**
*
*/
getXAxisColor(): number[];
/**
*
*/
getXAxisColorByReference(... |
////////////////////////////////////////////////////////////////////////////////////////////////////
// NoesisGUI - http://www.noesisengine.com
// Copyright (c) 2013 Noesis Technologies S.L. All Rights Reserved.
////////////////////////////////////////////////////////////////////////////////////////////////////
#ifnd... |
"use strict";
const config = require('./config'),
CoinbaseClient = require('coinbase').Client,
Transaction = require('coinbase').Transaction
;
const client = new CoinbaseClient({'apiKey': config.api_key, 'apiSecret': config.api_secret});
// Helper function to display error message and ... |
import os
import sys
import json
import subprocess
from collections import OrderedDict
import pytest
import hurry
@pytest.fixture()
def create_hurry_json(tmpdir):
path_to_file = tmpdir.join('hurry.json')
os.chdir(os.path.dirname(path_to_file))
def creator(dictionary):
with open(path_to_file, "w... |
CREATE OR REPLACE FUNCTION geocode_location(
parsed NORM_ADDY
) RETURNS REFCURSOR
AS $_$
DECLARE
result REFCURSOR;
tempString VARCHAR;
tempInt INTEGER;
BEGIN
-- Try to match the city/state to a zipcode first
SELECT INTO tempInt count(*)
FROM zip_lookup_base zip
JOIN state_lookup sl ON (zip.state =... |
package com.example.grpc_coffee
import io.grpc.*
import io.grpc.stub.ClientCalls
import io.grpc.stub.StreamObserver
import kotlinx.coroutines.Job
import kotlinx.coroutines.runBlocking
import java.time.Instant
import java.time.temporal.ChronoUnit
import java.util.concurrent.TimeUnit.SECONDS
private class CoffeeDrinker... |
package io.craigmiller160.stockmarket;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import io.craigmiller160.mvp.core.AbstractProper... |
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with ... |
๏ปฟusing UnityEngine;
using System.Collections;
[ExecuteInEditMode]
public class Carrier : MonoBehaviour
{
public CarriableObject Carrying;
// Use this for initialization
void Start()
{
}
// Update is called once per frame
void Update()
{
if (!Carrying)
... |
#!/bin/bash
(
set -x
set -e
this_script="$(readlink -e "${BASH_SOURCE[0]}")"
this_script_dir="$(dirname "${this_script}")"
workspace_dir="${this_script_dir}/workspace"
# Setup the workspace/ directory
(cd "$workspace_dir"
rm -rf ./{*,.venv}
)
)
|
#include "MidiSessionALSA.hh"
#include "CliComm.hh"
#include "MidiOutDevice.hh"
#include "PlugException.hh"
#include "PluggingController.hh"
#include "serialize.hh"
#include <iostream>
#include <memory>
namespace openmsx {
// MidiOutALSA ==============================================================
class MidiOutA... |
/*
* Written and Developed by Inuwa Ibrahim - https://linktr.ee/Ibrajix
* All rights reserved
*/
package com.ibrajix.eplfootball.network
import javax.inject.Inject
class ApiDataSource @Inject constructor(private val apiService: ApiService) {
//get premier league teams
suspend fun getPremierLeagueTeams() ... |
package com.github.njhu.njcloudreader.Bean
class Banner(val desc: String, val id:String, val imagePath: String,
val isVisible: String, val order:String, val title: String,
val type: String, val url:String
) |
val maven_group: String by project
val mod_version: String by project
val archives_base_name: String by project
val minecraft_version: String by project
val yarn_mappings: String by project
val loader_version: String by project
val fabric_version: String by project
val common = project(":MCAPI-common")
plugins {
... |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// The vector package implements an efficient container for managing
// linear arrays of elements. Unlike arrays, vectors can change size dynamically.
package ... |
pub mod error;
pub mod arg;
pub mod buffer;
pub mod tube;
pub mod process;
pub mod remote;
|
<?php
namespace app\modules\v1\controllers;
use tests\RedirectTest;
use yii\rest\Controller;
use yii\base\Event;
use app\models\TournamentToUser;
use app\models\Tournament;
use app\models\Fight;
use app\models\Score;
use app\models\User;
use app\models\IntermediateScore;
use app\modules\v1\helpers\TournamentHelper;
u... |
{-# LANGUAGE OverloadedStrings #-}
module Poker.History.Base where
import Control.Monad.Identity
import Data.Text (Text)
import qualified Data.Text as T
import Data.Void
import Poker
import Poker.History.Types
import Text.Megaparsec
import Text.Megaparsec.Char
import qualified Text.Megaparsec.Char.Lexer as L
import T... |
# TODO This file is going away, but we need it temporarily for compatibility with the integration scaffolder.
# ๐
super scaffolding will insert new oauth providers above this line.
def any_oauth_enabled?
[
stripe_enabled?,
# ๐
super scaffolding will insert new oauth provider checks above this line.
].se... |
๏ปฟnamespace Disqord
{
public static class LocalNestedComponentExtensions
{
public static TComponent WithIsDisabled<TComponent>(this TComponent component, bool isDisabled = true)
where TComponent : LocalNestedComponent
{
component.IsDisabled = isDisabled;
... |
@using StartupCreativeAgency.Web.RazorPages.Areas.Admin
@using StartupCreativeAgency.Web.RazorPages.Infrastructure
@using StartupCreativeAgency.Web.RazorPages.Areas.Admin.ViewModels
@using StartupCreativeAgency.Domain.Entities
@namespace StartupCreativeAgency.Web.RazorPages.Areas.Admin.Pages
@addTagHelper StartupCreati... |
---
title: KataLientesS
affiliatelink: "https://www.katalientess.com"
imageName: seoKatalientess
credits: Biggest React Project
---
The largest React project I have created on my own. |
# How-detect-robots-and-spiders-with-PHP
How-detect-robots-and-spiders-with-PHP
Here is the simple function for detecting spiders and robots. It will return true or false.
<pre>
function is_bot(){
$bots = array(
'Googlebot',
'Baiduspider',
'ia_archiver',
'R6_FeedFetcher',
'... |
package fi.riista.common.network
import fi.riista.common.RiistaSdkConfiguration
import io.ktor.client.*
import io.ktor.client.features.cookies.*
import io.ktor.client.request.*
internal expect class HttpClientProvider() {
fun getConfiguredHttpClient(sdkConfiguration: RiistaSdkConfiguration,
... |
# frozen_string_literal: true
module UsersHelper
def full_name(user)
[user.first_name, user.last_name].reject { |n| n.nil? or n.blank? }.join(' ')
end
def sortable_full_name(user)
[user.last_name, user.first_name].reject { |n| n.nil? or n.blank? }.join(', ')
end
end
|
import 'package:equatable/equatable.dart';
import 'package:json_annotation/json_annotation.dart';
import 'package:square_connect/square_connect.dart';
part 'catalog_object.g.dart';
@JsonSerializable()
class CatalogObject extends Equatable {
const CatalogObject({
required this.type,
required this.id,
req... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.