text stringlengths 7 1.01M |
|---|
/*
* Copyright (c) 2015 WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. 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/lic... |
class Solution {
public boolean canJump(int[] nums) {
if(nums.length <= 1) return true;
int j = nums.length - 1;
for(int i = j - 1;i > -1;i--) {
if(nums[i] + i >= j) j = i;
if(j == 0) return true;
}
return false;
}
}
|
/*
* Copyright 2011 <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter, III</a>
*
* 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.... |
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See License.txt in the repository root.
package com.microsoft.tfs.client.common.ui.teamexplorer.sections;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.swt.SWT;
import org.eclip... |
/*
* MIT License
*
* Copyright (c) 2022 MASES s.r.l.
*
* 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 rights
* to use, cop... |
package edu.utexas.cs.utopia.cortado.util.sat.formula;
import javax.annotation.Nonnull;
import java.util.List;
import static edu.utexas.cs.utopia.cortado.util.sat.formula.BooleanOperator.OPERATOR_TYPE.AND;
public class AndOperator extends BinaryBooleanOperator {
/**
* @param operands the operands to take an... |
package algo.leetcode;
public class PatchingArray {
public int minPatches(int[] nums, int n) {
long max = 0;
int cnt = 0;
for(int i = 0; max < n;){
if(i >= nums.length || max < nums[i] - 1){
max += max+1;
cnt += 1;
}else{
... |
package io.trigger.forge.android.core;
import android.content.Intent;
import android.content.res.Configuration;
import android.graphics.RectF;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import androidx.core.view.DisplayCutoutCompat;
import androidx.core.view.OnApplyWindowInsetsListener... |
package com.example.page;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.PageFactory;
public class LogIn {
@FindBy(xpath = "//h1")
public WebElement header;
@FindBy(xpath ="//input[@placeholder='Usernam... |
/*
* 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 ... |
/*
* MIT License
*
* Copyright (c) 2017 Connor Hartley
*
* 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 rights
* to use, copy, m... |
package com.redspace.utils.javabreaker;
import org.junit.Before;
import org.junit.Test;
import java.util.LinkedList;
import java.util.List;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
public class JavaBreakerTest {
private Ja... |
/**
* Copyright © 2020 Erwin Müller (erwin.mueller@anrisoftware.com)
*
* 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 req... |
package com.neueda.jetbrains.plugin.graphdb.jetbrains.component.settings;
import com.intellij.ide.util.PropertiesComponent;
import com.neueda.jetbrains.plugin.graphdb.jetbrains.component.analytics.Analytics;
import org.jetbrains.annotations.NotNull;
import java.util.UUID;
public class SettingsComponentImpl implement... |
package fi.gekkio.drumfish.lang;
import java.io.Serializable;
import com.google.common.base.Predicate;
/**
* Predicates for String objects.
* <p>
* All objects returned by the methods are serializable if all the method parameters are too.
*/
public final class StringPredicates {
private StringPredicates() {... |
package net.boomerangplatform.scheduler;
import java.util.List;
import java.util.TimeZone;
import java.util.function.Predicate;
import javax.annotation.PostConstruct;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.quartz.CronScheduleBuilder;
import org.quartz.CronTrigger... |
package io.appium.java_client.android;
import static com.google.common.base.Preconditions.checkArgument;
import static org.apache.commons.lang3.StringUtils.isBlank;
/**
* This is a simple POJO class to support the {@link StartsActivity}.
*/
public class Activity {
private final String appPackage;
private fi... |
/*
* Infinitest, a Continuous Test Runner.
*
* Copyright (C) 2010-2013
* "Ben Rady" <benrady@gmail.com>,
* "Rod Coffin" <rfciii@gmail.com>,
* "Ryan Breidenbach" <ryan.breidenbach@gmail.com>
* "David Gageot" <david@gageot.net>, et al.
*
* Permission is hereby granted, free of charge, to any person obtaining a c... |
// Targeted by JavaCPP version 1.5.2: DO NOT EDIT THIS FILE
package org.bytedeco.gsl;
import java.nio.*;
import org.bytedeco.javacpp.*;
import org.bytedeco.javacpp.annotation.*;
import static org.bytedeco.openblas.global.openblas_nolapack.*;
import static org.bytedeco.openblas.global.openblas.*;
import static org.b... |
package com.techm.ms.model.swagger;
import com.techm.ms.model.Account;
import com.techm.ms.model.representation.Resource;
/**
* Swagger response class for the Account model object.
* @param <T>
* @param <T>
*/
public class AccountResponse extends Resource<Account> {
/**
* This constructor sets the cont... |
/*
* Copyright 2011-2016 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 "licen... |
/**
* NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT).
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
package io.swagger.api;
import java.util.Map;
import io.swagger.model.Order;
import io.swagger.annotations.*;
import org.springfram... |
package com.example.inventory.data.model;
public class Dependency {
private String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getShortName() {
return shortName;
}
public void setShortNa... |
/*
* 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 ... |
package de.onyxbits.raccoon.proto;
import com.google.protobuf.ByteString;
import com.google.protobuf.MessageOrBuilder;
import java.util.List;
public interface AndroidAppDeliveryDataOrBuilder extends MessageOrBuilder {
boolean hasDownloadSize();
long getDownloadSize();
boolean hasDownloadUrl();
String g... |
package com.xtwsoft.poieditor.services;
import java.io.File;
import javax.servlet.http.HttpServletRequest;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.xtwsoft.poieditor.POIManager;
import com.xtwsoft.server.ServerConfig;
import com.xtwsoft.server.Service;
impo... |
/*
* 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... |
/*
* Copyright 2016-2021 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 "licen... |
package artifacts.client.render.model.curio;
import net.minecraft.client.renderer.model.ModelRenderer;
public class ClawsModel extends GloveModel {
public ClawsModel(boolean smallArms) {
super(smallArms);
ModelRenderer clawLeftUpper1 = new ModelRenderer(this, 0, 6);
ModelRenderer clawRig... |
package com.donfaq.ruchi.controller;
import com.donfaq.ruchi.service.input.vk.VkCallbackHandler;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.we... |
package jspCardManager.register;
public class RegisterBean{
private String name;
private String position;
private String tel;
private String email;
private String address;
private String addressDetail;
public void setName(String name) {
this.name = name;
}
public void setPosition(Stri... |
package org.ggp.base.apps.kiosk.templates
import java.awt.Color
import java.awt.Font
import java.awt.FontMetrics
import java.awt.Graphics
import java.awt.Image
import java.io.File
import java.io.IOException
import java.util.Random
import javax.imageio.ImageIO
import org.ggp.base.util.configuration.Proje... |
/*! ******************************************************************************
*
* Hop : The Hop Orchestration Platform
*
* http://www.project-hop.org
*
*******************************************************************************
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you ... |
/*
* © Crown Copyright 2013
*
* 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 w... |
package com.cg.oct12.batch3.day8.strm;
public class Employee {
int eid;
String name;
double salary;
public Employee() {
}
public Employee(int eid, String name, double salary) {
super();
this.eid = eid;
this.name = name;
this.salary = salary;
}
@Override
public String toString() {
return "Employ... |
/**
* 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 m... |
package app;
import ui.Frame;
import javax.swing.*;
import java.util.Vector;
public class Captor {
long MAX_PACKETS_HOLD = 10000;
Vector packets = new Vector();
JpcapCaptor jpcap = null;
boolean isLiveCapture;
boolean isSaved = false;
Frame frame;
public void setJDFrame(Frame frame) {... |
/* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* gradle plugin from the resource data it found. It
* should not be modified by hand.
*/
package android.support.v7.recyclerview;
public final class R {
private R() {}
public static final class attr {
privat... |
package br.com.zupacademy.cintia.proposta.proposta.dto.response;
import br.com.zupacademy.cintia.proposta.proposta.consulta.enumzins.StatusProposta;
import br.com.zupacademy.cintia.proposta.proposta.model.Proposta;
public class PropostaDtoResponse {
private Long id;
private StatusProposta statusProposta;
... |
package com.coderfromscratch.http;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.InputStream;
public class HttpParser {
private final static Logger LOGGER = LoggerFactory.getLogger(HttpParser.class);
public void parseHttpRequest(InputStream inputStream) {
}
}
|
/*
* MIT License
*
* Copyright (c) 2019-2021 Yurii Dubinka
*
* 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 rights to use, cop... |
package com.javarush.task.task19.task1910;
import java.io.*;
import java.util.ArrayList;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/*
Пунктуация
*/
public class Solution
{
public static void main(String[] args) throws IOException
{
BufferedReader reader ... |
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distribut... |
/*
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####... |
/*
* Copyright 2020 Google LLC
*
* 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... |
package shcm.shsupercm.fabric.citresewn;
import net.minecraft.client.render.model.BakedModel;
import net.minecraft.client.world.ClientWorld;
import net.minecraft.entity.LivingEntity;
import net.minecraft.item.ArmorItem;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Hand... |
package com.mobileruler;
import android.os.Bundle;
import com.mobileruler.base.BaseActivity;
public class HorizontalActivity extends BaseActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.a... |
package org.objectagon.core.server;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.objectagon.core.exception.ErrorClass;
import org.objectagon.core.exception.ErrorKind;
import org.objectagon.core.exception.SevereError;
import org.objectagon.core.msg.Address;
import org.objectagon.c... |
/*
* L2_SUBTRACT_INT_MINUS_INT_CONSTANT.java
* Copyright © 1993-2018, The Avail Foundation, LLC.
* 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 re... |
package com.platform.neighbour.member.dao;
import com.platform.neighbour.member.entity.UserLoginLogEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* 用户登陆记录信息表
*
* @author LiuChenggeng
* @email liuchenggeng86@gmail.com
* @date 2020-08-02 17:35:40
... |
package p1;
//https://www.hackerrank.com/challenges/lowest-triangle/problem
public class MinHtTriangle {
public static void main(String[] args) {
System.out.println(lowestTriangle(34, 999877));
System.out.println(Math.round(11.7647));
System.out.println(lowestTriangle(17, 100));
}
public static int lowestT... |
package org.laladev.moneyjinn.server.controller.group;
import java.util.ArrayList;
import java.util.List;
import javax.inject.Inject;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.laladev.moneyjinn.core.error.ErrorCode;
import org.lala... |
package org.protobeans.mvc.util;
public class GlobalModelAttribute {
private String key;
private Object value;
public GlobalModelAttribute(String key, Object value) {
this.key = key;
this.value = value;
}
public String getKey() {
return key;
}
public Object g... |
public class Solution3 {
public boolean isValidBST(TreeNode root) {
if (root == null) {
return true;
}
return dfs(root, null, null);
}
private boolean dfs(TreeNode node, Integer min, Integer max) {
if (node == null) {
return true;
... |
package oysd.com.trade_app.modules.otc.di;
import dagger.Module;
/**
* Created by Liam on 2018/7/23
*/
@Module
public class OtcModule {
}
|
package edu.ucdenver.ccp.nlp.pipelines.conceptmapper;
/*
* #%L
* Colorado Computational Pharmacology's NLP pipelines
* module
* %%
* Copyright (C) 2014 - 2017 Regents of the University of Colorado
* %%
* Redistribution and use in source and binary forms, with or without modification,
* are permitted pro... |
/**
* 错题相关
*/
/**
* @since 2.1.0
* @author <a href="mailto:sikai.wang@elanking.com">sikai.wang</a>
* @version 2016年6月20日
*/
package com.lanking.uxb.service.fallible; |
/* */ package com.wtpgaming.omzp.v15.Events.CustomItems.Armor.Chestplates;
/* */
/* */ import com.wtpgaming.omzp.OMZP;
/* */ import java.util.Random;
/* */ import org.bukkit.ChatColor;
/* */ import org.bukkit.Material;
/* */ import org.bukkit.entity.Player;
/* */ import org.bukkit.event.... |
/*
* Copyright 2010-2016 OrientDB LTD (http://orientdb.com)
*
* 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 ... |
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) annotate safe
package android.support.v4.graphics;
import android.content.ContentResolver;
import android.content.Context;
import android.content.res.Resources;
import ... |
/*
* Copyright 2016, Yahoo Inc.
* Licensed under the Apache License, Version 2.0
* See LICENSE file in project root for terms.
*/
package com.yahoo.elide.parsers.expression;
import static com.yahoo.elide.core.dictionary.EntityDictionary.NO_VERSION;
import static com.yahoo.elide.core.security.visitors.PermissionTo... |
// Targeted by JavaCPP version 1.5.1-SNAPSHOT: DO NOT EDIT THIS FILE
package org.bytedeco.cpython;
import java.nio.*;
import org.bytedeco.javacpp.*;
import org.bytedeco.javacpp.annotation.*;
import static org.bytedeco.cpython.global.python.*;
@Properties(inherit = org.bytedeco.cpython.presets.python.class)
public ... |
package course.java.service.impl;
import course.java.dao.UserRepository;
import course.java.exception.ConstraintViolationException;
import course.java.exception.InvalidEntityDataException;
import course.java.exception.NonexistingEntityException;
import course.java.model.User;
import course.java.service.UserService;
im... |
/**
* <a href="http://www.openolat.org">
* OpenOLAT - Online Learning and Training</a><br>
* <p>
* Licensed under the Apache License, Version 2.0 (the "License"); <br>
* you may not use this file except in compliance with the License.<br>
* You may obtain a copy of the License at the
* <a href="http://www.apache... |
/*
* Copyright 2019-present MongoDB, 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 ag... |
/*
* Copyright (c) 2016 Mockito contributors
* This program is made available under the terms of the MIT License.
*/
package org.mockito.mock;
import org.mockito.Incubating;
/**
* Mock serializable style.
*/
@Incubating
public enum SerializableMode {
/**
* No serialization.
*/
NONE,
/**
... |
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
pa... |
package net.minecraft.util;
import java.util.List;
import net.minecraft.command.CommandException;
import net.minecraft.command.EntityNotFoundException;
import net.minecraft.command.ICommandSender;
import net.minecraft.command.PlayerSelector;
import net.minecraft.entity.Entity;
public class ChatComponentProcessor
{
... |
package com.codepath.simpletodo;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.EditText;
import android.widget.ListView;
import org.apache.... |
/*
* Copyright 2010 Henry Coles
*
* 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 w... |
package fr.uem.efluid.security.providers;
import fr.uem.efluid.model.entities.User;
import java.util.List;
import java.util.Optional;
import java.util.UUID;
/**
* Default entity for application accounting and various entry point on user accounts
*
* @author elecomte
* @version 1
* @since v1.2.0
*/
public inter... |
/*
* 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.imagepipeline.cache;
import com.facebook.infer.annotation.Nullsafe;
import java.util.LinkedHashSet;
import ja... |
package com.alipay.api.response;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: alipay.ins.scene.lifemssage.single.send response.
*
* @author auto create
* @since 1.0, 2020-08-13 15:02:26
*/
public class AlipayInsSceneLifemssageSingleSendResponse extends AlipayResponse {
private static final long ... |
/*
* 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... |
package mbud.servlets;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import mbud.data.Cart;
import mbud.data.UserData;
... |
package org.ogin.nettyku.connector;
import io.netty.bootstrap.ServerBootstrap;
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelOption;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.... |
/*
* Copyright 2015 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 applica... |
/**
*
*/
package org.opensharingtoolkit.chooser;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
/**
* @author pszcmg
*
*/
public class ShowMainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub... |
package state.objective.objectivecondition;
import state.State;
import state.attribute.Attribute;
import java.util.Map;
/**
* @author Jamie Palka
* Abstract class to define the ObjectiveConditions within the game which are triggered by the value of an attribute of a user.
*/
abstract public class AttributeObjecti... |
/* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distribut... |
package com.jaquadro.minecraft.storagedrawers.api.storage;
import com.jaquadro.minecraft.storagedrawers.api.inventory.IDrawerInventory;
public interface IDrawerGroup {
/**
* Gets the number of drawers contained within this group.
*/
int getDrawerCount();
/**
* Gets the drawer at the given ... |
import java.io.*;
import java.util.*;
import java.util.ArrayDeque;
public class ReverseLinkedList {
/*
* http://www.shafaetsplanet.com/?p=2689
*/
/*
* Runtime Complexity:
* Linear, O(n).
* As we can reverse the linked list in a single pass.
*
* Memory Complexity:
*... |
package it.com.dragmenu;
import android.content.Context;
import android.support.v4.view.ViewCompat;
import android.support.v4.widget.ViewDragHelper;
import android.util.AttributeSet;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import co... |
package com.gg.mlg.mlg;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class MlgApplicationTests {
@Test
void contextLoads() {
}
}
|
package com.orasi.web.webelements;
import org.openqa.selenium.By;
import org.testng.Assert;
import org.testng.ITestContext;
import org.testng.ITestResult;
import org.testng.SkipException;
import org.testng.annotations.AfterClass;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeClass;
imp... |
package com.algorithm.dynamic;
/**
* http://www.geeksforgeeks.org/dynamic-programming-set-8-matrix-chain-
* multiplication/
*/
public class MatrixMultiplicationCost {
public int findCost(int arr[]) {
int temp[][] = new int[arr.length][arr.length];
int q = 0;
for (int l = 2; l < arr.length; l++) {
for (in... |
package com.ru.usty.scheduling;
import com.ru.usty.scheduling.process.ProcessInfo;
//not going to be implemented, can delete this
public class SRTProc implements Comparable{
//this class is used for comparing run length in later cases for priority queue
int processID;
Comparable compVar;
ProcessInfo pInfo;
//Pro... |
/*
* 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 ... |
package org.drools.analytics.result;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.Map;
import org.mvel.TemplateInterpreter;
abstract class ReportVisitor {
protected static String processHeader(String folder) {
Map<String, ... |
package org.ovirt.engine.api.restapi.resource;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import javax.ws.rs.WebApplicationException;
import org.junit.Test;
import org.ovirt.engine.api.model.Network... |
/*
* Javalin - https://javalin.io
* Copyright 2017 David Åse
* Licensed under Apache 2.0: https://github.com/tipsy/javalin/blob/master/LICENSE
*
*/
package io.javalin.performance;
import java.io.IOException;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Tes... |
/*
Write a class MathOperation which accepts 5 integers through command line. Create an array using these parameters. Loop through the array and obtain the sum and average of all the elements and display the result.
Various exceptions that may arise like ArithmeticException, NumberFormatException, and so on should be... |
package com;
public class CodedElement implements java.io.Serializable {
static final long serialVersionUID = 1L;
public String code = "";
public String displayName = "";
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getDisplayName() {
... |
/*
* Copyright 2014-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 "licen... |
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2018.02.... |
/*******************************************************************************
* Copyright 2018 Huawei Technologies Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License... |
package org.gwtproject.i18n.shared.cldr.impl;
import java.lang.Override;
import java.lang.String;
import javax.annotation.Generated;
import org.gwtproject.i18n.shared.cldr.DateTimeFormatInfo;
import org.gwtproject.i18n.shared.cldr.LocaleInfoImpl;
import org.gwtproject.i18n.shared.cldr.LocalizedNames;
import org.gwtpro... |
package com.wcohen.ss.api;
/**
* An iterator over StringWrapper objects.
*/
public interface StringWrapperIterator extends java.util.Iterator
{
public boolean hasNext();
public Object next();
public StringWrapper nextStringWrapper();
}
|
/*
* Copyright / Copr. 2010-2013 Atos - Public Sector France -
* BS & Innovation for the DataLift project,
* Contributor(s) : L. Bihanic, H. Devos, O. Ventura, M. Chetima
*
* Contact: dlfr-datalift@atos.net
*
* This software is governed by the CeCILL license under French law and
* abiding by the rules of distri... |
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance wi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.