text stringlengths 27 775k |
|---|
/*
* Copyright (C) Igor Sysoev
* Copyright (C) Nginx, Inc.
*/
#ifndef _NGX_THREAD_H_INCLUDED_
#define _NGX_THREAD_H_INCLUDED_
#include <ngx_config.h>
#include <ngx_core.h>
#if (NGX_THREADS)
#include <pthread.h>
typedef pthread_mutex_t ngx_thread_mutex_t;
ngx_int_t ngx_thread_mutex_create(ngx_thread_mutex_... |
module Tockhead
class Settings
cattr_accessor :api_key
cattr_accessor :secret
cattr_accessor :base_url
# set api key and secret from file - TEMP #
contents = File.open('tmp/creds').read rescue nil
contents = contents.split(",")
self.api_key = contents[0]
self.secret = contents[1]... |
package typingsSlinky.awsSdkServiceModel
import typingsSlinky.awsSdkBuildTypes.apiModelMod.ApiModel
import typingsSlinky.awsSdkBuildTypes.treeModelMod.TreeModel
import org.scalablytyped.runtime.StObject
import scala.scalajs.js
import scala.scalajs.js.`|`
import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSI... |
import React from 'react';
import { render } from '@testing-library/react';
import Home from './';
test('renders hero box', () => {
const { getByTestId } = render(<Home />);
const element = getByTestId('hero-box');
expect(element).toBeInTheDocument();
});
test('renders login box', () => {
const { getByTestI... |
require 'sinatra'
class IntegrationTestComponent < Sinatra::Base
# Polled by the integration test component runner to determine
# when a component is up and ready to receive requests.
get '/info' do
[200, {}, '']
end
end
class FakeServiceBroker < Sinatra::Base
use IntegrationTestComponent
use Rack::A... |
package middleware
import (
"net/http"
"github.com/rs/zerolog/log"
)
func LogMiddlewareFunc(h http.Handler) (http.Handler, error) {
var handlerFunc http.HandlerFunc = func(
w http.ResponseWriter,
r *http.Request) {
log.Info().
Int64("ContentLength", r.ContentLength).
Str("Method", r.Method).
Str("R... |
require "ruby-cbc"
require "sudoku/cbc/version"
require "sudoku/cbc/board"
require "sudoku/cbc/problem"
module Sudoku
module Cbc
# Your code goes here...
end
end
|
import React from 'react';
import { useState } from 'react';
import { useContext } from 'react';
import { useForm } from 'react-hook-form';
import { Button, Form, Grid, Message, Segment, Image } from 'semantic-ui-react';
import { Context } from '../../store/login-context';
import './styles.scss';
import logo from '../... |
# Genyman Core

### Work in progress
Docs currently here:
https://genyman.github.io/docs/
But not production ready, not feature complete, and breaking changes between updates!
Check back later, or STAR to follow up.
|
# TemplateConnector Component Reference
A React component that provides access to [Getters](getter.md) and [Actions](action.md) within a [Template](template.md).
## User reference
### Properties
Name | Type | Default | Description
-----|------|---------|------------
children | (getters: { [getterName: string]: any ... |
-- file:select_implicit.sql ln:18 expect:true
INSERT INTO test_missing_target VALUES (7, 4, 'cccc', 'h')
|
function Rename-ItemByPattern() {
<#
.SYNOPSIS
ファイル(ディレクトリ)名等を指定パターン文字列により変更します。
.DESCRIPTION
正規表現文字列によりファイル(ディレクトリ)名を変更します。
.PARAMETER Path
名前変更対象のファイル(ディレクトリ)のパスを指定します。
.PARAMETER Pattern
置換する正規表現文字列を指定します。。
.PARAMETER Replacement
置換後文字列を指定します。
#>
param(
[Parameter(Mandatory, ValueFr... |
package com.twitter.scrooge
trait HasThriftStructCodec3[T <: ThriftStruct] {
def _codec: ThriftStructCodec3[T]
}
|
from django.db import models
from django.contrib.auth.models import User
departments = [('Cardiologist', 'Cardiologist'),
('Dermatologists', 'Dermatologists'),
('Emergency Medicine Specialists',
'Emergency Medicine Specialists'),
('Allergists/Immunologists'... |
import * as jsonld from 'jsonld';
import {
Injectable, OnDestroy, ComponentFactoryResolver,
ComponentRef,
} from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { concat, from, Subject, BehaviorSubject, Observable, of, EMPTY } from 'rxjs';
import { filter, catchError, first } from 'rxjs/o... |
# Chat
Create a chat with [socket.io](https://github.com/socketio/socket.io).
## Resources
* [Node: De cero a experto](https://www.udemy.com/course/node-de-cero-a-experto/)
## License
MIT
|
/*
* This file is part of the librarian application.
*
* Copyright (c) 2017 Miguel Angel Gabriel <magabriel@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code
*/
package com.mags.librarian.options
import org.junit.jupiter.api... |
import React from 'react';
import ProgressBar from '../commons/ProgressBar';
interface BackupCodesLoaderProps {
title: string;
}
export const BackupCodesLoader = ({title}: BackupCodesLoaderProps) => (
<>
<p className="backup-loader-label">{title}</p>
<ProgressBar className="backup-loader" />
</>
);
exp... |
# Install Docker 0.9.0
package "docker" do
package_name "lxc-docker-0.9.0"
action :install
end
|
package typingsSlinky.bingmaps.Microsoft.Maps.Directions
import org.scalablytyped.runtime.StObject
import scala.scalajs.js
import scala.scalajs.js.`|`
import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, JSBracketAccess}
@js.native
sealed trait TimeType extends StObject
@JSGlobal("Microsoft.... |
/**
* 700. 二叉搜索树中的搜索
*
* https://leetcode-cn.com/problems/search-in-a-binary-search-tree/
*
* Easy
*
* 116ms 90.57%
* 42.3mb 15.47%
*/
const searchBST = (root, val) => {
if (!root) {
return null
}
if (root.val === val) {
return root
}
if (root.val > val) {
return searchBST(root.left, ... |
using System;
namespace Realmar.DataBindings
{
[Serializable]
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = true, Inherited = true)]
public class BindingTargetAttribute : Attribute
{
public int Id { get; }
public BindingTargetAttribute(int id = 0)
{
Id = id;
}
}
}... |
#
# Sets Prezto options.
#
#
# General
#
# Theme to use down below in prompt section
# Other themes I like:
# sorin, steeef, cloud, agnoster, sorin-apj, apjanke-01
_ZPREZTO_THEME="sorin-apj"
# Set case-sensitivity for completion, history lookup, etc.
zstyle ':prezto:*:*' case-sensitive 'no'
# Color output (auto s... |
package spark_core.rdd.operator.transform
import org.apache.spark.rdd.RDD
import org.apache.spark.{SparkConf, SparkContext}
object Transform_17_kv_aggregateByKey {
def main(args: Array[String]): Unit = {
// TODO 创建环境
val sparkConf = new SparkConf().setMaster("local[*]").setAppName("Operator")
val sc = ... |
from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'^index$', views.index, name='index'),
url(r'^projects$', views.projects, name='projects'),
url(r'^project/(?P<project_id>\d+)$', views.project, name='project'),
url(r'^controller/(?P<c... |
package com.skyinu.hprof.reader.model
import okio.BufferedSource
class HprofTagHeapSummary(bufferedSource: BufferedSource, parent: HprofTag) {
var totalLiveBytes = 0
var totalLiveInstance = 0
var totalByteAllocate = 0L
var totalInstanceAllocated = 0L
init {
totalLiveBytes = bufferedSource... |
package com.ghstudios.android.features.monsters.list
import android.app.Application
import androidx.lifecycle.AndroidViewModel
import androidx.lifecycle.MutableLiveData
import com.ghstudios.android.data.classes.Monster
import com.ghstudios.android.data.classes.MonsterClass
import com.ghstudios.android.data.DataManager... |
<?php
namespace Freshcells\Cache\GeneratableKeyCache\KeyGenerator;
use Freshcells\Cache\GeneratableKeyCache\Exception\KeyGeneratorException;
/**
* Class Sha1ShortGenerator
* @package Freshcells\Cache\GeneratableKeyCache\KeyGenerator
*/
class Sha1ShortGenerator implements KeyGeneratorInterface
{
protected $pre... |
var space = new CanvasSpace("#pt_canvas").setup({bgcolor: "#f1f3f7", resize: true, retina: true});
var form = space.getForm();
//// Code starts here ---
let grid = [];
let closest = null;
// Find the closest point on the grid
function findClosest( p ) {
let m = Number.MAX_VALUE;
let c = null;
for (let ... |
# netre
Utility to restart network connection on failure.
## TODO
* Write better readme and usage information
* Address publishing mechanism
* Support for other systems
## License
[MIT](LICENSE)
|
TEST_PROJECT = "all-of-us-workbench-test"
def make_gae_vars(min_idle_instances = 0, max_instances = 10, instance_class = 'F1')
{
"GAE_MIN_IDLE_INSTANCES" => min_idle_instances.to_s,
"GAE_MAX_INSTANCES" => max_instances.to_s,
'GAE_INSTANCE_CLASS' => instance_class
}
end
def env_with_defaults(env, confi... |
package de.wias.nonparregboot.classifier
import breeze.linalg.{DenseVector, softmax, sum}
import breeze.numerics.exp
import org.platanios.tensorflow.api.core.Shape
import org.platanios.tensorflow.api.tensors.Tensor
import scalapurerandom.DV
case class ClassificationResults(scores: TFloat // nstar * m
... |
<?php
namespace App\Http\Controllers;
use App\Models\AppliedJobs;
use App\Models\Jobs;
use App\Models\Profile;
use App\Services\UserService;
use Illuminate\Http\Request;
use Auth;
use DB;
class DashboardController extends Controller
{
public function dashboard()
{
if (Auth::user()->role === 'Employee... |
package framian.benchmark
import scala.util.Random
import org.openjdk.jmh.annotations.{ Benchmark, Scope, State }
import framian.Column
import framian.column.Mask
class ColumnFilterBenchmark {
import Data.work
@Benchmark
def dense(data: FilterData): Int =
work(data.denseColumn.filter(data.p), data.size)
... |
<!---
# This file is part of the pl.wrzasq.commons.
#
# @license http://mit-license.org/ The MIT license
# @copyright 2022 © by Rafał Wrzeszcz - Wrzasq.pl.
-->
# Ktor feature
`XRayFeature` integrates [**AWS X-Ray**](https://aws.amazon.com/xray/) tracing for HTTP clients.
```kotlin
val httpClient = HttpClient(engine)... |
package io.github.gravetii.scene.start
import io.github.gravetii.scene.FxDimensions
import io.github.gravetii.scene.FxScene
import io.github.gravetii.scene.menu.MenuBarComponent
import javafx.geometry.Dimension2D
import javafx.stage.Stage
class StartScene(stage: Stage) : FxScene(stage) {
private val menuBarCompo... |
# -*- encoding : utf-8 -*-
#
# $Id: depreciation_param.rb 2474 2011-03-23 15:28:08Z ichy $
# Product: hyacc
# Copyright 2009 by Hybitz.co.ltd
# ALL Rights Reserved.
#
module Auto::Journal
class DepreciationParam < Auto::AutoJournalParam
attr_reader :depreciation
attr_reader :user
de... |
#!/bin/bash
export PATH="/opt/homebrew/bin:/usr/local/bin:${PATH}"
caffeinate & # Prevent computer from going to sleep
tmp_dir="$(mktemp -d)"
curl --location 'https://github.com/vitorgalvao/dotfiles/archive/master.zip' | ditto -xk - "${tmp_dir}"
for shell_script in "${tmp_dir}/dotfiles-master/scripts/"*.sh; do
sou... |
class BaseMailer < ActionMailer::Base
default :from => Setting.mailer.sender
default :charset => "utf-8"
default :content_type => "text/html"
default_url_options[:host] = Setting.domain
layout 'mailer'
end
|
package com.skai.snapboard;
import android.content.Context;
import android.database.Cursor;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CursorAdapter;
import android.widget.Imag... |
package com.jiangjg.lib.JavaAndPattern.TH12;
public class BadFruitException extends Exception{
public BadFruitException(String msg){
super(msg);
}
}
|
// Copyright (c) 2019 Doyub Kim
//
// I am making my contributions/submissions to this project solely in my
// personal capacity and am not conveying any rights to any intellectual
// property of any third parties.
#include <pch.h>
#include <jet/parallel.h>
#include <jet/particle_emitter3.h>
#include <limits>
names... |
<?php
namespace App\Library\EmailDirect;
/**
* Description of Orders
*
* @author mlapko
*/
class EmailDirect_Orders extends EmailDirect_Resource
{
/**
* @link http://docs.emaildirect.com/#OrderList
* @param array $options
* @return EmailDirect_Response
*/
public function all($options = a... |
package dataprotocol.buffered
import dataprotocol.DataProtocol
import dataprotocol.Protocol
import java.lang.IllegalStateException
import java.nio.ByteBuffer
import java.nio.ByteOrder
class ProtocolBuffer(
private val byteBuffer: ByteBuffer,
private val protocol: Protocol
): Iterator<Any> {
private latei... |
import { Injectable } from '@angular/core';
import { File } from '@ionic-native/file/ngx';
//eclare var cordova: any;
// const fs:string = cordova.file.dataDirectory;
//const fs: string = cordova.file.externalDataDirectory;
import * as XLSX from 'ts-xlsx';
@Injectable({
providedIn: 'root'
})
export class ExcelServi... |
#!/usr/bin/env bash
dt=$(date '+%d/%m/%Y %H:%M:%S')
# http://docs.openlinksw.com/virtuoso/rdfperfdumpandreloadgraphs/
# Definition of the isql connection to Virtuoso
bin="isql-vt"
host="virtuoso"
port=1111
user="dba"
password=${DBA_PASSWORD}
export_dir="${VIRTUOSO_DATA_DIR}"
# Wrap the execution of isql commands t... |
# Sorted-Square-List-2
Sorted square list data structure using merged linked lists to store the data
See project description pdf for more information
|
#!/bin/sh
{
echo "mcr.microsoft.com/mssql/server:2017-CU12"
echo "ibmcom/db2:11.5.0.0a"
} > spring-data-jdbc/src/test/resources/container-license-acceptance.txt |
<?php declare(strict_types=1);
namespace Torr\Rad\Entity\Interfaces;
/**
* Interface for automatic integration in the sortable helpers.
*/
interface SortableEntityInterface extends EntityInterface
{
/**
*/
public function getSortOrder () : ?int;
/**
*/
public function setSortOrder (int $sortOrder) : void;... |
package me.pisal.compass_sensor
import android.content.Context
import android.hardware.Sensor
import android.hardware.SensorEvent
import android.hardware.SensorEventListener
import android.hardware.SensorManager
import android.util.Log
import android.view.animation.Animation
import android.view.animation.RotateAnimati... |
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
namespace Tensorflow.UnitTest
{
public class TestHelper
{
public static string GetFullPathFromDataDir(string fileName)
{
var dir = Path.Combine(Directory.GetCurrentDirectory(), "..", "..", "..", "..... |
EnabledLanguagesLogger = ActiveSupport::Logger.new(Rails.root.join('log/enabled_languages.log'))
EnabledLanguagesLogger.formatter = Logger::Formatter.new |
using System;
namespace OrigoDB.Core
{
public class LocalEngineClient<TModel> : IEngine<TModel> where TModel : Model
{
public readonly Engine<TModel> Engine;
public LocalEngineClient(Engine<TModel> engine)
{
Engine = engine;
}
public TResult Execute<TResu... |
#!/bin/sh
# Adapted from http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html
# Converts a series of png files (named 1.png 2.png ... n.png) in a folder $1
# to a movie $2, which is then converted to a gif $3.
palette="/tmp/palette.png"
filters="fps=1"
find $1 -name "[0-9]*.png" -print0 | while read -d $'\0' fi... |
require 'helper'
require 'striped/proxy/discount'
describe Striped::Proxy::Discount do
let(:client) { double('client') }
let(:arguments) { double('arguments') }
let(:api_response) { double('api_response') }
let(:resource_id) { 'customer_id' }
subject(:proxy) { Striped::Proxy::Discount.new(client... |
import React, { Component } from "react";
import MouseMonitor from "./MouseMonitor";
interface Props {
onMouseOver: (content: JSX.Element) => void;
popupContent: JSX.Element;
onMouseOut: () => void;
children: JSX.Element;
}
interface State {
mouseIn: boolean;
}
export class Popup extends Component<Props, ... |
// @flow
import cx from 'classnames';
import { createField } from './Field';
import Textarea from 'react-textarea-autosize';
import styles from './TextInput.css';
type Props = {
type?: string,
className?: string,
inputRef?: any,
readOnly?: boolean,
};
function TextArea({
type = 'text',
className,
input... |
<?php
ini_set("memory_limit", "1024m");
function reconn() {
echo "Reconnect\n";
$cli = new swoole_client(SWOOLE_SOCK_TCP, SWOOLE_SOCK_ASYNC);
$cli->on("connect", function(swoole_client $cli) {
// client 发送 大包数据
$cli->send(str_repeat("\0", 1024 * 1024 * 1.9));
});
$cli->on("receive",... |
//------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//------------------------------------------------------------
namespace System.ServiceModel.Syndication
{
using System.Xml;
using System.Runtime.CompilerServices;
// NOTE: This cla... |
<h1>Thêm lớp</h1>
<form action="{{ route('grade.store')}}" method="post">
@csrf
Tên <input type="text" name="name" required><br>
<button>them</button>
</form>
|
<?php
use App\Unidad;
use Illuminate\Database\Seeder;
class UnidadSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
factory(Unidad::class)->create([
'nombre' => 'Litros',
'simbolo' => 'L',
]);
... |
const gulp = require("gulp");
const sourcemaps = require("gulp-sourcemaps");
const ts = require("gulp-typescript");
const tslint = require("gulp-tslint");
const tsProject = ts.createProject("tsconfig.json");
let node = null;
gulp.task("build", function() {
return tsProject
.src()
.pipe(sourcemaps... |
require 'spec_helper'
describe "indent-based languages, not using matchit" do
let(:filename) { 'test.py' }
specify "Removes a wrapping if-clause" do
set_file_contents <<~EOF
if one:
if two:
if three:
pass
EOF
vim.search 'two'
vim.command 'Deleft'
... |
/* eslint-disable @typescript-eslint/ban-ts-comment */
/* eslint-disable unused-imports/no-unused-vars-ts */
import {
Body,
Controller,
Get,
Global,
INestApplication,
Module,
Patch,
Post,
Put,
Query,
} from '@nestjs/common';
import { Test, TestingModule } from '@nestjs/testing';
import * as Joi fro... |
using UnityEngine;
using System.Collections.Generic;
public class InputProxy : MonoBehaviour
{
public static InputProxy Instance { get; private set; }
public List<KeyCode> disabledKeys = new List<KeyCode>();
void Start()
{
Instance = this;
}
void OnDestroy()
{
Instance = null... |
package ru.ir.steam.dto;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import java.io.Serializable;
@Data
public class AcceptSellResponse implements Serializable {
@JsonProperty("success")
private boolean success;
@JsonProperty("requires_confirmation")
private int requir... |
<?php
session_start();
if(isset($_SESSION['userid'])){
header('location:home.php');
}
$conn = new mysqli("localhost","root","","movie");
if(isset($_POST['btn']))
{
//Get values passed from form in login.php file
$username = $_POST['user'];
$password = $_POST['pass'];
//To prevent MySql injectio... |
<?php
class org_glizy_middleware_DynamicPage extends org_glizy_middleware_AbstractHttpCache
{
public function beforeProcess($pageId, $pageType)
{
}
public function afterRender($content)
{
$this->etag = md5($content.var_export(__Request::getAllAsArray(), true));
$this->checkIfIsChang... |
env :PATH, ENV['PATH']
every 5.minutes do
runner 'Schedule.schedule; Run.schedule'
end
every 1.minutes do
check = '(ps aux | grep sidekiq | grep -v grep) > /dev/null'
restart = "(cd #{path} && bundle exec cap localhost sidekiq:restart)"
command "#{check} || #{restart}"
end
every 1.day do
rake 'sessions:... |
-- @testpoint:opengauss关键字procedural非保留),作为序列名
--关键字不带引号-成功
drop sequence if exists procedural;
create sequence procedural start 100 cache 50;
drop sequence procedural;
--关键字带双引号-成功
drop sequence if exists "procedural";
create sequence "procedural" start 100 cache 50;
drop sequence "procedural";
--关键字带单引号-合理报错
dro... |
package util
import (
"path"
"path/filepath"
"strings"
)
func ChangeExtension(filename, newExt string) string {
file := filepath.Base(filename)
return strings.TrimSuffix(file, path.Ext(file)) + newExt
}
|
export class ForwardRef<T = any> {
constructor(private forwardRefFn: () => T) {
}
getRef() {
return this.forwardRefFn();
}
}
/**
* 引用后声明的类的工具函数
* @param fn
*/
export function forwardRef<T>(fn: () => T) {
return new ForwardRef<T>(fn);
}
|
import React, { useCallback, useContext, useEffect } from 'react';
import { useSelector } from 'react-redux';
import { gameSelector } from '../../../../features/game';
import { gameSocketMsg, SocketSendTag } from '../../../../socket';
import { SecondaryAction } from '../../_shared_/SecondaryAction';
import { RaiseConte... |
from yggdrasil.metaschema.encoder import encode_yaml, decode_yaml
from yggdrasil.serialize.JSONSerialize import JSONSerialize
class YAMLSerialize(JSONSerialize):
r"""Class for serializing a python object into a bytes message using YAML.
Args:
indent (str, int, optional): String or number of spaces th... |
(ns simple-symbolic-regression-clojure.interpreter
(:use [clojure.math.numeric-tower])
)
;;; Interpreter
(defn translate-op [op]
"Translate operators from the symbolic regression language to
the appropriate Clojure operator for evaluation. A key goal
here is replacing +, -, and * with +', -', and *' so we... |
// WITH_RUNTIME
// NO_INTERCEPT_RESUME_TESTS
class Controller {
var result = ""
suspend fun <T> suspendAndLog(value: T): T = suspendWithCurrentContinuation { c ->
result += "suspend($value);"
c.resume(value)
Suspend
}
// Tail calls are not allowed to be Nothing typed. See KT-1... |
from collections import namedtuple
from games import (Game)
class GameState:
def __init__(self, to_move, board, label=None):
self.to_move = to_move
self.board = board
self.label = label
def __str__(self):
if self.label == None:
return super(GameState, self).__str__(... |
require "rails_helper"
RSpec.shared_examples_for "paginable" do
let(:model) { described_class }
let!(:bucketlists) { create_list(:bucketlist, 10) }
context "when page 1" do
it "returns paginated records" do
results = model.paginate(page: 1, limit: 5)
expect(results.size).to eq(5)
expect(re... |
# frozen_string_literal: true
# Copyright 2020 Google LLC
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... |
// Copyright (c) André N. Klingsheim. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using NWebsec.Core.Common.HttpHeaders;
using NWebsec.Core.Common.HttpHeaders.Configuration;
using NWebsec.Core.Common.Middleware.Options;
usi... |
{-# LANGUAGE FlexibleInstances #-}
module SimpleJSON (
JValue(..),
renderJValue,
pretty,
compact
) where
import Numeric (showHex)
import Data.Bits (shiftR, (.&.))
import Data.Char (ord)
import Control.Arrow (second)
data JValue =
JString String
| JNumber Double
| JBool... |
sudo apt install python3-pip
sudo /usr/bin/python3 -m pip install --upgrade pip
sudo pip3 install enquiries
sudo pip3 install requests
sudo pip3 install colorama
cd Tools/torghost
./build.sh
echo Process finish, now you can run delvedleak.py |
using UnityEngine;
public interface IDamageable
{
void GetDamage(float damageValue);
}
|
# Developer Guide
This guide is intended for plugin developers. If you are not developing kubectl
plugins, read the [User Guide](./USER_GUIDE.md) to learn how to use krew.
This guide explains how to package, test, run plugins locally and make them
available on the krew index.
<!-- TOC depthFrom:2 -->
- [Developing ... |
package de.adorsys.dfs.connection.api.domain;
import java.io.Closeable;
import java.io.InputStream;
/**
* Created by peter on 05.03.18 at 08:33.
*/
public interface PayloadStream extends Closeable {
/**
* returns the inputstream of the data. The receiver is responsible for closing the stream
*/
In... |
addEventListener('fetch', (e) => {
e.respondWith(new Response('Page ok'))
})
|
import { CoordGrid, Node } from 'engine/models';
import _config from 'engine/config';
import _map from 'engine/map';
import _coords from './coords';
/**
* Checks whether the provided coordinates lie within the zone specified
* @param from The start coords of the zone
* @param to The end coords of the zone (inclusiv... |
<?php
namespace Sujip\PayPal\Notification\Http;
use Exception;
use GuzzleHttp\Client;
use GuzzleHttp\ClientInterface;
use Sujip\PayPal\Notification\Contracts\Service;
use Sujip\PayPal\Notification\Exceptions\ServiceException;
use Sujip\PayPal\Notification\Payload;
/**
* Class Request.
*
* @package Sujip\PayPal\No... |
export interface Erro500 {
message: string;
}
export interface Erro412 {
level?: string;
schema?: Schema;
instance?: Instance;
domain?: string;
keyword?: string;
message?: string;
required?: string[];
missing?: string[];
}
export interface Instance {
pointer?: string;
}
export interface Schema {
... |
#!/bin/sh
# Installing waagent
echo "***WA Agent Installation***"
if [ -e /root/agent.py ]; then
dos2unix -q /root/agent.py
echo "Setting Execute bit on agent.py"
chmod +x /root/agent.py
mv /root/agent.py /usr/sbin/waagent
/usr/sbin/waagent -setup
sts=$?
if [ 0 -... |
module Plink
class CampaignRecord < ActiveRecord::Base
self.table_name = 'campaigns'
include Plink::LegacyTimestamps
alias_attribute :campaign_hash, :urlCParam
alias_attribute :media_type, :mediaType
alias_attribute :is_incent, :isIncent
attr_accessible :campaign_hash, :name, :media_type, ... |
#
require 'date'
#
class Person
def initialize(h)
h.keys.each do |key|
instance_variable_set(('@' + key.to_s).to_sym, h[key])
self.class.send(:attr_reader, key)
end
end
def age
dob = Date.parse(@dob)
today = Date.today
if dob.month > today.month ||
dob.month == today.month ... |
object Main extends App {
val source = scala.io.Source.fromFile(args(0))
val lines = source.getLines.filter(_.length > 0)
def swp(s: String): String =
s.takeRight(1) + s.slice(1, s.length - 1) + s.take(1)
for (l <- lines)
println(l.split(" ").map(swp).mkString(" "))
}
|
import React from "react"
import Tag from './tag'
export default class Tags extends React.Component {
render() {
const {
tags
} = this.props;
const Tags = (tags || []).map(tag => <Tag key={tag} tag={tag} />)
return (
Tags
)
}
}
|
s = 0
x = int(input())
while x != 0:
s += x
x = int(input())
print(s) |
# you can write to stdout for debugging purposes, e.g.
# puts "this is a debug message"
def solution(n)
binary_n = convert_to_binary(n)
current, longest = 0, 0
seen_start_one = false
seen_end_one = false
binary_n.each_char do |c|
if c == "0"
current += 1
longest = [longest, current].max
... |
package retail.storage
import cats.data.State
import cats.effect.IO
import cats.effect.concurrent.Ref
import retail.fsm.{
AllocationState,
Command,
Event,
InventoryItemAdded,
NewInventoryItem,
NewOrderItem,
OrderItemAdded
}
case class Persister(state: Ref[IO, List[Event]])
extends ((Command, Allocat... |
package com.wuruoye.know.util.orm.table
import androidx.room.Entity
import androidx.room.Index
import androidx.room.PrimaryKey
/**
* Created at 2019/4/9 20:27 by wuruoye
* Description:
*/
@Entity(tableName = "record_item",
indices = [Index("createTime", "recordId", "type", "typeId")])
class RecordItem(
... |
var should = require('chai').should();
var sep = require('path').sep;
var libFolder = __dirname + sep + 'lib' + sep;
describe('end to end test', function() {
var loadIntervalPtr;
var loadInterval = 1;
before(function(){
loadIntervalPtr = setInterval(function(){
var randomOpResult = ((Math.random()... |
################################################################################
# (C) Copyright 2016-2020 Hewlett Packard Enterprise Development LP
#
# 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 Licen... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.