text
stringlengths
1
1.05M
#!/bin/bash # Copyright 2015 The Kubernetes 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 require...
def find_max(array): maxValue = array[0] for num in array[1:]: if num > maxValue: maxValue = num return maxValue find_max([30, 12, 67, 73, 21]) # 73
<filename>applications/physbam/physbam-lib/External_Libraries/Archives/boost/boost/test/utils/iterator/ifstream_line_iterator.hpp // (C) Copyright <NAME> 2004-2005. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0...
<filename>test/counters/LogCounters_test.go package counters import ( "testing" "github.com/stretchr/testify/suite" "github.com/pip-services/pip-services-runtime-go" "github.com/pip-services/pip-services-runtime-go/log" "github.com/pip-services/pip-services-runtime-go/counters" ) type ...
#!/usr/bin/env bash set -e source /etc/profile.d/chruby.sh chruby 2.1.7 function fromEnvironment() { local key="$1" local environment=environment/metadata cat $environment | jq -r "$key" } export BOSH_internal_cidr=$(fromEnvironment '.network1.vCenterCIDR') export BOSH_internal_gw=$(fromEnvironment '.network1...
#!/bin/bash ##Kør på cpu #BSUB -q hpc ##Navn på job #BSUB -J batch_job_this_is_on_purpose_to_utilize_more_kernel ##Output fil #BSUB -o output/batch/batchjobs-%J.out ##Antal kerner #BSUB -n 1 ##Om kernerne må være på forskellige computere #BSUB -R "span[hosts=1]" ##Ram pr kerne #BSUB -R "rusage[mem=10GB]" ##Hvor lang ti...
import pygame import time class TimerControl: def __init__(self, position): self.position = position self.start_time = 0 self.is_running = False def start_timer(self): self.start_time = time.time() self.is_running = True def stop_timer(self): self.is_runnin...
#!/usr/bin/env bash # Without $HOME, a message is seen in cloud-init-output.log during autosign: # couldn't find login name -- expanding `~' export HOME='/root' install_puppetserver() { wget https://yum.puppet.com/puppet6-release-el-7.noarch.rpm rpm -Uvh puppet6-release-el-7.noarch.rpm yum-config-manager --en...
# Get books for this Asset Manager # Get all book details for one book # Get current positions for that book # Create a new trade # Save it to AMaaS # Update positions
#!/bin/bash # 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 applicable law or agreed t...
def divide_list(numbers, divisor): return [i/divisor for i in numbers]
import numpy as np import h5py import logging from nexusutils.readwriteoff import ( write_off_file, create_off_face_vertex_map, construct_cylinder_mesh, ) from nexusutils.detectorplotter import do_transformations from nexusutils.utils import normalise, calculate_magnitude logger = logging.getLogger("NeXus_...
/* * ============================================================================= * * Copyright (c) 2011-2016, The THYMELEAF team (http://www.thymeleaf.org) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may ...
#!/usr/bin/env bash CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" source "$CURRENT_DIR/helpers.sh" gram_low_fg_color="" gram_medium_fg_color="" gram_high_fg_color="" gram_low_default_fg_color="#[fg=green]" gram_medium_default_fg_color="#[fg=yellow]" gram_high_default_fg_color="#[fg=red]" get_fg_c...
<filename>src/main/webapp/app/entities/techno/techno.route.ts import { Injectable } from '@angular/core'; import { Resolve, ActivatedRouteSnapshot, RouterStateSnapshot, Routes } from '@angular/router'; import { UserRouteAccessService } from '../../shared'; import { JhiPaginationUtil } from 'ng-jhipster'; import { Tec...
<reponame>vitrum/radical-input<gh_stars>10-100 const electron = require('electron'); // Module to control application life. // Module to create native browser window. const { BrowserWindow, app } = electron; const {CONFIG} = require('./config.js'); const path = require('path'); const url = require('url'); const W...
<filename>venue/venue/doctype/venue/venue.js // Copyright (c) 2021, <NAME> and contributors // For license information, please see license.txt frappe.ui.form.on('Venue', { refresh: function(frm) { rm.add_custom_button('Create Item', () => { frappe.new_doc('Items', { venue: frm.doc.name ...
package vn.tale.counter.ui.component.radio; import org.junit.Before; import org.junit.Test; import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.MockitoAnnotations; /** * Created by <NAME> Tiki on 5/3/16. */ public class RadioGroupControllerTest { @Mock RadioItem item1; @Mock RadioItem item2...
const Sequelize = require('sequelize') const db = require('../db') const Share = db.define('share', { readonly: { type: Sequelize.BOOLEAN, allowNull: false } }) module.exports = Share
/* Copyright 2020 Freerware * * 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 agreed to in wr...
<gh_stars>1-10 package com.qmuiteam.qmui.widget; import android.support.v4.view.PagerAdapter; import android.util.SparseArray; import android.view.ViewGroup; /** * @author cginechen * @date 2017-09-13 */ public abstract class QMUIPagerAdapter extends PagerAdapter { private SparseArray<Object> mScrapItems = ne...
<reponame>ttungbmt/next-cache import LRUCache from 'lru-cache'; import { isNil, merge } from 'lodash'; function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { ke...
<filename>packages/@aws-cdk/aws-amplify/test/app-asset-deployment.integ.snapshot/asset.c3fdb1653d155f504c9d470873cc7012b6b21b0be8fc9922ae2ef49bd22daecb/index.js "use strict"; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames...
<filename>packages/common/src/utils/getPath.ts import type { FormControl } from '../types'; /** * @category Helper */ export function getPath(el: FormControl): string { const fieldSetName = el.dataset.felteFieldset; return fieldSetName ? `${fieldSetName}.${el.name}` : el.name; }
<filename>cortana-pixeltracker-core/src/main/java/com/microsoft/azure/server/pixeltracker/package-info.java<gh_stars>1-10 /** * Pixel Tracker Package Info * Created by dcibo on 5/25/2017. */ package com.microsoft.azure.server.pixeltracker;
#!/usr/bin/env bash set -e set -o pipefail if [[ ${PLATFORM} == "osx" || ${PLATFORM} == "linux" ]]; then # Run unit tests echo "Running Benchmarks" pushd ./build/${PLATFORM}/bin # a tile for testing curl --compressed -L -o tile.mvt https://tile.mapzen.com/mapzen/vector/v1/all/10/301/384.mvt?api_k...
/* * Copyright 2013 Stanford University. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * - Redistributions of source code must retain the above copyright * notice, this list of co...
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.2-147 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2010...
#!/bin/bash # # Copyright (c) 2019-2020 P3TERX <https://p3terx.com> # # This is free software, licensed under the MIT License. # See /LICENSE for more information. # # https://github.com/P3TERX/Actions-OpenWrt # File name: diy-part1.sh # Description: OpenWrt DIY script part 1 (Before Update feeds) # # Uncomment a feed...
// // ViewController.h // SqlcipherTool // // Created by ZhengXiankai on 16/4/18. // Copyright © 2016年 bomo. All rights reserved. // #import <Cocoa/Cocoa.h> @interface ViewController : NSViewController @end
<reponame>OSADP/C2C-RI<filename>C2CRIBuildDir/projects/C2C-RI/src/NTCIP2306v01_69/src/org/fhwa/c2cri/ntcip2306v109/wsdl/OperationSpecCollection.java /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package org.fhwa.c2cri.ntcip2306v109.wsdl; import java.util.ArrayList;...
<reponame>wovo/hwpy<filename>demo/rapi/led_alternate.py """ An alternate (left 4 on, right 4 on) LEDs """ import sys sys.path.append( "../.." ) import hwpy print( __doc__) leds = hwpy.all([ hwpy.gpo( 17 ), hwpy.gpo( 27 ), hwpy.gpo( 22 ), hwpy.gpo( 10 ), hwpy.invert( hwpy.gpo( 9 )), hwpy.invert( hw...
import { AbstractEntity } from 'src/entities/abstract-entity'; import { Entity, ManyToOne, OneToMany, OneToOne } from 'typeorm'; import { Article } from '../Article/Article.entity'; import { Like } from '../like/like.entity'; import { Photo } from '../Photo/Photo.entity'; import { User } from '../User/User.entity'; @E...
#pragma once namespace BF { enum class FileOpenMode { Read, Write }; }
package io.quarkus.qson; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * Annotation that designates a property to collect any object properties * that are not mapped. The annotation must be applied...
require 'rails_helper' describe Parsers::Edi::Etf::EtfLoop do let(:etf) { Parsers::Edi::Etf::EtfLoop.new(raw_etf_loop) } describe '#carrier_fein' do let(:carrier_fein) { '1234'} let(:raw_etf_loop) { {"L1000B" => { "N1" => ['','','','', carrier_fein]}} } it 'returns the carrier fein from the Payer loo...
#!/usr/bin/env bash source /opt/ros/melodic/setup.bash source /home/obstec/ros_ws/devel/setup.bash export ROS_MASTER_URI=http://192.168.2.1:11311 export ROS_IP=192.168.2.1 #export ROS_MASTER_URI=http://blue2shore.clients.wireless.dtu.dk:11311 #export ROS_IP=10.16.151.117 #export ROS_IP=192.168.2.3 #export ROS_HOSTNAME...
<filename>src/edu/berkeley/nlp/morph/Operation.java package edu.berkeley.nlp.morph; import java.util.ArrayList; import java.util.List; /** * Representation of an edit operation; supports easy coversion to and from * a String representation. * * @author gdurrett * */ public enum Operation { EQUAL, SUBST, IN...
package model; public class Boss { private String name_; private String raidName_; public Boss(String name, String raidName) { name_ = name; raidName_ = raidName; } public String getName() { return name_; } public String getRaid() { ...
#!/bin/bash # Copyright [2009-2017] EMBL-European Bioinformatics Institute # # 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 requ...
// // Quick load and save from within a level. // #include "game.h" // // The filename we use as our savegame. // #define QLS_FNAME "data\\quicksave.dat" void QLS_init() { // // Get rid of the file. // FileDelete(QLS_FNAME); } void QLS_available() { FILE *handle = MF_Fopen(QLS_FNAME, "rb"); if (handl...
module.exports.MAP_META_AGGREGATE = {_id: '$platform_number', 'platform_number': 1, 'date': 1, 'cycle_number': 1, 'geoLocation': 1, 'DATA_MODE': 1, 'containsBGC': 1, 'isDeep': 1, 'DIRECTION': 1 } module.exports.MONTH_YEAR_AGGREGATE = {_id: 1, platform_number: 1, date: 1, ...
#! /bin/bash PRGNAME="xcb-proto" ### xcb-proto (X protocol C-language Binding protocol descriptions) # Пакет предоставляет описания протокола XML-XCB, которые libxcb использует для # генерирования большей части своего кода и API # Required: python3 # Recommended: no # Optional: libxml2 (для запуска тестов) RO...
#!/bin/bash # run-shellcheck # # Legacy CIS Debian Hardening # # # 99.5.2.7 Ensure that legacy services rlogin, rlogind and rcp are disabled and not installed # set -e # One error, it's over set -u # One variable unset, it's over # shellcheck disable=2034 HARDENING_LEVEL=3 # shellcheck disable=2034 DESCRIPTION="Ens...
<gh_stars>100-1000 var api = require("../../utils/api.js") var util = require("../../utils/util.js") var app = getApp() Page({ data: { }, onLoad: function (options) { // 页面初始化 options为页面跳转所带来的参数 this.setData({ "keyWord": "试试" }) this.init(); }, onReady: function () { ...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ic_rounded_corner = void 0; var ic_rounded_corner = { "viewBox": "0 0 24 24", "children": [{ "name": "g", "attribs": {}, "children": [{ "name": "rect", "attribs": { "fill": "none", "height...
from django.http import HttpResponse from .models import BlogPost def edit_post(request, post_id): post = BlogPost.objects.get(id=post_id) if request.method == 'POST': post.title = request.POST.get('title') post.content = request.POST.get('content') post.save() return HttpResponse('Post updated successfully!')...
import React from 'react'; import User from './User'; import CollapsibleSection from '../../components/CollapsibleSection'; const Profile = () => ( <div className="container-full-page mt-settings"> <CollapsibleSection name="settings_user" label="User"> <User /> </CollapsibleSection> </div> ); exp...
<gh_stars>0 #include <stdio.h> #include "figure.h" /** * Function returns char for figure * @param body - actual body for figure */ void figurePrint(char body[200]) { for (int s = 0; s < 5; s++) { if (body[s] == 't') printf("\t"); else if (body[s] == 'n') printf("\n"); else if (body[s] ...
<reponame>OhFinance/oh-app import { SerializableTransactionReceipt } from "./types"; export interface AddTransaction { chainId: number; hash: string; from: string; approval?: { tokenAddress: string; spender: string }; summary?: string; } export interface ClearAllTransactions { chainId: number; } export i...
#!/bin/bash export FLASK_APP=$(pwd)/backend/core/app.py export FITTRACK_DB_USER="" export FITTRACK_DB_PASS="" export FITTRACK_DB_HOST="" export FITTRACK_DB_NAME="" ################################################################# ## db commands # # python -m backend.co...
<reponame>TehStoneMan/CashCraft<gh_stars>0 package io.github.tehstoneman.cashcraft.command; public class CommandPay// implements ICommand { /* * @Override * public String getName() * { * // TODO Auto-generated method stub * return "pay"; * } */ /* * @Override * public String getUsage( ICommandSend...
<gh_stars>0 module.exports = { 'twitterAuth': { 'consumerKey': process.env.TWITTER_KEY, 'consumerSecret': process.env.TWITTER_SECRET, 'callbackURL': process.env.CALLBACK_URL } };
from Cython.Compiler.Visitor import CythonTransform from Cython.Compiler.StringEncoding import EncodedString from Cython.Compiler import Options from Cython.Compiler import PyrexTypes, ExprNodes class EmbedSignature(CythonTransform): def __init__(self, context): super(EmbedSignature, self).__init__(contex...
#!/bin/bash set -e export NODE_OPTIONS="--max-old-space-size=3000" if [ -z "$VIRTUAL_ENV" ]; then echo "This requires the ceres python virtual environment." echo "Execute '. ./activate' before running." exit 1 fi if [ "$(id -u)" = 0 ]; then echo "The Ceres Blockchain GUI can not be installed or run by the roo...
#!/bin/bash echo "command execute example!"
/* * Copyright The Stargate 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 agreed to ...
package information import ( "github.com/domonda/go-sqldb" ) func NewDatabase(conn sqldb.Connection) Database { return Database{conn} } type Database struct { sqldb.Connection } func (db Database) GetTable(name string) (table *Table, err error) { err = db.QueryRow("select * from information_schema.tables where ...
package io.cattle.platform.api.service; import io.cattle.platform.core.addon.InServiceUpgradeStrategy; import io.cattle.platform.core.addon.ServiceUpgrade; import io.cattle.platform.core.constants.ServiceConstants; import io.cattle.platform.core.model.Service; import io.cattle.platform.core.util.ServiceUtil; import io...
<reponame>shrey-c/Happy-Tweeting-World consumer_key = 'qhwg88DbtCpCG2hQumqSKj3qp' consumer_secret = '<KEY>' access_token = '<KEY>' access_token_secret = '<KEY>'
#!/bin/bash set -e ######################################## time nix-shell --run 'cabal new-test unit' # "$@" ########################################
<filename>src/index.js module.exports = function solveSudoku(matrix) { backtrack(matrix); return matrix; }; function backtrack(matrix) { var row, col; var zeroPos = checkZero(matrix); if (!zeroPos) { return true; } row = zeroPos.row; col = zeroPos.column; for (var number = 1; number <= 9; numb...
<reponame>osak/mikutterd # -*- coding: utf-8 -*- require "#{File.dirname(__FILE__)}/extension" require 'test/unit' require 'mocha/setup' require 'webmock/test_unit' require 'pp' require 'utils' miquire :lib, 'delayer', 'test_unit_extensions', 'mikutwitter' class Plugin def self.call(*args); end end class TC_mikutw...
package net.bambooslips.demo.jpa.service.Impl; import net.bambooslips.demo.exception.CoreTeamNotFoundException; import net.bambooslips.demo.exception.DebtFinancingNotFoundException; import net.bambooslips.demo.exception.PostNotFoundException; import net.bambooslips.demo.jpa.model.CoreTeam; import net.bambooslips.demo....
<reponame>amochin/robotframework-eggplant from datetime import datetime import inspect import xmlrpc.client import os import robot.api.logger as log from robot.libraries.BuiltIn import BuiltIn draw_rects_on_screenshots = True try: from PIL import Image, ImageDraw except ModuleNotFoundError as e: log.warn(f"Pi...
#!/bin/bash npm run lint && docker build -t rra-analysis .
/****************************** Module Header ******************************\ * Module Name: ServiceBase.h * Project: CppWindowsService * Copyright (c) Microsoft Corporation. * * Provides a class for performing logging according to the output types available in * systemd unit files. * * This source is su...
package components_test import ( "github.com/mh-cbon/mdl-go-components/components" "testing" ) func TestDataTable(t *testing.T) { var header *components.DataTableHeader var row *components.DataTableRow input := components.NewDataTable() header = input.SetHeader("id", "id") header.SetNumeric(true) header = in...
#!/usr/bin/env bash # # Copyright (c) 2019 The Zeo Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. export LC_ALL=C.UTF-8 export CONTAINER_NAME=ci_macos_cross export HOST=x86_64-apple-darwin16 export PACKAGES="cmak...
/* tslint:disable */ /* eslint-disable */ /** * WaniKani * WaniKani: The API * * OpenAPI spec version: 20170710.0 * * */ import { BaseResource } from './base-resource'; /** * * @export * @interface SpacedRepetitionSystem */ export interface SpacedRepetitionSystem extends BaseResource { /** * ...
#!/usr/bin/env bash mkdir -p db cd db ### Note: the rest of this script is executed from the directory 'db'. # TED-LIUM database: if [ ! -e split ]; then echo "$0: downloading JSEC data (it won't re-download if it was already downloaded.)" # the following command won't re-get it if it's already there # ...
export function getAvg(score): number { return score.reduce(function (p, c) { return p + c; }) / score.length; }
import firebase from "./firebaseApp"; export const conferenceExists = async (sessionId) => { let docRef = firebase .firestore() .collection("eventSessionsDetails") .doc(sessionId.toLowerCase()); let docSnapshot = await docRef.get(); return docSnapshot.exists; }; export const userRegiste...
<gh_stars>0 package com.myprojects.marco.firechat.rx; import android.support.annotation.NonNull; import com.google.android.gms.tasks.OnFailureListener; import com.google.android.gms.tasks.OnSuccessListener; import com.google.firebase.storage.OnProgressListener; import com.google.firebase.storage.StorageReference; im...
class DataProcessor: def __init__(self): self._cluster_result = ["id", "label", "item_id"] def get_cluster_labels(self): cluster_labels = {} for row in self._cluster_result[1:]: item_id, label = row.split(',') cluster_labels[item_id] = label return cluste...
fn byte_array_to_hex_string(bytes: &[u8]) -> String { let mut hex_string = String::new(); for &byte in bytes { if !hex_string.is_empty() { hex_string.push_str(" "); } hex_string.push_str(&format!("{:02x}", byte)); } hex_string } fn main() { let bytes = [10, 25, 2...
'use strict'; Package.describe({ name: 'steedos:autoform-filesize', summary: 'Steedos Autoform filesize', version: '0.0.1', git: '', documentation: null }); Package.onUse(function(api) { api.versionsFrom('1.2.1'); api.use(['ecmascript', 'templating', 'underscore', 'less', 'reactive-var'],...
#!/bin/bash set -e mkdir -p /opt/mod_jk/ cd /opt/mod_jk wget http://apache.mirrors.spacedump.net/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.42-src.tar.gz tar -xzvf tomcat-connectors-1.2.42-src.tar.gz cd tomcat-connectors-1.2.42-src/native ./configure --with-apxs=/usr/bin/apxs --enable-api-compatibility make lib...
#!/bin/bash grep '^Date:' | grep -Eo ".[0-9]{4}$" | sort -n | uniq -c | awk '{print $2,$1}'
import p5 from "p5"; export type Triangle = { isColor2: boolean, v1: p5.Vector, v2: p5.Vector, v3: p5.Vector, } export const drawTriangle = (p: p5, tri: Triangle) => { p.triangle(tri.v1.x, tri.v1.y, tri.v2.x, tri.v2.y, tri.v3.x, tri.v3.y); } export const drawPartialOutline = (p: p5, tri: Triangle) => { p...
class TreeNode: def __init__(self, value=0, left=None, right=None): self.value = value self.left = left self.right = right def getLeftChild(self): return self.left def getRightChild(self): return self.right class Queue: def __init__(self): self.items =...
#!/bin/bash SERVICE=$1 ACTION=$2 f_php() { case $ACTION in stop) killall php-fpm 2>/dev/null echo "PHP parado" ;; start) php-fpm -D 2>/dev/null echo "PHP iniciado" ;; restart) killall php-fpm 2>/dev/null echo "PHP parado" php-fpm -D 2>/dev/null echo "PHP iniciado" ;; esac } f_httpd() { ca...
#!/usr/bin/env bash # pre-treatment platform if [ -n "$(uname -a | grep -i ubuntu)" ]; then echo push blog by ubuntu # : elif [ -n "$(uname -a | grep -i centos)" ]; then echo push blog by centos # : elif [ -n "$(uname -a | grep -i darwin)" ]; then echo push blog by mac # : elif [ -n "$(uname...
<filename>while 4/4.7.py numbers = [1,'red', 2,3,'yellow', 12.4,[7, 11.5]] int_list = [] float_list = [] str_list = [] i = 0 while i < len(numbers): if isinstance(numbers[i], str): str_list.append(numbers[i]) elif isinstance(numbers[i],float): float_list.append(numbers[i]) else: int_...
class ExpirationIterable: def __init__(self, expirations): self.expirations = expirations def __iter__(self): return iter(self.expirations) # Example usage expirations = ['2022-12-31', '2023-06-30', '2023-12-31'] iterable = ExpirationIterable(expirations) for expiration in iterable: print(...
<gh_stars>0 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ic_help_center_twotone = void 0; var ic_help_center_twotone = { "viewBox": "0 0 24 24", "children": [{ "name": "g", "attribs": {}, "children": [{ "name": "rect", "attribs": { "fill": "...
package org.hexagonal.ddd.controller; import org.hexagonal.ddd.domain.Article; import org.hexagonal.ddd.domain.ports.ext.IArticleAPI; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.List; @RestController @RequestMapping("/article") pub...
<reponame>0racl3z/ledger-live-desktop // @flow import React from "react"; import styled from "styled-components"; import { Toast } from "./Toast"; import type { ThemedComponent } from "~/renderer/styles/StyleProvider"; import { useToasts } from "@ledgerhq/live-common/lib/notifications/ToastProvider"; const Wrapper: T...
class Calculator { private var result: Double = 0.0 func add(_ number: Double) { result += number } func subtract(_ number: Double) { result -= number } func multiply(by number: Double) { result *= number } func divide(by number: Double) { ...
package main import ( "fmt" "sync" ) //ProcessFunc is the function responsible for handling task type ProcessFunc func() error type task struct { finished chan struct{} function *ProcessFunc err error } func (t *task) run() { defer func() { if r := recover(); r != nil { t.err = fmt.Errorf("Task fail...
/** * @author <NAME> <<EMAIL>> * * @section LICENSE * See LICENSE for more informations. * */ #include <QString> #include <QtTest> #include <QCoreApplication> #include <include/FilterRule.h> class FilterRuleTest : public QObject { Q_OBJECT public: FilterRuleTest(); private Q_SLOTS: void initTestCas...
#!/bin/bash # A more fluid way of moving windows with BSPWM, which is meant to be # implemented in SXHKD. If there is a window in the given direction, # swap places with it. Else if there is a receptacle move to it # ("consume" its place). Otherwise create a receptacle in the given # direction by splitting the enti...
///*************************************************************************** // * (C) Copyright 2003-2013 - Stendhal * // *************************************************************************** // *************************************************************************** // *...
<filename>src/templates/Table/Table.tsx<gh_stars>0 import React from "react"; import "./Table.css"; import { standingPosition } from "../../types"; import { tableConfig } from "../../constants/football"; import Toolbar from "../../components/Toolbar/Toolbar"; import Link from "../../components/Navigation/Link/Link"; ...
<gh_stars>0 'use strict'; var express = require('express'), router = express.Router(), app = require('../../app'), access = require('../access'), auth = require('../auth'); router.delete('/' + app.dbName + '/:id/*', auth.isAuthenticated, function(req, res) { var id = access.addOwnerId(req.params.id, req.ses...
package com.example.android.quakereport; import android.content.Context; import android.util.Log; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.loader.content.AsyncTaskLoader; import java.util.List; /** * Loads a list of earthquakes by using an AsyncTask to perform the *...
/** * * @param {[]} nums * @param {Number} k */ function maxSubarr(nums, k) { var memo = {}; var maxLen = 0; var sum = 0; for(let i =0; i<nums.length;i++) { let el = nums[i]; sum += el; if(sum === k) { maxLen = i+1; } else { if(memo[sum-k]) { maxLen = Math.max(maxLen, i-m...
# mnist python impar.py -train ../raw_data/vgg-16/mnist_train_to_vgg-16_N[-1].npy -test ../raw_data/vgg-16/mnist_test_to_vgg-16_N[-1].npy -savefile ../impar/vgg-16/mnist/sample_test/mnist -sample_test 100; python impar.py -train ../raw_data/vgg-16/mnist_train_to_vgg-16_N[-1].npy -test ../raw_data/vgg-16/mnist_test_to_v...
def print_fibonacci_series(n): # Fibonacci numbers up to n a, b = 0, 1 while a < n: print(a, end=" ") a, b = b, a+b print_fibonacci_series(10) # Output: 0 1 1 2 3 5 8
import { Component, OnInit } from '@angular/core'; declare interface TableData { headerRow: string[]; dataRows: string[][]; } @Component({ selector: 'table-cmp', moduleId: module.id, templateUrl: 'table.component.html' }) export class TableComponent implements OnInit{ public tableData1: Table...