repo_name
stringlengths
6
101
path
stringlengths
4
300
text
stringlengths
7
1.31M
giterio/gitery
internal/views/user.go
package views import ( "context" "net/http" "gitery/internal/prototypes" ) // UserView ... type UserView struct { prototypes.User CreatedAt int64 `json:"createdAt"` UpdatedAt int64 `json:"updatedAt"` } // BuildUserView compose UserView from a User func BuildUserView(user *prototypes.User) UserView { return U...
kungwahcheung/LeetCode
27_remove_element.cc
<filename>27_remove_element.cc #include <vector> #include "util.h" using namespace std; class Solution { public: int removeElement(vector<int>& nums, int val) { int size = 0; for (int i = 0; i < nums.size(); ++i) { if (nums[i] != val) nums[size++] = nums[i]; } return size; } }; int main()...
cjh1/molequeue
molequeue/queues/remotessh.cpp
/****************************************************************************** This source file is part of the MoleQueue project. Copyright 2011-2012 Kitware, Inc. This source code is released under the New BSD License, (the "License"). Unless required by applicable law or agreed to in writing, software ...
yeshodhan/xsd-to-simplexml
src/test/java/com/vast/DeliveryEnum.java
package com.vast; import org.simpleframework.xml.Namespace; import org.simpleframework.xml.Root; @Root(name = "deliveryEnum") @Namespace(reference = "") public enum DeliveryEnum { streaming, progressive; }
GudangHijrah/e-shop
main/sites/all/libraries/easychart/src/js/components/hot.js
<gh_stars>10-100 (function () { //var _ = require('lodash'); var _ = { forEach: require('lodash.foreach'), isEmpty: require('lodash.isempty'), isUndefined: require('lodash.isundefined') }; var h = require('virtual-dom/h'); var createElement = require('virtual-dom/create-el...
LaudateCorpus1/BugTrap
source/Examples/BugTrapLogTest/stdafx.h
// stdafx.h : include file for standard system include files, // or project specific include files that are used frequently, but // are changed infrequently // #pragma once #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers #include <windows.h> #include <process.h> #include <stdio.h> #incl...
importlib/klib
master/core/third/RCF/src/RCF/Token.cpp
<filename>master/core/third/RCF/src/RCF/Token.cpp //***************************************************************************** // RCF - Remote Call Framework // Copyright (c) 2005. All rights reserved. // Developed by <NAME>. // Contact: <EMAIL> . //************************************************************...
rblbank13557/finacle_api
lib/finacle_api/cust_chq_book/response/execute_finacle_script_custom_data.rb
require 'finacle_api/common/serializable_object' module FinacleApi module CustChqBook module ResponseEntity class ExecuteFinacleScriptCustomData < SerializableObject attr_accessor :status, :message, :success_or_failure, :chq_alwd_flg, :error_code, :error_msg, :frez_code, :acc...
Falvyu/JukeAlert
src/main/java/com/untamedears/jukealert/model/actions/abstr/PlayerAction.java
<filename>src/main/java/com/untamedears/jukealert/model/actions/abstr/PlayerAction.java package com.untamedears.jukealert.model.actions.abstr; import java.time.LocalDateTime; import java.time.ZoneOffset; import java.time.format.DateTimeFormatter; import java.util.UUID; import com.untamedears.jukealert.model.Snitch; ...
goghtsui/TouchKey
app/src/main/java/com/gogh/floatkey/ui/PayListBrowserFragment.java
package com.gogh.floatkey.ui; import android.Manifest; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.support.v4.widget.SwipeRefreshLayout; import android.support.v7.widget.LinearLayoutManag...
fjdearcos-amplia/oda
oda-operations/update/src/main/java/es/amplia/oda/operation/update/operations/UpgradeDeploymentElementOperation.java
package es.amplia.oda.operation.update.operations; import es.amplia.oda.operation.update.FileManager; import es.amplia.oda.operation.update.OperationConfirmationProcessor; import static es.amplia.oda.operation.api.OperationUpdate.DeploymentElement; import static es.amplia.oda.operation.update.FileManager.FileExceptio...
kelemen/JTrim
subprojects/jtrim-swing-component/src/test/java/org/jtrim2/swing/component/BasicRenderingArgumentsTest.java
package org.jtrim2.swing.component; import java.awt.Color; import java.awt.Component; import java.awt.Font; import java.util.Arrays; import org.junit.Test; import static org.junit.Assert.*; import static org.mockito.Mockito.*; public class BasicRenderingArgumentsTest { private static Color newColor() { r...
hhhhhaaaa/hearthlibrary
appStart/client/src/components/Col/Col.js
import React from "react"; import PropTypes from "prop-types"; /* This Col component offers us the convenience of being able to set a column's "size" prop instead of its className We can also omit the col- at the start of each Bootstrap column class, e.g. size="md-12" instead of className="col-md-12" */ /** * @pa...
wlbwrx/plushe-jds-admin
src/api/shop.js
<gh_stars>0 import request from '@/utils/request'; // 查询所有的品牌 const platformListData = () =>{ return request({ url: '/gds/shop/conf/all/list', method: 'get', }) } // 品牌配置 const shopListData = (query) =>{ return request({ url: '/gds/shop/page/list', method: 'get', par...
Yoda2798/YodasMod
src/main/java/YodasMod/relics/TwoHeads.java
package YodasMod.relics; import com.megacrit.cardcrawl.actions.common.ApplyPowerAction; import com.megacrit.cardcrawl.actions.common.RelicAboveCreatureAction; import com.megacrit.cardcrawl.actions.utility.UseCardAction; import com.megacrit.cardcrawl.cards.AbstractCard; import com.megacrit.cardcrawl.cards.CardQueueItem...
sungloow/PetAdoption
src/main/java/com/sunhongbing/petadoption/forestage/controller/AboutUsController.java
<reponame>sungloow/PetAdoption package com.sunhongbing.petadoption.forestage.controller; import com.sunhongbing.petadoption.backstage.entity.Article; import com.sunhongbing.petadoption.backstage.entity.User; import com.sunhongbing.petadoption.backstage.enums.ArticleType; import com.sunhongbing.petadoption.backstage.re...
MovieCast/moviecast-android
base/src/main/java/io/moviecast/base/providers/response/models/ListResponse.java
/* * Copyright (c) MovieCast and it's contributors. All rights reserved. * Licensed under the MIT License. See LICENSE in the project root for license information. */ package io.moviecast.base.providers.response.models; import com.google.gson.annotations.SerializedName; import java.util.ArrayList; import java.uti...
rreusser/rreusser.github.io
src/src/iterative-closest-point/draw-background.js
const glsl = require('glslify'); module.exports = function (regl) { return regl({ vert: ` precision highp float; attribute vec2 aUv; varying vec2 vXy; void main () { vXy = aUv; gl_Position = vec4(aUv, 0, 1); } `, frag: glsl` #extension GL_OES_standard_d...
chromium/chromium
chrome/browser/ash/policy/reporting/metrics_reporting/usb/usb_events_observer.cc
<reponame>chromium/chromium // Copyright 2021 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/ash/policy/reporting/metrics_reporting/usb/usb_events_observer.h" #include "chromeos/services/cros_he...
ppadmavilasom/claircore
internal/vulnstore/vulnerability.go
package vulnstore import ( "context" "github.com/quay/claircore" "github.com/quay/claircore/libvuln/driver" ) // GetOpts provides instructions on how to // match your packages to vulnerabilities. type GetOpts struct { // Matchers tells the Get() method to limit the returned vulnerabilities by the provided MatchC...
lechium/tvOS124Headers
Applications/PineBoard/FBSApplicationDataStoreObserver-Protocol.h
// // Generated by class-dump 3.5 (64 bit). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by <NAME>. // #import "NSObject.h" @class FBSApplicationDataStoreMonitor, NSString; @protocol FBSApplicationDataStoreObserver <NSObject> @optional - (void)dataStoreMonitor:(FBSApplicationDataStoreMo...
shisa/kame-shisa
netbsd/sys/arch/i386/i386/db_interface.c
/* $NetBSD: db_interface.c,v 1.35 2002/05/14 02:58:35 matt Exp $ */ /* * Mach Operating System * Copyright (c) 1991,1990 Carnegie Mellon University * All Rights Reserved. * * Permission to use, copy, modify and distribute this software and its * documentation is hereby granted, provided that both the copyright...
consorzio-rfx/mdsplus
tdishr/TdiGetArgs.c
<filename>tdishr/TdiGetArgs.c /* Copyright (c) 2017, Massachusetts Institute of Technology All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright ...
kongnir/hig
packages/react/src/adapters/ContainerViewLeftAdapter.js
import React, { Component } from "react"; import PropTypes from "prop-types"; import { ContainerViewLeft as ContainerViewLeftVanilla } from "hig-vanilla"; import HIGAdapter, { MapsPropToMethod, MountsAnyChild } from "./HIGAdapter"; export default class ContainerViewLeftAdapter extends Component { render() { retu...
hanhansoul/hadoop-with-comments
hadoop-tools/hadoop-streaming/src/main/java/org/apache/hadoop/streaming/io/RawBytesInputWriter.java
<filename>hadoop-tools/hadoop-streaming/src/main/java/org/apache/hadoop/streaming/io/RawBytesInputWriter.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 ...
mip2012/vue-layui
src/components/admin/index.js
<reponame>mip2012/vue-layui<gh_stars>100-1000 /** * kouchao 创建于 */ import LayAdmin from './src/admin'; /* istanbul ignore next */ LayAdmin.install = function (Vue) { Vue.component(LayAdmin.name, LayAdmin); }; export default LayAdmin;
drhaz/VisualFitsBrowser
src/main/java/org/cowjumping/FitsUtils/RadialProfile.java
package org.cowjumping.FitsUtils; import java.awt.Rectangle; public class RadialProfile { public float[] radius = null; public float[] value = null; public float[] error = null; double xcenter = 0; double ycenter = 0; int minx; int maxx; int miny; int maxy; public RadialProfile(double xcenter,...
fabionunesdeparis/Fundamentos-em-python3
exer107/principal.py
# @<NAME> - 30.06.20 from exer107 import moeda while True: valor = str(input('Digite o preço: R$')) if valor.isnumeric(): valor = float(valor) moeda.metade(valor) moeda.dobro(valor) moeda.aumentar(valor) moeda.diminuir(valor) break else: print('Digite ...
C-Mierez/Web3-Solidity
Web3/Brownie_NFTs/scripts/advanced_collectible/create_collectible.py
<filename>Web3/Brownie_NFTs/scripts/advanced_collectible/create_collectible.py from scripts.utils import ( get_account, OPENSEA_URL, ) from brownie import AdvancedCollectible def create_collectible(): account = get_account() advanced_collectible = AdvancedCollectible[-1] tx = advanced_collectible...
anyone-oslo/pages
app/views/admin/images/show.json.jbuilder
<reponame>anyone-oslo/pages<filename>app/views/admin/images/show.json.jbuilder # frozen_string_literal: true json.extract!( @image, :id, :filename, :content_type, :content_hash, :content_length, :colorspace, :real_width, :real_height, :crop_width, :crop_height, :crop_start_x, :crop_start_y, :crop_gravity_x, :c...
cyyever/DALI
docs/examples/use_cases/video_superres/common/loss_scaler.py
<gh_stars>1000+ import torch class LossScaler: def __init__(self, scale=1): self.cur_scale = scale # `params` is a list / generator of torch.Variable def has_overflow(self, params): return False # `x` is a torch.Tensor def _has_inf_or_nan(x): return False # `overflow...
shmilee/gdpy3
src/loaders/tests/test_tarraw.py
# -*- coding: utf-8 -*- # Copyright (c) 2018-2020 shmilee import os import unittest import tempfile import tarfile TARFILE = os.path.join(os.path.dirname(__file__), 'raw.tar.gz') @unittest.skipUnless(tarfile.is_tarfile(TARFILE), "'%s' is not a tar archive!" % TARFILE) class TestTarRawLoader(un...
fengjiachun/byte-buddy
byte-buddy-dep/src/test/java/net/bytebuddy/dynamic/scaffold/FieldRegistryCompiledNoOpTest.java
package net.bytebuddy.dynamic.scaffold; import net.bytebuddy.description.field.FieldDescription; import net.bytebuddy.implementation.attribute.AnnotationAppender; import net.bytebuddy.implementation.attribute.FieldAttributeAppender; import net.bytebuddy.test.utility.MockitoRule; import net.bytebuddy.test.utility.Objec...
factcenter/inchworm
src/test/java/org/factcenter/inchworm/ops/dummy/DummyRolOpTest.java
<filename>src/test/java/org/factcenter/inchworm/ops/dummy/DummyRolOpTest.java package org.factcenter.inchworm.ops.dummy; import org.factcenter.inchworm.ops.GenericOpTest; import org.factcenter.inchworm.ops.OpAction; import org.factcenter.inchworm.ops.OpDefaults; import org.factcenter.inchworm.ops.RolOpTest; /** * Cr...
allnes/pp_2022_spring
modules/task_1/lakhov_k_trapezoidal_rule/trapezoidal_rule.h
<reponame>allnes/pp_2022_spring // Copyright 2022 <NAME> #ifndef MODULES_TASK_1_LAKHOV_K_TRAPEZOIDAL_RULE_TRAPEZOIDAL_RULE_H_ #define MODULES_TASK_1_LAKHOV_K_TRAPEZOIDAL_RULE_TRAPEZOIDAL_RULE_H_ #include <vector> #include <functional> #include <utility> double _trapezoidalRule(std::function<double(std::vector<double>)...
XtakeFinance/website
app/src/Components/HowtoStakeComponent.js
import React from "react"; import {appColor, secondaryTextColor} from "../AppConstants"; import Title from "antd/lib/typography/Title"; import {Link} from "@mui/material"; export const HowtoStakeComponent = () => { return ( <div style={{textAlign: "center", padding:"3% 10% 2% 10%"}}> <h4 styl...
bengfarrell/material
src/spectrum/components/button/multiStops/dark.js
export default { css() { return ` /* generated from dna-version: 5.3.0 */ /* generated from dna-version: 5.3.0 */ /* Temporary skin variables that need to be moved into origins */ :root { /* Icon Button*/ /* Button */ /* Shell */ /* haha remove this */ /* Custom selection color for placeholde...
ScoutRFP/ag-grid
enterprise-modules/charts/dist/cjs/charts/util/number.js
<reponame>ScoutRFP/ag-grid<gh_stars>1-10 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function isEqual(a, b, epsilon) { if (epsilon === void 0) { epsilon = 1e-10; } return Math.abs(a - b) < epsilon; } exports.isEqual = isEqual; /** * `Number.toFixed(n)` always formats a number s...
KillianG/R-Type
Client/OptionsMenu/OptionsMenu.hpp
<reponame>KillianG/R-Type // // Created by NANAA on 12/11/18. // #ifndef R_TYPE_OPTIONSMENU_HPP #define R_TYPE_OPTIONSMENU_HPP #include <Client/MainMenu/Settings.hpp> #include "libs/EventManager/Receiver.hpp" #include <unordered_map> #include <Client/MainMenu/Button.hpp> class OptionsMenu : public Receiver<OptionsMe...
patrickduc/OOP-training
examples/Formes/src/formes/Rectangle.java
<reponame>patrickduc/OOP-training /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package formes; /** * * @author duc */ public class Rectangle extends FormeGeometrique { floa...
jwmount/t365
db/migrate/20190301191720_create_engagements.rb
class CreateEngagements < ActiveRecord::Migration[5.2] def change create_table :engagements do |t| t.integer :schedule_id t.integer :person_id t.integer :docket_id t.string :docket_number t.boolean :onsite_now t.boolean :onsite_at t.boolean :breakdown t.boolean :no_...
ifge-token/Waves
lang/tests/src/test/scala/com/wavesplatform/lang/v1/estimator/CommonScriptEstimatorTest.scala
package com.wavesplatform.lang.v1.estimator import com.wavesplatform.lang.directives.values.V3 import com.wavesplatform.lang.utils.functionCosts import com.wavesplatform.lang.v1.FunctionHeader import com.wavesplatform.lang.v1.FunctionHeader.{Native, User} import com.wavesplatform.lang.v1.compiler.Terms._ import com.wa...
yeojhenrie/React
src/main/java/com/volmit/react/command/CommandRevoke.java
<filename>src/main/java/com/volmit/react/command/CommandRevoke.java<gh_stars>1-10 package com.volmit.react.command; import java.util.List; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import com.volmit.react.Config; import com.volmit.react.Gate; import ...
wongmjane/lfi
src/filter.js
<reponame>wongmjane/lfi /** * Copyright 2021 Google LLC * * 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...
avidsapp/gatsby-woocommerce-themes
packages/gatsby-woocommerce-theme/src/components/icons/search-icon.js
import React from 'react'; export const SearchIcon = () => ( <svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="15pt" viewBox="0 0 512.005 512.005" className="search-icon" > <g> <g> <path fill="#ccc" d="M505.749,475.587l-145.6-145.6c28.203-34.837...
ossimlabs/ossim-gui
src/ossimGui/ProgressDialog.cpp
//--- // // License: See top level LICENSE.txt file. // // Description: Description: Dialog box for ProgressWidget. // //--- // $Id$ #include <ossimGui/ProgressDialog.h> #include <ossimGui/ProgressWidget.h> #include <ossim/base/ossimTrace.h> #include <QVBoxLayout> #include <QWidget> #include <cstring> #include <io...
isabella232/parsec-client-go
parsec/keytype.go
<reponame>isabella232/parsec-client-go // Copyright 2021 Contributors to the Parsec project. // SPDX-License-Identifier: Apache-2.0 package parsec import "github.com/parallaxsecond/parsec-client-go/interface/operations/psakeyattributes" type KeyTypeFactory interface { RawData() *KeyType Hmac() *KeyType Derive() *...
escray/NodeJSPractice
demo/resDemo.js
<gh_stars>0 var express = require('express'); var app = express(); app.get('/', function(req, res) { console.log(res.headersSent); res.send("OK"); console.log(res.headersSent); }); app.get('/file/:name', function(req, res, next) { var options = { root: __dirname + '/public/', dotfiles: 'deny', he...
pm-deepak-dhage/prebid-server-java
src/main/java/org/prebid/server/bidder/Bidder.java
<filename>src/main/java/org/prebid/server/bidder/Bidder.java package org.prebid.server.bidder; import com.fasterxml.jackson.databind.node.ObjectNode; import com.iab.openrtb.request.BidRequest; import org.prebid.server.bidder.model.BidderBid; import org.prebid.server.bidder.model.HttpCall; import org.prebid.server.bidd...
vandreas19/POJ_sol
2161/2185845_AC_15MS_956K.cpp
#include<iostream.h> #include<string.h> struct Node { int iChildNum,iStack,iBegin; Node* pnChild[9]; } nRoot; char cLine[10001]; void Read(Node* pnRoot,int& iPos) { int i,j,iTemp; if(cLine[iPos]=='a') { pnRoot->iChildNum=pnRoot->iBegin=0; pnRoot->iStack=1; } else { pnRoot->iChildNum=...
guillaumewibaux/AER-PGROU
app/controllers/admin/AssignerExpert.java
<reponame>guillaumewibaux/AER-PGROU<filename>app/controllers/admin/AssignerExpert.java /********************************************************************************* * * Copyright 2014 BOUSSEJRA <NAME>, <NAME>, <NAME> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use ...
neelimabhukya/readypolicy-ui
src/ToggleSwitch.js
<gh_stars>1-10 /** * ToggleSwitch.js * Copyright: Microsoft 2017 * * A simple toggle control built in ReactXP that allows users to * pick between two values. */ import React from 'react'; import RX from 'reactxp'; const _knobLeftOff = 2; // In pixels const _knobLeftOn = 22; // In pixels const _animationDuratio...
RabbitPo/TabooLib
src/main/scala/io/izzel/taboolib/util/chat/SelectorComponentSerializer.java
package io.izzel.taboolib.util.chat; import com.google.gson.*; import java.lang.reflect.Type; public class SelectorComponentSerializer extends BaseComponentSerializer implements JsonSerializer<SelectorComponent>, JsonDeserializer<SelectorComponent> { @Override public SelectorComponent deserialize(JsonElemen...
ManuelDeLeon/viewmodel-react-docs
src/imports/ReactDocumentation/Bindings/Repeat/ColorPosition/ColorPosition.js
ColorPosition({ position: 0, rgb: '', name: '', render() { <label b="text: position + ':' + name + ' ', style: { color: rgb }"></label> } });
nuxodin/vanilla-cms
m/cms.backend.module/pub/main.js
/* Copyright (c) 2016 <NAME> https://goo.gl/gl0mbf | MIT License https://goo.gl/HgajeK */ cms.initCont('cms.backend.module',function(el) { const pid = cms.el.pid(el); const searchInp = document.getElementById('searchForm'); const search = function(){ const search = this.elements.search.value; ...
bilwa496/Placement-Preparation
Leetcode Solution/Tree/Medium/113. Path Sum II.cpp
<filename>Leetcode Solution/Tree/Medium/113. Path Sum II.cpp /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * ...
Golang-Coach/client
src/components/content/index.js
/** ** Created by <NAME> on 12/18/2017. * */ // @flow import Grid from 'material-ui/Grid'; import { withStyles } from 'material-ui/styles'; import PropTypes from 'prop-types'; import React, { PureComponent } from 'react'; import GitContent from './gitcontent'; import Packages from './packages'; import Overlay from '...
mpsitech/idec_public
ideccmbd/CrdIdecUsr/PnlIdecUsr1NSession.h
<gh_stars>0 /** * \file PnlIdecUsr1NSession.h * job handler for job PnlIdecUsr1NSession (declarations) * \author <NAME> * \date created: 30 Dec 2017 * \date modified: 30 Dec 2017 */ #ifndef PNLIDECUSR1NSESSION_H #define PNLIDECUSR1NSESSION_H // IP custInclude --- INSERT #include "QryIdecUsr1NSession.h" ...
ramsrib/javaee7-samples
jaxrs/interceptor/src/main/java/org/javaee7/jaxrs/interceptor/MyClientWriterInterceptor.java
<gh_stars>1-10 package org.javaee7.jaxrs.interceptor; import java.io.ByteArrayOutputStream; import java.io.FilterOutputStream; import java.io.IOException; import java.io.OutputStream; import javax.ws.rs.WebApplicationException; import javax.ws.rs.ext.WriterInterceptor; import javax.ws.rs.ext.WriterInterceptorContext; ...
difonz/Immunizationtario
Capstone/app/src/main/java/ca/georgebrown/comp2074/capstone2/SchoolProfileActivity.java
package ca.georgebrown.comp2074.capstone2; import androidx.appcompat.app.AppCompatActivity; import androidx.lifecycle.ViewModelProvider; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.net.Uri; import android.os.Bundle; import android.provider.Me...
NeolithEra/WavesGatewayFramework
waves_gateway/storage/polling_state_storage_proxy.py
<reponame>NeolithEra/WavesGatewayFramework<gh_stars>10-100 """PollingStateStorageProxy""" from abc import ABC, abstractmethod from waves_gateway.model import PollingState class PollingStateStorageProxy(ABC): """Offers access to the current polling_state.""" @abstractmethod def get_polling_state(self) ->...
murgle2/website
server/src/models/db/map-zone.js
<filename>server/src/models/db/map-zone.js 'use strict'; module.exports = (sequelize, type) => { return sequelize.define('mapZone', { zoneNum: type.TINYINT.UNSIGNED, }, { indexes: [ { fields: ['zoneNum'] } ] }) };
fxbin/personal-growth
code-modules/basic-knowledge/src/main/java/cn/fxbin/record/basic/jmh/JMHExample04.java
package cn.fxbin.record.basic.jmh; import org.openjdk.jmh.annotations.*; import org.openjdk.jmh.runner.Runner; import org.openjdk.jmh.runner.RunnerException; import org.openjdk.jmh.runner.options.Options; import org.openjdk.jmh.runner.options.OptionsBuilder; import java.util.concurrent.TimeUnit; /** * JMHExample04 ...
DominicWindisch/mqtt-io
mqtt_io/tests/features/steps/module_gpio.py
import asyncio from typing import Any from behave import given, then, when # type: ignore from behave.api.async_step import async_run_until_complete # type: ignore from mqtt_io.modules.gpio import InterruptEdge, PinDirection from mqtt_io.server import MqttIo # pylint: disable=function-redefined,protected-access #...
UnicornRaceEngineering/g5-nodes
nodes/SteeringNode/shiftlight.h
/* The MIT License (MIT) Copyright (c) 2015 UnicornRaceEngineering 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 to use, copy, modif...
mukaer/clipss
app/clipss/timediff.rb
# Clipss module Clipss # TimeDiff module TimeDiff attr_accessor :time_hash def now(key) @time_hash ||= Hash.new(0) tm = Time.now @time_hash[key] = milisec(tm) end def df(start, finish) @time_hash[finish] - @time_hash[start] end def milisec(tm) (tm.to_i * 1000...
romanha/elasticsearch-status-monitor
src/test/java/app/habitzl/elasticsearch/status/monitor/tool/configuration/DefaultConfigurationLoaderTest.java
package app.habitzl.elasticsearch.status.monitor.tool.configuration; import app.habitzl.elasticsearch.status.monitor.AnalysisStartOption; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.condition.EnabledOnOs; import org.junit.jupiter.api.condition.OS; import org...
Amourspirit/ooo_uno_tmpl
ooobuild/lo/ucb/open_command_argument3.py
# coding: utf-8 # # Copyright 2022 :Barry-Thomas-Paul: Moss # # 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 applicab...
elucash/nextgen
io/codec/src/io/immutables/codec/Resolver.java
package io.immutables.codec; import com.google.common.collect.HashBasedTable; import com.google.common.collect.Ordering; import com.google.common.collect.Table; import com.google.common.reflect.TypeToken; import io.immutables.Nullable; import java.io.IOException; import java.lang.annotation.Annotation; import java.lan...
tydhot/arana
pkg/config/config.go
// // Licensed to 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. Apache Software Foundation (ASF) licenses this file to you under // the Apache License, Version 2.0 (the ...
mfkiwl/ICE
3rdparty/GPSTk/ext/lib/Vdraw/BasicShape.hpp
<reponame>mfkiwl/ICE //============================================================================ // // This file is part of GPSTk, the GPS Toolkit. // // The GPSTk is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published // by the Free So...
getsproud/react-app
src/components/dashboard/project/ProjectDescriptionForm.js
<gh_stars>0 import { useState } from 'react'; import PropTypes from 'prop-types'; import { Box, Button, Card, FormHelperText, Paper, Typography } from '@material-ui/core'; import QuillEditor from '../../QuillEditor'; const ProjectDescriptionForm = (props) => { const { onBack, onComplete, ...other } = props; const ...
aiw-google/openweave-core
src/adaptations/device-layer/include/Weave/DeviceLayer/internal/testing/GroupKeyStoreUnitTest.h
<gh_stars>100-1000 /* * * Copyright (c) 2018 <NAME>, 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/licen...
Bhaskers-Blu-Org2/SpectrumDBClient
libs/string-buffer/string_buffer.c
/* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License. */ #include "string_buffer.h" #include <stdlib.h> #include <string.h> StrBuf *strbuf_alloc() { StrBuf *buf = malloc(sizeof(StrBuf)); if (!buf) return NULL; int initial_size = 32; buf->data ...
jackyruslymoonlay/dl-models
src/garment-purchasing/purchase-order-validator.js
require("should"); var validatePurchaseOrderItem = require('./purchase-order-item-validator'); var validateBuyer = require('../master/buyer-validator'); module.exports = function (data) { data.should.not.equal(null); data.should.instanceOf(Object); data.should.have.property('no'); data.no.should.be.St...
HoussemNasri/Logisim-Dark
src/logisim_src/gui/menu/MenuItem.java
<filename>src/logisim_src/gui/menu/MenuItem.java<gh_stars>1-10 /* Copyright (c) 2010, <NAME>. License information is located in the * logisim_src.Main source code and at www.cburch.com/logisim/. */ package logisim_src.gui.menu; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; interface MenuI...
yuchengs/viennacl-dev
libviennacl/src/blas1_opencl.cpp
/* ========================================================================= Copyright (c) 2010-2014, Institute for Microelectronics, Institute for Analysis and Scientific Computing, TU Wien. Portions of this software are copyright by UChicago Argonne, LLC. ...
rkprajapat/construction-crm
pdi/apps.py
from django.apps import AppConfig class PdiConfig(AppConfig): name = 'pdi'
JoshYaxley/Pineapple
Demo/SpaceRocks/Rock.h
#pragma once #include <Pineapple/Pineapple.h> #include <random> #include "Resource.h" #include "Warp.h" class Rock : public Warp, private pa::EnableChildList<Rock> { public: float m_rotation; Rock(pa::World& world); void onCreate() override; void onStep(pa::Time deltaTime) override; void onDestroy() override;...
du-wei/lemon
src/main/java/com/mossle/user/service/AccountLogService.java
<reponame>du-wei/lemon package com.mossle.user.service; import java.util.List; import javax.annotation.Resource; import com.mossle.api.user.AccountAliasConverter; import com.mossle.api.user.AccountLogDTO; import com.mossle.api.user.AccountStatus; import com.mossle.api.user.ApplicationAliasConverter; import com.mossl...
airfranceklm/masherylocal-adapters
ml-sdk-mock/src/main/java/com/airfranceklm/amt/testsupport/MasheryProcessorTestSupport.java
package com.airfranceklm.amt.testsupport; import com.airfranceklm.amt.testsupport.mocks.CacheImpl; import com.airfranceklm.amt.testsupport.mocks.DebugContextImpl; import com.airfranceklm.amt.testsupport.mocks.HTTPServerResponseImpl; import com.airfranceklm.amt.testsupport.mocks.TrafficManagerResponseImpl; import com.f...
jeongjoonyoo/CodeXL
CodeXL/Remote/AMDTRemoteAgent/dmnServerThreadConfig.cpp
//================================================================================== // Copyright (c) 2016 , Advanced Micro Devices, Inc. All rights reserved. // /// \author AMD Developer Tools Team /// \file dmnServerThreadConfig.cpp /// //==============================================================================...
mihaitodor/SeComLib
private_recommendations_data_packing/secure_comparison_server.cpp
/* SeComLib Copyright 2012-2013 TU Delft, Information Security & Privacy Lab (http://isplab.tudelft.nl/) Contributors: <NAME> (<EMAIL>) <NAME> (<EMAIL>) <NAME> (<EMAIL>) <NAME> (<EMAIL>) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the ...
skrobul/salt
salt/modules/lxc.py
<filename>salt/modules/lxc.py<gh_stars>0 # -*- coding: utf-8 -*- ''' Control Linux Containers via Salt :depends: lxc package for distribution lxc >= 1.0 (even beta alpha) is required ''' # Import python libs from __future__ import print_function import traceback import datetime import pipes import logging import te...
liquicode/lib-mrpc
src/ServiceClient.js
'use strict'; //--------------------------------------------------------------------- function ServiceClient() { return { //--------------------------------------------------------------------- Services: {}, //--------------------------------------------------------------------- ConnectService: functio...
typemeta/funcj
codec2/core/src/main/java/org/typemeta/funcj/codec2/core/CodecCore.java
<filename>codec2/core/src/main/java/org/typemeta/funcj/codec2/core/CodecCore.java package org.typemeta.funcj.codec2.core; public interface CodecCore<IN, OUT> extends EncoderCore<OUT>, DecoderCore<IN> { CodecFormat<IN, OUT> format(); CodecConfig config(); <T> Codec<T, IN, OUT> getCodec(Class<T> type); }
smunir/pack-backend-jpa
src/main/resources/celerio/pack-backend-jpa/src/main/java/jaxio/commons/ByRangeUtil.p.vm.java
<reponame>smunir/pack-backend-jpa $output.java($JaxioCommons, "ByRangeUtil")## $output.require("javax.inject.Inject")## $output.require("javax.inject.Named")## $output.require("javax.inject.Singleton")## $output.require("javax.persistence.criteria.CriteriaBuilder")## $output.require("javax.persistence.criteria.Path")#...
containers/podman-tui
pdcs/images/save.go
<reponame>containers/podman-tui package images import ( "os" "github.com/containers/podman-tui/pdcs/registry" "github.com/containers/podman/v4/pkg/bindings/images" "github.com/containers/podman/v4/pkg/channel" "github.com/containers/podman/v4/pkg/errorhandling" "github.com/pkg/errors" "github.com/rs/zerolog/lo...
lucaskurata/FIAP_Full_Stack_Java_Xpert
Modulo_Integracao_Web/webshift/src/main/java/br/com/fiap/webshift/controller/MarcaController.java
<gh_stars>0 package br.com.fiap.webshift.controller; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.GetMapping; import org.s...
kinow83/soso
wifimon/docs/html/search/functions_2.js
<gh_stars>1-10 var searchData= [ ['component80211_2240',['Component80211',['../classsoso_1_1Component80211.html#a829b03457e6f0d9fe42cf4c86f0339ad',1,'soso::Component80211']]], ['componentsession_2241',['ComponentSession',['../classsoso_1_1ComponentSession.html#a67b2860ae7521b44cb09dce245d748ef',1,'soso::ComponentSe...
yokwe/yokwe-root
yokwe-stock-jp/src/main/java/yokwe/stock/jp/Storage.java
<reponame>yokwe/yokwe-root package yokwe.stock.jp; public final class Storage { public static final String PATH_BASE = "/mnt/stock/jp"; public static String getPath(String path) { return String.format("%s/%s", PATH_BASE, path); } public static String getPath(String prefix, String path) { return getPath(Str...
darylnak/ucdavis-work
UCD/ecs60_40/ecs60/p2/p2-me/LeafNode.cpp
#include <iostream> #include <cmath> #include "LeafNode.h" #include "InternalNode.h" #include "QueueAr.h" using namespace std; LeafNode::LeafNode(int LSize, InternalNode *p, BTreeNode *left, BTreeNode *right) : BTreeNode(LSize, p, left, right) { values = new int[LSize]; } // LeafNode() void LeafNode::adopt(BTr...
msldxy/LeetCodePractice
problem/Easy/485.MaxConsecutiveOnes/Solution.java
<filename>problem/Easy/485.MaxConsecutiveOnes/Solution.java<gh_stars>0 /* 创建一个新数组,遍历原数组,判断是1还是0 */ class Solution { public int findMaxConsecutiveOnes(int[] nums) { int index = 0; int[] res = new int[nums.length]; for(int i = 0; i < nums.length; i++){ //如果是1,对应index数加一 ...
trifonnt/jhipster--great-big-example-application
src/test/java/org/exampleapps/greatbig/web/rest/MessageResourceIntTest.java
<reponame>trifonnt/jhipster--great-big-example-application<filename>src/test/java/org/exampleapps/greatbig/web/rest/MessageResourceIntTest.java package org.exampleapps.greatbig.web.rest; import org.exampleapps.greatbig.GreatBigExampleApplicationApp; import org.exampleapps.greatbig.domain.Message; import org.exampleap...
ReyderOlarte/Fintech_AutoStock
src/com/autoStock/quote/QuoteEntry.java
/** * */ package com.autoStock.quote; import java.util.Date; /** * @author <NAME> * */ public class QuoteEntry { public long id; public String symbol; public float priceOpen; public float priceHigh; public float priceLow; public float priceClose; public int sizeVolume; public Date dateTime; public Qu...
Worthington-Robotics/2020RobotCode
RobotCode/src/main/java/frc/robot/actions/colorwheelactions/LightsStateTest.java
<filename>RobotCode/src/main/java/frc/robot/actions/colorwheelactions/LightsStateTest.java package frc.robot.actions.colorwheelactions; import frc.lib.statemachine.Action; import frc.robot.subsystems.Lights; public class LightsStateTest extends Action { private int state = 0; public LightsStateTest(int state...
hfsugar/hetu-core
presto-orc/src/main/java/io/prestosql/orc/OrcCacheStore.java
<filename>presto-orc/src/main/java/io/prestosql/orc/OrcCacheStore.java /* * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. 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 ...
junkhp/esuites_database_modification
esuits/samples/newsapi_sample/views.py
from esuits.esuits_utils.newsapi import newsapi from django.shortcuts import render from .forms import NewsAPIForm from django.http.response import JsonResponse def newsapi_sample(request): name = request.GET.get('name','') if name: news_list = newsapi.get_news(name) return JsonResponse({"news...
xinyufei/Quantum-Control-qutip
tools/circuitutil.py
<reponame>xinyufei/Quantum-Control-qutip<gh_stars>1-10 """ circuitutil.py - A module for extending Qiskit circuit functionality. """ import numpy as np import pickle from qiskit import Aer, BasicAer, QuantumCircuit, QuantumRegister, execute, assemble from qiskit.extensions import * from qiskit.compiler import transpil...
a1russell/rethink-scala
core/src/main/scala/com/rethinkscala/reflect/RethinkDateTimeSerializer.scala
package com.rethinkscala.reflect import com.fasterxml.jackson.core.JsonGenerator import com.fasterxml.jackson.databind.SerializerProvider import com.fasterxml.jackson.databind.ser.std.StdSerializer import com.rethinkscala.ast.Expr import org.joda.time.{ReadableInstant, DateTime} import org.joda.time.format.ISODateTime...