text
stringlengths
1
1.05M
import { JSX, render } from "preact"; import { isString } from "ts-type-guards"; import { log } from "userscripter"; import { truncate } from "~src/utilities"; /** * A function assumed to insert `placeholder` in `parent`. */ type InsertIn<Parent extends Element> = ( /* This type has an object parameter inst...
<reponame>Minwasko/SmartSnake<gh_stars>0 export class Snake { public x: number; public y: number; public length: number; constructor() { this.x = 15; this.y = 65; this.length = 0; } public goUp(): void { this.y -= 20; document.getElementById('snake0').style.top = `${this.y}px`; } ...
import pandas as pd from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.svm import SVC # Read the data data = [["The car is a Ford Mustang", "Ford Mustang"]] df = pd.DataFrame(data, columns=['sentence', 'class']) # Vectorizing the sentence vectorizer = TfidfVectorizer() X = vectorizer.fit_tran...
<reponame>mizukai/sample<gh_stars>10-100 angular.module('audioVizApp') .directive('slider', function () { return { template: '<div class="slider"><div class="title">{{name}}: {{model}}</div>'+ '<div class="input"><input ng-model="model" type="range" min="{{from}}" max="{{to}}" step="{{step}}...
#!/bin/bash set -e cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 NDK=/home/heaven7/study/android/android-ndk-r21d HOST_TAG=linux-x86_64 INSTALL_DIR="$(pwd)/../build" cd "../libs/libvips" # need install gobject-introspection (for autogen.sh) function build_for_arch() { if ! test -e build/${1}; then #expor...
package korrektur; import java.util.Random; // utf8: "Köpfchen in das Wasser, Schwänzchen in die Höh." -CIA-Verhörmethode public class Uebungsleitung extends Thread { private Buffer<Klausur> left; private Buffer<Klausur> right; private Random random = new Random(); public Uebungsleitung(Buffer<Klausur> left...
<gh_stars>0 package com.example.security.security.service; import java.util.ArrayList; import java.util.List; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.example.security.domain.SecurityUser; import com.example.security.service.SecurityUserService; import org.springframework.beans.factory.ann...
package service import ( "context" "encoding/json" "fmt" "io/ioutil" "os" "os/signal" "path/filepath" "strings" "syscall" "time" "github.com/davecgh/go-spew/spew" dhclient "github.com/digineo/go-dhclient" "github.com/plunder-app/kube-vip/pkg/cluster" "github.com/plunder-app/kube-vip/pkg/kubevip" log "g...
package controllers import java.util.UUID import models.EventType import play.api.mvc.Call import scala.util.Try import scala.util.matching.Regex object PathValidator { // We put in the whitelist paths used in emails and // paths that might be used as bookmarks. // // Note that we cannot use Play's router to...
<filename>lessons/js-arrays/nested-arrays.js // sc: https://ru.hexlet.io/courses/js-arrays/lessons/nested-arrays/exercise_unit // superseries.js // Реализуйте и экспортируйте по умолчанию функцию, которая находит команду победителя для // конкретной суперсерии. Победитель определяется как команда, у которой больше поб...
var _ = require('lodash'); var channels = require('./lib/database').logChannels; var redis = require('./lib/redis'); var schedule = require('node-schedule'); var date = new Date() date.setDate(date.getDate() - 1); var lastDay = date; var keyPrefix = "cnt:" + lastDay.getDate() + ":"; var _redis2Mongo = function(key){...
<filename>src/components/forms/Login/index.js /** * @module React */ import React from 'react' import Input from 'components/input/Input' import TextButton from 'components/buttons/TextButton' import CtaLink from 'components/links/CtaLink' import Checkbox from 'components/input/Checkbox' import SocialButton fro...
#!/bin/bash set -eu RESPONSE=$(curl -S -X POST -H "Content-Type: application/json" --data "{ \"commit\": \"${GITHUB_SHA}\", \"ref\": \"${GITHUB_REF}\", \"default_branch\": \"master\" }" ${WEBHOOK_URL}) if [[ ${RESPONSE} == "Okay" ]]; then echo "exit 0, ${RESPONSE}" exit 0 else echo "exit 1, ${RESPONSE}" ...
<gh_stars>1000+ #encoding: utf-8 module CamaleonCms::Admin::CustomFieldsHelper def cama_custom_field_elements return @_cama_custom_field_elements if @_cama_custom_field_elements.present? items = {} items[:text_box] = { key: 'text_box', label: t('camaleon_cms.admin.custom_field.fields.text_...
def calculate_synapses(second_layer_neurons, output_layer_neurons): total_synapses = second_layer_neurons * output_layer_neurons return total_synapses # Test the function second_layer = 14 output_layer = 3 print(calculate_synapses(second_layer, output_layer)) # Output: 42
#!/bin/bash # # Copyright 2021 ZUP IT SERVICOS EM TECNOLOGIA E INOVACAO SA # # 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 requi...
#!/bin/bash sudo apt upgrade -y echo "Installing CNI plugin" sudo wget https://raw.githubusercontent.com/Azure/azure-container-networking/v1.1.7/scripts/install-cni-plugin.sh sudo chmod +x install-cni-plugin.sh sudo ./install-cni-plugin.sh v1.1.7 v0.8.7 echo "Setting up a webserver for testing" sudo apt install apac...
<filename>src/archive/archive.module.ts import { Module } from '@nestjs/common'; import { ArchiveService } from './archive.service'; import { ArchiveController } from './archive.controller'; @Module({ controllers: [ArchiveController], providers: [ArchiveService] }) export class ArchiveModule {}
def selectMultiplesOf3(nums): multiples = [] for num in nums: if num % 3 == 0: multiples.append(num) return multiples if __name__ == '__main__': print(selectMultiplesOf3(nums))
/* * Gray: A Ray Tracing-based Monte Carlo Simulator for PET * * Copyright (c) 2018, <NAME>, <NAME>, <NAME>, <NAME> * * This software is distributed under the terms of the MIT License unless * otherwise noted. See LICENSE for further details. * */ #include "Gray/Sources/PointSource.h" PointSource::PointSourc...
import random # Function to generate random string def get_random_string(length): # Create an empty string letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" random_string = "" # Generate the random string of required length for x in range(length): random_string += random.ch...
<gh_stars>0 export function millisToMinutesAndSeconds(millis) { const minutes = Math.floor(millis / 60000) const seconds = ((millis % 60000) / 1000).toFixed(0) return seconds == 60 ? minutes + 1 + ':00' : minutes + ':' + (seconds < 10 ? '0' : '') + seconds }
<gh_stars>0 import { ExternalLink } from 'react-external-link'; const InfoSection = () => { return ( <> <section id="homepage"> <div className="row"> <div className="col-md-12 col-lg-8"> <h3 id="bannerTitle" className="text-left"> Full Stack Web Developer ...
#!/bin/bash GITHUB_USER="ms705" cd ext git clone https://github.com/${GITHUB_USER}/Metis.git metis cd metis ./configure --enable-debug --enable-profile make
class BankAccount: def __init__(self, account_holder): self.account_holder = account_holder self.balance = 0 def deposit(self, amount): if amount > 0: self.balance += amount return f"Deposit of {amount} successful. Current balance: {self.balance}" else: ...
""" Create a generative recurrent neural network (GRU) to generate text """ import numpy as np import tensorflow as tf from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Dense, Dropout, Embedding, GRU # Parameters vocab_size = 81 # Size of our vocabulary embedding_dim = 32 # Number ...
/** * * RaisedButton * */ import React, { Component, PropTypes } from 'react'; import {RaisedButton as MUIButton} from 'material-ui'; class RaisedButton extends Component { // eslint-disable-line react/prefer-stateless-function constructor(props) { super(props); this.state = { exampleValue: '', ...
import { List } from './List'; /** * Remove the first item out of a [[List]] * @param L * @returns [[List]] * @example * ```ts * ``` */ export declare type Tail<L extends List> = L extends readonly [] ? L : L extends readonly [any?, ...infer LTail] ? LTail : L;
//@ts-nocheck const express = require('express') const bodyParser = require('body-parser') const db = require('./queries') const app = express() const port = 8080 app.use(bodyParser.json()) app.use( bodyParser.urlencoded({ extended: true, }) ) app.use((req, res, next) => { // Website you wish to allow to conn...
class DashboardController < ApplicationController before_action :login, only: :private before_action :determine_auth_scope def index github_authenticate!(:default) unless github_authenticated?(:default) return redirect_to(welcome_path) unless logged_in? && current_user.has_scope?('read:org') @private...
def resource_schedule_optimization(tasks, resources): # Create a dictionary of resources and their capacities resource_dic = {} for resource in resources: resource_dic[resource] = { "capacity": resources[resource]["capacity"], "available": resources[resource]["capacity"] } # Initialize the schedule schedule ...
#!/bin/bash SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" pushd "${SCRIPT_DIR}/.." > /dev/null set -e COVERAGE_THRESHOLD=90 echo "Create Virtualenv for Python deps ..." check_python_version() { python3 tools/check_python_version.py 3 6 } function prepare_venv() { VIRTUALENV="$(which virtualenv)" if...
<gh_stars>1-10 package org.opentaps.base.constants; /* * Copyright (c) Open Source Strategies, Inc. * * Opentaps is free software: you can redistribute it and/or modify it * under the terms of the GNU Affero General Public License as published * by the Free Software Foundation, either version 3 of the License, or...
package com.thinkaurelius.titan.util.datastructures; import com.google.common.collect.Iterables; import com.google.common.collect.Iterators; import java.util.Collection; import java.util.Iterator; public class IterablesUtil { public static final <O> Iterable<O> emptyIterable() { return new Iterable<O>()...
$(document).ready(funcionPrincipal); function funcionPrincipal() { $("#btnnuevafila").on('click',FuncionNuevaFila); /*$.get("productillos", function (response, opciones) { console.log(response);*/ // $("#btnnuevafila").on('click', llenar); // ListarProductos(); // }); } /* ...
<reponame>wangsiwei12138/supermall<filename>src/common/mixin.js import { debounce } from "./utils"; import BackTop from "components/content/backTop/BackTop"; // import {BACK_POSITION} from "common/const" export const itemListenerMixin = { mounted () { //1.图片加载完成的事件监听 const refresh = debounce(this....
console.log('Hello, TypeScript'); function add(a: number, b: number) { return a + b; } const sum = add(2, 3);
db.collection.find({name: "John"}, {name: 1, age: 1, country: 1})
import request from '@/utils/request' // 查询房间信息列表 export function listMyform(query) { return request({ url: '/Ower/myform/list', method: 'get', params: query }) } // 查询房间信息详细 export function getMyform(id) { return request({ url: '/Ower/myform/' + id, method: 'get' }) } // 新增房间信息 export fu...
from collections import Counter def most_frequent(arr): c = Counter(arr) return c.most_common(1)[0][0] arr = [1, 3, 3, 3, 5, 4, 4, 6] print(most_frequent(arr)) # Output: 3
import React from 'react'; import { useDispatch } from 'react-redux'; import PropTypes from 'prop-types'; import { removeBookAction } from '../../redux/books/books'; const Book = ({ title, category, id }) => { const dispatch = useDispatch(); const removeBookfromStore = (id) => { dispatch(removeBookAction(id))...
<filename>veriloggen/thread/stream.py from __future__ import absolute_import from __future__ import print_function import math import functools import ast import inspect import textwrap from collections import OrderedDict import veriloggen.core.vtypes as vtypes from veriloggen.seq.seq import make_condition from veril...
def is_value_in_dict(key, my_dict): return key in my_dict
<reponame>thevetdoctor/obainstaclone import React from 'react'; import { SafeAreaView, ScrollView } from 'react-native'; import Header from './Header'; import FooterIcons from './FooterIcons'; import Post from './Post'; import posts from './posts'; import Stories from './Stories'; import styles from './styles'; functi...
<gh_stars>1-10 destructuring_arrays: { input: { {const [aa, bb] = cc;} {const [aa, [bb, cc]] = dd;} {let [aa, bb] = cc;} {let [aa, [bb, cc]] = dd;} var [aa, bb] = cc; var [aa, [bb, cc]] = dd; var [,[,,,,,],,,zz,] = xx; // Trailing comma var [,,zzz,,] =...
/* * Copyright 2014-2021 Real Logic Limited. * * 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 applicable law or ...
const express = require('express'); const router = express.Router(); const AbortController = require('abort-controller'); const fetch = require('node-fetch'); const os = require('os'); const fs = require('fs'); const { exec } = require('child_process'); const USE_CACHED = {}; // 预览 router.get('/preview', async functi...
#include <iostream> #include <math.h> #include <string> #include<climits> using namespace std; int maxSubArraySum(int a[], int size) { int max_so_far = 0, max_ending_here = 0; for (int i = 0; i < size; i++) { max_ending_here = max_ending_here + a[i]; if (max_ending_here < 0) max_endi...
#!/bin/bash source ${HOME}/work/tools/venv_python3.7.2_torch1.4_decore0/bin/activate export FAIRSEQ_PATH=${HOME}/work/tools/venv_python3.7.2_torch1.4_decore0/bin/ echo " ---" echo " * Using python: `which python`" echo " * Using fairseq-train: `which fairseq-train`"; echo # ----------------- FEATURES_TYPE='FlowBERT...
#!/bin/bash set -eo pipefail CURRENT_DIR=$(cd $(dirname $0); pwd) TEMP_DIR="${CURRENT_DIR}/temp" REPO_ROOT_DIR="${CURRENT_DIR%/contrib/offline}" : ${DOWNLOAD_YML:="roles/download/defaults/main.yml"} mkdir -p ${TEMP_DIR} # generate all download files url template grep 'download_url:' ${REPO_ROOT_DIR}/${DOWNLOAD_YML}...
#! /bin/sh echo '1. 文件重命名 .mm --> .cpp' cd basePro mv src/mainwindow.mm src/mainwindow.cpp echo 'src/mainwindow.mm --> mainwindow.cpp' mv src/widgets/common/LoginWidget.mm src/widgets/common/LoginWidget.cpp echo 'src/widgets/common/LoginWidget.mm --> LoginWidget.cpp' mv src/widgets/common/RoomEntryWidget.mm src/widg...
package oauth; import com.google.common.base.Optional; import com.google.common.collect.ImmutableList; import com.nostalgia.PasswordRepository; import com.nostalgia.UserRepository; import com.nostalgia.persistence.model.User; import lombok.extern.slf4j.Slf4j; import org.joda.time.DateTime; import org.slf4j.Logger; im...
package main; import java.util.Arrays; import java.util.Scanner; /** * @author <NAME> * */ public class FindingGenes { public static void main(String[] args) { Scanner input = new Scanner(System.in); String genome = ""; while (!genome.matches("[ACTG]+")) { System.out.print("Enter a genome string...
/** * @author ooooo * @date 2021/1/29 20:47 */ #ifndef CPP_1678__SOLUTION1_H_ #define CPP_1678__SOLUTION1_H_ #include <iostream> #include <vector> #include <unordered_map> #include <unordered_set> #include <stack> #include <numeric> #include <queue> using namespace std; class Solution { public: string interpr...
for (int i = 0; i < conditions.length; i++) { if (/* condition for overlap */) { // Handle overlap condition } else if (/* condition for offset */) { // Handle offset condition } else { // No overlap, offset OK found = true; break; } }
import authDirectiveTransformer from "./auth"; const applyDirectives = (schema) => authDirectiveTransformer(schema, "auth"); export default applyDirectives;
defalternate_case(string): reversed_string = string[::-1] new_string = "" for index, char in enumerate(reversed_string): if index % 2 == 0: new_string += char.upper() else: new_string += char.lower() return new_string assert(alternating_case("Hello world") == "DLROw OLLEh")
<!DOCTYPE html> <html> <head> <title>Days Between Dates</title> </head> <body> <h1>Days Between Dates</h1> <form action=""> <input type="text" id="date1" name="date1" placeholder="Enter date 1"/> <input type="text" id="date2" name="date2" placeholder="Enter date 2"/> <button onclick="calculateDaysBetweenDates()...
<reponame>cyber-itl/citl-static-analysis #pragma once #include <cstdint> #include <tuple> #include <vector> #include "capstone/capstone.h" std::tuple<cs_arch, cs_mode> map_triple_cs(uint32_t triple); std::vector<uint64_t> get_imm_vals(const cs_insn &insn, cs_arch arch, uint32_t base_reg, uint64_t reg_val); bool ...
import dj_database_url import os import sys from datetime import timedelta from pathlib import Path from django.db.backends.mysql.base import DatabaseWrapper DatabaseWrapper.data_types['DateTimeField'] = 'datetime' BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = os.getenv('SECRET_KEY') if os.getenv('...
var AuthnetPaymentMethodController = function(params) { this.init(params); }; AuthnetPaymentMethodController.prototype = { container: 'payment_method_container', customer_profile_id: false, payment_profile_id: false, card_brand: false, card_last4: false, card_name: false, card_zip: false, init: ...
<filename>learn_uwsgi/models/type.py # coding: utf-8 from datetime import date, datetime # noqa: F401 from typing import List, Dict # noqa: F401 from .base_model_ import Model from ..serialization import deserialize_model class Type(Model): """NOTE: This class is auto generated by OpenAPI Generator (https:...
import { prisma } from '@infra/prisma/client' import { TemplateMapper } from '@modules/broadcasting/mappers/TemplateMapper' import { Template } from '../../domain/template/template' import { ITemplatesRepository, TemplatesSearchParams, TemplatesSearchResult, } from '../ITemplatesRepository' export class PrismaT...
#!/bin/bash echo "Setting up experiment roles" kubectl apply -f experiment_roles/
// Use bracket notation to find the second-to-last character in the lastName string. // Hint // Try looking at the thirdToLastLetterOfFirstName variable declaration if you get stuck. // Example var firstName = "Ada"; var thirdToLastLetterOfFirstName = firstName[firstName.length - 3]; // Setup var lastName = "Lovela...
<reponame>kiya69/terminalstore var gulp = require('gulp'); var run = require('gulp-run'); var connect = require('gulp-connect'); var path = require('path'); var stylus = require('gulp-stylus'); var nib = require('nib'); gulp.task('connect', function() { connect.server({ port: 8880 }); }); gulp.task('stylus', f...
class UsersTable < ActiveRecord::Migration[5.1] def change create_table :users do |t| t.string :usernmae t.text :email t.string :password_digest end end end
<html> <head> <title>My Webpage</title> </head> <body> <h1>My Webpage</h1> <div> <p>This is the main content of the webpage.</p> </div> <div> <p>This is the sidebar content of the webpage.</p> </div> <div> <p>This is the footer content of the webpage.</p> </div> <...
#!/bin/sh ########################################################################## # If not stated otherwise in this file or this component's Licenses.txt # file the following copyright and licenses apply: # # Copyright 2015 RDK Management # # Licensed under the Apache License, Version 2.0 (the "License"); # you may ...
#!/bin/sh # # Script buid building and packaging the Hyperloop iOS package # CWD=`pwd` CURVERSION=`grep "^version:" manifest` VERSION=`grep "^version:" manifest | cut -c 10-` METABASE_VERSION=`grep "\"version\":" ../packages/hyperloop-ios-metabase/package.json | cut -d \" -f 4` export TITANIUM_SDK="`node ../tools/tiver...
#!/bin/bash mkdir -p $PREFIX/bin cp *.pl $PREFIX/bin
#******************************************************************************* # Copyright 2019 Fabrizio Pastore, Leonardo Mariani # # 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 Licens...
#!/usr/bin/env bash # Some helpful functions yell() { echo -e "${RED}FAILED> $* ${NC}" >&2; } die() { yell "$*"; exit 1; } try() { "$@" || die "failed executing: $*"; } log() { echo -e "--> $*"; } # Colors for colorizing RED='\033[0;31m' GREEN='\033[0;32m' PURPLE='\033[0;35m' BLUE='\033[0;34m' YELLOW='\033[0;33m' NC=...
import pandas as pd from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.linear_model import LinearRegression # Read the blog post data data = pd.read_csv('blog_posts.csv') # Feature extraction vectorizer = TfidfVectorizer() posts_features = vectorizer.fit_transform(data['text']) # Split data in...
package com.infamous.framework.sensitive.core; import static org.junit.jupiter.api.Assertions.*; import org.junit.jupiter.api.Test; class DefaultSensitiveObjectTest { @Test public void testToString() { DefaultSensitiveObject obj = new DefaultSensitiveObject("123"); assertNotNull(obj.toStrin...
#!/usr/bin/env bash ############################################################################## ## ## Gradle start up script for UN*X ## ############################################################################## # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to ...
<gh_stars>0 module.exports={ mongoURI:' mongodb+srv://yasir:yasir123@cluster-bi6kh.mongodb.net/test?retryWrites=true&w=majority' };
<gh_stars>0 // Copyright 2010 The Apache Software Foundation // // 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 ...
# This file was generated on 2019-07-08T14:21:39+01:00 from the rspec-dev repo. # DO NOT modify it by hand as your changes will get lost the next time it is generated. # Taken from: # https://github.com/travis-ci/travis-build/blob/e9314616e182a23e6a280199cd9070bfc7cae548/lib/travis/build/script/templates/header.sh#L34...
#!/bin/bash OS_NAME="$(uname -s)" if [ "$OS_NAME" == 'Darwin' ]; then brew install gfortran sudo easy_install pip else # assuming using ubuntu sudo apt-get update sudo apt-get -y install python-pip python-dev libopenblas-dev liblapack-dev gfortran fi sudo pip install -r requirements.txt curl http://sigopt-pub...
<reponame>zilbuc/gatsby-tutorial<filename>src/templates/bike-template.js import React from 'react'; import Layout from '../components/layout'; import { Link, graphql } from 'gatsby'; import Img from 'gatsby-image'; const BikeTemplate = ({data}) => { const { title, price } = data.bikeQuery; const { description } = ...
public setLimit(limit: number): T { if (limit <= 0 || !Number.isInteger(limit)) { Log.Error(AbstractScanQuery.name, 'setLimit', 'Limit parameter must be a positive integer', [{name: 'Given limit', value: limit}]); } else { this.request.Limit = limit; } return this as unknown as T; }
<gh_stars>1000+ module Chewy class LogSubscriber < ActiveSupport::LogSubscriber def logger Chewy.logger end def import_objects(event) render_action('Import', event) { |payload| payload[:import] } end def search_query(event) render_action('Search', event) { |payload| payload[:re...
<html> <head> <title>My Webpage </title> </head> <body> <h1>Heading</h1> <p>This is a paragraph.</p> <button>Click Me!</button> </body> </html>
package apps; import org.jooby.Jooby; public class App1096d extends Jooby { { use(Route1096d.class); } }
l = ["Hello", "World", "Test"] result = [x for x in l if x != "World"] print(result)
#!/bin/sh # base16-shell (https://github.com/chriskempson/base16-shell) # Base16 Shell template by Chris Kempson (http://chriskempson.com) # Default Dark scheme by Chris Kempson (http://chriskempson.com) base00="18/18/18" base01="28/28/28" base02="38/38/38" base03="58/58/58" base04="b8/b8/b8" base05="d8/d8/d8" base06=...
<filename>core/src/main/java/demo/java/v2c10/WebService1/WarehouseClient.java package demo.java.v2c10.WebService1; import java.rmi.*; import javax.naming.*; //import com.horstmann.corejava.server.*; /** * The client for the warehouse program. * @version 1.0 2007-10-09 * @author <NAME> */ public class War...
// 5426. 비밀 편지 // 2019.10.10 // 구현 #include<iostream> #include<cmath> #include<string> using namespace std; char board[101][101]; int main() { int t; cin >> t; while (t-- > 0) { string s; cin >> s; int size = sqrt(s.size()); int cnt = 0; // 배열에 입력 for (int i = 0; i < size; i++) { for (int j = 0; ...
<filename>test/attr.test.js require("./chai.helper"); var domHelper = require("./dom.helper"); describe("attr", function () { beforeEach(function () { domHelper( "<div id=\"single1\" class=\"red\" data-spong=\"bang\"></div>" + "<div id=\"single2\" class=\"red\" data-spong=\"bloing\"...
#include "catch.hpp" #include "eval.hpp" SCENARIO("The evaluator shall produce correct multiplication results", "[calc][op][mul]") { CHECK(eval("0 * 0") == 0); CHECK(eval("0 * 1") == 0); CHECK(eval("1 * 0") == 0); CHECK(eval("1 * 1") == 1); CHECK(eval("1 * 2") == 2); CHECK(eval("2 * 1") == 2); ...
#!/bin/sh -l out=$(/app/mzap $1) echo "::set-output name=output::$out"
const milena = "love"; console.log(milena.slice(2))
set -e /usr/bin/mysqldump -u root stopstalkdb > /root/stopstalk-logs/stopstalkdb.sql sleep 10 /usr/bin/mysqldump -u root uvajudge > /root/stopstalk-logs/uvajudge.sql sleep 10 /usr/local/bin/aws s3 cp /root/stopstalk-logs/ s3://stopstalk-db-dumps/mysql/ --recursive --exclude "*" --include "*.sql"
# Create a drop down list to select an item select_box = Select(root, values=["Item 1", "Item 2", "Item 3"]) # Create a variable to store the current selection selected_item = StringVar() # Associate the variable with the drop down list select_box.config(textvariable=selected_item)
<reponame>mintygargle/crow-concepts-site "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _styledComponents = _interopRequireDefault(require("styled-components")); var _SecondaryButton = _interopRequireDefault(require("./SecondaryButton")); function _in...
#!/usr/bin/env bash set -euo pipefail echo "Setting up EKS cluster with cloudformation, helm and kiam..." echo "AWS region: $AWS_DEFAULT_REGION" echo "EC2 ssh key name: $KEY_NAME" echo "Checking helm install" helm version --client echo "Checking aws install" aws --version # Check the key pair exists aws ec2 describe-...
<gh_stars>1-10 /* * */ package net.community.chest.eclipse.wst; import java.io.IOException; import java.io.StreamCorruptedException; import java.io.Writer; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; import javax.xml.transform.TransformerException; ...
<gh_stars>0 package com.opalfire.foodorder.activities; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.support.design.widget.Snackbar; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import a...
public class MarksProcessor { public static void main(String[] args) { int engMark = 90; int chemMark = 95; int mathsMark = 99; int csMark = 97; int phyMark = 85; int totalMarks = engMark + chemMark + mathsMark + csMark + phyMark; double percentage = (tota...