repo_name stringlengths 6 101 | path stringlengths 4 300 | text stringlengths 7 1.31M |
|---|---|---|
MirekSz/webpack-es6-ts | app/mods/mod1986.js | import mod1985 from './mod1985';
var value=mod1985+1;
export default value;
|
belminksy/automaton | src/automaton/grid/World.java | /*
* MIT License
*
* Copyright (c) 2019 <NAME> and other contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* ... |
chhatarshal/Datastructure | datastructure/problems/BalanceBracket.java | package com.csingh.datastructure.problems;
import java.util.Stack;
public class BalanceBracket {
private static Stack stack = new Stack();
private static String allBrackets = "[] {}()";
public static boolean balanceBracker(String s) {
for (int i = 0; i < s.length(); i ++) {
char c = s.charAt(i);
if (!isBr... |
wilsonsouza/xbw_32 | bb.groups_controller.hpp | <reponame>wilsonsouza/xbw_32
//-----------------------------------------------------------------------------------------------//
// xbw32 for Windows (generate of numeric combinations for bingo or lotery) (generate of numeric combinations for bingo or lotery)
//
// Created by wilsonsouza 2012, 2013, 2014, 2015, 2016, 2... |
Furtif/POGOProtos-Java-Private | src/main/java/POGOProtos/Rpc/PingResponseProto.java | <gh_stars>1-10
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: POGOProtos.Rpc.proto
package POGOProtos.Rpc;
/**
* Protobuf type {@code POGOProtos.Rpc.PingResponseProto}
*/
public final class PingResponseProto extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insert... |
zhangycjob/jdcloud-sdk-java | pipeline/src/main/java/com/jdcloud/sdk/service/pipeline/model/GetLimitsResult.java | /*
* Copyright 2018 JDCLOUD.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/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in... |
COLAB2/midca | midca/modules/_plan/jShop/JSHOP.py | <filename>midca/modules/_plan/jShop/JSHOP.py
import inspect, os
import subprocess
from subprocess import Popen, PIPE, STDOUT
def jshop(tasks, DOMAIN_FIILE, STATE_FILE):
thisDir = os.path.dirname(os.path.realpath(__file__))
# thisDir = "C:/Users/Zohreh/git/midca/modules/_plan/jShop/"
MIDCA_ROOT = thisD... |
theumang100/tutorials-1 | core-python/Core_Python/loop/LoopingTechnique.py | from math import isnan
# looping through dictionaries
'''tel = {"abc":9877,"def":9563}
for k,v in tel.items():
print(k,v)'''
# looping with two or more sequences
from builtins import print
'''que = ["name","nick name","favourite person"]
ans = ["deep","DD","My MoM"]
sign = [".","!","!"]
for q,a,s in zip(que,ans,... |
Files-com/files-sdk-python | tests/test_group_user.py | import unittest
import inspect
import files_sdk
from tests.base import TestBase
from files_sdk.models import GroupUser
from files_sdk import group_user
class GroupUserTest(TestBase):
pass
# Instance Methods
@unittest.skipUnless(TestBase.mock_server_path_exists("PATCH", "/group_users/{id}"), "Mock path doe... |
michalciolek/bricklinkapi | src/main/java/org/dajlab/bricklinkapi/v1/enumeration/NewOrUsed.java | /*
* Copyright 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/LICENSE-2.0
*
* Unless required by applicable law or agreed to in wri... |
psakar/Resteasy | arquillian/resteasy-cdi-ejb-test/src/main/java/org/jboss/resteasy/cdi/generic/ConcreteDecorator.java | <gh_stars>0
package org.jboss.resteasy.cdi.generic;
import java.util.logging.Logger;
import javax.decorator.Decorator;
import javax.decorator.Delegate;
import javax.inject.Inject;
import javax.ws.rs.core.Response;
/**
*
* @author <a href="<EMAIL>"><NAME></a>
* @version $Revision: 1.1 $
*
* Copyright Dec 15, 20... |
Ashwanigupta9125/code-DS-ALGO | HackerBlocks/More/SEGMENT TREE (MEDIUM) - CHEF AND SUBARRAY QUERIES.cpp | // https://www.codechef.com/problems/CSUBQ
#include<bits/stdc++.h>
#include<unordered_set>
using namespace std;
#define fio ios_base::sync_with_stdio(false)
#define ll long long int
#define s(x) scanf("%lld",&x)
#define s2(x,y) s(x)+s(y)
#define s3(x,y,z) s(x)+s(y)+s(z)
#define p(x) printf("%lld\n",x)
#define p2(x... |
ProgMiner/Lab_Programming | src/ru/byprogminer/Lab7_Programming/LivingObjectWriter.java | <filename>src/ru/byprogminer/Lab7_Programming/LivingObjectWriter.java
package ru.byprogminer.Lab7_Programming;
import ru.byprogminer.Lab3_Programming.LivingObject;
import java.io.Flushable;
public interface LivingObjectWriter<E extends Exception> extends Flushable {
void write(LivingObject livingObject) throws ... |
adrian-badulescu/BlocklyAutomation | src/apps/tests/vscodeExtension/src/compiled/test.js | <gh_stars>1-10
console.log('!!!!!!!!!!!!!!!!!!!!asdasdasd'); |
dwp/ms-ui-submission | app/lib/data-utils/conditionDataUtils.js | <gh_stars>0
const Logger = require('../Logger');
const appLogger = Logger();
const getConditionFromJourneyData = (journeyData) => {
appLogger.info('conditionDataUtils: getConditionFromJourneyData called');
const conditionData = {
conditionName: journeyData.conditions ? journeyData.conditions.conditionName : '... |
gaoxiaoyang/webrtc | pc/sctp_utils.cc | /*
* Copyright 2013 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing ... |
Flyves/Controller-Dev | src/main/java/util/rocket_league/game_situation/miscellaneous/UnhandledGameState.java | <filename>src/main/java/util/rocket_league/game_situation/miscellaneous/UnhandledGameState.java
package util.rocket_league.game_situation.miscellaneous;
import util.rocket_league.game_situation.GameSituation;
import util.timer.FrameTimer;
public class UnhandledGameState extends GameSituation {
public UnhandledGa... |
kant/tdar | core/src/main/java/org/tdar/core/event/AbstractTdarEvent.java | <reponame>kant/tdar
package org.tdar.core.event;
import java.io.Serializable;
public abstract class AbstractTdarEvent implements Serializable {
private static final long serialVersionUID = -7606016589495469926L;
protected EventType type;
protected Object indexable;
private Long extraId;
public A... |
linminglu/Fgame | game/marry/marry/marry_divorce_consent.go | <reponame>linminglu/Fgame
package marry
import (
"fgame/fgame/core/storage"
"fgame/fgame/game/global"
marryentity "fgame/fgame/game/marry/entity"
)
//协议离婚成功玩家下线数据
type MarryDivorceConsentObject struct {
Id int64
ServerId int32
PlayerId int64
UpdateTime int64
CreateTime int64
DeleteTime int64
}
f... |
uk-gov-mirror/ministryofjustice.Claim-for-Crown-Court-Defence | spec/presenters/interim_claim_presenter_spec.rb | require 'rails_helper'
RSpec.describe Claim::InterimClaimPresenter do
let(:claim) { create :interim_claim }
subject { described_class.new(claim, view) }
it { expect(subject).to be_kind_of(Claim::BaseClaimPresenter) }
it 'has disbursements' do
expect(subject.can_have_disbursements?).to eq(true)
end
end
|
rwl/pylon | pylon/io/__init__.py | #------------------------------------------------------------------------------
# Copyright (C) 2007-2010 <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/... |
espenfl/aiida-codtools | aiida_codtools/parsers/cif_base.py | # -*- coding: utf-8 -*-
from aiida_codtools.parsers import BaseCodtoolsParser
from aiida_codtools.calculations.cif_cell_contents import CifBaseCalculation
class CifBaseParser(BaseCodtoolsParser):
"""
Generic parser plugin that should work or can easily be extended
to work with any of the scripts of the co... |
N-V-R/tdlib-ruby | lib/tdlib/types/update/user_chat_action.rb | <gh_stars>1-10
module TD::Types
# User activity in the chat has changed.
#
# @attr chat_id [Integer] Chat identifier.
# @attr message_thread_id [Integer] If not 0, a message thread identifier in which the action was performed.
# @attr user_id [Integer] Identifier of a user performing an action.
# @attr acti... |
definitio/Valetudo | backend/lib/entities/core/updater/ValetudoUpdaterErrorState.js | const ValetudoUpdaterState = require("./ValetudoUpdaterState");
class ValetudoUpdaterErrorState extends ValetudoUpdaterState {
/**
* The update process aborted with type, message at timestamp
*
* @param {object} options
* @param {ValetudoUpdaterErrorType} options.type
* @param {string} o... |
ytyaru/Ruby.docs.ruby.lang.org.20211028091759 | src/2_startup_ruby/S.rb | #!/bin/sh
exec ruby -S -x $0 "$@"
#! ruby
p 'Hello Ruby !!'
|
Mystic421980/aim-web-app | client/src/components/YouTubePlayer.js | import React from 'react'
const PLAYER_OPTIONS =
'cc_load_policy=1&controls=0&disablekb=1&rel=0&modestbranding=1&fs=0&iv_load_policy=3' +
'&autoplay=0&loop=1' +
`&enablejsapi=1&domain=https://${document.domain}`
export class YouTubePlayer extends React.Component {
constructor(props) {
super(props)
thi... |
MarceloFossRJ/b109 | app/controllers/comments_controller.rb | class CommentsController < ApplicationController
before_filter :load_commentable
# GET /comments
# GET /comments.json
def index
@comments = @commentable.comments
respond_to do |format|
format.html # index.html.erb
format.json { render json: @comments }
end
end
# GET /comments/1
... |
protopopov1122/LuaCppB | headers/luacppb/Invoke/ArgRet.h | <reponame>protopopov1122/LuaCppB
/*
SPDX short identifier: MIT
Copyright 2018-2019 <NAME>
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... |
rLadia-demo/AttacknidPatch | decompiled_src/CFR/org/anddev/andengine/entity/particle/modifier/IParticleModifier.java | /*
* Decompiled with CFR 0_79.
*/
package org.anddev.andengine.entity.particle.modifier;
import org.anddev.andengine.entity.particle.Particle;
import org.anddev.andengine.entity.particle.modifier.IParticleInitializer;
public interface IParticleModifier
extends IParticleInitializer {
public void onUpdateParticle... |
Celebrate-future/openimaj | core/core-math/src/main/java/org/openimaj/math/util/MathUtils.java | <reponame>Celebrate-future/openimaj
/**
* Copyright (c) 2011, The University of Southampton and the individual contributors.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* * Redistr... |
npocmaka/Windows-Server-2003 | base/win32/fusion/tools/sxsexpress/core/msxml.h | /* this ALWAYS GENERATED file contains the definitions for the interfaces */
/* File created by MIDL compiler version 3.02.88 */
/* at Thu Sep 25 09:49:37 1997
*/
/* Compiler settings for msxml.idl:
Oicf (OptLev=i2), W1, Zp8, env=Win32, ms_ext, c_ext
error checks: none
*/
//@@MIDL_FILE_HEADING( )
... |
salomon42/openvswitch-ovs | vswitchd/ovs-brcompatd.c | /* Copyright (c) 2008, 2009, 2010, 2011 Nicira Networks
*
* 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 appl... |
lesserwhirls/scipy-cwt | scipy/weave/blitz/blitz/vecexpr.h | // -*- C++ -*-
/***************************************************************************
* blitz/vecexpr.h Vector<P_numtype> expression templates
*
* $Id: vecexpr.h 1414 2005-11-01 22:04:59Z cookedm $
*
* Copyright (C) 1997-2001 <NAME> <<EMAIL>>
*
* This code was relicensed under the modified BSD license... |
maroozm/AliPhysics | PWGGA/CaloTrackCorrelations/AliAnaParticlePartonCorrelation.cxx | /**************************************************************************
* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* *
* Author: The ALICE Off-line Project. *
* Contributors ... |
wix/openrest4j | openrest4j-api/src/main/java/com/openrest/olo/charges/operators/MultiplyOperator.java | package com.openrest.olo.charges.operators;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
impor... |
yoriyuki-aist/ccfinderx | GemX/gemx/ClonesetTable.java | package gemx;
import java.text.DecimalFormat;
import java.util.*;
import gnu.trove.*;
import model.*;
import org.eclipse.swt.SWT;
import org.eclipse.swt.dnd.Clipboard;
import org.eclipse.swt.dnd.TextTransfer;
import org.eclipse.swt.dnd.Transfer;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt... |
tolkonepiu/dsm-webapi-client | dsm-webapi-client-filestation/src/main/java/com/github/gauthierj/dsm/webapi/client/filestation/filelist/FilePermission.java | <reponame>tolkonepiu/dsm-webapi-client
package com.github.gauthierj.dsm.webapi.client.filestation.filelist;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.github.gauthierj.dsm.webapi.client.filestation.common.Acl;
public class FilePermission {
... |
qiunet/DuoDuo | QiunetUtils/src/test/java/org/qiunet/utils/test/scanner/TestClassScanner.java | package org.qiunet.utils.test.scanner;
import org.junit.Assert;
import org.junit.Test;
import org.qiunet.utils.scanner.ClassScanner;
import org.qiunet.utils.scanner.anno.AutoWired;
/**
* @author qiunet
* Created on 17/1/23 19:57.
*/
public class TestClassScanner {
public static String clazzName;
@AutoWi... |
VladimirLafazan/TradeItIosTicketSDK2 | TradeItIosEmsApi/TradeItPreviewTradeRequest.h | #import <Foundation/Foundation.h>
#import "TradeItAuthenticatedRequest.h"
@interface TradeItPreviewTradeRequest : TradeItAuthenticatedRequest
@property (nonatomic, copy) NSString *accountNumber;
@property (nonatomic, copy) NSString *orderSymbol;
@property (nonatomic, copy) NSString *orderPriceType;
@property (nonatom... |
DankersW/home-automation-framework | home_automation_framework.py | from home_automation_framework.framework.framework import IotSubject
class HomeServer:
def __init__(self):
# start listing for connected devices
iot_subject = IotSubject()
iot_subject.run()
if __name__ == '__main__':
home_server = HomeServer()
|
hefen1/chromium | chrome/browser/chromeos/ui_proxy_config_service.h | <reponame>hefen1/chromium<filename>chrome/browser/chromeos/ui_proxy_config_service.h
// 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.
#ifndef CHROME_BROWSER_CHROMEOS_UI_PROXY_CONFIG_SERVICE_H_
#define CH... |
wjiec/leetcode-solution | leetcode-java/src/lcci/s4/p4checkbalancelcci/Solution.java | package lcci.s4.p4checkbalancelcci;
import common.TreeNode;
/**
* 面试题 04.04. 检查平衡性
*
* https://leetcode-cn.com/problems/check-balance-lcci/
*
* 实现一个函数,检查二叉树是否平衡。在这个问题中,平衡树的定义如下:
*
* 任意一个节点,其两棵子树的高度差不超过 1。
*/
public class Solution {
public boolean isBalanced(TreeNode root) {
if (root == null) ret... |
teug91/amr | apps/isolate-rc/src/components/BatchTable/index.js | export { BatchTable } from './BatchTable'
|
13462652275/react-laboratory | src/utils/prototype.js | // 插值搜索( 该方法在已排序的数组性能好,非已排序的请用 findIndex )
Array.prototype.insertionSearch = function (item) {
let _this = this, low = 0, high = this.length - 1, mid, element, attribute;
const arrayItem = function (index) {
return attribute ? _this[index][attribute] : _this[index];
};
if (typeof item === 'object') {
f... |
Mattlk13/Minigames | Minigames/src/main/java/au/com/mineauz/minigames/sounds/PlayMGSound.java | <reponame>Mattlk13/Minigames
package au.com.mineauz.minigames.sounds;
import au.com.mineauz.minigames.objects.MinigamePlayer;
import au.com.mineauz.minigames.Minigames;
import au.com.mineauz.minigames.minigame.Minigame;
import au.com.mineauz.minigames.minigame.Team;
import org.bukkit.Bukkit;
public class PlayMGSound ... |
1804Apr23Java/TruongR | workspace-sts-3.9.4.RELEASE/JDBCBank/src/main/java/com/revature/domain/Admin.java | <filename>workspace-sts-3.9.4.RELEASE/JDBCBank/src/main/java/com/revature/domain/Admin.java
package com.revature.domain;
public class Admin {
}
|
Meanwhale/MeanscriptCLI | src/MeanscriptCpp/pub/MSWriter.h | <filename>src/MeanscriptCpp/pub/MSWriter.h
namespace meanscript {
class MSWriter
{
public:
MSBuilder* builder;
meanscriptcore::StructDef* sd;
int32_t baseAddress;
MSWriter(MSBuilder* _builder, meanscriptcore::StructDef* _sd, int32_t _address);
void setInt (std::string name, int32_t value);
void setInt64 (std::string na... |
tripsimian/react-kiwicom-margarita | packages/universal-components/src/FilterButton/__tests__/index.test.js | <reponame>tripsimian/react-kiwicom-margarita
// @flow
import * as React from 'react';
import { render, fireEvent } from 'react-native-testing-library';
import snapshotDiff from 'snapshot-diff';
import { FilterButton } from '..';
import { Icon } from '../../Icon';
describe('FilterButton', () => {
const onPress = j... |
josephhyatt/learn_co | activerecord-costume-store-todo-v-000/db/schema.rb | <filename>activerecord-costume-store-todo-v-000/db/schema.rb
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this sc... |
aiguoxin/axon-framework-study | axon-server-connector/target/generated-sources/protobuf/java/io/axoniq/axonserver/grpc/event/EventWithTokenOrBuilder.java | <reponame>aiguoxin/axon-framework-study<gh_stars>0
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: event.proto
package io.axoniq.axonserver.grpc.event;
public interface EventWithTokenOrBuilder extends
// @@protoc_insertion_point(interface_extends:io.axoniq.axonserver.grpc.event.EventWithTok... |
yuvallanger/glue | glue/core/session.py | <gh_stars>0
from __future__ import absolute_import, division, print_function
from . import DataCollection, CommandStack
class Session(object):
def __init__(self, application=None, data_collection=None,
command_stack=None, hub=None):
# applications can be added after instantiation
... |
hmcts/ia-case-notifications-api | src/main/java/uk/gov/hmcts/reform/iacasenotificationsapi/domain/personalisation/caseofficer/CaseOfficerAsyncStitchingHomeOfficeNotificationFailedPersonalisation.java | package uk.gov.hmcts.reform.iacasenotificationsapi.domain.personalisation.caseofficer;
import java.util.Collections;
import java.util.Map;
import java.util.Set;
import javax.validation.constraints.NotNull;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import ... |
qinjidong/EasyMPlayer | mplayer/libvo/aspect.h | <filename>mplayer/libvo/aspect.h<gh_stars>0
/*
* This file is part of MPlayer.
*
* MPlayer 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... |
Siebes/handlebars.java | handlebars/src/test/java/com/github/jknack/handlebars/io/ClassPathTemplateLoaderTest.java | /**
* Copyright (c) 2012 <NAME>
*
* This file is part of Handlebars.java.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unl... |
lifecontrol/cattle | code/framework/async/src/main/java/io/cattle/platform/async/retry/RetryTimeoutService.java | <reponame>lifecontrol/cattle<filename>code/framework/async/src/main/java/io/cattle/platform/async/retry/RetryTimeoutService.java
package io.cattle.platform.async.retry;
public interface RetryTimeoutService {
Object submit(Retry retry);
void completed(Object obj);
}
|
urbanairship/android-library | urbanairship-core/src/main/java/com/urbanairship/remoteconfig/ModuleAdapter.java | /* Copyright Airship and Contributors */
package com.urbanairship.remoteconfig;
import android.util.SparseArray;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.urbanairship.AirshipComponent;
import com.urbanairship.AirshipComponentGroups;
import com.urbanairship.Logger;
import c... |
madisoncarr/grace-shopper-project | client/store/singleOrderMgmt.js | <reponame>madisoncarr/grace-shopper-project
import axios from 'axios'
const GET_SINGLE_ORDER = 'GET_SINGLE_ORDER'
const getSingleOrder = singleOrder => {
return {
type: GET_SINGLE_ORDER,
singleOrder
}
}
export default function singleOrderManagementReducer(state = {}, action) {
switch (action.type) {
... |
tristantarrant/cpp-client | src/hotrod/impl/configuration/ConfigurationChildBuilder.cpp | #include "infinispan/hotrod/ConfigurationChildBuilder.h"
#include "infinispan/hotrod/ConfigurationBuilder.h"
namespace infinispan {
namespace hotrod {
ConfigurationChildBuilder::ConfigurationChildBuilder(ConfigurationBuilder& builder_) :
m_builder(builder_) {
}
ServerConfigurationBuilder& ConfigurationChildB... |
mats9693/leetcode | solutions/1-1000/1-100/81-90/86/main.go | package mario
type ListNode struct {
Val int
Next *ListNode
}
func partition(head *ListNode, x int) *ListNode {
if head == nil || head.Next == nil {
return head
}
smallPre := &ListNode{}
s := smallPre
bigPre := &ListNode{}
st := smallPre
bt := bigPre
for head != nil {
node := &ListNode{Val: head.Val}... |
bydan/pre | erp_ejb/src_inventario/com/bydan/erp/inventario/business/logic/MarcaProductoLogic.java | <filename>erp_ejb/src_inventario/com/bydan/erp/inventario/business/logic/MarcaProductoLogic.java
/*
*AVISO LEGAL
© Copyright
*Este programa esta protegido por la ley de derechos de autor.
*La reproduccion o distribucion ilicita de este programa o de cualquiera de
*sus partes esta penado por la ley con severas sanc... |
meesokim/z88dk | examples/console/sorter.c | <reponame>meesokim/z88dk<filename>examples/console/sorter.c<gh_stars>1-10
/* Small C+ Insertion sort!
*
* <NAME> 3/2/1999
*/
#include <stdio.h>
#define SIZE 100
main()
{
int A[SIZE], i, j, tmp;
/* Fill array with descending numbers (worst case) */
i=0;
while (i<SIZE)
... |
tannerwelsh/code-training | go/gotraining/05-packaging/example6/example6.go | // All material is licensed under the GNU Free Documentation License
// https://github.com/ArdanStudios/gotraining/blob/master/LICENSE
// Sample program to show how to create values from exported types with
// embedded unexported types.
package main
import (
"fmt"
"github.com/ArdanStudios/gotraining/05-packaging/e... |
theredpea/Arelle | arelle/Version.py | '''
This module represents the time stamp when Arelle was last built
@author: Mark V Systems Limited
(c) Copyright 2015 Mark V Systems Limited, All rights reserved.
'''
version = '2015-03-23 18:13 UTC'
|
Damillora/Altessimo | artists/urls.py | <filename>artists/urls.py<gh_stars>0
from django.urls import path
from . import views
urlpatterns = [
path('',views.artist_index),
path('<slug:slug>',views.artist_show)
]
|
Eternal-Rise/inkline | src/components/INav/manifest.js | <gh_stars>0
export const manifest = {
name: 'nav',
slots: [
{
description: 'Slot for default nav content',
name: 'default'
}
],
props: [
{
name: 'color',
type: [
'light',
'dark'
],
... |
tdc22/JAwesomeEngine | JAwesomeEngine/src/display/GLDisplay.java | <gh_stars>10-100
package display;
import static org.lwjgl.glfw.GLFW.GLFW_ACCUM_ALPHA_BITS;
import static org.lwjgl.glfw.GLFW.GLFW_ACCUM_BLUE_BITS;
import static org.lwjgl.glfw.GLFW.GLFW_ACCUM_GREEN_BITS;
import static org.lwjgl.glfw.GLFW.GLFW_ACCUM_RED_BITS;
import static org.lwjgl.glfw.GLFW.GLFW_ALPHA_BITS;
import st... |
dmascenik/cloudlbs | device/android/sls-app/src/main/java/com/cloudlbs/sls/LocationDataBuffer.java | package com.cloudlbs.sls;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import com.cloudlbs.sls.core.ISecureLocationService;
import com.cloudlbs.sls.core.LocationData;
import com.cloudlbs.sls.protocol.AppDeta... |
e-ntro-py/GoogleCodeJam-2021 | Qualification Round/reversort.py | # Copyright (c) 2021 kamyu. All rights reserved.
#
# Google Code Jam 2021 Qualification Round - Problem A. Reversort
# https://codingcompetitions.withgoogle.com/codejam/round/000000000043580a/00000000006d0a5c
#
# Time: O(N^2)
# Space: O(1)
#
def min_idx(L, i):
m = i
for j in xrange(i, len(L)):
if L[j]... |
foxsugar/summer | db/src/main/java/com/code/server/db/model/ClubCharge.java | <filename>db/src/main/java/com/code/server/db/model/ClubCharge.java<gh_stars>10-100
package com.code.server.db.model;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.*;
/**
* Created by sunxianping on 2018/2/27.
*/
@DynamicUpdate
@Entity
@Table(indexes = {@Index(name = "clubId", columnLis... |
YingVickyCao/DesignPatternSample | src/main/java/com/hades/example/designpatterns/factory/_2_simple_factory/GreekPizza.java | <filename>src/main/java/com/hades/example/designpatterns/factory/_2_simple_factory/GreekPizza.java<gh_stars>0
package com.hades.example.designpatterns.factory._2_simple_factory;
public class GreekPizza extends Pizza {
}
|
atwollam/pVACtools | tests/test_input_file_converter.py | import unittest
import os
import sys
import tempfile
from filecmp import cmp
import py_compile
import logging
from testfixtures import LogCapture, StringComparison as S
from .test_utils import *
from lib.input_file_converter import *
class InputFileConverterTests(unittest.TestCase):
@classmethod
def setUpClass... |
KamesCG/3id | src/containers/Box/BoxProfile/index.js | <gh_stars>0
/* --- Global Dependencies --- */
import idx from 'idx'
import React from 'react'
/* --- Local Dependencies --- */
import { BoxConsumer } from 'context/Providers/BoxProvider'
import { boxLogo } from 'assets/images'
import { Avatar, Box, Image, Flex, Loading, Heading, Span } from 'atoms'
import { BoxCard }... |
AgostonSzepessy/oxshans-battle | Game.cpp | <gh_stars>0
#include "Game.hpp"
Game::Game()
{
window.create(sf::VideoMode(WIDTH, HEIGHT), "Game", sf::Style::Close);
window.setVerticalSyncEnabled(false);
accumulator = 0;
}
void Game::run()
{
init();
int prevTime = c.getElapsedTime().asMilliseconds();
int currentTime = 0;
while (window.isOpen())
{
curre... |
08pixels/juizes-online | go/uri-online-judge/1180.go | package main
import "fmt"
var cases, number int
var lowest, position int
func main() {
fmt.Scan(&cases)
for i := 0; i < cases; i++ {
fmt.Scan(&number)
if lowest > number || i == 0 {
lowest = number
position = i
}
}
fmt.Printf("Menor valor: %d\n", lowest)
fmt.Printf("Posicao: %d\n", position)
}
|
athenagroup/brxm | cms/editor/frontend/src/main/java/org/hippoecm/frontend/editor/impl/EditableTypes.java | <reponame>athenagroup/brxm<filename>cms/editor/frontend/src/main/java/org/hippoecm/frontend/editor/impl/EditableTypes.java
/*
* Copyright 2008-2013 <NAME>.V. (http://www.onehippo.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the Li... |
nocarryr/Control | BlackBerry/Widget/framework/ext/src/com/phonegap/api/PluginManager.java | <reponame>nocarryr/Control
/*
* PhoneGap is available under *either* the terms of the modified BSD license *or* the
* MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
*
* Copyright (c) 2005-2010, Nitobi Software Inc.
* Copyright (c) 2010, IBM Corporation
*/
package com.phonegap.... |
aravindakr95/todo-app-backend | src/routes/auth.spec.js | <filename>src/routes/auth.spec.js
describe('Auth Router tests', () => {
const postSpy = jest.fn();
jest.doMock('express', () => ({
Router() {
return {
post: postSpy,
};
},
}));
afterAll(() => {
jest.resetAllMocks();
});
test('should invoke register route', () => {
expe... |
dsanmartins/PhdProject | br.ufscar.sas.xtext.sasdsl.ide/src-gen/br/ufscar/sas/xtext/sasdsl/ide/AbstractSasDslIdeModule.java | /*
* generated by Xtext 2.21.0
*/
package br.ufscar.sas.xtext.sasdsl.ide;
import br.ufscar.sas.xtext.sasdsl.ide.contentassist.antlr.SasDslParser;
import br.ufscar.sas.xtext.sasdsl.ide.contentassist.antlr.internal.InternalSasDslLexer;
import com.google.inject.Binder;
import com.google.inject.name.Names;
import org.ec... |
juansanchez49/framework-test | wishlist/app/com/commercetools/sunrise/wishlist/AbstractShoppingListCreateExecutor.java | <filename>wishlist/app/com/commercetools/sunrise/wishlist/AbstractShoppingListCreateExecutor.java
package com.commercetools.sunrise.wishlist;
import com.commercetools.sunrise.framework.controllers.AbstractSphereRequestExecutor;
import com.commercetools.sunrise.framework.hooks.HookRunner;
import com.commercetools.sunri... |
shengqianlong/we-cloud-java-sdk | we-cloud-sdk-storage/src/main/java/cn/wecloud/sdk/storage/model/WeCloudStorageUploadImageModel.java | package cn.wecloud.sdk.storage.model;
import cn.wecloud.sdk.storage.data.WeCloudStorageCustomImageInfo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @author 陈俊雄
* @since 2020/10/22
**/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
public cla... |
ashley/codemining-treelm | src/main/java/codemining/lm/tsg/idioms/PatternCorpus.java | /**
*
*/
package codemining.lm.tsg.idioms;
import java.io.File;
import java.io.IOException;
import java.io.Serializable;
import java.util.ArrayDeque;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.logging.Logger;
import org.apache.commons.io.FileUtil... |
joey3060/deeperience_web | src/server/utils/filterAttribute.js | <filename>src/server/utils/filterAttribute.js
// prevent SQL injection that inject different attribute
export default (obj, allowedAttributes, disAllow = false) => {
const resultObj = {}
Object
.keys(obj)
.filter(attribute =>
disAllow ?
allowedAttributes.indexOf(attribute) < 0 :
allowedAt... |
abramovdmitrii/jest | packages/jest-cli/src/pluralize.js | <reponame>abramovdmitrii/jest<gh_stars>1-10
export default function pluralize(word: string, count: number, ending: string) {
return `${count} ${word}${count === 1 ? '' : ending}`;
}
|
DJilanov/react-node-docker-sample | backend/data/db/db-context.js | <reponame>DJilanov/react-node-docker-sample
const mongoose = require('mongoose');
// Initialize the database connector
const init = databaseConfig => new Promise((resolve) => {
connectDb(databaseConfig, resolve);
});
const connectDb = (databaseConfig, resolve) => {
// If the connection throws an error
mongoose.c... |
gino0631/santuario-java | src/main/java/org/apache/xml/security/stax/impl/securityToken/DsaKeyValueSecurityToken.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 m... |
kazunetakahashi/atcoder | 201510_201609/0224/tdpc_E.cpp | #include <iostream>
#include <string>
using namespace std;
typedef long long ll;
ll dp[10][10010][100];
ll M = 1000000007;
int main() {
int D;
string N;
cin >> D >> N;
dp[1][0][0] = 1;
for (auto k = 1; k < D; k++) {
dp[1][0][k] = 0;
}
for (auto j = 1; j < 10010; j++) {
for (auto k = 0; k < D; ... |
boxheed/nitrite-java | nitrite-replication/src/test/java/org/dizitart/no2/integration/ReplicaTest.java | /*
* Copyright (c) 2017-2020. Nitrite 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... |
ArenaNetworks/dto-digitalmarketplace-frontend | apps/marketplace/pages/WithdrawOpportunitySuccessPage.js | <reponame>ArenaNetworks/dto-digitalmarketplace-frontend<gh_stars>10-100
import React, { Component } from 'react'
import { connect } from 'react-redux'
import { withRouter } from 'react-router-dom'
import { handleFeedbackSubmit } from 'marketplace/actions/appActions'
import { loadBrief } from 'marketplace/actions/brief... |
TheCool1Kevin/LiquiDOS | lib/libc/ctype.c | <filename>lib/libc/ctype.c
/**
* Copyright (c) 2019 The cxkernel Authors. All rights reserved.
* Use of this source code is governed by a MIT-style
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT
*
* @file ctype.c
* @author <NAME> \<<EMAIL>\>
* @date Created o... |
guai/olingo-jpa-processor-v4 | jpa/odata-jpa-test/src/main/java/org/apache/olingo/jpa/processor/core/testmodel/converter/jpa/JPAUuidFragmentsListConverter.java | <reponame>guai/olingo-jpa-processor-v4
package org.apache.olingo.jpa.processor.core.testmodel.converter.jpa;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import javax.persistence.AttributeConverter;
import javax.persistence.Converter;
@Converter(autoApply = false)
public cl... |
chipta/react-hotkeys | test/lib/GlobalKeyEventStrategy/CorrectlyCreatingKeyHistory.js | import {expect} from 'chai';
import simulant from 'simulant';
import KeyEventManager from '../../../src/lib/KeyEventManager';
import KeyEventRecordState from '../../../src/const/KeyEventRecordState';
describe('Correctly creating key history for GlobalKeyEventStrategy:', function () {
beforeEach(function () {
thi... |
mutant-industries/PrimerOS-test-project | include/test/driver/timer/dispose.h | <gh_stars>0
/* SPDX-License-Identifier: BSD-3-Clause */
/* Copyright (c) 2018-2019 Mutant Industries ltd. */
#ifndef _TEST_DRIVER_TIMER_DISPOSE_H_
#define _TEST_DRIVER_TIMER_DISPOSE_H_
#include <test/common.h>
#include <test/driver/common.h>
void test_driver_timer_dispose(void);
#endif /* _TEST_DRIVER_TIMER_DISPOS... |
binjr/binjr | binjr-adapter-logs/src/main/java/eu/binjr/sources/logs/adapters/LogsDataAdapter.java | <gh_stars>100-1000
/*
* Copyright 2020-2021 <NAME>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless re... |
thirtyfiveparts/live | repos/live/packages/apps/docs/config/docusaurus.theme.config.js | module.exports = ({getRepoRootDocsNavBarItem, packagesDropDownItems}) => {
return {
navbar: {
title: 'ThirtyFive Monorepo Docs',
logo: {
alt: 'My Site Logo',
src: 'img/logo.png',
},
items: [
getRepoRootDocsNavBarItem(),
//{
// to: 'docs/',
/... |
Kaleb-Bickmore/chrismas-light-display | Modes/LightModeStrategy.py | from LightModes.CandyCaneStrategy import CandyCaneStrategy
from LightModes.LightShowStrategy import LightShowStrategy
from LightModes.ReactiveGroupStrategy import ReactiveGroupStrategy
from LightModes.SolidGroupStrategy import SolidGroupStrategy
from LightModes.SplitWaveStrategy import SplitWaveStrategy
from LightModes... |
rzayevsahil/JavaCamp | homeworks/ECommerce/src/ECommerce/business/abstracts/EmailService.java | package ECommerce.business.abstracts;
public interface EmailService {
int emailSend();
}
|
larsk21/lean4 | stage0/stdlib/Lean/Meta/Tactic/AC/Main.c | // Lean compiler output
// Module: Lean.Meta.Tactic.AC.Main
// Imports: Init Init.Data.AC Lean.Meta.AppBuilder Lean.Elab.Tactic.Basic Lean.Elab.Tactic.Rewrite
#include <lean/lean.h>
#if defined(__clang__)
#pragma clang diagnostic ignored "-Wunused-parameter"
#pragma clang diagnostic ignored "-Wunused-label"
#elif defin... |
pi-plan/pidal | main.py | <gh_stars>1-10
from pidal.main import main
main()
|
Botanicbot/Controlador | lib/util/Arduino.js | <gh_stars>1-10
var method = Arduino.prototype;
var cmd_restart = "QRPX";
var cmd_network_reset = "QNRX";
var cmd_status = "QSTX";
var Dispositivos = {
Sensor : "S",
Relay : "R",
Motor : "M",
Board : "B"
};
var Operaciones = {
Sensor : {
Temperatura : "T",
Humedad : "H",
PH : "P",
EC : "E",
Lluvia : "... |
enfoTek/tomato.linksys.e2000.nvram-mod | tools-src/gnu/gcc/libjava/java/awt/geom/RectangularShape.java | /* Copyright (C) 2000, 2002 Free Software Foundation
This file is part of GNU Classpath.
GNU Classpath 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, or (at your option)
any later version.
G... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.