text stringlengths 27 775k |
|---|
let error = document.getElementById('validate');
let label = document.getElementsByTagName("label");
document.getElementById("name")
.addEventListener("keyup", function(e) {
if (e.keyCode === 13) {
e.preventDefault();
next("name", "email");
}
});
document.getElementById("em... |
import 'dart:typed_data';
import 'package:hive/hive.dart';
import 'storage_repo.dart';
class StorageRepoImpl implements StorageRepo {
late Box<String> _box;
@override
Future<void> init({
Uint8List? encryptionKey,
}) async {
_box = await Hive.openBox<String>(
'ftauth',
encryptionCipher:
... |
<?php
namespace GetCandy\Hub\Http\Livewire\Traits;
use GetCandy\Hub\Actions\Pricing\UpdateCustomerGroupPricing;
use GetCandy\Hub\Actions\Pricing\UpdatePrices;
use GetCandy\Hub\Actions\Pricing\UpdateTieredPricing;
use GetCandy\Models\Currency;
use GetCandy\Models\Price;
use GetCandy\Models\TaxClass;
use GetCandy\Rules... |
package org.swellrt.server;
import com.google.common.base.Preconditions;
import org.waveprotocol.wave.model.id.WaveId;
@Deprecated
public enum WaveType {
CONVERSATION("conversation","w"),
CHAT("chat", "sc.chat"), DOCUMENT("document", "d"), UNKNOWN(
"unknown", "u");
private final String typeStrValue;
... |
[andculturecode-javascript-core](../README.md) › [UnitOfTime](unitoftime.md)
# Enumeration: UnitOfTime
## Index
### Enumeration members
* [Day](unitoftime.md#day)
* [Days](unitoftime.md#days)
* [Hour](unitoftime.md#hour)
* [Hours](unitoftime.md#hours)
* [Millisecond](unitoftime.md#millisecond)
* [Milliseconds](unit... |
package utils
import (
"bytes"
"encoding/binary"
"math"
"math/rand"
)
// Float32ToByte convert float32 to byte
func Float32ToByte(float float32) []byte {
bits := math.Float32bits(float)
bytes := make([]byte, 4)
binary.LittleEndian.PutUint32(bytes, bits)
return bytes
}
// ByteToFloat32 convert byte to float32... |
# Create a directory and move into it.
# `mkcd /path/to/directory`
_mkcd() {
mkdir -p "$1"
cd "$1"
}
# Move into a directory and list the contents.
# `cdl /path/to/directory`
_cdl() {
cd "$1"
ls
}
alias mkcd=_mkcd
alias cdl=_cdl
# this is "git checkout master" by default in oh-my-zsh
# but i like to use the ... |
# frozen_string_literal: true
module Metanorma; module Document; module StandardDocument
# Specification of (potentially document-specific) cross-references, to overwrite the
# links within an SVG file, so that the SVG file can hyperlink to anchors within the document.
class SvgTargetType < Core::Node
includ... |
import com.sun.org.apache.xpath.internal.operations.Bool;
import java.io.FileWriter;
import java.io.IOException;
/**
* Created by rebeccamancy on 11/09/2015.
*/
public class CSVWriter {
// Delimiter used in CSV file
private static final String COMMA_DELIMITER = ",";
private static final String NEW_LINE_... |
# Copyright 2017 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"/vars.sh
fx-config-read
fx-machine-types() {
echo "Available machine types:"
echo " ram - ramb... |
#!/usr/bin/env python
__author__ = "Carlos Rueda"
__license__ = 'Apache 2.0'
"""
"""
from mi.instrument.teledyne.workhorse_adcp_5_beam_600khz.ooicore.pd0 import PD0DataStructure
from mi.core.unit_test import MiUnitTest
from nose.plugins.attrib import attr
def _read_sample(filename='mi/instrument/teledyne'
... |
// This file is part of libigl, a simple c++ geometry processing library.
//
// Copyright (C) 2015 Alec Jacobson <alecjacobson@gmail.com>
//
// This Source Code Form is subject to the terms of the Mozilla Public License
// v. 2.0. If a copy of the MPL was not distributed with this file, You can
// obtain one at htt... |
require 'paysafe/result'
module Paysafe
class BirthDate < Result
attributes :year, :month, :day
def date
@date ||= Date.new(year, month, day)
end
end
end
|
/**
* *@description neste código se encontra a classe que efetua o controle do servidor
* @author Otávio Goes
*/
package segundo.server
import java.net.ServerSocket
import segundo.SocketConnection
class ServerSocket {
private var _socket: ServerSocket
private var _connectedClients: MutableList <SocketConnecti... |
#!/bin/bash
set -x
set -e
export PYTHONUNBUFFERED="True"
GPU_ID=$1
DATASET=$2
USE_HIST=$3 # whether to use class-specific context aggregation (likely want = 1)
DET_START=$4 # when to start detector-tuning (alternate policy, detector training, I used 20000)
USE_POST=$5 # whether to train posterior class-probability a... |
; RUN: opt < %s -msan -msan-check-access-address=0 -msan-track-origins=1 -S | FileCheck -check-prefix=CHECK -check-prefix=CHECK-ORIGINS1 %s
; RUN: opt < %s -msan -msan-check-access-address=0 -msan-track-origins=2 -S | FileCheck -check-prefix=CHECK -check-prefix=CHECK-ORIGINS2 %s
target datalayout = "e-p:64:64:64-i1:8:... |
<?php
/**
* Created by PhpStorm.
* User: heiglandreas
* Date: 25.06.18
* Time: 18:14
*/
namespace Org_Heigl\GetLatestAssetsTest\Service;
use GuzzleHttp\Client;
use Org_Heigl\GetLatestAssets\AssetUrl;
use Org_Heigl\GetLatestAssets\Release\Release;
use Org_Heigl\GetLatestAssets\Release\ReleaseList;
use Org_Heigl\G... |
#ifndef RLGAMES_ZERO_MODEL_RESNET_SMALL
#define RLGAMES_ZERO_MODEL_RESNET_SMALL
#include <vector>
#include <resnet_layer.h>
#include <go_zero_encoder.h>
#include <model_base.h>
#include <torch/torch.h>
namespace rlgames {
struct ZeroModelResnetSmallOptions {
TensorDim c1sz;
TensorDim ... |
<?php
/**
* Fuel is a fast, lightweight, community driven PHP5 framework.
*
* @package Fuel
* @version 1.7
* @author Fuel Development Team
* @license MIT License
* @copyright 2010 - 2015 Fuel Development Team
* @link http://fuelphp.com
*/
class Controller_multiple extends Controller
{
pu... |
# 3.2. 用户对象锁
正如在第 2.2 节中阐述的那样,为了记录对象什么时候被使用什么时候应该从内存中释放,
用户对象实现了引用计数。因此,在内核离开用户临界区后,预期有效的对象必须加锁。
通常,有两种形式的锁,线程锁与赋值锁。
## 线程锁
线程锁通常用于给函数内部的对象或者缓冲区加锁。每一个线程被加锁的项存储在线程锁结构
(win32k! TL)的一个线程锁单链表。线程信息结构(THREADINFO.ptl)会指向该列表。
线程锁列表的工作原理很像是先进先出(FIFO)队列,也就是说,
记录是压进或者弹出列表的。在 Win32k 里,线程锁通常会被内联,
并且可以被内联的指针识别,这通常发生在一个“xxx”前缀函数调用... |
--
-- This code 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, version 2
--
--
--
DELIMITER $$
DROP procedure IF EXISTS _rdebug_release_worker_and_wait_for_breakpoint $$
CREATE procedure _rdebug_releas... |
<div class="entry">
<h2 class="entry-title">No Posts</h2>
<p class="summary">There's nothing here to show you!</p>
</div>
|
package io.usoamic.app.ui.auth.add
import android.os.Bundle
import android.view.View
import androidx.core.view.isInvisible
import androidx.core.view.isVisible
import androidx.fragment.app.viewModels
import by.kirich1409.viewbindingdelegate.viewBinding
import io.usoamic.app.R
import io.usoamic.app.UsoamicApp
import io.... |
#include <stdio.h>
#include <time.h>
typedef unsigned short ushort;
typedef unsigned int uint;
typedef unsigned long long ulong;
typedef unsigned char byte;
typedef unsigned int bool;
#define true 1
#define false 0
#define null ((void *)0)
int sprintf(
char* const _Buffer,
char const* const _For... |
/*
SQLyog Professional v12.5.1 (64 bit)
MySQL - 10.4.21-MariaDB : Database - tugas-grafik
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY... |
require 'activerecord'
# Patch ActiveRecord to store transaction depth information
# in fibers instead of threads. AR does not support nested
# transactions which makes the job easy.
# We also need to override the scoped methods to store
# the scope in the fiber context
class ActiveRecord::Base
def single_threaded_... |
from matplotlib.figure import Figure
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
from matplotlib.backends.backend_qt5agg import NavigationToolbar2QT as Toolbar
from matplotlib.widgets import RectangleSelector
from lib.Themes import app_dark_mode
from lib.ID_Tab import create_tabID
f... |
The Prometheus project was started by Matt T. Proud (emeritus) and
Julius Volz in 2012.
Maintainers of this repository:
* Brian Brazil <brian.brazil@boxever.com>
* Johannes 'fish' Ziemke <github@freigeist.org>
* Tobias Schmidt <tobidt@gmail.com>
The following individuals have contributed code to this repository
(lis... |
from analysis.attention_map.visualize_attention import company_colors, apply_mask2
transform = pth_transforms.Compose([
pth_transforms.Resize([480, 480]),
pth_transforms.ToTensor(),
pth_transforms.Normalize((0.485, 0.456, 0.406), (0.229, 0.224, 0.225)),
])
def show_attn(img, index=None):
w_featmap = ... |
namespace TwitchViewBot
{
partial class MainForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <p... |
# ManualMapUtil
A AutoMapper (but not auto) like map function.
``` ini
BenchmarkDotNet=v0.12.1, OS=Windows 10.0.19041.685 (2004/?/20H1)
AMD Ryzen 5 2600, 1 CPU, 12 logical and 6 physical cores
.NET Core SDK=5.0.101
[Host] : .NET Core 5.0.1 (CoreCLR 5.0.120.57516, CoreFX 5.0.120.57516), X64 RyuJIT [AttachedDeb... |
// Copyright 2019 The Bazel Authors. 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 appl... |
import { Controller, Get, Req, Res, UseGuards } from '@nestjs/common';
import { Request, Response } from 'express';
import { User } from '../../shared';
import { JwtAuthService } from '../jwt/jwt-auth.service';
import { GithubOauthGuard } from './github-oauth.guard';
@Controller('auth/github')
export class GithubOaut... |
const casual = require('casual')
const { parseBearerToken } = require('./index')
describe('utils', () => {
describe('parseBearerToken', () => {
let request = {}
beforeEach(() => {
request.headers = {
authorization: `Bearer ${casual.uuid}`
}
})
afterEach(() => {
request = {}
... |
package com.njp.wallhaven3.base
import android.app.Application
import com.njp.wallhaven3.R
import com.njp.wallhaven3.utils.*
import com.raizlabs.android.dbflow.config.FlowManager
import com.scwang.smartrefresh.header.MaterialHeader
import com.scwang.smartrefresh.layout.SmartRefreshLayout
class MyApplication : Applic... |
#pragma once
#define GETTER(type, name) \
type get_##name() const { \
return this->name; \
}
#define SETTER(type, name) \
void set_##name(type value) { \
this->name = value; \
}
#define SETTER_BY_POINTER(type, name) \
void set_##name(type value) { \
this->name = *value; \
}
#define GETT... |
source $(dirname $(readlink -f ${BASH_SOURCE}))/ci-el8-gcc10.sh
|
package com.brainasaservice.kotlin.kotlingooglemaps.model
import com.brainasaservice.kotlin.kotlingooglemaps.database.Database
/**
* Created by Damian on 20.08.2017.
*/
data class Dependency(
val database: Database
) |
#!/bin/bash
systemctl stop rsyslog.service
apt autoremove --purge -y
apt-get autoclean
apt-get clean
> /var/log/auth.log
> /var/log/dpkg.log
> /var/log/faillog.log
> /var/log/lastlog
> /var/log/syslog
> /var/log/tallylog
> /var/log/wtmp
rm -f /var/log/vmware-*.log
> /root/.bash_history
journalctl --vacu... |
SELECT COUNT(assistance_requests.*) AS total_assistances, teachers.name
FROM assistance_requests
JOIN teachers ON teacher_id = teachers.id
WHERE teachers.name = 'Waylon Boehm'
GROUP BY teachers.name;
|
package jsfks;
import java.io.Serializable;
import java.util.UUID;
public class ItemInstrumento implements Serializable{
private String codigo;
private int orden;
private String descri;
private int peso;
public ItemInstrumento() {
}
public ItemInstrumento(Str... |
import { RendererLike } from '@connectv/html';
export function Table({header, body}: {header: any, body: any}, renderer: RendererLike<any, any>, content: any) {
return <div style='overflow-x: auto'>
<table style='min-width: 100%;'>
<thead>{header}</thead>
<tbody>{body}</tbody>
</table>
</div>;... |
package tokyo.tkw.thinmp.activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.airbnb.epoxy.EpoxyTouchHelper;
import com.annimon.stream.Collectors;
import com.an... |
While some credentials only have a single issuer, others can be issued by many
issuers. For example, passports are issued by hundreds of countries, and credit cards
are issued by tens of thousands of banks and credit unions. For any credential that will
be widely used by many holders and honored by many verifiers, ther... |
MODULE GwfUzfModule
CHARACTER(LEN=64) :: Version_uzf
REAL,PARAMETER :: CLOSEZERO=1.0E-15
DOUBLE PRECISION,PARAMETER :: NEARZERO=1.0D-30
DOUBLE PRECISION,PARAMETER :: ZEROD15=1.0D-15, ZEROD9=1.0D-09
DOUBLE PRECISION,PARAMETER :: ZEROD6=1.0D-06
DOUBLE PRECISI... |
---
title: Спасибо за поддержку проекта
noindex: true
notoc: true
---
|
export const localeMixin = {
props: {
/**
* The ISO-15897 standard locale definition string that defines the locale fallback
* when the locale fallback isn't specified on the locale plugin setup.
*/
defaultLocaleFallback: {
type: String,
def... |
### Build
```bash
cargo build
```
### Run
```bash
./target/debug/main --help
```
|
package kernel
import (
"fmt"
"github.com/xuperchain/xuperchain/core/contract"
)
// GetMethod define Get type
type GetMethod struct {
}
// SetMethod define Set type
type SetMethod struct {
}
// Invoke Get method implementation
func (gm *GetMethod) Invoke(ctx *KContext, args map[string][]byte) (*contract.Response... |
import { unionBy } from '../source/array/unionBy';
describe('unionBy', () => {
test('iterator', () => {
expect(unionBy([2.1], [1.2, 2.3], Math.floor)).toEqual([2.1, 1.2]);
});
test('The "property" iteratee shorthand.', () => {
expect(unionBy([{ x: 1 }], [{ x: 2 }, { x: 1 }], 'x')).toEqual(... |
wd=test5_restart3
oldDir=test5
if [ -d $wd ]; then
rm -r $wd
fi
if [ ! -d $oldDir ] ; then
echo "ERROR: Directory (with contents) of old BRAKER run $oldDir does not exist, yet. Please run test5.sh before running test5_restart3.sh!"
else
species=$(cat $oldDir/braker.log | perl -ne 'if(m/AUGUSTUS parameter s... |
; lwb Logic WorkBench -- Predicate logic
; Copyright (c) 2015 -2021 Burkhardt Renz, THM. All rights reserved.
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php).
; By using this software in any fashion, you are agreeing to... |
using System.Threading;
namespace Cfoan.Automation
{
public partial class Actions
{
public class PostponeAction : AbstractSimulateAction
{
public int SleepMillis { get; private set; }
public PostponeAction(int millis)
:base(null)
{
... |
# quantitative-investment
`最后更新时间:2022-02-03 15:30:46 +0800`
## 强势股票
|股票|当前价|当日涨跌幅|当日振幅|当日换手率|市盈率TTM|总市值|近10日涨跌幅|
|----|----|----|----|----|----|----|----|
暂无数据
|
namespace Core3
{
using NServiceBus;
class Usage
{
Usage(Configure configure)
{
#region ConfiguringInMemory
configure.InMemoryFaultManagement();
configure.InMemorySagaPersister();
configure.InMemorySubscriptionStorage();
... |
$(document).ready(function(){
ajax_url = 'http://localhost/investex/index.php/AjaxController/';
base_url = 'http://localhost/investex/index.php/user/';
// send mail on every match to dealer and investor
/*setInterval(function(){
var testvar = '';
var interval = 1000 * 60 * 10;
$.ajax({
type : 'POST... |
package com.quran.page.common.data
data class AyahMarkerLocation(val sura: Int, val ayah: Int, val x: Int, val y: Int)
|
# RISC OS de-archiver
This is a Java implementation of the various compression algorithms used by
RISC OS archivers.
Supported archive formats are:
- Spark
- ArcFS
- PackDir
- Squash
- CFS
riscosarc can not create archives, it can only extract files from them.
# Usage:
java riscosarc [opt] [archive file]
where opt... |
#!/bin/bash
#$ -N intaRNA-benchmark
#$ -cwd
#$ -pe smp 24
#$ -R y
#$ -l h_vmem=1G
#$ -o /scratch/bi03/gelhausr/intaRNA/IntaRNA-benchmark/sge-out/
#$ -j y
#$ -M gelhausr@informatik.uni-freiburg.de
#$ -m a
# This script will require a conda environment with:
# - the necessary dependencies of intaRNA
# - python3 | pandas... |
@extends('layouts.admin.app')
@section('title', 'List Product')
@section('content')
<p>Halaman Product</p>
@endsection |
package net.gdface.utils;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.commons.beanutils.BeanUtilsBe... |
#Requires -Version 3.0
. "$($PSScriptRoot)\..\..\TestInitialize.ps1"
Describe 'ConvertTo-SPClientAbsoluteUrl' {
Context 'Success' {
It 'Converts a relative url to a absolute url' {
$AbsoluteUrl = $SPClient.TestConfig.RootUrl + $SPClient.TestConfig.ListUrl
$RelativeUrl = $SPClien... |
import 'package:tekartik_midi/midi.dart';
import 'package:tekartik_midi/midi_parser.dart';
import 'package:tekartik_midi/src/parser/event_parser.dart';
import 'package:tekartik_midi/src/parser/object_parser.dart';
class TrackParser extends ObjectParser {
TrackParser(MidiParser parser) : super(parser);
MidiTrack t... |
require "rails"
require "ejs"
require "coffee-script"
require "sass-rails"
require "bootstrap-sass"
require "jquery-rails"
require "coffee-rails"
module Cartilage
class Engine < Rails::Engine
isolate_namespace Cartilage
end
end
|
using System;
using System.Runtime.InteropServices;
using System.Xml;
using System.Xml.Serialization;
namespace ArtZilla.Wpf {
[Serializable,StructLayout(LayoutKind.Sequential)]
public struct FsPoint {
[XmlAttribute]
public Int32 X;
[XmlAttribute]
public Int32 Y;
public FsPoint(Int32 x, Int32 y) {
X =... |
package com.diplom.map.mvp.components.layervisibility.model
import android.content.Context
import android.util.Log
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import com.diplom.map.R
import com.diplom.map.mvp.App
import com.... |
<?php
class Tag_abbr extends TagsParent
{
function __construct($tagname, $tagmethod, $args)
{
$this->construct($tagname);
$this->set['title'] = $args[0];
$this->has = $args[1];
}
}
|
import 'package:freezed_annotation/freezed_annotation.dart';
part 'error_response.freezed.dart';
part 'error_response.g.dart';
@freezed
class ErrorResponse with _$ErrorResponse {
const factory ErrorResponse({
// ignore: invalid_annotation_target
@JsonKey(name: 'name') required final String name,
// igno... |
import java.util.*;
public class g1e5 {
public static void main (String[] args) {
Scanner read = new Scanner(System.in);
int value, numbers=0;
int sum=0;
double avg;
do{
System.out.print("Numero: ");
value = read.nextInt();
if(value==0&&numbers==0){ //exception in case the first number given is '... |
select c1.concept_id as concept_id,
c2.concept_name as category,
ard1.min_value as min_value,
ard1.p10_value as P10_value,
ard1.p25_value as P25_value,
ard1.median_value as median_value,
ard1.p75_value as P75_value,
ard1.p90_value as P90_value,
ard1.max_value as m... |
(ns such.f-immigration
(:require [such.immigration :as immigrate]
[such.metadata :as meta])
(:require clojure.math.combinatorics
clojure.data.json)
(:use midje.sweet))
;;; This creates a "favorite functions" namespace. The imported functions
;;; are available here. See `f_use_favorit... |
# Load modules
using Plots, LaTeXStrings
pyplot()
using ThinFilmsTools
function main()
# Define beam
λ = LinRange(310,1000,500) # wavelength range [nm]
θ = [0.] # angle of incidence [degrees]
beam = PlaneWave(λ,θ)
# Find wavelength closest to 405.0 nm
aux1 = Utils.findClosest(vec(beam.λ),405.0)... |
# Bitcoin for Hackers
A demonstration of interesting technical topics in Bitcoin.
### Pre-Requisites
##### Install python 3.5 or above on your machine:
- Windows: https://www.python.org/ftp/python/3.6.2/python-3.6.2-amd64.exe
- Mac OS X: https://www.python.org/ftp/python/3.6.2/python-3.6.2-macosx10.6.pkg
- Linux: s... |
---
uid: System.Activities.Expressions.MultidimensionalArrayItemReference`1
---
---
uid: System.Activities.Expressions.MultidimensionalArrayItemReference`1.Indices
---
---
uid: System.Activities.Expressions.MultidimensionalArrayItemReference`1.#ctor
---
---
uid: System.Activities.Expressions.MultidimensionalArrayIte... |
package info.modoff.spoofvotingserver.models
data class Players(
val max: Int,
val online: Int
)
data class Version(
val name: String,
val protocol: Int
)
data class ServerStatus(
val description: String,
val players: Players,
val version: Version
)
interface ... |
#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<algorithm>
using namespace std;
#define ll long long
#define mem(Arr,x) memset(Arr,x,sizeof(Arr))
const int maxN=1010;
const int Mod=2011;
const int inf=2147483647;
class Mountain
{
public:
int h,k;
};
int n;
int C[maxN][maxN];
Mounta... |
# language-an package
Syntax highlighting for AIRnovel.
AIRNovel用シンタックスハイライト。

スクリーンショットの使用テーマは、[JPcastle-light](https://github.com/SetoAira/jpcastle-light-syntax)です。
## snippets
[macro][endmacro]
[if][endif]
[link][en... |
# coding=utf-8
# Copyright 2018 The TF-Agents Authors.
#
# 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... |
<?php
namespace Clarifai\DTOs\Searches;
use Clarifai\Internal\_Hit;
use Clarifai\Internal\_MultiSearchResponse;
class SearchInputsResult
{
/**
* @var string
*/
private $id;
/**
* @return string
*/
public function id() { return $this->id; }
/**
* @var SearchHit[]
*/
... |
# encoding: utf-8
require 'spec_helper'
describe Tuple, '#extend' do
subject { object.extend(new_header, extensions) }
let(:header) { Relation::Header.coerce([[:id, Integer], [:name, String]]) }
let(:new_header) { header | [[:test, Integer]] }
let(:object) { described_c... |
extern crate wasm_bindgen;
use wasm_bindgen::prelude::*;
#[allow(dead_code)]
fn _multiply(a: Vec<Vec<i32>>, b: Vec<Vec<i32>>) -> Vec<Vec<i32>> {
let mut c: Vec<Vec<i32>> = Vec::new();
for i in 0..a.len() {
c.push(vec![0; b.len()]);
for j in 0..b[0].len() {
for k in 0..b.len() {
... |
class Rubyception::TemplatesController < ApplicationController
layout false
helper :all
def index
@templates = {}
respond_to do |f|
f.js
end
end
end
|
package com.wyp.materialqqlite.ui;
import java.io.File;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.AsyncTask;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseExpandableL... |
# ion-nav-set-root
`NavSetRoot` is an element that allows you to set the root of the current navigation stack.
It is the element form a calling `NavController.setRoot()`
|
module Insertion (tests) where
import Common
import qualified Data.Tree.AVL as AVL
tests :: Spec
tests = describe "Insert" $ do
it' "toList . fromList == sort . unique" $ \list -> do
tree <- AVL.fromList list
back <- AVL.toList tree
let uniq = uniqued list
return (back == uniq)
... |
#! /usr/bin/env python3
import argparse
import pandas as pd
import logging
import sys
import pbio.utils.fastx_utils as fastx_utils
import pbio.misc.logging_utils as logging_utils
import pbio.misc.parallel as parallel
import pbio.misc.pandas_utils as pandas_utils
logger = logging.getLogger(__name__)
default_num_cpu... |
$(function() {
var $D = $(document),
$main = $('#main'),
username = 'yetone',
version = '0.2.3',
gistListTpl = $('#gist-list-tpl').html(),
gistDetailTpl = $('#gist-detail-tpl').html(),
listRender = shani.compile(gistListTpl),
detailRender = shani.compile(gistDetailTpl),
... |
### 抓包工具 tcpdump
tcpdump -i lo port 8102 -A -s 0
### 查看请求 header 信息 -I
curl nginx.minplemon.tech -I
### install certbot
```
$ yum install epel-release -y
$ yum install yum-utils -y
$ yum-config-manager --enable rhui-REGION-rhel-server-extras rhui-REGION-rhel-server-optional
$ yum install certbot python2-certbot-nginx... |
package com.example.navigationcomponentsample.repository
import com.dharam.githubissues.repository.model.Comments
import com.example.navigationcomponentsample.App
import io.reactivex.Observable
class CommentsRepository {
/*
get comment data from comment list api or from cache by using issue number
*/
... |
namespace SFA.Apprenticeships.Application.UnitTests.SiteMap
{
using System;
using Apprenticeships.Application.Vacancy.SiteMap;
using Domain.Entities.Vacancies;
using FluentAssertions;
using NUnit.Framework;
[TestFixture]
public class SiteMapVacancyHelperTests
{
[TestCase(Vacanc... |
#!/bin/sh
echo "Delete existing blockchain database"
rm -rf chaindata/
echo ""
echo "Start Node REPL and populate new blockchain data"
node -i -e "$(< ./simpleChain.js) $(< ./test_populateChain.js)"
|
#!/bin/bash
rm -rf build dist
#arch -32 -arch i386 python setup.py py2app
arch -32 python2.7 setup.py py2app
|
package com.is_a_geek.yamanogusha.ronri
import java.io.FileReader
import com.is_a_geek.yamanogusha.ronri.base._
import com.is_a_geek.yamanogusha.ronri.parser._
object Launcher {
def main(args: Array[String]) {
val parser = new PropositionParser()
def makeObjects(filename: String): Unit = {
val reader = ... |
using System;
using System.Xml.Serialization;
using System.Collections;
using System.Collections.Generic;
using Newtonsoft.Json;
namespace JdSdk.Domain.Website.Cps
{
[Serializable]
public class PromoteWareDetail : JdObject
{
[JsonProperty("ware")]
public Ware.Ware Ware
{
... |
[playlist]
File1=http://stream.4zzzfm.org.au:789
Title1=4ZZZ FM 102.1 - Alternative
NumberOfEntries=1
Length1=-1
Version=2
|
from django.urls import path
from . import views
urlpatterns = [
path('snippets/', views.SnippetListView.as_view(), name='snippet_list'),
path('snippets/new/', views.new_snippet, name='new-snippet'),
path('snippets/<int:pk>/', views.SnippetDetailView.as_view(), name='snippet-detail'),
path('snippet/<i... |
class PageRankController < ApplicationController
def index
target_url = URI.parse(request.original_url).host
@backlinks = PageRankr.backlinks(target_url, :google, :bing, :yahoo, :alexa)
@indexes = PageRankr.indexes(target_url, :google, :bing, :yahoo)
@ranks = PageRankr.ranks(target_url, :alexa_us, :al... |
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
import 'failure.dart';
part 'crud_failure.freezed.dart';
@freezed
class CrudFailure extends Failure with _$CrudFailure {
const factory CrudFailure.stillLoading() = StillLoading;
const factory CrudFa... |
package host
import (
"bytes"
"context"
"fmt"
"path/filepath"
"time"
"github.com/evergreen-ci/evergreen/subprocess"
"github.com/evergreen-ci/evergreen/util"
"github.com/mongodb/grip"
"github.com/mongodb/grip/message"
"github.com/pkg/errors"
)
func (h *Host) SetupCommand() string {
cmd := fmt.Sprintf("%s h... |
####################### PCA #################
setwd(.WD)
source("functions.r")
options(warn=-1)
.pca <- princomp(dat) #default cor = F
n <- nrow(dat)
p <- ncol(dat)
sumpca <- matrix(rep(0,3*p), nrow = 3)
sumpca[1,] <- .pca$sdev^2
sumpca[2,] <- cumsum(.pca$sdev^2)
sumpca[3,] <- cumsum(.pca$sdev^2)/... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.