repo_name
stringlengths
6
101
path
stringlengths
4
300
text
stringlengths
7
1.31M
rapid7/raptor-io
spec/raptor-io/protocol/http/response_spec.rb
<gh_stars>1-10 #coding: utf-8 require 'spec_helper' describe RaptorIO::Protocol::HTTP::Response do it_should_behave_like 'RaptorIO::Protocol::HTTP::Message' let(:url) { 'http://test.com' } let(:response) do "HTTP/1.1 404 Not Found\r\n" + "Content-Type: text/html;charset=utf-8\r\n" + "Content-Le...
AchoArnold/cracking-the-coding-interview
chapter2/singly_linked_list_test.go
<gh_stars>1-10 package chapter2 import ( "strconv" "testing" "github.com/stretchr/testify/assert" ) func TestSlice(t *testing.T) { list := makeListForRange(4) assert.Equal(t, []int{0, 1, 2, 3}, list.Slice()) } func TestReverse(t *testing.T) { list := makeListForRange(4) assert.Equal(t, []int{3, 2, 1, 0}, l...
coderbydesign/kudo-o-matic
app/jobs/fcm/transaction_job.rb
Fcm::TransactionJob = Struct.new(:transaction) do def perform return if transaction.receiver.nil? || transaction.receiver.deactivated? registration_ids = transaction.receiver.fcm_tokens.collect(&:token).flatten.uniq return if registration_ids.blank? title = '₭udos received!' body = "You just rec...
AuroScholar/TeacherSdk
auro_scholar_lib/src/main/java/com/auro/scholr/home/presentation/viewmodel/InviteFriendViewModel.java
package com.auro.scholr.home.presentation.viewmodel; import androidx.lifecycle.MutableLiveData; import androidx.lifecycle.ViewModel; import com.auro.scholr.core.common.ResponseApi; import com.auro.scholr.home.domain.usecase.HomeDbUseCase; import com.auro.scholr.home.domain.usecase.HomeRemoteUseCase; import com.auro.s...
qianfen2021/conan
conan-agent/src/main/java/com/tal/wangxiao/conan/agent/service/ReplayService.java
<reponame>qianfen2021/conan<filename>conan-agent/src/main/java/com/tal/wangxiao/conan/agent/service/ReplayService.java package com.tal.wangxiao.conan.agent.service; /** * 流量回放管理服务 * @author conan */ public interface ReplayService { /** * 流量回放 * @param taskExecutionId 任务执行ID * @param recordId 任务录制...
rsn8887/mame2003-plus-libretro
src/includes/skydiver.h
/************************************************************************* Atari Skydiver hardware *************************************************************************/ /*----------- defined in vidhrdw/skydiver.c -----------*/ extern data8_t *skydiver_videoram; MACHINE_INIT( skydiver ); WRITE_HAND...
DirectProject/direct-msg-monitor
src/test/java/org/nhindirect/monitor/SpringBaseTest.java
package org.nhindirect.monitor; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; import org.springframework.test.annotation.DirtiesContext;...
badetitou/VerveineJ
test_src/jws_basic/store/client/Main.java
package store.client; import java.rmi.RemoteException; import javax.xml.rpc.ServiceException; import javax.xml.rpc.Stub; /** * This is a simple standalone client application that invokes the the * <code>echoString</code> and <code>myoperation</code> operations of the * SimpleEjbService Web service. * */ publ...
ashishjayamohan/competitive-programming
Practice/moves.py
t = int(input()) answer = [] for a in range(t): n = int(input()) ans = int(8*(((n)*(n+1)*(2*n+1))/6)) answer.append(ans) for b in answer: print(str(b))
AlexShkarin/pyLabLib-v0
pylablib/core/dataproc/interpolate.py
from builtins import range import numpy as np import scipy.interpolate from . import waveforms from ..datatable import wrapping def _data_range(data): return (np.min(data),np.max(data)) def interpolate1D_func(x, y, kind="linear", axis=-1, copy=True, bounds_error=True, fill_values=np.nan, assume_sorted=False): ...
techoopsie/oopsie-sdk-java
src/main/java/io/oopsie/sdk/PartitionKey.java
<reponame>techoopsie/oopsie-sdk-java<filename>src/main/java/io/oopsie/sdk/PartitionKey.java package io.oopsie.sdk; import java.util.UUID; public class PartitionKey extends Attribute { PartitionKey(UUID id, String name, DataType type, Validation validation) { super(id, name, type, null, validation); ...
calce/sgo
sgo_test.go
package sgo import ( "time" "testing" "net/http" "github.com/calce/sgo/mocks" . "github.com/smartystreets/goconvey/convey" ) func TestBackend(t *testing.T) { Convey("General", t, func(){ // live client Convey("should be able to create http client when not supplied", func(){ liveend, e := NewBackend(...
thehyve/platform-etl-backend
src/main/scala/io/opentargets/etl/backend/drug/MechanismOfAction.scala
<filename>src/main/scala/io/opentargets/etl/backend/drug/MechanismOfAction.scala<gh_stars>1-10 package io.opentargets.etl.backend.drug import com.typesafe.scalalogging.LazyLogging import io.opentargets.etl.backend.spark.Helpers.validateDF import org.apache.spark.sql.functions._ import org.apache.spark.sql.{DataFrame, ...
Dbevan/SunderingShadows
d/islands/elf/guard1.c
<reponame>Dbevan/SunderingShadows //guard house based off shadow one /* trying eval for making stations for guards so they can return crims to jail eval return "/daemon/destinations_d.c"->query_waystations("/d/islands/elf/guard1") * // eval return "/daemon/destinations_d.c"->clear_waystations("/d/islands/elf/guard1") ...
Lothrazar/SamsPowerups
Commands/src/main/java/com/lothrazar/samscommands/command/CommandSearchSpawner.java
<reponame>Lothrazar/SamsPowerups package com.lothrazar.samscommands.command; import java.util.ArrayList; import java.util.List; import com.lothrazar.samscommands.ModCommands; import net.minecraft.command.CommandException; import net.minecraft.command.ICommand; import net.minecraft.command.ICommandSender; import ne...
shugo/thinreports-generator
test/features/feature_test.rb
# frozen_string_literal: true require 'minitest/autorun' require 'minitest/unit' require 'pathname' require 'thinreports' class FeatureTest < Minitest::Test class << self attr_reader :name, :desc def feature(name, desc = nil, &block) @name = name @desc = desc define_method(:test_feature, ...
MattiasLiljeson/denLilleOstPojken
CoreLib/src/Pill.h
#ifndef PILL_H #define PILL_H #include "Tile.h" #include "Collectable.h" #include "IODevice.h" class PillEatenState; class Pill: public Collectable { private: Tile* m_tile; PillEatenState* m_eatenState; float flotyAnimTick; float flotyAnimOffset; TransformInfo m_origin; public: Pill(SpriteInfo* p_spriteInfo,...
dxCarl/LeetCode
src/main/java/com/xiao/deng/leetcode/compress/Solution.java
package com.xiao.deng.leetcode.compress; public class Solution { /** * 字符串压缩。利用字符重复出现的次数,编写一种方法,实现基本的字符串压缩功能。比如,字符串aabcccccaaa会变为a2b1c5a3。 * 若“压缩”后的字符串没有变短,则返回原先的字符串。你可以假设字符串中只包含大小写英文字母(a至z) * <p> * 输入:"aabcccccaaa" * 输出:"a2b1c5a3" * <p> * 输入:"abbccd" * 输出:"abbccd" * 解释...
odoo-mastercore/odoo-argentina
l10n_ar_account_withholding/models/afip.py
from odoo import models, fields class AfipTablagananciasEscala(models.Model): _name = 'afip.tabla_ganancias.escala' _description = 'afip.tabla_ganancias.escala' _rec_name = 'importe_desde' importe_desde = fields.Float( 'Mas de $', ) importe_hasta = fields.Float( 'A $', ) ...
jon-greer-ixd/searchlight
app/personalDetail.js
function PersonalDetail( name, value, show ) { this.name = name, this.value = value, this.show = show } PersonalDetail.prototype.print = function () { console.log( "Name " + this.name + ". Value " + this.value + ". Show " + this.show ); } function createPersonalDetail() { return new PersonalDetail();...
LasTshaMAN/politeia
politeiad/backend/gitbe/decred.go
// Copyright (c) 2017-2019 The Decred developers // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. package gitbe import ( "bufio" "bytes" "encoding/base64" "encoding/hex" "encoding/json" "errors" "fmt" "io" "io/ioutil" "net/http" "os" "path/filepath" "strc...
sigopt/sigopt-java
src/test/java/com/sigopt/net/ParamsBuilderTest.java
package com.sigopt.net; import com.sigopt.model.APIResource; import com.sigopt.model.MockResource; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import static org.junit.Assert.assertEqua...
humaniq/react-native-android-library-humaniq-api
android/src/main/java/com/humaniq/apilib/network/models/response/profile/ExchangeModelUsd.java
<gh_stars>1-10 package com.humaniq.apilib.network.models.response.profile; /** * Created by gritsay on 7/31/17. */ public class ExchangeModelUsd { private double USD; public double getUSD() { return USD; } public void setUSD(double USD) { this.USD = USD; } }
jwilger/racing_on_rails
app/controllers/pages_controller.rb
# frozen_string_literal: true # Any way to not require render_page? # Should provide sensible default if page is missing? Or just a 404? # Thinking we have a catch-all controller that uses render inline, # but could use a template handler with a comple method that queries DB? # Template-finding seems to assume a file...
gazer2kanlin/uia.message4j
uia.message/src/main/java/uia/message/codec/FloatCodec.java
/******************************************************************************* * Copyright 2017 UIA * * 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. ...
craynafinal/cs553_design_pattern_assignments
visitor/pattpack/expr_vis1/Variable.java
package pattpack.expr_vis1; import java.io.*; /** * This class represents a variable in an expression. * A variable holds its current value under the assumption * (Flyweight pattern) that all occurrences of a same * variable are shared. This is a crucial assumption for * interpreting the statements that ho...
alexa/alexa-apis-for-java
ask-smapi-model/src/com/amazon/ask/smapi/model/v1/skill/betaTest/BetaTest.java
/* * Copyright 2019 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/apache2.0/ * * or in the "license" file accomp...
Leonard2/alive_reversing
Source/Tools/relive_api/BaseProperty.cpp
#include "BaseProperty.hpp" #include <jsonxx/jsonxx.h> #include <string> BaseProperty::BaseProperty(const std::string& name, const std::string& typeName, bool isVisibleToEditor) : m_name(name) , m_typeName(typeName) , m_isVisibleToEditor(isVisibleToEditor) { } BaseProperty::~BaseProperty() = default; [...
chromium/chromium
cc/raster/gpu_raster_buffer_provider.h
// 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. #ifndef CC_RASTER_GPU_RASTER_BUFFER_PROVIDER_H_ #define CC_RASTER_GPU_RASTER_BUFFER_PROVIDER_H_ #include <stdint.h> #include <memory> #include <random> #...
tianyl1984/androidApp
src/org/orman/dbms/sqlite/generic/SQLiteGrammar.java
package org.orman.dbms.sqlite.generic; import java.util.EnumMap; import java.util.Map; import org.orman.sql.IndexType; import org.orman.sql.QueryType; import org.orman.sql.SQLGrammarProvider; import org.orman.sql.TableConstraintType; import org.orman.sql.exception.QueryTypeNotImplementedException; /** * MySQL gramm...
FuTlanyu/StudyBOSLiveBroadcast
app/src/main/java/studybos/com/studybos2/data/ChatMessage.java
<reponame>FuTlanyu/StudyBOSLiveBroadcast package studybos.com.studybos2.data; import java.io.Serializable; /** * Created by 机械革命 on 2018/10/17. */ public class ChatMessage implements Serializable { private String sender; private String getter; private String mess; private String date; public...
appotry/blog_demos
dubbo_service_provider/src/main/java/com/bolingcavalry/service/PlatformService.java
<reponame>appotry/blog_demos<filename>dubbo_service_provider/src/main/java/com/bolingcavalry/service/PlatformService.java package com.bolingcavalry.service; /** * @author willzhao * @version V1.0 * @Description: 执行平台层次的服务 * @email <EMAIL> * @Date 17/5/15 下午2:51 */ public interface PlatformService { /** ...
Mario-Kart-Felix/django-cms
cms/test_utils/project/sampleapp/urls_extra.py
<filename>cms/test_utils/project/sampleapp/urls_extra.py from django.urls import re_path from . import views urlpatterns = [ re_path(r'extra_2/$', views.extra_view, {'message': 'test included urlconf'}, name='extra_second'), ]
Testiduk/gitlabhq
spec/features/security/dashboard_access_spec.rb
<gh_stars>1000+ # frozen_string_literal: true require 'spec_helper' RSpec.describe "Dashboard access" do include AccessMatchers describe "GET /dashboard" do subject { dashboard_projects_path } it { is_expected.to be_allowed_for :admin } it { is_expected.to be_allowed_for :user } it { is_expected...
AnnaFilinova/project1
venv/Lib/site-packages/bokeh/server/static/js/lib/version.js
<reponame>AnnaFilinova/project1<filename>venv/Lib/site-packages/bokeh/server/static/js/lib/version.js export const version = "2.3.1";
bekuno/oc-server3
htdocs/resource2/tinymce/plugins/table/langs/ca_dlg.js
tinyMCE.addI18n('ca.table_dlg',{ general_tab:"General", advanced_tab:"Avan\u00E7at", general_props:"Propietats generals", advanced_props:"Propietats avan\u00E7ades", rowtype:"Fila", title:"Insereix/Modifica taula", width:"Amplada", height:"Al\u00E7ada", cols:"Columnes", rows:"Files", cellspacing:"Espaiat de ...
vladbotlevskyi/website
CodingChallenges/CC_136_Polar_Noise_Loop_2/P5/noiseLoop.js
class NoiseLoop { constructor(diameter, min, max) { this.diameter = diameter; this.min = min; this.max = max; this.cx = random(1000); this.cy = random(1000); } value(a) { let xoff = map(cos(a), -1, 1, this.cx, this.cx + this.diameter); let yoff = map(sin(a), -1, 1, this.cy, this.cy + ...
lab-of-living-matter/freqent
freqent/tests/brusselator/plots/make_epTrajFitPlot.py
<reponame>lab-of-living-matter/freqent import os import sys from glob import glob import numpy as np import matplotlib.pyplot as plt import h5py import matplotlib as mpl from datetime import datetime from scipy import stats # plt.close('all') mpl.rcParams['pdf.fonttype'] = 42 mpl.rcParams['font.size'] = 12 mpl.rcParam...
Shemplo/Study-courses
Software design/SD - 7. Clock/src/main/java/ru/shemplo/estat/gen/TimeBasedEventGenerator.java
<gh_stars>1-10 package ru.shemplo.estat.gen; import java.util.Random; import java.util.concurrent.atomic.AtomicLong; import ru.shemplo.estat.EventStatistics; import ru.shemplo.estat.clock.TimeProvider; import ru.shemplo.snowball.annot.Cooler; import ru.shemplo.snowball.annot.Init; import ru.shemplo.snowbal...
iorrah/salve-a-quebrada
app/components/Modal/index.js
import React, { useRef, useEffect } from 'react'; import PropTypes from 'prop-types'; import Button from 'components/Button'; import Cross from 'images/cross.svg'; function Modal(props) { const inputName = useRef(null); const inputAddress = useRef(null); useEffect(() => { inputName.current.focus(); }, []...
ezdayo/vpp
src/vpp/engine/clustering.cpp
/** * * @file vpp/engine/clustering.cpp * * @brief This is a generic clustering engine * * This file is part of the VPP framework (see link). * * @author <NAME> <<EMAIL>> * * @copyright (c) 2019-2020 <NAME> * @license http://opensource.org/licenses/MIT MIT * @link https://githu...
dkatashev/adyen-web
packages/lib/src/components/internal/Address/components/CountryField.test.js
<gh_stars>0 import { mount } from 'enzyme'; import { h } from 'preact'; import CountryField from './CountryField'; import getDataset from '~/utils/fetch-json-data'; jest.mock('~/utils/fetch-json-data'); const countriesMock = [ { id: 'BR', name: 'Brazil' }, { id: 'NL', name: ...
wtwhite/xmp
src/maxmin.h
<filename>src/maxmin.h<gh_stars>0 #ifndef __MAXMIN_H #define __MAXMIN_H // An external configuration process should #define INLINE to be either "inline" (if it is supported) // or blank (in the increasingly unlikely event that it is not). But if it doesn't: #ifndef INLINE // Assume we do have "inline" ability -- ...
Oliver-makes-code/apoli
src/main/java/io/github/apace100/apoli/power/Power.java
<filename>src/main/java/io/github/apace100/apoli/power/Power.java package io.github.apace100.apoli.power; import net.minecraft.entity.LivingEntity; import net.minecraft.nbt.NbtCompound; import net.minecraft.nbt.NbtElement; import java.util.LinkedList; import java.util.List; import java.util.function.Predicate; publi...
lveay2/algorithm-solutions
src/main/java/lintcode/system_design/_479_Second_Max_of_Array.java
<reponame>lveay2/algorithm-solutions<gh_stars>0 package lintcode.system_design; public class _479_Second_Max_of_Array { public static int secondMax(int[] nums) { if (nums.length == 2) { return Math.min(nums[0], nums[1]); } int firstMax = Integer.MIN_VALUE; int secondMa...
pguillory/MinecraftAdmin
deps/cinch/lib/narcissus.js
<filename>deps/cinch/lib/narcissus.js<gh_stars>1-10 var fs = require('fs'); var path = require('path'); function read(basename) { var filename = path.join(__dirname, '../deps/narcissus/lib', basename + '.js'); return fs.readFileSync(filename, 'utf8'); }; (function() { var Narcissus; eval(read('jsdefs...
pedrohd21/Cursos-Feitos
Curso-Em-Video-Python/2Exercicios/103_ficha_de_jogador.py
<reponame>pedrohd21/Cursos-Feitos def jogador(nome='Desconhecido', gols=0): print(f'O jogador {nome} fez {gols} gols(s) no campeonato.') #Programa principal nome = str(input('Nome do jogador: ')) gols = str(input('Quantos gols marcou: ')) if len(nome) > 0: if gols.isnumeric() > 0: jogador(nome, int(go...
bowhan/kent
src/hg/encode/docId/docIdView/docIdView.c
/* docIdView - cgi to show metadata from docId table. */ #include "common.h" #include "linefile.h" #include "hash.h" #include "options.h" #include "jksql.h" #include "htmshell.h" #include "web.h" #include "cheapcgi.h" #include "cart.h" #include "hui.h" #include "docId.h" #include "mdb.h" #include "portable.h" #include ...
DavidsDvm/Dev_Exercises
Console/Python/MisionTic/Excercises/test3.py
<gh_stars>1-10 name = input ('Digita tu nombre: ') id = input ('Digite su numero identificacion: ') workedHours = int(input ('Digite las horas trabajadas: ')) hourValue = int(input ('Digite el valor de las horas: ')) total = workedHours * hourValue print ("Lo que gano el trabajador por las horas realizadas fue: ", ...
Aspose/Aspose.Words-for-Java
Examples/src/main/java/com/aspose/words/examples/document_object_model/OwnerDocument.java
package com.aspose.words.examples.document_object_model; import com.aspose.words.Document; import com.aspose.words.Paragraph; public class OwnerDocument { public static void main(String[] args) throws Exception { // Open a file from disk. Document doc = new Document(); // Creating a new node of any type requ...
xu5343/ffmpegtoolkit_CentOS7
gpac-0.7.1/modules/ft_font/ft_font.c
/* * GPAC - Multimedia Framework C SDK * * Authors: <NAME> * Copyright (c) Telecom ParisTech 2000-2012 * All rights reserved * * This file is part of GPAC / FreeType font engine module * * GPAC is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General ...
thezeeck/ZUI
src/ZUI/components/Tabs/Menu.js
<gh_stars>0 import { MenuItem } from "./MenuItem"; import { MenuUI } from "./Tabs.styles"; export const Menu = ({menuOptions}) => { return ( <MenuUI> <ul> {menuOptions.map(elem => <MenuItem tabid={elem.index} key={elem.index}>{elem.title}</MenuItem>)} </ul> </MenuUI> ) }
Shuailong/Leetcode
solutions/length-of-last-word.py
#!/usr/bin/env python # encoding: utf-8 """ length-of-last-word.py Created by Shuailong on 2016-01-16. https://leetcode.com/problems/length-of-last-word/. """ class Solution(object): def lengthOfLastWord(self, s): """ :type s: str :rtype: int """ count = 0 s = s...
shaojiankui/iOS10-Runtime-Headers
protocols/SKUISortDataRequestDelegate.h
/* Generated by RuntimeBrowser. */ @protocol SKUISortDataRequestDelegate <NSObject> @optional - (void)sortDataRequest:(SKUISortDataRequest *)arg1 didFinishWithLockups:(NSArray *)arg2; @end
zllovesuki/dtls
pkg/protocol/extension/renegotiation_info_test.go
<filename>pkg/protocol/extension/renegotiation_info_test.go<gh_stars>100-1000 package extension import "testing" func TestRenegotiationInfo(t *testing.T) { extension := RenegotiationInfo{RenegotiatedConnection: 0} raw, err := extension.Marshal() if err != nil { t.Fatal(err) } newExtension := RenegotiationInf...
reels-research/iOS-Private-Frameworks
HealthDaemon.framework/HDCodableCodedValue.h
/* Generated by RuntimeBrowser Image: /System/Library/PrivateFrameworks/HealthDaemon.framework/HealthDaemon */ @interface HDCodableCodedValue : PBCodable <NSCopying> { HDCodableMedicalCodingList * _codings; NSMutableArray * _referenceRanges; HDCodableInspectableValue * _value; } @property (nonatomic, ...
ap300/pquic
plugins/fec/protoops/schedule_frames_on_path.c
<filename>plugins/fec/protoops/schedule_frames_on_path.c<gh_stars>10-100 #include "picoquic.h" #include "../fec_protoops.h" #define MIN_BYTES_TO_RETRANSMIT_PROTECT 20 static __attribute__((always_inline)) bool is_mtu_probe(picoquic_packet_t *p, picoquic_path_t *path) { if (!p || !path) return false; // it is m...
Severe-Trip-Project-Arquisoft/FrontEndSevereTrip
src/views/SignUp/SignUp.js
<reponame>Severe-Trip-Project-Arquisoft/FrontEndSevereTrip import React, { useState, useEffect } from 'react'; import { Link as RouterLink, withRouter } from 'react-router-dom'; import PropTypes from 'prop-types'; import validate from 'validate.js'; import { makeStyles } from '@material-ui/styles'; import { Grid, B...
egonzalez49/hablamos-client
src/components/ChatRoomListItem/ChatRoomListItem.js
import React from 'react'; import { MdKeyboardArrowRight } from 'react-icons/md'; const ChatRoomListItem = ({ id, title, description, onClick }) => { return ( <li className="chatroom-list-item" onClick={() => onClick(id)}> <div className="chatroom-list-item__text"> <h4 className="chatroom-title">{t...
RodrigoQuesadaDev/XGen4J
xgen4j/src/test-gen/java/com/rodrigodev/xgen4j/test/instantiation/errorWithNoDescriptionAreAbstract/Information.java
<filename>xgen4j/src/test-gen/java/com/rodrigodev/xgen4j/test/instantiation/errorWithNoDescriptionAreAbstract/Information.java package com.rodrigodev.xgen4j.test.instantiation.errorWithNoDescriptionAreAbstract; import com.rodrigodev.xgen4j.test.instantiation.errorWithNoDescriptionAreAbstract.ErrorInfo.CustomMessageGen...
ZenMX/elasticsearch
x-pack/plugin/autoscaling/src/test/java/org/elasticsearch/xpack/autoscaling/action/TransportGetAutoscalingPolicyActionTests.java
<filename>x-pack/plugin/autoscaling/src/test/java/org/elasticsearch/xpack/autoscaling/action/TransportGetAutoscalingPolicyActionTests.java /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License; * you may not use ...
ArturDrozdz/brix
src/gallery/charts/js/pub/views/list/graphs.js
<reponame>ArturDrozdz/brix KISSY.add('brix/gallery/charts/js/pub/views/list/graphs',function(S,Base,node,Global,SVGElement,SVGRenderer,SVGGraphics,Info){ function List(){ var self = this List.superclass.constructor.apply(self,arguments); self.init() } List.ATTRS = { w:{ value:0 }, ...
mosaic-cloud/mosaic-distribution-dependencies
dependencies/mozilla-js/1.8.5/js/src/jscntxt.h
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- * vim: set ts=8 sw=4 et tw=78: * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file exce...
zaklaus/eco2d
flecs-dash/etc/apps/systems/system_entity_graph.js
<gh_stars>10-100 const system_entity_chart = { type: 'line', data: { labels: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 12, 26, 27, 28, 29, 30, 31, 32, 33, 34, 13, 36, 37, 38, 39, 40, 41, 42, 43, 44, 14, 46, 47, 48...
yuriserka/cp02hero
leetcode/easy/104.cc
<filename>leetcode/easy/104.cc // https://leetcode.com/problems/maximum-depth-of-binary-tree/ #include <bits/stdc++.h> using namespace std; /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nu...
facug91/OJ-Solutions
uva.onlinejudge.org/BridgeHands.cpp
<reponame>facug91/OJ-Solutions /* By: facug91 From: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=9 Name: Bridge Hands Number: 555 */ #include <iostream> #include <cstdio> #include <cstdlib> #include <string> #include <cstring> #include <cmath> #include <algorithm> #include <vect...
senixus/coffee-shop
src/components/search/Search.js
<filename>src/components/search/Search.js import React from "react"; import "./search.scss"; const Search = ({ handleChange }) => { return ( <div className="search"> <div> <input type="text" placeholder="Search" name="coffee" onChange={handleChange} ...
rkowalewski/minijava_compiler
lib/jflex-1.4.1/examples/interpreter/Tprogram.java
<gh_stars>10-100 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright (C) 2001 <NAME> <<EMAIL>> * * Copyright (C) 2001 <NAME> <<EMAIL>> * * All rights reserved. * * ...
play-code-tools/crawling-gocd
setup.py
<reponame>play-code-tools/crawling-gocd import pathlib from setuptools import setup, find_packages HERE = pathlib.Path(__file__).parent print("here=>", HERE) README = (HERE / "readme.pypi.md").read_text() setup( name="crawling-gocd", version="1.3.0", description="crawling the gocd build histories of pipel...
paulocsilvajr/controle_pessoal_de_financas
API/v1/dao/lancamento_dao.go
<reponame>paulocsilvajr/controle_pessoal_de_financas<filename>API/v1/dao/lancamento_dao.go<gh_stars>1-10 package dao import ( "database/sql" "fmt" "strconv" "github.com/paulocsilvajr/controle_pessoal_de_financas/API/v1/model/detalhe_lancamento" "github.com/paulocsilvajr/controle_pessoal_de_financas/API/v1/model/...
meixiaoyao/myleesite
myleesite-module/src/main/java/com/zyw/myleesite/module/sys/security/FormAuthenticationFilter.java
package com.zyw.myleesite.module.sys.security; import com.zyw.myleesite.common.utils.StringUtils; import com.zyw.myleesite.module.sys.utils.UserUtils; import com.zyw.myleesite.module.sys.web.LoginController; import org.apache.shiro.authc.AuthenticationException; import org.apache.shiro.authc.AuthenticationToken; impor...
bosschaert/jclouds
apis/vcloud/src/test/java/org/jclouds/vcloud/xml/VmHandlerTest.java
/** * * Copyright (C) 2010 Cloud Conscious, LLC. <<EMAIL>> * * ==================================================================== * 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 * * ...
cookrn/imatix_base
vendor/openamq/tooling/base1/sfl/sflmysql.c
/*===========================================================================* * * * sflmysql.c - MySQL database interface * * * * ...
geeox96/dalike
version.js
<gh_stars>1-10 /** * Version * ===================== * Bot version * * @author: <NAME> [@ptkdev] <<EMAIL>> (https://ptk.dev) * @license: This code and contributions have 'GNU General Public License v3' * @version: 0.9.0 * @changelog: 0.7.4 initial release * */ module.exports = require("./package.js...
atomstech-io/react-lms
frontend/src/lms-base/redux/actions/ActionTypes.js
<reponame>atomstech-io/react-lms export const SET_USER_DATA = 'SET_USER_DATA' export const TOGGLE_API_CALL_ACTIVE = 'TOGGLE_API_CALL_ACTIVE' export const SET_ACTIVE_USERNAME = 'SET_ACTIVE_USERNAME' export const SET_AUTH_STATUS = 'SET_AUTH_STATUS'
johnml1135/machine.py
machine/translation/hmm_word_alignment_model.py
from abc import abstractmethod from .ibm1_word_alignment_model import Ibm1WordAlignmentModel class HmmWordAlignmentModel(Ibm1WordAlignmentModel): @abstractmethod def get_alignment_probability(self, source_length: int, prev_source_index: int, source_index: int) -> float: ...
jmdyck/test262-parser-tests
early/f7df8b7ca4fd194d.js
a: while (true) { a: while (true) { } }
ishikawa/modipyd
modipyd/monitor.py
<reponame>ishikawa/modipyd """ This module provides an interface to the mechanisms used to monitor Python module file modifications. :copyright: 2008 by <NAME> :license: MIT, see LICENSE for more details. """ import os from errno import ENOENT import logging import time from os.path import splitext from mo...
davesag/social-media-collector
utils/getModuleRules.js
<reponame>davesag/social-media-collector const getModuleRules = () => [ { enforce: 'pre', test: /\.js$/, exclude: /node_modules/, loader: 'eslint-loader', options: { failOnError: true } }, { test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader' }, { test:...
imran110219/Medical-Inventory
src/main/java/com/sadman/medicalinventory/controller/POSController.java
package com.sadman.medicalinventory.controller; import com.sadman.medicalinventory.dto.InvoiceDTO; import com.sadman.medicalinventory.dto.MedicineDTO; import com.sadman.medicalinventory.exception.RecordNotFoundException; import com.sadman.medicalinventory.iservice.*; import com.sadman.medicalinventory.iservice.POSServ...
yonetatuu/kamonohashi
web-pages-aquarium/src/api/api.js
<filename>web-pages-aquarium/src/api/api.js import * as gen from './api.generator' import axiosRoot from 'axios' import * as ext from '@/util/axios-ext' // ----------------------------------------------------------------------- // axiosの拡張 // テストでモックさせるためaxiosをexport let axios = axiosRoot.create({ // VUE_APP_API_HOS...
lexruee/coach4rb
lib/coach4rb/mixin/basic_auth.rb
module Coach4rb module Mixin module BasicAuth def self.included(base) base.send :include, InstanceMethods end module InstanceMethods def basic_auth_encryption(username, password) 'Basic ' + Base64.encode64("#{username}:#{password}").chomp end end ...
ale180192/openapi-viewer-back
core/utils/auth.py
<reponame>ale180192/openapi-viewer-back from rest_framework.authentication import TokenAuthentication class CustomTokenAuthentication(TokenAuthentication): keyword = 'Bearer'
vjovanov/scalameta
foundation/src/main/scala/org/scalameta/show/Escape.scala
package org.scalameta.show object escape { def apply(s: String): String = { // TODO: comprehensive handling val codepage = Map( "\t" -> "\\t", "\b" -> "\\b", "\n" -> "\\n", "\r" -> "\\r", "\f" -> "\\f", "\\" -> "\\\\" ) s.flatMap(c => codepage.getOrElse(c.toString,...
Neo-Turak/DevUtils
lib/Environment/DevEnvironmentCompilerRelease/src/main/java/dev/environment/compiler/Utils.java
package dev.environment.compiler; import com.squareup.javapoet.ClassName; import com.squareup.javapoet.CodeBlock; import com.squareup.javapoet.FieldSpec; import com.squareup.javapoet.JavaFile; import com.squareup.javapoet.MethodSpec; import com.squareup.javapoet.TypeName; import com.squareup.javapoet.TypeSpec; import...
DarkShadow44/kaitai_struct_tests
spec/python/test_integers_min_max.py
# Autogenerated from KST: please remove this line if doing any edits by hand! import unittest from integers_min_max import IntegersMinMax class TestIntegersMinMax(unittest.TestCase): def test_integers_min_max(self): with IntegersMinMax.from_file('src/integers_min_max.bin') as r: self.assertE...
NengLu/topopy
test/temp/test_get_stream_segments.py
<reponame>NengLu/topopy #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Jan 24 09:42:34 2018 @author: vicen """ import sys sys.path.append("../../") from topopy import Flow, Grid import numpy as np from scipy.sparse import csc_matrix fd = Flow() fd.load_gtiff("../data/tunez_fd.tif") threshold = 1000...
aaronstanek/UltralightweightCalculator
docs/html/search/files_0.js
<reponame>aaronstanek/UltralightweightCalculator var searchData= [ ['arithmetic_2ecpp_210',['Arithmetic.cpp',['../_arithmetic_8cpp.html',1,'']]], ['assign_2ecpp_211',['Assign.cpp',['../_assign_8cpp.html',1,'']]] ];
FranicevicNikola/OOP
Nikola/Laboratory/src/main/java/com/nikolafranicevic/lambdaComparator/GardenMain.java
<filename>Nikola/Laboratory/src/main/java/com/nikolafranicevic/lambdaComparator/GardenMain.java package com.nikolafranicevic.lambdaComparator; import java.util.ArrayList; import java.util.List; import java.util.function.BiConsumer; import java.util.function.BiFunction; public class GardenMain { public static voi...
willcode/PothosComms
math/SIMD/Beta.cpp
<reponame>willcode/PothosComms // Copyright (c) 2020 <NAME> // SPDX-License-Identifier: BSD-3-Clause #include <xsimd/xsimd.hpp> #include <Pothos/Util/XSIMDTraits.hpp> #include <cmath> // Actually enforce EnableIf* #ifdef _MSC_VER #pragma warning(error: 4667) // no function template defined that matches forced instan...
AlexRogalskiy/DevArtifacts
master/protocode4-master/protocode4-master/app/scripts/controllers/controller_ui_phone_control_index_label_control_scene.js
/* templates/scene/control_label.hbs */ App.SceneControlLabelController = App.ControlLabelIndexController.extend();
mbheinen/CIMApplication
CIMWeb/src/main/webapp/js/model/WindDynamics.js
define ( ["model/base", "model/Core", "model/StandardModels"], /** * Wind turbines are generally divided into four types, which are currently significant in power systems. * * The four types have the following characteristics: * - type 1: wind turbine with directly grid connected asynchronou...
ramanujam/parsestore
Pods/ArtisanSDK/ArtisanSDK.framework/Versions/A/Headers/UIView+ArtisanEventTags.h
<reponame>ramanujam/parsestore<filename>Pods/ArtisanSDK/ArtisanSDK.framework/Versions/A/Headers/UIView+ArtisanEventTags.h // // UIView+ArtisanEventTags.h // // Copyright (c) 2014 Artisan Mobile. All rights reserved. // #import <UIKit/UIKit.h> /** Category that adds the artisanEventTags property to UIViews. */ @in...
Andreas237/AndroidPolicyAutomation
ExtractedJars/LibriVox_app.librivox.android/javafiles/android/support/design/widget/BaseTransientBottomBar.java
// 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 android.support.design.widget; import android.animation.ValueAnimator; import android.os.Handler; import android.os.Looper; import android.support.design.a....
yinfuquan/file-upload
cloud/smthit-fm/smthit-api/src/main/java/com/smthit/framework/api/utils/ServerContext.java
<filename>cloud/smthit-fm/smthit-api/src/main/java/com/smthit/framework/api/utils/ServerContext.java /** * */ package com.smthit.framework.api.utils; /** * @author Bean * */ public class ServerContext { private int port; private String contextPath; private String descriptor; private String resourceBase; pri...
eZmaxinc/eZmax-SDK-java
src/main/java/com/ezmax/api/model/EzsigntemplatepackageGetListV1ResponseMPayload.java
<gh_stars>0 /* * eZmax API Definition * This API expose all the functionnalities for the eZmax and eZsign applications. * * The version of the OpenAPI document: 1.1.3 * Contact: <EMAIL> * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech...
otaviopace/ananas
kernel/include/kernel/amd64/dma.h
/*- * SPDX-License-Identifier: Zlib * * Copyright (c) 2009-2018 <NAME> <<EMAIL>> * For conditions of distribution and use, see LICENSE file */ #ifndef __ANANAS_AMD64_DMA_H__ #define __ANANAS_AMD64_DMA_H__ typedef uint64_t dma_addr_t; typedef uint64_t dma_size_t; #endif /* __ANANAS_AMD64_DMA_H__ */
muxanick/scala-native-java-stubs
javax/net/ssl/TrustManagerFactorySpi.scala
<gh_stars>0 package javax.net.ssl import java.lang.Object import java.security.KeyStore import scala.scalanative.annotation.stub /** This class defines the Service Provider Interface (SPI) * for the TrustManagerFactory class. * * All the abstract methods in this class must be implemented by each * cryptograp...
zealoussnow/chromium
chrome/browser/ui/views/frame/browser_frame_view_linux_native.cc
// Copyright 2017 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. #include "chrome/browser/ui/views/frame/browser_frame_view_linux_native.h" #include "chrome/browser/ui/views/frame/browser_frame_view_layout_linux_native...
nettee/leetcode
solutions/0725.split-linked-list-in-parts/0725.split-linked-list-in-parts.1539592078.cpp
/* * [725] Split Linked List in Parts * * https://leetcode.com/problems/split-linked-list-in-parts/description/ * * algorithms * Medium (47.26%) * Total Accepted: 17.8K * Total Submissions: 37.7K * Testcase Example: '[1,2,3,4]\n5' * * Given a (singly) linked list with head node root, write a function to ...