repo_name stringlengths 6 101 | path stringlengths 4 300 | text stringlengths 7 1.31M |
|---|---|---|
ExiledNarwal28/glo-4003-spamdul | src/test/java/ca/ulaval/glo4003/reports/services/assemblers/ReportMetricDataAssemblerTest.java | package ca.ulaval.glo4003.reports.services.assemblers;
import static com.google.common.truth.Truth.assertThat;
import static org.mockito.Mockito.when;
import ca.ulaval.glo4003.reports.domain.metrics.ReportMetricData;
import ca.ulaval.glo4003.reports.domain.metrics.ReportMetricType;
import ca.ulaval.glo4003.reports.se... |
retverd/python_hse | Week 5 Sorting, sets and dics/Task13.py | <filename>Week 5 Sorting, sets and dics/Task13.py
# Некоторый банк хочет внедрить систему управления счетами клиентов, поддерживающую следующие операции:
#
# Пополнение счета клиента. Снятие денег со счета. Запрос остатка средств на счете. Перевод денег между счетами
# клиентов. Начисление процентов всем клиентам.
#
# ... |
zzhmark/vaa3d_tools | released_plugins/v3d_plugins/bigneuron_hide_ikeno_SIGEN/doc/html/search/files_6.js | <filename>released_plugins/v3d_plugins/bigneuron_hide_ikeno_SIGEN/doc/html/search/files_6.js
var searchData=
[
['main_2ecpp',['main.cpp',['../main_8cpp.html',1,'']]],
['math_2eh',['math.h',['../math_8h.html',1,'']]]
];
|
peterschrammel/jayhorn | soottocfg/src/main/java/soottocfg/cfg/method/CfgEdge.java | <reponame>peterschrammel/jayhorn
/**
*
*/
package soottocfg.cfg.method;
import org.jgrapht.graph.DefaultEdge;
import com.google.common.base.Optional;
import soottocfg.cfg.expression.Expression;
/**
* @author schaef
*
*/
public class CfgEdge extends DefaultEdge {
/**
*
*/
private static final long seri... |
odinshen/ComputeLibrary_17.9_BareMetal | documentation/dir_463ebbf2abb1a8cd3e39ae1d0da97cb5.js | var dir_463ebbf2abb1a8cd3e39ae1d0da97cb5 =
[
[ "ActivationLayerFixture.h", "benchmark_2fixtures_2_activation_layer_fixture_8h.xhtml", [
[ "ActivationLayerFixture", "classarm__compute_1_1test_1_1_activation_layer_fixture.xhtml", "classarm__compute_1_1test_1_1_activation_layer_fixture" ]
] ],
[ "AlexNet... |
DolgopolovaMaria/Software-Engineering-SPBU | semester 1/disjointSetUnion/disjointSetUnion/sets.h | <gh_stars>0
#pragma once
typedef struct SETS
{
int *parents;
int numberOfElements;
} Sets;
Sets *createUnionSets(int numberOfElements);
void deleteSets(Sets *sets);
int makeSet(Sets *sets, int x);
int findSet(Sets *sets, int x);
int unite(Sets *set, int x, int y); |
jbox-web/action_form | spec/support/user_form_fixture.rb | class UserFormFixture < ActionForm::Base
self.main_model = :user
attributes :name, :age, :gender, required: true
validates :name, length: { in: 6..20 }
validates :age, numericality: { only_integer: true }
end
|
Jzice/spdk | lib/event/reactor.c | /*-
* BSD LICENSE
*
* Copyright (c) Intel Corporation.
* 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 copyri... |
LSTS/imc4j | core/src/main/java/pt/lsts/imc4j/msg/TeleoperationDone.java | <filename>core/src/main/java/pt/lsts/imc4j/msg/TeleoperationDone.java<gh_stars>1-10
package pt.lsts.imc4j.msg;
import java.io.IOException;
import java.lang.Exception;
import java.lang.String;
import java.nio.ByteBuffer;
/**
* Notification of completion of a Teleoperation maneuver.
*/
public class TeleoperationDone ... |
2637309949/dolphin | packages/web/core/util.go | <gh_stars>10-100
package core
// LastChar defined
func LastChar(str string) uint8 {
if str == "" {
panic("The length of the string can't be 0")
}
return str[len(str)-1]
}
|
rodrigojv/thisvui | src/mixins/states.js | <reponame>rodrigojv/thisvui<filename>src/mixins/states.js
import utils from "../utils/utils";
import CssArchitect from "../utils/css-architect";
export default {
props: {
isHovered: {
type: [String, Boolean]
},
isFocused: {
type: [String, Boolean]
},
isLoading: {
type: [String, ... |
uwo-openhouse/openhouse-app | src/constants/Colors.js | const tintColor = '#2f95dc';
export default {
tintColor,
tabIconDefault: '#ccc',
tabIconSelected: tintColor,
tabBar: '#fefefe',
errorBackground: 'red',
errorText: '#fff',
warningBackground: '#EAEB5E',
warningText: '#666804',
noticeBackground: tintColor,
noticeText: '#fff',
westernPurple: '#4f2683... |
Andrew8305/open-capacity-platform | open-cxf-service/src/main/java/com/open/capacity/srenewSer/utils/SrenewSerUtils.java | <filename>open-cxf-service/src/main/java/com/open/capacity/srenewSer/utils/SrenewSerUtils.java
package com.open.capacity.srenewSer.utils;
import java.util.logging.Logger;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.open.capacity.srenewSer.b... |
Amstee/Go-Blockchain | logic/displayWallets.go | <filename>logic/displayWallets.go
package logic
import (
"github.com/jinzhu/gorm"
"github.com/amstee/blockchain/models"
)
func DisplayWallets(db *gorm.DB) {
wallets := models.GetWallets(db)
wallets.Display()
} |
didizlatkova/PatternShooter | src/zones/common/weapons/Gun.java | <reponame>didizlatkova/PatternShooter<filename>src/zones/common/weapons/Gun.java<gh_stars>0
package zones.common.weapons;
import elements.abstracts.weapons.Weapon;
public class Gun extends Weapon {
public Gun() {
super(40);
}
@Override
public String toString() {
return "G";
}
@Override
public String ge... |
ChrisLR/BasicDungeonRL | bflib/spells/magicuser/confusion.py | from bflib import units
from bflib.characters import classes
from bflib.spells import listing
from bflib.spells.base import Spell
from bflib.spells.duration import SpellDuration
from bflib.spells.range import SpellRange
@listing.register_spell
class Confusion(Spell):
name = "Confusion"
class_level_map = {
... |
lehaSVV2009/leetcode | Yandex.ATM/Iteration2.js | <filename>Yandex.ATM/Iteration2.js
moneyTypes = [5000, 1000, 500, 100, 50];
limits = {
5000: 4,
1000: 3,
500: 2,
100: 5,
50: 100
};
function getMoney(amount) {
const smallestBanknote = moneyTypes[moneyTypes.length - 1];
if (amount % smallestBanknote !== 0) {
// amount < 0? amount == 0?
throw new ... |
hugo3m/service-national-universel | admin/src/scenes/volontaires-head-center/view/wrapper.js | <reponame>hugo3m/service-national-universel
import React from "react";
import styled from "styled-components";
import api from "../../../services/api";
import { useHistory } from "react-router-dom";
import { toastr } from "react-redux-toastr";
import { translate } from "../../../utils";
import Badge from "../../../com... |
TsvetanNikolov123/JAVA---OOP-Advanced | 15 INTERFACE SEGREGATION DEPENDENCY INVERSION PRINCIPLES/p02_services/SmsNotificationService.java | package p02_services;
public class SmsNotificationService implements NotificationService {
@Override
public void sendNotification() {
System.out.println("Sms send");
}
@Override
public boolean isActive() {
return false;
}
}
|
DrDaveD/mytoken-server | internal/db/dbmigrate/migrate.go | <filename>internal/db/dbmigrate/migrate.go
package dbmigrate
import (
"embed"
"fmt"
"io/fs"
log "github.com/sirupsen/logrus"
"golang.org/x/mod/semver"
"github.com/oidc-mytoken/server/shared/utils"
)
// Commands is a type for holding sql commands that should run before and after a version update
type Commands ... |
amrit92/educron-ssr | app/redux/actions/PostAction.js | import {AWAIT_MARKER} from 'redux-await';
import PostApi from '../../api/post/index';
import {postsList} from '../../configs/index';
export const POST_CREATE = 'post create';
export const POST_UPDATE = 'post update';
export const POST_LISTS = 'posts lists';
export const POST_LISTS_LOAD_MORE = 'post load more';
export ... |
Gadreel/dcserver | dcraft.hub/src/main/java/dcraft/locale/index/eng/Index.java | <filename>dcraft.hub/src/main/java/dcraft/locale/index/eng/Index.java
package dcraft.locale.index.eng;
import dcraft.locale.IndexBase;
import dcraft.locale.IndexInfo;
import dcraft.locale.analyzer.EnglishFullAnalyzer;
import dcraft.locale.analyzer.EnglishSimpleAnalyzer;
import dcraft.log.Logger;
import dcraft.util.Str... |
jser/jser.info | tools/refactor/dump-tags.json.js | <gh_stars>10-100
// MIT © 2017 azu
"use strict";
const fs = require("fs");
const getAllItemFilePath = require("./get-all-item-file-path");
const argv = require('minimist')(process.argv.slice(2));
const from = argv.from;
const to = argv.to;
/**
* tags.jsonを作成するツール
* Usage: node ./ --from "スライド" --to "slide"
*/
const ... |
asdFletcher/data-structures-and-algorithms | src/benchmarking/benchmarker/__tests__/benchmarker.test.js | <filename>src/benchmarking/benchmarker/__tests__/benchmarker.test.js
const benchmarker = require('../benchmarker.js');
const calculateAverageFromSingleDataSet = benchmarker.calculateAverageFromSingleDataSet;
describe('avg data sets', () => {
it('works with regular data no duplicatse in a single set', () => {
l... |
palava/palava-ipc | src/main/java/de/cosmocode/palava/ipc/IpcCallFilterDefinition.java | <filename>src/main/java/de/cosmocode/palava/ipc/IpcCallFilterDefinition.java
/**
* Copyright 2010 CosmoCode 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.apac... |
saintube/rails_sample_app | db/migrate/20181223030400_add_columns_to_comments.rb | <filename>db/migrate/20181223030400_add_columns_to_comments.rb
class AddColumnsToComments < ActiveRecord::Migration[5.1]
def change
add_column :comments, :power, :integer
add_column :comments, :price, :integer
add_column :comments, :interior, :integer
add_column :comments, :configure, :integer
add... |
matthiasblaesing/COMTypelibraries | office2/src/main/java/eu/doppel_helix/jna/tlb/office2/MsoWarpFormat.java | <filename>office2/src/main/java/eu/doppel_helix/jna/tlb/office2/MsoWarpFormat.java
package eu.doppel_helix.jna.tlb.office2;
import com.sun.jna.platform.win32.COM.util.IComEnum;
public enum MsoWarpFormat implements IComEnum {
/**
* (-2)
*/
msoWarpFormatMixed(-2),
/**
* (0)
*/... |
tcolgate/traefik | integration/vendor/github.com/docker/libcompose/yaml/external.go | package yaml
import (
"fmt"
)
// External represents an external network entry in compose file.
// It can be a boolean (true|false) or have a name
type External struct {
External bool
Name string
}
// MarshalYAML implements the Marshaller interface.
func (n External) MarshalYAML() (tag string, value interface... |
algairim/brooklyn-server | software/base/src/main/java/org/apache/brooklyn/entity/machine/AddMachineMetrics.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... |
mergian/vednn | src/C/vednnActivationBackward.h | <reponame>mergian/vednn
#ifndef _VEDNNACTIVATIONBACWARD_H_
#define _VEDNNACTIVATIONBACWARD_H_
#include "vednn.h"
typedef
vednnError_t (*vednnActivationBackward_t) (
const void *pDataGradOut,
const void *pDataIn,
void *pDataGradIn,
const uint64_t nElements
) ;
vednnError_t vednnActivati... |
GooruAdmin/Gooru-Core-API | api/src/main/java/org/ednovo/gooru/domain/cassandra/ApiCassandraFactory.java | <filename>api/src/main/java/org/ednovo/gooru/domain/cassandra/ApiCassandraFactory.java
/////////////////////////////////////////////////////////////
// ApiCassandraFactory.java
// gooru-api
// Created by Gooru on 2014
// Copyright (c) 2014 Gooru. All rights reserved.
// http://www.goorulearning.org/
// Permission is he... |
liammews/Briefrr | studio/node_modules/popmotion/dist/es/packages/popmotion/lib/index.js | <filename>studio/node_modules/popmotion/dist/es/packages/popmotion/lib/index.js<gh_stars>1-10
export { animate } from './animations/index.js';
export { inertia } from './animations/inertia.js';
export { decay } from './animations/generators/decay.js';
export { spring } from './animations/generators/spring.js';
export {... |
kppw99/enVAS | dataset/source/NVD/CVE_2013_1772_PATCHED_call_console_drivers.c | static void CVE_2013_1772_PATCHED_call_console_drivers(unsigned start, unsigned end)
{
unsigned cur_index, start_print;
static int msg_level = -1;
BUG_ON(((int)(start - end)) > 0);
cur_index = start;
start_print = start;
while (cur_index != end) {
if (msg_level < 0 && ((end - cur_index) > 2)) {
/*
*... |
lambda666/liteos_in_raspberry_ubuntu20 | LiteOS/targets/bsp/drivers/FM33LC0xx_LL_Driver/Src/fm33lc0xx_ll_adc.c | <reponame>lambda666/liteos_in_raspberry_ubuntu20<gh_stars>0
/**
****************************************************************************************************
* @file fm33lc0xx_ll_adc.c
* @author FMSH Application Team
* @brief Src file of ADC LL Module
*********************************************... |
funsonli/spring-boot-demo | spring-boot-demo-522-uploader/src/main/java/com/funsonli/springbootdemo522uploader/component/uploader/Uploader.java | <filename>spring-boot-demo-522-uploader/src/main/java/com/funsonli/springbootdemo522uploader/component/uploader/Uploader.java
package com.funsonli.springbootdemo522uploader.component.uploader;
import java.io.InputStream;
/**
* Class for
*
* @author Funsonli
* @date 2019/10/30
*/
public interface Uploader {
/... |
f-koehler/mlxtk | mlxtk/simulation_set/__init__.py | import argparse
import re
import sys
from pathlib import Path
from typing import List, Optional, Tuple, Union
from mlxtk import sge
from mlxtk.simulation import Simulation
from mlxtk.simulation_set import base
RE_INDEX = re.compile(r"(\d+)")
RE_RANGE = re.compile(r"(\d+)-(\d+)")
RE_SLICE = re.compile(r"^([+-]*\d*):([... |
jsuo/XVim2 | XVim2/XcodeHeader/IDEKit/IDENavigatorSCMStatusCell.h | //
// Generated by class-dump 3.5 (64 bit) (Debug version compiled Mar 30 2018 09:30:25).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by <NAME>.
//
#import <DVTKit/DVTStructuredLayoutTextFieldCell.h>
@class NSAttributedString, NSString;
@interface IDENavigatorSCMStatusCell : DVTStructur... |
cwolsen7905/UbixOS | doc/html/df/dc9/exec_8c.js | var exec_8c =
[
[ "AT_BASE", "df/dc9/exec_8c.html#a9b8e51a44a47d7ea827c570ffdca14e5", null ],
[ "AT_ENTRY", "df/dc9/exec_8c.html#a80f2ea99241a6afdc4718d3c4318c871", null ],
[ "AT_EXECFD", "df/dc9/exec_8c.html#a8a3070773d3f9231c9390172ae3fd2e7", null ],
[ "AT_FLAGS", "df/dc9/exec_8c.html#a08c6bdc11224c9d... |
staale/mats | mats-websockets/src/test/java/com/stolsvik/mats/websocket/SetupTestMatsAndMatsSocketEndpoints.java | <reponame>staale/mats<gh_stars>0
package com.stolsvik.mats.websocket;
import java.nio.charset.StandardCharsets;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CopyOnWriteArrayList;
import org.junit.Assert;
import org.slf4j.Logger;
import org... |
disgoorg/disgo | discord/permission_overwrite.go | <filename>discord/permission_overwrite.go
package discord
import (
"fmt"
"github.com/disgoorg/disgo/json"
"github.com/disgoorg/snowflake/v2"
)
// PermissionOverwriteType is the type of PermissionOverwrite
type PermissionOverwriteType int
// Constants for PermissionOverwriteType
const (
PermissionOverwriteTypeRo... |
game-libgdx-unity/GDX-Engine | gdxengine-android/src/com/me/mygdxgame/CopyOfMainActivity.java | package com.me.mygdxgame;
import android.os.Bundle;
import com.badlogic.gdx.backends.android.AndroidApplication;
import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration;
import com.gdxengine.framework.test.towerdefense.TowerDefenseGame;
public class CopyOfMainActivity extends AndroidApplication {
... |
LaEmma/sparrow_cloud | tests/test_consul_service.py | <gh_stars>10-100
# import os
# import unittest
# from unittest import mock
# from sparrow_cloud.registry.service_discovery import consul_service
# from django.core.exceptions import ImproperlyConfigured
#
# # 与 SPARROW_SERVICE_REGISTER_NAME 对应的 _HOST
# SPARROW_SERVICE_REGISTER_NAME_HOST = "172.16.31.10:8001"
#
#
# SERV... |
franzmk/Oregon-State-Schoolwork | cs162/assignments/assignment5/list.h | <gh_stars>0
/*********************************************************************
* ** Program Filename: list.h
* ** Author: <NAME>
* ** Date: 6/9/19
* ** Description: This is the header file for the linked list node and linked list classes
* ** Input: N/a
* ** Output: N/a
* ************************************... |
richhastings/email-components | site/pliers/watch.js | module.exports = createTask
var notify = require('../../pliers/lib/notify')
, browserSync = require('browser-sync')
function createTask (pliers, config) {
pliers('watch', function (done) {
browserSync.create('site').init({ logSnippet: false, port: config.browserSyncPort })
pliers.logger.info('Watching ... |
cloudymolecule/shutterlogger | db/migrate/20201122044521_create_photos.rb | class CreatePhotos < ActiveRecord::Migration
def change
create_table :photos do |t|
t.string :name
t.string :description
t.string :shutter
t.string :aperture
t.string :focal_length
t.string :date
t.string :time
t.string :location
t.integer :rating
t.inte... |
Westlanderz/AI-Plat1 | venv/Lib/site-packages/h5py/tests/test_vds/__init__.py | <reponame>Westlanderz/AI-Plat1
from .test_virtual_source import *
from .test_highlevel_vds import *
from .test_lowlevel_vds import *
|
GerHobbelt/prosemirror | src/edit/index.js | <filename>src/edit/index.js
export {ProseMirror} from "./main"
export {defineOption} from "./options"
export {Range} from "./selection"
export {eventMixin} from "./event"
export {Keymap} from "./keys"
export {MarkedRange} from "./range"
export {defaultKeymap} from "./defaultkeymap"
export {registerCommand} from "./comm... |
piyushmoolchandani/Lab_codes | OS_L_3/q5.c | <reponame>piyushmoolchandani/Lab_codes
#include<stdio.h>
#include<stdlib.h>
#include<sys/types.h>
#include<sys/wait.h>
#include<unistd.h>
int main()
{
// Declare x and assign it a value
int x;
x = 100;
printf("Current value of x: %d\n", x);
// fork the parent process
int temp_pid = fork();
// if fork failed... |
AID-Labor/BOSSModeller2 | src/main/java/de/snaggly/bossmodellerfx/model/abstraction/AttributeCombinationAbstraction.java | <filename>src/main/java/de/snaggly/bossmodellerfx/model/abstraction/AttributeCombinationAbstraction.java<gh_stars>1-10
package de.snaggly.bossmodellerfx.model.abstraction;
/**
* Abstracting around AttributeCombination. Here Attributes have been abstracted.
*
* @author <NAME>
*/
public abstract class AttributeCombi... |
z8432k/feodorov-s4-sadp-cp | src/common/include/client.h | <filename>src/common/include/client.h
#include <glib.h>
typedef struct {
GString *name;
GString *license;
GString *passport;
GString *address;
} Client_t;
Client_t* new_client();
void free_client(Client_t *client);
void fill_client(
Client_t *client,
const gchar *name,
const gchar *license,
const gc... |
EasyDonate/EasyDonate4J | json-providers/gson-json-provider/src/main/java/ru/easydonate/easydonate4j/api/v3/response/gson/shop/GsonGetPaymentsListResponse.java | package ru.easydonate.easydonate4j.api.v3.response.gson.shop;
import org.jetbrains.annotations.NotNull;
import ru.easydonate.easydonate4j.api.v3.data.model.shop.payment.PaymentsList;
import ru.easydonate.easydonate4j.api.v3.response.gson.GsonApiResponse;
import ru.easydonate.easydonate4j.api.v3.response.shop.GetPaymen... |
BearerPipelineTest/jruby | test/mri/racc/case.rb | verbose = $VERBOSE
$VERBOSE = true
begin
require 'test/unit'
require 'racc/static'
require 'fileutils'
require 'tempfile'
require 'timeout'
module Racc
class TestCase < Test::Unit::TestCase
PROJECT_DIR = File.expand_path(File.join(__dir__, '..'))
test_dir = File.join(PROJECT_DIR, 'test')
test_dir = Fil... |
NEHAVERMA-07/testjunittomcat | junit-servers-jetty/src/test/java/com/github/mjeanroy/junit/servers/jetty/junit4/JettyServerJunit4RuleTest.java | <gh_stars>10-100
/**
* The MIT License (MIT)
*
* Copyright (c) 2014-2019 <<EMAIL>>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation t... |
valery1707/techtalks-async | core/src/main/java/ru/relex/techtalks/async/model/HospitalPreset.java | package ru.relex.techtalks.async.model;
import java.math.BigDecimal;
import java.util.Random;
/**
* @author <NAME>
* @date 04.12.2018
*/
public enum HospitalPreset {
HOSPITAL1("CAT1", "CAT2", "CAT3"),
DR_REF_H2("CAT2", "CAT3"),
EX_HOSP("CAT2"),
REEE("CAT3", "CAT1"),
BACK_S_H("CAT1", "CAT4");
private ... |
markphip/testing | jira-dvcs-connector-api/src/main/java/com/atlassian/jira/plugins/dvcs/util/ao/query/term/QueryColumn.java | <reponame>markphip/testing
package com.atlassian.jira.plugins.dvcs.util.ao.query.term;
import com.atlassian.jira.plugins.dvcs.util.ao.query.DefaultQueryNode;
import com.atlassian.jira.plugins.dvcs.util.ao.query.QueryContext;
import net.java.ao.RawEntity;
/**
* Defines table column - necessary because of entity alias... |
adambodie/Adventures | src/components/Photo.js | import React, { Component } from 'react'
import '../styles/carousel.scss'
export default class Photo extends Component {
render() {
const { id, category, title, color, backgroundColor, index, length } = this.props;
const border = `-1px 0 ${backgroundColor}, 0 1px ${backgroundColor}, 1px 0 ${backgroundColor}, 0 -1... |
rocketbot-cl/genesysCloud | libs/PureCloudPlatformClientV2/apis/scim_api.py | <reponame>rocketbot-cl/genesysCloud
# coding: utf-8
"""
SCIMApi.py
Copyright 2016 SmartBear Software
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/... |
AlexanderPetrovv/Java-Fundamentals | JavaAdvanced/14.StreamApiExercise/src/FilterStudentsByEmailDomain.java | <reponame>AlexanderPetrovv/Java-Fundamentals
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.LinkedHashMap;
import java.util.Map;
public class FilterStudentsByEmailDomain {
public static void main(String[] args) throws IOException {
BufferedRead... |
Next-Gen-UI/Code-Dynamics | Leetcode/0633. Sum of Square Numbers/0633.java | class Solution {
public boolean judgeSquareSum(int c) {
int l = 0;
int r = (int) Math.sqrt(c);
while (l <= r) {
final int sum = l * l + r * r;
if (sum == c)
return true;
if (sum < c)
++l;
else
--r;
}
return false;
}
}
|
gmachado-janrain/ApiExplorer | src/services/SchemaSvc.js | 'use strict';
var pluck = require('lodash/collection/pluck');
var intersect = require('lodash/array/intersection');
module.exports = function(CredentialSvc, HttpSvc, $q) {
'ngInject';
var self = this;
function basePath() {
var creds = CredentialSvc.get()
return [
'config',
creds.appId,
... |
Leoyuseu/Code | LeetCode/c/116.c | #include <stdio.h>
#include <stdlib.h>
struct TreeLinkNode {
int val;
struct TreeLinkNode *left, *right, *next;
};
void connectHelper(struct TreeLinkNode *node, struct TreeLinkNode *sibling) {
if (node == NULL) return;
if (!node->left || !node->right) return;
/* node have two children */
node... |
vadim8kiselev/reflection-ui | src/main/java/com/kiselev/reflection/ui/impl/name/NameUtils.java | package com.kiselev.reflection.ui.impl.name;
public class NameUtils {
public String getTypeName(Class<?> clazz) {
String typeName = clazz.getSimpleName();
if ("".equals(typeName)) {
typeName = clazz.getName().substring(clazz.getName().lastIndexOf('.') + 1);
}
return t... |
zhangkn/iOS14Header | System/Library/PrivateFrameworks/Translation.framework/_LTTranslationRequest.h | <gh_stars>1-10
/*
* This header is generated by classdump-dyld 1.0
* on Sunday, September 27, 2020 at 11:42:11 AM Mountain Standard Time
* Operating System: Version 14.0 (Build 18A373)
* Image Source: /System/Library/PrivateFrameworks/Translation.framework/Translation
* classdump-dyld is licensed under GPLv3, Copyright... |
timfel/netbeans | ide/xml.schema.model/src/org/netbeans/modules/xml/schema/model/ElementReference.java | <gh_stars>1000+
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* ... |
OuesFa/integrations-core | teradata/datadog_checks/teradata/utils.py | <reponame>OuesFa/integrations-core
# (C) Datadog, Inc. 2022-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
import time
from typing import Any, AnyStr, Sequence, Set, Tuple
from datadog_checks.base import AgentCheck
from datadog_checks.teradata.config_models.instance import Ta... |
rantler/AdaFruit | adafruit-circuitpython-bundle-py-20201107/examples/stmpe610_simpletest.py | import busio
import board
import digitalio
from adafruit_stmpe610 import Adafruit_STMPE610_SPI
spi = busio.SPI(board.SCK, board.MOSI, board.MISO)
cs = digitalio.DigitalInOut(board.D6)
st = Adafruit_STMPE610_SPI(spi, cs)
print("Go Ahead - Touch the Screen - Make My Day!")
while True:
if not st.buffer_em... |
tusharchoudhary0003/Custom-Football-Game | sources/p005cm/aptoide/p006pt/home/apps/C3610Td.java | <reponame>tusharchoudhary0003/Custom-Football-Game
package p005cm.aptoide.p006pt.home.apps;
import p005cm.aptoide.p006pt.database.realm.Update;
import p026rx.p027b.C0132p;
/* renamed from: cm.aptoide.pt.home.apps.Td */
/* compiled from: lambda */
public final /* synthetic */ class C3610Td implements C0132p {
/* ... |
daffinito/dmh | client/src/reducers/dispensaryReducer.js | <gh_stars>0
import { GET_DISPENSARY_BY_ACCOUNT } from "../actions/types";
const DEFAULT_STATE = {
getDispensaryByAccount: {
success: null,
message: null
},
name: "",
place_id: "",
address: "",
lat: 0,
lng: 0,
zip: ""
};
// refactor this to use spread operator
export default (state = DEFAULT_S... |
OpenHEC/SNN-simulator-on-PYNQcluster | NEST-14.0-FPGA/pynest/nest/tests/test_onetooneconnect.py | <filename>NEST-14.0-FPGA/pynest/nest/tests/test_onetooneconnect.py
# -*- coding: utf-8 -*-
#
# test_onetooneconnect.py
#
# This file is part of NEST.
#
# Copyright (C) 2004 The NEST Initiative
#
# NEST is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as publ... |
EtsTest-ReactNativeApps/athens-bus-app | src/_commons/style/colors.js | const sharper = 'black';
const sharp = 'steelblue';
const canvas = 'lightgrey';
const smooth = 'skyblue';
const smoother = 'powderblue';
const info = 'green';
const warning = 'orange';
const error = 'tomato';
const bus = '#3333ff';
const trolley = '#ffff33';
const polyline = 'green';
const marker = 'orange';
const s... |
Nicolas-Francisco/final-reality-Nicolas-Francisco | src/test/java/com/github/cc3002/finalreality/model/weapon/AxeTest.java | package com.github.cc3002.finalreality.model.weapon;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
/**
* This testing class tests all the methods of an Axe weapon.
*
* @author <NAME>
* @author <NAME>
*/
public class AxeTest extends AbstractWeaponTest{
private static final Strin... |
yen-igaw/reactnative_dfinery_ecommerce_demo | src/screens/FavoriteScreen/components/FavoriteItem.js | import React, { useState, useEffect, useRef } from "react";
import {
View,
Text,
Image,
StyleSheet,
TouchableOpacity,
ActivityIndicator,
Animated,
Alert,
} from "react-native";
import Swipeable from "react-native-gesture-handler/Swipeable";
//Redux
import { useDispatch } from "react-redux";
// Action
im... |
epicmanmoo/post-from-OS | InstagramCode/post_to_instagram_obj.py | import base64
import datetime
from email.mime.text import MIMEText
import os
import requests
import selenium.common.exceptions
from requests.structures import CaseInsensitiveDict
from selenium import webdriver
import smtplib
import time
from tinydb import TinyDB, Query
from webdriver_manager.chrome import ChromeDriverM... |
paulolima18/ProgrammingMesh | C/OSystems/exame/g3/g3.c | <gh_stars>1-10
#include <unistd.h>
/* chamadas ao sistema: defs e decls essenciais */
int execl(const char *path, const char *arg0, ..., NULL);
int execlp(const char *file, const char *arg0, ..., NULL);
int execv(const char *path, char *const argv[]);
int execvp(const char *file, char *const argv[]);
|
ausmarton/jruby | truffle/src/main/java/org/jruby/truffle/nodes/core/ArrayNodes.java | <reponame>ausmarton/jruby
/*
* Copyright (c) 2013, 2015 Oracle and/or its affiliates. All rights reserved. This
* code is released under a tri EPL/GPL/LGPL license. You can use it,
* redistribute it and/or modify it under the terms of the:
*
* Eclipse Public License version 1.0
* GNU General Public License versio... |
norbertosanchezdichi/TIL | MachineLearning/Regression/ModelSelection/random_forest_regression_model_selection.py | <filename>MachineLearning/Regression/ModelSelection/random_forest_regression_model_selection.py
# Import libraries
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
# Import dataset
dataset = pd.read_csv('Data.csv')
X = dataset.iloc[:, :-1].values
Y = dataset.iloc[:, -1].values
print(f"X = {X}")
... |
jmiserez/onos | providers/netconf/device/src/test/java/org/onosproject/provider/netconf/device/impl/NetconfDeviceProviderTest.java | /*
* Copyright 2015 Open Networking Laboratory
*
* 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 la... |
Newsqueak/mixianyongche | server/codes/NewbierCar/doCloud/main/www.js | <reponame>Newsqueak/mixianyongche<filename>server/codes/NewbierCar/doCloud/main/www.js
#!/usr/bin/env node
/**********
*
* should start module config first
*/
var fs = require('fs');
var express = require('express');
var passport = require('passport');
var config = require("../config/config");
var common = require("... |
damien-monni/simple-planning-poker | src/components/ResetSessionButton.js | <reponame>damien-monni/simple-planning-poker<gh_stars>0
import React from 'react';
import Button from '@material-ui/core/Button';
import { useTranslation } from 'react-i18next';
import { makeStyles } from '@material-ui/styles';
const useStyles = makeStyles({
noBorderRadius: {
borderRadius: 0,
},
});
export de... |
proglang/dts-generate-results | results/4_extract-code/code/css-modules-require-hook/css-modules-require-hook_104.js | <filename>results/4_extract-code/code/css-modules-require-hook/css-modules-require-hook_104.js
const hook = require('css-modules-require-hook');
const lessParser = require('postcss-less').parse;
hook({
extensions: '.less',
processorOpts: {parser: lessParser},
});
|
vitahlin/kennen | javar/jdk8-analysis/src/com/sun/corba/se/spi/monitoring/MonitoringConstants.java | /*
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Softwa... |
ladyian15/quickdic-dictionary.dictionary | jars/icu4j-52_1/main/classes/core/src/com/ibm/icu/util/TimeUnit.java | /*
**************************************************************************
* Copyright (C) 2008-2013, Google, International Business Machines
* Corporation and others. All Rights Reserved.
**************************************************************************
*/
package com.ibm.icu.util;
/**
* Measuremen... |
EBGToo/swift | unittests/runtime/Enum.cpp | //===--- Enum.cpp - Enum tests --------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/L... |
gonzalogarahuetes/REST_API-with-Mongoose | src/models/publisher-model.js | const mongoose = require("mongoose");
const PublisherSchema = new mongoose.Schema({
name: {
type: String,
required: true,
trim: true,
},
creationDate: {
type: Date,
},
authors: [
{
type: mongoose.SchemaTypes.ObjectId,
ref: "author",
},
],
books: [
{
type: mon... |
dreamsxin/ultimatepp | uppdev/Layout/Layout.h | <filename>uppdev/Layout/Layout.h<gh_stars>1-10
#ifndef _Layout_Layout_h
#define _Layout_Layout_h
#include <CtrlLib/CtrlLib.h>
using namespace Upp;
#define LAYOUTFILE <Layout/Layout.lay>
#include <CtrlCore/lay.h>
class Layout : public WithLayoutLayout<TopWindow> {
public:
typedef Layout CLASSNAME;
Lay... |
artkuli/openvino | src/plugins/intel_cpu/src/nodes/gather_tree.cpp | <reponame>artkuli/openvino
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <string>
#include <vector>
#include <cmath>
#include <ngraph/op/gather_tree.hpp>
#include "ie_parallel.hpp"
#include "gather_tree.h"
#include <utils/general_utils.h>
using namespace InferenceEng... |
75986562/ToolsDemo | src/main/java/com/hfi/web01/mybatisPlus/entity/Product.java | package com.hfi.web01.mybatisPlus.entity;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import lombok.*;
import lombok.experimental.Accessors;
/**
* <p>
*
* </p>
*
... |
DemigodsRPG/DemigodsRPG | src/main/java/com/demigodsrpg/DGData.java | <gh_stars>1-10
package com.demigodsrpg;
import com.demigodsrpg.ability.AbilityRegistry;
import com.demigodsrpg.deity.Deity;
import com.demigodsrpg.family.Family;
import com.demigodsrpg.registry.*;
import com.demigodsrpg.registry.file.*;
import com.demigodsrpg.registry.memory.BattleRegistry;
import com.demigodsrpg.regi... |
lofunz/mieme | Reloaded/tags/MAME4droid.Reloaded.1.0.WIP/src/mame/drivers/gijoe.c | <reponame>lofunz/mieme
#define JOE_DEBUG 0
#define JOE_DMADELAY attotime_add(ATTOTIME_IN_NSEC(42700), ATTOTIME_IN_NSEC(341300))
/***************************************************************************
<NAME> (c) 1992 Konami
Change Log
----------
AT070403:
tilemap.h,tilemap.c
- added tilemap_get_transpare... |
yosshor/limestone | optimization/src/main/java/org/tglanz/limestone/optimization/LimeRelOptCostFactory.java | <filename>optimization/src/main/java/org/tglanz/limestone/optimization/LimeRelOptCostFactory.java
package org.tglanz.limestone.optimization;
import org.apache.calcite.plan.RelOptCost;
import org.apache.calcite.plan.RelOptCostFactory;
import org.apache.commons.lang.NotImplementedException;
public class LimeRelOptCostF... |
SynthSys/BioDare2-BACK | src/test/java/ed/biodare2/backend/features/tsdata/datahandling/TSDataHandlerSpringTest.java | <filename>src/test/java/ed/biodare2/backend/features/tsdata/datahandling/TSDataHandlerSpringTest.java
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ed.biodare2.backend.... |
bezout/LMA | examples/convert_camera_model/src/unified.cpp | #include <libv/geometry/camera_model.hpp>
#include <libv/lma/lma.hpp>
#include "modules.hpp"
namespace {
struct _Error: Error
{
bool operator()(const Vector5d &v, double (&res)[2]) const
{
Vector2d p;
bool good = UnifiedCameraModel(v[0], v[1], v[2], v[3], v[4]).project(p3, p);
if(config.verbose()) v3... |
Dup4/TI1050 | docs/trainings/2018-Multi-University-Trainings/Contest-3/solutions/c.cpp | <reponame>Dup4/TI1050
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 1 << 10;
const int MOD = 1e9 + 7;
int t, n, m;
ll dp[maxn];
ll ans[12];
inline int cal(int x) {
int cnt = 0;
while (x) {
if (x & 1)
cnt++;
x >>= 1;
}
return cnt;
}
... |
tuwiendsg/RAHYMS | hcu/hcu-common/src/main/java/at/ac/tuwien/dsg/hcu/common/interfaces/ServiceManagerInterface.java | package at.ac.tuwien.dsg.hcu.common.interfaces;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import at.ac.tuwien.dsg.hcu.common.exceptions.NotFoundException;
import at.ac.tuwien.dsg.hcu.common.model.ComputingElement;
import at.ac.tuwien.dsg.hcu.common.model.Connection;
import at.... |
Next-Gen-UI/Code-Dynamics | Leetcode/2001-3000/2154. Keep Multiplying Found Values by Two/2155.py | <gh_stars>0
class Solution:
def findFinalValue(self, nums: List[int], original: int) -> int:
numsSet = set(nums)
while original in numsSet:
original *= 2
return original
|
HuttonICS/diversify-server | src/jhi/diversify/server/resource/TraitPlotDataResource.java | <gh_stars>0
package jhi.diversify.server.resource;
import org.jooq.DSLContext;
import org.jooq.tools.StringUtils;
import org.restlet.data.Status;
import org.restlet.data.*;
import org.restlet.representation.FileRepresentation;
import org.restlet.resource.*;
import java.io.*;
import java.nio.charset.StandardCharsets;
... |
tharindusathis/sourcecodes-of-CodeReadingTheOpenSourcePerspective | ace/tao/tao/Muxed_TMS.cpp | <reponame>tharindusathis/sourcecodes-of-CodeReadingTheOpenSourcePerspective
// Muxed_TMS.cpp,v 1.10 2001/08/08 17:24:07 bala Exp
#include "tao/Muxed_TMS.h"
#include "tao/Reply_Dispatcher.h"
#include "tao/GIOP_Message_Version.h"
#include "tao/debug.h"
#include "tao/Pluggable_Messaging_Utils.h"
#include "Transp... |
vicvans20/ruby-brightpearl | spec/ruby/brightpearl_spec.rb | <gh_stars>0
# frozen_string_literal: true
RSpec.describe Brightpearl do
it "has a version number" do
expect(Brightpearl::VERSION).not_to be nil
end
xit "does something useful" do
expect(false).to eq(true)
end
context '.config' do
it 'is an instance of Config' do
expect(Brightpearl.confi... |
bdcorps/airswap.js | src/index/redux/eventTrackingActions.js | // This file is generated code, edits will be overwritten
const abi = require('../../abis/index.json')
export const trackIndexOwnershipTransferred = ({
callback,
previousOwner,
newOwner,
fromBlock,
backFillBlockCount,
} = {}) => ({
callback,
abi,
name: 'OwnershipTransferred',
params: { previousOwner,... |
codrinbucur/activemq-artemis | artemis-server/src/test/java/org/apache/activemq/artemis/core/reload/ReloadManagerTest.java | <reponame>codrinbucur/activemq-artemis<gh_stars>100-1000
/**
* 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.