repo_name stringlengths 6 101 | path stringlengths 4 300 | text stringlengths 7 1.31M |
|---|---|---|
jakubknejzlik/js-core-data | lib/Descriptors/MigrationDescription.js | <reponame>jakubknejzlik/js-core-data<gh_stars>1-10
// Generated by CoffeeScript 1.10.0
(function() {
var EntityDescription, MigrationDescription;
EntityDescription = require('../Descriptors/EntityDescription');
MigrationDescription = (function() {
function MigrationDescription(modelFrom, modelTo) {
th... |
fireairforce/leetCode-Record | leetcode/1095. 山脉数组中查找目标值.js | /**
* @param {number} target
* @param {MountainArray} mountainArr
* @return {number}
*/
var findInMountainArray = function(target, mountainArr) {
let left = 0
let right = mountainArr.length() - 1
// 寻找山峰
while (left < right) {
// 取中位数,向下取整
const mid = (left + right) / 2 | 0
if (mountainArr.get(... |
ArthasZhang007/15418FinalProject | pin-3.22-98547-g7a303a835-gcc-linux/source/tools/ToolUnitTests/lpd.c | <reponame>ArthasZhang007/15418FinalProject<filename>pin-3.22-98547-g7a303a835-gcc-linux/source/tools/ToolUnitTests/lpd.c
/*
* Copyright (C) 2009-2021 Intel Corporation.
* SPDX-License-Identifier: MIT
*/
#include <stdint.h>
#include <stdio.h>
typedef struct
{
uint64_t data[2] __attribute__((aligned(16)));
} XMM... |
Ewpratten/frc_971_mirror | y2018/control_loops/superstructure/intake/sensor_unwrap.h | #ifndef Y2018_CONTROL_LOOPS_SUPERSTRUCTURE_INTAKE_SENSOR_UNWRAP_H_
#define Y2018_CONTROL_LOOPS_SUPERSTRUCTURE_INTAKE_SENSOR_UNWRAP_H_
namespace y2018 {
namespace control_loops {
namespace superstructure {
namespace intake {
// UnwrapSensor takes in a sensor value from a sensor that loops in a certain
// interval. ex(... |
bipinu/consent-manager-web-ext | tests/unit/scripts/popup_scripts/utils/SiteParser.spec.js | <filename>tests/unit/scripts/popup_scripts/utils/SiteParser.spec.js
import { Site } from '../../../../../app/scripts/entities';
import { SiteParser } from '../../../../../app/scripts/popup_scripts/utils/SiteParser';
describe('SiteParser', () => {
let json;
beforeEach(() => {
json = {
url: 'https://compl... |
whwu123/zf | src/main/java/com/active4j/hr/hr/service/impl/OaHrTrainPlanServiceImpl.java | <reponame>whwu123/zf
package com.active4j.hr.hr.service.impl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.active4j.hr.hr.dao.OaHrTrainPlanDao;
import com.active4j.hr.hr.entity.OaHrTrainPlanEntity;
import com.active4j.hr.hr.service.O... |
josesilva1987/ms-students | node_modules/@nestjs/core/injector/modules-container.js | <filename>node_modules/@nestjs/core/injector/modules-container.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ModulesContainer = void 0;
const uuid_1 = require("uuid");
class ModulesContainer extends Map {
constructor() {
super(...arguments);
this._applicatio... |
henrikingo/dsi | bin/tests/test_rules.py | """Unit tests for the rules module. Run using nosetests."""
import os
import unittest
from dateutil import parser as date_parser
from nose.tools import nottest
import libanalysis.rules as rules
import libanalysis.readers as readers
import libanalysis.util as util
from test_lib.fixture_files import FixtureFiles
FIX... |
rohankumardubey/cayenne | cayenne-client/src/test/java/org/apache/cayenne/remote/ValueInjectorIT.java | <reponame>rohankumardubey/cayenne
/*****************************************************************
* 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 ownershi... |
impbk2002/bartworks | src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/tile/GT_WandBuffer.java | <gh_stars>10-100
/*
* Copyright (c) 2018-2020 bartimaeusnek
*
* 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... |
nulogy/design-system | src/utils/deprecatedProp.js | <filename>src/utils/deprecatedProp.js<gh_stars>10-100
/* eslint-disable no-console */
export const deprecatedProp = (propType, newPropName) => {
return (props, propName, componentName, ...rest) => {
if (props[propName] != null) {
const message = `NDS Warning: "${propName}" prop of "${componentName}" has bee... |
atlasapi/atlas | src/test/java/org/atlasapi/remotesite/ContentMergerTest.java | package org.atlasapi.remotesite;
import java.util.List;
import java.util.Set;
import org.atlasapi.media.entity.Alias;
import org.atlasapi.media.entity.Broadcast;
import org.atlasapi.media.entity.Encoding;
import org.atlasapi.media.entity.Episode;
import org.atlasapi.media.entity.Item;
import org.atlasapi.media.entity... |
jonfisik/ScriptsPython | Scripts7/Script60v2.py | ''''fatorial por função'''
from math import factorial
num = int(input("Digite um número para calcular seu fatorial: "))
f = factorial(num)
print('O fatorial de {} é {}.'.format(num,f)) |
nandakumar131/hadoop-ozone | hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/validation/package-info.java | <reponame>nandakumar131/hadoop-ozone
/*
* 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, Ve... |
pkb9239/baekJoonCT | b2562/app1.js | const fs = require('fs');
const arr = require('jshint/data/non-ascii-identifier-start');
const filePath = process.platform === 'linux' ? '/dev/stdin' : './input.txt';
let input = fs.readFileSync(filePath).toString().split('\n');
input = input.map((item) => +item);
solution(input);
function solution(array) {
let m... |
Sroka/sample-social-sign-in-app | app/src/main/java/com/sample/signin/app/util/DialogFactory.java | <filename>app/src/main/java/com/sample/signin/app/util/DialogFactory.java
package com.sample.signin.app.util;
import android.app.Dialog;
import android.content.Context;
import android.support.annotation.StringRes;
import android.support.v7.app.AlertDialog;
import com.sample.signin.app.R;
public class DialogFactory {... |
CJ-Zheng1023/knowledge-forum | public/lib/ckeditor/ckeditor/plugins/uploadwidget/plugin.js | <filename>public/lib/ckeditor/ckeditor/plugins/uploadwidget/plugin.js
'use strict';
( function() {
CKEDITOR.plugins.add( 'uploadwidget', {
lang: 'en,zh-cn', // %REMOVE_LINE_CORE%
requires: 'widget,clipboard,filetools,notificationaggregator',
init: function( editor ) {
// Images which should be changed in... |
communitysoft/gather | spec/policies/meals/formula_policy_spec.rb | # frozen_string_literal: true
require "rails_helper"
describe Meals::FormulaPolicy do
describe "permissions" do
include_context "policy permissions"
let(:formula) { create(:meal_formula) }
let(:record) { formula }
permissions :index?, :show? do
it_behaves_like "permits cluster and super admin... |
RDKRACZ/AzureDoom-Doom-Fabric | src/main/java/mod/azure/doom/entity/tierheavy/Revenant2016Entity.java | package mod.azure.doom.entity.tierheavy;
import java.time.LocalDate;
import java.time.temporal.ChronoField;
import java.util.Random;
import mod.azure.doom.entity.DemonEntity;
import mod.azure.doom.entity.projectiles.entity.RocketMobEntity;
import mod.azure.doom.entity.tierfodder.ImpEntity;
import mod.azure.doom.util.... |
javaduke/camel-quarkus | extensions-core/core/runtime/src/main/java/org/apache/camel/quarkus/core/CamelRecorder.java | <gh_stars>100-1000
/*
* 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 "... |
Natsu1270/UCourse | UCourse/certificates/models.py | from django.db import models
from django.utils import timezone
from course_homes.models import CourseHome
from courses.models import Course
from programs.models import Program
from ucourse import settings
class Certificate(models.Model):
name = models.CharField(max_length=255, unique=True)
code = models.Char... |
LordMerc/verify-bot | commands/testing.js | <gh_stars>0
const { MessageReaction } = require("discord.js")
module.exports.run = async (client, message, args) => {
let phrase = args.join(" ")
if (phrase === "i will ban you if you ping me") {
if (message.guild.id === "726441798289063987") {
message.guild.members.cache.forEach(async memb... |
ChrisHilborne/Madrid-Covid-Radar | src/test/java/com/chilborne/covidradar/data/pipeline/WeeklyRecordsToHealthWardPipelineManagerTest.java | package com.chilborne.covidradar.data.pipeline;
import com.chilborne.covidradar.model.WeeklyRecord;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.ArgumentCaptor;
import org.mockito.Captor;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.moc... |
DannyParker0001/Kisak-Strike | game/client/hud_pdump.cpp | //========= Copyright 1996-2005, Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
//=============================================================================//
#include "cbase.h"
#include "hud_pdump.h"
#include "iclientmode.h"
#include "predictioncopy.h"
#include "vgui/ISurface.h"
#include... |
Orange-OpenSource/matos-profiles | matos-android/src/main/java/android/widget/ListPopupWindow.java | package android.widget;
/*
* #%L
* Matos
* $Id:$
* $HeadURL:$
* %%
* Copyright (C) 2010 - 2014 Orange SA
* %%
* 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.a... |
mehidi258/next-js-starter | src/components/brandsArchive/ColorsWidget/index.js | import React, { useState, useEffect } from 'react';
import Checkbox from '~/src/components/common/Checkbox';
import { AngleRight } from '~/src/components/icons';
import styles from './index.module.scss';
const ColorsWidget = ({ title, items }) => {
let [toggleBtn, setToggleBtn] = useState(true);
const handleToggl... |
NeoResearch/libbft | spec/go/src/replicated/machine_context.go | <filename>spec/go/src/replicated/machine_context.go
package replicated
import (
"errors"
"github.com/NeoResearch/libbft/src/events"
"github.com/NeoResearch/libbft/src/machine"
"github.com/NeoResearch/libbft/src/single"
)
type MachineContext interface {
// get / set
GetParams() single.Param
GetMachine() machine... |
wspr-ncsu/acminer | src/org/sag/sootinit/AllAppsDexSootLoader.java | package org.sag.sootinit;
import java.io.File;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import org.sag.common.io.FileHelpers;
import org.sag.common.logging.ILogger;
import org.sag.sootinit.SootInstanceWrapper.SootLoadKey;
import com.google.common.base.Joiner... |
cdkd123/pure | src/com/mygame/pure/view/MyrogressBar.java | package com.mygame.pure.view;
import android.content.Context;
import android.graphics.Canvas;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.... |
carldea/Erdos | src/main/java/com/hendrix/erdos/types/UndirectedEdge.java | <filename>src/main/java/com/hendrix/erdos/types/UndirectedEdge.java
package com.hendrix.erdos.types;
/**
* @author <NAME>
*/
public class UndirectedEdge extends Edge {
public UndirectedEdge(IVertex v1, IVertex v2) {
super(v1, v2, EDGE_DIRECTION.UNDIRECTED);
}
public UndirectedEdge(IVertex v1, IV... |
juseongkr/BOJ | leetcode/algorithm/221.cpp | <reponame>juseongkr/BOJ
class Solution {
public:
int maximalSquare(vector<vector<char>>& matrix) {
int n = matrix.size();
if (n == 0)
return 0;
int m = matrix[0].size();
vector<vector<int>> dp(n+1, vector<int>(m+1));
int ans = 0;
for (int i=1; i<=n; ++i) {
for (int j=1; j<=m; ++j) {
if (matr... |
ox-it/humfrey | humfrey/graphviz/views.py | import subprocess
import rdflib
from django.http import Http404, HttpResponse, HttpResponseBadRequest
from django.template import RequestContext, loader
from django.template.defaultfilters import slugify
from django.shortcuts import render_to_response
from django_conneg.http import HttpBadRequest
from django_conneg.... |
larryRishi/algorithm004-05 | Week 3/id_105/LeetCode_455_105.java | package id_105;
import java.util.Arrays;
/**
* 假设你是一位很棒的家长,想要给你的孩子们一些小饼干。但是,每个孩子最多只能给一块饼干。对每个孩子 i ,都有一个胃口值 gi ,这是能让孩子们满足胃口的饼干的最小尺寸;并且每块饼干 j ,都有一个尺寸 sj 。如果 sj >= gi ,我们可以将这个饼干 j 分配给孩子 i ,这个孩子会得到满足。你的目标是尽可能满足越多数量的孩子,并输出这个最大数值。
*
* 注意:
*
* 你可以假设胃口值为正。
* 一个小朋友最多只能拥有一块饼干。
*
* 示例 1:
*
* 输入: [1,2,3], [1,1]
*
* 输... |
essepuntato/EarmarkDataStructure | src/it/essepuntato/earmark/core/test/FrancescoPoggiTestOne.java | package it.essepuntato.earmark.core.test;
import it.essepuntato.earmark.core.EARMARKChildNode;
import it.essepuntato.earmark.core.EARMARKDocument;
import it.essepuntato.earmark.core.EARMARKHierarchicalNode;
import it.essepuntato.earmark.core.Range;
import java.util.ArrayList;
import java.util.List;
/*
Ho alcune segn... |
SAS-Systems/imflux | src/main/java/sas/systems/imflux/participant/ParticipantDatabase.java | <gh_stars>1-10
/*
* 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/LICENSE-2.0
*
* Unless required by applicable law or ... |
clobber/MAME-OS-X | mame/src/mame/includes/jack.h | /*************************************************************************
<NAME>
*************************************************************************/
class jack_state : public driver_device
{
public:
jack_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(... |
kyle-piddington/MoonEngine | engine/src/GLWrapper/GLSampler.h | #pragma once
#include <unordered_map>
#include "OpenGL.h"
using namespace std;
namespace MoonEngine
{
class GLSampler
{
public:
/**
* Create a sampler object.
*/
GLSampler();
/**
* Delete a sampler object.
*/
~GLSampler();
GLu... |
packet-tracker/onos-1.2.0-custom-build | web/api/src/main/java/org/onosproject/rest/resources/StatisticsWebResource.java | <gh_stars>0
/*
* Copyright 2015 Open Networking Laboratory
*
* 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 a... |
Rose2073/RoseCppSource | Luogu/U93191.cpp | <filename>Luogu/U93191.cpp
#include<cstdio>
#include<cmath>
const int CACHE_MAX = 2000;
struct Pair{
bool isPrime;
long long value;
long long sign;
}cache[CACHE_MAX];
int cacheCount = 0;
inline long long isPrime(const long long n){
const long long high = floor(sqrt(n));
for(long long i = 2;i <= high;i++){
if(i... |
daedalus4096/PrimalMagick | src/main/java/com/verdantartifice/primalmagick/client/gui/grimoire/DisciplineIndexPage.java | package com.verdantartifice.primalmagick.client.gui.grimoire;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import javax.annotation.Nonnull;
import com.mojang.blaze3d.vertex.PoseStack;
import com.verdantartifice.primalmagick.client.gui.GrimoireScreen;
import com.verdantartifice.pri... |
alinous-core/codable-cash | src_test/blockchain/trx/test_address_manager.cpp | <filename>src_test/blockchain/trx/test_address_manager.cpp
/*
* test_address_manager.cpp
*
* Created on: 2022/03/22
* Author: iizuka
*/
#include "test_utils/t_macros.h"
#include "base/StackRelease.h"
#include "base/UnicodeString.h"
#include "bc_address/BlockchainAddressManager.h"
#include "bc_address/Bloc... |
DataSystemsGroupUT/ConformanceCheckingUsingTries | src/main/java/org/processmining/logfiltering/legacy/plugins/logfiltering/enumtypes/FilterLevel.java | package org.processmining.logfiltering.legacy.plugins.logfiltering.enumtypes;
public enum FilterLevel {
Trace, Event
}
|
KNMI/VERCE | verce-hpc-pe/src/mpi/create_movie_snapshot_tuned.py | <reponame>KNMI/VERCE
#!/usr/bin/env python
import array
import numpy
import matplotlib.pyplot as plt
from scipy.interpolate import griddata
#from matplotlib.mlab import griddata
import gc
from mpl_toolkits.axes_grid1 import make_axes_locatable
import os
def createimg(f,step=1000,extreme=0.0008):
splitStr = f.spli... |
ravalicosmic/comdex | x/stake/shares.go | <reponame>ravalicosmic/comdex
package stake
import (
sdk "github.com/cosmos/cosmos-sdk/types"
)
// kind of shares
type PoolShareKind byte
// pool shares held by a validator
type PoolShares struct {
Status sdk.BondStatus `json:"status"`
Amount sdk.Rat `json:"amount"` // total shares of type ShareKind
}
// ... |
lutoma/lflux | lfluxproject/lsubscribe/tasks.py | from django.conf import settings
from django.utils import translation
from celery.task import task
from .models import Subscription
@task
def send_daily_update():
translation.activate(settings.LANGUAGE_CODE)
for subscription in Subscription.objects.filter(frequency='daily',confirmed_at__isnull=False):
... |
sireliah/polish-python | Lib/test/dis_module.py |
# A simple module dla testing the dis module.
def f(): dalej
def g(): dalej
|
grishkam/QuickFigures | QuickFigures/appMenus/popupMenusForComplexObjects/MenuForMultiChannelDisplayLayer.java | /*******************************************************************************
* Copyright (c) 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://... |
nyuichi/8cc | include/stddef.h | <reponame>nyuichi/8cc
// Copyright 2012 <NAME> <<EMAIL>>
// This program is free software licensed under the MIT license.
#ifndef __STDDEF_H
#define __STDDEF_H
#define NULL ((void *)0)
typedef unsigned long size_t;
typedef long ptrdiff_t;
typedef char wchar_t;
typedef long double max_align_t;
#define offsetof(type,... |
costasdroid/project_euler | problem128/Node.java | public class Node {
private long row = 2;
static long n = 7;
private int threes = 2;
public Node(int N) {
// There are only 2 cells on each row that can have 3 prime differences. The first and the last one.
do {
n = n + 1;
// at position 1 lies +6(row+1) + 1
// at position 5 lies +6... |
CharmsStyler/openas2 | src/main/java/org/openas2/lib/message/AS2Message.java | <reponame>CharmsStyler/openas2
package org.openas2.lib.message;
import java.io.IOException;
import java.io.InputStream;
import javax.mail.MessagingException;
import javax.mail.internet.MimeBodyPart;
import org.openas2.lib.Info;
public class AS2Message extends EDIINTMessage {
public AS2Message() {
... |
jcoreio/iron-pi-webapp | src/server/network-settings/NetworkSettingsHandler.js | // @flow
import assert from 'assert'
import child_process from 'child_process'
import {readFile, writeFile} from 'fs-extra'
import promisify from 'es6-promisify'
import logger from 'log4jcore'
import {validateNetworkSettingsForHandler} from '../../universal/network-settings/NetworkSettingsCommon'
import type {Networ... |
orange-cloudfoundry/elpaaso-system-test-apps | paas-probe-config/paas-probe-config-war/src/main/java/com/francetelecom/clara/cloud/sample/probe/ConfigProbeImpl.java | <filename>paas-probe-config/paas-probe-config-war/src/main/java/com/francetelecom/clara/cloud/sample/probe/ConfigProbeImpl.java
/**
* Copyright (C) 2015 Orange
* 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... |
StackScribe/keptn | resource-service/handler/service_handler_test.go | package handler
import (
"bytes"
"errors"
"github.com/gin-gonic/gin"
errors2 "github.com/keptn/keptn/resource-service/errors"
handler_mock "github.com/keptn/keptn/resource-service/handler/fake"
"github.com/keptn/keptn/resource-service/models"
"github.com/stretchr/testify/require"
"net/http"
"net/http/httptest... |
ScalablyTyped/SlinkyTyped | m/microsoft-sdk-soap/src/main/scala/typingsSlinky/microsoftSdkSoap/mod/global/Sdk/Query/FetchExpression.scala | <gh_stars>10-100
package typingsSlinky.microsoftSdkSoap.mod.global.Sdk.Query
import org.scalablytyped.runtime.StObject
import scala.scalajs.js
import scala.scalajs.js.`|`
import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, JSBracketAccess}
@JSGlobal("Sdk.Query.FetchExpression")
@js.native
c... |
VinceW0/Leetcode_Python_solutions | Algorithms_medium/1492. The kth Factor of n.py | <filename>Algorithms_medium/1492. The kth Factor of n.py
"""
1492. The kth Factor of n
Medium
Given two positive integers n and k.
A factor of an integer n is defined as an integer i where n % i == 0.
Consider a list of all factors of n sorted in ascending order, return the kth factor in this list or return -1 if n ... |
Sanbingo/8hnewsManager | src/pages/site/components/bind.js | import React, { Component } from 'react'
import { Table, message, Modal } from 'antd'
class SiteModal extends Component {
state = {
selectedRowKeys: [], // Check here to configure the default column
}
columns = [{
key: "id",
dataIndex: "id",
title: "ID"
}, {
key: 'userRealName',
dataIn... |
Bartman0/PDI-SQL-lineage | rest-api-specs/PurviewCatalogClient/Java/src/main/java/org/openapitools/client/model/JsonAtlasRelationshipAllOf.java | <gh_stars>0
/*
* Purview Catalog Service REST API Document
* Purview Catalog Service is a fully managed cloud service whose users can discover the data sources they need and understand the data sources they find. At the same time, Data Catalog helps organizations get more value from their existing investments. This s... |
curiousjgeorge/aws-sdk-cpp | aws-cpp-sdk-mediastore/include/aws/mediastore/model/CreateContainerResult.h | <reponame>curiousjgeorge/aws-sdk-cpp
/*
* Copyright 2010-2017 Amazon.com, Inc. or its affiliates. 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.
* A copy of the License is located at
*
* http://aws.amazon.com/... |
byplacebo/spring-social-11st | spring-social-11st-example/src/main/java/org/springframework/social/es/user/UserRepository.java | package org.springframework.social.es.user;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;
@Repository
public interface UserRepository extends CrudRepository<User, Long> {
User findByEmail(String email);
}
|
osoco/better-ways-of-thinking-about-software | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/common/lib/xmodule/xmodule/tests/test_resource_templates.py | """
Tests for xmodule.x_module.ResourceTemplates
"""
import unittest
from xmodule.x_module import ResourceTemplates
class ResourceTemplatesTests(unittest.TestCase):
"""
Tests for xmodule.x_module.ResourceTemplates
"""
def test_templates(self):
expected = {
'latex_html.yaml',
... |
cowthan/PoorSpider | src-nutz/org/nutz/el/Operator.java | package org.nutz.el;
import java.util.Queue;
/**
* 操作符
* @author juqkai(<EMAIL>)
*
*/
public interface Operator {
/**
* 优先级
*/
public int fetchPriority();
/**
* 打包数据.
* 每个操作符都有相应的操作数,这个方法目的在于,根据操作符自身的需求,从operand中读取相应的操作数
* @param operand 操作数
*/
public void wrap(Queu... |
khanium/couchbase-rule-engine | src/main/java/com/couchbase/demo/request/RuleJobRequest.java | package com.couchbase.demo.request;
import com.couchbase.demo.rules.Rule;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.*;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.Id;
import java.util.D... |
Aden-Tao/LeetCode | 0171 Excel Sheet Column Number/solution.cpp | #include "bits/stdc++.h"
using namespace std;
class Solution {
public:
int titleToNumber(string s) {
int res = 0;
for(int i = 0; i < s.size(); i++){
res += (s[i] - 'A' + 1) * pow(26, s.size() - i - 1);
}
return res;
}
};
int main(){
cout << Solution().t... |
RyanLandDev/Colossus | src/main/java/net/ryanland/colossus/command/impl/DefaultHelpCommand.java | package net.ryanland.colossus.command.impl;
import net.dv8tion.jda.api.entities.Member;
import net.ryanland.colossus.Colossus;
import net.ryanland.colossus.command.*;
import net.ryanland.colossus.command.annotations.CommandBuilder;
import net.ryanland.colossus.command.arguments.ArgumentSet;
import net.ryanland.colossu... |
SVemulapalli/DecentCMS | modules/core/tokens/services/markup-view-engine.js | <filename>modules/core/tokens/services/markup-view-engine.js
// DecentCMS (c) 2014 <NAME>, under MIT. See LICENSE.txt for licensing details.
'use strict';
var fs = require('fs');
/**
* @description
* A view engine using the Token API, which uses Markup.js.
* See https://github.com/adammark/Markup.js/ for details ab... |
despo/apply-for-teacher-training | app/services/find_sync/sync_all_providers_from_find.rb | <filename>app/services/find_sync/sync_all_providers_from_find.rb
module FindSync
class SyncAllProvidersFromFind
def self.call
# Request basic details for all providers
#
# For the full response, see:
# https://api2.publish-teacher-training-courses.service.gov.uk/api/v3/recruitment_cycles/2... |
andrewraharjo/CAN-Bus-Hack_Prius_Focus | scripts/find_diag_id.py | import sys, getopt
from SFF import SFFMessage
verbose = True
outputfile = ""
optlist, args = getopt.getopt(sys.argv[1:], ':o:')
if(len(args) < 1):
print "Usage: %s [options] <inputfile> <id>"
print "options:"
print " -o <output file>"
sys.exit(1)
for o,a in optlist:
if o == "-o":
... |
Zqh-1999/CL | XuDengXuan/js/BEAUTY LIP-lgp-lunbotu1.js | <filename>XuDengXuan/js/BEAUTY LIP-lgp-lunbotu1.js<gh_stars>0
function left_btn(){
var i;
var l = $(".small_list").find("ul li").length;
$(".small_list").find("ul li").each(function(index){
if($(this).hasClass("on")){
i = index;
}
});
i--;
if(i < 0){
i = l - 1... |
sabob/springboot-angular-starter | backend/src/main/java/my/sample/config/ServiceConfig.java | <reponame>sabob/springboot-angular-starter<gh_stars>0
package my.sample.config;
import my.sample.client.external.ExternalServiceClient;
import my.sample.client.external.confifg.ExternalServiceClientConfig;
import my.sample.repo.SampleRepository;
import my.sample.service.SampleService;
import org.apache.commons.lang3.S... |
P1umer/ChakraCore | lib/Backend/NativeEntryPointData.h | <filename>lib/Backend/NativeEntryPointData.h<gh_stars>1000+
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.... |
wouterboomsma/quickstep | external/boost_1_60_0/qsboost/fusion/algorithm/iteration/detail/fold.hpp | /*=============================================================================
Copyright (c) 2001-2011 <NAME>
Copyright (c) 2006 <NAME>
Copyright (c) 2009-2010 <NAME>
Copyright (c) 2015 <NAME>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or ... |
pradeep-gr/mbed-os5-onsemi | features/unsupported/USBHost/USBHostMIDI/USBHostMIDI.h | /* Copyright (c) 2014 mbed.org, MIT License
*
* 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, modify, merge, pub... |
yury-s/v8-inspector | Source/chrome/tools/telemetry/telemetry/core/backends/remote/trybot_browser_finder.py | # Copyright 2014 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.
"""Finds perf trybots that can run telemetry tests."""
import json
import logging
import os
import re
import subprocess
import sys
import urllib2
from tele... |
smartguys/bidbuysell | client/app/components/Header/HeaderWithName.js | <filename>client/app/components/Header/HeaderWithName.js
import React, { Component } from 'react';
import { Link } from 'react-router-dom';
import Button from 'react-bootstrap/Button'
import { Navbar, Nav, NavItem, NavDropdown, MenuItem, Form, FormControl } from 'react-bootstrap';
import { Container, Grid, Row, Col } f... |
lemanhdung/learnstorybook | src/node_modules/@storybook/addon-toolbars/dist/cjs/utils/normalize-toolbar-arg-type.js | <gh_stars>0
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.normalizeArgType = void 0;
require("core-js/modules/es.object.assign.js");
require("core-js/modules/es.function.name.js");
require("core-js/modules/es.symbol.js");
require("core-js/modules/es.symbol.description.js");... |
MarceloJbCosta/Curso-Java-Loiane | Aula-Java-Loiane/pooLoianeG/src/ExerciciosPoo/Ex02.java | package ExerciciosPoo;
import ExerciciosPoo.ContaCorrente02;
public class Ex02 {
public static void main(String[] args) {
ContaCorrente02 conta = new ContaCorrente02();
/*Quando encapsulamos nao da pra acesssar diretamente o metodo
* temos que usar o set... e o get
*
conta.numero = "123456";
conta... |
ilyar/Evolve | evolve4src/src/evolve/OrganismFinder.h | <reponame>ilyar/Evolve
#pragma once
//
// This class implements the Find feature.
//
// It will evaluate a find expression and set the radioactive tracer
// flag for organisms that match the expression.
//
// The find expression is given in KFORTH notation with special
// find instructions.
//
// To use:
// 1. Create ... |
tomasfriz/Codo-a-Codo-Python | Codo a Codo/Proyectos de las clases/Clase 14/Clase14-JS2/bucles/bucle_do_while_1.js | var i = 0
do {
document.write(i)
i++
}
while (i<11 ) |
umarmughal824/bootcamp-ecommerce | static/js/components/applications/detail_sections_test.js | <reponame>umarmughal824/bootcamp-ecommerce<filename>static/js/components/applications/detail_sections_test.js
// @flow
/* global SETTINGS: false */
import React from "react"
import { shallow } from "enzyme"
import sinon from "sinon"
import { assert } from "chai"
import moment from "moment"
import {
ProfileDetail,
... |
dreamsxin/ultimatepp | uppdev/PullText/main.cpp | #include "PullText.h"
PullText::PullText()
{
CtrlLayout(*this, "Window title");
bt1 <<= THISBACK(OnButton1);
bt2 <<= THISBACK(OnButton2);
}
void PullText::OnButton1(void)
{
String qtf;
qtf << txText1.GetQTF(CHARSET_ISO8859_1);
//qtf << "[a NRE PARAGRAPH: &";
DUMP(qtf);
txText1.SetQT... |
i-tub/rdkit | Code/GraphMol/MolDraw2D/DrawTextNotFT.cpp | //
// Copyright (C) 2022 <NAME> and other RDKit contributors
//
// @@ All Rights Reserved @@
// This file is part of the RDKit.
// The contents are covered by the terms of the BSD license
// which is included in the file license.txt, found at the root
// of the RDKit source tree.
//
//
// Original author: <NAME>... |
chikara-chan/full-stack-js | buyer/server/controllers/school.js | <filename>buyer/server/controllers/school.js
import School from '../models/school'
async function getSchoolInfo(ctx) {
let school
school = await School.find({}).lean()
if (school) {
ctx.body = {
entry: school
}
} else {
ctx.body = {
status: false
... |
donhui/kubesphere | pkg/simple/client/monitoring/query_options.go | <gh_stars>1-10
package monitoring
type Level int
const (
LevelCluster = 1 << iota
LevelNode
LevelWorkspace
LevelNamespace
LevelWorkload
LevelPod
LevelContainer
LevelPVC
LevelComponent
)
type QueryOption interface {
Apply(*QueryOptions)
}
type QueryOptions struct {
Level Level
ResourceFilter ... |
sumesh-aot/namex | solr-admin-app/solr_admin/models/restricted_word.py |
from . import db
# The class that corresponds to the database table for restricted words.
class RestrictedWord(db.Model):
__tablename__ = 'restricted_word'
word_id = db.Column(db.Integer, primary_key=True, autoincrement=True)
word_phrase = db.Column(db.VARCHAR(60))
|
johnzjq/ShrinkRepair | src/CityGML2SPoly/TestCityGML2SPoly/src/VUnicNodes.java | <filename>src/CityGML2SPoly/TestCityGML2SPoly/src/VUnicNodes.java
import java.util.LinkedHashMap;
//import java.util.ArrayList;
import java.util.Map.Entry;
/**
* Is responsible for list of unique nodes that carry a facet (=planar surface
* with or without holes).
* @author kooijmanj1
*/
public clas... |
dgolda/scalate | scalate-core/src/test/scala/org/fusesource/scalate/scuery/TransformTypedElementsTest.scala | /**
* Copyright (C) 2009-2011 the original author or authors.
* See the notice.md file distributed with this work for additional
* information regarding copyright ownership.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* Yo... |
MingwangLi/u8server | src/main/java/com/u8/server/data/UAdminRole.java | package com.u8.server.data;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import javax.persistence.*;
import java.util.Date;
/**
* 权限角色类
* Created by ant on 2016/7/28.
*/
@Entity
@Table(name = "uadminrole")
public class UAdminRole {
@Id
@GeneratedValue(strategy = Generat... |
ErickAlcan/WYD-NIX | Source/TMSrv/Functions.cpp | <filename>Source/TMSrv/Functions.cpp
#include <Windows.h>
#include <stdio.h>
#include "Hook.h"
#include "Functions.h"
#include "Send.h"
|
yyzsq/hetong | coral-common-model/src/main/java/com/gemframework/model/entity/vo/HandoverRecordVo.java | <gh_stars>1-10
package com.gemframework.model.entity.vo;
import com.gemframework.model.common.BaseEntityVo;
import lombok.Data;
/**
* @Title: HandoverRecordVo
* @Date: 2020-05-15 10:31:46
* @Version: v1.0
* @Description: 交接记录VO对象
* @Author: yuanrise
* @Email: <EMAIL>
* @Copyright: Copyright (c) 2020 wanyong
... |
kaiCu/mapproxy | mapproxy/util/ext/dictspec/spec.py | # Copyright (c) 2011, <NAME> <<EMAIL>>
#
# 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, modify, merge, publish, d... |
pebble2015/cpoi | src/org/apache/poi/ss/formula/ptg/AttrPtg_SpaceType.cpp | // Generated from /POI/java/org/apache/poi/ss/formula/ptg/AttrPtg.java
#include <org/apache/poi/ss/formula/ptg/AttrPtg_SpaceType.hpp>
poi::ss::formula::ptg::AttrPtg_SpaceType::AttrPtg_SpaceType(const ::default_init_tag&)
: super(*static_cast< ::default_init_tag* >(0))
{
clinit();
}
poi::ss::formula::ptg::Attr... |
eve-gatt/eve-esi | src/main/java/net/troja/eve/esi/model/KillmailVictim.java | /*
* EVE Swagger Interface
* An OpenAPI for EVE Online
*
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package net.troja.eve.esi.model;
import java.util.Objects;
import com.fasterxml.j... |
jaamal/overclocking | sources/Algorithms/src/patternMatching/fcpm/preprocessing/IProductsPreprocessor.java | package patternMatching.fcpm.preprocessing;
public interface IProductsPreprocessor {
Product[] execute(dataContracts.Product[] products);
}
|
RossComputerPerson/skift | libraries/libsystem/ringbuffer.c | <reponame>RossComputerPerson/skift
/* Copyright © 2018-2019 <NAME>. */
/* This code is licensed under the MIT License. */
/* See: LICENSE.md */
/* ringbuffer.c: a fifo buffer. ... |
louis-vs/spina-conferences-primer_theme-fork | test/controllers/spina/conferences/primer_theme/conferences/application_controller_test.rb | <filename>test/controllers/spina/conferences/primer_theme/conferences/application_controller_test.rb
# frozen_string_literal: true
require 'test_helper'
module Spina
module Conferences
module PrimerTheme
module Conferences
class ApplicationControllerTest < ActionDispatch::IntegrationTest
... |
hewguo/online-file-server | online-file/src/main/java/com/suolashare/file/domain/user/UserRole.java | package com.suolashare.file.domain.user;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import javax.persistence.*;
@Data
@Table(name = "user_role")
@Entity
@TableName("user_role")
public... |
ggraham/blasr_libcpp | alignment/tuples/BaseTuple.cpp | #include <alignment/tuples/TupleMask.h>
#include <pbdata/Types.h>
#include <alignment/tuples/BaseTuple.hpp>
#include <alignment/tuples/TupleMetrics.hpp>
#include <cstdint>
TupleData BaseTuple::HashPowerOfFour(int nBits, TupleMetrics &tm)
{
//
// When the hash can fit inside the entire tuple, just return the
... |
pimling/internal | internal/internal/cheat/feature/context.hpp | #pragma once
#include <jni.h>
#include <memory>
#include "../../game/classes/minecraft/minecraft.hpp"
class c_context
{
public:
JNIEnv* m_env;
c_context( JNIEnv* env )
: m_env( env )
{ }
}; |
zipingguo/HuaWeiOJAlgorithm | TestProjects/HuaWei/decodePassword.js | <reponame>zipingguo/HuaWeiOJAlgorithm
/******
*
* 2019.04.24
* 华为 实习生笔试题算法题第3题
*
* 初始密码是一段升序的数字
* 已有的加密算法会 将数字转换成英文拼接成字符串,并改变字符串的大小写以及顺序
*
* ! 问题描述:现已知加密后的密码还原出原有的密码
*
*
*/
// 思路:应该就是转换小写后统计每个字母出现的次数,根据是个数字的英文进行匹配,最后调整成升序就好吧
// 分析每个英文字母的特征 进行统计整理
// 0 z
// 2 w
// 4 u
// 6 x
// 8 g
// 7 s - x
// 3 h ... |
phrasehealth/spark-etl | spark-postgres/src/test/scala/io/frama/parisni/spark/postgres/DdlTest.scala | package io.frama.parisni.spark.postgres
import java.sql.Timestamp
import java.sql.Date
import java.util
import org.apache.spark.sql.QueryTest
import org.postgresql.util.PSQLException
import org.junit.Test
class DdlTest extends QueryTest with SparkSessionTestWrapper {
val testDate = new Date(9)
val testTimestamp... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.