repo_name
stringlengths
6
101
path
stringlengths
4
300
text
stringlengths
7
1.31M
foreverForCode/openresty
app/njs/controller/flagship.js
var ParHref = jems.parsURL(); $(function(){ // 图片滚动 jeSlide({ mainCell: "#flagshipslider", navCell: ".hd ul", conCell: ".bd ul", effect: "leftLoop", duration: 4, // switchCell: ".datapic", sLoad: "data-pic", isTouch:true, showNav: t...
digithun/jamplay-nap
scripts/seeds/seed-generator/book.js
<filename>scripts/seeds/seed-generator/book.js const casual = require('casual') const _ = require('lodash') const { writeSeed, loadSeedId, cover, preview, genArray } = require('../helpers') const sequential = require('promise-sequential') module.exports = async function generate () { const authorIds = loadSeedId('...
01shadowalker01/code-challenges
leetcode/numbers/number-complement.js
/** * Problem link: * https://leetcode.com/problems/number-complement/ * * @param {number} num * @return {number} */ var findComplement = function (num) { const binaryStr = toBinary(num); const binaryArray = binaryStr.split("").map((bit) => Number(bit)); const complement = binaryArray.map((bit) => (bit ? 0 ...
daneryl/uwazi
app/api/evidences_vault/vault.js
<filename>app/api/evidences_vault/vault.js import 'isomorphic-fetch'; import { URLSearchParams } from 'url'; import request from 'shared/JSONRequest'; import { fileFromReadStream } from 'api/files/filesystem'; import evidencePackage from './evidencePackage'; import vaultEvidencesModel from './vaultEvidencesModel'; co...
FusionBox2/MAF2
Core/mafNodeFactory.h
<filename>Core/mafNodeFactory.h /*========================================================================= Program: MAF2 Module: mafNodeFactory Authors: <NAME> Copyright (c) B3C All rights reserved. See Copyright.txt or http://www.scsitaly.com/Copyright.htm for details. This software is distributed WITHOUT ...
sepehr-laal/nofx
nofx/nofx_ofTextureData/nofx_ofTextureData.cc
#include "nofx_ofTextureData.h" #include "..\nofx\nofx_types.h" namespace nofx { namespace ClassWrappers { using node::ObjectWrap; Persistent<Function> OfTextureDataWrap::constructor; //-------------------------------------------------------------- NAN_METHOD(OfTextureDataWrap::New) { NanScope(); i...
sathishms77/test
common/utils/dockerhelpers.py
# # Copyright 2017 the original author or authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
adantra/mfem
tests/unit/fem/test_calccurlshape.cpp
// Copyright (c) 2010-2022, Lawrence Livermore National Security, LLC. Produced // at the Lawrence Livermore National Laboratory. All Rights reserved. See files // LICENSE and NOTICE for details. LLNL-CODE-806117. // // This file is part of the MFEM library. For more information and source code // availability visit ht...
luiscarlosgph/nas
static/rompr/ui/playlist.js
<filename>static/rompr/ui/playlist.js function Playlist() { var self = this; var tracklist = []; var currentalbum = -1; this.currentTrack = null; var finaltrack = -1; this.rolledup = []; var updatecounter = 0; var do_delayed_update = false; var scrollto = -1; var updateErrorFlag...
lcxw/umail
umail-api/src/main/java/org/edu/mail/api/domain/Contact.java
<reponame>lcxw/umail package org.edu.mail.api.domain; public class Contact { private String name; private String email; private String movephone; private String company; private String workphone; private String remark; public String getUserId() { return userId; } publ...
auntaru/artemis-demo
artemis-demo-java-se/graph-neo4j/src/main/java/org/jnosql/artemis/demo/se/TravelApp.java
/* * Copyright (c) 2017 <NAME> and others * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * and Apache License v2.0 which accompanies this distribution. * The Eclipse Public License is available at http://www.eclipse.org/leg...
jiefzz/EJoker
ejoker-core/src/main/java/pro/jiefzz/ejoker/infrastructure/impl/AbstractMessageHandler.java
package pro.jiefzz.ejoker.infrastructure.impl; import java.util.concurrent.Future; import pro.jiefzz.ejoker.common.system.task.AsyncTaskResult; import pro.jiefzz.ejoker.messaging.IMessage; import pro.jiefzz.ejoker.messaging.IMessageHandler; public abstract class AbstractMessageHandler implements IMessageHandler { ...
waterlili/laravel_flower
resources/assets/js/NGAc.js
<reponame>waterlili/laravel_flower app.directive('useAc', function ($http) { function link(s, elm, attrs) { if (!s.n) { s.n = {}; } if (!s.o) { s.o = {} } s.o.querySearch = function ($search) { var _export = {textSearch: $search}; ...
amaankhan02/SelfDrivingCar
RaspberryPi/Autonomous/SoloRPi3_Method/Commands.py
<filename>RaspberryPi/Autonomous/SoloRPi3_Method/Commands.py from enum import Enum; class Commands(Enum): #TODO: Right sql script to change all cmds with len 7 to len 4, must find an efficient way to change these NO_CMD = [0,0,0,0] LEFT = [1,0,0,0] #left forward RIGHT = [0,1,0,0] #right forward FOR...
pwn1/csplib
internal/scripts/support/add_preview_link_to_pr.py
<reponame>pwn1/csplib #!/usr/bin/env python3 # -*- coding: utf-8 -*- # Add build url to pull request from github3 import login import os import sys token=os.getenv('CSPLIB_ROBOT_TOKEN') gh = login(token=token) if not gh: print("error logging in") sys.exit(3) issue_num=os.getenv('TRAVIS_PULL_REQUEST') place="PR-{}"...
tienph91/Aspose.Slides-for-Java
Examples/src/main/java/com/aspose/slides/examples/tables/TableFromScratch.java
package com.aspose.slides.examples.tables; import com.aspose.slides.*; import com.aspose.slides.examples.RunExamples; public class TableFromScratch { public static void main(String[] args) { //ExStart:TableFromScratch // The path to the documents directory. String dataDir = RunExample...
PatMyron/goformation
cloudformation/quicksight/aws-quicksight-datasource_prestoparameters.go
// Code generated by "go generate". Please don't change this file directly. package quicksight import ( "github.com/awslabs/goformation/v6/cloudformation/policies" ) // DataSource_PrestoParameters AWS CloudFormation Resource (AWS::QuickSight::DataSource.PrestoParameters) // See: http://docs.aws.amazon.com/AWSCloudF...
anshika581/competitive-programming-1
src/contest/usaco/USACO_2015_Cow_Hopscotch_Silver.java
<reponame>anshika581/competitive-programming-1 package contest.usaco; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.io.PrintWriter; import java.util.StringTokenizer; public class USACO_2015_Cow...
fossabot/passbook
passbook/providers/oauth/settings.py
"""passbook OAuth_Provider""" CORS_ORIGIN_ALLOW_ALL = True REQUEST_APPROVAL_PROMPT = "auto" INSTALLED_APPS = [ "oauth2_provider", "corsheaders", ] MIDDLEWARE = [ "oauth2_provider.middleware.OAuth2TokenMiddleware", "corsheaders.middleware.CorsMiddleware", ] AUTHENTICATION_BACKENDS = [ "oauth2_provi...
jianmin/dmlc-hc-taxonomy
ui/bower_components/ml-utils/src/maps.js
<filename>ui/bower_components/ml-utils/src/maps.js "use strict"; module.exports = function(app) { app .provider('mlMaps', function() { // configurable options var apiKey, clientId, v, sensor, cb = 'mlMapsLoaded', libraries = [], scriptUrl = 'https://maps.googleapis.com/maps/api/js'; var default...
isabella232/aistreams
third_party/gst-plugins-base/gst/playback/gstparsebin.c
<reponame>isabella232/aistreams<filename>third_party/gst-plugins-base/gst/playback/gstparsebin.c<gh_stars>1-10 /* GStreamer * Copyright (C) <2006> <NAME> <<EMAIL>> * Copyright (C) <2009> <NAME> <<EMAIL>> * Copyright (C) <2011> Hewlett-Packard Development Company, L.P. * Author: <NAME> <<EMAIL>>, Collabora Ltd. *...
cuba-platform/cuba-thesis
modules/core/src/com/haulmont/cuba/security/app/LoginWorker.java
/* * Copyright (c) 2008-2013 Haulmont. All rights reserved. * Use is subject to license terms, see http://www.cuba-platform.com/license for details. */ package com.haulmont.cuba.security.app; import com.haulmont.cuba.security.entity.User; import com.haulmont.cuba.security.global.LoginException; import com.h...
alexpan0610/Elastos.ELA.SPV.Cpp
Test/PayloadRecordTest.cpp
// Copyright (c) 2012-2018 The Elastos Open Source Project // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #define CATCH_CONFIG_MAIN #include "catch.hpp" #include "TestHelper.h" #include <SDK/Plugin/Transaction/Payload/Record.h...
internaru/Pinetree_P
lsp_shiloh/common/devices/pip/csc/include/csc_api.h
/****************************************************************************** * Copyright (c) 2009 - 2010 Marvell International, Ltd. All Rights Reserved * * Marvell Confidential ******************************************************************************/ #ifndef __CSC_FUNC_H_INCLUDE...
2276089666/DataStructuresAndAlgorithms
algorithms/manacher/Manacher.java
<filename>algorithms/manacher/Manacher.java<gh_stars>1-10 package manacher; /** * @Author ws * @Date 2021/5/6 15:42 * @Version 1.0 */ public class Manacher { /** * 假设字符串str长度为N,想返回最长回文子串的长度 * <p> * 在下面不同的分支下,通过R的变化,发现R最大变化为N,所以,时间复杂度O(N) */ public static int getMaxLength(String str) { ...
bpedersen2/python-gr
gr/runtime_helper.py
<gh_stars>10-100 # coding: utf-8 """ """ import ctypes import os import sys def required_runtime_version(): # TODO: load runtime version from file return '0.58.0' def version_string_to_tuple(version_string): if not isinstance(version_string, str): version_string = version_string.decode('utf-8'...
maxima-us/crypto-dom
src/crypto_dom/binance/__write_symbols.py
<reponame>maxima-us/crypto-dom<filename>src/crypto_dom/binance/__write_symbols.py<gh_stars>0 import asyncio import json import httpx from crypto_dom.binance.market_data.exchange_info import URL async def _write_binance_symbols(folder): async with httpx.AsyncClient() as client: r = await client.get(URL) ...
zytx/pyblog
joplin/apps.py
from django.apps import AppConfig class JoplinConfig(AppConfig): name = 'joplin'
genewoo/ruby-china
app/models/authorization.rb
<reponame>genewoo/ruby-china<gh_stars>0 class Authorization include Mongoid::Document include Mongoid::Timestamps include Mongoid::BaseModel field :provider field :uid, type: String embedded_in :user, inverse_of: :authorizations validates :uid, :provider, presence: true validates :uid, uniqueness: { s...
yeeeeeeti/3D_feature_extract
src/asiAlgo/features/asiAlgo_ExtractFeaturesResult.cpp
//----------------------------------------------------------------------------- // Created on: 04 February 2019 //----------------------------------------------------------------------------- // Copyright (c) 2019-present, <NAME> // All rights reserved. // // Redistribution and use in source and binary forms, with or w...
mcopik/perf-taint
benchmarks/milc/milc_qcd-7.8.1/libraries/include/inline_C_grow4wvecs.h
/***************** grow4wvecs.c (in su3.a) **************************** * * * If sum=0, * * Grow and add four wilson_vectors * * If sum=1, * * Grow and sum four wilson_vectors to another wilson_vector * * void grow_add_four_wvecs( wilson_vector *a, half_wilson_vector *b1, * * ...
1c7/tactview
tactview-ui/src/main/java/com/helospark/tactview/ui/javafx/uicomponents/propertyvalue/ValueListPropertyValueSetterChainItem.java
package com.helospark.tactview.ui.javafx.uicomponents.propertyvalue; import java.util.LinkedHashMap; import java.util.Map; import com.helospark.lightdi.annotation.Component; import com.helospark.tactview.core.timeline.effect.EffectParametersRepository; import com.helospark.tactview.core.timeline.effect.interpolation....
KjetilBerg/Verse
src/main/java/com/kbindiedev/verse/gfx/UniformLayout.java
package com.kbindiedev.verse.gfx; import org.joml.Matrix4f; import java.util.HashMap; /** Describes the uniforms of materials and shaders */ public class UniformLayout { private HashMap<String, UniformValueType> map; public UniformLayout() { map = new HashMap<>(); } public HashMap<String, ...
bantalon/pytezos
pytezos/michelson/format.py
import json from datetime import datetime from pprint import pprint line_size = 100 def format_timestamp(timestamp: int) -> str: """ Format unix timestamp. :param timestamp: Unix timestamp (seconds) """ dt = datetime.utcfromtimestamp(timestamp) return dt.strftime('%Y-%m-%dT%H:%M:%SZ') class Mi...
rfedorenkov/JavaRushTasks
1.JavaSyntax/src/com/javarush/task/pro/task06/task0606/Solution.java
package com.javarush.task.pro.task06.task0606; import java.util.List; import java.util.Map; import java.util.Set; /** * Универсальный солдат * Неплохо было бы иметь один метод для решения различных задач. У тебя есть возможность написать такой. * Создай еще 9 методов universalMethod(). В сумме их должно получиться...
fergy/aplit_linux-5
drivers/video/fbdev/via/share.h
/* * Copyright 1998-2008 VIA Technologies, Inc. All Rights Reserved. * Copyright 2001-2008 S3 Graphics, Inc. All Rights Reserved. * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; * either ...
infiniticg/equella
Platform/Infrastructure/com.tle.jpfclasspath/src/com/tle/jpfclasspath/parser/ManifestInfoHandler.java
<gh_stars>1-10 /***************************************************************************** * Java Plug-in Framework (JPF) Copyright (C) 2004-2007 <NAME> This * library 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 * ...
skkuse-adv/2019Fall_team2
analysis/reverse-engineering/decompile-fitts-with-gradle-20191031-2200/src/main/java/org/jetbrains/anko/AlertDialogBuilder.java
package org.jetbrains.anko; import android.app.AlertDialog; import android.app.AlertDialog.Builder; import android.content.Context; import android.content.DialogInterface; import android.content.res.Resources; import android.database.Cursor; import android.graphics.drawable.Drawable; import android.view.KeyEv...
gregstewart/hearthstone-tracker
test.setup.js
<filename>test.setup.js import chai from 'chai'; import sinonChai from 'sinon-chai'; import sinon from 'sinon'; import 'babel-polyfill'; chai.use(sinonChai); global.expect = chai.expect; global.sinon = sinon;
wparam-fox/androidkb
java/src/com/wparam/kb/inputmethod/latin/LastComposedWord.java
/* * Copyright (C) 2012 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 obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
ferocious-space/eveapi
esi/industry/get_industry_systems_responses.go
<filename>esi/industry/get_industry_systems_responses.go // Code generated by go-swagger; DO NOT EDIT. package industry // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "encoding/json" "fmt" "io" "strconv" "...
isabella232/typeseam
tests/test_base.py
# -*- coding: utf-8 -*- import os from flask.ext.testing import TestCase as FlaskTestCase from typeseam.app import ( create_app as _create_app, db ) from tests.utils import get_value_for_name class BaseTestCase(FlaskTestCase): ''' A base test case that boots our app ''' def create_app(se...
Mrchanghao/coach-borad
app/components/LoadingIndicator/index.js
import React, { useState } from 'react'; import PropTypes from 'prop-types'; import { BeatLoader } from 'react-spinners'; import Wrapper from './Wrapper'; const CircularLoadingIndicator = ({ size, inverted }) => { // eslint-disable-next-line no-unused-vars const [loading, setLoading] = useState(false); return ...
bamsalem/ovirt-web-ui
src/components/VmDetails/cards/DisksCard/index.js
<filename>src/components/VmDetails/cards/DisksCard/index.js import React from 'react' import PropTypes from 'prop-types' import { connect } from 'react-redux' import { createDiskForVm, editDiskOnVm, removeDisk } from '_/actions' import { withMsg } from '_/intl' import { maskForElementId, suggestDiskName, sortDisksFor...
philou/concurrency-kata
src/main/java/net/bourgau/philippe/concurrency/kata/common/ThreadPoolImplementation.java
package net.bourgau.philippe.concurrency.kata.common; import java.util.concurrent.ExecutorService; import java.util.concurrent.TimeUnit; public abstract class ThreadPoolImplementation implements Implementation { private ExecutorService threadPool; @Override public ChatRoom startNewChatRoom() { th...
liufu1986007/tis
tis-common-dao/src/main/java/com/qlangtech/tis/trigger/biz/dal/pojo/TaskExecLog.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "Li...
ael-noblegas/pychron
pychron/dvc/defaults.py
# =============================================================================== # Copyright 2015 <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/LI...
eBay/block-aggregator
src/Serializable/SerializableDataTypesNumber.h
<gh_stars>10-100 /************************************************************************ Modifications Copyright 2021, eBay, Inc. Original Copyright: See URL: https://github.com/ClickHouse/ClickHouse Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with ...
akash1233/OnBot_Demo
scripts/jira/scripts-slack/edit_issue.js
<filename>scripts/jira/scripts-slack/edit_issue.js /******************************************************************************* *Copyright 2018 Cognizant Technology Solutions * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You ...
Nakasar/bot-architecture-poc
brain/dashboard/public/js/main.js
<gh_stars>1-10 const base_url = "/" /** * Log out user from dashboard, clear session. */ function logout() { console.log("[INFO] Logging out user. Clearing session."); localStorage.setItem("user_token", null); Cookies.remove('user_token'); location.reload(); };
ybadmus/ASW
src/containers/_PrivateRoute/index.js
import React, {Fragment} from 'react'; import {Route} from 'react-router-dom'; import TopBar from "../../components/TopBar"; import LogoArea from "../../components/LogoArea"; import MainMenu from "../../components/MainMenu"; import FooterArea from "../../components/FooterArea"; const PrivateRoute = (props) => { co...
eisgroup/kraken-rules
kraken-model-dsl/src/main/java/kraken/model/dsl/KrakenDSLModelParser.java
/* * Copyright 2018 EIS Ltd and/or one of 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 ...
PressLabs/zinc
zinc/route53/policy.py
import copy from collections import OrderedDict import zinc.route53 from zinc.utils import memoized_property from .record import Record, RECORD_PREFIX class Policy: def __init__(self, zone, policy): assert isinstance(zone, zinc.route53.Zone) self.zone = zone self.db_policy = policy @...
cookesttttt/ert
src/api/basicSetting/Postmaintenance.js
<reponame>cookesttttt/ert<filename>src/api/basicSetting/Postmaintenance.js<gh_stars>0 import axios from '@/libs/api.request' // 删除岗位 export const deleteJobsData = (projectId, deptId) => { return axios.request({ url: 'auth/org/role/' + projectId + '/' + deptId, method: 'delete' }) } // // 获取岗位职责 // export ...
anandibhat/cloud-native-applications
grpc-hr-example/grpc-hr-service/src/main/java/com/jobinesh/example/grpc/hr/service/GrpcExceptionHandler.java
package com.jobinesh.example.grpc.hr.service; import io.grpc.*; public class GrpcExceptionHandler implements ServerInterceptor { @Override public <ReqT, RespT> ServerCall.Listener<ReqT> interceptCall(ServerCall<ReqT, RespT> serverCall, Metadata metadata, ...
KaizerHind/FreeExcersice_Javascript
University_Java/zPrueba1/src/zprueba1/Teclado.java
<reponame>KaizerHind/FreeExcersice_Javascript package zprueba1; import java.util.Scanner; public class Teclado { Scanner sc = new Scanner(System.in); public Teclado() { sc = new Scanner(System.in); } public String getString(String titulo) { String s1 = ""; while (s1.equals("...
Testiduk/gitlabhq
spec/lib/sidebars/groups/menus/kubernetes_menu_spec.rb
<reponame>Testiduk/gitlabhq<gh_stars>1000+ # frozen_string_literal: true require 'spec_helper' RSpec.describe Sidebars::Groups::Menus::KubernetesMenu do let_it_be(:owner) { create(:user) } let_it_be(:group) do build(:group, :private).tap do |g| g.add_owner(owner) end end let(:user) { owner } ...
mark-online/server
src/servertest/datatable/MockSOActiveSkillTable.cpp
<filename>src/servertest/datatable/MockSOActiveSkillTable.cpp #include "ServerTestPCH.h" #include <gideon/servertest/datatable/MockSOActiveSkillTable.h> //#include <gideon/servertest/datatable/DataCodes.h> #include <gideon/cs/datatable/SkillTemplate.h> #include <gideon/cs/datatable/template/so_active_skill_table.hxx> ...
jiaguobing/FastCAE
VTK/vtk_7.1.1_x64_Debug/include/vtk-7.1/vtkCommonColorModule.h
#ifndef VTKCOMMONCOLOR_EXPORT_H #define VTKCOMMONCOLOR_EXPORT_H #ifdef VTKCOMMONCOLOR_STATIC_DEFINE # define VTKCOMMONCOLOR_EXPORT # define VTKCOMMONCOLOR_NO_EXPORT #else # ifndef VTKCOMMONCOLOR_EXPORT # ifdef vtkCommonColor_EXPORTS /* We are building this library */ # define VTKCOMMONCO...
pr0d1r2/shelly
lib/shelly/cli/config.rb
<filename>lib/shelly/cli/config.rb require "shelly/cli/command" module Shelly module CLI class Config < Command include Thor::Actions include Helpers before_hook :logged_in?, :only => [:list, :show, :create, :new, :edit, :update, :delete] class_option :cloud, :type => :string, :aliases =...
school-engagements/pikater
lib/jade-4.3.2/src/jade/tools/sniffer/AbstractPopup.java
<reponame>school-engagements/pikater /***************************************************************** JADE - Java Agent DEvelopment Framework is a framework to develop multi-agent systems in compliance with the FIPA specifications. Copyright (C) 2000 CSELT S.p.A. GNU Lesser General Public License This librar...
SkankHunter24/BaseSpringMVC
src/base/BaseServiceSupport.java
package base; import java.sql.Connection; import javax.annotation.Resource; import org.apache.ibatis.session.SqlSessionFactory; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.mvel2.util.ThisLiteral; import org.mybatis.spring.SqlSessionTemplate; import org.sp...
anyanfei/hotgo
hotgo-server/app/form/input/admin_dept_input.go
<filename>hotgo-server/app/form/input/admin_dept_input.go package input import "github.com/bufanyun/hotgo/app/model/entity" // 名称是否唯一 type AdminDeptNameUniqueInp struct { Name string Id int64 } type AdminDeptNameUniqueModel struct { IsUnique bool } // 最大排序 type AdminDeptMaxSortInp struct { Id int64 } type Ad...
kooksee/nebulas-p2p
testing/broadcast/main.go
<reponame>kooksee/nebulas-p2p<filename>testing/broadcast/main.go<gh_stars>0 package main import ( "flag" "fmt" "hash/fnv" "math" "math/rand" "reflect" "sort" "time" peer "github.com/libp2p/go-libp2p-peer" "nebulas-p2p" ) type nodeIdx []int // Len returns the size of nodeIdx func (idx nodeIdx) Len() int { ...
lpi/codeforces-go
misc/nowcoder/6357/b/b.go
<reponame>lpi/codeforces-go package main // github.com/EndlessCheng/codeforces-go func solve(S, T string) int { delta := [3]byte{2, 3, 5} var s, t [4]byte for i := range S { s[i] = S[i] } for i := range T { t[i] = T[i] } vis := map[[4]byte]bool{s: true} q := [][4]byte{s} for d := 0; ; d++ { qq := q q ...
ANR2ME/pspdecompiler
hash.c
<reponame>ANR2ME/pspdecompiler /** * Author: <NAME> (<EMAIL>) */ #include <stddef.h> #include <stdlib.h> #include <string.h> #include <math.h> #include "hash.h" #include "alloc.h" #include "utils.h" #include "types.h" #define INDEX_FOR(hash, size) ((hash) & ((size) - 1)) struct _entry { void *key, *value; uns...
fridgeresearch/kitchen
backend/python/db/db_handler.py
""" The MIT License (MIT) Copyright (c) 2016 <NAME> (Stanford University) 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...
mkinsner/llvm
libc/test/src/ctype/isalpha_test.cpp
//===-- Unittests for isalpha----------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
navikt/data-catalog-policies
data-catalog-policies-app/src/main/java/no/nav/data/catalog/policies/app/policy/domain/PolicyResponse.java
package no.nav.data.catalog.policies.app.policy.domain; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import no.nav.data.catalog.polic...
iEiffel/Portfolium
Portfolium/PFStudyVC.h
<filename>Portfolium/PFStudyVC.h<gh_stars>0 // // PFStudyVC.h // Portfolium // // Created by <NAME> on 7/30/14. // Copyright (c) 2014 Portfolium. All rights reserved. // #import <UIKit/UIKit.h> #import "PFIndexedListVC.h" @class PFOBEducationVC; @interface PFStudyVC : PFIndexedListVC<UISearchBarDelegate> + (PFS...
legioner9/Node_Way_source_2
Education/Gulp/Gulp_project_gulp_pug_1/CreateDirFree_v_1_gulp_pug_1.js
<reponame>legioner9/Node_Way_source_2 const Ex = require ( 'st_ex1' ); const createTechDir_1_v_2 = require ( 'st_ini' ).createTechDir_1_v_2; // createTechDir_1_v_2.mode = 'debug'; // const arr_creator = [ 'A', 'B', [ 'B', 'BA' ,'BB'] ]; const arr_creator = [ 'gulpfile.js', [ 'build', 0 ], [ 'src',...
jamesmartinpp/mocca
mocca-client/src/test/java/com/paypal/mocca/client/sample/AsyncSampleClient.java
package com.paypal.mocca.client.sample; import com.paypal.mocca.client.MoccaClient; import com.paypal.mocca.client.annotation.Query; import com.paypal.mocca.client.annotation.RequestHeader; import java.util.concurrent.CompletableFuture; @RequestHeader("classheader: classvalue") public interface AsyncSampleClient ext...
KevDev0247/FinanceLord
app/src/main/java/protect/Finia/networth/editing/utils/AssetsFragmentChildViewClickListener.java
package protect.Finia.networth.editing.utils; import android.util.Log; import android.view.View; import android.widget.ExpandableListView; import java.util.List; import protect.Finia.datastructure.AssetsNodeContainer; import protect.Finia.datastructure.AssetsTypeTreeProcessor; /** * A Listener class that will dete...
ScalablyTyped/SlinkyTyped
w/winrt-uwp/src/main/scala/typingsSlinky/winrtUwp/global/Windows/Media/MediaPlaybackStatus.scala
<filename>w/winrt-uwp/src/main/scala/typingsSlinky/winrtUwp/global/Windows/Media/MediaPlaybackStatus.scala<gh_stars>10-100 package typingsSlinky.winrtUwp.global.Windows.Media import org.scalablytyped.runtime.StObject import scala.scalajs.js import scala.scalajs.js.`|` import scala.scalajs.js.annotation.{JSGlobalScope,...
artkoshelev/voyager
pkg/orchestration/updater/objectupdater_typed.go
package k8s import ( smith_v1 "github.com/atlassian/smith/pkg/apis/smith/v1" smithClientset "github.com/atlassian/smith/pkg/client/clientset_generated/clientset" "github.com/atlassian/voyager/pkg/k8s/updater" meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/tools...
ayan-biswas/cbag
include/cbag/schematic/shape_t.h
<filename>include/cbag/schematic/shape_t.h #ifndef CBAG_SCHEMATIC_SHAPE_T_H #define CBAG_SCHEMATIC_SHAPE_T_H #include <variant> namespace cbag { namespace sch { struct rectangle; struct polygon; struct arc; struct donut; struct ellipse; struct line; struct path; struct text_t; struct eval_text; using shape_t = ...
nathan-hekman/vpc-java-sdk
modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPTest.java
/* * (C) Copyright IBM Corp. 2021. * * 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 w...
yong076/webviewtesting
Libraries/StyleSheet/StyleSheet.js
/** * Copyright (c) 2015-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * @provides...
google-ar/chromium
chrome/android/javatests/src/org/chromium/chrome/browser/signin/OAuth2TokenServiceTest.java
<filename>chrome/android/javatests/src/org/chromium/chrome/browser/signin/OAuth2TokenServiceTest.java // Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package org.chromium.chrome.browser.signin; import ...
comic/comic-django
app/grandchallenge/hanging_protocols/forms.py
from crispy_forms.helper import FormHelper from crispy_forms.layout import ButtonHolder, Div, Layout, Submit from django import forms from grandchallenge.components.models import ComponentInterface from grandchallenge.core.forms import SaveFormInitMixin from grandchallenge.core.widgets import JSONEditorWidget f...
sebaslherrera/holbertonschool-machine_learning
math/0x00-linear_algebra/12-bracin_the_elements.py
<gh_stars>0 #!/usr/bin/env python3 """Bracing The Elements module""" def np_elementwise(mat1, mat2): """Performs element-wise addition, subtraction, multiplication, and division""" return ((mat1 + mat2), (mat1 - mat2), (mat1 * mat2), (mat1 / mat2))
channingy/zuihou-admin-cloud
zuihou-common/zuihou-core/src/main/java/com/github/zuihou/exception/CommonException.java
<gh_stars>1-10 package com.github.zuihou.exception; /** * 非业务异常 * 用于在处理非业务逻辑时,进行抛出的异常。 * * @author zuihou * @version 1.0 * @see Exception */ public class CommonException extends BaseCheckedException { public CommonException(int code, String message) { super(code, message); } public Common...
hamdouni/iut
src/coo/ctrl/exo2/Moustache.java
<gh_stars>0 package coo.ctrl.exo2; public class Moustache extends ActeurDeguise { public Moustache(Acteur unActeur) { super(unActeur); } public int salaire() { return this.getActeur().salaire() + 50; } public String toString() { return super.toString() + "avec une moustache "; } }
youngmonkeys/ezydata
ezydata-redis/src/test/java/com/tvd12/ezydata/redis/test/setting/EzyRedisSettingsBuilderTest.java
<reponame>youngmonkeys/ezydata package com.tvd12.ezydata.redis.test.setting; import org.testng.annotations.Test; import com.tvd12.ezydata.redis.setting.EzyRedisChannelSetting; import com.tvd12.ezydata.redis.setting.EzyRedisChannelSettingBuilder; import com.tvd12.ezydata.redis.setting.EzyRedisMapSettingBuilder; import...
raxxor45/ValveSecurity
src_main/dx9sdk/Utilities/Source/Maya/DXMNodeStdMtlAdapter.h
#pragma once #ifndef DXMNODESTDMTLADAPTER_H #define DXMNODESTDMTLADAPTER_H class DXMNodeStdMtlAdapter : public DXMNodeAdapter { public: enum SHADERSYNCFLAGS { SHADERSYNC_ALL= 1, }; DWORD SyncFlags; DXMNodeStdMtlAdapter(); virtual ~DXMNodeStdMtlAdapter(); virtual const CStringA& Signature(){ return MySign...
comments-ink/django-comments-ink
django_comments_ink/tests/test_serializers.py
from __future__ import unicode_literals import json from datetime import datetime from unittest.mock import Mock, patch import django_comments import pytest import pytz from django.contrib.auth.models import AnonymousUser, User from django.contrib.contenttypes.models import ContentType from django.contrib.sites.model...
bzdanny/BaiZe
app/system/service/systemService/systemServiceImpl/sysDictTypeImpl.go
<reponame>bzdanny/BaiZe<gh_stars>1-10 package systemServiceImpl import ( "baize/app/common/redis" "baize/app/constant/constants" "baize/app/utils/exceLize" "baize/app/system/dao/systemDao" "baize/app/system/dao/systemDao/systemDaoImpl" "baize/app/system/models/systemModels" "baize/app/utils/snowflake" ) var d...
putmantime/dipper
dipper/sources/GWASCatalog.py
import logging import csv import re from dipper.sources.Source import Source from dipper.models.Dataset import Dataset from dipper import config from dipper.utils.CurieUtil import CurieUtil from dipper.utils.DipperUtil import DipperUtil from dipper.models.Model import Model from dipper import curie_map from dipper.mod...
Uniandes-isis2603/s3_watchdogs
s3_watchdogs-web/src/main/webapp/src/modules/faqs/faqs.mod.js
(function (ng) { var mod = ng.module("faqsModule", ['ui.router']); mod.config(['$stateProvider', '$urlRouterProvider', function ($stateProvider, $urlRouterProvider) { var basePath = 'src/modules/faqs/'; $urlRouterProvider.otherwise("/faqsList"); ...
linyinggaoseng/XiaoWei
Server/common/response.js
var reason = require('./reason'); exports.genHttpResp = function(code, data, err){ var result = { code: code, //[0 - 成功],[ >= 1 - 失败, 也是错误代码, 1~10保留,11:email已存在、12:电话号码已存在] msg: reason.getReason(code) // 失败时,存储失败原因,对用户友好的原因说明 }; if(data != null){ result.data = data; //响应数据 } ...
omtanke/react-material-icons
src/EscalatorWarningSharp.js
function SvgEscalatorWarningSharp(props) { return ( <svg xmlns='http://www.w3.org/2000/svg' height='1em' viewBox='0 0 24 24' width='1em' className='svg-icon' {...props}> <path fill='none' d='M0 0h24v24H0z' /> <path d='M6.5 2c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm9 7.5c0 .83.67 1.5 1.5 1...
scp-studios/scp-game-framework
include/scp/core-pch.hpp
#ifndef EF9E1FC6_81B7_4747_B5DB_13E7A798B2AE #define EF9E1FC6_81B7_4747_B5DB_13E7A798B2AE #include <cstdint> #include <string_view> #include <iostream> #include <memory> #endif /* EF9E1FC6_81B7_4747_B5DB_13E7A798B2AE */
alancnet/artifactory
web/rest-ui/src/main/java/org/artifactory/ui/rest/service/admin/security/auth/logout/LogoutService.java
<reponame>alancnet/artifactory package org.artifactory.ui.rest.service.admin.security.auth.logout; import org.artifactory.api.context.ContextHelper; import org.artifactory.rest.common.service.ArtifactoryRestRequest; import org.artifactory.rest.common.service.RestResponse; import org.artifactory.rest.common.service.Res...
killf/leetcode_cpp
src/0606.cpp
#include <iostream> #include <string> #include <vector> #include <cmath> #include <hash_map> #include <map> #include <sstream> #include <type_traits> using namespace std; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) {} }; class Solution { publ...
shadialameddin/numerical_tools_and_friends
cpp/0_check/johnstonc_programmingtoday_sourcecode/chapter11_inheritance/ch11_counter/ch.cpp
//Program 11-1 Counter Sample program with a counter object //File: Ch11Counter.cpp #include "Ch11Counter.h" #include <iostream.h> int main() { Counter HowMany; // constructor sets HowMany count = 0 cout << "\n Sample program with class Counter \n"; HowMany.PrintCount(); cout << "\n Increment H...
AIPHES/ecml-pkdd-2019-J3R-explainable-recommender
refs/librec/core/src/main/java/net/librec/recommender/nn/rating/AutoRecRecommender.java
<reponame>AIPHES/ecml-pkdd-2019-J3R-explainable-recommender /** * Copyright (C) 2016 LibRec * <p> * This file is part of LibRec. * LibRec is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 ...
switcherSalca/asambleaWeb
src/routes.js
import Assembly from './views/assembly/assembly' import Dashboard from './views/dashboard/Dashboard' import ListRegistered from './views/registered/ListRegistered' import Selection from './views/questions/Selection/Selection' import Resolution from './views/questions/Resolution/resolution' import Visualization from './...
mhuisi/lean4
stage0/stdlib/Init/Data/List/Instances.c
// Lean compiler output // Module: Init.Data.List.Instances // Imports: Init.Data.List.Basic Init.Control.Alternative Init.Control.Monad #include "runtime/lean.h" #if defined(__clang__) #pragma clang diagnostic ignored "-Wunused-parameter" #pragma clang diagnostic ignored "-Wunused-label" #elif defined(__GNUC__) && !de...
SLiGe/mirai-robot
src/main/java/cn/zjiali/robot/factory/MessageEventHandlerFactory.java
<reponame>SLiGe/mirai-robot package cn.zjiali.robot.factory; import cn.zjiali.robot.handler.MessageEventHandler; import cn.zjiali.robot.util.CommonLogger; import java.lang.reflect.InvocationTargetException; /** * @author zJiaLi * @since 2020-10-30 09:24 */ public class MessageEventHandlerFactory extends AbstractB...
Robbbert/messui
src/emu/ui/cmddata.h
<reponame>Robbbert/messui // license:BSD-3-Clause // copyright-holders:<NAME> /********************************************************************* ui/cmddata.h *********************************************************************/ #ifndef MAME_EMU_UI_CMDDATA_H #define MAME_EMU_UI_CMDDATA_H #pragma once // com...