repo_name stringlengths 6 101 | path stringlengths 4 300 | text stringlengths 7 1.31M |
|---|---|---|
johnmwaller/spring-webflow | spring-binding/src/main/java/org/springframework/binding/message/DefaultMessageResolver.java | <filename>spring-binding/src/main/java/org/springframework/binding/message/DefaultMessageResolver.java
/*
* Copyright 2004-2008 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a c... |
OndrejKotek/Resteasy | testsuite/integration-tests/src/test/java/org/jboss/resteasy/test/microprofile/restclient/resource/HealthService.java | package org.jboss.resteasy.test.microprofile.restclient.resource;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import java.io.Closeable;
public interface HealthService extends Closeable {
@GET
@Prod... |
gems-uff/tipmerge | src/br/uff/ic/gems/tipmerge/gui/JFrameFilesAnalysis.java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package br.uff.ic.gems.tipmerge.gui;
import br.uff.ic.gems.tipmerge.dao.CommitterDao;
import br.uff.ic.gems.tipmerge.dao.Edite... |
foreverzmy/zent | packages/zent/src/utils/isFirefox.js | <filename>packages/zent/src/utils/isFirefox.js
// https://stackoverflow.com/questions/9847580/how-to-detect-safari-chrome-ie-firefox-and-opera-browser
const isFirefox = typeof InstallTrigger !== 'undefined';
export default isFirefox;
|
tugayipek1/Java_Hexagonal_Architecture_FormElite | domain/src/main/java/com/phexum/formHandler/domain/account/usecase/AccountGetByIdUseCase.java | <reponame>tugayipek1/Java_Hexagonal_Architecture_FormElite
package com.phexum.formHandler.domain.account.usecase;
import com.phexum.formHandler.domain.account.model.AccountModel;
import com.phexum.formHandler.domain.common.usecase.UseCase;
public class AccountGetByIdUseCase implements UseCase {
private long id;
... |
CoprHD/sds-controller | internalLibraries/security/src/main/java/com/emc/storageos/security/keystore/impl/CoordinatorConfigStoringHelper.java | <filename>internalLibraries/security/src/main/java/com/emc/storageos/security/keystore/impl/CoordinatorConfigStoringHelper.java<gh_stars>10-100
/*
* Copyright (c) 2014 EMC Corporation
* All Rights Reserved
*/
package com.emc.storageos.security.keystore.impl;
import java.io.IOException;
import java.util.HashMap;
imp... |
jelitox/navigator-api | navigator/modules/session/middlewares.py | <filename>navigator/modules/session/middlewares.py
from typing import Any, Callable, Dict, List, Optional
#import ujson as json
import json
# TODO: using rapidjson
from aiohttp import web
from aiohttp.web import middleware
from navigator.middlewares import check_path
# TODO: Middleware Class to avoid repeat check_pa... |
devkral/spkbspider | spkcspider/apps/spider/serializing.py | __all__ = [
"paginate_stream", "serialize_stream", "serialize_content",
"serialize_component", "list_features"
]
from rdflib import RDF, XSD, Literal, URIRef
from django.core.paginator import InvalidPage, Paginator
from django.db.models import Q, prefetch_related_objects
from django.http import Http404
from ... |
mfeindt0705/pynetmf | lesson5/jinja_filter_1.py | #!/user/bin/env python3
"""
simple exercise for jinja rendering
"""
from __future__ import unicode_literals, print_function
from jinja2 import FileSystemLoader, StrictUndefined
from jinja2.environment import Environment
env = Environment(undefined=StrictUndefined)
env.loader = FileSystemLoader(".")
intf_vars = {}
t... |
vtHawk/streets-gl | src/js/renderer/Texture3D.js | export default class Texture3D {
constructor(renderer, params) {
this.gl = renderer.gl;
this.url = params.url;
this.depth = params.depth;
this.imageHeight = params.imageHeight;
this.minFilter = params.minFilter || 'LINEAR_MIPMAP_LINEAR';
this.magFilter = params.magFilter || 'LINEAR';
this.wrap = params.... |
Khirion/nau | nau/src/nau/render/opengl/glProgram.cpp | <filename>nau/src/nau/render/opengl/glProgram.cpp
#include "nau/render/opengl/glProgram.h"
#include "nau.h"
#include "nau/config.h"
#include "nau/slogger.h"
#include "nau/geometry/vertexData.h"
#include "nau/material/uniformBlockManager.h"
#include "nau/render/iRenderer.h"
#include "nau/system/file.h"
#include "nau/sy... |
diegows/wanproxy | network/uinet/sys/contrib/octeon-sdk/cvmx-usb.h | /***********************license start***************
* Copyright (c) 2003-2010 <NAME> (<EMAIL>). 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 cod... |
vishalbelsare/jubakit | example/clustering_sklearn_wrapper.py | <gh_stars>10-100
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
"""
Using Clustering
========================================
This is a simple example that illustrates Clustering service usage.
"""
from sklearn.datasets import make_b... |
sanri1993/sanri-tools-maven | tools-core/src/main/java/com/sanri/tools/modules/core/validation/custom/IdCard18Validator.java | <reponame>sanri1993/sanri-tools-maven<gh_stars>10-100
package com.sanri.tools.modules.core.validation.custom;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorCon... |
cisco-ie/cisco-proto | codegen/go/xr/65x/cisco_ios_xr_ipv4_pim_oper/pim/standby/vrfs/vrf/topologies/topology/pim_tt_route_bag.pb.go | <gh_stars>1-10
/*
Copyright 2019 Cisco Systems
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 writ... |
victorgabr/pps | dev/dev.py | <filename>dev/dev.py
# this module is for experimentation using notebook or console.
# from pyplanscoring import PyDicomParser
import pydicom
if __name__ == '__main__':
filename = r"C:\Users\vgalves\Downloads\monacoplangetalldetails\2018CompLung_lmh.dcm"
obj = pydicom.read_file(filename, force=True)
pass... |
horizonltd/corona | request_Corona_Test/admin.py | <filename>request_Corona_Test/admin.py
from django.contrib import admin
from .models import RequestCoronaTest, Material
# class StateAdmin(admin.ModelAdmin):
# search_fields = ['__all__']
# class LgaAdmin(admin.ModelAdmin):
# search_fields = ['__all__']
# class WardAdmin(admin.ModelAdmin):
# search_fie... |
yez131300/ball | HelloWorld/src/resource.js | <gh_stars>0
var s_HelloWorld = "res/HelloWorld.png";
var g_ressources = [
//image
{src:s_HelloWorld}
//plist
//fnt
//tmx
//bgm
//effect
]; |
tnnfnc/apps | src/main/java/it/tnnfnc/security/algorithm/KeyAlgorithmParameter.java | <reponame>tnnfnc/apps<filename>src/main/java/it/tnnfnc/security/algorithm/KeyAlgorithmParameter.java
/*
* Copyright (c) 2015, <NAME>. All rights reserved.
*
* 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 So... |
zhanglong11/vue-manage | src/api/device/equipment/checkRecord.js | <gh_stars>0
import axios from '@/utils/axios'
/*
* @任务编号:2824 || 解决项目id问题
* @开发人员:张龙
* @日期:2020-03-07
* @任务类型: 修改代码
*/
export default {
//列表
list: param =>
axios.construction.post(`/equipmentAcceptance/list`, {
projectId: localStorage.getItem('projectId'),
...param
}),
//添加
add: param ... |
nfco/netforce | netforce_cms/netforce_cms/nf_editor/plugins/nf_image/plugin.js | CKEDITOR.plugins.add('nf_image', {
requires: 'widget',
icons: 'nf_image',
init: function( editor ) {
editor.widgets.add( 'nf_image', {
template:
'<div class="nf-image">'+
'<img src=""/>'+
'</div>',
upcast: function( element ) ... |
lupudeni/freecycle | src/main/java/com/denisalupu/freecycle/config/SecurityConfig.java | <filename>src/main/java/com/denisalupu/freecycle/config/SecurityConfig.java
package com.denisalupu.freecycle.config;
import lombok.AllArgsConstructor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.authentication.dao.... |
stepney141/GlukKazan.github.io | control/scripts/filler-dark.js | (function() {
var checkVersion = Dagaz.Model.checkVersion;
Dagaz.Model.checkVersion = function(design, name, value) {
if (name != "filler-dark") {
checkVersion(design, name, value);
}
}
var CheckInvariants = Dagaz.Model.CheckInvariants;
Dagaz.Model.CheckInvariants = function(board) {
var de... |
CardinalDevelopment/cardinal2 | src/main/java/in/twizmwaz/cardinal/module/filter/type/LayerFilter.java | /*
* Copyright (c) 2016, <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:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions a... |
lossyrob/geotrellis-before-locationtech | geotools/build.sbt | import Dependencies._
name := "geotrellis-geotools"
libraryDependencies ++= Seq(
"org.geotools" % "gt-coverage" % Version.geotools,
"org.geotools" % "gt-epsg-hsql" % Version.geotools,
"org.geotools" % "gt-geotiff" % Version.geotools,
"org.geotools" % "gt-main" % Version.geotools,
"org.geotools" % "gt-refere... |
torukobyte/HRMS_Spring | hrms/src/main/java/torukobyte/hrms/api/controllers/JobSeekerLanguagesController.java | <reponame>torukobyte/HRMS_Spring
package torukobyte.hrms.api.controllers;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import torukobyte.hrms.business.abstracts.JobSeekerLanguageService;
import torukobyte.hrms.core.utilities.results.DataResult;
import... |
ScalablyTyped/SlinkyTyped | o/openui5/src/main/scala/typingsSlinky/openui5/sap/m/TimePicker.scala | package typingsSlinky.openui5.sap.m
import org.scalablytyped.runtime.StObject
import scala.scalajs.js
import scala.scalajs.js.`|`
import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, JSBracketAccess}
@js.native
trait TimePicker extends MaskInput {
/**
* Gets current value of propert... |
talonos2/BruteLoL | src/brutelol/FightTest.java | <reponame>talonos2/BruteLoL
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package brutelol;
import brutelol.characters.instances.Ashe;
import brutelol.characters.instances.Generic... |
codeforamerica/michigan-benefits | app/forms/are_you_flint_water_form.rb | <filename>app/forms/are_you_flint_water_form.rb
class AreYouFlintWaterForm < Form
set_attributes_for :member, :flint_water
end
|
staniel359/muffon-api | app/services/muffon/profile/playlists/playlist.rb | <reponame>staniel359/muffon-api<filename>app/services/muffon/profile/playlists/playlist.rb
module Muffon
module Profile
class Playlists
class Playlist < Muffon::Profile::Base
def call
data
end
private
def data
{
id: playlist.id,
p... |
caohangwei1314/mall-vue-server | src/main/java/com/caohangwei/mallvueserver/service/impl/OrderServiceImpl.java | <gh_stars>0
package com.caohangwei.mallvueserver.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.caohangwei.mallvueserver.entity.Order;
import com.caohangwei.mallvueserver.entity.OrderDetail;
import com.caohangwei.mallvueserver.entity.ShoppingCart;
import com.caohangwei.mal... |
KaiyuWei/leetcode | cpp/381-390/Lexicographical Numbers.cpp | <reponame>KaiyuWei/leetcode
class Solution {
void dfs(int curr, int n, vector<int>& result, int& index) {
if (curr <= n) {
result[index++] = curr;
} else {
return;
}
for (int i = 0; i <= 9; i++) {
dfs(curr*10 + i, n, result, index)... |
dazito/twitterfy | src/main/java/com/dazito/twitterfy/aws/sqs/SqsPublisher.java | package com.dazito.twitterfy.aws.sqs;
import com.amazonaws.auth.AWSCredentialsProvider;
import com.amazonaws.services.sqs.AmazonSQSAsync;
import com.amazonaws.services.sqs.AmazonSQSAsyncClientBuilder;
import com.amazonaws.services.sqs.model.SendMessageRequest;
import com.dazito.twitterfy.Publisher;
import com.dazito.t... |
flyingff/droidbot | src/main/java/com/twilight/h264/decoder/AVFrame.java | package com.twilight.h264.decoder;
public class AVFrame {
public int imageWidthWOEdge;
public int imageHeightWOEdge;
public int imageWidth;
public int imageHeight;
// FF_COMMON_FRAME
/**\
* pointer to the picture planes.\
* This might be different from the first allocated byte\
... |
whebz/ConnectX | src/forzaquattro/view/StatsMenu.java | <filename>src/forzaquattro/view/StatsMenu.java
package forzaquattro.view;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.GridLayout;
import java.awt.Toolkit;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import javax.swing.JFrame;
import javax.swing.JPanel;
imp... |
StarExecMiami/StarExec | src/org/starexec/test/junit/backend/GridEngineBackendTests.java | <gh_stars>10-100
package org.starexec.test.junit.backend;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.BDDMockito;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
... |
gharia/kurento-java | kurento-basicroom/src/main/java/org/kurento/basicroom/RoomHandler.java | /*
* (C) Copyright 2014 Kurento (http://kurento.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 obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicab... |
karussell/bach | deprecated/src-20190611/demo/jigsaw-quick-start/greetings-world-with-main-and-test/src/test/com.greetings/module-info.java | open module com.greetings {
// main
requires org.astro;
// test
requires org.apiguardian.api;
requires org.junit.jupiter.api;
}
|
bocahrokok/ipfs-app | node_modules/xor-distance/index.js | <reponame>bocahrokok/ipfs-app<gh_stars>10-100
module.exports = dist
function dist (a, b) {
if (a.length !== b.length) throw new Error('Inputs should have the same length')
var result = Buffer.allocUnsafe(a.length)
for (var i = 0; i < a.length; i++) result[i] = a[i] ^ b[i]
return result
}
dist.compare = functi... |
GinSmile/LeetCode | src/Algorithms/P179_LargestNumber.java | /*
*
Given a list of non negative integers, arrange them such that they form the largest number.
For example, given [3, 30, 34, 5, 9], the largest formed number is 9534330.
Note: The result may be very large, so you need to return a string instead of an integer.
Credits:
Special thanks to @ts for adding this probl... |
kindone/proptest | PropertyContext.cpp | #include "PropertyContext.hpp"
#include "PropertyBase.hpp"
#include "util/std.hpp"
namespace proptest {
ostream& operator<<(ostream& os, const Failure& f)
{
auto detail = f.str.str();
if (detail.empty())
os << f.condition << " (" << f.filename << ":" << f.lineno << ")";
else
os << f.condit... |
Brimes7/Synaps-FE | src/actions/userActions.js | import {action} from './action';
import {createAxios, createAxiosAuth} from '../utilities/createAxios.js';
import firebase from '../config/firebase/FirebaseConfig.js';
export const SIGNED_IN = 'SIGNED_IN';
export const SIGNIN_FAILED = 'SIGNIN_FAILED';
export const SIGNOUT = 'SIGNOUT';
export const ATTEMPT_SIGNIN = 'AT... |
dongy6/type-inference | ICC/SOOT-Nightly/jasmin-github/lib/jas/src/jas/Pair.java | <reponame>dongy6/type-inference<filename>ICC/SOOT-Nightly/jasmin-github/lib/jas/src/jas/Pair.java
package jas;
public class Pair<T, U>
{
protected T o1;
protected U o2;
public Pair() { o1 = null; o2 = null; }
public Pair( T o1, U o2 ) { this.o1 = o1; this.o2 = o2; }
public int hashCode() {
return o1... |
miklosgergely/cloudbreak | core/src/main/java/com/sequenceiq/cloudbreak/converter/v4/stacks/StackValidationV4RequestToStackValidationConverter.java | package com.sequenceiq.cloudbreak.converter.v4.stacks;
import static com.sequenceiq.cloudbreak.converter.util.ExceptionMessageFormatterUtil.formatAccessDeniedMessage;
import java.util.Collection;
import java.util.HashSet;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.function... |
fagarine/dangkang | dk-game-core/src/main/java/cn/laoshini/dk/server/channel/JsonMessageChannelReader.java | <gh_stars>10-100
package cn.laoshini.dk.server.channel;
import io.netty.channel.ChannelHandlerContext;
import cn.laoshini.dk.domain.msg.ReqMessage;
/**
* JSON格式消息到达读取处理
*
* @author fagarine
*/
public class JsonMessageChannelReader implements INettyChannelReader<ReqMessage<?>> {
private LastChannelReader del... |
ctomc/jboss-jstl-api_spec | src/main/java/org/apache/taglibs/standard/lang/jstl/Constants.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 file to You under the Apache License, Version 2.0
* (the "License"); you may ... |
dcycle/scrapers-ca | ca_on_vaughan/people.py | from utils import CanadianScraper, CanadianPerson as Person
import re
COUNCIL_PAGE = 'http://www.vaughan.ca/council/Pages/default.aspx'
class VaughanPersonScraper(CanadianScraper):
def scrape(self):
regional_councillor_seat_number = 1
page = self.lxmlize(COUNCIL_PAGE)
councillors = pag... |
asheraryam/ezEngine | Code/Engine/Foundation/Reflection/Implementation/ArrayProperty.h | #pragma once
/// \file
#include <Foundation/Reflection/Implementation/AbstractProperty.h>
class ezRTTI;
/// \brief Do not cast into this class or any of its derived classes, use ezTypedArrayProperty instead.
template <typename Type>
class ezTypedArrayProperty : public ezAbstractArrayProperty
{
public:
ezTypedArra... |
neurodebian/htcondor | src/condor_procd/proc_family_io.cpp | <reponame>neurodebian/htcondor
/***************************************************************
*
* Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
* University of Wisconsin-Madison, WI.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in ... |
htsiah/HRLab | public/javascripts/leavereport.view.js | <reponame>htsiah/HRLab<filename>public/javascripts/leavereport.view.js
$(function(){
$("#navReports").addClass("active open");
switch(path) {
case "/report/myleaverequest":
$("#navMyLeaveRequest").addClass("active");
break;
case "/report/myteamleaverequest":
$("#navMyTeamLeaveRequest"... |
ouyanggao/aikexue | src/src/extra/pzg/doExp1.js | var doExp1 = myLayer.extend({
sprite: null,
changeDelete: true,
layerName: "doExp1",
preLayer: "doLayer",
ctor: function() {
this._super()
this.expCtor()
this.initPeople()
this.initUI()
return true
},
initUI:function(){
var self = this
... |
mwkohout/cassandra-bloomfilters | test/unit/org/apache/cassandra/service/pager/PagingStateTest.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 file
* to you under the Apache License, Version 2.0 (the
* "License"); you may n... |
zuxqoj/cdap | cdap-api/src/main/java/io/cdap/cdap/api/dataset/DatasetContext.java | <reponame>zuxqoj/cdap
/*
* Copyright © 2015 <NAME>, 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 applica... |
TISparta/competitive-programming-solutions | Codeforces/Round-184-Div2/C.cpp | <gh_stars>1-10
// Tags: Greedy
// Difficulty: 3.6
// Priority: 1
// Date: 22-05-2021
#include <bits/stdc++.h>
#define all(A) begin(A), end(A)
#define rall(A) rbegin(A), rend(A)
#define sz(A) int(A.size())
#define pb push_back
#define mp make_pair
using namespace std;
typedef long long ll;
typedef pai... |
vorburger/flowsim | flowsim-ui/app/scripts/controllers/verify.js | <reponame>vorburger/flowsim
'use strict';
/**
* @ngdoc function
* @name flowsimUiApp.controller:VerifyCtrl
* @description
* # VerifyCtrl
* Controller of the flowsimUiApp
*/
angular.module('flowsimUiApp')
.controller('VerifyCtrl', function ($scope, $stateParams, Subscriber) {
function clearErrors() {
... |
sergio-fry/youtube-fetcher | spec/features/search_spec.rb | require 'rails_helper'
RSpec.feature "Search", type: :feature do
scenario 'Type query and sea results' do
podcast = FactoryGirl.create :podcast, title: 'Peter Episode'
episode = FactoryGirl.create :episode, title: 'Moscow Episode'
visit '/'
fill_in 'Search', with: 'Peter'
click_on 'Submit'
... |
madettmann/DCS-Discover | staticfiles/jmol/jsmol/j2s/JS/UnitCellIterator.js | <gh_stars>100-1000
Clazz.declarePackage ("JS");
Clazz.load (["J.api.AtomIndexIterator"], "JS.UnitCellIterator", ["JU.Lst", "$.P3", "$.P3i", "JU.BoxInfo", "$.Logger", "$.Point3fi"], function () {
c$ = Clazz.decorateAsClass (function () {
this.atoms = null;
this.center = null;
this.translation = null;
this.nFound =... |
Laurens-makel/iaf | core/src/test/java/nl/nn/adapterframework/configuration/digester/FrankDigesterRulesTest.java | <reponame>Laurens-makel/iaf<filename>core/src/test/java/nl/nn/adapterframework/configuration/digester/FrankDigesterRulesTest.java
/*
Copyright 2020 WeAreFrank!
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 c... |
baratrumus/job4j-study | chapter_006/src/main/java/ru/job4j/io/files/FileSearch.java | <reponame>baratrumus/job4j-study<filename>chapter_006/src/main/java/ru/job4j/io/files/FileSearch.java
package ru.job4j.io.files;
import ru.job4j.io.Search;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.nio.file.DirectoryStream;
import java.ni... |
ShinjiKatoA16/aoj-itp | itp1_5d.py | #!/usr/bin/python3
# -*- coding: utf-8 -*-
import sys
n = int(sys.stdin.readline())
for i in range(1, n+1):
if i % 3 == 0:
print(' ', i, sep='', end='')
else:
x = i
while x > 0:
if x % 10 == 3:
print(' ', i, sep='', end='')
break
... |
drtierney/hyperskill-problems | Python/Topics/Stack in Python/Reversing a string/main.py | from collections import deque
n = int(input())
stack = deque()
for _ in range(n):
stack.append(input())
while stack:
print(stack.pop())
|
odys-z/hello | challenge/leet/medium/q1079.py | <reponame>odys-z/hello<gh_stars>0
'''
1079. Letter Tile Possibilities
https://leetcode.com/problems/letter-tile-possibilities/
You have n tiles, where each tile has one letter tiles[i] printed on it.
Return the number of possible non-empty sequences of letters you can make
using the letters printed on those tiles.
Ex... |
ONSdigital/dp-import-reporter | config/config.go | package config
import (
"encoding/json"
"time"
"github.com/kelseyhightower/envconfig"
"github.com/pkg/errors"
)
// KafkaSecProtocolTLS informs service to use TLS protocol for kafka
const KafkaSecProtocolTLS = "TLS"
// Config struct to hold application configuration.
type Config struct {
BindAddress ... |
akquinet/drools | drools-compiler/src/main/java/org/drools/rule/builder/dialect/asm/ASMEvalBuilder.java | <gh_stars>1-10
package org.drools.rule.builder.dialect.asm;
import org.drools.WorkingMemory;
import org.drools.rule.Declaration;
import org.drools.rule.builder.RuleBuildContext;
import org.drools.spi.CompiledInvoker;
import org.drools.spi.EvalExpression;
import org.drools.spi.Tuple;
import org.mvel2.asm.MethodVisitor;... |
progital/test-redwood | web/src/pages/HomePage/HomePage.js | <filename>web/src/pages/HomePage/HomePage.js
import { Flex, Box } from 'theme-ui';
import Button from 'components/ui/ButtonOutline';
import DefaultLayout from 'layouts/DefaultLayout';
import NewUser from 'components/account/NewUser';
import LoginUser from 'components/account/LoginUser';
import { useState } from 'react'... |
Xibo-Yue/WanAndroid | app/src/main/java/com/example/lengary_l/wanandroid/data/source/CategoriesDataSource.java | <filename>app/src/main/java/com/example/lengary_l/wanandroid/data/source/CategoriesDataSource.java<gh_stars>0
package com.example.lengary_l.wanandroid.data.source;
import android.support.annotation.NonNull;
import com.example.lengary_l.wanandroid.data.CategoryDetailData;
import java.util.List;
import io.reactivex.O... |
all3g/pieces | requests/requests-cookies.py | <reponame>all3g/pieces<filename>requests/requests-cookies.py
#!/usr/bin/python
# -*- coding: utf-8 -*-
import requests
url = 'https://www.metasploit.com'
r = requests.get(url)
print(r.cookies)
# If a response contains some Cookies, you can quickly access them:
print(r.cookies['value'])
# To send your own cookies t... |
coolslow/Algorithm | src/com/coolslow/playground/binary_tree/NO129_SumRootToLeafNumbers.java | package com.coolslow.playground.binary_tree;
/**
* 129. 求根节点到叶子节点的数字之和
* 给你一个二叉树的根节点 root ,树中每个节点都存放有一个 0 到 9 之间的数字。
* 每条从根节点到叶节点的路径都代表一个数字:
* - 例如,从根节点到叶节点的路径 1 -> 2 -> 3 表示数字 123 。
* 计算从根节点到叶节点生成的 所有数字之和 。
*
* 叶节点 是指没有子节点的节点。
*
* 示例:
* 1
* / \
* 2 3
* 输入:root = ... |
pymma/drools47jdk8 | drools-solver/drools-solver-core/src/main/java/org/drools/solver/config/localsearch/LocalSearchSolverConfig.java | <reponame>pymma/drools47jdk8<filename>drools-solver/drools-solver-core/src/main/java/org/drools/solver/config/localsearch/LocalSearchSolverConfig.java
package org.drools.solver.config.localsearch;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.List;
import c... |
millken/kwan | src/filter/const.go | <reponame>millken/kwan<gh_stars>0
package filter
const (
STATUS_DDOS = 2 << 0 //DDOS模式
STATUS_BLACKLIST = 2 << 1 //存在于黑名单
STATUS_WHITELIST = 2 << 2 //存在于白名单
STATUS_CACHE_HITS = 2 << 3 //缓存命中
)
|
openmcac/basechurch | db/migrate/20141107024218_add_group_id_to_bulletins.rb | class AddGroupIdToBulletins < ActiveRecord::Migration
def change
add_column :basechurch_bulletins, :group_id, :integer
end
end
|
imranpopz/android_bootable_recovery-1 | tests/unit/commands_test.cpp | /*
* Copyright (C) 2018 The Android Open Source Project
*
* 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 app... |
dimitar9111/JavaScript-Core | JS Basics Exercises/08. Print Numbers in Reversed Order.js | <filename>JS Basics Exercises/08. Print Numbers in Reversed Order.js
function printReversed(args) {
let numbers = args.map(Number);
for (let i = numbers.length - 1; i >= 0; i--){
console.log(numbers[i]);
}
}
|
adehtiarov/intellij-community | platform/platform-impl/src/com/intellij/internal/statistic/collectors/legacy/plugins/LegacyNonBundledPluginsUsagesCollector.java | // Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.internal.statistic.collectors.legacy.plugins;
import com.intellij.ide.plugins.IdeaPluginDescriptor;
import com.intellij.ide.plugins.PluginManagerCore;
import... |
FateRevoked/mage | Mage.Sets/src/mage/cards/m/MaelstromBlockade.java | package mage.cards.m;
import java.util.UUID;
import mage.abilities.effects.common.ExileTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.target.common.TargetAttackingCreature;
/**
*
* @author NinthWorld
*/
public final class MaelstromBlockade exte... |
acrucetta/Chicago_COVI_WebApp | env/lib/python3.8/site-packages/plotly/graph_objs/splom/dimension/__init__.py | <filename>env/lib/python3.8/site-packages/plotly/graph_objs/splom/dimension/__init__.py<gh_stars>1000+
import sys
if sys.version_info < (3, 7):
from ._axis import Axis
else:
from _plotly_utils.importers import relative_import
__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._axis.Axis"])
|
kdonovan/searchbot | lib/searchbot/sources/acquisitions_direct/listings_page.rb | <reponame>kdonovan/searchbot
class Searchbot::Sources::AcquisitionsDirect::ListingsPage < Searchbot::Generic::ListingsPage
def raw_listings
doc.css(".portfolio-item:not(.sold):not(.under-loi)").select do |l|
!l.at('h2').text.include?('(Coming Soon)')
end
end
def more_pages_available?
false
e... |
zbx911/CHRLINE | CHRLINE/poll.py | <gh_stars>0
# -*- coding: utf-8 -*-
import os, sys, threading, time, traceback
class Poll(object):
def __init__(self):
pass
def __fetchOps(self, count=100):
fetchOps = self.fetchOps
if self.DEVICE_TYPE in self.SYNC_SUPPORT:
fetchOps = self.sync
ops = fetchOps(self.... |
nanaze/error-prone | core/src/test/java/com/google/errorprone/bugpatterns/ClassNamedLikeTypeParameterTest.java | /*
* Copyright 2018 The Error Prone Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law ... |
davidlrichmond/macports-ports | net/airctl/files/patch-airctl.c | <filename>net/airctl/files/patch-airctl.c<gh_stars>1000+
--- airctl.c Tue Jun 3 03:13:35 2003
+++ airctl.c.new Tue Apr 6 20:54:40 2004
@@ -28,7 +28,6 @@
#include <sys/time.h> /* select */
#include <sys/types.h> /* select */
-#include <sys/select.h> /* select */
#include <sys/socket.h>
#include <netinet/in.h>
|
Ludaxord/ConceptEngine | ConceptEngine/ConceptEngine/Concept-Engine/Core/Platform/Windows/Cursor/CEWindowsCursor.h | #pragma once
#include "../../Generic/Cursor/CECursor.h"
#include <Windows.h>
namespace ConceptEngine::Core::Platform::Windows::Cursor {
class CEWindowsCursor final : public Generic::Cursor::CECursor {
public:
CEWindowsCursor();
~CEWindowsCursor() override;
bool Init(LPCWSTR cursorName);
virtual void* Get... |
ucsd-progsys/csolve-bak | tests/postests/glib-2.24.0/int-glist.c | #include <stdlib.h>
#include <csolve.h>
typedef struct _SortedList SortedList;
typedef SortedList * NNSTART NNREF(PSIZE(12)) NNREF(V > 0) sortedlistptr;
struct _SortedList {
int FINAL d;
sortedlistptr NNSTART NNREF((DEREF([V]): int) >= d) n;
sortedlistptr NNSTART NNREF((DEREF([V]): int) <= d) p;
};
exte... |
kushaldas/sunder | src/components/Modal.js | <gh_stars>100-1000
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import Panel from './Panel';
import './Modal.scss';
export default class Modal extends Component {
static propTypes = {
children: PropTypes.node,
onClose: PropTypes.func
}
render() {
return (
<div... |
Ifdevil/RPC | rpc_config/rpc_config_api/src/main/java/com/rpc/config/RegistryConfig.java | package com.rpc.config;
import com.rpc.common.util.StringUtils;
import com.rpc.config.supports.Parameter;
/**
* 注册中心配置
*/
public class RegistryConfig {
private String address;
// ======================== constructor ========================
public RegistryConfig(){
}
public RegistryConfig(Str... |
iris-dni/iris-frontend | src/reducers/images.js | import { assign } from 'lodash/object';
import {
SUBMITTING_IMAGE,
CREATED_IMAGE
} from 'actions/actionTypes';
const initialState = {
images: []
};
export default function images (state = initialState, action) {
switch (action.type) {
case SUBMITTING_IMAGE:
return assign({},
state, {
... |
m1nuz/ironforge | ironforge/src/core/game.cpp | <gh_stars>0
#include <vector>
#include <memory>
#include <algorithm>
#include <functional>
#include <SDL2/SDL.h>
#include <SDL2/SDL_ttf.h>
#include <xargs.hpp>
#include <core/journal.hpp>
#include <core/json.hpp>
#include <core/assets.hpp>
#include <core/input.hpp>
#include <core/game.hpp>
#include <video/video.hpp>... |
MothOnMars/search-gov | db/migrate/20150804163342_delete_public_key_upload_notification_template.rb | class DeletePublicKeyUploadNotificationTemplate < ActiveRecord::Migration
def up
EmailTemplate.destroy_all(:name => 'public_key_upload_notification')
end
def down
end
end
|
cloudscheduler/cloudscheduler | cloudscheduler-core/src/main/java/io/github/cloudscheduler/service/JobServiceImpl.java | /*
* Copyright (c) 2018. cloudscheduler
* All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rig... |
AlexRogalskiy/website-4 | src/pages/docs.js | import React from 'react'
import Head from '../components/Head'
import DocsHeader from '../components/DocsHeader'
import Footer from '../components/Footer'
import Icon from '../components/Icon'
import Link from '../components/Link'
import Button from '../components/Button'
import SearchBox from '../components/SearchBo... |
MarselAhmetov/ITIS-2c | GameJavaFX/src/main/java/attributes/Args.java | <filename>GameJavaFX/src/main/java/attributes/Args.java
package attributes;
import com.beust.jcommander.Parameter;
import java.util.ArrayList;
import java.util.List;
public class Args {
@Parameter
public List<String> parameters = new ArrayList<>();
@Parameter(names = { "--address"})
public String ad... |
eguneys/pipo | modules/memo/src/main/Env.scala | package oyun.memo
import com.softwaremill.macwire._
import io.methvin.play.autoconfig._
import play.api.Configuration
import oyun.common.config._
final class MemoConfig(
@ConfigName("collection.cache") val cacheColl: CollName,
@ConfigName("collection.config") val configColl: CollName,
)
@Module
final class Env(... |
SaadYum/SquarePad | screens/Interests.js | import React from "react";
import {
StyleSheet,
Dimensions,
ScrollView,
Image,
ImageBackground,
Platform,
Alert,
AsyncStorage,
SafeAreaView,
KeyboardAvoidingView,
FlatList,
ActivityIndicator,
} from "react-native";
import { Block, Text, theme, Input } from "galio-framework";
import { Card, ListI... |
consulo/consulo-lua | src/main/java/com/sylvanaar/idea/Lua/codeInsight/LuaMethodSeparatorMarkerProvider.java | /*
* Copyright 2011 <NAME> (Sylvanaar)
*
* 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 ... |
Shaptic/py-stellar-base | stellar_sdk/xdr/change_trust_op.py | # This is an automatically generated file.
# DO NOT EDIT or your changes may be overwritten
import base64
from xdrlib import Packer, Unpacker
from ..type_checked import type_checked
from .change_trust_asset import ChangeTrustAsset
from .int64 import Int64
__all__ = ["ChangeTrustOp"]
@type_checked
class ChangeTrustO... |
FanHuaRan/quick-start | java/akka/simple/src/main/java/com/fhr/akka/minirpg/MsgHandler.java | package com.fhr.akka.minirpg;
import akka.actor.UntypedActor;
import com.fhr.akka.minirpg.request.AddExpRequest;
import com.fhr.akka.minirpg.request.CreatePlayerRequest;
import com.fhr.akka.minirpg.request.GetPlayerInfoRequest;
import com.fhr.akka.minirpg.request.LevelUpRequest;
import com.fhr.akka.minirpg.response.Ad... |
john-james-ai/ml-studio | ml_studio/model_evaluation/validity.py | # =========================================================================== #
# VALIDITY #
# =========================================================================== #
# =========================================================================== #
... |
xiayingfeng/sarl | main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/contentassist/templates/SARLTemplateProposalProvider.java | /*
* $Id$
*
* SARL is an general-purpose agent programming language.
* More details on http://www.sarl.io
*
* Copyright (C) 2014-2021 the original authors or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You ma... |
aaronjwood/alb-sdk | go/models/upgrade_status_info.go | <filename>go/models/upgrade_status_info.go
// Copyright 2021 VMware, Inc.
// SPDX-License-Identifier: Apache License 2.0
package models
// This file is auto-generated.
// UpgradeStatusInfo upgrade status info
// swagger:model UpgradeStatusInfo
type UpgradeStatusInfo struct {
// UNIX time since epoch in microseconds... |
kalamay/eddy | lib/bpt.c | #include "eddy-private.h"
_Static_assert(sizeof(EdBpt) == PAGESIZE,
"EdBpt size invalid");
_Static_assert(offsetof(EdBpt, data) % 8 == 0,
"EdBpt data not 8-byte aligned");
#define BRANCH_KEY_SIZE 8
#define BRANCH_PTR_SIZE (sizeof(EdPgno))
#define BRANCH_ENTRY_SIZE (BRANCH_PTR_SIZE + BRANCH_KEY_SIZE)
#define BRANC... |
Caprowni/concourse | testflight/regression_test.go | package testflight_test
import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gexec"
)
var _ = Describe("Regression tests", func() {
Describe("issue 7282", func() {
It("does not error when resources emit long metadata strings", func() {
setAndUnpausePipeline("fixtures/long-me... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.