repo_name stringlengths 6 101 | path stringlengths 4 300 | text stringlengths 7 1.31M |
|---|---|---|
Albocoder/KOOBE | s2e/source/s2e-linux-kernel/decree-cgc-cfe/drivers/staging/fsl_pme2/pme2_low.c | <gh_stars>10-100
/* Copyright 2008-2011 Freescale Semiconductor, Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list... |
mass-project/mass_server | mass_flask_api/resources/auth.py | <reponame>mass-project/mass_server<filename>mass_flask_api/resources/auth.py
# from flask import request, jsonify
# from mass_flask_api.config import api_blueprint
# from mass_flask_core.models import User, UserAPIKey
#
#
# def request_auth_token():
# """
# ---
# post:
# description: Req... |
RenanRibeiroDaSilva/Meu-Aprendizado-Python | Exercicios/Ex105.py | <reponame>RenanRibeiroDaSilva/Meu-Aprendizado-Python
""" Ex - 105 - Faça um programa que tenha uma função notas() que pode receber várias notas de alunos e vai
retornar um dicionário com as seguintes informações:
– Quantidade de notas
– A maior nota
– A menor nota... |
f4deb/cen-electronic | drivers/driverList.h | #ifndef DRIVER_LIST_H
#define DRIVER_LIST_H
#include "driver.h"
#include "../common/io/buffer.h"
#include "../common/io/inputStream.h"
#include "../common/io/outputStream.h"
/** The max limit of driver list. */
#define MAX_DRIVER 3
/**
* The struct defining a list of drivers.
*/
typedef struct {
... |
LDZZDL/CommercialCity | src/com/fjsf/web/viewobject/CustomerOrderView.java | package com.fjsf.web.viewobject;
import java.util.Date;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fjsf.web.bean.DeliveryAddressBean;
import com.fjsf.web.bean.ProductBean;
import com.fjsf.web.bean.ShopBean;
public class CustomerOrderView {
// 订单编号
private Integer orderI... |
yyh1102/Teaching-Assistance-Application | frontend/vuex/modules/group/index.js | import Vue from 'vue';
import * as actions from './actions';
const state={
actionLoading:false, //表单提交loading
showGroup:false, //小组操作表单显示状态
groupList:[],
}
const mutations= {
updateGroupList(state,groupList){
state.groupList=groupList;
},
showActionGroup(state... |
alinakazi/apache-royale-0.9.8-bin-js-swf | royale-compiler/compiler/src/main/java/org/apache/royale/compiler/internal/projects/ASProject.java | <reponame>alinakazi/apache-royale-0.9.8-bin-js-swf<filename>royale-compiler/compiler/src/main/java/org/apache/royale/compiler/internal/projects/ASProject.java
/*
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this w... |
MTres19/openproject | modules/bim/spec/bcf/bcf_xml/issue_writer_spec.rb | #-- copyright
# OpenProject is an open source project management software.
# Copyright (C) 2012-2020 the OpenProject GmbH
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License version 3.
#
# OpenProject is a fork of ChiliProject, which is a fork ... |
dme26/intravisor | runtime/musl-lkl/lkl/arch/s390/include/asm/processor.h | <reponame>dme26/intravisor<filename>runtime/musl-lkl/lkl/arch/s390/include/asm/processor.h<gh_stars>10-100
/* SPDX-License-Identifier: GPL-2.0 */
/*
* S390 version
* Copyright IBM Corp. 1999
* Author(s): <NAME> (<EMAIL>),
* <NAME> (<EMAIL>)
*
* Derived from "include/asm-i386/processor.h"
* ... |
oixhwotl/RecursoDeAndroidProgramming | REF/AndExam4_1/src/andexam/ver4_1/c32_map/OverlayWidget.java | package andexam.ver4_1.c32_map;
import andexam.ver4_1.*;
import android.graphics.*;
import android.os.*;
import android.widget.*;
import com.google.android.maps.*;
import com.google.android.maps.MapView.*;
public class OverlayWidget extends MapActivity {
MapView mMap;
protected boolean isRouteDisplay... |
MayuriLokhande/C_programs | Pointers/restrictKeyword.c | #include <stdio.h>
void operation(int* a, int*b, int*c)
{
*a+=*c;
*c+=*b;
}
int main()
{
int a=2,b=3, c=5;
operation(&a,&b,&c);
printf("%d %d %d\n",a,b,c);
return 0;
}
|
ihmcrobotics/ihmc-open-robotics-software | ihmc-robotics-toolkit/src/main/java/us/ihmc/robotics/graphics/YoGraphicPlanarRegionsList.java | package us.ihmc.robotics.graphics;
import java.awt.Color;
import java.util.*;
import gnu.trove.map.TIntObjectMap;
import gnu.trove.map.hash.TIntObjectHashMap;
import us.ihmc.euclid.geometry.ConvexPolygon2D;
import us.ihmc.euclid.referenceFrame.ReferenceFrame;
import us.ihmc.euclid.transform.AffineTransform;
import us... |
yeonghoey/baekjoon | 15684/main.go | package main
import (
"bufio"
"fmt"
"os"
)
var ladder [30 + 1][10 + 1]bool
func main() {
reader := bufio.NewReader(os.Stdin)
nextInt := func() int {
var n int
_, _ = fmt.Fscan(reader, &n)
return n
}
n := nextInt()
m := nextInt()
h := nextInt()
for i := 0; i < m; i++ {
a := nextInt()
b := nextIn... |
uhop/dcl | tests/manual/test_modern1.js | <gh_stars>10-100
'use strict';
var dcl = require('../modern');
var A = dcl(null, {a: 1});
var x = new A;
console.log(x);
console.log(x instanceof A);
console.log(x.a);
var B = dcl(null, {
constructor: function () {
this.b = 2;
},
a: dcl.prop({value: 1})
});
var y = new B;
console.log(y);
console.log(y ... |
katitek/Code-Combat | 3_GameDev1/075-Give_and_Take/giveAndTake.js | // Move to all the X-marks.
// Those fire-traps hurt!
game.spawnPlayerXY("samurai", 40, 50);
game.addSurviveGoal();
game.addMoveGoalXY(25,40);
game.spawnXY("fire-trap", 25, 40);
game.addMoveGoalXY(55,40);
game.spawnXY("fire-trap", 55, 40);
game.addMoveGoalXY(40,20);
game.spawnXY("fire-trap", 40, 20);
// Spawn some "p... |
mauriziokovacic/ACME | ACME/color/color2gray.py | from .color2float import *
def color2gray(C, weight=(1/3, 1/3, 1/3), dim=-1):
"""
Converts the given color in grayscale using the specified weights
Parameters
----------
C : Tensor
the (3,W,H,) or (N,3,) RGB color tensor
weight : list or tuple (optional)
the weighting factors ... |
Abergard/VisualizationLibrary | src/examples/Qt4_example.cpp | <filename>src/examples/Qt4_example.cpp
/**************************************************************************************/
/* */
/* Visualization Library */
/* http://... |
valohai/valohai-yaml | valohai_yaml/objs/pipelines/node_action.py | from typing import Iterable, List, Set, Union
from ...lint import LintResult
from ...types import LintContext, SerializedDict
from ...utils import listify
from ..base import Item
WELL_KNOWN_WHENS = {
'node-complete', # Node completed (successfully)
'node-starting', # Node about to start
'node-error', #... |
opastushkov/codewars-solutions | CodeWars/Python/5 kyu/RGB To Hex Conversion/main.py | def f(num):
if num > 255: return 255
elif num < 0: return 0
else: return num
def rgb(r, g, b):
return '{:02X}{:02X}{:02X}'.format(f(r), f(g), f(b)) |
ghsecuritylab/bcwifi | release/src/router/aria2-1.18.1/src/HttpResponseCommand.h | <reponame>ghsecuritylab/bcwifi<gh_stars>10-100
/* <!-- copyright */
/*
* aria2 - The high speed download utility
*
* Copyright (C) 2006 <NAME>
*
* 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 Founda... |
WilliamDeveloper/udemy_cursos | react/curso_reactjs/aula20_basereact/projeto/src/components/H1/index.js | <filename>react/curso_reactjs/aula20_basereact/projeto/src/components/H1/index.js
import React, { useContext } from 'react';
import { GlobalContext } from '../../contexts/App';
// eslint-disable-next-line
export const H1 = () => {
const theContext = useContext(GlobalContext);
console.log(theContext);
const { cont... |
fquesnel/marathon | src/main/scala/mesosphere/marathon/util/Timeout.scala | package mesosphere.marathon
package util
import akka.actor.Scheduler
import mesosphere.util.DurationToHumanReadable
import akka.pattern.after
import scala.concurrent.duration.{Duration, FiniteDuration}
import scala.concurrent.{ExecutionContext, Future, blocking => blockingCall}
/**
* Function transformations to ma... |
voltengine/volt | src/volt/gpu/d3d12/routine.hpp | <filename>src/volt/gpu/d3d12/routine.hpp
#pragma once
#include <volt/pch.hpp>
#include <volt/gpu/routine.hpp>
namespace volt::gpu::d3d12 {
template<command_types T>
class routine : public gpu::routine<T> {
public:
ID3D12GraphicsCommandList *command_list;
ID3D12CommandAllocator *allocator;
routine(std::shared_pt... |
hongtuan/datamonitor | app_server/controllers/datamgr.js | <filename>app_server/controllers/datamgr.js
var mongoose = require('mongoose');
var locDao = require('../../app_api/dao/locationdao.js');
//var ndDao = require('../../app_api/dao/nodedatadao.js');
var llDao = require('../../app_api/dao/locationlogdao.js');
module.exports.showNodeData = function(req, res) {
//console... |
Sanmopre/Sea_Conquest | Project II Game/Motor2D/j1DialogSystem.cpp | <reponame>Sanmopre/Sea_Conquest
#include "j1App.h"
#include "j1GUIElements.h"
#include "j1Audio.h"
#include "j1Input.h"
#include "j1GUI.h"
#include "j1Textures.h"
#include "j1Render.h"
#include "j1Window.h"
#include "j1Player.h"
#include "j1DialogSystem.h"
j1DialogSystem::j1DialogSystem()
{
}
j1DialogSystem::~j1Dialo... |
klmchp/incubator-nuttx | sched/pthread/pthread_condclockwait.c | /****************************************************************************
* sched/pthread/pthread_condclockwait.c
*
* 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 copyr... |
clickpaas/clickpaas-operator | pkg/controller/middleware/mongo/event.go | package mongo
const (
MongoEventReasonOnAdded = "mongoAdded"
MongoEventReasonOnDelete = "mongoDelete"
MongoEventReasonOnUpdate = "mongoUpdate"
)
|
WasmVM/wass | src/lib/parser/_Abbreviated.hpp | <reponame>WasmVM/wass
#ifndef GUARD_wass_parser__Abbreviated
#define GUARD_wass_parser__Abbreviated
#include <optional>
#include <string>
#include <utility>
#include <parser/ParserContext.hpp>
class AbbrImport: public std::optional<std::pair<std::string, std::string>>{
public:
AbbrImport(ParserContext& context);
};... |
SayanGhoshBDA/code-backup | python/coursera_python/FUND_OF_COMP_RICE/FUND_OF_COMPUTING_RICE2/week1/iter_lists.py | def square_list1(numbers):
"""Returns a list of the squares of the numbers in the input."""
result = []
for n in numbers:
result.append(n ** 2)
return result
def square_list2(numbers):
"""Returns a list of the squares of the numbers in the input."""
return [n ** 2 for n in numbers]
pri... |
RubenFern/Photodir-Front-React-PFM | src/components/app/public/PhotoUserPage.js | <gh_stars>1-10
import React, { useEffect, useRef } from 'react';
import { useParams } from 'react-router';
import { useHistory } from 'react-router-dom';
import { useDispatch, useSelector } from 'react-redux';
import { NavBar } from '../../layout/NavBar';
import { Photo } from './Photo/Photo';
import { getUser } from ... |
AP-Atul/music_player_lite | src/app/src/main/java/com/atul/musicplayerlite/fragments/ArtistsFragment.java | <reponame>AP-Atul/music_player_lite
package com.atul.musicplayerlite.fragments;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.appcompat.widget.SearchView;
import androidx.fragment.app.Fragment;
impo... |
Xecutor/zorroeditor | deps/glider/ui/Label.cpp | #include "Label.hpp"
#include "GLState.hpp"
#include "UIConfig.hpp"
namespace glider{
namespace ui{
Label::Label(const char* argCaption, const char* argName)
{
drawShadow=false;
caption.assignFont(uiConfig.getLabelFont());
caption.setColor(uiConfig.getColor("labelTextColor"));
captionShadow.assignFont(uiConfi... |
raymondmutebi/aapu | src/main/java/org/pahappa/systems/core/services/GeneralSearchUtils.java | /**
*
*/
package org.pahappa.systems.core.services;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.apache.commons.lang3.StringEscapeUtils;
import org.apache.commons.lang3.StringUtils;
import org.sers.webutils.model.RecordStatus;
import org.sers.webutils.model.security.User;
i... |
gilbertwang1981/feign | gson/src/main/java/feign/gson/GsonDecoder.java | /**
* Copyright 2012-2021 The Feign 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 agree... |
xmos-jmccarthy/xcore_sdk | examples/freertos/person_detection/app/main.c | <filename>examples/freertos/person_detection/app/main.c<gh_stars>0
// Copyright 2020-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
/* System headers */
#include <platform.h>
#include <xs1.h>
/* FreeRTOS headers */
#include "FreeRTOS.h"
#include "queue.h"
/* Librar... |
jbolda/finatr | src/elements/Header.js | import React from 'react';
import { NavLink } from 'react-router-dom';
import { MenuIcon, XIcon } from '@heroicons/react/outline';
import { Disclosure } from '@headlessui/react';
const navigation = [
{ name: 'Home', to: '/', end: true },
{ name: 'Examples', to: 'examples' },
{ name: 'Import/Export', to: 'import... |
embergardens/ember-gardens-com | src/templates/posts/index.js | import React from "react"
import Seo from '../../components/layout/Seo'
const Post = ({ pageContext }) => {
const post = pageContext.post
return (
<>
<Seo title={post.title} />
<h1>
{post.title}
</h1>
<div dangerouslySetInnerHTML={{__html: post.content}} /... |
CoprHD/sds-controller | apisvc/src/main/java/com/emc/storageos/api/service/impl/resource/utils/AsynchJobExecutorService.java | /*
* Copyright (c) 2012 EMC Corporation
* All Rights Reserved
*/
package com.emc.storageos.api.service.impl.resource.utils;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.emc.storageos.services.util.Na... |
denfromufa/ironpython-stubs | stubs.min/Autodesk/Revit/DB/__init___parts/ParameterFilterUtilities.py | class ParameterFilterUtilities(object):
"""
Contains static utility functions for enumerating the categories and parameters that
are available for use by ParameterFilterElement objects.
"""
@staticmethod
def GetAllFilterableCategories():
"""
GetAllFilterableCategories() -> ICollection[ElementId]
... |
RyanJ93/lala.js | lib/Server/ServerProviderRepository.js | <filename>lib/Server/ServerProviderRepository.js
'use strict';
// Including Lala's modules.
const { Repository } = require('../Repository');
const {
InvalidArgumentException
} = require('../Exceptions');
/**
* Contains all the registered servers.
*/
class ServerProviderRepository extends Repository {
}
module... |
rura6502/repo.rura6502.github.io | Spring-boot Projects/tcp_to_websocket/src/main/java/io/github/rura6502/tcp_to_websocket/UdpHandler.java | <gh_stars>0
package io.github.rura6502.tcp_to_websocket;
import java.io.IOException;
import java.util.function.Consumer;
import org.springframework.stereotype.Component;
import org.springframework.web.socket.BinaryMessage;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty... |
ducanhnguyen/cft4cpp-for-dummy | data-test/tsdv/Sample_for_R1_Static/Lib.cpp | <gh_stars>0
// Header file
#include "Lib.h"
int findMin(int a[], int n){
if (n <= 0)
throw std::exception();
int min = a[0];
for (int i = 1; i < n; i++)
if (a[i] < min)
min = a[i];
return min;
}
|
ampatspell/ember-cli-sketch | app/components/ui-block/sketch/stage/node/image/component.js | export { default } from 'ember-cli-sketch/components/ui-block/sketch/stage/node/image/component';
|
zzgchina888/msdn-code-gallery-microsoft | Official Windows Platform Sample/Windows 8.1 desktop samples/[C++]-Windows 8.1 desktop samples/Management Infrastructure API sample/C# and C++/Service/Provider/WindowsServiceManager.h | //
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
// PARTICULAR PURPOSE.
//
// Copyright (c) Microsoft Corporation. All rights reserved
//
#include <MI... |
lstumme/dashboard-mui | src/components/Sidebar/Sidebar.js | <filename>src/components/Sidebar/Sidebar.js<gh_stars>1-10
import React from 'react';
import { Link } from 'react-router-dom';
import clsx from 'clsx';
import { makeStyles } from '@material-ui/core/styles';
import {
Drawer,
Toolbar,
List,
ListItem,
ListItemText,
ListItemIcon
} from '@m... |
tormath1/jclouds | core/src/test/java/org/jclouds/util/Predicates2Test.java | <reponame>tormath1/jclouds
/*
* 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
... |
alaurent4/nighres | cbstools/cbstools-public/de/mpg/cbs/methods/MgdmFastAtlasSegmentation.java | package de.mpg.cbs.methods;
import java.io.*;
import java.util.*;
import gov.nih.mipav.view.*;
import gov.nih.mipav.model.structures.jama.*;
import de.mpg.cbs.libraries.*;
import de.mpg.cbs.structures.*;
import de.mpg.cbs.utilities.*;
/**
*
* This algorithm uses the MGDM framework to evolve a labeling
* accordi... |
UstymUkhman/APE | src/constraints/HingeConstraints.js | import Constraints from '@/constraints/Constraints';
import { HINGE_ACCELERATION } from '@/constants';
import { Vector3 } from 'three/src/math/Vector3';
import { Ammo } from '@/utils';
export default class HingeConstraints extends Constraints {
constructor (world, events) {
super(world, 'Hinge');
this.events... |
lol768/tabula | common/src/main/scala/uk/ac/warwick/tabula/data/convert/AssignmentFeedbackIdConverter.scala | package uk.ac.warwick.tabula.data.convert
import org.springframework.beans.factory.annotation.Autowired
import uk.ac.warwick.tabula.data.FeedbackDao
import uk.ac.warwick.tabula.data.model.{AssignmentFeedback, Feedback}
import uk.ac.warwick.tabula.system.TwoWayConverter
class AssignmentFeedbackIdConverter extends TwoW... |
GeminiWy/ShapedExamProj | app/src/main/java/com/nd/shapedexamproj/util/RemoveHtmlImgUtil.java | <filename>app/src/main/java/com/nd/shapedexamproj/util/RemoveHtmlImgUtil.java
package com.nd.shapedexamproj.util;
import android.text.Html;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* 移除HTML标签中的IMG获取到照片URL
*
* @author Xujs
*
*/
publi... |
sahil839/RemotePC | Client/app/src/main/java/com/example/client/UpdateScreen.java | <filename>Client/app/src/main/java/com/example/client/UpdateScreen.java
package com.example.client;
import android.app.Activity;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Matrix;
import java.io.File;
import java.io.FileOutputStream;
... |
kozzztik/tulius | tulius/core/debug_mail/views.py | <filename>tulius/core/debug_mail/views.py
import os
import datetime
from django import http
from django.views import generic
from django.conf import settings
from django.core import exceptions
class RecipientsAPI(generic.View):
@staticmethod
def get(request, *args, **_kwargs):
if not request.user.is_... |
emfmesquita/BeyondHelp | src/contentscript/extensioncontentscript.js | import "./extensioncontentstyle.scss";
import $ from "jquery";
import C from "../Constants";
import CampaignCharactersService from "./characters/CampaignCharactersService";
import ConfigStorageService from "../services/storage/ConfigStorageService";
import Configuration from "../data/Configuration";
import ContentScri... |
nadeemnazeer3/dremio-oss | dac/ui/src/pages/ExplorePage/components/ExploreTable/JoinTables.js | /*
* Copyright (C) 2017-2018 Dremio Corporation
*
* 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 l... |
vadi2/codeql | javascript/ql/test/library-tests/Closure/tests/googModuleDefault.js | goog.module('x.y.z.googdefault');
exports = function fun() {};
|
pojkem/sds | pp/peers/pp.go | <reponame>pojkem/sds
package peers
import (
"net"
"github.com/stratosnet/sds/framework/core"
"github.com/stratosnet/sds/utils"
)
//todo: pp server should be move out of peers package
// PPServer
type PPServer struct {
*core.Server
}
var ppServ *PPServer
// GetPPServer
func GetPPServer() *PPServer {
return pp... |
overstock/swagger-core | modules/swagger-core/src/test/scala/converter/XMLGregorianCalendarTest.scala | package converter
import models._
import com.wordnik.swagger.annotations._
import com.wordnik.swagger.converter._
import com.wordnik.swagger.core.util._
import com.wordnik.swagger.model._
import org.joda.time.DateTime
import scala.collection.mutable.LinkedHashMap
import scala.annotation.meta.field
import javax.xml.... |
uk-gov-mirror/alphagov.finder-frontend | spec/factories/brexit_checker/notification.rb | <gh_stars>10-100
FactoryBot.define do
factory :brexit_checker_notification, class: BrexitChecker::Notification do
id { SecureRandom.uuid }
action_id { SecureRandom.uuid }
type { "addition" }
date { "2019-08-07" }
initialize_with { BrexitChecker::Notification.new(attributes) }
end
end
|
ilyasku/readdy | readdy/main/io/BloscFilter.cpp | /********************************************************************
* Copyright © 2018 Computational Molecular Biology Group, *
* Freie Universität Berlin (GER) *
* *
* Redistribution and use in source and ... |
sobolevn/putout | packages/plugin-simplify-ternary/test/fixture/identifier.js | var b = a ? a: m;
|
LeoRiether/Competicao-Programativa | implementations/ZAlgo_cversion.cpp | #include <stdio.h>
// #define printf(x...)
int strlen(const char* s) {
int i = -1;
while (s[++i]);
return i;
}
char* strbuild(char* dest, char* a, char* b) {
int k = 0;
for (int i = 0; a[i]; dest[k++] = a[i++]);
dest[k++] = '$';
for (int i = 0; b[i]; dest[k++] = b[i++]);
return dest+k;... |
notow666/momo-cloud-permission | momo-permission-system-core/momo-permission-system-core-mapper/src/main/java/com/momo/mapper/res/aclmanager/SysEnterpriseRoleRes.java | <filename>momo-permission-system-core/momo-permission-system-core-mapper/src/main/java/com/momo/mapper/res/aclmanager/SysEnterpriseRoleRes.java
package com.momo.mapper.res.aclmanager;
import com.github.pagehelper.PageInfo;
import com.momo.mapper.dataobject.RoleDO;
import lombok.*;
/**
* @ProjectName: momo-cloud-perm... |
Vatsalparsaniya/c- | linked-lists/bubble-sort/list.c | <reponame>Vatsalparsaniya/c-
#include <stdio.h>
#include <stdlib.h>
#include "item.h"
#include "list.h"
link NEW(item key, link next) {
link x = malloc(sizeof(*x));
x->key = key;
x->next = next;
return x;
}
void list_compexch(link a, link b) {
link t;
if (item_less(b->next->key, a->next->key)) {
t = b->next;
... |
greensnow25/javaaz | chapter9/testTask/src/main/java/com/greensnow25/servlet/Delete.java | package com.greensnow25.servlet;
import com.greensnow25.repository.dao.AddressDAOImpl;
import com.greensnow25.repository.dao.UserDAOImpl;
import com.greensnow25.dataBase.CreateConnection;
import com.greensnow25.entity.Address;
import com.greensnow25.entity.User;
import javax.servlet.ServletException;
import javax.ser... |
tejasvinu/hetu-core | presto-main/src/test/java/io/prestosql/utils/TestRangeUtil.java | <gh_stars>100-1000
/*
* Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/... |
darmstrong1/filecopier | filecopier-cfg/src/test/java/net/sf/fc/cfg/AppConfigTest.java | <filename>filecopier-cfg/src/test/java/net/sf/fc/cfg/AppConfigTest.java<gh_stars>0
package net.sf.fc.cfg;
import static org.junit.Assert.*;
import java.io.File;
import java.io.IOException;
import net.sf.fc.script.gen.options.Filter;
import net.sf.fc.script.gen.options.OptionsScript;
import net.sf.fc.script.... |
bvaudour/carapace-bin | completers/resume-cli_completer/cmd/serve.go | <filename>completers/resume-cli_completer/cmd/serve.go
package cmd
import (
"github.com/rsteube/carapace"
"github.com/spf13/cobra"
)
var serveCmd = &cobra.Command{
Use: "serve",
Short: "",
Run: func(cmd *cobra.Command, args []string) {},
}
func init() {
carapace.Gen(serveCmd).Standalone()
serveCmd.Flags()... |
tobanteAudio/taetl | etl/experimental/hardware/mcp23017/mcp23017.hpp | /// \copyright <NAME> 2019-2021
/// Distributed under the Boost Software License, Version 1.0.
/// See accompanying file LICENSE or copy at http://boost.org/LICENSE_1_0.txt
#ifndef TETL_HARDWARE_MCP23017_MCP23017_HPP
#define TETL_HARDWARE_MCP23017_MCP23017_HPP
#include "etl/version.hpp"
#include "etl/cstdint.hpp"
#i... |
saiteja6030/cmm | application/assets/pages/scripts/module.js | <filename>application/assets/pages/scripts/module.js
var module = function() {
var handlemodule = function() {
$('#module_frm').validate({
errorElement: 'span', //default input error message container
errorClass: 'help-block', // default input error message class
focusI... |
yiyidhuang/PythonCrashCrouse2nd | ex2-4.py | name = "Tomas"
print(name.upper())
print(name.lower())
print(name.title()) |
123099/QuestJobs | libs/javassist/src/test/test2/ArrayLenTest.java | <reponame>123099/QuestJobs<filename>libs/javassist/src/test/test2/ArrayLenTest.java
package test2;
public class ArrayLenTest {
public int length = 1;
}
|
yunqi/lighthouse | internal/packet/unsubscribe.go | /*
* Copyright 2021 chenquan
*
* 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 la... |
mensfeld/rhodes | neon/Helium/HeliumForWindows/Implementation/Common/Private/RelativeURLs.cpp | #include "RelativeURLs.h"
/**
* \author <NAME> (DCC, JRQ768)
* \date February 2010 - Initial Creation, DCC
* \date June 2010 - Moving to a common location for File Transfer and Engines
* to both use, DCC
*/
BOOL IsRelativeURL(LPCTSTR tcURL)
{
// The URL is relative if it starts with a '.'
i... |
cfrank/natwm | src/common/error.h | <filename>src/common/error.h
// Copyright 2020 <NAME>
// Licensed under BSD-3-Clause
// Refer to the license.txt file included in the root of the project
#pragma once
enum natwm_error {
MEMORY_ALLOCATION_ERROR = 1U << 0U, // Failed to allocate memory
NOT_FOUND_ERROR = 1U << 1U, // Failed to find what ... |
Oroles/Hlin-PasswordManager | Phone/app/src/main/java/com/example/oroles/hlin/ReceivedMessage/ReceivedHashValue.java | package com.example.oroles.hlin.ReceivedMessage;
import android.preference.PreferenceManager;
import com.example.oroles.hlin.Controllers.ReceivedProcessorController;
import com.example.oroles.hlin.Fragments.SettingsFragment;
import com.example.oroles.hlin.InterfacesControllers.IStore;
import com.example.oroles.hlin.U... |
yalaudah/SynapseML | core/src/main/scala/com/microsoft/azure/synapse/ml/core/contracts/Metrics.scala | // Copyright (C) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in project root for information.
package com.microsoft.azure.synapse.ml.core.contracts
// Case class matching
sealed abstract class Metric
// Just for clarity in the contract file
object ConvenienceTypes {
... |
ScalablyTyped/SlinkyTyped | t/tensorflow__tfjs-core/src/main/scala/typingsSlinky/tensorflowTfjsCore/kernelNamesMod/CumsumAttrs.scala | package typingsSlinky.tensorflowTfjsCore.kernelNamesMod
import org.scalablytyped.runtime.StObject
import scala.scalajs.js
import scala.scalajs.js.`|`
import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, JSBracketAccess}
@js.native
trait CumsumAttrs extends StObject {
var axis: Double = ... |
baserinia/FlowSolver | src/lin_sys.h | // Incompressible Flow lin_sys
// Copyright (C) 2005 <NAME>
//------------------------------------------------------------------------------
// Created on: 16 Apr 2004
// Last update: 12 Apr 2005
//------------------------------------------------------------------------------
#ifndef CLASS_NIFS_C_LIN_SYS_H... |
luubinhan/sunshine | src/components/mystyle/layouts/Widget/WidgetBody.js | import React from 'react';
const WidgetBody = (props) => <div className="widget-body">{props.children}</div>
export default WidgetBody;
|
fedexu/BinanceBot | src/main/java/com/fedexu/binancebot/wss/macd/MacdObserver.java | package com.fedexu.binancebot.wss.macd;
import com.binance.api.client.domain.market.Candlestick;
import com.fedexu.binancebot.wss.talib.MacdValues;
import com.fedexu.binancebot.wss.talib.TaLibFunctions;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowir... |
waleedsamy/GPGMail | MailHeaders/Sierra/MailFW/MFLibraryUpgrader.h | //
// Generated by class-dump 3.5 (64 bit).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by <NAME>.
//
//#import "NSObject.h"
#import "MCActivityTarget.h"
#import "MFActivityProgressUpdater.h"
@class ACAccountStore, MCActivityAggregate, MCActivityMonitor, MFSqliteHandle, NSArray, NSStrin... |
abdul699/Machine_Coding | Snake-And-Ladders/services/GameBoardService.h | #pragma once
#include "../models/GameBoard.h"
// #include "../models/Player.h"
// #include "../models/Snake.h"
// #include "../models/Ladder.h"
#include "DiceService.h"
using namespace std;
class GameBoardService {
GameBoard gameBoard = GameBoard();
DiceService diceService = DiceService();
public:
... |
UBC-MDS/exploratory-data-viz | exercises/en/test_03_09a.py | def test():
# Here we can either check objects created in the solution code, or the
# string value of the solution, available as __solution__. A helper for
# printing formatted messages is available as __msg__. See the testTemplate
# in the meta.json for details.
# If an assertion fails, the message... |
francoishill/goangi2 | utils/entityUtils/iOrmRepo.go | <reponame>francoishill/goangi2
package entityUtils
type iOrmRepo interface {
CheckEntityExistsWithPK(ormContext *OrmContext, entityObj interface{}) bool
BaseReadEntityUsingPK(ormContext *OrmContext, entityObj interface{}, relatedFieldsToLoad *RelatedFieldsToLoad)
BaseReadEntityUsingFields(ormContext *OrmContext, ... |
nexermaverick/foundation-lib-spa-core | dist/Models/ErrorPage.js | <reponame>nexermaverick/foundation-lib-spa-core
export default class ErrorPage {
constructor(code, info) {
this.name = `${code}: ${info}`;
this.contentType = ['errors', code.toString()];
this.contentLink = {
guidValue: '',
id: code,
providerName: 'ErrorPag... |
Eastwu5788/flask-redis | tests/test_cluster/test_list.py | <filename>tests/test_cluster/test_list.py
# !/usr/local/python/bin/python
# -*- coding: utf-8 -*-
# (C) <NAME>, 2021
# All rights reserved
# @Author: '<NAME> <<EMAIL>>'
# @Time: '2022/1/10 10:35 上午'
class TestList:
def test_lpush(self, cluster):
cluster.lpush("LIST:K1", "V1", "V2")
cluster.lpush(... |
frc2881/2018RobotDrive | src/org/usfirst/frc2881/karlk/commands/SimpleIntakeCube.java | <reponame>frc2881/2018RobotDrive<filename>src/org/usfirst/frc2881/karlk/commands/SimpleIntakeCube.java
package org.usfirst.frc2881.karlk.commands;
import edu.wpi.first.wpilibj.command.CommandGroup;
import org.usfirst.frc2881.karlk.Robot;
import org.usfirst.frc2881.karlk.subsystems.IntakeSubsystem;
import org.usfirst.f... |
matoruru/purescript-react-material-ui-svgicon | src/MaterialUI/SVGIcon/Icon/WatchLaterOutlined.js | <reponame>matoruru/purescript-react-material-ui-svgicon
exports.watchLaterOutlinedImpl = require('@material-ui/icons/WatchLaterOutlined').default;
|
ndeana-21/cpp | cpp01/ex05/Brain.cpp | <reponame>ndeana-21/cpp<filename>cpp01/ex05/Brain.cpp
#include "Brain.hpp"
std::string Brain::identify(void) const {
std::stringstream stream_ptr;
stream_ptr << this;
return (stream_ptr.str());
}
void Brain::show_iq(void) const {
std::cout << "IQ: " << this->_iq << std::endl;
}
void Brain::set_iq(int new_iq) {
... |
mvsframework/mvs | src/3rdParty/include/amg/units.hpp | //
// Copyright © 2015 <NAME> <hcc |ä| gatech.edu>.
//
// 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 ap... |
displague/metal-ruby | spec/api/emails_api_spec.rb | <filename>spec/api/emails_api_spec.rb
=begin
#Metal API
#This is the API for Equinix Metal Product. Interact with your devices, user account, and projects.
The version of the OpenAPI document: 1.0.0
Contact: <EMAIL>
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 5.1.0-SNAPSHOT
=end
require ... |
rakhi2001/ecom7 | Java/878.java | <filename>Java/878.java
__________________________________________________________________________________________________
sample 0 ms submission
//import java.util.HashMap;
class Solution {
public int nthMagicalNumber(int n, int a, int b) {
if (a == b) {
return (int)(((long) a) * n % 1_000_000... |
yangxu02/SimpleProjectNote | app/src/main/java/org/htmlparser/filters/HasAttributeFilter.java | <filename>app/src/main/java/org/htmlparser/filters/HasAttributeFilter.java
// HTMLParser Library - A java-based parser for HTML
// http://htmlparser.org
// Copyright (C) 2006 <NAME>
//
// Revision Control Information
//
// $URL: https://htmlparser.svn.sourceforge.net/svnroot/htmlparser/tags/HTMLParserProject-2.1/parser... |
danielkummer/nixon-pi | spec/web_app_spec.rb | require_relative 'spec_helper'
require_relative '../web/web_server'
require_relative 'support/active_record'
require 'sinatra'
require 'rack/test'
$environment = 'test'
set :environment, :test
# set :database, 'sqlite:///spec/db/settings.db'
describe 'The Nixon-Pi Web Application', exclude: true do
include Rack::Te... |
MiztaOak/dat257_team1 | LFG/app/src/main/java/com/dat257/team1/LFG/viewmodel/CurrentActivitiesViewModel.java | package com.dat257.team1.LFG.viewmodel;
import com.dat257.team1.LFG.events.ActivityFeedEvent;
import com.dat257.team1.LFG.events.CurrentActivitiesEvent;
import com.dat257.team1.LFG.firebase.FireStoreHelper;
import com.dat257.team1.LFG.model.Activity;
import com.google.firebase.auth.FirebaseAuth;
import com.google.fire... |
rapiddweller/rd-lib-format | src/test/java/com/rapiddweller/format/util/OffsetDataSourceTest.java | <filename>src/test/java/com/rapiddweller/format/util/OffsetDataSourceTest.java
package com.rapiddweller.format.util;
import com.rapiddweller.common.CollectionUtil;
import com.rapiddweller.format.DataIterator;
import org.junit.Test;
import java.util.ArrayList;
import java.util.List;
import static org.junit.Assert.ass... |
zhusongm/AdaptiveCards | source/uwp/Renderer/lib/AdaptiveShowCardActionConfig.cpp | <filename>source/uwp/Renderer/lib/AdaptiveShowCardActionConfig.cpp
#include "pch.h"
#include "Util.h"
#include "AdaptiveSpacingDefinition.h"
#include "AdaptiveShowCardActionConfig.h"
using namespace Microsoft::WRL;
using namespace ABI::AdaptiveCards::XamlCardRenderer;
using namespace ABI::Windows::UI;
namespace Adapt... |
periannath/ONE | compiler/nnc/utils/prepare_inputs/jpeg2hdf5.py | from PIL import Image
import numpy as np
import h5py
import sys
import glob
import subprocess
import struct
import datetime
# Generates hdf5 files (and optionally binary files) from JPEGs
# -f - specifies framework to generate them for
# -t - specifies testcases directory (see it's structure in readme)
# -i - specifie... |
DetoxDelight/PayPal-Ruby-SDK | spec/payouts_examples_spec.rb | <gh_stars>100-1000
require "spec_helper"
describe "Payouts", :integration => true do
PayoutVenmoAttributes = {
:sender_batch_header => {
:sender_batch_id => SecureRandom.hex(8)
},
:items => [
{
:recipient_type => 'PHONE',
:amount => {
... |
kelvinfan001/coreos-assembler | gangplank/vendor/github.com/containers/libpod/pkg/domain/entities/system.go | package entities
import (
"time"
"github.com/spf13/cobra"
)
// ServiceOptions provides the input for starting an API Service
type ServiceOptions struct {
URI string // Path to unix domain socket service should listen on
Timeout time.Duration // duration of inactivity the service should wait before s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.