text
stringlengths
1
1.05M
<gh_stars>100-1000 //index.js //获取应用实例 var app = getApp() Page({ data: { motto: '预约会议', currentDate: new Date(), meetingRooms: ['会议室1', '会议室2'] }, //事件处理函数 formSubmit: function() { var that = this; // 获取天气信息 wx.request({ url: 'https://liuanchen.com/w/meeting', method: '...
<reponame>rpsubc8/esp32gameboy #include <stdio.h> #include "mem.h" #include "rom.h" #include "interrupt.h" #include "gbConfig.h" #define set_HL(x) do {unsigned int macro = (x); c.L = macro&0xFF; c.H = macro>>8;} while(0) #define set_BC(x) do {unsigned int macro = (x); c.C = macro&0xFF; c.B = macro>>8;} while(0)...
import { InjectionKey } from 'vue' import { NotifyInterface } from './Notify' export const hasSymbol = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol' export const PolySymbol = (name: string) => hasSymbol ? Symbol(name) : ('_N_') + name export const notifyStoreKey = /*#__PURE__*/ PolySymbol('...
<reponame>sahilduhan/codeforces #include <bits/stdc++.h> using namespace std; class Solution { public: string defangIPaddr(string address) { string result; for (int i = 0; i < address.length(); i++) { if (address[i] == '.') result += "[.]"; else result += address[...
<filename>frontend/src/js/query-upload-concept-list-modal/actions.ts import { ActionType, createAction } from "typesafe-actions"; import { TreesT } from "../concept-trees/reducer"; export type QueryUploadConceptListModalActions = ActionType< | typeof openQueryUploadConceptListModal | typeof closeQueryUploadConcep...
#Calculate average of array arr <- c(1.1, 2.2, 3.3, 4.4) average <- mean(arr) print(average)
<gh_stars>0 import axios from 'axios'; const KEY = '<KEY>' export default axios.create({ baseURL : "https://www.googleapis.com/youtube/v3", params: { part : 'snippet', maxResults : 5, key : KEY } });
<filename>pinax/apps/tasks/tests/tasks_urls.py from django.conf.urls.defaults import * urlpatterns = patterns("", url(r"^tasks/", include("pinax.apps.tasks.urls")), url(r"^notices/", include("notification.urls")), url(r"^tagging_utils/", include("pinax.apps.tagging_utils.urls")), url(r"^comments/", i...
let i = 0; for (i; i <= 10; i += 1) { console.log(i); }
// deno-lint-ignore-file no-explicit-any import { Body, Controller, ControllerName, Get, Ip, MethodName, Post, Query, Res, Response, UploadedFile, UseGuards, } from "../../../mod.ts"; import type { Context } from "../../../mod.ts"; import { BadRequestException, mockjs } from "../../deps.ts"; imp...
import angular from 'angular'; import MapHelper from "./map-helper.service"; let mapHelperModule = angular.module('mapHelper', [ "geoserver" ]) .service('MapHelperService', MapHelper) .name; export default mapHelperModule;
#!/bin/bash -e die(){ echo $1; exit; } pushd master git fetch --all -p git checkout master git reset --hard origin/master popd for a in REL* do pushd $a git checkout $a git reset --hard origin/$a popd done pushd master git diff-index --quiet HEAD || die "Skip updating dirty master" u="$(git ls-files --e...
s script will add the "public" versions of the Cadre repos # As `public` remotes for all applicable repos for repo in Cerveau Viseur Joueur.cpp Joueur.cs Joueur.java Joueur.js Joueur.lua Joueur.py Joueur.ts do cd $repo echo " -> adding MMAI-dev branch for $repo" git remote add mmai-dev git@github.com:sigga...
package com.learn.controller; import com.alibaba.csp.sentinel.Entry; import com.alibaba.csp.sentinel.EntryType; import com.alibaba.csp.sentinel.SphU; import com.alibaba.csp.sentinel.context.ContextUtil; import com.alibaba.csp.sentinel.slots.block.BlockException; import com.alibaba.csp.sentinel.slots.block.RuleConstant...
<filename>lang/py/cookbook/v2/source/cb2_2_13_exm_2.py print>>somewhere, "The average of %d and %d is %f\n" % (1, 3, (1+3)/2)
def classify_dataset(data): """Function to classify a given dataset into two different classes""" #Initialize result list result = [] #Loop over the data for item in data: #Check the label of each item and append the corresponding class to result if item['label'] == 0: re...
#!/bin/bash set -m mongodb_cmd="mongod --storageEngine $STORAGE_ENGINE" cmd="$mongodb_cmd --replSet rs0" if [ "$AUTH" == "yes" ]; then cmd="$cmd --auth" fi if [ "$JOURNALING" == "no" ]; then cmd="$cmd --nojournal" fi if [ "$OPLOG_SIZE" != "" ]; then cmd="$cmd --oplogSize $OPLOG_SIZE" fi $cmd & ./init-r...
const todo = (state, action) => { switch (action.type) { case 'ADD_TODO': return { id:action.id, text:action.text, completed:false }; case 'TOGGLE_TODO': if(state.id !== action.id) { return state; } return { ...state, comp...
#!/bin/sh . "${TEST_INIT:-./test-init.sh}" if [ "$1" = 'actual' ]; then mkdir .calcurse || exit 1 cp "$DATA_DIR/conf" .calcurse || exit 1 "$CALCURSE" -D "$PWD/.calcurse" -i "$DATA_DIR/ical-004.ical" "$CALCURSE" -D "$PWD/.calcurse" -s01/01/1980 -r2 "$CALCURSE" -D "$PWD/.calcurse" -t rm -rf .calcurse || exi...
<filename>unmangler/src/unmangler.h #ifndef UNMANGLER_H #define UNMANGLER_H #include <ngrest/common/Service.h> class unmangler: public ngrest::Service { public: // *method: GET std::string unmangle(std::string mangled); }; #endif // UNMANGLER_H
import { Express, Request, Response } from "express"; import { createBlockChainNodeHandler, getBlockChainHandler, deleteBlockChainHandler, getBlockChainNodeHandler, getHopBlockChainHandler, createBlockChainHandler, removeBlockChainHandler } from "./controller/blockchain.controller"; import { createBlock...
#!/bin/bash #SBATCH --job-name=/data/unibas/boittier/test-neighbours2 #SBATCH --nodes=1 #SBATCH --ntasks=1 #SBATCH --partition=short #SBATCH --output=/data/unibas/boittier/test-neighbours2_%A-%a.out hostname # Path to scripts and executables cubefit=/home/unibas/boittier/fdcm_project/mdcm_bin/cubefit.x fdcm=/home/uni...
<gh_stars>0 import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { HomeComponent } from './home.component'; import { HomeRoutingModule } from './home-routing.module'; import { FindCourierComponent } from '../find-courier/find-courier.component'; import { FindMedicineComponent...
require 'securerandom' module HasSalt DEFAULT_LENGTH = 64 module ClassMethods INFINITY = 1.0 / 0.0 def has_salt(only: nil, column: nil, length: nil, size: nil) only ||= -> { true } column ||= :salt # Size override fail ArgumentError, "don't pass both :size and :length" if size...
<filename>src/main/java/org/stellar/sdk/responses/operations/RevokeSponsorshipOperationResponse.java package org.stellar.sdk.responses.operations; import com.google.common.base.Optional; import com.google.gson.annotations.SerializedName; /** * Represents RevokeSponsorship operation response. * @see org.stellar.sdk....
/** * Copyright 2015 IBM Corp. * * 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 writing, so...
filter_result = list(filter(lambda x: x["department"] == criteria["department"] and x["salary"] >= criteria["min_salary"], data)) print(filter_result) ## Output [ { "id": "3", "name": "Albert", "department": "IT", "salary": 70000 } ]
<reponame>neggas/blog import { Module } from '@nestjs/common'; import { TypeOrmModule } from '@nestjs/typeorm'; import { SubscriptionController } from './Subscription.controller'; import { Subscription } from './Subscription.entity'; import { SubscriptionService } from './Subscription.service'; @Module({ imports:...
<html> <head> <title>Table Sample</title> </head> <body> <table> <tr> <th>First Name</th> <th>Last Name</th> <th>Age</th> </tr> <tr> <td>John</td> <td>Doe</td> <td>30</td> </tr> <tr> <td>Jane</td> <td>Doe</td> <td>25</td> </tr> </table> </body> </html>
<gh_stars>1-10 /* * Copyright 2013 <NAME> * * 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...
<reponame>shadman2000/ftc_app<filename>Team8201/src/main/java/org/firstinspires/ftc/team8201/robot8201.java package org.firstinspires.ftc.team8201; import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; import com.qualcomm.robotcore.eventloop.opmode.TeleOp; import com.qualcomm.robotcore.hardware.TouchSensor; @T...
<filename>os/yapio.h /************************************************************************* * * * YAP Prolog %W% %G% * * * Yap Prolog was developed at NCCUP - Universidade do Porto * * * * Copyright L.Damas, V.S.Costa and Universidade do Porto 1985-2003 * * * ...
export const PORTFOLIO_ITEM_NULLABLE = [ 'name', 'description', 'long_description', 'distributor', 'documentation_url', 'support_url' ]; export const PORTFOLIO_NULLABLE = ['description'];
class GroceryStore: def __init__(self, name, products, location): self.name = name self.products = products self.location = location def get_all_products(self): return self.products def get_location(self): return self.location
/* Copyright 2019 The Kubernetes 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 in writing, ...
#!/bin/bash mkdir -p $CASSANDRA_HOME/logs java -Xmx128M -Xms128M -XX:MaxDirectMemorySize=256M -jar $CASSANDRA_HOME/mate/cassandra-mate.jar >>$CASSANDRA_HOME/logs/cassandra_mate.stdout.log 2>>$CASSANDRA_HOME/logs/cassandra_mate.stderr.log
#!/bin/sh # # Vivado(TM) # runme.sh: a Vivado-generated Runs Script for UNIX # Copyright 1986-2020 Xilinx, Inc. All Rights Reserved. # echo "This script was generated under a different operating system." echo "Please update the PATH and LD_LIBRARY_PATH variables below, before executing this script" exit if [ -z "$...
//Question: https://www.hackerrank.com/challenges/js10-try-catch-and-finally/problem Solution /* * Complete the reverseString function * Use console.log() to print to stdout. */ function reverseString(s) { try{ // Can be chained, but it damages readability console.log(s.split("").reverse().join(...
#!/usr/bin/env bash sudo gu remove bc && cd ./component/ && sudo gu -L install ./bc-component.jar && cd ..
<reponame>go-generalize/volcago<filename>generator/generator.go<gh_stars>1-10 package generator import ( "strings" "github.com/go-generalize/go-easyparser" "github.com/go-generalize/go-easyparser/types" "golang.org/x/xerrors" ) // Generator generates firestore CRUD functions type Generator struct { dir string...
#!/bin/sh # # Copyright (c) 2007 Junio C Hamano # test_description='Quoting paths in diff output. ' . ./test-lib.sh P0='pathname' P1='pathname with HT' P2='pathname with SP' P3='pathname with LF' if : 2>/dev/null >"$P1" && test -f "$P1" && rm -f "$P1" then test_set_prereq TABS_IN_FILENAMES else say 'Your filesyste...
<reponame>glameyzhou/training<filename>distribute/src/main/java/org/glamey/training/demo/easy/RemoveElement.java package org.glamey.training.demo.easy; /**给定一个数组 nums 和一个值 val,你需要原地移除所有数值等于 val 的元素,返回移除后数组的新长度。 不要使用额外的数组空间,你必须在原地修改输入数组并在使用 O(1) 额外空间的条件下完成。 元素的顺序可以改变。你不需要考虑数组中超出新长度后面的元素。 示例 1: 给定 nums = [3,2,2,...
<reponame>KaydenMiller/screeps import { Uuid } from "./uuid"; export const MAX_CREEPS = 5; export const MAX_HARVESTERS = 3; export const MIN_HARVESTERS = 1; export const MIN_UPGRADERS = 1; export const MAX_UPGRADERS = 1; export const MIN_BUILDERS = 1; export const MAX_BUILDERS = 1; export class CreepFactory { const...
// Define the enum representing mouse events enum MouseEvent { Press(u8, i32, i32), Release(i32, i32), Hold(i32, i32), } // Function to obtain the representation of a mouse button fn repr_mouse_button(b: u8) -> Option<String> { // Implementation of repr_mouse_button function is not provided // Assu...
<reponame>NAVEENRH/FULL_STACK_TRAINING import React from "react"; import Column from "./components/Column"; type State = { no: number; count: number }; class Demo extends React.Component<{}, State> { state: State = { no: 0, count: 0 }; shouldComponentUpdate(nextProps: {}, nextState: State) { console.log("SHOUL...
document.addEventListener("click", e => { if(e.target.className=='swal2-close' && e.target.id=="swal-minimize") { e.stopPropagation(); e.preventDefault(); $('#swal-minimized-text').html($("#swal2-title")[0].outerHTML); swal_minimize(); } }, true); export_styles(); $('#swal-minimized')....
#!/bin/bash # This expects the device to be in zedboot mode, with a zedboot that is # is compatible with the Fuchsia system image provided. # # The first and only parameter should be the path to the Fuchsia system image # tarball, e.g. `./fuchsia-test.sh generic-x64.tgz`. # # This script expects `pm`, `dev_finder`, an...
import requests import json def get_latest_news(): """Get latest news from Google news API. Returns ------- List[dict] List of dictionaries containing the latest news. """ url = 'http://newsapi.org/v2/everything?sources=google-news&apiKey=<YOUR_API_KEY>' response = requests.get...
# pairgenerator.py class PairDataGenerator: def generate_pairs(self): # Implementation to generate pairs of data pass # classify_trainer.py def train_classifier(pairs): # Implementation to train a classifier using the pairs of data pass def train_zaco_classifier(pairs): # Implementatio...
# $Id$ inittest extract-nonexistent tc/extract-nonexistent extshar ${TESTDIR} extshar ${RLTDIR} runcmd "${AR} xv valid.a nonexistent" work true rundiff true
<gh_stars>1-10 import { withIcon } from "../withIcon"; import { ReactComponent as Icon } from "./gift-sign.svg"; export const IconGiftSign = withIcon(Icon);
<filename>doc/html/search/pages_8.js var searchData= [ ['performance',['Performance',['../performace.html',1,'']]] ];
<reponame>rajatariya21/airbyte require_relative './airbyte_protocol.rb' require_relative './airbyte_logger.rb' require 'json' class MongodbState def initialize(state_file:) @state = if state_file JSON.parse(File.read(state_file)) else {} end AirbyteL...
function glb-to-draco-gltf() { if [ $# -eq 0 ]; then echo "usage: $0 glb filename (without '.glb' at the end)" return fi gltf-pipeline -i ${1}.glb -o ${1}.gltf gltf-pipeline -i ${1}.gltf -o ${1}.draco.gltf -d }
<reponame>ArtursKuzmiks/SpringTest package com.example.Tests.Example2.Dao; import com.example.Tests.Example2.ApplicationConfig.Customer; import java.util.List; /** * @author <NAME> on 18.29.5 */ public interface CustomerDao { void addCustomer(Customer customer); void editCustomer(Customer customer, Long...
#include "ItemManager.h" #include <Info/Info/Database.h> #include "../GameStateDatabase.h" #include "../State/States.h" #include <Core/DeltaTimer.h> #include "../LogicDB/LogicDB.h" using namespace Lunia::XRated::Database; namespace Lunia { namespace XRated { namespace Logic { const float Item::TIMELIMIT = 30.0f; /...
<gh_stars>0 #!/usr/bin/env python # -*- coding: utf-8 -*- import pytest from peewee import fn def test_returns_instance(employee_class): """ :type employee_class: pydrill_dsl.resource.Resource """ item = employee_class.select().get() assert item.first_name != '' def test_returned_instace_has_me...
<filename>src/types/replacements.schema.ts<gh_stars>0 /* tslint:disable */ /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ export type Files = string[]; ...
<reponame>famura/Rcs /******************************************************************************* Copyright (c) 2017, Honda Research Institute Europe GmbH Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Re...
package db import ( "errors" "github.com/gueradevelopment/team-context/models" ) // TaskDB - Task model database accessor type TaskDB struct{} var ( items = make(map[string]models.Task) ) // Get - retrieves a single resource func (db *TaskDB) Get(id string, c chan Result) { defer close(c) result := Result{} ...
import * as vs from "../../../../domain/validation" import { ChannelCommandRepository, ChannelQueryRepository, MessageCommandRepository, MessageQueryRepository, TransactionRepository, UserCommandRepository, UserQueryRepository, } from "../../../repositories" import { DeleteMessageApplicatio...
#!/bin/bash # This does not work, you have to type this in manually unfortunately source venv/bin/activate
<gh_stars>0 package q13_test import ( "testing" "puzzle/quizzes/q13" ) func Test_cards(t *testing.T) { cards := q13.Cards([]int{1, 2, 3, 4}) b2 := []q13.ICards{} for _, v := range cards.Before() { t.Logf("n=1, %v", v.Values()) b2 = append(b2, v) } b3 := []q13.ICards{} for _, v := range b2 { b3 = appe...
def create_url_mapping(url_patterns): url_mapping = {} for pattern, view_function in url_patterns: if view_function in url_mapping: url_mapping[view_function].append(pattern) else: url_mapping[view_function] = [pattern] return url_mapping
#!/usr/bin/env bash set -eux # yq sudo add-apt-repository -y ppa:rmescandon/yq sudo apt update sudo apt install -y yq # jq sudo apt install -y jq # sponge sudo apt install -y moreutils # promtool mkdir -p build cd build prom_version=2.3.2 prom_file="prometheus-${prom_version}.linux-amd64.tar.gz" curl -LO https://g...
#!/bin/bash set -x export DASHROOT=`pwd` export SHA=`git log --pretty=format:'%h' -n 1` set +x if [[ "$DOCKER_IMAGE" == "fedora" ]]; then source /usr/share/Modules/init/bash module load mpi fi source `pwd`/../tci/bin/activate set -x export PATH=.:${PATH} export PYTHONPATH=${DASHROOT}/build/lib export LD_LIBR...
package com.hongbog.view; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.PixelFormat; import android.graphics.PorterDuff; import android.os.Handler; import android.os.Message; import android.util.AttributeSe...
#!/bin/bash # ========== Experiment Seq. Idx. 1017 / 50.7.3 / N. 63/1/3 - _S=50.7.3 D1_N=63 a=-1 b=1 c=1 d=1 e=1 f=1 D3_N=1 g=-1 h=-1 i=1 D4_N=3 j=3 ========== set -u # Prints header echo -e '\n\n========== Experiment Seq. Idx. 1017 / 50.7.3 / N. 63/1/3 - _S=50.7.3 D1_N=63 a=-1 b=1 c=1 d=1 e=1 f=1 D3_N=1 g=-1 h=-1 i=...
def generate_report(repo_list): total_stars = sum(stars for _, stars in repo_list) highest_star_repo = max(repo_list, key=lambda x: x[1]) lowest_star_repo = min(repo_list, key=lambda x: x[1]) return { "total_stars": total_stars, "highest_star_repo": highest_star_repo, "lowes...
TERMUX_PKG_HOMEPAGE=https://wiki.termux.com/wiki/Termux:API TERMUX_PKG_DESCRIPTION="Termux API - static commands (install also the Termux:API app)" TERMUX_PKG_LICENSE="MIT" TERMUX_PKG_VERSION=0.5 TERMUX_PKG_SHA256=c4e793ab6402213efd88138486d23038e29692df3f36ddb5c590d9adc358d702 TERMUX_PKG_SRCURL=https://github.com/am0n...
#!/bin/bash if [ "$EUID" -ne 0 ] then echo "Please run as root" exit fi before_reboot(){ apt update -y apt upgrade -y apt install ufw iptables } after_reboot(){ ufw allow 9001 ufw allow 9030 ufw allow 22 ufw allow 222 ufw allow 80 ufw allow 53 ufw enable } if ...
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. DOWNLOAD=$1 for FOLDER in 'img_db' 'txt_db' 'pretrained' 'finetune'; do if [ ! -d $DOWNLOAD/$FOLDER ] ; then mkdir -p $DOWNLOAD/$FOLDER fi done BLOB='https://acvrpublicycchen.blob.core.windows.net/uniter' # image dbs for SPLIT ...
package org.insightcentre.nlp.saffron.data.connections; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; /** * * @author <NAME> &lt;<EMAIL>&gt; */ @JsonIgnoreProperties(ignoreUnknown = true) public class AuthorTerm { private String authorId; private String termId; ...
<filename>src/widgets/settingspages/IgnoresPage.hpp<gh_stars>1-10 #pragma once #include "widgets/settingspages/SettingsPage.hpp" #include <QStringListModel> class QVBoxLayout; namespace chatterino { class IgnoresPage : public SettingsPage { public: IgnoresPage(); void onShow() final; pri...
<gh_stars>1-10 /** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * ...
python lab-09_numbers_and_missing_data.py
#!/bin/bash FROM="go1.8.3" TO="go1.10.2" PKGS=( "ast" "constant" "doc" "format" "internal/format" "internal/testenv" "parser" "printer" "scanner" "token" "types" ) SGOSRC=`pwd` function last-commit { git log | head -n 1 | awk '{print $2}' } function checkout-go { echo "Checking out $1." cd /usr/loca...
xt_main -f examples/default_cases/muzero_breakout.yaml
<gh_stars>1-10 #!/usr/bin/env python # Copyright 2014 IIJ Innovation Institute Inc. 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 copy...
<reponame>vollmerr/state-template-starter<filename>src/components/App/routes.js import Home from '../Home'; import Help from '../Help'; import Form from '../Form'; // order here determines order in navigation menu export const routesByKey = { home: { key: 'home', name: 'Home', path: '/', exact: true,...
TERMUX_PKG_HOMEPAGE=http://premake.github.io/ TERMUX_PKG_DESCRIPTION="Build script generator" TERMUX_PKG_VERSION=4.4-beta5 TERMUX_PKG_SRCURL=http://downloads.sourceforge.net/project/premake/Premake/4.4/premake-${TERMUX_PKG_VERSION}-src.zip # TERMUX_PKG_DEPENDS="pcre, openssl, libuuid" # TERMUX_PKG_EXTRA_CONFIGURE_ARGS=...
#!/bin/sh echo "Setting up your Mac..." # Check for Homebrew and install if we don't have it if test ! $(which brew); then /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" fi # Update Homebrew recipes brew update # Install all our dependencies with bundle (See Bre...
#!/usr/bin/env bash mkdir -p certs docker pull docker.pkg.github.com/eventstore/es-gencert-cli/es-gencert-cli:1.0.1 docker run --rm --volume $PWD/certs:/tmp --user $(id -u):$(id -g) docker.pkg.github.com/eventstore/es-gencert-cli/es-gencert-cli:1.0.1 create-ca -out /tmp/ca docker run --rm --volume $PWD/certs:/tmp -...
import AppScreen from './AppScreen'; import {locatorStrategy} from '../helpers/utils'; class BiometricsScreen extends AppScreen { constructor() { super(locatorStrategy('biometrics screen')); } private get biometricsSwitch() { return $(locatorStrategy('biometrics switch')); } async enableBiometrics(...
import {useDispatch} from "react-redux" import React from "react" import ErrorFactory from "../models/ErrorFactory" import Link from "./common/Link" import LoadFilesInput from "ppl/import/LoadFilesInput" import Notice from "../state/Notice" import errors from "../errors" import ingestFiles from "../flows/ingestFiles" ...
<filename>scripts/services/reddit.txt.js /**   deps: ['https://cdn.jsdelivr.net/npm/arquero@latest', 'https://cdn.jsdelivr.net/npm/hal9-utils@latest/dist/hal9-utils.min.js'] cache: true params: - name: type label: Type value: - control: select value: submissions values: ...
#! /usr/bin/env sh DIR=$(dirname "$0") cd "$DIR" . ../scripts/functions.sh SOURCE="$(realpath -m .)" DESTINATION="$(realpath -m ~)" info "Configuring git..." find . -name ".git*" | while read fn; do fn=$(basename $fn) symlink "$SOURCE/$fn" "$DESTINATION/$fn" done success "Finished configuring git."
<reponame>aloygupta/DsAlgoImpl package list.implementation; import list.List; public class LinkedListWithTail<T> implements List<T> { private class Node{ public T value; public Node next; public Node(T value, Node next) { this.value = value; this.next = next; } } private Node head; priva...
<filename>conn.go package nfs import ( "bufio" "bytes" "context" "encoding/binary" "errors" "fmt" "io" "io/ioutil" "log" "net" xdr2 "github.com/rasky/go-xdr/xdr2" "github.com/willscott/go-nfs-client/nfs/rpc" "github.com/willscott/go-nfs-client/nfs/xdr" ) var ( // ErrInputInvalid is returned when input ...
#include "Camera.h" #include <cstdlib> Vec3 random_in_unit_disk() { float x, y; do { x = 2 * drand48() - 1; y = 2 * drand48() - 1; } while (x * x + y * y > 1); return Vec3(x, y, 0); } Camera::Camera(Vec3 from, Vec3 at, Vec3 up, float fov, float aspect, float aperture) { Vec3 view =...
# remote compute worker export WORKER=takos export SYNC_ROOT=~/jobs ## create and download backup bkup() { local SHOST=root@$WORKER ssh $SHOST -- bkup/bkup scp $SHOST:backup.tar.gz.age . ssh $SHOST -- rm backup.tar.gz.age } alias sak="ssh-add -K" # tmux alias sls="tmux ls" ## prefer attach if exists s() { ...
<gh_stars>1-10 import {extend} from "flarum/extend"; import app from "flarum/app"; import PermissionGrid from "flarum/components/PermissionGrid"; import addUploadPane from "./addUploadPane"; app.initializers.add('flagrow-upload', app => { // add the admin pane addUploadPane(); // add the permission option...
#!/bin/bash set -eu define(){ eval ${1:?}=\"\${*\:2}\"; } array (){ eval ${1:?}=\(\"\${@\:2}\"\); } function init_brew(){ echo ' ################# # brew install # ################# ' echo "## Install Xcode (Depend) Testing" echo "! Please Include Xcode packs select !" echo "! And Xcode boot up + Additional pa...
#!/bin/bash set -euox pipefail export GOPATH="$(pwd)/go" export PATH="$PATH:$GOPATH/bin" go get -u golang.org/x/mobile/cmd/gomobile || true go get golang.org/x/tools/go/packages || true go install golang.org/x/mobile/cmd/gobind go get golang.org/x/mobile || true go get -u github.com/ProtonMail/gopenpgp || true PACK...
<gh_stars>0 /* * 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 * "Lic...
<reponame>bxyoung89/xorberax-visualizer<gh_stars>1-10 import mintyScale from './scales/minty-scale.js'; import mintyGradient from './helpers/minty-gradient.js'; import makeFragShaderFromGradient from './helpers/make-frag-shader-from-gradient.js'; import makeBackgroundShaderFromGradient from './helpers/make-background-s...
/////////////////////////////////////////////////////////////////////////////// // Name: src/gtk/mnemonics.cpp // Purpose: implementation of GTK mnemonics conversion functions // Author: <NAME> // Created: 2007-11-12 // Copyright: (c) 2007 <NAME> <<EMAIL>> // Licence: wxWindows licence ///////...
<gh_stars>1-10 /** * Created by <NAME> on 14.02.2017. */ import {BaseUtils} from '../base/BaseUtils'; import {IValueTypeDesc, ValueTypeUtils} from '../data/valuetype'; import {IAtom, IAtomDataDescription, IAtomValue, IInlinedAtomDataDescription, AtomUtils} from './IAtom'; import {LocalIDAssigner} from '../idtype'; i...
# Assign the value of x x <- 10 # Calculate Y Y <- (4 * x - 8 / 2 * x + 3)^2 # Print the Output print(Y) # output 143.0
#!/bin/bash username=${ESP_USERNAME:-"please"} password=${ESP_PASSWORD:-"installme!"} hostname=${ESP_HOSTNAME:-192.168.4.1} function doUpload() { target=$1 file=$2 curl --digest --user ${username}:${password} \ -o /dev/null -F "file=@${file}" \ "http://${hostname}/upload/${target}" } func...