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
11334c50b913110f2f8902294071cbfe0b6a80e0
809792ede00f148c9a07da194452c637e0eaa03d
/limelight_shared_code/src/main/java/org/yeastrc/limelight/limelight_shared/dto/FeatureDetectionRoot_ProjectScanFile_Mapping_DTO.java
07600c474095219d12ac9ab0ffb71a770de147a0
[ "Apache-2.0" ]
permissive
yeastrc/limelight-core
80eb23d62c3b967db42b12a3e90cd1b2878ea793
bc609c814f67393b787f31c4d813e8fec9ec1b96
refs/heads/master
2023-08-31T20:37:29.180350
2023-08-21T21:21:48
2023-08-21T21:21:48
159,243,534
5
3
Apache-2.0
2023-03-03T01:30:00
2018-11-26T22:52:14
TypeScript
UTF-8
Java
false
false
1,956
java
package org.yeastrc.limelight.limelight_shared.dto; /** * table feature_detection_root__project_scnfl_mapping_tbl * */ public class FeatureDetectionRoot_ProjectScanFile_Mapping_DTO { private int id; private int featureDetectionRootId; private int projectScanFileId; private String displayLabel; private String description; private int createdBy_UserId; private int updatedBy_UserId; // created_date_time, updated_date_time auto populated by DB @Override public String toString() { return "FeatureDetectionRoot_ProjectScanFile_Mapping_DTO [id=" + id + ", featureDetectionRootId=" + featureDetectionRootId + ", projectScanFileId=" + projectScanFileId + ", displayLabel=" + displayLabel + ", description=" + description + ", createdBy_UserId=" + createdBy_UserId + ", updatedBy_UserId=" + updatedBy_UserId + "]"; } public int getId() { return id; } public void setId(int id) { this.id = id; } public int getFeatureDetectionRootId() { return featureDetectionRootId; } public void setFeatureDetectionRootId(int featureDetectionRootId) { this.featureDetectionRootId = featureDetectionRootId; } public int getProjectScanFileId() { return projectScanFileId; } public void setProjectScanFileId(int projectScanFileId) { this.projectScanFileId = projectScanFileId; } public String getDisplayLabel() { return displayLabel; } public void setDisplayLabel(String displayLabel) { this.displayLabel = displayLabel; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public int getCreatedBy_UserId() { return createdBy_UserId; } public void setCreatedBy_UserId(int createdBy_UserId) { this.createdBy_UserId = createdBy_UserId; } public int getUpdatedBy_UserId() { return updatedBy_UserId; } public void setUpdatedBy_UserId(int updatedBy_UserId) { this.updatedBy_UserId = updatedBy_UserId; } }
[ "djaschob@uw.edu" ]
djaschob@uw.edu
4630fd663f9d1904a85a5e7e5436bc91fa977049
8a62d65d2530e17ec5db3f7803960f4f69b955c0
/comp2100-labs/lab5/task1/AttackWithKnife.java
c47aaaec95dd62795b37b9473b388d6c4a7d5b06
[]
no_license
OddUlrich/Software_Structured_Design
cd650dae7010603bf0e52a9e8819a524a6b1c345
d2e7958450813f99842a88408abb6d66d66ff1b8
refs/heads/master
2020-06-23T00:23:22.397038
2020-03-10T23:17:44
2020-03-10T23:17:44
198,443,940
1
0
null
null
null
null
UTF-8
Java
false
false
178
java
public class AttackWithKnife implements AttackBehaviour { public String attack(int power) { return "Attack with knife, Damage:" + Integer.toString(power*2); } }
[ "vmoonodd@gmail.com" ]
vmoonodd@gmail.com
4b6aad657e8247ec13f8a3544736003bd22d53ac
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/33/33_6383a75ccdb077a42b19ae62860e5bb9109df759/AbstractProjectile/33_6383a75ccdb077a42b19ae62860e5bb9109df759_AbstractProjectile_t.java
011c9df5c7f08c026f060d7e8fe06cf7a5672d09
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,461
java
package se.chalmers.towerdefence.model.projectiles; import se.chalmers.towerdefence.model.IEffect; import se.chalmers.towerdefence.model.monsters.AbstractMonster; /** * An abstract class that represents a projectile. * @author Julia, Jonathan, Emma, Oskar * */ public class AbstractProjectile { private float xPos; private float yPos; private float width; private AbstractMonster monster; private float speed = 2.5f; private int damage; private boolean exists = true; private double angleX, angleY; private IEffect effect; private int ID = 0; public AbstractProjectile(float x, float y, AbstractMonster monster, int damage) { this.width = 5; this.xPos = x + 20 + width; this.yPos = y + 20 + width; this.monster = monster; this.damage = damage; this.effect = null; } public AbstractProjectile(float x, float y, AbstractMonster monster, int damage, IEffect effect) { this(x, y, monster, damage); this.effect = effect.copy(); } public float getX() { return xPos; } public float getY() { return yPos; } public void move() { // if(!monster.isAlive()){ // exists = false; // } double devider = 1/Math.sqrt(Math.pow(monster.getX() + 20 - width - xPos,2) + Math.pow(monster.getY() + 20 - width - yPos, 2)); this.angleX = devider * (monster.getX() + 20 - width - xPos); this.angleY = devider * (monster.getY() + 20 - width - yPos); xPos += angleX * speed; yPos += angleY * speed; if(xPos>=monster.getX()+10-width && yPos>=monster.getY()+10-width && xPos<=monster.getX()+30-width && yPos<=monster.getY()+30-width){ hitMonster(); } } public void hitMonster() { damage(); if(effect != null){ monster.addEffect(effect); }else{ } exists = false; } public void damage(){ if(monster.exists()){ monster.hurt(damage); } } public boolean exists(){ return exists; } public boolean hasEffect(){ if(effect == null){ return false; }else{ return true; } } public IEffect getEffect(){ return effect; } public int getDamage() { return damage; } public AbstractMonster getMonster() { return monster; } public void setExists(boolean exists) { this.exists = exists; } public int getID() { return ID; } public void setID(int ID) { this.ID = ID; } public void setSpeed(float speed) { this.speed = speed; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
33e51a501ac21908df1ab5f30b01ae553cedff41
63d73ee84538e9898979ed91fb61597998d44158
/HolographicDisplays/src/com/gmail/filoghost/holograms/nms/v1_8_R1/NullBoundingBox.java
9b14299b057326b21b27fb70e701ba3f660b774d
[]
no_license
PlusMCPKBPK/HolographicDisplays
25ae5ba36c00170f3c56cf7ba2f90d1f50abea03
58ca0491497a52f299f6fa4f156d07bd697a3ae7
refs/heads/master
2020-12-07T02:16:09.889527
2014-12-06T18:09:38
2014-12-06T18:09:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,389
java
package com.gmail.filoghost.holograms.nms.v1_8_R1; import net.minecraft.server.v1_8_R1.AxisAlignedBB; import net.minecraft.server.v1_8_R1.MovingObjectPosition; import net.minecraft.server.v1_8_R1.Vec3D; public class NullBoundingBox extends AxisAlignedBB { public NullBoundingBox() { super(0, 0, 0, 0, 0, 0); } @Override public double a() { return 0.0; } @Override public double a(AxisAlignedBB arg0, double arg1) { return 0.0; } @Override public AxisAlignedBB a(AxisAlignedBB arg0) { return this; } @Override public AxisAlignedBB a(double arg0, double arg1, double arg2) { return this; } @Override public MovingObjectPosition a(Vec3D arg0, Vec3D arg1) { return super.a(arg0, arg1); } @Override public boolean a(Vec3D arg0) { return false; } @Override public double b(AxisAlignedBB arg0, double arg1) { return 0.0; } @Override public boolean b(AxisAlignedBB arg0) { return false; } @Override public double c(AxisAlignedBB arg0, double arg1) { return 0.0; } @Override public AxisAlignedBB c(double arg0, double arg1, double arg2) { return this; } @Override public AxisAlignedBB grow(double arg0, double arg1, double arg2) { return this; } @Override public AxisAlignedBB shrink(double arg0, double arg1, double arg2) { return this; } }
[ "filoghost@gmail.com" ]
filoghost@gmail.com
ed7918570a0bb38b1a18367db876f8801c4213f7
83ac0fe3f085a0541d42c46bcbbf3506a3b1eb26
/src/main/java/me/minidigger/minicraft/api/Client.java
b1401850f0e1526649117af9dbe7caa422a46eba
[ "MIT" ]
permissive
MiniDigger/MiniCraft
f12272c293abec3236905e6f53899d33d54cbcad
4109c25ceac99e97a668269b73dacbac939c8e8d
refs/heads/master
2022-06-09T19:03:44.233695
2020-02-01T13:52:39
2020-02-01T20:02:53
209,986,738
12
4
MIT
2022-05-20T21:09:53
2019-09-21T13:07:18
Java
UTF-8
Java
false
false
3,337
java
package me.minidigger.minicraft.api; import java.util.concurrent.CompletableFuture; import java.util.concurrent.Future; import java.util.function.Consumer; import javax.security.auth.callback.Callback; import io.netty.bootstrap.Bootstrap; import io.netty.channel.Channel; import io.netty.channel.EventLoopGroup; import io.netty.channel.nio.NioEventLoopGroup; import io.netty.channel.socket.nio.NioSocketChannel; import me.minidigger.minicraft.client.MiniCraftClient; import me.minidigger.minicraft.model.ServerStatusResponse; import me.minidigger.minicraft.netty.MiniConnection; import me.minidigger.minicraft.netty.pipeline.MiniPipeline; import me.minidigger.minicraft.protocol.PacketState; import me.minidigger.minicraft.protocol.client.ClientStatusResponse; import me.minidigger.minicraft.protocol.server.ServerHandshake; import me.minidigger.minicraft.protocol.server.ServerPlayChatMessage; import me.minidigger.minicraft.protocol.server.ServerStatusRequest; public class Client { private String username; private MiniCraftClient miniCraftClient; public Client(String username, MiniCraftClient miniCraftClient) { this.username = username; this.miniCraftClient = miniCraftClient; } public void sendMessage(MiniConnection connection, String msg) { ServerPlayChatMessage chatMessage = new ServerPlayChatMessage(); chatMessage.setMessage(msg); connection.sendPacket(chatMessage); } public void connect(String hostname, int port, Consumer<MiniConnection> callback) { new Thread(() -> { EventLoopGroup group = new NioEventLoopGroup(); try { Bootstrap bootstrap = new Bootstrap() .group(group) .channel(NioSocketChannel.class) .handler(new MiniPipeline(miniCraftClient.getPacketRegistry(), miniCraftClient.getPacketHandler(), callback)); // wait till connection should be closed bootstrap.connect(hostname, port).sync().channel().closeFuture().sync(); } catch (InterruptedException e) { e.printStackTrace(); } finally { group.shutdownGracefully(); } }, "ConnectionThread " + hostname + ":" + port).start(); } public CompletableFuture<ServerStatusResponse> doServerListPing(String hostname, int port) { CompletableFuture<ServerStatusResponse> future = new CompletableFuture<>(); connect(hostname, port, (connection) -> { ServerHandshake handshake = new ServerHandshake(); handshake.setProtocolVersion(-1); handshake.setServerAddress(hostname); handshake.setServerPort((short) port); handshake.setNextState(PacketState.STATUS); connection.sendPacket(handshake); connection.setState(PacketState.STATUS); miniCraftClient.getPacketHandler().registerCallback(ClientStatusResponse.class, (connection1, clientStatusResponse) -> { connection1.close(); future.complete(clientStatusResponse.getResponse()); }); ServerStatusRequest statusRequest = new ServerStatusRequest(); connection.sendPacket(statusRequest); }); return future; } }
[ "admin@minidigger.me" ]
admin@minidigger.me
b194651555b8a8c7573ff1181ef64df66e2b2af0
bb2f32df072cd27fa90b0892057e66fec9b569d9
/Android/Head_First_Android_Development/Starbuzz/app/src/main/java/com/hfad/starbuzz/DrinkActivity.java
c1fb562e8958973d01ea015f4dad6996a0385d50
[]
no_license
amerelsayed2020/Learning
9417777f28b8d5161e6761d98c3e64cd9f998d3a
689acd3f8de57ce67dc610cae659d88782270668
refs/heads/master
2023-04-27T11:34:54.622157
2020-07-09T15:40:36
2020-07-09T15:40:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,139
java
package com.hfad.starbuzz; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.widget.ImageView; import android.widget.TextView; public class DrinkActivity extends AppCompatActivity { public static final String EXTRA_DRINKNO = "drinkNo"; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_drink); // Get the drink from the intent int drinkNo = (Integer) getIntent().getExtras().get(EXTRA_DRINKNO); Drink drink = Drink.drinks[drinkNo]; // Populate the drink image ImageView photo = (ImageView) findViewById(R.id.photo); photo.setImageResource(drink.getImageResourceId()); photo.setContentDescription(drink.getName()); // Populate the drink name TextView name = (TextView) findViewById(R.id.name); name.setText(drink.getName()); // Populate the drink description TextView description = (TextView) findViewById(R.id.description); description.setText(drink.getDescription()); } }
[ "r.duriancik@gmail.com" ]
r.duriancik@gmail.com
e1fd339f7a46983987684f2acdb3a8a3989163a1
9b32926df2e61d54bd5939d624ec7708044cb97f
/src/main/java/com/rocket/summer/framework/web/method/annotation/ServletModelAttributeMethodProcessor.java
71e2edb7643ea54a28d6614be167bf4d98143c7e
[]
no_license
goder037/summer
d521c0b15c55692f9fd8ba2c0079bfb2331ef722
6b51014e9a3e3d85fb48899aa3898812826378d5
refs/heads/master
2022-10-08T12:23:58.088119
2019-11-19T07:58:13
2019-11-19T07:58:13
89,110,409
1
0
null
null
null
null
UTF-8
Java
false
false
6,475
java
package com.rocket.summer.framework.web.method.annotation; import com.rocket.summer.framework.core.MethodParameter; import com.rocket.summer.framework.core.convert.ConversionService; import com.rocket.summer.framework.core.convert.TypeDescriptor; import com.rocket.summer.framework.core.convert.converter.Converter; import com.rocket.summer.framework.util.StringUtils; import com.rocket.summer.framework.validation.DataBinder; import com.rocket.summer.framework.web.bind.ServletRequestDataBinder; import com.rocket.summer.framework.web.bind.WebDataBinder; import com.rocket.summer.framework.web.bind.support.WebDataBinderFactory; import com.rocket.summer.framework.web.context.request.NativeWebRequest; import com.rocket.summer.framework.web.context.request.RequestAttributes; import com.rocket.summer.framework.web.servlet.HandlerMapping; import javax.servlet.ServletRequest; import java.util.Collections; import java.util.Map; /** * A Servlet-specific {@link com.rocket.summer.framework.web.method.annotation.ModelAttributeMethodProcessor} that applies data * binding through a WebDataBinder of type {@link ServletRequestDataBinder}. * * <p>Also adds a fall-back strategy to instantiate the model attribute from a * URI template variable or from a request parameter if the name matches the * model attribute name and there is an appropriate type conversion strategy. * * @author Rossen Stoyanchev * @since 3.1 */ public class ServletModelAttributeMethodProcessor extends ModelAttributeMethodProcessor { /** * @param annotationNotRequired if "true", non-simple method arguments and * return values are considered model attributes with or without a * {@code @ModelAttribute} annotation. */ public ServletModelAttributeMethodProcessor(boolean annotationNotRequired) { super(annotationNotRequired); } /** * Instantiate the model attribute from a URI template variable or from a * request parameter if the name matches to the model attribute name and * if there is an appropriate type conversion strategy. If none of these * are true delegate back to the base class. * @see #createAttributeFromUriValue */ @Override protected final Object createAttribute(String attributeName, MethodParameter parameter, WebDataBinderFactory binderFactory, NativeWebRequest request) throws Exception { String value = getRequestValueForAttribute(attributeName, request); if (value != null) { Object attribute = createAttributeFromRequestValue(value, attributeName, parameter, binderFactory, request); if (attribute != null) { return attribute; } } return super.createAttribute(attributeName, parameter, binderFactory, request); } /** * Obtain a value from the request that may be used to instantiate the * model attribute through type conversion from String to the target type. * <p>The default implementation looks for the attribute name to match * a URI variable first and then a request parameter. * @param attributeName the model attribute name * @param request the current request * @return the request value to try to convert or {@code null} */ protected String getRequestValueForAttribute(String attributeName, NativeWebRequest request) { Map<String, String> variables = getUriTemplateVariables(request); if (StringUtils.hasText(variables.get(attributeName))) { return variables.get(attributeName); } else if (StringUtils.hasText(request.getParameter(attributeName))) { return request.getParameter(attributeName); } else { return null; } } @SuppressWarnings("unchecked") protected final Map<String, String> getUriTemplateVariables(NativeWebRequest request) { Map<String, String> variables = (Map<String, String>) request.getAttribute( HandlerMapping.URI_TEMPLATE_VARIABLES_ATTRIBUTE, RequestAttributes.SCOPE_REQUEST); return (variables != null) ? variables : Collections.<String, String>emptyMap(); } /** * Create a model attribute from a String request value (e.g. URI template * variable, request parameter) using type conversion. * <p>The default implementation converts only if there a registered * {@link Converter} that can perform the conversion. * @param sourceValue the source value to create the model attribute from * @param attributeName the name of the attribute, never {@code null} * @param parameter the method parameter * @param binderFactory for creating WebDataBinder instance * @param request the current request * @return the created model attribute, or {@code null} * @throws Exception */ protected Object createAttributeFromRequestValue(String sourceValue, String attributeName, MethodParameter parameter, WebDataBinderFactory binderFactory, NativeWebRequest request) throws Exception { DataBinder binder = binderFactory.createBinder(request, null, attributeName); ConversionService conversionService = binder.getConversionService(); if (conversionService != null) { TypeDescriptor source = TypeDescriptor.valueOf(String.class); TypeDescriptor target = new TypeDescriptor(parameter); if (conversionService.canConvert(source, target)) { return binder.convertIfNecessary(sourceValue, parameter.getParameterType(), parameter); } } return null; } /** * {@inheritDoc} * <p>Downcast {@link WebDataBinder} to {@link ServletRequestDataBinder} before binding. * @see ServletRequestDataBinderFactory */ @Override protected void bindRequestParameters(WebDataBinder binder, NativeWebRequest request) { ServletRequest servletRequest = request.getNativeRequest(ServletRequest.class); ServletRequestDataBinder servletBinder = (ServletRequestDataBinder) binder; servletBinder.bind(servletRequest); } }
[ "liujie152@hotmail.com" ]
liujie152@hotmail.com
f4241cc5c927d1941ee1762eafa2aa8497616df9
1d34bd77cdf5dc4643bc6bc25aff4870b80639e8
/예전 모음/SpriteManager_04/src/io/thethelab/SpriteManager.java
0835671e2660e93f715531d711d741fb90f29a83
[]
no_license
hapsoa/java_thethelab_workspace
d59d09dedd1217bcd73a010072ebc070ed662459
df61ee3eafd6e9736d31b058ab7954b23ba89bf8
refs/heads/master
2020-03-30T07:17:30.724245
2018-09-30T04:43:22
2018-09-30T04:43:22
150,929,359
0
0
null
null
null
null
UTF-8
Java
false
false
5,325
java
package io.thethelab; import processing.core.PApplet; import processing.core.PImage; import java.util.ArrayList; import java.util.HashMap; public class SpriteManager { private SpriteManager() { } private static HashMap<Integer, ArrayList<PImage>> sprites = new HashMap<>(); public static void loadImage( PApplet pApplet, int state, String path, int column, int row, int sizeX, int sizeY, int spriteCount) { PImage image = pApplet.loadImage(path); int width = image.width; int height = image.height; int startX = column * sizeX; int startY = row * sizeY; ArrayList<PImage> images = new ArrayList<>(); for (int i = 0; i < spriteCount; i++) { PImage img = image.get(startX, startY, sizeX, sizeY); images.add(img); startX += sizeX; if (startY + sizeY > height) throw new IllegalArgumentException("요청한 이미지가 기존 이미지를 넘어감"); if (startX + sizeX > width) { startY += sizeY; startX = column * sizeX; } } if (sprites.containsKey(state)) { throw new IllegalArgumentException("이미 등록된 상태임"); } sprites.put(state, images); } public static void loadImage(PApplet pApplet, int state, String path, int sizeX, int sizeY, int spriteCount, int[] indices) { PImage image = pApplet.loadImage(path); int width = image.width; int height = image.height; int startX; int startY; ArrayList<PImage> images = new ArrayList<>(); for (int i = 0; i < indices.length; i++) { startX = (indices[i]%spriteCount) * sizeX; startY = sizeY * (indices[i]/spriteCount); PImage img = image.get(startX, startY, sizeX, sizeY); images.add(img); // if (startX + sizeX > width) { // startY += sizeY; // startX = indices[0] * sizeX; // } // if (startY + sizeY > height) // throw new IllegalArgumentException("요청한 이미지가 기존 이미지를 넘어감"); } if (sprites.containsKey(state)) { throw new IllegalArgumentException("이미 등록된 상태임"); } sprites.put(state, images); } public static void loadImage(PApplet pApplet, int state, String path, int column, int row, int sizeX, int sizeY, int spriteCount, boolean isLoop) { PImage image = pApplet.loadImage(path); int width = image.width; int height = image.height; int startX = column * sizeX; int startY = row * sizeY; ArrayList<PImage> images = new ArrayList<>(); if (isLoop) { for (int i = 0; i < spriteCount; i++) { PImage img = image.get(startX, startY, sizeX, sizeY); images.add(img); startX += sizeX; if (startX + sizeX > width) { startY += sizeY; startX = column * sizeX; } if (startY + sizeY > height) throw new IllegalArgumentException("요청한 이미지가 기존 이미지를 넘어감"); } startX -= sizeX*2; for (int i = 0; i < spriteCount-2; i++) { PImage img = image.get(startX, startY, sizeX, sizeY); images.add(img); startX -= sizeX; if (startX - sizeX < 0) { startY -= sizeY; startX = (column+spriteCount-1) * sizeX; } if (startY - sizeY < 0) throw new IllegalArgumentException("요청한 이미지가 기존 이미지를 넘어감"); } } else { for (int i = 0; i < spriteCount; i++) { PImage img = image.get(startX, startY, sizeX, sizeY); images.add(img); startX += sizeX; if (startX + sizeX > width) { startY += sizeY; startX = column * sizeX; } if (startY + sizeY > height) throw new IllegalArgumentException("요청한 이미지가 기존 이미지를 넘어감"); } } if (sprites.containsKey(state)) { throw new IllegalArgumentException("이미 등록된 상태임"); } sprites.put(state, images); } public static ArrayList<PImage> getImages(int state) { if (!sprites.containsKey(state)) throw new IllegalArgumentException("state가 없습니다."); return sprites.get(state); } public static PImage getImage(int state, int index) { if (!sprites.containsKey(state)) throw new IllegalArgumentException("state가 없습니다."); ArrayList<PImage> images = sprites.get(state); return images.get(index % images.size()); } }
[ "hapsoa@gmail.com" ]
hapsoa@gmail.com
8d0df393ee018a79d7ee41cc83bb380e0c306871
9985fac3283362b6343b08eaea3ca59f589bc5fb
/spring-restdocs-restassured/src/main/java/org/springframework/restdocs/restassured/RestAssuredRequestConverter.java
852db3a260ca733109475ad298043d4e2d2f7980
[ "Apache-2.0" ]
permissive
seeyoung/spring-restdocs
b38f988631df7fdd8777a8b8c5591a652357412d
9f67eaab708321df32aeac49dac66175a94a06cf
refs/heads/master
2021-01-19T08:30:03.989223
2017-04-07T16:03:32
2017-04-07T16:03:32
87,637,795
1
0
null
2017-04-08T13:59:41
2017-04-08T13:59:41
null
UTF-8
Java
false
false
5,631
java
/* * Copyright 2014-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.restdocs.restassured; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Map.Entry; import com.jayway.restassured.response.Cookie; import com.jayway.restassured.response.Header; import com.jayway.restassured.specification.FilterableRequestSpecification; import com.jayway.restassured.specification.MultiPartSpecification; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.MediaType; import org.springframework.restdocs.operation.OperationRequest; import org.springframework.restdocs.operation.OperationRequestFactory; import org.springframework.restdocs.operation.OperationRequestPart; import org.springframework.restdocs.operation.OperationRequestPartFactory; import org.springframework.restdocs.operation.Parameters; import org.springframework.restdocs.operation.RequestConverter; import org.springframework.restdocs.operation.RequestCookie; import org.springframework.util.FileCopyUtils; import org.springframework.util.StreamUtils; /** * A converter for creating an {@link OperationRequest} from a REST Assured * {@link FilterableRequestSpecification}. * * @author Andy Wilkinson */ class RestAssuredRequestConverter implements RequestConverter<FilterableRequestSpecification> { @Override public OperationRequest convert(FilterableRequestSpecification requestSpec) { return new OperationRequestFactory().create(URI.create(requestSpec.getURI()), HttpMethod.valueOf(requestSpec.getMethod().name()), extractContent(requestSpec), extractHeaders(requestSpec), extractParameters(requestSpec), extractParts(requestSpec), extractCookies(requestSpec)); } private Collection<RequestCookie> extractCookies( FilterableRequestSpecification requestSpec) { Collection<RequestCookie> cookies = new ArrayList<>(); for (Cookie cookie : requestSpec.getCookies()) { cookies.add(new RequestCookie(cookie.getName(), cookie.getValue())); } return cookies; } private byte[] extractContent(FilterableRequestSpecification requestSpec) { return convertContent(requestSpec.getBody()); } private byte[] convertContent(Object content) { if (content instanceof String) { return ((String) content).getBytes(); } else if (content instanceof byte[]) { return (byte[]) content; } else if (content instanceof File) { return copyToByteArray((File) content); } else if (content instanceof InputStream) { return copyToByteArray((InputStream) content); } else if (content == null) { return new byte[0]; } else { throw new IllegalStateException( "Unsupported request content: " + content.getClass().getName()); } } private byte[] copyToByteArray(File file) { try { return FileCopyUtils.copyToByteArray(file); } catch (IOException ex) { throw new IllegalStateException("Failed to read content from file " + file, ex); } } private byte[] copyToByteArray(InputStream inputStream) { try { inputStream.reset(); } catch (IOException ex) { throw new IllegalStateException("Cannot read content from input stream " + inputStream + " due to reset() failure"); } try { return StreamUtils.copyToByteArray(inputStream); } catch (IOException ex) { throw new IllegalStateException( "Failed to read content from input stream " + inputStream, ex); } } private HttpHeaders extractHeaders(FilterableRequestSpecification requestSpec) { HttpHeaders httpHeaders = new HttpHeaders(); for (Header header : requestSpec.getHeaders()) { httpHeaders.add(header.getName(), header.getValue()); } return httpHeaders; } private Parameters extractParameters(FilterableRequestSpecification requestSpec) { Parameters parameters = new Parameters(); for (Entry<String, ?> entry : requestSpec.getQueryParams().entrySet()) { parameters.add(entry.getKey(), entry.getValue().toString()); } for (Entry<String, ?> entry : requestSpec.getRequestParams().entrySet()) { parameters.add(entry.getKey(), entry.getValue().toString()); } for (Entry<String, ?> entry : requestSpec.getFormParams().entrySet()) { parameters.add(entry.getKey(), entry.getValue().toString()); } return parameters; } private Collection<OperationRequestPart> extractParts( FilterableRequestSpecification requestSpec) { List<OperationRequestPart> parts = new ArrayList<>(); for (MultiPartSpecification multiPartSpec : requestSpec.getMultiPartParams()) { HttpHeaders headers = new HttpHeaders(); headers.setContentType( multiPartSpec.getMimeType() == null ? MediaType.TEXT_PLAIN : MediaType.parseMediaType(multiPartSpec.getMimeType())); parts.add(new OperationRequestPartFactory().create( multiPartSpec.getControlName(), multiPartSpec.getFileName(), convertContent(multiPartSpec.getContent()), headers)); } return parts; } }
[ "awilkinson@pivotal.io" ]
awilkinson@pivotal.io
9b4e1331df6dedd5f7808545c370c8e0fd7290db
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
/benchmark/test/smile/interpolation/LaplaceInterpolationTest.java
bc4b779cffe70916c9606b40dcf2578a702d26ec
[]
no_license
STAMP-project/dspot-experiments
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
121487e65cdce6988081b67f21bbc6731354a47f
refs/heads/master
2023-02-07T14:40:12.919811
2019-11-06T07:17:09
2019-11-06T07:17:09
75,710,758
14
19
null
2023-01-26T23:57:41
2016-12-06T08:27:42
null
UTF-8
Java
false
false
1,570
java
/** * ***************************************************************************** * Copyright (c) 2010 Haifeng Li * * 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 smile.interpolation; import org.junit.Assert; import org.junit.Test; /** * * * @author Haifeng Li */ public class LaplaceInterpolationTest { public LaplaceInterpolationTest() { } /** * Test of interpolate method, of class LaplaceInterpolation. */ @Test public void testInterpolate() { System.out.println("interpolate"); double[][] matrix = new double[][]{ new double[]{ 0, Double.NaN }, new double[]{ 1, 2 } }; double error = LaplaceInterpolation.interpolate(matrix); Assert.assertEquals(0, matrix[0][0], 1.0E-7); Assert.assertEquals(1, matrix[1][0], 1.0E-7); Assert.assertEquals(2, matrix[1][1], 1.0E-7); Assert.assertEquals(1, matrix[0][1], 1.0E-7); Assert.assertTrue((error < 1.0E-6)); } }
[ "benjamin.danglot@inria.fr" ]
benjamin.danglot@inria.fr
3613c5057992be884bd51d2e99e0ecdbb00b5d58
9ba3bfc65928a89aee2591f0b2f9920fbe3a53fe
/ym_java/src/main/java/com/yumodev/java/airthmetic/sort/BinaryInsertSort.java
292188f0ab1b60612e7f0e0c65d343a0a52b26b0
[]
no_license
larryzen/yumoAndroid
1989632d6b224d6b8fbd5e9bb30a627a65129a02
4c1e7166eec81290b819c3ebcde435ea72c2e068
refs/heads/master
2022-02-21T03:27:33.836621
2019-10-18T12:22:20
2019-10-18T12:22:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,370
java
package com.yumodev.java.airthmetic.sort; import java.util.Arrays; /** * Created by yumodev on 17/11/16. * 折半插入排序 */ public class BinaryInsertSort { /** * 使用for循环的直接插入。 * @param nums * @return */ public static void binaryInsertSort(int[] nums){ if (nums == null || nums.length <= 1) return; for (int i = 1; i < nums.length; i++){ int low = 0; int high = i - 1; int temp = nums[i]; while (low <= high){ int mid = (low + high )/2; if (temp < nums[mid]){ low = mid + 1; }else{ high = mid - 1; } } int j = i - 1; for (; j >= low; --j){ nums[j + 1] = nums[j]; } nums[low] = temp; } } public static void test(int[] nums){ System.out.println(String.format("before sort: %s", Arrays.toString(nums))); long startTime = System.nanoTime(); binaryInsertSort(nums); long endTime = System.nanoTime(); System.out.println(String.format("time :" + (endTime - startTime)+" result: %s", Arrays.toString(nums))); } public static void main(String[] args){ test(new int[]{10,9,8,7,6,5,4,3,2,1}); } }
[ "yumotingyu@gmail.com" ]
yumotingyu@gmail.com
559dadaf7c67ebdb3664c2008d50c78b0ba9688e
e7861c0ed1b49224b6c4ccf6dbfc63be61a026e5
/JDBC/1월28일 properties적용, 예외처리/bookManager_v3/src/book/mvc/view/BookMenu.java
7ea09826be1636483e538eaa70f5267b9ecebb02
[]
no_license
kdw912001/kh
7d7610b4ddaab286714131d1c9108373f6c920a9
73c511db0723e0bc49258d8d146ba6f8ee9db762
refs/heads/master
2020-04-06T10:19:58.220792
2019-05-03T18:41:57
2019-05-03T18:41:57
157,376,594
1
0
null
null
null
null
UTF-8
Java
false
false
2,665
java
package book.mvc.view; import java.sql.Date; import java.util.HashMap; import java.util.Iterator; import java.util.Scanner; import java.util.Set; import book.mvc.controller.BookController; import book.mvc.model.vo.Book; public class BookMenu { private Scanner sc = new Scanner(System.in); BookController bc = new BookController(); public void displayMenu() { while(true) { System.out.print("*** 도서 관리 프로그램 ***\r\n" + "\r\n" + " 1. 도서 추가 \n" + " 2. 도서 정보 수정 \n" + " 3. 도서 삭제 \n" + " 4. 도서 아이디로 조회 \n" + " 5. 도서 제목으로 조회 \n" + " 6. 도서 목록 전체 조회 \n" + " 9. 끝내기\r\n" + " 번호 선택 : "); switch(sc.nextInt()) { case 1: bc.insertBook(inputBook());break; case 2: bc.updateBook(inputBook(new Book()));break; case 3: bc.deleteBook(inputBookId());break; case 4: displayBook(bc.searchBook(inputBookId()));break; case 5: displayBooks(bc.searchBookTitle(inputBookTitle()));break; case 6: displayBooks(bc.selectAll());break; case 9: System.out.print("프로그램을 종료하시겠습니까? [y:종료,n:취소] : "); if(sc.next().toUpperCase().charAt(0)=='Y'){ return; }else break; default: System.out.println("잘못 입력하셨습니다."); } } } public Book inputBook() { Book b = new Book(); System.out.print("책제목 입력 : "); b.setTitle(sc.next()); System.out.print("저자명 입력 : "); b.setAuthor(sc.next()); System.out.print("출판사 입력 : "); b.setPublisher(sc.next()); System.out.print("출판날짜 입력[yyyy-MM-dd] : "); b.setPublishDate(Date.valueOf(sc.next())); System.out.print("가격 입력 : "); b.setPrice(sc.nextInt()); return b; } public Book inputBook(Book b) { System.out.print("책 제목 입력 : "); b.setTitle(sc.next()); System.out.print("변경할 가격 입력 : "); b.setPrice(sc.nextInt()); return b; } public int inputBookId() { System.out.print("책 ID 입력 : "); return sc.nextInt(); } public String inputBookTitle() { System.out.print("책 제목 입력 : "); return sc.next(); } public void displayBooks(HashMap<Integer, Book> bookMap) { System.out.println("총 "+bookMap.size()+" 권의 책이 있습니다."); Set<Integer> keys = bookMap.keySet(); Iterator<Integer> keyIter = keys.iterator(); while(keyIter.hasNext()) { System.out.println(bookMap.get(keyIter.next())); } } public void displayBook(Book b) { System.out.println(b.toString()); } public void displayError(String message) { System.out.println(message); } }
[ "kdw912001@naver.com" ]
kdw912001@naver.com
a9f867b7908729e7460b71b9cf676fc75767b3e4
ed5159d056e98d6715357d0d14a9b3f20b764f89
/src/irvine/oeis/a020/A020090.java
d166b9d73afaded4cb42beea74fae445e20af8fc
[]
no_license
flywind2/joeis
c5753169cf562939b04dd246f8a2958e97f74558
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
refs/heads/master
2020-09-13T18:34:35.080552
2019-11-19T05:40:55
2019-11-19T05:40:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
424
java
package irvine.oeis.a020; import irvine.math.q.Q; import irvine.math.z.Z; import irvine.oeis.Sequence; /** * A020090 Integer part of <code>Gamma(n+1/2)/Gamma(1/2)</code>. * @author Sean A. Irvine */ public class A020090 implements Sequence { private int mN = -2; private Q mA = Q.ONE; @Override public Z next() { if (++mN >= 0) { mA = mA.multiply(Q.HALF.add(mN)); } return mA.floor(); } }
[ "sean.irvine@realtimegenomics.com" ]
sean.irvine@realtimegenomics.com
3bb0439eb0e41eda7e82e28ca7b75450f2809d06
a5d5384f8ae51cc867bc67d1ae902cff6728116c
/day5/encog/src/main/java/org/encog/ml/data/versatile/missing/MeanMissingHandler.java
e1461ff77a352e3e9c3ff1e86755b966beeeaab7
[]
no_license
joshuajnoble/SecretLifeOfObjects
66be3bca0559014f224b4dbe7030e7651c6b2805
aae0f631860d3f01f1252e8a157bb3425c29596b
refs/heads/master
2020-04-29T03:18:00.959777
2015-06-13T15:53:11
2015-06-13T15:53:11
35,483,832
6
2
null
null
null
null
UTF-8
Java
false
false
1,668
java
/* * Encog(tm) Core v3.3 - Java Version * http://www.heatonresearch.com/encog/ * https://github.com/encog/encog-java-core * Copyright 2008-2014 Heaton Research, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * For more information on Heaton Research copyrights, licenses * and trademarks visit: * http://www.heatonresearch.com/copyright */ package org.encog.ml.data.versatile.missing; import java.io.Serializable; import org.encog.EncogError; import org.encog.ml.data.versatile.NormalizationHelper; import org.encog.ml.data.versatile.columns.ColumnDefinition; /** * Handle missing data by using the mean value of that column. */ public class MeanMissingHandler implements MissingHandler, Serializable { /** * {@inheritDoc} */ @Override public void init(NormalizationHelper normalizationHelper) { } /** * {@inheritDoc} */ @Override public String processString(ColumnDefinition colDef) { throw new EncogError("The mean missing handler only accepts continuous numeric values."); } /** * {@inheritDoc} */ @Override public double processDouble(ColumnDefinition colDef) { return colDef.getMean(); } }
[ "jnoble@teague.com" ]
jnoble@teague.com
eba303c258510c0c5316d5a61708e024adb9e45f
279bffecb84102ab7a91726607a5e4c1d18e961f
/personalcenter/personalcenter-web/src/main/java/com/qcloud/component/personalcenter/web/vo/admin/AdminMySignInMonthVO.java
ed46a1e5b866165739260bf58e34fce05bcc8861
[]
no_license
ChiRains/forest
8b71de51c477f66a134d9b515b58039a8c94c2ee
cf0b41ff83e4cee281078afe338bba792de05052
refs/heads/master
2021-01-19T07:13:19.597344
2016-08-18T01:35:54
2016-08-18T01:35:54
65,869,894
0
2
null
null
null
null
UTF-8
Java
false
false
1,175
java
package com.qcloud.component.personalcenter.web.vo.admin; import java.util.Date; import java.math.BigDecimal; public class AdminMySignInMonthVO { //ID private long id; //用户 private long userId; //年 private int year; //月 private int month; //记录 private String record; public AdminMySignInMonthVO(){ } public AdminMySignInMonthVO(long id,long userId,int year,int month,String record){ this.id = id; this.userId = userId; this.year = year; this.month = month; this.record = record; } public void setId(long id) { this.id = id; } public long getId() { return id; } public void setUserId(long userId) { this.userId = userId; } public long getUserId() { return userId; } public void setYear(int year) { this.year = year; } public int getYear() { return year; } public void setMonth(int month) { this.month = month; } public int getMonth() { return month; } public void setRecord(String record) { this.record = record; } public String getRecord() { return record; } }
[ "dengfei@ed19df75-bd51-b445-9863-9e54940520a8" ]
dengfei@ed19df75-bd51-b445-9863-9e54940520a8
5cd59735d7dc4e30f8d963dad3d85acd674d8d11
640c3f4696ad3459346038ce9074f56bf9f91ee2
/usermanagement-client-controller-entities/src/main/java/ci/gouv/dgbf/system/usermanagement/client/controller/entities/account/User.java
715a6c49b18f5b4baf06088769c708e86b8d8afd
[]
no_license
devlopper/ci.gouv.dgbf.system.usermanagement.client
7094bbf576bbefc4bb44df9f22deeadb97d1b79d
56ac6046036d62eee0bf29c882f65696ce51149e
refs/heads/master
2021-07-26T19:25:56.055354
2019-03-04T12:13:10
2019-03-04T12:13:10
173,736,448
0
0
null
null
null
null
UTF-8
Java
false
false
554
java
package ci.gouv.dgbf.system.usermanagement.client.controller.entities.account; import org.cyk.utility.client.controller.data.Data; public interface User extends Data { @Override User setIdentifier(Object identifier); @Override User setCode(String code); String getElectronicMailAddress(); User setElectronicMailAddress(String electronicMailAddress); UserNaturalPerson getPerson(); User setPerson(UserNaturalPerson person); /**/ String PROPERTY_ELECTRONIC_MAIL_ADDRESS = "electronicMailAddress"; String PROPERTY_PERSON = "person"; }
[ "kycdev@gmail.com" ]
kycdev@gmail.com
3a88b2aad25531f1c1bdba3176be171544fc0ba3
d45bffc33b29dbed78822d522fd2f1569d5cd179
/NIATestAutomation/seltaf/src/com/aqm/staf/framework/core/DataFileUploadFilter.java
72ef2499a6d59dc12f013395ec28bee6bafb0d2c
[]
no_license
Pankaj12121/Seltaf
d3279c4e0bafdcbf1d00474b2adf323ffd967867
b6d519cacaf6e2f2b8118aa81620c1f17fc20a2e
refs/heads/master
2021-04-06T20:07:00.137423
2018-09-20T05:54:22
2018-09-20T05:54:22
125,336,809
0
0
null
null
null
null
UTF-8
Java
false
false
1,189
java
package com.aqm.staf.framework.core; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; import java.util.Properties; public class DataFileUploadFilter { public ArrayList<String> listOfSheetNameForUpload; private Properties prop; private InputStream input; public DataFileUploadFilter() { this.listOfSheetNameForUpload = listOfScenario(scenarioStringSplitToArray(fetchingScenarioNameFromProperties())); } private String fetchingScenarioNameFromProperties() { String toReturn = ""; try { loadProperties(); toReturn = prop.getProperty("DataSheetToBeUploaded"); } catch (IOException e) { e.printStackTrace(); } return toReturn; } private String[] scenarioStringSplitToArray(String strToSplit) { return strToSplit.split(","); } private ArrayList<String> listOfScenario(String[] arrayOfString) { ArrayList<String> toReturn = new ArrayList<String>(); for (String s : arrayOfString) { toReturn.add(s); } return toReturn; } private void loadProperties() throws IOException { prop = new Properties(); input = new FileInputStream("config.properties"); prop.load(input); } }
[ "pankaj.yogi@gmail.com" ]
pankaj.yogi@gmail.com
c0d7b3a7ad5bf628feecb5182db51437e4193c88
99a17f6eb28b677e4e2088a2d9ab50afb8a64155
/app/src/main/java/com/nuowei/smarthome/view/scan/RippleView.java
a9d6a39bbdee69d794904f88fc59babfa62ff10c
[]
no_license
xiaoli1993/KKSmartHome
4ba80ff1208bcbc5d1817087c2ad6f5bc5aff049
6c480619df17c5a4937928c286aceec503c4d229
refs/heads/master
2021-01-01T17:51:49.903587
2017-07-24T11:04:33
2017-07-24T11:04:33
98,181,688
0
0
null
null
null
null
UTF-8
Java
false
false
5,745
java
package com.nuowei.smarthome.view.scan; import android.animation.ObjectAnimator; import android.animation.TypeEvaluator; import android.content.Context; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.util.AttributeSet; import android.util.Log; import android.view.animation.LinearInterpolator; import android.widget.TextView; /** * Created by 10129302 on 15-2-12. */ public class RippleView extends TextView { private static final String tag = RippleView.class.getSimpleName(); private static final int DEFAULT_RIPPLE_COLOR = Color.rgb(0x33, 0x99, 0xcc); /** * 波纹的颜色 */ private int mRippleColor = DEFAULT_RIPPLE_COLOR; /** * 默认的波纹的最小值 */ private int mMinSize = 200; /** * 波纹动画效果是否正在进行 */ private boolean animationRunning = false; private int currentProgress = 0; /** * 动画中波纹的个数 */ private int mRippleNum = 4; /** * //无限长的数值,使动画不停止 */ private int mTotalTime = 1000 * 1000; public static final int MODE_IN = 1; public static final int MODE_OUT = 2; private int mode = MODE_OUT; private int mPeriod = 30; private int mCenterX; private int mCenterY; private int mRadius; private Paint mPaint; private ObjectAnimator mAnimator; public RippleView(Context context) { super(context); initPaint(); initAnimation(); } public RippleView(Context context, AttributeSet attrs) { super(context, attrs); initPaint(); initAnimation(); } public RippleView(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); initPaint(); initAnimation(); } private void initPaint() { mPaint = new Paint(); mPaint.setAntiAlias(true); mPaint.setStyle(Paint.Style.FILL); mPaint.setColor(mRippleColor); } private void initAnimation() { mAnimator = ObjectAnimator.ofInt(this, "currentProgress", 0, 100); mAnimator.setRepeatCount(ObjectAnimator.INFINITE); mAnimator.setRepeatMode(ObjectAnimator.RESTART); mAnimator.setInterpolator(new LinearInterpolator()); mAnimator.setEvaluator(mProgressEvaluator); mAnimator.setDuration(mTotalTime); } public void setMode(int mode) { this.mode = mode; } public void startRippleAnimation() { if (!animationRunning) { mAnimator.start(); animationRunning = true; } } public void stopRippleAnimation() { if (animationRunning) { mAnimator.end(); animationRunning = false; } } public boolean isRippleAnimationRunning() { return animationRunning; } public int getCurrentProgress() { return currentProgress; } public void setCurrentProgress(int currentProgress) { this.currentProgress = currentProgress; this.invalidate(); } @Override protected void onSizeChanged(int w, int h, int oldw, int oldh) { super.onSizeChanged(w, h, oldw, oldh); } @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { //super.onMeasure(widthMeasureSpec, heightMeasureSpec); int resultWidth = 0; int modeWidth = MeasureSpec.getMode(widthMeasureSpec); int sizeWidth = MeasureSpec.getSize(widthMeasureSpec); if (modeWidth == MeasureSpec.EXACTLY) { resultWidth = sizeWidth; } else { resultWidth = mMinSize; if (modeWidth == MeasureSpec.AT_MOST) { resultWidth = Math.min(resultWidth, sizeWidth); } } int resultHeight = 0; int modeHeight = MeasureSpec.getMode(heightMeasureSpec); int sizeHeight = MeasureSpec.getSize(heightMeasureSpec); if (modeHeight == MeasureSpec.EXACTLY) { resultHeight = sizeHeight; } else { resultHeight = mMinSize; if (modeHeight == MeasureSpec.AT_MOST) { resultHeight = Math.min(resultHeight, sizeHeight); } } mCenterX = resultWidth / 2; mCenterY = resultHeight / 2; mRadius = Math.max(resultWidth, resultHeight) / 2; Log.d(tag, "ripple out view radius = " + mRadius + "; width =" + resultWidth + "; height = " + resultHeight); setMeasuredDimension(resultWidth, resultHeight); } @Override public void onDraw(Canvas canvas) { for (int i = 0; i < mRippleNum; i++) { int progress = (currentProgress + i * 100 / (mRippleNum)) % 100; if (mode == 1) progress = 100 - progress; mPaint.setAlpha(255 - 255 * progress / 100); canvas.drawCircle(mCenterX, mCenterY, mRadius * progress / 100, mPaint); } super.onDraw(canvas); } @Override protected void onDetachedFromWindow() { super.onDetachedFromWindow(); if (isRippleAnimationRunning()) stopRippleAnimation(); } /** * 自定义估值器 */ private TypeEvaluator mProgressEvaluator = new TypeEvaluator() { @Override public Object evaluate(float fraction, Object startValue, Object endValue) { fraction = (fraction * mTotalTime / mPeriod) % 100; return fraction; } }; }
[ "554674787@qq.com" ]
554674787@qq.com
8bfa486f7a0b10ae0632e08a740e5b1e19f03f09
abf595a471f4d8bad2acb528f6a9530dc7a918f6
/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/core/TensorArrayPack.java
d7d12c53177bfdf22b4fe5efc7820ed947de4f92
[]
no_license
VonRosenchild/java
428f95655b6e08061f86d720afa9a1fa708f0354
83b7ba249d64e0a76bc848509d7e9d57a23c013b
refs/heads/master
2020-08-09T13:47:03.223777
2019-10-06T17:46:24
2019-10-06T17:47:53
214,100,320
1
0
null
2019-10-10T06:07:31
2019-10-10T06:07:29
null
UTF-8
Java
false
false
3,048
java
/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. =======================================================================*/ // This class has been generated, DO NOT EDIT! package org.tensorflow.op.core; import org.tensorflow.DataType; import org.tensorflow.Operand; import org.tensorflow.Operation; import org.tensorflow.OperationBuilder; import org.tensorflow.Output; import org.tensorflow.Shape; import org.tensorflow.op.PrimitiveOp; import org.tensorflow.op.Scope; import org.tensorflow.op.annotation.Operator; /** * @param <T> data type for {@code value()} output */ @Operator public final class TensorArrayPack<T> extends PrimitiveOp implements Operand<T> { /** * Optional attributes for {@link org.tensorflow.op.core.TensorArrayPack} */ public static class Options { /** * @param elementShape */ public Options elementShape(Shape elementShape) { this.elementShape = elementShape; return this; } private Shape elementShape; private Options() { } } /** * Factory method to create a class wrapping a new TensorArrayPack operation. * * @param scope current scope * @param handle * @param flowIn * @param dtype * @param options carries optional attributes values * @return a new instance of TensorArrayPack */ public static <T> TensorArrayPack<T> create(Scope scope, Operand<String> handle, Operand<Float> flowIn, Class<T> dtype, Options... options) { OperationBuilder opBuilder = scope.env().opBuilder("TensorArrayPack", scope.makeOpName("TensorArrayPack")); opBuilder.addInput(handle.asOutput()); opBuilder.addInput(flowIn.asOutput()); opBuilder = scope.applyControlDependencies(opBuilder); opBuilder.setAttr("dtype", DataType.fromClass(dtype)); if (options != null) { for (Options opts : options) { if (opts.elementShape != null) { opBuilder.setAttr("element_shape", opts.elementShape); } } } return new TensorArrayPack<T>(opBuilder.build()); } /** * @param elementShape */ public static Options elementShape(Shape elementShape) { return new Options().elementShape(elementShape); } /** */ public Output<T> value() { return value; } @Override public Output<T> asOutput() { return value; } private Output<T> value; private TensorArrayPack(Operation operation) { super(operation); int outputIdx = 0; value = operation.output(outputIdx++); } }
[ "samuel.audet@gmail.com" ]
samuel.audet@gmail.com
3454370b4bae682fd4fb45702495cd0bf92202d9
7d591707ed360c86c5f11badf66206bfaed3795b
/src/src/Actual/CharacterOperationsTutorial.java
36738550e0d05b44f3ea15577180a2d85f5149c8
[]
no_license
samuelowino/CodeLabs
9d62014bd6706bb447d55d0f82875d7ea65e8caa
0d8ee6d8e6bb71573b53e64076d5c2a598b64c5f
refs/heads/master
2021-01-15T10:20:24.569102
2017-09-04T12:33:16
2017-09-04T12:33:16
99,579,591
0
0
null
null
null
null
UTF-8
Java
false
false
870
java
package Actual; /** * Created by HACKER on 07/08/2017. */ public class CharacterOperationsTutorial { public static void main(String[] args) { characterOperationTest('n'); } public static void characterOperationTest(Character c) { //basic charater operations System.out.println(c.charValue()); System.out.println(c.equals('f')); System.out.println(c.hashCode()); //More Character Operations System.out.println("Is Letter " + Character.isLetter(c)); System.out.println("Is Digit " + Character.isDigit(c)); System.out.println("Is Whitespace " + Character.isWhitespace(c)); System.out.println("Is Uppercase " + Character.isUpperCase(c)); System.out.println("Is Lowercase " + Character.isLowerCase(c)); System.out.println("toString() " + c.toString()); } }
[ "samuelowino43@yahoo.com" ]
samuelowino43@yahoo.com
b97ea0c593c9b306795428c4a4705eb98ddcfbcc
0fd223b0f3e91f5697c9152408b460264b495fbd
/src/main/java/com/itheima/advice/GlobalExceptionAdvice.java
8a3cdf34196064645353d14ae70c66ddab810ca9
[]
no_license
satan12345/spring_security_management
45173dacd09c01afdcccae6bad5964664b5a8cb2
de13724826fca4c659b70fad9c53f49f94821bfa
refs/heads/master
2022-12-23T23:47:40.110735
2020-02-07T04:07:35
2020-02-07T04:07:35
238,133,192
0
0
null
2022-06-21T02:44:23
2020-02-04T05:49:05
JavaScript
UTF-8
Java
false
false
480
java
package com.itheima.advice; import org.springframework.security.access.AccessDeniedException; import org.springframework.web.bind.annotation.ControllerAdvice; import org.springframework.web.bind.annotation.ExceptionHandler; @ControllerAdvice public class GlobalExceptionAdvice { @ExceptionHandler(AccessDeniedException.class) public String deniedExceptionAdvice(AccessDeniedException e){ //return "forward:/403.jps"; return "redirect:/403.jsp"; } }
[ "jipeng@able-elec.com" ]
jipeng@able-elec.com
ae770129c9874692d13886a3efb30147639bfce4
67204b235db0a42b45a21cee78c8cb6118201837
/src/com/fengling/cms/dao/assist/CmsVoteSubTopicDao.java
84ef8f5971259180549c87bb84de289b405a01fb
[]
no_license
nextflower/fengling
ed5d6f636587c2cd427fb10b12f29a807c7f7f7f
11b6536f6d3c1faf3e8e6629e8cef7f90cb6c7c2
refs/heads/master
2021-01-25T05:35:44.356765
2015-05-05T15:00:41
2015-05-05T15:00:41
33,312,953
0
0
null
null
null
null
UTF-8
Java
false
false
498
java
package com.fengling.cms.dao.assist; import java.util.List; import com.fengling.cms.entity.assist.CmsVoteSubTopic; import com.fengling.common.hibernate3.Updater; public interface CmsVoteSubTopicDao { public List<CmsVoteSubTopic> findByVoteTopic(Integer voteTopicId); public CmsVoteSubTopic findById(Integer id); public CmsVoteSubTopic save(CmsVoteSubTopic bean); public CmsVoteSubTopic updateByUpdater(Updater<CmsVoteSubTopic> updater); public CmsVoteSubTopic deleteById(Integer id); }
[ "dv3333@163.com" ]
dv3333@163.com
82c92fd1383bf119c23ec54542fb8c379899b450
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/MOCKITO-1b-8-2-NSGA_II-LineCoverage:ExceptionType:StackTraceSimilarity/org/mockito/internal/util/reflection/FieldInitializer$ParameterizedConstructorInstantiator_ESTest_scaffolding.java
e62a468b7c883e597fad522ff4fd74db5bc0ff7d
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
494
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Mon Apr 06 09:02:24 UTC 2020 */ package org.mockito.internal.util.reflection; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class FieldInitializer$ParameterizedConstructorInstantiator_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
efa52719f0492e0dd37d559ca6650a6908b747bd
bf56a9f096f5a12c21cc0a18b5355eaed5c9a6c2
/hdcloud-visual/hdcloud-daemon-quartz/src/main/java/com/hodo/hdcloud/daemon/quartz/mapper/SysJobMapper.java
8c67442ce1a9c0b5f8d18b01ea211d9cbd9811f8
[]
no_license
chaochenzhengCSDN/hdcloud
9724078c8295bdb98d89dd0409270c0ae2e574e1
ad7f812835812e3b5fd078c103ff0012697a283f
refs/heads/master
2022-12-15T03:35:09.932170
2020-09-20T13:22:59
2020-09-20T13:22:59
297,081,316
0
1
null
null
null
null
UTF-8
Java
false
false
1,123
java
/* * Copyright (c) 2018-2025, hodo All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * Neither the name of the pig4cloud.com developer nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * Author: 江苏红豆工业互联网有限公司 */ package com.hodo.hdcloud.daemon.quartz.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.hodo.hdcloud.daemon.quartz.entity.SysJob; /** * 定时任务调度表 * * @author frwcloud * @date 2019-01-27 10:04:42 */ public interface SysJobMapper extends BaseMapper<SysJob> { }
[ "1325520624@qq.com" ]
1325520624@qq.com
c70fcda165f8dd18629057614e129a3876b4bd40
0ca75c22c050b6df85b4f0c50879a614c06139e5
/trunk/PrototipoTesis/src/pantallas/PantallaFinalizacionNuevaEstructura.java
d5221143ca243bcdb8f019012a8ab9080ef0751f
[]
no_license
BGCX067/fabricamuebles-svn-to-git
23fe0b21a691647f2eb2f29fb4d8539c532358bd
c841245e9980895cc019ea561a1d3ba33e013c41
refs/heads/master
2016-09-01T08:53:03.050078
2015-12-28T14:25:56
2015-12-28T14:25:56
48,699,139
0
0
null
null
null
null
UTF-8
Java
false
false
7,275
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package pantallas; import clases.GestorGrabarLeerDelDisco; import clases.MuebleEstructura; import java.util.Iterator; import java.util.LinkedList; /** * * @author DanielRH */ public class PantallaFinalizacionNuevaEstructura extends javax.swing.JFrame { /** * Creates new form PantallaFinalizacionNuevaEstructura */ public PantallaFinalizacionNuevaEstructura() { initComponents(); } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jLabel1 = new javax.swing.JLabel(); btnFinalizar = new javax.swing.JButton(); btnAtras = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setResizable(false); jLabel1.setText("¿Esta Seguro de Que Desea Finalizar?"); btnFinalizar.setText("Finalizar"); btnFinalizar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnFinalizarActionPerformed(evt); } }); btnAtras.setText("Atras"); btnAtras.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnAtrasActionPerformed(evt); } }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap(129, Short.MAX_VALUE) .addComponent(btnAtras) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btnFinalizar)) .addGroup(layout.createSequentialGroup() .addGap(47, 47, 47) .addComponent(jLabel1) .addGap(0, 0, Short.MAX_VALUE))) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel1) .addGap(19, 19, 19) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(btnFinalizar) .addComponent(btnAtras)) .addContainerGap(25, Short.MAX_VALUE)) ); pack(); }// </editor-fold>//GEN-END:initComponents private void btnAtrasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAtrasActionPerformed // TODO add your handling code here: PantallaTrabajos pantT=new PantallaTrabajos(); pantT.setMuebleActual(muebleActual); pantT.setVisible(true); this.dispose(); }//GEN-LAST:event_btnAtrasActionPerformed private void btnFinalizarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnFinalizarActionPerformed // TODO add your handling code here: GestorGrabarLeerDelDisco control=new GestorGrabarLeerDelDisco(); if(muebleActual==null) { muebleActual=new MuebleEstructura(); } boolean seEncuentra=false; MuebleEstructura aEliminar=null; MuebleEstructura aux=new MuebleEstructura(); LinkedList lista=control.obtenerLista(aux); Iterator iter = lista.iterator(); while(iter.hasNext()) { aux = (MuebleEstructura)iter.next(); if(aux.getNombre().compareTo(muebleActual.getNombre())==0) { seEncuentra=true; aEliminar=aux; } } if(seEncuentra==true) { System.out.println("Se elimino el repetido"); control.eliminarObjetoGrabarLista(lista,aEliminar); } if(control.grabar(muebleActual)){System.out.println("Se grabo "+muebleActual.getNombre());} PantallaInicialMueble pantCM=new PantallaInicialMueble(); pantCM.setVisible(true); this.dispose(); }//GEN-LAST:event_btnFinalizarActionPerformed /** * @param args the command line arguments */ public static void main(String args[]) { /* * Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* * If Nimbus (introduced in Java SE 6) is not available, stay with the * default look and feel. For details see * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(PantallaFinalizacionNuevaEstructura.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(PantallaFinalizacionNuevaEstructura.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(PantallaFinalizacionNuevaEstructura.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(PantallaFinalizacionNuevaEstructura.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } //</editor-fold> /* * Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new PantallaFinalizacionNuevaEstructura().setVisible(true); } }); } public void setMuebleActual(MuebleEstructura mueble) { muebleActual=mueble; } private MuebleEstructura muebleActual; // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton btnAtras; private javax.swing.JButton btnFinalizar; private javax.swing.JLabel jLabel1; // End of variables declaration//GEN-END:variables }
[ "you@example.com" ]
you@example.com
95565f91d0ecdbe81c94483cca6060b4b711d349
b81e5387080c59ba3e62f0044e6e0ba5f2668c25
/hutool-aop/src/test/java/com/xiaoleilu/hutool/aop/test/AopTest.java
65e5ddb7d07bd1e45c6ebf803762d8243fc33030
[ "Apache-2.0" ]
permissive
AuroraBei/hutool
9929db69ed9d5613587046b514dec45703b4667e
33476ef9b3dd00aff568675435bab95c19d371c4
refs/heads/master
2022-06-24T22:11:16.041414
2017-07-07T12:30:33
2017-07-07T12:30:33
209,718,234
0
0
Apache-2.0
2022-06-21T01:54:29
2019-09-20T06:12:52
Java
UTF-8
Java
false
false
598
java
package com.xiaoleilu.hutool.aop.test; import org.junit.Test; import com.xiaoleilu.hutool.aop.ProxyUtil; import com.xiaoleilu.hutool.aop.aspects.TimeIntervalAspect; import com.xiaoleilu.hutool.lang.Console; /** * AOP模块单元测试 * @author Looly * */ public class AopTest { @Test public void aopTest(){ Animal cat = ProxyUtil.proxy(new Cat(), TimeIntervalAspect.class); cat.eat(); } static interface Animal{ void eat(); } static class Cat implements Animal{ @Override public void eat() { Console.log("猫吃鱼"); } } }
[ "loolly@gmail.com" ]
loolly@gmail.com
0aa359834992c4a994d54f8e9f658a6151ed78dd
66b96cbf26682eb51e6893a45d773481c5118b67
/alidns-20150109/java/src/main/java/com/aliyun/alidns20150109/models/DescribeRecordStatisticsResponse.java
bfe48b8071bb815ce5c43ea3403847ce6bd5703d
[ "Apache-2.0" ]
permissive
atptro/alibabacloud-sdk
4c104535fe77b94a4d5536028874f492d86aa794
65d4a000e4f4059b58ca1bc3d032853aedef4f3f
refs/heads/master
2022-10-17T21:45:07.475716
2020-06-18T07:37:05
2020-06-18T07:37:05
273,171,083
0
0
NOASSERTION
2020-06-18T07:29:22
2020-06-18T07:29:21
null
UTF-8
Java
false
false
1,812
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.alidns20150109.models; import com.aliyun.tea.*; public class DescribeRecordStatisticsResponse extends TeaModel { @NameInMap("RequestId") @Validation(required = true) public String requestId; @NameInMap("Statistics") @Validation(required = true) public DescribeRecordStatisticsResponseStatistics statistics; public static DescribeRecordStatisticsResponse build(java.util.Map<String, ?> map) throws Exception { DescribeRecordStatisticsResponse self = new DescribeRecordStatisticsResponse(); return TeaModel.build(map, self); } public static class DescribeRecordStatisticsResponseStatisticsStatistic extends TeaModel { @NameInMap("Timestamp") @Validation(required = true) public Long timestamp; @NameInMap("Count") @Validation(required = true) public Long count; public static DescribeRecordStatisticsResponseStatisticsStatistic build(java.util.Map<String, ?> map) throws Exception { DescribeRecordStatisticsResponseStatisticsStatistic self = new DescribeRecordStatisticsResponseStatisticsStatistic(); return TeaModel.build(map, self); } } public static class DescribeRecordStatisticsResponseStatistics extends TeaModel { @NameInMap("Statistic") @Validation(required = true) public java.util.List<DescribeRecordStatisticsResponseStatisticsStatistic> statistic; public static DescribeRecordStatisticsResponseStatistics build(java.util.Map<String, ?> map) throws Exception { DescribeRecordStatisticsResponseStatistics self = new DescribeRecordStatisticsResponseStatistics(); return TeaModel.build(map, self); } } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
8c3a913a031943a5452ad97a09f40fbf6c0222b4
fd8fadf30b2e357c1f432a303115ce5bf30ff57c
/src/net/sourceforge/plantuml/salt/factory/ElementFactoryTree.java
4d2e9011a6ecf92e736bb7accfd019036b2adacf
[]
no_license
lixinlin/plantuml-code
6642e452ae8e6834942593a7ecd42f44418b8b6b
f558a8ec50f9ec617528dede774c3f46f1aac5ae
refs/heads/master
2021-06-28T02:24:29.085869
2019-09-22T11:20:25
2019-09-22T11:20:25
214,447,468
0
0
null
2021-02-03T19:33:31
2019-10-11T13:45:25
Java
UTF-8
Java
false
false
3,400
java
/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2020, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML 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. * * PlantUML distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.salt.factory; import net.sourceforge.plantuml.salt.DataSource; import net.sourceforge.plantuml.salt.Dictionary; import net.sourceforge.plantuml.salt.Terminated; import net.sourceforge.plantuml.salt.Terminator; import net.sourceforge.plantuml.salt.element.Element; import net.sourceforge.plantuml.salt.element.ElementTree; import net.sourceforge.plantuml.salt.element.TableStrategy; import net.sourceforge.plantuml.ugraphic.UFont; public class ElementFactoryTree extends AbstractElementFactoryComplex { public ElementFactoryTree(DataSource dataSource, Dictionary dictionary) { super(dataSource, dictionary); } public Terminated<Element> create() { if (ready() == false) { throw new IllegalStateException(); } final String header = getDataSource().next().getElement(); final String textT = getDataSource().next().getElement(); TableStrategy strategy = TableStrategy.DRAW_NONE; if (textT.length() == 2) { strategy = TableStrategy.fromChar(textT.charAt(1)); } final UFont font = UFont.byDefault(12); final ElementTree result = new ElementTree(font, getDictionary(), strategy); boolean takeMe = true; while (getDataSource().peek(0).getElement().equals("}") == false) { final Terminated<String> t = getDataSource().next(); final Terminator terminator = t.getTerminator(); final String s = t.getElement(); if (takeMe) { result.addEntry(s); } else { result.addCellToEntry(s); } takeMe = terminator == Terminator.NEWLINE; } final Terminated<String> next = getDataSource().next(); return new Terminated<Element>(result, next.getTerminator()); } public boolean ready() { final String text = getDataSource().peek(0).getElement(); if (text.equals("{")) { final String text1 = getDataSource().peek(1).getElement(); if (text1.equals("T")) { return true; } if (text1.length() == 2 && text1.startsWith("T")) { final char c = text1.charAt(1); return TableStrategy.fromChar(c) != null; } return false; } return false; } }
[ "arnaud_roques@2bfd43ce-aac2-44f9-bcbc-61bf0d4e0ab5" ]
arnaud_roques@2bfd43ce-aac2-44f9-bcbc-61bf0d4e0ab5
0d531a25814dedd1dbce7c398e81889992b1c99f
1204868f57bbd15757cd79c6838b31c903abd177
/camel-blueprint-salesforce-test-6.2/src/main/java/org/apache/camel/salesforce/dto/ReasonEnum.java
19c8733c023706253ffd35579951f1c9a7c6cdf7
[]
no_license
shivamlakade95/fuse-examples-6.2
aedaeddcad6efcc8e4f85d550c9e2e174b25fb14
f7f9ac9630828dd4e488f80011dbc2e60a7e3e2c
refs/heads/master
2023-05-11T04:05:40.394046
2020-01-02T08:23:34
2020-01-02T08:23:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,159
java
/* * Salesforce DTO generated by camel-salesforce-maven-plugin * Generated on: Thu Sep 03 14:23:16 IST 2015 */ package org.apache.camel.salesforce.dto; import org.codehaus.jackson.annotate.JsonCreator; import org.codehaus.jackson.annotate.JsonValue; /** * Salesforce Enumeration DTO for picklist Reason */ public enum ReasonEnum { // Breakdown BREAKDOWN("Breakdown"), // Equipment Complexity EQUIPMENT_COMPLEXITY("Equipment Complexity"), // Equipment Design EQUIPMENT_DESIGN("Equipment Design"), // Feedback FEEDBACK("Feedback"), // Installation INSTALLATION("Installation"), // Other OTHER("Other"), // Performance PERFORMANCE("Performance"); final String value; private ReasonEnum(String value) { this.value = value; } @JsonValue public String value() { return this.value; } @JsonCreator public static ReasonEnum fromValue(String value) { for (ReasonEnum e : ReasonEnum.values()) { if (e.value.equals(value)) { return e; } } throw new IllegalArgumentException(value); } }
[ "shekhar.csp84@yahoo.co.in" ]
shekhar.csp84@yahoo.co.in
81ac94d22919fb1f76c258583b5717e97b98ad2e
09ffd3c1caea9dfa9541263cb8d4e5d7723fd886
/adult_edu/src/main/java/com/allen/service/eduadmin/recruittype/impl/FindRecruitTypeByCenterIdServiceImpl.java
e09a6ea6abbdbe2b8271529d4c4734987295c43f
[]
no_license
Allen5413/adult_edu
23846545a382cb488d80140a86c56dbadf7281a4
e175832d7e60d0b2725d560e8081b38d108dda54
refs/heads/master
2020-04-05T12:39:02.330647
2017-09-19T02:52:40
2017-09-19T02:52:40
95,195,421
0
0
null
null
null
null
UTF-8
Java
false
false
713
java
package com.allen.service.eduadmin.recruittype.impl; import com.allen.dao.eduadmin.recruittype.RecruitTypeDao; import com.allen.entity.eduadmin.RecruitType; import com.allen.service.eduadmin.recruittype.FindRecruitTypeByCenterIdService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; /** * Created by Allen on 2017/7/3. */ @Service public class FindRecruitTypeByCenterIdServiceImpl implements FindRecruitTypeByCenterIdService { @Autowired private RecruitTypeDao recruitTypeDao; @Override public List<RecruitType> find(long id) throws Exception { return recruitTypeDao.findByCenterId(id); } }
[ "2319772333@qq.com" ]
2319772333@qq.com
d6cf52564e43e0ed85fbd25718aaf36f4c09111d
9e8187c35ef08c67186679f6d472603a8f7b2d6d
/lab4/mujavaHome/result/BubbleSort/traditional_mutants/int_BubbleSort(int)/SDL_4/BubbleSort.java
9116b06afd26d1f368ced78e2b2c4705b820cc80
[]
no_license
cxdzb/software-testing-technology
8b79f99ec859a896042cdf5bccdadfd11f65b64c
5fb1305dd2dd028c035667c71e0abf57a489360b
refs/heads/master
2021-01-09T15:24:42.561680
2020-04-16T06:18:58
2020-04-16T06:18:58
242,354,593
0
0
null
null
null
null
UTF-8
Java
false
false
502
java
// This is a mutant program. // Author : ysma import java.util.Arrays; public class BubbleSort { public int[] BubbleSort( int[] arr ) { int temp; for (int i = 0; i < arr.length - 1;) { for (int j = 0; j < arr.length - i - 1; j++) { if (arr[j + 1] < arr[j]) { temp = arr[j]; arr[j] = arr[j + 1]; arr[j + 1] = temp; } } } return arr; } }
[ "1005968086@qq.com" ]
1005968086@qq.com
7a435be0935d85f9824e5d77a324cc64477105ca
9d9c0d9aba0c3102787a0215621b24dbe7f64b59
/jeecms-common/src/main/java/com/jeecms/common/wechat/bean/request/pay/UnifiedorderRequest.java
f1cabe9661f32c4d3f4935de1533e1a03be1f5ca
[]
no_license
hd19901110/jeecms1.4.1test
b354019c57a06384524d53aa667614c1f4e5a743
4e3e0cb31513e53004aa20c108f79741203becb0
refs/heads/master
2022-12-08T06:10:06.868825
2020-08-31T09:59:19
2020-08-31T09:59:19
285,445,431
0
1
null
null
null
null
UTF-8
Java
false
false
5,553
java
package com.jeecms.common.wechat.bean.request.pay; import com.jeecms.common.wechat.bean.request.pay.common.AbstractPayParams; import com.thoughtworks.xstream.annotations.XStreamAlias; /** * * @Description: 统一下单request * @author: chenming * @date: 2018年9月12日 上午10:40:52 * @Copyright: 江西金磊科技发展有限公司 All rights reserved. * Notice 仅限于授权后使用,禁止非授权传阅以及私自用于商业目的。 */ @XStreamAlias("xml") public class UnifiedorderRequest extends AbstractPayParams{ /** 签名类型*/ @XStreamAlias("signType") private String signType; /** 设备号 可以为终端设备号(门店号或收银设备ID),PC网页或公众号内支付可以传"WEB"*/ private String deviceInfo; /** 商品描述*/ private String body; /** 商品详情*/ private String detail; /** 附加数据*/ private String attach; /** 商户订单号*/ @XStreamAlias("outTradeNo") private String outTradeNo; /** 货币类型,默认为人民币CNY*/ @XStreamAlias("feeType") private String feeType; /** 总金额,传入int类型的数据*/ @XStreamAlias("totalFee") private Long totalFee; /** 终端ip*/ @XStreamAlias("spbillCreateIp") private String spbillCreateIp; /** 交易起始时间-订单生成时间*/ @XStreamAlias("timeStart") private String timeStart; /** 交易结束时间-订单失效时间*/ @XStreamAlias("timeExpire") private String timeExpire; /** 订单优惠标记*/ @XStreamAlias("goodsTag") private String goodsTag; /** 通知url*/ @XStreamAlias("notifyUrl") private String notifyUrl; /** 交易类型 JSAPI,NATIVE,APP*/ @XStreamAlias("tradeType") private String tradeType; /** 商品id trade_type=NATIVE时(即扫码支付),此参数必传*/ @XStreamAlias("productId") private String productId; /** 指定支付方式 no_credit--可限制用户不能使用信用卡支付*/ @XStreamAlias("limitPay") private String limitPay; /** 用户标识(trade_type=JSAPI,此参数必传,用户在商户appid下的唯一标识)*/ private String openid; /** 该字段用于统一下单时上报场景信息,目前支持上报实际门店信息 格式{"store_id":// "SZT10000", "store_name":"腾讯大厦腾大餐厅"}*/ @XStreamAlias("sceneInfo") private String sceneInfo; public String getDeviceInfo() { return deviceInfo; } public void setDeviceInfo(String deviceInfo) { this.deviceInfo = deviceInfo; } public String getBody() { return body; } public void setBody(String body) { this.body = body; } public String getDetail() { return detail; } public void setDetail(String detail) { this.detail = detail; } public String getAttach() { return attach; } public void setAttach(String attach) { this.attach = attach; } public String getOutTradeNo() { return outTradeNo; } public void setOutTradeNo(String outTradeNo) { this.outTradeNo = outTradeNo; } public String getFeeType() { return feeType; } public void setFeeType(String feeType) { this.feeType = feeType; } public Long getTotalFee() { return totalFee; } public void setTotalFee(Long totalFee) { this.totalFee = totalFee; } public String getSpbillCreateIp() { return spbillCreateIp; } public void setSpbillCreateIp(String spbillCreateIp) { this.spbillCreateIp = spbillCreateIp; } public String getTimeStart() { return timeStart; } public void setTimeStart(String timeStart) { this.timeStart = timeStart; } public String getTimeExpire() { return timeExpire; } public void setTimeExpire(String timeExpire) { this.timeExpire = timeExpire; } public String getGoodsTag() { return goodsTag; } public void setGoodsTag(String goodsTag) { this.goodsTag = goodsTag; } public String getNotifyUrl() { return notifyUrl; } public void setNotifyUrl(String notifyUrl) { this.notifyUrl = notifyUrl; } public String getTradeType() { return tradeType; } public void setTradeType(String tradeType) { this.tradeType = tradeType; } public String getProductId() { return productId; } public void setProductId(String productId) { this.productId = productId; } public String getLimitPay() { return limitPay; } public void setLimitPay(String limitPay) { this.limitPay = limitPay; } public String getOpenid() { return openid; } public void setOpenid(String openid) { this.openid = openid; } public String getSceneInfo() { return sceneInfo; } public void setSceneInfo(String sceneInfo) { this.sceneInfo = sceneInfo; } public String getSignType() { return signType; } public void setSignType(String signType) { this.signType = signType; } @Override public String toString() { return "UnifiedorderRequest [sign_type=" + signType + ", device_info=" + deviceInfo + ", body=" + body + ", detail=" + detail + ", attach=" + attach + ", out_trade_no=" + outTradeNo + ", fee_type=" + feeType + ", total_fee=" + totalFee + ", spbill_create_ip=" + spbillCreateIp + ", time_start=" + timeStart + ", time_expire=" + timeExpire + ", goods_tag=" + goodsTag + ", notify_url=" + notifyUrl + ", trade_type=" + tradeType + ", product_id=" + productId + ", limit_pay=" + limitPay + ", openid=" + openid + ", scene_info=" + sceneInfo + "]"; } }
[ "2638177992@qq.com" ]
2638177992@qq.com
9f988fc40dcdedc48ed56c2d2e2ff1b191d84cbe
ca030864a3a1c24be6b9d1802c2353da4ca0d441
/classes7.dex_source_from_JADX/com/facebook/feed/rows/sections/StoryPromotionPartDefinition$3.java
239cd1de2032a4ed2ca5952181e38168370c9b4c
[]
no_license
pxson001/facebook-app
87aa51e29195eeaae69adeb30219547f83a5b7b1
640630f078980f9818049625ebc42569c67c69f7
refs/heads/master
2020-04-07T20:36:45.758523
2018-03-07T09:04:57
2018-03-07T09:04:57
124,208,458
4
0
null
null
null
null
UTF-8
Java
false
false
5,820
java
package com.facebook.feed.rows.sections; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.net.Uri; import android.view.View; import android.view.View.OnClickListener; import com.facebook.adinterfaces.external.logging.AdInterfacesExternalLogger.BoostedComponentModule; import com.facebook.adinterfaces.external.logging.AdInterfacesExternalLogger.Event; import com.facebook.common.fblinks.FBLinks; import com.facebook.common.stringformat.StringFormatUtil; import com.facebook.config.application.Product; import com.facebook.feed.util.story.FeedStoryUtil; import com.facebook.graphql.model.GraphQLAYMTNativeMobileAction; import com.facebook.graphql.model.GraphQLBoostedComponentMessage; import com.facebook.graphql.model.GraphQLError; import com.facebook.graphql.model.GraphQLStory; import com.facebook.graphql.model.StoryActorHelper; import com.facebook.loom.logger.LogEntry.EntryType; import com.facebook.loom.logger.Logger; import com.facebook.tools.dextr.runtime.LogUtils; import com.facebook.ui.dialogs.FbAlertDialogBuilder; import java.util.HashMap; import java.util.Map; /* compiled from: \s+ */ public class StoryPromotionPartDefinition$3 implements OnClickListener { final /* synthetic */ StoryPromotionPartDefinition$State f20416a; final /* synthetic */ GraphQLBoostedComponentMessage f20417b; final /* synthetic */ GraphQLAYMTNativeMobileAction f20418c; final /* synthetic */ StoryPromotionPartDefinition f20419d; public StoryPromotionPartDefinition$3(StoryPromotionPartDefinition storyPromotionPartDefinition, StoryPromotionPartDefinition$State storyPromotionPartDefinition$State, GraphQLBoostedComponentMessage graphQLBoostedComponentMessage, GraphQLAYMTNativeMobileAction graphQLAYMTNativeMobileAction) { this.f20419d = storyPromotionPartDefinition; this.f20416a = storyPromotionPartDefinition$State; this.f20417b = graphQLBoostedComponentMessage; this.f20418c = graphQLAYMTNativeMobileAction; } public void onClick(final View view) { Object a; int a2 = Logger.a(2, EntryType.UI_INPUT_START, -628863836); final BoostedComponentModule boostedComponentModule = StoryPromotionPartDefinition.e(this.f20419d, this.f20416a.f20434h) ? BoostedComponentModule.BOOSTED_EVENT_MOBILE_MODULE : BoostedComponentModule.BOOSTED_POST_MOBILE_MODULE; StoryPromotionPartDefinition storyPromotionPartDefinition = this.f20419d; StoryPromotionPartDefinition$State storyPromotionPartDefinition$State = this.f20416a; Object obj = null; GraphQLStory graphQLStory = storyPromotionPartDefinition$State.f20434h; Map hashMap = new HashMap(); hashMap.put("post_id", graphQLStory.ai()); hashMap.put("page_id", StoryActorHelper.b(graphQLStory) != null ? StoryActorHelper.b(graphQLStory).H() : null); hashMap.put("placement", storyPromotionPartDefinition$State.f20428b); if (FeedStoryUtil.d(storyPromotionPartDefinition$State.f20434h) != null) { a = FeedStoryUtil.d(storyPromotionPartDefinition$State.f20434h).a(); } else { a = null; } hashMap.put("ineligible_reason", a); if (storyPromotionPartDefinition$State.f20434h.an() != null) { GraphQLBoostedComponentMessage n = storyPromotionPartDefinition$State.f20434h.an().n(); GraphQLError j = n != null ? n.j() : null; if (j != null) { hashMap.put("error_code", String.valueOf(j.a())); hashMap.put("error_type", j.k()); hashMap.put("error_description", j.j()); if (n.a() != null) { obj = n.a().k(); } hashMap.put("link", obj); } } hashMap.put("flow", "ineligible"); final Map map = hashMap; this.f20419d.g.a(boostedComponentModule, Event.EVENT_CREATE_DIALOG_OPEN, map, this.f20419d.i); new FbAlertDialogBuilder(view.getContext()).a(this.f20417b.n().a()).b(this.f20417b.m().a()).a(this.f20418c.j().a(), new DialogInterface.OnClickListener(this) { final /* synthetic */ StoryPromotionPartDefinition$3 f20415d; public void onClick(DialogInterface dialogInterface, int i) { this.f20415d.f20419d.g.a(boostedComponentModule, Event.EVENT_CLIENT_INELIGIBLE_FLOW_ACTION_CLICK, map, this.f20415d.f20419d.i); StoryPromotionPartDefinition storyPromotionPartDefinition = this.f20415d.f20419d; Context context = view.getContext(); String k = this.f20415d.f20418c.k(); Intent intent = new Intent("android.intent.action.VIEW"); intent.setFlags(268435456); intent.putExtra("force_in_app_browser", true); intent.putExtra("should_hide_menu", true); if (storyPromotionPartDefinition.j.j == Product.PAA) { intent.setData(Uri.parse(k)); storyPromotionPartDefinition.e.b(intent, context); } else if (storyPromotionPartDefinition.j.j == Product.FB4A) { intent.setData(Uri.parse(StringFormatUtil.formatStrLocaleSafe(FBLinks.cs, Uri.encode(k)))); storyPromotionPartDefinition.e.a(intent, context); } } }).b(2131234069, new DialogInterface.OnClickListener(this) { final /* synthetic */ StoryPromotionPartDefinition$3 f20411c; public void onClick(DialogInterface dialogInterface, int i) { this.f20411c.f20419d.g.a(boostedComponentModule, Event.EVENT_CLIENT_INELIGIBLE_FLOW_CANCEL, map, this.f20411c.f20419d.i); } }).a().show(); LogUtils.a(2108277190, a2); } }
[ "son.pham@jmango360.com" ]
son.pham@jmango360.com
a669d1f993f6b1dc7bfdb51f7005a0a565d88b45
a49a32409cc716ea547f0e3181e7b9625bfae86f
/src/main/java/com/rmbank/supervision/model/ItemProcessFile.java
4c4cd566a860c61138af0e68dea58bd5505c33ab
[]
no_license
supervision-dev/supervision-manager
7b6728fbd6feac111f4c9dcecc71e09eed797f89
e289d0edb1b36dfb58517b2dfbecd4f39af35669
refs/heads/master
2021-01-21T14:32:18.367738
2018-10-28T12:31:48
2018-10-28T12:31:48
95,291,594
0
0
null
null
null
null
UTF-8
Java
false
false
1,635
java
package com.rmbank.supervision.model; import java.util.Date; public class ItemProcessFile { private Integer id; private Integer itemProcessId; private String fileName; private String fileExt; private String filePath; private Integer preparerOrgId; private Integer preparerId; private Date preparerTime; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public Integer getItemProcessId() { return itemProcessId; } public void setItemProcessId(Integer itemProcessId) { this.itemProcessId = itemProcessId; } public String getFileName() { return fileName; } public void setFileName(String fileName) { this.fileName = fileName; } public String getFileExt() { return fileExt; } public void setFileExt(String fileExt) { this.fileExt = fileExt; } public String getFilePath() { return filePath; } public void setFilePath(String filePath) { this.filePath = filePath; } public Integer getPreparerOrgId() { return preparerOrgId; } public void setPreparerOrgId(Integer preparerOrgId) { this.preparerOrgId = preparerOrgId; } public Integer getPreparerId() { return preparerId; } public void setPreparerId(Integer preparerId) { this.preparerId = preparerId; } public Date getPreparerTime() { return preparerTime; } public void setPreparerTime(Date preparerTime) { this.preparerTime = preparerTime; } }
[ "xiaohutuxian5212@163.com" ]
xiaohutuxian5212@163.com
a55ea5c4aa586797a25f7861f35ff05cb5c766f3
9c1e687a744aa637bc7deba1d7c2c52a17b2dcf4
/testsuite/src/test/java/de/chkal/togglz/test/user/thread/ThreadBasedUsersFilter.java
8c0b7caec030c29fb5c49a1a21fa31058f3465e7
[ "Apache-2.0" ]
permissive
mschroeer/togglz
e02d3948888491232161a1da60cf02f818c50836
9417ddbe35be6c7b90f729d0d2f54beaaae37d09
refs/heads/master
2021-01-18T07:18:43.734459
2012-02-03T17:01:10
2012-02-03T17:01:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,309
java
package de.chkal.togglz.test.user.thread; import java.io.IOException; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.annotation.WebFilter; import de.chkal.togglz.core.user.SimpleFeatureUser; import de.chkal.togglz.core.user.thread.ThreadLocalFeatureUserProvider; @WebFilter(urlPatterns = "/*") public class ThreadBasedUsersFilter implements Filter { @Override public void init(FilterConfig filterConfig) throws ServletException { } @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { String username = request.getParameter("user"); if (username == null) { throw new IllegalArgumentException("Query parameter 'user' must be set!"); } ThreadLocalFeatureUserProvider.setFeatureUser(new SimpleFeatureUser(username, "ck".equals(username))); try { chain.doFilter(request, response); } finally { ThreadLocalFeatureUserProvider.setFeatureUser(null); } } @Override public void destroy() { } }
[ "christian@kaltepoth.de" ]
christian@kaltepoth.de
79f229afacb8e3ee4125f3e5b4a1ec4382557260
5d3d78d93c49823a91f5e1e18bd1565893002321
/src/main/java/org/gwtproject/i18n/shared/cldr/impl/NumberConstantsImpl_es_ES.java
55b503fd9eeadd4a913955a3757d78870e209375
[ "Apache-2.0", "BSD-3-Clause" ]
permissive
vegegoku/gwt-i18n-cldr
ecf38343c0448bab21118c8cdc017ed91b628e71
fdf25c7f898993a50ef9d10fe41ccc44c1ee500f
refs/heads/master
2021-06-11T05:07:57.695293
2020-08-27T08:26:12
2020-08-27T08:26:12
128,426,644
2
1
null
2020-07-17T17:29:11
2018-04-06T17:38:54
Java
UTF-8
Java
false
false
2,390
java
// /* // * Copyright 2012 Google Inc. // * // * Licensed under the Apache License, Version 2.0 (the "License"); you may not // * use this file except in compliance with the License. You may obtain a copy of // * the License at // * // * http://www.apache.org/licenses/LICENSE-2.0 // * // * Unless required by applicable law or agreed to in writing, software // * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT // * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the // * License for the specific language governing permissions and limitations under // * the License. // */ // package org.gwtproject.i18n.shared.cldr.impl; import java.lang.Override; import java.lang.String; import javax.annotation.Generated; import org.gwtproject.i18n.shared.cldr.NumberConstantsImpl; @Generated("gwt-cldr-importer : org.gwtproject.tools.cldr.NumberConstantsProcessor, CLDR version : release-34") public class NumberConstantsImpl_es_ES implements NumberConstantsImpl { @Override public String notANumber() { return "NaN"; } @Override public String decimalPattern() { return "#,##0.###"; } @Override public String decimalSeparator() { return ","; } @Override public String defCurrencyCode() { return "EUR"; } @Override public String exponentialSymbol() { return "E"; } @Override public String groupingSeparator() { return "."; } @Override public String infinity() { return "∞"; } @Override public String minusSign() { return "-"; } @Override public String monetaryGroupingSeparator() { return "."; } @Override public String monetarySeparator() { return ","; } @Override public String percent() { return "%"; } @Override public String percentPattern() { return "#,##0 %"; } @Override public String perMill() { return "‰"; } @Override public String plusSign() { return "+"; } @Override public String scientificPattern() { return "#E0"; } @Override public String currencyPattern() { return "#,##0.00 ¤"; } @Override public String simpleCurrencyPattern() { return "#,##0.00 ¤¤¤¤"; } @Override public String globalCurrencyPattern() { return "#,##0.00 ¤¤¤¤ ¤¤"; } @Override public String zeroDigit() { return "0"; } }
[ "akabme@gmail.com" ]
akabme@gmail.com
690e9a28b5b47777deb737cfa13ac636a4dff33a
960ec353dc7c7b30e2a7062dbdfa987627e16681
/src/photopickerlib/SelectBigImageActivity.java
741ac419811880f4a3115a2fb6ee66f45ce917af
[]
no_license
ruanbaojun1105/BabySave
b9b5a891492076b8baa708028800a563c3eab087
1ad27434f4886e1cfe0ac5f9c6510cf51728c0c8
refs/heads/master
2020-12-30T14:01:31.932948
2018-04-23T01:47:14
2018-04-23T01:47:21
91,282,219
1
0
null
null
null
null
UTF-8
Java
false
false
4,872
java
/** * Program : T1Activity.java * Author : qianj * Create : 2012-5-31 下午4:24:32 * * Copyright 2012 by newyulong Technologies Ltd. * All rights reserved. * * This software is the confidential and proprietary information * of newyulong Technologies Ltd.("Confidential Information"). * You shall not disclose such Confidential Information and shall * use it only in accordance with the terms of the license agreement * you entered into with newyulong Technologies Ltd. * */ package photopickerlib; import android.annotation.SuppressLint; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.support.v4.view.ViewPager; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.view.View; import android.widget.Button; import android.widget.RelativeLayout; import android.widget.TextView; import java.util.ArrayList; import java.util.Date; import java.util.List; import me.hibb.mybaby.android.R; import mybaby.cache.CacheDataTask; import mybaby.cache.GenCaches; import mybaby.ui.MyBabyApp; import photopickerlib.adapters.PhotoPagerAdapter; import photopickerlib.beans.Photo; /** * * @author baojun * */ @Deprecated public class SelectBigImageActivity extends AppCompatActivity implements ViewPager.OnPageChangeListener { private Context context = null; private ViewPager pager = null; private int index = 0; private List<Photo> photoList=new ArrayList<>(); private TextView count_number_tv; private PhotoPagerAdapter adapter; public static final String EXTRA_IMAGE = "SelectBigImageActivity:image"; private static final String cachetype="sd_images"; @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); overridePendingTransition(R.anim.in_imageshow, R.anim.out_imageshow); setContentView(R.layout.image_activity); initData(); initIntentParams(); initView(); } /** * 初始化数据 */ @SuppressLint("NewApi") private void initData() { // TODO Auto-generated method stub context = this; Bundle bundle = getIntent().getExtras(); // Utils.Loge(bundle.getInt("count")+"---"+bundle.getInt("index")); if (bundle==null) return; index = bundle.getInt("index"); photoList.clear(); Object obj=CacheDataTask.getObj(this,cachetype); if (obj!=null){ GenCaches genCaches= (GenCaches) obj; photoList= (List<Photo>) genCaches.getSerializableObj(); adapter=new PhotoPagerAdapter(photoList); }else { index=0; } } /** * 初始化选项参数 */ private void initIntentParams() { Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar_photo_bigimage); setSupportActionBar(toolbar); (findViewById(R.id.actionbar_back)).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { finish(); } }); count_number_tv=((TextView) findViewById(R.id.actionbar_title)); Button mCommitBtn = (Button) findViewById(R.id.commit_btn); mCommitBtn.setVisibility(View.GONE); RelativeLayout layout= (RelativeLayout) findViewById(R.id.bottom_tab_bar); layout.setVisibility(View.GONE); count_number_tv= (TextView) findViewById(R.id.actionbar_title); count_number_tv.setText(index + 1 + "/" + photoList.size()); pager = (ViewPager) findViewById(R.id.image_viewpager); } // 自动加载图片 private void initView() { if (photoList==null) return; pager.setAdapter(adapter); adapter.notifyDataSetChanged(); pager.setCurrentItem(index); pager.setOffscreenPageLimit(5); pager.setOnPageChangeListener(this); } @Override public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { } @Override public void onPageSelected(int position) { count_number_tv.setText(position+1+"/"+photoList.size()); } @Override public void onPageScrollStateChanged(int state) { } @Override public void finish() { // TODO Auto-generated method stub super.finish(); //关闭窗体动画显示 this.overridePendingTransition(R.anim.in_imageshow,R.anim.out_imageshow); } public static void launch(Context context, View transitionView, List<Photo> mDatas,int position) { //ActivityOptionsCompat options =ActivityOptionsCompat.makeSceneTransitionAnimation(context, transitionView, EXTRA_IMAGE); GenCaches cache=new GenCaches(mDatas, String.valueOf(MyBabyApp.version),new Date()); CacheDataTask.putCache(context, cache, cachetype, true); Intent intent = new Intent(context, SelectBigImageActivity.class); //intent.putExtra("image_list", (Serializable) mDatas); intent.putExtra("index", position); //ActivityCompat.startActivity(context, intent, options.toBundle()); context.startActivity(intent); //((Activity)context).overridePendingTransition(R.anim.in_imageshow, R.anim.out_imageshow); } }
[ "401763159@qq.com" ]
401763159@qq.com
b68ffbb78d43f31f3714f0a7b928a282f1380f97
28311c59e6afba09882139b9c3b2534a2de983fe
/sharedcode/src/main/java/com/duy/sharedcode/codec/ZalgoMiniTool.java
95861024da45f3f4da780737cba6a5419a75b133
[ "Apache-2.0" ]
permissive
viztushar/text_converter
8801e124a1097f5a0b827ce51d0768651fbfb1ed
dfc5b890a49fc11ca141abe3ef7d402f04e848ab
refs/heads/master
2021-01-02T23:00:37.411223
2017-08-02T15:17:18
2017-08-02T15:17:18
99,439,260
1
1
null
2017-08-05T17:57:52
2017-08-05T17:57:52
null
UTF-8
Java
false
false
7,211
java
/* * Copyright (c) 2017 by Tran Le Duy * * 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.duy.sharedcode.codec; import android.support.annotation.NonNull; public class ZalgoMiniTool implements Encoder { public static final char[] zalgo_up = {'\u030d', /* Ì? */'\u030e', /* ÌŽ */'\u0304', /* Ì„ */'\u0305', /* Ì… */ '\u033f', /* Ì¿ */'\u0311', /* Ì‘ */'\u0306', /* ̆ */'\u0310', /* Ì? */ '\u0352', /* Í’ */'\u0357', /* Í— */'\u0351', /* Í‘ */'\u0307', /* ̇ */ '\u0308', /* ̈ */'\u030a', /* ÌŠ */'\u0342', /* Í‚ */'\u0343', /* Ì“ */ '\u0344', /* ̈Ì? */'\u034a', /* ÍŠ */'\u034b', /* Í‹ */'\u034c', /* ÍŒ */ '\u0303', /* ̃ */'\u0302', /* Ì‚ */'\u030c', /* ÌŒ */'\u0350', /* Í? */ '\u0300', /* Ì€ */'\u0301', /* Ì? */'\u030b', /* Ì‹ */'\u030f', /* Ì? */ '\u0312', /* Ì’ */'\u0313', /* Ì“ */'\u0314', /* Ì” */'\u033d', /* ̽ */ '\u0309', /* ̉ */'\u0363', /* Í£ */'\u0364', /* ͤ */'\u0365', /* Í¥ */ '\u0366', /* ͦ */'\u0367', /* ͧ */'\u0368', /* ͨ */'\u0369', /* Í© */ '\u036a', /* ͪ */'\u036b', /* Í« */'\u036c', /* ͬ */'\u036d', /* Í­ */ '\u036e', /* Í® */'\u036f', /* ͯ */'\u033e', /* ̾ */'\u035b', /* Í› */ '\u0346', /* ͆ */'\u031a' /* Ìš */ }; public static final char[] zalgo_down = {'\u0316', /* Ì– */'\u0317', /* Ì— */'\u0318', /* ̘ */'\u0319', /* Ì™ */ '\u031c', /* Ìœ */'\u031d', /* Ì? */'\u031e', /* Ìž */'\u031f', /* ÌŸ */ '\u0320', /* Ì */'\u0324', /* ̤ */'\u0325', /* Ì¥ */'\u0326', /* ̦ */ '\u0329', /* Ì© */'\u032a', /* ̪ */'\u032b', /* Ì« */'\u032c', /* ̬ */ '\u032d', /* Ì­ */'\u032e', /* Ì® */'\u032f', /* ̯ */'\u0330', /* ̰ */ '\u0331', /* ̱ */'\u0332', /* ̲ */'\u0333', /* ̳ */'\u0339', /* ̹ */ '\u033a', /* ̺ */'\u033b', /* Ì» */'\u033c', /* ̼ */'\u0345', /* Í… */ '\u0347', /* ͇ */'\u0348', /* ͈ */'\u0349', /* ͉ */'\u034d', /* Í? */ '\u034e', /* ÍŽ */'\u0353', /* Í“ */'\u0354', /* Í” */'\u0355', /* Í• */ '\u0356', /* Í– */'\u0359', /* Í™ */'\u035a', /* Íš */'\u0323' /* Ì£ */ }; //those always stay in the middle public static final char[] zalgo_mid = {'\u0315', /* Ì• */'\u031b', /* Ì› */'\u0340', /* Ì€ */'\u0341', /* Ì? */ '\u0358', /* ͘ */'\u0321', /* Ì¡ */'\u0322', /* Ì¢ */'\u0327', /* ̧ */ '\u0328', /* ̨ */'\u0334', /* Ì´ */'\u0335', /* ̵ */'\u0336', /* ̶ */ '\u034f', /* Í? */'\u035c', /* Íœ */'\u035d', /* Í? */'\u035e', /* Íž */ '\u035f', /* ÍŸ */'\u0360', /* Í */'\u0362', /* Í¢ */'\u0338', /* ̸ */ '\u0337', /* Ì· */'\u0361', /* Í¡ */'\u0489' /* Ò‰_ */ }; // rand funcs //--------------------------------------------------- //gets an int between 0 and max private static int rand(int max) { return (int) Math.floor(Math.random() * max); } //gets a random char from a zalgo char table private static char rand_zalgo(char[] array) { int ind = (int) Math.floor(Math.random() * array.length); return array[ind]; } //hide show element //lookup char to know if its a zalgo char or not private static boolean is_zalgo_char(char c) { for (int i = 0; i < zalgo_up.length; i++) if (c == zalgo_up[i]) return true; for (int i = 0; i < zalgo_down.length; i++) if (c == zalgo_down[i]) return true; for (int i = 0; i < zalgo_mid.length; i++) if (c == zalgo_mid[i]) return true; return false; } public static String convert(String iText, boolean zalgo_opt_mini, boolean zalgo_opt_normal, boolean up, boolean down, boolean mid) { String zalgoTxt = ""; for (int i = 0; i < iText.length(); i++) { if (is_zalgo_char(iText.charAt(i))) continue; int num_up; int num_mid; int num_down; //add the normal character zalgoTxt += iText.charAt(i); //options if (zalgo_opt_mini) { num_up = rand(8); num_mid = rand(2); num_down = rand(8); } else if (zalgo_opt_normal) { num_up = rand(16) / 2 + 1; num_mid = rand(6) / 2; num_down = rand(16) / 2 + 1; } else //maxi { num_up = rand(64) / 4 + 3; num_mid = rand(16) / 4 + 1; num_down = rand(64) / 4 + 3; } if (up) for (int j = 0; j < num_up; j++) zalgoTxt += rand_zalgo(zalgo_up); if (mid) for (int j = 0; j < num_mid; j++) zalgoTxt += rand_zalgo(zalgo_mid); if (down) for (int j = 0; j < num_down; j++) zalgoTxt += rand_zalgo(zalgo_down); } return zalgoTxt; } @NonNull @Override public String encode(@NonNull String text) { return convert(text, true, false, true, true, true); } }
[ "tranleduy1233@gmail.com" ]
tranleduy1233@gmail.com
5f9bf2637c87e29a03882dd369b964281e6e45e4
cc7d090f8b99a90e2fbdb268c00b59e362248ceb
/src/main/java/com/brewer/repository/listener/CervejaEntityListener.java
0a6c0dc2845b1dfda723fc1cd5f040bb72d3dc98
[]
no_license
rfaguiar/springBoot2-brewer
d85d8f7704576603d55fd49286bc1c051c2d6824
d5159cd26ea7977b780bacf7922622fda4b23405
refs/heads/master
2020-03-14T12:31:51.545342
2018-05-29T00:48:51
2018-05-29T00:48:51
131,613,784
0
0
null
null
null
null
UTF-8
Java
false
false
655
java
package com.brewer.repository.listener; import com.brewer.BrewerApplication; import com.brewer.Constantes; import com.brewer.model.Cerveja; import com.brewer.storage.FotoStorage; import org.springframework.beans.factory.annotation.Autowired; import javax.persistence.PostLoad; public class CervejaEntityListener { @PostLoad public void postLoad(final Cerveja cerveja) { FotoStorage fotoStorage = BrewerApplication.getBean(FotoStorage.class); cerveja.setUrlFoto(fotoStorage.getUrl(cerveja.getFotoOuMock())); cerveja.setUrlThumbnailFoto(fotoStorage.getUrl(Constantes.THUMBNAIL_PREFIX + cerveja.getFotoOuMock())); } }
[ "rfaguiar1@gmail.com" ]
rfaguiar1@gmail.com
7521abad517a6f35031fc24d4845ecd90c032486
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
/methods/Method_55710.java
651204e28f4154816f13fb741936a689f46ae304
[]
no_license
P79N6A/icse_20_user_study
5b9c42c6384502fdc9588430899f257761f1f506
8a3676bc96059ea2c4f6d209016f5088a5628f3c
refs/heads/master
2020-06-24T08:25:22.606717
2019-07-25T15:31:16
2019-07-25T15:31:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
486
java
/** * Locks a file. * @param file the file to lock */ private static FileChannel lock(Path file){ try { FileChannel fc=FileChannel.open(file); if (fc.tryLock(0L,Long.MAX_VALUE,true) == null) { if (Configuration.DEBUG_LOADER.get(false)) { apiLog("\tFile is locked by another process, waiting..."); } fc.lock(0L,Long.MAX_VALUE,true); } return fc; } catch ( Exception e) { throw new RuntimeException("Failed to lock file.",e); } }
[ "sonnguyen@utdallas.edu" ]
sonnguyen@utdallas.edu
fca735b85c4bf485d680ce2b3aeabfb5297089ab
893523f6c6d012351cae5ee1a5ed5045a5e78607
/guess-game-server/src/main/java/guess/dto/result/TagCloudAnswerDto.java
2d92e63b54820988d8e727d1c7dd7be4a9becde4
[]
no_license
JugruGroup/guess-game
873d494fcba8b3a8c8794b498078bc4badd11c60
8e982353346f6acf3bdc4c524f72e5f4f508a495
refs/heads/master
2023-08-20T11:38:31.608974
2023-08-19T17:22:04
2023-08-19T17:22:04
213,897,239
10
3
null
2023-09-14T10:20:05
2019-10-09T11:14:04
Java
UTF-8
Java
false
false
862
java
package guess.dto.result; import java.util.Arrays; import java.util.Objects; /** * Tag cloud answer DTO. */ public record TagCloudAnswerDto(SpeakerPairDto speaker, byte[] image) { @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof TagCloudAnswerDto)) return false; TagCloudAnswerDto that = (TagCloudAnswerDto) o; return Objects.equals(speaker, that.speaker) && Arrays.equals(image, that.image); } @Override public int hashCode() { int result = Objects.hash(speaker); result = 31 * result + Arrays.hashCode(image); return result; } @Override public String toString() { return "TagCloudAnswerDto{" + "speaker=" + speaker + ", image=" + Arrays.toString(image) + '}'; } }
[ "dbelob@users.noreply.github.com" ]
dbelob@users.noreply.github.com
fd10d1cdf25529604bba6f906f8e304f06665110
80485d5d8493be37e2100925c425f1b79d4f1059
/src/org/darkstorm/runescape/api/util/PrayerSet.java
3d348793692efc514144977037e19422890c3056
[]
no_license
JBerben/dbotcore
c81f7ae1c8bb179c0dc39cb883f460c842ff4724
3a603fd19131d243486483ecac7fa6f0f44d71c1
refs/heads/master
2023-01-08T20:41:18.687858
2014-04-20T22:05:04
2014-04-20T22:05:04
312,756,468
0
0
null
null
null
null
UTF-8
Java
false
false
472
java
package org.darkstorm.runescape.api.util; public enum PrayerSet { STANDARD("Prayers") { @Override public Prayer[] getPrayers() { return StandardPrayers.values(); } }, ANCIENT("Ancient Curses") { @Override public Prayer[] getPrayers() { return AncientPrayers.values(); } }; private final String name; private PrayerSet(String name) { this.name = name; } public String getName() { return name; } public abstract Prayer[] getPrayers(); }
[ "darkstorm@evilminecraft.net" ]
darkstorm@evilminecraft.net
152dfa17c35e60d8610dda670ce91607191b1efc
313cac74fe44fa4a08c50b2f251e4167f637c049
/retail-fas-1.1.2/retail-fas-api/retail-fas-api-client/src/main/java/cn/wonhigh/retail/fas/api/dto/InsideBizTypeParamDto.java
31f3fa617a55c363a30937e261c31a8a5e6c3277
[]
no_license
gavin2lee/spring-projects
a1d6d495f4a027b5896e39f0de2765aaadc8a9de
6e4a035ae3c9045e880a98e373dd67c8c81bfd36
refs/heads/master
2020-04-17T04:52:41.492652
2016-09-29T16:07:40
2016-09-29T16:07:40
66,710,003
0
3
null
null
null
null
UTF-8
Java
false
false
1,173
java
package cn.wonhigh.retail.fas.api.dto; import java.io.Serializable; public class InsideBizTypeParamDto implements Serializable { /** * */ private static final long serialVersionUID = 145069414257650242L; /** * 公司 */ private String companyNo; /** * 业务类型编号 */ private String bizTypeCode; /** * 状态:1 启用, 0 禁用 */ private Integer status; /** * 店铺编号 */ private String shopNo; public String getCompanyNo() { return companyNo; } public void setCompanyNo(String companyNo) { this.companyNo = companyNo; } public String getBizTypeCode() { return bizTypeCode; } public void setBizTypeCode(String bizTypeCode) { this.bizTypeCode = bizTypeCode; } public Integer getStatus() { return status; } public void setStatus(Integer status) { this.status = status; } @Override public String toString() { return "InsideBizTypeParamDto [companyNo=" + companyNo + ", bizTypeCode=" + bizTypeCode + ", status=" + status+ "]"; } public String getShopNo() { return shopNo; } public void setShopNo(String shopNo) { this.shopNo = shopNo; } }
[ "gavin2lee@163.com" ]
gavin2lee@163.com
9f59192c6d4611be8e2771ad3c34f4f61071dc05
0e06e096a9f95ab094b8078ea2cd310759af008b
/classes49-dex2jar/android/support/coreutils/R.java
0f13ecb49f55e582f16c5025af51c16c4bcfd659
[]
no_license
Manifold0/adcom_decompile
4bc2907a057c73703cf141dc0749ed4c014ebe55
fce3d59b59480abe91f90ba05b0df4eaadd849f7
refs/heads/master
2020-05-21T02:01:59.787840
2019-05-10T00:36:27
2019-05-10T00:36:27
185,856,424
1
2
null
2019-05-10T00:36:28
2019-05-09T19:04:28
Java
UTF-8
Java
false
false
7,673
java
// // Decompiled by Procyon v0.5.34 // package android.support.coreutils; public final class R { public static final class attr { public static final int font = 2130837644; public static final int fontProviderAuthority = 2130837646; public static final int fontProviderCerts = 2130837647; public static final int fontProviderFetchStrategy = 2130837648; public static final int fontProviderFetchTimeout = 2130837649; public static final int fontProviderPackage = 2130837650; public static final int fontProviderQuery = 2130837651; public static final int fontStyle = 2130837652; public static final int fontWeight = 2130837653; } public static final class bool { public static final int abc_action_bar_embed_tabs = 2130903040; } public static final class color { public static final int notification_action_color_filter = 2130968682; public static final int notification_icon_bg_color = 2130968683; public static final int ripple_material_light = 2130968694; public static final int secondary_text_default_material_light = 2130968696; } public static final class dimen { public static final int compat_button_inset_horizontal_material = 2131034207; public static final int compat_button_inset_vertical_material = 2131034208; public static final int compat_button_padding_horizontal_material = 2131034209; public static final int compat_button_padding_vertical_material = 2131034210; public static final int compat_control_corner_material = 2131034211; public static final int notification_action_icon_size = 2131034225; public static final int notification_action_text_size = 2131034226; public static final int notification_big_circle_margin = 2131034227; public static final int notification_content_margin_start = 2131034228; public static final int notification_large_icon_height = 2131034229; public static final int notification_large_icon_width = 2131034230; public static final int notification_main_column_padding_top = 2131034231; public static final int notification_media_narrow_margin = 2131034232; public static final int notification_right_icon_size = 2131034233; public static final int notification_right_side_padding_top = 2131034234; public static final int notification_small_icon_background_padding = 2131034235; public static final int notification_small_icon_size_as_large = 2131034236; public static final int notification_subtext_size = 2131034237; public static final int notification_top_pad = 2131034238; public static final int notification_top_pad_large_text = 2131034239; } public static final class drawable { public static final int notification_action_background = 2131099838; public static final int notification_bg = 2131099839; public static final int notification_bg_low = 2131099840; public static final int notification_bg_low_normal = 2131099841; public static final int notification_bg_low_pressed = 2131099842; public static final int notification_bg_normal = 2131099843; public static final int notification_bg_normal_pressed = 2131099844; public static final int notification_icon_background = 2131099845; public static final int notification_template_icon_bg = 2131099846; public static final int notification_template_icon_low_bg = 2131099847; public static final int notification_tile_bg = 2131099848; public static final int notify_panel_notification_icon_bg = 2131099849; } public static final class id { public static final int action_container = 2131165198; public static final int action_divider = 2131165200; public static final int action_image = 2131165201; public static final int action_text = 2131165208; public static final int actions = 2131165209; public static final int async = 2131165216; public static final int blocking = 2131165220; public static final int chronometer = 2131165235; public static final int forever = 2131165261; public static final int icon = 2131165264; public static final int icon_group = 2131165265; public static final int info = 2131165269; public static final int italic = 2131165276; public static final int line1 = 2131165297; public static final int line3 = 2131165298; public static final int normal = 2131165311; public static final int notification_background = 2131165312; public static final int notification_main_column = 2131165313; public static final int notification_main_column_container = 2131165314; public static final int right_icon = 2131165329; public static final int right_side = 2131165330; public static final int text = 2131165361; public static final int text2 = 2131165362; public static final int time = 2131165366; public static final int title = 2131165367; } public static final class integer { public static final int status_bar_notification_info_maxnum = 2131230725; } public static final class layout { public static final int notification_action = 2131296302; public static final int notification_action_tombstone = 2131296303; public static final int notification_template_custom_big = 2131296310; public static final int notification_template_icon_group = 2131296311; public static final int notification_template_part_chronometer = 2131296315; public static final int notification_template_part_time = 2131296316; } public static final class string { public static final int status_bar_notification_info_overflow = 2131558558; } public static final class style { public static final int TextAppearance_Compat_Notification = 2131624210; public static final int TextAppearance_Compat_Notification_Info = 2131624211; public static final int TextAppearance_Compat_Notification_Line2 = 2131624213; public static final int TextAppearance_Compat_Notification_Time = 2131624216; public static final int TextAppearance_Compat_Notification_Title = 2131624218; public static final int Widget_Compat_NotificationActionContainer = 2131624327; public static final int Widget_Compat_NotificationActionText = 2131624328; } public static final class styleable { public static final int[] FontFamily; public static final int[] FontFamilyFont; public static final int FontFamilyFont_font = 0; public static final int FontFamilyFont_fontStyle = 1; public static final int FontFamilyFont_fontWeight = 2; public static final int FontFamily_fontProviderAuthority = 0; public static final int FontFamily_fontProviderCerts = 1; public static final int FontFamily_fontProviderFetchStrategy = 2; public static final int FontFamily_fontProviderFetchTimeout = 3; public static final int FontFamily_fontProviderPackage = 4; public static final int FontFamily_fontProviderQuery = 5; static { FontFamily = new int[] { 2130837646, 2130837647, 2130837648, 2130837649, 2130837650, 2130837651 }; FontFamilyFont = new int[] { 2130837644, 2130837652, 2130837653 }; } } }
[ "querky1231@gmail.com" ]
querky1231@gmail.com
d88e820970e61561d34d4a768d36d97286534c18
b9480ea5e7c9eb2a15a89db0a9223bd75c62adec
/app/src/main/java/com/drid/group_reasoning/engine/parser/ast/SentenceNode.java
58b9c6c64a2ff533f4060a06cdd84c5e64a148c6
[]
no_license
alexdrid/GroupReasoning
7c0d22575731b3f73d035bc5a1acefb8da8dea22
9d7be0f285d513d6b3c5c69fe0dd752b143e97f1
refs/heads/master
2021-03-13T14:18:32.953331
2020-11-03T09:33:38
2020-11-03T09:33:38
246,687,843
1
1
null
null
null
null
UTF-8
Java
false
false
201
java
package com.drid.group_reasoning.engine.parser.ast; import com.drid.group_reasoning.engine.parser.visitors.LogicVisitor; public interface SentenceNode { <T> T accept(LogicVisitor<T> visitor); }
[ "=" ]
=
fdfee1419360341164da36683b54419a84ea04a0
13c0ca6ce52eb6475174e22ca1d687e5d0f03a7c
/22/NEWInstance/GetPayDedListRepoController.java
e724a766438994d24b994c581462d296d4b4a653
[]
no_license
MicroRefact/HrEsayWebApiPuneMs
b950fd802fc971b8aaa626905fd5ed37a4dc1c43
76653b5d5c3c58809fe91130d036305d64ffe8d0
refs/heads/main
2023-04-28T20:15:43.128701
2021-05-26T02:32:30
2021-05-26T02:32:30
370,884,069
0
0
null
null
null
null
UTF-8
Java
false
false
1,515
java
import org.springframework.web.bind.annotation.*; import lombok.AllArgsConstructor; @AllArgsConstructor @RestController @CrossOrigin public class GetPayDedListRepoController { private GetPayDedListRepo getpaydedlistrepo; @GetMapping ("/getPayDedList") public List<GetPayDedList> getPayDedList(@RequestParam(name = "month") int month,@RequestParam(name = "year") int year,@RequestParam(name = "empIds") List<Integer> empIds){ return getpaydedlistrepo.getPayDedList(month,year,empIds); } @GetMapping ("/getBonusList") public List<GetPayDedList> getBonusList(@RequestParam(name = "date") String date,@RequestParam(name = "empIds") List<Integer> empIds){ return getpaydedlistrepo.getBonusList(date,empIds); } @GetMapping ("/getLoanList") public List<GetPayDedList> getLoanList(@RequestParam(name = "date") String date,@RequestParam(name = "empIds") List<Integer> empIds){ return getpaydedlistrepo.getLoanList(date,empIds); } @GetMapping ("/getPartialLoanList") public List<GetPayDedList> getPartialLoanList(@RequestParam(name = "month") int month,@RequestParam(name = "year") int year,@RequestParam(name = "empIds") List<Integer> empIds){ return getpaydedlistrepo.getPartialLoanList(month,year,empIds); } @GetMapping ("/getEncashLeaveAmtList") public List<GetPayDedList> getEncashLeaveAmtList(@RequestParam(name = "month") int month,@RequestParam(name = "year") int year,@RequestParam(name = "empIds") List<Integer> empIds){ return getpaydedlistrepo.getEncashLeaveAmtList(month,year,empIds); } }
[ "a81580@alunos.uminho.pt" ]
a81580@alunos.uminho.pt
b5888a66799b614fb9f941221ecb32070ee8774b
95e944448000c08dd3d6915abb468767c9f29d3c
/sources/com/p280ss/caijing/globaliap/p1791d/C45847i.java
3fbe93e2f98723e79bfcf1edb2e62c69f4c25434
[]
no_license
xrealm/tiktok-src
261b1faaf7b39d64bb7cb4106dc1a35963bd6868
90f305b5f981d39cfb313d75ab231326c9fca597
refs/heads/master
2022-11-12T06:43:07.401661
2020-07-04T20:21:12
2020-07-04T20:21:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,899
java
package com.p280ss.caijing.globaliap.p1791d; import java.io.Serializable; /* renamed from: com.ss.caijing.globaliap.d.i */ final class C45847i implements Serializable { /* access modifiers changed from: 0000 */ /* renamed from: a */ public int f117251a; /* access modifiers changed from: 0000 */ /* renamed from: b */ public String f117252b; /* access modifiers changed from: 0000 */ /* renamed from: c */ public String f117253c; /* access modifiers changed from: 0000 */ /* renamed from: d */ public String f117254d; /* access modifiers changed from: 0000 */ /* renamed from: e */ public String f117255e; /* access modifiers changed from: 0000 */ /* renamed from: f */ public String f117256f; /* access modifiers changed from: 0000 */ /* renamed from: g */ public long f117257g; /* access modifiers changed from: 0000 */ /* renamed from: h */ public String f117258h; /* access modifiers changed from: 0000 */ /* renamed from: i */ public String f117259i; /* access modifiers changed from: 0000 */ /* renamed from: j */ public long f117260j; /* access modifiers changed from: 0000 */ /* renamed from: k */ public String f117261k; /* access modifiers changed from: 0000 */ /* renamed from: l */ public String f117262l; /* access modifiers changed from: private */ /* renamed from: m */ public boolean f117263m; /* renamed from: com.ss.caijing.globaliap.d.i$a */ public static class C45848a { /* renamed from: a */ C45847i f117264a = new C45847i(0); /* renamed from: a */ public final C45848a mo111065a(int i) { this.f117264a.f117251a = i; return this; } } private C45847i() { } /* synthetic */ C45847i(byte b) { this(); } }
[ "65450641+Xyzdesk@users.noreply.github.com" ]
65450641+Xyzdesk@users.noreply.github.com
5a6ed8f514be083166c28e3abd72520cc4c4f416
d9986b210d95fad905287a51458fe2f4e02df9a9
/app/src/main/java/com/example/webeinardemo/Selection_page.java
bb5a3f0e8955eafe3e1f95f01cc8f054e8b5a8a0
[]
no_license
hemanth-431/AES_Encryption_Decryption_Mobile
2f3618c5f5e80225af2e004b62946bec61bc02df
f7b1eade5669026cdf46edb1a21fa4ca69cefb73
refs/heads/master
2023-04-25T04:41:29.527751
2021-05-17T03:45:25
2021-05-17T03:45:25
368,047,651
0
0
null
null
null
null
UTF-8
Java
false
false
350
java
package com.example.webeinardemo; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; public class Selection_page extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_selection_page); } }
[ "bandlavhemanth@gmail.com" ]
bandlavhemanth@gmail.com
871e13fbf28aded6db2d5016e807e2a7475b7958
3b150be1b781b17495e43c73daab94a940ba1fef
/MainClient/src/main/java/com/fdl/adapter/GoodsDetailsAdapter.java
43e60201bc8f8bceb85642a2a82a6ed8e40c3aa4
[]
no_license
DreamFly01/SuanNiHen
e43346a86eb156e36b3eb643e176e735811c4024
c10832fb402a011a93923d074d5755b64ccf1d93
refs/heads/master
2022-01-06T21:52:02.597929
2019-08-02T03:06:49
2019-08-02T03:06:49
195,406,683
1
0
null
null
null
null
UTF-8
Java
false
false
631
java
package com.fdl.adapter; import android.support.annotation.Nullable; import com.chad.library.adapter.base.BaseQuickAdapter; import com.chad.library.adapter.base.BaseViewHolder; import java.util.List; /** * <p>desc:<p> * <p>author:DreamFly<p> * <p>creatTime:2019/3/20<p> * <p>changeTime:2019/3/20<p> * <p>version:1<p> */ public class GoodsDetailsAdapter extends BaseQuickAdapter<String,BaseViewHolder> { public GoodsDetailsAdapter(int layoutResId, @Nullable List<String> data) { super(layoutResId, data); } @Override protected void convert(BaseViewHolder helper, String item) { } }
[ "y290206959@163.com" ]
y290206959@163.com
6302cdaaf94b089d39b15222d0829c1a8b8f9b58
dafcdd6347a1be928df01b5a5bf47527f38d029f
/SampleListPopupWindow/src/com/example/samplelistpopupwindow/MainActivity.java
691a5d3973c6afc8700d550a300a415227177015
[]
no_license
sunleesi/android-education-project
b62e63076619cb927490fe1585c6a7a0169c79a5
31c1e520275ba0445b3288e0626fe5717193bd7b
refs/heads/master
2021-01-10T03:06:12.607555
2015-06-01T06:38:54
2015-06-01T06:38:54
36,643,841
0
1
null
null
null
null
UTF-8
Java
false
false
3,154
java
package com.example.samplelistpopupwindow; import java.util.ArrayList; import android.os.Bundle; import android.support.v7.app.ActionBarActivity; import android.support.v7.internal.widget.ListPopupWindow; import android.text.Editable; import android.text.TextWatcher; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.AdapterView; import android.widget.AdapterView.OnItemClickListener; import android.widget.ArrayAdapter; import android.widget.EditText; import android.widget.Toast; public class MainActivity extends ActionBarActivity { EditText editText; ListPopupWindow popupWindow; ArrayAdapter<MovieItem> mAdapter; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); editText = (EditText)findViewById(R.id.editText1); editText.addTextChangedListener(new TextWatcher() { @Override public void onTextChanged(CharSequence s, int start, int before, int count) { if (s.toString().equals("")) { popupWindow.dismiss(); } else { NetworkManager.getInstance().getNaverMovie(MainActivity.this, s.toString(), 1, 10, new NetworkManager.OnResultListener<NaverMovies>(){ @Override public void onSuccess(NaverMovies result) { if (result.items.size() > 0) { mAdapter.clear(); for (MovieItem item : result.items) { mAdapter.add(item); } popupWindow.show(); } else { popupWindow.dismiss(); } } @Override public void onFail(int code) { } }); } } @Override public void beforeTextChanged(CharSequence s, int start, int count, int after) { } @Override public void afterTextChanged(Editable s) { } }); popupWindow = new ListPopupWindow(this); mAdapter = new ArrayAdapter<MovieItem>(this, android.R.layout.simple_list_item_1, new ArrayList<MovieItem>()); popupWindow.setAdapter(mAdapter); popupWindow.setAnchorView(editText); popupWindow.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { MovieItem text = mAdapter.getItem(position); Toast.makeText(MainActivity.this, "item : " + text, Toast.LENGTH_SHORT).show(); editText.setText(text.title); popupWindow.dismiss(); } }); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.main, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { // Handle action bar item clicks here. The action bar will // automatically handle clicks on the Home/Up button, so long // as you specify a parent activity in AndroidManifest.xml. int id = item.getItemId(); if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); } }
[ "dongja94@gmail.com" ]
dongja94@gmail.com
0b61f5cc7b99043e92770ac490da60568abfc5ee
ed5159d056e98d6715357d0d14a9b3f20b764f89
/test/irvine/oeis/a003/A003461Test.java
d7f1340d72f07b4a7e44336bfd43b167d9ad00fe
[]
no_license
flywind2/joeis
c5753169cf562939b04dd246f8a2958e97f74558
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
refs/heads/master
2020-09-13T18:34:35.080552
2019-11-19T05:40:55
2019-11-19T05:40:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
195
java
package irvine.oeis.a003; import irvine.oeis.AbstractSequenceTest; /** * Tests the corresponding class. * @author Sean A. Irvine */ public class A003461Test extends AbstractSequenceTest { }
[ "sairvin@gmail.com" ]
sairvin@gmail.com
71ef21756ec99c3bfa5e85784f3fe59200394b99
ddabdaa2cd5e1e44eaaf482176c81206395a96e2
/live-entities/src/main/java/dianfan/entities/IndexCourseBean.java
04e49d1d6c4edf4d29a2d2a3d14ba02d73168e0a
[]
no_license
shuzhen123/huijingschool
0778ea9409a3fdce04a896fe3df7c27b2ecc59b7
67cc0b786feae95271fcc79fa63db8cff013e2f6
refs/heads/master
2020-04-22T13:53:55.776934
2019-02-13T02:23:52
2019-02-13T02:23:52
170,425,383
0
1
null
null
null
null
UTF-8
Java
false
false
925
java
package dianfan.entities; import java.util.List; /** * @ClassName IndexCourseBean * @Description 首页课程分类推荐列表 * @author cjy * @date 2018年2月5日 上午9:17:04 */ public class IndexCourseBean { private String kindid; private String coursetypename; private List<AppRecommendCourse> courses; public String getKindid() { return kindid; } public void setKindid(String kindid) { this.kindid = kindid; } public String getCoursetypename() { return coursetypename; } public void setCoursetypename(String coursetypename) { this.coursetypename = coursetypename; } public List<AppRecommendCourse> getCourses() { return courses; } public void setCourses(List<AppRecommendCourse> courses) { this.courses = courses; } @Override public String toString() { return "IndexCourseBean [kindid=" + kindid + ", coursetypename=" + coursetypename + ", courses=" + courses + "]"; } }
[ "shu.zhen@4lo.me" ]
shu.zhen@4lo.me
a8d3dca0ffd1b27a117b8f322d0675c0c8132dcc
8d9c809a138f29aa3806ecca2f1a90d0e57fff86
/EE_4_myservlet_dao_1/src/edu/hebeu/servlet/LoginServlet.java
e6bf843124e264dc681bd31f9f11757a94f3baf7
[]
no_license
Tyong1365137828/stu-java
e9fe76586749e06e41f55edab0001d2c245fccfd
39b452da284e0a80520359bf2dcf655c2c3d72fb
refs/heads/main
2023-04-06T11:25:18.794632
2021-04-25T07:05:14
2021-04-25T07:05:14
353,631,034
0
0
null
null
null
null
GB18030
Java
false
false
3,284
java
package edu.hebeu.servlet; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import edu.hebeu.daoimpl.StudentDaoImpl; import edu.hebeu.po.Student; /** * Servlet implementation class LoginServlet */ @WebServlet("/servlet/LoginServlet")//注意这和from action的异同 public class LoginServlet extends HttpServlet { private static final long serialVersionUID = 1L; /** * @see HttpServlet#HttpServlet() */ public LoginServlet() { super(); // TODO Auto-generated constructor stub } /** * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse * response) */ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { } /** * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse * response) */ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // 中文乱码解决post方式 request.setCharacterEncoding("utf-8"); // 1.接收前台传来的参数,客户端输入的参数 String stuid = request.getParameter("hid"); String stupwd = request.getParameter("hpwd"); //2、判断是不是合法的用户 StudentDaoImpl studentDaoImpl = new StudentDaoImpl(); System.out.println("下是断点"); Student student = studentDaoImpl.findIdByPassword(stuid,stupwd); System.out.println(student);//在Student里有String toString方法,所以可以直接输出此对象 // 3、返回处理结果 if(student != null) {//如果不是空,即合法用户 // request.setAttribute("hid", stuid);/*给hid这个标签附上stuid的值(即), // 供前台显示使用,但是这样做是错误的, // 前台的值是空的,并不能显示出hid给stuid的 // 值(即hid可以把值给stuid;但是同样的方法, // stuid却不能把刚才的值给hid;这是因为他们不 // 在同一请求(就这个项目而言它们位于2、3请求),导致资源不共享)。 // 那么想要在前台显示就必须用session技术, // 在2之后,3之前创建session;在请求3中使用session, // 使2、3请求资源共享,达到前台显示的效果 // */ //使用session技术存储信息,用于重定向(俩次请求),需要共享资源时使用 HttpSession httpSession = request.getSession(); httpSession.setAttribute("sionstu", student);//可以存对象,变量等等;存放方式为键值对(变量名--值)的方式,相当于MAP方式,而不同于list,set等方式 //重定向 response.sendRedirect(request.getContextPath()+"/admin3/success.jsp"); }else {//否则,即为空,不是合法用户 //转发,在一个请求中完成,不用session技术也可以 request.setAttribute("error", "你的用户名或密码错误,请重新输入!"); request.getRequestDispatcher("/admin3/login.jsp").forward(request, response); } } }
[ "1365137828@qq.com" ]
1365137828@qq.com
bf16fd79a7da09d0e431adab5d3840ca3aede485
a7412e915e3115ea12629eb764aba7b6d7d618fa
/app/src/main/java/com/puyue/www/qiaoge/adapter/home/AutoPollAdapter.java
c1742e1966e9a7e05e0578f6337a143c5a213640
[]
no_license
wang15855271796/qiaoge
a50a93f03a0e5b64562f7f85a2d8d5c7ce5aa56e
b6f8009e72cbf9bdcf293dd9760dcb904e164f00
refs/heads/master
2023-03-22T05:34:09.716442
2021-03-20T07:19:30
2021-03-20T07:19:30
349,652,900
0
0
null
null
null
null
UTF-8
Java
false
false
6,547
java
package com.puyue.www.qiaoge.adapter.home; import android.content.Context; import android.content.Intent; import android.graphics.Paint; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.RelativeLayout; import android.widget.TextView; import com.bumptech.glide.Glide; import com.chad.library.adapter.base.BaseQuickAdapter; import com.chad.library.adapter.base.BaseViewHolder; import com.puyue.www.qiaoge.R; import com.puyue.www.qiaoge.activity.home.SpecialGoodDetailActivity; import com.puyue.www.qiaoge.constant.AppConstant; import com.puyue.www.qiaoge.helper.StringHelper; import com.puyue.www.qiaoge.helper.UserInfoHelper; import com.puyue.www.qiaoge.model.home.CouponModel; import com.puyue.www.qiaoge.utils.SharedPreferencesUtil; import java.util.List; /** * Created by ${王涛} on 2020/8/18 */ public class AutoPollAdapter extends BaseQuickAdapter<CouponModel.DataBean.ActivesBean,BaseViewHolder> { private ImageView iv_pic; private ImageView iv_add; private RelativeLayout rl_group; String flag; ImageView iv_flag; private TextView tv_old_price; private TextView tv_coupon; RelativeLayout rl_coupon; String style; public OnClick onClick; ImageView iv_sale_done; TextView tv_price; TextView tv_desc; List<CouponModel.DataBean.ActivesBean> data; public AutoPollAdapter(String style,int layoutResId, @Nullable List<CouponModel.DataBean.ActivesBean> data) { super(layoutResId, data); this.style = style; this.data = data; } @Override public int getItemCount() { return Integer.MAX_VALUE; } public void setOnclick(OnClick onClick) { this.onClick = onClick; } @Override protected void convert(final BaseViewHolder helper, CouponModel.DataBean.ActivesBean item) { // CouponModel.DataBean.ActivesBean activesBean = data.get(helper.getAdapterPosition()%data.size()); // iv_pic = helper.getView(R.id.iv_pic); // tv_price = helper.getView(R.id.tv_price); // tv_desc = helper.getView(R.id.tv_desc); // iv_sale_done = helper.getView(R.id.iv_sale_done); // iv_flag = helper.getView(R.id.iv_flag); // iv_add = helper.getView(R.id.iv_add); // tv_coupon = helper.getView(R.id.tv_coupon); // rl_coupon = helper.getView(R.id.rl_coupon); // rl_group = helper.getView(R.id.rl_group); // Glide.with(mContext).load(activesBean.getDefaultPic()).into(iv_pic); // helper.setText(R.id.tv_name,activesBean.getActiveName()); // helper.setText(R.id.tv_price,activesBean.getPrice()); // tv_old_price = helper.getView(R.id.tv_old_price); // tv_old_price.getPaint().setFlags(Paint.STRIKE_THRU_TEXT_FLAG); // helper.setText(R.id.tv_old_price,item.getOldPrice()); // tv_old_price.getPaint().setAntiAlias(true);//抗锯齿 // if(item.getDiscount()!=null) { // tv_coupon.setText(item.getDiscount()); // rl_coupon.setVisibility(View.VISIBLE); // }else { // rl_coupon.setVisibility(View.GONE); // } // // if(item.getFlag()==1) { // iv_sale_done.setVisibility(View.VISIBLE); // Glide.with(mContext).load(item.getSoldOutPic()).into(iv_sale_done); // }else { // iv_sale_done.setVisibility(View.GONE); // } // // if(StringHelper.notEmptyAndNull(UserInfoHelper.getUserId(mContext))) { // if(SharedPreferencesUtil.getString(mContext,"priceType").equals("1")) { // tv_desc.setVisibility(View.GONE); // tv_old_price.setVisibility(View.VISIBLE); // tv_price.setVisibility(View.VISIBLE); // }else { // tv_desc.setVisibility(View.VISIBLE); // tv_old_price.setVisibility(View.GONE); // tv_price.setVisibility(View.GONE); // } // }else { // tv_desc.setVisibility(View.GONE); // tv_old_price.setVisibility(View.VISIBLE); // tv_price.setVisibility(View.VISIBLE); // } // // rl_group.setOnClickListener(new View.OnClickListener() { // @Override // public void onClick(View v) { // if(style.equals("2")) { // Intent intent = new Intent(mContext,SeckillGoodActivity.class); // intent.putExtra(AppConstant.ACTIVEID,item.getActiveId()); // intent.putExtra("priceType",SharedPreferencesUtil.getString(mContext,"priceType")); // intent.putExtra("num","-1"); // mContext.startActivity(intent); // }else { // Intent intent = new Intent(mContext,SpecialGoodDetailActivity.class); // intent.putExtra(AppConstant.ACTIVEID,item.getActiveId()); // intent.putExtra("priceType",SharedPreferencesUtil.getString(mContext,"priceType")); // mContext.startActivity(intent); // } // } // }); // // iv_add.setOnClickListener(new View.OnClickListener() { // @Override // public void onClick(View v) { // if(onClick!=null) { //// if(SharedPreferencesUtil.getString(mContext,"priceType").equals("1")) { //// onClick.shoppingCartOnClick(helper.getAdapterPosition()); //// }else { //// onClick.tipClick(); //// } //// onClick.shoppingCartOnClick(helper.getAdapterPosition()); //// onClick.tipClick(); // if(StringHelper.notEmptyAndNull(UserInfoHelper.getUserId(mContext))) { // if(SharedPreferencesUtil.getString(mContext,"priceType").equals("1")) { // onClick.shoppingCartOnClick(helper.getAdapterPosition()); // }else { // onClick.tipClick(); // } // }else { // onClick.addDialog(); // } // // // } // } // }); } public interface OnClick { void shoppingCartOnClick(int position); void tipClick(); void addDialog(); } }
[ "1433953566@qq.com" ]
1433953566@qq.com
a4276bbab0485a70fef0667a58c8bc53af291c76
b1bc6be0d323f93d6eb0507ac8b545401c1fedcc
/basicKnowledge/src/com/xdc/basic/tools/restserver/jersey/application/CommonApplication.java
0ada0a5fc02ced0462b7d346231ba5e733c9f155
[]
no_license
xdc0209/java-code
5a331ebcae979fe6b672b527e3b533f2bb42866c
9dc5c89d9a1f8d880afff34903d315c3ca8ddbb2
refs/heads/master
2021-01-17T01:28:31.707484
2019-04-16T18:51:47
2019-04-16T18:51:47
9,099,623
7
4
null
null
null
null
UTF-8
Java
false
false
2,487
java
package com.xdc.basic.tools.restserver.jersey.application; import java.util.HashSet; import java.util.Set; import javax.ws.rs.core.Application; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.SerializationFeature; import com.fasterxml.jackson.jaxrs.base.JsonMappingExceptionMapper; import com.fasterxml.jackson.jaxrs.base.JsonParseExceptionMapper; import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider; import com.xdc.basic.tools.restserver.jersey.application.exceptionmapper.common.RESTServiceExceptionMapper; import com.xdc.basic.tools.restserver.jersey.core.filter.authentication.AwsServerAuthenticationFilter; import com.xdc.basic.tools.restserver.jersey.core.filter.authentication.sign.AwsSigner; public class CommonApplication extends Application { /** * 注册方式1 */ @Override public Set<Object> getSingletons() { Set<Object> objects = new HashSet<Object>(); JacksonJsonProvider jacksonJsonProvider = new JacksonJsonProvider(); jacksonJsonProvider.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false); jacksonJsonProvider.configure(SerializationFeature.INDENT_OUTPUT, false); jacksonJsonProvider.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); jacksonJsonProvider.configure(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT, true); // 注册provider objects.add(jacksonJsonProvider); // 注册过滤器 objects.add(new AwsServerAuthenticationFilter(new AwsSigner())); // 注册exceptionMapper objects.add(new JsonMappingExceptionMapper()); objects.add(new JsonParseExceptionMapper()); objects.add(new RESTServiceExceptionMapper()); return objects; } /** * 注册方式2 */ @Override public Set<Class<?>> getClasses() { HashSet<Class<?>> clazzes = new HashSet<Class<?>>(); // // 注册provider // clazzes.add(JacksonJsonProvider.class); // 不能像注册方式1那样 // // // 注册过滤器 // // clazzes.add(new AwsServerAuthenticationFilter(new AwsSigner())); // 不能像注册方式1那样 // // // 注册exceptionMapper // clazzes.add(JsonMappingExceptionMapper.class); // clazzes.add(JsonParseExceptionMapper.class); // clazzes.add(RESTServiceExceptionMapper.class); return clazzes; } }
[ "xdc0209@qq.com" ]
xdc0209@qq.com
05c56f46b4c121ff7760cbda1d47be246eab3a1e
b6298b6427aa127dc0195e8532bcc1595b5d2634
/partner/partner-service/src/main/java/com/iwhalecloud/retail/partner/service/impl/workflow/InvoiceAuditPassServiceImpl.java
e3217711e3a5c48eab8d40b5b02e4496ed3086b2
[]
no_license
chenmget/spring-cloud-demo
2ecbdeeb5102dc7523ef9fc59a405fc5c77bf6ad
0b4100973d2f6525883e0e73f000ac6e9c0b9060
refs/heads/release
2022-07-17T13:41:20.595393
2020-04-02T07:40:19
2020-04-02T07:40:19
249,857,665
1
3
null
2022-06-29T18:02:22
2020-03-25T01:23:07
Java
UTF-8
Java
false
false
1,654
java
package com.iwhalecloud.retail.partner.service.impl.workflow; import com.alibaba.dubbo.config.annotation.Service; import com.alibaba.fastjson.JSON; import com.iwhalecloud.retail.dto.ResultCodeEnum; import com.iwhalecloud.retail.dto.ResultVO; import com.iwhalecloud.retail.partner.common.ParInvoiceConst; import com.iwhalecloud.retail.partner.dto.req.InvoiceAddReq; import com.iwhalecloud.retail.partner.service.InvoiceService; import com.iwhalecloud.retail.partner.service.workflow.InvoiceAuditPassService; import com.iwhalecloud.retail.workflow.config.InvokeRouteServiceRequest; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @Slf4j @Component @Service public class InvoiceAuditPassServiceImpl implements InvoiceAuditPassService { @Autowired private InvoiceService invoiceService; @Override public ResultVO run(InvokeRouteServiceRequest params) { log.info("InvoiceAuditPassServiceImpl.run params={}", JSON.toJSONString(params)); if (params == null) { log.info("InvoiceAuditPassServiceImpl.run LACK_OF_PARAM params={}", JSON.toJSONString(params)); return ResultVO.error(ResultCodeEnum.LACK_OF_PARAM); } String invoiceId = params.getBusinessId(); String vatInvoiceStatus = ParInvoiceConst.VatInvoiceStatus.AUDITED.getCode(); InvoiceAddReq invoiceAddReq = new InvoiceAddReq(); invoiceAddReq.setInvoiceId(invoiceId); invoiceAddReq.setVatInvoiceStatus(vatInvoiceStatus); return invoiceService.createParInvoice(invoiceAddReq); } }
[ "0027007822@iwhalecloud.com" ]
0027007822@iwhalecloud.com
fa73dae38f382f7c5ec9be81e776d390b94371af
2bc2eadc9b0f70d6d1286ef474902466988a880f
/tags/mule-2.0.0-M2/transports/email/src/test/java/org/mule/providers/email/issues/Pop3WithConnectorMule2042TestCase.java
c55c702e9f228e4e3c27199a257bb4276aa60ce7
[]
no_license
OrgSmells/codehaus-mule-git
085434a4b7781a5def2b9b4e37396081eaeba394
f8584627c7acb13efdf3276396015439ea6a0721
refs/heads/master
2022-12-24T07:33:30.190368
2020-02-27T19:10:29
2020-02-27T19:10:29
243,593,543
0
0
null
2022-12-15T23:30:00
2020-02-27T18:56:48
null
UTF-8
Java
false
false
806
java
/* * $Id$ * -------------------------------------------------------------------------------------- * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com * * The software in this package is published under the terms of the CPAL v1.0 * license, a copy of which has been included with this distribution in the * LICENSE.txt file. */ package org.mule.providers.email.issues; import org.mule.providers.email.functional.AbstractEmailFunctionalTestCase; public class Pop3WithConnectorMule2042TestCase extends AbstractEmailFunctionalTestCase { public Pop3WithConnectorMule2042TestCase() { super(65435, STRING_MESSAGE, "pop3", "pop3-with-connector-mule-2042-test.xml"); } public void testReceive() throws Exception { doReceive(); } }
[ "tcarlson@bf997673-6b11-0410-b953-e057580c5b09" ]
tcarlson@bf997673-6b11-0410-b953-e057580c5b09
9e36afdf5c749b8ab3a1a31ae40f4ec273a45476
7c88e6cd7c2604a9bfebd197a9f192bdddfbcb7c
/Java/src/main/java/Advanced/Concurrent/Thread/ThreadInterruptDemo.java
83757a96266c090165665b0da75963c91c5b144f
[]
no_license
fcy-nienan/Image
1bca0a42085d681f73f41420a242e2c4b542f0e7
168bc4b5a50d5887693ac4ac44bbee3447e84105
refs/heads/develop
2022-12-24T04:33:53.026049
2022-07-27T16:31:10
2022-07-27T16:31:10
154,528,986
0
0
null
2022-12-16T01:43:43
2018-10-24T15:56:29
Java
UTF-8
Java
false
false
4,034
java
package Advanced.Concurrent.Thread; public class ThreadInterruptDemo { public static int y; public int x; class test{ public test(){ x=12; y=1; } } static class test1{ public int kkk; public test1(){ y=23; } } static class run1 implements Runnable{ @Override public void run() { while (!Thread.currentThread().isInterrupted()){ doSomeThing(); } } private void doSomeThing(){} } public void test(){ y=23; } public static void main(String[] args) throws InterruptedException { // testMultiInterrupt(); note(); } public static void innerStatic(){ /* * 内部类和静态内部类 * 内部类需要依赖外部类的实例来创建对象 * 内部类隐式地有一个执行外部类的引用 * 静态内部类不需要依赖外部类的实例就可以直接创建对象 * 这只是编译时的概念,当编译成功时就是两个不同的class文件 * */ ThreadInterruptDemo demo=new ThreadInterruptDemo(); test t=demo.new test(); test1 t1=new ThreadInterruptDemo.test1(); System.out.println(ThreadInterruptDemo.y); System.out.println(demo.x); } public static void note() throws InterruptedException { Thread t=new Thread(); //中断状态默认为false,清除中断状态意味着 如果中断状态为true,则改为false // 如果中断状态为false 则改为false // Thread.interrupted();//返回中断状态并清除中断状态 // t.isInterrupted();//返回中断状态 // 以上两个方法都调用了private native boolean isInterrupted(boolean ClearInterrupted); // 本地方法,参数标识是否清除中断状态 // t.interrupt();//置中断状态为true Thread.interrupted(); Thread t1=new Thread(()->{ Thread ttt=Thread.currentThread(); ttt.isInterrupted(); while(!ttt.isInterrupted()){ } System.out.println("Interrupted!"+ttt.isInterrupted()); }); System.out.println(t1.isInterrupted()); t1.start(); System.out.println(t1.isInterrupted()); Thread.sleep(4000); t1.interrupt(); System.out.println(t1.isInterrupted()); // // // System.out.println(t.isInterrupted()); // t.interrupt(); // System.out.println(t.isInterrupted()); // Thread.interrupted(); // System.out.println(t.isInterrupted()); } public static void testMultiInterrupt() throws InterruptedException { Thread t=new Thread(new MultiInterrupt()); System.out.println(t.isInterrupted()); t.start(); Thread.sleep(2000); t.interrupt(); System.out.println("Main:"+t.isInterrupted()); Thread.sleep(2000); System.out.println("Main:"+t.isInterrupted()); t.interrupt(); } static class MultiInterrupt implements Runnable { @Override public void run() { long id=Thread.currentThread().getId(); System.out.println(id+":Start!"); System.out.println(Thread.currentThread().isInterrupted()); try { Thread.sleep(4000); } catch (InterruptedException e) {//抛出异常后,JVM会把这个标志位设置为false System.out.println(id+":第一次中断!"+Thread.currentThread().isInterrupted()); } System.out.println(id+":第一次中断后!"+Thread.currentThread().isInterrupted()); try { Thread.sleep(50000); } catch (InterruptedException e) { System.out.println(id+":第二次中断!"); } System.out.println(Thread.currentThread().isInterrupted()); } } }
[ "807715333@qq.com" ]
807715333@qq.com
40d57a9ded182f15de581490954025c79bd1c45e
065c1f648e8dd061a20147ff9c0dbb6b5bc8b9be
/ant_cluster/14522/src_719.java
c1f6ca4bb44f17182e02a31d7d896ca9ae707f5c
[]
no_license
martinezmatias/GenPat-data-C3
63cfe27efee2946831139747e6c20cf952f1d6f6
b360265a6aa3bb21bd1d64f1fc43c3b37d0da2a4
refs/heads/master
2022-04-25T17:59:03.905613
2020-04-15T14:41:34
2020-04-15T14:41:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,367
java
/* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE.txt file. */ package org.apache.myrmidon.components.type; import java.util.HashMap; import org.apache.avalon.excalibur.i18n.ResourceManager; import org.apache.avalon.excalibur.i18n.Resources; import org.apache.myrmidon.interfaces.type.TypeException; import org.apache.myrmidon.interfaces.type.TypeFactory; /** * This factory acts as a proxy to set of object factorys. * * @author <a href="mailto:peter@apache.org">Peter Donald</a> * @version $Revision$ $Date$ */ public class MultiSourceTypeFactory implements TypeFactory { private final static Resources REZ = ResourceManager.getPackageResources( MultiSourceTypeFactory.class ); ///Parent Selector private final MultiSourceTypeFactory m_parent; ///Map of name->factory list private final HashMap m_factorys = new HashMap(); ///Type expected to be created from factorys private final Class m_type; public MultiSourceTypeFactory( final Class type ) { m_type = type; m_parent = null; } public MultiSourceTypeFactory( final MultiSourceTypeFactory parent ) { m_type = parent.getType(); m_parent = parent; } /** * Populate the ComponentSelector. */ public void register( final String name, final TypeFactory factory ) { m_factorys.put( name, factory ); } /** * Determines if this factory can create instances of a particular type. */ public boolean canCreate( final String name ) { return ( findFactory( name ) != null ); } /** * Create a type instance based on name. * * @param name the name * @return the type instance * @exception TypeException if an error occurs */ public Object create( final String name ) throws TypeException { // Locate the factory to use TypeFactory factory = findFactory( name ); if( null == factory ) { final String message = REZ.getString( "no-factory.error", name ); throw new TypeException( message ); } // Create the object final Object object = factory.create( name ); if( !m_type.isInstance( object ) ) { final String message = REZ.getString( "mismatched-type.error", name, object.getClass().getName() ); throw new TypeException( message ); } return object; } /** * Locates the type factory to use for a particular type. */ private TypeFactory findFactory( final String name ) { TypeFactory factory = getTypeFactory( name ); if( null == factory && null != m_parent ) { factory = m_parent.getTypeFactory( name ); } return factory; } /** * Retrieve type managed by selector. * Used by other instances of TypedComponentSelector. * * @return the type class */ protected final Class getType() { return m_type; } protected final TypeFactory getTypeFactory( final String name ) { return (TypeFactory)m_factorys.get( name ); } }
[ "375833274@qq.com" ]
375833274@qq.com
f0acae79b27ad1588949a528a731b8270df5c113
c260cdee9ce414a63774e07d7a0c4a7cdf55c960
/app/src/main/java/com/example/muslim/quran_explanation_111_adapter.java
5fc9b4ec3439b4506918ead3a797075a0673f7d1
[]
no_license
Mohammedomargallya39/Muslim
15aac37a979163fef3697fdc75b274b9b87ca7d2
612d57a64d29158f513fbfcabf9e5debd0928bc0
refs/heads/master
2023-04-09T03:33:22.699380
2021-04-14T11:37:25
2021-04-14T11:37:25
357,877,819
0
0
null
null
null
null
UTF-8
Java
false
false
1,773
java
package com.example.muslim; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.LinearLayout; import android.widget.TextView; import androidx.annotation.NonNull; import androidx.recyclerview.widget.RecyclerView; import java.util.ArrayList; public class quran_explanation_111_adapter extends RecyclerView.Adapter<quran_explanation_111_adapter.quranExplanation111Holder> { ArrayList<AlmasadEx> almasadExes ; Context context ; public quran_explanation_111_adapter(ArrayList<AlmasadEx> almasadExes, Context context) { this.almasadExes = almasadExes; this.context = context; } class quranExplanation111Holder extends RecyclerView.ViewHolder { TextView textViewExplanation111; LinearLayout linearLayout; public quranExplanation111Holder(@NonNull View itemView) { super(itemView); textViewExplanation111 = itemView.findViewById(R.id.explanation111_item); linearLayout = itemView.findViewById(R.id.ayat_item_explanation_111); } } @NonNull @Override public quranExplanation111Holder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { View view = LayoutInflater.from(context).inflate(R.layout.activity_quran_explanation_111_item, parent , false); return new quranExplanation111Holder(view); } @Override public void onBindViewHolder(@NonNull quranExplanation111Holder holder, int position) { AlmasadEx almasadEx = almasadExes.get(position); holder.textViewExplanation111.setText(almasadEx.getAyat()); } @Override public int getItemCount() { return almasadExes.size(); } }
[ "shakalo789@gmail.com" ]
shakalo789@gmail.com
fe8ca59714f6d8e7927f9661667dc296447c3882
df134b422960de6fb179f36ca97ab574b0f1d69f
/it/unimi/dsi/fastutil/chars/Char2BooleanFunction.java
349915aa28e488334804fa2a28be606492c6bedb
[]
no_license
TheShermanTanker/NMS-1.16.3
bbbdb9417009be4987872717e761fb064468bbb2
d3e64b4493d3e45970ec5ec66e1b9714a71856cc
refs/heads/master
2022-12-29T15:32:24.411347
2020-10-08T11:56:16
2020-10-08T11:56:16
302,324,687
0
1
null
null
null
null
UTF-8
Java
false
false
4,103
java
/* */ package it.unimi.dsi.fastutil.chars; /* */ /* */ import it.unimi.dsi.fastutil.Function; /* */ import it.unimi.dsi.fastutil.SafeMath; /* */ import java.util.function.IntPredicate; /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ @FunctionalInterface /* */ public interface Char2BooleanFunction /* */ extends Function<Character, Boolean>, IntPredicate /* */ { /* */ @Deprecated /* */ default boolean test(int operand) { /* 75 */ return get(SafeMath.safeIntToChar(operand)); /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ default boolean put(char key, boolean value) { /* 89 */ throw new UnsupportedOperationException(); /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ default boolean remove(char key) { /* 111 */ throw new UnsupportedOperationException(); /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ @Deprecated /* */ default Boolean put(Character key, Boolean value) { /* 121 */ char k = key.charValue(); /* 122 */ boolean containsKey = containsKey(k); /* 123 */ boolean v = put(k, value.booleanValue()); /* 124 */ return containsKey ? Boolean.valueOf(v) : null; /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ @Deprecated /* */ default Boolean get(Object key) { /* 134 */ if (key == null) /* 135 */ return null; /* 136 */ char k = ((Character)key).charValue(); /* 137 */ boolean v = get(k); /* 138 */ return (v != defaultReturnValue() || containsKey(k)) ? Boolean.valueOf(v) : null; /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ @Deprecated /* */ default Boolean remove(Object key) { /* 148 */ if (key == null) /* 149 */ return null; /* 150 */ char k = ((Character)key).charValue(); /* 151 */ return containsKey(k) ? Boolean.valueOf(remove(k)) : null; /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ default boolean containsKey(char key) { /* 166 */ return true; /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ @Deprecated /* */ default boolean containsKey(Object key) { /* 176 */ return (key == null) ? false : containsKey(((Character)key).charValue()); /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ default void defaultReturnValue(boolean rv) { /* 190 */ throw new UnsupportedOperationException(); /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ default boolean defaultReturnValue() { /* 202 */ return false; /* */ } /* */ /* */ boolean get(char paramChar); /* */ } /* Location: C:\Users\Josep\Downloads\Decompile Minecraft\tuinity-1.16.3.jar!\i\\unimi\dsi\fastutil\chars\Char2BooleanFunction.class * Java compiler version: 8 (52.0) * JD-Core Version: 1.1.3 */
[ "tanksherman27@gmail.com" ]
tanksherman27@gmail.com
1fcb4a7a4f6b895058f1a6f0ec12413008321ba2
b733c258761e7d91a7ef0e15ca0e01427618dc33
/cards/src/main/java/org/rnd/jmagic/cards/NullRod.java
b5ab04684160c3a9b6589f7bf71bb34fa245a582
[]
no_license
jmagicdev/jmagic
d43aa3d2288f46a5fa950152486235614c6783e6
40e573f8e6d1cf42603fd05928f42e7080ce0f0d
refs/heads/master
2021-01-20T06:57:51.007411
2014-10-22T03:03:34
2014-10-22T03:03:34
9,589,102
2
0
null
null
null
null
UTF-8
Java
false
false
1,038
java
package org.rnd.jmagic.cards; import org.rnd.jmagic.engine.*; import org.rnd.jmagic.engine.generators.*; import org.rnd.jmagic.engine.patterns.*; @Name("Null Rod") @Types({Type.ARTIFACT}) @ManaCost("2") @ColorIdentity({}) public final class NullRod extends Card { public static final class NullRodAbility0 extends StaticAbility { public NullRodAbility0(GameState state) { super(state, "Activated abilities of artifacts can't be activated."); SimpleEventPattern pattern = new SimpleEventPattern(EventType.CAST_SPELL_OR_ACTIVATE_ABILITY); pattern.put(EventType.Parameter.OBJECT, ActivatedAbilitiesOf.instance(ArtifactPermanents.instance())); ContinuousEffect.Part part = new ContinuousEffect.Part(ContinuousEffectType.PROHIBIT); part.parameters.put(ContinuousEffectType.Parameter.PROHIBITION, Identity.instance()); this.addEffectPart(part); } } public NullRod(GameState state) { super(state); // Activated abilities of artifacts can't be activated. this.addAbility(new NullRodAbility0(state)); } }
[ "robyter@gmail" ]
robyter@gmail
1fcdfd596cab74807e14915a9438d30873b4775b
0a8420f29119ce3037c41ed789b527a094165319
/java-squid/src/test/java/org/sonar/java/ast/parser/grammar/interfaces/InterfaceDeclarationTest.java
9a0a3d18510189ed188cbe6700c07140962374bd
[]
no_license
adwu73/sonar-java
3253defee148e91b40799cc7518532d36e55dc3e
2ef96fd77f3f7fca4eed1d5125400bd40f540ede
refs/heads/master
2021-01-16T20:51:10.925138
2012-12-05T17:04:27
2012-12-05T17:04:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,628
java
/* * Sonar Java * Copyright (C) 2012 SonarSource * dev@sonar.codehaus.org * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 3 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 */ package org.sonar.java.ast.parser.grammar.interfaces; import org.junit.Test; import org.sonar.java.ast.api.JavaGrammar; import org.sonar.java.ast.parser.JavaGrammarImpl; import static org.sonar.sslr.tests.Assertions.assertThat; public class InterfaceDeclarationTest { JavaGrammar g = new JavaGrammarImpl(); @Test public void ok() { g.typeParameters.mock(); g.classTypeList.mock(); g.interfaceBody.mock(); assertThat(g.interfaceDeclaration) .matches("interface identifier typeParameters extends classTypeList interfaceBody") .matches("interface identifier typeParameters interfaceBody") .matches("interface identifier interfaceBody"); } @Test public void realLife() { assertThat(g.interfaceDeclaration) .matches("interface HelloWorld { }"); } }
[ "mandrikov@gmail.com" ]
mandrikov@gmail.com
815737f7aa38e75aa8f2c63dfadb892e0ba5d41d
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.mm/classes.jar/kotlinx/coroutines/b/b.java
81c5346c86fda29a5f81ca3cf438d2d6db09224c
[]
no_license
tsuzcx/qq_apk
0d5e792c3c7351ab781957bac465c55c505caf61
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
refs/heads/main
2022-07-02T10:32:11.651957
2022-02-01T12:41:38
2022-02-01T12:41:38
453,860,108
36
9
null
2022-01-31T09:46:26
2022-01-31T02:43:22
Java
UTF-8
Java
false
false
3,904
java
package kotlinx.coroutines.b; import com.tencent.matrix.trace.core.AppMethodBeat; import kotlin.Metadata; import kotlin.ResultKt; import kotlin.ah; import kotlin.d.a.a; import kotlin.d.d<-Lkotlin.ah;>; import kotlin.d.f; import kotlin.g.a.m; import kotlinx.coroutines.a.g; import kotlinx.coroutines.a.v; @Metadata(d1={""}, d2={"Lkotlinx/coroutines/flow/CallbackFlowBuilder;", "T", "Lkotlinx/coroutines/flow/ChannelFlowBuilder;", "block", "Lkotlin/Function2;", "Lkotlinx/coroutines/channels/ProducerScope;", "Lkotlin/coroutines/Continuation;", "", "", "Lkotlin/ExtensionFunctionType;", "context", "Lkotlin/coroutines/CoroutineContext;", "capacity", "", "onBufferOverflow", "Lkotlinx/coroutines/channels/BufferOverflow;", "(Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/CoroutineContext;ILkotlinx/coroutines/channels/BufferOverflow;)V", "Lkotlin/jvm/functions/Function2;", "collectTo", "scope", "(Lkotlinx/coroutines/channels/ProducerScope;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "create", "Lkotlinx/coroutines/flow/internal/ChannelFlow;", "kotlinx-coroutines-core"}, k=1, mv={1, 5, 1}, xi=48) final class b<T> extends e<T> { private final m<v<? super T>, kotlin.d.d<? super ah>, Object> aoK; private b(m<? super v<? super T>, ? super kotlin.d.d<? super ah>, ? extends Object> paramm, f paramf, int paramInt, g paramg) { super(paramm, paramf, paramInt, paramg); this.aoK = paramm; } public final Object a(v<? super T> paramv, kotlin.d.d<? super ah> paramd) { AppMethodBeat.i(189131); if ((paramd instanceof a)) { localObject1 = (a)paramd; if ((((a)localObject1).label & 0x80000000) != 0) { ((a)localObject1).label += -2147483648; } } Object localObject2; a locala; for (paramd = (kotlin.d.d<? super ah>)localObject1;; paramd = new a(this, paramd)) { localObject2 = paramd.result; locala = a.aiwj; switch (paramd.label) { default: paramv = new IllegalStateException("call to 'resume' before 'invoke' with coroutine"); AppMethodBeat.o(189131); throw paramv; } } ResultKt.throwOnFailure(localObject2); paramd.L$0 = paramv; paramd.label = 1; Object localObject1 = paramv; if (super.a(paramv, paramd) == locala) { AppMethodBeat.o(189131); return locala; localObject1 = (v)paramd.L$0; ResultKt.throwOnFailure(localObject2); } if (!((v)localObject1).Ij()) { paramv = new IllegalStateException("'awaitClose { yourCallbackOrListener.cancel() }' should be used in the end of callbackFlow block.\nOtherwise, a callback/listener may leak in case of external cancellation.\nSee callbackFlow API documentation for the details."); AppMethodBeat.o(189131); throw paramv; } paramv = ah.aiuX; AppMethodBeat.o(189131); return paramv; } public final kotlinx.coroutines.b.a.e<T> a(f paramf, int paramInt, g paramg) { AppMethodBeat.i(189140); paramf = (kotlinx.coroutines.b.a.e)new b(this.aoK, paramf, paramInt, paramg); AppMethodBeat.o(189140); return paramf; } @Metadata(k=3, mv={1, 5, 1}, xi=48) static final class a extends kotlin.d.b.a.d { Object L$0; int label; a(b<T> paramb, kotlin.d.d<? super a> paramd) { super(); } public final Object invokeSuspend(Object paramObject) { AppMethodBeat.i(189070); this.result = paramObject; this.label |= 0x80000000; paramObject = this.ajxR.a(null, (kotlin.d.d)this); AppMethodBeat.o(189070); return paramObject; } } } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes3.jar * Qualified Name: kotlinx.coroutines.b.b * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
a3ac18c5d7af81d12dcd8c54893f3e4b43e0db13
d36600a9ce3baa019f43fb104723e7c25f483e93
/src/main/java/org/infinispan/tutorial/secondlc/wildfly/local/controller/MemberController.java
d13db7af71734d3074c56b9357107ef90dc305ff
[]
no_license
galderz/infinispan-2lc-tutorial
1b930da2c14b4b12a899c02e99a14c13a563985c
638bd01699cf9340f193adcd4db8c784abe727cc
refs/heads/master
2020-04-05T15:16:28.079533
2017-01-27T17:15:41
2017-01-27T17:15:41
68,283,518
0
1
null
null
null
null
UTF-8
Java
false
false
2,878
java
/* * JBoss, Home of Professional Open Source * Copyright 2015, Red Hat, Inc. and/or its affiliates, and individual * contributors by the @authors tag. See the copyright.txt in the * distribution for a full listing of individual contributors. * * 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.infinispan.tutorial.secondlc.wildfly.local.controller; import javax.annotation.PostConstruct; import javax.enterprise.inject.Model; import javax.enterprise.inject.Produces; import javax.faces.application.FacesMessage; import javax.faces.context.FacesContext; import javax.inject.Inject; import javax.inject.Named; import org.infinispan.tutorial.secondlc.model.Member; import org.infinispan.tutorial.secondlc.wildfly.local.service.MemberRegistration; @Model public class MemberController { @Inject private FacesContext facesContext; @Inject private MemberRegistration memberRegistration; private Member newMember; @Produces @Named public Member getNewMember() { return newMember; } public void register() { try { memberRegistration.register(newMember); facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, "Registered!", "Registration successful")); initNewMember(); } catch (Exception e) { String errorMessage = getRootErrorMessage(e); facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, errorMessage, "Registration unsuccessful")); } } @PostConstruct public void initNewMember() { newMember = new Member(); } private String getRootErrorMessage(Exception e) { // Default to general error message that registration failed. String errorMessage = "Registration failed. See server log for more information"; if (e == null) { // This shouldn't happen, but return the default messages return errorMessage; } // Start with the exception and recurse to find the root cause Throwable t = e; while (t != null) { // Get the message from the Throwable class instance errorMessage = t.getLocalizedMessage(); t = t.getCause(); } // This is the root cause message return errorMessage; } }
[ "galder@zamarreno.com" ]
galder@zamarreno.com
dfed09c39615cab49e5c551a0327b74b1a1e4db2
065c1f648e8dd061a20147ff9c0dbb6b5bc8b9be
/checkstyle_cluster/13247/src_2.java
04ac0b82cb050c9705b7f8fa5e14471443e30448
[]
no_license
martinezmatias/GenPat-data-C3
63cfe27efee2946831139747e6c20cf952f1d6f6
b360265a6aa3bb21bd1d64f1fc43c3b37d0da2a4
refs/heads/master
2022-04-25T17:59:03.905613
2020-04-15T14:41:34
2020-04-15T14:41:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,402
java
package com.google.checkstyle.test.chapter5naming.rule523methodnames; import java.io.File; import java.io.IOException; import org.junit.BeforeClass; import org.junit.Test; import com.google.checkstyle.test.base.BaseCheckTestSupport; import com.google.checkstyle.test.base.ConfigurationBuilder; import com.puppycrawl.tools.checkstyle.api.CheckstyleException; import com.puppycrawl.tools.checkstyle.api.Configuration; public class MethodNameTest extends BaseCheckTestSupport{ private static ConfigurationBuilder builder; @BeforeClass public static void setConfigurationBuilder() throws CheckstyleException, IOException { builder = new ConfigurationBuilder(new File("src/it/")); } @Test public void methodNameTest() throws Exception { Configuration checkConfig = builder.getCheckConfig("MethodName"); String msgKey = "name.invalidPattern"; String format = "^[a-z][a-z0-9][a-zA-Z0-9_]*$"; final String[] expected = { "11:14: " + getCheckMessage(checkConfig.getMessages(), msgKey, "Foo", format), "12:14: " + getCheckMessage(checkConfig.getMessages(), msgKey, "fOo", format), "14:14: " + getCheckMessage(checkConfig.getMessages(), msgKey, "f$o", format), "15:14: " + getCheckMessage(checkConfig.getMessages(), msgKey, "f_oo", format), "16:14: " + getCheckMessage(checkConfig.getMessages(), msgKey, "f", format), "17:14: " + getCheckMessage(checkConfig.getMessages(), msgKey, "fO", format), "21:22: " + getCheckMessage(checkConfig.getMessages(), msgKey, "Foo", format), "22:22: " + getCheckMessage(checkConfig.getMessages(), msgKey, "fOo", format), "24:22: " + getCheckMessage(checkConfig.getMessages(), msgKey, "f$o", format), "25:22: " + getCheckMessage(checkConfig.getMessages(), msgKey, "f_oo", format), "26:22: " + getCheckMessage(checkConfig.getMessages(), msgKey, "f", format), "27:22: " + getCheckMessage(checkConfig.getMessages(), msgKey, "fO", format), "32:22: " + getCheckMessage(checkConfig.getMessages(), msgKey, "Foo", format), "33:22: " + getCheckMessage(checkConfig.getMessages(), msgKey, "fOo", format), "35:22: " + getCheckMessage(checkConfig.getMessages(), msgKey, "f$o", format), "36:22: " + getCheckMessage(checkConfig.getMessages(), msgKey, "f_oo", format), "37:22: " + getCheckMessage(checkConfig.getMessages(), msgKey, "f", format), "38:22: " + getCheckMessage(checkConfig.getMessages(), msgKey, "fO", format), "44:14: " + getCheckMessage(checkConfig.getMessages(), msgKey, "Foo", format), "45:14: " + getCheckMessage(checkConfig.getMessages(), msgKey, "fOo", format), "47:14: " + getCheckMessage(checkConfig.getMessages(), msgKey, "f$o", format), "48:14: " + getCheckMessage(checkConfig.getMessages(), msgKey, "f_oo", format), "49:14: " + getCheckMessage(checkConfig.getMessages(), msgKey, "f", format), "50:14: " + getCheckMessage(checkConfig.getMessages(), msgKey, "fO", format), }; String filePath = builder.getFilePath("InputMethodName"); Integer[] warnList = builder.getLinesWithWarn(filePath); verify(checkConfig, filePath, expected, warnList); } }
[ "375833274@qq.com" ]
375833274@qq.com
f27848c486de993bf38452328955b61d82e18371
28c40b1cb95b171a78f7f702eb6fb76ea91821de
/aws-java-sdk-elasticbeanstalk/src/main/java/com/amazonaws/services/elasticbeanstalk/model/transform/ComposeEnvironmentsRequestMarshaller.java
b3e1e48aa4dac0709f250c96a5dcffd29a8e8648
[ "Apache-2.0", "JSON" ]
permissive
picantegamer/aws-sdk-java
e9249bc9fad712f475c15df74068b306d773df10
206557596ee15a8aa470ad2f33a06d248042d5d0
refs/heads/master
2021-01-14T13:44:03.807035
2016-01-08T22:23:36
2016-01-08T22:23:36
49,227,858
0
0
null
2016-01-07T20:07:24
2016-01-07T20:07:23
null
UTF-8
Java
false
false
3,100
java
/* * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "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.amazonaws.services.elasticbeanstalk.model.transform; import java.util.HashMap; import java.util.List; import java.util.Map; import com.amazonaws.AmazonClientException; import com.amazonaws.Request; import com.amazonaws.DefaultRequest; import com.amazonaws.http.HttpMethodName; import com.amazonaws.services.elasticbeanstalk.model.*; import com.amazonaws.transform.Marshaller; import com.amazonaws.util.StringUtils; /** * ComposeEnvironmentsRequest Marshaller */ public class ComposeEnvironmentsRequestMarshaller implements Marshaller<Request<ComposeEnvironmentsRequest>, ComposeEnvironmentsRequest> { public Request<ComposeEnvironmentsRequest> marshall( ComposeEnvironmentsRequest composeEnvironmentsRequest) { if (composeEnvironmentsRequest == null) { throw new AmazonClientException( "Invalid argument passed to marshall(...)"); } Request<ComposeEnvironmentsRequest> request = new DefaultRequest<ComposeEnvironmentsRequest>( composeEnvironmentsRequest, "AWSElasticBeanstalk"); request.addParameter("Action", "ComposeEnvironments"); request.addParameter("Version", "2010-12-01"); request.setHttpMethod(HttpMethodName.POST); if (composeEnvironmentsRequest.getApplicationName() != null) { request.addParameter("ApplicationName", StringUtils.fromString(composeEnvironmentsRequest .getApplicationName())); } if (composeEnvironmentsRequest.getGroupName() != null) { request.addParameter("GroupName", StringUtils .fromString(composeEnvironmentsRequest.getGroupName())); } com.amazonaws.internal.SdkInternalList<String> versionLabelsList = (com.amazonaws.internal.SdkInternalList<String>) composeEnvironmentsRequest .getVersionLabels(); if (!versionLabelsList.isEmpty() || !versionLabelsList.isAutoConstruct()) { int versionLabelsListIndex = 1; for (String versionLabelsListValue : versionLabelsList) { if (versionLabelsListValue != null) { request.addParameter("VersionLabels.member." + versionLabelsListIndex, StringUtils.fromString(versionLabelsListValue)); } versionLabelsListIndex++; } } return request; } }
[ "aws@amazon.com" ]
aws@amazon.com
0207ae5a1ebca514faa5bda833a1807c44658eb5
5b2c309c903625b14991568c442eb3a889762c71
/classes/com/sleepycat/b/c/av.java
9c2f81fb1258d813f9e350de5de8d3444a73fd52
[]
no_license
iidioter/xueqiu
c71eb4bcc53480770b9abe20c180da693b2d7946
a7d8d7dfbaf9e603f72890cf861ed494099f5a80
refs/heads/master
2020-12-14T23:55:07.246659
2016-10-08T08:56:27
2016-10-08T08:56:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
255
java
package com.sleepycat.b.c; import com.sleepycat.b.p.r; public final class av extends r {} /* Location: E:\apk\xueqiu2\classes-dex2jar.jar!\com\sleepycat\b\c\av.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "1776098770@qq.com" ]
1776098770@qq.com
b6dee20dee01a7b2c5b7881c84603039208ff28a
7ef841751c77207651aebf81273fcc972396c836
/dstream/src/main/java/com/loki/dstream/stubs/SampleClass7822.java
e4479ac9e1e9b666a309b83f8292f0cba8d4e90a
[]
no_license
SergiiGrechukha/ModuleApp
e28e4dd39505924f0d36b4a0c3acd76a67ed4118
00e22d51c8f7100e171217bcc61f440f94ab9c52
refs/heads/master
2022-05-07T13:27:37.704233
2019-11-22T07:11:19
2019-11-22T07:11:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
274
java
package com.loki.dstream.stubs; public class SampleClass7822 { private SampleClass7823 sampleClass; public SampleClass7822(){ sampleClass = new SampleClass7823(); } public String getClassName() { return sampleClass.getClassName(); } }
[ "sergey.grechukha@gmail.com" ]
sergey.grechukha@gmail.com
b8c6d316de179ec8b34527f1d832f75ad10d2f23
e0f79076cdc050bdf5449eb8c5da1f1294378ac6
/src/main/java/com/pattern/state/after/StoppingState.java
3518b91b68bc86a897ff0deb57c8d59953b2c981
[]
no_license
rrong777/design_patterns
0ab37c77523736dc8d79d29f26de87e844b6a7b6
2ff4f4cb82e948d3c11e3c18826dc8a90c34fd8a
refs/heads/main
2023-05-03T08:42:43.712829
2021-05-25T04:42:54
2021-05-25T04:42:54
368,487,168
0
0
null
null
null
null
UTF-8
Java
false
false
1,260
java
package com.pattern.state.after; /** * 电梯停止状态类 */ public class StoppingState extends LiftState { //停止状态,开门,那是要的! @Override public void open() { //状态修改 super.context.setLiftState(Context.OPENNING_STATE); //动作委托为CloseState来执行,也就是委托给了ClosingState子类执行这个动作 super.context.getLiftState().open(); } @Override public void close() { //虽然可以关门,但这个动作不归我执行 // 状态修改 super.context.setLiftState(Context.CLOSING_STATE); //动作委托为CloseState来执行,也就是委托给了ClosingState子类执行这个动作 super.context.getLiftState().close(); } //停止状态再跑起来,正常的很 @Override public void run() { //状态修改 super.context.setLiftState(Context.RUNNING_STATE); //动作委托为CloseState来执行,也就是委托给了ClosingState子类执行这个动作 super.context.getLiftState().run(); } //停止状态是怎么发生的呢?当然是停止方法执行了 @Override public void stop() { System.out.println("电梯停止了..."); } }
[ "wql789@qq.com" ]
wql789@qq.com
391bf47125585562c1766abb71a78c8023bf899b
01b9e8ce776593eeaeae0f2317bb495ace2d9a6f
/src/ddt/dtool/parser/DeeTokenHelper.java
a1a2c45922d025d37113db8b05b58726f4d4449c
[]
no_license
cmeury/DLanguage
3d6e15157e00c6a21d3bb4bde4771ffb3ece102b
c8e47a6ab7b5786b9a372676aadff7f6562048e5
refs/heads/master
2021-01-16T22:03:06.314831
2015-10-07T19:10:44
2015-10-07T19:10:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,980
java
package ddt.dtool.parser; import static ddt.melnorme.utilbox.core.Assert.AssertNamespace.assertUnreachable; import java.util.ArrayList; import java.util.Collections; import java.util.List; public class DeeTokenHelper { public static final List<DeeTokens> keyWords_All; public static final List<DeeTokens> keyWords_control; public static final List<DeeTokens> keyWords_literalValues; public static final List<DeeTokens> keyWords_nativeTypes; static { ArrayList<DeeTokens> allKeyWords_init = new ArrayList<>(); ArrayList<DeeTokens> controlKeyWords_init = new ArrayList<>(); ArrayList<DeeTokens> literalValueKeyWords_init = new ArrayList<>(); ArrayList<DeeTokens> nativeTypeKeyWords_init = new ArrayList<>(); for (DeeTokens tokenType : DeeTokens.values()) { if(isKeyword(tokenType)) { allKeyWords_init.add(tokenType); switch(getTokenTypeCategory(tokenType)) { case CONTROL: controlKeyWords_init.add(tokenType); break; case LITERAL_VALUE: literalValueKeyWords_init.add(tokenType); break; case NATIVE_TYPE: nativeTypeKeyWords_init.add(tokenType); break; } } } keyWords_All = Collections.unmodifiableList(allKeyWords_init); keyWords_control = Collections.unmodifiableList(controlKeyWords_init); keyWords_literalValues = Collections.unmodifiableList(literalValueKeyWords_init); keyWords_nativeTypes = Collections.unmodifiableList(nativeTypeKeyWords_init); } public static boolean isKeyword(DeeTokens tokenType) { TokensCategory category = getTokenTypeCategory(tokenType); return category == TokensCategory.NATIVE_TYPE || category == TokensCategory.CONTROL || category == TokensCategory.LITERAL_VALUE; } public static enum TokensCategory { NATIVE_TYPE, CONTROL, LITERAL_VALUE, } public static TokensCategory getTokenTypeCategory(DeeTokens tokenType) { // BM: Add other categories for remaining tokens? They are not nedeed at the moment. // But nonetheless we list all DeeTokens in switch to make sure we dont miss any switch (tokenType) { case GROUP_COMMENT: case GROUP_STRING: case GROUP_INTEGER: case GROUP_FLOAT: case GROUP_ATTRIBUTE_KW: case GROUP_PRIMITIVE_KW: case GROUP_PROTECTION_KW: return null; // Return null for artificial grouping tokens case EOF: return null; case INVALID_TOKEN: return null; case LINE_END: case WHITESPACE: return null; case COMMENT_MULTI: case COMMENT_NESTED: case COMMENT_LINE: case DOCCOMMENT_MULTI: case DOCCOMMENT_NESTED: case DOCCOMMENT_LINE: return null; // COMMENT case SCRIPT_LINE_INTRO: return null; case SPECIAL_TOKEN_LINE: return null; case IDENTIFIER: return null; case KW_BOOL: case KW_VOID: case KW_BYTE: case KW_UBYTE: case KW_SHORT: case KW_USHORT: case KW_INT: case KW_UINT: case KW_LONG: case KW_ULONG: case KW_CHAR: case KW_WCHAR: case KW_DCHAR: case KW_FLOAT: case KW_DOUBLE: case KW_REAL: case KW_IFLOAT: case KW_IDOUBLE: case KW_IREAL: case KW_CFLOAT: case KW_CDOUBLE: case KW_CREAL: case KW_CENT: case KW_UCENT: return TokensCategory.NATIVE_TYPE; case KW_PRIVATE: case KW_PACKAGE: case KW_PROTECTED: case KW_PUBLIC: case KW_EXPORT: case KW_ABSTRACT: case KW_CONST: case KW_IMMUTABLE: case KW_INOUT: case KW_SHARED: case KW_DEPRECATED: case KW_FINAL: case KW_NOTHROW: case KW_OVERRIDE: case KW_PURE: case KW_SCOPE: case KW_STATIC: case KW_SYNCHRONIZED: case KW_REF: case KW_AUTO: case KW_ALIAS: case KW_ALIGN: case KW_ASM: case KW_ASSERT: case KW_BODY: case KW_BREAK: case KW_CASE: case KW_CAST: case KW_CATCH: case KW_CLASS: case KW_CONTINUE: case KW_DEBUG: case KW_DEFAULT: case KW_DELEGATE: case KW_DELETE: case KW_DO: case KW_ELSE: case KW_ENUM: case KW_EXTERN: case KW_FINALLY: case KW_FOR: case KW_FOREACH: case KW_FOREACH_REVERSE: case KW_FUNCTION: case KW_GOTO: case KW_IF: case KW_IMPORT: case KW_IN: case KW_INTERFACE: case KW_INVARIANT: case KW_IS: case KW_LAZY: case KW_MACRO: case KW_MIXIN: case KW_MODULE: case KW_NEW: case KW_OUT: case KW_PRAGMA: case KW_RETURN: case KW_STRUCT: case KW_SWITCH: case KW_TEMPLATE: case KW_THROW: case KW_TRY: case KW_TYPEDEF: case KW_TYPEID: case KW_TYPEOF: case KW_UNION: case KW_UNITTEST: case KW_VERSION: case KW_VOLATILE: case KW_WHILE: case KW_WITH: case KW___TRAITS: case KW___GSHARED: case KW___THREAD: case KW___VECTOR: return TokensCategory.CONTROL; case KW_THIS: case KW_SUPER: case KW_TRUE: case KW_FALSE: case KW_NULL: case KW___FILE__: case KW___LINE__: case KW___MODULE__: case KW___FUNCTION__: case KW___PRETTY_FUNCTION__: case KW___DATE__: case KW___TIME__: case KW___TIMESTAMP__: case KW___VENDOR__: case KW___VERSION__: return TokensCategory.LITERAL_VALUE; case STRING_WYSIWYG: case STRING_DQ: case STRING_HEX: case STRING_DELIM: case STRING_TOKENS: return null; case CHARACTER: return null; case INTEGER_DECIMAL: case INTEGER_BINARY: case INTEGER_OCTAL: case INTEGER_HEX: return null; case FLOAT_DECIMAL: case FLOAT_HEX: return null; case OPEN_PARENS: case CLOSE_PARENS: case OPEN_BRACE: case CLOSE_BRACE: case OPEN_BRACKET: case CLOSE_BRACKET: case SEMICOLON: case COLON: return null; case QUESTION: case COMMA: case DOLLAR: case AT: case DOT: case DOUBLE_DOT: case TRIPLE_DOT: case MINUS: case MINUS_ASSIGN: case DECREMENT: case PLUS: case PLUS_ASSIGN: case INCREMENT: case DIV: case DIV_ASSIGN: case STAR: case MULT_ASSIGN: case MOD: case MOD_ASSIGN: case POW: case POW_ASSIGN: case AND: case AND_ASSIGN: case LOGICAL_AND: case OR: case OR_ASSIGN: case LOGICAL_OR: case XOR: case XOR_ASSIGN: case CONCAT: case CONCAT_ASSIGN: case LAMBDA: case ASSIGN: case EQUALS: case NOT: case NOT_EQUAL: case LESS_THAN: case LESS_EQUAL: case GREATER_THAN: case GREATER_EQUAL: case LESS_GREATER: case LESS_GREATER_EQUAL: case UNORDERED_E: case UNORDERED: case UNORDERED_GE: case UNORDERED_G: case UNORDERED_LE: case UNORDERED_L: case LEFT_SHIFT: case LEFT_SHIFT_ASSIGN: case RIGHT_SHIFT: case RIGHT_SHIFT_ASSIGN: case TRIPLE_RSHIFT: case TRIPLE_RSHIFT_ASSIGN: return null; } throw assertUnreachable(); } }
[ "kingsleyhendrickse@me.com" ]
kingsleyhendrickse@me.com
4cdc41de470fd6c3a0aacf3466b43dae64908b9c
e7ee311e20b40c87bf6d23a53a1d7b11fd29d2c3
/src/chosun/ciis/is/snd/dm/IS_SND_1500_MDM.java
ce30aafa992f37e9f9fc08e539ac9f164651d8eb
[]
no_license
nosmoon/misdevteam
4e3695ef7bbdcd231bb84d7d8d7df54a23ff0a60
1829d5bd489eb6dd307ca244f0e183a31a1de773
refs/heads/master
2020-04-15T15:57:05.480056
2019-01-10T01:12:01
2019-01-10T01:12:01
164,812,547
1
0
null
null
null
null
UHC
Java
false
false
6,281
java
/*************************************************************************************************** * 파일명 : .java * 기능 : 독자우대-구독신청 * 작성일자 : 2007-05-22 * 작성자 : 김대섭 ***************************************************************************************************/ /*************************************************************************************************** * 수정내역 : * 수정자 : * 수정일자 : * 백업 : ***************************************************************************************************/ package chosun.ciis.is.snd.dm; import java.sql.*; import oracle.jdbc.driver.*; import somo.framework.db.*; import somo.framework.util.*; import chosun.ciis.is.snd.ds.*; import chosun.ciis.is.snd.rec.*; /** * */ public class IS_SND_1500_MDM extends somo.framework.db.BaseDM implements java.io.Serializable{ public String cmpy_cd; public String auth_gb; public String use_yn; public String incmg_pers; public String base_dt; public IS_SND_1500_MDM(){} public IS_SND_1500_MDM(String cmpy_cd, String auth_gb, String use_yn, String incmg_pers, String base_dt){ this.cmpy_cd = cmpy_cd; this.auth_gb = auth_gb; this.use_yn = use_yn; this.incmg_pers = incmg_pers; this.base_dt = base_dt; } public void setCmpy_cd(String cmpy_cd){ this.cmpy_cd = cmpy_cd; } public void setAuth_gb(String auth_gb){ this.auth_gb = auth_gb; } public void setUse_yn(String use_yn){ this.use_yn = use_yn; } public void setIncmg_pers(String incmg_pers){ this.incmg_pers = incmg_pers; } public void setBase_dt(String base_dt){ this.base_dt = base_dt; } public String getCmpy_cd(){ return this.cmpy_cd; } public String getAuth_gb(){ return this.auth_gb; } public String getUse_yn(){ return this.use_yn; } public String getIncmg_pers(){ return this.incmg_pers; } public String getBase_dt(){ return this.base_dt; } public String getSQL(){ return "{ call MISISP.SP_IS_SND_1500_M(? ,? ,? ,? ,? ,? ,? ,? ,? ,?) }"; } public void setParams(CallableStatement cstmt, BaseDM bdm) throws SQLException{ IS_SND_1500_MDM dm = (IS_SND_1500_MDM)bdm; cstmt.registerOutParameter(1, Types.VARCHAR); cstmt.registerOutParameter(2, Types.VARCHAR); cstmt.setString(3, dm.cmpy_cd); cstmt.setString(4, dm.auth_gb); cstmt.setString(5, dm.use_yn); cstmt.setString(6, dm.incmg_pers); cstmt.setString(7, dm.base_dt); cstmt.registerOutParameter(8, OracleTypes.CURSOR); cstmt.registerOutParameter(9, OracleTypes.CURSOR); cstmt.registerOutParameter(10, OracleTypes.CURSOR); } public BaseDataSet createDataSetObject(){ return new chosun.ciis.is.snd.ds.IS_SND_1500_MDataSet(); } public void print(){ System.out.println("SQL = " + this.getSQL()); System.out.println("cmpy_cd = [" + getCmpy_cd() + "]"); System.out.println("auth_gb = [" + getAuth_gb() + "]"); System.out.println("use_yn = [" + getUse_yn() + "]"); System.out.println("incmg_pers = [" + getIncmg_pers() + "]"); System.out.println("base_dt = [" + getBase_dt() + "]"); } } /*---------------------------------------------------------------------------------------------------- Web Tier에서 req.getParameter() 처리 및 결과확인 검사시 사용하십시오. String cmpy_cd = req.getParameter("cmpy_cd"); if( cmpy_cd == null){ System.out.println(this.toString+" : cmpy_cd is null" ); }else{ System.out.println(this.toString+" : cmpy_cd is "+cmpy_cd ); } String auth_gb = req.getParameter("auth_gb"); if( auth_gb == null){ System.out.println(this.toString+" : auth_gb is null" ); }else{ System.out.println(this.toString+" : auth_gb is "+auth_gb ); } String use_yn = req.getParameter("use_yn"); if( use_yn == null){ System.out.println(this.toString+" : use_yn is null" ); }else{ System.out.println(this.toString+" : use_yn is "+use_yn ); } String incmg_pers = req.getParameter("incmg_pers"); if( incmg_pers == null){ System.out.println(this.toString+" : incmg_pers is null" ); }else{ System.out.println(this.toString+" : incmg_pers is "+incmg_pers ); } String base_dt = req.getParameter("base_dt"); if( base_dt == null){ System.out.println(this.toString+" : base_dt is null" ); }else{ System.out.println(this.toString+" : base_dt is "+base_dt ); } ----------------------------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------------------------- Web Tier에서 req.getParameter() 처리시 사용하십시오. String cmpy_cd = Util.checkString(req.getParameter("cmpy_cd")); String auth_gb = Util.checkString(req.getParameter("auth_gb")); String use_yn = Util.checkString(req.getParameter("use_yn")); String incmg_pers = Util.checkString(req.getParameter("incmg_pers")); String base_dt = Util.checkString(req.getParameter("base_dt")); ----------------------------------------------------------------------------------------------------*//*---------------------------------------------------------------------------------------------------- Web Tier에서 한글처리와 동시에 req.getParameter() 처리시 사용하십시오. String cmpy_cd = Util.Uni2Ksc(Util.checkString(req.getParameter("cmpy_cd"))); String auth_gb = Util.Uni2Ksc(Util.checkString(req.getParameter("auth_gb"))); String use_yn = Util.Uni2Ksc(Util.checkString(req.getParameter("use_yn"))); String incmg_pers = Util.Uni2Ksc(Util.checkString(req.getParameter("incmg_pers"))); String base_dt = Util.Uni2Ksc(Util.checkString(req.getParameter("base_dt"))); ----------------------------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------------------------- Web Tier에서 DM 파일의 변수를 설정시 사용하십시오. dm.setCmpy_cd(cmpy_cd); dm.setAuth_gb(auth_gb); dm.setUse_yn(use_yn); dm.setIncmg_pers(incmg_pers); dm.setBase_dt(base_dt); ----------------------------------------------------------------------------------------------------*/ /* 작성시간 : Fri May 25 17:00:34 KST 2012 */
[ "DLCOM000@172.16.30.11" ]
DLCOM000@172.16.30.11
b82b82594cb5cf19d31530bd170895784ab4d159
6045518db77c6104b4f081381f61c26e0d19d5db
/datasets/file_version_per_commit_backup/apache-jmeter/42d98f133d2bf44a50c32e9b257a60f7636826a4.java
43f5822236e9ebdbc6d8da715dad5c359c731913
[]
no_license
edisutoyo/msr16_td_removal
6e039da7fed166b81ede9b33dcc26ca49ba9259c
41b07293c134496ba1072837e1411e05ed43eb75
refs/heads/master
2023-03-22T21:40:42.993910
2017-09-22T09:19:51
2017-09-22T09:19:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,899
java
// $Header$ /* * Copyright 2001-2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.jmeter.testelement; import org.apache.jmeter.testelement.property.JMeterProperty; import org.apache.jmeter.testelement.property.PropertyIterator; import org.apache.jmeter.threads.JMeterContext; /** * @author Michael Stover * @version $Revision$ */ public interface TestElement extends Cloneable { public final static String NAME = "TestElement.name"; public final static String GUI_CLASS = "TestElement.gui_class"; public final static String ENABLED = "TestElement.enabled"; public final static String TEST_CLASS = "TestElement.test_class"; public void addTestElement(TestElement child); public void setProperty(String key,String value); /** * Check if ENABLED property is present and true ; defaults to true * * @return true if element is enabled */ public boolean isEnabled(); /** * Returns true or false whether the element is the running version. */ public boolean isRunningVersion(); /** * Test whether a given property is only a temporary resident of the TestElement * @param property * @return * boolean */ public boolean isTemporary(JMeterProperty property); /** * Indicate that the given property should be only a temporary property in the TestElement * @param property * void */ public void setTemporary(JMeterProperty property); /** * Return a property as a boolean value. */ public boolean getPropertyAsBoolean(String key); public long getPropertyAsLong(String key); public int getPropertyAsInt(String key); public float getPropertyAsFloat(String key); /** * Make the test element the running version, or make it no longer the * running version. This tells the test element that it's current state must * be retrievable by a call to recoverRunningVersion(). It is kind of like * making the TestElement Read- Only, but not as strict. Changes can be * made and the element can be modified, but the state of the element at the * time of the call to setRunningVersion() must be recoverable. */ public void setRunningVersion(boolean run); /** * Tells the test element to return to the state it was in when * makeRunningVersion() was called. */ public void recoverRunningVersion(); /** * Clear the TestElement of all data. */ public void clear(); public String getPropertyAsString(String key); /** * Sets and overwrites a property in the TestElement. This call will be * ignored if the TestElement is currently a "running version". */ public void setProperty(JMeterProperty property); /** * Given the name of the property, returns the appropriate property from * JMeter. If it is null, a NullProperty object will be returned. */ public JMeterProperty getProperty(String propName); /** * Get a Property Iterator for the TestElements properties. * @return PropertyIterator */ public PropertyIterator propertyIterator(); public void removeProperty(String key); //lifecycle methods public Object clone(); /** * Convenient way to traverse a test element. */ public void traverse(TestElementTraverser traverser); /** * @return Returns the threadContext. */ public JMeterContext getThreadContext(); /** * @param threadContext The threadContext to set. */ public void setThreadContext(JMeterContext threadContext); /** * @return Returns the threadName. */ public String getThreadName(); /** * @param threadName The threadName to set. */ public void setThreadName(String threadName); /** * Called at the start of each thread. * TODO - should it hava a parameter? */ public void threadStarted(); /** * Called at the end of each thread. * TODO - should it hava a parameter? */ public void threadFinished(); /** * Called by Remove to determine if it is * safe to remove the element. * The element can either clean itself up, and return true, * or the element can return false. * @return true if safe to remove the element */ public boolean canRemove(); }
[ "everton.maldonado@gmail.com" ]
everton.maldonado@gmail.com
5b4d9f2897c1166ad14abe2ef9fa963078a56a46
187b211464d5a30a6865fcc4a00986ec02243d49
/luckwine-oss-service/luckwine-oss-service-web/src/main/java/com/luckwine/oss/module/synthesize/controller/sms/SmsLogController.java
4dd8846829171d09b23cf0f0504e008f29a42538
[]
no_license
guangtong-information/luckwine-mall
3b7fa3d809d9b1e9575e2643ea6915aedcb781e8
a564126d8a9b63e6650f72590f63af834822bf2e
refs/heads/master
2022-06-27T07:12:17.243240
2020-09-04T09:35:54
2020-09-04T09:35:54
171,574,799
10
10
null
2022-06-21T00:56:34
2019-02-20T00:53:24
TSQL
UTF-8
Java
false
false
1,491
java
package com.luckwine.oss.module.synthesize.controller.sms; import com.luckwine.oss.common.annotation.RateLimiter; import com.luckwine.oss.common.utils.ResultUtil; import com.luckwine.oss.common.vo.Result; import com.luckwine.oss.module.synthesize.remote.sms.SmsLogPageRemoteService; import com.luckwine.parent.entitybase.request.CommonQueryPageRequest; import com.luckwine.synthesize.model.request.SmsLogReq; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; 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.RestController; @Slf4j @RestController @Api(description = "综合域") @RequestMapping("/oss/smslog") public class SmsLogController { @Autowired private SmsLogPageRemoteService smsLogPageRemoteService; @RequestMapping(value = "/info/page",method = RequestMethod.POST) @RateLimiter(limit = 1, timeout = 6000) @ApiOperation(value = "短信发送记录 info page list") public Result<Object> infoPage(@ModelAttribute CommonQueryPageRequest<SmsLogReq> request, @ModelAttribute SmsLogReq querySmsLogsReq){ request.setRequest(querySmsLogsReq); return new ResultUtil<Object>().setData(smsLogPageRemoteService.call(request)); } }
[ "th15817161961@gmail.com" ]
th15817161961@gmail.com
fc623c23cc1756a5c93bd2d5685d551939ae565a
c04e424a5282b06598fe2d6f689f69b2bcf00786
/isap-dao/src/main/java/com/gosun/isap/dao/po/face/Alarminfoes.java
2847b11fd5a67c2db599350421bd4e313ad022b3
[]
no_license
soon14/isap-parent
859d9c0d4adc0e7d60f92a537769b237c1c5095b
2f6c1ec4e635e08eab57d4df4c92e90e4e09e044
refs/heads/master
2021-12-15T03:09:00.641560
2017-07-26T02:13:40
2017-07-26T02:13:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,447
java
package com.gosun.isap.dao.po.face; import java.io.Serializable; import java.util.Date; public class Alarminfoes implements Serializable { private Integer id; private Integer contactid; private String name; private String idcard; private Integer capfaceid; private Integer blacklistid; private String faceimg; private String blacklistimg; private String backgroundimg; private Double simi; private String reason; private String cameraname; private String capaddr; private String hostname; private Integer usedflag; private Integer state; private String creator; private Date createtime; private String lasteditor; private Date lastedittime; private String remark; private static final long serialVersionUID = 1L; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public Integer getContactid() { return contactid; } public void setContactid(Integer contactid) { this.contactid = contactid; } public String getName() { return name; } public void setName(String name) { this.name = name == null ? null : name.trim(); } public String getIdcard() { return idcard; } public void setIdcard(String idcard) { this.idcard = idcard == null ? null : idcard.trim(); } public Integer getCapfaceid() { return capfaceid; } public void setCapfaceid(Integer capfaceid) { this.capfaceid = capfaceid; } public Integer getBlacklistid() { return blacklistid; } public void setBlacklistid(Integer blacklistid) { this.blacklistid = blacklistid; } public String getFaceimg() { return faceimg; } public void setFaceimg(String faceimg) { this.faceimg = faceimg == null ? null : faceimg.trim(); } public String getBlacklistimg() { return blacklistimg; } public void setBlacklistimg(String blacklistimg) { this.blacklistimg = blacklistimg == null ? null : blacklistimg.trim(); } public String getBackgroundimg() { return backgroundimg; } public void setBackgroundimg(String backgroundimg) { this.backgroundimg = backgroundimg == null ? null : backgroundimg.trim(); } public Double getSimi() { return simi; } public void setSimi(Double simi) { this.simi = simi; } public String getReason() { return reason; } public void setReason(String reason) { this.reason = reason == null ? null : reason.trim(); } public String getCameraname() { return cameraname; } public void setCameraname(String cameraname) { this.cameraname = cameraname == null ? null : cameraname.trim(); } public String getCapaddr() { return capaddr; } public void setCapaddr(String capaddr) { this.capaddr = capaddr == null ? null : capaddr.trim(); } public String getHostname() { return hostname; } public void setHostname(String hostname) { this.hostname = hostname == null ? null : hostname.trim(); } public Integer getUsedflag() { return usedflag; } public void setUsedflag(Integer usedflag) { this.usedflag = usedflag; } public Integer getState() { return state; } public void setState(Integer state) { this.state = state; } public String getCreator() { return creator; } public void setCreator(String creator) { this.creator = creator == null ? null : creator.trim(); } public Date getCreatetime() { return createtime; } public void setCreatetime(Date createtime) { this.createtime = createtime; } public String getLasteditor() { return lasteditor; } public void setLasteditor(String lasteditor) { this.lasteditor = lasteditor == null ? null : lasteditor.trim(); } public Date getLastedittime() { return lastedittime; } public void setLastedittime(Date lastedittime) { this.lastedittime = lastedittime; } public String getRemark() { return remark; } public void setRemark(String remark) { this.remark = remark == null ? null : remark.trim(); } }
[ "lzk90s@163.com" ]
lzk90s@163.com
a10593a5d764c7b485af8711a6d64f8028e8f884
9d199804ea3aca63762a6779570cfb482c605834
/DigitalSimulatorObjects/java/de/hagemann/digitalsimulator/plugin/LoadableShiftRegister/LoadableShiftRegister.java
75cc639d545d4f54a62f7775fb2f237cf8a14557
[]
no_license
hupfdule/DigitalSimulator
6a9a9e43f2f6a9bab620b0190e8991b6c55e54bb
3b789dcae9adb977bbed681c4459e74bf5f4bf62
refs/heads/master
2020-06-20T06:17:40.835154
2015-05-24T06:37:48
2015-05-24T06:37:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,230
java
package de.hagemann.digitalsimulator.plugin.LoadableShiftRegister; import de.freegroup.digitalsimulator.I18N; import de.freegroup.digitalsimulator.Painter; import de.freegroup.digitalsimulator.plugin.object.ObjectPlugin; import de.freegroup.digitalsimulator.update.ILiveUpdateObject; /* * Title: DigitalSimulator java Plugin * Description: Verschiebt das Bitmuster um 1 Position, das Startmuster kann eingestellt werden * Copyright: Copyright (c) 2002 * Author: Norbert Hagemann * Version: 1.0 05.10.2002 */ public class LoadableShiftRegister extends ObjectPlugin implements ILiveUpdateObject { static final int In_Data = 0; static final int In_Clock = 1; static final int In_Clear = 2; static final int In_Load = 3; static final int Width = 167; static final int Height = 468; static final int PinOffset = -32; static final String DescName = "OBJ_8-Bit_ShiftRegister_loadable_Description"; static final String Description = "Verschiebt das Bitmuster um 1 Position.\r\n" +"Das Eingangssignal 'In' wird in den Ausgang '0' geschoben.\r\n" +"Das Startmuster kann eingestellt werden."; public String getKey() { return "8-Bit ShiftRegister, loadable"; } public String getName() { return "OBJECT.LOADABLESHIFTREGISTER.8.BIT"; } public int getVersion() { return 1; } public String getGroup() { return "OBJECTGROUP.REGISTER"; } public String getProgrammerName() { return "Norbert Hagemann"; } public String getProgrammerMail() { return "norbert.hagemann@gmx.de"; } public String getProgrammerURL() { return ""; } public String getDescription() { String Text = I18N.get(DescName); if ((Text.equals(DescName)) || (Text.length() == 0)) Text = Description; return Text; } public int getParamCount() { return 0; } public boolean doConfigure(byte[] param) { return false; } // Returns the DigitalSimulator the possible count of input pins public int[] getInputCountRange() { int[] result = new int[2]; result[0] = 12; result[1] = 12; return result; } // Returns the DigitalSimulator the possible count of output pins public int[] getOutputCountRange() { int[] result = new int[2]; result[0] = 8; result[1] = 8; return result; } // Return the size in Pixel wich the object needs // Required for the DragDrop operation of the framework public int[] getSize(long inputCount, long outputCount) { int[] result = new int[2]; result[0] = Width; result[1] = Height; return result; } // calculate the values of the output pins // return 0 for NO redraw neccessary // return 1 for redraw neccessary public boolean calculate(int[] input ,int[] lastInput, int[] output, byte[] param) { if (input[In_Clear] == 1) for(int i=0; i<output.length ; i++) output[i]=0; else { if (input[In_Load] == 1) for (int i=0; i<output.length; i++) output[i] = input[i+4]; else if (input[In_Clock] == 1 && input[In_Clock]!=lastInput[In_Clock]) { for (int i=output.length-1; i>0; i--) output[i] = output[i-1]; output[0] = input[In_Data]; } } return false; } public void paint(int xPos, int yPos, byte[] param) { Painter.drawRect(xPos, yPos, xPos+Width, yPos-Height); Painter.drawText("In", 45, xPos+10, yPos-10); Painter.drawLine(xPos, yPos-60, xPos+20, yPos-70); Painter.drawLine(xPos+20, yPos-70, xPos, yPos-80); Painter.drawText("Clock", 45, xPos+30, yPos-50); Painter.drawText("Clear", 45, xPos+10, yPos-90); Painter.drawText("Load", 45, xPos+10, yPos-130); Painter.drawLine(xPos, yPos-180, xPos+Width, yPos-180); Painter.drawLine(xPos+Width-30, yPos +PinOffset-180, xPos+Width-30, yPos +PinOffset*8-180); Painter.drawLine(xPos+Width-30, yPos +PinOffset*8-180, xPos+Width-15, yPos +PinOffset*8-150); Painter.drawLine(xPos+Width-30, yPos +PinOffset*8-180, xPos+Width-45, yPos +PinOffset*8-150); } // layout the output pins. The origin (0/0) are at the top left corner // x INCREASED to the right and y DECREASE to the bottom. public int[] layoutOutput( int inputCount, int outputCount, byte[] param ) { int[] result = new int[2* outputCount]; for(int i=0; i<(result.length); i=i+2) { result[i] = Width; result[i+1] = PinOffset*(i/2+1)-180; } return result; } // layout the input pins. The origin (0/0) are at the top left corner // x increased to the right and y decreased to the bottom. public int[] layoutInput(int inputCount, int outputCount, byte[] param) { int[] result = new int[2*inputCount]; result[0] = 0; result[1] = -30; result[2] = 0; result[3] = -70; result[4] = 0; result[5] = -110; result[6] = 0; result[7] = -150; for (int i=8; i<result.length; i=i+2) { result[i] = 0; result[i+1] = PinOffset*((i-8)/2+1)-180; } return result; } }
[ "a.herz@freegroup.de" ]
a.herz@freegroup.de
4cb1a0a6c995ff178b4e57f3b379aecd8423689c
105ff2705396d603b30760cb6e393e2e80e30793
/internet_Architec/distributed_services/Arch-proj-demo/gupao-protal/src/main/java/com/gupao/vip/protal/framework/velocity/VelocityPropertyPlaceholderConfigurer.java
c833f9af4f96f800c0184b4572c84537e7c211f6
[]
no_license
clonegod/x01-lang-java
cfa878ccc0e86cace906d47b9c2a3085732fc835
640bdd04a47abf97189e761acd020f7d5a0f55e6
refs/heads/master
2020-03-13T15:00:36.761781
2018-06-06T16:03:32
2018-06-06T16:03:32
131,169,227
2
2
null
null
null
null
UTF-8
Java
false
false
4,778
java
package com.gupao.vip.protal.framework.velocity; import com.gupao.vip.protal.framework.common.EduFrameWorkException; import com.gupao.vip.protal.framework.common.FrameworkConstants; import org.apache.velocity.VelocityContext; import org.apache.velocity.app.Velocity; import org.springframework.beans.BeansException; import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer; import org.springframework.core.io.Resource; import org.springframework.util.PropertyPlaceholderHelper; import org.springframework.util.PropertyPlaceholderHelper.PlaceholderResolver; import org.springframework.util.StringValueResolver; import java.io.*; import java.util.HashMap; import java.util.Map; import java.util.Properties; /** * <p> * velocity 模式加载 properties * </p> * <p> * 支持 properties 文件使用 velocity 标签控制,注入 VelocityContext 可定义标签内容。 * </p> * @author qingyin */ public class VelocityPropertyPlaceholderConfigurer extends PropertyPlaceholderConfigurer { private String charset = FrameworkConstants.UTF_8; private static VelocityContext velocityContext = null; private Resource[] locations; private RunEnvironment runEnvironment; /* 处理未找到占位内容 */ private String placeholderValue = ""; @Override public void setLocation( Resource location ) { this.locations = new Resource[ ] { location }; } @Override public void setLocations( Resource... locations ) { this.locations = locations; } @Override protected void processProperties(ConfigurableListableBeanFactory beanFactoryToProcess, Properties props ) throws BeansException { StringValueResolver valueResolver = new PlaceholderResolvingStringValueResolver(props); doProcessProperties(beanFactoryToProcess, valueResolver); } private class PlaceholderResolvingStringValueResolver implements StringValueResolver { private final PropertyPlaceholderHelper helper; private final PlaceholderResolver resolver; public PlaceholderResolvingStringValueResolver( Properties props ) { this.helper = new PropertyPlaceholderHelper(placeholderPrefix, placeholderSuffix, valueSeparator, ignoreUnresolvablePlaceholders); this.resolver = new PropertyPlaceholderConfigurerResolver(props); } @Override public String resolveStringValue( String strVal ) throws BeansException { String value = this.helper.replacePlaceholders(strVal, this.resolver); if ( value.contains(placeholderPrefix) && value.equals(strVal) ) { return placeholderValue; } return (value.equals(nullValue) ? null : value); } } private class PropertyPlaceholderConfigurerResolver implements PlaceholderResolver { private final Properties props; private PropertyPlaceholderConfigurerResolver( Properties props ) { this.props = props; } @Override public String resolvePlaceholder( String placeholderName ) { return VelocityPropertyPlaceholderConfigurer.this.resolvePlaceholder(placeholderName, props, SYSTEM_PROPERTIES_MODE_FALLBACK); } } public void fillMergeProperties( Properties prop, InputStream input ) { try { StringWriter writer = new StringWriter(); BufferedReader br = new BufferedReader(new InputStreamReader(input, getCharset())); if ( velocityContext == null ) { /* * 设置环境变量判断逻辑 */ Map<Object, Object> context = new HashMap<Object, Object>(); context.put("env", this.getRunEnvironment()); context.putAll(System.getProperties()); velocityContext = new VelocityContext(context); } Velocity.evaluate(velocityContext, writer, "VelocityPropertyPlaceholderConfigurer", br); prop.load(new StringReader(writer.toString())); } catch ( Exception e ) { throw new EduFrameWorkException(e); } } @Override protected void loadProperties( Properties props ) throws IOException { if ( this.locations != null && props != null ) { for ( Resource location : this.locations ) { if ( logger.isInfoEnabled() ) { logger.info("Loading properties file from " + location); } this.fillMergeProperties(props, location.getInputStream()); } } } public RunEnvironment getRunEnvironment() { if ( runEnvironment == null ) { return new RunEnvironment(); } return runEnvironment; } public void setRunEnvironment( RunEnvironment runEnvironment ) { this.runEnvironment = runEnvironment; } public String getCharset() { return charset; } public void setCharset( String charset ) { this.charset = charset; } public String getPlaceholderValue() { return placeholderValue; } public void setPlaceholderValue( String placeholderValue ) { this.placeholderValue = placeholderValue; } }
[ "asynclife@163.com" ]
asynclife@163.com
e6deaa2b881a8b50770c70f510bfb5fd17939fd0
0af8b92686a58eb0b64e319b22411432aca7a8f3
/single-large-project/src/main/java/org/gradle/test/performancenull_495/Productionnull_49422.java
4bd205709a4f115dce9812fad21c2d7cc7d64902
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
588
java
package org.gradle.test.performancenull_495; public class Productionnull_49422 { private final String property; public Productionnull_49422(String param) { this.property = param; } public String getProperty() { return property; } private String prop0; public String getProp0() { return prop0; } public void setProp0(String value) { prop0 = value; } private String prop1; public String getProp1() { return prop1; } public void setProp1(String value) { prop1 = value; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
7e6107afaabb0d8fe628839261ca77b44c56be2a
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/34/34_2912729ad2b5e0a3a1277f455742ec72b95b61b8/TrashRestlet/34_2912729ad2b5e0a3a1277f455742ec72b95b61b8_TrashRestlet_s.java
724dfebbbc0b474b7002b497cade6ffccc80a247
[]
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
7,933
java
package org.iucn.sis.server.restlets.utils; import java.io.IOException; import org.iucn.sis.server.api.application.SIS; import org.iucn.sis.server.api.persistance.hibernate.PersistentException; import org.iucn.sis.server.api.restlets.ServiceRestlet; import org.iucn.sis.server.api.utils.FormattedDate; import org.iucn.sis.server.api.utils.TaxomaticException; import org.iucn.sis.shared.api.debug.Debug; import org.iucn.sis.shared.api.io.AssessmentIOMessage; import org.iucn.sis.shared.api.models.Assessment; import org.iucn.sis.shared.api.models.Taxon; import org.iucn.sis.shared.api.models.User; import org.restlet.Context; import org.restlet.data.MediaType; import org.restlet.data.Request; import org.restlet.data.Response; import org.restlet.data.Status; import org.restlet.ext.xml.DomRepresentation; import org.w3c.dom.Document; import org.w3c.dom.Element; public class TrashRestlet extends ServiceRestlet { public TrashRestlet(String vfsroot, Context context) { super(vfsroot, context); } public void definePaths() { paths.add("/trash/{action}"); paths.add("/trash/{action}/{option1}"); } private void handleDelete(Request request, Response response) { try { Document doc = new DomRepresentation(request.getEntity()).getDocument(); Element element = (Element) doc.getDocumentElement().getElementsByTagName("data").item(0); String id = element.getAttribute("id"); String type = element.getAttribute("type"); boolean success = false; String message = null; if (type.equalsIgnoreCase("taxon")) { success = SIS.get().getTaxonIO().permanentlyDeleteTaxon(Integer.parseInt(id)); message = "Unable to delete taxon " + id; } else if (type.equalsIgnoreCase("assessment")) { success = SIS.get().getAssessmentIO().permenantlyDeleteAssessment(Integer.valueOf(id), SIS.get().getUser(request)); message = "Unable to delete assessment " + id; } else { message = "Invalid type -- should be assessment or taxon."; } if (success) { response.setStatus(Status.SUCCESS_OK); } else { response.setEntity(message, MediaType.TEXT_PLAIN); response.setStatus(Status.CLIENT_ERROR_BAD_REQUEST); } response.setEntity(message, MediaType.TEXT_PLAIN); } catch (Exception e) { e.printStackTrace(); } } private void handleDeleteAll(Request request, Response response) { boolean success = SIS.get().getAssessmentIO().permenantlyDeleteAllTrashedAssessments() && SIS.get().getTaxonIO().permenantlyDeleteAllTrashedTaxa(); if (success) { response.setStatus(Status.SUCCESS_OK); response.setEntity("All trashed items have been deleted.", MediaType.TEXT_PLAIN); } else { response.setStatus(Status.SERVER_ERROR_INTERNAL); response.setEntity("Items could not be deleted.", MediaType.TEXT_PLAIN); } } /** * Gets all assessments and taxa that have been deleted * * @param request * @param response * @param ec */ private void handleGet(Request request, Response response) { StringBuilder xml = new StringBuilder("<trash>"); try { for (Assessment assessment : SIS.get().getAssessmentIO().getTrashedAssessments()) { xml.append("<data id=\"" + assessment.getId() + "\" "); xml.append("type=\"assessment\" "); xml.append("status=\"" + assessment.getAssessmentType().getDisplayName() + "\" "); xml.append("user=\"" + assessment.getLastEdit().getUser().getUsername() + "\" "); xml .append("date=\"" + FormattedDate.impl.getDate(assessment.getLastEdit().getCreatedDate()) + "\" "); xml.append("node=\"" + assessment.getSpeciesName() + "\" "); xml.append("display=\"\" "); xml.append("/>"); } for (Taxon taxon : SIS.get().getTaxonIO().getTrashedTaxa()) { xml.append("<data id=\"" + taxon.getId() + "\" "); xml.append("type=\"taxon\" "); xml.append("status=\"\" "); xml.append("user=\"" + taxon.getLastEdit().getUser().getUsername() + "\" "); xml.append("date=\"" + FormattedDate.impl.getDate(taxon.getLastEdit().getCreatedDate()) + "\" "); xml.append("node=\"" + taxon.getFullName() + "\" "); xml.append("display=\"\" "); xml.append("/>"); } xml.append("</trash>"); response.setStatus(Status.SUCCESS_OK); response.setEntity(xml.toString(), MediaType.TEXT_XML); } catch (PersistentException e) { // TODO Auto-generated catch block e.printStackTrace(); response.setStatus(Status.SERVER_ERROR_INTERNAL); response.setEntity(e.getMessage(), MediaType.TEXT_PLAIN); } } private void handleRestore(Request request, Response response) { try { String restoreRelatedAssessments = (String) request.getAttributes().get("option1"); Document doc = new DomRepresentation(request.getEntity()).getDocument(); Element element = (Element) doc.getDocumentElement().getElementsByTagName("data").item(0); String id = element.getAttribute("id"); String type = element.getAttribute("type"); User user = SIS.get().getUser(request); boolean success = false; String message = null; if (type.equalsIgnoreCase("taxon")) { try { SIS.get().getTaxonIO().restoreTrashedTaxon(Integer.valueOf(id), user); } catch (TaxomaticException e) { response.setEntity(new DomRepresentation(MediaType.TEXT_XML, e.getErrorAsDocument())); response.setStatus(e.isClientError() ? Status.CLIENT_ERROR_BAD_REQUEST : Status.SERVER_ERROR_INTERNAL); return; } if (restoreRelatedAssessments != null && restoreRelatedAssessments.equalsIgnoreCase("true")) { AssessmentIOMessage m = SIS.get().getAssessmentIO().restoreDeletedAssessmentsAssociatedWithTaxon(Integer .valueOf(id), SIS.get().getUser(request)); message = m.getMessage(); if (m.getFailed() == null || m.getFailed().isEmpty()) { success = true; } } else { success = true; } } else if (type.equalsIgnoreCase("assessment")) { success = SIS.get().getAssessmentIO().restoreTrashedAssessments(Integer.valueOf(id), SIS.get().getUser(request)).status.isSuccess(); if (success) { Taxon taxon = SIS.get().getAssessmentIO().getNonCachedAssessment(Integer.valueOf(id)).getTaxon(); if (taxon.getState() == Taxon.DELETED) { try { SIS.get().getTaxonIO().restoreTrashedTaxon(taxon.getId(), SIS.get().getUser(request)); } catch (TaxomaticException e) { Debug.println(e); success = false; } } } } else { message = "Invalid type -- should be assessment or taxon."; } if (success && message == null) message = "Successfully restored " + type; else if (!success && message == null) message = "Unable to find " + type; if (success) response.setStatus(Status.SUCCESS_OK); else response.setStatus(Status.CLIENT_ERROR_BAD_REQUEST); response.setEntity(message, MediaType.TEXT_PLAIN); } catch (IOException e) { e.printStackTrace(); response.setStatus(Status.SERVER_ERROR_INTERNAL); } catch (NumberFormatException e) { e.printStackTrace(); response.setStatus(Status.SERVER_ERROR_INTERNAL); } catch (PersistentException e) { e.printStackTrace(); response.setStatus(Status.SERVER_ERROR_INTERNAL); } } public void performService(Request request, Response response) { try { if (((String) request.getAttributes().get("action")).equals("list")) handleGet(request, response); if (((String) request.getAttributes().get("action")).equals("restore")) handleRestore(request, response); if (((String) request.getAttributes().get("action")).equals("delete")) handleDelete(request, response); if (((String) request.getAttributes().get("action")).equals("deleteall")) handleDeleteAll(request, response); } catch (Exception e) { e.printStackTrace(); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
00bf3b644b16238a0bf559526c574991b6a33dfb
982f6c3a3c006d2b03f4f53c695461455bee64e9
/src/main/java/com/alipay/api/domain/BudgetInfo.java
7ab0d447e09218bc745c209cfdefafbe2175be82
[ "Apache-2.0" ]
permissive
zhaomain/Alipay-Sdk
80ffc0505fe81cc7dd8869d2bf9a894b823db150
552f68a2e7c10f9ffb33cd8e0036b0643c7c2bb3
refs/heads/master
2022-11-15T03:31:47.418847
2020-07-09T12:18:59
2020-07-09T12:18:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,464
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 预算信息 * * @author auto create * @since 1.0, 2019-06-25 19:48:15 */ public class BudgetInfo extends AlipayObject { private static final long serialVersionUID = 3742245312677824139L; /** * 预算数量 */ @ApiField("budget_total") private String budgetTotal; /** * 预算类型 */ @ApiField("budget_type") private String budgetType; /** * 设置每天的预算,如每天的预算设置为100,即该活动一天最多发放100次 */ @ApiField("sub_budget_dimension") private String subBudgetDimension; /** * 用于控制子纬度的预算数量 */ @ApiField("sub_value") private String subValue; public String getBudgetTotal() { return this.budgetTotal; } public void setBudgetTotal(String budgetTotal) { this.budgetTotal = budgetTotal; } public String getBudgetType() { return this.budgetType; } public void setBudgetType(String budgetType) { this.budgetType = budgetType; } public String getSubBudgetDimension() { return this.subBudgetDimension; } public void setSubBudgetDimension(String subBudgetDimension) { this.subBudgetDimension = subBudgetDimension; } public String getSubValue() { return this.subValue; } public void setSubValue(String subValue) { this.subValue = subValue; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
d360bd70e40566457b6872e43f0735f88e6cda8f
7fa8905d13e17cd02fd032305e3a6e32b92c30e1
/demo/src/test/java/dev/alexengrig/metter/demo/lombokgetterandsetter/InheritedLombokGetterAndSetterDomainTest.java
8f7844a1a4ccddd6576732e97e72ec5a41ffa05c
[ "Apache-2.0" ]
permissive
kung036/metter
40f6c897a69de04f884d4054c33403480af92065
209aca175d6f2469effdd5933276a68be191d21f
refs/heads/master
2023-08-06T13:40:53.436254
2021-10-02T13:19:34
2021-10-02T13:19:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,413
java
/* * Copyright 2020-2021 Alexengrig Dev. * * 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 dev.alexengrig.metter.demo.lombokgetterandsetter; import dev.alexengrig.metter.demo.BaseDomainTest; import org.junit.Test; import java.util.Map; import java.util.function.BiConsumer; import java.util.function.Function; public class InheritedLombokGetterAndSetterDomainTest extends BaseDomainTest<InheritedLombokGetterAndSetterDomain> { @Test public void should_contains_allGetters() { Map<String, Function<InheritedLombokGetterAndSetterDomain, Object>> getterByField = getGetterMap(new InheritedLombokGetterAndSetterDomainGetterSupplier()); assertSize(getterByField, 3); assertGetterFields(getterByField, "integer", "bool", "longer"); InheritedLombokGetterAndSetterDomain domain = new InheritedLombokGetterAndSetterDomain(1, true, 3L); assertGetterValue(getterByField, domain, "integer", 1); assertGetterValue(getterByField, domain, "bool", true); assertGetterValue(getterByField, domain, "longer", 3L); } @Test public void should_contains_allSetters() { Map<String, BiConsumer<InheritedLombokGetterAndSetterDomain, Object>> setterByField = getSetterMap(new InheritedLombokGetterAndSetterDomainSetterSupplier()); assertSize(setterByField, 3); assertSetterFields(setterByField, "integer", "bool", "longer"); InheritedLombokGetterAndSetterDomain domain = new InheritedLombokGetterAndSetterDomain(1, true, 3L); assertSetterValue(setterByField, domain, "integer", 10, InheritedLombokGetterAndSetterDomain::getInteger); assertSetterValue(setterByField, domain, "bool", false, InheritedLombokGetterAndSetterDomain::isBool); assertSetterValue(setterByField, domain, "longer", 30L, InheritedLombokGetterAndSetterDomain::getLonger); } }
[ "alexengrigdev@gmail.com" ]
alexengrigdev@gmail.com
8b46ce1bd1e761c324e168da06a73ea9ac529c0d
421f0a75a6b62c5af62f89595be61f406328113b
/generated_tests/no_seeding/6_jnfe-br.com.jnfe.base.TpServico-1.0-3/br/com/jnfe/base/TpServico_ESTest_scaffolding.java
0dc0ea63c0211de0b362200aeda82fff5746e12e
[]
no_license
tigerqiu712/evosuite-model-seeding-empirical-evaluation
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
11a920b8213d9855082d3946233731c843baf7bc
refs/heads/master
2020-12-23T21:04:12.152289
2019-10-30T08:02:29
2019-10-30T08:02:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
532
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Mon Oct 28 15:32:20 GMT 2019 */ package br.com.jnfe.base; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; import org.evosuite.runtime.sandbox.Sandbox; import org.evosuite.runtime.sandbox.Sandbox.SandboxMode; @EvoSuiteClassExclude public class TpServico_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pderakhshanfar@bsr01.win.tue.nl" ]
pderakhshanfar@bsr01.win.tue.nl
01cbce73b3c9c9178d85aa41ca43d2bf62cce5d1
8a86f37d2404198bacd2f75fba3112cd78e71d81
/1-Learn/AnimationOfLinearlayoutSet-9.2/l04layoutanimationsetbyxml/src/test/java/com/jikexueyuan/l04layoutanimationsetbyxml/ExampleUnitTest.java
2591200eef438dae485c3f128708db0b73c7a2f8
[]
no_license
BinYangXian/AndroidStudioProjects
86791a16b99570aeb585524f03ccea3d3360596a
9438f0271625eb30de846bb3c2e8f14be2cf069c
refs/heads/master
2020-12-25T09:57:45.860434
2016-07-30T02:27:12
2016-07-30T02:27:12
62,277,964
0
0
null
null
null
null
UTF-8
Java
false
false
335
java
package com.jikexueyuan.l04layoutanimationsetbyxml; import org.junit.Test; import static org.junit.Assert.*; /** * To work on unit tests, switch the Test Artifact in the Build Variants view. */ public class ExampleUnitTest { @Test public void addition_isCorrect() throws Exception { assertEquals(4, 2 + 2); } }
[ "350852832@qq.com" ]
350852832@qq.com
5b71a334d892cde3bd6b6160cfaf99b1d423680e
94ac58ca20abb8f42d113506c76bd6dffb4ce53c
/ProgramingWeek2/src/week3Traits/exe01/Customer.java
674d8864dbfdfd3a117a0b96f7fb42a658ac405e
[]
no_license
Mahnazshamissa/Back-Up-Befor-BackEnd
78e3fc1a2f67e7ae2303be95ff57b27cac00b4f1
943b762959c03f65a9debd6da47b6ad92145bed2
refs/heads/master
2021-06-27T02:47:27.905716
2020-10-30T23:37:41
2020-10-30T23:37:41
172,503,140
0
0
null
null
null
null
UTF-8
Java
false
false
485
java
package week3Traits.exe01; public class Customer { private String name; private String category; public Customer(String name) { this.name = name; } public String getName() { return name; } public String getCategory() { return category; } public void setCategory(String category) { this.category = category; } } // A Customer has a name and a category. // It also has the methods getName and getCategory.
[ "f.bakhshiani@gmail.com" ]
f.bakhshiani@gmail.com
7aa8126b56e69f2c5ab9fb0abbed30662c682bbc
c82f89b0e6d1547c2829422e7de7664b378c1039
/src/com/hongyu/listener/Fuzongtuiyajinshenhe.java
4522d918882d3b70a0597e0b5756f4c76e1d88b6
[]
no_license
chenxiaoyin3/shetuan_backend
1bab5327cafd42c8086c25ade7e8ce08fda6a1ac
e21a0b14a2427c9ad52ed00f68d5cce2689fdaeb
refs/heads/master
2022-05-15T14:52:07.137000
2022-04-07T03:30:57
2022-04-07T03:30:57
250,762,749
1
2
null
null
null
null
UTF-8
Java
false
false
2,008
java
package com.hongyu.listener; import static com.hongyu.util.Constants.CaigoubushenheTuiyajin; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; import org.activiti.engine.delegate.DelegateTask; import org.activiti.engine.delegate.TaskListener; import org.springframework.web.context.ContextLoader; import org.springframework.web.context.WebApplicationContext; import com.hongyu.entity.Department; import com.hongyu.entity.HyAdmin; import com.hongyu.entity.HyDepartmentModel; import com.hongyu.entity.HyRole; import com.hongyu.entity.HyRoleAuthority; import com.hongyu.service.HyDepartmentModelService; import com.hongyu.util.qywxMessage.QyWxConstants; import com.hongyu.util.qywxMessage.qywxUtil.SendMessageQyWx; public class Fuzongtuiyajinshenhe implements TaskListener { @Override public void notify(DelegateTask delegateTask) { // TODO Auto-generated method stub WebApplicationContext webApplicationContext = ContextLoader.getCurrentWebApplicationContext(); HyDepartmentModelService hyDepartmentModelService = webApplicationContext.getBean(HyDepartmentModelService.class); HyDepartmentModel model = hyDepartmentModelService.find("总公司"); Set<Department> ds = model.getHyDepartments(); Set<HyAdmin> admins = new HashSet<>(); for(Department d : ds) { admins.addAll(d.getHyAdmins()); } List<String> userIds = new ArrayList<>(); for(HyAdmin admin : admins) { HyRole role = admin.getRole(); if (role.getHyRoleAuthorities().size() > 0) { for (HyRoleAuthority hyRoleAuthority : role.getHyRoleAuthorities()) { if (CaigoubushenheTuiyajin.equals(hyRoleAuthority.getAuthoritys().getRequestUrl())) { delegateTask.addCandidateUser(admin.getUsername()); userIds.add(admin.getUsername()); break; } } } } String content = "您有新工作需要审核,请尽快完成。"; SendMessageQyWx.sendWxMessage(QyWxConstants.FU_ZONG_SHEN_HE_QYWX_APP_AGENT_ID, userIds , null, content ); } }
[ "925544714@qq.com" ]
925544714@qq.com
ca90a4c6cc6c95d7c97ba8a1031a58b3ee00bd3f
1f0cb0b6f4c74ff706254baf5b028bc9417615f9
/spring-micro-repositories/spring-micro-repositories-postgresql/spring-micro-repositories-postgresql-modules_2/spring-micro-repositories-postgresql-item_2/src/main/java/org/example/spring/repositories/postgres/items/dao/impl/TMealFeeItemDaoImpl.java
83d6d3962c19f997c7a6b2e69e7a7debce8bed23
[]
no_license
yuan50697105/spring-build-project-1
af448da5e3676a99c22aaaca6de4fb9e8ea55811
967fc586637146d8ab3f80bd518ed50bf70dae90
refs/heads/master
2022-07-22T13:45:00.442964
2021-06-03T02:53:19
2021-06-03T02:53:19
359,333,990
0
0
null
null
null
null
UTF-8
Java
false
false
2,162
java
package org.example.spring.repositories.postgres.items.dao.impl; import com.baomidou.mybatisplus.core.conditions.Wrapper; import lombok.AllArgsConstructor; import org.example.spring.plugins.mybatis.dao.impl.TkBaseDaoImpl; import org.example.spring.repositories.postgres.items.dao.TMealFeeItemDao; import org.example.spring.repositories.postgres.items.mapper.TMealFeeItemMapper; import org.example.spring.repositories.postgres.items.table.po.TMealFeeItem; import org.example.spring.repositories.postgres.items.table.query.TMealFeeItemQuery; import org.springframework.stereotype.Repository; import org.springframework.transaction.annotation.Transactional; import tk.mybatis.mapper.weekend.WeekendSqls; import java.util.Arrays; import java.util.List; @Repository @AllArgsConstructor @Transactional public class TMealFeeItemDaoImpl extends TkBaseDaoImpl<TMealFeeItem, TMealFeeItemQuery, TMealFeeItemMapper> implements TMealFeeItemDao { @Override protected Wrapper<TMealFeeItem> queryWrapper(TMealFeeItemQuery tMealFeeItemQuery) { return null; } @Override public boolean deleteByMealId(Long id) { return deleteByExample(exampleBuilder().where(WeekendSqls.<TMealFeeItem>custom().andEqualTo(TMealFeeItem::getMealId, id)).build()); } @Override public boolean deleteByMealIds(Long... ids) { return deleteByMealIds(Arrays.asList(ids)); } @Override public boolean deleteByMealIds(List<Long> ids) { return deleteByExample(exampleBuilder().where(WeekendSqls.<TMealFeeItem>custom().andIn(TMealFeeItem::getMealId, ids)).build()); } @Override public boolean deleteByFeeItemId(Long id) { return deleteByExample(exampleBuilder().where(WeekendSqls.<TMealFeeItem>custom().andEqualTo(TMealFeeItem::getFeeItemId, id)).build()); } @Override public boolean deleteByFeeItemIds(Long... ids) { return deleteByFeeItemIds(Arrays.asList(ids)); } @Override public boolean deleteByFeeItemIds(List<Long> ids) { return deleteByExample(exampleBuilder().where(WeekendSqls.<TMealFeeItem>custom().andIn(TMealFeeItem::getFeeItemId, ids)).build()); } }
[ "710575900@qq.com" ]
710575900@qq.com
6bdf815e33e592b6a24f23effb35e799bbb909ba
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/25/25_9560ac7de69fa8371bf6c80a6d5edf574a94b1fa/addVolunteerServlet/25_9560ac7de69fa8371bf6c80a6d5edf574a94b1fa_addVolunteerServlet_s.java
27180ac75f37e5ef624831d73264640f470422fc
[]
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
5,787
java
package com.VolunteerCoordinatorApp; import java.io.*; import java.net.URL; import java.text.SimpleDateFormat; import java.util.*; import javax.jdo.PersistenceManager; import javax.servlet.http.*; import com.google.appengine.api.datastore.Key; import com.google.appengine.api.datastore.KeyFactory; import com.google.gdata.client.calendar.CalendarQuery; import com.google.gdata.client.calendar.CalendarService; import com.google.gdata.data.DateTime; import com.google.gdata.data.PlainTextConstruct; import com.google.gdata.data.calendar.*; import com.google.gdata.data.extensions.*; import com.google.gdata.util.AuthenticationException; import com.google.gdata.util.ServiceException; @SuppressWarnings("serial") public class addVolunteerServlet extends HttpServlet { public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException { doGet(req, resp); } public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException { String date = req.getParameter("date"); String title = req.getParameter("title"); String name = req.getParameter("name"); //If no user in query string, prompt to log in. if (name == null || name.equalsIgnoreCase("null") || name.equals("")) { String newURL = "/index.jsp?name=none"; resp.sendRedirect( newURL ); } URL feedUrl = new URL("https://www.google.com/calendar/feeds/default/private/full"); //&max-results=10"); CalendarQuery myQuery = new CalendarQuery(feedUrl); myQuery.setStringCustomParameter("futureevents", "true"); CalendarService myService = new CalendarService("Volunteer-Coordinator-Calendar"); try { myService.setUserCredentials("rockcreekvolunteercoordinator@gmail.com", "G0covenant"); } catch (AuthenticationException e) { // TODO Auto-generated catch block e.printStackTrace(); } // Send the request and receive the response: CalendarEventFeed resultFeed = null; try { resultFeed = myService.query(myQuery, CalendarEventFeed.class); } catch (ServiceException e) { // TODO Auto-generated catch block e.printStackTrace(); } List<CalendarEventEntry> results = (List<CalendarEventEntry>)resultFeed.getEntries(); for (CalendarEventEntry entry : results) { // Get the start time for the event When time = entry.getTimes().get(0); DateTime start = time.getStartTime(); // TODO Find a way to automate this switching. //(Offset is done in minutes) //start.setTzShift(-240); //Use an offset of -300 for non-Daylight Savings time. start.setTzShift(-300); // Concert to milliseconds to get a date object, which can be formatted easier. Date entryDate = new Date(start.getValue() + 1000 * (start.getTzShift() * 60)); String datePattern = "MM-dd-yyyy"; SimpleDateFormat dateFormat = new SimpleDateFormat(datePattern); String startDay = dateFormat.format(entryDate); String eventTitle = new String(entry.getTitle().getPlainText()); if (startDay.equals(date) && eventTitle.equals(title)) { String content = entry.getPlainTextContent(); if (content.contains("<volunteers>")) { String contentArray[] = content.split("<volunteers>"); StringBuffer volList = new StringBuffer(contentArray[1]); //make sure the user isn't already in the list if (!contentArray[1].contains(name.trim())) { int end = volList.indexOf("</volunteers>"); volList.insert(end, name.trim() + " ; "); content = contentArray[0] + volList; } } else { content += " <volunteers> " + name + " ; </volunteers>"; } entry.setContent(new PlainTextConstruct(content)); URL editUrl = new URL(entry.getEditLink().getHref()); try { myService.update(editUrl, entry); } catch (ServiceException e) { // TODO Auto-generated catch block e.printStackTrace(); } //Search for existing calendars under this user's name PersistenceManager pm = PMF.get().getPersistenceManager(); Key k = KeyFactory.createKey(Volunteer.class.getSimpleName(), name); Volunteer v = pm.getObjectById(Volunteer.class, k); String usrCalUrl = v.getCalendarId(); URL newUrl = new URL("http://www.google.com/calendar/feeds/" + usrCalUrl + "/private/full"); try { myService.insert(newUrl, entry); } catch ( ServiceException e ) { // TODO Auto-generated catch block e.printStackTrace(); } } } resp.sendRedirect("/calendar.jsp?name=" + name); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
f4d2fb8e493624e05b614bd04dbbc0b524809701
f4a60d28337f0e4669cfb0535c0f5c49b83b39d9
/src/main/java/com/bigdata2017/smartcar/GenDrivingLog.java
ddf2fea515522539c2050a4c5bf47752aa777d5d
[]
no_license
jsh2174/smartcar
ffdba3162c153a9fa01882493631d03e3bedef63
198d743f9a915d3c35571b19090a106fc78a2962
refs/heads/master
2021-04-15T17:08:49.820342
2018-03-29T14:50:12
2018-03-29T14:50:12
126,681,634
0
0
null
null
null
null
UTF-8
Java
false
false
2,202
java
package com.bigdata2017.smartcar; import java.io.FileWriter; import java.io.IOException; import java.io.PrintWriter; import java.text.DecimalFormat; import java.text.SimpleDateFormat; import java.util.Date; import java.util.HashSet; import java.util.Iterator; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; public class GenDrivingLog { public static void main(String[] args) { PrintWriter printWriter = null; try { int carCount = 100; String date = new SimpleDateFormat( "yyyyMMdd" ).format( new Date( System.currentTimeMillis() ) ); if(args != null && args.length > 1) { date = args[0]; } if(args != null && args.length > 1) { carCount = Integer.parseInt(args[1]); } ExecutorService exc = Executors.newFixedThreadPool(carCount); int wildDrivercnt = (int)(carCount * 0.1); HashSet<Integer> wildCarSet = new HashSet<Integer>(); for(int i=0 ; i < wildDrivercnt; i++) { wildCarSet.add(randomRange(1,carCount)); } Iterator<Integer> itr = wildCarSet.iterator(); boolean isWild = false; int tmpWildCarNum; //printWriter = new PrintWriter( System.out, true ); String logFile = "./logs/driving.log"; printWriter = new PrintWriter( new FileWriter( logFile ), true ); for(int i = 1; i <= carCount; i++) { while(itr.hasNext()) { tmpWildCarNum = itr.next(); if( tmpWildCarNum == i ) { isWild = true; break; } else { isWild = false; } } itr = wildCarSet.iterator(); exc.submit( new GenDrivingLogThread( date, genCarId( i ), isWild, printWriter ) ); } } catch( IOException e ) { e.printStackTrace(); } } public static String genCarId(int num) { String[] carNumPrefix = {"A", "B" , "C" , "D" , "E" , "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"}; String prefixNum = carNumPrefix[randomRange(0, 25)] ; DecimalFormat format = new DecimalFormat("0000"); String carNum = format.format(num); return prefixNum + carNum; } public static int randomRange(int n1, int n2) { return (int)((Math.random() * (n2 - n1 + 1)) + n1); } }
[ "kickscar@gmail.com" ]
kickscar@gmail.com
bdd3b01e53611c8fb5742080f6535b76a8d9f99f
129f58086770fc74c171e9c1edfd63b4257210f3
/src/testcases/CWE89_SQL_Injection/CWE89_SQL_Injection__PropertiesFile_prepareStatement_73b.java
88116e278cca5eb7a52b96d35c6cdcbdacc433ec
[]
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
6,173
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE89_SQL_Injection__PropertiesFile_prepareStatement_73b.java Label Definition File: CWE89_SQL_Injection.label.xml Template File: sources-sinks-73b.tmpl.java */ /* * @description * CWE: 89 SQL Injection * BadSource: PropertiesFile Read data from a .properties file (in property named data) * GoodSource: A hardcoded string * Sinks: prepareStatement * GoodSink: Use prepared statement and execute (properly) * BadSink : data concatenated into SQL statment used in prepareStatement() call, which could result in SQL Injection * Flow Variant: 73 Data flow: data passed in a LinkedList from one method to another in different source files in the same package * * */ package testcases.CWE89_SQL_Injection; import testcasesupport.*; import java.util.LinkedList; import java.sql.*; import javax.servlet.http.*; import java.util.logging.Level; import java.util.logging.Logger; public class CWE89_SQL_Injection__PropertiesFile_prepareStatement_73b { public void bad_sink(LinkedList<String> data_linkedlist ) throws Throwable { String data = data_linkedlist.remove(2); Connection conn_tmp2 = null; PreparedStatement sqlstatement = null; try { /* POTENTIAL FLAW: data concatenated into SQL statment used in prepareStatement() call, which could result in SQL Injection */ conn_tmp2 = IO.getDBConnection(); sqlstatement = conn_tmp2.prepareStatement("insert into users (status) values ('updated') where name='"+data+"'"); Boolean bResult = sqlstatement.execute(); if( bResult ) { IO.writeLine("Name, " + data + ", updated successfully"); } else { IO.writeLine("Unable to update records for user: " + data); } } catch( SQLException se ) { IO.logger.log(Level.WARNING, "Error getting database connection", se); } finally { try { if( sqlstatement != null ) { sqlstatement.close(); } } catch( SQLException e ) { IO.logger.log(Level.WARNING, "Error closing PreparedStatement", e); } finally { try { if( conn_tmp2 != null ) { conn_tmp2.close(); } } catch( SQLException e ) { IO.logger.log(Level.WARNING, "Error closing Connection", e); } } } } /* goodG2B() - use GoodSource and BadSink */ public void goodG2B_sink(LinkedList<String> data_linkedlist ) throws Throwable { String data = data_linkedlist.remove(2); Connection conn_tmp2 = null; PreparedStatement sqlstatement = null; try { /* POTENTIAL FLAW: data concatenated into SQL statment used in prepareStatement() call, which could result in SQL Injection */ conn_tmp2 = IO.getDBConnection(); sqlstatement = conn_tmp2.prepareStatement("insert into users (status) values ('updated') where name='"+data+"'"); Boolean bResult = sqlstatement.execute(); if( bResult ) { IO.writeLine("Name, " + data + ", updated successfully"); } else { IO.writeLine("Unable to update records for user: " + data); } } catch( SQLException se ) { IO.logger.log(Level.WARNING, "Error getting database connection", se); } finally { try { if( sqlstatement != null ) { sqlstatement.close(); } } catch( SQLException e ) { IO.logger.log(Level.WARNING, "Error closing PreparedStatement", e); } finally { try { if( conn_tmp2 != null ) { conn_tmp2.close(); } } catch( SQLException e ) { IO.logger.log(Level.WARNING, "Error closing Connection", e); } } } } /* goodB2G() - use BadSource and GoodSink */ public void goodB2G_sink(LinkedList<String> data_linkedlist ) throws Throwable { String data = data_linkedlist.remove(2); Connection conn_tmp2 = null; PreparedStatement sqlstatement = null; try { /* FIX: Use prepared statement and execute (properly) */ conn_tmp2 = IO.getDBConnection(); sqlstatement = conn_tmp2.prepareStatement("insert into users (status) values ('updated') where name=?"); sqlstatement.setString(1, data); Boolean bResult = sqlstatement.execute(); if( bResult ) { IO.writeLine("Name, " + data + ", updated successfully"); } else { IO.writeLine("Unable to update records for user: " + data); } } catch( SQLException se ) { IO.logger.log(Level.WARNING, "Error getting database connection", se); } finally { try { if( sqlstatement != null ) { sqlstatement.close(); } } catch( SQLException e ) { IO.logger.log(Level.WARNING, "Error closing PreparedStatement", e); } finally { try { if( conn_tmp2 != null ) { conn_tmp2.close(); } } catch( SQLException e ) { IO.logger.log(Level.WARNING, "Error closing Connection", e); } } } } }
[ "guillermo.pando@gmail.com" ]
guillermo.pando@gmail.com
7c4470cbdbcbbc9bab5a41395b4c491287a2a683
341c9c7a38acbe5bd3bc3a6eab13f893e2a1907f
/app/src/main/java/com/chengyi/app/jingji/fourgoal/FourgoalEntity.java
ba4b72b6dc0e77578b455ee01b40f330103e1ec6
[]
no_license
Async-Wu/jicaired
7c30492da040c5b31e427b02f35601fd1ce21b12
9ecec93d8358ea1de01eb51f9e1835ba3f424918
refs/heads/master
2021-01-25T11:28:10.127368
2018-03-01T07:33:38
2018-03-01T07:33:38
123,399,131
0
0
null
null
null
null
UTF-8
Java
false
false
6,693
java
package com.chengyi.app.jingji.fourgoal; import java.io.Serializable; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.List; /** * Created by xiaqi on 2016/9/12. */ public class FourgoalEntity implements Serializable{ /** * flag : 1 * remainTime : 0 * issue : ["2016135"] * data : [{"order":0,"hostName":"切 沃","guestName":" 拉齐奥","matchTime":"2016-09-11 21:00:00","bf":"","odds_p":"","odds_f":"","odds_s":"","color":"#7E001C","in":""},{"order":1,"hostName":"AC米兰","guestName":" 乌迪内","matchTime":"2016-09-11 21:00:00","bf":"","odds_p":"","odds_f":"","odds_s":"","color":"#7E001C","in":""},{"order":2,"hostName":"佩斯卡","guestName":" 国米","matchTime":"2016-09-12 02:45:00","bf":"","odds_p":"","odds_f":"","odds_s":"","color":"#7E001C","in":""},{"order":3,"hostName":"罗 马","guestName":" 桑普多","matchTime":"2016-09-11 21:00:00","bf":"","odds_p":"","odds_f":"","odds_s":"","color":"#7E001C","in":""}] * issueId : [7908787] * curIssue : 2016135 * sellEndTime : 09-11 20:00 * curIssueId : 7908787 */ private int flag; private int remainTime; private String curIssue; private String sellEndTime; private int curIssueId; private List<String> issue; /** * order : 0 * hostName : 切 沃 * guestName : 拉齐奥 * matchTime : 2016-09-11 21:00:00 * bf : * odds_p : * odds_f : * odds_s : * color : #7E001C * in : */ private List<DataEntity> data; private List<Integer> issueId; public void setFlag(int flag) { this.flag = flag; } public void setRemainTime(int remainTime) { this.remainTime = remainTime; } public void setCurIssue(String curIssue) { this.curIssue = curIssue; } public void setSellEndTime(String sellEndTime) { this.sellEndTime = sellEndTime; } public void setCurIssueId(int curIssueId) { this.curIssueId = curIssueId; } public void setIssue(List<String> issue) { this.issue = issue; } public void setData(List<DataEntity> data) { this.data = data; } public void setIssueId(List<Integer> issueId) { this.issueId = issueId; } public int getFlag() { return flag; } public int getRemainTime() { return remainTime; } public String getCurIssue() { return curIssue; } public String getSellEndTime() { return sellEndTime; } public int getCurIssueId() { return curIssueId; } public List<String> getIssue() { return issue; } public List<DataEntity> getData() { return data; } public List<Integer> getIssueId() { return issueId; } public static class DataEntity implements Serializable{ private int order; private String hostName; private String guestName; private String matchTime; private String bf; private String odds_p; private String odds_f; private String odds_s; private String color; private String in; public int[] Hoststatusnew=new int[4]; public int caculHost(){ int total1=0; for (int i=0;i<Hoststatusnew.length;i++){ total1=total1+Hoststatusnew[i]; } return total1; } public void cleardata(){ Hoststatusnew[0]=0; Hoststatusnew[1]=0; Hoststatusnew[2]=0; Hoststatusnew[3]=0; Guestatusnew[0]=0; Guestatusnew[1]=0; Guestatusnew[2]=0; Guestatusnew[3]=0; } public int[] Guestatusnew=new int[4]; public int caculGuest(){ int total2=0; for (int i=0;i<Guestatusnew.length;i++){ total2=total2+Guestatusnew[i]; } return total2; } public boolean judgezhu(){ int total1=caculHost(); int total2=caculGuest(); if ((total1*total2)==0){ return false; }else{ return true; } } public void setOrder(int order) { this.order = order; } public void setHostName(String hostName) { this.hostName = hostName; } public void setGuestName(String guestName) { this.guestName = guestName; } public void setMatchTime(String matchTime) { this.matchTime = matchTime; } public void setBf(String bf) { this.bf = bf; } public void setOdds_p(String odds_p) { this.odds_p = odds_p; } public void setOdds_f(String odds_f) { this.odds_f = odds_f; } public void setOdds_s(String odds_s) { this.odds_s = odds_s; } public void setColor(String color) { this.color = color; } public void setIn(String in) { this.in = in; } public int getOrder() { return order; } public String getHostName() { return hostName; } public String getGuestName() { return guestName; } public String getMatchTime() { SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); Date d; try { d= sdf.parse(matchTime); } catch (ParseException e) { e.printStackTrace(); d=new Date(); } SimpleDateFormat s=new SimpleDateFormat("HH:mm:ss"); return s.format(d) ; } public String getBf() { return bf; } public String getOdds_p() { return odds_p; } public String getOdds_f() { return odds_f; } public String getOdds_s() { return odds_s; } public String getColor() { return color; } public String getIn() { return in; } public String getName() { SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); Date d; try { d= sdf.parse(matchTime); } catch (ParseException e) { e.printStackTrace(); d=new Date(); } SimpleDateFormat s=new SimpleDateFormat("MM月dd日"); return s.format(d) ; } } }
[ "810284176@qq.com" ]
810284176@qq.com
d96c0b3a636d8004c31fd3f66b88120b7ce9cd5c
678a3d58c110afd1e9ce195d2f20b2531d45a2e0
/sources/com/bumptech/glide/load/model/stream/StreamFileLoader.java
5185c692eed05863f20224d68d70cb5a9b060971
[]
no_license
jasonnth/AirCode
d1c37fb9ba3d8087efcdd9fa2103fb85d13735d5
d37db1baa493fca56f390c4205faf5c9bbe36604
refs/heads/master
2020-07-03T08:35:24.902940
2019-08-12T03:34:56
2019-08-12T03:34:56
201,842,970
0
2
null
null
null
null
UTF-8
Java
false
false
919
java
package com.bumptech.glide.load.model.stream; import android.content.Context; import android.net.Uri; import com.bumptech.glide.load.model.FileLoader; import com.bumptech.glide.load.model.GenericLoaderFactory; import com.bumptech.glide.load.model.ModelLoader; import com.bumptech.glide.load.model.ModelLoaderFactory; import java.io.File; import java.io.InputStream; public class StreamFileLoader extends FileLoader<InputStream> implements StreamModelLoader<File> { public static class Factory implements ModelLoaderFactory<File, InputStream> { public ModelLoader<File, InputStream> build(Context context, GenericLoaderFactory factories) { return new StreamFileLoader(factories.buildModelLoader(Uri.class, InputStream.class)); } public void teardown() { } } public StreamFileLoader(ModelLoader<Uri, InputStream> uriLoader) { super(uriLoader); } }
[ "thanhhuu2apc@gmail.com" ]
thanhhuu2apc@gmail.com
547c36ebe963d0a72bb38ad298ff5384de697481
9787a5b8b2a3b3cb0403f62069fd765a629ebbbb
/NetAboutCar/src/main/java/com/nasoft/aboutcar/yyjgOutinAreaSet/domain/OutinAreaSet.java
6e23399f7f2762d50b4a5a0140650c7380027fff
[]
no_license
ghosts321/NetAboutCar
6ecb9d24a2e9602dd1c54eaa21d53987ac1c5fd8
9f0ac5911fd8e3149b677cbdbfd10a7227191341
refs/heads/master
2022-12-22T15:38:55.153518
2019-05-26T10:12:12
2019-05-26T10:12:12
188,667,090
0
1
null
2022-12-16T03:31:38
2019-05-26T10:07:32
JavaScript
UTF-8
Java
false
false
2,045
java
package com.nasoft.aboutcar.yyjgOutinAreaSet.domain; import java.sql.Timestamp; /** * 禁止驶入区域 * @author user * */ public class OutinAreaSet { private Integer id; //主键id private String area_name; //区域名称 private Double is_use; //是否启用(0-停用;1-启用) private String map_type; //区域绘制类型(1-圆型,2-多边型) private String rotundity_radius;//圆形半径 private String map_sign; //地图标记 private Integer create_user; //创建人 private Timestamp create_time; //创建时间 private Integer update_user; //更改人 private Timestamp update_time; //更改时间 public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getArea_name() { return area_name; } public void setArea_name(String area_name) { this.area_name = area_name; } public Double getIs_use() { return is_use; } public void setIs_use(Double is_use) { this.is_use = is_use; } public String getMap_type() { return map_type; } public void setMap_type(String map_type) { this.map_type = map_type; } public String getRotundity_radius() { return rotundity_radius; } public void setRotundity_radius(String rotundity_radius) { this.rotundity_radius = rotundity_radius; } public String getMap_sign() { return map_sign; } public void setMap_sign(String map_sign) { this.map_sign = map_sign; } public Integer getCreate_user() { return create_user; } public void setCreate_user(Integer create_user) { this.create_user = create_user; } public Timestamp getCreate_time() { return create_time; } public void setCreate_time(Timestamp create_time) { this.create_time = create_time; } public Integer getUpdate_user() { return update_user; } public void setUpdate_user(Integer update_user) { this.update_user = update_user; } public Timestamp getUpdate_time() { return update_time; } public void setUpdate_time(Timestamp update_time) { this.update_time = update_time; } }
[ "864867103@qq.com" ]
864867103@qq.com
4b07a2762d8bf07945503f8a20083640b7f5259d
c94fbc20ebbcd23652fab5ed23c97ce340b1f499
/xdht-disease-sys/src/main/java/com/xdht/disease/sys/service/impl/RecordWorkLogServiceImpl.java
14487d58a831d5ab6528161bcea454c8bc94c7a6
[]
no_license
penggong/xdht-disease
4d87ddb332bd27daa2ccaacfd76cde80ef7df987
6905ede88ba0d4def1583d2726b07b93de73785b
refs/heads/master
2020-03-20T08:33:06.014216
2018-06-25T09:47:20
2018-06-25T09:47:20
137,311,955
0
0
null
2018-06-14T05:49:47
2018-06-14T05:49:47
null
UTF-8
Java
false
false
3,398
java
package com.xdht.disease.sys.service.impl; import com.github.pagehelper.PageHelper; import com.xdht.disease.common.core.AbstractService; import com.xdht.disease.common.core.PageResult; import com.xdht.disease.sys.dao.RecordWorkLogMapper; import com.xdht.disease.sys.model.RecordWorkLog; import com.xdht.disease.sys.service.RecordWorkLogService; import com.xdht.disease.sys.vo.request.RecordWorkLogRequest; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import tk.mybatis.mapper.entity.Condition; import java.util.List; /** * Created by lzf on 2018/06/06. */ @Service @Transactional public class RecordWorkLogServiceImpl extends AbstractService<RecordWorkLog> implements RecordWorkLogService{ @Autowired private RecordWorkLogMapper recordWorkLogMapper; @Override public List<RecordWorkLog> queryList(RecordWorkLogRequest recordWorkLogRequest) { Condition condition = new Condition(RecordWorkLog.class); condition.createCriteria() .andEqualTo("id", recordWorkLogRequest.getId()) .andEqualTo("workLogNo",recordWorkLogRequest.getWorkLogNo()); if (recordWorkLogRequest.getVerificationResult() != null) { condition.getOredCriteria().get(0).andLike("verificationResult","%"+recordWorkLogRequest.getVerificationResult()+"%"); } if (recordWorkLogRequest.getStatus() != null){ condition.getOredCriteria().get(0).andEqualTo("status",recordWorkLogRequest.getStatus()); } return this.recordWorkLogMapper.selectByCondition(condition); } @Override public PageResult<RecordWorkLog> queryListPage(RecordWorkLogRequest recordWorkLogRequest, Integer pageNum, Integer pageSize) { Condition condition = new Condition(RecordWorkLog.class); condition.createCriteria() .andEqualTo("id", recordWorkLogRequest.getId()) .andEqualTo("workLogNo",recordWorkLogRequest.getWorkLogNo()); if (recordWorkLogRequest.getVerificationResult() != null) { condition.getOredCriteria().get(0).andLike("verificationResult","%"+recordWorkLogRequest.getVerificationResult()+"%"); } if (recordWorkLogRequest.getStatus() != null){ condition.getOredCriteria().get(0).andEqualTo("status",recordWorkLogRequest.getStatus()); } PageHelper.startPage(pageNum, pageSize); List<RecordWorkLog> dataList = this.recordWorkLogMapper.selectByCondition(condition); PageResult<RecordWorkLog> pageList = new PageResult<RecordWorkLog>(); pageList.setTotal(dataList.size()); pageList.setDataList(dataList); return pageList; } @Override public RecordWorkLog add(RecordWorkLog recordWorkLog) { this.recordWorkLogMapper.insertUseGeneratedKeys(recordWorkLog); return recordWorkLog; } @Override public RecordWorkLog delete(Long id) { this.recordWorkLogMapper.deleteByPrimaryKey(id); RecordWorkLog recordWorkLog = new RecordWorkLog(); recordWorkLog.setId(id); return recordWorkLog; } @Override public RecordWorkLog update(RecordWorkLog recordWorkLog) { this.recordWorkLogMapper.updateByPrimaryKeySelective(recordWorkLog); return recordWorkLog; } }
[ "1462439581@qq.com" ]
1462439581@qq.com
c52d1261cc900c042d217373e4839c71f4c3cfeb
0735d7bb62b6cfb538985a278b77917685de3526
/io/reactivex/internal/schedulers/SchedulerPoolFactory.java
ea354384d9fbb47e01557219bfc56bfc3b5bf9e9
[]
no_license
Denoah/personaltrackerround
e18ceaad910f1393f2dd9f21e9055148cda57837
b38493ccc7efff32c3de8fe61704e767e5ac62b7
refs/heads/master
2021-05-20T03:34:17.333532
2020-04-02T14:47:31
2020-04-02T14:51:01
252,166,069
0
0
null
null
null
null
UTF-8
Java
false
false
4,600
java
package io.reactivex.internal.schedulers; import java.util.ArrayList; import java.util.Iterator; import java.util.Map; import java.util.Properties; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ScheduledThreadPoolExecutor; import java.util.concurrent.ThreadFactory; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicReference; public final class SchedulerPoolFactory { static final Map<ScheduledThreadPoolExecutor, Object> POOLS; public static final boolean PURGE_ENABLED; static final String PURGE_ENABLED_KEY = "rx2.purge-enabled"; public static final int PURGE_PERIOD_SECONDS; static final String PURGE_PERIOD_SECONDS_KEY = "rx2.purge-period-seconds"; static final AtomicReference<ScheduledExecutorService> PURGE_THREAD = new AtomicReference(); static { POOLS = new ConcurrentHashMap(); Properties localProperties = System.getProperties(); PurgeProperties localPurgeProperties = new PurgeProperties(); localPurgeProperties.load(localProperties); PURGE_ENABLED = localPurgeProperties.purgeEnable; PURGE_PERIOD_SECONDS = localPurgeProperties.purgePeriod; start(); } private SchedulerPoolFactory() { throw new IllegalStateException("No instances!"); } public static ScheduledExecutorService create(ThreadFactory paramThreadFactory) { paramThreadFactory = Executors.newScheduledThreadPool(1, paramThreadFactory); tryPutIntoPool(PURGE_ENABLED, paramThreadFactory); return paramThreadFactory; } public static void shutdown() { ScheduledExecutorService localScheduledExecutorService = (ScheduledExecutorService)PURGE_THREAD.getAndSet(null); if (localScheduledExecutorService != null) { localScheduledExecutorService.shutdownNow(); } POOLS.clear(); } public static void start() { tryStart(PURGE_ENABLED); } static void tryPutIntoPool(boolean paramBoolean, ScheduledExecutorService paramScheduledExecutorService) { if ((paramBoolean) && ((paramScheduledExecutorService instanceof ScheduledThreadPoolExecutor))) { ScheduledThreadPoolExecutor localScheduledThreadPoolExecutor = (ScheduledThreadPoolExecutor)paramScheduledExecutorService; POOLS.put(localScheduledThreadPoolExecutor, paramScheduledExecutorService); } } static void tryStart(boolean paramBoolean) { if (paramBoolean) { for (;;) { Object localObject = (ScheduledExecutorService)PURGE_THREAD.get(); if (localObject != null) { return; } ScheduledExecutorService localScheduledExecutorService = Executors.newScheduledThreadPool(1, new RxThreadFactory("RxSchedulerPurge")); if (PURGE_THREAD.compareAndSet(localObject, localScheduledExecutorService)) { localObject = new ScheduledTask(); int i = PURGE_PERIOD_SECONDS; localScheduledExecutorService.scheduleAtFixedRate((Runnable)localObject, i, i, TimeUnit.SECONDS); return; } localScheduledExecutorService.shutdownNow(); } } } static final class PurgeProperties { boolean purgeEnable; int purgePeriod; PurgeProperties() {} void load(Properties paramProperties) { if (paramProperties.containsKey("rx2.purge-enabled")) { this.purgeEnable = Boolean.parseBoolean(paramProperties.getProperty("rx2.purge-enabled")); } else { this.purgeEnable = true; } if ((this.purgeEnable) && (paramProperties.containsKey("rx2.purge-period-seconds"))) { try { this.purgePeriod = Integer.parseInt(paramProperties.getProperty("rx2.purge-period-seconds")); } catch (NumberFormatException paramProperties) { this.purgePeriod = 1; } } else { this.purgePeriod = 1; } } } static final class ScheduledTask implements Runnable { ScheduledTask() {} public void run() { Iterator localIterator = new ArrayList(SchedulerPoolFactory.POOLS.keySet()).iterator(); while (localIterator.hasNext()) { ScheduledThreadPoolExecutor localScheduledThreadPoolExecutor = (ScheduledThreadPoolExecutor)localIterator.next(); if (localScheduledThreadPoolExecutor.isShutdown()) { SchedulerPoolFactory.POOLS.remove(localScheduledThreadPoolExecutor); } else { localScheduledThreadPoolExecutor.purge(); } } } } }
[ "ivanov.a@i-teco.ru" ]
ivanov.a@i-teco.ru
cd4ade37f048efdfec9475bd0ee3c1fd7d15a71d
e26d5015e0e1b317d6847903d39f06415b3f685f
/rotateupanim/src/androidTest/java/com/anwesome/uiview/rotateupanim/ApplicationTest.java
b2cdd8611f7bf9662fbfa6e006037be9b6fa18b9
[]
no_license
Anwesh43/RotateupAnim
367d890f0e94936069430b2e3527b53e869ba2ed
28e4be02e3b6552efaa9fa98f963896c6ae46293
refs/heads/master
2021-05-15T00:56:40.619423
2016-12-06T22:08:38
2016-12-06T22:08:38
75,775,578
0
0
null
null
null
null
UTF-8
Java
false
false
363
java
package com.anwesome.uiview.rotateupanim; import android.app.Application; import android.test.ApplicationTestCase; /** * <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a> */ public class ApplicationTest extends ApplicationTestCase<Application> { public ApplicationTest() { super(Application.class); } }
[ "anweshthecool0@gmail.com" ]
anweshthecool0@gmail.com
524324d7df36ac767fa36c15919eac47149ca84c
473b76b1043df2f09214f8c335d4359d3a8151e0
/benchmark/bigclonebenchdata_completed/18544889.java
4aef46332f0d2b6c3c60bee55b20017bbd5207a8
[]
no_license
whatafree/JCoffee
08dc47f79f8369af32e755de01c52d9a8479d44c
fa7194635a5bd48259d325e5b0a190780a53c55f
refs/heads/master
2022-11-16T01:58:04.254688
2020-07-13T20:11:17
2020-07-13T20:11:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,085
java
import java.io.*; import java.lang.*; import java.util.*; import java.net.*; import java.applet.*; import java.security.*;import java.awt.*; class c18544889 { public static boolean delete(String url, int ip, int port) { try { HttpURLConnection request = (HttpURLConnection) new URL(url).openConnection(); request.setRequestMethod("DELETE"); MyHelperClass GameRecord = new MyHelperClass(); request.setRequestProperty((String)(Object)GameRecord.GAME_IP_HEADER, String.valueOf(ip)); // MyHelperClass GameRecord = new MyHelperClass(); request.setRequestProperty((String)(Object)GameRecord.GAME_PORT_HEADER, String.valueOf(port)); request.connect(); return request.getResponseCode() == HttpURLConnection.HTTP_OK; } catch (IOException e) { e.printStackTrace(); } return false; } } // Code below this line has been added to remove errors class MyHelperClass { public MyHelperClass GAME_PORT_HEADER; public MyHelperClass GAME_IP_HEADER; }
[ "piyush16066@iiitd.ac.in" ]
piyush16066@iiitd.ac.in
3a33aef606340518df021fd53adfde5527a982fa
bafab6aea4107c2915cc2da62fa14296f4f9ded9
/kie-wb-common-stunner/kie-wb-common-stunner-sets/kie-wb-common-stunner-basicset/kie-wb-common-stunner-basicset-api/src/main/java/org/kie/workbench/common/stunner/basicset/definition/Ring.java
fba99a7b37e8fcd503c456c6e838a2fd1d24fab6
[ "Apache-2.0" ]
permissive
lazarotti/kie-wb-common
7da98f53758c211c94002660cf44698b9a2cccc4
bc98aca29846baaa01fb9a5dc468ab4f3f55a8c7
refs/heads/master
2021-01-12T01:46:55.935051
2017-01-09T10:58:05
2017-01-09T10:58:05
78,430,514
0
0
null
2017-01-09T13:19:14
2017-01-09T13:19:14
null
UTF-8
Java
false
false
5,751
java
/* * Copyright 2016 Red Hat, Inc. and/or its affiliates. * * 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.kie.workbench.common.stunner.basicset.definition; import org.jboss.errai.common.client.api.annotations.MapsTo; import org.jboss.errai.common.client.api.annotations.NonPortable; import org.jboss.errai.common.client.api.annotations.Portable; import org.jboss.errai.databinding.client.api.Bindable; import org.kie.workbench.common.forms.metaModel.FieldDef; import org.kie.workbench.common.stunner.basicset.definition.property.InnerRadius; import org.kie.workbench.common.stunner.basicset.definition.property.Name; import org.kie.workbench.common.stunner.basicset.definition.property.OuterRadius; import org.kie.workbench.common.stunner.basicset.definition.property.background.BackgroundAndBorderSet; import org.kie.workbench.common.stunner.basicset.definition.property.font.FontSet; import org.kie.workbench.common.stunner.basicset.shape.def.RingShapeDefImpl; import org.kie.workbench.common.stunner.core.definition.annotation.*; import org.kie.workbench.common.stunner.core.definition.annotation.definition.Category; import org.kie.workbench.common.stunner.core.definition.annotation.definition.Labels; import org.kie.workbench.common.stunner.core.definition.annotation.definition.Title; import org.kie.workbench.common.stunner.core.definition.builder.Builder; import org.kie.workbench.common.stunner.core.factory.graph.NodeFactory; import org.kie.workbench.common.stunner.shapes.factory.BasicShapesFactory; import static org.kie.workbench.common.stunner.basicset.util.FieldDefLabelConstants.*; import javax.validation.Valid; import java.util.HashSet; import java.util.Set; @Portable @Bindable @Definition( graphFactory = NodeFactory.class, builder = Ring.RingBuilder.class ) @Shape( factory = BasicShapesFactory.class, def = RingShapeDefImpl.class ) public class Ring { @Category public static final transient String category = Categories.BASIC; @Title public static final transient String title = "Ring"; @Description public static final transient String description = "A ring"; @Property @FieldDef( label = FIELDDEF_NAME, property = "value" ) @Valid private Name name; @PropertySet @FieldDef( label = FIELDDEF_BACKGROUND_AND_BORDERS, position = 0 ) @Valid private BackgroundAndBorderSet backgroundSet; @PropertySet @FieldDef( label = FIELDDEF_FONT, position = 1 ) @Valid private FontSet fontSet; @Property @FieldDef( label = FIELDDEF_OUTER_RADIUS, property = "value" ) @Valid private OuterRadius outerRadius; @Property @FieldDef( label = FIELDDEF_INNER_RADIUS, property = "value" ) @Valid private InnerRadius innerRadius; @Labels private final Set<String> labels = new HashSet<String>() {{ add( "all" ); }}; @NonPortable public static class RingBuilder implements Builder<Ring> { public static final String COLOR = "#ffEE00"; public static final String BORDER_COLOR = "#000000"; public static final Double OUTER_RADIUS = 25d; public static final Double INNER_RADIUS = 15d; public static final Double BORDER_SIZE = 1.5d; @Override public Ring build() { return new Ring( new Name( "Ring" ), new BackgroundAndBorderSet( COLOR, BORDER_COLOR, BORDER_SIZE ), new FontSet(), new OuterRadius( OUTER_RADIUS ), new InnerRadius( INNER_RADIUS ) ); } } public Ring() { } public Ring( @MapsTo( "name" ) Name name, @MapsTo( "backgroundSet" ) BackgroundAndBorderSet backgroundSet, @MapsTo( "fontSet" ) FontSet fontSet, @MapsTo( "outerRadius" ) OuterRadius outerRadius, @MapsTo( "innerRadius" ) InnerRadius innerRadius ) { this.name = name; this.backgroundSet = backgroundSet; this.fontSet = fontSet; this.outerRadius = outerRadius; this.innerRadius = innerRadius; } public String getCategory() { return category; } public String getTitle() { return title; } public String getDescription() { return description; } public Set<String> getLabels() { return labels; } public Name getName() { return name; } public void setName( Name name ) { this.name = name; } public BackgroundAndBorderSet getBackgroundSet() { return backgroundSet; } public void setBackgroundSet( BackgroundAndBorderSet backgroundSet ) { this.backgroundSet = backgroundSet; } public FontSet getFontSet() { return fontSet; } public void setFontSet( FontSet fontSet ) { this.fontSet = fontSet; } public OuterRadius getOuterRadius() { return outerRadius; } public void setOuterRadius( OuterRadius outerRadius ) { this.outerRadius = outerRadius; } public InnerRadius getInnerRadius() { return innerRadius; } public void setInnerRadius( InnerRadius innerRadius ) { this.innerRadius = innerRadius; } }
[ "manstis@users.noreply.github.com" ]
manstis@users.noreply.github.com
ea955d4c17e79a8193b8f394a68ace6c0fcb13a9
eac90a1508cd9be5d99fd1907109acbbcabc8a9e
/PACT/web-services-spring-pact-client/src/main/java/de/example/spring/pact/consumer/domain/entity/Car.java
6884f7385a9aa3777048abd57b3cc5b32805c6e8
[]
no_license
gumartinm/SpringWebServicesForFun
49504891972343a9947c5351fcc4f4ac187944ee
54115341303f2582594cb7800e7bb01ef98c5beb
refs/heads/master
2020-12-24T05:23:08.879186
2019-02-25T01:27:24
2019-02-25T01:27:24
6,536,784
1
1
null
null
null
null
UTF-8
Java
false
false
672
java
package de.example.spring.pact.consumer.domain.entity; public class Car { private final String brand; private final String engine; protected Car(String brand, String engine) { this.brand = brand; this.engine = engine; } public String getBrand() { return brand; } public String getEngine() { return engine; } public static class Builder { private String brand; private String engine; public Builder withBrand(String brand) { this.brand = brand; return this; } public Builder withEngine(String engine) { this.engine = engine; return this; } public Car build() { return new Car(this.brand, this.engine); } } }
[ "gu.martinm@gmail.com" ]
gu.martinm@gmail.com
da4dde5cab99eb78736eddc4857073fcd141bb16
8f3b28cabf2c0552d1db7ce74ac6a786358fa19e
/src/codeForces/virtual/cf720/D.java
708f8eb8b5a83892565eceb44b5a2456050b9785
[]
no_license
karanS1314/FullJavaPractice
896b48bfa5a9b81c776641a852bab5031f7814aa
f6cce995969dd0d106cc5482e7fd4f7ecd1de3af
refs/heads/master
2023-07-01T06:51:19.353007
2021-08-08T18:10:47
2021-08-08T18:10:47
359,021,462
1
0
null
null
null
null
UTF-8
Java
false
false
8,135
java
package codeForces.virtual.cf720; // * * * the goal is to be worlds best * * * // import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.*; public class D { static class Pair implements Comparable<Pair>{ int a; int b; Pair(int a , int b){ this.a = a; this.b = b; } public int compareTo(Pair o){ return this.a - o.a; } } //================================================================================================== public static void main(String[] args) { FastScanner sc = new FastScanner(); int t = 1; while(t-->0){ int n = sc.nextInt(); int a[] = sc.readArray(n); HashMap<Integer , LinkedList<Integer>> map = new HashMap<>(); int i = 0; for(int e : a){ map.put(e , map.getOrDefault(e, new LinkedList<>())); map.get(e).add(i); i++; } ArrayList<Integer> al = new ArrayList<>(); ArrayList<Integer> bl = new ArrayList<>(); al.add(-1); bl.add(-1); for(i = 0; i < n; i++){ int ao = al.get(al.size() - 1); int a1 = bl.get(bl.size() - 1); if(a[i] == ao){ if(a[i] == a1){ // dono last ke equal // } else{ // sirf ao ke equal bl.add(a[i]); } } else if(a[i] == a1){ // sirf a1 ke equal al.add(a[i]); } else{ // dono ke not equal if(ao == - 1){ bl.add(a[i]); } else if(a1 == -1){ al.add(a[i]); } else{ // dono arraylist non empty int next_ao = imx; // next index of ao in original array int next_a1 = imx; // " " " " " " " a1 if(map.get(ao).size() > 0){ next_ao = map.get(ao).get(0); } if(map.get(a1).size() > 0){ next_a1 = map.get(a1).get(0); } if(next_ao > next_a1){ al.add(a[i]); } else{ bl.add(a[i]); } } } map.get(a[i]).remove(0); } int res = al.size() + bl.size() - 2; System.out.println(res); } } //================================================================================================== // Use this instead of Arrays.sort() on an array of ints. Arrays.sort() is n^2 // worst case since it uses a version of quicksort. Although this would never // actually show up in the real world, in codeforces, people can hack, so // this is needed. static void sort(int[] a) { //ruffle int n=a.length; Random r=new Random(); for (int i=0; i<a.length; i++) { int oi=r.nextInt(n), temp=a[i]; a[i]=a[oi]; a[oi]=temp; } //then sort Arrays.sort(a); } // Use this to input code since it is faster than a Scanner static class FastScanner { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st=new StringTokenizer(""); String next() { while (!st.hasMoreTokens()) try { st=new StringTokenizer(br.readLine()); } catch (IOException e) { e.printStackTrace(); } return st.nextToken(); } int nextInt() { return Integer.parseInt(next()); } double nextDouble() { return Double.parseDouble(next()); } String str = ""; String nextLine() { try { str = br.readLine(); } catch (IOException e) { e.printStackTrace(); } return str; } int[] readArray(int n) { int[] a = new int[n]; for (int i = 0; i < n; i++) a[i] = nextInt(); return a; } long[] readLongArray(int n) { long[] a = new long[n]; for (int i = 0; i < n; i++) a[i] = nextLong(); return a; } long nextLong() { return Long.parseLong(next()); } } // generates all the prime numbers upto n static void sieveOfEratosthenes(int n , ArrayList<Integer> al) { boolean prime[] = new boolean[n + 1]; for (int i = 0; i <= n; i++) prime[i] = true; for (int p = 2; p * p <= n; p++) { if (prime[p] == true) { for (int i = p * p; i <= n; i += p) prime[i] = false; } } for (int i = 2; i <= n; i++) { if (prime[i] == true) al.get(i); } } static final int M = 1000_000_000 + 7; static final int imx = Integer.MAX_VALUE; static final int imi = Integer.MIN_VALUE; //fastPow static long fastPow(long base, long exp) { if (exp==0) return 1; long half=fastPow(base, exp/2); if (exp%2==0) return mul(half, half); return mul(half, mul(half, base)); } // multiply two long numbers static long mul(long a, long b) { return a*b%M; } static int nCr(int n, int r) { return fact(n) / (fact(r) * fact(n - r)); } static int gcd(int a, int b) { if (b == 0) return a; return gcd(b, a % b); } // Returns factorial of n static int fact(int n) { int res = 1; for (int i = 2; i <= n; i++) res = res * i; return res; } // to generate the lps array // lps means longest preffix that is also a suffix static void generateLPS(int lps[] , String p){ int l = 0; int r = 1; while(l < p.length() && l < r && r < p.length()){ if(p.charAt(l) == p.charAt(r)){ lps[r] = l + 1; l++; r++; } else{ if(l > 0) l = lps[l - 1]; else r++; } } } // returns the index of the element which is just smaller than or // equal to the tar in the given arraylist static int lowBound(ArrayList<Integer> ll,long tar ,int l,int r){ if(l>r) return l; int mid=l+(r-l)/2; if(ll.get(mid)>=tar){ return lowBound(ll,tar,l,mid-1); } return lowBound(ll,tar,mid+1,r); } // returns the index of the element which is just greater than or // equal to the tar in the given arraylist static int upBound(ArrayList<Integer> ll,long tar,int l ,int r){ if(l>r) return l; int mid=l+(r-l)/2; if(ll.get(mid)<=tar){ return upBound(ll,tar,mid+1 ,r); } return upBound(ll,tar,l,mid-1); } static void swap(int i , int j , int a[]){ int x = a[i]; int y = a[j]; a[j] = x; a[i] = y; } // a -> z == 97 -> 122 // String.format("%.9f", ans) ,--> to get upto 9 decimal places , (ans is double) // write }
[ "gurkaran1314@gmail.com" ]
gurkaran1314@gmail.com
ae7394ebeb933b707faf86c7fe34d4889624308d
1661886bc7ec4e827acdd0ed7e4287758a4ccc54
/srv_unip_pub/src/main/java/com/sa/unip/srv/xxtz/dao/LVXIN_MOMENTRULEDAO.java
f8135c86aecc61dae3ed21a1de3cac96d6622df6
[ "MIT" ]
permissive
zhanght86/iBizSys_unip
baafb4a96920e8321ac6a1b68735bef376b50946
a22b15ebb069c6a7432e3401bdd500a3ca37250e
refs/heads/master
2020-04-25T21:20:23.830300
2018-01-26T06:08:28
2018-01-26T06:08:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,234
java
/** * iBizSys 5.0 机器人生产代码(不要直接修改当前代码) * http://www.ibizsys.net */ package com.sa.unip.srv.xxtz.dao; import net.ibizsys.paas.db.IDBDialect; import net.ibizsys.paas.core.IDataEntity; import net.ibizsys.paas.util.StringHelper; import net.ibizsys.paas.core.IDEDBCallContext; import net.ibizsys.paas.db.DBCallResult; import net.ibizsys.paas.demodel.IDataEntityModel; import net.ibizsys.paas.demodel.DEModelGlobal; import net.ibizsys.paas.dao.DAOGlobal; import net.ibizsys.paas.dao.IDAO; import net.ibizsys.paas.entity.IEntity; import javax.annotation.PostConstruct; import org.springframework.stereotype.Repository; import com.sa.unip.srv.xxtz.demodel.LVXIN_MOMENTRULEDEModel; import com.sa.unip.srv.xxtz.entity.LVXIN_MOMENTRULE; /** * 实体[LVXIN_MOMENTRULE] DAO对象 */ @Repository public class LVXIN_MOMENTRULEDAO extends com.sa.unip.srv.UniPSampleSysDAOBase<LVXIN_MOMENTRULE> { private static final long serialVersionUID = -1L; public static final String DATAQUERY_VIEW = "VIEW"; public static final String DATAQUERY_DEFAULT = "DEFAULT"; public LVXIN_MOMENTRULEDAO() { super(); } @PostConstruct public void postConstruct() throws Exception { DAOGlobal.registerDAO(getDAOId(), this); } /* (non-Javadoc) * @see net.ibizsys.paas.dao.DAOBase#getDAOId() */ @Override protected String getDAOId() { return "com.sa.unip.srv.xxtz.dao.LVXIN_MOMENTRULEDAO"; } private LVXIN_MOMENTRULEDEModel lVXIN_MOMENTRULEDEModel; /** * 获取实体[LVXIN_MOMENTRULE]模型对象 * @return */ public LVXIN_MOMENTRULEDEModel getLVXIN_MOMENTRULEDEModel() { if(this.lVXIN_MOMENTRULEDEModel==null) { try { this.lVXIN_MOMENTRULEDEModel = (LVXIN_MOMENTRULEDEModel)DEModelGlobal.getDEModel("com.sa.unip.srv.xxtz.demodel.LVXIN_MOMENTRULEDEModel"); } catch(Exception ex) { } } return this.lVXIN_MOMENTRULEDEModel; } /* * (non-Javadoc) * @see net.ibizsys.paas.dao.DAOBase#getDEModel() */ @Override public IDataEntityModel getDEModel() { return this.getLVXIN_MOMENTRULEDEModel(); } }
[ "dev@ibizsys.net" ]
dev@ibizsys.net