text
stringlengths
1
1.05M
<reponame>matchup-ir/whooshy<filename>src/whoosh/automata/glob.py # Copyright 2012 <NAME>. 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 ab...
import ctypes import json import os import cv2 import numpy as np import pycuda.driver as cuda import tensorrt as trt from backend.utils import timeit, draw_boxed_text conf_th = 0.3 INPUT_HW = (300, 300) OUTPUT_LAYOUT = 7 with open(os.path.join('models/ssd_mobilenet/labels.json')) as json_data: CLASS_NAMES = jso...
#!/bin/bash -eux EE=${EE:-false} VERSION=${VERSION:-$(grep VERSION= Dockerfile | head -n1 | cut -d = -f 2)} DISTRO=${DISTRO:-$(grep DISTRO= Dockerfile | cut -d = -f 2)} SNAPSHOT=${SNAPSHOT:-$(grep SNAPSHOT= Dockerfile | cut -d = -f 2)} IMAGE=camunda/camunda-bpm-platform function tag_and_push { local tag=${1} ...
package at.downdrown.somfy.exception; /** * Base class for all library specific exceptions. * * @author <NAME> */ public abstract class SomfyClientException extends Exception { public SomfyClientException(String message) { super(message); } public SomfyClientException(String message, Throwabl...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.androidCancel = void 0; var androidCancel = { "viewBox": "0 0 512 512", "children": [{ "name": "g", "attribs": {}, "children": [{ "name": "path", "attribs": { "d": "M256,48C140.559,48,48,140.559,4...
import Parser from './stream-parser'; import { InternalConnectionOptions } from '../connection'; import { FeatureExtAckToken } from './token'; const FEATURE_ID = { SESSIONRECOVERY: 0x01, FEDAUTH: 0x02, COLUMNENCRYPTION: 0x04, GLOBALTRANSACTIONS: 0x05, AZURESQLSUPPORT: 0x08, UTF8_SUPPORT: 0x0A, TERMINATO...
/** * 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...
#!/usr/bin/env bash # Copyright (c) 2014 The Bitcoin Core developers # Copyright (c) 2014-2015 The Dash developers # Copyright (c) 2015-2017 The PIVX developers # Copyright (c) 2017-2018 The Franc developers # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.o...
<gh_stars>0 import { gql } from 'apollo-server-express'; export const typeDefs = gql` interface List { items: [Node!]! totalItems: Int! } enum ListSortmentEnum { ASC, DESC } input ListSort { sorter: String! sortment: ListSortmentEnum! } ` export const ListSortmentEnum = Object.fr...
import React from 'react'; export default class ArrowDown extends React.Component { render() { const { width, height } = this.props; return ( <svg width={width} height={height} viewBox="0 0 140 140" > <defs> <linearGradient x1="0%" y1="50%" x2="100%" y2="50%" id="linearGradient-1"> <sto...
class Operation: def __init__(self, data_structure): self._i = data_structure def _f(self, value): # Implementation of the operation on the data structure pass def perform_operation(self): return self._f(self._i.value())
package graphqlbackend import ( "context" "testing" "github.com/sourcegraph/sourcegraph/internal/database" "github.com/sourcegraph/sourcegraph/internal/types" ) func TestCreateUser(t *testing.T) { resetMocks() database.Mocks.Users.GetByCurrentAuthUser = func(context.Context) (*types.User, error) { return &ty...
#!/bin/bash # This script creates a transient visualization of the power map that was supplied to 3D-ICE. set -e # exit if a command fails # Define the plot command PLT_CMD='python -m HotGauge.visualization.ICE_plt power_map' # Configure the directories SIM_DIR=outputs/sim/ PLT_DIR=plots # Navigate to the simulatio...
<gh_stars>10-100 /*- * Copyright (c) 2018 <NAME> <<EMAIL>> * 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 copyright * notice...
struct Block { timestamp: u64, is_main_chain: bool, } impl Block { fn new(timestamp: u64, is_main_chain: bool) -> Block { Block { timestamp, is_main_chain, } } } fn find_candidate_uncles(blocks: Vec<Block>) -> Vec<Block> { let mut candidate_uncles = Vec::new...
def check_permission(permission_set, required_permission): return permission_set.get(required_permission, False)
#!/bin/bash # define the variables DIRECTORY=$1 HERE=$(pwd) # move to the directory cd $DIRECTORY # filter out 'hours' data from our data cat ./*/failed_login_data.txt | awk '{print $3}' > temptxt.txt # make target html files sort temptxt.txt | uniq -c | awk '{print "data.addRow([\x27" $2 "\x27, " $1 "]);"}' > temp...
#!/bin/bash { source env/bin/activate python3.4 manage.py migrate } || { python3.4 manage.py migrate } || { python3.4 manage.py syncdb --noinput python3.4 manage.py migrate } || { python3.4 manage.py makemigrations python3.4 manage.py migrate } || { python3.4 manage.py -h python3.4 manage.py migrate } exit 0
<gh_stars>1-10 /* * 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 "Lice...
<reponame>lifenjoy51/mypet 'use strict'; describe('myApp.myHome module', function() { beforeEach(module('myApp.myHome')); describe('myHome controller', function(){ it('should ....', inject(function($controller) { //spec body var myHomeCtrl = $controller('myHomeCtrl'); expect(myHomeCtrl).to...
var searchData= [ ['cpu_2elnt_2',['cpu.lnt',['../16bit_2cpu_8lnt.html',1,'']]], ['qs_5fport_2eh_3',['qs_port.h',['../16bit_2qs__port_8h.html',1,'']]], ['stdint_2eh_4',['stdint.h',['../16bit_2stdint_8h.html',1,'']]] ];
<reponame>developerasun/pawcon<gh_stars>1-10 import * as React from 'react'; export function Upload () { // FIX : delete file upload for shop const handleSubmit = (e:React.FormEvent) => { e.preventDefault() // FIX : change server route later const data = document.getElementById('file') as HTMLInputElem...
<filename>modules/caas/api/src/main/java/io/cattle/platform/api/certificate/LoadBalancerServiceCertificateRemoveFilter.java package io.cattle.platform.api.certificate; import io.cattle.platform.core.addon.LbConfig; import io.cattle.platform.core.constants.ServiceConstants; import io.cattle.platform.core.dao.ServiceDao...
<reponame>TomTyack/jss<filename>packages/sitecore-jss-angular/src/components/rendering-field.ts export interface RenderingField { value?: any; editable?: string; } export interface FileField extends RenderingField { src?: string; } export interface ImageField extends RenderingField { src?: string; } export i...
import styled from 'styled-components' const AreasOfInterestStyle = styled.div` width: 100%; // height: 100vh; font-size: 0.8em; margin-top: 2em; padding-bottom: 3em; margin-bottom: 3em; border-bottom: 0.1em solid ${props => props.theme.textColor}; display: flex; flex-direction: co...
#!/usr/bin/env bash wget http://www.lfd.uci.edu/~gohlke/pythonlibs/6kbpejrn/pywin32-220.1-cp27-cp27m-win_amd64.whl >> pywin32-220.1-cp27-cp27m-win_amd64.whl
<reponame>OSADP/C2C-RI /* Jameleon C2C RI plug-in - A plug-in that is used to perform C2C Conformance Testing */ package org.fhwa.c2cri.plugin.c2cri; import java.util.ArrayList; import javax.swing.JOptionPane; import net.sf.jameleon.SessionTag; import net.sf.jameleon.TestCaseTag; import net.sf.jameleon.exception.Jam...
x = 6, y = 4 is a feasible solution with an objective value of 14.
package com.movella.service; import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParser; import com.movella.dao.ContatoDAO; import com.movella.exceptions.InvalidDataException; import com.movella.model.Usuario; import com.movella.responses....
def classify_letter(letter): vowels = ["a", "e", "i", "o", "u"] if letter in vowels: return "Vowel" else: return "Consonant" print(classify_letter(letter)) Output: Consonant
package com.johnnolcox.mintodo; import android.content.res.Resources; import com.johnnolcox.mintodo.R; public class PreferenceKeys { final String night_mode_pref_key; public PreferenceKeys(Resources resources){ night_mode_pref_key = resources.getString(R.string.night_mode_pref_key); } }
def count_unique(arr): # create a set from the array s = set(arr) # return the count of the set return len(s)
python uncertainty_gp.py -f cubic python uncertainty_ours.py -f cubic
export default ({ breakpoints, spacing }) => ({ container: { margin: 'auto', position: 'relative', }, content: { display: 'flex', float: 'left', paddingBottom: 8, minHeight: 110, [breakpoints.up('md')]: { minHeight: 200, paddingLeft: spacing.doubleBaseMargin, paddingR...
import React from "react" import { Container, Col, Row} from 'react-bootstrap'; import "../style/PageTitle.css"; const PageTitle = ({title, menu1, menu2, menu3}) => { return ( <> <Container> <Row > <Col className="mb-0"><h1>{title}</h1></Col> </Row> </Container> </> ); } ...
<filename>src/commands/utility/UserInfoCommand.js const Command = require('../Command'); const util = require('../../util'); const Member = require('../../Member'); const {MessageEmbed} = require('discord.js'); const icons = require('../../icons'); class UserInfoCommand extends Command { static description = 'Sho...
#!/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 "Lice...
# Complete your game here
<gh_stars>1-10 import m from 'mithril'; // @ts-ignore import md from '../markdown/instructions.md'; // Enable modal links. let md_edited = md.replace(/<a href="#modal-gallery"/g, '<a href="#modal-gallery" uk-toggle'); // Edit image paths. md_edited = md_edited.replace(/https:\/\/raw.githubusercontent.com\/amandaghassa...
module.exports=[ ['link', {rel: 'icon', href: '/logo.png'}], ['link', {rel: 'manifest', href: '/manifest.json'}], //['meta', {name: 'theme-color', content: '#6441a5'}], ['meta', {name: 'apple-mobile-web-app-capable', content: 'yes'}], ['meta', {name: 'apple-mobile-web-app-status-bar-style', content: 'black'}]...
'use strict'; angular.module('copayApp.controllers').controller('addwalletController', function ($rootScope, $scope, $timeout, storageService, notification, profileService, bwcService, $log, gettext, go, gettextCatalog, isCordova) { var self = this; var successMsg = gettext('Backup words deleted');...
<filename>src/main/java/org/kwstudios/play/kwbungeelobby/toolbox/ConstantHolder.java package org.kwstudios.play.kwbungeelobby.toolbox; import org.bukkit.ChatColor; public class ConstantHolder { public static final String MOTD_PREFIX = ChatColor.DARK_PURPLE.toString() + ChatColor.BOLD.toString() + "KWStudios" + C...
package io.syndesis.qe.pages.customizations.extensions; import static com.codeborne.selenide.Condition.visible; import static com.codeborne.selenide.Selenide.$; import org.openqa.selenium.By; import com.codeborne.selenide.SelenideElement; import io.syndesis.qe.pages.SyndesisPageObject; public class TechExtensionDe...
#!/usr/bin/env bash # # Copyright 2018 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
<reponame>jsoref/hashicorp-faas-nomad package command import ( "fmt" "strings" "github.com/hashicorp/nomad/api/contexts" "github.com/posener/complete" ) type StopCommand struct { Meta } func (c *StopCommand) Help() string { helpText := ` Usage: nomad stop [options] <job> Stop an existing job. This command ...
#!/bin/sh -e . ~/admin-openrc # adjust tiny image nova flavor-delete m1.tiny nova flavor-create m1.tiny 1 512 8 1 # configure security groups neutron security-group-rule-create --direction ingress --ethertype IPv4 --protocol icmp --remote-ip-prefix 0.0.0.0/0 default neutron security-group-rule-create --direction ing...
echo "install ..." sudo apt update sudo apt install apt-transport-https ca-certificates curl gnupg-agent software-properties-common curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" s...
package com.sreemenon.opensesame; import android.content.DialogInterface; import android.os.AsyncTask; import android.os.Bundle; import android.support.v4.app.DialogFragment; import android.support.v4.app.Fragment; import android.support.v7.app.AlertDialog; import android.text.Editable; import android.text.TextWatcher...
<reponame>mdsd-team-1/photos-metamodeling /** */ package PhotosMetaModel.impl; import PhotosMetaModel.Data; import PhotosMetaModel.DataSegment; import PhotosMetaModel.PhotosMetaModelPackage; import java.util.Collection; import org.eclipse.emf.common.notify.NotificationChain; import org.eclipse.emf.common.util.ELis...
package planaridade; import model.Grafo; public interface VerificadorPlanaridade { public boolean isPlanar(Grafo grafo); }
package org.apereo.cas.authentication; import org.apereo.cas.util.junit.EnabledIfPortOpen; import org.junit.jupiter.api.Tag; import org.springframework.test.context.TestPropertySource; /** * Unit test for {@link LdapAuthenticationHandler}. * * @author <NAME> * @author <NAME> * @since 4.0.0 */ @TestPropertySou...
<filename>src/main/java/org/olat/ims/lti13/manager/LTI13ExternalToolSigningKeyResolver.java<gh_stars>100-1000 /** * <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...
#!/bin/bash # Copyright 2018 The Bazel Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
'use strict'; var fs = require('fs'); var path = require('path'); var async = require('async'); var command = require('commander'); var config = require('config'); var moment = require('moment'); var helper = require('./helper'); command .description('Prune tarballs from the archives based on aging rules') .opt...
#!/bin/sh cd docs && make html
# Update RubyGems system and install Bundler before_install: - gem update --system - gem install bundler # Install necessary dependencies for PhantomJS addons: apt: packages: - libcurl4-openssl-dev - libfontconfig # Install PhantomJS install: - rm -rf $PWD/travis_phantomjs; mkdir -p $PWD/travi...
module Trith; module Core ## # Stack operators. module Stack ## # Stack shufflers. module Shufflers ## # @return [Machine] def clear @stack.clear self end ## # @return [Machine] def depth push(@stack.size) end ## # @...
#!/bin/bash # This is # header # This is not echo "TEST"
#!/bin/bash # # This script generates separate egs directory for each input # language in multilingual setup, which contains both egs.*.ark and egs.*.scp. # # This script will generally be called from nnet3 multilingual training script. echo "$0 $@" # Print the command line for logging . ./cmd.sh set -e # Begin con...
/* * Copyright 2015 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable l...
#!/usr/bin/env bash echo "===CPU:" cat /proc/cpuinfo | egrep "model name|cores" echo " " echo "===RAM: " free -h printf "\n" echo "===Java version: " java -version echo " " echo "===OS: " uname -a printf "\n" echo "===Node: " node --version printf "\n" echo "=== Go: " go version
#!/bin/bash SSH_ENV="$HOME/.ssh/environment" function start_agent { echo "Initialising new SSH agent..." (umask 066; /usr/bin/ssh-agent > "${SSH_ENV}") . "${SSH_ENV}" > /dev/null /usr/bin/ssh-add; } # Source SSH settings, if applicable if [ -f "${SSH_ENV}" ]; then . "${SSH_ENV}" > /dev/null ...
#!/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....
public static double parseExpression(String expression){ Stack<Character> operators = new Stack<>(); Stack<Double> operands = new Stack<>(); int n = expression.length(); double result; for(int i=0; i<n; i++){ char c = expression.charAt(i); if(Character.isDigit(c)){ double...
package grpc import ( "strconv" "testing" "time" "github.com/sirupsen/logrus" "github.com/sirupsen/logrus/hooks/test" "github.com/spiral/php-grpc/tests" "github.com/spiral/roadrunner/service" "github.com/spiral/roadrunner/service/rpc" "github.com/stretchr/testify/assert" "golang.org/x/net/context" ) func T...
<filename>lib/transform-fields.ts<gh_stars>0 import { Fields } from "../src/utils/game-constants" import { fetchTeamsFromTBA } from "./apiFetches" // run using ts-node, use: ` ts-node -O '{"module": "commonjs"}' ./transform-fields.ts ` const fields: Fields = { General: [ "Scouter Name", "Team Number", { ...
package com.shop.service.user; import com.shop.been.AjaxResult; import com.shop.model.user.User; import javax.servlet.http.HttpSession; /** * <p>Title: UserService</p> * <p>Description:</p> * * @Author 姚洪斌 * @Date 2017/7/18 20:16 */ public interface UserService { /** * 注册时查询用户是否已注册 * @param user ...
<filename>src/test/java/com/github/piedpiper/node/stepfunctions/StepFunctionsExecuteHandlerTest.java package com.github.piedpiper.node.stepfunctions; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import org.junit.Assert; import org.junit.Before; import org.junit.Tes...
#set( $symbol_pound = '#' ) #set( $symbol_dollar = '$' ) #set( $symbol_escape = '\' ) package ${package}; import org.easymock.EasyMock; import org.easymock.EasyMockSupport; import org.junit.Test; /** * Unit test to exercise the functionality of the {@link ${pluginName}Envoy} class. */ public class ${plugin...
import pandas as pd def detect_outliers(data): # Calculate the mean mean = data.mean() # Calculate the standard deviation std_dev = data.std() # Set outliers limit outliers_limit = mean + 3*std_dev # For every data point compute the z-score and check if it's an outlier for data_point...
<gh_stars>0 const cheerio = require("cheerio"); const { toTimeSec } = require("./time-format"); /** * * @param {String} value */ const getInt = (value) => { if(value===undefined){ return value; } return parseInt(value.replace(/,/g, "")); }; const nicoSearchHtmlParse = (html, search_target) =>...
package composite import "fmt" func Example_one() { treasureChest := NewChest(TreasureChestType, nil) goldenChest := NewChest(ChestOfChestType, treasureChest) silverChest := NewChest(ChestOfChestType, goldenChest) woodChest := NewChest(ChestOfChestType, silverChest) fmt.Println(woodChest.Open()) // Output: /...
package kazura import chisel3._ import chisel3.util.experimental.BoringUtils import kazura.models.InstInfo import kazura.modules.{BranchPredictor, RFWrite, ROB} import kazura.util.Params._ import kazura.stages._ object Main { val prog = Seq( "b1001_001_000000000".U, // 0: $1 = 0 "b1001_010_000000000".U, /...
/* ***************************************************************************** * Caleydo - Visualization for Molecular Biology - http://caleydo.org * Copyright (c) The Caleydo Team. All rights reserved. * Licensed under the new BSD license, available at http://caleydo.org/license *********************************...
import React, { useState } from "react" import Portfolio1 from "../../images/portfolio/port1.jpg" import Portfolio2 from "../../images/portfolio/port2.jpg" import Portfolio3 from "../../images/portfolio/port3.jpg" import Portfolio4 from "../../images/portfolio/port4.jpg" import Portfolio5 from "../../images/portfolio/p...
#!/bin/bash # Copyright (C) 2009-2013 Team XBMC # http://xbmc.org # # This Program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # ...
# export BATCH_SIZE=64 # export ADDITIONAL='--critic_type=kplusone_fm --kplusone_mhinge_cond_discriminator_weight=1.0 --aux_mhinge_cond_generator_weight=0.05' # export ADDITIONAL='--critic_type=kplusone_fm --generator_loss_fn=kplusone_ssl_featurematching_generator_loss --kplusone_mhinge_ssl_cond_discriminator_weight=1...
const RankingProgress = require('../../models/RankingProgress') const brawlhallaApi = require('../../brawlhalla_api') const config = require('../../../config') const utils = require('../../utils') const players = require('./players') async function cronFn() { const resetRankingPageSeconds = 60 * 60 * 12 // 12h con...
<reponame>tomegorny/temp<filename>messaging-with-jms-using-payara/src/main/java/de/rieckpil/blog/StockPublisher.java package de.rieckpil.blog; import java.time.Instant; import java.util.concurrent.ThreadLocalRandom; import javax.annotation.Resource; import javax.ejb.Schedule; import javax.ejb.Singleton; import javax....
#!/bin/bash # Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless r...
/** * */ package coca.ca; import java.io.Closeable; /** * * @author dzh * @date Nov 14, 2016 12:46:26 PM * @since 0.0.1 */ public interface Ca<K, V> extends Closeable { String name(); CaValue<K, V> read(K key); /** * * @param val * @return true if written successfully, otherwis...
func calculateAverage(_ scores: [Int]) -> Int { let sum = scores.reduce(0, +) let average = Double(sum) / Double(scores.count) return Int(round(average)) }
package com.vxml.tag; import java.io.File; import java.io.StringWriter; import java.util.HashMap; import java.util.Map; import javax.xml.transform.OutputKeys; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerException; import javax.xml.transform.TransformerFactory; import javax.xml.transf...
<filename>services/issuer/src/issuer.ts<gh_stars>1-10 import createLogger from './lib/logger' import setupDb from './setup/db' import setupAgent from './setup/agent' import setupIdentity from './setup/identity' import credentialRequestService from './services/credentialRequests' import backOffice from './services/bac...
#!/usr/bin/env bash PIDS=$(pidof node) if [ -z "$PIDS" ]; then echo "no node pids" exit 1 fi case $1 in kill) set -x kill $PIDS ;; *) set -x ps h -p $PIDS ;; esac # pidof node # ps h -j -p`pidof node` # kill `pidof node`
<filename>src/aima/util/Util.java /* * Created on Aug 24, 2003 by <NAME> * */ package aima.util; import java.util.ArrayList; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Set; public class Util { public static Set listToSet(List l) { Set s = new Has...
// https://uva.onlinejudge.org/external/107/10783.pdf #include<bits/stdc++.h> using namespace std; int main(){ int t,a,b; cin>>t; for(int i=1;i<=t;i++){ cin>>a>>b; int s=0; for(int j=a;j<=b;j++) if(j%2)s+=j; cout<<"Case "<<i<<": "<<s<<"\n"; } }
#!/bin/sh # MIT License # # (C) Copyright [2020] Hewlett Packard Enterprise Development LP # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation...
#!/bin/bash # Script to deploy a very simple web application. # The web app has a customizable image and some text. cat << EOM > /var/www/html/index.html <html> <head><title>Meow!</title></head> <body> <div style="width:800px;margin: 0 auto"> <!-- BEGIN --> <center><img src="http://${PLACEHOLDER}/${WIDTH}/$...
import styled from 'styled-components' import { layout, shadow } from 'styled-system' import PropTypes from 'prop-types' import { isMap } from 'styled-funcs' import theme from './theme' const SHAPES = { square: 'square', round: 'round', rounded: 'rounded', } const Image = styled.img.attrs(props => ({ alt: ''...
<html> <head> <title>Form Page</title> <script> function validateForm() { var x = document.forms[0]["user_input"].value; if (x == "") { alert("Input must be filled out"); return false; } } </script> </h...
<reponame>lauracappelli/pixeltrack-standalone-test-oneapi<gh_stars>0 #ifndef RecoLocalTracker_SiPixelClusterizer_plugins_gpuClusterChargeCut_h #define RecoLocalTracker_SiPixelClusterizer_plugins_gpuClusterChargeCut_h #include <CL/sycl.hpp> #include <dpct/dpct.hpp> #include <cstdint> #include <cstdio> #include "../CUD...
// bank.rs pub mod bank { pub struct Account { account_number: u32, balance: f64, } impl Account { pub fn new_account(account_number: u32) -> Account { Account { account_number, balance: 0.0, } } pub fn deposit...
import compas_rrc as rrc def move_to_joints(joint_positions): """ Move the robotic arm to the specified joint positions. Parameters: joint_positions (list): A list of joint positions to move the robotic arm to. Returns: bool: True if the movement was successful, False otherwise. """ #...
<gh_stars>1-10 package com.touch.air.mall.cart.config; import com.touch.air.mall.cart.interceptor.CartInterceptor; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.annotation.InterceptorRegistry; import org.springframework.web.servlet.config.annotation.WebMvcCo...
<reponame>Pietervanhalem/Pieters-Personal-Repository import numpy as np from IPython.display import clear_output class ConvectionDiffussion: def __init__( self, flow, initial_conditions, K = 0.282, dt = 0.5, dx = 1, dy = 1, L = 100, ...
using System; namespace ConsoleApp { class Program { static void Main(string[] args) { string userInput; Console.WriteLine("Please enter some text: "); // Read user input userInput = Console.ReadLine(); Console.WriteLine(...
A relational database can be used to design a database schema for a blog website. The database will include tables for blog posts, comments, users, tags and categories. Each post will have a many-to-one relationship with users, tags and categories. The comments table will also have a many-to-one relationship with the p...
import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output, TemplateRef, ViewEncapsulation, HostBinding, } from '@angular/core'; import { IPsTableIntlTexts } from '@prosoft/components/core'; import { IPsTableSortDefinition } from '../models'; @Component({ selector: 'ps-table-header', ...
<gh_stars>0 package de.crackscout123.Utils; import java.util.logging.Level; import de.crackscout123.Main.CrackysBot; public class sys { // ### CrackyBot.java ### // Client and server settings public static Level DebugLvl = Level.ALL; public static String hostname = CrackysBot.args_host; public static String q...