text
stringlengths
1
1.05M
#!/usr/bin/env bash # This script uses arg $1 (name of *.jsonnet file to use) to generate the manifests/*.yaml files. set -e set -x # only exit with zero if all commands of the pipeline exit successfully set -o pipefail ./build_dev.sh # Make sure to start with a clean 'manifests' dir rm -rf environments/base/manife...
<gh_stars>1-10 package main import ( "flag" "fmt" "os" "strings" "time" "github.com/danbrakeley/frog" "github.com/proletariatgames/p4harmonize/internal/buildvar" ) func PrintUsage() { version := "<local build>" if len(buildvar.Version) > 0 { version = buildvar.Version } buildTime := "<not set>" if len(...
<filename>Examples/Radiometry/AVIMultiChannelRAndGAndNIRVegetationIndexImageFilter.cxx /* * Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES) * * This file is part of Orfeo Toolbox * * https://www.orfeo-toolbox.org/ * * Licensed under the Apache License, Version 2.0 (the "License"); * you ma...
<reponame>ParkMinKyu/security package com.min.study.core.util; import javax.annotation.Resource; import org.springframework.security.authentication.encoding.ShaPasswordEncoder; import org.springframework.stereotype.Service; @Service("shaEncoder") public class ShaEncoder { @Resource(name="passwordEncoder") privat...
import ProduitVO from '../../Produit/vos/ProduitVO'; import InformationsVO from '../../Client/vos/InformationsVO'; import LigneCommandeVO from './LigneCommandeVO'; import ParamLigneCommandeVO from './ParamLigneCommandeVO'; export default class LigneCommandeDetailsVO { public constructor( public ligne: Lign...
<gh_stars>0 import { Component, OnInit } from '@angular/core'; import {DatePipe} from "@angular/common"; import {UtilsServiceService} from "../../../utils-service.service"; @Component({ selector: 'ngx-general-ledger', templateUrl: './general-ledger.component.html', styleUrls: ['./general-ledger.component.scss'] ...
<gh_stars>0 package org.clever.storage.service; import org.clever.storage.dto.request.UploadFileReq; import org.clever.storage.entity.FileInfo; import org.springframework.web.multipart.MultipartFile; import java.io.IOException; import java.io.OutputStream; /** * 上传文件存储接口<br/> * <p> * 作者:LiZW <br/> * 创建时间:2016/11...
<filename>src/api.ts<gh_stars>0 import { API_WEBSOCKET_START } from "./config"; import { setup } from "./database"; import { app } from "./express"; import { sequelize } from "./sequelize"; import { createServer } from "./server"; import { startSocket } from "./websocket"; export const initialize = (): void => { se...
#include <iostream> using namespace std; int AbsoluteValue(int number) { return number < 0 ? -number : number; } int main() { int n; cin >> n; unsigned long long * distances = new unsigned long long [n]; for(int i=0; i<n; i++) { int obeliskX, obeliskY; cin >> obeliskX >> obel...
#/bin/bash set -e gcc -g -std=c99 $QC_FLAGS test_mink.c ../src/mink.c \ -I../inc/ -I../../../UTILS/inc/ \ -o test_mink VG="valgrind --leak-check=full" $VG ./test_mink 1>_x 2>&1 grep "0 errors from 0 contexts" _x 1>/dev/null 2>&1 rm _x test_mink echo "Successfully completed $0 in $PWD"
# Only run the tests through this script, unless you clean up otherwise rm -f */*.js */*.output tsc cts_tests.ts && CTS_TEST=1 mocha --reporter spec $@ ./cts_tests.js rm -f */*.js */*.output
#!/bin/bash set -ex; rm -rf repo; mkdir repo; cd repo git init git config user.email "test@example.com" git config user.name "Lazygit Tester" touch foo git add foo git commit -m "init" git branch -a git branch test git branch TEST git checkout TEST git checkout TeST git checkout TesT git checkout TEsT git branch -a
try: n = int(input("Enter an integer: ")) print(n*n) except ValueError: print("Non integer entered")
<filename>Photos-EMF-Project/src/PhotosMetaModel/PhotosMetaModelPackage.java<gh_stars>0 /** */ package PhotosMetaModel; import org.eclipse.emf.ecore.EAttribute; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.EReference; /** * <!-- begin-user-doc --> * The <...
#!/usr/bin/python import sqlite3 import os import datetime import calendar import sys cal_name = 'Arbeitszeit' cal_db = os.path.expanduser('~/Library/Calendars/Calendar Cache') days_to_show = 0 if len(sys.argv) > 1: days_to_show = int(sys.argv[1]) apple_epoche = calendar.timegm((2001, 1,1, 0,0,0)) startdate = dat...
#!/bin/bash -i # Fail on errors. # set -im # Make sure .bashrc is sourced . /root/.bashrc # Allow the workdir to be set using an env var. # Useful for CI pipiles which use docker for their build steps # and don't allow that much flexibility to mount volumes SRCDIR=$1 PYPI_URL=$2 PYPI_INDEX_URL=$3 WORKDIR=${SRCDIR...
#!/bin/bash namespace=openshift-ingress-operator resource='ingresscontroller/default' before=$(oc -n ${namespace} get ${resource} -o jsonpath='{.status.tlsProfile.ciphers[*]}') oc -n ${namespace} patch ${resource} --type merge -p '{"spec":{"tlsSecurityProfile":{"type":"Custom","custom":{"ciphers":["ECDHE-ECDSA-AES128-...
/* * This work is licensed under a Creative Commons Attribution-NonCommercial 3.0 United States License. * For more information go to http://creativecommons.org/licenses/by-nc/3.0/us/ */ package org.eastsideprep.spacecritters.alieninterfaces; /** * * @author gmein */ public class Direction extends Vector2 { ...
class AddUserIdToTables < ActiveRecord::Migration[5.0] def change add_column :tantamuktis, :user_id, :integer add_column :vadhuvars, :user_id, :integer end end
Yes, it is possible to create a HTML page that displays a table of contents from the data stored in a database. You can use HTML, CSS, and JavaScript to create the table and a server-side language such as PHP or Python to query the database and retrieve the relevant data. Once you have the data, you can use JavaScript ...
#!/bin/bash /opt/puppetlabs/bin/puppetdb --version
#!/bin/bash # script for creating a zip and tarball for inclusion in node unset CDPATH set -e rm -rf release *.tgz || true mkdir release node ./cli.js pack --loglevel error >/dev/null mv *.tgz release cd release tar xzf *.tgz mkdir node_modules mv package node_modules/npm # make the zip for windows users cp node_...
<reponame>MaaxGr/klibnotion<filename>samples/sample-jvm/src/main/java/org/jraf/klibnotion/sample/FutureSample.java /* * This source is part of the * _____ ___ ____ * __ / / _ \/ _ | / __/___ _______ _ * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / * ...
<reponame>leguass7/wa-node-api import { IMaxbotResponse } from './api'; export interface IMaxbotAttendant { id: number; serviceSectorId: number[]; name: string; status: boolean; } export interface IMaxbotResponseAttendant extends IMaxbotResponse { attendant: IMaxbotAttendant[]; }
# SPDX-License-Identifier: GPL-2.0+ # # Copyright 2020 Google LLC # """Talks to the patchwork service to figure out what patches have been reviewed and commented on. Provides a way to display review tags and comments. Allows creation of a new branch based on the old but with the review tags collected from patchwork. ""...
# # Figure 5 incremental growth lines. # cd src nice -n 19 matlab -nosplash -nodesktop -r "main_matlab('../parameters/2019/Fig5/esrf079.m', 'fig5'); exit" cd ..
package com.telenav.osv.common.service; public interface KVBaseService { void stopSelf(); void stopForeground(boolean notification); }
<filename>example/src/view-components/profile-react.tsx<gh_stars>0 import * as React from "react"; import * as ReactDOM from "react-dom"; import {UserProfile} from "../user-attrs/profile"; import {ViewComponent} from "../../../src"; interface AppProps{ userAttrs : { "profile" : UserProfile; }; } class App ext...
import React from 'react'; import axios from 'axios'; export default class SearchForm extends React.Component { state = { keyword: '', results: [], } handleChange = e => { this.setState({ keyword: e.target.value }); } handleSubmit = e => { e.preventDefault(); axios .get(`https://example.com/search?...
<gh_stars>10-100 package io.opensphere.mantle.data.merge.gui; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; import java.awt.datatransfer.DataFlavor; import java.awt.datatransfer.Transferable; import java.awt.datatransfer.UnsupportedFlavorException; import java.io.IOException; ...
<gh_stars>0 import axios from 'axios'; const api = axios.create({ baseURL: '/api', }) api.interceptors.request.use(config => { if (localStorage.getItem('JWT_LOGIN')) { config.headers.common.Authorization = `Bearer ${localStorage.getItem('JWT_LOGIN')}`; } return config; }) export default api;...
def hex_to_binary(hex_str): # convert hex to int num = int(hex_str, 16) # convert int to binary string bin_str = bin(num)[2:] return bin_str print(hex_to_binary("0xA2")) # Output: "10100010"
package function_test import ( "testing" "github.com/axetroy/gmock/function" "github.com/stretchr/testify/assert" ) func TestMakeSliceByLength(t *testing.T) { assert.Equal(t, []int{0, 1, 2, 3, 4, 5}, function.MakeSliceByLength(6)) assert.Equal(t, []int{0, 1, 2}, function.MakeSliceByLength(3)) }
case $( /usr/bin/tty ) in /dev/tty[0-9]*) [ -n "$(pidof -s gpm)" ] && /usr/bin/disable-paste ;; esac
<filename>app/controllers/devise/sms_activations_controller.rb class Devise::SmsActivationsController < DeviseController # GET /resource/sms_activation/new def new build_resource({}) render :new end # POST /resource/sms_activation def create self.resource = resource_class.send_sms_token(params[r...
sudo sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"/GRUB_CMDLINE_LINUX_DEFAULT="quiet splash video=hyperv_fb:1920x1080"/' /etc/default/grub sudo update-grub sudo reboot
$ echo "hello" > /tmp/dat $ echo "go" >> /tmp/dat $ go run reading-files.go hello go 5 bytes: hello 2 bytes @ 6: go 2 bytes @ 6: go 5 bytes: hello # Vedremo adesso come effettuare la scrittura # su file.
#!/bin/bash MODE=$1 ROOT="$(realpath -mq ${BASH_SOURCE[0]}/../..)" if [ "$(oc auth can-i '*' '*' --all-namespaces)" != "yes" ]; then echo echo "[ERROR] User '$(oc whoami)' does not have the required 'cluster-admin' role." 1>&2 echo "Log into the cluster with a user with the required privileges (e.g. kubeadmin)...
#!/bin/bash # Copyright 2021 VMware, Inc. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 set -euo pipefail TANZU_BOM_DIR=${HOME}/.config/tanzu/tkg/bom INSTALL_INSTRUCTIONS='See https://github.com/mikefarah/yq#install for installation instructions' echodual() { echo "$@" 1>&2 echo "#" "$@" } if [ -z ...
python transformers/examples/language-modeling/run_language_modeling.py --model_name_or_path train-outputs/512+512+512-only-pad/model --tokenizer_name model-configs/1536-config --eval_data_file ../data/wikitext-103-raw/wiki.valid.raw --output_dir eval-outputs/512+512+512-only-pad/1024+0+512-SS-N-1 --do_eval --per_devic...
<reponame>ipselon/test-namespaces<filename>modules/MyAppComponents/index.js import FrameContainer from './containers/FrameContainer'; export { FrameContainer };
// import { client } from 'Api/client.js'; import { AUTHORIZATION_REQUIRED } from '../constants/Default'; export function ifCatchError(dispatch, error, dispatchStatus) { /* if ( error.message === 'Network Error' || error.message === 'Request failed with status code 401' ) { dispatch(dispatchStatus.re...
<html> <head> <title>Web Page Layout</title> <style> body { font-family: sans-serif; } #full-page { background-color: #fefefe; text-align: center; padding: 1rem; } #top-box { width: 40%; margin: 0 auto; padding: 1rem; ...
<gh_stars>0 const HTTPError = require('./lib/HTTPError'); const NotFound = require('./lib/NotFound'); const ResourceNotFound = require('./lib/ResourceNotFound'); module.exports = { HTTPError, NotFound, ResourceNotFound };
import { OakActionCall, OakActionCompanion, OakActionRequestEvent, OakEngineContext, } from '../../src/model'; import { bizOperationObj } from '../fixture-business-operation'; import { createS1Params } from '../storage/s1-storage-factory'; import { AggregateTask, AlphaAggregateParams, CityPayload, } from ...
#!/bin/bash set -e echo echo "● Install HTMLProofer..." gem install --user-install html-proofer echo echo "● Build jekyll site..." bundle exec jekyll build echo echo "● Linting site..." htmlproofer ./_site --disable-external --check-html echo echo "● Launch jekyll site..." bundle exec jekyll serve
package com.alipay.api.domain; import java.util.List; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.internal.mapping.ApiListField; /** * 支付宝可信电子签名申请 * * @author auto create * @since 1.0, 2017-12-20 15:24:35 */ public class AlipaySecurity...
package cn.shiyanjun.platform.scheduled.utils; import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; import cn.shiyanjun.platform.api.Context; import cn.shiyanjun.platform.api.common.ContextImpl; import cn.shiyanjun.platform.api.utils.Pair; public class ConfigUtils { private static fi...
#!/bin/bash #SBATCH --account=def-dkulic #SBATCH --mem=8000M # memory per node #SBATCH --time=10:00:00 # time (DD-HH:MM) #SBATCH --output=/project/6001934/lingheng/Double_DDPG_Job_output/discrete_Acrobot-v1_doule_ddpg_softcopy_epsilon_greedy_seed4_run8_%N-%j.out # %N for node name, %j for jobID m...
const git = require('gulp-git'); const fs = require('fs'); const package = JSON.parse(fs.readFileSync('./package.json')); module.exports = gulp => { tag = 'v' + package.version; // Only even semver can be production version if (/\d+\.\d+\.\d*[02468]/.test(package.version)) { console.log('Production ' + tag)...
const http = require('http'); const express = require('express'); const path = require('path'); const config=require('./lib/config') const bodyParser = require('body-parser'); require('body-parser-xml')(bodyParser); require('./db/mongodb').load(); // require('./testClearShare').scheduleCronstyle(); const app = express...
import UIKit class TapCounterViewController: UIViewController { var index: Int = 0 override func viewDidLoad() { super.viewDidLoad() // Create a button let tapButton = UIButton(type: .system) tapButton.setTitle("Tap Me", for: .normal) tapButton.addTarget(self,...
package com.networknt.eventuate.common; public class EntityNotFoundException extends EventuateClientException { }
<gh_stars>100-1000 require File.dirname(__FILE__) + '/../spec_helper' describe "Eye::Dsl::Chain" do it "should understand chain options" do conf = <<-E Eye.application("bla") do chain :grace => 5.seconds process("3") do pid_file "3" end group :yy do end ...
def mean(list): total = 0 for num in list: total+=num return total/len(list) list = [1,2,3,4,5] mean = mean(list) print(mean) # prints 3.0
#!/bin/bash # Copyright 2016 The Kubernetes 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 required...
import { createDocument } from '@stencil/core/mock-doc'; export const convertHtmlToHypertextData = (html: string): any => { const doc = createDocument(); const div = doc.createElement('div'); div.innerHTML = html; return convertElementToHypertextData(div); }; const convertElementToHypertextData = (node: any):...
def isFibonacci(n): # n is Fibonacci if one of 5*n*n + 4 or 5*n*n - 4 or both # is a perfect square return isPerfectSquare(5*n*n + 4) or isPerfectSquare(5*n*n - 4) def isPerfectSquare(x): # Find floating point value of # square root of x. sr = math.sqrt(x) # If square root ...
package mg.utils.api.consumer; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import mg.utils.api.consumer.dto.ApiConsumerCreationRequestDto; import mg.utils.api.consumer.dto.ApiConsumerUpdateRequestDto; import org.springframework.stereotype.Service; import javax.validation.ValidationException; i...
#!/usr/bin/env bash # local version: 1.6.1.0 @test "single digit strings can not be valid" { #[[ $BATS_RUN_SKIPPED == true ]] || skip run bash luhn.sh "1" [[ $status -eq 0 ]] [[ $output == "false" ]] } @test "a single zero is invalid" { [[ $BATS_RUN_SKIPPED == true ]] || skip run bash luhn.sh "0" [[ ...
<filename>pywraps/sidc.py # @arnaud drop this file? # ---------------------------------------------------------------------- # # Misc constants # UA_MAXOP = 6 # ---------------------------------------------------------------------- # instruc_t related constants # # instruc_t.feature # CF_STOP = 0x00001 # Instruct...
/* * MIT License * * Copyright (c) 2018 <NAME> (@smallcreep) <<EMAIL>> * * 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 *...
<gh_stars>0 import { UPDATE_CARS } from "./constants/constants" export default function CarAction(value) { return { type: UPDATE_CARS, payload: value }; }
#!/bin/bash rm *.yacc.* rm *.lex.*
package pubsub import ( "github.com/stretchr/testify/assert" "testing" ) type Item struct { aString string } var item = Item{ aString: "aString", } var sub, err = Subscribe("agentName", item, false, &item) func TestHandleModify(t *testing.T) { sub.agentScope = "agentScope" sub.topic = "topic" created := fals...
#!/usr/bin/env bash # local version: 1.0.0.2 # additional tests for: invalid color, invalid octal number, too many colors @test "Orange and orange and black" { #[[ $BATS_RUN_SKIPPED == "true" ]] || skip run bash resistor_color_trio.sh "orange" "orange" "black" [[ $status -eq 0 ]] [[ $output == "33 ohm...
import requests import os def web_response_ok(url): try: r = requests.head(url) except ConnectionError: return False return r.status_code == 200 def test_web(): test_pages = ['','ChooseTeams','UpcomingGames'] # add to this list for every route in webapp/main.py project = os.en...
<filename>packages/button/index.js<gh_stars>1-10 import TmButton from './src/button'; /* istanbul ignore next */ TmButton.install = function(Vue) { Vue.component(TmButton.name, TmButton); }; export default TmButton;
#!/bin/sh #Response Topic bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic response_topic #User Topic bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic userTopic #Tweet Topic bin/kafka-topics.sh --create --zookee...
#!/bin/bash IP=${1:-54.190.23.229} echo Probing ${IP} curl --silent ${IP}:8080/operations/health | python -m json.tool curl --silent ${IP}:8080/operations/info | python -m json.tool curl --silent ${IP}:8080/ | python -m json.tool
#!/bin/bash # Author: Ashkan Rafiee iter=0 uiter=0 while true; do for domain in `cat domains.txt` do whois $domain | egrep -q \ '^No match|^NOT FOUND|^Not fo|AVAILABLE|^No Data Fou|has not been regi|No entri' if [ $? -eq 0 ]; then let "iter += 1" let "uter += 1" echo ...
/*global define $ _*/ define(function(require, exports, module) { "use strict"; var editor = require("../editor"); var project = require("../project"); var keyCode = require("./key_code"); var eventbus = require("../lib/eventbus"); var visible = false; /** * Supported options * -...
#!/bin/sh # shellcheck disable=SC2034,SC3033,SC3040,SC3043 : "${EXIT:=exit}" : "${ECHO:=echo}" : "${SED:=sed}" _POT_RW_ATTRIBUTES="start-at-boot early-start-at-boot persistent no-rc-script prunable localhost-tunnel" _POT_RO_ATTRIBUTES="to-be-pruned" _POT_NETWORK_TYPES="inherit alias public-bridge private-bridge" # n...
#!/usr/bin/env bash # Download entry EMD-13070 from EMDB # with the procedure recommended at <https://www.wwpdb.org/ftp/pdb-ftp-sites> rsync -rlpt -v -z --delete \ rsync.ebi.ac.uk::pub/databases/emdb/structures/EMD-13070/ ./EMD-13070 # Move main map to the directory containing the rest of the volume series # and give...
<filename>src/main/java/patron/users/guis/edit/controllerExtend/_10_EditUserControllerExtend.java package patron.users.guis.edit.controllerExtend; import patron.users.models.User; import com.appscharles.libs.fxer.abstracts.AbstractViewControllerFxExtend; /** * The type 10 edit user controller extend. */ pub...
#!/bin/sh #--------------------------------------------------------------------------- . ./ssl.rsa.req.ini; #--------------------------------------------------------------------------- echo "OUT_DIR = $OUT_DIR"; echo "CONF_DIR = $CONF_DIR"; echo "CA_PUB_FILE = $CA_PUB_FILE"; echo "CA_CERT_FILE = $CA_CERT_FILE";...
<gh_stars>0 package com.qht.model; import javax.sql.rowset.serial.SerialArray; import java.io.Serializable; import java.util.List; public class CourseChapterModel implements Serializable { //章节id private String uid; //章节名称 private String name; //课时集合 private List<ClassModel> peri...
<filename>service/user_token_refresh_service.go<gh_stars>1-10 package service import ( "singo/model" "singo/serializer" "github.com/gin-gonic/gin" ) // UserTokenRefreshService 用户刷新token的服务 type UserTokenRefreshService struct { } // Refresh 刷新token func (service *UserTokenRefreshService) Refresh(c *gin.Context, u...
"use strict"; /* * Copyright (c) 2006-2010 <NAME> http://www.box2d.org * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * Permission is granted to anyone to use this software for ...
#!/bin/bash ################################################################## # Created by Christian Haitian for use to easily update # # various standalone emulators, libretro cores, and other # # various programs for the RK3326 platform for various Linux # # based distributions. ...
import pandas as pd import numpy as np from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.model_selection import train_test_split from sklearn.naive_bayes import MultinomialNB from sklearn.metrics import accuracy_score # Load and shuffle data df = pd.read_csv('tweets_data.csv') df = df.sample(fra...
<filename>src/components/core/scrollTo.tsx import { css } from "@emotion/react" import React from "react" import { FaArrowCircleUp } from "react-icons/fa" import { useWindowSize } from "../hooks/useWindowSize" import { useScrollPosition } from "../hooks/useScrollPosition" import { mediumEnd } from "./variables" const ...
<filename>calamus-common/calamus-common-mail/calamus-mail-view/src/main/java/fr/calamus/common/mail/view/PanneauMailsEnregistres.java<gh_stars>0 package fr.calamus.common.mail.view; import java.awt.BorderLayout; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; import javax.swing.JPanel; import fr...
<gh_stars>0 import GreenWaveBandEditor from './GreenWaveBandEditor.jsx' export default GreenWaveBandEditor
#! /bin/bash # -------------------------------------------------------------------------- # Reinstallation of a VM through SSH # TARGET = remote machine # STUBFS = small root file system to unpack in ramdisk - tgz format # PAYLOAD = raw image # -----------------------------------------------------------...
#!/bin/bash path_cur=$(cd `dirname $0`; pwd) build_type="Release" source $path_cur/../Common/scripts/build_tools.sh checkEnvs checkArgsA35 "$@" if [ $build_target == "A300" ]; then buildA300 $build_target $build_type $path_cur else buildA500 $build_target $build_type $path_cur fi
# frozen_string_literal: true # Copyright 2021 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
#ifndef __NETSCAPE_H #define __NETSCAPE_H NPError netscape_plugin_destroy(NPP instance, NPSavedData **save); NPError netscape_plugin_getvalue(NPP instance, NPPVariable variable, void *value); NPError netscape_plugin_new(NPMIMEType pluginType, ...
def dec_to_bin(n): result = "" while (n > 0): remainder = n % 2 n = n // 2 result = str(remainder) + result return result if __name__ == '__main__': n = 47 print("Binary representation of {} is {}".format(n, dec_to_bin(n)))
#!/usr/bin/env zsh PROJECT_NAME=plztest NETWORK="${NETWORK:-${PROJECT_NAME}_default}" VOLUME_PREFIX="${PROJECT_NAME}_data_" CLI_BUILDER_IMAGE="${PROJECT_NAME}/cli-builder" CLI_IMAGE="${PROJECT_NAME}/cli" CLI_CONTAINER_PREFIX="${PROJECT_NAME}_cli_" CONTROLLER_IMAGE="${PROJECT_NAME}/controller" CONTROLLER_CONTAINER="${P...
var mongoose = require("mongoose"); const Produtos = mongoose.model("produtos",{ nome:String, vlUnit:Number, codigoBarras: String }); module.exports = Produtos;
/* * Copyright (c) 2017 <NAME> and others * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * and Apache License v2.0 which accompanies this distribution. * The Eclipse Public License is available at http://www.eclips...
<filename>src/components/Styled/Page/index.js import styled from 'styled-components'; export const PageHeader = styled.div` display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 3rem; background: none; min-height: 150px; .poweredWith { color: #090909; ...
<script> function onButtonClicked() { console.log("Button clicked!"); } document.getElementById("btn").addEventListener("click", onButtonClicked); </script>
class Article < ActiveRecord::Base timestamp_attr_writer :published_at, :date_format => '%d/%m/%Y' end
<reponame>E3SM-Project/iESM #ifndef _ISHUTDOWN_DECIDER_H_ #define _ISHUTDOWN_DECIDER_H_ #if defined(_MSC_VER) #pragma once #endif /* * LEGAL NOTICE * This computer software was prepared by Battelle Memorial Institute, * hereinafter the Contractor, under Contract No. DE-AC05-76RL0 1830 * with the Department of Ener...
#!/bin/bash cd `dirname $0` echo "检查yarn" yarn -v &> /dev/null if [[ ! $? -eq 0 ]] then echo "安装yarn" npm i -g yarn fi echo "build project" yarn --frozen-lockfile && yarn build echo "压缩项目" cd dist tar -cf $APP_NAME-v$VERSION.tar.gz . cd ..
/* * Copyright (C) 2011 <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 agreed to i...
<reponame>panthomakos/sham require 'sham/data' describe Sham do context '#string!' do it 'should be a string' do described_class.string!.should be_an_instance_of(String) end it 'should have a length of 10' do described_class.string!.length.should == 10 end it 'should allow different...
#!/bin/bash BLZ3_HOME=$PWD BLZ3_DEBIAN=${PWD}/../debian/blz3 BLZ3_DEBIAN_DEV=${PWD}/../debian/libblz3-dev ARCH=`dpkg --print-architecture` BUILD_NUMBER=${BUILD_NUMBER:=0} JOBS=`getconf _NPROCESSORS_ONLN` rm -rf ${BLZ3_DEBIAN} ${BLZ3_DEBIAN_DEV} umask 022 mkdir -p ${BLZ3_DEBIAN}/usr/bin mkdir -p ${BLZ3_DEBIAN}/DEBIA...