repo_name stringlengths 6 101 | path stringlengths 4 300 | text stringlengths 7 1.31M |
|---|---|---|
remyoster/pathwar | go/pkg/pwapi/testing_test.go | package pwapi
import (
"context"
"testing"
"github.com/jinzhu/gorm"
"github.com/stretchr/testify/assert"
"pathwar.land/pathwar/v2/go/pkg/errcode"
"pathwar.land/pathwar/v2/go/pkg/pwdb"
"pathwar.land/pathwar/v2/go/pkg/pwsso"
)
func testingSeasons(t *testing.T, svc Service) *pwdb.SeasonList {
t.Helper()
db :=... |
dbac/jdk8 | src/share/lib/security/BlacklistedCertsConverter.java | /*
* Copyright (c) 2013, 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... |
lpr-perm/partynest | lib/templates/pundit/policy/policy.rb | <filename>lib/templates/pundit/policy/policy.rb
<% module_namespacing do -%>
# frozen_string_literal: true
class <%= class_name %>Policy < ApplicationPolicy
class Scope < Scope
def resolve
scope.none
end
end
end
<% end -%>
|
madd-games/glidix | libgwm/toolbtn.c | <filename>libgwm/toolbtn.c<gh_stars>10-100
/*
Glidix GUI
Copyright (c) 2014-2017, <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 ... |
MBtech/gpa-flink | src/main/java/org/apache/flink/graph/streaming/summaries/HMap.java | package org.apache.flink.graph.streaming.summaries;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
/**
* Created by zainababbas on 15/04/2017.
*/
public class HMap implements Serializable {
private Map<Long, Integer> verticesWithDegrees;
public HMap() {
verticesWithDegrees = new ... |
nanjekyejoannah/pypy | rpython/translator/c/src/mem.h |
/************************************************************/
/*** C header subsection: operations on LowLevelTypes ***/
#include <string.h>
/* used by rpython.rlib.rstack */
#define OP_STACK_CURRENT(r) r = (Signed)&r
#define OP_RAW_MALLOC(size, zero, result) { \
if (zero) ... |
Antonio-Iliev/Exercises | SoftUni/Exams/src/com/company/demo05_1.java | package com.company;
import java.util.Scanner;
public class demo05_1 {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int hHole = Integer.parseInt(scanner.nextLine());
int wHole = Integer.parseInt(scanner.nextLine());
int squarePicture = Integer... |
TacoVox/elvish | pkg/eval/module_math_test.go | package eval
import "testing"
func TestMathModule(t *testing.T) {
TestWithSetup(t,
func(ev *Evaler) {
ev.InstallModule("math", MathNs)
err := ev.EvalSourceInTTY(NewInteractiveSource(`use math`))
if err != nil {
panic(err)
}
},
That(`math:abs 2.1`).Puts(2.1),
That(`math:abs -2.1`).Puts(2.1),
... |
SoerenHenning/titan-ccp-common | src/main/java/titan/ccp/model/sensorregistry/DummySensorRegistry.java | <filename>src/main/java/titan/ccp/model/sensorregistry/DummySensorRegistry.java<gh_stars>0
package titan.ccp.model.sensorregistry;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Optional;
/**
* A {@link SensorRegistry} containing n... |
cjayho/pgadmin3 | pgadmin/include/ogl/constrnt.h | <filename>pgadmin/include/ogl/constrnt.h<gh_stars>100-1000
//////////////////////////////////////////////////////////////////////////
//
// pgAdmin III - PostgreSQL Tools
//
// Portions Copyright (C) 1998 - 2011, <NAME>
// Portions Copyright (C) 2011 - 2016, The pgAdmin Development Team
// This software is released und... |
macripps/adventofcode | src/main/scala/aoc2018/Day10.scala | package aoc2018
import aoc.{Day, Point}
import scala.util.matching.Regex
class Day10 extends Day(2018, 10) {
import Day10._
override def part1(input: Array[String]): String = {
val ptsDlts = input.map {
case line(px: String, py: String, vx: String, vy:String) =>
(Point(px.toInt, py.toInt), (vx.... |
Horwits/Telerik-Academy-2016-2017 | JAVASCRIPT/JAVASCRIPT-FUNDAMENTALS/7.Functions/4.appearance-count.js | function solve(args) {
var n = +args[0],
numbers = (args[1] + '')
.split(' ')
.map(Number),
x = +args[args.length - 1],
maxOcc = 0,
currentOcc = 1;
// for (var i = 0; i < n; i += 1) {
// if (i + 1 < n) {
// if (numbers[i + 1] === numbe... |
JackChan1999/boohee_v5.6 | src/main/java/com/alipay/apmobilesecuritysdk/a/a/a.java | package com.alipay.apmobilesecuritysdk.a.a;
import android.content.Context;
import com.alipay.apmobilesecuritysdk.e.b;
import com.alipay.security.mobile.module.commonutils.CommonUtils;
import com.alipay.security.mobile.module.commonutils.crypto.SecurityUtils;
import com.alipay.security.mobile.module.localstorage.Publi... |
ryannel/hippo | pkg/docker/docker.go | package docker
import (
"github.com/ryannel/hippo/pkg/logger"
"github.com/ryannel/hippo/pkg/util"
"strings"
)
var execStringCommand = util.ExecStringCommand
var execCommandStreamingOut = util.ExecCommandStreamingOut
func Build(imageName string, commitTag string) error {
commitTag = generateTag(imageName, commitT... |
ita-social-projects/horondi_client_fe | src/redux/images-constructor/constructor-front-pocket/constructor-front-pocket.reducer.js | <gh_stars>10-100
import { SET_CONSTRUCTOR_FRONT_POCKET } from './constructor-front-pocket.types';
const constructorFrontPocket = (state = {}, action = {}) => {
if (action.type === SET_CONSTRUCTOR_FRONT_POCKET) {
return action.payload;
}
return state;
};
export default constructorFrontPocket;
|
mboutell/Mobile | android/src/RHITMobile/src/edu/rosehulman/android/directory/model/TourTagsGroup.java | <reponame>mboutell/Mobile<filename>android/src/RHITMobile/src/edu/rosehulman/android/directory/model/TourTagsGroup.java
package edu.rosehulman.android.directory.model;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
/**
* Represents a category of campus services hyperlinks
*/
p... |
nulab/backlog-migration-common | core/src/main/scala/com/nulabinc/backlog/migration/common/messages/ConsoleMessages.scala | <filename>core/src/main/scala/com/nulabinc/backlog/migration/common/messages/ConsoleMessages.scala
package com.nulabinc.backlog.migration.common.messages
import java.nio.file.Path
import java.util.Locale
import com.nulabinc.backlog.migration.common.domain.mappings.{
Mapping,
MappingType,
PriorityMapping,
Stat... |
ianunruh/openstack-operator | pkg/glance/api.go | <reponame>ianunruh/openstack-operator<gh_stars>1-10
package glance
import (
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
netv1 "k8s.io/api/networking/v1"
"k8s.io/apimachinery/pkg/util/intstr"
openstackv1beta1 "github.com/ianunruh/openstack-operator/api/v1beta1"
"github.com/ianunruh/openstack-operator... |
davidddo/hwr | src/de/daviddo/knn/network/NetworkFactory.java | package de.daviddo.knn.network;
import de.daviddo.knn.Neuron;
import de.daviddo.utils.DialogUtils;
import de.daviddo.utils.io.YAMLFile;
import de.daviddo.utils.logging.Logger;
import de.daviddo.utils.logging.LoggerLevel;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import static de.da... |
gregplaysguitar/django-shoptools | shoptools/contrib/regions/util.py | # -*- coding: utf-8 -*-
import socket
import json
try:
from django.contrib.gis.geoip2 import GeoIP2
except ImportError:
GeoIP2 = None
else:
from geoip2.errors import AddressNotFoundError
from shoptools import settings as shoptools_settings
from .models import Region, Country
from .forms import RegionSelec... |
sauce-archives/visual-scripting | org.testobject.commons/util/src/main/java/org/testobject/commons/bus/SimpleEventBus.java | package org.testobject.commons.bus;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import org.testobject.commons.util.exceptions.Exceptions;
/**
* Simple (and fast) event bus implementation. In most cases this is the only event bus implementation that one would ever need for
* in-process... |
CopTec/CopNomos | spec/features/work_packages/details/activity_comments_spec.rb | require 'spec_helper'
require 'features/work_packages/shared_contexts'
require 'features/work_packages/details/inplace_editor/shared_examples'
require 'features/work_packages/details/inplace_editor/work_package_field'
require 'features/work_packages/work_packages_page'
describe 'activity comments', js: true, selenium... |
comandeo/mongo-ruby-driver | spec/integration/check_clean_slate_spec.rb | # frozen_string_literal: true
# encoding: utf-8
require 'lite_spec_helper'
# This test can be used to manually verify that there are no leaked
# background threads - execute it after executing another test (in the same
# rspec run) that is suspected to leak background threads, such as by
# running:
#
# rspec your_spe... |
ablack12/evergreen | public/static/app/perf-bb/ExpandedMetricsSignalProcessingController.js | mciModule.controller('ExpandedMetricsSignalProcessingController', function (
$scope, CHANGE_POINTS_GRID, PerformanceAnalysisAndTriageClient, $routeParams, ApiV2, EvgUtil, $q
) {
$scope.page = 0;
$scope.pageSize = 10;
$scope.totalPages = 1;
$scope.projectId = $routeParams.projectId;
$scope.measurementRegex =... |
Acidburn0zzz/mod_pagespeed | net/instaweb/rewriter/css_move_to_head_filter.cc | /*
* Copyright 2010 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... |
hjc851/Dataset2-HowToDetectAdvancedSourceCodePlagiarism | Variant Programs/1-4/2/disk/Store.java | <filename>Variant Programs/1-4/2/disk/Store.java<gh_stars>0
package disk;
import java.util.HashMap;
import ra.AgainOfficer;
import producingAim.CalcicPurpose;
import output.*;
import stimulation.Feigning;
public class Store {
private HashMap<CalcicPurpose, Double> dictionnaire;
public synchronized String digit()... |
lgirault/quasar | version.sbt | <filename>version.sbt<gh_stars>0
version in ThisBuild := "192.0.4" |
hbxie/bullet-ui | app/components/queries-table.js | <reponame>hbxie/bullet-ui
/*
* Copyright 2016, Yahoo Inc.
* Licensed under the terms of the Apache License, Version 2.0.
* See the LICENSE file associated with the project for terms.
*/
import { A } from '@ember/array';
import { isEmpty, isNone } from '@ember/utils';
import EmberObject, { computed } from '@ember... |
albertoaldanar/betmatcherAPI | cride/betfriends/apps.py | """Events module app"""
from django.apps import AppConfig
class BetfriendsAppConfig(AppConfig):
name = "cride.betfriends"
verbose_name = "Betfriends"
|
RuiDTLima/diffuzz | evaluation/themis_oacc_unsafe/src/com/acciente/oacc/sql/internal/persister/CommonGrantGlobalResourcePermissionPersister.java | /*
* Copyright 2009-2017, Acciente LLC
*
* Acciente LLC licenses this file to you 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 ... |
fmisha1150/blockset-walletkit | WalletKitCore/src/ethereum/blockchain/BREthereumProofOfWork.c | //
// BREthereumProofOfWork.c
// Core
//
// Created by <NAME> on 12/14/18.
// Copyright © 2018-2019 Breadwinner AG. All rights reserved.
//
// See the LICENSE file at the project root for license information.
// See the CONTRIBUTORS file at the project root for a list of contributors.
#include <stdlib.h>
#inclu... |
wrldwzrd89/older-java-games | FantastleX/src/com/puttysoftware/fantastlex/maze/objects/FireBow.java | /* FantastleX: A Maze/RPG Hybrid Game
Copyright (C) 2008-2010 <NAME>
Any questions should be directed to the author via email at: <EMAIL>
*/
package com.puttysoftware.fantastlex.maze.objects;
import com.puttysoftware.fantastlex.maze.abc.AbstractBow;
import com.puttysoftware.fantastlex.maze.utilities.ArrowTypeConsta... |
hackbinary/pdfedit | src/gui/propertymodecontroller.cc | /*
* PDFedit - free program for PDF document manipulation.
* Copyright (C) 2006-2009 PDFedit team: <NAME>,
* <NAME>,
* <NAME>
* Former team members: <NAME>
*
* This program is free software; you can redistribute it a... |
hackerlank/SourceCode | Game/Xerces/src/xercesc/validators/schema/identity/IC_Selector.hpp | <gh_stars>1-10
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
* 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
*
* Unl... |
jjlee3/openthread | examples/apps/mstc/OpenThreadTalk/ThreadGlobals.cpp | <filename>examples/apps/mstc/OpenThreadTalk/ThreadGlobals.cpp
#include "pch.h"
#include <utility>
#include "ThreadGlobals.h"
using namespace OpenThreadTalk;
ThreadGlobals* OpenThreadTalk::g_pThreadGlobals = nullptr;
ThreadGlobals::ThreadGlobals(
IAsyncThreadPage^ page,
CoreDispatcher^ dispatcher,
... |
thisisshi/sdk | go/models/waf_positive_security_model.go | package models
// This file is auto-generated.
// Please contact <EMAIL> for any change requests.
// WafPositiveSecurityModel waf positive security model
// swagger:model WafPositiveSecurityModel
type WafPositiveSecurityModel struct {
// These groups should be used to separate different levels of concern. The order... |
AekseyDyomin/three-ds-server | src/main/java/com/rbkmoney/threeds/server/handle/impl/UnsupportedMessageTypeResponseHandler.java | <filename>src/main/java/com/rbkmoney/threeds/server/handle/impl/UnsupportedMessageTypeResponseHandler.java<gh_stars>0
package com.rbkmoney.threeds.server.handle.impl;
import com.rbkmoney.threeds.server.converter.MessageToErrorResConverter;
import com.rbkmoney.threeds.server.domain.error.ErrorCode;
import com.rbkmoney.... |
friedlwo/AppWoksUtils | src/org/appwork/utils/swing/renderer/RendererComboBoxModel.java | /**
* Copyright (c) 2009 - 2011 AppWork UG(haftungsbeschränkt) <<EMAIL>>
*
* This file is part of org.appwork.utils.swing.renderer
*
* This software is licensed under the Artistic License 2.0,
* see the LICENSE file or http://www.opensource.org/licenses/artistic-license-2.0.php
* for details
*/
packa... |
andyguwc/flask-hackernews-clone | flask_hackernews_clone/blueprints/main/models.py | # -*- coding: utf-8 -*-
"""Post models."""
import datetime as dt
from flask_hackernews_clone.database import (
Column,
SearchableMixin,
PkModel,
db,
reference_col,
relationship,
)
from flask_hackernews_clone.extensions import bcrypt
class Post(SearchableMixin, PkModel):
"""Post"""
__s... |
magicLaLa/RSSHub | lib/v2/lfsyd/home.js | <gh_stars>10-100
const got = require('@/utils/got');
const { parseDate } = require('@/utils/parse-date');
const { ProcessForm, ProcessFeed } = require('./utils');
module.exports = async (ctx) => {
const rootUrl = 'https://www.iyingdi.com';
const url = 'https://api.iyingdi.com/mweb/feed/recommend-content-list';... |
cromulencellc/hackasat-final-2021 | flatsat/comms/user_segment/server/tools/testing/scoresrvr.py | <reponame>cromulencellc/hackasat-final-2021<gh_stars>1-10
#!/usr/bin/env python3
import socket
import time
import random
SCORE_IP = "localhost"
SCORE_PORT = 4001
print(f"UDP target IP: {SCORE_IP}")
print(f"UDP target port: {SCORE_PORT}")
#for idx in range(0,,1):
sock = socket.socket(socket.AF_INET, # Internet
... |
sthatiko/java_algos | src/com/sthatiko/ds/Trie.java | package com.sthatiko.ds;
import sun.lwawt.macosx.CSystemTray;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.Instant;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.ZoneOffset;
import java.time.ZonedDateTime;
import java.time... |
Hexiaojiao0732/htgl | src/main/java/com/zhixin/rd/memory/web/service/pl/PlServiceImpl.java | package com.zhixin.rd.memory.web.service.pl;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zhixin.rd.memory.web.dao.pl.IPlMapper;
import com.zhixin.rd.memory.web.entity.PlEntity;
@Service
public c... |
jteixeir/begC4D | Part_III/c15/ex1505.c | <filename>Part_III/c15/ex1505.c
#include <stdio.h>
#include <stdlib.h>
void sub(void)
{
puts("Which is the plan.");
exit(0);
}
int main()
{
puts("This program quits before it's done.");
sub();
puts("Or was that on purpose?");
return(0);
}
|
wcnnkh/framework | orm/src/main/java/io/basc/framework/orm/PropertyMetadata.java | <reponame>wcnnkh/framework<gh_stars>1-10
package io.basc.framework.orm;
import io.basc.framework.util.Named;
public interface PropertyMetadata extends Named {
boolean isAutoIncrement();
boolean isPrimaryKey();
boolean isNullable();
String getCharsetName();
String getComment();
boolean isUnique();
}
|
myskov/ozone | hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/shell/TestOzoneTenantShell.java | <filename>hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/shell/TestOzoneTenantShell.java<gh_stars>100-1000
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* re... |
syeminpark/openFrame | addons/ofxSingleton/example/src/ofApp.h | <gh_stars>1-10
#pragma once
#include "ofMain.h"
#include "MyRectangle.h"
class ofApp : public ofBaseApp{
public:
void setup();
void update();
void draw();
void keyPressed (int key);
vector<MyRectangle> rectangles;
};
|
cmfitzg2/2d-horror | src/Tiles/Interior/HouseWall/Orange/HouseWallMiddleLeftOrange.java | <reponame>cmfitzg2/2d-horror<filename>src/Tiles/Interior/HouseWall/Orange/HouseWallMiddleLeftOrange.java
package Tiles.Interior.HouseWall.Orange;
import Graphics.Assets;
import Tiles.Tile;
public class HouseWallMiddleLeftOrange extends Tile {
public HouseWallMiddleLeftOrange(int id) {
super(Assets.houseW... |
sadupally/Dev | osp/presentation/api/src/java/org/theospi/portfolio/presentation/PresentationLayoutHelper.java | /**********************************************************************************
* $URL: https://source.sakaiproject.org/svn/osp/branches/sakai-10.x/presentation/api/src/java/org/theospi/portfolio/presentation/PresentationLayoutHelper.java $
* $Id: PresentationLayoutHelper.java 105079 2012-02-24 23:08:11Z <EMAIL> $
... |
constantinpape/cluster_tools | cluster_tools/utils/function_utils.py | <gh_stars>10-100
from datetime import datetime
from subprocess import check_output
# TODO log-levels
# stdout is always piped to file, sowe can use it as logging
def log(msg):
print("%s: %s" % (str(datetime.now()), msg))
def log_block_success(block_id):
print("%s: processed block %i" % (str(datetime.now()),... |
Mrchanghao/velopert-react-class | style-component/src/App.js | import React, { Component } from 'react';
import styles from './App.scss';
import classNames from 'classnames/bind';
import Button from './Button';
import StyledButton from './Button/StyledButton';
console.log(styles.blue)
const cx = classNames.bind(styles);
console.log(cx('blue'))
class App extends Component {
r... |
Shiva-D/rtos-course | FreeRTOSv10.4.1/FreeRTOS/Demo/Common/drivers/ST/STM32F10xFWLib/inc/stm32fxxx_eth_map.h | /******************** (C) COPYRIGHT 2008 STMicroelectronics ********************
* File Name : stm32fxxx_eth_map.h
* Author : MCD Application Team
* Version : VX.Y.Z
* Date : mm/dd/2008
* Description : This file contains all ETHERNET peripheral register's
* ... |
akshaykumar19002/FamilyLocator | app/src/main/java/com/kumar/akshay/familylocator/Database/FamilyDBContract.java | <reponame>akshaykumar19002/FamilyLocator
package com.kumar.akshay.familylocator.Database;
import android.provider.BaseColumns;
public final class FamilyDBContract implements BaseColumns {
//Database Name
public static final String DATABASE_NAME = "OUR_FAMILY_LOCATOR_DB";
//Database Version
public st... |
tobby2002/tradyai-api | strategies/Gekko-Strategies-master/!WORKSOP/chang.js | <filename>strategies/Gekko-Strategies-master/!WORKSOP/chang.js
// This is a basic example strategy for Gekko.
// For more information on everything please refer
// to this document:
//
// https://gekko.wizb.it/docs/strategies/creating_a_strategy.html
//
// The example below is pretty bad investment advice: on every new... |
Tsvetelin98/Solar | net.solarnetwork.node.ocpp.mock/src/net/solarnetwork/node/ocpp/mock/MockMeterDataSource.java | /* ==================================================================
* MockMeterDataSource.java - 10/06/2015 1:28:07 pm
*
* Copyright 2007-2015 SolarNetwork.net Dev Team
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* publi... |
ryanloney/openvino-1 | src/bindings/python/src/pyopenvino/graph/types/element_type.cpp | // Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "openvino/core/type/element_type.hpp"
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
#include "openvino/op/parameter.hpp"
#include "pyopenvino/graph/types/element_type.hpp"
namespace py = pybind11;
void regcla... |
Ivo-Balbaert/cone | src/c-compiler/ir/stmt/break.h | /** Handling for break nodes
* @file
*
* This source file is part of the Cone Programming Language C compiler
* See Copyright Notice in conec.h
*/
#ifndef break_h
#define break_h
// Node info used by break, return, blockret, and continue statement nodes
// Such statements are only (and must be) found at the end o... |
blockchainreg/kava | x/bep3/client/rest/query.go | package rest
import (
"encoding/hex"
"fmt"
"net/http"
"strconv"
"github.com/cosmos/cosmos-sdk/client/context"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/rest"
"github.com/gorilla/mux"
"github.com/kava-labs/kava/x/bep3/types"
)
const restSwapID = "swap-id"
const restDenom =... |
kolly83/kore | pkg/persistence/audit_entry.go | <reponame>kolly83/kore
/**
* Copyright 2020 Appvia Ltd <<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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless require... |
bworkman1/Network4Rentals | assets/themes/default/js/assoc/payment-settings.js | <reponame>bworkman1/Network4Rentals<gh_stars>0
$(function() {
// validate that there is a first and last name
$('#card-holder-name').focusout(function() {
var name = $(this).val();
var name_array = name.split(' ');
if(name_array.length<2) {
$(this).tooltip('show');
$(this).parent().paren... |
yashashrirane/interlok | interlok-core/src/main/java/com/adaptris/core/transform/schema/BasicXmlSchemaValidator.java | /*
* Copyright 2020 Adaptris Ltd.
*
* 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... |
devloper96/whitehall | app/services/edition_publisher.rb | require 'data_hygiene/govspeak_link_validator'
class EditionPublisher < EditionService
def failure_reason
@failure_reason ||= failure_reasons.first
end
def failure_reasons
return @failure_reasons if @failure_reasons
reasons = []
reasons << "This edition is invalid: #{edition.errors.full_message... |
shock/hfhinv | test/system/donors_test.rb | require "application_system_test_case"
class DonorsTest < ApplicationSystemTestCase
# test "visiting the index" do
# visit donors_url
#
# assert_selector "h1", text: "Donor"
# end
end
|
vaclav/Physics | languages/jetbrains.mps.samples.Physics/source_gen/jetbrains/mps/samples/Physics/findUsages/FindOverridenValue_Finder.java | <gh_stars>1-10
package jetbrains.mps.samples.Physics.findUsages;
/*Generated by MPS */
import jetbrains.mps.ide.findusages.findalgorithm.finders.GeneratedFinder;
import org.jetbrains.mps.openapi.language.SAbstractConcept;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.mps.openapi.model.SNode;
import o... |
psibi/eta | rts/src/eta/runtime/Utils.java | <reponame>psibi/eta
package eta.runtime;
import java.util.ListIterator;
public class Utils {
public static <E> E peekPrevious(ListIterator<E> it) {
E e = null;
if (it.hasPrevious()) {
e = it.previous();
it.next();
}
return e;
}
public static <E> E p... |
arc03/30-DaysOfCode-March-2021 | answers/Aryan Goyal/Day 11/Que 2.py | <reponame>arc03/30-DaysOfCode-March-2021
s=input("")
no=int(input(""))
list234=[]
for i in range(no):
s1=input("")
s2=list(s1)
base = []
count=0
lists = [base]
for i in range(len(s)):
orig = lists[:]
new = s[i]
for j in range(len(lists)):
lists[j] = lists[j] +... |
tobli/selenium | javascript/safari-driver/inject/message/message.js | // Licensed to the Software Freedom Conservancy (SFC) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The SFC licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you m... |
desdamo/Currency-Converter-React | node_modules/@bundle-stats/utils/lib/config/delta.js | <reponame>desdamo/Currency-Converter-React
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.DELTA_TYPE_HIGH_POSITIVE = exports.DELTA_TYPE_LOW_POSITIVE = exports.DELTA_TYPE_HIGH_NEGATIVE = exports.DELTA_TYPE_LOW_NEGATIVE = exports.DELTA_TYPE_LEVEL_HIGH = exports.DELTA_TYPE_LEVEL_LO... |
anatagadaisukidesu/gzlkisp | app/src/main/java/com/gzlk/android/isp/nim/model/extension/SigningNotifyAttachment.java | <reponame>anatagadaisukidesu/gzlkisp
package com.gzlk.android.isp.nim.model.extension;
import com.gzlk.android.isp.R;
import com.gzlk.android.isp.etc.Utils;
import com.gzlk.android.isp.helper.StringHelper;
import org.json.JSONObject;
/**
* <b>功能描述:</b>签到的提醒消息<br />
* <b>创建作者:</b><NAME> <br />
* <b>创建时间:</b>2017/0... |
empd2/empd2.github.io | node_modules/testcafe-browser-tools/lib/api/bring-to-front.js | 'use strict';
var _regeneratorRuntime = require('babel-runtime/regenerator').default;
var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default').default;
exports.__esModule = true;
var _osFamily = require('os-family');
var _osFamily2 = _interopRequireDefault(_osFamily);
var _findWindow ... |
billyfrost418/james-project | server/container/guice/memory-guice/src/test/java/org/apache/james/GuiceLifecycleHeathCheckTest.java | /****************************************************************
* Licensed to the Apache Software Foundation (ASF) under one *
* or more contributor license agreements. See the NOTICE file *
* distributed with this work for additional information *
* regarding copyright ownership. The ASF licenses this... |
honeyhugh/PythonCurso | ex014.py | c=float(input('Digite a temperatura em ºC: '))
f=(9*c+160)/5
print('{:.1f}ºC equivalem a {:.1f}ºF.'.format(c,f)) |
lechium/iOS1351Headers | System/Library/Frameworks/PhotosUI.framework/PUAlbumsGadgetProvider.h | <reponame>lechium/iOS1351Headers<gh_stars>1-10
/*
* This header is generated by classdump-dyld 1.5
* on Wednesday, October 27, 2021 at 3:16:46 PM Mountain Standard Time
* Operating System: Version 13.5.1 (Build 17F80)
* Image So... |
sarang-apps/darshan_browser | chrome/browser/extensions/api/tab_capture/tab_capture_registry.cc | // Copyright (c) 2012 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/extensions/api/tab_capture/tab_capture_registry.h"
#include <memory>
#include <utility>
#include "base/lazy_instance.h"
#in... |
mauguignard/cbmc | regression/systemc/Masc1/main.cpp | #if 1
typedef unsigned uint;
#endif
#include "masc.h"
#include <cassert>
mv<int,char> init_mv()
{
char z=1;
mv<int,char> m(0,z);
return m;
}
void test_mv()
{
mv<int,char> m = init_mv();
int x;
char y;
m.assign(x,y);
assert(x==0);
assert(y==1);
}
#define SIZE 5
array<SIZE,int> init_array()
{
a... |
HelioGuilherme66/jitsi | src/net/java/sip/communicator/plugin/update/UpdateServiceImpl.java | /*
* Jitsi, the OpenSource Java VoIP and Instant Messaging client.
*
* Copyright @ 2015 Atlassian Pty Ltd
*
* 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.or... |
Ch1rag02/JPlotter | jplotter/src/test/java/hageldave/jplotter/PrecisionTest.java | package hageldave.jplotter;
import java.awt.BorderLayout;
import java.awt.Font;
import java.awt.geom.Point2D;
import java.util.ArrayList;
import javax.swing.JCheckBox;
import javax.swing.JFrame;
import javax.swing.SwingUtilities;
import hageldave.jplotter.canvas.BlankCanvas;
import hageldave.jplotter.interaction.Coo... |
amgadmadkour/knowledgecubes | src/main/scala/edu/purdue/knowledgecubes/storage/persistent/Store.scala | package edu.purdue.knowledgecubes.storage.persistent
import scala.collection.mutable.{ListBuffer, Map}
import com.typesafe.scalalogging.Logger
import org.apache.jena.riot.Lang
import org.apache.spark.sql.{Dataset, SaveMode, SparkSession}
import org.apache.spark.sql.functions.col
import org.fusesource.leveldbjni.JniDB... |
pradeshm/infinispan | client/rest-client/src/main/java/org/infinispan/client/rest/RestResponse.java | package org.infinispan.client.rest;
import java.io.InputStream;
import java.util.List;
import java.util.Map;
import org.infinispan.client.rest.configuration.Protocol;
import org.infinispan.commons.util.Experimental;
/**
* @author <NAME> <<EMAIL>>
* @since 10.0
**/
@Experimental
public interface RestResponse... |
WeLogix/welogix-saas-web | client/apps/corp/message.i18n.js | import { defineMessages } from 'react-intl';
import { formati18n } from 'client/common/i18n/helpers';
import globalMessages from 'client/common/root.i18n';
const messages = defineMessages({
corpAdmin: {
id: 'corp.admin',
defaultMessage: '企业控制台',
},
overview: {
id: 'corp.overview',
defaultMessage:... |
facebookincubator/InjK | TransformCore/src/test/java/com/facebook/ads/injkit/crashshield/CrashShieldViewsInjectionTest.java | // Copyright (c) Facebook, Inc. and its affiliates.
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
package com.facebook.ads.injkit.crashshield;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import... |
gentaprima/skirpsinurul | assets/dashboard/plugins/ckeditor/plugins/showblocks/lang/ro.js | <reponame>gentaprima/skirpsinurul<filename>assets/dashboard/plugins/ckeditor/plugins/showblocks/lang/ro.js
CKEDITOR.plugins.setLang("showblocks","ro",{toolbar:"Arată blocurile"}); |
giraffe/jrate | gcc/libjava/java/awt/Shape.java | <reponame>giraffe/jrate
/* Shape.java -- the classic Object-Oriented shape interface
Copyright (C) 1999, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by... |
bedhubgrid/whitehall | app/workers/publishing_api_withdrawal_worker.rb | <filename>app/workers/publishing_api_withdrawal_worker.rb
class PublishingApiWithdrawalWorker < PublishingApiWorker
# `explanation` and `unpublished_at` come from the unpublishing object. Rather than
# performing a database query here to look up the `unpublishing` linked to the most
# recent edition, we pass it i... |
chokomancarr/chokoengine2 | include/ce2/asset/enums/shader_queue.hpp | #pragma once
#include "chokoengine.hpp"
CE_BEGIN_NAMESPACE
enum class ShaderQueue {
Opaque,
Transparent,
Overlay
};
CE_END_NAMESPACE |
ethansaxenian/RosettaDecode | lang/C++/hello-world-graphical-1.cpp | <filename>lang/C++/hello-world-graphical-1.cpp<gh_stars>1-10
#include <gtkmm.h>
int main(int argc, char *argv[])
{
Gtk::Main app(argc, argv);
Gtk::MessageDialog msg("Goodbye, World!");
msg.run();
}
|
inamukhan-eforte/plugins | kibana/wazuh/public/services/reporting.js | /*
* Wazuh app - Reporting service
* Copyright (C) 2015-2020 Wazuh, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later... |
ministryofjustice/smart-answers | app/presenters/node_presenter.rb | <reponame>ministryofjustice/smart-answers
class NodePresenter
include ActionView::Helpers::NumberHelper
def initialize(i18n_prefix, node, state = nil)
@i18n_prefix = i18n_prefix
@node = node
@state = state || SmartAnswer::State.new(nil)
end
def translate!(subkey)
I18n.translate!("#{@i18n_prefi... |
colealbon/royale | src/lib/encryptCleartextMulti.js | 'use strict';
import {getFromStorage} from './getFromStorage';
import {determineContentType} from './determineContentType';
import {encryptClearText} from './encryptClearText';
const PGPPUBKEY = 'PGPPubkey';
export function encryptCleartextMulti(content) {
// usage: encryptCleartextMulti(content)(openpgp)(localS... |
refdiff-data/gocd | server/src/com/thoughtworks/go/server/service/dd/DependencyFanInNode.java | <filename>server/src/com/thoughtworks/go/server/service/dd/DependencyFanInNode.java
/*************************GO-LICENSE-START*********************************
* Copyright 2014 ThoughtWorks, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance wit... |
shaojiankui/iOS10-Runtime-Headers | protocols/NSKeyedArchiverDelegate.h | <gh_stars>10-100
/* Generated by RuntimeBrowser.
*/
@protocol NSKeyedArchiverDelegate <NSObject>
@optional
- (void)archiver:(NSKeyedArchiver *)arg1 didEncodeObject:(id)arg2;
- (id)archiver:(NSKeyedArchiver *)arg1 willEncodeObject:(id)arg2;
- (void)archiver:(NSKeyedArchiver *)arg1 willReplaceObject:(id)arg2 withObje... |
mike-jumper/guacamole-website | doc/1.3.0/libguac/search/files_2.js | var searchData=
[
['error_2dtypes_2eh',['error-types.h',['../error-types_8h.html',1,'']]],
['error_2eh',['error.h',['../error_8h.html',1,'']]]
];
|
BBN-E/serif | src/Arabic/edt/discmodel/ar_DTCorefFeatureTypes.cpp | <gh_stars>1-10
// Copyright 2008 by BBN Technologies Corp.
// All Rights Reserved.
#include "Generic/common/leak_detection.h"
// This is where the _new instances of the feature types live.
#include "Arabic/edt/discmodel/ar_DTCorefFeatureTypes.h"
#include "Arabic/edt/discmodel/featuretypes/AdjNationality.h"... |
Hearthstonepp/Hearthstonepp | Includes/Rosetta/PlayMode/Tasks/SimpleTasks/ChangeEntityTask.hpp | // This code is based on Sabberstone project.
// Copyright (c) 2017-2019 SabberStone Team, darkfriend77 & rnilva
// RosettaStone is hearthstone simulator using C++ with reinforcement learning.
// Copyright (c) 2019 <NAME>, <NAME>, <NAME>
#ifndef ROSETTASTONE_PLAYMODE_CHANGE_ENTITY_TASK_HPP
#define ROSETTASTONE_PLAYMOD... |
michiels/intercity-next | app/models/ssh_execution.rb | class SshExecution
class_attribute :executioner
self.executioner = Net::SSH
def initialize(server)
@server = server
end
def execute(command:)
execute_with_block do |ssh|
return ssh.exec!(command)
end
end
def scp(from:, to:, direction: :download)
ssh_key_maintainer.create_key_for_c... |
thinn5/5WORK2019 | Proofs of Concept/srv-electron/src/controllers/userController.js | <reponame>thinn5/5WORK2019
'use strict';
var crypto = require('crypto');
const CONTROLLER = {};
const PATH = require('path');
const POOL = require(PATH.join(__dirname, '..', 'config', 'database'));
const TABLE = 'users';
const FIELD_ID = 'id';
const LIST = 'SELECT * FROM ' + TABLE;
const INSERT = 'INSERT INTO ' + TAB... |
nitehawk42/jadira | scanner/src/main/java/org/jadira/scanner/core/api/Allocator.java | package org.jadira.scanner.core.api;
public interface Allocator<T,E> {
T allocate(E e);
}
|
RolandWarburton/simple-sso | sso-consumer/app/app/app.js | const express = require("express");
const app = express();
const engine = require("ejs-mate");
const errorHandler = require("./errorHandler");
const debug = require("debug")("app:server");
const path = require("path");
const isAuthenticated = require("../middleware/isAuthenticated");
const cookieParser = require("cooki... |
FogChainInc/RadJavPrivate | library/src/RadJav/cpp/android/RadJavCPPMUINavigatorFrame.cpp | <reponame>FogChainInc/RadJavPrivate<gh_stars>0
/*
MIT-LICENSE
Copyright (c) 2018 Higher Edge Software, LLC
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
and associated documentation files (the "Software"), to deal in the Software without restriction,
including with... |
niquola/health_seven | lib/health_seven/2.4/datatypes/dr.rb | module HealthSeven::V2_4
class Dr < ::HealthSeven::DataType
# range start date/time
attribute :range_start_date_time, Ts, position: "DR.1"
# range end date/time
attribute :range_end_date_time, Ts, position: "DR.2"
end
end |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.