repo_name stringlengths 6 101 | path stringlengths 4 300 | text stringlengths 7 1.31M |
|---|---|---|
LiFantastic/LeetCode | #046.cpp | <filename>#046.cpp
/*============================================================
Problem: Permutations
==============================================================
Given a collection of numbers, return all possible permutations.
For example,
[1,2,3] have the following permutations:
[1,2,3], [1,3,2], [2,1,3], [2,3,1... |
dp50mm/hyperobjects-language | src/geometry/Line.js | import Geometry from './Geometry'
import PathFunctions from './path/PathFunctions'
import PathBooleans from './path/PathBooleans'
import Point from './Point'
import { LINE } from "./types"
import _ from "lodash"
function line_intersect(x1, y1, x2, y2, x3, y3, x4, y4)
{
var ua, ub, denom = (y4 - y3)*(x2 - x1) - (x4... |
mvachhani/incubator-gobblin | gobblin-service/src/main/java/org/apache/gobblin/service/modules/dataset/BaseDatasetDescriptor.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 may ... |
TheChosenEvilOne/MindustryFork | core/src/io/anuke/mindustry/ui/fragments/HudFragment.java | <reponame>TheChosenEvilOne/MindustryFork
package io.anuke.mindustry.ui.fragments;
import static io.anuke.mindustry.Vars.*;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Color;
import io.anuke.mindustry.Mindustry;
import io.anuke.mindustry.Vars;
import io.anuke.mindustry.core.GameState;
import io.anuk... |
aliyun/aliyun-openapi-cpp-sdk | companyreg/src/model/GetTaxInfoRequest.cc | <gh_stars>10-100
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
... |
danielkolesnik/java-api-base-ui | src/reducers/app.js | <reponame>danielkolesnik/java-api-base-ui
import { APP } from '../actions/types';
const initial = {
health: false,
auth: false,
ready: false,
user: null,
};
export default function (state = initial, action) {
const { type, ...options } = action;
switch (type) {
default:
b... |
uikino/UDRefl-xmake-fork | src/test/ext/00_bootstrap/main.cpp | #include <UDRefl/UDRefl.hpp>
#include <UDRefl_ext/Bootstrap.h>
#include <iostream>
using namespace Ubpa;
using namespace Ubpa::UDRefl;
struct A {
float data;
};
int main() {
Mngr.RegisterType<A>();
Mngr.AddField<&A::data>("data");
Ubpa_UDRefl_ext_Bootstrap();
A a;
ObjectView{ a }.Var("data") = 3;
std::cout <<... |
gb-archive/really-old-stuff | megadrive/genesisrpgcreator_0.05_alpha_src/editor/GenesisRPGCreator/tiled/mapeditor/widget/IntegerSpinner.java | /*
* Tiled Map Editor, (c) 2004
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* <NAME> <<EMAIL>>
*... |
pkavumba/arxiv-vanity-restful-api | arxiv_vanity/settings.py | """
For more information on this file, see
https://docs.djangoproject.com/en/1.11/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/ref/settings/
"""
import os
from django.core.exceptions import ImproperlyConfigured
import environ
import logging
import sentry_... |
ws1993/licia | src/PriorityQueue.js | <gh_stars>1000+
/* Priority queue implementation.
*
* ### size
*
* Queue size.
*
* ### constructor
*
* |Name |Desc |
* |-----|----------|
* |cmp |Comparator|
*
* ### clear
*
* Clear the queue.
*
* ### enqueue
*
* Add an item to the queue.
*
* |Name |Desc |
* |------|------------|
* |... |
JeromeDuboisPro/framework | arcane/src/arcane/ServiceFinder2.h | <reponame>JeromeDuboisPro/framework
// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
//-----------------------------------------------------------------------------
// Copyright 2000-2021 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
// See the top-level COPYRIGHT file for details.
... |
zipated/src | components/offline_pages/core/offline_page_feature.h | <reponame>zipated/src
// Copyright 2015 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.
#ifndef COMPONENTS_OFFLINE_PAGES_CORE_OFFLINE_PAGE_FEATURE_H_
#define COMPONENTS_OFFLINE_PAGES_CORE_OFFLINE_PAGE_FEATURE_H_
#includ... |
cacao-soft/RMVX | Shadow.rb | #=============================================================================
# [RGSS2] 自動影機能の回避 - v1.0.2
# ---------------------------------------------------------------------------
# Copyright (c) 2021 CACAO
# Released under the MIT License.
# https://opensource.org/licenses/mit-license.php
# ------------------... |
Darlingnotin/Antisocial_VR | libraries/script-engine/src/DataViewPrototype.h | //
// DataViewPrototype.h
//
//
// Created by Clement on 7/8/14.
// Copyright 2014 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#ifndef hifi_DataViewPrototype_h
#define hifi_DataViewPrototype... |
cliff363825/TwentyFour | 01_Language/03_Java/j2ee/src/test/java/com/onevgo/bookstore/TradeDAOTest.java | <filename>01_Language/03_Java/j2ee/src/test/java/com/onevgo/bookstore/TradeDAOTest.java<gh_stars>1-10
package com.onevgo.bookstore;
import com.onevgo.bookstore.dao.TradeDAO;
import com.onevgo.bookstore.dao.impl.TradeDAOImpl;
import com.onevgo.bookstore.domain.Trade;
import org.junit.Test;
import java.sql.Date;... |
ACPK/atc | scheduler/scheduler.go | package scheduler
import (
"sync"
"time"
"github.com/pivotal-golang/lager"
"github.com/concourse/atc"
"github.com/concourse/atc/config"
"github.com/concourse/atc/db"
"github.com/concourse/atc/db/algorithm"
"github.com/concourse/atc/engine"
)
//go:generate counterfeiter . PipelineDB
type PipelineDB interfac... |
yuil-intern/Object_Oriented_Programming_C_Plus_Plus | Lesson 2 - C++ Basic IO/013 - print all natural numbers upto 10 (using for loop)/main.cpp | <reponame>yuil-intern/Object_Oriented_Programming_C_Plus_Plus
#include <iostream>
using namespace std;
main() {
int i;
for ( i = 1; i <= 10; i++)
{
cout << i << endl;
}
} |
kikislater/OTB | Modules/Filtering/Path/test/otbPolyLineImageConstIterator.cxx | <filename>Modules/Filtering/Path/test/otbPolyLineImageConstIterator.cxx
/*
* Copyright (C) 2005-2019 Centre National d'Etudes Spatiales (CNES)
*
* This file is part of Orfeo Toolbox
*
* https://www.orfeo-toolbox.org/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this ... |
VTUZ-12IE1bzud/TruckMonitor-Backend | model/vehicle.go | package model
type (
// Вид ТС
VehicleType struct {
Id int
Name string
}
// Марка ТС
VehicleBrand struct {
Id int
TypeId int
Name string
}
// Марка ТС
VehicleModel struct {
Id int
BrandId int
Name string
CapacityMax float32
}
// ТС
Vehicle struct {
Id ... |
stackrox/stackrox | central/nodecomponent/datastore/store/postgres/store_test.go | // Code generated by pg-bindings generator. DO NOT EDIT.
//go:build sql_integration
package postgres
import (
"context"
"testing"
"github.com/jackc/pgx/v4/pgxpool"
"github.com/stackrox/rox/generated/storage"
"github.com/stackrox/rox/pkg/features"
"github.com/stackrox/rox/pkg/postgres/pgtest"
"github.com/stac... |
uncodecn/SmartEngine | core/src/main/java/com/alibaba/smart/framework/engine/bpmn/assembly/expression/parser/ConditionExpressionParser.java | package com.alibaba.smart.framework.engine.bpmn.assembly.expression.parser;
import javax.xml.namespace.QName;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
import com.alibaba.smart.framework.engine.bpmn.assembly.expression.ConditionExpressionImpl;
import com.alibaba.smart.framew... |
SPECURE/ont-controlserver-core | src/test/java/com/specure/core/enums/PackageTypeTest.java | package com.specure.core.enums;
import com.specure.core.exception.PackageTypeException;
import com.specure.core.TestConstants;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.junit4.SpringRunner;
import static junit.framework.TestCase.assertEquals;
@RunWith(SpringRunne... |
mustard93/Medical-system | src/angular/modules/project-dt/controllers-businessScopeEditCtrl.js | define('project-dt/controllers-businessScopeEditCtrl', ['project-dt/init'], function() {
/**
* [businessScopeEditCtrl 首营各模块公用控制器]
* @method businessScopeEditCtrl
* @param {[type]} $scope [description]
* @param {[type]} watchFormChange [description]
* @param {[typ... |
Ziang-Lu/Design-Patterns | 2-Creational Patterns/1-Factory Method Pattern & Abstract Factory Pattern/DocumentCreator-Letter-Resume Example/Java/product_document/ModernResume.java | <reponame>Ziang-Lu/Design-Patterns
package product_document;
/**
* Concrete product ModernResume class.
*
* @author <NAME>
*/
public class ModernResume implements Resume {
@Override
public String toString() {
return "This is a MODERN RESUME.";
}
}
|
y836097668/springboot2-learning | event/src/main/java/com/sherlocky/springboot2/applicationevent/Springboot2EventApplication.java | package com.sherlocky.springboot2.applicationevent;
import com.sherlocky.springboot2.applicationevent.event.MyBlogEvent;
import com.sherlocky.springboot2.applicationevent.listener.MyListener1ByManual;
import com.sherlocky.springboot2.applicationevent.listener.MyListener3ByEventListenerAnnotation;
import org.slf4j.Logg... |
jkdubr/Proj4 | Pod/Classes/Projection/MOBProjectionEPSG5777.h | <reponame>jkdubr/Proj4
#import "MOBProjection.h"
@interface MOBProjectionEPSG5777 : MOBProjection
@end
|
khrushjing/node-gdal-async | deps/libgeos/geos/src/triangulate/tri/Tri.cpp | /**********************************************************************
*
* GEOS - Geometry Engine Open Source
* http://geos.osgeo.org
*
* Copyright (C) 2020 <NAME> <<EMAIL>>
*
* This is free software; you can redistribute and/or modify it under
* the terms of the GNU Lesser General Public Licence as published
... |
si9ma/KillOJ-backend | api/user.go | <reponame>si9ma/KillOJ-backend<gh_stars>0
package api
import (
"net/http"
"github.com/si9ma/KillOJ-backend/wrap"
"github.com/si9ma/KillOJ-backend/middleware"
"github.com/si9ma/KillOJ-backend/auth"
"github.com/jinzhu/gorm"
"github.com/si9ma/KillOJ-common/utils"
"github.com/si9ma/KillOJ-common/mysql"
"git... |
github188/WirelessGPSTracker | mtk/inc/C_H/Unicodexdcl.h | <gh_stars>1-10
/*****************************************************************************
* Copyright Statement:
* --------------------
* This software is protected by Copyright and the information contained
* herein is confidential. The software may not be copied and the information
* contained herein may not... |
tnakaicode/ChargedPaticle-LowEnergy | src/ef/util/subclasses.py | def get_all_subclasses(cls):
subclasses = set()
todo = [cls]
while todo:
parent = todo.pop()
for child in parent.__subclasses__():
if child not in subclasses:
subclasses.add(child)
todo.append(child)
return subclasses |
Fefe-Hern/SAIN-Report | src/window/sainReport/SainViewMajorsWindow.java | <filename>src/window/sainReport/SainViewMajorsWindow.java
package window.sainReport;
import window.admin.*;
import controller.AccountController;
import controller.MajorController;
import controller.Serializer;
import javafx.application.Application;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.Ob... |
defaultbranch/RxJavaRiddles | src/main/java/com/vanniktech/rxriddles/operators/multiplestreams/Riddle5.java | <reponame>defaultbranch/RxJavaRiddles
package com.vanniktech.rxriddles.operators.multiplestreams;
import io.reactivex.rxjava3.core.Observable;
class Riddle5 {
/**
* Sum up the latest values of [first] and [second] whenever one of the Observables emits a new value.
* <p>
* Use case: Two input fields in a calcul... |
monkeybars/monkeybars-core | lib/monkeybars/validated_hash.rb | <reponame>monkeybars/monkeybars-core<filename>lib/monkeybars/validated_hash.rb
class InvalidHashKeyError < Exception; end
module ValidatedHash
# Raises an exception if a key in the hash does not exist in the list of valid keys
def validate_only *keys
self.keys.each {|key| raise InvalidHashKeyError.new("#{key} ... |
wl-online-payments-direct/sdk-ruby | lib/onlinepayments/sdk/domain/personal_name.rb | <gh_stars>0
#
# This class was auto-generated.
#
require 'onlinepayments/sdk/data_object'
module OnlinePayments::SDK
module Domain
# @attr [String] first_name
# @attr [String] surname
# @attr [String] title
class PersonalName < OnlinePayments::SDK::DataObject
attr_accessor :first_name
at... |
VSecLab/XMLtoDB | src/main/java/com/unicampania/xmltodb/processor/parasequence_processor/ProcessorXref.java | package com.unicampania.xmltodb.processor.parasequence_processor;
import com.unicampania.xmltodb.model.parasequence.Url;
import com.unicampania.xmltodb.model.parasequence.Xref;
import org.springframework.batch.item.ItemProcessor;
public class ProcessorXref implements ItemProcessor<Xref, Xref> {
@Override
pub... |
anton23/gpanalyser | src-probes/uk/ac/imperial/doc/gpa/probes/AbstractProbeRunner.java | <reponame>anton23/gpanalyser
package uk.ac.imperial.doc.gpa.probes;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
i... |
rusucosmin/Cplusplus | easygraph/easygraph.cpp | <reponame>rusucosmin/Cplusplus
#include <iostream>
#include <fstream>
#include <vector>
#include <bitset>
#include <set>
using namespace std;
const int maxn = 15005;
const long long oo = (1LL << 60);
set <int> g[maxn];
int n, m;
int v[maxn];
long long dp[maxn], ans;
bitset <maxn> used;
void dfs(int node) {
used... |
zhuangli1987/LeetCode-1 | 0710-Random Pick with Blacklist/0710-Random Pick with Blacklist.cpp | class Solution {
public:
Solution(int N, vector<int> blacklist) {
wlen = N - blacklist.size();
for (int b : blacklist) {
table[b] = -1;
}
int mapped = N - 1;
for (int b : blacklist) {
if (b < wlen) {
while (table.count(mapped))... |
huseinzol05/Gather-Tensorflow-Serving | simple-backend/13.flask-gunicorn-haproxy/app.py | from flask import Flask, request, jsonify
from textblob import TextBlob
from ekphrasis.classes.preprocessor import TextPreProcessor
from ekphrasis.classes.tokenizer import SocialTokenizer
from ekphrasis.dicts.emoticons import emoticons
from ekphrasis.classes.spellcorrect import SpellCorrector
text_processor = TextPreP... |
jkuester/ccl-testing | jsch-util/src/main/java/com/cerner/ftp/jsch/impl/CachedConnection.java | <filename>jsch-util/src/main/java/com/cerner/ftp/jsch/impl/CachedConnection.java
package com.cerner.ftp.jsch.impl;
import java.net.URI;
import java.util.HashSet;
import java.util.Set;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.cerner.ftp.jsch.Connection;
import com.cerner.ftp.jsch.impl.Defau... |
afloarea/UniLab-2021 | lab05/loto-api/src/main/java/ro/unibuc/lab05/loto/api/services/LotoService.java | package ro.unibuc.lab05.loto.api.services;
import ro.unibuc.lab05.loto.api.controllers.ExtractionResult;
import ro.unibuc.lab05.loto.api.dto.LotoRegistration;
public interface LotoService {
void registerTicket(LotoRegistration ticket);
ExtractionResult extractWinners(double cheatChance, int[] cheatValues);
... |
myderam68/spring-boot-demo | shiro_jwt/src/main/java/com/springboot/demo/shiro_jwt/shiro/JwtRealm.java | <reponame>myderam68/spring-boot-demo
package com.springboot.demo.shiro_jwt.shiro;
import java.util.Set;
import com.springboot.demo.shiro_jwt.domain.UserEntity;
import com.springboot.demo.shiro_jwt.jwt.JwtToken;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authc.AccountException;
import org.apache.shi... |
raptoravis/cr19 | spu/tilesort/tilesortspu_lists_gen.c | <reponame>raptoravis/cr19<gh_stars>0
/* Copyright (c) 2001, Stanford University
All rights reserved.
See the file LICENSE.txt for information on redistributing this software. */
/* DO NOT EDIT - GENERATED by tilesort_lists.py SCRIPT */
#include <stdio.h>
#include "cr_spu.h"
#include "tilesortspu.h"
#include "til... |
vpachkov/MacaronOS | Kernel/Tasking/Thread.cpp | #include "Thread.hpp"
namespace Kernel::Tasking {
using namespace Memory;
void Thread::setup(Thread::Privilege pr)
{
if (!m_kernel_stack) {
m_kernel_stack = (uint32_t)malloc(KERNEL_STACK_SIZE);
}
m_user_stack = m_process->allocate_space(USER_STACK_SIZE, Flags::Write | Flags::User | Flags::Present... |
interonet/mercury | src/main/java/org/interonet/mercury/domain/ldm/task/LDMStartTask.java | <reponame>interonet/mercury
package org.interonet.mercury.domain.ldm.task;
import org.interonet.mercury.domain.core.Slice;
public class LDMStartTask extends LDMTask {
public LDMStartTask(Slice slice) {
super(slice);
}
}
|
fancylou/o2oa | x_organization_assemble_authentication/src/main/java/com/x/organization/assemble/authentication/jaxrs/authentication/ActionCheckCredential.java | <reponame>fancylou/o2oa<filename>x_organization_assemble_authentication/src/main/java/com/x/organization/assemble/authentication/jaxrs/authentication/ActionCheckCredential.java<gh_stars>1-10
package com.x.organization.assemble.authentication.jaxrs.authentication;
import com.x.base.core.container.EntityManagerContaine... |
Reewr/master | src/3D/Cube.hpp | #pragma once
#include "../Drawable/Drawable3D.hpp"
#include "../Log.hpp"
#include <memory>
#include <mmm.hpp>
class GLCube;
class btRigidBody;
class btCollisionShape;
struct btDefaultMotionState;
class Texture;
class Program;
/**
* @brief
* This represents a Cube with Physics in the world. It can be changed
... |
liangyongxiang/vsf-all-in-one | source/component/3rd-party/btstack/raw/port/arduino/btstack_config.h | <reponame>liangyongxiang/vsf-all-in-one
//
// btstack_config.h for Arduino port
//
#ifndef BTSTACK_CONFIG_H
#define BTSTACK_CONFIG_H
// Port related features
#define HAVE_EMBEDDED_TIME_MS
// BTstack features that can be enabled
#define ENABLE_BLE
#define ENABLE_LE_CENTRAL
#define ENABLE_LE_PERIPHERAL
#define ENABLE_... |
drone001/interviews | LeetCode/remote/perfect_squares.rb | # Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, ...) which sum to n.
require 'test/unit'
extend Test::Unit::Assertions
class Fixnum
def square_sum
# 1 - [1] - 1
# 2 - [1, 1] - 2
# 3 - [1, 1, 1] - 3
# 4 - [4] - 1
# 5 ... |
faraz891/gitlabhq | app/assets/javascripts/mirrors/ssh_mirror.js | import $ from 'jquery';
import { escape } from 'lodash';
import { deprecatedCreateFlash as Flash } from '~/flash';
import axios from '~/lib/utils/axios_utils';
import { backOff } from '~/lib/utils/common_utils';
import { __ } from '~/locale';
import AUTH_METHOD from './constants';
export default class SSHMirror {
co... |
excess-project/concurrent-tree-library | common/bench.h | <filename>common/bench.h
/*
bench.h
This is part of the tree library
Copyright 2015 <NAME> (UiT the Arctic University of Norway)
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.... |
SaladDais/LLUDP-Encryption | indra/llcommon/llmemory.cpp | <filename>indra/llcommon/llmemory.cpp<gh_stars>1-10
/**
* @file llmemory.cpp
* @brief Very special memory allocation/deallocation stuff here
*
* $LicenseInfo:firstyear=2002&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2010, Linden Research, Inc.
*
* This library is free software; you c... |
GwonsooLee/kubenx | pkg/utils/common.go | package utils
import (
"fmt"
"github.com/AlecAivazis/survey/v2"
"github.com/fatih/color"
"github.com/olekukonko/tablewriter"
"os"
"reflect"
"strconv"
"unsafe"
)
var (
ALL_NAMESPACE = ""
NO_STRING = ""
DEFAULT_NODE_LABEL_FILTERS = []string{"app", "env"}
//STATIS VALUE
KUBENX_... |
google-ar/chromium | third_party/WebKit/Source/platform/exported/WebURLRequest.cpp | /*
* Copyright (C) 2009 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditio... |
mingliangguo/citrus | core/citrus-base/src/test/java/com/consol/citrus/actions/TransformActionTest.java | /*
* Copyright 2006-2010 the original author or 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 app... |
alancnet/artifactory | web/application/src/main/java/org/artifactory/webapp/wicket/page/browse/home/ArtifactsHomePage.java | <reponame>alancnet/artifactory<filename>web/application/src/main/java/org/artifactory/webapp/wicket/page/browse/home/ArtifactsHomePage.java<gh_stars>1-10
/*
* Artifactory is a binaries repository manager.
* Copyright (C) 2012 JFrog Ltd.
*
* Artifactory is free software: you can redistribute it and/or modify
* it u... |
uk-gov-mirror/ministryofjustice.hmpps-book-secure-move-frontend | app/allocations/index.js | const router = require('express').Router()
const { renderAsTable } = require('../../common/controllers/collection')
const {
redirectDefaultQuery,
redirectView,
setActions,
setContext,
setDatePagination,
setDateRange,
setPagination,
} = require('../../common/middleware/collection')
const { protectRoute } ... |
todorm85/TelerikAcademy | Projects/HikingPlanAndRescueMobile/source/app/views/main-menu/main-menu.js | <gh_stars>0
var frameModule = require('ui/frame');
exports.pageLoaded = function(args) {
var page = args.object;
};
exports.myTrainings = function() {
frameModule.topmost()
.navigate("views/list/list");
};
exports.planTraining = function() {
var topmost = frameModule.topmost();
topmost.naviga... |
heiseish/Competitive-Programming | kattis_done/ahocorasick.cpp | <reponame>heiseish/Competitive-Programming<filename>kattis_done/ahocorasick.cpp
/**
A detective who uses his deductive powers to corner a suspect, and then does nothing to stop them from committing suicide, is no better than the murderer himself.
*/
#include <bits/stdc++.h>
#define forn(i, l, r) for(int i=l;i<... |
UKGovernmentBEIS/beis-report-overseas-development-assistance | app/services/import_forecasts.rb | <filename>app/services/import_forecasts.rb
require "csv"
require "set"
class ImportForecasts
Error = Struct.new(:row, :column, :value, :message) {
def csv_row
row + 2
end
}
RODA_ID_KEY = "Activity RODA Identifier"
FORECAST_COLUMN_HEADER = /FC +(\d{4})\/\d{2} +FY +Q([1-4])/
FORECAST_QUARTERS = ... |
rog-works/lambda-fw | tests/unit/lf3py/lang/test_dsn.py | <gh_stars>0
from typing import List
from unittest import TestCase
from lf3py.lang.dsn import DSN
from lf3py.test.helper import data_provider
class TestDSN(TestCase):
@data_provider([
(['event', 'on'], 'event.on'),
(['event', 'off'], 'event.off'),
])
def test_format(self, elems: List[str],... |
trydofor/pro.fessional.meepo | src/main/resources/pro/fessional/meepo/poof/impl/java/JavaName.java | <filename>src/main/resources/pro/fessional/meepo/poof/impl/java/JavaName.java<gh_stars>1-10
package pro.fessional.meepo.poof.impl.java;
import org.jetbrains.annotations.NotNull;
import pro.fessional.meepo.eval.JavaEval;
import java.util.Map;
// HI-MEEPO
// RNA:USE #// *other-imports#import#
// other-imports
/**
* @... |
bitex-la/bitex-ruby | lib/bitex/base.rb | <gh_stars>1-10
module Bitex
# Generic base resource for Bitex resources.
class Base < JsonApiClient::Resource
def self.find(*args)
super(*args)[0]
end
end
end
|
dileeshvar/deeplearning4j | deeplearning4j-nn/src/main/java/org/deeplearning4j/earlystopping/termination/MaxEpochsTerminationCondition.java | /*-
*
* * Copyright 2015 Skymind,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
* *
* * ... |
init-src/initsrc | initsrc-monitor/src/main/java/com/initsrc/dev/controller/MonitorController.java | package com.initsrc.dev.controller;
import com.initsrc.common.base.Result;
import com.initsrc.dev.service.SystemHardwareInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import ... |
mysociety/correspondence_tool_staff | spec/controllers/cases_controller/execute_request_amends_spec.rb | <gh_stars>0
require 'rails_helper'
RSpec.describe CasesController, type: :controller do
let(:pending_private_clearance_case) { create :pending_private_clearance_case }
let(:private_officer) { find_or_create :private_officer }
let(:service) { instance_double(CaseRequestAmends... |
secucard/secucard-connect-javascript-client-lib | dist/system/de.secucard.connect/product/loyalty/model/condition.js | <reponame>secucard/secucard-connect-javascript-client-lib
System.register([], function (_export) {
"use strict";
var Condition;
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
return {
se... |
rcukmuratom/transition | db/migrate/20140618145219_add_hit_count_to_mappings.rb | class AddHitCountToMappings < ActiveRecord::Migration[4.1]
def change
add_column :mappings, :hit_count, :integer
add_index :mappings, :hit_count
end
end
|
rashmiChandy/hockey_simulation | src/main/java/dhl/businessLogic/aging/agingFactory/AgingAbstractFactory.java | <filename>src/main/java/dhl/businessLogic/aging/agingFactory/AgingAbstractFactory.java
package dhl.businessLogic.aging.agingFactory;
import dhl.businessLogic.aging.interfaceAging.IAging;
import dhl.businessLogic.aging.interfaceAging.IInjury;
import dhl.businessLogic.aging.interfaceAging.ILeagueSchedule;
import dhl.bus... |
yassermahmud/winsome-web | src/js/components/photogallery/photogalleryData.js | <filename>src/js/components/photogallery/photogalleryData.js
const images = [
{
path: '../images/Hero.jpg',
caption: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit',
key: 1
},
{
path: '../images/IMG_0224.JPG',
caption: 'sed do eiusmod tempor incididunt ut labore',
key: 2
},
{
path: '../ima... |
gds-attic/finder-api | lib/tasks/email_subscriptions.rake | <reponame>gds-attic/finder-api
namespace :email_subscriptions do
desc "DEPRECATED: No longer required. Please remove from any deploy scripts"
task :register_subscriptions do
p "DEPRECATED: rake email_subscriptions:register_subscriptions is no longer required. Please remove from any deploy scripts"
end
end
|
GValiente/torrijas | torrijas/source/trjcolor.cpp | //
// Copyright (c) 2015 <NAME> <EMAIL>
//
// This software is provided 'as-is', without any express or implied
// warranty. In no event will the authors be held liable for any damages
// arising from the use of this software.
// Permission is granted to anyone to use this software for any purpose,
// including commer... |
duoduo369/parrot | src/test/java/com/reworkplan/resources/ArticlesResourceTest.java | package com.reworkplan.resources;
public class ArticlesResourceTest{
public void test(){}
} |
Kirishikesan/haiku | src/apps/icon-o-matic/shape/commands/AddPointCommand.cpp | <reponame>Kirishikesan/haiku
/*
* Copyright 2006, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* <NAME> <<EMAIL>>
*/
#include "AddPointCommand.h"
#include <stdio.h>
#include <Catalog.h>
#include <Locale.h>
#include "VectorPath.h"
#undef B_TRANSLATION_CONTEXT
#define B_TRANSLATION_C... |
schinmayee/nimbus | applications/physbam/physbam-lib/Public_Library/PhysBAM_Solids/PhysBAM_Deformables/Forces/DEFORMABLE_GRAVITY.cpp | <gh_stars>10-100
//#####################################################################
// Copyright 2002-2008, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>.
// This file is part of PhysBAM whose distribution is governed by the license contained in the accompanying file PHYSBAM_COPYRIGHT.txt.... |
sunsiyue/ACMEDB_MAIN | java/engine/org/apache/derby/impl/store/raw/xact/XactContext.java | /*
Derby - Class org.apache.derby.impl.store.raw.xact.XactContext
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 yo... |
lw-lin/incubator-ranger | storm-agent/src/test/java/org/apache/ranger/authorization/storm/WordCounterBolt.java | <reponame>lw-lin/incubator-ranger<gh_stars>0
/*
* 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 Lice... |
mulberry-mail/mulberry4-client | Win32/Sources/Support/Toolbars/CToolbar.cp | <filename>Win32/Sources/Support/Toolbars/CToolbar.cp
/*
Copyright (c) 2007-2009 <NAME>. 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
h... |
y-polek/AppCompat-Extension-Library | appcompat-extension/src/main/java/com/tr4android/support/extension/drawable/PlaceholderDrawable.java | package com.tr4android.support.extension.drawable;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.ColorFilter;
import android.graphics.Paint;
import android.graphics.PixelFormat;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.support.ann... |
krico/trocado | src/main/java/to/cwa/trocado/expense/om/Expense.java | package to.cwa.trocado.expense.om;
import com.google.appengine.api.datastore.Category;
import com.googlecode.objectify.Ref;
import com.googlecode.objectify.annotation.*;
import to.cwa.trocado.account.om.Account;
import to.cwa.trocado.om.HasId;
import to.cwa.trocado.util.ObjectsUtil;
import java.math.BigDecimal;
impor... |
jsloop42/dreamlisp | DreamLisp/DLAlgorithm.h | <reponame>jsloop42/dreamlisp
//
// DLAlgorithm.h
// DreamLisp
//
// Created by <NAME> on 07/07/19.
// Copyright © 2019 <NAME>. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "DLTypes.h"
NS_ASSUME_NONNULL_BEGIN
#define DLAlgo DLAlgorithm
@interface DLAlgorithm : NSObject
#pragma mark Sort
+ (v... |
alexlee-dev/grommet-patterns | src/components/Classification.js | import React from 'react'
import PropTypes from 'prop-types'
import { Box, Heading, Grid, ResponsiveContext } from 'grommet'
const Classification = ({ children, index = 0, name }) => {
return (
<ResponsiveContext.Consumer>
{size => (
<Box
pad={{ vertical: 'medium' }}
animation={... |
otaviotech/insta-clone | src/presentation/controllers/profile/follow.test.js | <reponame>otaviotech/insta-clone
import { jest } from '@jest/globals';
import { FollowController } from './follow';
import { ForbiddenError, ResourceNotFoundError } from '../../../domain/errors';
describe('FollowController', () => {
const makeSut = () => {
const followUseCaseStub = {
follow: jest.fn(() => ... |
benfromchina/jarvis-security | jarvis-security-social/src/main/java/com/stark/jarvis/security/social/client/userinfo/OAuth2UserRequestEntityConverterProviderManager.java | <gh_stars>1-10
/*
* Copyright 2002-2018 the original author or 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unles... |
iivanov03/Softuni-JS | Programming Basics/sumSecond.js | <gh_stars>0
function solve(firstTime, secondTime, thirdTime){
firstTime = Number(firstTime);
secondTime = Number(secondTime);
thirdTime = Number(thirdTime);
let totalSecond = firstTime + secondTime + thirdTime;
let minutes = Math.trunc(totalSecond / 60);
let second = totalSecond % 60;
... |
phatblat/macOSPrivateFrameworks | PrivateFrameworks/FinderKit/FI_TPathBarController.h | //
// Generated by class-dump 3.5 (64 bit).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by <NAME>.
//
#import <FinderKit/FI_TViewController.h>
#import "NSMenuDelegate.h"
#import "TMarkTornDown.h"
#import "TNodeObserverProtocol.h"
#import "TPathControlDelegate.h"
@class FI_TBrowserContai... |
moonreporter/GodSaveTheLPs | Docs/node_modules/@styled-icons/fa-solid/Ankh/Ankh.js | "use strict";
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.AnkhDimensions = exports.Ankh = void 0;
var _extends2 =... |
JustinGOSSES/pyrolite | pyrolite/plot/templates/__init__.py | <filename>pyrolite/plot/templates/__init__.py
"""
A utility submodule for standardised plot templates to be added to matplotlib axes.
"""
from .pearce import pearceThNbYb, pearceTiNbYb
from .TAS import TAS
__all__ = ["pearceThNbYb", "pearceTiNbYb", "TAS"]
|
Wlgen/force-riscv | py/riscv/GenSemaphoreRISCV.py | #
# Copyright (C) [2020] Futurewei Technologies, Inc.
#
# FORCE-RISCV is 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
#
# THIS SOFTWARE IS PR... |
TranscendComputing/harp-runtime | lib/harp-runtime/version.rb | module Harp
module Runtime
VERSION = "0.1.0"
end
end
|
kattekrab/veyepar | setup/mkvhost.py | #!/usr/bin/python
# makes an apache vhost config file based on settings.py
import sys, os
from distutils.sysconfig import get_python_lib
sys.path.insert(0,'.')
import settings
# slug - the string used for user, database, config name, site name, etc.
# slug = os.path.split(settings.PROJECT_ROOT)[-1]
slug = setti... |
CEMES-CNRS/full_cost_git | full_cost/lab/admin.py | <gh_stars>0
from django.contrib import admin
from simple_history.admin import SimpleHistoryAdmin
# Register your models here.
from .models import Group, Project, User, Price, Extraction, Gestionnaire
admin.site.register(Price, SimpleHistoryAdmin)
admin.site.register(Group, SimpleHistoryAdmin)
admin.site.register(Proje... |
Chyroc/underscore | syncmap/map.go | package syncmap
type Map interface {
Delete(key interface{})
Range(f func(key, value interface{}) bool)
Store(key, value interface{})
Load(key interface{}) (value interface{}, ok bool)
LoadOrStore(key, value interface{}) (actual interface{}, loaded bool)
}
|
JuliaComputing/arrayfire | examples/machine_learning/naive_bayes.cpp | /*******************************************************
* Copyright (c) 2014, ArrayFire
* All rights reserved.
*
* This file is distributed under 3-clause BSD license.
* The complete license agreement can be obtained at:
* http://arrayfire.com/licenses/BSD-3-Clause
**********************************************... |
jnow-87/vimgdb | include/user_cmd/ui.h | #ifndef USER_UI_H
#define USER_UI_H
/* prototypes */
bool cmd_ui_exec(int argc, char **argv);
void cmd_ui_help(int argc, char **argv);
#endif // USER_UI_H
|
joshsoftware/peerly | go-backend/db/badge_test.go | <reponame>joshsoftware/peerly
package db
import (
"context"
"github.com/DATA-DOG/go-sqlmock"
"github.com/jmoiron/sqlx"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/suite"
)
type BadgeTestSuite struct {
suite.Suite
dbStore Storer
db *sqlx.DB
sqlmock sqlmock.Sqlmock
}
func (suite *B... |
mdsd-team-1/photos-metamodeling | co.edu.unal.mdd.photos.tests/src/PhotosMetaModel/tests/RequestTest.java | <reponame>mdsd-team-1/photos-metamodeling
/**
*/
package PhotosMetaModel.tests;
import PhotosMetaModel.PhotosMetaModelFactory;
import PhotosMetaModel.Request;
import junit.textui.TestRunner;
/**
* <!-- begin-user-doc -->
* A test case for the model object '<em><b>Request</b></em>'.
* <!-- end-user-doc -->
* @ge... |
Silthus/art-framework | api/src/main/java/io/artframework/ResolveContext.java | package io.artframework;
import io.artframework.conf.KeyValuePair;
import io.artframework.impl.DefaultResolveContext;
import lombok.NonNull;
import javax.annotation.Nullable;
import java.util.List;
import java.util.Optional;
/**
* The ResolutionContext holds additional information about the resolution of resolvers
... |
orionlibs/algos | src/algos/projecteuler/Problem7.java | package algos.projecteuler;
import java.math.BigInteger;
//10001st prime = https://projecteuler.net/problem=7
public class Problem7
{
public static void main(String[] args)
{
System.out.println(solve());
}
private static long solve()
{
long i = 2;
long primeIndex ... |
nikosnikolaidis/sis | core/sis-utility/src/main/java/org/apache/sis/util/Debug.java | <filename>core/sis-utility/src/main/java/org/apache/sis/util/Debug.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 t... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.