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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a7e6133123136e993a6106e221491ade18c98a15
|
a13ab684732add3bf5c8b1040b558d1340e065af
|
/java6-src/javax/xml/bind/ValidationEventLocator.java
|
5bc2c364024060d93baa685720ac72e5e9bed41a
|
[] |
no_license
|
Alivop/java-source-code
|
554e199a79876343a9922e13ccccae234e9ac722
|
f91d660c0d1a1b486d003bb446dc7c792aafd830
|
refs/heads/master
| 2020-03-30T07:21:13.937364
| 2018-10-25T01:49:39
| 2018-10-25T01:51:38
| 150,934,150
| 5
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,185
|
java
|
/*
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package javax.xml.bind;
/**
* Encapsulate the location of a ValidationEvent.
*
* <p>
* The <tt>ValidationEventLocator</tt> indicates where the <tt>ValidationEvent
* </tt> occurred. Different fields will be set depending on the type of
* validation that was being performed when the error or warning was detected.
* For example, on-demand validation would produce locators that contained
* references to objects in the Java content tree while unmarshal-time
* validation would produce locators containing information appropriate to the
* source of the XML data (file, url, Node, etc).
*
* @author <ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li><li>Joe Fialli, Sun Microsystems, Inc.</li></ul>
* @version $Revision: 1.1 $
* @see Validator
* @see ValidationEvent
* @since JAXB1.0
*/
public interface ValidationEventLocator {
/**
* Return the name of the XML source as a URL if available
*
* @return the name of the XML source as a URL or null if unavailable
*/
public java.net.URL getURL();
/**
* Return the byte offset if available
*
* @return the byte offset into the input source or -1 if unavailable
*/
public int getOffset();
/**
* Return the line number if available
*
* @return the line number or -1 if unavailable
*/
public int getLineNumber();
/**
* Return the column number if available
*
* @return the column number or -1 if unavailable
*/
public int getColumnNumber();
/**
* Return a reference to the object in the Java content tree if available
*
* @return a reference to the object in the Java content tree or null if
* unavailable
*/
public java.lang.Object getObject();
/**
* Return a reference to the DOM Node if available
*
* @return a reference to the DOM Node or null if unavailable
*/
public org.w3c.dom.Node getNode();
}
|
[
"liulp@zjhjb.com"
] |
liulp@zjhjb.com
|
9c03815530e260b30524179dac08e8641b602553
|
f1f628fc552a3dbe218f8ac04f469724505060b8
|
/src/main/java/gr/helix/core/common/domain/FavoriteCollectionEntity.java
|
ef83db344d35fe538d7cfbc4df0ec984d7aa0b72
|
[] |
no_license
|
HELIX-GR/common
|
729fdb40cd7e2032a4849ffdbcb23221a3a5cc22
|
0d38cce674926e9bc4f905fd15fad03392832478
|
refs/heads/master
| 2021-06-06T03:05:57.929166
| 2019-10-31T10:29:27
| 2019-10-31T10:29:27
| 136,463,054
| 0
| 1
| null | 2021-04-26T17:50:29
| 2018-06-07T10:45:56
|
Java
|
UTF-8
|
Java
| false
| false
| 4,420
|
java
|
package gr.helix.core.common.domain;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import javax.validation.constraints.Email;
import javax.validation.constraints.NotNull;
import gr.helix.core.common.model.user.FavoriteCollection;
@Entity(name = "FavoriteCollection")
@Table(
schema = "web", name = "`favorite_collection`",
uniqueConstraints = {
@UniqueConstraint(name = "uq_favorite_collection_email_title", columnNames = {"`email`", "`title`"}),
}
)
public class FavoriteCollectionEntity {
@Id
@Column(name = "`id`", updatable = false)
@SequenceGenerator(
schema = "web",
sequenceName = "favorite_collection_id_seq",
name = "favorite_collection_id_seq",
allocationSize = 1
)
@GeneratedValue(generator = "favorite_collection_id_seq", strategy = GenerationType.SEQUENCE)
int id;
@NotNull
@Email
@Column(name = "`email`", nullable = false)
String email;
@NotNull
@Column(name = "`created_on`")
ZonedDateTime createdOn = ZonedDateTime.now(ZoneId.systemDefault());
@NotNull
@Column(name = "`updated_on`")
ZonedDateTime updatedOn = ZonedDateTime.now(ZoneId.systemDefault());
@NotNull
@Column(name = "`title`")
String title;
@NotNull
@Column(name = "`data_count`")
int datasetCounter;
@NotNull
@Column(name = "`pubs_count`")
int publicationCounter;
@NotNull
@Column(name = "`lab_count`")
int notebookCounter;
@OneToMany(
targetEntity = FavoriteCollectionItemEntity.class,
mappedBy = "collection",
fetch = FetchType.EAGER,
cascade = CascadeType.ALL,
orphanRemoval = true
)
List<FavoriteCollectionItemEntity> items = new ArrayList<>();
public String getEmail() {
return this.email;
}
public void setEmail(String email) {
this.email = email;
}
public String getTitle() {
return this.title;
}
public void setTitle(String title) {
this.title = title;
}
public int getId() {
return this.id;
}
public ZonedDateTime getCreatedOn() {
return this.createdOn;
}
public ZonedDateTime getUpdatedOn() {
return this.updatedOn;
}
public void setUpdatedOn(ZonedDateTime updatedOn) {
this.updatedOn = updatedOn;
}
public int getDatasetCounter() {
return this.datasetCounter;
}
public void setDatasetCounter(int datasetCounter) {
this.datasetCounter = datasetCounter;
}
public int getPublicationCounter() {
return this.publicationCounter;
}
public void setPublicationCounter(int publicationCounter) {
this.publicationCounter = publicationCounter;
}
public int getNotebookCounter() {
return this.notebookCounter;
}
public void setNotebookCounter(int notebookCounter) {
this.notebookCounter = notebookCounter;
}
public List<FavoriteCollectionItemEntity> getItems() {
return this.items;
}
/**
* Convert to a DTO object
*
* @return a new {@link FavoriteCollection} instance
*/
public FavoriteCollection toDto() {
final Integer[] items = this.items.stream().map(i -> i.getFavorite().getId()).toArray(Integer[]::new);
final FavoriteCollection result = new FavoriteCollection(
this.id,
this.title,
this.createdOn,
this.updatedOn
);
result.setItems(items);
result.setDatasetCounter(this.datasetCounter);
result.setPublicationCounter(this.publicationCounter);
result.setNotebookCounter(this.notebookCounter);
return result;
}
}
|
[
"yannis.kouvaras@kupa.gr"
] |
yannis.kouvaras@kupa.gr
|
910d7d3c99e5d6c34c7543931070b6003bea35b8
|
b00c54389a95d81a22e361fa9f8bdf5a2edc93e3
|
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/keyboard/layout/Qwertz.java
|
26ba6cffb5e305dbbc9cd304384e9186c798ec9e
|
[] |
no_license
|
mirek190/x86-android-5.0
|
9d1756fa7ff2f423887aa22694bd737eb634ef23
|
eb1029956682072bb7404192a80214189f0dc73b
|
refs/heads/master
| 2020-05-27T01:09:51.830208
| 2015-10-07T22:47:36
| 2015-10-07T22:47:36
| 41,942,802
| 15
| 20
| null | 2020-03-09T00:21:03
| 2015-09-05T00:11:19
| null |
UTF-8
|
Java
| false
| false
| 2,049
|
java
|
/*
* Copyright (C) 2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by 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.android.inputmethod.keyboard.layout;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
public final class Qwertz extends LayoutBase {
private static final String LAYOUT_NAME = "qwertz";
public Qwertz(final LayoutCustomizer customizer) {
super(customizer, Symbols.class, SymbolsShifted.class);
}
@Override
public String getName() { return LAYOUT_NAME; }
@Override
ExpectedKey[][] getCommonAlphabetLayout(final boolean isPhone) { return ALPHABET_COMMON; }
private static final ExpectedKey[][] ALPHABET_COMMON = new ExpectedKeyboardBuilder()
.setKeysOfRow(1,
key("q", additionalMoreKey("1")),
key("w", additionalMoreKey("2")),
key("e", additionalMoreKey("3")),
key("r", additionalMoreKey("4")),
key("t", additionalMoreKey("5")),
key("z", additionalMoreKey("6")),
key("u", additionalMoreKey("7")),
key("i", additionalMoreKey("8")),
key("o", additionalMoreKey("9")),
key("p", additionalMoreKey("0")))
.setKeysOfRow(2, "a", "s", "d", "f", "g", "h", "j", "k", "l")
.setKeysOfRow(3, "y", "x", "c", "v", "b", "n", "m")
.build();
}
|
[
"mirek190@gmail.com"
] |
mirek190@gmail.com
|
dbc1dc1efb784ff9f78340d30eaea1d344b951bd
|
5d448b17ed74514365865e01042d3da59482b464
|
/src/main/java/com/tomar/atlocation/config/liquibase/AsyncSpringLiquibase.java
|
ecdf89f62a12d9688fbf14e667b1caf2d9d8302e
|
[] |
no_license
|
atomar7/locationSearch
|
701e62b050a206ae4df8d0f266eaa4e8e9647c79
|
cffbad950b3173262e357646b9a646c66ce0861f
|
refs/heads/master
| 2016-08-12T03:06:32.756067
| 2015-12-05T18:35:07
| 2015-12-05T18:35:07
| 47,460,622
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,622
|
java
|
package com.tomar.atlocation.config.liquibase;
import javax.inject.Inject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.core.env.Environment;
import org.springframework.core.task.TaskExecutor;
import org.springframework.util.StopWatch;
import com.tomar.atlocation.config.Constants;
import liquibase.exception.LiquibaseException;
import liquibase.integration.spring.SpringLiquibase;
/**
* Specific liquibase.integration.spring.SpringLiquibase that will update the database asynchronously.
* <p>
* By default, this asynchronous version only works when using the "dev" profile.<br/>
* The standard liquibase.integration.spring.SpringLiquibase starts Liquibase in the current thread:
* <ul>
* <li>This is needed if you want to do some database requests at startup</li>
* <li>This ensure that the database is ready when the application starts</li>
* </ul>
* But as this is a rather slow process, we use this asynchronous version to speed up our start-up time:
* <ul>
* <li>On a recent MacBook Pro, start-up time is down from 14 seconds to 8 seconds</li>
* <li>In production, this can help your application run on platforms like Heroku, where it must start/restart very quickly</li>
* </ul>
* </p>
*/
public class AsyncSpringLiquibase extends SpringLiquibase {
private final Logger log = LoggerFactory.getLogger(AsyncSpringLiquibase.class);
@Inject
@Qualifier("taskExecutor")
private TaskExecutor taskExecutor;
@Inject
private Environment env;
@Override
public void afterPropertiesSet() throws LiquibaseException {
if (env.acceptsProfiles(Constants.SPRING_PROFILE_DEVELOPMENT, Constants.SPRING_PROFILE_HEROKU)) {
taskExecutor.execute(() -> {
try {
log.warn("Starting Liquibase asynchronously, your database might not be ready at startup!");
initDb();
} catch (LiquibaseException e) {
log.error("Liquibase could not start correctly, your database is NOT ready: {}", e.getMessage(), e);
}
});
} else {
log.debug("Starting Liquibase synchronously");
initDb();
}
}
protected void initDb() throws LiquibaseException {
StopWatch watch = new StopWatch();
watch.start();
super.afterPropertiesSet();
watch.stop();
log.debug("Started Liquibase in {} ms", watch.getTotalTimeMillis());
}
}
|
[
"abhishek.tomar@gmail.com"
] |
abhishek.tomar@gmail.com
|
96cb3a9d4847bd55dc3f2336a3d5756790c134ef
|
8748daf738df196d488d322a38d58d50e0763478
|
/app/src/main/java/com/app/collegeattendance/ui/gallery/GalleryViewModel.java
|
dd5071c1d28cab610c6b2496496cd84b55a70bbd
|
[] |
no_license
|
nisargtrivedi/AttendanceApp
|
76d0617d3ac2cdd143b9c326a5cd05b7d490056e
|
758d188867bff1f5327ea92ccc9707bbda09328a
|
refs/heads/main
| 2023-01-10T03:21:37.237669
| 2020-11-10T08:08:43
| 2020-11-10T08:08:43
| 311,588,204
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 460
|
java
|
package com.app.collegeattendance.ui.gallery;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;
public class GalleryViewModel extends ViewModel {
private MutableLiveData<String> mText;
public GalleryViewModel() {
mText = new MutableLiveData<>();
mText.setValue("This is gallery fragment");
}
public LiveData<String> getText() {
return mText;
}
}
|
[
"nisarg.trivedi@vovance.com"
] |
nisarg.trivedi@vovance.com
|
a2ec5aed7be95b176636e5946d18b9faa7adac0b
|
a2e1742f97c9c4032ad73be033a319a995ac06e3
|
/src/main/java/com/github/epiicthundercat/snowanimals/client/renderer/entity/RenderEntityArticFox.java
|
0c8b512679fc3e5cc3d03dd66f41812f7c19ad9e
|
[
"MIT"
] |
permissive
|
EPIICTHUNDERCAT/Snowanimals
|
d3007a45cf7250c790ad7aa6a23b0c246f2e13e2
|
f85ae2dea8a99867ca9c2d7a41b97d1777cd91bb
|
refs/heads/master
| 2021-01-23T05:18:35.193263
| 2017-05-20T08:16:31
| 2017-05-20T08:16:31
| 86,295,043
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,212
|
java
|
package com.github.epiicthundercat.snowanimals.client.renderer.entity;
import com.github.epiicthundercat.snowanimals.Reference;
import com.github.epiicthundercat.snowanimals.entity.passive.EntityArticFox;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.entity.RenderLiving;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.util.ResourceLocation;
public class RenderEntityArticFox extends RenderLiving<EntityArticFox>
{
private static final ResourceLocation FOX_TEXTURES = new ResourceLocation(Reference.ID, "textures/entity/fox/artic_fox.png");
private static final ResourceLocation TAMED_FOX_TEXTURES = new ResourceLocation(Reference.ID, "textures/entity/fox/artic_fox_tamed.png");
private static final ResourceLocation ANRGY_FOX_TEXTURES = new ResourceLocation(Reference.ID, "textures/entity/fox/artic_fox_angry.png");
public RenderEntityArticFox(RenderManager renderManagerIn, ModelBase modelBaseIn, float shadowSizeIn)
{
super(renderManagerIn, modelBaseIn, shadowSizeIn);
// this.addLayer(new LayerWolfCollar(this));
}
/**
* Defines what float the third param in setRotationAngles of ModelBase is
*/
protected float handleRotationFloat(EntityArticFox livingBase, float partialTicks)
{
return livingBase.getTailRotation();
}
/**
* Renders the desired {@code T} type Entity.
*/
public void doRender(EntityArticFox entity, double x, double y, double z, float entityYaw, float partialTicks)
{
if (entity.isFoxWet())
{
float f = entity.getBrightness(partialTicks) * entity.getShadingWhileWet(partialTicks);
GlStateManager.color(f, f, f);
}
super.doRender(entity, x, y, z, entityYaw, partialTicks);
}
/**
* Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
*/
protected ResourceLocation getEntityTexture(EntityArticFox entity)
{
return entity.isTamed() ? TAMED_FOX_TEXTURES : (entity.isAngry() ? ANRGY_FOX_TEXTURES : FOX_TEXTURES);
}
}
|
[
"rvillalobos102299@gmail.com"
] |
rvillalobos102299@gmail.com
|
86d02c2809ec26b5042e8e5fe2928162b982bebb
|
6fa701cdaa0d83caa0d3cbffe39b40e54bf3d386
|
/google/cloud/workflows/executions/v1/google-cloud-workflows-executions-v1-java/proto-google-cloud-workflows-executions-v1-java/src/main/java/com/google/cloud/workflows/executions/v1/ListExecutionsRequestOrBuilder.java
|
846e22925b129fa5f9bd80924ac8862306e5fdc2
|
[
"Apache-2.0"
] |
permissive
|
oltoco/googleapis-gen
|
bf40cfad61b4217aca07068bd4922a86e3bbd2d5
|
00ca50bdde80906d6f62314ef4f7630b8cdb6e15
|
refs/heads/master
| 2023-07-17T22:11:47.848185
| 2021-08-29T20:39:47
| 2021-08-29T20:39:47
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| true
| 3,201
|
java
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/workflows/executions/v1/executions.proto
package com.google.cloud.workflows.executions.v1;
public interface ListExecutionsRequestOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.cloud.workflows.executions.v1.ListExecutionsRequest)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* Required. Name of the workflow for which the executions should be listed.
* Format: projects/{project}/locations/{location}/workflows/{workflow}
* </pre>
*
* <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }</code>
* @return The parent.
*/
java.lang.String getParent();
/**
* <pre>
* Required. Name of the workflow for which the executions should be listed.
* Format: projects/{project}/locations/{location}/workflows/{workflow}
* </pre>
*
* <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }</code>
* @return The bytes for parent.
*/
com.google.protobuf.ByteString
getParentBytes();
/**
* <pre>
* Maximum number of executions to return per call.
* Max supported value depends on the selected Execution view: it's 10000 for
* BASIC and 100 for FULL. The default value used if the field is not
* specified is 100, regardless of the selected view. Values greater than
* the max value will be coerced down to it.
* </pre>
*
* <code>int32 page_size = 2;</code>
* @return The pageSize.
*/
int getPageSize();
/**
* <pre>
* A page token, received from a previous `ListExecutions` call.
* Provide this to retrieve the subsequent page.
* When paginating, all other parameters provided to `ListExecutions` must
* match the call that provided the page token.
* </pre>
*
* <code>string page_token = 3;</code>
* @return The pageToken.
*/
java.lang.String getPageToken();
/**
* <pre>
* A page token, received from a previous `ListExecutions` call.
* Provide this to retrieve the subsequent page.
* When paginating, all other parameters provided to `ListExecutions` must
* match the call that provided the page token.
* </pre>
*
* <code>string page_token = 3;</code>
* @return The bytes for pageToken.
*/
com.google.protobuf.ByteString
getPageTokenBytes();
/**
* <pre>
* Optional. A view defining which fields should be filled in the returned executions.
* The API will default to the BASIC view.
* </pre>
*
* <code>.google.cloud.workflows.executions.v1.ExecutionView view = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
* @return The enum numeric value on the wire for view.
*/
int getViewValue();
/**
* <pre>
* Optional. A view defining which fields should be filled in the returned executions.
* The API will default to the BASIC view.
* </pre>
*
* <code>.google.cloud.workflows.executions.v1.ExecutionView view = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
* @return The view.
*/
com.google.cloud.workflows.executions.v1.ExecutionView getView();
}
|
[
"bazel-bot-development[bot]@users.noreply.github.com"
] |
bazel-bot-development[bot]@users.noreply.github.com
|
96c2a5b5a5f81b17c190bc21ba0ea643524f83a1
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/18/18_ef3028772d7b35d04a43476c99e1d68784f100ce/PreparedStatement/18_ef3028772d7b35d04a43476c99e1d68784f100ce_PreparedStatement_s.java
|
65c6367fba279767f49ce3a56896c9f9d3574ba3
|
[] |
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,803
|
java
|
package com.datastax.driver.core;
import java.nio.ByteBuffer;
import java.util.List;
import org.apache.cassandra.utils.MD5Digest;
import org.apache.cassandra.transport.messages.ResultMessage;
import com.datastax.driver.core.exceptions.DriverInternalError;
/**
* Represents a prepared statement, a query with bound variables that has been
* prepared (pre-parsed) by the database.
* <p>
* A prepared statement can be executed once concrete values has been provided
* for the bound variables. The pair of a prepared statement and values for its
* bound variables is a BoundStatement and can be executed (by
* {@link Session#execute}).
*/
public class PreparedStatement {
final ColumnDefinitions metadata;
final MD5Digest id;
volatile ByteBuffer routingKey;
final int[] routingKeyIndexes;
volatile ConsistencyLevel consistency;
private PreparedStatement(ColumnDefinitions metadata, MD5Digest id, int[] routingKeyIndexes) {
this.metadata = metadata;
this.id = id;
this.routingKeyIndexes = routingKeyIndexes;
}
static PreparedStatement fromMessage(ResultMessage.Prepared msg, Metadata clusterMetadata) {
switch (msg.kind) {
case PREPARED:
ResultMessage.Prepared pmsg = (ResultMessage.Prepared)msg;
ColumnDefinitions.Definition[] defs = new ColumnDefinitions.Definition[pmsg.metadata.names.size()];
if (defs.length == 0)
return new PreparedStatement(new ColumnDefinitions(defs), pmsg.statementId, null);
List<ColumnMetadata> partitionKeyColumns = null;
int[] pkIndexes = null;
KeyspaceMetadata km = clusterMetadata.getKeyspace(pmsg.metadata.names.get(0).ksName);
if (km != null) {
TableMetadata tm = km.getTable(pmsg.metadata.names.get(0).cfName);
if (tm != null) {
partitionKeyColumns = tm.getPartitionKey();
pkIndexes = new int[partitionKeyColumns.size()];
for (int i = 0; i < pkIndexes.length; ++i)
pkIndexes[i] = -1;
}
}
// Note: we rely on the fact CQL queries cannot span multiple tables. If that change, we'll have to get smarter.
for (int i = 0; i < defs.length; i++) {
defs[i] = ColumnDefinitions.Definition.fromTransportSpecification(pmsg.metadata.names.get(i));
maybeGetIndex(defs[i].getName(), i, partitionKeyColumns, pkIndexes);
}
return new PreparedStatement(new ColumnDefinitions(defs), pmsg.statementId, allSet(pkIndexes) ? pkIndexes : null);
default:
throw new DriverInternalError(String.format("%s response received when prepared statement received was expected", msg.kind));
}
}
private static void maybeGetIndex(String name, int j, List<ColumnMetadata> pkColumns, int[] pkIndexes) {
if (pkColumns == null)
return;
for (int i = 0; i < pkColumns.size(); ++i) {
if (name.equals(pkColumns.get(i).getName())) {
// We may have the same column prepared multiple times, but only pick the first value
pkIndexes[i] = j;
return;
}
}
}
private static boolean allSet(int[] pkColumns) {
if (pkColumns == null)
return false;
for (int i = 0; i < pkColumns.length; ++i)
if (pkColumns[i] < 0)
return false;
return true;
}
/**
* Returns metadata on the bounded variables of this prepared statement.
*
* @return the variables bounded in this prepared statement.
*/
public ColumnDefinitions getVariables() {
return metadata;
}
/**
* Creates a new BoundStatement object and bind its variables to the
* provided values.
* <p>
* This method is a shortcut for {@code new BoundStatement(this).bind(...)}.
* <p>
* Note that while no more {@code values} than bound variables can be
* provided, it is allowed to provide less {@code values} that there is
* variables. In that case, the remaining variables will have to be bound
* to values by another mean because the resulting {@code BoundStatement}
* being executable.
*
* @param values the values to bind to the variables of the newly created
* BoundStatement.
* @return the newly created {@code BoundStatement} with its variables
* bound to {@code values}.
*
* @throws IllegalArgumentException if more {@code values} are provided
* than there is of bound variables in this statement.
* @throws InvalidTypeException if any of the provided value is not of
* correct type to be bound to the corresponding bind variable.
*
* @see BoundStatement#bind
*/
public BoundStatement bind(Object... values) {
BoundStatement bs = new BoundStatement(this);
return bs.bind(values);
}
/**
* Set the routing key for this prepared statement.
* <p>
* This method allows to manually provide a fixed routing key for all
* executions of this prepared statement. It is never mandatory to provide
* a routing key through this method and this method should only be used
* if the partition key of the prepared query is not part of the prepared
* variables (i.e. if the partition key is fixed).
* <p>
* Note that if the partition key is part of the prepared variables, the
* routing key will be automatically computed once those variables are bound.
*
* @param routingKey the raw (binary) value to use as routing key.
* @return this {@code PreparedStatement} object.
*
* @see Query#getRoutingKey
*/
public PreparedStatement setRoutingKey(ByteBuffer routingKey) {
this.routingKey = routingKey;
return this;
}
/**
* Set the routing key for this query.
* <p>
* See {@link #setRoutingKey(ByteBuffer)} for more information. This
* method is a variant for when the query partition key is composite and
* thus the routing key must be built from multiple values.
*
* @param routingKeyComponents the raw (binary) values to compose to obtain
* the routing key.
* @return this {@code PreparedStatement} object.
*
* @see Query#getRoutingKey
*/
public PreparedStatement setRoutingKey(ByteBuffer... routingKeyComponents) {
this.routingKey = SimpleStatement.compose(routingKeyComponents);
return this;
}
/**
* Sets a default consistency level for all {@code BoundStatement} created
* from this object.
* <p>
* If set, any {@code BoundStatement} created through either {@link #bind} or
* {@link #newBoundStatement}.
*
* @param consistency the default consistency level to set.
* @return this {@code PreparedStatement} object.
*/
public PreparedStatement setConsistencyLevel(ConsistencyLevel consistency) {
this.consistency = consistency;
return this;
}
/**
* The default consistency level set through {@link #setConsistencyLevel}.
*
* @return the default consistency level. Returns {@code null} if no
* consistency level has been set through this object {@code setConsistencyLevel}
* method.
*/
public ConsistencyLevel getConsistencyLevel() {
return consistency;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
f292c38a40728931d1606a319b056a5d54e8d70b
|
a37e75c5138eec880850caaa0d1fa548f08d4e31
|
/org.kevoree.extra.freePastry/src/main/java/rice/p2p/scribe/messaging/ScribeMessage.java
|
c815c588c2dcf8c19587fa7c5048fc849dc2ac10
|
[] |
no_license
|
dukeboard/kevoree-extra
|
c88806d50d23d2dcdd0d5d64d75b5e6358cdabcf
|
f8308f812d54d7a8ba4ae8fd2972d6fed3bc3503
|
refs/heads/master
| 2022-12-22T17:09:51.828299
| 2014-05-27T14:43:16
| 2014-05-27T14:43:16
| 2,067,252
| 4
| 7
| null | 2022-12-13T19:14:06
| 2011-07-18T16:15:37
|
Java
|
UTF-8
|
Java
| false
| false
| 4,551
|
java
|
/*******************************************************************************
"FreePastry" Peer-to-Peer Application Development Substrate
Copyright 2002-2007, Rice University. Copyright 2006-2007, Max Planck Institute
for Software Systems. 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 Rice University (RICE), Max Planck Institute for Software
Systems (MPI-SWS) nor the names of its contributors may be used to endorse or
promote products derived from this software without specific prior written
permission.
This software is provided by RICE, MPI-SWS and the contributors on an "as is"
basis, without any representations or warranties of any kind, express or implied
including, but not limited to, representations or warranties of
non-infringement, merchantability or fitness for a particular purpose. In no
event shall RICE, MPI-SWS or contributors be liable for any direct, indirect,
incidental, special, exemplary, or consequential damages (including, but not
limited to, procurement of substitute goods or services; loss of use, data, or
profits; or business interruption) however caused and on any theory of
liability, whether in contract, strict liability, or tort (including negligence
or otherwise) arising in any way out of the use of this software, even if
advised of the possibility of such damage.
*******************************************************************************/
package rice.p2p.scribe.messaging;
import java.io.IOException;
import rice.*;
import rice.p2p.commonapi.*;
import rice.p2p.commonapi.rawserialization.*;
import rice.p2p.scribe.*;
/**
* @(#) ScribeMessage.java
*
* This class the abstraction of a message used internally by Scribe.
*
* @version $Id: ScribeMessage.java 3613 2007-02-15 14:45:14Z jstewart $
*
* @author Alan Mislove
*/
public abstract class ScribeMessage implements RawMessage {
// serialver for backward compatibility
private static final long serialVersionUID = 4593674882226544604L;
// the source of this message
protected NodeHandle source;
// the topic of this message
protected Topic topic;
/**
* Constructor which takes a unique integer Id
*
* @param source The source address
* @param topic The topic
*/
protected ScribeMessage(NodeHandle source, Topic topic) {
this.source = source;
this.topic = topic;
}
/**
* Method which should return the priority level of this message. The messages
* can range in priority from 0 (highest priority) to Integer.MAX_VALUE (lowest) -
* when sending messages across the wire, the queue is sorted by message priority.
* If the queue reaches its limit, the lowest priority messages are discarded. Thus,
* applications which are very verbose should have LOW_PRIORITY or lower, and
* applications which are somewhat quiet are allowed to have MEDIUM_PRIORITY or
* possibly even HIGH_PRIORITY.
*
* @return This message's priority
*/
public int getPriority() {
return MEDIUM_HIGH_PRIORITY;
}
/**
* Method which returns this messages' source address
*
* @return The source of this message
*/
public NodeHandle getSource() {
return source;
}
/**
* Method which set this messages' source address
*
* @param source The source of this message
*/
public void setSource(NodeHandle source) {
this.source = source;
}
/**
* Method which returns this messages' topic
*
* @return The topic of this message
*/
public Topic getTopic() {
return topic;
}
/**
* Protected because it should only be called from an extending class, to get version
* numbers correct.
*/
protected ScribeMessage(InputBuffer buf, Endpoint endpoint) throws IOException {
if (buf.readBoolean())
source = endpoint.readNodeHandle(buf);
topic = new Topic(buf, endpoint);
}
public void serialize(OutputBuffer buf) throws IOException {
boolean hasSource = (source != null);
buf.writeBoolean(hasSource);
if (hasSource)
source.serialize(buf);
topic.serialize(buf);
}
}
|
[
"jedartois@gmail.com"
] |
jedartois@gmail.com
|
ed456ed17aed5979b69c6e8c0c1ce6753d6b2aae
|
40cd4da5514eb920e6a6889e82590e48720c3d38
|
/desktop/applis/apps/bean/bean_games/pokemonbean/src/main/java/aiki/beans/abilities/AbilityBeanForbidUseBerryAgainstFoesGet.java
|
df0f27c5a719b8ed5847e5330a68c43f4f2de7ef
|
[] |
no_license
|
Cardman/projects
|
02704237e81868f8cb614abb37468cebb4ef4b31
|
23a9477dd736795c3af10bccccb3cdfa10c8123c
|
refs/heads/master
| 2023-08-17T11:27:41.999350
| 2023-08-15T07:09:28
| 2023-08-15T07:09:28
| 34,724,613
| 4
| 0
| null | 2020-10-13T08:08:38
| 2015-04-28T10:39:03
|
Java
|
UTF-8
|
Java
| false
| false
| 407
|
java
|
package aiki.beans.abilities;
import aiki.beans.PokemonBeanStruct;
import code.bean.nat.*;
import code.bean.nat.*;
import code.bean.nat.*;
public class AbilityBeanForbidUseBerryAgainstFoesGet implements NatCaller{
@Override
public NaSt re(NaSt _instance, NaSt[] _args){
return NaBoSt.of(( (AbilityBean) ((PokemonBeanStruct)_instance).getInstance()).getForbidUseBerryAgainstFoes());
}
}
|
[
"f.desrochettes@gmail.com"
] |
f.desrochettes@gmail.com
|
6fab1aa95add842c8e39de1c891439c04f10a4b9
|
d3e7a9e24de77e45bd79dacde2e4e192267eab95
|
/modules/lottery-guilvweb/src/main/java/com/sky/apps/action/lottery/web/vo/guilv/ComparatorTjsscGuilv.java
|
c8faa3f055ed369e19e2a0b11f43a5d3a513bc85
|
[] |
no_license
|
sky8866/lottery
|
95dc902c95e084bd6320aa39c415d645a16867b0
|
b315ad1a3c79e2d3fe4b1761bacbe2aeb717a8b8
|
refs/heads/master
| 2021-01-20T08:33:25.720748
| 2017-08-28T02:29:14
| 2017-08-28T02:29:14
| 101,560,668
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 903
|
java
|
package com.sky.apps.action.lottery.web.vo.guilv;
import java.util.Comparator;
import com.sky.modules.lottery.entity.guilv.Guilv;
import com.sky.modules.lottery.entity.guilv.CqsscGuilv;
import com.sky.modules.lottery.entity.guilv.TjsscGuilv;
public class ComparatorTjsscGuilv implements Comparator{
@Override
public int compare(Object o1, Object o2) {
TjsscGuilv vo1=(TjsscGuilv) o1;
TjsscGuilv vo2=(TjsscGuilv) o2;
int flag=vo1.getSum().compareTo(vo2.getSum());
if(flag==0){
int v= vo2.getDuiNum().compareTo(vo1.getDuiNum());
if(v==0){
int v2=vo2.getCountMin().compareTo(vo1.getCountMin());
if(v2==0){
return vo1.getErrorNum().compareTo(vo2.getErrorNum());
}else{
return v2;
}
}else{
return v;
}
}else{
return flag;
}
}
}
|
[
"286549429@qq.com"
] |
286549429@qq.com
|
352a386044faa78fc80ba79e5d94cb825070690c
|
f43504b11e935796128f07ab166e7d47a248f204
|
/Low_level_Design_Problems/stackoverflow/Comment.java
|
b4bad5d4c5de29fdfc0eabe6631a8e92e49a9531
|
[] |
no_license
|
vish35/LLD
|
4e3b4b6a22e334e1ab69871e5ded526613bb73f8
|
1d8f209213f74395fc1121a5862ce2a467b09f94
|
refs/heads/main
| 2023-07-30T09:10:39.696754
| 2021-09-15T05:46:45
| 2021-09-15T05:46:45
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 139
|
java
|
package stackoverflow;
import java.util.List;
public class Comment {
int commendtId;
int entityId;
List<Comment> comments;
}
|
[
"gowtkum@amazon.com"
] |
gowtkum@amazon.com
|
2b335d32229bb59fa7024182190ef104fcc055e0
|
d833e5b971cd0e7b48e4637fe389ba030e906e2c
|
/app/src/main/java/com/doctor/telemedicine/adapter/AppointmentSearchDrAdapter.java
|
181dc09e03c0460d860e33415c1e24048eee31a0
|
[] |
no_license
|
mukul2/HelloWorld2
|
404efccf074b45fa5341d986d58ab5763e43229a
|
a75d9c756b49bbe86119ecae5acfa133bf9a359b
|
refs/heads/master
| 2022-09-27T18:31:49.884629
| 2020-06-08T00:35:49
| 2020-06-08T00:35:49
| 269,351,374
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,588
|
java
|
package com.doctor.telemedicine.adapter;
import android.content.Context;
import android.content.Intent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.recyclerview.widget.RecyclerView;
import com.bumptech.glide.Glide;
import com.doctor.telemedicine.Activity.ServingActivityDr;
import com.doctor.telemedicine.Data.DataStore;
import com.doctor.telemedicine.R;
import com.doctor.telemedicine.model.TrackModel;
import java.util.ArrayList;
import java.util.List;
import de.hdodenhof.circleimageview.CircleImageView;
import static com.doctor.telemedicine.Data.Data.PHOTO_BASE;
/**
* Created by mukul on 3/10/2019.
*/
public class AppointmentSearchDrAdapter extends RecyclerView.Adapter<AppointmentSearchDrAdapter.MyViewHolder> {
List<TrackModel> list=new ArrayList<>();
Context context;
public class MyViewHolder extends RecyclerView.ViewHolder {
public TextView tv_refID,tv_name,tv_noResult;
ImageView circleImageView;
RelativeLayout relative_container;
LinearLayout lin1,lin2;
CircleImageView image;
public MyViewHolder(View view) {
super(view);
tv_refID = (TextView) view.findViewById(R.id.tv_refID);
tv_name = (TextView) view.findViewById(R.id.tv_name);
tv_noResult = (TextView) view.findViewById(R.id.tv_noResult);
lin1 = (LinearLayout) view.findViewById(R.id.lin1);
lin2 = (LinearLayout) view.findViewById(R.id.lin2);
image = (CircleImageView) view.findViewById(R.id.image);
}
}
public AppointmentSearchDrAdapter(List<TrackModel> lists ) {
this.list=lists;
}
public void clearData(){
list.clear();
notifyDataSetChanged();
}
@Override
public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View itemView = LayoutInflater.from(parent.getContext())
.inflate(R.layout.appointment_search_id, parent, false);
return new MyViewHolder(itemView);
}
@Override
public void onBindViewHolder(MyViewHolder holder, final int position) {
final TrackModel data = list.get(position);
context = holder.tv_refID.getContext();
if (data.getId()==0) {
holder.tv_noResult.setVisibility(View.VISIBLE);
holder.tv_noResult.setText("No Result");
holder.lin2.setVisibility(View.GONE);
holder.lin1.setVisibility(View.GONE);
holder.image.setVisibility(View.GONE);
}else {
holder.tv_refID.setText("" + data.getId());
holder.tv_name.setText(data.getPatientInfo().getName());
holder.tv_noResult.setVisibility(View.GONE);
holder.lin2.setVisibility(View.VISIBLE);
holder.lin1.setVisibility(View.VISIBLE);
holder.image.setVisibility(View.VISIBLE);
Glide.with(context).load(PHOTO_BASE+data.getPatientInfo().getPhoto()).into(holder.image);
}
holder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
DataStore.selectedSearchAppointmentModel=data;
context.startActivity(new Intent(context, ServingActivityDr.class));
}
});
}
@Override
public int getItemCount() {
return list.size();
}
}
|
[
"saidur.shawon@gmail.com"
] |
saidur.shawon@gmail.com
|
af885fd3a92f35d64dfe0177099ea5126dace76e
|
b9852e928c537ce2e93aa7e378689e5214696ca5
|
/hse-common-component-phone/src/main/java/com/hd/hse/common/component/phone/custom/EditableDialogManager.java
|
177a639cf51a3aa404c61e56866941c18bf1c166
|
[] |
no_license
|
zhanshen1373/Hseuse
|
bc701c6de7fd88753caced249032f22d2ca39f32
|
110f9d1a8db37d5b0ea348069facab8699e251f1
|
refs/heads/master
| 2023-04-04T08:27:10.675691
| 2021-03-29T07:44:02
| 2021-03-29T07:44:02
| 352,548,680
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,732
|
java
|
/**
* Project Name:hse-common-component
* File Name:EditableDialog.java
* Package Name:com.hd.hse.common.component.custom
* Date:2014年10月14日
* Copyright (c) 2014, fulibo@ushayden.com All Rights Reserved.
*
*/
package com.hd.hse.common.component.phone.custom;
import com.hd.hse.common.component.phone.R;
import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
import android.content.Context;
import android.text.method.ScrollingMovementMethod;
import android.util.TypedValue;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.RelativeLayout;
import android.widget.TextView;
/**
* ClassName:EditableDialog ().<br/>
* Date: 2014年10月14日 <br/>
* @author flb
* @version
* @see
*/
public class EditableDialogManager {
private AlertDialog dialog = null;
private View rootView = null;
private TextView editText = null;
private Integer index = null;
/**
*
* showDialog:(). <br/>
* date: 2014年10月14日 <br/>
*
* @author flb
* @param text 要显示的文本
* @param isFlag 是否可编辑 true代表可编辑, false代表不可编辑
* @return
*/
@SuppressWarnings("deprecation")
public AlertDialog showDialog(Context ctx, String content, boolean isFlag){
AlertDialog.Builder builder = new Builder(ctx);
dialog = builder.create();
if(isFlag){
rootView = View.inflate(ctx, R.layout.hd_hse_common_component_check_text_dialog_style_one, null);
editText = new StepCheckEditText(ctx);
editText.setMovementMethod(ScrollingMovementMethod.getInstance());
((StepCheckEditText)editText).setHasBracketsText(content);
TextView confirmTV = (TextView) rootView.findViewById(R.id.hd_hse_common_component_step_check_text_dialog_tv_confirm);
confirmTV.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
if(listener != null){
String content = editText.getText().toString().trim();
listener.onConfirmClick(content);
}
dismissDialog();
}
});
}else{
rootView = View.inflate(ctx, R.layout.hd_hse_common_component_check_text_dialog_style_two, null);
editText = new TextView(ctx);
editText.setText(content);
editText.setMovementMethod(ScrollingMovementMethod.getInstance());
}
dialog.setView(rootView, 0, 0, 0, 0);
RelativeLayout containerRL = (RelativeLayout) rootView.findViewById(R.id.hd_hse_common_component_step_check_text_dialog_rl_container);
TextView cancelTV = (TextView) rootView.findViewById(R.id.hd_hse_common_component_step_check_text_dialog_tv_cancel);
editText.setBackgroundDrawable(null);
editText.setTextSize(TypedValue.COMPLEX_UNIT_PX, ctx.getResources().getDimensionPixelOffset(R.dimen.hd_hse_common_component_phone_editable_dialog_text));
editText.setTextColor(ctx.getResources().getColor(R.color.hd_hse_common_alerttext_black));
containerRL.addView(editText);
cancelTV.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
if(listener != null){
String content = editText.getText().toString().trim();
listener.onCancelClick(content);
}
dismissDialog();
}
});
dialog.show();
return dialog;
}
public void dismissDialog(){
if(dialog != null && dialog.isShowing()){
dialog.dismiss();
dialog = null;
}
}
public Integer getIndex(){
return index;
}
public interface EditableDialogListener{
public void onConfirmClick(String content);
public void onCancelClick(String content);
}
private EditableDialogListener listener;
public void setOnEditableDialogListener(EditableDialogListener listen){
listener = listen;
}
}
|
[
"dubojian@ushayden.com"
] |
dubojian@ushayden.com
|
98bd5374953b7467899c333e058e0c5390b678d6
|
1efcc13e41fc932413c88bb00ed181c77da8cebc
|
/gobiiproject/gobii-model/src/main/java/org/gobiiproject/gobiimodel/types/GobiiStatusLevel.java
|
230ef6943ad3a03a3e80defb5fa14d0868b8331e
|
[
"MIT"
] |
permissive
|
gobiiproject/GOBii-System
|
466478089ec8ca12f7e560996f3409afae205c88
|
cab3432ddec4546140a29b157e767f71456531ec
|
refs/heads/master
| 2021-01-11T23:25:58.902840
| 2018-07-13T01:03:38
| 2018-07-13T01:03:38
| 78,578,773
| 4
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 175
|
java
|
package org.gobiiproject.gobiimodel.types;
/**
* Created by Phil on 9/25/2016.
*/
public enum GobiiStatusLevel {
ERROR,
VALIDATION,
WARNING,
INFO,
OK
}
|
[
"jdl232@cornell.edu"
] |
jdl232@cornell.edu
|
c0d356e60828d85e5c465196342110aeb902c59e
|
0ec9b09bca5e448ded9866a5fe30c7a63b82b8b3
|
/modelViewPresenter/presentationModel/withoutPrototype/src/main/java/usantatecla/mastermind/models/Registry.java
|
12875d138633d731363f7633dac61a8576ac367a
|
[] |
no_license
|
pixelia-es/USantaTecla-project-mastermind-java.swing.socket.sql
|
04de19c29176c4b830dbae751dc4746d2de86f2e
|
2b5f9bf273c67eedff96189b6b3c5680c8b10958
|
refs/heads/master
| 2023-06-10T13:09:55.875570
| 2021-06-29T15:16:23
| 2021-06-29T15:16:23
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,091
|
java
|
package usantatecla.mastermind.models;
import java.util.ArrayList;
class Registry {
private ArrayList<Memento> mementoList;
private Game game;
private int firstPrevious;
Registry(Game game) {
this.game = game;
this.mementoList = new ArrayList<Memento>();
this.mementoList.add(firstPrevious, this.game.createMemento());
this.firstPrevious = 0;
}
void registry() {
for (int i = 0; i < this.firstPrevious; i++) {
this.mementoList.remove(0);
}
this.firstPrevious = 0;
this.mementoList.add(this.firstPrevious, this.game.createMemento());
}
void undo(Game game) {
this.firstPrevious++;
game.set(this.mementoList.get(this.firstPrevious));
}
void redo(Game game) {
this.firstPrevious--;
game.set(this.mementoList.get(this.firstPrevious));
}
boolean undoable() {
return this.firstPrevious < this.mementoList.size() - 1;
}
boolean redoable() {
return this.firstPrevious >= 1;
}
void reset() {
this.mementoList = new ArrayList<Memento>();
this.firstPrevious = 0;
this.mementoList.add(firstPrevious, this.game.createMemento());
}
}
|
[
"jaime.perez@alumnos.upm.es"
] |
jaime.perez@alumnos.upm.es
|
7d4de95ec4b55a617f300999f168dcb784ef99d2
|
97734b7675c7bb24468c9fe4b7917540ce9a65db
|
/app/src/main/java/com/zhejiang/haoxiadan/ui/adapter/my/OrderGoodsListAdapter.java
|
8739b4203ed8bcfa35c2f284c9b846600337cd2a
|
[] |
no_license
|
yangyuqi/android_hxd
|
303db8bba4f4419c0792dbcfdd973e1a5165e09a
|
f02cb1c7c625c5f6eaa656d03a82c7459ff4a9a1
|
refs/heads/master
| 2020-04-13T03:47:59.651505
| 2018-12-24T03:06:34
| 2018-12-24T03:06:34
| 162,942,703
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,293
|
java
|
package com.zhejiang.haoxiadan.ui.adapter.my;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.ImageView;
import android.widget.TextView;
import com.google.gson.Gson;
import com.zhejiang.haoxiadan.R;
import com.zhejiang.haoxiadan.model.common.CartGoods;
import com.zhejiang.haoxiadan.model.common.CartGoodsStyle;
import com.zhejiang.haoxiadan.model.common.OrderGoods;
import com.zhejiang.haoxiadan.third.imageload.ImageLoaderUtil;
import com.zhejiang.haoxiadan.ui.activity.chosen.GoodsDetailsActivity;
import com.zhejiang.haoxiadan.ui.activity.my.SelectServiceActivity;
import com.zhejiang.haoxiadan.ui.adapter.AbsBaseAdapter;
import com.zhejiang.haoxiadan.ui.adapter.cart.CartGoodsStyleAdapter;
import com.zhejiang.haoxiadan.ui.view.NoScrollListView;
import com.zhejiang.haoxiadan.util.NumberUtils;
import com.zhejiang.haoxiadan.util.TimeUtils;
import java.util.List;
/**
* 订单里的商品列表
* Created by KK on 2017/8/28.
*/
public class OrderGoodsListAdapter extends AbsBaseAdapter<OrderGoods>{
private int type ;
public OrderGoodsListAdapter(Context context, List<OrderGoods> datas ,int type) {
super(context, datas);
this.type = type ;
}
@Override
public View getView(final int position, View convertView, ViewGroup parent) {
final ViewHolder holder;
if (convertView == null) {
holder = new ViewHolder();
convertView = LayoutInflater.from(mContext).inflate(R.layout.listview_order_goods_list, null);
holder.btn_refund = (Button) convertView.findViewById(R.id.btn_refund);
holder.goodsIconIv = (ImageView) convertView.findViewById(R.id.iv_goods_icon);
holder.goodsTypeIv = (ImageView) convertView.findViewById(R.id.iv_goods_type);
holder.goodsNameTv = (TextView) convertView.findViewById(R.id.tv_goods_name);
holder.goodsPriceTv = (TextView) convertView.findViewById(R.id.tv_goods_price);
holder.goodsStyleTv = (TextView) convertView.findViewById(R.id.tv_goods_style);
holder.goodsCountTv = (TextView) convertView.findViewById(R.id.tv_goods_count);
holder.text_refund_status = (TextView) convertView.findViewById(R.id.text_refund_status);
convertView.setTag(holder);
}else{
holder = (ViewHolder)convertView.getTag();
}
ImageLoaderUtil.displayImage(mDatas.get(position).getIcon(),holder.goodsIconIv);
holder.goodsNameTv.setText(mDatas.get(position).getTitle());
if (type==1) {
holder.goodsPriceTv.setText(mContext.getString(R.string.label_money) + NumberUtils.formatToDouble(mDatas.get(position).getPrice()));
holder.goodsCountTv.setText(mContext.getString(R.string.label_cheng)+" "+mDatas.get(position).getPer_count());
// if (mDatas.get(position).getOrderStatus().equals("20")||mDatas.get(position).getOrderStatus().equals("30")){
// holder.btn_refund.setVisibility(View.VISIBLE);
// }
}else if (type==2){
double goodsPrice = (Double.parseDouble(mDatas.get(position).getPrice())/Double.parseDouble(mDatas.get(position).getCount()));
holder.goodsPriceTv.setText(mContext.getString(R.string.label_money) + goodsPrice);
holder.goodsCountTv.setText(mContext.getString(R.string.label_cheng)+" "+mDatas.get(position).getCount());
}
holder.goodsStyleTv.setText(mDatas.get(position).getStyle());
if (mDatas.get(position).getRefundStatus()!=null){
holder.btn_refund.setVisibility(View.GONE);
holder.text_refund_status.setVisibility(View.VISIBLE);
holder.text_refund_status.setText(mDatas.get(position).getRefundStatus());
}else {
holder.text_refund_status.setVisibility(View.GONE);
if (type==1) {
if (!mDatas.get(position).getOrderStatus().equals("40")&&!mDatas.get(position).getOrderStatus().equals("10")) {
holder.btn_refund.setVisibility(View.VISIBLE);
}
}
}
holder.btn_refund.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(mContext,SelectServiceActivity.class);
intent.putExtra("goods",mDatas.get(position));
mContext.startActivity(intent);
}
});
switch (mDatas.get(position).getType()){
case STOCK:
holder.goodsTypeIv.setImageResource(R.mipmap.icon_goods);
break;
case FUTURES:
holder.goodsTypeIv.setImageResource(R.mipmap.icon_order);
break;
}
return convertView;
}
private class ViewHolder{
ImageView goodsIconIv;
ImageView goodsTypeIv;
TextView goodsNameTv;
TextView goodsPriceTv;
TextView goodsStyleTv;
TextView goodsCountTv;
TextView text_refund_status ;
Button btn_refund ;
}
}
|
[
"yuqi.yang@ughen.com"
] |
yuqi.yang@ughen.com
|
3f37189094dec846014b3c7de799387ce49cf651
|
d90be8f61d116bdbb655adb18c5b1c11ce3a0d7f
|
/java/bdwl/service-backstage/src/main/java/com/liaoin/Enum/Status.java
|
c6b3ac1f7b292ec0ae22e0141541fdf2eac25460
|
[] |
no_license
|
wuxh123/bdwl
|
5d7946b07e396da155338feea8be8444019c65d0
|
c05034473e6c659f6b99953927758d25a7574ee3
|
refs/heads/master
| 2020-05-24T19:44:44.559787
| 2019-05-19T06:54:59
| 2019-05-19T06:54:59
| 187,441,649
| 0
| 0
| null | 2019-05-19T06:25:17
| 2019-05-19T06:25:17
| null |
UTF-8
|
Java
| false
| false
| 557
|
java
|
package com.liaoin.Enum;
/**
* Created by Administrator on 2015/1/4 0004.
*/
public enum Status {
BLOCK("显示", 0),
NONE("隐藏", 1);
Status(String name, int index) {
this.name = name;
this.index = index;
}
private String name;
private int index;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getIndex() {
return index;
}
public void setIndex(int index) {
this.index = index;
}
}
|
[
"997342977@qq.com"
] |
997342977@qq.com
|
556a6bc682f068ce722da3e91fc72f85013dd581
|
de0a5ef2533899f588b7f5f1b49a63fcdae27195
|
/structure-type/src/main/java/ac/cn/saya/design/structure/facade/OilWaySystem.java
|
b9d8dabadaa35120c8dec8da4fbd7482443ca363
|
[
"Apache-2.0"
] |
permissive
|
saya-ac-cn/java-design
|
a1e29c9d2302794844ab9d930f2f52601d3191ee
|
6de5a37426b448d11dc96cc383900dfeb2864092
|
refs/heads/master
| 2023-04-19T12:38:03.771039
| 2021-05-09T15:41:03
| 2021-05-09T15:41:03
| 322,858,459
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 324
|
java
|
package ac.cn.saya.design.structure.facade;
/**
* @Title: OilWaySystem
* @ProjectName java-design
* @Description: TODO
* @Author liunengkai
* @Date: 12/18/20 21:12
* @Description:
*/
public class OilWaySystem {
public static void check(){
System.out.println("正在检查油路单元系统");
}
}
|
[
"saya@saya.ac.cn"
] |
saya@saya.ac.cn
|
83f229c9cb8dc26b5f548405f7e9b066a2c8aa06
|
32f38cd53372ba374c6dab6cc27af78f0a1b0190
|
/app/src/main/java/defpackage/ckx.java
|
089cd54fb4bc124f18bfad2be42389874f3dbf87
|
[
"BSD-3-Clause"
] |
permissive
|
shuixi2013/AmapCode
|
9ea7aefb42e0413f348f238f0721c93245f4eac6
|
1a3a8d4dddfcc5439df8df570000cca12b15186a
|
refs/heads/master
| 2023-06-06T23:08:57.391040
| 2019-08-29T04:36:02
| 2019-08-29T04:36:02
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,274
|
java
|
package defpackage;
import android.app.Application;
import android.content.Context;
import com.autonavi.minimap.app.init.Process;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
/* renamed from: ckx reason: default package */
/* compiled from: InitScheduler */
public final class ckx {
private Map<Process, List<cky>> a = new HashMap();
private Map<Process, List<cky>> b = new HashMap();
public final ckx a(cky cky, Process... processArr) {
a(this.a, cky, processArr);
return this;
}
public final ckx b(cky cky, Process... processArr) {
a(this.b, cky, processArr);
return this;
}
private static void a(Map<Process, List<cky>> map, cky cky, Process... processArr) {
if (processArr == null || processArr.length == 0) {
processArr = new Process[]{Process.MAIN};
}
for (Process process : processArr) {
List list = map.get(process);
if (list == null) {
list = new LinkedList();
map.put(process, list);
}
list.add(cky);
}
}
public final void a(Application application) {
Process a2 = a((Context) application);
List<cky> list = this.a.get(a2);
StringBuilder sb = new StringBuilder("start in ");
sb.append(a2);
sb.append(", mInOrderMap = ");
sb.append(list);
if (list != null) {
for (cky b2 : list) {
b2.b(application);
}
}
List<cky> list2 = this.b.get(a2);
StringBuilder sb2 = new StringBuilder("start in ");
sb2.append(a2);
sb2.append(", mNoOrderMap = ");
sb2.append(list2);
if (list2 != null) {
for (cky b3 : list2) {
b3.b(application);
}
}
}
private static Process a(Context context) {
Process[] values;
for (Process process : Process.values()) {
if (process == Process.MAIN && ahs.a(context)) {
return Process.MAIN;
}
if (ahs.a(process.name, context)) {
return process;
}
}
return Process.OTHER;
}
}
|
[
"hubert.yang@nf-3.com"
] |
hubert.yang@nf-3.com
|
fb574ac4938b1c7050fc1929f7c7dd81d912e9b2
|
614823d74f81a6cb6aa2260535fc5b380f4f37c3
|
/src/main/java/org/mbari/m3/corelib/services/AuthService.java
|
35930af10b6f490b5fe5fe70a3c42f12f2e97867
|
[
"Apache-2.0"
] |
permissive
|
mbari-media-management/m3-corelib
|
30ef04fca88c0d772c403b1e3c247b4b54577db3
|
a5c4fc06ef8cd1edf0d86d68a11fd6213f105c4c
|
refs/heads/master
| 2023-06-06T19:26:14.875392
| 2019-10-18T16:51:59
| 2019-10-18T16:51:59
| 135,360,661
| 1
| 0
|
Apache-2.0
| 2023-05-13T02:02:02
| 2018-05-29T22:51:37
|
Java
|
UTF-8
|
Java
| false
| false
| 259
|
java
|
package org.mbari.m3.corelib.services;
import org.mbari.m3.corelib.model.Authorization;
import java.util.Optional;
/**
* @author Brian Schlining
* @since 2017-05-24T08:49:00
*/
public interface AuthService {
Optional<Authorization> authorize();
}
|
[
"bschlining@gmail.com"
] |
bschlining@gmail.com
|
cd47b75a8ac6f608044fffb092166360de49b009
|
750a12d0f54813cb665516fcb83223ff43d2ddb1
|
/Java-A-Beginners-Guide-master/Chapter_7/src/UsingSuperToAccessSuperclassMembers/Truck.java
|
44e4a5e36674c2413a7eb9ad757a54b7fb137106
|
[] |
no_license
|
Shaigift/Java-A-Beginners-Guide
|
81575e44ae79217989492ce0aa86b2c6ff581a97
|
e770f49fdd9d2060e0aafe24992ab09fc5a4e7ad
|
refs/heads/main
| 2023-05-24T05:39:21.602140
| 2021-06-08T08:47:15
| 2021-06-08T08:47:15
| 374,943,158
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 512
|
java
|
package UsingSuperToAccessSuperclassMembers;
// Extend Vehicle to create a Truck specialization.
class Truck extends Vehicle {
private int cargocap; // cargo capacity in pounds
// This is a constructor for Truck.
Truck(int p, int f, int m, int c) {
/* Initialize Vehicle members using
Vehicle's constructor. */
super(p, f, m);
cargocap = c;
}
// Accessor methods for cargocap.
int getCargo() { return cargocap; }
void putCargo(int c) { cargocap = c; }
}
|
[
"mphogivenshai@gmail.com"
] |
mphogivenshai@gmail.com
|
10bf7cea127334b010782bf51d44400c6fab494c
|
cb767ad9bcb391ae299190ad39483c8e4283c823
|
/src/to/msn/wings/selflearn/chap10/StreamThen.java
|
4b4c206e30f935fd28c0336c6491ad6da00ad6e6
|
[] |
no_license
|
chc1129/selflearn_Java
|
37abd43de22e6ab7deb5ca31df933341fb5f4f1f
|
eb36c8532d185046a01e94e9e89818dbc3a3cfdd
|
refs/heads/master
| 2020-12-11T13:21:49.820137
| 2020-03-23T14:52:24
| 2020-03-23T14:52:24
| 233,859,037
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 701
|
java
|
package to.msn.wings.selflearn.chap10;
import java.util.Collections;
import java.util.stream.Collectors;
import java.util.stream.Stream;
public class StreamThen {
public static void main(String[] args) {
System.out.println(
java.util.Optional.ofNullable(Stream.of("バラ", "あさがお", "さざんか", "うめ", "さくら")
.sorted()
.collect(
Collectors.collectingAndThen(
Collectors.toList(),
Collections::unmodifiableList
)
))
);
}
}
|
[
"chc1129@gmail.com"
] |
chc1129@gmail.com
|
1169acf098748b88dd5536e6a4de674158e88321
|
6a95484a8989e92db07325c7acd77868cb0ac3bc
|
/modules/adwords_axis/src/main/java/com/google/api/ads/adwords/axis/v201502/cm/BudgetOperation.java
|
abd25a5979a57b1ba10fc3d4499e43e7e6e7d4a1
|
[
"Apache-2.0"
] |
permissive
|
popovsh6/googleads-java-lib
|
776687dd86db0ce785b9d56555fe83571db9570a
|
d3cabb6fb0621c2920e3725a95622ea934117daf
|
refs/heads/master
| 2020-04-05T23:21:57.987610
| 2015-03-12T19:59:29
| 2015-03-12T19:59:29
| 33,672,406
| 1
| 0
| null | 2015-04-09T14:06:00
| 2015-04-09T14:06:00
| null |
UTF-8
|
Java
| false
| false
| 4,411
|
java
|
/**
* BudgetOperation.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.4 Mar 02, 2009 (07:08:06 PST) WSDL2Java emitter.
*/
package com.google.api.ads.adwords.axis.v201502.cm;
/**
* Operations for adding/updating Budget entities.
*/
public class BudgetOperation extends com.google.api.ads.adwords.axis.v201502.cm.Operation implements java.io.Serializable {
/* <span class="constraint Required">This field is required and
* should not be {@code null}.</span> */
private com.google.api.ads.adwords.axis.v201502.cm.Budget operand;
public BudgetOperation() {
}
public BudgetOperation(
com.google.api.ads.adwords.axis.v201502.cm.Operator operator,
java.lang.String operationType,
com.google.api.ads.adwords.axis.v201502.cm.Budget operand) {
super(
operator,
operationType);
this.operand = operand;
}
/**
* Gets the operand value for this BudgetOperation.
*
* @return operand * <span class="constraint Required">This field is required and
* should not be {@code null}.</span>
*/
public com.google.api.ads.adwords.axis.v201502.cm.Budget getOperand() {
return operand;
}
/**
* Sets the operand value for this BudgetOperation.
*
* @param operand * <span class="constraint Required">This field is required and
* should not be {@code null}.</span>
*/
public void setOperand(com.google.api.ads.adwords.axis.v201502.cm.Budget operand) {
this.operand = operand;
}
private java.lang.Object __equalsCalc = null;
public synchronized boolean equals(java.lang.Object obj) {
if (!(obj instanceof BudgetOperation)) return false;
BudgetOperation other = (BudgetOperation) obj;
if (obj == null) return false;
if (this == obj) return true;
if (__equalsCalc != null) {
return (__equalsCalc == obj);
}
__equalsCalc = obj;
boolean _equals;
_equals = super.equals(obj) &&
((this.operand==null && other.getOperand()==null) ||
(this.operand!=null &&
this.operand.equals(other.getOperand())));
__equalsCalc = null;
return _equals;
}
private boolean __hashCodeCalc = false;
public synchronized int hashCode() {
if (__hashCodeCalc) {
return 0;
}
__hashCodeCalc = true;
int _hashCode = super.hashCode();
if (getOperand() != null) {
_hashCode += getOperand().hashCode();
}
__hashCodeCalc = false;
return _hashCode;
}
// Type metadata
private static org.apache.axis.description.TypeDesc typeDesc =
new org.apache.axis.description.TypeDesc(BudgetOperation.class, true);
static {
typeDesc.setXmlType(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201502", "BudgetOperation"));
org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("operand");
elemField.setXmlName(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201502", "operand"));
elemField.setXmlType(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201502", "Budget"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
typeDesc.addFieldDesc(elemField);
}
/**
* Return type metadata object
*/
public static org.apache.axis.description.TypeDesc getTypeDesc() {
return typeDesc;
}
/**
* Get Custom Serializer
*/
public static org.apache.axis.encoding.Serializer getSerializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanSerializer(
_javaType, _xmlType, typeDesc);
}
/**
* Get Custom Deserializer
*/
public static org.apache.axis.encoding.Deserializer getDeserializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanDeserializer(
_javaType, _xmlType, typeDesc);
}
}
|
[
"jradcliff@google.com"
] |
jradcliff@google.com
|
dc2087d97517ca7672efb3924d4e732c0dd6a795
|
5e224ff6d555ee74e0fda6dfa9a645fb7de60989
|
/database/src/main/java/adila/db/sph2dm900_sph2dm900.java
|
de557427f90b40e47808d6318c5d171806083c82
|
[
"MIT"
] |
permissive
|
karim/adila
|
8b0b6ba56d83f3f29f6354a2964377e6197761c4
|
00f262f6d5352b9d535ae54a2023e4a807449faa
|
refs/heads/master
| 2021-01-18T22:52:51.508129
| 2016-11-13T13:08:04
| 2016-11-13T13:08:04
| 45,054,909
| 3
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 221
|
java
|
// This file is automatically generated.
package adila.db;
/*
* Samsung Moment
*
* DEVICE: SPH-M900
* MODEL: SPH-M900
*/
final class sph2dm900_sph2dm900 {
public static final String DATA = "Samsung|Moment|";
}
|
[
"keldeeb@gmail.com"
] |
keldeeb@gmail.com
|
22365dfe05ee2547b75db33148a61b3e4a919ca5
|
dde5d4ee7973427ba29f71fc75fd04aad4043d70
|
/app/src/main/java/net/suntrans/smarthome/activity/perc/DeviceManagerActivity.java
|
8d7d8c92ce26c2193e6703c6ca5fa0ab0974d84f
|
[] |
no_license
|
luping1994/SuntransSmartHome
|
38e8394e9d6d5b91023da599ff57eaba30147d15
|
87400344cf908d0e24f55f722218cf333777cd2a
|
refs/heads/master
| 2020-12-30T15:41:39.941658
| 2018-02-25T11:32:13
| 2018-02-25T11:32:50
| 91,162,935
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,241
|
java
|
package net.suntrans.smarthome.activity.perc;
import android.os.Bundle;
import android.view.View;
import net.suntrans.smarthome.R;
import net.suntrans.smarthome.base.BasedActivity;
import net.suntrans.smarthome.fragment.perc.DevicesManagerFragment;
/**
* Created by Looney on 2017/4/20.
*/
public class DeviceManagerActivity extends BasedActivity implements View.OnClickListener {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_devicemanager);
DevicesManagerFragment fragment = DevicesManagerFragment.newInstance();
getSupportFragmentManager().beginTransaction().replace(R.id.content,fragment).commit();
setUpToolbar();
init();
}
private void init() {
}
private void setUpToolbar() {
// Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
// toolbar.setTitle(R.string.title_modify_pass);
// setSupportActionBar(toolbar);
// ActionBar actionBar = getSupportActionBar();
// actionBar.setDisplayShowTitleEnabled(true);
// actionBar.setDisplayHomeAsUpEnabled(true);
}
@Override
public void onClick(View v) {
}
}
|
[
"250384247@qq.com"
] |
250384247@qq.com
|
f3fe07c72372af710ca6567aa3947a55364cd41e
|
f9cd17921a0c820e2235f1cd4ee651a59b82189b
|
/src/net/cbtltd/rest/leaderstay/RoomsAttr.java
|
f5bd498e13a83d031bdadf85c93a2d706cec84a2
|
[] |
no_license
|
bookingnet/booking
|
6042228c12fd15883000f4b6e3ba943015b604ad
|
0047b1ade78543819bcccdace74e872ffcd99c7a
|
refs/heads/master
| 2021-01-10T14:19:29.183022
| 2015-12-07T21:51:06
| 2015-12-07T21:51:06
| 44,936,675
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,755
|
java
|
package net.cbtltd.rest.leaderstay;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for rooms_attr complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="rooms_attr">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <all>
* <element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="quantity" type="{http://www.w3.org/2001/XMLSchema}int"/>
* </all>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "rooms_attr", propOrder = {
})
public class RoomsAttr {
@XmlElement(required = true)
protected String name;
protected int quantity;
/**
* Gets the value of the name property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getName() {
return name;
}
/**
* Sets the value of the name property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setName(String value) {
this.name = value;
}
/**
* Gets the value of the quantity property.
*
*/
public int getQuantity() {
return quantity;
}
/**
* Sets the value of the quantity property.
*
*/
public void setQuantity(int value) {
this.quantity = value;
}
}
|
[
"bookingnet@mail.ru"
] |
bookingnet@mail.ru
|
e857580752fc38364b2adf2f6a56efe9a87c4ee3
|
d5026e57bc7dee1be047fe78acc11e60ccb90bf2
|
/Security/Security/Security/src/EncryptionAlgorithm/DESUtil.java
|
e3f774832157e0ac06e4b4484915f610bf02058e
|
[] |
no_license
|
chaoziyani/Security
|
eb692c9ef272657bf10006de2c0e647cee8069a1
|
4c3da786a07edf0011a759f94b98c61752afe237
|
refs/heads/master
| 2020-07-26T19:52:10.690255
| 2018-10-27T12:37:38
| 2018-10-27T12:37:38
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,656
|
java
|
package EncryptionAlgorithm;
import java.security.NoSuchAlgorithmException;
import java.security.InvalidKeyException;
import javax.crypto.Cipher;
import javax.crypto.KeyGenerator;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.SecretKey;
import javax.crypto.spec.SecretKeySpec;
import javax.crypto.BadPaddingException;
import javax.crypto.IllegalBlockSizeException;
/**
* DES加密算法
* @author WilsonSong
* @version 2018-05-21
*/
public class DESUtil {
/**
* 生成密钥
* @throws Exception
*/
public static byte[] initKey() {
try {
//密钥生成
KeyGenerator keyGen;
keyGen = KeyGenerator.getInstance("DES");
//初始化密钥生成器
keyGen.init(56);
//生成密钥
SecretKey secretKey = keyGen.generateKey();
return secretKey.getEncoded();
} catch (NoSuchAlgorithmException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return null;
}
/**
* 加密
* @throws Exception
*/
public static byte[] encryptDES(byte[] data, byte[] key){
try {
//获得密钥
SecretKey secretKey = new SecretKeySpec(key, "DES");
//Cipher完成加密
Cipher cipher;
cipher = Cipher.getInstance("DES");
//初始化cipher
cipher.init(Cipher.ENCRYPT_MODE, secretKey);
//加密
byte[] encrypt = cipher.doFinal(data);
return encrypt;
} catch (NoSuchAlgorithmException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (NoSuchPaddingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (InvalidKeyException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch(BadPaddingException e) {
e.printStackTrace();
} catch(IllegalBlockSizeException e) {
e.printStackTrace();
}
return null;
}
/**
* 解密
*/
public static byte[] decryptDES(byte[] data, byte[] key){
try {
//恢复密钥
SecretKey secretKey = new SecretKeySpec(key, "DES");
//Cipher完成解密
Cipher cipher;
cipher = Cipher.getInstance("DES");
//初始化cipher
cipher.init(Cipher.DECRYPT_MODE, secretKey);
//解密
byte[] plain = cipher.doFinal(data);
return plain;
} catch (NoSuchAlgorithmException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (NoSuchPaddingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (InvalidKeyException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch(BadPaddingException e) {
e.printStackTrace();
} catch(IllegalBlockSizeException e) {
e.printStackTrace();
}
return null;
}
}
|
[
"zysong0709@foxmail.com"
] |
zysong0709@foxmail.com
|
56ad0d3767e553413ea6bc4ce0daceee11e18b12
|
12e3caf617e5140e60caf41f9fdcec15121ec001
|
/src/jd/plugins/decrypter/FShareVnFolder.java
|
4f0185ca7b0d9e5c53689866f6bc2c3f8763e156
|
[] |
no_license
|
cwchiu/jdownloader-study
|
b29d8fdd27c6ba83bf82f4257955e066f38cc9c9
|
3203ec2d92d2b0b3bb1f4b6dfa4897858d6af5dc
|
refs/heads/master
| 2021-04-27T22:19:26.912073
| 2018-02-24T05:52:14
| 2018-02-24T05:52:14
| 122,416,653
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,017
|
java
|
//jDownloader - Downloadmanager
//Copyright (C) 2009 JD-Team support@jdownloader.org
//
//This program is free software: you can redistribute it and/or modify
//it under the terms of the GNU General Public License as published by
//the Free Software Foundation, either version 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 General Public License for more details.
//
//You should have received a copy of the GNU General Public License
//along with this program. If not, see <http://www.gnu.org/licenses/>.
package jd.plugins.decrypter;
import java.util.ArrayList;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import jd.PluginWrapper;
import jd.controlling.ProgressController;
import jd.parser.Regex;
import jd.plugins.CryptedLink;
import jd.plugins.DecrypterPlugin;
import jd.plugins.DownloadLink;
import jd.plugins.FilePackage;
import jd.plugins.PluginForDecrypt;
import org.appwork.utils.StringUtils;
import org.jdownloader.scripting.JavaScriptEngineFactory;
@DecrypterPlugin(revision = "$Revision: 38698 $", interfaceVersion = 3, names = { "fshare.vn" }, urls = { "https?://(?:www\\.)?fshare\\.vn/folder/([A-Z0-9]+)" })
public class FShareVnFolder extends PluginForDecrypt {
public FShareVnFolder(PluginWrapper wrapper) {
super(wrapper);
}
public ArrayList<DownloadLink> decryptIt(CryptedLink param, ProgressController progress) throws Exception {
final ArrayList<DownloadLink> decryptedLinks = new ArrayList<DownloadLink>();
final String parameter = param.toString();
final String folderid = new Regex(parameter, this.getSupportedLinks()).getMatch(0);
final LinkedHashSet<String> dupe = new LinkedHashSet<String>();
jd.plugins.hoster.FShareVn.prepBrowser(this.br);
/* Important or we'll get XML ;) */
br.getHeaders().put("Accept", "application/json, text/plain, */*");
br.getPage("https://www." + this.getHost() + "/api/v3/files/folder?linkcode=" + folderid + "&sort=type,name");
while (!isAbort()) {
final Map<String, Object> map = JavaScriptEngineFactory.jsonToJavaMap(br.toString());
final List<Object> ressourcelist = (List<Object>) map.get("items");
if (this.br.getHttpConnection().getResponseCode() == 404) {
logger.info("Link offline: " + parameter);
return decryptedLinks;
} else if (ressourcelist.isEmpty()) {
logger.info("Empty folder");
return decryptedLinks;
}
final Map<String, Object> entries = (Map<String, Object>) map.get("current");
String fpName = (String) entries.get("name");
if (StringUtils.isEmpty(fpName)) {
fpName = folderid;
}
FilePackage fp = FilePackage.getInstance();
fp.setName(fpName.trim());
for (final Object linkO : ressourcelist) {
final Map<String, Object> entries2 = (Map<String, Object>) linkO;
// final String path = (String) entries2.get("path");
final String linkcode = (String) entries2.get("linkcode");
if (dupe.add(linkcode)) {
final String filename = (String) entries2.get("name");
final long filesize = JavaScriptEngineFactory.toLong(entries2.get("size"), 0);
if (StringUtils.isEmpty(linkcode)) {
/* This should never happen */
continue;
}
final DownloadLink dl = this.createDownloadlink("https://www." + this.getHost() + "/file/" + linkcode);
dl.setLinkID(linkcode);
if (filesize > 0) {
/* Should always be the case. */
dl.setDownloadSize(filesize);
}
dl.setName(filename);
dl.setAvailable(true);
dl._setFilePackage(fp);
decryptedLinks.add(dl);
distribute(dl);
}
}
final Map<String, Object> links = (Map<String, Object>) map.get("_links");
if (links != null) {
final String next = (String) links.get("next");
if (next != null && dupe.add(next)) {
br.getPage("https://www." + this.getHost() + "/api" + next);
continue;
}
}
break;
}
return decryptedLinks;
}
/* NO OVERRIDE!! */
public boolean hasCaptcha(CryptedLink link, jd.plugins.Account acc) {
return false;
}
}
|
[
"sisimi.sidc@gmail.com"
] |
sisimi.sidc@gmail.com
|
1d382314813bd0c27207f62c88c58dc37c0c89c6
|
ec2bd4ec310a4f9fbf0b61e427ef50b6686b18b5
|
/guanglian/gl-core/src/main/java/com/kekeinfo/core/business/user/dao/GroupDaoImpl.java
|
545842e9e7949958140c08efb96fb35637e691f9
|
[] |
no_license
|
kingc0000/privatefirst
|
58d0089a91f2fb26e615bf00f5c072d9036c8ab3
|
72b37f40d0f16b69466127b60434fbccfc5a6b50
|
refs/heads/master
| 2020-03-15T21:22:08.487027
| 2018-05-16T15:41:56
| 2018-05-16T15:41:56
| 132,353,516
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,114
|
java
|
package com.kekeinfo.core.business.user.dao;
import java.util.List;
import java.util.Set;
import javax.persistence.Query;
import org.springframework.stereotype.Repository;
import com.kekeinfo.core.business.generic.dao.KekeinfoEntityDaoImpl;
import com.mysema.query.BooleanBuilder;
import com.mysema.query.jpa.JPQLQuery;
import com.mysema.query.jpa.impl.JPAQuery;
import com.kekeinfo.core.business.user.model.Group;
import com.kekeinfo.core.business.user.model.QGroup;
import com.kekeinfo.core.business.user.model.QPermission;
@Repository("groupDao")
public class GroupDaoImpl extends KekeinfoEntityDaoImpl<Integer, Group> implements
GroupDao {
@SuppressWarnings("rawtypes")
@Override
public List<Group> getGroupsListBypermissions(Set permissionIds) {
StringBuilder qs = new StringBuilder();
qs.append("select g from Group as g ");
qs.append("join fetch g.permissions perms ");
qs.append("where perms.id in (:cid) ");
String hql = qs.toString();
Query q = super.getEntityManager().createQuery(hql);
q.setParameter("cid", permissionIds);
@SuppressWarnings("unchecked")
List<Group> groups = q.getResultList();
return groups;
}
@Override
public List<Group> listGroupByIds(Set<Integer> ids) {
StringBuilder qs = new StringBuilder();
qs.append("select distinct g from Group as g ");
qs.append("join fetch g.permissions perms ");
qs.append("where g.id in (:gid) ");
String hql = qs.toString();
Query q = super.getEntityManager().createQuery(hql);
q.setParameter("gid", ids);
@SuppressWarnings("unchecked")
List<Group> groups = q.getResultList();
return groups;
}
@Override
public Group getByName(String name) {
// TODO Auto-generated method stub
QGroup qGroup = QGroup.group;
JPQLQuery query = new JPAQuery (getEntityManager());
query.from(qGroup)
.where(qGroup.groupName.equalsIgnoreCase(name));
return query.singleResult(qGroup);
}
@Override
public List<Group> listGroupWithPermission() {
// TODO Auto-generated method stub
QGroup qGroup = QGroup.group;
JPQLQuery query = new JPAQuery (getEntityManager());
query.from(qGroup)
.leftJoin(qGroup.permissions).fetch()
//.where(qGroup.groupName.notEqualsIgnoreCase("SUPERADMIN"))
.orderBy(qGroup.id.asc());
return query.distinct().list(qGroup);
}
/**
* 根据权限组名称和权限组类型,获取对应的权限组集合
* @param type 0:一般权限组,1:部门项目权限组,对应PNODE表关联
*/
@Override
public List<Group> listGroupByPermissionName(String name,int type) {
// TODO Auto-generated method stub
QGroup qGroup = QGroup.group;
QPermission qpPermission = QPermission.permission;
JPQLQuery query = new JPAQuery (getEntityManager());
query.from(qGroup)
.leftJoin(qGroup.permissions,qpPermission).fetch();
BooleanBuilder pBuilder = new BooleanBuilder();
pBuilder.and(qpPermission.permissionName.equalsIgnoreCase(name));
pBuilder.and(qGroup.grouptype.eq(type));
query.where(pBuilder);
return query.distinct().list(qGroup);
}
}
|
[
"v_xubiao@baidu.com"
] |
v_xubiao@baidu.com
|
7002716eeaaccc475610e0378ca5289c7e903432
|
f7f773ab56f61a83032682e66019372e6e853ec9
|
/framework/clientreflectorjvm/src/cc/alcina/framework/common/client/logic/reflection/jvm/FsLogger.java
|
42d79f5bee670c2e7d0354a822b7ad7e50c8a935
|
[] |
no_license
|
sp2020jarvan3/alcina
|
b4025b71375e0c0cdcda3d52400f8cba22bfb795
|
40f5089c710d37542d04fde1bcd9a5b681ca901d
|
refs/heads/main
| 2023-03-23T11:49:38.184094
| 2021-03-22T17:33:24
| 2021-03-22T17:33:24
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 394
|
java
|
package cc.alcina.framework.common.client.logic.reflection.jvm;
import cc.alcina.framework.common.client.WrappedRuntimeException;
import cc.alcina.framework.entity.ResourceUtilities;
public class FsLogger {
public void write(String log) {
try {
ResourceUtilities.writeStringToFile(log, "/tmp/gwt-fs-log.txt");
} catch (Exception e) {
throw new WrappedRuntimeException(e);
}
}
}
|
[
"nick.reddel@gmail.com"
] |
nick.reddel@gmail.com
|
a94196c49b5843726cfbb1152ed2f0411b92eaa2
|
3fc7c3d4a697c418bad541b2ca0559b9fec03db7
|
/Decompile/javasource/com/nostra13/universalimageloader/core/imageaware/NonViewAware.java
|
e01896371cfabdf8524ac8d40e8348ba71415959
|
[] |
no_license
|
songxingzai/APKAnalyserModules
|
59a6014350341c186b7788366de076b14b8f5a7d
|
47cf6538bc563e311de3acd3ea0deed8cdede87b
|
refs/heads/master
| 2021-12-15T02:43:05.265839
| 2017-07-19T14:44:59
| 2017-07-19T14:44:59
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,567
|
java
|
package com.nostra13.universalimageloader.core.imageaware;
import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;
import android.text.TextUtils;
import android.view.View;
import com.nostra13.universalimageloader.core.assist.ImageSize;
import com.nostra13.universalimageloader.core.assist.ViewScaleType;
public class NonViewAware
implements ImageAware
{
protected final ImageSize imageSize;
protected final String imageUri;
protected final ViewScaleType scaleType;
public NonViewAware(String paramString, ImageSize paramImageSize, ViewScaleType paramViewScaleType)
{
if (paramImageSize == null) {
throw new IllegalArgumentException("imageSize must not be null");
}
if (paramViewScaleType == null) {
throw new IllegalArgumentException("scaleType must not be null");
}
imageUri = paramString;
imageSize = paramImageSize;
scaleType = paramViewScaleType;
}
public int getHeight()
{
return imageSize.getHeight();
}
public int getId()
{
if (TextUtils.isEmpty(imageUri)) {
return super.hashCode();
}
return imageUri.hashCode();
}
public ViewScaleType getScaleType()
{
return scaleType;
}
public int getWidth()
{
return imageSize.getWidth();
}
public View getWrappedView()
{
return null;
}
public boolean isCollected()
{
return false;
}
public boolean setImageBitmap(Bitmap paramBitmap)
{
return true;
}
public boolean setImageDrawable(Drawable paramDrawable)
{
return true;
}
}
|
[
"leehdsniper@gmail.com"
] |
leehdsniper@gmail.com
|
9a67c204b038f2b7bd675c3376b30a72aaa79538
|
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
|
/benchmark/training/org/apache/camel/component/cxf/jaxrs/CxfRsProducerEndpointConfigurerTest.java
|
a433800900df04719d5d411883416a46ddbd749e
|
[] |
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
| 3,326
|
java
|
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.camel.component.cxf.jaxrs;
import org.apache.camel.Message;
import org.apache.camel.test.junit4.CamelTestSupport;
import org.apache.cxf.endpoint.Server;
import org.apache.cxf.jaxrs.AbstractJAXRSFactoryBean;
import org.apache.cxf.jaxrs.client.Client;
import org.apache.cxf.message.MessageContentsList;
import org.junit.Test;
public class CxfRsProducerEndpointConfigurerTest extends CamelTestSupport {
@Test
public void testCxfRsEndpoinConfigurerProxyApi() throws InterruptedException {
template.send("direct:start", ( exchange) -> {
exchange.setPattern(ExchangePattern.InOut);
Message inMessage = exchange.getIn();
inMessage.setHeader(CxfConstants.OPERATION_NAME, "getCustomer");
inMessage.setHeader(CxfConstants.CAMEL_CXF_RS_USING_HTTP_API, Boolean.FALSE);
MessageContentsList messageContentsList = new MessageContentsList();
messageContentsList.add("1");
inMessage.setBody(messageContentsList);
});
getMockEndpoint("mock:result").expectedHeaderReceived("foo", "bar");
getMockEndpoint("mock:end").expectedMessageCount(1);
assertMockEndpointsSatisfied();
}
@Test
public void testCxfRsEndpointConfigurerHttpApi() throws InterruptedException {
template.send("direct:start", ( exchange) -> {
exchange.setPattern(ExchangePattern.InOut);
Message inMessage = exchange.getIn();
inMessage.setHeader(Exchange.HTTP_PATH, "/customerservice/customers/1");
inMessage.setHeader(Exchange.HTTP_METHOD, HttpMethod.GET);
inMessage.setHeader(CxfConstants.CAMEL_CXF_RS_USING_HTTP_API, Boolean.TRUE);
inMessage.setHeader(CxfConstants.CAMEL_CXF_RS_RESPONSE_CLASS, .class);
});
getMockEndpoint("mock:result").expectedHeaderReceived("foo", "bar");
getMockEndpoint("mock:end").expectedMessageCount(1);
assertMockEndpointsSatisfied();
}
public static class MyCxfRsEndpointConfigurer implements CxfRsEndpointConfigurer {
@Override
public void configure(AbstractJAXRSFactoryBean factoryBean) {
// setup the wrong address here, it should be override from the address
factoryBean.setAddress("xxxx");
}
@Override
public void configureClient(Client client) {
client.header("foo", "bar");
}
@Override
public void configureServer(Server server) {
}
}
}
|
[
"benjamin.danglot@inria.fr"
] |
benjamin.danglot@inria.fr
|
7383a51d1bb81dfca06488b9a1d5bac90cb74737
|
78f36e8fc0b25a5d939d40424e6bc89e904952c1
|
/api-clusters/src/main/java/com/twa/flights/api/clusters/configuration/zookeeper/ZooKeeperConfiguration.java
|
2035f2ea4cb201341854451aa124fd497bda2589
|
[
"MIT"
] |
permissive
|
NajeebArif/manning-twa-api
|
8b6ec1229600628800575c9a854992c06e82af5c
|
a9ee038c270e26ff28c194cdce7af3f4ee56549e
|
refs/heads/main
| 2023-05-26T17:10:19.557805
| 2021-06-04T19:13:35
| 2021-06-04T19:13:35
| 373,120,166
| 1
| 0
|
MIT
| 2021-06-02T10:05:19
| 2021-06-02T10:05:19
| null |
UTF-8
|
Java
| false
| false
| 1,623
|
java
|
package com.twa.flights.api.clusters.configuration.zookeeper;
import org.apache.curator.framework.CuratorFrameworkFactory;
import org.apache.curator.retry.RetryNTimes;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
@ConfigurationProperties(prefix = "zookeeper")
public class ZooKeeperConfiguration {
private String host;
private int maxRetries;
private int timeBetweenRetries;
private int connectionTimeout;
@Bean
public ZooKeeperCuratorConfiguration zookeeperConnection() {
return new ZooKeeperCuratorConfiguration(
CuratorFrameworkFactory.builder().connectString(host).connectionTimeoutMs(connectionTimeout)
.retryPolicy(new RetryNTimes(maxRetries, timeBetweenRetries)).build());
}
public String getHost() {
return host;
}
public void setHost(String host) {
this.host = host;
}
public int getMaxRetries() {
return maxRetries;
}
public void setMaxRetries(int maxRetries) {
this.maxRetries = maxRetries;
}
public int getTimeBetweenRetries() {
return timeBetweenRetries;
}
public void setTimeBetweenRetries(int timeBetweenRetries) {
this.timeBetweenRetries = timeBetweenRetries;
}
public int getConnectionTimeout() {
return connectionTimeout;
}
public void setConnectionTimeout(int connectionTimeout) {
this.connectionTimeout = connectionTimeout;
}
}
|
[
"NajeebArif786@outlook.com"
] |
NajeebArif786@outlook.com
|
bd575f8f70d850b3245550cd1aab5aa457df5dd3
|
e181069452bea568c42403fecbac2344ac65e2fb
|
/SIGEMCO/src/java/co/com/hotel/logica/general/CambioContrasena.java
|
977affc53a56dd54901d734656a42b5c2f275e32
|
[] |
no_license
|
codesoftware/JSFSIGEMCO
|
de301674b217521906329a6f210ad710b8f1d65e
|
c18f9c77256792b9fbef6d02c834ce98c7d364f3
|
refs/heads/master
| 2021-01-21T04:19:17.222992
| 2019-01-11T14:17:46
| 2019-01-11T14:17:46
| 45,791,876
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,050
|
java
|
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package co.com.hotel.logica.general;
import co.com.hotel.persistencia.general.EnvioFunction;
/**
* Clase encargada de cambiar la contraseña de un usuario
*
* @author nicolas
* @version 1.0.0
* @since 1.0.0
*
*/
public class CambioContrasena {
/**
* Funcion encargada de hacer la logica del cambio de contraseña basado en
* el usuario
*
* @param usuario Usuario al cual se le quiere cambiar la contraseña
* @param contra Nueva contraseña principal que tendra el usuario
* @return true(Cuando el cambio de contraseña fue exitoso ) false (Cuando
* no se realizo el cambi de contraseña)
*/
public boolean cambiarContra(String usuario, String contra) {
try {
EnvioFunction function = new EnvioFunction();
function.adicionarNombre("US_FCAMBIO_CLAVE");
function.adicionarParametro(usuario);
function.adicionarParametro(contra);
String rta = "";
rta = function.llamarFunction(function.getSql());
function.cerrarConexion();
function.recuperarString();
String[] rtaVector = rta.split("-");
int tam = rtaVector.length;
if (tam == 2) {
// Este mensaje lo envia la funcion que envia la funcion de java que
// confirma que el llamado de a la funcion fue exitiso.
if (rtaVector[1].equalsIgnoreCase("Ok")) {
// Aqui verifico si el update fue realizado
String rtaPg = function.getRespuesta();
if(rtaPg.equalsIgnoreCase("Ok")){
function = null;
return true;
}
}
}
} catch (Exception e) {
return false;
}
return false;
}
}
|
[
"jnsierrac@gmail.com"
] |
jnsierrac@gmail.com
|
c0c5afe31ed4f82b5af1b0aedab61ef522dcfd56
|
4af46c51990059c509ed9278e8708f6ec2067613
|
/java/l2server/gameserver/model/actor/instance/L2ArtefactInstance.java
|
0105386dd3e54c769b4de1ed1fb83f4113eb18a2
|
[] |
no_license
|
bahamus007/l2helios
|
d1519d740c11a66f28544075d9e7c628f3616559
|
228cf88db1981b1169ea5705eb0fab071771a958
|
refs/heads/master
| 2021-01-12T13:17:19.204718
| 2017-11-15T02:16:52
| 2017-11-15T02:16:52
| 72,180,803
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,818
|
java
|
/*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 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 General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package l2server.gameserver.model.actor.instance;
import l2server.gameserver.model.L2Skill;
import l2server.gameserver.model.actor.L2Character;
import l2server.gameserver.model.actor.L2Npc;
import l2server.gameserver.network.serverpackets.ActionFailed;
import l2server.gameserver.templates.chars.L2NpcTemplate;
/**
* This class manages all Castle Siege Artefacts.<BR>
* <BR>
*
* @version $Revision: 1.11.2.1.2.7 $ $Date: 2005/04/06 16:13:40 $
*/
public final class L2ArtefactInstance extends L2Npc
{
/**
* Constructor of L2ArtefactInstance (use L2Character and L2NpcInstance
* constructor).<BR>
* <BR>
* <p>
* <B><U> Actions</U> :</B><BR>
* <BR>
* <li>Call the L2Character constructor to set the _template of the
* L2ArtefactInstance (copy skills from template to object and link
* _calculators to NPC_STD_CALCULATOR)</li> <li>Set the name of the
* L2ArtefactInstance</li> <li>Create a RandomAnimation Task that will be
* launched after the calculated delay if the server allow it</li><BR>
* <BR>
*
* @param objectId Identifier of the object to initialized
*/
public L2ArtefactInstance(int objectId, L2NpcTemplate template)
{
super(objectId, template);
setInstanceType(InstanceType.L2ArtefactInstance);
}
/**
* @see l2server.gameserver.model.actor.L2Npc#onSpawn()
*/
@Override
public void onSpawn()
{
super.onSpawn();
getCastle().registerArtefact(this);
}
/**
* Return False.<BR>
* <BR>
*/
@Override
public boolean isAutoAttackable(L2Character attacker)
{
return false;
}
@Override
public boolean isAttackable()
{
return false;
}
@Override
public void onForcedAttack(L2PcInstance player)
{
// Send a Server->Client ActionFailed to the L2PcInstance in order to avoid that the client wait another packet
player.sendPacket(ActionFailed.STATIC_PACKET);
}
@Override
public void reduceCurrentHp(double damage, L2Character attacker, L2Skill skill)
{
}
@Override
public void reduceCurrentHp(double damage, L2Character attacker, boolean awake, boolean isDOT, L2Skill skill)
{
}
}
|
[
"singto52@hotmail.com"
] |
singto52@hotmail.com
|
b2e6643df0532e7c8ee7d30403716a66f1c1765b
|
22c0ea86a3a73dda44921a87208022a3871d6c06
|
/.svn/pristine/b2/b2e6643df0532e7c8ee7d30403716a66f1c1765b.svn-base
|
c532bfe7a08371c5cb71ee31d8eb5f75749c94fa
|
[] |
no_license
|
hungdt138/xeeng_server
|
e9cd0a3be7ee0fc928fb6337e950e12846bd065a
|
602ce57a4ec625c25aff0a48ac01d3c41f481c5a
|
refs/heads/master
| 2021-01-04T14:06:51.158259
| 2014-08-01T09:52:00
| 2014-08-01T09:52:00
| 22,504,067
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 467
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.tv.xeeng.base.protocol.messages;
import com.tv.xeeng.protocol.AbstractRequestMessage;
import com.tv.xeeng.protocol.IRequestMessage;
/**
*
* @author Dinhpv
*/
public class PeaceRequest extends AbstractRequestMessage {
public long mMatchId;
public long uid;
public IRequestMessage createNew() {
return new PeaceRequest();
}
}
|
[
"hungdt138@outlook.com"
] |
hungdt138@outlook.com
|
|
1f8bd915d4bfef89074065ae645e412c6fe7b3c7
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/2/2_43fe5a8f9eda64adf7ff4d753076617ac52a2727/Course/2_43fe5a8f9eda64adf7ff4d753076617ac52a2727_Course_t.java
|
04824b8f8f07d78bd73422a072f36842b64d9820
|
[] |
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,761
|
java
|
package berlin.reiche.virginia.model;
import java.util.Map;
import org.bson.types.ObjectId;
import com.google.code.morphia.annotations.Entity;
import com.google.code.morphia.annotations.Id;
import com.google.code.morphia.annotations.Reference;
/**
* Represents a course unit which belongs to a {@link CourseModule}.
*
* @author Konrad Reiche
*
*/
@Entity("course")
public class Course implements Comparable<Course> {
@Id
ObjectId id = new ObjectId();
String type;
int duration;
int count;
@Reference
Map<String, Integer> features;
/**
* The course module to which this course belongs.
*/
@Reference
CourseModule module;
/**
* This constructor is used by Morphia via Java reflections.
*/
@SuppressWarnings("unused")
private Course() {
}
/**
* Creates a new course by assigning the parameters directly, except the id
* which is generated by the database after saving the object.
*
* @param type
* the course type.
* @param duration
* the duration.
* @param count
* the number of times the course should take place per week.
* @param module
* the course module to which this course belongs.
*/
public Course(String type, int duration, int count) {
super();
this.type = type;
this.duration = duration;
this.count = count;
}
public int getCount() {
return count;
}
public int getDuration() {
return duration;
}
public ObjectId getId() {
return id;
}
public CourseModule getModule() {
return module;
}
public String getType() {
return type;
}
public void setModule(CourseModule module) {
this.module = module;
}
@Override
public String toString() {
return module.getName() + " (" + type + ")";
}
/**
* Makes the course comparable in order to return the same ordering every
* time when accessed.
*
* @see java.lang.Comparable#compareTo(java.lang.Object)
*/
@Override
public int compareTo(Course o) {
return id.compareTo(o.id);
}
@Override
public boolean equals(Object o) {
if (!(o instanceof Course)) {
return false;
} else {
return id.equals(((Course)o).id);
}
}
@Override
public int hashCode() {
return id.hashCode();
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
7b8bb8e906585f05555f02e7fabb2bdded5d9430
|
9193db991e5948b5d3f8243c6d9808903e7ec649
|
/src/main/java/org/eleventhlabs/ncomplo/business/util/I18nNamedEntityComparator.java
|
ac133f1001e74646b85f002a0533abc5f6dbc4f9
|
[] |
no_license
|
danielfernandez/ncomplo
|
14b235a936b304b38f137b8b3cb738af8889a8f1
|
552554bc7fdcc46446a1a18413a3d4f4cade9e21
|
refs/heads/master
| 2016-09-06T08:23:33.675298
| 2012-06-16T22:53:21
| 2012-06-16T22:53:21
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 858
|
java
|
package org.eleventhlabs.ncomplo.business.util;
import java.util.Comparator;
import java.util.Locale;
import org.eleventhlabs.ncomplo.business.entities.I18nNamedEntity;
public final class I18nNamedEntityComparator implements Comparator<I18nNamedEntity>{
private final Locale locale;
public I18nNamedEntityComparator(final Locale locale) {
super();
this.locale = locale;
}
@Override
public int compare(final I18nNamedEntity o1, final I18nNamedEntity o2) {
final String o1Name = o1.getName(this.locale);
final String o2Name = o2.getName(this.locale);
if (o1Name == null) {
return 1;
}
if (o2Name == null) {
return -1;
}
return o1Name.compareTo(o2Name);
}
}
|
[
"daniel.fernandez@11thlabs.org"
] |
daniel.fernandez@11thlabs.org
|
82f330e15d2a2281a6e004bfd978b261b0c91fb0
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Chart/19/org/jfree/data/xy/YIntervalSeriesCollection_getEndYValue_195.java
|
5263ed92f0ff8440f721a474b4fe33a17fe81528
|
[] |
no_license
|
hvdthong/NetML
|
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
|
9bb103da21327912e5a29cbf9be9ff4d058731a5
|
refs/heads/master
| 2021-06-30T15:03:52.618255
| 2020-10-07T01:58:48
| 2020-10-07T01:58:48
| 150,383,588
| 1
| 1
| null | 2018-09-26T07:08:45
| 2018-09-26T07:08:44
| null |
UTF-8
|
Java
| false
| false
| 659
|
java
|
org jfree data
collect link interv seri yintervalseri object
interv seri yintervalseri
interv seri collect yintervalseriescollect abstract interv dataset abstractintervalxydataset
return end primit item
seri
param seri seri base index
param item item base index
end getendyvalu seri item
interv seri yintervalseri interv seri yintervalseri data seri
high getyhighvalu item
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
835dd2d521cbbb5f37d9330f83da1d566b223fc2
|
c156bf50086becbca180f9c1c9fbfcef7f5dc42c
|
/src/main/java/com/waterelephant/operatorData/xygj/service/impl/XygjOperatorDataImpl.java
|
511276a92f58378107a34062626f46dfa22bf9e3
|
[] |
no_license
|
zhanght86/beadwalletloanapp
|
9e3def26370efd327dade99694006a6e8b18a48f
|
66d0ae7b0861f40a75b8228e3a3b67009a1cf7b8
|
refs/heads/master
| 2020-12-02T15:01:55.982023
| 2019-11-20T09:27:24
| 2019-11-20T09:27:24
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,632
|
java
|
package com.waterelephant.operatorData.xygj.service.impl;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.waterelephant.operatorData.dto.OperatorBillDataDto;
import com.waterelephant.operatorData.dto.OperatorFamilyDataDto;
import com.waterelephant.operatorData.dto.OperatorMonthInfoDto;
import com.waterelephant.operatorData.dto.OperatorMsgDataDto;
import com.waterelephant.operatorData.dto.OperatorNetDataDto;
import com.waterelephant.operatorData.dto.OperatorNetLogDataDto;
import com.waterelephant.operatorData.dto.OperatorRechargeDataDto;
import com.waterelephant.operatorData.dto.OperatorTelDataDto;
import com.waterelephant.operatorData.dto.OperatorUserDataDto;
import com.waterelephant.operatorData.service.impl.OperatorsDataAbstractService;
import com.waterelephant.operatorData.xygj.mapper.XygjOperatorDataMapper;
import com.waterelephant.utils.DateUtil;
@Service
public class XygjOperatorDataImpl extends OperatorsDataAbstractService{
private Logger logger = LoggerFactory.getLogger(XygjOperatorDataImpl.class);
@Autowired
private XygjOperatorDataMapper mapper;
@Override
public OperatorUserDataDto getUserData(Long borrowerId, Long orderId) {
logger.info("----【信用管家】----依据orderId:{}查询用户基本信息",orderId);
return mapper.queryUserData(orderId);
}
@Override
public List<OperatorRechargeDataDto> getRechargeDataList(Long borrowerId,
Long orderId) {
return new ArrayList<OperatorRechargeDataDto>();
}
@Override
public List<OperatorMsgDataDto> getMsgDataList(Long borrowerId, Long orderId) {
logger.info("----【信用管家】----根据orderId:{}获取短信记录信息<<<<<",orderId);
int months = 6;
Calendar calendar = Calendar.getInstance();
List<OperatorMsgDataDto> list = new ArrayList<OperatorMsgDataDto>();
try {
while(months > 0){
String date = DateUtil.getDateString(calendar.getTime(), "yyyy-MM");
OperatorMsgDataDto dto = this.mapper.queryMsgCount(orderId, date);
if(null != dto&&dto.getTotalSize() >0 ){
calendar.set(Calendar.DATE, calendar.getActualMinimum(Calendar.DATE));
//每月开始第一天时间
String startTime = DateUtil.getDateString(calendar.getTime(), "yyyy-MM-dd") + " 00:00:00";
calendar.set(Calendar.DATE, calendar.getActualMaximum(Calendar.DATE));
//每月结束最后一天时间
String endTime = DateUtil.getDateString(calendar.getTime(), "yyyy-MM-dd") + " 23:59:59";
List<Map<String, Object>> msgrecord = this.mapper.queryMsgData(orderId, startTime, endTime);
logger.info("----【信用管家】----根据orderId:{},startTime:{},endTime:{},查询bw_xygj_sms表获取短信记录信息,结果为:{}",orderId,startTime,endTime,msgrecord == null ?"空":msgrecord.size());
if(null != msgrecord&&msgrecord.size()>0){
dto.setItems(msgrecord);
list.add(dto);
}
}
calendar.add(Calendar.MONTH, -1);
months--;
}
} catch (Exception e) {
logger.error("----【信用管家】----根据orderId:{}获取短信记录信息异常:{}----",orderId,e.getMessage());
e.printStackTrace();
}
return list;
}
@Override
public List<OperatorTelDataDto> getTelDataList(Long borrowerId, Long orderId) {
logger.info("----【信用管家】----根据orderId:{}获取通话记录信息----",orderId);
int months = 6;
Calendar calendar = Calendar.getInstance();
List<OperatorTelDataDto> list = new ArrayList<OperatorTelDataDto>();
try {
while(months>0){
String endTime = DateUtil.getDateString(calendar.getTime(), "yyyy-MM");
OperatorTelDataDto dto = this.mapper.queryCallCount(orderId,endTime);
if(null !=dto&&dto.getTotalSize()>0){
calendar.set(Calendar.DATE, calendar.getActualMinimum(Calendar.DATE));
String startTime = DateUtil.getDateString(calendar.getTime(), "yyyy-MM-dd")+ " 00:00:00";
calendar.set(Calendar.DATE, calendar.getActualMaximum(Calendar.DATE));
String endTimedData = DateUtil.getDateString(calendar.getTime(), "yyyy-MM-dd")+ " 23:59:59";
List<Map<String, Object>> items = this.mapper.queryCallData(orderId, startTime, endTimedData);
logger.info("----【信用管家】----根据orderId:{},startTime:{},endTime:{},查询bw_xygj_call表获取通话记录信息,结果为:{}",orderId,startTime,endTime,items == null ?"空":items.size());
if(null !=items&&items.size()>0){
dto.setItems(items);
list.add(dto);
}
}
months--;
calendar.add(Calendar.MONTH, -1);
}
} catch (Exception e) {
logger.error("----【信用管家】----根据orderId:{}获取通话记录信息异常:{}----",orderId,e.getMessage());
e.printStackTrace();
}
return list;
}
@Override
public List<OperatorBillDataDto> getBillDataList(Long borrowerId,
Long orderId) {
return new ArrayList<OperatorBillDataDto>();
}
@Override
public List<OperatorFamilyDataDto> getFamilyDataList(Long borrowerId,
Long orderId) {
return new ArrayList<OperatorFamilyDataDto>();
}
@Override
public List<OperatorNetLogDataDto> getNetLogDataList(Long borrowerId,
Long orderId) {
return new ArrayList<OperatorNetLogDataDto>();
}
@Override
public OperatorMonthInfoDto getMonthinfo(Long borrowerId, Long orderId) {
return new OperatorMonthInfoDto();
}
@Override
public List<OperatorNetDataDto> getNetDataList(Long borrowerId, Long orderId) {
return new ArrayList<OperatorNetDataDto>();
}
}
|
[
"wurenbiao@beadwallet.com"
] |
wurenbiao@beadwallet.com
|
f97b4be46285a666d006f22f549da3ef1cfc86b1
|
8fa1af38758c2a88c4801b04114a72637e129ff8
|
/src/main/java/edu/uw/zookeeper/safari/peer/protocol/MessageBodyType.java
|
d8319f3b1dbb51d4f8cdaf3233eca61eba6cc0f3
|
[
"Apache-2.0"
] |
permissive
|
lisaglendenning/safari
|
2caf36e72a43721f5ff06be24073d4c1bfc2bb72
|
3f36e5354db115644e9e1eaa65136a4dc759024f
|
refs/heads/master
| 2016-09-06T06:56:57.547823
| 2015-07-02T21:56:25
| 2015-07-02T21:56:25
| 12,796,669
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 202
|
java
|
package edu.uw.zookeeper.safari.peer.protocol;
import java.lang.annotation.*;
@Documented
@Inherited
@Retention(RetentionPolicy.RUNTIME)
public @interface MessageBodyType {
MessageType value();
}
|
[
"lisa@glendenning.net"
] |
lisa@glendenning.net
|
4742a60f11bba36ba04d7bd4e9941e652fc1791c
|
3093fe11d51fd1108cb167917a0f74ae7afce5c5
|
/src/main/java/com/williewheeler/battleballoons/game/GameScreenNames.java
|
3166fee3620621320a85f05c9f6cde2521c03521
|
[] |
no_license
|
williewheeler/battle-balloons
|
2183d2e35299a28353584c9dd6b38f0e6fb2d68a
|
7599dde993213a561951348feb14f8aae6220d47
|
refs/heads/master
| 2019-07-11T20:42:25.257871
| 2017-10-20T23:00:58
| 2017-10-20T23:00:58
| 93,341,588
| 4
| 0
| null | 2017-07-16T00:35:30
| 2017-06-04T21:09:10
|
Java
|
UTF-8
|
Java
| false
| false
| 318
|
java
|
package com.williewheeler.battleballoons.game;
/**
* Created by willie on 7/3/17.
*/
public final class GameScreenNames {
public static final String ARENA_SCREEN = "arenaScreen";
public static final String TRANSITION_SCREEN = "transitionScreen";
public static final String GAME_OVER_SCREEN = "gameOverScreen";
}
|
[
"willie.wheeler@gmail.com"
] |
willie.wheeler@gmail.com
|
dabbf3a731d3b265ed8047924c2d545ec61dbe19
|
39b7e86a2b5a61a1f7befb47653f63f72e9e4092
|
/src/main/java/com/alipay/api/domain/AlipayUserCustomertagSaveModel.java
|
5e03567042bfe2cbbecb3336d7d629e2ceaa605c
|
[
"Apache-2.0"
] |
permissive
|
slin1972/alipay-sdk-java-all
|
dbec0604c2d0b76d8a1ebf3fd8b64d4dd5d21708
|
63095792e900bbcc0e974fc242d69231ec73689a
|
refs/heads/master
| 2020-08-12T14:18:07.203276
| 2019-10-13T09:00:11
| 2019-10-13T09:00:11
| 214,782,009
| 0
| 0
|
Apache-2.0
| 2019-10-13T07:56:34
| 2019-10-13T07:56:34
| null |
UTF-8
|
Java
| false
| false
| 1,328
|
java
|
package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 保存客户标签
*
* @author auto create
* @since 1.0, 2018-08-29 16:56:13
*/
public class AlipayUserCustomertagSaveModel extends AlipayObject {
private static final long serialVersionUID = 7814369224179969926L;
/**
* 业务场景码。由支付宝产品经理分配,相当于存储标签的使用凭证。
*/
@ApiField("biz_type")
private String bizType;
/**
* 标签名字
*/
@ApiField("tag_name")
private String tagName;
/**
* 标签值,常见为T,F
*/
@ApiField("tag_value")
private String tagValue;
/**
* 支付宝会员uid
*/
@ApiField("user_id")
private String userId;
public String getBizType() {
return this.bizType;
}
public void setBizType(String bizType) {
this.bizType = bizType;
}
public String getTagName() {
return this.tagName;
}
public void setTagName(String tagName) {
this.tagName = tagName;
}
public String getTagValue() {
return this.tagValue;
}
public void setTagValue(String tagValue) {
this.tagValue = tagValue;
}
public String getUserId() {
return this.userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
091ff5094cb1dd010c4f663d350f75c7e60df860
|
c0ac67422f5940e1f3ba7903b70cfd7fec7bcaf7
|
/kafka/kafka-client/wellnr-crawler/src/main/java/wellnr/com/CrawlerApplication.java
|
f2cd1e16ac717eb9141e8fd3f74e9d7d6281bbdf
|
[] |
no_license
|
cokeSchlumpf/k8-spark-kafka-elastic
|
8efa8aec04e660e1ba4d22b50268a5aa4dfa949e
|
b6fc909227fc97f1468f2a6e766fa833abdbc35f
|
refs/heads/master
| 2021-07-17T19:55:37.734289
| 2017-10-24T10:07:13
| 2017-10-24T10:07:13
| 107,643,146
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,222
|
java
|
package wellnr.com;
import io.dropwizard.Application;
import io.dropwizard.setup.Bootstrap;
import io.dropwizard.setup.Environment;
import wellnr.com.health.TemplateHealthCheck;
import wellnr.com.resources.HelloWorldResource;
import wellnr.com.resources.KafkaProduceResource;
public class CrawlerApplication extends Application<CrawlerConfiguration> {
public static void main(final String[] args) throws Exception {
new CrawlerApplication().run(args);
}
@Override
public String getName() {
return "crawler";
}
@Override
public void initialize(final Bootstrap<CrawlerConfiguration> bootstrap) {
// TODO: application initialization
}
@Override
public void run(final CrawlerConfiguration configuration,
final Environment environment) {
environment.healthChecks().register("template", new TemplateHealthCheck(configuration.getTemplate()));
environment.jersey().register(new HelloWorldResource(
configuration.getTemplate(),
configuration.getDefaultName()));
environment.jersey().register(new KafkaProduceResource(
configuration.getKafkaBootstrapServers()));
}
}
|
[
"michael.wellner@de.ibm.com"
] |
michael.wellner@de.ibm.com
|
668ad95f3b61294d3374eaf5627fa667b33cfa0d
|
5f025649b4ba79815f3509ecd5a7ac709a471db8
|
/src/main/java/com/cjburkey/claimchunk/cmds/CmdUnclaimAll.java
|
ae0558dafc25012ae67948dd90aba6d3d643a15b
|
[
"MIT"
] |
permissive
|
GhostRealms/ClaimChunk
|
8d0a705cf7aadffc508010ac674456141cf547c1
|
bb17b1f17bb55b4b0431ad8f6b8de07c37c8fdae
|
refs/heads/master
| 2020-06-25T16:03:04.649032
| 2019-07-28T17:41:33
| 2019-07-28T17:41:33
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,927
|
java
|
package com.cjburkey.claimchunk.cmds;
import com.cjburkey.claimchunk.ClaimChunk;
import com.cjburkey.claimchunk.Config;
import com.cjburkey.claimchunk.Utils;
import com.cjburkey.claimchunk.chunk.ChunkHandler;
import com.cjburkey.claimchunk.chunk.ChunkPos;
import com.cjburkey.claimchunk.cmd.Argument;
import com.cjburkey.claimchunk.cmd.ICommand;
import com.cjburkey.claimchunk.cmd.MainHandler;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class CmdUnclaimAll implements ICommand {
@Override
public String getCommand() {
return "unclaimall";
}
@Override
public String getDescription() {
return "Unclaim all the chunks you own.";
}
@Override
public boolean getShouldDisplayInHelp(CommandSender sender) {
return Utils.hasPerm(sender, true, "unclaim");
}
@Override
public Argument[] getPermittedArguments() {
return new Argument[] {new Argument("acrossAllWorlds", Argument.TabCompletion.BOOLEAN)};
}
@Override
public int getRequiredArguments() {
return 0;
}
@Override
public boolean onCall(String cmdUsed, Player executor, String[] args) {
boolean allWorlds = (args.length == 1 && Boolean.parseBoolean(args[0]));
ChunkHandler chunkHandler = ClaimChunk.getInstance().getChunkHandler();
ChunkPos[] claimedChunks = chunkHandler.getClaimedChunks(executor.getUniqueId());
int unclaimed = 0;
for (ChunkPos chunk : claimedChunks) {
if ((allWorlds || executor.getWorld().getName().equals(chunk.getWorld()))
&& MainHandler.unclaimChunk(false, true, executor, chunk.getWorld(), chunk.getX(), chunk.getZ())) {
unclaimed++;
}
}
Utils.toPlayer(executor, Config.successColor(), Utils.getMsg("unclaimAll").replace("%%CHUNKS%%", unclaimed + ""));
return true;
}
}
|
[
"cjburkey01@gmail.com"
] |
cjburkey01@gmail.com
|
b863bf772292dffe624f23fa87c55575d9d92312
|
9702a51962cda6e1922d671dbec8acf21d9e84ec
|
/src/main/com/topcoder/web/tc/controller/legacy/pacts/common/UserProfileHeaderList.java
|
d7a106045e0b48a1a81ea5e4f3741efe2037d7bc
|
[] |
no_license
|
topcoder-platform/tc-website
|
ccf111d95a4d7e033d3cf2f6dcf19364babb8a08
|
15ab92adf0e60afb1777b3d548b5ba3c3f6c12f7
|
refs/heads/dev
| 2023-08-23T13:41:21.308584
| 2023-04-04T01:28:38
| 2023-04-04T01:28:38
| 83,655,110
| 3
| 19
| null | 2023-04-04T01:32:16
| 2017-03-02T08:43:01
|
Java
|
UTF-8
|
Java
| false
| false
| 2,180
|
java
|
/**
* this is a list of User profile headers. It is just an array that is created
* becase all parsing of result sets should go in specific classes.
*
* DBP 3/20 - Change path to ResultSetContainer - now in com.topcoder.web.common
*
* @author Matt Murphy
* @see UserProfileHeader
*/
package com.topcoder.web.tc.controller.legacy.pacts.common;
import com.topcoder.shared.dataAccess.resultSet.ResultSetContainer;
import com.topcoder.shared.util.logging.Logger;
import java.util.Map;
public class UserProfileHeaderList implements PactsConstants {
private static Logger log = Logger.getLogger(UserProfileHeaderList.class);
protected UserProfileHeader[] headerList = null;
/**
* will parse the result set container looking for several
* rows of UserProfileHeader data. In the event of an error
* the array will of length 0, but will not be null. It expects
* the result set to be set indexed with the USER_PROFILE_HEADER_LIST contsant
*
* @param results the results of a db query
*/
public UserProfileHeaderList(Map results) {
ResultSetContainer rsc = (ResultSetContainer)
results.get(USER_PROFILE_HEADER_LIST);
//make sure we got the user profile headers
if (rsc == null) {
log.error("There were no " + USER_PROFILE_HEADER_LIST + " entries in the" +
" result set map sent to the UserProfileHeaderList\n" +
"constructor.");
headerList = new UserProfileHeader[0];
}
// see if there are any rows of data
int numRows = rsc.getRowCount();
if (numRows <= 0) {
log.debug("there were no rows of data in the result set sent\n" +
"to the UserProfileHeaderList constructor");
headerList = new UserProfileHeader[0];
}
headerList = new UserProfileHeader[numRows];
for (int n = 0; n < numRows; n++) {
log.debug("adding UserProfileHeader " + n);
headerList[n] = new UserProfileHeader(results, n);
}
}
public UserProfileHeader[] getHeaderList() {
return headerList;
}
}
|
[
"amorehead@cb5b18d2-80dd-4a81-9b1c-945e1ee644f9"
] |
amorehead@cb5b18d2-80dd-4a81-9b1c-945e1ee644f9
|
153ecc25c55d3b87c383fde4841375d22b2acc04
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XRENDERING-481-87-4-NSGA_II-WeightedSum:TestLen:CallDiversity/org/xwiki/velocity/internal/DefaultVelocityEngine_ESTest.java
|
165b89067e5ccc00f01c297d6fd3cd2d2fd58abd
|
[] |
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
| 576
|
java
|
/*
* This file was automatically generated by EvoSuite
* Thu Apr 02 09:48:19 UTC 2020
*/
package org.xwiki.velocity.internal;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class DefaultVelocityEngine_ESTest extends DefaultVelocityEngine_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
f0bb9bd576bbd58c7cf9fc7359a57c03f36accdd
|
20eb62855cb3962c2d36fda4377dfd47d82eb777
|
/newEvaluatedBugs/Mockito_17_buggy/mutated/76/ClassImposterizer.java
|
12df089d513c3b5642818cb7c34505f98bd11b80
|
[] |
no_license
|
ozzydong/CapGen
|
356746618848065cce4e253e5d3c381baa85044a
|
0ba0321b6b1191443276021f1997833342f02515
|
refs/heads/master
| 2023-03-18T20:12:02.923428
| 2020-08-21T03:08:28
| 2020-08-21T03:08:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,099
|
java
|
/*
* Copyright (c) 2007 Mockito contributors
* This program is made available under the terms of the MIT License.
*/
package org.mockito.internal.creation.jmock;
import java.lang.reflect.*;
import java.util.List;
import org.mockito.cglib.core.*;
import org.mockito.cglib.proxy.*;
import org.mockito.exceptions.base.MockitoException;
import org.mockito.internal.creation.cglib.MockitoNamingPolicy;
import org.objenesis.ObjenesisStd;
/**
* Thanks to jMock guys for this handy class that wraps all the cglib magic.
*/
public class ClassImposterizer {
public static final ClassImposterizer INSTANCE = new ClassImposterizer();
private ClassImposterizer() {}
//TODO: after 1.8, in order to provide decent exception message when objenesis is not found,
//have a constructor in this class that tries to instantiate ObjenesisStd and if it fails then show decent exception that dependency is missing
//TODO: after 1.8, for the same reason catch and give better feedback when hamcrest core is not found.
private ObjenesisStd objenesis = new ObjenesisStd();
private static final NamingPolicy NAMING_POLICY_THAT_ALLOWS_IMPOSTERISATION_OF_CLASSES_IN_SIGNED_PACKAGES = new MockitoNamingPolicy() {
@Override
public String getClassName(String prefix, String source, Object key, Predicate names) {
return "codegen." + super.getClassName(prefix, source, key, names);
}
};
private static final CallbackFilter IGNORE_BRIDGE_METHODS = new CallbackFilter() {
public int accept(Method method) {
return method.isBridge() ? 1 : 0;
}
};
public boolean canImposterise(Class<?> type) {
return !type.isPrimitive() && !Modifier.isFinal(type.getModifiers());
}
public <T> T imposterise(final MethodInterceptor interceptor, Class<T> mockedType, Class<?>... ancillaryTypes) {
try {
setConstructorsAccessible(mockedType, true);
Class<?> proxyClass = createProxyClass(mockedType, ancillaryTypes);
return mockedType.cast(createProxy(proxyClass, interceptor));
} finally {
setConstructorsAccessible(mockedType, false);
}
}
private void setConstructorsAccessible(Class<?> mockedType, boolean accessible) {
for (Constructor<?> constructor : mockedType.getDeclaredConstructors()) {
constructor.setAccessible(accessible);
}
}
private Class<?> createProxyClass(Class<?> mockedType, Class<?>...interfaces) {
if (mockedType == Object.class) {
mockedType = ClassWithSuperclassToWorkAroundCglibBug.class;
}
Enhancer enhancer = new Enhancer() {
@Override
@SuppressWarnings("unchecked")
protected void filterConstructors(Class sc, List constructors) {
// Don't filter
}
};
enhancer.setClassLoader(SearchingClassLoader.combineLoadersOf(mockedType));
enhancer.setUseFactory(true);
if (mockedType.isInterface()) {
enhancer.setSuperclass(Object.class);
enhancer.setInterfaces(prepend(mockedType, interfaces));
} else {
enhancer.setSuperclass(mockedType);
enhancer.setInterfaces(interfaces);
}
enhancer.setCallbackTypes(new Class[]{MethodInterceptor.class, NoOp.class});
enhancer.setCallbackFilter(IGNORE_BRIDGE_METHODS);
if (mockedType.getSigners() != null) {
enhancer.setNamingPolicy(NAMING_POLICY_THAT_ALLOWS_IMPOSTERISATION_OF_CLASSES_IN_SIGNED_PACKAGES);
} else {
}
try {
return enhancer.createClass();
} catch (CodeGenerationException e) {
if (Modifier.isPrivate(mockedType.getModifiers())) {
throw new MockitoException("\n"
+ "Mockito cannot mock this class: " + mockedType
+ ".\n"
+ "Most likely it is a private class that is not visible by Mockito");
}
throw new MockitoException("\n"
+ "Mockito cannot mock this class: " + mockedType
+ "\n"
+ "Mockito can only mock visible & non-final classes."
+ "\n"
+ "If you're not sure why you're getting this error, please report to the mailing list.", e);
}
}
private Object createProxy(Class<?> proxyClass, final MethodInterceptor interceptor) {
Factory proxy = (Factory) objenesis.newInstance(proxyClass);
proxy.setCallbacks(new Callback[] {interceptor, SerializableNoOp.SERIALIZABLE_INSTANCE });
return proxy;
}
private Class<?>[] prepend(Class<?> first, Class<?>... rest) {
Class<?>[] all = new Class<?>[rest.length+1];
all[0] = first;
System.arraycopy(rest, 0, all, 1, rest.length);
return all;
}
public static class ClassWithSuperclassToWorkAroundCglibBug {}
}
|
[
"justinwm@163.com"
] |
justinwm@163.com
|
229152182e6ed65bef901dd1dee1c55f4895e8f7
|
1b9f89641dcdb4dad766c4eaefac83d2ff9c5d9d
|
/src/.gradle/wrapper/dists/gradle-3.3-all/2pjhuu3pz1dpi6vcvf3301a8j/gradle-3.3/src/diagnostics/org/gradle/api/reporting/components/internal/AbstractBinaryRenderer.java
|
dfdc75066c0638cb8b96c2c398c9d902d4cbefcb
|
[
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0",
"MIT",
"LGPL-2.1-only",
"CPL-1.0"
] |
permissive
|
saurabhhere/sugarizer-apkbuilder
|
b2cbcf21ee3286d0333b8812b02721474e4bf79c
|
fea9a07f5aff668f3a1622145c90f0fa9b17d57c
|
refs/heads/master
| 2023-03-23T19:09:20.300251
| 2021-03-21T10:25:43
| 2021-03-21T10:25:43
| 349,963,558
| 0
| 0
|
Apache-2.0
| 2021-03-21T10:23:51
| 2021-03-21T10:23:50
| null |
UTF-8
|
Java
| false
| false
| 4,600
|
java
|
/*
* Copyright 2014 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.gradle.api.reporting.components.internal;
import com.google.common.collect.Maps;
import org.apache.commons.lang.StringUtils;
import org.gradle.api.tasks.diagnostics.internal.text.TextReportBuilder;
import org.gradle.internal.text.TreeFormatter;
import org.gradle.language.base.LanguageSourceSet;
import org.gradle.model.ModelMap;
import org.gradle.model.internal.manage.schema.ModelProperty;
import org.gradle.model.internal.manage.schema.ModelSchema;
import org.gradle.model.internal.manage.schema.ModelSchemaStore;
import org.gradle.model.internal.manage.schema.StructSchema;
import org.gradle.platform.base.BinarySpec;
import org.gradle.platform.base.internal.BinaryBuildAbility;
import org.gradle.platform.base.internal.BinarySpecInternal;
import org.gradle.platform.base.internal.VariantAspect;
import org.gradle.reporting.ReportRenderer;
import org.gradle.util.GUtil;
import java.util.Map;
// TODO - bust up this hierarchy and compose using interfaces instead
public abstract class AbstractBinaryRenderer<T extends BinarySpec> extends ReportRenderer<BinarySpec, TextReportBuilder> {
private ModelSchemaStore schemaStore;
protected AbstractBinaryRenderer(ModelSchemaStore schemaStore) {
this.schemaStore = schemaStore;
}
@Override
public void render(BinarySpec binary, TextReportBuilder builder) {
String heading = StringUtils.capitalize(binary.getDisplayName());
if (!binary.isBuildable()) {
heading += " (not buildable)";
}
builder.heading(heading);
builder.item("build using task", binary.getBuildTask().getPath());
T specialized = getTargetType().cast(binary);
renderTasks(specialized, builder);
renderVariants(specialized, builder);
renderDetails(specialized, builder);
renderOutputs(specialized, builder);
renderBuildAbility(specialized, builder);
renderOwnedSourceSets(specialized, builder);
}
public abstract Class<T> getTargetType();
protected void renderOutputs(T binary, TextReportBuilder builder) {
}
protected void renderVariants(T binary, TextReportBuilder builder) {
ModelSchema<?> schema = schemaStore.getSchema(((BinarySpecInternal)binary).getPublicType());
if (!(schema instanceof StructSchema)) {
return;
}
Map<String, Object> variants = Maps.newTreeMap();
VariantAspect variantAspect = ((StructSchema<?>) schema).getAspect(VariantAspect.class);
if (variantAspect != null) {
for (ModelProperty<?> property : variantAspect.getDimensions()) {
variants.put(property.getName(), property.getPropertyValue(binary));
}
}
for (Map.Entry<String, Object> variant : variants.entrySet()) {
String variantName = GUtil.toWords(variant.getKey());
builder.item(variantName, RendererUtils.displayValueOf(variant.getValue()));
}
}
protected void renderDetails(T binary, TextReportBuilder builder) {
}
protected void renderTasks(T binary, TextReportBuilder builder) {
}
private void renderBuildAbility(BinarySpec binary, TextReportBuilder builder) {
BinaryBuildAbility buildAbility = ((BinarySpecInternal) binary).getBuildAbility();
if (!buildAbility.isBuildable()) {
TreeFormatter formatter = new TreeFormatter();
buildAbility.explain(formatter);
builder.item(formatter.toString());
}
}
protected void renderOwnedSourceSets(T binary, TextReportBuilder builder) {
if (((BinarySpecInternal) binary).isLegacyBinary()) {
return;
}
ModelMap<LanguageSourceSet> sources = binary.getSources();
if (!sources.isEmpty()) {
SourceSetRenderer sourceSetRenderer = new SourceSetRenderer();
builder.collection("source sets", sources.values(), sourceSetRenderer, "source sets");
}
}
}
|
[
"llaske@c2s.fr"
] |
llaske@c2s.fr
|
ea002021f8e52b51a630a82e9b3486348ada940f
|
129f58086770fc74c171e9c1edfd63b4257210f3
|
/src/testcases/CWE506_Embedded_Malicious_Code/CWE506_Embedded_Malicious_Code__aes_encrypted_payload_05.java
|
e43a454943679e30f9090fcc73b0b02a99c650d5
|
[] |
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
| 7,252
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE506_Embedded_Malicious_Code__aes_encrypted_payload_05.java
Label Definition File: CWE506_Embedded_Malicious_Code.label.xml
Template File: point-flaw-05.tmpl.java
*/
/*
* @description
* CWE: 506 Embedded Malicious Code
* Sinks: aes_encrypted_payload
* GoodSink: Use a plaintext command
* BadSink : Use an AES encrypted payload in an attempt to hide the command
* Flow Variant: 05 Control flow: if(private_t) and if(private_f)
*
* */
package testcases.CWE506_Embedded_Malicious_Code;
import testcasesupport.*;
import java.io.*;
import java.util.logging.Level;
import javax.servlet.http.*;
import javax.crypto.Cipher;
import javax.crypto.KeyGenerator;
import javax.crypto.spec.SecretKeySpec;
public class CWE506_Embedded_Malicious_Code__aes_encrypted_payload_05 extends AbstractTestCase
{
/* The two variables below are not defined as "final", but are never
assigned any other value, so a tool should be able to identify that
reads of these will always return their initialized values. */
private boolean private_t = true;
private boolean private_f = false;
public void bad() throws Throwable
{
if (private_t)
{
/* FLAW: encrytped "calc.exe" */
String payload = "0297b5eb43e3b81f9c737b353c3ade45";
Cipher aes = Cipher.getInstance("AES");
KeyGenerator kg = KeyGenerator.getInstance("AES");
kg.init(128);
/* INCIDENTAL: Hardcoded crypto */
SecretKeySpec keySpec = new SecretKeySpec("ABCDEFGHABCDEFGH".getBytes("UTF-8"), "AES");
aes.init(Cipher.DECRYPT_MODE, keySpec);
/* Convert hex string to byte array without the use of a library
adopted from: http://stackoverflow.com/questions/140131/convert-a-string-representation-of-a-hex-dump-to-a-byte-array-using-java */
int len = payload.length();
byte[] data = new byte[len/2];
for (int i = 0; i < len; i+=2)
{
data[i/2] = (byte)((Character.digit(payload.charAt(i), 16) << 4) + Character.digit(payload.charAt(i+1), 16));
}
String decryptedPayload = new String(aes.doFinal(data), "UTF-8");
try
{
Runtime.getRuntime().exec(decryptedPayload);
}
catch( IOException e )
{
IO.logger.log(Level.WARNING, "Error executing command", e);
}
}
else {
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
/* FIX: plaintext command */
String decodedPayload = "calc.exe";
try
{
Runtime.getRuntime().exec(decodedPayload);
}
catch( IOException e )
{
IO.logger.log(Level.WARNING, "Error executing command", e);
}
}
}
/* good1() changes private_t to private_f */
private void good1() throws Throwable
{
if(private_f)
{
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
/* FLAW: encrytped "calc.exe" */
String payload = "0297b5eb43e3b81f9c737b353c3ade45";
Cipher aes = Cipher.getInstance("AES");
KeyGenerator kg = KeyGenerator.getInstance("AES");
kg.init(128);
/* INCIDENTAL: Hardcoded crypto */
SecretKeySpec keySpec = new SecretKeySpec("ABCDEFGHABCDEFGH".getBytes("UTF-8"), "AES");
aes.init(Cipher.DECRYPT_MODE, keySpec);
/* Convert hex string to byte array without the use of a library
adopted from: http://stackoverflow.com/questions/140131/convert-a-string-representation-of-a-hex-dump-to-a-byte-array-using-java */
int len = payload.length();
byte[] data = new byte[len/2];
for (int i = 0; i < len; i+=2)
{
data[i/2] = (byte)((Character.digit(payload.charAt(i), 16) << 4) + Character.digit(payload.charAt(i+1), 16));
}
String decryptedPayload = new String(aes.doFinal(data), "UTF-8");
try
{
Runtime.getRuntime().exec(decryptedPayload);
}
catch( IOException e )
{
IO.logger.log(Level.WARNING, "Error executing command", e);
}
}
else {
/* FIX: plaintext command */
String decodedPayload = "calc.exe";
try
{
Runtime.getRuntime().exec(decodedPayload);
}
catch( IOException e )
{
IO.logger.log(Level.WARNING, "Error executing command", e);
}
}
}
/* good2() reverses the bodies in the if statement */
private void good2() throws Throwable
{
if(private_t)
{
/* FIX: plaintext command */
String decodedPayload = "calc.exe";
try
{
Runtime.getRuntime().exec(decodedPayload);
}
catch( IOException e )
{
IO.logger.log(Level.WARNING, "Error executing command", e);
}
}
else {
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
/* FLAW: encrytped "calc.exe" */
String payload = "0297b5eb43e3b81f9c737b353c3ade45";
Cipher aes = Cipher.getInstance("AES");
KeyGenerator kg = KeyGenerator.getInstance("AES");
kg.init(128);
/* INCIDENTAL: Hardcoded crypto */
SecretKeySpec keySpec = new SecretKeySpec("ABCDEFGHABCDEFGH".getBytes("UTF-8"), "AES");
aes.init(Cipher.DECRYPT_MODE, keySpec);
/* Convert hex string to byte array without the use of a library
adopted from: http://stackoverflow.com/questions/140131/convert-a-string-representation-of-a-hex-dump-to-a-byte-array-using-java */
int len = payload.length();
byte[] data = new byte[len/2];
for (int i = 0; i < len; i+=2)
{
data[i/2] = (byte)((Character.digit(payload.charAt(i), 16) << 4) + Character.digit(payload.charAt(i+1), 16));
}
String decryptedPayload = new String(aes.doFinal(data), "UTF-8");
try
{
Runtime.getRuntime().exec(decryptedPayload);
}
catch( IOException e )
{
IO.logger.log(Level.WARNING, "Error executing command", e);
}
}
}
public void good() throws Throwable
{
good1();
good2();
}
/* Below is the main(). It is only used when building this testcase on
its own for testing or for building a binary to use in testing binary
analysis tools. It is not used when compiling all the testcases as one
application, which is how source code analysis tools are tested. */
public static void main(String[] args) throws ClassNotFoundException,
InstantiationException, IllegalAccessException
{
mainFromParent(args);
}
}
|
[
"guillermo.pando@gmail.com"
] |
guillermo.pando@gmail.com
|
cf9ecebe3916addd963da755724980b0bc359a1a
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/19/19_e8ac807cb5727713328ac92e5c8c4e06ecee8330/Coop/19_e8ac807cb5727713328ac92e5c8c4e06ecee8330_Coop_s.java
|
35c512e6e60f81d138b3951dc772dd9044939617
|
[] |
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
| 8,133
|
java
|
package com.liato.bankdroid.banks;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.http.NameValuePair;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.message.BasicNameValuePair;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import android.text.Html;
import android.util.Log;
import com.liato.bankdroid.Account;
import com.liato.bankdroid.Bank;
import com.liato.bankdroid.BankException;
import com.liato.bankdroid.Helpers;
import com.liato.bankdroid.LoginException;
import com.liato.bankdroid.R;
import com.liato.bankdroid.Transaction;
import com.liato.urllib.Urllib;
public class Coop extends Bank {
private static final String TAG = "Coop";
private static final String NAME = "Coop";
private static final String NAME_SHORT = "coop";
private static final String URL = "https://www.coop.se/mina-sidor/oversikt/";
private static final int BANKTYPE_ID = Bank.COOP;
private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");
private Pattern reBalanceVisa = Pattern.compile("MedMera\\s*Visa</h3>\\s*<h6>Disponibelt\\s*belopp[^<]*</h6>\\s*<ul>(.*?)</ul>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);
private Pattern reBalanceKonto = Pattern.compile("Aktuellt\\s*saldo:</span>[^>]*>([^<]+)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);
private Pattern reTransactionsKonto = Pattern.compile("<td>(\\d{4}-\\d{2}-\\d{2})</td>\\s*<td>([^<]+)</td>\\s*<td>[^<]*</td>\\s*<td>([^<]*)</td>\\s*<td[^>]*>([^<]+)</td>", Pattern.CASE_INSENSITIVE);
private Pattern reTransactionsVisa = Pattern.compile("<td>(\\d{4}-\\d{2}-\\d{2})</td>\\s*<td>([^<]+)</td>\\s*<td>([^<]*)</td>\\s*<td>([^<]*)</td>\\s*<td.*?</td>\\s*<td><s.*?value=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);
private String response;
public Coop(Context context) {
super(context);
super.TAG = TAG;
super.NAME = NAME;
super.NAME_SHORT = NAME_SHORT;
super.BANKTYPE_ID = BANKTYPE_ID;
super.URL = URL;
}
public Coop(String username, String password, Context context) throws BankException, LoginException {
this(context);
this.update(username, password);
}
@Override
public Urllib login() throws LoginException, BankException {
urlopen = new Urllib();
Matcher matcher;
try {
response = urlopen.open("https://www.coop.se/Mina-sidor/Oversikt/");
matcher = reViewState.matcher(response);
if (!matcher.find()) {
throw new BankException(res.getText(R.string.unable_to_find).toString()+" viewstate.");
}
String strViewState = matcher.group(1);
List <NameValuePair> postData = new ArrayList <NameValuePair>();
postData.add(new BasicNameValuePair("ctl00$ContentPlaceHolderTodo$ContentPlaceHolderMainPageContainer$ContentPlaceHolderMainPageWithNavigationAndGlobalTeaser$ContentPlaceHolderPreContent$RegisterMediumUserForm$TextBoxUserName", username));
postData.add(new BasicNameValuePair("ctl00$ContentPlaceHolderTodo$ContentPlaceHolderMainPageContainer$ContentPlaceHolderMainPageWithNavigationAndGlobalTeaser$ContentPlaceHolderPreContent$RegisterMediumUserForm$TextBoxPassword", password));
postData.add(new BasicNameValuePair("ctl00$ContentPlaceHolderTodo$ContentPlaceHolderMainPageContainer$ContentPlaceHolderMainPageWithNavigationAndGlobalTeaser$ContentPlaceHolderPreContent$RegisterMediumUserForm$ButtonLogin", "Logga in"));
postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));
postData.add(new BasicNameValuePair("__EVENTTARGET", ""));
postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));
response = urlopen.open("https://www.coop.se/Mina-sidor/Oversikt/", postData);
Log.d(TAG, urlopen.getCurrentURI());
if (response.contains("Felmeddelande")) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
if (prefs.getBoolean("debug_mode", false) && prefs.getBoolean("debug_coop_sendmail", false)) {
Intent i = new Intent(android.content.Intent.ACTION_SEND);
i.setType("plain/text");
i.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{"android@x00.us"});
i.putExtra(android.content.Intent.EXTRA_SUBJECT, "Bankdroid - Coop Error");
i.putExtra(android.content.Intent.EXTRA_TEXT, response);
context.startActivity(i);
}
throw new LoginException(res.getText(R.string.invalid_username_password).toString());
}
}
catch (ClientProtocolException e) {
throw new BankException(e.getMessage());
}
catch (IOException e) {
throw new BankException(e.getMessage());
}
return urlopen;
}
@Override
public void update() throws BankException, LoginException {
super.update();
if (username == null || password == null || username.length() == 0 || password.length() == 0) {
throw new LoginException(res.getText(R.string.invalid_username_password).toString());
}
urlopen = login();
Matcher matcher;
try {
Account account;
matcher = reBalanceVisa.matcher(response);
if (matcher.find()) {
account = new Account("MedMera Visa", Helpers.parseBalance(matcher.group(1).trim()), "1");
balance = balance.add(Helpers.parseBalance(matcher.group(1)));
response = urlopen.open("https://www.coop.se/Mina-sidor/Oversikt/Kontoutdrag-MedMera-Visa/");
matcher = reTransactionsVisa.matcher(response);
ArrayList<Transaction> transactions = new ArrayList<Transaction>();
while (matcher.find()) {
String title = matcher.group(4).length() > 0 ? matcher.group(4).trim() + " (" + matcher.group(3).trim() + ")" : matcher.group(2);
transactions.add(new Transaction(matcher.group(1).trim(), Html.fromHtml(title).toString().trim(), Helpers.parseBalance(matcher.group(5))));
}
account.setTransactions(transactions);
accounts.add(account);
}
response = urlopen.open("https://www.coop.se/Mina-sidor/Oversikt/Kontoutdrag-MedMera-Konto/");
matcher = reBalanceKonto.matcher(response);
if (matcher.find()) {
account = new Account("MedMera Konto", Helpers.parseBalance(matcher.group(1).trim()), "2");
balance = balance.add(Helpers.parseBalance(matcher.group(1)));
matcher = reTransactionsKonto.matcher(response);
ArrayList<Transaction> transactions = new ArrayList<Transaction>();
while (matcher.find()) {
String title = matcher.group(4).length() > 0 ? matcher.group(4) : matcher.group(3);
transactions.add(new Transaction(matcher.group(1).trim(), Html.fromHtml(title).toString().trim(), Helpers.parseBalance(matcher.group(4))));
}
account.setTransactions(transactions);
accounts.add(account);
}
if (accounts.isEmpty()) {
throw new BankException(res.getText(R.string.no_accounts_found).toString());
}
}
catch (ClientProtocolException e) {
throw new BankException(e.getMessage());
}
catch (IOException e) {
throw new BankException(e.getMessage());
}
finally {
super.updateComplete();
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
aa3ca37b0398a494b16628a40a081bcd68fa3123
|
b738a4eddf3c822be76176f4eaf1ef6acd65abc1
|
/demo/customer-service/customer-service-2-interface/src/main/java/jmskata/receive/ReceiverMdb.java
|
dd9aed05ccac39e76260456a08c1a64840ec783f
|
[
"Apache-2.0"
] |
permissive
|
t1/message-api
|
6d9c8ab88ca3000d93d1b379d77c0b9addb245c3
|
3f16f92f150f48281030151b3b7e1504b224514e
|
refs/heads/master
| 2022-10-31T18:30:17.434649
| 2022-10-23T09:11:41
| 2022-10-23T09:11:41
| 2,978,404
| 5
| 1
|
Apache-2.0
| 2022-02-01T03:15:48
| 2011-12-14T07:46:47
|
Java
|
UTF-8
|
Java
| false
| false
| 1,169
|
java
|
package jmskata.receive;
import javax.ejb.*;
import javax.inject.Inject;
import javax.jms.*;
@MessageDriven(messageListenerInterface = MessageListener.class, //
activationConfig = { @ActivationConfigProperty(propertyName = "destination", propertyValue = "jmskata.messaging.CustomerService") })
public class ReceiverMdb implements MessageListener {
@Inject
private CustomerServiceImpl customerService;
@Override
public void onMessage(Message inMessage) {
try {
MapMessage msg = (MapMessage) inMessage;
String action = msg.getStringProperty("action");
if ("CREATE".equals(action)) {
String first = msg.getString("first");
String last = msg.getString("last");
customerService.createCustomer(first, last);
} else if ("DELETE".equals(action)) {
String id = msg.getString("id");
customerService.deleteCustomer(id);
} else {
System.out.println("error: unknown action: " + action);
}
} catch (JMSException e) {
throw new RuntimeException(e);
}
}
}
|
[
"snackbox@sinntr.eu"
] |
snackbox@sinntr.eu
|
1fcf45b2a3a722adf68fba9e39dd71bf7cfab851
|
c42abe86bfced3072b3df7a551bce85eaa655353
|
/source/Dagger2demo/mvpdagger2demo01/src/main/java/com/zero/mvpdagger2demo01/ui/login/LoginFragment.java
|
3650b2d973f86be5b10eff30309927e30b5fc3be
|
[] |
no_license
|
fanzhangvip/enjoy01
|
97b36e16c5f8a18aad8cef8a04ddf037a64504b1
|
92f7e70f2b6e00b083d16eb72387665c924adaad
|
refs/heads/master
| 2022-10-26T14:31:28.606166
| 2022-10-18T15:32:13
| 2022-10-18T15:32:13
| 183,878,032
| 2
| 6
| null | 2022-10-05T03:05:11
| 2019-04-28T08:15:08
|
C++
|
UTF-8
|
Java
| false
| false
| 2,701
|
java
|
package com.zero.mvpdagger2demo01.ui.login;
import android.content.Intent;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
import com.jakewharton.rxbinding2.view.RxView;
import com.jakewharton.rxbinding2.widget.RxTextView;
import com.zero.mvpdagger2demo01.R;
import com.zero.mvpdagger2demo01.base.BaseFragment;
import com.zero.mvpdagger2demo01.ui.main.MainActivity;
import java.util.concurrent.TimeUnit;
import butterknife.BindView;
import io.reactivex.Observable;
import io.reactivex.android.schedulers.AndroidSchedulers;
/**
* view层负责界面控件的显示
*/
public class LoginFragment extends BaseFragment<LoginContract.Presenter> implements LoginContract.View {
@BindView(R.id.et_username)
EditText et_username;
@BindView(R.id.et_password)
EditText et_password;
@BindView(R.id.btn_login)
Button btnLogin;
private LoginFragment() {
// Required empty public constructor
}
@Override
protected int layoutId() {
return R.layout.fragment_login;
}
@Override
protected void initData() {
Observable<CharSequence> ObservableName = RxTextView.textChanges(et_username);
Observable<CharSequence> ObservablePassword = RxTextView.textChanges(et_password);
Observable.combineLatest(ObservableName, ObservablePassword
, (phone, password) -> isUsrValid(phone.toString()) && isPasswordValid(password.toString()))
.subscribe(btnLogin::setEnabled);
RxView.clicks(btnLogin)
.throttleFirst(1, TimeUnit.SECONDS)
.subscribeOn(AndroidSchedulers.mainThread())
.subscribe(v -> {
String username = et_username.getText().toString();
String password = et_password.getText().toString();
mPresenter.login(username, password);
});
}
protected static LoginFragment newInstance() {
return new LoginFragment();
}
private static boolean isUsrValid(String usr) {
return usr.length() == 11;
}
private static boolean isPasswordValid(String pwd) {
return pwd.length() >= 6;
}
@Override
public void loginSuccess(LoginContract.Model result) {
if (result.isSucess()) {
startActivity(new Intent(mActivity, MainActivity.class));
} else {
Toast.makeText(mActivity, result.getMsg(), Toast.LENGTH_SHORT).show();
}
}
@Override
public void setPresenter(LoginContract.Presenter presenter) {
if (mPresenter == null) {//P层与V层关联起来
mPresenter = presenter;
}
}
}
|
[
"fan_0723@qq.com"
] |
fan_0723@qq.com
|
baae3d62cbc48140b380048c217d20f153987fd8
|
3af6963d156fc1bf7409771d9b7ed30b5a207dc1
|
/runtime/src/main/java/apple/avfoundation/AVPlayerItemLegibleOutputPushDelegateAdapter.java
|
9ed8d1405e9537b09a75ed816053cbcf3674dc04
|
[
"Apache-2.0"
] |
permissive
|
yava555/j2objc
|
1761d7ffb861b5469cf7049b51f7b73c6d3652e4
|
dba753944b8306b9a5b54728a40ca30bd17bdf63
|
refs/heads/master
| 2020-12-30T23:23:50.723961
| 2015-09-03T06:57:20
| 2015-09-03T06:57:20
| 48,475,187
| 0
| 0
| null | 2015-12-23T07:08:22
| 2015-12-23T07:08:22
| null |
UTF-8
|
Java
| false
| false
| 757
|
java
|
package apple.avfoundation;
import java.io.*;
import java.nio.*;
import java.util.*;
import com.google.j2objc.annotations.*;
import com.google.j2objc.runtime.*;
import com.google.j2objc.runtime.block.*;
import apple.audiotoolbox.*;
import apple.corefoundation.*;
import apple.coregraphics.*;
import apple.coreservices.*;
import apple.foundation.*;
import apple.dispatch.*;
import apple.coreanimation.*;
import apple.coreaudio.*;
import apple.coremedia.*;
import apple.corevideo.*;
import apple.mediatoolbox.*;
/*<javadoc>*/
/*</javadoc>*/
@Adapter
public abstract class AVPlayerItemLegibleOutputPushDelegateAdapter
extends AVPlayerItemOutputPushDelegateAdapter
implements AVPlayerItemLegibleOutputPushDelegate {
}
|
[
"pchen@sellegit.com"
] |
pchen@sellegit.com
|
151dedf5573f8fe6d200cdaeb655e847df0f3238
|
bfeb8214771463eaa8fc9dc76b664f570472c8c2
|
/scenario/json/src/main/java/com/emc/mongoose/scenario/json/Scenario.java
|
84cb1a4f4e4be68e66d760e86e9eeff28716f941
|
[
"MIT"
] |
permissive
|
ivan-abc/mongoose
|
6ac14765f49736daa8faa2cc64c03b362d783508
|
1e8b503cbed8aeb7e95352cb599af912bad38f8d
|
refs/heads/master
| 2020-03-24T21:40:40.794045
| 2018-08-01T21:51:33
| 2018-08-01T21:51:33
| 143,044,623
| 0
| 0
|
MIT
| 2018-07-31T17:16:42
| 2018-07-31T17:16:42
| null |
UTF-8
|
Java
| false
| false
| 192
|
java
|
package com.emc.mongoose.scenario.json;
import com.emc.mongoose.scenario.json.step.CompositeStep;
/**
Created by kurila on 02.02.16.
*/
public interface Scenario
extends CompositeStep {
}
|
[
"andrey.kurilov@emc.com"
] |
andrey.kurilov@emc.com
|
bd2b306f40057ebdf8ceb9cce9aae5524bb8edaa
|
65ce6407650f71b7702e81405bb4b6acf3e6d58f
|
/src/java/jena-core-2.7.0-incubating/src/main/java/com/hp/hpl/jena/ontology/OntologyException.java
|
599927022be6f7063769e742635f6219f15ffe92
|
[
"BSD-3-Clause",
"Apache-2.0"
] |
permissive
|
arjunakula/Visual-Dialogue-System
|
00177cb15fb148a8bb4884946f81201926935627
|
7629301ae28acd6618dd54fd73e40e28584f0c56
|
refs/heads/master
| 2020-05-02T09:14:32.519255
| 2019-03-26T20:56:34
| 2019-03-26T20:56:34
| 177,865,899
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,096
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Package
///////////////
package com.hp.hpl.jena.ontology;
import com.hp.hpl.jena.shared.*;
// Imports
///////////////
/**
* <p>
* Exception for generic errors that arise while processing ontologies
* </p>
*
* @author Ian Dickinson, HP Labs
* (<a href="mailto:ian_dickinson@users.sourceforge.net" >email</a>)
* @version CVS $Id: OntologyException.java,v 1.2 2009-10-06 13:04:34 ian_dickinson Exp $
*/
public class OntologyException
extends JenaException
{
// Constants
//////////////////////////////////
// Static variables
//////////////////////////////////
// Instance variables
//////////////////////////////////
// Constructors
//////////////////////////////////
/**
* Construct an ontology exception with a given message.
*
* @param msg The exception message.
*/
public OntologyException( String msg ) {
super( msg );
}
// External signature methods
//////////////////////////////////
// Internal implementation methods
//////////////////////////////////
//==============================================================================
// Inner class definitions
//==============================================================================
}
|
[
"akula.arjun@gmail.com"
] |
akula.arjun@gmail.com
|
4bf38a85431d2a3db8ba960f7ff58f08e10b86db
|
ef7a0d9a67c98004102e1ef6b563d511a2045033
|
/app/src/main/java/com/sunfusheng/gank/model/GankDayResults.java
|
879ac2179a9083869ea041b454360e5ada304ee7
|
[] |
no_license
|
sunfusheng/Gank.IO
|
44f35f7ef3e3b87f92600c112080684fa0ddfeff
|
8fa27ced01225d245bb59742ed2f98af8097b877
|
refs/heads/master
| 2022-02-11T11:03:22.468355
| 2019-07-19T02:39:07
| 2019-07-19T02:39:07
| 77,142,144
| 12
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 700
|
java
|
package com.sunfusheng.gank.model;
import java.util.List;
/**
* @author by sunfusheng on 2017/1/17.
*/
public class GankDayResults {
public List<GankItemGirl> 福利;
public List<GankItem> Android;
public List<GankItem> iOS;
public List<GankItem> App;
public List<GankItem> 瞎推荐;
public List<GankItem> 休息视频;
@Override
public String toString() {
return "GankDayResults{" +
"福利=" + 福利 +
", Android=" + Android +
", iOS=" + iOS +
", App=" + App +
", 瞎推荐=" + 瞎推荐 +
", 休息视频=" + 休息视频 +
'}';
}
}
|
[
"sfsheng0322@gmail.com"
] |
sfsheng0322@gmail.com
|
4b99f6d902ff8087edfae2bdb5ac17ca3832c208
|
1006d2754c0fd1383efa8247dea71383b43066c4
|
/core/api/src/test/java/io/novaordis/gld/api/jms/ProducerTest.java
|
d388920da4dfa5f4ee9363753cdfb155a6834ecb
|
[
"Apache-2.0"
] |
permissive
|
ovidiuf/gld
|
b1658988cb35a604d8dbd1bf49d9a01822ee52ce
|
1366e9e8149704b71df4db85e29040afa0549f6f
|
refs/heads/master
| 2021-09-04T18:52:11.470159
| 2018-01-21T09:39:51
| 2018-01-21T09:39:51
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,269
|
java
|
/*
* Copyright (c) 2015 Nova Ordis LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* 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 io.novaordis.gld.api.jms;
import io.novaordis.gld.api.jms.embedded.EmbeddedConnection;
import io.novaordis.gld.api.jms.embedded.EmbeddedMessageProducer;
import io.novaordis.gld.api.jms.embedded.EmbeddedQueue;
import io.novaordis.gld.api.jms.embedded.EmbeddedSession;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.jms.Connection;
import javax.jms.MessageProducer;
import javax.jms.Session;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
public class ProducerTest extends JMSEndpointTest {
// Constants -------------------------------------------------------------------------------------------------------
private static final Logger log = LoggerFactory.getLogger(ProducerTest.class);
// Static ----------------------------------------------------------------------------------------------------------
// Attributes ------------------------------------------------------------------------------------------------------
// Constructors ----------------------------------------------------------------------------------------------------
// Public ----------------------------------------------------------------------------------------------------------
@Test
public void close() throws Exception {
EmbeddedConnection connection = new EmbeddedConnection();
EmbeddedSession session = new EmbeddedSession(connection, 0, false, Session.AUTO_ACKNOWLEDGE);
assertFalse(session.isClosed());
EmbeddedQueue queue = new EmbeddedQueue("TEST");
Producer p = getEndpointToTest(queue, session, connection);
p.close();
EmbeddedMessageProducer mp = (EmbeddedMessageProducer)p.getProducer();
assertFalse(session.isClosed());
assertTrue(mp.isClosed());
log.debug(".");
}
// Package protected -----------------------------------------------------------------------------------------------
// Protected -------------------------------------------------------------------------------------------------------
@Override
protected Producer getEndpointToTest(
javax.jms.Destination jmsDestination, Session session, Connection connection) throws Exception {
MessageProducer p = session.createProducer(jmsDestination);
return new Producer(p, session, connection);
}
// Private ---------------------------------------------------------------------------------------------------------
// Inner classes ---------------------------------------------------------------------------------------------------
}
|
[
"ovidiu@novaordis.com"
] |
ovidiu@novaordis.com
|
911ed2b11d6c9c6b57a097ef8433d86d139bbe79
|
55ab3ba5d2a8dbc1c6585d2e5965a2d9763640c4
|
/忍者突袭/Xumyninjarush/src/ninjarush/mainactivity/GameScoreActivity.java
|
124a178d5bc02c0ecd0af55d48c52ea6ca3b612f
|
[] |
no_license
|
xyn3106/Projects
|
e81586b1bb4259739cca0f55e969d52389574e6b
|
4f8589f190e416e0693691ab2827340f82149bd5
|
refs/heads/master
| 2021-01-10T01:20:08.599270
| 2015-10-06T06:12:03
| 2015-10-06T06:12:03
| 43,732,901
| 2
| 1
| null | null | null | null |
GB18030
|
Java
| false
| false
| 4,856
|
java
|
package ninjarush.mainactivity;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import ninarush.dialog.UserScore;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemLongClickListener;
import android.widget.BaseAdapter;
import android.widget.ListView;
import android.widget.TextView;
public class GameScoreActivity extends Activity {
private ListView show;
private ArrayList<UserScore> userScores;
private int mark;
private MyAdapter myAdapter;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.gamescorelistview);
show = (ListView) findViewById(R.id.show_lv);
userScores = new ArrayList<UserScore>();
try {
FileInputStream fis = openFileInput("gamescore");
InputStreamReader isr = new InputStreamReader(fis);
BufferedReader br = new BufferedReader(isr);
String s = null;
while((s = br.readLine()) != null){
String[] temp = s.split(",");
String name = temp[0];
int score = Integer.parseInt(temp[1]);
System.out.println(name+score+"-------------");
userScores.add(new UserScore(name, score));
}
br.close();
fis.close();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
System.out.println(userScores.size()+"---------");
Collections.sort(userScores, new MyComparator());
for(int i = 0; i<userScores.size();i++){
System.out.println(userScores.get(i).getName()+"===="+userScores.get(i).getScroe());
}
myAdapter = new MyAdapter(this,userScores);
show.setAdapter(myAdapter);
show.setOnItemLongClickListener(new OnItemLongClickListener() {
public boolean onItemLongClick(AdapterView<?> parent, View view,
int position, long id) {
GameScoreActivity.this.mark = position;
new AlertDialog.Builder(GameScoreActivity.this)
.setMessage("\t\t\t\t删除记录")
.setNegativeButton("取消", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
}
})
.setPositiveButton("确定", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
userScores.remove(GameScoreActivity.this.mark);
StringBuffer sb = new StringBuffer();
for(int i = 0;i<userScores.size();i++){
sb.append(userScores.get(i).toString());
}
String s = sb.toString();
try {
FileOutputStream fos;
fos = GameScoreActivity.this.openFileOutput("gamescore", Context.MODE_PRIVATE);
fos.write(s.getBytes());
fos.close();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
GameScoreActivity.this.myAdapter.notifyDataSetChanged();
}
})
.create()
.show();
return false;
}
});
}
}
class MyComparator implements Comparator<UserScore>{
public int compare(UserScore lhs, UserScore rhs) {
return rhs.getScroe() - lhs.getScroe();
}
}
class MyAdapter extends BaseAdapter{
private Context context;
private ArrayList<UserScore> userScores;
public MyAdapter(Context context,ArrayList<UserScore> userScores){
this.context = context;
this.userScores = userScores;
}
public int getCount() {
return userScores.size();
}
public Object getItem(int position) {
// TODO Auto-generated method stub
return userScores.get(position);
}
public long getItemId(int position) {
// TODO Auto-generated method stub
return position;
}
public View getView(int position, View convertView, ViewGroup parent) {
View view = LayoutInflater.from(context).inflate(R.layout.listview_item_gamescore, null);
TextView name = (TextView) view.findViewById(R.id.name_item_lv_gamescore);
TextView score = (TextView) view.findViewById(R.id.score_item_lv_gamescore);
name.setText("姓名: "+userScores.get(position).getName());
score.setText("成绩: "+userScores.get(position).getScroe());
return view;
}
}
|
[
"wy_ljl@163.com"
] |
wy_ljl@163.com
|
11cb3928e48e2af89ebb5a727d8aafbbb81f7a61
|
a94d20a6346d219c84cc97c9f7913f1ce6aba0f8
|
/saksbehandling/behandlingslager/domene/src/main/java/no/nav/foreldrepenger/behandlingslager/aktør/historikk/PersonstatusPeriode.java
|
334d1ed18109fd7de478c2789da0ada93b028783
|
[
"MIT"
] |
permissive
|
junnae/spsak
|
3c8a155a1bf24c30aec1f2a3470289538c9de086
|
ede4770de33bd896d62225a9617b713878d1efa5
|
refs/heads/master
| 2020-09-11T01:56:53.748986
| 2019-02-06T08:14:42
| 2019-02-06T08:14:42
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,370
|
java
|
package no.nav.foreldrepenger.behandlingslager.aktør.historikk;
import java.util.Objects;
import no.nav.foreldrepenger.behandlingslager.aktør.PersonstatusType;
public class PersonstatusPeriode {
private Gyldighetsperiode gyldighetsperiode;
private PersonstatusType personstatus;
public PersonstatusPeriode(Gyldighetsperiode gyldighetsperiode, PersonstatusType personstatus) {
this.gyldighetsperiode = gyldighetsperiode;
this.personstatus = personstatus;
}
public Gyldighetsperiode getGyldighetsperiode() {
return this.gyldighetsperiode;
}
public PersonstatusType getPersonstatus() {
return this.personstatus;
}
@Override
public String toString() {
return "PersonstatusPeriode(gyldighetsperiode=" + this.getGyldighetsperiode()
+ ", personstatus=" + this.getPersonstatus()
+ ")";
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
PersonstatusPeriode that = (PersonstatusPeriode) o;
return Objects.equals(gyldighetsperiode, that.gyldighetsperiode) &&
Objects.equals(personstatus, that.personstatus);
}
@Override
public int hashCode() {
return Objects.hash(gyldighetsperiode, personstatus);
}
}
|
[
"roy.andre.gundersen@nav.no"
] |
roy.andre.gundersen@nav.no
|
19f6dd1d939efef2a36c48b75714eaa26a91c42b
|
c914af9235374ede137c33c9a3e2c1dd514e9d2d
|
/src/main/java/kr/nzzi/msa/pmg/pomangamapimonilith/global/util/choseong/InitialConsonant.java
|
17525b8b1f6e6efd3eec502ba7c5df055760dd9c
|
[] |
no_license
|
cholnh/pomangam-api-monolith
|
0e83f64ed39edbf712150bd62c7a348dcb87ac38
|
bcbf045584068e0f03f69eab1e92d3b2e5771a29
|
refs/heads/master
| 2023-06-24T16:11:12.544604
| 2021-08-03T03:01:11
| 2021-08-03T03:01:11
| 390,221,364
| 0
| 0
| null | 2021-08-03T03:01:12
| 2021-07-28T05:09:15
|
Java
|
UTF-8
|
Java
| false
| false
| 3,189
|
java
|
package kr.nzzi.msa.pmg.pomangamapimonilith.global.util.choseong;
public class InitialConsonant {
final static String[] chs = {
"ㄱ", "ㄲ", "ㄴ", "ㄷ", "ㄸ",
"ㄹ", "ㅁ", "ㅂ", "ㅃ", "ㅅ",
"ㅆ", "ㅇ", "ㅈ", "ㅉ", "ㅊ",
"ㅋ", "ㅌ", "ㅍ", "ㅎ"
};
public static boolean isInitialConsonants(String fullStr) {
fullStr = fullStr.replaceAll("\\p{Z}", "");
for (int i=0; i<fullStr.length(); i++) {
char chName = fullStr.charAt(i);
boolean tf = false;
for(String s : chs) {
if(s.charAt(0) == chName) {
tf = true;
break;
}
}
if(tf == false) {
return false;
}
}
return true;
}
public static String getInitial(String fullStr) {
String resultStr="";
for (int i=0; i<fullStr.length(); i++) {
char chName = fullStr.charAt(i);
if(chName >= 0xAC00) {
int uniVal = chName - 0xAC00;
int cho = ((uniVal - (uniVal % 28))/28)/21;
resultStr += chs[cho];
} else {
resultStr += chName;
}
}
return resultStr.replaceAll("\\p{Z}", "");
}
/*
public static String getInitial(String fullStr){
String resultStr="";
for (int i=0; i<fullStr.length(); i++) {
char comVal = (char) (fullStr.charAt(i)-0xAC00);
if (comVal >= 0 && comVal <= 11172){
// 한글일경우
// 초성만 입력 했을 시엔 초성은 무시해서 List에 추가
char uniVal = (char)comVal;
// 유니코드 표에 맞추어 초성 중성 종성을 분리
char cho = (char) ((((uniVal - (uniVal % 28)) / 28) / 21) + 0x1100);
//char jung = (char) ((((uniVal - (uniVal % 28)) / 28) % 21) + 0x1161);
//char jong = (char) ((uniVal % 28) + 0x11a7);
if(cho!=4519){
//System.out.print(cho+" ");
resultStr =resultStr + (cho);
}
if(jung!=4519){
//System.out.print(jung+" ");
}
if(jong!=4519){
//System.out.print(jong+" ");
}
} else {
// 한글이 아닐경우
comVal = (char) (comVal+0xAC00);
resultStr =resultStr + comVal;
}
}
return resultStr.replaceAll("\\p{Z}", "");
}
*/
public static void main(String[] args) {
System.out.println(isInitialConsonants(" ㄱsdf"));
System.out.println(isInitialConsonants(" ㄱ간가나요!!"));
System.out.println(isInitialConsonants(" ㄱ ㄴㅇㄹㄴㅇㄹ 2"));
System.out.println(isInitialConsonants(" ㄱㄱ ㅁㄴㅇ ㅏ"));
System.out.println(isInitialConsonants(" ㄱ"));
}
}
|
[
"cholnh1@naver.com"
] |
cholnh1@naver.com
|
52c3a3e1a0b82fd245307d4cf95dd43b53649def
|
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
|
/com.tencent.mm/classes.jar/com/tencent/mapsdk/internal/jr$1.java
|
c7da2d52575262237dcc0ea76017b6ff46263e2c
|
[] |
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
| 242
|
java
|
package com.tencent.mapsdk.internal;
final class jr$1 {}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes.jar
* Qualified Name: com.tencent.mapsdk.internal.jr.1
* JD-Core Version: 0.7.0.1
*/
|
[
"98632993+tsuzcx@users.noreply.github.com"
] |
98632993+tsuzcx@users.noreply.github.com
|
44129c3ad8994be13dfaeeba6c89424686d2af13
|
6a95484a8989e92db07325c7acd77868cb0ac3bc
|
/modules/dfp_axis/src/main/java/com/google/api/ads/dfp/axis/v201403/LineItemCreativeAssociationStatus.java
|
a3f14af779d0587f585c966d378b0c87912ac749
|
[
"Apache-2.0"
] |
permissive
|
popovsh6/googleads-java-lib
|
776687dd86db0ce785b9d56555fe83571db9570a
|
d3cabb6fb0621c2920e3725a95622ea934117daf
|
refs/heads/master
| 2020-04-05T23:21:57.987610
| 2015-03-12T19:59:29
| 2015-03-12T19:59:29
| 33,672,406
| 1
| 0
| null | 2015-04-09T14:06:00
| 2015-04-09T14:06:00
| null |
UTF-8
|
Java
| false
| false
| 3,352
|
java
|
/**
* LineItemCreativeAssociationStatus.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.4 Mar 02, 2009 (07:08:06 PST) WSDL2Java emitter.
*/
package com.google.api.ads.dfp.axis.v201403;
public class LineItemCreativeAssociationStatus implements java.io.Serializable {
private java.lang.String _value_;
private static java.util.HashMap _table_ = new java.util.HashMap();
// Constructor
protected LineItemCreativeAssociationStatus(java.lang.String value) {
_value_ = value;
_table_.put(_value_,this);
}
public static final java.lang.String _ACTIVE = "ACTIVE";
public static final java.lang.String _NOT_SERVING = "NOT_SERVING";
public static final java.lang.String _INACTIVE = "INACTIVE";
public static final java.lang.String _DELETED = "DELETED";
public static final LineItemCreativeAssociationStatus ACTIVE = new LineItemCreativeAssociationStatus(_ACTIVE);
public static final LineItemCreativeAssociationStatus NOT_SERVING = new LineItemCreativeAssociationStatus(_NOT_SERVING);
public static final LineItemCreativeAssociationStatus INACTIVE = new LineItemCreativeAssociationStatus(_INACTIVE);
public static final LineItemCreativeAssociationStatus DELETED = new LineItemCreativeAssociationStatus(_DELETED);
public java.lang.String getValue() { return _value_;}
public static LineItemCreativeAssociationStatus fromValue(java.lang.String value)
throws java.lang.IllegalArgumentException {
LineItemCreativeAssociationStatus enumeration = (LineItemCreativeAssociationStatus)
_table_.get(value);
if (enumeration==null) throw new java.lang.IllegalArgumentException();
return enumeration;
}
public static LineItemCreativeAssociationStatus fromString(java.lang.String value)
throws java.lang.IllegalArgumentException {
return fromValue(value);
}
public boolean equals(java.lang.Object obj) {return (obj == this);}
public int hashCode() { return toString().hashCode();}
public java.lang.String toString() { return _value_;}
public java.lang.Object readResolve() throws java.io.ObjectStreamException { return fromValue(_value_);}
public static org.apache.axis.encoding.Serializer getSerializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.EnumSerializer(
_javaType, _xmlType);
}
public static org.apache.axis.encoding.Deserializer getDeserializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.EnumDeserializer(
_javaType, _xmlType);
}
// Type metadata
private static org.apache.axis.description.TypeDesc typeDesc =
new org.apache.axis.description.TypeDesc(LineItemCreativeAssociationStatus.class);
static {
typeDesc.setXmlType(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201403", "LineItemCreativeAssociation.Status"));
}
/**
* Return type metadata object
*/
public static org.apache.axis.description.TypeDesc getTypeDesc() {
return typeDesc;
}
}
|
[
"jradcliff@google.com"
] |
jradcliff@google.com
|
713d4ec3b9cab9f2d4cbc883e0ffe9b007d94b21
|
c4671723fb5195560f14c14f3b692b96acf0d73f
|
/kinth-frame-service/src/com/kinth/service/weixin/imgmsg/ImgmsgService.java
|
ae293dc45a3d98a40127009cef6af0cba701ba06
|
[] |
no_license
|
espandy/frame-work-20160429
|
d75c341656bcdc3a5d85ce14c781c54b5c2f3ac7
|
8463f6430356c1c63ca6c88cf5bae12ab8ae7695
|
refs/heads/master
| 2020-12-03T09:23:12.271398
| 2016-05-06T06:27:12
| 2016-05-06T06:27:12
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,013
|
java
|
package com.kinth.service.weixin.imgmsg;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.kinth.base.dao.DaoSupport;
import com.kinth.base.entity.Page;
import com.kinth.util.PageData;
/**
* 类名称:ImgmsgService
*/
@Service("imgmsgService")
public class ImgmsgService {
@Resource(name = "daoSupport")
private DaoSupport dao;
/**新增
* @param pd
* @throws Exception
*/
public void save(PageData pd)throws Exception{
dao.save("ImgmsgMapper.save", pd);
}
/**删除
* @param pd
* @throws Exception
*/
public void delete(PageData pd)throws Exception{
dao.delete("ImgmsgMapper.delete", pd);
}
/**修改
* @param pd
* @throws Exception
*/
public void edit(PageData pd)throws Exception{
dao.update("ImgmsgMapper.edit", pd);
}
/**列表
* @param page
* @return
* @throws Exception
*/
@SuppressWarnings("unchecked")
public List<PageData> list(Page page)throws Exception{
return (List<PageData>)dao.findForList("ImgmsgMapper.datalistPage", page);
}
/**列表(全部)
* @param pd
* @return
* @throws Exception
*/
@SuppressWarnings("unchecked")
public List<PageData> listAll(PageData pd)throws Exception{
return (List<PageData>)dao.findForList("ImgmsgMapper.listAll", pd);
}
/**通过id获取数据
* @param pd
* @return
* @throws Exception
*/
public PageData findById(PageData pd)throws Exception{
return (PageData)dao.findForObject("ImgmsgMapper.findById", pd);
}
/**批量删除
* @param ArrayDATA_IDS
* @throws Exception
*/
public void deleteAll(String[] ArrayDATA_IDS)throws Exception{
dao.delete("ImgmsgMapper.deleteAll", ArrayDATA_IDS);
}
/**匹配关键词
* @param pd
* @return
* @throws Exception
*/
public PageData findByKw(PageData pd)throws Exception{
return (PageData)dao.findForObject("ImgmsgMapper.findByKw", pd);
}
}
|
[
"313388925@qq.com"
] |
313388925@qq.com
|
8fa282c220171499c3b8dfd2de23dae0bd04be85
|
78151b98a6526508c49de18d4d8b1d42be22fdd7
|
/plugins/e-httpGetFiles/src/main/java/com/linkedpipes/plugin/extractor/httpgetfiles/HttpGetFilesConfiguration.java
|
9313618d94b6b7f7affc89b41879623b4e3884e7
|
[
"MIT"
] |
permissive
|
mdkmisc/etl
|
b784b5f4d768d82ba030e193904bc288b7516c6f
|
44e5d945a08a6168c60ac0db76c545830d7bf4e1
|
refs/heads/master
| 2021-06-09T22:52:44.548766
| 2017-01-05T16:48:26
| 2017-01-05T16:48:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,595
|
java
|
package com.linkedpipes.plugin.extractor.httpgetfiles;
import com.linkedpipes.etl.component.api.service.RdfToPojo;
import java.util.LinkedList;
import java.util.List;
/**
*
* @author Škoda Petr
*/
@RdfToPojo.Type(uri = HttpGetFilesVocabulary.CONFIG)
public class HttpGetFilesConfiguration {
@RdfToPojo.Type(uri = HttpGetFilesVocabulary.HEADER)
public static class Header {
@RdfToPojo.Property(uri = HttpGetFilesVocabulary.HAS_KEY)
private String key;
@RdfToPojo.Property(uri = HttpGetFilesVocabulary.HAS_VALUE)
private String value;
public Header() {
}
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}
@RdfToPojo.Type(uri = HttpGetFilesVocabulary.REFERENCE)
public static class Reference {
@RdfToPojo.Property(uri = HttpGetFilesVocabulary.HAS_URI)
private String uri;
@RdfToPojo.Property(uri = HttpGetFilesVocabulary.HAS_NAME)
private String fileName;
@RdfToPojo.Property(uri = HttpGetFilesVocabulary.HAS_HEADER)
private List<Header> headers = new LinkedList<>();
public Reference() {
}
public String getUri() {
return uri;
}
public void setUri(String uri) {
this.uri = uri;
}
public String getFileName() {
return fileName;
}
public void setFileName(String fileName) {
this.fileName = fileName;
}
public List<Header> getHeaders() {
return headers;
}
public void setHeaders(
List<Header> headers) {
this.headers = headers;
}
}
@RdfToPojo.Property(uri = HttpGetFilesVocabulary.HAS_REFERENCE)
private List<Reference> references = new LinkedList<>();
/**
* Force custom redirect. The Java follow only redirect in scope of
* a protocol. So specially it does not allow redirect from http
* to https - see
* http://bugs.java.com/bugdatabase/view_bug.do?bug_id=4620571 .
*
* If true DPU follow redirect to any location and protocol.
*/
@RdfToPojo.Property(uri = HttpGetFilesVocabulary.HAS_FOLLOW_REDIRECT)
private boolean forceFollowRedirect = true;
/**
* If true skip file in case of an error.
*/
@RdfToPojo.Property(uri = HttpGetFilesVocabulary.SKIP_ON_ERROR)
private boolean skipOnError = false;
@RdfToPojo.Property(uri = HttpGetFilesVocabulary.HAS_HEADER)
private List<Header> headers = new LinkedList<>();
public HttpGetFilesConfiguration() {
}
public List<Reference> getReferences() {
return references;
}
public void setReferences(List<Reference> references) {
this.references = references;
}
public boolean isForceFollowRedirect() {
return forceFollowRedirect;
}
public void setForceFollowRedirect(boolean forceFollowRedirect) {
this.forceFollowRedirect = forceFollowRedirect;
}
public boolean isSkipOnError() {
return skipOnError;
}
public void setSkipOnError(boolean skipOnError) {
this.skipOnError = skipOnError;
}
public List<Header> getHeaders() {
return headers;
}
public void setHeaders(
List<Header> headers) {
this.headers = headers;
}
}
|
[
"skodapetr@gmail.com"
] |
skodapetr@gmail.com
|
0f2d05ffb4bedf55d6196ddf3f9ba8cb47986cce
|
a73f1351063a9f06360e39552d47e15d0cf1a092
|
/ch08/src/sec06_01/Example.java
|
d83e3b9bc80b1439e3e44d09e66ffb9cb36db1bf
|
[] |
no_license
|
jonghwankwon/Java-Lecture
|
37d6ad91145cb963592af2ad66935da2c899a3e2
|
cca81332911ac11abfdf9cefaa9908592e15047b
|
refs/heads/master
| 2020-04-28T19:51:19.073957
| 2019-04-15T12:52:02
| 2019-04-15T12:52:02
| 175,524,476
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 343
|
java
|
package sec06_01;
public class Example {
public static void main(String[] args) {
IpmlementationC impl= new IpmlementationC();
InterfaceA ia = impl;
ia.methodA();
System.out.println();
InterfaceB ib = impl;
ib.methodB();
System.out.println();
InterfaceC ic = impl;
ic.methodA();
ic.methodB();
ic.methodC();
}
}
|
[
"whdghks1048@naver.com"
] |
whdghks1048@naver.com
|
f060a567f3a15a3d9d169e6261613f2a900c4d06
|
bfe4cc4bb945ab7040652495fbf1e397ae1b72f7
|
/sandbox-apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/ZoneClientLiveTest.java
|
cb830010bb62e366acf7751a3647cf55dbe6b8ec
|
[
"Apache-2.0"
] |
permissive
|
dllllb/jclouds
|
348d8bebb347a95aa4c1325590c299be69804c7d
|
fec28774da709e2189ba563fc3e845741acea497
|
refs/heads/master
| 2020-12-25T11:42:31.362453
| 2011-07-30T22:32:07
| 2011-07-30T22:32:07
| 1,571,863
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,842
|
java
|
/**
*
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
*
* ====================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ====================================================================
*/
package org.jclouds.cloudstack.features;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertTrue;
import java.util.Set;
import org.jclouds.cloudstack.domain.NetworkType;
import org.jclouds.cloudstack.domain.Zone;
import org.jclouds.cloudstack.options.ListZonesOptions;
import org.testng.annotations.Test;
import com.google.common.collect.Iterables;
/**
* Tests behavior of {@code ZoneClientLiveTest}
*
* @author Adrian Cole
*/
@Test(groups = "live", singleThreaded = true, testName = "ZoneClientLiveTest")
public class ZoneClientLiveTest extends BaseCloudStackClientLiveTest {
public void testListZones() throws Exception {
Set<Zone> response = client.getZoneClient().listZones();
assert null != response;
long zoneCount = response.size();
assertTrue(zoneCount >= 0);
for (Zone zone : response) {
Zone newDetails = Iterables.getOnlyElement(client.getZoneClient().listZones(
ListZonesOptions.Builder.id(zone.getId())));
assertEquals(zone, newDetails);
assertEquals(zone, client.getZoneClient().getZone(zone.getId()));
assert zone.getId() > 0 : zone;
assert zone.getName() != null : zone;
assert zone.getNetworkType() != null && zone.getNetworkType() != NetworkType.UNRECOGNIZED : zone;
switch (zone.getNetworkType()) {
case ADVANCED:
// TODO
// assert zone.getVLAN() != null : zone;
// assert zone.getDomain() == null : zone;
// assert zone.getDomainId() == null : zone;
// assert zone.getGuestCIDRAddress() != null : zone;
break;
case BASIC:
assert zone.getVLAN() == null : zone;
assert zone.getDNS().size() == 0 : zone;
assert zone.getInternalDNS().size() == 0 : zone;
assert zone.getDomain() == null : zone;
assert zone.getDomainId() <= 0 : zone;
assert zone.getGuestCIDRAddress() == null : zone;
break;
}
}
}
}
|
[
"adrian@jclouds.org"
] |
adrian@jclouds.org
|
c18367e27e263a703cd28e1379eae1a287703a3e
|
f577a4716ac8df5841a5ecf8b49318c90e1deff9
|
/app/src/main/java/com/app/market_street/share/App.java
|
c0091958a9e546d25aaab27ceaba34cf51c58d68
|
[] |
no_license
|
MotawroonProjects/MarketStreet
|
181b96738b52cd9aeba9b11ae502f778d11c27e3
|
b7706ab4a214eab3890056b7393968224b6dc10f
|
refs/heads/master
| 2023-05-26T12:46:01.096067
| 2021-06-13T08:45:01
| 2021-06-13T08:45:01
| 374,590,367
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 738
|
java
|
package com.app.market_street.share;
import android.content.Context;
import androidx.multidex.MultiDexApplication;
import com.app.market_street.language.Language;
public class App extends MultiDexApplication {
@Override
protected void attachBaseContext(Context newBase) {
super.attachBaseContext(Language.updateResources(newBase,"ar"));
}
@Override
public void onCreate() {
super.onCreate();
TypefaceUtil.setDefaultFont(this, "DEFAULT", "fonts/font.ttf");
TypefaceUtil.setDefaultFont(this, "MONOSPACE", "fonts/font.ttf");
TypefaceUtil.setDefaultFont(this, "SERIF", "fonts/font.ttf");
TypefaceUtil.setDefaultFont(this, "SANS_SERIF", "fonts/font.ttf");
}
}
|
[
"emadmagdy.developer@gmail.com"
] |
emadmagdy.developer@gmail.com
|
9e871db20381605c4459fcc624c6b957bf17a882
|
960ac60f9e50a893816fb8c601cd86a292a613fc
|
/simpleapp/src/main/java/com/mogsev/simpleapp/fragment/FirstFragment.java
|
f0347842b9ed82f020c9962a0ef75706a81d3cdb
|
[] |
no_license
|
mogsev/GitHubInfo
|
c72415949f85528f90f6448fd8dd61220e1d1398
|
3c38fe4b20b751b0fa4adee0cc1733b153c692cb
|
refs/heads/master
| 2021-01-19T22:46:35.036433
| 2017-05-15T15:12:12
| 2017-05-15T15:12:12
| 88,856,943
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,979
|
java
|
package com.mogsev.simpleapp.fragment;
import android.databinding.BaseObservable;
import android.databinding.DataBindingUtil;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.mogsev.simpleapp.MainActivity;
import com.mogsev.simpleapp.R;
import com.mogsev.simpleapp.databinding.FragmentFirstBinding;
import com.mogsev.simpleapp.viewmodel.ProfileViewModel;
import com.mogsev.simpleapp.viewmodel.ResultViewModel;
public class FirstFragment extends Fragment implements MainActivity.DataBindingContract {
private static final String TAG = FirstFragment.class.getSimpleName();
private static FirstFragment sInstance;
private FragmentFirstBinding mBinding;
private ResultViewModel mResult;
private ProfileViewModel mProfile;
public FirstFragment() {
}
public static FirstFragment newInstance() {
if (sInstance == null) {
sInstance = new FirstFragment();
}
return sInstance;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Log.i(TAG, "onCreate");
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
mBinding = DataBindingUtil.inflate(inflater, R.layout.fragment_first, container, false);
View view = mBinding.getRoot();
return view;
}
@Override
public void setViewModel(BaseObservable viewModel) {
Log.i(TAG, "setViewModel");
if (viewModel instanceof ResultViewModel) {
mResult = (ResultViewModel) viewModel;
mBinding.setResult(mResult);
return;
}
if (viewModel instanceof ProfileViewModel) {
mProfile = (ProfileViewModel) viewModel;
mBinding.setProfile(mProfile);
}
}
}
|
[
"mogsev@gmail.com"
] |
mogsev@gmail.com
|
bd5bdeb063b7a23807b398dc8bcd253193ed8dc3
|
64b47f83d313af33804b946d0613760b8ff23840
|
/tags/before_copyright_fixes/weka/gui/beans/GraphViewer.java
|
66e6bffa0b1cabd3d7877c2ca978e57c78c386d5
|
[] |
no_license
|
hackerastra/weka
|
afde1c7ab0fbf374e6d6ac6d07220bfaffb9488c
|
c8366c454e9718d0e1634ddf4a72319dac3ce559
|
refs/heads/master
| 2021-05-28T08:25:33.811203
| 2015-01-22T03:12:18
| 2015-01-22T03:12:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,253
|
java
|
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*
* GraphViewer.java
* Copyright (C) 2002 Mark Hall
*
*/
package weka.gui.beans;
import weka.core.Drawable;
import weka.core.FastVector;
import weka.gui.ResultHistoryPanel;
import weka.gui.graphvisualizer.BIFFormatException;
import weka.gui.graphvisualizer.GraphVisualizer;
import weka.gui.treevisualizer.PlaceNode2;
import weka.gui.treevisualizer.TreeVisualizer;
import java.awt.BorderLayout;
import java.awt.event.MouseEvent;
import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Enumeration;
import java.util.Vector;
import javax.swing.BorderFactory;
import javax.swing.JFrame;
import javax.swing.JPanel;
/**
* A bean encapsulating weka.gui.treevisualize.TreeVisualizer
*
* @author <a href="mailto:mhall@cs.waikato.ac.nz">Mark Hall</a>
* @version $Revision: 1.7 $
*/
public class GraphViewer
extends JPanel
implements Visible, GraphListener,
UserRequestAcceptor, Serializable {
/** for serialization */
private static final long serialVersionUID = -5183121972114900617L;
protected BeanVisual m_visual =
new BeanVisual("GraphViewer",
BeanVisual.ICON_PATH+"DefaultGraph.gif",
BeanVisual.ICON_PATH+"DefaultGraph_animated.gif");
private transient JFrame m_resultsFrame = null;
protected transient ResultHistoryPanel m_history =
new ResultHistoryPanel(null);
public GraphViewer() {
setUpResultHistory();
setLayout(new BorderLayout());
add(m_visual, BorderLayout.CENTER);
}
/**
* Global info for this bean
*
* @return a <code>String</code> value
*/
public String globalInfo() {
return "Graphically visualize trees or graphs produced by classifiers/clusterers.";
}
private void setUpResultHistory() {
if (m_history == null) {
m_history = new ResultHistoryPanel(null);
}
m_history.setBorder(BorderFactory.createTitledBorder("Graph list"));
m_history.setHandleRightClicks(false);
m_history.getList().
addMouseListener(new ResultHistoryPanel.RMouseAdapter() {
/** for serialization */
private static final long serialVersionUID = -4984130887963944249L;
public void mouseClicked(MouseEvent e) {
int index = m_history.getList().locationToIndex(e.getPoint());
if (index != -1) {
String name = m_history.getNameAtIndex(index);
doPopup(name);
}
}
});
}
/**
* Accept a graph
*
* @param e a <code>GraphEvent</code> value
*/
public synchronized void acceptGraph(GraphEvent e) {
FastVector graphInfo = new FastVector();
if (m_history == null) {
setUpResultHistory();
}
String name = (new SimpleDateFormat("HH:mm:ss - ")).format(new Date());
name += e.getGraphTitle();
graphInfo.addElement(new Integer(e.getGraphType()));
graphInfo.addElement(e.getGraphString());
m_history.addResult(name, new StringBuffer());
m_history.addObject(name, graphInfo);
}
/**
* Set the visual appearance of this bean
*
* @param newVisual a <code>BeanVisual</code> value
*/
public void setVisual(BeanVisual newVisual) {
m_visual = newVisual;
}
/**
* Get the visual appearance of this bean
*
*/
public BeanVisual getVisual() {
return m_visual;
}
/**
* Use the default visual appearance
*
*/
public void useDefaultVisual() {
m_visual.loadIcons(BeanVisual.ICON_PATH+"DefaultGraph.gif",
BeanVisual.ICON_PATH+"DefaultGraph_animated.gif");
}
/**
* Popup a result list from which the user can select a graph to view
*
*/
public void showResults() {
if (m_resultsFrame == null) {
if (m_history == null) {
setUpResultHistory();
}
m_resultsFrame = new JFrame("Graph Viewer");
m_resultsFrame.getContentPane().setLayout(new BorderLayout());
m_resultsFrame.getContentPane().add(m_history, BorderLayout.CENTER);
m_resultsFrame.addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosing(java.awt.event.WindowEvent e) {
m_resultsFrame.dispose();
m_resultsFrame = null;
}
});
m_resultsFrame.pack();
m_resultsFrame.setVisible(true);
} else {
m_resultsFrame.toFront();
}
}
private void doPopup(String name) {
FastVector graph;
String grphString;
int grphType;
graph = (FastVector)m_history.getNamedObject(name);
grphType = ((Integer)graph.firstElement()).intValue();
grphString = (String)graph.lastElement();
if(grphType == Drawable.TREE){
final javax.swing.JFrame jf =
new javax.swing.JFrame("Weka Classifier Tree Visualizer: "+name);
jf.setSize(500,400);
jf.getContentPane().setLayout(new BorderLayout());
TreeVisualizer tv =
new TreeVisualizer(null,
grphString,
new PlaceNode2());
jf.getContentPane().add(tv, BorderLayout.CENTER);
jf.addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosing(java.awt.event.WindowEvent e) {
jf.dispose();
}
});
jf.setVisible(true);
}
if(grphType == Drawable.BayesNet) {
final javax.swing.JFrame jf =
new javax.swing.JFrame("Weka Classifier Graph Visualizer: "+name);
jf.setSize(500,400);
jf.getContentPane().setLayout(new BorderLayout());
GraphVisualizer gv =
new GraphVisualizer();
try {
gv.readBIF(grphString);
}
catch (BIFFormatException be) {
System.err.println("unable to visualize BayesNet"); be.printStackTrace();
}
gv.layoutGraph();
jf.getContentPane().add(gv, BorderLayout.CENTER);
jf.addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosing(java.awt.event.WindowEvent e) {
jf.dispose();
}
});
jf.setVisible(true);
}
}
/**
* Return an enumeration of user requests
*
* @return an <code>Enumeration</code> value
*/
public Enumeration enumerateRequests() {
Vector newVector = new Vector(0);
newVector.addElement("Show results");
return newVector.elements();
}
/**
* Perform the named request
*
* @param request a <code>String</code> value
* @exception IllegalArgumentException if an error occurs
*/
public void performRequest(String request)
{
if (request.compareTo("Show results") == 0) {
showResults();
} else {
throw new
IllegalArgumentException(request
+ " not supported (GraphViewer)");
}
}
}
|
[
"(no author)@e0a1b77d-ad91-4216-81b1-defd5f83fa92"
] |
(no author)@e0a1b77d-ad91-4216-81b1-defd5f83fa92
|
2de947c9993435277b9fba66bed16224a91324b9
|
96430f78f73be19c9f9ba6155711652f86d80ed1
|
/baiHooBlog/BaiHooBlog/baiHooBlog/baihooBlog-blog/src/main/java/com/baihoo/blog/doj/UserDoj.java
|
c0a2dcdd9e6a1cba9e574ab86674591d4ee50cb1
|
[] |
no_license
|
ChenBaiHong/baihoo.SpringToolSuiteDataBank
|
853e46cf71635e0dca14261e9555f048fc5526ed
|
2275a9e001146715c54f2f6a10b339c44f14f597
|
refs/heads/master
| 2020-03-26T11:53:46.173875
| 2018-08-15T14:44:06
| 2018-08-15T14:44:06
| 144,865,044
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 172
|
java
|
package com.baihoo.blog.doj;
import com.baihoo.blog.domain.User;
/**
* 用户延申扩展实体
* @author Administrator
*
*/
public class UserDoj extends User {
}
|
[
"cbh12345661@hotmail.com.cn"
] |
cbh12345661@hotmail.com.cn
|
7ec1e5813b68250020c8a4028bfbf935608c4554
|
2a59a003262c12b198a9c6240d892b30e94b74b2
|
/src/main/java/com/lvcyong/application/repository/CustomAuditEventRepository.java
|
882c6cd6100defcfa21a0247ebecca6bf44cdd77
|
[] |
no_license
|
lvcyong/jhipster-monolithic-react
|
c45fb33b915e45b2783694aac4b6bf86c21837ea
|
b2d546ed83ee56529d697eda0861139d010aeeab
|
refs/heads/master
| 2020-04-17T10:44:06.137070
| 2019-01-19T05:57:36
| 2019-01-19T05:57:36
| 166,511,896
| 0
| 0
| null | 2019-01-19T06:08:32
| 2019-01-19T05:57:26
|
Java
|
UTF-8
|
Java
| false
| false
| 3,628
|
java
|
package com.lvcyong.application.repository;
import com.lvcyong.application.config.Constants;
import com.lvcyong.application.config.audit.AuditEventConverter;
import com.lvcyong.application.domain.PersistentAuditEvent;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.actuate.audit.AuditEvent;
import org.springframework.boot.actuate.audit.AuditEventRepository;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import java.time.Instant;
import java.util.*;
/**
* An implementation of Spring Boot's AuditEventRepository.
*/
@Repository
public class CustomAuditEventRepository implements AuditEventRepository {
private static final String AUTHORIZATION_FAILURE = "AUTHORIZATION_FAILURE";
/**
* Should be the same as in Liquibase migration.
*/
protected static final int EVENT_DATA_COLUMN_MAX_LENGTH = 255;
private final PersistenceAuditEventRepository persistenceAuditEventRepository;
private final AuditEventConverter auditEventConverter;
private final Logger log = LoggerFactory.getLogger(getClass());
public CustomAuditEventRepository(PersistenceAuditEventRepository persistenceAuditEventRepository,
AuditEventConverter auditEventConverter) {
this.persistenceAuditEventRepository = persistenceAuditEventRepository;
this.auditEventConverter = auditEventConverter;
}
@Override
public List<AuditEvent> find(String principal, Instant after, String type) {
Iterable<PersistentAuditEvent> persistentAuditEvents =
persistenceAuditEventRepository.findByPrincipalAndAuditEventDateAfterAndAuditEventType(principal, after, type);
return auditEventConverter.convertToAuditEvent(persistentAuditEvents);
}
@Override
@Transactional(propagation = Propagation.REQUIRES_NEW)
public void add(AuditEvent event) {
if (!AUTHORIZATION_FAILURE.equals(event.getType()) &&
!Constants.ANONYMOUS_USER.equals(event.getPrincipal())) {
PersistentAuditEvent persistentAuditEvent = new PersistentAuditEvent();
persistentAuditEvent.setPrincipal(event.getPrincipal());
persistentAuditEvent.setAuditEventType(event.getType());
persistentAuditEvent.setAuditEventDate(event.getTimestamp());
Map<String, String> eventData = auditEventConverter.convertDataToStrings(event.getData());
persistentAuditEvent.setData(truncate(eventData));
persistenceAuditEventRepository.save(persistentAuditEvent);
}
}
/**
* Truncate event data that might exceed column length.
*/
private Map<String, String> truncate(Map<String, String> data) {
Map<String, String> results = new HashMap<>();
if (data != null) {
for (Map.Entry<String, String> entry : data.entrySet()) {
String value = entry.getValue();
if (value != null) {
int length = value.length();
if (length > EVENT_DATA_COLUMN_MAX_LENGTH) {
value = value.substring(0, EVENT_DATA_COLUMN_MAX_LENGTH);
log.warn("Event data for {} too long ({}) has been truncated to {}. Consider increasing column width.",
entry.getKey(), length, EVENT_DATA_COLUMN_MAX_LENGTH);
}
}
results.put(entry.getKey(), value);
}
}
return results;
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
b67a7d6347e0ecffc4cf2729f2c5a6d8a3cfde31
|
e7250a05cdc953d2570aa37aee7316b1bdb190fd
|
/src/day5/InstanceVariables.java
|
e41d80015bce212080764c99e0516e34f757b4cd
|
[] |
no_license
|
Suranchiyev/sdet-java-2021
|
e49b6e1fa68c01ec8253bf9ad34fcf6c5a6a383f
|
a596b4c2967f78b0a54c3e7e902bb88a9f56faac
|
refs/heads/master
| 2023-02-01T08:19:00.728534
| 2020-12-01T16:38:08
| 2020-12-01T16:38:08
| 303,031,465
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 415
|
java
|
package day5;
public class InstanceVariables {
String name = "Will Smith";
int age = 38;
public String firstName;
protected String lastName;
private String middleName;
public static void main(String[] args) {
// System.out.println(name);
// I cannot use non static variables inside static methods
// this is local variable
String name = "John Doe";
System.out.println(name); // John Doe
}
}
|
[
"Suranchiyev96@gmail.com"
] |
Suranchiyev96@gmail.com
|
804dced9932d899859fd52afa4923d1ff0312ba3
|
2afdc434064510869b75fe157b82b3440ddbb748
|
/presto-parquet/src/test/java/io/prestosql/parquet/writer/ParquetWritersTest.java
|
391e91694c122af342d7b5b81ddf9e408c2da6ef
|
[] |
no_license
|
openlookeng/hetu-core
|
6dd74c62303f91d70e5eb6043b320054d1b4b550
|
73989707b733c11c74147d9228a0600e16fe5193
|
refs/heads/master
| 2023-09-03T20:27:49.706678
| 2023-06-26T09:51:37
| 2023-06-26T09:51:37
| 276,025,804
| 553
| 398
| null | 2023-09-14T17:07:01
| 2020-06-30T07:14:20
|
Java
|
UTF-8
|
Java
| false
| false
| 1,510
|
java
|
/*
* 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 io.prestosql.parquet.writer;
import io.prestosql.spi.type.Type;
import org.apache.parquet.column.ParquetProperties;
import org.apache.parquet.hadoop.metadata.CompressionCodecName;
import org.apache.parquet.schema.MessageType;
import org.testng.annotations.Test;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class ParquetWritersTest
{
@Test
public void testGetColumnWriters()
{
// Setup
final MessageType messageType = new MessageType("name", Arrays.asList());
final Map<List<String>, Type> trinoTypes = new HashMap<>();
final ParquetProperties parquetProperties = ParquetProperties.builder().build();
// Run the test
final List<ColumnWriter> result = ParquetWriters.getColumnWriters(messageType, trinoTypes, parquetProperties,
CompressionCodecName.UNCOMPRESSED);
// Verify the results
}
}
|
[
"zhengqijv@workingman.cn"
] |
zhengqijv@workingman.cn
|
0c21fdd847c990baaf3c8e72c1fbfc60db1e51c5
|
236b2da5d748ef26a90d66316b1ad80f3319d01e
|
/trunk/photon/plugins/com.swtworkbench.community.xswt/src/com/swtworkbench/community/xswt/dataparser/parsers/ArrayDataParser.java
|
6fa10ddd0bd3e92e3b84b40575766ba80f75814a
|
[
"Apache-2.0"
] |
permissive
|
nagyist/marketcetera
|
a5bd70a0369ce06feab89cd8c62c63d9406b42fd
|
4f3cc0d4755ee3730518709412e7d6ec6c1e89bd
|
refs/heads/master
| 2023-08-03T10:57:43.504365
| 2023-07-25T08:37:53
| 2023-07-25T08:37:53
| 19,530,179
| 0
| 2
|
Apache-2.0
| 2023-07-25T08:37:54
| 2014-05-07T10:22:59
|
Java
|
UTF-8
|
Java
| false
| false
| 2,759
|
java
|
/*******************************************************************************
* Copyright (c) 2000, 2003 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
* Bob Foster - The color manager idea; XSWT top-level node idea; some other
* important stuff
* David Orme (ASC) - Rewrote: switched to a reflection-based implementation
******************************************************************************/
package com.swtworkbench.community.xswt.dataparser.parsers;
import java.lang.reflect.Array;
import java.util.StringTokenizer;
import com.swtworkbench.community.xswt.XSWTException;
import com.swtworkbench.community.xswt.dataparser.IDataParserContext;
import com.swtworkbench.community.xswt.dataparser.NonDisposableDataParser;
/**
* Class ArrayDataParser.
*
* @author hallvard
*/
public class ArrayDataParser extends NonDisposableDataParser {
private String delimiters = " \t\r\n";
public ArrayDataParser() {
}
public ArrayDataParser(String delimiters) {
this();
this.delimiters = delimiters;
}
private String parenthesis = "(,)[ ]{;}<|>";
public Object parse(String source, Class klass, IDataParserContext context) throws XSWTException {
Class elementClass = klass.getComponentType();
String delimiters = this.delimiters;
if (source.length() > 1) {
char first = source.charAt(0), last = source.charAt(source.length() - 1);
for (int i = 0; i < parenthesis.length(); i += 3) {
if (first == parenthesis.charAt(i) && last == parenthesis.charAt(i + 2)) {
delimiters = parenthesis.substring(i + 1, i + 2);
source = source.substring(1, source.length() - 1);
break;
}
}
}
StringTokenizer stringTokenizer = new StringTokenizer(source, delimiters);
int tokens = stringTokenizer.countTokens();
Object array = Array.newInstance(elementClass, tokens);
for (int i = 0; i < tokens; i++) {
String token = stringTokenizer.nextToken();
if (delimiters == this.delimiters) {
token = token.trim();
}
Object o = context.parse(token, elementClass);
try {
Array.set(array, i, o);
} catch (RuntimeException e) {
throw new XSWTException("Couldn't set array element " + i + " of " + array.getClass() + " to " + o, e);
}
}
return array;
}
}
|
[
"nagyist@mailbox.hu"
] |
nagyist@mailbox.hu
|
350f53f336154de6a82954c880ad0ced6d0edeab
|
a77b637c69d9497a0c29ffc0b89cbfa5cb1958f7
|
/app/src/main/java/com/wangyukui/ywkj/jmessage/ViewPagerAdapter.java
|
465652c1577756c8bf2e60ddc0bc8da761eb0c41
|
[] |
no_license
|
wangchenxing1990/tashanzhishi
|
6b764aba6ffd499f7bef2576743d0be503d84e38
|
15b3829e0ac092d8b55eb19db6222e8ddbd4f90e
|
refs/heads/master
| 2020-04-07T07:45:03.429599
| 2018-11-19T08:35:44
| 2018-11-19T08:35:44
| 158,187,293
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 883
|
java
|
package com.wangyukui.ywkj.jmessage;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import java.util.List;
/**
* Created by ${chenyn} on 2017/2/20.
*/
public class ViewPagerAdapter extends FragmentPagerAdapter {
private List<Fragment> mFragmList;
public ViewPagerAdapter(FragmentManager fm) {
super(fm);
// TODO Auto-generated constructor stub
}
public ViewPagerAdapter(FragmentManager fm, List<Fragment> fragments) {
super(fm);
this.mFragmList = fragments;
}
@Override
public Fragment getItem(int index) {
// TODO Auto-generated method stub
return mFragmList.get(index);
}
@Override
public int getCount() {
// TODO Auto-generated method stub
return mFragmList.size();
}
}
|
[
"18317770484@163.com"
] |
18317770484@163.com
|
43a9e68d8801cc30adab1fc271eb632709f2740c
|
8191bea395f0e97835735d1ab6e859db3a7f8a99
|
/f737922a0ddc9335bb0fc2f3ae5ffe93_source_from_JADX/com/google/android/gms/ads/internal/client/s.java
|
f3eeb8cd8cb7e678c9a5df03946bf22f900dcdb8
|
[] |
no_license
|
msmtmsmt123/jadx-1
|
5e5aea319e094b5d09c66e0fdb31f10a3238346c
|
b9458bb1a49a8a7fba8b9f9a6fb6f54438ce03a2
|
refs/heads/master
| 2021-05-08T19:21:27.870459
| 2017-01-28T04:19:54
| 2017-01-28T04:19:54
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,761
|
java
|
package com.google.android.gms.ads.internal.client;
import android.content.Context;
import android.location.Location;
import android.os.Bundle;
import com.google.ads.mediation.admob.AdMobAdapter;
import com.google.android.gms.ads.search.a;
import com.google.android.gms.internal.eh;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Date;
import java.util.List;
@eh
public class s {
public static final s j6;
static {
j6 = new s();
}
protected s() {
}
public static s j6() {
return j6;
}
public AdRequestParcel j6(Context context, e eVar) {
Date j6 = eVar.j6();
long time = j6 != null ? j6.getTime() : -1;
String DW = eVar.DW();
int FH = eVar.FH();
Collection Hw = eVar.Hw();
List unmodifiableList = !Hw.isEmpty() ? Collections.unmodifiableList(new ArrayList(Hw)) : null;
boolean j62 = eVar.j6(context);
int we = eVar.we();
Location v5 = eVar.v5();
Bundle j63 = eVar.j6(AdMobAdapter.class);
boolean Zo = eVar.Zo();
String VH = eVar.VH();
a u7 = eVar.u7();
SearchAdRequestParcel searchAdRequestParcel = u7 != null ? new SearchAdRequestParcel(u7) : null;
String str = null;
Context applicationContext = context.getApplicationContext();
if (applicationContext != null) {
str = w.j6().j6(Thread.currentThread().getStackTrace(), applicationContext.getPackageName());
}
return new AdRequestParcel(7, time, j63, FH, unmodifiableList, j62, we, Zo, VH, searchAdRequestParcel, v5, DW, eVar.EQ(), eVar.J0(), Collections.unmodifiableList(new ArrayList(eVar.J8())), eVar.gn(), str, eVar.Ws());
}
}
|
[
"eggfly@qq.com"
] |
eggfly@qq.com
|
0d884707053d421c3022a3c9062b58e54340a2bd
|
44a36429df737ef38fae6ac2e525ddc2ce8e3d6b
|
/ZNTDianGeAdmin/src/com/znt/vodbox/dialog/CountEditDialog.java
|
38d739d5850048b90017e4a2145f3246f8dd0b0d
|
[] |
no_license
|
mapbased/ZNTVodBox
|
850c09826f72e5d8300d4a394d980e7b33d37f44
|
31a6d0babb47e1153906b379e87f4542ab28f0d1
|
refs/heads/master
| 2021-05-19T04:00:21.762410
| 2017-09-04T16:34:06
| 2017-09-04T16:34:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,301
|
java
|
package com.znt.vodbox.dialog;
import android.app.Activity;
import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.os.Handler;
import android.text.TextUtils;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import com.znt.vodbox.R;
/**
* @ClassName: MusicPlayDialog
* @Description: TODO
* @author yan.yu
* @date 2015-7-20 下午3:30:43
*/
public class CountEditDialog extends Dialog
{
private TextView textTitle = null;
private Button btnLeft = null;
private Button btnRight = null;
private EditText etInput = null;
private android.view.View.OnClickListener listener = null;
private Activity context = null;
private boolean isDismissed = false;
private String nameOld = "";
private final int PREPARE_FINISH = 0;
private final int PREPARE_FAIL = 1;
private Handler handler = new Handler()
{
public void handleMessage(android.os.Message msg)
{
if(msg.what == PREPARE_FINISH)
{
}
else if(msg.what == PREPARE_FAIL)
{
textTitle.setText("播放失败,请重试");
}
};
};
/**
* <p>Title: </p>
* <p>Description: </p>
* @param context
*/
public CountEditDialog(Activity context)
{
super(context, R.style.MMTheme_DataSheet);
// TODO Auto-generated constructor stub
this.context = context;
}
/**
* <p>Title: </p>
* <p>Description: </p>
* @param context
* @param themeCustomdialog
*/
public CountEditDialog(Activity context, int themeCustomdialog)
{
super(context, themeCustomdialog);
// TODO Auto-generated constructor stub
this.context = context;
}
public String getContent()
{
String content = etInput.getText().toString().trim();
if(content == null)
content = "";
return content;
}
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.dialog_count_edit);
setScreenBrightness();
Window window = getWindow();
window.setWindowAnimations(R.style.AnimAlph);
btnRight = (Button) CountEditDialog.this.findViewById(R.id.btn_dialog_count_edit_right);
btnLeft = (Button) CountEditDialog.this.findViewById(R.id.btn_dialog_count_edit_left);
textTitle = (TextView) CountEditDialog.this.findViewById(R.id.tv_dialog_count_edit_title);
etInput = (EditText) CountEditDialog.this.findViewById(R.id.et_count_edit);
this.setOnShowListener(new OnShowListener()
{
@Override
public void onShow(DialogInterface dialog)
{
initViews();
}
});
this.setOnDismissListener(new OnDismissListener()
{
@Override
public void onDismiss(DialogInterface arg0)
{
// TODO Auto-generated method stub
}
});
}
private void initViews()
{
setCanceledOnTouchOutside(false);
textTitle.setText("请输入间隔次数");
etInput.setText(nameOld);
if(listener != null)
btnRight.setOnClickListener(listener);
btnLeft.setOnClickListener(new android.view.View.OnClickListener()
{
@Override
public void onClick(View arg0)
{
// TODO Auto-generated method stub
isDismissed = true;
dismiss();
}
});
}
public boolean isDismissed()
{
return isDismissed;
}
public void setOnClickListener(android.view.View.OnClickListener listener)
{
this.listener = listener;
}
public void setInfor(String nameOld)
{
if(nameOld == null)
nameOld = "";
this.nameOld = nameOld;
}
public Button getLeftButton()
{
return btnLeft;
}
public Button getRightButton()
{
return btnRight;
}
private void setScreenBrightness()
{
Window window = getWindow();
WindowManager.LayoutParams lp = window.getAttributes();
/**
* 此处设置亮度值。dimAmount代表黑暗数量,也就是昏暗的多少,设置为0则代表完全明亮。
* 范围是0.0到1.0
*/
lp.dimAmount = 0;
window.setAttributes(lp);
}
}
|
[
"yuyan19850204@sina.com"
] |
yuyan19850204@sina.com
|
1d2cab95e95a69a86479f595a59319706be80e86
|
1263008492e8a237605e82dfd7d198e454c31f0c
|
/java_ver/old_ver/rpg2k/Event.java
|
b31c9366b2db7bdd0074c1de5c41a504a488f24f
|
[] |
no_license
|
weimingtom/rpg2kemuSvn
|
78df5490a7fde36d44cba3e5948fb74c133a10c2
|
8373acf41bbe13b471efd354de1e9384e21eb062
|
refs/heads/master
| 2020-12-08T03:11:45.885189
| 2016-08-20T01:01:06
| 2016-08-20T01:01:06
| 66,121,107
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,080
|
java
|
package rpg2k;
import java.io.*;
import java.util.Vector;
import static rpg2k.Structure.*;
public class Event implements Field
{
public int CODE;
public int INDENT;
public String STRING;
public int ARGS[];
public Event(int code, int indent, String str, int[] ARGS) {
CODE = code;
INDENT = indent;
STRING = str;
ARGS = ARGS;
}
protected Event() {}
public static Event[] newEvent(final byte[] data) {
ByteArrayInputStream reader = new ByteArrayInputStream(data);
Vector<Event> v = new Vector<Event>(10, 10);
try {
while(true) {
Event ret = new Event();
ret.CODE = ber2int(reader);
ret.INDENT = ber2int(reader);
int strLen = ber2int(reader);
ret.STRING = readString(reader, strLen);
int ARGSLen = ber2int(reader);
ret.ARGS = new int[ber2int(reader)];
for(int i = 0; i < ARGSLen; i++)
ret.ARGS[i] = ber2int(reader);
v.add(ret);
if(reader.available() == 0) break;
}
} catch(IOException e) {}
return (Event[])v.toArray(new Event[0]);
}
public static void toBinary(Event[] src, OutputStream output) {
}
}
|
[
"weimingtom@qq.com"
] |
weimingtom@qq.com
|
341cb61b3057de3481d652c3ed0d746b6ccf6dbb
|
8e31ec4edb240ef630576f655db2dd1398fa7535
|
/src/main/java/org/spring/learning/componentscan/util/EmailUtils.java
|
a02ab5f47d3a3632f7a7b3fe3d2fff20932a22ed
|
[] |
no_license
|
mortalliao/spring-demo
|
06c47245b10358d667babe87b72f4bd3277e672d
|
e2e1ac7cfd67c3a615ef346ee1eee414c7e80919
|
refs/heads/master
| 2022-06-29T22:33:47.901802
| 2020-08-26T15:41:45
| 2020-08-26T15:41:45
| 226,892,291
| 0
| 0
| null | 2022-06-21T02:26:37
| 2019-12-09T14:34:48
|
Java
|
UTF-8
|
Java
| false
| false
| 214
|
java
|
package org.spring.learning.componentscan.util;
import org.springframework.stereotype.Component;
@Component
public class EmailUtils {
public void send(){
System.out.println("=======send email========");
}
}
|
[
"mortalliaoyujian@163.com"
] |
mortalliaoyujian@163.com
|
dd375275ae42c152cd0ea291f94d5689423041c1
|
f31c8e7c3c8afee0555d4c0a8912593fda535992
|
/src/main/java/edu/gdei/gdeiassistant/Pojo/Entity/Secret.java
|
8303bb539bd671be85ad0c6b9889d971be8490f8
|
[
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
DreamingOfDreams/GdeiAssistant
|
60b0b1c15ecf806560c2493498fa767bb92805f0
|
cfcb3a8fa4af00373818e9062cad87ae4807554b
|
refs/heads/master
| 2020-05-18T11:24:35.709150
| 2019-04-16T15:09:22
| 2019-04-16T15:09:22
| 184,379,294
| 2
| 0
|
NOASSERTION
| 2019-05-01T06:47:07
| 2019-05-01T06:47:06
| null |
UTF-8
|
Java
| false
| false
| 2,306
|
java
|
package edu.gdei.gdeiassistant.Pojo.Entity;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.List;
@Component
@Scope("prototype")
@JsonIgnoreProperties(value = {"handler", "secretCommentList"}, ignoreUnknown = true)
public class Secret implements Serializable {
private String voiceURL;
private Integer id;
@Min(1)
@Max(12)
private Integer theme;
@Size(max = 100)
private String content;
@Min(0)
@Max(1)
private Integer type;
private List<SecretComment> secretCommentList;
private Integer commentCount;
private Integer likeCount;
private Integer liked;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getTheme() {
return theme;
}
public void setTheme(Integer theme) {
this.theme = theme;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public List<SecretComment> getSecretCommentList() {
return secretCommentList;
}
public void setSecretCommentList(List<SecretComment> secretCommentList) {
this.secretCommentList = secretCommentList;
}
public int getCommentCount() {
return commentCount;
}
public void setCommentCount(Integer commentCount) {
this.commentCount = commentCount;
}
public Integer getLikeCount() {
return likeCount;
}
public void setLikeCount(Integer likeCount) {
this.likeCount = likeCount;
}
public Integer getLiked() {
return liked;
}
public void setLiked(int liked) {
this.liked = liked;
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
public String getVoiceURL() {
return voiceURL;
}
public void setVoiceURL(String voiceURL) {
this.voiceURL = voiceURL;
}
}
|
[
"zwlddx0815@gmail.com"
] |
zwlddx0815@gmail.com
|
b472898875f1a084e97c56ebc9d59e13fa634449
|
14746c4b8511abe301fd470a152de627327fe720
|
/soroush-android-1.10.0_source_from_JADX/org/jivesoftware/smackx/iot/discovery/element/Tag.java
|
371337d841427fbc88b3dbfee421d7abca7f417f
|
[] |
no_license
|
maasalan/soroush-messenger-apis
|
3005c4a43123c6543dbcca3dd9084f95e934a6f4
|
29867bf53a113a30b1aa36719b1c7899b991d0a8
|
refs/heads/master
| 2020-03-21T21:23:20.693794
| 2018-06-28T19:57:01
| 2018-06-28T19:57:01
| 139,060,676
| 3
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,070
|
java
|
package org.jivesoftware.smackx.iot.discovery.element;
import org.jivesoftware.smack.packet.NamedElement;
import org.jivesoftware.smack.util.Objects;
import org.jivesoftware.smack.util.StringUtils;
import org.jivesoftware.smack.util.XmlStringBuilder;
public class Tag implements NamedElement {
private final String name;
private final Type type;
private final String value;
public enum Type {
str,
num
}
public Tag(String str, Type type, String str2) {
this.name = (String) StringUtils.requireNotNullOrEmpty(str, "name must not be null or empty");
this.type = (Type) Objects.requireNonNull(type);
this.value = (String) StringUtils.requireNotNullOrEmpty(str2, "value must not be null or empty");
if (this.name.length() > 32) {
throw new IllegalArgumentException("Meta Tag names must not be longer then 32 characters (XEP-0347 § 5.2");
} else if (this.type == Type.str && this.value.length() > 128) {
throw new IllegalArgumentException("Meta Tag string values must not be longer then 128 characters (XEP-0347 § 5.2");
}
}
public String getElementName() {
return getType().toString();
}
public String getName() {
return this.name;
}
public Type getType() {
return this.type;
}
public String getValue() {
return this.value;
}
public String toString() {
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append(this.name);
stringBuilder.append('(');
stringBuilder.append(this.type);
stringBuilder.append("):");
stringBuilder.append(this.value);
return stringBuilder.toString();
}
public XmlStringBuilder toXML() {
XmlStringBuilder xmlStringBuilder = new XmlStringBuilder((NamedElement) this);
xmlStringBuilder.attribute("name", this.name);
xmlStringBuilder.attribute("value", this.value);
xmlStringBuilder.closeEmptyElement();
return xmlStringBuilder;
}
}
|
[
"Maasalan@riseup.net"
] |
Maasalan@riseup.net
|
2f520f8f153b22a096493f0cfb6ab7478852c01a
|
c43a842691f449d1cd4e80a8305a87c4733e9141
|
/intkey/src/main/java/au/org/ala/delta/intkey/directives/invocation/FileInputDirectiveInvocation.java
|
c1429dd2f8c7aed9d049c5b35d4284c6c035f97a
|
[] |
no_license
|
AtlasOfLivingAustralia/open-delta
|
7588acd033a2c39bd4dfef44f2b57a4ebd4b5135
|
3188f6af29015efa1b4c1fde46c0ec3bf44da4cd
|
refs/heads/master
| 2023-04-28T15:41:09.946694
| 2017-11-16T00:29:11
| 2017-11-16T00:29:11
| 50,964,310
| 13
| 10
| null | 2023-04-25T18:34:54
| 2016-02-03T01:16:10
|
Java
|
UTF-8
|
Java
| false
| false
| 1,788
|
java
|
/*******************************************************************************
* Copyright (C) 2011 Atlas of Living Australia
* All Rights Reserved.
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (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.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
******************************************************************************/
package au.org.ala.delta.intkey.directives.invocation;
import java.io.File;
import au.org.ala.delta.intkey.model.IntkeyContext;
import au.org.ala.delta.intkey.ui.UIUtils;
public class FileInputDirectiveInvocation extends LongRunningIntkeyDirectiveInvocation<Void> {
private File _file;
public void setFile(File file) {
this._file = file;
}
@Override
protected Void doRunInBackground(IntkeyContext context) throws IntkeyDirectiveInvocationException {
progress(UIUtils.getResourceString("FileInputDirective.Progress"));
context.processInputFile(_file);
return null;
}
@Override
protected void handleProcessingDone(IntkeyContext context, Void result) {
// Update the UI as the input file may have included operations that have modified the UI which will have been ignored given that this
// task is done in the background and all UI updates are ignored from background tasks.
context.getUI().handleUpdateAll();
}
}
|
[
"chris.flemming.ala@gmail.com@dd429c29-c832-59a0-e864-46e68368aa0b"
] |
chris.flemming.ala@gmail.com@dd429c29-c832-59a0-e864-46e68368aa0b
|
fb8250215f5245ed7b8d9fd1cd0c698dab721b31
|
0b9f100fc229c88f7ec76bab2fcb3933635549b0
|
/simmail/src/us/pserver/smail/internal/BodyPartConverter.java
|
e4c8978b43aa6a4bb3a369ed0fdf735dedc36f53
|
[] |
no_license
|
jun0rr/java
|
e080a7f0aab9e5c42d89756e4a5eba1ec3d6904e
|
7635ee51889555454461c58580df5a2a61dd9cbf
|
refs/heads/master
| 2020-06-26T18:51:41.024454
| 2014-10-23T17:29:30
| 2014-10-23T17:29:30
| 199,715,772
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,046
|
java
|
/*
* Direitos Autorais Reservados (c) 2011 Juno Roesler
* Contato: juno.rr@gmail.com
*
* Esta biblioteca é software livre; você pode redistribuí-la e/ou modificá-la sob os
* termos da Licença Pública Geral Menor do GNU conforme publicada pela Free
* Software Foundation; tanto a versão 2.1 da Licença, ou (a seu critério) qualquer
* versão posterior.
*
* Esta biblioteca é distribuída na expectativa de que seja útil, porém, SEM
* NENHUMA GARANTIA; nem mesmo a garantia implícita de COMERCIABILIDADE
* OU ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. Consulte a Licença Pública
* Geral Menor do GNU para mais detalhes.
*
* Você deve ter recebido uma cópia da Licença Pública Geral Menor do GNU junto
* com esta biblioteca; se não, acesse
* http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html,
* ou escreva para a Free Software Foundation, Inc., no
* endereço 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
*/
package us.pserver.smail.internal;
import us.pserver.smail.Attachment;
import us.pserver.smail.SMailException;
import javax.mail.BodyPart;
/**
* <p style="font-size: medium;">
* Conversor de <code>javax.mail.BodyPart</code>
* para <code>com.jpower.Attachment</code>.
* </p>
*
* @see us.pserver.smail.Attachment
* @see javax.mail.BodyPart
* @see us.pserver.smail.internal.Converter
* @author Juno Roesler - juno.rr@gmail.com
* @version 1.0 - 2011.10.13
*/
public class BodyPartConverter implements
Converter<BodyPart, Attachment> {
@Override
public Attachment convert(BodyPart x) throws SMailException {
if(x == null) return null;
Attachment emb = new Attachment();
try {
emb.setDescription(x.getDescription());
emb.setName(x.getFileName());
emb.setType(x.getContentType());
emb.setInput(x.getInputStream());
} catch(Exception ex) {
throw new SMailException("{BodyPartConverter"
+ ".convert( BodyPart )}", ex);
}
return emb;
}
}
|
[
"juno@pserver.us"
] |
juno@pserver.us
|
6e7ffb97835b58fd582e7bc8c5e84027993cc3b3
|
2fa6f6aa170d7e5e9d6d869df368eb7bd70d6491
|
/reader/src/main/java/marc/com/reader/applike/ShareApplicationLike.java
|
4fa48eca64e2b0e76b61ad174c9371518b7e4f13
|
[] |
no_license
|
broderickwang/Joker
|
1778e57f95cd24cb69d933bce6170660bbd53441
|
6b25b5649ad4461ffa894cad2ead5a805d44f09c
|
refs/heads/master
| 2021-08-07T04:15:47.896027
| 2017-11-07T13:38:27
| 2017-11-07T13:38:27
| 107,524,306
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 635
|
java
|
package marc.com.reader.applike;
import marc.com.reader.router.ShareUIRouter;
import marc.com.router.applike.IApplicationLike;
import marc.com.router.router.UI.UIRouter;
/**
* Created by chengda
* Date: 2017/10/26
* Time: 10:14
* Version: 1.0
* Description:
* Email:wangchengda1990@gmail.com
**/
public class ShareApplicationLike implements IApplicationLike {
UIRouter mRouter = UIRouter.getInstance();
ShareUIRouter mShareUIRouter = ShareUIRouter.getInstance();
@Override
public void onCreate() {
mRouter.registerUI(mShareUIRouter);
}
@Override
public void onStop() {
mRouter.unregisterUI(mShareUIRouter);
}
}
|
[
"wangchengda1990@gmail.com"
] |
wangchengda1990@gmail.com
|
aa510a95cb61be4bf3f90c3f94251851b8b96071
|
d2984ba2b5ff607687aac9c65ccefa1bd6e41ede
|
/src/net/datenwerke/rs/dashboard/client/dashboard/ui/DadgetCatalog.java
|
f57b4e48661dab33b4f63b935473942b5c71417e
|
[] |
no_license
|
bireports/ReportServer
|
da979eaf472b3e199e6fbd52b3031f0e819bff14
|
0f9b9dca75136c2bfc20aa611ebbc7dc24cfde62
|
refs/heads/master
| 2020-04-18T10:18:56.181123
| 2019-01-25T00:45:14
| 2019-01-25T00:45:14
| 167,463,795
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,940
|
java
|
/*
* ReportServer
* Copyright (c) 2018 InfoFabrik GmbH
* http://reportserver.net/
*
*
* This file is part of ReportServer.
*
* ReportServer is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero 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 Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package net.datenwerke.rs.dashboard.client.dashboard.ui;
import net.datenwerke.gxtdto.client.baseex.widget.DwWindow;
import net.datenwerke.gxtdto.client.baseex.widget.btn.DwTextButton;
import net.datenwerke.gxtdto.client.locale.BaseMessages;
import net.datenwerke.gxtdto.client.utils.modelkeyprovider.BasicObjectModelKeyProvider;
import net.datenwerke.gxtdto.client.xtemplates.NullSafeFormatter;
import net.datenwerke.hookhandler.shared.hookhandler.HookHandlerService;
import net.datenwerke.rs.dashboard.client.dashboard.dto.DadgetDto;
import net.datenwerke.rs.dashboard.client.dashboard.dto.DashboardDto;
import net.datenwerke.rs.dashboard.client.dashboard.hooks.DadgetProcessorHook;
import net.datenwerke.rs.dashboard.client.dashboard.locale.DashboardMessages;
import net.datenwerke.rs.theme.client.icon.BaseIcon;
import com.google.gwt.cell.client.AbstractCell;
import com.google.gwt.core.client.GWT;
import com.google.gwt.safehtml.shared.SafeHtml;
import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
import com.google.gwt.user.client.Event;
import com.google.inject.Inject;
import com.google.inject.assistedinject.Assisted;
import com.sencha.gxt.core.client.IdentityValueProvider;
import com.sencha.gxt.core.client.Style.SelectionMode;
import com.sencha.gxt.core.client.XTemplates;
import com.sencha.gxt.core.client.XTemplates.FormatterFactories;
import com.sencha.gxt.core.client.XTemplates.FormatterFactory;
import com.sencha.gxt.core.client.XTemplates.FormatterFactoryMethod;
import com.sencha.gxt.data.shared.ListStore;
import com.sencha.gxt.widget.core.client.ListView;
import com.sencha.gxt.widget.core.client.event.SelectEvent;
import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
public class DadgetCatalog extends DwWindow {
@FormatterFactories(@FormatterFactory(factory=NullSafeFormatter.class,methods=@FormatterFactoryMethod(name="nullsafe")))
interface DashboardTemplates extends XTemplates{
@XTemplate("<div class=\"rs-dadget-catalog-wrap\">" +
"<div class=\"rs-dadget-icon\">{icon}</div>" +
"<div class=\"x-editable rs-dadget-title\">{title:nullsafe}</div>" +
"<div class=\"rs-dadget-description\">{description:nullsafe}</div>" +
"</div>")
public SafeHtml render(DadgetProcessorModel model);
}
private final HookHandlerService hookHandler;
private DashboardContainer container;
private DashboardDto dashboard;
@Inject
public DadgetCatalog(
HookHandlerService hookHandler,
@Assisted DashboardDto dashboard,
@Assisted DashboardContainer container
){
this.hookHandler = hookHandler;
this.dashboard = dashboard;
this.container = container;
initializeUI();
}
private void initializeUI() {
setHeadingText(DashboardMessages.INSTANCE.addDadget());
setSize(640, 480);
setHeaderIcon(BaseIcon.DADGET);
/* load dadgets */
ListStore<DadgetProcessorModel> dadgetStore = new ListStore<DadgetProcessorModel>(new BasicObjectModelKeyProvider<DadgetProcessorModel>());
int dadgetCnt = 0;
for(DadgetProcessorHook processor : hookHandler.getHookers(DadgetProcessorHook.class)){
DadgetProcessorModel model = new DadgetProcessorModel();
model.setTitle(processor.getTitle());
model.setDescription(processor.getDescription());
model.setIcon(processor.getIcon());
model.setProcessor(processor);
dadgetStore.add(model);
}
final DashboardTemplates xtemplate = GWT.create(DashboardTemplates.class);
final ListView<DadgetProcessorModel, DadgetProcessorModel> view = new ListView<DadgetProcessorModel, DadgetProcessorModel>(dadgetStore, new IdentityValueProvider<DadgetProcessorModel>()){
@Override
public void onBrowserEvent(Event event) {
super.onBrowserEvent(event);
switch (event.getTypeInt()) {
case Event.ONDBLCLICK:
DadgetProcessorModel selection = getSelectionModel().getSelectedItem();
if(null == selection)
return;
DadgetCatalog.this.hide();
DadgetDto dadget = (selection.getProcessor()).instantiateDadget();
container.addDadget(dashboard, dadget);
break;
}
}
};
view.setCell(new AbstractCell<DadgetProcessorModel>() {
@Override
public void render(com.google.gwt.cell.client.Cell.Context context,
DadgetProcessorModel value, SafeHtmlBuilder sb) {
sb.append(xtemplate.render(value));
}
});
view.getSelectionModel().setSelectionMode(SelectionMode.SINGLE);
add(view);
addCancelButton();
DwTextButton submitBtn = new DwTextButton(BaseMessages.INSTANCE.add());
addButton(submitBtn);
submitBtn.addSelectHandler(new SelectHandler() {
@Override
public void onSelect(SelectEvent event) {
DadgetProcessorModel selection = view.getSelectionModel().getSelectedItem();
if(null == selection)
return;
hide();
DadgetDto dadget = (selection.getProcessor()).instantiateDadget();
container.addDadget(dashboard, dadget);
}
}); }
}
|
[
"srbala@gmail.com"
] |
srbala@gmail.com
|
95d26dc5615eb88b293edf8635cb1de41cdf417e
|
04832232841d33d4c135b794cb1f5ece650cc0cb
|
/src/main/java/ch/hearc/spring/thymeleaf/model/Produit.java
|
9d29e0c4c498f652bdef08ac7604e7726c7bb560
|
[] |
no_license
|
Cours-HE-ARC/thymeleaf-lab
|
40c9a9f10f342a942057150a0c429ac79de528d0
|
26f6fae7944d76efd719068736ee8b2484677637
|
refs/heads/master
| 2021-12-24T14:48:04.188450
| 2021-12-01T08:33:06
| 2021-12-01T08:33:06
| 172,986,111
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 906
|
java
|
package ch.hearc.spring.thymeleaf.model;
import java.math.BigDecimal;
import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
public class Produit {
@NotNull
@Size(min=2, max=30)
private String nom;
@NotNull
@DecimalMax("1000.0") @DecimalMin("0.0")
private BigDecimal prix;
public Produit(String nom, BigDecimal prix) {
super();
this.nom = nom;
this.prix = prix;
}
public Produit() {
// TODO Auto-generated constructor stub
}
public void setNom(String nom) {
this.nom = nom;
}
public void setPrix(BigDecimal prix) {
this.prix = prix;
}
public String getNom() {
return nom;
}
public BigDecimal getPrix() {
return prix;
}
@Override
public String toString() {
return "Produit [nom=" + nom + ", prix=" + prix + "]";
}
}
|
[
"seb.chevre@gmail.com"
] |
seb.chevre@gmail.com
|
efc9521af97a2e0b78b9c6a40c92301c24e35a9b
|
02ff2a10aded3d3aac5cabe4b19c9e0b14d8e8aa
|
/datamagic_server/src/hu/iboard/coandco/datamagic/generated/Arfolyam.java
|
0263941e1cf33ff61a22380ccc9285a3dd12050f
|
[] |
no_license
|
abiliog/ccdm
|
c1dd468e9c3dc63e7a2dbd4925e831f3a581a7a3
|
5c115226f6c64a6154025abe59ccd1bd7a561402
|
refs/heads/master
| 2021-01-16T21:20:38.766685
| 2012-12-13T21:47:49
| 2012-12-13T21:47:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,177
|
java
|
package hu.iboard.coandco.datamagic.generated;
// Generated Aug 11, 2009 4:42:50 PM by Hibernate Tools 3.2.4.GA
import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
/**
* Arfolyam generated by hbm2java
*/
@Entity
@Table(name = "ARFOLYAM")
public class Arfolyam implements java.io.Serializable {
private int rekid;
private String rov;
private Date datum;
private BigDecimal vetel;
private BigDecimal kozep;
private BigDecimal eladas;
private BigDecimal egyeni;
private Integer szlasorsz;
private Date moddatum;
private Integer modkod;
public Arfolyam() {
}
public Arfolyam(int rekid) {
this.rekid = rekid;
}
public Arfolyam(int rekid, String rov, Date datum, BigDecimal vetel,
BigDecimal kozep, BigDecimal eladas, BigDecimal egyeni,
Integer szlasorsz, Date moddatum, Integer modkod) {
this.rekid = rekid;
this.rov = rov;
this.datum = datum;
this.vetel = vetel;
this.kozep = kozep;
this.eladas = eladas;
this.egyeni = egyeni;
this.szlasorsz = szlasorsz;
this.moddatum = moddatum;
this.modkod = modkod;
}
@Id
@Column(name = "REKID", unique = true, nullable = false)
public int getRekid() {
return this.rekid;
}
public void setRekid(int rekid) {
this.rekid = rekid;
}
@Column(name = "ROV", length = 4)
public String getRov() {
return this.rov;
}
public void setRov(String rov) {
this.rov = rov;
}
//@Temporal(TemporalType.DATE)
@Column(name = "DATUM", length = 19)
public Date getDatum() {
return this.datum;
}
public void setDatum(Date datum) {
this.datum = datum;
}
@Column(name = "VETEL", precision = 15, scale = 3)
public BigDecimal getVetel() {
return this.vetel;
}
public void setVetel(BigDecimal vetel) {
this.vetel = vetel;
}
@Column(name = "KOZEP", precision = 15, scale = 3)
public BigDecimal getKozep() {
return this.kozep;
}
public void setKozep(BigDecimal kozep) {
this.kozep = kozep;
}
@Column(name = "ELADAS", precision = 15, scale = 3)
public BigDecimal getEladas() {
return this.eladas;
}
public void setEladas(BigDecimal eladas) {
this.eladas = eladas;
}
@Column(name = "EGYENI", precision = 15, scale = 3)
public BigDecimal getEgyeni() {
return this.egyeni;
}
public void setEgyeni(BigDecimal egyeni) {
this.egyeni = egyeni;
}
@Column(name = "SZLASORSZ", precision = 8, scale = 0)
public Integer getSzlasorsz() {
return this.szlasorsz;
}
public void setSzlasorsz(Integer szlasorsz) {
this.szlasorsz = szlasorsz;
}
//@Temporal(TemporalType.DATE)
@Column(name = "MODDATUM", length = 19)
public Date getModdatum() {
return this.moddatum;
}
public void setModdatum(Date moddatum) {
this.moddatum = moddatum;
}
@Column(name = "MODKOD")
public Integer getModkod() {
return this.modkod;
}
public void setModkod(Integer modkod) {
this.modkod = modkod;
}
}
|
[
"hoffergabor@gmail.com"
] |
hoffergabor@gmail.com
|
9a68184e51b1c73f69828965ee83950f31465626
|
e63363389e72c0822a171e450a41c094c0c1a49c
|
/Mate20_9_0_0/src/main/java/com/huawei/nb/model/collectencrypt/MetaTextInfo.java
|
a6b4fed83a4345b66537dda54d10b746d6928791
|
[] |
no_license
|
solartcc/HwFrameWorkSource
|
fc23ca63bcf17865e99b607cc85d89e16ec1b177
|
5b92ed0f1ccb4bafc0fdb08b6fc4d98447b754ad
|
refs/heads/master
| 2022-12-04T21:14:37.581438
| 2020-08-25T04:30:43
| 2020-08-25T04:30:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,053
|
java
|
package com.huawei.nb.model.collectencrypt;
import android.database.Cursor;
import android.os.Parcel;
import android.os.Parcelable.Creator;
import com.huawei.odmf.core.AManagedObject;
import com.huawei.odmf.model.AEntityHelper;
import java.util.Date;
public class MetaTextInfo extends AManagedObject {
public static final Creator<MetaTextInfo> CREATOR = new Creator<MetaTextInfo>() {
public MetaTextInfo createFromParcel(Parcel in) {
return new MetaTextInfo(in);
}
public MetaTextInfo[] newArray(int size) {
return new MetaTextInfo[size];
}
};
private Integer mId;
private Integer mReservedInt;
private String mReservedText;
private Date mTimeStamp;
private String mTitle;
private Integer mType;
public MetaTextInfo(Cursor cursor) {
Integer num = null;
setRowId(Long.valueOf(cursor.getLong(0)));
this.mId = cursor.isNull(1) ? null : Integer.valueOf(cursor.getInt(1));
this.mTimeStamp = cursor.isNull(2) ? null : new Date(cursor.getLong(2));
this.mType = cursor.isNull(3) ? null : Integer.valueOf(cursor.getInt(3));
this.mTitle = cursor.getString(4);
if (!cursor.isNull(5)) {
num = Integer.valueOf(cursor.getInt(5));
}
this.mReservedInt = num;
this.mReservedText = cursor.getString(6);
}
public MetaTextInfo(Parcel in) {
String str = null;
super(in);
if (in.readByte() == (byte) 0) {
this.mId = null;
in.readInt();
} else {
this.mId = Integer.valueOf(in.readInt());
}
this.mTimeStamp = in.readByte() == (byte) 0 ? null : new Date(in.readLong());
this.mType = in.readByte() == (byte) 0 ? null : Integer.valueOf(in.readInt());
this.mTitle = in.readByte() == (byte) 0 ? null : in.readString();
this.mReservedInt = in.readByte() == (byte) 0 ? null : Integer.valueOf(in.readInt());
if (in.readByte() != (byte) 0) {
str = in.readString();
}
this.mReservedText = str;
}
private MetaTextInfo(Integer mId, Date mTimeStamp, Integer mType, String mTitle, Integer mReservedInt, String mReservedText) {
this.mId = mId;
this.mTimeStamp = mTimeStamp;
this.mType = mType;
this.mTitle = mTitle;
this.mReservedInt = mReservedInt;
this.mReservedText = mReservedText;
}
public int describeContents() {
return 0;
}
public Integer getMId() {
return this.mId;
}
public void setMId(Integer mId) {
this.mId = mId;
setValue();
}
public Date getMTimeStamp() {
return this.mTimeStamp;
}
public void setMTimeStamp(Date mTimeStamp) {
this.mTimeStamp = mTimeStamp;
setValue();
}
public Integer getMType() {
return this.mType;
}
public void setMType(Integer mType) {
this.mType = mType;
setValue();
}
public String getMTitle() {
return this.mTitle;
}
public void setMTitle(String mTitle) {
this.mTitle = mTitle;
setValue();
}
public Integer getMReservedInt() {
return this.mReservedInt;
}
public void setMReservedInt(Integer mReservedInt) {
this.mReservedInt = mReservedInt;
setValue();
}
public String getMReservedText() {
return this.mReservedText;
}
public void setMReservedText(String mReservedText) {
this.mReservedText = mReservedText;
setValue();
}
public void writeToParcel(Parcel out, int ignored) {
super.writeToParcel(out, ignored);
if (this.mId != null) {
out.writeByte((byte) 1);
out.writeInt(this.mId.intValue());
} else {
out.writeByte((byte) 0);
out.writeInt(1);
}
if (this.mTimeStamp != null) {
out.writeByte((byte) 1);
out.writeLong(this.mTimeStamp.getTime());
} else {
out.writeByte((byte) 0);
}
if (this.mType != null) {
out.writeByte((byte) 1);
out.writeInt(this.mType.intValue());
} else {
out.writeByte((byte) 0);
}
if (this.mTitle != null) {
out.writeByte((byte) 1);
out.writeString(this.mTitle);
} else {
out.writeByte((byte) 0);
}
if (this.mReservedInt != null) {
out.writeByte((byte) 1);
out.writeInt(this.mReservedInt.intValue());
} else {
out.writeByte((byte) 0);
}
if (this.mReservedText != null) {
out.writeByte((byte) 1);
out.writeString(this.mReservedText);
return;
}
out.writeByte((byte) 0);
}
public AEntityHelper<MetaTextInfo> getHelper() {
return MetaTextInfoHelper.getInstance();
}
public String getEntityName() {
return "com.huawei.nb.model.collectencrypt.MetaTextInfo";
}
public String getDatabaseName() {
return "dsCollectEncrypt";
}
public String toString() {
StringBuilder sb = new StringBuilder("MetaTextInfo { mId: ").append(this.mId);
sb.append(", mTimeStamp: ").append(this.mTimeStamp);
sb.append(", mType: ").append(this.mType);
sb.append(", mTitle: ").append(this.mTitle);
sb.append(", mReservedInt: ").append(this.mReservedInt);
sb.append(", mReservedText: ").append(this.mReservedText);
sb.append(" }");
return sb.toString();
}
public boolean equals(Object o) {
return super.equals(o);
}
public int hashCode() {
return super.hashCode();
}
public String getDatabaseVersion() {
return "0.0.10";
}
public int getDatabaseVersionCode() {
return 10;
}
public String getEntityVersion() {
return "0.0.1";
}
public int getEntityVersionCode() {
return 1;
}
}
|
[
"lygforbs0@mail.com"
] |
lygforbs0@mail.com
|
4d7164f04d861af05e6a1e2aad06bcb18bc0de66
|
c770c49e2a91260abad58fd451d9524b790d7b20
|
/sentinel-agent/sentinel-agent-client/src/main/java/com/alibaba/acm/shaded/com/aliyuncs/auth/Signer.java
|
adac42cfd5b53ee1771b2a1b8d56b46330a5e2a6
|
[
"Apache-2.0"
] |
permissive
|
ddreaml/Sentinel-ali
|
d45e941e537d26628151f9c87dccdca16ef329a7
|
33721158794f9a713057abccbb4f4b89dfaaa644
|
refs/heads/master
| 2023-04-24T13:20:07.505656
| 2019-10-21T11:24:43
| 2019-10-21T11:24:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,835
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package com.alibaba.acm.shaded.com.aliyuncs.auth;
/**
* Created by haowei.yao on 2017/9/28.
*/
public abstract class Signer {
private final static Signer hmacSHA1Signer = new HmacSHA1Signer();
private final static Signer sha256withRSASigner = new SHA256withRSASigner();
private final static Signer bearerTokenSigner = new BearerTokenSigner();
public abstract String signString(String stringToSign, AlibabaCloudCredentials credentials);
public abstract String signString(String stringToSign, String accessKeySecret);
public abstract String getSignerName();
public abstract String getSignerVersion();
public abstract String getSignerType();
public static Signer getSigner(AlibabaCloudCredentials credentials) {
if (credentials instanceof KeyPairCredentials){
return sha256withRSASigner;
} else if (credentials instanceof BearerTokenCredentials) {
return bearerTokenSigner;
} else {
return hmacSHA1Signer;
}
}
}
|
[
"418294249@qq.com"
] |
418294249@qq.com
|
0a4eab0b86135375b71223f8e6cda630e09aafaf
|
5ab60a3eaaa904f983064c6548db698513437081
|
/uetool/src/main/java/me/ele/uetool/attrdialog/binder/EditTextItemBinder.java
|
8047e576dbd5b69eb4c46a5227aaea58e34b4892
|
[] |
no_license
|
cocowobo/XposedUETool
|
336c7b22fbd7cc91fed318670409c9ce501a93a8
|
419288ea2a10bbbca0575915b68ef1c1390b0743
|
refs/heads/master
| 2022-08-03T02:58:56.618517
| 2020-05-29T05:47:17
| 2020-05-29T05:47:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,033
|
java
|
package me.ele.uetool.attrdialog.binder;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import me.ele.uetool.AttrsDialog;
import me.ele.uetool.attrdialog.AttrsDialogItemViewBinder;
import me.ele.uetool.base.item.EditTextItem;
/**
* @author: weishenhong <a href="mailto:weishenhong@bytedance.com">contact me.</a>
* @date: 2019-07-08 23:46
*/
public class EditTextItemBinder extends AttrsDialogItemViewBinder<EditTextItem, AttrsDialog.Adapter.EditTextViewHolder<EditTextItem>> {
@NonNull
@Override
public AttrsDialog.Adapter.EditTextViewHolder onCreateViewHolder(@NonNull LayoutInflater inflater, @NonNull ViewGroup parent, RecyclerView.Adapter adapter) {
return AttrsDialog.Adapter.EditTextViewHolder.newInstance(parent);
}
@Override
public void onBindViewHolder(@NonNull AttrsDialog.Adapter.EditTextViewHolder holder, @NonNull EditTextItem item) {
holder.bindView(item);
}
}
|
[
"577093937@qq.com"
] |
577093937@qq.com
|
0c58e8b14ff78b26e55a512f4591fb30f00d2639
|
ba005c6729aed08554c70f284599360a5b3f1174
|
/lib/selenium-server-standalone-3.4.0/org/seleniumhq/jetty9/util/security/Constraint.java
|
af56df2e98a186c10aa9e3fceadda41c4a8e6842
|
[] |
no_license
|
Viral-patel703/Testyourbond-aut0
|
f6727a6da3b1fbf69cc57aeb89e15635f09e249a
|
784ab7a3df33d0efbd41f3adadeda22844965a56
|
refs/heads/master
| 2020-08-09T00:27:26.261661
| 2017-11-07T10:12:05
| 2017-11-07T10:12:05
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,580
|
java
|
package org.seleniumhq.jetty9.util.security;
import java.io.Serializable;
import java.util.Arrays;
public class Constraint
implements Cloneable, Serializable
{
public static final String __BASIC_AUTH = "BASIC";
public static final String __FORM_AUTH = "FORM";
public static final String __DIGEST_AUTH = "DIGEST";
public static final String __CERT_AUTH = "CLIENT_CERT";
public static final String __CERT_AUTH2 = "CLIENT-CERT";
public static final String __SPNEGO_AUTH = "SPNEGO";
public static final String __NEGOTIATE_AUTH = "NEGOTIATE";
public static final int DC_UNSET = -1;
public static final int DC_NONE = 0;
public static final int DC_INTEGRAL = 1;
public static final int DC_CONFIDENTIAL = 2;
public static final int DC_FORBIDDEN = 3;
public static final String NONE = "NONE";
public static final String ANY_ROLE = "*";
public static final String ANY_AUTH = "**";
private String _name;
private String[] _roles;
public static boolean validateMethod(String method)
{
if (method == null)
return false;
method = method.trim();
return (method.equals("FORM")) ||
(method.equals("BASIC")) ||
(method.equals("DIGEST")) ||
(method.equals("CLIENT_CERT")) ||
(method.equals("CLIENT-CERT")) ||
(method.equals("SPNEGO")) ||
(method.equals("NEGOTIATE"));
}
private int _dataConstraint = -1;
private boolean _anyRole = false;
private boolean _anyAuth = false;
private boolean _authenticate = false;
public Constraint() {}
public Constraint(String name, String role)
{
setName(name);
setRoles(new String[] { role });
}
public Object clone()
throws CloneNotSupportedException
{
return super.clone();
}
public void setName(String name)
{
_name = name;
}
public String getName()
{
return _name;
}
public void setRoles(String[] roles)
{
_roles = roles;
_anyRole = false;
_anyAuth = false;
int i; if (roles != null)
{
for (i = roles.length; i-- > 0;)
{
_anyRole |= "*".equals(roles[i]);
_anyAuth |= "**".equals(roles[i]);
}
}
}
public boolean isAnyRole()
{
return _anyRole;
}
public boolean isAnyAuth()
{
return _anyAuth;
}
public String[] getRoles()
{
return _roles;
}
public boolean hasRole(String role)
{
if (_anyRole) return true;
int i; if (_roles != null) for (i = _roles.length; i-- > 0;)
if (role.equals(_roles[i])) return true;
return false;
}
public void setAuthenticate(boolean authenticate)
{
_authenticate = authenticate;
}
public boolean getAuthenticate()
{
return _authenticate;
}
public boolean isForbidden()
{
return (_authenticate) && (!_anyRole) && ((_roles == null) || (_roles.length == 0));
}
public void setDataConstraint(int c)
{
if ((c < 0) || (c > 2)) throw new IllegalArgumentException("Constraint out of range");
_dataConstraint = c;
}
public int getDataConstraint()
{
return _dataConstraint;
}
public boolean hasDataConstraint()
{
return _dataConstraint >= 0;
}
public String toString()
{
return
"SC{" + _name + "," + (_roles == null ? "-" : _anyRole ? "*" : Arrays.asList(_roles).toString()) + "," + (_dataConstraint == 1 ? "INTEGRAL}" : _dataConstraint == 0 ? "NONE}" : _dataConstraint == -1 ? "DC_UNSET}" : "CONFIDENTIAL}");
}
}
|
[
"VIRUS-inside@users.noreply.github.com"
] |
VIRUS-inside@users.noreply.github.com
|
ec822ffe0b608de450e0a0f7aecd13a4b77a4285
|
992bf9c4be7fad96a6c5626d9a0308af3b80b405
|
/ceri-common/src/main/java/ceri/common/io/SystemIo.java
|
fdb49704c005afaece9736ff00ae8c881ad0d17f
|
[] |
no_license
|
cerijerome/ceri
|
75a8926911b7e3d9441d566e3a991df28359c65f
|
d72eb6de868c42f1320b27863bb2c859e86ef8fe
|
refs/heads/master
| 2023-08-02T20:19:05.466295
| 2023-07-31T00:02:10
| 2023-07-31T00:02:10
| 6,892,749
| 1
| 0
| null | 2023-05-04T07:08:06
| 2012-11-27T23:17:21
|
Java
|
UTF-8
|
Java
| false
| false
| 1,036
|
java
|
package ceri.common.io;
import java.io.InputStream;
import java.io.PrintStream;
import ceri.common.function.RuntimeCloseable;
/**
* Helper when overriding System i/o streams. Restores original streams on close.
*/
public class SystemIo implements RuntimeCloseable {
private final InputStream in;
private final PrintStream out;
private final PrintStream err;
public static SystemIo of() {
return new SystemIo();
}
private SystemIo() {
in = System.in;
out = System.out;
err = System.err;
}
public void in(InputStream in) {
System.setIn(in);
}
public InputStream in() {
return System.in;
}
public void out(PrintStream out) {
System.setOut(out);
}
public PrintStream out() {
return System.out;
}
public void err(PrintStream err) {
System.setErr(err);
}
public PrintStream err() {
return System.err;
}
@SuppressWarnings("resource")
@Override
public void close() {
if (in() != in) System.setIn(in);
if (out() != out) System.setOut(out);
if (err() != err) System.setErr(err);
}
}
|
[
"cerijerome@gmail.com"
] |
cerijerome@gmail.com
|
e7f1b38f63cee7af441001de1019154686fb4c89
|
a34e7162e08e8f7f0f801f20f1e8d7fc2e8bf2a7
|
/src/Tetris/Tetris.java
|
197fca88920e424bacb3e31e2316912f6c438726
|
[] |
no_license
|
spry-lucky/Game-Development
|
e7892453d17d1d66ea36bfce1e7f7acefb59e424
|
76cdf295d0a263aa425c553c0a12e5f7fcdc8e7e
|
refs/heads/master
| 2020-08-05T16:53:02.600932
| 2019-10-03T16:11:47
| 2019-10-03T16:11:47
| 212,622,777
| 0
| 0
| null | 2019-10-03T16:11:48
| 2019-10-03T16:10:16
| null |
UTF-8
|
Java
| false
| false
| 916
|
java
|
package Tetris;
import java.awt.BorderLayout;
import java.awt.EventQueue;
import javax.swing.JFrame;
import javax.swing.JLabel;
/*
Java Tetris game clone
Author: Jan Bodnar
Website: http://zetcode.com
*/
public class Tetris extends JFrame {
private JLabel statusbar;
public Tetris() {
initUI();
}
private void initUI() {
statusbar = new JLabel(" 0");
add(statusbar, BorderLayout.SOUTH);
Board board = new Board(this);
add(board);
board.start();
setTitle("Tetris");
setSize(200, 400);
setDefaultCloseOperation(EXIT_ON_CLOSE);
setLocationRelativeTo(null);
}
public JLabel getStatusBar() {
return statusbar;
}
public static void main(String[] args) {
EventQueue.invokeLater(() -> {
Tetris game = new Tetris();
game.setVisible(true);
});
}
}
|
[
"sudhanshumallick9@gmail.com"
] |
sudhanshumallick9@gmail.com
|
08e4f23dc5126ff2b9d2ffdd01b804857f35d8ad
|
21815b0a6e7741b6a5ed3293575d801a97b918de
|
/as/itests/org.jboss.tools.as.ui.bot.itests/src/org/jboss/tools/as/ui/bot/itests/reddeer/RuntimeMatcher.java
|
65373581738934c1bb3606ec7d76555e43f3606e
|
[] |
no_license
|
jbosstools/jbosstools-server
|
f7beec8346fdae37556531e36e3af51df09a9872
|
4d8a5bb01ddec48347fddfc94c76168861b771e8
|
refs/heads/main
| 2023-08-02T10:42:56.991445
| 2023-07-14T15:34:36
| 2023-07-14T16:29:23
| 6,308,291
| 4
| 42
| null | 2023-09-08T20:01:00
| 2012-10-20T11:23:04
|
Java
|
UTF-8
|
Java
| false
| false
| 980
|
java
|
/*******************************************************************************
* Copyright (c) 2020 Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v20.html
*
* Contributors: Red Hat, Inc.
******************************************************************************/
package org.jboss.tools.as.ui.bot.itests.reddeer;
import org.hamcrest.Description;
import org.hamcrest.TypeSafeMatcher;
public class RuntimeMatcher extends TypeSafeMatcher<Runtime>{
private Runtime expected;
public RuntimeMatcher(Runtime expected) {
this.expected = expected;
}
@Override
public boolean matchesSafely(Runtime item) {
return expected.equals(item);
}
@Override
public void describeTo(Description description) {
description.appendValue(expected);
}
}
|
[
"rob@oxbeef.net"
] |
rob@oxbeef.net
|
09e04fc101571d642ffbba4bd76d90c3654989bb
|
a8399c7d8f98d03d85d683abb285f0222efc9376
|
/server/test/unit/com/thoughtworks/studios/shine/xunit/AntJUnitReportRDFizerForTwistReportTest.java
|
33f3b7e34bd7bbd202413725d071b5dfd39ee39a
|
[
"Apache-2.0"
] |
permissive
|
lirujian/gocd
|
64998b0675b6f4e89b5b336cfe392f70b5cc69b7
|
f36206228d364eb3b1d5d9308f6e55d2e35e0244
|
refs/heads/master
| 2023-07-07T06:52:58.443990
| 2017-03-31T18:03:12
| 2017-03-31T18:03:12
| 86,893,138
| 0
| 0
|
Apache-2.0
| 2023-07-05T22:57:59
| 2017-04-01T07:20:03
|
Java
|
UTF-8
|
Java
| false
| false
| 6,492
|
java
|
/*************************GO-LICENSE-START*********************************
* Copyright 2014 ThoughtWorks, 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.
*************************GO-LICENSE-END***********************************/
package com.thoughtworks.studios.shine.xunit;
import java.io.File;
import java.io.StringReader;
import static com.thoughtworks.studios.shine.AssertUtils.assertAskIsTrue;
import com.thoughtworks.studios.shine.cruise.GoOntology;
import com.thoughtworks.studios.shine.semweb.Graph;
import com.thoughtworks.studios.shine.semweb.grddl.XSLTTransformerRegistry;
import com.thoughtworks.studios.shine.semweb.sesame.InMemoryTempGraphFactory;
import org.apache.commons.io.FileUtils;
import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.io.SAXReader;
import org.junit.Before;
import org.junit.Test;
public class AntJUnitReportRDFizerForTwistReportTest {
private XSLTTransformerRegistry XSLTTransformerRegistry;
@Before
public void setup() {
XSLTTransformerRegistry = new XSLTTransformerRegistry();
}
@Test
public void canReadTwistTestWithPassingOutput() throws Exception {
AntJUnitReportRDFizer junitRDFizer = new AntJUnitReportRDFizer(new InMemoryTempGraphFactory(), XSLTTransformerRegistry);
Graph graph = junitRDFizer.importFile("http://job", document(FileUtils.readFileToString(new File("test/data/twist_xunit/passing/TWIST_TEST--scenarios.ATest.xml"))));
String ask =
"prefix cruise: <" + GoOntology.URI + "> " +
"PREFIX xunit: <" + XUnitOntology.URI + "> " +
"prefix xsd: <http://www.w3.org/2001/XMLSchema#> " +
"ASK WHERE { " +
"<http://job> xunit:hasTestCase _:testCase . " +
"_:testCase a xunit:TestCase . " +
"_:testCase xunit:testSuiteName 'FailureHistoryForOneFailedCruiseBuild.scn'^^xsd:string . " +
"_:testCase xunit:testCaseName 'FailureHistoryForOneFailedCruiseBuild.scn'^^xsd:string . " +
"}";
assertAskIsTrue(graph, ask);
}
@Test
public void canReadTwistTestWithFailingOutput() throws Exception {
AntJUnitReportRDFizer junitRDFizer = new AntJUnitReportRDFizer(new InMemoryTempGraphFactory(), XSLTTransformerRegistry);
Graph graph = junitRDFizer.importFile("http://job", document(FileUtils.readFileToString(new File("test/data/twist_xunit/failing/TWIST_TEST--scenarios.AFailingTest.xml"))));
String ask =
"prefix cruise: <" + GoOntology.URI + "> " +
"PREFIX xunit: <" + XUnitOntology.URI + "> " +
"prefix xsd: <http://www.w3.org/2001/XMLSchema#> " +
"ASK WHERE { " +
"<http://job> xunit:hasTestCase _:testCase . " +
"_:testCase a xunit:TestCase . " +
"_:testCase xunit:testSuiteName 'ShineReadsCruiseStagesCompletedFeed.scn'^^xsd:string . " +
"_:testCase xunit:testCaseName 'ShineReadsCruiseStagesCompletedFeed.scn'^^xsd:string . " +
"_:testCase xunit:hasFailure _:failure . " +
"_:failure xunit:isError 'false'^^xsd:boolean " +
"}";
assertAskIsTrue(graph, ask);
}
@Test
public void canReadTwistTestWithErrorOutput() throws Exception {
AntJUnitReportRDFizer junitRDFizer = new AntJUnitReportRDFizer(new InMemoryTempGraphFactory(), XSLTTransformerRegistry);
Graph graph = junitRDFizer.importFile("http://job", document(FileUtils.readFileToString(new File("test/data/twist_xunit/errors/TWIST_TEST--scenarios.AErrorTest.xml"))));
String ask =
"prefix cruise: <" + GoOntology.URI + "> " +
"PREFIX xunit: <" + XUnitOntology.URI + "> " +
"prefix xsd: <http://www.w3.org/2001/XMLSchema#> " +
"ASK WHERE { " +
"<http://job> xunit:hasTestCase _:testCase . " +
"_:testCase a xunit:TestCase . " +
"_:testCase xunit:testSuiteName 'ShineReadsCruiseStagesCompletedFeed.scn'^^xsd:string . " +
"_:testCase xunit:testCaseName 'ShineReadsCruiseStagesCompletedFeed.scn'^^xsd:string . " +
"_:testCase xunit:hasFailure _:failure . " +
"_:failure xunit:isError 'true'^^xsd:boolean " +
"}";
assertAskIsTrue(graph, ask);
}
@Test
public void canReadACombinedTestReport() throws Exception {
AntJUnitReportRDFizer junitRDFizer = new AntJUnitReportRDFizer(new InMemoryTempGraphFactory(), XSLTTransformerRegistry);
Graph graph = junitRDFizer.importFile("http://job", document(FileUtils.readFileToString(new File("test/data/twist_xunit/TESTS-TestSuites.xml"))));
String ask =
"prefix cruise: <" + GoOntology.URI + "> " +
"PREFIX xunit: <" + XUnitOntology.URI + "> " +
"prefix xsd: <http://www.w3.org/2001/XMLSchema#> " +
"ASK WHERE { " +
"<http://job> xunit:hasTestCase _:testCase . " +
"_:testCase a xunit:TestCase . " +
"_:testCase xunit:testSuiteName 'scn'^^xsd:string . " +
"_:testCase xunit:testCaseName 'Parameter type matching in data table.scn'^^xsd:string . " +
"_:testCase xunit:hasFailure _:failure . " +
"_:failure xunit:isError 'false'^^xsd:boolean " +
"}";
assertAskIsTrue(graph, ask);
}
private Document document(String xml) throws DocumentException {
return new SAXReader().read(new StringReader(xml));
}
}
|
[
"godev@thoughtworks.com"
] |
godev@thoughtworks.com
|
2f87b027aeabbe802a3919f0e4522940d65dced0
|
41691da748cac60a6b37234a22a8502356f196eb
|
/src/main/java/com/jiyasoft/jewelplus/service/jpa/marketing/transactions/SaleMetalDtService.java
|
561ec9fa932d53a594af6e9fc268aa2a5a402bd2
|
[] |
no_license
|
abhijeet-yahoo/jewels
|
b9897bd75a48d99157f4760b047ef596438088db
|
1f164e5844a6417ac69dd5eb268b33ed5e3fe734
|
refs/heads/master
| 2023-07-17T08:16:28.466307
| 2021-08-16T06:37:48
| 2021-08-16T06:37:48
| 396,004,048
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,017
|
java
|
package com.jiyasoft.jewelplus.service.jpa.marketing.transactions;
import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.jiyasoft.jewelplus.domain.marketing.transactions.ConsigDt;
import com.jiyasoft.jewelplus.domain.marketing.transactions.ConsigMetalDt;
import com.jiyasoft.jewelplus.domain.marketing.transactions.SaleDt;
import com.jiyasoft.jewelplus.domain.marketing.transactions.SaleMetalDt;
import com.jiyasoft.jewelplus.domain.marketing.transactions.SaleMt;
import com.jiyasoft.jewelplus.repository.marketing.transactions.ISaleMetalDtRepository;
import com.jiyasoft.jewelplus.service.marketing.transactions.ISaleDtService;
import com.jiyasoft.jewelplus.service.marketing.transactions.ISaleMetalDtService;
@Service
@Repository
@Transactional
public class SaleMetalDtService implements ISaleMetalDtService{
@Autowired
private ISaleMetalDtRepository saleMetalDtRepository;
@Autowired
private ISaleDtService saleDtService;
@Override
public void save(SaleMetalDt saleMetalDt) {
// TODO Auto-generated method stub
saleMetalDtRepository.save(saleMetalDt);
}
@Override
public void delete(int id) {
// TODO Auto-generated method stub
saleMetalDtRepository.delete(id);
}
@Override
public SaleMetalDt findOne(int id) {
// TODO Auto-generated method stub
return saleMetalDtRepository.findOne(id);
}
@Override
public List<SaleMetalDt> findBySaleMt(SaleMt saleMt) {
// TODO Auto-generated method stub
return saleMetalDtRepository.findBySaleMt(saleMt);
}
@Override
public List<SaleMetalDt> findBySaleDt(SaleDt saleDt) {
// TODO Auto-generated method stub
return saleMetalDtRepository.findBySaleDt(saleDt);
}
@Override
public SaleMetalDt findBySaleDtAndMainMetal(SaleDt saleDt, Boolean mainMetal) {
// TODO Auto-generated method stub
return saleMetalDtRepository.findBySaleDtAndMainMetal(saleDt, mainMetal);
}
@Override
public String saleMetalDtListing(Integer dtId) {
// TODO Auto-generated method stub
SaleDt saleDt = saleDtService.findOne(dtId);
List<SaleMetalDt> saleMetalDts = findBySaleDt(saleDt);
String str="";
StringBuilder sb = new StringBuilder();
sb.append("{\"total\":").append(saleMetalDts.size()).append(",\"rows\": [");
for(SaleMetalDt saleMetalDt :saleMetalDts){
sb.append("{\"id\":\"")
.append(saleMetalDt.getId())
.append("\",\"purity\":\"")
.append((saleMetalDt.getPurity() != null ? saleMetalDt.getPurity().getName() : ""))
.append("\",\"color\":\"")
.append((saleMetalDt.getColor() != null ? saleMetalDt.getColor().getName() : ""))
.append("\",\"partNm\":\"")
.append((saleMetalDt.getPartNm() != null ? saleMetalDt.getPartNm().getFieldValue() : ""))
.append("\",\"qty\":\"")
.append((saleMetalDt.getMetalPcs() != null ? saleMetalDt.getMetalPcs() : ""))
.append("\",\"metalWt\":\"")
.append((saleMetalDt.getMetalWeight() != null ? saleMetalDt.getMetalWeight() : ""))
.append("\",\"metalRate\":\"")
.append((saleMetalDt.getMetalRate() != null ? saleMetalDt.getMetalRate() : ""))
.append("\",\"perGramRate\":\"")
.append((saleMetalDt.getPerGramRate() != null ? saleMetalDt.getPerGramRate() : ""))
.append("\",\"lossPerc\":\"")
.append((saleMetalDt.getLossPerc() != null ? saleMetalDt.getLossPerc() : ""))
.append("\",\"metalValue\":\"")
.append((saleMetalDt.getMetalValue() != null ? saleMetalDt.getMetalValue() : ""))
.append("\",\"mainMetal\":\"")
.append(saleMetalDt.getMainMetal())
.append("\"},");
}
str = sb.toString();
str = (str.indexOf("},") != -1 ? str.substring(0, str.length() - 1)
: str);
str += "]}";
return str;
}
}
|
[
"comp2@comp2-pc"
] |
comp2@comp2-pc
|
111fd22f6a0d92798f6bc2406da5df6ad7344061
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/large-multiproject/project13/src/test/java/org/gradle/test/performance13_5/Test13_473.java
|
284742b95b0647d9cae490f6bf577a210f64c7bb
|
[] |
no_license
|
gradle/performance-comparisons
|
b0d38db37c326e0ce271abebdb3c91769b860799
|
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
|
refs/heads/master
| 2023-08-14T19:24:39.164276
| 2022-11-24T05:18:33
| 2022-11-24T05:18:33
| 80,121,268
| 17
| 15
| null | 2022-09-30T08:04:35
| 2017-01-26T14:25:33
| null |
UTF-8
|
Java
| false
| false
| 292
|
java
|
package org.gradle.test.performance13_5;
import static org.junit.Assert.*;
public class Test13_473 {
private final Production13_473 production = new Production13_473("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
df1da730329a52e304b99482f43e190f36a8afe2
|
313d6eafd5524e91b781745221b17f5ad3d688d1
|
/cg-gkc/app/library_projects/customviews/src/com/customviews/library/notifydialogeffects/Effectstype.java
|
26ab8eb5175c7744d4456fc1581b27becb904a34
|
[] |
no_license
|
codegarage-tech/cg-gk
|
7a177d5ca543c424a0ce0d87b70958800ce8f535
|
e44c088387429b163973271f9ff56756bcb6b75b
|
refs/heads/master
| 2021-08-10T12:01:43.491551
| 2017-11-12T14:23:13
| 2017-11-12T14:23:13
| 110,437,989
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,016
|
java
|
package com.customviews.library.notifydialogeffects;
import com.customviews.library.notifydialogeffects.BaseEffects;
import com.customviews.library.notifydialogeffects.FadeIn;
import com.customviews.library.notifydialogeffects.Fall;
import com.customviews.library.notifydialogeffects.FlipH;
import com.customviews.library.notifydialogeffects.FlipV;
import com.customviews.library.notifydialogeffects.NewsPaper;
import com.customviews.library.notifydialogeffects.RotateLeft;
import com.customviews.library.notifydialogeffects.Shake;
import com.customviews.library.notifydialogeffects.SideFall;
import com.customviews.library.notifydialogeffects.RotateBottom;
import com.customviews.library.notifydialogeffects.SlideBottom;
import com.customviews.library.notifydialogeffects.SlideLeft;
import com.customviews.library.notifydialogeffects.SlideRight;
import com.customviews.library.notifydialogeffects.SlideTop;
import com.customviews.library.notifydialogeffects.Slit;
public enum Effectstype {
Fadein(FadeIn.class), Slideleft(SlideLeft.class), Slidetop(SlideTop.class), SlideBottom(
SlideBottom.class), Slideright(SlideRight.class), Fall(Fall.class), Newspager(
NewsPaper.class), Fliph(FlipH.class), Flipv(FlipV.class), RotateBottom(
RotateBottom.class), RotateLeft(RotateLeft.class), Slit(Slit.class), Shake(
Shake.class), Sidefill(SideFall.class);
private Class<? extends BaseEffects> effectsClazz;
private Effectstype(Class<? extends BaseEffects> mclass) {
effectsClazz = mclass;
}
public BaseEffects getAnimator() {
BaseEffects bEffects = null;
try {
bEffects = effectsClazz.newInstance();
} catch (ClassCastException e) {
throw new Error("Can not init animatorClazz instance");
} catch (InstantiationException e) {
// TODO Auto-generated catch block
throw new Error("Can not init animatorClazz instance");
} catch (IllegalAccessException e) {
// TODO Auto-generated catch block
throw new Error("Can not init animatorClazz instance");
}
return bEffects;
}
}
|
[
"rashed.droid@gmail.com"
] |
rashed.droid@gmail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.