blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 4
410
| content_id
stringlengths 40
40
| detected_licenses
sequencelengths 0
51
| license_type
stringclasses 2
values | repo_name
stringlengths 5
132
| snapshot_id
stringlengths 40
40
| revision_id
stringlengths 40
40
| branch_name
stringlengths 4
80
| visit_date
timestamp[us] | revision_date
timestamp[us] | committer_date
timestamp[us] | github_id
int64 5.85k
689M
⌀ | star_events_count
int64 0
209k
| fork_events_count
int64 0
110k
| gha_license_id
stringclasses 22
values | gha_event_created_at
timestamp[us] | gha_created_at
timestamp[us] | gha_language
stringclasses 131
values | src_encoding
stringclasses 34
values | language
stringclasses 1
value | is_vendor
bool 1
class | is_generated
bool 2
classes | length_bytes
int64 3
9.45M
| extension
stringclasses 32
values | content
stringlengths 3
9.45M
| authors
sequencelengths 1
1
| author_id
stringlengths 0
313
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0264162290455cfa22c0461103f652f7cec5bad9 | 5e224ff6d555ee74e0fda6dfa9a645fb7de60989 | /database/src/main/java/adila/db/asus5fx003_asus5fx003.java | bf5385aef31288671e7c18625d098998b6c93a3f | [
"MIT"
] | permissive | karim/adila | 8b0b6ba56d83f3f29f6354a2964377e6197761c4 | 00f262f6d5352b9d535ae54a2023e4a807449faa | refs/heads/master | 2021-01-18T22:52:51.508129 | 2016-11-13T13:08:04 | 2016-11-13T13:08:04 | 45,054,909 | 3 | 1 | null | null | null | null | UTF-8 | Java | false | false | 251 | java | // This file is automatically generated.
package adila.db;
/*
* Asus Zenfone Go (ASUS_X003)
*
* DEVICE: ASUS_X003
* MODEL: ASUS_X003
*/
final class asus5fx003_asus5fx003 {
public static final String DATA = "Asus|Zenfone Go (ASUS_X003)|";
}
| [
"[email protected]"
] | |
036e04f84537f1034327477ec5328a50fe4b1a07 | 3225dfb97fa31c91d421d8cb1ed65826e9d4e882 | /agent-manager/src/nss/delta/agentmanager/dummycon/HandshakeTimeoutException.java | d4644ff818f16f6f7420aa84ff9fa1c2510243f0 | [] | no_license | onfsdn/DELTA | 1cbac3c699c079de58e1739ee7b42d30d018db89 | 639e521be627961a3b35d6580a472a0008318a31 | refs/heads/master | 2020-12-25T12:08:26.062189 | 2016-07-03T11:52:16 | 2016-07-03T11:52:16 | 62,227,280 | 0 | 0 | null | 2016-06-29T13:18:37 | 2016-06-29T13:18:37 | null | UTF-8 | Java | false | false | 986 | java | /**
* Copyright 2011, Big Switch Networks, Inc.
* Originally created by David Erickson, Stanford University
*
* 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
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
**/
package nss.delta.agentmanager.dummycon;
/**
* Exception is thrown when the handshake fails to complete
* before a specified time
* @author readams
*/
public class HandshakeTimeoutException extends Exception {
private static final long serialVersionUID = 6859880268940337312L;
}
| [
"[email protected]"
] | |
0dc4c3f3ec9df2ce859bcd1b49a9c17699852121 | 1defede0e088a4d19b9e41795382fc9cb59fcf77 | /TargetOnServer/src/main/java/utils/db/dao/calendar/CalendarDAOImpl.java | 8dfb2e5fc0d6cec0d01c6cf5149447eeba458a9e | [] | no_license | StasQuasilin/ProjectManager | 8e370246e357ac0ad14a4387da9c7f17353d7850 | 098099223a734f9012e67a9cdf436edd52d36e2e | refs/heads/master | 2022-12-01T14:57:37.359056 | 2021-05-20T13:09:19 | 2021-05-20T13:09:19 | 172,085,162 | 0 | 0 | null | 2022-11-24T10:18:19 | 2019-02-22T15:01:44 | Java | UTF-8 | Java | false | false | 1,082 | java | package utils.db.dao.calendar;
import entity.calendar.CalendarItem;
import entity.user.User;
import utils.db.hibernate.Hibernator;
import java.sql.Date;
import java.util.HashMap;
import java.util.List;
import static constants.Keys.*;
public class CalendarDAOImpl implements CalendarDAO {
private final Hibernator hibernator = Hibernator.getInstance();
@Override
public List<CalendarItem> getCalendarItems(Date date, User user) {
final HashMap<String, Object> params = new HashMap<>();
params.put(OWNER, user);
params.put(DATE, date);
return hibernator.query(CalendarItem.class, params);
}
@Override
public CalendarItem getCalendarItem(Object id) {
return hibernator.get(CalendarItem.class, ID, id);
}
@Override
public void saveCalendarItem(CalendarItem item) {
hibernator.save(item.getHeader());
hibernator.save(item);
}
@Override
public CalendarItem getCalendarItemByCategory(Object header) {
return hibernator.get(CalendarItem.class, HEADER, header);
}
}
| [
"[email protected]"
] | |
d4bdeec60264612724249f1121b4fc6dbcf1cf98 | 444ac62d3f274b5592bf70b951962f05e98c7acb | /common/src/main/java/aspire/framework/repository/Repositories.java | 437dfa29de1f91c7169fc8ba7d960697601dbb0b | [] | no_license | AndyLvVip/aspire | bff52f0c05eb6ea411558cfbffb99443cfa2004a | 515275fa401a399a85651601ea51051089124af3 | refs/heads/master | 2020-03-11T15:29:59.859894 | 2018-04-22T04:54:10 | 2018-04-22T04:54:10 | 130,085,738 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 529 | java | package aspire.framework.repository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* @Author: andy.lv
* @Date: created on 2018/3/6
* @Description:
*/
@Component
public class Repositories {
private static BaseRepository baseRepository;
@Autowired
public void setBaseRepository(BaseRepository repository) {
baseRepository = repository;
}
public static BaseRepository baseRepository() {
return baseRepository;
}
}
| [
"[email protected]"
] | |
4af2df9702466ce11da62fac9c6bde153030fd26 | dcdf82e19d9c80ce24c6e9f9398e44fceb08defd | /Do_it_Java/polymorphism/src/polymorphism/CustomerTest2.java | b4d998f2ad577c2378d6c3c525720abdf9f65f8e | [] | no_license | jyj94/Learning_Java | cbb34b724a48c5dfc326eae5b3c915595a36cfbf | fd2b6442c789592ee636b7858edfc0c0c27ed581 | refs/heads/master | 2023-03-20T17:35:06.587735 | 2021-03-09T10:58:59 | 2021-03-09T10:58:59 | 339,427,035 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,212 | java | package polymorphism;
import java.util.ArrayList;
public class CustomerTest2 {
// public static void main(String[] args) {
// ArrayList<Customer> customerList = new ArrayList<Customer>();
//
// Customer customerLee = new Customer(10010, "Lee");
// Customer customerShin = new Customer(10020, "Shin");
// Customer customerHong = new GoldCustomer(10030, "Hong");
// Customer customerYoul = new GoldCustomer(10040, "Youl");
// Customer customerKim = new VIPCustomer(10050, "Kim", 12345);
//
// customerList.add(customerLee);
// customerList.add(customerShin);
// customerList.add(customerHong);
// customerList.add(customerYoul);
// customerList.add(customerKim);
//
// System.out.println("-----고객정보 출력-----");
// for (Customer customer : customerList) {
// System.out.println(customer.showCustomerInfo());
// }
// System.out.println("-----할인율과 보너스 포인트 계산-----");
// int price = 10000;
// for(Customer customer : customerList) {
// int cost = customer.calcPrice(price);
// System.out.println(customer.getCustomerName() + " paid " + cost);
// System.out.println(customer.getCustomerName() + "'s rest point is " + customer.bonusPoint);
// }
// }
}
| [
"[email protected]"
] | |
e6d0e690f405b25f20d1702c4f87e6dc6623d50b | b3d7d4f4e3dfa2238174702e706bff9473650489 | /app/src/main/java/com/epipasha/cashflow/activities/BindingsConverter.java | 83ddae5b96a4bca6c4ef764d61297c9663f71c88 | [] | no_license | EgorenkovPavel/CashFlow | 78e3f09ac99f6f6b51b34c8598a27b77752ef41d | fac10737f675f53d1243191edf66bdd79ecc9f38 | refs/heads/master | 2021-06-29T21:51:23.728349 | 2019-10-07T17:29:50 | 2019-10-07T17:29:50 | 101,317,688 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,020 | java | package com.epipasha.cashflow.activities;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import androidx.databinding.InverseMethod;
public class BindingsConverter {
@InverseMethod("convertIntToString")
public static int convertStringToInt(String value) {
if(value.isEmpty()) return 0;
try {
return Integer.parseInt(value);
} catch (NumberFormatException e) {
return -1;
}
}
public static String convertIntToString(int value) {
if(value == 0){
return "";
}
return String.valueOf(value);
}
public static String convertDateToString(Date date){
SimpleDateFormat format = new SimpleDateFormat("dd.MM.yyyy", Locale.getDefault());
return format.format(date);
}
public static String convertTimeToString(Date date){
SimpleDateFormat format = new SimpleDateFormat("HH:mm", Locale.getDefault());
return format.format(date);
}
}
| [
"[email protected]"
] | |
0737016f5335a3fd2db5076be7f0d07924c5fbda | bba1ec5be2d52e37438b973df471d37e93f05279 | /IVRMigration/src/com/ibm/ivr/eus/migration/ParserStub.java | 2d3ee9bebb1f6aba5e6ed12fd41b58bf71338f2b | [] | no_license | gmarrufo/IVR_Migration | ef05acf3047237e4a7cf820a731443a845f99744 | 06adaf00f97a8e2c6e32ea6121b96bca07fe14dc | refs/heads/master | 2021-08-14T15:24:11.633139 | 2017-11-16T03:48:08 | 2017-11-16T03:48:08 | 110,920,022 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 574 | java | package com.ibm.ivr.eus.migration;
/**
* Stub for the parser. Running Migration.java will generate IniFileParser.java
* using the cctool property in migration.properties
*
* @author Greg
*
*/
public class ParserStub {
public static final int LINEOUT = 15;
public static final int STATEMENT = 22;
public static final int IF = 5;
public static final int THEN=6;
public static final int CHOICE = 23;
public static final int SAY = 24;
public static final int ASSIGN = 21;
public static Object parse(Object tokens){return null;};
} | [
"[email protected]"
] | |
b3b48b81ed1b935bb5fd75fb9ffb511cb7a785a9 | 7a2dfd676b71d7a4e6c8ef84de48e57ab9b940f4 | /Faabricio_comercio/src/java/modelo/Marca.java | 27767b0b241be7c2b2b2e0d5d0952d4f8cd16ce7 | [] | no_license | FabricioQuintana/Fabricio_adm | a1a9854af4bb788fba7d5078c5961cefc1c4d7cd | 4813b1125a81048cef751a697de6ffc6caa4685b | refs/heads/master | 2021-01-22T14:15:31.016507 | 2016-09-15T12:06:06 | 2016-09-15T12:06:06 | 68,288,184 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,971 | 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 modelo;
import java.io.Serializable;
import java.util.Collection;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
/**
*
* @author aluno
*/
@Entity
@Table(name = "marca")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "Marca.findAll", query = "SELECT m FROM Marca m"),
@NamedQuery(name = "Marca.findByCodigo", query = "SELECT m FROM Marca m WHERE m.codigo = :codigo"),
@NamedQuery(name = "Marca.findByNome", query = "SELECT m FROM Marca m WHERE m.nome = :nome"),
@NamedQuery(name = "Marca.filtro", query = "Select m from Marca m where m.nome like :filtro")})
public class Marca implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
@Column(name = "codigo")
private Integer codigo;
@Column(name = "nome")
private String nome;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "codmarca")
private Collection<Produto> produtoCollection;
public Marca() {
}
public Marca(Integer codigo) {
this.codigo = codigo;
}
public Integer getCodigo() {
return codigo;
}
public void setCodigo(Integer codigo) {
this.codigo = codigo;
}
public String getNome() {
return nome;
}
public void setNome(String nome) {
this.nome = nome;
}
@XmlTransient
public Collection<Produto> getProdutoCollection() {
return produtoCollection;
}
public void setProdutoCollection(Collection<Produto> produtoCollection) {
this.produtoCollection = produtoCollection;
}
@Override
public int hashCode() {
int hash = 0;
hash += (codigo != null ? codigo.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof Marca)) {
return false;
}
Marca other = (Marca) object;
if ((this.codigo == null && other.codigo != null) || (this.codigo != null && !this.codigo.equals(other.codigo))) {
return false;
}
return true;
}
@Override
public String toString() {
return "modelo.Marca[ codigo=" + codigo + " ]";
}
}
| [
"91218751s"
] | 91218751s |
3e408a2276c8b97c9cb5a4b68a546a9971621bab | 656d04fd0cf1e6af1a1106625ea685db2759f8dd | /java/src/com/github/marcotabago/hl7mappingvalidator/grammar/HL7MappingValidatorBaseListener.java | 8c7dc847e37efc0290452a8ef5b8dd303e651e6a | [
"MIT"
] | permissive | marcotabago/hl7-mapping-validator | d2fcad0e96c0a812ccd5c6bdfe8a57005a975c9c | 26b55c6874ac8f4c794231e9d96de1ea5f38d971 | refs/heads/master | 2023-04-03T15:57:40.600889 | 2015-06-05T10:49:31 | 2015-06-05T10:49:44 | 36,542,061 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 42,452 | java | // Generated from HL7MappingValidator.g4 by ANTLR 4.4
package com.github.marcotabago.hl7mappingvalidator.grammar;
import org.antlr.v4.runtime.ParserRuleContext;
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.tree.ErrorNode;
import org.antlr.v4.runtime.tree.TerminalNode;
/**
* This class provides an empty implementation of {@link HL7MappingValidatorListener},
* which can be extended to create a listener which only needs to handle a subset
* of the available methods.
*/
public class HL7MappingValidatorBaseListener implements HL7MappingValidatorListener {
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterArrayLiteral(@NotNull HL7MappingValidatorParser.ArrayLiteralContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitArrayLiteral(@NotNull HL7MappingValidatorParser.ArrayLiteralContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterBitOrExpression(@NotNull HL7MappingValidatorParser.BitOrExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitBitOrExpression(@NotNull HL7MappingValidatorParser.BitOrExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterGetter(@NotNull HL7MappingValidatorParser.GetterContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitGetter(@NotNull HL7MappingValidatorParser.GetterContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterExpressionStatement(@NotNull HL7MappingValidatorParser.ExpressionStatementContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitExpressionStatement(@NotNull HL7MappingValidatorParser.ExpressionStatementContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterInstanceofExpression(@NotNull HL7MappingValidatorParser.InstanceofExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitInstanceofExpression(@NotNull HL7MappingValidatorParser.InstanceofExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterObjectLiteralExpression(@NotNull HL7MappingValidatorParser.ObjectLiteralExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitObjectLiteralExpression(@NotNull HL7MappingValidatorParser.ObjectLiteralExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterWhileStatement(@NotNull HL7MappingValidatorParser.WhileStatementContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitWhileStatement(@NotNull HL7MappingValidatorParser.WhileStatementContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterArrayLiteralExpression(@NotNull HL7MappingValidatorParser.ArrayLiteralExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitArrayLiteralExpression(@NotNull HL7MappingValidatorParser.ArrayLiteralExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterArgumentsExpression(@NotNull HL7MappingValidatorParser.ArgumentsExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitArgumentsExpression(@NotNull HL7MappingValidatorParser.ArgumentsExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterExpressionSequence(@NotNull HL7MappingValidatorParser.ExpressionSequenceContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitExpressionSequence(@NotNull HL7MappingValidatorParser.ExpressionSequenceContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterForStatement(@NotNull HL7MappingValidatorParser.ForStatementContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitForStatement(@NotNull HL7MappingValidatorParser.ForStatementContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterWithStatement(@NotNull HL7MappingValidatorParser.WithStatementContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitWithStatement(@NotNull HL7MappingValidatorParser.WithStatementContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterFunctionExpression(@NotNull HL7MappingValidatorParser.FunctionExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitFunctionExpression(@NotNull HL7MappingValidatorParser.FunctionExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterReservedWord(@NotNull HL7MappingValidatorParser.ReservedWordContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitReservedWord(@NotNull HL7MappingValidatorParser.ReservedWordContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterAssertConditionalRightHandSideExpression(@NotNull HL7MappingValidatorParser.AssertConditionalRightHandSideExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitAssertConditionalRightHandSideExpression(@NotNull HL7MappingValidatorParser.AssertConditionalRightHandSideExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterParenthesizedExpression(@NotNull HL7MappingValidatorParser.ParenthesizedExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitParenthesizedExpression(@NotNull HL7MappingValidatorParser.ParenthesizedExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterPropertyExpressionAssignment(@NotNull HL7MappingValidatorParser.PropertyExpressionAssignmentContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitPropertyExpressionAssignment(@NotNull HL7MappingValidatorParser.PropertyExpressionAssignmentContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterDefaultClause(@NotNull HL7MappingValidatorParser.DefaultClauseContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitDefaultClause(@NotNull HL7MappingValidatorParser.DefaultClauseContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterNewExpression(@NotNull HL7MappingValidatorParser.NewExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitNewExpression(@NotNull HL7MappingValidatorParser.NewExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterForVarInStatement(@NotNull HL7MappingValidatorParser.ForVarInStatementContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitForVarInStatement(@NotNull HL7MappingValidatorParser.ForVarInStatementContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterPostDecreaseExpression(@NotNull HL7MappingValidatorParser.PostDecreaseExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitPostDecreaseExpression(@NotNull HL7MappingValidatorParser.PostDecreaseExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterAssertionStatements(@NotNull HL7MappingValidatorParser.AssertionStatementsContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitAssertionStatements(@NotNull HL7MappingValidatorParser.AssertionStatementsContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterCaseBlock(@NotNull HL7MappingValidatorParser.CaseBlockContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitCaseBlock(@NotNull HL7MappingValidatorParser.CaseBlockContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterRelationalExpression(@NotNull HL7MappingValidatorParser.RelationalExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitRelationalExpression(@NotNull HL7MappingValidatorParser.RelationalExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterBreakStatement(@NotNull HL7MappingValidatorParser.BreakStatementContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitBreakStatement(@NotNull HL7MappingValidatorParser.BreakStatementContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterAdditiveExpression(@NotNull HL7MappingValidatorParser.AdditiveExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitAdditiveExpression(@NotNull HL7MappingValidatorParser.AdditiveExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterMultiplicativeExpression(@NotNull HL7MappingValidatorParser.MultiplicativeExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitMultiplicativeExpression(@NotNull HL7MappingValidatorParser.MultiplicativeExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterForInStatement(@NotNull HL7MappingValidatorParser.ForInStatementContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitForInStatement(@NotNull HL7MappingValidatorParser.ForInStatementContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterObjectLiteral(@NotNull HL7MappingValidatorParser.ObjectLiteralContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitObjectLiteral(@NotNull HL7MappingValidatorParser.ObjectLiteralContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterDoStatement(@NotNull HL7MappingValidatorParser.DoStatementContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitDoStatement(@NotNull HL7MappingValidatorParser.DoStatementContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterAssignmentExpression(@NotNull HL7MappingValidatorParser.AssignmentExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitAssignmentExpression(@NotNull HL7MappingValidatorParser.AssignmentExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterVariableStatement(@NotNull HL7MappingValidatorParser.VariableStatementContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitVariableStatement(@NotNull HL7MappingValidatorParser.VariableStatementContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterPropertyNameAndValueList(@NotNull HL7MappingValidatorParser.PropertyNameAndValueListContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitPropertyNameAndValueList(@NotNull HL7MappingValidatorParser.PropertyNameAndValueListContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterBlock(@NotNull HL7MappingValidatorParser.BlockContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitBlock(@NotNull HL7MappingValidatorParser.BlockContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterNotExpression(@NotNull HL7MappingValidatorParser.NotExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitNotExpression(@NotNull HL7MappingValidatorParser.NotExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterAssertTrueStatement(@NotNull HL7MappingValidatorParser.AssertTrueStatementContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitAssertTrueStatement(@NotNull HL7MappingValidatorParser.AssertTrueStatementContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterSetter(@NotNull HL7MappingValidatorParser.SetterContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitSetter(@NotNull HL7MappingValidatorParser.SetterContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterUnaryMinusExpression(@NotNull HL7MappingValidatorParser.UnaryMinusExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitUnaryMinusExpression(@NotNull HL7MappingValidatorParser.UnaryMinusExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterNumericLiteral(@NotNull HL7MappingValidatorParser.NumericLiteralContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitNumericLiteral(@NotNull HL7MappingValidatorParser.NumericLiteralContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterFormalParameterList(@NotNull HL7MappingValidatorParser.FormalParameterListContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitFormalParameterList(@NotNull HL7MappingValidatorParser.FormalParameterListContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterVoidExpression(@NotNull HL7MappingValidatorParser.VoidExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitVoidExpression(@NotNull HL7MappingValidatorParser.VoidExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterLiteralExpression(@NotNull HL7MappingValidatorParser.LiteralExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitLiteralExpression(@NotNull HL7MappingValidatorParser.LiteralExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterBitNotExpression(@NotNull HL7MappingValidatorParser.BitNotExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitBitNotExpression(@NotNull HL7MappingValidatorParser.BitNotExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterTypeofExpression(@NotNull HL7MappingValidatorParser.TypeofExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitTypeofExpression(@NotNull HL7MappingValidatorParser.TypeofExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterAssignmentOperatorExpression(@NotNull HL7MappingValidatorParser.AssignmentOperatorExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitAssignmentOperatorExpression(@NotNull HL7MappingValidatorParser.AssignmentOperatorExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterSwitchStatement(@NotNull HL7MappingValidatorParser.SwitchStatementContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitSwitchStatement(@NotNull HL7MappingValidatorParser.SwitchStatementContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterArguments(@NotNull HL7MappingValidatorParser.ArgumentsContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitArguments(@NotNull HL7MappingValidatorParser.ArgumentsContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterVariableDeclarationList(@NotNull HL7MappingValidatorParser.VariableDeclarationListContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitVariableDeclarationList(@NotNull HL7MappingValidatorParser.VariableDeclarationListContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterEqualityExpression(@NotNull HL7MappingValidatorParser.EqualityExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitEqualityExpression(@NotNull HL7MappingValidatorParser.EqualityExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterBitXOrExpression(@NotNull HL7MappingValidatorParser.BitXOrExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitBitXOrExpression(@NotNull HL7MappingValidatorParser.BitXOrExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterEof(@NotNull HL7MappingValidatorParser.EofContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitEof(@NotNull HL7MappingValidatorParser.EofContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterFunctionDeclaration(@NotNull HL7MappingValidatorParser.FunctionDeclarationContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitFunctionDeclaration(@NotNull HL7MappingValidatorParser.FunctionDeclarationContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterThrowStatement(@NotNull HL7MappingValidatorParser.ThrowStatementContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitThrowStatement(@NotNull HL7MappingValidatorParser.ThrowStatementContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterAssertionExpression(@NotNull HL7MappingValidatorParser.AssertionExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitAssertionExpression(@NotNull HL7MappingValidatorParser.AssertionExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterAssertConditionalStatement(@NotNull HL7MappingValidatorParser.AssertConditionalStatementContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitAssertConditionalStatement(@NotNull HL7MappingValidatorParser.AssertConditionalStatementContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterThisExpression(@NotNull HL7MappingValidatorParser.ThisExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitThisExpression(@NotNull HL7MappingValidatorParser.ThisExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterSourceElements(@NotNull HL7MappingValidatorParser.SourceElementsContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitSourceElements(@NotNull HL7MappingValidatorParser.SourceElementsContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterReturnStatement(@NotNull HL7MappingValidatorParser.ReturnStatementContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitReturnStatement(@NotNull HL7MappingValidatorParser.ReturnStatementContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterPreDecreaseExpression(@NotNull HL7MappingValidatorParser.PreDecreaseExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitPreDecreaseExpression(@NotNull HL7MappingValidatorParser.PreDecreaseExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterInExpression(@NotNull HL7MappingValidatorParser.InExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitInExpression(@NotNull HL7MappingValidatorParser.InExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterVariableDeclaration(@NotNull HL7MappingValidatorParser.VariableDeclarationContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitVariableDeclaration(@NotNull HL7MappingValidatorParser.VariableDeclarationContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterEos(@NotNull HL7MappingValidatorParser.EosContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitEos(@NotNull HL7MappingValidatorParser.EosContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterMemberDotExpression(@NotNull HL7MappingValidatorParser.MemberDotExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitMemberDotExpression(@NotNull HL7MappingValidatorParser.MemberDotExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterDeleteExpression(@NotNull HL7MappingValidatorParser.DeleteExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitDeleteExpression(@NotNull HL7MappingValidatorParser.DeleteExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterCaseClauses(@NotNull HL7MappingValidatorParser.CaseClausesContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitCaseClauses(@NotNull HL7MappingValidatorParser.CaseClausesContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterAssertionStatement(@NotNull HL7MappingValidatorParser.AssertionStatementContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitAssertionStatement(@NotNull HL7MappingValidatorParser.AssertionStatementContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterPreIncrementExpression(@NotNull HL7MappingValidatorParser.PreIncrementExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitPreIncrementExpression(@NotNull HL7MappingValidatorParser.PreIncrementExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterLabelledStatement(@NotNull HL7MappingValidatorParser.LabelledStatementContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitLabelledStatement(@NotNull HL7MappingValidatorParser.LabelledStatementContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterPropertyName(@NotNull HL7MappingValidatorParser.PropertyNameContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitPropertyName(@NotNull HL7MappingValidatorParser.PropertyNameContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterBitShiftExpression(@NotNull HL7MappingValidatorParser.BitShiftExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitBitShiftExpression(@NotNull HL7MappingValidatorParser.BitShiftExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterLogicalOrExpression(@NotNull HL7MappingValidatorParser.LogicalOrExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitLogicalOrExpression(@NotNull HL7MappingValidatorParser.LogicalOrExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterAssertionOperator(@NotNull HL7MappingValidatorParser.AssertionOperatorContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitAssertionOperator(@NotNull HL7MappingValidatorParser.AssertionOperatorContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterDebuggerStatement(@NotNull HL7MappingValidatorParser.DebuggerStatementContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitDebuggerStatement(@NotNull HL7MappingValidatorParser.DebuggerStatementContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterPostIncrementExpression(@NotNull HL7MappingValidatorParser.PostIncrementExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitPostIncrementExpression(@NotNull HL7MappingValidatorParser.PostIncrementExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterEmptyStatement(@NotNull HL7MappingValidatorParser.EmptyStatementContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitEmptyStatement(@NotNull HL7MappingValidatorParser.EmptyStatementContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterStatementList(@NotNull HL7MappingValidatorParser.StatementListContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitStatementList(@NotNull HL7MappingValidatorParser.StatementListContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterStatement(@NotNull HL7MappingValidatorParser.StatementContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitStatement(@NotNull HL7MappingValidatorParser.StatementContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterPropertyGetter(@NotNull HL7MappingValidatorParser.PropertyGetterContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitPropertyGetter(@NotNull HL7MappingValidatorParser.PropertyGetterContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterProgram(@NotNull HL7MappingValidatorParser.ProgramContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitProgram(@NotNull HL7MappingValidatorParser.ProgramContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterElision(@NotNull HL7MappingValidatorParser.ElisionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitElision(@NotNull HL7MappingValidatorParser.ElisionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterCaseClause(@NotNull HL7MappingValidatorParser.CaseClauseContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitCaseClause(@NotNull HL7MappingValidatorParser.CaseClauseContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterForVarStatement(@NotNull HL7MappingValidatorParser.ForVarStatementContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitForVarStatement(@NotNull HL7MappingValidatorParser.ForVarStatementContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterAssignmentOperator(@NotNull HL7MappingValidatorParser.AssignmentOperatorContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitAssignmentOperator(@NotNull HL7MappingValidatorParser.AssignmentOperatorContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterTernaryExpression(@NotNull HL7MappingValidatorParser.TernaryExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitTernaryExpression(@NotNull HL7MappingValidatorParser.TernaryExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterLogicalAndExpression(@NotNull HL7MappingValidatorParser.LogicalAndExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitLogicalAndExpression(@NotNull HL7MappingValidatorParser.LogicalAndExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterPropertySetParameterList(@NotNull HL7MappingValidatorParser.PropertySetParameterListContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitPropertySetParameterList(@NotNull HL7MappingValidatorParser.PropertySetParameterListContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterPropertySetter(@NotNull HL7MappingValidatorParser.PropertySetterContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitPropertySetter(@NotNull HL7MappingValidatorParser.PropertySetterContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterElementList(@NotNull HL7MappingValidatorParser.ElementListContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitElementList(@NotNull HL7MappingValidatorParser.ElementListContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterTryStatement(@NotNull HL7MappingValidatorParser.TryStatementContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitTryStatement(@NotNull HL7MappingValidatorParser.TryStatementContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterIdentifierExpression(@NotNull HL7MappingValidatorParser.IdentifierExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitIdentifierExpression(@NotNull HL7MappingValidatorParser.IdentifierExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterIdentifierName(@NotNull HL7MappingValidatorParser.IdentifierNameContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitIdentifierName(@NotNull HL7MappingValidatorParser.IdentifierNameContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterBitAndExpression(@NotNull HL7MappingValidatorParser.BitAndExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitBitAndExpression(@NotNull HL7MappingValidatorParser.BitAndExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterFinallyProduction(@NotNull HL7MappingValidatorParser.FinallyProductionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitFinallyProduction(@NotNull HL7MappingValidatorParser.FinallyProductionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterFutureReservedWord(@NotNull HL7MappingValidatorParser.FutureReservedWordContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitFutureReservedWord(@NotNull HL7MappingValidatorParser.FutureReservedWordContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterKeyword(@NotNull HL7MappingValidatorParser.KeywordContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitKeyword(@NotNull HL7MappingValidatorParser.KeywordContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterUnaryPlusExpression(@NotNull HL7MappingValidatorParser.UnaryPlusExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitUnaryPlusExpression(@NotNull HL7MappingValidatorParser.UnaryPlusExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterFunctionBody(@NotNull HL7MappingValidatorParser.FunctionBodyContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitFunctionBody(@NotNull HL7MappingValidatorParser.FunctionBodyContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterContinueStatement(@NotNull HL7MappingValidatorParser.ContinueStatementContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitContinueStatement(@NotNull HL7MappingValidatorParser.ContinueStatementContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterArgumentList(@NotNull HL7MappingValidatorParser.ArgumentListContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitArgumentList(@NotNull HL7MappingValidatorParser.ArgumentListContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterIfStatement(@NotNull HL7MappingValidatorParser.IfStatementContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitIfStatement(@NotNull HL7MappingValidatorParser.IfStatementContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterInitialiser(@NotNull HL7MappingValidatorParser.InitialiserContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitInitialiser(@NotNull HL7MappingValidatorParser.InitialiserContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterSourceElement(@NotNull HL7MappingValidatorParser.SourceElementContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitSourceElement(@NotNull HL7MappingValidatorParser.SourceElementContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterCatchProduction(@NotNull HL7MappingValidatorParser.CatchProductionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitCatchProduction(@NotNull HL7MappingValidatorParser.CatchProductionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterMemberIndexExpression(@NotNull HL7MappingValidatorParser.MemberIndexExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitMemberIndexExpression(@NotNull HL7MappingValidatorParser.MemberIndexExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterLiteral(@NotNull HL7MappingValidatorParser.LiteralContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitLiteral(@NotNull HL7MappingValidatorParser.LiteralContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterEveryRule(@NotNull ParserRuleContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitEveryRule(@NotNull ParserRuleContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void visitTerminal(@NotNull TerminalNode node) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void visitErrorNode(@NotNull ErrorNode node) { }
} | [
"[email protected]"
] | |
89aad47251f9cbd2b537048ba7540758972b788f | bd09b4a42e340f6313196941a24f9ce22b1a36e5 | /src/main/java/kaptainwutax/seedcracker/mixin/ClientWorldMixin.java | f4381f630e7322db769451798264ce9f8ddcb73b | [
"MIT"
] | permissive | ayyybe/SeedCracker | 6d0273d571d334d7b938d2ab1a45d368134b58b4 | a2ed96f064e8bfe3261596ed26caac3646a8d63b | refs/heads/master | 2022-11-11T07:27:15.622969 | 2020-06-30T16:47:45 | 2020-06-30T16:47:45 | 275,295,272 | 1 | 2 | MIT | 2020-06-27T03:53:41 | 2020-06-27T03:53:40 | null | UTF-8 | Java | false | false | 1,004 | java | package kaptainwutax.seedcracker.mixin;
import kaptainwutax.seedcracker.SeedCracker;
import kaptainwutax.seedcracker.finder.FinderQueue;
import net.minecraft.client.world.ClientWorld;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.biome.Biomes;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
@Mixin(ClientWorld.class)
public abstract class ClientWorldMixin {
@Inject(method = "disconnect", at = @At("HEAD"))
private void disconnect(CallbackInfo ci) {
SeedCracker.get().reset();
}
@Inject(method = "getGeneratorStoredBiome", at = @At("HEAD"), cancellable = true)
private void getGeneratorStoredBiome(int x, int y, int z, CallbackInfoReturnable<Biome> ci) {
ci.setReturnValue(Biomes.THE_VOID);
}
}
| [
"[email protected]"
] | |
e3a6e0ba1dae1a610f9ef06ac6a1e756d6eb414d | ef342447af9aa1bb37932cdf7a33b715bff90c46 | /src/com/company/Main.java | 11f9b3b9f4934ea14c0cbf32476538a838cf06df | [] | no_license | aleks27/Project1 | eca20f81d331f9b85c7a8d0b34afa4eca7dd5a01 | 7743ba32b006c5b90d128c94bdef6a46b0db1f5f | refs/heads/master | 2021-01-13T14:10:58.756048 | 2016-12-11T11:29:17 | 2016-12-11T11:29:17 | 76,170,129 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 234 | java | package com.company;
import java.io.IOException;
public class Main {
public static void main(String[] args) throws IOException {
int read = System.in.read();
System.out.println("read =" + (char) read);
}
}
| [
"[email protected]"
] | |
7611b7f49fdc9583eda4ebac7052d62e1d6255a0 | 12a5534703c088ec053ed0f8b8b5cff93dcc8a66 | /src/main/java/projekat/tiac/controller/OcenaController.java | 68469690cd7d04c0209c5ca187b00b8da35732a0 | [] | no_license | sukis1995/tiacProjekat | 12f38a0d186a709ff17402c48867a223539ea6b1 | 4548ae1ada1532ec320fbdd66dbca96a54f5c142 | refs/heads/master | 2023-01-24T00:01:53.410555 | 2020-11-18T17:00:37 | 2020-11-18T17:00:37 | 313,988,495 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,861 | java | package projekat.tiac.controller;
import java.security.Principal;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import projekat.tiac.dto.OcenaDTO;
import projekat.tiac.model.Korisnik;
import projekat.tiac.model.Ocena;
import projekat.tiac.service.KorisnikService;
import projekat.tiac.service.OcenaService;
import projekat.tiac.support.OcenaDTOToOcena;
import projekat.tiac.support.OcenaToOcenaDTO;
@Controller
@RequestMapping("/api/ocene")
public class OcenaController {
@Autowired
private OcenaService ocenaService;
@Autowired
private OcenaToOcenaDTO toDto;
@Autowired
private OcenaDTOToOcena toOcena;
@Autowired
private KorisnikService korisnikService;
@RequestMapping(method = RequestMethod.POST, value = "/{idPost}")
public ResponseEntity<OcenaDTO> save (@PathVariable("idPost") Long idPost,@RequestBody OcenaDTO dto, Principal principal){
Ocena ocena = toOcena.convert(dto);
Korisnik korisnik= korisnikService.findByUsername(principal.getName());
if(ocena == null ) {
return new ResponseEntity<>(HttpStatus.BAD_REQUEST);
}
for (Ocena o : korisnik.getOcene()) {
if(o.getPost().equals(ocena.getPost())) {
return new ResponseEntity<>(HttpStatus.BAD_REQUEST);
}
}
ocena.setKorisnik(korisnik);
Ocena saved = ocenaService.save(idPost,ocena);
if(saved == null ) {
return new ResponseEntity<>(HttpStatus.BAD_REQUEST);
}
return new ResponseEntity<OcenaDTO>(toDto.convert( saved), HttpStatus.CREATED);
}
}
| [
"[email protected]"
] | |
8b133740a58c64579f903519ff59d2ce98bd08b4 | 7ca7adb189dae329a91cebafb304abba5fc41be9 | /src/FactUsingRecursion.java | 042afd724b8f30a4107a0531a0522d4da8583bde | [] | no_license | amitpawar832ap/skylark | 066f8cf847c25e1feb6e4a5f08ef4a0aa03ca1a6 | 1e9fdf8724f0dd6e3cd4493a0519d7d56a207d15 | refs/heads/master | 2020-03-10T21:04:56.846509 | 2018-04-15T10:29:58 | 2018-04-15T10:29:58 | 129,584,753 | 0 | 0 | null | 2018-04-15T10:29:59 | 2018-04-15T06:51:00 | Java | UTF-8 | Java | false | false | 411 | java |
class Test1{
static int fact = 1;
//int num = 4;
public static void factorial(int num) {
if(num>0) {
fact *= num;
factorial(num-1);
}
}
//fgede
}
public class FactUsingRecursion {
public static void main(String[] args) {
// TODO Auto-generated method stub
Test1.factorial(4);
System.out.println(Test1.fact);
System.out.println(Test1.fact);
}
}
| [
"sky@sky-PC"
] | sky@sky-PC |
f704a5efa428aaca25ef109e31de83a4fcd57616 | 11de1d04eb856c944514a5f2af8b12aeacaa758c | /src/main/java/br/com/postalisonline/identitymanager/bean/RequestToken.java | 1165eef90e5849c22df979dc4725c994137548ee | [] | no_license | t1000df/jwt-token | c11d7d6b72d070366bcab381a6f4d3cad9aa7a22 | 50cbff507be8a4ca220c56f9d1468f3dcb1f1f95 | refs/heads/feature/jwt | 2022-12-22T01:23:23.470631 | 2019-06-04T18:20:40 | 2019-06-04T18:20:40 | 186,434,365 | 0 | 0 | null | 2022-12-16T00:05:16 | 2019-05-13T14:18:54 | Java | UTF-8 | Java | false | false | 901 | java | package br.com.postalisonline.identitymanager.bean;
import java.util.Map;
/**
*
* @author [email protected]
*
*/
public class RequestToken {
private String user;
private String email;
private String password;
private String[] scope;
private Map<String,Object> claims;
public String getUser() {
return user;
}
public void setUser(String user) {
this.user = user;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String[] getScope() {
return scope;
}
public void setScope(String[] scope) {
this.scope = scope;
}
public Map<String,Object> getClaims() {
return claims;
}
public void setClaims(Map<String,Object> claims) {
this.claims = claims;
}
}
| [
"[email protected]"
] | |
d7d07cc57b1172d9883017d634903ea43905f086 | 67d91e8c7caff178e0f903b03853ae786b2bcdaf | /wordcount/WordCountMapper.java | 3b5c6887183d2c5b56ac6132a5255373c016a449 | [] | no_license | batistebatiste/bigdataplatforms | 242c39b512085600122efb07301b33f549c432f1 | 89f51457c4b4ecea8e83e0fbabb2391d62923659 | refs/heads/master | 2021-01-23T14:13:37.712994 | 2017-08-23T13:31:28 | 2017-08-23T13:31:28 | 93,247,909 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,292 | java | package ecp.Lab1.WordCount;
import java.io.IOException;
import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;
import org.apache.hadoop.mapreduce.Mapper.Context;
/*
public class WordCountMapper extends Mapper<LongWritable, Text, Text, LongWritable> {
// Écriture de la fonction map
@Override
protected void map(LongWritable key, Text value, Context context) throws IOException,InterruptedException
{
//read file line by line
String line = value.toString();
//split line into words
String[] words = line.split(" ");
//assign count(1) to each word
for (String word : words){
context.write(new Text(word), new LongWritable(1));
}
}
}
*/
public class WordCountMapper extends Mapper<LongWritable, Text, Text, IntWritable> {
private final static IntWritable ONE = new IntWritable(1);
private Text word = new Text();
@Override
public void map(LongWritable key, Text value, Context context)
throws IOException, InterruptedException {
for (String token: value.toString().split("\\s+")) {
word.set(token);
context.write(word, ONE);
}
}
}
| [
"[email protected]"
] | |
86dc555acd420e86ebf67e2b855c615db88075c6 | fb2f4c274c5b7cbc30d557e1990e909979d2460c | /XingBoTV/XingBoLive/src/main/java/com/xingbo/live/ui/Guide.java | 4229872ec0da8fd79d21a0db232b6ed4cf516a48 | [] | no_license | liqiangwaini/shenniaozixun | 717b2bb4859662bb5189a9e1bc7d249e57bc4dad | 853308e65f1de904f7dc77bcc1623346f46dc5fc | refs/heads/master | 2021-01-18T16:49:09.124161 | 2017-08-25T08:29:16 | 2017-08-25T08:29:16 | 100,468,569 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,843 | java | package com.xingbo.live.ui;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.os.Bundle;
import android.os.Message;
import android.support.annotation.Nullable;
import android.support.v4.view.ViewPager;
import android.telephony.TelephonyManager;
import android.util.Log;
import com.xingbobase.config.XingBo;
import com.xingbo.live.R;
import com.xingbo.live.adapter.GuideViewPagerAdapter;
import com.xingbo.live.broadcast.InternetStateBroadcast;
import com.xingbo.live.util.CommonUtil;
import com.xingbobase.util.XingBoUtil;
/**
* Created by WuJinZhou on 2016/2/28.
*/
public class Guide extends BaseAct implements ViewPager.OnPageChangeListener {
public final static String TAG = "Guide";
private ViewPager guideGroup;
private GuideViewPagerAdapter mAdapter;
private SharedPreferences sp;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.guide);
initApp();
initView();
}
public void initView() {
guideGroup = (ViewPager) findViewById(R.id.guide_view_pager);
mAdapter = new GuideViewPagerAdapter(Guide.this, this);
guideGroup.addOnPageChangeListener(this);
guideGroup.setAdapter(mAdapter);
}
/**
* 初始化应用
*/
public void initApp() {
sp = getSharedPreferences(XingBo.PX_CONFIG_CACHE_FILE, Context.MODE_PRIVATE);
//检测当前网络类型
//checkNetType();
checkInternet();
if (sp.getBoolean(XingBo.PX_CONFIG_CACHE_IS_FIRST_RUN, true)) {
TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
String deviceId = tm.getDeviceId();
XingBoUtil.log(TAG, "deviceId:" + deviceId);
SharedPreferences.Editor editor = sp.edit();
editor.putString(XingBo.PX_CONFIG_CACHE_DEVICE_ID, deviceId == null || deviceId.equals("") ? "badId" : deviceId);
editor.putString(XingBo.PX_CONFIG_CACHE_DEVICE_MODEL, android.os.Build.MODEL);
editor.putBoolean(XingBo.PX_CONFIG_CACHE_IS_FIRST_RUN, false);
editor.commit();
}
}
/**
* 检测网络连接状态
*/
private void checkInternet() {
NetworkInfo.State wifiState = null;
NetworkInfo.State mobileState = null;
ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
if(cm==null){
return;
}
wifiState = cm.getNetworkInfo(ConnectivityManager.TYPE_WIFI).getState();
mobileState = cm.getNetworkInfo(ConnectivityManager.TYPE_MOBILE).getState();
if (wifiState != null && mobileState != null && NetworkInfo.State.CONNECTED != wifiState && NetworkInfo.State.CONNECTED == mobileState) {
//Toast.makeText(context, "手机网络连接成功!", Toast.LENGTH_SHORT).show();
sp.edit().putString(XingBo.PX_CONFIG_CACHE_NET_WORK, InternetStateBroadcast.NET_MOBILE).commit();
CommonUtil.log(TAG, "当前是手机网络");
} else if (wifiState != null && mobileState != null && NetworkInfo.State.CONNECTED == wifiState && NetworkInfo.State.CONNECTED != mobileState) {
//Toast.makeText(context, "无线网络连接成功!", Toast.LENGTH_SHORT).show();
CommonUtil.log(TAG, "当前是无线wifi网络");
sp.edit().putString(XingBo.PX_CONFIG_CACHE_NET_WORK, InternetStateBroadcast.NET_WIFI).commit();
} else if (wifiState != null && mobileState != null && NetworkInfo.State.CONNECTED != wifiState && NetworkInfo.State.CONNECTED != mobileState) {
//Toast.makeText(context, "手机没有任何网络...", Toast.LENGTH_SHORT).show();
CommonUtil.log(TAG, "当前没有任何网络");
sp.edit().putString(XingBo.PX_CONFIG_CACHE_NET_WORK, InternetStateBroadcast.NET_NO).commit();
}
}
@Override
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
// if (position == 3 &&positionOffset>0.1) {
// handler.sendEmptyMessageDelayed(GUIDE_FINISHED, 1000);
// Intent loginIntent = new Intent(this, LoginAct.class);
// startActivity(loginIntent);
// }
}
private static final int GUIDE_FINISHED = 0x01; //关闭引导页
@Override
public void handleMsg(Message message) {
if (message.what == GUIDE_FINISHED) {
finish();
}
}
@Override
public void onPageSelected(int position) {
}
@Override
public void onPageScrollStateChanged(int state) {
Log.e(TAG,state+"");
}
}
| [
"[email protected]"
] | |
bd622049e31cb456072e8a8a20f3623004646655 | ba726f423dbd5f5258640971c53a6168a5ff8473 | /simpleshop-data/src/main/java/simpleshop/data/CustomerDAO.java | d2fe865c2b15ebf7372f938cb40c9f13c72e17ab | [] | no_license | zhy2002/simpleshop | 46bb4e9ebff365424c1cba9ec2cbd320ba270b58 | 13f717d8e6e77d4ed54fd8229b7b0e53d63f2153 | refs/heads/master | 2020-07-04T04:21:18.782081 | 2015-12-09T11:25:15 | 2015-12-09T11:25:15 | 35,929,780 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 233 | java | package simpleshop.data;
import simpleshop.data.infrastructure.ModelDAO;
import simpleshop.domain.model.Customer;
/**
* Put Customer specific data operations here.
*/
public interface CustomerDAO extends ModelDAO<Customer> {
}
| [
"[email protected]"
] | |
697a79bb89d1e19c12e465baef76bfd4d49b08fc | b97a9d99fbf4066469e64592065d6a62970d9833 | /ares-apps/src/com/aw/rest/AbstractResourceConfig.java | 0579cd9f08d4996e33bbcefeba9ca207d63a0985 | [] | no_license | analyticswarescott/ares | 2bacb8eaac612e36836f7138c4398b6560468a91 | 5ac8d4ed50ca749b52eafc6fe95593ff68b85b54 | refs/heads/master | 2020-05-29T16:08:56.917029 | 2016-11-11T21:11:02 | 2016-11-11T21:11:02 | 59,563,723 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,909 | java | package com.aw.rest;
import org.glassfish.hk2.utilities.Binder;
import org.glassfish.jersey.media.multipart.MultiPartFeature;
import org.glassfish.jersey.server.ResourceConfig;
import com.aw.common.system.EnvironmentSettings;
import com.aw.common.system.EnvironmentSettings.Setting;
import com.aw.util.Statics;
import io.swagger.jaxrs.config.BeanConfig;
/**
* Base resource config for DG resources
*
*
*
*/
public abstract class AbstractResourceConfig extends ResourceConfig {
public AbstractResourceConfig() throws Exception {
//set up swagger
/* BeanConfig beanConfig = new BeanConfig();
beanConfig.setVersion(Statics.REST_VERSION);
beanConfig.setSchemes(Statics.SCHEMES);
beanConfig.setHost(EnvironmentSettings.getHost());
beanConfig.setBasePath(getBasePath());
beanConfig.setResourcePackage(getSwaggerResourcePackage());
beanConfig.setScan(true);*/
// System.out.println("$$$$$$$$$$$$$+++++++++++++++++++----------->> init abstract RC" );
registerBindings();
}
protected void registerBindings() throws Exception {
//check for custom di bindings
String strDiCls = EnvironmentSettings.fetch(Setting.DEPENDENCY_INJECTOR);
//System.out.println(" ################### DEPENDENCY INJECTOR is " + strDiCls );
Object bindings = null;
if (strDiCls != null) {
bindings = Class.forName(strDiCls).newInstance();
}
else {
bindings = getDefaultBindings();
}
//bind our custom DI providers
register(bindings);
register(MultiPartFeature.class);
//register(new LoggingFilter(Logger.getLogger("test"), true));
}
/**
* @return swagger documented resource package(s)
*/
protected abstract String getSwaggerResourcePackage();
/**
* @return default dependency injection bindings if environment override has not been set
*/
protected abstract Binder getDefaultBindings();
protected abstract String getBasePath();
}
| [
"[email protected]"
] | |
d6b8b0fff59bb6a1f9c3323dce6cae3506bdc7d9 | 52c36ce3a9d25073bdbe002757f08a267abb91c6 | /src/main/java/com/alipay/api/domain/ShopRec.java | c0c8f04641c35bc7820b7ce9e0218eae7fff0fab | [
"Apache-2.0"
] | permissive | itc7/alipay-sdk-java-all | d2f2f2403f3c9c7122baa9e438ebd2932935afec | c220e02cbcdda5180b76d9da129147e5b38dcf17 | refs/heads/master | 2022-08-28T08:03:08.497774 | 2020-05-27T10:16:10 | 2020-05-27T10:16:10 | 267,271,062 | 0 | 0 | Apache-2.0 | 2020-05-27T09:02:04 | 2020-05-27T09:02:04 | null | UTF-8 | Java | false | false | 5,637 | java | package com.alipay.api.domain;
import java.util.List;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.internal.mapping.ApiListField;
/**
* 商铺基础数据结构
*
* @author auto create
* @since 1.0, 2017-08-15 19:53:06
*/
public class ShopRec extends AlipayObject {
private static final long serialVersionUID = 8114881732543115717L;
/**
* 店铺地址
*/
@ApiField("address")
private String address;
/**
* 品牌名称
*/
@ApiField("brand_name")
private String brandName;
/**
* 商圈
*/
@ApiField("busi_area")
private String busiArea;
/**
* 城市id
*/
@ApiField("city_id")
private String cityId;
/**
* 菜系
*/
@ApiField("cuisine")
private String cuisine;
/**
* 距离
*/
@ApiField("distance")
private String distance;
/**
* 扩展信息
*/
@ApiField("ext_info")
private String extInfo;
/**
* 是否有优惠
*/
@ApiField("has_hui")
private String hasHui;
/**
* 店铺名称
*/
@ApiField("head_shop_name")
private String headShopName;
/**
* 纬度
*/
@ApiField("latitude")
private String latitude;
/**
* 经度
*/
@ApiField("longitude")
private String longitude;
/**
* 人气分
*/
@ApiField("popularity")
private String popularity;
/**
* 人气等级
*/
@ApiField("popularity_level")
private String popularityLevel;
/**
* 人均消费
*/
@ApiField("price_average")
private String priceAverage;
/**
* 前台一级类目列表
*/
@ApiField("root_display_category_info")
private String rootDisplayCategoryInfo;
/**
* 店铺跳转链接
*/
@ApiField("shop_detail_url")
private String shopDetailUrl;
/**
* 店铺id
*/
@ApiField("shop_id")
private String shopId;
/**
* 店铺logo图
*/
@ApiField("shop_logo_url")
private String shopLogoUrl;
/**
* 店铺详细名称
*/
@ApiField("shop_name")
private String shopName;
/**
* 推荐语
*/
@ApiField("shop_recommend_one_tag_compose")
private String shopRecommendOneTagCompose;
/**
* 推荐店铺的券
*/
@ApiListField("voucher_list")
@ApiField("voucher_rec")
private List<VoucherRec> voucherList;
public String getAddress() {
return this.address;
}
public void setAddress(String address) {
this.address = address;
}
public String getBrandName() {
return this.brandName;
}
public void setBrandName(String brandName) {
this.brandName = brandName;
}
public String getBusiArea() {
return this.busiArea;
}
public void setBusiArea(String busiArea) {
this.busiArea = busiArea;
}
public String getCityId() {
return this.cityId;
}
public void setCityId(String cityId) {
this.cityId = cityId;
}
public String getCuisine() {
return this.cuisine;
}
public void setCuisine(String cuisine) {
this.cuisine = cuisine;
}
public String getDistance() {
return this.distance;
}
public void setDistance(String distance) {
this.distance = distance;
}
public String getExtInfo() {
return this.extInfo;
}
public void setExtInfo(String extInfo) {
this.extInfo = extInfo;
}
public String getHasHui() {
return this.hasHui;
}
public void setHasHui(String hasHui) {
this.hasHui = hasHui;
}
public String getHeadShopName() {
return this.headShopName;
}
public void setHeadShopName(String headShopName) {
this.headShopName = headShopName;
}
public String getLatitude() {
return this.latitude;
}
public void setLatitude(String latitude) {
this.latitude = latitude;
}
public String getLongitude() {
return this.longitude;
}
public void setLongitude(String longitude) {
this.longitude = longitude;
}
public String getPopularity() {
return this.popularity;
}
public void setPopularity(String popularity) {
this.popularity = popularity;
}
public String getPopularityLevel() {
return this.popularityLevel;
}
public void setPopularityLevel(String popularityLevel) {
this.popularityLevel = popularityLevel;
}
public String getPriceAverage() {
return this.priceAverage;
}
public void setPriceAverage(String priceAverage) {
this.priceAverage = priceAverage;
}
public String getRootDisplayCategoryInfo() {
return this.rootDisplayCategoryInfo;
}
public void setRootDisplayCategoryInfo(String rootDisplayCategoryInfo) {
this.rootDisplayCategoryInfo = rootDisplayCategoryInfo;
}
public String getShopDetailUrl() {
return this.shopDetailUrl;
}
public void setShopDetailUrl(String shopDetailUrl) {
this.shopDetailUrl = shopDetailUrl;
}
public String getShopId() {
return this.shopId;
}
public void setShopId(String shopId) {
this.shopId = shopId;
}
public String getShopLogoUrl() {
return this.shopLogoUrl;
}
public void setShopLogoUrl(String shopLogoUrl) {
this.shopLogoUrl = shopLogoUrl;
}
public String getShopName() {
return this.shopName;
}
public void setShopName(String shopName) {
this.shopName = shopName;
}
public String getShopRecommendOneTagCompose() {
return this.shopRecommendOneTagCompose;
}
public void setShopRecommendOneTagCompose(String shopRecommendOneTagCompose) {
this.shopRecommendOneTagCompose = shopRecommendOneTagCompose;
}
public List<VoucherRec> getVoucherList() {
return this.voucherList;
}
public void setVoucherList(List<VoucherRec> voucherList) {
this.voucherList = voucherList;
}
}
| [
"[email protected]"
] | |
fa293016ca234479e2a3a6b9b2a1e0b039345eb9 | 8a8254c83cc2ec2c401f9820f78892cf5ff41384 | /baseline/AntennaPod/app/src/main/java/baseline/de/danoeh/antennapod/activity/AboutActivity.java | feec63cb4b0c59720e7a0cd52a41ea1790365ebb | [
"MIT"
] | permissive | VU-Thesis-2019-2020-Wesley-Shann/subjects | 46884bc6f0f9621be2ab3c4b05629e3f6d3364a0 | 14a6d6bb9740232e99e7c20f0ba4ddde3e54ad88 | refs/heads/master | 2022-12-03T05:52:23.309727 | 2020-08-19T12:18:54 | 2020-08-19T12:18:54 | 261,718,101 | 0 | 0 | null | 2020-07-11T12:19:07 | 2020-05-06T09:54:05 | Java | UTF-8 | Java | false | false | 6,494 | java | package baseline.de.danoeh.antennapod.activity;
import android.content.Intent;
import android.content.res.TypedArray;
import android.graphics.Color;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
import android.util.Log;
import android.view.MenuItem;
import android.view.View;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.LinearLayout;
import org.apache.commons.io.IOUtils;
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.Charset;
import baseline.de.danoeh.antennapod.R;
import baseline.de.danoeh.antennapod.core.preferences.UserPreferences;
import io.reactivex.Single;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.Disposable;
import io.reactivex.schedulers.Schedulers;
/**
* Displays the 'about' screen
*/
public class AboutActivity extends AppCompatActivity {
private static final String TAG = AboutActivity.class.getSimpleName();
private WebView webView;
private LinearLayout webViewContainer;
private Disposable disposable;
@Override
protected void onCreate(Bundle savedInstanceState) {
setTheme(UserPreferences.getTheme());
super.onCreate(savedInstanceState);
getSupportActionBar().setDisplayShowHomeEnabled(true);
setContentView(R.layout.about);
webViewContainer = findViewById(R.id.webViewContainer);
webView = findViewById(R.id.webViewAbout);
webView.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) {
webView.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
}
webView.setBackgroundColor(Color.TRANSPARENT);
webView.setWebViewClient(new WebViewClient() {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
if (url.startsWith("http")) {
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
startActivity(browserIntent);
return true;
} else {
url = url.replace("file:///android_asset/", "");
loadAsset(url);
return true;
}
}
});
loadAsset("about.html");
}
private void loadAsset(String filename) {
disposable = Single.create(subscriber -> {
InputStream input = null;
try {
TypedArray res = AboutActivity.this.getTheme().obtainStyledAttributes(
new int[] { R.attr.about_screen_font_color, R.attr.about_screen_background,
R.attr.about_screen_card_background, R.attr.about_screen_card_border});
String fontColor = String.format("#%06X", 0xFFFFFF & res.getColor(0, 0));
String backgroundColor = String.format("#%06X", 0xFFFFFF & res.getColor(1, 0));
String cardBackground = String.format("#%06X", 0xFFFFFF & res.getColor(2, 0));
String cardBorder = String.format("#%06X", 0xFFFFFF & res.getColor(3, 0));
res.recycle();
input = getAssets().open(filename);
String webViewData = IOUtils.toString(input, Charset.defaultCharset());
if (!webViewData.startsWith("<!DOCTYPE html>")) {
webViewData = webViewData.replace("%", "%");
webViewData =
"<!DOCTYPE html>" +
"<html>" +
"<head>" +
" <meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\">" +
" <style type=\"text/css\">" +
" @font-face {" +
" font-family: 'Roboto-Light';" +
" src: url('file:///android_asset/Roboto-Light.ttf');" +
" }" +
" * {" +
" color: @fontcolor@;" +
" font-family: roboto-Light;" +
" font-size: 8pt;" +
" }" +
" </style>" +
"</head><body><p>" + webViewData + "</p></body></html>";
webViewData = webViewData.replace("\n", "<br/>");
}
webViewData = webViewData.replace("@fontcolor@", fontColor);
webViewData = webViewData.replace("@background@", backgroundColor);
webViewData = webViewData.replace("@card_background@", cardBackground);
webViewData = webViewData.replace("@card_border@", cardBorder);
subscriber.onSuccess(webViewData);
} catch (IOException e) {
Log.e(TAG, Log.getStackTraceString(e));
subscriber.onError(e);
} finally {
IOUtils.closeQuietly(input);
}
})
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(
webViewData ->
webView.loadDataWithBaseURL("file:///android_asset/", webViewData.toString(), "text/html", "utf-8", "file:///android_asset/" + filename.toString()),
error -> Log.e(TAG, Log.getStackTraceString(error))
);
}
@Override
public void onBackPressed() {
if (webView.canGoBack()) {
webView.goBack();
} else {
super.onBackPressed();
}
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
if (item.getItemId() == android.R.id.home) {
onBackPressed();
return true;
} else {
return super.onOptionsItemSelected(item);
}
}
@Override
protected void onDestroy() {
super.onDestroy();
if (disposable != null) {
disposable.dispose();
}
if (webViewContainer != null && webView != null) {
webViewContainer.removeAllViews();
webView.destroy();
}
}
}
| [
"[email protected]"
] | |
681e2eb7751769a412af25fd1339f92fea06479e | d0366d8774f2a2882afc1caad2da488c50eec33d | /src/com/skilldistillery/jets/entity/FlyBy.java | d06b7297bdcc381f27411ec58b2f32d2cb915ae4 | [] | no_license | matthewlee686/Jets | a4c7486674abd24f18448dd1984ed52dde26c87c | 9092c0be2e908ecc84a48f885b1505654fa03689 | refs/heads/main | 2023-05-13T15:59:30.134579 | 2021-06-01T05:53:28 | 2021-06-01T05:53:28 | 371,820,733 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 92 | java | package com.skilldistillery.jets.entity;
public interface FlyBy {
void look_cool();
}
| [
"[email protected]"
] | |
b67e0bc8c1fb2fc2f96e11d36d4c612546b6b845 | ea6cd2f47f7d3d515b92397569d705a35483517f | /Arrays/SubArrayWithGivenSum.java | 8f518b50debd68a34e324bb77dccefe66b09572a | [] | no_license | chandradeepkumar16/ImportantInterviewQuestions | c2fdcba0623ef17a92d2c32c131033ebf4a72bf1 | 59b609e9073b149e52f00b2f3abca6d8d2c426ba | refs/heads/main | 2023-07-13T23:29:32.780905 | 2021-08-21T19:39:44 | 2021-08-21T19:39:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 109 | java | package Arrays;
public class SubArrayWithGivenSum {
public static void main(String[] args) {
}
}
| [
"[email protected]"
] | |
d4b6bbe0b9fc51e717b8b3c73f8178896df9627a | 45df0eb1770e632adf231df41bf7ade047a34f22 | /app/src/main/java/com/huyentran/tweets/models/Tweet.java | cef0b1658dc9a02f1399c5fafc6f3cae43dd315b | [
"MIT",
"Apache-2.0"
] | permissive | heyhuyen/codepath-twitter-client | 64526385208679a48ad7b3a67fc98117a9fff729 | 09dd4193639dba7db7bfef900ebe798de3746c58 | refs/heads/master | 2021-01-18T21:01:23.101653 | 2016-10-30T22:16:29 | 2016-10-30T22:16:29 | 72,241,218 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,468 | java | package com.huyentran.tweets.models;
import com.huyentran.tweets.db.MyDatabase;
import com.raizlabs.android.dbflow.annotation.Column;
import com.raizlabs.android.dbflow.annotation.ForeignKey;
import com.raizlabs.android.dbflow.annotation.PrimaryKey;
import com.raizlabs.android.dbflow.annotation.Table;
import com.raizlabs.android.dbflow.structure.BaseModel;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import org.parceler.Parcel;
import java.util.ArrayList;
/**
* Tweet model.
*/
@Table(database = MyDatabase.class)
@Parcel(analyze={Tweet.class})
public class Tweet extends BaseModel {
@Column
@PrimaryKey
long uid;
@Column
String body;
@Column
String createdAt;
@Column
@ForeignKey
User user;
@Column
int retweetCount;
@Column
int likeCount;
@Column
@ForeignKey
Media media;
public Tweet() {
// empty constructor for Parceler
}
public static Tweet fromJson(JSONObject jsonObject) {
Tweet tweet = new Tweet();
try {
tweet.body = jsonObject.getString("text");
tweet.uid = jsonObject.getLong("id");
tweet.createdAt = jsonObject.getString("created_at");
tweet.user = User.fromJson(jsonObject.getJSONObject("user"));
tweet.retweetCount = jsonObject.getInt("retweet_count");
tweet.likeCount = jsonObject.getInt("favorite_count");
// get first media entity if one exists
JSONArray mediaArray = jsonObject.getJSONObject("entities").getJSONArray("media");
if (mediaArray != null && mediaArray.length() > 0) {
tweet.media = Media.fromJson(mediaArray.getJSONObject(0));
}
} catch (JSONException e) {
e.printStackTrace();
}
return tweet;
}
public static ArrayList<Tweet> fromJsonArray(JSONArray jsonArray) {
ArrayList<Tweet> tweets = new ArrayList<>();
for (int i = 0; i < jsonArray.length(); i++) {
try {
JSONObject tweetJson = jsonArray.getJSONObject(i);
Tweet tweet = fromJson(tweetJson);
if (tweet != null) {
tweets.add(tweet);
}
} catch (JSONException e) {
e.printStackTrace();
continue;
}
}
return tweets;
}
public long getUid() {
return this.uid;
}
public String getBody() {
return this.body;
}
public String getCreatedAt() {
return this.createdAt;
}
public User getUser() {
return this.user;
}
public int getRetweetCount() {
return this.retweetCount;
}
public int getLikeCount() {
return this.likeCount;
}
public Media getMedia() {
return this.media;
}
public void setUid(long uid) {
this.uid = uid;
}
public void setBody(String body) {
this.body = body;
}
public void setCreatedAt(String createdAt) {
this.createdAt = createdAt;
}
public void setUser(User user) {
this.user = user;
}
public void setRetweetCount(int retweetCount) {
this.retweetCount = retweetCount;
}
public void setLikeCount(int likeCount) {
this.likeCount = likeCount;
}
public void setMedia(Media media) {
this.media = media;
}
}
| [
"[email protected]"
] | |
35d525d10b247abc05dc708e2b407302ba0fc0f4 | b89439ada8eb681cf0911d4ec60f1f977cd2dac5 | /src/leetcode/medium/Prob230_KthSmallestInBST.java | a87bf1a075e957e4d8dd2d3e9b8693222a51a30c | [] | no_license | sivajik/LeetCode | 77d34560f73abc1773b6ec2bfb8f31769349a520 | fbe8b6c7c196e6dfd0ec705df308f7faefb1ab00 | refs/heads/master | 2022-07-17T04:20:10.264882 | 2022-06-23T20:33:15 | 2022-06-23T20:33:15 | 193,531,062 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 654 | java | package leetcode.medium;
public class Prob230_KthSmallestInBST {
public static void main(String[] args) {
// TODO Auto-generated method stub
}
static class TreeNode {
int val;
TreeNode left;
TreeNode right;
TreeNode(int x) {
val = x;
left = null;
right = null;
}
}
public static void inOrder(TreeNode root, java.util.List<Integer> list) {
if (root != null) {
inOrder(root.left, list);
list.add(root.val);
inOrder(root.right, list);
}
}
public static int kthSmallest(TreeNode root, int k) {
java.util.List<Integer> list = new java.util.ArrayList<>();
inOrder(root, list);
return list.get(k - 1);
}
}
| [
"[email protected]"
] | |
e0868bbac13915d056cf4dac62171ad259e34eb3 | c885ef92397be9d54b87741f01557f61d3f794f3 | /tests-without-trycatch/JxPath-21/org.apache.commons.jxpath.ri.model.beans.PropertyPointer/default/1/org/apache/commons/jxpath/ri/model/beans/PropertyPointer_ESTest.java | 039867c449407b0175bb45aeb2ec22642acbf6d6 | [
"CC-BY-4.0",
"MIT"
] | permissive | pderakhshanfar/EMSE-BBC-experiment | f60ac5f7664dd9a85f755a00a57ec12c7551e8c6 | fea1a92c2e7ba7080b8529e2052259c9b697bbda | refs/heads/main | 2022-11-25T00:39:58.983828 | 2022-04-12T16:04:26 | 2022-04-12T16:04:26 | 309,335,889 | 0 | 1 | null | 2021-11-05T11:18:43 | 2020-11-02T10:30:38 | null | UTF-8 | Java | false | false | 56,046 | java | /*
* This file was automatically generated by EvoSuite
* Fri Jul 30 09:30:07 GMT 2021
*/
package org.apache.commons.jxpath.ri.model.beans;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.runtime.EvoAssertions.*;
import java.util.Locale;
import org.apache.commons.jxpath.BasicVariables;
import org.apache.commons.jxpath.JXPathBasicBeanInfo;
import org.apache.commons.jxpath.JXPathBeanInfo;
import org.apache.commons.jxpath.JXPathContext;
import org.apache.commons.jxpath.ri.QName;
import org.apache.commons.jxpath.ri.model.NodePointer;
import org.apache.commons.jxpath.ri.model.VariablePointer;
import org.apache.commons.jxpath.ri.model.beans.BeanPropertyPointer;
import org.apache.commons.jxpath.ri.model.beans.NullPropertyPointer;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true)
public class PropertyPointer_ESTest extends PropertyPointer_ESTest_scaffolding {
@Test(timeout = 4000)
public void test00() throws Throwable {
Class<Object> class0 = Object.class;
JXPathBasicBeanInfo jXPathBasicBeanInfo0 = new JXPathBasicBeanInfo(class0, class0);
BeanPropertyPointer beanPropertyPointer0 = new BeanPropertyPointer((NodePointer) null, jXPathBasicBeanInfo0);
BeanPropertyPointer beanPropertyPointer1 = new BeanPropertyPointer((NodePointer) null, jXPathBasicBeanInfo0);
beanPropertyPointer1.setPropertyIndex((-1740));
boolean boolean0 = beanPropertyPointer0.equals(beanPropertyPointer1);
assertEquals((-1740), beanPropertyPointer1.getPropertyIndex());
assertFalse(boolean0);
}
@Test(timeout = 4000)
public void test01() throws Throwable {
Class<String> class0 = String.class;
JXPathBasicBeanInfo jXPathBasicBeanInfo0 = new JXPathBasicBeanInfo(class0);
BeanPropertyPointer beanPropertyPointer0 = new BeanPropertyPointer((NodePointer) null, jXPathBasicBeanInfo0);
beanPropertyPointer0.setIndex((-4452));
beanPropertyPointer0.hashCode();
assertEquals(Integer.MIN_VALUE, beanPropertyPointer0.getPropertyIndex());
}
@Test(timeout = 4000)
public void test02() throws Throwable {
Class<Object> class0 = Object.class;
JXPathBasicBeanInfo jXPathBasicBeanInfo0 = new JXPathBasicBeanInfo(class0, class0);
BeanPropertyPointer beanPropertyPointer0 = new BeanPropertyPointer((NodePointer) null, jXPathBasicBeanInfo0);
beanPropertyPointer0.setPropertyIndex((-1740));
beanPropertyPointer0.hashCode();
assertEquals((-1740), beanPropertyPointer0.getPropertyIndex());
}
@Test(timeout = 4000)
public void test03() throws Throwable {
VariablePointer variablePointer0 = new VariablePointer((QName) null);
Class<Object> class0 = Object.class;
JXPathBasicBeanInfo jXPathBasicBeanInfo0 = new JXPathBasicBeanInfo(class0, class0);
BeanPropertyPointer beanPropertyPointer0 = new BeanPropertyPointer(variablePointer0, jXPathBasicBeanInfo0);
// Undeclared exception!
// try {
beanPropertyPointer0.createChild((JXPathContext) null, (QName) null, 1644);
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("org.apache.commons.jxpath.ri.model.NodePointer", e);
// }
}
@Test(timeout = 4000)
public void test04() throws Throwable {
Class<Integer> class0 = Integer.class;
Class<NodePointer> class1 = NodePointer.class;
JXPathBasicBeanInfo jXPathBasicBeanInfo0 = new JXPathBasicBeanInfo(class0, class1);
QName qName0 = new QName("BeanInfo [class = java.lang.Integer, dynamic, properties = ]");
VariablePointer variablePointer0 = new VariablePointer(qName0);
BeanPropertyPointer beanPropertyPointer0 = new BeanPropertyPointer(variablePointer0, jXPathBasicBeanInfo0);
// Undeclared exception!
// try {
beanPropertyPointer0.createChild((JXPathContext) null, qName0, 1, (Object) beanPropertyPointer0);
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("org.apache.commons.jxpath.ri.model.NodePointer", e);
// }
}
@Test(timeout = 4000)
public void test05() throws Throwable {
Class<Integer> class0 = Integer.class;
Class<NodePointer> class1 = NodePointer.class;
JXPathBasicBeanInfo jXPathBasicBeanInfo0 = new JXPathBasicBeanInfo(class0, class1);
NullPropertyPointer nullPropertyPointer0 = new NullPropertyPointer((NodePointer) null);
BeanPropertyPointer beanPropertyPointer0 = new BeanPropertyPointer(nullPropertyPointer0, jXPathBasicBeanInfo0);
beanPropertyPointer0.setPropertyIndex((-371));
assertEquals((-371), beanPropertyPointer0.getPropertyIndex());
beanPropertyPointer0.setPropertyIndex(Integer.MIN_VALUE);
assertEquals(Integer.MIN_VALUE, beanPropertyPointer0.getPropertyIndex());
}
@Test(timeout = 4000)
public void test06() throws Throwable {
Class<String> class0 = String.class;
JXPathBasicBeanInfo jXPathBasicBeanInfo0 = new JXPathBasicBeanInfo(class0);
BeanPropertyPointer beanPropertyPointer0 = new BeanPropertyPointer((NodePointer) null, jXPathBasicBeanInfo0);
NullPropertyPointer nullPropertyPointer0 = new NullPropertyPointer(beanPropertyPointer0);
nullPropertyPointer0.isLeaf();
assertEquals(Integer.MIN_VALUE, nullPropertyPointer0.getPropertyIndex());
}
@Test(timeout = 4000)
public void test07() throws Throwable {
NullPropertyPointer nullPropertyPointer0 = new NullPropertyPointer((NodePointer) null);
QName qName0 = nullPropertyPointer0.getName();
VariablePointer variablePointer0 = new VariablePointer(qName0);
Class<String> class0 = String.class;
JXPathBasicBeanInfo jXPathBasicBeanInfo0 = new JXPathBasicBeanInfo(class0, class0);
BeanPropertyPointer beanPropertyPointer0 = new BeanPropertyPointer(variablePointer0, jXPathBasicBeanInfo0);
beanPropertyPointer0.setPropertyIndex(0);
boolean boolean0 = beanPropertyPointer0.isCollection();
assertEquals(0, beanPropertyPointer0.getPropertyIndex());
assertTrue(boolean0);
}
@Test(timeout = 4000)
public void test08() throws Throwable {
NullPropertyPointer nullPropertyPointer0 = new NullPropertyPointer((NodePointer) null);
nullPropertyPointer0.isCollection();
assertEquals(Integer.MIN_VALUE, nullPropertyPointer0.getPropertyIndex());
}
@Test(timeout = 4000)
public void test09() throws Throwable {
Class<String> class0 = String.class;
JXPathBasicBeanInfo jXPathBasicBeanInfo0 = new JXPathBasicBeanInfo(class0);
BeanPropertyPointer beanPropertyPointer0 = new BeanPropertyPointer((NodePointer) null, jXPathBasicBeanInfo0);
beanPropertyPointer0.getPropertyNames();
assertEquals(Integer.MIN_VALUE, beanPropertyPointer0.getPropertyIndex());
}
@Test(timeout = 4000)
public void test10() throws Throwable {
VariablePointer variablePointer0 = new VariablePointer((QName) null);
NullPropertyPointer nullPropertyPointer0 = new NullPropertyPointer(variablePointer0);
nullPropertyPointer0.getPropertyNames();
assertEquals(Integer.MIN_VALUE, nullPropertyPointer0.getPropertyIndex());
}
@Test(timeout = 4000)
public void test11() throws Throwable {
NullPropertyPointer nullPropertyPointer0 = new NullPropertyPointer((NodePointer) null);
nullPropertyPointer0.getPropertyName();
assertEquals(Integer.MIN_VALUE, nullPropertyPointer0.getPropertyIndex());
}
@Test(timeout = 4000)
public void test12() throws Throwable {
NullPropertyPointer nullPropertyPointer0 = new NullPropertyPointer((NodePointer) null);
nullPropertyPointer0.setNameAttributeValue("");
nullPropertyPointer0.getPropertyName();
assertEquals(Integer.MIN_VALUE, nullPropertyPointer0.getPropertyIndex());
}
@Test(timeout = 4000)
public void test13() throws Throwable {
Class<Object> class0 = Object.class;
JXPathBasicBeanInfo jXPathBasicBeanInfo0 = new JXPathBasicBeanInfo(class0);
BeanPropertyPointer beanPropertyPointer0 = new BeanPropertyPointer((NodePointer) null, jXPathBasicBeanInfo0);
beanPropertyPointer0.setPropertyIndex(0);
int int0 = beanPropertyPointer0.getPropertyIndex();
assertEquals(0, int0);
}
@Test(timeout = 4000)
public void test14() throws Throwable {
QName qName0 = new QName("true()");
VariablePointer variablePointer0 = new VariablePointer(qName0);
Class<Integer> class0 = Integer.class;
JXPathBasicBeanInfo jXPathBasicBeanInfo0 = new JXPathBasicBeanInfo(class0, class0);
BeanPropertyPointer beanPropertyPointer0 = new BeanPropertyPointer(variablePointer0, jXPathBasicBeanInfo0);
beanPropertyPointer0.setPropertyIndex(15);
int int0 = beanPropertyPointer0.getPropertyIndex();
assertEquals(15, int0);
}
@Test(timeout = 4000)
public void test15() throws Throwable {
Class<Object> class0 = Object.class;
Class<VariablePointer> class1 = VariablePointer.class;
JXPathBasicBeanInfo jXPathBasicBeanInfo0 = new JXPathBasicBeanInfo(class0, class1);
BeanPropertyPointer beanPropertyPointer0 = new BeanPropertyPointer((NodePointer) null, jXPathBasicBeanInfo0);
int int0 = beanPropertyPointer0.getPropertyIndex();
assertEquals(Integer.MIN_VALUE, int0);
}
@Test(timeout = 4000)
public void test16() throws Throwable {
NullPropertyPointer nullPropertyPointer0 = new NullPropertyPointer((NodePointer) null);
nullPropertyPointer0.getPropertyCount();
assertEquals(Integer.MIN_VALUE, nullPropertyPointer0.getPropertyIndex());
}
@Test(timeout = 4000)
public void test17() throws Throwable {
QName qName0 = new QName(" could not create an object for path: ", "|m(d}_.X");
VariablePointer variablePointer0 = new VariablePointer(qName0);
Class<BeanPropertyPointer> class0 = BeanPropertyPointer.class;
JXPathBasicBeanInfo jXPathBasicBeanInfo0 = new JXPathBasicBeanInfo(class0);
BeanPropertyPointer beanPropertyPointer0 = new BeanPropertyPointer(variablePointer0, jXPathBasicBeanInfo0);
beanPropertyPointer0.getPropertyCount();
assertEquals(Integer.MIN_VALUE, beanPropertyPointer0.getPropertyIndex());
}
@Test(timeout = 4000)
public void test18() throws Throwable {
Class<Object> class0 = Object.class;
Class<VariablePointer> class1 = VariablePointer.class;
JXPathBasicBeanInfo jXPathBasicBeanInfo0 = new JXPathBasicBeanInfo(class0, class1);
BeanPropertyPointer beanPropertyPointer0 = new BeanPropertyPointer((NodePointer) null, jXPathBasicBeanInfo0);
NullPropertyPointer nullPropertyPointer0 = new NullPropertyPointer(beanPropertyPointer0);
nullPropertyPointer0.getLength();
assertEquals(Integer.MIN_VALUE, nullPropertyPointer0.getPropertyIndex());
}
@Test(timeout = 4000)
public void test19() throws Throwable {
QName qName0 = new QName("true()", "true()");
VariablePointer variablePointer0 = new VariablePointer(qName0);
Class<BeanPropertyPointer> class0 = BeanPropertyPointer.class;
JXPathBasicBeanInfo jXPathBasicBeanInfo0 = new JXPathBasicBeanInfo(class0, class0);
BeanPropertyPointer beanPropertyPointer0 = new BeanPropertyPointer(variablePointer0, jXPathBasicBeanInfo0);
beanPropertyPointer0.getLength();
assertEquals(Integer.MIN_VALUE, beanPropertyPointer0.getPropertyIndex());
}
@Test(timeout = 4000)
public void test20() throws Throwable {
Class<Integer> class0 = Integer.class;
Class<NodePointer> class1 = NodePointer.class;
JXPathBasicBeanInfo jXPathBasicBeanInfo0 = new JXPathBasicBeanInfo(class0, class1);
BeanPropertyPointer beanPropertyPointer0 = new BeanPropertyPointer((NodePointer) null, jXPathBasicBeanInfo0);
beanPropertyPointer0.getImmediateNode();
assertEquals(Integer.MIN_VALUE, beanPropertyPointer0.getPropertyIndex());
}
@Test(timeout = 4000)
public void test21() throws Throwable {
Class<Object> class0 = Object.class;
NullPropertyPointer nullPropertyPointer0 = new NullPropertyPointer((NodePointer) null);
JXPathBasicBeanInfo jXPathBasicBeanInfo0 = new JXPathBasicBeanInfo(class0, true);
BeanPropertyPointer beanPropertyPointer0 = new BeanPropertyPointer(nullPropertyPointer0, jXPathBasicBeanInfo0);
beanPropertyPointer0.getBean();
assertEquals(Integer.MIN_VALUE, beanPropertyPointer0.getPropertyIndex());
}
@Test(timeout = 4000)
public void test22() throws Throwable {
BasicVariables basicVariables0 = new BasicVariables();
QName qName0 = new QName(". It cannot be converted to ", ". It cannot be converted to ");
VariablePointer variablePointer0 = new VariablePointer(basicVariables0, qName0);
NodePointer nodePointer0 = variablePointer0.createPath((JXPathContext) null, (Object) ". It cannot be converted to ");
NullPropertyPointer nullPropertyPointer0 = new NullPropertyPointer(nodePointer0);
Class<Object> class0 = Object.class;
JXPathBasicBeanInfo jXPathBasicBeanInfo0 = new JXPathBasicBeanInfo(class0);
BeanPropertyPointer beanPropertyPointer0 = new BeanPropertyPointer(variablePointer0, jXPathBasicBeanInfo0);
nullPropertyPointer0.createPath((JXPathContext) null, (Object) beanPropertyPointer0);
assertEquals(Integer.MIN_VALUE, beanPropertyPointer0.getPropertyIndex());
assertEquals(Integer.MIN_VALUE, nullPropertyPointer0.getPropertyIndex());
}
@Test(timeout = 4000)
public void test23() throws Throwable {
BasicVariables basicVariables0 = new BasicVariables();
QName qName0 = new QName(". It cannot be converted to ", ". It cannot be converted to ");
VariablePointer variablePointer0 = new VariablePointer(basicVariables0, qName0);
NodePointer nodePointer0 = variablePointer0.createPath((JXPathContext) null, (Object) ". It cannot be converted to ");
NullPropertyPointer nullPropertyPointer0 = new NullPropertyPointer(nodePointer0);
nullPropertyPointer0.createPath((JXPathContext) null);
assertEquals(Integer.MIN_VALUE, nullPropertyPointer0.getPropertyIndex());
}
@Test(timeout = 4000)
public void test24() throws Throwable {
BasicVariables basicVariables0 = new BasicVariables();
QName qName0 = new QName("ERzSK1Q3>L4!6|");
VariablePointer variablePointer0 = new VariablePointer(basicVariables0, qName0);
NodePointer nodePointer0 = variablePointer0.createPath((JXPathContext) null, (Object) qName0);
NullPropertyPointer nullPropertyPointer0 = new NullPropertyPointer(nodePointer0);
nullPropertyPointer0.createChild((JXPathContext) null, qName0, Integer.MIN_VALUE, (Object) null);
assertEquals(Integer.MIN_VALUE, nullPropertyPointer0.getPropertyIndex());
}
@Test(timeout = 4000)
public void test25() throws Throwable {
BasicVariables basicVariables0 = new BasicVariables();
QName qName0 = new QName(". It cannot be converted to ", ". It cannot be converted to ");
VariablePointer variablePointer0 = new VariablePointer(basicVariables0, qName0);
NodePointer nodePointer0 = variablePointer0.createPath((JXPathContext) null, (Object) ". It cannot be converted to ");
NullPropertyPointer nullPropertyPointer0 = new NullPropertyPointer(nodePointer0);
nullPropertyPointer0.createChild((JXPathContext) null, qName0, Integer.MIN_VALUE);
assertEquals(Integer.MIN_VALUE, nullPropertyPointer0.getPropertyIndex());
}
@Test(timeout = 4000)
public void test26() throws Throwable {
NullPropertyPointer nullPropertyPointer0 = new NullPropertyPointer((NodePointer) null);
Class<BeanPropertyPointer> class0 = BeanPropertyPointer.class;
Class<NodePointer> class1 = NodePointer.class;
JXPathBasicBeanInfo jXPathBasicBeanInfo0 = new JXPathBasicBeanInfo(class0, class1);
BeanPropertyPointer beanPropertyPointer0 = new BeanPropertyPointer(nullPropertyPointer0, jXPathBasicBeanInfo0);
nullPropertyPointer0.compareChildNodePointers(beanPropertyPointer0, nullPropertyPointer0);
assertEquals(Integer.MIN_VALUE, beanPropertyPointer0.getPropertyIndex());
assertEquals(Integer.MIN_VALUE, nullPropertyPointer0.getPropertyIndex());
}
@Test(timeout = 4000)
public void test27() throws Throwable {
NullPropertyPointer nullPropertyPointer0 = new NullPropertyPointer((NodePointer) null);
Class<BeanPropertyPointer> class0 = BeanPropertyPointer.class;
Class<NodePointer> class1 = NodePointer.class;
JXPathBasicBeanInfo jXPathBasicBeanInfo0 = new JXPathBasicBeanInfo(class0, class1);
BeanPropertyPointer beanPropertyPointer0 = new BeanPropertyPointer(nullPropertyPointer0, jXPathBasicBeanInfo0);
beanPropertyPointer0.setPropertyName("E'&AF");
int int0 = nullPropertyPointer0.compareChildNodePointers(beanPropertyPointer0, nullPropertyPointer0);
assertEquals(27, int0);
assertEquals(Integer.MIN_VALUE, nullPropertyPointer0.getPropertyIndex());
}
@Test(timeout = 4000)
public void test28() throws Throwable {
NullPropertyPointer nullPropertyPointer0 = new NullPropertyPointer((NodePointer) null);
Class<BeanPropertyPointer> class0 = BeanPropertyPointer.class;
Class<NodePointer> class1 = NodePointer.class;
JXPathBasicBeanInfo jXPathBasicBeanInfo0 = new JXPathBasicBeanInfo(class0, class1);
BeanPropertyPointer beanPropertyPointer0 = new BeanPropertyPointer(nullPropertyPointer0, jXPathBasicBeanInfo0);
beanPropertyPointer0.setPropertyName("#'&Ab");
int int0 = nullPropertyPointer0.compareChildNodePointers(beanPropertyPointer0, nullPropertyPointer0);
assertEquals(Integer.MIN_VALUE, nullPropertyPointer0.getPropertyIndex());
assertEquals((-7), int0);
}
@Test(timeout = 4000)
public void test29() throws Throwable {
Class<VariablePointer> class0 = VariablePointer.class;
JXPathBasicBeanInfo jXPathBasicBeanInfo0 = new JXPathBasicBeanInfo(class0, class0);
BeanPropertyPointer beanPropertyPointer0 = new BeanPropertyPointer((NodePointer) null, jXPathBasicBeanInfo0);
beanPropertyPointer0.bean = (Object) jXPathBasicBeanInfo0;
beanPropertyPointer0.setPropertyIndex(0);
// Undeclared exception!
// try {
beanPropertyPointer0.isLeaf();
// fail("Expecting exception: RuntimeException");
// } catch(RuntimeException e) {
// //
// // Cannot access property: org.apache.commons.jxpath.JXPathBasicBeanInfo.actual; java.lang.ClassCastException@6c29508
// //
// verifyException("org.apache.commons.jxpath.util.ValueUtils", e);
// }
}
@Test(timeout = 4000)
public void test30() throws Throwable {
BeanPropertyPointer beanPropertyPointer0 = new BeanPropertyPointer((NodePointer) null, (JXPathBeanInfo) null);
// Undeclared exception!
// try {
beanPropertyPointer0.isLeaf();
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("org.apache.commons.jxpath.ri.model.beans.BeanPropertyPointer", e);
// }
}
@Test(timeout = 4000)
public void test31() throws Throwable {
Class<Object> class0 = Object.class;
JXPathBasicBeanInfo jXPathBasicBeanInfo0 = new JXPathBasicBeanInfo(class0, class0);
BeanPropertyPointer beanPropertyPointer0 = new BeanPropertyPointer((NodePointer) null, jXPathBasicBeanInfo0);
boolean boolean0 = beanPropertyPointer0.isLeaf();
assertTrue(boolean0);
assertEquals(Integer.MIN_VALUE, beanPropertyPointer0.getPropertyIndex());
}
@Test(timeout = 4000)
public void test32() throws Throwable {
BasicVariables basicVariables0 = new BasicVariables();
QName qName0 = new QName("<<unknown namespace>>", "<<unknown namespace>>");
VariablePointer variablePointer0 = new VariablePointer(basicVariables0, qName0);
Class<VariablePointer> class0 = VariablePointer.class;
Class<String> class1 = String.class;
JXPathBasicBeanInfo jXPathBasicBeanInfo0 = new JXPathBasicBeanInfo(class0, class1);
BeanPropertyPointer beanPropertyPointer0 = new BeanPropertyPointer(variablePointer0, jXPathBasicBeanInfo0);
beanPropertyPointer0.setPropertyIndex(1);
// Undeclared exception!
// try {
beanPropertyPointer0.isLeaf();
// fail("Expecting exception: IllegalArgumentException");
// } catch(IllegalArgumentException e) {
// //
// // No such variable: '<<unknown namespace>>:<<unknown namespace>>'
// //
// verifyException("org.apache.commons.jxpath.BasicVariables", e);
// }
}
@Test(timeout = 4000)
public void test33() throws Throwable {
BeanPropertyPointer beanPropertyPointer0 = new BeanPropertyPointer((NodePointer) null, (JXPathBeanInfo) null);
// Undeclared exception!
// try {
beanPropertyPointer0.isCollection();
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("org.apache.commons.jxpath.ri.model.beans.BeanPropertyPointer", e);
// }
}
@Test(timeout = 4000)
public void test34() throws Throwable {
BeanPropertyPointer beanPropertyPointer0 = new BeanPropertyPointer((NodePointer) null, (JXPathBeanInfo) null);
// Undeclared exception!
// try {
beanPropertyPointer0.isActual();
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("org.apache.commons.jxpath.ri.model.beans.BeanPropertyPointer", e);
// }
}
@Test(timeout = 4000)
public void test35() throws Throwable {
BeanPropertyPointer beanPropertyPointer0 = new BeanPropertyPointer((NodePointer) null, (JXPathBeanInfo) null);
// Undeclared exception!
// try {
beanPropertyPointer0.getPropertyNames();
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("org.apache.commons.jxpath.ri.model.beans.BeanPropertyPointer", e);
// }
}
@Test(timeout = 4000)
public void test36() throws Throwable {
BeanPropertyPointer beanPropertyPointer0 = new BeanPropertyPointer((NodePointer) null, (JXPathBeanInfo) null);
// Undeclared exception!
// try {
beanPropertyPointer0.getPropertyName();
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("org.apache.commons.jxpath.ri.model.beans.BeanPropertyPointer", e);
// }
}
@Test(timeout = 4000)
public void test37() throws Throwable {
BeanPropertyPointer beanPropertyPointer0 = new BeanPropertyPointer((NodePointer) null, (JXPathBeanInfo) null);
// Undeclared exception!
// try {
beanPropertyPointer0.getPropertyCount();
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("org.apache.commons.jxpath.ri.model.beans.BeanPropertyPointer", e);
// }
}
@Test(timeout = 4000)
public void test38() throws Throwable {
BeanPropertyPointer beanPropertyPointer0 = new BeanPropertyPointer((NodePointer) null, (JXPathBeanInfo) null);
// Undeclared exception!
// try {
beanPropertyPointer0.getName();
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("org.apache.commons.jxpath.ri.model.beans.BeanPropertyPointer", e);
// }
}
@Test(timeout = 4000)
public void test39() throws Throwable {
BeanPropertyPointer beanPropertyPointer0 = new BeanPropertyPointer((NodePointer) null, (JXPathBeanInfo) null);
// Undeclared exception!
// try {
beanPropertyPointer0.getLength();
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("org.apache.commons.jxpath.ri.model.beans.BeanPropertyPointer", e);
// }
}
@Test(timeout = 4000)
public void test40() throws Throwable {
QName qName0 = new QName("true()", "true()");
VariablePointer variablePointer0 = new VariablePointer(qName0);
Class<BeanPropertyPointer> class0 = BeanPropertyPointer.class;
NullPropertyPointer nullPropertyPointer0 = new NullPropertyPointer(variablePointer0);
JXPathBasicBeanInfo jXPathBasicBeanInfo0 = new JXPathBasicBeanInfo(class0, class0);
BeanPropertyPointer beanPropertyPointer0 = new BeanPropertyPointer(nullPropertyPointer0, jXPathBasicBeanInfo0);
beanPropertyPointer0.setPropertyIndex(0);
// Undeclared exception!
// try {
beanPropertyPointer0.getImmediateValuePointer();
// fail("Expecting exception: RuntimeException");
// } catch(RuntimeException e) {
// //
// // Cannot access property: null.actual; java.lang.NullPointerException
// //
// verifyException("org.apache.commons.jxpath.util.ValueUtils", e);
// }
}
@Test(timeout = 4000)
public void test41() throws Throwable {
NullPropertyPointer nullPropertyPointer0 = new NullPropertyPointer((NodePointer) null);
nullPropertyPointer0.getImmediateValuePointer();
assertEquals(Integer.MIN_VALUE, nullPropertyPointer0.getPropertyIndex());
}
@Test(timeout = 4000)
public void test42() throws Throwable {
NullPropertyPointer nullPropertyPointer0 = new NullPropertyPointer((NodePointer) null);
Class<BeanPropertyPointer> class0 = BeanPropertyPointer.class;
JXPathBasicBeanInfo jXPathBasicBeanInfo0 = new JXPathBasicBeanInfo(class0, false);
BeanPropertyPointer beanPropertyPointer0 = new BeanPropertyPointer(nullPropertyPointer0, jXPathBasicBeanInfo0);
beanPropertyPointer0.setPropertyIndex(13);
// Undeclared exception!
// try {
beanPropertyPointer0.getImmediateNode();
// fail("Expecting exception: RuntimeException");
// } catch(RuntimeException e) {
// //
// // Cannot access property: null.locale; java.lang.NullPointerException
// //
// verifyException("org.apache.commons.jxpath.util.ValueUtils", e);
// }
}
@Test(timeout = 4000)
public void test43() throws Throwable {
BeanPropertyPointer beanPropertyPointer0 = new BeanPropertyPointer((NodePointer) null, (JXPathBeanInfo) null);
// Undeclared exception!
// try {
beanPropertyPointer0.getImmediateNode();
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("org.apache.commons.jxpath.ri.model.beans.BeanPropertyPointer", e);
// }
}
@Test(timeout = 4000)
public void test44() throws Throwable {
VariablePointer variablePointer0 = new VariablePointer((QName) null);
NullPropertyPointer nullPropertyPointer0 = new NullPropertyPointer(variablePointer0);
// Undeclared exception!
// try {
nullPropertyPointer0.getBean();
// fail("Expecting exception: RuntimeException");
// } catch(RuntimeException e) {
// //
// // Undefined variable: null
// //
// verifyException("org.apache.commons.jxpath.ri.model.VariablePointer$1", e);
// }
}
@Test(timeout = 4000)
public void test45() throws Throwable {
NullPropertyPointer nullPropertyPointer0 = new NullPropertyPointer((NodePointer) null);
// Undeclared exception!
// try {
nullPropertyPointer0.getBean();
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("org.apache.commons.jxpath.ri.model.beans.PropertyPointer", e);
// }
}
@Test(timeout = 4000)
public void test46() throws Throwable {
Class<String> class0 = String.class;
JXPathBasicBeanInfo jXPathBasicBeanInfo0 = new JXPathBasicBeanInfo(class0, class0);
BeanPropertyPointer beanPropertyPointer0 = new BeanPropertyPointer((NodePointer) null, jXPathBasicBeanInfo0);
NullPropertyPointer nullPropertyPointer0 = new NullPropertyPointer(beanPropertyPointer0);
nullPropertyPointer0.getBean();
assertEquals(Integer.MIN_VALUE, nullPropertyPointer0.getPropertyIndex());
}
@Test(timeout = 4000)
public void test47() throws Throwable {
BasicVariables basicVariables0 = new BasicVariables();
QName qName0 = new QName((String) null, (String) null);
VariablePointer variablePointer0 = new VariablePointer(basicVariables0, qName0);
BeanPropertyPointer beanPropertyPointer0 = new BeanPropertyPointer(variablePointer0, (JXPathBeanInfo) null);
// Undeclared exception!
// try {
beanPropertyPointer0.getBean();
// fail("Expecting exception: IllegalArgumentException");
// } catch(IllegalArgumentException e) {
// //
// // No such variable: 'null'
// //
// verifyException("org.apache.commons.jxpath.BasicVariables", e);
// }
}
@Test(timeout = 4000)
public void test48() throws Throwable {
BeanPropertyPointer beanPropertyPointer0 = new BeanPropertyPointer((NodePointer) null, (JXPathBeanInfo) null);
NullPropertyPointer nullPropertyPointer0 = new NullPropertyPointer((NodePointer) null);
// Undeclared exception!
// try {
nullPropertyPointer0.equals(beanPropertyPointer0);
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("org.apache.commons.jxpath.ri.model.beans.BeanPropertyPointer", e);
// }
}
@Test(timeout = 4000)
public void test49() throws Throwable {
QName qName0 = new QName("true()");
VariablePointer variablePointer0 = new VariablePointer(qName0);
Class<VariablePointer> class0 = VariablePointer.class;
JXPathBasicBeanInfo jXPathBasicBeanInfo0 = new JXPathBasicBeanInfo(class0);
NullPropertyPointer nullPropertyPointer0 = new NullPropertyPointer(variablePointer0);
BeanPropertyPointer beanPropertyPointer0 = new BeanPropertyPointer(nullPropertyPointer0, jXPathBasicBeanInfo0);
beanPropertyPointer0.setPropertyIndex(0);
// Undeclared exception!
// try {
beanPropertyPointer0.createPath((JXPathContext) null, (Object) nullPropertyPointer0);
// fail("Expecting exception: RuntimeException");
// } catch(RuntimeException e) {
// //
// // Cannot modify property: null.actual; No write method
// //
// verifyException("org.apache.commons.jxpath.util.ValueUtils", e);
// }
}
@Test(timeout = 4000)
public void test50() throws Throwable {
Locale locale0 = Locale.TRADITIONAL_CHINESE;
NodePointer nodePointer0 = NodePointer.newNodePointer((QName) null, (Object) null, locale0);
NullPropertyPointer nullPropertyPointer0 = new NullPropertyPointer(nodePointer0);
// Undeclared exception!
// try {
nullPropertyPointer0.createPath((JXPathContext) null, (Object) null);
// fail("Expecting exception: UnsupportedOperationException");
// } catch(UnsupportedOperationException e) {
// //
// // Cannot create the root object: null()
// //
// verifyException("org.apache.commons.jxpath.ri.model.beans.NullPointer", e);
// }
}
@Test(timeout = 4000)
public void test51() throws Throwable {
BasicVariables basicVariables0 = new BasicVariables();
QName qName0 = new QName("Cannot change locale using the 'lang' attribute");
VariablePointer variablePointer0 = new VariablePointer(basicVariables0, qName0);
NullPropertyPointer nullPropertyPointer0 = new NullPropertyPointer(variablePointer0);
// Undeclared exception!
// try {
nullPropertyPointer0.createPath((JXPathContext) null, (Object) variablePointer0);
// fail("Expecting exception: IllegalArgumentException");
// } catch(IllegalArgumentException e) {
// //
// // No such variable: 'Cannot change locale using the 'lang' attribute'
// //
// verifyException("org.apache.commons.jxpath.BasicVariables", e);
// }
}
@Test(timeout = 4000)
public void test52() throws Throwable {
BasicVariables basicVariables0 = new BasicVariables();
QName qName0 = new QName("");
VariablePointer variablePointer0 = new VariablePointer(basicVariables0, qName0);
variablePointer0.createPath((JXPathContext) null, (Object) null);
NullPropertyPointer nullPropertyPointer0 = new NullPropertyPointer(variablePointer0);
// Undeclared exception!
// try {
nullPropertyPointer0.createPath((JXPathContext) null);
// fail("Expecting exception: RuntimeException");
// } catch(RuntimeException e) {
// //
// // Factory did not assign a collection to variable '' for path: $
// //
// verifyException("org.apache.commons.jxpath.ri.model.VariablePointer", e);
// }
}
@Test(timeout = 4000)
public void test53() throws Throwable {
BasicVariables basicVariables0 = new BasicVariables();
QName qName0 = new QName("W", "org.apache.commons.jxpath.ri.model.beans.PropertyPointer");
VariablePointer variablePointer0 = new VariablePointer(basicVariables0, qName0);
NullPropertyPointer nullPropertyPointer0 = new NullPropertyPointer(variablePointer0);
// Undeclared exception!
// try {
nullPropertyPointer0.createPath((JXPathContext) null);
// fail("Expecting exception: IllegalArgumentException");
// } catch(IllegalArgumentException e) {
// //
// // No such variable: 'W:org.apache.commons.jxpath.ri.model.beans.PropertyPointer'
// //
// verifyException("org.apache.commons.jxpath.BasicVariables", e);
// }
}
@Test(timeout = 4000)
public void test54() throws Throwable {
BasicVariables basicVariables0 = new BasicVariables();
QName qName0 = new QName("36Xre_B[w^]e");
VariablePointer variablePointer0 = new VariablePointer(basicVariables0, qName0);
NullPropertyPointer nullPropertyPointer0 = new NullPropertyPointer(variablePointer0);
variablePointer0.createPath((JXPathContext) null, (Object) nullPropertyPointer0);
// Undeclared exception!
// try {
nullPropertyPointer0.createChild((JXPathContext) null, qName0, 29, (Object) null);
// fail("Expecting exception: RuntimeException");
// } catch(RuntimeException e) {
// //
// // Cannot turn org.apache.commons.jxpath.ri.model.beans.NullPropertyPointer into a collection of size 30
// //
// verifyException("org.apache.commons.jxpath.util.ValueUtils", e);
// }
}
@Test(timeout = 4000)
public void test55() throws Throwable {
Class<Object> class0 = Object.class;
JXPathBasicBeanInfo jXPathBasicBeanInfo0 = new JXPathBasicBeanInfo(class0, class0);
BeanPropertyPointer beanPropertyPointer0 = new BeanPropertyPointer((NodePointer) null, jXPathBasicBeanInfo0);
// Undeclared exception!
// try {
beanPropertyPointer0.createChild((JXPathContext) null, (QName) null, Integer.MIN_VALUE, (Object) jXPathBasicBeanInfo0);
// fail("Expecting exception: RuntimeException");
// } catch(RuntimeException e) {
// //
// // Cannot set property: /* - no such property
// //
// verifyException("org.apache.commons.jxpath.ri.model.beans.BeanPropertyPointer", e);
// }
}
@Test(timeout = 4000)
public void test56() throws Throwable {
BasicVariables basicVariables0 = new BasicVariables();
QName qName0 = new QName("ERzSK1Q3>L4!6|", "ERzSK1Q3>L4!6|");
VariablePointer variablePointer0 = new VariablePointer(basicVariables0, qName0);
NullPropertyPointer nullPropertyPointer0 = new NullPropertyPointer(variablePointer0);
// Undeclared exception!
// try {
nullPropertyPointer0.createChild((JXPathContext) null, qName0, Integer.MIN_VALUE, (Object) null);
// fail("Expecting exception: IllegalArgumentException");
// } catch(IllegalArgumentException e) {
// //
// // No such variable: 'ERzSK1Q3>L4!6|:ERzSK1Q3>L4!6|'
// //
// verifyException("org.apache.commons.jxpath.BasicVariables", e);
// }
}
@Test(timeout = 4000)
public void test57() throws Throwable {
BasicVariables basicVariables0 = new BasicVariables();
QName qName0 = new QName("ERzSK1Q3>L4!6|");
VariablePointer variablePointer0 = new VariablePointer(basicVariables0, qName0);
NodePointer nodePointer0 = variablePointer0.createPath((JXPathContext) null, (Object) qName0);
NullPropertyPointer nullPropertyPointer0 = new NullPropertyPointer(nodePointer0);
// Undeclared exception!
// try {
nullPropertyPointer0.createChild((JXPathContext) null, qName0, 4109);
// fail("Expecting exception: RuntimeException");
// } catch(RuntimeException e) {
// //
// // Cannot turn org.apache.commons.jxpath.ri.QName into a collection of size 4110
// //
// verifyException("org.apache.commons.jxpath.util.ValueUtils", e);
// }
}
@Test(timeout = 4000)
public void test58() throws Throwable {
BasicVariables basicVariables0 = new BasicVariables();
QName qName0 = new QName("fmoQZ(,j+[");
VariablePointer variablePointer0 = new VariablePointer(basicVariables0, qName0);
NodePointer nodePointer0 = variablePointer0.createPath((JXPathContext) null, (Object) null);
NullPropertyPointer nullPropertyPointer0 = new NullPropertyPointer(nodePointer0);
// Undeclared exception!
// try {
nullPropertyPointer0.createChild((JXPathContext) null, qName0, Integer.MIN_VALUE);
// fail("Expecting exception: RuntimeException");
// } catch(RuntimeException e) {
// //
// // Factory did not assign a collection to variable 'fmoQZ(,j+[' for path: $fmoQZ(,j+[
// //
// verifyException("org.apache.commons.jxpath.ri.model.VariablePointer", e);
// }
}
@Test(timeout = 4000)
public void test59() throws Throwable {
QName qName0 = new QName("y?kFa!n;Dr)");
Locale locale0 = Locale.FRANCE;
NodePointer nodePointer0 = NodePointer.newNodePointer(qName0, (Object) null, locale0);
NullPropertyPointer nullPropertyPointer0 = new NullPropertyPointer(nodePointer0);
// Undeclared exception!
// try {
nullPropertyPointer0.createChild((JXPathContext) null, qName0, (-15));
// fail("Expecting exception: UnsupportedOperationException");
// } catch(UnsupportedOperationException e) {
// //
// // Cannot create the root object: null()
// //
// verifyException("org.apache.commons.jxpath.ri.model.beans.NullPointer", e);
// }
}
@Test(timeout = 4000)
public void test60() throws Throwable {
BasicVariables basicVariables0 = new BasicVariables();
QName qName0 = new QName("-Y|(");
VariablePointer variablePointer0 = new VariablePointer(basicVariables0, qName0);
NullPropertyPointer nullPropertyPointer0 = new NullPropertyPointer(variablePointer0);
// Undeclared exception!
// try {
nullPropertyPointer0.createChild((JXPathContext) null, qName0, (-2047));
// fail("Expecting exception: IllegalArgumentException");
// } catch(IllegalArgumentException e) {
// //
// // No such variable: '-Y|('
// //
// verifyException("org.apache.commons.jxpath.BasicVariables", e);
// }
}
@Test(timeout = 4000)
public void test61() throws Throwable {
QName qName0 = new QName("true()", "true()");
VariablePointer variablePointer0 = new VariablePointer(qName0);
Class<VariablePointer> class0 = VariablePointer.class;
JXPathBasicBeanInfo jXPathBasicBeanInfo0 = new JXPathBasicBeanInfo(class0);
NullPropertyPointer nullPropertyPointer0 = new NullPropertyPointer(variablePointer0);
BeanPropertyPointer beanPropertyPointer0 = new BeanPropertyPointer(nullPropertyPointer0, jXPathBasicBeanInfo0);
beanPropertyPointer0.setPropertyIndex(0);
// Undeclared exception!
// try {
beanPropertyPointer0.compareChildNodePointers(nullPropertyPointer0, variablePointer0);
// fail("Expecting exception: RuntimeException");
// } catch(RuntimeException e) {
// //
// // Cannot access property: null.actual; java.lang.NullPointerException
// //
// verifyException("org.apache.commons.jxpath.util.ValueUtils", e);
// }
}
@Test(timeout = 4000)
public void test62() throws Throwable {
NullPropertyPointer nullPropertyPointer0 = new NullPropertyPointer((NodePointer) null);
// Undeclared exception!
// try {
nullPropertyPointer0.compareChildNodePointers((NodePointer) null, (NodePointer) null);
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("org.apache.commons.jxpath.ri.model.beans.PropertyOwnerPointer", e);
// }
}
@Test(timeout = 4000)
public void test63() throws Throwable {
Class<BeanPropertyPointer> class0 = BeanPropertyPointer.class;
JXPathBasicBeanInfo jXPathBasicBeanInfo0 = new JXPathBasicBeanInfo(class0);
BeanPropertyPointer beanPropertyPointer0 = new BeanPropertyPointer((NodePointer) null, jXPathBasicBeanInfo0);
BasicVariables basicVariables0 = new BasicVariables();
QName qName0 = beanPropertyPointer0.getName();
VariablePointer variablePointer0 = new VariablePointer(basicVariables0, qName0);
BeanPropertyPointer beanPropertyPointer1 = new BeanPropertyPointer(variablePointer0, jXPathBasicBeanInfo0);
beanPropertyPointer1.setPropertyIndex(0);
// Undeclared exception!
// try {
beanPropertyPointer1.compareChildNodePointers(beanPropertyPointer0, beanPropertyPointer0);
// fail("Expecting exception: IllegalArgumentException");
// } catch(IllegalArgumentException e) {
// //
// // No such variable: '*'
// //
// verifyException("org.apache.commons.jxpath.BasicVariables", e);
// }
}
@Test(timeout = 4000)
public void test64() throws Throwable {
NullPropertyPointer nullPropertyPointer0 = new NullPropertyPointer((NodePointer) null);
boolean boolean0 = nullPropertyPointer0.equals((Object) null);
assertFalse(boolean0);
assertEquals(Integer.MIN_VALUE, nullPropertyPointer0.getPropertyIndex());
}
@Test(timeout = 4000)
public void test65() throws Throwable {
Class<Integer> class0 = Integer.class;
JXPathBasicBeanInfo jXPathBasicBeanInfo0 = new JXPathBasicBeanInfo(class0, class0);
BeanPropertyPointer beanPropertyPointer0 = new BeanPropertyPointer((NodePointer) null, jXPathBasicBeanInfo0);
beanPropertyPointer0.setIndex(394);
// Undeclared exception!
// try {
beanPropertyPointer0.createPath((JXPathContext) null, (Object) null);
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("org.apache.commons.jxpath.ri.model.NodePointer", e);
// }
}
@Test(timeout = 4000)
public void test66() throws Throwable {
Class<String> class0 = String.class;
JXPathBasicBeanInfo jXPathBasicBeanInfo0 = new JXPathBasicBeanInfo(class0);
QName qName0 = new QName("P: kpV!X\u0007P~MK", (String) null);
VariablePointer variablePointer0 = new VariablePointer(qName0);
BeanPropertyPointer beanPropertyPointer0 = new BeanPropertyPointer(variablePointer0, jXPathBasicBeanInfo0);
beanPropertyPointer0.setPropertyIndex(1);
// Undeclared exception!
// try {
beanPropertyPointer0.createPath((JXPathContext) null);
// fail("Expecting exception: RuntimeException");
// } catch(RuntimeException e) {
// //
// // Undefined variable: P: kpV!X\u0007P~MK:null
// //
// verifyException("org.apache.commons.jxpath.ri.model.VariablePointer$1", e);
// }
}
@Test(timeout = 4000)
public void test67() throws Throwable {
BeanPropertyPointer beanPropertyPointer0 = new BeanPropertyPointer((NodePointer) null, (JXPathBeanInfo) null);
// Undeclared exception!
// try {
beanPropertyPointer0.getImmediateValuePointer();
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("org.apache.commons.jxpath.ri.model.beans.BeanPropertyPointer", e);
// }
}
@Test(timeout = 4000)
public void test68() throws Throwable {
NullPropertyPointer nullPropertyPointer0 = new NullPropertyPointer((NodePointer) null);
NullPropertyPointer nullPropertyPointer1 = new NullPropertyPointer((NodePointer) null);
assertTrue(nullPropertyPointer1.equals((Object)nullPropertyPointer0));
nullPropertyPointer1.setIndex(800);
boolean boolean0 = nullPropertyPointer0.equals(nullPropertyPointer1);
assertFalse(nullPropertyPointer1.equals((Object)nullPropertyPointer0));
assertFalse(boolean0);
}
@Test(timeout = 4000)
public void test69() throws Throwable {
NullPropertyPointer nullPropertyPointer0 = new NullPropertyPointer((NodePointer) null);
NullPropertyPointer nullPropertyPointer1 = new NullPropertyPointer((NodePointer) null);
assertTrue(nullPropertyPointer1.equals((Object)nullPropertyPointer0));
nullPropertyPointer1.setIndex(800);
boolean boolean0 = nullPropertyPointer1.equals(nullPropertyPointer0);
assertFalse(boolean0);
}
@Test(timeout = 4000)
public void test70() throws Throwable {
NullPropertyPointer nullPropertyPointer0 = new NullPropertyPointer((NodePointer) null);
NullPropertyPointer nullPropertyPointer1 = new NullPropertyPointer((NodePointer) null);
assertTrue(nullPropertyPointer1.equals((Object)nullPropertyPointer0));
nullPropertyPointer1.setNameAttributeValue("<<unknown namespace>>");
boolean boolean0 = nullPropertyPointer1.equals(nullPropertyPointer0);
assertFalse(boolean0);
}
@Test(timeout = 4000)
public void test71() throws Throwable {
NullPropertyPointer nullPropertyPointer0 = new NullPropertyPointer((NodePointer) null);
NullPropertyPointer nullPropertyPointer1 = new NullPropertyPointer((NodePointer) null);
nullPropertyPointer1.propertyIndex = 1229;
boolean boolean0 = nullPropertyPointer1.equals(nullPropertyPointer0);
assertEquals(1229, nullPropertyPointer1.getPropertyIndex());
assertFalse(boolean0);
}
@Test(timeout = 4000)
public void test72() throws Throwable {
NullPropertyPointer nullPropertyPointer0 = new NullPropertyPointer((NodePointer) null);
NullPropertyPointer nullPropertyPointer1 = new NullPropertyPointer(nullPropertyPointer0);
NullPropertyPointer nullPropertyPointer2 = (NullPropertyPointer)nullPropertyPointer1.clone();
boolean boolean0 = nullPropertyPointer1.equals(nullPropertyPointer2);
assertFalse(nullPropertyPointer2.equals((Object)nullPropertyPointer0));
assertEquals(Integer.MIN_VALUE, nullPropertyPointer2.getPropertyIndex());
assertTrue(boolean0);
}
@Test(timeout = 4000)
public void test73() throws Throwable {
NullPropertyPointer nullPropertyPointer0 = new NullPropertyPointer((NodePointer) null);
NullPropertyPointer nullPropertyPointer1 = new NullPropertyPointer(nullPropertyPointer0);
boolean boolean0 = nullPropertyPointer0.equals(nullPropertyPointer1);
assertEquals(Integer.MIN_VALUE, nullPropertyPointer1.getPropertyIndex());
assertFalse(boolean0);
}
@Test(timeout = 4000)
public void test74() throws Throwable {
NullPropertyPointer nullPropertyPointer0 = new NullPropertyPointer((NodePointer) null);
boolean boolean0 = nullPropertyPointer0.equals(nullPropertyPointer0);
assertTrue(boolean0);
assertEquals(Integer.MIN_VALUE, nullPropertyPointer0.getPropertyIndex());
}
@Test(timeout = 4000)
public void test75() throws Throwable {
NullPropertyPointer nullPropertyPointer0 = new NullPropertyPointer((NodePointer) null);
NullPropertyPointer nullPropertyPointer1 = new NullPropertyPointer(nullPropertyPointer0);
boolean boolean0 = nullPropertyPointer1.equals(nullPropertyPointer0);
assertFalse(boolean0);
assertEquals(Integer.MIN_VALUE, nullPropertyPointer1.getPropertyIndex());
}
@Test(timeout = 4000)
public void test76() throws Throwable {
Class<Object> class0 = Object.class;
JXPathBasicBeanInfo jXPathBasicBeanInfo0 = new JXPathBasicBeanInfo(class0, class0);
BeanPropertyPointer beanPropertyPointer0 = new BeanPropertyPointer((NodePointer) null, jXPathBasicBeanInfo0);
QName qName0 = beanPropertyPointer0.getName();
// Undeclared exception!
// try {
beanPropertyPointer0.createChild((JXPathContext) null, qName0, Integer.MIN_VALUE);
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("org.apache.commons.jxpath.ri.model.NodePointer", e);
// }
}
@Test(timeout = 4000)
public void test77() throws Throwable {
Class<Object> class0 = Object.class;
JXPathBasicBeanInfo jXPathBasicBeanInfo0 = new JXPathBasicBeanInfo(class0, class0);
BeanPropertyPointer beanPropertyPointer0 = new BeanPropertyPointer((NodePointer) null, jXPathBasicBeanInfo0);
beanPropertyPointer0.setIndex((-31));
// Undeclared exception!
// try {
beanPropertyPointer0.createPath((JXPathContext) null, (Object) null);
// fail("Expecting exception: RuntimeException");
// } catch(RuntimeException e) {
// //
// // Cannot set property: /* - no such property
// //
// verifyException("org.apache.commons.jxpath.ri.model.beans.BeanPropertyPointer", e);
// }
}
@Test(timeout = 4000)
public void test78() throws Throwable {
Class<NodePointer> class0 = NodePointer.class;
JXPathBasicBeanInfo jXPathBasicBeanInfo0 = new JXPathBasicBeanInfo(class0);
BeanPropertyPointer beanPropertyPointer0 = new BeanPropertyPointer((NodePointer) null, jXPathBasicBeanInfo0);
// Undeclared exception!
// try {
beanPropertyPointer0.createPath((JXPathContext) null);
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("org.apache.commons.jxpath.ri.model.NodePointer", e);
// }
}
@Test(timeout = 4000)
public void test79() throws Throwable {
Class<String> class0 = String.class;
JXPathBasicBeanInfo jXPathBasicBeanInfo0 = new JXPathBasicBeanInfo(class0);
BeanPropertyPointer beanPropertyPointer0 = new BeanPropertyPointer((NodePointer) null, jXPathBasicBeanInfo0);
boolean boolean0 = beanPropertyPointer0.isActual();
assertEquals(Integer.MIN_VALUE, beanPropertyPointer0.getPropertyIndex());
assertFalse(boolean0);
}
@Test(timeout = 4000)
public void test80() throws Throwable {
Class<NodePointer> class0 = NodePointer.class;
JXPathBasicBeanInfo jXPathBasicBeanInfo0 = new JXPathBasicBeanInfo(class0);
BeanPropertyPointer beanPropertyPointer0 = new BeanPropertyPointer((NodePointer) null, jXPathBasicBeanInfo0);
beanPropertyPointer0.setPropertyIndex(4);
boolean boolean0 = beanPropertyPointer0.isActual();
assertEquals(4, beanPropertyPointer0.getPropertyIndex());
assertTrue(boolean0);
}
@Test(timeout = 4000)
public void test81() throws Throwable {
NullPropertyPointer nullPropertyPointer0 = new NullPropertyPointer((NodePointer) null);
VariablePointer variablePointer0 = new VariablePointer((QName) null);
nullPropertyPointer0.bean = (Object) variablePointer0;
nullPropertyPointer0.getBean();
assertEquals(Integer.MIN_VALUE, nullPropertyPointer0.getPropertyIndex());
}
@Test(timeout = 4000)
public void test82() throws Throwable {
Class<BeanPropertyPointer> class0 = BeanPropertyPointer.class;
JXPathBasicBeanInfo jXPathBasicBeanInfo0 = new JXPathBasicBeanInfo(class0);
BeanPropertyPointer beanPropertyPointer0 = new BeanPropertyPointer((NodePointer) null, jXPathBasicBeanInfo0);
beanPropertyPointer0.compareChildNodePointers(beanPropertyPointer0, beanPropertyPointer0);
assertEquals(Integer.MIN_VALUE, beanPropertyPointer0.getPropertyIndex());
}
@Test(timeout = 4000)
public void test83() throws Throwable {
NullPropertyPointer nullPropertyPointer0 = new NullPropertyPointer((NodePointer) null);
QName qName0 = nullPropertyPointer0.getName();
VariablePointer variablePointer0 = new VariablePointer(qName0);
Class<String> class0 = String.class;
JXPathBasicBeanInfo jXPathBasicBeanInfo0 = new JXPathBasicBeanInfo(class0, class0);
BeanPropertyPointer beanPropertyPointer0 = new BeanPropertyPointer(variablePointer0, jXPathBasicBeanInfo0);
beanPropertyPointer0.setPropertyIndex(0);
// Undeclared exception!
// try {
beanPropertyPointer0.getLength();
// fail("Expecting exception: RuntimeException");
// } catch(RuntimeException e) {
// //
// // Undefined variable: *
// //
// verifyException("org.apache.commons.jxpath.ri.model.VariablePointer$1", e);
// }
}
}
| [
"[email protected]"
] | |
86c130f148dbf6f0d606defa64d511c8b8e11bd9 | 82a8f35c86c274cb23279314db60ab687d33a691 | /duokan/reader/domain/cloud/push/h.java | cdefd092f5f567fb6656ef963a192fdb174c4289 | [] | no_license | QMSCount/DReader | 42363f6187b907dedde81ab3b9991523cbf2786d | c1537eed7091e32a5e2e52c79360606f622684bc | refs/heads/master | 2021-09-14T22:16:45.495176 | 2018-05-20T14:57:15 | 2018-05-20T14:57:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,296 | java | package com.duokan.reader.domain.cloud.push;
import com.duokan.core.diagnostic.LogLevel;
import com.duokan.core.diagnostic.WebLog;
import com.duokan.reader.domain.account.PersonalAccount;
import com.duokan.reader.domain.cloud.push.MessageWakeupListener.MessageSubType;
class h implements ag {
final /* synthetic */ g a;
h(g gVar) {
this.a = gVar;
}
public void a(long j, String str, String str2) {
Object[] objArr = new Object[3];
objArr[0] = b.a;
objArr[1] = "onInit";
objArr[2] = String.format("code: %getTriangleEdge, id: %s, reason: %s", new Object[]{Long.valueOf(j), str, str2});
a.c().c(LogLevel.EVENT, "push", String.format("class: %s, method: %s, message: %s", objArr));
if (str == null) {
str = "";
}
this.a.a.a(str, this.a.a.e.b(PersonalAccount.class), false, new i(this, str));
}
public void a(MessageSubType messageSubType, Object obj, boolean z) {
MessageWakeupListener messageWakeupListener = (MessageWakeupListener) this.a.a.i.get(messageSubType);
if (messageWakeupListener != null) {
messageWakeupListener.a(messageSubType, obj, z);
}
}
public void a(DkCloudPushMessage dkCloudPushMessage) {
WebLog c = a.c();
LogLevel logLevel = LogLevel.EVENT;
String str = "push";
String str2 = "class: %s, method: %s, message: %s";
Object[] objArr = new Object[3];
objArr[0] = b.a;
objArr[1] = "onReceiveMessage";
objArr[2] = dkCloudPushMessage == null ? "null" : dkCloudPushMessage.getMessageContent();
c.c(logLevel, str, String.format(str2, objArr));
this.a.a.e();
this.a.a.a(this.a.a.i(), this.a.a.e.b(PersonalAccount.class), t.b().e());
}
public void a(String str, String str2, boolean z) {
a.c().c(LogLevel.EVENT, "push", String.format("class: %s, method: %s, message: %s", new Object[]{b.a, "onReceiveTopic", str2}));
MessageSubType messageSubType = MessageSubType.FICTION_UPDATE;
MessageWakeupListener messageWakeupListener = (MessageWakeupListener) this.a.a.i.get(messageSubType);
if (messageWakeupListener != null) {
messageWakeupListener.a(messageSubType, str2, z);
}
}
}
| [
"[email protected]"
] | |
8783807c420c3dbfaf63898b1ae9a3cda2a049a4 | a5a7c6814a41bc3d74c59072eb739cad8a714b33 | /src/main/src/org/omg/CORBA/UnknownUserExceptionHelper.java | c9769e0b99b8716fc3947499933f118b4bea4ca0 | [
"Apache-2.0"
] | permissive | as543343879/myReadBook | 3dcbbf739c184a84b32232373708c73db482f352 | 5f3af76e58357a0b2b78cc7e760c1676fe19414b | refs/heads/master | 2023-09-01T16:09:21.287327 | 2023-08-23T06:44:46 | 2023-08-23T06:44:46 | 139,959,385 | 3 | 3 | Apache-2.0 | 2023-06-14T22:31:32 | 2018-07-06T08:54:15 | Java | UTF-8 | Java | false | false | 2,807 | java | /*
* Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package org.omg.CORBA;
/**
* The Helper for <tt>UnknownUserException</tt>. For more information on
* Helper files, see <a href="doc-files/generatedfiles.html#helper">
* "Generated Files: Helper Files"</a>.<P>
* org/omg/CORBA/UnknownUserExceptionHelper.java
* Generated by the IDL-to-Java compiler (portable), version "3.0"
* from CORBA.idl
* Thursday, August 24, 2000 5:52:22 PM PDT
*/
abstract public class UnknownUserExceptionHelper
{
private static String _id = "IDL:omg.org/CORBA/UnknownUserException:1.0";
public static void insert (org.omg.CORBA.Any a, org.omg.CORBA.UnknownUserException that)
{
org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
a.type (type ());
write (out, that);
a.read_value (out.create_input_stream (), type ());
}
public static org.omg.CORBA.UnknownUserException extract (org.omg.CORBA.Any a)
{
return read (a.create_input_stream ());
}
private static org.omg.CORBA.TypeCode __typeCode = null;
private static boolean __active = false;
synchronized public static org.omg.CORBA.TypeCode type ()
{
if (__typeCode == null)
{
synchronized (org.omg.CORBA.TypeCode.class)
{
if (__typeCode == null)
{
if (__active)
{
return org.omg.CORBA.ORB.init().create_recursive_tc ( _id );
}
__active = true;
org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember [1];
org.omg.CORBA.TypeCode _tcOf_members0 = null;
_tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_any);
_members0[0] = new org.omg.CORBA.StructMember (
"except",
_tcOf_members0,
null);
__typeCode = org.omg.CORBA.ORB.init ().create_exception_tc (org.omg.CORBA.UnknownUserExceptionHelper.id (), "UnknownUserException", _members0);
__active = false;
}
}
}
return __typeCode;
}
public static String id ()
{
return _id;
}
public static org.omg.CORBA.UnknownUserException read (org.omg.CORBA.portable.InputStream istream)
{
org.omg.CORBA.UnknownUserException value = new org.omg.CORBA.UnknownUserException ();
// read and discard the repository ID
istream.read_string ();
value.except = istream.read_any ();
return value;
}
public static void write (org.omg.CORBA.portable.OutputStream ostream, org.omg.CORBA.UnknownUserException value)
{
// write the repository ID
ostream.write_string (id ());
ostream.write_any (value.except);
}
}
| [
"[email protected]"
] | |
c6e58a0bd059dfa5f9bf603401c08f0402277a5d | 8f51336678016178890ac85a36ca3375214d72a0 | /Share/app/src/main/java/com/melvin/share/modelview/item/ProductDetailItemViewModel.java | 1b401ab03ed1ab2c30f107072fc2c2157ba3daab | [] | no_license | MelvinWang/Share | 9b5a483360f2faa743fca3379ecb48fac57547b0 | 509a1d941f3a3141ab83b3a22e98f3a4e42bc1eb | refs/heads/master | 2020-05-21T20:26:00.395555 | 2016-11-23T16:28:43 | 2016-11-23T16:28:43 | 64,670,453 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,064 | java | package com.melvin.share.modelview.item;
import android.content.Context;
import android.databinding.BaseObservable;
import android.view.View;
import com.melvin.share.model.serverReturn.ImgUrlBean;
import com.melvin.share.model.serverReturn.ProductDetailBean;
/**
* Created Time: 2016/7/23.
* <p>
* Author:Melvin
* <p>
* 功能:单个商品item的ViewModel
*/
public class ProductDetailItemViewModel extends BaseObservable {
private ProductDetailBean.DetailsBean detailsBean;
private Context context;
public ProductDetailItemViewModel(Context context, ProductDetailBean.DetailsBean detailsBean) {
this.detailsBean = detailsBean;
this.context = context;
}
public void onItemClick(View view) {
}
public String getDetailName() {
return detailsBean.detailName+":";
}
public String getDetailValue() {
return detailsBean.detailValue;
}
public void setEntity(ProductDetailBean.DetailsBean detailsBean) {
this.detailsBean = detailsBean;
notifyChange();
}
}
| [
"[email protected]"
] | |
436b032ecd8277c6ac94ffda5aa534b16eeeaa1b | ef79fd479c9aff77a73a024e4d7959c97e005b5e | /src/main/java/PerformanceMain.java | d11ea8de0558e8cca3f75a4ca1571179824a6af0 | [] | no_license | VitalyKapustin/couchbase-performance | 43395bf3f2820a48175c9001a474795d89d6f037 | 63f272b93aded367cd9391912e8b675b1cc65a70 | refs/heads/master | 2021-01-20T04:32:17.597401 | 2015-08-21T13:54:56 | 2015-08-21T13:54:56 | 40,711,708 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,830 | java | //import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.util.StopWatch;
//
//import com.kapustin.couchbase.configuration.ApplicationContextProvider;
//import com.kapustin.couchbase.entity.Transaction1;
//import com.kapustin.couchbase.entity.Transaction2;
//import com.kapustin.couchbase.repository.Transaction1Repository;
//import com.kapustin.couchbase.repository.Transaction2Repository;
//import com.kapustin.couchbase.utils.Transaction1Generator;
//
///**
// * Created by v.kapustin on Aug 18, 2015.
// */
//public class PerformanceMain {
//
// @Autowired
// private Transaction2Repository transactionRepository;
//
// public static void main(String[] args) {
// PerformanceMain PerformanceMain = new PerformanceMain();
// PerformanceMain.run();
// }
//
// public void run() {
// ApplicationContextProvider.getInstance().autowireObject(this);
// Iterable<Transaction2> iterable = transactionRepository.findAll();
//// transactionRepository.deleteAll();
//// System.out.println("count: " + transactionRepository.count());
//// for (Transaction transaction : transactionRepository.findAll()) {
//// System.out.println(transaction);
//// }
//// StopWatch stopWatch = new StopWatch();
//// for (int i = 0; i < 5; i++) {
//// Transaction transaction = TransactionGenerator.generateTransaction(1024);
//// stopWatch.start();
//// transaction.setId(transactionRepository.save(transaction).getId());
//// stopWatch.stop();
//// System.out.println(transaction);
////
//// System.out.println("write time: " + stopWatch.getLastTaskTimeMillis());
//// }
//// System.out.println("total write time: " + stopWatch.getTotalTimeMillis());
//// transactionRepository.deleteAll();
//// System.out.println("count: " + transactionRepository.count());
// }
//}
| [
"[email protected]"
] | |
cfeb139a811d56faa30d5fd241750fc0270dbe4d | d2ec4a093e97097f72f59fa64d99bef95bc43555 | /Text/src/Text00701.java | 08cff2055ff6d9207ae9f7adb9a4e39e2f3b0d49 | [] | no_license | wuyong1992/java_data_study | b5ed4be3e6ac8f7cd719b5f90ec1595e27a50267 | 54aaec3a874361c79294f142525a1f151a172540 | refs/heads/master | 2021-01-12T14:46:30.971375 | 2016-11-21T10:23:59 | 2016-11-21T10:23:59 | 72,085,772 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 500 | java | import java.util.ArrayList;
/**
* 利用ArrayList求个数
* @author Administrator
*
*/
public class Text00701 {
Integer i, j;
public void aliquot(Integer i, Integer j) {
this.i = i;
this.j = j;
Integer all = 0;
ArrayList<Integer> a = new ArrayList<>();
for (int k = 0; k <= i; k++) {
if (k % j == 0) {
a.add(k);
all = all + k;
}
}
System.out.println(a.size());
System.out.println(all);
Double SUM = (double) all/a.size();
System.out.println(SUM);
}
}
| [
"[email protected]"
] | |
1feecb768a02aca8ad10077073b5d8af2110b529 | afd572566a045184ec6af501ef2af11266a64704 | /app/src/main/java/com/application/boxmadikv1/cliente/menu/crearPropuesta/especialidades/EspecialidadActivity.java | f262d4fea32ff37e6393a24ad719fdb578947918 | [] | no_license | luisrojash/BoxMadikApp | 393dd60c26e84a77a3eca00467c225f56f028a8d | cfb6b98bf57456ef5926d6bff00cc1772fe38de1 | refs/heads/master | 2022-11-23T12:41:35.067982 | 2020-07-03T15:42:36 | 2020-07-03T15:42:36 | 276,934,247 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 9,828 | java | package com.application.boxmadikv1.cliente.menu.crearPropuesta.especialidades;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import com.google.android.material.snackbar.Snackbar;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.util.Log;
import android.view.KeyEvent;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
import android.widget.AdapterView;
import android.widget.AutoCompleteTextView;
import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.TextView;
import com.application.boxmadikv1.R;
import com.application.boxmadikv1.base.UseCaseHandler;
import com.application.boxmadikv1.base.UseCaseThreadPoolScheduler;
import com.application.boxmadikv1.base.activity.BaseActivity;
import com.application.boxmadikv1.cliente.menu.crearPropuesta.atencion.AtencionActivity;
import com.application.boxmadikv1.cliente.menu.crearPropuesta.especialidades.adapter.BuscarEspecialidadAdapter;
import com.application.boxmadikv1.cliente.menu.crearPropuesta.especialidades.adapter.EspecialidadItemAdapter;
import com.application.boxmadikv1.cliente.menu.crearPropuesta.especialidades.dataSource.EspecialidadRepository;
import com.application.boxmadikv1.cliente.menu.crearPropuesta.especialidades.dataSource.local.EspecialidadLocal;
import com.application.boxmadikv1.cliente.menu.crearPropuesta.especialidades.entidad.EspecialidadUi;
import com.application.boxmadikv1.cliente.menu.crearPropuesta.especialidades.listener.BuscarListener;
import com.application.boxmadikv1.cliente.menu.crearPropuesta.especialidades.listener.EspecialidadListener;
import com.application.boxmadikv1.cliente.menu.crearPropuesta.especialidades.useCase.ListarAutoComplete;
import com.application.boxmadikv1.dao.InjectorUtils;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.bumptech.glide.request.RequestOptions;
import java.util.ArrayList;
import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
public class EspecialidadActivity extends BaseActivity<EspecialidadView, EspecialidadPresenter> implements EspecialidadView, EspecialidadListener, BuscarListener {
public static final String TAG = EspecialidadActivity.class.getSimpleName();
public static final int SECOND_ACTIVITY_REQUEST_CODE_ESPECIALIDAD = 0;
@BindView(R.id.autoCompleteTextView1)
AutoCompleteTextView autoCompleteTextViewEspecialidad;
@BindView(R.id.imageViewRubro)
ImageView imageViewRubroPerf;
@BindView(R.id.textViewNombreOficio)
TextView textViewNombreOficio;
@BindView(R.id.recicladorItems)
RecyclerView recyclerView;
EspecialidadItemAdapter especialidadItemAdapter;
BuscarEspecialidadAdapter buscarEspecialidadAdapter;
@Override
protected String getTag() {
return TAG;
}
@Override
protected AppCompatActivity getActivity() {
return this;
}
@Override
protected EspecialidadPresenter getPresenter() {
EspecialidadRepository especialidadRepository = EspecialidadRepository.getmInstance(
new EspecialidadLocal(InjectorUtils.provideEspecialidadesDao()));
return new EspecialidadPresenterImpl(new UseCaseHandler(new UseCaseThreadPoolScheduler())
, getResources()
, new ListarAutoComplete(especialidadRepository));
}
@Override
protected EspecialidadView getBaseView() {
return this;
}
@Override
protected Bundle getExtrasInf() {
return getIntent().getExtras();
}
@Override
protected void setContentView() {
setContentView(R.layout.activity_menu_cliente_especialidad);
ButterKnife.bind(this);
initAdapter();
}
private void initAdapter() {
recyclerView.setLayoutManager(new LinearLayoutManager(this));
especialidadItemAdapter = new EspecialidadItemAdapter(new ArrayList<EspecialidadUi>(), this);
recyclerView.setHasFixedSize(true);
recyclerView.setAdapter(especialidadItemAdapter);
}
@Override
protected ProgressBar getProgressBar() {
return null;
}
@Override
public void mostrarVistaCabecera(String imagenRubro, String nombreOficio) {
RequestOptions requestOptions = new RequestOptions()
.diskCacheStrategy(DiskCacheStrategy.ALL)
.skipMemoryCache(true);
Glide.with(this)
.applyDefaultRequestOptions(requestOptions)
.load(imagenRubro).into(imageViewRubroPerf);
textViewNombreOficio.setText(nombreOficio);
}
@Override
public void mostrarListaAutoComplete(List<EspecialidadUi> especialidadUiList) {
buscarEspecialidadAdapter = new BuscarEspecialidadAdapter(this, especialidadUiList, this);
autoCompleteTextViewEspecialidad.setAdapter(buscarEspecialidadAdapter);
autoCompleteTextViewEspecialidad.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
EspecialidadUi especialidadUi = (EspecialidadUi) parent.getAdapter().getItem(position);
presenter.onClickAutoComplete(especialidadUi);
Log.d(TAG, "especialidadUi : " + especialidadUi.getDescripcion());
}
});
}
@Override
public void mostrarMensaje(String mensaje) {
Snackbar.make(recyclerView, mensaje, Snackbar.LENGTH_SHORT).show();
}
@Override
public void agregarItemEspecialidad(EspecialidadUi especialidadUi) {
especialidadItemAdapter.agregarItem(especialidadUi);
}
@Override
public void validarItemsAgregar(EspecialidadUi especialidadUi) {
int contarItem = especialidadItemAdapter.getItemCount();
if (especialidadItemAdapter == null) return;
presenter.onValidarItemsAgregar(contarItem, especialidadUi);
}
@Override
public void startActivityHorarioAtencion(ArrayList<String> listaIdEspecialidades, int idRubro, int idOficio, String imageRubro, String nombreOficio,
int posicionTipoPrecio, int posicionTipoTurno, int posicionTipoDias,String codigoPais) {
Intent intent = new Intent(EspecialidadActivity.this, AtencionActivity.class);
intent.putExtra("rubroId", idRubro);
intent.putExtra("oficioId", idOficio);
intent.putExtra("imageRubro", imageRubro);
intent.putExtra("nombreOficio", nombreOficio);
intent.putExtra("posicionTipoPrecio", posicionTipoPrecio);
intent.putExtra("posicionTipoTurno", posicionTipoTurno);
intent.putExtra("posicionTipoDias", posicionTipoDias);
intent.putExtra("mylist", listaIdEspecialidades);
intent.putExtra("codigoPais",codigoPais);
// startActivity(intent);
startActivityForResult(intent, SECOND_ACTIVITY_REQUEST_CODE_ESPECIALIDAD);
}
@Override
public void mostrarOnclickLista(List<EspecialidadUi> listaEspecialidadCompleta) {
// buscarEspecialidadAdapter.agregandoListaOnClick(listaEspecialidadCompleta);
}
@Override
public void ClearEditText() {
autoCompleteTextViewEspecialidad.getText().clear();
}
@Override
public void eliminarEspecialidad(EspecialidadUi especialidadUi) {
especialidadItemAdapter.eliminarItem(especialidadUi);
}
@OnClick({R.id.btnAgregar, R.id.btnSiguiente, R.id.autoCompleteTextView1})
public void onClick(View view) {
int itemId = view.getId();
switch (itemId) {
case R.id.btnAgregar:
String tipoEspec = autoCompleteTextViewEspecialidad.getText().toString();
presenter.onClickAgregarItem(tipoEspec);
ClearEditText();
onOcultarTeclado();
break;
case R.id.btnSiguiente:
presenter.onClickSiguiente();
break;
case R.id.autoCompleteTextView1:
Log.d(TAG, "autoCompleteTextView1");
presenter.onClickEspecialidad();
//buscarEspecialidadAdapter.getFilter().convertResultToString()
break;
}
}
@Override
public void onItemClickEspecialidadDelete(EspecialidadUi especialidadUi) {
// especialidadItemAdapter.eliminarItem(especialidadUi);
presenter.onItemClickEspecialidadDelete(especialidadUi);
}
@Override
public void onOcultarTeclado() {
Log.d(TAG, "OCULTARTECLADO");
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(autoCompleteTextViewEspecialidad.getWindowToken(), 0);
//getActivity().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
}
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK) {
Log.d(TAG, "onKeyDown : ");
return true;
}
return super.onKeyDown(keyCode, event);
}
@Override
public void onBackPressed() {
Log.d(TAG, "onBackPressed : ");
return;
//super.onBackPressed();
}
// This method is called when the second activity finishes
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
Log.i(TAG, "ACtivity:onActivityResult");
presenter.onActivityResult(requestCode, resultCode, data);
//super.onActivityResult(requestCode, resultCode, data);
}
}
| [
"[email protected]"
] | |
16a023fe33929d3cff5b9b45a32dcd33119cc28e | 77a0a5076024423f0b4f16b976daae847a40947d | /src/main/java/com/almor/task6/service/UserService.java | 0df8c03c60398305d9249c938b5378818e227f31 | [] | no_license | AlexandrMorozov/N6 | f4595793953dbd9194c0e5c1d65edc17ff35144f | d37d99beaa3aeed821970bbc0a07c5b4169aa5a6 | refs/heads/master | 2023-04-08T03:17:14.784974 | 2021-04-19T19:30:10 | 2021-04-19T19:30:10 | 359,588,708 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,272 | java | package com.almor.task6.service;
import com.almor.task6.model.User;
import com.almor.task6.repos.UserRepo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.stereotype.Service;
@Service
public class UserService implements UserDetailsService {
@Autowired
UserRepo userRepo;
@Autowired
BCryptPasswordEncoder passwordEncoder;
@Override
public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
User user = userRepo.findByName(username);
if (user == null) {
throw new UsernameNotFoundException("User fot found");
}
return user;
}
public boolean saveUser(User user) {
User dbUser = userRepo.findByName(user.getUsername());
if (dbUser != null) {
return false;
}
user.setPassword(passwordEncoder.encode(user.getPassword()));
userRepo.save(user);
return true;
}
}
| [
"[email protected]"
] | |
0ac0bbaf5f6abd138a9165cb5cf9fdee76d7c610 | 02fbda4190058621c8f09f12f509edd52b4cbda3 | /src/main/java/com/cos/pic/config/WebMvcConfig.java | 1afb520bd9ba345d57c335dd995b0a173b3315ee | [] | no_license | ga-hyun-92/pic | 0631f7b6e1c33283d5933e252848a594467cde34 | cad7a462ccfb8e9704319e88173a950ab2a4d004 | refs/heads/master | 2023-06-25T23:18:20.816901 | 2021-07-28T07:08:01 | 2021-07-28T07:08:01 | 390,250,293 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,009 | java | package com.cos.pic.config;
import com.cos.pic.utils.MyPath;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.servlet.resource.PathResourceResolver;
@Configuration
public class WebMvcConfig implements WebMvcConfigurer {
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
System.out.println("나 실행됐어?");
WebMvcConfigurer.super.addResourceHandlers(registry);
// 외부경로 이동할때 프로토콜!!!!!!!! ==>file:///
// /upload/** 로 쓰여진 경로는 "file:///" + MyPath.IMAGEPATH 이렇게 바꿔준다!!
registry.addResourceHandler("/upload/**").addResourceLocations("file:///" + MyPath.IMAGEPATH)
.setCachePeriod(60 * 10 * 6).resourceChain(true).addResolver(new PathResourceResolver());
}
}
| [
"[email protected]"
] | |
26a8d1cc25cdce22c8399302cb5bbdd25e9cb59d | 78504c94d10b907f42681c01f6bc6694de0530bb | /NYAVT/src/Kullanici/IKullaniciIslem.java | 28639a6f7f49087ba555e5a26bbe05b8608da801 | [] | no_license | YusufSonmezz/NYAVT | fe827f59c0b08dbf9afbf6324335369da89bbc3c | 766fd55f92e01b203059e32509f9de4d0ee634d8 | refs/heads/main | 2023-04-27T10:46:50.911720 | 2021-05-17T07:12:03 | 2021-05-17T07:12:03 | 368,089,804 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 162 | java | package Kullanici;
import java.sql.SQLException;
public interface IKullaniciIslem {
public void KIslem(Kullanici kullanici) throws SQLException;
}
| [
"[email protected]"
] | |
25bf4e1ef3042c3d763601d7f51dfe07cb89993c | da559f4e17960d8b832cce17e195536132e6f54f | /utils/src/main/java/jetbrains/exodus/core/dataStructures/FakeObjectCache.java | 428e3ab7fdd063381c1bef54c845de854af5c45c | [
"Apache-2.0"
] | permissive | JohannesLichtenberger/xodus | 994a2ab685fd3285dc291f5e9e38999a48aa79ec | 21f002dedf81c1e39e663b9e7e91eb3e259d9dd6 | refs/heads/master | 2020-12-26T14:23:30.947629 | 2020-01-31T11:19:07 | 2020-01-31T11:19:07 | 237,536,501 | 1 | 0 | Apache-2.0 | 2020-01-31T23:57:19 | 2020-01-31T23:57:18 | null | UTF-8 | Java | false | false | 2,187 | java | /**
* Copyright 2010 - 2020 JetBrains s.r.o.
*
* 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
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package jetbrains.exodus.core.dataStructures;
import jetbrains.exodus.core.execution.SharedTimer;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
public class FakeObjectCache<K, V> extends ObjectCacheBase<K, V> {
public FakeObjectCache() {
this(0);
}
private FakeObjectCache(int size) {
super(size);
}
@Override
public void clear() {
// do nothing
}
@Override
public void lock() {
// do nothing
}
@Override
public void unlock() {
// do nothing
}
@Override
public V cacheObject(@NotNull K key, @NotNull V x) {
return null;
}
@Override
public V remove(@NotNull K key) {
return null;
}
@Override
public V tryKey(@NotNull K key) {
return null;
}
@Override
public V getObject(@NotNull K key) {
return null;
}
@Override
public int count() {
return 0;
}
@Override
public int getAttempts() {
return 0;
}
@Override
public int getHits() {
return 0;
}
@Override
public float hitRate() {
return 0;
}
@Override
public CriticalSection newCriticalSection() {
return TRIVIAL_CRITICAL_SECTION;
}
@Override
protected void incAttempts() {
// do nothing
}
@Override
protected void incHits() {
// do nothing
}
@Nullable
@Override
protected SharedTimer.ExpirablePeriodicTask getCacheAdjuster() {
return null;
}
}
| [
"[email protected]"
] | |
0e550f47060c5a239986ee4d4091c15bcbb9bea5 | 445ea58f3d6417363bbd4b55425c7b03dbb21555 | /Javaprgs/GUI/regex/regpwd.java | 4f5cd3e45409048a4c58dce5d12cc725253821b6 | [] | no_license | gowtham-R-2001/javaprgs | 6039df63ffce96a48b4c4d41e3004ca329953210 | 5ee6f353a10bf31b2ccc45b58ee7fac39cb14ffd | refs/heads/master | 2023-03-26T03:06:57.792504 | 2021-03-29T07:47:01 | 2021-03-29T07:47:01 | 349,989,729 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 879 | java | import java.io.*;
import java.util.regex.*;
class regpwd
{
public static void main(String args[])throws IOException
{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) ;
String s = "" ;
System.out.print(" Enter PWD : ") ;
s = br.readLine() ;
String ptn1 = "(([a-zA-Z]+[0-9]+[~!@#&\\$%\\^\\*]+)|";
String ptn2 = "([a-zA-Z]+[~!&@#\\$%\\^\\*]+[0-9]+)|" ;
String ptn3 = "([0-9]+[a-zA-Z]+[~!@&#\\$%\\^\\*]+)|" ;
String ptn4 = "([0-9]+[~!@&#\\$%\\^\\*]+[a-zA-Z]+)|" ;
String ptn5 = "([~!@&#\\$%\\^\\*]+[0-9]+[a-zA-Z]+)|" ;
String ptn6 = "([~!@&#\\$%\\^\\*]+[a-zA-Z]+[0-9]+))" ;
String ptn = ptn1 + ptn2 + ptn3 + ptn4 + ptn5 + ptn6 ;
Pattern p = Pattern.compile(ptn) ;
Matcher m = p.matcher(s) ;
boolean result = m.matches() ;
if(result)
System.out.println(" Valid ") ;
else
System.out.println(" Invalid ") ;
}
} | [
"[email protected]"
] | |
3efb5ae37fbf356c0a67e01a28a595fbc3abe1df | 71605771131c9ef55ebe3b43a8190a641acffba3 | /src/main/java/com/zc/student_dev/config/shiro/ShiroSessionManager.java | a2a3d8ebf6f5b622046351e307d99e60c96226c6 | [] | no_license | ZCLCY/student_dev | 2980790226dc520c0e65b20fd38514cd8d059f8c | 77f49ce70a7d2e17a70047a2c9740fe7c2fa9c34 | refs/heads/master | 2020-04-09T12:07:24.786203 | 2019-03-18T02:24:41 | 2019-03-18T02:24:41 | 160,336,280 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 481 | java | package com.zc.student_dev.config.shiro;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.web.servlet.ShiroHttpServletRequest;
import org.apache.shiro.web.session.mgt.DefaultWebSessionManager;
import org.apache.shiro.web.util.WebUtils;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import java.io.Serializable;
public class ShiroSessionManager extends DefaultWebSessionManager {
}
| [
"[email protected]"
] | |
f30ca5049f2a18bf83aebecd56525bbc3855dcbc | a1ed27465d1c71458a6b4ce513f466c977bfe14a | /src/main/java/voyager/quickstart/extractor/xml/setter/MetaTextField.java | 1ad48ff761c1f83e66a367c5071e31ca35ba1473 | [
"Apache-2.0"
] | permissive | slick514/quickstart-java | 43492fbc6c7aca7414a472b45c84e813e2be4b3f | df4cd1fd9d45868ae6ab55e57edf34c18b77d4be | refs/heads/master | 2021-01-21T18:14:33.268164 | 2016-04-29T20:10:41 | 2016-04-29T20:11:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 402 | java | package voyager.quickstart.extractor.xml.setter;
import voyager.api.domain.model.entry.Entry;
public class MetaTextField implements FieldSetter {
public MetaTextField() {
}
@Override
public void process(Entry entry, String localName, CharSequence fqn, String text) {
entry.getFields().setField("meta_"+
localName.replace('-', '_').replace('.', '_'), text, 1.0f);
}
}
| [
"[email protected]"
] | |
5d0b186cac972c82d0448a0000edd41475e54114 | ea8ae750711ff95cafa1c0ba63b004384ebcbd97 | /eclipse-workspace/OmniAutomation/src/dterm/DTermNFC.java | 71db5571f222dcec3eb3cd0e03f2a44fd6dbc45d | [] | no_license | quicktime/omni-atuomation | 9e72920e4cd44b24b20b306a10babe03eb367548 | 2be2ac947a03d5dcec6002f5f65023f5bd65790a | refs/heads/master | 2021-04-12T12:09:05.070736 | 2019-11-20T23:57:57 | 2019-11-20T23:57:57 | 126,523,895 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 438 | java | package dterm;
/**
* Handles all NFC actions taken in DTerm
* @author Brendan Dolan
* @date Created on: Mar 26, 2018
*/
public class DTermNFC extends BaseState {
/**
* Sets the cartridge nfc tag to the passed in value
* @param nfc
*/
public static void setCartNFC(String nfc) {
window().setActive();
SendCommand.send("load interface omni");
SendCommand.send("device 1");
SendCommand.send("setcartnfc " + nfc);
}
}
| [
"[email protected]"
] | |
6402bfd22587e00ee69978ae6f871eb588badbe9 | 33a587ffc789c4f7d60c1205c8646d6f57407140 | /Vehicle.java | d1fce3307f2509d462cc2ef959b6ff5f56d92209 | [] | no_license | memetibryan/Java-car-Dealership | cf802e53fc386bfc8eb2ca9935b90d5e03953164 | 56dd7b02c2d6829687d061224e05eddb9ef2c9d8 | refs/heads/master | 2021-01-01T16:18:46.811798 | 2017-07-20T08:23:33 | 2017-07-20T08:23:33 | 97,808,853 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 681 | java | class Vehicle {
private int mYear;
private String mBrand;
private String mModel;
private int mKilometers;
private int mPrice;
public Vehicle(int year, String brand, String model, int kilometers, int price) {
mYear = year;
mBrand = brand;
mModel = model;
mKilometers = kilometers;
mPrice = price;
}
public boolean worthBuying(int maxPrice){
return (mPrice < maxPrice);
}
public int getPrice() {
return mPrice;
}
public int getYear() {
return mYear;
}
public String getBrand() {
return mBrand;
}
public String getModel() {
return mModel;
}
public int getKilometers() {
return mKilometers;
}
} | [
"[email protected]"
] | |
d6e3a86513792fd1aa27fdfbbd9d754717306530 | 122f00894dd2f93a06004d3d0ea5e65e6ffe8c0c | /RxJava/src/main/java/cn/zyh/rxjavademot/network/api/ElementApi.java | 03fca39ae0a686c718375f9defcde58994c05cdc | [] | no_license | zhuyonghao134123/RxJava | 57f728563a7b3599075348b86230797321113b51 | c5b79028949f6dddb6fe8b87d758489aeeb6cbb1 | refs/heads/master | 2021-06-11T23:32:59.510762 | 2016-11-10T06:24:17 | 2016-11-10T06:24:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 836 | java | package cn.zyh.rxjavademot.network.api;
import java.util.List;
import cn.zyh.rxjavademot.module.elementary_1.model.ElementImageModel;
import retrofit2.http.GET;
import retrofit2.http.Query;
import rx.Observable;
/**
* Project_Name:TestInternet
* Author:朱永豪
* Email:[email protected]
* on 2016/10/11.
*/
public interface ElementApi {
/** retrofit形式*/
// @GET("/user")
// public void getUser(@Query("userId") String userId, Callback<User> callback);
// @GET("search")
// public void search(@Query("q"),String id,Callback<ElementImageModel> callback);
/**RxJava形式*/
// @GET("/user")
// public Observable<User> getUser(@Query("userId") String userId);
/**Element搜索图片*/
@GET("search")
Observable <List<ElementImageModel>> search(@Query("q") String searchKey);
}
| [
"[email protected]"
] | |
7dc7092fc45cc4135d75ec6e665169f4ecdf39ba | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/MATH-61b-1-12-FEMO-WeightedSum:TestLen:CallDiversity/org/apache/commons/math/MathRuntimeException_ESTest_scaffolding.java | 697b2f7c667a58dc89011dbf9eb536c23186f2ba | [] | no_license | STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application | cf118b23ecb87a8bf59643e42f7556b521d1f754 | 3bb39683f9c343b8ec94890a00b8f260d158dfe3 | refs/heads/master | 2022-07-29T14:44:00.774547 | 2020-08-10T15:14:49 | 2020-08-10T15:14:49 | 285,804,495 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 448 | java | /**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Sat Apr 04 08:41:40 UTC 2020
*/
package org.apache.commons.math;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class MathRuntimeException_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
| [
"[email protected]"
] | |
e57805c046289044272418104ad4a946650e2277 | 2fca51877b2b45479c81b7b65a9f3dfd230eccb6 | /src/mc_plugin/CommandTP.java | f85e5c7d62a0632985d7a5d934d0b6ad32a57f7d | [] | no_license | JojoGelb/Minecraft_plugin_vrac | c67b1a70457238431ab95753edf00efe03fbb1a9 | 69e257aa56c99ce4623b82c62c1e8ae3ae59fa8d | refs/heads/master | 2023-06-05T14:10:53.382537 | 2021-06-23T13:24:04 | 2021-06-23T13:24:04 | 379,612,018 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,804 | java | package mc_plugin;
import java.util.Random;
import org.bukkit.Location;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class CommandTP implements CommandExecutor {
/* ========================================================
Objets de la classe
======================================================== */
public Main main;
/* ========================================================
Constructeur
======================================================== */
//Constructor: appellé lorsque la classe est généré dans le code
//(bien pour passé des objets en paramètre ou créé des objets utiles pour après)
public CommandTP(Main main) {
this.main = main;
}
/* ========================================================
Méthodes
======================================================== */
@Override
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
// TODO Auto-generated method stub
if(sender instanceof Player) {
Player player = (Player) sender;
if(cmd.getName().equalsIgnoreCase("tpRandom")){
Random rand = new Random();
Location playerLocation = player.getLocation();
Location randomLocation = new Location(player.getWorld(), playerLocation.getX() + rand.nextInt(50),
playerLocation.getY(),
playerLocation.getZ() + rand.nextInt(50));
player.teleport(randomLocation);
return true;
}
//Position dans l'espace: x,y,z direction regard
Location spawn = new Location(player.getWorld(), 0.5,102,0.5, 0.5f, 0f);
player.sendMessage("§2Retour au spawn");
player.teleport(spawn);
}
return false;
}
}
| [
"[email protected]"
] | |
87c19ff96ece7b0bc6149d3065b1bcf0ae457515 | 7fd42a079a7a7f39e06ed5fe2805977b4d2c0ad3 | /src/main/java/com/joseph/bullhorn/UserRepository.java | dcc7e7dea91c9f4d1c52b13fc5798e372bce6b78 | [] | no_license | jphomick/bullhorn | 6e90f63b1cac0b83e258c67b6572234c7facb627 | ae52f1a37d6d00c8a98adc42c30b195b22879f6a | refs/heads/master | 2020-06-14T05:30:14.722861 | 2019-07-16T20:13:57 | 2019-07-16T20:13:57 | 194,918,104 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 246 | java | package com.joseph.bullhorn;
import org.springframework.data.repository.CrudRepository;
public interface UserRepository extends CrudRepository<User, Long> {
User findByUsername(String username);
Long countByUsername(String username);
}
| [
"[email protected]"
] | |
76013e08d79d1e803ccb1ecc7222a46cc90ed431 | ef0ba2eb15da552a056a0c376ea83f295ef13f13 | /app/src/test/java/com/example/main/di/ExampleUnitTest.java | 47e58e48ba49bc224281b2fc07547d1ef529981f | [] | no_license | SherifAzim/Android_CleanArchitecture_Room_Hilt | 5dfface144cd58ad4d3df6c2895169cf72fec2dc | 3d99ef61f04cdab55ab9af60e3c12eed1d1e3ac1 | refs/heads/master | 2023-05-14T11:23:58.148168 | 2021-06-08T13:03:37 | 2021-06-08T13:11:09 | 373,090,082 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 380 | java | package com.example.main.di;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
} | [
"[email protected]"
] | |
3cc91f61ff714fe10c6d00537442d196e3507260 | d8abb1b038ca38a2a988722d70055c562b912390 | /OOP/lab5/src/com/company/BurningShip.java | 905e53ef093ed48cc9d5751af5a841075c780269 | [] | no_license | Syslik09/OOP | 489512d91efa9fec7074f38e077cf441d46000dd | 0cd45c741ab3b0eff3a458a26dcd6f0662e0507b | refs/heads/master | 2023-02-27T04:43:43.667006 | 2021-02-04T19:42:17 | 2021-02-04T19:42:17 | 296,403,951 | 0 | 0 | null | 2021-02-04T19:40:31 | 2020-09-17T18:01:51 | Java | UTF-8 | Java | false | false | 1,560 | java | package com.company;
import java.awt.geom.Rectangle2D;
public class BurningShip extends FractalGenerator{
/*Constant for number of maximum iterations count */
public static final int MAX_ITERATIONS = 2000;
public void getInitialRange(Rectangle2D.Double range){
range.x = -2;
range.y = -2.5;
range.width = 4;
range.height = 4;
}
public int numIterations(double x, double y)
{
/* Start iteration with 0 count */
int iterNum = 0;
double zReal = 0; // Real z part
double zImaginary = 0; // Imaginary z part
/*
* Computes Zn=(|[Re(zn-1)]| + i|[img(zn-1)]|)^2 + c
* zReal and zImaginary are parts of complex number. C - is the particular point of fractal,
* given by x, y. Iterated until |z|>2 or maximum number of iterations reached
* */
while (iterNum < MAX_ITERATIONS && zReal * zReal + zImaginary * zImaginary < 4) {
double zrealUpdated = zReal * zReal - zImaginary * zImaginary + x;
double zimaginaryUpdated = 2 * Math.abs(zReal) * Math.abs(zImaginary) + y;
zReal = zrealUpdated;
zImaginary = zimaginaryUpdated;
iterNum += 1;
}
/*
* Return -1 in order to show that the point is inside the boundary
*/
if (iterNum == MAX_ITERATIONS) {
return -1;
}
return iterNum;
}
public String toString(){
return "Burning ship";
}
} | [
"[email protected]"
] | |
fb4b4d8c203c3bdc8a176800b78446306a491c0d | c34620e513a711279cc434cada070c40c6178194 | /app/src/main/java/com/example/dagger2_example/model/part07/NCBatterModule.java | 9eb0eeaba208dc1429845a2302139ccdda780df6 | [] | no_license | razaghimahdi/dagger2-java-practice | 0d8b349bc5b867435ae284f2c90cffc4df9db135 | 23419cc58a3f59c6e42948c103ba645b369bb190 | refs/heads/master | 2023-01-04T06:59:58.239107 | 2020-11-06T07:57:01 | 2020-11-06T07:57:01 | 308,903,834 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 857 | java | package com.example.dagger2_example.model.part07;
import dagger.Binds;
import dagger.Module;
//@Module
//public class NCBatterModule {
//
// @Provides/**Dagger recognizes this returned dependency by considering the return of the provider method, it means Dagger will recognize this dependency as a battery*/
// Battery provideBattery(NickelCadmiumBattery nickelCadmiumBattery) {/**As we have annotated the constructor of the NickelCadmiumBattery with inject annotation dagger can construct that dependency.
// so we use that dependency here.*/
// nickelCadmiumBattery.showType();
// return nickelCadmiumBattery;
// }
//
//
//}
@Module
abstract class NCBatterModule {/**there is another way to use interface which is using abstract*/
@Binds
abstract Battery bindBattery(NickelCadmiumBattery nickelCadmiumBattery) ;
}
| [
"[email protected]"
] | |
d82742ac6cb006272eca75879293e5372320dafe | 234d011939a1fef6c132aff3fd3df8c26a125716 | /app/src/main/java/com/example/srinivas/constraintlayoutpractice/MainActivity.java | fdd7ab37ca339db5ffcce1167f3013b8eab652db | [] | no_license | SrinivasaRaoMakkena/ConstraintLayout | f41234d0ad11f0fcbd0a5a9be4985ea685dd987f | 29757e93dd14abe0cb8e89201a68cd327e3ae8e7 | refs/heads/master | 2021-08-26T08:37:03.148786 | 2017-11-22T15:46:42 | 2017-11-22T15:48:39 | 111,702,607 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 439 | java | package com.example.srinivas.constraintlayoutpractice;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
@Override
protected void onResume() {
super.onResume();
}
}
| [
"[email protected]"
] | |
41824296661d1bfd49eeb7aabd34c6f680293f6a | 463b8e8255366fac0968447a2737621a84915308 | /DSP1/src/com/company/Main.java | 1a945327b56bb324586ad74ee948d4c199222dd6 | [] | no_license | Programatic/DSHW | b94aa9aa18fd47b76e105aabe5b56ba9fdaf0612 | 566c327373a1433eb7fdcf4690326d346f3500f2 | refs/heads/master | 2020-07-28T11:57:36.644144 | 2019-12-03T20:52:01 | 2019-12-03T20:52:01 | 209,403,114 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,953 | java | package com.company;
public class Main {
/**
* Counts the number of courses starting with a given prefix
* @param list The list of courses
* @param prefix The given prefix
* @return the count of courses
*/
public static int prefixCountArrayList(CourseArrayList list, String prefix){
int counter = 0;
for (int i = 0 ; i < list.size(); i++) {
if (list.search(i).getCourseID().startsWith(prefix)) counter++;
}
return counter;
}
/**
* Counts the number of courses starting with a given prefix
* @param list The list of courses
* @param prefix The given prefix
* @return the count of courses
*/
public static int prefixCountLinkedList(CourseLinkedList list, String prefix){
int counter = 0;
for (int i = 0 ; i < list.size(); i++) {
if (list.search(i).getCourseID().startsWith(prefix)) counter++;
}
return counter;
}
public static void main (String [] args)
{
CourseArrayList alist = new CourseArrayList();
Course course1 = new Course("MATH444", 30);
Course course2 = new Course("EECS123", 120);
Course course3 = new Course("EECS233", 140);
Course course4 = new Course("EBME399", 50);
// Add course objects to arraylist
alist.addCourse(0, course1);
alist.addCourse(0, course2);
alist.addCourse(5, course3);
alist.addCourse(3, course4);
System.out.println("----------------------------------------");
//Testing ArrayList methods
System.out.println("Capacity of " + alist.search(1).getCourseID() + " is " + alist.search(1).getCapacity());
System.out.println("\nCapacity of EECS233: " + alist.getList()[2].getCapacity());
System.out.println("Change capacity method: " + alist.changeCapacity("EECS233", 100));
System.out.println("Change capacity method: " + alist.changeCapacity("EECS133", 100));
System.out.println("Capacity of EECS233: " + alist.getList()[2].getCapacity());
System.out.println("\nNumber of courses: " + alist.size());
System.out.println("Course removed:" + alist.removeCourse(1));
System.out.println("Course removed:" + alist.removeCourse(5));
System.out.println("Number of courses: " + alist.size());
System.out.println("\nNumber of courses starting with EECS: " + prefixCountArrayList(alist, "EECS"));
System.out.println("----------------------------------------");
//Change back the capacity of EECS233 to 140
alist.changeCapacity("EECS233", 140);
CourseLinkedList llist = new CourseLinkedList();
// Add course objects to Linkedlist
llist.addCourse(0, course1);
llist.addCourse(0, course2);
llist.addCourse(5, course3);
llist.addCourse(3, course4);
System.out.println("----------------------------------------");
//Testing LinkedList methods
System.out.println("Capacity of " + llist.search(1).getCourseID() + " is " + llist.search(1).getCapacity());
System.out.println("\nCapacity of EECS233: " + llist.search(2).getCapacity());
System.out.println("Change capacity method: " + llist.changeCapacity("EECS233", 100));
System.out.println("Change capacity method: " + llist.changeCapacity("EECS133", 100));
System.out.println("Capacity of EECS233: " + llist.search(2).getCapacity());
System.out.println("\nNumber of courses: " + llist.size());
System.out.println("Course removed:" + llist.removeCourse(1));
System.out.println("Course removed:" + llist.removeCourse(5));
System.out.println("Number of courses: " + llist.size());
System.out.println("\nNumber of courses starting with EECS: " + prefixCountLinkedList(llist, "EECS"));
System.out.println("----------------------------------------");
}
}
| [
"[email protected]"
] | |
119fc5595d741a5b5b54ac9048f16adf710ac823 | e40bd554edad4e88c386568a990c3aad854d8d33 | /app/src/main/java/com/hha/heinhtetaung/themoviedb/viewholders/NowshowingViewHolder.java | 5112614fb081c4fb2ee68e7803ec7a18179e3ad1 | [
"Apache-2.0"
] | permissive | zack1191/theMovieDbFinalProject | a5f9e3be9959eb202d8854375e7963fbc3b1d4d2 | ef757864bf89540303a14a8c03d7c0cfb7248e63 | refs/heads/master | 2020-07-21T18:53:38.629608 | 2019-09-07T09:52:42 | 2019-09-07T09:52:42 | 206,948,929 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,466 | java | package com.hha.heinhtetaung.themoviedb.viewholders;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import com.bumptech.glide.Glide;
import com.hha.heinhtetaung.themoviedb.R;
import com.hha.heinhtetaung.themoviedb.contorller.MovieDelegate;
import com.hha.heinhtetaung.themoviedb.data.VO.MovieDetailVo;
import butterknife.BindView;
public class NowshowingViewHolder extends BaseViewHolder<MovieDetailVo> {
@BindView(R.id.iv_background_nowshowing)
ImageView ivNowshowing;
// @BindView(R.id.tv_name_nowshowing)
// TextView tvNowShowing;
private MovieDelegate mMovieDelegate;
private MovieDetailVo mMovieDb;
public NowshowingViewHolder(View itemView, MovieDelegate movieDelegate) {
super(itemView);
mMovieDelegate = movieDelegate;
}
@Override
public void setData(MovieDetailVo data) {
mMovieDb = data;
// tvNowShowing.setText(data.getmTitle());
if (data.getmPosterPath() != null) {
ivNowshowing.setVisibility(View.VISIBLE);
Glide.with(ivNowshowing.getContext())
.load("http://image.tmdb.org/t/p/original" + data.getmPosterPath())
.into(ivNowshowing);
} else {
ivNowshowing.setVisibility(View.GONE);
}
}
@Override
public void onClick(View view) {
super.onClick(view);
mMovieDelegate.onTapNowShowing(mMovieDb);
}
}
| [
"[email protected]"
] | |
0f63dbc1d4a02e5d852e4b455df6d4965a243923 | e3712168b5154d456edf3512a1424b9aea290f24 | /frontend/Tagline/sources/com/google/android/gms/location/ActivityTransitionResult.java | 970469cfb3db30c5ffd3dc6e2d42f8de6eaa7afd | [] | no_license | uandisson/Projeto-TagLine-HACK_GOV_PE | bf3c5c106191292b3692068d41bc5e6f38f07d52 | 5e130ff990faf5c8c5dab060398c34e53e0fd896 | refs/heads/master | 2023-03-12T17:36:36.792458 | 2021-02-11T18:17:51 | 2021-02-11T18:17:51 | 338,082,674 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 4,466 | java | package com.google.android.gms.location;
import android.content.Intent;
import android.os.Parcel;
import android.os.Parcelable;
import androidx.annotation.Nullable;
import com.google.android.gms.common.internal.Preconditions;
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable;
import com.google.android.gms.common.internal.safeparcel.SafeParcelWriter;
import com.google.android.gms.common.internal.safeparcel.SafeParcelable;
import com.google.android.gms.common.internal.safeparcel.SafeParcelableSerializer;
import java.util.Collections;
import java.util.List;
@SafeParcelable.Class(creator = "ActivityTransitionResultCreator")
@SafeParcelable.Reserved({1000})
public class ActivityTransitionResult extends AbstractSafeParcelable {
public static final Parcelable.Creator<ActivityTransitionResult> CREATOR;
@SafeParcelable.Field(getter = "getTransitionEvents", mo21370id = 1)
private final List<ActivityTransitionEvent> zzn;
static {
Parcelable.Creator<ActivityTransitionResult> creator;
new zzg();
CREATOR = creator;
}
@SafeParcelable.Constructor
public ActivityTransitionResult(@SafeParcelable.Param(mo21373id = 1) List<ActivityTransitionEvent> list) {
List<ActivityTransitionEvent> list2 = list;
Object checkNotNull = Preconditions.checkNotNull(list2, "transitionEvents list can't be null.");
List<ActivityTransitionEvent> list3 = list2;
List<ActivityTransitionEvent> list4 = list3;
if (!list3.isEmpty()) {
for (int i = 1; i < list4.size(); i++) {
Preconditions.checkArgument(list4.get(i).getElapsedRealTimeNanos() >= list4.get(i + -1).getElapsedRealTimeNanos());
}
}
this.zzn = Collections.unmodifiableList(list2);
}
@Nullable
public static ActivityTransitionResult extractResult(Intent intent) {
Intent intent2 = intent;
if (!hasResult(intent2)) {
return null;
}
return (ActivityTransitionResult) SafeParcelableSerializer.deserializeFromIntentExtra(intent2, "com.google.android.location.internal.EXTRA_ACTIVITY_TRANSITION_RESULT", CREATOR);
}
public static boolean hasResult(@Nullable Intent intent) {
Intent intent2 = intent;
if (intent2 == null) {
return false;
}
return intent2.hasExtra("com.google.android.location.internal.EXTRA_ACTIVITY_TRANSITION_RESULT");
}
/* JADX WARNING: type inference failed for: r5v0, types: [java.lang.Object] */
/* JADX WARNING: Unknown variable types count: 1 */
/* Code decompiled incorrectly, please refer to instructions dump. */
public boolean equals(java.lang.Object r5) {
/*
r4 = this;
r0 = r4
r1 = r5
r2 = r0
r3 = r1
if (r2 != r3) goto L_0x0009
r2 = 1
r0 = r2
L_0x0008:
return r0
L_0x0009:
r2 = r1
if (r2 == 0) goto L_0x0018
r2 = r0
java.lang.Class r2 = r2.getClass()
r3 = r1
java.lang.Class r3 = r3.getClass()
if (r2 == r3) goto L_0x001b
L_0x0018:
r2 = 0
r0 = r2
goto L_0x0008
L_0x001b:
r2 = r0
java.util.List<com.google.android.gms.location.ActivityTransitionEvent> r2 = r2.zzn
r3 = r1
com.google.android.gms.location.ActivityTransitionResult r3 = (com.google.android.gms.location.ActivityTransitionResult) r3
java.util.List<com.google.android.gms.location.ActivityTransitionEvent> r3 = r3.zzn
boolean r2 = r2.equals(r3)
r0 = r2
goto L_0x0008
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.location.ActivityTransitionResult.equals(java.lang.Object):boolean");
}
public List<ActivityTransitionEvent> getTransitionEvents() {
return this.zzn;
}
public int hashCode() {
return this.zzn.hashCode();
}
public void writeToParcel(Parcel parcel, int i) {
int i2 = i;
Parcel parcel2 = parcel;
int beginObjectHeader = SafeParcelWriter.beginObjectHeader(parcel2);
SafeParcelWriter.writeTypedList(parcel2, 1, getTransitionEvents(), false);
SafeParcelWriter.finishObjectHeader(parcel2, beginObjectHeader);
}
}
| [
"[email protected]"
] | |
a7fd77ce4999f10b311c9a1514ee07596cd79932 | 2f3e5628ff248dae257027e67779490a30a28bc7 | /Gas Station/GasPump Project/FuelButton.java | fd14cf996eaab5a20544fa3b60c98f6ff9259269 | [] | no_license | bhasin11/CMPE-202-Software-Systems-Engineering | 24c92fa940fb3c3c69a1231d53a16285a24c09a7 | 6182cae33f666f98757efb89c9731f7ae490d0a4 | refs/heads/master | 2021-01-04T22:31:53.878849 | 2017-08-15T06:53:02 | 2017-08-15T06:53:02 | 99,452,391 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 674 | java | /**
* Write a description of class FuelButton here.
*
* @author (your name)
* @version (a version number or a date)
*/
import greenfoot.*;
public class FuelButton implements Observer
{
// instance variables - replace the example below with your own
private GasPumpState gpState = GasPumpState.getInstance();
public void update(){
if(gpState.getState() == State.isValidatedButUnfueled){
FuelType fuel = new FuelType();
fuel.displayMessage();
}
}
public void act(){
System.out.println("Inside FuelButton class which implements Observer---No actor assigned");
}
}
| [
"[email protected]"
] | |
f17fd8e62b43f85e6f5edc4fa0ffd3cb9ae0bbd5 | 0291166a88b99e1d65f8dce3ea32c5b4b6a93eb4 | /src/com/ytf/mis/contacts/ClearEditText.java | 9b33dafa76a3523df149e87d9b3c156afc3758f8 | [] | no_license | WuSkywalker/Contacts | 26f50e1a4287e03e300daf91572907c8a3093dc2 | 2dbbfedac7c5a89e9b8961cc72c24e4062b31cb9 | refs/heads/master | 2021-01-16T17:45:17.499072 | 2014-12-25T02:25:52 | 2014-12-25T02:25:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,243 | java | package com.ytf.mis.contacts;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.text.Editable;
import android.text.TextWatcher;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.CycleInterpolator;
import android.view.animation.TranslateAnimation;
import android.widget.EditText;
import com.ytf.mis.contacts.R;
/**
* Package: com.ytf.mis.contacts.contacts
* Created with Contacts
* User: WuHua
* Date: 14-11-17
* Time: 15:40
* Description:
*/
public class ClearEditText extends EditText implements View.OnFocusChangeListener, TextWatcher {
public static final String TAG = "ClearEidtText";
/**
* Field
*/
private Drawable mClearDrawable;
private boolean hasFocus;
/**
*
* @param context
*/
public ClearEditText(Context context) {
this(context, null);
}
/**
*
* @param context
* @param attrs
*/
public ClearEditText(Context context, AttributeSet attrs) {
this(context, attrs, android.R.attr.editTextStyle);
}
/**
*
* @param context
* @param attrs
* @param defStyle
*/
public ClearEditText(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
init();
}
/**
* init the clear edit text attrs
*/
private void init() {
mClearDrawable = getCompoundDrawables()[2];
if (mClearDrawable == null){
mClearDrawable = getResources().getDrawable(R.drawable.txl_search_delete_selector);
}
mClearDrawable.setBounds(0, 0, mClearDrawable.getIntrinsicWidth(), mClearDrawable.getIntrinsicHeight());
setClearIconVisible(false);
setOnFocusChangeListener(this);
addTextChangedListener(this);
}
/**
*
* @param visible
*/
private void setClearIconVisible(boolean visible) {
Drawable right = visible ? mClearDrawable : null;
setCompoundDrawables(getCompoundDrawables()[0], getCompoundDrawables()[1], right, getCompoundDrawables()[3]);
}
/**
*
* @param event
* @return
*/
@Override
public boolean onTouchEvent(MotionEvent event) {
if (event.getAction() == MotionEvent.ACTION_UP){
if (getCompoundDrawables()[2] != null){
boolean touchable = event.getX() > (getWidth() - getTotalPaddingRight())
&& (event.getX() < ((getWidth() - getPaddingRight())));
if (touchable) {
this.setText("");
}
}
}
return super.onTouchEvent(event);
}
/**
*
* @param v
* @param hasFocus
*/
@Override
public void onFocusChange(View v, boolean hasFocus) {
this.hasFocus = hasFocus;
if (hasFocus){
setClearIconVisible(getText().length() > 0);
}else {
setClearIconVisible(false);
}
}
/**
*
* @param text
* @param start
* @param lengthBefore
* @param lengthAfter
*/
@Override
public void onTextChanged(CharSequence text, int start, int lengthBefore, int lengthAfter) {
if(hasFocus){
setClearIconVisible(text.length() > 0);
}
}
/**
*
* @param s
* @param start
* @param count
* @param after
*/
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
/**
*
* @param s
*/
@Override
public void afterTextChanged(Editable s) {
}
/**
* 设置晃动动画
*/
public void setShakeAnimation(){
this.setAnimation(shakeAnimation(5));
}
/**
* 晃动动画
* @param counts 1秒钟晃动多少下
* @return
*/
public static Animation shakeAnimation(int counts){
Animation translateAnimation = new TranslateAnimation(0, 10, 0, 0);
translateAnimation.setInterpolator(new CycleInterpolator(counts));
translateAnimation.setDuration(1000);
return translateAnimation;
}
}
| [
"[email protected]"
] | |
e59e2d0ef71a4c25c1f380af1c62945dbc54d6ca | 3050eb93c7a8d86eee33bcd0051aa25c14eac18d | /guava/src/com/google/common/util/concurrent/AbstractCatchingFuture.java | 332a5fe1f5f4e44be9ccf6eacc48b971aeab5bdc | [
"Apache-2.0"
] | permissive | abimbolaof/guava | 6f50abe99a286e8daca39b98a4afa526e4ea70e8 | e4b10774c57124ba7fc9d0b6ae047e6312cdd974 | refs/heads/master | 2021-07-05T07:57:38.308520 | 2017-09-27T17:44:31 | 2017-09-27T17:54:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,784 | java | /*
* Copyright (C) 2006 The Guava 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 or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package com.google.common.util.concurrent;
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.util.concurrent.Futures.getDone;
import static com.google.common.util.concurrent.MoreExecutors.directExecutor;
import static com.google.common.util.concurrent.MoreExecutors.rejectionPropagatingExecutor;
import static com.google.common.util.concurrent.Platform.isInstanceOfThrowableClass;
import com.google.common.annotations.GwtCompatible;
import com.google.common.base.Function;
import com.google.errorprone.annotations.ForOverride;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Executor;
import javax.annotation.Nullable;
/**
* Implementations of {@code Futures.catching*}.
*/
@GwtCompatible
abstract class AbstractCatchingFuture<V, X extends Throwable, F, T>
extends AbstractFuture.TrustedFuture<V> implements Runnable {
static <X extends Throwable, V> ListenableFuture<V> create(
ListenableFuture<? extends V> input,
Class<X> exceptionType,
Function<? super X, ? extends V> fallback) {
CatchingFuture<V, X> future = new CatchingFuture<>(input, exceptionType, fallback);
input.addListener(future, directExecutor());
return future;
}
static <V, X extends Throwable> ListenableFuture<V> create(
ListenableFuture<? extends V> input,
Class<X> exceptionType,
Function<? super X, ? extends V> fallback,
Executor executor) {
CatchingFuture<V, X> future = new CatchingFuture<>(input, exceptionType, fallback);
input.addListener(future, rejectionPropagatingExecutor(executor, future));
return future;
}
static <X extends Throwable, V> ListenableFuture<V> create(
ListenableFuture<? extends V> input,
Class<X> exceptionType,
AsyncFunction<? super X, ? extends V> fallback) {
AsyncCatchingFuture<V, X> future = new AsyncCatchingFuture<>(input, exceptionType, fallback);
input.addListener(future, directExecutor());
return future;
}
static <X extends Throwable, V> ListenableFuture<V> create(
ListenableFuture<? extends V> input,
Class<X> exceptionType,
AsyncFunction<? super X, ? extends V> fallback,
Executor executor) {
AsyncCatchingFuture<V, X> future = new AsyncCatchingFuture<>(input, exceptionType, fallback);
input.addListener(future, rejectionPropagatingExecutor(executor, future));
return future;
}
/*
* In certain circumstances, this field might theoretically not be visible to an afterDone() call
* triggered by cancel(). For details, see the comments on the fields of TimeoutFuture.
*/
@Nullable ListenableFuture<? extends V> inputFuture;
@Nullable Class<X> exceptionType;
@Nullable F fallback;
AbstractCatchingFuture(
ListenableFuture<? extends V> inputFuture, Class<X> exceptionType, F fallback) {
this.inputFuture = checkNotNull(inputFuture);
this.exceptionType = checkNotNull(exceptionType);
this.fallback = checkNotNull(fallback);
}
@Override
public final void run() {
ListenableFuture<? extends V> localInputFuture = inputFuture;
Class<X> localExceptionType = exceptionType;
F localFallback = fallback;
if (localInputFuture == null
| localExceptionType == null
| localFallback == null
| isCancelled()) {
return;
}
inputFuture = null;
exceptionType = null;
fallback = null;
// For an explanation of the cases here, see the comments on AbstractTransformFuture.run.
V sourceResult = null;
Throwable throwable = null;
try {
sourceResult = getDone(localInputFuture);
} catch (ExecutionException e) {
throwable = checkNotNull(e.getCause());
} catch (Throwable e) { // this includes cancellation exception
throwable = e;
}
if (throwable == null) {
set(sourceResult);
return;
}
if (!isInstanceOfThrowableClass(throwable, localExceptionType)) {
setException(throwable);
// TODO(cpovirk): Test that fallback is not run in this case.
return;
}
@SuppressWarnings("unchecked") // verified safe by isInstanceOfThrowableClass
X castThrowable = (X) throwable;
T fallbackResult;
try {
fallbackResult = doFallback(localFallback, castThrowable);
} catch (Throwable t) {
setException(t);
return;
}
setResult(fallbackResult);
}
@Override
protected String pendingToString() {
ListenableFuture<? extends V> localInputFuture = inputFuture;
Class<X> localExceptionType = exceptionType;
F localFallback = fallback;
if (localInputFuture != null && localExceptionType != null && localFallback != null) {
return "input=["
+ localInputFuture
+ "], exceptionType=["
+ localExceptionType
+ "], fallback=["
+ localFallback
+ "]";
}
return null;
}
/** Template method for subtypes to actually run the fallback. */
@ForOverride
@Nullable
abstract T doFallback(F fallback, X throwable) throws Exception;
/** Template method for subtypes to actually set the result. */
@ForOverride
abstract void setResult(@Nullable T result);
@Override
protected final void afterDone() {
maybePropagateCancellationTo(inputFuture);
this.inputFuture = null;
this.exceptionType = null;
this.fallback = null;
}
/**
* An {@link AbstractCatchingFuture} that delegates to an {@link AsyncFunction} and
* {@link #setFuture(ListenableFuture)}.
*/
private static final class AsyncCatchingFuture<V, X extends Throwable>
extends AbstractCatchingFuture<
V, X, AsyncFunction<? super X, ? extends V>, ListenableFuture<? extends V>> {
AsyncCatchingFuture(
ListenableFuture<? extends V> input,
Class<X> exceptionType,
AsyncFunction<? super X, ? extends V> fallback) {
super(input, exceptionType, fallback);
}
@Override
ListenableFuture<? extends V> doFallback(
AsyncFunction<? super X, ? extends V> fallback, X cause) throws Exception {
ListenableFuture<? extends V> replacement = fallback.apply(cause);
checkNotNull(
replacement,
"AsyncFunction.apply returned null instead of a Future. "
+ "Did you mean to return immediateFuture(null)?");
return replacement;
}
@Override
void setResult(ListenableFuture<? extends V> result) {
setFuture(result);
}
}
/**
* An {@link AbstractCatchingFuture} that delegates to a {@link Function} and {@link
* #set(Object)}.
*/
private static final class CatchingFuture<V, X extends Throwable>
extends AbstractCatchingFuture<V, X, Function<? super X, ? extends V>, V> {
CatchingFuture(
ListenableFuture<? extends V> input,
Class<X> exceptionType,
Function<? super X, ? extends V> fallback) {
super(input, exceptionType, fallback);
}
@Override
@Nullable
V doFallback(Function<? super X, ? extends V> fallback, X cause) throws Exception {
return fallback.apply(cause);
}
@Override
void setResult(@Nullable V result) {
set(result);
}
}
}
| [
"[email protected]"
] | |
6d4940cb7d1e3f13109ad86eff762e994bee7d04 | 91077a3db59c9bb1901b7c4019ff6d13fc3faaf6 | /src/main/java/com/pi/controller/TestController.java | 83824cbd8d4847b8e2047a43ff2bea4f9ddbe1ab | [
"MIT"
] | permissive | pphboy/ssm | fbc56cedba57c0c30531ceb00d8fc1e9f5e401e7 | 9445451e9296c9448164b61259109cb60a6a3faa | refs/heads/master | 2023-03-09T04:23:56.433565 | 2020-11-19T15:23:17 | 2020-11-19T15:23:17 | 343,106,096 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 871 | java | package com.pi.controller;
import com.pi.mapper.TestMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import java.util.List;
import java.util.Map;
@Controller
@RequestMapping("/")
@ResponseBody
public class TestController {
@Autowired
private TestMapper testMapper;
@GetMapping("/hallo")
public ModelAndView getHelloWorld(){
ModelAndView mav = new ModelAndView();
mav.setViewName("index");
return mav;
}
@GetMapping("/test")
public List<Map<String,Object>> test(){
return testMapper.test();
}
}
| [
"[email protected]"
] | |
a0c1df44eab03ef3d125c6a4861ca7f80ad15f5c | 3dfb81d92ef75345c6cf11c065e2c70a8a41608c | /app/src/main/java/com/mediamonks/googleflip/pages/game_flow/multiplayer/fragments/scoreboard/ScoreboardFragment.java | 9e61535ac04412591a5a8a7abf8ba8ffddfcc113 | [
"MIT"
] | permissive | elimu-ai/tilt-game | 968bbc1f34679ed99bd6f09d2a388163984f855d | d147a524baa35e319826c08a4c12f3b4e6230178 | refs/heads/master | 2022-04-24T06:18:15.511186 | 2022-03-23T02:11:21 | 2022-03-23T02:11:21 | 83,582,728 | 0 | 0 | MIT | 2020-04-08T08:21:29 | 2017-03-01T17:37:27 | Java | UTF-8 | Java | false | false | 5,101 | java | package com.mediamonks.googleflip.pages.game_flow.multiplayer.fragments.scoreboard;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.view.ViewPager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.mediamonks.googleflip.GoogleFlipGameApplication;
import com.mediamonks.googleflip.R;
import com.mediamonks.googleflip.data.constants.Fragments;
import com.mediamonks.googleflip.data.constants.MultiplayerMode;
import com.mediamonks.googleflip.data.constants.PrefKeys;
import com.mediamonks.googleflip.pages.game.FlipGameActivity;
import com.mediamonks.googleflip.pages.game.management.GameClient;
import com.mediamonks.googleflip.pages.game.management.GameClientListener;
import com.mediamonks.googleflip.pages.game.management.GameClientListenerAdapter;
import com.mediamonks.googleflip.ui.BaseFragment;
import com.mediamonks.googleflip.ui.paging.PageIndicator;
import com.mediamonks.googleflip.util.SoundManager;
import com.pixplicity.easyprefs.library.Prefs;
import butterknife.Bind;
import butterknife.OnClick;
/**
* Fragment shown during multiplayer games between rounds
*/
public class ScoreboardFragment extends BaseFragment {
private static final String TAG = ScoreboardFragment.class.getSimpleName();
@Bind(R.id.buttons)
protected LinearLayout _buttons;
@Bind(R.id.tv_waiting_for_players)
protected TextView _waitingForPlayersText;
@Bind(R.id.viewpager)
protected ViewPager _viewPager;
@Bind(R.id.page_indicator)
protected PageIndicator _pageIndicator;
private ViewPager.OnPageChangeListener _pageChangeListener;
private GameClient _gameClient;
private GameClientListener _gameClientListener;
public static ScoreboardFragment newInstance() {
return new ScoreboardFragment();
}
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = createView(R.layout.fragment_scoreboard, inflater, container);
_gameClient = GoogleFlipGameApplication.getGameClient();
_gameClientListener = new GameClientListenerAdapter() {
@Override
public void onRoundStarted(Long levelId) {
GoogleFlipGameApplication.getUserModel().selectLevelById(levelId);
startActivity(new Intent(getActivity(), FlipGameActivity.class));
getActivity().finish();
}
@Override
public void onRoundFinished() {
checkRoundFinished();
}
@Override
public void onGameFinished() {
_buttons.setVisibility(View.VISIBLE);
_waitingForPlayersText.setVisibility(View.GONE);
}
};
_viewPager.setAdapter(new ScoreboardPagerAdapter(getChildFragmentManager()));
_pageIndicator.setActivePage(0);
_pageIndicator.setNumPages(_viewPager.getAdapter().getCount());
_pageChangeListener = new ViewPager.SimpleOnPageChangeListener() {
@Override
public void onPageSelected(int position) {
_pageIndicator.setActivePage(position);
}
};
_buttons.setVisibility(View.GONE);
return view;
}
@Override
public void onStart() {
super.onStart();
_gameClient.addGameClientListener(_gameClientListener);
}
@Override
public void onStop() {
super.onStop();
_gameClient.removeGameClientListener(_gameClientListener);
}
@Override
public void onResume() {
super.onResume();
checkRoundFinished();
// doublecheck if game isn't over in the meantime
if (_gameClient.isGameFinished()) {
_buttons.setVisibility(View.VISIBLE);
_waitingForPlayersText.setVisibility(View.GONE);
}
_viewPager.addOnPageChangeListener(_pageChangeListener);
}
@Override
public void onPause() {
super.onPause();
_viewPager.removeOnPageChangeListener(_pageChangeListener);
}
private void checkRoundFinished() {
if (_gameClient.isRoundFinished()) {
MultiplayerMode multiplayerMode = MultiplayerMode.values()[Prefs.getInt(PrefKeys.MULTIPLAYER_MODE, 0)];
if (multiplayerMode.equals(MultiplayerMode.SERVER)) {
_buttons.setVisibility(View.VISIBLE);
_waitingForPlayersText.setVisibility(View.GONE);
} else {
_waitingForPlayersText.setText(R.string.waiting_to_start_round);
}
}
}
@OnClick(R.id.btn_next)
protected void onNextButtonClick() {
SoundManager.getInstance().play(R.raw.tap);
if (_gameClient.isGameFinished()) {
navigateTo(Fragments.GAME_FLOW_GAME_OVER);
} else {
GoogleFlipGameApplication.getGameServer().startRound();
}
}
}
| [
"[email protected]"
] | |
75dd788d8d0d359e7c108249cf48db57f50eb57b | 928e494814ec7a31054da25140e8b5057510943c | /Sudoku/Sudoku/controller/GUI_Interface.java | bf58908e59da10f341c84605220907beec2d92f6 | [] | no_license | amazinq/sudoku-wissmann | cb879ee606368af48a570afcee8183ec4c958118 | 804308d08bc90fcb3946b243658d6dafdf0fee6c | refs/heads/master | 2021-01-22T11:51:37.773986 | 2014-02-20T15:32:10 | 2014-02-20T15:32:10 | 32,336,724 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 144 | java | package controller;
import java.util.Observer;
//GUI interface erbt von Observer
public interface GUI_Interface extends Observer {
}
| [
"[email protected]@068e76f7-683f-fe31-746d-e8c35f4e6625"
] | [email protected]@068e76f7-683f-fe31-746d-e8c35f4e6625 |
8facca17fd0684f2a0876638f87090790682f08c | cea7dc8f41488a9bf85047f51b0608ff7fff8233 | /app/src/androidTest/java/com/example/leonardo/physicballsv2/ExampleInstrumentedTest.java | fe4e96419923ee57a58ed4cd78b466f3abe2fe85 | [] | no_license | LeonardoAbrilBejarano/Physicballsv2 | d9b6413259eb5def7093f3718dfebfd05d8bfcde | 21c8cce748cbaf986cc477f836d1594588236c57 | refs/heads/master | 2021-01-23T10:36:16.633891 | 2017-06-04T16:13:10 | 2017-06-04T16:13:10 | 93,077,870 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 772 | java | package com.example.leonardo.physicballsv2;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumentation test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.example.leonardo.physicballsv2", appContext.getPackageName());
}
}
| [
"[email protected]"
] | |
4af30d6dcda2130faa9ba4734fb05dd375d2112c | 9b72e12816bdfddc0403cb80943434d327245b96 | /src/com/exacttarget/wsdl/partnerapi/TrackingEvent.java | 7882c0ae8484d5cec462780ce4ff5260f64c6781 | [] | no_license | arlamotte/ET_TSend_Axis2_Sample | a719c8d1aefb2b8341494b776553bad6e7dc344c | f2b0a4de0e473b7c726194807ff7ddc910c782f1 | refs/heads/master | 2021-01-25T07:33:54.838464 | 2015-03-09T12:44:53 | 2015-03-09T12:44:53 | 31,897,181 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 12,227 | java | /*
* XML Type: TrackingEvent
* Namespace: http://exacttarget.com/wsdl/partnerAPI
* Java type: com.exacttarget.wsdl.partnerapi.TrackingEvent
*
* Automatically generated - do not modify.
*/
package com.exacttarget.wsdl.partnerapi;
/**
* An XML TrackingEvent(@http://exacttarget.com/wsdl/partnerAPI).
*
* This is a complex type.
*/
public interface TrackingEvent extends com.exacttarget.wsdl.partnerapi.APIObject
{
public static final org.apache.xmlbeans.SchemaType type = (org.apache.xmlbeans.SchemaType)
org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(TrackingEvent.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.sEACC53AB4DE4AB80D192E3C9B6CE210A").resolveHandle("trackingeventdd05type");
/**
* Gets the "SendID" element
*/
int getSendID();
/**
* Gets (as xml) the "SendID" element
*/
org.apache.xmlbeans.XmlInt xgetSendID();
/**
* True if has "SendID" element
*/
boolean isSetSendID();
/**
* Sets the "SendID" element
*/
void setSendID(int sendID);
/**
* Sets (as xml) the "SendID" element
*/
void xsetSendID(org.apache.xmlbeans.XmlInt sendID);
/**
* Unsets the "SendID" element
*/
void unsetSendID();
/**
* Gets the "SubscriberKey" element
*/
java.lang.String getSubscriberKey();
/**
* Gets (as xml) the "SubscriberKey" element
*/
org.apache.xmlbeans.XmlString xgetSubscriberKey();
/**
* True if has "SubscriberKey" element
*/
boolean isSetSubscriberKey();
/**
* Sets the "SubscriberKey" element
*/
void setSubscriberKey(java.lang.String subscriberKey);
/**
* Sets (as xml) the "SubscriberKey" element
*/
void xsetSubscriberKey(org.apache.xmlbeans.XmlString subscriberKey);
/**
* Unsets the "SubscriberKey" element
*/
void unsetSubscriberKey();
/**
* Gets the "EventDate" element
*/
java.util.Calendar getEventDate();
/**
* Gets (as xml) the "EventDate" element
*/
org.apache.xmlbeans.XmlDateTime xgetEventDate();
/**
* True if has "EventDate" element
*/
boolean isSetEventDate();
/**
* Sets the "EventDate" element
*/
void setEventDate(java.util.Calendar eventDate);
/**
* Sets (as xml) the "EventDate" element
*/
void xsetEventDate(org.apache.xmlbeans.XmlDateTime eventDate);
/**
* Unsets the "EventDate" element
*/
void unsetEventDate();
/**
* Gets the "EventType" element
*/
com.exacttarget.wsdl.partnerapi.EventType.Enum getEventType();
/**
* Gets (as xml) the "EventType" element
*/
com.exacttarget.wsdl.partnerapi.EventType xgetEventType();
/**
* True if has "EventType" element
*/
boolean isSetEventType();
/**
* Sets the "EventType" element
*/
void setEventType(com.exacttarget.wsdl.partnerapi.EventType.Enum eventType);
/**
* Sets (as xml) the "EventType" element
*/
void xsetEventType(com.exacttarget.wsdl.partnerapi.EventType eventType);
/**
* Unsets the "EventType" element
*/
void unsetEventType();
/**
* Gets the "TriggeredSendDefinitionObjectID" element
*/
java.lang.String getTriggeredSendDefinitionObjectID();
/**
* Gets (as xml) the "TriggeredSendDefinitionObjectID" element
*/
org.apache.xmlbeans.XmlString xgetTriggeredSendDefinitionObjectID();
/**
* True if has "TriggeredSendDefinitionObjectID" element
*/
boolean isSetTriggeredSendDefinitionObjectID();
/**
* Sets the "TriggeredSendDefinitionObjectID" element
*/
void setTriggeredSendDefinitionObjectID(java.lang.String triggeredSendDefinitionObjectID);
/**
* Sets (as xml) the "TriggeredSendDefinitionObjectID" element
*/
void xsetTriggeredSendDefinitionObjectID(org.apache.xmlbeans.XmlString triggeredSendDefinitionObjectID);
/**
* Unsets the "TriggeredSendDefinitionObjectID" element
*/
void unsetTriggeredSendDefinitionObjectID();
/**
* Gets the "BatchID" element
*/
int getBatchID();
/**
* Gets (as xml) the "BatchID" element
*/
org.apache.xmlbeans.XmlInt xgetBatchID();
/**
* True if has "BatchID" element
*/
boolean isSetBatchID();
/**
* Sets the "BatchID" element
*/
void setBatchID(int batchID);
/**
* Sets (as xml) the "BatchID" element
*/
void xsetBatchID(org.apache.xmlbeans.XmlInt batchID);
/**
* Unsets the "BatchID" element
*/
void unsetBatchID();
/**
* A factory class with static methods for creating instances
* of this type.
*/
public static final class Factory
{
public static com.exacttarget.wsdl.partnerapi.TrackingEvent newInstance() {
return (com.exacttarget.wsdl.partnerapi.TrackingEvent) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, null ); }
public static com.exacttarget.wsdl.partnerapi.TrackingEvent newInstance(org.apache.xmlbeans.XmlOptions options) {
return (com.exacttarget.wsdl.partnerapi.TrackingEvent) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, options ); }
/** @param xmlAsString the string value to parse */
public static com.exacttarget.wsdl.partnerapi.TrackingEvent parse(java.lang.String xmlAsString) throws org.apache.xmlbeans.XmlException {
return (com.exacttarget.wsdl.partnerapi.TrackingEvent) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xmlAsString, type, null ); }
public static com.exacttarget.wsdl.partnerapi.TrackingEvent parse(java.lang.String xmlAsString, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
return (com.exacttarget.wsdl.partnerapi.TrackingEvent) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xmlAsString, type, options ); }
/** @param file the file from which to load an xml document */
public static com.exacttarget.wsdl.partnerapi.TrackingEvent parse(java.io.File file) throws org.apache.xmlbeans.XmlException, java.io.IOException {
return (com.exacttarget.wsdl.partnerapi.TrackingEvent) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( file, type, null ); }
public static com.exacttarget.wsdl.partnerapi.TrackingEvent parse(java.io.File file, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
return (com.exacttarget.wsdl.partnerapi.TrackingEvent) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( file, type, options ); }
public static com.exacttarget.wsdl.partnerapi.TrackingEvent parse(java.net.URL u) throws org.apache.xmlbeans.XmlException, java.io.IOException {
return (com.exacttarget.wsdl.partnerapi.TrackingEvent) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( u, type, null ); }
public static com.exacttarget.wsdl.partnerapi.TrackingEvent parse(java.net.URL u, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
return (com.exacttarget.wsdl.partnerapi.TrackingEvent) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( u, type, options ); }
public static com.exacttarget.wsdl.partnerapi.TrackingEvent parse(java.io.InputStream is) throws org.apache.xmlbeans.XmlException, java.io.IOException {
return (com.exacttarget.wsdl.partnerapi.TrackingEvent) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( is, type, null ); }
public static com.exacttarget.wsdl.partnerapi.TrackingEvent parse(java.io.InputStream is, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
return (com.exacttarget.wsdl.partnerapi.TrackingEvent) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( is, type, options ); }
public static com.exacttarget.wsdl.partnerapi.TrackingEvent parse(java.io.Reader r) throws org.apache.xmlbeans.XmlException, java.io.IOException {
return (com.exacttarget.wsdl.partnerapi.TrackingEvent) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( r, type, null ); }
public static com.exacttarget.wsdl.partnerapi.TrackingEvent parse(java.io.Reader r, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
return (com.exacttarget.wsdl.partnerapi.TrackingEvent) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( r, type, options ); }
public static com.exacttarget.wsdl.partnerapi.TrackingEvent parse(javax.xml.stream.XMLStreamReader sr) throws org.apache.xmlbeans.XmlException {
return (com.exacttarget.wsdl.partnerapi.TrackingEvent) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( sr, type, null ); }
public static com.exacttarget.wsdl.partnerapi.TrackingEvent parse(javax.xml.stream.XMLStreamReader sr, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
return (com.exacttarget.wsdl.partnerapi.TrackingEvent) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( sr, type, options ); }
public static com.exacttarget.wsdl.partnerapi.TrackingEvent parse(org.w3c.dom.Node node) throws org.apache.xmlbeans.XmlException {
return (com.exacttarget.wsdl.partnerapi.TrackingEvent) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( node, type, null ); }
public static com.exacttarget.wsdl.partnerapi.TrackingEvent parse(org.w3c.dom.Node node, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
return (com.exacttarget.wsdl.partnerapi.TrackingEvent) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( node, type, options ); }
/** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
@Deprecated
public static com.exacttarget.wsdl.partnerapi.TrackingEvent parse(org.apache.xmlbeans.xml.stream.XMLInputStream xis) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
return (com.exacttarget.wsdl.partnerapi.TrackingEvent) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xis, type, null ); }
/** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
@Deprecated
public static com.exacttarget.wsdl.partnerapi.TrackingEvent parse(org.apache.xmlbeans.xml.stream.XMLInputStream xis, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
return (com.exacttarget.wsdl.partnerapi.TrackingEvent) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xis, type, options ); }
/** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
@Deprecated
public static org.apache.xmlbeans.xml.stream.XMLInputStream newValidatingXMLInputStream(org.apache.xmlbeans.xml.stream.XMLInputStream xis) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
return org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newValidatingXMLInputStream( xis, type, null ); }
/** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
@Deprecated
public static org.apache.xmlbeans.xml.stream.XMLInputStream newValidatingXMLInputStream(org.apache.xmlbeans.xml.stream.XMLInputStream xis, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
return org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newValidatingXMLInputStream( xis, type, options ); }
private Factory() { } // No instance of this class allowed
}
}
| [
"[email protected]"
] | |
dcb1dd2c80e7cb767928a7d9540cf5ee76182740 | 24d39249c0c7a8d70b9131e289c00059029f09d2 | /JuanSumulongLearningApp/app/src/main/java/com/ecandy/juansumulonglearningapp/Subjects.java | f91ab4b1e39999b83a4bed3fe0bb45c5b3b4c4f3 | [] | no_license | TweakBox/ITS-Desktop-with-Android-App- | a8befeba446529567e632356c4a5f2f6ad22f74c | 4fc3283f7a68042af3a94bc1cf5fe4a1803bf445 | refs/heads/master | 2021-01-16T21:12:42.195199 | 2016-09-23T23:13:33 | 2016-09-23T23:13:33 | 68,444,242 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,298 | java | package com.ecandy.juansumulonglearningapp;
import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.LinearLayout;
/**
* A simple {@link Fragment} subclass.
*/
public class Subjects extends Fragment {
private String _id;
private String _type;
private View view;
public Subjects() {
// Required empty public constructor
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
Bundle data = getArguments();
_id = data.getString("id");
FetchSubjectsScript fss = new FetchSubjectsScript(this);
fss.execute("Quiz", _id);
// Inflate the layout for this fragment
return view = inflater.inflate(R.layout.fragment_subjects, container, false);
}
public void onTaskComplete(String result) {
if (result != "") {
String[] lines = result.split(";");
for (int i = 0; i < lines.length; i++) {
Button btn = new Button(view.getContext());
btn.setBackgroundColor(getResources().getColor(R.color.colorAccent));
btn.setTextColor(Color.WHITE);
btn.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
btn.setTag(lines[i].split(",")[0]);
btn.setText(lines[i].split(",")[1]);
btn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
onSubjectClick(v.getTag());
}
});
LinearLayout vll = ((LinearLayout) view.findViewById(R.id.vllSubjectList));
vll.addView(btn);
}
}
}
private void onSubjectClick(Object tag) {
Intent i = new Intent(view.getContext(), SubjectInfo.class);
i.putExtra("id", _id);
i.putExtra("subject", tag.toString());
view.getContext().startActivity(i);
}
}
| [
"[email protected]"
] | |
889883418119d3f2de870719c01cf5f5d1ee76e2 | fe106af0590945186bc93939c2765eaee69984ff | /L2J_Server/java/net/sf/l2j/gameserver/clientpackets/RequestPrivateStoreManageSell.java | ab442cd1ead99ddbb19184b7e1c377ab3a065e51 | [] | no_license | ChaosPaladin/project_c4 | 964ca637f892f18a3705dba3119b301d15ada5e6 | 6dd1e4280c2aa890ffb11c5ca9a2e3759ac41d3d | refs/heads/master | 2021-01-21T18:57:25.999360 | 2017-03-12T06:01:04 | 2017-03-12T06:01:04 | 92,095,468 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,671 | java | /*
* 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, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*
* http://www.gnu.org/copyleft/gpl.html
*/
package net.sf.l2j.gameserver.clientpackets;
import java.nio.ByteBuffer;
import net.sf.l2j.gameserver.ClientThread;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.serverpackets.ActionFailed;
import net.sf.l2j.gameserver.serverpackets.PrivateStoreManageListSell;
/**
* This class ...
*
* @version $Revision: 1.2.2.1.2.4 $ $Date: 2005/03/27 15:29:30 $
*/
public class RequestPrivateStoreManageSell extends ClientBasePacket
{
private static final String _C__73_REQUESTPRIVATESTOREMANAGESELL = "[C] 73 RequestPrivateStoreManageSell";
//private static Logger _log = Logger.getLogger(RequestPrivateStoreManage.class.getName());
public RequestPrivateStoreManageSell(ByteBuffer buf, ClientThread client)
{
super(buf, client);
}
void runImpl()
{
L2PcInstance player = getClient().getActiveChar();
if (player == null) return;
// Player shouldn't be able to set stores if he/she is alike dead (dead or fake death)
if (player.isAlikeDead())
{
sendPacket(new ActionFailed());
return;
}
if (player.isInOlympiadMode())
{
sendPacket(new ActionFailed());
return;
}
if (player.getPrivateStoreType() == L2PcInstance.STORE_PRIVATE_SELL || player.getPrivateStoreType() == L2PcInstance.STORE_PRIVATE_SELL +1)
player.setPrivateStoreType(L2PcInstance.STORE_PRIVATE_NONE);
if (player.getPrivateStoreType() == L2PcInstance.STORE_PRIVATE_NONE)
{
if (player.isSitting()) player.standUp();
player.setPrivateStoreType(L2PcInstance.STORE_PRIVATE_SELL +1);
player.sendPacket(new PrivateStoreManageListSell(player));
}
}
/* (non-Javadoc)
* @see net.sf.l2j.gameserver.clientpackets.ClientBasePacket#getType()
*/
public String getType()
{
return _C__73_REQUESTPRIVATESTOREMANAGESELL;
}
}
| [
"[email protected]"
] | |
9777da1ba6f53a54551c77db91ee726b6dcb3500 | 4a59972369b3919cc052d9e4ec9bd208b6273dad | /customerdetail/src/test/java/com/microservices/customerdetail/CustomerdetailApplicationTests.java | 50afc3699a89702456beb65fe52ca22f5699a736 | [] | no_license | Venkat-Penmatsa/customerdetail | f1bdaa58259fafc9232aff1572f107478722f699 | a988001ccbcd875ea0a986658e80eca8fe7d44b5 | refs/heads/main | 2023-03-26T13:28:44.992071 | 2021-03-29T17:40:53 | 2021-03-29T17:40:53 | 352,731,824 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 232 | java | package com.microservices.customerdetail;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class CustomerdetailApplicationTests {
@Test
void contextLoads() {
}
}
| [
"[email protected]"
] | |
d48f406eebf9836c53ffd408cc7b17b7d41717e9 | da61c511a046c037d60a85e6ff19acd1a8d87ce6 | /Dictionary/src/Data/MainData.java | 38b43fd4771488100d83cbf61ea59eb98fdb847b | [] | no_license | Allen-Wang-PW/Dictionary_DIY | 7da81e57653e6ffe5863a8e2849281171faf00eb | 5d9f448fd01b7cf96c04b0c540bde36ed222dee1 | refs/heads/master | 2021-01-23T02:54:44.805777 | 2017-03-24T06:59:56 | 2017-03-24T06:59:56 | 86,035,407 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 822 | java | package Data;
import java.util.ArrayList;
import javax.swing.JFrame;
import javax.swing.JPanel;
import UI.TipAndFix;
import UI.TranslatePanel;
import UI.UpPanel;
import Common.WordType;
public class MainData {
public static JFrame frame;
public static UpPanel uppanel;
public static JPanel welpanel;
public static JPanel autopanel;
public static TranslatePanel translatepanel;
public static TipAndFix tipandfix;
// @SuppressWarnings("rawtypes")
// public static JList wordlist;
// @SuppressWarnings("rawtypes")
// public static DefaultListModel listmodel;
public static ArrayList<WordType> Words = new ArrayList<WordType>();
public static ArrayList<WordType> AutofillWords = new ArrayList<WordType>();
public static ArrayList<WordType> TipWords = new ArrayList<WordType>();
public static int FixOn = 0;
}
| [
"[email protected]"
] | |
e20e836646e9bec733f0df97c5b480d30e8a8e32 | 918bf2f3b9f89c1e4856e9d30fa12ec2670ca90d | /Document.java | b6c2a1bffdcd58c1cc8143a9e6fec67102f50bfe | [] | no_license | abj301/java_codes | b64eea60c007dbfa676d0ca76510dc477e1de46c | 541ad3da7fe301f3b7b9ed4c0fc945a8ab74aad0 | refs/heads/master | 2020-03-28T06:19:24.851891 | 2018-09-15T16:32:49 | 2018-09-15T16:32:49 | 147,827,861 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 305 | java | package question9;
public class Document {
public void display(Printable P){
System.out.println(P.print());
}
public static void main(String[] args) {
Document d=new Document();
d.display(new Printable() {
@Override
public int print() {
int i=10*20;
return i;
}
});
}
}
| [
"[email protected]"
] | |
165588e9716955baf7fbfc31ccb9527d0b88bf5e | 3efa417c5668b2e7d1c377c41d976ed31fd26fdc | /src/br/com/mind5/masterData/dayParting/info/Daypart.java | 7132fd37e4dd78e7d952027789af8d00688dc2cc | [] | no_license | grazianiborcai/Agenda_WS | 4b2656716cc49a413636933665d6ad8b821394ef | e8815a951f76d498eb3379394a54d2aa1655f779 | refs/heads/master | 2023-05-24T19:39:22.215816 | 2023-05-15T15:15:15 | 2023-05-15T15:15:15 | 109,902,084 | 0 | 0 | null | 2022-06-29T19:44:56 | 2017-11-07T23:14:21 | Java | UTF-8 | Java | false | false | 858 | java | package br.com.mind5.masterData.dayParting.info;
import java.time.LocalTime;
public enum Daypart {
MORNING(1), AFTERNOON(2), EVENING_NIGHT(3);
private final int codDaypart;
private Daypart(int cod) {
codDaypart = cod;
}
public static Daypart of(LocalTime time) {
if (time == null)
return null;
LocalTime morning = LocalTime.of(12, 00);
LocalTime afternoon = LocalTime.of(18, 00);
LocalTime night = LocalTime.of(23, 59);
LocalTime tRounded = LocalTime.of(time.getHour(), time.getMinute());
if (tRounded.isBefore(morning))
return MORNING;
if (tRounded.isBefore(afternoon))
return AFTERNOON;
if (tRounded.isBefore(night) || time.equals(night))
return EVENING_NIGHT;
return null;
}
public int getCodDaypart() {
return codDaypart;
}
}
| [
"[email protected]"
] | |
2532af0775f6225f588b1add2d0650231b566535 | f4c151554ba32ccdd4d95d4741c005ddedf976b6 | /src/IntStackTest.java | d6fd2de7f184122ac5b804303c94bf2fe9a12b33 | [] | no_license | crkimberley/pij07 | 57858e94891ebc5c6da2db06de0c58e20c552f3a | 61c07e79acc7fb6dff1458d305eb1ca2bbf3dd97 | refs/heads/master | 2020-07-03T18:32:59.652326 | 2016-10-24T19:01:46 | 2016-10-24T19:01:46 | 67,449,869 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,986 | java | /**
* @author crkimberley on 12/09/2016.
*/
public class IntStackTest {
public static void main(String[] args) {
IntStackTest test = new IntStackTest();
test.launch();
}
private void launch() {
System.out.println("Queue of integers implemented using a circular singly-linked list");
IntStack stack = new IntStack();
stack.printList();
System.out.println("push 5 numbers: 0 7 9 5 7");
stack.push(0);
stack.push(7);
stack.push(9);
stack.push(5);
stack.push(7);
stack.printList();
System.out.println("empty = " + stack.empty() + "\n");
System.out.println("pop..." + stack.pop());
System.out.println("pop..." + stack.pop());
System.out.println("pop..." + stack.pop());
stack.printList();
System.out.println("empty = " + stack.empty() + "\n");
System.out.println("push 3 numbers: 3 4 6");
stack.push(3);
stack.push(4);
stack.push(6);
stack.printList();
System.out.println("empty = " + stack.empty() + "\n");
System.out.println("pop..." + stack.pop());
System.out.println("pop..." + stack.pop());
stack.printList();
System.out.println("empty = " + stack.empty() + "\n");
System.out.println("pop..." + stack.pop());
System.out.println("pop..." + stack.pop());
System.out.println("pop..." + stack.pop());
stack.printList();
System.out.println("empty = " + stack.empty() + "\n");
System.out.println("Attempt to pop from an empty stack");
System.out.println("pop..." + stack.pop());
stack.printList();
System.out.println("empty = " + stack.empty() + "\n");
System.out.println("push 3 numbers: 1 9 9");
stack.push(1);
stack.push(9);
stack.push(9);
stack.printList();
System.out.println("empty = " + stack.empty() + "\n");
}
}
| [
"[email protected]"
] | |
697c2a3a426a228c7a12dc13305b4bdf78c3f686 | c853f08ee72671d285a7a7f50ef36be6ec3fd334 | /src/main/java/census/ICSVBuilder.java | 15033aafad00c2c6aea949d5e92a95c2e6d73063 | [] | no_license | Prema44/CENSUS | 507bdd136efd90d8123e07bd55ef22b806fdfaa4 | 1589866f699738760b874f2ad402bf35bbdd0bfd | refs/heads/master | 2023-01-02T13:26:26.366234 | 2020-10-26T08:44:16 | 2020-10-26T08:44:16 | 306,895,209 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 322 | java | package census;
import java.io.Reader;
import java.util.Iterator;
import java.util.List;
public interface ICSVBuilder<E> {
public Iterator<E> getCSVFileIterator(Reader reader, Class<E> csvClass) throws CSVBuilderException;
public List<E> getCSVFileList(Reader reader, Class<E> csvClass) throws CSVBuilderException;
}
| [
"[email protected]"
] | |
9de52cad858535b4231ae5c1b82da67f0b65fa97 | ac09a467d9981f67d346d1a9035d98f234ce38d5 | /leetcode/src/main/java/org/leetcode/problems/_001360_NumberOfDaysBetweenTwoDates.java | 4c5be3a516fa3f4e67b81687355ae4a4dd9e39fa | [] | no_license | AlexKokoz/leetcode | 03c9749c97c846c4018295008095ac86ae4951ee | 9449593df72d86dadc4c470f1f9698e066632859 | refs/heads/master | 2023-02-23T13:56:38.978851 | 2023-02-12T21:21:54 | 2023-02-12T21:21:54 | 232,152,255 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 865 | java | package org.leetcode.problems;
import java.time.Duration;
import java.time.LocalDate;
/**
* EASY
*
* @author Alexandros Kokozidis
*
*/
public class _001360_NumberOfDaysBetweenTwoDates {
public int daysBetweenDates(String s1, String s2) {
int y1 = Integer.parseInt(s1.substring(0, 4));
int m1 = Integer.parseInt(s1.substring(5, 7));
int d1 = Integer.parseInt(s1.substring(8, 10));
int y2 = Integer.parseInt(s2.substring(0, 4));
int m2 = Integer.parseInt(s2.substring(5, 7));
int d2 = Integer.parseInt(s2.substring(8, 10));
return daysBetween(y1, m1, d1, y2, m2, d2);
}
int daysBetween(int y1, int m1, int d1, int y2, int m2, int d2) {
final LocalDate date1 = LocalDate.of(y1, m1, d1);
final LocalDate date2 = LocalDate.of(y2, m2, d2);
return (int) Math.abs(Duration.between(date1.atStartOfDay(), date2.atStartOfDay()).toDays());
}
}
| [
"[email protected]"
] | |
6ca044e67b68f2cb5e28afbf0c1cf3dce863fb01 | 7e384f90cf5029c23fda92a79c200e66c97543ef | /src/main/java/com/demo/redis/RedisApplication.java | 2da953d0b81dceeb419cff5c6b63ad7111905cfa | [] | no_license | Forwhat4/Redis_CacheAndSession | d47b1dd0e4f8077f64144cbc79517bd7657ad0f3 | 6ca0c786e7a1274dffa88b677136721312c230df | refs/heads/master | 2020-03-11T08:10:20.777475 | 2018-04-17T09:03:02 | 2018-04-17T09:03:02 | 129,876,558 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 304 | java | package com.demo.redis;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class RedisApplication {
public static void main(String[] args) {
SpringApplication.run(RedisApplication.class, args);
}
}
| [
"[email protected]"
] | |
a411059047aa0a6aee33314601e687069a592706 | 98f3d38bd0d8d71dcbd31a53845ff7c07ca0b434 | /src/java/com/timetablemgmt/services/UserRoleServiceIf.java | 5ee9ac3a12247789d8e745c2bfeb9bdd34dd0b5f | [] | no_license | yeoman9/timetablemgmt | 3d3e86d698c4eca5e184b89604a40331d086d2bc | 414a517730c88767266732bc03e5267247abc0a0 | refs/heads/master | 2016-09-08T00:17:05.823441 | 2014-04-26T10:47:02 | 2014-04-26T10:47:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 292 | java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.timetablemgmt.services;
import com.timetablemgmt.domainobjects.UserRole;
/**
*
* @author mayur
*/
public interface UserRoleServiceIf {
public UserRole getByID(Long id);
}
| [
"[email protected]"
] | |
416a072174c86f51fe623ef0eb2bc1102c8caca6 | 198d24f0a62c1100d1df5de92c0c243535285eb1 | /src/main/java/net/daporkchop/fp2/compat/vanilla/biome/layer/java/JavaFastLayerIsland.java | 8a3d57796120826f1d2d65241b468ad2f40c6920 | [
"LicenseRef-scancode-warranty-disclaimer",
"MIT"
] | permissive | PorkStudios/FarPlaneTwo | 283f848686b3e2cd23cfd60fe34517cfd2dea54e | 10156e5f8a434fcaa0e6e8561828a9144d5cd698 | refs/heads/master | 2023-08-31T01:36:31.176474 | 2023-08-27T13:51:03 | 2023-08-27T13:51:03 | 277,584,429 | 1,495 | 84 | NOASSERTION | 2022-12-16T17:26:24 | 2020-07-06T15:48:45 | Java | UTF-8 | Java | false | false | 2,071 | java | /*
* Adapted from The MIT License (MIT)
*
* Copyright (c) 2020-2021 DaPorkchop_
*
* 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,
* modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software
* is furnished to do so, subject to the following conditions:
*
* Any persons and/or organizations using this software must include the above copyright notice and this permission notice,
* provide sufficient credit to the original authors of the project (IE: DaPorkchop_), as well as provide a link to the original project.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
package net.daporkchop.fp2.compat.vanilla.biome.layer.java;
import lombok.NonNull;
import net.daporkchop.fp2.compat.vanilla.biome.layer.AbstractFastLayer;
import net.daporkchop.fp2.compat.vanilla.biome.layer.IFastLayer;
import net.minecraft.world.gen.layer.GenLayerIsland;
import static net.daporkchop.fp2.compat.vanilla.biome.BiomeHelper.*;
/**
* @author DaPorkchop_
* @see GenLayerIsland
*/
public class JavaFastLayerIsland extends AbstractFastLayer implements IJavaSourceLayer {
public JavaFastLayerIsland(long seed) {
super(seed);
}
@Override
public void init(@NonNull IFastLayer[] children) {
//no-op
}
@Override
public int get0(int x, int z) {
return (x | z) == 0 || nextInt(start(this.seed, x, z), 10) == 0 ? 1 : 0;
}
}
| [
"[email protected]"
] | |
b3110b50300a8377fd825e12d7133396276e0298 | a560642703969e97eee1de6630bffab7e47e9119 | /src/main/java/com/ratio/access/JDBCUserAccess.java | b1b8c33ac2480f9c6f2a995c2b70cb62ccf9c688 | [] | no_license | ttogun/ratio | e62b5f16c30cf16beb5d4f072ed7c0166a4a9b43 | e3fcccd6f6012a1f2aa91db4a62873b48620ae8a | refs/heads/master | 2020-05-26T23:45:52.802362 | 2014-12-08T03:25:16 | 2014-12-08T03:25:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,817 | java | package com.ratio.access;
import com.ratio.model.User;
import javax.sql.DataSource;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
/**
* Created by tat26 on 4/8/2014.
*/
public class JDBCUserAccess implements UserAccess {
private DataSource dataSource;
public JDBCUserAccess(DataSource dataSource) {
this.dataSource = dataSource;
}
//1. Get User Info
@Override
public User getUserByEmail(String email) {
try {
Connection connection = dataSource.getConnection();
ResultSet rs = null;
String statement = "Select * from user where email = ?";
PreparedStatement ps = connection.prepareStatement(statement);
ps.setString(1, email);
rs = ps.executeQuery();
User user = null;
if(rs.next()) {
user = new User.Builder()
.city(rs.getString("city"))
.email(rs.getString("email"))
.dob(rs.getDate("dob"))
.gender(rs.getString("gender"))
.firstName(rs.getString("firstName"))
.lastName(rs.getString("lastName"))
.zipCode(rs.getString("zipCode"))
.userId(rs.getInt("userId"))
.build();
}
return user;
} catch (SQLException e) {
throw new RuntimeException(e);
}
}
@Override
public boolean addUser(User user) {
return true;
}
@Override
public boolean deleteUser(User user) {
return false;
}
@Override
public boolean updateUserInfo(User user) {
return false;
}
}
| [
"[email protected]"
] | |
76795f4d92a9bdbde79422be9a4547bcffa08275 | 8356f7ce90242209d4ea0ab1b2abaa5399246621 | /Mitte2VA/src/arvore/comando/DeclVariavel.java | 52a37ed3eb2983c0c242718b61e983d6b7877e2b | [] | no_license | GermanoO/Compiladores2 | 13c56da6b793f646010a304b959dd3312ac2308b | faef0be2406644e57009fbda66ea63df3fd06396 | refs/heads/master | 2021-01-10T17:31:34.281660 | 2015-11-15T05:14:58 | 2015-11-15T05:14:58 | 46,192,280 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 302 | java | package arvore.comando;
import java.util.List;
import arvore.DeclGlobal;
import arvore.Tipo;
public class DeclVariavel implements Comando, DeclGlobal {
private List<String> idents;
private Tipo tipo;
public DeclVariavel(List<String> ids, Tipo t) {
this.idents = ids;
this.tipo = t;
}
}
| [
"[email protected]"
] | |
9f03fd324f0f30a9c4e01f20f21cd7e08116ac26 | 32b12c185f6a750e42a569307e3590fa77623acf | /NetChessParent/NetChessServer/src/main/java/edu/demidov/netchess/server/controllers/ClientUpdater.java | bfeecccc56f9470063fa19f69f4b06e8fea0399c | [
"MIT"
] | permissive | n-demidov/NetChess | a55b8d42df828d590140ef95e04664e81663c247 | c99b8668b6e7ea4a6711d4581466c1d6b8d163d6 | refs/heads/master | 2021-01-01T05:21:11.644443 | 2016-11-22T19:31:56 | 2018-03-25T07:03:50 | 56,568,038 | 4 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,229 | java | package edu.demidov.netchess.server.controllers;
import edu.demidov.netchess.common.model.game.chess.ChessGame;
import edu.demidov.netchess.common.model.network.NetworkMessage;
import edu.demidov.netchess.common.model.users.UserProfile;
import edu.demidov.netchess.server.model.Options;
import edu.demidov.netchess.server.model.game.ChessGames;
import edu.demidov.netchess.server.model.invitations.Invitations;
import edu.demidov.netchess.server.model.network.ConnectionManager;
import edu.demidov.netchess.server.model.users.User;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Calendar;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
/**
* Класс отправляет обновления на клиент
*/
public class ClientUpdater {
private static final Logger log = LoggerFactory.getLogger(ClientUpdater.class);
private static ClientUpdater instance;
private final ConnectionManager connectionManager = ConnectionManager.getInstance();
private Invitations inviteManager;
private ChessGames chessGames;
private Date nextLaunch = Calendar.getInstance().getTime();
private ClientUpdater() {
}
public static synchronized ClientUpdater getInstance() {
if (instance == null) {
instance = new ClientUpdater();
}
return instance;
}
public void setChessGames(final ChessGames chessGames) {
this.chessGames = chessGames;
}
public void setInviteManager(final Invitations inviteManager) {
this.inviteManager = inviteManager;
}
/**
* Событие вызывается, когда произошло какое-либо изменение игры.
* Метод рассылает обновленный объект игры игрокам.
*
* @param game
*/
public void gameChanged(final ChessGame game) {
log.debug("gameChanged game={}", game);
// Отправляет игру всем игрокам
final NetworkMessage gameMsg = new NetworkMessage(NetworkMessage.Type.SendCurrentGame);
gameMsg.put(NetworkMessage.CURRENT_GAME, game);
for (final User playingUser : chessGames.getPlayingUsers(game)) {
connectionManager.sendToUser(playingUser, gameMsg);
}
}
/**
* Периодически рассылает онлайн-пользователям обновления информации.
* Класс ClientUpdater сам учитывает время, метод можно вызывать кажду игровую итерацию.
*/
public void checkSendingUpdates() {
if (nextLaunch.before(Calendar.getInstance().getTime())) {
log.trace("manageSendInfoForOnlineUsers starts process by time");
// Устанавливаем время следующей рассылки
final Calendar calendar = Calendar.getInstance();
calendar.add(Calendar.SECOND, Options.USERS_INFO_SEND_UPDATES_SECONDS);
nextLaunch = calendar.getTime();
// Рассылаем каждому пользователю инфу
for (final User user : connectionManager.getOnlineUsers())
sendAllInfoToUser(user, false);
}
}
/**
* Отправляет пользователю всю информацию: профайл, лобби, приглашения, текущую игру
*
* @param user
* @param isSendCurrentGame
*/
public void sendAllInfoToUser(final User user, final boolean isSendCurrentGame) {
log.trace("sendToUserAllInfo user={}, isSendCurrentGame={}", user, isSendCurrentGame);
final Set<NetworkMessage> messages = new HashSet<>();
// Получаем нужные сообщения
messages.add(getUserProfileMsg(user));
messages.add(getOnlineUsersMsg(user));
messages.add(getIncomingInvitersMsg(user));
if (isSendCurrentGame) messages.add(getCurrentGameMsg(user));
// Упаковываем сообщения в одно
final NetworkMessage multiMsg = new NetworkMessage(NetworkMessage.Type.MultipleMessage);
multiMsg.put(NetworkMessage.MULTI_MESSAGES, messages);
connectionManager.sendToUser(user, multiMsg);
}
/**
* Возвращает сообщение - список онлайн пользователей
*
* @param forUser
* @return
*/
public NetworkMessage getOnlineUsersMsg(final User forUser) {
log.trace("getGetOnlineUsersMsg sender={}", forUser);
// Получаем всех онлайн пользователей
final Set<User> onlineUsers = connectionManager.getOnlineUsers();
// Переводим объекты User в UserProfile. Также нет смысла отправлять себя.
final Set<UserProfile> onlineUserProfiles = new HashSet<>();
for (final User user : onlineUsers) {
if (!forUser.equals(user)) {
onlineUserProfiles.add(userProfile(
user,
inviteManager.isInvited(forUser, user),
chessGames.isUserPlaying(user)
));
}
}
// Отправляем сообщение на клиент
final NetworkMessage netMsg = new NetworkMessage(NetworkMessage.Type.SendOnlineUsers);
netMsg.put(NetworkMessage.USERS, onlineUserProfiles);
return netMsg;
}
/**
* Возвращает сообщение - множество пригласивших игроков
*
* @param user
* @return
*/
public NetworkMessage getIncomingInvitersMsg(final User user) {
log.trace("getIncomingInvitersMsg sender={}", user);
final Set<User> inviters = inviteManager.getIncomingInviters(user);
final Set<UserProfile> userProfilesInvites = new HashSet<>();
// Переводим объекты User в объекты UserProfile
for (final User inviter : inviters) {
userProfilesInvites.add(userProfile(
inviter,
inviteManager.isInvited(user, inviter),
chessGames.isUserPlaying(inviter))
);
}
// Отправляем сообщение на клиент
final NetworkMessage response = new NetworkMessage(NetworkMessage.Type.SendIncomingInvites);
response.put(NetworkMessage.INVITES, userProfilesInvites);
return response;
}
/**
* Возвращает сообщение - текущую игру пользователя
*
* @param user
* @return
*/
public NetworkMessage getCurrentGameMsg(final User user) {
log.trace("getCurrentGameMsg user={}", user);
final ChessGame game = chessGames.getCurrentGame(user);
final NetworkMessage gameMsg = new NetworkMessage(NetworkMessage.Type.SendCurrentGame);
gameMsg.put(NetworkMessage.CURRENT_GAME, game);
return gameMsg;
}
// Возвращает сообщение - профиль пользователя
private NetworkMessage getUserProfileMsg(final User user) {
log.trace("getUserProfileMsg user={}", user);
final NetworkMessage msgUserProfile = new NetworkMessage(NetworkMessage.Type.LoginUserSuccess);
msgUserProfile.put(NetworkMessage.USER, userProfile(user));
return msgUserProfile;
}
// Создаёт объект UserProfile из объекта User
private UserProfile userProfile(final User user, final boolean isInvited, final boolean isPlaying) {
return new UserProfile(user.getName(), user.getRank(),
user.getWins(), user.getDefeats(), user.getDraws(),
user.getTotalTimeOnServer() + connectionManager.getUserCurrentTimeOnServer(user),
isInvited, isPlaying
);
}
// Создаёт объект UserProfile из объекта User
private UserProfile userProfile(final User user) {
return userProfile(user, false, false);
}
}
| [
"[email protected]"
] | |
545f59a7e671d00ada185e68fbc5cbbe5e9c2b2e | 67dfb56a4d1ba36462d52bdfdc5492a8ac586b94 | /server/src/org/glite/rgma/server/services/streaming/StreamingSource.java | 453dd784642d49de9dedcae69584aabd8d9ed6de | [
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0"
] | permissive | fisherab/r-gma | 7c0f5657fcec88c7713d7e66e5610982b5d2d7d3 | 7ba2ad42c3332b39ab07eb9a9bb25ef1b4afe3ad | refs/heads/master | 2016-09-03T00:34:34.017547 | 2011-08-27T02:15:26 | 2011-08-27T02:15:26 | 32,185,595 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,802 | java | /*
* Copyright (c) Members of the EGEE Collaboration. 2004.
* See http://eu-egee.org/partners/ for details on the copyright holders.
* For license conditions see the license file or http://eu-egee.org/license.html
*/
package org.glite.rgma.server.services.streaming;
import java.nio.ByteBuffer;
import java.util.LinkedList;
import java.util.Queue;
import javax.net.ssl.SSLContext;
import org.apache.log4j.Logger;
import org.glite.rgma.server.services.producer.RunningQuery;
import org.glite.rgma.server.services.producer.store.TupleStore;
import org.glite.rgma.server.system.RGMAPermanentException;
import org.glite.rgma.server.system.StreamingProperties;
import org.glite.rgma.server.system.TupleSet;
import org.glite.rgma.server.system.TupleSetEnvelope;
/**
* Provides data to be sent on an outgoing streaming connection. A StreamingSource instance is created for each new
* connection opened by the streaming sender to a streaming receiver. The streaming sender takes bytes provided by the
* StreamingSource and writes them to the socket.
* <p>
* Synchronization is necessary on those methods which affect the internal list of queries since these may be called by
* different threads.
*/
/* TODO is there too much synchronization as described above ? */
public class StreamingSource extends StreamingSSLEngine {
private static final int PROTNUM = 2;
/** If <code>true</code>, this streaming source will accept new queries. */
private boolean m_active;
/** ByteBuffer containing the header bytes for the streaming protocol. */
private ByteBuffer m_header;
/** If <code>true</code>, header bytes have been sent. */
private boolean m_headerWritten;
/** LinkedList of queries whose results are to be sent using this StreamingSource. */
private final Queue<RunningQuery> m_queries;
private final StreamingProperties m_streamingProps;
private int m_optimalPackeSize;
private long m_dropTime;
private long m_periodToKeepRedundantSourceMillis;
/* This read buffer is shared because it is never actually used */
private static ByteBuffer s_readBuffer;
/**
* Constructor.
*
* @param streamingProps
* Streaming endpoint and protocol version.
* @param bufferSize
* Size of the write buffer in bytes.
* @param spservice
* @param ppservice
* @param odpservice
* @param sslContext
* @param allocateDirect
* @param currentResultSetRetry
*/
public StreamingSource(StreamingProperties streamingProps, int optimalPacketSize, SSLContext sslContext, boolean allocateDirect,
long periodToKeepRedundantSourceMillis) throws RGMAPermanentException {
LOG = Logger.getLogger(StreamingConstants.STREAMING_SENDER_LOGGER);
m_sslEngine = sslContext.createSSLEngine(streamingProps.getStreamingHost(), streamingProps.getStreamingPort());
m_handshakeStatus = m_sslEngine.getHandshakeStatus();
m_sslEngine.setUseClientMode(true);
int netBS = m_sslEngine.getSession().getPacketBufferSize();
if (allocateDirect) {
m_encryptedWriteBuffer = ByteBuffer.allocateDirect(netBS);
} else {
m_encryptedWriteBuffer = ByteBuffer.allocate(netBS);
}
m_encryptedReadBuffer = ByteBuffer.allocate(netBS);
/* This read buffer must be of the approved size though it is never used */
int appBS = m_sslEngine.getSession().getApplicationBufferSize();
if (s_readBuffer == null) {
s_readBuffer = ByteBuffer.allocate(appBS);
} else if (appBS > s_readBuffer.capacity()) {
s_readBuffer = ByteBuffer.allocate(appBS);
}
m_readBuffer = s_readBuffer;
m_optimalPackeSize = optimalPacketSize;
m_streamingProps = streamingProps;
m_periodToKeepRedundantSourceMillis = periodToKeepRedundantSourceMillis;
m_queries = new LinkedList<RunningQuery>();
m_headerWritten = false;
m_header = new TupleEncoder(PROTNUM).getHeader();
m_bytesSinceHandshake = 0;
m_active = true;
}
/**
* Add a query to the streaming source.
*
* @param query
* RunningQuery to add.
*/
public synchronized boolean addQuery(RunningQuery query) {
if (m_active) {
m_queries.add(query);
if (LOG.isDebugEnabled()) {
LOG.debug("Added RunningQuery:" + query + " to StreamingSource with status " + m_engineOpStatus + " " + m_handshakeStatus);
}
return true;
} else {
return false;
}
}
public StreamingProperties getStreamingProperties() {
return m_streamingProps;
}
public synchronized boolean isTupleStoreUsed(TupleStore store) {
for (RunningQuery q : m_queries) {
if (q.getTupleStore() == store) {
return true;
}
}
return false;
}
/**
* Pop bytes to be sent on the streaming connection.
*
* @return buffer Buffer containing bytes to be sent on the streaming connection, positioned to be written from the
* current position, or <code>null</code> if this streaming source has completed sending all of its queries
* and is now closed.
* @throws RGMAPermanentException
*/
public synchronized ByteBuffer popBytes() throws RGMAPermanentException {
RunningQuery query = null;
if (!m_active && m_sslEngine.isOutboundDone() && m_encryptedWriteBuffer.position() == 0) {
if (LOG.isDebugEnabled()) {
LOG.debug(this + " is closing down");
}
return null;
}
boolean active = m_queries.size() > 0 || m_writeBuffers.size() > 0;
if (active) {
m_dropTime = 0;
} else {
if (m_dropTime == 0) {
m_dropTime = System.currentTimeMillis() + m_periodToKeepRedundantSourceMillis;
if (LOG.isDebugEnabled()) {
LOG.debug(this + " is not currently active - wait for " + m_periodToKeepRedundantSourceMillis + " ms before closing");
}
} else if (System.currentTimeMillis() > m_dropTime) {
if (LOG.isDebugEnabled()) {
LOG.debug("Sending closeOutBound for " + this);
}
m_active = false;
m_sslEngine.closeOutbound();
} else {
if (LOG.isDebugEnabled()) {
LOG.debug(this + " still not active - wait for " + (m_dropTime - System.currentTimeMillis()) + " ms before closing");
}
}
}
if (!m_headerWritten) {
m_writeBuffers.add(m_header);
m_headerWritten = true;
}
boolean dataFound = false;
RunningQuery sentinel = null; /* Will be used to detect once round the queue */
int bytesToWrite = 0;
for (ByteBuffer b : m_writeBuffers) {
bytesToWrite += b.position();
}
while (bytesToWrite < m_optimalPackeSize) {
query = m_queries.poll();
if (query == null) {
break;
}
boolean atSentinel = false;
if (sentinel == null) {
sentinel = query;
atSentinel = true;
} else if (sentinel == query) {
if (!dataFound) {
m_queries.add(query);
break;
}
dataFound = false;
atSentinel = true;
}
if (query.isActive()) {
try {
TupleSetEnvelope results = query.pop();
TupleSet ts = results.getTupleSet();
boolean eof = ts.isEndOfResults();
if (ts.size() != 0 || eof) {
if (LOG.isDebugEnabled()) {
LOG.debug(ts.size() + " tuples for " + query + (eof ? " *EOF*" : ""));
}
ByteBuffer currentResultSet = new TupleEncoder(PROTNUM).encode(results);
bytesToWrite += currentResultSet.position();
m_writeBuffers.add(currentResultSet);
if (ts.size() != 0) {
dataFound = true;
}
if (eof) {
query = null;
}
}
} catch (RGMAPermanentException e) {
LOG.warn("Failed to pop tuples from store for " + query + ". " + e.getMessage() + " - results will be discarded");
/* stop this happening again */
query.abort();
query = null;
}
if (query != null) {
m_queries.add(query);
} else if (atSentinel) {
/* Need a new sentinel */
sentinel = null;
}
} else if (atSentinel) {
/* Need a new sentinel */
sentinel = null;
}
}
return wrap();
}
/**
* Prepare the StreamingSource to send bytes on a newly created connection. This method is called if the streaming
* sender is forced to recreate the socket connection. The streaming source must discard any partially complete
* result sets it has sent and re-send the complete result set. It must also re-send the header bytes. However we
* must not keep retrying the same resultSet - so watch the number of retrys
*
* @throws RGMAPermanentException
*/
public synchronized void reset() throws RGMAPermanentException {
m_writeBuffers.clear();
m_encryptedWriteBuffer.clear();
m_readBuffer.clear();
m_encryptedReadBuffer.clear();
m_headerWritten = false;
m_header = new TupleEncoder(PROTNUM).getHeader();
}
@Override
public synchronized String toString() {
return "Source for " + m_streamingProps.toString() + " has " + m_queries.size() + " queries and " + m_writeBuffers.size() + " write buffers bytes open";
}
@Override
public void pushBytes() throws RGMAPermanentException {
unwrap();
}
}
| [
"[email protected]@9fd00241-c8d1-a2cc-6176-14b799de2eb9"
] | [email protected]@9fd00241-c8d1-a2cc-6176-14b799de2eb9 |
f539e71190f6748cf66c971fd91a248d21a95166 | 1fc67c2fe2457ae35ceda53c4abdfaf463fc74c1 | /src/main/java/org/fenixsoft/jvm/chapter9/JavaclassExecuterTest.java | 37f63bf18608d8955b6a6c5c078c1131e743861e | [] | no_license | Sumkor/jvm_book | c99f487f099905410d25b8b187cfa2a3f27ecb09 | 90f48f2c0dea8ef7d917941ddc3d1d4dfa7e3aef | refs/heads/master | 2022-11-16T05:04:26.473578 | 2020-07-07T15:48:14 | 2020-07-07T15:48:14 | 259,579,513 | 0 | 0 | null | 2020-04-28T08:39:41 | 2020-04-28T08:39:41 | null | UTF-8 | Java | false | false | 628 | java | package org.fenixsoft.jvm.chapter9;
import java.io.FileInputStream;
import java.io.IOException;
/**
* @author Sumkor
* @since 2020/6/29
*/
public class JavaclassExecuterTest {
public static void main(String[] args) throws IOException {
String classFilePath = "C:\\TOOL\\Code\\jvm_book\\target\\classes\\org\\fenixsoft\\jvm\\chapter9\\MySystem.class";
FileInputStream fileInputStream = new FileInputStream(classFilePath);
byte[] bytes = new byte[fileInputStream.available()];
String execute = JavaclassExecuter.execute(bytes);
System.out.println("execute = " + execute);
}
}
| [
"[email protected]"
] | |
9a5199bd005756ddc29b4f8cef535d9cb4578c63 | 43b7f93c67323bd530cc5a8598dff1f8b86c633d | /blogPessoal/src/main/java/org/generation/blogPessoal/model/UserDetailsServiceImpl.java | 7c74681e6127503a37c88f4b769cb52a8e20ba4d | [] | no_license | Rafael702/Generation | 7f07036776f4b310e9cea9b5646299d4974e2829 | a60a034a4c8f87fa53a05a3f91929a381ab82f73 | refs/heads/main | 2023-06-29T13:03:27.999342 | 2021-08-06T01:25:19 | 2021-08-06T01:25:19 | 373,284,114 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 907 | java | package org.generation.blogPessoal.model;
import java.util.Optional;
import org.generation.blogPessoal.repository.UsuarioRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Service;
@Service
public class UserDetailsServiceImpl implements UserDetailsService{
@Autowired
private UsuarioRepository userRepository;
@Override
public UserDetails loadUserByUsername(String userName) throws UsernameNotFoundException {
Optional<Usuario> user = userRepository.findByUsuario(userName);
user.orElseThrow(() -> new UsernameNotFoundException(userName + "not found."));
return user.map(UserDetailsImpl::new).get();
}
}
| [
"[email protected]"
] | |
2b1d5e5ab621207986d8a9fb6077f34dc1773039 | 6f852bc7f97aa1e598f6eea66879ef9841bd162c | /src/main/java/ua/lviv/iot/dataaccess/PrinterRepository.java | 2e6871b0bfc9f5e59d068eb75c24a76981279946 | [] | no_license | PeeckDann/iot-2019-os | c0ccb9bcc47dd75945a2a49b635b08f18c2b6488 | 801a090b109b98c0e72b1b105d1ff27cd0fa3f96 | refs/heads/master | 2023-05-12T13:23:35.042749 | 2021-05-30T15:48:28 | 2021-05-30T15:48:28 | 368,237,621 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 287 | java | package ua.lviv.iot.dataaccess;
import ua.lviv.iot.model.entity.Printer;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
@Repository
public interface PrinterRepository extends JpaRepository<Printer, Integer> {
} | [
"[email protected]"
] | |
17c0a1913ad963d3fb95b00443c9e4efa824e14e | 5e5f296e7284cd8e303e8c6d65ef8cb5f8abccd7 | /src/main/java/uy/com/innobit/rem/presentation/component/ContractExpirationDataValue.java | 2a4bbc6812f50117580b6232cc3297b1fd15743b | [] | no_license | araujomelogno/LocalesSantosDumont | 73e314b0104d0b76f6385b879f8f9111df3821ea | 64f434fbc57a9b6f270ee99df25d205bbdb4c42d | refs/heads/master | 2021-01-20T05:09:17.127096 | 2017-06-27T18:32:59 | 2017-06-27T18:32:59 | 89,752,743 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,003 | java | package uy.com.innobit.rem.presentation.component;
import uy.com.innobit.rem.persistence.datamodel.contract.Contract;
public class ContractExpirationDataValue {
private String property;
private Double m1 = 0d;
private Double m2 = 0d;
private Double m3 = 0d;
private Double m4 = 0d;
private Double m5 = 0d;
private Double m6 = 0d;
private Double m7 = 0d;
private Double m8 = 0d;
private Double m9 = 0d;
private Double m10 = 0d;
private Double m11 = 0d;
private Double m12 = 0d;
private Integer d1 = 0;
private Integer d2 = 0;
private Integer d3 = 0;
private Integer d4 = 0;
private Integer d5 = 0;
private Integer d6 = 0;
private Integer d7 = 0;
private Integer d8 = 0;
private Integer d9 = 0;
private Integer d10 = 0;
private Integer d11 = 0;
private Integer d12 = 0;
private Double rentalTotal = 0d;
private Double ownerComission = 0d;
private Double clientComission = 0d;
private Contract contract;
public String getProperty() {
return property;
}
public void setProperty(String property) {
this.property = property;
}
public Double getM1() {
return m1;
}
public void setM1(Double m1) {
this.m1 = m1;
}
public Double getM2() {
return m2;
}
public void setM2(Double m2) {
this.m2 = m2;
}
public Double getM3() {
return m3;
}
public void setM3(Double m3) {
this.m3 = m3;
}
public Double getM4() {
return m4;
}
public void setM4(Double m4) {
this.m4 = m4;
}
public Double getM5() {
return m5;
}
public void setM5(Double m5) {
this.m5 = m5;
}
public Double getM6() {
return m6;
}
public void setM6(Double m6) {
this.m6 = m6;
}
public Double getM7() {
return m7;
}
public void setM7(Double m7) {
this.m7 = m7;
}
public Double getM8() {
return m8;
}
public void setM8(Double m8) {
this.m8 = m8;
}
public Double getM9() {
return m9;
}
public void setM9(Double m9) {
this.m9 = m9;
}
public Double getM10() {
return m10;
}
public void setM10(Double m10) {
this.m10 = m10;
}
public Double getM11() {
return m11;
}
public void setM11(Double m11) {
this.m11 = m11;
}
public Double getM12() {
return m12;
}
public void setM12(Double m12) {
this.m12 = m12;
}
public Double getRentalTotal() {
return rentalTotal;
}
public void setRentalTotal(Double rentalTotal) {
this.rentalTotal = rentalTotal;
}
public Double getOwnerComission() {
return ownerComission;
}
public void setOwnerComission(Double ownerComission) {
this.ownerComission = ownerComission;
}
public Double getClientComission() {
return clientComission;
}
public void setClientComission(Double clientComission) {
this.clientComission = clientComission;
}
public Integer getD1() {
return d1;
}
public void setD1(Integer d1) {
this.d1 = d1;
}
public Integer getD2() {
return d2;
}
public void setD2(Integer d2) {
this.d2 = d2;
}
public Integer getD3() {
return d3;
}
public void setD3(Integer d3) {
this.d3 = d3;
}
public Integer getD4() {
return d4;
}
public void setD4(Integer d4) {
this.d4 = d4;
}
public Integer getD5() {
return d5;
}
public void setD5(Integer d5) {
this.d5 = d5;
}
public Integer getD6() {
return d6;
}
public void setD6(Integer d6) {
this.d6 = d6;
}
public Integer getD7() {
return d7;
}
public void setD7(Integer d7) {
this.d7 = d7;
}
public Integer getD8() {
return d8;
}
public void setD8(Integer d8) {
this.d8 = d8;
}
public Integer getD9() {
return d9;
}
public void setD9(Integer d9) {
this.d9 = d9;
}
public Integer getD10() {
return d10;
}
public void setD10(Integer d10) {
this.d10 = d10;
}
public Integer getD11() {
return d11;
}
public void setD11(Integer d11) {
this.d11 = d11;
}
public Integer getD12() {
return d12;
}
public void setD12(Integer d12) {
this.d12 = d12;
}
public Contract getContract() {
return contract;
}
public void setContract(Contract contract) {
this.contract = contract;
}
}
| [
"[email protected]"
] | |
cc85a31fa16e47379284186e28c49a710c8cd5a8 | 73c5047a542483475a22e74841275a0877c7f44d | /kaola_parent/kaola_service/kaola_service_goods/src/main/java/com/deyuan/goods/dao/SpecMapper.java | 19515ff7fc54dc5ca8ec653fd9303be2ab1168e2 | [] | no_license | LCLHuaHua/Kaola-618 | a7575d0486e1ce282677ac0c07dd22e9aaa2dddf | 83f6c536a74bd7ae8736e6c7f9cc80de8fd9dfd4 | refs/heads/master | 2023-08-07T00:19:09.368976 | 2021-09-16T08:32:37 | 2021-09-16T08:32:37 | 407,082,074 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 541 | java | package com.deyuan.goods.dao;
import com.deyuan.goods.pojo.Spec;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;
import java.util.List;
public interface SpecMapper extends Mapper<Spec> {
//根据分类名称查询规格列表
@Select("SELECT * from tb_spec where template_id in(select template_id from tb_category where id in(SELECT id from tb_category where name=#{specName}))")
List<Spec> findByCateName(@Param("specName") String specName);
}
| [
"[email protected]"
] | |
d02b74111b4098565eb5bd1eaf4bbf3432ff3c82 | 2bed53bf6eaf6b764d07c16a352c6aaa3f3d895c | /CouponsExample/src/main/java/com/example/CouponsExample/Login/ClientType.java | fc79221c2a48a00f36e333bd7c14d24b441ed93f | [] | no_license | YanivMit/Coupons | 8a55deab8a3870d4fbb50a052833c6c1c360b894 | a38f3624b90a9a00fc05cd82f8dab965ae00fb60 | refs/heads/main | 2021-08-09T01:01:31.716965 | 2020-12-22T11:33:50 | 2020-12-22T11:33:50 | 234,044,685 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 111 | java | package com.example.CouponsExample.Login;
public enum ClientType {
Administrator, Company, Customer
} | [
"[email protected]"
] | |
94ce699fa071c806208d3a8434703f735a9251a8 | 07fe8d4096ee2b90aded76d4d0bdd7d342ab16f1 | /sdk/java-sdk-testkit/src/main/java/com/akkaserverless/javasdk/testkit/ActionResult.java | b4804a9dca721969ef65a3c1b96f297241e42392 | [
"Apache-2.0"
] | permissive | jondlew/akkaserverless-java-sdk | c31e06276ba0a721b0daba05153c6a6b92c09deb | 5befbc615f332ab9f9e991ce3351467c4687ff94 | refs/heads/main | 2023-08-29T05:43:29.732332 | 2021-10-28T07:05:39 | 2021-10-28T07:05:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,203 | java | /*
* Copyright 2021 Lightbend Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.akkaserverless.javasdk.testkit;
import java.util.concurrent.CompletionStage;
import java.util.List;
/**
* Represents the result of an Action handling a command when run in through the testkit.
*
* <p>Not for user extension, returned by the generated testkit.
*
* @param <T> The type of reply that is expected from invoking a command handler
*/
public interface ActionResult<T> {
/** @return true if the call had an effect with a reply, false if not */
boolean isReply();
/**
* @return The reply message if the returned effect was a reply or throws if the returned effect
* was not a reply.
*/
T getReply();
/** @return true if the call was forwarded, false if not */
boolean isForward();
/**
* @return An object with details about the forward. If the result was not a forward an exception
* is thrown.
*/
ServiceCallDetails<T> getForward();
/** @return true if the call was async, false if not */
boolean isAsync();
/**
* @return The future result if the returned effect was an async effect or throws if the returned
* effect was not async.
*/
CompletionStage<ActionResult<T>> getAsyncResult();
/** @return true if the call was an error, false if not */
boolean isError();
/**
* @return The error description returned or throws if the effect returned by the action was not
* an error
*/
String getError();
/** @return true if the call had a noReply effect, false if not */
boolean isNoReply();
/** @return The list of side effects */
List<ServiceCallDetails<T>> getSideEffects();
}
| [
"[email protected]"
] | |
6d530546cd57acd045ceaf1caacc96a05c7e9f8f | 77a8c1b0247933e162dd25d232995a0c4fc7846a | /springboot-technology/springboot-rocketmq/src/main/java/com/shuai/springbootrocketmq/sendmsg/SyncProducer.java | 7be452455b3d7e336b36ea93b9049d5615e12c5c | [] | no_license | shuaishaui/springboot-technology | 09b9649e9f0a028efb83642b20e985ade73ba80c | 2fcb13049686ce48c5366952629397e197c97b17 | refs/heads/master | 2022-12-20T13:48:49.537734 | 2019-11-19T07:34:52 | 2019-11-19T07:34:58 | 216,186,899 | 312 | 24 | null | 2022-12-16T00:39:27 | 2019-10-19T10:14:46 | Java | UTF-8 | Java | false | false | 1,009 | java | package com.shuai.springbootrocketmq.sendmsg;
import org.apache.rocketmq.client.producer.DefaultMQProducer;
import org.apache.rocketmq.client.producer.SendResult;
import org.apache.rocketmq.common.message.Message;
/**
* 同步发送消息
*/
public class SyncProducer {
public static void main(String[] args) throws Exception {
DefaultMQProducer producer = new DefaultMQProducer("xshuai");
producer.setNamesrvAddr("192.168.44.149:9876");
producer.start();
//发送消息
String msg = "这是一个同步消息";
Message message = new Message("shuai", "syncMessage", msg.getBytes("UTF-8"));
SendResult sendResult = producer.send(message);
System.out.println("消息id:" + sendResult.getMsgId());
System.out.println("消息队列:" + sendResult.getMessageQueue());
System.out.println("消息offset值:" + sendResult.getQueueOffset());
System.out.println(sendResult);
producer.shutdown();
}
}
| [
"[email protected]"
] | |
10a34cdd14e6cf25ee15cc45d0132564d4035a7e | 0af8b92686a58eb0b64e319b22411432aca7a8f3 | /large-multiproject/project96/src/test/java/org/gradle/test/performance96_3/Test96_262.java | 5d1b37fb650a8e63f9b5d0fb03b35b929879b10a | [] | no_license | gradle/performance-comparisons | b0d38db37c326e0ce271abebdb3c91769b860799 | e53dc7182fafcf9fedf07920cbbea8b40ee4eef4 | refs/heads/master | 2023-08-14T19:24:39.164276 | 2022-11-24T05:18:33 | 2022-11-24T05:18:33 | 80,121,268 | 17 | 15 | null | 2022-09-30T08:04:35 | 2017-01-26T14:25:33 | null | UTF-8 | Java | false | false | 292 | java | package org.gradle.test.performance96_3;
import static org.junit.Assert.*;
public class Test96_262 {
private final Production96_262 production = new Production96_262("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
} | [
"[email protected]"
] | |
3690b3bf744c68c1e8297d1fb6b06c5ab4144e23 | 48f71dddf47942f9dd799b3ef81f6305429c6aba | /MonkeyandBanana/src/stateImp/up_move.java | 5ff64c63a2334dcd471ba0d69af0fe7752e95590 | [] | no_license | jayesslin/MonkeyandBanana | aee0f04a09a4d8067610b35cbf43c47938b12e95 | 0939e3ff3bfc95db1d6a0920d4f343baf0efd86f | refs/heads/master | 2020-04-05T19:14:01.213646 | 2018-11-11T21:53:57 | 2018-11-11T21:53:57 | 157,124,886 | 0 | 0 | null | null | null | null | IBM852 | Java | false | false | 369 | java | package stateImp;
import model.Banana;
import model.Monkey;
public class up_move extends startstate{
public void setposition() {
Monkey x = Monkey.getInstance();
Banana b = Banana.getInstance();
x.setY(1);
System.out.println("Monkey now inú║ ["+x.getX()+" ,"+x.getY()+"]");
System.out.println("banana now inú║ ["+b.getX()+" ,"+b.getY()+"]");
}
}
| [
"[email protected]"
] | |
925ca4493fccac7b9ffe83635961d7ae4403cab8 | 95c49f466673952b465e19a5ee3ae6eff76bee00 | /src/main/java/com/zhihu/android/videotopic/p2060ui/fragment/answerVideoList/wiget/AnswerTipTextView.java | d83ce4a8fcaceae00a043bcc664865d37a3da334 | [] | no_license | Phantoms007/zhihuAPK | 58889c399ae56b16a9160a5f48b807e02c87797e | dcdbd103436a187f9c8b4be8f71bdf7813b6d201 | refs/heads/main | 2023-01-24T01:34:18.716323 | 2020-11-25T17:14:55 | 2020-11-25T17:14:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,655 | java | package com.zhihu.android.videotopic.p2060ui.fragment.answerVideoList.wiget;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.text.Layout;
import android.text.SpannableString;
import android.text.StaticLayout;
import android.text.TextPaint;
import android.text.TextUtils;
import android.text.method.LinkMovementMethod;
import android.text.style.ClickableSpan;
import android.util.AttributeSet;
import android.util.Log;
import android.view.View;
import android.widget.TextView;
import androidx.appcompat.widget.AppCompatTextView;
import com.secneo.apkwrapper.C6969H;
import com.zhihu.android.C18888h;
/* renamed from: com.zhihu.android.videotopic.ui.fragment.answerVideoList.wiget.AnswerTipTextView */
public class AnswerTipTextView extends AppCompatTextView {
/* renamed from: a */
private String f96480a;
/* renamed from: b */
private int f96481b;
/* renamed from: c */
private int f96482c;
/* renamed from: d */
private boolean f96483d;
/* renamed from: e */
private boolean f96484e;
/* renamed from: f */
private boolean f96485f;
/* renamed from: g */
private String f96486g;
/* renamed from: h */
private float f96487h;
/* renamed from: i */
private float f96488i;
/* renamed from: j */
private int f96489j;
/* renamed from: k */
private int f96490k;
/* renamed from: l */
private AbstractC27919a f96491l;
/* renamed from: m */
private ClickableSpan f96492m;
/* renamed from: com.zhihu.android.videotopic.ui.fragment.answerVideoList.wiget.AnswerTipTextView$a */
public interface AbstractC27919a {
/* renamed from: c */
void mo115840c();
}
public void setTextCallback(AbstractC27919a aVar) {
this.f96491l = aVar;
}
public AnswerTipTextView(Context context, AttributeSet attributeSet) {
this(context, attributeSet, 0);
}
public AnswerTipTextView(Context context, AttributeSet attributeSet, int i) {
super(context, attributeSet, i);
this.f96483d = false;
this.f96484e = false;
this.f96485f = false;
this.f96487h = 1.2f;
this.f96488i = 0.0f;
this.f96489j = 0;
this.f96490k = 0;
this.f96492m = new ClickableSpan() {
/* class com.zhihu.android.videotopic.p2060ui.fragment.answerVideoList.wiget.AnswerTipTextView.C279181 */
public void onClick(View view) {
AnswerTipTextView answerTipTextView = AnswerTipTextView.this;
answerTipTextView.f96483d = !answerTipTextView.f96483d;
AnswerTipTextView.this.f96484e = false;
if (AnswerTipTextView.this.f96491l != null) {
AnswerTipTextView.this.f96491l.mo115840c();
}
AnswerTipTextView.this.invalidate();
}
public void updateDrawState(TextPaint textPaint) {
textPaint.setColor(AnswerTipTextView.this.f96482c);
textPaint.setTextSize(AnswerTipTextView.this.getTextSize() * 0.86f);
textPaint.baselineShift = -((int) (AnswerTipTextView.this.getTextSize() * 0.07f));
}
};
TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, C18888h.C18889a.VideoTopicFolderTextView);
this.f96480a = obtainStyledAttributes.getString(4);
if (this.f96480a == null) {
this.f96480a = "查看回答";
}
this.f96481b = obtainStyledAttributes.getInt(1, 2);
if (this.f96481b >= 1) {
this.f96482c = obtainStyledAttributes.getColor(3, -1291845633);
obtainStyledAttributes.recycle();
return;
}
throw new RuntimeException("foldLine must not less than 1");
}
@Override // android.widget.TextView
public void setText(CharSequence charSequence, TextView.BufferType bufferType) {
if (TextUtils.isEmpty(this.f96486g) || !this.f96485f) {
this.f96484e = false;
this.f96486g = String.valueOf(charSequence);
}
super.setText(charSequence, bufferType);
}
public void setLineSpacing(float f, float f2) {
this.f96488i = f;
this.f96487h = f2;
super.setLineSpacing(f, f2);
}
public void invalidate() {
super.invalidate();
}
/* access modifiers changed from: protected */
public void onDraw(Canvas canvas) {
String d = C6969H.m41409d("G4D86D70FB87D8D");
StringBuilder sb = new StringBuilder();
sb.append(C6969H.m41409d("G668DF108BE27E360A6"));
int i = this.f96490k;
this.f96490k = i + 1;
sb.append(i);
sb.append(C6969H.m41409d("G25C3D21FAB1DAE28F51B824DF6CDC6DE6E8BC152F670"));
sb.append(getMeasuredHeight());
Log.d(d, sb.toString());
if (!this.f96484e) {
m133794a();
}
super.onDraw(canvas);
this.f96484e = true;
this.f96485f = false;
}
public int getFoldLine() {
return this.f96481b;
}
public void setFoldLine(int i) {
this.f96481b = i;
invalidate();
}
public int getTailColor() {
return this.f96482c;
}
public void setTailColor(int i) {
this.f96482c = i;
invalidate();
}
public String getFullText() {
return this.f96486g;
}
/* renamed from: a */
private Layout m133793a(String str) {
return new StaticLayout(str, getPaint(), (getWidth() - getPaddingLeft()) - getPaddingRight(), Layout.Alignment.ALIGN_NORMAL, this.f96487h, this.f96488i, true);
}
/* renamed from: a */
private void m133794a() {
if (m133793a(this.f96486g).getLineCount() <= getFoldLine()) {
setText(this.f96486g);
return;
}
m133795a(m133798b(this.f96486g));
setMovementMethod(LinkMovementMethod.getInstance());
}
/* renamed from: a */
private void m133795a(CharSequence charSequence) {
this.f96485f = true;
setText(charSequence);
}
/* renamed from: b */
private SpannableString m133798b(String str) {
long currentTimeMillis = System.currentTimeMillis();
String d = m133803d(str);
String d2 = C6969H.m41409d("G4D86D70FB87D8D");
Log.d(d2, (System.currentTimeMillis() - currentTimeMillis) + "ms");
int length = d.length() - this.f96480a.length();
int length2 = d.length();
SpannableString spannableString = new SpannableString(d);
spannableString.setSpan(this.f96492m, length, length2, 33);
return spannableString;
}
/* renamed from: c */
private String m133802c(String str) {
String d = C6969H.m41409d("G4D86D70FB87D8D");
StringBuilder sb = new StringBuilder();
sb.append("使用备用方法: tailorTextBackUp() ");
int i = this.f96489j;
this.f96489j = i + 1;
sb.append(i);
Log.d(d, sb.toString());
String str2 = str + "··· " + this.f96480a;
Layout a = m133793a(str2);
if (a.getLineCount() <= getFoldLine()) {
return str2;
}
int lineEnd = a.getLineEnd(getFoldLine() - 1);
if (str.length() < lineEnd) {
lineEnd = str.length();
}
if (lineEnd > 1) {
return m133803d(str.substring(0, lineEnd - 1));
}
return "··· " + this.f96480a;
}
/* renamed from: d */
private String m133803d(String str) {
int length = str.length() - 1;
int i = (length + 0) / 2;
int a = m133792a(str, i);
int i2 = i;
int i3 = 0;
while (a != 0 && length > i3) {
if (a > 0) {
length = i2 - 1;
} else if (a < 0) {
i3 = i2 + 1;
}
i2 = (i3 + length) / 2;
a = m133792a(str, i2);
}
if (a != 0) {
return m133802c(str);
}
return str.substring(0, i2) + "··· " + this.f96480a;
}
/* renamed from: a */
private int m133792a(String str, int i) {
String str2 = str.substring(0, i) + "··· " + this.f96480a;
Layout a = m133793a(str2);
Layout a2 = m133793a(str2 + "A");
int lineCount = a.getLineCount();
int lineCount2 = a2.getLineCount();
if (lineCount == getFoldLine() && lineCount2 == getFoldLine() + 1) {
return 0;
}
if (lineCount > getFoldLine()) {
return 1;
}
return -1;
}
}
| [
"[email protected]"
] | |
5c675535be158be565fb357a72da0281f8102396 | f40c5613a833bc38fca6676bad8f681200cffb25 | /kubernetes-model-generator/openshift-model/src/generated/java/io/fabric8/openshift/api/model/NetworkStatus.java | 57701aa0001f63d75c2833c60f43644a232b1025 | [
"Apache-2.0"
] | permissive | rohanKanojia/kubernetes-client | 2d599e4ed1beedf603c79d28f49203fbce1fc8b2 | 502a14c166dce9ec07cf6adb114e9e36053baece | refs/heads/master | 2023-07-25T18:31:33.982683 | 2022-04-12T13:39:06 | 2022-04-13T05:12:38 | 106,398,990 | 2 | 3 | Apache-2.0 | 2023-04-28T16:21:03 | 2017-10-10T09:50:25 | Java | UTF-8 | Java | false | false | 5,338 | java |
package io.fabric8.openshift.api.model;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import io.fabric8.kubernetes.api.model.Container;
import io.fabric8.kubernetes.api.model.IntOrString;
import io.fabric8.kubernetes.api.model.KubernetesResource;
import io.fabric8.kubernetes.api.model.LabelSelector;
import io.fabric8.kubernetes.api.model.LocalObjectReference;
import io.fabric8.kubernetes.api.model.ObjectMeta;
import io.fabric8.kubernetes.api.model.ObjectReference;
import io.fabric8.kubernetes.api.model.PersistentVolumeClaim;
import io.fabric8.kubernetes.api.model.PodTemplateSpec;
import io.fabric8.kubernetes.api.model.ResourceRequirements;
import io.sundr.builder.annotations.Buildable;
import io.sundr.builder.annotations.BuildableReference;
import lombok.EqualsAndHashCode;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;
@JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"apiVersion",
"kind",
"metadata",
"clusterNetwork",
"clusterNetworkMTU",
"migration",
"networkType",
"serviceNetwork"
})
@ToString
@EqualsAndHashCode
@Setter
@Accessors(prefix = {
"_",
""
})
@Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = {
@BuildableReference(ObjectMeta.class),
@BuildableReference(LabelSelector.class),
@BuildableReference(Container.class),
@BuildableReference(PodTemplateSpec.class),
@BuildableReference(ResourceRequirements.class),
@BuildableReference(IntOrString.class),
@BuildableReference(ObjectReference.class),
@BuildableReference(LocalObjectReference.class),
@BuildableReference(PersistentVolumeClaim.class)
})
public class NetworkStatus implements KubernetesResource
{
@JsonProperty("clusterNetwork")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private List<ClusterNetworkEntry> clusterNetwork = new ArrayList<ClusterNetworkEntry>();
@JsonProperty("clusterNetworkMTU")
private Integer clusterNetworkMTU;
@JsonProperty("migration")
private NetworkMigration migration;
@JsonProperty("networkType")
private String networkType;
@JsonProperty("serviceNetwork")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private List<String> serviceNetwork = new ArrayList<String>();
@JsonIgnore
private Map<String, Object> additionalProperties = new HashMap<String, Object>();
/**
* No args constructor for use in serialization
*
*/
public NetworkStatus() {
}
/**
*
* @param migration
* @param serviceNetwork
* @param clusterNetworkMTU
* @param clusterNetwork
* @param networkType
*/
public NetworkStatus(List<ClusterNetworkEntry> clusterNetwork, Integer clusterNetworkMTU, NetworkMigration migration, String networkType, List<String> serviceNetwork) {
super();
this.clusterNetwork = clusterNetwork;
this.clusterNetworkMTU = clusterNetworkMTU;
this.migration = migration;
this.networkType = networkType;
this.serviceNetwork = serviceNetwork;
}
@JsonProperty("clusterNetwork")
public List<ClusterNetworkEntry> getClusterNetwork() {
return clusterNetwork;
}
@JsonProperty("clusterNetwork")
public void setClusterNetwork(List<ClusterNetworkEntry> clusterNetwork) {
this.clusterNetwork = clusterNetwork;
}
@JsonProperty("clusterNetworkMTU")
public Integer getClusterNetworkMTU() {
return clusterNetworkMTU;
}
@JsonProperty("clusterNetworkMTU")
public void setClusterNetworkMTU(Integer clusterNetworkMTU) {
this.clusterNetworkMTU = clusterNetworkMTU;
}
@JsonProperty("migration")
public NetworkMigration getMigration() {
return migration;
}
@JsonProperty("migration")
public void setMigration(NetworkMigration migration) {
this.migration = migration;
}
@JsonProperty("networkType")
public String getNetworkType() {
return networkType;
}
@JsonProperty("networkType")
public void setNetworkType(String networkType) {
this.networkType = networkType;
}
@JsonProperty("serviceNetwork")
public List<String> getServiceNetwork() {
return serviceNetwork;
}
@JsonProperty("serviceNetwork")
public void setServiceNetwork(List<String> serviceNetwork) {
this.serviceNetwork = serviceNetwork;
}
@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
}
@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
this.additionalProperties.put(name, value);
}
}
| [
"[email protected]"
] | |
45c8899ef1f4f25f5b2269fa36a8f080d29f249f | 2151539b863d3ff86994fc2b588e2e31179dbd46 | /gün4ödev/src/gün4ödev/GameSell.java | 56f252b8e64e75500dff8ba94fb83206ce8f1701 | [] | no_license | FurkanCandan/gun4odev | 387e74c0177e4bbb2513ec35832ffa90c42c67ea | adefc91a5cd70fec2c0cda7fa6d78bd9a99122a9 | refs/heads/main | 2023-04-22T07:20:02.083073 | 2021-05-03T19:17:10 | 2021-05-03T19:17:10 | 364,035,733 | 1 | 0 | null | null | null | null | ISO-8859-9 | Java | false | false | 422 | java | package gün4ödev;
public class GameSell {
public void sell(User user) {
System.out.println("Oyunu Satın aldı : " + user.getFirstName()+" "+user.getLastName());
}
public void sell(User user, Kampanya kampanya) {
System.out.println("Oyunu kampanyalı Satın aldı : " + user.getFirstName()+" "+user.getLastName()
+ " " + kampanya.getKampanyaAdi() );
}
}
| [
"[email protected]"
] | |
c0f5c3e0378a10a5cd0f2b747845314c5c56b632 | cf17e1c4e50d831ce6b9c130b8f490d2da8b6153 | /demospringboot/src/test/java/com/example/springboot/demospringboot/DemospringbootApplicationTests.java | c07c968543ff46c9af6369d1610ea44f1999da95 | [] | no_license | pengxiaofengzhongxiaodan/Java | 62dcdc724e15f3ae9b10d4b2425cd0e36aee0cda | 5d554323015d7c2728602dde5441b4cdc76e81bb | refs/heads/master | 2020-03-29T22:09:52.051756 | 2018-09-26T10:26:31 | 2018-09-26T10:26:31 | 150,406,350 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 371 | java | package com.example.springboot.demospringboot;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest
public class DemospringbootApplicationTests {
@Test
public void contextLoads() {
}
}
| [
"[email protected]"
] | |
eae473daafdf49d54e1527a3d2f757e8ccbc37c0 | 9b22cf68d71f156373ea03d64889443765260bec | /mutants/solved/smallest_6aaeaf2f_001/src/main/java/introclassJava/391/smallest_6aaeaf2f_001.java | 504d9f736fe42238dd044fe946e9e49a8e90971c | [] | no_license | CosmicBeing09/Impact-of-Syntactic-and-Semantic-Similarities-On-Patch-Prioritization-Using-Insertion-Operation | b110a974b35c4aba4cb9c2d57e097c9c487df81b | 9ea1c06fc246d310952ec23326e0bd62449fb70b | refs/heads/main | 2023-03-07T21:43:42.275626 | 2021-02-20T07:22:11 | 2021-02-20T07:22:11 | 329,861,357 | 1 | 1 | null | 2021-01-21T17:13:57 | 2021-01-15T09:06:01 | Java | UTF-8 | Java | false | false | 2,030 | java | package introclassJava;
class IntObj {
public int value;
public IntObj () {
} public IntObj (int i) {
value = i;
}
}
class FloatObj {
public float value;
public FloatObj () {
} public FloatObj (float i) {
value = i;
}
}
class LongObj {
public long value;
public LongObj () {
} public LongObj (long i) {
value = i;
}
}
class DoubleObj {
public double value;
public DoubleObj () {
} public DoubleObj (double i) {
value = i;
}
}
class CharObj {
public char value;
public CharObj () {
} public CharObj (char i) {
value = i;
}
}
public class smallest_6aaeaf2f_001 {
public java.util.Scanner scanner;
public String output = "";
public static void main (String[]args) throws Exception {
smallest_6aaeaf2f_001 mainClass = new smallest_6aaeaf2f_001 ();
String output;
if (args.length > 0) {
mainClass.scanner = new java.util.Scanner (args[0]);
} else {
mainClass.scanner = new java.util.Scanner (System.in);
}
mainClass.exec ();
System.out.println (mainClass.output);
}
public void exec () throws Exception {
IntObj int1 = new IntObj (), int2 = new IntObj (), int3 =
new IntObj (), int4 = new IntObj (), tmp = new IntObj ();
output +=
(String.format ("Please enter 4 numbers separated by spaces > "));
int1.value = scanner.nextInt ();
int2.value = scanner.nextInt ();
int3.value = scanner.nextInt ();
int4.value = scanner.nextInt ();
tmp.value = int1.value;
if (int1.value > int2.value) {
tmp.value = int2.value;
} else if (tmp.value > int3.value) {
tmp.value = int3.value;
} else if (tmp.value > int4.value) {
tmp.value = int4.value;
}
output += (String.format ("%d is the smallest\n", System, tmp.value));
if (true)
return;;
}
}
| [
"[email protected]"
] | |
4ba2e37f1ebb965eb174bf512f3a1dafba7c395e | 9e381de268ac5848b56b3b25702cf241e3b004d4 | /chap1/DoublingRatio.java | fccd62b808739284e99a6ae540973efc659f85ca | [] | no_license | AlexanderWei666/algs4 | 711bbdd322757e94ec7ef69c7c84e25e518b1346 | 6a95321c45a33fdab8a5b538e50341363fc45631 | refs/heads/master | 2020-04-11T18:16:20.338948 | 2018-12-29T14:21:03 | 2018-12-29T14:21:03 | 161,992,245 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 362 | java | public class DoublingRatio {
public static void main(String[] args) {
double prev = DoublingTest.timeTrial(125);
for(int N = 250; true; N += N) {
double time = DoublingTest.timeTrial(N);
StdOut.printf("%6d %7.1f ", N, time);
StdOut.printf("%5.1f\n", time / prev);
prev = time;
}
}
} | [
"[email protected]"
] | |
9775105c74341cd413c79bb2d85997e82aed276e | 9f6d916a9457b8111221623a664ddfa0df80088f | /app/src/main/java/com/ciapa/androgon/ViewTools.java | 3c33b8f327972c4ab4100e7471d5935a2d0d632d | [] | no_license | Ciapas-Linux/AndroGon | 553bb172d1d23ca4a20b844848ae84d2028ccbfd | 8eb5abf0f26581ae3825760ccbede6e7595a6c30 | refs/heads/main | 2023-08-02T22:02:31.496863 | 2021-09-14T14:24:39 | 2021-09-14T14:24:39 | 406,392,457 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 10,991 | java | package com.ciapa.androgon;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Rect;
import android.media.MediaPlayer;
import android.os.Handler;
import android.os.Looper;
import android.view.Gravity;
import android.view.MotionEvent;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;
import java.util.Timer;
import java.util.TimerTask;
public class ViewTools extends View
{
// Main class & Utilities instance
public final MainActivity main;
public final Utilities util;
MyToastBox toastbox;
float eventX;
float eventY;
int ButtonDistance = 50;
int ButtonWidth;
int ButtonHeight;
MediaPlayer mp;
Timer Timer1;
Timer Timer2;
boolean DrawCircle = false;
// >BUTTONY<
CButton ButtonExit;
CButton ButtonUpdate;
CButton ButtonWykres;
// >Layout coordinates<
Rect top_box_rect;
Rect big_box_rect;
Paint paint;
public ViewTools(Context context,MainActivity activity)
{
super(context);
main = activity;
util = main.util;
paint = new Paint();
ButtonWidth = BitmapFactory.decodeResource(getResources(), R.drawable.btstarton).getWidth();
ButtonHeight = BitmapFactory.decodeResource(getResources(), R.drawable.btstarton).getHeight();
top_box_rect = new Rect((int)(main.screenWidth - util.Percent(99,main.screenWidth)),
(int)(main.screenHeight - util.Percent(99,main.screenHeight)),
(int)(main.screenWidth - util.Percent(1,main.screenWidth)),
(int)(main.screenHeight - util.Percent(80,main.screenHeight)));
big_box_rect = new Rect((int)(main.screenWidth - util.Percent(99,main.screenWidth)),
top_box_rect.bottom + 50,
(int)(main.screenWidth - util.Percent(1,main.screenWidth)),
(int)(main.screenHeight - util.Percent(1,main.screenHeight)));
//width: 2560
// FIRST CENTERED BATON
ButtonUpdate = new CButton(this,
(main.screenWidth - ButtonWidth) * 0.5f,
big_box_rect.top + 25,
R.drawable.btupdateon,
R.drawable.btupdateoff,
R.raw.keyboard,600);
ButtonWykres = new CButton(this,
ButtonUpdate.ButtonX - ButtonWidth - ButtonDistance,
big_box_rect.top + 25,
R.drawable.btcharton,
R.drawable.btchartoff,
R.raw.keyboard,600);
// RIGHT BOTTOM of screen
ButtonExit = new CButton(this,
main.screenWidth - ButtonWidth - (ButtonWidth/6),
main.screenHeight - ButtonHeight - (ButtonHeight/4),
R.drawable.btcloseon,
R.drawable.btcloseoff,
R.raw.keyboard,600);
toastbox = new MyToastBox(main);
toastbox.SetText("Hej witamy w aplikacji <ANDROGON> v 0.1.7 właśnie próbuję połączyć się ze sterownikiem !");
toastbox.SetIcon(R.drawable.happyface);
mp = MediaPlayer.create(context, R.raw.beep);
Timer1 = new Timer();
Timer1.schedule(new TimerTask()
{
@Override
public void run()
{
Timer1Method();
}
}, 0, 100);
Timer2 = new Timer();
Timer2.schedule(new TimerTask()
{
@Override
public void run()
{
Timer2Method();
}
}, 12000, 25000);
// toastbox.StartTimeOut(7000);
}
// 100 ms
private void Timer1Method()
{
}
// long timer
private void Timer2Method()
{
}
void play(int resid)
{
try
{
// if (mp.isPlaying())
// {
mp.stop();
mp.release();
mp = MediaPlayer.create(getContext(), resid);
// }
mp.start();
} catch (Exception e)
{
e.printStackTrace();
}
}
void SetVoiceTimeOut(int timeout, final int VoiceNumber)
{
new Handler(Looper.getMainLooper()).postDelayed(new Runnable() {
@Override
public void run()
{
switch (VoiceNumber)
{
// BT.kolumna
case 5:
play(R.raw.widokkolumny);
break;
// wykresiki
case 7:
play(R.raw.wykresiki);
break;
// exitapp
case 8:
play(R.raw.exitapp);
break;
}
}
}, timeout);
}
void SetDrawCircleTimeOut(int timeout)
{
new Handler(Looper.getMainLooper()).postDelayed(new Runnable() {
@Override
public void run()
{
DrawCircle = false;
//invalidate();
}
}, timeout);
}
// CHECK IF BUTTON IS CLICKED
void CheckButtons()
{
// EXIT X
if(ButtonExit.Update(eventX,eventY))
{
new android.os.Handler().postDelayed(
new Runnable()
{
public void run()
{
main.viewTools.setVisibility(View.GONE);
main.viewTools.setAlpha(0f);
main.mainView.setVisibility(View.VISIBLE);
main.mainView.bringToFront();
main.mainView.animate()
.alpha(1f)
.setDuration(2500)
.setListener(null);
}
},
500);
return;
}
// IF CLICKED KOLUMNA
if(ButtonUpdate.Update(eventX,eventY))
{
new android.os.Handler().postDelayed(
new Runnable() {
public void run()
{
main.viewTools.setAlpha(0f);
main.viewTools.setVisibility(View.GONE);
main.viewUpdate.setVisibility(View.VISIBLE);
main.viewUpdate.bringToFront();
main.viewUpdate.animate()
.alpha(1f)
.setDuration(2500)
.setListener(null);
main.viewUpdate.postInvalidate();
}
},
1000);
//SetVoiceTimeOut(1500,5);
return;
}
// IF CLICKED CHARTS
if(ButtonWykres.Update(eventX,eventY))
{
new android.os.Handler().postDelayed(
new Runnable() {
public void run()
{
main.viewTools.setAlpha(0f);
main.viewTools.setVisibility(View.GONE);
// main.viewChart.setVisibility(View.VISIBLE);
// main.viewChart.bringToFront();
//main.viewChart.animate()
// .alpha(1f)
// .setDuration(2500)
// .setListener(null);
//main.viewChart.postInvalidate();
//main.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
main.plot.setVisibility(View.VISIBLE);
//main.btnX.setVisibility(View.VISIBLE);
}
},
1000);
SetVoiceTimeOut(1500,7);
return;
}
}
void DrawBackground(Canvas canvas)
{
//TOP BOX
paint.setColor(Color.rgb(0,175,10));
paint.setStrokeWidth(5);
canvas.drawRoundRect(top_box_rect.left,
top_box_rect.top,
top_box_rect.right,
top_box_rect.bottom,
50,
50,paint);
paint.setColor(Color.rgb(0,75,10));
paint.setStrokeWidth(5);
canvas.drawRoundRect(top_box_rect.left + 5,
top_box_rect.top + 5,
top_box_rect.right - 5,
top_box_rect.bottom - 10,
50,
50,paint);
//BIG BOX
paint.setColor(Color.argb(150,0,175,10));
paint.setStrokeWidth(5);
canvas.drawRoundRect(big_box_rect.left,
big_box_rect.top,
big_box_rect.right,
big_box_rect.bottom,
50,
50,
paint);
paint.setColor(Color.argb(180,0,65,10));
paint.setStrokeWidth(5);
canvas.drawRoundRect(big_box_rect.left + 5,
big_box_rect.top + 5,
big_box_rect.right - 5,
big_box_rect.bottom - 10,
50,
50,
paint);
// end big box
canvas.drawText("ESP: " + main.SERVER_IP + " --- " + "AndroGon v 0.2.0 \uD83D\uDC95", 50, 80, main.mTextIPPaint);
}
void DrawButtons(Canvas canvas)
{
ButtonExit.Draw(canvas);
ButtonUpdate.Draw(canvas);
ButtonWykres.Draw(canvas);
}
@Override
protected void onDraw(Canvas canvas)
{
super.onDraw(canvas);
if(this.getVisibility() != VISIBLE) return;
DrawBackground(canvas);
DrawButtons(canvas);
toastbox.DrawTimeOut(canvas);
if(DrawCircle == true)
{
canvas.drawCircle(eventX, eventY, 30, main.green);
SetDrawCircleTimeOut(2000);
}
}
@Override
public boolean onTouchEvent(MotionEvent event)
{
eventX = event.getX();
eventY = event.getY();
switch (event.getAction())
{
case MotionEvent.ACTION_DOWN:
DrawCircle = true;
CheckButtons();
invalidate();
return true;
case MotionEvent.ACTION_MOVE:
break;
case MotionEvent.ACTION_UP:
break;
default:
return false;
}
return true;
}
@Override
protected void onLayout(boolean changed, int l, int t, int r, int b)
{
}
}
| [
"[email protected]"
] | |
8122e7637660195de93a034e85b8cb276c6e57e3 | 5bb5c44e0d114111edbbe67e41f1d7208d0c2b73 | /app/src/main/java/com/bol/guy/raspremote/CommandLine.java | 51b2cb5c9a53f50e3a488d3cc44c38b6b66c3526 | [] | no_license | GuyBol/raspremote-android | 2fe15f9e3ad63924d8f27f08f9c24b96d83601f9 | 36d78b8d8c72d835cc8a5517c403cd6d3de9327c | refs/heads/master | 2021-05-15T14:18:22.681784 | 2017-11-01T18:22:17 | 2017-11-01T18:22:17 | 107,185,600 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 542 | java | package com.bol.guy.raspremote;
import android.util.Log;
import org.json.JSONObject;
public class CommandLine extends Executor {
public CommandLine(String host) {
super(host, "cli");
}
@Override
public String generateJson(String param) {
try {
JSONObject cred = new JSONObject();
cred.put("command", param);
return cred.toString();
}
catch (Exception e) {
Log.v("ErrorAPP", e.toString());
return new String();
}
}
}
| [
"[email protected]"
] | |
0f5918ad712c64144b7168ca0fa5678df2429873 | 1a9017c91545ad5d40e3beb83e9b8134d35f2d42 | /src/test/java/org/iesalandalus/programacion/trasladables/modelo/dominio/LineaTest.java | a3b2ff84cf8bf33f1001b388f65cb40d3d1ff752 | [] | no_license | juanmanzanoplaza/Trasladables_v1 | 8f8d9c9b816d00c9065e7fbc79800f90a7b857b0 | 10bceafe9bac01122a6cc2b8217d25decd1d6562 | refs/heads/master | 2020-04-27T02:35:04.251911 | 2019-03-05T17:39:40 | 2019-03-05T17:39:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,423 | java | package org.iesalandalus.programacion.trasladables.modelo.dominio;
/*
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNull;
import org.iesalandalus.programacion.trasladable.modelo.dominio.Linea;
import org.iesalandalus.programacion.trasladable.modelo.dominio.Punto;
import org.junit.Test;
*/
public class LineaTest {
/*
private static final Punto P1 = new Punto(0, 0);
private static final Punto P2 = new Punto(0, 10);
private static final Punto P3 = new Punto(10, 0);
private static final Punto P4 = new Punto(10, 10);
private static final Punto P5 = new Punto(10, 20);
@Test
public void constructorTest() {
Linea linea = new Linea(P1, P2);
assertEquals(P1, linea.getP1());
assertEquals(P2, linea.getP2());
assertFalse(P1 == linea.getP1());
assertFalse(P2 == linea.getP2());
assertEquals("Linea [p1=Punto [x=0.0, y=0.0], p2=Punto [x=0.0, y=10.0]]", linea.toString());
}
@Test
public void constructorCopiaValidoTest() {
Linea l1 = new Linea(P1, P2);
Linea l2 = new Linea(l1);
assertEquals(P1, l2.getP1());
assertEquals(P2, l2.getP2());
assertFalse(P1 == l2.getP1());
assertFalse(P2 == l2.getP2());
assertEquals("Linea [p1=Punto [x=0.0, y=0.0], p2=Punto [x=0.0, y=10.0]]", l2.toString());
assertFalse(l1 == l2);
}
@Test
public void constructoCopiaNoValidoTest() {
Linea l1 = null;
Linea l2 = null;
try {
l2 = new Linea(l1);
} catch (NullPointerException e) {
assertNull(l2);
assertEquals("No puedo copiar una línea nula.", e.getMessage());
}
}
@Test
public void trasladarTest() {
Linea linea = new Linea(P1, P2);
linea.trasladar(10, 10);
assertEquals(P4, linea.getP1());
assertEquals(P5, linea.getP2());
linea.trasladar(-10, -10);
assertEquals(P1, linea.getP1());
assertEquals(P2, linea.getP2());
}
@Test
public void hashCodeEqualsTest() {
Linea l1 = new Linea(P1, P2);
Linea l2 = new Linea(P1, P4);
Linea l3 = new Linea(P3, P4);
Linea l4 = new Linea(P4, P5);
Linea l5 = new Linea(P1, P2);
assertEquals(l1.hashCode(), l5.hashCode());
assertNotEquals(l1.hashCode(), l2.hashCode());
assertNotEquals(l1.hashCode(), l3.hashCode());
assertNotEquals(l1.hashCode(), l4.hashCode());
assertEquals(l1, l5);
assertNotEquals(l1, l2);
assertNotEquals(l1, l3);
assertNotEquals(l1, l4);
}
*/
}
| [
"[email protected]"
] | |
3967530e9fbfbf9064ce98959e10d06c7b0875a2 | 515551e28344a6a4c5da8fe6d28a9d8ed229af84 | /src/main/java/org/pilat/modeleventenum/Event.java | 225776ee8282b3bd7520c327f561e5de4ec18286 | [] | no_license | maciekpilat/KancelariaAppSpring | 04b96ac0d04ad79d2b0156cc2a35dbde05c9fc7f | 94839b34db828f610397d7750a5545c4716f6ad5 | refs/heads/master | 2021-09-05T06:19:18.272659 | 2018-01-24T18:37:52 | 2018-01-24T18:37:52 | 113,965,746 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,618 | 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 org.pilat.modeleventenum;
import java.util.Date;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import org.pilat.model.Party;
/**
*
* @author Pilat
*/
public class Event {
@Id
@GeneratedValue
private Long eventId;
private EventType eventType;
private Date startDate;
private Date endDate;
private String eventText;
@ManyToOne
private Party party;
public Event(Long eventId, EventType eventType, Date startDate, Date endDate, String eventText, Party party) {
this.eventId = eventId;
this.eventType = eventType;
this.startDate = startDate;
this.endDate = endDate;
this.eventText = eventText;
this.party = party;
}
/**
* @return the eventId
*/
public Long getEventId() {
return eventId;
}
/**
* @param eventId the eventId to set
*/
public void setEventId(Long eventId) {
this.eventId = eventId;
}
/**
* @return the eventType
*/
public EventType getEventType() {
return eventType;
}
/**
* @param eventType the eventType to set
*/
public void setEventType(EventType eventType) {
this.eventType = eventType;
}
/**
* @return the startDate
*/
public Date getStartDate() {
return startDate;
}
/**
* @param startDate the startDate to set
*/
public void setStartDate(Date startDate) {
this.startDate = startDate;
}
/**
* @return the endDate
*/
public Date getEndDate() {
return endDate;
}
/**
* @param endDate the endDate to set
*/
public void setEndDate(Date endDate) {
this.endDate = endDate;
}
/**
* @return the eventText
*/
public String getEventText() {
return eventText;
}
/**
* @param eventText the eventText to set
*/
public void setEventText(String eventText) {
this.eventText = eventText;
}
/**
* @return the party
*/
public Party getParty() {
return party;
}
/**
* @param party the party to set
*/
public void setParty(Party party) {
this.party = party;
}
}
| [
"[email protected]"
] | |
fb1cee9c113713f67b4b50e0fe41c3753e588027 | b2b14864bc13da9709fd6470686b2c53ae56b7aa | /springboot_security/src/test/java/com/cnpc/SpringbootSecurityApplicationTests.java | 9b786ec9d24e1d885f94910b3335a5470998067e | [] | no_license | magiclz233/springboot_test | cc145e4c790b91618ff35f477bc9705293bd41bb | 0f6c1a63aafbc6766ba26873abf4af55b0cd5385 | refs/heads/master | 2022-07-03T18:50:22.185026 | 2020-07-23T16:08:35 | 2020-07-23T16:08:35 | 175,588,913 | 6 | 5 | null | 2022-06-21T01:00:57 | 2019-03-14T09:23:59 | Java | UTF-8 | Java | false | false | 346 | java | package com.cnpc;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest
public class SpringbootSecurityApplicationTests {
@Test
public void contextLoads() {
}
}
| [
"[email protected]"
] | |
da352731f594174f4e6b305843480ff1a474ed7b | e3febe24cea1933f4cf657c5a59784379d8dc1e3 | /src/cn/zmdx/locker/servlet/LoginServlet.java | d43315f9771a339bbe56f8c3b6bfd429e88b53f8 | [] | no_license | Mrzy/PandoraServer | 12f1ddfc6681648263e73eb8f771ab5eaaae6050 | d8902badc609e5d05355bfdf39453f10ef906a8f | refs/heads/master | 2021-01-23T20:50:35.211158 | 2014-09-29T11:00:11 | 2014-09-29T11:00:11 | 24,590,099 | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 2,357 | java | package cn.zmdx.locker.servlet;
import java.io.IOException;
import java.net.URLDecoder;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.io.IOUtils;
import org.json.JSONException;
import org.json.JSONObject;
import cn.zmdx.locker.entity.User;
import cn.zmdx.locker.service.impl.UserServiceImpl;
import cn.zmdx.locker.service.interfaces.UserService;
import cn.zmdx.locker.servlet.base.BaseServlet;
import cn.zmdx.locker.util.Encrypter;
public class LoginServlet extends BaseServlet {
public void service(HttpServletRequest request ,
HttpServletResponse response)
throws IOException , ServletException
{
int worker_no = 0;
String password="";
/*worker_no=Integer.parseInt(request.getParameter("user"));
password=request.getParameter("pass");*/
String json=IOUtils.toString(request.getInputStream());
json=URLDecoder.decode(json,"UTF-8");
try {
JSONObject reg=new JSONObject(json);
worker_no=reg.getInt("user");
password=reg.getString("pass");
} catch (JSONException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
System.out.println(json);
System.out.println(worker_no);
System.out.println(password);
// 获取系统的业务逻辑组件
UserServiceImpl userService = (UserServiceImpl)getCtx().getBean("userService");
// 验证用户登录
User info=new User();
info.setWorker_no(worker_no);
info.setPassword(password);
int userId=0;
try {
if( userService.verifyUser(info))
userId=1;
System.out.println( userService.verifyUser(info));
System.out.println(info.getWorker_no());
System.out.println(userId);
response.setContentType("text/html; charset=GBK");
// 登录成功
if (userId>0)
{
request.getSession(true).setAttribute("userId" , userId);
}
try
{
// 把验证的userId封装成JSONObject
JSONObject jsonObj = new JSONObject().put("userId" , userId);
// 输出响应
response.getWriter().println(jsonObj.toString());
}
catch (JSONException ex)
{
ex.printStackTrace();
}
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
| [
"[email protected]"
] | |
956a9de1295cfcb3f4123a8c60600b09c7dee2f0 | c325d1bb6f26c1b199a81349cd4f8feec37ec8b7 | /FinBot/app/src/main/java/ui/MainActivity.java | 0208420142261d8f92a29707a090a036562e0057 | [] | no_license | Nacujachu/GiBaIntartar | fb55dec58911141c0bcc2427e5dcff50aa41c5aa | e5cb3072c9785c82a728d6a3ea669096df56f637 | refs/heads/master | 2021-01-21T16:00:17.982651 | 2017-05-20T18:25:33 | 2017-05-20T18:25:33 | 91,868,910 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,122 | java | //
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license.
//
// Microsoft Cognitive Services (formerly Project Oxford): https://www.microsoft.com/cognitive-services
//
// Microsoft Cognitive Services (formerly Project Oxford) GitHub:
// https://github.com/Microsoft/Cognitive-Face-Android
//
// Copyright (c) Microsoft Corporation
// All rights reserved.
//
// MIT License:
// 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, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
package ui;
import android.app.AlertDialog;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import nthu.finbot.R;
import helper.ImageHelper;
import helper.LogHelper;
import helper.SampleApp;
import helper.StorageHelper;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
if (getString(R.string.subscription_key).startsWith("Please")) {
new AlertDialog.Builder(this)
.setTitle(getString(R.string.add_subscription_key_tip_title))
.setMessage(getString(R.string.add_subscription_key_tip))
.setCancelable(false)
.show();
}
}
public void detection(View view) {
Intent intent = new Intent(this, DetectionActivity.class);
startActivity(intent);
}
public void verification(View view) {
Intent intent = new Intent(this, VerificationMenuActivity.class);
startActivity(intent);
}
public void grouping(View view) {
Intent intent = new Intent(this, GroupingActivity.class);
startActivity(intent);
}
public void findSimilarFace(View view) {
Intent intent = new Intent(this, FindSimilarFaceActivity.class);
startActivity(intent);
}
public void identification(View view) {
Intent intent = new Intent(this, IdentificationActivity.class);
startActivity(intent);
}
}
| [
"[email protected]"
] | |
1cb0718827445aecb89cfad7b803ae3d23147bf1 | 5f59bc9c10bb0c57b817d78e329e4f7e4d1badcc | /snake-ladder/src/com/lld/snake/Driver.java | 23818566b83f26b2e89a944bc6ccb862ec68101f | [] | no_license | gautamishra/lld | c39cda77564503fb4d94d17b5e452a952b8a5831 | 5d9940465728f8231fc3811e3eb66dc1d3a5a7a7 | refs/heads/main | 2023-06-19T02:01:23.815585 | 2021-07-06T18:31:27 | 2021-07-06T18:31:27 | 383,564,832 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,072 | java | package com.lld.snake;
import java.util.*;
public class Driver {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int noOfSnakes = scanner.nextInt();
List<Sanke> snakes = new ArrayList<>();
for (int i = 0; i < noOfSnakes; i++) {
snakes.add(new Sanke(scanner.nextInt(), scanner.nextInt()));
}
int noOfLadders = scanner.nextInt();
List<Ladder> ladders = new ArrayList<Ladder>();
for (int i = 0; i < noOfLadders; i++) {
ladders.add(new Ladder(scanner.nextInt(), scanner.nextInt()));
}
int noOfPlayers = scanner.nextInt();
Queue<Player> players = new LinkedList<>();
for (int i = 0; i < noOfPlayers; i++) {
players.add(new Player(scanner.next() , 0));
}
GameService gameService = new GameService();
gameService.setPlayers(players);
gameService.getBoard().setLadders(ladders);
gameService.getBoard().setSnakes(snakes);
gameService.startGame();
}
}
| [
"[email protected]"
] | |
e20e46169a08d6e2f8977aede9988119fbe57984 | 9e97ff5e7b4bff61844b8b7ea18467bd4f5ea60b | /current-client/src/main/java/com/netty/current/client/controller/ClientController.java | 07ba2e40e4c1204a647a27f69d0a249d723923db | [] | no_license | skystar66/netty-demo | 6b75501ce7621e5c8f066d398b20881b1184f525 | c4078ad8453814c26ad85a37085b3bbaaa47f30a | refs/heads/master | 2023-03-10T21:59:00.039861 | 2021-01-11T09:35:05 | 2021-01-11T09:35:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,462 | java | package com.netty.current.client.controller;
import com.netty.current.client.config.TopicClientConfig;
import com.netty.current.client.current.CurrentClient;
import com.netty.core.client.init.RpcClientInitializer;
import com.netty.current.client.current.channel.NettyChannelManager;
import com.netty.current.client.mertic.MerticManager;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
@RestController
@RequestMapping("client")
@Slf4j
public class ClientController {
@Autowired
RpcClientInitializer rpcClientInitializer;
@Autowired
TopicClientConfig topicClientConfig;
@RequestMapping("test")
public String testClient(@RequestParam("threadCnt") int threadCnt,
@RequestParam("connCnt") int connCnt) {
CurrentClient client = new CurrentClient(rpcClientInitializer, topicClientConfig);
try {
client.start(connCnt);
}catch (Exception ex) {
}
return "success";
}
@RequestMapping("getConnCount")
public String getConnCount() {
return String.valueOf(NettyChannelManager.getInstance().getConnCount());
}
}
| [
"[email protected]"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.