text
stringlengths
1
1.05M
package io.sniffy.influxdb.lineprotocol; import org.junit.Test; import static org.junit.Assert.*; public class FieldIntegerValueTest { @Test public void testAsBoolean() { assertTrue(new FieldIntegerValue(1).asBoolean()); assertFalse(new FieldIntegerValue(0).asBoolean()); } @Test ...
package com.copperware; import java.util.Date; public class Race { Driver winner; Map map; Kart karts[]; Date start; Date end; public void startRace() { } }
import { Module } from '@nestjs/common'; import { JwtModule } from '@nestjs/jwt'; import { JwtConfiguartionService } from './jwt-configuartion.service'; import { JwtGuard } from './guard/jwt.guard'; import { JwtStrategy } from './strategy/jwt.strategy'; import { RoleGuard } from './guard/role.guard'; @Module({ impo...
<reponame>dreamncn/time $(document).ready(function () { if (themeConfig.fancybox.enable) { Theme.fancybox.register(); } Theme.backToTop.register(); });
<filename>snail/src/main/java/com/acgist/snail/net/torrent/peer/PeerUploaderGroup.java package com.acgist.snail.net.torrent.peer; import java.util.concurrent.BlockingQueue; import java.util.concurrent.LinkedBlockingQueue; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.acgist.snail.config.PeerCon...
<reponame>raminious/valeedator<gh_stars>0 const assert = require('assert') const validate = function(field, value, options) { assert(typeof value === 'number', `${field} is not number`) if (typeof options.min !== 'undefined') { assert(value >= options.min, `${field} must greater than ${options.min}`) } i...
<gh_stars>0 exports.seed = function(knex) { return knex("ingredients") .truncate() .then(() => { return knex("ingredients").insert([ { ingredient_name: "tomatoes" }, { ingredient_name: "milk" }, { ingredient_name: "cheese" } ]); }); };
<filename>dbflute-runtime/src/main/java/org/dbflute/jdbc/ExecutionTimeInfo.java /* * 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 ...
[[ -s $HOME/.rvm/scripts/rvm]] && source $HOME/.rvm/scripts/rvm
def my_sqrt(x): # Setting the initial guess as x/2 current = x/2 # Running the loop until the accuracy is 3 decimal points while abs(current * current - x) > 0.001: current = 0.5 * (current + x/current) return current # Driver code print(my_sqrt(4))
<filename>src/widgets/subs.ts import { Subscription } from '../types/subscription'; import { Config } from '../types/config'; import { WidgetData } from '../types/widgetData'; import { getNormalizedValues, startTask, stopTask } from '../utils'; const io = require("socket.io/client-dist/socket.io.min"); // use socket.i...
public class RandomNumber { public static int generateRandomNumber() { Random rand = new Random(); return rand.nextInt(15) + 10; } }
#!/bin/bash TOPDIR=${TOPDIR:-$(git rev-parse --show-toplevel)} SRCDIR=${SRCDIR:-$TOPDIR/src} MANDIR=${MANDIR:-$TOPDIR/doc/man} DalcoinD=${DalcoinD:-$SRCDIR/Dalcoind} DalcoinCLI=${DalcoinCLI:-$SRCDIR/Dalcoin-cli} DalcoinTX=${DalcoinTX:-$SRCDIR/Dalcoin-tx} DalcoinQT=${DalcoinQT:-$SRCDIR/qt/Dalcoin-qt} [ ! -x $DalcoinD...
package org.jaudiotagger.audio.asf.tag; import junit.framework.TestCase; import org.jaudiotagger.tag.asf.AsfTagCoverField; /** * Tests basic behavior of {@link AsfTagCoverField}. * <p/> * Date: 10/19/12 * * @author <a href="mailto:<EMAIL>"><NAME></a> */ public class AsfTagCoverFieldTest extends Test...
#! /bin/sh ############################################################################# ## ## Copyright (C) 2015 The Qt Company Ltd. ## Contact: http://www.qt.io/licensing/ ## ## This file is the build configuration utility of the Qt Toolkit. ## ## $QT_BEGIN_LICENSE:LGPL21$ ## Commercial License Usage ## Licensees ho...
#!/usr/bin/env bash # Copyright 2009 The Go Authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. # This script runs or (given -n) prints suggested commands to generate files for # the Architecture/OS specified by the GOARCH and GOOS e...
// MovingBox class class MovingBox { private double x, y; // position private double vx, vy; // velocity public MovingBox() { // initialize position and velocity } public void updatePosition(List<Attractor> attractors) { // Update position based on attraction to the attractors ...
<gh_stars>10-100 /******************************************************************************* * This file is part of the Symfony eclipse plugin. * * (c) <NAME> <<EMAIL>> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. **********...
<gh_stars>0 import { NgModule } from '@angular/core'; import { RouterModule } from '@angular/router'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { CommonModule } from '@angular/common'; import { NEW_LEAGUE_COMPONENTS } from './new'; import { EDIT_LEAGUE_COMPONENTS } from './edit'; impor...
<gh_stars>1-10 package jenkinsci import ( // "io/ioutil" // "crypto/tls" // "crypto/x509" // "net/http" jenkins "github.com/DanielMabbett/gojenkins" ) // Config is the set of parameters needed to configure the JenkinsCI provider. type Config struct { jenkinsEndpoint string jenkinsAdminUsername string jen...
import React from "react"; import { useState } from "react"; const JobsContext = React.createContext(); function JobsContextProvider(props) { const [search, setSearch] = useState(""); const [selectedFilters, setSelectedFilters] = useState({ job_type: [], department: [], work_schedule: [], experien...
#!/bin/bash # Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights # reserved. Use of this source code is governed by a BSD-style license # that can be found in the LICENSE file. cd .. if [ -z "$1" ]; then echo "ERROR: Please specify a target platform: linux32 or linux64" else if [ -z "$2" ]; th...
#!/bin/sh -v KEYFILE="home/ubuntu/.ssh/kube_aws_rsa" NODEIP=$1 # run init on master ssh -o StrictHostKeyChecking=no -i $HOME/.ssh/kube_aws_rsa ubuntu@$NODEIP sudo `cat join.cmd` > kubeadm-$NODEIP.log exit 0
<gh_stars>1-10 import { css, StyleSheet } from 'aphrodite' import * as React from 'react' import CircularButton from './CircularButton' const styles = StyleSheet.create({ separatorVContainer: { display: 'flex', flexDirection: 'column', justifyContent: 'center', width: 44, p...
#!/bin/sh echo "WARNING: DELETING SUBVERSION FILES" sleep 10 rm -fr `find . -name .svn -type d` rm -fv `find . -size +1M`
/* * Copyright (c) 2018 https://www.reactivedesignpatterns.com/ * * Copyright (c) 2018 https://rdp.reactiveplatform.xyz/ * */ public class SequentialExecution { public static class ReplyA {} public static class ReplyB {} public static class ReplyC {} public static class Result { final ReplyA replyA...
<filename>enrichment-coordinator-service/src/main/java/org/oransc/enrichment/repository/EiType.java /*- * ========================LICENSE_START================================= * O-RAN-SC * %% * Copyright (C) 2019 Nordix Foundation * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may ...
#!/bin/bash # 1g20 is as 1g but adding the option "--constrained false" to --egs.opts. # This is the new 'unconstrained egs' code where it uses the e2e examples. # # local/chain/compare_wer.sh exp/chain/tdnn1g_sp exp/chain/tdnn1g20_sp # System tdnn1g_sp tdnn1g20_sp #WER dev_clean_2 (tgsmall) 13.5...
package app.habitzl.elasticsearch.status.monitor.tool.client; import app.habitzl.elasticsearch.status.monitor.tool.analysis.ElasticsearchClient; import app.habitzl.elasticsearch.status.monitor.tool.client.connection.MonitoringRestClient; import app.habitzl.elasticsearch.status.monitor.tool.client.data.cluster.ClusterI...
import asyncio async def process_message(base_url, message): chat_id = message['chat_id'] text = message['text'] await send_message(base_url, chat_id, text) # Example usage async def main(): base_url = 'https://api.example.com' offset = 0 updates = await get_updates(base_url, offset) for u...
EMBED_SIZE=273 HIDDEN_SIZE=273 CHECKPOINT_PATH=checkpoints/lstm_all_dim_273_share_all python train.py temp_single_vocab/bpe_single_dict/bin \ --save-dir $CHECKPOINT_PATH --arch lstm \ --dropout 0.2 \ --optimizer adam --lr 0.005 --lr-shrink 0.5 \ --max-tokens 8000 --task translation \ --bpe subwor...
package m.co.rh.id.anavigator; import android.app.Activity; import android.os.Handler; import android.os.Looper; import android.view.View; import android.view.animation.AlphaAnimation; import android.view.animation.Animation; import android.view.animation.AnimationSet; import android.view.animation.DecelerateInterpol...
def fibonacci(n): if n == 0: return 0 elif n == 1: return 1 else: return fibonacci(n-1) + fibonacci(n-2) n = 7 print("The Fibonacci number for n =", n ,"is:", fibonacci(n))
<reponame>mhs1314/allPay<gh_stars>0 package com.qht.services; import com.qht.RequestObject; import com.qht.ResultObject; import com.qht.dto.*; import org.springframework.web.bind.annotation.RequestBody; import java.util.List; /** * 课程答疑 * * @author yangtonggan * @email <EMAIL> * @date 2018-11-05 18:55:41 */ ...
<gh_stars>1-10 // Copyright 2020 <NAME> and <NAME> #pragma once #include <random> #include <vector> #include "universe.hpp" #include "observable.hpp" class Simulation { public: static double lambda; static void start(int sweeps, double lambda_, int targetVolume_, int seed = 0); static void addObservable(Observab...
/* Project Euler: Problem 76: Counting summations It is possible to write five as a sum in exactly six different ways: 4 + 1 3 + 2 3 + 1 + 1 2 + 2 + 1 2 + 1 + 1 + 1 1 + 1 + 1 + 1 + 1 How many different ways can one hundred be written as a sum of at least two positive integers? */ function countingSummations() { // ...
#include <iostream> #include <string> class ConfigAndLogger { private: // Configuration settings // Assume configAndLogger is an object that contains configuration settings // Example: configAndLogger.configSetting1, configAndLogger.configSetting2, etc. // Logger settings // Assume configAndLo...
<gh_stars>100-1000 /* * Copyright (c) 2020 - 2021 Legacy Fabric * Copyright (c) 2016 - 2021 FabricMC * * 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/lice...
<gh_stars>1-10 /** * The MIT License * Copyright (c) 2014 <NAME> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use...
package com.datasift.client.pylon; import com.fasterxml.jackson.annotation.JsonProperty; public class PylonResultAnalysis { @JsonProperty("analysis_type") protected String analysisType; @JsonProperty protected PylonParametersData parameters; @JsonProperty("results") protected PylonResultEntryL...
<reponame>anchorchat/anchor-ui<gh_stars>10-100 import isFinite from 'lodash/isFinite'; import colors from '../settings/colors'; import combineStyles from '../internal/combine-styles'; import styles from './styles'; const root = (overrideStyle, disabled) => { let style = styles.root; if (disabled) { style = co...
<gh_stars>0 function neuChartSigmaVisibility(){ if($('#btnSigma').html() == "Hide sigma"){ if(window.chart.series[0].visible){ window.chart.series[1].show(); } // if(window.chart.series[2].visible){ // window.chart.series[3].show(); // } // if(window.c...
const evaluate = (node) => { // Base case if (!node.left && !node.right) { return node.val; } // Recursive case let l = evaluate(node.left); let r = evaluate(node.right); switch (node.val) { case '+': return l + r; case '-': return l - r; case '*': return l * r; cas...
package net.nokok.testdata; public interface Repository { String getUrl(); }
def fibonacci(n): fibo = [0, 1] if n<0: print("Incorrect input") elif n<=len(fibo): return fibo[n-1] else: temp_fibo = fibo[-1] + fibo[-2] for i in range(2,n): fibo.append(temp_fibo) temp_fibo = fibo[-1] + fibo[-2] return temp_fi...
#! /bin/bash # WORKDIR /usr/local/ cd ./CAPI i=1 flag=1 while (( $i <= 4 )) do cp -f ../mnt/player$i.cpp ./API/src mv ./API/src/player$i.cpp ./API/src/AI.cpp cmake ./CMakeLists.txt && make >build.log 2>&1 mv ./build.log ../mnt/build_log$i && mv ./capi ../mnt/capi$i if [ $? -ne 0 ]; then fla...
<gh_stars>0 import { getInput } from './utils'; const commands = getInput(2) .split('\n') .map(l => { const [direction, value] = l.split(' '); return { direction, value: parseInt(value), }; }); let horiz = 0; let depth1 = 0; let depth2 = 0; let aim = 0; commands.forEach(({ direction, va...
<gh_stars>0 package ca.damocles.Items.Factories; import org.bukkit.Material; import org.bukkit.inventory.ItemFlag; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.Damageable; import org.bukkit.inventory.meta.ItemMeta; import ca.damocles.Items.ItemType; import ca.damocles.Items.Types.Armor; imp...
function longestCommonSubstring(string1, string2) { let common = ''; let start = 0; while (start < string1.length) { let i = start; let j = 0; let substring = ''; while (i < string1.length && j < string2.length) { if (string1[i] === string2[j]) { substring += string1[i]; i++; j++; } else { if (substring....
from typing import List, Tuple import os def traverse_directory(directory_path: str) -> Tuple[List[str], int]: file_list = [] total_size = 0 for root, dirs, files in os.walk(directory_path): for file in files: file_path = os.path.join(root, file) file_list.append(file_path) ...
# Data cleaning and outliers detecting def detect_outliers(data): # Obtain basic statistics quartiles = np.percentile(data, [25, 50, 75]) lower_quartile, median, upper_quartile = quartiles iqr = upper_quartile - lower_quartile lower_inner_fence = lower_quartile - (1.5 * iqr) upper_inner_fence ...
<gh_stars>10-100 /* * File : main.c * This file is part of RT-Thread RTOS * COPYRIGHT (C) 2017, RT-Thread Development Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either...
#ifdef MRT gl_FragData[0] = vec4(emission.rgb + diffuse, alpha); gl_FragData[1] = vec4(specular, material.metallic); gl_FragData[2] = vec4(normalize(fragment.normal) * 0.5 + 0.5, material.roughness); #ifdef SUBSURFACE gl_FragData[3] = subsurface; #endif #else gl_FragColor = vec4(emission.rgb + diff...
// Copyright (C) (See commit logs on github.com/robhz786/strf) // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #include <strf/to_string.hpp> namespace xxx { template <typename T> struct base { base(con...
import React from 'react'; import { shallowWithTheme } from '../util-test'; import Card from './Card'; describe('<Card />', () => { test('rendering', () => { const wrapper = shallowWithTheme( <Card> <p id="t1">Test</p> </Card> ); const classes = wrap...
import React from 'react'; import {connect} from 'react-redux'; import {EditorModal} from "../../dumb/editor/EditorModal"; import {getCustomFieldEditorFormValidationResult, getCustomFieldEditorState, getTaskEditorState} from "../../selectors/ui"; import {CustomFieldEditorContent} from "./CustomFieldEditorContent"; impo...
const winston = require('winston') module.exports = winston.createLogger({ transports: [ new winston.transports.Console({ level: process.env.NODE_ENV === 'test' ? 'error' : 'info' }) ], format: winston.format.simple() })
<gh_stars>0 /** * 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, software...
def add_component_to_masters(glyph_name, component_name, position): for idx, master in enumerate(font.masters): comp_name = component_name.upper() component = GSComponent(comp_name, position) font.glyphs[glyph_name].components.append(component) return font
#!/bin/bash mkdir -p /var/backups/stockdb if [ -x /usr/bin/stockdb ]; then DATE=$(date +%Y-%m-%d-%H%M%S) UF=/var/backups/stockdb/$DATE-userdata.json.xz sudo -u stockdb bash -c "stockdb export" | xz -z > $UF chmod 777 $UF echo "Exported database to $UF" DF=/var/backups/stockdb/$DATE-prices.json.xz sudo ...
name = input('What is your name? ') print(f'Hello {name}!')
IP=$(hostname -I | awk -F' ' '{print $2}') REVERSE_NAME=$(dig -x $IP +short | sed 's/\.[^\.]*$//') echo $IP | grep -q ':' && SERVER6=$(grep : /etc/resolv.conf | grep -v fe80 | cut -d" " -f2) && REVERSE_NAME=$(dig -6x $IP +short @$SERVER6 | sed 's/\.[^\.]*$//') REGISTRY_NAME=${REVERSE_NAME:-$(hostname -f)} REGISTRY=$REG...
#!/usr/bin/env bash # Copyright 2021 Adevinta docker-compose kill docker-compose rm -f
<reponame>alairjt/modular-pkg-1 /** * Simulate 3rd party */ define(['app', 'regServices', 'test/unit/factory/utestProvider' ], function (app, regServices, unitestFactory) { console.log("* Running regServices.spec.js"); unitestFactory(regServices); });
<reponame>holt/syringe-todos<filename>lib/syringe/syringe.mixins.js // > http://syringejs.org // > syringe.mixins.js v0.0.2. Copyright (c) 2013 <NAME> // > holt.org. Distributed under the MIT License /* jshint forin:true, noarg:true, noempty:true, eqeqeq:true, bitwise:false, strict:true, undef:true, unused:true, curly:...
<filename>Source/GeneratedServices/CloudPrivateCatalogProducer/GTLRCloudPrivateCatalogProducerQuery.h // NOTE: This file was generated by the ServiceGenerator. // ---------------------------------------------------------------------------- // API: // Cloud Private Catalog Producer API (cloudprivatecatalogproducer/v1...
def remove_key_values(dictionary: dict, keys: list) -> dict: """ Removes specified key-value pairs from a dictionary Args: dictionary: Input dictionary keys: List of keys to be removed Returns: Modified dictionary with specified key-value pairs removed """ for key in keys: di...
require_relative 'point' module Geometry =begin rdoc An object repesenting a zero {Size} in N-dimensional space A {SizeZero} object is a {Size} that will always compare equal to zero and unequal to everything else, regardless of dimensionality. You can think of it as an application of the {http://en.wikipedia.org/wik...
<gh_stars>100-1000 # -*- test-case-name: vumi.demos.tests.test_static_reply -*- from datetime import date from twisted.internet.defer import succeed, inlineCallbacks from vumi.application import ApplicationWorker from vumi.config import ConfigText class StaticReplyConfig(ApplicationWorker.CONFIG_CLASS): reply_t...
const express = require('express'); const app = express(); const bodyParser = require('body-parser'); app.use(bodyParser.json()); let books = require('./books.json'); app.post('/books', (req, res) => { let book = req.body; books.push(book); res.send({ message: 'Book added successfully', book }); })...
<reponame>Plutoz01/price-depo-ui<gh_stars>0 import { createFeatureSelector, createSelector } from '@ngrx/store'; import { AdminState } from './admin.state'; export const getAdminAppStateSelector = createFeatureSelector( 'app' ); export const getManufacturerMasterDetailsStateSelector = createSelector( getAdminAppState...
<gh_stars>0 import { createReducer, on } from '@ngrx/store'; import { ConditionSummaryActions as conditionSummary } from '../actions'; import { ConditionLists } from '../../generated-data-api'; export const conditionsSummaryFeatureKey = 'conditionsSummary'; export interface State { conditionsSummary: ConditionLis...
dataset=Weibo model=BiAttEncoder # PostEncoder | BiAttEncoder wb_data_tag=Weibo_src50_conv100_tgt10_v50000 tw_data_tag=Twitter_src35_conv100_tgt10_v30000 is_copyrnn=false emb_size=200 seed=23 special='' if [[ $dataset =~ 'Weibo' ]] then data_tag=$wb_data_tag elif [[ $dataset =~ 'Twitter' ]] then data_tag=$tw_...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Chart = void 0; var tslib_1 = require("tslib"); var chart_1 = tslib_1.__importDefault(require("./chart/chart")); exports.Chart = chart_1.default; //# sourceMappingURL=api.js.map
#!/bin/bash ../jeus8/bin/stopNodeManager -host localhost -port 7730 ../jeus8/bin/stopServer -host localhost:19736 -u jeus -p jeus ../jeus8/bin/stopServer -host localhost:9736 -u jeus -p jeus
#!/bin/bash #Get the agents names from docker (container id is the agent name) agents=$(sudo docker ps -a |grep aws | awk '{ print $1 }') #Loop to Delete agent from team city for agent in $agents do #Stop and remove container sudo docker start $agent done
fn multmodp(a: u64, b: u64) -> u64 { const P: u64 = 1_000_000_007; // Replace with the actual prime number ((a % P) * (b % P)) % P } fn modular_exponentiation(base: u64, exponent: u64) -> u64 { const COMBINE_TABLE: [u64; 32] = [/* Populate with precomputed values */]; let mut xp = 1; let mut k = 0;...
export enum Type { STOCK = 'stock', ETF = 'ETF', REAL_ESTATE_INVESTIMENT_FUND = 'real estate investiment fund', STOCK_INVESTIMENT_FUND = 'stock investiment fund', CRYPTOCURRENCY = 'cryptocurrency' }
package spring_data.game_store.domain.enumeration; public enum Role { BASIC_USER, ADMINISTRATOR }
/** * 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...
def reverse_array(array): reversed_array = array[::-1] return reversed_array
#!/usr/bin/env node /***************************************************************************** * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * * * Licensed under the Apache License, Version 2.0 (the "Lice...
SELECT name, company FROM customers ORDER BY DATE(date_created) ASC LIMIT 1;
for (int i = 1; i <= 10; i++) { Console.Write(i); Console.Write(" "); } Console.WriteLine();
<gh_stars>1-10 import builder from 'focus-core/util/url/builder'; import {apiRoot} from './index'; const movieRoot = `${apiRoot}movies/`; export default { create: builder(movieRoot, 'POST'), casting: builder(movieRoot + '${id}/casting', 'GET'), load: builder(movieRoot + '${id}', 'GET'), search: builde...
CREATE TABLE movies ( id INT AUTO_INCREMENT NOT NULL, title VARCHAR(255) NOT NULL, year INT NOT NULL, description TEXT, PRIMARY KEY (id) ); CREATE TABLE reviews ( id INT AUTO_INCREMENT NOT NULL, movie_id INT NOT NULL, reviewer_name VARCHAR(255) NOT NULL, rating INT NOT NULL, comment TEXT, PRIMARY KEY (id) )...
/* * */ package net.community.chest.regexp; import java.util.regex.Pattern; import net.community.chest.lang.StringUtil; import net.community.chest.util.compare.AbstractComparator; /** * <P>Copyright as per GPLv2</P> * @author <NAME>. * @since Feb 14, 2011 9:20:35 AM */ public class PatternComparator extends Ab...
#!/usr/bin/env bash # Copyright (c) 2019 Horizon Robotics. 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 ...
import { Injectable } from '@angular/core'; import { Observable } from 'rxjs'; import { HttpRequestService } from './http-request-services'; import { OcApiPaths } from '../oc-ng-common-service.module'; import { Page } from '../model/api/page.model'; import { Transaction } from '../model/api/transaction.model'; import {...
// // SecondContentViewController.h // Onus // // Created by User on 2016-02-12. // Copyright © 2016 <NAME>. All rights reserved. // #import <UIKit/UIKit.h> @interface SecondContentViewController : UIViewController @end
<form action="/createUser" method="POST"> <label>Name: </label> <input type="text" name="name"> <br> <label>Email: </label> <input type="email" name="email"> <br> <label>Password: </label> <input type="password" name="password"> <br> <input type="submit" value="Create User"> </form>
SELECT * FROM orders o1 INNER JOIN (SELECT AVG(order_date) AS avg_order_date FROM orders) o2 ON o1.order_date > o2.avg_order_date GROUP BY o1.order_date;
/******************************************************************************* * This file is part of the Symfony eclipse plugin. * * (c) <NAME> <<EMAIL>> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. *****************************...
#!/usr/bin/env bash # VPSTOOLBOX # 一键安装Trojan-GFW代理,Hexo博客,Nextcloud等應用程式. # One click install Trojan-gfw Hexo Nextcloud and so on. # MIT License # # Copyright (c) 2019-2021 JohnRosen # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files ...
python /root/torch-rnn/scripts/preprocess.py \ --input_txt /opt/trumpgen/training/speeches.txt \ --output_h5 /opt/trumpgen/training/data/trump.h5 \ --output_json /opt/trumpgen/training/data/trump.json th /root/torch-rnn/train.lua \ -input_h5 /opt/trumpgen/training/data/trump.h5 \ -input_json /opt/trumpgen/training/dat...
#!/bin/sh #delete files in cache which last access is longer than 60 minutes ago #do this as a crone job find ../cache -maxdepth 1 -type f -amin +60 -delete
#!/bin/bash #Start streaming to youtube using your Stream name/key ffmpeg -thread_queue_size 512 -f:v mpegts -probesize 8192 -i rtp://10.5.5.9:8554 -c:v libx264 -b:v 1M -vf scale=-1:720 -r 25 -c:a aac -ar 44100 -b:a 128k -tune zerolatency -preset ultrafast -flags +global_header -f flv rtmp://a.rtmp.youtube.com/live2/$...
package overCatchTest; import java.io.File; ////unchecked Exception : one class without mentioning the excpetion 2 public class OverCatchTest5 { public void A() { try{ B(); }catch(RuntimeException e) { } } public void B() { C(); } private void C() { File file = new File("filepath"); ...
ListNode* removeDuplicates(ListNode* head) { if (head == nullptr || head->next == nullptr) { return head; } ListNode* current = head; while (current != nullptr && current->next != nullptr) { if (current->val == current->next->val) { ListNode* temp = current->next; ...
<reponame>JimmyRetza/Theano #section support_code_struct cudnnSpatialTransformerDescriptor_t APPLY_SPECIFIC(sptf); #section init_code_struct APPLY_SPECIFIC(sptf) = NULL; { cudnnStatus_t err = CUDNN_STATUS_SUCCESS; if ((err = cudnnCreateSpatialTransformerDescriptor(&APPLY_SPECIFIC(sptf))) != CUDNN_STATUS_SUC...