text stringlengths 1 1.05M |
|---|
# Entrypoint when running inside docker only!
cd /app
yarn
yarn bootstrap
yarn build
cd demo
yarn start
|
#!/usr/bin/env bash
echo "System information:"
cat /etc/issue
echo "cuda_information:"
cat /usr/local/cuda/version.txt
cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2 |
import {
Controller,
HttpCode,
Post,
UseGuards,
Body,
Put,
Param,
ParseIntPipe,
UnauthorizedException,
Delete,
Get,
HttpStatus,
Query,
} from '@nestjs/common';
import { EventService } from './event.service';
import { AuthGuard } from '@nestjs/passport';
import { Usr } from '../user/user.decora... |
require "features_helper"
feature "mina transactions", :vcr do
let(:chain) { create :mina_chain }
before do
visit mina_chain_transactions_path(chain)
end
it "displays transaction search" do
expect(page).to have_text "Transaction Search"
expect(page).to have_text "Filter Transactions"
expect(p... |
// This file is part of SWGANH which is released under the MIT license.
// See file LICENSE or go to http://swganh.com/LICENSE
#pragma once
#include "swganh_core/object/tangible/tangible.h"
namespace swganh {
namespace object {
class WeaponFactory;
class WeaponMessageBuilder;
enum WeaponType {
MELEE = 0,
RANGED
};... |
use std::fmt;
// Define the InstanceMessage enum to represent different types of messages
enum InstanceMessage {
StartInstance,
StopInstance,
GetStatus,
}
// Implement the InstanceActor struct
pub struct InstanceActor {
pub instance: Option<(Filesystem<Minfs>, FvmInstance)>,
}
impl InstanceActor {
... |
<gh_stars>0
import React from 'react'
import classNames from 'classnames'
import { createFromIconfontCN } from '@ant-design/icons'
import styles from './index.module.less'
// IconType继承React.HTMLAttributes的属性,然后IconType,就拥有了其可被外界访问的属性
export interface IconType extends React.HTMLAttributes<any> {
// type 必有属性,如果使用的... |
'use strict';
var _24 = {
elem: 'svg',
attrs: {
xmlns: 'http://www.w3.org/2000/svg',
viewBox: '0 0 32 32',
width: 24,
height: 24,
},
content: [
{
elem: 'path',
attrs: {
d:
'M18.25 25H9V7h8.5a5.25 5.25 0 0 1 4 8.65A5.25 5.25 0 0 1 18.25 25zM12 22h6.23a2.25 2.25 ... |
#!/usr/bin/env bash
set -x
# shellcheck disable=SC1091
source lib/logging.sh
# shellcheck disable=SC1091
source lib/common.sh
# Kill and remove the running ironic containers
for name in ipa-downloader ironic ironic-inspector dnsmasq httpd mariadb vbmc sushy-tools httpd-infra; do
sudo "${CONTAINER_RUNTIME}" ps | g... |
#!/bin/sh
# set default values
USE_ARCH=${1:-x86_64}
USE_SECURITY=${2:--}
USE_SHA1=${3:-master}
# # x86_64 or arm64
[ "$USE_ARCH" = "arm64" ] && USE_ARM64="-arm64"
[ "$USE_SECURITY" = "-security-" ] && SECURITY_SERVICE_NEEDED="true"
TAF_COMMON_IMAGE=nexus3.edgexfoundry.org:10003/edgex-taf-common${USE_ARM64}:latest
CO... |
const Event = require('../../base/Event');
module.exports = class extends Event {
async run(guild) {
if(!guild) return;
await this.client.guildsData.findOneAndDelete({ id: guild.id });
this.client.webhook.guild({
color: this.client.colors.error,
title: '... |
<reponame>desbo/http4s
/*
* Copyright 2013 http4s.org
*
* 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 applic... |
#include "status.h"
void fprint_dir_status(FILE *file, struct client_status *s) {
for(int i = 0; i < s->current_dir->file_count; i ++) {
fprintf(file, "[%d]%30.30s\n", i + 1, s->current_dir->files[i]);
}
}
char *sprint_dir_status(struct client_status *s) {
size_t file_str_len = 0;
char *file_str;
char *str = m... |
/**
* Created by warlock on 18/03/16.
*/
|
L.blinkMarker = function (point, property,classNameVal) {
// 使用js标签,便于操作,这个temDivEle的作用是将divEle通过innerHTML的方式获取为字符串
var tempDivEle = document.createElement("div");
var divEle = document.createElement("div");
var spanEl = document.createElement("span");
var aEl = document.createElement("a");
temp... |
'use strict';
var React = require('react');
var authorAPI = require('../../api/api');
var AuthorList = require('./authorList');
var Authors = React.createClass({
getInitialState: function() {
return {authors: []};
},
componentDidMount: function() {
if (this.isMounted()) {
this.... |
#!/bin/sh
# Copyright (c) 2017, NVIDIA CORPORATION. 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 retain the above copyright
# notice, this list of co... |
<gh_stars>0
/*
* Round.sql
* Chapter 4, Oracle10g PL/SQL Programming
* by <NAME>, <NAME>, <NAME>
*
* This script demonstrates the ROUND function
*/
SET SERVEROUTPUT ON
DECLARE
v_round NUMBER (10,4) := 12345.6789;
BEGIN
DBMS_OUTPUT.PUT_LINE('Default: '||ROUND(v_round));
DBMS_OUTPUT.PUT_LINE('+2: '||ROUN... |
<gh_stars>0
package com.company;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintStream;
import java.util.*;
import static com.company.PieceTypeSerializer.pieceTypeSerializer;
public class Main {
public static void m... |
import numpy as np
import pandas as pd
import tensorflow as tf
import keras
from keras.models import Sequential
from keras.layers import Dense
# load and preprocess the data
data = pd.read_csv('data.csv')
x = data.drop(['price'], axis=1).values
y = data['price'].values
# build the model
model = Sequential()
model.ad... |
'use strict';
var provider = (function() {
const backend = require('../grove-node-server-utils/backend');
//const fs = require('fs')
const four0four = require('../grove-node-server-utils/404')();
//const options = require('../grove-node-server-utils/options')()
var ca = '';
// FIXME: better handled inside... |
def common_elements(str1, str2):
common_elements = []
for letter in str1:
if letter in str2:
common_elements.append(letter)
return common_elements
common_letters = common_elements(str1, str2)
print(common_letters) # Output: [] |
# set -x
app="CNN"
dataset="MNIST-KMNIST"
ntask=2
bmin=1
bmax=27
eta=3
Nloop=3
# parse results for each run
for expid in N0 N1 N2
do
python parse_results_history.py -app ${app} -dataset ${dataset} -ntask ${ntask} -bmin ${bmin} -bmax ${bmax} -eta ${eta} -Nloop ${Nloop} -expid ${expid}
done
# plot for all runs
py... |
def sort_alphabetically(list):
# Bubble sort algorithm.
n = len(list)
# Traverse through all list elements
for i in range(n):
# Last i elements are already in the correct order
for j in range(0, n-i-1):
# Swap if the element found is greater
... |
#!/bin/bash
pandoc --template template.html --css style.css --lua-filter=code-filter.lua $1.md > $1.html
|
# npm run build
# pm2 startOrRestart process.json --update-env
|
class IntList:
def __init__(self):
self.values = []
def add_value(self, value):
self.values.append(value)
def find_min(self):
return min(self.values) |
<filename>common/bundestagio/src/models/NamedPoll/NamedPoll/Votes.ts<gh_stars>10-100
import { Schema } from "mongoose";
import NamedPollVotesVotes, { INamedPollVotesVotes } from "./Votes/Votes";
import NamedPollVotesParty, { INamedPollVotesParty } from "./Votes/Party";
import NamedPollVotesDeputy, { INamedPollVotesDep... |
nohup python backend/networkTest.py &
python web/app.py |
#!/bin/sh
# Copyright (c) 2011-2012 Jean-Marc Valin
#
# This file is extracted from RFC6716. Please see that RFC for additional
# information.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# - Redistributio... |
<reponame>feueraustreter/YAPION<filename>src/main/java/yapion/parser/YAPIONParserMapObject.java
// SPDX-License-Identifier: Apache-2.0
// YAPION
// Copyright (C) 2019,2020 yoyosource
package yapion.parser;
import yapion.annotations.deserialize.YAPIONLoadExclude;
import yapion.annotations.serialize.YAPIONSaveExclude;
... |
<reponame>gonjavi/railsSportsTrack
require 'rails_helper'
RSpec.describe Api::V1::MeasurementsController, type: :controller do
it { should route(:get, '/api/v1/measurements').to(action: :index) }
it { should route(:post, '/api/v1/measurements').to(action: :create) }
it { should route(:delete, '/api/v1/measuremen... |
/**
* <a href="http://www.openolat.org">
* OpenOLAT - Online Learning and Training</a><br>
* <p>
* Licensed under the Apache License, Version 2.0 (the "License"); <br>
* you may not use this file except in compliance with the License.<br>
* You may obtain a copy of the License at the
* <a href="http://www.apache... |
<gh_stars>0
import * as utility from './utility'
export async function createMilestoneRelease(owner: string, repo: string, unreleased: string, release: string): Promise<any> {
await updateUnreleased(owner, repo, unreleased, release)
await createUnreleased(owner, repo, unreleased)
}
async function updateUnreleased... |
/**
* Angular library starter
* Build an Angular library compatible with AoT compilation & Tree shaking like an official package
* Copyright <NAME>
* MIT license
* https://github.com/robisim74/agm-direction
*/
/**
* Entry point for all public APIs of the package.
*/
export * from './src/agm-direction';
|
#Convert date column to datetime
df['date'] = pd.to_datetime(df['date'])
#Set the index to the date column
df.set_index('date', inplace=True)
#Format the dates in the columns
df.index = df.index.strftime('%m-%d-%Y') |
<reponame>sarastrasner/code-followers
'use strict';
//requiring API server and user model
const API = require('./API');
const server = require('./src/server');
const users = require('./users/user-model');
//third party dependancies
const prompts = require('prompts');
require('dotenv').config();
const superagent = req... |
<reponame>RKrahl/bagit-rk
from sys import exit, version
from setuptools import setup
import bagit
if version < '2.6.0':
print("python 2.6 or higher is required")
exit(1)
description = \
"""
This package can be used to create BagIt style packages of
digital content for safe transmission and digital preservat... |
SELECT TOP 10 Name
FROM Person
WHERE State = 'California'
AND Gender = 'Female'
ORDER BY Name ASC; |
<filename>src/isa/avx/fmaf.c
/*
* Copyright (C) 2008-2020 Advanced Micro Devices, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above ... |
def selection_sort(nums):
n = len(nums)
for i in range(n):
min_idx = i
for j in range(i + 1, n):
if nums[min_idx] > nums[j]:
min_idx = j
nums[i], nums[min_idx] = nums[min_idx], nums[i]
return nums
print(selection_sort([3, 2, 5, 1, 6])) |
#!/usr/bin/env sh
# generated from catkin/cmake/template/setup.sh.in
# Sets various environment variables and sources additional environment hooks.
# It tries it's best to undo changes from a previously sourced setup file before.
# Supported command line options:
# --extend: skips the undoing of changes from a previou... |
#! /bin/sh
mv envExemple .env
php artisan key:generate
composer install
chmod 777 storage/logs/
chmod 777 storage/framework/sessions/
chmod 777 storage/framework/views/
php artisan storage:link
php artisan migrate:refresh --seed
|
describe("Lookup Service", function () {
describe("creation", function () {
var lookupService;
beforeEach(function () {
module('LookupModule');
});
beforeEach(inject(function (_lookupService_) {
lookupService = _lookupService_;
}));
it("in... |
<reponame>calypso-science/Toto
"""Read txt,csv file
This import text file. The function uses the read_csv function from panda <https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_csv.html>_.
This class returns a Panda Dataframe with some extra attributes such as Latitude,Longitude,Units.
... |
<gh_stars>0
package com.globalcollect.gateway.sdk.java.gc.payment.definitions;
public class PaymentProduct840CustomerAccount {
private String accountId = null;
private String billingAgreementId = null;
private String companyName = null;
private String countryCode = null;
private String customerAccountStatus... |
<gh_stars>0
var forma = document.getElementById("forma"),
txtFecha = forma["fecha"],
salidaBoleta = document.getElementById("salidaBoleta"),
salidaNombre = document.getElementById("salidaNombre"),
salidaSecuencia = document.getElementById("salidaSecuencia"),
salidaMateria = document.getElementById("... |
#!/bin/bash
set -e
JDK_VER="11.0.8"
JDK_BUILD="10"
PACKR_VERSION="runelite-1.0"
APPIMAGE_VERSION="12"
umask 022
if ! [ -f OpenJDK11U-jre_x64_linux_hotspot_${JDK_VER}_${JDK_BUILD}.tar.gz ] ; then
curl -Lo OpenJDK11U-jre_x64_linux_hotspot_${JDK_VER}_${JDK_BUILD}.tar.gz \
https://github.com/AdoptOpenJDK/op... |
def binary_search(arr, target):
start = 0
end = len(arr) -1
while start <= end:
mid = (start + end) // 2
if arr[mid] == target:
return mid
elif arr[mid] > target:
end = mid - 1
else:
start = mid + 1
return -1 |
<reponame>hyperpape/needle<filename>needle-types/src/main/java/com/justinblank/strings/ByteClassUtil.java<gh_stars>10-100
package com.justinblank.strings;
public class ByteClassUtil {
public static void fillBytes(byte[] bytes, byte state, int startingIndex, int endingIndex) {
for (int i = startingIndex; i... |
<reponame>littlerobin/react_pet_shop<filename>src/containers/FaqPage/FaqPage.js
import React from 'react';
import { StaticPage, TopbarContainer } from '../../containers';
import {
LayoutSingleColumn,
LayoutWrapperTopbar,
LayoutWrapperMain,
LayoutWrapperFooter,
Footer,
} from '../../components';
import css f... |
#!/bin/bash
#SBATCH -J "NBody Reduced LRBD solver first synthesis"
#SBATCH -p fpgasyn
#SBATCH --mem=120000MB
#SBATCH -t 36:00:00
module reset
module load nalla_pcie/19.4.0_max
module load intelFPGA_pro/20.4.0
aoc -v -board=p520_max_sg280l device/ring_lrbd_lf_no_sync_local.cl -global-ring -duplicate-ring -ffp-reasso... |
#!/usr/bin/env bash
# Cause the script to exit if a single command fails
set -eo pipefail -v
################################ global variables ################################
rm -rf ./tests/logs ./tests/output.txt
EXPDIR=./tests/_tests_dl_callbacks
LOGDIR=./tests/logs/_tests_dl_callbacks
CHECKPOINTS=${LOGDIR}/ch... |
The most optimal database schema would contain the following tables:
Users:
- Id
- Name
- Email
Reviews:
- Id
- User_id
- Product_id
- Rating
- Body
Products:
- Id
- Name
- Image_url
Product_categories:
- Product_id
- Category_id
Categories:
- Id
- Name |
<filename>google/monitoring/dashboard/v1/google-cloud-monitoring-dashboard-v1-ruby/proto_docs/google/monitoring/dashboard/v1/xychart.rb
# frozen_string_literal: true
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the... |
<filename>open-sphere-plugins/mapbox/src/main/java/io/opensphere/mapbox/model/package-info.java
/** Mapbox model classes. */
package io.opensphere.mapbox.model;
|
def remove_nodes(head, val):
'''
Removes all nodes that have a given value in a linked list
Args:
head (Node): Head Node of a linked list
val (int): The value of the nodes to be removed
Returns:
Node: The head Node of the linked list with the specified nodes removed
'''
current = head
# check if the head ... |
python transformers/examples/language-modeling/run_language_modeling.py --model_name_or_path train-outputs/512+0+512-pad/13-model --tokenizer_name model-configs/1024-config --eval_data_file ../data/wikitext-103-raw/wiki.valid.raw --output_dir eval-outputs/512+0+512-pad/13-512+0+512-ST-1 --do_eval --per_device_eval_batc... |
package br.indie.fiscal4j.cte300.classes.nota;
import br.indie.fiscal4j.DFBase;
import br.indie.fiscal4j.validadores.StringValidador;
import org.simpleframework.xml.Element;
import org.simpleframework.xml.Namespace;
import org.simpleframework.xml.Root;
/**
* @author Caio
* @info
*/
@Root(name = "emiOcc")
@Namespa... |
from typing import List, Tuple
def count_zero_rows_cols(grid: List[List[int]]) -> Tuple[int, int]:
rows = [0] * len(grid)
cols = [0] * len(grid[0])
for i in range(len(grid)):
for j in range(len(grid[0])):
if grid[i][j] == 0:
rows[i] = 1
cols[j] = 1
... |
#
# Copyright (c) 2018 ISP RAS (http://www.ispras.ru)
# Ivannikov Institute for System Programming of the Russian Academy of Sciences
#
# 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
#
# h... |
# -*- coding: utf-8 -*-
import ast
from abc import ABC
from collections import deque
import numpy as np
from pytrol.control.Communicating import Communicating
from pytrol.model.action.Action import Action
from pytrol.model.action.Actions import Actions
from pytrol.model.action.MovingToAction import MovingToAction
fr... |
#!/bin/bash
if [[ -z $1 ]]; then
echo "Usage note: tctestsgen.sh <module_name>"
exit 1
fi
MODULE_NAME=$1
MODULE_NAME_C=$(echo $MODULE_NAME | sed -e 's/-\([a-z]\)/\U\1/' -e 's/^\([a-z]\)/\U\1/')
SCRIPT_DIR="$(cd "$(dirname $0)" && pwd)"
TC_DIR="/opt/usr/bin/tct-$1-core"
if [[ $3 == "desktop" ]] ; then
TC_DIR... |
import random
def alligator_six_making(player1: str, player2: str) -> str:
players = [player1, player2]
scores = {player1: 0, player2: 0}
while all(score < 50 for score in scores.values()):
for player in players:
roll = random.randint(1, 6)
scores[player] += roll
... |
<html>
<head>
<title>Form Validation</title>
<script>
function validateForm() {
var x = document.forms["myForm"]["inputfield"].value;
if (x == "") {
alert("Input must be filled out");
return false;
}
}
</script>
</head>
<body>
<form name="myForm" action="" onsubmit="return validateForm()" method="post">
... |
import { Composer, Scenes } from 'telegraf';
import { User } from '@models/user';
interface StartWizardSession extends Scenes.WizardSessionData {
email: string;
password: string;
}
type StartWizardContext = Scenes.WizardContext<StartWizardSession>;
export const startSceneId = 'start-wizard';
const startWizard ... |
#!/usr/bin/env bash
# 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
# "Lic... |
package com.solvd.booking.company;
import com.solvd.booking.company.BookingCompany;
public interface Listable {
void list(BookingCompany company);
void unlist(BookingCompany company);
}
|
// C Program to create and traverse a linked list
#include <stdio.h>
#include <stdlib.h>
// Structure of a node
struct Node {
int data;
struct Node* next;
};
// Function to insert a node at the beginning of the Linked List
void push(struct Node** head_ref, int new_data)
{
struct Node* new_node = (struct Node*) mal... |
package com.lzh.replugindemo;
import android.app.Activity;
import android.app.ProgressDialog;
import android.net.Uri;
import com.alibaba.fastjson.JSON;
import com.lzh.compiler.parceler.Parceler;
import com.lzh.compiler.parceler.annotation.FastJsonConverter;
import com.lzh.nonview.router.Router;
import com.lzh.nonview... |
<filename>panopto_client/tests/test_remote_recorder.py
# Copyright 2021 UW-IT, University of Washington
# SPDX-License-Identifier: Apache-2.0
from unittest import TestCase
from panopto_client.remote_recorder import (
RemoteRecorderManagement, PanoptoAPIException)
from panopto_client.tests import instance_args
from... |
<gh_stars>1-10
/*
* Copyright © 2018 Mercateo AG (http://www.mercateo.com)
*
* 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
*
* Unle... |
<reponame>livingston/react-chart-spikes<filename>src/d3Charts/index.js<gh_stars>0
import React, { Component } from 'react';
import Scatter from './scatter.js';
import Stack from './stack.js';
const D3Charts = () => (<section className="d3 page">
<Scatter />
{/* <Stack /> */}
</section>);
export default D3Charts;
|
package all
import (
"strings"
"testing"
"github.com/Shopify/kubeaudit"
"github.com/Shopify/kubeaudit/auditors/apparmor"
"github.com/Shopify/kubeaudit/auditors/asat"
"github.com/Shopify/kubeaudit/auditors/capabilities"
"github.com/Shopify/kubeaudit/auditors/hostns"
"github.com/Shopify/kubeaudit/auditors/imag... |
#!/bin/bash
# Strict mode, fail on any error
set -euo pipefail
EVENTHUB_CS=$(az eventhubs namespace authorization-rule keys list -g $RESOURCE_GROUP --namespace-name $EVENTHUB_NAMESPACE --name RootManageSharedAccessKey --query "primaryConnectionString" -o tsv)
eh_resource=$(az resource show -g $RESOURCE_GROUP --resou... |
<reponame>wolfchinaliu/gameCenter
package org.jeewx.api.wxbase.wxserviceip;
import java.util.ArrayList;
import java.util.List;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.jeewx.api.core.exception.WexinReqException;
import org.jeewx.api.core.req.WeiXinReqService;
import org.jeewx.api.core.... |
<gh_stars>10-100
package com.readytalk.swt.helpers;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;
/**
* Helper methods to answer common ancestry questions related to SWT components.<br/>
* <br/>
* Methods in this class should be <code>static</code>.
*/
public class AncestryHelper {... |
/* Furthest point sampling
* Original author: <NAME>
* Modified by <NAME>
* All Rights Reserved. 2017.
*/
#include "tensorflow/core/framework/common_shape_fns.h"
#include "tensorflow/core/framework/op.h"
#include "tensorflow/core/framework/op_kernel.h"
#include "tensorflow/core/framework/shape_inference.h"
using n... |
node http-file-server.js . &
sleep 1
echo '- - - - - - - - - - - - - - - - - - - -'
node http-request-client.js /files/a.txt
echo '- - - - - - - - - - - - - - - - - - - -'
node http-request-client.js ../index.html
kill %1
|
<gh_stars>1-10
package com.wixpress.dst.greyhound.core.producer
import java.util.concurrent.TimeUnit
import java.util.concurrent.TimeUnit.MILLISECONDS
import _root_.zio.blocking.Blocking
import com.wixpress.dst.greyhound.core.PartitionInfo
import com.wixpress.dst.greyhound.core.metrics.{GreyhoundMetric, GreyhoundMetri... |
<reponame>oueya1479/OpenOLAT
/**
* <a href="http://www.openolat.org">
* OpenOLAT - Online Learning and Training</a><br>
* <p>
* Licensed under the Apache License, Version 2.0 (the "License"); <br>
* you may not use this file except in compliance with the License.<br>
* You may obtain a copy of the License at the
... |
<reponame>Mdamman/APP_MakeTheChange
import { IonicModule } from "@ionic/angular";
import { RouterModule } from "@angular/router";
import { NgModule } from "@angular/core";
import { CommonModule } from "@angular/common";
import { ContactCardPage } from "./contact-card.page";
import { ComponentsModule } from "../compone... |
<reponame>camplight/hylo-evo<filename>src/routes/Search/Search.connector.test.js
import { mergeProps } from './Search.connector'
describe('mergeProps', () => {
it('populates fetchSearchResults and fetchMoreSearchResults', () => {
const stateProps = {
searchResults: [1, 2, 3],
filter: 'all',
sea... |
package com.krrrr38.mackerel4s
package api
import org.scalatest._
import org.scalatest.concurrent.ScalaFutures._
class RoleAPISpec extends MockApiServerFun with Matchers {
object MockHostAPI
extends RoleAPI
with MackerelClientBase {
override val setting: ClientSetting = mockSetting
override val... |
import { BasicColumn } from '/@/components/Table';
import { FormSchema } from '/@/components/Table';
import { h } from 'vue';
import { Tag } from 'ant-design-vue';
export const columns: BasicColumn[] = [
{
title: '编码',
dataIndex: 'fnumber',
width: 160,
align: 'left',
},
{
title: '名称',
dat... |
const
parseArgs = require('minimist'),
path = require('path'),
{ writeFileSync } = require('fs-extra')
const argv = parseArgs(process.argv.slice(2), {
alias: {
h: 'help'
},
boolean: ['h']
})
if (argv.help) {
console.log(`
Description
Tauri dev.
Usage
$ tauri dev
Options
--help, -h ... |
function longestWord(str) {
let words = str.split(' ');
let longest = '';
for (let word of words) {
if (word.length > longest.length) {
longest = word;
}
}
return longest;
} |
#!/bin/bash
set -euo pipefail
echo -e "\e[31m###########################\e[0m"
echo -e "\e[31mInstalling dog\e[0m"
echo -e "\e[31m###########################\e[0m"
curl -L -o dog.zip https://github.com/ogham/dog/releases/download/v0.1.0/dog-v0.1.0-x86_64-unknown-linux-gnu.zip
mkdir dog
unzip dog.zip -d dog
mv dog/bi... |
package prospector.routiduct.gui;
/**
* File Created by Prospector.
*/
public interface IDynamicAdjustmentGUI {
public int getOffsetFactorX();
public int getOffsetFactorY();
}
|
#!/bin/sh
docker run -v $PWD:/home/${PWD##*/} -it ${PWD##*/}
|
#include "device.hpp"
#include "quantumvk/utils/bitops.hpp"
#include "quantumvk/utils/hash.hpp"
namespace Vulkan
{
ShaderHandle Device::CreateShader(size_t num_words, const uint32_t* code)
{
return ShaderHandle(handle_pool.shaders.allocate(this, code, num_words));
}
ProgramHandle Device::CreateG... |
#! /usr/bin/env bash
# Copyright (c) 2018 Herbert Shen <ishbguy@hotmail.com> All Rights Reserved.
# Released under the terms of the MIT License.
# source guard
[[ $MKDIRS_SOURCED -eq 1 ]] && return
declare -r MKDIRS_SOURCED=1
declare -r MKDIRS_ABS_SRC="$(realpath "${BASH_SOURCE[0]}")"
declare -r MKDIRS_ABS_DIR="$(dirn... |
#!/bin/bash
FILE=variables.tf
source .env
aws_default_region="${AWS_DEFAULT_REGION:-us-east-1}"
if [ -z ${TF_PROJECT_NAME} ]; then
echo "'TF_PROJECT_NAME' is empty, exiting with failure."
exit 1
fi
echo $TF_PROJECT_NAME
tf_spine="${TF_SPINE:-rk}"
export VARIABLES_TF=$(cat <<EOF
# Variables.tf declares has the... |
<reponame>imwalrus/finalProject
package co.finalproject.farm.app.user.controller;
public class UserController {
}
|
import React from 'react';
import { render } from 'react-dom';
import Gameview from './gameview';
render(<Gameview />, document.querySelector('#content'));
|
<gh_stars>1-10
import Component from '@ember/component';
export default Component.extend({
tagName: 'main',
classNames: ['gh-main'],
ariaRole: 'main',
mouseEnter() {
let action = this.onMouseEnter;
if (action) {
action();
}
}
});
|
#!/bin/bash
# setup an up to date environment for development
# do regular init
./scripts/init.sh
# use most recent commits from submodules
git submodule foreach "git checkout master && git pull"
|
import { hasPermission } from './task-13';
test('hasPermission([]) to equal true', () => {
expect(hasPermission([])).toBe(true);
});
test("hasPermission([], 'P1') to equal false", () => {
expect(hasPermission([], 'P1')).toBe(false);
});
test("hasPermission(['P2', 'P3'], 'P1') to equal false", () => {
expect(ha... |
using Microsoft.Extensions.Configuration;
public class ServerInfo
{
public string ServerName { get; set; }
public string IPAddress { get; set; }
public string OperatingSystem { get; set; }
public string Domain { get; set; }
private IConfiguration _configuration;
public ServerInfo(IConfigurati... |
<reponame>yyzclyang/algae-ui
import React from 'react';
import { CodeDemo, Api } from '../CommonDispalyComponents';
import './switch.example.scss';
import CodeDemo1 from './switch.codeDemo1';
const code1 = require('!!raw-loader!./switch.codeDemo1.tsx');
import CodeDemo2 from './switch.codeDemo2';
const code2 = require... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.