repo_name stringlengths 6 101 | path stringlengths 4 300 | text stringlengths 7 1.31M |
|---|---|---|
mfranzil/Programmazione1UniTN | exercises/IF_THEN_ELSE_SWITCH/minimo2.cc | using namespace std;
#include <iostream>
int main ()
{
int x, y, z;
cout << "Dammi tre interi x, y e z: ";
cin >> x >> y >> z;
cout << "Il minimo tra " << x << ", " << y << " e " << z << " e' ";
if (x<=y && x<=z)
cout << x;
else if (y<=x && y<=z)
cout << y;
else
cout << z;
cout <<... |
Pentacode-IAFA/Quad-Remeshing | libs/quadwild/libs/libigl/include/igl/cgal/remesh_self_intersections.h | // This file is part of libigl, a simple c++ geometry processing library.
//
// Copyright (C) 2014 <NAME> <<EMAIL>>
//
// This Source Code Form is subject to the terms of the Mozilla Public License
// v. 2.0. If a copy of the MPL was not distributed with this file, You can
// obtain one at http://mozilla.org/MPL/2.... |
oswaldquek/pay-connector | src/main/java/uk/gov/pay/connector/gateway/model/response/BaseCaptureResponse.java | package uk.gov.pay.connector.gateway.model.response;
import uk.gov.pay.connector.gateway.PaymentGatewayName;
import static java.lang.String.format;
public interface BaseCaptureResponse extends BaseResponse {
String getTransactionId();
String stringify();
static BaseCaptureResponse fromTransactionI... |
WNPRC-EHR-Services/wnprc-modules | wnprc_billing/src/org/labkey/wnprc_billing/dataentry/NonAnimalChargesFormSection.java | package org.labkey.wnprc_billing.dataentry;
import org.labkey.api.ehr.EHRService;
import org.labkey.api.ehr.dataentry.SimpleFormSection;
import org.labkey.api.view.template.ClientDependency;
import java.util.Collections;
import java.util.List;
/**
* Class to administer Ext4JS component/panel for ehr_billing.miscCha... |
benjaminchang23/jackson-street-problems | prac-cpp/pair_hash_0.cc | <reponame>benjaminchang23/jackson-street-problems<gh_stars>0
/**
* BlockingUnorderedMap.h
*
* Thread safe blocking unordered map
*/
#ifndef __BLOCKING_UNORDERED_MAP_H__
#define __BLOCKING_UNORDERED_MAP_H__
#include <functional>
#include <mutex>
#include <unordered_map>
template <typename Key, typename Value, ty... |
Acidburn0zzz/SpiderOakMobileClient | src/collections/ShareRoomsCollections.js | <gh_stars>0
/**
* ShareRoomsCollection.js
*/
(function (spiderOakApp, window, undefined) {
"use strict";
var console = window.console || {};
console.log = console.log || function(){};
var Backbone = window.Backbone,
_ = window._,
$ = window.$;
var ppcb = spiderOakApp.Pass... |
dh256/adventofcode | 2020/Day10/tests.py | import pytest
from Adapters import Adapters
test_data1 = [('test1.txt',22),('test2.txt',52)]
test_data2 = [('test1.txt',35),('test2.txt',220)]
test_data3 = [('test1.txt',8),('test2.txt',19208)]
@pytest.mark.parametrize("file_name,built_in",test_data1)
def test_built_in(file_name,built_in):
adapters=Adapters(file_... |
DBatOWL/tutorials | spring-5-webflux/src/test/java/com/baeldung/spring/serverconfig/TimeoutLiveTest.java | package com.baeldung.spring.serverconfig;
import java.util.concurrent.TimeUnit;
import javax.net.ssl.SSLException;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootT... |
krishna13052001/LeetCode | 334 Increasing Triplet Subsequence py3.py | #!/usr/bin/python3
"""
Given an unsorted array return whether an increasing subsequence of length 3
exists or not in the array.
Formally the function should:
Return true if there exists i, j, k
such that arr[i] < arr[j] < arr[k] given 0 ≤ i < j < k ≤ n-1 else return false.
Note: Your algorithm should run in O(n) time... |
lsabella/baishu-admin | node_modules/@antv/scale/src/pow.js | <gh_stars>1-10
/**
* @fileOverview 使用pow进行度量计算
* @author <EMAIL>
*/
const Base = require('./base');
const Linear = require('./linear');
// 求以a为次幂,结果为b的基数,如 x^^a = b;求x
function calBase(a, b) {
const e = Math.E;
const value = Math.pow(e, Math.log(b) / a); // 使用换底公式求底
return value;
}
/**
* 度量的Pow计算
* @class ... |
lnkkerst/oj-codes | src/luogu/P1010/26444526_ac_100_14ms_800k_noO2.cpp | #include <bits/stdc++.h>
using namespace std;
void work(int n) {
int i = 0, cnt = 0, h[50];
while(n) {
if(n & 1) h[++cnt] = i;
n >>= 1, ++i;
}
while(cnt) {
if(h[cnt] < 3) {
if(h[cnt] == 1 && cnt != 1) cout << "2+";
else if(h[cnt] == 1) cout << "2";
... |
ZhanJunLiau/raven-java | raven/src/test/java/com/getsentry/raven/buffer/BufferTest.java | <filename>raven/src/test/java/com/getsentry/raven/buffer/BufferTest.java
package com.getsentry.raven.buffer;
import java.io.File;
public class BufferTest {
protected void delete(File dir) {
if (!dir.exists()) {
return;
}
if (dir.isDirectory()) {
for (File c : dir.l... |
Mu-L/thymeleaf | src/main/java/org/thymeleaf/expression/Sets.java | /*
* =============================================================================
*
* Copyright (c) 2011-2018, The THYMELEAF team (http://www.thymeleaf.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may ob... |
jonbonJoeB/epi | arrays/src/main/java/ComputeSpiralOrdering.java | <reponame>jonbonJoeB/epi
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class ComputeSpiralOrdering {
/*
5.18
*/
public static List<Integer> matrixInSpiralOrder(List<List<Integer>> squareMatrix) {
if (squareMatrix == null || squareMatrix.size() == 0 ||... |
rsachdeva/illuminatingdeposits-rest | usermgmt/usermgmtsvc_test.go | <filename>usermgmt/usermgmtsvc_test.go
// Adds test that starts a Http server and client tests the user mgmt service with http routing
package usermgmt_test
import (
"encoding/json"
"fmt"
"net/http"
"strings"
"testing"
"github.com/rsachdeva/illuminatingdeposits-rest/testserver"
"github.com/rsachdeva/illuminati... |
Sirherobrine23/Dir819gpl_code | DIR819_v1.06/src/kernel/linux-2.6.36.x/drivers/net/eip93_drivers/quickSec/src/lib/sshutil/sshadt/sshadt.c | <gh_stars>1-10
/*
sshadt.c
Author: <NAME> <<EMAIL>>
Copyright:
Copyright (c) 2002, 2003 SFNT Finland Oy.
All rights reserved.
Created Wed Sep 8 17:41:05 1999.
*/
#include "sshincludes.h"
#include "sshadt_i.h"
#include "sshdebug.h"
#define SSH_DEBUG_MODULE "SshADT"
/**********************... |
danielbmancini/JHTP8_JCP8_Sol._Comentadas | 18/src/RecursivePalindromeTesting.java | <filename>18/src/RecursivePalindromeTesting.java
/*
exercise 18.14
*/
import java.util.Scanner;
public class RecursivePalindromeTesting {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.println("(Insert candidate)\n");
char[] string = sc... |
npocmaka/Windows-Server-2003 | sdktools/rcdll/rc.c | <reponame>npocmaka/Windows-Server-2003<filename>sdktools/rcdll/rc.c
/***********************************************************************
* Microsoft (R) Windows (R) Resource Compiler
*
* Copyright (c) Microsoft Corporation. All rights reserved.
*
* File Comments:
*
*
****************************************... |
qhanke1992/mini-github | miniprogram/components/feedItem/feedItem.js | const utils = require('../../utils/util.js')
const notifUtils = require('../../utils/notifications.js')
Component({
properties: {
item: {
type: Object,
value: {}
}
},
methods: {
toUserPage: function(event) {
const username = this.data.item.actor.login
wx.navigateTo({
... |
Justineo/vue-awesome-material | icons/timelapse.js | import Icon from 'vue-awesome/components/Icon'
Icon.register({
timelapse: {
paths: [
{
d: 'M16.24 7.76A5.974 5.974 0 0012 6v6l-4.24 4.24c2.34 2.34 6.14 2.34 8.49 0a5.99 5.99 0 00-.01-8.48zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 ... |
MisterZhouZhou/pythonLearn | hack/pcap/index.py | <gh_stars>1-10
import pcap
import dpkt
def captData():
pc = pcap.pcap('en0') # 注,参数可为网卡名,如eth0
pc.setfilter('tcp port 80') # 设置监听过滤器
for ptime, pdata in pc: # ptime为收到时间,pdata为收到数据
anlyCap(pdata)
def anlyCap(pdata):
p = dpkt.ethernet.Ethernet(pdata)
if p.data.__class__.__name__ == 'IP':... |
Florian1606/EnchereProjet | src/fr/formation/projet/enchere/bo/Utilisateur.java | package fr.formation.projet.enchere.bo;
import java.util.ArrayList;
import java.util.List;
public class Utilisateur {
private int noUtilisateur;
private static int cptUtilisateur = 0;
private String pseudo;
private String nom;
private String prenom;
private String email;
private String telephone;
private Stri... |
stbly/gemp-swccg-public | gemp-swccg-cards/src/main/java/com/gempukku/swccgo/cards/set207/dark/Card207_028.java | <gh_stars>10-100
package com.gempukku.swccgo.cards.set207.dark;
import com.gempukku.swccgo.cards.AbstractStarfighter;
import com.gempukku.swccgo.cards.conditions.HasPilotingCondition;
import com.gempukku.swccgo.cards.evaluators.InBattleEvaluator;
import com.gempukku.swccgo.common.*;
import com.gempukku.swccgo.filters.... |
A-G-Angelopoulos/Tron | cmds/Moderator/unmute.js | <filename>cmds/Moderator/unmute.js
exports.data = {
name: 'Unmute',
description: 'Unmutes a specific user.',
group: 'Moderator',
command: 'unmute',
syntax: 'unmute [@name]',
author: 'TRX',
permissions: 3,
};
exports.func = async (message, args) => {
const OTS = require(`${message.client.config.folders.models}/... |
amyrebecca/caesar | app/models/conditions/disjunction.rb | module Conditions
class Disjunction
attr_reader :operations
def initialize(operations)
@operations = operations
end
def to_a
["or"] + @operations.map(&:to_a)
end
def apply(bindings)
@operations.reduce(false) { |memo, operation| memo || operation.apply(bindings) }
end
... |
egraba/vbox_openbsd | VirtualBox-5.0.0/src/VBox/Runtime/testcase/tstNoCrt-1.cpp | /* $Id: tstNoCrt-1.cpp $ */
/** @file
* IPRT Testcase - Testcase for the No-CRT assembly bits.
*/
/*
* Copyright (C) 2008-2015 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* you can redistribute it an... |
Dhruv-Techapps/xpath-finder-code | extension/src/background/_cipher.js | <filename>extension/src/background/_cipher.js<gh_stars>0
let cipher = (salt => {
if (!salt) {
throw new Error("Salt key is not provided");
}
let textToChars = text => text.split('').map(c => c.charCodeAt(0));
let byteHex = n => ("0" + Number(n).toString(16)).substr(-2);
let applySaltToChar = code => textT... |
robjacoby/wiz_khilafas | db/migrate/20160512053545_create_set_updated_at_function.rb | <filename>db/migrate/20160512053545_create_set_updated_at_function.rb<gh_stars>1-10
ROM::SQL.migration do
up do
sql = <<-SQL
CREATE OR REPLACE FUNCTION set_updated_at_column() RETURNS TRIGGER AS $$
BEGIN
NEW.updated_at = CURRENT_TIMESTAMP;
RETURN NEW;
END;
$$ language 'plpg... |
haribo0915/Judge-Girl | Spring-Boot/Spring-Boot-Commons/src/main/java/tw/waterball/judgegirl/springboot/configs/RedisConfig.java | package tw.waterball.judgegirl.springboot.configs;
import lombok.AllArgsConstructor;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframew... |
MarginC/kame | netbsd/sys/arch/walnut/include/varargs.h | /* $NetBSD: varargs.h,v 1.1 2001/06/13 06:01:59 simonb Exp $ */
#include <powerpc/varargs.h>
|
toasterco/apiaiassistant | tests/test_widgets/test_base.py | <reponame>toasterco/apiaiassistant<filename>tests/test_widgets/test_base.py
import unittest
from apiai_assistant.widgets import GoogleAssistantWidget
class GoogleAssistantWidgetTestCase(unittest.TestCase):
def test_basic(self):
w = GoogleAssistantWidget()
self.assertEqual(w.platform, 'google')
... |
NASA-AMMOS/aerie-lander | src/main/java/gov/nasa/jpl/aerielander/activities/heatprobe/HeatProbeTemP.java | package gov.nasa.jpl.aerielander.activities.heatprobe;
import gov.nasa.jpl.aerie.merlin.framework.annotations.ActivityType;
import gov.nasa.jpl.aerie.merlin.framework.annotations.ActivityType.ControllableDuration;
import gov.nasa.jpl.aerie.merlin.framework.annotations.ActivityType.EffectModel;
import gov.nasa.jpl.aeri... |
lethunder/lumber | test-fixtures/mongo/nested-array-of-numbers-model.js | const { ObjectID } = require('mongodb');
const persons = [
{
_id: ObjectID(),
name: '<NAME>',
propArrayOfNumbers: [1, 2, 3],
},
];
module.exports = { persons };
|
kiran1235/phalitha | webui/app/models/mapping.rb | <gh_stars>0
class Mapping < ActiveRecord::Base
belongs_to :instance
has_one :property
has_many :mapping_fields
has_many :mappings_users
has_many :users, through: :mappings_users
validates :name, presence: true
validates :description, presence: true
validates :sourcetype, inclusion: { in: %w(xml databas... |
g2forge/gearbox | gb-command/src/test/java/com/g2forge/gearbox/command/proxy/method/ITestCommandInterface.java | package com.g2forge.gearbox.command.proxy.method;
public interface ITestCommandInterface extends ICommandInterface {}
|
liumapp/compiling-jvm | openjdk/jdk/test/sun/jvmstat/testlibrary/JavaProcess.java | /*
* Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Softwa... |
DimchoLakov/JS-Applications | 04. SPA Applications - Exercise/02.Movies/static/js/likes.js | <reponame>DimchoLakov/JS-Applications
import { getUserId, getUserToken } from './login.js';
export async function getLikesCountByMovieId(id) {
try {
const response = await fetch(`http://localhost:3030/data/likes?where=movieId%3D%22${id}%22&distinct=_ownerId&count`);
const data = await response.json... |
jkeen/ember-stereo | addon/helpers/sound-is-loading.js | import StereoBaseIsHelper from 'ember-stereo/-private/helpers/is-helper';
import debugMessage from 'ember-stereo/-private/utils/debug-message';
/**
A helper to detect if a sound is loading.
```hbs
{{#if (sound-is-loading @identifier)}}
<p>This sound is currently loading</p>
{{else}}
<p>This sou... |
richardcyrus/nosh | seeders/20190129230035-create-user.js | // require('dotenv').config();
const bcrypt = require('bcrypt');
const salt = bcrypt.genSaltSync(parseInt(process.env.SALT_WORK_FACTOR));
const hash = bcrypt.hashSync(process.env.SEED_USER_PASSWORD, salt);
module.exports = {
up: async (queryInterface) => {
// await queryInterface.sequelize.query('SET FORE... |
Y-sir/spark-cn | sql/core/target/java/org/apache/spark/sql/execution/datasources/orc/OrcOutputWriter.java | <filename>sql/core/target/java/org/apache/spark/sql/execution/datasources/orc/OrcOutputWriter.java<gh_stars>0
package org.apache.spark.sql.execution.datasources.orc;
class OrcOutputWriter extends org.apache.spark.sql.execution.datasources.OutputWriter {
public OrcOutputWriter (java.lang.String path, org.apache.sp... |
deadsnakes/python2.3 | Demo/threads/find.py | # A parallelized "find(1)" using the thread module.
# This demonstrates the use of a work queue and worker threads.
# It really does do more stats/sec when using multiple threads,
# although the improvement is only about 20-30 percent.
# (That was 8 years ago. In 2002, on Linux, I can't measure
# a speedup. :-( )
# ... |
lizhifuabc/spring-boot-learn | spring-boot-lombok/src/main/java/com/boot/lombok/example/NonNullExample.java | <reponame>lizhifuabc/spring-boot-learn
package com.boot.lombok.example;
import lombok.NonNull;
/**
* https://projectlombok.org/features/NonNull
*
* @author lizhifu
* @date 2020/12/29
*/
public class NonNullExample {
private String name;
public NonNullExample(@NonNull String name) {
this.name = n... |
wnbx/snail | snail/src/main/java/com/acgist/snail/context/NatContext.java | <reponame>wnbx/snail<gh_stars>0
package com.acgist.snail.context;
import java.util.concurrent.TimeUnit;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.acgist.snail.IContext;
import com.acgist.snail.config.SystemConfig;
import com.acgist.snail.net.stun.StunService;
import com.acgist.snail.net.upn... |
hoverjet/google-api-ruby-client | generated/google/apis/fusiontables_v2/classes.rb | # Copyright 2015 Google 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
#
# Unless required by applicable law or agreed to in writing,... |
cstamas/krati | src/test/java/test/store/TestDynamicStoreMapped.java | <reponame>cstamas/krati
package test.store;
import krati.core.segment.SegmentFactory;
/**
* TestDynamicStore using MappedSegment.
*
* @author jwu
*
*/
public class TestDynamicStoreMapped extends TestDynamicStore
{
@Override
protected SegmentFactory getSegmentFactory()
{
return new krati.core... |
dandycheung/GIFCompressor | lib/src/main/java/com/otaliastudios/gif/source/FileDescriptorDataSource.java | <reponame>dandycheung/GIFCompressor<filename>lib/src/main/java/com/otaliastudios/gif/source/FileDescriptorDataSource.java
package com.otaliastudios.gif.source;
import android.content.Context;
import java.io.FileDescriptor;
import java.io.FileInputStream;
import java.io.InputStream;
import androidx.annotation.NonNull... |
florianrusch-zf/DataSpaceConnector | extensions/sql/transfer-process-store/src/main/java/org/eclipse/dataspaceconnector/sql/transferprocess/SqlTransferProcessStoreExtension.java | <reponame>florianrusch-zf/DataSpaceConnector
/*
* Copyright (c) 2020 - 2022 Microsoft Corporation
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0
*
* SPDX-License-Ident... |
maciejasembler/puppet-pacemaker | spec/unit/puppet/provider/pacemaker_order/xml_spec.rb | require 'spec_helper'
describe Puppet::Type.type(:pacemaker_order).provider(:xml) do
let(:resource) do
Puppet::Type.type(:pacemaker_order).new(
name: 'my_order',
first: 'p_1',
second: 'p_2',
provider: :xml,
)
end
let(:provider) do
resource.provider
end
before(:ea... |
saperiumrocks/node-eventstore | jasmine/integration-narrow/eventstore-playback-list-view-myql-store.jasmine-integration-spec.js | <filename>jasmine/integration-narrow/eventstore-playback-list-view-myql-store.jasmine-integration-spec.js
const Bluebird = require('bluebird');
const EventstorePlaybackListStore = require('../../lib/eventstore-projections/eventstore-playbacklist-mysql-store');
const EventstorePlaybackListView = require('../../lib/event... |
janheise/zentral | zentral/contrib/mdm/migrations/0036_auto_20210530_0858.py | <filename>zentral/contrib/mdm/migrations/0036_auto_20210530_0858.py
# Generated by Django 2.2.18 on 2021-05-30 08:58
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('mdm', '0035_auto_20210530_0717'),
]
operations = [
migrations.AlterFiel... |
stephen-shelby/starrocks | fe/fe-core/src/test/java/com/starrocks/sql/analyzer/AdminSetTest.java | // This file is licensed under the Elastic License 2.0. Copyright 2021-present, StarRocks Limited.
package com.starrocks.sql.analyzer;
import com.starrocks.utframe.UtFrameUtils;
import org.junit.BeforeClass;
import org.junit.Test;
import static com.starrocks.sql.analyzer.AnalyzeTestUtil.analyzeFail;
import static com... |
valera-rozuvan/sharky | src/bitboard.c | <reponame>valera-rozuvan/sharky<filename>src/bitboard.c
/*
*
* setBitMask[] and clrBitMask[] arrays are used by the macros CLEAR_BIT() and SET_BIT().
* There are 64 items in each array so that we can use the macros on any C numeric type
* (integers), including `unsigned long long`.
*
**/
unsigned long long setBit... |
jm90m/pigzbe-app | src/app/components/keyboard-avoid/index.js | <gh_stars>0
import React from 'react';
import {KeyboardAvoidingView} from 'react-native';
import isDesktop from '../../utils/is-desktop';
import isAndroid from '../../utils/is-android';
export default ({children, offset = 0, containerStyle, pad}) => {
if (isDesktop) {
return children;
}
return (
... |
liujuanLT/insightface | recognition/arcface_torch/losses.py | <gh_stars>1-10
import torch
import math
class ArcFace(torch.nn.Module):
""" ArcFace (https://arxiv.org/pdf/1801.07698v1.pdf):
"""
def __init__(self, s=64.0, margin=0.5):
super(ArcFace, self).__init__()
self.scale = s
self.cos_m = math.cos(margin)
self.sin_m = math.sin(margin... |
mythoss/midpoint | gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/login/PageRegistrationFinish.java | <reponame>mythoss/midpoint<gh_stars>0
/*
* Copyright (c) 2010-2019 Evolveum and contributors
*
* This work is dual-licensed under the Apache License 2.0
* and European Union Public License. See LICENSE file for details.
*/
package com.evolveum.midpoint.web.page.login;
import com.evolveum.midpoint.authentication.a... |
ScienceOctopus/octopus-web-app | server/routes/problems.js | <reponame>ScienceOctopus/octopus-web-app
const express = require("express");
const db = require("../postgresQueries").queries;
const blobService = require("../lib/blobService");
const upload = blobService.upload;
const getUserFromSession = require("../lib/userSessions").getUserFromSession;
const broadcast = require(".... |
5Sigma/help_kit | app/controllers/help_kit/admin/categories_controller.rb | require_dependency "help_kit/application_controller"
module HelpKit
class Admin::CategoriesController < ApplicationController
layout 'help_kit/admin'
before_action :set_category, only: [:show, :edit, :update, :destroy]
before_action :check_authorization
def index
@categories = Category.roots
... |
AdamGlowicki/erpzgeckonetu | resources/js/components/enums/groups/groups.js | <gh_stars>0
export const GroupsType = [
{id: 0, label: 'Szafy'},
{id: 1, label: 'Słupy pod nadajniki'},
{id: 2, label: 'Słupy ENERGA'},
{id: 3, label: 'Słupy ENEA'},
{id: 4, label: 'Studnie'},
]
|
dreamsxin/ultimatepp | uppdev/Malloc/Util.cpp | #include "Malloc.h"
#define LTIMING(x)
static MemoryProfile *sPeak;
void *MemoryAllocPermanentRaw(size_t size)
{
if(size >= 256)
return malloc(size);
static byte *ptr = NULL;
static byte *limit = NULL;
if(ptr + size >= limit) {
ptr = (byte *)AllocRaw4KB();
limit = ptr + 4096;
}
void *p = ... |
woozhijun/cat | cat-client/src/test/java/com/dianping/cat/message/CatTestCase.java | /*
* Copyright (c) 2011-2018, <NAME>. All Rights Reserved.
*
* 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 t... |
lottie-c/spl_tests_new | src/java/cz/cuni/mff/spl/reflection/ClassNamesByPaternFilter.java | /*
* Copyright (c) 2012, <NAME>, <NAME>, <NAME>, <NAME>
* All rights reserved.
*
* 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
* notic... |
a-shiro/SoftUni-Courses | Python Basics/3. And - Or - Not/10. Invalid Number.py | number = int(input())
calculation = 100 <= number <= 200 or number == 0
if not calculation:
print("invalid")
|
TalentedEurope/te-app | src/components/Profile/common/components/Tags.js | import React from 'react';
import { Text, StyleSheet, View } from 'react-native';
import COMMON_STYLES from '../../../../styles/common';
export const SkillsTags = (props) => {
const tagStyle = [styles.tag, styles.blue];
const tagDarkStyle = [styles.tag, styles.dark];
const addedIds = [];
const skills = props.... |
rjw57/tiw-computer | emulator/src/mame/drivers/picno.cpp | <gh_stars>1-10
// license:BSD-3-Clause
// copyright-holders:Robbbert
/******************************************************************************************************************************
Konami Picno and Picno2
Skeleton driver started on 2017-11-30, can be claimed by anyone interested.
Information provided... |
eder-matheus/programming_marathons | maratona_1/data_structure.cpp | // data structure - uri 1340
#include <iostream>
#include <string>
#include <stack>
#include <queue>
#define ADD_ELEMENT 1
#define REMOVE_ELEMENT 2
int main() {
int cmd_count;
int cmd, param;
while (std::cin >> cmd_count) {
bool is_stack = true;
bool is_queue = true;
bool is_prior_queue = true;
... |
biemo8/bbs-cloud | biemo-system/biemo-system-app/src/main/java/com/biemo/cloud/system/modular/sys/provider/ResourceServiceProvider.java | package com.biemo.cloud.system.modular.sys.provider;
import com.biemo.cloud.system.api.ResourceServiceApi;
import com.biemo.cloud.system.modular.sys.entity.SysApp;
import com.biemo.cloud.system.modular.sys.entity.SysResource;
import com.biemo.cloud.system.modular.sys.factory.ResourceFactory;
import com.biemo.cloud.sys... |
Robbbert/messui | docs/release/src/osd/winui/mui_opts.cpp | <reponame>Robbbert/messui
// For licensing and usage information, read docs/winui_license.txt
// MASTER
//****************************************************************************
/***************************************************************************
mui_opts.cpp
Stores global options and per-game opti... |
tony2u/Medusa | Medusa/Medusa/Geometry/GeometryAlgorithm.cpp | // Copyright (c) 2015 fjz13. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
#include "MedusaPreCompiled.h"
#include "GeometryAlgorithm.h"
MEDUSA_BEGIN;
bool GeometryAlgorithm::IsInPolygon(const float* verticesX, const float* verticesY, ui... |
cragkhit/elasticsearch | references/bcb_chosen_clones/selected#725999#523#550.java | <filename>references/bcb_chosen_clones/selected#725999#523#550.java
public static String getUrl(String urlString) {
int retries = 0;
String result = "";
while (true) {
try {
URL url = new URL(urlString);
BufferedReader rdr = new BufferedReader(new ... |
yashoza19/OnlineBanking | src/main/java/com/neu/onlinebanking/dao/SavingsTransactionDao.java | package com.neu.onlinebanking.dao;
import java.util.List;
import com.neu.onlinebanking.pojo.SavingsAccount;
import com.neu.onlinebanking.pojo.SavingsTransaction;
public interface SavingsTransactionDao {
List<SavingsTransaction> findAll();
void save(SavingsTransaction savingsTransaction);
SavingsTransaction f... |
csokol/finatra | thrift/src/test/scala/com/twitter/finatra/thrift/tests/EmbeddedThriftServerFeatureTest.scala | package com.twitter.finatra.thrift.tests
import com.twitter.converter.thriftscala.Converter
import com.twitter.converter.thriftscala.Converter.Uppercase
import com.twitter.finagle.{Service, SimpleFilter, TimeoutException}
import com.twitter.finatra.thrift.codegen.MethodFilters
import com.twitter.finatra.thrift.filters... |
giux78/daf | storage_manager/app/daf/filesystem/FileFormat.scala | <reponame>giux78/daf
/*
* Copyright 2017 TEAM PER LA TRASFORMAZIONE DIGITALE
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Un... |
homw188/homw-framework | homw-modbus/src/main/java/com/homw/modbus/struct/pdu/request/ReadDiscreteInputsRequestUnit.java | <gh_stars>1-10
package com.homw.modbus.struct.pdu.request;
import com.homw.modbus.struct.ModbusFuncCode;
import com.homw.modbus.struct.pdu.ModbusProtoUnitSupport;
public class ReadDiscreteInputsRequestUnit extends ModbusProtoUnitSupport {
public ReadDiscreteInputsRequestUnit() {
super(ModbusFuncCode.READ_DI... |
imetaxas/realitycheck | src/test/java/com/yanimetaxas/realitycheck/CustomReadableTestObject.java | package com.yanimetaxas.realitycheck;
import com.yanimetaxas.realitycheck.custom.AbstractCustomObject;
/**
* @author yanimetaxas
* @since 26-Feb-18
*/
public class CustomReadableTestObject extends AbstractCustomObject<CustomReadableTestObjectAssert> {
}
|
EricGrivilers/chords-db | src/db/guitar/chords/C/_D.js | <filename>src/db/guitar/chords/C/_D.js
export default {
key: 'C',
suffix: '/D',
positions: [
{
frets: 'xx0010',
fingers: '000010'
}
]
};
|
thebigcx/micro | usr/apps/ed/ed.c | #include <stdio.h>
#include <stdint.h>
static FILE* file;
static uintptr_t linenr;
void do_insert()
{
printf("insert: ");
char* insert = malloc(256);
fgets(insert, 256, stdin);
char* ptr = strchr(insert, '\n');
if (ptr) *ptr = 0;
size_t old = ftell(file);
fwrite(insert, strlen(insert), ... |
Phanatic/vitess | go/vt/mysqlctl/gcsbackup/storage.go | <reponame>Phanatic/vitess
package gcsbackup
import (
"context"
"os"
"path"
"sort"
"strings"
"sync"
"cloud.google.com/go/storage"
"github.com/pkg/errors"
cloudkms "google.golang.org/api/cloudkms/v1"
"google.golang.org/api/iterator"
"google.golang.org/api/option"
"vitess.io/vitess/go/vt/mysqlctl/backupstor... |
verenceLola/Shopping | shoppingList/apps/shoppingItems/tests/test_models.py | import freezegun
import datetime
from django.utils import timezone
def test_create_new_shopping_list(create_shopping_list):
"""
test new list created with no item, and budget of 0
"""
shopping_list = create_shopping_list
assert shopping_list.items.values_list().count() == 0
assert shopping_lis... |
plantuml/plantuml-mit | src/net/sourceforge/plantuml/activitydiagram3/ftile/Arrows.java | /* ========================================================================
* PlantUML : a free UML diagram generator
* ========================================================================
*
* (C) Copyright 2009-2020, <NAME>
*
* Project Info: https://plantuml.com
*
* If you like this project or if you fin... |
NTNAEEM/hotentot | examples/win32/echo-hot/stub/echo_service_impl.cc | /******************************************************************
* Generated by Hottentot CC Generator
* Date: 01-02-2016 01:45:06
* Name: echo_service_impl.cc
* Description:
* This file contains empty implementation of sample stub.
******************************************************************/
... |
mgawan/mhm2_staging | src/aln_depths.cpp | <reponame>mgawan/mhm2_staging
/*
HipMer v 2.0, Copyright (c) 2020, The Regents of the University of California,
through Lawrence Berkeley National Laboratory (subject to receipt of any required
approvals from the U.S. Dept. of Energy). All rights reserved."
Redistribution and use in source and binary forms, with ... |
Paul-Long/react-ssr-core | src/client/components/spin/index.js | import React from 'react';
import classNames from 'classnames';
import PropTypes from 'prop-types';
import { LOGO } from '@constants/images';
import './style.less';
class Spin extends React.PureComponent {
static propTypes = {
prefixCls: PropTypes.string,
};
static defaultProps = {
prefixCls: 'ssr-spin',... |
phatblat/macOSPrivateFrameworks | PrivateFrameworks/SearchFoundation/_SFPBText.h | <filename>PrivateFrameworks/SearchFoundation/_SFPBText.h
//
// Generated by class-dump 3.5 (64 bit).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by <NAME>.
//
#import "PBCodable.h"
#import "NSSecureCoding.h"
#import "_SFPBText.h"
@class NSData, NSString;
@interface _SFPBText : PBCodabl... |
layman-809/gmall | gmall-auth/src/main/java/com/atguigu/gmall/auth/feign/GmallUmsClient.java | package com.atguigu.gmall.auth.feign;
import com.atguigu.gmall.auth.entity.UserEntity;
import com.atguigu.gmall.common.bean.ResponseVo;
import com.atguigu.gmall.ums.api.GmallUmsApi;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframe... |
yasserattar/lorawan-stack | pkg/webui/components/wizard/form/next-button.js | <gh_stars>100-1000
// Copyright © 2020 The Things Network Foundation, The Things Industries B.V.
//
// 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/L... |
YorickPeterse/zen-cms | spec/zen/package/dashboard/controller/dashboard.rb | <reponame>YorickPeterse/zen-cms
require File.expand_path('../../../../../helper', __FILE__)
require File.join(Zen::FIXTURES, 'package/dashboard/widget')
##
# The specifications in this block run using Selenium so make sure you have
# Selenium and Firefox installed.
#
# Various specifications in this file contain calls... |
PrakharPipersania/LeetCode-Solutions | Questions Level-Wise/Medium/pancake-sorting.cpp | <gh_stars>1-10
class Solution {
public:
vector<int> pancakeSort(vector<int>& A)
{
int n,index;
vector<int> x;
for(n=A.size();n>0;n--)
{
index=0;
for(int i=0;A[i]!=n;i++)
index=i+1;
index++;
if(index!=n)
... |
sjbose/codegnera | src/styles/sizes.element.js | export const size = {
mobileS: '320px',
mobileM: '375px',
mobileL: '425px',
tablet: '768px',
laptop: '1024px',
laptopL: '1440px',
desktop: '2560px'
} |
trisquareeu/bytemapper | src/main/java/eu/trisquare/bytemapper/fieldmapper/SingleValueFieldMapper.java | <gh_stars>1-10
package eu.trisquare.bytemapper.fieldmapper;
import org.apache.commons.lang3.ClassUtils;
import java.nio.ByteBuffer;
/**
* Default mapper for all single-value data types, i.e. numbers
*/
class SingleValueFieldMapper implements FieldMapper {
/**
* Holds maximum allowed size of processed da... |
LaudateCorpus1/trufflex86 | projects/org.graalvm.vm.util/src/org/graalvm/vm/util/log/Trace.java | /*
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* The Universal Permissive License (UPL), Version 1.0
*
* Subject to the condition set forth below, permission is hereby granted to any
* person obtaining a copy of this s... |
Excellent1212/React-Next-Hook-Sample | queries/index.js | import petDetailsQuery from './petDetails.query';
import petFindQuery from './petFind.query';
import shelterQuery from './shelterDetails.query';
import shelterGetPetsQuery from './shelterGetPets.query';
export { petDetailsQuery, petFindQuery, shelterQuery, shelterGetPetsQuery };
|
AnomalistDesignLLC/kansha | kansha/card_addons/vote/tests.py | # -*- coding:utf-8 -*-
#--
# Copyright (c) 2012-2014 Net-ng.
# All rights reserved.
#
# This software is licensed under the BSD License, as described in
# the file LICENSE.txt, which you should have received as part of
# this distribution.
#--
from kansha.cardextension.tests import CardExtensionTestCase
from .comp im... |
bianapis/sd-direct-debit-mandate-v2.0 | src/main/java/org/bian/dto/BQMandateRegistrationRetrieveOutputModelMandateRegistrationInstanceAnalysis.java | <gh_stars>0
package org.bian.dto;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.Valid;
/**
* BQMandateRegistrationRetrieveOutputModelMandateR... |
GavrielDunev/Java-Advanced | Java OOP/Polymorphism/src/VehiclesExtension/Bus.java | <gh_stars>0
package VehiclesExtension;
import java.text.DecimalFormat;
public class Bus extends Vehicle{
private static final double ADDITIONAL_CONSUMPTION_WITH_AIR_CONDITIONER = 1.4;
public Bus(double fuelQuantity, double fuelConsumptions, double tankCapacity) {
super(fuelQuantity, fuelConsumptions,... |
timfel/netbeans | platform/o.n.swing.tabcontrol/src/org/netbeans/swing/tabcontrol/WinsysInfoForTabbed.java | <gh_stars>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
* ... |
bengler/vanilla | spec/helpers/url_helper.rb | module UrlHelper
def params_from_url(url)
params = CGI.parse(URI.parse(url).query)
Hash[*params.entries.map { |k, v| [k, v[0]] }.flatten].with_indifferent_access
end
def params_from_fragment(url)
params = CGI.parse(URI.parse(url).fragment)
Hash[*params.entries.map { |k, v| [k, v[0]] }.flatten].w... |
Andreas237/AndroidPolicyAutomation | ExtractedJars/Health_com.huawei.health/javafiles/com/huawei/hms/support/api/entity/auth/AuthorizationInfo.java | <reponame>Andreas237/AndroidPolicyAutomation
// Decompiled by Jad v1.5.8g. Copyright 2001 <NAME>.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) annotate safe
package com.huawei.hms.support.api.entity.auth;
import android.text.TextUtils;
import com.huawei.hms.core.aidl.IMessage... |
michaelrk02/aksen | frontend/portal/OrderFormLocked.js | import {Component, createElement as $} from 'react';
import {Link} from 'react-router-dom';
export default class OrderFormLocked extends Component {
constructor(/* form, duration */ props) {
super(props);
this.state = {
timeLeft: this.props.duration
};
this.page = this.... |
Kyle9021/trireme-lib | controller/pkg/ipsetmanager/helpers.go | package ipsetmanager
import (
"strings"
)
func addToIPset(set Ipset, data string) error {
// ipset can not program this rule
if data == IPv4DefaultIP {
if err := addToIPset(set, "0.0.0.0/1"); err != nil {
return err
}
return addToIPset(set, "172.16.31.10/1")
}
// ipset can not program this rule
if d... |
tracy4262/zhenxingxiangcun | server/nswy-api-dev/nswy-member-service/src/main/java/com/ovit/nswy/member/service/impl/ProxyReversionServiceImpl.java | <reponame>tracy4262/zhenxingxiangcun<filename>server/nswy-api-dev/nswy-member-service/src/main/java/com/ovit/nswy/member/service/impl/ProxyReversionServiceImpl.java
package com.ovit.nswy.member.service.impl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.ovit.nswy.member.map... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.