text
stringlengths
1
1.05M
#!/bin/bash # # Usage: # # $ scripts/make-csv.sh path/to/nanopub-monitor.log > nanopub-monitor.csv # cat $1 \ | grep " ch.tkuhn.nanopub.monitor.ServerData - Test result: " \ | sed -r 's/^\[INFO\] ([^ ]*) .* Test result: ([^ ]*) ([^ ]*) ([^ ]*)( ([^ ]*))?$/\1,\2,\3,\4,\6/'
# frozen_string_literal: true module GithubAuthentication module Retriable def with_retries(*exceptions, max_attempts: 4, sleep_between_attempts: 0.1, exponential_backoff: true) attempt = 1 previous_failure = nil begin return_value = yield(attempt, previous_failure) rescue *excep...
class ResponseBuilder { private $response = [ 'code' => 200, 'status' => 'success', 'data' => null, 'url' => null ]; public function code($code) { $this->response['code'] = $code; return $this; } public function status($status) { $this->respo...
package itunes // URLTrack a track representing a network stream type URLTrack struct { Track Address string // the URL for this track }
<gh_stars>1-10 package org.galaxyproject.dockstore_galaxy_interface.language; import com.google.common.io.Resources; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.reflect.TypeToken; import io.dockstore.common.VersionTypeValidation; import io.dockstore.language.CompleteLanguage...
package ai.lum.odinson.state import ai.lum.odinson.utils.TestUtils.OdinsonTest class TestMockState extends OdinsonTest { val docGummy = getDocument("becky-gummy-bears-v2") val eeGummy = extractorEngineWithSpecificState(docGummy, "mock") val eeGummyMemory = extractorEngineWithSpecificState(docGummy, "memory") ...
public static int findMax(int num1, int num2) { if (num1 > num2) { return num1; } return num2; }
<filename>tutos/src/tools/schemas/careers.js import { schema } from 'normalizr' export const career = new schema.Entity( 'careers', ) export const careers = new schema.Array(career)
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. package testdata import ( context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" ) // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc packa...
<reponame>stephenjelfs/react-dnd-tutorial-typescript-mobx declare module "react-dnd-html5-backend" { export default class HTML5Backend implements __ReactDnd.Backend {} }
package com.ctrip.persistence.service; import com.ctrip.persistence.entity.*; import com.ctrip.persistence.enums.MLFlowStatus; import com.ctrip.persistence.pojo.DataResult; import com.ctrip.persistence.pojo.Result; import java.util.List; import java.util.Map; /** * Created by juntao on 2/14/16. * 算法开发 service * ...
package com.packtpub.designpatterns.structural; import java.sql.Connection; import java.sql.Date; import java.sql.PreparedStatement; import java.util.UUID; import com.packtpub.designpatterns.creational.ConnectionManager; public class CabBooking { ConnectionManager instance = null; public CabBooking()...
from django import forms from .models import PBSMMEpisode class PBSMMEpisodeCreateForm(forms.ModelForm): """ This overrides the Admin form when creating an Episode (by hand). Usually Episodes are "created" when ingesting a parental Season (or a grand-parental Show). """ class Meta: mod...
<filename>src/app/app.routing.ts import { ModuleWithProviders } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; import { WelcomeComponent } from './welcome/welcome.component'; import { GameOverComponent } from './game-over/game-over.component'; import { SuccessComponent } from './success/s...
package org.nem.core.model.ncc; import org.nem.core.model.namespace.*; import org.nem.core.model.primitive.BlockHeight; public class NamespaceMetaDataPairTest extends AbstractMetaDataPairTest<Namespace, DefaultMetaData> { public NamespaceMetaDataPairTest() { super(account -> new Namespace(new NamespaceId("foo"), ...
<html> <head> <title>Calculator</title> <script> function calculate() { let a = document.getElementById('a').value; let b = document.getElementById('b').value; document.getElementById('output').innerHTML = Number(a) + Number(b); } </script> </head> <body> <input type="text" id="a"/> ...
package com.github.jinahya.datagokr.api.b090041_.lunphinfoservice.client.message.adapter; import java.time.Month; import java.time.format.DateTimeFormatter; public class MmMonthAdapter extends FormattedTemporalAdapter<Month> { public static final DateTimeFormatter MONTH_MM_FORMATTER = DateTimeFormatter.ofPattern...
package io.quarkuscoffeeshop.counter.domain; public enum LineItemStatus { PLACED, IN_PROGRESS, FULFILLED }
package de.hswhameln.typetogether.client.gui; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.beans.PropertyChangeEvent; import java.util.logging.Level; import java.util.logging...
<gh_stars>0 package com.spark.itversity.example import org.apache.spark.SparkContext import org.apache.spark.SparkContext._ import org.apache.spark.SparkConf /** * @author ollopollo */ object simpleSpark { def main(args : Array[String]){ //println("hi1") val conf = new SparkConf().setAppName("Simple Applica...
import Component from '@ember/component'; import { inject as service } from '@ember/service'; import { computed } from '@ember/object'; import templateString from 'ember-emojione/-private/cp-macros/template-string'; export default Component.extend({ tone: undefined, toneSelectAction: () => {}, emo...
<filename>src/main/java/de/unistuttgart/ims/coref/annotator/SearchAnnotationPanel.java package de.unistuttgart.ims.coref.annotator; import java.awt.BorderLayout; import java.awt.event.ActionEvent; import java.awt.event.WindowListener; import javax.swing.AbstractAction; import javax.swing.Action; import javax.swing.Bu...
<reponame>aizatto/timestamp-js import React from "react"; import "./App.css"; import { Menu } from "./components/menu"; import { Page } from "./components/page"; function App() { return ( <div className="App"> <Menu /> <Page /> </div> ); } export default App;
<reponame>harsa/basilisk-react-native import firebase from "react-native-firebase"; // Redux Store Configuration import { createStore, applyMiddleware } from 'redux'; import thunk from 'redux-thunk'; import rootReducer from '../reducers/root'; import loggingMiddleware from './middleware/logging'; const configureStore...
def sum_square_odd_numbers(a, b): sum = 0 for i in range (a, b+1): if i % 2 != 0: sum += i**2 return sum
<reponame>zouvier/BlockChain-Voting /// <reference types="node" /> import { RunState } from './../interpreter'; /** * Adjusts gas usage and refunds of SStore ops per EIP-2200 (Istanbul) * * @param {RunState} runState * @param {any} found * @param {Buffer} value */ export declare function updateSstoreGasEIP...
import requests from bs4 import BeautifulSoup def fetch_top_result(keyword): query = "+".join(keyword.split(" ")) url = f"https://www.google.com/search?q={query}" page = requests.get(url) soup = BeautifulSoup(page.content, "html.parser") link = soup.find("div", {"class": "r"}).find("a").get("href")...
def processInputFile(inputFileName, outputFileName, classId, cssId): with open(inputFileName, 'r', encoding='utf-8') as inputFile, open(outputFileName, 'w', encoding='utf-8') as outputFile: for line in inputFile: if classId in line: pasteScript(line, outputFile) elif ...
export const BANK_ENDPOINT = 'http://192.168.3.112/banks?limit=30&offset=0'; export const IPAPI_ENDPOINT = 'http://ip-api.com/batch/'; export const VALIDATOR_ENDPOINT = 'http://192.168.127.12/validators?limit=30&offset=0';
<reponame>dougrich/oauth-aggregator function bootstrap( plugins, config, express = require('express') ) { const app = express() for (const p of plugins) { p.bootstrap(config, app) } return app } module.exports = bootstrap
function filterByProperty(arr, property, value) { let filteredArray = []; for (let i=0; i<arr.length; i++){ if (arr[i][property] === value) { filteredArray.push(arr[i]); } } return filteredArray; } const furniture = filterByProperty(products, 'type', 'furniture');
<reponame>getkuby/kube-dsl module KubeDSL::DSL::Batch::V2alpha1 autoload :CronJob, 'kube-dsl/dsl/batch/v2alpha1/cron_job' autoload :CronJobList, 'kube-dsl/dsl/batch/v2alpha1/cron_job_list' autoload :CronJobSpec, 'kube-dsl/dsl/batch/v2alpha1/cron_job_spec' autoload :CronJobStatus, 'kube-dsl/dsl/batch/v2alpha1/cr...
<reponame>yelhouti/jx3-pipeline-catalog package tests import ( "context" "crypto/tls" "fmt" "net/http" "os" "path/filepath" "strconv" "strings" "testing" "time" "github.com/jenkins-x/go-scm/scm" v1 "github.com/jenkins-x/jx-api/v3/pkg/apis/jenkins.io/v1" "github.com/jenkins-x/jx-api/v3/pkg/client/clientse...
// A function to calculate the minimum distance between four cities. function minDistance(distMatrix) { let source = 0, dest = 0, min = Infinity, currentDistance; // Using two for loops to compare distance between all possible pairs for (let i = 0; i < distMatrix.length; i++) { ...
/* * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. 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. A copy of the License is located at * * http://aws.amazon.com/apache2.0/ * * or in the "lic...
def find_min_shares_stock(portfolio): min_shares_stock = min(portfolio, key=lambda x: x['shares']) return min_shares_stock['name']
import subprocess # placeholder
#!/bin/bash -e ################################################################################ ## File: oc.sh ## Desc: Installs the OC CLI ################################################################################ source $HELPER_SCRIPTS/install.sh # Install the oc CLI DOWNLOAD_URL="https://mirror.openshift...
<head> <title>My Title</title> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge"> </head>
<reponame>itsNikolay/dry-configurable # A collection of micro-libraries, each intended to encapsulate # a common task in Ruby module Dry module Configurable Error = Class.new(::StandardError) AlreadyDefinedConfigError = ::Class.new(Error) FrozenConfigError = ::Class.new(Error) NotConfiguredError = ::C...
import os def simulate_setns(fd): # Open the file descriptor to the namespace ns_fd = os.open(f"/proc/self/fd/{fd}", os.O_RDONLY) # Call the setns syscall to associate the calling process with the namespace os.setns(ns_fd, os.CLONE_NEWNET) # Example: CLONE_NEWNET for network namespace # Close th...
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
# 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 License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
<filename>lang/py/pylib/code/uuid/uuid_uuid_objects.py #!/usr/bin/env python # encoding: utf-8 # # Copyright (c) 2008 <NAME> All rights reserved. # """ """ __version__ = "$Id$" #end_pymotw_header import uuid def show(msg, l): print msg for v in l: print ' ', v print input_values = [ 'urn:uu...
<reponame>tdm1223/Algorithm<gh_stars>1-10 // 9933. 민균이의 비밀번호 // 2019.05.22 // 문자열 처리 #include<iostream> #include<vector> #include<string> #include<algorithm> using namespace std; // 문자열 거꾸로 string rev(string &input) { string tmp(input); reverse(tmp.begin(), tmp.end()); return tmp; } int main() { int n; cin >> n;...
var stgr; stgr = stgr || {}; stgr.modelBuildr = (function() { 'use strict'; var getData, init, _collateProperties; init = function(callback) { if (callback == null) { callback = function() {}; } return getData(callback); }; getData = function(callback) { var request; if (callback =...
export function clearWorks (state) { state.active = [] state.inactive = [] } export function addActive (state, proposal) { state.active.push(proposal) } export function addInactive (state, proposal) { state.inactive.push(proposal) }
package org.ship.core.vo.engine; import io.grpc.ManagedChannel; import io.grpc.ManagedChannelBuilder; import org.dataship.rpc.DatashipGrpc; import org.dataship.rpc.Rpc; import org.ship.core.util.Utils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.concurrent.TimeUnit; /** * Created by wx...
if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then /bin/bash "$INSTALL_DIR/bin/slack.sh" "[xerosecurity.com] •?((¯°·._.• Started Sn1per webpwn scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" fi echo -e "${OKGREEN}=====================================================================...
with open('../cities.txt') as f: my_list = []
<gh_stars>0 package workflow import ( "context" "fmt" "github.com/go-gorp/gorp" "github.com/ovh/cds/engine/api/application" "github.com/ovh/cds/engine/api/cache" "github.com/ovh/cds/engine/api/environment" "github.com/ovh/cds/engine/api/observability" "github.com/ovh/cds/sdk" "github.com/ovh/cds/sdk/exporte...
<gh_stars>10-100 /** * Copyright (C) Oranda - All Rights Reserved (January 2021 - January 2021) */ import { HaliaCore, HaliaPlugin, OptionalDependencies, OptionalDependenciesPatch } from "../src"; import { haliaCoreAPI, HaliaStack } from "../src/halia"; import { expect } from "chai"; describe("Extensions", () => { ...
#!/bin/sh GPU=$1 DATA=$2 ARCH=$3 CKPT=$4 if [ $# -ne 4 ] then echo "Arguments error: <GPU_ID> <DATASET> <ARCH> <CKPT>" exit 1 fi python train.py \ --eval \ --resume $CKPT \ --sgpu $GPU \ -d $DATA \ -a $ARCH \ -n 64 \ -m 0 \ --name test
#!/bin/bash # Copyright 2014 The Go Authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. # For testing Native Client on builders or locally. # Builds a test file system and embeds it into package syscall # in every generated binary. # # As...
func processNetworkResult<T>(_ result: NetworkResult<T>, completion: @escaping (NetworkResult<T>) -> Void) { switch result { case .success(let value): completion(.success(value)) case .failure(let error): completion(.failure(error)) } }
bundle install bundle exec fastlane prep
package com.lbs.server.conversation import akka.actor.{ActorSystem, Cancellable} import com.lbs.bot.model.{Command, MessageSource} import com.lbs.common.Logger import com.lbs.server.conversation.Account.SwitchAccount import com.lbs.server.conversation.base.Conversation import scala.collection.mutable import scala.co...
import { useState } from 'react'; import styled from 'styled-components'; export default (props) => { const [hover, setHover] = useState(false); return ( <Button {...props} hover={hover} onFocus={() => setHover(true)} onMouseEnter={() => setHover(true)} onBlur={() => setHover(fal...
public class RouteMapper { private Dictionary<string, string> routeMappings; public RouteMapper() { routeMappings = new Dictionary<string, string>(); } public void AddRouteMapping(string urlPattern, string controllerAction) { routeMappings[urlPattern] = controllerAction; } ...
const introPic = document.getElementById('changePic'); const bottonNewName = document.getElementById('newName'); let spanName = document.getElementById('name'); let pink = document.querySelectorAll('.pink-bg'); const pinkText = document.querySelectorAll('.pink-text'); const links = document.querySelectorAll('a'); let ...
<filename>src/interfaces/requests/list-meeting-registrants.ts<gh_stars>1-10 import { RegistrantStatus } from '../constants'; export interface GetListMeetingRegistrantsParams { meetingId: number; queryParams?: { occurrence_id?: string; status?: RegistrantStatus; page_size?: number; page_number?: num...
package com.timwang.algorithm.warmup.bowling; import com.timwang.algorithm.warmup.bowling.calculate.BowlingRoundCalculator; import com.timwang.algorithm.warmup.bowling.roll.BowlingRoll; import com.timwang.algorithm.warmup.bowling.round.BowlingRound; import com.timwang.algorithm.warmup.bowling.rule.SpareAddScoreRule; i...
export { name } from "./name" export { description } from "./description" export { uniqueName } from "./uniqueName"
echo "" | base64 -D -o scrollbar.png
/** * @license Copyright (c) 2003-2020, CKSource - <NAME>. All rights reserved. * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license */ /** * @module engine/conversion/downcastdispatcher */ import Consumable from './modelconsumable'; import Range from '../model/range'; import Emitte...
#include "ArtificialIntelligence.h"; #include <random>; #include <bitset>; #include <string>; #include <iostream>; #include <fstream>; #include <windows.h>; #include <thread>; using namespace std; //This constructor runs the Artificial Intelligence. ArtificialIntelligence::ArtificialIntelligence(int count...
#!/bin/bash # ******************** # Run Funceble Testing # ******************** # **************************************************************** # This uses the awesome funceble script created by Nissar Chababy # Find funceble at: https://github.com/funilrys/funceble # **********************************************...
<gh_stars>1-10 //流程列表 router.route('/spms/approve/approve/') .all(function(req,res,next){ next(); }) .get(function(req,res,next){ res.writeHead(200, { 'Content-Type': 'application/json' }); var data = fs.readFileSync('routers/files/process-list.json'); res.end(JSON.stringify(eva...
<gh_stars>0 #include "Add_Write_Stat.h" #include"..\Statements\Write_Stat.h" Add_Write_Stat::Add_Write_Stat(ApplicationManager *pAppManager) :Action(pAppManager) { txt = ""; draw = true; redo = false; } void Add_Write_Stat::ReadActionParameters() { Output *pOut = pManager->GetOutput(); Input *pI...
import uuid def generateUniqueId(): return str(uuid.uuid4()) uniqueId = generateUniqueId() print(uniqueId)
<filename>node_modules/react-icons-kit/md/ic_directions_outline.js<gh_stars>0 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ic_directions_outline = void 0; var ic_directions_outline = { "viewBox": "0 0 24 24", "children": [{ "name": "path", "attribs": { "d": "...
package commands_test import ( "encoding/json" "errors" "fmt" "io/ioutil" "os" "github.com/pivotal-cf/om/api" "github.com/pivotal-cf/om/commands" "github.com/pivotal-cf/om/commands/fakes" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) var _ = Describe("ConfigureProduct", func() { Describe("Execu...
import { Resource } from "./resource.js"; class Audio { timer = null source = null file = null audioCtx = null shouldStop = false frequencyData = [0] init(){ //this.stop(); this.initAudioEngine(); } initAudioEngine(){ this.audioCtx = new (window.AudioContext || wi...
import * as Domain from "domain_voice-configs"; import { GuildVoiceConfigRepository, LayeredVoiceConfigRepository, LayeredVoiceConfig, } from "domain_voice-configs-write"; import { randomizers, RandomizerReturnType } from "./randomizer"; const v1v2Boundary = 1598886000000; //2020/09/01 00:00:00 UTC+9 function sel...
python -m unittest "$@"
<gh_stars>1-10 package com.bhm.sdk.rxlibrary.rxjava; import android.annotation.SuppressLint; import androidx.annotation.NonNull; import com.bhm.sdk.rxlibrary.rxjava.callback.RxUpLoadCallBack; import com.bhm.sdk.rxlibrary.utils.RxUtils; import java.io.IOException; import io.reactivex.Observable; import io.reactivex....
<reponame>pnkfb9/gem5_priority<gh_stars>0 #include "dvfs.hh" #include <cassert> using namespace std; Dvfs::Dvfs(DvfsParams *p) : SimObject(p), recreateFiles(p->recreateFiles) { assert(theInstance==0); //Don't call it twice theInstance=this; } Dvfs *Dvfs::instance() { //assert(theInstance); //Has to exi...
#include <iostream> int sumEven(int arr[], int size) { int sum = 0; for (int i = 0; i < size; i++) { if (arr[i] % 2 == 0) sum += arr[i]; } return sum; } int main() { int arr[] = {2, 3, 5, 6, 8, 9}; int size = sizeof(arr) / sizeof(arr[0]); int sum = ...
def count_words(text): words = text.lower().split() wordcount = {} for word in words: if word in wordcount.keys(): wordcount[word] += 1 else: wordcount[word] = 1 return wordcount def most_frequent(wordcount): most_frequent_word = '' max_count = 0 for ...
package engine import ( "errors" "fmt" "github.com/gin-gonic/gin" fl "github.com/korableg/flow" "github.com/korableg/flow/errs" "github.com/korableg/flow/leveldb" "github.com/korableg/flow/repo" "github.com/korableg/mini-gin/config" "net/http" "strconv" ) var engine *gin.Engine var flow *fl.Flow func init(...
One suggestion to optimize the runtime of a program written in Python is to use vectorized operations with NumPy where possible, as it can offer significant performance gains over native Python code. Additionally, use data structures such as dictionaries, sets and lists, where appropriate, as they can help improve look...
<gh_stars>0 package org.gbif.pipelines.estools; import java.util.Collections; import org.gbif.pipelines.estools.client.EsConfig; import org.hamcrest.CoreMatchers; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; /** Unit tests for {@link EsIndex}. */ public class EsIndexTest {...
package json import ( "errors" "strings" "github.com/spyzhov/ajson" ) func EvalExpr(json string, expr string) (string, error) { root := ajson.Must(ajson.Unmarshal([]byte(json))) _, err := ajson.Eval(root, expr) if err != nil { return "", err } result := ajson.Must(ajson.Eval(root, expr)) return result.Str...
class AddBandChangeToBatChanges < ActiveRecord::Migration def self.up add_column :bat_changes, :old_band_name, :string add_column :bat_changes, :new_band_name, :string end def self.down remove_column :bat_changes, :old_band_name remove_column :bat_changes, :new_band_name end end
#!/bin/bash exec >>bash.log exec 2>>bash.log exec 5> bash.log export BASH_XTRACEFD=5 set -x sh analyze_simple_1624.sh 1624A/1 1624A/1 sh analyze_simple_1624.sh 1624A/2 1624A/2 sh analyze_simple_1624.sh 1624A/2 1624A/12 sh analyze_simple_1624.sh 1624A/2 1624A/13 sh analyze_simple_1624.sh 1624A/2 1624A/14 sh analyze_sim...
import { fromJS } from 'immutable'; export const setStateAction = { type: 'articleDetail/SET_STATE', payload: { key: 'isLoading', value: true, }, }; export const loadAction = { type: 'articleDetail/LOAD', payload: fromJS({ replyCount: 1, relatedArticles: { edges: [ { ...
#!/bin/bash # ----------------------------------------------------------------------------- # # Copyright (C) 2021 CERN & University of Surrey for the benefit of the # BioDynaMo collaboration. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in ...
#!/bin/sh -xe # Run tests in Container sudo docker run --privileged -v `pwd`:/SCAMP:rw -it fedora:$1 /bin/bash -c "bash -xe /SCAMP/travis/fedora_build_inside_docker.sh $1"
#!/usr/bin/env bash res=0 if [ -f /etc/cron.allow ];then fileperm=`/bin/ls -ld ${file} | cut -f1 -d" "` if [ `echo ${fileperm} | cut -c2 ` != "r" ];then echo "User Read NOT set on $file" res=1 fi if [ `echo ${fileperm} | cut -c3 ` != "w" ];then echo "User Write NOT set on $file" res=1 fi ...
<gh_stars>0 package material import "github.com/rrothenb/pbr/pkg/rgb" // https://i.stack.imgur.com/Q73nz.png func Gold(roughness, metalness float64) *Uniform { return &Uniform{ Color: rgb.Energy{1, 0.86, 0.57}, Metalness: metalness, Roughness: roughness, } } func Mirror(roughness float64) *Uniform { re...
<gh_stars>1-10 #ifndef _LOGGER_H_ #define _LOGGER_H_ #if defined(_MSC_VER) #pragma once #endif /* * LEGAL NOTICE * This computer software was prepared by Battelle Memorial Institute, * hereinafter the Contractor, under Contract No. DE-AC05-76RL0 1830 * with the Department of Energy (DOE). NEITHER THE GOVERNMENT NO...
/** * \brief Especialitzacio del Rol Centralcap a l'esquerra * @file CentralEsquerra.java */ public class CentralEsquerra extends Central{ @Override public String toString() { return this.getClass().getName(); } }
<gh_stars>0 #include <errno.h> #include <stdlib.h> #include <string.h> // #include "array_indexed.h" #include "double.h" #include "int.h" #include "mesh_qc.h" static vector_sparse * mesh_qc_metric_p_i( int m_cn_0, const jagged1 * m_cf_p_0_i, int p, int i, double m_vol_p_i) { double denominator_p_i; vector_sparse...
import React from "react"; // Styles import styles from "./Contact.module.scss"; const Illustration = () => { return ( <div className={styles.Illustration}> <svg width="588.124" height="550" viewBox="0 0 588.124 550" className={styles.IllustrationContent} > <g...
package controllers import play.api.mvc.{Action, Controller} import play.api.Routes import models._ import play.api.libs.json.Json import play.api.libs.json._ import play.api.libs.json.Reads._ import play.api.libs.functional.syntax._ import java.sql.Timestamp import java.util.Date import play.api.mvc.Results object A...
const express = require('express') const { uploader } = require('../middleware/multerFile') const router = express.Router() // Controllers const { uploadFile, getComboFile } = require('../controllers/womboController') // Routes router.post('/list/upload', uploader.any(), uploadFile) router.get('/list/download', getCo...
import { NextApiRequest, NextApiResponse } from "next"; import { removeTokenCookie } from "~/lib/api/account"; export default async function logout( req: NextApiRequest, res: NextApiResponse ) { if (req.method === "POST") { removeTokenCookie(res); res.end(); } }
#!/usr/bin/env bash set -e script_path=$(cd -P -- "$(dirname -- "$0")" && pwd -P) cd "${script_path}/.." || exit 1 if [ "$#" -eq "1" ]; then mapfile -t files < <( git ls-files -- \ '*.cpp' \ '*.h' \ ':!:Base' \ ':!:Kernel/Arch/i386/CPU.cpp' \ ':...
func primeNumbers(upTo n: Int) -> [Int] { var primes = [Int]() for num in 2..<n { var isPrime = true let maxDivisor = Int(sqrt(Double(num))) for divisor in 2...maxDivisor { if num % divisor == 0 { isPrime = false break } } ...
import { ReactNode } from 'react'; export interface Props { name: string; title: string; body: ReactNode; }