repo_name
stringlengths
6
101
path
stringlengths
4
300
text
stringlengths
7
1.31M
crazywolf132/SpaceGame
main/src/com/spacegame/game/projectile/ProjectileBody.java
package com.spacegame.game.projectile; import com.badlogic.gdx.math.Vector2; import com.spacegame.game.SolGame; import com.spacegame.game.ship.SolShip; public interface ProjectileBody { void update(SolGame game); Vector2 getPos(); Vector2 getSpd(); void receiveForce(Vector2 force, SolGame game, boolean acc); ...
navikt/sendsoknad
web/src/test/java/no/nav/sbl/dialogarena/config/ApplicationContextTest.java
package no.nav.sbl.dialogarena.config; import com.github.tomakehurst.wiremock.WireMockServer; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.mock.jndi.SimpleNamingContextBuilder; import org.springframework.test.context.Conte...
HuttonICS/germinate-scan
app/src/main/java/uk/ac/hutton/android/germinatescan/database/DatabaseObject.java
<filename>app/src/main/java/uk/ac/hutton/android/germinatescan/database/DatabaseObject.java /* * Copyright 2018 Information and Computational Sciences, * The James Hutton Institute. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the Lic...
BrandnerKasper/Eternal
Eternal/src/Eternal/NativeScripts/ScriptHandler.h
#pragma once #include "Eternal/Scene/ScriptableEntity.h" #include "Player.h" #include "Rotater.h" #include "Deathbox.h" #include "MoveableXPlatform.h" #include "SceneCameraController.h" #include "MoveableDeathbox.h" #include "MoveableYPlatform.h" #include "JumpWallR.h" #include "JumpWallL.h" #include "BackgroundMusic....
josephcsible/CyclopsCore
src/main/java/org/cyclops/cyclopscore/recipe/custom/api/IRecipe.java
package org.cyclops.cyclopscore.recipe.custom.api; /** * Interface for recipes that can be registered with {@link ISuperRecipeRegistry}. * * @author immortaleeb * @param <I> The type of the recipe input of all recipes associated with the machine. * @param <O> The type of the recipe output of all recipes associat...
cliff363825/TwentyFour
01_Language/01_Functions/python/array_reduce.py
<reponame>cliff363825/TwentyFour<filename>01_Language/01_Functions/python/array_reduce.py # coding: utf-8 import functools def array_reduce(arr, cb, *args): if len(args) > 0: return functools.reduce(cb, arr, args[0]) else: return functools.reduce(cb, arr) if __name__ == '__main__': l = ...
ucd-library/rp-ucd-client
client/public/src/stores/SocketStore.js
<reponame>ucd-library/rp-ucd-client import {BaseStore} from '@ucd-lib/cork-app-utils'; class SocketStore extends BaseStore { constructor() { super(); this.data = { socketLastMessage: null, }; this.events = { SOCKET_MESSAGE: 'socket-message' }; } /** * @method setSocketMessa...
sirmarcel/cmlk
cmlkit/regression/qmml/kernel_functions.py
"""Kernel functions as implemented by qmmlpack. A kernelf function, or kernelf for short is *not* the same as a kernel in all cases. In `cmlkit` terminology, the kernel is the whole procedure of computing distances between two systems. So for global representations, the kernelf is often the kernel, but when atomic rep...
tumbleDryCode/evenflow
browser/njfbrowser/spreadsheet/SmartAddRows.java
<gh_stars>0 package njfbrowser.spreadsheet; import njfbrowser.main.adminApp; import javax.swing.*; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; public class SmartAddRows extends JDialog impl...
TheDude86/NovaCraft
novacraft-plugin-suite/src/main/java/io/novacraft/randomtp/command/RandomTPCommandManager.java
package io.novacraft.randomtp.command; import io.novacraft.core.CommandManager; import io.novacraft.randomtp.RandomTPModel; import org.bukkit.plugin.java.JavaPlugin; public class RandomTPCommandManager extends CommandManager<RandomTPModel> { public RandomTPCommandManager(RandomTPModel randomTPModel) { su...
skyer83/laud
src/main/java/com/jfinal/club/my/like/LikeMessageLogService.java
<gh_stars>0 /** * 请勿将俱乐部专享资源复制给其他人,保护知识产权即是保护我们所在的行业,进而保护我们自己的利益 * 即便是公司的同事,也请尊重 JFinal 作者的努力与付出,不要复制给同事 * * 如果你尚未加入俱乐部,请立即删除该项目,或者现在加入俱乐部:http://jfinal.com/club * * 俱乐部将提供 jfinal-club 项目文档与设计资源、专用 QQ 群,以及作者在俱乐部定期的分享与答疑, * 价值远比仅仅拥有 jfinal club 项目源代码要大得多 * * JFinal 俱乐部是五年以来首次寻求外部资源的尝试,以便于有资源创建更加 *...
ScriptBox99/microsoft-hermes-windows
test/node-hermes/console-assert.js
<reponame>ScriptBox99/microsoft-hermes-windows<gh_stars>1-10 /** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @format */ // RUN: %node-hermes %s 2>&1 | %FileCheck --match-ful...
CarlosManias/SocialSDK
osgi/com.ibm.sbt.web.resources/resources/js/sdk/sbt/connections/controls/forums/nls/ForumGridRenderer.js
<gh_stars>0 /* * � Copyright IBM Corp. 2013 * * 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...
pixelass/styled-suitcss
.prettierrc.js
module.exports = { arrowParens: "avoid", bracketSpacing: false, jsxBracketSameLine: true, parser: "typescript", printWidth: 80, requirePragma: false, semi: true, singleQuote: false, tabWidth: 4, trailingComma: "none", useTabs: true };
crackersamdjam/DMOJ-Solutions
COCI/coci09c1p1.cpp
<gh_stars>0 #include <bits/stdc++.h> #define sc(x) do{while((x=getchar())<'0'); for(x-='0'; '0'<=(_=getchar()); x=(x<<3)+(x<<1)+_-'0');}while(0) char _; using namespace std; int arr[8],pre,cur; int main(){ sc(pre); sc(cur); arr[1] = cur; if(cur > pre){ for(int i = 2; i < 8; i++){ ...
azchatlanin/FTXUI
src/ftxui/dom/flexbox.cpp
#include <stddef.h> // for size_t #include <algorithm> // for min, max #include <memory> // for __shared_ptr_access, shared_ptr, allocator_traits<>::value_type, make_shared #include <utility> // for move, swap #include <vector> // for vector #include "ftxui/dom/elements.hpp" // for Element, Elements, flexbox, ...
AnthonyM/service-fabric
src/prod/src/Reliability/Failover/ra/Test.Utility.cpp
<filename>src/prod/src/Reliability/Failover/ra/Test.Utility.cpp // ------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License (MIT). See License.txt in the repo root for license information. // ----------------------------...
fforw/pixgame
src/util/intersection.js
<filename>src/util/intersection.js // Given three colinear points p, q, r, the function checks if // point q lies on line segment 'pr' function onSegment(px, py, qx, qy, rx, ry) { return qx < Math.max(px, rx) && qx > Math.min(px, rx) && qy < Math.max(py, ry) && qy > Math.min(py, ry); } // To find or...
yunionio/mcclient_nodejs
mcclient/subcmds/shells.js
const misc = require("../misc"); module.exports = [ { cmd: 'region-list', args: [ ], help: 'List regions', func: function(cli, args) { let regions = cli.token.getRegions(); let data = []; for(let i = 0; i < regions.length; i ++) { data.push({name: regions[i]}) } misc.printList(data)...
Havoc-OS/androidprebuilts_go_linux-x86
src/net/interface_bsd_test.go
<reponame>Havoc-OS/androidprebuilts_go_linux-x86<filename>src/net/interface_bsd_test.go<gh_stars>100-1000 // Copyright 2013 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build darwin dragonfly freebsd netbsd openbsd pac...
RanerL/analyzer
tests/juliet/testcases/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_73b.cpp
<filename>tests/juliet/testcases/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle/CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_73b.cpp /* TEMPLATE GENERATED TESTCASE FILE Filename: CWE773_Missing_Reference_to_Active_File_Descriptor_or_Handle__fopen_73b.cpp Label Definition File: CWE...
awslabs/smithy-ruby
hearth/lib/hearth/query/param_matcher.rb
# frozen_string_literal: true require 'rspec/expectations' # Provides an rspec matcher for CGI.parse to check Float precision. # @api private RSpec::Matchers.define :match_query_params do |expected| match do |actual| return true if actual == expected return false unless actual.instance_of?(expected.class) ...
nabemon/dreamkast
app/models/sponsor_attachment_miro.rb
<gh_stars>0 class SponsorAttachmentMiro < SponsorAttachment end
sthundat/kie-wb-common
kie-wb-common-cli/kie-wb-common-cli-tools/kie-wb-common-cli-forms-migration/src/test/java/org/kie/workbench/common/forms/migration/tool/pipelines/basic/FormDefinitionGeneratorForDataObjectsWithErrorsTest.java
/* * Copyright 2018 Red Hat, Inc. and/or its affiliates. * * 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...
getdunne/Voxvu
VolParamsDlg.h
#pragma once class VolParamsDlg : public CDialog { // Construction public: VolParamsDlg(CWnd* pParent = NULL); // standard constructor // Dialog Data enum { IDD = IDD_VOLDLG }; UINT m_width; UINT m_height; UINT m_depth; double m_voxWidth; double m_voxHeight; double m_voxDepth; // Overrides protected: virt...
jsun999/ml-blog
src/main/java/site/jsun999/common/utils/ParamUtil.java
<reponame>jsun999/ml-blog<gh_stars>0 package site.jsun999.common.utils; import site.jsun999.common.constant.ParamConstant; import site.jsun999.component.CommonMap; import site.jsun999.web.context.SpringContext; import org.springframework.util.StringUtils; public class ParamUtil { public static boolean checkParam...
mjirik/lisa
lisa/pklz_info.py
#! /usr/bin/python # -*- coding: utf-8 -*- import sys import os.path path_to_script = os.path.dirname(os.path.abspath(__file__)) sys.path.append(os.path.join(path_to_script, "../src/")) sys.path.append(os.path.join(path_to_script, "../extern/pyseg_base/src")) sys.path.append(os.path.join(path_to_script, ...
blogmitnik/rails2_code
vendor/plugins/localization/lib/localization.rb
module Localization mattr_accessor :lang @@l10s = { :default => {} } @@lang = :default def self._(string_to_localize, *args) translated = @@l10s[@@lang][string_to_localize] || string_to_localize return translated.call(*args).to_s if translated.is_a? Proc if translated.is_a? Array transl...
ham0215/rails_api_base
app/models/skill.rb
<gh_stars>0 # frozen_string_literal: true class Skill < ApplicationRecord belongs_to :profile end
tsani/goto
programs/valid/switch (3).go
package main; func main(){ switch x := 1; x{ case 1: case 2: x++; case 3,4: default: } switch { case true: case false: default: println("Hello World!"); } }
Llamadmiral/Advent_Of_Code_2017
Year2016/src/com/aoc/days2016/day10/Operation.java
package com.aoc.days2016.day10; /** * @author maczaka. */ public class Operation { private int lowTo; private int highTo; private int giver; private boolean lowToOutput = false; private boolean highToOutput = false; Operation(final String[] input) { giver = Integer.parseInt(input[1])...
rd2281136306/pinpoint
web/src/test/java/com/navercorp/pinpoint/web/service/map/processor/RpcCallProcessorTest.java
/* * Copyright 2017 NAVER Corp. * * 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 ...
YaoApp/gou
dsl/workshop/config.go
<reponame>YaoApp/gou<filename>dsl/workshop/config.go<gh_stars>10-100 package workshop import ( "errors" "fmt" "os" "path/filepath" "strings" jsoniter "github.com/json-iterator/go" "github.com/yaoapp/gou/dsl/u" ) // GetConfig get the workshop config func GetConfig() (Config, error) { root, err := ConfigRoot()...
cy15196/xxxxRsmTest
TopTestWidgets/privateSource/qbarlegendmarker.cpp
/**************************************************************************** ** ** Copyright (C) 2016 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Charts module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:GPL$ ** Commercial License Usage ** Licensees holding valid comme...
tinyzimmer/android-farm-operator
pkg/resources/stf/traefik.go
package stf import ( "bytes" "fmt" "strconv" androidv1alpha1 "github.com/tinyzimmer/android-farm-operator/pkg/apis/android/v1alpha1" "github.com/tinyzimmer/android-farm-operator/pkg/util" "github.com/tinyzimmer/android-farm-operator/pkg/util/builders" // traefikv1 "github.com/containous/traefik/v2/pkg/provide...
thavlik/iridium
Source/Common/WindowHelper.h
<gh_stars>1-10 #pragma once #include <windows.h> class WindowHelper { public: WindowHelper(const char* title, int w, int h, int x, int y); ~WindowHelper(); void ProcessMessages(); bool Escape() const { return _escape; } HWND Handle() const { return _hwnd; } unsigned Width() const { return _width; } unsigne...
abrams27/mimuw
sem4/so/zadania/zad5/minix_source/usr/src/minix/fs/iso9660fs/utility.c
<filename>sem4/so/zadania/zad5/minix_source/usr/src/minix/fs/iso9660fs/utility.c #include "inc.h" #include <sys/stat.h> #include <string.h> #include <minix/com.h> #include <minix/callnr.h> #include <minix/vfsif.h> /*===========================================================================* * do_noop * ...
gottaegbert/penter
library/lib_study/36_filesys_fileinput.py
<filename>library/lib_study/36_filesys_fileinput.py # _*_ coding:utf-8 _*_ import fileinput # 默认控制台输入 # for line in fileinput.input(): # print(line) # UnicodeDecodeError: 'gbk' codec can't decode byte 0xae in position 50: illegal multibyte sequence # openhook=fileinput.hook_encoded('utf-8') with fileinput.input(fi...
SierraSoftworks/heimdall
internal/pkg/sequence_set/memory_test.go
<reponame>SierraSoftworks/heimdall package set import ( "testing" . "github.com/smartystreets/goconvey/convey" ) func TestSequenceSet(t *testing.T) { Convey("SequenceSet", t, func() { s := NewMemorySet() So(s, ShouldNotBeNil) has, err := s.Has("test") So(has, ShouldBeFalse) So(err, ShouldBeNil) So(s...
LaudateCorpus1/oci-go-sdk
mysql/channel_source_mysql.go
// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. // This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose ei...
code-dot-org/code-dot-org
dashboard/lib/services/i18n/curriculum_sync_utils/render_translations.rb
<filename>dashboard/lib/services/i18n/curriculum_sync_utils/render_translations.rb require 'active_support/concern' module Services module I18n module CurriculumSyncUtils module RenderTranslations extend ActiveSupport::Concern class_methods do # Helper method for retrieving I18N s...
tiefenauer/ip7-python
src/classifier/jobtitle/jobtitle_classifier_fts.py
import math from src.classifier.jobtitle.jobtitle_classifier import JobtitleClassifier from src.classifier.jobtitle.jobtitle_features_fts import JobtitleFtsFeatures from src.util.html_util import calculate_tag_weight from src.classifier.rule_based_classifier import RuleBasedClassifier from src.importer.known_job_varia...
heeroluo/just4
packages/dom/dist/internal/dom-traversal.js
import { mergeArray } from "@just4/util/array"; import { isNode, ifIsHTMLElement, uniqueSort } from "./dom-base"; import { matchesSelector } from "../selector"; export function selfAndDescendants(ctx) { if (!ctx) { return []; } const node = ctx; if (node.nodeType !== 1 && node.nodeType !== 9 ...
fossabot/me-1
packages/printables/src/lib/assemblePrintable.js
<gh_stars>1-10 import path from "path"; export const assemblePrintable = printableBuilder => filePath => { const requiredFile = require(filePath); const printableJson = requiredFile.default || requiredFile; return printableBuilder(printableJson, path.basename(filePath, path.extname(filePath))); }; export...
Neyzoter/aiot
iov/src/main/java/cn/neyzoter/aiot/iov/biz/service/kafka/constant/KafkaTopic.java
package cn.neyzoter.aiot.iov.biz.service.kafka.constant; import org.apache.kafka.clients.admin.NewTopic; import org.springframework.context.annotation.Bean; import org.springframework.stereotype.Component; /** * kafka topic * @author <NAME> * @date 2020-2-8 */ @Component public class KafkaTopic { public final...
ScalablyTyped/SlinkyTyped
m/microsoft-graph/src/main/scala/typingsSlinky/microsoftGraph/mod/Planner.scala
<gh_stars>10-100 package typingsSlinky.microsoftGraph.mod import org.scalablytyped.runtime.StObject import scala.scalajs.js import scala.scalajs.js.`|` import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, JSBracketAccess} @js.native trait Planner extends Entity { // Read-only. Nullable....
MatsuiLin101/aprp
src/apps/comments/utils.py
<filename>src/apps/comments/utils.py def upload_location(instance, filename): model = instance.__class__ last_obj = model.objects.order_by("id").last() if last_obj: new_id = last_obj.id + 1 else: new_id = 1 return "comment/%s/%s" % (new_id, filename)
SergeyKashulin/nicescript
test/box.spec.js
<reponame>SergeyKashulin/nicescript let nice = require('../index.js')(); let chai = require('chai'); chai.use(require('chai-spies')); let expect = chai.expect; const { Box, is } = nice; describe("Box", function() { it("simple", function(){ let s = Box(); expect(is.Box(s)).to.equal(true); expect(s()).to...
kabellrics/tp-noderest
app/swagger/schemas/users.schemas.js
export const Token = { type: 'object', properties: { token: { type: 'string' } } }; export const User = { type: 'object', properties: { id: { type: 'integer', format: 'int64' }, firstname: { type: 'string' }, lastname: { type: 'str...
fedlearn-jdt/fedlearn-core
core/src/main/java/com/jdt/fedlearn/core/App.java
<gh_stars>10-100 /* Copyright 2020 The FedLearn Authors. 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 Unless required by applicable...
hamzaPixl/intnewscr
server/domain/models/errors/ApiError.js
class ApiError extends Error { constructor(message, error) { super(message || 'API error', error); this.name = 'ApiError'; return this; } } module.exports = ApiError;
palak-egov/DIGIT-UKD
municipal-services/noc-services/src/main/java/org/egov/noc/util/NOCConstants.java
<reponame>palak-egov/DIGIT-UKD package org.egov.noc.util; import org.springframework.stereotype.Component; @Component public class NOCConstants { public static final String SEARCH_MODULE = "rainmaker-nocsrv"; public static final String NOC_MODULE = "NOC"; public static final String NOC_TYPE = "NocType"; //...
CognitiveScale/cortex-cli
src/client/experiments.js
<filename>src/client/experiments.js /* * Copyright 2020 Cognitive Scale, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the “License”); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses...
Guardwu2015/w-leetcode
math/3sum-closest/threeSumClosest.js
<reponame>Guardwu2015/w-leetcode<filename>math/3sum-closest/threeSumClosest.js /** * 思路:双指针 * @param {number[]} nums * @param {number} target * @return {number} */ const threeSumClosest = function (nums, target) { nums.sort((a, b) => a - b) const n = nums.length; let best = Number.MAX_SAFE_INTEGER ...
cellog/unlock
paywall/src/components/interface/GlobalErrorConsumer.js
import React from 'react' import PropTypes from 'prop-types' import { GlobalErrorContext } from '../../utils/GlobalErrorProvider' import { mapErrorToComponent } from '../creator/FatalError' const Consumer = GlobalErrorContext.Consumer export const displayError = (error, errorMetadata, children) => { if (error) { ...
shengren/magma-1.6.1
testing/testing_sgeqrf_batched.cpp
<reponame>shengren/magma-1.6.1<gh_stars>0 /* -- MAGMA (version 1.6.1) -- Univ. of Tennessee, Knoxville Univ. of California, Berkeley Univ. of Colorado, Denver @date January 2015 @author <NAME> @author <NAME> @generated from testing_zgeqrf_batched.cpp normal z -> s,...
Kisensum/dnp3
dotnet/bindings/CLRAdapter/src/SessionAcceptorAdapter.cpp
<filename>dotnet/bindings/CLRAdapter/src/SessionAcceptorAdapter.cpp #include "SessionAcceptorAdapter.h" #include "Conversions.h" #include "SOEHandlerAdapter.h" #include "MasterApplicationAdapter.h" #include "MasterSessionAdapter.h" namespace Automatak { namespace DNP3 { namespace Adapter { SessionAcceptorAdapter::Se...
lshowbiz/agnt_ht
src/web/com/joymain/jecs/bd/webapp/action/JbdYdRebateAllotFiController.java
package com.joymain.jecs.bd.webapp.action; import java.util.ArrayList; import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.web.servlet.ModelA...
dcat52/interop
server/auvsi_suas/models/stationary_obstacle_test.py
<filename>server/auvsi_suas/models/stationary_obstacle_test.py """Tests for the stationary_obstacle module.""" from auvsi_suas.models.aerial_position import AerialPosition from auvsi_suas.models.gps_position import GpsPosition from auvsi_suas.models.stationary_obstacle import StationaryObstacle from auvsi_suas.models....
ironMann/ucx
src/uct/rocm/ipc/rocm_ipc_iface.c
/* * Copyright (C) Advanced Micro Devices, Inc. 2019. ALL RIGHTS RESERVED. * Copyright (C) Mellanox Technologies Ltd. 2020. ALL RIGHTS RESERVED. * See file LICENSE for terms. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "rocm_ipc_iface.h" #include "rocm_ipc_md.h" #include "rocm_ipc_ep.h" #inclu...
conormuldoon/unison
back-end/src/main/java/eu/acclimatize/unison/result/CloudinessResult.java
package eu.acclimatize.unison.result; import java.io.PrintWriter; import java.util.Date; import com.fasterxml.jackson.annotation.JsonProperty; import eu.acclimatize.unison.Constant; import eu.acclimatize.unison.HarmonieItem; import eu.acclimatize.unison.csvcontroller.CSVHeaderItem; /** * A Jackson and CSV annotate...
dagn/mailserv
admin/lib/ntp.rb
require 'timeout' class Ntp < ActiveRecord::BaseWithoutTable column :name_1, :string column :name_2, :string column :name_3, :string column :enabled, :boolean def after_initialize i = 0 Sudo.read("/etc/ntpd.conf").each do |line| case when line =~ /server (.*)/ add_server $1, i += ...
alexcurylo/twlib
projects/Xcode4/TabBar/config/TWProjectPrefix.h
// // TWProjectPrefix.h // // Copyright 2011 Trollwerks Inc. All rights reserved. // #import <Availability.h> #import <TargetConditionals.h> // define our own TWTARGET_SDK_[IPHONE|MAC] and TWTARGET_RT_[DEVICE|SIMULATOR] #if TARGET_OS_IPHONE #define TWTARGET_SDK_IPHONE 1 #if TARGET_IPHONE_SIMULATOR #define TWTARGET_...
OnamOfficial/build
cmd/buildlet/buildlet_unix.go
<filename>cmd/buildlet/buildlet_unix.go // Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build linux // (We only care about Linux on GKE for now) package main import ( "log" "os" "os/exec" "os/signal...
19920625lsg/liuyubobobo-algorithms
Part2BasicGraph/src/main/java/Chapter04DFSInAction/Section4To5SingleSourcePath/GraphDFSSingleSourcePath.java
<gh_stars>100-1000 /*********************************************************** * @Description : 深度优先遍历(支持连通图和非连通图) * @author : 梁山广(<NAME>) * @date : 2019-08-06 23:20 * @email : <EMAIL> ***********************************************************/ package Chapter04DFSInAction.Section4To5SingleSour...
levilucio/SyVOLT
UMLRT2Kiltera_MM/Properties/from_MPS/HPP4_IsolatedLHS.py
from core.himesis import Himesis, HimesisPreConditionPatternLHS import uuid class HPP4_IsolatedLHS(HimesisPreConditionPatternLHS): def __init__(self): """ Creates the himesis graph representing the AToM3 model HPP4_IsolatedLHS """ # Flag this instance as compiled now self.is_compiled = True super(HPP4_Is...
XHao/lindb
sql/stmt/expr_test.go
package stmt import ( "testing" "github.com/stretchr/testify/assert" "github.com/lindb/lindb/aggregation/function" ) func TestExpr_Rewrite(t *testing.T) { assert.Equal(t, "f", (&SelectItem{Expr: &FieldExpr{Name: "f"}}).Rewrite()) assert.Equal(t, "1.90", (&SelectItem{Expr: &NumberLiteral{Val: 1.9}}).Rewrite()) ...
ExtPoint/core-uploader
webpack.js
const webpackEasy = require('webpack-easy'); webpackEasy .entry( webpackEasy.isProduction() ? {'dist/fileup-core': './src/index.js'} : {'assets/bundle-index': './tests/web/index.js'} ) .output({ path: `${__dirname}/`, filename: '[name].js', }) .serverConfig({...
FreeSlave/resolve
examples/shopping-list-tutorial/lesson-7/client/containers/Header.js
<filename>examples/shopping-list-tutorial/lesson-7/client/containers/Header.js import React from 'react' import { connectStaticBasedUrls } from 'resolve-redux' import { Navbar } from 'react-bootstrap' import { Helmet } from 'react-helmet' import Image from './Image' const Header = ({ title, name, css, favicon }) => {...
RogerJFX/IntelliSearch
src/test/scala/de/crazything/app/entity/SocialPerson.scala
<filename>src/test/scala/de/crazything/app/entity/SocialPerson.scala package de.crazything.app.entity import de.crazything.search.entity.PkDataSet import play.api.libs.json.{Json, OFormat} case class SocialPerson(id: Int, firstName: String, lastName: String, facebookId: Option[String] = None, twitterId: Option[String...
mehmetpekdemir/Todo-App
backend/src/main/java/com/mehmetpekdemir/todoapp/infra/common/validator/UniqueUsernameValidator.java
<reponame>mehmetpekdemir/Todo-App package com.mehmetpekdemir.todoapp.infra.common.validator; import com.mehmetpekdemir.todoapp.infra.adapters.user.jpa.repository.UserJpaRepository; import lombok.RequiredArgsConstructor; import javax.validation.ConstraintValidator; import javax.validation.ConstraintValidatorContext; ...
tobywinter/jackal
lib/hash-data.js
'use strict' const crypto = require('crypto') const hashData = (object) => { const hash = crypto.createHash('sha256') hash.update(object) return hash.digest('hex') } module.exports = hashData
pureklkl/opentelemetry-collector
pdata/internal/timestamp_test.go
// Copyright The OpenTelemetry Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or ag...
schhx/acm
src/org/schhx/acm/leetcode/AddTwoNumbers_2.java
package org.schhx.acm.leetcode; /** * https://leetcode-cn.com/problems/add-two-numbers/ * * @author shanchao * @date 2019-05-05 */ public class AddTwoNumbers_2 { public ListNode addTwoNumbers(ListNode l1, ListNode l2) { ListNode dummy = new ListNode(-1); ListNode head = dummy; int add...
MangoPlex/Minecraft-Projects
LostTale/src/main/java/xyz/studiomango/losttale/hardcoded/items/icy/IceShard.java
<filename>LostTale/src/main/java/xyz/studiomango/losttale/hardcoded/items/icy/IceShard.java package xyz.studiomango.losttale.hardcoded.items.icy; import org.bukkit.Material; import org.bukkit.enchantments.Enchantment; import org.bukkit.inventory.ItemFlag; import xyz.studiomango.losttale.core.global.Rarity; import xyz...
litiian/asyncstudy
OPMS_v3-dev3.1/apps/document_management/migrations/0002_auto_20180726_1034.py
# Generated by Django 2.0.6 on 2018-07-26 10:34 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('document_management', '0001_initial'), ] operations = [ migrations.AlterField( model_name='document', name='belong',...
mk2510/jointGraphMatchingAndClustering
code/lib/text/tokenise.cpp
#include "mex.h" #include "string.h" #define MAX_LEN 100000 #define MAX_NUM_TOKEN 10000 /* * function tokens = tokenise(s, delim) * * History * create - <NAME>, 08-15-2009 * modify - <NAME>, 08-15-2009 */ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { // s char s...
smeng9/KrisLibrary
math/BlockTridiagonalMatrix.cpp
#include <KrisLibrary/Logger.h> #include "BlockTridiagonalMatrix.h" #include "LUDecomposition.h" #include <errors.h> using namespace Math; using namespace std; BlockTridiagonalMatrix::BlockTridiagonalMatrix() {} BlockTridiagonalMatrix::BlockTridiagonalMatrix(int nBlock) { resize(nBlock); } BlockTridiagonalMatrix::...
manifestinteractive/weather-bar-api
app/seeders/20180108000330-owm-city-list-seeder.js
<filename>app/seeders/20180108000330-owm-city-list-seeder.js module.exports = { up: function (queryInterface) { return queryInterface.bulkInsert("owm_city_list", [{ owm_city_id: "4156947", owm_city_name: "<NAME>", owm_latitude: "26.700621", owm_longitude: "-80.164772", owm_country: "US", loca...
serban-petrescu/swbo
src/main/java/spet/sbwo/api/service/base/BaseService.java
<reponame>serban-petrescu/swbo package spet.sbwo.api.service.base; import org.apache.cxf.phase.PhaseInterceptorChain; import spet.sbwo.control.ControlError; import spet.sbwo.control.ControlException; import spet.sbwo.data.DatabaseException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpS...
jiageh08/tea-springboot
bdnav-web/backend-web/src/main/java/com/bdxh/backend/configration/security/userdetail/MyUserDetails.java
package com.bdxh.backend.configration.security.userdetail; import com.bdxh.system.entity.User; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.userdetails.UserDetails; import java.util.Collection; /** * @description: * @author: Kang * @create: 2019-02-28 14:20 ...
dkatashev/adyen-web
packages/lib/src/components/internal/SecuredFields/lib/utilities/logger.js
/** * @internal * Utility class for logging messages/errors * Usage: * logger.log('Log message, always visible'); * * For debug only messages: * window._b$dl && logger.log('Log message only visible on dev env'); * * Or just use a conditional: * ``` * if (window._b$dl) { * logger.log('Log message only vi...
infphilo/tophat
src/align_status.cpp
<reponame>infphilo/tophat /* * align_status.cpp * TopHat * * Created by <NAME> on 11/09/2010. * */ #ifdef HAVE_CONFIG_H #include <config.h> #endif #include <cassert> #include <cstdlib> #include <iostream> #include <set> #include <vector> #include "common.h" #include "bwt_map.h" #include "tokenize.h" #includ...
louisponet/aiida-core
docs/source/topics/processes/include/snippets/launch/launch_submit_dictionary.py
<reponame>louisponet/aiida-core # -*- coding: utf-8 -*- from aiida import orm from aiida.engine import submit ArithmeticAddCalculation = CalculationFactory('arithmetic.add') inputs = { 'x': orm.Int(1), 'y': orm.Int(2) } node = submit(ArithmeticAddCalculation, **inputs)
Codernauti/Sweetie
app/src/main/java/com/codernauti/sweetie/gallery/GalleryInfoActivity.java
<filename>app/src/main/java/com/codernauti/sweetie/gallery/GalleryInfoActivity.java package com.codernauti.sweetie.gallery; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.app.FragmentTransaction; import andr...
cluco91/JavaEE_Facturacion
SistemaFacturas/src/java/sys/imp/detalleFacturaDaoImp.java
package sys.imp; import org.hibernate.Session; import sys.dao.detalleFacturaDao; import sys.model.Detallefactura; /** * * @author lucodeveloper */ public class detalleFacturaDaoImp implements detalleFacturaDao { @Override public boolean guardarVentaDetalleFactura(Session session, Detallefactura detallefa...
MarcSkovMadsen/panel-components
setup.py
<filename>setup.py """Needed to be able to build and install the package""" from setuptools import setup setup()
Elhyoz/sitBootcamp
Ejercicios/desestructuracion.js
function f() { return [1, 2]; } let a = f(); console.log("A es " + a);
JackieLJM/FULLSTACK-books-projects-codes
CODEs/fullstack-react-native-book-r3/image-feed/1/components/Card.js
import { ActivityIndicator, Image, StyleSheet, View } from 'react-native'; import PropTypes from 'prop-types'; import React from 'react'; import AuthorRow from './AuthorRow'; export default class Card extends React.Component { static propTypes = { fullname: PropTypes.string.isRequired, image: Image.propType...
joegarbett/baleen
baleen-uima/src/main/java/uk/gov/dstl/baleen/uima/BaleenCollectionReader.java
<gh_stars>100-1000 // Dstl (c) Crown Copyright 2017 // Modified by NCA (c) Crown Copyright 2017 package uk.gov.dstl.baleen.uima; import java.io.IOException; import java.io.InputStream; import org.apache.uima.UimaContext; import org.apache.uima.collection.CollectionException; import org.apache.uima.fit.component.JCasC...
patil215/v8
fuzzer_output/interesting/sample_1554142791035.js
function main() { const v4 = [13.37,13.37,13.37,13.37,13.37]; const v6 = [1337,1337,1337]; const v7 = [v4]; const v8 = {}; const v9 = {getFloat32:v7,push:"CmfGB9PQPJ",delete:"CmfGB9PQPJ",lastMatch:1337,bind:Math,ceil:v4,toString:v4,map:v6,acosh:v6}; let v10 = v6; const v15 = [13.37]; const v17 = [1337,1337,1337,1337]; ...
athanor/athanor
src/operators/opAnd.cpp
#include "operators/opAnd.h" #include <algorithm> #include <cassert> #include <unordered_map> #include "operators/flatten.h" #include "operators/previousValueCache.h" #include "operators/simpleOperator.hpp" #include "types/boolVal.h" #include "types/sequenceVal.h" #include "utils/ignoreUnused.h" using namespace std; us...
DanIverson/OpenVnmrJ
src/vwacq/gsClkLib.h
<reponame>DanIverson/OpenVnmrJ /* * Copyright (C) 2015 University of Oregon * * You may distribute under the terms of either the GNU General Public * License or the Apache License, as specified in the LICENSE file. * * For more information, see the LICENSE file. */ #ifndef INCgsClkLibh #define INCgsClkLibh /...
xwj1024/ajin-mall
mall-sys-app/mall-sys-app-search/src/main/java/ajin/mall/sys/search/service/impl/EsServiceImpl.java
package ajin.mall.sys.search.service.impl; import ajin.mall.common.base.exception.SysException; import ajin.mall.sys.search.es.EsEntity; import ajin.mall.sys.search.es.EsMapping; import ajin.mall.sys.search.service.EsService; import com.alibaba.fastjson.JSON; import org.elasticsearch.action.admin.indices.create.Create...
applefighting/babygo.github.io
client/node_modules/@cycle/storage/lib/util.js
<reponame>applefighting/babygo.github.io<gh_stars>0 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var dropRepeats_1 = require("xstream/extra/dropRepeats"); var adapt_1 = require("@cycle/run/lib/adapt"); function getStorage$(request$, type) { if (type === 'local') { return requ...
arez/arez
processor/src/test/fixtures/input/com/example/SubpackageModel.java
<filename>processor/src/test/fixtures/input/com/example/SubpackageModel.java package com.example; import arez.annotations.Action; import arez.annotations.ArezComponent; import arez.annotations.Memoize; import arez.annotations.Observable; @ArezComponent public abstract class SubpackageModel { @Observable public lo...
avinashkpai12/syscop
AppRegistration/src/main/java/com/stackroute/appregistration/service/ApplicationServiceImpl.java
package com.stackroute.appregistration.service; import com.stackroute.appregistration.domain.Application; import com.stackroute.appregistration.domain.User; import com.stackroute.appregistration.exceptions.ApplicationAlreadyExistException; import com.stackroute.appregistration.exceptions.ApplicationDoesNotExistExcepti...
djeada/Nauka-programowania
src/Python/23_Wyrazenia_regularne/Zad5.py
""" Z ciagu znakow wypisz cyfry. """ import re # Wersja 1 def tylko_cyfry_v1(slowo): return re.sub("[^\d]", "", slowo) # Testy Poprawnosci slowo = "numer 32.19 wyzej niz 31.17" wynik = "32193117" assert tylko_cyfry_v1(slowo) == wynik
uthark/homebrew-core
Formula/wput.rb
<reponame>uthark/homebrew-core class Wput < Formula desc "Tiny, wget-like FTP client for uploading files" homepage "https://wput.sourceforge.io/" url "https://downloads.sourceforge.net/project/wput/wput/0.6.2/wput-0.6.2.tgz" sha256 "229d8bb7d045ca1f54d68de23f1bc8016690dc0027a16586712594fbc7fad8c7" bottle do ...
jorgezafra94/talk4free-1
talk4free-backend/api/users/users.create.js
const connection = require("../db_connection").connection; const create = (data, callback) => { let created_at = new Date().toISOString().slice(0, 18); let updated_at = created_at; connection.query( `INSERT INTO users(email, username, created_at, updated_at, active, adm, img) values(?,?,?,?,?,?,?...