repo_name stringlengths 6 101 | path stringlengths 4 300 | text stringlengths 7 1.31M |
|---|---|---|
airgiser/ucb | examples/python/simple/class_init.py | <filename>examples/python/simple/class_init.py
#!/usr/bin/python
# Filename: class_init.py
class Person:
def __init__(self, name):
self.name = name
def sayhello(self):
print "hello,", self.name
p = Person('python')
p.sayhello()
|
ssf-admin/scb | bot/src/registry.js | <gh_stars>1-10
var Bot = require('./bot/Bot');
var BotModel = require('./models/BotModel');
class Registry {
constructor ()
{
this.bots = {};
this.botModel = new BotModel();
}
runBot (bot)
{
if (!bot) return;
var botId = bot.botId;
if (this.bots[botId]) this.bots[botId].stop();
if (this.bots[botId]) ... |
Ruslanwww/auction_marketplace_api | app/controllers/lots_controller.rb | class LotsController < ApplicationController
expose :lot
def index
lots = Lot.in_process.order(created_at: :desc).page(params[:page])
render json: lots, status: :ok
end
def my_lots
lots = filtered_lot.order(created_at: :desc).page(params[:page])
check_my_lot(lots)
render json: lots, check_... |
dangweijian/easy-generator | src/main/java/com/dwj/generator/common/annotation/Condition.java | package com.dwj.generator.common.annotation;
import com.dwj.generator.common.enums.ConditionType;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* ... |
Kaiser-Lee/Anjoy_api | interface/interface-dms/src/main/java/com/coracle/dms/dao/mybatis/DmsOrderReturnCartMapper.java | /**
* create by tanyb
* @date 2017-08
*/
package com.coracle.dms.dao.mybatis;
import java.util.List;
import com.coracle.dms.po.DmsOrderReturnCart;
import com.coracle.dms.vo.DmsOrderReturnCartVo;
import com.coracle.yk.xdatabase.base.mybatis.intf.IMybatisDao;
public interface DmsOrderReturnCartMapper extends IMybat... |
sgholamian/log-aware-clone-detection | NLPCCd/Hive/1513_2.java | <gh_stars>0
//,temp,sample_871.java,2,9,temp,sample_870.java,2,9
//,3
public class xxx {
public static Map<String, Map<String, Table>> getTempTables() {
SessionState ss = SessionState.get();
if (ss == null) {
log.info("no current sessionstate skipping temp tables");
}
}
}; |
arjunKumbakkara/WFM_BoilerPlate | src/main/java/com/sixdee/wfm/service/StateService.java | /**
*
*/
package com.sixdee.wfm.service;
import java.util.List;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Service;
import com.sixdee.wfm.model.State;
/**
* @author <NAME>
*
* Date : 11-Mar-2019
*/
@Service
public interface StateService {
public Page<State>... |
zhengyn0001/algorithmByXiaohui | node_modules/eslint-config-alloy/test/base/no-new-wrappers/bad.js | const s = new String('foo');
const n = new Number(1);
const b = new Boolean(true);
|
SenseException/instantsearch.js | docgen/src/examples/getting-started-boilerplate/app.js | // Add here your javascript code
|
isaiah/jy3k | org.python/src/org/python/core/PyJava.java | package org.python.core;
import jdk.dynalink.beans.StaticClass;
import org.python.annotations.ExposedClassMethod;
import org.python.annotations.ExposedType;
@ExposedType(name = "Java")
public class PyJava extends PyObject {
public static final PyType TYPE = PyType.fromClass(PyJava.class);
public PyJava() {
... |
FeatureToggleStudy/pam-annonsemottak | src/main/java/no/nav/pam/annonsemottak/rest/AnnonsehodeConverter.java | <filename>src/main/java/no/nav/pam/annonsemottak/rest/AnnonsehodeConverter.java<gh_stars>1-10
package no.nav.pam.annonsemottak.rest;
import no.nav.pam.annonsemottak.stilling.Arbeidsgiver;
import no.nav.pam.annonsemottak.stilling.Merknader;
import no.nav.pam.annonsemottak.stilling.Saksbehandler;
import no.nav.pam.annon... |
ppartarr/azure-sdk-for-java | sdk/eventgrid/microsoft-azure-eventgrid/src/test/java/com/microsoft/azure/eventgrid/customization/models/ContosoItemSentEventData.java | <filename>sdk/eventgrid/microsoft-azure-eventgrid/src/test/java/com/microsoft/azure/eventgrid/customization/models/ContosoItemSentEventData.java<gh_stars>1000+
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package com.microsoft.azure.eventgrid.customization.models;
imp... |
zealoussnow/chromium | tools/perf/benchmarks/desktop_ui.py | <filename>tools/perf/benchmarks/desktop_ui.py
# Copyright 2020 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.
from core import perf_benchmark
from core import platforms
from telemetry import benchmark
from telemetry impo... |
ashokr8142/phanitest | Android/app/src/main/java/com/harvard/webservicemodule/WebserviceSubscriber.java | /*
* Copyright © 2017-2019 Harvard Pilgrim Health Care Institute (HPHCI) and its Contributors.
* Copyright 2020 Google LLC
* 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 restrictio... |
madusha98/hms-react-native-plugin | react-native-hms-contactshield/android/src/main/java/com/huawei/hms/rn/contactshield/utils/Utils.java | <gh_stars>100-1000
/*
Copyright 2020-2021. 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 License at
https://www.apache.org/licenses/... |
solante1012/tms | src/test/java/com/lhjz/portal/util/FileUtilTest.java | package com.lhjz.portal.util;
import org.apache.commons.io.FileUtils;
import org.testng.Assert;
import org.testng.annotations.Test;
public class FileUtilTest {
@Test
public void test() {
System.out.println(FileUtil.getName("C:\\ddfd\\dfdfdff\\etetr.txt"));
System.out.println(FileUtils.getFile("C:\\ddfd\\dfdfd... |
smiley0907/purnacache | src/core/org/apache/hadoop/net/SocketOutputStream.java | <gh_stars>1-10
/**
* 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
* ... |
TheMindVirus/pftf-rpi4 | edk2-platforms/Silicon/Intel/CoffeelakeSiliconPkg/Pch/Library/PeiPchPolicyLib/PeiPchPolicyLibrary.h | /** @file
Header file for the PeiPchPolicy library.
Copyright (c) 2019 - 2020 Intel Corporation. All rights reserved. <BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#ifndef _PEI_PCH_POLICY_LIBRARY_H_
#define _PEI_PCH_POLICY_LIBRARY_H_
#include <Library/DebugLib.h>
#include <Library/IoLib.h>
#include <L... |
Youslam/weighing | src/main/java/com/smart/app/weighing/controller/web/PesageController.java | package com.smart.app.weighing.controller.web;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data... |
loye168/tddl5 | tddl-rule/src/main/java/com/taobao/tddl/rule/enumerator/handler/NumberPartDiscontinousRangeEnumerator.java | package com.taobao.tddl.rule.enumerator.handler;
import java.util.Set;
import com.taobao.tddl.common.model.sqljep.Comparative;
public abstract class NumberPartDiscontinousRangeEnumerator extends PartDiscontinousRangeEnumerator {
protected static final int LIMIT_UNIT_OF_LONG = 1;
protected static ... |
mavlushechka/StudentDatabase | src/main/java/com/mavlushechka/studentdatabase/config/WebSecurityConfig.java | package com.mavlushechka.studentdatabase.config;
import com.mavlushechka.studentdatabase.service.CustomUserDetailsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springfra... |
lukaszbudnik/hackaton-portal | app/security/Security.scala | <gh_stars>1-10
package security
import scala.annotation.implicitNotFound
import org.squeryl.PrimitiveTypeMode.inTransaction
import play.api.mvc.AnyContent
import play.api.mvc.Result
import securesocial.core.SecuredRequest
trait Security extends securesocial.core.SecureSocial {
/**
* general purpose ensure met... |
Mi7ai/Algoritmia | Repaso Examenes/enero2015/enero2015voraces.py | <gh_stars>0
# no coge los numeros de X, a veces
def galeria(X, D):
res = [X[0] + D]
for nr in X:
if nr > res[-1] + D:
res.append(nr + D)
return res
def galeria2(X, D):
res = []
if len(X) > 1:
res.append(X[0])
else:
return None
for i in range(len(X)):
if res[-1] + D < X[i]:
res.append(X[i])
ret... |
ulivz/marko | test/autotests/components-browser/rerender-same-id/test.js | var expect = require('chai').expect;
module.exports = function(helpers) {
var component = helpers.mount(require('./index'), {
label: 'Foo'
});
var oldId = component.id;
component.input = {
label: 'Bar'
};
component.update();
expect(component.el.id).to.equal(oldId);
}; |
twocucao/tifa | tests/functional/test_product.py | import pytest
from sqlalchemy.ext.asyncio import AsyncSession
from tifa.db.adal import AsyncDal
from tifa.models.product import ProductType
@pytest.mark.asyncio
async def test_filtering_by_attribute(
session: AsyncSession,
product_type,
# color_attribute,
# size_attribute,
# #... |
a10501/equipment-server | equipment-admin/src/main/java/com/equipment/equipmentMan/controller/EqUseTimeController.java | <filename>equipment-admin/src/main/java/com/equipment/equipmentMan/controller/EqUseTimeController.java<gh_stars>0
package com.equipment.equipmentMan.controller;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.equipment.equipmentMan.domain.EqDatamanage;
impo... |
EvilMcJerkface/grappa | system/tasks/StealQueue.cpp | ////////////////////////////////////////////////////////////////////////
// Copyright (c) 2010-2015, University of Washington and Battelle
// Memorial Institute. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following cond... |
ixiDev/iris | src/runtime/HubClient.cpp | #include <brisbane/brisbane.h>
#include "HubClient.h"
#include "Hub.h"
#include "Debug.h"
#include "Message.h"
#include "Scheduler.h"
#include <stdlib.h>
#include <unistd.h>
namespace brisbane {
namespace rt {
HubClient::HubClient(Scheduler* scheduler) {
ndevs_ = -1;
if (scheduler) {
scheduler_ = scheduler;
... |
tduehr/jruby | core/src/main/java/org/jruby/ir/instructions/ReceiveClosureInstr.java | package org.jruby.ir.instructions;
import org.jruby.ir.IRFlags;
import org.jruby.ir.IRScope;
import org.jruby.ir.IRVisitor;
import org.jruby.ir.Operation;
import org.jruby.ir.operands.Operand;
import org.jruby.ir.operands.Variable;
import org.jruby.ir.operands.WrappedIRClosure;
import org.jruby.ir.transformations.inli... |
sirfoga/pyhodl | docs/classpyhodl_1_1app_1_1_config_manager.js | var classpyhodl_1_1app_1_1_config_manager =
[
[ "__init__", "classpyhodl_1_1app_1_1_config_manager.html#a04ddf6e5086e4ffa55941fe74235fdcd", null ],
[ "create_config", "classpyhodl_1_1app_1_1_config_manager.html#a667736bb2b54ba26f5d110524e1b13c9", null ],
[ "get", "classpyhodl_1_1app_1_1_config_manager.html#... |
duweiwang/java-playground | src/main/java/com/wangduwei/java_basic/string/MethodUsage.java | <reponame>duweiwang/java-playground
package com.wangduwei.java_basic.string;
/**
* <p>
*
* @auther : wangduwei
* @since : 2019/9/5 16:52
**/
public class MethodUsage {
public static void main(String[] args) {
MethodUsage.isWhite();
}
public static void isWhite() {
boolean a = Cha... |
redhatanalytics/oshinko-cli | vendor/github.com/openshift/origin/pkg/auth/oauth/registry/registry_test.go | package registry
import (
"errors"
"net/http"
"net/http/httptest"
"testing"
"time"
"github.com/RangelReale/osin"
"github.com/RangelReale/osincli"
apierrs "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/runtime"
"... |
moiify/llofo | src/driver/client.c | #include <stdio.h>
#include <string.h>
#include "log.h"
#include "client.h"
#include "msg.h"
#include "data.h"
#include "setting.h"
static int g_msgUdpProcsNum = 0;
static MC_MSG_PROC *g_msgUdpProcs = NULL;
int client_udp_proc(const void *m, int msgLen)
{
int i = 0;
const MSG_HEADER *msg = (const MSG_HEADER *... |
PMSMcqut/pyleecan-of-manatee | Tests/Plot/LamHole/test_Hole_54_plot.py | # -*- coding: utf-8 -*-
"""
@date Created on Wed Jan 13 17:45:15 2016
@copyright (C) 2015-2016 EOMYS ENGINEERING.
@author pierre_b
"""
from os.path import join
from unittest import TestCase
import matplotlib.pyplot as plt
from numpy import pi
from pyleecan.Classes.Frame import Frame
from pyleecan.Classes.LamHole imp... |
oirad21/react_oirad | node_modules/@fortawesome/pro-solid-svg-icons/faDagger.js | <reponame>oirad21/react_oirad<gh_stars>0
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var prefix = 'fas';
var iconName = 'dagger';
var width = 384;
var height = 512;
var ligatures = [];
var unicode = 'f6cb';
var svgPathData = 'M336 128H224V16c0-8.84-7.16-16-16-16h-32c-8.84 0-16 7.16-16 1... |
larsvansoest/commix | tests/test_transweight_transformations.py | <reponame>larsvansoest/commix<gh_stars>1-10
import tensorflow as tf
import numpy as np
from models import TransWeightTransformations
from tests import TestBase
class TransWeightTransformationsTest(TestBase):
"""
This class tests the functionality of the TransWeightTransformations model.
This test suite ca... |
jxchin/openspecimen | WEB-INF/src/com/krishagni/catissueplus/core/common/repository/impl/StarredItemDaoImpl.java | <reponame>jxchin/openspecimen
package com.krishagni.catissueplus.core.common.repository.impl;
import org.hibernate.criterion.Restrictions;
import com.krishagni.catissueplus.core.common.domain.StarredItem;
import com.krishagni.catissueplus.core.common.repository.AbstractDao;
import com.krishagni.catissueplus.core.comm... |
kristianmeyerr/AMICI | tests/generateTestConfig/example_events.py | #!/usr/bin/env python3
import sys
import numpy as np
from example import AmiciExample
class ExampleEvents(AmiciExample):
def __init__(self):
AmiciExample.__init__( self )
self.numZ = 2
self.numX = 3
self.numP = 4
self.numK = 4
self.modelOptions['theta'] = np.log... |
bboyxiaosong/wx_xd | mychaj/utils/util.js | var MD5 = require('./md5.js')
function alert(msg, callbak) {
wx.showModal({
title: '提示',
content: msg,
showCancel: false,
confirmText: '好的',
success: function (res) {
if (callbak) {
callbak()
}
}
})
}
function showToast(msg) {
wx.showToast({
title: msg,
icon: ... |
josephsavona/valuable | test/types/bool_spec.js | <filename>test/types/bool_spec.js<gh_stars>10-100
var assert = require('chai').assert,
sinon = require('sinon'),
_ = require('lodash'),
Model = require('../../src/model'),
Bool = require('../../src/bool'),
rawValues = require('../mock_values');
var MyModel = Model.define({
bool: Bool
});
describ... |
MachSilva/Ds | cg/include/debug/AnimatedAlgorithm.h | <gh_stars>1-10
//[]---------------------------------------------------------------[]
//| |
//| Copyright (C) 2016, 2022 <NAME>. |
//| |
//| This software is provided 'as... |
beautifwhale/bowhead | packages/test-app/src/utils/constants.js | export const FIRESTORE_COLLECTIONS = {
WORKSPACES: 'workspaces',
USER_WORKSPACES: 'userWorkspaces',
};
export const USER_ROLES = {
OWNER: 'owner',
MEMBER: 'member'
} |
horoeka-2021/argumentum | client/api/addChatUser.js | import request from 'superagent'
// not finished unsure...
export default function addChatUser (user) {
return request.post('/api/v1/addChatUser')
.send(user)
.then(res => {
return null
})
}
|
VU-libtech/OLE-INST | ole-app/olefs/src/main/java/org/kuali/ole/select/document/web/struts/OleLineItemReceivingAction.java | /*
* Copyright 2011 The Kuali Foundation.
*
* Licensed under the Educational Community 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.opensource.org/licenses/ecl2.php
*
* Unless required ... |
jbreck/duet-jbreck | test/chora/benchmarks/icrasuite/frankenstein/relational/AGHKTW2017_loginSafe.c | <gh_stars>1-10
#include "assert.h"
/* Source: <NAME>, <NAME>, <NAME>, <NAME>,
<NAME>, <NAME>: Decomposition Instead of Self-Composition for
Proving the Absence of Timing Channels. PLDI 2017 */
int loginSafe(char *password, int password_len, char* guess, int guess_len) {
int matches = 1;
int tick = 0;
... |
jeroen/homebrew-core | Formula/autojump.rb | <gh_stars>1-10
class Autojump < Formula
desc "Shell extension to jump to frequently used directories"
homepage "https://github.com/wting/autojump"
url "https://github.com/wting/autojump/archive/release-v22.5.1.tar.gz"
sha256 "765fabda130eb4df70d1c1e5bc172e1d18f8ec22c6b89ff98f1674335292e99f"
head "https://gith... |
yashpatil/GTAS | gtas-parent/gtas-loader/src/test/java/gov/gtas/services/PnrGen.java | <filename>gtas-parent/gtas-loader/src/test/java/gov/gtas/services/PnrGen.java<gh_stars>10-100
/*
* All GTAS code is Copyright 2016, The Department of Homeland Security (DHS), U.S. Customs and Border Protection (CBP).
*
* Please see LICENSE.txt for details.
*/
package gov.gtas.services;
import gov.gtas.dto.FlightD... |
pramodbiligiri/datahub | li-utils/src/main/javaPegasus/com/linkedin/common/urn/AzkabanFlowUrn.java | package com.linkedin.common.urn;
import com.linkedin.data.template.Custom;
import com.linkedin.data.template.DirectCoercer;
import com.linkedin.data.template.TemplateOutputCastException;
import java.net.URISyntaxException;
public final class AzkabanFlowUrn extends Urn {
public static final String ENTITY_TYPE = "a... |
hitjl/trino | testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeAlterTableCompatibility.java | <filename>testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeAlterTableCompatibility.java
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* ht... |
IndexXuan/JobBest | public/bower_components/avalon/src/12 scanText.js | <gh_stars>1-10
var rfilters = /\|\s*(\w+)\s*(\([^)]*\))?/g,
r11a = /\|\|/g,
r11b = /U2hvcnRDaXJjdWl0/g,
rlt = /</g,
rgt = />/g
function trimFilter(value, leach) {
if (value.indexOf("|") > 0) { // 抽取过滤器 先替换掉所有短路与
value = value.replace(r11a, "U2hvcnRDaXJjdWl0") //btoa("S... |
hipstersmoothie/saasify | examples/typescript/meta-stock/lib/images.js | <filename>examples/typescript/meta-stock/lib/images.js<gh_stars>1000+
'use strict'
const pexels = require('./services/pexels')
const pixabay = require('./services/pixabay')
const unsplash = require('./services/unsplash')
const multiProvider = require('./multi-provider')
module.exports = multiProvider({
label: 'ima... |
kneubert/seqan | apps/alf/alf.cpp | // ==========================================================================
// ALF - Alignment free sequence comparison
// ==========================================================================
// Copyright (c) 2006-2016, <NAME>, FU Berlin
// All rights reserved.
//
// Redistribution and use in s... |
huaweicodelabs/SocialMediaApp | src/app/src/main/java/com/huawei/hms/socialappsharing/friends/FriendsSuggestionsListFragment.java | /*
* Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. 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
*
* Un... |
school-engagements/pikater-vaadin | src/org/pikater/web/experiment/IBoxInfoCommon.java | <reponame>school-engagements/pikater-vaadin
package org.pikater.web.experiment;
/**
* Interface common for both client and server box definitions.
*
* @author SkyCrawl
*
* @param <I> The type for IDs. Typically Integers or Strings.
*/
public interface IBoxInfoCommon<I extends Object> {
I getID();
void setID... |
dram/metasfresh | backend/de.metas.business.rest-api-impl/src/main/java/de/metas/rest_api/v2/attachment/AttachmentRestService.java | /*
* #%L
* de.metas.business.rest-api-impl
* %%
* Copyright (C) 2021 metas GmbH
* %%
* 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 version 2 of the
* License, or (at your optio... |
vazir/go-m3ua | messages/params/status.go | <filename>messages/params/status.go
// Copyright 2018-2020 go-m3ua authors. All rights reserved.
// Use of this source code is governed by a MIT-style license that can be
// found in the LICENSE file.
package params
// Status Type definitions.
const (
AsStateChange uint16 = iota + 1
Other
)
// Status Information d... |
rpiaggio/gsp-math | modules/tests/shared/src/test/scala/lucuma/core/model/PartnerSuite.scala | // Copyright (c) 2016-2021 Association of Universities for Research in Astronomy, Inc. (AURA)
// For license information see LICENSE or https://opensource.org/licenses/BSD-3-Clause
package lucuma.core.model
import lucuma.core.util.arb._
import lucuma.core.util.laws.EnumeratedTests
import munit._
final class PartnerS... |
CoderSong2015/Apache-Trafodion | core/sql/arkcmp/CmpErrLog.h | <reponame>CoderSong2015/Apache-Trafodion
// ***************************************************************************
// @@@ START COPYRIGHT @@@
//
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional... |
javipedrajo/uneat-c | materiales-clase/seccion_critica_threads_sem.c | <reponame>javipedrajo/uneat-c
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <sys/types.h>
#include <unistd.h>
#include <semaphore.h>
#include <fcntl.h>
#define LIMITE 1000000
void *incrementa();
void *decrementa();
static int global_var=0;
sem_t *mutex;
int main()
{
pthread_t suma, resta;
m... |
Eshy10/health-app | src/components/measureCard/MeasureCard.styles.js | <filename>src/components/measureCard/MeasureCard.styles.js
import { makeStyles } from '@material-ui/core/styles';
const useStyles = makeStyles({
root: {
minWidth: 275,
marginTop: '5em',
},
bullet: {
display: 'inline-block',
margin: '0 2px',
transform: 'scale(0.8)',
},
title: {... |
kuldeepkeshwar/cosmos | core/components/molecules/pagination-toolbar/pagination-toolbar.story.js | import React from 'react'
import { storiesOf } from '@storybook/react'
import { Example } from '@auth0/cosmos/_helpers/story-helpers'
import { PaginationToolbar } from '@auth0/cosmos'
storiesOf('Pagination Toolbar', module).add('default', () => (
<Example>
<PaginationToolbar items={20372} perPage={10} page={3} /... |
cmbkoko1989/cloud-pipeline | client/src/components/billing/reports/filters/runner-filter.js | /*
* Copyright 2017-2019 EPAM Systems, Inc. (https://www.epam.com/)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requ... |
kj84park/armeria | oauth2/src/main/java/com/linecorp/armeria/server/auth/oauth2/OAuth2AuthorizationFailureHandler.java | /*
* Copyright 2020 LINE Corporation
*
* LINE Corporation 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:
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless r... |
kstepanmpmg/mldb | sql/table_expression_operations.h | /** table_expression_operations.h -*- C++ -*-
<NAME>, 27 July 2015
Copyright (c) 2015 mldb.ai inc. All rights reserved.
This file is part of MLDB. Copyright 2015 mldb.ai inc. All rights reserved.
Operations on tables (implementations of a table expression).
*/
#pragm... |
EitanGayor/augur | tests-unit/input/benchmark-git2json-exec/node_modules/git2json/src/gitprocessor-plugin-relations.js | <filename>tests-unit/input/benchmark-git2json-exec/node_modules/git2json/src/gitprocessor-plugin-relations.js
/* module to link commits to each other */
module.exports = function(commits) {
Object.keys(commits).forEach(function(hash) {
var commit = commits[hash];
commit.parents = [];
commit.children = [];
});
... |
saasha05/Map-Implementation | params/RasterResult.java | package huskymaps.params;
import huskymaps.server.logic.Rasterer;
import java.util.Arrays;
/** The computed rastering result in response to a browser request. */
public class RasterResult {
/** The 2-dimensional string grid of map tilenames. */
public final Rasterer.Tile[][] grid;
/** The bounding upper... |
egovernments/iFix-Dev | domain-services/fiscal-event-post-processor/src/main/java/org/egov/service/FiscalEventDereferenceEnrichmentService.java | package org.egov.service;
import lombok.extern.slf4j.Slf4j;
import org.egov.common.contract.request.RequestHeader;
import org.egov.util.MasterDataConstants;
import org.egov.web.models.FiscalEvent;
import org.egov.web.models.FiscalEventDeReferenced;
import org.egov.web.models.FiscalEventRequest;
import org.springframe... |
jonestimd/swing-extensions | src/main/java/io/github/jonestimd/lang/Comparables.java | <reponame>jonestimd/swing-extensions
// The MIT License (MIT)
//
// Copyright (c) 2017 <NAME>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limi... |
mohdab98/cmps252_hw4.2 | src/cmps252/HW4_2/UnitTesting/record_4764.java | <reponame>mohdab98/cmps252_hw4.2<filename>src/cmps252/HW4_2/UnitTesting/record_4764.java
package cmps252.HW4_2.UnitTesting;
import static org.junit.jupiter.api.Assertions.*;
import java.io.FileNotFoundException;
import java.util.List;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Tag;
import org... |
s-nase/vanilla | Source/Rendering/Shaders/vaShaderCore.h | ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Original work Copyright (C) 2016-2021, Intel Corporation
// Modified work Copyright (C) 2022, Vanilla Blue team
//
// SPDX-License-Identifier: MIT
///////////////////////////////////////////////... |
pradeepkarki/JavaBasicPrograms | src/main/java/com/java/programs/faq/FactorialOfNumber.java | package com.java.programs.faq;
/**
*
* write a program to find the factorial of a number
*
*/
public class FactorialOfNumber {
public static void main(String[] args) {
int number =6;
int fact=1;
for(int i=1;i<=number;i++)
{
fact = fact * i;
}
System... |
CeH9/intellij-community | plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/j2me/MultiplyOrDivideByPowerOfTwoInspection.java | <filename>plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/j2me/MultiplyOrDivideByPowerOfTwoInspection.java
/*
* Copyright 2003-2018 <NAME>, <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 ob... |
milasuperstar/chaos-mesh | controllers/chaosimpl/iochaos/impl.go | // Copyright 2021 Chaos Mesh 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 agreed to... |
localwatcher/localwatcher.github.io | src/client/components/video/Video.js | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import Subtitles from '@client/components/Subtitles';
export default class Video extends Component {
static propTypes = {
src: PropTypes.string.isRequired,
playing: PropTypes.bool.isRequired,
time: PropTypes.numbe... |
Biovision/comunit-base | app/services/comunit/network/handlers/post_handler.rb | <filename>app/services/comunit/network/handlers/post_handler.rb
# frozen_string_literal: true
module Comunit
module Network
module Handlers
# Handling posts
class PostHandler < Comunit::Network::Handler
def self.since
10
end
def self.permitted_attributes
s... |
dallaval5u/COMET | COMET/measurement_plugins/Frequency Scan.py | # This file manages the stripscan measurements and it is intended to be used as a plugin for the QTC software
import logging
import sys
import numpy as np
from time import sleep
sys.path.append("../COMET")
try:
from .IVCV import IVCV_class
from .Stripscan import Stripscan_class
except:
from .stripscan imp... |
mdg/pygrate | setup.py | <gh_stars>1-10
#!/usr/bin/env python
from distutils.core import setup
setup(name='pygrate',
version='0.2',
description='Python DB Migration Framework',
author='<NAME>',
url='http://github.com/mdg/pygrate',
scripts=['bin/pygrate'],
packages=['pygration']
)
|
javashop/pangu | src/main/java/com/enation/pangu/model/Step.java | <reponame>javashop/pangu
package com.enation.pangu.model;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.enation.pangu.domain.PluginConfigVO;
... |
RubyOcelot/SPTAG-1 | AnnService/src/IVF/SimpleScorer.cpp | <filename>AnnService/src/IVF/SimpleScorer.cpp
#include "inc/IVF/SimpleScorer.h"
namespace IVF {
float SimpleScorer::score() {
if (currentItem != nullptr)
return currentItem->score();
else return -1.0;//TODO
}
SimpleScorer::SimpleScorer(PostingItemIter &pIter) : pIter(pIter) {
... |
Zenrer/p1xt-guides | evidence/tier-0/software-engineering-foundations/ryan_macdonald_recap_exercise_3/multiply.rb | def multiply(a, b)
return 0 if a == 0
if a > 0
b + multiply(a - 1, b)
else
-b + multiply(a + 1, b)
end
end
p multiply(3, 5) # => 15
p multiply(5, 3) # => 15
p multiply(2, 4) # => 8
p multiply(0, 10) # => 0
p multiply(-3, -6) # => 18
p multiply(3, -6) # => -18
p mul... |
jaylinhong/jdk14-learn | src/jdk14-source/java.naming/com/sun/naming/internal/FactoryEnumeration.java | <filename>src/jdk14-source/java.naming/com/sun/naming/internal/FactoryEnumeration.java
/*
* Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package com.sun.... |
kingtaurus/vogl | src/vogleditor/vogleditor_tracereplayer.cpp | <reponame>kingtaurus/vogl
#include "vogleditor_apicalltreeitem.h"
#include "vogleditor_apicallitem.h"
#include "vogleditor_frameitem.h"
#include "vogleditor_tracereplayer.h"
#include "vogl_find_files.h"
#include "vogl_file_utils.h"
#include "vogl_gl_replayer.h"
#include "vogleditor_output.h"
vogleditor_traceReplayer... |
VolgaKurvar/AtCoder | ABC117/ABC117c.py | <reponame>VolgaKurvar/AtCoder<gh_stars>0
# ABC117c
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)
n, m = map(int, input().split())
x = list(map(int, input().split()))
x.sort()
sa = []
for i in range(1, m):
sa.append(x[i]-x[i-1])
print(x)
print(sa)
print('aa')
for haba in range(x[-1]+1):
las... |
SeanGaoTesing/halo-master | src/main/java/run/halo/app/exception/ThemeNotFoundException.java | package run.halo.app.exception;
/**
* Theme not found exception.
*
* @author johnniang
* @date 2020-03-01
*/
public class ThemeNotFoundException extends BadRequestException {
public ThemeNotFoundException(String message) {
super(message);
}
public ThemeNotFoundException(String message, Throw... |
philipptrenz/conex.io | src/main/java/io/swagger/exception/HomeAutomationServerNotReachableException.java | package io.swagger.exception;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ResponseStatus;
/**
* The Class HomeAutomationServerNotReachableException.
*
* @author <NAME>
*/
@ResponseStatus(value=HttpStatus.SERVICE_UNAVAILABLE, reason="The home automation server is not... |
davidyuan/WagonWar | cocos2d/cocos/editor-support/cocostudio/WidgetReader/TextBMFontReader/TextBMFontReader.cpp |
#include "TextBMFontReader.h"
#include "ui/UITextBMFont.h"
USING_NS_CC;
using namespace ui;
namespace cocostudio
{
static TextBMFontReader* instanceTextBMFontReader = NULL;
IMPLEMENT_CLASS_WIDGET_READER_INFO(TextBMFontReader)
TextBMFontReader::TextBMFontReader()
{
}
T... |
bk7084/framework | bk7084/geometry/ray.py | <filename>bk7084/geometry/ray.py
from typing import Sequence
import numpy as np
from .shape import Shape
from ..graphics.util import DrawingMode
from ..math import Vec3
from ..misc import Color, PaletteDefault
class Ray(Shape):
def __init__(self, origin, direction, colors: Sequence[Color] = (PaletteDefault.Gree... |
UPB-FILS/alg | TP/TP2/ex11.js | 'use strict';
var etudiants = [
{ nom: 'Ion', prenom: 'Mihai', points_credit: 35},
{ nom: 'Popescu', prenom: 'Stefan', points_credit: 120},
{ nom: 'Dumitru', prenom: 'Ana-Maria', points_credit: 200},
{ nom: 'Vasile', prenom: 'Anca', points_credit: 170},
{ nom: 'Stanescu', prenom: 'George', points_c... |
dongLeHappy/vue_manage | src/api/lotteryCore/lc_timeTimeLottery/generalHigherPercent.js | <reponame>dongLeHappy/vue_manage
import request from '@/utils/request'
export function getTypeOrPercent() { // 游戏玩法管理接口
return request({
baseURL: 'http://192.168.50.81/mock/', // 请求自己配的json
url: '/5c9f805b21d4990ddb61f672/lotteryCore/lcConfig/lc_config/timeTimeLottery/generalHigherPercent',
method: 'get'
... |
mikkel1156/drago | drago/state/etcd/interface.go | package etcd
import (
"context"
"errors"
structs "github.com/seashell/drago/drago/structs"
"go.etcd.io/etcd/clientv3"
)
// Interfaces :
func (r *StateRepository) Interfaces(ctx context.Context) ([]*structs.Interface, error) {
prefix := resourceKey(resourceTypeInterface, "")
res, err := r.client.Get(ctx, pref... |
uthark/homebrew-core | Formula/djvu2pdf.rb | class Djvu2pdf < Formula
desc "Small tool to convert Djvu files to PDF files"
homepage "https://0x2a.at/site/projects/djvu2pdf/"
url "https://0x2a.at/site/projects/djvu2pdf/djvu2pdf-0.9.2.tar.gz"
sha256 "afe86237bf4412934d828dfb5d20fe9b584d584ef65b012a893ec853c1e84a6c"
bottle :unneeded
depends_on "djvulib... |
hetmanchuk/control | pkg/workflows/steps/amazon/create_vpc_test.go | <filename>pkg/workflows/steps/amazon/create_vpc_test.go
package amazon
import (
"bytes"
"context"
"os"
"testing"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/service/ec2"
"github.com/aws/aws-sdk-go/service/ec2/ec2iface"
"github.com/pkg/errors"
"github.co... |
Eshavish/TwitterAPIwithZip | node_modules/hdma-geoviewer/public/geoviewer/dev/v2.0/js/api/hdma.util.js | <reponame>Eshavish/TwitterAPIwithZip
if(!window.hdma){window.hdma={}}
hdma.util={
/**
* convert javascript object to html
* @param {Object} obj
* @param {Array} notShowArray is an array of string which is not shown in the html
* @return {String} html string
*/
objectToHtml: function(obj, notShowArray){
i... |
jiuchongyangzy/tangxiaoyi | gen/com/goide/psi/GoForStatement.java | <gh_stars>0
// This is a generated file. Not intended for manual editing.
package com.goide.psi;
import java.util.List;
import org.jetbrains.annotations.*;
import com.intellij.psi.PsiElement;
public interface GoForStatement extends GoStatement {
@Nullable
GoBlock getBlock();
@Nullable
GoExpression getExpres... |
One-E2-Team/ApartmentsWP | src/services/SearchService.java | package services;
import java.util.Calendar;
import java.util.Collection;
import java.util.Date;
import java.util.LinkedList;
import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.Context;
impo... |
fathelen/BioDWH2 | src/biodwh2-canadiannutrientfile/src/main/java/de/unibi/agbi/biodwh2/canadiannutrientfile/model/Measure.java | <gh_stars>1-10
package de.unibi.agbi.biodwh2.canadiannutrientfile.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
@JsonPropertyOrder({"MeasureID","MeasureDescription","MeasureDescriptionF"})
public class Measure {
@JsonProperty("MeasureID")
... |
leonardoc2o/nos.vc | acceptance/home_page_spec.rb | <reponame>leonardoc2o/nos.vc
# coding: utf-8
require File.expand_path(File.dirname(__FILE__) + '/acceptance_helper')
feature "Home Page Feature" do
scenario "When I visit home page, it should show a compilation of projects and curated pages" do
home_page = [
Factory(:project, created_at: 30.days.ago, ex... |
alanzh/alloy-ui | src/aui-editor/js/aui-editor-tools-plugin.js | <reponame>alanzh/alloy-ui
var Lang = A.Lang,
UA = A.UA,
JUSTIFY = 'justify',
BLOCK_TAGS = {
div: true,
h1: true,
h2: true,
h3: true,
h4: true,
h5: true,
h6: true,
p: true
},
IGNORE_TAGS = {
br: true
},
ITEM_TAGS = {
li: true
},
TPL_JUSTIFY = '<div style="text-align: {0};">{1}</div>';
... |
Jcw87/urde | Editor/SplashScreen.cpp | #include "SplashScreen.hpp"
#include "version.h"
#include "badging/Badging.hpp"
namespace metaforce {
#define SPLASH_WIDTH 555
#define SPLASH_HEIGHT 300
#define WIRE_START 0
#define WIRE_FRAMES 60
#define SOLID_START 40
#define SOLID_FRAMES 40
#define TEXT_START 80
#define TEXT_FRAMES 40
#define LINE_WIDTH 2
#defin... |
jct197/PeakInvestigator-Python-SDK | peakinvestigator/peakinvestigator_saas.py | <reponame>jct197/PeakInvestigator-Python-SDK
## -*- coding: utf-8 -*-
#
# Copyright (c) 2019, Veritomyx, Inc.
#
# This file is part of the Python SDK for PeakInvestigator
# (http://veritomyx.com) and is distributed under the terms
# of the BSD 3-Clause license.
import os
import requests
import tarfile
import zipfile
i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.