repo_name
stringlengths
6
101
path
stringlengths
4
300
text
stringlengths
7
1.31M
creativeprogramming/chromium
chrome/browser/extensions/extension_message_service.cc
<filename>chrome/browser/extensions/extension_message_service.cc<gh_stars>1-10 // Copyright (c) 2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/extensions/extension_message_service.h" #incl...
ThanhNIT/LeetCode-in-Java
src/test/java/g2201_2300/s2269_find_the_k_beauty_of_a_number/SolutionTest.java
package g2201_2300.s2269_find_the_k_beauty_of_a_number; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.MatcherAssert.assertThat; import org.junit.jupiter.api.Test; class SolutionTest { @Test void divisorSubstrings() { assertThat(new Solution().divisorSubstrings(240, 2), e...
roikku/swift-explorer
src/main/java/org/swiftexplorer/gui/localization/LocalizedStringsImpl.java
/* * Copyright 2014 <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 writin...
kishorkunal-raj/jung
jung-visualization/src/main/java/edu/uci/ics/jung/visualization/decorators/PickableNodePaintFunction.java
<filename>jung-visualization/src/main/java/edu/uci/ics/jung/visualization/decorators/PickableNodePaintFunction.java /* * Created on Mar 10, 2005 * * Copyright (c) 2005, The JUNG Authors * * All rights reserved. * * This software is open-source under the BSD license; see either * "license.txt" or * https://gith...
suluner/tencentcloud-sdk-cpp
cpdp/include/tencentcloud/cpdp/v20190820/model/QueryOpenBankPaymentOrderRequest.h
<gh_stars>0 /* * Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. 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/...
tangzhangss/commonutils.github.io
src/main/java/com/tangzhangss/commonutils/datasource/service/DatasourceService.java
package com.tangzhangss.commonutils.datasource.service; import com.tangzhangss.commonutils.base.SysBaseService; import com.tangzhangss.commonutils.datasource.dao.DatasourceDao; import com.tangzhangss.commonutils.datasource.entity.DatasourceEntity; import org.springframework.stereotype.Service; @Service public class D...
leekayden/jcodec
jplayer/src/main/java/org/jcodec/player/filters/http/HttpMedia.java
<filename>jplayer/src/main/java/org/jcodec/player/filters/http/HttpMedia.java package org.jcodec.player.filters.http; import static org.jcodec.player.filters.http.HttpUtils.getHttpClient; import static org.jcodec.player.filters.http.HttpUtils.privilegedExecute; import java.io.File; import java.io.IOException; import ...
loyio/leetcode
CodeInterviews-SwordOffer/Offer14-II-Cut-Ropes-II/solution1.cpp
<filename>CodeInterviews-SwordOffer/Offer14-II-Cut-Ropes-II/solution1.cpp class Solution { public: int cuttingRope(int n) { int mk = 1000000007; if(n < 4){ return n-1; } int b = n % 3; long rem = 1, x = 3; for(int a = n/3-1; a > 0; a /= 2){ if(...
aleasims/Peach
dependencies/src/4Suite-XML-1.0.2/test/Xml/Xslt/Borrowed/rvd_20030322.py
<filename>dependencies/src/4Suite-XML-1.0.2/test/Xml/Xslt/Borrowed/rvd_20030322.py # key()-less grouping tests, including divide-and-conquer (DVC) # From: "<NAME>" <<EMAIL>> # posted to xsl-list on 22-Mar-2003. from Xml.Xslt import test_harness # The author mistakenly thought that key() could not be used on # result ...
iitsoftware/swiftmq-ce
swiftlets/sys_mgmt/src/main/java/com/swiftmq/impl/mgmt/standard/jmx/JMXUtil.java
<reponame>iitsoftware/swiftmq-ce /* * Copyright 2019 IIT Software GmbH * * IIT Software GmbH licenses this file to You 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/...
cdsc-github/parade-ara-simulator
src/modules/scratch-pad/scratch-pad.hh
/* scratch-pad.hh: Scratchpad used in PARADE */ #ifndef SCRATCH_PAD_H #define SCRATCH_PAD_H #include <stdint.h> #include <vector> class ScratchPad { public: std::vector<uint8_t> data; std::vector<bool> valid; void CheckSize(uint64_t size) { while(data.size() <= size) { data.push_back...
aabtop/reify
src/idt/targets/pure_cpp/templates/CppImmutableRefCounted.stache.h
// {{! // clang-format off // }} #ifndef _{{namespace}}_CPP_IMMUT_REF_COUNTED_IST_GENERATED_H_ #define _{{namespace}}_CPP_IMMUT_REF_COUNTED_IST_GENERATED_H_ #include <array> #include <memory> #include <string> #include <tuple> #include <variant> #include <vector> #include <iostream> {{#enable_hashes}} #include "reify...
gilles-leblanc/gameproject
UI/screens/map_explorer.rb
<filename>UI/screens/map_explorer.rb require 'gosu' require_relative '../map_overview' require_relative '../info_box' require_relative '../view_port' # The screen where we show the map and the basic controls. This is the main # screen for everything that is exploration related. It includes a 2d first # person view of ...
ozdanborne/libcalico-go
lib/api/profile.go
<gh_stars>0 // Copyright (c) 2016 Tigera, 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/LICENSE-2.0 // // Unless require...
antarikshray/websiterudra
node_modules/react-icons/fa/television.js
<reponame>antarikshray/websiterudra import React from 'react' import Icon from 'react-icon-base' const FaTelevision = props => ( <Icon viewBox="0 0 40 40" {...props}> <g><path d="m37.2 27.3v-19.9q0-0.3-0.2-0.5t-0.5-0.2h-33.2q-0.2 0-0.4 0.2t-0.2 0.5v19.9q0 0.3 0.2 0.5t0.4 0.2h33.2q0.3 0 0.5-0.2t0.2-0.5z m2...
Allison12345/weather-report-wxapp
components/my-weather-search/index.js
<reponame>Allison12345/weather-report-wxapp Component({ data: { img: 'https://6d79-mywxapp-q4z0b-1301425530.tcb.qcloud.la/search-outline.png?sign=5fd5c85d0e4b46858a35d07b2726fcde&t=1584787271', city: '' }, methods: { onCancel() { this.setData({ city: '' }) }, onChange(e) { th...
anhtrangg/PhotonChat
PhotonChat/Photon-objc/inc/Enums/EGConnectionProtocol.h
#pragma once #define EGConnectionProtocol_UDP ((nByte)0) ///<Use UDP to connect to Photon, which allows you to send operations reliable or unreliable on demand. #define EGConnectionProtocol_TCP ((nByte)1) ///<Use TCP to connect to Photon. #define EGConnectionProtocol_DEFAULT ((nByte)UDP)
shaunstoltz/wax-prosemirror
wax-prosemirror-services/src/WaxToolGroups/TableToolGroupService/TableToolGroupService.js
import Service from '../../Service'; import Tables from './Tables'; class TableToolGroupService extends Service { register() { this.container.bind('Tables').to(Tables); } } export default TableToolGroupService;
kristianmandrup/feathers-rest-koa
test/koa/routes.test.js
<reponame>kristianmandrup/feathers-rest-koa<filename>test/koa/routes.test.js import { assert, configure, Routes, createRoutes } from '../config'; describe('REST provider', function () { let config = configure.bind(this); let app = config(); describe('Routes', function () { const routes = createRoute...
REANNZ/saml-service
spec/factories/mdrpi_registration_policies.rb
<reponame>REANNZ/saml-service # frozen_string_literal: true FactoryBot.define do factory :mdrpi_registration_policy, class: 'MDRPI::RegistrationPolicy', parent: :localized_uri do registration_info factory: :mdrpi_registration_info end end
julien6387/supvisors
supvisors/tests/test_viewhostaddress.py
#!/usr/bin/python # -*- coding: utf-8 -*- # ====================================================================== # 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 # #...
naetherm/PixelLight
Plugins/PLCompositing/src/Shaders/Deferred/SRPDeferred.cpp
<filename>Plugins/PLCompositing/src/Shaders/Deferred/SRPDeferred.cpp /*********************************************************\ * File: SRPDeferred.cpp * * * Copyright (C) 2002-2013 The PixelLight Team (http://www.pixellight.org/) * * This file is part of PixelLight. * * Permi...
rikkuness/ebiten
internal/shader/testdata/issue1248.go
package main func Foo() vec2 { var a, b vec2 a, b = b, a var c, d, e vec2 c, d, e = d, e, c return a }
larrydiamond/hazelcast
hazelcast/src/test/java/com/hazelcast/client/config/XmlYamlClientConfigBuilderEqualsTest.java
/* * Copyright (c) 2008-2021, Hazelcast, 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/LICENSE-2.0 * * Unless required ...
thewtex/RTK
include/rtkDownsampleImageFilter.h
<filename>include/rtkDownsampleImageFilter.h /*========================================================================= * * Copyright RTK Consortium * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy o...
hariPrasad525/Nitya_Annaccounting
src/com/nitya/accounter/web/client/ui/win8portlets/PortletData.java
<reponame>hariPrasad525/Nitya_Annaccounting package com.nitya.accounter.web.client.ui.win8portlets; import java.io.Serializable; import com.google.gwt.user.client.rpc.IsSerializable; public class PortletData implements Serializable, IsSerializable { /** * */ private static final long serialVersionUID = 1L; ...
WhoBrokeTheBuild/Dusk-mk2
src/Dusk/Tracking/TrackedObject.hpp
<reponame>WhoBrokeTheBuild/Dusk-mk2<filename>src/Dusk/Tracking/TrackedObject.hpp #ifndef DUSK_TRACKING_TRACKED_OBJECT_HPP #define DUSK_TRACKING_TRACKED_OBJECT_HPP #include <Dusk/Config.hpp> #include <Dusk/Platform.hpp> #include <Dusk/Types.hpp> namespace dusk { #define DUSK_CLASSNAME(NAME) virtual inline string GetC...
Nic30/hwtLib
hwtLib/amba/axis_comp/strformat_test.py
<filename>hwtLib/amba/axis_comp/strformat_test.py import unittest from hwt.interfaces.utils import addClkRstn, propagateClkRstn from hwt.simulator.simTestCase import SimTestCase from hwt.synthesizer.param import Param from hwt.synthesizer.unit import Unit from hwtLib.amba.axis import AxiStream, axis_recieve_bytes, axi...
aruniiird/zig
lib/libc/include/x86_64-linux-any/asm/mman.h
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _ASM_X86_MMAN_H #define _ASM_X86_MMAN_H #define MAP_32BIT 0x40 /* only give out 32bit addresses */ #ifdef CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS /* * Take the 4 protection key bits out of the vma->vm_flags * value and turn them in to the bits ...
penhauer-xiao/jiebago
finalseg/prob_trans.go
<reponame>penhauer-xiao/jiebago package finalseg var probTrans = make(map[byte]map[byte]float64) func init() { probTrans['B'] = map[byte]float64{'E': -0.510825623765990, 'M': -0.916290731874155} probTrans['E'] = map[byte]float64{'B': -0.5897149736854513, 'S': -0.8085250474669937} probTrans['M'] = map[byte]floa...
celsiustx/metaflow
setup.py
<gh_stars>1-10 from os.path import dirname, join from setuptools import setup, find_packages version = '2.3.5' dir = dirname(__file__) with open(join(dir, 'requirements.txt'), 'r') as f: install_requires = [ line.rstrip('\n') for line in f.readlines() ] with open(join(dir, 'requirements-test.txt'), 'r') as f: ...
Sean10/Algorithm_code
leetcode_archived_cpp/LeetCode_61.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: ListNode* rotateRight(ListNode* head, int k) { if(k == 0 || !head || !head->next) return head; ListNode...
tgonzales/zuen
src/h/reflow/elementsIsCustomNode.js
<reponame>tgonzales/zuen import * as f from '@f' import isCustomElement from './isCustomElement' /** * Valida se o tagName do elemento e vElemento sao um elemento customizado * * @name elementsIsCustomNode * @function * @access private * @param {HTMLElement} element Elemento html que esta no DOM * @param {HTMLE...
xlmentx/Parallel-Computing
src/layer/softmax.h
<reponame>xlmentx/Parallel-Computing<filename>src/layer/softmax.h #ifndef SRC_LAYER_SOFTMAX_H_ #define SRC_LAYER_SOFTMAX_H_ #include "../layer.h" class Softmax: public Layer { public: void forward(const Matrix& bottom); void backward(const Matrix& bottom, const Matrix& grad_top); }; #endif // SRC_LAYER_SOFTMAX...
jgbyrne/sway
sway/base64.c
<filename>sway/base64.c /* * Adapted from https://github.com/littlstar/b64.c * License under the MIT License: * Copyright (c) 2014 Little Star Media, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to dea...
Rinqt/stock
frontend/src/app/main/companies/widgets/CompanyItem.js
import React, { Component } from "react"; import { withStyles } from "@material-ui/core/styles"; import ListItem from "@material-ui/core/ListItem"; import ListItemSecondaryAction from "@material-ui/core/ListItemSecondaryAction"; import ListItemText from "@material-ui/core/ListItemText"; import Checkbox from "@material-...
shuigedeng/taotao-cloud-paren
taotao-cloud-microservice/taotao-cloud-sys/taotao-cloud-sys-biz/src/main/java/com/taotao/cloud/sys/biz/mybatis/service/impl/SysDictItemServiceImpl.java
// package com.taotao.cloud.sys.biz.service.impl; // // import com.taotao.cloud.data.mybatis.plus.service.impl.SuperServiceImpl; // import com.taotao.cloud.sys.biz.entity.SysDictItem; // import com.taotao.cloud.sys.biz.mapper.SysDictItemMapper; // import com.taotao.cloud.sys.biz.service.ISysDictItemService; // import o...
AndreyIg/debezium-incubator
debezium-connector-cassandra/src/main/java/io/debezium/connector/cassandra/transforms/type/deserializer/BasicTypeDeserializer.java
<reponame>AndreyIg/debezium-incubator /* * Copyright Debezium Authors. * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ package io.debezium.connector.cassandra.transforms.type.deserializer; import org.apache.avro.Schema; import org.apache.cassan...
kambiz-aghaiepour/rally
tests/benchmark/scenarios/test_authenticate.py
# Copyright (C) 2014 Yahoo! Inc. All Rights Reserved. # 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 # ...
arbindo/mimock
mimock-ui/src/components/mockManagement/MockDetails/detailtoolbar/DetailToolbar.test.js
<gh_stars>1-10 import React from 'react'; import { render } from '@testing-library/react'; import DetailToolbar from './DetailToolbar'; import { BrowserRouter } from 'react-router-dom'; describe('DetailToolbar', () => { it('should render detail toolbar component', async () => { const tree = await render(<DetailTool...
FreeApophis/arduino-christmas-lights
ChristmasLightsController/clearance/ClearFade.h
<filename>ChristmasLightsController/clearance/ClearFade.h #pragma once #include "Clearance.h" // Clear the strip from the ether side class ClearFade final : public Clearance { public: explicit ClearFade(AbstractLedStrip* strip); auto Init() -> void override; auto Show() -> void override; private: ...
JULIELab/jcore-dependencies
dragontool/src/main/java/dragon/ml/seqmodel/data/BasicDataset.java
<filename>dragontool/src/main/java/dragon/ml/seqmodel/data/BasicDataset.java package dragon.ml.seqmodel.data; import java.util.Vector; /** * <p>Basic data structure of a set of sequence data</p> * <p></p> * <p>Copyright: Copyright (c) 2005</p> * <p>Company: IST, Drexel University</p> * @author <NAME> ...
deltacat/dbstress
cmd/root.go
package cmd import ( "fmt" "os" "strings" "github.com/deltacat/dbstress/config" "github.com/sirupsen/logrus" "github.com/spf13/cobra" ) var rootCmd = &cobra.Command{ Use: "dbstress", Short: "Create artificial load on an InfluxDB/MySQL instance", Long: "This application cr...
jzonthemtn/nlp-building-blocks
idyl-e3-entity-extraction-engine/idyl-e3-system-initializer/src/main/java/com/mtnfog/idyl/e3/system/initializer/NativeSystemInitializerService.java
<filename>idyl-e3-entity-extraction-engine/idyl-e3-system-initializer/src/main/java/com/mtnfog/idyl/e3/system/initializer/NativeSystemInitializerService.java /******************************************************************************* * Copyright 2019 Mountain Fog, Inc. * * Licensed under the Apache License, Ve...
martin-jordan/service-manual-publisher
spec/helpers/redirect_destination_helper_spec.rb
require "rails_helper" RSpec.describe RedirectDestinationHelper, "#redirect_destination_select_options", type: :helper do it "should include all published guides ordered by slug" do create( :guide, :with_published_edition, slug: "/service-manual/agile-delivery/team-wall", ) create( ...
abagusetty/Uintah
src/StandAlone/tools/extractors/lineextract.cc
/* * The MIT License * * Copyright (c) 1997-2021 The University of Utah * * 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 * right...
thomz12/h5
H5/H5/Resources/.generated/System/Collections/IEnumerator.js
<reponame>thomz12/h5 H5.define("System.Collections.IEnumerator", { $kind: "interface" });
pbasting/cactus
api/impl/cactusSerialisation.c
/* * Copyright (C) 2009-2011 by <NAME> (<EMAIL>) * * Released under the MIT license, see LICENSE.txt */ #include "cactusGlobalsPrivate.h" //////////////////////////////////////////////// //////////////////////////////////////////////// //////////////////////////////////////////////// //Functions for serialising t...
AriCheng/flare
flare/base/monitoring/monitoring_system.h
<filename>flare/base/monitoring/monitoring_system.h<gh_stars>100-1000 // Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this // file except in compliance with the License. You may obtain a copy of the // License ...
BrassGoggledCoders/ReEngineered-Toolbox
src/main/java/xyz/brassgoggledcoders/reengineeredtoolbox/api/face/FaceInstance.java
<filename>src/main/java/xyz/brassgoggledcoders/reengineeredtoolbox/api/face/FaceInstance.java package xyz.brassgoggledcoders.reengineeredtoolbox.api.face; import com.google.common.collect.Maps; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.nbt.CompoundNBT; import net.minecraft.util.Hand; import...
denim2x/wikia-is-answered
engine.py
import re from collections import defaultdict from _bareasgi import text_reader, text_response, json_response #from redis import StrictRedis #from redis.exceptions import ResponseError import _rom as rom from config import dialogflow as _dialogflow, redis, answers as _answers, kb as _kb from document import ...
sallyf/sallyf
src/main/java/com/sallyf/sallyf/Form/FormManager.java
<reponame>sallyf/sallyf<gh_stars>1-10 package com.sallyf.sallyf.Form; import com.sallyf.sallyf.Container.Container; import com.sallyf.sallyf.Container.ServiceInterface; import com.sallyf.sallyf.Form.Renderer.*; import com.sallyf.sallyf.Utils.ClassUtils; import java.util.ArrayList; import java.util.Collection; public...
HaroldMills/NFC
setup.py
<reponame>HaroldMills/NFC """ Setup.py for Vesper pip package. All of the commands below should be issued from the directory containing this file. To build the Vesper package: python setup.py sdist bdist_wheel To upload the Vesper package to the test Python package index: python -m twine upload --repositor...
emartech/xplenty.jar
xplenty.jar-core/src/main/java/com/xplenty/api/model/Job.java
<gh_stars>0 /** * */ package com.xplenty.api.model; import java.util.Date; import java.util.List; import java.util.Map; import javax.xml.bind.annotation.XmlRootElement; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.a...
PAXANDDOS/UCODE-Track-C
ushell/libmx/src/mx_bubble_sort.c
#include "libmx.h" int mx_bubble_sort(char **arr, int size) { char* temp; int count = 0; for (int i = 0; i < size - 1; i++) { for (int g = 0; g < size - 1 - i; g++) { if (mx_strcmp(arr[g], arr[g + 1]) > 0) { temp = arr[g]; arr[g] = arr[g + 1]; a...
wuxiaohua17/mycloud-demo
mycloud-order/src/test/java/cn/com/ut/ApplicationTests.java
<reponame>wuxiaohua17/mycloud-demo package cn.com.ut; import javax.persistence.EntityManager; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.core.env.Environm...
daysgobye/ccm
src/components/laxheader/laxheader.js
<gh_stars>0 import React, { Component } from 'react'; import Content from "../utility/Content/Content" import { Parallax, Background } from 'react-parallax'; class LaxHeader extends Component { constructor(props) { super(props); this.state = {} } render() { return ( <div ...
LotteWong/giotto
http_proxy_middleware/http_rate_limit.go
package http_proxy_middleware import ( "fmt" "net/http" "time" "github.com/LotteWong/giotto-gateway-core/common_middleware" "github.com/LotteWong/giotto-gateway-core/constants" "github.com/LotteWong/giotto-gateway-core/models/po" "github.com/LotteWong/giotto-gateway-core/service" "github.com/gin-gonic/gin" "...
greezybacon/clox
src/Parse/stream.h
<filename>src/Parse/stream.h #ifndef STREAM_H #define STREAM_H #include <stdio.h> struct stream; typedef struct stream_ops { char (*next)(struct stream*); char (*peek)(struct stream*); const char* (*read)(struct stream*, int start, int length); void (*cleanup)(struct stream*); } ...
tvang8394/danneckersWebRedone
assets/jss/nextjs-material-kit-pro/pages/ecommerceStyle.js
import { title, main, mainRaised, mrAuto, mlAuto, container, description, blackColor, whiteColor, grayColor, hexToRgb, } from "assets/jss/nextjs-material-kit-pro.js"; import imagesStyles from "assets/jss/nextjs-material-kit-pro/imagesStyles.js"; const styles = { ...imagesStyles, title, main...
gregakinman/atlasdb
atlasdb-ete-tests/src/test/java/com/palantir/atlasdb/ete/LockWithTimelockEteTest.java
/* * (c) Copyright 2019 Palantir Technologies 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/LICENSE-2.0 * * Unless ...
delchev/xsk
modules/parsers/parser-hana/src/main/java/models/TableFunctionDefinitionModel.java
/* * Copyright (c) 2022 SAP SE or an SAP affiliate company and XSK contributors * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, v2.0 * which accompanies this distribution, and is available at * http://www.apache.org/licenses/LICENSE-...
nilium/libsnow-common
include/snow/types/range_set.hh
<filename>include/snow/types/range_set.hh /* * Copyright <NAME> 2013. * * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) */ #pragma once #include <snow/config.hh> #include <stdexcept> #include <list> name...
yujiecong/Qt-Zhku-Client
Qt-Zhku-Client/StrProcessing.h
<gh_stars>1-10 #ifndef STRPROCESSING_H #define STRPROCESSING_H #include <QWidget> #include <QtNetwork> class StrProcessing { public: StrProcessing(); QString gbk2Utf8(const QByteArray &inStr); QString utf82Gbk(const QByteArray &inStr); QByteArray toUrlEncode(const QByteArray &inStr); QSt...
fabiodarice/Python
PyCharm/Exercicios/Aula16/ex074.py
<filename>PyCharm/Exercicios/Aula16/ex074.py # Importação de bibliotecas from random import randint # Título do programa print('\033[1;34;40mMAIOR E MENOR VALORES EM TUPLA\033[m') # Objetos # Lógica n = (randint(1, 10), randint(1, 10), randint(1, 10), randint(1, 10), randint(1, 10)) print(f'Os valores sorteados fo...
tfnick/FEBS-Shiro
src/main/java/cc/mrbird/febs/approve/mapper/DatasetMapper.java
<filename>src/main/java/cc/mrbird/febs/approve/mapper/DatasetMapper.java<gh_stars>0 package cc.mrbird.febs.approve.mapper; import cc.mrbird.febs.approve.entity.Dataset; import com.baomidou.mybatisplus.core.mapper.BaseMapper; /** * Mapper * * @author YangXiao * @date 2019-09-27 15:50:29 */ public interface Datas...
Nedson202/Knowledge-store-mobile
src/components/Books/BookMeta.js
<reponame>Nedson202/Knowledge-store-mobile<gh_stars>0 import React from 'react'; import { Image, Rating, } from 'react-native-elements'; import { View, TouchableWithoutFeedback, } from 'react-native'; import { appRootStyle } from '../../styles'; import { CONTAIN, ICON_SMALL } from '../../settings'; import Spinner from...
pop1234o/BestPracticeApp
Algorithm/src/main/java/com/liyafeng/algorithm/sword2offer/N16_ReverseList.java
package com.liyafeng.algorithm.sword2offer; public class N16_ReverseList { /** * * 反转链表 * * 我们可以用循环,用缓存next的方式来反转 * * 也可以用 递归 的方式来反转 * 因为递归天生就有参数缓存 * * 但是递归会有内存开销,不适合长的链表 * 但是递归代码简洁 * * @param args */ public static void main(String[] args) { ...
fredmorcos/attic
Projects/PlantMaker/archive/20100517/src/utils.py
<gh_stars>1-10 def bestSolution(solutions): maxFitness = 0 maxFitnessIndex = 0 for i, solution in enumerate(solutions): if i == 0: maxFitness = solution.fitness else: if solution.fitness > maxFitness: maxFitness = solution.fitness maxFitnessIndex = i return solutions[maxFitnessIndex]
UKHomeOffice/removals_integration
api/lib/ModelHelpers.js
<filename>api/lib/ModelHelpers.js 'use strict'; const _ = require('lodash'); module.exports = { findAndUpdateOrCreate: function findAndUpdateOrCreate (criteria, values) { return this.update(criteria, values) .then(result => _.isEmpty(result) ? this.create(values) : result[0]); }, normalizeGender: (gen...
OCEO-YJ/Synapse-Repository-Services
services/repository/src/main/java/org/sagebionetworks/repo/web/PaginatedParameters.java
package org.sagebionetworks.repo.web; /** * Parameters for paginated results. * * @author jmhill * */ public class PaginatedParameters { long offset = 0; long limit = 10; String sortBy = null; boolean ascending = true;; public PaginatedParameters(){ } public PaginatedParameters(long...
mehditeymorian/SmartTask
app/src/main/java/ir/timurid/smarttask/db/TodoDao.java
package ir.timurid.smarttask.db; import androidx.lifecycle.LiveData; import androidx.room.Dao; import androidx.room.Delete; import androidx.room.Insert; import androidx.room.Query; import androidx.room.Update; import java.util.List; import ir.timurid.smarttask.model.Todo; import ir.timurid.smarttask.model.TodoInfo; ...
jiachen247/JLite-Compiler
src/main/java/parsetree/statement/CallStatement.java
<filename>src/main/java/parsetree/statement/CallStatement.java<gh_stars>0 package main.java.parsetree.statement; import java.util.ArrayList; import java.util.List; import main.java.ir3.VarDecl3; import main.java.ir3.exp.Exp3Result; import main.java.ir3.stmt.CallStatement3; import main.java.ir3.stmt.Stmt3; import main...
yuqingchen/Leetcode
106_Construct_Binary_Tree_from_Inorder_and_Postorder_Traversal.py
<gh_stars>1-10 class Solution: def buildTree(self, inorder: List[int], postorder: List[int]) -> TreeNode: if not postorder: return root = TreeNode(postorder[-1]) rootpos = inorder.index(postorder[-1]) root.left = self.buildTree(inorder[:rootpos], postorder[:rootpos]) ...
shadiga/Client
app/src/main/java/com/freecoders/photobook/db/SQLiteHelper.java
package com.freecoders.photobook.db; import android.content.Context; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; import android.util.Log; /** * Created by Alex on 2014-11-27. */ public class SQLiteHelper extends SQLiteOpenHelper { public static final String T...
andyglick/openclover-git
clover-idea/src/com/atlassian/clover/idea/treetables/ProjectTreeCellRenderer.java
package com.atlassian.clover.idea.treetables; import com.atlassian.clover.api.registry.MethodInfo; import com.atlassian.clover.registry.entities.BaseClassInfo; import com.atlassian.clover.idea.util.ui.CloverIcons; import com.atlassian.clover.idea.coverage.CoverageTreeModel; import com.atlassian.clover.idea.testexplore...
vidkidz/crossbridge
llvm-gcc-4.2-2.9/gcc/testsuite/gcc.dg/dremf-type-compat-4.c
/* Test for bogus diagnostics for dremf definition, as in bug 16666. The GNU extension permitting a prototype to override the promotion of old-style parameter declarations should only apply when the prototype is visible, not for a built-in prototype. */ /* { dg-do compile } */ /* { dg-options "" } */ float d...
PacificBiosciences/pbcopper
include/pbcopper/align/AffineAlignment.h
<gh_stars>1-10 #ifndef PBCOPPER_ALIGN_AFFINEALIGNMENT_H #define PBCOPPER_ALIGN_AFFINEALIGNMENT_H #include <string> namespace PacBio { namespace Align { // // Support for pairwise alignment with an affine gap penalty. // class PairwiseAlignment; struct AffineAlignmentParams { float MatchScore; float Mismatc...
portlandrisk/cytoscape
src/extensions/renderer/canvas/drawing-edges.js
<reponame>portlandrisk/cytoscape<filename>src/extensions/renderer/canvas/drawing-edges.js 'use strict'; var CRp = {}; CRp.drawEdge = function( context, edge, shiftToOriginWithBb, drawLabel, drawOverlayInstead ){ var rs = edge._private.rscratch; var usePaths = this.usePaths(); // if bezier ctrl pts can not be c...
TommyLike/mindspore
mindspore/nn/metrics/topk.py
# Copyright 2020 Huawei Technologies Co., Ltd # # 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...
rekbun/leetcode
src/leetcode/NextPermutation.java
<gh_stars>0 package leetcode; import java.util.Arrays; public class NextPermutation { private int findRightLow(int[] src) { int low=-1; for(int i=1;i<src.length;i++) { if(src[i]>src[i-1]) { low=i-1; } } return low; } private int findLeftLow(int[] src,int si) { int high=si+1; for(int i=si...
wowonrails/qae
spec/lib/sic_code_spec.rb
<filename>spec/lib/sic_code_spec.rb<gh_stars>1-10 require "rails_helper" describe SICCode do describe "regex" do let(:regex) { described_class::REGEX } it "matches the sic codes with correct format" do expect("1020").to match(regex) expect("1020/1").to match(regex) expect("1120/2").to matc...
chs6558/chs6558.github.io
node_modules/styled-icons/remix-line/InputMethod/InputMethod.esm.js
export * from '@styled-icons/remix-line/InputMethod';
snazy/mockito
src/main/java/org/mockito/internal/junit/VerificationCollectorImpl.java
/* * Copyright (c) 2016 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockito.internal.junit; import static org.mockito.internal.progress.ThreadSafeMockingProgress.mockingProgress; import org.junit.runner.Description; import org.junit.runners.model.Stateme...
XiongMr/XOJ_Backend
src/main/java/me/xiongxuan/xoj/entity/Problem.java
<reponame>XiongMr/XOJ_Backend<filename>src/main/java/me/xiongxuan/xoj/entity/Problem.java package me.xiongxuan.xoj.entity; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import javax.persistence.*; import java.time.LocalDateTime; import java.util.Objects; /** * * @author XiongXuan * @date 2018/4/25...
safecass/safecass
libs/db/MongoDB.h
<reponame>safecass/safecass<gh_stars>0 //------------------------------------------------------------------------ // // SAFECASS: Safety Architecture For Engineering Computer-Assisted Surgical Systems // // Copyright (C) 2012-2014 <NAME> and <NAME> // //------------------------------------------------------------------...
Therealdomacio/tiktok
core/web/p2p_keys_controller_test.go
package web_test import ( "net/http" "testing" "github.com/libp2p/go-libp2p-core/peer" "github.com/smartcontractkit/chainlink/core/internal/cltest" "github.com/smartcontractkit/chainlink/core/services/offchainreporting" "github.com/smartcontractkit/chainlink/core/store/models/p2pkey" "github.com/smartcontractk...
onezens/QQTweak
qqtw/qqheaders7.2/QQSMItemElementVideo.h
<gh_stars>1-10 // // Generated by class-dump 3.5 (64 bit). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by <NAME>. // #import "QQSMItemElementBase.h" @class NSString, UIImage; @interface QQSMItemElementVideo : QQSMItemElementBase { NSString *_src; NSString *_cover; long long ...
xlasers/spring-modules
spring-boot/spring-boot-basic/convert/src/main/java/com/xlaser4j/demo/config/DateConverter.java
<reponame>xlasers/spring-modules package com.xlaser4j.demo.config; import java.text.SimpleDateFormat; import java.util.Date; import lombok.SneakyThrows; import org.springframework.context.annotation.Configuration; import org.springframework.core.convert.converter.Converter; /** * @package: com.xlaser4j.demo.config ...
diekhans/kent
src/hg/lib/delHinds2.c
/* delHinds2.c was originally generated by the autoSql program, which also * generated delHinds2.h and delHinds2.sql. This module links the database and * the RAM representation of objects. */ /* Copyright (C) 2014 The Regents of the University of California * See README in this or parent directory for licensing...
RichardBradley/scapegoat
src/test/scala/com/sksamuel/scapegoat/inspections/ParameterlessMethodReturnsUnitTest.scala
<gh_stars>0 package com.sksamuel.scapegoat.inspections import com.sksamuel.scapegoat.PluginRunner import org.scalatest.{FreeSpec, Matchers} /** @author <NAME> */ class ParameterlessMethodReturnsUnitTest extends FreeSpec with ASTSugar with Matchers with PluginRunner { override val inspections = Seq(new Parameterles...
alancnet/artifactory
web/angular-web/src/main/webapp/specs/dao/artifact/artifact_views_dao.spec.js
describe('unit test:pom view tab dao', function () { var artifactViewsDao; var RESOURCE; var pomViewTabDataMock = { "view":"pom", "path": "DecodedBase64/DecodedBase64/DecodedBase64/DecodedBase64-DecodedBase64.pom", "repoKey": "ext-releases-local" }; // inject the main modul...
marquinhusgoncalves/js-tdd
es6/5_3-novos-metodos-para-strings.js
<filename>es6/5_3-novos-metodos-para-strings.js let text = '<NAME>'; // Verifica se começa com console.log(text.startsWith('rem', 2)); // Verifica se termina com console.log(text.endsWith('ane', 25)); // Repete a string x vezes console.log('test'.repeat(10)); // Procura se existe em uma string console.log(text.incl...
google-ar/chromium
third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/response-content.js
if (self.importScripts) { importScripts('../resources/fetch-test-helpers.js'); } promise_test(function() { var response = new Response; return response.text() .then(function(text) { assert_equals(text, '', 'response.text() must return an empty string' + ...
pps-lab/fl-analysis
src/data/leaf_loader.py
"""Loads leaf datasets""" import os import numpy as np import pathlib from src.data.leaf.model_utils import read_data def load_leaf_dataset(dataset, use_val_set=False): eval_set = 'test' if not use_val_set else 'val' base_dir = pathlib.Path(__file__).parent.resolve() train_data_dir = os.path.join(ba...
haleyjd/vib
vibconsole/vc2010/jslib/symbolExtension.js
<filename>vibconsole/vc2010/jslib/symbolExtension.js // // Symbol // // Best possible approximation of ECMAScript 6 Symbol type; not perfect, but highly functional. // if(!this.Symbol) { (function (global) { // unique symbol generator var sid = 0; var randStr = function () { return (Utils ? Utils.Ge...
Team-OctOS/host_gerrit
gerrit-gwtui/src/main/java/com/google/gerrit/client/change/Actions.java
<reponame>Team-OctOS/host_gerrit<filename>gerrit-gwtui/src/main/java/com/google/gerrit/client/change/Actions.java // Copyright (C) 2013 The Android Open Source Project // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obt...
IkkiKing/SkillboxDiplom
src/main/java/com/ikkiking/api/response/tag/Tag.java
package com.ikkiking.api.response.tag; import lombok.AllArgsConstructor; import lombok.Data; @Data @AllArgsConstructor public class Tag { private String name; private double weight; }
junedkazi/paper-handlebars
helpers/limit.js
<filename>helpers/limit.js 'use strict'; const _ = require('lodash'); /** * Limit an array to the second argument * * @example * {{limit array 4}} */ const factory = () => { return function(data, limit) { if (_.isString(data)) { return data.substring(0, limit); } if (!_.is...
jdpigeon/dharmadefender
public/js/util.js
/* global */ var Util = {}; (function(){ "use strict"; /** * Generate an Unique ID * @return {string} Unique ID of length 4 */ Util.guid = function(){ function s4() { return Math.floor((1 + Math.random()) * 0x10000) .toString(16) .substring(1); } return s4(); }; })(); modul...