text
stringlengths
1
1.05M
<reponame>gemini133/mango /* MANGO Multimedia Development Platform Copyright (C) 2012-2020 Twilight Finland 3D Oy Ltd. All rights reserved. */ #include <mango/core/endian.hpp> #include <mango/image/compression.hpp> // https://www.khronos.org/registry/OpenGL/extensions/3DFX/3DFX_texture_compression_FXT1.txt na...
// imports import { actionCreators as userActions } from "./user"; // actions const SET_BUCKET = "SET_BUCKET"; const LIKE_BUCKET = "LIKE_BUCKET"; const UNLIKE_BUCKET = "UNLIKE_BUCKET"; const POST_BUCKET = "POST_BUCKET"; // action creators function setBucket(bucket) { return{ type: SET_BUCKET, b...
import math import queue as Q from time import process_time from vx.com.py.proximity.Proximity import * class KNNFE: def __init__(self): pass @staticmethod def execute(nneighbors, clusters, X, proxtype): start = process_time() n = len(clusters); #pmat = PMatrix(...
#!/bin/bash set -e # create minion_backend for Mojolicious integration psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB"<<-EOSQL CREATE USER minion; CREATE DATABASE minion_backend; GRANT ALL PRIVILEGES ON DATABASE minion_backend TO minion; EOSQL echo "Mojolicious Minion backend database cre...
class Media { constructor(medias) { this._imgMedia = medias.image this._mediaId = medias.id this._mediaPhotographer = medias.photographerId this._mediaTitle = medias.title this._mediaLikes = medias.likes this._mediaDate = medias.date this._mediaPrice = medias....
class PlayersService { private readonly logger = new Logger(PlayersService.name); async createPlayer(createPlayerDTO: CreatePlayerDTO) { // Create player logic this.logPlayerCreation(createPlayerDTO); // Call the custom logging method // Additional player creation logic } private logPlayerCreation...
@app.route('/customers/<int:customer_id>', methods=['POST']) def save_customer_data(customer_id): data = request.get_json() customer = Customer(id=customer_id, name=data['name'], address=data['address']) db.session.add(customer) db.session.commit() return jsonify({'message': 'Customer data success...
package controllers; import play.mvc.*; import views.html.home.*; import views.html.*; import views.html.home.home; public class HomeController extends Controller { public Result index(String user,String company) { return ok(home.render(user,company)); } }
// Function for searching an element from array function searchArray(myArray,searchValue) { // length of the array let len = myArray.length; //loop through array and check if element is in array for (let i=0; i<len; i++) { //compare each element of array //with search value ...
<gh_stars>0 import React from 'react'; export default class ArrowDown extends React.Component { render() { const { width, height, color } = this.props; return ( <svg width={width} height={height} viewBox="0 0 140 140" version="1.1" > <g id="Icons" stroke="none" strokeWidth="1" fill="none" fillRule="...
import random def random_permutation(input_array): perm = [] while(len(input_array) > 0): el = random.choice(input_array) perm.append(el) input_array.remove(el) return perm
from typing import List, Tuple class CyclicDependencyError(Exception): pass def determine_execution_order(dependency_pairs: List[Tuple[int, int]]) -> List[int]: graph = {} in_degree = {} # Build the graph and calculate in-degrees for pair in dependency_pairs: task1, task2 = pair ...
#!/bin/bash PYTORCH=/opt/pytorch/pytorch WORKSPACE=/workspace DESTINATION=/docker PROFILE_PYTHON_DIR=batchnorm3d-channels-last unset PYTORCH_VERSION unset PYTORCH_BUILD_VERSION CURRENT_COMMIT='7317dba25c9b0cee7e2b46c0b32587107265e1c5' function build { pushd $PYTORCH; git submodule update --init --recursive;...
#!/bin/sh SVC=./bin/apisvc while [ ! -f $SVC ]; do sleep 1; done while true; do $SVC & PID=$! filewatch -t 3 -filenames $SVC kill $PID echo "$(date '+%Y/%m/%d %H:%M:%S') APIService: killed" done
<reponame>GaganSD/Air-Pollution-Visualizer<filename>aqmaps/src/main/java/uk/ac/ed/inf/aqmaps/DroneBackend.java<gh_stars>0 /* * Written by <NAME> * for Informatics Large Practical coursework 2 * Student number: s1854008 */ package uk.ac.ed.inf.aqmaps; import java.awt.geom.Line2D; import java.awt.geom.Point2D; impo...
require 'spec_helper' include Spec::Example describe Pending do describe 'in portuguese for example' do before(:each) do @keywords = { "pending" => 'pendente|pendencia'} stub_language!('pt', @keywords) end it "should have the translate pending method" do Pending.translate_pend...
<reponame>smagill/opensphere-desktop package io.opensphere.csvcommon.detect.datetime.algorithm; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; import java.text.ParseException; import java.util.List; import java.util.Map; import org.junit.Test; import io.opensphere...
#!/bin/bash # # Copyright 2017 the Velero contributors. # # 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...
#!/usr/bin/env bash set -euo pipefail DIR="$(cd "$(dirname "${0}")/.." && pwd)" cd "${DIR}" check_env() { echo "Checking that ${1}=${2}" if [ "${!1}" != "${2}" ]; then echo "Expected '${1}' to be '${2}' but was '${!1}'" >&2 exit 1 fi } check_which() { check_command_output "${1}" command -v "$(basena...
#! /bin/sh filterfilelist() { grep -vE '(framebuffer_font|core/queue.h)' } lines() { filelist=$1 if [ -d "${filelist}" ]; then filelist=`makefilelist "${filelist}"` fi wc -l $filelist | sort -n | sed 's;total$;'"$1"' - &;' } makefilelist() { directory=$1 find "${directory}" -type f -name '*.[chS]' | filter...
package main import ( "encoding/json" "gitee.com/ddkwork/libraryGo/log" "gitee.com/ddkwork/libraryGo/net/clientAndServer/server" "net" ) type Login struct { head string Name string Password string } func main() { s := server.New() if !s.ListenAndServer(net.JoinHostPort("lo...
touch files.lock ./startVehicle
#!/bin/sh if [ "$#" = "0" ]; then echo "SINTAX: $0 <POLICY=IfNotPresent|Always>" exit 1 fi POLICY=$1 update_policy() { FILEPATH=$1 cat $FILEPATH | sed "s/imagePullPolicy: \w\+/imagePullPolicy: $POLICY/" > ./tmp mv ./tmp $FILEPATH } update_policy "hadoop_primary.yaml" update_policy "hadoop_worker_csd.yaml"...
import unittest from actors.actor_target import ActorTarget from actors.projectile import Projectile from world.area_builder import AreaBuilder class ProjectileCollisionTests(unittest.TestCase): def test_two_projectiles_destroy_each_other(self): key = "*" right_projectile = Projectile((-1, 0), k...
def reverse_words(sentence): word_list = sentence.split(" ") reversed_list = word_list[::-1] return " ".join(reversed_list) reversed_sentence = reverse_words("Hello world!") print(reversed_sentence)
<filename>src/icons/Info.tsx import * as React from 'react' const Info = props => ( <svg viewBox="0 0 512 512" {...props}> <circle cx={256} cy={378.5} r={25} /> <path d="M256 0C114.516 0 0 114.497 0 256c0 141.484 114.497 256 256 256 141.484 0 256-114.497 256-256C512 114.516 397.503 0 256 0zm0 472c-119.377 0-...
<filename>src/main/java/com/example/demo/controller/UserController.java package com.example.demo.controller; import com.example.demo.api.UserService; import com.example.demo.po.User; import com.example.demo.dto.UserDTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.Http...
function sortByProperty(arr, propertyName) { return arr.sort((a, b) => { if (a[propertyName] < b[propertyName]){ return -1 } else if (a[propertyName] > b[propertyName]){ return 1 } else { return 0 } }); } const sortedArray = so...
#!/bin/bash # Copyright 2019 Kyoto University (Hirofumi Inaguma) # Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) model= model1= model2= model3= model_bwd= gpu= stdout=false n_threads=1 ### path to save preproecssed data data=/n/work2/inaguma/corpus/tedlium2 unit= metric=edit_distance batch_size=1 beam_w...
package lifecycle import ( "context" "os" "github.com/go-logr/logr" "github.com/openshift/special-resource-operator/pkg/clients" "github.com/openshift/special-resource-operator/pkg/storage" "github.com/openshift/special-resource-operator/pkg/utils" appsv1 "k8s.io/api/apps/v1" v1 "k8s.io/api/core/v1" apierror...
#!/usr/bin/env sh # shellcheck disable=SC2005,2188 <<'COMMENT' cron: 16 */2 * * * new Env('签到依赖'); COMMENT . utils_env.sh get_some_path alpine_pkgs="bash curl gcc git jq libffi-dev make musl-dev openssl-dev perl perl-app-cpanminus perl-dev py3-pip python3 python3-dev wget" py_reqs="bs4 cryptography dateparser feedpa...
<reponame>ubuntudroid/Rialto package com.stylingandroid.rialto.app; import android.graphics.Typeface; import android.os.Bundle; import android.text.style.CharacterStyle; import android.text.style.StyleSpan; import android.text.style.UnderlineSpan; import android.widget.TextView; import com.stylingandroid.rialto.forma...
<reponame>DivyeshPadamani/Investmentclub import { Injectable } from '@angular/core'; import { Router, CanActivate } from '@angular/router'; import { UserService } from '../services/user.service'; import { Observable } from 'rxjs/Observable'; @Injectable() export class AuthenticationGuard implements CanActivate { c...
#!/usr/bin/env bash set -e PKGS=$(go list ./... | grep -v '/simapp' | grep -v '/cli_test') set -e echo "mode: atomic" > coverage.txt for pkg in ${PKGS[@]}; do go test -v -timeout 30m -race -coverprofile=profile.out -covermode=atomic -tags='ledger test_ledger_mock' "$pkg" if [ -f profile.out ]; then ta...
# $FreeBSD$ atf_test_case nominal nominal_head() { atf_set "descr" "Basic tests on timeout(1) utility" } nominal_body() { atf_check \ -o empty \ -e empty \ -s exit:0 \ timeout 5 true } atf_test_case time_unit time_unit_head() { atf_set "descr" "Test parsing the default time unit" } time_unit_body() { at...
import unittest import numpy as np from pymesh import generate_box_mesh from pymesh.wires import WireNetwork from pymesh.wires import Tiler from pymesh.wires import Parameters from WireTestCase import WireTestCase class TilerTest(WireTestCase): def test_tile_with_bbox(self): wire_network = self.g...
<gh_stars>10-100 package io.opensphere.core.dialog.alertviewer; import java.text.SimpleDateFormat; import java.util.Date; import io.opensphere.core.dialog.alertviewer.event.Type; import io.opensphere.core.util.DateTimeFormats; import net.jcip.annotations.Immutable; /** Alert bean. */ @Immutable class Alert { /**...
<filename>src/aiortc/codecs/keypointcodec.py import audioop import fractions import numpy as np import os from typing import List, Optional, Tuple from ..jitterbuffer import JitterFrame from .base import Decoder, Encoder from .keypoints_pb2 import KeypointInfo from ..mediastreams import KeypointsFrame SCALE_FACTOR =...
import random import pandas as pd import requests import us from can_tools.scrapers import variables from can_tools.scrapers.base import ALL_STATES_PLUS_TERRITORIES, CMU from can_tools.scrapers.official.base import FederalDashboard def _lookup(location): if location == "US": return 0 return int(us.s...
<filename>src/actions/place-on-triangle/PlaceOnTriangle.ts<gh_stars>10-100 import Phaser from 'phaser' export default class PlaceOnTriangle extends Phaser.Scene { preload() { this.load.image('ball','/assets/sprites/chunk.png') } create() { const triangle = this.createTriangle('right') var group = this.add...
#!/bin/bash # Are we running as root? if [[ $EUID -ne 0 ]]; then echo "This script must be run as root. Did you leave out sudo?" exit fi function getSelfSignSSL() { openssl genrsa -des3 -passout pass:test -out $DOMAIN.key 1024 echo "Create server certificate signing request..." SUBJECT="/C=US/ST=Mars...
<reponame>yichao0803/crthcrp package com.bjgoodwill.dao.base; import java.util.List; import org.apache.ibatis.annotations.Param; import com.bjgoodwill.entity.TStudent; /** * @author Zhangyichao */ public interface TStudentBaseMapper { int insertTStudent(TStudent object); int updateTStudent(TStudent object);...
#!/bin/bash -l #PBS -l walltime=23:59:00,nodes=1:ppn=24:gpus=2,mem=16gb #PBS -m abe #PBS -N 120018129_pgml_source #PBS -o 120018129_pgml_source.stdout #PBS -q k40 source takeme_source.sh source activate mtl_env python train_source_model.py 120018129
#!/bin/bash -e DIAGRAMS="data/dqa/diagrams.json" DIAGRAM_FEATURES="data/dqa/diagram_features_synthetic.json" OUT_DIR="experiments/dqa/output/" EXPERIMENT_NAME="distances_learned" EXPERIMENT_DIR="$OUT_DIR/$EXPERIMENT_NAME/" MATCHING_MODEL="$EXPERIMENT_DIR/matching_model.ser" INDEPENDENT_MODEL="$EXPERIMENT_DIR/indepen...
#! /usr/bin/env bash set -o errexit set -o nounset set -o pipefail readonly KUSTOMIZE_VERS="v3.8.6" readonly KUBECTL_VERS="v1.19.2" readonly KIND_VERS="v0.9.0" readonly INTEGRATION_TESTER_VERS="5.0.0" readonly PROGNAME=$(basename $0) readonly CURL=${CURL:-curl} # Google storage is case sensitive, so we we need to l...
// Set up Google Maps var map; var numTracks = 0; var numRoutes = 0; // http://en.wikipedia.org/wiki/Web_colors var strokeColors = [ '#ff0000', // red '#00ff00', // lime '#0000ff', // blue '#800000', // maroon '#000000', // black '#800080', // purple '#ff00ff', // fuchsia '#808000', // ...
#!/bin/bash DIR="$(dirname "$(readlink -f "$0")")" # Set common options for our export SAMPLE_DIR=samples/net/sockets/echo_server export PATCHES="${PATCHES:-} ieee802154_rf2xx_size_check.patch wdt_sam_watchdog_callback_check.patch" export OVERLAYS=overlay-802154.conf export EXTRA_DEFINES="-DCONFIG_SHELL=n -DCONFIG_NE...
import { Observable } from 'rxjs'; import { FullAppData } from '@openchannel/angular-common-components/src/lib/common-components'; export abstract class AppsSearchService { abstract loadDefaultApps(existsAppIDs: string[]): Observable<FullAppData[]>; abstract appsSearch(existsAppIDs: FullAppData[], searchText: ...
// // Ryu // // Copyright (C) 2017 <NAME> // All Rights Reserved. // // See the LICENSE file for details about the license covering // this source code file. // #include "rect.h" namespace ryu::core { rect::rect( int32_t left, int32_t top, int32_t width, int32_t he...
if [ $(gitflow_count_commit_files js) -eq 0 ] ; then return 0 fi JSHINT="jshint" h1 "JSHint module" ERROR=0 for file in $(gitflow_commit_files js); do if $JSHINT --config="$HOOKS_DIR"/jshint.json $file 2>&1 | grep 'error' >/dev/null ; then gitflow_fail $file $JSHINT --config="$HOOKS_DIR"/jshint....
<reponame>nartc/tnc<filename>src/layouts/index.tsx import CssBaseline from "@material-ui/core/CssBaseline"; import { ThemeProvider } from "@material-ui/core/styles"; import { ReplaceComponentRendererArgs } from "gatsby"; import React, { FC, ReactElement, useMemo } from "react"; import Togglers from "../components/toggl...
import os from dotenv import load_dotenv import requests class WeatherFetcher: def __init__(self, city): self.city = city def fetch_weather(self): load_dotenv() # Load environment variables from .env file api_key = os.getenv("OPENWEATHERMAP_API_KEY") # Retrieve API key from environme...
<reponame>dubizzle/helios<gh_stars>0 /* * Copyright (c) 2014 Spotify AB. * * 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 fil...
/* * 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 may ...
<gh_stars>0 package ltd.dolink.arch.treenode; import androidx.annotation.IntRange; import androidx.annotation.NonNull; import java.util.LinkedList; import java.util.List; import java.util.Objects; public class SimpleTreeNode<T extends Expandable & Selectable> implements TreeNode<T> { @IntRange(from = 0) private ...
document.getElementById('content')!.innerHTML = ` Hello World `;
<gh_stars>0 import { arrayByClass } from '../shared/helpers.mjs'; // Switches let switches = arrayByClass('switch'); switches.map(switchEl => { switchEl.addEventListener('click', (e) => { e.currentTarget.classList.toggle('off'); }); });
#!/bin/bash # Copyright (c) 2020 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. # SPDX-License-Identifier: Apache-2.0 source env.sh docker-compose exec daml-testnode sh -c "cd /data; ./test-all.sh > logs/test-all.log" docker cp data-uploader:/data/logs .
#!/usr/bin/env bash set -euo pipefail # Slashing tests # For testing a particular branch of Geth repo (usually, on Circle CI) # Usage: ci_test_exit.sh checkout <branch_of_geth_repo_to_test> # For testing the local Geth dir (usually, for manual testing) # Usage: ci_test_exit.sh local <location_of_local_geth_dir> expo...
echo $AGENT_BUILDDIRECTORY SDX_PATH=$AGENT_BUILDDIRECTORY/sdx echo $SDX_PATH rm -rf $SDX_PATH git -c http.https://office.visualstudio.com.extraheader="AUTHORIZATION: bearer $SYSTEM_ACCESSTOKEN" clone https://office.visualstudio.com/ISS/_git/sdx-platform $SDX_PATH
<reponame>indragiek/WWDC-2014 // // INDAboutViewController.h // <NAME> // // Created by <NAME> on 2014-04-09. // Copyright (c) 2014 <NAME>. All rights reserved. // #import "INDStaticCollectionViewController.h" /** * View controller for the about view. */ @interface INDAboutViewController : INDStaticCollectionV...
#!/bin/bash function show_help_and_exit() { echo "Usage ${SCRIPT} [options]" echo " options with (*) must be provided" echo " -h -? : get this help" echo " -a <True|False>: specify if autu-recover is allowed (default: True)" echo " -b <master_id> : specify name of k8s master gr...
<gh_stars>1-10 var Boom = require('boom'); var Hapi = require('hapi'); module.exports = function() { var server = new Hapi.Server({ debug: false }); server.connection({ host: 'localhost', port: 3232 }); server.route([ { method: 'POST', path: '/api/v2/user/verify-password', handle...
<filename>src/Components/DashboardCompanyProfileCompletion.js import React from "react"; import { Link } from "@reach/router"; import { X } from "react-feather"; export default function DashboardCompanyProfileCompletion({ profilePercentage, }) { return ( <div className="dashboard__company__container__top"> ...
package config import ( "bytes" "errors" "net" "os" "strings" "testing" "time" "encoding/json" "github.com/eugene-fedorenko/prebid-server/openrtb_ext" "github.com/spf13/viper" "github.com/stretchr/testify/assert" ) func TestExternalCacheURLValidate(t *testing.T) { testCases := []struct { desc str...
# SubServers Library Patcher # # Can be used to combine the following into one jar file: # -> BungeeCord and SubServers.Bungee # -> BungeeCord and SubServers.Sync # -> GalaxiEngine and SubServers.Host # # Usage: "bash SubServers.Patcher.sh <Platform.jar> <SubServers.jar>" # #!/usr/bin/env bash if [ -z "$1" ] then ...
/* * Creating a KVM-based VM basically needs 7 steps: * * 1. Open the KVM device, `kvmfd=open("/dev/kvm", O_RDWR|O_CLOEXEC)` * 2. Do create a VM, `vmfd=ioctl(kvmfd, KVM_CREATE_VM, 0)` * 3. Set up memory for VM guest, `ioctl(vmfd, KVM_SET_USER_MEMORY_REGION, &region)` * 4. Create a virtual CPU for the VM, `vcpufd...
<filename>src/app/admin/root/components/admin-nav-item/admin-nav-item.component.ts import { Component, Input, Output, EventEmitter, OnInit } from '@angular/core'; @Component({ selector: 'admin-nav-item', templateUrl: './admin-nav-item.component.html', styleUrls: ['./admin-nav-item.component.scss'] }) export clas...
<filename>isomorfeus-i18n/lib/lucid_translation/mixin.rb module LucidTranslation module Mixin CONTEXT_SEPARATOR = "\004" NAMESPACE_SEPARATOR = '|' NIL_BLOCK = -> { nil } TRANSLATION_METHODS = [:_, :n_, :np_, :ns_, :p_, :s_] if RUBY_ENGINE != 'opal' class InternalTranslationProxy ext...
/* Copyright 2009-2015 <NAME> * * This file is part of the MOEA Framework. * * The MOEA Framework is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or (at your...
import junit.framework.*; public class testEvenOdd extends TestCase { public static void main(String[] args) { junit.textui.TestRunner.run(testEvenOdd.class); } public void testgetdata() { EvenOdd d1 = new EvenOdd(); d1.getdata(); assertEquals(2, d1.y);...
// Define the RemoteIdentityType enum public enum RemoteIdentityType { User, Service } // Implement the RemoteServiceInfo class public class RemoteServiceInfo { public RemoteIdentityType IdentityType { get; } public Uri SubscriptionId { get; } // Constructor to initialize the properties public...
class Translator: def detect(self, text): # Placeholder implementation of language detection # Replace this with actual language detection logic return "en" # Assuming English as the detected language for demonstration purposes def translate(self, text, dest): # Placeholder imp...
#!/bin/bash dieharder -d 202 -g 206 -S 2284807359
#!/usr/bin/env bash set -e aws --profile muumuus s3 sync --delete _site/ s3://muumu.us
#!/bin/bash set -e export MVK_PROD_NAME="MoltenVK" export MVK_PROD_PROJ_PATH="${PROJECT_DIR}/${MVK_PROD_NAME}" export MVK_PKG_PROD_PATH="${PROJECT_DIR}/Package/${CONFIGURATION}/${MVK_PROD_NAME}" export MVK_PKG_PROD_PATH_OS="${MVK_PKG_PROD_PATH}/${MVK_OS}" rm -rf "${MVK_PKG_PROD_PATH_OS}" mkdir -p "${MVK_PKG_PROD_PA...
def find_max(arr): max_elements = [] max_val = max(arr) for i in arr: if i == max_val: max_elements.append(i) return max_elements
#!/bin/bash cd davis2017-evaluation/ rm results/semi-supervised/osvos/*results-val.csv python evaluation_method.py --davis_path ../data_storage/DAVIS --results_path results/semi-supervised/osvos --task semi-supervised
let nums = [1,2,3,4,5]; let sum = 0; nums.forEach(function(num){ sum += num; }); let avg = sum / nums.length; console.log(avg);
/* Package middleware provides shared middleware that is used in HTTP services. */ package middleware import ( "fmt" "net/http" ) // CORS handling middleware type CorsHandler struct { corsHostAndPort string delegate http.Handler } // Construct a new CORS handler. // // corsHostAndPort is a string represe...
<gh_stars>10-100 window.$ = window.jQuery = require("jquery"); const io = require("socket.io-client"); const client = require("./src/game-client"); function run(flag) { client.renderer = flag ? require("./src/mode/god") : require("./src/mode/player"); client.connectGame("//" + location.host, $("#name").val(), (succe...
<gh_stars>0 import React, { PropTypes} from 'react'; function Row({className, children}) { const cssName = className ? 'rows ' + className : 'rows'; return ( <div className={cssName}> {children} </div> ); } Row.propTypes = { className: PropTypes.string, children: PropTypes.node, }; Row.de...
<reponame>koushikan/engine var ResetPhysics = pc.createScript('resetPhysics'); // initialize code called once per entity ResetPhysics.prototype.postInitialize = function () { // Record the start state of all dynamic rigid bodies this.bodies = []; this.app.root.findComponents('rigidbody').forEach(function (...
<gh_stars>0 import styled from 'styled-components'; import breakpoints, { pageGutter } from 'components/core/breakpoints'; // mimics a navbar element on the top left corner const StyledBackLink = styled.div` height: 80px; display: flex; align-items: center; position: absolute; left: 0; top: 0; z-index: ...
""" Module for defining user related models. """ from datetime import datetime from sqlalchemy import Column, Integer, String, DateTime, Float from sqlalchemy.orm import relationship from utils import get_logger from models import Base LOGGER = get_logger(__name__) class User(Base): """ Table for tracking the...
#!/bin/bash # ========== Experiment Seq. Idx. 174 / 43.3 / N. 35/2 - _S=43.3 D1_N=35 a=1 b=1 c=1 d=-1 e=-1 f=-1 D3_N=2 g=-1 h=1 i=-1 ========== set -u # Prints header echo -e '\n\n========== Experiment Seq. Idx. 174 / 43.3 / N. 35/2 - _S=43.3 D1_N=35 a=1 b=1 c=1 d=-1 e=-1 f=-1 D3_N=2 g=-1 h=1 i=-1 ==========\n\n' if...
<filename>yoga-business/yoga-weixinapp/src/main/java/com/yoga/weixinapp/service/WxmpUserService.java package com.yoga.weixinapp.service; import com.yoga.core.base.BaseService; import com.yoga.core.exception.BusinessException; import com.yoga.core.mybatis.MapperQuery; import com.yoga.core.utils.StringUtil; import com.y...
<gh_stars>0 var classarmnn_1_1profiling_1_1_test_profiling_connection_armnn_error = [ [ "TestProfilingConnectionArmnnError", "classarmnn_1_1profiling_1_1_test_profiling_connection_armnn_error.xhtml#ac78cdd7a5d1ea251e57140b6935aec01", null ], [ "ReadCalledCount", "classarmnn_1_1profiling_1_1_test_profiling_conne...
<gh_stars>1-10 /** * @module React */ import React from 'react' import { Link } from 'react-router-dom' import Icon from 'components/icon' import AccountDropdown from 'components/account/AccountDropdown' import TextCtaButton from 'components/buttons/TextCtaButton' import FadeIn from 'components/animation/FadeIn...
<reponame>seawindnick/javaFamily package leetCode;//Trie(发音类似 "try")或者说 前缀树 是一种树形数据结构, // 用于高效地存储和检索字符串数据集中的键。这一数据结构有相当多的应用情景,例如自动补完和拼 //写检查。 // // 请你实现 Trie 类: // // // Trie() 初始化前缀树对象。 // void insert(String word) 向前缀树中插入字符串 word 。 // boolean search(String word) 如果字符串 word 在前缀树中,返回 true(即,在检索之前已经插入);否则,返回 false // 。 /...
<reponame>CamilYed/readable-tests-by-example package tech.allegro.blog.vinyl.shop.delivery.domain; import lombok.AccessLevel; import lombok.RequiredArgsConstructor; import tech.allegro.blog.vinyl.shop.client.domain.ClientReputation; import tech.allegro.blog.vinyl.shop.common.money.Money; import tech.allegro.blog.vinyl...
local _namespaces=( core ) if ! $_core_files_only && [[ "${#_orb_extensions[@]}" != 0 ]]; then _collect_namespace_extensions fi local _current_namespace; _current_namespace=$(_get_current_namespace "$@") && shift local _function_name=$1; shift local _function_descriptor=$(_get_function_descriptor) local _namespace...
import { isEqual, debounce } from './utils'; interface Props { key?: string, } export interface MyElement<P = {}> { type: string | FC, key: string | null, props: Props & P, children: MyChildren[], } type MyNode = string | number | boolean | null | undefined | MyElement; export type MyChildren = MyNode | Ar...
<filename>resources/assets/js/common/requests/UserRequest.js import BaseModelRequest from '../lib/BaseModelRequest'; export default class UserRequest extends BaseModelRequest { getModelName() { return 'users' } login(params) { let passport = { grant_type: 'password', client_id: process.env.M...
<reponame>acouvreur/skeleton-generator package org.sklsft.generator.repository.build; public interface Command { void execute(); }
<gh_stars>1-10 const mongoose = require('mongoose'); const Schema = mongoose.Schema; /** * Animal schema for crud functions on DB */ let Animal = new Schema({ nombre: { type: String, required: 'El nombre es requerido' }, sexo: { type: String, required: 'El sexo es requerido'}, promedioEdad: { type: Number }, ...
<filename>SciHive Source Code (Client)/www/games/candylandia/table.js /* This script will construct a table and linked to index.html */ //DEFAULT_BOARD_SIZE = 8; var img_array =[]; function lookupLetter(num) { var letterArr = ["a","b","c","d","e","f","g","h"]; return letterArr[--num]; } function colorTabl...
/*! * Fundament framework v0.4.0 * * https://getfundament.com * * @license MIT * @author <NAME> and The Fundament Authors */ window.requestAnimationFrame=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFram...
# == Route Map (Updated 2014-03-19 09:47) # # Prefix Verb URI Pattern Controller#Action # notifications GET /notifications(.:format) notifica...
#!/bin/bash -eE # (C) Sergey Tyurin 2020-03-15 13:00:00 # Disclaimer ################################################################################################################## # You running this script/function means you will not blame the author(s) # if this breaks your stuff. This script/function is provid...