text stringlengths 27 775k |
|---|
<?php
namespace Coziboy\LogUserActivityForBackpack\Tests;
use Orchestra\Testbench\TestCase;
class BaseTest extends TestCase
{
/**
* A basic feature test example.
*
* @return void
*/
public function test_example()
{
$this->assertTrue(true);
}
}
|
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package cocheejm;
/**
* <h1>DtCoche</h1>
*
* <p>Clase abstracta que sirve para cualquier tipo de coche</p>
*
* @aut... |
/* HabitCompletion:
Purpose: This is an object that represent any habit completion instance. This way, all the Date and
completionNumber is stored in it's own object.
Design Rationale: I did this because this makes more sense from an OO perspective. Now we have
individual instances we can delete, instead of just stri... |
#=Copyright (c) 2017 Gabriel Goh
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, publish, distribute, subl... |
void f(unsigned int counter) {
if(counter==0) return;
f(counter-1);
}
int main() {
unsigned int x;
__CPROVER_assume(x<=10);
f(x);
}
|
# gograb
Downloads go module dependencies one at a time.
This tool is needed when access to a private repos only allows a small number of concurrent connections.
This problem occurs during CI/CD pipelines. Golang efficiently pulls dependencies in parallel but this efficiency
can break private repos which only allow ... |
# eth
## eth 安装
```
mkdir -p $GOPATH/src/github.com/ethereum/
cd $GOPATH/src/github.com/ethereum/
git clone https://github.com/ethereum/go-ethereum.git
sudo add-apt-repository ppa:ethereum/ethereum
sudo apt-get update
sudo apt-get install -y ethereum
```
## Remix
```
https://remix.ethereum.org/
```
```
sudo apt-get... |
import 'package:flutter/material.dart';
import 'dart:convert';
import 'dart:async';
import 'package:http/http.dart' as http;
import './token.dart';
class LoginPage extends StatefulWidget {
@override
State<StatefulWidget> createState() {
return _LoginState();
}
}
class _LoginState extends State<LoginPage> {
... |
import CacheDriver from "../../services/cache/CacheDriver";
import * as fs from "fs";
import {createHash} from "crypto";
import Keyable from "../../types/Keyable";
/**
* @author FaSh<farbodshams.2000@gmail.com>
* @class FileCache
* @implements CacheDriver
* A file driver implementation from CacheDriver interface
... |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ICMS.Modules.BaseComponents.Beans
{
public class ModuleEntity
{
public virtual string Id { set; get; }
public virtual string LineName { set; get; }
public virtual string StationCode { set; g... |
import fm.sbt.S3Implicits._
import sbt.Keys.{publishTo, _}
import sbt.{AutoPlugin, _}
import scoverage.ScoverageKeys._
object Common extends AutoPlugin {
override def trigger: PluginTrigger = allRequirements
lazy val buildNumber: Option[String] = sys.env.get("BUILD_NUMBER").map(bn => s"b$bn")
override lazy va... |
package cn.heroes.yellow.entity;
import java.io.OutputStream;
/**
* The Object which is gave by <code>Intercepter#over()</code>, and used to fill
* <code>data</code> into a media specified by <code>info<code>.
*
* @author Leon Kidd
* @version 1.00, 2014-2-11
* @deprecated since v2.0.0
*/
public class FillObje... |
#if !NETCOREAPP
using Amazon.S3;
using Amazon.S3.Model;
using GroupDocs.Annotation.Models;
using GroupDocs.Annotation.Models.AnnotationModels;
using System;
using System.IO;
namespace GroupDocs.Annotation.Examples.CSharp.AdvancedUsage.Loading
{
/// <summary>
/// This example demonstrates loading document from... |
'use strict';
var express = require('express');
var bodyParser = require('body-parser');
var app = express();
app.use(bodyParser.urlencoded({ extended:false }));
app.use(bodyParser.json());
var server = app.listen(3977, function() {
console.log('Listening :)');
server.close(function() { console.log('Doh :('... |
#!/usr/bin/ruby
require "ai4r"
require "nokogiri"
require "zip"
require "rubyXL"
excel = RubyXL::Parser.parse ARGV.first
real_lines = excel.worksheets[0].extract_data
real_columns = real_lines.first.size - 1
net = Ai4r::NeuralNetwork::Backpropagation.new [real_columns, real_columns, 1]
(real_lines.size*100).times d... |
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class OptionsMenuNew : MonoBehaviour {
// toggle buttons
public GameObject fullscreentext;
public GameObject shadowofftext;
public GameObject shadowofftextLINE;
public GameObject shadowlowtext;
public GameObject shadowlowtextLINE;
publi... |
package io.vehiclehistory.api.model;
import java.io.Serializable;
/**
* Created by dudvar on 2015-03-13.
*/
public class Vehicle implements Serializable {
private Name name;
private VehicleType type;
private Engine engine;
private Plate plate;
private String vin;
private Production productio... |
using System;
namespace NoesisLabs.Elve.VenstarColorTouch.Enums
{
public enum HolidayState
{
NotObservingHoliday = 0,
ObservingHoliday = 1
}
} |
u.check().then(function(update){})
if(blah==="1"){} |
---
description: Contains the information that describes the vertical component of the lines in the stationery used by the Journal note. Used, for example, when the note has grid lines.
ms.assetid: af6f485e-13df-41bb-b57a-10d8393b83e7
title: Vertical Element
ms.topic: reference
ms.date: 05/31/2018
---
# Vertical Eleme... |
# KeePass (18 December)
| CP Information | |
|-----------------|------------|
| Package | [KeePassXC - Cross-Platform Password Manager](https://keepassxc.org/) |
| Script Name | [keepassxc-cp-init-script.sh](build/keepassxc-cp-init-script.sh) |
| CP Mount Path | /custom/keepassxc |
| CP Size | 100M |
| IGE... |
#!/usr/bin/perl
use warnings;
use strict;
use App::Paws;
use App::Paws::Context;
use lib './t/lib';
use App::Paws::Test::Server;
use App::Paws::Test::Utils qw(test_setup
get_files_in_directory
write_message);
use Test::More tests => 2;
my $server = App::P... |
# Ember-cli-calendar
```bash
ember install ember-cli-calendar
```
|
const { root } = require("cheerio");
class Node {
constructor(item) {
this.item= item;
this.right = null;
this.left = null;
this.count = 0;
};
};
class BST {
constructor() {
this.root = null;
}
create(item) {
const newNode = new Node(item);
if (!this... |
#!/usr/bin/env node
'use strict';
var program = require('commander');
var version = require('../package.json').version;
var path = require('path');
var _ = require('lodash');
function isExplicitlyRelativeOrAbsolute(path) {
return path.startsWith('./') ||
path.startsWith('../') ||
path.startsWith('/');
}
functio... |
#!/usr/bin/env bash
set -e
brew update
brew cleanup
brew cask cleanup
brew install \
moreutils \
jq \
shellcheck
|
//@flow
import { SET_ACTIVE_ANALZYE } from '../constants';
type initialType = {
id: ?string,
title?: string,
url?: string,
icon?: string,
descr?: string,
tracking_date?: string,
analyze?: {
usa: {
number_of_mentions: number,
airforce: Object,
marine: Object,
infantry: Object
... |
export { formatBalance } from './formatBalance';
export { FormattedBalance } from './types';
|
@include('public_blade.top')
<div class="header bg-darkorange">
<h5>影院影厅放映管理表</h5>
</div>
<table class="table table-hover table-striped table-bordered table-condensed">
<thead>
<tr>
<th>影院ID</th>
<th>影院名称</th>
<th>影院照片</th>
<th>影院地址</th>
<th>影厅电话</th>
<th>营业时间</th>
<th>影院的热度</th>
... |
import React from 'react';
import fetch from 'isomorphic-unfetch';
import { Flex, Box } from 'grid-styled/emotion';
import styled, { css } from 'react-emotion';
import { space } from 'styled-system';
import Layout from '../components/common/layout';
import BannerSection from '../components/common/banner';
import { Con... |
package com.example.oigami.twimpt.twimpt.token;
import com.example.oigami.twimpt.twimpt.TwimptNetException;
import org.json.JSONException;
import org.json.JSONObject;
public class AccessTokenData {
public String token;
public String secret;
public AccessTokenData() {}
public AccessTokenData(JSONObject json... |
addCompilerPlugin("org.scalamacros" % "paradise" % "2.1.0" cross CrossVersion.full)
val akkaVersion = "2.4.16"
val circeVersion = "0.6.1"
lazy val root = (project in file(".")).
settings(
inThisBuild(List(
organization := "com.janschulte",
scalaVersion := "2.11.8",
version := "0.1.0-SNAPSHOT"... |
using Microsoft.AspNetCore.Antiforgery;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Razor.TagHelpers;
using Microsoft.Extensions.DependencyInjection;
namespace Miru.Html.Tags
{
[HtmlTargetElement("miru-antiforgery", Attributes = "name", TagStructure = TagStructure.WithoutEndTag)]
public class M... |
sbtPlugin := true
organization := "com.leobenkel"
homepage := Some(url("https://github.com/leobenkel/umlclassdiagram"))
licenses := List("MIT" -> url("https://opensource.org/licenses/MIT"))
developers :=
List(
Developer(
"leobenkel",
"Leo Benkel",
"",
url("https://leobenkel.com")
... |
import React, { useEffect, useState } from 'react';
import { makeStyles, createStyles, Theme } from '@material-ui/core/styles';
import { Button } from '@material-ui/core';
import Grid from '@material-ui/core/Grid';
import { Redirect, RouteComponentProps } from 'react-router-dom';
import { validateSessionId } from './ut... |
using Hurace.Domain;
using Hurace.RaceControl.Helpers.MvvmCross;
using MvvmCross.Commands;
using MvvmCross.Plugin.Messenger;
using MvvmCross.ViewModels;
namespace Hurace.RaceControl.ViewModels
{
public class RunEntryViewModel : MvxViewModel
{
private readonly IMvxMessenger _messenger;
private ... |
---
title: ScopedTypeVariables下の1ランク多相で型が合わないとき
tags: Haskell
---
# まとめ
forallを指定してあげると、一連の`a`, `b`が固定されてくれます。
```haskell
f :: forall a b. Eq b => (a -> b) -> (a -> b) -> a -> Bool
```
# 解説
以下のようなコードを書くと
```haskell
{-# LANGUAGE ScopedTypeVariables #-}
f :: Eq b => (a -> b) -> (a -> b) -> a -> Bool
f g h x =
let... |
-- Since we are adding a value to an existing enum, and since the 'up'
-- migration is idempotent, we don't worry about reverting that change
|
import React from "react"
import Layout from "../components/layout"
import { PageProps } from "gatsby"
const About = ({ location }: PageProps) => {
return (
<Layout location={location} title="About">
<p>
I hope that I am a hard worker that likes to think creatively in code. I
have been work... |
AROUND = [
[0, -1],
[0, +1],
[-1, 0],
[+1, 0],
]
def min_step(x, y, xx, yy)
@visited = Array.new(@m) { [] }
@visited[x][y] = true
queue = [[0, x, y]]
while !queue.empty?
step, x1, y1 = queue.shift
return step if x1 == xx && y1 == yy
AROUND.each do |i, j|
x2, y2 = x1+i, y1+j
nex... |
import { ObjectSchema, ArraySchema } from 'pip-services3-commons-node';
import { TypeCode } from 'pip-services3-commons-node';
export class PayoutV1Schema extends ObjectSchema {
public constructor() {
super();
this.withRequiredProperty('id', TypeCode.String);
this.withRequiredProperty('sy... |
select
name,
id,
type,
version,
geo_redundant_backup_enabled,
user_visible_state,
administrator_login,
auto_grow_enabled,
backup_retention_days,
fully_qualified_domain_name,
public_network_access,
sku_capacity,
sku_family,
sku_name,
sku_tier,
ssl_enforcement,
storage_mb
from
azure.az... |
package org.mgaidamak.cinema.ticket.dao.ticket
import org.mgaidamak.cinema.ticket.dao.Ticket
/**
* DAO for Seat list
*/
interface ITicketRepo {
fun createTicket(ticket: Ticket): Ticket?
fun getTickets(session: Int?, bill: Int?): Collection<Ticket>
fun getTicket(session: Int, seat: Int): Ticket?
fun ... |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DeclarationOfVariables
{
class DeclarationOfVariables
{
static void Main()
{
ushort first = 51130;
sbyte second = -115;
int third=48... |
CREATE TABLE [dbo].[user] (
[userId] VARCHAR (33) NOT NULL,
[userPassword] VARCHAR (33) NULL,
[createtime] DATETIME CONSTRAINT [DF_user_createtime] DEFAULT (getdate()) NOT NULL,
[userCommentsPublic] NVARCHAR (99) NULL,
[userCommentsPrivate] NVARCHAR (99) NULL,
... |
namespace LockHandler.Constants
{
public static class MessagePropertyNames
{
public const string LockToken = "lockToken";
public const string QueueName = "queueName";
public const string RetryCount = "retryCount";
public const string RenewalIntervalInSeconds = "renewalInterva... |
<?php
use Illuminate\Database\Seeder;
use Illuminate\Database\Eloquent\Model;
class SettingTableSeeder_2016_08_28 extends Seeder {
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$settings = array(
array(
'name' => 'Homepa... |
require File.expand_path('../commentable', __FILE__)
class Module::ClassDoc
include Module::Commentable
FIELD_PUBLIC = "public"
FIELD_PROTECTED = "protected"
FIELD_PRIVATE = "private"
attr_accessor :data, :field_hash, :method_hash, :metainfo
def initialize(data)
# puts "Got ClassType: #{data[:name]} ... |
#!/bin/sh -e
echo " # The legacy build support script"
echo " # -------------------------------"
set --
if [ -e build.sh ]; then
echo " ### Detected 'build.sh' executing it with bash. ###"
set -- /bin/bash build.sh
elif [ -e Makefile ] && grep -qsE '^SPHINXBUILD' Makefile && grep -qsE '^html:' Makefile; then
ec... |
private async Task<IList<jsTreeNode>> GetHubsAsync()
{
IList<jsTreeNode> nodes = new List<jsTreeNode>();
// the API SDK
HubsApi hubsApi = new HubsApi();
hubsApi.Configuration.AccessToken = Credentials.TokenInternal;
var hubs = await hubsApi.GetHubsAsync();
foreach (KeyValuePair<string, dynamic> hubInfo in... |
# frozen_string_literal: true
require 'aws-sdk-secretsmanager'
require 'json'
require 'fsecret_loader/version'
require 'fsecret_loader/configuration'
# FSecretLoader module
module FSecretLoader
class << self
def config
yield configuration
end
def load
# require 'pry'; binding.pry
retu... |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Hedgehog
import Test1 ( tests )
main :: IO Bool
main = checkParallel tests
|
package com.fly.kotlin.practice
/**
* Created by Fj on 2018/6/21.
*/
class InnerClass {
private val bar: Int = 1
//第一种内部类
class Nested {
fun foo() = 2
}
//第二种内部类
inner class Inner {
fun foo() = bar
}
}
fun main(args: Array<String>) {
//两种内部类的声明,对应两种调用方式
InnerCla... |
using System.Collections.Generic;
using System.IO;
namespace DigitalFlare.Data.Csv {
public interface ICsvDataTableParser {
ICsvDataTable Parse(TextReader inputTextReader);
IEqualityComparer<string> ColumnNameEqualityComparer { get; }
IComparer<string> ColumnNameComparer { get; }
}
} |
<?php
namespace App\Support\Filesystem\Storages;
use Illuminate\Contracts\Filesystem\Filesystem;
use Illuminate\Support\Str;
use SplFileInfo;
class PublicStorage extends LocalStorage implements IHasUrlDiskStorage, IPublicPublishableStorage
{
use HasUrlDiskStorage;
public const NAME = 'public';
public f... |
<?php
// Copyright (C) 2010-2011 Aron Racho <aron@mi-squred.com>
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later ver... |
import { sagas as cognitoSagas } from 'modules/cognito-users'
export const startSaga = (store, { key, saga }) => {
if (!store.runningSagas[key]) {
store.runningSagas[key] = store.sagaMiddleware.run(saga)
}
}
/* sync sagas = ones that run from the first page load rather than async */
export const syncSagas = {... |
package com.realworld.springmongo.security
import helpers.ImportAppSecurity
import helpers.authorizationToken
import org.assertj.core.api.Assertions.assertThat
import org.junit.jupiter.api.Test
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.autoconfigure.web.reactive... |
package main
// github.com/EndlessCheng/codeforces-go
func minOperations(n int) (ans int) {
for i := 1; i < n; i += 2 {
ans += n - i
}
return
}
|
/*
* Copyright (c) 2014 Daniel Lo Nigro (Daniel15)
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
using JSPool.Exceptions;
using System;
using System.Collections.Concurrent;
using System.Diagnostics;
using System.Threading... |
import kotlin.test.assertEquals
enum class Season {
WINTER
SPRING
SUMMER
AUTUMN
}
fun foo(x : Any) : String {
return when (x) {
Season.WINTER -> "winter"
Season.SPRING -> "spring"
Season.SUMMER -> "summer"
else -> "other"
}
}
fun box() : String {
assertEqua... |
/*
* 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 may ... |
-- show engines
SHOW ENGINES;
/*
Default Storage Engine is InnoDB
Others Engines are: MyISAM, MEMORY, CSV, BLACKHOLE, ARCHIVE, MERGE_MYISAM, performance, FEDERATED
*/
CREATE TABLE IF NOT EXISTS test(
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(30)
)ENGINE = InnoDB;
-- check engine information of a schema
SELECT t... |
package amf.core.vocabulary
object ValueType {
def apply(ns: Namespace, name: String) = new ValueType(ns, name)
def apply(iri: String): ValueType =
if (iri.contains("#")) {
val pair = iri.split("#")
val name = pair.last
val ns = pair.head + "#"
new ValueType(Namespace(ns), name)
}... |
pub mod driver;
pub mod script;
pub mod script_system;
// pub use crate::driver;
pub mod prelude{
pub use crate::script;
pub use crate::driver;
pub use crate::script_system;
}
|
//Figura 6.9: JogoDeDados.java --> tradução em ingles Craps.java
//A classe Craps simula o jogo de dados craps.
import java.util.Random;
public class JogoDeDados
{
//cria gerador de números aleatorios para uso no metodo rolagem de dados
private static final Random numerosAleatorios = new Random();
//enum... |
---
title: AEM Dynamic Media Classic IPS APIs
description: Introduction to Dynamic Media Classic IPS APIs.
version: Cloud Service
role: Developer
level: Intermediate
feature: Dynamic Media Classic, APIs
topic: Development
index: y
exl-id: ef4fd51c-975a-400c-8427-555b77897a09
---
# AEM Dynamic Media Classic IPS APIs
Th... |
package db
import (
"errors"
"fmt"
"os"
"strconv"
"strings"
)
func createDirIfNotExist(dir string) error {
if _, err := os.Stat(dir); err == nil {
return nil
}
err := os.Mkdir(dir, 0755)
return err
}
func mergeToExisting(array []interface{}, entity interface{}) ([]interface{}, error) {
array = append(ar... |
module.exports = {
siteName: 'Lightwave',
locale: 'en',
images: {
lazyload: true,
},
};
|
# Launch a new Debian VM with this startup script
#
# First, update the pack list
apt update
#
# We will need git to fetch the codelab sources
apt install -y git
#
# claat will convert markdown source to web pages
wget https://github.com/googlecodelabs/tools/releases/download/v2.1.2/claat-linux-amd64
chmod +x claat-lin... |
# -*- coding: utf-8 -*-
#
import copy
class LineBase(object):
_ID = 0
dimension = 1
def __init__(self, id0=None):
if id0:
self.id = id0
else:
self.id = 'l{}'.format(LineBase._ID)
LineBase._ID += 1
return
def __neg__(self):
neg_self ... |
package com.dowhile.android.dorahasin;
import android.app.Application;
import android.content.Context;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import io.flic.lib.FlicManager;
public class MainApplication extends Application {
private static Context context;
@... |
using System;
namespace Common.Messages
{
public class WorkerStatusMessage
{
public string Message { get; set; }
public string Source { get; set; }
public string TaskId { get; set; }
public DateTime TimeStamp { get; set; } = DateTime.UtcNow;
public long Ticks { get; set... |
package exporter
import (
"log"
"net"
"github.com/oschwald/geoip2-golang"
)
var (
dbPath string
database = &GeoIPDatabase{}
internalSubnets = []string{
"10.0.0.0/8",
"172.16.0.0/12",
"192.168.0.0/16",
}
)
type GeoIPDatabase struct {
db *geoip2.Reader
fileHandler string
}
fun... |
package com.design.patterns.structural.facade.solution;
public class Client1 {
public static void main(String[] args) {
VideoConversionFacade facade = new VideoConversionFacade();
facade.convertVideo("youtubevideo.mp4", "mp4");
}
} |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Fonlow.SyncML.OpenContacts
{
/// <summary>
/// This class is for binding without using configuration and reflection, as program's configuration cares
/// only DataSource, not Provider.
/// </summa... |
import {PrivilegesConstants} from "../constants/actions-types"
export default (state={}, action) => {
switch (action.type) {
case PrivilegesConstants.GET_PRIVILEGES:
return { ...state, privileges: action.privileges }
case PrivilegesConstants.CLEAR_PRIVILEGES:
const { privile... |
-- the insert Statement
--1 always desc the table before making any insert to know the columns and the constraints
DESC DEPARTMENTS;
--2 try to have a look on table constraints
--go to tables from the tree on the left, select the table, and then see the constraints
--note: the constraint will be discussed in details ... |
<?php
namespace Application\Controller;
class EnviadosController extends CrudController {
public function __construct() {
parent::__construct('enviado');
$this->setFormWithEntityManager(TRUE);
}
public function indexAction($filtro = [], array $orderBy = [], \Doctrine\ORM\QueryBuilder $li... |
---
layout: rsk
title: RIF Marketplace Testnet
tags: rif, marketplace, testnet
---
You can access the Marketplace on the RSK Testnet: [marketplace.testnet.rifos.org](https://marketplace.testnet.rifos.org/)
## Wallet Setup
1. Download a browser wallet. Recommended: [Nifty Wallet](https://chrome.google.com/webstore/de... |
namespace MassEffect.GameObjects.Projectiles
{
using Interfaces;
public class Laser : Projectile
{
public Laser(int damage)
: base(damage)
{
}
public override void Hit(IStarship ship)
{
var remainder = this.Damage - ship.Shields;
... |
import logging
from webexteamssdk.models.cards import Colors, TextBlock, FontWeight, FontSize, Column, AdaptiveCard, ColumnSet, \
ImageSize, Image, Fact
from webexteamssdk.models.cards.actions import Submit
from webex_bot.models.command import Command, COMMAND_KEYWORD_KEY
from webex_bot.models.response import res... |
import React, { useEffect } from "react";
import * as THREE from "three";
import "./ballModel.css";
import * as dat from "dat.gui";
let scene, camera, renderer, sphere;
function BallModell() {
useEffect(() => {
document.querySelector("section.ballModel").appendChild(init());
animate();
});
function ini... |
/**
* Copyright 2017, Google, Inc.
* 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 i... |
use uptown_funk::{Executor, HostFunctions};
use crate::api::channel::ChannelReceiver;
use crate::module::LunaticModule;
use crate::api::{channel, networking, process, wasi};
pub struct DefaultApi {
context_receiver: Option<ChannelReceiver>,
module: LunaticModule,
}
impl DefaultApi {
pub fn new(context_re... |
<?php
// Veritabanı bilgileri Laravel .env dosyasından çekilmektedir.
$env = file_get_contents('../.env');
preg_match_all('/=(.*)/i',$env,$conf);
$dbname = trim($conf[1][7]);
$dbuser = trim($conf[1][8]);
$dbpass = trim($conf[1][9]);
try {
$db = new PDO('mysql:host=localhost;dbname='.$dbname.';charset=utf8',$dbuser... |
RSpec.describe NVidiaSMI do
subject { described_class.new(binary_path: nil, query_list: nil, name_prefix: nil) }
describe '#parser' do
it { expect(subject.parse(fixture_load('nvidia-smi-1.csv'))).to eq(JSON.load(fixture_load('parsed-1.json'))) }
it { expect(subject.parse(fixture_load('nvidia-smi-2.csv'))).... |
package utils;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.lang.reflect.Method;
/**
* BaseServlet用来作为其它Servlet的父类
*
* @author qdmmy6
*
* ... |
import chalk from "chalk"
import { Compiler, MultiCompiler, Configuration } from "webpack"
import webpackHotMiddleware from "webpack-hot-middleware"
import { compose } from "compose-middleware"
import { compilationMiddleware } from "./middleware/compilation-middleware"
import { devMiddleware } from "./middleware/dev-mi... |
import {
getEnvironmentFeatureState,
getEnvironmentFeatureStates,
getIdentityFeatureState,
getIdentityFeatureStates
} from '../../../flagsmith-engine';
import { CONSTANTS } from '../../../flagsmith-engine/features/constants';
import { FeatureModel, FeatureStateModel } from '../../../flagsmith-engine/fea... |
---
name: 🚀 Feature Request
about: Suggest an idea for a new feature to improve SlackClean.
title: ''
labels: 'Feature'
assignees: ''
---
Feature Requests Must Include:
= As much detail as possible for what should be added, what's missing, why it's important to SlackCleaner.
_( I'd love for you to share any tho... |
package xyz.hshuai.forum.mapper;
import xyz.hshuai.forum.dto.TalkQueryDTO;
import xyz.hshuai.forum.model.Talk;
import org.springframework.stereotype.Component;
/**
* @author Hshuai
* @version 1.0
* @date 2020/12/24 21:53
* @site hschool.hshuai.xyz
*/
@Component
public interface TalkExtMapper {
Integer count... |
{-# LANGUAGE Rank2Types, FlexibleContexts, ScopedTypeVariables #-}
-- Serialization/deserialization ("serdes") tests
module Tests.Serdes
(
qcProps
)
where
import Data.Serialize hiding (label)
import Data.Time.Clock
import Test.QuickCheck hiding (numTests)
import Test.QuickCheck.Monadic
import Halfs.Classes
i... |
// Fill out your copyright notice in the Description page of Project Settings.
#include "MVCPlayerState.h"
#include "Engine/Engine.h"
AMVCPlayerState::AMVCPlayerState()
{
PropertyMap.Add(TEXT("Speed"), 0);
}
int32 AMVCPlayerState::GetProperty(FString Key)
{
if (PropertyMap.Find(Key) != nullptr)
{
return Proper... |
/*
* Copyright 2010-2021 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.konan.blackboxtest.support.util
import com.intellij.psi.PsiElement
import com.in... |
package com.krossovochkin.core.presentation.result
import android.os.Bundle
import android.os.Parcelable
private const val KEY_RESULT = "result"
fun <T : Parcelable> Bundle.toResultParcelable(): T {
return this.getParcelable(KEY_RESULT)!!
}
fun Parcelable.toResultBundle(): Bundle {
return Bundle().apply {
... |
require 'spec_helper'
require 'fileutils'
RSpec.describe MicroBlitz::FileFinder do
subject { MicroBlitz::FileFinder.new }
let(:directory) { subject.directory }
let!(:micro_blitz_config) do
{
frequency: 1,
recurrence: 1,
chaoticness: 2,
directory: "test_dir"
}
end
before do
... |
var_in_invalid_list_variable_file = 'Not got into use due to error below'
LIST__invalid_list = 'This is not a list and thus importing this file fails' |
package model
// 运行时设备信息
type DeviceInfo struct {
CPUs int `json:"CPUs"`
PlatformFamily string `json:"platformFamily"`
KernelArch string `json:"kernelArch"`
}
// 处理器信息
type Processor struct {
Cores int32 `json:"cores"`
Name string `json:"name"`
Mhz float64 `json:"Mhz"`
CacheS... |
import logging
import os
import tempfile
from clipmanager import __name__, __org__
if os.name == 'nt':
from win32event import CreateMutex
from win32api import CloseHandle, GetLastError
from winerror import ERROR_ALREADY_EXISTS
else:
import commands
import os
logger = logging.getLogg... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.