blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 4
410
| content_id
stringlengths 40
40
| detected_licenses
listlengths 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
listlengths 1
1
| author_id
stringlengths 0
313
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0e4ab197a70a75e444244c633c055a8bfca2daf4
|
770135bfec3c1d81c39bcccefc0fa2e00854a580
|
/ran/src/product/productBean.java
|
36e28c6479dac1c0a12f7505b34358fcb3dd8abf
|
[] |
no_license
|
fks5580/ran_model1
|
f3e94044bdf8a9a0acfee556b88463a0d49cfdfe
|
7244c4baf2f5787bdf9faf45476fe734d9bb8f1d
|
refs/heads/master
| 2021-02-23T18:20:21.130746
| 2020-03-06T11:53:42
| 2020-03-06T11:53:42
| 245,406,676
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,121
|
java
|
package product;
public class productBean {
private int product_no;
private String product_name;
private int product_price;
private int product_count;
private String product_photo;
public int getProduct_no() {
return product_no;
}
public void setProduct_no(int product_no) {
this.product_no = product_no;
}
public String getProduct_name() {
return product_name;
}
public void setProduct_name(String product_name) {
this.product_name = product_name;
}
public int getProduct_price() {
return product_price;
}
public void setProduct_price(int product_price) {
this.product_price = product_price;
}
public int getProduct_count() {
return product_count;
}
public void setProduct_count(int product_count) {
this.product_count = product_count;
}
public String getProduct_photo() {
return product_photo;
}
public void setProduct_photo(String product_photo) {
this.product_photo = product_photo;
}
}
|
[
"fks5580@naver.com"
] |
fks5580@naver.com
|
0930affaf47b01108a7a199a581ea160d93901de
|
555bf414bf3ed6d13fa79600c3a3b383ec047b34
|
/src/br/com/devmedia/aula11/Aula.java
|
811fa6a995c9bf925e2037d5d16c90c9d80d5da2
|
[] |
no_license
|
Erikomoreira/java-poo
|
4542d9e450b25b1a0cf97413d08109c4e8d7d371
|
e1aeda1104a9275a19c1e9120337e38fa569d5ce
|
refs/heads/master
| 2021-01-02T14:27:48.875760
| 2020-02-11T02:59:38
| 2020-02-11T02:59:38
| 239,661,550
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 690
|
java
|
package br.com.devmedia.aula11;
public class Aula {
public static void main(String[] args) {
Aluno a = new Aluno();
a.setNome("Joana da Silva");
a.setMatricula("123323232");
System.out.println("Nome:" + a.getNome()+", Matricula: "+a.getMatricula());
Aluno a1 = new Aluno();
a1.setNome("Joana da Silva");
a1.setMatricula("1234567891");
System.out.println("Nome:" + a1.getNome()+", Matricula: "+a1.getMatricula());
Professor p1 = new Professor();
p1.setNome("Elton");
p1.setMatricula("1234567891");
System.out.println("Nome:" + p1.getNome()+", Matricula: "+p1.getMatricula());
}
}
|
[
"erik.oliveira.moreira@hotmail.com"
] |
erik.oliveira.moreira@hotmail.com
|
873e0cbcc0f4bb28ccec8ebad50157294bf89939
|
f694f256e58fc7c299118cbecd11137474cefec6
|
/framework/compss/agent/commons/src/main/java/es/bsc/compss/agent/types/Resource.java
|
effd56a246d377dfb93086010595180111619fc6
|
[
"Apache-2.0"
] |
permissive
|
flordan/HiPar22
|
0d99628e8dababb5e195006a80d7951bf15d50b3
|
5572ecead0784f161cd1324af2f1a9605514222d
|
refs/heads/main
| 2023-04-14T09:30:30.721386
| 2022-09-02T11:30:07
| 2022-09-02T16:25:40
| 513,913,503
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,703
|
java
|
/*
* Copyright 2002-2022 Barcelona Supercomputing Center (www.bsc.es)
*
* 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 es.bsc.compss.agent.types;
import es.bsc.compss.types.resources.MethodResourceDescription;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
/**
* Description of a resource to be used by the agent.
*
* @param <P> Description of the resource corresponding to the project configuration file
* @param <R> Description of the resource corresponding to the resources configuration file
*/
public class Resource<P, R> implements Externalizable {
private static final long serialVersionUID = 1L;
private String name;
private MethodResourceDescription description;
private String adaptor;
private P projectConf;
private R resourceConf;
public Resource() {
}
/**
* Constructs a new resource description.
*
* @param name Name of the node
* @param description Description of the resources available
* @param adaptor Name of the adaptor to use to interact with the node
* @param projectConf Project configuration file content related to the node
* @param resourceConf Resources configuration file content related to the node
*/
public Resource(String name, MethodResourceDescription description, String adaptor, P projectConf, R resourceConf) {
this.name = name;
this.description = description;
this.adaptor = adaptor;
this.projectConf = projectConf;
this.resourceConf = resourceConf;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getAdaptor() {
return adaptor;
}
public void setAdaptor(String adaptor) {
this.adaptor = adaptor;
}
public MethodResourceDescription getDescription() {
return description;
}
public void setDescription(MethodResourceDescription description) {
this.description = description;
}
public P getProjectConf() {
return projectConf;
}
public void setProjectConf(P projectConf) {
this.projectConf = projectConf;
}
public R getResourceConf() {
return resourceConf;
}
public void setResourceConf(R resourceConf) {
this.resourceConf = resourceConf;
}
@Override
public void writeExternal(ObjectOutput oo) throws IOException {
try {
oo.writeUTF(name);
oo.writeUTF(adaptor);
oo.writeObject(description);
} catch (Exception e) {
e.printStackTrace();
}
}
@Override
public void readExternal(ObjectInput oi) throws IOException, ClassNotFoundException {
try {
this.name = oi.readUTF();
this.adaptor = oi.readUTF();
this.description = (MethodResourceDescription) oi.readObject();
} catch (Exception e) {
e.printStackTrace();
}
}
@Override
public String toString() {
return "NAME = " + name + ", ADAPTOR = " + adaptor;
}
}
|
[
"francesc.lordan@gmail.com"
] |
francesc.lordan@gmail.com
|
fa906496438c6e175a28be80706c8d70f4149227
|
4bd325fa97920eda8266085aa168e7903e00dc6d
|
/FoodStacks/src/Classes/Order.java
|
148e2782ed10d869564ba8a4b55e0aa28f94230e
|
[
"MIT"
] |
permissive
|
bianca-mihaela-stan/FoodStacks
|
be98b49b121fb8646f7738fce024ae9006e552da
|
22895deb182a30a53dbf6fddb0241eee3d3819da
|
refs/heads/main
| 2023-06-26T16:56:23.654039
| 2021-07-28T08:05:53
| 2021-07-28T08:05:53
| 349,752,170
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,764
|
java
|
package Classes;
import java.time.LocalDate;
import java.util.*;
import java.util.concurrent.atomic.AtomicLong;
import org.javatuples.Triplet;
import org.javatuples.Pair;
public class Order{
protected LocalDate date;
protected List<Triplet<Dish, Integer, Double>> dishesOrdered = new ArrayList<Triplet<Dish, Integer, Double>>();
protected Double finalPrice = 0.0;
protected Restaurant restaurant;
protected Client user;
protected Long id;
protected static AtomicLong userID = new AtomicLong(0);
protected static Long newID()
{
return userID.incrementAndGet();
}
public Order()
{
this.date = LocalDate.now();
this.id=newID();
}
Order(LocalDate date, List<Triplet<Dish, Integer, Double>> dishesOrdered,
Double finalPrice, Restaurant restaurant, Client user)
{
this.date=date;
this.dishesOrdered=dishesOrdered;
this.finalPrice=finalPrice;
this.restaurant=restaurant;
this.user=user;
var orders = user.getOrders();
orders.add(this);
user.setOrders(orders);
this.id=newID();
this.sortDishes();
}
public static class Builder{
protected Order order = new Order();
public Builder(Restaurant restaurant, Client user){
order.restaurant = restaurant;
order.user = user;
var orders = order.user.getOrders();
orders.add(order);
order.user.setOrders(orders);
}
public Order.Builder withDish(Dish dish, Double price){
Triplet<Dish, Integer, Double> tr= new Triplet<Dish, Integer, Double> (dish, 1, price);
order.dishesOrdered.add(tr);
order.finalPrice+=price;
return this;
}
public Order.Builder withDish(Dish dish, Integer number, Double price){
Triplet<Dish, Integer, Double> tr= new Triplet<Dish, Integer, Double> (dish, number, price);
order.dishesOrdered.add(tr);
order.finalPrice+=price*number;
return this;
}
public Order.Builder withDishes(List<Pair<Dish, Integer>> dishes){
for (Pair<Dish, Integer> dish : dishes)
{
Triplet<Dish, Integer, Double> tr= new Triplet<Dish, Integer, Double> (dish.getValue0(), dish.getValue1(), null);
order.dishesOrdered.add(tr);
}
return this;
}
public Order build()
{
for(Triplet<Dish, Integer, Double> elem : order.dishesOrdered)
{
if(order.restaurant.getPriceForDish(elem.getValue0())!=null)
{
order.finalPrice+=order.restaurant.getPriceForDish(elem.getValue0())*elem.getValue1();
}
}
order.date=LocalDate.now();
return this.order;
}
}
@Override
public String toString() {
String output = "Delivery{" +
", date=" + date + ", dishesDelivered=";
for(var dish : dishesOrdered)
{
output+="("+dish.getValue0().getName()+", "+ dish.getValue1() + ", "+dish.getValue2()+ ")";
}
output+= ", finalPrice=" + finalPrice +
", restaurant=" + restaurant.getName() +
", user=" + user.getEmail() +
'}';
return output;
}
public LocalDate getDate() {
return date;
}
public void setDate(LocalDate date) {
this.date = date;
}
public List<Triplet<Dish, Integer, Double>> getDishesOrdered() {
this.sortDishes();
return dishesOrdered;
}
public void setDishesOrdered(List<Triplet<Dish, Integer, Double>> dishesOrdered) {
this.dishesOrdered = dishesOrdered;
this.sortDishes();
}
public Double getFinalPrice() {
return finalPrice;
}
public void setFinalPrice(Double finalPrice) {
this.finalPrice = finalPrice;
}
public Restaurant getRestaurant() {
return restaurant;
}
public void setRestaurant(Restaurant restaurant) {
this.restaurant = restaurant;
}
public Client getUser() {
return user;
}
public void setUser(Client user) {
this.user = user;
}
protected void sortDishes()
{
dishesOrdered.sort(new Comparator<Triplet<Dish, Integer, Double>>() {
@Override
public int compare(Triplet<Dish, Integer, Double> o1, Triplet<Dish, Integer, Double> o2) {
if(o1.getValue0().getName().compareTo(o2.getValue0().getName()) < 0){
return 1;
}
return 0;
}
});
}
}
|
[
"stanbianca611@gmail.com"
] |
stanbianca611@gmail.com
|
479591c95f435f06413c7327024629453606ff79
|
b6b9055ea3518ae1fe02e9cbfdaa8aadc8eff856
|
/src/Test/InsertionSort.java
|
d24c42f3c58e3e86a3f8c0fb37d0d8c49ba5fbf2
|
[] |
no_license
|
baronwithyou/JavaPractice
|
62b1c53b3befe8dd7b48492e2199ec5de700187c
|
f1bf41e1e1f6d518358b90f429985f2829884653
|
refs/heads/master
| 2021-09-06T14:28:14.835200
| 2018-02-07T14:24:26
| 2018-02-07T14:24:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 643
|
java
|
package Test;
public class InsertionSort {
private static int[] sort(int []arr) {
for (int i = 1; i < arr.length; i++) {
int tmp = arr[i];
int j = i - 1;
// 这里面的tmp不能写成arr[i] 因为在赋值的时候arr[i]的值被改变了
for (; j >= 0 && tmp < arr[j]; j--) {
arr[j + 1] = arr[j];
}
arr[j + 1] = tmp;
}
return arr;
}
public static void main(String []args) {
int []arr = {5, 1, 2, 10, 6, 4};
arr = sort(arr);
for (int item : arr)
System.out.println(item);
}
}
|
[
"linsi.yao@163.com"
] |
linsi.yao@163.com
|
ec51180a0ba87691afdb9b0f73a5edad5528dfd7
|
8096e60a5ddd18db7131eb36e13779f2eea3be83
|
/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/annotations/EdmUrlRefImplTest.java
|
f27847c629edd62c74ee11c93c280f48d633b340
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
apache/olingo-odata4
|
b107bcad4e87f91bf682b508086295147a4cbbd8
|
e39c1deb58e43a0c726b97fa969d00af3972becd
|
refs/heads/master
| 2023-08-28T03:57:35.573926
| 2022-11-13T07:12:31
| 2022-11-13T07:22:25
| 18,830,104
| 163
| 224
|
Apache-2.0
| 2023-09-05T02:30:19
| 2014-04-16T07:00:08
|
Java
|
UTF-8
|
Java
| false
| false
| 4,393
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may 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 org.apache.olingo.commons.core.edm.annotations;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import static org.mockito.Mockito.mock;
import java.util.ArrayList;
import java.util.List;
import org.apache.olingo.commons.api.edm.Edm;
import org.apache.olingo.commons.api.edm.EdmException;
import org.apache.olingo.commons.api.edm.annotation.EdmDynamicExpression;
import org.apache.olingo.commons.api.edm.annotation.EdmExpression;
import org.apache.olingo.commons.api.edm.annotation.EdmUrlRef;
import org.apache.olingo.commons.api.edm.annotation.EdmExpression.EdmExpressionType;
import org.apache.olingo.commons.api.edm.provider.CsdlAnnotation;
import org.apache.olingo.commons.api.edm.provider.annotation.CsdlConstantExpression;
import org.apache.olingo.commons.api.edm.provider.annotation.CsdlConstantExpression.ConstantExpressionType;
import org.apache.olingo.commons.api.edm.provider.annotation.CsdlNull;
import org.apache.olingo.commons.api.edm.provider.annotation.CsdlUrlRef;
import org.apache.olingo.commons.core.edm.annotation.AbstractEdmExpression;
import org.junit.Test;
public class EdmUrlRefImplTest extends AbstractAnnotationTest {
@Test
public void initialUrlRef() {
EdmExpression exp = AbstractEdmExpression.getExpression(mock(Edm.class), new CsdlUrlRef());
EdmDynamicExpression dynExp = assertDynamic(exp);
assertTrue(dynExp.isUrlRef());
assertNotNull(dynExp.asUrlRef());
assertEquals("UrlRef", dynExp.getExpressionName());
assertEquals(EdmExpressionType.UrlRef, dynExp.getExpressionType());
assertSingleKindDynamicExpression(dynExp);
EdmUrlRef asUrlRef = dynExp.asUrlRef();
try {
asUrlRef.getValue();
fail("EdmException expected");
} catch (EdmException e) {
assertEquals("URLRef expressions require an expression value.", e.getMessage());
}
assertNotNull(asUrlRef.getAnnotations());
assertTrue(asUrlRef.getAnnotations().isEmpty());
}
@Test
public void urlRefWithValue() {
CsdlUrlRef csdlUrlRef = new CsdlUrlRef();
csdlUrlRef.setValue(new CsdlConstantExpression(ConstantExpressionType.String));
List<CsdlAnnotation> csdlAnnotations = new ArrayList<CsdlAnnotation>();
csdlAnnotations.add(new CsdlAnnotation().setTerm("ns.term"));
csdlUrlRef.setAnnotations(csdlAnnotations);
EdmExpression exp = AbstractEdmExpression.getExpression(mock(Edm.class), csdlUrlRef);
EdmUrlRef asUrlRef = exp.asDynamic().asUrlRef();
assertNotNull(asUrlRef.getValue());
assertTrue(asUrlRef.getValue().isConstant());
assertNotNull(asUrlRef.getAnnotations());
assertEquals(1, asUrlRef.getAnnotations().size());
}
@Test
public void urlRefWithInvalidValue() {
CsdlUrlRef csdlUrlRef = new CsdlUrlRef();
csdlUrlRef.setValue(new CsdlConstantExpression(ConstantExpressionType.Bool));
EdmExpression exp = AbstractEdmExpression.getExpression(mock(Edm.class), csdlUrlRef);
EdmUrlRef asUrlRef = exp.asDynamic().asUrlRef();
assertNotNull(asUrlRef.getValue());
assertTrue(asUrlRef.getValue().isConstant());
csdlUrlRef = new CsdlUrlRef();
csdlUrlRef.setValue(new CsdlNull());
exp = AbstractEdmExpression.getExpression(mock(Edm.class), csdlUrlRef);
asUrlRef = exp.asDynamic().asUrlRef();
assertNotNull(asUrlRef.getValue());
assertTrue(asUrlRef.getValue().isDynamic());
assertTrue(asUrlRef.getValue().asDynamic().isNull());
assertNotNull(asUrlRef.getValue().asDynamic().asNull());
}
}
|
[
"christian.amend@sap.com"
] |
christian.amend@sap.com
|
e147a12c0da858c8986a6c71140bfd1fe16c5f7c
|
3aac29e8f15375f3968bf26be9fe9224fb16d42f
|
/src/main/java/com/nowakowski/singleton/service/UserService.java
|
c3aa762ddbff29f854e5b2e2556f0efa2026402a
|
[] |
no_license
|
Fazii/singleton
|
ec231379db59c5f255982bc755b3f6a317a3b722
|
af138c29ffc58b8b3800a6e733292fdcf18f6eb8
|
refs/heads/master
| 2020-04-02T22:42:23.388686
| 2018-10-26T13:51:23
| 2018-10-26T13:51:23
| 154,841,725
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 793
|
java
|
package com.nowakowski.singleton.service;
import com.nowakowski.singleton.entity.UserEntity;
import com.nowakowski.singleton.repository.Deletor;
import com.nowakowski.singleton.repository.Reader;
import com.nowakowski.singleton.repository.Writer;
import java.io.IOException;
public class UserService {
public void readUserData() throws IOException {
Reader reader = new Reader();
reader.read("users.csv", new UserEntity());
}
public void writeUserData() throws IOException {
Writer writer = Writer.getInstance();
writer.write("users.csv", new UserEntity("2", "Adam", "Małysz", "1987", "0"));
}
public void deleteUserData() throws IOException {
Deletor deletor = new Deletor();
deletor.delete("users.csv", "2");
}
}
|
[
"krzysztof.nowakowski@comarch.com"
] |
krzysztof.nowakowski@comarch.com
|
d6b3bc549db3e8ddbc3effa33838238cf45707c3
|
5c690d0dc3da1f05653fd8c1d030b3ec8feb6d31
|
/src/Modelos/RectanguloGrafico.java
|
f4e2c77346c3bfb5a7c0914d26d85b5896823ba9
|
[] |
no_license
|
AgusPacini/Juego-Invasores-del-espacio
|
f3d499aa9db7bd85bb22f7ad3ace10c84905b7ab
|
7c72fe2a3144fd0a0cfc2265be0ccd1c438863f7
|
refs/heads/master
| 2020-03-20T03:35:33.158606
| 2018-06-13T02:22:52
| 2018-06-13T02:22:52
| 137,151,839
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 835
|
java
|
package Modelos;
import java.awt.Color;
import java.awt.Graphics;
public class RectanguloGrafico extends Rectangulo implements Dibujable {
Color color;
public RectanguloGrafico(Coordenada cor,float x,float y,Color uncolor){
super (cor,x,y);
this.color = uncolor;
}
@Override
public void dibujar(Graphics dw) {
dw.setColor(color);
dw.fillRect((int)this.getX(),(int) this.getY(),(int) this.Getlado(1),(int) this.Getlado(2));
}
public static int Aleatorio (int Max, int Min){
return (int) (Math.random()* (Max-Min));
}
public void Ciclo (int mov){
float x = this.getY();
this.setY(x+= mov);
}
void pintar(Color a) {
this.color =a;
}
}
|
[
"Agustin@192.168.1.109"
] |
Agustin@192.168.1.109
|
412306f5d2583baa725e9f8ded5ece2dc64c7d62
|
b076236fb44ad4fde94a43b013bdbf6d0c6c9840
|
/p4/RecomendadorVecinos.java
|
2c12478e52237f481d9ac61298562f9625dbfec3
|
[] |
no_license
|
vsanchezdelaroda/ADSOF
|
58a43c0a2603c8229f0fe0687be31aff2d9cb821
|
4cf75a4abdbbe173417ac5a20caba85fe2024906
|
refs/heads/master
| 2021-10-25T09:56:03.963025
| 2019-04-03T18:21:37
| 2019-04-03T18:21:37
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 644
|
java
|
package es.uam.ads.p4;
import java.io.IOException;
import java.util.Map;
public class RecomendadorVecinos extends RecomendadorGeneral {
Similitud s = new SimilitudCos(datos);
public RecomendadorVecinos(String fichero) throws IOException {
super(fichero);
}
@Override
public double calcularCoste(Long usuario, Long elemento) {
Map<Long,Double> valoracionesItem = datos.getPreferenciasItem(elemento);
double score = 0.0;
for (Long user : valoracionesItem.keySet()){
score = score + valoracionesItem.get(user)*s.sim(usuario,user);
}
return score;
}
}
|
[
"noreply@github.com"
] |
vsanchezdelaroda.noreply@github.com
|
d21eb661ceda26840972938a0b8010ab884b47eb
|
bb27351b1d6b75148d2fe74bb648e162632e5339
|
/Year 3/AI/quoridor/players/RandomSimulationPlayer.java
|
d9bbf5541c71c4db78befd3aa2887d73e9a1f3a9
|
[] |
no_license
|
mattprice28/Cardiff-University
|
61b10a11b7e7bebfdb8dcb0e09f33d48229e5618
|
4d3a9bcb9e9624f9c1c380504bb749580f1c4537
|
refs/heads/master
| 2020-05-23T09:00:58.643058
| 2017-03-12T21:40:57
| 2017-03-12T21:40:57
| 84,758,418
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,367
|
java
|
package players;
import java.util.List;
import java.util.Random;
import quoridor.GameState2P;
import quoridor.Quoridor;
import moves.*;
/**
*
* @author steven
*/
public class RandomSimulationPlayer extends QuoridorPlayer {
public static Random random = new Random();
private int indexOpponent;
private int startDepth=1;
private long availableTime=5000;
public RandomSimulationPlayer(GameState2P state, int index, Quoridor game) {
super(state, index, game);
indexOpponent = (index + 1) % 2;
}
public void setStartDepth(int startDepth){
this.startDepth=startDepth;
}
public void setAvailableTime (long time){
this.availableTime=availableTime;
}
public void doMove() {
List<Move> legalMoves = GameState2P.getLegalMoves(state, index);
long starttime = System.currentTimeMillis();
long timeup = starttime + availableTime;
int depth = startDepth;
for (; System.currentTimeMillis() < timeup;){
Move randomMove = legalMoves.get(random.nextInt(legalMoves.size()));
// System.out.println(randomMove);
if (System.currentTimeMillis() > timeup) {
break;
}
}
GameState2P newState = randomMove.doMove(state);
game.doMove(index, newState);
}
}
|
[
"pricem20@cardiff.ac.uk"
] |
pricem20@cardiff.ac.uk
|
6c27838624ba97629f0e7091b48b4ed1a7339b71
|
85a3da801af4b0a03ca4e1abe4a7c4457f8eb79d
|
/hr_day10_binary_numbers/src/hr_day10_binary_numbers/Hr_day10_binary_numbers.java
|
d25ea5f5c8eafd36e3bd0baaf7d83fef719b1d17
|
[] |
no_license
|
ciberCubana/HackeRank
|
422ef37ab190b049aee224324810f7b008e47c1d
|
604b0d8cc1588057dc8d66cb29ddcda3f60088b0
|
refs/heads/master
| 2021-01-17T19:16:57.641510
| 2017-03-07T01:07:13
| 2017-03-07T01:07:13
| 84,138,661
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 864
|
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 hr_day10_binary_numbers;
import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;
/**
*
* @author npgamboa
*/
public class Hr_day10_binary_numbers {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
Scanner scr = new Scanner(System.in) ;
int n = scr.nextInt() ;
int c = 0 ;
int max = 0 ;
while(n>0)
{
if(n%2==1)
{
c++ ;
if(c>max)
{
max = c ;
}
}
else
{
c = 0 ;
}
n=n/2 ;
}
System.out.println(max) ;
}}
|
[
"npgamboa1992@gmail.com"
] |
npgamboa1992@gmail.com
|
0f848c34f79a510b8ea4fa8ea42eb702bafe51d7
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/3/3_3378171f0c785689a75cf45e2f8108f2e34772cb/WikiArticlePageObject/3_3378171f0c785689a75cf45e2f8108f2e34772cb_WikiArticlePageObject_t.java
|
6e74660180c9559435013feeb66c202e7141294b
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 17,711
|
java
|
package com.wikia.webdriver.PageObjects.PageObject.WikiPage;
import java.util.List;
import org.openqa.selenium.By;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.Keys;
import org.openqa.selenium.Point;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.PageFactory;
import org.openqa.selenium.support.ui.ExpectedConditions;
import com.wikia.webdriver.Common.Core.CommonFunctions;
import com.wikia.webdriver.Common.Core.Global;
import com.wikia.webdriver.Common.Logging.PageObjectLogging;
import com.wikia.webdriver.PageObjects.PageObject.WikiBasePageObject;
import com.wikia.webdriver.PageObjects.PageObject.WikiPage.WikiCategoryPageObject;
public class WikiArticlePageObject extends WikiBasePageObject {
protected String articlename;
@FindBy(css="div.WikiaPageHeaderDiffHistory")
private WebElement historyHeadLine;
@FindBy(css="section.RelatedVideosModule")
private WebElement rVModule;
@FindBy(css="input.videoUrl")
private WebElement videoRVmodalInput;
@FindBy(css="div[class='editarea']")
private WebElement editCommentTrigger;
@FindBy(css="body[id='bodyContent']")
private WebElement editCommentArea;
@FindBy(css="div.cke_contents iframe")
private WebElement iframe;
@FindBy(css="input[id*='article-comm-submit']")
private WebElement submitCommentButton;
@FindBy(css="a.article-comm-delete")
private WebElement deleteCommentButton;
@FindBy(css="span.edit-link a")
private WebElement editCommentButton;
@FindBy(css="input[id*='article-comm-reply']")
private WebElement submitReplyButton;
@FindBy(css="table.article-table")
private WebElement TableOnWikiaArticle;
@FindBy(css="#csAddCategorySwitch a")
private WebElement categories_AddCategoryButton;
@FindBy(css="#csCategoryInput")
private WebElement categories_CategoryInputField;
@FindBy(css="#csSave")
private WebElement categories_saveButton;
@FindBy(css="textarea#article-comm")
private WebElement commentAreaDisabled;
private By categories_listOfCategories = By.cssSelector("#catlinks li a");
private By ImageOnWikiaArticle = By.cssSelector("div.WikiaArticle figure a img");
private By VideoOnWikiaArticle = By.cssSelector("div.WikiaArticle span.Wikia-video-play-button");
private By AddVideoRVButton = By.cssSelector("a.addVideo");
private By VideoModalAddButton = By.cssSelector("button.relatedVideosConfirm");
private By RVvideoLoading = By.cssSelector("section.loading");
private By galleryOnPublish = By.cssSelector("div[class*='gallery']");
private By slideShowOnPublish = By.cssSelector("div.wikia-slideshow");
private By videoOnPublish = By.cssSelector("a.image.video");
public WikiArticlePageObject(WebDriver driver, String Domain,
String wikiArticle) {
super(driver, Domain);
this.articlename = wikiArticle;
PageFactory.initElements(driver, this);
}
public void triggerCommentArea()
{
waitForElementByElement(submitCommentButton);
waitForElementByElement(commentAreaDisabled);
int delay = 500;
while (commentAreaDisabled.isDisplayed())
{
try {
Thread.sleep(delay);
} catch (InterruptedException e) {
e.printStackTrace();
}
jQueryFocus("textarea#article-comm");
delay+=500;
if (delay > 3000)
{
break;
}
}
waitForElementByElement(iframe);
PageObjectLogging.log("triggerCommentArea", "comment area triggered", true, driver);
}
public void writeOnCommentArea(String comment)
{
driver.switchTo().frame(iframe);
waitForElementByElement(editCommentArea);
editCommentArea.clear();
if (Global.BROWSER.equals("FF"))
{
((JavascriptExecutor) driver).executeScript("document.body.innerHTML='" + comment + "'");
}
else
{
editCommentArea.sendKeys(comment);
}
driver.switchTo().defaultContent();
}
public void clickSubmitButton()
{
executeScript("document.querySelectorAll('#article-comm-submit')[0].click()");
PageObjectLogging.log("clickSubmitButton", "submit article button clicked", true, driver);
// return new WikiArticlePageObject(driver, Domain, articlename);
}
public void clickSubmitButton(String userName)
{
clickAndWait(driver.findElement(By.xpath("//a[contains(text(), '"+userName+"')]/../../..//input[@class='actionButton']")));//submit button taken by username which edited comment
PageObjectLogging.log("clickSubmitButton", "submit article button clicked", true, driver);
// return new WikiArticlePageObject(driver, Domain, articlename);
}
public void verifyComment(String message, String userName)
{
waitForElementByXPath("//blockquote//p[contains(text(), '"+message+"')]");
waitForElementByXPath("//div[@class='edited-by']//a[contains(text(), '"+userName+"')]");
PageObjectLogging.log("verifyComment", "comment: "+message+" is visible", true, driver);
}
private void clickReplyCommentButton(String comment)
{
waitForElementByXPath("//p[contains(text(), '"+comment+"')]//..//..//button[contains(text(), 'Reply')]");
jQueryClick(".article-comm-reply");
// click(driver.findElement(By.xpath("//p[contains(text(), '"+comment+"')]//..//..//button[contains(text(), 'Reply')]")));
waitForElementByElement(iframe);
PageObjectLogging.log("clickReplyCommentButton", "reply comment button clicked", true);
}
private void writeReply(String reply)
{
waitForElementByElement(iframe);
driver.switchTo().frame(iframe);
editCommentArea.sendKeys(reply);
driver.switchTo().defaultContent();
waitForElementByElement(submitReplyButton);
jQueryClick("input[id*=\"article-comm-reply\"]");
waitForElementByXPath("//p[contains(text(), '"+reply+"')]");
PageObjectLogging.log("writeReply", "reply comment written", true);
}
public void replyComment(String comment, String reply)
{
driver.navigate().refresh();
clickReplyCommentButton(comment);
writeReply(reply);
PageObjectLogging.log("reply comment", "reply comment written and checked", true, driver);
}
// private void hoverMouseOverCommentArea(String commentContent)
// {
// WebElement commentArea = driver.findElement(By.xpath("//p[contains(text(), '"+commentContent+"')]"));
// Point p = commentArea.getLocation();
// CommonFunctions.MoveCursorToElement(p, driver);
// PageObjectLogging.log("hoverMouseOverCommentArea", "mouse moved to comment area", true, driver);
// }
private void clickDeleteCommentButton()
{
executeScript("document.querySelectorAll('.article-comm-delete')[0].click()");
PageObjectLogging.log("clickDeleteCommentButton", "delete comment button clicked", true, driver);
}
private void clickEditCommentButton()
{
try {Thread.sleep(1000);} catch (InterruptedException e) {e.printStackTrace();}
executeScript("document.querySelectorAll('.article-comm-edit')[0].click()");
waitForElementByElement(iframe);
PageObjectLogging.log("clickEditCommentButton", "edit comment button clicked", true, driver);
}
public void deleteComment(String comment)
{
((JavascriptExecutor)driver).executeScript("window.scrollTo(0,0)");
// hoverMouseOverCommentArea(comment);
clickDeleteCommentButton();
clickCommentDeleteConfirmationButton();
PageObjectLogging.log("deleteComment", "comment deleted", true, driver);
}
public void editComment(String comment)
{
driver.navigate().refresh();
// hoverMouseOverCommentArea(comment);
clickEditCommentButton();
}
public void verifyPageTitle(String title)
{
title = title.replace("_", " ");
waitForElementByXPath("//h1[contains(text(), '"+title+"')]");
PageObjectLogging.log("verifyPageTitle", "page title is verified", true, driver);
}
public void verifyArticleText(String content)
{
waitForElementByXPath("//div[@id='mw-content-text']//*[contains(text(), '"+content+"')]");
PageObjectLogging.log("verifyArticleText", "article text is verified", true, driver);
}
/**
* Click Edit button on a wiki article
*
* @author Michal Nowierski
*/
public WikiArticleEditMode edit() {
waitForElementByElement(editButton);
clickAndWait(editButton);
PageObjectLogging.log("Edit", "Edit Article: "+articlename+", on wiki: "+Domain+"", true, driver);
return new WikiArticleEditMode(driver, Domain, articlename);
}
/**
* Verify that the image appears on the page
*
* @author Michal Nowierski
*/
public void VerifyTheImageOnThePage() {
waitForElementByBy(ImageOnWikiaArticle);
PageObjectLogging.log("VerifyTheImageOnThePage", "Verify that the image appears on the page", true, driver);
}
/**
* Verify that the image does not appear on the page
*
* @author Michal Nowierski
*/
public void verifyTheImageNotOnThePage() {
waitForElementNotVisibleByBy(ImageOnWikiaArticle);
PageObjectLogging.log("VerifyTheImageNotOnThePage", "Verify that the image does not appear on the page", true, driver);
}
public void verifyTheGalleryNotOnThePage() {
waitForElementNotVisibleByBy(galleryOnPublish);
PageObjectLogging.log("verifyTheGalleryNotOnThePage", "Verify that the gallery does not appear on the page", true, driver);
}
public void verifyTheSlideshowNotOnThePage()
{
waitForElementNotVisibleByBy(slideShowOnPublish);
PageObjectLogging.log("verifyTheSlideshowNotOnThePage", "Verify that the slideshow does not appear on the page", true, driver);
}
public void verifyTheVideoNotOnThePage() {
waitForElementNotVisibleByBy(videoOnPublish);
PageObjectLogging.log("verifyTheVideoNotOnThePage", "Verify that the video does not appear on the page", true, driver);
}
/**
* Verify that the Object appears on the page
*
* @author Michal Nowierski
* @param Object Object = {gallery, slideshow}
* */
public void verifyTheObjectOnThePage(String Object) {
wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector("div.WikiaArticle div[id*='"+Object+"']")));
PageObjectLogging.log("VerifyTheObjetOnThePage", "Verify that the "+Object+" appears on the page", true, driver);
}
/**
* Verify that the Video appears on the page
*
* @author Michal Nowierski
* */
public void verifyTheVideoOnThePage() {
waitForElementByBy(VideoOnWikiaArticle);
PageObjectLogging.log("VerifyTheVideoOnThePage", "Verify that the Video appears on the page", true, driver);
}
/**
* Verify that the RV Module Is Present
*
* @author Michal Nowierski
* */
public void verifyRVModulePresence() {
waitForElementByElement(rVModule);
PageObjectLogging.log("VerifyRVModulePresence", "Verify that the RV Module Is Present", true, driver);
}
/**
* Click On 'Add a video' button on RV module
*
* @author Michal Nowierski
* */
public void clickOnAddVideoRVModule() {
waitForElementByBy(AddVideoRVButton);
CommonFunctions.scrollToElement(driver.findElement(AddVideoRVButton));
waitForElementClickableByBy(AddVideoRVButton);
clickAndWait(driver.findElement(AddVideoRVButton));
PageObjectLogging.log("ClickOnAddVideoRVModule", "Click On 'Add a video' button on RV module", true, driver);
}
/**
* Type given URL into RV modal
*
* @author Michal Nowierski
* @param videoURL URL of the video to be added
* */
public void typeInVideoURL(String videoURL) {
waitForElementByElement(videoRVmodalInput);
videoRVmodalInput.clear();
videoRVmodalInput.sendKeys(videoURL);
PageObjectLogging.log("TypeInVideoURL", "Type given URL into RV modal", true, driver);
}
/**
* Click on Add button on RV modal
*
* @author Michal Nowierski
* */
public void clickOnRVModalAddButton() {
waitForElementByBy(VideoModalAddButton);
waitForElementClickableByBy(VideoModalAddButton);
clickAndWait(driver.findElement(VideoModalAddButton));
PageObjectLogging.log("ClickOnRVModalAddButton", "Click on Add button on RV modal", true, driver);
}
/**
* Wait for processing the added video to finish
*
* @author Michal Nowierski
* */
public void waitForProcessingToFinish() {
waitForElementNotVisibleByBy(RVvideoLoading);
PageObjectLogging.log("WaitForProcessingToFinish", "Wait for processing the added video to finish", true, driver);
}
/**
* Verify that video given by its name has been added to RV module
*
* @author Michal Nowierski
* @param videoURL2name The name of the video, or any fragment of the video name
* */
public void verifyVideoAddedToRVModule(String videoURL2name) {
waitForElementByCss("img[data-video*='"+videoURL2name+"']");
PageObjectLogging.log("VerifyVideoAddedToRVModule", "Verify that video given by its name has been added to RV module", true, driver);
}
public void verifyGalleryPosion(String position) {
waitForElementByCss("div.wikia-gallery-position-"+position);
PageObjectLogging.log("verifyGalleryPosion", "Gallery position verified: "+position, true, driver);
}
public void verifySlideshowPosition(String position) {
if (position.equals("left")||position.equals("right"))
{
waitForElementByCss("div.wikia-slideshow.float"+position);
PageObjectLogging.log("verifySlideshowPosion", "Slideshow position verified: "+position, true, driver);
}
else if (position.equals("center"))
{
waitForElementByCss("div.wikia-slideshow.slideshow-center");
PageObjectLogging.log("verifySlideshowPosion", "Slideshow position verified: "+position, true, driver);
}
}
/**
*
* @param position available values (vertical, horizontal)
*/
public void verifySliderThumbnailsPosition(String position) {
waitForElementByCss(".wikiaPhotoGallery-slider-body div."+position);
PageObjectLogging.log("verifySliderThumbnailsPosition", "Slider thumbnails position verified: "+position, true, driver);
}
public WikiHistoryPageObject openHistoryPage()
{
getUrl(driver.getCurrentUrl() + "?action=history");
waitForElementByElement(historyHeadLine);
return new WikiHistoryPageObject(driver, articlename, articlename);
}
/**
* Verify that the table appears on the page
*
*
@author Michal Nowierski
*/
public void VerifyTheTableOnThePage() {
waitForElementByElement(TableOnWikiaArticle);
PageObjectLogging.log("VerifyTheTableOnThePage", "Verify that the table appears on the page", true, driver);
}
/**
* Click on 'add Category' Button
*
@author Michal Nowierski
*/
public void categories_clickAddCategory() {
waitForElementByElement(categories_AddCategoryButton);
waitForElementClickableByElement(categories_AddCategoryButton);
clickAndWait(categories_AddCategoryButton);
PageObjectLogging.log("categories_clickAddCategory", "Click on 'add Category' Button", true, driver);
}
/**
* type a category to field
*
@author Michal Nowierski
*/
public void categories_typeCategoryName(String categoryName) {
waitForElementByElement(categories_CategoryInputField);
categories_CategoryInputField.sendKeys(categoryName);
categories_CategoryInputField.sendKeys(Keys.ENTER);
PageObjectLogging.log("categories_clickAddCategory", "type "+categoryName+" to category input field", true, driver);
}
/**
* click SaveButton
*
@author Michal Nowierski
*/
public void categories_clickOnSave() {
waitForElementByElement(categories_saveButton);
waitForElementClickableByElement(categories_saveButton);
clickAndWait(categories_saveButton);
PageObjectLogging.log("categories_clickOnSave", "Click on 'Save' Button", true, driver);
}
/**
* click SaveButton
*
@author Michal Nowierski
*/
public void categories_verifyCategoryAdded(String categoryName) {
List<WebElement> lista = driver.findElements(categories_listOfCategories);
Boolean result = false;
// there might be more than one category on a random page. Thus - loop over all of them.
for (WebElement webElement : lista) {
waitForElementByElement(webElement);
if (webElement.getText().equalsIgnoreCase(categoryName)) {
result = true;
}
}
if (result) {
PageObjectLogging.log("categories_verifyCategoryAdded", "category "+categoryName+" succesfully added", true, driver);
}
else {
PageObjectLogging.log("categories_verifyCategoryAdded", "category "+categoryName+" NOT added", false, driver);
}
}
public void categories_verifyCategoryRemoved(String categoryName) {
List<WebElement> lista = driver.findElements(categories_listOfCategories);
Boolean result = false;
// there might be more than one category on a random page. Thus - loop over all of them.
if (lista.size()>0) {
for (WebElement webElement : lista) {
waitForElementByElement(webElement);
if (webElement.getText().equalsIgnoreCase(categoryName)) {
result = true;
}
}
}
if (result) {
PageObjectLogging.log("categories_verifyCategoryRemoved", "category "+categoryName+" not removed - found on the list", false, driver);
}
else {
PageObjectLogging.log("categories_verifyCategoryRemoved", "category "+categoryName+" removed", true, driver);
}
}
/**
* getArticleNameFromURL
*
@author Michal Nowierski
*/
public String getArticleNameFromURL() {
//TODO: To Michal: use Regular Expression here, when its syntax is learned.
String URL= driver.getCurrentUrl();
int articlenameIndex = URL.indexOf("wiki/");
String articleName = URL.substring(articlenameIndex+5);
return articleName;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
6b4aafd63d53d49ca5beabec7fc1e5e946fc2815
|
6372bd0160ba49a48470030b623d02b9052aa694
|
/app/src/main/java/com/freak/neteasecloudmusic/utils/RegexUtils.java
|
4a15c7b9e5537ac8f060b2f5040e17b2cbdebe40
|
[] |
no_license
|
freakcsh/NeteaseCloudMusic
|
826f1efaa7e3f15af50afddef8984836cd128ea0
|
e6db94ebbfb09ec4dc5cd2d3cc0ad2425d1405b3
|
refs/heads/master
| 2020-04-28T21:42:14.301735
| 2020-03-05T10:38:06
| 2020-03-05T10:38:06
| 175,591,500
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,779
|
java
|
/*
* Copyright (C) 2013 Peng fei Pan <sky@xiaopan.me>
*
* 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.freak.neteasecloudmusic.utils;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* <h2>正则表达式工具类,提供一些常用的正则表达式</h2>
*/
public class RegexUtils {
/**
* 匹配全网IP的正则表达式
*/
public static final String IP_REGEX = "^((?:(?:25[0-5]|2[0-4]\\d|((1\\d{2})|([1-9]?\\d)))\\.){3}(?:25[0-5]|2[0-4]\\d|((1\\d{2})|([1-9]?\\d))))$";
/**
* 匹配手机号码的正则表达式
* <br>支持130——139、150——153、155——159、180、183、185、186、188、189号段
*/
public static final String PHONE_NUMBER_REGEX = "^1{1}(3{1}\\d{1}|5{1}[012356789]{1}|8{1}[035689]{1})\\d{8}$";
/**
* 匹配邮箱的正则表达式
* <br>"www."可省略不写
*/
public static final String EMAIL_REGEX = "^(www\\.)?\\w+@\\w+(\\.\\w+)+$";
/**
* 匹配汉字的正则表达式,个数限制为一个或多个
*/
public static final String CHINESE_REGEX = "^[\u4e00-\u9f5a]+$";
/**
* 匹配正整数的正则表达式,个数限制为一个或多个
*/
public static final String POSITIVE_INTEGER_REGEX = "^\\d+$";
/**
* 匹配身份证号的正则表达式
*/
public static final String ID_CARD = "^(^[1-9]\\d{7}((0\\d)|(1[0-2]))(([0|1|2]\\d)|3[0-1])\\d{3}$)|(^[1-9]\\d{5}[1-9]\\d{3}((0\\d)|(1[0-2]))(([0|1|2]\\d)|3[0-1])((\\d{4})|\\d{3}[Xx])$)$";
/**
* 匹配邮编的正则表达式
*/
public static final String ZIP_CODE = "^\\d{6}$";
/**
* 匹配URL的正则表达式
*/
public static final String URL = "^(([hH][tT]{2}[pP][sS]?)|([fF][tT][pP]))\\:\\/\\/[wW]{3}\\.[\\w-]+\\.\\w{2,4}(\\/.*)?$";
/**
* 匹配给定的字符串是否是一个邮箱账号,"www."可省略不写
* @param string 给定的字符串
* @return true:是
*/
public static boolean isEmail(String string){
return string.matches(EMAIL_REGEX);
}
/**
* 匹配给定的字符串是否是一个手机号码,支持130——139、150——153、155——159、180、183、185、186、188、189号段
* @param string 给定的字符串
* @return true:是
*/
public static boolean isMobilePhoneNumber(String string){
return string.matches(PHONE_NUMBER_REGEX);
}
/**
* 匹配给定的字符串是否是一个全网IP
* @param string 给定的字符串
* @return true:是
*/
public static boolean isIp(String string){
return string.matches(IP_REGEX);
}
/**
* 匹配给定的字符串是否全部由汉字组成
* @param string 给定的字符串
* @return true:是
*/
public static boolean isChinese(String string){
return string.matches(CHINESE_REGEX);
}
/**
* 验证给定的字符串是否全部由正整数组成
* @param string 给定的字符串
* @return true:是
*/
public static boolean isPositiveInteger(String string){
return string.matches(POSITIVE_INTEGER_REGEX);
}
/**
* 验证给定的字符串是否是身份证号
* <br>
* <br>身份证15位编码规则:dddddd yymmdd xx p
* <br>dddddd:6位地区编码
* <br>yymmdd:出生年(两位年)月日,如:910215
* <br>xx:顺序编码,系统产生,无法确定
* <br>p:性别,奇数为男,偶数为女
* <br>
* <br>
* <br>身份证18位编码规则:dddddd yyyymmdd xxx y
* <br>dddddd:6位地区编码
* <br>yyyymmdd:出生年(四位年)月日,如:19910215
* <br>xxx:顺序编码,系统产生,无法确定,奇数为男,偶数为女
* <br>y:校验码,该位数值可通过前17位计算获得
* <br>前17位号码加权因子为 Wi = [ 7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2 ]
* <br>验证位 Y = [ 1, 0, 10, 9, 8, 7, 6, 5, 4, 3, 2 ]
* <br>如果验证码恰好是10,为了保证身份证是十八位,那么第十八位将用X来代替 校验位计算公式:Y_P = mod( ∑(Ai×Wi),11 )
* <br>i为身份证号码1...17 位; Y_P为校验码Y所在校验码数组位置
* @param string
* @return
*/
public static boolean isIdCard(String string){
return string.matches(ID_CARD);
}
/**
* 验证给定的字符串是否是邮编
* @param string
* @return
*/
public static boolean isZipCode(String string){
return string.matches(ZIP_CODE);
}
/**
* 验证给定的字符串是否是URL,仅支持http、https、ftp
* @param string
* @return
*/
public static boolean isURL(String string){
return string.matches(URL);
}
/**
* 验证密码只能输入字母和数字的特殊字符,这个返回的是过滤之后的字符串
*/
public static String checkPasWord(String pro) {
try {
// 只允许字母、数字和汉字
String regEx = "[^a-zA-Z0-9\u4E00-\u9FA5]";
Pattern p = Pattern.compile(regEx);
Matcher m = p.matcher(pro);
return m.replaceAll("").trim();
} catch (Exception e) {
}
return "";
}
/**
* 只能输入字母和汉字 这个返回的是过滤之后的字符串
*/
public static String checkInputPro(String pro) {
try {
String regEx = "[^a-zA-Z\u4E00-\u9FA5]";
Pattern p = Pattern.compile(regEx);
Matcher m = p.matcher(pro);
return m.replaceAll("").trim();
} catch (Exception e) {
}
return "";
}
}
|
[
"3024768596@qq.com"
] |
3024768596@qq.com
|
033cd953371223fd338e553a2b623b89b42b2d21
|
396ae42be1ea3c052ee4975c8505aa10c8b9ebab
|
/HBProj09_ObjectVersioning/src/main/java/com/har/entity/EmployeeAnno.java
|
dbf1df5ad7e4386551d6f8bd4f5ef7d0df7078e3
|
[] |
no_license
|
harishviru/Hibernate
|
ea45cb201c243a7f79fcf4f5db7f75f91c880da2
|
3be3a74a56fa053e58f089a8bea55bd9dd047fbf
|
refs/heads/main
| 2023-06-01T22:12:10.865356
| 2021-06-18T15:59:39
| 2021-06-18T15:59:39
| 369,538,555
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 972
|
java
|
package com.har.entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Version;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@NoArgsConstructor
@AllArgsConstructor
@Data
@Entity
@Table(name="employee")
public class EmployeeAnno {
@Id
@GeneratedValue
@Column(name="emp_id")
private Integer empId;
// In hibernate mapping file/Entity class,we can add an element like <version> /@Version annotation soon after id element .
@Version
private Integer version;
@Column(name="emp_name")
private String empName;
//Here column and property name are same,so that not required use @Column annotation
private String position;
//Here column and property name are same,so that not required use @Column annotation
private Double salary;
}
|
[
"57554695+harishviru@users.noreply.github.com"
] |
57554695+harishviru@users.noreply.github.com
|
959c42b530ec951aa76848f8cde4bcb0b9515329
|
b7dbbc77f1413d6df383b94710cf66ff35bbf488
|
/app/src/main/java/twitchvod/src/data/primitives/Stream.java
|
d6f353bd7b2f2cbf54670fe6d6ba8efeb639db81
|
[] |
no_license
|
Tinakawai/TwitchBot
|
7321daec0155aab7eff9cf63d399048569dc13a4
|
3ae8b56877d1c3c97254eb1e821d026ffc922ef4
|
refs/heads/master
| 2023-03-26T04:43:19.089862
| 2015-02-13T17:03:42
| 2015-02-13T17:03:42
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,113
|
java
|
package twitchvod.src.data.primitives;
import android.graphics.Bitmap;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.HashMap;
public class Stream {
public String mTitle, mLogoLink, mPreviewLink, mUrl, mStatus, mGame;
public int mViewers, mId;
public Bitmap mLogo, mPreview;
public Stream(String title, String url, String status, String game, int viewers,
String logoLink, String previewLink, int id) {
mTitle = title;
mViewers = viewers;
mUrl = url;
mGame = game;
mId = id;
mStatus = status;
mLogoLink = logoLink;
mPreviewLink = previewLink;
}
public Stream(HashMap<String, String> h) {
mTitle = h.get("title");
mViewers = Integer.valueOf(h.get("viewers"));
mUrl = h.get("url");
mGame = h.get("game");
mId = Integer.valueOf(h.get("id"));
mStatus = h.get("status");
mLogoLink = h.get("logoLink");
mPreviewLink = h.get("previewLink");
}
public HashMap<String, String> toHashMap() {
HashMap<String, String> h = new HashMap<>();
h.put("title", mTitle);
h.put("display_name", mTitle);
h.put("name", titleToURL());
h.put("viewers", String.valueOf(mViewers));
h.put("views", String.valueOf(mViewers));
h.put("url", mUrl);
h.put("id", String.valueOf(mId));
h.put("game", mGame);
h.put("status", mStatus);
h.put("logoLink", mLogoLink);
h.put("previewLink", mPreviewLink);
return h;
}
public String titleToURL() {
String url = "";
try {
url = URLEncoder.encode(mTitle, "UTF-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
return url.toLowerCase();
}
@Override
public String toString() {
return mTitle+ " spielt " + mGame + " mit " + mViewers + " Zuschauern";
}
public String channelInfo() {
return "Playing " + mGame + "\n" + mViewers + " Viewers";
}
}
|
[
"marc.nemn@gmail.com"
] |
marc.nemn@gmail.com
|
4d37963ee71216ea2e653357d4585f48a729ca61
|
21a76b80263665b27472fcdb271e1a2bcc92f102
|
/VIN/src/spring15_CS445/model/Shipment.java
|
31ba8e97b93420b124fd1fa670c0e24b70b2b1ec
|
[] |
no_license
|
redlalitp/WineClub_JavaSpringMVC-
|
e9e73ba66e38d0cc6da22d262df66661238500e8
|
8976da189632e9a50d9c64eb07e7c30046976d52
|
refs/heads/master
| 2021-01-10T05:06:34.602840
| 2015-10-20T19:12:58
| 2015-10-20T19:12:58
| 44,628,843
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,113
|
java
|
package spring15_CS445.model;
import java.util.ArrayList;
import java.util.List;
public class Shipment {
private int sid;
private String status;
private String dt;
private WineVariety wt;
private List<Wine> wines = new ArrayList<Wine>();
private List<Note> notes = new ArrayList<Note>();
public Shipment(WineVariety wt,String ym,List<Wine> wn){
this.sid = IdGenerator.newID();
this.setDt(ym);
this.status = "TBD";
this.wt = wt;
this.wines = wn;
}
public int getSid() {
return sid;
}
public void setSid(int sid) {
this.sid = sid;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public WineVariety getWt() {
return wt;
}
public void setWt(WineVariety wt) {
this.wt = wt;
}
public List<Wine> getWines() {
return wines;
}
public void setWines(List<Wine> wines) {
this.wines = wines;
}
public List<Note> getNotes() {
return notes;
}
public void setNotes(List<Note> notes) {
this.notes = notes;
}
public String getDt() {
return dt;
}
public void setDt(String dt) {
this.dt = dt;
}
}
|
[
"lalitpatil@outlook.com"
] |
lalitpatil@outlook.com
|
2c2bbbb69a0ee0f7637f49da2f6ee9aaed06648c
|
c17c9c2b6d49ddcf88fa427b0aaea0657e523c18
|
/alfresco-jlan/src/main/java/org/alfresco/jlan/server/filesys/TooManyConnectionsException.java
|
75155c080c318ed820396340cb179a2b7c3829b4
|
[] |
no_license
|
surcloudorg/SurFS-NAS-Protocol
|
9a0e92872724f22bee4166d7a9abfe1623d383a4
|
cdce2b579f8864b008400c1d1789b0ad50549886
|
refs/heads/master
| 2020-04-06T06:42:59.272315
| 2016-04-22T09:31:07
| 2016-04-22T09:31:07
| 54,711,148
| 4
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,832
|
java
|
/*
* Copyright (C) 2006-2008 Alfresco Software Limited.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* As a special exception to the terms and conditions of version 2.0 of
* the GPL, you may redistribute this Program in connection with Free/Libre
* and Open Source Software ("FLOSS") applications as described in Alfresco's
* FLOSS exception. You should have recieved a copy of the text describing
* the FLOSS exception, and it is also available here:
* http://www.alfresco.com/legal/licensing"
*/
package org.alfresco.jlan.server.filesys;
/**
* <p>This error indicates that too many tree connections are currently open
* on a session. The new tree connection request will be rejected by the server.
*
* @author gkspencer
*/
public class TooManyConnectionsException extends Exception {
private static final long serialVersionUID = 6353813221614206049L;
/**
* TooManyConnectionsException constructor.
*/
public TooManyConnectionsException() {
super();
}
/**
* TooManyConnectionsException constructor.
*
* @param s java.lang.String
*/
public TooManyConnectionsException(String s) {
super(s);
}
}
|
[
"root@localhost.localdomain"
] |
root@localhost.localdomain
|
d17f1514c73c75b0f21b8d1366de2b712157e111
|
c33c04253e937e4a32c2dbec37ef0c005ab70882
|
/src/main/java/com/krealll/worklance/controller/command/impl/FindOrderCommand.java
|
d0ed6b46bdb0828de6e464255e84817ceec09abe
|
[] |
no_license
|
Krealll/WorkLance
|
d02fb57b9817f363103f603b7a2a27c0fda271a2
|
550ff0ec86c5a5b45592d1cd6490b9469d3b992c
|
refs/heads/master
| 2023-03-09T06:14:14.049743
| 2021-02-16T18:09:12
| 2021-02-16T18:09:12
| 299,124,334
| 0
| 1
| null | 2020-12-16T20:15:47
| 2020-09-27T21:41:44
|
Java
|
UTF-8
|
Java
| false
| false
| 2,484
|
java
|
package com.krealll.worklance.controller.command.impl;
import com.krealll.worklance.controller.PagePath;
import com.krealll.worklance.controller.RequestParameter;
import com.krealll.worklance.controller.command.Command;
import com.krealll.worklance.controller.router.Router;
import com.krealll.worklance.exception.ServiceException;
import com.krealll.worklance.model.entity.Order;
import com.krealll.worklance.model.entity.User;
import com.krealll.worklance.model.service.OrderService;
import com.krealll.worklance.model.service.UserService;
import com.krealll.worklance.model.service.impl.OrderServiceImpl;
import com.krealll.worklance.model.service.impl.UserServiceImpl;
import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import javax.servlet.http.HttpServletRequest;
import java.util.Optional;
public class FindOrderCommand implements Command {
private final static Logger logger = LogManager.getLogger(FindOrderCommand.class);
@Override
public Router execute(HttpServletRequest request) {
Router router;
OrderService service = new OrderServiceImpl();
UserService userService = new UserServiceImpl();
try {
Long orderId = Long.parseLong(request.getParameter(RequestParameter.ORDER_ID));
Optional<Order> optionalOrder = service.findById(orderId);
if(optionalOrder.isPresent()){
request.setAttribute(RequestParameter.CHOSEN_ORDER,optionalOrder.get());
Optional<User> user = userService.findById(optionalOrder.get().getCustomer());
if(user.isPresent()){
request.setAttribute(RequestParameter.CUSTOMER_ID,user.get().getId());
request.setAttribute(RequestParameter.EMAIL_ALLOWED,user.get().getShowEmail());
request.setAttribute(RequestParameter.CUSTOMER_EMAIL,user.get().getEmail());
router = new Router(PagePath.ORDER);
}else {
logger.log(Level.ERROR,"Bad attempt to finding customer");
router = new Router(PagePath.ERROR_500);
}
} else {
logger.log(Level.WARN,"Bad attempt to find order page");
router = new Router(PagePath.ERROR_500);
}
} catch (ServiceException e) {
router = new Router(PagePath.ERROR_500);
}
return router;
}
}
|
[
"krealll@mail.ru"
] |
krealll@mail.ru
|
78777a419481367b63e1fb1fb7c75ccfb8730d5c
|
b3d363f55ea1a89cf1228671013579b11552dc6c
|
/src/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/RequiredFieldValidator.java
|
5356ffc73e7ea618a33d2b25dfa3693fdc4ebeae
|
[
"LicenseRef-scancode-freemarker",
"Apache-2.0",
"BSD-3-Clause",
"BSD-2-Clause",
"Apache-1.1",
"LicenseRef-scancode-indiana-extreme",
"EPL-1.0"
] |
permissive
|
JavaQualitasCorpus/struts-2.2.1
|
b9770d1b366c7fc2616f68b4527a3248d6a0f52e
|
1012cc59d3973318b94c8a2afc997383945b1006
|
refs/heads/master
| 2023-09-01T06:32:45.448530
| 2020-06-02T18:14:20
| 2020-06-02T18:14:20
| 167,005,107
| 0
| 1
|
Apache-2.0
| 2022-12-15T23:29:28
| 2019-01-22T14:09:22
|
Java
|
UTF-8
|
Java
| false
| false
| 2,231
|
java
|
/*
* Copyright 2002-2006,2009 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* 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.opensymphony.xwork2.validator.validators;
import com.opensymphony.xwork2.validator.ValidationException;
/**
* <!-- START SNIPPET: javadoc -->
* RequiredFieldValidator checks if the specified field is not null.
* <!-- END SNIPPET: javadoc -->
* <p/>
*
*
* <!-- START SNIPPET: parameters -->
* <ul>
* <li>fieldName - field name if plain-validator syntax is used, not needed if field-validator syntax is used</li>
* </ul>
* <!-- END SNIPPET: parameters -->
*
*
* <pre>
* <!-- START SNIPPET: example -->
* <validators>
*
* <!-- Plain Validator Syntax -->
* <validator type="required">
* <param name="fieldName">username</param>
* <message>username must not be null</message>
* </validator>
*
*
* <!-- Field Validator Syntax -->
* <field name="username">
* <field-validator type="required">
* <message>username must not be null</message>
* </field-validator>
* </field>
*
* </validators>
* <!-- END SNIPPET: example -->
* </pre>
*
*
*
* @author rainerh
* @version $Revision: 894090 $
*/
public class RequiredFieldValidator extends FieldValidatorSupport {
public void validate(Object object) throws ValidationException {
String fieldName = getFieldName();
Object value = this.getFieldValue(fieldName, object);
if (value == null) {
addFieldError(fieldName, object);
}
}
}
|
[
"taibi@sonar-scheduler.rd.tut.fi"
] |
taibi@sonar-scheduler.rd.tut.fi
|
3a3df6b87edfa7fdb9b5414ff139f865eeeb5636
|
304a72fc82ad198e30fd5a287dbd6b26da725bc3
|
/baseio-test/src/main/java/com/generallycloud/test/nio/fixedlength/TestFIxedLengthServer.java
|
bcbbdabf5800de5b0143860c7aa362a50bc0666c
|
[
"Apache-2.0"
] |
permissive
|
ffjava/baseio
|
eb04d351df151a2177fa1be943fc8c3bd0549346
|
5a691f59732b756434bea7555d51c4e8ad6909ea
|
refs/heads/master
| 2021-01-19T17:09:57.521605
| 2017-08-22T03:27:48
| 2017-08-22T03:27:48
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,838
|
java
|
/*
* Copyright 2015-2017 GenerallyCloud.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by 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.generallycloud.test.nio.fixedlength;
import java.io.File;
import com.generallycloud.baseio.acceptor.SocketChannelAcceptor;
import com.generallycloud.baseio.codec.fixedlength.FixedLengthProtocolFactory;
import com.generallycloud.baseio.codec.fixedlength.future.FLBeatFutureFactory;
import com.generallycloud.baseio.common.FileUtil;
import com.generallycloud.baseio.component.IoEventHandleAdaptor;
import com.generallycloud.baseio.component.LoggerSocketSEListener;
import com.generallycloud.baseio.component.NioSocketChannelContext;
import com.generallycloud.baseio.component.SocketChannelContext;
import com.generallycloud.baseio.component.SocketSession;
import com.generallycloud.baseio.component.ssl.SSLUtil;
import com.generallycloud.baseio.component.ssl.SslContext;
import com.generallycloud.baseio.configuration.ServerConfiguration;
import com.generallycloud.baseio.protocol.Future;
public class TestFIxedLengthServer {
public static void main(String[] args) throws Exception {
IoEventHandleAdaptor eventHandleAdaptor = new IoEventHandleAdaptor() {
@Override
public void accept(SocketSession session, Future future) throws Exception {
future.write("yes server already accept your message:");
future.write(future.getReadText());
session.flush(future);
}
};
SocketChannelContext context = new NioSocketChannelContext(new ServerConfiguration(18300));
SocketChannelAcceptor acceptor = new SocketChannelAcceptor(context);
context.addSessionEventListener(new LoggerSocketSEListener());
// context.addSessionEventListener(new SocketSessionAliveSEListener());
context.setIoEventHandleAdaptor(eventHandleAdaptor);
context.setBeatFutureFactory(new FLBeatFutureFactory());
context.setProtocolFactory(new FixedLengthProtocolFactory());
File certificate = FileUtil.readFileByCls("generallycloud.com.crt");
File privateKey = FileUtil.readFileByCls("generallycloud.com.key");
SslContext sslContext = SSLUtil.initServer(privateKey, certificate);
context.setSslContext(sslContext);
acceptor.bind();
}
}
|
[
"8738115@qq.com"
] |
8738115@qq.com
|
17dc94eff84b2a309ac83111624afdc8cc106f9f
|
7a68bc2f98b26dbbbec5710562f7cbeeac90578e
|
/pm7/src/main/java/pm7/domain/Invoice.java
|
e71f11749d469864a9cba5085caf5b8fc3f29314
|
[] |
no_license
|
tsws4s/tsw7
|
2d70f7a75b178fa60d4bbdd3f5202b897036f0b9
|
a0e0a380cf9750b3f627835f4d41e56ed8bde5b4
|
refs/heads/master
| 2021-01-18T14:01:32.731677
| 2013-12-03T04:52:09
| 2013-12-03T04:52:09
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 14,262
|
java
|
package pm7.domain;
import java.io.Serializable;
import java.lang.StringBuilder;
import java.math.BigDecimal;
import java.util.Calendar;
import java.util.LinkedHashSet;
import java.util.Set;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.xml.bind.annotation.*;
import javax.persistence.*;
/**
*/
@Entity
@NamedQueries({
@NamedQuery(name = "findAllInvoices", query = "select myInvoice from Invoice myInvoice"),
@NamedQuery(name = "findInvoiceByActiveYn", query = "select myInvoice from Invoice myInvoice where myInvoice.activeYn = ?1"),
@NamedQuery(name = "findInvoiceByBalanceAmt", query = "select myInvoice from Invoice myInvoice where myInvoice.balanceAmt = ?1"),
@NamedQuery(name = "findInvoiceByBilledHrs", query = "select myInvoice from Invoice myInvoice where myInvoice.billedHrs = ?1"),
@NamedQuery(name = "findInvoiceByBilledRate", query = "select myInvoice from Invoice myInvoice where myInvoice.billedRate = ?1"),
@NamedQuery(name = "findInvoiceByDiscountAmt", query = "select myInvoice from Invoice myInvoice where myInvoice.discountAmt = ?1"),
@NamedQuery(name = "findInvoiceByExpensesAmt", query = "select myInvoice from Invoice myInvoice where myInvoice.expensesAmt = ?1"),
@NamedQuery(name = "findInvoiceByInvoiceDate", query = "select myInvoice from Invoice myInvoice where myInvoice.invoiceDate = ?1"),
@NamedQuery(name = "findInvoiceByInvoiceDesc", query = "select myInvoice from Invoice myInvoice where myInvoice.invoiceDesc = ?1"),
@NamedQuery(name = "findInvoiceByInvoiceDescContaining", query = "select myInvoice from Invoice myInvoice where myInvoice.invoiceDesc like ?1"),
@NamedQuery(name = "findInvoiceByInvoiceId", query = "select myInvoice from Invoice myInvoice where myInvoice.invoiceId = ?1"),
@NamedQuery(name = "findInvoiceByInvoiceNumber", query = "select myInvoice from Invoice myInvoice where myInvoice.invoiceNumber = ?1"),
@NamedQuery(name = "findInvoiceByItemsAmt", query = "select myInvoice from Invoice myInvoice where myInvoice.itemsAmt = ?1"),
@NamedQuery(name = "findInvoiceByLogoFilename", query = "select myInvoice from Invoice myInvoice where myInvoice.logoFilename = ?1"),
@NamedQuery(name = "findInvoiceByLogoFilenameContaining", query = "select myInvoice from Invoice myInvoice where myInvoice.logoFilename like ?1"),
@NamedQuery(name = "findInvoiceByMessage", query = "select myInvoice from Invoice myInvoice where myInvoice.message = ?1"),
@NamedQuery(name = "findInvoiceByMessageContaining", query = "select myInvoice from Invoice myInvoice where myInvoice.message like ?1"),
@NamedQuery(name = "findInvoiceByPaidAmt", query = "select myInvoice from Invoice myInvoice where myInvoice.paidAmt = ?1"),
@NamedQuery(name = "findInvoiceByPaymentSched", query = "select myInvoice from Invoice myInvoice where myInvoice.paymentSched = ?1"),
@NamedQuery(name = "findInvoiceByPaymentSchedContaining", query = "select myInvoice from Invoice myInvoice where myInvoice.paymentSched like ?1"),
@NamedQuery(name = "findInvoiceByPrimaryKey", query = "select myInvoice from Invoice myInvoice where myInvoice.invoiceId = ?1"),
@NamedQuery(name = "findInvoiceByStatus", query = "select myInvoice from Invoice myInvoice where myInvoice.status = ?1"),
@NamedQuery(name = "findInvoiceByStatusContaining", query = "select myInvoice from Invoice myInvoice where myInvoice.status like ?1"),
@NamedQuery(name = "findInvoiceByTaxesAmt", query = "select myInvoice from Invoice myInvoice where myInvoice.taxesAmt = ?1"),
@NamedQuery(name = "findInvoiceByTotalAmt", query = "select myInvoice from Invoice myInvoice where myInvoice.totalAmt = ?1") })
@Table(catalog = "C324877_project_mgt", name = "Invoice")
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(namespace = "pm7/pm7/domain", name = "Invoice")
@XmlRootElement(namespace = "pm7/pm7/domain")
public class Invoice implements Serializable {
private static final long serialVersionUID = 1L;
/**
*/
@Column(name = "invoiceId", nullable = false)
@Basic(fetch = FetchType.EAGER)
@Id
@XmlElement
Integer invoiceId;
/**
*/
@Column(name = "invoiceNumber")
@Basic(fetch = FetchType.EAGER)
@XmlElement
Integer invoiceNumber;
/**
*/
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "invoiceDate")
@Basic(fetch = FetchType.EAGER)
@XmlElement
Calendar invoiceDate;
/**
*/
@Column(name = "invoiceDesc", length = 245)
@Basic(fetch = FetchType.EAGER)
@XmlElement
String invoiceDesc;
/**
*/
@Column(name = "status", length = 45)
@Basic(fetch = FetchType.EAGER)
@XmlElement
String status;
/**
*/
@Column(name = "paymentSched", length = 45)
@Basic(fetch = FetchType.EAGER)
@XmlElement
String paymentSched;
/**
*/
@Column(name = "billedRate", scale = 2, precision = 32)
@Basic(fetch = FetchType.EAGER)
@XmlElement
BigDecimal billedRate;
/**
*/
@Column(name = "discountAmt", scale = 2, precision = 32)
@Basic(fetch = FetchType.EAGER)
@XmlElement
BigDecimal discountAmt;
/**
*/
@Column(name = "taxesAmt", scale = 2, precision = 32)
@Basic(fetch = FetchType.EAGER)
@XmlElement
BigDecimal taxesAmt;
/**
*/
@Column(name = "totalAmt", scale = 2, precision = 32)
@Basic(fetch = FetchType.EAGER)
@XmlElement
BigDecimal totalAmt;
/**
*/
@Column(name = "paidAmt", scale = 2, precision = 32)
@Basic(fetch = FetchType.EAGER)
@XmlElement
BigDecimal paidAmt;
/**
*/
@Column(name = "balanceAmt", scale = 2, precision = 32)
@Basic(fetch = FetchType.EAGER)
@XmlElement
BigDecimal balanceAmt;
/**
*/
@Column(name = "message", length = 245)
@Basic(fetch = FetchType.EAGER)
@XmlElement
String message;
/**
*/
@Column(name = "billedHrs")
@Basic(fetch = FetchType.EAGER)
@XmlElement
Integer billedHrs;
/**
*/
@Column(name = "expensesAmt", scale = 2, precision = 32)
@Basic(fetch = FetchType.EAGER)
@XmlElement
BigDecimal expensesAmt;
/**
*/
@Column(name = "itemsAmt", scale = 2, precision = 32)
@Basic(fetch = FetchType.EAGER)
@XmlElement
BigDecimal itemsAmt;
/**
*/
@Column(name = "logoFilename", length = 245)
@Basic(fetch = FetchType.EAGER)
@XmlElement
String logoFilename;
/**
*/
@Column(name = "activeYN")
@Basic(fetch = FetchType.EAGER)
@XmlElement
Integer activeYn;
/**
*/
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumns({ @JoinColumn(name = "FK_accountId", referencedColumnName = "accountId") })
@XmlTransient
Account account;
/**
*/
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumns({ @JoinColumn(name = "FK_clientId", referencedColumnName = "clientId") })
@XmlTransient
Client client;
/**
*/
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumns({ @JoinColumn(name = "FK_projectId", referencedColumnName = "projectId") })
@XmlTransient
Project project;
/**
*/
@OneToMany(mappedBy = "invoice", cascade = { CascadeType.REMOVE }, fetch = FetchType.LAZY)
@XmlElement(name = "", namespace = "")
java.util.Set<pm7.domain.Invoiceitem> invoiceitems;
/**
*/
public void setInvoiceId(Integer invoiceId) {
this.invoiceId = invoiceId;
}
/**
*/
public Integer getInvoiceId() {
return this.invoiceId;
}
/**
*/
public void setInvoiceNumber(Integer invoiceNumber) {
this.invoiceNumber = invoiceNumber;
}
/**
*/
public Integer getInvoiceNumber() {
return this.invoiceNumber;
}
/**
*/
public void setInvoiceDate(Calendar invoiceDate) {
this.invoiceDate = invoiceDate;
}
/**
*/
public Calendar getInvoiceDate() {
return this.invoiceDate;
}
/**
*/
public void setInvoiceDesc(String invoiceDesc) {
this.invoiceDesc = invoiceDesc;
}
/**
*/
public String getInvoiceDesc() {
return this.invoiceDesc;
}
/**
*/
public void setStatus(String status) {
this.status = status;
}
/**
*/
public String getStatus() {
return this.status;
}
/**
*/
public void setPaymentSched(String paymentSched) {
this.paymentSched = paymentSched;
}
/**
*/
public String getPaymentSched() {
return this.paymentSched;
}
/**
*/
public void setBilledRate(BigDecimal billedRate) {
this.billedRate = billedRate;
}
/**
*/
public BigDecimal getBilledRate() {
return this.billedRate;
}
/**
*/
public void setDiscountAmt(BigDecimal discountAmt) {
this.discountAmt = discountAmt;
}
/**
*/
public BigDecimal getDiscountAmt() {
return this.discountAmt;
}
/**
*/
public void setTaxesAmt(BigDecimal taxesAmt) {
this.taxesAmt = taxesAmt;
}
/**
*/
public BigDecimal getTaxesAmt() {
return this.taxesAmt;
}
/**
*/
public void setTotalAmt(BigDecimal totalAmt) {
this.totalAmt = totalAmt;
}
/**
*/
public BigDecimal getTotalAmt() {
return this.totalAmt;
}
/**
*/
public void setPaidAmt(BigDecimal paidAmt) {
this.paidAmt = paidAmt;
}
/**
*/
public BigDecimal getPaidAmt() {
return this.paidAmt;
}
/**
*/
public void setBalanceAmt(BigDecimal balanceAmt) {
this.balanceAmt = balanceAmt;
}
/**
*/
public BigDecimal getBalanceAmt() {
return this.balanceAmt;
}
/**
*/
public void setMessage(String message) {
this.message = message;
}
/**
*/
public String getMessage() {
return this.message;
}
/**
*/
public void setBilledHrs(Integer billedHrs) {
this.billedHrs = billedHrs;
}
/**
*/
public Integer getBilledHrs() {
return this.billedHrs;
}
/**
*/
public void setExpensesAmt(BigDecimal expensesAmt) {
this.expensesAmt = expensesAmt;
}
/**
*/
public BigDecimal getExpensesAmt() {
return this.expensesAmt;
}
/**
*/
public void setItemsAmt(BigDecimal itemsAmt) {
this.itemsAmt = itemsAmt;
}
/**
*/
public BigDecimal getItemsAmt() {
return this.itemsAmt;
}
/**
*/
public void setLogoFilename(String logoFilename) {
this.logoFilename = logoFilename;
}
/**
*/
public String getLogoFilename() {
return this.logoFilename;
}
/**
*/
public void setActiveYn(Integer activeYn) {
this.activeYn = activeYn;
}
/**
*/
public Integer getActiveYn() {
return this.activeYn;
}
/**
*/
public void setAccount(Account account) {
this.account = account;
}
/**
*/
public Account getAccount() {
return account;
}
/**
*/
public void setClient(Client client) {
this.client = client;
}
/**
*/
public Client getClient() {
return client;
}
/**
*/
public void setProject(Project project) {
this.project = project;
}
/**
*/
public Project getProject() {
return project;
}
/**
*/
public void setInvoiceitems(Set<Invoiceitem> invoiceitems) {
this.invoiceitems = invoiceitems;
}
/**
*/
public Set<Invoiceitem> getInvoiceitems() {
if (invoiceitems == null) {
invoiceitems = new java.util.LinkedHashSet<pm7.domain.Invoiceitem>();
}
return invoiceitems;
}
/**
*/
public Invoice() {
}
/**
* Copies the contents of the specified bean into this bean.
*
*/
public void copy(Invoice that) {
setInvoiceId(that.getInvoiceId());
setInvoiceNumber(that.getInvoiceNumber());
setInvoiceDate(that.getInvoiceDate());
setInvoiceDesc(that.getInvoiceDesc());
setStatus(that.getStatus());
setPaymentSched(that.getPaymentSched());
setBilledRate(that.getBilledRate());
setDiscountAmt(that.getDiscountAmt());
setTaxesAmt(that.getTaxesAmt());
setTotalAmt(that.getTotalAmt());
setPaidAmt(that.getPaidAmt());
setBalanceAmt(that.getBalanceAmt());
setMessage(that.getMessage());
setBilledHrs(that.getBilledHrs());
setExpensesAmt(that.getExpensesAmt());
setItemsAmt(that.getItemsAmt());
setLogoFilename(that.getLogoFilename());
setActiveYn(that.getActiveYn());
setAccount(that.getAccount());
setClient(that.getClient());
setProject(that.getProject());
setInvoiceitems(new java.util.LinkedHashSet<pm7.domain.Invoiceitem>(that.getInvoiceitems()));
}
/**
* Returns a textual representation of a bean.
*
*/
public String toString() {
StringBuilder buffer = new StringBuilder();
buffer.append("invoiceId=[").append(invoiceId).append("] ");
buffer.append("invoiceNumber=[").append(invoiceNumber).append("] ");
buffer.append("invoiceDate=[").append(invoiceDate).append("] ");
buffer.append("invoiceDesc=[").append(invoiceDesc).append("] ");
buffer.append("status=[").append(status).append("] ");
buffer.append("paymentSched=[").append(paymentSched).append("] ");
buffer.append("billedRate=[").append(billedRate).append("] ");
buffer.append("discountAmt=[").append(discountAmt).append("] ");
buffer.append("taxesAmt=[").append(taxesAmt).append("] ");
buffer.append("totalAmt=[").append(totalAmt).append("] ");
buffer.append("paidAmt=[").append(paidAmt).append("] ");
buffer.append("balanceAmt=[").append(balanceAmt).append("] ");
buffer.append("message=[").append(message).append("] ");
buffer.append("billedHrs=[").append(billedHrs).append("] ");
buffer.append("expensesAmt=[").append(expensesAmt).append("] ");
buffer.append("itemsAmt=[").append(itemsAmt).append("] ");
buffer.append("logoFilename=[").append(logoFilename).append("] ");
buffer.append("activeYn=[").append(activeYn).append("] ");
return buffer.toString();
}
/**
*/
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = (int) (prime * result + ((invoiceId == null) ? 0 : invoiceId.hashCode()));
return result;
}
/**
*/
public boolean equals(Object obj) {
if (obj == this)
return true;
if (!(obj instanceof Invoice))
return false;
Invoice equalCheck = (Invoice) obj;
if ((invoiceId == null && equalCheck.invoiceId != null) || (invoiceId != null && equalCheck.invoiceId == null))
return false;
if (invoiceId != null && !invoiceId.equals(equalCheck.invoiceId))
return false;
return true;
}
}
|
[
"tweiland44@f4e38ad5-1730-4f14-932f-3db32ab8bd7f"
] |
tweiland44@f4e38ad5-1730-4f14-932f-3db32ab8bd7f
|
6db3bbee7ce26a0e8a9efad142e4622de72bff4c
|
10597b0787ab210e05ceec678e61a98bd9ff27fb
|
/src/test/java/bowling/FrameTest.java
|
3d902388a35fae2201c1a7c82ba71c4cf76647f5
|
[] |
no_license
|
dmayo3/Bowling-Game-Kata
|
b6b3acca4b9ea9ac43b8c0c19ab5fffaf1cd84ad
|
63eabef9188d177bb3484e731c45a8a747e19ed6
|
refs/heads/master
| 2016-09-06T06:53:40.064652
| 2012-07-31T09:59:58
| 2012-07-31T09:59:58
| 5,244,165
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,745
|
java
|
package bowling;
import static com.google.common.collect.Lists.newArrayList;
import static java.util.Collections.singletonList;
import static org.mockito.BDDMockito.given;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyInt;
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.atLeastOnce;
import static org.mockito.Mockito.inOrder;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.verify;
import org.junit.Test;
import org.mockito.InOrder;
import bowling.ui.ScoreCollector;
public class FrameTest {
public static final int STRIKE = 10;
private final Player player1 = new Player("John");
private final Player player2 = new Player("Laura");
private final ScoreCollector scoreCollector = mock(ScoreCollector.class);
@Test
public void announcesBeginningOfEachPlayersTurnBeforeRecordingScores() {
// given
final Frame frame = new Frame(1, newArrayList(player1, player2), scoreCollector);
// when
frame.play();
// then
InOrder inOrder = inOrder(scoreCollector);
inOrder.verify(scoreCollector).announcePlayersTurn(player1);
inOrder.verify(scoreCollector, atLeastOnce()).takeScore(any(Frame.class), eq(player1), any(Ball.class));
inOrder.verify(scoreCollector).announcePlayersTurn(player2);
inOrder.verify(scoreCollector, atLeastOnce()).takeScore(any(Frame.class), eq(player2), any(Ball.class));
}
@Test
public void scoresAreCollectedWhenPlayerBowlsTwoBalls() {
// given
final Frame frame = new Frame(1, singletonList(player1), scoreCollector);
// when
frame.play();
// then
InOrder inOrder = inOrder(scoreCollector);
inOrder.verify(scoreCollector).takeScore(eq(frame), eq(player1), eq(Ball.ONE));
inOrder.verify(scoreCollector).takeScore(eq(frame), eq(player1), eq(Ball.TWO), anyInt());
}
@Test
public void notifiesScoreCollectorOfTheRemainingBowlingPins() {
// given
final Frame frame = new Frame(1, singletonList(player1), scoreCollector);
given(scoreCollector.takeScore(any(Frame.class), any(Player.class), any(Ball.class)))
.willReturn(6);
// when
frame.play();
// then
int remainingPins = 4;
InOrder inOrder = inOrder(scoreCollector);
inOrder.verify(scoreCollector).takeScore(any(Frame.class), any(Player.class), eq(Ball.ONE));
inOrder.verify(scoreCollector).takeScore(any(Frame.class), any(Player.class), eq(Ball.TWO), eq(remainingPins));
}
@Test
public void onlyOneBallIsThrownWhenPlayerGetsAStrikeOnTheFirstBall() {
// given
final Frame frame = new Frame(1, singletonList(player1), scoreCollector);
given(scoreCollector.takeScore(any(Frame.class), any(Player.class), any(Ball.class)))
.willReturn(STRIKE);
// when
frame.play();
// then
verify(scoreCollector).takeScore(eq(frame), eq(player1), eq(Ball.ONE));
verify(scoreCollector, never()).takeScore(eq(frame), eq(player1), eq(Ball.TWO));
}
@Test
public void threeBallsArePlayedInTheFinalFrameIfPlayerGetsAStrike() {
// given
final Frame finalFrame = new FinalFrame(singletonList(player1), scoreCollector);
given(scoreCollector.takeScore(any(Frame.class), any(Player.class), eq(Ball.ONE)))
.willReturn(STRIKE);
given(scoreCollector.takeScore(any(Frame.class), any(Player.class), eq(Ball.TWO)))
.willReturn(3);
given(scoreCollector.takeScore(any(Frame.class), any(Player.class), eq(Ball.THREE), anyInt()))
.willReturn(2);
// when
finalFrame.play();
// then
verify(scoreCollector).takeScore(eq(finalFrame), eq(player1), eq(Ball.ONE));
verify(scoreCollector).takeScore(eq(finalFrame), eq(player1), eq(Ball.TWO));
verify(scoreCollector).takeScore(eq(finalFrame), eq(player1), eq(Ball.THREE), eq(7));
}
@Test
public void threeBallsArePlayedInTheFinalFrameIfPlayerGetsThreeStrikes() {
// given
final Frame finalFrame = new FinalFrame(singletonList(player1), scoreCollector);
given(scoreCollector.takeScore(any(Frame.class), any(Player.class), any(Ball.class)))
.willReturn(STRIKE);
// when
finalFrame.play();
// then
verify(scoreCollector).takeScore(eq(finalFrame), eq(player1), eq(Ball.ONE));
verify(scoreCollector).takeScore(eq(finalFrame), eq(player1), eq(Ball.TWO));
verify(scoreCollector).takeScore(eq(finalFrame), eq(player1), eq(Ball.THREE));
}
@Test
public void threeBallsArePlayedInTheFinalFrameIfPlayerGetsASpare() {
// given
final Frame finalFrame = new FinalFrame(singletonList(player1), scoreCollector);
given(scoreCollector.takeScore(any(Frame.class), any(Player.class), eq(Ball.ONE)))
.willReturn(7);
given(scoreCollector.takeScore(any(Frame.class), any(Player.class), eq(Ball.TWO), anyInt()))
.willReturn(3);
// when
finalFrame.play();
// then
verify(scoreCollector).takeScore(eq(finalFrame), eq(player1), eq(Ball.ONE));
verify(scoreCollector).takeScore(eq(finalFrame), eq(player1), eq(Ball.TWO), eq(3));
verify(scoreCollector).takeScore(eq(finalFrame), eq(player1), eq(Ball.THREE));
}
}
|
[
"dmayo3@gmail.com"
] |
dmayo3@gmail.com
|
3d5465a6983c025e5eaa0216ab657392bd1a7851
|
44f2d0f5f2511148c59f0105b8b18e5dddfa00f7
|
/ESEO_API_REST/src/main/java/com/controller/TestController.java
|
6bfdd9cfe89688596fb04f9fa54a83672be9b86a
|
[] |
no_license
|
julienblt/ESEO_TWIC
|
4e58ff0235c4855cb21199ed82cca39f20acc06b
|
c8c972481cb57921efd5281cb3408d5b27732868
|
refs/heads/master
| 2020-05-02T06:10:53.938280
| 2019-04-30T20:49:47
| 2019-04-30T20:49:47
| 177,788,863
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,973
|
java
|
package com.controller;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import com.dao.VilleFranceDAO;
import com.dlo.VilleFranceDLO;
@RestController
//@RequestMapping("/path")
public class TestController {
@RequestMapping(value="/test", method=RequestMethod.GET)
@ResponseBody
public String test(@RequestParam(required=false, value="value")String value) {
System.out.println("Appel GET");
System.out.println("value : "+value);
return value;
}
@RequestMapping(value="/listeVilles", method=RequestMethod.GET)
@ResponseBody
public List<VilleFranceDLO> listerVilles() {
List<VilleFranceDLO> listeVilles = VilleFranceDAO.lister();
return listeVilles;
}
@RequestMapping(value="/ajouterVille", method=RequestMethod.POST)
@ResponseBody
public String ajouterVille(@RequestBody Map<String, String> villeDictInput) {
/*
{
"Code_commune_INSEE":"9",
"Nom_commune":"z",
"Code_postal":"z",
"Libelle_acheminement":"z",
"Ligne_5":"z",
"Latitude":"z",
"Longitude":"z"
}
*/
VilleFranceDLO ville = new VilleFranceDLO();
ville.villeDict = villeDictInput;
String result = VilleFranceDAO.ajouter(ville);
return result;
}
@RequestMapping(value="/trouverVille", method=RequestMethod.GET)
@ResponseBody
public List<VilleFranceDLO> trouverVille(@RequestParam(required=false, value="key")String key,
@RequestParam(required=false, value="value")String value) {
List<VilleFranceDLO> listeVilles = VilleFranceDAO.trouver(key, value);
return listeVilles;
}
@RequestMapping(value="/supprimerVille", method=RequestMethod.DELETE)
@ResponseBody
public String supprimerVille(@RequestParam(required=false, value="Code_commune_INSEE")String Code_commune_INSEE) {
String result = VilleFranceDAO.supprimer(Code_commune_INSEE);
return result;
}
@RequestMapping(value="/modifierVille", method=RequestMethod.PUT)
@ResponseBody
public String modifierVille(@RequestParam(required=false, value="Code_commune_INSEE")String Code_commune_INSEE,
@RequestParam(required=false, value="key")String key,
@RequestParam(required=false, value="value")String value) {
return VilleFranceDAO.modifier(Code_commune_INSEE, key, value);
}
@RequestMapping(value="/modifierVille2", method=RequestMethod.PUT)
@ResponseBody
public String modifierVille2(@RequestBody Map<String, String> villeDictInput) {
VilleFranceDLO ville = new VilleFranceDLO();
ville.villeDict = villeDictInput;
String result = VilleFranceDAO.modifier(ville);
return result;
}
}
|
[
"julien.blt314@gmail.com"
] |
julien.blt314@gmail.com
|
cae58018f7786bf88f4372b3cfb8fac9dad5c479
|
00b960f0f03b682ba0bb7773294963461ce2b48d
|
/benworks-dp-all/src/main/java/com/cbf4life/proxy/XiMenQing.java
|
18a0bafaa8624c62ba4fc6b17105e0bec357c4bf
|
[] |
no_license
|
aben328/benworks-dp
|
c9b9ff9868c792ed754ff494f9b0018c88346f2c
|
d1371011fb0b949346973c80a9255a3dcb77e20d
|
refs/heads/master
| 2020-04-25T07:28:12.047218
| 2015-10-24T02:18:29
| 2015-10-24T02:18:29
| 9,467,085
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,030
|
java
|
package com.cbf4life.proxy;
/**
* @author cbf4Life cbf4life@126.com I'm glad to share my knowledge with you all. 定义一个西门庆,这人色中饿鬼
*/
public class XiMenQing {
/* 水浒里是这样写的:西门庆被潘金莲用竹竿敲了一下难道,痴迷了, 被王婆看到了, 就开始撮合两人好事,王婆作为潘金莲的代理人 收了不少好处费,那我们假设一下: 如果没有王婆在中间牵线,这两个不要脸的能成吗?难说的很! */
public static void main(String[] args) {
// 把王婆叫出来
WangPo wangPo = new WangPo();
// 然后西门庆就说,我要和潘金莲happy,然后王婆就安排了西门庆丢筷子的那出戏:
wangPo.makeEyesWithMan(); // 看到没,虽然表面上时王婆在做,实际上爽的是潘金莲
wangPo.happyWithMan();
JiaShi jiaShi = new JiaShi();
wangPo = new WangPo(jiaShi); // 让王婆作为贾氏的代理人
wangPo.makeEyesWithMan();
wangPo.happyWithMan();
}
}
|
[
"aben328@gmail.com"
] |
aben328@gmail.com
|
d00da6ac27292a862e81142890f012a24f86bef1
|
6d3d7065ea6273a8c656817a4cc5edd1c91b17aa
|
/src/org/langke/data/imp/Recognize2.java
|
046444a62f26b969b17fdb38394ff6c3632cf39b
|
[] |
no_license
|
langke93/mylib
|
65a850f20aa09bf72a643137ea55d463c0c8c903
|
e26a12c1487f4ec6f8ffbbe32c0eba064a0091a8
|
refs/heads/master
| 2020-03-27T03:00:10.945514
| 2018-10-11T08:11:21
| 2018-10-11T08:11:21
| 145,832,641
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,174
|
java
|
package org.langke.data.imp;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import javax.imageio.ImageIO;
public class Recognize2 {
static String url = "http://passport.csdn.net/member/ShowExPwd.aspx";
static Filter filter;
public static void main(String[] args) throws Exception {
if (args.length >= 1) {
url = args[0];
}
String filterClazz = "org.langke.data.imp.CsdnFilter";
if (args.length >= 2) {
filterClazz = args[1];
}
filter = (Filter) Class.forName(filterClazz).newInstance();
int total = 10;
int count = 0;
for (int i = 0; i < total; i++) {
boolean b = recognize(i);
if (b)
count++;
}
System.out.println("rate:" + (count * 1.0 / total * 100) + "%100");
}
/**
* @throws IOException
*/
private static boolean recognize(int num) throws IOException {
BufferedImage bi = ImageIO.read(new URL(url));
ImageIO.write(bi,"png",new File(num+".png"));
ImageData ia2 = new ImageData(bi, filter);
ImageData[] ii = ia2.split();
ArrayList list = new ArrayList();
ImageData[] template = ImageData.decodeFromFile("template.data");
HashMap map = new HashMap();
for (int i = 0; i < template.length; i++) {
map.put(template[i], new Character(template[i].code));
}
for (int x = 0; x < ii.length; x++) {
ImageData imageArr = ii[x];
if (imageArr.w > 15)
continue;
Character c = (Character) map.get(imageArr);
if (c != null) {
list.add(c);
}
}
String s = "";
System.out.print(num + ":");
for (Iterator iter = list.iterator(); iter.hasNext();) {
Character c = (Character) iter.next();
s += c;
System.out.print(c);
}
System.out.println();
return s.length() != 0;
}
}
|
[
"langke93@163.com"
] |
langke93@163.com
|
7f9bb6e41b628ce47d3237e1c25b1cbc95bd952d
|
0f93568373307c0b89492cf40e884fc45340bd7d
|
/we-web-parent/web-linyun-airline/src/main/java/com/linyun/airline/admin/fillinpdf/form/FillPdfAddForm.java
|
14d09716f0283a465d1ee7a629b43d1b04bf330c
|
[] |
no_license
|
richardcjb/dubbo
|
4052a23e46ab2ad43b51412aeb63e707293f8f84
|
24dafc8d056f1bfd54334801b26de7f5b3a9e671
|
refs/heads/dubbo-dev
| 2021-01-20T03:29:23.085784
| 2017-04-28T07:27:20
| 2017-04-28T07:27:20
| 89,546,081
| 0
| 3
| null | 2017-04-28T07:27:20
| 2017-04-27T02:18:21
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 1,125
|
java
|
package com.linyun.airline.admin.fillinpdf.form;
/**
* TAirlinePolicyAddForm.java
* com.linyun.airline.forms
* Copyright (c) 2017, 北京科技有限公司版权所有.
*/
import java.io.File;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.uxuexi.core.web.form.AddForm;
/**
* TODO(这里用一句话描述这个类的作用)
* <p>
* TODO(这里描述这个类补充说明 – 可选)
*
* @author 孙斌
* @Date 2017年3月11日
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class FillPdfAddForm extends AddForm {
private String xing;
private String birthxing;
private String birthname;
private String birthtime;
private String birtharea;
private String birthcountry;
private String phoneurl;
private File fileName;
private String nowcountry;
private String vormundnameandaddress;
private String identitycard;
private String travelnum;
private String issuetime;
private String effectivetime;
private String issueoffice;
private String applicantaddressandemail;
private String phonenumber;
private String permitnumber;
private String effectivetimeofcountry;
}
|
[
"Richardcjb@163.com"
] |
Richardcjb@163.com
|
4deeffc59baa5470de1dd62433f33480d025b013
|
0a404f92b370ac31e79d944694f3c5931d5a5aa3
|
/src/main/java/br/aplicacao/eletrica/dao/ConnectionFactory.java
|
5c9ac767d4d5f0065ffe64ca679201277d2e555e
|
[] |
no_license
|
chrisprojetoseletricos/Eletrica7
|
e517f02abf59b3a01fa9aff52c56db6d2614ce03
|
4d1556caa6aa55d1279d1b5c969681bcfe82a65e
|
refs/heads/master
| 2020-04-01T02:25:09.245045
| 2018-10-15T17:02:37
| 2018-10-15T17:02:37
| 152,778,128
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,106
|
java
|
package br.aplicacao.eletrica.dao;
import java.sql.Connection;
import java.sql.SQLException;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
import org.hibernate.internal.SessionFactoryImpl;
import org.hibernate.jpa.internal.EntityManagerImpl;
public class ConnectionFactory {
private static final EntityManagerFactory FACTORY = Persistence.createEntityManagerFactory("EletricaPU");
private static final EntityManager entityManager = FACTORY.createEntityManager();
public static EntityManager getEntityManager() {
return entityManager;
}
public static Connection getConnection() {
try {
EntityManagerImpl factory = (EntityManagerImpl) entityManager;
SessionFactoryImpl sessionFactoryImpl = (SessionFactoryImpl) factory.getSession().getSessionFactory();
return sessionFactoryImpl.getConnectionProvider().getConnection();
} catch (SQLException e) {
System.out.println("Erro: "+ e.getMessage());
}
return null;
}
}
|
[
"chris@chris"
] |
chris@chris
|
af2235e7749e4917711adb357ee863bc7875ae85
|
031d1b465dd1493a0f0cff22978099e5e095f59f
|
/src/main/java/com/github/libsgh/tieba/model/WatermarkType.java
|
bd9ea1df693348640b96f50427cc66dbd91a3ea2
|
[
"MIT"
] |
permissive
|
tengfeilong/tieba-api
|
ce6178bad7357807bd7aedbf4c7776965b1fea76
|
e598716aa45327923076f1da27b46ab9d9806957
|
refs/heads/master
| 2023-01-22T13:00:09.026378
| 2020-11-21T03:25:12
| 2020-11-21T03:25:12
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 469
|
java
|
package com.github.libsgh.tieba.model;
public enum WatermarkType {
NO_WATERMARK (1039999), //无水印
TIEBA_WATERMARK (1039998), //贴吧水印
PERSONAL_WATERMARK (1030001), //我的水印,无须购买也可使用
DECADE_WATERMARK (1030002); //十年有我,无须购买也可使用
private int code;
private WatermarkType(int _code) {
this.code = _code;
}
public int getCode() {
return code;
}
}
|
[
"woiyyng@gmail.com"
] |
woiyyng@gmail.com
|
68360781e5a1328b15578b70c1b04039628c44b6
|
98a68ca4f8f624dd14b7acc5d3acd0f76ba7624b
|
/repoapi/src/main/java/gov/ua/olevsk/upszn/entity/Bank.java
|
5269936ea863c88a3cac7027cf914997279c0159
|
[] |
no_license
|
soroka-ihor/subsidii
|
c603405f2081e9257d9c052ac9ca00d81c172cea
|
e92c35ed9d9752b5b20e9a3b50611407a4011cfc
|
refs/heads/master
| 2022-07-15T14:53:18.506609
| 2020-04-30T10:16:07
| 2020-04-30T10:16:07
| 252,728,758
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,000
|
java
|
package gov.ua.olevsk.upszn.entity;
import javax.persistence.*;
import java.io.Serializable;
@Entity
@Table(name = "bank")
public class Bank implements Serializable {
@Id
@GeneratedValue
@Column(name = "id")
private int id;
@Column(name = "mfo")
private int mfo;
@Column(name = "edrpou")
private int edrpou;
@Column(name = "name")
private String name;
public Bank() {
}
public Bank(int mfo, int edrpou, String name) {
this.mfo = mfo;
this.edrpou = edrpou;
this.name = name;
}
public int getId() {
return id;
}
public int getMfo() {
return mfo;
}
public void setMfo(int mfo) {
this.mfo = mfo;
}
public int getEdrpou() {
return edrpou;
}
public void setEdrpou(int edrpou) {
this.edrpou = edrpou;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
|
[
"soroka.igor.olegovych@gmail.com"
] |
soroka.igor.olegovych@gmail.com
|
6bf1c7a943c8dd7b88ceffef5ad8ef6ea8b13a67
|
a33aac97878b2cb15677be26e308cbc46e2862d2
|
/data/libgdx/LocalRayResult_getHitFraction.java
|
5c99dd6a8a4c53a40996c5dabe5dc1dd9545cc19
|
[] |
no_license
|
GabeOchieng/ggnn.tensorflow
|
f5d7d0bca52258336fc12c9de6ae38223f28f786
|
7c62c0e8427bea6c8bec2cebf157b6f1ea70a213
|
refs/heads/master
| 2022-05-30T11:17:42.278048
| 2020-05-02T11:33:31
| 2020-05-02T11:33:31
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 106
|
java
|
public float getHitFraction() {
return CollisionJNI.LocalRayResult_hitFraction_get(swigCPtr, this);
}
|
[
"bdqnghi@gmail.com"
] |
bdqnghi@gmail.com
|
d85085964dca4fd5c48dc9634591c06eb608a83c
|
3c5c40e5f6cef9bf37a55c6d506ba130a0e2114f
|
/gatlin-core/src/main/java/org/gatlin/core/condition/HttpCondition.java
|
0e2269efc6120fa58082097aa69ffafd512b1775
|
[] |
no_license
|
723854867/gatlin
|
c9baf20bead5f0f431ede528b3927a984a9612d2
|
f7fdb191524db8ec72ad74998d253fb1010f82e9
|
refs/heads/master
| 2022-12-22T22:56:23.219346
| 2018-08-29T08:20:52
| 2018-08-29T08:20:52
| 127,830,582
| 0
| 1
| null | 2022-12-16T00:00:28
| 2018-04-03T00:59:12
|
Java
|
UTF-8
|
Java
| false
| false
| 296
|
java
|
package org.gatlin.core.condition;
import org.gatlin.core.CoreConsts;
public class HttpCondition extends GatlinCondition<Boolean> {
public HttpCondition() {
super(CoreConsts.HTTP_ENABLE);
}
@Override
protected boolean checkCondition(Boolean value) {
return value;
}
}
|
[
"723854867@qq.com"
] |
723854867@qq.com
|
8f1d46add8128fc1b401122487f89b8e35a372cf
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/apereo--cas/1c55f834d6692c23bcc9cb1e9ccec9c2bd51de63/before/OAuthCode.java
|
f6f52d5552c84ca973bf00cb10ef6d61cc13b854
|
[] |
no_license
|
fracz/refactor-extractor
|
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
|
dd5e82bfcc376e74a99e18c2bf54c95676914272
|
refs/heads/master
| 2021-01-19T06:50:08.211003
| 2018-11-30T13:00:57
| 2018-11-30T13:00:57
| 87,353,478
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 351
|
java
|
package org.jasig.cas.support.oauth.ticket.code;
import org.jasig.cas.ticket.ServiceTicket;
/**
* An OAuth code (is like a service ticket without PGT grant capability).
*
* @author Jerome Leleu
* @since 4.3.0
*/
public interface OAuthCode extends ServiceTicket {
/**
* The prefix for OAuth codes.
*/
String PREFIX = "COD";
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
4a1f79e00ce07b3462dd2800d74ce2822fd5dfa4
|
cafcb04eb7d163748c5b97840e3cf716e41e3a3d
|
/app/src/main/java/com/tsiro/dogvip/POJO/UserAccount.java
|
5bf9ca8d0fe91c4f834f1cb6bc56481aaec9cbee
|
[] |
no_license
|
tsironis13/DogVip
|
0d9f9c1d2bab362c5cec968b65bc5dbb91e5b451
|
d81888a39523a4de2861cc9b0e0472e1bb445cb6
|
refs/heads/master
| 2021-01-23T01:21:03.735754
| 2017-11-03T17:55:44
| 2017-11-03T17:55:44
| 92,866,196
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 417
|
java
|
package com.tsiro.dogvip.POJO;
/**
* Created by giannis on 21/6/2017.
*/
public class UserAccount {
private String mtoken, email;
public String getToken() {
return mtoken;
}
public void setToken(String mtoken) {
this.mtoken = mtoken;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
}
|
[
"gtsironis8@gmail.com"
] |
gtsironis8@gmail.com
|
70e5a0098ad9ff2b52a11c75eddd2ee8826c9001
|
f09f9048192b47e5ec927a48ad5b132f1ebadbc0
|
/src/java/xrank/ms/scoring/results/PurificationParamsBasic.java
|
36a4032af84fba4e95675dcec83ca2e1f2c260c7
|
[] |
no_license
|
rmylonas/XRank
|
85f21617401d2c558c314c51a05443d18a4cca2b
|
ee96ee3298cc6523257e1c57ec6b71fcb60ae4ab
|
refs/heads/master
| 2021-01-23T11:49:57.824796
| 2013-10-21T21:29:29
| 2013-10-21T21:29:29
| 13,755,644
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 487
|
java
|
package xrank.ms.scoring.results;
/**
* The parameters used by
*
* @author roman
*
*/
public class PurificationParamsBasic extends PurificationParams {
private Double pValueThreshold = null;
private Integer id;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Double getpValueThreshold() {
return pValueThreshold;
}
public void setpValueThreshold(Double valueThreshold) {
pValueThreshold = valueThreshold;
}
}
|
[
"romanoman@gmail.com"
] |
romanoman@gmail.com
|
f2cf244a463f9cfb0d48848a487bffb9495d0118
|
608b8cd1b822b95e152123f4bc85d804a41528d3
|
/SM.jegm.Biblioteca/src/sm/jegm/iu/LienzoImagen2D.java
|
741ad92b9ae8df435b89db0f3a95df12e8b9a567
|
[] |
no_license
|
juane619/multimediaapp
|
beb1069c2b2b55f8dc1a4641c74b4662dc616dd9
|
74888628eaad31cdcacd6f161723d16860b47fbf
|
refs/heads/master
| 2022-11-19T09:33:02.173827
| 2020-07-03T12:24:54
| 2020-07-03T12:24:54
| 276,892,391
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,784
|
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 sm.jegm.iu;
import java.awt.BasicStroke;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Rectangle;
import java.awt.Stroke;
import java.awt.image.BufferedImage;
/**
* Clase que representa un lienzo en el que dibujar con la posibilidad de añadir una imagen.
*
* @author juane
*/
public class LienzoImagen2D extends Lienzo2D {
private BufferedImage panelImage;
private int currentBrigthnessLevel = 0;
@Override
public void paintComponent(Graphics g) {
super.paintComponent(g);
if (panelImage != null) {
g.drawImage(panelImage, 0, 0, this);
}
if (this.clip != null) {
this.setBorderClip((Graphics2D) g);
}
}
/**
* Paint a dotted border around the image zone
*/
private void setBorderClip(Graphics2D g2d) {
Stroke stroke = g2d.getStroke();
float[] patt = new float[]{
2.0f, 2.0f
};
BasicStroke dottedStroke = new BasicStroke(1.5f, 0, 2, 1.0f, patt, 0.0f);
g2d.setStroke(dottedStroke);
g2d.draw(this.clip);
g2d.setStroke(stroke);
}
/* GETTERS AND SETTERS */
public int getCurrentBrigthnessLevel() {
return currentBrigthnessLevel;
}
public void setCurrentBrigthnessLevel(int currentBrigthnessLevel) {
this.currentBrigthnessLevel = currentBrigthnessLevel;
}
public BufferedImage getPanelImage(boolean drawVector) {
if (drawVector && panelImage != null) {
BufferedImage fullImage;
if (panelImage.getType() == BufferedImage.TYPE_CUSTOM) {
fullImage = new BufferedImage(panelImage.getWidth(), panelImage.getHeight(), BufferedImage.TYPE_4BYTE_ABGR);
} else {
fullImage = new BufferedImage(panelImage.getWidth(), panelImage.getHeight(), this.panelImage.getType());
}
Graphics2D g2d = (Graphics2D) fullImage.getGraphics();
//setAttributes(g2d);
g2d.drawImage(panelImage, null, null);
paintShapeVector(g2d);
return fullImage;
} else {
return panelImage;
}
}
public void setPanelImage(BufferedImage panelImage) {
this.panelImage = panelImage;
if (panelImage != null) {
setPreferredSize(new Dimension(panelImage.getWidth(), panelImage.getHeight()));
this.setClip(new Rectangle(0, 0, panelImage.getWidth(), panelImage.getHeight()));
}
}
/* END GETTERS AND SETTERS */
}
|
[
"juane_619@hotmail.com"
] |
juane_619@hotmail.com
|
f1e019b6aee29ff6e63d910e27b46bac255b7f11
|
bdb5a8b5bc838c12936dfc4ec851a91b14612a50
|
/src/test/java/org/example/K7/MaxDif/MaxDiffTest.java
|
b2ba473623a4560592d2e68efa8d90261d5a91f0
|
[] |
no_license
|
MarcinKrzciuk/CodeWars
|
b92506b7aca4a067d5abc3e8fc3b8d140717d059
|
a84be6e98845738d80b1ec9db7c68c335f0e43cb
|
refs/heads/master
| 2023-07-28T18:22:38.445057
| 2021-09-14T09:30:52
| 2021-09-14T09:30:52
| 358,129,759
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 592
|
java
|
package org.example.K7.MaxDif;
import org.junit.Test;
import static org.junit.Assert.*;
public class MaxDiffTest {
@Test
public void BasicTests() {
assertEquals("only positives", 4, Kata.maxDiff(new int[]{ 1, 2, 3, 4, 5, 5, 4 }));
assertEquals("only negatives", 30, Kata.maxDiff(new int[]{ -4, -5, -3, -1, -31 }));
assertEquals("positives and negatives", 10, Kata.maxDiff(new int[]{ 1, 2, 3, 4, -5, 5, 4 }));
assertEquals("single element", 0, Kata.maxDiff(new int[]{ 1000000 }));
assertEquals("empty", 0, Kata.maxDiff(new int[]{}));
}
}
|
[
"67062802+MarcinKrzciuk@users.noreply.github.com"
] |
67062802+MarcinKrzciuk@users.noreply.github.com
|
21a4f08188cd9de140ec56ff2bb1908f7e336b4b
|
b8f4e0756681daab91a7f9341318d288f7dc05cd
|
/src/castle/controllers/CastleMouseListener.java
|
433c90d3891c74aba2c5c8c1fcbc28790fbdaff7
|
[] |
no_license
|
ddcaeste/Castle
|
6ee9852d6f78a7b89d5748716ffa9987c60c4d37
|
9dcc9c8377635776d382ba359d02b855d1d17d3b
|
refs/heads/master
| 2021-01-18T15:22:21.440225
| 2011-09-14T22:12:59
| 2011-09-14T22:12:59
| 2,379,894
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,100
|
java
|
package castle.controllers;
import castle.models.CastleModel;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;
/**
*
* @author Dieter Decaestecker
*/
public class CastleMouseListener implements MouseListener, MouseMotionListener
{
private CastleModel castleModel;
public CastleMouseListener(CastleModel castleModel)
{
this.castleModel = castleModel;
}
@Override
public void mouseClicked(MouseEvent e) { castleModel.mouseClicked(e); }
@Override
public void mousePressed(MouseEvent e) { castleModel.mousePressed(e); }
@Override
public void mouseReleased(MouseEvent e){ castleModel.mouseReleased(e); }
@Override
public void mouseEntered(MouseEvent e) { castleModel.mouseEntered(e); }
@Override
public void mouseExited(MouseEvent e) { castleModel.mouseExited(e); }
@Override
public void mouseDragged(MouseEvent e) { castleModel.mouseDragged(e); }
@Override
public void mouseMoved(MouseEvent e) { castleModel.mouseMoved(e); }
}
|
[
"rancga@hotmail.com"
] |
rancga@hotmail.com
|
9b5b5292d4cd062bb9996dd6dae382b0d0f6f069
|
0eb8baaf31e0234e2a4c3dab86a97c3fb6acf688
|
/SnapNSplit/app/src/main/java/com/example/sony/snapnsplit/Service_Trail.java
|
6560211e13bc06913a594eba2658cf2ca1baf939
|
[] |
no_license
|
Yamini25/SnapNSplit
|
c2f045699aea0935e741419021e971fd27f4cd50
|
deea4090f96b8d90be475a6dc0dee3860c9b4336
|
refs/heads/master
| 2021-01-10T14:34:51.964502
| 2016-03-12T11:09:35
| 2016-03-12T11:09:35
| 53,736,141
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,653
|
java
|
package com.example.sony.snapnsplit;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.AsyncTask;
import android.os.Handler;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.Toast;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.params.BasicHttpParams;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Timer;
import java.util.TimerTask;
public class Service_Trail extends AppCompatActivity {
String myJSON;
static String amt="Please snap the bill first";
public static SharedPreferences sharedpreferences;
public static final String MyPREFERENCES = "MyPrefs";
private static final String TAG_RESULTS="result";
private static final String TAG_PHONENO = "PhoneNo";
private static final String TAG_NAME = "Name";
private static final String TAG_IFSC ="IFSC";
private static final String TAG_ACCNO ="AccountNumber";
private static final String TAG_EMAIL ="Email";
private static final String TAG_PASSWORD1 ="Password";
JSONArray peoples = null;
ArrayList<HashMap<String, String>> personList;
SessionManagement session;
String username="";
int i=0;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_service__trail);
Intent intent = getIntent();
username = intent.getStringExtra(ActivityLogin.USER_NAME);
getData();
final int count = 100; //Declare as inatance variable
Timer timer = new Timer();
timer.schedule(new TimerTask() {
@Override
public void run() {
runOnUiThread(new Runnable() {
@Override
public void run() {
i++;
peoples = null;
getData();
final Toast toast = Toast.makeText(
getApplicationContext(),""+i,
Toast.LENGTH_SHORT);
//toast.show();
Handler handler = new Handler();
handler.postDelayed(new Runnable() {
@Override
public void run() {
toast.cancel();
}
}, 5000);
}
});
}
}, 0, 5000);
}
public void getData(){
class GetDataJSON extends AsyncTask<String, Void, String> {
@Override
protected String doInBackground(String... params) {
DefaultHttpClient httpclient = new DefaultHttpClient(new BasicHttpParams());
HttpPost httppost = new HttpPost("http://snapnsplit.esy.es/getAllData.php");
// Depends on your web service
httppost.setHeader("Content-type", "application/json");
InputStream inputStream = null;
String result = null;
try {
HttpResponse response = httpclient.execute(httppost);
HttpEntity entity = response.getEntity();
inputStream = entity.getContent();
// json is UTF-8 by default
BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream, "UTF-8"), 8);
StringBuilder sb = new StringBuilder();
String line = null;
while ((line = reader.readLine()) != null)
{
sb.append(line + "\n");
}
result = sb.toString();
} catch (Exception e) {
// Oops
}
finally {
try{if(inputStream != null)inputStream.close();}catch(Exception squish){}
}
return result;
}
@Override
protected void onPostExecute(String result){
myJSON=result;
showList();
}
}
GetDataJSON g = new GetDataJSON();
g.execute();
}
protected void showList(){
try {
JSONObject jsonObj = new JSONObject(myJSON);
peoples = jsonObj.getJSONArray(TAG_RESULTS);
int f=0;
for(int i=0;i<peoples.length();i++){
JSONObject c = peoples.getJSONObject(i);
String email = c.getString(TAG_EMAIL);
// Toast.makeText(getApplicationContext(),"showlist"+email+" "+i,Toast.LENGTH_SHORT).show();
if(email.equals(username))
{
f=i;
}
}
JSONObject c1 = peoples.getJSONObject(f);
String phone = c1.getString(TAG_PHONENO);
if(!(Snap_Split.p.equals(c1.getString(TAG_PHONENO))))
{
Toast.makeText(this,"Changed",Toast.LENGTH_SHORT).show();
Snap_Split.p=c1.getString(TAG_PHONENO);
}
else
{
Toast.makeText(this,"Not Changed",Toast.LENGTH_SHORT).show();
}
} catch (JSONException e) {
e.printStackTrace();
}
}
}
|
[
"yaminigarikipati25@gmail.com"
] |
yaminigarikipati25@gmail.com
|
98cb021493d47c7a0e1c8b071d156c99e6fde49c
|
8b9b3e552b955fef442fcdbc06c31e4279286e57
|
/src/GammaJoins/gammaSupport/gammaSupport/Tuple.java
|
9719c1727dd0b0805fa93036090b5f0d72a5cadc
|
[] |
no_license
|
beijingliuyang/GammaJoins
|
300e40a6245369ca73305cd57dcdb83054f61f8b
|
efbf84079792caa3676a4c70d4240e3fa720d02f
|
refs/heads/master
| 2021-01-10T13:23:17.404685
| 2015-12-20T17:11:10
| 2015-12-20T17:11:10
| 48,329,874
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,607
|
java
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package gammaSupport;
import java.util.*;
/**
*
* @author dsb
*/
public class Tuple {
// serialized tuples have their fields separated by this character
private static String separator="#";
// a tuple is an array[size] of Strings
private String[] field;
private int size;
public Tuple(int size) {
field = new String[size];
this.size = size;
}
// field getters and setters
public void set(int fieldNumber, String value ) { field[fieldNumber] = value; }
public String get(int fieldNumber) { return field[fieldNumber]; }
public int getSize() { return size; }
public String[] getFields() { return field; }
// this method serializes a tuple into a string
// note that the tuple begins with its size (in fields)
@Override
public String toString() {
String result = size + separator;
for (String i : field) result = result + i + separator;
return result;
}
// this constructor unserializes a string into a tuple
static public Tuple makeTupleFromFileData(Relation r, String line) {
StringTokenizer st = new StringTokenizer(line);
int size = r.getSize();
Tuple t = new Tuple(size);
int fieldNumber = 0;
while (st.hasMoreTokens())
t.set(fieldNumber++, st.nextToken());
return t;
}
// this constructor unserializes a string into a tuple
static public Tuple makeTupleFromPipeData(String line) {
StringTokenizer st = new StringTokenizer(line, separator, false);
int size = Integer.parseInt(st.nextToken());
Tuple t = new Tuple(size);
int fieldNumber = 0;
while (st.hasMoreTokens())
t.set(fieldNumber++, st.nextToken());
return t;
}
public void println(Relation r) {
String[] fieldNames = r.getFieldNames();
for (int i=0; i<size; i++) {
System.out.println(fieldNames[i] + " = " + field[i]);
}
System.out.println();
}
public static Tuple join( Tuple t1, Tuple t2, int joinkey1, int joinkey2 ) {
Tuple t = new Tuple(t1.getSize() + t2.getSize()-1);
int fieldNumber = 0;
for (String f1 : t1.getFields()) t.set(fieldNumber++, f1);
for (int i=0; i<t2.getSize();i++){
if (i!=joinkey2) {t.set(fieldNumber++, t2.get(i));}
}
// for (String f2 : t2.getFields()) if (!t2.field[joinkey2].equals(f2)) t.set(fieldNumber++, f2);
return t;
}
}
|
[
"so@so-PC"
] |
so@so-PC
|
be42e628929f49e8842bc54a8d246560fff6583f
|
59650abb27b4a16f9b43982b7f98949f4db636d5
|
/src/java/Kino/Aktualnosc.java
|
2e6990b876fce40807dd2f19f91e970c81b4fa30
|
[] |
no_license
|
ArekerA/Kino
|
d34140c2a9408909070baffb6861e26e35ea5f4d
|
3b7d136ccfd4ec51c125be53a540e5a2ce9ff2da
|
refs/heads/master
| 2020-03-10T14:51:20.176838
| 2019-02-21T16:37:39
| 2019-02-21T16:37:39
| 129,436,649
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,307
|
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 Kino;
/**
*
* @author Arekl
*/
public class Aktualnosc {
private int id;
private String data;
private String img;
private String tytul;
private String tekst;
public Aktualnosc(int id, String data, String img, String tytul, String tekst) {
this.id = id;
this.data = data;
this.img = img;
this.tytul = tytul;
this.tekst = tekst;
}
public int getId() {
return id;
}
public String getData() {
return data;
}
public String getImg() {
return img;
}
public String getTytul() {
return tytul;
}
public String getTekst() {
return tekst;
}
public void setId(int id) {
this.id = id;
}
public void setData(String data) {
this.data = data;
}
public void setImg(String img) {
this.img = img;
}
public void setTytul(String tytul) {
this.tytul = tytul;
}
public void setTekst(String tekst) {
this.tekst = tekst;
}
}
|
[
"Arek.ludwikowski@hotmail.com"
] |
Arek.ludwikowski@hotmail.com
|
93c9f305fcc48e69d0387151c089616bff511002
|
3927772253fa3e8f5a1797dcb57042f9eea94767
|
/Java/task3104/Solution.java
|
48138aec3f5a514f0d2182f2d3bc01302b366ccb
|
[] |
no_license
|
black3snake/MaxoPolo
|
281005fd0051185568fec45e123f98dbcd94273a
|
42d41ebece8215e9d8e61f98d3171ee810d8e26a
|
refs/heads/master
| 2023-06-24T12:43:51.137395
| 2023-06-07T08:45:19
| 2023-06-07T08:45:19
| 229,185,319
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,720
|
java
|
package com.javarush.task.task31.task3104;
import java.io.IOException;
import java.nio.file.*;
import java.nio.file.attribute.BasicFileAttributes;
import java.util.ArrayList;
import java.util.EnumSet;
import java.util.List;
/*
Поиск скрытых файлов
*/
public class Solution extends SimpleFileVisitor<Path> {
public static void main(String[] args) throws IOException {
EnumSet<FileVisitOption> options = EnumSet.of(FileVisitOption.FOLLOW_LINKS);
final Solution solution = new Solution();
Files.walkFileTree(Paths.get("f:/1"), options, 20, solution);
List<String> result = solution.getArchived();
System.out.println("All archived files:");
for (String path : result) {
System.out.println("\t" + path);
}
List<String> failed = solution.getFailed();
System.out.println("All failed files:");
for (String path : failed) {
System.out.println("\t" + path);
}
}
@Override
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
if (file.toString().endsWith(".rar") || file.toString().endsWith(".zip"))
archived.add(file.toString());
return FileVisitResult.CONTINUE;
}
@Override
public FileVisitResult visitFileFailed(Path file, IOException exc) throws IOException {
failed.add(file.toString());
return FileVisitResult.SKIP_SUBTREE;
}
private List<String> archived = new ArrayList<>();
private List<String> failed = new ArrayList<>();
public List<String> getArchived() {
return archived;
}
public List<String> getFailed() {
return failed;
}
}
|
[
"puhov.mv@rgufk.ru"
] |
puhov.mv@rgufk.ru
|
a31c5b91016de87a68d00e30e26d6ecf4d1d808b
|
308d55898c891bf8702b537b125378b8885e289b
|
/geode-core/src/main/java/org/apache/geode/internal/config/VersionAdapter.java
|
15fd53ccbd242d2217708debe6aa012dc855a0aa
|
[
"BSD-3-Clause",
"MIT",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause",
"LicenseRef-scancode-unknown"
] |
permissive
|
apache/geode
|
6913469dd6c8805a4a7c9ad606efb99fe831a646
|
e4e0aee30c14cff039d39a7dc79c1263aa1bef22
|
refs/heads/develop
| 2023-09-03T23:56:44.728138
| 2023-07-13T10:16:12
| 2023-07-13T10:16:12
| 34,839,383
| 1,646
| 582
|
Apache-2.0
| 2023-08-19T01:03:46
| 2015-04-30T07:00:05
|
Java
|
UTF-8
|
Java
| false
| false
| 1,129
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license
* agreements. See the NOTICE file distributed with this work for additional information regarding
* copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
* "License"); you may 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 org.apache.geode.internal.config;
import javax.xml.bind.annotation.adapters.XmlAdapter;
public class VersionAdapter extends XmlAdapter<String, String> {
@Override
public String unmarshal(String v) throws Exception {
return "1.0";
}
@Override
public String marshal(String v) throws Exception {
return v;
}
}
|
[
"noreply@github.com"
] |
apache.noreply@github.com
|
e6ecdc9c81e820a5ff5809488911d76efa693257
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/2/2_1c41f83305817e14c9a9d2af2458ab24aaecc90c/PlayerInjector/2_1c41f83305817e14c9a9d2af2458ab24aaecc90c_PlayerInjector_s.java
|
5f7b7c7b5fecbb44e3592e19325cd7dc595d9fe8
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 9,385
|
java
|
/*
* ProtocolLib - Bukkit server library that allows access to the Minecraft protocol.
* Copyright (C) 2012 Kristian S. Stangeland
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later 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
*/
package com.comphenix.protocol.injector;
import java.io.DataInputStream;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Set;
import net.minecraft.server.EntityPlayer;
import net.minecraft.server.Packet;
import org.bukkit.craftbukkit.entity.CraftPlayer;
import org.bukkit.entity.Player;
import com.comphenix.protocol.events.PacketContainer;
import com.comphenix.protocol.events.PacketEvent;
import com.comphenix.protocol.events.PacketListener;
import com.comphenix.protocol.reflect.FieldUtils;
import com.comphenix.protocol.reflect.FuzzyReflection;
import com.comphenix.protocol.reflect.StructureModifier;
import com.comphenix.protocol.reflect.VolatileField;
abstract class PlayerInjector {
// Cache previously retrieved fields
protected static Field serverHandlerField;
protected static Field networkManagerField;
protected static Field inputField;
protected static Field netHandlerField;
// To add our injected array lists
protected static StructureModifier<Object> networkModifier;
// And methods
protected static Method queueMethod;
protected static Method processMethod;
protected Player player;
protected boolean hasInitialized;
// Reference to the player's network manager
protected VolatileField networkManagerRef;
protected VolatileField serverHandlerRef;
protected Object networkManager;
// Current net handler
protected Object serverHandler;
protected Object netHandler;
// The packet manager and filters
protected PacketFilterManager manager;
protected Set<Integer> sendingFilters;
// Previous data input
protected DataInputStream cachedInput;
public PlayerInjector(Player player, PacketFilterManager manager, Set<Integer> sendingFilters) throws IllegalAccessException {
this.player = player;
this.manager = manager;
this.sendingFilters = sendingFilters;
initialize();
}
/**
* Retrieve the notch (NMS) entity player object.
* @return Notch player object.
*/
protected EntityPlayer getEntityPlayer() {
CraftPlayer craft = (CraftPlayer) player;
return craft.getHandle();
}
protected void initialize() throws IllegalAccessException {
EntityPlayer notchEntity = getEntityPlayer();
if (!hasInitialized) {
// Do this first, in case we encounter an exception
hasInitialized = true;
// Retrieve the server handler
if (serverHandlerField == null)
serverHandlerField = FuzzyReflection.fromObject(notchEntity).getFieldByType(".*NetServerHandler");
serverHandlerRef = new VolatileField(serverHandlerField, notchEntity);
serverHandler = serverHandlerRef.getValue();
// Next, get the network manager
if (networkManagerField == null)
networkManagerField = FuzzyReflection.fromObject(serverHandler).getFieldByType(".*NetworkManager");
networkManagerRef = new VolatileField(networkManagerField, serverHandler);
networkManager = networkManagerRef.getValue();
// Create the network manager modifier from the actual object type
if (networkManager != null && networkModifier == null)
networkModifier = new StructureModifier<Object>(networkManager.getClass(), null, false);
// And the queue method
if (queueMethod == null)
queueMethod = FuzzyReflection.fromClass(networkManagerField.getType()).
getMethodByParameters("queue", Packet.class );
// And the data input stream that we'll use to identify a player
if (inputField == null)
inputField = FuzzyReflection.fromObject(networkManager, true).
getFieldByType("java\\.io\\.DataInputStream");
}
}
/**
* Retrieves the current net handler for this player.
* @return Current net handler.
* @throws IllegalAccessException Unable to find or retrieve net handler.
*/
protected Object getNetHandler() throws IllegalAccessException {
// What a mess
try {
if (netHandlerField == null)
netHandlerField = FuzzyReflection.fromClass(networkManager.getClass(), true).
getFieldByType("net\\.minecraft\\.NetHandler");
} catch (RuntimeException e1) {
// Swallow it
}
// Second attempt
if (netHandlerField == null) {
try {
// Well, that sucks. Try just Minecraft objects then.
netHandlerField = FuzzyReflection.fromClass(networkManager.getClass(), true).
getFieldByType(FuzzyReflection.MINECRAFT_OBJECT);
} catch (RuntimeException e2) {
throw new IllegalAccessException("Cannot locate net handler. " + e2.getMessage());
}
}
// Get the handler
if (netHandler == null)
netHandler = FieldUtils.readField(netHandlerField, networkManager, true);
return netHandler;
}
/**
* Processes the given packet as if it was transmitted by the current player.
* @param packet - packet to process.
* @throws IllegalAccessException If the reflection machinery failed.
* @throws InvocationTargetException If the underlying method caused an error.
*/
public void processPacket(Packet packet) throws IllegalAccessException, InvocationTargetException {
Object netHandler = getNetHandler();
// Get the process method
if (processMethod == null) {
try {
processMethod = FuzzyReflection.fromClass(Packet.class).
getMethodByParameters("processPacket", netHandlerField.getType());
} catch (RuntimeException e) {
throw new IllegalArgumentException("Cannot locate process packet method: " + e.getMessage());
}
}
// We're ready
try {
processMethod.invoke(packet, netHandler);
} catch (IllegalArgumentException e) {
throw new IllegalArgumentException("Method " + processMethod.getName() + " is not compatible.");
} catch (InvocationTargetException e) {
throw e;
}
}
/**
* Send a packet to the client.
* @param packet - server packet to send.
* @param filtered - whether or not the packet will be filtered by our listeners.
* @param InvocationTargetException If an error occured when sending the packet.
*/
public abstract void sendServerPacket(Packet packet, boolean filtered) throws InvocationTargetException;
/**
* Inject a hook to catch packets sent to the current player.
*/
public abstract void injectManager();
/**
* Remove all hooks and modifications.
*/
public abstract void cleanupAll();
/**
* Invoked before a new listener is registered.
* <p>
* The player injector should throw an exception if this listener cannot be properly supplied with packet events.
* @param listener - the listener that is about to be registered.
*/
public abstract void checkListener(PacketListener listener);
/**
* Allows a packet to be recieved by the listeners.
* @param packet - packet to recieve.
* @return The given packet, or the packet replaced by the listeners.
*/
Packet handlePacketRecieved(Packet packet) {
// Get the packet ID too
Integer id = MinecraftRegistry.getPacketToID().get(packet.getClass());
// Make sure we're listening
if (sendingFilters.contains(id)) {
// A packet has been sent guys!
PacketContainer container = new PacketContainer(id, packet);
PacketEvent event = PacketEvent.fromServer(manager, container, player);
manager.invokePacketSending(event);
// Cancelling is pretty simple. Just ignore the packet.
if (event.isCancelled())
return null;
// Right, remember to replace the packet again
return event.getPacket().getHandle();
}
return packet;
}
/**
* Retrieve the current player's input stream.
* @param cache - whether or not to cache the result of this method.
* @return The player's input stream.
*/
public DataInputStream getInputStream(boolean cache) {
// Get the associated input stream
try {
if (cache && cachedInput != null)
return cachedInput;
// Save to cache
cachedInput = (DataInputStream) FieldUtils.readField(inputField, networkManager, true);
return cachedInput;
} catch (IllegalAccessException e) {
throw new RuntimeException("Unable to read input stream.", e);
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
7961c5c6f932d9fbf88c2ef0dcb70b254b48c6a7
|
3f49e0b17ce8d9abfdb45fa9faa2f923214373e0
|
/src/main/java/co/com/mutant/recognition/core/DNAValidator.java
|
41beff73dbfbaed22a3ae6c7601346a4c69c118b
|
[] |
no_license
|
harrysanchez1984/recognition
|
db7f84fda092c9d845e90faac8265ebb0ccdeb71
|
4f4c68732c4a28b165ed2c8fa7562f2e21f8b91d
|
refs/heads/master
| 2023-03-20T10:37:32.154106
| 2021-02-26T19:06:25
| 2021-02-26T19:06:25
| 341,217,940
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,805
|
java
|
package co.com.mutant.recognition.core;
import java.util.stream.Stream;
import co.com.mutant.recognition.enums.Directions;
import co.com.mutant.recognition.enums.ValidSequences;
public class DNAValidator {
private final String[] dna;
private final int dnaSize;
private int row, col;
private int rowStart, colStart;
Directions start;
ValidSequences direction;
public DNAValidator(String[] dna, Directions start, ValidSequences direction) {
this.dna = dna;
this.dnaSize = dna.length;
this.row = 0;
this.col = 0;
this.start = start;
this.direction = direction;
this.rowStart = 0;
this.colStart = 0;
initConfig(start, direction);
}
private void initConfig(Directions directions, ValidSequences circuitEnum) {
Stream.of(directions).parallel()
.filter(mutantEnum -> mutantEnum.equals(Directions.BOTTOM) && direction == ValidSequences.DIAGONAL_UP)
.flatMap(this::apply)
.filter(mutantEnum -> mutantEnum.equals(Directions.TOP) && direction == ValidSequences.DIAGONAL_DOWN)
.flatMap(this::apply);
}
public boolean nextStartDimension(Directions directions) {
return Stream.of(directions).parallel().flatMap(this::validateNextInitMutantProcess).findAny().get();
}
public Character getValue() {
if (row < 0 || row > dnaSize || col < 0 || col > dnaSize) {
return null;
}
return dna[row].charAt(col);
}
public Character getNext(ValidSequences direction) {
return Stream.of(direction).parallel().flatMap(this::validateProcessEnum).findAny().orElse(null);
}
private Stream<Directions> apply(Directions item) {
this.col = 1;
this.colStart = 1;
return Stream.of(item);
}
private Stream<Character> validateProcessEnum(final ValidSequences item) {
Boolean isValue = Boolean.FALSE;
if (item.equals(ValidSequences.RIGHT) && (col < dnaSize - 1)) {
col = col + 1;
isValue = Boolean.TRUE;
} else if (item.equals(ValidSequences.DOWN) && (row < dnaSize - 1)) {
row = row + 1;
isValue = Boolean.TRUE;
} else if (item.equals(ValidSequences.DIAGONAL_DOWN) && (row < dnaSize - 1 && col < dnaSize - 1)) {
row = row + 1;
col = col + 1;
isValue = Boolean.TRUE;
} else if (item.equals(ValidSequences.DIAGONAL_UP) && (row > 0 && col < dnaSize - 1)) {
row = row - 1;
col = col + 1;
isValue = Boolean.TRUE;
}
if (isValue) {
return Stream.of(getValue());
}
return null;
}
private Stream<Boolean> validateNextInitMutantProcess(final Directions directions) {
if (directions.equals(Directions.TOP) || directions.equals(Directions.BOTTOM)) {
row = (directions.equals(Directions.TOP)) ? 0 : dnaSize - 1;
colStart = colStart + 1;
col = colStart;
return Stream.of(colStart < dnaSize);
}
col = 0;
rowStart = rowStart + 1;
row = rowStart;
return Stream.of(rowStart < dnaSize);
}
}
|
[
"sanchezharry@javeriana.edu.co"
] |
sanchezharry@javeriana.edu.co
|
ebb1ba4d4e7d836bb9e53f6348ea7908c99d16e7
|
c054325698e4a3456bfb668e1dff8e10d33fd8b9
|
/server/src/main/java/com/agar/security/package-info.java
|
e652b7727e8e1ff0c93bc819112fda7ba03531d1
|
[] |
no_license
|
agarwasg/A10Dance
|
4074bfd66e2dfa2a4fa75e2627c8162ffb38c2c5
|
560007ab3be24a70e64a25346ab68219fac89f9e
|
refs/heads/master
| 2021-01-19T01:56:36.132916
| 2016-07-03T05:43:36
| 2016-07-03T05:43:36
| 33,460,010
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 69
|
java
|
/**
* Spring Security configuration.
*/
package com.agar.security;
|
[
"saket@doubledutch.me"
] |
saket@doubledutch.me
|
988454f45f93262d72da66cabad744249e47381c
|
f3ea26555036fb0bb1a4766178b6daa672846c00
|
/mvcProject/src/com/site/board/entity/BoardDTO.java
|
644a2ec5777f24bc7a20bce5139e2934f4b26323
|
[] |
no_license
|
davys88/davyProject
|
67d90f1b7f8bc62d7edde169ed991f25d060f8f3
|
23ebe0484a80521ceb21b49b8265b2e8a1446c0d
|
refs/heads/master
| 2021-01-10T12:49:17.443324
| 2016-01-20T05:23:14
| 2016-01-20T05:52:30
| 50,001,635
| 0
| 0
| null | null | null | null |
UHC
|
Java
| false
| false
| 2,273
|
java
|
package com.site.board.entity;
import com.site.common.entity.CommonDTO;
public class BoardDTO extends CommonDTO {
private int num; //글 번호
private String author; //글 작성자
private String title; //글 제목
private String content; //글 내용
private int readcnt; //글 조회수
private String writeday; //글 작성일
private int repRoot; //답변글 작성시 사용(원래글의 번호 참조)
private int repStep; //답변글 작성시 사용(답변글의 들여쓰기 지정)
private int repIndent; //답변글 작성시 사용(답변글의 순서지정)
private String passwd; //비밀 번호
//조건검색시 사용할 속성
private String search = "";
private String keyword = "";
public String getSearch() {
return search;
}
public void setSearch(String search) {
this.search = search;
}
public String getKeyword() {
return keyword;
}
public void setKeyword(String keyword) {
this.keyword = keyword;
}
public int getRepIndent() {
return repIndent;
}
public void setRepIndent(int repIndent) {
this.repIndent = repIndent;
}
public int getNum() {
return num;
}
public void setNum(int num) {
this.num = num;
}
public String getAuthor() {
return author;
}
public void setAuthor(String author) {
this.author = author;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public int getReadcnt() {
return readcnt;
}
public void setReadcnt(int readcnt) {
this.readcnt = readcnt;
}
public String getWriteday() {
return writeday;
}
public void setWriteday(String writeday) {
this.writeday = writeday;
}
public int getRepRoot() {
return repRoot;
}
public void setRepRoot(int repRoot) {
this.repRoot = repRoot;
}
public int getRepStep() {
return repStep;
}
public void setRepStep(int repStep) {
this.repStep = repStep;
}
public String getPasswd() {
return passwd;
}
public void setPasswd(String passwd) {
this.passwd = passwd;
}
}
|
[
"davys88@gmail.com"
] |
davys88@gmail.com
|
0779a86808d028294ae4459d5003c34cb843d98b
|
6258d599b611727aeb36b3b3d7e0605f07394d85
|
/PWIServices/src/com/pwi/services/framework/ServiceExecutor.java
|
e7fc19fa9407d5178d6b329f9fae3006017c79b8
|
[] |
no_license
|
muhammadwaqarkhan/PWI-Web
|
aed64a59883299908128f3d29f5abd55e3e98923
|
fec83c81f794f48440c28738691b5706786e03f7
|
refs/heads/master
| 2021-07-15T05:06:35.843518
| 2017-10-21T08:12:47
| 2017-10-21T08:12:47
| 106,362,235
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 8,076
|
java
|
package com.pwi.services.framework;
import java.lang.reflect.Method;
import javax.sql.DataSource;
import org.apache.commons.lang.StringUtils;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.transaction.annotation.Transactional;
import com.pwi.constants.FrameworkReasonCodes;
import com.pwi.dto.BaseOutDTO;
import com.pwi.interfaces.IRequestHandler;
import com.pwi.interfaces.IResponseHandler;
import com.pwi.services.base.ServiceBase;
import com.pwi.services.base.SpringServiceBase;
import com.pwi.services.framework.annotations.ServiceMethod;
import com.pwi.services.framework.exceptions.PWIException;
import com.pwi.services.hibernate.HibernateUtil;
/**
* This utility is responsible for providing interface to initiate calls to
* different services. Basic purpose of introducing it is to provide a one entry
* point for all services so that we know from where a service is initiated and
* we can handle exceptions/errors better. This way we will allow a user to
* handle exceptions better.
*
* @author Waqar
*
*/
public class ServiceExecutor {
private JdbcTemplate jdbcTemplate;
public void setDataSource(DataSource dataSource) {
this.jdbcTemplate = new JdbcTemplate(dataSource);
}
public void callService(String aa) {
System.out.println("callService");
}
/***
* This method is responsible for open Hibernate session and management
* transaction in case of ant exception this method will roll-back persist
* entity and close connection
*
* @param ServiceBase
* every service must extent which ServiceBase service
* serviceName: string parameter which contains serviceMethod
* name inDTO: this is type of IRequestHadnler, which contain
* input information
* @return Object any type of object
*/
public IResponseHandler callService(ServiceBase service, String serviceName, IRequestHandler inDTO) {
IResponseHandler response;
SessionFactory factory = HibernateUtil.getSessionFactory();
Session session = factory.openSession();
Transaction transcation = session.beginTransaction();
try {
service.setSession(session);
Method method = getServiceMethod(service, serviceName);
if (method.getParameterTypes().length > 0)
response = (IResponseHandler) method.invoke(service, inDTO);
else
response = (IResponseHandler) method.invoke(service);
if (response.getErrorCode() == FrameworkReasonCodes.ERROR_NO)
transcation.commit();
else
transcation.rollback();
} catch (PWIException exception) {
transcation.rollback();
response = new BaseOutDTO();
response.setErrorCode(FrameworkReasonCodes.EXECUTION_ERROR);
response.setErrorString(exception.getMessage());
return response;
// throw new
// PWIException(exception,exception.getMessage(),FrameworkReasonCodes.EXECUTION_ERROR);
} catch (Exception exception) {
transcation.rollback();
response = new BaseOutDTO();
response.setErrorCode(FrameworkReasonCodes.EXECUTION_ERROR);
response.setErrorString(exception.getMessage());
} finally {
session.close();
}
return response;
}
/***
* @Transactional:This method is responsible for transaction management in
* case of any exception this method will roll-back
* persist entity and close connection
* @param SpringServiceBase
* every service must extent which SpringServiceBase service
* serviceName: string parameter which contains serviceMethod
* name inDTO: this is type of IRequestHadnler, which contain
* input information
* @return Object any type of object
*/
@Transactional
public Object callService(SpringServiceBase service, String serviceName, IRequestHandler inDTO) {
Object response;
try {
service.setTemplace(jdbcTemplate);
Method method = getServiceMethod(service, serviceName);
if (method.getParameterTypes().length > 0)
response = method.invoke(service, inDTO);
else
response = method.invoke(service);
} catch (Exception exception) {
throw new PWIException(exception, exception.getMessage(), FrameworkReasonCodes.EXECUTION_ERROR);
}
return response;
}
/***
* @Transactional:This method is responsible for transaction management in
* case of any exception this method will roll-back
* persist entity and close connection
* @param SpringServiceBase
* every service must extent which SpringServiceBase service
* serviceName: string parameter which contains serviceMethod
* name inDTO: this is type of IRequestHadnler, which contain
* input information
* @return Object any type of object
*/
@Transactional
public Object callService(SpringServiceBase service, String serviceName, Object inDTO) {
try {
service.setTemplace(jdbcTemplate);
Method method = getServiceMethod(service, serviceName);
if (method.getParameterTypes().length > 0)
return method.invoke(service, inDTO);
else
return method.invoke(service);
} catch (Exception exception) {
throw new PWIException(exception, exception.getMessage(), -1);
}
}
/***
* ServiceBase method is responsible to find those service method which have
* annotation of ServiceMethod
*
* @param ServiceBase
* instance of service to find method serviceName: string
* parameter which contains serviceMethod name
*
* @return Method if method found then return method
*/
public Method getServiceMethod(ServiceBase service, String serviceName) {
try {
if (StringUtils.isBlank(serviceName)) {
throw new PWIException(new Exception(), "service not found", FrameworkReasonCodes.SERVICE_NOT_DEFINED);
}
Method[] methods = service.getClass().getDeclaredMethods();
for (Method method : methods) {
ServiceMethod serviceMethod = method.getAnnotation(ServiceMethod.class);
if (serviceMethod != null && isServiceMethod(serviceMethod, serviceName)) {
return method;
}
}
throw new PWIException(new Exception(), "service not found", FrameworkReasonCodes.SERVICE_NOT_DEFINED);
} catch (Exception e) {
throw new PWIException(new Exception(), "service not found", FrameworkReasonCodes.SERVICE_NOT_DEFINED);
}
}
/***
* SpringServiceBase method is responsible to find those service method
* which have annotation of ServiceMethod
*
* @param ServiceBase
* instance of service to find method serviceName: string
* parameter which contains serviceMethod name
*
* @return Method if method found then return method
*/
public Method getServiceMethod(SpringServiceBase service, String serviceName) {
try {
if (StringUtils.isBlank(serviceName)) {
throw new PWIException(new Exception(), "service not found", FrameworkReasonCodes.SERVICE_NOT_DEFINED);
}
Method[] methods = service.getClass().getDeclaredMethods();
for (Method method : methods) {
ServiceMethod serviceMethod = method.getAnnotation(ServiceMethod.class);
if (serviceMethod != null && isServiceMethod(serviceMethod, serviceName)) {
return method;
}
}
throw new PWIException(new Exception(), "service not found", FrameworkReasonCodes.SERVICE_NOT_DEFINED);
} catch (Exception e) {
throw new PWIException(new Exception(), "service not found", FrameworkReasonCodes.SERVICE_NOT_DEFINED);
}
}
public boolean isServiceMethod(ServiceMethod serviceMethod, String serviceName) {
for (int services = 0; services < serviceMethod.name().length; services++) {
if (serviceName.toUpperCase().equals(serviceMethod.name()[services].toUpperCase())) {
return true;
}
}
return false;
}
}
|
[
"muhammadwk786@gmail.com"
] |
muhammadwk786@gmail.com
|
462bfad3cb3b13fe2ffd2a29dda3a6cc71fa56ba
|
104901f8b1261712d2a4e6f62cfddf4274a96b7b
|
/DailyTraining/JDBC/src/main/java/com/Revature/util/ConnFactory.java
|
23bf50478b8b43af3ae0abf4a3abe40263803552
|
[
"MIT"
] |
permissive
|
2010USFJava/CarlsonA
|
ea17d76f4052177a010805c0fe1cabd5e0a1fbde
|
891dcde9185696452b5f9d0abe74f0ef77b205c4
|
refs/heads/main
| 2023-01-13T16:16:16.795982
| 2020-11-17T22:40:16
| 2020-11-17T22:40:16
| 305,754,531
| 0
| 0
|
MIT
| 2020-11-02T20:24:00
| 2020-10-20T15:35:52
|
Java
|
UTF-8
|
Java
| false
| false
| 1,136
|
java
|
package com.Revature.util;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.Properties;
public class ConnFactory {
//singleton factory
//priavte static instance of itself
private static ConnFactory cf;
//private no args constructor
private ConnFactory() {
super();
}
public static synchronized ConnFactory getInstance() {
if(cf==null) {
cf=new ConnFactory();
}
return cf;
}
//methods that do stuff
public Connection getConnection() {
Connection conn=null;
Properties prop=new Properties();
try {
prop.load(new FileReader("database.properties"));
conn=DriverManager.getConnection(prop.getProperty("url"), prop.getProperty("username"), prop.getProperty("password"));
} catch(SQLException e) {
e.printStackTrace();
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return conn;
}
}
|
[
"mounkeygirl@yahoo.com"
] |
mounkeygirl@yahoo.com
|
a9388b6f2262037d4936e8024add8fe7a052329e
|
89273830bc3230dfdee1a04121750740bebe4863
|
/src/fr/formation/exo12/Terrain.java
|
6c13b27ee1f6499cb8f9ecf2ac9e5e5a06c12ef3
|
[
"MIT"
] |
permissive
|
Kunkkaa/formation-exercices
|
49776fb698fe48e62cce314b523d32c6dab433fe
|
ce386b7b16e16f1c2fc48e1b66ceaecbea8fb6a6
|
refs/heads/master
| 2020-04-11T07:59:54.157073
| 2018-10-31T16:10:18
| 2018-10-31T16:10:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 693
|
java
|
package fr.formation.exo12;
public class Terrain extends Card {
public final char color;
public Terrain(char color) {
super(0);
this.color = color;
System.out.println("Un nouveau terrain.");
}
private String getColorName() {
String color = null;
switch (this.color) {
case 'b':
color = "bleu";
break;
case 'r':
color = "rouge";
break;
case 'g':
color = "vert";
break;
case 'w':
color = "blanc";
break;
case 'B':
color = "noir";
break;
default:
color = "incolore";
break;
}
return color;
}
/**
* Affichage de la carte.
*/
@Override
public String toString() {
return "Un terrain ".concat(this.getColorName());
}
}
|
[
"elvynia@gmail.com"
] |
elvynia@gmail.com
|
af5acd2e3014cd588a15e42c05cea5530cab03f2
|
543ab8fc29e5766f1f47b1ce0a28b19e1db6f2a6
|
/src/main/java/com/bridgei2i/vo/TemplateChart.java
|
73da36372cc04cb3d07b50c347e91c6fa11f7475
|
[] |
no_license
|
chaitaya/skuPlanningtool
|
52dfffbdf6b64200b787df15b2d3b75a86676646
|
f9733ea3b4d7aad634dd9b08eb11151fbf55a1de
|
refs/heads/master
| 2021-01-10T13:34:55.531099
| 2015-12-24T07:12:26
| 2015-12-24T07:12:26
| 48,529,882
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 15,001
|
java
|
package com.bridgei2i.vo;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Transient;
import org.hibernate.annotations.LazyCollection;
import org.hibernate.annotations.LazyCollectionOption;
import com.bridgei2i.common.dao.ApplicationDAO;
@Entity
@Table(name="templatechart")
public class TemplateChart implements Cloneable,Serializable {
@Id
@Column(name="id")
@GeneratedValue
private Integer id;
@Column(name="reportTitle")
private String reportTitle="Untitled";
@Column(name="statusId")
private Integer statusId;
@Column(name="reportForOrganization")
private String reportForOrganization;
@Column(name="filter1")
private String filter1;
@Column(name="filter2")
private String filter2;
@Column(name="filter3")
private String filter3;
@Column(name="filterValues1")
private String filterValues1;
@Column(name="filterValues2")
private String filterValues2;
@Column(name="filterValues3")
private String filterValues3;
@Column(name="reportType")
private String reportType="N";
@Column(name="enablePreview")
private String enablePreview;
@Transient
private String[] filterValuesArray1;
@Transient
private String[] filterValuesArray2;
@Transient
private String[] filterValuesArray3;
@Column(name="createdDate")
private Date createdDate;
@Column(name="updatedDate")
private Date updatedDate;
@Column(name="createdBy")
private Long createdBy;
@Column(name="updatedBy")
private Long updatedBy;
@Transient
private boolean deleted;
@Transient
private String statusName;
@Transient
private String assignReportNames;
@Transient
private List distributionList;
@Transient
private List reportMetaDataIdList;
@Transient
private List teamReport;
@Transient
private List teamReportHeaderList;
@Transient
private List summaryList;
@Transient
private List respondentsHeaderList;
@Transient
private List trendReportList;
@Transient
private String isOverall;
@Transient
private Integer reportMetaDataId;
@Transient
private Map reportMetaDataMapObj;
@Transient
private List managerByLocationList;
@Transient
private List segmentByLocationList;
@OneToMany(fetch=FetchType.EAGER,mappedBy="templateChart",cascade=CascadeType.ALL)
private List<TemplateChartCategory> templateChartCategories;
@OneToMany(mappedBy="templateChart",cascade=CascadeType.ALL)
@LazyCollection(LazyCollectionOption.FALSE)
private List<TemplateChartReportAssign> templateChartReportAssigns;
@OneToMany(mappedBy="templateChart",cascade=CascadeType.ALL)
@LazyCollection(LazyCollectionOption.FALSE)
private List<Comments> comments;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getReportTitle() {
return reportTitle;
}
public void setReportTitle(String reportTitle) {
this.reportTitle = reportTitle;
}
public Integer getStatusId() {
return statusId;
}
public void setStatusId(Integer statusId) {
this.statusId = statusId;
}
public String getReportForOrganization() {
return reportForOrganization;
}
public void setReportForOrganization(String reportForOrganization) {
this.reportForOrganization = reportForOrganization;
}
public Date getCreatedDate() {
return createdDate;
}
public void setCreatedDate(Date createdDate) {
this.createdDate = createdDate;
}
public Date getUpdatedDate() {
return updatedDate;
}
public void setUpdatedDate(Date updatedDate) {
this.updatedDate = updatedDate;
}
public Long getCreatedBy() {
return createdBy;
}
public void setCreatedBy(Long createdBy) {
this.createdBy = createdBy;
}
public Long getUpdatedBy() {
return updatedBy;
}
public void setUpdatedBy(Long updatedBy) {
this.updatedBy = updatedBy;
}
public boolean isDeleted() {
return deleted;
}
public void setDeleted(boolean deleted) {
this.deleted = deleted;
}
public List<TemplateChartCategory> getTemplateChartCategories() {
return templateChartCategories;
}
public void setTemplateChartCategories(
List<TemplateChartCategory> templateChartCategories) {
this.templateChartCategories = templateChartCategories;
}
public List<TemplateChartReportAssign> getTemplateChartReportAssigns() {
return templateChartReportAssigns;
}
public void setTemplateChartReportAssigns(
List<TemplateChartReportAssign> templateChartReportAssigns) {
this.templateChartReportAssigns = templateChartReportAssigns;
}
public List<Comments> getComments() {
return comments;
}
public void setComments(List<Comments> comments) {
this.comments = comments;
}
public String getStatusName() {
return statusName;
}
public void setStatusName(String statusName) {
this.statusName = statusName;
}
public String getAssignReportNames() {
return assignReportNames;
}
public void setAssignReportNames(String assignReportNames) {
this.assignReportNames = assignReportNames;
}
public String getFilter1() {
return filter1;
}
public void setFilter1(String filter1) {
this.filter1 = filter1;
}
public String getFilter2() {
return filter2;
}
public void setFilter2(String filter2) {
this.filter2 = filter2;
}
public String getFilter3() {
return filter3;
}
public void setFilter3(String filter3) {
this.filter3 = filter3;
}
public String getFilterValues1() {
return filterValues1;
}
public void setFilterValues1(String filterValues1) {
this.filterValues1 = filterValues1;
if(filterValues1 != null){
this.filterValuesArray1 = filterValues1.split(",");
}
}
public String getFilterValues2() {
return filterValues2;
}
public void setFilterValues2(String filterValues2) {
this.filterValues2 = filterValues2;
if(filterValues2 != null){
this.filterValuesArray2 = filterValues2.split(",");
}
}
public String getFilterValues3() {
return filterValues3;
}
public void setFilterValues3(String filterValues3) {
this.filterValues3 = filterValues3;
if(filterValues3 != null){
this.filterValuesArray3 = filterValues3.split(",");
}
}
public String[] getFilterValuesArray1() {
return filterValuesArray1;
}
public void setFilterValuesArray1(String[] filterValuesArray1) {
this.filterValuesArray1 = filterValuesArray1;
if(filterValuesArray1!=null){
String str="";
int len = filterValuesArray1.length;
for(int i=0;i<len;i++){
str = str+filterValuesArray1[i];
if(i+1<len){
str = str+",";
}
filterValues1 = str;
}
}
}
public String[] getFilterValuesArray2() {
return filterValuesArray2;
}
public void setFilterValuesArray2(String[] filterValuesArray2) {
this.filterValuesArray2 = filterValuesArray2;
if(filterValuesArray2!=null){
String str="";
int len = filterValuesArray2.length;
for(int i=0;i<len;i++){
str = str+filterValuesArray2[i];
if(i+1<len){
str = str+",";
}
filterValues2 = str;
}
}
}
public String[] getFilterValuesArray3() {
return filterValuesArray3;
}
public void setFilterValuesArray3(String[] filterValuesArray3) {
this.filterValuesArray3 = filterValuesArray3;
if(filterValuesArray3!=null){
String str="";
int len = filterValuesArray3.length;
for(int i=0;i<len;i++){
str = str+filterValuesArray3[i];
if(i+1<len){
str = str+",";
}
filterValues3 = str;
}
}
}
public Object clone()
{
try {
ByteArrayOutputStream byteArr = new ByteArrayOutputStream();
ObjectOutputStream objOut = new ObjectOutputStream(byteArr);
objOut.writeObject(this);
objOut.close();
ByteArrayInputStream byteArrIn = new ByteArrayInputStream(byteArr.toByteArray());
ObjectInputStream objIn = new ObjectInputStream(byteArrIn);
Object obj = objIn.readObject();
objIn.close();
return obj;
} catch(Exception ex) {
ex.printStackTrace();
return null;
}
}
@Override
public String toString() {
return "TemplateChart [id=" + id + ", reportTitle=" + reportTitle
+ ", statusId=" + statusId + ", reportForOrganization="
+ reportForOrganization + ", filter1=" + filter1 + ", filter2="
+ filter2 + ", filter3=" + filter3 + ", filterValues1="
+ filterValues1 + ", filterValues2=" + filterValues2
+ ", filterValues3=" + filterValues3 + ", filterValuesArray1="
+ Arrays.toString(filterValuesArray1) + ", filterValuesArray2="
+ Arrays.toString(filterValuesArray2) + ", filterValuesArray3="
+ Arrays.toString(filterValuesArray3) + ", createdDate="
+ createdDate + ", updatedDate=" + updatedDate + ", createdBy="
+ createdBy + ", updatedBy=" + updatedBy + ", deleted="
+ deleted + ", statusName=" + statusName
+ ", assignReportNames=" + assignReportNames
+ ", distributionList=" + distributionList + ", isOverall="
+ isOverall + ", templateChartCategories="
+ templateChartCategories + ", templateChartReportAssigns="
+ templateChartReportAssigns + ", comments=" + comments
+ ", ReportType=" + reportType + ", noOfResponse="
+ noOfResponse + ", codeBookappliedFilter1Variable="
+ codeBookappliedFilter1Variable
+ ", codeBookappliedFilter2Variable="
+ codeBookappliedFilter2Variable
+ ", codeBookappliedFilter3Variable="
+ codeBookappliedFilter3Variable
+ ", codeBookappliedFilter1Value="
+ codeBookappliedFilter1Value
+ ", codeBookappliedFilter2Value="
+ codeBookappliedFilter2Value
+ ", codeBookappliedFilter3Value="
+ codeBookappliedFilter3Value + "]";
}
public List getDistributionList() {
return distributionList;
}
public void setDistributionList(List distributionList) {
this.distributionList = distributionList;
}
public String getIsOverall() {
return isOverall;
}
public void setIsOverall(String isOverall) {
this.isOverall = isOverall;
}
public List getTeamReport() {
return teamReport;
}
public void setTeamReport(List teamReport) {
this.teamReport = teamReport;
}
public List getTeamReportHeaderList() {
return teamReportHeaderList;
}
public void setTeamReportHeaderList(List teamReportHeaderList) {
this.teamReportHeaderList = teamReportHeaderList;
}
@Transient
private Integer noOfResponse;
@Transient
private Integer totalNoResponse;
@Transient
private String percentageOfResponse;
public String getPercentageOfResponse() {
return percentageOfResponse;
}
public void setPercentageOfResponse(String percentageOfResponse) {
this.percentageOfResponse = percentageOfResponse;
}
public Integer getTotalNoResponse() {
return totalNoResponse;
}
public void setTotalNoResponse(Integer totalNoResponse) {
this.totalNoResponse = totalNoResponse;
}
@Transient
private String codeBookappliedFilter1Variable;
public String getCodeBookappliedFilter1Variable() {
return codeBookappliedFilter1Variable;
}
public void setCodeBookappliedFilter1Variable(
String codeBookappliedFilter1Variable) {
this.codeBookappliedFilter1Variable = codeBookappliedFilter1Variable;
}
public String getCodeBookappliedFilter2Variable() {
return codeBookappliedFilter2Variable;
}
public void setCodeBookappliedFilter2Variable(
String codeBookappliedFilter2Variable) {
this.codeBookappliedFilter2Variable = codeBookappliedFilter2Variable;
}
public String getCodeBookappliedFilter3Variable() {
return codeBookappliedFilter3Variable;
}
public void setCodeBookappliedFilter3Variable(
String codeBookappliedFilter3Variable) {
this.codeBookappliedFilter3Variable = codeBookappliedFilter3Variable;
}
public String getCodeBookappliedFilter1Value() {
return codeBookappliedFilter1Value;
}
public void setCodeBookappliedFilter1Value(String codeBookappliedFilter1Value) {
this.codeBookappliedFilter1Value = codeBookappliedFilter1Value;
}
public String getCodeBookappliedFilter2Value() {
return codeBookappliedFilter2Value;
}
public void setCodeBookappliedFilter2Value(String codeBookappliedFilter2Value) {
this.codeBookappliedFilter2Value = codeBookappliedFilter2Value;
}
public String getCodeBookappliedFilter3Value() {
return codeBookappliedFilter3Value;
}
public void setCodeBookappliedFilter3Value(String codeBookappliedFilter3Value) {
this.codeBookappliedFilter3Value = codeBookappliedFilter3Value;
}
@Transient
private String codeBookappliedFilter2Variable;
@Transient
private String codeBookappliedFilter3Variable;
@Transient
private String codeBookappliedFilter1Value;
@Transient
private String codeBookappliedFilter2Value;
@Transient
private String codeBookappliedFilter3Value;
public Integer getNoOfResponse() {
return noOfResponse;
}
public void setNoOfResponse(Integer noOfResponse) {
this.noOfResponse = noOfResponse;
}
public String getReportType() {
return reportType;
}
public void setReportType(String reportType) {
this.reportType = reportType;
}
public List getRespondentsHeaderList() {
return respondentsHeaderList;
}
public void setRespondentsHeaderList(List respondentsHeaderList) {
this.respondentsHeaderList = respondentsHeaderList;
}
public String getEnablePreview() {
return enablePreview;
}
public void setEnablePreview(String enablePreview) {
this.enablePreview = enablePreview;
}
public List getTrendReportList() {
return trendReportList;
}
public void setTrendReportList(List trendReportList) {
this.trendReportList = trendReportList;
}
public Integer getReportMetaDataId() {
return reportMetaDataId;
}
public void setReportMetaDataId(Integer reportMetaDataId) {
this.reportMetaDataId = reportMetaDataId;
}
public List getReportMetaDataIdList() {
return reportMetaDataIdList;
}
public void setReportMetaDataIdList(List reportMetaDataIdList) {
this.reportMetaDataIdList = reportMetaDataIdList;
}
public Map getReportMetaDataMapObj() {
return reportMetaDataMapObj;
}
public void setReportMetaDataMapObj(Map reportMetaDataMapObj) {
this.reportMetaDataMapObj = reportMetaDataMapObj;
}
public List getManagerByLocationList() {
return managerByLocationList;
}
public void setManagerByLocationList(List managerByLocationList) {
this.managerByLocationList = managerByLocationList;
}
public List getSummaryList() {
return summaryList;
}
public void setSummaryList(List summaryList) {
this.summaryList = summaryList;
}
public List getSegmentByLocationList() {
return segmentByLocationList;
}
public void setSegmentByLocationList(List segmentByLocationList) {
this.segmentByLocationList = segmentByLocationList;
}
}
|
[
"krishna.thota@bridgei2i.com"
] |
krishna.thota@bridgei2i.com
|
f86f4459048019a7b270f142f06c6f23c3f44d85
|
6915b561ec1d3f4340193e7c7baaf817f6d9c969
|
/reservation-service/src/test/java/com/example/reservationservice/ReservationRepositoryTest.java
|
cd4daf92f8c89d44aed25ce77bc508daf613b29d
|
[] |
no_license
|
davidhay/bootiful-testing
|
fd06f6959a0b04457c0e79ba30b3cf4efa45b531
|
a99ecbcf56902583c60a9ab3bee3faba743e3ec9
|
refs/heads/master
| 2020-07-28T10:11:30.743950
| 2019-09-18T19:41:13
| 2019-09-18T19:41:13
| 209,389,839
| 0
| 0
| null | 2019-09-18T19:39:11
| 2019-09-18T19:39:11
| null |
UTF-8
|
Java
| false
| false
| 1,232
|
java
|
package com.example.reservationservice;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.data.mongo.DataMongoTest;
import org.springframework.test.context.junit4.SpringRunner;
import reactor.core.publisher.Flux;
import reactor.test.StepVerifier;
import java.util.function.Predicate;
@RunWith(SpringRunner.class)
@DataMongoTest
public class ReservationRepositoryTest {
@Autowired
private ReservationRepository repository;
@Test
public void findByName () throws Exception {
Flux<Reservation> reservationFlux = this.repository
.deleteAll()
.thenMany(
Flux
.just("A", "B", "C")
.map(name -> new Reservation(null, name))
.flatMap(r -> this.repository.save(r))
)
.thenMany(this.repository.findAll());
Predicate<Reservation> reservationPredicate = r -> r.getName().equalsIgnoreCase("A") ||
r.getName().equalsIgnoreCase("B") ||
r.getName().equalsIgnoreCase("C");
StepVerifier
.create(reservationFlux)
.expectNextMatches(reservationPredicate)
.expectNextMatches(reservationPredicate)
.expectNextMatches(reservationPredicate)
.verifyComplete();
}
}
|
[
"josh@joshlong.com"
] |
josh@joshlong.com
|
5598e4085314639d06b16a6540ab1b215039c8c9
|
3eeeaf4a85b1145390c6a01a329ff4b7b8f5799a
|
/src/main/java/org/jopendocument/util/i18n/I18nUtilsTest.java
|
7bb2342d2a05e9142bb69e8e7e6efffd485152bf
|
[] |
no_license
|
tomvieira/jOpenDocument
|
33c0e4e3b5bb0807007829fd53aa75b26f42cba0
|
06886b1a25195e8c058dd91761ccc26c0fcf1d57
|
refs/heads/master
| 2021-11-26T20:04:06.917894
| 2021-11-10T18:38:36
| 2021-11-10T18:38:36
| 132,905,167
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,122
|
java
|
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright 2008-2013 jOpenDocument, by ILM Informatique. All rights reserved.
*
* The contents of this file are subject to the terms of the GNU
* General Public License Version 3 only ("GPL").
* You may not use this file except in compliance with the License.
* You can obtain a copy of the License at http://www.gnu.org/licenses/gpl-3.0.html
* See the License for the specific language governing permissions and limitations under the License.
*
* When distributing the software, include this License Header Notice in each file.
*
*/
package org.jopendocument.util.i18n;
import java.util.Arrays;
import java.util.Locale;
import junit.framework.TestCase;
public class I18nUtilsTest extends TestCase {
public void testFromString() throws Exception {
for (final Locale l : Arrays.asList(Locale.FRENCH, Locale.FRANCE, Locale.CANADA, Locale.CANADA_FRENCH, Locale.ROOT, Locale.TRADITIONAL_CHINESE)) {
assertEquals(l, I18nUtils.createLocaleFromString(l.toString()));
}
}
}
|
[
"wellington.analista@gmail.com"
] |
wellington.analista@gmail.com
|
69563d1391a880a1dff75f9f7c87d62820871f70
|
42392670d1b400a6eaaabcf15aae8cef8fa69e8a
|
/Matrix.java
|
a2effa92d4f757eeb0add93c9f5364acf3ccf0a9
|
[] |
no_license
|
WangWillis/SnakeBot
|
725dff25612f62439477e6c807c4052b6f7404cb
|
edcc7d4d98a4d56efb8dde6b26baf59472b9ee0b
|
refs/heads/master
| 2021-01-22T22:49:26.793180
| 2017-08-09T00:21:33
| 2017-08-09T00:21:33
| 85,582,872
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,622
|
java
|
public class Matrix{
private int[][] mtrx;
public static Matrix mult(Matrix mx1, Matrix mx2){
//check for valid input
if(mx1 == null || mx2 == null)
return null;
//get the int datafields to make multiplication easier
int[][] m1 = mx1.getMtrx();
int[][] m2 = mx2.getMtrx();
//check if can mulitply together
if(m1[0].length != m2.length)
return null;
return new Matrix(multInt(m1, m2));
}
//used to multiply 2 int arrays togther using matrix mult
private static int[][] multInt(int[][] mx1, int[][] mx2){
//allocate mem for the result
int[][] res = new int[mx1.length][mx2[0].length];
for(int i = 0; i < res.length; i++){
for(int j = 0; j < res[i].length; j++){
//get value for spot i j
int val = 0;
for(int z = 0; z < m2.length; z++)
val += mx1[i][z]*mx2[z][j];
//put value in
res[i][j] = val;
}
}
return res;
}
public Matrix(int col, int row){
mtrx = new int [col][row];
}
public Matrix(int[][] intMtrx){
mtrx = intMtrx;
}
public int[][] getMtrx(){
return mtrx;
}
public boolean mult(Matrix other){
//check for good flags
if(other == null)
return false;
int[][] otherInt = other.getMtrx();
if(mtrx[0].length != otherInt.length)
return false;
mtrx = multInt(mtrx, otherInt);
return true;
}
}
|
[
"willis257@gmail.com"
] |
willis257@gmail.com
|
264ba0bfc1610c742e7bf9c844a2b3194bda9b06
|
083d12b1678dfc4fab113a401b9d52f51703ed9a
|
/src/java/login/Chirp.java
|
a8e151385f59426961fa3ca9a92da539404fbe53
|
[] |
no_license
|
will35488/Micro-Blogging-Web-Site
|
feca31ba3d9c910aecd8a0163ff013fd7fd0b17e
|
9627a4f3c98307dbba682897d3c1cf50595ffb05
|
refs/heads/main
| 2023-08-22T21:52:55.018970
| 2021-10-07T00:32:29
| 2021-10-07T00:32:29
| 414,408,450
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,500
|
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 login;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
/**
*
* @author User
*/
@Entity
public class Chirp implements Serializable{
private Long chirpId;
private User user;
private String text;
private Date chirpDate;
private byte[] image;
private String filename;
public Chirp(){
//userId="";
//text="";
//chirpDate="";
}
public Chirp(User user, String text){
this.user = user;
this.text = text;
chirpDate= new java.util.Date();
filename = "blank";
}
public Chirp(User user, String text, byte[] image, String filename){
this.user = user;
this.text = text;
chirpDate= new java.util.Date();
this.image=image;
this.filename = filename;
}
public Chirp(User user, String text, String filename){
this.user = user;
this.text = text;
chirpDate= new java.util.Date();
this.filename = filename;
}
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
public Long getChirpId() {
return chirpId;
}
@ManyToOne
public User getUser() {
return user;
}
public String getText() {
return text;
}
@Temporal(TemporalType.TIMESTAMP)
public Date getChirpDate() {
return chirpDate;
}
public void setChirpId(Long chirpId) {
this.chirpId = chirpId;
}
public void setUser(User user) {
this.user = user;
}
public void setText(String text) {
this.text = text;
}
public void setChirpDate(Date chirpDate) {
this.chirpDate = chirpDate;
}
public byte[] getImage() {
return image;
}
public void setImage(byte[] image) {
this.image = image;
}
public String getFilename() {
return filename;
}
public void setFilename(String filename) {
this.filename = filename;
}
}
|
[
"77642117+will35488@users.noreply.github.com"
] |
77642117+will35488@users.noreply.github.com
|
a9f81b9b05e2f6ec45c17557670a1f8597b45237
|
b767e6a2cddee4cca34d2d131f4075c899c647f6
|
/src/test/java/com/congressodeti/calculadoradesalarios/service/CalculoPJSimplesTest.java
|
70ce3a8cd7d6113c8bea722164d74095bbfb1394
|
[] |
no_license
|
AlissonMedeiros/calculadora-de-salarios
|
a194302341fac13994234cbed1f2ce9a951ef8e7
|
57d7a780d68c4dfd267e1e7e5cc7c1fa9d791e14
|
refs/heads/master
| 2020-03-24T05:32:24.141153
| 2018-07-27T02:01:19
| 2018-07-27T02:01:19
| 142,492,775
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 827
|
java
|
package com.congressodeti.calculadoradesalarios.service;
import org.junit.Ignore;
import org.junit.Test;
import com.congressodeti.calculadoradesalarios.service.passos.DadoBeneficio;
import com.congressodeti.calculadoradesalarios.service.passos.EntaoVerificaValor;
import com.congressodeti.calculadoradesalarios.service.passos.QuandoConverteParaCLT;
public class CalculoPJSimplesTest {
private DadoBeneficio dadoBeneficio;
private QuandoConverteParaCLT quandoConverteParaCLT;
private EntaoVerificaValor entaoVerificaValor;
//TODO ver na proxima semana
@Test
@Ignore
public void testeComBeneficios() {
dadoBeneficio.temBeneficioMensalDe(350D); //Alimentação
dadoBeneficio.temBeneficioMensalDe(150D); //Transporte
quandoConverteParaCLT.calculoSalarioCLT(1500);
entaoVerificaValor.validaSalario(2500D);
}
}
|
[
"alisson.medeiros@gmail.com"
] |
alisson.medeiros@gmail.com
|
ae857919d76edca117dd86d3ad08a17cbb2f5da4
|
0467c404056962518dfa5e9a266a4def52f4499f
|
/week4-078.ClockUsingCounter/src/Main.java
|
4ee915ece0b9d2dc92bfcc04d4734bde77b55d34
|
[] |
no_license
|
zhovner88/mooc.fi-java-helsinki-I
|
6018b5016afa280e4b40b4574a9821977449d2c0
|
b2bcf8ce123015b09a71f1ecd2497aa573a594e5
|
refs/heads/master
| 2021-07-24T19:25:31.946564
| 2018-12-26T13:00:12
| 2018-12-26T13:00:12
| 147,545,529
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,232
|
java
|
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner reader = new Scanner(System.in);
// write here code to ensure that BoundedCounter works as expected
// before starting 78.3 remove the extra code and use the skeleton shown
// in the assignment
BoundedCounter seconds = new BoundedCounter(59);
BoundedCounter minutes = new BoundedCounter(59);
BoundedCounter hours = new BoundedCounter(23);
System.out.print("seconds: ");
int s = Integer.parseInt(reader.nextLine());
System.out.print("minutes: ");
int m = Integer.parseInt(reader.nextLine());
System.out.print("hours: ");
int h = Integer.parseInt(reader.nextLine());
seconds.setValue(s);
minutes.setValue(m);
hours.setValue(h);
int i = 0;
while ( i < 121 ) {
System.out.println( hours + ":" + minutes + ":" + seconds);
seconds.next();
if (seconds.getValue() == 00) {
minutes.next();
if (minutes.getValue() == 00) {
hours.next();
}
}
i++;
}
}
}
|
[
"denys.zhovnerovych@gmail.com"
] |
denys.zhovnerovych@gmail.com
|
8d57be4380d7c85790b6649806c1930ed1f7e7ed
|
6a09bd992584556d6799fd180625e03ed841a489
|
/src/pbo3/HitungBidang.java
|
0e6a27e0be6a86e7a736fabd6e783d0cd2b2632a
|
[] |
no_license
|
prudenca08/PPBO3
|
bb948823ea9ce2c3507812f7f76a2509defc2552
|
62a6c527924fc4382d7cbe6a1d8dcca789b214f0
|
refs/heads/main
| 2023-04-11T17:51:10.000086
| 2021-05-10T12:29:54
| 2021-05-10T12:29:54
| 366,035,188
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 158
|
java
|
/*
* PRUDENCA AHMAD DAFFA KURNIA
* 123190005
*/
package pbo3;
public interface HitungBidang {
double hitungKeliling();
double hitungLuas();
}
|
[
"prudencaahdaffa08@gmail.com"
] |
prudencaahdaffa08@gmail.com
|
c0df9114c496a1fc9117859512bdbf026a2faac8
|
7d8a217b8c2ceb7a8f7ceca2ade2ba83f66e3f20
|
/app/src/main/java/demo/liuchen/com/zhihudiary/view/IViewMain.java
|
f3e56a820b5953d843cac6156980e5fee4fa1e49
|
[] |
no_license
|
hylinslove/ZhiHuDaily
|
f6360f51dfc6d62f3b06f2b5e078434d6f1083eb
|
126d2edd6493672ccc9901615ca6ac9f05ff9bb7
|
refs/heads/master
| 2021-05-02T02:01:31.692180
| 2017-06-20T04:51:20
| 2017-06-20T04:51:20
| 72,899,154
| 5
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 475
|
java
|
package demo.liuchen.com.zhihudiary.view;
import demo.liuchen.com.zhihudiary.modle.bean.BeforeBean;
import demo.liuchen.com.zhihudiary.modle.bean.NewsBean;
/**
* Created by meng on 2016/11/3.
*/
public interface IViewMain {
void bannerDataGot(NewsBean bean);
void newsDataGot(NewsBean bean);
void dataGotFailure();
void refreshSuccess(NewsBean bean);
void refreshFailure();
void loadMoreSuccess(BeforeBean bean);
void loadMoreFailure();
}
|
[
"763577618@qq.com"
] |
763577618@qq.com
|
61b4158e615ea6348232f9244429a71b413eb84e
|
dc09046f25d4566f2263a26b39bca468ca8df0d2
|
/toolbox/src/toolbox/plugin/jsourceview/PieChart.java
|
f9cfa7b5a09d8d56fbf66c4f6d8569abe46885a2
|
[] |
no_license
|
infernuslord/javatoolbox
|
3fc6ae405203548dd8c5be2a3d76a10220c75e9c
|
46a16c8556573a418a462ed5a6e2e89e5aa67159
|
refs/heads/master
| 2021-01-22T02:47:48.065344
| 2008-09-18T06:28:00
| 2008-09-18T06:28:00
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,003
|
java
|
package toolbox.plugin.jsourceview;
import java.awt.BorderLayout;
import java.text.NumberFormat;
import javax.swing.JPanel;
import javax.swing.UIManager;
import org.jfree.chart.ChartFactory;
import org.jfree.chart.ChartPanel;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.labels.StandardPieSectionLabelGenerator;
import org.jfree.chart.labels.StandardPieToolTipGenerator;
import org.jfree.chart.plot.PiePlot3D;
import org.jfree.data.general.DefaultPieDataset;
import org.jfree.data.general.PieDataset;
/**
* Pie chart that visualizes source code categories.
*/
public class PieChart extends JPanel
{
private static final NumberFormat format = NumberFormat.getPercentInstance();
static
{
format.setMaximumFractionDigits(1);
}
//--------------------------------------------------------------------------
// Fields
//--------------------------------------------------------------------------
/**
* Source code statistics to graph in a pie chart.
*/
private FileStats stats_;
//--------------------------------------------------------------------------
// Constructors
//--------------------------------------------------------------------------
/**
* Creates a PieChart.
*
* @param totals Total file statistics.
*/
public PieChart(FileStats totals)
{
super(new BorderLayout());
stats_ = totals;
// create a dataset...
PieDataset dataset = createDataset();
// create the chart...
JFreeChart chart = createChart(dataset);
// add the chart to a panel...
ChartPanel chartPanel = new ChartPanel(chart);
add(chartPanel, BorderLayout.CENTER);
}
//--------------------------------------------------------------------------
// Protected
//--------------------------------------------------------------------------
/**
* Creates a dataset with the source code statistics.
*
* @return PieDataset
*/
protected PieDataset createDataset()
{
DefaultPieDataset result = new DefaultPieDataset();
int total = stats_.getTotalLines();
result.setValue(
"Comments",
percent(stats_.getCommentLines(), total));
result.setValue(
"Source code",
percent(stats_.getCodeLines(), total));
result.setValue(
"Thrown out",
percent(stats_.getThrownOutLines(), total));
result.setValue(
"Blank Lines",
percent(stats_.getBlankLines(), total));
return result;
}
/**
* Calcs percentage given a part and a whole.
*
* @param top Part of whole.
* @param bottom Whole.
* @return float
*/
protected float percent(float top, float bottom)
{
return (top / bottom);
}
/**
* Creates a chart for the source code categories.
*
* @param dataset The dataset.
* @return JFreeChart
*/
protected JFreeChart createChart(PieDataset dataset)
{
JFreeChart chart =
ChartFactory.createPieChart3D(
"Source Code Categories", // chart title
dataset, // data
true, // include legend
true, // tooltips
false); // gen urls
chart.setBackgroundPaint(UIManager.getColor("JOptionFrame.background"));
PiePlot3D plot = (PiePlot3D) chart.getPlot();
plot.setForegroundAlpha(0.5f);
plot.setLabelGenerator(new StandardPieSectionLabelGenerator("{1} {0}", format, format));
plot.setToolTipGenerator(new StandardPieToolTipGenerator("{0} {1}", format, format));
plot.setNoDataMessage("No data to display");
return chart;
}
}
|
[
"analogue@1d61b40d-8c4a-0410-a6ba-a5e3ed80748e"
] |
analogue@1d61b40d-8c4a-0410-a6ba-a5e3ed80748e
|
b0ac8940f7d6e27f6154cddd0173a9623a644cde
|
0d1835c1fbfe08dad1d59cd1f6261e706146e609
|
/CardioMRI/src/com/pixelmed/dicom/StoredFilePathStrategySingleFolder.java
|
6fba72c39c813bd0f11f3bd40d673c44c6f02e20
|
[
"LicenseRef-scancode-warranty-disclaimer"
] |
no_license
|
inevitably2484848/MRI
|
c57dc4313b06f47796e7ac6b200485b20af04d66
|
2185d5a9dcbe4cca09dcce49d43b77df35677f84
|
refs/heads/master
| 2021-01-14T08:25:25.978877
| 2016-04-27T19:31:10
| 2016-04-27T19:31:10
| 29,896,364
| 2
| 2
| null | 2015-11-30T23:39:51
| 2015-01-27T03:53:59
|
Java
|
UTF-8
|
Java
| false
| false
| 1,429
|
java
|
/* Copyright (c) 2001-2013, David A. Clunie DBA Pixelmed Publishing. All rights reserved. */
package com.pixelmed.dicom;
import java.io.File;
/**
* <p>Store files in a single folder, using the SOP Instance UID as the filename.</p>
*
* <p>This is not a good strategy, since having too many files in a single folder degrades performance,
* or bump up against limits, like Linux ext2 31998 sub-folders per inode,
* but is acceptable for modest numbers of images.</p>
*
* <p>It is the default strategy when not otherwise specified, since it was the original strategy supported in earlier versions of the toolkit.</p>
*
* @author dclunie, jimirrer
*/
public final class StoredFilePathStrategySingleFolder extends StoredFilePathStrategy {
private static final String identString = "@(#) $Header: /userland/cvs/pixelmed/imgbook/com/pixelmed/dicom/StoredFilePathStrategySingleFolder.java,v 1.2 2013/02/01 13:53:20 dclunie Exp $";
public StoredFilePathStrategySingleFolder() {}
public String makeStoredFilePath(String sopInstanceUID) {
return sopInstanceUID;
}
public String toString() {
return "BYSOPINSTANCEUIDINSINGLEFOLDER";
}
/**
* <p>Perform self test. If arguments are given, then use then as test UIDs. If no arguments, then use internal test UIDs.</p>
*/
public static void main(String arg[]) {
BYSOPINSTANCEUIDINSINGLEFOLDER.test(arg);
}
}
|
[
"mhd0003@auburn.edu"
] |
mhd0003@auburn.edu
|
939c0e6052c0637eb300c0b38c629a7452ad0c8b
|
7d622de6755c886df7c014551f5eb5624378ea74
|
/src/edu/arizona/cs/mrpkm/kmerfreqcomp/PairwiseKmerFrequencyComparatorTOC.java
|
2337da0931389abbd9e64c6ab8753cfda1995cd9
|
[] |
no_license
|
iychoi/MR-PKM
|
f0c8caf7e3bfb3a1b47d8449ed7b893113d8885f
|
903f04c17326c92c73389b52e3e430bd04b706f9
|
refs/heads/master
| 2020-05-19T09:35:50.544923
| 2015-05-08T09:52:59
| 2015-05-08T09:52:59
| 22,664,930
| 1
| 1
| null | 2015-05-06T19:25:06
| 2014-08-06T01:06:16
|
Java
|
UTF-8
|
Java
| false
| false
| 3,051
|
java
|
package edu.arizona.cs.mrpkm.kmerfreqcomp;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Hashtable;
import java.util.List;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.Text;
import org.json.JSONArray;
import org.json.JSONObject;
/**
*
* @author iychoi
*/
public class PairwiseKmerFrequencyComparatorTOC {
private final static String JSON_CONF_INPUT_NUM = "itemcounts";
private final static String JSON_CONF_INPUTS = "items";
private final static String JSON_CONF_INPUT_ID = "id";
private final static String JSON_CONF_INPUT_FILENAME = "filename";
private Hashtable<String, Integer> inputTable;
private List<String> objList;
public PairwiseKmerFrequencyComparatorTOC() {
this.inputTable = new Hashtable<String, Integer>();
this.objList = new ArrayList<String>();
}
public void addInput(Path input) {
addInput(input.getName());
}
public void addInput(Path[] inputs) {
for(Path input : inputs) {
addInput(input.getName());
}
}
public void addInput(String input) {
this.inputTable.put(input, this.objList.size());
this.objList.add(input);
}
public int getIDFromInput(String input) throws IOException {
if(this.inputTable.get(input) == null) {
throw new IOException("could not find id from " + input);
} else {
return this.inputTable.get(input);
}
}
public String getInputFromID(int id) throws IOException {
if(this.objList.size() <= id) {
throw new IOException("could not find filename from " + id);
} else {
return this.objList.get(id);
}
}
public String[] getAllInput() {
return this.objList.toArray(new String[0]);
}
public int getSize() {
return this.objList.size();
}
public String createJson() {
JSONObject jsonobj = new JSONObject();
// set size
jsonobj.put(JSON_CONF_INPUT_NUM, this.objList.size());
// set array
JSONArray outputsArray = new JSONArray();
for(int i=0;i<this.objList.size();i++) {
JSONObject itemjsonobj = new JSONObject();
itemjsonobj.put(JSON_CONF_INPUT_ID, i);
itemjsonobj.put(JSON_CONF_INPUT_FILENAME, this.objList.get(i));
outputsArray.put(itemjsonobj);
}
jsonobj.put(JSON_CONF_INPUTS, outputsArray);
return jsonobj.toString();
}
public void saveTo(Path file, FileSystem fs) throws IOException {
if(!fs.exists(file.getParent())) {
fs.mkdirs(file.getParent());
}
DataOutputStream writer = fs.create(file, true, 64 * 1024);
new Text(createJson()).write(writer);
writer.close();
}
}
|
[
"iychoi@email.arizona.edu"
] |
iychoi@email.arizona.edu
|
97204411ac938ad3c0d1fe4e5d8c3adab5bd7ae4
|
df3d089799e0d73e702b289f0734f36c1f112236
|
/certification/src/com/oracle/ocpjp/ch08/format/ScannerTest.java
|
f9070d1581f57558121ce6c90d4c09c0aee29af6
|
[] |
no_license
|
cepp/certocpjp
|
177d75a4273aaccc78f1f70e99afc06b240265a5
|
f085252d37880b480e7445a1b708bb8ef0b11525
|
refs/heads/master
| 2021-01-20T00:11:06.108030
| 2017-03-08T20:24:11
| 2017-03-08T20:24:11
| 83,795,389
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 645
|
java
|
package com.oracle.ocpjp.ch08.format;
public class ScannerTest {
public static void main(String[] args) {
boolean b2, b;
int i;
String s, hits = " ";
java.util.Scanner s1 = new java.util.Scanner(args[0]);
java.util.Scanner s2 = new java.util.Scanner(args[0]);
while(b = s1.hasNext()) {
s = s1.next();
hits += "s";
}
while(b = s2.hasNext()) {
if(s2.hasNextInt()) {
i = s2.nextInt();
hits += "i";
} else if(s2.hasNextBoolean()) {
b2 = s2.nextBoolean();
hits += "b";
} else {
s2.next();
hits += "s2";
}
System.out.println("hits "+hits);
}
}
}
|
[
"ceppantoja@gmail.com"
] |
ceppantoja@gmail.com
|
d08411b1c4101e6873d3f7fc07d73ea72689dcc0
|
ba44e8867d176d74a6ca0a681a4f454ca0b53cad
|
/component/entity/PaletteRelationshipCW.java
|
e376cff9fb254fe22139cbf0bb770631e7835b11
|
[] |
no_license
|
eric2323223/FATPUS
|
1879e2fa105c7e7683afd269965d8b59a7e40894
|
989d2cf49127d88fdf787da5ca6650e2abd5a00e
|
refs/heads/master
| 2016-09-15T19:10:35.317021
| 2012-06-29T02:32:36
| 2012-06-29T02:32:36
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,218
|
java
|
package component.entity;
import com.rational.test.ft.object.interfaces.GefEditPartTestObject;
import com.sybase.automation.framework.widget.DOF;
import component.entity.model.VerificationCriteria;
import component.entity.wizard.IWizard;
public class PaletteRelationshipCW extends RelationshipCW {
@Override
public void start(String parameter) {
DOF.getPaletteRoot().click(atPath("Mobile Application Diagram->Relationship"));
GefEditPartTestObject source = DOF.getMboNameFigure(DOF.getObjectDiagramCanvas(), parameter.split(",")[0]);
GefEditPartTestObject target = DOF.getMboNameFigure(DOF.getObjectDiagramCanvas(), parameter.split(",")[1]);
source.dragToScreenPoint(atPoint(5,5),target.getScreenPoint(atPoint(5,5)));
}
@Override
public void setMapping(String mapping) {
super.setMapping(mapping);
}
@Override
public void setTarget(String str) {
super.setTarget(str);
}
@Override
public void setType(String type) {
super.setType(type);
}
public void verifyMapping(VerificationCriteria vc){
super.verifyMapping(vc);
}
public void setName(String name){
super.setName(name);
}
@Override
public IWizard canContinue(boolean b) {
this.canContinue = b;
return this;
}
}
|
[
"eric2323223@gmail.com"
] |
eric2323223@gmail.com
|
aaeaa6d33117a119c16b2da556bf8e3a1ead7ebd
|
4025af4d2bacf3568cfdd55d85573ed26d606236
|
/mybatis-3.5.2/src/test/java/org/apache/ibatis/type/SqlDateTypeHandlerTest.java
|
5c8cc6b3186472c69bfe951ba33f39bf53effbfb
|
[
"BSD-3-Clause",
"Apache-2.0"
] |
permissive
|
MooNkirA/mybatis-note
|
f3e1ede680b0f511346a649895ae1bf71c69d616
|
25e952c13406fd0579750b25089d2cf2b1bdacec
|
refs/heads/master
| 2022-03-04T20:11:26.770175
| 2021-12-18T02:31:10
| 2021-12-18T02:31:10
| 223,528,278
| 0
| 0
| null | 2021-12-18T02:31:13
| 2019-11-23T04:04:03
|
Java
|
UTF-8
|
Java
| false
| false
| 2,401
|
java
|
/**
* Copyright 2009-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a 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 org.apache.ibatis.type;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import java.util.Date;
import org.junit.jupiter.api.Test;
class SqlDateTypeHandlerTest extends BaseTypeHandlerTest {
private static final TypeHandler<java.sql.Date> TYPE_HANDLER = new SqlDateTypeHandler();
private static final java.sql.Date SQL_DATE = new java.sql.Date(new Date().getTime());
@Override
@Test
public void shouldSetParameter() throws Exception {
TYPE_HANDLER.setParameter(ps, 1, SQL_DATE, null);
verify(ps).setDate(1, SQL_DATE);
}
@Override
@Test
public void shouldGetResultFromResultSetByName() throws Exception {
when(rs.getDate("column")).thenReturn(SQL_DATE);
assertEquals(SQL_DATE, TYPE_HANDLER.getResult(rs, "column"));
verify(rs, never()).wasNull();
}
@Override
public void shouldGetResultNullFromResultSetByName() throws Exception {
// Unnecessary
}
@Override
@Test
public void shouldGetResultFromResultSetByPosition() throws Exception {
when(rs.getDate(1)).thenReturn(SQL_DATE);
assertEquals(SQL_DATE, TYPE_HANDLER.getResult(rs, 1));
verify(rs, never()).wasNull();
}
@Override
public void shouldGetResultNullFromResultSetByPosition() throws Exception {
// Unnecessary
}
@Override
@Test
public void shouldGetResultFromCallableStatement() throws Exception {
when(cs.getDate(1)).thenReturn(SQL_DATE);
assertEquals(SQL_DATE, TYPE_HANDLER.getResult(cs, 1));
verify(cs, never()).wasNull();
}
@Override
public void shouldGetResultNullFromCallableStatement() throws Exception {
// Unnecessary
}
}
|
[
"lje888@126.com"
] |
lje888@126.com
|
e857681b0e379bbe806d033861a428f1ad67c70f
|
86ad640dfe88d41195b7cd55f0e509ede4938daf
|
/src/main/java/test/Application.java
|
009df1bb8d5f6782fcce96a66e09c87dfdc82593
|
[] |
no_license
|
HibaZouhid/AOPAspectJ
|
b7fb1976074515c6b472695b8f98586f9df72808
|
95a0c099b02e0eceea3d1cf0ef7ce5730086cf43
|
refs/heads/master
| 2023-02-10T01:10:02.119272
| 2021-01-06T22:39:48
| 2021-01-06T22:39:48
| 327,445,252
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,122
|
java
|
package test;
import beans.Client;
import beans.Compte;
import java.util.Scanner;
public class Application {
public static void main(String[] args) {
System.out.println("TEST");
Scanner scanner=new Scanner(System.in);
System.out.println("nom");
String name=scanner.nextLine();
System.out.println("solde");
Double solde=scanner.nextDouble();
Compte compte=new Compte();
compte.setSolde(solde);
Client client=new Client();
client.setCp(compte);
client.setNom(name);
while (true){
try {
System.out.println("operation");
String type=scanner.next();
System.out.println("montant");
Double montant=scanner.nextDouble();
if(type.equals("v")){
client.verser(montant);
}
else if (type.equals("r")){
client.retirer(montant);
}
} catch (Exception e) {
System.out.println(e.getMessage());
}
}
}
}
|
[
"zouhidhiba@gmail.com"
] |
zouhidhiba@gmail.com
|
00e503f5c6de1fdc426ec730f7a18e9ec6e86cf4
|
3a15a1e75ac7a03afbfb13674c684dae6d2c423e
|
/app/src/androidTest/java/nl/hva/msi/bucketlist/ExampleInstrumentedTest.java
|
b63cd397b1f81611e76ff95eeb0a3df2b5d2d32c
|
[] |
no_license
|
Maicelicious/Level_4_Assignment_BucketList
|
0a4544fefa204eb171037707f0f1cadcb871d5aa
|
d59692411891436ad9f804102b6fe46b8160c4fe
|
refs/heads/master
| 2020-04-28T04:50:48.655753
| 2019-03-11T12:35:53
| 2019-03-11T12:35:53
| 174,996,343
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 726
|
java
|
package nl.hva.msi.bucketlist;
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.*;
/**
* Instrumented 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() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("nl.hva.msi.bucketlist", appContext.getPackageName());
}
}
|
[
"marco.simeth@hva.nl"
] |
marco.simeth@hva.nl
|
b63db81eadf759c0fd4c0f7ab9cc19c705d4c97b
|
549673f26216390810c05001962002d9084e5a5d
|
/src/main/java/com/rlk/mi/service/UserAccountServiceImpl.java
|
738f8db661f0dfe097a476fc3301adf99ecb5bf3
|
[] |
no_license
|
hglemon/springmvc-mybatis
|
714840fcd9cf0d76a4601a4aa521c58e9bcab177
|
d4d5528f60f4d964728ab7d5e9b67995759dc3e3
|
refs/heads/master
| 2021-01-20T11:45:22.866258
| 2015-06-25T09:55:15
| 2015-06-25T09:55:15
| 38,040,740
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 175
|
java
|
package com.rlk.mi.service;
import org.springframework.stereotype.Service;
/**
* Created by lifei.ding on 15-6-25.
*/
@Service
public interface UserAccountServiceImpl {
}
|
[
"lifei.ding@reallytek.com"
] |
lifei.ding@reallytek.com
|
03c1a4171139fa2591ba370abc35acb0219b5278
|
b07650544c1fa14785bed65400c0bef34c3c6182
|
/mr/src/main/java/org/elasticsearch/hadoop/util/FieldAlias.java
|
bd58cf620f901926c40fab1c4c8e2f29320ec57c
|
[
"Apache-2.0"
] |
permissive
|
gitbbrid/elasticsearch-hadoop
|
bbbd31610bc00b4442ceb1bb5208726978d6b137
|
93edc7219b2818430c8b100377d27c719585b363
|
refs/heads/master
| 2021-05-29T16:25:16.400285
| 2015-06-12T18:00:44
| 2015-06-12T18:00:44
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,765
|
java
|
/*
* Licensed to Elasticsearch under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless 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 org.elasticsearch.hadoop.util;
import java.util.LinkedHashMap;
import java.util.Locale;
import java.util.Map;
/**
* Simple class for providing basic aliases for fields.
*/
public class FieldAlias {
private final Map<String, String> fieldToAlias;
private final boolean caseInsensitive;
public FieldAlias(boolean caseInsensitive) {
this(new LinkedHashMap<String, String>(), caseInsensitive);
}
public FieldAlias(Map<String, String> alias, boolean caseInsensitive) {
this.fieldToAlias = alias;
this.caseInsensitive = caseInsensitive;
}
public String toES(String string) {
String alias = fieldToAlias.get(string);
if (alias == null) {
alias = (caseInsensitive ? string.toLowerCase(Locale.ENGLISH) : string);
fieldToAlias.put(string, alias);
}
return alias;
}
@Override
public String toString() {
return fieldToAlias.toString();
}
}
|
[
"costin.leau@gmail.com"
] |
costin.leau@gmail.com
|
4a614b8c6a37d24b625bbfd460dc764c04d565f5
|
828ac54c9b7090a0831fce36508fef4cba0091c3
|
/src/test/java/com/waynik/lambda/monitor/findAbsentUsersTest.java
|
671b35e610c488a94b5d32ad39528040d34ceecf
|
[] |
no_license
|
dadeg/waynik-lambda-monitor
|
6772c51d6d284888743607df5b3a654895b624e7
|
76a4c42ae4c7465b8aec4bf376e8ca130d30d967
|
refs/heads/master
| 2021-05-02T18:29:50.946557
| 2018-02-07T19:59:30
| 2018-02-07T19:59:30
| 120,664,682
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,051
|
java
|
package com.waynik.lambda.monitor;
import java.io.IOException;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
import com.amazonaws.services.lambda.runtime.Context;
/**
* A simple test harness for locally invoking your Lambda function handler.
*/
public class findAbsentUsersTest {
private static Object input;
@BeforeClass
public static void createInput() throws IOException {
// TODO: set up your sample input object here.
input = null;
}
private Context createContext() {
TestContext ctx = new TestContext();
// TODO: customize your context here if needed.
ctx.setFunctionName("Your Function Name");
return ctx;
}
@Test
public void testfindAbsentUsers() {
FindAbsentUsers handler = new FindAbsentUsers();
Context ctx = createContext();
int output = handler.handleRequest(input, ctx);
// TODO: validate output here if needed.
Assert.assertEquals("Hello from Lambda!", output);
}
}
|
[
"daniel_degreef@condenast.com"
] |
daniel_degreef@condenast.com
|
6055018f7baae71f726c75c613f2ff168cd2b1d9
|
ae25a3e809a6b81ea384159ebc843903e9c1f1e0
|
/src/main/java/com/orangeblue/springbootaws/domain/user/User.java
|
2f48f1aab3abd8f415780e6c3400e09d71dadb46
|
[] |
no_license
|
arangeblue/springboot-aws
|
eef555f933bd6a5e3b70182c77ab3d021ae2d696
|
3441c6f424aec50660336d158c60c976c659fe2b
|
refs/heads/master
| 2023-07-25T00:52:45.918296
| 2021-09-07T13:06:27
| 2021-09-07T13:06:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,277
|
java
|
package com.orangeblue.springbootaws.domain.user;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import com.orangeblue.springbootaws.domain.BaseTimeEntity;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
@Getter
@NoArgsConstructor
@Entity
public class User extends BaseTimeEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Column(nullable = false)
private String name;
@Column(nullable = false)
private String email;
@Column
private String picture;
@Enumerated(EnumType.STRING)
@Column(nullable = false)
private Role role;
@Builder
public User(String name, String email, String picture, Role role) {
this.name = name;
this.email = email;
this.picture = picture;
this.role = role;
}
public User update(String name, String picture) {
this.name = name;
this.picture = picture;
return this;
}
public String getRoleKey() {
return this.role.getKey();
}
}
|
[
"black1848@naver.com"
] |
black1848@naver.com
|
1586a8e59e57dfd77e1e29bcf4e2d68c71a9b7a7
|
76f3cfa06e16f7e1a3ed20cb921cf4ad82f8b659
|
/src/main/java/net/stupkin/jm_spring_boot/JmSpringBootApplication.java
|
29a8be93a5272ae8bda1df0b36375fd065238224
|
[] |
no_license
|
doChoice/jm_spring_bootstrap
|
8f09d576c19e49e1d197ea6996bdd3450e6112f4
|
900a4afc650373cd594f2efdfcc9989c6dd660c4
|
refs/heads/main
| 2023-05-31T00:37:49.910073
| 2021-07-09T10:17:08
| 2021-07-09T10:17:08
| 376,527,747
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 344
|
java
|
package net.stupkin.jm_spring_boot;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class JmSpringBootApplication {
public static void main(String[] args) {
SpringApplication.run(JmSpringBootApplication.class, args);
}
}
|
[
"stupkin80@gmail.com"
] |
stupkin80@gmail.com
|
19227349c9d08bb47b593523246def73ca24b718
|
c57f524643a693a572e845671fe637d1325619b3
|
/src/main/java/am/itspace/newfeaturesinjava8/service/stream/StreamMap.java
|
2e4e45195732edd7b822dc51bdf66104c676b29c
|
[] |
no_license
|
tigran1999/java8features
|
5acf0ff793e08fed729f6e7e892f37eaaae16d05
|
051981c7dc84e1ad77427dfa1a7d26cb5997e042
|
refs/heads/master
| 2020-05-03T01:47:53.279161
| 2019-03-31T10:12:22
| 2019-03-31T10:12:22
| 178,348,478
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 658
|
java
|
package am.itspace.newfeaturesinjava8.service.stream;
import am.itspace.newfeaturesinjava8.model.User;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import static am.itspace.newfeaturesinjava8.util.UsersUtil.users;
@Service
public class StreamMap {
public void printAllUsersNames() {
users().stream()
.map(User::getName)
.forEach(System.out::println);
}
public void capitalizeUsersNames() {
users().stream()
.map(User::getName)
.map(StringUtils::capitalize)
.forEach(System.out::println);
}
}
|
[
"tigran@itspace.am"
] |
tigran@itspace.am
|
2115a3ff130f87d9daa01fb856882eb3b498b243
|
78d386fd05d7e2b5595c2833a62c13cbcbc6b52f
|
/Code/RPG/core/src/com/quickmathstudios/dieelite/minigames/rowing/Minigame.java
|
d1c022d50a022119de96bca8ed3d7d635f149023
|
[] |
no_license
|
KoehlerT/DieElite
|
8a76a21ccc8821661e4fb756aed5bd4f3d80c57c
|
8321acf6c6d961cd79abb9847501149539934194
|
refs/heads/master
| 2021-04-06T11:04:02.426211
| 2018-06-25T14:25:21
| 2018-06-25T14:25:21
| 125,081,102
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,188
|
java
|
package com.quickmathstudios.dieelite.minigames.rowing;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.Animation;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.badlogic.gdx.math.Vector2;
import com.badlogic.gdx.utils.Disposable;
import com.quickmathstudios.dieelite.minigames.rowing.swimming.Chainsaw;
import com.quickmathstudios.dieelite.minigames.rowing.swimming.Fish;
import com.quickmathstudios.dieelite.minigames.rowing.swimming.SwimmingObject;
import javax.xml.soap.Text;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.Random;
class FrameLocation{
public FrameLocation(TextureRegion tr, Vector2 vec){
frame = tr; location = vec;
}
public TextureRegion frame;
public Vector2 location;
}
public class Minigame implements Disposable {
private Texture background;
private Texture message;
private float animationTime = 0f;
private boolean started = false;
private PlayerFish player;
private int Score = 0;
private ArrayList<SwimmingObject> swimmingObjects = new ArrayList<>();
private Random random = new Random();
public Minigame(){
background = new Texture("minigames/row/background.jpg");
message = new Texture("minigames/row/message.png");
player = new PlayerFish();
}
//Controlling
public List<SwimmingObject> getObjects(){
return swimmingObjects;
}
public PlayerFish getPlayer() {
return player;
}
public void SpawnObject(int identifier){
int height = random.nextInt(700);
if (identifier == 0){
swimmingObjects.add(new Fish(height));
}else if (identifier == 1){
swimmingObjects.add(new Chainsaw(height));
}
}
public void incrementAnimationtime(float increment) {
this.animationTime +=increment;
}
public void incrementScore(int increment){
this.Score += increment;
}
//Getter
public Texture getBackground(){
return background;
}
public FrameLocation[] getFrameLocations(){
if (!started){
//Display Message (Super Transparent!)
return new FrameLocation[]{new FrameLocation(TextureRegion.split(message,message.getWidth(),message.getHeight())[0][0],new Vector2(250,300))};
}
FrameLocation[] result = new FrameLocation[1+swimmingObjects.size()];
result[0] = new FrameLocation(player.getTextureRegion(animationTime),player.getLocation());
for (int i = 0; i < swimmingObjects.size(); i++){
result[i+1] = new FrameLocation(swimmingObjects.get(i).getTextureRegion(animationTime),swimmingObjects.get(i).getLocation());
}
return result;
}
public int getScore() {
return Score;
}
public boolean running(){
return started;
}
public void start(){
started = true;
}
@Override
public void dispose() {
player.dispose();
message.dispose();
for(int i = 0; i < swimmingObjects.size(); i++){
swimmingObjects.get(i).dispose();
}
}
}
|
[
"tim.koehler.net@gmail.com"
] |
tim.koehler.net@gmail.com
|
d7dc06fa35cf7a88363a2907e25cd725c2e6185c
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Time/23/org/joda/time/DateTime_toLocalDateTime_1469.java
|
4262fdf5cbf3c970e5e231b2a60ab8c17ecfe0d5
|
[] |
no_license
|
hvdthong/NetML
|
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
|
9bb103da21327912e5a29cbf9be9ff4d058731a5
|
refs/heads/master
| 2021-06-30T15:03:52.618255
| 2020-10-07T01:58:48
| 2020-10-07T01:58:48
| 150,383,588
| 1
| 1
| null | 2018-09-26T07:08:45
| 2018-09-26T07:08:44
| null |
UTF-8
|
Java
| false
| false
| 3,374
|
java
|
org joda time
date time datetim standard implement unmodifi datetim
code date time datetim code wide implement
link readabl instant readableinst instant repres exact
point time line limit precis millisecond
code date time datetim code calcul field respect
link date time zone datetimezon time zone
intern hold piec data firstli hold
datetim millisecond java epoch t00 01t00 00z
hold link chronolog determin
millisecond instant convert date time field
chronolog link iso chronolog isochronolog agre
intern standard compat modern gregorian calendar
individu field queri wai
code hour dai gethourofdai code
code hour dai hourofdai code
techniqu access method
field
numer
text
text
maximum minimum valu
add subtract
set
round
date time datetim thread safe immut provid chronolog
standard chronolog class suppli thread safe immut
author stephen colebourn
author kandarp shah
author brian neill o'neil
mutabl date time mutabledatetim
date time datetim
convert object code local date time localdatetim code
datetim chronolog
local date time localdatetim datetim chronolog
local date time localdatetim local date time tolocaldatetim
local date time localdatetim milli getmilli chronolog getchronolog
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
01afc822c86d385debdf912cdb06fd8f3808f5a8
|
7f20b1bddf9f48108a43a9922433b141fac66a6d
|
/csplugins/trunk/ucsd/rmkelley/BetweenPathway/BetweenPathwayThread.java
|
b7426ad5fa407a0505575da8847adf3033292b60
|
[] |
no_license
|
ahdahddl/cytoscape
|
bf783d44cddda313a5b3563ea746b07f38173022
|
a3df8f63dba4ec49942027c91ecac6efa920c195
|
refs/heads/master
| 2020-06-26T16:48:19.791722
| 2013-08-28T04:08:31
| 2013-08-28T04:08:31
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 11,828
|
java
|
package ucsd.rmkelley.BetweenPathway;
import java.io.*;
import java.util.*;
import edu.umd.cs.piccolo.activities.*;
import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
import javax.swing.JOptionPane;
import giny.view.NodeView;
import giny.model.*;
import cytoscape.plugin.CytoscapePlugin;
import cytoscape.Cytoscape;
import cytoscape.CyNetwork;
import cytoscape.view.CyNetworkView;
import phoebe.PNodeView;
import phoebe.PGraphView;
import cytoscape.data.Semantics;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.table.*;
import java.awt.BorderLayout;
import java.awt.event.*;
import cytoscape.layout.*;
import java.awt.Dimension;
class BetweenPathwayThread extends Thread{
double absent_score = .00001;
double logBeta = Math.log(0.9);
double logOneMinusBeta = Math.log(0.1);
BetweenPathwayOptions options;
Vector results;
CyNetwork physicalNetwork;
CyNetwork geneticNetwork;
public BetweenPathwayThread(BetweenPathwayOptions options){
this.options = options;
}
public void setPhysicalNetwork(CyNetwork physicalNetwork){
this.physicalNetwork = physicalNetwork;
}
public void setGeneticNetwork(CyNetwork geneticNetwork){
this.geneticNetwork = geneticNetwork;
}
public void loadPhysicalScores(File physicalFile){}
public void loadGeneticScores(File geneticFile){}
public void run(){
//number of physical interactions allowed between pathways
int cross_count_limit = 1;
//get the two networks which will be used for the search
//CyNetwork physicalNetwork = options.physicalNetwork;
//CyNetwork geneticNetwork = options.geneticNetwork;
//validate the user input
if(physicalNetwork == null){
throw new RuntimeException("No physical network");
}
if(geneticNetwork == null){
throw new RuntimeException("No genetic network");
}
//set up the array of genetic scores
double [][] geneticScores = null,physicalScores = null;
try{
geneticScores = getScores(options.geneticScores,geneticNetwork);
}catch(IOException io){
throw new RuntimeException("Error loading genetic score file");
}
try{
physicalScores = getScores(options.physicalScores,physicalNetwork);
}catch(IOException io){
throw new RuntimeException("Error loading physical score file");
}
results = new Vector();
//start a search from each individual genetic interactions
ProgressMonitor myMonitor = null;
int progress = 0;
Iterator geneticIt = null;
if(options.selectedSearch){
geneticIt = geneticNetwork.getFlaggedEdges().iterator();
myMonitor = new ProgressMonitor(Cytoscape.getDesktop(),null,"Searching for Network Models",0,geneticNetwork.getFlaggedEdges().size());
}
else{
geneticIt = geneticNetwork.edgesIterator();
myMonitor = new ProgressMonitor(Cytoscape.getDesktop(),null,"Searching for Network Models",0,geneticNetwork.getEdgeCount());
}
myMonitor.setMillisToPopup(1);
while(geneticIt.hasNext()){
if(myMonitor.isCanceled()){
throw new RuntimeException("Search cancelled");
}
myMonitor.setProgress(progress++);
Edge seedInteraction = (Edge)geneticIt.next();
int cross_count_total = 0;
int score = 0;
//performs a sanity check, shouldn't have a genetic interaction between a gene and itself
if(seedInteraction.getSource().getRootGraphIndex() == seedInteraction.getTarget().getRootGraphIndex()){
break;
}
//initialize the sets that represent the two pathways
Set [] members = new Set[2];
members[0] = new HashSet();
members[1] = new HashSet();
members[0].add(seedInteraction.getSource());
members[1].add(seedInteraction.getTarget());
//initialize the sets that represent the neighbors in the physical network
Set [] neighbors = new Set[2];
for(int idx = 0;idx<neighbors.length;idx++){
Node member = (Node)members[idx].iterator().next();
if(physicalNetwork.containsNode(member)){
neighbors[idx] = new HashSet(physicalNetwork.neighborsList(member));
}
else{
neighbors[idx] = new HashSet();
}
}
if(neighbors[1].contains(members[0].iterator().next())){
cross_count_total++;
}
boolean improved = true;
double significant_increase = 0;
while(improved){
improved = false;
if(myMonitor.isCanceled()){
throw new RuntimeException("Search cancelled");
}
for(int idx=0;idx<2;idx++){
int opposite = 1-idx;
Node bestCandidate = null;
double best_increase = significant_increase;
int best_cross_count = 0;
//keeps track of nodes which will have to be removed (from where?)
Vector remove = new Vector();
//iterate through neighbors in the physical network and calculate a score for each
for(Iterator candidateIt = neighbors[idx].iterator();candidateIt.hasNext();){
double increase = 0;
Node candidate = (Node)candidateIt.next();
//this neighbor is already the member of a pathway, we don't want to consider it further as a neigbhor
if(members[0].contains(candidate) || members[1].contains(candidate)){
remove.add(candidate);
continue;
}
//determine how many cross pathway interactions adding in this neighbor would induce,
//we want to make sure that we do not exceed the limit
int cross_count = cross_count_total;
for(Iterator candidateNeighborIt = physicalNetwork.neighborsList(candidate).iterator();candidateNeighborIt.hasNext();){
if(members[opposite].contains(candidateNeighborIt.next())){
cross_count++;
if(cross_count >= cross_count_limit){
break;
}
}
}
if(cross_count >= cross_count_limit){
continue;
}
increase += calculateIncrease(physicalNetwork,physicalScores,members[idx],candidate);
increase += calculateIncrease(geneticNetwork,geneticScores,members[opposite],candidate);
//if necessary, update the information for the best candidate
//found so far
if(increase > best_increase){
bestCandidate = candidate;
best_increase = increase;
best_cross_count = cross_count;
}
}
neighbors[idx].removeAll(remove);
if(best_increase > significant_increase){
improved = true;
score += best_increase;
cross_count_total = best_cross_count;
members[idx].add(bestCandidate);
neighbors[idx].addAll(physicalNetwork.neighborsList(bestCandidate));
neighbors[idx].remove(bestCandidate);
}
}
}
results.add(new NetworkModel(progress,members[0],members[1],score,score,score,score));
}
myMonitor.close();
Collections.sort(results);
results = prune(results);
JDialog betweenPathwayDialog = new BetweenPathwayResultDialog(geneticNetwork, physicalNetwork, results);
betweenPathwayDialog.show();
}
public Vector getResults(){
return results;
}
protected Vector prune(Vector old){
Vector results = new Vector();
ProgressMonitor myMonitor = new ProgressMonitor(Cytoscape.getDesktop(),"Pruning results",null,0,100);
myMonitor.setMillisToPopup(50);
int update_interval = (int)Math.ceil(old.size()/100.0);
int count = 0;
for(Iterator modelIt = old.iterator();modelIt.hasNext();){
if(myMonitor.isCanceled()){
throw new RuntimeException("Search cancelled");
}
if(count%update_interval == 0){
myMonitor.setProgress(count/update_interval);
}
boolean overlap = false;
NetworkModel current = (NetworkModel)modelIt.next();
if(current.one.size() < 2 || current.two.size() < 2 || current.score < options.cutoff){
overlap = true;
}
else{
for(Iterator oldModelIt = results.iterator();oldModelIt.hasNext();){
NetworkModel oldModel = (NetworkModel)oldModelIt.next();
if(overlap(oldModel,current)){
overlap = true;
break;
}
}
}
if(!overlap){
results.add(current);
}
}
myMonitor.close();
return results;
}
public boolean overlap(NetworkModel one, NetworkModel two){
return (intersection(one.one,two.one)>0.33 && intersection(one.two,two.two)>0.33) || (intersection(one.one,two.two) > 0.33 && intersection(one.two,two.one) > 0.33);
}
public double intersection(Set one, Set two){
int size = one.size() + two.size();
int count = 0;
for(Iterator nodeIt = one.iterator() ; nodeIt.hasNext() ;){
if(two.contains(nodeIt.next())){
count++;
}
}
return count/(double)(size-count);
}
public double calculateIncrease(CyNetwork cyNetwork, double[][] scores, Set memberSet, Node candidate){
double result = 0;
if(cyNetwork.containsNode(candidate)){
int candidate_index = cyNetwork.getIndex(candidate);
for(Iterator memberIt = memberSet.iterator();memberIt.hasNext();){
Node member = (Node)memberIt.next();
if(cyNetwork.containsNode(member)){
int member_index = cyNetwork.getIndex(member);
int one,two;
if(candidate_index < member_index){
one = member_index-1;
two = candidate_index-1;
}
else{
one = candidate_index-1;
two = member_index-1;
}
if(cyNetwork.isNeighbor(candidate,member)){
result += logBeta;
result -= Math.log(scores[one][two]);
}
else{
result += logOneMinusBeta;
result -= Math.log(1-scores[one][two]);
}
}
else{
result += logOneMinusBeta;
result -= Math.log(1-absent_score);
}
}
}
else{
result = memberSet.size()*(logOneMinusBeta-Math.log(1-absent_score));
}
return result;
}
public double [][] getScores(File scoreFile, CyNetwork cyNetwork) throws IOException{
double [][] result = new double[cyNetwork.getNodeCount()][];
String [] names = new String [cyNetwork.getNodeCount()];
for(int idx=result.length-1;idx>-1;idx--){
result[idx] = new double[idx];
}
ProgressMonitor myMonitor = new ProgressMonitor(Cytoscape.getDesktop(),"Loading scores for "+cyNetwork.getTitle(),null,0,100);
myMonitor.setMillisToDecideToPopup(50);
int updateInterval = (int)Math.ceil(cyNetwork.getNodeCount()/100.0);
BufferedReader reader = null;
try{
reader = new BufferedReader(new FileReader(scoreFile));
}catch(Exception e){
throw new RuntimeException("Error loading score file for "+cyNetwork.getTitle());
}
int line_number = 0;
int progress = 0;
String iterationString = reader.readLine();
double iterations = (new Integer(iterationString)).doubleValue();
while(reader.ready()){
String line = reader.readLine();
String [] splat = line.split("\t");
if(line_number%updateInterval == 0){
if(myMonitor.isCanceled()){
throw new RuntimeException("Score loading cancelled");
}
myMonitor.setProgress(progress++);
}
names[line_number++] = splat[0];
if(splat.length != line_number){
throw new RuntimeException("Score file in incorrect format");
}
int one;
try{
one = cyNetwork.getIndex(Cytoscape.getCyNode(splat[0]));
}catch(Exception e){
throw new RuntimeException("Score file contains proteins not present in the network");
}
for(int idx=1;idx<splat.length;idx++){
int two;
try{
two = cyNetwork.getIndex(Cytoscape.getCyNode(names[idx-1]));
}catch(Exception e){
throw new RuntimeException("Score file contains proteins not present in the network");
}
if(one < two){
result[two-1][one-1] = (new Integer(splat[idx])).intValue()/iterations;
}
else{
result[one-1][two-1] = (new Integer(splat[idx])).intValue()/iterations;
}
}
}
myMonitor.close();
if(line_number != cyNetwork.getNodeCount()){
throw new RuntimeException("The number of proteins in the network and score file do not match");
}
return result;
}
}
|
[
"rmkelley@0ecc0d97-ab19-0410-9704-bfe1a75892f5"
] |
rmkelley@0ecc0d97-ab19-0410-9704-bfe1a75892f5
|
ca15bd1645196df44157f3f09534c8a20ab8f859
|
870e7c62301be8a7ed4118577651257c72ee5c53
|
/cm-eureka-server/src/test/java/com/bbva/microservices/ApplicationTests.java
|
ee893500672884f9b02528e2d18c5e9f15724c4d
|
[] |
no_license
|
VictorEspiritu/hackathon-gestor-comunicaciones
|
e4728dd89b5e3a032fa7b9ea4f3d7d5bf73edfcb
|
c4313cf1804f12bd9dee66d9def1a24ae6da83ec
|
refs/heads/master
| 2021-01-20T13:17:24.452259
| 2017-05-18T19:40:40
| 2017-05-18T19:40:40
| 90,468,985
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 333
|
java
|
package com.bbva.microservices;
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 ApplicationTests {
@Test
public void contextLoads() {
}
}
|
[
"victor.espiritu@bbva.com"
] |
victor.espiritu@bbva.com
|
12b8557fb1baece3fa9a60243dbc36fd79e02640
|
b15e33c251c7962710f21f9653195e5817b6dc38
|
/app/src/main/java/com/kmk/motatawera/student/ui/StartQuizActivity.java
|
a004907b6cbc40deb594e056ed9d97edd98ba7ef
|
[] |
no_license
|
kirolosibrahim/MotataweraStudent
|
e2109fada1f4e39fdb9cde9a33bb78e0df131d7e
|
c8086df2d908fa9c8e87bb407c2ab325b71e34ee
|
refs/heads/master
| 2023-07-20T09:22:08.199849
| 2021-09-06T17:55:23
| 2021-09-06T17:55:39
| 403,712,885
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 9,178
|
java
|
package com.kmk.motatawera.student.ui;
import android.content.Intent;
import android.os.Bundle;
import android.os.CountDownTimer;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.DataBindingUtil;
import com.google.firebase.firestore.FirebaseFirestore;
import com.kmk.motatawera.student.R;
import com.kmk.motatawera.student.databinding.ActivityStartQuizBinding;
import com.kmk.motatawera.student.model.QuestionsModel;
import com.kmk.motatawera.student.storage.SharedPrefManager;
import com.kmk.motatawera.student.ui.main.MainActivity;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
public class StartQuizActivity extends AppCompatActivity {
List<QuestionsModel> list;
private String currentUserId;
FirebaseFirestore db;
private String quizId;
private boolean isQuizFinish = true;
public int counter;
//UI Elements
ActivityStartQuizBinding binding;
private boolean canAnswer = false;
private int currentQuestion;
private int index = 1;
private int correctAnswers = 0;
private int wrongAnswers = 0;
private String quizTitlee, CorrectAnswer;
CountDownTimer countDownTimer;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
binding = DataBindingUtil.setContentView(this, R.layout.activity_start_quiz);
db = FirebaseFirestore.getInstance();
list = new ArrayList<>();
quizId = getIntent().getStringExtra("id");
quizTitlee = getIntent().getStringExtra("titel");
currentUserId = SharedPrefManager.getInstance().getUser(this).getId();
db.collection("quiz")
.document(quizId).collection("Questions")
.get()
.addOnCompleteListener(task -> {
list = task.getResult().toObjects(QuestionsModel.class);
Collections.shuffle(list);
timer();
onClick();
loadUI();
});
}
private void loadUI() {
//Quiz Data Loaded, Load the UI
binding.quizTitle.setText(quizTitlee);
binding.quizQuestion.setText(R.string.load_firs_question);
//Load First Question
loadQuestion(1);
}
private void loadQuestion(int questNum) {
//Set Question Number
binding.quizQuestionNumber.setText(questNum + "");
//Load Question Text
binding.quizQuestion.setText(list.get(questNum - 1).getQuestion());
//Load Options
binding.rbA1.setText(list.get(questNum - 1).getAnswer1());
binding.rbA2.setText(list.get(questNum - 1).getAnswer2());
binding.rbA3.setText(list.get(questNum - 1).getAnswer3());
binding.rbA4.setText(list.get(questNum - 1).getAnswer4());
CorrectAnswer = list.get(questNum - 1).getCorrectAnswer();
// Toast.makeText(this, CorrectAnswer, Toast.LENGTH_SHORT).show();
//Question Loaded, Set Can Answer
canAnswer = true;
currentQuestion = questNum;
//Start Question Timer
//startTimer(questNum);
}
private void submitResults() {
HashMap<String, Object> resultMap = new HashMap<>();
resultMap.put("questions_number", list.size());
resultMap.put("correct", correctAnswers);
resultMap.put("wrong", wrongAnswers);
resultMap.put("quiz_id", quizId);
resultMap.put("student_id", currentUserId);
resultMap.put("quizFinished", isQuizFinish);
db.collection("quiz").document(quizId).collection("score").add(resultMap).addOnCompleteListener(task -> {
String id = task.getResult().getId();
db.collection("quiz").document(quizId).collection("score").document(id).update("id", id);
});
}
private void onClick() {
binding.quizNextBtn.setOnClickListener(v -> {
if (currentQuestion == list.size()) {
finish();
checkradiobtn();
Toast.makeText(StartQuizActivity.this, R.string.exam_finish, Toast.LENGTH_SHORT).show();
Intent i = new Intent(StartQuizActivity.this, MainActivity.class);
startActivity(i);
countDownTimer.cancel();
submitResults();
} else {
checkradiobtn();
loadQuestion(currentQuestion + 1);
countDownTimer.cancel();
countDownTimer.start();
}
});
}
private void checkradiobtn() {
if (binding.rbA1.isChecked()) {
if (binding.rbA1.getText().equals(CorrectAnswer)) {
// Toast.makeText(this, "correct Answer", Toast.LENGTH_SHORT).show();
correctAnswers++;
// Toast.makeText(this, String.valueOf(correctAnswers), Toast.LENGTH_SHORT).show();
} else {
// Toast.makeText(this, "Not Correct Answer", Toast.LENGTH_SHORT).show();
wrongAnswers++;
// Toast.makeText(this, String.valueOf(wrongAnswers), Toast.LENGTH_SHORT).show();
}
}
if (binding.rbA2.isChecked()) {
if (binding.rbA2.getText().equals(CorrectAnswer)) {
// Toast.makeText(this, "correct Answer", Toast.LENGTH_SHORT).show();
correctAnswers++;
// Toast.makeText(this, String.valueOf(correctAnswers), Toast.LENGTH_SHORT).show();
} else {
// Toast.makeText(this, "Not Correct Answer", Toast.LENGTH_SHORT).show();
wrongAnswers++;
// Toast.makeText(this, String.valueOf(wrongAnswers), Toast.LENGTH_SHORT).show();
}
}
if (binding.rbA3.isChecked()) {
if (binding.rbA3.getText().equals(CorrectAnswer)) {
// Toast.makeText(this, "correct Answer", Toast.LENGTH_SHORT).show();
correctAnswers++;
// Toast.makeText(this, String.valueOf(correctAnswers), Toast.LENGTH_SHORT).show();
} else {
// Toast.makeText(this, "Not Correct Answer", Toast.LENGTH_SHORT).show();
wrongAnswers++;
// Toast.makeText(this, String.valueOf(wrongAnswers), Toast.LENGTH_SHORT).show();
}
}
if (binding.rbA4.isChecked()) {
if (binding.rbA4.getText().equals(CorrectAnswer)) {
// Toast.makeText(this, "correct Answer", Toast.LENGTH_SHORT).show();
correctAnswers++;
//Toast.makeText(this, String.valueOf(correctAnswers), Toast.LENGTH_SHORT).show();
} else {
//Toast.makeText(this, "Not Correct Answer", Toast.LENGTH_SHORT).show();
wrongAnswers++;
// Toast.makeText(this, String.valueOf(wrongAnswers), Toast.LENGTH_SHORT).show();
}
}
binding.rbA1.setChecked(true);
if (currentQuestion == (list.size() - 1)) {
binding.quizNextBtn.setText(R.string.finish_exam);
}
}
private void timer() {
countDownTimer = new CountDownTimer(10000, 1000) {
public void onTick(long millisUntilFinished) {
binding.txtCount.setText(String.valueOf(millisUntilFinished / 1000));
}
public void onFinish() {
if (currentQuestion == list.size()) {
checkradiobtn();
Toast.makeText(StartQuizActivity.this, R.string.exam_finish, Toast.LENGTH_SHORT).show();
countDownTimer.cancel();
finish();
Intent i = new Intent(StartQuizActivity.this, MainActivity.class);
startActivity(i);
submitResults();
} else {
checkradiobtn();
loadQuestion(currentQuestion + 1);
countDownTimer.cancel();
countDownTimer.start();
}
}
}.start();
}
@Override
public void onBackPressed() {
super.onBackPressed();
if (correctAnswers == 0) {
wrongAnswers = list.size();
finish();
Intent i = new Intent(StartQuizActivity.this, MainActivity.class);
startActivity(i);
submitResults();
} else {
wrongAnswers = (list.size() - correctAnswers);
finish();
Intent i = new Intent(StartQuizActivity.this, MainActivity.class);
startActivity(i);
submitResults();
}
}
@Override
protected void onDestroy() {
super.onDestroy();
if (countDownTimer != null) {
countDownTimer.cancel();
}
}
@Override
protected void onUserLeaveHint() {
super.onUserLeaveHint();
finish();
Intent i = new Intent(StartQuizActivity.this, MainActivity.class);
startActivity(i);
submitResults();
}
}
|
[
"kirolos.ibrahim65@gmail.com"
] |
kirolos.ibrahim65@gmail.com
|
7fb2cdfb2ffb7a901a0e45609d0a4324db3c91d3
|
7ea27ee9452fb1d0fd1f9bbf0be82d2b04bf21b4
|
/src/br/ufrj/macae/tic/modelo/dao/DispositionDAO.java
|
22336994fab0ce7413c37d7627db368331d14105
|
[] |
no_license
|
freshwaterFishData/freshwaterFishData
|
8d30f45fed9683e23c49a8b3eaabe7f6af0a26de
|
24ca75dd172fe12ae471afac9af58fc804e29c89
|
refs/heads/master
| 2021-04-15T10:41:57.185001
| 2018-03-21T17:22:06
| 2018-03-21T17:22:06
| 126,187,031
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 406
|
java
|
package br.ufrj.macae.tic.modelo.dao;
import java.io.Serializable;
import br.ufrj.macae.tic.persistence.dao.hibernate.AbstractGenericDAOHibernate;
import br.ufrj.macae.tic.persistence.entity.Disposition;
public class DispositionDAO extends AbstractGenericDAOHibernate<Disposition, Integer> implements Serializable {
/**
*
*/
private static final long serialVersionUID = -432233253699436084L;
}
|
[
"heldercosme@macae.ufrj.br"
] |
heldercosme@macae.ufrj.br
|
66f249518875ab24452136bfe4afd11cfdead69e
|
c79add78151322c0f0efe01c6eb4c4cefae86ee5
|
/Final Project/3D synthesis/3D synthesis/src/utils/PanelSizedX.java
|
be3aac67f8067c5a2b005468af30c1d943756ae5
|
[] |
no_license
|
ChristopheVuong/PACT_2017-2018
|
57c96a79bb1ce4892418ab2ad91b4a8cf8d171c4
|
2247156b4b624d0f7c48dde357fed772a66a6f6c
|
refs/heads/master
| 2020-08-06T20:19:07.705543
| 2019-10-06T11:23:41
| 2019-10-06T11:23:41
| 213,139,433
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 930
|
java
|
package utils;
import java.awt.Dimension;
import java.awt.LayoutManager;
import javax.swing.JPanel;
public class PanelSizedX extends JPanel {
private static final long serialVersionUID = 6943193250939856586L;
private int dimensionX;
public PanelSizedX(final int dimensionX) {
super();
initPanelSized(dimensionX);
}
public PanelSizedX(final LayoutManager layout, final int dimensionX) {
super(layout);
initPanelSized(dimensionX);
}
private void initPanelSized(final int dimensionX) {
this.dimensionX = dimensionX;
}
@Override
public Dimension getMinimumSize() {
return new Dimension(dimensionX,(int)super.getMinimumSize().getHeight());
}
@Override
public Dimension getPreferredSize() {
return new Dimension(dimensionX,(int)super.getPreferredSize().getHeight());
}
@Override
public Dimension getMaximumSize() {
return new Dimension(dimensionX,(int)super.getMaximumSize().getHeight());
}
}
|
[
"christophe108apb@gmail.com"
] |
christophe108apb@gmail.com
|
528695b3542c0bdb9a8906d5b9fa29c313f42bf0
|
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
|
/crash-reproduction-new-fitness/results/XCOMMONS-1057-1-2-Single_Objective_GGA-IntegrationSingleObjective-BasicBlockCoverage-opt/org/xwiki/extension/job/internal/AbstractInstallPlanJob$ModifableExtensionPlanTree_ESTest_scaffolding.java
|
6c726d1b6e1fab03f3e642d218fd08d664fe3502
|
[
"MIT",
"CC-BY-4.0"
] |
permissive
|
STAMP-project/Botsing-basic-block-coverage-application
|
6c1095c6be945adc0be2b63bbec44f0014972793
|
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
|
refs/heads/master
| 2022-07-28T23:05:55.253779
| 2022-04-20T13:54:11
| 2022-04-20T13:54:11
| 285,771,370
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 32,748
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Fri Oct 29 10:19:31 UTC 2021
*/
package org.xwiki.extension.job.internal;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class AbstractInstallPlanJob$ModifableExtensionPlanTree_ESTest_scaffolding {
@org.junit.Rule
public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
@BeforeClass
public static void initEvoSuiteFramework() {
org.evosuite.runtime.RuntimeSettings.className = "org.xwiki.extension.job.internal.AbstractInstallPlanJob$ModifableExtensionPlanTree";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
org.evosuite.runtime.GuiSupport.setHeadless();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
org.evosuite.runtime.agent.InstrumentingAgent.activate();
}
@After
public void doneWithTestCase(){
threadStopper.killAndJoinClientThreads();
org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(AbstractInstallPlanJob$ModifableExtensionPlanTree_ESTest_scaffolding.class.getClassLoader() ,
"org.jfree.data.time.TimeTableXYDataset",
"org.apache.hadoop.util.Shell$OSType",
"org.apache.hadoop.fs.FileSystem",
"org.infinispan.stream.impl.TerminalFunctions$MaxLongFunction",
"org.infinispan.stream.StreamMarshalling$EqualityPredicate",
"org.infinispan.commons.marshall.MarshallableFunctions$SetValueReturnPrevOrNull",
"org.jfree.data.time.Minute",
"org.apache.commons.lang3.StringUtils",
"org.xwiki.extension.version.Version",
"org.xwiki.extension.version.VersionRange",
"org.jfree.data.general.ValueDataset",
"org.infinispan.commons.marshall.MarshallableFunctions$RemoveReturnPrevOrNull",
"org.xwiki.job.AbstractJob",
"org.apache.hadoop.conf.Configuration",
"org.xwiki.observation.event.FilterableEvent",
"org.xwiki.extension.wrap.AbstractWrappingObject",
"org.xwiki.component.manager.CompatibilityComponentManager",
"org.jfree.data.general.AbstractSeriesDataset",
"org.jfree.data.xy.DefaultTableXYDataset",
"org.infinispan.stream.impl.DistributedCacheStream",
"org.apache.hadoop.classification.InterfaceStability$Stable",
"org.jfree.data.RangeInfo",
"org.infinispan.stream.impl.TerminalFunctions$SumIntFunction",
"org.jfree.data.general.CombinedDataset",
"org.xwiki.extension.repository.AbstractExtensionRepository",
"com.google.inject.internal.MoreTypes$WildcardTypeImpl",
"org.jfree.data.jdbc.JDBCXYDataset",
"org.apache.commons.collections.IterableMap",
"org.xwiki.component.util.DefaultParameterizedType",
"org.infinispan.stream.impl.TerminalFunctions$MaxIntFunction",
"org.apache.commons.vfs2.impl.DefaultVfsComponentContext",
"org.xwiki.component.descriptor.DefaultComponentRole",
"org.jfree.data.statistics.HistogramType",
"org.xwiki.observation.event.DocumentUpdateEvent",
"org.jfree.data.xy.DefaultXYDataset",
"org.xwiki.observation.EventListener",
"org.jfree.data.contour.ContourDataset",
"org.infinispan.stream.impl.TerminalFunctions$AverageIntFunction",
"org.jfree.data.time.TimeSeriesCollection",
"org.infinispan.commons.marshall.MarshallableFunctions$SetValueMetasIfPresentReturnPrevOrNull",
"org.jfree.data.xy.DefaultHighLowDataset",
"org.xwiki.observation.event.DocumentSaveEvent",
"org.infinispan.stream.impl.TerminalFunctions$CountDoubleFunction",
"org.jfree.data.time.TimePeriodFormatException",
"org.xwiki.component.manager.ComponentRepositoryException",
"com.mchange.v2.c3p0.C3P0ProxyConnection",
"org.apache.commons.dbcp2.PoolingConnection$StatementType",
"org.xwiki.observation.internal.DefaultObservationManager",
"org.xwiki.extension.job.internal.AbstractInstallPlanJob",
"org.apache.commons.vfs2.provider.VfsComponentContext",
"org.infinispan.stream.impl.TerminalFunctions$ForEachDoubleFunction",
"org.apache.commons.vfs2.FileSystemOptions",
"org.codehaus.classworlds.BytesURLStreamHandler",
"com.google.common.collect.MapMakerInternalMap$Strength",
"com.google.common.base.Equivalence$Equals",
"org.jfree.data.time.Second",
"org.jfree.data.xy.YIntervalDataItem",
"org.infinispan.commons.marshall.MarshallableFunctions$SetValueMetasIfAbsentReturnBoolean",
"org.jfree.data.xy.XIntervalSeries",
"org.xwiki.observation.event.ActionExecutionEvent",
"org.xwiki.extension.ExtensionDependency",
"org.apache.tika.fork.MemoryURLStreamHandler",
"org.jfree.data.KeyedValues",
"org.jfree.data.xy.XYIntervalSeries",
"com.google.common.reflect.Types$ParameterizedTypeImpl",
"org.xwiki.extension.job.plan.ExtensionPlanAction$Action",
"org.xwiki.extension.ExtensionLicense",
"org.infinispan.commons.marshall.MarshallableFunctions$AbstractSetValueReturnPrevOrNull",
"org.infinispan.stream.impl.TerminalFunctions$CountIntFunction",
"org.infinispan.CacheStream",
"com.google.common.collect.MapMakerInternalMap$ValueReference",
"org.infinispan.stream.impl.TerminalFunctions$IdentityReduceIntFunction",
"org.infinispan.stream.impl.TerminalFunctions$ReduceIntFunction",
"org.infinispan.commons.marshall.MarshallableFunctions",
"org.apache.commons.dbcp2.DelegatingPreparedStatement",
"org.infinispan.commons.marshall.MarshallableFunctions$RemoveIfValueEqualsReturnBoolean",
"org.xwiki.extension.wrap.WrappingRatingExtension",
"org.jfree.data.xy.XYZDataset",
"org.xwiki.component.annotation.Role",
"org.apache.commons.dbcp2.PoolableConnection",
"org.apache.commons.vfs2.FileSystemManager",
"org.jfree.data.general.DatasetChangeListener",
"org.jfree.data.statistics.MultiValueCategoryDataset",
"org.apache.hadoop.util.Shell$1",
"org.xwiki.extension.rating.Rating",
"org.infinispan.stream.impl.TerminalFunctions$ToArrayGeneratorFunction",
"org.jfree.data.gantt.TaskSeries",
"org.jfree.data.xy.YIntervalSeries",
"org.xwiki.observation.event.BeginFoldEvent",
"org.python.core.PySystemStateTest",
"org.xwiki.extension.test.FileExtension",
"org.apache.hadoop.util.Shell$ExitCodeException",
"org.infinispan.util.SerializableFunction",
"org.infinispan.stream.impl.TerminalFunctions$AllMatchIntFunction",
"org.jfree.data.statistics.SimpleHistogramBin",
"org.apache.hadoop.conf.Configuration$DeprecationContext",
"org.xwiki.extension.job.internal.AbstractInstallPlanJob$ModifableExtensionPlanNode",
"com.google.common.collect.Interner",
"org.jfree.data.time.Millisecond",
"com.google.common.collect.Interners$1",
"org.apache.commons.vfs2.FileName",
"org.jfree.data.general.DefaultKeyedValueDataset",
"org.apache.commons.dbcp2.AbandonedTrace",
"org.jfree.data.general.SeriesChangeEvent",
"org.xwiki.observation.event.filter.EventFilter",
"org.xwiki.extension.test.EmptyExtension",
"org.infinispan.distexec.mapreduce.MapReduceManagerImpl$MapCombineTask",
"org.xwiki.extension.wrap.WrappingCoreExtension",
"org.xwiki.extension.CoreExtensionFile",
"org.apache.commons.configuration.VFSFileSystem$VFSURLStreamHandler",
"org.xwiki.observation.event.ApplicationStoppedEvent",
"com.google.common.base.Equivalence$Identity",
"org.infinispan.stream.impl.DistributedCacheStream$SegmentListenerNotifier",
"org.infinispan.stream.impl.TerminalFunctions$NoneMatchLongFunction",
"org.infinispan.stream.impl.AbstractCacheStream$CollectionDecomposerConsumer",
"org.xwiki.observation.AbstractThreadEventListener",
"org.apache.hadoop.util.StringUtils",
"org.jfree.data.xy.DefaultWindDataset",
"org.xwiki.observation.event.CancelableEvent",
"org.xwiki.extension.job.plan.internal.DefaultExtensionPlanAction",
"org.infinispan.stream.impl.TerminalFunctions$ForEachLongFunction",
"org.jfree.data.xy.IntervalXYZDataset",
"org.apache.commons.vfs2.impl.URLStreamHandlerProxy",
"org.xwiki.observation.event.AbstractCancelableEvent",
"org.infinispan.stream.impl.TerminalFunctions$ToArrayLongFunction",
"org.jfree.data.time.FixedMillisecond",
"org.apache.tika.fork.MemoryURLStreamHandlerFactory",
"org.jfree.data.Value",
"org.jfree.data.time.TimePeriodAnchor",
"org.apache.commons.dbcp2.PoolingDriver$PoolGuardConnectionWrapper",
"org.jfree.data.gantt.Task",
"org.jfree.data.general.DefaultValueDataset",
"com.google.gson.internal.$Gson$Types$ParameterizedTypeImpl",
"org.xwiki.extension.version.InvalidVersionRangeException",
"org.jfree.data.contour.NonGridContourDataset",
"com.google.common.collect.MapMakerInternalMap",
"info.informatica.io.FilesystemInfo",
"org.jfree.data.xy.VectorSeriesCollection",
"org.jfree.date.SerialDate",
"org.aspectj.lang.reflect.AjType",
"org.xwiki.extension.rating.ExtensionRating",
"org.xwiki.extension.version.Version$Type",
"org.jfree.data.DomainOrder",
"org.infinispan.stream.StreamMarshalling$AlwaysTruePredicate",
"org.infinispan.stream.impl.TerminalFunctions$CountLongFunction",
"org.xwiki.extension.wrap.WrappingInstalledExtension",
"org.xwiki.extension.test.EmptyLocalExtensionFile",
"org.xwiki.extension.AbstractExtension",
"org.apache.hadoop.conf.Configuration$1",
"org.jfree.data.jdbc.JDBCPieDataset",
"org.jfree.data.gantt.SlidingGanttCategoryDataset",
"org.xwiki.component.event.AbstractComponentDescriptorEvent",
"org.xwiki.component.internal.StackingComponentEventManager$ComponentEventEntry",
"org.xwiki.component.event.ComponentDescriptorRemovedEvent",
"org.xwiki.observation.event.AbstractFilterableEvent",
"com.google.inject.internal.MoreTypes$GenericArrayTypeImpl",
"org.xwiki.extension.rating.RatingExtension",
"org.jfree.data.DefaultKeyedValues2D",
"org.jfree.data.xy.DefaultOHLCDataset",
"org.apache.hadoop.util.Shell$CommandExecutor",
"org.infinispan.stream.impl.TerminalFunctions$MinFunction",
"org.infinispan.stream.impl.TerminalFunctions$SummaryStatisticsIntFunction",
"org.infinispan.stream.impl.TerminalFunctions$FindAnyIntFunction",
"org.jfree.data.time.Day",
"org.jfree.data.general.SeriesDataset",
"org.infinispan.stream.impl.TerminalFunctions$CollectorFunction",
"com.google.common.collect.MapMaker$NullConcurrentMap",
"org.infinispan.stream.impl.TerminalFunctions$AnyMatchIntFunction",
"org.jfree.data.xy.XYDataset",
"org.infinispan.stream.impl.TerminalFunctions$FindAnyLongFunction",
"org.xwiki.extension.DefaultExtensionDependency",
"org.apache.hadoop.fs.ChecksumFileSystem",
"org.apache.commons.dbcp2.DelegatingConnection",
"org.xwiki.extension.job.internal.AbstractInstallPlanJob$ModifableExtensionPlanTree",
"org.xwiki.job.GroupedJob",
"org.xwiki.stability.Unstable",
"org.infinispan.commons.marshall.MarshallableFunctions$AbstractSetValue",
"org.infinispan.stream.impl.TerminalFunctions$ReduceFunction",
"org.xwiki.extension.ExtensionId",
"org.xwiki.component.manager.ComponentLookupException",
"org.jfree.data.xy.AbstractXYZDataset",
"org.jfree.data.time.RegularTimePeriod",
"com.google.inject.internal.MoreTypes",
"org.xwiki.extension.wrap.WrappingLocalExtension",
"org.jfree.data.time.TimeSeries",
"org.xwiki.component.annotation.InstantiationStrategy",
"org.xwiki.extension.test.ResourceExtension",
"org.jfree.data.general.CombinationDataset",
"org.apache.commons.dbcp2.DelegatingStatement",
"org.jfree.data.xy.IntervalXYDataset",
"org.jfree.data.xy.Vector",
"org.infinispan.distexec.mapreduce.MapReduceManagerImpl$DataContainerTask",
"org.apache.hadoop.conf.Configuration$IntegerRanges",
"org.jfree.data.general.DefaultPieDataset",
"org.infinispan.stream.impl.TerminalFunctions$NoneMatchDoubleFunction",
"com.google.common.collect.GenericMapMaker",
"org.infinispan.commons.marshall.MarshallableFunctions$SetValueMetasIfPresentReturnBoolean",
"org.infinispan.commons.marshall.MarshallableFunctions$AbstractSetValueIfPresentReturnBoolean",
"org.apache.hadoop.fs.FsUrlStreamHandler",
"org.jfree.data.category.DefaultIntervalCategoryDataset",
"org.apache.commons.pool2.KeyedObjectPool",
"org.infinispan.util.CloseableSupplier",
"org.jfree.data.xy.XIntervalSeriesCollection",
"org.xwiki.component.descriptor.ComponentInstantiationStrategy",
"org.xwiki.extension.version.internal.DefaultVersion$Element",
"org.jfree.data.category.CategoryDataset",
"org.jfree.data.general.DefaultHeatMapDataset",
"org.jfree.data.ComparableObjectItem",
"org.jfree.data.xy.XYSeries",
"org.infinispan.stream.impl.TerminalFunctions$CollectDoubleFunction",
"org.xwiki.component.descriptor.ComponentRole",
"org.eclipse.sisu.space.ResourceEnumeration",
"org.apache.hadoop.conf.Configuration$ParsedTimeDuration",
"org.infinispan.filter.CacheFilters$ConverterAsCacheEntryFunction",
"org.osgi.service.url.URLStreamHandlerSetter",
"org.osgi.service.url.URLStreamHandlerService",
"org.apache.commons.collections.map.UnmodifiableMap",
"org.infinispan.stream.impl.TerminalFunctions$MinDoubleFunction",
"org.xwiki.component.manager.ComponentLifecycleException",
"org.infinispan.stream.impl.TerminalFunctions$SummaryStatisticsLongFunction",
"org.jfree.data.gantt.TaskSeriesCollection",
"org.apache.commons.pool2.TrackedUse",
"org.xwiki.extension.ExtensionException",
"org.xwiki.extension.wrap.WrappingExtension",
"org.xwiki.extension.DefaultExtensionScm",
"org.apache.commons.collections.map.AbstractMapDecorator",
"org.infinispan.stream.impl.TerminalFunctions$IdentityReduceCombinerFunction",
"org.infinispan.persistence.spi.AdvancedCacheLoader$CacheLoaderTask",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.classification.InterfaceAudience$Public",
"org.apache.hadoop.conf.Configurable",
"org.infinispan.commons.marshall.MarshallableFunctions$SetValueMetasIfAbsentReturnPrevOrNull",
"com.google.common.base.Function",
"org.infinispan.stream.impl.TerminalFunctions$ForEachFunction",
"org.jfree.data.xy.MatrixSeriesCollection",
"com.google.common.collect.MapMakerInternalMap$Strength$2",
"org.xwiki.extension.repository.ExtensionRepositoryId",
"org.apache.commons.dbcp2.PStmtKey",
"com.google.common.collect.MapMakerInternalMap$Strength$1",
"org.infinispan.stream.impl.TerminalFunctions$IdentityReduceFunction",
"org.infinispan.stream.impl.TerminalFunctions$SumLongFunction",
"org.jfree.data.xy.MatrixSeries",
"com.google.common.collect.MapMakerInternalMap$Strength$3",
"org.infinispan.stream.impl.TerminalFunctions$NoneMatchIntFunction",
"org.xwiki.component.manager.ComponentManager",
"org.xwiki.extension.AbstractExtensionScmConnection",
"com.google.common.reflect.Types$WildcardTypeImpl",
"org.jfree.data.time.TimeSeriesDataItem",
"org.jfree.date.MonthConstants",
"com.google.common.collect.Interners$WeakInterner",
"org.jfree.data.xy.XYBarDataset",
"org.infinispan.filter.CacheFilters$KeyValueFilterAsPredicate",
"org.apache.commons.vfs2.provider.FileReplicator",
"org.jfree.data.xy.VectorXYDataset",
"org.xwiki.observation.event.EndEvent",
"org.jfree.data.time.Hour",
"org.xwiki.extension.job.internal.AbstractExtensionPlanJob",
"org.jfree.data.xy.XYDatasetTableModel",
"org.infinispan.stream.impl.TerminalFunctions$ReduceDoubleFunction",
"org.infinispan.stream.impl.TerminalFunctions$SummaryStatisticsDoubleFunction",
"org.xwiki.extension.ExtensionScm",
"org.xwiki.observation.event.DocumentDeleteEvent",
"org.infinispan.stream.impl.AbstractCacheStream",
"com.google.common.reflect.Types$NativeTypeVariableEquals",
"info.informatica.io.FilePatternSpec$FilePattern",
"org.infinispan.commons.marshall.MarshallableFunctions$SetValueIfAbsentReturnBoolean",
"org.xwiki.extension.AbstractExtensionDependency",
"com.google.common.base.Equivalence",
"org.jfree.data.statistics.StatisticalCategoryDataset",
"com.google.common.collect.Interners",
"org.infinispan.stream.impl.TerminalFunctions$AnyMatchFunction",
"org.jfree.data.Values",
"org.jfree.data.KeyedValues2D",
"org.infinispan.stream.impl.TerminalFunctions$AnyMatchDoubleFunction",
"org.infinispan.stream.impl.TerminalFunctions$AverageDoubleFunction",
"org.jfree.data.general.SeriesException",
"org.apache.commons.collections.Unmodifiable",
"org.jfree.data.general.CombinedDataset$DatasetInfo",
"org.xwiki.extension.ExtensionFile",
"org.infinispan.commons.marshall.MarshallableFunctions$Remove",
"com.google.common.collect.MapMaker$NullComputingConcurrentMap",
"org.apache.hadoop.io.Writable",
"com.google.common.collect.ComputingConcurrentHashMap",
"org.apache.hadoop.classification.InterfaceAudience$Private",
"org.apache.commons.vfs2.provider.TemporaryFileStore",
"org.xwiki.component.event.ComponentDescriptorAddedEvent",
"org.infinispan.iteration.impl.LocalEntryRetriever$MapAction",
"org.jfree.data.contour.DefaultContourDataset",
"org.jfree.data.general.SubSeriesDataset",
"org.xwiki.extension.job.ExtensionRequest",
"org.apache.commons.collections.MapIterator",
"org.jfree.data.xy.AbstractIntervalXYDataset",
"org.jfree.data.xy.OHLCDataItem",
"org.infinispan.stream.impl.TerminalFunctions$CollectIntFunction",
"org.apache.commons.vfs2.FileSystemException",
"org.jfree.data.xy.YIntervalSeriesCollection",
"org.jfree.data.xy.AbstractXYDataset",
"org.infinispan.stream.impl.TerminalFunctions$MinLongFunction",
"org.jfree.data.general.HeatMapDataset",
"org.infinispan.stream.impl.TerminalFunctions$CountFunction",
"com.google.common.base.Predicate",
"org.xwiki.extension.test.FileExtensionRepository",
"com.google.gson.internal.$Gson$Types$GenericArrayTypeImpl",
"org.infinispan.stream.impl.TerminalFunctions$AnyMatchLongFunction",
"org.jfree.data.xy.DefaultIntervalXYDataset",
"org.jfree.ui.FilesystemFilter",
"org.infinispan.stream.StreamMarshalling$EntryToValueFunction",
"org.infinispan.stream.impl.DistributedCacheStream$IteratorSupplier",
"org.xwiki.extension.CoreExtension",
"org.xwiki.observation.event.BeginEvent",
"org.xwiki.script.wrap.AbstractWrappingObject",
"org.apache.commons.pool2.ObjectPool",
"org.infinispan.stream.impl.TerminalFunctions$CollectFunction",
"org.jfree.data.statistics.BoxAndWhiskerItem",
"org.jfree.data.category.CategoryToPieDataset",
"org.apache.commons.pool2.KeyedPooledObjectFactory",
"com.google.common.reflect.Types",
"org.jfree.data.DefaultKeyedValues",
"org.jfree.data.statistics.DefaultBoxAndWhiskerXYDataset",
"org.apache.commons.dbcp2.PoolableConnectionMXBean",
"org.jfree.data.statistics.BoxAndWhiskerCategoryDataset",
"org.jfree.data.time.TimePeriodValues",
"org.apache.commons.vfs2.FileObject",
"org.xwiki.extension.test.ResourceExtensionRepository",
"info.informatica.io.FilesystemInfo$TokenizedPath",
"org.xwiki.extension.version.VersionRangeCollection",
"com.google.inject.internal.MoreTypes$ParameterizedTypeImpl",
"org.jfree.data.time.DynamicTimeSeriesCollection$ValueSequence",
"org.xwiki.component.internal.StackingComponentEventManager",
"org.xwiki.observation.event.Event",
"org.jfree.data.xy.CategoryTableXYDataset",
"com.google.common.base.Preconditions",
"com.google.common.collect.MapMaker",
"org.xwiki.extension.version.IncompatibleVersionConstraintException",
"org.jfree.data.general.DefaultKeyedValues2DDataset",
"org.infinispan.stream.impl.TerminalFunctions$FindAnyDoubleFunction",
"com.google.common.collect.MapMaker$ComputingMapAdapter",
"org.jfree.data.time.Quarter",
"org.jfree.data.time.TimePeriodValue",
"org.jfree.data.time.DynamicTimeSeriesCollection",
"org.infinispan.stream.impl.TerminalFunctions$IdentityReduceDoubleFunction",
"org.infinispan.commons.marshall.MarshallableFunctions$ReturnReadWriteView",
"org.xwiki.extension.DefaultExtensionAuthor",
"org.jfree.data.gantt.XYTaskDataset",
"org.jfree.data.DomainInfo",
"org.xwiki.extension.job.plan.internal.DefaultExtensionPlanTree",
"org.infinispan.commons.marshall.MarshallableFunctions$SetValueMetas",
"org.apache.commons.vfs2.provider.DefaultURLConnection",
"org.xwiki.component.event.ComponentDescriptorEvent",
"org.apache.hadoop.conf.Configuration$NegativeCacheSentinel",
"org.jfree.data.xy.XYDomainInfo",
"org.jfree.data.ComparableObjectSeries",
"org.xwiki.component.descriptor.ComponentDescriptor",
"org.python.core.PySystemStateTest$TestJBossURLStreamHandler",
"org.xwiki.extension.AbstractRatingExtension",
"org.jfree.data.xy.XYDataItem",
"org.eclipse.sisu.space.ResourceEnumeration$NestedJarHandler",
"org.jfree.data.general.DatasetGroup",
"org.jfree.data.DefaultKeyedValue",
"org.jfree.data.general.KeyedValueDataset",
"org.xwiki.observation.internal.DefaultObservationManager$RegisteredListener",
"org.jfree.data.xy.XYIntervalDataItem",
"org.jfree.data.xy.OHLCDataset",
"org.infinispan.stream.impl.AbstractCacheStream$IntermediateType",
"org.jfree.data.xy.VectorDataItem",
"org.xwiki.extension.ExtensionAuthor",
"org.jfree.data.time.Month",
"org.xwiki.observation.event.EndFoldEvent",
"org.infinispan.commons.marshall.MarshallableFunctions$AbstractSetValueIfAbsentReturnPrevOrNull",
"org.xwiki.observation.ObservationManager",
"org.infinispan.commons.marshall.MarshallableFunctions$SetValueIfAbsentReturnPrevOrNull",
"org.infinispan.stream.impl.TerminalFunctions$ForEachIntFunction",
"org.xwiki.component.annotation.Component",
"org.jfree.data.general.WaferMapDataset",
"org.jfree.data.general.Dataset",
"org.eclipse.sisu.space.ResourceEnumeration$NestedJarConnection",
"com.fasterxml.jackson.core.type.ResolvedType",
"com.google.inject.internal.MoreTypes$CompositeType",
"org.xwiki.extension.repository.DefaultExtensionRepositoryDescriptor",
"org.xwiki.observation.event.AllEvent",
"org.xwiki.extension.AbstractExtensionScm",
"org.infinispan.commons.marshall.MarshallableFunctions$LambdaWithMetas",
"org.apache.hadoop.HadoopIllegalArgumentException",
"org.infinispan.commons.marshall.MarshallableFunctions$SetValueMetasReturnPrevOrNull",
"org.xwiki.extension.job.AbstractExtensionRequest",
"org.infinispan.commons.marshall.MarshallableFunctions$ReturnReadWriteGet",
"org.infinispan.stream.StreamMarshalling$NonNullPredicate",
"org.apache.hadoop.util.Shell$ShellCommandExecutor",
"com.google.common.collect.MapMakerInternalMap$ReferenceEntry",
"org.jfree.data.xy.WindDataset",
"info.informatica.io.FilePatternSpec",
"com.google.common.reflect.Types$JavaVersion",
"org.xwiki.component.descriptor.DefaultComponentDependency",
"org.xwiki.extension.LocalExtension",
"org.jfree.data.statistics.SimpleHistogramDataset",
"org.jfree.data.time.SimpleTimePeriod",
"org.infinispan.stream.impl.TerminalFunctions$ReduceLongFunction",
"org.jfree.data.xy.XYIntervalSeriesCollection",
"org.xwiki.observation.event.ApplicationStartedEvent",
"org.xwiki.extension.job.plan.ExtensionPlanNode",
"org.jfree.util.PublicCloneable",
"org.jfree.data.xy.DefaultXYZDataset",
"org.apache.hadoop.fs.FsUrlStreamHandlerFactory",
"com.google.common.base.FunctionalEquivalence",
"org.xwiki.extension.version.internal.DefaultVersionConstraint",
"org.xwiki.extension.job.plan.ExtensionPlanAction",
"org.jfree.data.general.AbstractDataset",
"org.infinispan.stream.impl.TerminalFunctions$ToArrayIntFunction",
"org.xwiki.extension.job.plan.ExtensionPlanTree",
"org.xwiki.extension.version.InvalidVersionConstraintException",
"org.infinispan.stream.impl.TerminalFunctions$ToArrayDoubleFunction",
"org.infinispan.stream.impl.TerminalFunctions$MinIntFunction",
"org.xwiki.extension.ExtensionScmConnection",
"org.xwiki.extension.InstalledExtension",
"org.jfree.util.SortOrder",
"org.infinispan.commons.marshall.MarshallableFunctions$SetValueReturnView",
"org.xwiki.extension.ExtensionIssueManagement",
"org.xwiki.extension.job.plan.internal.DefaultExtensionPlanNode",
"org.jfree.data.statistics.DefaultBoxAndWhiskerCategoryDataset",
"org.jfree.data.category.SlidingCategoryDataset",
"org.jfree.data.UnknownKeyException",
"org.infinispan.commons.marshall.MarshallableFunctions$AbstractSetValueIfPresentReturnPrevOrNull",
"ucar.nc2.util.net.URLStreamHandlerFactory",
"org.jfree.data.time.TimePeriod",
"org.xwiki.job.Request",
"org.xwiki.extension.job.UninstallRequest",
"org.infinispan.stream.impl.TerminalFunctions$AverageLongFunction",
"org.jfree.data.statistics.HistogramDataset",
"org.apache.commons.vfs2.provider.DefaultURLStreamHandler",
"org.infinispan.commons.marshall.MarshallableFunctions$AbstractSetValueIfAbsentReturnBoolean",
"org.apache.hadoop.conf.Configuration$DeprecationDelta",
"org.xwiki.extension.AbstractExtensionIssueManagement",
"org.infinispan.stream.impl.TerminalFunctions$SumDoubleFunction",
"org.xwiki.component.descriptor.ComponentDependency",
"org.apache.hadoop.conf.Configuration$DeprecatedKeyInfo",
"org.apache.hadoop.fs.FilterFileSystem",
"org.infinispan.stream.impl.TerminalFunctions$AllMatchFunction",
"org.infinispan.commons.marshall.MarshallableFunctions$SetValueIfPresentReturnBoolean",
"org.jfree.data.general.PieDataset",
"com.fasterxml.jackson.databind.JavaType",
"org.apache.hadoop.util.StringInterner",
"org.infinispan.commons.marshall.MarshallableFunctions$SetValueIfPresentReturnPrevOrNull",
"org.jfree.data.xy.XYRangeInfo",
"org.xwiki.job.Job",
"org.xwiki.extension.version.VersionConstraint",
"org.infinispan.iteration.impl.DistributedEntryRetriever$MapAction",
"com.google.common.reflect.Types$GenericArrayTypeImpl",
"org.xwiki.extension.job.InstallRequest",
"org.jfree.data.general.KeyedValues2DDataset",
"org.infinispan.stream.impl.TerminalFunctions$CollectLongFunction",
"org.apache.commons.vfs2.FileSystemOptions$FileSystemOptionKey",
"org.xwiki.extension.job.internal.AbstractExtensionJob",
"org.infinispan.commons.marshall.MarshallableFunctions$SetValueMetasReturnView",
"info.informatica.io.WildcardFilter",
"org.apache.hadoop.classification.InterfaceAudience$LimitedPrivate",
"org.xwiki.extension.DefaultExtensionIssueManagement",
"org.jfree.data.statistics.DefaultMultiValueCategoryDataset",
"org.jfree.data.Range",
"org.infinispan.stream.impl.TerminalFunctions$AllMatchLongFunction",
"org.jfree.data.statistics.DefaultStatisticalCategoryDataset",
"org.jfree.data.category.IntervalCategoryDataset",
"org.apache.commons.dbcp2.PoolingConnection",
"org.jfree.data.time.Year",
"org.apache.commons.pool2.PooledObject",
"org.apache.hadoop.util.Shell",
"org.infinispan.stream.impl.TerminalFunctions$ToArrayFunction",
"org.xwiki.component.descriptor.DefaultComponentDescriptor",
"org.infinispan.stream.impl.TerminalFunctions$NoneMatchFunction",
"org.xwiki.text.XWikiToStringBuilder",
"org.xwiki.observation.event.AbstractDocumentEvent",
"org.infinispan.stream.impl.TerminalFunctions$IdentityReduceLongFunction",
"org.xwiki.classloader.internal.ExtendedURLStreamHandlerFactory",
"org.apache.hadoop.conf.Configured",
"org.jfree.data.time.TimePeriodValuesCollection",
"org.jfree.data.xy.XIntervalDataItem",
"org.infinispan.stream.StreamMarshalling$EntryToKeyFunction",
"org.xwiki.component.manager.ComponentEventManager",
"org.xwiki.extension.version.internal.VersionUtils",
"org.xwiki.extension.version.internal.DefaultVersionRangeCollection",
"org.infinispan.commons.marshall.MarshallableFunctions$ReturnReadWriteFind",
"com.google.gson.internal.$Gson$Types$WildcardTypeImpl",
"org.infinispan.stream.impl.TerminalFunctions$MaxFunction",
"org.infinispan.commons.marshall.MarshallableFunctions$AbstractSetValueReturnView",
"org.apache.hadoop.util.Shell$ShellTimeoutTimerTask",
"org.xwiki.extension.repository.ExtensionRepositoryDescriptor",
"org.jfree.data.xy.TableXYDataset",
"org.xwiki.extension.LocalExtensionFile",
"org.xwiki.extension.DefaultExtensionScmConnection",
"org.xwiki.extension.version.internal.DefaultVersion",
"org.xwiki.extension.repository.ExtensionRepository",
"org.jfree.data.gantt.GanttCategoryDataset",
"org.xwiki.observation.WrappedThreadEventListener",
"org.jfree.data.jdbc.JDBCCategoryDataset",
"org.jfree.data.Values2D",
"org.apache.commons.lang3.builder.ToStringBuilder",
"org.jfree.data.statistics.BoxAndWhiskerXYDataset",
"org.jfree.data.general.DatasetChangeEvent",
"org.jfree.data.general.SeriesChangeListener",
"org.infinispan.commons.marshall.MarshallableFunctions$RemoveReturnBoolean",
"org.apache.commons.dbcp2.PoolingDataSource$PoolGuardConnectionWrapper",
"org.jfree.data.category.DefaultCategoryDataset",
"org.infinispan.stream.impl.TerminalFunctions$AllMatchDoubleFunction",
"org.jfree.data.general.KeyedValuesDataset",
"org.infinispan.stream.impl.TerminalFunctions$FindAnyFunction",
"org.jfree.data.time.Week",
"org.jfree.data.xy.VectorSeries",
"org.jfree.data.general.DefaultKeyedValuesDataset",
"org.xwiki.observation.AbstractEventListener",
"org.jfree.data.general.Series",
"org.infinispan.stream.impl.DistributedCacheStream$HandOffConsumer",
"org.apache.hadoop.conf.Configuration$Resource",
"com.fasterxml.jackson.databind.type.TypeBindings",
"com.google.common.base.PairwiseEquivalence",
"org.jfree.data.xy.XYSeriesCollection",
"org.apache.hadoop.classification.InterfaceStability$Unstable",
"org.apache.commons.dbcp2.DelegatingCallableStatement",
"org.infinispan.commons.marshall.MarshallableFunctions$SetValue",
"org.jfree.util.TableOrder",
"org.xwiki.extension.Extension",
"org.jfree.data.KeyedValue",
"org.xwiki.job.AbstractRequest",
"org.infinispan.stream.impl.TerminalFunctions$MaxDoubleFunction",
"org.jfree.data.xy.IntervalXYDelegate",
"org.infinispan.filter.CacheFilters$FilterConverterAsCacheEntryFunction",
"org.infinispan.commons.marshall.MarshallableFunctions$SetValueIfEqualsReturnBoolean",
"org.jfree.data.KeyedObjects2D",
"org.apache.commons.lang3.builder.Builder",
"org.apache.hadoop.util.Time",
"org.apache.hadoop.fs.LocalFileSystem",
"org.osgi.service.url.AbstractURLStreamHandlerService"
);
}
}
|
[
"pderakhshanfar@serg2.ewi.tudelft.nl"
] |
pderakhshanfar@serg2.ewi.tudelft.nl
|
4233cc5fa3f7b6e1c448129d1416af745f141453
|
dc73ce7d54312c1082f1d0925cfe94694cc24fb7
|
/src/pe/com/sisabas/business/VcertificacionBusiness.java
|
226c271a3ca67bb474ee74bf9a995e20ff354b5a
|
[] |
no_license
|
teonsolutions/sisabas
|
5d58d3120ee768d7ac1d1c924c127cd836e62576
|
5bb0c8103f609931e1f3e5ae066595b36fbbfa95
|
refs/heads/master
| 2021-09-09T13:34:57.722446
| 2018-03-16T14:24:24
| 2018-03-16T14:24:24
| 110,156,408
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,896
|
java
|
package pe.com.sisabas.business;
import java.util.List;
import pe.com.sisabas.be.Vcertificacion;
public interface VcertificacionBusiness{
public void deleteByPrimaryKeyBasic(Vcertificacion par_record) throws Exception;
public void insertBasic(Vcertificacion record) throws Exception;
public void insertFull(Vcertificacion record) throws Exception;
public void insertSelectiveBasic(Vcertificacion record) throws Exception;
public Vcertificacion selectByPrimaryKeyBasic(java.lang.Integer par_vcertificacion) throws Exception;
public Vcertificacion selectByPrimaryKeyBasicFromList(java.lang.Integer par_vcertificacion,List<Vcertificacion> list) throws Exception;
public Vcertificacion selectByPrimaryKeyBasicActive(java.lang.Integer par_vcertificacion) throws Exception;
public Vcertificacion selectByPrimaryKeyFull(java.lang.Integer par_vcertificacion) throws Exception;
public Vcertificacion selectByPrimaryKeyFullActive(java.lang.Integer par_vcertificacion) throws Exception;
public List<Vcertificacion> selectDynamicBasic(Vcertificacion record) throws Exception;
public List<Vcertificacion> selectDynamicBasicActives(Vcertificacion record) throws Exception;
public List<Vcertificacion> selectDynamicFull(Vcertificacion record) throws Exception;
public List<Vcertificacion> selectDynamicFullActives(Vcertificacion record) throws Exception;
public List<Vcertificacion> selectDynamicExtended(Vcertificacion record) throws Exception;
public List<Vcertificacion> selectDynamicExtendedActives(Vcertificacion record) throws Exception;
public void updateByPrimaryKeySelectiveBasic(Vcertificacion record) throws Exception;
public void updateByPrimaryKeySelectiveFull(Vcertificacion record) throws Exception;
public void updateByPrimaryKeyBasic(Vcertificacion record) throws Exception;
public void updateByPrimaryKeyFull(Vcertificacion record) throws Exception;
}
|
[
"ehuarcaya@teon.pe"
] |
ehuarcaya@teon.pe
|
9f323319a093bf4e83a5e456ca9b040988fe6dc6
|
083e8cea6b482ddbe2da3a70cbc7388966e5ec4a
|
/common/src/main/java/org/apache/ivory/entity/ColoClusterRelation.java
|
dc2bcf4136e242aa114d56c6fce50d1a3533b0d9
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
cryptoe/Ivory
|
9313d788bc065780ba4f2e7adcb6d5f40a5555db
|
60672a6da8fba84d9f44e16ce1a203727b58d735
|
refs/heads/master
| 2021-01-18T18:22:44.681912
| 2013-04-30T14:07:41
| 2013-05-03T10:00:47
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,741
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may 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 org.apache.ivory.entity;
import java.util.HashSet;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import org.apache.ivory.IvoryException;
import org.apache.ivory.entity.v0.Entity;
import org.apache.ivory.entity.v0.EntityType;
import org.apache.ivory.entity.v0.cluster.Cluster;
import org.apache.ivory.service.ConfigurationChangeListener;
public class ColoClusterRelation implements ConfigurationChangeListener {
private static final ConcurrentHashMap<String, Set<String>> coloClusterMap = new ConcurrentHashMap<String, Set<String>>();
private static final ColoClusterRelation instance = new ColoClusterRelation();
private ColoClusterRelation() {
}
public static ColoClusterRelation get() {
return instance;
}
public Set<String> getClusters(String colo) {
if (coloClusterMap.containsKey(colo))
return coloClusterMap.get(colo);
return new HashSet<String>();
}
@Override
public void onAdd(Entity entity) {
if (entity.getEntityType() != EntityType.CLUSTER)
return;
Cluster cluster = (Cluster) entity;
coloClusterMap.putIfAbsent(cluster.getColo(), new HashSet<String>());
coloClusterMap.get(cluster.getColo()).add(cluster.getName());
}
@Override
public void onRemove(Entity entity) {
if (entity.getEntityType() != EntityType.CLUSTER)
return;
Cluster cluster = (Cluster) entity;
coloClusterMap.get(cluster.getColo()).remove(cluster.getName());
if (coloClusterMap.get(cluster.getColo()).isEmpty())
coloClusterMap.remove(cluster.getColo());
}
@Override
public void onChange(Entity oldEntity, Entity newEntity) throws IvoryException {
if (oldEntity.getEntityType() != EntityType.CLUSTER)
return;
throw new IvoryException("change shouldn't be supported on cluster!");
}
}
|
[
"shwetha.gs@inmobi.com"
] |
shwetha.gs@inmobi.com
|
e655d32fe4f135d16fd4d7a9bd70837e3432b792
|
5cf2f944216bf448ea090267db6ccd9ccbfaf37a
|
/src/main/java/ee/sda/javaest1blog/entities/Role.java
|
3bb3d00d0b69b4b22a30c253dfa11c0889142436
|
[] |
no_license
|
taalmtii/javaest1blog
|
440a79b97a599b089e14edd221bb40d29471895f
|
c2cc7f98c3957f2005c1bf7de94158f80d8cf897
|
refs/heads/main
| 2023-01-06T19:49:41.726814
| 2020-11-15T11:46:07
| 2020-11-15T11:46:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 550
|
java
|
package ee.sda.javaest1blog.entities;
import lombok.Getter;
import lombok.Setter;
import javax.persistence.*;
import java.util.List;
@Entity
@Getter
@Setter
public class Role {
@GeneratedValue
@Id
Long id;
String name;
@ManyToMany
@JoinTable(
name = "role_user",
joinColumns = @JoinColumn(name = "role_id"),
inverseJoinColumns = @JoinColumn(name = "user_id")
)
List<User> users;
@ManyToMany(mappedBy = "roles", fetch = FetchType.EAGER)
List<Privilege> privileges;
}
|
[
"guilhermezq@gmail.com"
] |
guilhermezq@gmail.com
|
bb05062877ee7a43c3c38848ddc3286599fd1497
|
a7f32f1856db2199a409a87fd23312188a45d48d
|
/src/main/java/com/mmall/service/ICategoryService.java
|
f7fd81840da5468da999386fa847275f0754ae07
|
[] |
no_license
|
zehuaiWANG/mmall
|
67ff308d605754294bff6cb4ada5083c027cd919
|
cae0b523ef393e1cf55b871adc6bbbdb3864e571
|
refs/heads/master
| 2021-01-16T17:59:55.771068
| 2017-08-30T14:43:49
| 2017-08-30T14:43:49
| 100,031,467
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 467
|
java
|
package com.mmall.service;
import com.mmall.common.ServerResponse;
import com.mmall.pojo.Category;
import java.util.List;
public interface ICategoryService {
ServerResponse addCategory(String categoryName, Integer parentId);
ServerResponse updateCategoryName(Integer categoryId,String categoryName);
ServerResponse<List<Category>> getChildrenParallelCategory(Integer categoryId);
ServerResponse selectCategoryAndChildrenById(Integer categoryId);
}
|
[
"874697675@qq.com"
] |
874697675@qq.com
|
b1aaf63ce47c7e464100791e934d76c970ba90d4
|
ca5ac0652cfb486adab9f5bc8b561ad04852188f
|
/java_backend_lokale_backup/src/java_backend/TZTPoint.java
|
fdbb6ab58abcf67cf0211dd406bdb01a69a7d95b
|
[] |
no_license
|
HSR01/KBS_JAVA
|
cf32f0a7e77966953bd4c2e7ca1107f4f2422aa9
|
10797ca9824c492a6c9c1957fa39379ea9d16cd8
|
refs/heads/master
| 2021-01-21T19:28:41.019741
| 2013-05-30T09:12:32
| 2013-05-30T09:12:32
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 726
|
java
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package java_backend;
/**
*
* @author Jelle
*/
public class TZTPoint extends Locatie{
private boolean TZTPoint;
public TZTPoint(){
super();
this.TZTPoint = true;
}
public TZTPoint(String po, String pl, String sr, int h, String to, String tl, boolean p){
super(po, pl, sr, h, to, tl);
this.TZTPoint = p;
}
/**
* @return the TZTPoint
*/
public boolean isTZTPoint() {
return TZTPoint;
}
/**
* @param TZTPoint the TZTPoint to set
*/
public void setTZTPoint(boolean TZTPoint) {
this.TZTPoint = TZTPoint;
}
}
|
[
"dominiqueteriele@hotmail.com"
] |
dominiqueteriele@hotmail.com
|
4b1669a9e12dbab34bb0ce05a193083d83a1bb7f
|
5d715e8e8ff3573bd60f30820c2cec50c4c4c076
|
/ch06/src/ch06/ProductTest.java
|
498c8f56ee89b2d374fbd3afa685cf12c36ffc37
|
[] |
no_license
|
scox1090/work_java
|
e75d203cb5702ac230a3435231fb266b13105fb6
|
89507165c9f5c4293ed5ccb7f1faf96e3fb78794
|
refs/heads/master
| 2020-03-21T02:36:42.885130
| 2018-07-25T12:29:34
| 2018-07-25T12:29:34
| 134,252,683
| 0
| 0
| null | null | null | null |
UHC
|
Java
| false
| false
| 775
|
java
|
package ch06;
class Product {
static int count = 0; // 생성된 인스턴스의 수를 저장하기 위한 변수
int serialNo; // 인스턴스 고유의 번호
{
++count;
serialNo = count;
}
public Product() {} // 기본 생성자 생략가능
}
public class ProductTest {
public static void main(String[] args) {
Product p1 = new Product();
Product p2 = new Product();
Product p3 = new Product();
System.out.println("p1의 제품번호(serial no)는 " + p1.serialNo);
System.out.println("p2의 제품번호(serial no)는 " + p2.serialNo);
System.out.println("p3의 제품번호(serial no)는 " + p3.serialNo);
System.out.println("생산된 제품의 수는 모두 " + Product.count + "개 입니다.");
}
}
|
[
"KOITT@KOITT-PC"
] |
KOITT@KOITT-PC
|
dca86c270109220ed6070f9a0bb3708a55d26476
|
bd5cac2f11eab6a6f5ba97fdde3e28916a60ddb8
|
/day002/src/com/lxgzhw/datatype/Long02.java
|
4c6e85c5b38351a0dfeda45b9d8b6636a0a190f2
|
[] |
no_license
|
goodcd/Java1908
|
74a5b29ad4428646bfea0ca727f25a8093c81fc2
|
84fc8bac537808e2c77b52716475f93b0e4d857b
|
refs/heads/master
| 2022-02-15T19:27:04.848625
| 2019-09-05T06:11:19
| 2019-09-05T06:11:19
| 262,246,898
| 1
| 0
| null | 2020-05-08T06:39:53
| 2020-05-08T06:39:52
| null |
UTF-8
|
Java
| false
| false
| 266
|
java
|
package com.lxgzhw.datatype;
public class Long02 {
public static void main(String[] args) {
// int和long类型进行运算,自动转换为long类型
int salary = 1000000000;
long num = 1000L;
long result = salary * num;
System.out.println(result);
}
}
|
[
"1156956636@qq.com"
] |
1156956636@qq.com
|
21ac39133d9b4a94eddfc5138006873b6216443b
|
5dde423003a811346293a9855ae55d798f5d8880
|
/ArticleLayouter/src/main/java/PagePosition.java
|
fe99661ef14e58654c646e1ddaa9c3e193d10be1
|
[] |
no_license
|
ralphtiede/Kata-Layouter
|
1f74cea14cb579a48df4ede587aa49d6ceacc107
|
607942f4265ce2071f6d11aa94c39d8ba574933b
|
refs/heads/master
| 2021-01-10T05:39:48.502253
| 2015-11-11T13:54:01
| 2015-11-11T13:54:01
| 44,319,026
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,151
|
java
|
/**
* Created by rtiede on 11.11.2015.
*/
public class PagePosition {
private int left;
private int top;
public PagePosition(int left, int top) {
this.left = left;
this.top = top;
}
public int getLeft() {
return left;
}
public void setLeft(int left) {
this.left = left;
}
public int getTop() {
return top;
}
public void setTop(int top) {
this.top = top;
}
public void setPosition(int left, int top) {
this.left = left;
this.top = top;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
PagePosition that = (PagePosition) o;
if (left != that.left) return false;
return top == that.top;
}
@Override
public int hashCode() {
int result = left;
result = 31 * result + top;
return result;
}
public void moveDown(int distance) {
top += distance;
}
public void toNextColumn(int newTop) {
left++;
top = newTop;
}
}
|
[
"ralph.tiede@coremedia.com"
] |
ralph.tiede@coremedia.com
|
7705ea49c3900721f831074ef5d675d7594c1ad0
|
c885ef92397be9d54b87741f01557f61d3f794f3
|
/results/Cli-36/org.apache.commons.cli.OptionGroup/BBC-F0-opt-70/tests/25/org/apache/commons/cli/OptionGroup_ESTest.java
|
cebb8616e07984f564fb6cb6e37d9264ab37bdb0
|
[
"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
| 5,181
|
java
|
/*
* This file was automatically generated by EvoSuite
* Sat Oct 23 04:41:49 GMT 2021
*/
package org.apache.commons.cli;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.runtime.EvoAssertions.*;
import java.util.Collection;
import org.apache.commons.cli.Option;
import org.apache.commons.cli.OptionGroup;
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 OptionGroup_ESTest extends OptionGroup_ESTest_scaffolding {
@Test(timeout = 4000)
public void test00() throws Throwable {
OptionGroup optionGroup0 = new OptionGroup();
optionGroup0.setRequired(true);
boolean boolean0 = optionGroup0.isRequired();
assertTrue(boolean0);
}
@Test(timeout = 4000)
public void test01() throws Throwable {
OptionGroup optionGroup0 = new OptionGroup();
Option option0 = new Option("H8eZ3c", "?A", true, "K~8)v^ubJe^n}*9;,Yw");
optionGroup0.setSelected(option0);
String string0 = optionGroup0.getSelected();
assertEquals("H8eZ3c", string0);
}
@Test(timeout = 4000)
public void test02() throws Throwable {
OptionGroup optionGroup0 = new OptionGroup();
Option option0 = new Option("", "", true, "]");
optionGroup0.setSelected(option0);
String string0 = optionGroup0.getSelected();
assertEquals("", string0);
}
@Test(timeout = 4000)
public void test03() throws Throwable {
OptionGroup optionGroup0 = new OptionGroup();
optionGroup0.setRequired(true);
Option option0 = new Option("", "", true, "]");
optionGroup0.addOption(option0);
assertTrue(optionGroup0.isRequired());
}
@Test(timeout = 4000)
public void test04() throws Throwable {
OptionGroup optionGroup0 = new OptionGroup();
// Undeclared exception!
try {
optionGroup0.addOption((Option) null);
fail("Expecting exception: NullPointerException");
} catch(NullPointerException e) {
//
// no message in exception (getMessage() returned null)
//
verifyException("org.apache.commons.cli.OptionGroup", e);
}
}
@Test(timeout = 4000)
public void test05() throws Throwable {
OptionGroup optionGroup0 = new OptionGroup();
Collection<Option> collection0 = optionGroup0.getOptions();
assertNotNull(collection0);
}
@Test(timeout = 4000)
public void test06() throws Throwable {
OptionGroup optionGroup0 = new OptionGroup();
String string0 = optionGroup0.getSelected();
assertNull(string0);
}
@Test(timeout = 4000)
public void test07() throws Throwable {
OptionGroup optionGroup0 = new OptionGroup();
Option option0 = new Option((String) null, false, "*(p5,G");
OptionGroup optionGroup1 = optionGroup0.addOption(option0);
Option option1 = new Option("", false, "x@4pK1v+V_dJ/M>'@V");
optionGroup0.addOption(option1);
String string0 = optionGroup1.toString();
assertNotNull(string0);
}
@Test(timeout = 4000)
public void test08() throws Throwable {
OptionGroup optionGroup0 = new OptionGroup();
Option option0 = new Option((String) null, (String) null);
OptionGroup optionGroup1 = optionGroup0.addOption(option0);
String string0 = optionGroup1.toString();
assertEquals("[--null]", string0);
}
@Test(timeout = 4000)
public void test09() throws Throwable {
OptionGroup optionGroup0 = new OptionGroup();
Option option0 = new Option("", "", false, "");
optionGroup0.setSelected(option0);
optionGroup0.setSelected(option0);
assertFalse(option0.hasValueSeparator());
}
@Test(timeout = 4000)
public void test10() throws Throwable {
OptionGroup optionGroup0 = new OptionGroup();
optionGroup0.setSelected((Option) null);
assertFalse(optionGroup0.isRequired());
}
@Test(timeout = 4000)
public void test11() throws Throwable {
OptionGroup optionGroup0 = new OptionGroup();
Option option0 = new Option("", "", false, "");
optionGroup0.setSelected(option0);
Option option1 = new Option((String) null, false, "Wxc:hM%(2bM");
try {
optionGroup0.setSelected(option1);
fail("Expecting exception: Exception");
} catch(Exception e) {
//
// The option 'null' was specified but an option from this group has already been selected: ''
//
verifyException("org.apache.commons.cli.OptionGroup", e);
}
}
@Test(timeout = 4000)
public void test12() throws Throwable {
OptionGroup optionGroup0 = new OptionGroup();
Collection<String> collection0 = optionGroup0.getNames();
assertNotNull(collection0);
}
@Test(timeout = 4000)
public void test13() throws Throwable {
OptionGroup optionGroup0 = new OptionGroup();
boolean boolean0 = optionGroup0.isRequired();
assertFalse(boolean0);
}
}
|
[
"pderakhshanfar@serg2.ewi.tudelft.nl"
] |
pderakhshanfar@serg2.ewi.tudelft.nl
|
034186e1a5fb9d330a5642e725ae6a285abc2693
|
a81c3eb9fe553fe04d02efc3ef9853f97f5fa4d2
|
/src/com/bluestar/fms/vo/ProjectManagerLinkVO.java
|
4d8d57b6d5828bdf7b9ad63ec134050ae0e7d718
|
[] |
no_license
|
murtazabsil/FMS
|
37d8826c5ab70c3e7831e64b63051499dd6e3e4d
|
889de1cded7b2d833633e7af62a1af1cb874752a
|
refs/heads/master
| 2016-09-06T10:08:47.611069
| 2014-04-01T17:51:34
| 2014-04-01T17:51:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 542
|
java
|
package com.bluestar.fms.vo;
public class ProjectManagerLinkVO {
private Long projectId;
private Long managerId;
private Long linkId;
public Long getProjectId() {
return projectId;
}
public void setProjectId(Long projectId) {
this.projectId = projectId;
}
public Long getManagerId() {
return managerId;
}
public void setManagerId(Long managerId) {
this.managerId = managerId;
}
public Long getLinkId() {
return linkId;
}
public void setLinkId(Long linkId) {
this.linkId = linkId;
}
}
|
[
"murtazabsil2012@gmail.com"
] |
murtazabsil2012@gmail.com
|
0bb35e732fcdc9650031e9e0be71ed12f8350090
|
d6667610936ba4c41256790f70df7d1264b1be97
|
/src/main/java/hiber/dao/UserDaoImp.java
|
e5e29b46bb30ef36ba87eb872f4bccbf6eeb781c
|
[] |
no_license
|
igorzobov/2.2.1.spring_hibernate
|
f39ac596c96a5f598ecb5406f32b6c4e627c392f
|
d150ead1b377a161f645e8090ad5d4963aa9c962
|
refs/heads/master
| 2023-08-06T23:38:09.163436
| 2021-10-07T09:54:24
| 2021-10-07T09:54:24
| 414,476,188
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,097
|
java
|
package hiber.dao;
import hiber.model.Car;
import hiber.model.User;
import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import javax.persistence.Query;
import javax.persistence.TypedQuery;
import java.util.List;
@Repository
public class UserDaoImp implements UserDao {
@Autowired
private SessionFactory sessionFactory;
@Override
public void add(User user) {
sessionFactory.getCurrentSession().save(user);
}
@Override
@SuppressWarnings("unchecked")
public List<User> listUsers() {
TypedQuery<User> query=sessionFactory.getCurrentSession().createQuery("from User");
return query.getResultList();
}
@Override
public User getUserByCarModelAndSeries(String model, int series) {
Query query = sessionFactory.getCurrentSession().createQuery("from User where car.name =: model and car.series =: series");
query.setParameter("model", model);
query.setParameter("series", series);
return (User)query.getSingleResult();
}
}
|
[
"igor_zobov@mail.ru"
] |
igor_zobov@mail.ru
|
54739a7e41a1dd9cf35cbb0607613e3b93453afb
|
cc2e95d91ae1b038b08472a50f7e55518440cf45
|
/RanovHotel/app/src/main/java/com/example/randra/ranovhotels/activity/Start.java
|
ea6fde940ab7fa5d17efcb19b75a6bbf866193f5
|
[] |
no_license
|
randra/UAS-ANDROID_RANDRA_MAULIWIDYA_BIMA_TI3B
|
eb6ad87edf33061bdb10138892e8d0095aa2758c
|
7e1e624f379134d4e2fc58abbfa337b0b13494f5
|
refs/heads/master
| 2021-05-16T16:21:33.366655
| 2018-02-02T05:53:48
| 2018-02-02T05:53:48
| 119,938,723
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,549
|
java
|
package com.example.randra.ranovhotels.activity;
import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.support.v4.view.ViewPager;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
public class Start extends Activity {
private static final String TAG = "Start";
ViewPager viewPager;
// SliderAdapter adapter;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_start);
Log.d(TAG, "onCreate: starting.");
TextView textView = (TextView) findViewById(R.id.login);
Button buttonToRegister = (Button) findViewById(R.id.register);
buttonToRegister.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Log.d(TAG, "onClick: Clicked Register");
Intent intent = new Intent(Start.this, com.example.randra.ranovhotels.activity.RegisterActivity.class);
startActivity(intent);
}
});
textView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Log.d(TAG, "onClick: Clicked Login");
Intent intent = new Intent(Start.this, com.example.randra.ranovhotels.activity.LoginActivity.class);
startActivity(intent);
}
});
}
}
|
[
"randhisanjaya3@gmail.com"
] |
randhisanjaya3@gmail.com
|
e6273a9f1847611d945e9d9837d95fc68131891a
|
aa623c778fd88082cf59f442ad3cb671253ffc37
|
/src/main/java/com/tencentcloudapi/ocr/v20181119/models/MixedInvoiceOCRRequest.java
|
08b1e1d027445912c9285d45370276ea7939e17e
|
[
"Apache-2.0"
] |
permissive
|
zjm9109/tencentcloud-sdk-java
|
1eac89cedd70c8111c300d050f2c2f2ab1839189
|
a31d2d50f75dc740457289db0bf93ed8b3994c73
|
refs/heads/master
| 2020-09-30T10:32:57.836303
| 2019-12-05T14:18:17
| 2019-12-05T14:18:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,285
|
java
|
/*
* Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* 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.tencentcloudapi.ocr.v20181119.models;
import com.tencentcloudapi.common.AbstractModel;
import com.google.gson.annotations.SerializedName;
import com.google.gson.annotations.Expose;
import java.util.HashMap;
public class MixedInvoiceOCRRequest extends AbstractModel{
/**
* 图片的 Base64 值。
支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。
支持的图片大小:所下载图片经Base64编码后不超过 3M。图片下载时间不超过 3 秒。
图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
*/
@SerializedName("ImageBase64")
@Expose
private String ImageBase64;
/**
* 图片的 Url 地址。
支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。
支持的图片大小:所下载图片经 Base64 编码后不超过 3M。图片下载时间不超过 3 秒。
图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。
非腾讯云存储的 Url 速度和稳定性可能受一定影响。
*/
@SerializedName("ImageUrl")
@Expose
private String ImageUrl;
/**
* 需要识别的票据类型列表,为空或不填表示识别全部类型。
0:出租车发票
1:定额发票
2:火车票
3:增值税发票
5:机票行程单
8:通用机打发票
9:汽车票
10:轮船票
11:增值税发票(卷票 )
12:购车发票
13:过路过桥费发票
*/
@SerializedName("Types")
@Expose
private Integer [] Types;
/**
* 获取图片的 Base64 值。
支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。
支持的图片大小:所下载图片经Base64编码后不超过 3M。图片下载时间不超过 3 秒。
图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
* @return ImageBase64 图片的 Base64 值。
支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。
支持的图片大小:所下载图片经Base64编码后不超过 3M。图片下载时间不超过 3 秒。
图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
*/
public String getImageBase64() {
return this.ImageBase64;
}
/**
* 设置图片的 Base64 值。
支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。
支持的图片大小:所下载图片经Base64编码后不超过 3M。图片下载时间不超过 3 秒。
图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
* @param ImageBase64 图片的 Base64 值。
支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。
支持的图片大小:所下载图片经Base64编码后不超过 3M。图片下载时间不超过 3 秒。
图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
*/
public void setImageBase64(String ImageBase64) {
this.ImageBase64 = ImageBase64;
}
/**
* 获取图片的 Url 地址。
支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。
支持的图片大小:所下载图片经 Base64 编码后不超过 3M。图片下载时间不超过 3 秒。
图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。
非腾讯云存储的 Url 速度和稳定性可能受一定影响。
* @return ImageUrl 图片的 Url 地址。
支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。
支持的图片大小:所下载图片经 Base64 编码后不超过 3M。图片下载时间不超过 3 秒。
图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。
非腾讯云存储的 Url 速度和稳定性可能受一定影响。
*/
public String getImageUrl() {
return this.ImageUrl;
}
/**
* 设置图片的 Url 地址。
支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。
支持的图片大小:所下载图片经 Base64 编码后不超过 3M。图片下载时间不超过 3 秒。
图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。
非腾讯云存储的 Url 速度和稳定性可能受一定影响。
* @param ImageUrl 图片的 Url 地址。
支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。
支持的图片大小:所下载图片经 Base64 编码后不超过 3M。图片下载时间不超过 3 秒。
图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。
非腾讯云存储的 Url 速度和稳定性可能受一定影响。
*/
public void setImageUrl(String ImageUrl) {
this.ImageUrl = ImageUrl;
}
/**
* 获取需要识别的票据类型列表,为空或不填表示识别全部类型。
0:出租车发票
1:定额发票
2:火车票
3:增值税发票
5:机票行程单
8:通用机打发票
9:汽车票
10:轮船票
11:增值税发票(卷票 )
12:购车发票
13:过路过桥费发票
* @return Types 需要识别的票据类型列表,为空或不填表示识别全部类型。
0:出租车发票
1:定额发票
2:火车票
3:增值税发票
5:机票行程单
8:通用机打发票
9:汽车票
10:轮船票
11:增值税发票(卷票 )
12:购车发票
13:过路过桥费发票
*/
public Integer [] getTypes() {
return this.Types;
}
/**
* 设置需要识别的票据类型列表,为空或不填表示识别全部类型。
0:出租车发票
1:定额发票
2:火车票
3:增值税发票
5:机票行程单
8:通用机打发票
9:汽车票
10:轮船票
11:增值税发票(卷票 )
12:购车发票
13:过路过桥费发票
* @param Types 需要识别的票据类型列表,为空或不填表示识别全部类型。
0:出租车发票
1:定额发票
2:火车票
3:增值税发票
5:机票行程单
8:通用机打发票
9:汽车票
10:轮船票
11:增值税发票(卷票 )
12:购车发票
13:过路过桥费发票
*/
public void setTypes(Integer [] Types) {
this.Types = Types;
}
/**
* 内部实现,用户禁止调用
*/
public void toMap(HashMap<String, String> map, String prefix) {
this.setParamSimple(map, prefix + "ImageBase64", this.ImageBase64);
this.setParamSimple(map, prefix + "ImageUrl", this.ImageUrl);
this.setParamArraySimple(map, prefix + "Types.", this.Types);
}
}
|
[
"tencentcloudapi@tencent.com"
] |
tencentcloudapi@tencent.com
|
e8ee17a7e49ea2bc1bf010d4d0ca2946ef0f96be
|
a4dab24c0cdd7c8c52b5206f44a620c3d8dd8491
|
/madrid-hackathon/workshops/product-api/samples/api-sync-demo/product-api-client/src/main/java/com/expedia/eps/product/model/ExtraBed.java
|
d8f875fe318b81da54321346ce4a2d27f3712398
|
[] |
no_license
|
houcin175/exp-connectivity-util
|
9cf79315442f776a4d9d3456eb455103a3effb8d
|
5bda8532ff5c8a577626a510ceffa2638209513c
|
refs/heads/master
| 2020-04-27T13:29:14.055666
| 2017-05-05T14:19:56
| 2017-05-05T14:19:56
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 354
|
java
|
package com.expedia.eps.product.model;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ExtraBed {
private Long quantity;
private ExtraBedTypeModel type;
private String size;
private Surcharge surcharge;
}
|
[
"rgresellehartm@expedia.com"
] |
rgresellehartm@expedia.com
|
80e6dd5a11e2eee6a619dcc06c236a388245e199
|
989efe4afe000b6941304ec2b7581bb56a83dea7
|
/web-service-slave/src/main/java/com/bigdata/web/dao/ShowProjectMapper.java
|
3f49cd1f003a4580244b380ef529b3d8dc1d9bd9
|
[] |
no_license
|
mengboy/land-bigdata
|
77f2cea53de4d83fef7dede33ff701df8c3c3adb
|
87acc77f2263556eb63393894d3f1556c6e39bec
|
refs/heads/master
| 2020-03-12T13:54:12.541020
| 2018-04-23T11:51:19
| 2018-04-23T11:51:19
| 130,653,240
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 644
|
java
|
package com.bigdata.web.dao;
import java.util.List;
import java.util.Map;
import com.bigdata.web.domain.ShowProject;
public interface ShowProjectMapper {
int deleteByPrimaryKey(Integer spid);
int insert(ShowProject record);
int insertSelective(ShowProject record);
ShowProject selectByPrimaryKey(Integer spid);
int updateByPrimaryKeySelective(ShowProject record);
int updateByPrimaryKeyWithBLOBs(ShowProject record);
int updateByPrimaryKey(ShowProject record);
List<ShowProject> selectShowProjects(Map<String, Object> map);
int count();
List<ShowProject> getShowProjectByRdID(Integer rdid);
}
|
[
"bai.white86@gmail.com"
] |
bai.white86@gmail.com
|
0b6bcc65d5222592272b3c2b6470d29b089af047
|
c0d9b5142d043d34c68148090b9c12e80e72a34e
|
/2-1/work/org/apache/jsp/view/catalog_jsp.java
|
e60684390afd9272177cd1e8beb0436112a7bf46
|
[] |
no_license
|
gitmiami/sample_struts
|
6b137b19897f5686edef1af771bb91994cf6e34a
|
9a0b423bee7404362c2e94e8d00db0bb3f7bc1f6
|
refs/heads/master
| 2020-03-26T06:22:40.990023
| 2018-08-13T16:46:11
| 2018-08-13T16:46:11
| 144,602,073
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 31,406
|
java
|
package org.apache.jsp.view;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
public final class catalog_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent {
private static java.util.List _jspx_dependants;
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fhtml_005fhtml_0026_005flocale;
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005flogic_005fiterate_0026_005ftype_005foffset_005fname_005flength_005fid;
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fhtml_005flink_0026_005fparamProperty_005fparamName_005fparamId_005faction;
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fbean_005fwrite_0026_005fproperty_005fname_005fnobody;
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fhtml_005fform_0026_005faction;
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005flogic_005fgreaterThan_0026_005fvalue_005fname;
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fhtml_005fsubmit_0026_005fproperty;
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fbean_005fmessage_0026_005fkey_005fnobody;
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005flogic_005flessThan_0026_005fvalue_005fname;
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fhtml_005fhidden_0026_005fvalue_005fproperty_005fnobody;
public Object getDependants() {
return _jspx_dependants;
}
public void _jspInit() {
_005fjspx_005ftagPool_005fhtml_005fhtml_0026_005flocale = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
_005fjspx_005ftagPool_005flogic_005fiterate_0026_005ftype_005foffset_005fname_005flength_005fid = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
_005fjspx_005ftagPool_005fhtml_005flink_0026_005fparamProperty_005fparamName_005fparamId_005faction = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
_005fjspx_005ftagPool_005fbean_005fwrite_0026_005fproperty_005fname_005fnobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
_005fjspx_005ftagPool_005fhtml_005fform_0026_005faction = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
_005fjspx_005ftagPool_005flogic_005fgreaterThan_0026_005fvalue_005fname = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
_005fjspx_005ftagPool_005fhtml_005fsubmit_0026_005fproperty = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
_005fjspx_005ftagPool_005fbean_005fmessage_0026_005fkey_005fnobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
_005fjspx_005ftagPool_005flogic_005flessThan_0026_005fvalue_005fname = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
_005fjspx_005ftagPool_005fhtml_005fhidden_0026_005fvalue_005fproperty_005fnobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
}
public void _jspDestroy() {
_005fjspx_005ftagPool_005fhtml_005fhtml_0026_005flocale.release();
_005fjspx_005ftagPool_005flogic_005fiterate_0026_005ftype_005foffset_005fname_005flength_005fid.release();
_005fjspx_005ftagPool_005fhtml_005flink_0026_005fparamProperty_005fparamName_005fparamId_005faction.release();
_005fjspx_005ftagPool_005fbean_005fwrite_0026_005fproperty_005fname_005fnobody.release();
_005fjspx_005ftagPool_005fhtml_005fform_0026_005faction.release();
_005fjspx_005ftagPool_005flogic_005fgreaterThan_0026_005fvalue_005fname.release();
_005fjspx_005ftagPool_005fhtml_005fsubmit_0026_005fproperty.release();
_005fjspx_005ftagPool_005fbean_005fmessage_0026_005fkey_005fnobody.release();
_005fjspx_005ftagPool_005flogic_005flessThan_0026_005fvalue_005fname.release();
_005fjspx_005ftagPool_005fhtml_005fhidden_0026_005fvalue_005fproperty_005fnobody.release();
}
public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws java.io.IOException, ServletException {
JspFactory _jspxFactory = null;
PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
JspWriter _jspx_out = null;
PageContext _jspx_page_context = null;
try {
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/html; charset=Shift_JIS");
pageContext = _jspxFactory.getPageContext(this, request, response,
null, true, 8192, true);
_jspx_page_context = pageContext;
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
_jspx_out = out;
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
// html:html
org.apache.struts.taglib.html.HtmlTag _jspx_th_html_005fhtml_005f0 = (org.apache.struts.taglib.html.HtmlTag) _005fjspx_005ftagPool_005fhtml_005fhtml_0026_005flocale.get(org.apache.struts.taglib.html.HtmlTag.class);
_jspx_th_html_005fhtml_005f0.setPageContext(_jspx_page_context);
_jspx_th_html_005fhtml_005f0.setParent(null);
_jspx_th_html_005fhtml_005f0.setLocale(true);
int _jspx_eval_html_005fhtml_005f0 = _jspx_th_html_005fhtml_005f0.doStartTag();
if (_jspx_eval_html_005fhtml_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
do {
out.write("\r\n");
out.write(" <HEAD>\r\n");
out.write(" <TITLE>カタログ</TITLE>\r\n");
out.write(" </HEAD>\r\n");
out.write("\r\n");
out.write(" <BODY>\r\n");
out.write(" 詳細を見たい商品の商品番号をクリックしてください。\r\n");
out.write(" <TABLE>\r\n");
out.write(" <TBODY>\r\n");
out.write(" <TR>\r\n");
out.write(" <TH>商品番号</TH>\r\n");
out.write(" <TH>商品名</TH>\r\n");
out.write(" <TH>価格</TH>\r\n");
out.write(" </TR>\r\n");
out.write("\r\n");
out.write(" <!-- 1)offset、length属性によるページ制御 -->\r\n");
out.write("\r\n");
out.write(" ");
// logic:iterate
org.apache.struts.taglib.logic.IterateTag _jspx_th_logic_005fiterate_005f0 = (org.apache.struts.taglib.logic.IterateTag) _005fjspx_005ftagPool_005flogic_005fiterate_0026_005ftype_005foffset_005fname_005flength_005fid.get(org.apache.struts.taglib.logic.IterateTag.class);
_jspx_th_logic_005fiterate_005f0.setPageContext(_jspx_page_context);
_jspx_th_logic_005fiterate_005f0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_html_005fhtml_005f0);
_jspx_th_logic_005fiterate_005f0.setId("product");
_jspx_th_logic_005fiterate_005f0.setName("products");
_jspx_th_logic_005fiterate_005f0.setType("model.Product");
_jspx_th_logic_005fiterate_005f0.setOffset((String)request.getAttribute("offset") );
_jspx_th_logic_005fiterate_005f0.setLength("10");
int _jspx_eval_logic_005fiterate_005f0 = _jspx_th_logic_005fiterate_005f0.doStartTag();
if (_jspx_eval_logic_005fiterate_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
model.Product product = null;
if (_jspx_eval_logic_005fiterate_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.pushBody();
_jspx_th_logic_005fiterate_005f0.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
_jspx_th_logic_005fiterate_005f0.doInitBody();
}
product = (model.Product) _jspx_page_context.findAttribute("product");
do {
out.write("\r\n");
out.write("\r\n");
out.write(" <TR>\r\n");
out.write(" <TD>");
if (_jspx_meth_html_005flink_005f0(_jspx_th_logic_005fiterate_005f0, _jspx_page_context))
return;
out.write("</TD>\r\n");
out.write(" <TD>");
if (_jspx_meth_bean_005fwrite_005f1(_jspx_th_logic_005fiterate_005f0, _jspx_page_context))
return;
out.write("</TD>\r\n");
out.write(" <TD>");
if (_jspx_meth_bean_005fwrite_005f2(_jspx_th_logic_005fiterate_005f0, _jspx_page_context))
return;
out.write("</TD>\r\n");
out.write(" </TR>\r\n");
out.write("\r\n");
out.write(" ");
int evalDoAfterBody = _jspx_th_logic_005fiterate_005f0.doAfterBody();
product = (model.Product) _jspx_page_context.findAttribute("product");
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
if (_jspx_eval_logic_005fiterate_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.popBody();
}
}
if (_jspx_th_logic_005fiterate_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005flogic_005fiterate_0026_005ftype_005foffset_005fname_005flength_005fid.reuse(_jspx_th_logic_005fiterate_005f0);
return;
}
_005fjspx_005ftagPool_005flogic_005fiterate_0026_005ftype_005foffset_005fname_005flength_005fid.reuse(_jspx_th_logic_005fiterate_005f0);
out.write("\r\n");
out.write("\r\n");
out.write(" </TBODY>\r\n");
out.write(" </TABLE>\r\n");
out.write("\r\n");
out.write(" ");
// html:form
org.apache.struts.taglib.html.FormTag _jspx_th_html_005fform_005f0 = (org.apache.struts.taglib.html.FormTag) _005fjspx_005ftagPool_005fhtml_005fform_0026_005faction.get(org.apache.struts.taglib.html.FormTag.class);
_jspx_th_html_005fform_005f0.setPageContext(_jspx_page_context);
_jspx_th_html_005fform_005f0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_html_005fhtml_005f0);
_jspx_th_html_005fform_005f0.setAction("/CatalogPage");
int _jspx_eval_html_005fform_005f0 = _jspx_th_html_005fform_005f0.doStartTag();
if (_jspx_eval_html_005fform_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
do {
out.write("\r\n");
out.write("\r\n");
out.write(" <!-- 2)前に進むボタン、次に進むボタンの表示制御 -->\r\n");
out.write(" <!-- 3)LookupDispatchActionを利用するための記述方法 -->\r\n");
out.write("\r\n");
out.write(" ");
if (_jspx_meth_logic_005fgreaterThan_005f0(_jspx_th_html_005fform_005f0, _jspx_page_context))
return;
out.write("\r\n");
out.write("\r\n");
out.write(" ");
// logic:lessThan
org.apache.struts.taglib.logic.LessThanTag _jspx_th_logic_005flessThan_005f0 = (org.apache.struts.taglib.logic.LessThanTag) _005fjspx_005ftagPool_005flogic_005flessThan_0026_005fvalue_005fname.get(org.apache.struts.taglib.logic.LessThanTag.class);
_jspx_th_logic_005flessThan_005f0.setPageContext(_jspx_page_context);
_jspx_th_logic_005flessThan_005f0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_html_005fform_005f0);
_jspx_th_logic_005flessThan_005f0.setName("offset");
_jspx_th_logic_005flessThan_005f0.setValue(Integer.toString(((java.util.List)session.getAttribute("products")).size() -10) );
int _jspx_eval_logic_005flessThan_005f0 = _jspx_th_logic_005flessThan_005f0.doStartTag();
if (_jspx_eval_logic_005flessThan_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
do {
out.write("\r\n");
out.write(" ");
if (_jspx_meth_html_005fsubmit_005f1(_jspx_th_logic_005flessThan_005f0, _jspx_page_context))
return;
out.write("\r\n");
out.write(" ");
int evalDoAfterBody = _jspx_th_logic_005flessThan_005f0.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
}
if (_jspx_th_logic_005flessThan_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005flogic_005flessThan_0026_005fvalue_005fname.reuse(_jspx_th_logic_005flessThan_005f0);
return;
}
_005fjspx_005ftagPool_005flogic_005flessThan_0026_005fvalue_005fname.reuse(_jspx_th_logic_005flessThan_005f0);
out.write("\r\n");
out.write("\r\n");
out.write(" <!-- 4)hiddenタグで現在のoffsetを送信する -->\r\n");
out.write(" ");
// html:hidden
org.apache.struts.taglib.html.HiddenTag _jspx_th_html_005fhidden_005f0 = (org.apache.struts.taglib.html.HiddenTag) _005fjspx_005ftagPool_005fhtml_005fhidden_0026_005fvalue_005fproperty_005fnobody.get(org.apache.struts.taglib.html.HiddenTag.class);
_jspx_th_html_005fhidden_005f0.setPageContext(_jspx_page_context);
_jspx_th_html_005fhidden_005f0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_html_005fform_005f0);
_jspx_th_html_005fhidden_005f0.setProperty("offset");
_jspx_th_html_005fhidden_005f0.setValue((String)request.getAttribute("offset") );
int _jspx_eval_html_005fhidden_005f0 = _jspx_th_html_005fhidden_005f0.doStartTag();
if (_jspx_th_html_005fhidden_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fhtml_005fhidden_0026_005fvalue_005fproperty_005fnobody.reuse(_jspx_th_html_005fhidden_005f0);
return;
}
_005fjspx_005ftagPool_005fhtml_005fhidden_0026_005fvalue_005fproperty_005fnobody.reuse(_jspx_th_html_005fhidden_005f0);
out.write("\r\n");
out.write("\r\n");
out.write(" ");
int evalDoAfterBody = _jspx_th_html_005fform_005f0.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
}
if (_jspx_th_html_005fform_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fhtml_005fform_0026_005faction.reuse(_jspx_th_html_005fform_005f0);
return;
}
_005fjspx_005ftagPool_005fhtml_005fform_0026_005faction.reuse(_jspx_th_html_005fform_005f0);
out.write("\r\n");
out.write(" </BODY>\r\n");
int evalDoAfterBody = _jspx_th_html_005fhtml_005f0.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
}
if (_jspx_th_html_005fhtml_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fhtml_005fhtml_0026_005flocale.reuse(_jspx_th_html_005fhtml_005f0);
return;
}
_005fjspx_005ftagPool_005fhtml_005fhtml_0026_005flocale.reuse(_jspx_th_html_005fhtml_005f0);
out.write('\r');
out.write('\n');
} catch (Throwable t) {
if (!(t instanceof SkipPageException)){
out = _jspx_out;
if (out != null && out.getBufferSize() != 0)
out.clearBuffer();
if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
}
} finally {
if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
}
}
private boolean _jspx_meth_html_005flink_005f0(javax.servlet.jsp.tagext.JspTag _jspx_th_logic_005fiterate_005f0, PageContext _jspx_page_context)
throws Throwable {
PageContext pageContext = _jspx_page_context;
JspWriter out = _jspx_page_context.getOut();
// html:link
org.apache.struts.taglib.html.LinkTag _jspx_th_html_005flink_005f0 = (org.apache.struts.taglib.html.LinkTag) _005fjspx_005ftagPool_005fhtml_005flink_0026_005fparamProperty_005fparamName_005fparamId_005faction.get(org.apache.struts.taglib.html.LinkTag.class);
_jspx_th_html_005flink_005f0.setPageContext(_jspx_page_context);
_jspx_th_html_005flink_005f0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_logic_005fiterate_005f0);
_jspx_th_html_005flink_005f0.setAction("/CatalogDetail");
_jspx_th_html_005flink_005f0.setParamId("id");
_jspx_th_html_005flink_005f0.setParamName("product");
_jspx_th_html_005flink_005f0.setParamProperty("id");
int _jspx_eval_html_005flink_005f0 = _jspx_th_html_005flink_005f0.doStartTag();
if (_jspx_eval_html_005flink_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
if (_jspx_eval_html_005flink_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.pushBody();
_jspx_th_html_005flink_005f0.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
_jspx_th_html_005flink_005f0.doInitBody();
}
do {
out.write("\r\n");
out.write(" ");
if (_jspx_meth_bean_005fwrite_005f0(_jspx_th_html_005flink_005f0, _jspx_page_context))
return true;
int evalDoAfterBody = _jspx_th_html_005flink_005f0.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
if (_jspx_eval_html_005flink_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.popBody();
}
}
if (_jspx_th_html_005flink_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fhtml_005flink_0026_005fparamProperty_005fparamName_005fparamId_005faction.reuse(_jspx_th_html_005flink_005f0);
return true;
}
_005fjspx_005ftagPool_005fhtml_005flink_0026_005fparamProperty_005fparamName_005fparamId_005faction.reuse(_jspx_th_html_005flink_005f0);
return false;
}
private boolean _jspx_meth_bean_005fwrite_005f0(javax.servlet.jsp.tagext.JspTag _jspx_th_html_005flink_005f0, PageContext _jspx_page_context)
throws Throwable {
PageContext pageContext = _jspx_page_context;
JspWriter out = _jspx_page_context.getOut();
// bean:write
org.apache.struts.taglib.bean.WriteTag _jspx_th_bean_005fwrite_005f0 = (org.apache.struts.taglib.bean.WriteTag) _005fjspx_005ftagPool_005fbean_005fwrite_0026_005fproperty_005fname_005fnobody.get(org.apache.struts.taglib.bean.WriteTag.class);
_jspx_th_bean_005fwrite_005f0.setPageContext(_jspx_page_context);
_jspx_th_bean_005fwrite_005f0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_html_005flink_005f0);
_jspx_th_bean_005fwrite_005f0.setName("product");
_jspx_th_bean_005fwrite_005f0.setProperty("id");
int _jspx_eval_bean_005fwrite_005f0 = _jspx_th_bean_005fwrite_005f0.doStartTag();
if (_jspx_th_bean_005fwrite_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fbean_005fwrite_0026_005fproperty_005fname_005fnobody.reuse(_jspx_th_bean_005fwrite_005f0);
return true;
}
_005fjspx_005ftagPool_005fbean_005fwrite_0026_005fproperty_005fname_005fnobody.reuse(_jspx_th_bean_005fwrite_005f0);
return false;
}
private boolean _jspx_meth_bean_005fwrite_005f1(javax.servlet.jsp.tagext.JspTag _jspx_th_logic_005fiterate_005f0, PageContext _jspx_page_context)
throws Throwable {
PageContext pageContext = _jspx_page_context;
JspWriter out = _jspx_page_context.getOut();
// bean:write
org.apache.struts.taglib.bean.WriteTag _jspx_th_bean_005fwrite_005f1 = (org.apache.struts.taglib.bean.WriteTag) _005fjspx_005ftagPool_005fbean_005fwrite_0026_005fproperty_005fname_005fnobody.get(org.apache.struts.taglib.bean.WriteTag.class);
_jspx_th_bean_005fwrite_005f1.setPageContext(_jspx_page_context);
_jspx_th_bean_005fwrite_005f1.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_logic_005fiterate_005f0);
_jspx_th_bean_005fwrite_005f1.setName("product");
_jspx_th_bean_005fwrite_005f1.setProperty("name");
int _jspx_eval_bean_005fwrite_005f1 = _jspx_th_bean_005fwrite_005f1.doStartTag();
if (_jspx_th_bean_005fwrite_005f1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fbean_005fwrite_0026_005fproperty_005fname_005fnobody.reuse(_jspx_th_bean_005fwrite_005f1);
return true;
}
_005fjspx_005ftagPool_005fbean_005fwrite_0026_005fproperty_005fname_005fnobody.reuse(_jspx_th_bean_005fwrite_005f1);
return false;
}
private boolean _jspx_meth_bean_005fwrite_005f2(javax.servlet.jsp.tagext.JspTag _jspx_th_logic_005fiterate_005f0, PageContext _jspx_page_context)
throws Throwable {
PageContext pageContext = _jspx_page_context;
JspWriter out = _jspx_page_context.getOut();
// bean:write
org.apache.struts.taglib.bean.WriteTag _jspx_th_bean_005fwrite_005f2 = (org.apache.struts.taglib.bean.WriteTag) _005fjspx_005ftagPool_005fbean_005fwrite_0026_005fproperty_005fname_005fnobody.get(org.apache.struts.taglib.bean.WriteTag.class);
_jspx_th_bean_005fwrite_005f2.setPageContext(_jspx_page_context);
_jspx_th_bean_005fwrite_005f2.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_logic_005fiterate_005f0);
_jspx_th_bean_005fwrite_005f2.setName("product");
_jspx_th_bean_005fwrite_005f2.setProperty("price");
int _jspx_eval_bean_005fwrite_005f2 = _jspx_th_bean_005fwrite_005f2.doStartTag();
if (_jspx_th_bean_005fwrite_005f2.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fbean_005fwrite_0026_005fproperty_005fname_005fnobody.reuse(_jspx_th_bean_005fwrite_005f2);
return true;
}
_005fjspx_005ftagPool_005fbean_005fwrite_0026_005fproperty_005fname_005fnobody.reuse(_jspx_th_bean_005fwrite_005f2);
return false;
}
private boolean _jspx_meth_logic_005fgreaterThan_005f0(javax.servlet.jsp.tagext.JspTag _jspx_th_html_005fform_005f0, PageContext _jspx_page_context)
throws Throwable {
PageContext pageContext = _jspx_page_context;
JspWriter out = _jspx_page_context.getOut();
// logic:greaterThan
org.apache.struts.taglib.logic.GreaterThanTag _jspx_th_logic_005fgreaterThan_005f0 = (org.apache.struts.taglib.logic.GreaterThanTag) _005fjspx_005ftagPool_005flogic_005fgreaterThan_0026_005fvalue_005fname.get(org.apache.struts.taglib.logic.GreaterThanTag.class);
_jspx_th_logic_005fgreaterThan_005f0.setPageContext(_jspx_page_context);
_jspx_th_logic_005fgreaterThan_005f0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_html_005fform_005f0);
_jspx_th_logic_005fgreaterThan_005f0.setName("offset");
_jspx_th_logic_005fgreaterThan_005f0.setValue("0");
int _jspx_eval_logic_005fgreaterThan_005f0 = _jspx_th_logic_005fgreaterThan_005f0.doStartTag();
if (_jspx_eval_logic_005fgreaterThan_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
do {
out.write("\r\n");
out.write(" ");
if (_jspx_meth_html_005fsubmit_005f0(_jspx_th_logic_005fgreaterThan_005f0, _jspx_page_context))
return true;
out.write("\r\n");
out.write(" ");
int evalDoAfterBody = _jspx_th_logic_005fgreaterThan_005f0.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
}
if (_jspx_th_logic_005fgreaterThan_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005flogic_005fgreaterThan_0026_005fvalue_005fname.reuse(_jspx_th_logic_005fgreaterThan_005f0);
return true;
}
_005fjspx_005ftagPool_005flogic_005fgreaterThan_0026_005fvalue_005fname.reuse(_jspx_th_logic_005fgreaterThan_005f0);
return false;
}
private boolean _jspx_meth_html_005fsubmit_005f0(javax.servlet.jsp.tagext.JspTag _jspx_th_logic_005fgreaterThan_005f0, PageContext _jspx_page_context)
throws Throwable {
PageContext pageContext = _jspx_page_context;
JspWriter out = _jspx_page_context.getOut();
// html:submit
org.apache.struts.taglib.html.SubmitTag _jspx_th_html_005fsubmit_005f0 = (org.apache.struts.taglib.html.SubmitTag) _005fjspx_005ftagPool_005fhtml_005fsubmit_0026_005fproperty.get(org.apache.struts.taglib.html.SubmitTag.class);
_jspx_th_html_005fsubmit_005f0.setPageContext(_jspx_page_context);
_jspx_th_html_005fsubmit_005f0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_logic_005fgreaterThan_005f0);
_jspx_th_html_005fsubmit_005f0.setProperty("action");
int _jspx_eval_html_005fsubmit_005f0 = _jspx_th_html_005fsubmit_005f0.doStartTag();
if (_jspx_eval_html_005fsubmit_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
if (_jspx_eval_html_005fsubmit_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.pushBody();
_jspx_th_html_005fsubmit_005f0.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
_jspx_th_html_005fsubmit_005f0.doInitBody();
}
do {
out.write("\r\n");
out.write(" ");
if (_jspx_meth_bean_005fmessage_005f0(_jspx_th_html_005fsubmit_005f0, _jspx_page_context))
return true;
out.write("\r\n");
out.write(" ");
int evalDoAfterBody = _jspx_th_html_005fsubmit_005f0.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
if (_jspx_eval_html_005fsubmit_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.popBody();
}
}
if (_jspx_th_html_005fsubmit_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fhtml_005fsubmit_0026_005fproperty.reuse(_jspx_th_html_005fsubmit_005f0);
return true;
}
_005fjspx_005ftagPool_005fhtml_005fsubmit_0026_005fproperty.reuse(_jspx_th_html_005fsubmit_005f0);
return false;
}
private boolean _jspx_meth_bean_005fmessage_005f0(javax.servlet.jsp.tagext.JspTag _jspx_th_html_005fsubmit_005f0, PageContext _jspx_page_context)
throws Throwable {
PageContext pageContext = _jspx_page_context;
JspWriter out = _jspx_page_context.getOut();
// bean:message
org.apache.struts.taglib.bean.MessageTag _jspx_th_bean_005fmessage_005f0 = (org.apache.struts.taglib.bean.MessageTag) _005fjspx_005ftagPool_005fbean_005fmessage_0026_005fkey_005fnobody.get(org.apache.struts.taglib.bean.MessageTag.class);
_jspx_th_bean_005fmessage_005f0.setPageContext(_jspx_page_context);
_jspx_th_bean_005fmessage_005f0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_html_005fsubmit_005f0);
_jspx_th_bean_005fmessage_005f0.setKey("back");
int _jspx_eval_bean_005fmessage_005f0 = _jspx_th_bean_005fmessage_005f0.doStartTag();
if (_jspx_th_bean_005fmessage_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fbean_005fmessage_0026_005fkey_005fnobody.reuse(_jspx_th_bean_005fmessage_005f0);
return true;
}
_005fjspx_005ftagPool_005fbean_005fmessage_0026_005fkey_005fnobody.reuse(_jspx_th_bean_005fmessage_005f0);
return false;
}
private boolean _jspx_meth_html_005fsubmit_005f1(javax.servlet.jsp.tagext.JspTag _jspx_th_logic_005flessThan_005f0, PageContext _jspx_page_context)
throws Throwable {
PageContext pageContext = _jspx_page_context;
JspWriter out = _jspx_page_context.getOut();
// html:submit
org.apache.struts.taglib.html.SubmitTag _jspx_th_html_005fsubmit_005f1 = (org.apache.struts.taglib.html.SubmitTag) _005fjspx_005ftagPool_005fhtml_005fsubmit_0026_005fproperty.get(org.apache.struts.taglib.html.SubmitTag.class);
_jspx_th_html_005fsubmit_005f1.setPageContext(_jspx_page_context);
_jspx_th_html_005fsubmit_005f1.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_logic_005flessThan_005f0);
_jspx_th_html_005fsubmit_005f1.setProperty("action");
int _jspx_eval_html_005fsubmit_005f1 = _jspx_th_html_005fsubmit_005f1.doStartTag();
if (_jspx_eval_html_005fsubmit_005f1 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
if (_jspx_eval_html_005fsubmit_005f1 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.pushBody();
_jspx_th_html_005fsubmit_005f1.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
_jspx_th_html_005fsubmit_005f1.doInitBody();
}
do {
out.write("\r\n");
out.write(" ");
if (_jspx_meth_bean_005fmessage_005f1(_jspx_th_html_005fsubmit_005f1, _jspx_page_context))
return true;
out.write("\r\n");
out.write(" ");
int evalDoAfterBody = _jspx_th_html_005fsubmit_005f1.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
if (_jspx_eval_html_005fsubmit_005f1 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.popBody();
}
}
if (_jspx_th_html_005fsubmit_005f1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fhtml_005fsubmit_0026_005fproperty.reuse(_jspx_th_html_005fsubmit_005f1);
return true;
}
_005fjspx_005ftagPool_005fhtml_005fsubmit_0026_005fproperty.reuse(_jspx_th_html_005fsubmit_005f1);
return false;
}
private boolean _jspx_meth_bean_005fmessage_005f1(javax.servlet.jsp.tagext.JspTag _jspx_th_html_005fsubmit_005f1, PageContext _jspx_page_context)
throws Throwable {
PageContext pageContext = _jspx_page_context;
JspWriter out = _jspx_page_context.getOut();
// bean:message
org.apache.struts.taglib.bean.MessageTag _jspx_th_bean_005fmessage_005f1 = (org.apache.struts.taglib.bean.MessageTag) _005fjspx_005ftagPool_005fbean_005fmessage_0026_005fkey_005fnobody.get(org.apache.struts.taglib.bean.MessageTag.class);
_jspx_th_bean_005fmessage_005f1.setPageContext(_jspx_page_context);
_jspx_th_bean_005fmessage_005f1.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_html_005fsubmit_005f1);
_jspx_th_bean_005fmessage_005f1.setKey("next");
int _jspx_eval_bean_005fmessage_005f1 = _jspx_th_bean_005fmessage_005f1.doStartTag();
if (_jspx_th_bean_005fmessage_005f1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fbean_005fmessage_0026_005fkey_005fnobody.reuse(_jspx_th_bean_005fmessage_005f1);
return true;
}
_005fjspx_005ftagPool_005fbean_005fmessage_0026_005fkey_005fnobody.reuse(_jspx_th_bean_005fmessage_005f1);
return false;
}
}
|
[
"adiosmike@gmail.com"
] |
adiosmike@gmail.com
|
72d985b4f11db9d03f47384345a18dcf3c85bb4b
|
4e5cb0dd69e2960cedaa1325e095d423e39beeea
|
/anybook/app/src/main/java/it/unitn/disi/anybook/activities/fragments/WishlistFragment.java
|
8c7d86ebd21f1327315240ffeae9ba33bd39a3d7
|
[] |
no_license
|
laraCeschi/AnyBook
|
81a8169fbfa40a92786eeb6df047d5cfb6693d75
|
0c3921b745cbf26cd88fb7c4129462a19278db3e
|
refs/heads/master
| 2020-12-10T03:26:28.435648
| 2017-06-27T14:49:18
| 2017-06-27T14:49:18
| 95,568,807
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 12,437
|
java
|
package it.unitn.disi.anybook.activities.fragments;
import android.content.DialogInterface;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.RectF;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v7.app.AlertDialog;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.helper.ItemTouchHelper;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Toast;
import it.unitn.disi.anybook.R;
import it.unitn.disi.anybook.activities.adapters.BookListAdapter;
import it.unitn.disi.anybook.data.Book;
import it.unitn.disi.anybook.data.Library;
import it.unitn.disi.anybook.databaseUtil.DbHelper;
import java.util.ArrayList;
import static it.unitn.disi.anybook.data.StaticStrings.WISHLIST;
import static it.unitn.disi.anybook.dataHandler.BookHandler.deleteBook;
import static it.unitn.disi.anybook.dataHandler.BookHandler.setAuthor;
import static it.unitn.disi.anybook.dataHandler.BookHandler.setCategories;
import static it.unitn.disi.anybook.dataHandler.LibraryHandler.allBookLibraryRelation;
import static it.unitn.disi.anybook.dataHandler.LibraryHandler.deleteBookLibraryRelation;
import static it.unitn.disi.anybook.dataHandler.LibraryHandler.getBookByLibray;
import static it.unitn.disi.anybook.dataHandler.LibraryHandler.getLibraryByName;
/**
* Questa classe rappresenta il Fragment in cui viene inserita la Wishlist
*/
public class WishlistFragment extends Fragment {
private static final String KEY_LAYOUT_MANAGER = "layoutManager";
private static final int SPAN_COUNT = 2;
private enum LayoutManagerType {
GRID_LAYOUT_MANAGER,
LINEAR_LAYOUT_MANAGER
}
protected LayoutManagerType mCurrentLayoutManagerType;
protected RecyclerView mRecyclerView;
protected BookListAdapter mAdapter;
protected RecyclerView.LayoutManager mLayoutManager;
protected ArrayList<Book> mDataset;
private AlertDialog.Builder alertDialog;
private View view;
private int posizione_da_eliminare = -1 ;
/**
* Questo metodo crea il Fragment e inizializza il dataset della RecycleView ospitata
* @param savedInstanceState contiene i dati più recenti forniti a onSaveInstanceState().
*/
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
initDataset();
}
/**
*Questo metodo istanzia la grafica del Fragment.
* @param inflater il LayoutInflater che viene utilizzato per "gonfiare" una view in un Fragment
* @param container la view gerarchicamente superiore in cui va inserito il Fragment
* @param savedInstanceState l'eventuale stato precedente del Fragment
* @return la View della grafica del Fragment
*/
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.list_fragment, container, false);
mRecyclerView = (RecyclerView) rootView.findViewById(R.id.book_list_recyclerView);
mLayoutManager = new LinearLayoutManager(getActivity());
mCurrentLayoutManagerType = LayoutManagerType.LINEAR_LAYOUT_MANAGER;
if (savedInstanceState != null) {
mCurrentLayoutManagerType = (LayoutManagerType) savedInstanceState
.getSerializable(KEY_LAYOUT_MANAGER);
}
setRecyclerViewLayoutManager(mCurrentLayoutManagerType);
mAdapter = new BookListAdapter(mDataset);
mRecyclerView.setAdapter(mAdapter);
initDialog();
initSwipe();
return rootView;
}
/**
* Questo metodo performa le azioni da compiere alla ripresa dell'attività
*/
@Override
public void onResume() {
super.onResume();
initDataset();
mAdapter = new BookListAdapter(mDataset);
mRecyclerView.setAdapter(mAdapter);
}
/**
* Questo metodo imposta il LayoutManager della RecycleView
* @param layoutManagerType Tipo di Layoutmanager che sostiusce il corrente LayoutManager
*/
public void setRecyclerViewLayoutManager(LayoutManagerType layoutManagerType) {
int scrollPosition = 0;
// Se un LayoutManager è già presente, ottieni l'attuale posizione di scroll
if (mRecyclerView.getLayoutManager() != null) {
scrollPosition = ((LinearLayoutManager) mRecyclerView.getLayoutManager())
.findFirstCompletelyVisibleItemPosition();
}
switch (layoutManagerType) {
case GRID_LAYOUT_MANAGER:
mLayoutManager = new GridLayoutManager(getActivity(), SPAN_COUNT);
mCurrentLayoutManagerType = LayoutManagerType.GRID_LAYOUT_MANAGER;
break;
case LINEAR_LAYOUT_MANAGER:
mLayoutManager = new LinearLayoutManager(getActivity());
mCurrentLayoutManagerType = LayoutManagerType.LINEAR_LAYOUT_MANAGER;
break;
default:
mLayoutManager = new LinearLayoutManager(getActivity());
mCurrentLayoutManagerType = LayoutManagerType.LINEAR_LAYOUT_MANAGER;
}
mRecyclerView.setLayoutManager(mLayoutManager);
mRecyclerView.scrollToPosition(scrollPosition);
}
/**
* Questo metodo salva lo stato corrente.
* @param savedInstanceState il Bundle in cui salvare lo stato corrente.
*/
@Override
public void onSaveInstanceState(Bundle savedInstanceState) {
savedInstanceState.putSerializable(KEY_LAYOUT_MANAGER, mCurrentLayoutManagerType);
super.onSaveInstanceState(savedInstanceState);
}
/**
* Questo metodo genera il dataset da inserire nella RecycleView
*/
private void initDataset() {
DbHelper helper = new DbHelper(getContext());
Library library = getLibraryByName(helper, WISHLIST);
if(library != null) {
mDataset = getBookByLibray(helper, library);
}
if(mDataset != null) {
for (int i = 0; i < mDataset.size(); i++) {
mDataset.get(i).setAuthors(setAuthor(helper, mDataset.get(i)));
mDataset.get(i).setCategories(setCategories(helper, mDataset.get(i)));
}
}
helper.close();
}
/**
* Questo metodo inserisce tutti i listener e la callback per il corretto funzionamento dell'eliminazione
* di un oggetto tramite swipe
*/
private void initSwipe(){
ItemTouchHelper.SimpleCallback simpleCallback = new ItemTouchHelper.SimpleCallback(0, ItemTouchHelper.LEFT ) {
@Override
public boolean onMove(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder, RecyclerView.ViewHolder target) {
return false;
}
@Override
public void onSwiped(RecyclerView.ViewHolder viewHolder, int direction) {
int position = viewHolder.getAdapterPosition();
if(direction == ItemTouchHelper.LEFT){
//da inserire questa chiamata a funzione nel listener del dialog
removeView();
alertDialog.setTitle("Confermare l'eliminazione");
posizione_da_eliminare = position;
alertDialog.show();
}
/*else{
//un possibile swipe a destra da inserire qui
}*/
}
@Override
public void onChildDraw(Canvas c, RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder, float dX, float dY, int actionState, boolean isCurrentlyActive) {
Paint p = new Paint();
if(actionState == ItemTouchHelper.ACTION_STATE_SWIPE){
View itemView = viewHolder.itemView;
float height = (float) itemView.getBottom() - (float) itemView.getTop();
float width = height / 3;
if(dX > 0){
p.setColor(Color.parseColor("#388E3C"));
RectF background = new RectF((float) itemView.getLeft(), (float) itemView.getTop(), dX,(float) itemView.getBottom());
c.drawRect(background,p);
//icon = BitmapFactory.decodeResource(getResources(), R.drawable.ic_edit_white);
//TODO: da inserire una possibile immagine
//RectF icon_dest = new RectF((float) itemView.getLeft() + width ,(float) itemView.getTop() + width,(float) itemView.getLeft()+ 2*width,(float)itemView.getBottom() - width);
//c.drawBitmap(icon,null,icon_dest,p);
}
else {
p.setColor(Color.parseColor("#D32F2F"));
RectF background = new RectF((float) itemView.getRight() + dX, (float) itemView.getTop(),(float) itemView.getRight(), (float) itemView.getBottom());
c.drawRect(background,p);
//icon = BitmapFactory.decodeResource(getResources(), R.drawable.ic_delete_white);
// TODO: da inserire una possibile immagine
//RectF icon_dest = new RectF((float) itemView.getRight() - 2*width ,(float) itemView.getTop() + width,(float) itemView.getRight() - width,(float)itemView.getBottom() - width);
//c.drawBitmap(icon,null,icon_dest,p);
}
}
super.onChildDraw(c, recyclerView, viewHolder, dX, dY, actionState, isCurrentlyActive);
}
};
ItemTouchHelper itemTouchHelper = new ItemTouchHelper(simpleCallback);
itemTouchHelper.attachToRecyclerView(mRecyclerView);
}
/**
* Questo metodo rimuove il dialog dal suo parent
*/
private void removeView(){
if(view.getParent() != null){
((ViewGroup) view.getParent()).removeView(view);
}
}
/**
* Questo metodo elimina un libro data la sua posizione
* @param position l'indice a cui si trova il libro da eliminare
*/
private void removeBook(int position){
DbHelper helper = new DbHelper(getActivity());
Library library = getLibraryByName(helper, WISHLIST);
if(deleteBookLibraryRelation(helper, mDataset.get(position), library)){
if(allBookLibraryRelation(helper, mDataset.get(position)) == 0){
deleteBook(helper, mDataset.get(position));
initDataset();
mAdapter.notifyDataSetChanged();
}
}
else{
Toast toast = Toast.makeText(getActivity(), "inmpossibile eliminare il libro", Toast.LENGTH_SHORT);
toast.show();
}
helper.close();
}
/**
* Questo metodo inizializza il dialog per la conferma (o annullamento) dell'eliminazione
*/
private void initDialog(){
alertDialog = new AlertDialog.Builder(this.getContext());
// questo hint è solo inutile, null viene passato come rootview facoltativa
view = getActivity().getLayoutInflater().inflate(R.layout.dialog_layout_wishlist, null);
alertDialog.setView(view);
alertDialog.setPositiveButton("ELIMINA", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
removeBook(posizione_da_eliminare);
mAdapter.removeItem(posizione_da_eliminare);
mAdapter.notifyDataSetChanged();
dialog.dismiss();
}
});
alertDialog.setNegativeButton("ANNULLA", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
mAdapter.notifyDataSetChanged();
dialog.dismiss();
}
});
alertDialog.setOnDismissListener(new DialogInterface.OnDismissListener() {
@Override
public void onDismiss(DialogInterface dialog) {
mAdapter.notifyDataSetChanged();
}
});
}
}
|
[
"lara.ceschi@gmail.com"
] |
lara.ceschi@gmail.com
|
8e7c8a6c4fc1df922f196328648d7d84a075cd3b
|
b767d141bbbe6f852f9a19037797687470cf51f5
|
/src/claseobjeto/Persona.java
|
2826ab8f63bd31fec9c83d7418f9559b6297799b
|
[] |
no_license
|
josval56/ClaseObjeto
|
d25e837a44858e2b6b222c328a5b5bed96a1ad4c
|
ecf6c87b1bf4e62e2db43de11d1bc9be04910b0f
|
refs/heads/master
| 2022-12-03T15:05:35.811973
| 2020-08-24T22:34:33
| 2020-08-24T22:34:33
| 290,054,494
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 539
|
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 claseobjeto;
/**
*
* @author Valmore
*/
public class Persona {
String Name;
int Age;
public void myname (String Name){
System.out.println("Hola: " + Name + " Bienvenido");
}
public void myage (int varAge){
Age = 2020 - varAge;
System.out.println("Naciste en el Año : " + Age);
}
}
|
[
"josval56@gmail.com"
] |
josval56@gmail.com
|
c0eb44c10216fc67f4494b06cc2ef73e550c4ccb
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/19/19_6ab6235b6eea1abcdf9de44d782da4fd2a1ddd29/EcoField/19_6ab6235b6eea1abcdf9de44d782da4fd2a1ddd29_EcoField_s.java
|
b7ceb9cdd4c71e013d29004ee3ced62e59133941
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 2,008
|
java
|
package org.azavea.otm;
import java.text.NumberFormat;
import java.util.Locale;
import org.azavea.otm.data.Model;
import org.azavea.otm.data.Plot;
import org.json.JSONException;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;
public class EcoField extends Field {
private static final String VALUE_KEY = ".value";
private static final String UNIT_KEY = ".unit";
private static final String AMOUNT_KEY = ".dollars";
// Eco fields are calculated, not edited, so they have much less
// information in their definition.
protected EcoField(String key, String label, int minimumToEdit,
String keyboard, String format, String type) {
super(key, label, minimumToEdit, keyboard, format, type, null, null, null);
}
@Override
public View renderForDisplay(LayoutInflater layout, Plot model, Context context)
throws JSONException {
View container = layout.inflate(R.layout.plot_ecofield_row, null);
((TextView)container.findViewById(R.id.field_label)).setText(this.label);
// Extract the value of this type of eco benefit
Object value = getValueForKey(this.key + VALUE_KEY, model.getData());
Object units = getValueForKey(this.key + UNIT_KEY, model.getData());
if (value != null) {
String valueTruncated = String.format("%.1f", value);
((TextView)container.findViewById(R.id.field_value))
.setText(valueTruncated + " " + units);
// The dollar amount of the benefit
NumberFormat currency = NumberFormat.getCurrencyInstance(App.getFieldManager().getLocale());
currency.setMaximumFractionDigits(2);
Double amount = (Double)getValueForKey(this.key + AMOUNT_KEY, model.getData());
((TextView)container.findViewById(R.id.field_money))
.setText(currency.format(amount));
}
return container;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
704dc70491d37df6de9fad8e34b5cbe18fbd9660
|
c3ad1c476e791965d0f6422c7b6eeadcaebda014
|
/ex-poo/src/list_24_04/src/sample/lsp/Veiculoo.java
|
8766f46b9ec86b29e8ccf459418570216a253072
|
[] |
no_license
|
brenomonteiro/exercicios-POO
|
2598c001d534cb81c19476e15d0019566ff226fc
|
4bf231ab1b8413f53e94f029d5051a7aa2e4816a
|
refs/heads/master
| 2021-05-03T10:38:39.652748
| 2018-05-31T02:06:07
| 2018-05-31T02:06:07
| 120,539,634
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 224
|
java
|
package sample.lsp;
public class Veiculoo {
private Marcha marcha;
public Marcha getMarcha() {
return marcha;
}
public void mudaMarcha(final Marcha marcha) {
this.marcha = marcha;
}
}
|
[
"brennoo.mendesmonteiro@gmail.com"
] |
brennoo.mendesmonteiro@gmail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.