repo_name stringlengths 6 101 | path stringlengths 4 300 | text stringlengths 7 1.31M |
|---|---|---|
mcopik/perf-taint | benchmarks/milc/milc_qcd-7.8.1/generic_form/load_momentum.c | <filename>benchmarks/milc/milc_qcd-7.8.1/generic_form/load_momentum.c
/**************************** load_momentum.c ****************************/
/* MIMD version 7 */
/*
* Scalar code to load in the spatial momentum from a disk file.
*
* The total number of momentum components is returned
*/
#include "generic_fo... |
Dbevan/SunderingShadows | d/shadow/room/farm/room/kitchen.c | #include <std.h>
#include "../farm.h"
inherit ROOM;
void create(){
::create();
set_property("indoors",1);
set_property("light",1);
set_property("no sticks",1);
set_terrain(CITY);
set_travel(PAVED_ROAD);
set_name("%^CYAN%^Piaf Huffelmuffin's Kitchen");
set_short("%^CYAN%^Piaf Huffelmuffin's... |
Mr-Hei7enberg/google-apps-script-snippets | snippets/standalone/standalone_ramda-demo/ramda-demo.js | <reponame>Mr-Hei7enberg/google-apps-script-snippets
/* globals R */
/**
*
*/
function run() {
// `prop` takes two arguments. If I just give it one, I get a function back
var moo = R.prop('moo');
// when I call that function with one argument, I get the result.
var value = moo({ moo: 'cow' }); // => 'cow'
L... |
phax/ph-masterdata | ph-masterdata/src/main/java/com/helger/masterdata/telephone/TelephoneNumberMicroTypeConverter.java | <gh_stars>1-10
/*
* Copyright (C) 2014-2021 <NAME> (www.helger.com)
* philip[at]helger[dot]com
*
* 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/licens... |
svvladimir-ru/ugc_sprint_1 | services/kafka_to_clickhouse/kafka_to_clickhouse/conf.py | <filename>services/kafka_to_clickhouse/kafka_to_clickhouse/conf.py
from pydantic import BaseSettings, PyObject
from typing import Any
class Settings(BaseSettings):
KAFKA_HOST: str = '0.0.0.0'
KAFKA_PORT: int = 9092
kafka_group: str = 'from-kafka-to-clickhouse-etl'
CLICKHOUSE_HOST: str = '0.0.0.0'
... |
DanilDr/Dota2Guide | Dota2Guide/src/ru/russianbravedev/dotamania/SteamInventory.java | package ru.russianbravedev.dotamania;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import org.json.JSONException;
import org.json.JSONObject;
import ru.russianbravedev.dotamania.R;
import com.danildr.androidcomponents.LoadingJSONfro... |
vemaeg/urlaubsverwaltung | src/test/java/org/synyx/urlaubsverwaltung/web/AbstractNoResultFoundExceptionTest.java | <reponame>vemaeg/urlaubsverwaltung
package org.synyx.urlaubsverwaltung.web;
import org.junit.Assert;
import org.junit.Test;
public class AbstractNoResultFoundExceptionTest {
@Test
public void ensureCorrectExceptionMessage() {
TestException exception = new TestException(42, "person");
Asser... |
janbodnar/Java-Advanced | UniqueNames.java | package com.zetcode;
import java.util.ArrayList;
import java.util.List;
public class UniqueNames {
public static void main(String[] args) {
List<String> names = List.of("Martin", "Lucy", "Peter",
"Martin", "Robert", "Peter");
List<String> uniqueNames = new ArrayList<>();
... |
sonali-mishra-22/arangodb | arangod/Aql/ConditionFinder.cpp | <gh_stars>1-10
////////////////////////////////////////////////////////////////////////////////
/// DISCLAIMER
///
/// Copyright 2014-2016 ArangoDB GmbH, Cologne, Germany
/// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use t... |
gaybro8777/usaspending-api | usaspending_api/common/sqs_helpers.py | <filename>usaspending_api/common/sqs_helpers.py<gh_stars>0
import boto3
from django.conf import settings
def get_sqs_queue_resource(queue_name, region_name=None):
"""
return a boto3 SQS queue by providing a SQS queue name
"""
aws_region = region_name or settings.USASPENDING_AWS_REGION
sqs_res... |
scmilee/elrn-universal-wallet | src/components/ShapeShiftTo.js | <reponame>scmilee/elrn-universal-wallet
import React from 'react'
import { connect } from 'react-redux'
import SwipeableViews from 'react-swipeable-views'
import { generateWalletAddress } from '../actions/walletActions'
import { setShapeShiftToSymbol } from '../actions/shapeShiftActions'
import ShapeShiftToSymbol from ... |
iotauth/iotauth | entity/node/accessors/SecureCommServer.js | /*
* Copyright (c) 2016, Regents of the University of California
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, t... |
nowkoai/test | app/services/bulk_imports/lfs_objects_export_service.rb | # frozen_string_literal: true
module BulkImports
class LfsObjectsExportService
include Gitlab::ImportExport::CommandLineUtil
BATCH_SIZE = 100
def initialize(portable, export_path)
@portable = portable
@export_path = export_path
@lfs_json = {}
end
def execute
portable.lf... |
ldqcarbon/RTK | code/rtkFourDSARTConeBeamReconstructionFilter.hxx | <filename>code/rtkFourDSARTConeBeamReconstructionFilter.hxx
/*=========================================================================
*
* Copyright RTK Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may ... |
wuweiweiwu/babel | packages/babel-parser/test/fixtures/flow/classes/good_01/input.js | <reponame>wuweiweiwu/babel
class C { field:*=null }
|
BrUnOXaVIeRLeiTE/Unreal-Magic-Nodes-CS | Plugins/MagicNodeSharp/Source/MagicNodeSharpEditor/Private/CS_Toolkit.cpp | <reponame>BrUnOXaVIeRLeiTE/Unreal-Magic-Nodes-CS
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////... |
intj-t/openvmsft | WRK-V1.2/TOOLS/crt/src/a_loc.c | <reponame>intj-t/openvmsft<gh_stars>1-10
/***
*a_loc.c - A versions of GetLocaleInfo.
*
* Copyright (c) Microsoft Corporation. All rights reserved.
*
*Purpose:
* Use either GetLocaleInfoA or GetLocaleInfoW depending on which is
* available
*
************************************************************... |
mibac138/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/description/enumeration/package-info.java | <reponame>mibac138/byte-buddy<filename>byte-buddy-dep/src/main/java/net/bytebuddy/description/enumeration/package-info.java
/**
* A package that contains classes for describing enumeration values.
*/
package net.bytebuddy.description.enumeration;
|
edude545/system0 | src/main/java/net/ethobat/system0/auxiliary/S0ArmorItem.java | package net.ethobat.system0.auxiliary;
import net.ethobat.system0.System0;
import net.ethobat.system0.registry.S0Registrar;
import net.minecraft.entity.EquipmentSlot;
import net.minecraft.item.ArmorItem;
import net.minecraft.item.ArmorMaterial;
public class S0ArmorItem extends ArmorItem implements IS0Item {
publ... |
GrapeCity/ComponentOne-ASPNET-MVC-Samples | HowTo/FlexGrid/FilterPanel/FilterPanel/wwwroot/js/FilterPanel.js | <gh_stars>1-10
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b... |
tt-arcade/fba-pi | src/intf/input/inp_keys.cpp | #include <cstddef>
#include "string.h"
#include "inp_keys.h"
struct Input {
const char *name;
const int code;
};
#define P2_JOY 0x4000
#define P3_JOY 0x4100
#define P4_JOY 0x4200
static const Input allInputs[] = {
// Generic
{ "P1 START", FBK_1, },
{ "P2 START", FBK_2, },
{ "P1 COIN", FBK_5, },
{ "P2 COIN", ... |
vigneshwarrvenkat/Salud-EndUser-App | DropDownViewCell.h | <filename>DropDownViewCell.h
//
// DropDownViewCell.h
// Salud Juicery ios
//
// Created by Sal<NAME> (Vigneshwarr)on 10/23/15.
// Copyright (c) 2015 Salud Juice Team. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface DropDownViewCell : UITableViewCell
@end |
plamenborachev/My_JS_Advanced_October2018 | 07.Classes-and-Members-Lab/P05-Point-Distance/pointClass.js | <gh_stars>1-10
class Point {
constructor(x, y) {
this.x = x;
this.y = y;
}
static distance(a, b) {
const dx = a.x - b.x;
const dy = a.y - b.y;
return Math.hypot(dx, dy);
}
}
module.exports = {Point}; |
uw-it-aca/service-endorsement | endorsement/util/persistent_messages.py | # Copyright 2021 UW-IT, University of Washington
# SPDX-License-Identifier: Apache-2.0
from persistent_message.models import Message
import hashlib
def get_persistent_messages(tags, params):
ret = {}
for message in Message.objects.active_messages(tags=tags):
level = message.get_level_display().lower(... |
lexctk/SylAlexCenter | src/fr/sorbonne_u/datacenter/hardware/tests/TestsComputer.java | <reponame>lexctk/SylAlexCenter
package fr.sorbonne_u.datacenter.hardware.tests;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import fr.sorbonne_u.components.AbstractComponent;
import fr.sorbonne_u.components.connectors.DataConnector;
import fr.sorbonne_u.components.cv... |
m-lab/epoxy | storage/datastore_test.go | // Copyright 2016 ePoxy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to i... |
gaaf/gotransip | ipaddress/ipaddress.go | package ipaddress
import (
"net"
)
// IPAddress struct for an IPAddress
type IPAddress struct {
// The IP address
Address net.IP `json:"address"`
// The TransIP DNS resolvers you can use
DNSResolvers []net.IP `json:"dnsResolvers,omitempty"`
// Gateway
Gateway net.IP `json:"gateway,omitempty"`
// Reverse DNS, ... |
livehybrid/addonfactory-ucc-generator | splunk_add_on_ucc_framework/UCC-UI-lib/bower_components/SplunkWebCore/search_mrsparkle/exposed/js/contrib/jg_lib/utils/ObjectUtil.js | /*!
* Copyright (c) 2007-2016 <NAME>
*
* Released under the MIT license:
* http://opensource.org/licenses/MIT
*/
define(function(require, exports, module)
{
var Class = require("../Class");
return Class(module.id, function(ObjectUtil)
{
// Private Static Properties
var _hasOwnProperty = Object.prototyp... |
janfb/sbibm | sbibm/algorithms/pytorch/__init__.py | from sbibm.algorithms.pytorch.baseline_grid import run as baseline_grid
from sbibm.algorithms.pytorch.baseline_posterior import run as baseline_posterior
from sbibm.algorithms.pytorch.baseline_prior import run as baseline_prior
from sbibm.algorithms.pytorch.baseline_rejection import run as baseline_rejection
from sbibm... |
Bhpsngum/Uranus-Starblast-Prototypes | systems/hangars/hangars.js | <reponame>Bhpsngum/Uranus-Starblast-Prototypes
sp.hangarsManager = {
hangars: [],
init:function(ship){
//TODO: each ship should be provided with a global unique identifier
ship.custom.hangarSys = {
hangar: null,
}
},
validateHangar:function(ship){
if(ship.custom.hangarSys!=n... |
caffeinate/gwt-map-scratch | src/uk/co/plogic/gwt/lib/map/overlay/Points.java | package uk.co.plogic.gwt.lib.map.overlay;
import java.util.HashMap;
import uk.co.plogic.gwt.lib.events.MapViewChangedEvent;
import uk.co.plogic.gwt.lib.events.MapViewChangedEventHandler;
import uk.co.plogic.gwt.lib.map.MapUtils;
import uk.co.plogic.gwt.lib.map.markers.IconMarker;
import uk.co.plogic.gwt.lib.map.marke... |
Secure-Labs/nextgen | tests/mutate/unit/tests.c | /*
* Copyright (c) 2017, <NAME>, Minneapolis, MN
*
* Permission to use, copy, modify, and/or distribute this software for any purpose
* with or without fee is hereby granted, provided that the above copyright notice
* and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE A... |
janyman/wish-c99 | src/wish_connection_mgr.c | /**
* Copyright (C) 2018, ControlThings Oy Ab
* Copyright (C) 2018, <NAME>
* Copyright (C) 2018, <NAME>
* Copyright (C) 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
*... |
npocmaka/Windows-Server-2003 | multimedia/directx/dplay/dvoice/common/dndbg.h | <gh_stars>10-100
/*==========================================================================
*
* Copyright (C) 1999 - 2001 Microsoft Corporation. All Rights Reserved.
*
* File: dndbg.h
* Content: debug support functions for DirectNet
*
* History:
* Date By Reason
* ==== == ====... |
datasalt/pangool | core/src/test/java/com/datasalt/pangool/tuplemr/mapred/lib/input/TestCascadingTupleInputFormat.java | <gh_stars>1-10
package com.datasalt.pangool.tuplemr.mapred.lib.input;
import static org.junit.Assert.*;
import java.io.File;
import java.io.IOException;
import java.io.Serializable;
import java.nio.charset.Charset;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.... |
msztylko/CS-programming-with-a-purpose | w03-arrays/extra/MostLikelyRoll.java | public class MostLikelyRoll {
public static void main(String[] args) {
int SIDES = 6;
int TARGET = 12;
int trials = Integer.parseInt(args[0]); // number of trials
int[] freq = new int[TARGET + SIDES + 1];
for (int t = 1; t <= trials; t++) {
int sum = 0;
... |
Kashif-Rabbani/ODIN | MetadataFrontend/public/js/client_view_wrapper.js | <filename>MetadataFrontend/public/js/client_view_wrapper.js
/**
* Created by snadal on 07/06/16.
*/
function getParameterByName(name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(location.search);
return r... |
AJAkimana/todo-app | __tests__/todo.js | <reponame>AJAkimana/todo-app
import chai from 'chai';
import chaiHttp from 'chai-http';
import app from '../app';
import { Todo } from '../models';
const { expect } = chai;
chai.use(chaiHttp);
const todoDb = new Todo();
let todoId = null;
const mockedTodo = { title: 'test', description: 'test', priority: 'LOW' };
de... |
Machiry/checkedc-clang | mlir/include/mlir/Dialect/OpenMP/OpenMPDialect.h | <filename>mlir/include/mlir/Dialect/OpenMP/OpenMPDialect.h
//===- OpenMPDialect.h - MLIR Dialect for OpenMP ----------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-... |
geoff5802/liftie | test/resorts/sugarbowl.js | <reponame>geoff5802/liftie
const lifts = require('../lifts');
lifts('sugarbowl', 'html', {
'Lincoln Express': 'scheduled',
'Judah Express': 'scheduled',
'Disney Express': 'scheduled',
'Summit Chair': 'closed',
'Christmas Tree Express': 'scheduled',
'Crow\'s Peak': 'scheduled',
'Jerome Hill Express': 'sch... |
Thanasis17m/RentRoom-website | src/servlets/InsertNewMessageServlet.java | package servlets;
import java.io.IOException;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import ... |
AsahiOS/gate | usr/src/cmd/scsi/sestopo/common/sestopo.c | <filename>usr/src/cmd/scsi/sestopo/common/sestopo.c
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at us... |
dedep/bonobo | app/db/row/mapper/BaseRowMapper.scala | <filename>app/db/row/mapper/BaseRowMapper.scala<gh_stars>0
package db.row.mapper
import db.row.model.BaseRow
abstract class BaseRowMapper[A] {
def fromEntity(entity: A): BaseRow[A]
}
|
raylia-w/workspace | UML Lab Shop Example/src/com/yattasolutions/umllab/examples/shop/Human.java | package com.yattasolutions.umllab.examples.shop;
import javax.persistence.Entity;
@Entity
public interface Human {
public int getAge();
public String getGender();
public String getName();
public void setAge(int value);
public void setGender(String value);
public void setName(String value);
}
|
yumin/SMTK | smtk/bridge/cgm/operators/CreateEdge.cxx | //=========================================================================
// Copyright (c) Kitware, Inc.
// All rights reserved.
// See LICENSE.txt for details.
//
// This software is distributed WITHOUT ANY WARRANTY; without even
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
// PURPOSE... |
HeyLey/catboost | util/string/pcdata.h | #pragma once
#include <util/generic/fwd.h>
/// Converts a text into HTML-code. Special characters of HTML («<», «>», ...) replaced with entities.
TString EncodeHtmlPcdata(const TStringBuf str, bool qAmp = true);
void EncodeHtmlPcdataAppend(const TStringBuf str, TString& strout);
/// Reverse of EncodeHtmlPcdata()
TSt... |
cstom4994/SourceEngineRebuild | src/public/movieobjects/dmsmdserializer.h | //========= Copyright Valve Corporation, All rights reserved. ============//
//
// Read SMD and create DMX data
//
//=============================================================================
#ifndef DMSMDSERIALIZER_H
#define DMSMDSERIALIZER_H
#if defined( _WIN32 )
#pragma once
#endif
// Valve includes
#inclu... |
btwiuse/naiveproxy | src/net/quic/quic_http_utils_test.cc | <filename>src/net/quic/quic_http_utils_test.cc
// Copyright 2013 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.
#include "net/quic/quic_http_utils.h"
#include <stdint.h>
#include <limits>
#include "net/third_party/qu... |
stachu540/twitch4j | rest-helix/src/main/java/com/github/twitch4j/helix/domain/TeamUser.java | <reponame>stachu540/twitch4j<gh_stars>100-1000
package com.github.twitch4j.helix.domain;
import lombok.AccessLevel;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.Setter;
@Data
@Setter(AccessLevel.PRIVATE)
@NoArgsConstructor
public class TeamUser {
/**
* User ID of a Team member.
*/... |
mgscreativa/meteor-browser-policy-issue | imports/modules/server/rate-limit.js | <filename>imports/modules/server/rate-limit.js
import _ from 'lodash';
import { Meteor } from 'meteor/meteor';
import { DDPRateLimiter } from 'meteor/ddp-rate-limiter';
const fetchMethodNames = methods => _.map(methods, 'name');
const assignLimits = ({ methods, limit, timeRange }) => {
const methodNames = fetchMeth... |
zhangkn/iOS14Header | System/Library/PrivateFrameworks/Settings/GeneralSettingsUI.framework/PSGDeviceNameEditingController.h | /*
* This header is generated by classdump-dyld 1.0
* on Sunday, September 27, 2020 at 12:26:16 PM Mountain Standard Time
* Operating System: Version 14.0 (Build 18A373)
* Image Source: /System/Library/PrivateFrameworks/Settings/GeneralSettingsUI.framework/GeneralSettingsUI
* classdump-dyld is licensed under GPLv3, Cop... |
win32kbase/CAFED00D | src/main/java/me/coley/cafedude/classfile/attribute/AnnotationDefaultAttribute.java | <reponame>win32kbase/CAFED00D
package me.coley.cafedude.classfile.attribute;
import me.coley.cafedude.classfile.annotation.ElementValue;
import java.util.Set;
/**
* Represents the default value of a annotation field <i>(Which are technically methods, but I digress)</i>.
*
* @author <NAME>
*/
public class Annotat... |
DeepDiver1975/msgraph.go | beta/EasAuthenticationMethodEnum.go | // Code generated by msgraph-generate.go DO NOT EDIT.
package msgraph
// EasAuthenticationMethod undocumented
type EasAuthenticationMethod int
const (
// EasAuthenticationMethodVUsernameAndPassword undocumented
EasAuthenticationMethodVUsernameAndPassword EasAuthenticationMethod = 0
// EasAuthenticationMethodVCert... |
therealmmk/aws-toolkit-eclipse | bundles/com.amazonaws.eclipse.dynamodb/src/com/amazonaws/eclipse/explorer/dynamodb/CreateTableFirstPage.java | <filename>bundles/com.amazonaws.eclipse.dynamodb/src/com/amazonaws/eclipse/explorer/dynamodb/CreateTableFirstPage.java<gh_stars>100-1000
/*
* Copyright 2013 Amazon Technologies, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License... |
stonewesley/bk-bcs | bcs-k8s/bcs-k8s-watch/pkg/kubefed/apis/core/typeconfig/interface.go | /*
* Tencent is pleased to support the open source community by making Blueking Container Service available.
* Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except
* in compliance with the License. You may obta... |
TheRealHaui/jetty.project | jetty-util/src/test/java/org/eclipse/jetty/util/ScannerTest.java | <reponame>TheRealHaui/jetty.project
//
// ========================================================================
// Copyright (c) 1995-2019 Mort Bay Consulting Pty. Ltd.
// ------------------------------------------------------------------------
// All rights reserved. This program and the accompanying materials
... |
MaritimeCloud/Sandbox | mc-identityregistry-core/src/main/java/net/maritimecloud/identityregistry/repositories/CertificateRepository.java | <filename>mc-identityregistry-core/src/main/java/net/maritimecloud/identityregistry/repositories/CertificateRepository.java
/* Copyright 2016 Danish Maritime Authority.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may... |
ayompedb/culper | api/account_test.go | package api
import (
"database/sql"
"fmt"
"testing"
"time"
)
func TestBasicAuthentication(t *testing.T) {
username := fmt.Sprintf("user-%v", time.Now().Unix())
password := "<PASSWORD>"
account := &Account{
Username: username,
Firstname: "Admin",
Lastname: "Last",
FormType: "SF86",
FormVer... |
repir/repirapps | src2/main/java/util/mvIndex.java | <reponame>repir/repirapps<gh_stars>0
package util;
import org.apache.hadoop.fs.FileSystem;
import io.github.repir.Repository.Repository;
import io.github.htools.search.ByteSearch;
import io.github.htools.io.Datafile;
import io.github.htools.io.HDFSPath;
import io.github.repir.MapReduceTools.RRConfiguration;
import io.... |
bobbrow/cpp-docs | docs/parallel/concrt/codesnippet/CPP/how-to-use-a-message-block-filter_3.cpp | // primes-filter.cpp
// compile with: /EHsc
#include <agents.h>
#include <algorithm>
#include <iostream>
#include <random>
using namespace concurrency;
using namespace std;
// Determines whether the input value is prime.
bool is_prime(unsigned long n)
{
if (n < 2)
return false;
for (unsigned long i = ... |
Tom-CaoZH/xdoj_2021 | 2022/134.c | <filename>2022/134.c
#include<stdio.h>
int num[10];
int main(void) {
int n;
scanf("%d",&n);
int index = 0;;
while(n > 0) {
num[index] = n % 10;
index++;
n /= 10;
}
for(int i = 0;i < index; ++i) {
for(int j = i+1;j < index; ++j) {
if(num[i] < num[j])... |
MikeOwino/blade | packages/blade-old/src/molecules/BottomSheet/__tests__/BottomSheet.native.test.js | import React from 'react';
import BottomSheet from '../BottomSheet';
import { renderWithTheme } from '../../../_helpers/testing';
import View from '../../../atoms/View';
import Text from '../../../atoms/Text';
const list = [
'Apple',
'Asus',
'Blackberry',
'Honor',
'HTC',
'Huawei',
'Lava',
'Lenovo',
'... |
merj4/merj | server/seeder.js | <reponame>merj4/merj<filename>server/seeder.js
var db = require('./db.js');
//run this file node seeder.js to populate the database
//create variables for each table
var User = db.User;
var Event = db.Event;
// var Message = db.Message;
var EventParticipant = db.EventParticipant;
// Hit me with them ghetto delays to le... |
PrettyCoolWeb/PrettCoolWeb | src/Pages/Dashboards/Shop/ArticleMeta.js | import { join } from 'path'
import React from 'react'
import { Link } from 'react-navi'
import { formatDate } from './utils/formats'
import styles from './ArticleMeta.module.css'
function ArticleMeta({ blogRoot, meta, readingTime }) {
let readingTimeElement
if (readingTime) {
let minutes = Math.max(Math.round(... |
talitadeoa/CEV-Exercicios-Python | Exercicios-mundo-2/desafio057.py | #Um programa que lê o sexo de uma pessoa e só aceita os valores M ou F
sexo = (input('Qual seu sexo? [M/F] ')).upper().strip()[0]
while sexo not in 'MF':
sexo = (input('Dados inválidos, responda novamente [M/F] ')).upper().strip()[0]
if sexo == 'F':
sexo = 'feminino'
else:
sexo = 'masculino'
print(f'Sex... |
maurizioabba/rose | tests/CompileTests/ElsaTestCases/t0080.cc | <reponame>maurizioabba/rose
// cc.in80
// reproduce ASTTypeId ambiguity
int f(int);
int g(int);
int func(int param)
{
// unambiguous
//int y(f(param));
// ambiguous
int x(f(g(param)));
}
// different way of seeing it
typedef int x;
typedef int y;
typedef int z;
int h(int /*anon*/(x /*anon*/(y /*anon*/))... |
deepti1408/CodingInterview | java/merge.java | <reponame>deepti1408/CodingInterview<gh_stars>10-100
class Solution {
public void merge(int[] nums1, int m, int[] nums2, int n) {
int i = m-1, j=n-1, k = m+n-1;
while(i >=0 && j >=0)
{
if(nums1[i] > nums2[j])
nums1[k--] = nums1[i--];
... |
FJplant/AntIDE | src/com/antsoft/ant/wizard/generalwizard/FireEventPanel.java | <gh_stars>10-100
/*
* $Id: FireEventPanel.java,v 1.2 1999/08/19 05:25:07 multipia Exp $
* Ant ( JDK wrapper Java IDE )
* Version 1.0
* Copyright (c) 1998-1999 Antsoft Co. All rights reserved.
* This program and source file is protected by Korea and international
* Copyright laws.
*
* $Revision: 1.2 $
... |
ilya-markevich/node-mapper | tests/unit/baseMapInstance.js | 'use strict';
require('should');
const sinon = require('sinon');
const TypeWrapper = require('../../src/typeWrapper');
const MapInstance = require('../../src/mapInstances/base');
const testData = require('./data/mapInstance');
function checkInitialState(mapInstance, convention) {
(mapInstance.sourceType instance... |
RCXcrafter/Materialis | src/main/java/com/rcx/materialis/util/ColorizerModifierRecipe.java | <reponame>RCXcrafter/Materialis
package com.rcx.materialis.util;
import java.util.List;
import javax.annotation.Nullable;
import com.google.common.collect.ImmutableList;
import com.google.gson.JsonObject;
import com.rcx.materialis.MaterialisResources;
import com.rcx.materialis.modifiers.ColorizedModifier;
import ne... |
rofl0r/pspsdk | src/libcglue/socket.c | <reponame>rofl0r/pspsdk
/*
* PSP Software Development Kit - http://www.pspdev.org
* -----------------------------------------------------------------------
* Licensed under the BSD license, see LICENSE in PSPSDK root for details.
*
* socket.c - Socket wrappers to provide similar functions to normal unix
*
* Copy... |
FlaviuVadan/sick-fits | frontend/components/DeleteItem.js | import React, { Component } from 'react';
import { Mutation } from 'react-apollo';
import { ALL_ITEMS_QUERY, DELETE_ITEM_MUTATION } from '../queries/queries';
class DeleteItem extends Component {
/**
* Page update method
* @param cache - Apollo cache access
* @param payload - deleted item, returned by Apollo
... |
luxe/CodeLang-compiler | source/code/programs/transcompilers/enum_cpp/main.cc | <filename>source/code/programs/transcompilers/enum_cpp/main.cc
#include <iostream>
#include <string>
#include "code/programs/transcompilers/enum_cpp/enum_cpp_maker.hpp"
#include "code/programs/transcompilers/enum_cpp/enum.hpp"
#include "code/programs/transcompilers/enum_cpp/program_options/program_options_creator.hpp"
... |
gmbarroso/pilot | packages/cockpit/scripts/test.js | <filename>packages/cockpit/scripts/test.js<gh_stars>1-10
const path = require('path')
const createJestConfig = require('../config/jest/createJestConfig')
// Do this as the first thing so that any code reading it knows the right env.
process.env.BABEL_ENV = 'test'
process.env.NODE_ENV = 'test'
// Makes the script cras... |
nchandrappa/cassandra-java-driver | driver-core/src/test/java/com/datastax/driver/core/HostConnectionPoolMultiTest.java | /*
* Copyright DataStax, Inc.
*
* 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 wri... |
noisecode3/DPF | distrho/extra/ScopedPointer.hpp | /*
* DISTRHO Plugin Framework (DPF)
* Copyright (C) 2012-2016 <NAME> <<EMAIL>>
*
* Permission to use, copy, modify, and/or distribute this software for any purpose with
* or without fee is hereby granted, provided that the above copyright notice and this
* permission notice appear in all copies.
*
* THE SOFTWAR... |
DiegoVallely/tsuru | provision/juju/writer_test.go | // Copyright 2013 tsuru authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package juju
import (
"launchpad.net/gocheck"
"net/http/httptest"
)
func (s *S) TestfilterOutputWithPythonWarnings(c *gocheck.C) {
output := []byte(`2012-11... |
madang01/gitcodda | codda2/project/sample_base/server_build/src/main/java/kr/pe/codda/impl/message/BoardListRes/BoardListResDecoder.java | <reponame>madang01/gitcodda
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
... |
FilipRy/versu-android | app/src/main/java/com/filip/versu/view/fragment/CommentFragment.java | package com.filip.versu.view.fragment;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import com.filip.vers... |
JianpingZeng/xcc | xcc/java/backend/target/TargetSubtarget.java | package backend.target;
/*
* Extremely Compiler Collection
* Copyright (c) 2015-2020, <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/LI... |
powerfuler/spring-boot-student | spring-boot-student-log/src/main/java/com/xiaolyuh/annotation/EnableAspectJLog.java | <filename>spring-boot-student-log/src/main/java/com/xiaolyuh/annotation/EnableAspectJLog.java
package com.xiaolyuh.annotation;
import com.xiaolyuh.core.TrackConfig;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.context.annotation.Import;
import java.lang.annotation.*... |
jhwoodward/nompl | src/interpreter/parserUtils.js | <gh_stars>1-10
var _ = require('lodash');
var api = {
parseValue: s => {
const value = parseInt(/-?[\d]{1,5}/.exec(s)[0], 10);
const phrase = s.indexOf('==') === -1;
// now using ==V inline
if (phrase) {
return { value, phrase };
} else {
return { value };
}
},
getBracketed: ... |
IShostak/KindaExpressKing | src/main/java/com/softserve/itacademy/kek/configuration/WebMvcConfig.java | package com.softserve.itacademy.kek.configuration;
import java.util.HashMap;
import java.util.Map;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.MediaType;
import org.springframework.scheduling.annotation.Enabl... |
asiekierka/OpenComputers | src/main/scala/li/cil/oc/util/mods/ComputerCraft16.scala | package li.cil.oc.util.mods
import dan200.computercraft.api.ComputerCraftAPI
import dan200.computercraft.api.filesystem.{IMount, IWritableMount}
import dan200.computercraft.api.lua.ILuaContext
import dan200.computercraft.api.media.IMedia
import dan200.computercraft.api.peripheral.{IComputerAccess, IPeripheral, IPeriph... |
rombie/contrail-test | scripts/scale/control-node/bgp_scale.py | from __future__ import print_function
import time
import sys
import os
import re
import signal
from netaddr import *
from datetime import datetime, timedelta
from pytz import timezone
import pytz
import subprocess
import traceback
#
# Contrail libs
#
from commands import Command
from cn_introspect_bgp import ControlNo... |
ysden123/poc | prometheus/manager/src/main/java/com/stulsoft/poc/prometheus/manager/package-info.java | /**
* Created by <NAME> 17 May 2018
*/
/**
* API for usage the Prometheus metrics
*
* @author <NAME>
*
*/
package com.stulsoft.poc.prometheus.manager; |
alibaba/fast-modeling-language | fastmodel-driver/fastmodel-driver-client/src/test/java/com/aliyun/fastmodel/driver/client/command/sample/SampleCommandFactory.java | package com.aliyun.fastmodel.driver.client.command.sample;
import java.util.Properties;
import com.aliyun.fastmodel.driver.client.command.CommandFactory;
import com.aliyun.fastmodel.driver.client.command.ExecuteCommand;
/**
* Desc:
*
* @author panguanjing
* @date 2022/4/30
*/
public class SampleCommandFactory i... |
MathiasBerwig/reactnd-project-readable | frontend/src/components/menu/SortPostsDropdown.js | /* eslint-disable react/jsx-filename-extension */
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { Dropdown } from 'semantic-ui-react';
import { handleSavePreferenceOrderPosts as saveOrderByPref } from '../../actions/preferences';
const opti... |
ravi688/VulkanRenderer | source/renderer/vulkan/vulkan_logical_device.c | <gh_stars>0
#include <renderer/internal/vulkan/vulkan_defines.h>
#include <renderer/internal/vulkan/vulkan_logical_device.h>
#include <renderer/internal/vulkan/vulkan_physical_device.h>
#include <renderer/internal/vulkan/vulkan_result.h>
#include <renderer/assert.h>
#include <renderer/memory_allocator.h>
#ifdef GLOBAL... |
damb/seiscomp3 | src/trunk/libs/seiscomp3/seismology/ttt.cpp | <gh_stars>10-100
/***************************************************************************
* Copyright (C) by <NAME> *
* *
* You can redistribute and/or modify this program under the *
... |
Aufree/ting | db/migrate/20141208045147_create_songs.rb | class CreateSongs < ActiveRecord::Migration
def change
create_table :songs do |t|
t.integer :s_id
t.string :title
t.string :artist
t.string :pic
t.text :content
t.integer :user_id
t.integer :comments_count, default: 0
t.timestamps
end
add_index :songs, [:u... |
LeidosLabs/holeshot | analytics/log-mapreduce/src/main/java/com/leidoslabs/holeshot/analytics/simulateddata/GenFakeLogs.java | /*
* Licensed to Leidos, Inc. under one or more contributor license agreements.
* See the NOTICE file distributed with this work for additional information regarding copyright ownership.
* Leidos, Inc. licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file excep... |
enricodg/leaf-utilities | database/sql/integrations/gorm/postgresql/connection.go | <filename>database/sql/integrations/gorm/postgresql/connection.go
package leafGormPostgreSql
import (
"fmt"
"strings"
)
type DbConnection struct {
Address []string
Username string
Password string
DbName string
}
func (db DbConnection) URI() string {
return fmt.Sprintf(`postgres://%s:%s@%s/%s?sslmode=disabl... |
GeSup/Hands-on-JavaScript-for-Python-Developers | chapter-9/error-object/index-mitigated.js | const typoError = () => {
try {
cnosole.error('my fault')
} catch(e) {
console.error(e)
}
}
const fetchAttempt = () => {
fetch("https://swapi.dev/api/undefined")
.then((response) => {
try {
return response.json()
} catch (e) {
return response.error()
}
... |
mohad12211/skia | docs/examples/Bitmap_allocPixelsFlags.cpp | // Copyright 2019 Google LLC.
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
#include "tools/fiddle/examples.h"
// HASH=737e721c7d9e0f367d25521a1b823b9d
REG_FIDDLE(Bitmap_allocPixelsFlags, 256, 128, false, 0) {
void draw(SkCanvas* canvas) {
SkBitmap bitmap;
... |
marmolak/gray386linux | src/linux-3.7.10/drivers/i2c/i2c-mux.c | <filename>src/linux-3.7.10/drivers/i2c/i2c-mux.c
/*
* Multiplexed I2C bus driver.
*
* Copyright (c) 2008-2009 <NAME> <<EMAIL>>
* Copyright (c) 2008-2009 Eurotech S.p.A. <<EMAIL>>
* Copyright (c) 2009-2010 NSN GmbH & Co KG <<EMAIL>>
*
* Simplifies access to complex multiplexed I2C bus topologies, by presenting
*... |
PrakharPipersania/LeetCode-Solutions | Questions Level-Wise/Easy/sum-of-digits-in-base-k.cpp | class Solution {
public:
int sumBase(int n, int k)
{
int sum=0;
while(n)
{
sum+=n%k;
n/=k;
}
return sum;
}
}; |
akaifi/bettermeans | app/helpers/attachments_helper.rb | # BetterMeans - Work 2.0
# Copyright (C) 2006-2011 See readme for details and license#
module AttachmentsHelper
# Displays view/delete links to the attachments of the given object
# Options:
# :author -- author names are not displayed if set to false
def link_to_attachments(container, options = {})
opti... |
othuntgithub/AdditionalEnderItems | src/main/java/com/hidoni/additionalenderitems/network/Networking.java | package com.hidoni.additionalenderitems.network;
import com.hidoni.additionalenderitems.AdditionalEnderItems;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.chunk.Chunk;
import net.minecraftforge.fml.network.NetworkRegistry;
import net.minecraftforge.fml.network.PacketDistributor;
import net.mi... |
holylovenia/undepress-mobile | app/src/main/java/com/hulahoop/mentalhealth/undepress/ResultActivity.java | <reponame>holylovenia/undepress-mobile<filename>app/src/main/java/com/hulahoop/mentalhealth/undepress/ResultActivity.java
package com.hulahoop.mentalhealth.undepress;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
import andro... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.