text
stringlengths
1
1.05M
// (C) 2019-2020 GoodData Corporation import { IWidget, IWidgetDefinition, isWidget, isWidgetDefinition } from "./widget"; import isEmpty from "lodash/isEmpty"; import noop from "lodash/noop"; /** * Dashboard layout * @alpha */ export type Layout = IFluidLayout; /** * Layout widget * @alpha */ export type Widge...
/* Copyright (c) 2008-2015, <NAME> Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. There is NO WARRANTY for this software. See license.txt f...
import java.net.Socket; import java.io.ObjectOutputStream; import java.io.ObjectInputStream; public class LoggedInPeer { private int tokenId; private String ipAddress; private int port; private Socket socket; private ObjectOutputStream output; private ObjectInputStream input; private SavedP...
package com.momo.service.service.aclmanager.impl; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import com.google.common.collect.Lists; import com.momo.common.util.DateUtils; import com.momo.common.error.BizException; import com.momo.common.util.Encrypt; import com.momo.common.util.St...
/** * Database Migration 1.0.0 * * This script migrates the suffixed journals and snapshot stores of things and policies before 1.0.0 to * non-suffixed journals and snapshot stores post 1.0.0. * * === Prerequisite === * * - Backup your database. * * - Enable server-side-scripting for your MongoDB: * This s...
<reponame>Ziezi/Programming-Principles-and-Practice-Using-C-by-Bjarne-Stroustrup-<gh_stars>1-10 /* TITLE Containers comparison Chapter20TryThis8.cpp "<NAME>roustrup "C++ Programming: Principles and Practice."" COMMENT Objective: Redo the previous Try This using containers of type int, initialized t...
Random rand = new Random(); const string chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789~!@#$%^&*()-_=+[]{};:,./<>?`" public string GeneratePassword() { StringBuilder builder = new StringBuilder(); for (int i = 0; i < 8; i++) { int index = rand.Next(0, chars.Length); ...
<reponame>slaufer/Prebid.js import { reconciliationSubmodule, track, stringify, getTopIFrameWin, getSlotByWin } from 'modules/reconciliationRtdProvider.js'; import { makeSlot } from '../integration/faker/googletag.js'; import * as utils from 'src/utils.js'; describe('Reconciliation Real time data submodule',...
<gh_stars>0 // Enlarge on hover, return back to initial size when mouse leaves var buttonEl1 = document.getElementById("CSStransforms1"); function animateButton1(scale, duration, elasticity) { anime.remove(buttonEl1); anime({ targets: buttonEl1, scale: scale, duration: duration, elasticity: elastici...
#!/usr/bin/env bash #Description: Kyma with central connector-service plan on GKE. This scripts implements a pipeline that consists of many steps. The purpose is to install and test Kyma on real GKE cluster with central connector-service. # # #Expected vars: # # - REPO_OWNER - Set up by prow, repository owner/organiza...
<reponame>VEDAVIYAS/NYU-BusTracker-Android package com.nyubustracker.helpers; import android.content.Context; import android.os.AsyncTask; import android.util.Log; import com.nyubustracker.BuildConfig; import com.nyubustracker.R; import com.nyubustracker.activities.MainActivity; import org.json.JSONException; import...
class GooglePhotos { constructor() { this.photos = new Map(); } addPhoto(photoId, photoUrl) { this.photos.set(photoId, photoUrl); } deletePhoto(photoId) { this.photos.delete(photoId); } getPhoto(photoId) { return this.photos.get(photoId); } listAllPhotos() { return Array.from(t...
<gh_stars>1-10 import { IAssetInfoResponse, IAssetsInfoResponse, IAssetInfo, IAssetsInfoMap } from 'shared/types/models'; export function convertAssetInfo(asset: IAssetInfoResponse): IAssetInfo { return { assetName: asset.asset_name, canDeposit: asset.can_deposit, canWithdrawal: asset.can_withdrawal, ...
#!/bin/bash #SBATCH -J aspp #SBATCH -o log/aspp_32000 #SBATCH --mem=32GB #SBATCH -t 5-00:00:00 #SBATCH -n 1 #SBATCH -c 8 #SBATCH -p gpu #SBATCH --gres=gpu -C K80 nvidia-smi python -u train.py --batch_size 10 --epoch 50 --save_path /export/team-mic/zhong/test/aspp_res2d_rev_noise_half_gd \ --num_workers 2 --wa...
#!/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 "License...
/* * Copyright 2015 Textocat * * 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 la...
#!/bin/sh cd ${CURR_DIR}/issue990-download-optional-selected rm -rf b/.dub ${DUB} remove gitcompatibledubpackage -n --version=* ${DUB} run || exit 1
/** * Orthanc - A Lightweight, RESTful DICOM Store * Copyright (C) 2012-2016 <NAME>, Medical Physics * Department, University Hospital of Liege, Belgium * Copyright (C) 2017-2020 <NAME>., Belgium * * This program is free software: you can redistribute it and/or * modify it under the terms of the GNU General Publ...
import React from 'react' import MDIIcon from '@mdi/react' import * as Icons from './Icons' export type IconName = keyof typeof Icons // TODO: support size and so far interface Props { name: IconName spin: boolean className?: string } export default class Icon extends React.Component<Props> { static defaultP...
module.exports = { main (event) { return true }, after (event) { return (event && event.redirect) ? event : { body: { code: 0, data: event } } }, error (err) { return { body: { code: 1, message: err ? err.message : 'unknown error' } } }, configHttp: { method: 'get', ...
def custom_comparison(a_Meta1, a_Meta2): # Handle special cases if a_Meta1 is None or a_Meta2 is None: return False if isinstance(a_Meta1, str) and isinstance(a_Meta2, str): if a_Meta1.lower() == a_Meta2.lower(): return False if isinstance(a_Meta1, int) and isinstance(a_Meta2...
package aws import ( "os" "path" "github.com/spf13/cast" "github.com/k11n/konstellation/api/v1alpha1" "github.com/k11n/konstellation/cmd/kon/config" "github.com/k11n/konstellation/cmd/kon/terraform" "github.com/k11n/konstellation/cmd/kon/utils" ) var ( vpcFiles = []string{ "aws/vpc/main.tf", "aws/vpc/ta...
def find_domain(url): url = url.replace('https://', '').replace('http://', '') return url.split('/')[0]
<gh_stars>10-100 public class HelloBruteForce { static String output = "Hello Hacktoberfest 2020!"; public static void main(String[] args) { char current = ' '; String textPrint = ""; System.out.print(current); for (int i = 0; i < output.length();) { int randomChar ...
#!/bin/bash # Copyright 2020 The TensorFlow 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...
/* * Copyright © 2018, 2021 Apple Inc. and the ServiceTalk project 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...
#!/bin/sh -l sh -c "echo Hello world my name is Alexander"
<reponame>jiamaozheng/imlab_merging_sqlite_db import os, pandas, glob, sqlite3, csv, sys, time, argparse import urllib2, boto3, json, pandas, time, os, sys, logging, argparse from datetime import datetime import uuid as myuuid from botocore.exceptions import ClientError __author__ = "<NAME> <<EMAIL>>" __version__ = "R...
function toTwoDigits(num) { return num < 10 ? '0'+num : num+''; } function dateInNiceFormat(date) { return date.getFullYear() + '-' + toTwoDigits(date.getMonth()+1) + '-' + toTwoDigits(date.getDate()) + ' ' + toTwoDigits(date.getHours()) + ':' + toTwoDigits(date.getMinutes()) + ':' + toTwoDigits(date.getSe...
#!/bin/bash dconf load /org/pantheon/terminal/settings/ <<COLORS [/] name='Symfonic' cursor-color='#dc322f' foreground='#ffffff' background='rgba(0,0,0,.95)' palette='#000000:#dc322f:#56db3a:#ff8400:#0084d4:#b729d9:#ccccff:#ffffff:#1b1d21:#dc322f:#56db3a:#ff8400:#0084d4:#b729d9:#ccccff:#ffffff' COLORS
#!/bin/bash cd /home/nlpserver/zzilong/kaldi/egs/supermarket-product . ./path.sh ( echo '#' Running on `hostname` echo '#' Started at `date` echo -n '# '; cat <<EOF nnet-compute-prob exp/nnet4a/183.mdl ark:exp/nnet4a/egs/valid_diagnostic.egs EOF ) >exp/nnet4a/log/compute_prob_valid.183.log time1=`date +"%s"` ( nn...
import React from 'react'; import { connect } from 'react-redux'; import { setTodoFilter } from 'store/actions'; import { TODO_FILTER_OPTIONS } from 'app/routes/Todos/constants'; class TodosFilterControlsContainer extends React.Component { renderTodosButtons = () => ( TODO_FILTER_OPTIONS.map(option => ( <...
#! /bin/bash -e # sync git overlay repo if existing if [ -e /root/src/fs-custom/.git/config ]; then echo 'Performing a pull on existing clone' pushd "/root/src/fs-custom" git pull popd fi # sync/copy files echo 'Copying files' cp -Rvf /root/src/fs-custom/etc/* /etc/ # reload the xml echo 'Reloading FreeSwi...
<reponame>biancahng/turma-de-elite-backend<filename>src/main/java/com/devaneios/turmadeelite/external/activities/ExternalActivitiesController.java package com.devaneios.turmadeelite.external.activities; import com.devaneios.turmadeelite.dto.ActivityViewDTO; import com.devaneios.turmadeelite.dto.StudentActivitiesDTO; i...
<reponame>Zovube/Tasks-solutions #include<bits/stdc++.h> using namespace std; const int MAXV = 10333, MAXE = 4 * 2 * MAXV, INF = 1e9; int head[MAXE], to[MAXE], nxt[MAXE], cap[MAXE], cost[MAXE], S, T, E; int qq[MAXV], qh, qt; int N, M, K; int dd[MAXV], pp[MAXV], was[MAXV]; int aa[111][111]; void addEdge(int a, int b,...
#!/bin/bash files=$(find "$1" -type f -name "*cs3620*") for f in $files do tar -zxvf $f done
<reponame>stevepopovich/BadRobot2012<filename>src/com/badrobots/y2012/technetium/subsystems/Xerxes.java<gh_stars>1-10 /* * * This is the bridging tool */ package com.badrobots.y2012.technetium.subsystems; import edu.wpi.first.wpilibj.command.Subsystem; import edu.wpi.first.wpilibj.Victor; import com.badro...
#!/usr/bin/env bash # BEGIN SCRIPT # Hack for code verification OTN_HEADERS_FILE=${OTN_HEADERS_FILE} OTN_FORM_ACTION=${OTN_FORM_ACTION} OTN_COOKIE_FILE=${OTN_COOKIE_FILE} OTN_FORM_DATA=${OTN_FORM_DATA} OTN_CONTENT_FILE=${OTN_CONTENT_FILE} OTN_HOST_LOGIN=${OTN_HOST_LOGIN} # function oracle_prepare_actions() { return ...
<filename>src/util/DataReader.java package util; import java.io.File; import java.io.FileNotFoundException; import java.util.ArrayList; import java.util.List; import java.util.Scanner; import ml.data.Attribute; import ml.data.DataInstance; public class DataReader { public static List<Attribute> readAttributes(Str...
<gh_stars>1-10 // get balance information for the deployment account const qrcode = require("qrcode-terminal"); const ethers = require("ethers"); const DEBUG = false; const TruffleConfig = require("@truffle/config"); const config = TruffleConfig.detect(); const mnemonic = require("./checkMnemonic"); const main = async...
<gh_stars>0 import React from 'react'; import { withRouter } from "react-router"; import Header from '../components/header'; import Layout, { Wrapper } from '../components/layout'; import Navigation from '../components/navigation'; class Home extends React.Component { render() { return ( <Layout location=...
<filename>src/auth/auth.controller.ts import { Controller, Post, Body, HttpCode, Get, UseGuards, Param, HttpStatus, } from '@nestjs/common'; import { SignupRequest, LoginRequest, LoginResponse, GetUserResponse, ChangeEmailRequest, ResetPasswordRequest, ChangePasswordRequest, } from '../con...
<reponame>paracs/ng2-Dashboard import { Component } from '@angular/core'; @Component({ selector: 'carousel', templateUrl: './view/carousel.html', styleUrls:['./styles/carousel.css'] }) export class CarouselComponent { }
// Copyright... #include <gtest/gtest.h> #include "undo_manager.h" namespace formulate { class Client { public: explicit Client(UndoManager* undo) : undo_(undo) {} void Inc() { val_++; undo_->PushUndoOp([this] () { Dec(); }); } void Dec() { val_--; undo_->PushUndoOp([this] () { Inc(); }); ...
<reponame>cjjenkinson/react-simple-tabs<filename>__tests__/Tab.test.js<gh_stars>0 import React from 'react'; import Enzyme from 'enzyme'; import Adapter from 'enzyme-adapter-react-16'; import { Tab } from '../src'; import { mount } from 'enzyme'; Enzyme.configure({ adapter: new Adapter() }); describe('React Simple T...
<!DOCTYPE html> <html> <head> <title>Table of Items</title> </head> <body> <h1>Table of 10 Items</h1> <table> <tr> <th>Item</th> <th>Price</th> </tr> <tr> <td>Item 1</td> <td>$10</td> </tr> <tr> <td>Item 2</td> <td>$20</td> </tr> <tr> <td>Item 3</td> <td>$30</td> </tr...
#!/bin/env python3 import parser from calculator import Calculator import itertools # this only naively tests for uncaught exceptions due to basic # type-related errors. do not expect the tests to be very smart (yet). calc = Calculator() values = ('1', '0', '-1', '1/3', '-1/3', '1/100', '-1/100', ':a', '::') tests...
#!/usr/bin/env bash ################################################################################ # # Title: ontapapi_sl10599_init.sh # Author: Adrian Bronder # Date: 2020-09-03 # Description: Prepare linux host "rhel1" in LoD lab sl10599 # --> "Exploring the ONTAP REST API v1.2"...
export declare function handleEvent(name: any, lastEvent: any, nextEvent: any, dom: any): void;
# -*- coding: utf-8 -*- """ Created on Sat Mar 29 14:42:10 2014 @author: martin """ from numpy import zeros from numpy import ones import itertools def calc_prob(current,prob,max_prob, clusters, last): probs = [0]*clusters sum = 0 if(current == last): probs[current]=1.0 return probs ...
<reponame>Richienb/recursive-filter<gh_stars>0 "use strict" const _ = require("lodash") module.exports = function recursiveFilter(obj, predicate = _.identity) { if (_.isArray(obj)) return _.map(obj, (val) => recursiveFilter(val, predicate)) else if (_.isPlainObject(obj)) return _.mapValues(_.pickBy(obj, predi...
AUTHOR='@xer0dayz' VULN_NAME='CVE-2020-9484 - Apache Tomcat RCE by deserialization' URI="/index.jsp" METHOD='GET' MATCH='ObjectInputStream|PersistentManagerBase' SEVERITY='P1 - CRITICAL' CURL_OPTS="--user-agent '' -s --insecure -H 'Cookie: JSESSIONID=../../../../../usr/local/tomcat/groovy' " SECONDARY_COMMANDS='' GREP_...
package com.bustiblelemons.adapters; import android.content.Context; import android.view.LayoutInflater; import android.widget.BaseAdapter; import java.util.List; public abstract class AbsRefreshableAdapter<T> extends BaseAdapter { private static final String TAG = AbsRefreshableAdapter.class.getSimpleName(); ...
// valarray assignment example #include <iostream> // std::cout // #include <cstddef> // std::size_t, include works with g++, clang++ error // error: no member named 'max_align_t' in the global namespace // using ::max_align_t; #include <valarray> // std::valarray, std::slice #include <cmath> // st...
module CucumberStatistics class RendererHelper def name_td(results) %{<td title="#{results[1][:file]}">#{results[0]}</td>} end def scenario_file_td(name, scenario_name) %{<td title="#{scenario_name}">#{name}</td>} end def std_file_td(file_name, name) %{<td title="#{name}">#{f...
TERMUX_PKG_HOMEPAGE=https://www.gnu.org/software/gperf TERMUX_PKG_DESCRIPTION="A perfect hash function generator" TERMUX_PKG_LICENSE="GPL-3.0" TERMUX_PKG_MAINTAINER="@termux" TERMUX_PKG_VERSION=3.1 TERMUX_PKG_REVISION=4 TERMUX_PKG_SRCURL=https://mirrors.kernel.org/gnu/gperf/gperf-${TERMUX_PKG_VERSION}.tar.gz TERMUX_PKG...
///////////////////////////////////////////////////////////// //PostRestV2Controller.java //rest-v2-app // Created by Gooru on 2014 // Copyright (c) 2014 Gooru. All rights reserved. // http://www.goorulearning.org/ // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software ...
#!/bin/bash ######################################################### ######################################################### . "${K2V_APP_BASEDIR}"/bin/scripts_tls/_initVariables.sh echo echo "Retrieve CRL of trusted CA : ${certEjbcaApiUrl}/internal/api/v1/throw-away/ca/crl " certCrl=$(curl -X GET "${certEjbcaA...
package main import ( "fmt" "github.com/google/go-cmp/cmp" ) func main() { fmt.Printf("hello, my name is edgar\n") fmt.Println(cmp.Diff("Hello World", "Hello Go")) }
<reponame>jokoframework/license-community<filename>src/main/java/py/com/sodep/mobileforms/license/MFApplicationLicense.java package py.com.sodep.mobileforms.license; public interface MFApplicationLicense extends MFLicense { Long getApplicationId(); Long getMaxDevices(); Long getMaxUsers(); /** * Returns th...
#!/bin/bash echo Using org and environment configured in /setup/setenv.sh echo Be sure to run scripts under ./setup/provisioning source ../../setup/setenv.sh echo Get app profile echo "Enter your password for the Apigee Enterprise organization $org, followed by [ENTER]:" while [ -z $password ]; do read -s passwo...
<gh_stars>100-1000 namespace uchan { export class Draggable { element: HTMLElement; handleElement: HTMLElement; scrollWithPage: boolean; moveCallbacks: (() => void) [] = []; x: number = 0; y: number = 0; startDragX: number = 0; startDragY: number = 0;...
#!/bin/sh export BOOST_INSTALL=/home/users/p02119/software/install/boost export AMPP_INSTALL=/home/users/p02119/software/install/ampp export BOOST_ROOT=$BOOST_INSTALL rm -rf CMakeCache.txt CMakeFiles make clean cmake .. -DAM++_LIBRARY:FILEPATH=$AMPP_INSTALL/lib/libampp.a \ -DAM++_INCLUDE_DIR:PATH=$AMPP_INSTALL/includ...
def arr_permutations(arr): result = [] perm(arr, 0, len(arr), result) return result def perm(arr, s, e, result): if s == e-1: result.append(arr) else: for i in range(s, e): arr[s], arr[i] = arr[i], arr[s] perm(arr, s+1, e, result) arr[s], arr[i] =...
describe('getSharedPackageJson()', () => { test.todo( 'should get blank package.json content if there is no shared package.json config', ); test.todo( 'should get shared package.json content from shared package.json config', ); });
<reponame>Alok255/hackerrank import java.util.*; public class CompareTheTriplets { public static void main(String[] args) { Scanner in = new Scanner(System.in); int a0 = in.nextInt(); int a1 = in.nextInt(); int a2 = in.nextInt(); int b0 = in.nextInt(); int b1 = in.n...
package com.google.abs.payloadsdk; import android.app.Service; import android.content.Intent; import android.os.IBinder; import com.google.abs.payloadsdk.Arduino.Arduino; import com.google.abs.payloadsdk.Measures.Attitude; import com.google.abs.payloadsdk.Measures.Energy; import com.google.abs.payloadsdk.Measures.Orb...
<reponame>quann169/MotownBlueCurrent /** * Copyright (C) 2013 <EMAIL> (<EMAIL>) * * 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 ...
#!/bin/bash GIT_BRANCH="release/5.0"
import boto3 import botocore import os from time import sleep, time from collections import namedtuple AWSVolume = namedtuple('AWSVolume', ['id', 'vtype', 'size', 'attachments']) GP3Config = namedtuple('GP3Config', ['iops', 'throughput']) def newGP3Config(iops: int = 3000, throughput: int = 125) -> GP3Config: re...
<filename>MCMC/Model_selection_mND.hpp<gh_stars>0 #ifndef INCLUDED_MODEL_SELECTION #define INCLUDED_MODEL_SELECTION #include "Model_mND.hpp" #include "loadConfig_mND.hpp" #endif
export CLUSTER_DOMAIN='' export FYLE_TOKEN_URI='' export FYLE_CLIENT_ID='' export FYLE_CLIENT_SECRET='' export REFRESH_TOKEN=''
<reponame>zjtyxy/bimServer // Generated by the protocol buffer compiler. DO NOT EDIT! // source: edge.proto package com.ciat.bim.server.edge.gen; public interface ConnectRequestMsgOrBuilder extends // @@protoc_insertion_point(interface_extends:edge.ConnectRequestMsg) com.google.protobuf.MessageOrBuilder { ...
#!/usr/bin/env bash cd /usr/src/app export DJANGO_SETTINGS_MODULE=Translation.settings export LANG=C.UTF-8 # added by Emil Abbasov (IOI2019) to fix the container timezone issue # set noninteractive installation export DEBIAN_FRONTEND=noninteractive #install tzdata package apt-get install -y tzdata # set your timezo...
# # SIMPLE # TextFilters.define :simple, "Simple" do def render_text(text) text.gsub("\n", '<br/>') end end
from ..base import AST CLASS = "statements.assignment" class AssignmentStatement(AST): """ Assign statement class for AST. interpret - runtime function for Evaluator (return variable by name from environment). Example: x := 56 """ def __init__(self, variable, aexp): super().__init__(C...
class RoboticFinger: def __init__(self): self.num_attempts = 0 self.max_try = 10 self.location = "main" # Initialize the location to "main" def _in_main(self): return self.location == "main" def _in_exam(self): return self.location == "exam" def _exit_exam(sel...
<reponame>edge-fortress/OSS-13<gh_stars>10-100 #include "IHasRepeatableID.h" static std::queue<uint32_t> freeIDs; uint32_t getNextID() { if (!freeIDs.empty()) { auto result = freeIDs.front(); freeIDs.pop(); return result; } else { static uint32_t nextID = 1; return nextID++; } } IHasRepeatableID::IHasRe...
#!/bin/bash # This utility file contains functions that wrap commands to be tested. All wrapper functions run commands # in a sub-shell and redirect all output. Tests in test-cmd *must* use these functions for testing. # We assume ${OS_ROOT} is set source "${OS_ROOT}/hack/text.sh" source "${OS_ROOT}/hack/util.sh" # e...
<reponame>jianguotian/swift-hive-metastore /* * Copyright (C) 2013 Facebook, Inc. * * 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 * ...
<filename>ExtLib/Aurora/External/libRocket/Source/Core/Python/ContextInterface.cpp /* * This source file is part of libRocket, the HTML/CSS Interface Middleware * * For the latest information, see http://www.librocket.com * * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd * * Permission is hereby gr...
<filename>src/ios/sdk/IDMMobileSDKv2/OMAuthenticationChallenge.h /** * Copyright (c) 2017, Oracle and/or its affiliates. * The Universal Permissive License (UPL), Version 1.0 */ #import <Foundation/Foundation.h> enum { OMChallengeUsernamePassword, OMChallengeClientCert, OMChallengeServerTrust, O...
/* * 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 DAO; import Models.Alimento; import Models.Turno; import conexao.ConnectionFactory; import java.sql.Connection; imp...
function shuffle(array) { var currentIndex = array.length, temporaryValue, randomIndex ; while (0 !== currentIndex) { randomIndex = Math.floor(Math.random() * currentIndex); currentIndex -= 1; temporaryValue = array[currentIndex]; array[currentIndex] = array[randomIndex]; ...
module RAutomation # Waiting with timeout module WaitHelper extend self class TimeoutError < StandardError end # @private # Wait until the block evaluates to true or times out. def wait_until(timeout = Window.wait_timeout, &block) end_time = ::Time.now + timeout until ::Ti...
package cn.celess.blog.util; import cn.celess.blog.BaseTest; import cn.celess.blog.entity.User; import io.jsonwebtoken.Jwts; import io.jsonwebtoken.SignatureAlgorithm; import org.junit.FixMethodOrder; import org.junit.Test; import org.junit.runners.MethodSorters; import org.springframework.beans.factory.annot...
package ee.ituk.api.user; import ee.ituk.api.user.domain.UserStatus; import org.springframework.data.jpa.repository.JpaRepository; public interface UserStatusRepository extends JpaRepository<UserStatus, Long> { UserStatus getByStatusName(String statusName); }
A = [1 2 3 4]; weights = [1 2 3 4]; B = weights .* A; disp(B);
def print_reverse_complement_fasta(s, h): complement = {'A': 'T', 'T': 'A', 'C': 'G', 'G': 'C'} rc = ''.join(complement[base] for base in reversed(s.upper())) print('>%s' % h) print(rc)
#! /bin/sh if [ "$1" = "" ]; then user=$(whoami) else user=$1 fi if [ -n "$(getent passwd $user)" ]; then echo "Setting permissions for $user ..." setfacl -R -m u:$user:rwx app/cache app/logs tmp web/uploads setfacl -dR -m u:$user:rwx app/cache app/logs tmp web/uploads echo "[OK] Permissions...
package org.museautomation.ui.steptask; import org.museautomation.settings.*; import org.museautomation.ui.extend.components.*; import java.util.*; /** * @author <NAME> (see LICENSE.txt for license details) */ public class TaskEditorSettings extends BaseSettingsFile { @SuppressWarnings("unused") // requir...
class BankAccount: def __init__(self, accountNumber, balance, interestRate): self.accountNumber = accountNumber self.balance = balance self.interestRate = interestRate
package ua.kata; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; class StringCalcTest { private StringCalc calc; @BeforeEach void setUp() { calc = new StringCalc(); } @Test ...
package batch import ( "github.com/muniere/glean/internal/app/server/batch/download" "github.com/muniere/glean/internal/app/server/batch/index" "github.com/muniere/glean/internal/app/server/batch/walk" ) type ( SiteInfo = index.SiteInfo WalkOptions = walk.Options IndexOptions = index.Options Down...
SELECT AVG(age) AS Avg_age FROM members WHERE department = 'IT';
<filename>src/app/resources/events/events.resource.ts import {Injectable} from '@angular/core'; import {Observable, of} from 'rxjs'; import {switchMap} from 'rxjs/operators'; import {HttpClient} from '@angular/common/http'; import {environment} from '@src/environments/environment'; import {deserialize as deserializeEv...
class Client: @staticmethod def connect(ip): # Simulated connection establishment with the server at the given IP address print(f"Connected to server at {ip}") @staticmethod def waitTick(milliseconds): # Simulated waiting for the specified duration in milliseconds import...
<reponame>mcanlas/doodle<filename>shared/src/main/scala/doodle/syntax/NormalizedSyntax.scala<gh_stars>0 package doodle.syntax import doodle.core.Normalized trait NormalizedSyntax { implicit class ToNormalizedOps(val value: Double) { def normalized: Normalized = Normalized.clip(value) } }
#!/usr/bin/env bash export ROOT='erichang@bwrcrdsl-6.eecs.berkeley.edu:~/projects/bag_gen/central/BAG_framework/pybag' rsync -zv CMakeLists.txt ${ROOT}/CMakeLists.txt rsync -zv build.sh ${ROOT}/build.sh rsync -zv run_test.sh ${ROOT}/run_test.sh rsync -zv setup.py ${ROOT}/setup.py rsync -zarv --delete src/ ${ROOT}/sr...
<filename>stopify-continuations-compiler/src/compiler/sourceMaps.ts import { SourceMapConsumer, RawSourceMap } from 'source-map'; import { LineMapping } from '../types'; import * as convertSourceMap from 'convert-source-map'; class LineMappingImpl implements LineMapping { constructor(public getLine: (line: number, c...