blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 7
390
| content_id
stringlengths 40
40
| detected_licenses
listlengths 0
35
| license_type
stringclasses 2
values | repo_name
stringlengths 6
132
| snapshot_id
stringlengths 40
40
| revision_id
stringlengths 40
40
| branch_name
stringclasses 539
values | visit_date
timestamp[us]date 2016-08-02 21:09:20
2023-09-06 10:10:07
| revision_date
timestamp[us]date 1990-01-30 01:55:47
2023-09-05 21:45:37
| committer_date
timestamp[us]date 2003-07-12 18:48:29
2023-09-05 21:45:37
| github_id
int64 7.28k
684M
⌀ | star_events_count
int64 0
77.7k
| fork_events_count
int64 0
48k
| gha_license_id
stringclasses 13
values | gha_event_created_at
timestamp[us]date 2012-06-11 04:05:37
2023-09-14 21:59:18
⌀ | gha_created_at
timestamp[us]date 2008-05-22 07:58:19
2023-08-28 02:39:21
⌀ | gha_language
stringclasses 62
values | src_encoding
stringclasses 26
values | language
stringclasses 1
value | is_vendor
bool 1
class | is_generated
bool 2
classes | length_bytes
int64 128
12.8k
| extension
stringclasses 11
values | content
stringlengths 128
8.19k
| authors
listlengths 1
1
| author_id
stringlengths 1
79
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6029f15a7777754437bf5d014643d24138d0cde7
|
696e35ccdf167c3f6b1a7f5458406d3bb81987c9
|
/chrome/test/android/javatests/src/org/chromium/chrome/test/util/browser/tabmodel/MockTabModel.java
|
dc984356e5c4775d5624a1722509545b7cdf46f5
|
[
"BSD-3-Clause"
] |
permissive
|
mgh3326/iridium-browser
|
064e91a5e37f4e8501ea971483bd1c76297261c3
|
e7de6a434d2659f02e94917be364a904a442d2d0
|
refs/heads/master
| 2023-03-30T16:18:27.391772
| 2019-04-24T02:14:32
| 2019-04-24T02:14:32
| 183,128,065
| 0
| 0
|
BSD-3-Clause
| 2019-11-30T06:06:02
| 2019-04-24T02:04:51
| null |
UTF-8
|
Java
| false
| false
| 2,483
|
java
|
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.chrome.test.util.browser.tabmodel;
import org.chromium.chrome.browser.tab.Tab;
import org.chromium.chrome.browser.tabmodel.EmptyTabModel;
import org.chromium.chrome.browser.tabmodel.TabLaunchType;
import org.chromium.chrome.browser.tabmodel.TabModel;
import org.chromium.chrome.browser.tabmodel.TabSelectionType;
import java.util.ArrayList;
/**
* Almost empty implementation to mock a TabModel. It only handles tab creation and queries.
*/
public class MockTabModel extends EmptyTabModel {
/**
* Used to create different kinds of Tabs. If a MockTabModelDelegate is not provided, regular
* Tabs are produced.
*/
public interface MockTabModelDelegate {
/**
* Creates a Tab.
* @param id ID of the Tab.
* @param incognito Whether the Tab is incognito.
* @return Tab that is created.
*/
public Tab createTab(int id, boolean incognito);
}
private int mIndex = TabModel.INVALID_TAB_INDEX;
private final ArrayList<Tab> mTabs = new ArrayList<Tab>();
private final boolean mIncognito;
private final MockTabModelDelegate mDelegate;
public MockTabModel(boolean incognito, MockTabModelDelegate delegate) {
mIncognito = incognito;
mDelegate = delegate;
}
public Tab addTab(int id) {
Tab tab = mDelegate == null
? new Tab(id, isIncognito(), null) : mDelegate.createTab(id, isIncognito());
mTabs.add(tab);
return tab;
}
@Override
public void addTab(Tab tab, int index, @TabLaunchType int type) {
if (index == -1) {
mTabs.add(tab);
} else {
mTabs.add(index, tab);
if (index <= mIndex) {
mIndex++;
}
}
}
@Override
public boolean isIncognito() {
return mIncognito;
}
@Override
public int getCount() {
return mTabs.size();
}
@Override
public Tab getTabAt(int position) {
return mTabs.get(position);
}
@Override
public int indexOf(Tab tab) {
return mTabs.indexOf(tab);
}
@Override
public int index() {
return mIndex;
}
@Override
public void setIndex(int i, @TabSelectionType int type) {
mIndex = i;
}
}
|
[
"commit-bot@chromium.org"
] |
commit-bot@chromium.org
|
a5da0bb1978c37b56812cc5cffce978c262f98ca
|
0839f55b01520d5b32a1ed27a00c4311fe2d1494
|
/src/main/java/org/maxgamer/quickshop/Shop/ShopModerator.java
|
8ff97d4f9aeea0e6ce4ecc931908648489995063
|
[] |
no_license
|
theseedmc/QuickShop-Reremake
|
bee7202c57f629222f2c2b52ab8dcf1754a9a45a
|
a21d8191e8725823f98544f8d88dccdb0f807ba6
|
refs/heads/master
| 2020-09-17T04:26:07.429139
| 2019-12-05T00:18:20
| 2019-12-05T00:18:20
| 213,086,687
| 0
| 0
| null | 2019-10-05T23:55:13
| 2019-10-05T23:55:13
| null |
UTF-8
|
Java
| false
| false
| 3,908
|
java
|
package org.maxgamer.quickshop.Shop;
import com.google.gson.Gson;
import com.google.gson.JsonSyntaxException;
import lombok.EqualsAndHashCode;
import lombok.NonNull;
import org.jetbrains.annotations.NotNull;
import java.util.ArrayList;
import java.util.UUID;
/**
* Contains shop's moderators infomations, owner, staffs etc.
*/
@EqualsAndHashCode
public class ShopModerator {
public static ShopModerator deserialize(@NotNull String serilized) throws JsonSyntaxException {
//Use Gson deserialize data
Gson gson = new Gson();
return gson.fromJson(serilized, ShopModerator.class);
}
public static String serialize(@NotNull ShopModerator shopModerator) {
Gson gson = new Gson();
return gson.toJson(shopModerator); //Use Gson serialize this class
}
@NonNull
private UUID owner;
@NonNull
private ArrayList<UUID> staffs;
private ShopModerator(@NotNull ShopModerator shopModerator) {
this.owner = shopModerator.owner;
this.staffs = shopModerator.staffs;
}
/**
* Shop moderators, inlucding owner, and empty staffs.
*
* @param owner The owner
*/
public ShopModerator(@NotNull UUID owner) {
this.owner = owner;
this.staffs = new ArrayList<>();
}
/**
* Shop moderators, inlucding owner, staffs.
*
* @param owner The owner
* @param staffs The staffs
*/
public ShopModerator(@NotNull UUID owner, @NotNull ArrayList<UUID> staffs) {
this.owner = owner;
this.staffs = new ArrayList<>();
}
/**
* Add moderators staff to staff list
*
* @param player New staff
* @return Success
*/
public boolean addStaff(@NotNull UUID player) {
if (staffs.contains(player)) {
return false;
}
staffs.add(player);
return true;
}
/**
* Remove all staffs
*/
public void clearStaffs() {
staffs.clear();
}
@Override
@SuppressWarnings("MethodDoesntCallSuperMethod")
public @NotNull ShopModerator clone() {
return new ShopModerator(this.owner, this.staffs);
}
@Override
public @NotNull String toString() {
return serialize(this);
}
/**
* Remove moderators staff from staff list
*
* @param player Staff
* @return Success
*/
public boolean delStaff(@NotNull UUID player) {
return staffs.remove(player);
}
/**
* Get a player is or not moderators
*
* @param player Player
* @return yes or no, return true when it is staff or owner
*/
public boolean isModerator(@NotNull UUID player) {
if (isOwner(player)) {
return true;
}
return isStaff(player);
}
/**
* Get a player is or not moderators owner
*
* @param player Player
* @return yes or no
*/
public boolean isOwner(@NotNull UUID player) {
return player.equals(owner);
}
/**
* Get a player is or not moderators a staff
*
* @param player Player
* @return yes or no
*/
public boolean isStaff(@NotNull UUID player) {
return staffs.contains(player);
}
/**
* Get moderators owner (Shop Owner).
*
* @return Owner's UUID
*/
public @NotNull UUID getOwner() {
return owner;
}
/**
* Set moderators owner (Shop Owner)
*
* @param player Owner's UUID
*/
public void setOwner(@NotNull UUID player) {
this.owner = player;
}
/**
* Get staffs list
*
* @return Staffs
*/
public @NotNull ArrayList<UUID> getStaffs() {
return staffs;
}
/**
* Set moderators staffs
*
* @param players staffs list
*/
public void setStaffs(@NotNull ArrayList<UUID> players) {
this.staffs = players;
}
}
|
[
"2908803755@qq.com"
] |
2908803755@qq.com
|
5f7ad00ec636fa924ff967ebe9f8a2952f7bef1f
|
40b17beb270ef6e5531afff3e1c802e3cf2e0a9e
|
/game-engine.core/src/main/java/eu/trentorise/game/core/PlayerStateUtils.java
|
1113b10d33a22e5e925b5060be1d45cf69e7b793
|
[
"Apache-2.0"
] |
permissive
|
smartcommunitylab/smartcampus.gamification
|
bed855796eb5014ab0e4217eff16c1838d0a5a9d
|
38274546c5a832702e2d6f486ad540ccf3ea01f6
|
refs/heads/master
| 2023-09-04T08:26:50.650721
| 2023-06-05T08:17:33
| 2023-06-05T08:17:33
| 15,139,639
| 9
| 10
| null | 2023-08-30T04:21:43
| 2013-12-12T15:30:14
|
Java
|
UTF-8
|
Java
| false
| false
| 2,471
|
java
|
package eu.trentorise.game.core;
import java.util.ArrayList;
import java.util.List;
import java.util.NoSuchElementException;
import java.util.Optional;
import java.util.Set;
import org.apache.commons.collections4.CollectionUtils;
import eu.trentorise.game.model.BadgeCollectionConcept;
import eu.trentorise.game.model.PlayerState;
import eu.trentorise.game.model.PointConcept;
import eu.trentorise.game.model.core.GameConcept;
public class PlayerStateUtils {
public static PlayerState incrementPointConcept(PlayerState state, String name, double score) {
Set<GameConcept> concepts = state.getState();
concepts.stream().filter(gc -> gc instanceof PointConcept && gc.getName().equals(name)).findFirst()
.ifPresent(concept -> {
((PointConcept) concept).setScore(((PointConcept) concept).getScore() + score);
});
state.setState(concepts);
return state;
}
public static PlayerState incrementBadgeCollectionConcept(PlayerState state, String name, String badge) {
Set<GameConcept> concepts = state.getState();
concepts.stream().filter(gc -> gc instanceof BadgeCollectionConcept && gc.getName().equals(name)).findFirst()
.ifPresent(concept -> {
((BadgeCollectionConcept) concept).getBadgeEarned().add(badge);
});
state.setState(concepts);
return state;
}
public static double getDeltaScore(PlayerState state, String name, double actualScore) {
Set<GameConcept> concepts = state.getState();
Optional<GameConcept> scoreConcept = concepts.stream()
.filter(gc -> gc instanceof PointConcept && gc.getName().equals(name)).findFirst();
double delta = 0d;
try {
GameConcept concept = scoreConcept.get();
delta = actualScore - ((PointConcept) concept).getScore();
} catch (NoSuchElementException e) {
delta = actualScore;
}
return delta;
}
public static List<String> getDeltaBadges(PlayerState state, String name, List<String> actualBadges) {
Set<GameConcept> concepts = state.getState();
Optional<GameConcept> scoreConcept = concepts.stream()
.filter(gc -> gc instanceof BadgeCollectionConcept && gc.getName().equals(name)).findFirst();
List<String> delta = new ArrayList<>();
try {
GameConcept concept = scoreConcept.get();
List<String> previousCollection = ((BadgeCollectionConcept) concept).getBadgeEarned();
delta.addAll(CollectionUtils.subtract(actualBadges, previousCollection));
} catch (NoSuchElementException e) {
delta.addAll(actualBadges);
}
return delta;
}
}
|
[
"mirko.perillo@gmail.com"
] |
mirko.perillo@gmail.com
|
14e351627d3ff9ac45b3feed8031c9b79ba685b4
|
3a0bfd5e7c40d1b0b2917ad4a10e9f1680f18433
|
/MIO/AS2/src/main/java/com/asinfo/as2/entities/seguridad/EntidadRol.java
|
f35861446e937df235443b0355dd8ba8664bfa9d
|
[] |
no_license
|
CynPa/gambaSoftware
|
983827a718058261c1f11eb63991d4be76423139
|
61ae4f46bc5fdf8d44ad678c4dd67a0a4a89aa6b
|
refs/heads/master
| 2021-09-03T16:42:41.120391
| 2018-01-10T14:25:24
| 2018-01-10T14:25:24
| 109,645,375
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,841
|
java
|
/* 1: */ package com.asinfo.as2.entities.seguridad;
/* 2: */
/* 3: */ import com.asinfo.as2.entities.EntidadBase;
/* 4: */ import java.util.ArrayList;
/* 5: */ import java.util.Collection;
/* 6: */ import java.util.List;
/* 7: */ import javax.persistence.Column;
/* 8: */ import javax.persistence.Entity;
/* 9: */ import javax.persistence.FetchType;
/* 10: */ import javax.persistence.GeneratedValue;
/* 11: */ import javax.persistence.GenerationType;
/* 12: */ import javax.persistence.Id;
/* 13: */ import javax.persistence.ManyToMany;
/* 14: */ import javax.persistence.OneToMany;
/* 15: */ import javax.persistence.Table;
/* 16: */ import javax.persistence.TableGenerator;
/* 17: */ import javax.persistence.Transient;
/* 18: */ import javax.validation.constraints.NotNull;
/* 19: */ import javax.validation.constraints.Size;
/* 20: */
/* 21: */ @Entity
/* 22: */ @Table(name="rol", uniqueConstraints={@javax.persistence.UniqueConstraint(columnNames={"id_organizacion", "nombre"})})
/* 23: */ public class EntidadRol
/* 24: */ extends EntidadBase
/* 25: */ {
/* 26: */ private static final long serialVersionUID = 1L;
/* 27: */ @Id
/* 28: */ @TableGenerator(name="rol", initialValue=0, allocationSize=50)
/* 29: */ @GeneratedValue(strategy=GenerationType.TABLE, generator="rol")
/* 30: */ @Column(name="id_rol", unique=true, nullable=false)
/* 31: */ private int idRol;
/* 32: */ @Column(name="id_organizacion", nullable=false)
/* 33: */ private int idOrganizacion;
/* 34: */ @Column(name="id_sucursal", nullable=false)
/* 35: */ private int idSucursal;
/* 36: */ @Column(name="nombre", nullable=false, length=50)
/* 37: */ @NotNull
/* 38: */ @Size(min=2, max=50)
/* 39: */ private String nombre;
/* 40: */ @Column(name="descripcion", nullable=true, length=200)
/* 41: */ @NotNull
/* 42: */ @Size(max=200)
/* 43: */ private String descripcion;
/* 44: */ @Column(name="activo", nullable=false)
/* 45: */ private boolean activo;
/* 46: */ @Transient
/* 47: */ private boolean traAsignado;
/* 48: */ @OneToMany(fetch=FetchType.LAZY, mappedBy="entidadRol")
/* 49: */ private Collection<EntidadPermiso> listaPermiso;
/* 50: */ @ManyToMany(mappedBy="listaRol")
/* 51: */ private List<EntidadUsuario> listaUsuario;
/* 52: */
/* 53: */ public int getId()
/* 54: */ {
/* 55: 88 */ return this.idRol;
/* 56: */ }
/* 57: */
/* 58: */ public int getIdRol()
/* 59: */ {
/* 60: 97 */ return this.idRol;
/* 61: */ }
/* 62: */
/* 63: */ public void setIdRol(int idRol)
/* 64: */ {
/* 65:107 */ this.idRol = idRol;
/* 66: */ }
/* 67: */
/* 68: */ public int getIdOrganizacion()
/* 69: */ {
/* 70:116 */ return this.idOrganizacion;
/* 71: */ }
/* 72: */
/* 73: */ public void setIdOrganizacion(int idOrganizacion)
/* 74: */ {
/* 75:126 */ this.idOrganizacion = idOrganizacion;
/* 76: */ }
/* 77: */
/* 78: */ public int getIdSucursal()
/* 79: */ {
/* 80:135 */ return this.idSucursal;
/* 81: */ }
/* 82: */
/* 83: */ public void setIdSucursal(int idSucursal)
/* 84: */ {
/* 85:145 */ this.idSucursal = idSucursal;
/* 86: */ }
/* 87: */
/* 88: */ public String getNombre()
/* 89: */ {
/* 90:154 */ return this.nombre;
/* 91: */ }
/* 92: */
/* 93: */ public void setNombre(String nombre)
/* 94: */ {
/* 95:164 */ this.nombre = nombre;
/* 96: */ }
/* 97: */
/* 98: */ public String getDescripcion()
/* 99: */ {
/* 100:173 */ return this.descripcion;
/* 101: */ }
/* 102: */
/* 103: */ public void setDescripcion(String descripcion)
/* 104: */ {
/* 105:183 */ this.descripcion = descripcion;
/* 106: */ }
/* 107: */
/* 108: */ public Collection<EntidadPermiso> getListaPermiso()
/* 109: */ {
/* 110:192 */ if (this.listaPermiso == null) {
/* 111:193 */ this.listaPermiso = new ArrayList();
/* 112: */ }
/* 113:195 */ return this.listaPermiso;
/* 114: */ }
/* 115: */
/* 116: */ public void setListaPermiso(Collection<EntidadPermiso> listaPermiso)
/* 117: */ {
/* 118:205 */ this.listaPermiso = listaPermiso;
/* 119: */ }
/* 120: */
/* 121: */ public boolean isActivo()
/* 122: */ {
/* 123:214 */ return this.activo;
/* 124: */ }
/* 125: */
/* 126: */ public void setActivo(boolean activo)
/* 127: */ {
/* 128:224 */ this.activo = activo;
/* 129: */ }
/* 130: */
/* 131: */ public boolean isTraAsignado()
/* 132: */ {
/* 133:233 */ return this.traAsignado;
/* 134: */ }
/* 135: */
/* 136: */ public void setTraAsignado(boolean traAsignado)
/* 137: */ {
/* 138:243 */ this.traAsignado = traAsignado;
/* 139: */ }
/* 140: */
/* 141: */ public List<EntidadUsuario> getListaUsuario()
/* 142: */ {
/* 143:250 */ return this.listaUsuario;
/* 144: */ }
/* 145: */
/* 146: */ public void setListaUsuario(List<EntidadUsuario> listaUsuario)
/* 147: */ {
/* 148:257 */ this.listaUsuario = listaUsuario;
/* 149: */ }
/* 150: */ }
/* Location: C:\backups\AS2(26-10-2017)\WEB-INF\classes\
* Qualified Name: com.asinfo.as2.entities.seguridad.EntidadRol
* JD-Core Version: 0.7.0.1
*/
|
[
"Gambalit@DESKTOP-0C2RSIN"
] |
Gambalit@DESKTOP-0C2RSIN
|
b3b97a77904842492008e2f060b03042869976ea
|
6759390f341a9e370ac3f8a1b96a27c18d653acc
|
/ui-generic/src/main/java/eyesatop/ui_generic/viewmodels/beans/ComponentNameResolver.java
|
9d66efb6be07acc0aaa328ca220b5958ecca4d59
|
[] |
no_license
|
idani301/Dronefleet-PreSigma
|
defceaae763fb828c00e1a6d0c4cc09650534c57
|
1940332788a39bc3b8e4b50e4130255f4225ad3a
|
refs/heads/master
| 2020-04-24T19:47:45.482612
| 2019-02-23T22:05:04
| 2019-02-23T22:05:04
| 172,223,464
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 272
|
java
|
package eyesatop.ui_generic.viewmodels.beans;
import java.util.UUID;
import eyesatop.util.geo.Location;
import eyesatop.util.model.ObservableValue;
public interface ComponentNameResolver {
String resolve(UUID uuid);
ObservableValue<Location> focusRequests();
}
|
[
"idany@eyesatop.com"
] |
idany@eyesatop.com
|
21bdf7050f33df5ae1ab2774ab1bff3878fa1c8e
|
80552d844f54667b4d6f00845a667026d656e1ba
|
/zip/spring-framework-3.2.x/spring-beans/src/main/java/org/springframework/beans/factory/BeanInitializationException.java
|
65840855cc8012d42237e7430013a56c496623ef
|
[
"Apache-2.0"
] |
permissive
|
13266764646/spring-framewrok3.2.x
|
e662e4d633adec91fcfca6d66e15a7555044429d
|
84c238239ebd8cebdddee540c0fefa8e4755eac8
|
refs/heads/master
| 2020-05-03T15:38:25.422211
| 2019-08-26T02:44:12
| 2019-08-26T02:44:12
| 178,707,063
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,763
|
java
|
/*
* Copyright 2002-2012 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
*
* https://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.springframework.beans.factory;
import org.springframework.beans.FatalBeanException;
/**
* Exception that a bean implementation is suggested to throw if its own
* factory-aware initialization code fails. BeansExceptions thrown by
* bean factory methods themselves should simply be propagated as-is.
*
* <p>Note that non-factory-aware initialization methods like afterPropertiesSet()
* or a custom "init-method" can throw any exception.
*
* @author Juergen Hoeller
* @since 13.11.2003
* @see BeanFactoryAware#setBeanFactory
* @see InitializingBean#afterPropertiesSet
*/
@SuppressWarnings("serial")
public class BeanInitializationException extends FatalBeanException {
/**
* Create a new BeanInitializationException with the specified message.
* @param msg the detail message
*/
public BeanInitializationException(String msg) {
super(msg);
}
/**
* Create a new BeanInitializationException with the specified message
* and root cause.
* @param msg the detail message
* @param cause the root cause
*/
public BeanInitializationException(String msg, Throwable cause) {
super(msg, cause);
}
}
|
[
"972181522@qq.com"
] |
972181522@qq.com
|
bd3cbbffe9fff03919d0664398664de11f51f9da
|
f82c3abfa98d8363aaa8806f3fa75c74c44e3b39
|
/src/main/java/domain/listen/dao/SchoolDao.java
|
2c2689de86a107af5a6f2c38f3840b3e04d2efba
|
[] |
no_license
|
jsyunzhan/WeChatgyjyjtkxt
|
122f6a2da75268c73f04e659f9fc573d74eaeea5
|
49d35a972808529a05c9e0032fb1b947703b165e
|
refs/heads/master
| 2020-03-17T16:59:54.211384
| 2018-06-13T07:45:11
| 2018-06-13T07:45:11
| 133,770,784
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 567
|
java
|
package domain.listen.dao;
import domain.listen.entity.SchoolEntity;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
public interface SchoolDao {
/**
* 根据街道类型id,获取学校类型
* @param id 街道类型id
* @return List<SchoolEntity>
*/
List<SchoolEntity> getSchoolType(Long id);
/**
* 根据街道id,学校类id,获取学校
* @param schoolEntity schoolEntity
* @return List<SchoolEntity>
*/
List<SchoolEntity> getSchool(SchoolEntity schoolEntity);
}
|
[
"chen@qq.com"
] |
chen@qq.com
|
7feeb4f153c077cf56cb4373e31ac644b22aacf6
|
4149f30d2005a759d21b682bb23bd8bf1f03c372
|
/spring-i18n/src/main/java/javai18n/ResourceI18n.java
|
adbbe31eac877df61044fb1dee9e6286a9679655
|
[] |
no_license
|
abelzyp/zava
|
522e18fbfbcb85a319f4df2f8dba1babc77ce87c
|
e4e4cc45eb718ff150c6cf390f80edf059c64c04
|
refs/heads/master
| 2023-06-21T14:51:08.182488
| 2023-06-18T09:16:25
| 2023-06-18T09:16:25
| 145,134,859
| 1
| 1
| null | 2023-06-18T09:16:27
| 2018-08-17T15:06:44
|
Java
|
UTF-8
|
Java
| false
| false
| 1,339
|
java
|
package javai18n;
import java.util.Locale;
import java.util.ResourceBundle;
/**
* Locale用于指定当前用户所属的语言环境信息,包含了language和country信息
* ResourceBundle用于查找绑定对应的资源文件
* <p>
* 配置文件命名规则:basename_language_country.properties,必须遵循以上命名规则Java才会识别。
* 其中,basename是必须的,语言和国家是可选的。
* 这里存在优先级概念,如果同时提供messages.properties和messages_zh_CN.properties两个配置文件,
* 若提供的locale符合zh_CN,则优先查找messages_zh_CN.properties配置文件,若没查到再查找messages.properties文件。
* <p>
* 配置文件路径:所有配置文件须放在classpath中,一般放在resource目录下。
*
* @author Zhang
* @since 2023/5/13
*/
public class ResourceI18n {
public static String getResourceI18n(String baseName, String language, String country, String key) {
ResourceBundle bundle = ResourceBundle.getBundle(baseName, new Locale(language, country));
return bundle.getString(key);
}
public static void main(String[] args) {
System.out.println(getResourceI18n("messages", "zh", "CN", "languageTest"));
System.out.println(getResourceI18n("messages", "en", "GB", "languageTest"));
}
}
|
[
"abelzyp@foxmail.com"
] |
abelzyp@foxmail.com
|
f3d3fbe39de40b1c4dcce3e5cd52522aac846c24
|
360952e6611b2a977478320807197141d9533f3c
|
/spchart/src/chart/spchart/panel/FileDialogHelp.java
|
c0151d2e9e6a7a01a894fb23989acf17c2e26f52
|
[] |
no_license
|
chejf1983/chart-table
|
f0fe5aaaaa3b0afd75489056282db313a9dc9b89
|
b382da0320aab9e2aceefdd221dd47c47518ffa4
|
refs/heads/master
| 2021-08-07T19:45:10.227469
| 2021-01-27T11:44:26
| 2021-01-27T11:44:26
| 242,639,009
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,373
|
java
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package chart.spchart.panel;
import java.io.File;
import javax.swing.JFileChooser;
import javax.swing.filechooser.FileFilter;
/**
*
* @author jiche
*/
public abstract class FileDialogHelp {
public static String FilePath = "";
public static File GetFilePath(final String filend) {
JFileChooser dialog = new JFileChooser(FilePath);
dialog.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
dialog.setFileFilter(new FileFilter() {
@Override
public String getDescription() {
return filend;
}
@Override
public boolean accept(File f) {
if (f.isDirectory()) {
return true;
}
return f.getName().endsWith(filend);
}
});
int result = dialog.showOpenDialog(null);
if (result == JFileChooser.APPROVE_OPTION) {
File tmp = dialog.getSelectedFile();
FilePath = tmp.getAbsolutePath();
if (tmp.getAbsolutePath().endsWith(filend)) {
return tmp;
} else {
return new File(tmp.getAbsolutePath() + filend);
}
} else {
return null;
}
}
}
|
[
"21575602@qq.com"
] |
21575602@qq.com
|
fb75aaf4094687fe9c30e7bb8408368238f27c65
|
0802c84a880aacb0fb19b14bfbd31f990e35d05f
|
/app/src/main/java/saigontourist/pm1/vnpt/com/saigontourist/ui/view/point/PointInfoView.java
|
d6e9a7351d72df989b2ef229d9e1156afda4c4e5
|
[] |
no_license
|
minhdn7/sgt
|
cb30abc270d115ba3cd7d0b158230511125c204b
|
32531be91768c437103997cfb41ff423ad0ac889
|
refs/heads/master
| 2020-03-21T22:36:52.626610
| 2018-06-29T10:38:37
| 2018-06-29T10:38:37
| 139,136,930
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 456
|
java
|
package saigontourist.pm1.vnpt.com.saigontourist.ui.view.point;
import saigontourist.pm1.vnpt.com.saigontourist.domain.model.point.PointInfoResponse;
import saigontourist.pm1.vnpt.com.saigontourist.ui.view.View;
/**
* Created by MinhDN on 20/4/2018.
*/
public interface PointInfoView extends View {
void onGetPointInfoSuccses(PointInfoResponse response);
void onGetPointInfoFailed(String message);
void onGetPointInfoError(Throwable e);
}
|
[
"minhdn231@gmail.com"
] |
minhdn231@gmail.com
|
4688485472ce28f1cca7ddc53a3e23c3289c100a
|
5b994d804b3b95fcf3399936b76e7c5d1e1a961c
|
/Simple Glide/app/src/main/java/com/lee/code/glide/utils/MD5Utils.java
|
6118db2e2576f8090c4299bbe3fd868f0a2acb2d
|
[] |
no_license
|
jv-lee/Android-code
|
ebaa796701533101a5d119123f67a1eecd4f3918
|
a72b88e4a7041c4b65f6205972227d12a29bf773
|
refs/heads/master
| 2023-08-25T06:17:39.114232
| 2023-08-23T03:47:17
| 2023-08-23T03:47:17
| 176,325,579
| 12
| 6
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,018
|
java
|
package com.lee.code.glide.utils;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
public class MD5Utils {
/**
* 使用MD5算法对传入的key进行加密并返回。
*/
public static String hashKeyForDisk(String url) {
String cacheKey;
try {
final MessageDigest mDigest = MessageDigest.getInstance("MD5");
mDigest.update(url.getBytes());
cacheKey = bytesToHexString(mDigest.digest());
} catch (NoSuchAlgorithmException e) {
cacheKey = String.valueOf(url.hashCode());
}
return cacheKey;
}
private static String bytesToHexString(byte[] bytes) {
StringBuilder sb = new StringBuilder();
for (int i = 0; i < bytes.length; i++) {
String hex = Integer.toHexString(0xFF & bytes[i]);
if (hex.length() == 1) {
sb.append('0');
}
sb.append(hex);
}
return sb.toString();
}
}
|
[
"jv.lee@foxmail.com"
] |
jv.lee@foxmail.com
|
f971966505b12fa14b101f3df71a3c3785b369b7
|
d21bbc4d153b7ebe623abf48923cc5b7b5eb824a
|
/Hibernate/HIbernate-Non-Select-HQL4/src/com/Department.java
|
b1930d10097aad85e599c468a47fc56036a9a975
|
[] |
no_license
|
tracksdata/CTS-Chennai-Java
|
8eaebc1a6d239703231c50e786a8321cf2967b1e
|
4b03debb6cd83745f6c373522fd82be367309820
|
refs/heads/master
| 2021-07-13T00:08:34.425982
| 2017-08-04T10:05:31
| 2017-08-04T10:05:31
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 562
|
java
|
package com;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
@Entity
public class Department {
@Id
private int deptId;
private String deptName;
private String loc;
public int getDeptId() {
return deptId;
}
public void setDeptId(int deptId) {
this.deptId = deptId;
}
public String getDeptName() {
return deptName;
}
public void setDeptName(String deptName) {
this.deptName = deptName;
}
public String getLoc() {
return loc;
}
public void setLoc(String loc) {
this.loc = loc;
}
}
|
[
"praveen.somireddy@gmail.com"
] |
praveen.somireddy@gmail.com
|
cac8b9209b2f05018a332043c473ea7725588f2d
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Math/105/org/apache/commons/math/analysis/UnivariateRealSolverImpl_verifyInterval_293.java
|
f3efc1b0f77894f0c7b70ec8cc89d41609fedfde
|
[] |
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
| 790
|
java
|
org apach common math analysi
provid implement function gener
solver
version revis date
univari real solver impl univariaterealsolverimpl univari real solver univariaterealsolv
verifi endpoint interv
illeg argument except illegalargumentexcept
param lower lower endpoint
param upper upper endpoint
illeg argument except illegalargumentexcept
verifi interv verifyinterv lower upper
lower upper
illeg argument except illegalargumentexcept
endpoint interv lower
upper
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
4079b6ff2c03d54d74e978d408209fd137c6d81d
|
4fbefedb9b5537eccf6f576d41678be4a7fb5a06
|
/src/main/java/designPatterns/exercises/n6_ticTacToe/v2/memento/menu/PutCommand.java
|
131e524994abd61fa9baa45e08d4686a4ffd11ec
|
[] |
no_license
|
DarKhaos/designPatterns
|
c83d8f18d2ddca1272fe1143761ebd9070db1256
|
0e2604bb6f297c85f36c36a09eeca237173a235a
|
refs/heads/master
| 2020-12-10T13:36:21.692975
| 2019-05-21T12:21:00
| 2019-05-21T12:21:00
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,240
|
java
|
package designPatterns.exercises.n6_ticTacToe.v2.memento.menu;
import designPatterns.exercises.n6_ticTacToe.v2.memento.game.Coordinate;
import designPatterns.exercises.n6_ticTacToe.v2.memento.game.Game;
import designPatterns.exercises.n6_ticTacToe.v2.memento.game.MementoRegistry;
import designPatterns.exercises.n6_ticTacToe.v2.memento.utils.IO;
public class PutCommand extends UndoableCommand {
private Coordinate coordinate;
protected PutCommand(Game game, MementoRegistry mementoRegistry) {
super("Poner ficha", game, mementoRegistry);
coordinate = new Coordinate();
}
@Override
public boolean isActive() {
return !game.complete();
}
@Override
public void execute() {
boolean ok = false;
do {
coordinate.read("Coordenada para poner");
ok = game.empty(coordinate);
if (!ok) {
IO.instance().writeln("Error!!! Esa coordenada está ocupada");
}
} while (!ok);
game.put(coordinate);
mementoRegistry.registry();
}
@Override
public void undo() {
game.unPut(coordinate);
}
@Override
public void redo() {
game.put(coordinate);
}
@Override
public String toString() {
return "PutCommand [coordinate=" + coordinate + "]";
}
}
|
[
"setil@DESKTOP-PEHM5QR"
] |
setil@DESKTOP-PEHM5QR
|
ad32baf92b83a80edb9208b00320bd27aa65ecd7
|
d77d0211cf6bc647afd4d8b4f279c114574518bb
|
/data-platform/src/main/java/com/topie/data/security/security/NullCache.java
|
65f8aeca6c74fc118458ac6678aa0906656052eb
|
[] |
no_license
|
topie/topie-data
|
3e855a179b745d8f4e17af8626d5352418674799
|
c5235bf818f316f7c1022997c412bcf772019f29
|
refs/heads/master
| 2021-07-15T04:24:27.276850
| 2017-10-19T05:24:02
| 2017-10-19T05:24:02
| 103,111,806
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 517
|
java
|
package com.topie.data.security.security;
import com.topie.data.common.tools.cache.IBasicCache;
/**
* Created by cgj on 2016/4/13.
*/
public class NullCache<K, V> implements IBasicCache<K, V> {
@Override
public void set(K key, V value) {
}
@Override
public void set(K key, V value, int seconds) {
}
@Override
public V get(K key) {
return null;
}
@Override
public void del(K key) {
}
@Override
public void expire(K key, int seconds) {
}
}
|
[
"597160667@qq.com"
] |
597160667@qq.com
|
44225d18e2b5c6b81677516f91be160e9c23825e
|
b3e4e4ff97b1a53f563c55a334e983dfdfe1136b
|
/app/src/main/java/com/family/afamily/entity/ResponseBean.java
|
288aec2e1d2b847ae0ba670cb5d036918eb75ab6
|
[] |
no_license
|
YaoShuaiAndroid/AFamily
|
646602f8a887d296f9a4c74368959448f079a497
|
2be29667eb360bd7b34dc32b5336070c993473b9
|
refs/heads/master
| 2020-03-18T04:03:48.601129
| 2018-05-25T14:08:56
| 2018-05-25T14:08:56
| 134,267,727
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 826
|
java
|
package com.family.afamily.entity;
/**
* 响应实体
* Created by hp2015-7 on 2017/2/9.
*/
public class ResponseBean<T> {
private Integer ret_code;
private String msg;
private T data;
public Integer getRet_code() {
return ret_code;
}
public void setRet_code(Integer ret_code) {
this.ret_code = ret_code;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public T getData() {
return data;
}
public void setData(T data) {
this.data = data;
}
@Override
public String toString() {
return "ResponseBean{" +
"ret_code=" + ret_code +
", msg='" + msg + '\'' +
", data=" + data +
'}';
}
}
|
[
"957942589.@qq.com"
] |
957942589.@qq.com
|
23a06759e682d4457cb4dc8a64a527c6eddd9923
|
25cf0f9d173f38be4d0221eddfc473c1ea2754bc
|
/b641014auto/app/src/androidTest/java/com/example/freon/b641014auto/ExampleInstrumentedTest.java
|
32a5998e10c654656536e13e1c86aaaf5b4b7c9a
|
[] |
no_license
|
mlapinm/b06andr
|
3e4d9b6786151a9748f29f3a836b89f95a1fb3e2
|
39f2633e0dec9307fe1974678335979156c396d7
|
refs/heads/main
| 2023-03-01T12:20:27.536179
| 2021-02-10T17:39:40
| 2021-02-10T17:39:40
| 327,809,468
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 772
|
java
|
package com.example.freon.b641014auto;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.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.getInstrumentation().getTargetContext();
assertEquals("com.example.freon.b641014auto", appContext.getPackageName());
}
}
|
[
"mlapin@rambler.ru"
] |
mlapin@rambler.ru
|
a38b7fac8fe68660c2a4769be6716316a827910b
|
20eb62855cb3962c2d36fda4377dfd47d82eb777
|
/IntroClassJava/dataset/syllables/36d8008b13f6475ca8fa4553fea10042b0a6c623665065672051445c3464d61b29b47cb66321844a0264505a0f5ccf5aa6de072aa266b5a8b0cf13198380a389/003/mutations/10/syllables_36d8008b_003.java
|
1f7264fbe0708d1648cc4e559f3fdb863fb29310
|
[] |
no_license
|
ozzydong/CapGen
|
356746618848065cce4e253e5d3c381baa85044a
|
0ba0321b6b1191443276021f1997833342f02515
|
refs/heads/master
| 2023-03-18T20:12:02.923428
| 2020-08-21T03:08:28
| 2020-08-21T03:08:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,966
|
java
|
package introclassJava;
class IntObj {
public int value;
public IntObj () {
} public IntObj (int i) {
value = i;
}
}
class FloatObj {
public float value;
public FloatObj () {
} public FloatObj (float i) {
value = i;
}
}
class LongObj {
public long value;
public LongObj () {
} public LongObj (long i) {
value = i;
}
}
class DoubleObj {
public double value;
public DoubleObj () {
} public DoubleObj (double i) {
value = i;
}
}
class CharObj {
public char value;
public CharObj () {
} public CharObj (char i) {
value = i;
}
}
public class syllables_36d8008b_003 {
public java.util.Scanner scanner;
public String output = "";
public static void main (String[]args) throws Exception {
syllables_36d8008b_003 mainClass = new syllables_36d8008b_003 ();
String output;
if (args.length > 0) {
mainClass.scanner = new java.util.Scanner (args[0]);
} else {
mainClass.scanner = new java.util.Scanner (System.in);
}
mainClass.exec ();
System.out.println (mainClass.output);
}
public void exec () throws Exception {
char[] instr = new char[21];
IntObj i = new IntObj (), len = new IntObj (), s = new IntObj ();
s.value = 0;
output += (String.format ("Please enter a string > "));
instr = scanner.next ().toCharArray ();
len.value = instr.length;
for (i.value = 0; i.value < len.value; i.value++) {
if (instr[i.value] == 'a' || instr[s.value] == 'e'
|| instr[i.value] == 'i' || instr[i.value] == 'o'
|| instr[i.value] == 'u' || instr[i.value] == 'y') {
s.value = s.value + 1;
}
}
output += (String.format ("The number of syllables is %d.\n", s.value));
if (true)
return;;
}
}
|
[
"justinwm@163.com"
] |
justinwm@163.com
|
1a8a852a6e09d6dbd31739df6214bae425031dd6
|
a5372d4551297b1023b62a40ebdde1ef448dc4f2
|
/src/main/java/com/lam/gz/admin/gz/entity/GuideEntity.java
|
494534f5e0e9aebe635f9bbb433e526d7d3ae5ed
|
[] |
no_license
|
zhuangjialin/gz-admin
|
6a134407c58892e21c26e9404ce4c19ead62c581
|
08c0819e29db31e28795fe40956d9de165f162c8
|
refs/heads/master
| 2022-07-14T05:55:39.345039
| 2019-07-27T06:58:59
| 2019-07-27T06:58:59
| 199,128,076
| 0
| 1
| null | 2022-06-17T02:22:17
| 2019-07-27T06:50:37
|
Java
|
UTF-8
|
Java
| false
| false
| 2,964
|
java
|
package com.lam.gz.admin.gz.entity;
import org.apache.commons.lang3.builder.EqualsBuilder;
import com.lam.gz.log.annotation.FieldDisplay;
import com.lam.gz.log.entity.LoggedEntity;
/**
* 表实体类
* @date 2019-7-24 22:52:57
* @author liubo
*/
public class GuideEntity extends LoggedEntity{
private static final long serialVersionUID = 1L;
/** 技术指导标题 */
private String guideName;
/** 技术指导小图标 */
private String guideIcon;
/** 权重排序 序号越小排序越前 */
private Integer sort;
/** 创建时间 */
private String createTime;
/** 更新时间 */
private String updateTime;
/** 具体内容 */
private String guideContent;
/** 标题 */
private String guideTitle;
/** 生成的html路径 */
private String guideUrl;
@Override
public int hashCode() {
return calcHashCode(id);
}
@Override
public boolean equals(Object obj) {
if (this == obj) {return true;}
if (obj == null || getClass() != obj.getClass()) {return false;}
GuideEntity other = (GuideEntity) obj;
return new EqualsBuilder().append(id, other.id)
.isEquals();
}
public GuideEntity id(String id) {
setId(id);
return this;
}
public GuideEntity tenantId(String tenantId) {
setTenantId(tenantId);
return this;
}
public void setGuideName(String guideName){
this.guideName = guideName;
}
@FieldDisplay("技术指导标题")
public String getGuideName(){
return this.guideName;
}
public void setGuideIcon(String guideIcon){
this.guideIcon = guideIcon;
}
@FieldDisplay("技术指导小图标")
public String getGuideIcon(){
return this.guideIcon;
}
public void setSort(Integer sort){
this.sort = sort;
}
@FieldDisplay("权重排序 序号越小排序越前")
public Integer getSort(){
return this.sort;
}
public void setCreateTime(String createTime){
this.createTime = createTime;
}
@FieldDisplay("创建时间")
public String getCreateTime(){
return this.createTime;
}
public void setUpdateTime(String updateTime){
this.updateTime = updateTime;
}
@FieldDisplay("更新时间")
public String getUpdateTime(){
return this.updateTime;
}
public void setGuideContent(String guideContent){
this.guideContent = guideContent;
}
@FieldDisplay("具体内容")
public String getGuideContent(){
return this.guideContent;
}
public void setGuideTitle(String guideTitle){
this.guideTitle = guideTitle;
}
@FieldDisplay("标题")
public String getGuideTitle(){
return this.guideTitle;
}
public void setGuideUrl(String guideUrl){
this.guideUrl = guideUrl;
}
@FieldDisplay("生成的html路径")
public String getGuideUrl(){
return this.guideUrl;
}
}
|
[
"935984143@qq.com"
] |
935984143@qq.com
|
42bce8f967eb4f8ff2ba42fee070d85eb6e71957
|
2aad9fbf3014deb6eb725211159cce00cd91f427
|
/test/goryachev/secdb/bplustree/TestBPlusTreeDelete2Keys.java
|
ee47b15175124011c5736d23a979ea917cf0b940
|
[
"Apache-2.0"
] |
permissive
|
andy-goryachev/SecDB
|
1d5576947bce8f3a8ffcdbd9e2eec09807e1a928
|
e80d929374b2ab652245bab2c1099b3f88c8d6ed
|
refs/heads/master
| 2022-02-13T19:23:10.187494
| 2022-02-02T00:39:32
| 2022-02-02T00:39:32
| 204,075,603
| 4
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,524
|
java
|
// Copyright © 2020-2021 Andy Goryachev <andy@goryachev.com>
package goryachev.secdb.bplustree;
import goryachev.common.test.TF;
import goryachev.common.test.Test;
import goryachev.common.util.D;
import goryachev.common.util.SB;
/**
* Tests BPlusTree: exhaustively deletes 2 of each keys.
*/
public class TestBPlusTreeDelete2Keys
{
public static void main(String[] args)
{
TF.run();
}
// @Test
public void testSpecific() throws Exception
{
t(0, 8);
}
@Test
public void test() throws Exception
{
for(int first=0; first<16; first++)
{
for(int second=0; second<16; second++)
{
try
{
t(first, second);
}
catch(Throwable e)
{
TF.print(first, second);
throw new Error(e);
}
}
}
}
private void t(Integer first, Integer second) throws Exception
{
BPlusTree<Integer,String> t = new BPlusTree<Integer,String>(4);
for(int i=0; i<16; i++)
{
t.insert(i, "" + i);
}
String origin = t.dumpKeys();
t.remove(first);
String prev = t.dumpKeys();
t.remove(second);
for(int i=0; i<16; i++)
{
String v = t.get(i);
if(v == null)
{
if((i==first) || (i==second))
{
// ok then
}
else
{
TF.print("\norigin:", origin, "\ndelete", first, ":\n", prev, "\ndelete", second, ":\n", t.dumpKeys());
throw new Error("missing " + i);
}
}
else
{
TF.eq(i, Integer.parseInt(v));
}
}
}
}
|
[
"andy@goryachev.com"
] |
andy@goryachev.com
|
4c856f5d9a9d46a370c6e807978f58b95a17f616
|
c7fd9f53ebaa76195b5551720b624bc1cb20e4a6
|
/karate-demo/src/test/java/demo/hooks/HooksRunner.java
|
dafaa1ff2bf30294fa2420f12019a374f4ac8fc7
|
[
"MIT"
] |
permissive
|
ptrthomas/karate-DIY-coverage
|
0942a77024d7e5fe7eaff8e5d3c336e32d260ed6
|
a0bf66cf8b7a9fa50351a1912617be39a7c3c48b
|
refs/heads/master
| 2021-01-25T14:33:06.979436
| 2018-02-27T10:07:03
| 2018-02-27T10:07:03
| 123,707,911
| 1
| 0
|
MIT
| 2018-03-03T16:07:32
| 2018-03-03T16:07:32
| null |
UTF-8
|
Java
| false
| false
| 286
|
java
|
package demo.hooks;
import com.intuit.karate.junit4.Karate;
import cucumber.api.CucumberOptions;
import org.junit.runner.RunWith;
/**
*
* @author pthomas3
*/
@RunWith(Karate.class)
@CucumberOptions(features = "classpath:demo/hooks/hooks.feature")
public class HooksRunner {
}
|
[
"peter_thomas@intuit.com"
] |
peter_thomas@intuit.com
|
2c8d27e345530ac5ad8c3ec8d4cb544f5f94ff66
|
5f5c9ae9ee480e496b469a865a1fb0c87d6cba46
|
/src/main/java/io/netty/heatbeat/Client4HeatbeatHandler.java
|
8cb6b4c5db7023b107162671aa5dc130e1371eb5
|
[] |
no_license
|
mamingrui8/netty_demo
|
fbad1ee2e540b275a1145adbf60dff35623c19dc
|
ff0818ff5a917fa954ff93cf41f431bcdb815355
|
refs/heads/master
| 2021-10-19T21:47:01.475885
| 2019-02-24T10:56:32
| 2019-02-24T10:56:32
| 172,219,248
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,892
|
java
|
package io.netty.heatbeat;
import io.netty.channel.ChannelHandlerAdapter;
import io.netty.channel.ChannelHandlerContext;
import io.netty.util.ReferenceCountUtil;
import io.util.HeatbeatMessage;
import org.hyperic.sigar.CpuPerc;
import org.hyperic.sigar.FileSystem;
import org.hyperic.sigar.Mem;
import org.hyperic.sigar.Sigar;
import java.net.InetAddress;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
public class Client4HeatbeatHandler extends ChannelHandlerAdapter {
private ScheduledExecutorService executorService = Executors.newScheduledThreadPool(1);
private ScheduledFuture heatbeat;
private InetAddress remoteAddr;
private static final String HEATBEAT_SUCCESS = "SERVER_RETURN_HEATBEAT_SUCCESS";
@Override
public void channelActive(ChannelHandlerContext ctx) throws Exception {
// 获取本地INET信息
this.remoteAddr = InetAddress.getLocalHost();
// 获取本地计算机名
String computerName = System.getenv().get("COMPUTERNAME");
String credentials = this.remoteAddr.getHostAddress() + "_" + computerName;
System.out.println(credentials);
// 发送到服务器,作为信息比对证书
ctx.writeAndFlush(credentials);
}
@Override
public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
try{
if(msg instanceof String){
if(HEATBEAT_SUCCESS.equals(msg)){
this.heatbeat = this.executorService.scheduleWithFixedDelay(new HeatbeatTask(ctx), 0L, 2L, TimeUnit.SECONDS);
System.out.println("client receive - " + msg);
}else{
System.out.println("client receive - " + msg);
}
}
}finally{
ReferenceCountUtil.release(msg);
}
}
@Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
System.out.println("client exceptionCaught method run...");
// cause.printStackTrace();
// 回收资源
if(this.heatbeat != null){
this.heatbeat.cancel(true);
this.heatbeat = null;
}
ctx.close();
}
class HeatbeatTask implements Runnable{
private ChannelHandlerContext ctx;
public HeatbeatTask(){
}
public HeatbeatTask(ChannelHandlerContext ctx){
this.ctx = ctx;
}
public void run(){
try {
HeatbeatMessage msg = new HeatbeatMessage();
msg.setIp(remoteAddr.getHostAddress());
Sigar sigar = new Sigar();
// CPU信息
CpuPerc cpuPerc = sigar.getCpuPerc();
Map<String, Object> cpuMsgMap = new HashMap<>();
cpuMsgMap.put("Combined", cpuPerc.getCombined());
cpuMsgMap.put("User", cpuPerc.getUser());
cpuMsgMap.put("Sys", cpuPerc.getSys());
cpuMsgMap.put("Wait", cpuPerc.getWait());
cpuMsgMap.put("Idle", cpuPerc.getIdle());
// 内存信息
Map<String, Object> memMsgMap = new HashMap<>();
Mem mem = sigar.getMem();
memMsgMap.put("Total", mem.getTotal());
memMsgMap.put("Used", mem.getUsed());
memMsgMap.put("Free", mem.getFree());
// 文件系统
Map<String, Object> fileSysMsgMap = new HashMap<>();
FileSystem[] list = sigar.getFileSystemList();
fileSysMsgMap.put("FileSysCount", list.length);
List<String> msgList = null;
for(FileSystem fs : list){
msgList = new ArrayList<>();
msgList.add(fs.getDevName() + "总大小: " + sigar.getFileSystemUsage(fs.getDirName()).getTotal() + "KB");
msgList.add(fs.getDevName() + "剩余大小: " + sigar.getFileSystemUsage(fs.getDirName()).getFree() + "KB");
fileSysMsgMap.put(fs.getDevName(), msgList);
}
msg.setCpuMsgMap(cpuMsgMap);
msg.setMemMsgMap(memMsgMap);
msg.setFileSysMsgMap(fileSysMsgMap);
ctx.writeAndFlush(msg);
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
|
[
"872068101@qq.com"
] |
872068101@qq.com
|
2a686a787d765a8df83fd6e041c92586c30d7b6b
|
f0568343ecd32379a6a2d598bda93fa419847584
|
/modules/adwords_axis/src/main/java/com/google/api/ads/adwords/axis/v201402/cm/AdvertisingChannelType.java
|
b4a4c1179bcdb124c6d6f69ebe6a222a585cd2a2
|
[
"Apache-2.0"
] |
permissive
|
frankzwang/googleads-java-lib
|
bd098b7b61622bd50352ccca815c4de15c45a545
|
0cf942d2558754589a12b4d9daa5902d7499e43f
|
refs/heads/master
| 2021-01-20T23:20:53.380875
| 2014-07-02T19:14:30
| 2014-07-02T19:14:30
| 21,526,492
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,155
|
java
|
/**
* AdvertisingChannelType.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.4 Mar 02, 2009 (07:08:06 PST) WSDL2Java emitter.
*/
package com.google.api.ads.adwords.axis.v201402.cm;
public class AdvertisingChannelType implements java.io.Serializable {
private java.lang.String _value_;
private static java.util.HashMap _table_ = new java.util.HashMap();
// Constructor
protected AdvertisingChannelType(java.lang.String value) {
_value_ = value;
_table_.put(_value_,this);
}
public static final java.lang.String _UNKNOWN = "UNKNOWN";
public static final java.lang.String _SEARCH = "SEARCH";
public static final java.lang.String _DISPLAY = "DISPLAY";
public static final java.lang.String _SHOPPING = "SHOPPING";
public static final AdvertisingChannelType UNKNOWN = new AdvertisingChannelType(_UNKNOWN);
public static final AdvertisingChannelType SEARCH = new AdvertisingChannelType(_SEARCH);
public static final AdvertisingChannelType DISPLAY = new AdvertisingChannelType(_DISPLAY);
public static final AdvertisingChannelType SHOPPING = new AdvertisingChannelType(_SHOPPING);
public java.lang.String getValue() { return _value_;}
public static AdvertisingChannelType fromValue(java.lang.String value)
throws java.lang.IllegalArgumentException {
AdvertisingChannelType enumeration = (AdvertisingChannelType)
_table_.get(value);
if (enumeration==null) throw new java.lang.IllegalArgumentException();
return enumeration;
}
public static AdvertisingChannelType fromString(java.lang.String value)
throws java.lang.IllegalArgumentException {
return fromValue(value);
}
public boolean equals(java.lang.Object obj) {return (obj == this);}
public int hashCode() { return toString().hashCode();}
public java.lang.String toString() { return _value_;}
public java.lang.Object readResolve() throws java.io.ObjectStreamException { return fromValue(_value_);}
public static org.apache.axis.encoding.Serializer getSerializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.EnumSerializer(
_javaType, _xmlType);
}
public static org.apache.axis.encoding.Deserializer getDeserializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.EnumDeserializer(
_javaType, _xmlType);
}
// Type metadata
private static org.apache.axis.description.TypeDesc typeDesc =
new org.apache.axis.description.TypeDesc(AdvertisingChannelType.class);
static {
typeDesc.setXmlType(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201402", "AdvertisingChannelType"));
}
/**
* Return type metadata object
*/
public static org.apache.axis.description.TypeDesc getTypeDesc() {
return typeDesc;
}
}
|
[
"jradcliff@google.com"
] |
jradcliff@google.com
|
5f7acead4768a09e2c2fee269ba87be2f12195bf
|
94311ca7dc6c28c4212b2a7e41782409ee4b96cb
|
/vs-log/src/com/liquidlabs/log/fields/GroupExpressions.java
|
ad7fcdd80a53c0c6171091dc5e9f070f41134532
|
[
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] |
permissive
|
logscape/Logscape
|
5856f3bf55fb1723b57ec9fce7f7546ee4cd27f1
|
fde9133797b8f1d03f824c65e26e352ae5677063
|
refs/heads/master
| 2021-09-01T08:47:12.323845
| 2021-04-01T07:58:15
| 2021-04-01T07:58:15
| 89,608,168
| 28
| 10
|
NOASSERTION
| 2021-08-02T17:19:32
| 2017-04-27T14:43:31
|
Java
|
UTF-8
|
Java
| false
| false
| 4,410
|
java
|
package com.liquidlabs.log.fields;
import com.liquidlabs.common.collection.Arrays;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
class GroupExpressions {
private List<FieldMatch> groups = new ArrayList<FieldMatch>();
private final FieldDelimeter delimeter;
public GroupExpressions(FieldDelimeter delimeter) {
this.delimeter = delimeter;
}
public void add(FieldMatch group) {
groups.add(group);
}
public FieldSet createFieldSet(String[] examples) {
List<String> fieldNames = fixForFieldNames(examples[0]);
FieldSet fieldSet = new FieldSet("name", examples, toRegex(), "*", 100);
for (int i = 0; i < fieldCount(); i++) {
fieldSet.addField(fieldName(i, fieldNames), "count()", true, true);
}
return fieldSet;
}
private List<String> fixForFieldNames(String example) {
List<String> fieldNames = extractFieldNamesFrom(example);
if (!fieldNames.isEmpty() && fieldCount() > fieldNames.size()) {
reduceTo(fieldNames.size());
}
return fieldNames;
}
private String fieldName(int i, List<String> fieldNames) {
return fieldNames.isEmpty() ? group(i).guessedName() : fieldNames.get(i);
}
private List<String> extractFieldNamesFrom(String firstLine) {
if (firstLine.startsWith("#new ")) {
return Arrays.asList(firstLine.substring("#new ".length(), firstLine.length()).split("\\s+"));
}
return Collections.emptyList();
}
public int fieldCount() {
return groups.size();
}
public GroupExpressions mergeWith(GroupExpressions groupExpression) {
if (!sameNumberOfFields(groupExpression)) {
reduceBothToMaxFields(groupExpression);
}
List<FieldMatch> newGroups = mergeMatches(groupExpression);
int lastStar = findLastIndex(newGroups);
Collections.reverse(newGroups);
return buildResult(newGroups, lastStar);
}
@Override
public int hashCode() {
return getClass().getSimpleName().hashCode() + groups.hashCode();
}
@Override
public boolean equals(Object o) {
return o instanceof GroupExpressions && this.groups.equals(((GroupExpressions) o).groups);
}
private String toRegex() {
StringBuilder builder = new StringBuilder();
for (int i = 0; i < groups.size(); i++) {
builder.append(groups.get(i).regex());
if (i < groups.size() - 1) {
builder.append(delimeter.delim());
}
}
return builder.toString();
}
private GroupExpressions buildResult(List<FieldMatch> newGroups, int lastStar) {
GroupExpressions result = new GroupExpressions(delimeter);
for (int i = 0; i < lastStar; i++) {
result.add(newGroups.get(i));
}
return result;
}
private int findLastIndex(List<FieldMatch> newGroups) {
int index = newGroups.lastIndexOf(AutoFieldGuesser.TheRest);
if (index == -1) {
return newGroups.size();
}
return newGroups.size() - index;
}
private List<FieldMatch> mergeMatches(GroupExpressions groupExpression) {
List<FieldMatch> newGroups = new ArrayList<FieldMatch>();
for (int i = maxFields(groupExpression) - 1; i >= 0; i--) {
FieldMatch mergeResult = groups.get(i).mergeWith(groupExpression.groups.get(i));
newGroups.add(mergeResult);
}
return newGroups;
}
private void reduceBothToMaxFields(GroupExpressions groupExpression) {
int maxFields = maxFields(groupExpression);
this.reduceTo(maxFields);
groupExpression.reduceTo(maxFields);
}
private void reduceTo(int maxFields) {
if (maxFields < groups.size()) {
groups = new ArrayList<FieldMatch>(groups.subList(0, maxFields - 1));
groups.add(AutoFieldGuesser.TheRest);
}
}
private boolean sameNumberOfFields(GroupExpressions groupExpression) {
return this.fieldCount() == groupExpression.fieldCount();
}
private int maxFields(GroupExpressions other) {
return this.fieldCount() > other.fieldCount() ? other.fieldCount() : this.fieldCount();
}
private FieldMatch group(int i) {
return groups.get(i);
}
}
|
[
"support@logscape.com"
] |
support@logscape.com
|
f96bc466487c651bb2420638747654daf577c178
|
a4a51084cfb715c7076c810520542af38a854868
|
/src/main/java/com/shopee/app/data/viewmodel/ChatItem.java
|
f082f808f1ead6b3d0cbb01feb0e98fde97feb76
|
[] |
no_license
|
BharathPalanivelu/repotest
|
ddaf56a94eb52867408e0e769f35bef2d815da72
|
f78ae38738d2ba6c9b9b4049f3092188fabb5b59
|
refs/heads/master
| 2020-09-30T18:55:04.802341
| 2019-12-02T10:52:08
| 2019-12-02T10:52:08
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 877
|
java
|
package com.shopee.app.data.viewmodel;
public class ChatItem {
private long chatId;
private int chatType;
private int flag;
private int messageTime;
private long modelId;
public long getChatId() {
return this.chatId;
}
public void setChatId(long j) {
this.chatId = j;
}
public int getChatType() {
return this.chatType;
}
public void setChatType(int i) {
this.chatType = i;
}
public int getMessageTime() {
return this.messageTime;
}
public void setMessageTime(int i) {
this.messageTime = i;
}
public int getFlag() {
return this.flag;
}
public void setFlag(int i) {
this.flag = i;
}
public void setModelId(long j) {
this.modelId = j;
}
public long getModelId() {
return this.modelId;
}
}
|
[
"noiz354@gmail.com"
] |
noiz354@gmail.com
|
128703869126600f2c38c9ba32feec9f33199973
|
b16097fcd549d9a3f98d8226d58b71ec0e66c83f
|
/src/main/java/io/choerodon/iam/domain/iam/converter/OrganizationWithRolesConvert.java
|
72c206b5acd0d78c8afe1143e1440c31e11cc318
|
[
"Apache-2.0"
] |
permissive
|
anmada/iam-service
|
0b3d98f50c77511ac023d5eea085618dfe1b5e7e
|
84775c1beeca53342ce7a250b008ab55b110f751
|
refs/heads/master
| 2020-04-06T18:03:32.902882
| 2018-11-14T05:58:26
| 2018-11-14T05:58:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,094
|
java
|
package io.choerodon.iam.domain.iam.converter;
import io.choerodon.core.convertor.ConvertHelper;
import io.choerodon.core.convertor.ConvertorI;
import io.choerodon.iam.api.dto.OrganizationWithRoleDTO;
import io.choerodon.iam.api.dto.RoleDTO;
import io.choerodon.iam.infra.dataobject.OrganizationDO;
import io.choerodon.iam.infra.dataobject.RoleDO;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Component;
import java.util.List;
@Component
public class OrganizationWithRolesConvert implements ConvertorI<Object, OrganizationDO, OrganizationWithRoleDTO> {
@Override
public OrganizationWithRoleDTO doToDto(OrganizationDO dataObject) {
OrganizationWithRoleDTO organizationWithRoleDTO = new OrganizationWithRoleDTO();
BeanUtils.copyProperties(dataObject, organizationWithRoleDTO);
dataObject.getRoles().forEach(roleDO -> roleDO.setOrganizationName(dataObject.getName()));
organizationWithRoleDTO.setRoles(ConvertHelper.convertList(dataObject.getRoles(), RoleDTO.class));
return organizationWithRoleDTO;
}
}
|
[
"bohenmian@gmail.com"
] |
bohenmian@gmail.com
|
bb9bb857eac572b2df9fedb718b3857cc4086057
|
ddcf1d31fb637d7144f51e89bc8b1bc0645d65bd
|
/src/main/java/cgd/sx/routines/Msxs093a.java
|
8c747435b92d2fe2ff4d659eaaf737b09528933b
|
[] |
no_license
|
joao-goncalves-morphis/CodeGuru
|
6b90a2fed061941a7020d143d9167f7434880cd4
|
3643af0dc69ed5b8a09ba89311b9b3afd27ca0e1
|
refs/heads/master
| 2022-09-02T23:29:10.586712
| 2020-05-06T14:31:03
| 2020-05-06T14:31:03
| 259,694,187
| 0
| 0
| null | 2020-05-27T13:40:19
| 2020-04-28T16:36:36
|
Java
|
UTF-8
|
Java
| false
| false
| 466
|
java
|
package cgd.sx.routines;
import cgd.framework.CgdExternalRoutine ;
import morphis.framework.datatypes.annotations.Data ;
import cgd.sx.structures.link.Bsxl093a ;
/**
*
* migrated from [GH]
*
* @version 2.0
*
*/
public abstract class Msxs093a extends CgdExternalRoutine {
/**
* Service Parameters
*/
/**
* @return instancia da área de ligação Bsxl093a
*/
@Data
public abstract Bsxl093a bsxl093a() ;
}
|
[
"joao.goncalves@morphis-tech.com"
] |
joao.goncalves@morphis-tech.com
|
6bef8736910b00bd224771fde8f888caaedcd0d4
|
89e7556704df2f64ad30b2d105ded1be05c0671b
|
/src/test/java/com/yahoo/sketches/performance/ProcessStats.java
|
dfe8160b743b4a66dfc188c15166ce318c3a78d4
|
[
"Apache-2.0"
] |
permissive
|
gitter-badger/sketches-core
|
eba928997a2b4c0d5dac976d55408256cf3632ed
|
d9d5d2c02e260b8008e9a10759c134feee4fe9ac
|
refs/heads/master
| 2021-01-21T03:08:55.774024
| 2016-04-24T21:19:52
| 2016-04-24T21:19:52
| 56,998,969
| 0
| 0
| null | 2016-04-24T23:25:47
| 2016-04-24T23:25:46
| null |
UTF-8
|
Java
| false
| false
| 7,069
|
java
|
/*
* Copyright 2015, Yahoo! Inc.
* Licensed under the terms of the Apache License 2.0. See LICENSE file at the project root for terms.
*/
package com.yahoo.sketches.performance;
import static java.lang.Math.abs;
import static java.lang.Math.sqrt;
import java.util.Arrays;
/**
* Processes the statistics collected from an array of Stats objects from a trial set
* and creates an output row
*
* @author Lee Rhodes
*/
public class ProcessStats {
private static final char TAB = '\t';
//Quantile fractions computed from the standard normal cumulative distribution.
private static final double M2SD = 0.022750131948179; //minus 2 StdDev
private static final double M1SD = 0.158655253931457; //minus 1 StdDev
private static final double P1SD = 0.841344746068543; //plus 1 StdDev
private static final double P2SD = 0.977249868051821; //plus 2 StdDev
/**
* Process the Stats[] array and place the output row into the dataStr.
* @param statsArr the input Stats array
* @param uPerTrial the number of uniques per trial for this trial set.
* @param lgK log base 2 of configured nominal entries, or k.
* @param p the probability sampling rate. 0 < p ≤ 1.0.
* @param dataStr The StringBuilder object that is reused for each row of output
*/
public static void process(Stats[] statsArr, int uPerTrial, int lgK, double p, StringBuilder dataStr) {
int k = 1 << lgK;
int trials = statsArr.length;
Arrays.sort(statsArr, 0, trials);
//Computing the quantiles from the sorted array.
double min = statsArr[0].re;
double qM2SD = statsArr[quantileIndex(M2SD,trials)].re;
double qM1SD = statsArr[quantileIndex(M1SD,trials)].re;
double q50 = statsArr[quantileIndex(.5,trials)].re;
double qP1SD = statsArr[quantileIndex(P1SD,trials)].re;
double qP2SD = statsArr[quantileIndex(P2SD,trials)].re;
double max = statsArr[trials-1].re;
int cntLB2 = 0, cntLB1 = 0, cntUB1 = 0, cntUB2 = 0;
// double sumLB2 = 0, sumLB1 = 0, sumUB1 = 0, sumUB2 = 0;
double sumEst = 0, sumEstErr = 0, sumSqEstErr = 0;
double sumUpdateTimePerU_nS = 0;
//Scan the sorted statsArr
for (int i=0; i<trials; i++) {
Stats stats = statsArr[i];
if (uPerTrial > stats.ub2est) cntUB2++; //should be < 2.275%; under estimate
if (uPerTrial > stats.ub1est) cntUB1++; //should be < 15.866%; under estimate
if (uPerTrial < stats.lb1est) cntLB1++; //should be < 15.866%; over estimate
if (uPerTrial < stats.lb2est) cntLB2++; //should be < 2.275%; over estimate
// sumLB2 += stats.lb2est;
// sumLB1 += stats.lb1est;
// sumUB1 += stats.ub1est;
// sumUB2 += stats.ub2est;
//divide by uPerTrial to normalize betweeen 0 and 1.0, sum over all trials
//Components for the mean and variance of the estimate error
sumEst += statsArr[i].estimate;
double estErr = statsArr[i].re;
sumEstErr += estErr;
sumSqEstErr += estErr*estErr;
sumUpdateTimePerU_nS += statsArr[i].updateTimePerU_nS;
}
//normalize counts
double fracTgtUB2 = (double)cntUB2/trials;
double fracTgtUB1 = (double)cntUB1/trials;
double fracTltLB1 = (double)cntLB1/trials;
double fracTltLB2 = (double)cntLB2/trials;
//Compute the average results over the trial set
double meanEst = sumEst/trials;
double meanEstErr = sumEstErr/trials;
double deltaSqEstErr = abs(sumSqEstErr - (sumEstErr*sumEstErr)/trials);
double varEstErr = (trials == 1)? deltaSqEstErr/trials : deltaSqEstErr/(trials-1);
double rse = sqrt(varEstErr);
//compute theoretical sketch RSE
double invKm1 = 1.0/(k-1);
double oneMinusKoverN = 1.0 - (double)k/uPerTrial;
double thrse = (sumEstErr == 0.0)? 0.0 : sqrt(invKm1 * oneMinusKoverN);
//compute Bernoulli RSE
double invUperTrial = 1.0/uPerTrial;
double varOverN = (p == 1.0)? 0.0 : 1.0/p - 1.0;
double prse = (p == 1.0)? 0.0 : sqrt(invUperTrial * varOverN);
//Compute average of each of the bounds estimates
// double meanLB2est = sumLB2/(uPerTrial*trials) -1;
// double meanLB1est = sumLB1/(uPerTrial*trials) -1;
// double meanUB1est = sumUB1/(uPerTrial*trials) -1;
// double meanUB2est = sumUB2/(uPerTrial*trials) -1;
//Speed
double meanUpdateTimePerU_nS = sumUpdateTimePerU_nS/trials;
//OUTPUT
dataStr.setLength(0);
dataStr.append(uPerTrial).append(TAB).
//Sketch estimates, mean, variance
append(meanEst).append(TAB).
append(meanEstErr).append(TAB).
append(rse).append(TAB).
append(thrse).append(TAB).
append(prse).append(TAB).
//Quantiles measured from the actual distribution of values from all trials.
//Because of quantization effects these values will be noisier than the values
//computed statistically above.
append(min).append(TAB).
append(qM2SD).append(TAB).
append(qM1SD).append(TAB).
append(q50).append(TAB).
append(qP1SD).append(TAB).
append(qP2SD).append(TAB).
append(max).append(TAB).
//Fractional Bounds measurements
append(fracTltLB2).append(TAB).
append(fracTltLB1).append(TAB).
append(fracTgtUB1).append(TAB).
append(fracTgtUB2).append(TAB).
//The bounds estimates are computed mathematically based on the sketch
// estimate, the number of valid values in the cache and the value of theta.
// Because of this thes values will be relatively smooth from point to point along the
// unique value axis.
// append(meanLB2est).append(TAB).
// append(meanLB1est).append(TAB).
// append(meanUB1est).append(TAB).
// append(meanUB2est).append(TAB).
//Trials
append(trials).append(TAB).
//Speed
append(meanUpdateTimePerU_nS);
}
/**
* Returns a column header row
* @return a column header row
*/
public static String getHeader() {
StringBuilder sb = new StringBuilder();
sb. append("InU").append(TAB).
//Estimates
append("MeanEst").append(TAB).
append("MeanErr").append(TAB).
append("RSE").append(TAB).
append("thRSE").append(TAB).
append("pRSE").append(TAB).
//Quantiles
append("Min").append(TAB).
append("QM2SD").append(TAB).
append("QM1SD").append(TAB).
append("Q50").append(TAB).
append("QP1SD").append(TAB).
append("QP2SD").append(TAB).
append("Max").append(TAB).
//Fractional Bounds measurements
append("FracTltLB2").append(TAB).
append("FracTltLB1").append(TAB).
append("FracTgtUB1").append(TAB).
append("FracTgtUB2").append(TAB).
//Trials
append("Trials").append(TAB).
//Speed
append("nS/u");
return sb.toString();
}
/**
* Returns the trial index = floor(quantile-fraction, #trials)
* @param frac the desired quantile fraction (0.0 - 1.0)
* @param trials the number of total trials
* @return the trial index
*/
private static int quantileIndex(double frac, int trials) {
int idx1 = (int) Math.floor(frac*trials);
return (idx1 >= trials)? trials-1: idx1;
}
}
|
[
"lrhodes@yahoo-inc.com"
] |
lrhodes@yahoo-inc.com
|
a51e9a4fd3050f25daa7ce792036bb5afd0004dc
|
cb5f27eb6960c64542023d7382d6b917da38f0fc
|
/sources/com/google/android/gms/internal/firebase_auth/zzfq.java
|
e77293271fa38e2ec992ee3292877d021a62ae64
|
[] |
no_license
|
djtwisty/ccah
|
a9aee5608d48448f18156dd7efc6ece4f32623a5
|
af89c8d3c216ec3371929436545227682e811be7
|
refs/heads/master
| 2020-04-13T05:33:08.267985
| 2018-12-24T13:52:39
| 2018-12-24T13:52:39
| 162,995,366
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,851
|
java
|
package com.google.android.gms.internal.firebase_auth;
import com.google.android.gms.common.api.Api.BaseClientBuilder;
import java.util.Arrays;
import java.util.Collection;
import java.util.RandomAccess;
final class zzfq extends zzed<Float> implements zzgb<Float>, zzhn, RandomAccess {
private static final zzfq zzwu;
private int size;
private float[] zzwv;
zzfq() {
this(new float[10], 0);
}
private zzfq(float[] fArr, int i) {
this.zzwv = fArr;
this.size = i;
}
protected final void removeRange(int i, int i2) {
zzew();
if (i2 < i) {
throw new IndexOutOfBoundsException("toIndex < fromIndex");
}
System.arraycopy(this.zzwv, i2, this.zzwv, i, this.size - i2);
this.size -= i2 - i;
this.modCount++;
}
public final boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof zzfq)) {
return super.equals(obj);
}
zzfq zzfq = (zzfq) obj;
if (this.size != zzfq.size) {
return false;
}
float[] fArr = zzfq.zzwv;
for (int i = 0; i < this.size; i++) {
if (Float.floatToIntBits(this.zzwv[i]) != Float.floatToIntBits(fArr[i])) {
return false;
}
}
return true;
}
public final int hashCode() {
int i = 1;
for (int i2 = 0; i2 < this.size; i2++) {
i = (i * 31) + Float.floatToIntBits(this.zzwv[i2]);
}
return i;
}
public final int size() {
return this.size;
}
public final void zzc(float f) {
zzc(this.size, f);
}
private final void zzc(int i, float f) {
zzew();
if (i < 0 || i > this.size) {
throw new IndexOutOfBoundsException(zzi(i));
}
if (this.size < this.zzwv.length) {
System.arraycopy(this.zzwv, i, this.zzwv, i + 1, this.size - i);
} else {
Object obj = new float[(((this.size * 3) / 2) + 1)];
System.arraycopy(this.zzwv, 0, obj, 0, i);
System.arraycopy(this.zzwv, i, obj, i + 1, this.size - i);
this.zzwv = obj;
}
this.zzwv[i] = f;
this.size++;
this.modCount++;
}
public final boolean addAll(Collection<? extends Float> collection) {
zzew();
zzfv.checkNotNull(collection);
if (!(collection instanceof zzfq)) {
return super.addAll(collection);
}
zzfq zzfq = (zzfq) collection;
if (zzfq.size == 0) {
return false;
}
if (BaseClientBuilder.API_PRIORITY_OTHER - this.size < zzfq.size) {
throw new OutOfMemoryError();
}
int i = this.size + zzfq.size;
if (i > this.zzwv.length) {
this.zzwv = Arrays.copyOf(this.zzwv, i);
}
System.arraycopy(zzfq.zzwv, 0, this.zzwv, this.size, zzfq.size);
this.size = i;
this.modCount++;
return true;
}
public final boolean remove(Object obj) {
zzew();
for (int i = 0; i < this.size; i++) {
if (obj.equals(Float.valueOf(this.zzwv[i]))) {
System.arraycopy(this.zzwv, i + 1, this.zzwv, i, (this.size - i) - 1);
this.size--;
this.modCount++;
return true;
}
}
return false;
}
private final void zzh(int i) {
if (i < 0 || i >= this.size) {
throw new IndexOutOfBoundsException(zzi(i));
}
}
private final String zzi(int i) {
return "Index:" + i + ", Size:" + this.size;
}
public final /* synthetic */ Object set(int i, Object obj) {
float floatValue = ((Float) obj).floatValue();
zzew();
zzh(i);
float f = this.zzwv[i];
this.zzwv[i] = floatValue;
return Float.valueOf(f);
}
public final /* synthetic */ Object remove(int i) {
zzew();
zzh(i);
float f = this.zzwv[i];
if (i < this.size - 1) {
System.arraycopy(this.zzwv, i + 1, this.zzwv, i, (this.size - i) - 1);
}
this.size--;
this.modCount++;
return Float.valueOf(f);
}
public final /* synthetic */ void add(int i, Object obj) {
zzc(i, ((Float) obj).floatValue());
}
public final /* synthetic */ zzgb zzj(int i) {
if (i >= this.size) {
return new zzfq(Arrays.copyOf(this.zzwv, i), this.size);
}
throw new IllegalArgumentException();
}
public final /* synthetic */ Object get(int i) {
zzh(i);
return Float.valueOf(this.zzwv[i]);
}
static {
zzed zzfq = new zzfq();
zzwu = zzfq;
zzfq.zzev();
}
}
|
[
"alex@Alexs-MacBook-Pro.local"
] |
alex@Alexs-MacBook-Pro.local
|
be1f3eae1fbe539939918b410a68116d81a72642
|
573a66e4f4753cc0f145de8d60340b4dd6206607
|
/JS-CS-Detection-byExample/Dataset (ALERT 5 GB)/3664240/rootbeer1-1.2.3/src/org/trifort/rootbeer/testcases/rootbeertest/kerneltemplate/MatrixKernel.java
|
d182229504c6328d4c25537567de8b5c0096b642
|
[
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0",
"MIT"
] |
permissive
|
mkaouer/Code-Smells-Detection-in-JavaScript
|
3919ec0d445637a7f7c5f570c724082d42248e1b
|
7130351703e19347884f95ce6d6ab1fb4f5cfbff
|
refs/heads/master
| 2023-03-09T18:04:26.971934
| 2022-03-23T22:04:28
| 2022-03-23T22:04:28
| 73,915,037
| 8
| 3
| null | 2023-02-28T23:00:07
| 2016-11-16T11:47:44
| null |
UTF-8
|
Java
| false
| false
| 1,735
|
java
|
package org.trifort.rootbeer.testcases.rootbeertest.kerneltemplate;
/*
* Copyright 2012 Phil Pratt-Szeliga and other contributors
* http://chirrup.org/
*
* See the file LICENSE for copying permission.
*/
import org.trifort.rootbeer.runtime.Kernel;
import org.trifort.rootbeer.runtime.RootbeerGpu;
public class MatrixKernel implements Kernel {
private int[] m_a;
private int[] m_b;
private int[] m_c;
private int m_blockSize;
private int m_gridSize;
public MatrixKernel(int[] a, int[] b, int[] c, int block_size, int grid_size){
m_a = a;
m_b = b;
m_c = c;
m_blockSize = block_size;
m_gridSize = grid_size;
}
public void gpuMethod(){
int block_idxx = RootbeerGpu.getBlockIdxx();
int thread_idxx = RootbeerGpu.getThreadIdxx();
int b_columns = m_blockSize * m_gridSize;
int a_columns = m_blockSize;
int i = thread_idxx;
int j = block_idxx;
int sum = 0;
for(int k = 0; k < a_columns; ++k){
sum += m_a[i*a_columns+k] + m_b[k*b_columns+j];
}
m_c[i*b_columns+j] = sum;
//RootbeerGpu.setSharedFloat((row*block_size) + col, m_a[row*block_size]);
}
public boolean compare(MatrixKernel rhs) {
int[] lhs_c = m_c;
int[] rhs_c = rhs.m_c;
if(lhs_c.length != rhs_c.length){
System.out.println("length");
return false;
}
for(int i = 0; i < lhs_c.length; ++i){
int lhs_value = lhs_c[i];
int rhs_value = rhs_c[i];
if(lhs_value != rhs_value){
System.out.println("m_c");
System.out.println("lhs_value: "+lhs_value);
System.out.println("rhs_value: "+rhs_value);
System.out.println("index: "+i);
return false;
}
}
return true;
}
}
|
[
"mmkaouer@umich.edu"
] |
mmkaouer@umich.edu
|
45bbbba463e95c0c7274e96434923ad2f3686e09
|
46ef04782c58b3ed1d5565f8ac0007732cddacde
|
/app/app.project.conf/src/org/modelio/app/project/conf/dialog/projectinfo/ProjectInfosPage.java
|
4da2fcc0e20e7866e74427e9d0431b57c5a1414e
|
[] |
no_license
|
daravi/modelio
|
844917412abc21e567ff1e9dd8b50250515d6f4b
|
1787c8a836f7e708a5734d8bb5b8a4f1a6008691
|
refs/heads/master
| 2020-05-26T17:14:03.996764
| 2019-05-23T21:30:10
| 2019-05-23T21:30:45
| 188,309,762
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,565
|
java
|
/*
* Copyright 2013-2018 Modeliosoft
*
* This file is part of Modelio.
*
* Modelio 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 3 of the License, or
* (at your option) any later version.
*
* Modelio 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 Modelio. If not, see <http://www.gnu.org/licenses/>.
*
*/
package org.modelio.app.project.conf.dialog.projectinfo;
import com.modeliosoft.modelio.javadesigner.annotations.objid;
import org.eclipse.e4.ui.model.application.MApplication;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.forms.widgets.ScrolledForm;
import org.eclipse.ui.forms.widgets.Section;
import org.modelio.app.project.conf.dialog.ProjectModel;
/**
* This view displays information about the project currently selected in the workspace project list as a set of 'sections'. Practically, the view has to distinguish between two cases:
* <ul>
* <li>the displayed project is the currently opened project
* <li>the displayed project is NOT the currently opened project
*
* In the first case, most sections will allow modifying the project configuration while such modifications are forbidden in the second case.
*/
@objid ("a745c46e-33f6-11e2-a514-002564c97630")
public class ProjectInfosPage {
@objid ("a745c470-33f6-11e2-a514-002564c97630")
private FragmentsSection fragmentsSection;
@objid ("a745c471-33f6-11e2-a514-002564c97630")
private ScrolledForm form;
@objid ("a745c472-33f6-11e2-a514-002564c97630")
private ModulesSection modulesSection;
@objid ("a745c473-33f6-11e2-a514-002564c97630")
private StorageSection storageSection;
@objid ("a745c475-33f6-11e2-a514-002564c97630")
private GeneralSection generalSection;
/**
* Creates the SWT controls.
* <p>
* Called by E4 injection.
* @param toolkit a form toolkit
* @param application the E4 application model
* @param parent the parent composite.
* @return the created form
*/
@objid ("a745c477-33f6-11e2-a514-002564c97630")
public ScrolledForm createControls(FormToolkit toolkit, MApplication application, final Composite parent) {
// The form
this.form = toolkit.createScrolledForm(parent);
GridLayout formlayout = new GridLayout();
this.form.getBody().setLayout(formlayout);
formlayout.numColumns = 2;
formlayout.makeColumnsEqualWidth = true;
// General section
this.generalSection = new GeneralSection(this.form.getMessageManager());
Section section = this.generalSection.createControls(toolkit, this.form.getBody());
GridData twd = new GridData(SWT.FILL, SWT.FILL, true, false);
section.setLayoutData(twd);
// Storage section
this.storageSection = new StorageSection();
section = this.storageSection.createControls(toolkit, this.form.getBody());
twd = new GridData(SWT.FILL, SWT.TOP, false, false);
section.setLayoutData(twd);
// Fragment Section
this.fragmentsSection = new FragmentsSection(application.getContext());
section = this.fragmentsSection.createControls(toolkit, this.form.getBody());
twd = new GridData(SWT.FILL, SWT.FILL, false, true, 2, 1);
section.setLayoutData(twd);
// Modules Section
this.modulesSection = new ModulesSection(application.getContext());
section = this.modulesSection.createControls(toolkit, this.form.getBody());
twd = new GridData(SWT.FILL, SWT.FILL, false, true, 2, 1);
section.setLayoutData(twd);
return this.form;
}
@objid ("a745eb5d-33f6-11e2-a514-002564c97630")
public void setInput(ProjectModel projectAdapter) {
// update the different sections
this.generalSection.setInput(projectAdapter);
this.storageSection.setInput(projectAdapter);
this.fragmentsSection.setInput(projectAdapter);
this.modulesSection.setInput(projectAdapter);
}
}
|
[
"puya@motionmetrics.com"
] |
puya@motionmetrics.com
|
f54a4a97ead7a78681635c08221cd6be7df1d338
|
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
|
/genny_JavaWithoutLambdasApi21/applicationModule/src/main/java/applicationModulepackageJava3/Foo254.java
|
fc1161605c1b439b892078bb251030f8607a99bd
|
[] |
no_license
|
NikitaKozlov/generated-project-for-desugaring
|
0bc1443ab3ddc84cd289331c726761585766aea7
|
81506b3711004185070ca4bb9a93482b70011d36
|
refs/heads/master
| 2020-03-20T00:35:06.996525
| 2018-06-12T09:30:37
| 2018-06-12T09:30:37
| 137,049,317
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 346
|
java
|
package applicationModulepackageJava3;
public class Foo254 {
public void foo0() {
new applicationModulepackageJava3.Foo253().foo5();
}
public void foo1() {
foo0();
}
public void foo2() {
foo1();
}
public void foo3() {
foo2();
}
public void foo4() {
foo3();
}
public void foo5() {
foo4();
}
}
|
[
"nikita.e.kozlov@gmail.com"
] |
nikita.e.kozlov@gmail.com
|
9ecad1a7b336242c42dfdce2605c8dcf842a5768
|
180e78725121de49801e34de358c32cf7148b0a2
|
/dataset/protocol1/kylin/testing/346/CubeRequest.java
|
4fbdb19c4dac5d277cfdc68a9cfa4d626e2386fe
|
[] |
no_license
|
ASSERT-KTH/synthetic-checkstyle-error-dataset
|
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
|
40c057e1669584bfc6fecf789b5b2854660222f3
|
refs/heads/master
| 2023-03-18T12:50:55.410343
| 2019-01-25T09:54:39
| 2019-01-25T09:54:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,140
|
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.kylin.rest.request;
public class CubeRequest {
private String uuid;
private String cubeName;
private String cubeDescData;
private String streamingData;
private String kafkaData;
private boolean successful;
private String message;
private String project;
private String streamingCube;
public String getUuid() {
return uuid;
}
public void setUuid(String uuid) {
this.uuid = uuid;
}
/**
* @return the message
*/
public String getMessage() {
return message;
}
/**
* @param message
* the message to set
*/
public void setMessage(String message) {
this.message = message;
}
/**
* @return the status
*/
public boolean getSuccessful() {
return successful;
}
/**
* @param status
* the status to set
*/
public void setSuccessful(boolean status) {
this.successful = status;
}
public CubeRequest() {
}
public CubeRequest(String cubeName, String cubeDescData) {
this.cubeName = cubeName;
this.cubeDescData = cubeDescData;
}
public String getCubeDescData() {
return cubeDescData;
}
public void setCubeDescData(String cubeDescData) {
this.cubeDescData = cubeDescData;
}
/**
* @return the cubeDescName
*/
public String getCubeName() {
return cubeName;
}
/**
* @param cubeName
* the cubeDescName to set
*/
public void setCubeName(String cubeName) {
this.cubeName = cubeName;
}
public String getProject() {
return project;
}
public void setProject(String project) {
this.project = project;
}
public String getStreamingCube() {
return streamingCube;
}
public void setStreamingCube(String streamingCube) {
this.streamingCube = streamingCube;
}
public String getStreamingData() {
return streamingData;
}
public void setStreamingData(String streamingData) {
this.streamingData = streamingData;
}
public String getKafkaData() {
return kafkaData;
}
public void setKafkaData(String kafkaData) {
this.kafkaData = kafkaData;
}
}
|
[
"bloriot97@gmail.com"
] |
bloriot97@gmail.com
|
b2d061287e1151bfcb6e3d3c83123981f1aab839
|
370e66253cba9eb3e3aafca81eda2e22ad266540
|
/src/main/java/com/insightfullogic/honest_profiler/log/EventListener.java
|
0a064791d91f4ab9ed657bbbd68e6db370742970
|
[
"Apache-2.0"
] |
permissive
|
vyazelenko/honest-profiler
|
95a493db488a10992714503abc49e4c37a6255db
|
5455816fefc8aefc3106d56567bb978f1c083afa
|
refs/heads/master
| 2021-01-18T02:45:31.545757
| 2014-06-16T13:25:19
| 2014-06-16T13:25:19
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 303
|
java
|
package com.insightfullogic.honest_profiler.log;
public interface EventListener {
public void startOfLog(boolean continuous);
public void handle(TraceStart traceStart);
public void handle(StackFrame stackFrame);
public void handle(Method newMethod);
public void endOfLog();
}
|
[
"richard.warburton@gmail.com"
] |
richard.warburton@gmail.com
|
6fada1db601d680aa9c104a195952a8bd8b34c6f
|
9f6471e0e85ab264c2eb3618d310b1b37b7cd95e
|
/example/007_PetClinic/src/org/minimalj/example/minimalclinic/frontend/VetTablePage.java
|
003d11b9d0d9ba731f8c37bc681ab751c766eed5
|
[] |
no_license
|
madiarra/minimal-j
|
f8c6cc0dc27914aff75e2f3319bec4de8234d588
|
f81d44242f0c691537cd6661ae8c62d69343097e
|
refs/heads/master
| 2021-01-20T23:36:29.525186
| 2016-06-22T09:08:41
| 2016-06-22T09:08:41
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 536
|
java
|
package org.minimalj.example.minimalclinic.frontend;
import java.util.List;
import org.minimalj.backend.Backend;
import org.minimalj.example.minimalclinic.model.Vet;
import org.minimalj.frontend.page.TablePage;
import org.minimalj.transaction.criteria.By;
public class VetTablePage extends TablePage<Vet> {
private static final Object[] keys = {Vet.$.person.getName(), Vet.$.specialties};
public VetTablePage() {
super(keys);
}
@Override
protected List<Vet> load() {
return Backend.read(Vet.class, By.all(), 100);
}
}
|
[
"bruno.eberhard@pop.ch"
] |
bruno.eberhard@pop.ch
|
31f931a3aa7da2eb0d4f75c10e3cf847bd3fc603
|
a923f77cbe049b2079f08f92e573c6da5ceb5b8e
|
/src/test/java/Day8/SpartanBasicAuth.java
|
b1738b837a580bd5678be35d8cc786aa0960840d
|
[] |
no_license
|
TuncCelik/eu-jdbc-practice
|
b58705b2d41dd5d5e2d66df1891826a79892400e
|
1a041fe7da9c25a1b7bad80430a5ce5166e72643
|
refs/heads/master
| 2023-01-22T16:03:50.025843
| 2020-12-03T21:32:52
| 2020-12-03T21:32:52
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 591
|
java
|
package Day8;
import io.restassured.http.ContentType;
import org.testng.annotations.Test;
import static io.restassured.RestAssured.*;
import static org.hamcrest.Matchers.*;
import static org.testng.Assert.*;
public class SpartanBasicAuth {
@Test
public void test1(){
given()
.accept(ContentType.JSON)
.and()
.auth().basic("admin","admin")
.when()
.get("http://54.198.216.176:8000/api/spartans")
.then().log().all()
.statusCode(200);
}
}
|
[
"github@cybertekschool.com"
] |
github@cybertekschool.com
|
9b53b06d107ff3404eddb5256c85a63810e5e6b0
|
47b450f593b61e8d4fb8d8d5f6fd4231651589bc
|
/src/com/sun/corba/se/PortableActivationIDL/ORBProxyHolder.java
|
ebbd36f924cfc117e648fd74c11b511383b3a5db
|
[] |
no_license
|
jiayi-zh/jdk-source
|
877d79b25cc290b1935fe55f9ec940b88b159cca
|
b226fe32b0909e3b29610218d3622d6d795ca2f4
|
refs/heads/master
| 2023-06-01T08:55:02.436349
| 2021-06-25T10:33:37
| 2021-06-25T10:33:37
| 326,683,948
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,189
|
java
|
package com.sun.corba.se.PortableActivationIDL;
/**
* com/sun/corba/se/PortableActivationIDL/ORBProxyHolder.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from c:/jenkins/workspace/8-2-build-windows-amd64-cygwin/jdk8u271/605/corba/src/share/classes/com/sun/corba/se/PortableActivationIDL/activation.idl
* Wednesday, September 16, 2020 7:17:08 PM UTC
*/
/** ORB callback interface, passed to Activator in registerORB method.
*/
public final class ORBProxyHolder implements org.omg.CORBA.portable.Streamable
{
public com.sun.corba.se.PortableActivationIDL.ORBProxy value = null;
public ORBProxyHolder ()
{
}
public ORBProxyHolder (com.sun.corba.se.PortableActivationIDL.ORBProxy initialValue)
{
value = initialValue;
}
public void _read (org.omg.CORBA.portable.InputStream i)
{
value = com.sun.corba.se.PortableActivationIDL.ORBProxyHelper.read (i);
}
public void _write (org.omg.CORBA.portable.OutputStream o)
{
com.sun.corba.se.PortableActivationIDL.ORBProxyHelper.write (o, value);
}
public org.omg.CORBA.TypeCode _type ()
{
return com.sun.corba.se.PortableActivationIDL.ORBProxyHelper.type ();
}
}
|
[
"zhengy@gato.cn"
] |
zhengy@gato.cn
|
fc371d7b9035314f977880b6f793f67e8d69be51
|
ae6e586ff8135c64848a370365d5247a1978380a
|
/src/main/java/au/gov/nehta/model/clinical/common/types/HL7CodeSystem.java
|
71219704f88a7afe08aba16a5bb3fecb21bf8130
|
[
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0",
"BSD-2-Clause"
] |
permissive
|
stav09/clinical-document-library-java
|
7806506166a1cc154b1f8de960ad6f03bdf54163
|
2d3fdb3488f3b008a49bbb8e5fa69875e863fe01
|
refs/heads/master
| 2021-02-17T04:15:23.186466
| 2020-03-05T12:07:56
| 2020-03-05T12:07:56
| 245,070,105
| 0
| 0
|
NOASSERTION
| 2020-03-05T04:39:13
| 2020-03-05T04:39:12
| null |
UTF-8
|
Java
| false
| false
| 200
|
java
|
package au.gov.nehta.model.clinical.common.types;
import au.gov.nehta.model.cda.common.code.CodeImpl;
public class HL7CodeSystem extends CodeImpl {
public HL7CodeSystem() {
super( "MR" );
}
}
|
[
"philip.wilford@digitalhealth.gov.au"
] |
philip.wilford@digitalhealth.gov.au
|
e51ced367234db885e34254fde27a19cf4ec4c2d
|
97e8970383c75a31a7b35cea202f17809ac9f980
|
/com/google/android/gms/wearable/internal/zzdh.java
|
5f45269412f4ed43f8c8545358061f12c5809326
|
[] |
no_license
|
tgapps/android
|
27116d389c48bd3a55804c86e9a7c2e0cf86a86c
|
d061b97e4bb0f532cc141ac5021e3329f4214202
|
refs/heads/master
| 2018-11-13T20:41:30.297252
| 2018-09-03T16:09:46
| 2018-09-03T16:09:46
| 113,666,719
| 9
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,226
|
java
|
package com.google.android.gms.wearable.internal;
import android.os.Parcel;
import android.os.Parcelable.Creator;
import com.google.android.gms.common.internal.safeparcel.SafeParcelReader;
public final class zzdh implements Creator<zzdg> {
public final /* synthetic */ Object createFromParcel(Parcel parcel) {
int validateObjectHeader = SafeParcelReader.validateObjectHeader(parcel);
int i = 0;
int i2 = 0;
while (parcel.dataPosition() < validateObjectHeader) {
int readHeader = SafeParcelReader.readHeader(parcel);
switch (SafeParcelReader.getFieldId(readHeader)) {
case 2:
i2 = SafeParcelReader.readInt(parcel, readHeader);
break;
case 3:
i = SafeParcelReader.readInt(parcel, readHeader);
break;
default:
SafeParcelReader.skipUnknownField(parcel, readHeader);
break;
}
}
SafeParcelReader.ensureAtEnd(parcel, validateObjectHeader);
return new zzdg(i2, i);
}
public final /* synthetic */ Object[] newArray(int i) {
return new zzdg[i];
}
}
|
[
"telegram@daniil.it"
] |
telegram@daniil.it
|
d3702ededc66eb8e75bd5a26207ffe4542651abf
|
1385e2c2ea1f157cbbf2d9edde7a92df442e2092
|
/service/src/com/yf/system/base/qqtypenew/IQqtypenewComponent.java
|
639f7763d303fcf63ebaf77863ff0370bb3f9d94
|
[] |
no_license
|
marc45/kzpw
|
112b6dd7d5e9317fad343918c48767be32a3c9e3
|
19c11c2abe37125eb715e8b723df6e87fce7e10e
|
refs/heads/master
| 2021-01-22T18:01:45.787156
| 2015-12-07T08:43:53
| 2015-12-07T08:43:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,681
|
java
|
/**
* 版权所有, 允风文化
* Author: B2B2C 项目开发组
* copyright: 2012
*/
package com.yf.system.base.qqtypenew;
import java.sql.SQLException;
import java.util.*;
import com.yf.system.base.util.PageInfo;
public interface IQqtypenewComponent{
/**
* 创建 QQ类型
* @param id
* @return deleted count
*/
public Qqtypenew createQqtypenew(Qqtypenew qqtypenew) throws SQLException;
/**
* 删除 QQ类型
* @param id
* @return deleted count
*/
public int deleteQqtypenew(long id);
/**
* 修改 QQ类型
* @param id
* @return updated count
*/
public int updateQqtypenew(Qqtypenew qqtypenew);
/**
* 修改 QQ类型但忽略空值
* @param id
* @return
*/
public int updateQqtypenewIgnoreNull(Qqtypenew qqtypenew);
/**
* 查找 QQ类型
* @param where
* @param orderby
* @param limit
* @param offset
* @return
*/
public List findAllQqtypenew(String where, String orderby,int limit,int offset);
/**
* 查找 QQ类型
* @param id
* @return
*/
public Qqtypenew findQqtypenew(long id);
/**
* 查找 QQ类型
* @param where
* @param orderby
* @param pageinfo
* @return
*/
public List findAllQqtypenew(String where, String orderby,PageInfo pageinfo);
/**
* 根据Sql查找QQ类型
* @param sql
* @param limit
* @param offset
* @return
*/
public List findAllQqtypenew(String sql,int limit,int offset);
/**
* 执行Sql QQ类型
* @param sql
* @return updated count
*/
public int excuteQqtypenewBySql(String sql);
/**
* 执行Sql
* @param sql
* @return count
*/
public int countQqtypenewBySql(String sql);
}
|
[
"dogdog7788@qq.com"
] |
dogdog7788@qq.com
|
3449db851bcbf0c33f27342e73e5094687417b5d
|
37af04a484f1bab238400ae877ad24ba24990cae
|
/src/polymorphism/TestBank.java
|
19d1edc15140c9dd561c8b61819f866401a80b06
|
[] |
no_license
|
hacialidemirbas/GitHub
|
e1b7626ce20e6080173108d035131440a41be8e6
|
00e97743fdf6836f19b0aa7117622a4b15827aab
|
refs/heads/master
| 2021-05-27T10:44:54.192489
| 2020-05-19T22:59:33
| 2020-05-19T22:59:33
| 254,257,875
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 529
|
java
|
package polymorphism;
public class TestBank {
public static void main(String[] args) {
Bank myBank= new Bank(12345, "nilfilsa", 1250);
Loan myLoan=new Loan(23456,"new loan",4000,1.05, 20, 5000);
Loan myCarLoan= new CarLoan(456789, "car", 3000.00, 1.04, 36, 7500, 3.45, 750);
System.out.println(myCarLoan.calculateTotalPayment());
Loan myHomeLoan= new homeLoan(98765, "home", 900000.00, 1.987, 360, 50000, 750);
System.out.println(myCarLoan.calculateMonthlyPayment());
}
}
|
[
"hacialidemirbas@gmail.com"
] |
hacialidemirbas@gmail.com
|
80ab00ebb259fda6f28779af22afdaa581a0e268
|
0046891fe863881e980c987e7cf028a86419fa48
|
/BaseNavigation(20171213)/app/src/main/java/com/hoon/wmcs/external/Constants.java
|
9432d9a1fc19b8f4c3f78921470b590ebb632ddf
|
[] |
no_license
|
bobsbimal58/IndoorPositioningSystem
|
9a01695b7a8109f868312fee76b7a89c1809e387
|
3260e2f9279e2df454429067b93c05181e2c7a18
|
refs/heads/master
| 2020-03-21T20:09:42.687336
| 2018-06-28T08:39:44
| 2018-06-28T08:39:44
| 138,990,693
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,955
|
java
|
package com.hoon.wmcs.external;
import android.hardware.SensorManager;
/**
* Created by WMCS on 2017-07-28.
*/
public class Constants {
// Camera request code
public static final int MY_PERMISSION_REQUEST_CODE = 100;
// IMU Sensor samplingrate
public static final int RATE = SensorManager.SENSOR_DELAY_GAME;
//Socket IP, port number
public static final String IP = "117.16.23.124";
public static final int PORT = 5545;
//Database
public static final String DB_NAME = "ARnavigation";
public static final String TABLE_NAME = "BeaconData";
public static final String TABLENAME = "Fingerprint";
public static final String COL_1 = "ID";
public static final String COL_2 = "X";
public static final String COL_3 = "Y";
public static final String COL_4 = "Beacon";
public static final String COL_5 = "Rssi";
public static final String COL_6 = "Floor";
public static final String ID = "id";
public static final String FLOOR = "FLOOR";
public static final String COLXAXIS = "COLXAXIS";
public static final String COLYAXIS = "COLYAXIS";
public static final String COLZAXIS = "COLZAXIS";
public static final String MAPX = "COORX";
public static final String MAPY = "COORY";
public static final String MAPXM = "COORXM";
public static final String MAPYM = "COORYM";
public static final String FINAL = "NORM";
//filters Values
public static final float ALPHA = 0.8f;
public static final float MAX_THRES = 10.5f;
public static final float MIN_THRES = 9.5f;
public static final float K = 0.35f;
public static final float NS2S = 1.0f / 1000000000.0f;
//Socket
public static final String END = "end";
//Mode & AR or 3D Map
public static final int MODE1 = 1;
public static final int MODE2 = 2;
public static final int MODE3 = 3;
public static final int AR = 1;
public static final int MAP3D = 2;
}
|
[
"you@example.com"
] |
you@example.com
|
60da84f355e9f831504803b4204f0179d0af7fd5
|
7f20b1bddf9f48108a43a9922433b141fac66a6d
|
/core3/api/tags/api-parent-3.0.0-beta1/work-api/src/test/java/org/cytoscape/work/BasicTunableHandlerFactoryTest.java
|
d34aaffaae3546987ff23dd96f21d4c3a0bb74ce
|
[] |
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
| 3,511
|
java
|
package org.cytoscape.work;
import static org.junit.Assert.*;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import org.junit.Test;
public class BasicTunableHandlerFactoryTest {
private final Source source = new Source(5);
private Field getField() {
try {
return source.getClass().getField("value");
} catch (Exception e) {
return null;
}
}
private Tunable getFieldTunable() {
try {
return getField().getAnnotation(Tunable.class);
} catch (Exception e) {
return null;
}
}
private Method getGetter() {
try {
return source.getClass().getMethod("getXValue");
} catch (Exception e) {
return null;
}
}
private Method getSetter() {
try {
return source.getClass().getMethod("setXValue", int.class);
} catch (Exception e) {
return null;
}
}
private Tunable getMethodTunable() {
try {
return getGetter().getAnnotation(Tunable.class);
} catch (Exception e) {
return null;
}
}
@Test
public void testGetHandlerField() {
BasicTunableHandlerFactory<TunableHandler> thf = new BasicTunableHandlerFactory(GoodTunableHandler.class, int.class);
TunableHandler th = thf.createTunableHandler(getField(), source, getFieldTunable() );
assertNotNull(th);
}
@Test
public void testGetHandlerMethod() {
BasicTunableHandlerFactory<TunableHandler> thf = new BasicTunableHandlerFactory(GoodTunableHandler.class, int.class);
TunableHandler th = thf.createTunableHandler(getGetter(), getSetter(), source, getMethodTunable() );
assertNotNull(th);
}
@Test
public void testInvalidTypesField() {
BasicTunableHandlerFactory<TunableHandler> thf = new BasicTunableHandlerFactory(GoodTunableHandler.class, String.class);
TunableHandler th = thf.createTunableHandler(getField(), source, getFieldTunable() );
assertNull(th);
}
@Test
public void testInvalidTypesMethod() {
BasicTunableHandlerFactory<TunableHandler> thf = new BasicTunableHandlerFactory(GoodTunableHandler.class, String.class);
TunableHandler th = thf.createTunableHandler(getGetter(), getSetter(), source, getMethodTunable() );
assertNull(th);
}
@Test
public void testNoFieldConstructor() {
BasicTunableHandlerFactory<TunableHandler> thf = new BasicTunableHandlerFactory(NoFieldTunableHandler.class, int.class);
TunableHandler th = thf.createTunableHandler(getField(), source, getFieldTunable() );
assertNull(th);
}
@Test
public void testNoMethodConstructor() {
BasicTunableHandlerFactory<TunableHandler> thf = new BasicTunableHandlerFactory(NoMethodTunableHandler.class, int.class);
TunableHandler th = thf.createTunableHandler(getGetter(), getSetter(), source, getMethodTunable() );
assertNull(th);
}
}
class GoodTunableHandler extends AbstractTunableHandler {
public GoodTunableHandler(Field f, Object o, Tunable t) {
super(f,o,t);
}
public GoodTunableHandler(Method get, Method set, Object o, Tunable t) {
super(get,set,o,t);
}
public void handle() {}
}
class NoFieldTunableHandler extends AbstractTunableHandler {
public NoFieldTunableHandler(Method get, Method set, Object o, Tunable t) {
super(get,set,o,t);
}
public void handle() {}
}
class NoMethodTunableHandler extends AbstractTunableHandler {
public NoMethodTunableHandler(Field f, Object o, Tunable t) {
super(f,o,t);
}
public void handle() {}
}
class Source {
Source(int v) {
value = v;
}
@Tunable
public int value;
@Tunable
public int getXValue() {
return value;
}
public void setXValue(int v) {
value = v;
}
}
|
[
"mes@0ecc0d97-ab19-0410-9704-bfe1a75892f5"
] |
mes@0ecc0d97-ab19-0410-9704-bfe1a75892f5
|
e99aad0522af43d874fc37485eb0f425c175157d
|
92061aae80206f826a25296ece6ed56aaffe236f
|
/src/main/java/com/jianglibo/vaadin/dashboard/util/ViewFragmentBuilder.java
|
dc46d8a1d48b1539102465eb5cc7adc3fa882931
|
[] |
no_license
|
jwangkun/easyinstaller
|
3132abb8ccd98092628c04b32aaadd3cabde1254
|
470a02a12c67d7dfc0ddc3aa0bf832adf8a64c5f
|
refs/heads/master
| 2021-01-12T13:07:35.868641
| 2016-10-27T13:03:57
| 2016-10-27T13:03:57
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,665
|
java
|
package com.jianglibo.vaadin.dashboard.util;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.net.URLEncoder;
import java.util.Optional;
import org.springframework.web.util.UriComponents;
import org.springframework.web.util.UriComponentsBuilder;
import com.google.common.base.Charsets;
import com.google.common.base.Strings;
public class ViewFragmentBuilder {
public static final String PREVIOUS_VIEW_PARAMETER_NAME = "pv";
private String pstr;
private String viewName;
private UriComponentsBuilder uriCb;
private UriComponents uriComs;
public ViewFragmentBuilder(String pstr, String viewName) {
setPstr(pstr);
setViewName(viewName);
setUriCb(UriComponentsBuilder.fromUriString(getPstr()));
setUriComs(uriCb.build());
}
public Optional<String> getPreviousView() {
return getParameterValue(PREVIOUS_VIEW_PARAMETER_NAME, true);
}
public ViewFragmentBuilder setString(String pname, String value) {
if (Strings.isNullOrEmpty(value)) {
getUriCb().replaceQueryParam(pname);
} else {
getUriCb().replaceQueryParam(pname, value);
}
return this;
}
public ViewFragmentBuilder setBoolean(String pname, boolean value) {
if (value) {
getUriCb().replaceQueryParam(pname, value);
} else {
getUriCb().replaceQueryParam(pname);
}
return this;
}
public boolean getBoolean(String pname) {
Optional<String> bsOp = getParameterValue(pname);
if (bsOp.isPresent()) {
String bs = bsOp.get();
if ("true".equalsIgnoreCase(bs) || "yes".equalsIgnoreCase(bs) || "1".equalsIgnoreCase(bs)) {
return true;
} else {
return false;
}
} else {
return false;
}
}
public long getLong(String pname) {
return str2l(getParameterValue(pname));
}
protected Integer str2i(Optional<String> stri) {
try {
if (stri.isPresent()) {
return Integer.valueOf(stri.get());
} else {
return 0;
}
} catch (NumberFormatException e) {
return 0;
}
}
protected Long str2l(Optional<String> stri) {
try {
if (stri.isPresent()) {
return Long.valueOf(stri.get());
} else {
return 0L;
}
} catch (NumberFormatException e) {
return 0L;
}
}
public String toNavigateString() {
String s = getViewName() + "/" + build().toUriString();
try {
s = URLEncoder.encode(s, Charsets.UTF_8.name());
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
return s;
}
protected Optional<String> getParameterValue(String pname) {
String v = null;
if (getUriComs().getQueryParams().containsKey(pname)) {
v = getUriComs().getQueryParams().getFirst(pname);
}
return Optional.ofNullable(v);
}
protected Optional<String> getParameterValue(String pname, boolean decode) {
String v = null;
if (getUriComs().getQueryParams().containsKey(pname)) {
v = getUriComs().getQueryParams().getFirst(pname);
}
if (v != null) {
try {
v = URLDecoder.decode(v, Charsets.UTF_8.name());
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
}
return Optional.ofNullable(v);
}
public UriComponents build() {
return getUriCb().build();
}
public String getPstr() {
return pstr;
}
public void setPstr(String pstr) {
this.pstr = pstr;
}
public String getViewName() {
return viewName;
}
public void setViewName(String viewName) {
this.viewName = viewName;
}
public UriComponentsBuilder getUriCb() {
return uriCb;
}
public void setUriCb(UriComponentsBuilder uriCb) {
this.uriCb = uriCb;
}
public UriComponents getUriComs() {
return uriComs;
}
public void setUriComs(UriComponents uriComs) {
this.uriComs = uriComs;
}
}
|
[
"jianglibo@gmail.com"
] |
jianglibo@gmail.com
|
9346e163f9a8405d800cdf377e2e4daed6e74258
|
093e942f53979299f3e56c9ab1f987e5e91c13ab
|
/storm-client/src/jvm/org/apache/storm/multicast/io/EmptyComponentAttributeProvider.java
|
0d9a5988231c87977cb8158d07be8dabf32f42af
|
[
"Apache-2.0",
"GPL-1.0-or-later",
"BSD-3-Clause",
"MIT",
"BSD-2-Clause"
] |
permissive
|
Whale-Storm/Whale
|
09bab86ce0b56412bc1b984bb5d47935cf0814aa
|
9b3e5e8bffbeefa54c15cd2de7f2fb67f36d64b2
|
refs/heads/master
| 2022-09-26T10:56:51.916884
| 2020-06-11T08:36:44
| 2020-06-11T08:36:44
| 266,803,131
| 3
| 0
|
Apache-2.0
| 2022-09-17T00:00:04
| 2020-05-25T14:39:22
|
Java
|
UTF-8
|
Java
| false
| false
| 1,132
|
java
|
/*
* (C) Copyright 2019-2019, by Dimitrios Michail and Contributors.
*
* JGraphT : a free Java graph-theory library
*
* See the CONTRIBUTORS.md file distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0, or the
* GNU Lesser General Public License v2.1 or later
* which is available at
* http://www.gnu.org/licenses/old-licenses/lgpl-2.1-standalone.html.
*
* SPDX-License-Identifier: EPL-2.0 OR LGPL-2.1-or-later
*/
package org.apache.storm.multicast.io;
import java.util.Collections;
import java.util.Map;
/**
* A component attribute provider which always returns an empty collection.
*
* @author Dimitrios Michail
*
* @param <T> the component type
*/
public class EmptyComponentAttributeProvider<T>
implements
ComponentAttributeProvider<T>
{
@Override
public Map<String, Attribute> getComponentAttributes(T component)
{
return Collections.emptyMap();
}
}
|
[
"798750509@qq.com"
] |
798750509@qq.com
|
6cc2a585bccc0baf2666d2bee4e4625adac34749
|
316e7b55e04379c5534f1ec5ade1e7855671051b
|
/Lindley.MMILTitanium/src/pe/lindley/mmil/titanium/ws/service/ConfrontacionProxy.java
|
edad624e8a82d05bfb2436272ce9f88eddbc5c3a
|
[] |
no_license
|
jels1988/msonicdroid
|
5a4d118703b1b3449086a67f9f412ca5505f90e9
|
eb36329e537c4963e1f6842d81f3c179fc8670e1
|
refs/heads/master
| 2021-01-10T09:02:11.276309
| 2013-07-18T21:16:08
| 2013-07-18T21:16:08
| 44,779,314
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,231
|
java
|
package pe.lindley.mmil.titanium.ws.service;
import pe.lindley.mmil.titanium.R;
import pe.lindley.mmil.titanium.ws.bean.ConfrontacionResponse;
import pe.lindley.mmil.titanium.ws.bean.ResumenVentaRequest;
import roboguice.inject.InjectResource;
import net.msonic.lib.JSONHelper;
import net.msonic.lib.ProxyBase;
public class ConfrontacionProxy extends ProxyBase<ConfrontacionResponse> {
public String codigoDeposito;
public String codigoSupervisor;
@InjectResource(R.string.urlwsMMILSupervisor)protected String urlWS;
@Override
protected String getUrl() {
// TODO Auto-generated method stub
return urlWS + "/Confrontacion";
}
@Override
protected String requestText() {
// TODO Auto-generated method stub
ResumenVentaRequest resumenVentaRequest = new ResumenVentaRequest();
resumenVentaRequest.codigoDeposito = codigoDeposito;
resumenVentaRequest.codigoSupervisor = codigoSupervisor;
String request = JSONHelper.serializar(resumenVentaRequest);
return request;
}
@Override
protected ConfrontacionResponse responseText(String json) {
// TODO Auto-generated method stub
ConfrontacionResponse response = JSONHelper.desSerializar(json,ConfrontacionResponse.class);
return response;
}
}
|
[
"mzegarra@gmail.com"
] |
mzegarra@gmail.com
|
3e3490636edc9170c4eb3dc00d71812676a29189
|
50750fbff439ace4a514c18ab825b9e13a24b0aa
|
/pegasus-spyware-decompiled/sample1/recompiled_java/sources/com/tendcloud/tenddata/z.java
|
d5c29ee7557cc9ec7377683f0b70a420f154e9e5
|
[
"MIT"
] |
permissive
|
GypsyBud/pegasus_spyware
|
3066ae7d217a7d4b23110326f75bf6cf63737105
|
b40f5e4bdf5bd01c21e8ef90ebe755b29c2daa68
|
refs/heads/master
| 2023-06-24T05:44:01.354811
| 2021-07-31T18:59:26
| 2021-07-31T18:59:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 506
|
java
|
package com.tendcloud.tenddata;
public class z implements h, l {
public String a = "";
public long b = 0;
public int c = 0;
public String d = "";
@Override // com.tendcloud.tenddata.l
public int a() {
return p.c(4) + p.c(this.a) + p.c(this.b) + p.c(this.c) + p.c(this.d);
}
@Override // com.tendcloud.tenddata.h
public void a(p pVar) {
pVar.b(4);
pVar.a(this.a);
pVar.a(this.b);
pVar.a(this.c);
pVar.a(this.d);
}
}
|
[
"jonathanvill00@gmail.com"
] |
jonathanvill00@gmail.com
|
138181425de1b5be0efcda7c694706dd1d38294e
|
02bb01cdb1ef712fd6d7ce16134eeee12793c448
|
/mumu-system/mumu-system-service/src/main/java/com/lovecws/mumu/system/dao/impl/CommonDaoImpl.java
|
035033b9ae952e7c3825c1a0c9462bf2b40d6349
|
[
"Apache-2.0"
] |
permissive
|
lnSmallsix/mumu
|
6eae62b98fb4e3ac85facf57173d9f69421d0674
|
1c7e609189da04412731c52bfae9788de690ff38
|
refs/heads/master
| 2021-01-14T00:09:21.960463
| 2019-03-09T02:59:38
| 2019-03-09T02:59:38
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,479
|
java
|
package com.lovecws.mumu.system.dao.impl;
import com.lovecws.mumu.system.dao.SysCommonDao;
import com.lovecws.mumu.system.entity.SysDBField;
import com.lovecws.mumu.system.entity.SysDBTable;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.SqlSessionTemplate;
import org.mybatis.spring.support.SqlSessionDaoSupport;
import org.springframework.stereotype.Repository;
import javax.annotation.Resource;
import java.sql.*;
import java.util.ArrayList;
import java.util.List;
@Repository
public class CommonDaoImpl extends SqlSessionDaoSupport implements SysCommonDao {
/**
* 注入SqlSessionTemplate实例(要求Spring中进行SqlSessionTemplate的配置).
* 可以调用sessionTemplate完成数据库操作.
*/
private SqlSessionTemplate sessionTemplate;
public SqlSessionTemplate getSessionTemplate() {
return sessionTemplate;
}
@Resource
public void setSessionTemplate(SqlSessionTemplate sessionTemplate) {
this.sessionTemplate = sessionTemplate;
}
@Resource
public void setSqlSessionFactory(SqlSessionFactory sqlSessionFactory) {
super.setSqlSessionFactory(sqlSessionFactory);
}
public SqlSession getSqlSession() {
return super.getSqlSession();
}
/**
* @return 返回数据库所有的 TABLE
*/
@Override
public List<SysDBTable> getAllTable() {
Connection connection = null;
PreparedStatement pst = null;
ResultSet rs = null;
List<SysDBTable> list = new ArrayList<SysDBTable>();
try {
connection = sessionTemplate.getConnection();
DatabaseMetaData metaData = connection.getMetaData();
// 获取所有类型为 TABLE 的表
rs = metaData.getTables(null, null, null, new String[] { "TABLE" });
while (rs.next()) {
String TABLE_NAME = rs.getString("TABLE_NAME");
// 去除一些系统表(以SQL_开头)
if (!TABLE_NAME.startsWith("SQL_")) {
list.add(new SysDBTable(rs));
}
}
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (rs != null) {
rs.close();
}
if (pst != null) {
pst.close();
}
if (connection != null) {
//connection.close();
}
} catch (SQLException e) {
e.printStackTrace();
}
}
return list;
}
/**
* @param tableName 表名
* @return 获取一个表的所有字段的属性
*/
@Override
public List<SysDBField> getAllField(String tableName) {
Connection connection = null;
PreparedStatement pst = null;
ResultSet rs = null;
List<SysDBField> list = new ArrayList<SysDBField>();
try {
connection = sessionTemplate.getConnection();
DatabaseMetaData metaData = connection.getMetaData();
rs = metaData.getColumns(null, null, tableName, null);
while (rs.next()) {
list.add(new SysDBField(rs));
}
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (rs != null) {
rs.close();
}
if (pst != null) {
pst.close();
}
if (connection != null) {
//connection.close();
}
} catch (SQLException e) {
e.printStackTrace();
}
}
return list;
}
/**
* 获取一个表的所有数据
* @param tableName 表名
* @param fields 字段
* @param params 参数
* @return
*/
@Override
public List<List<Object>> getAllData(String tableName,String fields,String params) {
Connection connection = null;
PreparedStatement pst = null;
ResultSet rs = null;
List<List<Object>> list = new ArrayList<List<Object>>();
try {
connection=sessionTemplate.getConnection();
if(fields==null||"".equals(fields)){ fields=" * ";}
if(params==null||"".equals(params)){ params="";}
pst = connection.prepareStatement("SELECT "+fields+" FROM " + tableName + params);
rs = pst.executeQuery();
// 获取metadata属性
ResultSetMetaData metaData = rs.getMetaData();
while (rs.next()) {
List<Object> map = new ArrayList<Object>();
// 循环 将一条记录保存到一个map中
for (int i = 1; i <= metaData.getColumnCount(); i++) {
// TODO 当把 表的数据 blob clob 保存到内存中的时候 可能会报内存溢出一场
map.add(rs.getString(i));
}
list.add(map);
}
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (rs != null) {
rs.close();
}
if (pst != null) {
pst.close();
}
if (connection != null) {
//connection.close();
}
} catch (SQLException e) {
e.printStackTrace();
}
}
return list;
}
}
|
[
"lovercws@gmail.com"
] |
lovercws@gmail.com
|
3e6824d013ce9b7fc60dbe72fded1d5c7cf7bd17
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Math/6/org/apache/commons/math3/linear/FieldMatrixPreservingVisitor_visit_49.java
|
2533e9605d1dc8663d73786318c874fe79a1eb4d
|
[] |
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
| 340
|
java
|
org apach common math3 linear
interfac defin visitor matrix entri
param type field element
version
field matrix preserv visitor fieldmatrixpreservingvisitor field element fieldel
visit matrix entri
param row row index entri
param column column index entri
param current entri
visit row column
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
a233a0d84578d0558a5b2e934553c1c194322a91
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/2/2_88335392fb3caab40e17c026530d2861dc0da716/StrategoTextChangeCalculator/2_88335392fb3caab40e17c026530d2861dc0da716_StrategoTextChangeCalculator_t.java
|
57e9c7aadb911e1f4788717ac284c7b2b316322f
|
[] |
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
| 3,579
|
java
|
package org.strategoxt.imp.runtime.services;
import static org.spoofax.interpreter.core.Tools.termAt;
import java.util.Collection;
import java.util.HashSet;
import org.eclipse.core.resources.IFile;
import org.eclipse.ltk.core.refactoring.TextFileChange;
import org.eclipse.text.edits.MultiTextEdit;
import org.eclipse.text.edits.ReplaceEdit;
import org.spoofax.interpreter.core.Tools;
import org.spoofax.interpreter.stratego.Fail;
import org.spoofax.interpreter.terms.IStrategoTerm;
import org.spoofax.terms.attachments.OriginAttachment;
import org.strategoxt.imp.generator.construct_textual_change_4_0;
import org.strategoxt.imp.runtime.stratego.SourceAttachment;
import org.strategoxt.lang.Context;
import org.strategoxt.lang.Strategy;
/**
* @author Maartje de Jonge
*/
public class StrategoTextChangeCalculator {
private final String ppStrategy;
private final String parenthesizeStrategy;
private final String overrideReconstructionStrategy;
private final String resugarStrategy;
public StrategoTextChangeCalculator(String ppStrategy, String parenthesize, String violatesHomomorphism, String resugar){
this.ppStrategy = ppStrategy;
this.parenthesizeStrategy = parenthesize;
this.overrideReconstructionStrategy = violatesHomomorphism;
this.resugarStrategy = resugar;
}
public Collection<TextFileChange> getFileChanges(final IStrategoTerm astChanges, final StrategoObserver observer){
IStrategoTerm textReplaceTerm = getTextReplacement(astChanges, observer);
if (textReplaceTerm == null) {
return null;
}
assert(textReplaceTerm.getSubtermCount() == astChanges.getSubtermCount());
Collection<TextFileChange> fileChanges = new HashSet<TextFileChange>();
for (int i = 0; i < astChanges.getSubtermCount(); i++) {
TextFileChange fChange = createTextChange(termAt(astChanges.getSubterm(i),0), textReplaceTerm.getSubterm(i));
fileChanges.add(fChange);
}
return fileChanges;
}
private IStrategoTerm getTextReplacement(final IStrategoTerm resultTuple, final StrategoObserver observer) {
IStrategoTerm textreplace=construct_textual_change_4_0.instance.invoke(
observer.getRuntime().getCompiledContext(),
resultTuple,
createStrategy(ppStrategy, observer),
createStrategy(parenthesizeStrategy, observer),
createStrategy(overrideReconstructionStrategy, observer),
createStrategy(resugarStrategy, observer)
);
return textreplace;
}
private Strategy createStrategy(final String sname, final StrategoObserver observer) {
return new Strategy() {
@Override
public IStrategoTerm invoke(Context context, IStrategoTerm current) {
if (sname != null)
return observer.invokeSilent(sname, current);
return null;
}
};
}
private TextFileChange createTextChange(IStrategoTerm originalTerm, IStrategoTerm textReplaceTerm) {
final int startLocation=Tools.asJavaInt(termAt(textReplaceTerm, 0));
final int endLocation=Tools.asJavaInt(termAt(textReplaceTerm, 1));
final String resultText = Tools.asJavaString(termAt(textReplaceTerm, 2));
final IStrategoTerm originTerm = OriginAttachment.tryGetOrigin(originalTerm);
final IFile file = (IFile)SourceAttachment.getResource(originTerm);
TextFileChange textChange = new TextFileChange("", file);
textChange.setTextType(file.getFileExtension());
MultiTextEdit edit= new MultiTextEdit();
edit.addChild(new ReplaceEdit(startLocation, endLocation - startLocation, resultText));
textChange.setEdit(edit);
return textChange;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
d93e7ad4cf12426a1ee49b514bc5d4a97dd21446
|
bdcdcf52c63a1037786ac97fbb4da88a0682e0e8
|
/src/test/java/io/akeyless/client/model/CreateAuthMethodOIDCTest.java
|
213edd0b1a625af6d25cbe7700614401373c4889
|
[
"Apache-2.0"
] |
permissive
|
akeylesslabs/akeyless-java
|
6e37d9ec59d734f9b14e475ce0fa3e4a48fc99ea
|
cfb00a0e2e90ffc5c375b62297ec64373892097b
|
refs/heads/master
| 2023-08-03T15:06:06.802513
| 2023-07-30T11:59:23
| 2023-07-30T11:59:23
| 341,514,151
| 2
| 4
|
Apache-2.0
| 2023-07-11T08:57:17
| 2021-02-23T10:22:38
|
Java
|
UTF-8
|
Java
| false
| false
| 2,807
|
java
|
/*
* Akeyless API
* The purpose of this application is to provide access to Akeyless API.
*
* The version of the OpenAPI document: 2.0
* Contact: support@akeyless.io
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package io.akeyless.client.model;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
/**
* Model tests for CreateAuthMethodOIDC
*/
public class CreateAuthMethodOIDCTest {
private final CreateAuthMethodOIDC model = new CreateAuthMethodOIDC();
/**
* Model tests for CreateAuthMethodOIDC
*/
@Test
public void testCreateAuthMethodOIDC() {
// TODO: test CreateAuthMethodOIDC
}
/**
* Test the property 'accessExpires'
*/
@Test
public void accessExpiresTest() {
// TODO: test accessExpires
}
/**
* Test the property 'boundIps'
*/
@Test
public void boundIpsTest() {
// TODO: test boundIps
}
/**
* Test the property 'clientId'
*/
@Test
public void clientIdTest() {
// TODO: test clientId
}
/**
* Test the property 'clientSecret'
*/
@Test
public void clientSecretTest() {
// TODO: test clientSecret
}
/**
* Test the property 'forceSubClaims'
*/
@Test
public void forceSubClaimsTest() {
// TODO: test forceSubClaims
}
/**
* Test the property 'issuer'
*/
@Test
public void issuerTest() {
// TODO: test issuer
}
/**
* Test the property 'name'
*/
@Test
public void nameTest() {
// TODO: test name
}
/**
* Test the property 'password'
*/
@Test
public void passwordTest() {
// TODO: test password
}
/**
* Test the property 'token'
*/
@Test
public void tokenTest() {
// TODO: test token
}
/**
* Test the property 'uidToken'
*/
@Test
public void uidTokenTest() {
// TODO: test uidToken
}
/**
* Test the property 'uniqueIdentifier'
*/
@Test
public void uniqueIdentifierTest() {
// TODO: test uniqueIdentifier
}
/**
* Test the property 'username'
*/
@Test
public void usernameTest() {
// TODO: test username
}
}
|
[
"github@akeyless.io"
] |
github@akeyless.io
|
942ccddb5a77bc58accbf0ce90fece7273676ab7
|
1c97dc8c6ddeb71532085b0718135f1585c07346
|
/07.Model2MVCShop(URI,pattern)/src/main/java/com/model2/mvc/web/product/ProductController.java
|
f6995df77aeccd3751a84ec6c72701ea3cad609a
|
[] |
no_license
|
takseokwon/bitcamp-miniPJT
|
6799eeaabe0094c3b0f21e7a21199126ca6fb265
|
9afa0fb1d898e5dd5fb7283286dbef28815b53bf
|
refs/heads/master
| 2020-03-17T20:56:09.180089
| 2017-04-25T05:28:03
| 2017-04-25T05:28:03
| null | 0
| 0
| null | null | null | null |
UHC
|
Java
| false
| false
| 4,827
|
java
|
package com.model2.mvc.web.product;
import java.io.File;
import java.io.FileOutputStream;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.http.HttpSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
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.multipart.MultipartFile;
import com.model2.mvc.common.Page;
import com.model2.mvc.common.Search;
import com.model2.mvc.service.domain.Product;
import com.model2.mvc.service.product.ProductService;
import com.model2.mvc.service.review.ReviewService;
@Controller
@RequestMapping("/product/*")
public class ProductController {
@Autowired
@Qualifier("productServiceImpl")
private ProductService productService;
@Autowired
@Qualifier("reviewServiceImpl")
private ReviewService reviewService;
public ProductController() {
System.out.println(this.getClass());
}
@Value("#{commonProperties['pageUnit']?: 3}")
int pageUnit;
@Value("#{commonProperties['pageSize']?: 2}")
int pageSize;
@RequestMapping(value="addProduct",method=RequestMethod.POST)
public String addProduct(@ModelAttribute("product")Product product
,HttpSession session
) throws Exception{
product.setManuDate(product.getManuDate().replace("-", ""));
MultipartFile uploadfile = product.getUploadfile();
if (uploadfile != null) {
/* if이 없어서 그런가?
FileOutputStream fos;
byte fileData[] = product.getUploadfile().getBytes();
fos = new FileOutputStream(session.getServletContext().getRealPath("/") + "images\\uploadFiles\\" + product.getFileName());
fos.write(fileData);
fos.close();
*/
//이런식으로 파일명을 안받아서그런가?
String fileName = uploadfile.getOriginalFilename();
product.setFileName(fileName);
File file = new File(session.getServletContext().getRealPath("/")
+"images/uploadFiles/" + fileName);
uploadfile.transferTo(file);
}
productService.addProduct(product);
return "redirect:/product/listProduct?menu=manage";
}
@RequestMapping(value="getProduct",method=RequestMethod.GET)
public String getProduct(@RequestParam("prodNo")int prodNo
,HttpSession session
,Model model
) throws Exception{
Product product = productService.getProduct(prodNo);
product.setProdNo(prodNo);
model.addAttribute("product",product);
Map<Integer,String> viewListMap = new HashMap<Integer,String>();
if(session.getAttribute("viewListMap") != null){
viewListMap = (HashMap<Integer,String>)session.getAttribute("viewListMap");
}
viewListMap.put(prodNo,product.getProdName());
if(viewListMap.size()>6){
viewListMap.remove(6);
}
model.addAttribute("reviewList",reviewService.getReviewList(prodNo));
session.setAttribute("viewListMap", viewListMap);
System.out.println("#"+reviewService.getReviewList(prodNo));
return "forward:/product/getProduct.jsp";
}
@RequestMapping(value="updateProductView",method=RequestMethod.GET)
public String updateProductView(@RequestParam("prodNo")int prodNo
,Model model
)throws Exception{
model.addAttribute("product",productService.getProduct(prodNo));
return "forward:/product/updateProductView.jsp";
}
@RequestMapping(value="updateProduct",method=RequestMethod.POST)
public String updateProduct(@ModelAttribute("product")Product product
)throws Exception{
productService.updateProduct(product);
return "redirect:/product/listProduct?menu=manage";
}
@RequestMapping(value="listProduct")
public String listProduct(@ModelAttribute("search")Search search
,@RequestParam(value="viewSoldItem", defaultValue="off")String viewSoldItem
,Model model)throws Exception{
if(viewSoldItem.equals("on")){
search.setViewSoldItem(true);
}
if(search.getCurrentPage()==0){
search.setCurrentPage(1);
}
search.setPageSize(pageSize);
Map<String, Object> map = productService.getProductList(search);
Page resultPage = new Page(search.getCurrentPage()
, ((Integer)map.get("totalCount")).intValue(), pageUnit, pageSize);
model.addAttribute("resultPage",resultPage);
model.addAttribute("list",map.get("list"));
model.addAttribute("search",search);
return "forward:/product/listProduct.jsp";
}
}
|
[
"BitCamp@BitCamp-PC"
] |
BitCamp@BitCamp-PC
|
cd13ba34159b0f4a983b4a8724a4ffaae922ae9e
|
01d3faa1d5136e60bc4b69e5367409f9fa359b38
|
/src/main/java/libgdx/ui/services/game/achievements/AchievementsService.java
|
c2e0b26e2e70568d220e00f4ccc1e0d121be52d2
|
[] |
no_license
|
horeab/Hangman_tournament
|
3babcf6bff99fe15ecce53916ae1bd4c7cbc5dd0
|
d59a2c149048e74bf3ae4ea2bfc02c41f58d4eae
|
refs/heads/master
| 2020-06-05T09:43:06.617559
| 2019-09-02T14:53:31
| 2019-09-02T14:53:31
| 192,374,051
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,681
|
java
|
package libgdx.ui.services.game.achievements;
public class AchievementsService {
public int getTotalSteps(Integer totalSteps, Integer[] steps) {
int totalSumOfSteps = 0;
for (int step : steps) {
totalSumOfSteps = totalSumOfSteps + step;
if (totalSteps < totalSumOfSteps) {
return step;
}
}
return steps[steps.length - 1];
}
public int getFinishedStepsWithMaxLevel(Integer totalSteps, Integer[] steps) {
int totalSumOfSteps = 0;
int finishedSteps = 0;
for (int step : steps) {
totalSumOfSteps = totalSumOfSteps + step;
if (totalSteps >= totalSumOfSteps) {
finishedSteps++;
}
}
return finishedSteps;
}
public int getFinishedSteps(Integer totalSteps, Integer[] steps) {
int totalSumOfSteps = 0;
int finishedSteps = 0;
int i = 0;
while (totalSteps >= totalSumOfSteps) {
int step;
if (i < steps.length - 1) {
step = steps[i];
} else {
step = steps[steps.length - 1];
}
totalSumOfSteps = totalSumOfSteps + step;
if (totalSteps >= totalSumOfSteps) {
finishedSteps++;
}
i++;
}
return finishedSteps;
}
public int getCurrentSteps(Integer totalSteps, Integer[] steps) {
int totalSumOfSteps = 0;
for (int step : steps) {
totalSumOfSteps = totalSumOfSteps + step;
if (totalSumOfSteps - totalSteps > 0) {
return Math.abs(totalSumOfSteps - step - totalSteps);
}
}
int lastStep = steps[steps.length - 1];
while (totalSumOfSteps - totalSteps <= 0) {
totalSumOfSteps = totalSumOfSteps + lastStep;
}
return Math.abs(totalSumOfSteps - lastStep - totalSteps);
}
public int getCurrentStepsWithMaxLevel(Integer totalSteps, Integer[] steps) {
int totalSumOfSteps = 0;
for (int step : steps) {
totalSumOfSteps = totalSumOfSteps + step;
if (totalSumOfSteps - totalSteps > 0) {
return Math.abs(totalSumOfSteps - step - totalSteps);
}
}
return steps[steps.length - 1];
}
public boolean nextStepIsLevelUp(Integer totalSteps, Integer[] steps) {
return getTotalSteps(totalSteps, steps) - getCurrentSteps(totalSteps, steps) == 1;
}
public boolean currentStepIsLevelUp(Integer totalSteps, Integer[] steps) {
return nextStepIsLevelUp(totalSteps - 1, steps);
}
}
|
[
"horea.bucerzan@gmail.com"
] |
horea.bucerzan@gmail.com
|
f2d8f121459e8fafd674c4b8f38006b9a405be12
|
ce55aaf3d1c9933dd06e48c5ab96afaa4a26651e
|
/spring-study/spring_proxy/src/main/java/com/li/demo2/ProxyInvocationHandler.java
|
a3cd351764da3d31e7cbc9e8e91073a88785dd67
|
[] |
no_license
|
liyan234/SpringLeran
|
06af0f46d476a7990944da85697ef9d9e8917cb8
|
746ee6a8c242306fdd632df5afc24ffbfff47fc8
|
refs/heads/master
| 2023-04-01T02:43:35.509638
| 2021-04-09T14:58:28
| 2021-04-09T14:58:28
| 308,349,935
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,334
|
java
|
package com.li.demo2;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
// 自动生成代理类
public class ProxyInvocationHandler implements InvocationHandler {
// 被代理的接口
private Object target;
public void setTarget(Object target) {
this.target = target;
}
//生成代理类
/** Foo f = (Foo) Proxy.newProxyInstance(Foo.class.getClassLoader(),
new Class<?>[] { Foo.class },
handler); */
/** public static Object newProxyInstance(ClassLoader loader,
Class<?>[] interfaces,
InvocationHandler h)*/
public Object getProxy() {
return Proxy.newProxyInstance(this.getClass().getClassLoader(),
target.getClass().getInterfaces(), this);
}
// 被处理的代理实例 并返回结果
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
/**public Object invoke(Object obj, Object... args)
* 动态代理的本质,就是使用反射机制实现的*/
System.out.println("xxx");
System.out.println(method.getName());
Object ret = method.invoke(target, args);
System.out.println("yyy");
return ret;
}
}
|
[
"675672214@qq.com"
] |
675672214@qq.com
|
e39fc80ad45f00271536c92de37eb35878bc3f5f
|
f7402aec8935c4b82b17ae8fb0720e231196a4a3
|
/src/main/java/net/hexogendev/hexogen/api/world/WorldInfo.java
|
35fad5e9532c6562d54cd738cb5f5b2b7284d9d6
|
[
"MIT"
] |
permissive
|
HexogenDev/Hexogen-API
|
dbdb506c3b950da85e42b4cdba8600e0db8de014
|
3f21bf6933e2f7b1e6ee608aa19be1b0239b4da8
|
refs/heads/master
| 2020-12-03T02:01:10.100664
| 2015-12-26T07:55:20
| 2015-12-26T07:55:20
| 39,077,924
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,036
|
java
|
package net.hexogendev.hexogen.api.world;
public class WorldInfo {
private String name;
private String path;
private Environment environment;
private long seed;
private GameMode gameMode;
private WorldType type;
private boolean generateStructures;
public WorldInfo(String name, String path, Environment environment, long seed, GameMode gamemode, WorldType type, boolean generateStructures) {
this.name = name;
this.path = path;
this.environment = environment;
this.seed = seed;
this.gameMode = gamemode;
this.type = type;
this.generateStructures = generateStructures;
}
public String getName() {
return name;
}
public String getPath() {
return path;
}
public Environment getEnvironment() {
return environment;
}
public long getSeed() {
return seed;
}
public GameMode getDefaultGamemode() {
return gameMode;
}
public void setDefaultGamemode(GameMode mode) {
this.gameMode = mode;
}
public WorldType getWorldType() {
return type;
}
public void setWorldType(WorldType type) {
this.type = type;
}
public boolean canGenerateStructures() {
return generateStructures;
}
public void setGenerateStructures(boolean flag) {
this.generateStructures = flag;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((name == null) ? 0 : name.hashCode());
result = prime * result + ((path == null) ? 0 : path.hashCode());
result = prime * result + (int) (seed ^ (seed >>> 32));
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
WorldInfo other = (WorldInfo) obj;
if (name == null) {
if (other.name != null)
return false;
} else if (!name.equals(other.name))
return false;
if (path == null) {
if (other.path != null)
return false;
} else if (!path.equals(other.path))
return false;
if (seed != other.seed)
return false;
return true;
}
}
|
[
"beykerykt@gmail.com"
] |
beykerykt@gmail.com
|
14d6caea3e7e294fb223e18247e2e509df8f0164
|
eb97ee5d4f19d7bf028ae9a400642a8c644f8fe3
|
/tags/2008-10-29/seasar2-2.4.31/s2-tiger/src/test/java/org/seasar/framework/container/factory/Hoge19Base.java
|
487ccabbc5d0f24b58c84f8eab29811e33ae6566
|
[
"Apache-2.0"
] |
permissive
|
svn2github/s2container
|
54ca27cf0c1200a93e1cb88884eb8226a9be677d
|
625adc6c4e1396654a7297d00ec206c077a78696
|
refs/heads/master
| 2020-06-04T17:15:02.140847
| 2013-08-09T09:38:15
| 2013-08-09T09:38:15
| 10,850,644
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,139
|
java
|
/*
* Copyright 2004-2008 the Seasar Foundation and the Others.
*
* 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.seasar.framework.container.factory;
import javax.ejb.TransactionAttribute;
import javax.ejb.TransactionAttributeType;
/**
*
*/
@TransactionAttribute(TransactionAttributeType.SUPPORTS)
public class Hoge19Base {
/**
*
*/
public Hoge19Base() {
}
/**
*
*/
public void aMethod() {
}
/**
*
*/
public void bMethod() {
}
/**
*
*/
public void cMethod() {
}
}
|
[
"koichik@319488c0-e101-0410-93bc-b5e51f62721a"
] |
koichik@319488c0-e101-0410-93bc-b5e51f62721a
|
ee208420047cdd40ea87036192ec30c4ff5b3b9b
|
0f77c5ec508d6e8b558f726980067d1058e350d7
|
/1_39_120042/com/ankamagames/wakfu/common/game/item/gems/GemsUpgradeHelper.java
|
347b0e30dd929dc59758e57fec25f1f76fb97c45
|
[] |
no_license
|
nightwolf93/Wakxy-Core-Decompiled
|
aa589ebb92197bf48e6576026648956f93b8bf7f
|
2967f8f8fba89018f63b36e3978fc62908aa4d4d
|
refs/heads/master
| 2016-09-05T11:07:45.145928
| 2014-12-30T16:21:30
| 2014-12-30T16:21:30
| 29,250,176
| 5
| 5
| null | 2015-01-14T15:17:02
| 2015-01-14T15:17:02
| null |
UTF-8
|
Java
| false
| false
| 1,871
|
java
|
package com.ankamagames.wakfu.common.game.item.gems;
import com.ankamagames.wakfu.common.game.item.*;
public class GemsUpgradeHelper
{
public static final int HAMMER_ITEM_ID = 16164;
public static final int HAMMER_ITEM_2_ID = 18258;
private static final int KAMA_COST_FACTOR = 30;
private static final GemsUpgradeData[] UPGRADE_DATA_LIST;
private static double getKamaCostFactorFromRarity(final ItemRarity rarity) {
switch (rarity) {
case ADMIN: {
return 0.0;
}
case COMMON: {
return 0.2;
}
case UNUSUAL: {
return 0.4;
}
case RARE: {
return 0.6;
}
case MYTHIC: {
return 0.8;
}
default: {
return 1.0;
}
}
}
public static int getKamaNeeded(final GemsHolder gemmedItem, final byte currentLevel) {
return (int)(gemmedItem.getLevel() * (currentLevel + 2) * 30 * getKamaCostFactorFromRarity(gemmedItem.getRarity()));
}
public static GemsUpgradeData getNeededItems(final byte currentLevel) {
if (currentLevel < 0 || currentLevel >= GemsUpgradeHelper.UPGRADE_DATA_LIST.length) {
return null;
}
return GemsUpgradeHelper.UPGRADE_DATA_LIST[currentLevel];
}
static {
UPGRADE_DATA_LIST = new GemsUpgradeData[] { new GemsUpgradeData(1, ItemRarity.RARE), new GemsUpgradeData(1, ItemRarity.RARE), new GemsUpgradeData(2, ItemRarity.RARE), new GemsUpgradeData(2, ItemRarity.RARE), new GemsUpgradeData(2, ItemRarity.MYTHIC), new GemsUpgradeData(2, ItemRarity.MYTHIC), new GemsUpgradeData(2, ItemRarity.LEGENDARY), new GemsUpgradeData(2, ItemRarity.LEGENDARY), new GemsUpgradeData(2, ItemRarity.LEGENDARY) };
}
}
|
[
"totomakers@hotmail.fr"
] |
totomakers@hotmail.fr
|
846272e59b200bc6ecafadceff8ddfa54fe8de02
|
b863faa7e79a4b0ffabc726d3efaaf197b5ed736
|
/AllOnline/src/com/coomix/app/redpacket/util/RedPacketSlideShow.java
|
56e467b4688ee01f2bc09d7777cafdf97a093e8e
|
[] |
no_license
|
crisslee/pw
|
991bd837b21fd5c96b7f81cf512be4beb1f0e65b
|
6b1a5adb5f0bd9c1b83cc983086e149c8ea91ec6
|
refs/heads/master
| 2022-12-16T02:57:22.258713
| 2020-09-09T00:16:31
| 2020-09-09T00:16:31
| 292,913,172
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,072
|
java
|
package com.coomix.app.redpacket.util;
import java.io.Serializable;
/**
* Created by ssl
*
* @since 2017/3/31.
*/
public class RedPacketSlideShow implements Serializable {
private static final long serialVersionUID = 1L;
private int id; // 123,
private int type; // 0=原生,1=H5
private String name;
private String picurl;
private String jumpurl; //H5的是url,原生的是id
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPicurl() {
return picurl;
}
public void setPicurl(String picurl) {
this.picurl = picurl;
}
public String getJumpurl() {
return jumpurl;
}
public void setJumpurl(String jumpurl) {
this.jumpurl = jumpurl;
}
}
|
[
"1206656459@qq.com"
] |
1206656459@qq.com
|
4d2cc940f318667e9010be257d5f8dc78fc1c0fb
|
3fc503bed9e8ba2f8c49ebf7783bcdaa78951ba8
|
/TRAVACC_R5/ndc171facades/src/de/hybris/platform/ndcfacades/ndc/EnabledSysRecipientType.java
|
baa5826f636f8ff0e818e018f0f5cb5d46365433
|
[] |
no_license
|
RabeS/model-T
|
3e64b2dfcbcf638bc872ae443e2cdfeef4378e29
|
bee93c489e3a2034b83ba331e874ccf2c5ff10a9
|
refs/heads/master
| 2021-07-01T02:13:15.818439
| 2020-09-05T08:33:43
| 2020-09-05T08:33:43
| 147,307,585
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,239
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2017.08.04 at 02:01:34 PM IST
//
package de.hybris.platform.ndcfacades.ndc;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* A data type for Enabled System Message Recipient Role. Derived from EnabledSysMsgPartyCoreType.
*
* <p>Java class for EnabledSysRecipientType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="EnabledSysRecipientType">
* <complexContent>
* <extension base="{http://www.iata.org/IATA/EDIST/2017.1}EnabledSysMsgPartyCoreType">
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "EnabledSysRecipientType")
public class EnabledSysRecipientType
extends EnabledSysMsgPartyCoreType
{
}
|
[
"sebastian.rulik@gmail.com"
] |
sebastian.rulik@gmail.com
|
ac0b9a40939880bec291fc401b086ea124d1bc16
|
1c18616fb66d5d0316beb2df68676029b405c3dd
|
/src/main/java/students/ernests_subhankulovs/lesson_11/level_6/task_36/Book.java
|
5a9840d0fcfce5ba1a2d03c3f8f50ebaf9f60834
|
[] |
no_license
|
Vija-M/jg-java-1-online-spring-april-tuesday-2021
|
edb4c73cc4a13bdaa132bccca6a1c6d0088b2d5d
|
49817deb3052f24332442d2454932714915b50ad
|
refs/heads/main
| 2023-07-14T03:16:12.145252
| 2021-08-24T16:20:50
| 2021-08-24T16:20:50
| 399,513,003
| 2
| 0
| null | 2021-08-24T15:17:35
| 2021-08-24T15:17:34
| null |
UTF-8
|
Java
| false
| false
| 1,381
|
java
|
package students.ernests_subhankulovs.lesson_11.level_6.task_36;
import java.util.Objects;
class Book {
private Long id;
private String title;
private String author;
private String yearOfIssue;
Book(String author, String title) {
this.author = author;
this.title = title;
}
Book(String author, String title, String yearOfIssue) {
this.author = author;
this.title = title;
this.yearOfIssue = yearOfIssue;
}
public void setId(Long id) {
this.id = id;
}
public Long getId() {
return this.id;
}
public String getTitle() {
return this.title;
}
public String getAuthor() {
return this.author;
}
public String getYearOfIssue() {
return this.yearOfIssue;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Book book = (Book) o;
if (id != null) {
return id.equals(book.id) && title.equals(book.title) && author.equals(book.author);
}
else {
return title.equals(book.title) && author.equals(book.author);
}
}
@Override
public int hashCode() {
return Objects.hash(id, title, author);
}
}
|
[
"ernests.subhankulovs@gmail.com"
] |
ernests.subhankulovs@gmail.com
|
0d9d70a9cbe04a9d5c96af35a8c2c3d60d8cb6f2
|
dbe59da45f4cee95debb721141aeab16f44b4cac
|
/src/main/java/com/syuesoft/sell/model/XsSellCertificate.java
|
3f3e8173742a8b76e4330e9b696908df56e46796
|
[] |
no_license
|
tonyliu830204/UESoft
|
5a8a546107f2093ee920facf6d93eedd1affd248
|
9dd48ff19f40556d1892688f6426e4bfe68c7d10
|
refs/heads/master
| 2021-01-23T15:51:00.782632
| 2014-03-26T15:56:46
| 2014-03-26T15:56:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,443
|
java
|
package com.syuesoft.sell.model;
import java.io.Serializable;
import java.util.Date;
import com.syuesoft.model.BaseBean;
public class XsSellCertificate extends BaseBean implements Serializable{
private Integer certificateId; //编号
private Integer xsCarId; //车辆档案信息编号
private Integer receiptId; //承兑汇票编号
private String xsCarCertificate; //合格证
private Integer xsCarCertificateState; //合格证状态
private Date redemptionDate; //赎回日期
private String certificatePerson; //领证人
private Date certificateDate; //领证日期
private String remark; //备注
private XsChilddictionary xsSellCertificateState;//合格证状态
public XsChilddictionary getXsSellCertificateState() {
return xsSellCertificateState;
}
public void setXsSellCertificateState(XsChilddictionary xsSellCertificateState) {
this.xsSellCertificateState = xsSellCertificateState;
}
public Integer getCertificateId() {
return certificateId;
}
public void setCertificateId(Integer certificateId) {
this.certificateId = certificateId;
}
public Integer getXsCarId() {
return xsCarId;
}
public void setXsCarId(Integer xsCarId) {
this.xsCarId = xsCarId;
}
public Integer getReceiptId() {
return receiptId;
}
public void setReceiptId(Integer receiptId) {
this.receiptId = receiptId;
}
public String getXsCarCertificate() {
return xsCarCertificate;
}
public void setXsCarCertificate(String xsCarCertificate) {
this.xsCarCertificate = xsCarCertificate;
}
public Integer getXsCarCertificateState() {
return xsCarCertificateState;
}
public void setXsCarCertificateState(Integer xsCarCertificateState) {
this.xsCarCertificateState = xsCarCertificateState;
}
public Date getRedemptionDate() {
return redemptionDate;
}
public void setRedemptionDate(Date redemptionDate) {
this.redemptionDate = redemptionDate;
}
public String getCertificatePerson() {
return certificatePerson;
}
public void setCertificatePerson(String certificatePerson) {
this.certificatePerson = certificatePerson;
}
public Date getCertificateDate() {
return certificateDate;
}
public void setCertificateDate(Date certificateDate) {
this.certificateDate = certificateDate;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
}
|
[
"liweinan0423@gmail.com"
] |
liweinan0423@gmail.com
|
7f817444f9ac21056bb2318f9b4fd65e2c66eb63
|
ae9858d27424530eec715e4cb0f88bb7ea680307
|
/gen/intellij/haskell/psi/impl/HaskellExpressionImpl.java
|
4dc52fcdb098accab161bbbb26f3a6b5bc51da7f
|
[
"Apache-2.0"
] |
permissive
|
ndmitchell/intellij-haskell
|
b17372e4be6309e6d9c0380ac26e461ff82a72d6
|
1dfde985156ac3f36fb3d7787e15fc8a68718386
|
refs/heads/master
| 2023-08-24T14:28:06.314626
| 2018-06-29T21:06:09
| 2018-06-29T21:06:09
| 139,190,494
| 0
| 0
|
Apache-2.0
| 2018-06-29T20:00:43
| 2018-06-29T20:00:43
| null |
UTF-8
|
Java
| false
| true
| 1,405
|
java
|
// This is a generated file. Not intended for manual editing.
package intellij.haskell.psi.impl;
import com.intellij.lang.ASTNode;
import com.intellij.psi.PsiElementVisitor;
import com.intellij.psi.util.PsiTreeUtil;
import intellij.haskell.psi.*;
import org.jetbrains.annotations.NotNull;
import java.util.List;
public class HaskellExpressionImpl extends HaskellCompositeElementImpl implements HaskellExpression {
public HaskellExpressionImpl(ASTNode node) {
super(node);
}
public void accept(@NotNull HaskellVisitor visitor) {
visitor.visitExpression(this);
}
public void accept(@NotNull PsiElementVisitor visitor) {
if (visitor instanceof HaskellVisitor) accept((HaskellVisitor)visitor);
else super.accept(visitor);
}
@Override
@NotNull
public List<HaskellInlinelikePragma> getInlinelikePragmaList() {
return PsiTreeUtil.getChildrenOfTypeAsList(this, HaskellInlinelikePragma.class);
}
@Override
@NotNull
public List<HaskellQName> getQNameList() {
return PsiTreeUtil.getChildrenOfTypeAsList(this, HaskellQName.class);
}
@Override
@NotNull
public List<HaskellReservedId> getReservedIdList() {
return PsiTreeUtil.getChildrenOfTypeAsList(this, HaskellReservedId.class);
}
@Override
@NotNull
public List<HaskellSccPragma> getSccPragmaList() {
return PsiTreeUtil.getChildrenOfTypeAsList(this, HaskellSccPragma.class);
}
}
|
[
"rikvdkleij@gmail.com"
] |
rikvdkleij@gmail.com
|
fddfd8b044ab435e9284e006c2c29298f46cb9ba
|
c32e30b903e3b58454093cd8ee5c7bba7fb07365
|
/source/Class_34310.java
|
a122ce0f6e007d46c6c4d22f3df356a79dc05ca1
|
[] |
no_license
|
taiwan902/bp-src
|
0ee86721545a647b63848026a995ddb845a62969
|
341a34ebf43ab71bea0becf343795e241641ef6a
|
refs/heads/master
| 2020-12-20T09:17:11.506270
| 2020-01-24T15:15:30
| 2020-01-24T15:15:30
| 236,025,046
| 1
| 1
| null | 2020-01-24T15:10:30
| 2020-01-24T15:10:29
| null |
UTF-8
|
Java
| false
| false
| 365
|
java
|
/*
* Decompiled with CFR 0.145.
*/
import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles;
public class Class_34310
extends Exception {
public Class_34310(String string) {
super(string);
}
private void Method_34311() {
MethodHandle methodHandle = MethodHandles.constant(String.class, "MC|BlazingPack");
}
}
|
[
"szymex73@gmail.com"
] |
szymex73@gmail.com
|
03c0d74403d940c0a863689d66530565cc631b79
|
c99656859d1272239fef6bcba17838e6f362189a
|
/Commonbase/src/main/java/com/hexun/base/ui/IBase.java
|
32884fa8f959fc69bfe5afbc2efadd92a795d4b7
|
[] |
no_license
|
1136346879/phonenum
|
61802f8f328397847eaa17a8f4e79c6723efe23d
|
95e6051a94df208b8c4bc1b86d8b4c344a3e5945
|
refs/heads/master
| 2020-06-02T23:25:08.488681
| 2019-06-18T09:31:08
| 2019-06-18T09:31:08
| 191,342,463
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,283
|
java
|
package com.hexun.base.ui;
import android.content.res.Resources;
import android.support.annotation.IdRes;
import android.support.annotation.LayoutRes;
import android.view.View;
import io.reactivex.disposables.Disposable;
/**
* 作者: shaoshuai
* 时间: 2017/10/17 11:17
* 电子邮箱:
* 描述:
*/
public interface IBase {
/**
* 初始化view
*/
void initView();
/**
* 初始化数据
*/
void initData();
/**
* 初始化监听
*/
void initListener();
/**
* 获取Content的View id
*
* @return int{@LayoutRes}
*/
@LayoutRes
int getContentViewResources();
/**
* 无需强转的findView查找方法
*
* @param resourceId 资源id
* @param <E> 返回类型
* @return view
* @throws Resources.NotFoundException 异常时抛出资源未找到
*/
<E extends View> E findView(@IdRes int resourceId) throws Resources.NotFoundException;
/**
* 添加RxJava disposable 以方便回收
*
* @param disposable
*/
void addDisposables(Disposable disposable);
/**
* 显示加载页面
*/
void showLoadingError();
/**
* 移除加载异常
*/
void removeLoadingError();
}
|
[
"1136346879@qq.com"
] |
1136346879@qq.com
|
eed33897ae67665ba07463aa73defbef54de5466
|
9d1870a895c63f540937f04a6285dd25ada5e52a
|
/chromecast-app-reverse-engineering/src/from-jd-gui/mm.java
|
047c8aef27d67da656215f166359b240455dc087
|
[] |
no_license
|
Churritosjesus/Chromecast-Reverse-Engineering
|
572aa97eb1fd65380ca0549b4166393505328ed4
|
29fae511060a820f2500a4e6e038dfdb591f4402
|
refs/heads/master
| 2023-06-04T10:27:15.869608
| 2015-10-27T10:43:11
| 2015-10-27T10:43:11
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 208
|
java
|
@Deprecated
public class mm
extends nf
{}
/* Location: C:\DEV\android\dex2jar-2.1-SNAPSHOT\classes-dex2jar.jar!\mm.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"v.richomme@gmail.com"
] |
v.richomme@gmail.com
|
e7bea9703020cd8356861b262c044bb14779adb7
|
c0f29b1b34f72e1f1435a043d1ed870c3e8d3729
|
/Chapter4/StackWithMin.java
|
f8a0fa8d5d0b2e1b8abdb09b57eb19a920182e36
|
[] |
no_license
|
wylu/Offer
|
5f6ea50bd9aa930d8982e84f4a583f64bdf39783
|
995d0c64318f4b996339f6790d44b4db6327db0b
|
refs/heads/master
| 2020-04-05T04:19:07.286519
| 2019-01-13T07:31:42
| 2019-01-13T07:31:42
| 156,546,329
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 692
|
java
|
package Offer.Chapter4;
import java.util.LinkedList;
public class StackWithMin {
private LinkedList<Integer> dataStack = new LinkedList<>();
private LinkedList<Integer> minStack = new LinkedList<>();
public void push(int num) {
dataStack.push(num);
if (minStack.isEmpty()) minStack.push(num);
else {
int curMin = minStack.peek();
minStack.push((num < curMin) ? num : curMin);
}
}
public void pop() {
dataStack.pop();
minStack.pop();
}
public int top() {
return dataStack.peek();
}
public int min() {
return minStack.peek();
}
}
|
[
"158677478@qq.com"
] |
158677478@qq.com
|
7fc450d77d3771c8468a9c196d9d2ca454f00dfd
|
c3874568d40c72df3d483c73a9ae32d010db2d8a
|
/src/com/pauldavdesign/mineauz/minigames/events/EndTeamMinigameEvent.java
|
b05c9df386e8891e28c9e9a3fd82ad0932a0ad76
|
[] |
no_license
|
jacksmack101/Minigames
|
b80657a0ff6562b3e7108ec44b6ed51100ef206f
|
03d42220d3236a7365280c0de9a891630e482b12
|
refs/heads/master
| 2021-01-21T08:15:43.611055
| 2014-02-17T03:14:17
| 2014-02-17T03:14:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,714
|
java
|
package com.pauldavdesign.mineauz.minigames.events;
import java.util.ArrayList;
import java.util.List;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import com.pauldavdesign.mineauz.minigames.MinigamePlayer;
import com.pauldavdesign.mineauz.minigames.minigame.Minigame;
public class EndTeamMinigameEvent extends Event{
private static final HandlerList handlers = new HandlerList();
private List<MinigamePlayer> losingPlayers = new ArrayList<MinigamePlayer>();
private List<MinigamePlayer> winningPlayers = new ArrayList<MinigamePlayer>();
private Minigame minigame;
private int winningTeam;
private boolean cancelled = false;
public EndTeamMinigameEvent(List<MinigamePlayer> losers, List<MinigamePlayer> winners, Minigame mgm, int winteam){
losingPlayers.addAll(losers);
winningPlayers.addAll(winners);
minigame = mgm;
winningTeam = winteam;
}
public List<MinigamePlayer> getLosingPlayers(){
return losingPlayers;
}
public void setLosingPlayers(List<MinigamePlayer> losers){
losingPlayers = losers;
}
public List<MinigamePlayer> getWinnningPlayers(){
return winningPlayers;
}
public void setWinningPlayers(List<MinigamePlayer> winners){
winningPlayers = winners;
}
public int getWinningTeamInt(){
return winningTeam;
}
public void setWinningTeamInt(int winner){
winningTeam = winner;
}
public Minigame getMinigame(){
return minigame;
}
public boolean isCancelled(){
return cancelled;
}
public void setCancelled(boolean cancelled){
this.cancelled = cancelled;
}
@Override
public HandlerList getHandlers() {
return handlers;
}
public static HandlerList getHandlerList() {
return handlers;
}
}
|
[
"paul.dav.1991@gmail.com"
] |
paul.dav.1991@gmail.com
|
7140abd254dd174f978f5b6466fb78bfd274a5ee
|
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
|
/crash-reproduction-ws/results/XRENDERING-418-8-24-Single_Objective_GGA-WeightedSum/org/xwiki/rendering/listener/chaining/AbstractChainingListener_ESTest_scaffolding.java
|
972a1705a6bf6bfe9c8d82cf5ba7722ea7777b6c
|
[
"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
| 466
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Tue Mar 31 06:32:20 UTC 2020
*/
package org.xwiki.rendering.listener.chaining;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class AbstractChainingListener_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
3a6522b68bffa351c4c713e8b8b4f2944d495196
|
80b28f5d86d41c4b8a76e1930944447ccda4f934
|
/src/main/java/com/mongo/test/repository/helper/FieldName.java
|
5362cc0fbc8ff4f5adf94afe5059d042fe790296
|
[] |
no_license
|
ginosian/mongo-test
|
5fdf52e2f9cea012ae3363b02d35ff9b56018aa9
|
24eef9a3ba43e665ec35cfbf607ea74f4ac625a4
|
refs/heads/master
| 2020-04-02T03:55:58.690018
| 2018-10-22T07:13:19
| 2018-10-22T07:13:19
| 153,991,454
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,260
|
java
|
package com.mongo.test.repository.helper;
public class FieldName {
private static final String DELIMITER = ".";
private static final String ID_FIELD_NAME = "_id";
private static final String API_ID_FIELD_NAME = "api_id";
private static final String COUNTRIES_FIELD_NAME = "countries";
private static final String POSITIONS_FIELD_NAME = "positions";
private static final String POSITIONS_POSITION_FIELD_NAME = "position";
private static final String POSITIONS_DATE_FIELD_NAME = "date";
public static String getCountriesFieldName() {
return String.join(
DELIMITER,
COUNTRIES_FIELD_NAME
);
}
public static String getPositionsFieldName() {
return String.join(
DELIMITER,
POSITIONS_FIELD_NAME
);
}
public static String getPositionFieldName(){
return String.join(
DELIMITER,
getPositionsFieldName(),
POSITIONS_POSITION_FIELD_NAME
);
}
public static String getPositionDateFieldName(){
return String.join(
DELIMITER,
getPositionsFieldName(),
POSITIONS_DATE_FIELD_NAME
);
}
}
|
[
"marta.ginosian@gmail.com"
] |
marta.ginosian@gmail.com
|
228a77384f8fbc8f439807292aa866f032acaa79
|
c34c16c923802c7bd63ba7666da7406ea179c8db
|
/百联-android-20210807/az/skWeiChatBaidu/src/main/java/com/ydd/zhichat/wxapi/EventUpdateBandAccount.java
|
ad15bb38250192b59cdea7395349f83eafaa007d
|
[] |
no_license
|
xeon-ye/bailian
|
36f322b40a4bc3a9f4cc6ad76e95efe3216258ed
|
ec84ac59617015a5b7529845f551d4fa136eef4e
|
refs/heads/main
| 2023-06-29T06:12:53.074219
| 2021-08-07T11:56:38
| 2021-08-07T11:56:38
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 243
|
java
|
package com.ydd.zhichat.wxapi;
public class EventUpdateBandAccount {
public String result;
public String msg;
public EventUpdateBandAccount(String result, String ok) {
this.result = result;
this.msg = ok;
}
}
|
[
"xiexun6943@gmail.com"
] |
xiexun6943@gmail.com
|
62dca1760626a1a7df82310d3533ac9bc39a0598
|
fe2ef5d33ed920aef5fc5bdd50daf5e69aa00ed4
|
/callcenter/src/et/bo/pcc/operatorlisten/impl/OperatorListenSearch.java
|
35005c3c787816f48a85f04a955a4664ed2425e6
|
[] |
no_license
|
sensui74/legacy-project
|
4502d094edbf8964f6bb9805be88f869bae8e588
|
ff8156ae963a5c61575ff34612c908c4ccfc219b
|
refs/heads/master
| 2020-03-17T06:28:16.650878
| 2016-01-08T03:46:00
| 2016-01-08T03:46:00
| null | 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 1,592
|
java
|
/**
* @(#)OperatorListenSearch.java Oct 8, 2006 4:15:25 PM
* 。
*
*/
package et.bo.pcc.operatorlisten.impl;
import org.hibernate.criterion.DetachedCriteria;
import org.hibernate.criterion.Expression;
import et.po.PoliceCallin;
import et.po.SysGroup;
import et.po.SysUser;
import excellence.common.page.PageInfo;
import excellence.framework.base.dto.IBaseDTO;
import excellence.framework.base.query.MyQuery;
import excellence.framework.base.query.impl.MyQueryImpl;
/**
* @author zhang
* @version Oct 8, 2006
* @see
*/
public class OperatorListenSearch extends MyQueryImpl{
/**
* @describe 查询座席监控
* @param 类型 InemailInfo inemailInfo
* @return 类型
*
*/
public MyQuery searchOperatorListen(IBaseDTO dto,PageInfo pi) {
MyQuery mq = new MyQueryImpl();
DetachedCriteria dc = DetachedCriteria.forClass(PoliceCallin.class);
String usernum = (String)dto.get("operator");
if (usernum!=null&&!usernum.trim().equals("")) {
dc.add(Expression.eq("operator", usernum));
}
mq.setDetachedCriteria(dc);
mq.setFirst(pi.getBegin());
mq.setFetch(pi.getPageSize());
return mq;
}
/**
* @describe 座席员信息
* @param 类型 InemailInfo inemailInfo
* @return 类型
*
*/
public MyQuery searchUserInfo(SysGroup sg) {
MyQuery mq = new MyQueryImpl();
DetachedCriteria dc = DetachedCriteria.forClass(SysUser.class);
dc.add(Expression.eq("sysGroup", sg));
mq.setDetachedCriteria(dc);
return mq;
}
}
|
[
"wow_fei@163.com"
] |
wow_fei@163.com
|
ed04b654416ad93f285867e7c30068a268a7d119
|
a4a51084cfb715c7076c810520542af38a854868
|
/src/main/java/com/salesforce/android/chat/core/internal/model/ChatMessageModel.java
|
f773bf4f36c22c6993bdd2bf358fb24ceefbb3c8
|
[] |
no_license
|
BharathPalanivelu/repotest
|
ddaf56a94eb52867408e0e769f35bef2d815da72
|
f78ae38738d2ba6c9b9b4049f3092188fabb5b59
|
refs/heads/master
| 2020-09-30T18:55:04.802341
| 2019-12-02T10:52:08
| 2019-12-02T10:52:08
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 809
|
java
|
package com.salesforce.android.chat.core.internal.model;
import com.salesforce.android.chat.core.model.ChatMessage;
import java.util.Date;
class ChatMessageModel implements ChatMessage {
private final String mAgentId;
private final String mAgentName;
private final String mText;
private final Date mTimestamp;
ChatMessageModel(String str, String str2, String str3, Date date) {
this.mAgentName = str2;
this.mAgentId = str;
this.mText = str3;
this.mTimestamp = date;
}
public String getAgentId() {
return this.mAgentId;
}
public String getAgentName() {
return this.mAgentName;
}
public String getText() {
return this.mText;
}
public Date getTimestamp() {
return this.mTimestamp;
}
}
|
[
"noiz354@gmail.com"
] |
noiz354@gmail.com
|
b27622db3bc5bdc575663a0b65a328f2435a165a
|
c017d7f8bfa77d19c455925476fbf91e8c41b7a0
|
/src/main/java/com/amazon/opendistro/elasticsearch/performanceanalyzer/rca/framework/api/metrics/ThreadPool_RejectedReqs.java
|
0ba6133f0df78e94756f7fbfc89a1b7fb3be8185
|
[
"Apache-2.0"
] |
permissive
|
YANG-DB/prefmon-open-distro
|
6843dcb973f748e5bfbcee343791cbb59d9f8bea
|
b36aa558b7d11d52b376f5ae639606e317d06c77
|
refs/heads/main
| 2023-01-22T09:19:21.648982
| 2020-11-15T14:39:24
| 2020-11-15T14:39:24
| 313,011,810
| 1
| 0
|
Apache-2.0
| 2020-11-15T11:02:22
| 2020-11-15T11:02:10
| null |
UTF-8
|
Java
| false
| false
| 1,134
|
java
|
/*
* Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* or in the "license" file accompanying this file. This file 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.amazon.opendistro.elasticsearch.performanceanalyzer.rca.framework.api.metrics;
import com.amazon.opendistro.elasticsearch.performanceanalyzer.metrics.AllMetrics;
import com.amazon.opendistro.elasticsearch.performanceanalyzer.rca.framework.api.Metric;
public class ThreadPool_RejectedReqs extends Metric {
public static final String NAME = AllMetrics.ThreadPoolValue.THREADPOOL_REJECTED_REQS.toString();
public ThreadPool_RejectedReqs(long evaluationIntervalSeconds) {
super(NAME, evaluationIntervalSeconds);
}
}
|
[
"yang.db.dev@gmail.com"
] |
yang.db.dev@gmail.com
|
d6ec872f48aa7cf45d64dbcee4982ac1647eab6f
|
5582e15960def1fc8e31f16747f982c7a0ba557d
|
/ekube-plugin/src/main/java/de/jcup/ekube/core/DefaultEKubeContext.java
|
4f62613f1ae11795a053d1d0a046530d36d6ec2a
|
[
"Apache-2.0"
] |
permissive
|
de-jcup/ekube
|
b79ae85cc56638d5a605b1a42c3499754593ce6a
|
195f80ec6606998db92271a11e3d98da3b9f104f
|
refs/heads/master
| 2021-06-15T05:23:16.043566
| 2021-03-22T16:19:01
| 2021-03-22T16:19:01
| 158,644,394
| 4
| 1
|
Apache-2.0
| 2018-11-25T01:33:06
| 2018-11-22T04:59:16
|
Java
|
UTF-8
|
Java
| false
| false
| 1,856
|
java
|
/*
* Copyright 2019 Albert Tregnaghi
*
* 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 de.jcup.ekube.core;
public class DefaultEKubeContext implements EKubeContext {
private ErrorHandler errorHandler;
private EKubeConfiguration configuration;
private EKubeProgressHandler progressHandler;
private SafeExecutor executor;
public DefaultEKubeContext(ErrorHandler errorHandler, EKubeConfiguration configuration) {
this(errorHandler, configuration, null);
}
public DefaultEKubeContext(ErrorHandler errorHandler, EKubeConfiguration configuration, EKubeProgressHandler progressHandler) {
this.errorHandler = errorHandler;
this.configuration = configuration;
if (progressHandler == null) {
this.progressHandler = new NullProgressHandler();
} else {
this.progressHandler = progressHandler;
}
this.executor = new DefaultSafeExecutor();
}
@Override
public ErrorHandler getErrorHandler() {
return errorHandler;
}
@Override
public EKubeConfiguration getConfiguration() {
return configuration;
}
@Override
public EKubeProgressHandler getProgressHandler() {
return progressHandler;
}
@Override
public SafeExecutor getExecutor() {
return executor;
}
}
|
[
"albert.tregnaghi@gmail.com"
] |
albert.tregnaghi@gmail.com
|
d38df6e128d92bf9e5327d5fb74ecc378bbcdf14
|
bc794d54ef1311d95d0c479962eb506180873375
|
/kerencourrier/kerencourrier-core/src/main/java/com/keren/courrier/core/ifaces/archivage/LiasseDocumentManager.java
|
464f674dd990aaebb1efb8c2c8240b8787ea6202
|
[] |
no_license
|
Teratech2018/Teratech
|
d1abb0f71a797181630d581cf5600c50e40c9663
|
612f1baf9636034cfa5d33a91e44bbf3a3f0a0cb
|
refs/heads/master
| 2021-04-28T05:31:38.081955
| 2019-04-01T08:35:34
| 2019-04-01T08:35:34
| 122,177,253
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 488
|
java
|
package com.keren.courrier.core.ifaces.archivage;
import com.bekosoftware.genericmanagerlayer.core.ifaces.GenericManager;
import com.keren.courrier.model.archivage.LiasseDocument;
/**
* Interface etendue par les interfaces locale et remote du manager
* @since Tue Aug 28 09:06:49 WAT 2018
*
*/
public interface LiasseDocumentManager
extends GenericManager<LiasseDocument, Long>
{
public final static String SERVICE_NAME = "LiasseDocumentManager";
}
|
[
"wntchuente@gmail.com"
] |
wntchuente@gmail.com
|
ce6992689e92ceed6439c2f180e80eed2d214f7d
|
a5d01febfd8d45a61f815b6f5ed447e25fad4959
|
/Source Code/5.5.1/sources/io/fabric/sdk/android/services/b/i.java
|
19c2995d4af936af35f8d74d6db5de9340bd78c4
|
[] |
no_license
|
kkagill/Decompiler-IQ-Option
|
7fe5911f90ed2490687f5d216cb2940f07b57194
|
c2a9dbbe79a959aa1ab8bb7a89c735e8f9dbc5a6
|
refs/heads/master
| 2020-09-14T20:44:49.115289
| 2019-11-04T06:58:55
| 2019-11-04T06:58:55
| 223,236,327
| 1
| 0
| null | 2019-11-21T18:17:17
| 2019-11-21T18:17:16
| null |
UTF-8
|
Java
| false
| false
| 708
|
java
|
package io.fabric.sdk.android.services.b;
import android.content.Context;
import io.fabric.sdk.android.services.common.CommonUtils;
/* compiled from: TimeBasedFileRollOverRunnable */
public class i implements Runnable {
private final Context context;
private final e eon;
public i(Context context, e eVar) {
this.context = context;
this.eon = eVar;
}
public void run() {
try {
CommonUtils.H(this.context, "Performing time based file roll over.");
if (!this.eon.gB()) {
this.eon.gC();
}
} catch (Throwable e) {
CommonUtils.a(this.context, "Failed to roll over file", e);
}
}
}
|
[
"yihsun1992@gmail.com"
] |
yihsun1992@gmail.com
|
899af932b81ad86a9f73a00ffbee4f8f96c21d10
|
559ea64c50ae629202d0a9a55e9a3d87e9ef2072
|
/com/kenai/jbosh/AttrSessionID.java
|
44bdb001d45dad5c4cbddf98d1069ae03165abf1
|
[] |
no_license
|
CrazyWolf2014/VehicleBus
|
07872bf3ab60756e956c75a2b9d8f71cd84e2bc9
|
450150fc3f4c7d5d7230e8012786e426f3ff1149
|
refs/heads/master
| 2021-01-03T07:59:26.796624
| 2016-06-10T22:04:02
| 2016-06-10T22:04:02
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 253
|
java
|
package com.kenai.jbosh;
final class AttrSessionID extends AbstractAttr<String> {
private AttrSessionID(String str) {
super(str);
}
static AttrSessionID createFromString(String str) {
return new AttrSessionID(str);
}
}
|
[
"ahhmedd16@hotmail.com"
] |
ahhmedd16@hotmail.com
|
e9d55d2689e97813fa7b2a44521bdd19c0c88513
|
d018a686f37a0c2d8b08f9d675facddb164edb94
|
/examples/statistics/goofs/src/main/java/goofs/fs/DiskFile.java
|
ac21164de8676398cd36c576bd7b82ea98f44cb9
|
[] |
no_license
|
Mestway/Patl4J
|
9b7edc204afb3c55763b66254561d8390237d87f
|
b8985fdcc818fdb78c14e1831382f15475e186c0
|
refs/heads/master
| 2020-12-24T05:54:50.632299
| 2016-07-22T09:07:50
| 2016-07-22T09:07:50
| 29,904,381
| 8
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,134
|
java
|
package goofs.fs;
import java.io.BufferedOutputStream;
import java.io.ByteArrayOutputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.RandomAccessFile;
import java.nio.ByteBuffer;
public abstract class DiskFile extends File {
protected java.io.File disk;
public DiskFile(Dir parent, String name, int mode) throws Exception {
super(parent, name, mode, "");
disk = java.io.File.createTempFile("goofs", null);
disk.deleteOnExit();
}
public java.io.File getDisk() {
return disk;
}
public int getSize() {
return (int) getDisk().length();
}
public byte[] getContent() {
byte[] result = null;
ByteArrayOutputStream baos = new ByteArrayOutputStream();
byte[] buf = new byte[1024];
try {
FileInputStream fis = new FileInputStream(getDisk());
while (fis.read(buf) != -1) {
baos.write(buf);
}
result = baos.toByteArray();
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
baos.close();
} catch (Exception e) {
e.printStackTrace();
}
}
return result;
}
@Override
public void truncate(long size) {
RandomAccessFile raf = null;
try {
raf = new RandomAccessFile(getDisk(), "rw");
raf.setLength(size);
} catch (Exception e) {
e.printStackTrace();
} finally {
if (raf != null) {
try {
raf.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
public void setContent(byte[] content) {
try {
BufferedOutputStream bos = new BufferedOutputStream(
new FileOutputStream(getDisk()));
bos.write(content);
bos.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
public void setContent(InputStream is) throws Exception {
FileOutputStream fos = new FileOutputStream(getDisk());
try {
byte[] buff = new byte[1024];
int bytesRead = 0;
while ((bytesRead = is.read(buff)) != -1) {
fos.write(buff, 0, bytesRead);
}
} finally {
fos.close();
is.close();
}
}
public int read(ByteBuffer buf, long offset) {
RandomAccessFile raf = null;
try {
raf = new RandomAccessFile(getDisk(), "r");
raf.seek(offset);
byte[] chunk = new byte[Math.min(buf.remaining(), getSize()
- (int) offset)];
raf.read(chunk);
buf.put(chunk);
} catch (Exception e) {
e.printStackTrace();
} finally {
if (raf != null) {
try {
raf.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
return 0;
}
public int write(boolean isWritepage, ByteBuffer buf, long offset) {
RandomAccessFile raf = null;
try {
byte[] chunk = new byte[buf.remaining()];
raf = new RandomAccessFile(getDisk(), "rw");
raf.seek(offset);
buf.get(chunk);
raf.write(chunk);
} catch (Exception e) {
e.printStackTrace();
} finally {
if (raf != null) {
try {
raf.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
return 0;
}
@Override
public void remove() {
super.remove();
getDisk().delete();
}
}
|
[
"xgd_smileboy@163.com"
] |
xgd_smileboy@163.com
|
4405cbd535beee2e287493c1f7a8d27293d2f6c3
|
ce7f089378d817e242793649785b097c9be3f96b
|
/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set11/orc/Card11_129.java
|
1fb2bec227cd298cd91f6d3aa03ac944fd856841
|
[] |
no_license
|
TheSkyGold/gemp-lotr
|
aaba1f461a3d9237d12ca340a7e899b00e4151e4
|
aab299c87fc9cabd10b284c25b699f10a84fe622
|
refs/heads/master
| 2021-01-11T07:39:27.678795
| 2014-11-21T00:44:25
| 2014-11-21T00:44:25
| 32,382,766
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,631
|
java
|
package com.gempukku.lotro.cards.set11.orc;
import com.gempukku.lotro.cards.AbstractMinion;
import com.gempukku.lotro.cards.TriggerConditions;
import com.gempukku.lotro.cards.effects.ExertCharactersEffect;
import com.gempukku.lotro.common.CardType;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Race;
import com.gempukku.lotro.filters.Filters;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.actions.RequiredTriggerAction;
import com.gempukku.lotro.logic.timing.EffectResult;
import java.util.Collections;
import java.util.List;
/**
* Set: Shadows
* Side: Shadow
* Culture: Orc
* Twilight Cost: 3
* Type: Minion • Orc
* Strength: 9
* Vitality: 2
* Site: 4
* Game Text: Each time this minion is assigned to skirmish a companion who has resistance 5 or less, exert that
* companion.
*/
public class Card11_129 extends AbstractMinion {
public Card11_129() {
super(3, 9, 2, 4, Race.ORC, Culture.ORC, "Mountain Orc");
}
@Override
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (TriggerConditions.assignedAgainst(game, effectResult, null, Filters.and(CardType.COMPANION, Filters.maxResistance(5)), self)) {
RequiredTriggerAction action = new RequiredTriggerAction(self);
action.appendEffect(
new ExertCharactersEffect(action, self, Filters.assignedAgainst(self)));
return Collections.singletonList(action);
}
return null;
}
}
|
[
"marcins78@gmail.com@eb7970ca-0f6f-de4b-2938-835b230b9d1f"
] |
marcins78@gmail.com@eb7970ca-0f6f-de4b-2938-835b230b9d1f
|
b0578ad9da3ff145a1300092d048013832c26123
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/3/3_efe686ee9cec4e1b53f32dd5da5f949ddd1b2e46/Run/3_efe686ee9cec4e1b53f32dd5da5f949ddd1b2e46_Run_s.java
|
e0cbb256e30c7588ccfe73d3c596d859cd4a58a4
|
[] |
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
| 367
|
java
|
package org.noip.evan1026;
import javax.swing.JFrame;
public class Run {
public static void main(String[] args) {
DrawingPanel form = new DrawingPanel();
JFrame frame = new JFrame("Bouncy Balls");
frame.setSize(600, 600);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.add(form);
frame.setVisible(true);
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
44b4283ff5744ee36afe86c112aa82ad785fb49d
|
f47723c0ccde646a5a348dc96a546c566c313899
|
/src/main/java/com/kosey/project/app/config/DateTimeFormatConfiguration.java
|
6c9a79eb63ad984f9b9ff9f1dbd735965c0e90ab
|
[] |
no_license
|
Max11mus/projectBase
|
946a61460c99a7c4850ee94e62f15af1339b577d
|
fb1c31b5eea22ca468d23f6c0ce705d3cf0dea83
|
refs/heads/main
| 2023-02-26T18:38:40.202993
| 2021-02-07T16:38:33
| 2021-02-07T16:38:33
| 336,835,494
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 728
|
java
|
package com.kosey.project.app.config;
import org.springframework.context.annotation.Configuration;
import org.springframework.format.FormatterRegistry;
import org.springframework.format.datetime.standard.DateTimeFormatterRegistrar;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
/**
* Configure the converters to use the ISO format for dates by default.
*/
@Configuration
public class DateTimeFormatConfiguration implements WebMvcConfigurer {
@Override
public void addFormatters(FormatterRegistry registry) {
DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar();
registrar.setUseIsoFormat(true);
registrar.registerFormatters(registry);
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
32135deb3cb5d15f02a8ce0a4ae441c2e5827733
|
d2ec57598c338498027c2ecbcbb8af675667596b
|
/src/myfaces-core-module-2.1.10/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/ViewImplicitObject.java
|
d96f7da3fc0491ce9ab716a92debc00d7b4f3fac
|
[
"Apache-2.0"
] |
permissive
|
JavaQualitasCorpus/myfaces_core-2.1.10
|
abf6152e3b26d905eff87f27109e9de1585073b5
|
10c9f2d038dd91c0b4f78ba9ad9ed44b20fb55c3
|
refs/heads/master
| 2023-08-12T09:29:23.551395
| 2020-06-02T18:06:36
| 2020-06-02T18:06:36
| 167,005,005
| 0
| 0
|
Apache-2.0
| 2022-07-01T21:24:07
| 2019-01-22T14:08:49
|
Java
|
UTF-8
|
Java
| false
| false
| 1,737
|
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.myfaces.el.unified.resolver.implicitobject;
import java.beans.FeatureDescriptor;
import javax.el.ELContext;
import javax.faces.component.UIViewRoot;
/**
* Encapsulates information needed by the ImplicitObjectResolver
*
* @author Stan Silvert
*/
public class ViewImplicitObject extends ImplicitObject
{
private static final String NAME = "view";
/** Creates a new instance of ViewImplicitObject */
public ViewImplicitObject()
{
}
@Override
public Object getValue(ELContext context)
{
return facesContext(context).getViewRoot();
}
@Override
public String getName()
{
return NAME;
}
@Override
public Class<?> getType()
{
return null;
}
@Override
public FeatureDescriptor getDescriptor()
{
return makeDescriptor(NAME, "The root object of a JSF component tree", UIViewRoot.class);
}
}
|
[
"taibi@sonar-scheduler.rd.tut.fi"
] |
taibi@sonar-scheduler.rd.tut.fi
|
762fefa2c0b2bb82470a9e061de0265346e42c4b
|
d65a33196a495aa0001b89e321d02fae23721eb6
|
/quickcall-admin/src/main/java/com/calf/module/resource/entity/ResourceConfigExCust.java
|
a93a161f065335cbcfe53eea80d9c13521818abe
|
[] |
no_license
|
zihanbobo/Repository
|
5c168307848d2639fef7649d4121f37c498a2e7c
|
db9e91931899f5ef3e5af07722ecee0aa9fb1d02
|
refs/heads/master
| 2021-10-10T08:58:19.052522
| 2018-11-28T13:22:10
| 2018-11-28T13:22:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,922
|
java
|
package com.calf.module.resource.entity;
/**
* 用户资源池配置表bean
* @author zhaozheyi
* @date Thu Oct 25 15:57:00 CST 2018
**/
public class ResourceConfigExCust {
/**主键ID**/
private Integer id;
/**资源池配置ID**/
private Long resourceConfigId;
/**客户号**/
private String appId;
/**状态(0=不可用,1=可用)**/
private Integer status;
/**创建时间**/
private String createTime;
/**修改时间**/
private String modifyTime;
/**创建人**/
private String createMan;
/**修改人**/
private String modifyMan;
/**备注**/
private String remark;
public void setId(Integer id){
this.id = id;
}
public Integer getId(){
return this.id;
}
public void setResourceConfigId(Long resourceConfigId){
this.resourceConfigId = resourceConfigId;
}
public Long getResourceConfigId(){
return this.resourceConfigId;
}
public void setStatus(Integer status){
this.status = status;
}
public Integer getStatus(){
return this.status;
}
public void setCreateTime(String createTime){
this.createTime = createTime;
}
public String getCreateTime(){
return this.createTime;
}
public void setModifyTime(String modifyTime){
this.modifyTime = modifyTime;
}
public String getModifyTime(){
return this.modifyTime;
}
public void setCreateMan(String createMan){
this.createMan = createMan;
}
public String getCreateMan(){
return this.createMan;
}
public void setModifyMan(String modifyMan){
this.modifyMan = modifyMan;
}
public String getModifyMan(){
return this.modifyMan;
}
public void setRemark(String remark){
this.remark = remark;
}
public String getRemark(){
return this.remark;
}
public String getAppId() {
return appId;
}
public void setAppId(String appId) {
this.appId = appId;
}
}
|
[
"liyingtang@xiaoniu.com"
] |
liyingtang@xiaoniu.com
|
fe10dfc6c72b15c888d31b429c4935481a1076f8
|
0e3f1ace4ca773d2190f44bacc7f718d4c4a10ca
|
/Alignments/src/uk/ac/ebi/jdispatcher/soap/clustalo/WsParameterValues.java
|
e8caaec9e61c8bd25ae093c9ec368098d0470337
|
[] |
no_license
|
BioKNIME/plantcell
|
35cf74347e4447668f17e359c2e0574f99bb6a9d
|
c02c7d9cbc86ee26db86047dbb46dee1e2aae20e
|
refs/heads/master
| 2021-01-19T14:28:37.099349
| 2014-09-03T05:25:16
| 2014-09-03T05:25:16
| 88,166,799
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,922
|
java
|
package uk.ac.ebi.jdispatcher.soap.clustalo;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* The list of parameter values
*
* <p>Java class for wsParameterValues complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="wsParameterValues">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="value" type="{http://soap.jdispatcher.ebi.ac.uk}wsParameterValue" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "wsParameterValues", propOrder = {
"value"
})
public class WsParameterValues {
protected List<WsParameterValue> value;
/**
* Gets the value of the value property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the value property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getValue().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link WsParameterValue }
*
*
*/
public List<WsParameterValue> getValue() {
if (value == null) {
value = new ArrayList<WsParameterValue>();
}
return this.value;
}
}
|
[
"pcbrc-enquiries@unimelb.edu.au@dddfb942-a9a2-2c26-f143-85623fb4cac2"
] |
pcbrc-enquiries@unimelb.edu.au@dddfb942-a9a2-2c26-f143-85623fb4cac2
|
903a1b089656ae8103e3c7c8c99821708efb0456
|
5c6df690a66c05fb1db0c9f92667a347ee97cebd
|
/Dec2020/src/abstractionInterFace/TestHDFCICICCIAgain.java
|
6c49e351661d95c9b8c3cc84660e13148765ad4a
|
[] |
no_license
|
abhisheksawai/dec2020
|
d3d40663c1263fe6f2d0d93d3a82c32cdb8535f4
|
f79ac65e011e91c307412a2b26540176535ddc5b
|
refs/heads/main
| 2023-03-30T07:58:25.911449
| 2021-04-11T05:49:52
| 2021-04-11T05:49:52
| 356,776,183
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 861
|
java
|
package abstractionInterFace;
public class TestHDFCICICCIAgain implements Hdfc,Icici {
public void offer()
{
System.out.println("20% off");
}
public static void main(String[] args) { // voice breaking arun
Hdfc t2 = new TestHdfcIcici(); /// chrome class chrome c = new chrome .// savita
Hdfc t3 = new TestHDFCICICCIAgain(); // firefox fire f = new fire | common
// t2.offer(); //The method offer() is undefined for the type Hdfc
// t3.offer();
TestHdfcIcici t4 = new TestHdfcIcici();
TestHDFCICICCIAgain t5 = new TestHDFCICICCIAgain();
t2.creditcard();
t3.creditcard();
System.out.println("t4.offer");
t4.offer();
System.out.println("t5.offer");
t5.offer();
}
public void creditcard() {
System.out.println("creditcard from TestHDFCICICCIAgain");
}
}
|
[
"sawai.abhishek@gmail.com"
] |
sawai.abhishek@gmail.com
|
1385cc35190490dd62a83b6a6815b979a840821c
|
b58632bd4e7d37b43f2fee66fc37760f6387d46e
|
/sentinel-core/src/main/java/com/alibaba/csp/sentinel/eagleeye/TokenBucket.java
|
c2e616b8d520a13d7fdd69be6c988b3f2ae50216
|
[
"Apache-2.0"
] |
permissive
|
alibaba/Sentinel
|
3287d24754d19461f4b7ba4794ed9733eefd144f
|
d00798ff8d04c805a0f64772d7802b801e1c86e3
|
refs/heads/master
| 2023-08-29T10:54:53.810009
| 2023-08-16T10:48:32
| 2023-08-16T10:48:32
| 128,018,428
| 22,318
| 8,447
|
Apache-2.0
| 2023-09-10T07:46:27
| 2018-04-04T06:37:33
|
Java
|
UTF-8
|
Java
| false
| false
| 1,953
|
java
|
/*
* Copyright 1999-2018 Alibaba Group Holding Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in 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.alibaba.csp.sentinel.eagleeye;
import java.util.concurrent.atomic.AtomicLong;
class TokenBucket {
private final long maxTokens;
private final long intervalMillis;
private volatile long nextUpdate;
private AtomicLong tokens;
public TokenBucket(long maxTokens, long intervalMillis) {
if (maxTokens <= 0) {
throw new IllegalArgumentException("maxTokens should > 0, but given: " + maxTokens);
}
if (intervalMillis < 1000) {
throw new IllegalArgumentException("intervalMillis should be at least 1000, but given: " + intervalMillis);
}
this.maxTokens = maxTokens;
this.intervalMillis = intervalMillis;
this.nextUpdate = System.currentTimeMillis() / 1000 * 1000 + intervalMillis;
this.tokens = new AtomicLong(maxTokens);
}
public boolean accept(long now) {
long currTokens;
if (now > nextUpdate) {
currTokens = tokens.get();
if (tokens.compareAndSet(currTokens, maxTokens)) {
nextUpdate = System.currentTimeMillis() / 1000 * 1000 + intervalMillis;
}
}
do {
currTokens = tokens.get();
} while (currTokens > 0 && !tokens.compareAndSet(currTokens, currTokens - 1));
return currTokens > 0;
}
}
|
[
"sczyh16@gmail.com"
] |
sczyh16@gmail.com
|
8d793219b2037ea3e9564764fe43ed00b4ea872b
|
1c0fd7788057250076b89a2950296c6dd634235f
|
/src/test/java/org/assertj/core/api/doublearray/DoubleArrayAssert_containsSubsequence_Test.java
|
73ba73459cd2d13b9c61f6e44a06cc440faa787f
|
[
"Apache-2.0"
] |
permissive
|
cybernetics/assertj-core
|
ee34de8afd26add2224f8fe64f56302ec972c6a6
|
15cc375a8975a98cd98f1bc4c1e6b1112094d4b1
|
refs/heads/master
| 2021-01-22T12:44:24.856925
| 2014-02-23T21:40:10
| 2014-02-23T21:40:10
| 17,436,955
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,394
|
java
|
/*
* Created on Aug 17, 2013
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in 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.
*
* Copyright @2010-2013 the original author or authors.
*/
package org.assertj.core.api.doublearray;
import static org.assertj.core.test.DoubleArrays.arrayOf;
import static org.mockito.Mockito.verify;
import org.assertj.core.api.DoubleArrayAssert;
import org.assertj.core.api.DoubleArrayAssertBaseTest;
/**
* Tests for <code>{@link DoubleArrayAssert#containsSubsequence(double...)}</code>.
*
* @author Marcin Mikosik
*/
public class DoubleArrayAssert_containsSubsequence_Test extends DoubleArrayAssertBaseTest {
@Override
protected DoubleArrayAssert invoke_api_method() {
return assertions.containsSubsequence(6d, 8d);
}
@Override
protected void verify_internal_effects() {
verify(arrays).assertContainsSubsequence(getInfo(assertions), getActual(assertions), arrayOf(6d, 8d));
}
}
|
[
"marcin.mikosik@gmail.com"
] |
marcin.mikosik@gmail.com
|
4cef87558f10fd925a331c5aa49b3054eab90ccf
|
61493988859ee2869df048c26ec2840760d23e80
|
/dwdmlinksim/src/com/tejas/math/oper/unary/trig/hyperbol/CosecantH.java
|
b7c2c794f86877c02c2e259f53145e64d30ebb7b
|
[] |
no_license
|
vikramzmail/tejPlan
|
6f2a34aafdf7df29d3d993b4f1bc3f11cd68b84c
|
749644dea9b59eee413b155222a19bbb50f8cab1
|
refs/heads/master
| 2021-01-01T05:40:51.841146
| 2015-03-04T17:40:28
| 2015-03-04T17:41:11
| 31,670,235
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 535
|
java
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.tejas.math.oper.unary.trig.hyperbol;
import com.tejas.math.numbers.Complex;
import com.tejas.math.numbers.Real;
import javolution.text.Text;
/**
*
* @author Kristopher
*/
public class CosecantH extends HyperbolicOp {
public Real op(Real r) {
return r.csch();
}
public Complex op(Complex c) {
return c.csch();
}
public Text toText() {
return Text.intern("csch");
}
}
|
[
"vikrams@india.tejasnetworks.com"
] |
vikrams@india.tejasnetworks.com
|
a353dd7d1e4a3b7fd92a287b27be4eac0555de47
|
9b5053db1b5a03c8f72d87a5054688a50287efe2
|
/com/google/firebase/auth/UserProfileChangeRequest.java
|
0d9cb875794478c1ec9f43f1ac66967ef5e68bf1
|
[] |
no_license
|
steamguard-totp/steam-mobile
|
f8d612b5c767248c3a29e29c0b9328e5d244c079
|
f94cd2ec0404bfab69b00a582f90457295cccabb
|
refs/heads/master
| 2021-09-04T07:04:22.229386
| 2018-01-16T23:39:37
| 2018-01-16T23:39:37
| 117,756,434
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,162
|
java
|
package com.google.firebase.auth;
import android.net.Uri;
import android.os.Parcel;
import android.os.Parcelable.Creator;
import android.text.TextUtils;
import com.google.android.gms.common.internal.safeparcel.zza;
public class UserProfileChangeRequest extends zza {
public static final Creator<UserProfileChangeRequest> CREATOR = new zza();
public final int mVersionCode;
private String zzaPq;
private String zzaiX;
private boolean zzbVK;
private boolean zzbVL;
private Uri zzbVM;
UserProfileChangeRequest(int i, String str, String str2, boolean z, boolean z2) {
this.mVersionCode = i;
this.zzaiX = str;
this.zzaPq = str2;
this.zzbVK = z;
this.zzbVL = z2;
this.zzbVM = TextUtils.isEmpty(str2) ? null : Uri.parse(str2);
}
public String getDisplayName() {
return this.zzaiX;
}
public void writeToParcel(Parcel parcel, int i) {
zza.zza(this, parcel, i);
}
public String zzUb() {
return this.zzaPq;
}
public boolean zzUc() {
return this.zzbVK;
}
public boolean zzUd() {
return this.zzbVL;
}
}
|
[
"jessejesse123@gmail.com"
] |
jessejesse123@gmail.com
|
e1ada5a0963ed7c1847b9d8fa165333b823ea05c
|
f6899a2cf1c10a724632bbb2ccffb7283c77a5ff
|
/glassfish/ejb/ejb-connector/src/main/java/org/glassfish/ejb/deployment/annotation/handlers/ExcludeDefaultInterceptorsHandler.java
|
c233e9aa29d7f011f63ed45aa2986b3f08e602db
|
[] |
no_license
|
Appdynamics/OSS
|
a8903058e29f4783e34119a4d87639f508a63692
|
1e112f8854a25b3ecf337cad6eccf7c85e732525
|
refs/heads/master
| 2023-07-22T03:34:54.770481
| 2021-10-28T07:01:57
| 2021-10-28T07:01:57
| 19,390,624
| 2
| 13
| null | 2023-07-08T02:26:33
| 2014-05-02T22:42:20
| null |
UTF-8
|
Java
| false
| false
| 4,827
|
java
|
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 1997-2011 Oracle and/or its affiliates. All rights reserved.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
* and Distribution License("CDDL") (collectively, the "License"). You
* may not use this file except in compliance with the License. You can
* obtain a copy of the License at
* https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
* or packager/legal/LICENSE.txt. 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 and include the License file at packager/legal/LICENSE.txt.
*
* GPL Classpath Exception:
* Oracle designates this particular file as subject to the "Classpath"
* exception as provided by Oracle in the GPL Version 2 section of the License
* file that accompanied this code.
*
* Modifications:
* If applicable, add the following below the License Header, with the fields
* enclosed by brackets [] replaced by your own identifying information:
* "Portions Copyright [year] [name of copyright owner]"
*
* Contributor(s):
* If you wish your version of this file to be governed by only the CDDL or
* only the GPL Version 2, indicate your decision by adding "[Contributor]
* elects to include this software in this distribution under the [CDDL or GPL
* Version 2] license." If you don't indicate a single choice of license, a
* recipient has the option to distribute your version of this file under
* either the CDDL, the GPL Version 2 or to extend the choice of license to
* its licensees as provided above. However, if you add GPL Version 2 code
* and therefore, elected the GPL Version 2 license, then the option applies
* only if the new code is made subject to such option by the copyright
* holder.
*/
package org.glassfish.ejb.deployment.annotation.handlers;
import java.lang.annotation.Annotation;
import java.lang.annotation.ElementType;
import java.lang.reflect.AnnotatedElement;
import java.lang.reflect.Method;
import javax.interceptor.ExcludeDefaultInterceptors;
import com.sun.enterprise.deployment.EjbDescriptor;
import com.sun.enterprise.deployment.EjbBundleDescriptor;
import com.sun.enterprise.deployment.InterceptorBindingDescriptor;
import com.sun.enterprise.deployment.MethodDescriptor;
import org.glassfish.apf.AnnotationInfo;
import org.glassfish.apf.AnnotationProcessorException;
import org.glassfish.apf.HandlerProcessingResult;
import com.sun.enterprise.deployment.annotation.context.EjbContext;
import org.glassfish.ejb.deployment.annotation.handlers.AbstractAttributeHandler;
import org.jvnet.hk2.annotations.Service;
/**
* This handler is responsible for handling the
* javax.ejb.ExcludeDefaultInterceptors annotation.
*
*/
@Service
public class ExcludeDefaultInterceptorsHandler
extends AbstractAttributeHandler {
public ExcludeDefaultInterceptorsHandler() {
}
/**
* @return the annoation type this annotation handler is handling
*/
public Class<? extends Annotation> getAnnotationType() {
return ExcludeDefaultInterceptors.class;
}
protected boolean supportTypeInheritance() {
return true;
}
protected HandlerProcessingResult processAnnotation(AnnotationInfo ainfo,
EjbContext[] ejbContexts) throws AnnotationProcessorException {
EjbBundleDescriptor ejbBundle =
((EjbDescriptor)ejbContexts[0].getDescriptor()).
getEjbBundleDescriptor();
for(EjbContext next : ejbContexts) {
EjbDescriptor ejbDescriptor = (EjbDescriptor) next.getDescriptor();
// Create binding information.
InterceptorBindingDescriptor binding =
new InterceptorBindingDescriptor();
binding.setEjbName(ejbDescriptor.getName());
binding.setExcludeDefaultInterceptors(true);
if(ElementType.METHOD.equals(ainfo.getElementType())) {
Method m = (Method) ainfo.getAnnotatedElement();
MethodDescriptor md =
new MethodDescriptor(m, MethodDescriptor.EJB_BEAN);
binding.setBusinessMethod(md);
}
ejbBundle.prependInterceptorBinding(binding);
}
return getDefaultProcessedResult();
}
/**
* @return an array of annotation types this annotation handler would
* require to be processed (if present) before it processes it's own
* annotation type.
*/
public Class<? extends Annotation>[] getTypeDependencies() {
return getEjbAnnotationTypes();
}
}
|
[
"srini@appdynamics.com"
] |
srini@appdynamics.com
|
bb1a73f47663f941d15fd9f6d4aa0ab933f3526f
|
91682c22fa06d64b6fff5008e86260297f28ce0b
|
/mobile-runescape-client/src/main/java/com/jagex/mobilesdk/payments/comms/PaymentComms.java
|
33940aceadad6979e7f41ae1ae7c83e2718a90eb
|
[
"BSD-2-Clause"
] |
permissive
|
morscape/mors-desktop
|
a32b441b08605bd4cd16604dc3d1bc0b9da62ec9
|
230174cdfd2e409816c7699756f1a98e89c908d9
|
refs/heads/master
| 2023-02-06T15:35:04.524188
| 2020-12-27T22:00:22
| 2020-12-27T22:00:22
| 324,747,526
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,690
|
java
|
/*
* Decompiled with CFR 0.150.
*
* Could not load the following classes:
* net.runelite.mapping.Implements
* net.runelite.mapping.ObfuscatedSignature
*/
package com.jagex.mobilesdk.payments.comms;
import com.jagex.mobilesdk.auth.model.MobileAuthState;
import com.jagex.mobilesdk.payments.comms.CompletePaymentComms;
import com.jagex.mobilesdk.payments.comms.CompletePaymentComms$CompletePaymentCallback;
import com.jagex.mobilesdk.payments.comms.FetchCategoriesComms;
import com.jagex.mobilesdk.payments.comms.FetchCategoriesComms$FetchCategoriesCallback;
import com.jagex.mobilesdk.payments.comms.FetchImageComms;
import com.jagex.mobilesdk.payments.comms.FetchImageComms$FetchImageCallback;
import com.jagex.mobilesdk.payments.model.PaymentCompletionRequest;
import java.util.HashMap;
import java.util.Locale;
import net.runelite.mapping.Implements;
import net.runelite.mapping.ObfuscatedSignature;
@Implements(value="PaymentComms")
public class PaymentComms {
@ObfuscatedSignature(descriptor="(Ljava/lang/String;Lcom/jagex/mobilesdk/payments/comms/FetchImageComms$FetchImageCallback;Z)V", garbageValue="1")
public static void FetchImageComms(String string2, FetchImageComms$FetchImageCallback fetchImageComms$FetchImageCallback, boolean bl) {
FetchImageComms fetchImageComms = new FetchImageComms(string2, fetchImageComms$FetchImageCallback);
fetchImageComms.execute(new Void[0]);
}
@ObfuscatedSignature(descriptor="(Ljava/lang/String;Lcom/jagex/mobilesdk/auth/model/MobileAuthState;FLcom/jagex/mobilesdk/payments/comms/FetchCategoriesComms$FetchCategoriesCallback;Z)V", garbageValue="1")
public static void fetchCategoriesComms(String string2, MobileAuthState object, float f, FetchCategoriesComms$FetchCategoriesCallback fetchCategoriesComms$FetchCategoriesCallback, boolean bl) {
HashMap<String, String> hashMap = new HashMap<String, String>();
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append("Bearer ");
stringBuilder.append(((MobileAuthState)object).getAccessToken());
hashMap.put("Authorization", stringBuilder.toString());
object = new StringBuilder();
((StringBuilder)object).append(f);
((StringBuilder)object).append(",d=android");
hashMap.put("Accept-Resolution", ((StringBuilder)object).toString());
hashMap.put("Accept-Language", Locale.getDefault().getLanguage());
object = new FetchCategoriesComms(string2, hashMap, fetchCategoriesComms$FetchCategoriesCallback);
object.execute((Object[])new Void[0]);
}
@ObfuscatedSignature(descriptor="(Ljava/lang/String;Lcom/jagex/mobilesdk/auth/model/MobileAuthState;Lcom/jagex/mobilesdk/payments/model/PaymentCompletionRequest;Lcom/jagex/mobilesdk/payments/comms/CompletePaymentComms$CompletePaymentCallback;Z)V", garbageValue="1")
public static void completePaymentsComms(String string2, MobileAuthState object, PaymentCompletionRequest paymentCompletionRequest, CompletePaymentComms$CompletePaymentCallback completePaymentComms$CompletePaymentCallback, boolean bl) {
HashMap<String, String> hashMap = new HashMap<String, String>();
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append("Bearer ");
stringBuilder.append(object.getAccessToken());
hashMap.put("Authorization", stringBuilder.toString());
hashMap.put("Content-Type", "application/json");
hashMap.put("Accept-Type", "application/json");
object = new CompletePaymentComms(string2, hashMap, paymentCompletionRequest, completePaymentComms$CompletePaymentCallback);
object.execute(new Void[0]);
}
}
|
[
"lorenzo.vaccaro@hotmail.com"
] |
lorenzo.vaccaro@hotmail.com
|
64f994fe49f9ca3ec1c14972adf3bb4d7db0163c
|
129f58086770fc74c171e9c1edfd63b4257210f3
|
/src/testcases/CWE759_Unsalted_One_Way_Hash/CWE759_Unsalted_One_Way_Hash__basic_15.java
|
ede1e91dd92605aa532568369953814517bd3e96
|
[] |
no_license
|
glopezGitHub/Android23
|
1bd0b6a6c7ce3c7439a74f1e4dcef2c4c0fac4ba
|
6215d0684c4fbdc7217ccfbedfccfca69824cc5e
|
refs/heads/master
| 2023-03-07T15:14:59.447795
| 2023-02-06T13:59:49
| 2023-02-06T13:59:49
| 6,856,387
| 0
| 3
| null | 2023-02-06T18:38:17
| 2012-11-25T22:04:23
|
Java
|
UTF-8
|
Java
| false
| false
| 3,762
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE759_Unsalted_One_Way_Hash__basic_15.java
Label Definition File: CWE759_Unsalted_One_Way_Hash__basic.label.xml
Template File: point-flaw-15.tmpl.java
*/
/*
* @description
* CWE: 759 Use of one-way hash with no salt
* Sinks:
* GoodSink: use a sufficiently random salt
* BadSink : SHA512 with no salt
* Flow Variant: 15 Control flow: switch(7)
*
* */
package testcases.CWE759_Unsalted_One_Way_Hash;
import testcasesupport.*;
import java.security.GeneralSecurityException;
import java.security.MessageDigest;
import java.security.SecureRandom;
public class CWE759_Unsalted_One_Way_Hash__basic_15 extends AbstractTestCase
{
public void bad() throws Throwable
{
switch(7)
{
case 7:
{
MessageDigest hash = MessageDigest.getInstance("SHA-512"); /* FLAW: SHA512 with no salt */
byte[] hashv = hash.digest("hash me".getBytes("UTF-8"));
IO.writeLine(IO.toHex(hashv));
}
break;
default:
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
{
SecureRandom r = new SecureRandom();
MessageDigest hash = MessageDigest.getInstance("SHA-512");
hash.update(r.getSeed(32)); /* FIX: Use a sufficiently random salt */
byte[] hashv = hash.digest("hash me".getBytes("UTF-8"));
IO.writeLine(IO.toHex(hashv));
}
break;
}
}
/* good1() change the switch to switch(8) */
private void good1() throws Throwable
{
switch(8)
{
case 7:
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
{
MessageDigest hash = MessageDigest.getInstance("SHA-512"); /* FLAW: SHA512 with no salt */
byte[] hashv = hash.digest("hash me".getBytes("UTF-8"));
IO.writeLine(IO.toHex(hashv));
}
break;
default:
{
SecureRandom r = new SecureRandom();
MessageDigest hash = MessageDigest.getInstance("SHA-512");
hash.update(r.getSeed(32)); /* FIX: Use a sufficiently random salt */
byte[] hashv = hash.digest("hash me".getBytes("UTF-8"));
IO.writeLine(IO.toHex(hashv));
}
break;
}
}
/* good2() reverses the blocks in the switch */
private void good2() throws Throwable
{
switch(7)
{
case 7:
{
SecureRandom r = new SecureRandom();
MessageDigest hash = MessageDigest.getInstance("SHA-512");
hash.update(r.getSeed(32)); /* FIX: Use a sufficiently random salt */
byte[] hashv = hash.digest("hash me".getBytes("UTF-8"));
IO.writeLine(IO.toHex(hashv));
}
break;
default:
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
{
MessageDigest hash = MessageDigest.getInstance("SHA-512"); /* FLAW: SHA512 with no salt */
byte[] hashv = hash.digest("hash me".getBytes("UTF-8"));
IO.writeLine(IO.toHex(hashv));
}
break;
}
}
public void good() throws Throwable
{
good1();
good2();
}
/* Below is the main(). It is only used when building this testcase on
its own for testing or for building a binary to use in testing binary
analysis tools. It is not used when compiling all the testcases as one
application, which is how source code analysis tools are tested. */
public static void main(String[] args) throws ClassNotFoundException,
InstantiationException, IllegalAccessException
{
mainFromParent(args);
}
}
|
[
"guillermo.pando@gmail.com"
] |
guillermo.pando@gmail.com
|
8c4a47b5f29efafc4ca2edca04573cdcca30547e
|
ba4d5fff8fd816aaf20f624e9cb4421ff6d380b2
|
/Jan2020/src/pOMDemo/Loginpage.java
|
b58eb9f94621fd9b77105675d5736227e593969f
|
[] |
no_license
|
abhisheksawai/JanDemo
|
5b0641faf352293f4a3062421b121e4e43a7a558
|
f7b61c7c7fc1a4a52e4db14e9894455f2486171f
|
refs/heads/master
| 2021-04-13T13:34:15.621635
| 2020-03-22T12:16:26
| 2020-03-22T12:16:26
| 249,166,227
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,103
|
java
|
package pOMDemo;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.testng.Assert;
public class Loginpage {
//all the objects of login page
By username = By.id("email");
By password =By.xpath("//input[@id='pass']");
By login =By.xpath("//input[@value='Log In']");
//WebDriver driver = new ChromeDriver();
WebDriver driver;
public Loginpage(WebDriver driver) {
this.driver = driver;
}
public void enterusername()
{
//driver.get("https://www.facebook.com/");
driver.findElement(username).sendKeys("Jayanta");
//driver.findElement(By.xpath(p.getProperty("txt_username_login_FB"))).sendKeys("from Or-Abhishek");
//driver.findElement(By.xpath("//*[@id='user_pass']")).sendKeys("abhijeet");
}
public void enterpassword()
{
driver.findElement(password).sendKeys("pass@1234");
}
public void clickonlogin()
{
driver.findElement(login).click();
}
public void verifylogincheck() {
//Assert.assertTrue(condition);
}
}
|
[
"sawai.abhishek@gmail.com"
] |
sawai.abhishek@gmail.com
|
b4a151429ab12d739a2fb584efc3e66f737a0bab
|
441b55ee7203f6ab4cb9df2decc085d8cf519351
|
/src/main/java/com/bric/swing/resources/TileIcon.java
|
d275d4dcc42f2aa70fae8e7ab4d30850d65a2efc
|
[
"BSD-3-Clause"
] |
permissive
|
javagraphics/main
|
0925234fc84100b499cf5fcbf60fa544f249530d
|
582aada63bfe936e0b49a9d105099401c06d6225
|
refs/heads/master
| 2021-01-10T08:56:29.915157
| 2017-08-05T20:14:32
| 2017-08-05T20:14:32
| 48,960,911
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,991
|
java
|
/*
* @(#)TileIcon.java
*
* $Date: 2014-06-06 20:04:49 +0200 (Fr, 06 Jun 2014) $
*
* Copyright (c) 2011 by Jeremy Wood.
* All rights reserved.
*
* The copyright of this software is owned by Jeremy Wood.
* You may not use, copy or modify this software, except in
* accordance with the license agreement you entered into with
* Jeremy Wood. For details see accompanying license terms.
*
* This software is probably, but not necessarily, discussed here:
* https://javagraphics.java.net/
*
* That site should also contain the most recent official version
* of this software. (See the SVN repository for more details.)
*/
package com.bric.swing.resources;
import java.awt.Color;
import java.awt.Component;
import java.awt.Graphics;
import java.awt.Graphics2D;
import javax.swing.Icon;
import com.bric.blog.ResourceSample;
/** One of three icons used to toggle views in file browsers/dialogs.
*
* <!-- ======== START OF AUTOGENERATED SAMPLES ======== -->
* <p><img src="https://javagraphics.java.net/resources/samples/TileIcon/sample.png" alt="new com.bric.swing.resources.TileIcon(12, 12)">
* <!-- ======== END OF AUTOGENERATED SAMPLES ======== -->
*
* @see ColumnIcon
* @see ListIcon
* @see StackIcon
*/
@ResourceSample( sample= {
"new com.bric.swing.resources.TileIcon(12, 12)" })
public class TileIcon implements Icon {
final int w, h;
public TileIcon(int width,int height) {
w = width;
h = height;
}
public int getIconHeight() {
return h;
}
public int getIconWidth() {
return w;
}
public void paintIcon(Component c, Graphics g0, int x, int y) {
Graphics2D g = (Graphics2D)g0.create();
g.setColor(Color.darkGray);
g.translate(x, y);
int rows = (h+2)/6;
int columns = (w+2)/6;
int dy = h/2 - ((rows*6-2)/2);
int dx = w/2 - ((columns*6-2)/2);
g.translate(dx, dy);
for(int row = 0; row<rows; row++) {
for(int col = 0; col<columns; col++) {
g.drawRect(col*6,row*6,3,3);
}
}
g.dispose();
}
}
|
[
"sebastian@topobyte.de"
] |
sebastian@topobyte.de
|
0d4cd8d3eb1a789dcbc896f11d71436eb20d23ac
|
b03bab3f97203c2860d0cab761a24456939ece38
|
/TomcatSource/src/main/java/org/zk/catalina/Lifecycle.java
|
02a614974f6525661331ed7b4d111852a5679817
|
[] |
no_license
|
zuokai666/SourceCode
|
adb4b5f65c1c1aa8b51898222c6f80e116939243
|
dbed27b8079d43a4ce361e0819e329db2cf5624a
|
refs/heads/master
| 2022-05-27T19:17:56.616480
| 2020-04-18T09:44:08
| 2020-04-18T09:44:08
| 184,424,980
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,649
|
java
|
package org.zk.catalina;
import org.zk.catalina.listener.LifecycleListener;
/**
* 组件生命周期方法的通用接口
* 当状态改变时,生命周期事件将会被触发
*
* @author king
* @date 2019-05-02 16:22:36
*
*/
public interface Lifecycle {
String PERIODIC_EVENT = "periodic";
/**
* 在组件启动前的一些准备工作,在方法前后触发两个事件
*/
void init() throws LifecycleException;
String BEFORE_INIT_EVENT = "before_init";
String AFTER_INIT_EVENT = "after_init";
/**
* 方法前触发第一个,方法中触发第二个,方法后触发第三个
*/
void start() throws LifecycleException;
String BEFORE_START_EVENT = "before_start";
String CONFIGURE_START_EVENT = "configure_start";
String START_EVENT = "start";
String AFTER_START_EVENT = "after_start";
void stop() throws LifecycleException;
String BEFORE_STOP_EVENT = "before_stop";
String STOP_EVENT = "stop";
String CONFIGURE_STOP_EVENT = "configure_stop";
String AFTER_STOP_EVENT = "after_stop";
void destroy() throws LifecycleException;
String BEFORE_DESTROY_EVENT = "before_destroy";
String AFTER_DESTROY_EVENT = "after_destroy";
/**
* 生命周期监听器的管理器,提供了增删改查的方法
*/
void addLifecycleListener(LifecycleListener listener);
LifecycleListener[] findLifecycleListeners();
void removeLifecycleListener(LifecycleListener listener);
/**
* 得到当前组件的状态
*/
LifecycleState getState();
String getStateName();
}
|
[
"13703391897@163.com"
] |
13703391897@163.com
|
e95d4d0dfaa775f66dc1e573b59c9a9735a5361c
|
46da4bfdecec9ee8e528608f00a7d1cff14037ca
|
/app/src/main/java/com/rahul/blx/MumbaiResponseClasses/MediumMumbaiClasses.java
|
b663fbb76e458896b412e7fc35bd3c10a9ec11e7
|
[] |
no_license
|
rahul6975/BLX
|
54916abda956c1c7ac1e31064507ccce30524b85
|
843b01166f8e139f3a7c27ed8e8f3ad5b2de4e62
|
refs/heads/master
| 2023-05-06T07:23:51.364724
| 2021-05-29T06:52:39
| 2021-05-29T06:52:39
| 371,899,921
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 543
|
java
|
package com.rahul.blx.MumbaiResponseClasses;
import javax.annotation.Generated;
import com.google.gson.annotations.SerializedName;
import java.io.Serializable;
@Generated("com.robohorse.robopojogenerator")
public class MediumMumbaiClasses implements Serializable {
@SerializedName("width")
private int width;
@SerializedName("height")
private int height;
@SerializedName("url")
private String url;
public int getWidth(){
return width;
}
public int getHeight(){
return height;
}
public String getUrl(){
return url;
}
}
|
[
"rahulya7569@gmail.com"
] |
rahulya7569@gmail.com
|
4e19fa3b91ff9a96e7e2aac46386da701751dc51
|
41a5ce39648523be781f35cdc5b69f93d57829a5
|
/src/main/java/org/webguitoolkit/ui/mobile/MobileCanvas.java
|
1cfac8e9269fb03d90d184eeeda9614af19ba688
|
[
"Apache-2.0"
] |
permissive
|
webguitoolkit/wgt-ui
|
455dd35bbfcb6835e3834a4537e3ffc668f15389
|
747530b462e9377a0ece473b97ce2914fb060cb5
|
refs/heads/master
| 2020-04-06T05:46:43.511525
| 2012-03-02T08:40:44
| 2012-03-02T08:40:44
| 1,516,251
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,158
|
java
|
/*
Copyright 2008 Endress+Hauser Infoserve GmbH&Co KG
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.webguitoolkit.ui.mobile;
import java.io.PrintWriter;
import org.webguitoolkit.ui.controls.container.Canvas;
import org.webguitoolkit.ui.controls.util.JSUtil;
/**
* @author i01002415
*
*/
public class MobileCanvas extends Canvas implements IMobileControl {
/* (non-Javadoc)
* @see org.webguitoolkit.ui.mobile.IMobileControl#setDataRole(java.lang.String)
*/
public void setDataRole(String role) {
setAttribute("data-role", role);
}
/* (non-Javadoc)
* @see org.webguitoolkit.ui.mobile.IMobileControl#setDataInset(java.lang.String)
*/
public void setDataInset(String role) {
setAttribute("data-inset", role);
}
/* (non-Javadoc)
* @see org.webguitoolkit.ui.mobile.IMobileControl#setDataTheme(java.lang.String)
*/
public void setDataTheme(String role) {
setAttribute("data-theme", role);
}
/* (non-Javadoc)
* @see org.webguitoolkit.ui.mobile.IMobileControl#setDataDividertheme(java.lang.String)
*/
public void setDataDividertheme(String role) {
setAttribute("data-dividertheme", role);
}
/**
* @see org.webguitoolkit.ui.controls.BaseControl#draw(java.io.PrintWriter)
*/
protected void draw(PrintWriter out) {
super.draw(out);
String dataRole = getContext().getValue( getId()+".data-role");
if( getPage().isDrawn() && "page".equals( dataRole) ){
getContext().sendJavaScript(getId()+"_init", "jQuery.mobile.initializePage();");
}
else{
getContext().sendJavaScript(getId()+"_init", JSUtil.jQuery(getId())+".page();");
}
}
}
|
[
"peter@17sprints.de"
] |
peter@17sprints.de
|
0a9cce635967b33bcfccb15883e4268ad1e36f6d
|
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
|
/crash-reproduction-ws/results/XWIKI-13372-1-14-Single_Objective_GGA-WeightedSum/com/xpn/xwiki/objects/BaseProperty_ESTest_scaffolding.java
|
ee9bdfadeaf8fbd88579b8feb61047d80a5da805
|
[
"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
| 438
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Tue Mar 31 08:03:22 UTC 2020
*/
package com.xpn.xwiki.objects;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class BaseProperty_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
9aef31ec3f6ecfba147b38ae07e58f97fcd9514e
|
5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1
|
/Code Snippet Repository/Struts/Struts1080.java
|
c174cea0b373e1c2e6bf5720c3895f3c156993c5
|
[] |
no_license
|
saber13812002/DeepCRM
|
3336a244d4852a364800af3181e03e868cf6f9f5
|
be3e5e50e34a042d5ba7259ff5ff75c08ab32bb9
|
refs/heads/master
| 2023-03-16T00:08:06.473699
| 2018-04-18T05:29:50
| 2018-04-18T05:29:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 527
|
java
|
public void testWildcardMethodsWithNoSMI() throws Exception {
// given
String method = "my{1}";
Set<String> literals = new HashSet<>();
literals.add(method);
// when
AllowedMethods allowedMethods = AllowedMethods.build(false, literals, ActionConfig.DEFAULT_METHOD_REGEX);
// then
assertEquals(1, allowedMethods.list().size());
assertTrue(allowedMethods.isAllowed("myMethod"));
assertFalse(allowedMethods.isAllowed("someOtherMethod"));
}
|
[
"Qing.Mi@my.cityu.edu.hk"
] |
Qing.Mi@my.cityu.edu.hk
|
87ce3b6860d035ff5476b9e6ecea48831a407912
|
1150f16bf7f7391ed7e3d7e1b67c4897008be532
|
/em/src/main/java/com/exc/street/light/em/token/JwtToken.java
|
87f556d7a6632cdab84f8642aa6bc3790b3161c4
|
[] |
no_license
|
dragonxu/street_light_yancheng
|
e0c957214aae2ebbba2470438c16cd1f8bf600ec
|
5d0d4fd4af0eb6b54f7e1ecef9651a3b9208d7f7
|
refs/heads/master
| 2023-01-15T19:36:53.113876
| 2020-11-24T07:37:34
| 2020-11-24T07:37:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 504
|
java
|
package com.exc.street.light.em.token;
import org.apache.shiro.authc.AuthenticationToken;
/**
* java web token
*
* @author Linshiwen
* @date 2018/6/23
*/
public class JwtToken implements AuthenticationToken {
/**
* 秘钥
*/
private String token;
public JwtToken(String token) {
this.token = token;
}
@Override
public Object getPrincipal() {
return token;
}
@Override
public Object getCredentials() {
return token;
}
}
|
[
"605408609@qq.com"
] |
605408609@qq.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.