text
stringlengths
1
1.05M
SEQ_COUNT=$(egrep '^>' ../params/alignment | wc -l) CHAR_COUNT=$(wc -m < ../params/alignment) if [[ ${CHAR_COUNT} -gt "10000" ]] ; then echo "#Input may not contain more than 10000 characters." >> ../results/process.log false fi if [[ ${FORMAT} = "1" ]] || [[ ${SEQ_COUNT} -gt "1" ]] ; then echo "#In...
class Pet: def __init__(self, name, pet_type): self.name = name self.type = pet_type class PetAdoptionSystem: def __init__(self): self.pets = [] def add_pet(self, name, pet_type): new_pet = Pet(name, pet_type) self.pets.append(new_pet) print(f"{name} the {pe...
#!/bin/bash # Step 1: Run trec_setup.sh script to set up collection mapping and index files ./bin/trec_setup.sh corpus/TREC # Step 2: Replace the default configuration file with the customized configuration file rm -f etc/terrier.properties cp etc/terrier.custom etc/terrier.properties echo "Terrier setup completed s...
#!/bin/bash # Copyright (c) 2017 The ACEseq workflow developers. # Distributed under the MIT License (license terms are at https://www.github.com/eilslabs/ACEseqWorkflow/LICENSE.txt). tmpSegments=${FILENAME_SEGMENTS}_tmp nocontrol=${isNoControlWorkflow^^} ${RSCRIPT_BINARY} --vanilla "${TOOL_PSCBS_SEGMENTATION}" \ ...
#!/bin/bash #Moving to the local deformetrica/examples directory dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd $dir # Atlas construction : deformetrica registration 3D model.xml data_set.xml optimization_parameters.xml --output-dir=output
package queue import "testing" func TestEnqueueAndDequeue(t *testing.T) { q := &Queue{} q.enqueue("a") q.enqueue("b") actual1 := q.dequeue() if actual1 != "a" { t.Error("expected first element removed to be a") } actual2 := q.dequeue() if actual2 != "b" { t.Error("expected second element removed to be...
<reponame>saviorocha/freeCodeCamp-study<gh_stars>0 import axios from 'axios' import React, { useState, useContext, useEffect } from 'react' const table = { sports: 21, history: 23, politics: 24, } const API_ENDPOINT = 'https://opentdb.com/api.php?' const url = '' const AppContext = React.createContext() cons...
package main import ( "fmt" "os" "github.com/spf13/cobra" ) const version = "1.0.0" var ( rootCmd = &cobra.Command{ Use: "dns-drainctl", Short: "Drain by removing/replacing IP/net from DNS records with ease", Example: ` Drain IP 172.16.31.10 in project api-project-xxx by removing IP from records $ dns-d...
import { BaseMaterial } from "../material"; import { Engine } from "../Engine"; import { Shader } from "../shader"; import { WGSLUnlitVertex } from "../shaderlib"; import { ShaderStage } from "../webgpu"; import { WGSLClusterDebug } from "./wgsl/WGSLClusterDebug"; import { LightManager } from "./LightManager"; export ...
The best way to edit existing code and fix any bugs or syntax errors is to first carefully read through the code and make sure you understand what it does. Then, you can make small changes to the code one at a time and test to see if the bug still exists. If it does, you can debug the code by using techniques such as p...
#! /bin/bash set -e set -x if [ "$ARCH" == "" ]; then echo 'Error: $ARCH is not set' exit 1 fi # use RAM disk if possible if [ "$CI" == "" ] && [ -d /dev/shm ]; then TEMP_BASE=/dev/shm else TEMP_BASE=/tmp fi BUILD_DIR=$(mktemp -d -p "$TEMP_BASE" linuxdeploy-plugin-qt-build-XXXXXX) cleanup () { ...
<gh_stars>0 /** * Given a string, return its encoding version. * * @param {String} str * @return {String} * * @example * For aabbbc should return 2a3bc * */ function encodeLine(str) { const arr = str.split(''); let char = ''; let count = 0; let ret = ''; for (let i = 0; i < arr.length; i++) { if ...
#!/bin/sh set -e echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" # This protects against multiple targets copying the same framework dependency at the same time....
<filename>imageeditor/src/main/java/com/createchance/imageeditor/freetype/FreeType.java<gh_stars>10-100 package com.createchance.imageeditor.freetype; /** * FreeType 2 java access class. * * @author createchance * @date 2018-10-12 */ public class FreeType { /** * Call this when init just once. */ ...
const express = require('express') const app = express() const path = require('path') const bodyParser = require('body-parser') // Parses urlencoded bodies app.use(bodyParser.urlencoded({ extended: false })) // Ensure that the file userdb.json is accessible const userdb = require(path.resolve(__dirname, 'userdb.json'...
// registered_task.rs use task::{ task_action::TaskAction, task_settings::TaskSettings, task_trigger::{TaskTrigger, TaskIdleTrigger, TaskLogonTrigger}, RunLevel, Task, }; pub fn register_new_task(name: &str, action: TaskAction, settings: TaskSettings, triggers: Vec<TaskTrigger>) { // Create a new ...
def abbreviateNumber(number): if 999 < abs(number) < 1000000: number_prefix = round(number / 1000, 2) number_suffix = "K" elif 999999 < abs(number) < 1000000000: number_prefix = round(number / 1000000, 2) number_suffix = "M" elif abs(number) > 999999999: number_prefix...
<gh_stars>0 import { ForeignKey, Model, Table } from 'sequelize-typescript'; import { Dish } from '../../dishes/models'; import { Filling } from './filling.model'; @Table({ tableName: 'dish_fillings', }) export class DishFilling extends Model { @ForeignKey(() => Filling) filling_id: number; @ForeignKey(() => ...
#!/usr/bin/env python # Tests the angles produced by optimization routine # usage: ./test_angles.py -g get_random_partition_graph -l 6 -r 7 import networkx as nx import numpy as np import matplotlib.pyplot as plt from scipy.optimize import minimize from networkx.generators.classic import barbell_graph from itertools...
<filename>ex02/latticeview_v2.h<gh_stars>0 #include <iostream> #include <fstream> // The following function prints the lattice to file "output.ppm" void Print_lattice (int *vlat, const int &vlx, const int &vly, const int &vwidth, const int &vheight, const char* vfilename="output.ppm") { const int vw= vwidth / vlx; ...
package session import ( "github.com/golang/protobuf/ptypes" "redditclone/internal/pkg/proto" "redditclone/internal/domain/user" ) func SessionProto2Session(sessionProto proto.Session) (s *Session, err error) { user, err := user.UserProto2User(*sessionProto.User) if err != nil { return nil, err } data, err...
<reponame>posva/peeky import fs from 'fs' import path from 'path' import match from 'anymatch' import { V8Coverage } from 'collect-v8-coverage' import { SourceMapConsumer } from 'source-map' import copy from 'fast-copy' import glob from 'fast-glob' import shortid from 'shortid' import type { Context } from '../types' ...
use std::collections::HashMap; #[derive(Debug)] enum UsState { Alabama, } struct Inventory { items: HashMap<String, i32>, } impl Inventory { fn new() -> Inventory { Inventory { items: HashMap::new(), } } fn add_item(&mut self, item_name: String, quantity: i32) { ...
#!/bin/bash # # This file is part of the GROMACS molecular simulation package. # # Copyright 2019- The GROMACS Authors # and the project initiators Erik Lindahl, Berk Hess and David van der Spoel. # Consult the AUTHORS/COPYING files and https://www.gromacs.org for details. # # GROMACS is free software; you can redistri...
import React from 'react'; import {Route} from 'react-router'; import App from './App'; import Home from './Home'; import Champions from './Champions'; import About from './About'; import Login from './Login'; import NotFound from './NotFound'; export default function(store) { return ( <Route component={Ap...
export const assign_marker_varying = ` vMarker = readFromTexture(tMarker, aInstance * float(uGroupCount) + group, uMarkerTexDim).a; `;
<reponame>guilhermedias/twu-biblioteca-guilherme package com.twu.biblioteca; import org.junit.Test; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; /** * Created by fmorais on 8/4/15. */ public class UserAccountTest { @Test ...
<?php if ($_SERVER['REQUEST_METHOD'] === 'POST') { // Retrieve form data $username = $_POST['username']; $email = $_POST['email']; $password = $_POST['password']; // Validate form data (e.g., check for empty fields, validate email format) // Connect to the database (assuming the database conne...
#!/bin/sh if [ -z "$OP_PASSWORD" ]; then OP_PASSWORD=$(date +%s | sha256sum | base64 | head -c 8 ; echo) fi sleep 2 if [ -z "$QUERY_PASSWORD" ]; then QUERY_PASSWORD=$(date +%s | sha256sum | base64 | head -c 8 ; echo) fi sleep 2 if [ -z "$SPEC_PASSWORD" ]; then SPEC_PASSWORD=$(date +%s | sha256sum | base64 | h...
import h5py import numpy from afqmctools.utils.io import to_qmcpack_complex def write_qmcpack_sparse(hcore, chol, nelec, nmo, e0=0.0, filename='hamiltonian.h5', real_chol=False, verbose=False, cutoff=1e-16, ortho=None): with h5py.File(filename, 'w') as fh5: fh5['Hamiltonian/Energies'] = nu...
<gh_stars>1-10 import React from "react"; import { Container, Row, Col } from "react-bootstrap"; import myImg from "../../Assets/avatar.svg"; import Tilt from "react-parallax-tilt"; import { AiFillGithub, AiOutlineTwitter, AiFillInstagram, AiFillFacebook, } from "react-icons/ai"; import Particle from "../Partic...
#!/usr/bin/env bash if [ -z "$(pidof -x dbus-daemon)" ]; then sudo mkdir -p /var/run/dbus sudo rm -f /var/run/dbus/pid sudo dbus-daemon --system; fi if [ -z "$(pidof -x Xvfb)" ]; then export DISPLAY=:99 sudo rm -f /tmp/.X99-lock sudo -b Xvfb $DISPLAY -screen 0 1920x1080x24 -noreset +extension ...
#!/usr/bin/env bash # Copyright 2019 Google LLC. 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...
import json from naas.client import Client class EmailNotifications: @staticmethod def list(params=None): """ Retrieve the list of email notifications :param params: dict :return: Response """ if params is None: params = {} rel = Client.rel...
import socket def resolve_domain(domain): try: addr = socket.gethostbyname(domain) # Resolve the address by DNS return addr except socket.gaierror: # Raise when the domain name not found return None
require File.expand_path('../../../../spec_helper', __FILE__) require File.expand_path('../../fixtures/classes', __FILE__) describe "Socket::Option.new" do it "should accept integers" do so = Socket::Option.new(Socket::AF_INET, Socket::SOL_SOCKET, Socket::SO_KEEPALIVE, [0].pack('i')) so.family.should == Sock...
#!/bin/bash set -e echo "Add GOPATH and GOBIN" sudo touch /etc/profile.d/aispaths.sh sudo sh -c "echo export PATH=$PATH:/usr/local/go/bin > /etc/profile.d/aispaths.sh" sudo sh -c "echo export GOBIN=$HOME/ais/bin >> /etc/profile.d/aispaths.sh" sudo sh -c "echo export GOPATH=$HOME/ais/ >> /etc/profile.d/aispaths.sh" s...
package com.waflo.cooltimediaplattform.backend.jparepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.stereotype.Component; import org.springframework.stereotype.Service; import javax.persistence.EntityManager; impor...
import { Router, NavigationEnd } from '@angular/router'; import { Component, ViewEncapsulation, ViewChild, ElementRef, OnInit, AfterContentInit, ApplicationRef, NgZone } from '@angular/core'; import { Platform, MenuController } from 'ionic-angular'; import { StatusBar, Splashscreen } from 'ionic-native'; @Compon...
def count_course_frequency(courses): course_frequency = {} for course in courses: course = course.lower() # Convert the course name to lowercase if course in course_frequency: course_frequency[course] += 1 else: course_frequency[course] = 1 return course_freq...
const { createLambda } = require('./middlewares') const { findOrders } = require('./orders-logic') const handler = createLambda(async (event) => { const orders = await findOrders(event.body.filters) return { orders } }) module.exports = { handler }
export const CharactersData: { name: string; friends: string[]; homeWorld?: string; species: string; }[] = [ { name: "A", friends: ["B", "D"], homeWorld: "Planet A", species: "Species A", }, { name: "B", friends: ["A"], homeWorld: "Planet A", species: "Speci...
#!/bin/sh export PATH=/usr/local/bin:$PATH # source the common platform independent functionality and option parsing script_location=$(cd "$(dirname "$0")"; pwd) . ${script_location}/common_test.sh retval=0 #cvmfs_unittests --gtest_shuffle \ # --gtest_death_test_use_fork || retval=1 cd ${SOURCE_DIRE...
#!/usr/bin/env bash set -ex TUNNEL_NAME=${TUNNEL_NAME:-tun2} IP_ADDRESS=10.9.0.1/24 sudo ip tuntap del "${TUNNEL_NAME}" mode tun sudo ip tuntap add "${TUNNEL_NAME}" mode tun sudo ip link set "${TUNNEL_NAME}" up sudo ip addr add ${IP_ADDRESS} dev "${TUNNEL_NAME}" echo "Created tunnel ${TUNNEL_NAME} with ip address ${IP...
<reponame>mponizil/apify-js import fs from 'fs'; import fsExtra from 'fs-extra'; import path from 'path'; import { checkParamOrThrow } from 'apify-client/build/utils'; import LruCache from 'apify-shared/lru_cache'; import ListDictionary from 'apify-shared/list_dictionary'; import { ENV_VARS, LOCAL_STORAGE_SUBDIRS } fro...
/** * Copyright 2015-2021 <NAME> (http://vsilaev.com) * * 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 conditions and th...
#!/bin/bash # profiles = xccdf_org.ssgproject.content_profile_ospp . shared.sh preauth_set=1 authfail_set=0 account_set=1 auth_files[0]="/etc/pam.d/system-auth" auth_files[1]="/etc/pam.d/password-auth" interval="900" set_default_configuration insert_or_remove_settings $preauth_set $authfail_set $account_set $interv...
#!/bin/bash # 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 applic...
def caesar_cipher(text, key): # Initialize the encryption string encryption = "" # Iterate over the plaintext for char in text: # Check if the character is alphabetic if char.isalpha(): # Get the ascii code of the character ascii_code = ord(char) # S...
import torch def perform_evaluation(model, eval_checkpoint_path, args, eval_dataset, eval_loader, model_save_path, device): # Load the trained model from the checkpoint path model.load_state_dict(torch.load(eval_checkpoint_path)) print('Model loaded from', eval_checkpoint_path) # Evaluate the model's ...
#!/bin/bash # shellcheck disable=SC2155 function hassos_pre_image() { local BOOT_DATA="$(path_boot_dir)" local UBOOT_GXL="${BINARIES_DIR}/u-boot.gxl" local SPL_IMG="$(path_spl_img)" cp "${BINARIES_DIR}/boot.scr" "${BOOT_DATA}/boot.scr" cp "${BINARIES_DIR}/meson-g12b-s922x-khadas-vim3.dtb" "${BOOT_...
<reponame>vaskoz/jruby require_relative '../stdlib/cmath'
<reponame>getbud/bud<filename>bud/bud.go package bud import ( "regexp" "time" "github.com/getbud/bud/recurrence" ) // Account represents a bank account. type Account struct { // UUID is a unique identifier for this Account. UUID string `json:"uuid"` // Name is the name of this Account. Name string `json:"name...
<filename>cmd/server/authz.go package main import ( "crypto/tls" "strings" "github.com/pkg/errors" ) func checkClientSNI(domain string) func(tls.ConnectionState) error { return func(cs tls.ConnectionState) error { if !strings.HasSuffix(cs.ServerName, domain) { return errors.Errorf("unauthorized domain name:...
var classarmnn_1_1profiling_1_1_profiling_guid = [ [ "ProfilingGuid", "classarmnn_1_1profiling_1_1_profiling_guid.xhtml#ad2ab306c078af3bc68cd7c797fe66172", null ], [ "operator uint64_t", "classarmnn_1_1profiling_1_1_profiling_guid.xhtml#a5c63d22a5b2c943dee98c114da727d0f", null ], [ "operator!=", "classarmnn...
public class SecurityCode { private int code; public int getCode() { return code; } public void setCode(int code) { if (code > 0) { if (code < 1000) { this.code = code + 1000; } else { this.code = code; } } els...
#!/bin/bash echo $1 $2 $3 PY=python3 if [ $1 = 'c' ]; then $PY cap_finder.py elif [ $1 = 's' ]; then # $PY sim.py $PY sim_wtrace_exp.py else echo "Arg did not match!" fi
package io.cattle.platform.servicediscovery.deployment.impl; import io.cattle.platform.core.model.Service; import io.cattle.platform.lock.definition.AbstractMultiLockDefinition; import io.cattle.platform.lock.definition.LockDefinition; import java.util.Collections; import java.util.Comparator; import java.util.List; ...
def num_combinations(elements, length): if length == 1: return len(elements) elif length == 0: return 0 else: return len(elements) * num_combinations(elements, length - 1) print(num_combinations(elements, length)) # Output: 9
package org.openapitools.client.api import argonaut._ import argonaut.EncodeJson._ import argonaut.DecodeJson._ import org.http4s.{EntityDecoder, EntityEncoder} import org.http4s.argonaut._ import org.joda.time.DateTime import Order._ case class Order ( id: Option[Long], petId: Option[Long], quantity: Option[Integ...
<filename>src/commands/settings/MaxMentionsCommand.js const ConfigCommand = require('../ConfigCommand'); const DisableMaxMentionsCommand = require('./maxmentions/DisableMaxMentionsCommand'); const GetMaxMentionsCommand = require('./maxmentions/GetMaxMentionsCommand'); const SetMaxMentionsCommand = require('./maxmention...
<filename>src/main/java/com/qk/carina/demo/api/GetCreatedUserMethod.java package com.qk.carina.demo.api; import com.qaprosoft.carina.core.foundation.api.AbstractApiMethodV2; import com.qaprosoft.carina.core.foundation.utils.Configuration; public class GetCreatedUserMethod extends AbstractApiMethodV2 { public GetC...
#!/bin/bash # -*-mode: ksh; ksh-indent: 2; -*- ./bootstrap.sh ERRORS=0 WARNINGS=0 ./ctl.sh start STDS="main_func.htt loop.htt file.htt big.htt textplain.htt texthtml.htt body.htt anybody.htt mix.htt PARPContentLength.htt modify.htt modify_2.htt modify_3.htt modify_4.htt chunked.htt nbytes.htt" for E in $STDS; do ....
<reponame>mindhivenz/meteor-base<gh_stars>0 import { observable, computed, action, } from 'mobx' import { app } from '@mindhive/di' import { SUPER_USER } from '../roles' const VIEWER_STATE_PATH = 'viewerState' // Expects viewer data to be auto published export default class ViewerStore { @observable loading...
package common import ( "testing" "github.com/stretchr/testify/assert" ) func TestSliceContains_True(t *testing.T) { s := []string{"resize", "start", "untag", "delete"} result := SliceContains("delete", s) assert.True(t, result) } func TestSliceContains_False(t *testing.T) { s := []string{"resize", "start", "...
package de.ids_mannheim.korap.web.filter; import javax.ws.rs.core.SecurityContext; import javax.ws.rs.ext.Provider; import com.sun.jersey.spi.container.ContainerRequest; import com.sun.jersey.spi.container.ContainerRequestFilter; import com.sun.jersey.spi.container.ContainerResponseFilter; import com.sun.jersey.spi.c...
class Photo < ApplicationRecord belongs_to :owner, class_name: 'User', inverse_of: :owned_photos has_many :photo_in_albums, dependent: :destroy has_many :albums, through: :photo_in_albums has_many :comments, dependent: :destroy validates :image, presence: true validates :description, allow_nil: true, lengt...
#!/bin/sh ##################################################################### # 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...
// Trait for running commands trait Runnable { fn run(&self); } // Struct implementing the Runnable trait struct StartCmd { url: String, waypoint: String, swarm_path: String, swarm_persona: String, is_operator: bool, use_upstream_url: bool, } impl Runnable for StartCmd { /// Start the ...
#!/bin/bash BEAKER_debug=on BEAKER_destroy=no bundle exec rake beaker 2>&1 | tee beaker.out cat beaker.out | ./ansi2html.sh > beaker.out.html
<reponame>youaxa/ara-poc-open<filename>server/src/main/java/com/decathlon/ara/service/dto/problem/ProblemFilterDTO.java package com.decathlon.ara.service.dto.problem; import com.decathlon.ara.domain.enumeration.DefectExistence; import com.decathlon.ara.domain.enumeration.ProblemStatusFilter; import com.decathlon.ara.d...
package com.me.keyword; import cn.hutool.core.io.file.FileReader; import lombok.SneakyThrows; import java.io.IOException; import java.util.HashSet; import java.util.List; import java.util.Set; import java.util.function.Consumer; /** * @author zs * @date 2021/10/30 */ public class HotWord { public static void...
import { ApiServiceModule } from './api-service.module'; describe('ApiServiceModule', () => { let apiServiceModule: ApiServiceModule; beforeEach(() => { apiServiceModule = new ApiServiceModule(); }); it('should create an instance', () => { expect(apiServiceModule).toBeTruthy(); }); });
#!/bin/bash # shellcheck disable=SC1091 set -o errexit set -o nounset set -o pipefail # set -o xtrace # Uncomment this line for debugging purpose # Load libraries . /opt/bitnami/scripts/libapache.sh # Load Apache environment . /opt/bitnami/scripts/apache-env.sh # Ensure Apache environment variables are valid apach...
#!/bin/bash function docker_tag_exists() { EXISTS=$(curl -s https://hub.docker.com/v2/repositories/$1/tags/?page_size=10000 | jq -r "[.results | .[] | .name == \"$2\"] | any") test $EXISTS = true } if docker_tag_exists svenruppert/maven-3.6.0-zulu 1.8.192; then echo skip building, image already existing -...
function generateClientGrid($clients) { $html = '<div class="row">'; foreach ($clients as $client) { $html .= '<div class="col-sm-6 col-md-3 col-lg-3">'; $html .= '<div class="card">'; $html .= '<img class="card-img" src="' . $client->image_path . '" alt="Card image">'; $html .= ...
function reverseWord(word) { let reversedWord = ""; for (let i = word.length - 1; i >= 0; i--) { reversedWord += word[i]; } return reversedWord; } const result = reverseWord("word"); console.log(result);
<reponame>prajnakurkal/Sound-Effect-Piano import java.awt.*; import javax.swing.*; import java.awt.event.*; class LayeredPaneExample extends JFrame implements ActionListener { JLayeredPane pane; JButton [] white = new JButton [8]; JButton [] black = new JButton [5]; String [] whiteSounds = {"drum_roll_rimsh...
import { Injectable , OnInit } from '@angular/core'; import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router'; import { Router } from "@angular/router"; import { SesssionStorageService } from '../service/storage' @Injectable({providedIn : 'root'}) export class RouteguardService implem...
#!/usr/bin/env bash # # Generate AOSP compatible vendor data for provided device & buildID # set -e # fail on unhandled error set -u # fail on undefined variable #set -x # debug readonly SCRIPTS_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # Helper script to download Nexus factory images from web readon...
<filename>src/Chapter2_1Text/Date.java package Chapter2_1Text; public class Date implements Comparable<Date> { private final int day; private final int month; private final int year; public Date(int d, int m, int y) { day = d; month = m; year = y; } public int day() { ...
<reponame>wuximing/dsshop "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getComponentController = exports.getComponentControllerNames = exports.unregisterComponentController = exports.registerComponentController = void 0; var LOAD_COMPONENT_CONTROLLERS = {}; /** * 全局注册组件。 * @para...
import React from 'react'; export interface IconChromeProps extends React.SVGAttributes<SVGElement> { color?: string; size?: string | number; className?: string; style?: React.CSSProperties; } export const IconChrome: React.SFC<IconChromeProps> = ( props: IconChromeProps ): React.ReactElement => { const {...
<reponame>lanpinguo/rootfs_build<filename>u-boot/drivers/video/sunxi/disp2/disp/de/lowlevel_sun8iw11/de_lcd_type.h #ifndef __DE_LCD_TYPE_H__ #define __DE_LCD_TYPE_H__ #include "de_lcd.h" // // detail information of registers // typedef union { u32 dwval; struct { u32 io_map_sel : 1 ; // defa...
#!/bin/bash echo "sudo docker build -t rnaseq-umi-cpp -f Dockerfile.build_ARM64 ${PWD}" sudo docker build -t rnaseq-umi-cpp -f Dockerfile.build_ARM64 ${PWD} echo sudo docker run --rm -v ${PWD}:/local rnaseq-umi-cpp /bin/sh -c "cp -r source/w* /local/. " sudo docker run --rm -v ${PWD}:/local rnaseq-umi-cpp /bin/sh ...
TERMUX_PKG_HOMEPAGE=https://developer.gnome.org/glib/ TERMUX_PKG_DESCRIPTION="Library providing core building blocks for libraries and applications written in C" TERMUX_PKG_VERSION=2.56.1 TERMUX_PKG_SHA256=40ef3f44f2c651c7a31aedee44259809b6f03d3d20be44545cd7d177221c0b8d TERMUX_PKG_SRCURL=https://ftp.gnome.org/pub/gnome...
package org.hswebframework.web.crud.events; import lombok.AllArgsConstructor; import org.apache.commons.beanutils.BeanUtilsBean; import org.apache.commons.collections.CollectionUtils; import org.hswebframework.ezorm.core.param.QueryParam; import org.hswebframework.ezorm.rdb.events.*; import org.hswebframework.ezorm.r...
<reponame>dhinojosa/language-matrix package com.evolutionnext.jdbc; import java.sql.*; public class UsingDriverManager { public static void main(String[] args) throws SQLException, ClassNotFoundException { if (args.length != 2) { System.out.println("Application needs two arguments, e...
#!/usr/bin/env bash main() { for i in PARAM_IMAGE_FILE,image-file PARAM_IMAGE_NAME,image-name; do KEY=${i%,*} VAL=${i#*,} if [[ -z "${!KEY}" ]]; then echo "param ${VAL} is required!" exit 1 fi done local image_dir="${IMAGE_DIR:-images}" echo "> Ensuring image dir '${image_dir}' ex...
<filename>tests/text_preprocessing_test.py import unittest from processing_functions import text_preprocessing import pandas as pd class TextPreprocessingTests(unittest.TestCase): def test_lowercase(self): test_df = pd.Series([ "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do ei...
namespace SalesProject.Domain.Entities { public class BaseEntity { // Base class implementation } public class Product : BaseEntity { public string Name { get; set; } public string NcmCode { get; set; } public decimal CombinedPrice { get; set; } public decima...
def calculate_balance(transactions): total_balance = 0 for _, _, amount in transactions: total_balance += amount return total_balance
package resolvers import ( "github.com/bradpurchase/grocerytime-backend/internal/pkg/auth" "github.com/bradpurchase/grocerytime-backend/internal/pkg/meals" "github.com/graphql-go/graphql" ) // MealsResolver resolves the meals query func MealsResolver(p graphql.ResolveParams) (interface{}, error) { header := p.Inf...
package ch.raiffeisen.openbank.branch.persistency.model; import javax.persistence.Column; import javax.persistence.Embeddable; /** * Geographic location of the ATM specified by geographic coordinates or UTM coordinates. * * @author <NAME> */ @Embeddable public class GeographicCoordinates { /** * Latitude m...
'use strict'; var gju = require('geojson-utils'); function isPoly(l) { return l.feature && l.feature.geometry && l.feature.geometry.type && ['Polygon', 'MultiPolygon'].indexOf(l.feature.geometry.type) !== -1; } var leafletPip = { bassackwards: false, pointInLayer: function(p, layer...
#!/bin/bash # Builds this Docker image and tags it. # Useful only for the maintainer of this Docker image. docker build --tag multiproductions/phptest .
<filename>min/services/hashing.py import hashlib def gethash(filename): new_hash=hashlib.sha256() with open(filename,'rb',buffering=0)as file_name: for hash_array in iter(lambda:file_name.read(128*1024),b''): new_hash.update(hash_array) return new_hash.hexdigest() # Created by pyminifier (https://github.com/lif...
<filename>enterprise-huajietaojin-web/src/api/qrcode-image-service.js<gh_stars>0 import request from '@/utils/request' const QrcodeService = { createStorePreview: (form) => { return request({ url: '/system-proxy/qrcode/images/stores/preview', method: 'post', data: form }) }, createCou...
package com.pangzhao.quartz; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; @Component public class MyBean { @Scheduled(cron = "0/1 * * * * ?") public void print(){ System.out.println(Thread.currentThread().getName()+" :spring task run..."...
#!/bin/bash # Functional parameter passing # global variable USERNAME=$1 # function definitions - start # calculate age in days funcAgeInDays () { echo "Hello $USERNAME, You are $1 Years Old." echo "That makes you approximately `expr $1 \* 365` days old... " } # function definitions - stop # script - start clear...