repo_name stringlengths 6 101 | path stringlengths 4 300 | text stringlengths 7 1.31M |
|---|---|---|
Kanaderu/spiking-ddpg-mapless-navigation | ros/catkin_ws/src/ecl/ecl_core/ecl_formatters/include/ecl/formatters/common.hpp | /**
* @file /include/ecl/formatters/common.hpp
*
* @brief Common formatting definitions.
*
* @date May 2009
**/
/*****************************************************************************
** Ifdefs
*****************************************************************************/
#ifndef ECL_FORMATTERS_COMMON_HPP... |
kanner/KnR_solutions | Chapter6/6-01/keyword_count.c | <gh_stars>0
/**
* Exercise 6-01, page 112
* Упражнение 6.01, страница 147
*
* Our version of getword does not properly handle underscores, string
* constants, comments, or preprocessor control lines. Write a better version.
*
* Наша версия getword не умеет корректно обрабатывать знаки подчеркивания,
* строковые... |
jeyavelnkl/Jel_Apps | tracks/db/migrate/036_add_project_completed_at_column.rb | class AddProjectCompletedAtColumn < ActiveRecord::Migration
class Project < ActiveRecord::Base; end
def self.up
add_column :projects, :completed_at, :datetime
@projects = Project.all
@projects.select{ |project| project.state == 'completed'}.each do |project|
project.completed_at = project.update... |
Yeeyao/leetcode-go | array/309_test.go | <reponame>Yeeyao/leetcode-go<filename>array/309_test.go
package array
import (
"testing"
)
func TestPro(t *testing.T) {
t.Run("123. Best Time to Buy and Sell Stock III", func(t *testing.T) {
input := []int{1, 2, 3, 0, 2}
want := 3
got := solution(input)
if got != want {
t.Errorf("got: %v, want: %v", got,... |
CiarraTech/analyticalmetlx | src/main/java/com/d2lvalence/idkeyauth/implementation/TimestampParser.java | /**
* D2LValence package, auth module.
*
* Copyright (c) 2012 Desire2Learn Inc.
*
* 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
*
... |
Hyracoidea/hyrax-backend | microservice/account-microservice/data/src/main/java/com/hyrax/microservice/account/data/mapper/AccountMapper.java | package com.hyrax.microservice.account.data.mapper;
import com.hyrax.microservice.account.data.entity.AccountEntity;
import org.apache.ibatis.annotations.Param;
import java.util.Collection;
import java.util.List;
public interface AccountMapper {
Collection<AccountEntity> selectAllByUsernames(@Param("usernames")... |
aryx/principia-softwarica | lib_graphics/libdraw/arith.c | <gh_stars>0
/*s: lib_graphics/libdraw/arith.c */
#include <u.h>
#include <libc.h>
#include <draw.h>
/*s: function [[Pt]] */
Point
Pt(int x, int y)
{
Point p;
p.x = x;
p.y = y;
return p;
}
/*e: function [[Pt]] */
/*s: function [[Rect]] */
Rectangle
Rect(int ax, int ay, int bx, int by)
{
Rectangle ... |
bitmark-inc/bitmark-sdk-java | api-service/src/main/java/com/bitmark/apiservice/WebSocketClient.java | <gh_stars>1-10
/**
* SPDX-License-Identifier: ISC
* Copyright © 2014-2019 Bitmark. All rights reserved.
* Use of this source code is governed by an ISC
* license that can be found in the LICENSE file.
*/
package com.bitmark.apiservice;
import io.github.centrifugal.centrifuge.*;
class WebSocketClient extends Even... |
abduegal/Microservice-Admin-Dashboard | example/src/main/java/com/aegal/example/ExampleService.java | <gh_stars>10-100
package com.aegal.example;
import com.aegal.example.resources.ExampleResource;
import com.aegal.framework.core.MicroserviceBundle;
import com.aegal.framework.core.MicroserviceConfig;
import com.aegal.framework.core.tenacity.InitializeTenacity;
import com.yammer.tenacity.core.bundle.TenacityBundleBuild... |
colinwjd/venus | src/main/java/com/colinwjd/venus/service/impl/EventServiceImpl.java | package com.colinwjd.venus.service.impl;
import com.colinwjd.venus.model.entity.Event;
import com.colinwjd.venus.repository.EventRepository;
import com.colinwjd.venus.service.EventService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.d... |
want-fly/huaweicloud-sdk-go-v3 | services/ief/v1/model/model_list_pods_request.go | package model
import (
"github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils"
"strings"
)
// Request Object
type ListPodsRequest struct {
// 指定节点查询应用实例, 可选, 与group_id、deployment_id、deployment_ids四选一
NodeId *string `json:"node_id,omitempty"`
// 指定节点组查询应用实例,可选,与node_id、deployment_id、deployment_ids四选一
GroupI... |
nogproject/nog | backend/internal/workflows/events/freeze-repo.go | package events
import (
"errors"
pb "github.com/nogproject/nog/backend/internal/nogfsopb"
"github.com/nogproject/nog/backend/pkg/ulid"
"github.com/nogproject/nog/backend/pkg/uuid"
)
// `WorkflowEvent_EV_FSO_FREEZE_REPO_STARTED_2` aka `EvFreezeRepoStarted2`.
// See freeze-repo workflow aka freezerepowf.
type EvFr... |
googlemaps/android-on-demand-rides-deliveries-samples | java/consumer/src/main/java/com/google/mapsplatform/transportation/sample/consumer/provider/service/RetryingFuture.java | <gh_stars>1-10
/* Copyright 2022 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law o... |
sartak/slate2 | src/ide/top-menu/index.js | <reponame>sartak/slate2<filename>src/ide/top-menu/index.js
import React, { useState } from 'react';
import './index.less';
import { SaveButton } from './save-button';
import { DownloadButton } from './download-button';
import { BuildButton } from './build-button';
import { PreviewButton } from './preview-button';
impor... |
r-lyeh/scriptorium | gamemonkey/src/gm/gmMachine.h | <filename>gamemonkey/src/gm/gmMachine.h
/*
_____ __ ___ __ ____ _ __
/ ___/__ ___ _ ___ / |/ /__ ___ / /_____ __ __/ __/_______(_)__ / /_
/ (_ / _ `/ ' \/ -_) /|_/ / _ \/ _ \/ '_/ -_) // /\ \/ __/ __/ / _ \/ __/
\___/\_,_/_/_/_/\__/_/ /_/\___/_//_/_/\_\... |
TalesMUD/talesmud | pkg/entities/traits/lookat.go | <gh_stars>10-100
package traits
//LookAt ...
type LookAt struct {
Detail string `bson:"detail,omitempty" json:"detail"`
}
|
sekikn/incubator-gobblin | gobblin-modules/gobblin-kafka-common/src/main/java/org/apache/gobblin/source/extractor/extract/kafka/KafkaStreamingExtractor.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 "License"); you may ... |
jdeolive/jeo | carto/src/main/java/org/jeo/carto/Prop.java | <reponame>jdeolive/jeo
package org.jeo.carto;
import org.jeo.filter.Expression;
import org.jeo.filter.Mixed;
public class Prop {
String key;
Expression value;
public Prop(String key) {
this.key = key;
}
public String getKey() {
return key;
}
public Expression getValue()... |
ebukaprof/UniMobile | app/src/main/java/com/uniport/www/uniportmobile/CodeOfConduct.java | <filename>app/src/main/java/com/uniport/www/uniportmobile/CodeOfConduct.java
package com.uniport.www.uniportmobile;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.widget.ListView;
import GneralCustomAdapter.AllCustomListAdapter;
/**
* Created by INNOVATIONIST-PC on 3/16/20... |
cdibbs/neoman-engine | lib/user-messager.js | <gh_stars>1-10
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Ref... |
uk-gov-mirror/ONSdigital.eq-survey-runner | app/data_model/app_models.py | from datetime import datetime
from dateutil.tz import tzutc
from marshmallow import Schema, fields, post_load, pre_dump
class QuestionnaireState:
def __init__(self, user_id, state_data, version):
self.user_id = user_id
self.state_data = state_data
self.version = version
self.creat... |
gadzhimari/dialog-web-components | src/components/SidebarRecentItem/utils/decorators.js | <filename>src/components/SidebarRecentItem/utils/decorators.js
/*
* Copyright 2018 dialog LLC <<EMAIL>>
* @flow
*/
import {
code,
bold,
italic,
strike,
emoji,
namedEmoji
} from '@dlghq/markdown/src/decorators';
const decorators = [
code,
bold,
italic,
strike,
emoji,
namedEmoji
];
export de... |
Raznic/Bailiwick | src/records/validators.py | import re
from django.core.exceptions import ValidationError
def validate_owner_subdomain(owner: str, domain: str) -> None:
"""
Validate that an owner is equal to, or a sub-domain of, a domain.
:param owner:
:param domain:
:return:
"""
subdomain_regex = f"^([a-z0-9]+(-[a-z0-9]+)*\\.)*{doma... |
BranchMetrics/branch_io_cli | lib/branch_io_cli/configuration/env_options.rb | module BranchIOCLI
module Configuration
class EnvOptions
def self.available_options
[
Option.new(
name: :completion_script,
description: "Get the path to the completion script for this shell",
default_value: false,
aliases: "-c"
),
... |
gamladz/gamladz.github.io | node_modules/material-icons-svg/components/round/ArtTrack.js | <gh_stars>0
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const react_1 = __importDefault(require("react"));
const ReactComponent = props => (react_1.... |
FreGalle/vitess | go/vt/sqlparser/sql.go | // Code generated by goyacc -o sql.go sql.y. DO NOT EDIT.
//line sql.y:18
package sqlparser
import __yyfmt__ "fmt"
//line sql.y:18
func setParseTree(yylex interface{}, stmt Statement) {
yylex.(*Tokenizer).ParseTree = stmt
}
func setAllowComments(yylex interface{}, allow bool) {
yylex.(*Tokenizer).AllowComments =... |
iboxdb/db4o-gpl | db4o.j/db4o-core/core/src/com/db4o/internal/query/result/IdTreeQueryResult.java | <gh_stars>10-100
/* Copyright (C) 2006 Versant Inc. http://www.db4o.com */
package com.db4o.internal.query.result;
import com.db4o.foundation.*;
import com.db4o.internal.*;
/**
* @exclude
*/
public class IdTreeQueryResult extends AbstractQueryResult{
private Tree _ids;
public IdTreeQueryResult... |
best08618/asylo | gcc-gcc-7_3_0-release/gcc/testsuite/gcc.target/i386/avx512f-klogic-2.c | /* { dg-do run } */
/* { dg-options "-mavx512f -O2" } */
/* { dg-require-effective-target avx512f } */
#include "avx512f-check.h"
void
avx512f_test (void)
{
__mmask16 dst, src1, src2, dst_ref;
volatile __m512 x = _mm512_setzero_ps();
__asm__( "kmovw %1, %0" : "=k" (src1) : "r" (0x0FFF) );
__asm__( "kmovw %1... |
sirinath/Harmony | drlvm/vm/tests/kernel/java/lang/ClassTestGetDeclaredConstructors.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 "License"); you... |
mayur9991/spring-security | oauth2/oauth2-jose/src/test/java/org/springframework/security/oauth2/jwt/JwtTests.java | /*
* Copyright 2002-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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... |
sam7k9621/ManagerUtils | Maths/src/RooFitExt.cc | <gh_stars>0
/*******************************************************************************
*
* Filename : RooFitExt.hpp
* Description : Implementation for RooFitExt.hpp defined functions
* Author : Yi-Mu "Enoch" Chen [ <EMAIL> ]
*
****************************************************************************... |
dawsonlp/herd | dm-code/dm-service/src/test/java/org/finra/dm/service/helper/DmDaoHelperTest.java | /*
* Copyright 2015 herd contributors
*
* 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 ... |
cflowe/ACE | TAO/tao/RTScheduling/Request_Interceptor.h | <filename>TAO/tao/RTScheduling/Request_Interceptor.h
// -*- C++ -*-
//
//$Id: Request_Interceptor.h 81429 2008-04-24 18:49:54Z johnnyw $
#ifndef TAO_RTSCHEDULING_REQUEST_INTERCEPTOR_H
#define TAO_RTSCHEDULING_REQUEST_INTERCEPTOR_H
#include "tao/RTScheduling/rtscheduler_export.h"
#include "tao/RTScheduling/RTScheduler... |
ZenPylon/professional-services | tools/ml-auto-eda/ml_eda/orchestration/analysis_tracker.py | # Copyright 2019 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... |
ibaca/functional-rosetta-stone | problems/src/test/java/utils/EndToEnd.java | <reponame>ibaca/functional-rosetta-stone
package utils;
public interface EndToEnd { } |
megahertz0/android_thunder | dex_src/com/baidu/mobads/j/s.java | <reponame>megahertz0/android_thunder
package com.baidu.mobads.j;
import android.content.Context;
import android.graphics.Rect;
import android.os.PowerManager;
import android.util.DisplayMetrics;
import android.view.View;
import com.baidu.mobads.interfaces.utils.IXAdViewUtils;
import com.xunlei.tdlive.R;
import com.xun... |
weucode/COMFORT | artifact_evaluation/data/codeCoverage/die_generate/149.js | <reponame>weucode/COMFORT
for (var i = 0; i < -NaN; i++) {
i *= i;
}
|
arrow-lang/arrow-legacy | include/arrow/ast/nodes/node.hpp | // Copyright (c) 2014-2015 <NAME>, All Rights Reserved.
// Distributed under the MIT License
// See accompanying file LICENSE
#ifndef ARROW_AST_NODES_NODE_H
#define ARROW_AST_NODES_NODE_H 1
#include "arrow/ref.hpp"
#include "arrow/span.hpp"
namespace arrow {
namespace ast {
struct Visitor;
/// Abstract base class... |
Sherlock-Shock/community_vue | src/api/login.js | <filename>src/api/login.js<gh_stars>0
import {request} from 'utils/request.js';
export function login(userid1,password1){
let param = new URLSearchParams()
param.append('userid', userid1)
param.append('password', <PASSWORD>)
return request({
url: '/login',
method: 'post',
data: param
})
}
|
heyingquan13/kafka | clients/src/test/java/org/apache/kafka/common/requests/RequestHeaderTest.java | <reponame>heyingquan13/kafka
/*
* 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
... |
mattcobb/codekit-java | codekit/src/main/java/com/att/api/aab/service/ContactResultSet.java | /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
/*
* Copyright 2014 AT&T
*
* 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
... |
lukaszlaszuk/insightconnect-plugins | plugins/zscaler/icon_zscaler/actions/get_sandbox_report_for_hash/schema.py | # GENERATED BY KOMAND SDK - DO NOT EDIT
import insightconnect_plugin_runtime
import json
class Component:
DESCRIPTION = "Get a full report for an MD5 hash of a file that was analyzed by Sandbox"
class Input:
HASH = "hash"
class Output:
FULL_REPORT = "full_report"
class GetSandboxReportForHas... |
AllanKerr/attachment | icons/cs-30-icons.js | <filename>icons/cs-30-icons.js<gh_stars>0
/* eslint-disable max-len */
import '@polymer/polymer/polymer-legacy.js';
import '@polymer/iron-iconset-svg/iron-iconset-svg.js';
const $_documentContainer = document.createElement('template');
$_documentContainer.innerHTML = `<iron-iconset-svg name="d2l-cs-30" size="30" rtl-... |
Royalone-mobile/NoPlayer | core/src/main/java/com/novoda/noplayer/internal/mediaplayer/SystemProperties.java | <filename>core/src/main/java/com/novoda/noplayer/internal/mediaplayer/SystemProperties.java
package com.novoda.noplayer.internal.mediaplayer;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
/**
* This class uses reflection to call android.os.SystemProperties.get(String) since the... |
NotJustAToy/falcon-heavy | falcon_heavy/contrib/django/decorators.py | # Copyright 2019-2020 Not Just A Toy Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... |
AtomicGameEngine/AtomicPrototypes | ParticleEmitter3D/JavaScript/Resources/Components/UI.js | 'atomic component';
//define font description style
var fd = new Atomic.UIFontDescription();
fd.id = "Vera";
fd.size = 22;
var particleEmitter;
function createButton(self, text, peffectName, layout) {
//create UIButton element
var button = new Atomic.UIButton();
//set its text and font description style
... |
qiuhoude/skynet_learn_dir | learn/cpp_learn/RefrenceDemo.cpp | <filename>learn/cpp_learn/RefrenceDemo.cpp
#include <iostream>
using namespace std;
/*
引用必须在定义的同时初始化,并且以后也要从一而终,不能再引用其它数据,这有点类似于常量(const 变量)。
注意,引用在定义时需要添加&,在使用时不能添加&,使用时添加&表示取地址
*/
void swap1(int a, int b);
void swap2(int *p1, int *p2);
void swap3(int &r1, int &r2);
int &plus10(int &r) // 返回ref类型
{
cout << "in ... |
TonnyRed/sedna | kernel/tr/strings/text_data.h | <filename>kernel/tr/strings/text_data.h<gh_stars>10-100
/*
* File: text_data.h
* Copyright (C) 2006 The Institute for System Programming of the Russian Academy of Sciences (ISP RAS)
*/
#ifndef _TEXT_DATA_H
#define _TEXT_DATA_H
#include "common/sedna.h"
#include "common/xptr.h"
#include "strings_base.h"
struct te... |
OstVoj/Electron_React | app/components/tab/common/TabButtonContainer.js | import React from 'react';
import PropTypes from 'prop-types';
import Col from '../../sections/Col';
import Row from '../../sections/Row';
import styles from './TabButtonContainer.css';
const TabButtonContainer = ({ onSave, onCancel, onClear }) => (
<Row p c>
<Col w={33}>
<button
type="button"
... |
paullewallencom/java-978-1-8471-9440-4 | _src/Chapter_14/ch14/WebServiceVersioning/02_WebService20070101/src/com/binildas/esb/servicemix/ws/version20070101/IHello.java | <filename>_src/Chapter_14/ch14/WebServiceVersioning/02_WebService20070101/src/com/binildas/esb/servicemix/ws/version20070101/IHello.java
package com.binildas.esb.servicemix.ws.version20070101;
// version20070101.ws.servicemix.esb.binildas.com
public interface IHello{
String hello(String param);
} |
jadonk/debexpo | debexpo/config/routing.py | # -*- coding: utf-8 -*-
#
# routing.py — Routes configuration
#
# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/
#
# Copyright © 2008 <NAME> <<EMAIL>>
# Copyright © 2010 <NAME> <<EMAIL>>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this so... |
Kosoku/Ditko | Ditko/iOS/UIColor+KDIExtensions.h | <filename>Ditko/iOS/UIColor+KDIExtensions.h
//
// UIColor+KDIExtensions.h
// Ditko
//
// Created by <NAME> on 3/7/17.
// Copyright © 2021 Kosoku Interactive, LLC. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the L... |
mmattamala/gtsam.org | doxygen/a01472.js | var a01472 =
[
[ "bound", "a01472.html#a3893277d250edd92b03ac9f3cdc0384c", null ]
]; |
dm7h/fpga-event-recorder | src/Logikanalysator/USB-TPLE/v_1.0/PC_Software/urjtag-0.10/src/flash/flash.c | /*
* $Id: flash.c 1488 2009-04-10 20:12:02Z arniml $
*
* Copyright (C) 2002 ETC s.r.o.
*
* 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 op... |
JamesCao2048/BlizzardData | Corpus/aspectj/3927.java | <gh_stars>1-10
import symbols.Helper;
import org.aspectj.testing.Tester;
import org.aspectj.tools.ide.SymbolManager;
import org.aspectj.tools.ide.SourceLine;
import org.aspectj.tools.ide.Declaration;
import java.io.File;
public class CrosscutTest {
private static Helper h = new Helper();
public static void ... |
kagwicharles/Seniorproject-ui | node_modules/@iconify/icons-ic/twotone-auto-fix-high.js | <filename>node_modules/@iconify/icons-ic/twotone-auto-fix-high.js<gh_stars>0
var data = {
"body": "<path opacity=\".3\" d=\"M4.415 18.167l7.17-7.17l1.414 1.414l-7.17 7.17z\" fill=\"currentColor\"/><path d=\"M20 7l.94-2.06L23 4l-2.06-.94L20 1l-.94 2.06L17 4l2.06.94zM8.5 7l.94-2.06L11.5 4l-2.06-.94L8.5 1l-.94 2.06L5.5 4... |
alchon/Image_editor | src/components/ui/Tools.js | <gh_stars>1-10
import React, {Component} from 'react';
import '../../css/ui/Tools.scss';
export default class Tools extends Component {
constructor(props){
super(props);
this.state = {
info : true
}
}
componentDidMount(){
// console.log('Tools UI Mount');
}
componentDidUpdate(){
// ... |
bbarber9/rpgtools | packages/frontend/src/hooks/authentication/useLogin.js | import { useApolloClient, useMutation } from "@apollo/client";
import gql from "graphql-tag";
export const LOGIN_QUERY = gql`
mutation login($username: String!, $password: String!) {
login(username: $username, password: $password) {
_id
}
}
`;
export default (callback) => {
const client = useApolloClient();
... |
eleritec/fractal-ui | src/main/java/net/eleritec/fractalui/dialog/AbstractDialogLauncher.java | <filename>src/main/java/net/eleritec/fractalui/dialog/AbstractDialogLauncher.java
package net.eleritec.fractalui.dialog;
import javax.swing.*;
import net.eleritec.fractalui.AbstractUI;
import net.eleritec.fractalui.AbstractView;
import net.eleritec.fractalui.AbstractViewController;
import net.eleritec.fractalui.util.... |
CaptainSora/Python-Project-Euler | PE045.py | <filename>PE045.py
from itertools import count
from _polygonal_tools import is_polygonal, poly
def in_all(min_val):
"""
Finds the first number greater than min_val which is triangular,
pentagonal, and hexagonal.
"""
# Every hexagonal number is also triangular.
for t in count(1):
hex =... |
funrunskypalace/vnpy | vnpy/api/xtp/generator/xtp_struct_common.py | XTPRspInfoStruct = {
"error_id": "int",
"error_msg": "string",
}
XTPRI = XTPRspInfoStruct
|
Ddnirvana/test-CI | openeuler-kernel/include/linux/crash_core.h | /* SPDX-License-Identifier: GPL-2.0 */
#ifndef LINUX_CRASH_CORE_H
#define LINUX_CRASH_CORE_H
#include <linux/linkage.h>
#include <linux/elfcore.h>
#include <linux/elf.h>
#define CRASH_CORE_NOTE_NAME "CORE"
#define CRASH_CORE_NOTE_HEAD_BYTES ALIGN(sizeof(struct elf_note), 4)
#define CRASH_CORE_NOTE_NAME_BYTES ALIGN... |
enquora/hotdraw.js | src/Figures/LineFigure.js | /**
* Hotdraw.js : LineFigure
*
* {Comments are copied from the Java Implementation of HotDraw}
*
* A line figure.
*
* @author <NAME>. <<EMAIL>>
* @copyright 2004-2017 Web Semantics, Inc.
* @license http://www.opensource.org/licenses/mit-license.php MIT
* @link http://websemantics.ca
* @... |
toastier/srf | app/controllers/openings.server.controller.js | 'use strict';
/**
* Module dependencies.
*/
var mongoose = require('mongoose'),
Opening = mongoose.model('Opening'),
_ = require('lodash');
/**
* Get the error message from error object
*/
var getErrorMessage = function (err) {
var message = '';
if (err.code) {
switch (err.code) {
case 11000:
... |
dreimannzelt/layer-ruby | spec/layer/client_spec.rb | <filename>spec/layer/client_spec.rb
require 'spec_helper'
describe Layer::Client do
describe 'default configuration' do
describe '.app_id' do
before do
ENV['LAYER_APP_ID'] = 'layer_app_id'
end
it 'should default to LAYER_APP_ID environment variable' do
expect(Layer::Client.app_... |
tusharchoudhary0003/Custom-Football-Game | sources/com/google/zxing/p204f/p206b/C10269b.java | package com.google.zxing.p204f.p206b;
import java.lang.reflect.Array;
/* renamed from: com.google.zxing.f.b.b */
/* compiled from: ByteMatrix */
public final class C10269b {
/* renamed from: a */
private final byte[][] f31124a;
/* renamed from: b */
private final int f31125b;
/* renamed from: c... |
mauguignard/cbmc | regression/cbmc/struct7/main.c | struct my_struct
{
int i;
int array[10];
} s;
void f(int *p)
{
int diff;
diff=p-&s.array[0];
// should pass
*p=1;
}
int main()
{
int ind, x;
ind=x;
int *p=&s.array[ind];
if(ind>=0 && ind<=9)
f(p);
}
|
madnight/gitter | server/utils/secure-method.js | <gh_stars>0
'use strict';
var Promise = require('bluebird');
var StatusError = require('statuserror');
function iterateValidators(validators, context, args) {
if (typeof validators === 'function') {
return Promise.try(function() {
return validators.apply(context, args);
});
}
if (!validators.leng... |
messyKassaye/my_stock | resources/js/home/loan/state/HomeLoanReducer.js | <reponame>messyKassaye/my_stock
import {combineReducers} from 'redux'
import HomeLoanReducer from './reducers/HomeLoanReducer'
export default combineReducers({
homeLoanReducer:HomeLoanReducer
})
|
1757WestwoodRobotics/2022-RapidReact | commands/intake/autoballintake.py | <filename>commands/intake/autoballintake.py
from commands2 import CommandBase
from networktables import NetworkTables
from wpimath.trajectory import TrapezoidProfile, TrapezoidProfileRadians
from wpimath.controller import ProfiledPIDController, ProfiledPIDControllerRadians
from wpilib.geometry import Rotation2d
from wp... |
quienmedebe/api-rest | test/unit/shared/wrapAsync.test.js | const sinon = require('sinon');
const wrapAsync = require('../../../src/modules/shared/wrapAsync');
describe('Shared -> wrapAsync', function () {
it('given a failed promise, should execute the parameter next with the error', async function () {
const fn = sinon.stub().rejects();
const next = sinon.stub();
... |
htlcnn/ironpython-stubs | release/stubs.min/Autodesk/Revit/UI/__init___parts/RadioButtonGroup.py | <reponame>htlcnn/ironpython-stubs
class RadioButtonGroup(RibbonItem):
""" Represents a group of related buttons in the Ribbon. """
def AddItem(self,buttonData):
"""
AddItem(self: RadioButtonGroup,buttonData: ToggleButtonData) -> ToggleButton
Adds a new ToggleButton to the RadioButtonGroup.
... |
Reinserev/ubb.dp.1819 | src/main/java/popa/catalin/lab1/domain/Coffee.java | package popa.catalin.lab1.domain;
import popa.catalin.lab1.CoffeeException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
public abstract class Coffee implements Drinkable {
protected static Ingredient twoCupsWater = new Ingredient(2.0f, "cups", "water"... |
JeffreyRiggle/textadventurelib | src/main/java/textadventurelib/persistence/TransitionPersistenceObject.java | <gh_stars>0
package textadventurelib.persistence;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.TransformerConfigurationException;
import ilusr.persistencelib.configuration.PersistXml;
import ilusr.persistencelib.configuration.XmlConfigurationObject;
/**
*
* @author <NAME>
*
... |
ktanidis2/Modified_CosmoSIS_for_galaxy_number_count_angular_power_spectra | cosmosis-standard-library/likelihood/planck2015/plc-2.0/src/clik_lensing.c | #include "clik_lensing.h"
#include "pmc.h"
#include "cldf/cldf.h"
#include "lenslike/plenslike/plenslike.h"
#define _dealwitherr error *lerr,**err; if(_err==NULL) {lerr=NULL;err=&lerr;} else {err=_err;}
#define _forwardError(A,B,C) if(_err!=NULL) {forwardError(A,B,C);} else {quitOnError(A,B,stderr);}
#define _testErro... |
yurloc/uberfire | uberfire-io/src/main/java/org/uberfire/io/IOClusteredService.java | <filename>uberfire-io/src/main/java/org/uberfire/io/IOClusteredService.java
package org.uberfire.io;
public interface IOClusteredService extends IOService {
void start();
}
|
l33tnobody/l33t_sol | src/738MonotoneIncreasingDigits.java | <reponame>l33tnobody/l33t_sol
class Solution {
public int monotoneIncreasingDigits(int N) {
char[] digits = (N + "").toCharArray();
int pos = digits.length;
for(int i = digits.length - 1; i > 0; i--) {
if(digits[i-1] > digits[i]) {
pos = i; // will set to 9 from ... |
hiloWang/notes | Android/00-Code/MobileGuard/app/src/main/java/com/itheima/mobileguard/activities/LostSetup1Activity.java | <gh_stars>1-10
package com.itheima.mobileguard.activities;
import android.os.Bundle;
import com.itheima.mobileguard.R;
public class LostSetup1Activity extends BaseLostSetupActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContent... |
Bobholamovic/SimpleCV | simplecv/core/default_backward.py | <filename>simplecv/core/default_backward.py
import warnings
try:
from apex import amp
except ImportError:
# warnings.warn("If you want to use apex, please install apex from https://www.github.com/nvidia/apex")
pass
__all__ = [
'amp_backward'
]
def amp_backward(self, total_loss, optimizer):
with ... |
antisvin/er-301 | mods/core/objects/heads/RecordHead.cpp | #include <core/objects/heads/RecordHead.h>
#include <math.h>
namespace od
{
RecordHead::RecordHead()
{
}
RecordHead::~RecordHead()
{
}
void RecordHead::zeroBuffer()
{
if (mpSample)
{
mpSample->zero();
}
}
} /* namespace od */
|
Svvarg/tallDoors | src/main/java/tektor/minecraft/talldoors/doorworkshop/entity/doorparts/NullPartEntity.java | <gh_stars>0
package tektor.minecraft.talldoors.doorworkshop.entity.doorparts;
import net.minecraft.entity.Entity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.World;
public class NullPartEntity extends AbstractDoorPart{
public NullPartEntity(World par1World) {
super(par1World);
}
public N... |
xlf999/AdsDemo | MobGiAdSDK/AggregationAdThirdSDKs/Glispa/1.9.8/LingTuiAudience.h | //
// LingTuiUser.h
// LingTuiLibrary
//
// Created by sweetchao on 16/11/4.
// Copyright © 2016年 LingTui. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface LingTuiAudience : NSObject
@property(nonatomic,assign) int age;/*用户年龄*/
@property(nonatomic,assign) int gender; /*性别 : 0:未知;1:男;2:女;*/
@pr... |
flier/gocombine | pkg/option/option.go | package option
import "fmt"
// Option represents an optional value: every Option is either Some and contains a value, or None, and does not.
type Option[T any] struct {
v *T
}
func (o Option[T]) String() string {
if o.v != nil {
if s, ok := interface{}(o.v).(fmt.Stringer); ok {
return s.String()
}
return... |
Pooja2589/TechnoHelpers | harviewer/tests/functional/config.js | define([], function() {
// These are custom properties that the tests can grab.
// harViewerBase: The root URL to the harviewer app.
// testBase: The root URL to the harviewer test pages, HARs and HARPs.
// We use the .lan suffixin this example to appease Microsoft Edge that doesn't like
// browsing to singl... |
ydong08/GooglePay_AP | terminalapp/com/google/android/libraries/commerce/hce/crypto/SmartTap2CryptoModule.java | package com.google.android.libraries.commerce.hce.crypto;
import android.app.Application;
import com.google.android.libraries.commerce.hce.crypto.SmartTap2ECKeyManager.CryptoClientWrapper;
import com.google.android.libraries.commerce.hce.crypto.SmartTap2ECKeyManager.KeyFactoryWrapper;
import com.google.android.librari... |
Yelp/mycroft | mycroft/tests/logic/test_aws_resources.py | # -*- coding: utf-8 -*-
from boto.dynamodb2.fields import HashKey
from boto.dynamodb2.table import Table
from boto.dynamodb2.types import STRING
import pytest
import staticconf.testing
from mycroft.logic.aws_resources import check_dynamodb
from mycroft.logic.aws_resources import dynamodb_table_names
from tests.models.... |
nospk/crm-mini-spa | app/models/invoice_sell.js | <gh_stars>1-10
const mongoose = require('mongoose');
const Invoice_sell_Schema = mongoose.Schema({
serial: {
type: String,required: true
},
type:{
type: String, required: true //sell - back
},
company:{
type: mongoose.Schema.Types.ObjectId, required: true, ref:'Company'
},
stor... |
lihanxiang/msims | src/main/java/com/lee/msims/service/moodle/AssignmentService.java | package com.lee.msims.service.moodle;
import com.lee.msims.pojo.moodle.Assignment;
import java.util.List;
public interface AssignmentService {
// Insert
void createAssignment(Assignment assignment);
// Update
void editAssignmentInfo(Assignment assignment);
// Select
Assignment getAssignment... |
GmallPlatform/gmall | stuff/controllers/getAllData.js | 'use strict';
var myUtil=require('./myUtil.js');
function getData(model,method,options,c){
return new Promise(function(resolve,reject){
if(method=='load'){
options=options.criteria;
}
model[method](options,function(err, results){
/*if(method=='load'){
/... |
Chill-Studies/Chill-Studies | APIs/utils/email.js | <reponame>Chill-Studies/Chill-Studies<filename>APIs/utils/email.js
const nodemailer = require("nodemailer");
const sendEmail = async option => {
console.log(option);
//1) create a transfer
const transporter = nodemailer.createTransport({
host: process.env.MAIL_HOST,
port: process.env.MAIL_PORT,
auth:... |
camelCaseD/gravit | src/infinity-editor/guide/guides.js | <reponame>camelCaseD/gravit
(function (_) {
/**
* The guide manager
* @param {IFScene} scene
* @class IFGuides
* @extend IFEventTarget
* @constructor
*/
function IFGuides(scene) {
this._scene = scene;
this._guides = [];
this._counter = 0;
this._visua... |
dvreeze/yaidom3 | jvm/src/test/scala/eu/cdevreeze/yaidom3/props/DefaultElemGenerator.scala | <reponame>dvreeze/yaidom3<gh_stars>0
/*
* Copyright 2021-2021 <NAME>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless require... |
BlackBeltPanda/ViaVersion | common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9_1to1_9/Protocol1_9_1To1_9.java | package us.myles.ViaVersion.protocols.protocol1_9_1to1_9;
import us.myles.ViaVersion.api.PacketWrapper;
import us.myles.ViaVersion.api.data.UserConnection;
import us.myles.ViaVersion.api.protocol.Protocol;
import us.myles.ViaVersion.api.remapper.PacketHandler;
import us.myles.ViaVersion.api.remapper.PacketRemapper;
im... |
seanlinc/Playmate | sjtwo-c/toolchains/windows/mingw/msys/1.0/include/sys/cygwin.h | /* sys/cygwin.h
Copyright 1997, 1998, 2000, 2001 Red Hat, Inc.
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
#ifndef _SYS_CYGWIN_H
#define _SYS_CYGWIN_H
#include <sys/types.h>
#ifdef __c... |
BenWeber42/dawn | gtclang/src/gtclang/Frontend/GTClangIncludeChecker.h | <reponame>BenWeber42/dawn
//===--------------------------------------------------------------------------------*- C++ -*-===//
// _ _
// | | | |
// __ _| |_ ___| | __ _ _ __ __ _
// / _` | __/ __| |/ _` | '_ \ / _` |
// ... |
aabir13/java | Basics/StaticBlock.java | <reponame>aabir13/java<filename>Basics/StaticBlock.java
//Code to understand the concept of static block and instance block
public class StaticBlock
{
/*Static block is that segment of code which is executed before the main method.
A particular code can have multiple static blocks each of which shall be execut... |
opetstudio/dashboard-reactjs | public/native-script.js | <reponame>opetstudio/dashboard-reactjs<gh_stars>0
// window.MerchantCreatePageComponentComponentWillMount = function () {
// $('body').attr('class', 'hold-transition skin-blue sidebar-mini')
// console.log('MerchantCreatePageComponentComponentWillMount')
// }
// window.MerchantCreatePageComponentComponentDidMount... |
guipernicone/orange-talents-02-template-proposta | src/main/java/com/zup/orange/proposta/entity/proposal/request/CreateProposalRequest.java | <gh_stars>0
package com.zup.orange.proposta.entity.proposal.request;
import com.zup.orange.proposta.entity.proposal.Proposal;
import com.zup.orange.proposta.validation.CPFOrCNPJ;
import org.springframework.util.Assert;
import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import jav... |
kevinychen/snap2 | snap-app/src/parser/popup.js | import * as classNames from "classnames";
import React from "react";
import "./popup.css"
export class Popup extends React.Component {
render() {
return (
<div
className={classNames("popup", this.customClass(), { "hide": !this.props.isVisible })}
>
{... |
ramisseker/SayacApp- | src/components/MeterReadInfoCard/index.js | <gh_stars>0
import {Button, Image, Text, TextInput, View} from 'react-native';
import {PropTypes, ViewPropTypes} from '~/components/config';
import React, {useState} from 'react';
import VectorImage from 'react-native-vector-image';
import {checkGray} from '~assets';
import moment from 'moment';
import styles from './... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.