text stringlengths 27 775k |
|---|
package com.test.luxpmtestapp
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
abstract class BaseActivity:AppCompatActivity() {
abstract var resourceId:Int
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(resourc... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*- ########################################################
# ____ _ __ #
# ___ __ __/ / /__ ___ ______ ______(_) /___ __ #
# / _ \/ // / / (_-</ -_) __/ // / __/ / __/ // / ... |
plugins {
id(libs.plugins.kotlin.multiplatform.get().pluginId)
alias(libs.plugins.arrowGradleConfig.kotlin)
alias(libs.plugins.arrowGradleConfig.publish)
}
kotlin {
explicitApi = null
}
apply(from = property("TEST_COVERAGE"))
apply(from = property("ANIMALSNIFFER_MPP"))
kotlin {
sourceSets {
jvmMain {
... |
---
title: 'Chapter 3: R0'
permalink: 'chapters/ob18/c3/intro'
previouschapter:
url: chapters/ob18/c2/r
title: 'Original R code'
nextchapter:
url: chapters/ob18/c3/r
title: 'Original R code'
redirect_from:
- 'chapters/ob18/c3/intro'
---
## Chapter 3: R0 |
import io.kotest.core.spec.style.FunSpec
import io.kotest.matchers.shouldBe
class PlatformNameTestNative : FunSpec({
test("platform name should be native") {
platformName() shouldBe "native"
}
// Comment this in for a failed test
// test("my only purpose is to fail!") {
// platformName() sho... |
subroutine nurbl(ioption,
* k1,k1points,
* m1,ia,s,w,x,y,z,v,
* irow,ipt,ict,icttot,
* npoints,ntets,nbpoints,nbtets,
* itoff,jtoff)
C
C#######################################################################
C... |
//dog
function dog() {
const inp = document.createElement("button");
inp.setAttribute("type", "button");
let text = document.createTextNode("dog");
inp.setAttribute("class", "mmm");
inp.appendChild(text);
inp.setAttribute("id", "dog");
document.getElementById("body").appendChild(inp);
}
dog();
document... |
name "scm_helper"
description "Offers a few library functions to interact with source control systems"
maintainer "AWS OpsWorks"
license "Apache 2.0"
version "1.0.0"
depends "opsworks_commons"
depends "s3_file"
|
{-# LANGUAGE CPP #-}
module MacAddress where
import Data.Binary (decode)
import qualified Data.ByteString.Lazy as BSL
import Safe (headDef)
#ifdef ETA_VERSION
import Java
import Data.Maybe (catMaybes)
import Data.Traversable (for)
import Data.Word (Word64... |
from __future__ import annotations
from abc import abstractmethod
from typing import TypeVar, Iterator, List, Tuple
from .Typing import POS_T, PTS_T
class SexpNode():
"""Sexp Node Implementation
This class is used to represent a single node in an s-expressionself.
It can be used to represent a list of no... |
package appshop.modules.sys.dto
import appshop.annotation.*
import org.hibernate.validator.constraints.*
/**
* Created with IntelliJ IDEA
* USER:jin
* CLASSNAME: AccountDTO
* DATE: 2021/3/26
* TIME: 14:17
* JDK 1.8
*/
@noArg
data class AccountDTO(
@field:NotBlank(message = "username can not null")
@f... |
package com.example.aquam.base
import androidx.fragment.app.Fragment
import com.example.aquam.ui.MainActivity
abstract class BaseFragment : Fragment(), BaseView {
override fun showProgressDialog() {
(activity as MainActivity).showProgressDialog()
}
override fun hideProgressDialog() {
(ac... |
import os
from koosli.search_providers import bing, yahoo
DEBUG = True
SECRET_KEY = 'not a secret'
SPLASH_REGISTRATION = False
#=========================================
# Search Providers
#=========================================
SEARCH_PROVIDERS = {
'bing': bing.BingMock,
'yahoo': yahoo.YahooMock,
}
#... |
#ifndef MDSU_INSN_H
#define MDSU_INSN_H
#include <inttypes.h>
typedef uint8_t reg_t;
typedef uint32_t insn_off_t;
#define MACHINIC 0b00 // base machine commands
#define CONSTANT 0b01 // 24Bit constant
#define CALL 0b10 // Optimized call
#define EXTENDED 0b11 // Extended constant definition
#define ... |
using System.Collections;
namespace Smith
{
public abstract class SmithBase : ISmith
{
private Hashtable _context;
public void SetContext(Hashtable context)
{
_context = context;
}
protected void AddToContext(object original, object clone)
{
... |
<?
$MESS['F_ACTIVE'] = "Активність";
$MESS['PROPS_GROUP_DEFAULT_NAME'] = "Властивості замовлення";
$MESS['SPTEN_2FLIST'] = "Список типів платників";
$MESS['SPTEN_ACTIVE'] = "Активність";
$MESS['SPTEN_ADDING'] = "Додавання нового типу платника";
$MESS['SPTEN_APPLY'] = "Застосувати";
$MESS['SPTEN_CANCEL'] = "Скинути";
$M... |
# frozen_string_literal: true
require 'rails_helper'
RSpec.describe Jobs::CleanUpDeprecatedUrlSiteSettings do
before do
@original_provider = SiteSetting.provider
SiteSetting.provider = SiteSettings::DbProvider.new(SiteSetting)
end
after do
SiteSetting.delete_all
SiteSetting.provider = @original... |
const assert = require('assert');
//const os = require("os");
const { execFile } = require('child_process');
describe("Command Line - Help", function() {
// noglifyjs -h
describe("noglifyjs -h", function() {
it("is a string", function(done) {
execFile('./bin/noglify-js', ['-h'], {}, callback);
function... |
## Modules
<dl>
<dt><a href="#module_cognito-login">cognito-login</a></dt>
<dd><p>Module</p>
</dd>
<dt><a href="#module_cognito-login-factory">cognito-login-factory</a></dt>
<dd><p>Factory module</p>
</dd>
</dl>
<a name="module_cognito-login"></a>
## cognito-login
Module
* [cognito-login](#module_cognito-login)
... |
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:two_miners_monitor_oss/extension.dart';
import 'package:two_miners_monitor_oss/l10n/l10n.dart';
import 'package:two_miners_monitor_oss/miners/bloc/miners_bloc.dart';
import 'package:two_miners_monitor_oss/workers/bl... |
package com.webank.wedatasphere.linkis.governance.common.protocol.job
import org.apache.commons.lang.builder.{EqualsBuilder, HashCodeBuilder}
import java.util
import scala.beans.BeanProperty
class JobRespProtocol {
@BeanProperty
var id: Long = _
@BeanProperty
var status: Int = _
@BeanProperty
var msg: ... |
"""Test the API by running a simple query against one of the
public datasets
"""
import os
import tempfile
import pytest
import bqtools
# Query run against the NOAA GSOD database. Based on the one at:
# https://cloud.google.com/bigquery/public-data/noaa-gsod
query = """
SELECT
max,
(max-32)*5/9 celsius,
... |
# Streaming
This example assumes you have a configured Twitter Streaming `client`.
Instructions on how to configure a client can be found in
[examples/Configuration.md][cfg].
[cfg]: https://github.com/sferik/twitter/blob/master/examples/Configuration.md
Here's a simple example of how to stream tweets from San Franci... |
//! The `graphql` module implements the GraphQL types, queries and mutations
//! that are available to users.
use crate::repository::Repository;
/// The query object defines all queries that the schema supports.
pub struct Query;
juniper::graphql_object!(Query: Repository |&self| {
field apiVersion() -> & str {
... |
How to install the developer edition of Explain
As Explain is completely open-source it only uses external open-source software-packages to run.
Install VS Code : https://code.visualstudio.com/download <br>
Install Git : https://git-scm.com/downloads <br>
Install NodeJs : https://nodejs.org/en/download... |
#!/usr/bin/env bash
echo "Backing up existing genesis file..."
cp "$HOME"/.ixod/config/genesis.json "$HOME"/.ixod/config/genesis.json.backup
echo "Copying new genesis file to $HOME/.ixod/config/genesis.json..."
cp genesis.json "$HOME"/.ixod/config/genesis.json
ixod unsafe-reset-all
ixod validate-genesis
# Enable RE... |
require File.expand_path(File.dirname(__FILE__) + '/../utilities')
Capistrano::Configuration.instance(true).load do
set :delayed_script_path, "#{current_path}/script/delayed_job"
set :delayed_job_env, 'production'
set :delayed_job_role, :app
set :base_ruby_path, '/usr'
# TODO: I think the with_role patter... |
using Root.Coding.Code.Enums.E01D.Json;
namespace Root.Coding.Code.Models.E01D.Json.Conversion
{
class StringEnumConverter : JsonConverter
{
public override JsonConverterKind Kind => JsonConverterKind.StringEnum;
}
}
|
class Tables():
def __init__(self, newLength, newWidth, newHeight):
self.length = newLength
self.width = newWidth
self.height = newHeight
def getSize(self):
print(f'Размеры данного стола: \nДлина - {self.length} м \nШирина - {self.width} м \nВысота - {self.height} м')
class KitchenTables(Tables):
def ge... |
import React from 'react';
import * as layout from '../three-columns';
import { layoutWrapper } from '../layout-wrapper';
import LinksPanel from '../containers/links-panel-container';
const leaderBoardTableStyle = {
width: "85%",
margin: "10px auto",
};
const topTenStyle = {
fontSize: "1.3em",
fontWeight: "b... |
---
layout: watch
title: TLP9 - 25/03/2020 - M20200325_051556_TLP_9T.jpg
date: 2020-03-25 05:15:56
permalink: /2020/03/25/watch/M20200325_051556_TLP_9
capture: TLP9/2020/202003/20200324/M20200325_051556_TLP_9T.jpg
---
|
<?php
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| ... |
import 'package:books_app/models/book.dart';
import 'package:books_app/services/utils.dart';
import 'package:flutter/material.dart';
class ActionsWidget extends StatelessWidget {
final Book book;
ActionsWidget(this.book);
@override
Widget build(BuildContext context) {
String availability;
IconData ico... |
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Cviebrock\EloquentSluggable\Sluggable;
class UserPermission extends Model
{
use Sluggable;
public $timestamps = false;
protected $guarded = [];
protected $casts = [
'user_permissions_group_id' => 'integer',
];
... |
/****************************************************************************
*
* MODULE: lin.cpp
* PURPOSE: nifs for liblinear
*
* for abbreviated names:
* . m is the number of training examples
* . n is the number of features
* . k is the number of classes
* . x is a feature matrix/vector/value
* . y is a ... |
select r.a, s.a, t.a from R2 r, S2 s, T2 t where r.b=s.a and s.b=t.a;
|
<div align="center">
<a href="http://vue-scaff.joenix.com/" target="_blank">
<img width="180" src="http://oss.joenix.com/vue-scaff/logo.png" alt="logo">
</a>
</div>
<div align="center">
<a target="_blank" href="https://github.com/vue-scaff/vue-scaff-demo/archive/vue-scaff-demo-v1.0.zip">
<img src="https:... |
package otto
import (
"math"
"strconv"
)
// Number
func numberValueFromNumberArgumentList(argumentList []Value) Value {
if len(argumentList) > 0 {
return toNumber(argumentList[0])
}
return toValue_int(0)
}
func builtinNumber(call FunctionCall) Value {
return numberValueFromNumberArgumentList(call.ArgumentLi... |
# Question
Design a system to keep track of employee data. The system should keep track of an
employee’s name, ID number and hourly pay rate in a class called Employee. You may
also store any additional data you may need, hint, you need something extra. This data is
stored in a file (user selectable) with the id numbe... |
package com.morladim.mario.sample.ipc.aidl
import android.app.Service
import android.content.Intent
import android.os.IBinder
import com.morladim.mario.sample.ipc.ITalkAidlInterface
import com.morladim.mario.sample.ipc.ITalkCallbackAidlInterface
import java.util.*
import java.util.concurrent.Executors
import java.util... |
namespace TheRace
{
using System;
public class UnitDriver
{
private string name;
public UnitDriver(string name, UnitCar car)
{
Name = name;
Car = car;
}
public string Name
{
get => name;
private set => name =... |
package org.foraci.mxf.mxfReader.parsers;
import org.foraci.mxf.mxfReader.MxfInputStream;
import java.io.IOException;
import java.math.BigInteger;
import java.util.Vector;
import java.util.LinkedList;
import java.util.List;
/**
* A default parser for a KLV's value
* @author jforaci
*/
public class P... |
declare module 'inquirer-dynamic-list' {
interface Choice {
name: string;
value: any;
}
class DynamicList {
opt: {
choices: {
choices: Choice[];
realChoices: Choice[];
};
};
constructor(options: {
message?: string;
emptyMessage?: string;
choices: Choice[];
});
addChoice(choice:... |
require 'spec_helper'
describe 'Enumerable#drop_last' do
it 'drops the last n elements' do
expect([1, 2, 3, 4].drop_last(2)).to eq([1, 2])
end
it 'returns an empty array if you request to drop too many elems' do
expect((1..10).drop_last(100)).to eq([])
end
it 'does not accept negative argument' do
... |
unit Map.Plotter;
interface
uses
System.Types,
Graphics,
Map,
Map.Plotter.Intf,
Map.Projection.Intf;
type
TMapPlotter = class(TInterfacedObject, IMapPlotter)
private
FProjection: IMapProjection;
public
constructor Create(projection: IMapProjection);
procedure Plot(map: TMap; canvas: TCanv... |
// Copyright 2012 Jacob Trimble
//
// 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... |
&dotnet pack "..\Truncon.Collections\Truncon.Collections.csproj" --configuration Release --output $PWD
.\NuGet.exe push Truncon.Collections.*.nupkg -Source https://www.nuget.org/api/v2/package
Remove-Item Truncon.Collections.*.nupkg |
using My-Julia-ML-Package
using Test
@testset "My-Julia-ML-Package.jl" begin
# Write your tests here.
@test sum_of_three(3,4,5) == 12
@test sum_of_three(5,5,5) == 15
@test sum_of_three(6,6,6) == 18
end
|
import sys
import pyjade
sys.modules["pypug"] = sys.modules["pyjade"]
|
# frozen_string_literal: true
module Alchemy
class Config
class << self
# Returns the configuration for given parameter name.
#
# @param name [String]
#
def get(name)
check_deprecation(name)
show[name.to_s]
end
alias_method :parameter, :get
# Retu... |
<?php
declare(strict_types = 1);
use Alf\AlfBasicClass;
use Alf\AlfBasicType;
use Alf\AlfBasicTypeScalar;
use Alf\Interfaces\Integers\AlfIntGetTrait;
use Alf\Interfaces\Integers\AlfIntLikeTrait;
use Alf\Interfaces\Integers\AlfIntSetTrait;
use Alf\Interfaces\Integers\AlfIntWorkTrait;
use Alf\Interfaces\Strings\AlfChar... |
---
layout: issue
title: "Zend_Dojo_Form Checkbox element generates incorrect HTML"
id: ZF-4274
---
ZF-4274: Zend\_Dojo\_Form Checkbox element generates incorrect HTML
-------------------------------------------------------------------
Issue Type: Patch Created: 2008-09-12T21:50:41.000+0000 Last Updated: 2009-01-15T... |
namespace Roket.NET.Models.API
{
public class ApiClient
{
public string BaseApiURL { get; set; }
public string ApiRequestURL { get; set; }
}
}
|
---
title: Karrimor
description: ~
image: "/images/brands/karrimor.png"
remote-image: "https://upload.wikimedia.org/wikipedia/fa/9/95/Karrimor_logo.jpg"
purposes: [bivouac, hike, mountaineer]
types: [hiking-shoes, mountaineering-boots, backpack, tent, sleeping-bag]
countries: [united-kingdom]
website: "http://www.karri... |
use super::item::Item;
use chrono::Local;
use colored::*;
pub struct ItemPresenter<'a> {
item: &'a Item,
separator_spacing: usize,
id_spacing: usize,
}
impl<'a> ItemPresenter<'a> {
pub fn new(item: &'a Item, separator_spacing: usize, id_spacing: usize) -> Self {
Self {
item,
... |
@extends('layouts.master')
@section('content')
<div class="container content-container">
<h2 class="text-center">Search Results</h2>
@foreach($result as $pokemon)
<a href="{{ route('pokemon.show', $pokemon->id) }}">
@include('partials.pokemon-preview')
</a>
@endforeach
</div>
@endsection |
/*
* 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 ... |
# C-Help - The Calgary Helper
### Created by:
- [Artem Golovin](https://github.com/awave1)
- [Alex Zecevic](https://github.com/Zeka17)
- [Daniel Artuso](https://github.com/dartuso)
- [Igor Pieters](https://github.com/ipieters)
- [Rakheem Dewji](https://github.com/raksdewji)
## The Problem
Even in a digital age many p... |
using System.Runtime.InteropServices;
using System.Text;
namespace Ab3d.OculusWrap
{
public struct ExternalCamera
{
/// <summary>
/// Byte array for camera Name string
/// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
public byte[] NameBytes;
... |
import matplotlib.pyplot as plt
from matplotlib.colors import ListedColormap
import numpy as np
class Plotter:
synth_tr: np.ndarray
synth_te: np.ndarray
pima_tr: np.ndarray
pima_te: np.ndarray
def __init__(self, synth_tr: np.ndarray, synth_te: np.ndarray, pima_tr: np.ndarray,
pim... |
package com.copperleaf.kodiak.swift.formatter
import com.copperleaf.kodiak.common.RichTextComponent
import com.copperleaf.kodiak.common.RichTextComponent.Companion.PUNCTUATION
import com.copperleaf.kodiak.common.RichTextComponent.Companion.TEXT
import com.copperleaf.kodiak.common.RichTextComponent.Companion.TYPE_NAME
... |
/**
* The MIT License
*
* Copyright (c) 2010 Adam Abrons and Misko Hevery http://getangular.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without... |
#!/bin/bash
mkdir -p ../../out
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
#echo "Compiling"
#g++ -std=c++11 -O2 -lpthread pipesquare.cpp -o pipesquare.o
echo "Starting time measurement"
time for i in {1..10} ; do "$DIR/pipesquare" ; done
echo "Starting memory measurement"
for i in {1..1... |
using System;
using Microsoft.Maui.Handlers;
using Microsoft.Maui;
using Microsoft.Maui.Graphics.Platform;
namespace Comet.Handlers
{
public partial class ShapeViewHandler : ViewHandler<ShapeView, PlatformGraphicsView>
{
protected override PlatformGraphicsView CreatePlatformView() => new PlatformGraphicsView(Maui... |
SET DEFINE OFF;
ALTER TABLE AFW_25_VALR_ELEMN_CONFG ADD (
CONSTRAINT AFW_25_VALR_ELEMN_CONFG_UK1
UNIQUE (REF_ELEMN_CONFG_PUBLC, REF_DOMN)
ENABLE VALIDATE)
/
|
---
jupytext:
formats: ipynb,md:myst
text_representation:
extension: .md
format_name: myst
kernelspec:
display_name: ai
language: python
name: ai
---
(dash:dcc/range-slider)=
# `dcc.RangeSlider`
参考:[dcc.RangeSlider | Dash for Python Documentation | Plotly](https://dash.plotly.com/dash-core-component... |
using Api.Helper;
using Core.Contracts;
using Core.DataTransferObjects;
using Microsoft.AspNetCore.Mvc;
namespace Api.Controllers
{
/// <summary>
/// Controller to manage measurements
/// </summary>
[Route("api/[controller]/[action]")]
[ApiController]
public class MeasurementsController : Con... |
# nsd1902_devops_day01
程序是计算机上存储的可执行文件,当它运行起来就会加载到内存,所以进程可以认为是程序的一次执行,或加载到内存中的一系列指令。进程的内部可以由一到多个线程构成。
## 多进程编程
windows系统不支持多进程。
```python
# vim myfork
import os
print('Starting...')
os.fork()
print('Hello World!')
# python3 myfork.py
Starting...
Hello World!
Hello World!
```
```mermaid
graph LR
p(主进程)
c(子进程)
ph... |
/*************************************************************
Event Agent checkpoint feature
**************************************************************/
/*************************************************************
Event Agent checkpoint table
************************************************************... |
use crate::input::Input;
pub fn solve(input: &mut Input) -> Result<u32, String> {
let row_evaluator = if input.is_part_one() {
|row: &[u32]| {
let min = row.iter().min().unwrap_or(&0);
let max = row.iter().max().unwrap_or(&0);
max - min
}
} else {
|ro... |
package com.powerspace.openrtb.json.bidrequest
import com.google.openrtb.BidRequest.Imp
import com.google.openrtb.BidRequest.Imp.Banner.Format
import com.powerspace.openrtb.json.EncoderProvider
import com.powerspace.openrtb.json.OpenRtbExtensions.ExtensionRegistry
import com.powerspace.openrtb.json.util.EncodingUtils
... |
package contacts.entities.custom.googlecontacts.userdefined
import contacts.core.entities.custom.CustomDataRegistry.Entry
import contacts.entities.custom.googlecontacts.GoogleContactsFields
import contacts.entities.custom.googlecontacts.GoogleContactsMimeType
import contacts.entities.custom.googlecontacts.UserDefinedF... |
/*
* 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 not ... |
<?php
namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use App\Http\Requests\Admin\AdminLogin;
use App\Providers\RouteServiceProvider;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
class LoginController extends Controller
{
/**
* Create a new controller instanc... |
class TripsDashboardController < ApplicationController
before_action :require_user
def index
@trips = Trip.all
@conditions = Condition.all
end
end
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MongoDB.Bson;
using AuthoBson.Shared.Data.Models;
using MongoDB.Bson.Serialization.Attributes;
using Newtonsoft.Json;
namespace AuthoBson.Shared.Data.Models
{
public class ModelReference : IMod... |
/**
* // Definition for a Node.
* function Node(val,children) {
* this.val = val;
* this.children = children;
* };
*/
/**
* @param {Node} root
* @return {number}
*/
var maxDepth = function(root) {
return root ? recursion(root, 1) : 0;
};
function recursion(node, depth) {
if (node.children.length... |
<?php
namespace App\Repositories;
use App\Models\User;
use App\Repositories\BaseRepositoryTrait;
class UserRepository
{
use BaseRepositoryTrait;
private $model;
/**
* constract
* @param User $model
*/
public function __construct(User $contents)
{
$this->model = $contents;
... |
<?php
/*
* (c) Jérémy Marodon <marodon.jeremy@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Th3Mouk\RxTraining\Consumers\Simple;
use Rx\Observer\CallbackObserver;
use Rx\Scheduler\EventLoopScheduler;
use Rxn... |
require 'prima/version'
require 'prima/configuration'
require 'prima/publisher'
require 'prima/subscriber'
require 'prima/benchmark'
require 'prima/transformation'
require 'prima/step'
require 'prima/etl_step'
require 'prima/missing_msgpack_types'
require 'prima/msgpack_step'
require 'prima/msgpack_input'
require '... |
function factorial(n) {
if (n < 0) {
return null;
} else if (n <= 1) {
return 1;
} else {
let prod = 1;
for (let i = 1; i <= n; i++) {
prod *= i;
}
return prod;
}
}
console.log(factorial(2));
console.log(factorial(3));
console.log(factorial(4));
console.log(factorial(5));
console... |
<?php
$edad = rand(1,15);
function lugarJuguetes($edad) {
switch ($edad) {
case $edad <= 5:
echo "El estudiante con $edad años tendrá sus juguetes en la parte inferior de la bodega.";
break;
case ($edad > 5 && $edad <= 7):
echo "El estudiante con $edad años ten... |
<header class="header headroom headroom--not-bottom headroom--pinned headroom--top">
<div class="backdrop"></div>
<div class="site-nav">
<a class="site-search" href="all-issues.php">往期</a>
<!--<a class="site-search" href="devices.php">设备</a>-->
<!--<a class="site-search" href="companys.php">公司</a>-->
... |
adb shell << EOF
su
touch /data/a.cap
du /data/a.cap
exit
exit
EOF
|
using FakeItEasy;
using Faker;
using FluentAssertions;
using NUnit.Framework;
using System;
using System.Threading.Tasks;
using Watchster.Application.Features.Commands;
using Watchster.Application.Interfaces;
using Watchster.Domain.Entities;
namespace Watchster.Application.UnitTests.Features.Commands
{
public cla... |
#include <nlohmann/json.hpp>
#include "ircbot/engine.hxx"
using nlohmann::json;
using tikirc::message;
using namespace ircbot;
engine::engine(bool verbose_msgin) :
channels(),
log_msgin(verbose_msgin)
{
add_default_plugins();
}
engine::engine(tikirc::stream_codec& conn, bool verbose_msgin) :
engin... |
// Copyright (c) SimpleIdServer. All rights reserved.
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
using System.Collections.Concurrent;
using System.Collections.Generic;
namespace SimpleIdServer.OAuth.Extensions
{
public static class ConcurrentBagExte... |
package id.walt.essif
import io.kotest.core.spec.style.AnnotationSpec
class AuthorizationApiTest : AnnotationSpec() {
//TODO @Test
// fun testAuthApiFlow() {
// EssifFlowRunner.authApi()
// }
}
|
$(() => {
let monkeysDiv = document.querySelector('.monkeys');
fetch('./monkeyTemplate.hbs')
.then(res => res.text())
.then(monkeyTemplate => {
let template = Handlebars.compile(monkeyTemplate);
let htmlResult = template({ monkeys })
monkeysDiv.innerHTML =... |
<style>
#navbar .nav-link {
display: flex;
height: 100%;
align-items: center;
text-align: center;
}
canvas {
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
}
</style>
<?php
// LLamada para carga la imagen de perfil
$img = $this->editores_m->obtenerImagen($_SESSION['id']);
?>
<... |
package com.dev.boot.ws.app.service.impl;
import java.util.ArrayList;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Tr... |
require "pdfjs_viewer-rails/version"
require "pdfjs_viewer-rails/helpers"
module PdfjsViewer
module Rails
class Engine < ::Rails::Engine
isolate_namespace PdfjsViewer
initializer 'pdfjs_viewer-rails.load_static_assets' do |app|
app.middleware.use ::ActionDispatch::Static, "#{root}/public"
... |
const router = require('express').Router()
const {Listing} = require('../db/models')
module.exports = router
router.get('/', function(req, res, next) {
Listing.findAll().then(listings => {
res.json(listings)
})
})
router.get('/search', function(req, res, next) {
Listing.findByCriteria(req.body)
.then(li... |
// Copyright 2014 Google Inc. All rights reserved.
//
// 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 applicabl... |
import tn from "./tn.png";
import config from "./Chenshazhifangchui.wcfg.vue";
export default {
name: "chenshazhifangchui",
chs: "辰砂之纺锤",
url: tn,
star: 4,
type: "sword",
config,
effect: "元素战技造成的伤害值提高,提高数值相当于防御力的40/50/60/70/80%。该效果每1.5秒最多触发一次,并将在元素战技造成伤害后的0.1秒后清除效果。",
} |
package com.agenthun.eseallite;
import android.app.Application;
import com.agenthun.eseallite.utils.update.UpdateConfig;
/**
* @project ESeal
* @authors agenthun
* @date 16/3/4 上午6:48.
*/
public class App extends Application {
public static final String GOOGLE_MAP_API_KEY = "AIzaSyBy5WtHdZ7Pbe-A2N57Kbf7iR0... |
def hey_id
str = 'hey'
str.object_id
end
puts hey_id
puts hey_id
|
#!/usr/bin/env bash
../run.sh run_cautious_best_effort_observations.lp --authorization-mode cautious --obligation-mode best_effort
|
NixArchive
==========
NixArchive is a 'nix-based CLI tool for people who can't bear to 'rm' stuff ;-)
Usage:
archive foo bar baz
Result:
Archiving ./foo<br>
Move successful.<br>
File compressed.<br>
Archiving ./bar<br>
Move successful.<br>
File compressed.<br>
Archiving ./baz<br>
Move successful.<br>
File compress... |
var combinedStream = require('combined-stream');
var parse = require('csv-stream');
var fs = require('fs');
var through2 = require('through2');
var path = require('path');
var logger = require( 'pelias-logger' ).get( 'whosonfirst' );
var isValidId = require('./components/isValidId');
var loadJSON = require('./compone... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.