text
stringlengths
1
1.05M
<gh_stars>1-10 package org.o7planning.springmvconlinestore.dao; import java.util.List; import java.util.Map; import org.o7planning.springmvconlinestore.entity.Order; import org.o7planning.springmvconlinestore.entity.Product; import org.o7planning.springmvconlinestore.model.CartInfo; import org.o7planning.springmvcon...
def manipulateString(string): # convert the string to upper case output = string.upper() # reverse the string output = output[::-1] return output print(manipulateString("Hello World")) # prints "DLRO WOLLEH"
package org.javastack.mapexpression.example; import java.util.HashMap; import org.javastack.mapexpression.MapExpression; import org.javastack.mapexpression.mapper.MapMapper; public class Example3 { public static void main(final String[] args) throws Throwable { final HashMap<String, String> map = new HashMap<Stri...
package sort; import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.PriorityQueue; import java.util.StringTokenizer; /** * * @author exponential-e * 백준 20124번: 모르고리즘 회장님 추천 받습니다 * * @see https://www.acmicpc.net/problem/20124 * */ public class Boj20124 { private static class Ca...
<reponame>mason-fish/brim<gh_stars>0 import {createZealotMock, zng} from "zealot" import {fetchNextPage} from "./fetchNextPage" import Workspaces from "../state/Workspaces" import Current from "../state/Current" import Search from "../state/Search" import Spaces from "../state/Spaces" import Tab from "../state/Tab" im...
#!/bin/bash # Source utils.sh, which is 2 directories above auditd_utils.sh script_dir="$( dirname "${BASH_SOURCE[0]}" )" . $script_dir/../../utils.sh function prepare_auditd_test_enviroment { get_packages audit audispd-plugins }
require 'spec_helper' require 'yt/models/comment_thread' describe Yt::CommentThread do subject(:comment_thread) { Yt::CommentThread.new attrs } describe '#snippet' do context 'given fetching a comment thread returns a snippet' do let(:attrs) { {snippet: {"videoId" => "12345"}} } it { expect(commen...
/* TITLE Class name-age pairs Chapter9Exercise3.cpp Bjarne Stroustrup "Programming: Principles and Practice Using C++" COMMENT Objective: Implement a class Name_pairs: Data members: Member functions: Overloaded operator: string name, double age; read_names(); operator<< ...
<reponame>LuChangliCN/medas-iot package com.foxconn.iot.core.service.impl; import java.util.ArrayList; import java.util.List; import javax.transaction.Transactional; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.dom...
import React, { Component } from 'react'; import {NavLink} from 'react-router-dom'; import { connect } from 'react-redux'; import { logout } from '../Redux/actions/auth' import './navbar.css'; class Navbar extends Component { logoutHandler = () => { this.props.logout(); } render() { ret...
package textgen; import java.util.AbstractList; /** * A class that implements a doubly linked list * * @author UC San Diego Intermediate Programming MOOC team * @param <E> The type of the elements stored in the list */ public class MyLinkedList<E> extends AbstractList<E> { LLNode<E> head; LLNode<E> tail; i...
<reponame>zzlc/WebRTC<filename>modules/audio_device/linux/audio_device_alsa_linux.cc /* * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional in...
<gh_stars>1-10 /******************************************************************************* * Copyright Searchbox - http://www.searchbox.com * * 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 Lic...
<filename>src/types/OrderByDir.ts import { Constants } from '../constants'; export const OrderByDirs = [ Constants.ORDER_BY_DIR.ASC, Constants.ORDER_BY_DIR.DESC ] as const; export type OrderByDir = typeof OrderByDirs[number];
import java.util.Map; public class ChunkStatusHelper { public static String getParentStatus(Map<String, String> chunkStatuses, String statusName) { if (chunkStatuses.containsKey(statusName)) { String parentStatus = chunkStatuses.get(statusName); return parentStatus != null ? parentS...
#!/bin/sh # /** # * Copyright (c) 2013-Now http://jeesite.com All rights reserved. # * # * Author: ThinkGem@163.com # * # */ echo "" echo "[信息] 打包Web工程,并运行Web工程。" echo "" # 打包Web工程(开始) cd .. mvn clean package spring-boot:repackage -Dmaven.test.skip=true -U cd target # 打包Web工程(结束) # 根据情况修改 web.jar 为您的 jar 包名称 m...
#!/usr/bin/env osascript # Returns the current playing song in iTunes for OSX tell application "System Events" set process_list to (name of every process) end tell if process_list contains "iTunes" then tell application "iTunes" if player state is playing then set track_name to name of current track ...
/* * 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 ma...
<reponame>SAP-samples/yaaS-implicit-grant<gh_stars>0 /* * [y] SAP Hybris */ $(document).ready(function(){ $("#one_post").click(function(){ jQuery.ajax( { url: 'https://api.us.yaas.io/hybris/product/v2/<projectid>/products', //replace <projectid> with the Identifier type: 'GET', ...
<filename>seal/src/main/java/cn/rongcloud/im/ui/activity/SetLanguageActivity.java<gh_stars>0 package cn.rongcloud.im.ui.activity; import android.content.Intent; import android.os.Bundle; import android.support.v4.app.TaskStackBuilder; import android.view.View; import android.widget.ImageView; import java.util.Locale;...
const search = (arr, query) => { // Convert the query to lower case query = query.toLowerCase(); // Filter the array const results = arr.filter(obj => { const values = Object.values(obj); return values.some(value => value.toLowerCase().includes(query)); }); return results; }; const arr = [ { name: "Honda C...
crossroad install glib2 glib-networking crossroad meson . build-cross ninja -C build-cross
#!/bin/bash echo "Starting timeline!" ${HADOOP_HOME}/bin/yarn --config ${HADOOP_CONF_DIR} timelineserver
# Source this script to setup the runtime environment on cori export OMP_NUM_THREADS=32 export KMP_BLOCKTIME=1 export KMP_AFFINITY="granularity=fine,compact,1,0" export HDF5_USE_FILE_LOCKING=FALSE module load tensorflow/intel-2.2.0-py37 module list
public class Fibonacci { static int fibonacci(int n) { if (n <= 1) return n; return fibonacci(n-1) + fibonacci(n-2); } public static void main (String args[]) { int accept_val; System.out.println("Please enter the number for which you want...
<filename>public/js/datatables.js jQuery(function () { $("#dataTable").DataTable({ language: { url: `/locales/es.json`, }, }); });
def fibonacci(n): if n == 0: return 0 elif n == 1: return 1 else: return fibonacci(n - 1) + fibonacci(n - 2) for i in range(0, n + 1): print(fibonacci(i))
#!/bin/bash FN="ChAMPdata_2.14.1.tar.gz" URLS=( "https://bioconductor.org/packages/3.8/data/experiment/src/contrib/ChAMPdata_2.14.1.tar.gz" "https://bioarchive.galaxyproject.org/ChAMPdata_2.14.1.tar.gz" "https://depot.galaxyproject.org/software/bioconductor-champdata/bioconductor-champdata_2.14.1_src_all.tar.gz" ...
def rotate_up(cube_state): """Rotates the Up layer of a cube Counter-clockwise (when viewed from the Red side). Args: cube_state (list): The cube state of a mixed up cube. Returns: list: The cube state with the Up layer rotated """ temp_state = cube_state.copy() t...
import { useMemo } from 'react' import { Currency, NATIVE } from '@sushiswap/core-sdk' import { SupportedChainId } from 'constants/chains' import useWeb3React from './useWeb3' export default function useNativeCurrency(): Currency { const { chainId } = useWeb3React() return useMemo( () => chainId ...
using System; using System.Net; using System.Net.Mail; using System.Text; public class ForgotPasswordViewModel { private const int TokenLength = 10; public void SendPasswordResetEmail(string userEmail) { string token = GenerateRandomToken(TokenLength); string resetLink = $"https://example....
/* * Copyright 2014-2018 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 app...
import argparse import os def rename_files(directory, prefix): if not os.path.exists(directory): print(f"Error: Directory '{directory}' does not exist.") return files = [f for f in os.listdir(directory) if os.path.isfile(os.path.join(directory, f))] if not files: print(f"No files t...
#!/bin/sh if [ $1 = "beat" ] ; then celery -A app_celery.celery_app beat --loglevel=INFO --scheduler django_celery_beat.schedulers:DatabaseScheduler else celery -A app_celery.celery_app worker -P threads --concurrency=4 --loglevel=INFO --without-gossip --without-mingle --without-heartbeat -Ofair fi
<filename>comercial_vue/router/router.js import VueRouter from 'vue-router' import auth from '../auth/auth.js' import Dashboard from '../core/inicio/Dashboard.vue' import Login from '../core/login/Login.vue' /* importar rutas */ import products from '../components/dashboard/products/routes/' import services from '....
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } }...
// 11050. 이항 계수 1 // 2019.05.22 // 수학 #include<iostream> using namespace std; // 팩토리얼을 재귀로 구함 int Factorial(int num) { if (num == 1 || num == 0) { return 1; } else { return Factorial(num - 1) * num; } } int main() { int n, k; cin >> n >> k; // 이항계수 공식 사용하여 출력 cout << Factorial(n) / (Factorial(k) * Facto...
/** * Calculate the total amount given an array of price items */ const calculateTotalAmount = (prices) => { let total = 0; prices.forEach(price => { total += price; }); return total; }; calculateTotalAmount([2.5, 5.5, 10.25]); // 18.25
<reponame>alterem/smartCityService package com.zhcs.dao; import com.zhcs.entity.BasissettingEntity; //***************************************************************************** /** * <p>Title:BasissettingDao</p> * <p>Description: 基础设置</p> * <p>Copyright: Copyright (c) 2017</p> * <p>Company: 深圳市智慧城市管家信息科技有限公司 <...
package com.github.piedpiper.node.rest; import com.github.piedpiper.node.NodeInput; import com.mashape.unirest.http.Unirest; import com.mashape.unirest.request.HttpRequestWithBody; public class RESTPutHandler extends BaseBodyRestHandler { @Override protected HttpRequestWithBody getRequestWithBody(NodeInput input) t...
import { Module } from '@nestjs/common'; import { GatewayController } from './gateway.controller'; import { GatewayService } from './gateway.service'; import { ClientGrpcProxy, ClientsModule } from '@nestjs/microservices'; import { resolve } from 'path'; class ErrorHandlingProxy extends ClientGrpcProxy { protected s...
def find_GCD(x, y): bound = min(x, y) gcd_list = [] for i in range(1, bound+1): if (x % i == 0) and (y % i == 0): gcd_list.append(i) return gcd_list
import subprocess def execute_commands_from_file(file_path): try: with open(file_path, 'r') as file: commands = file.readlines() for command in commands: process = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) o...
MAIN_ROOT=$PWD/../../.. KALDI_ROOT=$MAIN_ROOT/tools/kaldi export PATH=$PWD/utils/:$KALDI_ROOT/tools/openfst/bin:$KALDI_ROOT/tools/sctk/bin:$PWD:$PATH [ ! -f $KALDI_ROOT/tools/config/common_path.sh ] && echo >&2 "The standard file $KALDI_ROOT/tools/config/common_path.sh is not present -> Exit!" && exit 1 . $KALDI_ROOT/...
#!/bin/bash mix ecto.setup mix phx.server
<reponame>TeKraft/smle import { Component } from '@angular/core'; import { TypedModelComponent } from '../base/TypedModelComponent'; import { AbstractAllowedValues } from '../../../model/swe/AbstractAllowedValues'; @Component({ selector: 'swe-abstract-allowed-values', templateUrl: './AbstractAllowedValuesCompo...
/** * @license Copyright (c) 2003-2021, CKSource - <NAME>. All rights reserved. * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license */ /* globals ClassicEditor, console, window, document */ import { CS_CONFIG } from '@ckeditor/ckeditor5-cloud-services/tests/_utils/cloud-services-conf...
#!/bin/bash # Script to gnerate file meta data report read -p "Enter directory path : " PATH exec find $PATH -type f -exec du -h {} \+ > report.txt
#!/usr/bin/env bash set -e docker build --pull -t node_docs --build-arg NODE_VERSION='latest' . docker run \ -e CI=true \ --rm node_docs \ /bin/bash \ -c './script/build_docs.sh apm-agent-nodejs ./docs ./build'
import { DocumentDefinition } from 'mongoose'; import { IUser } from '../interfaces'; import UserModel from '../models/User.model'; import bcrypt from 'bcrypt'; /** * @param {IUser} userData * @returns {Document} User document */ export const insertUser = async (userData: DocumentDefinition<IUser>) => { return aw...
#!/bin/bash mkdir -p $IROOT/.pip_cache export PIP_DOWNLOAD_CACHE=$IROOT/.pip_cache fw_depends python3 $IROOT/py3/bin/pip3 install --install-option="--prefix=${IROOT}/py3" -r $TROOT/requirements.txt
<reponame>vesense/incubator-streampipes /* * 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, ...
<gh_stars>1-10 import { updateDoc, doc, getDoc } from "firebase/firestore"; import { db } from "../../lib/firebase"; export default async function handler(req, res) { //Get the Data first const da = await getDoc(doc(db, "users", req.body.id)); const dData = da.data(); //Firestore query const dNotif = dData...
<filename>api/src/main/java/com/example/demo/model/AddressDto.java /** * This file was generated by the JPA Modeler */ package com.example.demo.model; import lombok.Getter; import lombok.Setter; import java.io.Serializable; import java.util.List; /** * @author dzni0816 */ @Getter @Setter public class AddressDto i...
def has_cycle(head): slow = head fast = head while (slow and fast and fast.next): slow = slow.next fast = fast.next.next if slow == fast: return True return False
require 'rails_helper' RSpec.describe UsersController, type: :controller do let(:new_user_attributes) do { name: "TestName", email: "<EMAIL>", password: "password", password_confirmation: "password" } end describe "GET new" do it "returns http success" do get :new expect(response).to hav...
/* * @Author: 拆家大主教 * @Date: 2021-09-05 14:30:26 * @Last Modified by: 拆家大主教 * @Last Modified time: 2021-09-08 17:01:47 */ ;function Life() { let _this = this; let FIRST_2 = true; // 初始两天 let is_BRANCH = false; // 支线 let NEW = true; // 新生 let DAT = []; let BRANCH_DAT = []; let TLT ...
# Generated by Django 3.0.2 on 2020-01-26 07:11 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('cases', '0005_auto_20200122_2041'), ] operations = [ migrations.AlterField( model_name='case', name='comment', ...
<reponame>waymobetta/coindrop import React from 'react' import PropTypes from 'prop-types' import LayoutConnect from '../components/LayoutConnect' import SEO from '../components/seo' import { withStyles } from '@material-ui/core/styles' import Paper from '@material-ui/core/Paper' import Grid from '@material-ui/core/Gri...
// Copyright 2019 SAP SE // // 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 writ...
#!/usr/bin/env bash bash ./.travis/scripts/import-signing-key.sh echo 'Deploying artifacts' bash ./.travis/scripts/deploy-to-sonatype-ossrh.sh echo 'Deployed artifacts'
<?php namespace app\api\model; use think\Model; class Image extends BaseModel { protected $visible = ['url']; public function getImageDimensions($imageUrl) { $dimensions = getimagesize($imageUrl); return ['width' => $dimensions[0], 'height' => $dimensions[1]]; } }
package com.lothrazar.cyclicmagic.block.buttondoorbell; import java.util.List; import com.lothrazar.cyclicmagic.IContent; import com.lothrazar.cyclicmagic.data.IHasRecipe; import com.lothrazar.cyclicmagic.guide.GuideCategory; import com.lothrazar.cyclicmagic.registry.BlockRegistry; import com.lothrazar.cyclicmagic.reg...
<?php $number1 = 5; $number2 = 10; if($number1 > $number2){ echo $number1; } else { echo $number2; } ?>
<filename>src/application/store/index.js //3rd party - redux and saga dependencies import createSagaMiddleWare from 'redux-saga'; import { createStore, applyMiddleware, compose } from 'redux'; //Application Imports import sagas from '../sagas'; import { reducers } from '../state'; const sagaMiddleWare = createSagaMid...
package evilcraft.items; import evilcraft.api.config.ItemConfig; /** * Config for the {@link InvertedPotentia}. * @author rubensworks * */ public class InvertedPotentiaConfig extends ItemConfig { /** * The unique instance. */ public static InvertedPotentiaConfig _instance; /** * M...
<reponame>raiden101/eda let mongoose = require("mongoose"); let Schema = mongoose.Schema; const exam_morn_schema = new Schema({ date: Date, total_slot: Number, selected_members: { type: [String], defaut: [] } }); const morn_exams = mongoose.model("morn_exam", exam_morn_schema); module.exports = morn_exams;
import java.util.List; public class GetRoundsServerResource extends ServerResource implements GetRoundsResource { @Inject private RoundManager roundManager; @Inject private MyEntityManager entityManager; public ListRoundsResult getRounds(GymkhanaRequest request) { List<Round> rounds = ro...
<reponame>vaniot-s/sentry import React from 'react'; import styled from '@emotion/styled'; import {t} from 'app/locale'; import space from 'app/styles/space'; import {Deploy} from 'app/types'; import Tag from 'app/views/settings/components/tag'; import Link from 'app/components/links/link'; import {IconOpen} from 'app...
import vtk x = [ -1.22396, -1.17188, -1.11979, -1.06771, -1.01562, -0.963542, -0.911458, -0.859375, -0.807292, -0.755208, -0.703125, -0.651042, -0.598958, -0.546875, -0.494792, -0.442708, -0.390625, -0.338542, -0.286458, -0.234375, -0.182292, -0.130209, -0.078125, -0.026042, 0.0260415, 0.078125, 0....
<reponame>mhs1314/allPay<filename>qht-modules/qht-api/src/main/java/com/qht/rest/AccountController.java<gh_stars>0 package com.qht.rest; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import com.qht.biz.AccountBiz; import com.qht.entity.Account; ...
<filename>AtividadesSpringBoot/AtividadeHelloObjetivos/src/main/java/com/example/demo/controller/objetivosController.java package com.example.demo.controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.ann...
def merge_arrays(arr1, arr2): # Get the length of two arrays m = len(arr1) n = len(arr2) # Create an array to store the merged array mergedArray = [0] * (m + n) # Initialize two index values to keep track of # current index in first and second arrays i = 0 # for 1st arra...
<gh_stars>0 <!-- Copyright 2020 Kansaneläkelaitos 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 ...
// Add JQuery <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> // Search keyword var query = "Hello World"; // Executing search and redirect to the search result page $(document).ready(function () { window.location.replace('https://www.google.com/search?q=' + query); });
#include "program.h" #include <memory> #include <stdexcept> #include "costs.h" #include "crypto_utils.h" #include "operator_lookup.h" #include "utils.h" namespace chia { uint8_t const MAX_SINGLE_BYTE = 0x7F; uint8_t const CONS_BOX_MARKER = 0xFF; /** * ==============================================================...
// -!- C++ -!- ////////////////////////////////////////////////////////////// // // System : // Module : // Object Name : $RCSfile$ // Revision : $Revision$ // Date : $Date$ // Author : $Author$ // Created By : <NAME> // Created : Sun Feb 17 15:35:50 2019 // Last...
#!/bin/bash # # This script will duplicate an installed clusterdeployment for testing purposes. # The duplicated cluster will have a generated name that starts with the name # of the original clusterdeployment followed by "-dup" # set -e usage(){ echo "Usage: $0 [CLUSTERDEPLOYMENT_NAMESPACE/]CLUSTERDEPLOYMENT_NAME [...
/* * smart-doc * * Copyright (C) 2018-2020 smart-doc * * 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 y...
import { sonarTypes } from "../constants/action-types" const initialState = ({ sonarToken: localStorage.getItem('sonarToken') ? localStorage.getItem('sonarToken') : null, username: localStorage.getItem('sonarUsername') ? localStorage.getItem('sonarUsername') : null, projects: [], measure: null, }) ex...
package io.opensphere.core.viewer.control; import java.awt.event.InputEvent; import io.opensphere.core.math.Vector2i; import io.opensphere.core.math.Vector3d; import io.opensphere.core.util.MathUtil; import io.opensphere.core.util.ref.VolatileReference; import io.opensphere.core.viewer.impl.DynamicViewer; im...
<reponame>MickaelSERENO/SciVis_Android package com.sereno.vfv.Data; import android.graphics.Bitmap; import com.sereno.vfv.Data.Annotation.DrawableAnnotationPosition; import com.sereno.view.AnnotationCanvasData; import com.sereno.vfv.Data.TF.TransferFunction; import java.util.ArrayList; import java.util.List; public...
package ar.com.tandilweb.ApiServer.rests; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping...
package bd.edu.daffodilvarsity.classmanager.otherclasses; import com.google.firebase.Timestamp; public class BookedClassDetailsUser { private String roomNo = ""; private String time = ""; private String teacherInitial = ""; private String teacherEmail = ""; private Timestamp reservationDate; ...
import styled from 'styled-components'; import { Link } from 'gatsby'; export const Button = styled(Link)` background: ${props => props.primary ? '#F26A2e' : '#077BF1'}; white-space: nowrap; padding: ${props => props.big ? '16px 40px' : '10px 32px'}; color: #fff; font-size: ${props => props.big ? '20px' : '1...
<gh_stars>0 package com.example.zhongweikang.beijingnew.utils; import android.graphics.Bitmap; import android.os.Handler; import android.util.Log; /** * 圖片緩存类放法 */ public class BitmapCacheUtils { /*1 根據地址去內存中取圖片, * 2 根據URL 去本地種取, * 3.最後去網絡中取,取到后發送給主縣城中顯示,同時向內存中存一份,本地存一份 * * */ private Ne...
package io.opensphere.merge.controller; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import java.util.List; import org.easymock.EasyMock; import org.easymock.EasyMockSupport; ...
package com.lai.mtc.mvp.utlis; import android.support.v4.app.Fragment; import com.trello.rxlifecycle2.LifecycleProvider; import com.trello.rxlifecycle2.LifecycleTransformer; import com.trello.rxlifecycle2.android.ActivityEvent; import org.reactivestreams.Publisher; import io.reactivex.Flowable; import io.reactivex....
import _ from 'lodash' import { nanoid } from 'nanoid' import { SerializedChatter } from 'libs/Chatter' /** * RegExp used to identify a valid action text. */ const TextRegExp = /^[\w\W]+$/ /** * RegExp used to identify a valid action name. */ const NameRegExp = /^[\w\- ]+$/ /** * RegExp used to identify a vali...
<filename>client/components/allMovies.js import React from 'react' import {getAllMoviesThunk, getFeaturedMoviesThunk} from '../store/movies' import {connect} from 'react-redux' import SingleMovie from './singleMovie' class DisconnectedAllMovies extends React.Component { componentDidMount() { const genre = this.p...
<gh_stars>0 function openWork(evt,workName){ var i,worklinks,workcontent; workcontent=document.getElementsByClassName("work-tab-content"); for(i=0;i<workcontent.length;i++){ workcontent[i].style.display = "none"; } worklinks = document.getElementsByClassName("work-tab-links"); for(i=0;i<...
# function to find the longest common substring def find_longest_common_substring(string1, string2): # find the length of the two strings str1_len = len(string1) str2_len = len(string2) # initialize a 2-dimensional array LCS = [[0 for x in range(str2_len+1)] for y in range(str1_len+1)] # find ...
<reponame>ahmed82/fabric-bdls // Copyright IBM Corp. All Rights Reserved. // // SPDX-License-Identifier: Apache-2.0 // package consensus import ( "time" "github.com/pkg/errors" ) // Configuration defines the parameters needed in order to create an instance of Consensus. type Configuration struct { // SelfID is t...
#!/bin/bash -l # Runs a spades assembly. Run with no options for usage. # Author: Lee Katz <lkatz@cdc.gov> #Example: (for f in *R1_001.fastq.gz; do b=`basename $f _R1.fastq.gz`; r=`sed 's/R1/R2/' <<< $f`; qsub -N spades$b -o ./assemblies/log/b.spades.log ~/bin/launch_SPAdes_v3.11.0.sh $f $r ./assemblies/$b.spades3.11...
module.exports = { testMatch: ['<rootDir>/src/**/*.test.ts'], moduleFileExtensions: ['js', 'ts', 'json', 'vue'], setupFilesAfterEnv: ['<rootDir>/src/config/jest/plugins.ts'], moduleNameMapper: { '^@/(.*)$': '<rootDir>/src/$1', }, transform: { '^.+\\.ts$': 'ts-jest', '^.+\\.vue$': 'vue-jest', }...
import React, { useState, useEffect } from 'react'; import { List, SearchBar } from 'react-native-elements'; import { View, Text } from 'react-native'; const App = () => { const [products, setProducts] = useState([]); const [filter, setFilter] = useState(''); useEffect(() => { fetch('http://products-websi...
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package ed.biodare2.backend.security.dao; import ed.biodare2.backend.security.BioDare2User; import ed.biodare2.backend.securit...
<gh_stars>100-1000 import * as React from 'react'; import styles from '@patternfly/react-styles/css/components/DualListSelector/dual-list-selector'; import { css } from '@patternfly/react-styles'; import formStyles from '@patternfly/react-styles/css/components/FormControl/form-control'; import { DualListSelectorTree, D...
$ go run funciones-variadicas.go [1 2] 3 [1 2 3] 6 [1 2 3 4] 10 # Otro aspecto clave de las funciones en Go es # su habilidad de generar closures, lo cual # veremos a continuación.
<filename>src/main/java/br/com/controle/financeiro/model/exception/NotFoundException.java<gh_stars>1-10 package br.com.controle.financeiro.model.exception; public class NotFoundException extends RuntimeException { public NotFoundException(Long id) { super("Could not find resource with" + id); } p...