repo_name stringlengths 6 101 | path stringlengths 4 300 | text stringlengths 7 1.31M |
|---|---|---|
OliverJG/databricks-sync | tests/cleanup_workspace.py | import json
from pathlib import Path
from databricks_cli.clusters.api import ClusterApi
from databricks_cli.dbfs.api import DbfsApi, DbfsPath
from databricks_cli.groups.api import GroupsApi
from databricks_cli.instance_pools.api import InstancePoolsApi
from databricks_cli.jobs.api import JobsApi
from databricks_cli.sd... |
tusharpandey13/express-mongoose-boilerplate | src/loaders/session.js | <gh_stars>1-10
import session from 'express-session';
import { v4 as uuid } from 'uuid';
import redis from 'redis';
import connectRedis from 'connect-redis';
import { SESSION_SECRET, REDIS_HOST, REDIS_PORT } from '~/config';
export default () => {
const redisStore = connectRedis(session);
// make redis client
... |
2kyung19/Sejong_Track_Management | src/main/java/kr/ac/sejong/config/auth/CustomLogoutSuccessHandler.java | package kr.ac.sejong.config.auth;
import lombok.extern.java.Log;
import org.springframework.security.core.Authentication;
import org.springframework.security.web.authentication.logout.LogoutSuccessHandler;
import org.springframework.stereotype.Component;
import javax.servlet.ServletException;
import javax.servlet.htt... |
vikvych/hierarchy_base | Include/Memory/MemoryLib.h | #ifndef HIERARCHY_MEMORY_LIB_H
#define HIERARCHY_MEMORY_LIB_H
#include "MemoryT.h"
#include "MemoryZAlloc.h"
#include "MemoryRealloc.h"
#include "MemoryRef.h"
#include "MemoryUnref.h"
#include "MemoryRefCount.h"
#include "MemorySize.h"
#include "MemoryFill.h"
#include "MemoryDebug.h"
#include "MemoryCompare.h"
#includ... |
pexip/os-open-vm-tools | open-vm-tools/lib/include/vmci_defs.h | /*********************************************************
* Copyright (C) 2005-2017 VMware, Inc. All rights reserved.
*
* This program 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 version 2.1 an... |
ScalablyTyped/SlinkyTyped | v/vis/src/main/scala/typingsSlinky/vis/mod/Network.scala | <filename>v/vis/src/main/scala/typingsSlinky/vis/mod/Network.scala
package typingsSlinky.vis.mod
import org.scalablytyped.runtime.StringDictionary
import org.scalajs.dom.raw.HTMLElement
import typingsSlinky.vis.anon.Edges
import typingsSlinky.vis.anon.FromId
import org.scalablytyped.runtime.StObject
import scala.scala... |
isabella232/OCast-Java | core/src/main/java/org/ocast/core/media/MediaCommand.java | <reponame>isabella232/OCast-Java<filename>core/src/main/java/org/ocast/core/media/MediaCommand.java<gh_stars>1-10
/*
* Software Name : OCast SDK
*
* Copyright (C) 2017 Orange
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
... |
FuxFox/MCU | source/driver/drv_at24cxx.h | <gh_stars>0
/*******************************************************************************
*
* Module: drv_at24cxx
*
* History:
* <author> <time> <version> <desc>
* FuxFox 2019/10/16 11:16 V1.0 build this file
*
********************... |
hisaige/catfish | catfish-gateway/src/main/java/com/catfish/gateway/GateWayApplication.java | package com.catfish.gateway;
import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure;
import com.hisaige.redis.annotation.EnableRedis;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconf... |
pureza/warbots | src/main/java/io/github/pureza/warbots/ai/goal/PursueEnemyGoal.java | <gh_stars>0
package io.github.pureza.warbots.ai.goal;
import io.github.pureza.warbots.entities.Bot;
/**
* Pursues an enemy bot using the pursuit steering behavior
*
* This goal succeeds when the bot is close to the enemy and fails if the
* distance to the enemy doesn't decrease for a certain period of time.
*/
p... |
renovate-reproductions/elektra | plugins/lbaas2/app/javascript/lib/hooks/usePolling.js | <reponame>renovate-reproductions/elektra
import { useEffect } from "react";
const usePolling = ({ delay, callback, active }) => {
useEffect(() => {
if (!delay || delay <= 0 || !active) return;
const promiseCanceledError = "promiseCanceled";
let timeoutId = null;
let pollingActive = true;
let newD... |
ICT-MIRACLE-lab/YOLO_Universal_Anatomical_Landmark_Detection | universal_landmark_detection/model/datasets/__init__.py | from .cephalometric import Cephalometric
from .hand import Hand
from .chest import Chest
def get_dataset(s):
return {
'cephalometric':Cephalometric,
'hand':Hand,
'chest':Chest,
}[s.lower()]
|
PranavDherange/Data_Structures | Binary trees/levelOrderTraversal.cpp | <reponame>PranavDherange/Data_Structures
/*Level Order Traversal
Given a binary tree, print the level order traversal. Make sure each level start in new line.
Sample Input :
5 6 10 2 3 -1 -1 -1 -1 -1 9 -1 -1
Sample Output :
5
6 10
2 3
9
*/
#include <bits/stdc++.h>
using namespace std;
#include "binaryTree.h"
void p... |
ridvancakirtr/nebulabooking | backend/controllers/vesselController.js | const VesselService = require("../services/vessel-service");
const asyncErrorWrapper = require("express-async-handler");
const Vessel = require("../models/vessel");
const CustomError = require("../Helpers/error/CustomError");
const vesselService = require("../services/vessel-service");
const addVessel = asyncE... |
Taewii/java-fundamentals | Java OOP Basics/07. Polymorphism - Lab/src/p02_method_overriding/Main.java | package p02_method_overriding;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import static java.lang.System.in;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReade... |
songjachin/MwanAndroid | app/src/main/java/com/songjachin/mwanandroid/base/BaseApplication.java | <reponame>songjachin/MwanAndroid
package com.songjachin.mwanandroid.base;
import android.app.Application;
import android.content.Context;
import android.os.Handler;
import android.text.TextUtils;
import com.songjachin.mwanandroid.model.Api;
import com.songjachin.mwanandroid.model.domain.BaseResponse;
import com.songj... |
raghavsethi/prestodb-windows | skydrill-hive/src/main/java/io/panyu/skydrill/hive/metastore/AzureBlobMetastoreModule.java | <gh_stars>0
package io.panyu.skydrill.hive.metastore;
import com.facebook.presto.hive.ForCachingHiveMetastore;
import com.facebook.presto.hive.metastore.CachingHiveMetastore;
import com.facebook.presto.hive.metastore.ExtendedHiveMetastore;
import com.facebook.presto.hive.metastore.file.FileHiveMetastore;
import com.go... |
cherusker/racehog | src/SteenX/LLVM/MetadataExtractor.cpp | <reponame>cherusker/racehog<filename>src/SteenX/LLVM/MetadataExtractor.cpp
#include "SteenX/LLVM/MetadataExtractor.h"
#include "llvm/IR/DebugInfoMetadata.h"
// TODO: Avoid (some of the) duplicate code in here?
racehog::Function::MetadataReference
racehog::MetadataExtractor::
extractFrom(const llvm::Function& func) ... |
object-oriented-human/competitive | AtCoder/ABC058/B/abc058_b.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
string a, b; cin >> a >> b;
for (int i = 0; i < a.size()+b.size(); i++) {
if (i % 2 == 0) {
cout << a[i/2];
} else {
cout << b[i/2];
}
}
} |
perfeccionista-software/perfeccionista-framework | pagefactory-web-api/src/main/java/io/perfeccionista/framework/exceptions/mapper/WebExceptionMapper.java | package io.perfeccionista.framework.exceptions.mapper;
import io.perfeccionista.framework.exceptions.base.PerfeccionistaRuntimeException;
import io.perfeccionista.framework.pagefactory.elements.WebPage;
import io.perfeccionista.framework.pagefactory.elements.base.WebChildElementBase;
import org.jetbrains.annotations.N... |
loicalbertin/alien4cloud | alien4cloud-ui/src/main/webapp/scripts/components/controllers/csar_details.js | <filename>alien4cloud-ui/src/main/webapp/scripts/components/controllers/csar_details.js
define(function (require) {
'use strict';
var modules = require('modules');
var states = require('states');
require('scripts/components/services/csar');
require('scripts/common/services/websocket_services');
require('s... |
Flowdalic/pgpainless | pgpainless-core/src/main/java/org/pgpainless/decryption_verification/SignatureVerifyingInputStream.java | /*
* Copyright 2018 <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 in w... |
phatblat/macOSPrivateFrameworks | PrivateFrameworks/VideoConference/DNSSDMappingClient.h | <reponame>phatblat/macOSPrivateFrameworks<filename>PrivateFrameworks/VideoConference/DNSSDMappingClient.h
//
// Generated by class-dump 3.5 (64 bit).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by <NAME>.
//
#import "NSObject.h"
@class NSMutableArray, NSRecursiveLock, NSThread;
__attrib... |
swipswaps/olelo | plugins/security/private_wiki.rb | # -*- coding: utf-8 -*-
description 'Forbid anonymous access, redirect to login'
class ::Olelo::Application
PUBLIC_ACCESS = %w(/login)
redefine_method :include_page do |path|
User.logged_in? ? super(path) : ''
end
hook :menu, 999 do |menu|
menu.clear if menu.name == :actions && !User.logged_in?
end... |
simejisan/osip-web-app | back-end/test/function.js | <gh_stars>0
process.env.NODE_ENV = 'test';
let chai = require('chai');
let chaiHttp = require('chai-http');
let server = require('../index');
let should = chai.should();
var expect = require('chai').expect;
var superTest = require('supertest');
let Functions = require("../models/functions");
let token;
let... |
vpavlenko-cv/shared-components | stories/Table.js | <filename>stories/Table.js<gh_stars>10-100
import React from 'react';
import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import Table from 'components/Table';
storiesOf('Table', module)
.add('standard', () => (
<Table
headers={
<Table.Row>
<Ta... |
oleksiipetrovskyi/goUdemy | level9_ex5.go | <filename>level9_ex5.go
package main
import (
"fmt"
"runtime"
"sync"
"sync/atomic"
)
//Fix the race condition you created in exercise #4 by using package atomic
func main() {
fmt.Println("Goroutines:", runtime.NumGoroutine())
var lame int64
var i int64
const incr = 50
var wg sync.WaitGroup
wg.Add(incr)
... |
aanogueira/camel-k | e2e/builder/docker_hub_test.go | <reponame>aanogueira/camel-k
// +build integration
// To enable compilation of this file in Goland, go to "Settings -> Go -> Vendoring & Build Tags -> Custom Tags" and add "integration"
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distribut... |
DF4IAH/GPS-TrackMe | FindMeSAT_SW/amateurfunk-funkrufmaster_19862/src/html_forms.cpp | <reponame>DF4IAH/GPS-TrackMe<gh_stars>1-10
/****************************************************************************
* *
* *
* Copyright (C) 2002-2004 by <NAME> ... |
dinojugosloven/pymalcolm | malcolm/modules/adUtil/parts/reframepluginpart.py | <reponame>dinojugosloven/pymalcolm<gh_stars>0
from annotypes import Anno, add_call_types, Any
from malcolm.core import PartRegistrar, Context
from malcolm.modules import ADCore, scanning, builtin
with Anno("Sample frequency of ADC signal in Hz"):
ASampleFreq = float
# Pull re-used annotypes into our namespace in... |
a13m/wsdl2c | src/org/codehaus/jam/JTag.java | /* Copyright 2004 The Apache Software Foundation
*
* 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 ... |
cooperda00/mbsbkk | src/pages/index.js | //Modules
import React, { useEffect, useState } from "react"
import { graphql } from "gatsby"
//Components
import Layout from "../components/Layout/Layout"
import Features from "../components/Features2/Features"
import SEO from "../components/SEO/SEO"
import Testimonials from "../components/Testimonials/Testimonials"
i... |
onesword0618/leetcode | src/test/rangeBitwiseAnd.test.js | <reponame>onesword0618/leetcode
const rangeBitwiseAnd = require("./../main/rangeBitwiseAnd.js");
// Question
// Given two integers left and right that represent the range [left, right], return the bitwise AND of all numbers in this range, inclusive.
describe("数値範囲のビットごとのANDを返却する", () => {
describe("ra... |
Civitas-App/Civitas | client/components/Checkout/Checkout.js | import React from 'react'
// import StripeCheckout from 'react-stripe-checkout'
import {setCustomerSubscription} from '../../store/singleCustomer'
import {connect} from 'react-redux'
import ConirmationPage from '../Utility/ConirmationPage'
class Checkout extends React.Component {
constructor() {
super()
this... |
jg1uaa/NoraSeries | src/NoraCommon/src/main/java/org/jp/illg/util/irc/IRCProtocol.java | package org.jp.illg.util.irc;
import java.util.Random;
import org.jp.illg.util.irc.model.IRCMessage;
import org.jp.illg.util.irc.model.IRCMessageQueue;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.NonNull;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
@Slf4j
class IRCProtocol {
privat... |
BFNZ/bfnz | db/migrate/20150315033735_replace_ta_with_ta_id.rb | class ReplaceTaWithTaId < ActiveRecord::Migration
def up
add_column :orders, :territorial_authority_id, :integer
add_index :orders, :territorial_authority_id
Order.where('ta is not null').where(territorial_authority_id: nil).each do |order|
if ta = TerritorialAuthority.find_by_addressfinder_name(or... |
levels3d/starlark-rust | starlark/src/syntax/testcases/intellij_plugin_debug_target.bzl | <reponame>levels3d/starlark-rust
"""IntelliJ plugin debug target rule used for debugging IntelliJ plugins.
Creates a plugin target debuggable from IntelliJ. Any files in
the 'deps' attribute are deployed to the plugin sandbox.
Any files are stripped of their prefix and installed into
<sandbox>/plugins. If you need st... |
LaurensMakel1/iaf | core/src/main/java/nl/nn/adapterframework/senders/ExchangeFolderSender.java | <filename>core/src/main/java/nl/nn/adapterframework/senders/ExchangeFolderSender.java
/*
Copyright 2019 Integration Partners
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:... |
modern-resilience/solarthing | core/src/main/java/me/retrodaredevil/solarthing/commands/packets/open/ImmutableRequestHeartbeatPacket.java | <reponame>modern-resilience/solarthing
package me.retrodaredevil.solarthing.commands.packets.open;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import me.retrodaredevil.solarthing.annotations.NotNull;
import me.retrodaredevil.solarthing.type.event.feedback.... |
mojojoseph/m2m-supervisor | lib/bunyan-prettyprinter.js | <reponame>mojojoseph/m2m-supervisor<gh_stars>1-10
var _ = require('lodash');
var Stream = require('stream');
var moment = require('moment');
var names = {};
var maxLength = 0;
var entries = [];
function checkName(name) {
names[name] = true;
maxLength = Math.max(maxLength,name.length);
}
module.exports = func... |
JaneMandy/CS | org/apache/xalan/xsltc/compiler/util/StringType.java | package org.apache.xalan.xsltc.compiler.util;
import org.apache.bcel.generic.ALOAD;
import org.apache.bcel.generic.ASTORE;
import org.apache.bcel.generic.BranchHandle;
import org.apache.bcel.generic.BranchInstruction;
import org.apache.bcel.generic.CompoundInstruction;
import org.apache.bcel.generic.ConstantPoolGen;
i... |
Jaskaran197/Red-blood-cell-detection-SSD | losses/tbpp_loss.py | import tensorflow as tf
from .smooth_l1_loss import SMOOTH_L1_LOSS
from .softmax_loss import SOFTMAX_LOSS
class TBPP_LOSS:
""" Loss function as defined in the SSD paper.
Args:
- alpha: weight term from the SSD paper. Defaults to 1.
- min_negative_boxes: the minimum number of negative boxes al... |
OnionBurger/DungeonsOfPain | Morph_0_8/include/Morph/Objects/ObjButton.h | <gh_stars>0
#ifndef _MORPH_OBJ_BUTTON_H_
#define _MORPH_OBJ_BUTTON_H_
#include <Morph/Object.h>
namespace morph {
class ObjButton : public Object {
sf::Mouse::Button b;
int x, y;
bool testCollMask;
protected:
sf::Mouse::Button getMouseButton() const { return b; }
int getMouseX() const { return x; }
in... |
Mariana-Ayup/ProgramRepairGolf-DOSE2019 | client/src/components/comments/AddComment.js | import React, { Component } from 'react'
import "./Style.css"
import {FormGroup, Label, Input} from "reactstrap"
class AddComment extends Component {
state = {
title: null,
description: null,
user_id: this.props.user_id.toString(),
challenge_id:this.props.challenge_id.toString(),
}
handleChange = (e) => {
t... |
ColinW520/energyx2 | db/migrate/20170829210337_add_link_to_coaches.rb | <reponame>ColinW520/energyx2<filename>db/migrate/20170829210337_add_link_to_coaches.rb
class AddLinkToCoaches < ActiveRecord::Migration[5.0]
def change
add_column :coaches, :link, :string
end
end
|
wlyyyrl/itrs-service | src/main/java/org/wlyyy/itrs/vo/ScoreFlowListItemVo.java | <gh_stars>0
package org.wlyyy.itrs.vo;
import org.wlyyy.itrs.domain.ScoreFlow;
import java.text.SimpleDateFormat;
/**
* 展示层用户积分变动流水记录对象
*
* @author wly
*/
public class ScoreFlowListItemVo {
public static ScoreFlowListItemVo buildFromDomain(ScoreFlow source) {
final SimpleDateFormat formatter = new S... |
maidiHaitai/haitaibrowser | tools/android/loading/sandwich_metrics.py | # Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Pull a sandwich run's output directory's metrics from traces into a CSV.
python pull_sandwich_metrics.py -h
"""
import collections
import json
import lo... |
go-kivik/kivikexp | cmd/kivik/output/friendly/friendly.go | <reponame>go-kivik/kivikexp
// 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,... |
pxladin/replay-reader | Classes/DebugObject.js | <reponame>pxladin/replay-reader
const Replay = require("../src/Classes/Replay");
const FGameplayTag = require("./FGameplayTag");
const FGameplayTagContainer = require("./FGameplayTagContainer");
const FName = require("./FName");
const FRepMovement = require("./FRepMovement");
const ItemDefinition = require("./ItemDefin... |
sunmoon11/zoomtechnica.com | wp-content/themes/cherryframework4/lib/assets/js/script.js | <gh_stars>0
/**
* Cherry framework script inits
*/
(function($){
"use strict";
CHERRY_API.utilites.namespace('tools.popup');
CHERRY_API.utilites.namespace('tools.slider');
CHERRY_API.utilites.namespace('tools.stickup');
CHERRY_API.utilites.namespace('tools.navigation');
// Init magnific popup
CHERRY_API.too... |
Scorbutics/skalang | bytecode/interpreter/src/BytecodeInterpreter/BytecodeInterpreter.cpp | #include "Config/LoggerConfigLang.h"
#include "BytecodeInterpreter.h"
#include "NodeValue/AST.h"
#include "BytecodeScript.h"
#include "Generator/Value/BytecodeGenerationOutput.h"
#include "Generator/BytecodeGenerator.h"
#include "Units/InterpreterCommandMov.h"
#include "Units/InterpreterCommandAddI.h"
#include "Units... |
TheAmeliaDeWitt/YAHoneyPot | modules/MarchCommand/src/main/java/com/marchnetworks/management/configmerge/ConfigurationMergeServiceImpl.java | <reponame>TheAmeliaDeWitt/YAHoneyPot
package com.marchnetworks.management.configmerge;
import com.marchnetworks.management.config.DeviceSnapshotState;
import com.marchnetworks.management.configmerge.parse.BaseParser;
import com.marchnetworks.management.configmerge.parse.CRSParser;
import com.marchnetworks.management.c... |
GlassSources/ProjectL | src/net/lightstone/net/codec/DestroyEntityCodec.java | <filename>src/net/lightstone/net/codec/DestroyEntityCodec.java<gh_stars>10-100
package net.lightstone.net.codec;
import java.io.IOException;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import net.lightstone.msg.DestroyEntityMessage;
public final class DestroyEntityCode... |
omar-moreno/lcsim | trf/src/main/java/org/lcsim/recon/tracking/trfzp/HitZPlane1.java | package org.lcsim.recon.tracking.trfzp;
import org.lcsim.recon.tracking.trfutil.Assert;
import org.lcsim.recon.tracking.trfbase.Hit;
import org.lcsim.recon.tracking.trfbase.HitVector;
import org.lcsim.recon.tracking.trfbase.HitError;
import org.lcsim.recon.tracking.trfbase.HitDerivative;
import org.lcsim.recon.track... |
supersandra/golang-samples | dlp/snippets/inspect/inspect_text_file.go | // Copyright 2019 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 applicable law or agreed to in ... |
redhatanalytics/oshinko-cli | vendor/github.com/openshift/origin/pkg/build/builder/vendor/github.com/kubernetes-incubator/cri-o/cmd/kpod/images.go | package main
import (
"reflect"
"strings"
"github.com/containers/storage"
"github.com/kubernetes-incubator/cri-o/cmd/kpod/formats"
libpod "github.com/kubernetes-incubator/cri-o/libpod/images"
digest "github.com/opencontainers/go-digest"
"github.com/pkg/errors"
"github.com/urfave/cli"
)
var (
imagesFlags = [... |
kkcookies99/UAST | Dataset/Leetcode/test/125/272.js | <gh_stars>0
var XXX = function(s) {
let decodeString = s.replace(/[^0-9a-zA-Z]/g, '').toLowerCase();
return decodeString === decodeString.split('').reverse().join('');
};
|
VishalKandala/Cantera-1.7 | Cantera/src/Phase.h | /**
* @file Phase.h
*/
/*
* $Author: hkmoffa $
* $Revision: 1.13 $
* $Date: 2006/06/23 20:35:16 $
*/
// Copyright 2001 California Institute of Technology
#ifndef CT_PHASE_H
#define CT_PHASE_H
#include "State.h"
#include "Constituents.h"
#include "vec_functions.h"
#include "ctml.h"
using... |
ftconan/javascript | js_notes/js_func/map_reduce.js | /*
@author: magician
@file: map_reduce.js
@date: 2020/1/19
*/
'use strict';
function pow(x) {
return x * x;
}
let arr = [1, 2, 3, 4, 5, 6, 7, 8, 9];
let results = arr.map(pow);
console.log(results);
let f = function (x) {
return x * x;
};
let result = [];
for (let i = 0; i < arr.length; i++) {
result... |
zengfanmao/mpds | LiveVideoApp/ptt/src/main/java/com/aimissu/ptt/entity/ui/AudioDetail.java | <gh_stars>0
package com.aimissu.ptt.entity.ui;
public class AudioDetail {
public String conference_uuid;
public String conference_name;
public String startor;
public String listener;
public String event_name;
public String event_time;
public String content;
public String getConference... |
xresco/Android-Agile-Boiler-Plate | app/src/androidTest/java/com/abed/assignment/testCase/ExampleInstrumentationTest.java | package com.abed.assignment.testcase;
import android.support.test.filters.MediumTest;
import android.support.test.rule.ActivityTestRule;
import android.support.test.runner.AndroidJUnit4;
import android.view.KeyEvent;
import android.widget.EditText;
import com.abed.assignment.R;
import com.abed.assignment.assertion.Re... |
Everylisy/carrerCare | front/src/components/project/ProjectAddForm.js | <filename>front/src/components/project/ProjectAddForm.js
import React, { useState } from 'react';
import { Button, Form, Card, Col, Row } from 'react-bootstrap';
import DatePicker from 'react-datepicker';
import * as Api from '../../api';
import PrivateCheck from '../private/PrivateCheck';
/**
* isAdding이 true일 경우 활성... |
its-parmiss/Bid | src/main/java/rahnema/tumaj/bid/backend/services/category/CategoryServiceImpl.java | <filename>src/main/java/rahnema/tumaj/bid/backend/services/category/CategoryServiceImpl.java<gh_stars>0
package rahnema.tumaj.bid.backend.services.category;
import org.springframework.stereotype.Service;
import rahnema.tumaj.bid.backend.domains.Category.CategoryInputDTO;
import rahnema.tumaj.bid.backend.domains.Catego... |
wudenggang/mindspore | model_zoo/alexnet/src/alexnet.py | <filename>model_zoo/alexnet/src/alexnet.py
# Copyright 2020 Huawei Technologies Co., Ltd
#
# 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
#
# Unl... |
Glavo/kala-common | src/test/java/kala/collection/SimpleIterable.java | package kala.collection;
import org.jetbrains.annotations.NotNull;
import java.util.Iterator;
@SuppressWarnings("unchecked")
public final class SimpleIterable<E> implements Iterable<E> {
private final Iterable<? extends E> source;
public SimpleIterable(Iterable<? extends E> source) {
this.source = s... |
keitan339/variable-name-builder | variable-name-builder-core/src/main/java/info/tsubame/dev/tool/vnb/component/ma/MorphologicalAnalyzer.java | package info.tsubame.dev.tool.vnb.component.ma;
import java.io.IOException;
import java.io.InputStream;
import java.io.SequenceInputStream;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework... |
yongjhih/hivemq-community-edition | src/test/java/com/hivemq/logging/NettyLogLevelModifierTest.java | /*
* Copyright 2019 dc-square GmbH
*
* 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 agree... |
4653478/bootplus | src/main/java/com/age/service/SysUserService.java | <reponame>4653478/bootplus
package com.age.service;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.IService;
import com.age.entity.SysUserEntity;
import java.util.List;
/**
* 系统用户
*
* @author age
* @Email <EMAIL>
*/
public interface SysUserService extends IService<SysUserE... |
devshiro/cord3c-project | cord3c-ssi-serialization/src/main/java/io/cord3c/ssi/corda/internal/information/VerifiableCredentialInformation.java | <reponame>devshiro/cord3c-project
package io.cord3c.ssi.corda.internal.information;
import lombok.Data;
import java.time.Instant;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
@Data
public class VerifiableCredentialInformation {
private Class<?> implementa... |
smarthi/milan | milan/milan-flink/src/main/scala/com/amazon/milan/flink/application/sources/FlinkKinesisDataSource.scala | package com.amazon.milan.flink.application.sources
import java.util.Properties
import com.amazon.milan.dataformats.DataFormat
import com.amazon.milan.flink.RuntimeEvaluator
import com.amazon.milan.flink.application.FlinkDataSource
import com.amazon.milan.serialization.ScalaObjectMapper
import com.amazon.milan.typeuti... |
SophistSolutions/Stroika | Library/Sources/Stroika/Foundation/IO/Network/ConnectionlessSocket.h | /*
* Copyright(c) Sophist Solutions, Inc. 1990-2021. All rights reserved
*/
#ifndef _Stroika_Foundation_IO_Network_ConnectionlessSocket_h_
#define _Stroika_Foundation_IO_Network_ConnectionlessSocket_h_ 1
#include "../../StroikaPreComp.h"
#include "Socket.h"
namespace Stroika::Foundation::IO::Network {
using ... |
roc-wong/sky-framework | sky-test/src/main/java/org/sky/framework/test/concurrent/GetAccessTokenTest.java | <filename>sky-test/src/main/java/org/sky/framework/test/concurrent/GetAccessTokenTest.java
package org.sky.framework.test.concurrent;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.testng.annotations.Test;
import java.util.concurrent.atomic.LongAdder;
/**
* @author roc
* @since 2019/8/20 19:28... |
alphagov-mirror/digitalmarketplace-scripts | scripts/oneoff/handle_too_many_g12_recovery_services.py | <reponame>alphagov-mirror/digitalmarketplace-scripts<filename>scripts/oneoff/handle_too_many_g12_recovery_services.py
#!/usr/bin/env python
"""
Process the output of `get_g12_recovery_services.py`. For services with multiple drafts, choose the one with the most
completed answers. If there is a tie, the winner will be c... |
Sciumo/lib-openssrf | src/main/java/us/gov/dod/standard/ssrf/_3_1/antenna/Nomenclature.java | /*
* Copyright 2015 Key Bridge 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... |
snowdreams1006/learn-python | src/url/urllib/exercise.py | <reponame>snowdreams1006/learn-python<filename>src/url/urllib/exercise.py
# -*- coding: utf-8 -*-
import urllib
import urllib2
import json
def get_github_emojis_urllib2():
'''
Lists all the emojis available to use on GitHub.
'''
response = urllib2.urlopen('https://api.github.com/emojis')
print('>>>... |
jefschaerz/ITActionsManager-Rails-2021 | app/controllers/intervention_states_controller.rb | <gh_stars>0
class InterventionStatesController < ApplicationController
before_action :set_intervention_state, only: %i[ show edit update destroy ]
# GET /intervention_states or /intervention_states.json
def index
@intervention_states = InterventionState.all
end
# GET /intervention_states/1 or /intervent... |
Adriani277/izumi | logstage/logstage-core/.js/src/main/scala/izumi/logstage/sink/QueueingSink.scala | <filename>logstage/logstage-core/.js/src/main/scala/izumi/logstage/sink/QueueingSink.scala
package izumi.logstage.sink
import izumi.fundamentals.platform.language.Quirks
import izumi.logstage.api.Log
import izumi.logstage.api.logger.LogSink
import scala.concurrent.duration._
class QueueingSink(target: LogSink, sleep... |
thgcode/synthizer | src/stereo_panner.cpp | <filename>src/stereo_panner.cpp
#include "synthizer/math.hpp"
#include "synthizer/stereo_panner.hpp"
#include <array>
#include <cassert>
#include <math.h>
#include <tuple>
namespace synthizer {
unsigned int StereoPanner::getOutputChannelCount() {
return CHANNELS;
}
unsigned int StereoPanner::getLaneCount() {
retu... |
CraigMcDonaldCodes/quarkus | core/deployment/src/main/java/io/quarkus/deployment/util/UriNormalizationUtil.java | <gh_stars>1-10
package io.quarkus.deployment.util;
import java.net.URI;
import java.net.URISyntaxException;
/**
* Common URI path resolution
*/
public class UriNormalizationUtil {
private UriNormalizationUtil() {
}
/**
* Create a URI path from a string. The specified path can not contain
* re... |
huturen/http-request-mock | test/interceptor.test.js |
import HttpRequestMock from '../src/index';
import FetchInterceptor from '../src/interceptor/fetch';
import NodeHttpAndHttps from '../src/interceptor/node/http-and-https';
import WxInterceptor from '../src/interceptor/wx-request';
import XhrInterceptor from '../src/interceptor/xml-http-request';
describe('test interc... |
imxiangpeng/webrtc | modules/rtp_rtcp/source/rtp_format_vp8_test_helper.cc | /*
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contribut... |
keyboardWithDream/jpkc | src/main/java/com/study/jpkc/mapper/SectionCommentMapper.java | <filename>src/main/java/com/study/jpkc/mapper/SectionCommentMapper.java
package com.study.jpkc.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.study.jpkc.entity.SectionComm... |
yunfeiyang1916/toolkit | metrics/falcon.go | package metrics
import (
"bytes"
"fmt"
"log"
"net/http"
"os"
"runtime"
"strconv"
"strings"
"sync"
"sync/atomic"
"time"
"unsafe"
jsoniter "github.com/json-iterator/go"
"github.com/rcrowley/go-metrics"
"github.com/yunfeiyang1916/toolkit/rolling"
)
var (
defaultRegistryInit int32
defaultReporterMutex ... |
rldhks8745/place-it | app/src/main/java/com/mini_mo/viewpager/DAO/ReadBoardInfo.java | <reponame>rldhks8745/place-it
package com.mini_mo.viewpager.DAO;
import java.util.ArrayList;
/**
* Created by sasor on 2018-04-29.
*/
public class ReadBoardInfo {
//글보기 클래스 : ReadActivity
//써야될 자료들
public String user_id;
public String user_photo;
public int board_num;
public String conten... |
eenurkka/incubator-nuttx | boards/arm/stm32/emw3162/src/stm32_wlan_firmware.c | <gh_stars>1000+
/****************************************************************************
* boards/arm/stm32/photon/src/stm32_wlan_firmware.c
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
*... |
ktrzeciaknubisa/jxcore-binary-packaging | deps/mozjs/incs/nss/nss/lib/freebl/mpi/mpi.h | /*
* mpi.h
*
* Arbitrary precision integer arithmetic library
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef _H_MPI_
#define _H_MPI_
#include "m... |
whitfin/spack | var/spack/repos/builtin/packages/ndiff/package.py | <filename>var/spack/repos/builtin/packages/ndiff/package.py
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Ndiff(Package):
"""The ndiff t... |
markosej11/ackermann_controller | doxygen/html/dir_c5da75fdc1d6c57999112ed830c87a3c.js | var dir_c5da75fdc1d6c57999112ed830c87a3c =
[
[ "googletest", "dir_21d9cae34c455e00478ef588694576aa.html", "dir_21d9cae34c455e00478ef588694576aa" ]
]; |
alex-rudyak-dls/DLS-SWAPIServices | Pod/Classes/Services/DLSAppointmentsService.h | <reponame>alex-rudyak-dls/DLS-SWAPIServices
//
// DLSAppointmentRequestsService.h
// south-worcestershire
//
// Created by <NAME> on 12/9/15.
// Copyright © 2015 Digital Life Science. All rights reserved.
//
#import "DLSEntityAbstractService.h"
@class DLSAppointmentObject;
@class DLSAnonymousAppointmentObject;
@... |
Philip-Trettner/clean-core | src/clean-core/allocators/system_allocator.cc | #include <clean-core/allocator.hh>
namespace
{
/// system provided allocator (malloc / free)
struct system_allocator_t final : cc::allocator
{
std::byte* alloc(size_t size, size_t align = alignof(std::max_align_t)) override
{
#ifdef CC_OS_WINDOWS
return static_cast<std::byte*>(::_aligned_malloc(size, ... |
git-bit-code/competetive_coding | codewars/createPhoneNumber.py | def create_phone_number(n):
#your code here
s = ''
for i in n:
s+=str(i)
t = "(" + s[:3]+")" + " " +s[3:6] + "-" + s[6:]
return t
print(create_phone_number([1, 2, 3, 4, 5, 6, 7, 8, 9, 0]))
print(create_phone_number(list(map(int,input().split())))) |
graphisoft-python/TextEngine | Support/Modules/UDLib/UDAutoTestSupport.hpp | <filename>Support/Modules/UDLib/UDAutoTestSupport.hpp<gh_stars>1-10
// *********************************************************************************************************************
// File: UDAutoTestSupport.hpp
//
// Description: Support functions for the AutoTest system
//
// Project: GRAPHISOFT Dialog M... |
petrandreev/nosql-unit | nosqlunit-marklogic/src/test/java/com/lordofthejars/nosqlunit/marklogic/integration/WhenDatabaseClientIsAnnotatedWithInject.java | package com.lordofthejars.nosqlunit.marklogic.integration;
import com.lordofthejars.nosqlunit.marklogic.ManagedMarkLogic;
import com.lordofthejars.nosqlunit.marklogic.MarkLogicConfiguration;
import com.lordofthejars.nosqlunit.marklogic.MarkLogicRule;
import com.marklogic.client.DatabaseClient;
import org.junit.Before... |
amida-tech/indaba | source/builder/src/com/ocs/indaba/action/CommPanelAction.java | /**
* Copyright 2010 OpenConcept Systems,Inc. All rights reserved.
*/
package com.ocs.indaba.action;
import static com.ocs.indaba.action.BaseAction.PARAM_HORSE_ID;
import static com.ocs.indaba.action.BaseAction.PARAM_QUESTION_ID;
import com.ocs.indaba.common.Constants;
import com.ocs.indaba.service.CommPanelService;... |
manaskamal/aurora-xeneva | Aurora/include/drivers/svga/gmr.h | <gh_stars>1-10
/**
* Copyright (C) <NAME> 2021
*
* gmr.h -- VMware Guest Memory
*
* /PROJECT - Aurora {Xeneva}
* /AUTHOR - <NAME>
*
* ==============================================
*/
#ifndef __GMR_H__
#define __GMR_H__
#include <arch\x86_64\mmngr\kheap.h>
#include <drivers\svga\svga_reg.h>
#include <... |
jpgarcia/azure-sdk-for-node | test/services/table/querytablesresultcontinuation-tests.js | <reponame>jpgarcia/azure-sdk-for-node
/**
* Copyright 2011 Microsoft Corporation
*
* 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 req... |
hao44le/CS473HW4-Galago-3.10 | tupleflow-typebuilder/src/test/java/org/lemurproject/galago/tupleflow/typebuilder/ParserTest.java | package org.lemurproject.galago.tupleflow.typebuilder;
import org.antlr.runtime.ANTLRStringStream;
import org.antlr.runtime.CommonTokenStream;
import org.antlr.runtime.RecognitionException;
import org.junit.Test;
import org.lemurproject.galago.tupleflow.typebuilder.FieldSpecification.DataType;
import static org.junit... |
aiw-google/openweave-core | src/device-manager/WoBleTest.cpp | /*
*
* Copyright (c) 2014-2017 <NAME>, Inc.
* 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.... |
OSP4DISS/SistemOperasiDev | Demos/Week07/00-thread.c | <filename>Demos/Week07/00-thread.c
/*
* Copyright (C) 2015-2020 <NAME>
* http://rahmatm.samik-ibrahim.vlsm.org/
* This program is free script/software. This program is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR... |
kimking2020/base | jmh/src/test/java/jmh/JmhDECTest.java | <filename>jmh/src/test/java/jmh/JmhDECTest.java
package jmh;
/**
* <p>
*
* @author kim
* @date 2021/1/18
*/
import org.openjdk.jmh.annotations.*;
import org.openjdk.jmh.infra.Blackhole;
import org.openjdk.jmh.runner.RunnerException;
import java.util.concurrent.TimeUnit;
/**
* 死码消除
*/
@BenchmarkMode( Mode.Ave... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.