text stringlengths 1 1.05M |
|---|
import '../node_modules/normalize.css/normalize.css';
import './stylesheets/custom.css';
import './stylesheets/font-awesome.min.css';
// App's UI initialization
console.log('loaded!'); |
#!/bin/bash
set -euxo pipefail
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
# shellcheck disable=SC1091
source "$DIR"/_common.sh
# Build Docker images for Next.js-based apps
exec "$DIR"/_docker.sh Dockerfile output-next
|
/**
* Autogenerated code by SdkModelGenerator.
* Do not edit. Any modification on this file will be removed automatically after project build
*
*/
package test.backend.www.model.hotelbeds.basic.model;
import java.util.List;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import com.fa... |
<filename>lib/assets/javascripts/builder/editor/layers/layer-content-views/legend/legends-view.js
var Backbone = require('backbone');
var _ = require('underscore');
var CoreView = require('backbone/core-view');
var LegendColorView = require('./color/legend-color-view');
var LegendSizeView = require('./size/legend-size-... |
#!/bin/bash
# source environment
. ./env.sh
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
sub_name=$1
BUILD_DIR=$ROOT_DIR/Expt/data/mrp_data/$sub_name/
### TRAIN for task1
pargs="
--suffix=.mrp_psd \
--companion_suffix=.mrp_conllu_pre_processed \
--build_folder=${BUILD_DIR} \
"
pushd $ROOT_DIR
python uti... |
#install prometheus on grafana server
#!/bin/bash
sudo wget https://github.com/prometheus/prometheus/releases/download/v2.8.1/prometheus-2.8.1.linux-amd64.tar.gz
sudo useradd --no-create-home --shell /bin/false prometheus
sudo mkdir /etc/prometheus
sudo mkdir /var/lib/prometheus
sudo chown prometheus:prometheus /etc/p... |
<reponame>Project-ITSOL-Selling/front-end-prime
import { Component, OnInit } from '@angular/core';
import {FormBuilder, FormGroup} from '@angular/forms';
import {NgbModal} from '@ng-bootstrap/ng-bootstrap';
import {NgxSpinnerService} from 'ngx-spinner';
import {DEFAULT_MODAL_OPTIONS} from '../../@core/app-config';
impo... |
// Copyright (c) 2021-2022 Uber Technologies Inc.
//
//
// 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, copy, modify... |
#!/bin/bash
# Install the package
pip install twine
# Create the following file in home dir
touch ~/.pypirc
# Create the following entries in the file
[distutils]
index-servers= pypi
[pypi]
repository = https://upload.pypi.org/legacy/
username=YOUR_USERNAME
password=YOUR_PASSWORD
# Build a source code dist
pytho... |
#!/bin/bash
set -e
# Note: rh-git218 is needed to run `git -C` in docs build process.
yum install -y centos-release-scl epel-release
yum update -y
yum install -y devtoolset-7-gcc devtoolset-7-gcc-c++ devtoolset-7-binutils java-1.8.0-openjdk-headless rsync \
rh-git218 wget unzip which make cmake3 patch ninja-build... |
import os
import argparse
import numpy
import pyro_models
from pyro_models.utils import json_file_to_mem_format
from utils import save, load
from model_constants import model_constants
import pyro.poutine as poutine
from pyro.infer.mcmc import MCMC, NUTS
from pyro.infer.abstract_infer import TracePredictive
import t... |
<filename>app/src/main/java/sma/rhythmtapper/framework/Sound.java
package sma.rhythmtapper.framework;
public interface Sound {
void play(float volume);
void dispose();
void stop();
}
|
'use strict'
module.exports = {
OpenRefine: require('./lib/openrefine')
}
|
#!/usr/bin/env bash
rootdir=$(readlink -f $(dirname $0))
source "$rootdir/test/common/autotest_common.sh"
source "$rootdir/test/nvmf/common.sh"
set -xe
if [ $EUID -ne 0 ]; then
echo "$0 must be run as root"
exit 1
fi
if [ $(uname -s) = Linux ]; then
# set core_pattern to a known value to avoid ABRT, systemd-core... |
import java.time.LocalDate;
import java.time.Period;
public class AgeCalculator {
public static int getAge(String dateString) {
// Parse the String to LocalDate
LocalDate birthdate = LocalDate.parse(dateString);
// Calculate the age
Period age = Period.between(birthdate, LocalDate.now());
return age.g... |
const mongoose = require('mongoose');
module.exports = mongoose.model('Harass', mongoose.Schema({
name: {
type: String,
required: true
},
userID: {
type: String,
required: true
},
expiry: {
type: String,
required: true
}
}, { timestamps: true })); |
#!/bin/bash
title="Node project start menu"
text="Please pick an application to run"
errormsg="Invalid option. Try another again."
options=("Chrome" "Firefox" "Atom" "MongoBD" "development BackEnd" "testing BackEnd" "Frontend")
windowHeight=600
while opt=$(zenity --title="$title" --text="$text" --height=... |
<filename>Week3/homework/7-step3.js
'use strict';
const x = 9;
function f1(val) {
val = val + 1;
return val;
}
f1(x);
console.log(x);
/*
Here I tell JavaScript that I want the same variable value (x) and increase it by one value and return it.
'val' here is a local variable. It has the same x value but has noth... |
#!/bin/bash
set -e # exit if anything returns a non-zero status
until dotnet ef database update; do
>&2 echo "SQL Server is starting up"
sleep 1
done
|
let array = ["Jesus", "David", "Marcano", "Mora"];
let objeto = {
"Nombre": "Jesus",
"Apellido": "Marcano",
"Edad": 23
}
// const recibirArray = (a) => {
// console.log(a[0]);
// }
// recibirArray(array);
// const imprimerElementos = (a) => {
// a.forEach(element => {
// console.log(element);
// });... |
<reponame>veryaustin/veryaustin-frontend-2017
import React from "react";
import { Route, IndexRoute } from "react-router";
import App from "./components/App";
import Home from "./containers/Home";
import Work from "./containers/Work";
import About from "./containers/About";
import Contact from "./containers/Contact";
... |
#!/bin/bash
usage="$(basename "$0") [help] [movies] [kids]-- program to rename movie files
where:
help show this help text
movies sets a specific source and destination for adult content
kids sets a specific source and destination for kids content
The last 2 options then continue processing through t... |
<filename>codes/src/main/java/org/glamey/training/codes/leetcode/FindRepeatNumber.java<gh_stars>0
package org.glamey.training.codes.leetcode;
import java.util.Arrays;
import java.util.HashSet;
/**
* 找出数组中重复的数字。
* <p>
* <p>
* 在一个长度为 n 的数组 nums 里的所有数字都在 0~n-1 的范围内。数组中某些数字是重复的,但不知道有几个数字重复了,也不知道每个数字重复了几次。请找出数组中任意一个重复... |
#!/bin/bash
sort_numbers() {
local __sort="$1"
local __len=${#__sort}
local __sorted='0'
while [ "$__sorted" -eq '0' ]; do
__sorted='1'
for (( i=0; i<__len-1; i++ )); do
if [ "${__sort[$i]}" -gt "${__sort[$((i+1))]}" ]; then
local __temp="${__sort[$i]}"
... |
def strStr(haystack: str, needle: str) -> int:
if len(needle) == 0:
return 0
j = 0
index = 0
count = 0
while index < len(haystack):
if haystack[index] == needle[j]:
count += 1
if len(needle) == count:
return index - count + 1
j += 1... |
/* Copyright 2020 The TensorFlow Quantum 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 by applicable ... |
<reponame>andreapatri/cms_journal
import React from 'react';
import PropTypes from 'prop-types';
const Sync = ({ fill, ...rest }) => (
<svg
viewBox="0 0 11 11"
width="11"
height="11"
{...rest}
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M11 .917v3.208a.44.44 0 01-.136.322.44.44 0 01... |
import java.util.Random;
public class DiceGame {
public static void main(String[] args) {
Random random = new Random();
int die1 = random.nextInt(6) + 1; // Generate a random value between 1 and 6 for die1
int die2 = random.nextInt(6) + 1; // Generate a random value between 1 and 6 for die2... |
<filename>source/starter/nextjs-redux-starter/src/components/Layout.js
import React, { PureComponent } from 'react'
import Link from 'next/link'
export default class Layout extends PureComponent {
render () {
return (
<div className='layout'>
<header>
<img src='/static/next-logo.png' />
... |
#!/bin/bash
cd NodejsWebApp1/NodejsWebApp1
npm run server
|
/*=========================================================================
Program: Visualization Toolkit
Module: vtkPCLRadiusOutlierRemoval.cxx
Copyright (c) <NAME>, <NAME>, <NAME>
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distr... |
import math
radius = 5
area = math.pi * radius ** 2
print("The area of the circle is", area) |
InteractiveFileLineNumber=0
interactive:start() {
local ast code compiled_code line="" state=none
local proc rfifo wfifo end_token result
local powhistory="${POWSCRIPT_HISTORY_FILE-$HOME/.powscript_history}"
local extra_line=''
local compile_flag=false ast_flag=false echo_flag=false incomplete_flag=false low... |
//
// INDCollectionVideoPlayerView.h
// <NAME>
//
// Created by <NAME> on 2014-04-10.
// Copyright (c) 2014 <NAME>. All rights reserved.
//
#import <AVFoundation/AVFoundation.h>
/**
* A view that plays a video using `AVPlayerLayer` and repeats it when playback
* has ended.
*/
@interface INDCollectionVideoPla... |
import os
class FileMapper:
@staticmethod
def mapAlternativeName(file):
if file.getParent() is not None:
return file.getName() + "__" + file.getParent().getName()
else:
return file.getName()
# Example usage
# Assuming a Java File object named javaFile
alternativeName = ... |
def average(numbers: list):
if numbers:
return sum(numbers) / len(numbers)
else:
return 0
numbers = [2, 3, 4, 5, 6]
print(f"Average of {numbers} is {average(numbers)}") |
<filename>src/lib/tx-parser/proxy-abi.ts
import { AbiItem } from "web3-utils"
import { deployedBytecode as proxyBytecodeV1, abi as proxyAbiV1 } from "../core-contracts/Proxy-v1.json"
export interface KnownProxy {
verifiedName: string,
abi: AbiItem[],
bytecode: string, // Deployed bytecode.
implementationMethod: s... |
<gh_stars>1-10
Rails.application.routes.draw do
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
devise_for :users
root :to => 'pages#index'
# Frontend
resources :users, :except => :show
namespace :api do
namespace :v3 do
resources :areas, :on... |
<reponame>BUGBOUNTYchrisg8691/BugTracker-1
package com.portfolio.bugtracker.models;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
/**
* The type Login credentials.
*/
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class LoginCredentials... |
#!/bin/bash
#
# script that passes password from stdin to ssh.
#
# Copyright (C) 2010 André Frimberger <andre OBVIOUS_SIGN frimberger.de>
#
# 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, eit... |
import { AdonisApplication } from './src/adonis-app'
export default AdonisApplication
|
#!/bin/bash
set -e
git clone https://aur.archlinux.org/paru-bin
cd paru-bin/
makepkg -si --noconfirm
cd
rm -rf paru-bin
sudo pacman -S --noconfirm --needed reflector
sudo reflector -c AU -a 12 --sort rate --save /etc/pacman.d/mirrorlist --verbose
sudo pacman -Syu
sudo pacman -S --noconfirm --needed xorg-server xorg-... |
# see issue #89
loop_func() {
local search="none one two tree"
local d
for d in $search ; do
echo "$d"
done
}
@test "loop_func" {
run loop_func
[[ "${lines[3]}" == 'tree' ]]
run loop_func
[[ "${lines[2]}" == 'two' ]]
}
|
<filename>src/routes/postRoute.js
// biblioteca de validações Joi que é compatível com o Hapi
import Joi from 'joi'
import { Schema } from 'mongoose'
import PostsController from '../controllers/posts'
import PostModel from '../models/posts'
const postsController = new PostsController(PostModel)
// o argumento server... |
#!/bin/bash
# Switchboard-1 recipe customized for Edinburgh
# Author: Arnab Ghoshal (Jan 2013)
exit 1;
# This is a shell script, but it's recommended that you run the commands one by
# one by copying and pasting into the shell.
# Caution: some of the graph creation steps use quite a bit of memory, so you
# should ru... |
import React, { Component } from 'react';
import { Text, View, ScrollView } from 'react-native';
class App extends Component {
state = {
products: [],
orders: [],
payments: []
}
componentDidMount() {
// Fetch products
// Fetch orders
// Fetch payments
}
render() {
return (
<View>
<Text>Prod... |
///////////////////////////////////////////////////////////////////////////////
// Name: src/unix/secretstore.cpp
// Purpose: wxSecretStore implementation using libsecret.
// Author: <NAME>
// Created: 2016-05-27
// Copyright: (c) 2016 <NAME> <<EMAIL>>
// Licence: wxWindows licence
///////////... |
var namespacedroid_1_1_runtime_1_1_managers =
[
[ "Experimental", "namespacedroid_1_1_runtime_1_1_managers_1_1_experimental.html", "namespacedroid_1_1_runtime_1_1_managers_1_1_experimental" ],
[ "AbstractNeodroidManager", "classdroid_1_1_runtime_1_1_managers_1_1_abstract_neodroid_manager.html", "classdroid_1_1_... |
coreInfo=`curl -s -X GET \
"https://api.supertokens.io/0/core/latest?password=$SUPERTOKENS_API_KEY&planType=FREE&mode=DEV&version=$1" \
-H 'api-version: 0'`
if [[ `echo $coreInfo | jq .tag` == "null" ]]
then
echo "fetching latest X.Y.Z version for core, X.Y version: $1, planType: FREE gave response: $coreInfo"
... |
<reponame>TeamSAIDA/StarcraftAITournamentManager<filename>src/server/KeepAliveTask.java
package server;
import java.util.TimerTask;
public class KeepAliveTask extends TimerTask {
@Override
public void run() {
Server.Instance().keepAlive();
}
}
|
#!/bin/bash
set -e
COMMON_FLAGS="-DCURL_IS_STATICALLY_LINKED"
export EXTRA_CFLAGS="$COMMON_FLAGS"
export EXTRA_CXXFLAGS="$COMMON_FLAGS"
export PATH="$FORCE_GEM_HOME_AND_PATH/bin:$PATH"
exec "$@"
|
<gh_stars>0
package dao;
import java.util.List;
import model.Order;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springfr... |
require File.dirname(__FILE__) + '/../../spec_helper'
# include Remote
require File.dirname(__FILE__) + '/ec2_mocks_and_stubs.rb'
describe "ec2 remote base" do
before(:each) do
@cloud = TestCloud.new :test_remoter_base_cloud
@tr = TestEC2Class.new(@cloud)
stub_remoter_for(@tr)
# @tr.stub!(:get_instan... |
from typing import List
from win32com import client
def convert_excel_to_pdf(excel_files: List[str]) -> None:
excel = client.Dispatch("Excel.Application")
for file in excel_files:
workbook = excel.Workbooks.Open(file)
workbook.ActiveSheet.ExportAsFixedFormat(0, file.replace(".xlsx", ".pdf"))
... |
#!/bin/bash
NDK_PATH=~/Library/Android/sdk/ndk/22.1.7171670
# linux-x86_64
HOST_TAG=darwin-x86_64
MIN_SDK_VER=21
# ==================================
TOOLCHAINS=${NDK_PATH}/toolchains/llvm/prebuilt/${HOST_TAG}
SYSROOT=${TOOLCHAINS}/sysroot
function build_one
{
if [ $ARCH == "arm" ]
then
CROSS_PREFIX=$TOOLCHAINS... |
#pragma once
#include <iostream>
#include <cmath>
namespace lio
{
/**
* @brief A 2D vector class
*
* @tparam T Type for storing the coordinates
*/
template <typename T>
struct Vec2
{
T x = 0.0;
T y = 0.0;
/**
* @brief Construct a new Vec2 at (0, 0... |
#
# Copyright SecureKey Technologies Inc. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
#!/usr/bin/env bash
# Set default values, which may be overriden by the environment variables
: ${DOMAIN:=trustbloc.dev}
: ${MEMORY:=6g}
: ${CPUS:=4}
: ${ADDONS:=ingress,ingress-dns,dashboard}
PATCH=.ingress... |
class ErrorFormatter {
func formatError(message: String, severity: String) {
var formattedMessage = ""
switch severity {
case "error":
formattedMessage = "\u{001B}[31m[Error] \(message)"
case "warning":
formattedMessage = "\u{001B}[33m[Warning]... |
rexdep
|
import {Ts} from "./types"
import * as zjson from "./zjson"
export type Payload =
| SearchRecords
| SearchWarnings
| SearchStats
| SearchEnd
| TaskStart
| TaskEnd
| PcapPostStatus
export type SearchRecords = {
type: "SearchRecords"
records: zjson.Items
channel_id: number
}
export type SearchWarni... |
def detect_anomalies(data: pd.DataFrame) -> pd.Series:
# Step 1: Standardize the data
scaler = StandardScaler()
scaled_data = scaler.fit_transform(data)
# Step 2: Reduce dimensionality using PCA
pca = PCA(n_components=2)
reduced_data = pca.fit_transform(scaled_data)
# Step 3: Apply Isolati... |
/**
* Layout component that queries for data
* with Gatsby's StaticQuery component
*
* See: https://www.gatsbyjs.org/docs/static-query/
*/
import React from "react"
import PropTypes from "prop-types"
import { StaticQuery, graphql } from "gatsby"
import { Helmet } from "react-helmet"
import Header from "./header"... |
#!/bin/sh
# CYBERWATCH SAS - 2017
#
# Security fix for RHSA-2014:0377
#
# Security announcement date: 2014-04-08 07:07:23 UTC
# Script generation date: 2017-01-01 21:15:14 UTC
#
# Operating System: Red Hat 6
# Architecture: x86_64
#
# Vulnerable packages fix on version:
# - openssl.x86_64:1.0.1e-16.el6_5.7
# - ... |
SCRABBLE_LETTER_VALUES = {
'a': 1, 'b': 3, 'c': 3, 'd': 2, 'e': 1, 'f': 4, 'g': 2, 'h': 4, 'i': 1, 'j': 8, 'k': 5, 'l': 1, 'm': 3, 'n': 1,
'o': 1, 'p': 3, 'q': 10, 'r': 1, 's': 1, 't': 1, 'u': 1, 'v': 4, 'w': 4, 'x': 8, 'y': 4, 'z': 10
}
def getWordScore(word, n):
"""
Returns the score for a word. Assu... |
package net.dean.jraw.fluent;
import net.dean.jraw.ApiException;
import net.dean.jraw.models.Message;
import net.dean.jraw.paginators.InboxPaginator;
/**
* A reference to an authenticated-user's inbox
*/
public final class InboxReference extends ElevatedAbstractReference {
/**
* Instantiates a new InboxRe... |
<gh_stars>0
/*
* Copyright (C) 2015-2017 Uber Technologies, Inc. (<EMAIL>)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* ... |
<filename>client_test.go<gh_stars>1-10
package cdek
import (
"crypto/md5"
"encoding/hex"
"reflect"
"testing"
"time"
)
func TestNewClient(t *testing.T) {
type args struct {
apiURL string
}
tests := []struct {
name string
args args
want *Client
}{
{
"Client created",
args{
apiURL: "apiURL",... |
#!/bin/sh
#
# Copyright (c) 2007, Cameron Rich
#
# 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 copyright notice,
# this list of cond... |
class MyAnimeListScraper
module DateRangeParser
extend ActiveSupport::Concern
def parse_date(date_str)
return if date_str.include?('?')
Date.strptime(date_str, '%b %d, %Y')
rescue ArgumentError
begin
Date.strptime(date_str, '%Y')
rescue ArgumentError
Date.strptime(... |
import React, { Component } from 'react'
import {Link} from 'react-router-dom';
import axios from './axiosConfig';
import "./index.css";
export default class LoginForm extends Component {
constructor(props){
super(props)
this.state = {
username: '',
password: '',
auth: null,
endpoint:... |
package net.dodogang.plume.ash;
import dev.architectury.injectables.annotations.ExpectPlatform;
import java.nio.file.Path;
public final class Environment {
private Environment() {}
@ExpectPlatform
public static boolean isDevelopmentEnvironment() {
throw new AssertionError();
}
/**
... |
python seatsInTheater.py |
#! /usr/bin/env bash
# BuildCompatible: KitCreator
pkg="tcl-socketserver"
url_prefix="https://github.com/Dash-OS/${pkg}"
### The version we want to build. This should match
### a release available in the repo releases.
### ${url_prefix}/releases
version='1.0.1';
### If the tcl package has a different version than ... |
<reponame>lgoldstein/communitychest
package com.vmware.spring.workshop.facade.web;
import java.io.IOException;
import java.util.Collection;
import javax.inject.Inject;
import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import org.apache.commons.lang3.StringUtils;
import org.springframework.... |
/***********************************************************************
* Copyright (c) 2011:
* Istituto Nazionale di Fisica Nucleare (INFN), Italy
* Consorzio COMETA (COMETA), Italy
*
* See http://www.infn.it and and http://www.consorzio-cometa.it for details on
* the copyright holders.
*
* Licensed ... |
def detect_fraud(input_data):
"""
This function takes a credit card data and detect if there is fraud
using machine learning algorithms.
Args:
input_data (list): The list of credit card data.
Returns:
int: Indicates 0 (normal) or 1 (fraudulent activity)
"""
# Your code goes here
# Extract... |
<filename>src/defaults/templates/controller.tpl.js
{{#if opts.useStrict}}
'use strict';
{{/if}}
describe('Controller: {{name}}', function () {
var $scope, {{name}}{{and arg.deps}};
beforeEach(function () {
module('{{module}}');
module(function ($provide) {
{{#each deps}}
{{> (this.partial) this}}
{{... |
package com.yoga.utility.qr.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
@Data
public class ChartDto {
@ApiModelProperty(value = "需要生成图片的二维码", required = true)
@NotBlank(message = "二维码不能为空")
private String code;
@... |
# Import necessary libraries
import dash
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output
# Initialize the Dash app
app = dash.Dash(__name__)
# Sales data
product_categories = ['Electronics', 'Clothing', 'Books', 'Home & Kitchen']
sales_figures = [3500... |
#!/bin/bash
set -e
# Start data coordinator locally and build it if necessary
REALPATH=$(python -c "import os; print(os.path.realpath('$0'))")
BINDIR=$(dirname "$REALPATH")
CONFIG=$1
if [[ -z $CONFIG ]]; then
CONFIG="$BINDIR/../configs/application.conf"
fi
JARFILE=$("$BINDIR"/build.sh "$@")
"$BINDIR"/run_migratio... |
#!/usr/bin/env bash
koopa_gnu_mirror_url() {
# """
# Get GNU FTP mirror URL.
# @note Updated 2020-04-16.
# """
koopa_assert_has_no_args "$#"
koopa_variable 'gnu-mirror-url'
return 0
}
|
<gh_stars>0
package com.player.db.dto;
import lombok.Data;
import lombok.experimental.Accessors;
import java.util.List;
@Data
@Accessors(chain = true)
public class PlayerDTO extends ContactDTO {
private ManagerDTO manager;
private LicenseDTO license;
private NationalityDTO nationality;
private List<... |
<reponame>andremasson/reactnd-project-myreads
import React, { Component } from 'react';
import PropTypes from 'prop-types';
/**
* @class
* @classdesc Componente que muda estante de um livro
* @prop {object} book - Livro ao qual esse componente pertence
* @prop {func} onMoveShelf - Ação executada ao mover de... |
const fetchUserFollowers = async(username) => {
const response = await fetch(`https://twitter.com/${username}`);
const html = await response.text();
const regex = /followers_count":(\d+)/;
const match = regex.exec(html);
return match[1];
};
const numFollowers = await fetchUserFollowers('realDonaldTrump');
co... |
<reponame>abanicaisse/travel-advisor
import React, { useEffect, useState } from "react";
import Header from "./components/Header/Header";
import List from "./components/List/List";
import Map from "./components/Map/Map";
import { getPlacesData } from "./api";
const App = () => {
const [places, setPlaces] = useStat... |
#!/bin/sh
# VERSION defines the graphloader version
# LDR defines the graphloader path
# TYPE defines the input type. Values are: TEXT, CSV, JSON, TEXTXFORM
# INPUTEXAMPLE defines the mapping example
# INPUTBASEDIR defines the main directory of the examples
# INPUTFILEDIR defines the directory of the input files
# SCRI... |
$(document).ready(function ()
{
// Submit Login Form w/ post validation
$("#loginForm").submit(function (event)
{
event.preventDefault();
$.ajax({
url: "/authenticate",
type: "POST",
cache: false,
async: false,
data: $(this).se... |
<reponame>bsisa/hbUi.geo<filename>src/main/js/hbGeoLeafletService.js
/**
* Provides helper functions for Leaflet related objects.
* `L` is freely used as abbreviation for `Leaflet`
*
* Useful references to Leaflet documentation:
* <ul>
* <li>Leaflet API Reference: http://leafletjs.com/reference.html</li>
* <li... |
#!/usr/bin/env bash
if [[ $# -eq 0 ]] ; then
echo 'No arguments provided. Please enter the ClientName'
exit 1
fi
CLIENT_NAME=$1
LOWER_CLIENT_NAME=`echo $1 | tr A-Z a-z`
composer install
php app/console kuma:generate:bundle --namespace=$CLIENT_NAME/WebsiteBundle --dir=/var/www/src --no-interaction
php app/co... |
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include "cmockery.h"
#include "c.h"
#include "../checkpointer.c"
#include "postgres.h"
#define MAX_BGW_REQUESTS 5
static void
init_request_queue(void)
{
size_t size = sizeof(CheckpointerShmemStruct) + sizeof(CheckpointerRequest)*MAX_BGW_REQUESTS;
Checkpo... |
using System;
using System.Collections.Generic;
public class ClassManager
{
public List<ClassInfo> infos = new List<ClassInfo>();
private IViewBase mView;
public IViewBase View
{
get { return mView; }
private set { mView = value; }
}
public ClassManager()
{
infos =... |
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { HomeComponent } from '../desktop-web/pages/home/home.component';
import { DesktopWebComponent } from './desktop-web/desktop-web.component';
import { BlogComponent } from './pages/blog/blog.component';
import { Sin... |
import requests
from bs4 import BeautifulSoup
url = 'https://www.nytimes.com/'
response = requests.get(url)
if response.status_code == 200:
html_data = response.text
soup = BeautifulSoup(html_data, 'html.parser')
headlines = soup.find_all('h2', {'class': 'e1voiwgp0'})
for headline in headlines[:5]:
print(head... |
#!/bin/bash -e
required_env_vars=(
"CLASSIC_SA_CONNECTION_STRING"
"STORAGE_ACCT_BLOB_URL"
"VHD_NAME"
"OS_NAME"
"OFFER_NAME"
"SKU_NAME"
"HYPERV_GENERATION"
"IMAGE_VERSION"
)
for v in "${required_env_vars[@]}"
do
if [ -z "${!v}" ]; then
if [ "$v" == "IMAGE_VERSION" ]; then
... |
import os
import logging
def check_parameter(required_params):
def decorator(func):
def func_wrapper(self, input):
missing_params = [param for param in required_params if param not in input]
if len(missing_params) > 0:
raise ValueError("Missing parameters: %s" % ", "... |
//index.js
const requestUrl = require('../../config').requestUrl
var pageIndex = 1;
var pageSize = 20;
var loadFlag = false;
var getDataList = function (that) {
if (loadFlag == false) {
loadFlag = true
wx.request({
url: requestUrl + 'wxIndex.ashx',
data: {
pageIndex: pageIndex,
... |
fn main() {
println!("Hello World!");
}
$ rustc hello_world.rs
$ ./hello_world
Hello World! |
<gh_stars>0
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = s... |
<reponame>xcfox/react-tile-pane<gh_stars>1-10
import { TileNodeRect } from '../../../../../..'
export function calcBarStyles(
{ top, left, width, height }: TileNodeRect,
offset: number,
isRow?: boolean
) {
return {
top: top * 100 + '%',
left: left * 100 + '%',
width: isRow ? undefined : width * 100... |
<gh_stars>0
import { Component, OnInit } from "@angular/core";
import { ActivatedRoute, Router } from "@angular/router";
import { UrlMapService } from "src/app/Services/url-map.service";
@Component({
selector: "app-access-url",
templateUrl: "./access-url.component.html",
styleUrls: ["./access-url.component.scss"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.